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

535 lines
1.8 MiB

This file contains invisible Unicode characters!

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

(window.webpackJsonp=window.webpackJsonp||[]).push([[212,5,6,7,8,14],{"+NIl":function(H,J,I){(function(N){N(I("VrN/"))})(function(N){"use strict";N.defineMode("stex",function(g,S){"use strict";function k(n,o){n.cmdState.push(o)}function y(n){return n.cmdState.length>0?n.cmdState[n.cmdState.length-1]:null}function m(n){var o=n.cmdState.pop();o&&o.closeBracket()}function C(n){for(var o=n.cmdState,h=o.length-1;h>=0;h--){var d=o[h];if(d.name=="DEFAULT")continue;return d}return{styleIdentifier:function(){return null}}}function _(n,o,h){return function(){this.name=n,this.bracketNo=0,this.style=o,this.styles=h,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 f(n,o){n.f=o}function r(n,o){var h;if(n.match(/^\\[a-zA-Z@]+/)){var d=n.current().slice(1);return h=e.hasOwnProperty(d)?e[d]:e.DEFAULT,h=new h,k(o,h),f(o,i),h.style}if(n.match(/^\\[$&%#{}_]/))return"tag";if(n.match(/^\\[,;!\/\\]/))return"tag";if(n.match("\\["))return f(o,function(s,l){return c(s,l,"\\]")}),"keyword";if(n.match("\\("))return f(o,function(s,l){return c(s,l,"\\)")}),"keyword";if(n.match("$$"))return f(o,function(s,l){return c(s,l,"$$")}),"keyword";if(n.match("$"))return f(o,function(s,l){return c(s,l,"$")}),"keyword";var u=n.next();if(u=="%")return n.skipToEnd(),"comment";if(u=="}"||u=="]"){if(h=y(o),h)h.closeBracket(u),f(o,i);else return"error";return"bracket"}else return u=="{"||u=="["?(h=e.DEFAULT,h=new h,k(o,h),"bracket"):/\d/.test(u)?(n.eatWhile(/[\w.%]/),"atom"):(n.eatWhile(/[\w\-_]/),h=C(o),h.name=="begin"&&(h.argument=n.current()),h.styleIdentifier())}function c(n,o,h){if(n.eatSpace())return null;if(h&&n.match(h))return f(o,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,o){var h=n.peek(),d;return h=="{"||h=="["?(d=y(o),d.openBracket(h),n.eat(h),f(o,r),"bracket"):/[ \t\r]/.test(h)?(n.eat(h),null):(f(o,r),m(o),r(n,o))}return{startState:function(){var n=S.inMathMode?function(o,h){return c(o,h)}:r;return{cmdState:[],f:n}},copyState:function(n){return{cmdState:n.cmdState.slice(),f:n.f}},token:function(n,o){return o.f(n,o)},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,J,I){},"/cxE":function(H,J,I){"use strict";I.d(J,"f",function(){return S}),I.d(J,"g",function(){return k}),I.d(J,"h",function(){return y}),I.d(J,"e",function(){return C}),I.d(J,"b",function(){return _}),I.d(J,"c",function(){return e}),I.d(J,"d",function(){return f}),I.d(J,"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 y(c){if(c instanceof Error){let{name:i,message:n}=c;const o=c.stacktrace||c.stack;return{$isError:!0,name:i,message:n,stack:o}}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 f(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,J,I){(function(N){N(I("VrN/"))})(function(N){N.defineOption("placeholder","",function(_,e,f){var r=f&&f!=N.Init;if(e&&!r)_.on("blur",y),_.on("change",m),_.on("swapDoc",m),N.on(_.getInputField(),"compositionupdate",_.state.placeholderCompose=function(){k(_)}),m(_);else if(!e&&r){_.off("blur",y),_.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()&&y(_)});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 f=_.getOption("placeholder");typeof f=="string"&&(f=document.createTextNode(f)),e.appendChild(f),_.display.lineSpace.insertBefore(e,_.display.lineSpace.firstChild)}function k(_){setTimeout(function(){var e=!1,f=_.getInputField();f.nodeName=="TEXTAREA"?e=!f.value:_.lineCount()==1&&(e=!/[^\u200b]/.test(f.querySelector(".CodeMirror-line").textContent)),e?S(_):g(_)},20)}function y(_){C(_)&&S(_)}function m(_){var e=_.getWrapperElement(),f=C(_);e.className=e.className.replace(" CodeMirror-empty","")+(f?" CodeMirror-empty":""),f?S(_):g(_)}function C(_){return _.lineCount()===1&&_.getLine(0)===""}})},"1T2W":function(H,J,I){H.exports={"code-panel-container":"code-panel-container___1BMQ9","action-oj-bar":"action-oj-bar___1PRBr",active:"active___2710v"}},"1eCo":function(H,J,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,y){var m=k.indentUnit,C={},_=y.htmlMode?g:S;for(var e in _)C[e]=_[e];for(var e in y)C[e]=y[e];var f,r;function c(T,F){function P(K){return F.tokenize=K,K(T,F)}var A=T.next();if(A=="<")return T.eat("!")?T.eat("[")?T.match("CDATA[")?P(o("atom","]]>")):null:T.match("--")?P(o("comment","-->")):T.match("DOCTYPE",!0,!0)?(T.eatWhile(/[\w\._\-]/),P(h(1))):null:T.eat("?")?(T.eatWhile(/[\w\._\-]/),F.tokenize=o("meta","?>"),"meta"):(f=T.eat("/")?"closeTag":"openTag",F.tokenize=i,"tag bracket");if(A=="&"){var z;return T.eat("#")?T.eat("x")?z=T.eatWhile(/[a-fA-F\d]/)&&T.eat(";"):z=T.eatWhile(/[\d]/)&&T.eat(";"):z=T.eatWhile(/[\w\.\-:]/)&&T.eat(";"),z?"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,f=P==">"?"endTag":"selfcloseTag","tag bracket";if(P=="=")return f="equals",null;if(P=="<"){F.tokenize=c,F.state=l,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 o(T,F){return function(P,A){for(;!P.eol();){if(P.match(F)){A.tokenize=c;break}P.next()}return T}}function h(T){return function(F,P){for(var A;(A=F.next())!=null;){if(A=="<")return P.tokenize=h(T+1),P.tokenize(F,P);if(A==">")if(T==1){P.tokenize=c;break}else return P.tokenize=h(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 s(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 l(T,F,P){return T=="openTag"?(P.tagStart=F.column(),E):T=="closeTag"?b:l}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",L)}else return C.allowMissingTagName&&T=="endTag"?(r="tag bracket",p(T,F,P)):(r="error",L)}function p(T,F,P){return T!="endTag"?(r="error",p):(u(P),l)}function L(T,F,P){return r="error",p(T,F,P)}function R(T,F,P){if(T=="word")return r="attribute",v;if(T=="endTag"||T=="selfcloseTag"){var A=P.tagName,z=P.tagStart;return P.tagName=P.tagStart=null,T=="selfcloseTag"||C.autoSelfClosers.hasOwnProperty(A)?s(P,A):(s(P,A),P.context=new d(P,A,z==P.indented)),l}return r="error",R}function v(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:l,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;f=null;var P=F.tokenize(T,F);return(P||f)&&P!="comment"&&(r=null,F.state=F.state(f||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 z=F&&/^<(\/)?([\w_:\.-]*)/.exec(F);if(z&&z[1])for(;A;)if(A.tagName==z[2]){A=A.prev;break}else if(C.implicitlyClosed.hasOwnProperty(A.tagName))A=A.prev;else break;else if(z)for(;A;){var K=C.contextGrabbers[A.tagName];if(K&&K.hasOwnProperty(z[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,J,I){(function(N,g,S){H.exports=J=g(I("Ib8C"),I("MlIO"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.Hasher,y=g.x64,m=y.Word,C=y.WordArray,_=g.algo;function e(){return m.create.apply(m,arguments)}var f=[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 o=this._hash.words,h=o[0],d=o[1],u=o[2],s=o[3],l=o[4],E=o[5],b=o[6],p=o[7],L=h.high,R=h.low,v=d.high,x=d.low,w=u.high,T=u.low,F=s.high,P=s.low,A=l.high,z=l.low,K=E.high,O=E.low,B=b.high,U=b.low,D=p.high,W=p.low,Q=L,re=R,ee=v,ye=x,be=w,he=T,Ie=F,Se=P,fe=A,ue=z,ie=K,Ce=O,ne=B,ce=U,Ae=D,oe=W,q=0;q<80;q++){var $,X,de=r[q];if(q<16)X=de.high=i[n+q*2]|0,$=de.low=i[n+q*2+1]|0;else{var pe=r[q-15],xe=pe.high,Ke=pe.low,qe=(xe>>>1|Ke<<31)^(xe>>>8|Ke<<24)^xe>>>7,tt=(Ke>>>1|xe<<31)^(Ke>>>8|xe<<24)^(Ke>>>7|xe<<25),et=r[q-2],it=et.high,at=et.low,je=(it>>>19|at<<13)^(it<<3|at>>>29)^it>>>6,De=(at>>>19|it<<13)^(at<<3|it>>>29)^(at>>>6|it<<26),nt=r[q-7],lt=nt.high,Ve=nt.low,Qe=r[q-16],Fe=Qe.high,Re=Qe.low;$=tt+Ve,X=qe+lt+($>>>0<tt>>>0?1:0),$=$+De,X=X+je+($>>>0<De>>>0?1:0),$=$+Re,X=X+Fe+($>>>0<Re>>>0?1:0),de.high=X,de.low=$}var Me=fe&ie^~fe&ne,Ee=ue&Ce^~ue&ce,Oe=Q&ee^Q&be^ee&be,ke=re&ye^re&he^ye&he,Ne=(Q>>>28|re<<4)^(Q<<30|re>>>2)^(Q<<25|re>>>7),He=(re>>>28|Q<<4)^(re<<30|Q>>>2)^(re<<25|Q>>>7),rt=(fe>>>14|ue<<18)^(fe>>>18|ue<<14)^(fe<<23|ue>>>9),ct=(ue>>>14|fe<<18)^(ue>>>18|fe<<14)^(ue<<23|fe>>>9),yt=f[q],ht=yt.high,pt=yt.low,Dt=oe+ct,At=Ae+rt+(Dt>>>0<oe>>>0?1:0),Dt=Dt+Ee,At=At+Me+(Dt>>>0<Ee>>>0?1:0),Dt=Dt+pt,At=At+ht+(Dt>>>0<pt>>>0?1:0),Dt=Dt+$,At=At+X+(Dt>>>0<$>>>0?1:0),bt=He+ke,Xt=Ne+Oe+(bt>>>0<He>>>0?1:0);Ae=ne,oe=ce,ne=ie,ce=Ce,ie=fe,Ce=ue,ue=Se+Dt|0,fe=Ie+At+(ue>>>0<Se>>>0?1:0)|0,Ie=be,Se=he,be=ee,he=ye,ee=Q,ye=re,re=Dt+bt|0,Q=At+Xt+(re>>>0<Dt>>>0?1:0)|0}R=h.low=R+re,h.high=L+Q+(R>>>0<re>>>0?1:0),x=d.low=x+ye,d.high=v+ee+(x>>>0<ye>>>0?1:0),T=u.low=T+he,u.high=w+be+(T>>>0<he>>>0?1:0),P=s.low=P+Se,s.high=F+Ie+(P>>>0<Se>>>0?1:0),z=l.low=z+ue,l.high=A+fe+(z>>>0<ue>>>0?1:0),O=E.low=O+Ce,E.high=K+ie+(O>>>0<Ce>>>0?1:0),U=b.low=U+ce,b.high=B+ne+(U>>>0<ce>>>0?1:0),W=p.low=W+oe,p.high=D+Ae+(W>>>0<oe>>>0?1:0)},_doFinalize:function(){var i=this._data,n=i.words,o=this._nDataBytes*8,h=i.sigBytes*8;n[h>>>5]|=128<<24-h%32,n[(h+128>>>10<<5)+30]=Math.floor(o/4294967296),n[(h+128>>>10<<5)+31]=o,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,J,I){"use strict";I.d(J,"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 y=new N(S);if(this._first===N.Undefined)this._first=y,this._last=y;else if(k){const C=this._last;this._last=y,y.prev=C,C.next=y}else{const C=this._first;this._first=y,y.next=C,C.prev=y}this._size+=1;let m=!1;return()=>{m||(m=!0,this._remove(y))}}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,J,I){"use strict";I.d(J,"a",function(){return g});function N(S,k){let y;return k.length===0?y=S:y=S.replace(/\{(\d+)\}/g,function(m,C){const _=C[0];return typeof k[_]!="undefined"?k[_]:m}),y}function g(S,k,...y){return N(k,y)}},"3y9D":function(H,J,I){(function(N,g){H.exports=J=g(I("Ib8C"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.WordArray,y=S.Hasher,m=g.algo,C=[],_=m.SHA1=y.extend({_doReset:function(){this._hash=new k.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,f){for(var r=this._hash.words,c=r[0],i=r[1],n=r[2],o=r[3],h=r[4],d=0;d<80;d++){if(d<16)C[d]=e[f+d]|0;else{var u=C[d-3]^C[d-8]^C[d-14]^C[d-16];C[d]=u<<1|u>>>31}var s=(c<<5|c>>>27)+h+C[d];d<20?s+=(i&n|~i&o)+1518500249:d<40?s+=(i^n^o)+1859775393:d<60?s+=(i&n|i&o|n&o)-1894007588:s+=(i^n^o)-899497514,h=o,o=n,n=i<<30|i>>>2,i=c,c=s}r[0]=r[0]+c|0,r[1]=r[1]+i|0,r[2]=r[2]+n|0,r[3]=r[3]+o|0,r[4]=r[4]+h|0},_doFinalize:function(){var e=this._data,f=e.words,r=this._nDataBytes*8,c=e.sigBytes*8;return f[c>>>5]|=128<<24-c%32,f[(c+64>>>9<<4)+14]=Math.floor(r/4294967296),f[(c+64>>>9<<4)+15]=r,e.sigBytes=f.length*4,this._process(),this._hash},clone:function(){var e=y.clone.call(this);return e._hash=this._hash.clone(),e}});g.SHA1=y._createHelper(_),g.HmacSHA1=y._createHmacHelper(_)}(),N.SHA1})},4:function(H,J){},"5VLF":function(H,J,I){"use strict";var N,g;function S(k,y,m){var C=function(_,e){return k.js_beautify(_,e)};return C.js=k.js_beautify,C.css=y.css_beautify,C.html=m.html_beautify,C.js_beautify=k.js_beautify,C.css_beautify=y.css_beautify,C.html_beautify=m.html_beautify,C}!(N=[I("6UM0"),I("TXwP"),I("psGv")],g=function(k,y,m){return S(k,y,m)}.apply(J,N),g!==void 0&&(H.exports=g))},"5Y4S":function(H,J,I){"use strict";I.d(J,"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,J,I){(function(N,g,S){H.exports=J=g(I("Ib8C"),I("MlIO"))})(this,function(N){return function(g){var S=N,k=S.lib,y=k.WordArray,m=k.Hasher,C=S.x64,_=C.Word,e=S.algo,f=[],r=[],c=[];(function(){for(var o=1,h=0,d=0;d<24;d++){f[o+5*h]=(d+1)*(d+2)/2%64;var u=h%5,s=(2*o+3*h)%5;o=u,h=s}for(var o=0;o<5;o++)for(var h=0;h<5;h++)r[o+5*h]=h+(2*o+3*h)%5*5;for(var l=1,E=0;E<24;E++){for(var b=0,p=0,L=0;L<7;L++){if(l&1){var R=(1<<L)-1;R<32?p^=1<<R:b^=1<<R-32}l&128?l=l<<1^113:l<<=1}c[E]=_.create(b,p)}})();var i=[];(function(){for(var o=0;o<25;o++)i[o]=_.create()})();var n=e.SHA3=m.extend({cfg:m.cfg.extend({outputLength:512}),_doReset:function(){for(var o=this._state=[],h=0;h<25;h++)o[h]=new _.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(o,h){for(var d=this._state,u=this.blockSize/2,s=0;s<u;s++){var l=o[h+2*s],E=o[h+2*s+1];l=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,E=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360;var b=d[s];b.high^=E,b.low^=l}for(var p=0;p<24;p++){for(var L=0;L<5;L++){for(var R=0,v=0,x=0;x<5;x++){var b=d[L+5*x];R^=b.high,v^=b.low}var w=i[L];w.high=R,w.low=v}for(var L=0;L<5;L++)for(var T=i[(L+4)%5],F=i[(L+1)%5],P=F.high,A=F.low,R=T.high^(P<<1|A>>>31),v=T.low^(A<<1|P>>>31),x=0;x<5;x++){var b=d[L+5*x];b.high^=R,b.low^=v}for(var z=1;z<25;z++){var R,v,b=d[z],K=b.high,O=b.low,B=f[z];B<32?(R=K<<B|O>>>32-B,v=O<<B|K>>>32-B):(R=O<<B-32|K>>>64-B,v=K<<B-32|O>>>64-B);var U=i[r[z]];U.high=R,U.low=v}var D=i[0],W=d[0];D.high=W.high,D.low=W.low;for(var L=0;L<5;L++)for(var x=0;x<5;x++){var z=L+5*x,b=d[z],Q=i[z],re=i[(L+1)%5+5*x],ee=i[(L+2)%5+5*x];b.high=Q.high^~re.high&ee.high,b.low=Q.low^~re.low&ee.low}var b=d[0],ye=c[p];b.high^=ye.high,b.low^=ye.low}},_doFinalize:function(){var o=this._data,h=o.words,d=this._nDataBytes*8,u=o.sigBytes*8,s=this.blockSize*32;h[u>>>5]|=1<<24-u%32,h[(g.ceil((u+1)/s)*s>>>5)-1]|=128,o.sigBytes=h.length*4,this._process();for(var l=this._state,E=this.cfg.outputLength/8,b=E/8,p=[],L=0;L<b;L++){var R=l[L],v=R.high,x=R.low;v=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,x=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,p.push(x),p.push(v)}return new y.init(p,E)},clone:function(){for(var o=m.clone.call(this),h=o._state=this._state.slice(0),d=0;d<25;d++)h[d]=h[d].clone();return o}});S.SHA3=m._createHelper(n),S.HmacSHA3=m._createHmacHelper(n)}(Math),N.SHA3})},"5nXd":function(H,J,I){var N=I("MFOe"),g=N.slice,S=N.pluck,k=N.each,y=N.bind,m=N.create,C=N.isList,_=N.isFunction,e=N.isObject;H.exports={createStore:c};var f={version:"2.0.12",enabled:!1,get:function(i,n){var o=this.storage.read(this._namespacePrefix+i);return this._deserialize(o,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(o,h){i.call(n,n._deserialize(o),(h||"").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,o){o||(o=""),i&&!C(i)&&(i=[i]),n&&!C(n)&&(n=[n]);var h=o?"__storejs_"+o+"_":"",d=o?new RegExp("^"+h):null,u=/^[a-zA-Z0-9_\-]*$/;if(!u.test(o))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var s={_namespacePrefix:h,_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(L){return!1}},_assignPluginFnProp:function(E,b){var p=this[b];this[b]=function(){var R=g(arguments,0),v=this;function x(){return p?(k(arguments,function(T,F){R[F]=T}),p.apply(v,R)):void 0}var w=[x].concat(R);return E.apply(v,w)}},_serialize:function(E){return JSON.stringify(E)},_deserialize:function(E,b){if(!E)return b;var p="";try{p=JSON.parse(E)}catch(L){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 L=E.call(this);if(!e(L))throw new Error("Plugins must return an object of function properties");k(L,function(R,v){if(!_(R))throw new Error("Bad plugin property: "+v+" from plugin "+E.name+". Plugins should only return functions.");b._assignPluginFnProp(R,v)})},addStorage:function(E){r("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(E)}},l=m(s,f,{plugins:[]});return l.raw={},k(l,function(E,b){_(E)&&(l.raw[b]=y(l,E))}),k(i,function(E){l._addStorage(E)}),k(n,function(E){l._addPlugin(E)}),l}},"6+eU":function(H,J,I){"use strict";I.d(J,"a",function(){return p});var N=I("wx14"),g=I("rePB"),S=I("VTBJ"),k=I("1OyB"),y=I("vuIU"),m=I("Ji7U"),C=I("LK+K"),_=I("q1tI"),e=I.n(_),f=I("TSYQ"),r=I.n(f),c=function(R){var v,x="".concat(R.rootPrefixCls,"-item"),w=r()(x,"".concat(x,"-").concat(R.page),(v={},Object(g.a)(v,"".concat(x,"-active"),R.active),Object(g.a)(v,R.className,!!R.className),Object(g.a)(v,"".concat(x,"-disabled"),!R.page),v)),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},o=function(L){Object(m.a)(v,L);var R=Object(C.a)(v);function v(){var x;Object(k.a)(this,v);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,z=A.goButton,K=A.quickGo,O=A.rootPrefixCls,B=x.state.goInputText;if(z||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:""}),K(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(y.a)(v,[{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 z=isNaN(Number(P))?0:Number(P),K=isNaN(Number(A))?0:Number(A);return z-K})}},{key:"render",value:function(){var w=this,T=this.props,F=T.pageSize,P=T.locale,A=T.rootPrefixCls,z=T.changeSize,K=T.quickGo,O=T.goButton,B=T.selectComponentClass,U=T.buildOptionText,D=T.selectPrefixCls,W=T.disabled,Q=this.state.goInputText,re="".concat(A,"-options"),ee=B,ye=null,be=null,he=null;if(!z&&!K)return null;var Ie=this.getPageSizeOptions();if(z&&ee){var Se=Ie.map(function(fe,ue){return e.a.createElement(ee.Option,{key:ue,value:fe.toString()},(U||w.buildOptionText)(fe))});ye=e.a.createElement(ee,{disabled:W,prefixCls:D,showSearch:!1,className:"".concat(re,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(F||Ie[0]).toString(),onChange:this.changeSize,getPopupContainer:function(ue){return ue.parentNode}},Se)}return K&&(O&&(he=typeof O=="boolean"?e.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:W,className:"".concat(re,"-quick-jumper-button")},P.jump_to_confirm):e.a.createElement("span",{onClick:this.go,onKeyUp:this.go},O)),be=e.a.createElement("div",{className:"".concat(re,"-quick-jumper")},P.jump_to,e.a.createElement("input",{disabled:W,type:"text",value:Q,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),P.page,he)),e.a.createElement("li",{className:"".concat(re)},ye,be)}}]),v}(e.a.Component);o.defaultProps={pageSizeOptions:["10","20","50","100"]};var h=o,d=I("N2Kk");function u(){}function s(L){return typeof L=="number"&&isFinite(L)&&Math.floor(L)===L}function l(L,R,v){return v}function E(L,R,v){var x=typeof L=="undefined"?R.pageSize:L;return Math.floor((v.total-1)/x)+1}var b=function(L){Object(m.a)(v,L);var R=Object(C.a)(v);function v(x){var w;Object(k.a)(this,v),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(z,K){var O=w.props.prefixCls,B=z||e.a.createElement("button",{type:"button","aria-label":K,className:"".concat(O,"-item-link")});return typeof z=="function"&&(B=e.a.createElement(z,Object(S.a)({},w.props))),B},w.savePaginationNode=function(z){w.paginationNode=z},w.isValid=function(z){return s(z)&&z!==w.state.current},w.shouldDisplayQuickJumper=function(){var z=w.props,K=z.showQuickJumper,O=z.pageSize,B=z.total;return B<=O?!1:K},w.handleKeyDown=function(z){(z.keyCode===n.ARROW_UP||z.keyCode===n.ARROW_DOWN)&&z.preventDefault()},w.handleKeyUp=function(z){var K=w.getValidValue(z),O=w.state.currentInputValue;K!==O&&w.setState({currentInputValue:K}),z.keyCode===n.ENTER?w.handleChange(K):z.keyCode===n.ARROW_UP?w.handleChange(K-1):z.keyCode===n.ARROW_DOWN&&w.handleChange(K+1)},w.changePageSize=function(z){var K=w.state.current,O=E(z,w.state,w.props);K=K>O?O:K,O===0&&(K=w.state.current),typeof z=="number"&&("pageSize"in w.props||w.setState({pageSize:z}),"current"in w.props||w.setState({current:K,currentInputValue:K})),w.props.onShowSizeChange(K,z),"onChange"in w.props&&w.props.onChange&&w.props.onChange(K,z)},w.handleChange=function(z){var K=w.props.disabled,O=z;if(w.isValid(O)&&!K){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(z,K){if(z.key==="Enter"||z.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];K.apply(void 0,B)}},w.runIfEnterPrev=function(z){w.runIfEnter(z,w.prev)},w.runIfEnterNext=function(z){w.runIfEnter(z,w.next)},w.runIfEnterJumpPrev=function(z){w.runIfEnter(z,w.jumpPrev)},w.runIfEnterJumpNext=function(z){w.runIfEnter(z,w.jumpNext)},w.handleGoTO=function(z){(z.keyCode===n.ENTER||z.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(y.a)(v,[{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")),z=!this.hasPrev();return Object(_.isValidElement)(A)?Object(_.cloneElement)(A,{disabled:z}):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")),z=!this.hasNext();return Object(_.isValidElement)(A)?Object(_.cloneElement)(A,{disabled:z}):A}},{key:"render",value:function(){var w=this,T=this.props,F=T.prefixCls,P=T.className,A=T.style,z=T.disabled,K=T.hideOnSinglePage,O=T.total,B=T.locale,U=T.showQuickJumper,D=T.showLessItems,W=T.showTitle,Q=T.showTotal,re=T.simple,ee=T.itemRender,ye=T.showPrevNextJumpers,be=T.jumpPrevIcon,he=T.jumpNextIcon,Ie=T.selectComponentClass,Se=T.selectPrefixCls,fe=T.pageSizeOptions,ue=this.state,ie=ue.current,Ce=ue.pageSize,ne=ue.currentInputValue;if(K===!0&&O<=Ce)return null;var ce=E(void 0,this.state,this.props),Ae=[],oe=null,q=null,$=null,X=null,de=null,pe=U&&U.goButton,xe=D?1:2,Ke=ie-1>0?ie-1:0,qe=ie+1<ce?ie+1:ce,tt=Object.keys(this.props).reduce(function(Ee,Oe){return(Oe.substr(0,5)==="data-"||Oe.substr(0,5)==="aria-"||Oe==="role")&&(Ee[Oe]=w.props[Oe]),Ee},{});if(re)return pe&&(typeof pe=="boolean"?de=e.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},B.jump_to_confirm):de=e.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},pe),de=e.a.createElement("li",{title:W?"".concat(B.jump_to).concat(ie,"/").concat(ce):null,className:"".concat(F,"-simple-pager")},de)),e.a.createElement("ul",Object(N.a)({className:r()(F,"".concat(F,"-simple"),Object(g.a)({},"".concat(F,"-disabled"),z),P),style:A,ref:this.savePaginationNode},tt),e.a.createElement("li",{title:W?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(Ke)),e.a.createElement("li",{title:W?"".concat(ie,"/").concat(ce):null,className:"".concat(F,"-simple-pager")},e.a.createElement("input",{type:"text",value:ne,disabled:z,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),e.a.createElement("span",{className:"".concat(F,"-slash")},"/"),ce),e.a.createElement("li",{title:W?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(qe)),de);if(ce<=3+xe*2){var et={locale:B,rootPrefixCls:F,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:W,itemRender:ee};ce||Ae.push(e.a.createElement(i,Object(N.a)({},et,{key:"noPager",page:ce,className:"".concat(F,"-disabled")})));for(var it=1;it<=ce;it+=1){var at=ie===it;Ae.push(e.a.createElement(i,Object(N.a)({},et,{key:it,page:it,active:at})))}}else{var je=D?B.prev_3:B.prev_5,De=D?B.next_3:B.next_5;ye&&(oe=e.a.createElement("li",{title:W?je: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"),!!be))},ee(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(be,"prev page"))),q=e.a.createElement("li",{title:W?De: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"),!!he))},ee(this.getJumpNextPage(),"jump-next",this.getItemIcon(he,"next page")))),X=e.a.createElement(i,{locale:B,last:!0,rootPrefixCls:F,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:ce,page:ce,active:!1,showTitle:W,itemRender:ee}),$=e.a.createElement(i,{locale:B,rootPrefixCls:F,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:W,itemRender:ee});var nt=Math.max(1,ie-xe),lt=Math.min(ie+xe,ce);ie-1<=xe&&(lt=1+xe*2),ce-ie<=xe&&(nt=ce-xe*2);for(var Ve=nt;Ve<=lt;Ve+=1){var Qe=ie===Ve;Ae.push(e.a.createElement(i,{locale:B,rootPrefixCls:F,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ve,page:Ve,active:Qe,showTitle:W,itemRender:ee}))}ie-1>=xe*2&&ie!==1+2&&(Ae[0]=Object(_.cloneElement)(Ae[0],{className:"".concat(F,"-item-after-jump-prev")}),Ae.unshift(oe)),ce-ie>=xe*2&&ie!==ce-2&&(Ae[Ae.length-1]=Object(_.cloneElement)(Ae[Ae.length-1],{className:"".concat(F,"-item-before-jump-next")}),Ae.push(q)),nt!==1&&Ae.unshift($),lt!==ce&&Ae.push(X)}var Fe=null;Q&&(Fe=e.a.createElement("li",{className:"".concat(F,"-total-text")},Q(O,[O===0?0:(ie-1)*Ce+1,ie*Ce>O?O:ie*Ce])));var Re=!this.hasPrev()||!ce,Me=!this.hasNext()||!ce;return e.a.createElement("ul",Object(N.a)({className:r()(F,P,Object(g.a)({},"".concat(F,"-disabled"),z)),style:A,unselectable:"unselectable",ref:this.savePaginationNode},tt),Fe,e.a.createElement("li",{title:W?B.prev_page:null,onClick:this.prev,tabIndex:Re?null:0,onKeyPress:this.runIfEnterPrev,className:r()("".concat(F,"-prev"),Object(g.a)({},"".concat(F,"-disabled"),Re)),"aria-disabled":Re},this.renderPrev(Ke)),Ae,e.a.createElement("li",{title:W?B.next_page:null,onClick:this.next,tabIndex:Me?null:0,onKeyPress:this.runIfEnterNext,className:r()("".concat(F,"-next"),Object(g.a)({},"".concat(F,"-disabled"),Me)),"aria-disabled":Me},this.renderNext(qe)),e.a.createElement(h,{disabled:z,locale:B,rootPrefixCls:F,selectComponentClass:Ie,selectPrefixCls:Se,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:ie,pageSize:Ce,pageSizeOptions:fe,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:pe}))}}],[{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}}]),v}(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:l,totalBoundaryShowSizeChanger:50};var p=b},"6RRn":function(H,J,I){"use strict";var N=I("wCXF"),g=I("n6Qo");I.d(J,"b",function(){return g.a});var S=I("IBYe"),k=I("6eGT"),y=I("hW8S");I.d(J,"a",function(){return y.a}),J.c=N.b},"6UM0":function(H,J,I){var N,g;(function(){var S;(function(){"use strict";var y=[function(e,f,r){var c=r(1).Beautifier,i=r(5).Options;function n(o,h){var d=new c(o,h);return d.beautify()}e.exports=n,e.exports.defaultOptions=function(){return new i}},function(e,f,r){var c=r(2).Output,i=r(3).Token,n=r(4),o=r(5).Options,h=r(7).Tokenizer,d=r(7).line_starters,u=r(7).positionable_operators,s=r(7).TOKEN;function l(D,W){return W.indexOf(D)!==-1}function E(D){return D.replace(/^\s+/g,"")}function b(D){for(var W={},Q=0;Q<D.length;Q++)W[D[Q].replace(/-/g,"_")]=D[Q];return W}function p(D,W){return D&&D.type===s.RESERVED&&D.text===W}function L(D,W){return D&&D.type===s.RESERVED&&l(D.text,W)}var R=["case","return","do","if","throw","else","await","break","continue","async"],v=["before-newline","after-newline","preserve-newline"],x=b(v),w=[x.before_newline,x.preserve_newline],T={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function F(D,W){if(W.multiline_frame||W.mode===T.ForInitializer||W.mode===T.Conditional)return;D.remove_indent(W.start_line_index)}function P(D){D=D.replace(n.allLineBreaks,`
`);for(var W=[],Q=D.indexOf(`
`);Q!==-1;)W.push(D.substring(0,Q)),D=D.substring(Q+1),Q=D.indexOf(`
`);return D.length&&W.push(D),W}function A(D){return D===T.ArrayLiteral}function z(D){return l(D,[T.Expression,T.ForInitializer,T.Conditional])}function K(D,W){for(var Q=0;Q<D.length;Q++){var re=D[Q].trim();if(re.charAt(0)!==W)return!1}return!0}function O(D,W){for(var Q=0,re=D.length,ee;Q<re;Q++)if(ee=D[Q],ee&&ee.indexOf(W)!==0)return!1;return!0}function B(D,W){W=W||{},this._source_text=D||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new o(W)}B.prototype.create_flags=function(D,W){var Q=0;D&&(Q=D.indentation_level,!this._output.just_added_newline()&&D.line_indent_level>Q&&(Q=D.line_indent_level));var re={mode:W,parent:D,last_token:D?D.last_token:new i(s.START_BLOCK,""),last_word:D?D.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:Q,alignment:0,line_indent_level:D?D.line_indent_level:Q,start_line_index:this._output.get_line_number(),ternary_depth:0};return re},B.prototype._reset=function(D){var W=D.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new c(this._options,W),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(T.BlockStatement);var Q=new h(D,this._options);return this._tokens=Q.tokenize(),D},B.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var D,W=this._reset(this._source_text),Q=this._options.eol;this._options.eol==="auto"&&(Q=`
`,W&&n.lineBreak.test(W||"")&&(Q=W.match(n.lineBreak)[0]));for(var re=this._tokens.next();re;)this.handle_token(re),this._last_last_text=this._flags.last_token.text,this._flags.last_token=re,re=this._tokens.next();return D=this._output.get_code(Q),D},B.prototype.handle_token=function(D,W){D.type===s.START_EXPR?this.handle_start_expr(D):D.type===s.END_EXPR?this.handle_end_expr(D):D.type===s.START_BLOCK?this.handle_start_block(D):D.type===s.END_BLOCK?this.handle_end_block(D):D.type===s.WORD?this.handle_word(D):D.type===s.RESERVED?this.handle_word(D):D.type===s.SEMICOLON?this.handle_semicolon(D):D.type===s.STRING?this.handle_string(D):D.type===s.EQUALS?this.handle_equals(D):D.type===s.OPERATOR?this.handle_operator(D):D.type===s.COMMA?this.handle_comma(D):D.type===s.BLOCK_COMMENT?this.handle_block_comment(D,W):D.type===s.COMMENT?this.handle_comment(D,W):D.type===s.DOT?this.handle_dot(D):D.type===s.EOF?this.handle_eof(D):D.type===s.UNKNOWN?this.handle_unknown(D,W):this.handle_unknown(D,W)},B.prototype.handle_whitespace_and_comments=function(D,W){var Q=D.newlines,re=this._options.keep_array_indentation&&A(this._flags.mode);if(D.comments_before)for(var ee=D.comments_before.next();ee;)this.handle_whitespace_and_comments(ee,W),this.handle_token(ee,W),ee=D.comments_before.next();if(re)for(var ye=0;ye<Q;ye+=1)this.print_newline(ye>0,W);else if(this._options.max_preserve_newlines&&Q>this._options.max_preserve_newlines&&(Q=this._options.max_preserve_newlines),this._options.preserve_newlines&&Q>1){this.print_newline(!1,W);for(var be=1;be<Q;be+=1)this.print_newline(!0,W)}};var U=["async","break","continue","return","throw","yield"];B.prototype.allow_wrap_or_preserved_newline=function(D,W){if(W=W===void 0?!1:W,this._output.just_added_newline())return;var Q=this._options.preserve_newlines&&D.newlines||W,re=l(this._flags.last_token.text,u)||l(D.text,u);if(re){var ee=l(this._flags.last_token.text,u)&&l(this._options.operator_position,w)||l(D.text,u);Q=Q&&ee}if(Q)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(L(this._flags.last_token,U))return;this._output.set_wrap_point()}},B.prototype.print_newline=function(D,W){if(!W&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==s.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var Q=this._tokens.peek();this._flags.mode===T.Statement&&!(this._flags.if_block&&p(Q,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(D)&&(this._flags.multiline_frame=!0)},B.prototype.print_token_line_indentation=function(D){this._output.just_added_newline()&&(this._options.keep_array_indentation&&D.newlines&&(D.text==="["||A(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(D.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(D){if(this._output.raw){this._output.add_raw_token(D);return}if(this._options.comma_first&&D.previous&&D.previous.type===s.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var W=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(W),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(D),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(D),this._output.non_breaking_space=!0,this._output.add_token(D.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(D){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,D),this._flags=this.create_flags(this._previous_flags,D),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||L(this._flags.last_token,["get","set"]))},B.prototype.start_of_statement=function(D){var W=!1;return W=W||L(this._flags.last_token,["var","let","const"])&&D.type===s.WORD,W=W||p(this._flags.last_token,"do"),W=W||!(this._flags.parent.mode===T.ObjectLiteral&&this._flags.mode===T.Statement)&&L(this._flags.last_token,U)&&!D.newlines,W=W||p(this._flags.last_token,"else")&&!(p(D,"if")&&!D.comments_before),W=W||this._flags.last_token.type===s.END_EXPR&&(this._previous_flags.mode===T.ForInitializer||this._previous_flags.mode===T.Conditional),W=W||this._flags.last_token.type===s.WORD&&this._flags.mode===T.BlockStatement&&!this._flags.in_case&&!(D.text==="--"||D.text==="++")&&this._last_last_text!=="function"&&D.type!==s.WORD&&D.type!==s.RESERVED,W=W||this._flags.mode===T.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||L(this._flags.last_token,["get","set"])),W?(this.set_mode(T.Statement),this.indent(),this.handle_whitespace_and_comments(D,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(D,L(D,["do","for","if","while"])),!0):!1},B.prototype.handle_start_expr=function(D){this.start_of_statement(D)||this.handle_whitespace_and_comments(D);var W=T.Expression;if(D.text==="["){if(this._flags.last_token.type===s.WORD||this._flags.last_token.text===")"){L(this._flags.last_token,d)&&(this._output.space_before_token=!0),this.print_token(D),this.set_mode(W),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}W=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())),l(this._flags.last_token.type,[s.START_EXPR,s.END_EXPR,s.WORD,s.OPERATOR,s.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===s.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,W=T.ForInitializer):l(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,W=T.Conditional):l(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&D.whitespace_before===""?this._output.space_before_token=!1:(l(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===s.EQUALS||this._flags.last_token.type===s.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(D);else if(this._flags.last_token.type===s.WORD){this._output.space_before_token=!1;var Q=this._tokens.peek(-3);if(this._options.space_after_named_function&&Q){var re=this._tokens.peek(-4);L(Q,["async","function"])||Q.text==="*"&&L(re,["async","function"])?this._output.space_before_token=!0:this._flags.mode===T.ObjectLiteral?(Q.text==="{"||Q.text===","||Q.text==="*"&&(re.text==="{"||re.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(D);(this._flags.last_token.type===s.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(l(this._last_last_text,["function","yield"])||this._flags.mode===T.ObjectLiteral&&l(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===s.START_BLOCK?this.print_newline():(this._flags.last_token.type===s.END_EXPR||this._flags.last_token.type===s.START_EXPR||this._flags.last_token.type===s.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===s.COMMA)&&this.allow_wrap_or_preserved_newline(D,D.newlines),this.print_token(D),this.set_mode(W),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},B.prototype.handle_end_expr=function(D){for(;this._flags.mode===T.Statement;)this.restore_mode();this.handle_whitespace_and_comments(D),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(D,D.text==="]"&&A(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===s.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(D),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(D){this.handle_whitespace_and_comments(D);var W=this._tokens.peek(),Q=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===s.END_EXPR?(this.set_mode(T.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(T.BlockStatement):Q&&(l(Q.text,[":",","])&&l(W.type,[s.STRING,s.WORD,s.RESERVED])||l(W.text,["get","set","..."])&&l(Q.type,[s.WORD,s.RESERVED]))?l(this._last_last_text,["class","interface"])&&!l(Q.text,[":",","])?this.set_mode(T.BlockStatement):this.set_mode(T.ObjectLiteral):this._flags.last_token.type===s.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(T.BlockStatement):l(this._flags.last_token.type,[s.EQUALS,s.START_EXPR,s.COMMA,s.OPERATOR])||L(this._flags.last_token,["return","throw","import","default"])?this.set_mode(T.ObjectLiteral):this.set_mode(T.BlockStatement),this._flags.last_token&&(L(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var re=!W.comments_before&&W.text==="}",ee=re&&this._flags.last_word==="function"&&this._flags.last_token.type===s.END_EXPR;if(this._options.brace_preserve_inline){var ye=0,be=null;this._flags.inline_frame=!0;do if(ye+=1,be=this._tokens.peek(ye-1),be.newlines){this._flags.inline_frame=!1;break}while(be.type!==s.EOF&&!(be.type===s.END_BLOCK&&be.opened===D))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&D.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==s.OPERATOR&&(ee||this._flags.last_token.type===s.EQUALS||L(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===s.START_EXPR||this._flags.last_token.type===s.COMMA)&&((this._flags.last_token.type===s.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===s.COMMA||this._flags.last_token.type===s.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(D),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==s.OPERATOR&&this._flags.last_token.type!==s.START_EXPR&&(this._flags.last_token.type===s.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(D),this.indent(),!re&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},B.prototype.handle_end_block=function(D){for(this.handle_whitespace_and_comments(D);this._flags.mode===T.Statement;)this.restore_mode();var W=this._flags.last_token.type===s.START_BLOCK;this._flags.inline_frame&&!W?this._output.space_before_token=!0:this._options.brace_style==="expand"?W||this.print_newline():W||(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(D)},B.prototype.handle_word=function(D){if(D.type===s.RESERVED){if(l(D.text,["set","get"])&&this._flags.mode!==T.ObjectLiteral)D.type=s.WORD;else if(D.text==="import"&&l(this._tokens.peek().text,["(","."]))D.type=s.WORD;else if(l(D.text,["as","from"])&&!this._flags.import_block)D.type=s.WORD;else if(this._flags.mode===T.ObjectLiteral){var W=this._tokens.peek();W.text===":"&&(D.type=s.WORD)}}if(this.start_of_statement(D)?L(this._flags.last_token,["var","let","const"])&&D.type===s.WORD&&(this._flags.declaration_statement=!0):D.newlines&&!z(this._flags.mode)&&(this._flags.last_token.type!==s.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==s.EQUALS&&(this._options.preserve_newlines||!L(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(D),this.print_newline()):this.handle_whitespace_and_comments(D),this._flags.do_block&&!this._flags.do_while)if(p(D,"while")){this._output.space_before_token=!0,this.print_token(D),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(D,"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&&L(D,["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(D),this._flags.in_case=!0;return}if((this._flags.last_token.type===s.COMMA||this._flags.last_token.type===s.START_EXPR||this._flags.last_token.type===s.EQUALS||this._flags.last_token.type===s.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(D)),p(D,"function")){(l(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(l(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===s.OPERATOR))&&(!this._output.just_added_blankline()&&!D.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===s.RESERVED||this._flags.last_token.type===s.WORD?L(this._flags.last_token,["get","set","new","export"])||L(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===s.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(z(this._flags.mode)||A(this._flags.mode))||this.print_newline(),this.print_token(D),this._flags.last_word=D.text;return}var Q="NONE";if(this._flags.last_token.type===s.END_BLOCK?this._previous_flags.inline_frame?Q="SPACE":L(D,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&D.newlines?Q="NEWLINE":(Q="SPACE",this._output.space_before_token=!0):Q="NEWLINE":this._flags.last_token.type===s.SEMICOLON&&this._flags.mode===T.BlockStatement?Q="NEWLINE":this._flags.last_token.type===s.SEMICOLON&&z(this._flags.mode)?Q="SPACE":this._flags.last_token.type===s.STRING?Q="NEWLINE":this._flags.last_token.type===s.RESERVED||this._flags.last_token.type===s.WORD||this._flags.last_token.text==="*"&&(l(this._last_last_text,["function","yield"])||this._flags.mode===T.ObjectLiteral&&l(this._last_last_text,["{",","]))?Q="SPACE":this._flags.last_token.type===s.START_BLOCK?this._flags.inline_frame?Q="SPACE":Q="NEWLINE":this._flags.last_token.type===s.END_EXPR&&(this._output.space_before_token=!0,Q="NEWLINE"),L(D,d)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?Q="SPACE":Q="NEWLINE"),L(D,["else","catch","finally"]))if((!(this._flags.last_token.type===s.END_BLOCK&&this._previous_flags.mode===T.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&D.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var re=this._output.current_line;re.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else Q==="NEWLINE"?L(this._flags.last_token,R)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&L(D,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==s.END_EXPR?(this._flags.last_token.type!==s.START_EXPR||!L(D,["var","let","const"]))&&this._flags.last_token.text!==":"&&(p(D,"if")&&p(D.previous,"else")?this._output.space_before_token=!0:this.print_newline()):L(D,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():Q==="SPACE"&&(this._output.space_before_token=!0);D.previous&&(D.previous.type===s.WORD||D.previous.type===s.RESERVED)&&(this._output.space_before_token=!0),this.print_token(D),this._flags.last_word=D.text,D.type===s.RESERVED&&(D.text==="do"?this._flags.do_block=!0:D.text==="if"?this._flags.if_block=!0:D.text==="import"?this._flags.import_block=!0:this._flags.import_block&&p(D,"from")&&(this._flags.import_block=!1))},B.prototype.handle_semicolon=function(D){this.start_of_statement(D)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(D);for(var W=this._tokens.peek();this._flags.mode===T.Statement&&!(this._flags.if_block&&p(W,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(D)},B.prototype.handle_string=function(D){D.text.startsWith("`")&&D.newlines===0&&D.whitespace_before===""&&(D.previous.text===")"||this._flags.last_token.type===s.WORD)||(this.start_of_statement(D)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(D),this._flags.last_token.type===s.RESERVED||this._flags.last_token.type===s.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===s.COMMA||this._flags.last_token.type===s.START_EXPR||this._flags.last_token.type===s.EQUALS||this._flags.last_token.type===s.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(D):D.text.startsWith("`")&&this._flags.last_token.type===s.END_EXPR&&(D.previous.text==="]"||D.previous.text===")")&&D.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(D)},B.prototype.handle_equals=function(D){this.start_of_statement(D)||this.handle_whitespace_and_comments(D),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(D),this._output.space_before_token=!0},B.prototype.handle_comma=function(D){this.handle_whitespace_and_comments(D,!0),this.print_token(D),this._output.space_before_token=!0,this._flags.declaration_statement?(z(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(D)):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(D)},B.prototype.handle_operator=function(D){var W=D.text==="*"&&(L(this._flags.last_token,["function","yield"])||l(this._flags.last_token.type,[s.START_BLOCK,s.COMMA,s.END_BLOCK,s.SEMICOLON])),Q=l(D.text,["-","+"])&&(l(this._flags.last_token.type,[s.START_BLOCK,s.START_EXPR,s.EQUALS,s.OPERATOR])||l(this._flags.last_token.text,d)||this._flags.last_token.text===",");if(!this.start_of_statement(D)){var re=!W;this.handle_whitespace_and_comments(D,re)}if(D.text==="*"&&this._flags.last_token.type===s.DOT){this.print_token(D);return}if(D.text==="::"){this.print_token(D);return}if(this._flags.last_token.type===s.OPERATOR&&l(this._options.operator_position,w)&&this.allow_wrap_or_preserved_newline(D),D.text===":"&&this._flags.in_case){this.print_token(D),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==s.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 ee=!0,ye=!0,be=!1;if(D.text===":"?this._flags.ternary_depth===0?ee=!1:(this._flags.ternary_depth-=1,be=!0):D.text==="?"&&(this._flags.ternary_depth+=1),!Q&&!W&&this._options.preserve_newlines&&l(D.text,u)){var he=D.text===":",Ie=he&&be,Se=he&&!be;switch(this._options.operator_position){case x.before_newline:this._output.space_before_token=!Se,this.print_token(D),(!he||Ie)&&this.allow_wrap_or_preserved_newline(D),this._output.space_before_token=!0;return;case x.after_newline:this._output.space_before_token=!0,!he||Ie?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(D):this._output.space_before_token=!1,this.print_token(D),this._output.space_before_token=!0;return;case x.preserve_newline:Se||this.allow_wrap_or_preserved_newline(D),ee=!(this._output.just_added_newline()||Se),this._output.space_before_token=ee,this.print_token(D),this._output.space_before_token=!0;return}}if(W){this.allow_wrap_or_preserved_newline(D),ee=!1;var fe=this._tokens.peek();ye=fe&&l(fe.type,[s.WORD,s.RESERVED])}else if(D.text==="...")this.allow_wrap_or_preserved_newline(D),ee=this._flags.last_token.type===s.START_BLOCK,ye=!1;else if(l(D.text,["--","++","!","~"])||Q){if((this._flags.last_token.type===s.COMMA||this._flags.last_token.type===s.START_EXPR)&&this.allow_wrap_or_preserved_newline(D),ee=!1,ye=!1,D.newlines&&(D.text==="--"||D.text==="++"||D.text==="~")){var ue=L(this._flags.last_token,R)&&D.newlines;ue&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(ue,!0)}this._flags.last_token.text===";"&&z(this._flags.mode)&&(ee=!0),this._flags.last_token.type===s.RESERVED?ee=!0:this._flags.last_token.type===s.END_EXPR?ee=!(this._flags.last_token.text==="]"&&(D.text==="--"||D.text==="++")):this._flags.last_token.type===s.OPERATOR&&(ee=l(D.text,["--","-","++","+"])&&l(this._flags.last_token.text,["--","-","++","+"]),l(D.text,["+","-"])&&l(this._flags.last_token.text,["--","++"])&&(ye=!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||ee,this.print_token(D),this._output.space_before_token=ye},B.prototype.handle_block_comment=function(D,W){if(this._output.raw){this._output.add_raw_token(D),D.directives&&D.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(D.directives){this.print_newline(!1,W),this.print_token(D),D.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!n.newline.test(D.text)&&!D.newlines){this._output.space_before_token=!0,this.print_token(D),this._output.space_before_token=!0;return}else this.print_block_commment(D,W)},B.prototype.print_block_commment=function(D,W){var Q=P(D.text),re,ee=!1,ye=!1,be=D.whitespace_before,he=be.length;if(this.print_newline(!1,W),this.print_token_line_indentation(D),this._output.add_token(Q[0]),this.print_newline(!1,W),Q.length>1){for(Q=Q.slice(1),ee=K(Q,"*"),ye=O(Q,be),ee&&(this._flags.alignment=1),re=0;re<Q.length;re++)ee?(this.print_token_line_indentation(D),this._output.add_token(E(Q[re]))):ye&&Q[re]?(this.print_token_line_indentation(D),this._output.add_token(Q[re].substring(he))):(this._output.current_line.set_indent(-1),this._output.add_token(Q[re])),this.print_newline(!1,W);this._flags.alignment=0}},B.prototype.handle_comment=function(D,W){D.newlines?this.print_newline(!1,W):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(D),this.print_newline(!1,W)},B.prototype.handle_dot=function(D){this.start_of_statement(D)||this.handle_whitespace_and_comments(D,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),L(this._flags.last_token,R)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(D,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(D)},B.prototype.handle_unknown=function(D,W){this.print_token(D),D.text[D.text.length-1]===`
`&&this.print_newline(!1,W)},B.prototype.handle_eof=function(D){for(;this._flags.mode===T.Statement;)this.restore_mode();this.handle_whitespace_and_comments(D)},e.exports.Beautifier=B},function(e){function f(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=[]}f.prototype.clone_empty=function(){var i=new f(this.__parent);return i.set_indent(this.__indent_count,this.__alignment_count),i},f.prototype.item=function(i){return i<0?this.__items[this.__items.length+i]:this.__items[i]},f.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},f.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))},f.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)},f.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},f.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},f.prototype.is_empty=function(){return this.__items.length===0},f.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},f.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},f.prototype.pop=function(){var i=null;return this.is_empty()||(i=this.__items.pop(),this.__character_count-=i.length),i},f.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},f.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},f.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},f.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 o=this.__base_string_length;return n=n||0,i<0&&(o=0),o+=i*this.__indent_size,o+=n,o},r.prototype.get_indent_string=function(i,n){var o=this.__base_string;return n=n||0,i<0&&(i=0,o=""),n+=i*this.__indent_size,this.__ensure_cache(n),o+=this.__cache[n],o},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,o="";this.__indent_size&&i>=this.__indent_size&&(n=Math.floor(i/this.__indent_size),i-=n*this.__indent_size,o=new Array(n+1).join(this.__indent_string)),i&&(o+=new Array(i+1).join(" ")),this.__cache.push(o)};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 f(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 o=this.__lines.join(`
`);return i!==`
`&&(o=o.replace(/[\n]/g,i)),o},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 o=this.__lines.length-2;o>=0;){var h=this.__lines[o];if(h.is_empty())break;if(h.item(0).indexOf(i)!==0&&h.item(-1)!==n){this.__lines.splice(o+1,0,new f(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},e.exports.Output=c},function(e){function f(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=f},function(e,f){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",o="(?:\\\\u[0-9a-fA-F]{4}|["+r+i+"])",h="(?:\\\\u[0-9a-fA-F]{4}|["+c+i+n+"])*";f.identifier=new RegExp(o+h,"g"),f.identifierStart=new RegExp(o),f.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+c+i+n+"])+");var d=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;f.newline=/[\n\r\u2028\u2029]/,f.lineBreak=new RegExp(`\r
|`+f.newline.source),f.allLineBreaks=new RegExp(f.lineBreak.source,"g")},function(e,f,r){var c=r(6).Options,i=["before-newline","after-newline","preserve-newline"];function n(o){c.call(this,o,"js");var h=this.raw_options.brace_style||null;h==="expand-strict"?this.raw_options.brace_style="expand":h==="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 f(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"])}f.prototype._get_array=function(i,n){var o=this.raw_options[i],h=n||[];return typeof o=="object"?o!==null&&typeof o.concat=="function"&&(h=o.concat()):typeof o=="string"&&(h=o.split(/[^a-zA-Z0-9_\/\-]+/)),h},f.prototype._get_boolean=function(i,n){var o=this.raw_options[i],h=o===void 0?!!n:!!o;return h},f.prototype._get_characters=function(i,n){var o=this.raw_options[i],h=n||"";return typeof o=="string"&&(h=o.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),h},f.prototype._get_number=function(i,n){var o=this.raw_options[i];n=parseInt(n,10),isNaN(n)&&(n=0);var h=parseInt(o,10);return isNaN(h)&&(h=n),h},f.prototype._get_selection=function(i,n,o){var h=this._get_selection_list(i,n,o);if(h.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 h[0]},f.prototype._get_selection_list=function(i,n,o){if(!n||n.length===0)throw new Error("Selection list cannot be empty.");if(o=o||[n[0]],!this._is_valid_selection(o,n))throw new Error("Invalid Default Value!");var h=this._get_array(i,o);if(!this._is_valid_selection(h,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 h},f.prototype._is_valid_selection=function(i,n){return i.length&&n.length&&!i.some(function(o){return n.indexOf(o)===-1})};function r(i,n){var o={};i=c(i);var h;for(h in i)h!==n&&(o[h]=i[h]);if(n&&i[n])for(h in i[n])o[h]=i[n][h];return o}function c(i){var n={},o;for(o in i){var h=o.replace(/-/g,"_");n[h]=i[o]}return n}e.exports.Options=f,e.exports.normalizeOpts=c,e.exports.mergeOpts=r},function(e,f,r){var c=r(8).InputScanner,i=r(9).Tokenizer,n=r(9).TOKEN,o=r(13).Directives,h=r(4),d=r(12).Pattern,u=r(14).TemplatablePattern;function s(K,O){return O.indexOf(K)!==-1}var l={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 o(/\/\*/,/\*\//),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]/,L=/[^\d\.]/,R=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),v=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";v=v.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),v="\\?\\.(?!\\d) "+v,v=v.replace(/ /g,"|");var x=new RegExp(v),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(K,O){i.call(this,K,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(h.identifier).matching(h.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(h.lineBreak),shebang:B.starting_with(/#!/).until_after(h.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(K){return K.type===l.COMMENT||K.type===l.BLOCK_COMMENT||K.type===l.UNKNOWN},A.prototype._is_opening=function(K){return K.type===l.START_BLOCK||K.type===l.START_EXPR},A.prototype._is_closing=function(K,O){return(K.type===l.END_BLOCK||K.type===l.END_EXPR)&&O&&(K.text==="]"&&O.text==="["||K.text===")"&&O.text==="("||K.text==="}"&&O.text==="{")},A.prototype._reset=function(){P=!1},A.prototype._get_next_token=function(K,O){var B=null;this._readWhitespace();var U=this._input.peek();return U===null?this._create_token(l.EOF,""):(B=B||this._read_non_javascript(U),B=B||this._read_string(U),B=B||this._read_word(K),B=B||this._read_singles(U),B=B||this._read_comment(U),B=B||this._read_regexp(U,K),B=B||this._read_xml(U,K),B=B||this._read_punctuation(),B=B||this._create_token(l.UNKNOWN,this._input.next()),B)},A.prototype._read_word=function(K){var O;if(O=this.__patterns.identifier.read(),O!=="")return O=O.replace(h.allLineBreaks,`
`),!(K.type===l.DOT||K.type===l.RESERVED&&(K.text==="set"||K.text==="get"))&&F.test(O)?(O==="in"||O==="of")&&(K.type===l.WORD||K.type===l.STRING)?this._create_token(l.OPERATOR,O):this._create_token(l.RESERVED,O):this._create_token(l.WORD,O);if(O=this.__patterns.number.read(),O!=="")return this._create_token(l.WORD,O)},A.prototype._read_singles=function(K){var O=null;return K==="("||K==="["?O=this._create_token(l.START_EXPR,K):K===")"||K==="]"?O=this._create_token(l.END_EXPR,K):K==="{"?O=this._create_token(l.START_BLOCK,K):K==="}"?O=this._create_token(l.END_BLOCK,K):K===";"?O=this._create_token(l.SEMICOLON,K):K==="."&&L.test(this._input.peek(1))?O=this._create_token(l.DOT,K):K===","&&(O=this._create_token(l.COMMA,K)),O&&this._input.next(),O},A.prototype._read_punctuation=function(){var K=this.__patterns.punct.read();if(K!=="")return K==="="?this._create_token(l.EQUALS,K):K==="?."?this._create_token(l.DOT,K):this._create_token(l.OPERATOR,K)},A.prototype._read_non_javascript=function(K){var O="";if(K==="#"){if(this._is_first_token()&&(O=this.__patterns.shebang.read(),O))return this._create_token(l.UNKNOWN,O.trim()+`
`);if(O=this.__patterns.include.read(),O)return this._create_token(l.UNKNOWN,O.trim()+`
`);K=this._input.next();var B="#";if(this._input.hasNext()&&this._input.testChar(p)){do K=this._input.next(),B+=K;while(this._input.hasNext()&&K!=="#"&&K!=="=");return K==="#"||(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(l.WORD,B)}this._input.back()}else if(K==="<"&&this._is_first_token()){if(O=this.__patterns.html_comment_start.read(),O){for(;this._input.hasNext()&&!this._input.testChar(h.newline);)O+=this._input.next();return P=!0,this._create_token(l.COMMENT,O)}}else if(P&&K==="-"&&(O=this.__patterns.html_comment_end.read(),O))return P=!1,this._create_token(l.COMMENT,O);return null},A.prototype._read_comment=function(K){var O=null;if(K==="/"){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(h.allLineBreaks,`
`),O=this._create_token(l.BLOCK_COMMENT,B),O.directives=U}else this._input.peek(1)==="/"&&(B=this.__patterns.comment.read(),O=this._create_token(l.COMMENT,B))}return O},A.prototype._read_string=function(K){if(K==="`"||K==="'"||K==='"'){var O=this._input.next();return this.has_char_escapes=!1,K==="`"?O+=this._read_string_recursive("`",!0,"${"):O+=this._read_string_recursive(K),this.has_char_escapes&&this._options.unescape_strings&&(O=z(O)),this._input.peek()===K&&(O+=this._input.next()),O=O.replace(h.allLineBreaks,`
`),this._create_token(l.STRING,O)}return null},A.prototype._allow_regexp_or_xml=function(K){return K.type===l.RESERVED&&s(K.text,["return","case","throw","else","do","typeof","yield"])||K.type===l.END_EXPR&&K.text===")"&&K.opened.previous.type===l.RESERVED&&s(K.opened.previous.text,["if","while","for"])||s(K.type,[l.COMMENT,l.START_EXPR,l.START_BLOCK,l.START,l.END_BLOCK,l.OPERATOR,l.EQUALS,l.EOF,l.SEMICOLON,l.COMMA])},A.prototype._read_regexp=function(K,O){if(K==="/"&&this._allow_regexp_or_xml(O)){for(var B=this._input.next(),U=!1,D=!1;this._input.hasNext()&&(U||D||this._input.peek()!==K)&&!this._input.testChar(h.newline);)B+=this._input.peek(),U?U=!1:(U=this._input.peek()==="\\",this._input.peek()==="["?D=!0:this._input.peek()==="]"&&(D=!1)),this._input.next();return this._input.peek()===K&&(B+=this._input.next(),B+=this._input.read(h.identifier)),this._create_token(l.STRING,B)}return null},A.prototype._read_xml=function(K,O){if(this._options.e4x&&K==="<"&&this._allow_regexp_or_xml(O)){var B="",U=this.__patterns.xml.read_match();if(U){for(var D=U[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),W=D.indexOf("{")===0,Q=0;U;){var re=!!U[1],ee=U[2],ye=!!U[U.length-1]||ee.slice(0,8)==="![CDATA[";if(!ye&&(ee===D||W&&ee.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(re?--Q:++Q),B+=U[0],Q<=0)break;U=this.__patterns.xml.read_match()}return U||(B+=this._input.match(/[\s\S]*/g)[0]),B=B.replace(h.allLineBreaks,`
`),this._create_token(l.STRING,B)}}return null};function z(K){for(var O="",B=0,U=new c(K),D=null;U.hasNext();)if(D=U.match(/([\s]|[^\\]|\\\\)+/g),D&&(O+=D[0]),U.peek()==="\\"){if(U.next(),U.peek()==="x")D=U.match(/x([0-9A-Fa-f]{2})/g);else if(U.peek()==="u")D=U.match(/u([0-9A-Fa-f]{4})/g);else{O+="\\",U.hasNext()&&(O+=U.next());continue}if(!D)return K;if(B=parseInt(D[1],16),B>126&&B<=255&&D[0].indexOf("x")===0)return K;if(B>=0&&B<32){O+="\\"+D[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(K,O,B){var U,D;K==="'"?D=this.__patterns.single_quote:K==='"'?D=this.__patterns.double_quote:K==="`"?D=this.__patterns.template_text:K==="}"&&(D=this.__patterns.template_expression);for(var W=D.read(),Q="";this._input.hasNext();){if(Q=this._input.next(),Q===K||!O&&h.newline.test(Q)){this._input.back();break}else Q==="\\"&&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(),Q+=this._input.next()):B&&(B==="${"&&Q==="$"&&this._input.peek()==="{"&&(Q+=this._input.next()),B===Q&&(K==="`"?Q+=this._read_string_recursive("}",O,"`"):Q+=this._read_string_recursive("`",O,"${"),this._input.hasNext()&&(Q+=this._input.next())));Q+=D.read(),W+=Q}return W},e.exports.Tokenizer=A,e.exports.TOKEN=l,e.exports.positionable_operators=R.slice(),e.exports.line_starters=w.slice()},function(e){var f=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&&!(f&&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 o="",h;return c&&(h=this.match(c),h&&(o+=h[0])),i&&(h||!c)&&(o+=this.readUntil(i,n)),o},r.prototype.readUntil=function(c,i){var n="",o=this.__position;c.lastIndex=this.__position;var h=c.exec(this.__input);return h?(o=h.index,i&&(o+=h[0].length)):o=this.__input_length,n=this.__input.substring(this.__position,o),this.__position=o,n},r.prototype.readUntilAfter=function(c){return this.readUntil(c,!0)},r.prototype.get_regexp=function(c,i){var n=null,o="g";return i&&f&&(o="y"),typeof c=="string"&&c!==""?n=new RegExp(c,o):c&&(n=new RegExp(c.source,o)),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,f,r){var c=r(8).InputScanner,i=r(3).Token,n=r(10).TokenStream,o=r(11).WhitespacePattern,h={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},d=function(u,s){this._input=new c(u),this._options=s||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new o(this._input)};d.prototype.tokenize=function(){this._input.restart(),this.__tokens=new n,this._reset();for(var u,s=new i(h.START,""),l=null,E=[],b=new n;s.type!==h.EOF;){for(u=this._get_next_token(s,l);this._is_comment(u);)b.add(u),u=this._get_next_token(s,l);b.isEmpty()||(u.comments_before=b,b=new n),u.parent=l,this._is_opening(u)?(E.push(l),l=u):l&&this._is_closing(u,l)&&(u.opened=l,l.closed=u,l=E.pop(),u.parent=l),u.previous=s,s.next=u,this.__tokens.add(u),s=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,s){this._readWhitespace();var l=this._input.read(/.+/g);return l?this._create_token(h.RAW,l):this._create_token(h.EOF,"")},d.prototype._is_comment=function(u){return!1},d.prototype._is_opening=function(u){return!1},d.prototype._is_closing=function(u,s){return!1},d.prototype._create_token=function(u,s){var l=new i(u,s,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return l},d.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},e.exports.Tokenizer=d,e.exports.TOKEN=h},function(e){function f(r){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=r}f.prototype.restart=function(){this.__position=0},f.prototype.isEmpty=function(){return this.__tokens_length===0},f.prototype.hasNext=function(){return this.__position<this.__tokens_length},f.prototype.next=function(){var r=null;return this.hasNext()&&(r=this.__tokens[this.__position],this.__position+=1),r},f.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},f.prototype.add=function(r){this.__parent_token&&(r.parent=this.__parent_token),this.__tokens.push(r),this.__tokens_length+=1},e.exports.TokenStream=f},function(e,f,r){var c=r(12).Pattern;function i(n,o){c.call(this,n,o),o?this._line_regexp=this._input.get_regexp(o._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,o){n+="\\t ",o+="\\n\\r",this._match_pattern=this._input.get_regexp("["+n+o+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+o+"]")},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 o=this.__split(this._newline_regexp,n);this.newline_count=o.length-1,this.whitespace_before_token=o[this.newline_count]}return n},i.prototype.matching=function(n,o){var h=this._create();return h.__set_whitespace_patterns(n,o),h._update(),h},i.prototype._create=function(){return new i(this._input,this)},i.prototype.__split=function(n,o){n.lastIndex=0;for(var h=0,d=[],u=n.exec(o);u;)d.push(o.substring(h,u.index)),h=u.index+u[0].length,u=n.exec(o);return h<o.length?d.push(o.substring(h,o.length)):d.push(""),d},e.exports.WhitespacePattern=i},function(e){function f(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)}f.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},f.prototype.read_match=function(){return this._input.match(this._match_pattern)},f.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},f.prototype.until=function(r){var c=this._create();return c._until_after=!1,c._until_pattern=this._input.get_regexp(r),c._update(),c},f.prototype.starting_with=function(r){var c=this._create();return c._starting_pattern=this._input.get_regexp(r,!0),c._update(),c},f.prototype.matching=function(r){var c=this._create();return c._match_pattern=this._input.get_regexp(r,!0),c._update(),c},f.prototype._create=function(){return new f(this._input,this)},f.prototype._update=function(){},e.exports.Pattern=f},function(e){function f(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")}f.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},f.prototype.readIgnored=function(r){return r.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=f},function(e,f,r){var c=r(12).Pattern,i={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function n(o,h){c.call(this,o,h),this.__template_pattern=null,this._disabled=Object.assign({},i),this._excluded=Object.assign({},i),h&&(this.__template_pattern=this._input.get_regexp(h.__template_pattern),this._excluded=Object.assign(this._excluded,h._excluded),this._disabled=Object.assign(this._disabled,h._disabled));var d=new c(o);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(o){var h=this._create();return h._disabled[o]=!0,h._update(),h},n.prototype.read_options=function(o){var h=this._create();for(var d in i)h._disabled[d]=o.templating.indexOf(d)===-1;return h._update(),h},n.prototype.exclude=function(o){var h=this._create();return h._excluded[o]=!0,h._update(),h},n.prototype.read=function(){var o="";this._match_pattern?o=this._input.read(this._starting_pattern):o=this._input.read(this._starting_pattern,this.__template_pattern);for(var h=this._read_template();h;)this._match_pattern?h+=this._input.read(this._match_pattern):h+=this._input.readUntil(this.__template_pattern),o+=h,h=this._read_template();return this._until_after&&(o+=this._input.readUntilAfter(this._until_pattern)),o},n.prototype.__set_templated_pattern=function(){var o=[];this._disabled.php||o.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||o.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||o.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(o.push(this.__patterns.django._starting_pattern.source),o.push(this.__patterns.django_value._starting_pattern.source),o.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||o.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&o.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+o.join("|")+")")},n.prototype._read_template=function(){var o="",h=this._input.peek();if(h==="<"){var d=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&d==="?"&&(o=o||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&d==="%"&&(o=o||this.__patterns.erb.read())}else h==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(o=o||this.__patterns.handlebars_comment.read(),o=o||this.__patterns.handlebars_unescaped.read(),o=o||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(o=o||this.__patterns.django_value.read()),this._excluded.django||(o=o||this.__patterns.django_comment.read(),o=o||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(o=o||this.__patterns.smarty_comment.read(),o=o||this.__patterns.smarty_literal.read(),o=o||this.__patterns.smarty.read()));return o},e.exports.TemplatablePattern=n}],m={};function C(e){var f=m[e];if(f!==void 0)return f.exports;var r=m[e]={exports:{}};return y[e](r,r.exports,C),r.exports}var _=C(0);S=_})();var k=S;!(N=[],g=function(){return{js_beautify:k}}.apply(J,N),g!==void 0&&(H.exports=g))})()},"6eGT":function(H,J,I){"use strict";function N(g){return null}J.a=N},"746U":function(H,J,I){"use strict";I.d(J,"f",function(){return N}),I.d(J,"l",function(){return g}),I.d(J,"k",function(){return S}),I.d(J,"j",function(){return k}),I.d(J,"g",function(){return y}),I.d(J,"m",function(){return m}),I.d(J,"h",function(){return C}),I.d(J,"n",function(){return _}),I.d(J,"c",function(){return e}),I.d(J,"a",function(){return f}),I.d(J,"i",function(){return r}),I.d(J,"o",function(){return c}),I.d(J,"e",function(){return o}),I.d(J,"d",function(){return h}),I.d(J,"p",function(){return d}),I.d(J,"b",function(){return u});function N(s){return Array.isArray(s)}function g(s){return typeof s=="string"}function S(s){return typeof s=="object"&&s!==null&&!Array.isArray(s)&&!(s instanceof RegExp)&&!(s instanceof Date)}function k(s){return typeof s=="number"&&!isNaN(s)}function y(s){return s===!0||s===!1}function m(s){return typeof s=="undefined"}function C(s){return!_(s)}function _(s){return m(s)||s===null}function e(s,l){if(!s)throw new Error(l?`Unexpected type, expected '${l}'`:"Unexpected type")}function f(s){if(_(s))throw new Error("Assertion Failed: argument is undefined or null");return s}function r(s){return typeof s=="function"}function c(s,l){const E=Math.min(s.length,l.length);for(let b=0;b<E;b++)i(s[b],l[b])}function i(s,l){if(g(l)){if(typeof s!==l)throw new Error(`argument does not match constraint: typeof ${l}`)}else if(r(l)){try{if(s instanceof l)return}catch(E){}if(!_(s)&&s.constructor===l)return;if(l.length===1&&l.call(void 0,s)===!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(s){let l=[],E=Object.getPrototypeOf(s);for(;Object.prototype!==E;)l=l.concat(Object.getOwnPropertyNames(E)),E=Object.getPrototypeOf(E);return l}function o(s){const l=[];for(const E of n(s))typeof s[E]=="function"&&l.push(E);return l}function h(s,l){const E=p=>function(){const L=Array.prototype.slice.call(arguments,0);return l(p,L)};let b={};for(const p of s)b[p]=E(p);return b}function d(s){return s===null?void 0:s}function u(s,l="Unreachable"){throw new Error(l)}},"7Cbv":function(H,J,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 y(i){return typeof i=="string"&&k.test(i)}for(var m=y,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,o=(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(o))throw TypeError("Stringified UUID is invalid");return o}var f=e;function r(i,n,o){i=i||{};var h=i.random||(i.rng||S)();if(h[6]=h[6]&15|64,h[8]=h[8]&63|128,n){o=o||0;for(var d=0;d<16;++d)n[o+d]=h[d];return n}return f(h)}var c=J.a=r},"7ahc":function(H,J,I){"use strict";I.d(J,"a",function(){return E});var N=I("k1fw"),g=I("0Owb"),S=I("+L6B"),k=I("2/Rp"),y=I("y8nQ"),m=I("Vl3Y"),C=I("tJVT"),_=I("OaEy"),e=I("2fM7"),f=I("q1tI"),r=I.n(f),c=I("VrN/"),i=I.n(c),n=I("p77/"),o=I.n(n),h=I("c5Ni"),d=I.n(h),u=e.a.Option,s={labelCol:{span:4},wrapperCol:{span:20}},l={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"]};J.b=function(b){var p=b.callback,L=b.onCancel,R=Object(f.useState)("python"),v=Object(C.a)(R,2),x=v[0],w=v[1];function T(P){w(l[P][1])}function F(P){p(P)}return r.a.createElement(m.a,Object(g.a)({},s,{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(l).map(function(P){return r.a.createElement(u,{key:P,value:P},l[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:L},"\u53D6\u6D88")))};function E(b){var p=b.value,L=b.onChange,R=b.mode,v=b.options,x=v===void 0?{}:v,w=Object(f.useRef)(),T=Object(f.useState)(),F=Object(C.a)(T,2),P=F[0],A=F[1];return Object(f.useEffect)(function(){if(P){function z(K){var O=K.getValue();L&&L(O)}return P.on("change",z),function(){P.off("change",z)}}},[P,L]),Object(f.useEffect)(function(){P&&P.setOption("mode",R)},[P,R]),Object(f.useEffect)(function(){P&&((p!==P.getValue()||p==="")&&setTimeout(function(){P.setValue(p||" ")},300))},[P,p]),Object(f.useEffect)(function(){if(w.current&&!P){var z=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(z)}},[w.current,P]),r.a.createElement("div",{className:"my-codemirror-container"},r.a.createElement("textarea",{ref:w}))}},"815F":function(H,J,I){"use strict";I.d(J,"e",function(){return C}),I.d(J,"c",function(){return e}),I.d(J,"d",function(){return f}),I.d(J,"a",function(){return c}),I.d(J,"f",function(){return i}),I.d(J,"b",function(){return n});var N=I("KQm4"),g=I("VTBJ"),S=I("Ff2n"),k=I("Zm9Q"),y=I("Kwbf"),m=I("OZM5");function C(o,h){return o!=null?o:h}function _(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],h=new Map;function d(u){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(u||[]).forEach(function(l){var E=l.key,b=l.children;Object(y.a)(E!=null,"Tree node must have a certain key: [".concat(s).concat(E,"]"));var p=String(E);Object(y.a)(!h.has(p)||E===null||E===void 0,"Same 'key' exist in the Tree: ".concat(p)),h.set(p,!0),d(b,"".concat(s).concat(p," > "))})}d(o)}function e(o){function h(d){var u=Object(k.a)(d);return u.map(function(s){if(!Object(m.i)(s))return Object(y.a)(!s,"Tree/TreeNode can only accept TreeNode as children."),null;var l=s.key,E=s.props,b=E.children,p=Object(S.a)(E,["children"]),L=Object(g.a)({key:l},p),R=h(b);return R.length&&(L.children=R),L}).filter(function(s){return s})}return h(o)}function f(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],d=new Set(h===!0?[]:h),u=[];function s(l){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return l.map(function(b,p){var L=Object(m.h)(E?E.pos:"0",p),R=C(b.key,L),v=Object(g.a)(Object(g.a)({},b),{},{parent:E,pos:L,children:null,data:b,isStart:[].concat(Object(N.a)(E?E.isStart:[]),[p===0]),isEnd:[].concat(Object(N.a)(E?E.isEnd:[]),[p===l.length-1])});return u.push(v),h===!0||d.has(R)?v.children=s(b.children||[],v):v.children=[],v})}return s(o),u}function r(o,h,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 s(l,E,b){var p=l?l.children:o,L=l?Object(m.h)(b.pos,E):"0";if(l){var R=u(l,L),v={node:l,index:E,pos:L,key:R,parentPos:b.node?b.pos:null,level:b.level+1};h(v)}p&&p.forEach(function(x,w){s(x,w,{node:l,pos:L,level:b?b.level+1:-1})})}s(null)}function c(o){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d=h.initWrapper,u=h.processEntity,s=h.onProcessFinished,l=arguments.length>2?arguments[2]:void 0,E={},b={},p={posEntities:E,keyEntities:b};return d&&(p=d(p)||p),r(o,function(L){var R=L.node,v=L.index,x=L.pos,w=L.key,T=L.parentPos,F=L.level,P={node:R,index:v,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)},l),s&&s(p),p}function i(o,h){var d=h.expandedKeys,u=h.selectedKeys,s=h.loadedKeys,l=h.loadingKeys,E=h.checkedKeys,b=h.halfCheckedKeys,p=h.dragOverNodeKey,L=h.dropPosition,R=h.keyEntities,v=R[o],x={eventKey:o,expanded:d.indexOf(o)!==-1,selected:u.indexOf(o)!==-1,loaded:s.indexOf(o)!==-1,loading:l.indexOf(o)!==-1,checked:E.indexOf(o)!==-1,halfChecked:b.indexOf(o)!==-1,pos:String(v?v.pos:""),dragOver:p===o&&L===0,dragOverGapTop:p===o&&L===-1,dragOverGapBottom:p===o&&L===1};return x}function n(o){var h=o.data,d=o.expanded,u=o.selected,s=o.checked,l=o.loaded,E=o.loading,b=o.halfChecked,p=o.dragOver,L=o.dragOverGapTop,R=o.dragOverGapBottom,v=o.pos,x=o.active,w=Object(g.a)(Object(g.a)({},h),{},{expanded:d,selected:u,checked:s,loaded:l,loading:E,halfChecked:b,dragOver:p,dragOverGapTop:L,dragOverGapBottom:R,pos:v,active:x});return"props"in w||Object.defineProperty(w,"props",{get:function(){return Object(y.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),o}}),w}},"8EBN":function(H,J,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 y=0;y<N.modeInfo.length;y++){var m=N.modeInfo[y];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 y=0;y<N.modeInfo.length;y++){var m=N.modeInfo[y];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 y=0;y<N.modeInfo.length;y++){var m=N.modeInfo[y];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 y=0;y<N.modeInfo.length;y++){var m=N.modeInfo[y];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,J,I){"use strict";I.d(J,"a",function(){return y}),I.d(J,"b",function(){return m}),I.d(J,"d",function(){return C}),I.d(J,"e",function(){return _}),I.d(J,"c",function(){return e});var N=I("MI8n"),g=I("pmY6"),S=I("3/fG"),k=function(f,r,c,i){function n(o){return o instanceof c?o:new c(function(h){h(o)})}return new(c||(c=Promise))(function(o,h){function d(l){try{s(i.next(l))}catch(E){h(E)}}function u(l){try{s(i.throw(l))}catch(E){h(E)}}function s(l){l.done?o(l.value):n(l.value).then(d,u)}s((i=i.apply(f,r||[])).next())})};class y extends g.a{constructor(f,r="",c="",i=!0,n){super();this._onDidChange=this._register(new N.b),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=f,this._label=r,this._cssClass=c,this._enabled=i,this._actionCallback=n}get id(){return this._id}get label(){return this._label}set label(f){this._setLabel(f)}_setLabel(f){this._label!==f&&(this._label=f,this._onDidChange.fire({label:f}))}get tooltip(){return this._tooltip||""}set tooltip(f){this._setTooltip(f)}_setTooltip(f){this._tooltip!==f&&(this._tooltip=f,this._onDidChange.fire({tooltip:f}))}get class(){return this._cssClass}set class(f){this._setClass(f)}_setClass(f){this._cssClass!==f&&(this._cssClass=f,this._onDidChange.fire({class:f}))}get enabled(){return this._enabled}set enabled(f){this._setEnabled(f)}_setEnabled(f){this._enabled!==f&&(this._enabled=f,this._onDidChange.fire({enabled:f}))}get checked(){return this._checked}set checked(f){this._setChecked(f)}_setChecked(f){this._checked!==f&&(this._checked=f,this._onDidChange.fire({checked:f}))}run(f,r){return k(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(f))})}}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(f,r){return k(this,void 0,void 0,function*(){if(!f.enabled)return;this._onBeforeRun.fire({action:f});let c;try{yield this.runAction(f,r)}catch(i){c=i}this._onDidRun.fire({action:f,error:c})})}runAction(f,r){return k(this,void 0,void 0,function*(){yield f.run(r)})}}class C extends y{constructor(f){super(C.ID,f,f?"separator text":"separator");this.checked=!1,this.enabled=!1}}C.ID="vs.actions.separator";class _{constructor(f,r,c,i){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=f,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 y{constructor(){super(e.ID,S.a("submenu.empty","(empty)"),void 0,!1)}}e.ID="vs.actions.empty"},"8hTe":function(H,J,I){H.exports={button:"button___1wy9m"}},"9Bee":function(H,J,I){"use strict";var N=I("DYRE"),g=I("zeV3"),S=I("+L6B"),k=I("2/Rp"),y=I("k1fw"),m=I("9og8"),C=I("tJVT"),_=I("WmNS"),e=I.n(_),f=I("q1tI"),r=I.n(f),c=I("vg9a"),i=I("DlQD"),n=I.n(i),o=I("rUJ1");function h(le,V){var Y=le.match(/^(\s+)(?:```)/);if(Y===null)return V;var te=Y[1];return V.split(`
`).map(function(ve){var ae=ve.match(/^\s+/);if(ae===null)return ve;var ze=Object(C.a)(ae,1),ft=ze[0];return ft.length>=te.length?ve.slice(te.length):ve}).join(`
`)}var d=[],u=["<ul>"],s=new n.a.Renderer,l=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function E(){d.length=0,u=["<ul>"]}var b={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function p(le,V,Y,te){if(V>=le.length||le[V].level<=Y)return V;var ve=le[V];te.push("<li><a href='#"+ve.anchor+"'>"+ve.text+"</a>"),V++;var ae=[];return V=p(le,V,ve.level,ae),ae.length>0&&(te.push("<ul>"),ae.forEach(function(ze){te.push(ze)}),te.push("</ul>")),te.push("</li>"),V=p(le,V,Y,te),V}function L(){return p(d,0,0,u),u.push("</ul>"),u.join("")}var R={heading:function(V){var Y=l.exec(V);if(Y)return{type:"heading",raw:Y[0],depth:Y[1].length,text:Y[2]}},fences:function(V){var Y=this.rules.block.fences.exec(V);if(Y){var te=Y[0],ve=h(te,Y[3]||""),ae=Y[2]?Y[2].trim():Y[2];if(["latex","katex","math"].indexOf(ae)>=0){var ze=w(),ft=ve;ve=ze,T[ze]={type:"block",expression:ft}}return{type:"code",raw:te,lang:ae,text:ve}}}},v=/(?:\${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(le){return le=le.replace(v,function(V,Y){var te=w();return T[te]={type:"inline",expression:Y},te}),le}var z=s.listitem;s.listitem=function(le){return z(A(le))};var K=s.paragraph;s.paragraph=function(le){return K(A(le))};var O=s.tablecell;s.tablecell=function(le,V){return O(A(le),V)},s.code=function(le,V,Y){var te=(V||"").match(/\S*/)[0];return te?["latex","katex","math"].indexOf(te)>=0?"<p class='editormd-tex'>".concat(le,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(V,'">').concat(Y?le:Object(o.escape)(le,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(Y?le:Object(o.escape)(le,!0))+"</code></pre>"},s.heading=function(le,V,Y){var te=this.options.headerPrefix+Y.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return d.push({anchor:te,level:V,text:le}),"<h"+V+' id="'+te+'">'+le+"</h"+V+">"},n.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),n.a.use({tokenizer:R,renderer:s});var B=n.a,U=I("SJMd"),D=I("ulZh"),W=I.n(D),Q=I("m3rI"),re=I("Oy/b"),ee=I("p5ED"),ye=I("ErOA");/*! *****************************************************************************
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 be=function(le,V){return(be=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,te){Y.__proto__=te}||function(Y,te){for(var ve in te)Object.prototype.hasOwnProperty.call(te,ve)&&(Y[ve]=te[ve])})(le,V)};function he(le,V){function Y(){this.constructor=le}be(le,V),le.prototype=V===null?Object.create(V):(Y.prototype=V.prototype,new Y)}function Ie(le,V,Y,te){return new(Y||(Y=Promise))(function(ve,ae){function ze(Wt){try{Ct(te.next(Wt))}catch(gt){ae(gt)}}function ft(Wt){try{Ct(te.throw(Wt))}catch(gt){ae(gt)}}function Ct(Wt){var gt;Wt.done?ve(Wt.value):(gt=Wt.value,gt instanceof Y?gt:new Y(function(Yt){Yt(gt)})).then(ze,ft)}Ct((te=te.apply(le,V||[])).next())})}function Se(le,V){var Y,te,ve,ae,ze={label:0,sent:function(){if(1&ve[0])throw ve[1];return ve[1]},trys:[],ops:[]};return ae={next:ft(0),throw:ft(1),return:ft(2)},typeof Symbol=="function"&&(ae[Symbol.iterator]=function(){return this}),ae;function ft(Ct){return function(Wt){return function(gt){if(Y)throw new TypeError("Generator is already executing.");for(;ze;)try{if(Y=1,te&&(ve=2&gt[0]?te.return:gt[0]?te.throw||((ve=te.return)&&ve.call(te),0):te.next)&&!(ve=ve.call(te,gt[1])).done)return ve;switch(te=0,ve&&(gt=[2&gt[0],ve.value]),gt[0]){case 0:case 1:ve=gt;break;case 4:return ze.label++,{value:gt[1],done:!1};case 5:ze.label++,te=gt[1],gt=[0];continue;case 7:gt=ze.ops.pop(),ze.trys.pop();continue;default:if(!(ve=ze.trys,(ve=ve.length>0&&ve[ve.length-1])||gt[0]!==6&&gt[0]!==2)){ze=0;continue}if(gt[0]===3&&(!ve||gt[1]>ve[0]&&gt[1]<ve[3])){ze.label=gt[1];break}if(gt[0]===6&&ze.label<ve[1]){ze.label=ve[1],ve=gt;break}if(ve&&ze.label<ve[2]){ze.label=ve[2],ze.ops.push(gt);break}ve[2]&&ze.ops.pop(),ze.trys.pop();continue}gt=V.call(le,ze)}catch(Yt){gt=[6,Yt],te=0}finally{Y=ve=0}if(5&gt[0])throw gt[1];return{value:gt[0]?gt[1]:void 0,done:!0}}([Ct,Wt])}}}function fe(){for(var le=0,V=0,Y=arguments.length;V<Y;V++)le+=arguments[V].length;var te=Array(le),ve=0;for(V=0;V<Y;V++)for(var ae=arguments[V],ze=0,ft=ae.length;ze<ft;ze++,ve++)te[ve]=ae[ze];return te}var ue=function(){function le(){}return le.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},le.setAttributes=function(V,Y){for(var te=0,ve=Y;te<ve.length;te++){var ae=ve[te],ze=ae[0],ft=ae[1];V.setAttribute(ze,ft)}},le.createRect=function(V,Y,te){var ve=document.createElementNS("http://www.w3.org/2000/svg","rect");return ve.setAttribute("width",V.toString()),ve.setAttribute("height",Y.toString()),te&&le.setAttributes(ve,te),ve},le.createLine=function(V,Y,te,ve,ae){var ze=document.createElementNS("http://www.w3.org/2000/svg","line");return ze.setAttribute("x1",V.toString()),ze.setAttribute("y1",Y.toString()),ze.setAttribute("x2",te.toString()),ze.setAttribute("y2",ve.toString()),ae&&le.setAttributes(ze,ae),ze},le.createPolygon=function(V,Y){var te=document.createElementNS("http://www.w3.org/2000/svg","polygon");return te.setAttribute("points",V),Y&&le.setAttributes(te,Y),te},le.createCircle=function(V,Y){var te=document.createElementNS("http://www.w3.org/2000/svg","circle");return te.setAttribute("cx",(V/2).toString()),te.setAttribute("cy",(V/2).toString()),te.setAttribute("r",V.toString()),Y&&le.setAttributes(te,Y),te},le.createEllipse=function(V,Y,te){var ve=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ve.setAttribute("cx",(V/2).toString()),ve.setAttribute("cy",(Y/2).toString()),ve.setAttribute("rx",(V/2).toString()),ve.setAttribute("ry",(Y/2).toString()),te&&le.setAttributes(ve,te),ve},le.createGroup=function(V){var Y=document.createElementNS("http://www.w3.org/2000/svg","g");return V&&le.setAttributes(Y,V),Y},le.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},le.createMarker=function(V,Y,te,ve,ae,ze,ft){var Ct=document.createElementNS("http://www.w3.org/2000/svg","marker");return le.setAttributes(Ct,[["id",V],["orient",Y],["markerWidth",te.toString()],["markerHeight",ve.toString()],["refX",ae.toString()],["refY",ze.toString()]]),Ct.appendChild(ft),Ct},le.createText=function(V){var Y=document.createElementNS("http://www.w3.org/2000/svg","text");return Y.setAttribute("x","0"),Y.setAttribute("y","0"),V&&le.setAttributes(Y,V),Y},le.createTSpan=function(V,Y){var te=document.createElementNS("http://www.w3.org/2000/svg","tspan");return te.textContent=V,Y&&le.setAttributes(te,Y),te},le.createImage=function(V){var Y=document.createElementNS("http://www.w3.org/2000/svg","image");return V&&le.setAttributes(Y,V),Y},le.createPoint=function(V,Y){var te=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return te.x=V,te.y=Y,te},le.createPath=function(V,Y){var te=document.createElementNS("http://www.w3.org/2000/svg","path");return te.setAttribute("d",V),Y&&le.setAttributes(te,Y),te},le}(),ie=function(){function le(){}return le.addKey=function(V){le.key=V},Object.defineProperty(le,"isLicensed",{get:function(){return!!le.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(le.key)},enumerable:!1,configurable:!0}),le}(),Ce=function(){function le(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return le.prototype.rasterize=function(V,Y,te){var ve=this;return new Promise(function(ae){var ze=te!==void 0?te:document.createElement("canvas");V===null&&(ve.markersOnly=!0,ve.naturalSize=!1);var ft=document.createElementNS("http://www.w3.org/2000/svg","svg");ft.setAttribute("xmlns","http://www.w3.org/2000/svg"),ft.setAttribute("width",Y.width.baseVal.valueAsString),ft.setAttribute("height",Y.height.baseVal.valueAsString),ft.setAttribute("viewBox","0 0 "+Y.viewBox.baseVal.width.toString()+" "+Y.viewBox.baseVal.height.toString()),ft.innerHTML=Y.innerHTML,ve.naturalSize===!0?(ft.width.baseVal.value=V.naturalWidth,ft.height.baseVal.value=V.naturalHeight):ve.width!==void 0&&ve.height!==void 0&&(ft.width.baseVal.value=ve.width,ft.height.baseVal.value=ve.height),ze.width=ft.width.baseVal.value,ze.height=ft.height.baseVal.value;var Ct=ft.outerHTML,Wt=ze.getContext("2d");ve.markersOnly!==!0&&Wt.drawImage(V,0,0,ze.width,ze.height);var gt=window.URL,Yt=new Image(ze.width,ze.height);Yt.setAttribute("crossOrigin","anonymous");var er=new Blob([Ct],{type:"image/svg+xml"}),Hr=gt.createObjectURL(er);Yt.onload=function(){Wt.drawImage(Yt,0,0),gt.revokeObjectURL(Hr);var on=ze.toDataURL(ve.imageType,ve.imageQuality);ae(on)},Yt.src=Hr})},le}(),ne=function(){},ce=function(){function le(V){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+V+"_"}return Object.defineProperty(le.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(le.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(le.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),le.prototype.addClass=function(V){return this.styleSheet===void 0&&this.addStyleSheet(),V.name=""+this.classNamePrefix+V.localName,this.classes.push(V),this.styleSheet.sheet.insertRule("."+V.name+" {"+V.style+"}",this.styleSheet.sheet.cssRules.length),V},le.prototype.addRule=function(V){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(V),this.styleSheet.sheet.insertRule(V.selector+" {"+V.style+"}",this.styleSheet.sheet.cssRules.length)},le.prototype.addStyleSheet=function(){var V;this.styleSheet=document.createElement("style"),((V=this.styleSheetRoot)!==null&&V!==void 0?V:document.head).appendChild(this.styleSheet),this.addRule(new Ae("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Ae("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Ae("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new oe("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new oe("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},le.prototype.removeStyleSheet=function(){var V;this.styleSheet&&(((V=this.styleSheetRoot)!==null&&V!==void 0?V:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},le}(),Ae=function(le,V){this.selector=le,this.style=V},oe=function(le,V){this.localName=le,this.style=V},q=function(){function le(V,Y,te,ve,ae){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=V,this.displayMode=Y,this.markerItems=te,this.uiStyleSettings=ve,this.styles=ae,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return le.prototype.show=function(V){var Y=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=V,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var te=document.createElement("div");te.className=this.toolbarBlockStyleClass.name,te.style.whiteSpace="nowrap",this.uiContainer.appendChild(te),this.addActionButton(te,'<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(te,'<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(te,'<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(te,'<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(te,'<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(te,'<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(te,'<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(te,'<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(ae){var ze=document.createElement("div");ze.className=""+Y.toolbarButtonStyleClass.name,ze.setAttribute("data-type-name",ae.typeName),ze.innerHTML=ae.icon,ze.addEventListener("click",function(){Y.markerToolbarButtonClicked(ze,ae)}),Y.buttons.push(ze),Y.markerButtons.push(ze)}),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 ve=document.createElement("div");ve.className=this.toolbarBlockStyleClass.name,ve.style.whiteSpace="nowrap",ve.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ve),this.addActionButton(ve,'<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(ve,'<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()},le.prototype.addButtonClickListener=function(V){this.buttonClickListeners.push(V)},le.prototype.removeButtonClickListener=function(V){this.buttonClickListeners.indexOf(V)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(V),1)},le.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},le.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var V=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<V||Y===V&&this.markerButtons.length-1===V?this.markerButtonBlock.appendChild(this.markerButtons[Y]):(Y===V&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Y]))}},le.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")},le.prototype.resetButtonStyles=function(){var V=this;this.buttons.forEach(function(Y){Y.className=Y.className.replace(V.uiStyleSettings.toolbarButtonStyleColorsClassName?V.uiStyleSettings.toolbarButtonStyleColorsClassName:V.toolbarButtonStyleColorsClass.name,"").trim(),Y.className=Y.className.replace(V.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?V.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:V.toolbarActiveButtonStyleColorsClass.name,"").trim(),Y.className+=" "+(V.uiStyleSettings.toolbarButtonStyleColorsClassName?V.uiStyleSettings.toolbarButtonStyleColorsClassName:V.toolbarButtonStyleColorsClass.name)})},le.prototype.addActionButton=function(V,Y,te){var ve=this,ae=document.createElement("div");switch(ae.className=""+this.toolbarButtonStyleClass.name,ae.innerHTML=Y,ae.setAttribute("data-action",te),ae.addEventListener("click",function(){ve.actionToolbarButtonClicked(ae,te)}),te){case"select":ae.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":ae.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":ae.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":ae.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":ae.style.fill=this.uiStyleSettings.closeButtonColor}V.appendChild(ae),this.buttons.push(ae)},le.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new oe("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 oe("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new oe("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new oe("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 oe("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var V=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new oe("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*V)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*V)+`px;
padding: `+V+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new oe("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new oe("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Ae("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new Ae("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},le.prototype.markerToolbarButtonClicked=function(V,Y){this.setActiveButton(V),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(te){return te("marker",Y)}),this.markerButtonOverflowBlock.style.display="none"},le.prototype.actionToolbarButtonClicked=function(V,Y){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(te){return te("action",Y)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},le.prototype.setActiveButton=function(V){this.resetButtonStyles(),V.className=V.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),V.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},le.prototype.setActiveMarkerButton=function(V){var Y=this.markerButtons.find(function(te){return te.getAttribute("data-type-name")===V});Y&&this.setActiveButton(Y)},le.prototype.setCurrentMarker=function(V){var Y=this;this.currentMarker=V,this.buttons.filter(function(te){return/delete|notes/.test(te.getAttribute("data-action"))}).forEach(function(te){Y.currentMarker===void 0?(te.style.fillOpacity="0.4",te.style.pointerEvents="none"):(te.style.fillOpacity="1",te.style.pointerEvents="all")})},le}(),$=function(){function le(V,Y,te,ve){this.panels=[],this.panelButtons=[],this.markerjsContainer=V,this.displayMode=Y,this.uiStyleSettings=te,this.styles=ve,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return le.prototype.addStyles=function(){var V;this.toolboxStyleClass=this.styles.addClass(new oe("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 oe("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var Y=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new oe("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new oe("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new oe("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 oe("toolbox-panel-row_colors",`
background-color: `+((V=this.uiStyleSettings.toolboxBackgroundColor)!==null&&V!==void 0?V:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new oe("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 oe("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new oe("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Ae("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Ae("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},le.prototype.show=function(V){var Y;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=V,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Y=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Y!==void 0?Y:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},le.prototype.setPanelButtons=function(V){var Y,te,ve=this;this.panels=V,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+" "+((te=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&te!==void 0?te:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(ae){var ze;ae.uiStyleSettings=ve.uiStyleSettings;var ft=document.createElement("div");ft.className=ve.toolboxButtonStyleClass.name+" "+((ze=ve.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ze!==void 0?ze:ve.toolboxButtonStyleColorsClass.name),ft.innerHTML=ae.icon,ft.title=ae.title,ft.addEventListener("click",function(){ve.panelButtonClick(ae)}),ve.panelButtons.push(ft),ve.buttonRow.appendChild(ft)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},le.prototype.panelButtonClick=function(V){var Y=this,te=-1;if(V!==this.activePanel){te=this.panels.indexOf(V),this.panelRow.innerHTML="";var ve=V.getUi();ve.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ve),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=V}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(ae,ze){var ft,Ct;ae.className=Y.toolboxButtonStyleClass.name+" "+(ze===te?""+((ft=Y.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&ft!==void 0?ft:Y.toolboxActiveButtonStyleColorsClass.name):""+((Ct=Y.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ct!==void 0?Ct:Y.toolboxButtonStyleColorsClass.name))})},le}(),X=function(le,V){this.title=le,this.icon=V},de=function(le){function V(Y,te,ve,ae){var ze=le.call(this,Y,ae||'<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 ze.colors=[],ze.addTransparent=!1,ze.colorBoxes=[],ze.colors=te,ze.currentColor=ve,ze.setCurrentColor=ze.setCurrentColor.bind(ze),ze.getColorBox=ze.getColorBox.bind(ze),ze}return he(V,le),V.prototype.getUi=function(){var Y=this,te=document.createElement("div");return te.style.overflow="hidden",te.style.whiteSpace="nowrap",this.colors.forEach(function(ve){var ae=Y.getColorBox(ve);te.appendChild(ae),Y.colorBoxes.push(ae)}),te},V.prototype.getColorBox=function(Y){var te=this,ve=this.uiStyleSettings.toolbarHeight/4,ae=this.uiStyleSettings.toolbarHeight-ve,ze=document.createElement("div");ze.style.display="inline-block",ze.style.boxSizing="content-box",ze.style.width=ae-2+"px",ze.style.height=ae-2+"px",ze.style.padding="1px",ze.style.marginRight="2px",ze.style.marginBottom="2px",ze.style.borderWidth="2px",ze.style.borderStyle="solid",ze.style.borderRadius=(ae+2)/2+"px",ze.style.borderColor=Y===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ze.addEventListener("click",function(){te.setCurrentColor(Y,ze)});var ft=document.createElement("div");return ft.style.display="inline-block",ft.style.width=ae-2+"px",ft.style.height=ae-2+"px",ft.style.backgroundColor=Y,ft.style.borderRadius=ae/2+"px",Y==="transparent"&&(ft.style.fill=this.uiStyleSettings.toolboxAccentColor,ft.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>`),ze.appendChild(ft),ze},V.prototype.setCurrentColor=function(Y,te){var ve=this;this.currentColor=Y,this.colorBoxes.forEach(function(ae){ae.style.borderColor=ae===te?ve.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Y)},V}(X),pe=function(){function le(V,Y,te){this._state="new",this._isSelected=!1,this._container=V,this._overlayContainer=Y,this.globalSettings=te,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(le.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),le.prototype.ownsTarget=function(V){return!1},Object.defineProperty(le.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),le.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},le.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},le.prototype.pointerDown=function(V,Y){},le.prototype.dblClick=function(V,Y){},le.prototype.manipulate=function(V){},le.prototype.pointerUp=function(V){this.stateChanged()},le.prototype.dispose=function(){},le.prototype.addMarkerVisualToContainer=function(V){this.container.childNodes.length>0?this.container.insertBefore(V,this.container.childNodes[0]):this.container.appendChild(V)},le.prototype.getState=function(){return{typeName:le.typeName,state:this.state,notes:this.notes}},le.prototype.restoreState=function(V){this._state=V.state,this.notes=V.notes},le.prototype.scale=function(V,Y){},le.prototype.colorChanged=function(V){this.onColorChanged&&this.onColorChanged(V),this.stateChanged()},le.prototype.fillColorChanged=function(V){this.onFillColorChanged&&this.onFillColorChanged(V),this.stateChanged()},le.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var V=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),V.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(V)&&this.onStateChanged(this)}},le.typeName="MarkerBase",le}(),xe=function(){function le(){this.findGripByVisual=this.findGripByVisual.bind(this)}return le.prototype.findGripByVisual=function(V){return this.topLeft.ownsTarget(V)?this.topLeft:this.topCenter.ownsTarget(V)?this.topCenter:this.topRight.ownsTarget(V)?this.topRight:this.centerLeft.ownsTarget(V)?this.centerLeft:this.centerRight.ownsTarget(V)?this.centerRight:this.bottomLeft.ownsTarget(V)?this.bottomLeft:this.bottomCenter.ownsTarget(V)?this.bottomCenter:this.bottomRight.ownsTarget(V)?this.bottomRight:void 0},le}(),Ke=function(){function le(){this.GRIP_SIZE=10,this.visual=ue.createGroup(),this.visual.appendChild(ue.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ue.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return le.prototype.ownsTarget=function(V){return V===this.visual||V===this.visual.childNodes[0]||V===this.visual.childNodes[1]},le}(),qe=function(){function le(){}return le.toITransformMatrix=function(V){return{a:V.a,b:V.b,c:V.c,d:V.d,e:V.e,f:V.f}},le.toSVGMatrix=function(V,Y){return V.a=Y.a,V.b=Y.b,V.c=Y.c,V.d=Y.d,V.e=Y.e,V.f=Y.f,V},le}(),tt=function(le){function V(Y,te,ve){var ae=le.call(this,Y,te,ve)||this;return ae.left=0,ae.top=0,ae.width=0,ae.height=0,ae.defaultSize={x:50,y:20},ae.offsetX=0,ae.offsetY=0,ae.rotationAngle=0,ae.CB_DISTANCE=10,ae._suppressMarkerCreateEvent=!1,ae.container.transform.baseVal.appendItem(ue.createTransform()),ae.setupControlBox(),ae}return he(V,le),Object.defineProperty(V.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"visual",{get:function(){return this._visual},set:function(Y){this._visual=Y;var te=ue.createTransform();this._visual.transform.baseVal.appendItem(te)},enumerable:!1,configurable:!0}),V.prototype.ownsTarget=function(Y){return!!le.prototype.ownsTarget.call(this,Y)||!!(this.controlGrips.findGripByVisual(Y)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Y))},V.prototype.pointerDown=function(Y,te){le.prototype.pointerDown.call(this,Y,te),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 ve=this.unrotatePoint(Y);if(this.manipulationStartX=ve.x,this.manipulationStartY=ve.y,this.offsetX=ve.x-this.left,this.offsetY=ve.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(te),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(te)){this.activeGrip=this.rotatorGrip;var ae=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=ae.x-this.width/2,this.top=ae.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ze=this.container.transform.baseVal.getItem(0);ze.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ze,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},V.prototype.pointerUp=function(Y){var te=this.state;le.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",te==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},V.prototype.moveVisual=function(Y){this.visual.style.transform="translate("+Y.x+"px, "+Y.y+"px)"},V.prototype.manipulate=function(Y){var te=this.unrotatePoint(Y);this.state==="creating"?this.resize(Y):this.state==="move"?(this.left=this.manipulationStartLeft+(te.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(te.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(te):this.state==="rotate"&&this.rotate(Y)},V.prototype.resize=function(Y){var te=this.manipulationStartLeft,ve=this.manipulationStartWidth,ae=this.manipulationStartTop,ze=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:te=this.manipulationStartLeft+Y.x-this.manipulationStartX,ve=this.manipulationStartWidth+this.manipulationStartLeft-te;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ve=this.manipulationStartWidth+Y.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:ae=this.manipulationStartTop+Y.y-this.manipulationStartY,ze=this.manipulationStartHeight+this.manipulationStartTop-ae;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ze=this.manipulationStartHeight+Y.y-this.manipulationStartY}ve>=0?(this.left=te,this.width=ve):(this.left=te+ve,this.width=-ve),ze>=0?(this.top=ae,this.height=ze):(this.top=ae+ze,this.height=-ze),this.setSize()},V.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},V.prototype.rotate=function(Y){if(Math.abs(Y.x-this.centerX)>.1){var te=Math.sign(Y.x-this.centerX);this.rotationAngle=180*Math.atan((Y.y-this.centerY)/(Y.x-this.centerX))/Math.PI+90*te,this.applyRotation()}},V.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)},V.prototype.rotatePoint=function(Y){if(this.rotationAngle===0)return Y;var te=this.container.getCTM(),ve=ue.createPoint(Y.x,Y.y);return{x:(ve=ve.matrixTransform(te)).x,y:ve.y}},V.prototype.unrotatePoint=function(Y){if(this.rotationAngle===0)return Y;var te=this.container.getCTM();te=te.inverse();var ve=ue.createPoint(Y.x,Y.y);return{x:(ve=ve.matrixTransform(te)).x,y:ve.y}},V.prototype.select=function(){le.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},V.prototype.deselect=function(){le.prototype.deselect.call(this),this.controlBox.style.display="none"},V.prototype.setupControlBox=function(){this.controlBox=ue.createGroup();var Y=ue.createTransform();Y.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Y),this.container.appendChild(this.controlBox),this.controlRect=ue.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=ue.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 xe,this.addControlGrips(),this.controlBox.style.display="none"},V.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()},V.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()},V.prototype.createGrip=function(){var Y=new Ke;return Y.visual.transform.baseVal.appendItem(ue.createTransform()),this.controlBox.appendChild(Y.visual),Y},V.prototype.positionGrips=function(){var Y=this.controlGrips.topLeft.GRIP_SIZE,te=-Y/2,ve=te,ae=(this.width+this.CB_DISTANCE)/2-Y/2,ze=(this.height+this.CB_DISTANCE)/2-Y/2,ft=this.height+this.CB_DISTANCE-Y/2,Ct=this.width+this.CB_DISTANCE-Y/2;this.positionGrip(this.controlGrips.topLeft.visual,te,ve),this.positionGrip(this.controlGrips.topCenter.visual,ae,ve),this.positionGrip(this.controlGrips.topRight.visual,Ct,ve),this.positionGrip(this.controlGrips.centerLeft.visual,te,ze),this.positionGrip(this.controlGrips.centerRight.visual,Ct,ze),this.positionGrip(this.controlGrips.bottomLeft.visual,te,ft),this.positionGrip(this.controlGrips.bottomCenter.visual,ae,ft),this.positionGrip(this.controlGrips.bottomRight.visual,Ct,ft),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ae,ve-3*this.CB_DISTANCE)},V.prototype.positionGrip=function(Y,te,ve){var ae=Y.transform.baseVal.getItem(0);ae.setTranslate(te,ve),Y.transform.baseVal.replaceItem(ae,0)},V.prototype.hideControlBox=function(){this.controlBox.style.display="none"},V.prototype.showControlBox=function(){this.controlBox.style.display=""},V.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:qe.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:qe.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},le.prototype.getState.call(this))},V.prototype.restoreState=function(Y){le.prototype.restoreState.call(this,Y);var te=Y;this.left=te.left,this.top=te.top,this.width=te.width,this.height=te.height,this.rotationAngle=te.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(qe.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,te.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(qe.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,te.containerTransformMatrix))},V.prototype.scale=function(Y,te){le.prototype.scale.call(this,Y,te);var ve=this.rotatePoint({x:this.left,y:this.top}),ae=this.unrotatePoint({x:ve.x*Y,y:ve.y*te});this.left=ae.x,this.top=ae.y,this.width=this.width*Y,this.height=this.height*te,this.adjustControlBox()},V}(pe),et=function(le){function V(Y,te,ve){var ae=le.call(this,Y,te,ve)||this;return ae.fillColor="transparent",ae.strokeColor="transparent",ae.strokeWidth=0,ae.strokeDasharray="",ae.opacity=1,ae.setStrokeColor=ae.setStrokeColor.bind(ae),ae.setFillColor=ae.setFillColor.bind(ae),ae.setStrokeWidth=ae.setStrokeWidth.bind(ae),ae.setStrokeDasharray=ae.setStrokeDasharray.bind(ae),ae.createVisual=ae.createVisual.bind(ae),ae}return he(V,le),V.prototype.ownsTarget=function(Y){return!(!le.prototype.ownsTarget.call(this,Y)&&Y!==this.visual)},V.prototype.createVisual=function(){this.visual=ue.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)},V.prototype.pointerDown=function(Y,te){le.prototype.pointerDown.call(this,Y,te),this.state==="new"&&(this.createVisual(),this.moveVisual(Y),this._state="creating")},V.prototype.manipulate=function(Y){le.prototype.manipulate.call(this,Y)},V.prototype.resize=function(Y){le.prototype.resize.call(this,Y),this.setSize()},V.prototype.setSize=function(){le.prototype.setSize.call(this),ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},V.prototype.pointerUp=function(Y){le.prototype.pointerUp.call(this,Y),this.setSize()},V.prototype.setStrokeColor=function(Y){this.strokeColor=Y,this.visual&&ue.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Y),this.stateChanged()},V.prototype.setFillColor=function(Y){this.fillColor=Y,this.visual&&ue.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},V.prototype.setStrokeWidth=function(Y){this.strokeWidth=Y,this.visual&&ue.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},V.prototype.setStrokeDasharray=function(Y){this.strokeDasharray=Y,this.visual&&ue.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},V.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},le.prototype.getState.call(this))},V.prototype.restoreState=function(Y){var te=Y;this.fillColor=te.fillColor,this.strokeColor=te.strokeColor,this.strokeWidth=te.strokeWidth,this.strokeDasharray=te.strokeDasharray,this.opacity=te.opacity,this.createVisual(),le.prototype.restoreState.call(this,Y),this.setSize()},V.prototype.scale=function(Y,te){le.prototype.scale.call(this,Y,te),this.setSize()},V.title="Rectangle marker",V}(tt),it=function(le){function V(Y,te,ve,ae){var ze=le.call(this,Y,ae||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return ze.widths=[],ze.widthBoxes=[],ze.widths=te,ze.currentWidth=ve,ze.setCurrentWidth=ze.setCurrentWidth.bind(ze),ze}return he(V,le),V.prototype.getUi=function(){var Y=this,te=document.createElement("div");return te.style.display="flex",te.style.overflow="hidden",te.style.flexGrow="2",this.widths.forEach(function(ve){var ae=document.createElement("div");ae.style.display="flex",ae.style.flexGrow="2",ae.style.alignItems="center",ae.style.justifyContent="space-between",ae.style.padding="5px",ae.style.borderWidth="2px",ae.style.borderStyle="solid",ae.style.borderColor=ve===Y.currentWidth?Y.uiStyleSettings.toolboxAccentColor:"transparent",ae.addEventListener("click",function(){Y.setCurrentWidth(ve,ae)}),te.appendChild(ae);var ze=document.createElement("div");ze.innerText=ve.toString(),ze.style.marginRight="5px",ae.appendChild(ze);var ft=document.createElement("div");ft.style.minHeight="20px",ft.style.flexGrow="2",ft.style.display="flex",ft.style.alignItems="center";var Ct=document.createElement("hr");Ct.style.minWidth="20px",Ct.style.border="0px",Ct.style.borderTop=ve+"px solid "+Y.uiStyleSettings.toolboxColor,Ct.style.flexGrow="2",ft.appendChild(Ct),ae.appendChild(ft),Y.widthBoxes.push(ae)}),te},V.prototype.setCurrentWidth=function(Y,te){var ve=this;this.currentWidth=Y,this.widthBoxes.forEach(function(ae){ae.style.borderColor=ae===te?ve.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},V}(X),at=function(le){function V(Y,te,ve,ae){var ze=le.call(this,Y,ae||'<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 ze.styles=[],ze.styleBoxes=[],ze.styles=te,ze.currentStyle=ve,ze.setCurrentStyle=ze.setCurrentStyle.bind(ze),ze}return he(V,le),V.prototype.getUi=function(){var Y=this,te=document.createElement("div");return te.style.display="flex",te.style.overflow="hidden",te.style.flexGrow="2",this.styles.forEach(function(ve){var ae=document.createElement("div");ae.style.display="flex",ae.style.alignItems="center",ae.style.justifyContent="space-between",ae.style.padding="5px",ae.style.borderWidth="2px",ae.style.borderStyle="solid",ae.style.overflow="hidden",ae.style.maxWidth=100/Y.styles.length-5+"%",ae.style.borderColor=ve===Y.currentStyle?Y.uiStyleSettings.toolboxAccentColor:"transparent",ae.addEventListener("click",function(){Y.setCurrentStyle(ve,ae)}),te.appendChild(ae);var ze=document.createElement("div");ze.style.minHeight="20px",ze.style.flexGrow="2",ze.style.overflow="hidden";var ft=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Y.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(ve!==""?'stroke-dasharray="'+ve+'"':"")+` />
</svg>`;ze.innerHTML=ft,ae.appendChild(ze),Y.styleBoxes.push(ae)}),te},V.prototype.setCurrentStyle=function(Y,te){var ve=this;this.currentStyle=Y,this.styleBoxes.forEach(function(ae){ae.style.borderColor=ae===te?ve.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},V}(X),je=function(le){function V(Y,te,ve){var ae=le.call(this,Y,te,ve)||this;return ae.strokeColor=ve.defaultColor,ae.strokeWidth=ve.defaultStrokeWidth,ae.strokeDasharray=ve.defaultStrokeDasharray,ae.strokePanel=new de("Line color",ve.defaultColorSet,ve.defaultColor),ae.strokePanel.onColorChanged=ae.setStrokeColor,ae.strokeWidthPanel=new it("Line width",ve.defaultStrokeWidths,ve.defaultStrokeWidth),ae.strokeWidthPanel.onWidthChanged=ae.setStrokeWidth,ae.strokeStylePanel=new at("Line style",ve.defaultStrokeDasharrays,ve.defaultStrokeDasharray),ae.strokeStylePanel.onStyleChanged=ae.setStrokeDasharray,ae}return he(V,le),Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Y=le.prototype.getState.call(this);return Y.typeName=V.typeName,Y},V.typeName="FrameMarker",V.title="Frame marker",V.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',V}(et),De=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},nt=function(le){function V(Y,te,ve){var ae=le.call(this,Y,te,ve)||this;return ae.x1=0,ae.y1=0,ae.x2=0,ae.y2=0,ae.defaultLength=50,ae.manipulationStartX=0,ae.manipulationStartY=0,ae.manipulationStartX1=0,ae.manipulationStartY1=0,ae.manipulationStartX2=0,ae.manipulationStartY2=0,ae.setupControlBox(),ae}return he(V,le),V.prototype.ownsTarget=function(Y){return!!le.prototype.ownsTarget.call(this,Y)||!(!this.grip1.ownsTarget(Y)&&!this.grip2.ownsTarget(Y))},V.prototype.pointerDown=function(Y,te){le.prototype.pointerDown.call(this,Y,te),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(te)?this.activeGrip=this.grip1:this.grip2.ownsTarget(te)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},V.prototype.pointerUp=function(Y){var te=this.state;le.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",te==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},V.prototype.adjustVisual=function(){},V.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)},V.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()},V.prototype.select=function(){le.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},V.prototype.deselect=function(){le.prototype.deselect.call(this),this.controlBox.style.display="none"},V.prototype.setupControlBox=function(){this.controlBox=ue.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},V.prototype.adjustControlBox=function(){this.positionGrips()},V.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},V.prototype.createGrip=function(){var Y=new Ke;return Y.visual.transform.baseVal.appendItem(ue.createTransform()),this.controlBox.appendChild(Y.visual),Y},V.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)},V.prototype.positionGrip=function(Y,te,ve){var ae=Y.transform.baseVal.getItem(0);ae.setTranslate(te,ve),Y.transform.baseVal.replaceItem(ae,0)},V.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},le.prototype.getState.call(this))},V.prototype.restoreState=function(Y){le.prototype.restoreState.call(this,Y);var te=Y;this.x1=te.x1,this.y1=te.y1,this.x2=te.x2,this.y2=te.y2},V.prototype.scale=function(Y,te){le.prototype.scale.call(this,Y,te),this.x1=this.x1*Y,this.y1=this.y1*te,this.x2=this.x2*Y,this.y2=this.y2*te,this.adjustVisual(),this.adjustControlBox()},V}(pe),lt=function(le){function V(Y,te,ve){var ae=le.call(this,Y,te,ve)||this;return ae.strokeColor="transparent",ae.strokeWidth=0,ae.strokeDasharray="",ae.setStrokeColor=ae.setStrokeColor.bind(ae),ae.setStrokeWidth=ae.setStrokeWidth.bind(ae),ae.setStrokeDasharray=ae.setStrokeDasharray.bind(ae),ae.strokeColor=ve.defaultColor,ae.strokeWidth=ve.defaultStrokeWidth,ae.strokeDasharray=ve.defaultStrokeDasharray,ae.strokePanel=new de("Line color",ve.defaultColorSet,ve.defaultColor),ae.strokePanel.onColorChanged=ae.setStrokeColor,ae.strokeWidthPanel=new it("Line width",ve.defaultStrokeWidths,ve.defaultStrokeWidth),ae.strokeWidthPanel.onWidthChanged=ae.setStrokeWidth,ae.strokeStylePanel=new at("Line style",ve.defaultStrokeDasharrays,ve.defaultStrokeDasharray),ae.strokeStylePanel.onStyleChanged=ae.setStrokeDasharray,ae}return he(V,le),V.prototype.ownsTarget=function(Y){return!(!le.prototype.ownsTarget.call(this,Y)&&Y!==this.visual&&Y!==this.selectorLine&&Y!==this.visibleLine)},V.prototype.createVisual=function(){this.visual=ue.createGroup(),this.selectorLine=ue.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ue.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)},V.prototype.pointerDown=function(Y,te){le.prototype.pointerDown.call(this,Y,te),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},V.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()),ue.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ue.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ue.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},V.prototype.setStrokeColor=function(Y){this.strokeColor=Y,this.adjustVisual(),this.colorChanged(Y)},V.prototype.setStrokeWidth=function(Y){this.strokeWidth=Y,this.adjustVisual()},V.prototype.setStrokeDasharray=function(Y){this.strokeDasharray=Y,this.adjustVisual(),this.stateChanged()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Y=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},le.prototype.getState.call(this));return Y.typeName=V.typeName,Y},V.prototype.restoreState=function(Y){le.prototype.restoreState.call(this,Y);var te=Y;this.strokeColor=te.strokeColor,this.strokeWidth=te.strokeWidth,this.strokeDasharray=te.strokeDasharray,this.createVisual(),this.adjustVisual()},V.typeName="LineMarker",V.title="Line marker",V.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',V}(nt),Ve=function(le){function V(Y,te,ve,ae){var ze=le.call(this,Y,ae||'<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 ze.fonts=[],ze.fontBoxes=[],ze.fonts=te,ze.currentFont=ve,ze.setCurrentFont=ze.setCurrentFont.bind(ze),ze}return he(V,le),V.prototype.getUi=function(){var Y=this,te=document.createElement("div");return te.style.overflow="hidden",te.style.flexGrow="2",this.fonts.forEach(function(ve){var ae=document.createElement("div");ae.style.display="inline-block",ae.style.alignItems="center",ae.style.justifyContent="space-between",ae.style.padding="5px",ae.style.borderWidth="2px",ae.style.borderStyle="solid",ae.style.overflow="hidden",ae.style.maxWidth=100/Y.fonts.length-5+"%",ae.style.borderColor=ve===Y.currentFont?Y.uiStyleSettings.toolboxAccentColor:"transparent",ae.addEventListener("click",function(){Y.setCurrentFont(ve,ae)}),te.appendChild(ae);var ze=document.createElement("div");ze.style.display="flex",ze.style.minHeight="20px",ze.style.flexGrow="2",ze.style.fontFamily=ve,ze.style.overflow="hidden";var ft=document.createElement("div");ft.style.whiteSpace="nowrap",ft.style.overflow="hidden",ft.style.textOverflow="ellipsis",ft.innerHTML="The quick brown fox jumps over the lazy dog",ze.appendChild(ft),ae.appendChild(ze),Y.fontBoxes.push(ae)}),te},V.prototype.setCurrentFont=function(Y,te){var ve=this;this.currentFont=Y,this.fontBoxes.forEach(function(ae){ae.style.borderColor=ae===te?ve.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},V}(X),Qe=function(le){function V(Y,te,ve){var ae=le.call(this,Y,te,ve)||this;return ae.color="transparent",ae.padding=5,ae.DEFAULT_TEXT="your text here",ae.text=ae.DEFAULT_TEXT,ae.isMoved=!1,ae.color=ve.defaultColor,ae.fontFamily=ve.defaultFontFamily,ae.defaultSize={x:100,y:30},ae.setColor=ae.setColor.bind(ae),ae.setFont=ae.setFont.bind(ae),ae.renderText=ae.renderText.bind(ae),ae.sizeText=ae.sizeText.bind(ae),ae.textEditDivClicked=ae.textEditDivClicked.bind(ae),ae.showTextEditor=ae.showTextEditor.bind(ae),ae.setSize=ae.setSize.bind(ae),ae.positionTextEditor=ae.positionTextEditor.bind(ae),ae.colorPanel=new de("Color",ve.defaultColorSet,ve.defaultColor),ae.colorPanel.onColorChanged=ae.setColor,ae.fontFamilyPanel=new Ve("Font",ve.defaultFontFamilies,ve.defaultFontFamily),ae.fontFamilyPanel.onFontChanged=ae.setFont,ae}return he(V,le),V.prototype.ownsTarget=function(Y){if(le.prototype.ownsTarget.call(this,Y)||Y===this.visual||Y===this.textElement||Y===this.bgRectangle)return!0;var te=!1;return this.textElement.childNodes.forEach(function(ve){ve===Y&&(te=!0)}),te},V.prototype.createVisual=function(){this.visual=ue.createGroup(),this.bgRectangle=ue.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ue.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ue.createTransform()),this.textElement.transform.baseVal.appendItem(ue.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},V.prototype.pointerDown=function(Y,te){le.prototype.pointerDown.call(this,Y,te),this.isMoved=!1,this.pointerDownPoint=Y,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Y),this._state="creating")},V.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(te){Y.textElement.appendChild(ue.createTSpan(te.trim()===""?" ":te.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},V.prototype.getTextScale=function(){var Y=this.textElement.getBBox(),te=1;if(Y.width>0&&Y.height>0){var ve=(1*this.width-this.width*this.padding*2/100)/Y.width,ae=(1*this.height-this.height*this.padding*2/100)/Y.height;te=Math.min(ve,ae)}return te},V.prototype.getTextPosition=function(Y){var te=this.textElement.getBBox(),ve=0,ae=0;return te.width>0&&te.height>0&&(ve=(this.width-te.width*Y)/2,ae=this.height/2-te.height*Y/2),{x:ve,y:ae}},V.prototype.sizeText=function(){var Y=this.textElement.getBBox(),te=this.getTextScale(),ve=this.getTextPosition(te);ve.y-=Y.y*te,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ve.x+"px, "+ve.y+"px) scale("+te+", "+te+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ve.x,ve.y),this.textElement.transform.baseVal.getItem(1).setScale(te,te))},V.prototype.manipulate=function(Y){le.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)},V.prototype.resize=function(Y){le.prototype.resize.call(this,Y),this.isMoved=!0,this.setSize(),this.sizeText()},V.prototype.setSize=function(){le.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ue.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},V.prototype.pointerUp=function(Y){var te=this.state;te==="creating"&&(this._suppressMarkerCreateEvent=!0),le.prototype.pointerUp.call(this,Y),this.setSize(),(te==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},V.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(te){te.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var te=Number.parseFloat(Y.textEditor.style.fontSize);Y.textEditor.clientWidth>=Number.parseInt(Y.textEditor.style.maxWidth)&&te>.9;)te-=.1,Y.textEditor.style.fontSize=Math.max(te,.9)+"em"}),this.textEditor.addEventListener("keyup",function(te){te.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(te){if(te.clipboardData){var ve=te.clipboardData.getData("text"),ae=window.getSelection();if(!ae.rangeCount)return!1;ae.deleteFromDocument(),ae.getRangeAt(0).insertNode(document.createTextNode(ve)),te.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")},V.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Y=this.getTextScale(),te=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ve=this.textElement.getBBox(),ae={x:ve.width*Y,y:ve.height*Y};te.x-=ae.x/2,te.y-=ae.y/2,this.textEditor.style.top=te.y+"px",this.textEditor.style.left=te.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-te.x+"px",this.textEditor.style.fontSize=Math.max(16*Y,12)+"px",this.textElement.style.display="none"}},V.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()},V.prototype.select=function(){le.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},V.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),le.prototype.deselect.call(this)},V.prototype.dblClick=function(Y,te){le.prototype.dblClick.call(this,Y,te),this.showTextEditor()},V.prototype.setColor=function(Y){this.textElement&&ue.setAttributes(this.textElement,[["fill",Y]]),this.color=Y,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Y)},V.prototype.setFont=function(Y){this.textElement&&ue.setAttributes(this.textElement,[["font-family",Y]]),this.fontFamily=Y,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},V.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},V.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Y=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},le.prototype.getState.call(this));return Y.typeName=V.typeName,Y},V.prototype.restoreState=function(Y){var te=Y;this.color=te.color,this.fontFamily=te.fontFamily,this.padding=te.padding,this.text=te.text,this.createVisual(),le.prototype.restoreState.call(this,Y),this.setSize()},V.prototype.scale=function(Y,te){le.prototype.scale.call(this,Y,te),this.setSize(),this.sizeText(),this.positionTextEditor()},V.typeName="TextMarker",V.title="Text marker",V.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>',V}(tt),Fe=function(le){function V(Y,te,ve){var ae=le.call(this,Y,te,ve)||this;return ae.color="transparent",ae.lineWidth=3,ae.drawing=!1,ae.pixelRatio=1,ae.color=ve.defaultColor,ae.lineWidth=ve.defaultStrokeWidth,ae.pixelRatio=ve.freehandPixelRatio,ae.setColor=ae.setColor.bind(ae),ae.addCanvas=ae.addCanvas.bind(ae),ae.finishCreation=ae.finishCreation.bind(ae),ae.setLineWidth=ae.setLineWidth.bind(ae),ae.colorPanel=new de("Color",ve.defaultColorSet,ve.defaultColor),ae.colorPanel.onColorChanged=ae.setColor,ae.lineWidthPanel=new it("Line width",ve.defaultStrokeWidths,ve.defaultStrokeWidth),ae.lineWidthPanel.onWidthChanged=ae.setLineWidth,ae}return he(V,le),V.prototype.ownsTarget=function(Y){return!(!le.prototype.ownsTarget.call(this,Y)&&Y!==this.visual&&Y!==this.drawingImage)},V.prototype.createVisual=function(){this.visual=ue.createGroup(),this.drawingImage=ue.createImage(),this.visual.appendChild(this.drawingImage);var Y=ue.createTransform();this.visual.transform.baseVal.appendItem(Y),this.addMarkerVisualToContainer(this.visual)},V.prototype.pointerDown=function(Y,te){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):le.prototype.pointerDown.call(this,Y,te)},V.prototype.manipulate=function(Y){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Y.x,Y.y),this.canvasContext.stroke()):le.prototype.manipulate.call(this,Y)},V.prototype.resize=function(Y){le.prototype.resize.call(this,Y),ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ue.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},V.prototype.pointerUp=function(Y){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):le.prototype.pointerUp.call(this,Y)},V.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)},V.prototype.select=function(){this.state==="creating"&&this.finishCreation(),le.prototype.select.call(this)},V.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),le.prototype.deselect.call(this)},V.prototype.finishCreation=function(){for(var Y=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),te=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ve=te[0],ae=te[1],ze=te[2],ft=te[3],Ct=!1,Wt=0;Wt<this.canvasElement.height;Wt++)for(var gt=0;gt<this.canvasElement.width;gt++)Y.data[Wt*this.canvasElement.width*4+4*gt+3]>0&&(Ct=!0,Wt<ae&&(ae=Wt),gt<ve&&(ve=gt),Wt>ft&&(ft=Wt),gt>ze&&(ze=gt));if(Ct){this.left=ve/this.pixelRatio,this.top=ae/this.pixelRatio,this.width=(ze-ve)/this.pixelRatio,this.height=(ft-ae)/this.pixelRatio;var Yt=document.createElement("canvas");Yt.width=ze-ve,Yt.height=ft-ae,Yt.getContext("2d").putImageData(this.canvasContext.getImageData(ve,ae,ze-ve,ft-ae),0,0),this.drawingImgUrl=Yt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},V.prototype.setDrawingImage=function(){ue.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ue.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},V.prototype.setColor=function(Y){this.color=Y,this.colorChanged(Y)},V.prototype.setLineWidth=function(Y){this.lineWidth=Y},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Y=Object.assign({drawingImgUrl:this.drawingImgUrl},le.prototype.getState.call(this));return Y.typeName=V.typeName,Y},V.prototype.restoreState=function(Y){this.createVisual(),le.prototype.restoreState.call(this,Y),this.drawingImgUrl=Y.drawingImgUrl,this.setDrawingImage()},V.prototype.scale=function(Y,te){le.prototype.scale.call(this,Y,te),this.setDrawingImage()},V.typeName="FreehandMarker",V.title="Freehand marker",V.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>',V}(tt),Re=function(le){function V(Y,te,ve){var ae=le.call(this,Y,ve||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return ae.typeBoxes=[],ae.currentType=te,ae.setCurrentType=ae.setCurrentType.bind(ae),ae}return he(V,le),V.prototype.getUi=function(){var Y=this,te=document.createElement("div");te.style.display="flex",te.style.overflow="hidden",te.style.flexGrow="2";for(var ve=function(ft){var Ct="both";switch(ft){case 0:Ct="both";break;case 1:Ct="start";break;case 2:Ct="end";break;case 3:Ct="none"}var Wt=document.createElement("div");if(Wt.style.display="flex",Wt.style.flexGrow="2",Wt.style.alignItems="center",Wt.style.justifyContent="space-between",Wt.style.padding="5px",Wt.style.borderWidth="2px",Wt.style.borderStyle="solid",Wt.style.borderColor=Ct===ae.currentType?ae.uiStyleSettings.toolboxAccentColor:"transparent",Wt.addEventListener("click",function(){Y.setCurrentType(Ct,Wt)}),te.appendChild(Wt),Ct==="both"||Ct==="start"){var gt=document.createElement("div");gt.style.display="flex",gt.style.alignItems="center",gt.style.minHeight="20px",gt.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="`+(ae.uiStyleSettings!==void 0?ae.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,gt.style.marginLeft="5px",Wt.appendChild(gt)}var Yt=document.createElement("div");Yt.style.display="flex",Yt.style.alignItems="center",Yt.style.minHeight="20px",Yt.style.flexGrow="2";var er=document.createElement("hr");if(er.style.minWidth="20px",er.style.border="0px",er.style.borderTop="3px solid "+(ae.uiStyleSettings!==void 0?ae.uiStyleSettings.toolboxColor:"#eeeeee"),er.style.flexGrow="2",Yt.appendChild(er),Wt.appendChild(Yt),Ct==="both"||Ct==="end"){var Hr=document.createElement("div");Hr.style.display="flex",Hr.style.alignItems="center",Hr.style.minHeight="20px",Hr.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="`+(ae.uiStyleSettings!==void 0?ae.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Hr.style.marginRight="5px",Wt.appendChild(Hr)}ae.typeBoxes.push(Wt)},ae=this,ze=0;ze<4;ze++)ve(ze);return te},V.prototype.setCurrentType=function(Y,te){var ve=this;this.currentType=Y,this.typeBoxes.forEach(function(ae){ae.style.borderColor=ae===te?ve.uiStyleSettings!==void 0?ve.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},V}(X),Me=function(le){function V(Y,te,ve){var ae=le.call(this,Y,te,ve)||this;return ae.arrowType="end",ae.arrowBaseHeight=10,ae.arrowBaseWidth=10,ae.getArrowPoints=ae.getArrowPoints.bind(ae),ae.setArrowType=ae.setArrowType.bind(ae),ae.arrowTypePanel=new Re("Arrow type","end"),ae.arrowTypePanel.onArrowTypeChanged=ae.setArrowType,ae}return he(V,le),V.prototype.ownsTarget=function(Y){return!(!le.prototype.ownsTarget.call(this,Y)&&Y!==this.arrow1&&Y!==this.arrow2)},V.prototype.getArrowPoints=function(Y,te){var ve=this.arrowBaseWidth+2*this.strokeWidth,ae=this.arrowBaseHeight+2*this.strokeWidth;return Y-ve/2+","+(te+ae/2)+" "+Y+","+(te-ae/2)+" "+(Y+ve/2)+","+(te+ae/2)},V.prototype.createTips=function(){this.arrow1=ue.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ue.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ue.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ue.createTransform()),this.visual.appendChild(this.arrow2)},V.prototype.pointerDown=function(Y,te){le.prototype.pointerDown.call(this,Y,te),this.state==="creating"&&this.createTips()},V.prototype.adjustVisual=function(){if(le.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",ue.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ue.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),te=this.arrow1.transform.baseVal.getItem(0);te.setRotate(Y,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(te,0);var ve=this.arrow2.transform.baseVal.getItem(0);ve.setRotate(Y+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ve,0)}},V.prototype.setArrowType=function(Y){this.arrowType=Y,this.adjustVisual(),this.stateChanged()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Y=Object.assign({arrowType:this.arrowType},le.prototype.getState.call(this));return Y.typeName=V.typeName,Y},V.prototype.restoreState=function(Y){le.prototype.restoreState.call(this,Y);var te=Y;this.arrowType=te.arrowType,this.createTips(),this.adjustVisual()},V.typeName="ArrowMarker",V.title="Arrow marker",V.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',V}(lt),Ee=function(le){function V(Y,te,ve){var ae=le.call(this,Y,te,ve)||this;return ae.fillColor=ve.defaultFillColor,ae.strokeWidth=0,ae.fillPanel=new de("Color",ve.defaultColorSet,ve.defaultFillColor),ae.fillPanel.onColorChanged=ae.setFillColor,ae}return he(V,le),Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Y=le.prototype.getState.call(this);return Y.typeName=V.typeName,Y},V.typeName="CoverMarker",V.title="Cover marker",V.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',V}(et),Oe=function(le){function V(Y,te,ve,ae){var ze=le.call(this,Y,ae||'<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 ze.opacities=[],ze.opacityBoxes=[],ze.opacities=te,ze.currentOpacity=ve,ze.setCurrentOpacity=ze.setCurrentOpacity.bind(ze),ze}return he(V,le),V.prototype.getUi=function(){var Y=this,te=document.createElement("div");return te.style.display="flex",te.style.overflow="hidden",te.style.flexGrow="2",te.style.justifyContent="space-between",this.opacities.forEach(function(ve){var ae=document.createElement("div");ae.style.display="flex",ae.style.alignItems="center",ae.style.justifyContent="center",ae.style.padding="5px",ae.style.borderWidth="2px",ae.style.borderStyle="solid",ae.style.borderColor=ve===Y.currentOpacity?Y.uiStyleSettings.toolboxAccentColor:"transparent",ae.addEventListener("click",function(){Y.setCurrentOpacity(ve,ae)}),te.appendChild(ae);var ze=document.createElement("div");ze.innerText=100*ve+"%",ae.appendChild(ze),Y.opacityBoxes.push(ae)}),te},V.prototype.setCurrentOpacity=function(Y,te){var ve=this;this.currentOpacity=Y,this.opacityBoxes.forEach(function(ae){ae.style.borderColor=ae===te?ve.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},V}(X),ke=function(le){function V(Y,te,ve){var ae=le.call(this,Y,te,ve)||this;return ae.setOpacity=ae.setOpacity.bind(ae),ae.fillColor=ve.defaultHighlightColor,ae.strokeWidth=0,ae.opacity=ve.defaultHighlightOpacity,ae.fillPanel=new de("Color",ve.defaultColorSet,ae.fillColor),ae.fillPanel.onColorChanged=ae.setFillColor,ae.opacityPanel=new Oe("Opacity",ve.defaultOpacitySteps,ae.opacity),ae.opacityPanel.onOpacityChanged=ae.setOpacity,ae}return he(V,le),V.prototype.setOpacity=function(Y){this.opacity=Y,this.visual&&ue.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Y=le.prototype.getState.call(this);return Y.typeName=V.typeName,Y},V.typeName="HighlightMarker",V.title="Highlight marker",V.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>',V}(Ee),Ne='<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>',He=function(le){function V(Y,te,ve){var ae=le.call(this,Y,te,ve)||this;return ae.bgColor="transparent",ae.tipPosition={x:0,y:0},ae.tipBase1Position={x:0,y:0},ae.tipBase2Position={x:0,y:0},ae.tipMoving=!1,ae.color=ve.defaultStrokeColor,ae.bgColor=ve.defaultFillColor,ae.fontFamily=ve.defaultFontFamily,ae.defaultSize={x:100,y:30},ae.setBgColor=ae.setBgColor.bind(ae),ae.getTipPoints=ae.getTipPoints.bind(ae),ae.positionTip=ae.positionTip.bind(ae),ae.setTipPoints=ae.setTipPoints.bind(ae),ae.colorPanel=new de("Text color",ve.defaultColorSet,ae.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>'),ae.colorPanel.onColorChanged=ae.setColor,ae.bgColorPanel=new de("Fill color",ve.defaultColorSet,ae.bgColor,Ne),ae.bgColorPanel.onColorChanged=ae.setBgColor,ae.fontFamilyPanel=new Ve("Font",ve.defaultFontFamilies,ve.defaultFontFamily),ae.fontFamilyPanel.onFontChanged=ae.setFont,ae.tipGrip=new Ke,ae.tipGrip.visual.transform.baseVal.appendItem(ue.createTransform()),ae.controlBox.appendChild(ae.tipGrip.visual),ae}return he(V,le),V.prototype.ownsTarget=function(Y){return le.prototype.ownsTarget.call(this,Y)||this.tipGrip.ownsTarget(Y)||this.tip===Y},V.prototype.createTip=function(){ue.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ue.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},V.prototype.pointerDown=function(Y,te){this.state==="new"&&le.prototype.pointerDown.call(this,Y,te),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(te)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):le.prototype.pointerDown.call(this,Y,te)},V.prototype.pointerUp=function(Y){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,le.prototype.pointerUp.call(this,Y);else{var te=this.state==="creating";le.prototype.pointerUp.call(this,Y),this.setTipPoints(te),this.positionTip()}},V.prototype.manipulate=function(Y){if(this.tipMoving){var te=this.unrotatePoint(Y);this.tipPosition={x:te.x-this.manipulationStartLeft,y:te.y-this.manipulationStartTop},this.positionTip()}else le.prototype.manipulate.call(this,Y)},V.prototype.setBgColor=function(Y){this.bgRectangle&&this.tip&&(ue.setAttributes(this.bgRectangle,[["fill",Y]]),ue.setAttributes(this.tip,[["fill",Y]])),this.bgColor=Y,this.fillColorChanged(Y)},V.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},V.prototype.setTipPoints=function(Y){Y===void 0&&(Y=!1);var te=Math.min(this.height/2,15),ve=this.height/5;Y&&(this.tipPosition={x:te+ve/2,y:this.height+20});var ae=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?ae<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(ve=this.width/5,te=Math.min(this.width/2,15),this.tipBase1Position={x:te,y:0},this.tipBase2Position={x:te+ve,y:0}):(this.tipBase1Position={x:0,y:te},this.tipBase2Position={x:0,y:te+ve}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?ae<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(ve=this.width/5,te=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-te-ve,y:0},this.tipBase2Position={x:this.width-te,y:0}):(this.tipBase1Position={x:this.width,y:te},this.tipBase2Position={x:this.width,y:te+ve}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?ae<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(ve=this.width/5,te=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-te-ve,y:this.height},this.tipBase2Position={x:this.width-te,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-te-ve},this.tipBase2Position={x:this.width,y:this.height-te}):ae<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(ve=this.width/5,te=Math.min(this.width/2,15),this.tipBase1Position={x:te,y:this.height},this.tipBase2Position={x:te+ve,y:this.height}):(this.tipBase1Position={x:0,y:this.height-te},this.tipBase2Position={x:0,y:this.height-te-ve})},V.prototype.resize=function(Y){le.prototype.resize.call(this,Y),this.positionTip()},V.prototype.positionTip=function(){ue.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(V.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),V.prototype.select=function(){this.positionTip(),le.prototype.select.call(this)},V.prototype.getState=function(){var Y=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},le.prototype.getState.call(this));return Y.typeName=V.typeName,Y},V.prototype.restoreState=function(Y){var te=Y;this.bgColor=te.bgColor,this.tipPosition=te.tipPosition,le.prototype.restoreState.call(this,Y),this.createTip(),this.setTipPoints()},V.prototype.scale=function(Y,te){le.prototype.scale.call(this,Y,te),this.tipPosition={x:this.tipPosition.x*Y,y:this.tipPosition.y*te},this.positionTip()},V.typeName="CalloutMarker",V.title="Callout marker",V.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>',V}(Qe),rt=function(le){function V(Y,te,ve){var ae=le.call(this,Y,te,ve)||this;return ae.fillColor="transparent",ae.strokeColor="transparent",ae.strokeWidth=0,ae.strokeDasharray="",ae.opacity=1,ae.strokeColor=ve.defaultColor,ae.strokeWidth=ve.defaultStrokeWidth,ae.strokeDasharray=ve.defaultStrokeDasharray,ae.fillColor=ve.defaultFillColor,ae.setStrokeColor=ae.setStrokeColor.bind(ae),ae.setFillColor=ae.setFillColor.bind(ae),ae.setStrokeWidth=ae.setStrokeWidth.bind(ae),ae.setStrokeDasharray=ae.setStrokeDasharray.bind(ae),ae.setOpacity=ae.setOpacity.bind(ae),ae.createVisual=ae.createVisual.bind(ae),ae.strokePanel=new de("Line color",fe(ve.defaultColorSet,["transparent"]),ve.defaultColor),ae.strokePanel.onColorChanged=ae.setStrokeColor,ae.fillPanel=new de("Fill color",fe(ve.defaultColorSet,["transparent"]),ae.fillColor,Ne),ae.fillPanel.onColorChanged=ae.setFillColor,ae.strokeWidthPanel=new it("Line width",ve.defaultStrokeWidths,ve.defaultStrokeWidth),ae.strokeWidthPanel.onWidthChanged=ae.setStrokeWidth,ae.strokeStylePanel=new at("Line style",ve.defaultStrokeDasharrays,ve.defaultStrokeDasharray),ae.strokeStylePanel.onStyleChanged=ae.setStrokeDasharray,ae.opacityPanel=new Oe("Opacity",ve.defaultOpacitySteps,ae.opacity),ae.opacityPanel.onOpacityChanged=ae.setOpacity,ae}return he(V,le),V.prototype.ownsTarget=function(Y){return!(!le.prototype.ownsTarget.call(this,Y)&&Y!==this.visual)},V.prototype.createVisual=function(){this.visual=ue.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)},V.prototype.pointerDown=function(Y,te){le.prototype.pointerDown.call(this,Y,te),this.state==="new"&&(this.createVisual(),this.moveVisual(Y),this._state="creating")},V.prototype.manipulate=function(Y){le.prototype.manipulate.call(this,Y)},V.prototype.resize=function(Y){le.prototype.resize.call(this,Y),this.setSize()},V.prototype.setSize=function(){le.prototype.setSize.call(this),ue.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},V.prototype.pointerUp=function(Y){le.prototype.pointerUp.call(this,Y),this.setSize()},V.prototype.setStrokeColor=function(Y){this.strokeColor=Y,this.visual&&ue.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Y),this.stateChanged()},V.prototype.setFillColor=function(Y){this.fillColor=Y,this.visual&&ue.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Y),this.stateChanged()},V.prototype.setStrokeWidth=function(Y){this.strokeWidth=Y,this.visual&&ue.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},V.prototype.setStrokeDasharray=function(Y){this.strokeDasharray=Y,this.visual&&ue.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},V.prototype.setOpacity=function(Y){this.opacity=Y,this.visual&&ue.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Y=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},le.prototype.getState.call(this));return Y.typeName=V.typeName,Y},V.prototype.restoreState=function(Y){var te=Y;this.fillColor=te.fillColor,this.strokeColor=te.strokeColor,this.strokeWidth=te.strokeWidth,this.strokeDasharray=te.strokeDasharray,this.opacity=te.opacity,this.createVisual(),le.prototype.restoreState.call(this,Y),this.setSize()},V.prototype.scale=function(Y,te){le.prototype.scale.call(this,Y,te),this.setSize()},V.typeName="EllipseMarker",V.title="Ellipse marker",V.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>',V}(tt),ct=function(le){function V(Y,te,ve){return le.call(this,Y,te,ve)||this}return he(V,le),Object.defineProperty(V.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),V.prototype.ownsTarget=function(Y){return!(!le.prototype.ownsTarget.call(this,Y)&&Y!==this.tip1&&Y!==this.tip2)},V.prototype.createTips=function(){this.tip1=ue.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(ue.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ue.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(ue.createTransform()),this.visual.appendChild(this.tip2)},V.prototype.pointerDown=function(Y,te){le.prototype.pointerDown.call(this,Y,te),this.state==="creating"&&this.createTips()},V.prototype.adjustVisual=function(){if(le.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ue.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()]]),ue.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),te=this.tip1.transform.baseVal.getItem(0);te.setRotate(Y,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(te,0);var ve=this.tip2.transform.baseVal.getItem(0);ve.setRotate(Y+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ve,0)}},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Y=le.prototype.getState.call(this);return Y.typeName=V.typeName,Y},V.prototype.restoreState=function(Y){le.prototype.restoreState.call(this,Y),this.createTips(),this.adjustVisual()},V.typeName="MeasurementMarker",V.title="Measurement marker",V.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>',V}(lt),yt=function(le){function V(Y,te,ve){var ae=le.call(this,Y,te,ve)||this;return ae.strokePanel.colors=ve.defaultColorSet,ae.fillColor="transparent",ae}return he(V,le),Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Y=le.prototype.getState.call(this);return Y.typeName=V.typeName,Y},V.typeName="EllipseFrameMarker",V.title="Ellipse frame marker",V.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>',V}(rt),ht=function(){function le(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(le.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),le.prototype.addUndoStep=function(V){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(V)||(this.undoStack.push(V),JSON.stringify(this.lastRedoStep)!==JSON.stringify(V)&&this.redoStack.splice(0,this.redoStack.length))},le.prototype.replaceLastUndoStep=function(V){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=V)},le.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},le.prototype.undo=function(){if(this.undoStack.length>1){var V=this.undoStack.pop();return V!==void 0&&this.redoStack.push(V),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},le.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},le}(),pt=function(le){function V(Y,te,ve){var ae=le.call(this,Y,te,ve)||this;return ae.strokeColor="transparent",ae.strokeWidth=0,ae.strokeDasharray="",ae.curveX=0,ae.curveY=0,ae.manipulationStartCurveX=0,ae.manipulationStartCurveY=0,ae.setStrokeColor=ae.setStrokeColor.bind(ae),ae.setStrokeWidth=ae.setStrokeWidth.bind(ae),ae.setStrokeDasharray=ae.setStrokeDasharray.bind(ae),ae.positionGrips=ae.positionGrips.bind(ae),ae.addControlGrips=ae.addControlGrips.bind(ae),ae.adjustVisual=ae.adjustVisual.bind(ae),ae.setupControlBox=ae.setupControlBox.bind(ae),ae.resize=ae.resize.bind(ae),ae.strokeColor=ve.defaultColor,ae.strokeWidth=ve.defaultStrokeWidth,ae.strokeDasharray=ve.defaultStrokeDasharray,ae.strokePanel=new de("Line color",ve.defaultColorSet,ve.defaultColor),ae.strokePanel.onColorChanged=ae.setStrokeColor,ae.strokeWidthPanel=new it("Line width",ve.defaultStrokeWidths,ve.defaultStrokeWidth),ae.strokeWidthPanel.onWidthChanged=ae.setStrokeWidth,ae.strokeStylePanel=new at("Line style",ve.defaultStrokeDasharrays,ve.defaultStrokeDasharray),ae.strokeStylePanel.onStyleChanged=ae.setStrokeDasharray,ae}return he(V,le),V.prototype.ownsTarget=function(Y){return!(!le.prototype.ownsTarget.call(this,Y)&&Y!==this.visual&&Y!==this.selectorCurve&&Y!==this.visibleCurve&&!this.curveGrip.ownsTarget(Y))},V.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},V.prototype.createVisual=function(){this.visual=ue.createGroup(),this.selectorCurve=ue.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ue.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)},V.prototype.pointerDown=function(Y,te){le.prototype.pointerDown.call(this,Y,te),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(te)&&(this.activeGrip=this.curveGrip,this._state="resize")},V.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ue.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ue.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ue.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},V.prototype.setupControlBox=function(){le.prototype.setupControlBox.call(this),this.curveControlLine1=ue.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ue.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)},V.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,le.prototype.addControlGrips.call(this)},V.prototype.positionGrips=function(){le.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()))},V.prototype.manipulate=function(Y){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Y.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Y.y-this.manipulationStartY),le.prototype.manipulate.call(this,Y)},V.prototype.resize=function(Y){this.activeGrip===this.curveGrip&&(this.curveX=Y.x,this.curveY=Y.y),le.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)},V.prototype.setStrokeColor=function(Y){this.strokeColor=Y,this.adjustVisual(),this.colorChanged(Y)},V.prototype.setStrokeWidth=function(Y){this.strokeWidth=Y,this.adjustVisual()},V.prototype.setStrokeDasharray=function(Y){this.strokeDasharray=Y,this.adjustVisual()},V.prototype.scale=function(Y,te){this.curveX=this.curveX*Y,this.curveY=this.curveY*te,le.prototype.scale.call(this,Y,te)},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Y=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},le.prototype.getState.call(this));return Y.typeName=V.typeName,Y},V.prototype.restoreState=function(Y){le.prototype.restoreState.call(this,Y);var te=Y;this.strokeColor=te.strokeColor,this.strokeWidth=te.strokeWidth,this.strokeDasharray=te.strokeDasharray,this.curveX=te.curveX,this.curveY=te.curveY,this.createVisual(),this.adjustVisual()},V.typeName="CurveMarker",V.title="Curve marker",V.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>',V}(nt),Dt=function(){function le(V,Y){Y===void 0&&(Y=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=V,this.cancelable=Y}return Object.defineProperty(le.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),le.prototype.preventDefault=function(){this._defaultPrevented=!0},le}(),At=function(le){function V(Y,te,ve){var ae=le.call(this,Y,!1)||this;return ae.dataUrl=te,ae.state=ve,ae}return he(V,le),V}(Dt),bt=function(le){function V(Y,te,ve){ve===void 0&&(ve=!1);var ae=le.call(this,Y,ve)||this;return ae.marker=te,ae}return he(V,le),V}(Dt),Xt=function(){function le(){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 le.prototype.addEventListener=function(V,Y){this[V].push(Y)},le.prototype.removeEventListener=function(V,Y){var te=this[V].indexOf(Y);te>-1&&this[V].splice(te,1)},le}(),Gt=function(){function le(V){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new De,this._isOpen=!1,this.undoRedoManager=new ht,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 Xt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=le.instanceCounter++,this.styles=new ce(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=V,this.targetRoot=document.body,this.width=V.clientWidth,this.height=V.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(le.prototype,"ALL_MARKER_TYPES",{get:function(){return[je,Fe,Me,Qe,yt,rt,ke,He,ct,Ee,lt,pt]},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[je,Fe,Me,Qe,rt,ke,He]},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"BASIC_MARKER_TYPES",{get:function(){return[je,Fe,Me,Qe,ke]},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(V){var Y=this;this._availableMarkerTypes.splice(0),V.forEach(function(te){if(typeof te=="string"){var ve=Y.ALL_MARKER_TYPES.find(function(ae){return ae.typeName===te});ve!==void 0&&Y._availableMarkerTypes.push(ve)}else Y._availableMarkerTypes.push(te)})},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(V){this._zoomLevel=V,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(le.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),le.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),ie.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},le.prototype.show=function(){var V=this;this.styles.styleSheetRoot===void 0&&ne.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=ne.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Y){return Y(new Dt(V))})},le.prototype.render=function(){return Ie(this,void 0,void 0,function(){var V;return Se(this,function(Y){switch(Y.label){case 0:return this.setCurrentMarker(),(V=new Ce).naturalSize=this.renderAtNaturalSize,V.imageType=this.renderImageType,V.imageQuality=this.renderImageQuality,V.markersOnly=this.renderMarkersOnly,V.width=this.renderWidth,V.height=this.renderHeight,[4,V.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Y.sent(),[4,V.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Y.sent()]}})})},le.prototype.close=function(V){var Y=this;if(V===void 0&&(V=!1),this.isOpen){var te=!1;V||this.eventListeners.beforeclose.forEach(function(ve){var ae=new Dt(Y,!0);ve(ae),ae.defaultPrevented&&(te=!0)}),te||(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(ve){return ve(new Dt(Y))}),this.detachEvents(),this._isOpen=!1)}},le.prototype.addMarkersToToolbar=function(){for(var V,Y=[],te=0;te<arguments.length;te++)Y[te]=arguments[te];(V=this._availableMarkerTypes).push.apply(V,Y)},le.prototype.addRenderEventListener=function(V){this.addEventListener("render",function(Y){V(Y.dataUrl,Y.state)})},le.prototype.removeRenderEventListener=function(V){},le.prototype.addCloseEventListener=function(V){this.addEventListener("close",function(){V()})},le.prototype.removeCloseEventListener=function(V){},le.prototype.setupResizeObserver=function(){var V=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){V.resize(V.target.clientWidth,V.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return V.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},le.prototype.onPopupTargetResize=function(){var V=1*this.target.clientWidth/this.target.clientHeight,Y=this.editorCanvas.clientWidth/V>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*V:this.editorCanvas.clientWidth,te=Y<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/V;this.resize(Y,te)},le.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},le.prototype.resize=function(V,Y){this._isResizing=!0;var te=V/this.imageWidth,ve=Y/this.imageHeight;this.imageWidth=Math.round(V),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(te,ve),this._isResizing=!1},le.prototype.scaleMarkers=function(V,Y){var te,ve=this;this._currentMarker&&this._currentMarker instanceof Qe?this._currentMarker.scale(V,Y):(te=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(ae){ae!==ve._currentMarker&&ae.scale(V,Y)}),te!==void 0&&this.setCurrentMarker(te)},le.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"},le.prototype.setTopLeft=function(){var V=this.editingTarget.getBoundingClientRect(),Y=this.editorCanvas.getBoundingClientRect();this.left=V.left-Y.left,this.top=V.top-Y.top},le.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)},le.prototype.addDefs=function(){for(var V,Y=[],te=0;te<arguments.length;te++)Y[te]=arguments[te];this.defs=ue.createDefs(),this.addDefsToImage(),(V=this.defs).append.apply(V,Y)},le.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},le.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)},le.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},le.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},le.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)},le.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},le.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)},le.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 V=document.createElement("a");V.href="https://markerjs.com/",V.target="_blank",V.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>',V.title="Powered by marker.js",V.style.display="grid",V.style.alignItems="center",V.style.justifyItems="center",V.style.padding="3px",V.style.width="20px",V.style.height="20px",this.logoUI.appendChild(V),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},le.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")},le.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"},le.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},le.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 V=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=V+"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 q(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 $(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},le.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},le.prototype.removeMarker=function(V){this.markerImage.removeChild(V.container),this.markers.indexOf(V)>-1&&this.markers.splice(this.markers.indexOf(V),1),V.dispose()},le.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())},le.prototype.toolbarButtonClicked=function(V,Y){if(V==="marker"&&Y!==void 0)this.createNewMarker(Y);else if(V==="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()}},le.prototype.deleteSelectedMarker=function(){var V=this;if(this._currentMarker!==void 0){var Y=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ve){var ae=new bt(V,V._currentMarker,!0);ve(ae),ae.defaultPrevented&&(Y=!0)}),!Y){var te=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(ve){return ve(new bt(V,te))})}}},le.prototype.clear=function(){var V=this,Y=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ze){var ft=new bt(V,void 0,!0);ze(ft),ft.defaultPrevented&&(Y=!0)}),!Y)){this.setCurrentMarker();for(var te=function(ze){var ft=ve.markers[ze];ve.setCurrentMarker(ve.markers[ze]),ve._currentMarker.dispose(),ve.markerImage.removeChild(ve._currentMarker.container),ve.markers.splice(ve.markers.indexOf(ve._currentMarker),1),ve.eventListeners.markerdelete.forEach(function(Ct){return Ct(new bt(V,ft))})},ve=this,ae=this.markers.length-1;ae>=0;ae--)te(ae);this.addUndoStep()}},Object.defineProperty(le.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),le.prototype.showNotesEditor=function(){var V;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=(V=this._currentMarker.notes)!==null&&V!==void 0?V:"",this.overlayContainer.appendChild(this.notesArea))},le.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)},le.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},le.prototype.addUndoStep=function(){var V=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Y=this.getState(),te=this.undoRedoManager.getLastUndoStep();if(!te||te.width===Y.width&&te.height===Y.height){var ve=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Y),ve<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(ae){return ae(new Dt(V))})}else this.undoRedoManager.replaceLastUndoStep(Y),this.eventListeners.statechange.forEach(function(ae){return ae(new Dt(V))})}},le.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},le.prototype.undoStep=function(){var V=this,Y=this.undoRedoManager.undo();Y!==void 0&&(this.restoreState(Y),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(te){return te(new Dt(V))}))},le.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},le.prototype.redoStep=function(){var V=this,Y=this.undoRedoManager.redo();Y!==void 0&&(this.restoreState(Y),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(te){return te(new Dt(V))}))},le.prototype.stepZoom=function(){var V=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=V<this.zoomSteps.length-1?this.zoomSteps[V+1]:this.zoomSteps[0]},le.prototype.panTo=function(V){this.contentDiv.scrollBy({left:this.prevPanPoint.x-V.x,top:this.prevPanPoint.y-V.y}),this.prevPanPoint=V},le.prototype.startRenderAndClose=function(){return Ie(this,void 0,void 0,function(){var V,Y,te=this;return Se(this,function(ve){switch(ve.label){case 0:return[4,this.render()];case 1:return V=ve.sent(),Y=this.getState(),this.eventListeners.render.forEach(function(ae){return ae(new At(te,V,Y))}),this.close(!0),[2]}})})},le.prototype.getState=function(V){V===!0&&this.setCurrentMarker();var Y={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(te){return Y.markers.push(te.getState())}),Y},le.prototype.restoreState=function(V){var Y=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);V.markers.forEach(function(te){var ve=Y._availableMarkerTypes.find(function(ze){return ze.typeName===te.typeName});if(ve!==void 0){var ae=Y.addNewMarker(ve);ae.restoreState(te),Y.markers.push(ae)}}),V.width&&V.height&&(V.width!==this.imageWidth||V.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/V.width,this.imageHeight/V.height),this.eventListeners.restorestate.forEach(function(te){return te(new Dt(Y))})},le.prototype.addNewMarker=function(V){var Y=ue.createGroup();return this.markerImage.appendChild(Y),new V(Y,this.overlayContainer,this.settings)},le.prototype.createNewMarker=function(V){var Y,te=this;(Y=typeof V=="string"?this._availableMarkerTypes.find(function(ve){return ve.typeName===V}):V)&&(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(ve){return ve(new bt(te,te._currentMarker))}))},le.prototype.markerCreated=function(V){var Y=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(V),this.setCurrentMarker(V),V instanceof Fe&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Fe):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(te){return te(new bt(Y,Y._currentMarker))})},le.prototype.colorChanged=function(V){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=V,this.settings.defaultStrokeColor=V)},le.prototype.fillColorChanged=function(V){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=V)},le.prototype.markerStateChanged=function(V){var Y=this;this.eventListeners.markerchange.forEach(function(te){return te(new bt(Y,V))})},le.prototype.setCurrentMarker=function(V){var Y=this;this._currentMarker!==V&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(te){return te(new bt(Y,Y._currentMarker))})),this._currentMarker=V,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(te){return te(new bt(Y,Y._currentMarker))}))},le.prototype.onPointerDown=function(V){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||V.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(te){return te.ownsTarget(V.target)});Y!==void 0?(this.setCurrentMarker(Y),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(V.clientX,V.clientY),V.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:V.clientX,y:V.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(V.clientX,V.clientY))},le.prototype.onDblClick=function(V){if(this._isFocused||this.focus(),this.mode==="select"){var Y=this.markers.find(function(te){return te.ownsTarget(V.target)});Y!==void 0&&Y!==this._currentMarker&&this.setCurrentMarker(Y),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(V.clientX,V.clientY),V.target):this.setCurrentMarker()}},le.prototype.onPointerMove=function(V){this.touchPoints!==1&&V.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||V.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(V.clientX,V.clientY)):this.zoomLevel>1&&this.panTo({x:V.clientX,y:V.clientY}))},le.prototype.onPointerUp=function(V){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(V.clientX,V.clientY)),this.isDragging=!1,this.addUndoStep()},le.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},le.prototype.onKeyUp=function(V){this._currentMarker===void 0||this.notesArea!==void 0||V.key!=="Delete"&&V.key!=="Backspace"||this.deleteSelectedMarker()},le.prototype.clientToLocalCoordinates=function(V,Y){var te=this.markerImage.getBoundingClientRect();return{x:(V-te.left)/this.zoomLevel,y:(Y-te.top)/this.zoomLevel}},le.prototype.onWindowResize=function(){this.positionUI()},le.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var V=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=V+"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()},le.prototype.addLicenseKey=function(V){ie.addKey(V)},le.prototype.addEventListener=function(V,Y){this.eventListeners.addEventListener(V,Y)},le.prototype.removeEventListener=function(V,Y){this.eventListeners.removeEventListener(V,Y)},le.prototype.renderState=function(V){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(V),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(le.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),le.prototype.focus=function(){var V=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 Dt(V))}))},le.prototype.blur=function(){var V=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Y){return Y(new Dt(V))}))},le.instanceCounter=0,le}();/* **********************************
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 rr=function(le,V){return(rr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,te){Y.__proto__=te}||function(Y,te){for(var ve in te)Object.prototype.hasOwnProperty.call(te,ve)&&(Y[ve]=te[ve])})(le,V)};function sr(le,V){if(typeof V!="function"&&V!==null)throw new TypeError("Class extends value "+String(V)+" is not a constructor or null");function Y(){this.constructor=le}rr(le,V),le.prototype=V===null?Object.create(V):(Y.prototype=V.prototype,new Y)}function Kt(le,V,Y,te){return new(Y||(Y=Promise))(function(ve,ae){function ze(Wt){try{Ct(te.next(Wt))}catch(gt){ae(gt)}}function ft(Wt){try{Ct(te.throw(Wt))}catch(gt){ae(gt)}}function Ct(Wt){var gt;Wt.done?ve(Wt.value):(gt=Wt.value,gt instanceof Y?gt:new Y(function(Yt){Yt(gt)})).then(ze,ft)}Ct((te=te.apply(le,V||[])).next())})}function kt(le,V){var Y,te,ve,ae,ze={label:0,sent:function(){if(1&ve[0])throw ve[1];return ve[1]},trys:[],ops:[]};return ae={next:ft(0),throw:ft(1),return:ft(2)},typeof Symbol=="function"&&(ae[Symbol.iterator]=function(){return this}),ae;function ft(Ct){return function(Wt){return function(gt){if(Y)throw new TypeError("Generator is already executing.");for(;ze;)try{if(Y=1,te&&(ve=2&gt[0]?te.return:gt[0]?te.throw||((ve=te.return)&&ve.call(te),0):te.next)&&!(ve=ve.call(te,gt[1])).done)return ve;switch(te=0,ve&&(gt=[2&gt[0],ve.value]),gt[0]){case 0:case 1:ve=gt;break;case 4:return ze.label++,{value:gt[1],done:!1};case 5:ze.label++,te=gt[1],gt=[0];continue;case 7:gt=ze.ops.pop(),ze.trys.pop();continue;default:if(!(ve=ze.trys,(ve=ve.length>0&&ve[ve.length-1])||gt[0]!==6&&gt[0]!==2)){ze=0;continue}if(gt[0]===3&&(!ve||gt[1]>ve[0]&&gt[1]<ve[3])){ze.label=gt[1];break}if(gt[0]===6&&ze.label<ve[1]){ze.label=ve[1],ve=gt;break}if(ve&&ze.label<ve[2]){ze.label=ve[2],ze.ops.push(gt);break}ve[2]&&ze.ops.pop(),ze.trys.pop();continue}gt=V.call(le,ze)}catch(Yt){gt=[6,Yt],te=0}finally{Y=ve=0}if(5&gt[0])throw gt[1];return{value:gt[0]?gt[1]:void 0,done:!0}}([Ct,Wt])}}}var ir=function(){function le(){}return le.addKey=function(V){le.key=V},Object.defineProperty(le,"isLicensed",{get:function(){return!!le.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(le.key)},enumerable:!1,configurable:!0}),le}(),_t=function(){function le(){}return le.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},le.setAttributes=function(V,Y){for(var te=0,ve=Y;te<ve.length;te++){var ae=ve[te],ze=ae[0],ft=ae[1];V.setAttribute(ze,ft)}},le.createRect=function(V,Y,te){var ve=document.createElementNS("http://www.w3.org/2000/svg","rect");return ve.setAttribute("width",V.toString()),ve.setAttribute("height",Y.toString()),te&&le.setAttributes(ve,te),ve},le.createLine=function(V,Y,te,ve,ae){var ze=document.createElementNS("http://www.w3.org/2000/svg","line");return ze.setAttribute("x1",V.toString()),ze.setAttribute("y1",Y.toString()),ze.setAttribute("x2",te.toString()),ze.setAttribute("y2",ve.toString()),ae&&le.setAttributes(ze,ae),ze},le.createPolygon=function(V,Y){var te=document.createElementNS("http://www.w3.org/2000/svg","polygon");return te.setAttribute("points",V),Y&&le.setAttributes(te,Y),te},le.createCircle=function(V,Y){var te=document.createElementNS("http://www.w3.org/2000/svg","circle");return te.setAttribute("cx",(V/2).toString()),te.setAttribute("cy",(V/2).toString()),te.setAttribute("r",V.toString()),Y&&le.setAttributes(te,Y),te},le.createEllipse=function(V,Y,te){var ve=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ve.setAttribute("cx",(V/2).toString()),ve.setAttribute("cy",(Y/2).toString()),ve.setAttribute("rx",(V/2).toString()),ve.setAttribute("ry",(Y/2).toString()),te&&le.setAttributes(ve,te),ve},le.createGroup=function(V){var Y=document.createElementNS("http://www.w3.org/2000/svg","g");return V&&le.setAttributes(Y,V),Y},le.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},le.createMarker=function(V,Y,te,ve,ae,ze,ft){var Ct=document.createElementNS("http://www.w3.org/2000/svg","marker");return le.setAttributes(Ct,[["id",V],["orient",Y],["markerWidth",te.toString()],["markerHeight",ve.toString()],["refX",ae.toString()],["refY",ze.toString()]]),Ct.appendChild(ft),Ct},le.createText=function(V){var Y=document.createElementNS("http://www.w3.org/2000/svg","text");return Y.setAttribute("x","0"),Y.setAttribute("y","0"),V&&le.setAttributes(Y,V),Y},le.createTSpan=function(V,Y){var te=document.createElementNS("http://www.w3.org/2000/svg","tspan");return te.textContent=V,Y&&le.setAttributes(te,Y),te},le.createImage=function(V){var Y=document.createElementNS("http://www.w3.org/2000/svg","image");return V&&le.setAttributes(Y,V),Y},le.createPoint=function(V,Y){var te=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return te.x=V,te.y=Y,te},le.createPath=function(V,Y){var te=document.createElementNS("http://www.w3.org/2000/svg","path");return te.setAttribute("d",V),Y&&le.setAttributes(te,Y),te},le.createElement=function(V,Y){var te=document.createElementNS("http://www.w3.org/2000/svg",V);return Y&&le.setAttributes(te,Y),te},le.getHollowRectanglePath=function(V,Y,te,ve,ae,ze,ft,Ct){return"M"+V+","+Y+"V"+(Y+ve)+"H"+(V+te)+"V"+Y+"H"+ae+"V"+ze+"H"+(ae+ft)+"V"+(ze+Ct)+"H"+ae+"V"+Y+"Z"},le}(),Mt=function(){function le(V){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+V+"_"}return Object.defineProperty(le.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(le.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(le.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),le.prototype.addClass=function(V){return this.styleSheet===void 0&&this.addStyleSheet(),V.name=""+this.classNamePrefix+V.localName,this.classes.push(V),this.styleSheet.sheet.insertRule("."+V.name+" {"+V.style+"}",this.styleSheet.sheet.cssRules.length),V},le.prototype.addRule=function(V){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(V),this.styleSheet.sheet.insertRule(V.selector+" {"+V.style+"}",this.styleSheet.sheet.cssRules.length)},le.prototype.addStyleSheet=function(){var V;this.styleSheet=document.createElement("style"),((V=this.styleSheetRoot)!==null&&V!==void 0?V:document.head).appendChild(this.styleSheet),this.addRule(new Rt("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Rt("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Rt("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new Ot("_fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new Ot("_fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},le.prototype.removeStyleSheet=function(){var V;this.styleSheet&&(((V=this.styleSheetRoot)!==null&&V!==void 0?V:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},le}(),Rt=function(le,V){this.selector=le,this.style=V},Ot=function(le,V){this.localName=le,this.style=V},qt=function(){function le(){this.blocks=[],this.display=""}return le.prototype.addButtonBlock=function(V){V.className=this.blockClassName,V.buttonClassName=this.buttonClassName,V.buttonColorsClassName=this.buttonColorsClassName,V.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(V)},le.prototype.addElementBlock=function(V){V.className===void 0&&(V.className=this.blockClassName),this.blocks.push(V)},le.prototype.getUI=function(){var V=document.createElement("div");return V.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,V.style.display=this.display,this.blocks.forEach(function(Y){return V.appendChild(Y.getUI())}),V},le}(),Jr=function(){function le(){}return le.prototype.getUI=function(){var V=document.createElement("div");if(V.className=this.className,this.minWidth!==void 0&&(V.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":V.style.justifyContent="flex-start";break;case"center":V.style.justifyContent="center";break;case"end":V.style.justifyContent="flex-end"}return V.style.whiteSpace="nowrap",V},le}(),Et=function(le){function V(){var Y=le!==null&&le.apply(this,arguments)||this;return Y.buttons=[],Y}return sr(V,le),V.prototype.addButton=function(Y){Y.className=this.buttonClassName,Y.colorsClassName=this.buttonColorsClassName,Y.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(Y)},V.prototype.getUI=function(){var Y=le.prototype.getUI.call(this);return this.buttons.forEach(function(te){return Y.appendChild(te.getUI())}),Y},V}(Jr),It=function(){function le(V,Y){this._isActive=!1,this._isHidden=!1,this._icon=V,this.title=Y,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(le.prototype,"icon",{get:function(){return this._icon},set:function(V){this._icon=V,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isActive",{get:function(){return this._isActive},set:function(V){this._isActive=V,this.adjustClassName()},enumerable:!1,configurable:!0}),le.prototype.getUI=function(){var V=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 V.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},le.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,"")))},le.prototype.hide=function(){this._isHidden=!0},le}(),wt=function(le){function V(){var Y=le!==null&&le.apply(this,arguments)||this;return Y.elements=[],Y}return sr(V,le),V.prototype.addElement=function(Y){this.elements.push(Y)},V.prototype.getUI=function(){var Y=le.prototype.getUI.call(this);return this.elements.forEach(function(te){return Y.appendChild(te)}),Y},V}(Jr),Er=function(){function le(V,Y){this.horizontal=V,this.vertical=Y}return Object.defineProperty(le.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),le.prototype.getVerticalLength=function(V){return V/this.ratio},le.prototype.getHorizontalLength=function(V){return V*this.ratio},le}(),nr=function(){function le(){}return le.getIcon=function(V,Y){if(V>0&&Y>0){var te=new Er(V,Y),ve=te.ratio>=1?20:te.getHorizontalLength(20),ae=te.ratio<1?20:te.getVerticalLength(20),ze=document.createElementNS("http://www.w3.org/2000/svg","svg");ze.setAttribute("xmlns","http://www.w3.org/2000/svg"),ze.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(ze);var ft=_t.createDefs();ze.appendChild(ft);var Ct=_t.createElement("clipPath",[["id","text-bg-clip"]]);ft.appendChild(Ct);var Wt=_t.createPath(_t.getHollowRectanglePath((24-ve)/2,(24-ae)/2,ve,ae,(24-ve)/2+2,(24-ae)/2+2,ve-4,ae-4));ze.appendChild(Wt);var gt=_t.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);gt.appendChild(_t.createTSpan(V+":"+Y)),ze.appendChild(gt);var Yt=gt.getBBox();_t.setAttributes(gt,[["x",((24-Yt.width)/2).toString()],["y",((24-Yt.height)/2-Yt.y).toString()]]);var er=_t.createPath(_t.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Yt.width))/2,(24-Math.ceil(Yt.height))/2,Math.ceil(Yt.width),Math.ceil(Yt.height)));return Ct.appendChild(er),_t.setAttributes(Wt,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(ze),ze.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>'},le}(),Bt=function(le){function V(Y,te,ve){var ae=le.call(this,Y,te)||this;return ae.isDropdownOpen=!1,ae.onClick=ae.dropdownButtonClicked,ae.dropdownButtons=ve,ae}return sr(V,le),V.prototype.setupDropdown=function(){var Y=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(te){te.className=Y.className,te.colorsClassName=Y.colorsClassName,Y.dropdownBlock.appendChild(te.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},V.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},V.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},V.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},V.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},V.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},V}(It),Nt=function(){function le(V,Y){this.GRIP_SIZE=10,this.color=V,this.fillColor=Y,this.visual=_t.createGroup(),this.visual.appendChild(_t.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(_t.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return le.prototype.ownsTarget=function(V){return V===this.visual||V===this.visual.childNodes[0]||V===this.visual.childNodes[1]},le.prototype.setCenter=function(V,Y){this.visual.childNodes.forEach(function(te){return _t.setAttributes(te,[["cx",V.toString()],["cy",Y.toString()]])})},le}(),vr=function(){function le(V,Y,te,ve){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=V,this.canvasHeight=Y,this.margin=te,this.container=ve,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(le.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(V){this._aspectRatio=V,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(V){this._isGridVisible=V,this.gridContainer&&_t.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(V){this._zoomFactor=V,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),le.prototype.open=function(){var V=this;this.cropShadeElement=_t.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=_t.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var Y=0;Y<this.numberOfGridLines;Y++)this.horizontalGridLines.push(_t.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(_t.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(te){return V.gridContainer.appendChild(te)}),this.verticalGridLines.forEach(function(te){return V.gridContainer.appendChild(te)}),this.cropRectElement=_t.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new Nt(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new Nt(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new Nt(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new Nt(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},le.prototype.setCropRectangle=function(V){this.cropRect=V;var Y=Object.assign({},this.cropRect);this.zoomFactor!==1&&(Y.width=this.cropRect.width*this.zoomFactor,Y.height=this.cropRect.height*this.zoomFactor,Y.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-Y.width/2,Y.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-Y.height/2),_t.setAttributes(this.cropRectElement,[["x",Y.x.toString()],["y",Y.y.toString()],["width",Y.width.toString()],["height",Y.height.toString()]]);var te=Y.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(ae,ze){var ft=Y.y+te*(ze+1);_t.setAttributes(ae,[["x1",""+Y.x],["y1",""+ft],["x2",""+(Y.x+Y.width)],["y2",""+ft]])});var ve=Y.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(ae,ze){var ft=Y.x+ve*(ze+1);_t.setAttributes(ae,[["x1",""+ft],["y1",""+Y.y],["x2",""+ft],["y2",""+(Y.y+Y.height)]])}),_t.setAttributes(this.cropShadeElement,[["d",_t.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,Y.x,Y.y,Y.width,Y.height)]]),this.topLeftGrip.setCenter(Y.x,Y.y),this.topRightGrip.setCenter(Y.x+Y.width,Y.y),this.bottomLeftGrip.setCenter(Y.x,Y.y+Y.height),this.bottomRightGrip.setCenter(Y.x+Y.width,Y.y+Y.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},le.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)},le.prototype.clientToLocalCoordinates=function(V,Y){var te=this.container.getBoundingClientRect();return{x:V-te.left+this.margin,y:Y-te.top+this.margin}},le.prototype.onPointerDown=function(V){this.container.setPointerCapture(V.pointerId),this.previousPoint=this.clientToLocalCoordinates(V.clientX,V.clientY),this.cropRectElement===V.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(V.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(V.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(V.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(V.target)&&(this.activeGrip=this.bottomRightGrip)},le.prototype.onPointerMove=function(V){if(this.isMoving)this.move(this.clientToLocalCoordinates(V.clientX,V.clientY));else if(this.activeGrip){var Y=this.clientToLocalCoordinates(V.clientX,V.clientY);this.resize(Y)}V.preventDefault()},le.prototype.onPointerUp=function(V){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(V.pointerId)},le.prototype.move=function(V){var Y=V.x-this.previousPoint.x,te=V.y-this.previousPoint.y;this.zoomFactor!==1&&(Y=-Y/this.zoomFactor,te=-te/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+Y),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+te),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=V},le.prototype.resize=function(V){var Y=Object.assign({},this.cropRect),te=V.x-this.previousPoint.x,ve=V.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:Y.x+te<this.margin&&(te=this.margin-Y.x),Y.x+=te,Y.width=this.cropRect.x+this.cropRect.width-Y.x;break;case this.bottomRightGrip:case this.topRightGrip:Y.width+te>this.canvasWidth*this.zoomFactor&&(te=this.canvasWidth*this.zoomFactor-Y.width),Y.width+=te}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(Y.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(te),Y.height=this.aspectRatio.getVerticalLength(Y.width)):(Y.y+=ve,Y.height=this.cropRect.y+this.cropRect.height-Y.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?Y.height=this.aspectRatio.getVerticalLength(Y.width):Y.height+=ve}Y.width<10&&(Y.x=this.cropRect.x,Y.width=10),Y.height<10&&(Y.y=this.cropRect.y,Y.height=10),this.previousPoint=V,Y.x>=this.margin&&Y.y>=this.margin&&Y.x-this.margin+Y.width<=this.canvasWidth&&Y.y-this.margin+Y.height<=this.canvasHeight&&(this.cropRect=Y,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},le.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var V=this.cropRect.x+this.cropRect.width/2,Y=this.cropRect.y+this.cropRect.height/2,te=this.aspectRatio.getHorizontalLength(this.cropRect.height),ve=this.aspectRatio.getVerticalLength(this.cropRect.width);te/this.canvasWidth<ve/this.canvasHeight?this.cropRect.width=te:this.cropRect.height=ve,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=V-this.cropRect.width/2,this.cropRect.y=Y-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)}},le.prototype.getRescaledRect=function(V,Y,te,ve,ae,ze){var ft=te/V,Ct=ve/Y;return{x:(ae.x-ze)*ft+ze,y:(ae.y-ze)*Ct+ze,width:ae.width*ft,height:ae.height*Ct}},le.prototype.scaleCanvas=function(V,Y){var te=this.getRescaledRect(this.canvasWidth,this.canvasHeight,V,Y,this.cropRect,this.margin);this.canvasWidth=V,this.canvasHeight=Y,this.onCropChange&&this.onCropChange(te),this.setCropRectangle(te)},le}(),Qr=function(){function le(V){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=V,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(le.prototype,"angle",{get:function(){return this._angle},set:function(V){this._angle=V,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),le.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},le.prototype.onPointerDown=function(V){this.controlContainer.setPointerCapture(V.pointerId),this.isDragging=!0,this.previousPoint={x:V.clientX,y:V.clientY}},le.prototype.onPointerMove=function(V){this.isDragging&&(this.onAngleChange&&this.onAngleChange((V.clientX-this.previousPoint.x)/5),this.previousPoint.x=V.clientX)},le.prototype.onPointerUp=function(V){this.isDragging&&this.onAngleChange&&this.onAngleChange((V.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(V.pointerId)},le.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var V=this.angleLabelText.getBBox();_t.setAttributes(this.angleLabelElement,[["x",((this.width-V.width)/2).toString()],["y",(this.height/2).toString()]])}},le.prototype.positionScaleShape=function(){if(this.scaleShape){var V=this.scaleShape.transform.baseVal.getItem(0);V.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(V,0)}},le.prototype.getVisual=function(){var V=document.createElementNS("http://www.w3.org/2000/svg","svg");V.setAttribute("xmlns","http://www.w3.org/2000/svg"),V.setAttribute("width",this.width+"px"),V.setAttribute("height",this.height+"px"),V.setAttribute("viewBox","0 0 "+this.width+" "+this.height),V.style.flexShrink="0",document.body.appendChild(V);for(var Y="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,te=1;te<=this.width/5+10;te++){var ve=te%5==0?this.height/3:this.height/6;Y+="h4v"+-ve+"h1v"+ve}Y+="v1H0Z",this.scaleShape=_t.createPath(Y);var ae=_t.createTransform();this.scaleShape.transform.baseVal.appendItem(ae),V.appendChild(this.scaleShape),this.angleLabelElement=_t.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=_t.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var ze=_t.createTSpan("");return ze.innerHTML="&deg;",this.angleLabelElement.appendChild(ze),V.appendChild(this.angleLabelElement),document.body.removeChild(V),V},le}(),Cr=function(){function le(){this.naturalSize=!1,this.imageType="image/png"}return le.prototype.rasterize=function(V,Y,te,ve,ae,ze,ft){var Ct=this;return new Promise(function(Wt){var gt=document.createElement("canvas");gt.width=V.width.baseVal.value-2*ve,gt.height=V.height.baseVal.value-2*ve;var Yt=1,er=1;Ct.naturalSize===!0?(Yt=Y.naturalWidth/(V.width.baseVal.value-2*ve)/ze,er=Y.naturalHeight/(V.height.baseVal.value-2*ve)/ft,gt.width=Y.naturalWidth/ze,gt.height=Y.naturalHeight/ft):Ct.width!==void 0&&Ct.height!==void 0&&(Yt=Ct.width/te.width,er=Ct.height/te.height,gt.width*=Yt,gt.height*=er);var Hr=gt.getContext("2d");Hr.translate(gt.width/2,gt.height/2),Hr.rotate(ae*Math.PI/180),Hr.scale(ze,ft),Hr.translate(-gt.width/2,-gt.height/2),Hr.drawImage(Y,0,0,gt.width,gt.height);var on=document.createElement("canvas");on.width=te.width*Yt,on.height=te.height*er,on.getContext("2d").putImageData(Hr.getImageData((te.x-ve)*Yt,(te.y-ve)*er,te.width*Yt,te.height*er),0,0),Wt(on.toDataURL(Ct.imageType,Ct.imageQuality))})},le}(),vt=function(){function le(V){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=le.instanceCounter++,this.styles=new Mt(this.instanceNo),this.target=V,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(le.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(V){this._zoomToCropEnabled=V,V?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(V){this._isGridVisible=V,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"gridLines",{get:function(){return this._gridLines},set:function(V){this._gridLines=V,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(V){this._rotationAngle=V,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"aspectRatio",{get:function(){var V;return(V=this._aspectRatio)!==null&&V!==void 0?V:this.aspectRatios[0]},set:function(V){this._aspectRatio=V},enumerable:!1,configurable:!0}),le.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},le.prototype.show=function(){this.showUI(),this.open()},le.prototype.close=function(V){V===void 0&&(V=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),V||this.closeEventListeners.forEach(function(Y){return Y()}),this._isOpen=!1)},le.prototype.addRenderEventListener=function(V){this.renderEventListeners.push(V)},le.prototype.removeRenderEventListener=function(V){this.renderEventListeners.indexOf(V)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(V),1)},le.prototype.addCloseEventListener=function(V){this.closeEventListeners.push(V)},le.prototype.removeCloseEventListener=function(V){this.closeEventListeners.indexOf(V)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(V),1)},le.prototype.setupResizeObserver=function(){var V=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){V.resize(V.target.clientWidth,V.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))},le.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var V=1*this.target.clientWidth/this.target.clientHeight,Y=this.contentDiv.clientWidth/V>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*V:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,te=Y+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/V;this.resize(Y,te)}},le.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},le.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",_t.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},le.prototype.resize=function(V,Y){this.imageWidth=Math.round(V),this.imageHeight=Math.round(Y),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()},le.prototype.setEditingTarget=function(){var V=document.createElement("canvas");V.width=this.target.naturalWidth,V.height=this.target.naturalHeight,V.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var Y=V.toDataURL();_t.setAttributes(this.editingTarget,[["href",Y]]),this.setEditingTargetSize()},le.prototype.setTopLeft=function(){var V=this.target.getBoundingClientRect(),Y=this.editorCanvas.getBoundingClientRect();this.left=V.left-Y.left-this.CANVAS_MARGIN,this.top=V.top-Y.top-this.CANVAS_MARGIN},le.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=_t.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=_t.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=_t.createGroup(),this.editingTargetRotationScaleContainer=_t.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var V=_t.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(V);var Y=_t.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(Y),this.editingTargetContainer=_t.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)},le.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},le.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=_t.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new vr(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()},le.prototype.zoomToCrop=function(){if(this.cropRect){var V=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,Y=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=V+"px "+Y+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-V+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-Y+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},le.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)},le.prototype.cropRectChanged=function(V){this.cropRect=V,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},le.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},le.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"},le.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},le.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 V=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,Y=this.target.offsetTop>V+this.CANVAS_MARGIN?this.target.offsetTop-(V+this.CANVAS_MARGIN):0;this.coverDiv.style.top=Y+"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},le.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},le.prototype.addTopToolbar=function(){var V=this;this.topToolbar=new qt,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 Y=new Et;Y.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(Y);var te=[];this.aspectRatios.forEach(function(er){var Hr=new It(nr.getIcon(er.horizontal,er.vertical),er.horizontal===0&&er.vertical===0?"FREE":er.horizontal+":"+er.vertical);Hr.onClick=function(){return V.ratioButtonClicked(er)},te.push(Hr)}),this.aspectRatioButton=new Bt(nr.getIcon(0,0),"Aspect ratio",te),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,Y.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var ve=new It('<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");ve.isActive=this.isGridVisible,ve.onClick=function(){V.isGridVisible=!V.isGridVisible,ve.isActive=V.isGridVisible},Y.addButton(ve);var ae=new It('<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(ae.isActive=this.zoomToCropEnabled,ae.onClick=function(){V.zoomToCropEnabled=!V.zoomToCropEnabled,ae.isActive=V.zoomToCropEnabled},Y.addButton(ae),!ir.isLicensed){var ze=new wt;this.topToolbar.addElementBlock(ze);var ft=document.createElement("div");ft.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Ct=document.createElement("a");Ct.style.color="currentColor",Ct.href="https://markerjs.com/products/cropro",Ct.target="_blank",Ct.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>',ft.appendChild(Ct),ze.addElement(ft)}var Wt=new Et;Wt.minWidth=3*this.toolbarHeight+"px",Wt.contentAlign="end",this.topToolbar.addButtonBlock(Wt);var gt=new It('<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");gt.onClick=this.startRenderAndClose,Wt.addButton(gt),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(gt.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Yt=new It('<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");Yt.onClick=this.close,Wt.addButton(Yt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Yt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},le.prototype.addBottomToolbar=function(){var V=this;this.bottomToolbar=new qt,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 Y=new Et;Y.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(Y);var te=new It('<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");te.onClick=this.rotateLeftButtonClicked,Y.addButton(te);var ve=new It('<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");ve.onClick=this.rotateRightButtonClicked,Y.addButton(ve);var ae=new wt;ae.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(ae),this.straightener=new Qr("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(Wt){V.rotateBy(Wt),V.straightener.angle=V.rotationAngle},ae.addElement(this.straightener.getUI());var ze=new Et;ze.minWidth=2*this.toolbarHeight+"px",ze.contentAlign="end",this.bottomToolbar.addButtonBlock(ze);var ft=new It('<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");ft.onClick=this.flipHorizontallyButtonClicked,ze.addButton(ft);var Ct=new It('<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");Ct.onClick=this.flipVerticallyButtonClicked,ze.addButton(Ct)},le.prototype.ratioButtonClicked=function(V){this.aspectRatio=V,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},le.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=nr.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},le.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Er(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},le.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},le.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},le.prototype.restoreState=function(V){if(V){var Y=this.cropLayer.getRescaledRect(V.width,V.height,this.imageWidth,this.imageHeight,V.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(Y),this.cropRectChanged(Y),this.flippedHorizontally=V.flippedHorizontally,this.flippedVertically=V.flippedVertically,this.applyFlip(),this.rotationAngle=V.rotationAngle,this.applyRotation()}},le.prototype.clientToLocalCoordinates=function(V,Y){var te=this.cropImage.getBoundingClientRect();return{x:V-te.left,y:Y-te.top}},le.prototype.onWindowResize=function(){this.positionUI()},le.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var V=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=V+"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()},le.prototype.rotateLeftButtonClicked=function(){var V=this.rotationAngle-90;this.rotationAngle%90!=0&&(V+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(V)},le.prototype.rotateRightButtonClicked=function(){var V=this.rotationAngle+90;this.rotationAngle%90!=0&&(V-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(V)},le.prototype.rotateTo=function(V){V=(V=V>180?V-360:V)<=-180?V+360:V,this.rotationAngle=V,this.applyRotation()},le.prototype.rotateBy=function(V){this.rotateTo((this.rotationAngle+V)%360)},le.prototype.applyRotation=function(){var V=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var Y=this.editingTargetRotationContainer.transform.baseVal.getItem(0);Y.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(Y,0);var te=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/te.width,this.imageHeight/te.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=V},le.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},le.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},le.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},le.prototype.startRenderAndClose=function(){return Kt(this,void 0,void 0,function(){var V,Y;return kt(this,function(te){switch(te.label){case 0:return[4,this.render()];case 1:return V=te.sent(),Y=this.getState(),this.renderEventListeners.forEach(function(ve){return ve(V,Y)}),this.close(!0),[2]}})})},le.prototype.render=function(){return Kt(this,void 0,void 0,function(){var V;return kt(this,function(Y){switch(Y.label){case 0:return(V=new Cr).naturalSize=this.renderAtNaturalSize,V.imageType=this.renderImageType,V.imageQuality=this.renderImageQuality,V.width=this.renderWidth,V.height=this.renderHeight,this.unzoomFromCrop(),_t.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,V.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 Y.sent(),[4,V.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,Y.sent()]}})})},le.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Ot("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 Ot("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Ot("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var V=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Ot("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*V)+`px;
height: `+(this.toolbarHeight-2*V)+`px;
padding: `+V+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Ot("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Ot("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new Rt("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new Rt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new Ot("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 Ot("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Ot("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 Ot("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*V)+`px;
padding: `+V+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Ot("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},le.instanceCounter=0,le}(),Ht=I("8hTe"),Zr=I.n(Ht),ln=/<pre[^>]*>/g;function kn(le){var V=document.createElement("div");return V.innerHTML=le,V.childNodes.length===0?"":V.childNodes[0].nodeValue}var Cn=J.a=function(le){var V=le.value,Y=V===void 0?"":V,te=le.edit,ve=te===void 0?!1:te,ae=le.className,ze=le.showTextOnly,ft=le.showLines,Ct=le.replaces,Wt=le.zoomImg,gt=le.hasMask,Yt=le.style,er=Yt===void 0?{}:Yt,Hr=le.stylesPrev,on=Hr===void 0?{}:Hr,Gr=String(Y),lr=Object(f.useRef)(),qr=Object(f.useRef)(),On=Object(f.useState)(""),zt=Object(C.a)(On,2),mr=zt[0],pr=zt[1],jr=Object(f.useState)("office"),Tr=Object(C.a)(jr,2),li=Tr[0],An=Tr[1],Ui=function(){var hr=new vt(qr.current);hr.displayMode="popup",hr.addRenderEventListener(function(){var nn=Object(m.a)(e.a.mark(function xr(fn){var Fr;return e.a.wrap(function(En){for(;;)switch(En.prev=En.next){case 0:return lr.current.style.display="none",En.next=3,Object(ye.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:fn}});case 3:Fr=En.sent,Fr!=null&&Fr.id&&Ct(qr.current.getAttribute("src").replace(Q.a.API_SERVER,""),"/api/attachments/".concat(Fr==null?void 0:Fr.id,"?type=").concat(Fr.content_type));case 5:case"end":return En.stop()}},xr)}));return function(xr){return nn.apply(this,arguments)}}()),hr.show()},Bi=function(){var hr=new Gt(qr.current);hr.settings.displayMode="popup",hr.addEventListener("render",function(){var nn=Object(m.a)(e.a.mark(function xr(fn){var Fr;return e.a.wrap(function(En){for(;;)switch(En.prev=En.next){case 0:if(lr.current.style.display="none",!qr.current){En.next=6;break}return En.next=4,Object(ye.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:fn.dataUrl}});case 4:Fr=En.sent,Fr!=null&&Fr.id&&Ct(qr.current.getAttribute("src").replace(Q.a.API_SERVER,""),"/api/attachments/".concat(Fr==null?void 0:Fr.id,"?type=").concat(Fr.content_type));case 6:case"end":return En.stop()}},xr)}));return function(xr){return nn.apply(this,arguments)}}()),hr.show(),window.markerArea=hr},qn=Object(f.useMemo)(function(){lr.current&&(lr.current.style.zIndex=-1);try{var en=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,hr=/\"\/api\/attachments\/|\"\/attachments\/download\//g,nn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Gr=Gr.replace(en,"("+Q.a.API_SERVER+"/api/attachments/").replace(hr,'"'+Q.a.API_SERVER+"/api/attachments/").replace(nn,'"'+Q.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(mi){}var xr=B(Gr),fn=F();if(Gr.match(/\[TOC\]/)&&(xr=xr.replace("<p>[TOC]</p>",L()),E()),xr=xr.replace(/(__special_katext_id_\d+__)/g,function(mi,En){var Un=fn[En],Di=Un.type,ui=Un.expression;return Object(re.renderToString)(kn(ui)||"",{displayMode:Di==="block",throwOnError:!1,output:"html"})}),xr=xr.replace(/▁/g,"\u2581\u2581\u2581"),P(),ze){var Fr=document.createElement("div");return Fr.innerHTML=xr,Fr.innerText}return setTimeout(function(){return hn()},500),xr},[Gr]),un=Object(f.useRef)();b.WebkitLineClamp=ft,ft&&(er=Object(y.a)(Object(y.a)({},er),b));function Si(en){var hr=en.target;if(hr.tagName.toUpperCase()==="IMG"){if(Wt){var nn=hr.getAttribute("src");pr(nn),An("image")}}else if(hr.tagName.toUpperCase()==="A"){var xr=hr.getAttribute("href");if(xr.indexOf("office")>-1)en.preventDefault(),pr(xr),An("office");else if(xr.indexOf("application/pdf")>-1)en.preventDefault(),pr(xr),An("pdf");else if(xr.indexOf("text/html")>-1)en.preventDefault(),pr(xr),An("html");else if(xr.startsWith("#")){en.preventDefault();var fn=document.getElementById(xr.replace("#",""));fn&&fn.scrollIntoView(!0)}}}var hn=function(){var hr,nn=(hr=un.current)===null||hr===void 0?void 0:hr.querySelectorAll("video");nn==null||nn.forEach(function(xr){if(xr.oncontextmenu=function(){return!1},xr.src.indexOf(".m3u8")>-1&&!xr.canPlayType("application/vnd.apple.mpegurl")){if(W.a.isSupported()){var fn=new W.a;fn.loadSource(xr.src),fn.attachMedia(xr)}}})};Object(f.useEffect)(function(){if(un.current&&qn&&(qn.match(ln)&&window.PR.prettyPrint()),un.current)return un.current.addEventListener("click",Si),function(){un.current.removeEventListener("click",Si),P(),E()}},[qn,un.current,Si]);var Yn=function(hr){if(!ve)return;hr.target.nodeName==="IMG"?(lr.current.style.zIndex=1,lr.current.style.display="flex",lr.current.style.width=hr.target.clientWidth+"px",lr.current.style.height=hr.target.clientHeight+"px",lr.current.style.top=hr.target.offsetTop+"px",lr.current.style.left=hr.target.offsetLeft+"px",qr.current.src=hr.target.getAttribute("src")):lr.current.style.display="none"};return r.a.createElement("div",{style:{position:"relative"}},r.a.createElement("div",{ref:un,style:Object(y.a)({},er),className:"".concat(ae||""," markdown-body ").concat(Zr.a.mdBody),onMouseOver:Yn,dangerouslySetInnerHTML:{__html:qn}}),r.a.createElement("div",{ref:lr,className:Zr.a.button},r.a.createElement(g.a,null,r.a.createElement(k.a,{onClick:function(){return Ui()}},"\u88C1\u526A"),r.a.createElement(k.a,{onClick:function(){return Bi()}},"\u7F16\u8F91"))),r.a.createElement("img",{ref:qr,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),r.a.createElement(ee.a,{close:!0,data:mr,type:mr!=null&&mr.length?li:"",style:Object(y.a)({},on),onClose:function(){return pr("")}}))}},"9OqN":function(H,J,I){(function(N,g,S){H.exports=J=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,y){var m=this._cipher,C=m.blockSize,_=this._iv,e=this._counter;_&&(e=this._counter=_.slice(0),this._iv=void 0);var f=e.slice(0);m.encryptBlock(f,0),e[C-1]=e[C-1]+1|0;for(var r=0;r<C;r++)k[y+r]^=f[r]}});return g.Decryptor=S,g}(),N.mode.CTR})},"9VGf":function(H,J,I){"use strict";I.d(J,"a",function(){return S});var N=I("q1tI"),g=I.n(N);function S(k,y){var m=Object(N.useRef)();Object(N.useEffect)(function(){m.current=k}),Object(N.useEffect)(function(){function C(){m.current()}if(y!==null){var _=setInterval(C,y);return function(){return clearInterval(_)}}},[y])}},ALsQ:function(H,J,I){(function(N,g,S){H.exports=J=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,y){var m=this._cipher,C=m.blockSize;S.call(this,k,y,C,m),this._prevBlock=k.slice(y,y+C)}}),g.Decryptor=g.extend({processBlock:function(k,y){var m=this._cipher,C=m.blockSize,_=k.slice(y,y+C);S.call(this,k,y,C,m),this._prevBlock=_}});function S(k,y,m,C){var _,e=this._iv;e?(_=e.slice(0),this._iv=void 0):_=this._prevBlock,C.encryptBlock(_,0);for(var f=0;f<m;f++)k[y+f]^=_[f]}return g}(),N.mode.CFB})},B7Ph:function(H,J,I){"use strict";I.d(J,"a",function(){return re});var N=I("5NDa"),g=I("5rEg"),S=I("sRBo"),k=I("kaz8"),y=I("5Dmo"),m=I("3S7+"),C=I("14J3"),_=I("BMrR"),e=I("7Kak"),f=I("9yH6"),r=I("+L6B"),c=I("2/Rp"),i=I("2qtc"),n=I("kLXV"),o=I("miYZ"),h=I("tsqr"),d=I("k1fw"),u=I("9og8"),s=I("tJVT"),l=I("oBTY"),E=I("DZo9"),b=I("8z0m"),p=I("WmNS"),L=I.n(p),R=I("q1tI"),v=I.n(R),x=I("Bvq2"),w=I.n(x),T=I("nj2k"),F=I.n(T),P=I("mxV5"),A=I.n(P),z=I("KhGG"),K=I("ErOA"),O=I("7Cbv"),B=I("1vsH"),U=I("p5ED"),D=b.a.Dragger,W=function(ye){for(var be=function(Ae){return Ae&&Ae.substring(0,Ae.lastIndexOf("."))},he=Object(l.a)(ye),Ie=0,Se=[],fe=0;fe<he.length;fe++){for(var ue="",ie=0;ie<Se.length;ie++)if(be(Se[ie][0].name)==be(he[fe].name)){Ie=1,ue=ie;break}if(Ie==1)Se[ue].push(he[fe]),Ie=0;else if(Ie==0){var Ce=new Array;Ce.push(he[fe]),Se.push(Ce)}}var ne=Se.map(function(ce){if(ce[0].name.includes(".in"))return ce.length===2?ce:[ce[0],{}];if(ce[0].name.includes(".out"))return ce.length===2?ce.reverse():[{},ce[0]]});return ne},Q=function(ye){var be=ye.onClose,he=ye.onOK,Ie=ye.visible,Se=ye.wrapClassName,fe=ye.rootIdentifier,ue=ye.multiple,ie=ue===void 0?!1:ue,Ce=ye.defaultMultipleValue,ne=Ce===void 0?!0:Ce,ce=Object(R.useState)([]),Ae=Object(s.a)(ce,2),oe=Ae[0],q=Ae[1],$=Object(R.useState)({}),X=Object(s.a)($,2),de=X[0],pe=X[1],xe=Object(R.useState)(!1),Ke=Object(s.a)(xe,2),qe=Ke[0],tt=Ke[1],et=Object(R.useState)(!0),it=Object(s.a)(et,2),at=it[0],je=it[1],De=Object(R.useState)(null),nt=Object(s.a)(De,2),lt=nt[0],Ve=nt[1],Qe=Object(R.useRef)([]),Fe=Object(R.useRef)(0),Re=function(){be()};Object(R.useEffect)(function(){Me()},[]),Object(R.useEffect)(function(){Ie&&(Qe.current=[],Fe.current=0,q([]),je(ne))},[Ie]);var Me=function(){var yt=Object(u.a)(L.a.mark(function ht(){var pt,Dt;return L.a.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:return bt.prev=0,bt.next=3,Object(K.a)("/api/buckets/get_upload_token_for_big_files",{method:"get"});case 3:pt=bt.sent,(pt==null?void 0:pt.status)===0&&(pt!=null&&pt.is_oss?(Dt=JSON.parse(Object(z.a)(pt.data)),pe(Dt),Ve(!1)):Ve(!0)),bt.next=9;break;case 7:bt.prev=7,bt.t0=bt.catch(0);case 9:case"end":return bt.stop()}},ht,null,[[0,7]])}));return function(){return yt.apply(this,arguments)}}(),Ee=function(ht){return ht&&ht.substring(0,ht.lastIndexOf("."))},Oe=function(ht){var pt,Dt,At=Ee((pt=ht[0])===null||pt===void 0?void 0:pt.name)||Ee((Dt=ht[1])===null||Dt===void 0?void 0:Dt.name),bt=oe.filter(function(Xt){return Ee(Xt.name)!==At});Qe.current=Object(l.a)(bt),q(Object(l.a)(bt))},ke=function(ht){if(!at){var pt=new FormData;pt.append("file",ht.file);var Dt=Object(K.a)("/api/attachments/get_file_content.json",{method:"post",body:pt},!0);Dt.then(function(kt){if(kt.status===0){Fe.current=Fe.current+1;var ir=Qe.current.map(function(Mt){if(Mt.name===ht.name){var Rt,Ot=Object(d.a)({},Mt);return ht!=null&&(Rt=ht.name)!==null&&Rt!==void 0&&Rt.includes(".in")?Ot.input=kt==null?void 0:kt.content:Ot.output=kt==null?void 0:kt.content,Ot}return Mt});if(Qe.current=Object(l.a)(ir),q(Object(l.a)(ir)),Fe.current>0&&Fe.current===oe.length){tt(!1);var _t=W(ir);_t=_t.filter(function(Mt){var Rt,Ot;return!!((Rt=Mt[0])!==null&&Rt!==void 0&&Rt.name&&(Ot=Mt[1])!==null&&Ot!==void 0&&Ot.name)}),_t=_t.map(function(Mt){return Object(d.a)(Object(d.a)(Object(d.a)({},Mt[0]),Mt[1]),{},{is_file:!1})}),he(_t),be()}}else tt(!1),be()});return}if(lt){var At=new FormData;At.append("file",ht.file),At.append("identifier",fe);var bt=Object(K.a)("/api/attachments.json",{method:"post",body:At},!0);bt.then(function(kt){if(kt.filename){Fe.current=Fe.current+1;var ir=Qe.current.map(function(Mt){if(Mt.name===(kt==null?void 0:kt.filename)){var Rt,Ot=Object(d.a)(Object(d.a)({},Mt),{},{is_oss:!lt});return kt!=null&&(Rt=kt.filename)!==null&&Rt!==void 0&&Rt.includes(".in")?(Ot.in_object_key=kt==null?void 0:kt.object,Ot.in_object_size=kt==null?void 0:kt.size,Ot.input=kt==null?void 0:kt.filename,Ot.in_file=ht):(Ot.out_object_key=kt==null?void 0:kt.object,Ot.out_object_size=kt==null?void 0:kt.size,Ot.output=kt==null?void 0:kt.filename,Ot.out_file=ht),Ot}return Mt});if(Qe.current=Object(l.a)(ir),q(Object(l.a)(ir)),Fe.current>0&&Fe.current===oe.length){tt(!1);var _t=W(ir);_t=_t.filter(function(Mt){var Rt,Ot;return!!((Rt=Mt[0])!==null&&Rt!==void 0&&Rt.name&&(Ot=Mt[1])!==null&&Ot!==void 0&&Ot.name)}),_t=_t.map(function(Mt){return Object(d.a)(Object(d.a)(Object(d.a)({},Mt[0]),Mt[1]),{},{is_file:!0})}),he(_t),be()}}else tt(!1),be()});return}var Xt=new A.a({endpoint:de.end_point,region:de.region,accessKeyId:de.access_key_id,accessKeySecret:de.access_key_secret,bucket:de.bucket,stsToken:de.security_token}),Gt=ht.name,rr={container_type:"TestSet",file_name:Gt},sr=Object(O.a)(),Kt="testsets/".concat(fe,"/").concat(sr).concat(Gt.indexOf(".")>-1?"."+Gt.split(".").pop():"");fe===null&&(Kt="testsets/".concat(sr).concat(Gt.indexOf(".")>-1?"."+Gt.split(".").pop():"")),Xt.multipartUpload(Kt,new Blob([ht.file],{type:ht.file.type}),{timeout:3600*1e3,partSize:1002400,callback:{customValue:{id:Gt+""},url:de==null?void 0:de.callback_url,host:de==null?void 0:de.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(K.e)(rr)}}).then(function(kt){if(kt.data.status===0){Fe.current=Fe.current+1;var ir=Qe.current.map(function(Mt){var Rt,Ot;if(Mt.name===((Rt=kt.data)===null||Rt===void 0||((Ot=Rt.data)===null||Ot===void 0)?void 0:Ot.file_name)){var qt,Jr,Et,It=Object(d.a)(Object(d.a)({},Mt),{},{is_oss:!lt});if((qt=kt.data)!==null&&qt!==void 0&&(Jr=qt.data)!==null&&Jr!==void 0&&(Et=Jr.file_name)!==null&&Et!==void 0&&Et.includes(".in")){var wt,Er,nr,Bt,Nt,vr;It.in_object_key=(wt=kt.data)===null||wt===void 0||((Er=wt.data)===null||Er===void 0)?void 0:Er.object,It.in_object_size=(nr=kt.data)===null||nr===void 0||((Bt=nr.data)===null||Bt===void 0)?void 0:Bt.size,It.input=(Nt=kt.data)===null||Nt===void 0||((vr=Nt.data)===null||vr===void 0)?void 0:vr.file_name,It.in_file=ht}else{var Qr,Cr,vt,Ht,Zr,ln;It.out_object_key=(Qr=kt.data)===null||Qr===void 0||((Cr=Qr.data)===null||Cr===void 0)?void 0:Cr.object,It.out_object_size=(vt=kt.data)===null||vt===void 0||((Ht=vt.data)===null||Ht===void 0)?void 0:Ht.size,It.output=(Zr=kt.data)===null||Zr===void 0||((ln=Zr.data)===null||ln===void 0)?void 0:ln.file_name,It.out_file=ht}return It}return Mt});if(Qe.current=Object(l.a)(ir),q(Object(l.a)(ir)),Fe.current>0&&Fe.current===oe.length){tt(!1);var _t=W(ir);_t=_t.filter(function(Mt){var Rt,Ot;return!!((Rt=Mt[0])!==null&&Rt!==void 0&&Rt.name&&(Ot=Mt[1])!==null&&Ot!==void 0&&Ot.name)}),_t=_t.map(function(Mt){return Object(d.a)(Object(d.a)(Object(d.a)({},Mt[0]),Mt[1]),{},{is_file:!0})}),he(_t),be()}}})},Ne=function(ht){return new Promise(function(pt,Dt){for(var At=0,bt=[],Xt=function(sr){ht[sr].file.slice(0,1).arrayBuffer().then(function(){At++,At===ht.length&&(bt.length?(h.b.warn("".concat(bt.join("\uFF0C"),"\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01")),Dt()):pt(ht))}).catch(function(Kt){console.log("\u9519\u8BEF\u4FE1\u606F\uFF1A",Kt),At++,bt.push(ht[sr].name),At===ht.length&&(bt.length?(h.b.warn("".concat(bt.join("\uFF0C"),"\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01")),Dt()):pt(ht))})},Gt=0;Gt<ht.length;Gt++)Xt(Gt)})},He=function(){var yt=Object(u.a)(L.a.mark(function ht(){var pt;return L.a.wrap(function(At){for(;;)switch(At.prev=At.next){case 0:if(!(oe.length===0)){At.next=3;break}return h.b.warn("\u8BF7\u9009\u62E9\u4E0A\u4F20\u6587\u4EF6"),At.abrupt("return");case 3:return At.next=5,Ne(oe);case 5:if(tt(!0),pt=W(oe),!pt.some(function(bt){var Xt,Gt;return!((Xt=bt[0])!==null&&Xt!==void 0&&Xt.name&&(Gt=bt[1])!==null&&Gt!==void 0&&Gt.name)})){At.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 bt=Object(u.a)(L.a.mark(function Gt(){return L.a.wrap(function(sr){for(;;)switch(sr.prev=sr.next){case 0:oe.map(function(){var Kt=Object(u.a)(L.a.mark(function kt(ir){return L.a.wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:ke(ir);case 1:case"end":return Mt.stop()}},kt)}));return function(kt){return Kt.apply(this,arguments)}}());case 1:case"end":return sr.stop()}},Gt)}));function Xt(){return bt.apply(this,arguments)}return Xt}(),onCancel:function(){tt(!1)}}),At.abrupt("return");case 10:oe.map(function(){var bt=Object(u.a)(L.a.mark(function Xt(Gt){return L.a.wrap(function(sr){for(;;)switch(sr.prev=sr.next){case 0:ke(Gt);case 1:case"end":return sr.stop()}},Xt)}));return function(Xt){return bt.apply(this,arguments)}}());case 11:case"end":return At.stop()}},ht)}));return function(){return yt.apply(this,arguments)}}(),rt={name:"file",fileList:oe,multiple:!0,accept:".in, .out",showUploadList:!1,beforeUpload:function(ht){if(oe!=null&&oe.some(function(Dt){return Dt.name===ht.name}))return h.b.info("".concat(ht.name,"\u6587\u4EF6\u5DF2\u5B58\u5728")),!1;if(ht.size/1024/1024>100)return h.b.info("\u6587\u4EF6\u8D85\u8FC7100M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;if(!/\.(in|out|IN|OUT)$/.test(ht.name))return h.b.warn("\u8F93\u5165\u6587\u4EF6\u53EA\u80FD\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6"),!1;var pt={name:ht.name,uid:ht.uid,file:ht,percent:0};return oe.push(pt),Qe.current=Object(l.a)(oe),q(Object(l.a)(oe)),!1}},ct=W(oe);return console.log(oe,ct,"fileList"),v.a.createElement(n.a,{visible:Ie,wrapClassName:Se,onOk:He,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",okButtonProps:{loading:qe},onCancel:Re,width:"1000px",title:"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"},v.a.createElement("div",{className:w.a.wrap},oe.length?v.a.createElement("div",null,v.a.createElement(_.a,{justify:"space-between",align:"middle",className:"mb20"},v.a.createElement("div",{style:{visibility:ie?"visible":"hidden"}},"\u6D4B\u8BD5\u7528\u4F8B\u7C7B\u578B\uFF1A",v.a.createElement(f.a.Group,{className:"ml10",value:at,onChange:function(ht){return je(ht.target.value)}},v.a.createElement(f.a,{value:!1},"\u6587\u672C"),v.a.createElement(f.a,{value:!0},"\u6587\u4EF6"))),v.a.createElement(b.a,rt,v.a.createElement(c.a,{className:w.a.btnS},"\u4E0A\u4F20\u6587\u4EF6"))),v.a.createElement(re,{data:ct,onRemove:Oe})):v.a.createElement("div",{className:w.a.noData},v.a.createElement("img",{src:F.a,alt:""}),v.a.createElement(b.a,rt,v.a.createElement(c.a,{className:w.a.btn},"\u4E0A\u4F20\u6587\u4EF6"))),v.a.createElement("div",{className:w.a.text},"\u4E0A\u4F20\u9650\u5236\uFF1A",v.a.createElement("br",null),"1\u3001\u6587\u4EF6\u5FC5\u987B\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6\u3002",v.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",v.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",v.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",v.a.createElement("br",null))))},re=function(ye){var be=ye.data,he=be===void 0?[]:be,Ie=ye.onRemove,Se=ye.width,fe=Se===void 0?"auto":Se,ue=ye.showScore,ie=ue===void 0?!1:ue,Ce=ye.disabled,ne=Ce===void 0?!1:Ce,ce=ye.inputChange,Ae=ye.onEvaluatingChange,oe=ye.showEvaluatingSetting,q=oe===void 0?!1:oe,$={value:"",filename:"",dataUrl:""},X=Object(R.useState)(Object(d.a)({},$)),de=Object(s.a)(X,2),pe=de[0],xe=de[1],Ke=function(it){var at=document.createElement("a");document.body.appendChild(at);var je=URL.createObjectURL(it.file);at.href=je,at.download=it.name,at.click(),URL.revokeObjectURL(je),document.body.removeChild(at)},qe=function(it,at){Object(B.y)(it,at)},tt=function(it,at){n.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:v.a.createElement("div",{className:"tc font16"},"\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u8BE5\u6D4B\u8BD5\u7528\u4F8B?"),onOk:function(){Ie(it,at)},onCancel:function(){}})};return he.length?v.a.createElement("div",{style:{width:fe}},v.a.createElement("div",{className:w.a.head},q&&v.a.createElement("div",{style:{width:"10%"}},"\u9690\u85CF",v.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'},v.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),v.a.createElement("div",{style:{width:"20%"}},"\u7528\u4F8B"),v.a.createElement("div",{style:{width:ie?"25%":"35%",padding:"0 12px"}},"\u8F93\u5165"),v.a.createElement("div",{style:{width:ie?"25%":"35%",padding:"0 12px"}},"\u8F93\u51FA"),ie&&v.a.createElement("div",{style:{width:"20%"}},"\u5F97\u5206\u6BD4\u4F8B"),q&&v.a.createElement("div",{style:{width:"20%"}},"\u9884\u671F\u8F93\u51FA",v.a.createElement(m.a,{title:"\u52FE\u9009\u540E\uFF0C\u9884\u671F\u8F93\u51FA\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},v.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),q&&v.a.createElement("div",{style:{width:"20%"}},"\u7279\u6B8A\u5224\u5B9A",v.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"},v.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),v.a.createElement("div",{style:{width:"10%"}},"\u64CD\u4F5C")),he.map(function(et,it){var at,je,De,nt;return v.a.createElement("div",{key:it,className:w.a.list},q&&v.a.createElement("div",{style:{width:"10%"}},v.a.createElement(k.a,{checked:!!et.hidden,onChange:function(Ve){Ae(Ve.target.checked?1:0,it,"hidden")}})),v.a.createElement("div",{style:{width:"20%"}},"\u6D4B\u8BD5\u7528\u4F8B",it+1),v.a.createElement("div",{className:w.a.info,style:{width:ie?"25%":"35%"}},v.a.createElement("span",{title:et.input||((at=et[0])===null||at===void 0?void 0:at.name),onClick:Object(u.a)(L.a.mark(function lt(){var Ve,Qe;return L.a.wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:if(et.input?et.input_file_url?Ve=et.input_file_url:Ve=et.in_file:Ve=et[0],!(typeof Ve=="string")){Re.next=14;break}return Re.next=4,fetch(Ve,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 4:return Qe=Re.sent,Re.t0=xe,Re.next=8,Qe.text();case 8:Re.t1=Re.sent,Re.t2=Ve,Re.t3={value:Re.t1,filename:"",dataUrl:Re.t2},(0,Re.t0)(Re.t3),Re.next=18;break;case 14:return Re.next=16,Object(B.G)(Ve.file);case 16:Qe=Re.sent,xe({value:Qe.text,filename:Ve.name,dataUrl:Qe.link});case 18:case"end":return Re.stop()}},lt)}))},et.input||((je=et[0])===null||je===void 0?void 0:je.name))),v.a.createElement("div",{className:w.a.info,style:{width:ie?"25%":"35%"}},v.a.createElement("span",{title:et.output||((De=et[1])===null||De===void 0?void 0:De.name),onClick:Object(u.a)(L.a.mark(function lt(){var Ve,Qe;return L.a.wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:if(et.input?et.output_file_url?Ve=et.output_file_url:Ve=et.out_file:Ve=et[1],!(typeof Ve=="string")){Re.next=14;break}return Re.next=4,fetch(Ve,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 4:return Qe=Re.sent,Re.t0=xe,Re.next=8,Qe.text();case 8:Re.t1=Re.sent,Re.t2=Ve,Re.t3={value:Re.t1,filename:"",dataUrl:Re.t2},(0,Re.t0)(Re.t3),Re.next=18;break;case 14:return Re.next=16,Object(B.G)(Ve.file);case 16:Qe=Re.sent,xe({value:Qe.text,filename:Ve.name,dataUrl:Qe.link});case 18:case"end":return Re.stop()}},lt)}))},et.output||((nt=et[1])===null||nt===void 0?void 0:nt.name))),ie&&v.a.createElement("div",{style:{width:"20%"}},v.a.createElement(g.a,{disabled:ne,style:{width:"70%"},onChange:function(Ve){return ce(Ve,it)},value:et.score}),v.a.createElement("span",null,"\xA0%")),q&&v.a.createElement("div",{style:{width:"20%"}},v.a.createElement(k.a,{checked:et.is_invisible||!1,onChange:function(Ve){Ae(Ve.target.checked,it,"is_invisible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),q&&v.a.createElement("div",{style:{width:"20%"}},v.a.createElement(k.a,{checked:et.last_match_rule||!1,onChange:function(Ve){Ae(Ve.target.checked,it,"last_match_rule")},className:"font14"},"\u672B\u5C3E\u5339\u914D")),v.a.createElement("div",{onClick:function(){return tt(et,it)},style:{width:"10%"}},v.a.createElement("span",{className:w.a.del},"\u5220\u9664")))}),v.a.createElement(U.a,{close:!0,data:pe.dataUrl,filename:pe.filename,type:pe.dataUrl.length?"txt":"",onClose:function(){return xe(Object(d.a)({},$))},monacoEditor:{value:pe.value,language:"txt",onChange:function(){},options:{fontSize:14,readOnly:!0,minimap:{enabled:!1}}}})):v.a.createElement(v.a.Fragment,null)};J.b=Q},BU3w:function(H,J,I){"use strict";I.d(J,"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 f=document.createElement("style");if((_=e.csp)===null||_===void 0?void 0:_.nonce){var r;f.nonce=(r=e.csp)===null||r===void 0?void 0:r.nonce}f.innerHTML=C;var c=S(e),i=c.firstChild;return e.prepend&&c.prepend?c.prepend(f):e.prepend&&i?c.insertBefore(f,i):c.appendChild(f),f}var y=new Map;function m(C,_){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},f=S(e);if(!y.has(f)){var r=k("",e),c=r.parentNode;y.set(f,c),c.removeChild(r)}var i=Array.from(y.get(f).children).find(function(u){return u.tagName==="STYLE"&&u[g]===_});if(i){var n,o;if(((n=e.csp)===null||n===void 0?void 0:n.nonce)&&i.nonce!==((o=e.csp)===null||o===void 0?void 0:o.nonce)){var h;i.nonce=(h=e.csp)===null||h===void 0?void 0:h.nonce}return i.innerHTML!==C&&(i.innerHTML=C),i}var d=k(C,e);return d[g]=_,d}},Bd2K:function(H,J,I){(function(N){N(I("VrN/"),I("osHv"))})(function(N){N.defineOption("autoCloseTags",!1,function(e,f,r){if(r!=N.Init&&r&&e.removeKeyMap("autoCloseTags"),!f)return;var c={name:"autoCloseTags"};(typeof f!="object"||f.whenClosing!==!1)&&(c["'/'"]=function(i){return m(i)}),(typeof f!="object"||f.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 f=e.listSelections(),r=[],c=e.getOption("autoCloseTags"),i=0;i<f.length;i++){if(!f[i].empty())return N.Pass;var n=f[i].head,o=e.getTokenAt(n),h=N.innerMode(e.getMode(),o.state),d=h.state,u=h.mode.xmlCurrentTag&&h.mode.xmlCurrentTag(d),s=u&&u.name;if(!s)return N.Pass;var l=h.mode.configuration=="html",E=typeof c=="object"&&c.dontCloseTags||l&&g,b=typeof c=="object"&&c.indentTags||l&&S;o.end>n.ch&&(s=s.slice(0,s.length-o.end+n.ch));var p=s.toLowerCase();if(!s||o.type=="string"&&(o.end!=n.ch||!/[\"\']/.test(o.string.charAt(o.string.length-1))||o.string.length==1)||o.type=="tag"&&u.close||o.string.indexOf("/")==n.ch-o.start-1||E&&C(E,p)>-1||_(e,h.mode.xmlCurrentContext&&h.mode.xmlCurrentContext(d)||[],s,n,!0))return N.Pass;var L=typeof c=="object"&&c.emptyTags;if(L&&C(L,s)>-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?`
`:"")+"</"+s+">",newPos:R?N.Pos(n.line+1,0):N.Pos(n.line,n.ch+1)}}for(var v=typeof c=="object"&&c.dontIndentOnAutoClose,i=f.length-1;i>=0;i--){var x=r[i];e.replaceRange(x.text,f[i].head,f[i].anchor,"+insert");var w=e.listSelections().slice(0);w[i]={head:x.newPos,anchor:x.newPos},e.setSelections(w),!v&&x.indent&&(e.indentLine(x.newPos.line,null,!0),e.indentLine(x.newPos.line+1,null,!0))}}function y(e,f){for(var r=e.listSelections(),c=[],i=f?"/":"</",n=e.getOption("autoCloseTags"),o=typeof n=="object"&&n.dontIndentOnSlash,h=0;h<r.length;h++){if(!r[h].empty())return N.Pass;var d=r[h].head,u=e.getTokenAt(d),s=N.innerMode(e.getMode(),u.state),l=s.state;if(f&&(u.type=="string"||u.string.charAt(0)!="<"||u.start!=d.ch-1))return N.Pass;var E,b=s.mode.name!="xml"&&e.getMode().name=="htmlmixed";if(b&&s.mode.name=="javascript")E=i+"script";else if(b&&s.mode.name=="css")E=i+"style";else{var p=s.mode.xmlCurrentContext&&s.mode.xmlCurrentContext(l);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[h]=E}if(e.replaceSelections(c),r=e.listSelections(),!o)for(var h=0;h<r.length;h++)(h==r.length-1||r[h].head.line<r[h+1].head.line)&&e.indentLine(r[h].head.line)}function m(e){return e.getOption("disableInput")?N.Pass:y(e,!0)}N.commands.closeTag=function(e){return y(e)};function C(e,f){if(e.indexOf)return e.indexOf(f);for(var r=0,c=e.length;r<c;++r)if(e[r]==f)return r;return-1}function _(e,f,r,c,i){if(!N.scanForClosingTag)return!1;var n=Math.min(e.lastLine()+1,c.line+500),o=N.scanForClosingTag(e,c,null,n);if(!o||o.tag!=r)return!1;for(var h=i?1:0,d=f.length-1;d>=0&&f[d]==r;d--)++h;c=o.to;for(var d=1;d<h;d++){var u=N.scanForClosingTag(e,c,null,n);if(!u||u.tag!=r)return!1;c=u.to}return!0}})},BjJ7:function(H,J,I){"use strict";I.d(J,"d",function(){return g}),I.d(J,"c",function(){return S}),I.d(J,"e",function(){return k}),I.d(J,"b",function(){return y}),I.d(J,"a",function(){return C});var N=I("m3rI");function g(_){var e=!0;if(_.length>0){for(var f=0;f<_.length;f++)if(_[f].compile_success==0||!_[f].compile_success){e=!1;break}}else e=!1;return e}function S(_){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",f=[],r=0;r<_.length;r++){var c=_[r],i=e?"".concat(e,"/").concat(c.name):"".concat(c.name);f.push({title:c.name,isLeaf:!(c.type==="tree"),key:i})}return f}function k(_,e,f){for(var r=0;r<_.length;r++){var c=_[r];if(c.key===e){c.children=f;break}c.children&&k(c.children,e,f)}return _}function y(_,e,f){var r;return function(){var c=this,i=arguments,n=function(){r=null,f||_.apply(c,i)},o=f&&!r;clearTimeout(r),r=setTimeout(n,e),o&&_.apply(c,i)}}var m=!0,C=N.a.API_SERVER},Bvq2:function(H,J,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,J,I){},"C/vA":function(H,J,I){"use strict";I.d(J,"a",function(){return N});function N(g){const S=this;let k=!1,y;return function(){return k||(k=!0,y=g.apply(S,arguments)),y}}},"Cg/j":function(H,J,I){"use strict";I.d(J,"b",function(){return N}),I.d(J,"a",function(){return g}),I.d(J,"c",function(){return k}),I.d(J,"d",function(){return y});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,f){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");S(C,_,f,!1)};return C.toString=()=>m,N.serviceIds.set(m,C),C}function y(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,J,I){var N=I("MFOe"),g=N.Global;H.exports={name:"sessionStorage",read:k,write:y,each:m,remove:C,clearAll:_};function S(){return g.sessionStorage}function k(e){return S().getItem(e)}function y(e,f){return S().setItem(e,f)}function m(e){for(var f=S().length-1;f>=0;f--){var r=S().key(f);e(k(r),r)}}function C(e){return S().removeItem(e)}function _(){return S().clear()}},DlQD:function(H,J,I){(function(N,g){H.exports=g()})(this,function(){"use strict";function N(Fe,Re){for(var Me=0;Me<Re.length;Me++){var Ee=Re[Me];Ee.enumerable=Ee.enumerable||!1,Ee.configurable=!0,"value"in Ee&&(Ee.writable=!0),Object.defineProperty(Fe,Ee.key,Ee)}}function g(Fe,Re,Me){return Re&&N(Fe.prototype,Re),Me&&N(Fe,Me),Fe}function S(Fe,Re){if(!Fe)return;if(typeof Fe=="string")return k(Fe,Re);var Me=Object.prototype.toString.call(Fe).slice(8,-1);if(Me==="Object"&&Fe.constructor&&(Me=Fe.constructor.name),Me==="Map"||Me==="Set")return Array.from(Fe);if(Me==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Me))return k(Fe,Re)}function k(Fe,Re){(Re==null||Re>Fe.length)&&(Re=Fe.length);for(var Me=0,Ee=new Array(Re);Me<Re;Me++)Ee[Me]=Fe[Me];return Ee}function y(Fe,Re){var Me;if(typeof Symbol=="undefined"||Fe[Symbol.iterator]==null){if(Array.isArray(Fe)||(Me=S(Fe))||Re&&Fe&&typeof Fe.length=="number"){Me&&(Fe=Me);var Ee=0;return function(){return Ee>=Fe.length?{done:!0}:{done:!1,value:Fe[Ee++]}}}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 Me=Fe[Symbol.iterator](),Me.next.bind(Me)}function m(Fe,Re){return Re={exports:{}},Fe(Re,Re.exports),Re.exports}var C=m(function(Fe){function Re(){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 Me(Ee){Fe.exports.defaults=Ee}Fe.exports={defaults:Re(),getDefaults:Re,changeDefaults:Me}}),_=C.defaults,e=C.getDefaults,f=C.changeDefaults,r=/[&<>"']/,c=/[&<>"']/g,i=/[<>"']|&(?!#?\w+;)/,n=/[<>"']|&(?!#?\w+;)/g,o={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},h=function(Re){return o[Re]};function d(Fe,Re){if(Re){if(r.test(Fe))return Fe.replace(c,h)}else if(i.test(Fe))return Fe.replace(n,h);return Fe}var u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function s(Fe){return Fe.replace(u,function(Re,Me){return Me=Me.toLowerCase(),Me==="colon"?":":Me.charAt(0)==="#"?Me.charAt(1)==="x"?String.fromCharCode(parseInt(Me.substring(2),16)):String.fromCharCode(+Me.substring(1)):""})}var l=/(^|[^\[])\^/g;function E(Fe,Re){Fe=Fe.source||Fe,Re=Re||"";var Me={replace:function(Oe,ke){return ke=ke.source||ke,ke=ke.replace(l,"$1"),Fe=Fe.replace(Oe,ke),Me},getRegex:function(){return new RegExp(Fe,Re)}};return Me}var b=/[^\w:]/g,p=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function L(Fe,Re,Me){if(Fe){var Ee;try{Ee=decodeURIComponent(s(Me)).replace(b,"").toLowerCase()}catch(Oe){return null}if(Ee.indexOf("javascript:")===0||Ee.indexOf("vbscript:")===0||Ee.indexOf("data:")===0)return null}Re&&!p.test(Me)&&(Me=T(Re,Me));try{Me=encodeURI(Me).replace(/%25/g,"%")}catch(Oe){return null}return Me}var R={},v=/^[^:]+:\/*[^/]*$/,x=/^([^:]+:)[\s\S]*$/,w=/^([^:]+:\/*[^/]*)[\s\S]*$/;function T(Fe,Re){R[" "+Fe]||(v.test(Fe)?R[" "+Fe]=Fe+"/":R[" "+Fe]=z(Fe,"/",!0)),Fe=R[" "+Fe];var Me=Fe.indexOf(":")===-1;return Re.substring(0,2)==="//"?Me?Re:Fe.replace(x,"$1")+Re:Re.charAt(0)==="/"?Me?Re:Fe.replace(w,"$1")+Re:Fe+Re}var F={exec:function(){}};function P(Fe){for(var Re=1,Me,Ee;Re<arguments.length;Re++){Me=arguments[Re];for(Ee in Me)Object.prototype.hasOwnProperty.call(Me,Ee)&&(Fe[Ee]=Me[Ee])}return Fe}function A(Fe,Re){var Me=Fe.replace(/\|/g,function(ke,Ne,He){for(var rt=!1,ct=Ne;--ct>=0&&He[ct]==="\\";)rt=!rt;return rt?"|":" |"}),Ee=Me.split(/ \|/),Oe=0;if(Ee.length>Re)Ee.splice(Re);else for(;Ee.length<Re;)Ee.push("");for(;Oe<Ee.length;Oe++)Ee[Oe]=Ee[Oe].trim().replace(/\\\|/g,"|");return Ee}function z(Fe,Re,Me){var Ee=Fe.length;if(Ee===0)return"";for(var Oe=0;Oe<Ee;){var ke=Fe.charAt(Ee-Oe-1);if(ke===Re&&!Me)Oe++;else if(ke!==Re&&Me)Oe++;else break}return Fe.substr(0,Ee-Oe)}function K(Fe,Re){if(Fe.indexOf(Re[1])===-1)return-1;for(var Me=Fe.length,Ee=0,Oe=0;Oe<Me;Oe++)if(Fe[Oe]==="\\")Oe++;else if(Fe[Oe]===Re[0])Ee++;else if(Fe[Oe]===Re[1]&&(Ee--,Ee<0))return Oe;return-1}function O(Fe){Fe&&Fe.sanitize&&!Fe.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:s,edit:E,cleanUrl:L,resolveUrl:T,noopTest:F,merge:P,splitCells:A,rtrim:z,findClosingBracket:K,checkSanitizeDeprecation:O},U=C.defaults,D=B.rtrim,W=B.splitCells,Q=B.escape,re=B.findClosingBracket;function ee(Fe,Re,Me){var Ee=Re.href,Oe=Re.title?Q(Re.title):null,ke=Fe[1].replace(/\\([\[\]])/g,"$1");return Fe[0].charAt(0)!=="!"?{type:"link",raw:Me,href:Ee,title:Oe,text:ke}:{type:"image",raw:Me,href:Ee,title:Oe,text:Q(ke)}}function ye(Fe,Re){var Me=Fe.match(/^(\s+)(?:```)/);if(Me===null)return Re;var Ee=Me[1];return Re.split(`
`).map(function(Oe){var ke=Oe.match(/^\s+/);if(ke===null)return Oe;var Ne=ke[0];return Ne.length>=Ee.length?Oe.slice(Ee.length):Oe}).join(`
`)}var be=function(){function Fe(Me){this.options=Me||U}var Re=Fe.prototype;return Re.space=function(Ee){var Oe=this.rules.block.newline.exec(Ee);if(Oe)return Oe[0].length>1?{type:"space",raw:Oe[0]}:{raw:`
`}},Re.code=function(Ee,Oe){var ke=this.rules.block.code.exec(Ee);if(ke){var Ne=Oe[Oe.length-1];if(Ne&&Ne.type==="paragraph")return{raw:ke[0],text:ke[0].trimRight()};var He=ke[0].replace(/^ {4}/gm,"");return{type:"code",raw:ke[0],codeBlockStyle:"indented",text:this.options.pedantic?He:D(He,`
`)}}},Re.fences=function(Ee){var Oe=this.rules.block.fences.exec(Ee);if(Oe){var ke=Oe[0],Ne=ye(ke,Oe[3]||"");return{type:"code",raw:ke,lang:Oe[2]?Oe[2].trim():Oe[2],text:Ne}}},Re.heading=function(Ee){var Oe=this.rules.block.heading.exec(Ee);if(Oe)return{type:"heading",raw:Oe[0],depth:Oe[1].length,text:Oe[2]}},Re.nptable=function(Ee){var Oe=this.rules.block.nptable.exec(Ee);if(Oe){var ke={type:"table",header:W(Oe[1].replace(/^ *| *\| *$/g,"")),align:Oe[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Oe[3]?Oe[3].replace(/\n$/,"").split(`
`):[],raw:Oe[0]};if(ke.header.length===ke.align.length){var Ne=ke.align.length,He;for(He=0;He<Ne;He++)/^ *-+: *$/.test(ke.align[He])?ke.align[He]="right":/^ *:-+: *$/.test(ke.align[He])?ke.align[He]="center":/^ *:-+ *$/.test(ke.align[He])?ke.align[He]="left":ke.align[He]=null;for(Ne=ke.cells.length,He=0;He<Ne;He++)ke.cells[He]=W(ke.cells[He],ke.header.length);return ke}}},Re.hr=function(Ee){var Oe=this.rules.block.hr.exec(Ee);if(Oe)return{type:"hr",raw:Oe[0]}},Re.blockquote=function(Ee){var Oe=this.rules.block.blockquote.exec(Ee);if(Oe){var ke=Oe[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:Oe[0],text:ke}}},Re.list=function(Ee){var Oe=this.rules.block.list.exec(Ee);if(Oe){for(var ke=Oe[0],Ne=Oe[2],He=Ne.length>1,rt=Ne[Ne.length-1]===")",ct={type:"list",raw:ke,ordered:He,start:He?+Ne.slice(0,-1):"",loose:!1,items:[]},yt=Oe[0].match(this.rules.block.item),ht=!1,pt,Dt,At,bt,Xt,Gt,rr,sr=yt.length,Kt=0;Kt<sr;Kt++)pt=yt[Kt],ke=pt,Dt=pt.length,pt=pt.replace(/^ *([*+-]|\d+[.)]) */,""),~pt.indexOf(`
`)&&(Dt-=pt.length,pt=this.options.pedantic?pt.replace(/^ {1,4}/gm,""):pt.replace(new RegExp("^ {1,"+Dt+"}","gm"),"")),Kt!==sr-1&&(At=this.rules.block.bullet.exec(yt[Kt+1])[0],(He?At.length===1||!rt&&At[At.length-1]===")":At.length>1||this.options.smartLists&&At!==Ne)&&(bt=yt.slice(Kt+1).join(`
`),ct.raw=ct.raw.substring(0,ct.raw.length-bt.length),Kt=sr-1)),Xt=ht||/\n\n(?!\s*$)/.test(pt),Kt!==sr-1&&(ht=pt.charAt(pt.length-1)===`
`,Xt||(Xt=ht)),Xt&&(ct.loose=!0),Gt=/^\[[ xX]\] /.test(pt),rr=void 0,Gt&&(rr=pt[1]!==" ",pt=pt.replace(/^\[[ xX]\] +/,"")),ct.items.push({type:"list_item",raw:ke,task:Gt,checked:rr,loose:Xt,text:pt});return ct}},Re.html=function(Ee){var Oe=this.rules.block.html.exec(Ee);if(Oe)return{type:this.options.sanitize?"paragraph":"html",raw:Oe[0],pre:!this.options.sanitizer&&(Oe[1]==="pre"||Oe[1]==="script"||Oe[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Oe[0]):Q(Oe[0]):Oe[0]}},Re.def=function(Ee){var Oe=this.rules.block.def.exec(Ee);if(Oe){Oe[3]&&(Oe[3]=Oe[3].substring(1,Oe[3].length-1));var ke=Oe[1].toLowerCase().replace(/\s+/g," ");return{tag:ke,raw:Oe[0],href:Oe[2],title:Oe[3]}}},Re.table=function(Ee){var Oe=this.rules.block.table.exec(Ee);if(Oe){var ke={type:"table",header:W(Oe[1].replace(/^ *| *\| *$/g,"")),align:Oe[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Oe[3]?Oe[3].replace(/\n$/,"").split(`
`):[]};if(ke.header.length===ke.align.length){ke.raw=Oe[0];var Ne=ke.align.length,He;for(He=0;He<Ne;He++)/^ *-+: *$/.test(ke.align[He])?ke.align[He]="right":/^ *:-+: *$/.test(ke.align[He])?ke.align[He]="center":/^ *:-+ *$/.test(ke.align[He])?ke.align[He]="left":ke.align[He]=null;for(Ne=ke.cells.length,He=0;He<Ne;He++)ke.cells[He]=W(ke.cells[He].replace(/^ *\| *| *\| *$/g,""),ke.header.length);return ke}}},Re.lheading=function(Ee){var Oe=this.rules.block.lheading.exec(Ee);if(Oe)return{type:"heading",raw:Oe[0],depth:Oe[2].charAt(0)==="="?1:2,text:Oe[1]}},Re.paragraph=function(Ee){var Oe=this.rules.block.paragraph.exec(Ee);if(Oe)return{type:"paragraph",raw:Oe[0],text:Oe[1].charAt(Oe[1].length-1)===`
`?Oe[1].slice(0,-1):Oe[1]}},Re.text=function(Ee,Oe){var ke=this.rules.block.text.exec(Ee);if(ke){var Ne=Oe[Oe.length-1];return Ne&&Ne.type==="text"?{raw:ke[0],text:ke[0]}:{type:"text",raw:ke[0],text:ke[0]}}},Re.escape=function(Ee){var Oe=this.rules.inline.escape.exec(Ee);if(Oe)return{type:"escape",raw:Oe[0],text:Q(Oe[1])}},Re.tag=function(Ee,Oe,ke){var Ne=this.rules.inline.tag.exec(Ee);if(Ne)return!Oe&&/^<a /i.test(Ne[0])?Oe=!0:Oe&&/^<\/a>/i.test(Ne[0])&&(Oe=!1),!ke&&/^<(pre|code|kbd|script)(\s|>)/i.test(Ne[0])?ke=!0:ke&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Ne[0])&&(ke=!1),{type:this.options.sanitize?"text":"html",raw:Ne[0],inLink:Oe,inRawBlock:ke,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ne[0]):Q(Ne[0]):Ne[0]}},Re.link=function(Ee){var Oe=this.rules.inline.link.exec(Ee);if(Oe){var ke=re(Oe[2],"()");if(ke>-1){var Ne=Oe[0].indexOf("!")===0?5:4,He=Ne+Oe[1].length+ke;Oe[2]=Oe[2].substring(0,ke),Oe[0]=Oe[0].substring(0,He).trim(),Oe[3]=""}var rt=Oe[2],ct="";if(this.options.pedantic){var yt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(rt);yt?(rt=yt[1],ct=yt[3]):ct=""}else ct=Oe[3]?Oe[3].slice(1,-1):"";rt=rt.trim().replace(/^<([\s\S]*)>$/,"$1");var ht=ee(Oe,{href:rt&&rt.replace(this.rules.inline._escapes,"$1"),title:ct&&ct.replace(this.rules.inline._escapes,"$1")},Oe[0]);return ht}},Re.reflink=function(Ee,Oe){var ke;if((ke=this.rules.inline.reflink.exec(Ee))||(ke=this.rules.inline.nolink.exec(Ee))){var Ne=(ke[2]||ke[1]).replace(/\s+/g," ");if(Ne=Oe[Ne.toLowerCase()],!Ne||!Ne.href){var He=ke[0].charAt(0);return{type:"text",raw:He,text:He}}var rt=ee(ke,Ne,ke[0]);return rt}},Re.strong=function(Ee,Oe,ke){ke===void 0&&(ke="");var Ne=this.rules.inline.strong.start.exec(Ee);if(Ne&&(!Ne[1]||Ne[1]&&(ke===""||this.rules.inline.punctuation.exec(ke)))){Oe=Oe.slice(-1*Ee.length);var He=Ne[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;He.lastIndex=0;for(var rt;(Ne=He.exec(Oe))!=null;)if(rt=this.rules.inline.strong.middle.exec(Oe.slice(0,Ne.index+3)),rt)return{type:"strong",raw:Ee.slice(0,rt[0].length),text:Ee.slice(2,rt[0].length-2)}}},Re.em=function(Ee,Oe,ke){ke===void 0&&(ke="");var Ne=this.rules.inline.em.start.exec(Ee);if(Ne&&(!Ne[1]||Ne[1]&&(ke===""||this.rules.inline.punctuation.exec(ke)))){Oe=Oe.slice(-1*Ee.length);var He=Ne[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;He.lastIndex=0;for(var rt;(Ne=He.exec(Oe))!=null;)if(rt=this.rules.inline.em.middle.exec(Oe.slice(0,Ne.index+2)),rt)return{type:"em",raw:Ee.slice(0,rt[0].length),text:Ee.slice(1,rt[0].length-1)}}},Re.codespan=function(Ee){var Oe=this.rules.inline.code.exec(Ee);if(Oe){var ke=Oe[2].replace(/\n/g," "),Ne=/[^ ]/.test(ke),He=ke.startsWith(" ")&&ke.endsWith(" ");return Ne&&He&&(ke=ke.substring(1,ke.length-1)),ke=Q(ke,!0),{type:"codespan",raw:Oe[0],text:ke}}},Re.br=function(Ee){var Oe=this.rules.inline.br.exec(Ee);if(Oe)return{type:"br",raw:Oe[0]}},Re.del=function(Ee){var Oe=this.rules.inline.del.exec(Ee);if(Oe)return{type:"del",raw:Oe[0],text:Oe[1]}},Re.autolink=function(Ee,Oe){var ke=this.rules.inline.autolink.exec(Ee);if(ke){var Ne,He;return ke[2]==="@"?(Ne=Q(this.options.mangle?Oe(ke[1]):ke[1]),He="mailto:"+Ne):(Ne=Q(ke[1]),He=Ne),{type:"link",raw:ke[0],text:Ne,href:He,tokens:[{type:"text",raw:Ne,text:Ne}]}}},Re.url=function(Ee,Oe){var ke;if(ke=this.rules.inline.url.exec(Ee)){var Ne,He;if(ke[2]==="@")Ne=Q(this.options.mangle?Oe(ke[0]):ke[0]),He="mailto:"+Ne;else{var rt;do rt=ke[0],ke[0]=this.rules.inline._backpedal.exec(ke[0])[0];while(rt!==ke[0]);Ne=Q(ke[0]),ke[1]==="www."?He="http://"+Ne:He=Ne}return{type:"link",raw:ke[0],text:Ne,href:He,tokens:[{type:"text",raw:Ne,text:Ne}]}}},Re.inlineText=function(Ee,Oe,ke){var Ne=this.rules.inline.text.exec(Ee);if(Ne){var He;return Oe?He=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ne[0]):Q(Ne[0]):Ne[0]:He=Q(this.options.smartypants?ke(Ne[0]):Ne[0]),{type:"text",raw:Ne[0],text:He}}},Fe}(),he=B.noopTest,Ie=B.edit,Se=B.merge,fe={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:he,table:he,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};fe._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,fe._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,fe.def=Ie(fe.def).replace("label",fe._label).replace("title",fe._title).getRegex(),fe.bullet=/(?:[*+-]|\d{1,9}[.)])/,fe.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,fe.item=Ie(fe.item,"gm").replace(/bull/g,fe.bullet).getRegex(),fe.list=Ie(fe.list).replace(/bull/g,fe.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+fe.def.source+")").getRegex(),fe._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",fe._comment=/<!--(?!-?>)[\s\S]*?-->/,fe.html=Ie(fe.html,"i").replace("comment",fe._comment).replace("tag",fe._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),fe.paragraph=Ie(fe._paragraph).replace("hr",fe.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",fe._tag).getRegex(),fe.blockquote=Ie(fe.blockquote).replace("paragraph",fe.paragraph).getRegex(),fe.normal=Se({},fe),fe.gfm=Se({},fe.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*|$)"}),fe.gfm.nptable=Ie(fe.gfm.nptable).replace("hr",fe.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",fe._tag).getRegex(),fe.gfm.table=Ie(fe.gfm.table).replace("hr",fe.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",fe._tag).getRegex(),fe.pedantic=Se({},fe.normal,{html:Ie(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",fe._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:he,paragraph:Ie(fe.normal._paragraph).replace("hr",fe.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",fe.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ue={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:he,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:he,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};ue._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",ue.punctuation=Ie(ue.punctuation).replace(/punctuation/g,ue._punctuation).getRegex(),ue._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ue._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ue.em.start=Ie(ue.em.start).replace(/punctuation/g,ue._punctuation).getRegex(),ue.em.middle=Ie(ue.em.middle).replace(/punctuation/g,ue._punctuation).replace(/overlapSkip/g,ue._overlapSkip).getRegex(),ue.em.endAst=Ie(ue.em.endAst,"g").replace(/punctuation/g,ue._punctuation).getRegex(),ue.em.endUnd=Ie(ue.em.endUnd,"g").replace(/punctuation/g,ue._punctuation).getRegex(),ue.strong.start=Ie(ue.strong.start).replace(/punctuation/g,ue._punctuation).getRegex(),ue.strong.middle=Ie(ue.strong.middle).replace(/punctuation/g,ue._punctuation).replace(/blockSkip/g,ue._blockSkip).getRegex(),ue.strong.endAst=Ie(ue.strong.endAst,"g").replace(/punctuation/g,ue._punctuation).getRegex(),ue.strong.endUnd=Ie(ue.strong.endUnd,"g").replace(/punctuation/g,ue._punctuation).getRegex(),ue.blockSkip=Ie(ue._blockSkip,"g").getRegex(),ue.overlapSkip=Ie(ue._overlapSkip,"g").getRegex(),ue._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ue._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ue._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])?)+(?![-_])/,ue.autolink=Ie(ue.autolink).replace("scheme",ue._scheme).replace("email",ue._email).getRegex(),ue._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ue.tag=Ie(ue.tag).replace("comment",fe._comment).replace("attribute",ue._attribute).getRegex(),ue._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ue._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ue._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ue.link=Ie(ue.link).replace("label",ue._label).replace("href",ue._href).replace("title",ue._title).getRegex(),ue.reflink=Ie(ue.reflink).replace("label",ue._label).getRegex(),ue.reflinkSearch=Ie(ue.reflinkSearch,"g").replace("reflink",ue.reflink).replace("nolink",ue.nolink).getRegex(),ue.normal=Se({},ue),ue.pedantic=Se({},ue.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:Ie(/^!?\[(label)\]\((.*?)\)/).replace("label",ue._label).getRegex(),reflink:Ie(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ue._label).getRegex()}),ue.gfm=Se({},ue.normal,{escape:Ie(ue.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),ue.gfm.url=Ie(ue.gfm.url,"i").replace("email",ue.gfm._extended_email).getRegex(),ue.breaks=Se({},ue.gfm,{br:Ie(ue.br).replace("{2,}","*").getRegex(),text:Ie(ue.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var ie={block:fe,inline:ue},Ce=C.defaults,ne=ie.block,ce=ie.inline;function Ae(Fe){return Fe.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 oe(Fe){var Re="",Me,Ee,Oe=Fe.length;for(Me=0;Me<Oe;Me++)Ee=Fe.charCodeAt(Me),Math.random()>.5&&(Ee="x"+Ee.toString(16)),Re+="&#"+Ee+";";return Re}var q=function(){function Fe(Me){this.tokens=[],this.tokens.links=Object.create(null),this.options=Me||Ce,this.options.tokenizer=this.options.tokenizer||new be,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var Ee={block:ne.normal,inline:ce.normal};this.options.pedantic?(Ee.block=ne.pedantic,Ee.inline=ce.pedantic):this.options.gfm&&(Ee.block=ne.gfm,this.options.breaks?Ee.inline=ce.breaks:Ee.inline=ce.gfm),this.tokenizer.rules=Ee}Fe.lex=function(Ee,Oe){var ke=new Fe(Oe);return ke.lex(Ee)};var Re=Fe.prototype;return Re.lex=function(Ee){return Ee=Ee.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(Ee,this.tokens,!0),this.inline(this.tokens),this.tokens},Re.blockTokens=function(Ee,Oe,ke){Oe===void 0&&(Oe=[]),ke===void 0&&(ke=!0),Ee=Ee.replace(/^ +$/gm,"");for(var Ne,He,rt,ct;Ee;){if(Ne=this.tokenizer.space(Ee)){Ee=Ee.substring(Ne.raw.length),Ne.type&&Oe.push(Ne);continue}if(Ne=this.tokenizer.code(Ee,Oe)){Ee=Ee.substring(Ne.raw.length),Ne.type?Oe.push(Ne):(ct=Oe[Oe.length-1],ct.raw+=`
`+Ne.raw,ct.text+=`
`+Ne.text);continue}if(Ne=this.tokenizer.fences(Ee)){Ee=Ee.substring(Ne.raw.length),Oe.push(Ne);continue}if(Ne=this.tokenizer.heading(Ee)){Ee=Ee.substring(Ne.raw.length),Oe.push(Ne);continue}if(Ne=this.tokenizer.nptable(Ee)){Ee=Ee.substring(Ne.raw.length),Oe.push(Ne);continue}if(Ne=this.tokenizer.hr(Ee)){Ee=Ee.substring(Ne.raw.length),Oe.push(Ne);continue}if(Ne=this.tokenizer.blockquote(Ee)){Ee=Ee.substring(Ne.raw.length),Ne.tokens=this.blockTokens(Ne.text,[],ke),Oe.push(Ne);continue}if(Ne=this.tokenizer.list(Ee)){for(Ee=Ee.substring(Ne.raw.length),rt=Ne.items.length,He=0;He<rt;He++)Ne.items[He].tokens=this.blockTokens(Ne.items[He].text,[],!1);Oe.push(Ne);continue}if(Ne=this.tokenizer.html(Ee)){Ee=Ee.substring(Ne.raw.length),Oe.push(Ne);continue}if(ke&&(Ne=this.tokenizer.def(Ee))){Ee=Ee.substring(Ne.raw.length),this.tokens.links[Ne.tag]||(this.tokens.links[Ne.tag]={href:Ne.href,title:Ne.title});continue}if(Ne=this.tokenizer.table(Ee)){Ee=Ee.substring(Ne.raw.length),Oe.push(Ne);continue}if(Ne=this.tokenizer.lheading(Ee)){Ee=Ee.substring(Ne.raw.length),Oe.push(Ne);continue}if(ke&&(Ne=this.tokenizer.paragraph(Ee))){Ee=Ee.substring(Ne.raw.length),Oe.push(Ne);continue}if(Ne=this.tokenizer.text(Ee,Oe)){Ee=Ee.substring(Ne.raw.length),Ne.type?Oe.push(Ne):(ct=Oe[Oe.length-1],ct.raw+=`
`+Ne.raw,ct.text+=`
`+Ne.text);continue}if(Ee){var yt="Infinite loop on byte: "+Ee.charCodeAt(0);if(this.options.silent){console.error(yt);break}else throw new Error(yt)}}return Oe},Re.inline=function(Ee){var Oe,ke,Ne,He,rt,ct,yt=Ee.length;for(Oe=0;Oe<yt;Oe++){ct=Ee[Oe];switch(ct.type){case"paragraph":case"text":case"heading":{ct.tokens=[],this.inlineTokens(ct.text,ct.tokens);break}case"table":{for(ct.tokens={header:[],cells:[]},He=ct.header.length,ke=0;ke<He;ke++)ct.tokens.header[ke]=[],this.inlineTokens(ct.header[ke],ct.tokens.header[ke]);for(He=ct.cells.length,ke=0;ke<He;ke++)for(rt=ct.cells[ke],ct.tokens.cells[ke]=[],Ne=0;Ne<rt.length;Ne++)ct.tokens.cells[ke][Ne]=[],this.inlineTokens(rt[Ne],ct.tokens.cells[ke][Ne]);break}case"blockquote":{this.inline(ct.tokens);break}case"list":{for(He=ct.items.length,ke=0;ke<He;ke++)this.inline(ct.items[ke].tokens);break}}}return Ee},Re.inlineTokens=function(Ee,Oe,ke,Ne,He){Oe===void 0&&(Oe=[]),ke===void 0&&(ke=!1),Ne===void 0&&(Ne=!1),He===void 0&&(He="");var rt,ct=Ee,yt;if(this.tokens.links){var ht=Object.keys(this.tokens.links);if(ht.length>0)for(;(yt=this.tokenizer.rules.inline.reflinkSearch.exec(ct))!=null;)ht.includes(yt[0].slice(yt[0].lastIndexOf("[")+1,-1))&&(ct=ct.slice(0,yt.index)+"["+"a".repeat(yt[0].length-2)+"]"+ct.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(yt=this.tokenizer.rules.inline.blockSkip.exec(ct))!=null;)ct=ct.slice(0,yt.index)+"["+"a".repeat(yt[0].length-2)+"]"+ct.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;Ee;){if(rt=this.tokenizer.escape(Ee)){Ee=Ee.substring(rt.raw.length),Oe.push(rt);continue}if(rt=this.tokenizer.tag(Ee,ke,Ne)){Ee=Ee.substring(rt.raw.length),ke=rt.inLink,Ne=rt.inRawBlock,Oe.push(rt);continue}if(rt=this.tokenizer.link(Ee)){Ee=Ee.substring(rt.raw.length),rt.type==="link"&&(rt.tokens=this.inlineTokens(rt.text,[],!0,Ne)),Oe.push(rt);continue}if(rt=this.tokenizer.reflink(Ee,this.tokens.links)){Ee=Ee.substring(rt.raw.length),rt.type==="link"&&(rt.tokens=this.inlineTokens(rt.text,[],!0,Ne)),Oe.push(rt);continue}if(rt=this.tokenizer.strong(Ee,ct,He)){Ee=Ee.substring(rt.raw.length),rt.tokens=this.inlineTokens(rt.text,[],ke,Ne),Oe.push(rt);continue}if(rt=this.tokenizer.em(Ee,ct,He)){Ee=Ee.substring(rt.raw.length),rt.tokens=this.inlineTokens(rt.text,[],ke,Ne),Oe.push(rt);continue}if(rt=this.tokenizer.codespan(Ee)){Ee=Ee.substring(rt.raw.length),Oe.push(rt);continue}if(rt=this.tokenizer.br(Ee)){Ee=Ee.substring(rt.raw.length),Oe.push(rt);continue}if(rt=this.tokenizer.del(Ee)){Ee=Ee.substring(rt.raw.length),rt.tokens=this.inlineTokens(rt.text,[],ke,Ne),Oe.push(rt);continue}if(rt=this.tokenizer.autolink(Ee,oe)){Ee=Ee.substring(rt.raw.length),Oe.push(rt);continue}if(!ke&&(rt=this.tokenizer.url(Ee,oe))){Ee=Ee.substring(rt.raw.length),Oe.push(rt);continue}if(rt=this.tokenizer.inlineText(Ee,Ne,Ae)){Ee=Ee.substring(rt.raw.length),He=rt.raw.slice(-1),Oe.push(rt);continue}if(Ee){var pt="Infinite loop on byte: "+Ee.charCodeAt(0);if(this.options.silent){console.error(pt);break}else throw new Error(pt)}}return Oe},g(Fe,null,[{key:"rules",get:function(){return{block:ne,inline:ce}}}]),Fe}(),$=C.defaults,X=B.cleanUrl,de=B.escape,pe=function(){function Fe(Me){this.options=Me||$}var Re=Fe.prototype;return Re.code=function(Ee,Oe,ke){var Ne=(Oe||"").match(/\S*/)[0];if(this.options.highlight){var He=this.options.highlight(Ee,Ne);He!=null&&He!==Ee&&(ke=!0,Ee=He)}return Ne?'<pre><code class="'+this.options.langPrefix+de(Ne,!0)+'">'+(ke?Ee:de(Ee,!0))+`</code></pre>
`:"<pre><code>"+(ke?Ee:de(Ee,!0))+`</code></pre>
`},Re.blockquote=function(Ee){return`<blockquote>
`+Ee+`</blockquote>
`},Re.html=function(Ee){return Ee},Re.heading=function(Ee,Oe,ke,Ne){return this.options.headerIds?"<h"+Oe+' id="'+this.options.headerPrefix+Ne.slug(ke)+'">'+Ee+"</h"+Oe+`>
`:"<h"+Oe+">"+Ee+"</h"+Oe+`>
`},Re.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},Re.list=function(Ee,Oe,ke){var Ne=Oe?"ol":"ul",He=Oe&&ke!==1?' start="'+ke+'"':"";return"<"+Ne+He+`>
`+Ee+"</"+Ne+`>
`},Re.listitem=function(Ee){return"<li>"+Ee+`</li>
`},Re.checkbox=function(Ee){return"<input "+(Ee?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Re.paragraph=function(Ee){return"<p>"+Ee+`</p>
`},Re.table=function(Ee,Oe){return Oe&&(Oe="<tbody>"+Oe+"</tbody>"),`<table>
<thead>
`+Ee+`</thead>
`+Oe+`</table>
`},Re.tablerow=function(Ee){return`<tr>
`+Ee+`</tr>
`},Re.tablecell=function(Ee,Oe){var ke=Oe.header?"th":"td",Ne=Oe.align?"<"+ke+' align="'+Oe.align+'">':"<"+ke+">";return Ne+Ee+"</"+ke+`>
`},Re.strong=function(Ee){return"<strong>"+Ee+"</strong>"},Re.em=function(Ee){return"<em>"+Ee+"</em>"},Re.codespan=function(Ee){return"<code>"+Ee+"</code>"},Re.br=function(){return this.options.xhtml?"<br/>":"<br>"},Re.del=function(Ee){return"<del>"+Ee+"</del>"},Re.link=function(Ee,Oe,ke){if(Ee=X(this.options.sanitize,this.options.baseUrl,Ee),Ee===null)return ke;var Ne='<a href="'+de(Ee)+'"';return Oe&&(Ne+=' title="'+Oe+'"'),Ne+=">"+ke+"</a>",Ne},Re.image=function(Ee,Oe,ke){if(Ee=X(this.options.sanitize,this.options.baseUrl,Ee),Ee===null)return ke;var Ne='<img src="'+Ee+'" alt="'+ke+'"';return Oe&&(Ne+=' title="'+Oe+'"'),Ne+=this.options.xhtml?"/>":">",Ne},Re.text=function(Ee){return Ee},Fe}(),xe=function(){function Fe(){}var Re=Fe.prototype;return Re.strong=function(Ee){return Ee},Re.em=function(Ee){return Ee},Re.codespan=function(Ee){return Ee},Re.del=function(Ee){return Ee},Re.html=function(Ee){return Ee},Re.text=function(Ee){return Ee},Re.link=function(Ee,Oe,ke){return""+ke},Re.image=function(Ee,Oe,ke){return""+ke},Re.br=function(){return""},Fe}(),Ke=function(){function Fe(){this.seen={}}var Re=Fe.prototype;return Re.slug=function(Ee){var Oe=Ee.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Oe)){var ke=Oe;do this.seen[ke]++,Oe=ke+"-"+this.seen[ke];while(this.seen.hasOwnProperty(Oe))}return this.seen[Oe]=0,Oe},Fe}(),qe=C.defaults,tt=B.unescape,et=function(){function Fe(Me){this.options=Me||qe,this.options.renderer=this.options.renderer||new pe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new xe,this.slugger=new Ke}Fe.parse=function(Ee,Oe){var ke=new Fe(Oe);return ke.parse(Ee)};var Re=Fe.prototype;return Re.parse=function(Ee,Oe){Oe===void 0&&(Oe=!0);var ke="",Ne,He,rt,ct,yt,ht,pt,Dt,At,bt,Xt,Gt,rr,sr,Kt,kt,ir,_t,Mt=Ee.length;for(Ne=0;Ne<Mt;Ne++){bt=Ee[Ne];switch(bt.type){case"space":continue;case"hr":{ke+=this.renderer.hr();continue}case"heading":{ke+=this.renderer.heading(this.parseInline(bt.tokens),bt.depth,tt(this.parseInline(bt.tokens,this.textRenderer)),this.slugger);continue}case"code":{ke+=this.renderer.code(bt.text,bt.lang,bt.escaped);continue}case"table":{for(Dt="",pt="",ct=bt.header.length,He=0;He<ct;He++)pt+=this.renderer.tablecell(this.parseInline(bt.tokens.header[He]),{header:!0,align:bt.align[He]});for(Dt+=this.renderer.tablerow(pt),At="",ct=bt.cells.length,He=0;He<ct;He++){for(ht=bt.tokens.cells[He],pt="",yt=ht.length,rt=0;rt<yt;rt++)pt+=this.renderer.tablecell(this.parseInline(ht[rt]),{header:!1,align:bt.align[rt]});At+=this.renderer.tablerow(pt)}ke+=this.renderer.table(Dt,At);continue}case"blockquote":{At=this.parse(bt.tokens),ke+=this.renderer.blockquote(At);continue}case"list":{for(Xt=bt.ordered,Gt=bt.start,rr=bt.loose,ct=bt.items.length,At="",He=0;He<ct;He++)Kt=bt.items[He],kt=Kt.checked,ir=Kt.task,sr="",Kt.task&&(_t=this.renderer.checkbox(kt),rr?Kt.tokens.length>0&&Kt.tokens[0].type==="text"?(Kt.tokens[0].text=_t+" "+Kt.tokens[0].text,Kt.tokens[0].tokens&&Kt.tokens[0].tokens.length>0&&Kt.tokens[0].tokens[0].type==="text"&&(Kt.tokens[0].tokens[0].text=_t+" "+Kt.tokens[0].tokens[0].text)):Kt.tokens.unshift({type:"text",text:_t}):sr+=_t),sr+=this.parse(Kt.tokens,rr),At+=this.renderer.listitem(sr,ir,kt);ke+=this.renderer.list(At,Xt,Gt);continue}case"html":{ke+=this.renderer.html(bt.text);continue}case"paragraph":{ke+=this.renderer.paragraph(this.parseInline(bt.tokens));continue}case"text":{for(At=bt.tokens?this.parseInline(bt.tokens):bt.text;Ne+1<Mt&&Ee[Ne+1].type==="text";)bt=Ee[++Ne],At+=`
`+(bt.tokens?this.parseInline(bt.tokens):bt.text);ke+=Oe?this.renderer.paragraph(At):At;continue}default:{var Rt='Token with "'+bt.type+'" type was not found.';if(this.options.silent){console.error(Rt);return}else throw new Error(Rt)}}}return ke},Re.parseInline=function(Ee,Oe){Oe=Oe||this.renderer;var ke="",Ne,He,rt=Ee.length;for(Ne=0;Ne<rt;Ne++){He=Ee[Ne];switch(He.type){case"escape":{ke+=Oe.text(He.text);break}case"html":{ke+=Oe.html(He.text);break}case"link":{ke+=Oe.link(He.href,He.title,this.parseInline(He.tokens,Oe));break}case"image":{ke+=Oe.image(He.href,He.title,He.text);break}case"strong":{ke+=Oe.strong(this.parseInline(He.tokens,Oe));break}case"em":{ke+=Oe.em(this.parseInline(He.tokens,Oe));break}case"codespan":{ke+=Oe.codespan(He.text);break}case"br":{ke+=Oe.br();break}case"del":{ke+=Oe.del(this.parseInline(He.tokens,Oe));break}case"text":{ke+=Oe.text(He.text);break}default:{var ct='Token with "'+He.type+'" type was not found.';if(this.options.silent){console.error(ct);return}else throw new Error(ct)}}}return ke},Fe}(),it=B.merge,at=B.checkSanitizeDeprecation,je=B.escape,De=C.getDefaults,nt=C.changeDefaults,lt=C.defaults;function Ve(Fe,Re,Me){if(typeof Fe=="undefined"||Fe===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Fe!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Fe)+", string expected");if(typeof Re=="function"&&(Me=Re,Re=null),Re=it({},Ve.defaults,Re||{}),at(Re),Me){var Ee=Re.highlight,Oe;try{Oe=q.lex(Fe,Re)}catch(rt){return Me(rt)}var ke=function(ct){var yt;if(!ct)try{yt=et.parse(Oe,Re)}catch(ht){ct=ht}return Re.highlight=Ee,ct?Me(ct):Me(null,yt)};if(!Ee||Ee.length<3)return ke();if(delete Re.highlight,!Oe.length)return ke();var Ne=0;Ve.walkTokens(Oe,function(rt){rt.type==="code"&&(Ne++,setTimeout(function(){Ee(rt.text,rt.lang,function(ct,yt){if(ct)return ke(ct);yt!=null&&yt!==rt.text&&(rt.text=yt,rt.escaped=!0),Ne--,Ne===0&&ke()})},0))}),Ne===0&&ke();return}try{var He=q.lex(Fe,Re);return Re.walkTokens&&Ve.walkTokens(He,Re.walkTokens),et.parse(He,Re)}catch(rt){if(rt.message+=`
Please report this to https://github.com/markedjs/marked.`,Re.silent)return"<p>An error occurred:</p><pre>"+je(rt.message+"",!0)+"</pre>";throw rt}}Ve.options=Ve.setOptions=function(Fe){return it(Ve.defaults,Fe),nt(Ve.defaults),Ve},Ve.getDefaults=De,Ve.defaults=lt,Ve.use=function(Fe){var Re=it({},Fe);if(Fe.renderer&&function(){var Ee=Ve.defaults.renderer||new pe,Oe=function(He){var rt=Ee[He];Ee[He]=function(){for(var ct=arguments.length,yt=new Array(ct),ht=0;ht<ct;ht++)yt[ht]=arguments[ht];var pt=Fe.renderer[He].apply(Ee,yt);return pt===!1&&(pt=rt.apply(Ee,yt)),pt}};for(var ke in Fe.renderer)Oe(ke);Re.renderer=Ee}(),Fe.tokenizer&&function(){var Ee=Ve.defaults.tokenizer||new be,Oe=function(He){var rt=Ee[He];Ee[He]=function(){for(var ct=arguments.length,yt=new Array(ct),ht=0;ht<ct;ht++)yt[ht]=arguments[ht];var pt=Fe.tokenizer[He].apply(Ee,yt);return pt===!1&&(pt=rt.apply(Ee,yt)),pt}};for(var ke in Fe.tokenizer)Oe(ke);Re.tokenizer=Ee}(),Fe.walkTokens){var Me=Ve.defaults.walkTokens;Re.walkTokens=function(Ee){Fe.walkTokens(Ee),Me&&Me(Ee)}}Ve.setOptions(Re)},Ve.walkTokens=function(Fe,Re){for(var Me=y(Fe),Ee;!(Ee=Me()).done;){var Oe=Ee.value;Re(Oe);switch(Oe.type){case"table":{for(var ke=y(Oe.tokens.header),Ne;!(Ne=ke()).done;){var He=Ne.value;Ve.walkTokens(He,Re)}for(var rt=y(Oe.tokens.cells),ct;!(ct=rt()).done;)for(var yt=ct.value,ht=y(yt),pt;!(pt=ht()).done;){var Dt=pt.value;Ve.walkTokens(Dt,Re)}break}case"list":{Ve.walkTokens(Oe.items,Re);break}default:Oe.tokens&&Ve.walkTokens(Oe.tokens,Re)}}},Ve.Parser=et,Ve.parser=et.parse,Ve.Renderer=pe,Ve.TextRenderer=xe,Ve.Lexer=q,Ve.lexer=q.lex,Ve.Tokenizer=be,Ve.Slugger=Ke,Ve.parse=Ve;var Qe=Ve;return Qe})},"DlR+":function(H,J,I){var N=I("MFOe"),g=N.Global,S=N.trim;H.exports={name:"cookieStorage",read:y,write:C,each:m,remove:_,clearAll:e};var k=g.document;function y(r){if(!r||!f(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("="),o=unescape(n[0]),h=unescape(n[1]);r(h,o)}}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||!f(r))return;k.cookie=escape(r)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function e(){m(function(r,c){_(c)})}function f(r){return new RegExp("(?:^|;\\s*)"+escape(r).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(k.cookie)}},E4JC:function(H,J,I){(function(N,g,S){H.exports=J=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,y=g.algo,m=[],C=[],_=[],e=y.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],o=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++)f.call(this);for(var i=0;i<8;i++)o[i]^=n[i+4&7];if(c){var h=c.words,d=h[0],u=h[1],s=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360,l=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,E=s>>>16|l&4294901760,b=l<<16|s&65535;o[0]^=s,o[1]^=E,o[2]^=l,o[3]^=b,o[4]^=s,o[5]^=E,o[6]^=l,o[7]^=b;for(var i=0;i<4;i++)f.call(this)}},_doProcessBlock:function(r,c){var i=this._X;f.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 f(){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],o=n&65535,h=n>>>16,d=((o*o>>>17)+o*h>>>15)+h*h,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,J,I){(function(N){N(I("VrN/"))})(function(N){var g={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},S=N.Pos;N.defineOption("autoCloseBrackets",!1,function(o,h,d){d&&d!=N.Init&&(o.removeKeyMap(y),o.state.closeBrackets=null),h&&(m(k(h,"pairs")),o.state.closeBrackets=h,o.addKeyMap(y))});function k(o,h){return h=="pairs"&&typeof o=="string"?o:typeof o=="object"&&o[h]!=null?o[h]:g[h]}var y={Backspace:e,Enter:f};function m(o){for(var h=0;h<o.length;h++){var d=o.charAt(h),u="'"+d+"'";y[u]||(y[u]=C(d))}}m(g.pairs+"`");function C(o){return function(h){return c(h,o)}}function _(o){var h=o.state.closeBrackets;if(!h||h.override)return h;var d=o.getModeAt(o.getCursor());return d.closeBrackets||h}function e(o){var h=_(o);if(!h||o.getOption("disableInput"))return N.Pass;for(var d=k(h,"pairs"),u=o.listSelections(),s=0;s<u.length;s++){if(!u[s].empty())return N.Pass;var l=i(o,u[s].head);if(!l||d.indexOf(l)%2!=0)return N.Pass}for(var s=u.length-1;s>=0;s--){var E=u[s].head;o.replaceRange("",S(E.line,E.ch-1),S(E.line,E.ch+1),"+delete")}}function f(o){var h=_(o),d=h&&k(h,"explode");if(!d||o.getOption("disableInput"))return N.Pass;for(var u=o.listSelections(),s=0;s<u.length;s++){if(!u[s].empty())return N.Pass;var l=i(o,u[s].head);if(!l||d.indexOf(l)%2!=0)return N.Pass}o.operation(function(){var E=o.lineSeparator()||`
`;o.replaceSelection(E+E,null),o.execCommand("goCharLeft"),u=o.listSelections();for(var b=0;b<u.length;b++){var p=u[b].head.line;o.indentLine(p,null,!0),o.indentLine(p+1,null,!0)}})}function r(o){var h=N.cmpPos(o.anchor,o.head)>0;return{anchor:new S(o.anchor.line,o.anchor.ch+(h?-1:1)),head:new S(o.head.line,o.head.ch+(h?1:-1))}}function c(o,h){var d=_(o);if(!d||o.getOption("disableInput"))return N.Pass;var u=k(d,"pairs"),s=u.indexOf(h);if(s==-1)return N.Pass;for(var l=k(d,"closeBefore"),E=k(d,"triples"),b=u.charAt(s+1)==h,p=o.listSelections(),L=s%2==0,R,v=0;v<p.length;v++){var x=p[v],w=x.head,T,F=o.getRange(w,S(w.line,w.ch+1));if(L&&!x.empty())T="surround";else if((b||!L)&&F==h)b&&n(o,w)?T="both":E.indexOf(h)>=0&&o.getRange(w,S(w.line,w.ch+3))==h+h+h?T="skipThree":T="skip";else if(b&&w.ch>1&&E.indexOf(h)>=0&&o.getRange(S(w.line,w.ch-2),w)==h+h){if(w.ch>2&&/\bstring/.test(o.getTokenTypeAt(S(w.line,w.ch-2))))return N.Pass;T="addFour"}else if(b){var P=w.ch==0?" ":o.getRange(S(w.line,w.ch-1),w);if(!N.isWordChar(F)&&P!=h&&!N.isWordChar(P))T="both";else return N.Pass}else if(L&&(F.length===0||/\s/.test(F)||l.indexOf(F)>-1))T="both";else return N.Pass;if(!R)R=T;else if(R!=T)return N.Pass}var A=s%2?u.charAt(s-1):h,z=s%2?h:u.charAt(s+1);o.operation(function(){if(R=="skip")o.execCommand("goCharRight");else if(R=="skipThree")for(var K=0;K<3;K++)o.execCommand("goCharRight");else if(R=="surround"){for(var O=o.getSelections(),K=0;K<O.length;K++)O[K]=A+O[K]+z;o.replaceSelections(O,"around"),O=o.listSelections().slice();for(var K=0;K<O.length;K++)O[K]=r(O[K]);o.setSelections(O)}else R=="both"?(o.replaceSelection(A+z,null),o.triggerElectric(A+z),o.execCommand("goCharLeft")):R=="addFour"&&(o.replaceSelection(A+A+A+A,"before"),o.execCommand("goCharRight"))})}function i(o,h){var d=o.getRange(S(h.line,h.ch-1),S(h.line,h.ch+1));return d.length==2?d:null}function n(o,h){var d=o.getTokenAt(S(h.line,h.ch+1));return/\bstring/.test(d.type)&&d.start==h.ch&&(h.ch==0||!/\bstring/.test(o.getTokenTypeAt(h)))}})},ELcG:function(H,J,I){(function(N,g){H.exports=J=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,y=k.WordArray,m=k.Hasher,C=S.algo,_=y.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),e=y.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),f=y.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),r=y.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),c=y.create([0,1518500249,1859775393,2400959708,2840853838]),i=y.create([1352829926,1548603684,1836072691,2053994217,0]),n=C.RIPEMD160=m.extend({_doReset:function(){this._hash=y.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(E,b){for(var p=0;p<16;p++){var L=b+p,R=E[L];E[L]=(R<<8|R>>>24)&16711935|(R<<24|R>>>8)&4278255360}var v=this._hash.words,x=c.words,w=i.words,T=_.words,F=e.words,P=f.words,A=r.words,z,K,O,B,U,D,W,Q,re,ee;D=z=v[0],W=K=v[1],Q=O=v[2],re=B=v[3],ee=U=v[4];for(var ye,p=0;p<80;p+=1)ye=z+E[b+T[p]]|0,p<16?ye+=o(K,O,B)+x[0]:p<32?ye+=h(K,O,B)+x[1]:p<48?ye+=d(K,O,B)+x[2]:p<64?ye+=u(K,O,B)+x[3]:ye+=s(K,O,B)+x[4],ye=ye|0,ye=l(ye,P[p]),ye=ye+U|0,z=U,U=B,B=l(O,10),O=K,K=ye,ye=D+E[b+F[p]]|0,p<16?ye+=s(W,Q,re)+w[0]:p<32?ye+=u(W,Q,re)+w[1]:p<48?ye+=d(W,Q,re)+w[2]:p<64?ye+=h(W,Q,re)+w[3]:ye+=o(W,Q,re)+w[4],ye=ye|0,ye=l(ye,A[p]),ye=ye+ee|0,D=ee,ee=re,re=l(Q,10),Q=W,W=ye;ye=v[1]+O+re|0,v[1]=v[2]+B+ee|0,v[2]=v[3]+U+D|0,v[3]=v[4]+z+W|0,v[4]=v[0]+K+Q|0,v[0]=ye},_doFinalize:function(){var E=this._data,b=E.words,p=this._nDataBytes*8,L=E.sigBytes*8;b[L>>>5]|=128<<24-L%32,b[(L+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,v=R.words,x=0;x<5;x++){var w=v[x];v[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 o(E,b,p){return E^b^p}function h(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 s(E,b,p){return E^(b|~p)}function l(E,b){return E<<b|E>>>32-b}S.RIPEMD160=m._createHelper(n),S.HmacRIPEMD160=m._createHmacHelper(n)}(Math),N.RIPEMD160})},ETIr:function(H,J,I){(function(N,g){H.exports=J=g(I("Ib8C"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.WordArray,y=g.enc,m=y.Base64={stringify:function(_){var e=_.words,f=_.sigBytes,r=this._map;_.clamp();for(var c=[],i=0;i<f;i+=3)for(var n=e[i>>>2]>>>24-i%4*8&255,o=e[i+1>>>2]>>>24-(i+1)%4*8&255,h=e[i+2>>>2]>>>24-(i+2)%4*8&255,d=n<<16|o<<8|h,u=0;u<4&&i+u*.75<f;u++)c.push(r.charAt(d>>>6*(3-u)&63));var s=r.charAt(64);if(s)for(;c.length%4;)c.push(s);return c.join("")},parse:function(_){var e=_.length,f=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var c=0;c<f.length;c++)r[f.charCodeAt(c)]=c}var i=f.charAt(64);if(i){var n=_.indexOf(i);n!==-1&&(e=n)}return C(_,e,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function C(_,e,f){for(var r=[],c=0,i=0;i<e;i++)if(i%4){var n=f[_.charCodeAt(i-1)]<<i%4*2,o=f[_.charCodeAt(i)]>>>6-i%4*2,h=n|o;r[c>>>2]|=h<<24-c%4*8,c++}return k.create(r,c)}}(),N.enc.Base64})},"F+F2":function(H,J,I){(function(N,g){H.exports=J=g(I("Ib8C"))})(this,function(N){return function(){if(typeof ArrayBuffer!="function")return;var g=N,S=g.lib,k=S.WordArray,y=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=[],f=0;f<_;f++)e[f>>>2]|=C[f]<<24-f%4*8;y.call(this,e,_)}else y.apply(this,arguments)};m.prototype=k}(),N.lib.WordArray})},FWmy:function(H,J,I){"use strict";I.d(J,"a",function(){return N});function N(g,S){if(!g)throw new Error(S?`Assertion failed (${S})`:"Assertion Failed")}},GRuw:function(H,J,I){(function(N,g,S){H.exports=J=g(I("Ib8C"),I("lPiR"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.WordArray,y=g.algo,m=y.SHA256,C=y.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,J,I){"use strict";var N=I("q1tI"),g=I.n(N),S=I("TSYQ"),k=I.n(S);function y(B,U){var D="cannot "+B.method+" "+B.action+" "+U.status+"'",W=new Error(D);return W.status=U.status,W.method=B.method,W.url=B.action,W}function m(B){var U=B.responseText||B.response;if(!U)return U;try{return JSON.parse(U)}catch(D){return U}}function C(B){var U=new XMLHttpRequest;B.onProgress&&U.upload&&(U.upload.onprogress=function(re){re.total>0&&(re.percent=re.loaded/re.total*100),B.onProgress(re)});var D=new FormData;B.data&&Object.keys(B.data).forEach(function(Q){var re=B.data[Q];if(Array.isArray(re)){re.forEach(function(ee){D.append(Q+"[]",ee)});return}D.append(Q,B.data[Q])}),B.file instanceof Blob?D.append(B.filename,B.file,B.file.name):D.append(B.filename,B.file),U.onerror=function(re){B.onError(re)},U.onload=function(){return U.status<200||U.status>=300?B.onError(y(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 W=B.headers||{};return W["X-Requested-With"]!==null&&U.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(W).forEach(function(Q){W[Q]!==null&&U.setRequestHeader(Q,W[Q])}),U.send(D),{abort:function(){U.abort()}}}var _=+new Date,e=0;function f(){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 D=Array.isArray(U)?U:U.split(","),W=B.name||"",Q=B.type||"",re=Q.replace(/\/.*$/,"");return D.some(function(ee){var ye=ee.trim();return ye.charAt(0)==="."?r(W.toLowerCase(),ye.toLowerCase()):/\/\*$/.test(ye)?re===ye.replace(/\/.*$/,""):Q===ye})}return!0};function i(B,U){var D=B.createReader(),W=[];function Q(){D.readEntries(function(re){var ee=Array.prototype.slice.apply(re);W=W.concat(ee);var ye=!ee.length;ye?U(W):Q()})}Q()}var n=function(U,D,W){var Q=function re(ee,ye){ye=ye||"",ee.isFile?ee.file(function(be){W(be)&&(ee.fullPath&&!be.webkitRelativePath&&(Object.defineProperties(be,{webkitRelativePath:{writable:!0}}),be.webkitRelativePath=ee.fullPath.replace(/^\//,""),Object.defineProperties(be,{webkitRelativePath:{writable:!1}})),D([be]))}):ee.isDirectory&&i(ee,function(be){be.forEach(function(he){re(he,""+ye+ee.name+"/")})})};U.forEach(function(re){Q(re.webkitGetAsEntry())})},o=n,h=Object.assign||function(B){for(var U=1;U<arguments.length;U++){var D=arguments[U];for(var W in D)Object.prototype.hasOwnProperty.call(D,W)&&(B[W]=D[W])}return B},d=function(){function B(U,D){var W=[],Q=!0,re=!1,ee=void 0;try{for(var ye=U[Symbol.iterator](),be;!(Q=(be=ye.next()).done)&&!(W.push(be.value),D&&W.length===D);Q=!0);}catch(he){re=!0,ee=he}finally{try{!Q&&ye.return&&ye.return()}finally{if(re)throw ee}}return W}return function(U,D){if(Array.isArray(U))return U;if(Symbol.iterator in Object(U))return B(U,D);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function B(U,D){for(var W=0;W<D.length;W++){var Q=D[W];Q.enumerable=Q.enumerable||!1,Q.configurable=!0,"value"in Q&&(Q.writable=!0),Object.defineProperty(U,Q.key,Q)}}return function(U,D,W){return D&&B(U.prototype,D),W&&B(U,W),U}}();function s(B,U,D){return U in B?Object.defineProperty(B,U,{value:D,enumerable:!0,configurable:!0,writable:!0}):B[U]=D,B}function l(B,U){var D={};for(var W in B){if(U.indexOf(W)>=0)continue;if(!Object.prototype.hasOwnProperty.call(B,W))continue;D[W]=B[W]}return D}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 L=function(U){return Object.keys(U).reduce(function(D,W){return(W.substr(0,5)==="data-"||W.substr(0,5)==="aria-"||W==="role")&&(D[W]=U[W]),D},{})},R=function(B){p(U,B);function U(){var D,W,Q,re;E(this,U);for(var ee=arguments.length,ye=Array(ee),be=0;be<ee;be++)ye[be]=arguments[be];return re=(W=(Q=b(this,(D=U.__proto__||Object.getPrototypeOf(U)).call.apply(D,[this].concat(ye))),Q),Q.state={uid:f()},Q.reqs={},Q.onChange=function(he){var Ie=he.target.files;Q.uploadFiles(Ie),Q.reset()},Q.onClick=function(he){var Ie=Q.fileInput;if(!Ie)return;var Se=Q.props,fe=Se.children,ue=Se.onClick;fe&&fe.type==="button"&&(Ie.parentNode.focus(),Ie.parentNode.querySelector("button").blur()),Ie.click(),ue&&ue(he)},Q.onKeyDown=function(he){he.key==="Enter"&&Q.onClick()},Q.onFileDrop=function(he){var Ie=Q.props.multiple;if(he.preventDefault(),he.type==="dragover")return;if(Q.props.directory)o(Array.prototype.slice.call(he.dataTransfer.items),Q.uploadFiles,function(fe){return c(fe,Q.props.accept)});else{var Se=Array.prototype.slice.call(he.dataTransfer.files).filter(function(fe){return c(fe,Q.props.accept)});Ie===!1&&(Se=Se.slice(0,1)),Q.uploadFiles(Se)}},Q.uploadFiles=function(he){var Ie=Array.prototype.slice.call(he);Ie.map(function(Se){return Se.uid=f(),Se}).forEach(function(Se){Q.upload(Se,Ie)})},Q.saveFileInput=function(he){Q.fileInput=he},W),b(Q,re)}return u(U,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(W,Q){var re=this,ee=this.props;if(!ee.beforeUpload)return setTimeout(function(){return re.post(W)},0);var ye=ee.beforeUpload(W,Q);ye&&ye.then?ye.then(function(be){var he=Object.prototype.toString.call(be);return he==="[object File]"||he==="[object Blob]"?re.post(be):re.post(W)}).catch(function(be){console.log(be)}):ye!==!1&&setTimeout(function(){return re.post(W)},0);return}},{key:"post",value:function(W){var Q=this;if(!this._isMounted)return;var re=this.props,ee=re.onStart,ye=re.onProgress,be=re.transformFile,he=be===void 0?function(Ie){return Ie}:be;new Promise(function(Ie){var Se=re.action;return typeof Se=="function"&&(Se=Se(W)),Ie(Se)}).then(function(Ie){var Se=W.uid,fe=re.customRequest||C,ue=Promise.resolve(he(W)).then(function(ie){var Ce=re.data;return typeof Ce=="function"&&(Ce=Ce(ie)),Promise.all([ie,Ce])}).catch(function(ie){console.error(ie)});ue.then(function(ie){var Ce=d(ie,2),ne=Ce[0],ce=Ce[1],Ae={action:Ie,filename:re.name,data:ce,file:ne,headers:re.headers,withCredentials:re.withCredentials,method:re.method||"post",onProgress:ye?function(oe){ye(oe,W)}:null,onSuccess:function(q,$){delete Q.reqs[Se],re.onSuccess(q,W,$)},onError:function(q,$){delete Q.reqs[Se],re.onError(q,$,W)}};ee(W),Q.reqs[Se]=fe(Ae)})})}},{key:"reset",value:function(){this.setState({uid:f()})}},{key:"abort",value:function(W){var Q=this.reqs;if(W){var re=W;W&&W.uid&&(re=W.uid),Q[re]&&Q[re].abort&&Q[re].abort(),delete Q[re]}else Object.keys(Q).forEach(function(ee){Q[ee]&&Q[ee].abort&&Q[ee].abort(),delete Q[ee]})}},{key:"render",value:function(){var W,Q=this.props,re=Q.component,ee=Q.prefixCls,ye=Q.className,be=Q.disabled,he=Q.id,Ie=Q.style,Se=Q.multiple,fe=Q.accept,ue=Q.children,ie=Q.directory,Ce=Q.openFileDialogOnClick,ne=Q.onMouseEnter,ce=Q.onMouseLeave,Ae=l(Q,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),oe=k()((W={},s(W,ee,!0),s(W,ee+"-disabled",be),s(W,ye,ye),W)),q=be?{}:{onClick:Ce?this.onClick:function(){},onKeyDown:Ce?this.onKeyDown:function(){},onMouseEnter:ne,onMouseLeave:ce,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return g.a.createElement(re,h({},q,{className:oe,role:"button",style:Ie}),g.a.createElement("input",h({},L(Ae),{id:he,type:"file",ref:this.saveFileInput,onClick:function(X){return X.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:fe,directory:ie?"directory":null,webkitdirectory:ie?"webkitdirectory":null,multiple:Se,onChange:this.onChange})),ue)}}]),U}(N.Component),v=R,x=Object.assign||function(B){for(var U=1;U<arguments.length;U++){var D=arguments[U];for(var W in D)Object.prototype.hasOwnProperty.call(D,W)&&(B[W]=D[W])}return B},w=function(){function B(U,D){for(var W=0;W<D.length;W++){var Q=D[W];Q.enumerable=Q.enumerable||!1,Q.configurable=!0,"value"in Q&&(Q.writable=!0),Object.defineProperty(U,Q.key,Q)}}return function(U,D,W){return D&&B(U.prototype,D),W&&B(U,W),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 z=function(B){P(U,B);function U(){var D,W,Q,re;T(this,U);for(var ee=arguments.length,ye=Array(ee),be=0;be<ee;be++)ye[be]=arguments[be];return re=(W=(Q=F(this,(D=U.__proto__||Object.getPrototypeOf(U)).call.apply(D,[this].concat(ye))),Q),Q.saveUploader=function(he){Q.uploader=he},W),F(Q,re)}return w(U,[{key:"abort",value:function(W){this.uploader.abort(W)}},{key:"render",value:function(){return g.a.createElement(v,x({},this.props,{ref:this.saveUploader}))}}]),U}(N.Component);z.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:A,onError:A,onSuccess:A,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var K=z,O=J.a=K},HmJG:function(H,J,I){},IBYe:function(H,J,I){"use strict";function N(g){return null}J.a=N},Ib8C:function(H,J,I){(function(N){(function(g,S){H.exports=J=S()})(this,function(){var g=g||function(S,k){var y;if(typeof window!="undefined"&&window.crypto&&(y=window.crypto),typeof self!="undefined"&&self.crypto&&(y=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(y=globalThis.crypto),!y&&typeof window!="undefined"&&window.msCrypto&&(y=window.msCrypto),!y&&typeof N!="undefined"&&N.crypto&&(y=N.crypto),!y&&!0)try{y=I(4)}catch(s){}var m=function(){if(y){if(typeof y.getRandomValues=="function")try{return y.getRandomValues(new Uint32Array(1))[0]}catch(s){}if(typeof y.randomBytes=="function")try{return y.randomBytes(4).readInt32LE()}catch(s){}}throw new Error("Native crypto module could not be used to get secure random number.")},C=Object.create||function(){function s(){}return function(l){var E;return s.prototype=l,E=new s,s.prototype=null,E}}(),_={},e=_.lib={},f=e.Base=function(){return{extend:function(s){var l=C(this);return s&&l.mixIn(s),(!l.hasOwnProperty("init")||this.init===l.init)&&(l.init=function(){l.$super.init.apply(this,arguments)}),l.init.prototype=l,l.$super=this,l},create:function(){var s=this.extend();return s.init.apply(s,arguments),s},init:function(){},mixIn:function(s){for(var l in s)s.hasOwnProperty(l)&&(this[l]=s[l]);s.hasOwnProperty("toString")&&(this.toString=s.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),r=e.WordArray=f.extend({init:function(s,l){s=this.words=s||[],l!=k?this.sigBytes=l:this.sigBytes=s.length*4},toString:function(s){return(s||i).stringify(this)},concat:function(s){var l=this.words,E=s.words,b=this.sigBytes,p=s.sigBytes;if(this.clamp(),b%4)for(var L=0;L<p;L++){var R=E[L>>>2]>>>24-L%4*8&255;l[b+L>>>2]|=R<<24-(b+L)%4*8}else for(var v=0;v<p;v+=4)l[b+v>>>2]=E[v>>>2];return this.sigBytes+=p,this},clamp:function(){var s=this.words,l=this.sigBytes;s[l>>>2]&=4294967295<<32-l%4*8,s.length=S.ceil(l/4)},clone:function(){var s=f.clone.call(this);return s.words=this.words.slice(0),s},random:function(s){for(var l=[],E=0;E<s;E+=4)l.push(m());return new r.init(l,s)}}),c=_.enc={},i=c.Hex={stringify:function(s){for(var l=s.words,E=s.sigBytes,b=[],p=0;p<E;p++){var L=l[p>>>2]>>>24-p%4*8&255;b.push((L>>>4).toString(16)),b.push((L&15).toString(16))}return b.join("")},parse:function(s){for(var l=s.length,E=[],b=0;b<l;b+=2)E[b>>>3]|=parseInt(s.substr(b,2),16)<<24-b%8*4;return new r.init(E,l/2)}},n=c.Latin1={stringify:function(s){for(var l=s.words,E=s.sigBytes,b=[],p=0;p<E;p++){var L=l[p>>>2]>>>24-p%4*8&255;b.push(String.fromCharCode(L))}return b.join("")},parse:function(s){for(var l=s.length,E=[],b=0;b<l;b++)E[b>>>2]|=(s.charCodeAt(b)&255)<<24-b%4*8;return new r.init(E,l)}},o=c.Utf8={stringify:function(s){try{return decodeURIComponent(escape(n.stringify(s)))}catch(l){throw new Error("Malformed UTF-8 data")}},parse:function(s){return n.parse(unescape(encodeURIComponent(s)))}},h=e.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new r.init,this._nDataBytes=0},_append:function(s){typeof s=="string"&&(s=o.parse(s)),this._data.concat(s),this._nDataBytes+=s.sigBytes},_process:function(s){var l,E=this._data,b=E.words,p=E.sigBytes,L=this.blockSize,R=L*4,v=p/R;s?v=S.ceil(v):v=S.max((v|0)-this._minBufferSize,0);var x=v*L,w=S.min(x*4,p);if(x){for(var T=0;T<x;T+=L)this._doProcessBlock(b,T);l=b.splice(0,x),E.sigBytes-=w}return new r.init(l,w)},clone:function(){var s=f.clone.call(this);return s._data=this._data.clone(),s},_minBufferSize:0}),d=e.Hasher=h.extend({cfg:f.extend(),init:function(s){this.cfg=this.cfg.extend(s),this.reset()},reset:function(){h.reset.call(this),this._doReset()},update:function(s){return this._append(s),this._process(),this},finalize:function(s){s&&this._append(s);var l=this._doFinalize();return l},blockSize:512/32,_createHelper:function(s){return function(l,E){return new s.init(E).finalize(l)}},_createHmacHelper:function(s){return function(l,E){return new u.HMAC.init(s,E).finalize(l)}}}),u=_.algo={};return _}(Math);return g})}).call(this,I("IyRk"))},J66h:function(H,J,I){(function(N){var g,S;(function(k,y){H.exports=y(k)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof N!="undefined"?N:this,function(k){"use strict";k=k||{};var y=k.Base64,m="2.6.4",C="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_=function(A){for(var z={},K=0,O=A.length;K<O;K++)z[A.charAt(K)]=K;return z}(C),e=String.fromCharCode,f=function(A){if(A.length<2){var z=A.charCodeAt(0);return z<128?A:z<2048?e(192|z>>>6)+e(128|z&63):e(224|z>>>12&15)+e(128|z>>>6&63)+e(128|z&63)}else{var z=65536+(A.charCodeAt(0)-55296)*1024+(A.charCodeAt(1)-56320);return e(240|z>>>18&7)+e(128|z>>>12&63)+e(128|z>>>6&63)+e(128|z&63)}},r=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,c=function(A){return A.replace(r,f)},i=function(A){var z=[0,2,1][A.length%3],K=A.charCodeAt(0)<<16|(A.length>1?A.charCodeAt(1):0)<<8|(A.length>2?A.charCodeAt(2):0),O=[C.charAt(K>>>18),C.charAt(K>>>12&63),z>=2?"=":C.charAt(K>>>6&63),z>=1?"=":C.charAt(K&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)},o=function(A){return n(c(String(A)))},h=function(A){return A.replace(/[+\/]/g,function(z){return z=="+"?"-":"_"}).replace(/=/g,"")},d=function(A,z){return z?h(o(A)):o(A)},u=function(A){return d(A,!0)},s;k.Uint8Array&&(s=function(A,z){for(var K="",O=0,B=A.length;O<B;O+=3){var U=A[O],D=A[O+1],W=A[O+2],Q=U<<16|D<<8|W;K+=C.charAt(Q>>>18)+C.charAt(Q>>>12&63)+(typeof D!="undefined"?C.charAt(Q>>>6&63):"=")+(typeof W!="undefined"?C.charAt(Q&63):"=")}return z?h(K):K});var l=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,E=function(A){switch(A.length){case 4:var z=(7&A.charCodeAt(0))<<18|(63&A.charCodeAt(1))<<12|(63&A.charCodeAt(2))<<6|63&A.charCodeAt(3),K=z-65536;return e((K>>>10)+55296)+e((K&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(l,E)},p=function(A){var z=A.length,K=z%4,O=(z>0?_[A.charAt(0)]<<18:0)|(z>1?_[A.charAt(1)]<<12:0)|(z>2?_[A.charAt(2)]<<6:0)|(z>3?_[A.charAt(3)]:0),B=[e(O>>>16),e(O>>>8&255),e(O&255)];return B.length-=[0,0,2,1][K],B.join("")},L=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 L(String(A).replace(/[^A-Za-z0-9\+\/]/g,""))},v=function(A){return b(L(A))},x=function(A){return String(A).replace(/[-_]/g,function(z){return z=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},w=function(A){return v(x(A))},T;k.Uint8Array&&(T=function(A){return Uint8Array.from(R(x(A)),function(z){return z.charCodeAt(0)})});var F=function(){var A=k.Base64;return k.Base64=y,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:s,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(J,g),S!==void 0&&(H.exports=S)),{Base64:k.Base64}})}).call(this,I("IyRk"))},JYp7:function(H,J,I){"use strict";I.d(J,"a",function(){return N});var N;(function(g){function S(l){return l&&typeof l=="object"&&typeof l[Symbol.iterator]=="function"}g.is=S;const k=Object.freeze([]);function y(){return k}g.empty=y;function*m(l){yield l}g.single=m;function C(l){return l||k}g.from=C;function _(l){return!l||l[Symbol.iterator]().next().done===!0}g.isEmpty=_;function e(l){return l[Symbol.iterator]().next().value}g.first=e;function f(l,E){for(const b of l)if(E(b))return!0;return!1}g.some=f;function r(l,E){for(const b of l)if(E(b))return b;return}g.find=r;function*c(l,E){for(const b of l)E(b)&&(yield b)}g.filter=c;function*i(l,E){let b=0;for(const p of l)yield E(p,b++)}g.map=i;function*n(...l){for(const E of l)for(const b of E)yield b}g.concat=n;function*o(l){for(const E of l)for(const b of E)yield b}g.concatNested=o;function h(l,E,b){let p=b;for(const L of l)p=E(p,L);return p}g.reduce=h;function*d(l,E,b=l.length){for(E<0&&(E+=l.length),b<0?b+=l.length:b>l.length&&(b=l.length);E<b;E++)yield l[E]}g.slice=d;function u(l,E=Number.POSITIVE_INFINITY){const b=[];if(E===0)return[b,l];const p=l[Symbol.iterator]();for(let L=0;L<E;L++){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 s(l,E,b=(p,L)=>p===L){const p=l[Symbol.iterator](),L=E[Symbol.iterator]();for(;;){const R=p.next(),v=L.next();if(R.done!==v.done)return!1;if(R.done)return!0;if(!b(R.value,v.value))return!1}}g.equals=s})(N||(N={}))},K3mO:function(H,J,I){(function(N,g,S){H.exports=J=g(I("Ib8C"),I("3y9D"),I("WYAk"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.Base,y=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,f){for(var r,c=this.cfg,i=c.hasher.create(),n=y.create(),o=n.words,h=c.keySize,d=c.iterations;o.length<h;){r&&i.update(r),r=i.update(e).finalize(f),i.reset();for(var u=1;u<d;u++)r=i.finalize(r),i.reset();n.concat(r)}return n.sigBytes=h*4,n}});g.EvpKDF=function(e,f,r){return _.create(r).compute(e,f)}}(),N.EvpKDF})},KhGG:function(H,J,I){"use strict";I.d(J,"a",function(){return p}),I.d(J,"c",function(){return v});var N=I("0Owb"),g=I("miYZ"),S=I("tsqr"),k=I("oBTY"),y=I("tJVT"),m=I("PpiC"),C=I("k1fw"),_=I("9og8"),e=I("DZo9"),f=I("8z0m"),r=I("WmNS"),c=I.n(r),i=I("q1tI"),n=I.n(i),o=I("ErOA"),h=I("NFKh"),d=I.n(h),u=I("7Cbv"),s=I("9kvl"),l=I("mxV5"),E=I.n(l),b=f.a.Dragger,p=function(T){var F="bf3c199c2470cb477d907b1e0917c17b",P="5183666c72eec9e4",A=d.a.enc.Utf8.parse(F),z=d.a.enc.Utf8.parse(P),K=d.a.AES.decrypt(T,A,{iv:z,mode:d.a.mode.CBC});return K.toString(d.a.enc.Utf8)},L,R=function(){var w=Object(_.a)(c.a.mark(function T(F){var P,A,z,K,O,B,U,D,W,Q,re;return c.a.wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:return U=F.identifier,D=F.oldFilename,W=F.newFilename,ye.next=3,Object(o.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 3:return Q=ye.sent,Q.data=JSON.parse(p(Q.data)),re=new E.a({endpoint:Q==null||((P=Q.data)===null||P===void 0)?void 0:P.end_point,region:Q==null||((A=Q.data)===null||A===void 0)?void 0:A.region,accessKeyId:Q==null||((z=Q.data)===null||z===void 0)?void 0:z.access_key_id,accessKeySecret:Q==null||((K=Q.data)===null||K===void 0)?void 0:K.access_key_secret,bucket:Q==null||((O=Q.data)===null||O===void 0)?void 0:O.bucket,stsToken:Q==null||((B=Q.data)===null||B===void 0)?void 0:B.security_token}),ye.abrupt("return",new Promise(function(be,he){console.log(11111,"".concat(U,"/").concat(D),"".concat(U,"/").concat(W),Q.data),re.copy("/".concat(U,"/").concat(D),"/".concat(U,"/").concat(W)).then(function(Ie){console.log("\u62F7\u8D1D\u6210\u529F",Ie)}).catch(function(Ie){console.log(Ie)})}));case 7:case"end":return ye.stop()}},T)}));return function(F){return w.apply(this,arguments)}}(),v=function(){var w=Object(_.a)(c.a.mark(function T(F,P,A){var z,K,O,B,U,D,W,Q,re,ee;return c.a.wrap(function(be){for(;;)switch(be.prev=be.next){case 0:return P.file_name=F.name,be.next=3,Object(o.a)("/api/buckets/get_upload_token.json",{method:"get"});case 3:return W=be.sent,console.log("decrypt(res.data):",p(W.data)),W.data=JSON.parse(p(W.data)),Q=F.name.split("."),Q.pop(),re=P.realFileName?Q:Object(u.a)(),ee=new E.a({endpoint:W==null||((z=W.data)===null||z===void 0)?void 0:z.end_point,region:W==null||((K=W.data)===null||K===void 0)?void 0:K.region,accessKeyId:W==null||((O=W.data)===null||O===void 0)?void 0:O.access_key_id,accessKeySecret:W==null||((B=W.data)===null||B===void 0)?void 0:B.access_key_secret,bucket:W==null||((U=W.data)===null||U===void 0)?void 0:U.bucket,stsToken:W==null||((D=W.data)===null||D===void 0)?void 0:D.security_token}),be.abrupt("return",new Promise(function(he,Ie){var Se;ee.multipartUpload("".concat(re),new Blob([F],{type:F.type}),Object(C.a)(Object(C.a)({timeout:200*1e3,partSize:102400},A),{},{callback:{url:W==null||((Se=W.data)===null||Se===void 0)?void 0:Se.callback_url,host:W==null?void 0:W.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(o.e)(P)}})).then(function(fe){var ue;F.response=(ue=fe.data)===null||ue===void 0?void 0:ue.data,he(fe==null?void 0:fe.data)}).catch(function(fe){Ie(fe),console.log("err:",fe)})}));case 11:case"end":return be.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"]),z=Object(i.useState)([]),K=Object(y.a)(z,2),O=K[0],B=K[1],U=Object(i.useState)(),D=Object(y.a)(U,2),W=D[0],Q=D[1],re={onRemove:function(be){B(Object(k.a)(O.filter(function(he){return he.name!==be.name}))),A.onChange(O.filter(function(he){return he.name!==be.name}))},disabled:A.disabled,multiple:!0,fileList:O==null?void 0:O.map(function(ye){return ye.file}),customRequest:function(){},beforeUpload:function(){var ye=Object(_.a)(c.a.mark(function he(Ie){var Se;return c.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:if(Se=A.maxSize||1024*1024*1024*1,!O.filter(function(ie){return ie.name===Ie.name}).length){ue.next=4;break}return S.b.info("".concat(Ie.name,"\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9")),ue.abrupt("return");case 4:if(!((Ie==null?void 0:Ie.size)>Se)){ue.next=7;break}return S.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(Se/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),ue.abrupt("return",!1);case 7:return O.push({name:Ie.name,file:Ie}),B(Object(k.a)(O)),A.onChange(O),ue.abrupt("return",!1);case 11:case"end":return ue.stop()}},he)}));function be(he){return ye.apply(this,arguments)}return be}()},ee=function(){var ye=Object(_.a)(c.a.mark(function be(he,Ie){var Se,fe,ue,ie,Ce,ne,ce,Ae,oe,q;return c.a.wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return Ie.file_name=he.name,ce=he.name,X.next=4,Object(o.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if(Ae=X.sent,Ae.data=JSON.parse(p(Ae.data)),!((Ae==null?void 0:Ae.status)!==0)){X.next=12;break}return O[O.findIndex(function(de){return de.name===ce})].status="error",O[O.findIndex(function(de){return de.name===ce})].file.status="error",A.onChange(O),S.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),X.abrupt("return");case 12:return W=new E.a({endpoint:Ae==null||((Se=Ae.data)===null||Se===void 0)?void 0:Se.end_point,region:Ae==null||((fe=Ae.data)===null||fe===void 0)?void 0:fe.region,accessKeyId:Ae==null||((ue=Ae.data)===null||ue===void 0)?void 0:ue.access_key_id,accessKeySecret:Ae==null||((ie=Ae.data)===null||ie===void 0)?void 0:ie.access_key_secret,bucket:Ae==null||((Ce=Ae.data)===null||Ce===void 0)?void 0:Ce.bucket,stsToken:Ae==null||((ne=Ae.data)===null||ne===void 0)?void 0:ne.security_token}),console.log(he,"file"),Q(W),oe=he.name.split("."),oe.pop(),q=Ie.realFileName?oe:Object(u.a)(),X.abrupt("return",new Promise(function(de,pe){try{var xe;W.multipartUpload("".concat(A.identifier,"/").concat(q).concat(ce.indexOf(".")>-1?"."+ce.split(".").pop():""),new Blob([he.file],{type:he.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(qe,tt,et){try{console.log("\u8FDB\u5EA6",qe,tt,et);var it=O.findIndex(function(at){return at.name===ce});O[it].file.percent=qe*100,O[it].tempCheckpoint=tt,B(Object(k.a)(O))}catch(at){}},checkpoint:O[O.findIndex(function(Ke){return Ke.name===ce})].tempCheckpoint,callback:{customValue:{id:ce+""},url:Ae==null||((xe=Ae.data)===null||xe===void 0)?void 0:xe.callback_url,host:Ae==null?void 0:Ae.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(o.e)(Ie)}}).then(function(Ke){var qe,tt=O.findIndex(function(De){return De.name===ce}),et="done";if(((qe=Ke.data)===null||qe===void 0?void 0:qe.status)===0){var it;he.response=(it=Ke.data)===null||it===void 0?void 0:it.data;var at=O.findIndex(function(De){return De.name===ce});O[at].status="done",O[at].file.status="done"}else{var je;S.b.warn((je=Ke.data)===null||je===void 0?void 0:je.message),et="error"}O[tt].status=et,O[tt].file.status=et,A.onChange(O),de(Ke==null?void 0:Ke.data)}).catch(function(Ke){O[O.findIndex(function(qe){return qe.name===ce})].status="error",O[O.findIndex(function(qe){return qe.name===ce})].file.status="error",S.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),B(Object(k.a)(O)),A.onChange(O),pe(Ke),console.log("err:",Ke)})}catch(Ke){}}));case 19:case"end":return X.stop()}},be)}));return function(he,Ie){return ye.apply(this,arguments)}}();return Object(i.useEffect)(function(){O.every(function(ye){return ye==="done"||ye==="error"})&&A.onComplete(O)},[O]),Object(i.useEffect)(function(){if(P){var ye;(ye=W)===null||ye===void 0||ye.cancel()}},[P]),Object(i.useEffect)(function(){A.uploading&&O.map(function(){var ye=Object(_.a)(c.a.mark(function be(he){var Ie,Se;return c.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:if(!((!he.status||he.status==="error")&&!P)){ue.next=6;break}return he.status="uploading",he.file.status="uploading",ue.next=5,ee(he,{login:F==null||((Ie=F.userInfo)===null||Ie===void 0)?void 0:Ie.login,container_type:A.container_type,container_id:A.container_id,description:A.description,realFileName:A.realFileName});case 5:Se=ue.sent;case 6:case"end":return ue.stop()}},be)}));return function(be){return ye.apply(this,arguments)}}())},[A.uploading]),n.a.createElement(b,Object(N.a)({},re,{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"))};J.b=Object(s.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,J,I){(function(N,g,S){H.exports=J=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,J,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,J,I){"use strict";I.d(J,"b",function(){return l}),I.d(J,"a",function(){return b});var N=I("1OyB"),g=I("vuIU"),S=I("Ji7U"),k=I("LK+K"),y=I("q1tI"),m=I("rePB"),C=I("Ff2n"),_=I("ODXe"),e=I("4IlW"),f=I("bX4T"),r=I("YrtM"),c=I("TSYQ"),i=I.n(c),n=I("+nKL"),o=I("8OUc"),h=function(W,Q){var re=W.prefixCls,ee=W.id,ye=W.flattenOptions,be=W.childrenAsData,he=W.values,Ie=W.searchValue,Se=W.multiple,fe=W.defaultActiveFirstOption,ue=W.height,ie=W.itemHeight,Ce=W.notFoundContent,ne=W.open,ce=W.menuItemSelectedIcon,Ae=W.virtual,oe=W.onSelect,q=W.onToggleOpen,$=W.onActiveValue,X=W.onScroll,de=W.onMouseEnter,pe="".concat(re,"-item"),xe=Object(r.a)(function(){return ye},[ne,ye],function(Qe,Fe){return Fe[0]&&Qe[1]!==Fe[1]}),Ke=y.useRef(null),qe=function(Fe){Fe.preventDefault()},tt=function(Fe){Ke.current&&Ke.current.scrollTo({index:Fe})},et=function(Fe){for(var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Me=xe.length,Ee=0;Ee<Me;Ee+=1){var Oe=(Fe+Ee*Re+Me)%Me,ke=xe[Oe],Ne=ke.group,He=ke.data;if(!Ne&&!He.disabled)return Oe}return-1},it=y.useState(function(){return et(0)}),at=Object(_.a)(it,2),je=at[0],De=at[1],nt=function(Fe){De(Fe);var Re=xe[Fe];if(!Re){$(null,-1);return}$(Re.data.value,Fe)};y.useEffect(function(){nt(fe!==!1?et(0):-1)},[xe.length,Ie]),y.useEffect(function(){var Qe=setTimeout(function(){if(!Se&&ne&&he.size===1){var Fe=Array.from(he)[0],Re=xe.findIndex(function(Me){var Ee=Me.data;return Ee.value===Fe});nt(Re),tt(Re)}});return function(){return clearTimeout(Qe)}},[ne]);var lt=function(Fe){Fe!==void 0&&oe(Fe,{selected:!he.has(Fe)}),Se||q(!1)};if(y.useImperativeHandle(Q,function(){return{onKeyDown:function(Fe){var Re=Fe.which;switch(Re){case e.a.UP:case e.a.DOWN:{var Me=0;if(Re===e.a.UP?Me=-1:Re===e.a.DOWN&&(Me=1),Me!==0){var Ee=et(je+Me,Me);tt(Ee),nt(Ee)}break}case e.a.ENTER:{var Oe=xe[je];Oe&&!Oe.data.disabled?lt(Oe.data.value):lt(void 0),ne&&Fe.preventDefault();break}case e.a.ESC:q(!1)}},onKeyUp:function(){},scrollTo:function(Fe){tt(Fe)}}}),xe.length===0)return y.createElement("div",{role:"listbox",id:"".concat(ee,"_list"),className:"".concat(pe,"-empty"),onMouseDown:qe},Ce);function Ve(Qe){var Fe=xe[Qe];if(!Fe)return null;var Re=Fe.data||{},Me=Re.value,Ee=Re.label,Oe=Re.children,ke=Object(f.a)(Re,!0),Ne=be?Oe:Ee;return Fe?y.createElement("div",Object.assign({"aria-label":typeof Ne=="string"?Ne:null},ke,{key:Qe,role:"option",id:"".concat(ee,"_list_").concat(Qe),"aria-selected":he.has(Me)}),Me):null}return y.createElement(y.Fragment,null,y.createElement("div",{role:"listbox",id:"".concat(ee,"_list"),style:{height:0,width:0,overflow:"hidden"}},Ve(je-1),Ve(je),Ve(je+1)),y.createElement(n.a,{itemKey:"key",ref:Ke,data:xe,height:ue,itemHeight:ie,fullHeight:!1,onMouseDown:qe,onScroll:X,virtual:Ae,onMouseEnter:de},function(Qe,Fe){var Re,Me=Qe.group,Ee=Qe.groupOption,Oe=Qe.data,ke=Oe.label,Ne=Oe.key;if(Me)return y.createElement("div",{className:i()(pe,"".concat(pe,"-group"))},ke!==void 0?ke:Ne);var He=Oe.disabled,rt=Oe.value,ct=Oe.title,yt=Oe.children,ht=Oe.style,pt=Oe.className,Dt=Object(C.a)(Oe,["disabled","value","title","children","style","className"]),At=he.has(rt),bt="".concat(pe,"-option"),Xt=i()(pe,bt,pt,(Re={},Object(m.a)(Re,"".concat(bt,"-grouped"),Ee),Object(m.a)(Re,"".concat(bt,"-active"),je===Fe&&!He),Object(m.a)(Re,"".concat(bt,"-disabled"),He),Object(m.a)(Re,"".concat(bt,"-selected"),At),Re)),Gt=be?yt:ke,rr=!ce||typeof ce=="function"||At;return y.createElement("div",Object.assign({},Dt,{"aria-selected":At,className:Xt,title:ct,onMouseMove:function(){if(je===Fe||He)return;nt(Fe)},onClick:function(){He||lt(rt)},style:ht}),y.createElement("div",{className:"".concat(bt,"-content")},Gt||rt),y.isValidElement(ce)||At,rr&&y.createElement(o.a,{className:"".concat(pe,"-option-state"),customizeIcon:ce,customizeIconProps:{isSelected:At}},At?"\u2713":null))}))},d=y.forwardRef(h);d.displayName="OptionList";var u=d,s=function(){return null};s.isSelectOption=!0;var l=s,E=function(){return null};E.isSelectOptGroup=!0;var b=E,p=I("VTBJ"),L=I("Zm9Q");function R(D){var W=D.key,Q=D.props,re=Q.children,ee=Q.value,ye=Object(C.a)(Q,["children","value"]);return Object(p.a)({key:W,value:ee!==void 0?ee:W,children:re},ye)}function v(D){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(L.a)(D).map(function(Q,re){if(!y.isValidElement(Q)||!Q.type)return null;var ee=Q.type.isSelectOptGroup,ye=Q.key,be=Q.props,he=be.children,Ie=Object(C.a)(be,["children"]);return W||!ee?R(Q):Object(p.a)(Object(p.a)({key:"__RC_SELECT_GRP__".concat(ye===null?re:ye,"__"),label:ye},Ie),{},{options:v(he)})}).filter(function(Q){return Q})}var x=I("2Qr1"),w=I("qNPg"),T=I("U8pU"),F=I("Kwbf"),P=I("WKfj");function A(D){var W=D.mode,Q=D.options,re=D.children,ee=D.backfill,ye=D.allowClear,be=D.placeholder,he=D.getInputElement,Ie=D.showSearch,Se=D.onSearch,fe=D.defaultOpen,ue=D.autoFocus,ie=D.labelInValue,Ce=D.value,ne=D.inputValue,ce=D.optionLabelProp,Ae=W==="multiple"||W==="tags",oe=Ie!==void 0?Ie:Ae||W==="combobox",q=Q||v(re);if(Object(F.a)(W!=="tags"||q.every(function(pe){return!pe.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),W==="tags"||W==="combobox"){var $=q.some(function(pe){return pe.options?pe.options.some(function(xe){return typeof("value"in xe?xe.value:xe.key)=="number"}):typeof("value"in pe?pe.value:pe.key)=="number"});Object(F.a)(!$,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(F.a)(W!=="combobox"||!ce,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(F.a)(W==="combobox"||!ee,"`backfill` only works with `combobox` mode."),Object(F.a)(W==="combobox"||!he,"`getInputElement` only work with `combobox` mode."),Object(F.b)(W!=="combobox"||!he||!ye||!be,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Se&&!oe&&W!=="combobox"&&W!=="tags"&&Object(F.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(F.b)(!fe||ue,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Ce!=null){var X=Object(P.d)(Ce);Object(F.a)(!ie||X.every(function(pe){return Object(T.a)(pe)==="object"&&("key"in pe||"value"in pe)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(F.a)(!Ae||Array.isArray(Ce),"`value` should be array when `mode` is `multiple` or `tags`")}if(re){var de=null;Object(L.a)(re).some(function(pe){if(!y.isValidElement(pe)||!pe.type)return!1;var xe=pe.type;if(xe.isSelectOption)return!1;if(xe.isSelectOptGroup){var Ke=Object(L.a)(pe.props.children).every(function(qe){return!y.isValidElement(qe)||!pe.type||qe.type.isSelectOption?!0:(de=qe.type,!1)});return!Ke}return de=xe,!0}),de&&Object(F.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(de.displayName||de.name||de,"`.")),Object(F.a)(ne===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var z=A,K=Object(w.a)({prefixCls:"rc-select",components:{optionList:u},convertChildrenToData:v,flattenOptions:x.d,getLabeledValue:x.e,filterOptions:x.b,isValueDisabled:x.g,findValueOption:x.c,warningProps:z,fillOptionsWithMissingValue:x.a}),O=function(D){Object(S.a)(Q,D);var W=Object(k.a)(Q);function Q(){var re;return Object(N.a)(this,Q),re=W.apply(this,arguments),re.selectRef=y.createRef(),re.focus=function(){re.selectRef.current.focus()},re.blur=function(){re.selectRef.current.blur()},re}return Object(g.a)(Q,[{key:"render",value:function(){return y.createElement(K,Object.assign({ref:this.selectRef},this.props))}}]),Q}(y.Component);O.Option=l,O.OptGroup=b;var B=O,U=J.c=B},M8RZ:function(H,J,I){"use strict";I.d(J,"a",function(){return e});var N=I("fWQN"),g=I("mtLc"),S=I("yKVA"),k=I("879j"),y=I("q1tI"),m=I.n(y),C=I("i8i4"),_=I.n(C),e=function(f){Object(S.a)(c,f);var r=Object(k.a)(c);function c(i){var n;Object(N.a)(this,c),n=r.call(this,i);var o=window.document;return n.node=o.createElement("div"),o.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,J,I){(function(N){var g=m(),S=C(),k=_(),y=typeof window!="undefined"?window:N;H.exports={assign:g,create:S,trim:k,bind:e,slice:f,each:r,map:c,pluck:i,isList:n,isFunction:o,isObject:h,Global:y};function m(){return Object.assign?Object.assign:function(u,s,l,E){for(var b=1;b<arguments.length;b++)r(Object(arguments[b]),function(p,L){u[L]=p});return u}}function C(){if(Object.create)return function(s,l,E,b){var p=f(arguments,1);return g.apply(this,[Object.create(s)].concat(p))};{function d(){}return function(s,l,E,b){var p=f(arguments,1);return d.prototype=s,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 f(d,u){return Array.prototype.slice.call(d,u||0)}function r(d,u){i(d,function(s,l){return u(s,l),!1})}function c(d,u){var s=n(d)?[]:{};return i(d,function(l,E){return s[E]=u(l,E),!1}),s}function i(d,u){if(n(d)){for(var s=0;s<d.length;s++)if(u(d[s],s))return d[s]}else for(var l in d)if(d.hasOwnProperty(l)&&u(d[l],l))return d[l]}function n(d){return d!=null&&typeof d!="function"&&typeof d.length=="number"}function o(d){return d&&{}.toString.call(d)==="[object Function]"}function h(d){return d&&{}.toString.call(d)==="[object Object]"}}).call(this,I("IyRk"))},MI8n:function(H,J,I){"use strict";I.d(J,"c",function(){return y}),I.d(J,"b",function(){return e}),I.d(J,"e",function(){return f}),I.d(J,"a",function(){return r}),I.d(J,"d",function(){return c}),I.d(J,"f",function(){return i});var N=I("/cxE"),g=I("pmY6"),S=I("24hK"),k=I("5Y4S"),y;(function(n){n.None=()=>g.a.None;function o(A){return(z,K=null,O)=>{let B=!1,U;return U=A(D=>B?void 0:(U?U.dispose():B=!0,z.call(K,D)),null,O),B&&U.dispose(),U}}n.once=o;function h(A,z){return b((K,O=null,B)=>A(U=>K.call(O,z(U)),null,B))}n.map=h;function d(A,z){return b((K,O=null,B)=>A(U=>{z(U),K.call(O,U)},null,B))}n.forEach=d;function u(A,z){return b((K,O=null,B)=>A(U=>z(U)&&K.call(O,U),null,B))}n.filter=u;function s(A){return A}n.signal=s;function l(...A){return(z,K=null,O)=>Object(g.e)(...A.map(B=>B(U=>z.call(K,U),null,O)))}n.any=l;function E(A,z,K){let O=K;return h(A,B=>(O=z(O,B),O))}n.reduce=E;function b(A){let z;const K=new e({onFirstListenerAdd(){z=A(K.fire,K)},onLastListenerRemove(){z.dispose()}});return K.event}function p(A,z,K=100,O=!1,B){let U,D,W,Q=0;const re=new e({leakWarningThreshold:B,onFirstListenerAdd(){U=A(ee=>{Q++,D=z(D,ee),O&&!W&&(re.fire(D),D=void 0),clearTimeout(W),W=setTimeout(()=>{const ye=D;D=void 0,W=void 0,(!O||Q>1)&&re.fire(ye),Q=0},K)})},onLastListenerRemove(){U.dispose()}});return re.event}n.debounce=p;function L(A,z=(K,O)=>K===O){let K=!0,O;return u(A,B=>{const U=K||!z(B,O);return K=!1,O=B,U})}n.latch=L;function R(A,z){return[n.filter(A,z),n.filter(A,K=>!z(K))]}n.split=R;function v(A,z=!1,K=[]){let O=K.slice(),B=A(W=>{O?O.push(W):D.fire(W)});const U=()=>{O&&O.forEach(W=>D.fire(W)),O=null},D=new e({onFirstListenerAdd(){B||(B=A(W=>D.fire(W)))},onFirstListenerDidAdd(){O&&(z?setTimeout(U):U())},onLastListenerRemove(){B&&B.dispose(),B=null}});return D.event}n.buffer=v;class x{constructor(A){this.event=A}map(A){return new x(h(this.event,A))}forEach(A){return new x(d(this.event,A))}filter(A){return new x(u(this.event,A))}reduce(A,z){return new x(E(this.event,A,z))}latch(){return new x(L(this.event))}debounce(A,z=100,K=!1,O){return new x(p(this.event,A,z,K,O))}on(A,z,K){return this.event(A,z,K)}once(A,z,K){return o(this.event)(A,z,K)}}function w(A){return new x(A)}n.chain=w;function T(A,z,K=O=>O){const O=(...W)=>D.fire(K(...W)),B=()=>A.on(z,O),U=()=>A.removeListener(z,O),D=new e({onFirstListenerAdd:B,onLastListenerRemove:U});return D.event}n.fromNodeEventEmitter=T;function F(A,z,K=O=>O){const O=(...W)=>D.fire(K(...W)),B=()=>A.addEventListener(z,O),U=()=>A.removeEventListener(z,O),D=new e({onFirstListenerAdd:B,onLastListenerRemove:U});return D.event}n.fromDOMEventEmitter=F;function P(A){return new Promise(z=>o(A)(z))}n.toPromise=P})(y||(y={}));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,o=Math.random().toString(18).slice(2,5)){this.customThreshold=n,this.name=o,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(n){let o=C;if(typeof this.customThreshold=="number"&&(o=this.customThreshold),o<=0||n<o)return;this._stacks||(this._stacks=new Map);const h=new Error().stack.split(`
`).slice(3).join(`
`),d=this._stacks.get(h)||0;if(this._stacks.set(h,d+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=o*.5;let u,s=0;for(const[l,E]of this._stacks)(!u||s<E)&&(u=l,s=E);console.warn(`[${this.name}] potential listener LEAK detected, having ${n} listeners already. MOST frequent listener (${s}):`),console.warn(u)}return()=>{const u=this._stacks.get(h)||0;this._stacks.set(h,u-1)}}}class e{constructor(n){var o;this._disposed=!1,this._options=n,this._leakageMon=C>0?new _(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((o=this._options)===null||o===void 0?void 0:o._profName)?new m(this._options._profName):void 0}get event(){return this._event||(this._event=(n,o,h)=>{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 s=this._listeners.push(o?[n,o]:n);u&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,n,o);const l=(d=this._leakageMon)===null||d===void 0?void 0:d.check(this._listeners.size),E=Object(g.i)(()=>{if(l&&l(),!this._disposed&&(s(),this._options&&this._options.onLastListenerRemove)){const b=this._listeners&&!this._listeners.isEmpty();b||this._options.onLastListenerRemove(this)}});return h instanceof g.b?h.add(E):Array.isArray(h)&&h.push(E),E}),this._event}fire(n){var o,h;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new S.a);for(let d of this._listeners)this._deliveryQueue.push([d,n]);for((o=this._perfMon)===null||o===void 0||o.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(s){Object(N.f)(s)}}(h=this._perfMon)===null||h===void 0||h.stop()}}dispose(){var n,o,h,d,u;this._disposed||(this._disposed=!0,(n=this._listeners)===null||n===void 0||n.clear(),(o=this._deliveryQueue)===null||o===void 0||o.clear(),(d=(h=this._options)===null||h===void 0?void 0:h.onLastListenerRemove)===null||d===void 0||d.call(h),(u=this._leakageMon)===null||u===void 0||u.dispose())}}class f 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 f{constructor(n){var o;super(n);this._delay=(o=n.delay)!==null&&o!==void 0?o: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(o,h,d)=>n(u=>{const s=this.buffers[this.buffers.length-1];s?s.push(()=>o.call(h,u)):o.call(h,u)},void 0,d)}bufferEvents(n){const o=[];this.buffers.push(o);const h=n();return this.buffers.pop(),o.forEach(d=>d()),h}}class i{constructor(){this.listening=!1,this.inputEvent=y.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,J,I){"use strict";(function(N,g){I.d(J,"b",function(){return h}),I.d(J,"i",function(){return l}),I.d(J,"f",function(){return E}),I.d(J,"d",function(){return b}),I.d(J,"g",function(){return p}),I.d(J,"h",function(){return L}),I.d(J,"c",function(){return R}),I.d(J,"k",function(){return v}),I.d(J,"j",function(){return x}),I.d(J,"a",function(){return w}),I.d(J,"e",function(){return P});var S;const k="en";let y=!1,m=!1,C=!1,_=!1,e=!1,f=!1,r=!1,c,i=k,n,o;const h=typeof self=="object"?self:typeof N=="object"?N:{};let d;typeof h.vscode!="undefined"&&typeof h.vscode.process!="undefined"?d=h.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)o=navigator.userAgent,y=o.indexOf("Windows")>=0,m=o.indexOf("Macintosh")>=0,r=(o.indexOf("Macintosh")>=0||o.indexOf("iPad")>=0||o.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,C=o.indexOf("Linux")>=0,f=!0,c=navigator.language,i=c;else if(typeof d=="object"){y=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 z=JSON.parse(A),K=z.availableLanguages["*"];c=z.locale,i=K||k,n=z._translationsConfigFile}catch(z){}e=!0}else console.error("Unable to resolve platform.");let s=0;m?s=1:y?s=3:C&&(s=2);const l=y,E=m,b=C,p=e,L=f,R=r,v=o,x=function(){if(h.setImmediate)return h.setImmediate.bind(h);if(typeof h.postMessage=="function"&&!h.importScripts){let K=[];h.addEventListener("message",B=>{if(B.data&&B.data.vscodeSetImmediateId)for(let U=0,D=K.length;U<D;U++){const W=K[U];if(W.id===B.data.vscodeSetImmediateId){K.splice(U,1),W.callback();return}}});let O=0;return B=>{const U=++O;K.push({id:U,callback:B}),h.postMessage({vscodeSetImmediateId:U},"*")}}if(typeof(d==null?void 0:d.nextTick)=="function")return d.nextTick.bind(d);const z=Promise.resolve();return K=>z.then(K)}(),w=m||r?2:y?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 z=new Uint16Array(A.buffer);T=z[0]===(2<<8)+1}return T}}).call(this,I("IyRk"),I("Q2Ig"))},MlIO:function(H,J,I){(function(N,g){H.exports=J=g(I("Ib8C"))})(this,function(N){return function(g){var S=N,k=S.lib,y=k.Base,m=k.WordArray,C=S.x64={},_=C.Word=y.extend({init:function(f,r){this.high=f,this.low=r}}),e=C.WordArray=y.extend({init:function(f,r){f=this.words=f||[],r!=g?this.sigBytes=r:this.sigBytes=f.length*8},toX32:function(){for(var f=this.words,r=f.length,c=[],i=0;i<r;i++){var n=f[i];c.push(n.high),c.push(n.low)}return m.create(c,this.sigBytes)},clone:function(){for(var f=y.clone.call(this),r=f.words=this.words.slice(0),c=r.length,i=0;i<c;i++)r[i]=r[i].clone();return f}})}(),N})},N0LK:function(H,J,I){"use strict";I.d(J,"C",function(){return N}),I.d(J,"v",function(){return S}),I.d(J,"s",function(){return k}),I.d(J,"t",function(){return y}),I.d(J,"U",function(){return m}),I.d(J,"J",function(){return C}),I.d(J,"O",function(){return _}),I.d(J,"p",function(){return e}),I.d(J,"T",function(){return f}),I.d(J,"q",function(){return r}),I.d(J,"N",function(){return c}),I.d(J,"M",function(){return i}),I.d(J,"Q",function(){return n}),I.d(J,"u",function(){return o}),I.d(J,"x",function(){return h}),I.d(J,"I",function(){return d}),I.d(J,"f",function(){return u}),I.d(J,"h",function(){return s}),I.d(J,"g",function(){return l}),I.d(J,"i",function(){return E}),I.d(J,"G",function(){return b}),I.d(J,"H",function(){return p}),I.d(J,"r",function(){return L}),I.d(J,"R",function(){return R}),I.d(J,"d",function(){return v}),I.d(J,"e",function(){return x}),I.d(J,"E",function(){return w}),I.d(J,"F",function(){return T}),I.d(J,"j",function(){return F}),I.d(J,"z",function(){return P}),I.d(J,"K",function(){return z}),I.d(J,"L",function(){return K}),I.d(J,"m",function(){return B}),I.d(J,"k",function(){return D}),I.d(J,"A",function(){return Q}),I.d(J,"a",function(){return re}),I.d(J,"n",function(){return ee}),I.d(J,"l",function(){return ye}),I.d(J,"D",function(){return be}),I.d(J,"B",function(){return he}),I.d(J,"b",function(){return Ie}),I.d(J,"S",function(){return Se}),I.d(J,"o",function(){return fe}),I.d(J,"P",function(){return ue}),I.d(J,"w",function(){return ie}),I.d(J,"c",function(){return Ce}),I.d(J,"y",function(){return Ae});function N(X){return!X||typeof X!="string"?!0:X.trim().length===0}const g=/{(\d+)}/g;function S(X,...de){return de.length===0?X:X.replace(g,function(pe,xe){const Ke=parseInt(xe,10);return isNaN(Ke)||Ke<0||Ke>=de.length?pe:de[Ke]})}function k(X){return X.replace(/[<>&]/g,function(de){switch(de){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return de}})}function y(X){return X.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function m(X,de=" "){const pe=C(X,de);return _(pe,de)}function C(X,de){if(!X||!de)return X;const pe=de.length;if(pe===0||X.length===0)return X;let xe=0;for(;X.indexOf(de,xe)===xe;)xe=xe+pe;return X.substring(xe)}function _(X,de){if(!X||!de)return X;const pe=de.length,xe=X.length;if(pe===0||xe===0)return X;let Ke=xe,qe=-1;for(;!(qe=X.lastIndexOf(de,Ke-1),qe===-1||qe+pe!==Ke);){if(qe===0)return"";Ke=qe}return X.substring(0,Ke)}function e(X){return X.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function f(X){return X.replace(/\*/g,"")}function r(X,de,pe={}){if(!X)throw new Error("Cannot create regex from empty string");de||(X=y(X)),pe.wholeWord&&(/\B/.test(X.charAt(0))||(X="\\b"+X),/\B/.test(X.charAt(X.length-1))||(X=X+"\\b"));let xe="";return pe.global&&(xe+="g"),pe.matchCase||(xe+="i"),pe.multiline&&(xe+="m"),pe.unicode&&(xe+="u"),new RegExp(X,xe)}function c(X){if(X.source==="^"||X.source==="^$"||X.source==="$"||X.source==="^\\s*$")return!1;const de=X.exec("");return!!(de&&X.lastIndex===0)}function i(X){return(X.global?"g":"")+(X.ignoreCase?"i":"")+(X.multiline?"m":"")+(X.unicode?"u":"")}function n(X){return X.split(/\r\n|\r|\n/)}function o(X){for(let de=0,pe=X.length;de<pe;de++){const xe=X.charCodeAt(de);if(xe!==32&&xe!==9)return de}return-1}function h(X,de=0,pe=X.length){for(let xe=de;xe<pe;xe++){const Ke=X.charCodeAt(xe);if(Ke!==32&&Ke!==9)return X.substring(de,xe)}return X.substring(de,pe)}function d(X,de=X.length-1){for(let pe=de;pe>=0;pe--){const xe=X.charCodeAt(pe);if(xe!==32&&xe!==9)return pe}return-1}function u(X,de){return X<de?-1:X>de?1:0}function s(X,de,pe=0,xe=X.length,Ke=0,qe=de.length){for(;pe<xe&&Ke<qe;pe++,Ke++){let it=X.charCodeAt(pe),at=de.charCodeAt(Ke);if(it<at)return-1;if(it>at)return 1}const tt=xe-pe,et=qe-Ke;return tt<et?-1:tt>et?1:0}function l(X,de){return E(X,de,0,X.length,0,de.length)}function E(X,de,pe=0,xe=X.length,Ke=0,qe=de.length){for(;pe<xe&&Ke<qe;pe++,Ke++){let it=X.charCodeAt(pe),at=de.charCodeAt(Ke);if(it===at)continue;if(it>=128||at>=128)return s(X.toLowerCase(),de.toLowerCase(),pe,xe,Ke,qe);b(it)&&(it-=32),b(at)&&(at-=32);const je=it-at;if(je===0)continue;return je}const tt=xe-pe,et=qe-Ke;return tt<et?-1:tt>et?1:0}function b(X){return X>=97&&X<=122}function p(X){return X>=65&&X<=90}function L(X,de){return X.length===de.length&&E(X,de)===0}function R(X,de){const pe=de.length;return de.length>X.length?!1:E(X,de,0,pe)===0}function v(X,de){let pe,xe=Math.min(X.length,de.length);for(pe=0;pe<xe;pe++)if(X.charCodeAt(pe)!==de.charCodeAt(pe))return pe;return xe}function x(X,de){let pe,xe=Math.min(X.length,de.length);const Ke=X.length-1,qe=de.length-1;for(pe=0;pe<xe;pe++)if(X.charCodeAt(Ke-pe)!==de.charCodeAt(qe-pe))return pe;return xe}function w(X){return 55296<=X&&X<=56319}function T(X){return 56320<=X&&X<=57343}function F(X,de){return(X-55296<<10)+(de-56320)+65536}function P(X,de,pe){const xe=X.charCodeAt(pe);if(w(xe)&&pe+1<de){const Ke=X.charCodeAt(pe+1);if(T(Ke))return F(xe,Ke)}return xe}function A(X,de){const pe=X.charCodeAt(de-1);if(T(pe)&&de>1){const xe=X.charCodeAt(de-2);if(w(xe))return F(xe,pe)}return pe}function z(X,de){const pe=ne.getInstance(),xe=de,Ke=X.length,qe=P(X,Ke,de);de+=qe>=65536?2:1;let tt=pe.getGraphemeBreakType(qe);for(;de<Ke;){const et=P(X,Ke,de),it=pe.getGraphemeBreakType(et);if(Ce(tt,it))break;de+=et>=65536?2:1,tt=it}return de-xe}function K(X,de){const pe=ne.getInstance(),xe=de,Ke=A(X,de);de-=Ke>=65536?2:1;let qe=pe.getGraphemeBreakType(Ke);for(;de>0;){const tt=A(X,de),et=pe.getGraphemeBreakType(tt);if(Ce(et,qe))break;de-=tt>=65536?2:1,qe=et}return xe-de}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(X){return O.test(X)}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 D(X){return U.test(X)}const W=/^[\t\n\r\x20-\x7E]*$/;function Q(X){return W.test(X)}const re=/[\u2028\u2029]/;function ee(X){return re.test(X)}function ye(X){for(let de=0,pe=X.length;de<pe;de++)if(be(X.charCodeAt(de)))return!0;return!1}function be(X){return X=+X,X>=11904&&X<=55215||X>=63744&&X<=64255||X>=65281&&X<=65374}function he(X){return X>=127462&&X<=127487||X===8986||X===8987||X===9200||X===9203||X>=9728&&X<=10175||X===11088||X===11093||X>=127744&&X<=128591||X>=128640&&X<=128764||X>=128992&&X<=129003||X>=129280&&X<=129535||X>=129648&&X<=129750}const Ie=String.fromCharCode(65279);function Se(X){return!!(X&&X.length>0&&X.charCodeAt(0)===65279)}function fe(X,de=!1){return X?(de&&(X=X.replace(/\\./g,"")),X.toLowerCase()!==X):!1}function ue(X){const de=90-65+1;return X=X%(2*de),X<de?String.fromCharCode(97+X):String.fromCharCode(65+X-de)}function ie(X){const de=ne.getInstance();return de.getGraphemeBreakType(X)}function Ce(X,de){return X===0?de!==5&&de!==7:X===2&&de===3?!1:X===4||X===2||X===3||(de===4||de===2||de===3)?!0:X===8&&(de===8||de===9||de===11||de===12)||((X===11||X===9)&&(de===9||de===10)||((X===12||X===10)&&de===10||(de===5||de===13||(de===7||(X===1||X===13&&de===14)))))?!1:!(X===6&&de===6)}class ne{constructor(){this._data=ce()}static getInstance(){return ne._INSTANCE||(ne._INSTANCE=new ne),ne._INSTANCE}getGraphemeBreakType(X){if(X<32)return X===10?3:X===13?2:4;if(X<127)return 0;const de=this._data,pe=de.length/3;let xe=1;for(;xe<=pe;)if(X<de[3*xe])xe=2*xe;else if(X>de[3*xe+1])xe=2*xe+1;else return de[3*xe+2];return 0}}ne._INSTANCE=null;function ce(){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 Ae(X,de){if(X===0)return 0;const pe=oe(X,de);if(pe!==void 0)return pe;const xe=A(de,X);return X-=q(xe),X}function oe(X,de){let pe=A(de,X);for(X-=q(pe);$(pe)||pe===65039||pe===8419;){if(X===0)return;pe=A(de,X),X-=q(pe)}if(!he(pe))return;if(X>=0){const xe=A(de,X);xe===8205&&(X-=q(xe))}return X}function q(X){return X>=65536?2:1}function $(X){return 127995<=X&&X<=127999}},NFKh:function(H,J,I){(function(N,g,S){H.exports=J=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,J,I){"use strict";I.d(J,"a",function(){return m});var N=I("Kwbf");function g(C,_){var e=new Set;return C.forEach(function(f){_.has(f)||e.add(f)}),e}function S(C){var _=C||{},e=_.disabled,f=_.disableCheckbox,r=_.checkable;return!!(e||f)||r===!1}function k(C,_,e,f){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 s=u.key,l=u.node,E=u.children,b=E===void 0?[]:E;r.has(s)&&!f(l)&&b.filter(function(p){return!f(p.node)}).forEach(function(p){r.add(p.key)})})}for(var o=new Set,h=e;h>=0;h-=1){var d=_.get(h)||new Set;d.forEach(function(u){var s=u.parent,l=u.node;if(f(l)||!u.parent||o.has(u.parent.key))return;if(f(u.parent.node)){o.add(s.key);return}var E=!0,b=!1;(s.children||[]).filter(function(p){return!f(p.node)}).forEach(function(p){var L=p.key,R=r.has(L);E&&!R&&(E=!1),!b&&(R||c.has(L))&&(b=!0)}),E&&r.add(s.key),b&&c.add(s.key),o.add(s.key)})}return{checkedKeys:Array.from(r),halfCheckedKeys:Array.from(g(c,r))}}function y(C,_,e,f,r){for(var c=new Set(C),i=new Set(_),n=0;n<=f;n+=1){var o=e.get(n)||new Set;o.forEach(function(s){var l=s.key,E=s.node,b=s.children,p=b===void 0?[]:b;!c.has(l)&&!i.has(l)&&!r(E)&&p.filter(function(L){return!r(L.node)}).forEach(function(L){c.delete(L.key)})})}i=new Set;for(var h=new Set,d=f;d>=0;d-=1){var u=e.get(d)||new Set;u.forEach(function(s){var l=s.parent,E=s.node;if(r(E)||!s.parent||h.has(s.parent.key))return;if(r(s.parent.node)){h.add(l.key);return}var b=!0,p=!1;(l.children||[]).filter(function(L){return!r(L.node)}).forEach(function(L){var R=L.key,v=c.has(R);b&&!v&&(b=!1),!p&&(v||i.has(R))&&(p=!0)}),b||c.delete(l.key),p&&i.add(l.key),h.add(l.key)})}return{checkedKeys:Array.from(c),halfCheckedKeys:Array.from(g(i,c))}}function m(C,_,e,f){var r=[],c;f?c=f:c=S;var i=new Set(C.filter(function(d){var u=!!e[d];return u||r.push(d),u})),n=new Map,o=0;Object.keys(e).forEach(function(d){var u=e[d],s=u.level,l=n.get(s);l||(l=new Set,n.set(s,l)),l.add(u),o=Math.max(o,s)}),Object(N.a)(!r.length,"Tree missing follow keys: ".concat(r.slice(0,100).map(function(d){return"'".concat(d,"'")}).join(", ")));var h;return _===!0?h=k(i,n,o,c):h=y(i,_.halfCheckedKeys,n,o,c),h}},OLod:function(H,J,I){(function(N,g,S){H.exports=J=g(I("Ib8C"),I("K3mO"))})(this,function(N){N.lib.Cipher||function(g){var S=N,k=S.lib,y=k.Base,m=k.WordArray,C=k.BufferedBlockAlgorithm,_=S.enc,e=_.Utf8,f=_.Base64,r=S.algo,c=r.EvpKDF,i=k.Cipher=C.extend({cfg:y.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:L}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}),o=S.mode={},h=k.BlockCipherMode=y.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=o.CBC=function(){var w=h.extend();w.Encryptor=w.extend({processBlock:function(F,P){var A=this._cipher,z=A.blockSize;T.call(this,F,P,z),A.encryptBlock(F,P),this._prevBlock=F.slice(P,P+z)}}),w.Decryptor=w.extend({processBlock:function(F,P){var A=this._cipher,z=A.blockSize,K=F.slice(P,P+z);A.decryptBlock(F,P),T.call(this,F,P,z),this._prevBlock=K}});function T(F,P,A){var z,K=this._iv;K?(z=K,this._iv=g):z=this._prevBlock;for(var O=0;O<A;O++)F[P+O]^=z[O]}return w}(),u=S.pad={},s=u.Pkcs7={pad:function(w,T){for(var F=T*4,P=F-w.sigBytes%F,A=P<<24|P<<16|P<<8|P,z=[],K=0;K<P;K+=4)z.push(A);var O=m.create(z,P);w.concat(O)},unpad:function(w){var T=w.words[w.sigBytes-1>>>2]&255;w.sigBytes-=T}},l=k.BlockCipher=i.extend({cfg:i.cfg.extend({mode:d,padding:s}),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=y.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(f)},parse:function(w){var T,F=f.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})}},L=k.SerializableCipher=y.extend({cfg:y.extend({format:p}),encrypt:function(w,T,F,P){P=this.cfg.extend(P);var A=w.createEncryptor(F,P),z=A.finalize(T),K=A.cfg;return E.create({ciphertext:z,key:F,iv:K.iv,algorithm:w,mode:K.mode,padding:K.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={},v=R.OpenSSL={execute:function(w,T,F,P){P||(P=m.random(64/8));var A=c.create({keySize:T+F}).compute(w,P),z=m.create(A.words.slice(T),F*4);return A.sigBytes=T*4,E.create({key:A,iv:z,salt:P})}},x=k.PasswordBasedCipher=L.extend({cfg:L.cfg.extend({kdf:v}),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 z=L.encrypt.call(this,w,T,A.key,P);return z.mixIn(A),z},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 z=L.decrypt.call(this,w,T,A.key,P);return z}})}()})},OZM5:function(H,J,I){"use strict";I.d(J,"b",function(){return f}),I.d(J,"a",function(){return r}),I.d(J,"k",function(){return c}),I.d(J,"h",function(){return i}),I.d(J,"i",function(){return n}),I.d(J,"g",function(){return o}),I.d(J,"c",function(){return h}),I.d(J,"d",function(){return d}),I.d(J,"j",function(){return l}),I.d(J,"e",function(){return E}),I.d(J,"f",function(){return b});var N=I("KQm4"),g=I("U8pU"),S=I("Ff2n"),k=I("q1tI"),y=I.n(k),m=I("Kwbf"),C=I("WaYH"),_=.25,e=2;function f(p,L){var R=p.slice(),v=R.indexOf(L);return v>=0&&R.splice(v,1),R}function r(p,L){var R=p.slice();return R.indexOf(L)===-1&&R.push(L),R}function c(p){return p.split("-")}function i(p,L){return"".concat(p,"-").concat(L)}function n(p){return p&&p.type&&p.type.isTreeNode}function o(p,L){var R=[p],v=L[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(v.children),R}function h(p,L){var R=p.clientY,v=L.selectHandle.getBoundingClientRect(),x=v.top,w=v.bottom,T=v.height,F=Math.max(T*_,e);return R<=x+F?-1:R>=w-F?1:0}function d(p,L){if(!p)return;var R=L.multiple;return R?p.slice():p.length?[p[0]]:p}var u=function(L){return L};function s(p,L){if(!p)return[];var R=L||{},v=R.processProps,x=v===void 0?u:v,w=Array.isArray(p)?p:[p];return w.map(function(T){var F=T.children,P=Object(S.a)(T,["children"]),A=s(F,L);return y.a.createElement(C.a,Object.assign({},x(P)),A)})}function l(p){if(!p)return null;var L;if(Array.isArray(p))L={checkedKeys:p,halfCheckedKeys:void 0};else if(Object(g.a)(p)==="object")L={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 L}function E(p,L){var R=new Set;function v(x){if(R.has(x))return;var w=L[x];if(!w)return;R.add(x);var T=w.parent,F=w.node;if(F.disabled)return;T&&v(T.key)}return(p||[]).forEach(function(x){v(x)}),Object(N.a)(R)}function b(p){var L={};return Object.keys(p).forEach(function(R){(R.startsWith("data-")||R.startsWith("aria-"))&&(L[R]=p[R])}),L}},Ot1p:function(H,J,I){"use strict";var N=I("2qtc"),g=I("kLXV"),S=I("rAM+"),k=I("miYZ"),y=I("tsqr"),m=I("9og8"),C=I("tJVT"),_=I("jrin"),e=I("WmNS"),f=I.n(e),r=I("q1tI"),c=I.n(r),i=I("VrN/"),n=I.n(i),o=I("bdgK"),h=I("p77/"),d=I("Bd2K"),u=I("ELLl"),s=I("19Vz"),l=I("lZu9"),E=I("+NIl"),b=I("kSUc"),p=I("9Bee"),L=function(He){var rt=He.value,ct=rt===void 0?"":rt,yt=He.className,ht=He.showTextOnly,pt=He.showLines,Dt=He.style,At=Dt===void 0?{}:Dt,bt=Object(r.useMemo)(function(){return""},[ct]);return c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{dangerouslySetInnerHTML:{__html:bt}}))},R=I("0Owb"),v=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(He){var rt=He.onActionCallback,ct=He.title,yt=He.icon,ht=He.actionName,pt=He.className,Dt=pt===void 0?"":pt,At=He.children;function bt(){rt(ht)}return c.a.createElement("a",{title:ct,className:Dt,onClick:bt},c.a.createElement("i",{className:"md-iconfont ".concat(yt)}),At)}var A=function(He){var rt=He.watch,ct=He.showNullButton,yt=He.onActionCallback,ht=He.fullScreen,pt=He.insertTemp,Dt=He.hidetoolBar,At=He.uuid,bt=He.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(At,"&api=").concat(encodeURIComponent(T.a.PROXY_SERVER)));var Xt=[].concat(F,[{title:"".concat(rt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(rt?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return c.a.createElement("ul",{className:"markdown-toolbar-container"},!Dt&&Xt.map(function(Gt,rr){return c.a.createElement("li",{key:rr},Gt.actionName?c.a.createElement(P,Object(R.a)({},Gt,{onActionCallback:yt})):c.a.createElement("span",{className:"v-line"}))}),ct?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:yt},c.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,pt&&c.a.createElement("li",null,c.a.createElement(P,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(pt),onActionCallback:yt},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(ht?"icon-shrink":"icon-enlarge"),title:ht?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:yt})))},z=I("M8RZ"),K=I("+L6B"),O=I("2/Rp"),B=I("y8nQ"),U=I("Vl3Y"),D=I("5NDa"),W=I("5rEg"),Q={labelCol:{span:4},wrapperCol:{span:20}},re=function(He){var rt=He.callback,ct=He.onCancel;function yt(ht){rt(ht)}return c.a.createElement(U.a,Object(R.a)({},Q,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:yt}),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(W.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(W.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:ct},"\u53D6\u6D88")))},ee=I("7ahc"),ye=I("HmJG"),be=I("BjJ7"),he=U.a.useForm,Ie={width:280,marginRight:10},Se={labelCol:{span:5},wrapperCol:{span:19}},fe=function(He){var rt=He.callback,ct=He.onCancel,yt=he(),ht=Object(C.a)(yt,1),pt=ht[0];function Dt(Xt){rt(Xt)}function At(Xt,Gt){if(Xt.status===-1){y.b.error(Xt.message);return}pt.setFieldsValue({src:"/api/attachments/".concat(Xt.id),type:Gt.type})}function bt(Xt){var Gt=Xt.target.files[0];ie(Gt,At)}return c.a.createElement(U.a,Object(R.a)({form:pt},Se,{className:"upload-image-panel",onFinish:Dt}),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(W.a,{style:Ie})),c.a.createElement(ue,{onFileChange:bt}))),c.a.createElement(U.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},c.a.createElement(W.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:ct},"\u53D6\u6D88")))};function ue(He){var rt=He.onFileChange;return c.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",c.a.createElement("input",{type:"file",onChange:rt}))}function ie(He,rt){if(!He)throw new String("\u6CA1\u6709\u6587\u4EF6");var ct=new FormData;ct.append("editormd-image-file",He),ct.append("file_param_name","editormd-image-file"),ct.append("byxhr","true");var yt=new window.XMLHttpRequest;yt.withCredentials=!0,yt.addEventListener("load",function(ht){rt(JSON.parse(ht.target.responseText),He)},!1),yt.addEventListener("error",function(ht){console.error(ht)},!1),yt.open("POST","".concat(be.a,"/api/attachments.json")),yt.send(ct)}var Ce=I("giR+"),ne=I("fyUT"),ce=I("7Kak"),Ae=I("9yH6"),oe=Ae.a.Group,q={margin:"0 8px"},$=function(He){var rt=He.callback,ct=He.onCancel;function yt(ht){rt(ht)}return c.a.createElement(U.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:yt},c.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},c.a.createElement("span",{style:q},"\u5355\u5143\u683C\u6570\uFF1A"),c.a.createElement("span",{style:q},"\u884C\u6570"),c.a.createElement(U.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},c.a.createElement(ne.a,null)),c.a.createElement("span",{style:q},"\u5217\u6570"),c.a.createElement(U.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},c.a.createElement(ne.a,null))),c.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},c.a.createElement("span",{style:q},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),c.a.createElement(U.a.Item,{name:"align"},c.a.createElement(oe,null,c.a.createElement(Ae.a,{value:"default"},c.a.createElement("i",{className:"fa fa-align-justify"})),c.a.createElement(Ae.a,{value:"left"},c.a.createElement("i",{className:"fa fa-align-left"})),c.a.createElement(Ae.a,{value:"center"},c.a.createElement("i",{className:"fa fa-align-center"})),c.a.createElement(Ae.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:ct},"\u53D6\u6D88")))},X=I("ErOA"),de=I("7Cbv"),pe="link",xe="upload-image",Ke="code-block",qe="add-table",tt="------------",et={default:tt,left:":".concat(tt),center:":".concat(tt,":"),right:"".concat(tt,":")},it=I("9VGf"),at,je;function De(){}var nt=0,lt=1e4,Ve="\u2581",Qe=`
**\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 Fe(He){return/^\d+$/.test(He)?"".concat(He,"px"):He}var Re=navigator.platform.toUpperCase().indexOf("MAC")>=0,Me=Re?"Cmd":"Ctrl",Ee=["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"],Oe=(at={},Object(_.a)(at,Me+"-B","bold"),Object(_.a)(at,Me+"-I","italic"),at),ke=(je={},Object(_.a)(je,pe,"\u6DFB\u52A0\u94FE\u63A5"),Object(_.a)(je,Ke,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(_.a)(je,xe,"\u6DFB\u52A0\u6587\u4EF6"),Object(_.a)(je,qe,"\u6DFB\u52A0\u8868\u683C"),je),Ne=J.a=function(He){var rt=He.defaultValue,ct=rt===void 0?"":rt,yt=He.onChange,ht=He.width,pt=ht===void 0?"100%":ht,Dt=He.height,At=Dt===void 0?400:Dt,bt=He.miniToolbar,Xt=bt===void 0?!1:bt,Gt=He.isFocus,rr=Gt===void 0?!1:Gt,sr=He.watch,Kt=He.insertTemp,kt=He.mode,ir=kt===void 0?"markdown":kt,_t=He.id,Mt=_t===void 0?"markdown-editor-id":_t,Rt=He.showResizeBar,Ot=Rt===void 0?!1:Rt,qt=He.noStorage,Jr=qt===void 0?!1:qt,Et=He.showNullButton,It=Et===void 0?!1:Et,wt=He.hidetoolBar,Er=wt===void 0?!1:wt,nr=He.fullScreen,Bt=nr===void 0?!1:nr,Nt=He.onBlur,vr=He.onCMBeforeChange,Qr=He.onFullScreen,Cr=He.className,vt=Cr===void 0?"":Cr,Ht=He.disablePaste,Zr=Ht===void 0?!1:Ht,ln=He.placeholder,kn=ln===void 0?"":ln,Cn=He.values,le=Cn===void 0?"":Cn,V=Object(r.useState)(null),Y=Object(C.a)(V,2),te=Y[0],ve=Y[1],ae=Object(r.useState)(ct),ze=Object(C.a)(ae,2),ft=ze[0],Ct=ze[1],Wt=Object(r.useState)(sr),gt=Object(C.a)(Wt,2),Yt=gt[0],er=gt[1],Hr=Object(r.useState)(Bt),on=Object(C.a)(Hr,2),Gr=on[0],lr=on[1],qr=Object(r.useState)(""),On=Object(C.a)(qr,2),zt=On[0],mr=On[1],pr=Object(r.useState)(0),jr=Object(C.a)(pr,2),Tr=jr[0],li=jr[1],An=Object(r.useState)(At),Ui=Object(C.a)(An,2),Bi=Ui[0],qn=Ui[1],un=Object(r.useState)(!1),Si=Object(C.a)(un,2),hn=Si[0],Yn=Si[1],en=Object(r.useRef)(Object(de.a)()),hr=Object(r.useRef)(!1),nn=Object(r.useRef)(),xr=Object(r.useRef)(),fn=Object(r.useRef)(),Fr=Object(r.useRef)(),mi=Object(r.useRef)(),En=function(){var $t=Object(m.a)(f.a.mark(function ur(){var Qt,yr;return f.a.wrap(function(zr){for(;;)switch(zr.prev=zr.next){case 0:return zr.next=2,Object(X.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:en.current}});case 2:yr=zr.sent,yr!=null&&(Qt=yr.attachments)!==null&&Qt!==void 0&&Qt.length&&(console.log("cm:",te,xr),yr.attachments.map(function(Rr){Rr.content_type.indexOf("image")>-1?te.replaceSelection("![,](/api/attachments/".concat(Rr.id,"?type=").concat(Rr.content_type,")")):Rr.content_type.indexOf("video")>-1?te.replaceSelection('<video width="100%" controls src="'.concat(T.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):Rr.content_type.indexOf("pdf")>-1?te.replaceSelection('<a href="'.concat(T.a.API_SERVER,"/api/attachments/").concat(Rr.id,"?type=").concat(Rr.content_type,'&disposition=inline" target="_blank">').concat(Rr.name,"</a>")):te.replaceSelection("[".concat(Rr.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(Rr.id,"?type=").concat(Rr.content_type,")"))}));case 4:case"end":return zr.stop()}},ur)}));return function(){return $t.apply(this,arguments)}}();Object(r.useEffect)(function(){Ct(le),te==null||te.setValue(le)},[le]),Object(r.useEffect)(function(){Qr==null||Qr(Gr)},[Gr]),Object(r.useEffect)(function(){if(xr.current){var $t=n.a.fromTextArea(xr.current,{mode:ir,lineNumbers:!Xt,lineWrapping:!0,value:ct,autoCloseTags:!0,autoCloseBrackets:!0});rr&&$t.focus();function ur(Qt,yr){if(Zr){yr.preventDefault();return}var kr=yr.clipboardData;if(kr){var zr=kr.types.toString(),Rr=kr.items;if(zr==="Files"||kr.types.indexOf("Files")>-1){if(yr.preventDefault(),ir=="stex")return;try{var vn,$n=Rr[1];((vn=Rr[0])===null||vn===void 0?void 0:vn.kind)==="file"&&($n=Rr[0]);var Sr=$n.getAsFile(),Ei=Sr.name.split(".").pop();ie(Sr,function(Vr){if(Vr.id){var jn,Bn,gi;(Sr==null||((jn=Sr.type)===null||jn===void 0)?void 0:jn.indexOf("image"))>-1?$t.replaceSelection("![,](/api/attachments/".concat(Vr.id,"?type=").concat(Vr.content_type,")")):(Sr==null||((Bn=Sr.type)===null||Bn===void 0)?void 0:Bn.indexOf("video"))>-1?$t.replaceSelection('<video width="100%" controls src="'.concat(T.a.API_SERVER,"/api/attachments/").concat(Vr.id,'"></video>')):(Sr==null||((gi=Sr.type)===null||gi===void 0)?void 0:gi.indexOf("pdf"))>-1?$t.replaceSelection('<a href="'.concat(T.a.API_SERVER,"/api/attachments/").concat(Vr.id,"?type=").concat(Sr.type,'&disposition=inline" target="_blank">').concat(Sr.name,"</a>")):Ee.includes(Ei)?$t.replaceSelection('<a href="'.concat(T.a.API_SERVER,"/api/attachments/").concat(Vr.id,'?type=office&disposition=inline" target="_blank">').concat(Sr.name,"</a>")):$t.replaceSelection("[".concat(Sr.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(Vr.id,"?type=").concat(Vr.content_type,")"))}else(Vr==null?void 0:Vr.status)===401&&(document.location.href="/user/login")})}catch(Vr){y.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return $t.on("paste",ur),$t.on("dragleave",function(Qt,yr){fn.current.classList.remove("mouse-hover-md")}),$t.on("dragover",function(Qt,yr){fn.current.classList.add("mouse-hover-md")}),$t.on("drop",function(Qt,yr){fn.current.classList.add("mouse-hover-md");var kr;if(kr=yr.dataTransfer.files,kr.length>0){yr.preventDefault(),yr.stopPropagation();for(var zr=function($n){var Sr=kr[$n],Ei=Sr.name.split(".").pop();ie(Sr,function(Vr){if(Vr.id){var jn,Bn,gi;(Sr==null||((jn=Sr.type)===null||jn===void 0)?void 0:jn.indexOf("image"))>-1?$t.replaceSelection("![,](/api/attachments/".concat(Vr.id,"?type=").concat(Vr.content_type,")")):(Sr==null||((Bn=Sr.type)===null||Bn===void 0)?void 0:Bn.indexOf("video"))>-1?$t.replaceSelection('<video width="100%" controls src="'.concat(T.a.API_SERVER,"/api/attachments/").concat(Vr.id,'"></video>')):(Sr==null||((gi=Sr.type)===null||gi===void 0)?void 0:gi.indexOf("pdf"))>-1?$t.replaceSelection('<a href="'.concat(T.a.API_SERVER,"/api/attachments/").concat(Vr.id,"?type=").concat(Sr.type,'&disposition=inline" target="_blank">').concat(Sr.name,"</a>")):Ee.includes(Ei)?$t.replaceSelection('<a href="'.concat(T.a.API_SERVER,"/api/attachments/").concat(Vr.id,'?type=office&disposition=inline" target="_blank">').concat(Sr.name,"</a>")):$t.replaceSelection("[".concat(Sr.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(Vr.id,"?type=").concat(Vr.content_type,")"))}else(Vr==null?void 0:Vr.status)===401&&(document.location.href="/user/login")})},Rr=0;Rr<kr.length;Rr++)zr(Rr)}}),ve($t),function(){$t.off("paste",ur)}}},[]);var Un=Object(r.useCallback)(function(){if(fn.current)try{}catch($t){console.log($t,"---- to set md editor body height")}},[Bi,fn,Gr]);Object(r.useEffect)(function(){function $t(){var Qt=new o.default(function(yr){var kr=Object(S.a)(yr),zr;try{for(kr.s();!(zr=kr.n()).done;){var Rr=zr.value;(Rr.target.offsetHeight>0||Rr.target.offsetWidth>0)&&(Un(),te.setSize("100%","100%"),te.refresh())}}catch(vn){kr.e(vn)}finally{kr.f()}});return Qt.observe(xr.current.parentElement),Qt}if(te){var ur=$t();return function(){ur.unobserve(xr.current.parentElement)}}},[te,Un]),Object(r.useEffect)(function(){if(te){for(var $t=[],ur=function(){var Rr=yr[Qt];kr=Object(C.a)(Rr,2);var vn=kr[0],$n=kr[1],Sr=Object(_.a)({},vn,function(){Di($n)});$t.push(Sr),te.addKeyMap(Sr)},Qt=0,yr=Object.entries(Oe);Qt<yr.length;Qt++){var kr;ur()}return nn.current=setInterval(function(){hr.current&&En()},4e3),function(){clearInterval(nn.current);var zr=Object(S.a)($t),Rr;try{for(zr.s();!(Rr=zr.n()).done;){var vn=Rr.value;te.removeKeyMap(vn)}}catch($n){zr.e($n)}finally{zr.f()}}}},[te]),Object(r.useEffect)(function(){Bt!==Gr&&lr(Bt)},[Bt]),Object(it.a)(function(){if(!Jr&&Tr>0){var $t=new Date().getTime(),ur=window.sessionStorage.getItem(Mt);$t>=Tr+lt&&(!ur||ur!==ft)&&(window.sessionStorage.setItem(Mt,ft),Yn(!0))}},lt),Object(r.useEffect)(function(){er(sr)},[te,sr]),Object(r.useEffect)(function(){te&&(rr&&te.focus())},[te,rr]),Object(r.useEffect)(function(){if(Yt&&te){var $t=te.getScrollerElement();function ur(Qt){var yr=Qt.target;if(mi.current){var kr=yr.scrollTop/yr.scrollHeight;mi.current.scrollTop=mi.current.scrollHeight*kr}}return $t.addEventListener("scroll",ur),function(){$t.removeEventListener("scroll",ur)}}},[te,Yt]),Object(r.useEffect)(function(){if(te&&vr){function $t(ur,Qt){vr(ur,Qt)}return te.on("beforeChange",$t),function(){te.off("beforeChange",$t)}}},[te,vr]),Object(r.useEffect)(function(){if(te&&Nt){function $t(){Nt(te.getValue())}return te.on("blur",$t),function(){te.off("blur",$t)}}},[te,Nt]),Object(r.useEffect)(function(){if(te){function $t(ur){var Qt=ur.getValue();Ct(Qt),li(new Date().getTime()),ur.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),yt&&yt(Qt)}return te.on("change",$t),function(){te.off("change",$t)}}},[te,yt]),Object(r.useEffect)(function(){te&&(ct==null?(te.setValue(""),Ct("")):ct!==te.getValue()&&(te.setValue(ct),Ct(ct),te.setCursor(te.lineCount(),0)))},[te,ct]);var Di=Object(r.useCallback)(function($t){var ur=te.getCursor(),Qt=te.getSelection(),yr=Qt.split(`
`);switch($t){case"bold":return te.replaceSelection("**"+Qt+"**"),Qt===""&&te.setCursor(ur.line,ur.ch+2),te.focus();case"italic":return te.replaceSelection("*"+Qt+"*"),Qt===""&&te.setCursor(ur.line,ur.ch+1),te.focus();case"code":return te.replaceSelection("`"+Qt+"`"),Qt===""&&te.setCursor(ur.line,ur.ch+1),te.focus();case"inline-latex":return te.replaceSelection("`$$"+Qt+"$$`"),Qt===""&&te.setCursor(ur.line,ur.ch+3),te.focus();case"latex":return te.replaceSelection("```latex\n"+Qt+"\n```"),te.setCursor(ur.line+1,Qt.length+1),te.focus();case"line-break":return te.replaceSelection(`<br/>
`),te.focus();case"list-ul":return Qt===""?te.replaceSelection("- "+Qt):te.replaceSelection(yr.map(function(kr){return kr===""?"":"- ".concat(kr)}).join(`
`)),te.focus();case"list-ol":return Qt===""?te.replaceSelection("1. "+Qt):te.replaceSelection(yr.map(function(kr,zr){return kr===""?"":"".concat(zr+1,". ").concat(kr)}).join(`
`)),te.focus();case"add-null-ch":return Qt===""&&te.setCursor(ur.line,ur.ch+1),te.replaceSelection(Ve),te.focus();case"inster-template-1":return Qt===""&&te.setCursor(ur.line,ur.ch),te.replaceSelection(Qe),te.focus();case"eraser":return te.setValue(""),te.focus();case"trigger-watch":return er(!Yt),te.focus();case"trigger-full-screen":return lr(!Gr),te.focus();case pe:mr(pe);return;case Ke:mr(Ke);return;case xe:mr(xe);return;case qe:mr(qe);return;default:throw new Error}},[te,Yt,Gr]),ui=Object(r.useCallback)(function($t){mr("");switch(zt){case pe:var ur=$t.title,Qt=$t.link;return te.replaceSelection("[".concat(ur,"](").concat(Qt,")")),te.focus();case Ke:var yr=$t.language,kr=$t.content;return te.replaceSelection(["```"+yr,kr,"```"].join(`
`)),te.focus();case xe:var zr=$t.src,Rr=$t.alt;return Rr?te.replaceSelection("![ ".concat(Rr," ]( ").concat(zr,' "').concat(Rr,'" )')):te.replaceSelection("![,](".concat(zr,")")),te.focus();case qe:for(var vn=$t.row,$n=$t.col,Sr=$t.align,Ei=`
`,Vr=0;Vr<vn;Vr++){for(var jn=[],Bn=[],gi=0;gi<$n;gi++)Vr===1&&Bn.push(et[Sr]),jn.push(" ");Vr===1&&(Ei+="| ".concat(Bn.join(" | "),` |
`)),Ei+="| ".concat(jn.join($n===1?"":" | "),` |
`)}return te.replaceSelection(Ei+`
`),te.focus();default:throw new Error}},[te,zt]),bi=Object(r.useMemo)(function(){switch(zt){case pe:return c.a.createElement(re,{callback:ui,onCancel:ei});case Ke:return c.a.createElement(ee.b,{callback:ui,onCancel:ei});case xe:return c.a.createElement(fe,{callback:ui,onCancel:ei});case qe:return c.a.createElement($,{callback:ui,onCancel:ei});default:return null}},[zt]);function ei(){mr("")}Object(r.useEffect)(function(){if(Fr.current){var $t=Fr.current,ur=!1,Qt=0;function yr(Rr){ur=!0,Qt=Rr.pageY}function kr(){ur=!1}function zr(Rr){if(ur){var vn=Rr.pageY-Qt;vn<0&&(vn=0),vn>300&&(vn=300);var $n=At+vn+"px";qn($n)}}return $t.addEventListener("mousedown",yr),document.addEventListener("mousemove",zr),document.addEventListener("mouseup",kr),function(){$t.removeEventListener("mousedown",yr),document.removeEventListener("mousemove",zr),document.removeEventListener("mouseup",kr)}}},[te,Fr]),Object(r.useEffect)(function(){qn(At)},[At]);var ti=Fe(pt),ji=Fe(Bi),ci={width:ti,height:ji},_i=Object(r.useMemo)(function(){if(Tr){var $t=new Date(Tr),ur=$t.getHours(),Qt=$t.getMinutes(),yr=$t.getSeconds();return ur=ur<10?"0"+ur:ur,Qt=Qt<10?"0"+Qt:Qt,yr=yr<10?"0"+yr:yr,"".concat(ur,":").concat(Qt,":").concat(yr)}return 0},[Tr]);function Hi(){window.sessionStorage.removeItem(Mt),Yn(!1),li(0)}function di(){Yn(!1),li(0),te.setValue(window.sessionStorage.getItem(Mt))}function tn($t,ur){var Qt=te.getValue();Qt=Qt.replace($t,ur),Ct(Qt),te==null||te.setValue(Qt)}return c.a.createElement(r.Fragment,null,c.a.createElement("div",{className:"markdown-editor-wrapper",ref:fn},c.a.createElement("div",{className:"markdown-editor-container ".concat(vt," ").concat(Yt?"on-preview":""," ").concat(Xt?"mini":""," ").concat(Gr?"full-screen":""),style:ci},c.a.createElement(A,{insertTemp:Kt,watch:Yt,fullScreen:Gr,showNullButton:It,onActionCallback:Di,hidetoolBar:Er,uuid:en.current,setOpenPhones:function(){hr.current=!0}}),c.a.createElement("div",{className:"markdown-editor-body"},c.a.createElement("div",{className:"codemirror-container"},c.a.createElement("textarea",{ref:xr,placeholder:kn})),Yt?c.a.createElement("div",{ref:mi,className:"preview-container"},ir==="stex"&&c.a.createElement(L,{value:ft}),ir!=="stex"&&c.a.createElement(p.a,{edit:!0,value:ft,replaces:tn})):null))),Ot?c.a.createElement("a",{ref:Fr,className:"editor-resize"}):null,c.a.createElement(z.a,null,ke[zt]?c.a.createElement(g.a,{centered:!0,title:ke[zt],visible:!0,onCancel:ei,footer:null,className:"markdown-popup-form"},bi):null))}},PD8m:function(H,J){H.exports={name:"memoryStorage",read:N,write:g,each:S,remove:k,clearAll:y};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 y(m){I={}}},PVpz:function(H,J,I){(function(N,g,S){H.exports=J=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,y=g.algo,m=[],C=[],_=[],e=y.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 o=0;o<4;o++)f.call(this);for(var o=0;o<8;o++)n[o]^=i[o+4&7];if(c){var h=c.words,d=h[0],u=h[1],s=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360,l=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,E=s>>>16|l&4294901760,b=l<<16|s&65535;n[0]^=s,n[1]^=E,n[2]^=l,n[3]^=b,n[4]^=s,n[5]^=E,n[6]^=l,n[7]^=b;for(var o=0;o<4;o++)f.call(this)}},_doProcessBlock:function(r,c){var i=this._X;f.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 f(){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],o=n&65535,h=n>>>16,d=((o*o>>>17)+o*h>>>15)+h*h,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,J,I){var N=I("MFOe"),g=N.Global;H.exports={name:"oldIE-userDataStorage",write:C,read:_,each:e,remove:f,clearAll:r};var S="storejs",k=g.document,y=n(),m=(g.navigator?g.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function C(o,h){if(m)return;var d=i(o);y(function(u){u.setAttribute(d,h),u.save(S)})}function _(o){if(m)return;var h=i(o),d=null;return y(function(u){d=u.getAttribute(h)}),d}function e(o){y(function(h){for(var d=h.XMLDocument.documentElement.attributes,u=d.length-1;u>=0;u--){var s=d[u];o(h.getAttribute(s.name),s.name)}})}function f(o){var h=i(o);y(function(d){d.removeAttribute(h),d.save(S)})}function r(){y(function(o){var h=o.XMLDocument.documentElement.attributes;o.load(S);for(var d=h.length-1;d>=0;d--)o.removeAttribute(h[d].name);o.save(S)})}var c=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function i(o){return o.replace(/^\d/,"___$&").replace(c,"___")}function n(){if(!k||!k.documentElement||!k.documentElement.addBehavior)return null;var o="script",h,d,u;try{d=new ActiveXObject("htmlfile"),d.open(),d.write("<"+o+">document.w=window</"+o+'><iframe src="/favicon.ico"></iframe>'),d.close(),h=d.w.frames[0].document,u=h.createElement("div")}catch(s){u=k.createElement("div"),h=k.body}return function(s){var l=[].slice.call(arguments,0);l.unshift(u),h.appendChild(u),u.addBehavior("#default#userData"),u.load(S),s.apply(this,l),h.removeChild(u);return}}},S6kV:function(H,J,I){(function(N,g,S){H.exports=J=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,y){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 f=0;f<C;f++)k[y+f]^=e[f]}});return g.Decryptor=S,g}(),N.mode.OFB})},"SA+Z":function(H,J,I){var N=I("wTVA"),g=I("EbDI"),S=I("ZhPi"),k=I("wkBT");function y(m){return N(m)||g(m)||S(m)||k()}H.exports=y,H.exports.__esModule=!0,H.exports.default=H.exports},SJMd:function(H,J){/**
* @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,y;window.PR_SHOULD_USE_CONTINUATION=!0;var m,C;(function(){var _=window,e=["break,continue,do,else,for,if,return,while"],f=[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=[f,"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"],o="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",h=[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"],s=[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"],l=[e,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],E=[c,n,i,h,d,u,s,l],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",L="kwd",R="com",v="typ",x="lit",w="pun",T="pln",F="tag",P="dec",A="src",z="atn",K="atv",O="nocode",B="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function U(oe){for(var q=0,$=!1,X=!1,de=0,pe=oe.length;de<pe;++de){var xe=oe[de];if(xe.ignoreCase)X=!0;else if(/[a-z]/i.test(xe.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){$=!0,X=!1;break}}var Ke={b:8,t:9,n:10,v:11,f:12,r:13};function qe(je){var De=je.charCodeAt(0);if(De!==92)return De;var nt=je.charAt(1);return De=Ke[nt],De||("0"<=nt&&nt<="7"?parseInt(je.substring(1),8):nt==="u"||nt==="x"?parseInt(je.substring(2),16):je.charCodeAt(1))}function tt(je){if(je<32)return(je<16?"\\x0":"\\x")+je.toString(16);var De=String.fromCharCode(je);return De==="\\"||De==="-"||De==="]"||De==="^"?"\\"+De:De}function et(je){var De=je.substring(1,je.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")),nt=[],lt=De[0]==="^",Ve=["["];lt&&Ve.push("^");for(var Qe=lt?1:0,Fe=De.length;Qe<Fe;++Qe){var Re=De[Qe];if(/\\[bdsw]/i.test(Re))Ve.push(Re);else{var Me=qe(Re),Ee;Qe+2<Fe&&De[Qe+1]==="-"?(Ee=qe(De[Qe+2]),Qe+=2):Ee=Me,nt.push([Me,Ee]),Ee<65||Me>122||(Ee<65||Me>90||nt.push([Math.max(65,Me)|32,Math.min(Ee,90)|32]),Ee<97||Me>122||nt.push([Math.max(97,Me)&~32,Math.min(Ee,122)&~32]))}}nt.sort(function(He,rt){return He[0]-rt[0]||rt[1]-He[1]});for(var Oe=[],ke=[],Qe=0;Qe<nt.length;++Qe){var Ne=nt[Qe];Ne[0]<=ke[1]+1?ke[1]=Math.max(ke[1],Ne[1]):Oe.push(ke=Ne)}for(var Qe=0;Qe<Oe.length;++Qe){var Ne=Oe[Qe];Ve.push(tt(Ne[0])),Ne[1]>Ne[0]&&(Ne[1]+1>Ne[0]&&Ve.push("-"),Ve.push(tt(Ne[1])))}return Ve.push("]"),Ve.join("")}function it(je){for(var De=je.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")),nt=De.length,lt=[],Ve=0,Qe=0;Ve<nt;++Ve){var Fe=De[Ve];if(Fe==="(")++Qe;else if(Fe.charAt(0)==="\\"){var Re=+Fe.substring(1);Re&&(Re<=Qe?lt[Re]=-1:De[Ve]=tt(Re))}}for(var Ve=1;Ve<lt.length;++Ve)lt[Ve]===-1&&(lt[Ve]=++q);for(var Ve=0,Qe=0;Ve<nt;++Ve){var Fe=De[Ve];if(Fe==="(")++Qe,lt[Qe]||(De[Ve]="(?:");else if(Fe.charAt(0)==="\\"){var Re=+Fe.substring(1);Re&&Re<=Qe&&(De[Ve]="\\"+lt[Re])}}for(var Ve=0;Ve<nt;++Ve)De[Ve]==="^"&&De[Ve+1]!=="^"&&(De[Ve]="");if(je.ignoreCase&&$)for(var Ve=0;Ve<nt;++Ve){var Fe=De[Ve],Me=Fe.charAt(0);Fe.length>=2&&Me==="["?De[Ve]=et(Fe):Me!=="\\"&&(De[Ve]=Fe.replace(/[a-zA-Z]/g,function(ke){var Ne=ke.charCodeAt(0);return"["+String.fromCharCode(Ne&~32,Ne|32)+"]"}))}return De.join("")}for(var at=[],de=0,pe=oe.length;de<pe;++de){var xe=oe[de];if(xe.global||xe.multiline)throw new Error(""+xe);at.push("(?:"+it(xe)+")")}return new RegExp(at.join("|"),X?"gi":"g")}function D(oe,q){var $=/(?:^|\s)nocode(?:\s|$)/,X=[],de=0,pe=[],xe=0;function Ke(qe){var tt=qe.nodeType;if(tt==1){if($.test(qe.className))return;for(var et=qe.firstChild;et;et=et.nextSibling)Ke(et);var it=qe.nodeName.toLowerCase();(it==="br"||it==="li")&&(X[xe]=`
`,pe[xe<<1]=de++,pe[xe++<<1|1]=qe)}else if(tt==3||tt==4){var at=qe.nodeValue;at.length&&(q?at=at.replace(/\r\n?/g,`
`):at=at.replace(/[ \t\r\n]+/g," "),X[xe]=at,pe[xe<<1]=de,de+=at.length,pe[xe++<<1|1]=qe)}}return Ke(oe),{sourceCode:X.join("").replace(/\n$/,""),spans:pe}}function W(oe,q,$,X,de){if(!$)return;var pe={sourceNode:oe,pre:1,langExtension:null,numberLines:null,sourceCode:$,spans:null,basePos:q,decorations:null};X(pe),de.push.apply(de,pe.decorations)}var Q=/\S/;function re(oe){for(var q=void 0,$=oe.firstChild;$;$=$.nextSibling){var X=$.nodeType;q=X===1?q?oe:$:X===3&&Q.test($.nodeValue)?oe:q}return q===oe?void 0:q}function ee(oe,q){var $={},X;(function(){for(var xe=oe.concat(q),Ke=[],qe={},tt=0,et=xe.length;tt<et;++tt){var it=xe[tt],at=it[3];if(at)for(var je=at.length;--je>=0;)$[at.charAt(je)]=it;var De=it[1],nt=""+De;qe.hasOwnProperty(nt)||(Ke.push(De),qe[nt]=null)}Ke.push(/[\0-\uffff]/),X=U(Ke)})();var de=q.length,pe=function(xe){for(var Ke=xe.sourceCode,qe=xe.basePos,tt=xe.sourceNode,et=[qe,T],it=0,at=Ke.match(X)||[],je={},De=0,nt=at.length;De<nt;++De){var lt=at[De],Ve=je[lt],Qe=void 0,Fe;if(typeof Ve=="string")Fe=!1;else{var Re=$[lt.charAt(0)];if(Re)Qe=lt.match(Re[1]),Ve=Re[0];else{for(var Me=0;Me<de;++Me)if(Re=q[Me],Qe=lt.match(Re[1]),Qe){Ve=Re[0];break}Qe||(Ve=T)}Fe=Ve.length>=5&&Ve.substring(0,5)==="lang-",Fe&&!(Qe&&typeof Qe[1]=="string")&&(Fe=!1,Ve=A),Fe||(je[lt]=Ve)}var Ee=it;if(it+=lt.length,!Fe)et.push(qe+Ee,Ve);else{var Oe=Qe[1],ke=lt.indexOf(Oe),Ne=ke+Oe.length;Qe[2]&&(Ne=lt.length-Qe[2].length,ke=Ne-Oe.length);var He=Ve.substring(5);W(tt,qe+Ee,lt.substring(0,ke),pe,et),W(tt,qe+Ee+ke,Oe,ue(He,Oe),et),W(tt,qe+Ee+Ne,lt.substring(Ne),pe,et)}}xe.decorations=et};return pe}function ye(oe){var q=[],$=[];oe.tripleQuotedStrings?q.push([p,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):oe.multiLineStrings?q.push([p,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):q.push([p,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),oe.verbatimStrings&&$.push([p,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var X=oe.hashComments;X&&(oe.cStyleComments?(X>1?q.push([R,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):q.push([R,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),$.push([p,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):q.push([R,/^#[^\r\n]*/,null,"#"])),oe.cStyleComments&&($.push([R,/^\/\/[^\r\n]*/,null]),$.push([R,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var de=oe.regexLiterals;if(de){var pe=de>1?"":`
\r`,xe=pe?".":"[\\S\\s]",Ke="/(?=[^/*"+pe+"])(?:[^/\\x5B\\x5C"+pe+"]|\\x5C"+xe+"|\\x5B(?:[^\\x5C\\x5D"+pe+"]|\\x5C"+xe+")*(?:\\x5D|$))+/";$.push(["lang-regex",RegExp("^"+B+"("+Ke+")")])}var qe=oe.types;qe&&$.push([v,qe]);var tt=(""+oe.keywords).replace(/^ | $/g,"");tt.length&&$.push([L,new RegExp("^(?:"+tt.replace(/[\s,]+/g,"|")+")\\b"),null]),q.push([T,/^\s+/,null,` \r
\xA0`]);var et="^.[^\\s\\w.$@'\"`/\\\\]*";return oe.regexLiterals&&(et+="(?!s*/)"),$.push([x,/^@[a-z_$][a-z_$@0-9]*/i,null],[v,/^(?:[@_]?[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(et),null]),ee(q,$)}var be=ye({keywords:E,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function he(oe,q,$){for(var X=/(?:^|\s)nocode(?:\s|$)/,de=/\r\n?|\n/,pe=oe.ownerDocument,xe=pe.createElement("li");oe.firstChild;)xe.appendChild(oe.firstChild);var Ke=[xe];function qe(De){var nt=De.nodeType;if(nt==1&&!X.test(De.className))if(De.nodeName==="br")tt(De),De.parentNode&&De.parentNode.removeChild(De);else for(var lt=De.firstChild;lt;lt=lt.nextSibling)qe(lt);else if((nt==3||nt==4)&&$){var Ve=De.nodeValue,Qe=Ve.match(de);if(Qe){var Fe=Ve.substring(0,Qe.index);De.nodeValue=Fe;var Re=Ve.substring(Qe.index+Qe[0].length);if(Re){var Me=De.parentNode;Me.insertBefore(pe.createTextNode(Re),De.nextSibling)}tt(De),Fe||De.parentNode.removeChild(De)}}}function tt(De){for(;!De.nextSibling;)if(De=De.parentNode,!De)return;function nt(Qe,Fe){var Re=Fe?Qe.cloneNode(!1):Qe,Me=Qe.parentNode;if(Me){var Ee=nt(Me,1),Oe=Qe.nextSibling;Ee.appendChild(Re);for(var ke=Oe;ke;ke=Oe)Oe=ke.nextSibling,Ee.appendChild(ke)}return Re}for(var lt=nt(De.nextSibling,0),Ve;(Ve=lt.parentNode)&&Ve.nodeType===1;)lt=Ve;Ke.push(lt)}for(var et=0;et<Ke.length;++et)qe(Ke[et]);q===(q|0)&&Ke[0].setAttribute("value",q);var it=pe.createElement("ol");it.className="linenums";for(var at=Math.max(0,q-1|0)||0,et=0,je=Ke.length;et<je;++et)xe=Ke[et],xe.className="L"+(et+at)%10,xe.firstChild||xe.appendChild(pe.createTextNode("\xA0")),it.appendChild(xe);oe.appendChild(it)}function Ie(oe){var q=/\bMSIE\s(\d+)/.exec(navigator.userAgent);q=q&&+q[1]<=8;var $=/\n/g,X=oe.sourceCode,de=X.length,pe=0,xe=oe.spans,Ke=xe.length,qe=0,tt=oe.decorations,et=tt.length,it=0;tt[et]=de;var at,je;for(je=at=0;je<et;)tt[je]!==tt[je+2]?(tt[at++]=tt[je++],tt[at++]=tt[je++]):je+=2;for(et=at,je=at=0;je<et;){for(var De=tt[je],nt=tt[je+1],lt=je+2;lt+2<=et&&tt[lt+1]===nt;)lt+=2;tt[at++]=De,tt[at++]=nt,je=lt}et=tt.length=at;var Ve=oe.sourceNode,Qe="";Ve&&(Qe=Ve.style.display,Ve.style.display="none");try{for(var Fe=null;qe<Ke;){var Re=xe[qe],Me=xe[qe+2]||de,Ee=tt[it+2]||de,lt=Math.min(Me,Ee),Oe=xe[qe+1],ke;if(Oe.nodeType!==1&&(ke=X.substring(pe,lt))){q&&(ke=ke.replace($,"\r")),Oe.nodeValue=ke;var Ne=Oe.ownerDocument,He=Ne.createElement("span");He.className=tt[it+1];var rt=Oe.parentNode;rt.replaceChild(He,Oe),He.appendChild(Oe),pe<Me&&(xe[qe+1]=Oe=Ne.createTextNode(X.substring(lt,Me)),rt.insertBefore(Oe,He.nextSibling))}pe=lt,pe>=Me&&(qe+=2),pe>=Ee&&(it+=2)}}finally{Ve&&(Ve.style.display=Qe)}}var Se={};function fe(oe,q){for(var $=q.length;--$>=0;){var X=q[$];Se.hasOwnProperty(X)?_.console&&console.warn("cannot override language handler %s",X):Se[X]=oe}}function ue(oe,q){return oe&&Se.hasOwnProperty(oe)||(oe=/^\s*</.test(q)?"default-markup":"default-code"),Se[oe]}fe(be,["default-code"]),fe(ee([],[[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"]),fe(ee([[T,/^[\s]+/,null,` \r
`],[K,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[F,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[z,/^(?!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"]),fe(ee([],[[K,/^[\s\S]+/]]),["uq.val"]),fe(ye({keywords:c,hashComments:!0,cStyleComments:!0,types:b}),["c","cc","cpp","cxx","cyc","m"]),fe(ye({keywords:"null,true,false"}),["json"]),fe(ye({keywords:n,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:b}),["cs"]),fe(ye({keywords:i,cStyleComments:!0}),["java"]),fe(ye({keywords:l,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),fe(ye({keywords:u,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),fe(ye({keywords:d,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),fe(ye({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),fe(ye({keywords:h,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),fe(ye({keywords:o,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),fe(ee([],[[p,/^[\s\S]+/]]),["regex"]);function ie(oe){var q=oe.langExtension;try{var $=D(oe.sourceNode,oe.pre),X=$.sourceCode;oe.sourceCode=X,oe.spans=$.spans,oe.basePos=0,ue(q,X)(oe),Ie(oe)}catch(de){_.console&&console.log(de&&de.stack||de)}}function Ce(oe,q,$){var X=$||!1,de=q||null,pe=document.createElement("div");pe.innerHTML="<pre>"+oe+"</pre>",pe=pe.firstChild,X&&he(pe,X,!0);var xe={langExtension:de,numberLines:X,sourceNode:pe,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return ie(xe),pe.innerHTML}function ne(oe,q){var $=q||document.body,X=$.ownerDocument||document;function de(Re){return $.getElementsByTagName(Re)}for(var pe=[de("pre"),de("code"),de("xmp")],xe=[],Ke=0;Ke<pe.length;++Ke)for(var qe=0,tt=pe[Ke].length;qe<tt;++qe)xe.push(pe[Ke][qe]);pe=null;var et=Date;et.now||(et={now:function(){return+new Date}});var it=0,at=/\blang(?:uage)?-([\w.]+)(?!\S)/,je=/\bprettyprint\b/,De=/\bprettyprinted\b/,nt=/pre|xmp/i,lt=/^code$/i,Ve=/^(?:pre|code|xmp)$/i,Qe={};function Fe(){for(var Re=_.PR_SHOULD_USE_CONTINUATION?et.now()+250:Infinity;it<xe.length&&et.now()<Re;it++){for(var Me=xe[it],Ee=Qe,Oe=Me;Oe=Oe.previousSibling;){var ke=Oe.nodeType,Ne=(ke===7||ke===8)&&Oe.nodeValue;if(Ne?!/^\??prettify\b/.test(Ne):ke!==3||/\S/.test(Oe.nodeValue))break;if(Ne){Ee={},Ne.replace(/\b(\w+)=([\w:.%+-]+)/g,function(sr,Kt,kt){Ee[Kt]=kt});break}}var He=Me.className;if((Ee!==Qe||je.test(He))&&!De.test(He)){for(var rt=!1,ct=Me.parentNode;ct;ct=ct.parentNode){var yt=ct.tagName;if(Ve.test(yt)&&ct.className&&je.test(ct.className)){rt=!0;break}}if(!rt){Me.className+=" prettyprinted";var ht=Ee.lang;if(!ht){ht=He.match(at);var pt;!ht&&(pt=re(Me))&&lt.test(pt.tagName)&&(ht=pt.className.match(at)),ht&&(ht=ht[1])}var Dt;if(nt.test(Me.tagName))Dt=1;else{var At=Me.currentStyle,bt=X.defaultView,Xt=At?At.whiteSpace:bt&&bt.getComputedStyle?bt.getComputedStyle(Me,null).getPropertyValue("white-space"):0;Dt=Xt&&Xt.substring(0,3)==="pre"}var Gt=Ee.linenums;(Gt=Gt==="true"||+Gt)||(Gt=He.match(/\blinenums\b(?::(\d+))?/),Gt=Gt?Gt[1]&&Gt[1].length?+Gt[1]:!0:!1),Gt&&he(Me,Gt,Dt);var rr={langExtension:ht,sourceNode:Me,numberLines:Gt,pre:Dt,sourceCode:null,basePos:null,spans:null,decorations:null};ie(rr)}}}it<xe.length?_.setTimeout(Fe,250):typeof oe=="function"&&oe()}Fe()}var ce=_.PR={createSimpleLexer:ee,registerLangHandler:fe,sourceDecorator:ye,PR_ATTRIB_NAME:z,PR_ATTRIB_VALUE:K,PR_COMMENT:R,PR_DECLARATION:P,PR_KEYWORD:L,PR_LITERAL:x,PR_NOCODE:O,PR_PLAIN:T,PR_PUNCTUATION:w,PR_SOURCE:A,PR_STRING:p,PR_TAG:F,PR_TYPE:v,prettyPrintOne:S?_.prettyPrintOne=Ce:m=Ce,prettyPrint:C=S?_.prettyPrint=ne:C=ne},Ae=_.define;typeof Ae=="function"&&Ae.amd&&Ae("google-code-prettify",[],function(){return ce})})()},T8No:function(H,J,I){"use strict";I.d(J,"a",function(){return C}),I.d(J,"e",function(){return _}),I.d(J,"c",function(){return w}),I.d(J,"b",function(){return T}),I.d(J,"d",function(){return F}),I.d(J,"f",function(){return z});var N=I("MNsG"),g=I("N0LK"),S=I("Cg/j");let k=N.k||"";const y=new Map;y.set("false",!1),y.set("true",!0),y.set("isMac",N.f),y.set("isLinux",N.d),y.set("isWindows",N.i),y.set("isWeb",N.h),y.set("isMacNative",N.f&&!N.h),y.set("isEdge",k.indexOf("Edg/")>=0),y.set("isFirefox",k.indexOf("Firefox")>=0),y.set("isChrome",k.indexOf("Chrome")>=0),y.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 v.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(D=>this._deserializeAndExpression(D,B)),null,!0)}static _deserializeAndExpression(O,B){let U=O.split("&&");return v.create(U.map(D=>this._deserializeOne(D,B)),null)}static _deserializeOne(O,B){if(O=O.trim(),O.indexOf("!=")>=0){let U=O.split("!=");return h.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 l.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 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("/"),D=O.lastIndexOf("/");if(U===D||U<0){if(B)throw new Error(`bad regexp-value '${O}', missing /-enclosure`);return console.warn(`bad regexp-value '${O}', missing /-enclosure`),null}let W=O.slice(U+1,D),Q=O[D+1]==="i"?"i":"";try{return new RegExp(W,Q)}catch(re){if(B)throw new Error(`bad regexp-value '${O}', parse error: ${re}`);return console.warn(`bad regexp-value '${O}', parse error: ${re}`),null}}}function _(O,B){const U=O?O.substituteConstants():void 0,D=B?B.substituteConstants():void 0;return!U&&!D?!0:!U||!D?!1:U.equals(D)}function e(O,B){return O.cmp(B)}class f{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}}f.INSTANCE=new f;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 f.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=y.get(O);return typeof U=="boolean"?U?r.INSTANCE:f.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=y.get(this.key);return typeof O=="boolean"?O?r.INSTANCE:f.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 D=y.get(O);if(typeof D=="boolean"){const W=D?"true":"false";return B===W?r.INSTANCE:f.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=y.get(this.key);if(typeof O=="boolean"){const B=O?"true":"false";return this.value===B?r.INSTANCE:f.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=h.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=o.create(this)),this.negated}}class o{constructor(O){this._actual=O,this.type=11}static create(O){return new o(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 h{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 D=y.get(O);if(typeof D=="boolean"){const W=D?"true":"false";return B===W?f.INSTANCE:r.INSTANCE}return new h(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=y.get(this.key);if(typeof O=="boolean"){const B=O?"true":"false";return this.value===B?f.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=y.get(O);return typeof U=="boolean"?U?f.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=y.get(this.key);return typeof O=="boolean"?O?f.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):f.INSTANCE}class s{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,D=>new s(O,D,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 l{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,D=>new l(O,D,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,D=>new E(O,D,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=l.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,D=>new b(O,D,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 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=L.create(this)),this.negated}}class L{constructor(O){this._actual=O,this.type=8}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}}function R(O){let B=null;for(let U=0,D=O.length;U<D;U++){const W=O[U].substituteConstants();if(O[U]!==W&&B===null){B=[];for(let Q=0;Q<U;Q++)B[Q]=O[Q]}B!==null&&(B[U]=W)}return B===null?O:B}class v{constructor(O,B){this.expr=O,this.negated=B,this.type=6}static create(O,B){return v._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 D=e(this.expr[B],O.expr[B]);if(D!==0)return D}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:v.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 D=!1;for(const W of O){if(!W)continue;if(W.type===1){D=!0;continue}if(W.type===0)return f.INSTANCE;if(W.type===6){U.push(...W.expr);continue}U.push(W)}if(U.length===0&&D)return r.INSTANCE;if(U.length===0)return;if(U.length===1)return U[0];U.sort(e);for(let W=1;W<U.length;W++)U[W-1].equals(U[W])&&(U.splice(W,1),W--);if(U.length===1)return U[0];for(;U.length>1;){const W=U[U.length-1];if(W.type!==9)break;U.pop();const Q=U.pop(),re=U.length===0,ee=x.create(W.expr.map(ye=>v.create([ye,Q],null)),null,re);ee&&(U.push(ee),U.sort(e))}return U.length===1?U[0]:new v(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 D=e(this.expr[B],O.expr[B]);if(D!==0)return D}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 D=[],W=!1;if(O){for(let Q=0,re=O.length;Q<re;Q++){const ee=O[Q];if(!ee)continue;if(ee.type===0){W=!0;continue}if(ee.type===1)return r.INSTANCE;if(ee.type===9){D=D.concat(ee.expr);continue}D.push(ee)}if(D.length===0&&W)return f.INSTANCE;D.sort(e)}if(D.length===0)return;if(D.length===1)return D[0];for(let Q=1;Q<D.length;Q++)D[Q-1].equals(D[Q])&&(D.splice(Q,1),Q--);if(D.length===1)return D[0];if(U){for(let Q=0;Q<D.length;Q++)for(let re=Q+1;re<D.length;re++)z(D[Q],D[re])&&(D.splice(re,1),re--);if(D.length===1)return D[0]}return new x(D,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(),D=[];for(const Q of K(B))for(const re of K(U))D.push(v.create([Q,re],null));const W=O.length===0;O.unshift(x.create(D,null,W))}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,D){return O<U?-1:O>U?1:B<D?-1:B>D?1:0}function z(O,B){if(B.type===6&&O.type!==9&&O.type!==6){for(const W of B.expr)if(O.equals(W))return!0}const U=O.negate(),D=K(U).concat(K(B));D.sort(e);for(let W=0;W<D.length;W++){const Q=D[W],re=Q.negate();for(let ee=W+1;ee<D.length;ee++){const ye=D[ee];if(re.equals(ye))return!0}}return!1}function K(O){return O.type===9?O.expr:[O]}},TXwP:function(H,J,I){var N,g;(function(){var S;(function(){"use strict";var y=[,,function(e){function f(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=[]}f.prototype.clone_empty=function(){var i=new f(this.__parent);return i.set_indent(this.__indent_count,this.__alignment_count),i},f.prototype.item=function(i){return i<0?this.__items[this.__items.length+i]:this.__items[i]},f.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},f.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))},f.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)},f.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},f.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},f.prototype.is_empty=function(){return this.__items.length===0},f.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},f.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},f.prototype.pop=function(){var i=null;return this.is_empty()||(i=this.__items.pop(),this.__character_count-=i.length),i},f.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},f.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},f.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},f.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 o=this.__base_string_length;return n=n||0,i<0&&(o=0),o+=i*this.__indent_size,o+=n,o},r.prototype.get_indent_string=function(i,n){var o=this.__base_string;return n=n||0,i<0&&(i=0,o=""),n+=i*this.__indent_size,this.__ensure_cache(n),o+=this.__cache[n],o},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,o="";this.__indent_size&&i>=this.__indent_size&&(n=Math.floor(i/this.__indent_size),i-=n*this.__indent_size,o=new Array(n+1).join(this.__indent_string)),i&&(o+=new Array(i+1).join(" ")),this.__cache.push(o)};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 f(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 o=this.__lines.join(`
`);return i!==`
`&&(o=o.replace(/[\n]/g,i)),o},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 o=this.__lines.length-2;o>=0;){var h=this.__lines[o];if(h.is_empty())break;if(h.item(0).indexOf(i)!==0&&h.item(-1)!==n){this.__lines.splice(o+1,0,new f(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},e.exports.Output=c},,,,function(e){function f(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"])}f.prototype._get_array=function(i,n){var o=this.raw_options[i],h=n||[];return typeof o=="object"?o!==null&&typeof o.concat=="function"&&(h=o.concat()):typeof o=="string"&&(h=o.split(/[^a-zA-Z0-9_\/\-]+/)),h},f.prototype._get_boolean=function(i,n){var o=this.raw_options[i],h=o===void 0?!!n:!!o;return h},f.prototype._get_characters=function(i,n){var o=this.raw_options[i],h=n||"";return typeof o=="string"&&(h=o.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),h},f.prototype._get_number=function(i,n){var o=this.raw_options[i];n=parseInt(n,10),isNaN(n)&&(n=0);var h=parseInt(o,10);return isNaN(h)&&(h=n),h},f.prototype._get_selection=function(i,n,o){var h=this._get_selection_list(i,n,o);if(h.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 h[0]},f.prototype._get_selection_list=function(i,n,o){if(!n||n.length===0)throw new Error("Selection list cannot be empty.");if(o=o||[n[0]],!this._is_valid_selection(o,n))throw new Error("Invalid Default Value!");var h=this._get_array(i,o);if(!this._is_valid_selection(h,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 h},f.prototype._is_valid_selection=function(i,n){return i.length&&n.length&&!i.some(function(o){return n.indexOf(o)===-1})};function r(i,n){var o={};i=c(i);var h;for(h in i)h!==n&&(o[h]=i[h]);if(n&&i[n])for(h in i[n])o[h]=i[n][h];return o}function c(i){var n={},o;for(o in i){var h=o.replace(/-/g,"_");n[h]=i[o]}return n}e.exports.Options=f,e.exports.normalizeOpts=c,e.exports.mergeOpts=r},,function(e){var f=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&&!(f&&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 o="",h;return c&&(h=this.match(c),h&&(o+=h[0])),i&&(h||!c)&&(o+=this.readUntil(i,n)),o},r.prototype.readUntil=function(c,i){var n="",o=this.__position;c.lastIndex=this.__position;var h=c.exec(this.__input);return h?(o=h.index,i&&(o+=h[0].length)):o=this.__input_length,n=this.__input.substring(this.__position,o),this.__position=o,n},r.prototype.readUntilAfter=function(c){return this.readUntil(c,!0)},r.prototype.get_regexp=function(c,i){var n=null,o="g";return i&&f&&(o="y"),typeof c=="string"&&c!==""?n=new RegExp(c,o):c&&(n=new RegExp(c.source,o)),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 f(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")}f.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},f.prototype.readIgnored=function(r){return r.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=f},,function(e,f,r){var c=r(16).Beautifier,i=r(17).Options;function n(o,h){var d=new c(o,h);return d.beautify()}e.exports=n,e.exports.defaultOptions=function(){return new i}},function(e,f,r){var c=r(17).Options,i=r(2).Output,n=r(8).InputScanner,o=r(13).Directives,h=new o(/\/\*/,/\*\//),d=/\r\n|[\r\n]/,u=/\r\n|[\r\n]/g,s=/\s/,l=/(?:\s|\n)+/g,E=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,b=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function p(L,R){this._source_text=L||"",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(L){var R="";for(this._ch=this._input.next();this._ch;){if(R+=this._ch,this._ch==="\\")R+=this._input.next();else if(L.indexOf(this._ch)!==-1||this._ch===`
`)break;this._ch=this._input.next()}return R},p.prototype.eatWhitespace=function(L){for(var R=s.test(this._input.peek()),v=0;s.test(this._input.peek());)this._ch=this._input.next(),L&&this._ch===`
`&&((v===0||v<this._options.max_preserve_newlines)&&(v++,this._output.add_new_line(!0)));return R},p.prototype.foundNestedPseudoClass=function(){for(var L=0,R=1,v=this._input.peek(R);v;){if(v==="{")return!0;if(v==="(")L+=1;else if(v===")"){if(L===0)return!1;L-=1}else if(v===";"||v==="}")return!1;R++,v=this._input.peek(R)}return!1},p.prototype.print_string=function(L){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(L)},p.prototype.preserveSingleSpace=function(L){L&&(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 L=this._source_text,R=this._options.eol;R==="auto"&&(R=`
`,L&&d.test(L||"")&&(R=L.match(d)[0])),L=L.replace(u,`
`);var v=L.match(/^[\t ]*/)[0];this._output=new i(this._options,v),this._input=new n(L),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var x=0,w=!1,T=!1,F=!1,P=!1,A=!1,z=!1,K=this._ch,O=!1,B,U,D;B=this._input.read(l),U=B!=="",D=K,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),K=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var W=this._input.read(E),Q=h.get_directives(W);Q&&Q.ignore==="start"&&(W+=h.readIgnored(this._input)),this.print_string(W),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 re=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);re.match(/[ :]$/)&&(re=this.eatString(": ").replace(/\s$/,""),this.print_string(re),this._output.space_before_token=!0),re=re.replace(/\s$/,""),re==="extend"?P=!0:re==="import"&&(A=!0),re in this.NESTED_AT_RULE?(this._nestedLevel+=1,re in this.CONDITIONAL_GROUP_RULE&&(F=!0)):!w&&x===0&&re.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)):(D==="("?this._output.space_before_token=!1:D!==","&&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(),D==="{"&&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 ee=0;ee<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;ee++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[ee])){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 ye=D==='"'||D==="'";this.preserveSingleSpace(ye||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 be=!1;this._input.lookBack("with")&&(be=!0),this.preserveSingleSpace(U||be),this.print_string(this._ch),T&&D==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),z=!0):(this.eatWhitespace(),x++,this.indent())}else if(this._ch===")")x&&(x--,this.outdent()),z&&this._input.peek()===";"&&this._options.selector_separator_newline&&(z=!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||z)&&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&&s.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("="),s.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 he=D==='"'||D==="'";this.preserveSingleSpace(he||U),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
`&&O&&this._output.add_new_line()}var Ie=this._output.get_code(R);return Ie},e.exports.Beautifier=p},function(e,f,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 o=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||o;var h=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var d=0;d<h.length;d++)h[d]!=="expand"?this.brace_style="collapse":this.brace_style=h[d]}i.prototype=new c,e.exports.Options=i}],m={};function C(e){var f=m[e];if(f!==void 0)return f.exports;var r=m[e]={exports:{}};return y[e](r,r.exports,C),r.exports}var _=C(15);S=_})();var k=S;!(N=[],g=function(){return{css_beautify:k}}.apply(J,N),g!==void 0&&(H.exports=g))})()},Vhoy:function(H,J,I){"use strict";I.d(J,"d",function(){return k}),I.d(J,"e",function(){return y}),I.d(J,"c",function(){return m}),I.d(J,"b",function(){return C}),I.d(J,"a",function(){return _});var N=I("MI8n");class g{constructor(){this._icons=new Map,this._onDidRegister=new N.b}add(e){const f=this._icons.get(e.id);f?e.description?f.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 y(e,f){return new C(e,f)}function m(e){return e?e.replace(/\$\((.*?)\)/g,(f,r)=>` ${r} `).trim():""}class C{constructor(e,f,r){this.id=e,this.definition=f,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 f=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function r(n){if(n instanceof C)return["codicon","codicon-"+n.id];const o=f.exec(n.id);if(!o)return r(C.error);let[,h,d]=o;const u=["codicon","codicon-"+h];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,J,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),y=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(N),m=/Edge\/(\d+)/.exec(N),C=k||y||m,_=C&&(k?document.documentMode||6:+(m||y)[1]),e=!m&&/WebKit\//.test(N),f=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),o=/PhantomJS/.test(N),h=!m&&/AppleWebKit/.test(N)&&/Mobile\/\w+/.test(N),d=/Android/.test(N),u=h||d||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(N),s=h||/Mac/.test(g),l=/\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=s&&(f||c&&(b==null||b<12.11)),L=S||C&&_>=9;function R(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var v=function(t,a){var j=t.className,M=R(a).exec(j);if(M){var G=j.slice(M.index+M[0].length);t.className=j.slice(0,M.index)+(G?M[1]+G:"")}};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 G=document.createElement(t);if(j&&(G.className=j),M&&(G.style.cssText=M),typeof a=="string")G.appendChild(document.createTextNode(a));else if(a)for(var Z=0;Z<a.length;++Z)G.appendChild(a[Z]);return G}function F(t,a,j,M){var G=T(t,a,j,M);return G.setAttribute("role","presentation"),G}var P;document.createRange?P=function(t,a,j,M){var G=document.createRange();return G.setEnd(M||t,j),G.setStart(t,a),G}:P=function(t,a,j){var M=document.body.createTextRange();try{M.moveToElementText(t.parentNode)}catch(G){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 z(){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 K(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()};h?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 D(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 W(t,a,j,M,G){a==null&&(a=t.search(/[^\s\u00a0]/),a==-1&&(a=t.length));for(var Z=M||0,se=G||0;;){var me=t.indexOf(" ",Z);if(me<0||me>=a)return se+(a-Z);se+=me-Z,se+=j-se%j,Z=me+1}}var Q=function(){this.id=null,this.f=null,this.time=0,this.handler=U(this.onTimeout,this)};Q.prototype.onTimeout=function(t){t.id=0,t.time<=+new Date?t.f():setTimeout(t.handler,t.time-+new Date)},Q.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 re(t,a){for(var j=0;j<t.length;++j)if(t[j]==a)return j;return-1}var ee=50,ye={toString:function(){return"CodeMirror.Pass"}},be={scroll:!1},he={origin:"*mouse"},Ie={origin:"+move"};function Se(t,a,j){for(var M=0,G=0;;){var Z=t.indexOf(" ",M);Z==-1&&(Z=t.length);var se=Z-M;if(Z==t.length||G+se>=a)return M+Math.min(se,a-G);if(G+=Z-M,G+=j-G%j,M=Z+1,G>=a)return M}}var fe=[""];function ue(t){for(;fe.length<=t;)fe.push(ie(fe)+" ");return fe[t]}function ie(t){return t[t.length-1]}function Ce(t,a){for(var j=[],M=0;M<t.length;M++)j[M]=a(t[M],M);return j}function ne(t,a,j){for(var M=0,G=j(a);M<t.length&&j(t[M])<=G;)M++;t.splice(M,0,a)}function ce(){}function Ae(t,a){var j;return Object.create?j=Object.create(t):(ce.prototype=t,j=new ce),a&&D(a,j),j}var oe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function q(t){return/\w/.test(t)||t>"\x80"&&(t.toUpperCase()!=t.toLowerCase()||oe.test(t))}function $(t,a){return a?a.source.indexOf("\\w")>-1&&q(t)?!0:a.test(t):q(t)}function X(t){for(var a in t)if(t.hasOwnProperty(a)&&t[a])return!1;return!0}var de=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function pe(t){return t.charCodeAt(0)>=768&&de.test(t)}function xe(t,a,j){for(;(j<0?a>0:a<t.length)&&pe(t.charAt(a));)a+=j;return a}function Ke(t,a,j){for(var M=a>j?-1:1;;){if(a==j)return a;var G=(a+j)/2,Z=M<0?Math.ceil(G):Math.floor(G);if(Z==a)return t(Z)?a:j;t(Z)?j=Z:a=Z+M}}function qe(t,a,j,M){if(!t)return M(a,j,"ltr",0);for(var G=!1,Z=0;Z<t.length;++Z){var se=t[Z];(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",Z),G=!0)}G||M(a,j,"ltr")}var tt=null;function et(t,a,j){var M;tt=null;for(var G=0;G<t.length;++G){var Z=t[G];if(Z.from<a&&Z.to>a)return G;Z.to==a&&(Z.from!=Z.to&&j=="before"?M=G:tt=G),Z.from==a&&(Z.from!=Z.to&&j!="before"?M=G:tt=G)}return M!=null?M:tt}var it=function(){var t="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",a="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function j(we){return we<=247?t.charAt(we):1424<=we&&we<=1524?"R":1536<=we&&we<=1785?a.charAt(we-1536):1774<=we&&we<=2220?"r":8192<=we&&we<=8203?"w":we==8204?"b":"L"}var M=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,G=/[stwN]/,Z=/[LRr]/,se=/[Lb1n]/,me=/[1n]/;function ge(we,We,Xe){this.level=we,this.from=We,this.to=Xe}return function(we,We){var Xe=We=="ltr"?"L":"R";if(we.length==0||We=="ltr"&&!M.test(we))return!1;for(var ut=we.length,st=[],mt=0;mt<ut;++mt)st.push(j(we.charCodeAt(mt)));for(var xt=0,Lt=Xe;xt<ut;++xt){var jt=st[xt];jt=="m"?st[xt]=Lt:Lt=jt}for(var Vt=0,Ft=Xe;Vt<ut;++Vt){var Jt=st[Vt];Jt=="1"&&Ft=="r"?st[Vt]="n":Z.test(Jt)&&(Ft=Jt,Jt=="r"&&(st[Vt]="R"))}for(var fr=1,or=st[0];fr<ut-1;++fr){var Nr=st[fr];Nr=="+"&&or=="1"&&st[fr+1]=="1"?st[fr]="1":Nr==","&&or==st[fr+1]&&(or=="1"||or=="n")&&(st[fr]=or),or=Nr}for(var Sn=0;Sn<ut;++Sn){var fi=st[Sn];if(fi==",")st[Sn]="N";else if(fi=="%"){var Fn=void 0;for(Fn=Sn+1;Fn<ut&&st[Fn]=="%";++Fn);for(var Fi=Sn&&st[Sn-1]=="!"||Fn<ut&&st[Fn]=="1"?"1":"N",Mi=Sn;Mi<Fn;++Mi)st[Mi]=Fi;Sn=Fn-1}}for(var Qn=0,Pi=Xe;Qn<ut;++Qn){var yi=st[Qn];Pi=="L"&&yi=="1"?st[Qn]="L":Z.test(yi)&&(Pi=yi)}for(var si=0;si<ut;++si)if(G.test(st[si])){var Zn=void 0;for(Zn=si+1;Zn<ut&&G.test(st[Zn]);++Zn);for(var Gn=(si?st[si-1]:Xe)=="L",Ni=(Zn<ut?st[Zn]:Xe)=="L",Za=Gn==Ni?Gn?"L":"R":Xe,Ca=si;Ca<Zn;++Ca)st[Ca]=Za;si=Zn-1}for(var Ti=[],la,pi=0;pi<ut;)if(se.test(st[pi])){var ps=pi;for(++pi;pi<ut&&se.test(st[pi]);++pi);Ti.push(new ge(0,ps,pi))}else{var ga=pi,La=Ti.length,ka=We=="rtl"?1:0;for(++pi;pi<ut&&st[pi]!="L";++pi);for(var Ii=ga;Ii<pi;)if(me.test(st[Ii])){ga<Ii&&(Ti.splice(La,0,new ge(1,ga,Ii)),La+=ka);var qa=Ii;for(++Ii;Ii<pi&&me.test(st[Ii]);++Ii);Ti.splice(La,0,new ge(2,qa,Ii)),La+=ka,ga=Ii}else++Ii;ga<pi&&Ti.splice(La,0,new ge(1,ga,pi))}return We=="ltr"&&(Ti[0].level==1&&(la=we.match(/^\s+/))&&(Ti[0].from=la[0].length,Ti.unshift(new ge(0,0,la[0].length))),ie(Ti).level==1&&(la=we.match(/\s+$/))&&(ie(Ti).to-=la[0].length,Ti.push(new ge(0,ut-la[0].length,ut)))),We=="rtl"?Ti.reverse():Ti}}();function at(t,a){var j=t.order;return j==null&&(j=t.order=it(t.text,a)),j}var je=[],De=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]||je).concat(j)}};function nt(t,a){return t._handlers&&t._handlers[a]||je}function lt(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,G=M&&M[a];if(G){var Z=re(G,j);Z>-1&&(M[a]=G.slice(0,Z).concat(G.slice(Z+1)))}}}function Ve(t,a){var j=nt(t,a);if(!j.length)return;for(var M=Array.prototype.slice.call(arguments,2),G=0;G<j.length;++G)j[G].apply(null,M)}function Qe(t,a,j){return typeof a=="string"&&(a={type:a,preventDefault:function(){this.defaultPrevented=!0}}),Ve(t,j||a.type,t,a),ke(a)||a.codemirrorIgnore}function Fe(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)re(j,a[M])==-1&&j.push(a[M])}function Re(t,a){return nt(t,a).length>0}function Me(t){t.prototype.on=function(a,j){De(this,a,j)},t.prototype.off=function(a,j){lt(this,a,j)}}function Ee(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function Oe(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function ke(t){return t.defaultPrevented!=null?t.defaultPrevented:t.returnValue==!1}function Ne(t){Ee(t),Oe(t)}function He(t){return t.target||t.srcElement}function rt(t){var a=t.which;return a==null&&(t.button&1?a=1:t.button&2?a=3:t.button&4&&(a=2)),s&&t.ctrlKey&&a==1&&(a=3),a}var ct=function(){if(C&&_<9)return!1;var t=T("div");return"draggable"in t||"dragDrop"in t}(),yt;function ht(t){if(yt==null){var a=T("span","\u200B");w(t,T("span",[a,document.createTextNode("x")])),t.firstChild.offsetHeight!=0&&(yt=a.offsetWidth<=1&&a.offsetHeight>2&&!(C&&_<8))}var j=yt?T("span","\u200B"):T("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return j.setAttribute("cm-text",""),j}var pt;function Dt(t){if(pt!=null)return pt;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:pt=M.right-j.right<3}var At=`
b`.split(/\n/).length!=3?function(t){for(var a=0,j=[],M=t.length;a<=M;){var G=t.indexOf(`
`,a);G==-1&&(G=t.length);var Z=t.slice(a,t.charAt(G-1)=="\r"?G-1:G),se=Z.indexOf("\r");se!=-1?(j.push(Z.slice(0,se)),a+=se+1):(j.push(Z),a=G+1)}return j}:function(t){return t.split(/\r\n?|\n/)},bt=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},Xt=function(){var t=T("div");return"oncopy"in t?!0:(t.setAttribute("oncopy","return;"),typeof t.oncopy=="function")}(),Gt=null;function rr(t){if(Gt!=null)return Gt;var a=w(t,T("span","x")),j=a.getBoundingClientRect(),M=P(a,0,1).getBoundingClientRect();return Gt=Math.abs(j.left-M.left)>1}var sr={},Kt={};function kt(t,a){arguments.length>2&&(a.dependencies=Array.prototype.slice.call(arguments,2)),sr[t]=a}function ir(t,a){Kt[t]=a}function _t(t){if(typeof t=="string"&&Kt.hasOwnProperty(t))t=Kt[t];else if(t&&typeof t.name=="string"&&Kt.hasOwnProperty(t.name)){var a=Kt[t.name];typeof a=="string"&&(a={name:a}),t=Ae(a,t),t.name=a.name}else{if(typeof t=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return _t("application/xml");if(typeof t=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return _t("application/json")}return typeof t=="string"?{name:t}:t||{name:"null"}}function Mt(t,a){a=_t(a);var j=sr[a.name];if(!j)return Mt(t,"text/plain");var M=j(t,a);if(Rt.hasOwnProperty(a.name)){var G=Rt[a.name];for(var Z in G){if(!G.hasOwnProperty(Z))continue;M.hasOwnProperty(Z)&&(M["_"+Z]=M[Z]),M[Z]=G[Z]}}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 Rt={};function Ot(t,a){var j=Rt.hasOwnProperty(t)?Rt[t]:Rt[t]={};D(a,j)}function qt(t,a){if(a===!0)return a;if(t.copyState)return t.copyState(a);var j={};for(var M in a){var G=a[M];G instanceof Array&&(G=G.concat([])),j[M]=G}return j}function Jr(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 Et(t,a,j){return t.startState?t.startState(a,j):!0}var It=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};It.prototype.eol=function(){return this.pos>=this.string.length},It.prototype.sol=function(){return this.pos==this.lineStart},It.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},It.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},It.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},It.prototype.eatWhile=function(t){for(var a=this.pos;this.eat(t););return this.pos>a},It.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},It.prototype.skipToEnd=function(){this.pos=this.string.length},It.prototype.skipTo=function(t){var a=this.string.indexOf(t,this.pos);if(a>-1)return this.pos=a,!0},It.prototype.backUp=function(t){this.pos-=t},It.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=W(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?W(this.string,this.lineStart,this.tabSize):0)},It.prototype.indentation=function(){return W(this.string,null,this.tabSize)-(this.lineStart?W(this.string,this.lineStart,this.tabSize):0)},It.prototype.match=function(t,a,j){if(typeof t=="string"){var M=function(se){return j?se.toLowerCase():se},G=this.string.substr(this.pos,t.length);if(M(G)==M(t))return a!==!1&&(this.pos+=t.length),!0}else{var Z=this.string.slice(this.pos).match(t);return Z&&Z.index>0?null:(Z&&a!==!1&&(this.pos+=Z[0].length),Z)}},It.prototype.current=function(){return this.string.slice(this.start,this.pos)},It.prototype.hideFirstChars=function(t,a){this.lineStart+=t;try{return a()}finally{this.lineStart-=t}},It.prototype.lookAhead=function(t){var a=this.lineOracle;return a&&a.lookAhead(t)},It.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};function wt(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 G=j.children[M],Z=G.chunkSize();if(a<Z){j=G;break}a-=Z}return j.lines[a]}function Er(t,a,j){var M=[],G=a.line;return t.iter(a.line,j.line+1,function(Z){var se=Z.text;G==j.line&&(se=se.slice(0,j.ch)),G==a.line&&(se=se.slice(a.ch)),M.push(se),++G}),M}function nr(t,a,j){var M=[];return t.iter(a,j,function(G){M.push(G.text)}),M}function Bt(t,a){var j=a-t.height;if(j)for(var M=t;M;M=M.parent)M.height+=j}function Nt(t){if(t.parent==null)return null;for(var a=t.parent,j=re(a.lines,t),M=a.parent;M;a=M,M=M.parent)for(var G=0;!(M.children[G]==a);++G)j+=M.children[G].chunkSize();return j+a.first}function vr(t,a){var j=t.first;e:do{for(var M=0;M<t.children.length;++M){var G=t.children[M],Z=G.height;if(a<Z){t=G;continue e}a-=Z,j+=G.chunkSize()}return j}while(!t.lines);for(var se=0;se<t.lines.length;++se){var me=t.lines[se],ge=me.height;if(a<ge)break;a-=ge}return j+se}function Qr(t,a){return a>=t.first&&a<t.first+t.size}function Cr(t,a){return String(t.lineNumberFormatter(a+t.firstLineNumber))}function vt(t,a,j){if(j===void 0&&(j=null),!(this instanceof vt))return new vt(t,a,j);this.line=t,this.ch=a,this.sticky=j}function Ht(t,a){return t.line-a.line||t.ch-a.ch}function Zr(t,a){return t.sticky==a.sticky&&Ht(t,a)==0}function ln(t){return vt(t.line,t.ch)}function kn(t,a){return Ht(t,a)<0?a:t}function Cn(t,a){return Ht(t,a)<0?t:a}function le(t,a){return Math.max(t.first,Math.min(a,t.first+t.size-1))}function V(t,a){if(a.line<t.first)return vt(t.first,0);var j=t.first+t.size-1;return a.line>j?vt(j,wt(t,j).text.length):Y(a,wt(t,a.line).text.length)}function Y(t,a){var j=t.ch;return j==null||j>a?vt(t.line,a):j<0?vt(t.line,0):t}function te(t,a){for(var j=[],M=0;M<a.length;M++)j[M]=V(t,a[M]);return j}var ve=function(t,a){this.state=t,this.lookAhead=a},ae=function(t,a,j,M){this.state=a,this.doc=t,this.line=j,this.maxLookAhead=M||0,this.baseTokens=null,this.baseTokenPos=1};ae.prototype.lookAhead=function(t){var a=this.doc.getLine(this.line+t);return a!=null&&t>this.maxLookAhead&&(this.maxLookAhead=t),a},ae.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}},ae.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ae.fromSaved=function(t,a,j){return a instanceof ve?new ae(t,qt(t.mode,a.state),j,a.lookAhead):new ae(t,qt(t.mode,a),j)},ae.prototype.save=function(t){var a=t!==!1?qt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ve(a,this.maxLookAhead):a};function ze(t,a,j,M){var G=[t.state.modeGen],Z={};Gr(t,a.text,t.doc.mode,j,function(we,We){return G.push(we,We)},Z,M);for(var se=j.state,me=function(we){j.baseTokens=G;var We=t.state.overlays[we],Xe=1,ut=0;j.state=!0,Gr(t,a.text,We.mode,j,function(st,mt){for(var xt=Xe;ut<st;){var Lt=G[Xe];Lt>st&&G.splice(Xe,1,st,G[Xe+1],Lt),Xe+=2,ut=Math.min(st,Lt)}if(!mt)return;if(We.opaque)G.splice(xt,Xe-xt,st,"overlay "+mt),Xe=xt+2;else for(;xt<Xe;xt+=2){var jt=G[xt+1];G[xt+1]=(jt?jt+" ":"")+"overlay "+mt}},Z),j.state=se,j.baseTokens=null,j.baseTokenPos=1},ge=0;ge<t.state.overlays.length;++ge)me(ge);return{styles:G,classes:Z.bgClass||Z.textClass?Z:null}}function ft(t,a,j){if(!a.styles||a.styles[0]!=t.state.modeGen){var M=Ct(t,Nt(a)),G=a.text.length>t.options.maxHighlightLength&&qt(t.doc.mode,M.state),Z=ze(t,a,M);G&&(M.state=G),a.stateAfter=M.save(!G),a.styles=Z.styles,Z.classes?a.styleClasses=Z.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 Ct(t,a,j){var M=t.doc,G=t.display;if(!M.mode.startState)return new ae(M,!0,a);var Z=lr(t,a,j),se=Z>M.first&&wt(M,Z-1).stateAfter,me=se?ae.fromSaved(M,se,Z):new ae(M,Et(M.mode),Z);return M.iter(Z,a,function(ge){Wt(t,ge.text,me);var we=me.line;ge.stateAfter=we==a-1||we%5==0||we>=G.viewFrom&&we<G.viewTo?me.save():null,me.nextLine()}),j&&(M.modeFrontier=me.line),me}function Wt(t,a,j,M){var G=t.doc.mode,Z=new It(a,t.options.tabSize,j);for(Z.start=Z.pos=M||0,a==""&&gt(G,j.state);!Z.eol();)Yt(G,Z,j.state),Z.start=Z.pos}function gt(t,a){if(t.blankLine)return t.blankLine(a);if(!t.innerMode)return;var j=Jr(t,a);if(j.mode.blankLine)return j.mode.blankLine(j.state)}function Yt(t,a,j,M){for(var G=0;G<10;G++){M&&(M[0]=Jr(t,j).mode);var Z=t.token(a,j);if(a.pos>a.start)return Z}throw new Error("Mode "+t.name+" failed to advance stream.")}var er=function(t,a,j){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=a||null,this.state=j};function Hr(t,a,j,M){var G=t.doc,Z=G.mode,se;a=V(G,a);var me=wt(G,a.line),ge=Ct(t,a.line,j),we=new It(me.text,t.options.tabSize,ge),We;for(M&&(We=[]);(M||we.pos<a.ch)&&!we.eol();)we.start=we.pos,se=Yt(Z,we,ge.state),M&&We.push(new er(we,se,qt(G.mode,ge.state)));return M?We:new er(we,se,ge.state)}function on(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 Gr(t,a,j,M,G,Z,se){var me=j.flattenSpans;me==null&&(me=t.options.flattenSpans);var ge=0,we=null,We=new It(a,t.options.tabSize,M),Xe,ut=t.options.addModeClass&&[null];for(a==""&&on(gt(j,M.state),Z);!We.eol();){if(We.pos>t.options.maxHighlightLength?(me=!1,se&&Wt(t,a,M,We.pos),We.pos=a.length,Xe=null):Xe=on(Yt(j,We,M.state,ut),Z),ut){var st=ut[0].name;st&&(Xe="m-"+(Xe?st+" "+Xe:st))}if(!me||we!=Xe){for(;ge<We.start;)ge=Math.min(We.start,ge+5e3),G(ge,we);we=Xe}We.start=We.pos}for(;ge<We.pos;){var mt=Math.min(We.pos,ge+5e3);G(mt,we),ge=mt}}function lr(t,a,j){for(var M,G,Z=t.doc,se=j?-1:a-(t.doc.mode.innerMode?1e3:100),me=a;me>se;--me){if(me<=Z.first)return Z.first;var ge=wt(Z,me-1),we=ge.stateAfter;if(we&&(!j||me+(we instanceof ve?we.lookAhead:0)<=Z.modeFrontier))return me;var We=W(ge.text,null,t.options.tabSize);(G==null||M>We)&&(G=me-1,M=We)}return G}function qr(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 G=wt(t,M).stateAfter;if(G&&(!(G instanceof ve)||M+G.lookAhead<a)){j=M+1;break}}t.highlightFrontier=Math.min(t.highlightFrontier,j)}var On=!1,zt=!1;function mr(){On=!0}function pr(){zt=!0}function jr(t,a,j){this.marker=t,this.from=a,this.to=j}function Tr(t,a){if(t)for(var j=0;j<t.length;++j){var M=t[j];if(M.marker==a)return M}}function li(t,a){for(var j,M=0;M<t.length;++M)t[M]!=a&&(j||(j=[])).push(t[M]);return j}function An(t,a){t.markedSpans=t.markedSpans?t.markedSpans.concat([a]):[a],a.marker.attachLine(t)}function Ui(t,a,j){var M;if(t)for(var G=0;G<t.length;++G){var Z=t[G],se=Z.marker,me=Z.from==null||(se.inclusiveLeft?Z.from<=a:Z.from<a);if(me||Z.from==a&&se.type=="bookmark"&&(!j||!Z.marker.insertLeft)){var ge=Z.to==null||(se.inclusiveRight?Z.to>=a:Z.to>a);(M||(M=[])).push(new jr(se,Z.from,ge?null:Z.to))}}return M}function Bi(t,a,j){var M;if(t)for(var G=0;G<t.length;++G){var Z=t[G],se=Z.marker,me=Z.to==null||(se.inclusiveRight?Z.to>=a:Z.to>a);if(me||Z.from==a&&se.type=="bookmark"&&(!j||Z.marker.insertLeft)){var ge=Z.from==null||(se.inclusiveLeft?Z.from<=a:Z.from<a);(M||(M=[])).push(new jr(se,ge?null:Z.from-a,Z.to==null?null:Z.to-a))}}return M}function qn(t,a){if(a.full)return null;var j=Qr(t,a.from.line)&&wt(t,a.from.line).markedSpans,M=Qr(t,a.to.line)&&wt(t,a.to.line).markedSpans;if(!j&&!M)return null;var G=a.from.ch,Z=a.to.ch,se=Ht(a.from,a.to)==0,me=Ui(j,G,se),ge=Bi(M,Z,se),we=a.text.length==1,We=ie(a.text).length+(we?G:0);if(me)for(var Xe=0;Xe<me.length;++Xe){var ut=me[Xe];if(ut.to==null){var st=Tr(ge,ut.marker);st?we&&(ut.to=st.to==null?null:st.to+We):ut.to=G}}if(ge)for(var mt=0;mt<ge.length;++mt){var xt=ge[mt];if(xt.to!=null&&(xt.to+=We),xt.from==null){var Lt=Tr(me,xt.marker);Lt||(xt.from=We,we&&(me||(me=[])).push(xt))}else xt.from+=We,we&&(me||(me=[])).push(xt)}me&&(me=un(me)),ge&&ge!=me&&(ge=un(ge));var jt=[me];if(!we){var Vt=a.text.length-2,Ft;if(Vt>0&&me)for(var Jt=0;Jt<me.length;++Jt)me[Jt].to==null&&(Ft||(Ft=[])).push(new jr(me[Jt].marker,null,null));for(var fr=0;fr<Vt;++fr)jt.push(Ft);jt.push(ge)}return jt}function un(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 Si(t,a,j){var M=null;if(t.iter(a.line,j.line+1,function(st){if(st.markedSpans)for(var mt=0;mt<st.markedSpans.length;++mt){var xt=st.markedSpans[mt].marker;xt.readOnly&&(!M||re(M,xt)==-1)&&(M||(M=[])).push(xt)}}),!M)return null;for(var G=[{from:a,to:j}],Z=0;Z<M.length;++Z)for(var se=M[Z],me=se.find(0),ge=0;ge<G.length;++ge){var we=G[ge];if(Ht(we.to,me.from)<0||Ht(we.from,me.to)>0)continue;var We=[ge,1],Xe=Ht(we.from,me.from),ut=Ht(we.to,me.to);(Xe<0||!se.inclusiveLeft&&!Xe)&&We.push({from:we.from,to:me.from}),(ut>0||!se.inclusiveRight&&!ut)&&We.push({from:me.to,to:we.to}),G.splice.apply(G,We),ge+=We.length-3}return G}function hn(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 Yn(t,a){if(!a)return;for(var j=0;j<a.length;++j)a[j].marker.attachLine(t);t.markedSpans=a}function en(t){return t.inclusiveLeft?-1:0}function hr(t){return t.inclusiveRight?1:0}function nn(t,a){var j=t.lines.length-a.lines.length;if(j!=0)return j;var M=t.find(),G=a.find(),Z=Ht(M.from,G.from)||en(t)-en(a);if(Z)return-Z;var se=Ht(M.to,G.to)||hr(t)-hr(a);return se||a.id-t.id}function xr(t,a){var j=zt&&t.markedSpans,M;if(j)for(var G=void 0,Z=0;Z<j.length;++Z)G=j[Z],G.marker.collapsed&&(a?G.from:G.to)==null&&(!M||nn(M,G.marker)<0)&&(M=G.marker);return M}function fn(t){return xr(t,!0)}function Fr(t){return xr(t,!1)}function mi(t,a){var j=zt&&t.markedSpans,M;if(j)for(var G=0;G<j.length;++G){var Z=j[G];Z.marker.collapsed&&(Z.from==null||Z.from<a)&&(Z.to==null||Z.to>a)&&(!M||nn(M,Z.marker)<0)&&(M=Z.marker)}return M}function En(t,a,j,M,G){var Z=wt(t,a),se=zt&&Z.markedSpans;if(se)for(var me=0;me<se.length;++me){var ge=se[me];if(!ge.marker.collapsed)continue;var we=ge.marker.find(0),We=Ht(we.from,j)||en(ge.marker)-en(G),Xe=Ht(we.to,M)||hr(ge.marker)-hr(G);if(We>=0&&Xe<=0||We<=0&&Xe>=0)continue;if(We<=0&&(ge.marker.inclusiveRight&&G.inclusiveLeft?Ht(we.to,j)>=0:Ht(we.to,j)>0)||We>=0&&(ge.marker.inclusiveRight&&G.inclusiveLeft?Ht(we.from,M)<=0:Ht(we.from,M)<0))return!0}}function Un(t){for(var a;a=fn(t);)t=a.find(-1,!0).line;return t}function Di(t){for(var a;a=Fr(t);)t=a.find(1,!0).line;return t}function ui(t){for(var a,j;a=Fr(t);)t=a.find(1,!0).line,(j||(j=[])).push(t);return j}function bi(t,a){var j=wt(t,a),M=Un(j);return j==M?a:Nt(M)}function ei(t,a){if(a>t.lastLine())return a;var j=wt(t,a),M;if(!ti(t,j))return a;for(;M=Fr(j);)j=M.find(1,!0).line;return Nt(j)+1}function ti(t,a){var j=zt&&a.markedSpans;if(j)for(var M=void 0,G=0;G<j.length;++G){if(M=j[G],!M.marker.collapsed)continue;if(M.from==null)return!0;if(M.marker.widgetNode)continue;if(M.from==0&&M.marker.inclusiveLeft&&ji(t,a,M))return!0}}function ji(t,a,j){if(j.to==null){var M=j.marker.find(1,!0);return ji(t,M.line,Tr(M.line.markedSpans,j.marker))}if(j.marker.inclusiveRight&&j.to==a.text.length)return!0;for(var G=void 0,Z=0;Z<a.markedSpans.length;++Z)if(G=a.markedSpans[Z],G.marker.collapsed&&!G.marker.widgetNode&&G.from==j.to&&(G.to==null||G.to!=j.from)&&(G.marker.inclusiveLeft||j.marker.inclusiveRight)&&ji(t,a,G))return!0}function ci(t){t=Un(t);for(var a=0,j=t.parent,M=0;M<j.lines.length;++M){var G=j.lines[M];if(G==t)break;a+=G.height}for(var Z=j.parent;Z;j=Z,Z=j.parent)for(var se=0;se<Z.children.length;++se){var me=Z.children[se];if(me==j)break;a+=me.height}return a}function _i(t){if(t.height==0)return 0;for(var a=t.text.length,j,M=t;j=fn(M);){var G=j.find(0,!0);M=G.from.line,a+=G.from.ch-G.to.ch}for(M=t;j=Fr(M);){var Z=j.find(0,!0);a-=M.text.length-Z.from.ch,M=Z.to.line,a+=M.text.length-Z.to.ch}return a}function Hi(t){var a=t.display,j=t.doc;a.maxLine=wt(j,j.first),a.maxLineLength=_i(a.maxLine),a.maxLineChanged=!0,j.iter(function(M){var G=_i(M);G>a.maxLineLength&&(a.maxLineLength=G,a.maxLine=M)})}var di=function(t,a,j){this.text=t,Yn(this,a),this.height=j?j(this):1};di.prototype.lineNo=function(){return Nt(this)},Me(di);function tn(t,a,j,M){t.text=a,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),t.order!=null&&(t.order=null),hn(t),Yn(t,j);var G=M?M(t):1;G!=t.height&&Bt(t,G)}function $t(t){t.parent=null,hn(t)}var ur={},Qt={};function yr(t,a){if(!t||/^\s*$/.test(t))return null;var j=a.addModeClass?Qt:ur;return j[t]||(j[t]=t.replace(/\S+/g,"cm-$&"))}function kr(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 G=0;G<=(a.rest?a.rest.length:0);G++){var Z=G?a.rest[G-1]:a.line,se=void 0;M.pos=0,M.addToken=Rr,Dt(t.display.measure)&&(se=at(Z,t.doc.direction))&&(M.addToken=$n(M.addToken,se)),M.map=[];var me=a!=t.display.externalMeasured&&Nt(Z);Ei(Z,M,ft(t,Z,me)),Z.styleClasses&&(Z.styleClasses.bgClass&&(M.bgClass=O(Z.styleClasses.bgClass,M.bgClass||"")),Z.styleClasses.textClass&&(M.textClass=O(Z.styleClasses.textClass,M.textClass||""))),M.map.length==0&&M.map.push(0,0,M.content.appendChild(ht(t.display.measure))),G==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 ge=M.content.lastChild;(/\bcm-tab\b/.test(ge.className)||ge.querySelector&&ge.querySelector(".cm-tab"))&&(M.content.className="cm-tab-wrap-hack")}return Ve(t,"renderLine",t,a.line,M.pre),M.pre.className&&(M.textClass=O(M.pre.className,M.textClass||"")),M}function zr(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 Rr(t,a,j,M,G,Z,se){if(!a)return;var me=t.splitSpaces?vn(a,t.trailingSpace):a,ge=t.cm.state.specialChars,we=!1,We;if(!ge.test(a))t.col+=a.length,We=document.createTextNode(me),t.map.push(t.pos,t.pos+a.length,We),C&&_<9&&(we=!0),t.pos+=a.length;else{We=document.createDocumentFragment();for(var Xe=0;;){ge.lastIndex=Xe;var ut=ge.exec(a),st=ut?ut.index-Xe:a.length-Xe;if(st){var mt=document.createTextNode(me.slice(Xe,Xe+st));C&&_<9?We.appendChild(T("span",[mt])):We.appendChild(mt),t.map.push(t.pos,t.pos+st,mt),t.col+=st,t.pos+=st}if(!ut)break;Xe+=st+1;var xt=void 0;if(ut[0]==" "){var Lt=t.cm.options.tabSize,jt=Lt-t.col%Lt;xt=We.appendChild(T("span",ue(jt),"cm-tab")),xt.setAttribute("role","presentation"),xt.setAttribute("cm-text"," "),t.col+=jt}else ut[0]=="\r"||ut[0]==`
`?(xt=We.appendChild(T("span",ut[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),xt.setAttribute("cm-text",ut[0]),t.col+=1):(xt=t.cm.options.specialCharPlaceholder(ut[0]),xt.setAttribute("cm-text",ut[0]),C&&_<9?We.appendChild(T("span",[xt])):We.appendChild(xt),t.col+=1);t.map.push(t.pos,t.pos+1,xt),t.pos++}}if(t.trailingSpace=me.charCodeAt(a.length-1)==32,j||M||G||we||Z||se){var Vt=j||"";M&&(Vt+=M),G&&(Vt+=G);var Ft=T("span",[We],Vt,Z);if(se)for(var Jt in se)se.hasOwnProperty(Jt)&&Jt!="style"&&Jt!="class"&&Ft.setAttribute(Jt,se[Jt]);return t.content.appendChild(Ft)}t.content.appendChild(We)}function vn(t,a){if(t.length>1&&!/ /.test(t))return t;for(var j=a,M="",G=0;G<t.length;G++){var Z=t.charAt(G);Z==" "&&j&&(G==t.length-1||t.charCodeAt(G+1)==32)&&(Z="\xA0"),M+=Z,j=Z==" "}return M}function $n(t,a){return function(j,M,G,Z,se,me,ge){G=G?G+" cm-force-border":"cm-force-border";for(var we=j.pos,We=we+M.length;;){for(var Xe=void 0,ut=0;ut<a.length&&!(Xe=a[ut],Xe.to>we&&Xe.from<=we);ut++);if(Xe.to>=We)return t(j,M,G,Z,se,me,ge);t(j,M.slice(0,Xe.to-we),G,Z,null,me,ge),Z=null,M=M.slice(Xe.to-we),we=Xe.to}}}function Sr(t,a,j,M){var G=!M&&j.widgetNode;G&&t.map.push(t.pos,t.pos+a,G),!M&&t.cm.display.input.needsContentAttribute&&(G||(G=t.content.appendChild(document.createElement("span"))),G.setAttribute("cm-marker",j.id)),G&&(t.cm.display.input.setUneditable(G),t.content.appendChild(G)),t.pos+=a,t.trailingSpace=!1}function Ei(t,a,j){var M=t.markedSpans,G=t.text,Z=0;if(!M){for(var se=1;se<j.length;se+=2)a.addToken(a,G.slice(Z,Z=j[se]),yr(j[se+1],a.cm.options));return}for(var me=G.length,ge=0,we=1,We="",Xe,ut,st=0,mt,xt,Lt,jt,Vt;;){if(st==ge){mt=xt=Lt=ut="",Vt=null,jt=null,st=Infinity;for(var Ft=[],Jt=void 0,fr=0;fr<M.length;++fr){var or=M[fr],Nr=or.marker;if(Nr.type=="bookmark"&&or.from==ge&&Nr.widgetNode)Ft.push(Nr);else if(or.from<=ge&&(or.to==null||or.to>ge||Nr.collapsed&&or.to==ge&&or.from==ge)){if(or.to!=null&&or.to!=ge&&st>or.to&&(st=or.to,xt=""),Nr.className&&(mt+=" "+Nr.className),Nr.css&&(ut=(ut?ut+";":"")+Nr.css),Nr.startStyle&&or.from==ge&&(Lt+=" "+Nr.startStyle),Nr.endStyle&&or.to==st&&(Jt||(Jt=[])).push(Nr.endStyle,or.to),Nr.title&&((Vt||(Vt={})).title=Nr.title),Nr.attributes)for(var Sn in Nr.attributes)(Vt||(Vt={}))[Sn]=Nr.attributes[Sn];Nr.collapsed&&(!jt||nn(jt.marker,Nr)<0)&&(jt=or)}else or.from>ge&&st>or.from&&(st=or.from)}if(Jt)for(var fi=0;fi<Jt.length;fi+=2)Jt[fi+1]==st&&(xt+=" "+Jt[fi]);if(!jt||jt.from==ge)for(var Fn=0;Fn<Ft.length;++Fn)Sr(a,0,Ft[Fn]);if(jt&&(jt.from||0)==ge){if(Sr(a,(jt.to==null?me+1:jt.to)-ge,jt.marker,jt.from==null),jt.to==null)return;jt.to==ge&&(jt=!1)}}if(ge>=me)break;for(var Fi=Math.min(me,st);;){if(We){var Mi=ge+We.length;if(!jt){var Qn=Mi>Fi?We.slice(0,Fi-ge):We;a.addToken(a,Qn,Xe?Xe+mt:mt,Lt,ge+Qn.length==st?xt:"",ut,Vt)}if(Mi>=Fi){We=We.slice(Fi-ge),ge=Fi;break}ge=Mi,Lt=""}We=G.slice(Z,Z=j[we++]),Xe=yr(j[we++],a.cm.options)}}}function Vr(t,a,j){this.line=a,this.rest=ui(a),this.size=this.rest?Nt(ie(this.rest))-j+1:1,this.node=this.text=null,this.hidden=ti(t,a)}function jn(t,a,j){for(var M=[],G,Z=a;Z<j;Z=G){var se=new Vr(t.doc,wt(t.doc,Z),Z);G=Z+se.size,M.push(se)}return M}var Bn=null;function gi(t){Bn?Bn.ops.push(t):t.ownsGroup=Bn={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 G=t.ops[M];if(G.cursorActivityHandlers)for(;G.cursorActivityCalled<G.cursorActivityHandlers.length;)G.cursorActivityHandlers[G.cursorActivityCalled++].call(null,G.cm)}}while(j<a.length)}function Xr(t,a){var j=t.ownsGroup;if(!j)return;try{ua(j)}finally{Bn=null,a(j)}}var Pr=null;function Ir(t,a){var j=nt(t,a);if(!j.length)return;var M=Array.prototype.slice.call(arguments,2),G;Bn?G=Bn.delayedCallbacks:Pr?G=Pr:(G=Pr=[],setTimeout(hi,0));for(var Z=function(me){G.push(function(){return j[me].apply(null,M)})},se=0;se<j.length;++se)Z(se)}function hi(){var t=Pr;Pr=null;for(var a=0;a<t.length;++a)t[a]()}function Xi(t,a,j,M){for(var G=0;G<a.changes.length;G++){var Z=a.changes[G];Z=="text"?gr(t,a):Z=="gutter"?an(t,a,j,M):Z=="class"?br(t,a):Z=="widget"&&Dr(t,a,M)}a.changes=null}function Yi(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 cr(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=Yi(a);a.background=M.insertBefore(T("div",null,j),M.firstChild),t.display.input.setUneditable(a.background)}}function Ut(t,a){var j=t.display.externalMeasured;return j&&j.line==a.line?(t.display.externalMeasured=null,a.measure=j.measure,j.built):kr(t,a)}function gr(t,a){var j=a.text.className,M=Ut(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,br(t,a)):j&&(a.text.className=j)}function br(t,a){cr(t,a),a.line.wrapClass?Yi(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 an(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 G=Yi(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),G.insertBefore(a.gutterBackground,a.text)}var Z=a.line.gutterMarkers;if(t.options.lineNumbers||Z){var se=Yi(a),me=a.gutter=T("div",null,"CodeMirror-gutter-wrapper","left: "+(t.options.fixedGutter?M.fixedPos:-M.gutterTotalWidth)+"px");if(t.display.input.setUneditable(me),se.insertBefore(me,a.text),a.line.gutterClass&&(me.className+=" "+a.line.gutterClass),t.options.lineNumbers&&(!Z||!Z["CodeMirror-linenumbers"])&&(a.lineNumber=me.appendChild(T("div",Cr(t.options,j),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+M.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+t.display.lineNumInnerWidth+"px"))),Z)for(var ge=0;ge<t.display.gutterSpecs.length;++ge){var we=t.display.gutterSpecs[ge].className,We=Z.hasOwnProperty(we)&&Z[we];We&&me.appendChild(T("div",[We],"CodeMirror-gutter-elt","left: "+M.gutterLeft[we]+"px; width: "+M.gutterWidth[we]+"px"))}}}function Dr(t,a,j){a.alignable&&(a.alignable=null);for(var M=R("CodeMirror-linewidget"),G=a.node.firstChild,Z=void 0;G;G=Z)Z=G.nextSibling,M.test(G.className)&&a.node.removeChild(G);xn(t,a,j)}function Rn(t,a,j,M){var G=Ut(t,a);return a.text=a.node=G.pre,G.bgClass&&(a.bgClass=G.bgClass),G.textClass&&(a.textClass=G.textClass),br(t,a),an(t,a,j,M),xn(t,a,M),a.node}function xn(t,a,j){if(Li(t,a.line,a,j,!0),a.rest)for(var M=0;M<a.rest.length;M++)Li(t,a.rest[M],a,j,!1)}function Li(t,a,j,M,G){if(!a.widgets)return;for(var Z=Yi(j),se=0,me=a.widgets;se<me.length;++se){var ge=me[se],we=T("div",[ge.node],"CodeMirror-linewidget"+(ge.className?" "+ge.className:""));ge.handleMouseEvents||we.setAttribute("cm-ignore-events","true"),Hn(ge,we,j,M),t.display.input.setUneditable(we),G&&ge.above?Z.insertBefore(we,j.gutter||j.text):Z.appendChild(we),Ir(ge,"redraw")}}function Hn(t,a,j,M){if(t.noHScroll){(j.alignable||(j.alignable=[])).push(a);var G=M.wrapperWidth;a.style.left=M.fixedPos+"px",t.coverGutter||(G-=M.gutterTotalWidth,a.style.paddingLeft=M.gutterTotalWidth+"px"),a.style.width=G+"px"}t.coverGutter&&(a.style.zIndex=5,a.style.position="relative",t.noHScroll||(a.style.marginLeft=-M.gutterTotalWidth+"px"))}function Kn(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 Jn(t,a){for(var j=He(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 $i(t){return t.lineSpace.offsetTop}function Pe(t){return t.mover.offsetHeight-t.lineSpace.offsetHeight}function Ye(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 Ze(t){return ee-t.display.nativeBarWidth}function Ue(t){return t.display.scroller.clientWidth-Ze(t)-t.display.barWidth}function _e(t){return t.display.scroller.clientHeight-Ze(t)-t.display.barHeight}function Le(t,a,j){var M=t.options.lineWrapping,G=M&&Ue(t);if(!a.measure.heights||M&&a.measure.width!=G){var Z=a.measure.heights=[];if(M){a.measure.width=G;for(var se=a.text.firstChild.getClientRects(),me=0;me<se.length-1;me++){var ge=se[me],we=se[me+1];Math.abs(ge.bottom-we.bottom)>2&&Z.push((ge.bottom+we.top)/2-j.top)}}Z.push(j.bottom-j.top)}}function Te(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 G=0;G<t.rest.length;G++)if(Nt(t.rest[G])>j)return{map:t.measure.maps[G],cache:t.measure.caches[G],before:!0}}function Be(t,a){a=Un(a);var j=Nt(a),M=t.display.externalMeasured=new Vr(t.doc,a,j);M.lineN=j;var G=M.built=kr(t,M);return M.text=G.pre,w(t.display.lineMeasure,G.pre),M}function Ge(t,a,j,M){return ot(t,$e(t,a),j,M)}function Je(t,a){if(a>=t.display.viewFrom&&a<t.display.viewTo)return t.display.view[Tn(t,a)];var j=t.display.externalMeasured;if(j&&a>=j.lineN&&a<j.lineN+j.size)return j}function $e(t,a){var j=Nt(a),M=Je(t,j);M&&!M.text?M=null:M&&M.changes&&(Xi(t,M,j,Mn(t)),t.curOp.forceUpdate=!0),M||(M=Be(t,a));var G=Te(M,a,j);return{line:a,view:M,rect:null,map:G.map,cache:G.cache,before:G.before,hasHeights:!1}}function ot(t,a,j,M,G){a.before&&(j=-1);var Z=j+(M||""),se;return a.cache.hasOwnProperty(Z)?se=a.cache[Z]:(a.rect||(a.rect=a.view.text.getBoundingClientRect()),a.hasHeights||(Le(t,a.view,a.rect),a.hasHeights=!0),se=Pt(t,a,j,M),se.bogus||(a.cache[Z]=se)),{left:se.left,right:se.right,top:G?se.rtop:se.top,bottom:G?se.rbottom:se.bottom}}var dt={left:0,right:0,top:0,bottom:0};function St(t,a,j){for(var M,G,Z,se,me,ge,we=0;we<t.length;we+=3)if(me=t[we],ge=t[we+1],a<me?(G=0,Z=1,se="left"):a<ge?(G=a-me,Z=G+1):(we==t.length-3||a==ge&&t[we+3]>a)&&(Z=ge-me,G=Z-1,a>=ge&&(se="right")),G!=null){if(M=t[we+2],me==ge&&j==(M.insertLeft?"left":"right")&&(se=j),j=="left"&&G==0)for(;we&&t[we-2]==t[we-3]&&t[we-1].insertLeft;)M=t[(we-=3)+2],se="left";if(j=="right"&&G==ge-me)for(;we<t.length-3&&t[we+3]==t[we+4]&&!t[we+5].insertLeft;)M=t[(we+=3)+2],se="right";break}return{node:M,start:G,end:Z,collapse:se,coverStart:me,coverEnd:ge}}function Tt(t,a){var j=dt;if(a=="left")for(var M=0;M<t.length&&!((j=t[M]).left!=j.right);M++);else for(var G=t.length-1;G>=0&&!((j=t[G]).left!=j.right);G--);return j}function Pt(t,a,j,M){var G=St(a.map,j,M),Z=G.node,se=G.start,me=G.end,ge=G.collapse,we;if(Z.nodeType==3){for(var We=0;We<4;We++){for(;se&&pe(a.line.text.charAt(G.coverStart+se));)--se;for(;G.coverStart+me<G.coverEnd&&pe(a.line.text.charAt(G.coverStart+me));)++me;if(C&&_<9&&se==0&&me==G.coverEnd-G.coverStart?we=Z.parentNode.getBoundingClientRect():we=Tt(P(Z,se,me).getClientRects(),M),we.left||we.right||se==0)break;me=se,se=se-1,ge="right"}C&&_<11&&(we=tr(t.display.measure,we))}else{se>0&&(ge=M="right");var Xe;t.options.lineWrapping&&(Xe=Z.getClientRects()).length>1?we=Xe[M=="right"?Xe.length-1:0]:we=Z.getBoundingClientRect()}if(C&&_<9&&!se&&(!we||!we.left&&!we.right)){var ut=Z.parentNode.getClientRects()[0];ut?we={left:ut.left,right:ut.left+ri(t.display),top:ut.top,bottom:ut.bottom}:we=dt}for(var st=we.top-a.rect.top,mt=we.bottom-a.rect.top,xt=(st+mt)/2,Lt=a.view.measure.heights,jt=0;jt<Lt.length-1&&!(xt<Lt[jt]);jt++);var Vt=jt?Lt[jt-1]:0,Ft=Lt[jt],Jt={left:(ge=="right"?we.right:we.left)-a.rect.left,right:(ge=="left"?we.left:we.right)-a.rect.left,top:Vt,bottom:Ft};return!we.left&&!we.right&&(Jt.bogus=!0),t.options.singleCursorHeightPerLine||(Jt.rtop=st,Jt.rbottom=mt),Jt}function tr(t,a){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!rr(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 _r(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 wr(t){t.display.externalMeasure=null,x(t.display.lineMeasure);for(var a=0;a<t.display.view.length;a++)_r(t.display.view[a])}function Or(t){wr(t),t.display.cachedCharWidth=t.display.cachedTextHeight=t.display.cachedPaddingH=null,t.options.lineWrapping||(t.display.maxLineChanged=!0),t.display.lineNumChars=null}function Mr(){return r&&d?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Lr(){return r&&d?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Ar(t){var a=0;if(t.widgets)for(var j=0;j<t.widgets.length;++j)t.widgets[j].above&&(a+=Kn(t.widgets[j]));return a}function Yr(t,a,j,M,G){if(!G){var Z=Ar(a);j.top+=Z,j.bottom+=Z}if(M=="line")return j;M||(M="local");var se=ci(a);if(M=="local"?se+=$i(t.display):se-=t.display.viewOffset,M=="page"||M=="window"){var me=t.display.lineSpace.getBoundingClientRect();se+=me.top+(M=="window"?0:Lr());var ge=me.left+(M=="window"?0:Mr());j.left+=ge,j.right+=ge}return j.top+=se,j.bottom+=se,j}function Ur(t,a,j){if(j=="div")return a;var M=a.left,G=a.top;if(j=="page")M-=Mr(),G-=Lr();else if(j=="local"||!j){var Z=t.display.sizer.getBoundingClientRect();M+=Z.left,G+=Z.top}var se=t.display.lineSpace.getBoundingClientRect();return{left:M-se.left,top:G-se.top}}function In(t,a,j,M,G){return M||(M=wt(t.doc,a.line)),Yr(t,M,Ge(t,M,a.ch,G),j)}function Br(t,a,j,M,G,Z){M=M||wt(t.doc,a.line),G||(G=$e(t,M));function se(mt,xt){var Lt=ot(t,G,mt,xt?"right":"left",Z);return xt?Lt.left=Lt.right:Lt.right=Lt.left,Yr(t,M,Lt,j)}var me=at(M,t.doc.direction),ge=a.ch,we=a.sticky;if(ge>=M.text.length?(ge=M.text.length,we="before"):ge<=0&&(ge=0,we="after"),!me)return se(we=="before"?ge-1:ge,we=="before");function We(mt,xt,Lt){var jt=me[xt],Vt=jt.level==1;return se(Lt?mt-1:mt,Vt!=Lt)}var Xe=et(me,ge,we),ut=tt,st=We(ge,Xe,we=="before");return ut!=null&&(st.other=We(ge,ut,we!="before")),st}function dr(t,a){var j=0;a=V(t.doc,a),t.options.lineWrapping||(j=ri(t.display)*a.ch);var M=wt(t.doc,a.line),G=ci(M)+$i(t.display);return{left:j,right:j,top:G,bottom:G+M.height}}function ar(t,a,j,M,G){var Z=vt(t,a,j);return Z.xRel=G,M&&(Z.outside=M),Z}function Wr(t,a,j){var M=t.doc;if(j+=t.display.viewOffset,j<0)return ar(M.first,0,null,-1,-1);var G=vr(M,j),Z=M.first+M.size-1;if(G>Z)return ar(M.first+M.size-1,wt(M,Z).text.length,null,1,1);a<0&&(a=0);for(var se=wt(M,G);;){var me=Dn(t,se,G,a,j),ge=mi(se,me.ch+(me.xRel>0||me.outside>0?1:0));if(!ge)return me;var we=ge.find(1);if(we.line==G)return we;se=wt(M,G=we.line)}}function $r(t,a,j,M){M-=Ar(a);var G=a.text.length,Z=Ke(function(se){return ot(t,j,se-1).bottom<=M},G,0);return G=Ke(function(se){return ot(t,j,se).top>M},Z,G),{begin:Z,end:G}}function Zt(t,a,j,M){j||(j=$e(t,a));var G=Yr(t,a,ot(t,j,M),"line").top;return $r(t,a,j,G)}function rn(t,a,j,M){return t.bottom<=j?!1:t.top>j?!0:(M?t.left:t.right)>a}function Dn(t,a,j,M,G){G-=ci(a);var Z=$e(t,a),se=Ar(a),me=0,ge=a.text.length,we=!0,We=at(a,t.doc.direction);if(We){var Xe=(t.options.lineWrapping?yn:sn)(t,a,j,Z,We,M,G);we=Xe.level!=1,me=we?Xe.from:Xe.to-1,ge=we?Xe.to:Xe.from-1}var ut=null,st=null,mt=Ke(function(fr){var or=ot(t,Z,fr);return or.top+=se,or.bottom+=se,rn(or,M,G,!1)?(or.top<=G&&or.left<=M&&(ut=fr,st=or),!0):!1},me,ge),xt,Lt,jt=!1;if(st){var Vt=M-st.left<st.right-M,Ft=Vt==we;mt=ut+(Ft?0:1),Lt=Ft?"after":"before",xt=Vt?st.left:st.right}else{!we&&(mt==ge||mt==me)&&mt++,Lt=mt==0?"after":mt==a.text.length?"before":ot(t,Z,mt-(we?1:0)).bottom+se<=G==we?"after":"before";var Jt=Br(t,vt(j,mt,Lt),"line",a,Z);xt=Jt.left,jt=G<Jt.top?-1:G>=Jt.bottom?1:0}return mt=xe(a.text,mt,1),ar(j,mt,Lt,jt,M-xt)}function sn(t,a,j,M,G,Z,se){var me=Ke(function(Xe){var ut=G[Xe],st=ut.level!=1;return rn(Br(t,vt(j,st?ut.to:ut.from,st?"before":"after"),"line",a,M),Z,se,!0)},0,G.length-1),ge=G[me];if(me>0){var we=ge.level!=1,We=Br(t,vt(j,we?ge.from:ge.to,we?"after":"before"),"line",a,M);rn(We,Z,se,!0)&&We.top>se&&(ge=G[me-1])}return ge}function yn(t,a,j,M,G,Z,se){var me=$r(t,a,M,se),ge=me.begin,we=me.end;/\s/.test(a.text.charAt(we-1))&&we--;for(var We=null,Xe=null,ut=0;ut<G.length;ut++){var st=G[ut];if(st.from>=we||st.to<=ge)continue;var mt=st.level!=1,xt=ot(t,M,mt?Math.min(we,st.to)-1:Math.max(ge,st.from)).right,Lt=xt<Z?Z-xt+1e9:xt-Z;(!We||Xe>Lt)&&(We=st,Xe=Lt)}return We||(We=G[G.length-1]),We.from<ge&&(We={from:ge,to:We.to,level:We.level}),We.to>we&&(We={from:We.from,to:we,level:We.level}),We}var mn;function Wn(t){if(t.cachedTextHeight!=null)return t.cachedTextHeight;if(mn==null){mn=T("pre",null,"CodeMirror-line-like");for(var a=0;a<49;++a)mn.appendChild(document.createTextNode("x")),mn.appendChild(T("br"));mn.appendChild(document.createTextNode("x"))}w(t.measure,mn);var j=mn.offsetHeight/50;return j>3&&(t.cachedTextHeight=j),x(t.measure),j||1}function ri(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(),G=(M.right-M.left)/10;return G>2&&(t.cachedCharWidth=G),G||10}function Mn(t){for(var a=t.display,j={},M={},G=a.gutters.clientLeft,Z=a.gutters.firstChild,se=0;Z;Z=Z.nextSibling,++se){var me=t.display.gutterSpecs[se].className;j[me]=Z.offsetLeft+Z.clientLeft+G,M[me]=Z.clientWidth}return{fixedPos:xi(a),gutterTotalWidth:a.gutters.offsetWidth,gutterLeft:j,gutterWidth:M,wrapperWidth:a.wrapper.clientWidth}}function xi(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function Wi(t){var a=Wn(t.display),j=t.options.lineWrapping,M=j&&Math.max(5,t.display.scroller.clientWidth/ri(t.display)-3);return function(G){if(ti(t.doc,G))return 0;var Z=0;if(G.widgets)for(var se=0;se<G.widgets.length;se++)G.widgets[se].height&&(Z+=G.widgets[se].height);return j?Z+(Math.ceil(G.text.length/M)||1)*a:Z+a}}function Ci(t){var a=t.doc,j=Wi(t);a.iter(function(M){var G=j(M);G!=M.height&&Bt(M,G)})}function ni(t,a,j,M){var G=t.display;if(!j&&He(a).getAttribute("cm-not-content")=="true")return null;var Z,se,me=G.lineSpace.getBoundingClientRect();try{Z=a.clientX-me.left,se=a.clientY-me.top}catch(Xe){return null}var ge=Wr(t,Z,se),we;if(M&&ge.xRel>0&&(we=wt(t.doc,ge.line).text).length==ge.ch){var We=W(we,we.length,t.options.tabSize)-we.length;ge=vt(ge.line,Math.max(0,Math.round((Z-Ye(t.display).left)/ri(t.display))-We))}return ge}function Tn(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 bn(t,a,j,M){a==null&&(a=t.doc.first),j==null&&(j=t.doc.first+t.doc.size),M||(M=0);var G=t.display;if(M&&j<G.viewTo&&(G.updateLineNumbers==null||G.updateLineNumbers>a)&&(G.updateLineNumbers=a),t.curOp.viewChanged=!0,a>=G.viewTo)zt&&bi(t.doc,a)<G.viewTo&&Ln(t);else if(j<=G.viewFrom)zt&&ei(t.doc,j+M)>G.viewFrom?Ln(t):(G.viewFrom+=M,G.viewTo+=M);else if(a<=G.viewFrom&&j>=G.viewTo)Ln(t);else if(a<=G.viewFrom){var Z=Gi(t,j,j+M,1);Z?(G.view=G.view.slice(Z.index),G.viewFrom=Z.lineN,G.viewTo+=M):Ln(t)}else if(j>=G.viewTo){var se=Gi(t,a,a,-1);se?(G.view=G.view.slice(0,se.index),G.viewTo=se.lineN):Ln(t)}else{var me=Gi(t,a,a,-1),ge=Gi(t,j,j+M,1);me&&ge?(G.view=G.view.slice(0,me.index).concat(jn(t,me.lineN,ge.lineN)).concat(G.view.slice(ge.index)),G.viewTo+=M):Ln(t)}var we=G.externalMeasured;we&&(j<we.lineN?we.lineN+=M:a<we.lineN+we.size&&(G.externalMeasured=null))}function Pn(t,a,j){t.curOp.viewChanged=!0;var M=t.display,G=t.display.externalMeasured;if(G&&a>=G.lineN&&a<G.lineN+G.size&&(M.externalMeasured=null),a<M.viewFrom||a>=M.viewTo)return;var Z=M.view[Tn(t,a)];if(Z.node==null)return;var se=Z.changes||(Z.changes=[]);re(se,j)==-1&&se.push(j)}function Ln(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function Gi(t,a,j,M){var G=Tn(t,a),Z,se=t.display.view;if(!zt||j==t.doc.first+t.doc.size)return{index:G,lineN:j};for(var me=t.display.viewFrom,ge=0;ge<G;ge++)me+=se[ge].size;if(me!=a){if(M>0){if(G==se.length-1)return null;Z=me+se[G].size-a,G++}else Z=me-a;a+=Z,j+=Z}for(;bi(t.doc,j)!=j;){if(G==(M<0?0:se.length-1))return null;j+=M*se[G-(M<0?1:0)].size,G+=M}return{index:G,lineN:j}}function ta(t,a,j){var M=t.display,G=M.view;G.length==0||a>=M.viewTo||j<=M.viewFrom?(M.view=jn(t,a,j),M.viewFrom=a):(M.viewFrom>a?M.view=jn(t,a,M.viewFrom).concat(M.view):M.viewFrom<a&&(M.view=M.view.slice(Tn(t,a))),M.viewFrom=a,M.viewTo<j?M.view=M.view.concat(jn(t,M.viewTo,j)):M.viewTo>j&&(M.view=M.view.slice(0,Tn(t,j)))),M.viewTo=j}function ra(t){for(var a=t.display.view,j=0,M=0;M<a.length;M++){var G=a[M];!G.hidden&&(!G.node||G.changes)&&++j}return j}function gn(t){t.display.input.showSelection(t.display.input.prepareSelection())}function Ji(t,a){a===void 0&&(a=!0);for(var j=t.doc,M={},G=M.cursors=document.createDocumentFragment(),Z=M.selection=document.createDocumentFragment(),se=0;se<j.sel.ranges.length;se++){if(!a&&se==j.sel.primIndex)continue;var me=j.sel.ranges[se];if(me.from().line>=t.display.viewTo||me.to().line<t.display.viewFrom)continue;var ge=me.empty();(ge||t.options.showCursorWhenSelecting)&&na(t,me.head,G),ge||pn(t,me,Z)}return M}function na(t,a,j){var M=Br(t,a,"div",null,null,!t.options.singleCursorHeightPerLine),G=j.appendChild(T("div","\xA0","CodeMirror-cursor"));if(G.style.left=M.left+"px",G.style.top=M.top+"px",G.style.height=Math.max(0,M.bottom-M.top)*t.options.cursorHeight+"px",M.other){var Z=j.appendChild(T("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Z.style.display="",Z.style.left=M.other.left+"px",Z.style.top=M.other.top+"px",Z.style.height=(M.other.bottom-M.other.top)*.85+"px"}}function wn(t,a){return t.top-a.top||t.left-a.left}function pn(t,a,j){var M=t.display,G=t.doc,Z=document.createDocumentFragment(),se=Ye(t.display),me=se.left,ge=Math.max(M.sizerWidth,Ue(t)-M.sizer.offsetLeft)-se.right,we=G.direction=="ltr";function We(Ft,Jt,fr,or){Jt<0&&(Jt=0),Jt=Math.round(Jt),or=Math.round(or),Z.appendChild(T("div",null,"CodeMirror-selected","position: absolute; left: "+Ft+`px;
top: `+Jt+"px; width: "+(fr==null?ge-Ft:fr)+`px;
height: `+(or-Jt)+"px"))}function Xe(Ft,Jt,fr){var or=wt(G,Ft),Nr=or.text.length,Sn,fi;function Fn(Qn,Pi){return In(t,vt(Ft,Qn),"div",or,Pi)}function Fi(Qn,Pi,yi){var si=Zt(t,or,null,Qn),Zn=Pi=="ltr"==(yi=="after")?"left":"right",Gn=yi=="after"?si.begin:si.end-(/\s/.test(or.text.charAt(si.end-1))?2:1);return Fn(Gn,Zn)[Zn]}var Mi=at(or,G.direction);return qe(Mi,Jt||0,fr==null?Nr:fr,function(Qn,Pi,yi,si){var Zn=yi=="ltr",Gn=Fn(Qn,Zn?"left":"right"),Ni=Fn(Pi-1,Zn?"right":"left"),Za=Jt==null&&Qn==0,Ca=fr==null&&Pi==Nr,Ti=si==0,la=!Mi||si==Mi.length-1;if(Ni.top-Gn.top<=3){var pi=(we?Za:Ca)&&Ti,ps=(we?Ca:Za)&&la,ga=pi?me:(Zn?Gn:Ni).left,La=ps?ge:(Zn?Ni:Gn).right;We(ga,Gn.top,La-ga,Gn.bottom)}else{var ka,Ii,qa,ms;Zn?(ka=we&&Za&&Ti?me:Gn.left,Ii=we?ge:Fi(Qn,yi,"before"),qa=we?me:Fi(Pi,yi,"after"),ms=we&&Ca&&la?ge:Ni.right):(ka=we?Fi(Qn,yi,"before"):me,Ii=!we&&Za&&Ti?ge:Gn.right,qa=!we&&Ca&&la?me:Ni.left,ms=we?Fi(Pi,yi,"after"):ge),We(ka,Gn.top,Ii-ka,Gn.bottom),Gn.bottom<Ni.top&&We(me,Gn.bottom,null,Ni.top),We(qa,Ni.top,ms-qa,Ni.bottom)}(!Sn||wn(Gn,Sn)<0)&&(Sn=Gn),wn(Ni,Sn)<0&&(Sn=Ni),(!fi||wn(Gn,fi)<0)&&(fi=Gn),wn(Ni,fi)<0&&(fi=Ni)}),{start:Sn,end:fi}}var ut=a.from(),st=a.to();if(ut.line==st.line)Xe(ut.line,ut.ch,st.ch);else{var mt=wt(G,ut.line),xt=wt(G,st.line),Lt=Un(mt)==Un(xt),jt=Xe(ut.line,ut.ch,Lt?mt.text.length+1:null).end,Vt=Xe(st.line,Lt?0:null,st.ch).start;Lt&&(jt.top<Vt.top-2?(We(jt.right,jt.top,null,jt.bottom),We(me,Vt.top,Vt.left,Vt.bottom)):We(jt.right,jt.top,Vt.left-jt.right,jt.bottom)),jt.bottom<Vt.top&&We(me,jt.bottom,null,Vt.top)}j.appendChild(Z)}function ii(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||(Ve(t,"focus",t,a),t.state.focused=!0,K(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()),ii(t)}function va(t,a){if(t.state.delayingBlurEvent)return;t.state.focused&&(Ve(t,"blur",t,a),t.state.focused=!1,v(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 G=a.view[M],Z=t.options.lineWrapping,se=void 0,me=0;if(G.hidden)continue;if(C&&_<8){var ge=G.node.offsetTop+G.node.offsetHeight;se=ge-j,j=ge}else{var we=G.node.getBoundingClientRect();se=we.bottom-we.top,!Z&&G.text.firstChild&&(me=G.text.firstChild.getBoundingClientRect().right-we.left-1)}var We=G.line.height-se;if((We>.005||We<-.005)&&(Bt(G.line,se),to(G.line),G.rest))for(var Xe=0;Xe<G.rest.length;Xe++)to(G.rest[Xe]);if(me>t.display.sizerWidth){var ut=Math.ceil(me/ri(t.display));ut>t.display.maxLineLength&&(t.display.maxLineLength=ut,t.display.maxLine=G.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-$i(t));var G=j&&j.bottom!=null?j.bottom:M+t.wrapper.clientHeight,Z=vr(a,M),se=vr(a,G);if(j&&j.ensure){var me=j.ensure.from.line,ge=j.ensure.to.line;me<Z?(Z=me,se=vr(a,ci(wt(a,me))+t.wrapper.clientHeight)):Math.min(ge,a.lastLine())>=se&&(Z=vr(a,ci(wt(a,ge))-t.wrapper.clientHeight),se=ge)}return{from:Z,to:Math.max(se,Z+1)}}function Xo(t,a){if(Qe(t,"scrollCursorIntoView"))return;var j=t.display,M=j.sizer.getBoundingClientRect(),G=null;if(a.top+M.top<0?G=!0:a.bottom+M.top>(window.innerHeight||document.documentElement.clientHeight)&&(G=!1),G!=null&&!o){var Z=T("div","\u200B",null,`position: absolute;
top: `+(a.top-j.viewOffset-$i(t.display))+`px;
height: `+(a.bottom-a.top+Ze(t)+j.barHeight)+`px;
left: `+a.left+"px; width: "+Math.max(2,a.right-a.left)+"px;");t.display.lineSpace.appendChild(Z),Z.scrollIntoView(G),t.display.lineSpace.removeChild(Z)}}function Yo(t,a,j,M){M==null&&(M=0);var G;!t.options.lineWrapping&&a==j&&(a=a.ch?vt(a.line,a.sticky=="before"?a.ch-1:a.ch,"after"):a,j=a.sticky=="before"?vt(a.line,a.ch+1,"before"):a);for(var Z=0;Z<5;Z++){var se=!1,me=Br(t,a),ge=!j||j==a?me:Br(t,j);G={left:Math.min(me.left,ge.left),top:Math.min(me.top,ge.top)-M,right:Math.max(me.left,ge.left),bottom:Math.max(me.bottom,ge.bottom)+M};var we=ro(t,G),We=t.doc.scrollTop,Xe=t.doc.scrollLeft;if(we.scrollTop!=null&&(_a(t,we.scrollTop),Math.abs(t.doc.scrollTop-We)>1&&(se=!0)),we.scrollLeft!=null&&(Ki(t,we.scrollLeft),Math.abs(t.doc.scrollLeft-Xe)>1&&(se=!0)),!se)break}return G}function Co(t,a){var j=ro(t,a);j.scrollTop!=null&&_a(t,j.scrollTop),j.scrollLeft!=null&&Ki(t,j.scrollLeft)}function ro(t,a){var j=t.display,M=Wn(t.display);a.top<0&&(a.top=0);var G=t.curOp&&t.curOp.scrollTop!=null?t.curOp.scrollTop:j.scroller.scrollTop,Z=_e(t),se={};a.bottom-a.top>Z&&(a.bottom=a.top+Z);var me=t.doc.height+Pe(j),ge=a.top<M,we=a.bottom>me-M;if(a.top<G)se.scrollTop=ge?0:a.top;else if(a.bottom>G+Z){var We=Math.min(a.top,(we?me:a.bottom)-Z);We!=G&&(se.scrollTop=We)}var Xe=t.options.fixedGutter?0:j.gutters.offsetWidth,ut=t.curOp&&t.curOp.scrollLeft!=null?t.curOp.scrollLeft:j.scroller.scrollLeft-Xe,st=Ue(t)-j.gutters.offsetWidth,mt=a.right-a.left>st;return mt&&(a.right=a.left+st),a.left<10?se.scrollLeft=0:a.left<ut?se.scrollLeft=Math.max(0,a.left+Xe-(mt?0:10)):a.right>st+ut-3&&(se.scrollLeft=a.right+(mt?0:10)-st),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=dr(t,a.from),M=dr(t,a.to);Oa(t,j,M,a.margin)}}function Oa(t,a,j,M){var G=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,G.scrollLeft,G.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 Ki(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,Kr(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+Pe(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+Ze(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"),G=this.horiz=T("div",[T("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");M.tabIndex=G.tabIndex=-1,t(M),t(G),De(M,"scroll",function(){M.clientHeight&&a(M.scrollTop,"vertical")}),De(G,"scroll",function(){G.clientWidth&&a(G.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 G=t.viewHeight-(a?M:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+G)+"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 Z=t.viewWidth-t.barLeft-(j?M:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+Z)+"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=s&&!n?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Q,this.disableVert=new Q},aa.prototype.enableZeroWidthBar=function(t,a,j){t.style.pointerEvents="auto";function M(){var G=t.getBoundingClientRect(),Z=j=="vert"?document.elementFromPoint(G.right-1,(G.top+G.bottom)/2):document.elementFromPoint((G.right+G.left)/2,G.bottom-1);Z!=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 G=0;G<4&&j!=t.display.barWidth||M!=t.display.barHeight;G++)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&&v(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),De(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"?Ki(t,a):_a(t,a)},t),t.display.scrollbars.addClass&&K(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},gi(t.curOp)}function ha(t){var a=t.curOp;a&&Xr(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 G=0;G<a.length;G++)Zo(a[G]);for(var Z=0;Z<a.length;Z++)oo(a[Z]);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&&Hi(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 zi(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=Ge(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+Ze(a)+a.display.barWidth),t.maxScrollLeft=Math.max(0,j.sizer.offsetLeft+t.adjustWidthTo-Ue(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&&Ki(a,Math.min(a.display.scroller.scrollLeft,t.maxScrollLeft),!0),a.display.maxLineChanged=!1);var j=t.focus&&t.focus==z();t.preparedSelection&&a.display.input.showSelection(t.preparedSelection,j),(t.updatedDisplay||t.startHeight!=a.doc.height)&&da(a,t.barMeasure),t.updatedDisplay&&dn(a,t.barMeasure),t.selectionChanged&&ii(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&&Ki(a,t.scrollLeft,!0,!0),t.scrollToPos){var G=Yo(a,V(M,t.scrollToPos.from),V(M,t.scrollToPos.to),t.scrollToPos.margin);Xo(a,G)}var Z=t.maybeHiddenMarkers,se=t.maybeUnhiddenMarkers;if(Z)for(var me=0;me<Z.length;++me)Z[me].lines.length||Ve(Z[me],"hide");if(se)for(var ge=0;ge<se.length;++ge)se[ge].lines.length&&Ve(se[ge],"unhide");j.wrapper.offsetHeight&&(M.scrollTop=a.display.scroller.scrollTop),t.changeObjs&&Ve(a,"changes",a,t.changeObjs),t.update&&t.update.finish()}function Oi(t,a){if(t.curOp)return a();oa(t);try{return a()}finally{ha(t)}}function zn(t,a){return function(){if(t.curOp)return a.apply(t,arguments);oa(t);try{return a.apply(t,arguments)}finally{ha(t)}}}function vi(t){return function(){if(this.curOp)return t.apply(this,arguments);oa(this);try{return t.apply(this,arguments)}finally{ha(this)}}}function Vn(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=Ct(t,a.highlightFrontier),G=[];a.iter(M.line,Math.min(a.first+a.size,t.display.viewTo+500),function(Z){if(M.line>=t.display.viewFrom){var se=Z.styles,me=Z.text.length>t.options.maxHighlightLength?qt(a.mode,M.state):null,ge=ze(t,Z,M,!0);me&&(M.state=me),Z.styles=ge.styles;var we=Z.styleClasses,We=ge.classes;We?Z.styleClasses=We:we&&(Z.styleClasses=null);for(var Xe=!se||se.length!=Z.styles.length||we!=We&&(!we||!We||we.bgClass!=We.bgClass||we.textClass!=We.textClass),ut=0;!Xe&&ut<se.length;++ut)Xe=se[ut]!=Z.styles[ut];Xe&&G.push(M.line),Z.stateAfter=M.save(),M.nextLine()}else Z.text.length<=t.options.maxHighlightLength&&Wt(t,Z.text,M),Z.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),G.length&&Oi(t,function(){for(var Z=0;Z<G.length;Z++)Pn(t,G[Z],"text")})}var zi=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=Ue(t),this.force=j,this.dims=Mn(t),this.events=[]};zi.prototype.signal=function(t,a){Re(t,a)&&this.events.push(arguments)},zi.prototype.finish=function(){for(var t=0;t<this.events.length;t++)Ve.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=Ze(t)+"px",a.sizer.style.marginBottom=-a.nativeBarWidth+"px",a.sizer.style.borderRightWidth=Ze(t)+"px",a.scrollbarsClipped=!0)}function Ro(t){if(t.hasFocus())return null;var a=z();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==z())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 Ln(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;ai(t)&&(Ln(t),a.dims=Mn(t));var G=M.first+M.size,Z=Math.max(a.visible.from-t.options.viewportMargin,M.first),se=Math.min(G,a.visible.to+t.options.viewportMargin);j.viewFrom<Z&&Z-j.viewFrom<20&&(Z=Math.max(M.first,j.viewFrom)),j.viewTo>se&&j.viewTo-se<20&&(se=Math.min(G,j.viewTo)),zt&&(Z=bi(t.doc,Z),se=ei(t.doc,se));var me=Z!=j.viewFrom||se!=j.viewTo||j.lastWrapHeight!=a.wrapperHeight||j.lastWrapWidth!=a.wrapperWidth;ta(t,Z,se),j.viewOffset=ci(wt(t.doc,j.viewFrom)),t.display.mover.style.top=j.viewOffset+"px";var ge=ra(t);if(!me&&ge==0&&!a.force&&j.renderedView==j.view&&(j.updateLineNumbers==null||j.updateLineNumbers>=j.viewTo))return!1;var we=Ro(t);return ge>4&&(j.lineDiv.style.display="none"),Do(t,j.updateLineNumbers,a.dims),ge>4&&(j.lineDiv.style.display=""),j.renderedView=j.view,Io(we),x(j.cursorDiv),x(j.selectionDiv),j.gutters.style.height=j.sizer.style.minHeight=0,me&&(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==Ue(t)){if(j&&j.top!=null&&(j={top:Math.min(t.doc.height+Pe(t.display)-_e(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 G=ca(t);gn(t),da(t,G),dn(t,G),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 zi(t,a);if(fa(t,j)){Ma(t),Ua(t,j);var M=ca(t);gn(t),da(t,M),dn(t,M),j.finish()}}function Do(t,a,j){var M=t.display,G=t.options.lineNumbers,Z=M.lineDiv,se=Z.firstChild;function me(mt){var xt=mt.nextSibling;return e&&s&&t.display.currentWheelTarget==mt?mt.style.display="none":mt.parentNode.removeChild(mt),xt}for(var ge=M.view,we=M.viewFrom,We=0;We<ge.length;We++){var Xe=ge[We];if(!Xe.hidden)if(!Xe.node||Xe.node.parentNode!=Z){var ut=Rn(t,Xe,we,j);Z.insertBefore(ut,se)}else{for(;se!=Xe.node;)se=me(se);var st=G&&a!=null&&a<=we&&Xe.lineNumber;Xe.changes&&(re(Xe.changes,"gutter")>-1&&(st=!1),Xi(t,Xe,we,j)),st&&(x(Xe.lineNumber),Xe.lineNumber.appendChild(document.createTextNode(Cr(t.options,we)))),se=Xe.node.nextSibling}we+=Xe.size}for(;se;)se=me(se)}function Ba(t){var a=t.gutters.offsetWidth;t.sizer.style.marginLeft=a+"px"}function dn(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+Ze(t)+"px"}function Kr(t){var a=t.display,j=a.view;if(!a.alignWidgets&&(!a.gutters.firstChild||!t.options.fixedGutter))return;for(var M=xi(a)-a.scroller.scrollLeft+t.doc.scrollLeft,G=a.gutters.offsetWidth,Z=M+"px",se=0;se<j.length;se++)if(!j[se].hidden){t.options.fixedGutter&&(j[se].gutter&&(j[se].gutter.style.left=Z),j[se].gutterBackground&&(j[se].gutterBackground.style.left=Z));var me=j[se].alignable;if(me)for(var ge=0;ge<me.length;ge++)me[ge].style.left=Z}t.options.fixedGutter&&(a.gutters.style.left=M+G+"px")}function ai(t){if(!t.options.lineNumbers)return!1;var a=t.doc,j=Cr(t.options,a.first+a.size-1),M=t.display;if(j.length!=M.lineNumChars){var G=M.measure.appendChild(T("div",[T("div",j)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Z=G.firstChild.offsetWidth,se=G.offsetWidth-Z;return M.lineGutter.style.width="",M.lineNumInnerWidth=Math.max(Z,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 Ai(t,a){for(var j=[],M=!1,G=0;G<t.length;G++){var Z=t[G],se=null;if(typeof Z!="string"&&(se=Z.style,Z=Z.className),Z=="CodeMirror-linenumbers")if(a)M=!0;else continue;j.push({className:Z,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 G=j[M],Z=G.className,se=G.style,me=a.appendChild(T("div",null,"CodeMirror-gutter "+Z));se&&(me.style.cssText=se),Z=="CodeMirror-linenumbers"&&(t.lineGutter=me,me.style.width=(t.lineNumWidth||1)+"px")}a.style.display=j.length?"":"none",Ba(t)}function Qi(t){xa(t.display),bn(t),Kr(t)}function Da(t,a,j,M){var G=this;this.input=j,G.scrollbarFiller=T("div",null,"CodeMirror-scrollbar-filler"),G.scrollbarFiller.setAttribute("cm-not-content","true"),G.gutterFiller=T("div",null,"CodeMirror-gutter-filler"),G.gutterFiller.setAttribute("cm-not-content","true"),G.lineDiv=F("div",null,"CodeMirror-code"),G.selectionDiv=T("div",null,null,"position: relative; z-index: 1"),G.cursorDiv=T("div",null,"CodeMirror-cursors"),G.measure=T("div",null,"CodeMirror-measure"),G.lineMeasure=T("div",null,"CodeMirror-measure"),G.lineSpace=F("div",[G.measure,G.lineMeasure,G.selectionDiv,G.cursorDiv,G.lineDiv],null,"position: relative; outline: none");var Z=F("div",[G.lineSpace],"CodeMirror-lines");G.mover=T("div",[Z],null,"position: relative"),G.sizer=T("div",[G.mover],"CodeMirror-sizer"),G.sizerWidth=null,G.heightForcer=T("div",null,null,"position: absolute; height: "+ee+"px; width: 1px;"),G.gutters=T("div",null,"CodeMirror-gutters"),G.lineGutter=null,G.scroller=T("div",[G.sizer,G.heightForcer,G.gutters],"CodeMirror-scroll"),G.scroller.setAttribute("tabIndex","-1"),G.wrapper=T("div",[G.scrollbarFiller,G.gutterFiller,G.scroller],"CodeMirror"),C&&_<8&&(G.gutters.style.zIndex=-1,G.scroller.style.paddingRight=0),!e&&!(S&&u)&&(G.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(G.wrapper):t(G.wrapper)),G.viewFrom=G.viewTo=a.first,G.reportedViewFrom=G.reportedViewTo=a.first,G.view=[],G.renderedView=null,G.externalMeasured=null,G.viewOffset=0,G.lastWrapHeight=G.lastWrapWidth=0,G.updateLineNumbers=null,G.nativeBarWidth=G.barHeight=G.barWidth=0,G.scrollbarsClipped=!1,G.lineNumWidth=G.lineNumInnerWidth=G.lineNumChars=null,G.alignWidgets=!1,G.cachedCharWidth=G.cachedTextHeight=G.cachedPaddingH=null,G.maxLine=null,G.maxLineLength=0,G.maxLineChanged=!1,G.wheelDX=G.wheelDY=G.wheelStartX=G.wheelStartY=null,G.shift=!1,G.selForContextMenu=null,G.activeTouch=null,G.gutterSpecs=Ai(M.gutters,M.lineNumbers),xa(G),j.init(G)}var sa=0,oi=null;C?oi=-.53:S?oi=15:r?oi=-.7:i&&(oi=-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*=oi,a.y*=oi,a}function lo(t,a){var j=Ha(a),M=j.x,G=j.y,Z=t.display,se=Z.scroller,me=se.scrollWidth>se.clientWidth,ge=se.scrollHeight>se.clientHeight;if(!(M&&me||G&&ge))return;if(G&&s&&e){e:for(var we=a.target,We=Z.view;we!=se;we=we.parentNode)for(var Xe=0;Xe<We.length;Xe++)if(We[Xe].node==we){t.display.currentWheelTarget=we;break e}}if(M&&!S&&!c&&oi!=null){G&&ge&&_a(t,Math.max(0,se.scrollTop+G*oi)),Ki(t,Math.max(0,se.scrollLeft+M*oi)),(!G||G&&ge)&&Ee(a),Z.wheelStartX=null;return}if(G&&oi!=null){var ut=G*oi,st=t.doc.scrollTop,mt=st+Z.wrapper.clientHeight;ut<0?st=Math.max(0,st+ut-50):mt=Math.min(t.doc.height,mt+ut+50),Ia(t,{top:st,bottom:mt})}sa<20&&(Z.wheelStartX==null?(Z.wheelStartX=se.scrollLeft,Z.wheelStartY=se.scrollTop,Z.wheelDX=M,Z.wheelDY=G,setTimeout(function(){if(Z.wheelStartX==null)return;var xt=se.scrollLeft-Z.wheelStartX,Lt=se.scrollTop-Z.wheelStartY,jt=Lt&&Z.wheelDY&&Lt/Z.wheelDY||xt&&Z.wheelDX&&xt/Z.wheelDX;if(Z.wheelStartX=Z.wheelStartY=null,!jt)return;oi=(oi*sa+jt)/(sa+1),++sa},200)):(Z.wheelDX+=M,Z.wheelDY+=G))}var Ri=function(t,a){this.ranges=t,this.primIndex=a};Ri.prototype.primary=function(){return this.ranges[this.primIndex]},Ri.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(!Zr(j.anchor,M.anchor)||!Zr(j.head,M.head))return!1}return!0},Ri.prototype.deepCopy=function(){for(var t=[],a=0;a<this.ranges.length;a++)t[a]=new cn(ln(this.ranges[a].anchor),ln(this.ranges[a].head));return new Ri(t,this.primIndex)},Ri.prototype.somethingSelected=function(){for(var t=0;t<this.ranges.length;t++)if(!this.ranges[t].empty())return!0;return!1},Ri.prototype.contains=function(t,a){a||(a=t);for(var j=0;j<this.ranges.length;j++){var M=this.ranges[j];if(Ht(a,M.from())>=0&&Ht(t,M.to())<=0)return j}return-1};var cn=function(t,a){this.anchor=t,this.head=a};cn.prototype.from=function(){return Cn(this.anchor,this.head)},cn.prototype.to=function(){return kn(this.anchor,this.head)},cn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Vi(t,a,j){var M=t&&t.options.selectionsMayTouch,G=a[j];a.sort(function(ut,st){return Ht(ut.from(),st.from())}),j=re(a,G);for(var Z=1;Z<a.length;Z++){var se=a[Z],me=a[Z-1],ge=Ht(me.to(),se.from());if(M&&!se.empty()?ge>0:ge>=0){var we=Cn(me.from(),se.from()),We=kn(me.to(),se.to()),Xe=me.empty()?se.from()==se.head:me.from()==me.head;Z<=j&&--j,a.splice(--Z,2,new cn(Xe?We:we,Xe?we:We))}}return new Ri(a,j)}function Zi(t,a){return new Ri([new cn(t,a||t)],0)}function qi(t){return t.text?vt(t.from.line+t.text.length-1,ie(t.text).length+(t.text.length==1?t.from.ch:0)):t.to}function uo(t,a){if(Ht(t,a.from)<0)return t;if(Ht(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),vt(j,M)}function Wa(t,a){for(var j=[],M=0;M<t.sel.ranges.length;M++){var G=t.sel.ranges[M];j.push(new cn(uo(G.anchor,a),uo(G.head,a)))}return Vi(t.cm,j,t.sel.primIndex)}function Lo(t,a,j){return t.line==a.line?vt(j.line,t.ch-a.ch+j.ch):vt(j.line+(t.line-a.line),t.ch)}function ko(t,a,j){for(var M=[],G=vt(t.first,0),Z=G,se=0;se<a.length;se++){var me=a[se],ge=Lo(me.from,G,Z),we=Lo(qi(me),G,Z);if(G=me.to,Z=we,j=="around"){var We=t.sel.ranges[se],Xe=Ht(We.head,We.anchor)<0;M[se]=new cn(Xe?we:ge,Xe?ge:we)}else M[se]=new cn(ge,ge)}return new Ri(M,t.sel.primIndex)}function pa(t){t.doc.mode=Mt(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&&bn(t)}function gs(t,a){return a.from.ch==0&&a.to.ch==0&&ie(a.text)==""&&(!t.cm||t.cm.options.wholeLineUpdateBefore)}function ts(t,a,j,M){function G(Vt){return j?j[Vt]:null}function Z(Vt,Ft,Jt){tn(Vt,Ft,Jt,M),Ir(Vt,"change",Vt,a)}function se(Vt,Ft){for(var Jt=[],fr=Vt;fr<Ft;++fr)Jt.push(new di(we[fr],G(fr),M));return Jt}var me=a.from,ge=a.to,we=a.text,We=wt(t,me.line),Xe=wt(t,ge.line),ut=ie(we),st=G(we.length-1),mt=ge.line-me.line;if(a.full)t.insert(0,se(0,we.length)),t.remove(we.length,t.size-we.length);else if(gs(t,a)){var xt=se(0,we.length-1);Z(Xe,Xe.text,st),mt&&t.remove(me.line,mt),xt.length&&t.insert(me.line,xt)}else if(We==Xe)if(we.length==1)Z(We,We.text.slice(0,me.ch)+ut+We.text.slice(ge.ch),st);else{var Lt=se(1,we.length-1);Lt.push(new di(ut+We.text.slice(ge.ch),st,M)),Z(We,We.text.slice(0,me.ch)+we[0],G(0)),t.insert(me.line+1,Lt)}else if(we.length==1)Z(We,We.text.slice(0,me.ch)+we[0]+Xe.text.slice(ge.ch),G(0)),t.remove(me.line+1,mt);else{Z(We,We.text.slice(0,me.ch)+we[0],G(0)),Z(Xe,ut+Xe.text.slice(ge.ch),st);var jt=se(1,we.length-1);mt>1&&t.remove(me.line+1,mt-1),t.insert(me.line+1,jt)}Ir(t,"change",t,a)}function wa(t,a,j){function M(G,Z,se){if(G.linked)for(var me=0;me<G.linked.length;++me){var ge=G.linked[me];if(ge.doc==Z)continue;var we=se&&ge.sharedHist;if(j&&!we)continue;a(ge.doc,we),M(ge.doc,G,we)}}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,Ci(t),pa(t),ys(t),t.options.lineWrapping||Hi(t),t.options.mode=a.modeOption,bn(t)}function ys(t){(t.doc.direction=="rtl"?K:v)(t.display.lineDiv,"CodeMirror-rtl")}function pl(t){Oi(t,function(){ys(t),bn(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:ln(a.from),to:qi(a),text:Er(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=ie(t);if(a.ranges)t.pop();else break}}function ml(t,a){if(a)return bs(t.done),ie(t.done);if(t.done.length&&!ie(t.done).ranges)return ie(t.done);if(t.done.length>1&&!t.done[t.done.length-2].ranges)return t.done.pop(),ie(t.done)}function _s(t,a,j,M){var G=t.history;G.undone.length=0;var Z=+new Date,se,me;if((G.lastOp==M||G.lastOrigin==a.origin&&a.origin&&(a.origin.charAt(0)=="+"&&G.lastModTime>Z-(t.cm?t.cm.options.historyEventDelay:500)||a.origin.charAt(0)=="*"))&&(se=ml(G,G.lastOp==M)))me=ie(se.changes),Ht(a.from,a.to)==0&&Ht(a.from,me.to)==0?me.to=qi(a):se.changes.push(rs(t,a));else{var ge=ie(G.done);for((!ge||!ge.ranges)&&Po(t.sel,G.done),se={changes:[rs(t,a)],generation:G.generation},G.done.push(se);G.done.length>G.undoDepth;)G.done.shift(),G.done[0].ranges||G.done.shift()}G.done.push(j),G.generation=++G.maxGeneration,G.lastModTime=G.lastSelTime=Z,G.lastOp=G.lastSelOp=M,G.lastOrigin=G.lastSelOrigin=a.origin,me||Ve(t,"historyAdded")}function gl(t,a,j,M){var G=a.charAt(0);return G=="*"||G=="+"&&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 G=t.history,Z=M&&M.origin;j==G.lastSelOp||Z&&G.lastSelOrigin==Z&&(G.lastModTime==G.lastSelTime&&G.lastOrigin==Z||gl(t,Z,ie(G.done),a))?G.done[G.done.length-1]=a:Po(a,G.done),G.lastSelTime=+new Date,G.lastSelOrigin=Z,G.lastSelOp=j,M&&M.clearRedo!==!1&&bs(G.undone)}function Po(t,a){var j=ie(a);j&&j.ranges&&j.equals(t)||a.push(t)}function Es(t,a,j,M){var G=a["spans_"+t.id],Z=0;t.iter(Math.max(t.first,j),Math.min(t.first+t.size,M),function(se){se.markedSpans&&((G||(G=a["spans_"+t.id]={}))[Z]=se.markedSpans),++Z})}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=[],G=0;G<a.text.length;++G)M.push(yl(j[G]));return M}function xs(t,a){var j=bl(t,a),M=qn(t,a);if(!j)return M;if(!M)return j;for(var G=0;G<j.length;++G){var Z=j[G],se=M[G];if(Z&&se){e:for(var me=0;me<se.length;++me){for(var ge=se[me],we=0;we<Z.length;++we)if(Z[we].marker==ge.marker)continue e;Z.push(ge)}}else se&&(j[G]=se)}return j}function Ga(t,a,j){for(var M=[],G=0;G<t.length;++G){var Z=t[G];if(Z.ranges){M.push(j?Ri.prototype.deepCopy.call(Z):Z);continue}var se=Z.changes,me=[];M.push({changes:me});for(var ge=0;ge<se.length;++ge){var we=se[ge],We=void 0;if(me.push({from:we.from,to:we.to,text:we.text}),a)for(var Xe in we)(We=Xe.match(/^spans_(\d+)$/))&&(re(a,Number(We[1]))>-1&&(ie(me)[Xe]=we[Xe],delete we[Xe]))}}return M}function ns(t,a,j,M){if(M){var G=t.anchor;if(j){var Z=Ht(a,G)<0;Z!=Ht(j,G)<0?(G=a,a=j):Z!=Ht(a,j)<0&&(a=j)}return new cn(G,a)}else return new cn(j||a,a)}function No(t,a,j,M,G){G==null&&(G=t.cm&&(t.cm.display.shift||t.extend)),wi(t,new Ri([ns(t.sel.primary(),a,j,G)],0),M)}function ws(t,a,j){for(var M=[],G=t.cm&&(t.cm.display.shift||t.extend),Z=0;Z<t.sel.ranges.length;Z++)M[Z]=ns(t.sel.ranges[Z],a[Z],null,G);var se=Vi(t.cm,M,t.sel.primIndex);wi(t,se,j)}function is(t,a,j,M){var G=t.sel.ranges.slice(0);G[a]=j,wi(t,Vi(t.cm,G,t.sel.primIndex),M)}function Ts(t,a,j,M){wi(t,Zi(a,j),M)}function _l(t,a,j){var M={ranges:a.ranges,update:function(G){this.ranges=[];for(var Z=0;Z<G.length;Z++)this.ranges[Z]=new cn(V(t,G[Z].anchor),V(t,G[Z].head))},origin:j&&j.origin};return Ve(t,"beforeSelectionChange",t,M),t.cm&&Ve(t.cm,"beforeSelectionChange",t.cm,M),M.ranges!=a.ranges?Vi(t.cm,M.ranges,M.ranges.length-1):a}function Ss(t,a,j){var M=t.history.done,G=ie(M);G&&G.ranges?(M[M.length-1]=a,jo(t,a,j)):wi(t,a,j)}function wi(t,a,j){jo(t,a,j),vl(t,t.sel,t.cm?t.cm.curOp.id:NaN,j)}function jo(t,a,j){(Re(t,"beforeSelectionChange")||t.cm&&Re(t.cm,"beforeSelectionChange"))&&(a=_l(t,a,j));var M=j&&j.bias||(Ht(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,Fe(t.cm)),Ir(t,"cursorActivity",t)}function Os(t){Cs(t,As(t,t.sel,null,!1))}function As(t,a,j,M){for(var G,Z=0;Z<a.ranges.length;Z++){var se=a.ranges[Z],me=a.ranges.length==t.sel.ranges.length&&t.sel.ranges[Z],ge=Fo(t,se.anchor,me&&me.anchor,j,M),we=Fo(t,se.head,me&&me.head,j,M);(G||ge!=se.anchor||we!=se.head)&&(G||(G=a.ranges.slice(0,Z)),G[Z]=new cn(ge,we))}return G?Vi(t.cm,G,a.primIndex):a}function Ka(t,a,j,M,G){var Z=wt(t,a.line);if(Z.markedSpans)for(var se=0;se<Z.markedSpans.length;++se){var me=Z.markedSpans[se],ge=me.marker,we="selectLeft"in ge?!ge.selectLeft:ge.inclusiveLeft,We="selectRight"in ge?!ge.selectRight:ge.inclusiveRight;if((me.from==null||(we?me.from<=a.ch:me.from<a.ch))&&(me.to==null||(We?me.to>=a.ch:me.to>a.ch))){if(G&&(Ve(ge,"beforeCursorEnter"),ge.explicitlyCleared))if(Z.markedSpans){--se;continue}else break;if(!ge.atomic)continue;if(j){var Xe=ge.find(M<0?1:-1),ut=void 0;if((M<0?We:we)&&(Xe=Rs(t,Xe,-M,Xe&&Xe.line==a.line?Z:null)),Xe&&Xe.line==a.line&&(ut=Ht(Xe,j))&&(M<0?ut<0:ut>0))return Ka(t,Xe,a,M,G)}var st=ge.find(M<0?-1:1);return(M<0?we:We)&&(st=Rs(t,st,M,st.line==a.line?Z:null)),st?Ka(t,st,a,M,G):null}}return a}function Fo(t,a,j,M,G){var Z=M||1,se=Ka(t,a,j,Z,G)||!G&&Ka(t,a,j,Z,!0)||Ka(t,a,j,-Z,G)||!G&&Ka(t,a,j,-Z,!0);return se||(t.cantEdit=!0,vt(t.first,0))}function Rs(t,a,j,M){return j<0&&a.ch==0?a.line>t.first?V(t,vt(a.line-1)):null:j>0&&a.ch==(M||wt(t,a.line)).text.length?a.line<t.first+t.size-1?vt(a.line+1,0):null:new vt(a.line,a.ch+j)}function Is(t){t.setSelection(vt(t.firstLine(),0),vt(t.lastLine()),be)}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(G,Z,se,me){G&&(M.from=V(t,G)),Z&&(M.to=V(t,Z)),se&&(M.text=se),me!==void 0&&(M.origin=me)}),Ve(t,"beforeChange",t,M),t.cm&&Ve(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 zn(t.cm,za)(t,a,j);if(t.cm.state.suppressEdits)return}if((Re(t,"beforeChange")||t.cm&&Re(t.cm,"beforeChange"))&&(a=Ds(t,a,!0),!a))return;var M=On&&!j&&Si(t,a.from,a.to);if(M)for(var G=M.length-1;G>=0;--G)Ls(t,{from:M[G].from,to:M[G].to,text:G?[""]:a.text,origin:a.origin});else Ls(t,a)}function Ls(t,a){if(a.text.length==1&&a.text[0]==""&&Ht(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,qn(t,a));var M=[];wa(t,function(G,Z){!Z&&re(M,G.history)==-1&&(Ns(G.history,a),M.push(G.history)),ho(G,a,null,qn(G,a))})}function Uo(t,a,j){var M=t.cm&&t.cm.state.suppressEdits;if(M&&!j)return;for(var G=t.history,Z,se=t.sel,me=a=="undo"?G.done:G.undone,ge=a=="undo"?G.undone:G.done,we=0;we<me.length&&!(Z=me[we],j?Z.ranges&&!Z.equals(t.sel):!Z.ranges);we++);if(we==me.length)return;for(G.lastOrigin=G.lastSelOrigin=null;;)if(Z=me.pop(),Z.ranges){if(Po(Z,ge),j&&!Z.equals(t.sel)){wi(t,Z,{clearRedo:!1});return}se=Z}else if(M){me.push(Z);return}else break;var We=[];Po(se,ge),ge.push({changes:We,generation:G.generation}),G.generation=Z.generation||++G.maxGeneration;for(var Xe=Re(t,"beforeChange")||t.cm&&Re(t.cm,"beforeChange"),ut=function(xt){var Lt=Z.changes[xt];if(Lt.origin=a,Xe&&!Ds(t,Lt,!1))return me.length=0,{};We.push(rs(t,Lt));var jt=xt?Wa(t,Lt):ie(me);ho(t,Lt,jt,xs(t,Lt)),!xt&&t.cm&&t.cm.scrollIntoView({from:Lt.from,to:qi(Lt)});var Vt=[];wa(t,function(Ft,Jt){!Jt&&re(Vt,Ft.history)==-1&&(Ns(Ft.history,Lt),Vt.push(Ft.history)),ho(Ft,Lt,null,xs(Ft,Lt))})},st=Z.changes.length-1;st>=0;--st){var mt=ut(st);if(mt)return mt.v}}function ks(t,a){if(a==0)return;if(t.first+=a,t.sel=new Ri(Ce(t.sel.ranges,function(G){return new cn(vt(G.anchor.line+a,G.anchor.ch),vt(G.head.line+a,G.head.ch))}),t.sel.primIndex),t.cm){bn(t.cm,t.first,t.first-a,a);for(var j=t.cm.display,M=j.viewFrom;M<j.viewTo;M++)Pn(t.cm,M,"gutter")}}function ho(t,a,j,M){if(t.cm&&!t.cm.curOp)return zn(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 G=a.text.length-1-(t.first-a.from.line);ks(t,G),a={from:vt(t.first,0),to:vt(a.to.line+G,a.to.ch),text:[ie(a.text)],origin:a.origin}}var Z=t.lastLine();a.to.line>Z&&(a={from:a.from,to:vt(Z,wt(t,Z).text.length),text:[a.text[0]],origin:a.origin}),a.removed=Er(t,a.from,a.to),j||(j=Wa(t,a)),t.cm?El(t.cm,a,M):ts(t,a,M),jo(t,j,be),t.cantEdit&&Fo(t,vt(t.firstLine(),0))&&(t.cantEdit=!1)}function El(t,a,j){var M=t.doc,G=t.display,Z=a.from,se=a.to,me=!1,ge=Z.line;t.options.lineWrapping||(ge=Nt(Un(wt(M,Z.line))),M.iter(ge,se.line+1,function(st){if(st==G.maxLine)return me=!0,!0})),M.sel.contains(a.from,a.to)>-1&&Fe(t),ts(M,a,j,Wi(t)),t.options.lineWrapping||(M.iter(ge,Z.line+a.text.length,function(st){var mt=_i(st);mt>G.maxLineLength&&(G.maxLine=st,G.maxLineLength=mt,G.maxLineChanged=!0,me=!1)}),me&&(t.curOp.updateMaxLine=!0)),qr(M,Z.line),Ra(t,400);var we=a.text.length-(se.line-Z.line)-1;a.full?bn(t):Z.line==se.line&&a.text.length==1&&!gs(t.doc,a)?Pn(t,Z.line,"text"):bn(t,Z.line,se.line+1,we);var We=Re(t,"changes"),Xe=Re(t,"change");if(Xe||We){var ut={from:Z,to:se,text:a.text,removed:a.removed,origin:a.origin};Xe&&Ir(t,"change",t,ut),We&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(ut)}t.display.selForContextMenu=null}function Va(t,a,j,M,G){var Z;M||(M=j),Ht(M,j)<0&&(Z=[M,j],j=Z[0],M=Z[1]),typeof a=="string"&&(a=t.splitLines(a)),za(t,{from:j,to:M,text:a,origin:G})}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 G=0;G<t.length;++G){var Z=t[G],se=!0;if(Z.ranges){Z.copied||(Z=t[G]=Z.deepCopy(),Z.copied=!0);for(var me=0;me<Z.ranges.length;me++)Ms(Z.ranges[me].anchor,a,j,M),Ms(Z.ranges[me].head,a,j,M);continue}for(var ge=0;ge<Z.changes.length;++ge){var we=Z.changes[ge];if(j<we.from.line)we.from=vt(we.from.line+M,we.from.ch),we.to=vt(we.to.line+M,we.to.ch);else if(a<=we.to.line){se=!1;break}}se||(t.splice(0,G+1),G=0)}}function Ns(t,a){var j=a.from.line,M=a.to.line,G=a.text.length-(M-j)-1;Ps(t.done,j,M,G),Ps(t.undone,j,M,G)}function fo(t,a,j,M){var G=a,Z=a;return typeof a=="number"?Z=wt(t,le(t,a)):G=Nt(a),G==null?null:(M(Z,G)&&t.cm&&Pn(t.cm,G,j),Z)}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 G=this.lines[j];this.height-=G.height,$t(G),Ir(G,"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 G=t[M];a+=G.chunkSize(),j+=G.height,G.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],G=M.chunkSize();if(t<G){var Z=Math.min(a,G-t),se=M.height;if(M.removeInner(t,Z),this.height-=se-M.height,G==Z&&(this.children.splice(j--,1),M.parent=null),(a-=Z)==0)break;t=0}else t-=G}if(this.size-a<25&&(this.children.length>1||!(this.children[0]instanceof po))){var me=[];this.collapse(me),this.children=[new po(me)],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 G=this.children[M],Z=G.chunkSize();if(t<=Z){if(G.insertInner(t,a,j),G.lines&&G.lines.length>50){for(var se=G.lines.length%25+25,me=se;me<G.lines.length;){var ge=new po(G.lines.slice(me,me+=25));G.height-=ge.height,this.children.splice(++M,0,ge),ge.parent=this}G.lines=G.lines.slice(0,se),this.maybeSpill()}break}t-=Z}},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 G=re(t.parent.children,t);t.parent.children.splice(G+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 G=this.children[M],Z=G.chunkSize();if(t<Z){var se=Math.min(a,Z-t);if(G.iterN(t,se,j))return!0;if((a-=se)==0)break;t=0}else t-=Z}}};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=Nt(j);if(M==null||!a)return;for(var G=0;G<a.length;++G)a[G]==this&&a.splice(G--,1);a.length||(j.widgets=null);var Z=Kn(this);Bt(j,Math.max(0,j.height-Z)),t&&(Oi(t,function(){js(t,j,-Z),Pn(t,M,"widget")}),Ir(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 G=Kn(this)-a;if(!G)return;ti(this.doc,M)||Bt(M,M.height+G),j&&Oi(j,function(){j.curOp.forceUpdate=!0,js(j,M,G),Ir(j,"lineWidgetChanged",j,t,Nt(M))})},Me(go);function js(t,a,j){ci(a)<(t.curOp&&t.curOp.scrollTop||t.doc.scrollTop)&&no(t,j)}function xl(t,a,j,M){var G=new go(t,j,M),Z=t.cm;return Z&&G.noHScroll&&(Z.display.alignWidgets=!0),fo(t,a,"widget",function(se){var me=se.widgets||(se.widgets=[]);if(G.insertAt==null?me.push(G):me.splice(Math.min(me.length-1,Math.max(0,G.insertAt)),0,G),G.line=se,Z&&!ti(t,se)){var ge=ci(se)<t.scrollTop;Bt(se,se.height+Kn(G)),ge&&no(Z,G.height),Z.curOp.forceUpdate=!0}return!0}),Z&&Ir(Z,"lineWidgetAdded",Z,G,typeof a=="number"?a:Nt(a)),G}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),Re(this,"clear")){var j=this.find();j&&Ir(this,"clear",j.from,j.to)}for(var M=null,G=null,Z=0;Z<this.lines.length;++Z){var se=this.lines[Z],me=Tr(se.markedSpans,this);t&&!this.collapsed?Pn(t,Nt(se),"text"):t&&(me.to!=null&&(G=Nt(se)),me.from!=null&&(M=Nt(se))),se.markedSpans=li(se.markedSpans,me),me.from==null&&this.collapsed&&!ti(this.doc,se)&&t&&Bt(se,Wn(t.display))}if(t&&this.collapsed&&!t.options.lineWrapping)for(var ge=0;ge<this.lines.length;++ge){var we=Un(this.lines[ge]),We=_i(we);We>t.display.maxLineLength&&(t.display.maxLine=we,t.display.maxLineLength=We,t.display.maxLineChanged=!0)}M!=null&&t&&this.collapsed&&bn(t,M,G+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&Os(t.doc)),t&&Ir(t,"markerCleared",t,this,M,G),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,G=0;G<this.lines.length;++G){var Z=this.lines[G],se=Tr(Z.markedSpans,this);if(se.from!=null&&(j=vt(a?Z:Nt(Z),se.from),t==-1))return j;if(se.to!=null&&(M=vt(a?Z:Nt(Z),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;Oi(M,function(){var G=a.line,Z=Nt(a.line),se=Je(M,Z);if(se&&(_r(se),M.curOp.selectionChanged=M.curOp.forceUpdate=!0),M.curOp.updateMaxLine=!0,!ti(j.doc,G)&&j.height!=null){var me=j.height;j.height=null;var ge=Kn(j)-me;ge&&Bt(G,G.height+ge)}Ir(M,"markerChanged",M,t)})},Ta.prototype.attachLine=function(t){if(!this.lines.length&&this.doc.cm){var a=this.doc.cm.curOp;(!a.maybeHiddenMarkers||re(a.maybeHiddenMarkers,this)==-1)&&(a.maybeUnhiddenMarkers||(a.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(t)},Ta.prototype.detachLine=function(t){if(this.lines.splice(re(this.lines,t),1),!this.lines.length&&this.doc.cm){var a=this.doc.cm.curOp;(a.maybeHiddenMarkers||(a.maybeHiddenMarkers=[])).push(this)}},Me(Ta);function Xa(t,a,j,M,G){if(M&&M.shared)return wl(t,a,j,M,G);if(t.cm&&!t.cm.curOp)return zn(t.cm,Xa)(t,a,j,M,G);var Z=new Ta(t,G),se=Ht(a,j);if(M&&D(M,Z,!1),se>0||se==0&&Z.clearWhenEmpty!==!1)return Z;if(Z.replacedWith&&(Z.collapsed=!0,Z.widgetNode=F("span",[Z.replacedWith],"CodeMirror-widget"),M.handleMouseEvents||Z.widgetNode.setAttribute("cm-ignore-events","true"),M.insertLeft&&(Z.widgetNode.insertLeft=!0)),Z.collapsed){if(En(t,a.line,a,j,Z)||a.line!=j.line&&En(t,j.line,a,j,Z))throw new Error("Inserting collapsed marker partially overlapping an existing one");pr()}Z.addToHistory&&_s(t,{from:a,to:j,origin:"markText"},t.sel,NaN);var me=a.line,ge=t.cm,we;if(t.iter(me,j.line+1,function(Xe){ge&&Z.collapsed&&!ge.options.lineWrapping&&Un(Xe)==ge.display.maxLine&&(we=!0),Z.collapsed&&me!=a.line&&Bt(Xe,0),An(Xe,new jr(Z,me==a.line?a.ch:null,me==j.line?j.ch:null)),++me}),Z.collapsed&&t.iter(a.line,j.line+1,function(Xe){ti(t,Xe)&&Bt(Xe,0)}),Z.clearOnEnter&&De(Z,"beforeCursorEnter",function(){return Z.clear()}),Z.readOnly&&(mr(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),Z.collapsed&&(Z.id=++Fs,Z.atomic=!0),ge){if(we&&(ge.curOp.updateMaxLine=!0),Z.collapsed)bn(ge,a.line,j.line+1);else if(Z.className||Z.startStyle||Z.endStyle||Z.css||Z.attributes||Z.title)for(var We=a.line;We<=j.line;We++)Pn(ge,We,"text");Z.atomic&&Os(ge.doc),Ir(ge,"markerAdded",ge,Z)}return Z}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();Ir(this,"clear")},vo.prototype.find=function(t,a){return this.primary.find(t,a)},Me(vo);function wl(t,a,j,M,G){M=D(M),M.shared=!1;var Z=[Xa(t,a,j,M,G)],se=Z[0],me=M.widgetNode;return wa(t,function(ge){me&&(M.widgetNode=me.cloneNode(!0)),Z.push(Xa(ge,V(ge,a),V(ge,j),M,G));for(var we=0;we<ge.linked.length;++we)if(ge.linked[we].isParent)return;se=ie(Z)}),new vo(Z,se)}function Us(t){return t.findMarks(vt(t.first,0),t.clipPos(vt(t.lastLine())),function(a){return a.parent})}function Tl(t,a){for(var j=0;j<a.length;j++){var M=a[j],G=M.find(),Z=t.clipPos(G.from),se=t.clipPos(G.to);if(Ht(Z,se)){var me=Xa(t,Z,se,M.primary,M.primary.type);M.markers.push(me),me.parent=M}}}function Sl(t){for(var a=function(M){var G=t[M],Z=[G.primary.doc];wa(G.primary.doc,function(ge){return Z.push(ge)});for(var se=0;se<G.markers.length;se++){var me=G.markers[se];re(Z,me.doc)==-1&&(me.parent=null,G.markers.splice(se--,1))}},j=0;j<t.length;j++)a(j)}var Cl=0,ki=function(t,a,j,M,G){if(!(this instanceof ki))return new ki(t,a,j,M,G);j==null&&(j=0),mo.call(this,[new po([new di("",null)])]),this.first=j,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=j;var Z=vt(j,0);this.sel=Zi(Z),this.history=new Mo(null),this.id=++Cl,this.modeOption=a,this.lineSep=M,this.direction=G=="rtl"?"rtl":"ltr",this.extend=!1,typeof t=="string"&&(t=this.splitLines(t)),ts(this,{from:Z,to:Z,text:t}),wi(this,Zi(Z),be)};ki.prototype=Ae(mo.prototype,{constructor:ki,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=nr(this,this.first,this.first+this.size);return t===!1?a:a.join(t||this.lineSeparator())},setValue:Vn(function(t){var a=vt(this.first,0),j=this.first+this.size-1;za(this,{from:a,to:vt(j,wt(this,j).text.length),text:this.splitLines(t),origin:"setValue",full:!0},!0),this.cm&&ba(this.cm,0,0),wi(this,Zi(a),be)}),replaceRange:function(t,a,j,M){a=V(this,a),j=j?V(this,j):a,Va(this,t,a,j,M)},getRange:function(t,a,j){var M=Er(this,V(this,t),V(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(Qr(this,t))return wt(this,t)},getLineNumber:function(t){return Nt(t)},getLineHandleVisualStart:function(t){return typeof t=="number"&&(t=wt(this,t)),Un(t)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(t){return V(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:Vn(function(t,a,j){Ts(this,V(this,typeof t=="number"?vt(t,a||0):t),null,j)}),setSelection:Vn(function(t,a,j){Ts(this,V(this,t),V(this,a||t),j)}),extendSelection:Vn(function(t,a,j){No(this,V(this,t),a&&V(this,a),j)}),extendSelections:Vn(function(t,a){ws(this,te(this,t),a)}),extendSelectionsBy:Vn(function(t,a){var j=Ce(this.sel.ranges,t);ws(this,te(this,j),a)}),setSelections:Vn(function(t,a,j){if(!t.length)return;for(var M=[],G=0;G<t.length;G++)M[G]=new cn(V(this,t[G].anchor),V(this,t[G].head));a==null&&(a=Math.min(t.length-1,this.sel.primIndex)),wi(this,Vi(this.cm,M,a),j)}),addSelection:Vn(function(t,a,j){var M=this.sel.ranges.slice(0);M.push(new cn(V(this,t),V(this,a||t))),wi(this,Vi(this.cm,M,M.length-1),j)}),getSelection:function(t){for(var a=this.sel.ranges,j,M=0;M<a.length;M++){var G=Er(this,a[M].from(),a[M].to());j=j?j.concat(G):G}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 G=Er(this,j[M].from(),j[M].to());t!==!1&&(G=G.join(t||this.lineSeparator())),a[M]=G}return a},replaceSelection:function(t,a,j){for(var M=[],G=0;G<this.sel.ranges.length;G++)M[G]=t;this.replaceSelections(M,a,j||"+input")},replaceSelections:Vn(function(t,a,j){for(var M=[],G=this.sel,Z=0;Z<G.ranges.length;Z++){var se=G.ranges[Z];M[Z]={from:se.from(),to:se.to(),text:this.splitLines(t[Z]),origin:j}}for(var me=a&&a!="end"&&ko(this,M,a),ge=M.length-1;ge>=0;ge--)za(this,M[ge]);me?Ss(this,me):this.cm&&ya(this.cm)}),undo:Vn(function(){Uo(this,"undo")}),redo:Vn(function(){Uo(this,"redo")}),undoSelection:Vn(function(){Uo(this,"undo",!0)}),redoSelection:Vn(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 G=0;G<t.undone.length;G++)t.undone[G].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:Vn(function(t,a,j){return fo(this,t,"gutter",function(M){var G=M.gutterMarkers||(M.gutterMarkers={});return G[a]=j,!j&&X(G)&&(M.gutterMarkers=null),!0})}),clearGutter:Vn(function(t){var a=this;this.iter(function(j){j.gutterMarkers&&j.gutterMarkers[t]&&fo(a,j,"gutter",function(){return j.gutterMarkers[t]=null,X(j.gutterMarkers)&&(j.gutterMarkers=null),!0})})}),lineInfo:function(t){var a;if(typeof t=="number"){if(!Qr(this,t))return null;if(a=t,t=wt(this,t),!t)return null}else if(a=Nt(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:Vn(function(t,a,j){return fo(this,t,a=="gutter"?"gutter":"class",function(M){var G=a=="text"?"textClass":a=="background"?"bgClass":a=="gutter"?"gutterClass":"wrapClass";if(!M[G])M[G]=j;else{if(R(j).test(M[G]))return!1;M[G]+=" "+j}return!0})}),removeLineClass:Vn(function(t,a,j){return fo(this,t,a=="gutter"?"gutter":"class",function(M){var G=a=="text"?"textClass":a=="background"?"bgClass":a=="gutter"?"gutterClass":"wrapClass",Z=M[G];if(Z)if(j==null)M[G]=null;else{var se=Z.match(R(j));if(!se)return!1;var me=se.index+se[0].length;M[G]=Z.slice(0,se.index)+(!se.index||me==Z.length?"":" ")+Z.slice(me)||null}else return!1;return!0})}),addLineWidget:Vn(function(t,a,j){return xl(this,t,a,j)}),removeLineWidget:function(t){t.clear()},markText:function(t,a,j){return Xa(this,V(this,t),V(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=V(this,t),Xa(this,t,t,j,"bookmark")},findMarksAt:function(t){t=V(this,t);var a=[],j=wt(this,t.line).markedSpans;if(j)for(var M=0;M<j.length;++M){var G=j[M];(G.from==null||G.from<=t.ch)&&(G.to==null||G.to>=t.ch)&&a.push(G.marker.parent||G.marker)}return a},findMarks:function(t,a,j){t=V(this,t),a=V(this,a);var M=[],G=t.line;return this.iter(t.line,a.line+1,function(Z){var se=Z.markedSpans;if(se)for(var me=0;me<se.length;me++){var ge=se[me];!(ge.to!=null&&G==t.line&&t.ch>=ge.to||ge.from==null&&G!=t.line||ge.from!=null&&G==a.line&&ge.from>=a.ch)&&(!j||j(ge.marker))&&M.push(ge.marker.parent||ge.marker)}++G}),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(G){var Z=G.text.length+M;if(Z>t)return a=t,!0;t-=Z,++j}),V(this,vt(j,a))},indexFromPos:function(t){t=V(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 ki(nr(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 ki(nr(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 Nn&&(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(G){return M.push(G.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):At(t)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Vn(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)})}),ki.prototype.eachLine=ki.prototype.iter;var Bs=0;function Ol(t){var a=this;if(Hs(a),Qe(a,t)||Jn(a.display,t))return;Ee(t),C&&(Bs=+new Date);var j=ni(a,t,!0),M=t.dataTransfer.files;if(!j||a.isReadOnly())return;if(M&&M.length&&window.FileReader&&window.File)for(var G=M.length,Z=Array(G),se=0,me=function(){++se==G&&zn(a,function(){j=V(a.doc,j);var st={from:j,to:j,text:a.doc.splitLines(Z.filter(function(mt){return mt!=null}).join(a.doc.lineSeparator())),origin:"paste"};za(a.doc,st),Ss(a.doc,Zi(V(a.doc,j),V(a.doc,qi(st))))})()},ge=function(st,mt){if(a.options.allowDropFileTypes&&re(a.options.allowDropFileTypes,st.type)==-1){me();return}var xt=new FileReader;xt.onerror=function(){return me()},xt.onload=function(){var Lt=xt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Lt)){me();return}Z[mt]=Lt,me()},xt.readAsText(st)},we=0;we<M.length;we++)ge(M[we],we);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 We=t.dataTransfer.getData("Text");if(We){var Xe;if(a.state.draggingText&&!a.state.draggingText.copy&&(Xe=a.listSelections()),jo(a.doc,Zi(j,j)),Xe)for(var ut=0;ut<Xe.length;++ut)Va(a.doc,"",Xe[ut].anchor,Xe[ut].head,"drag");a.replaceSelection(We,"around","paste"),a.display.input.focus()}}catch(st){}}}function Al(t,a){if(C&&(!t.state.draggingText||+new Date-Bs<100)){Ne(a);return}if(Qe(t,a)||Jn(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=ni(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 G=a[M].CodeMirror;G&&j.push(G)}j.length&&j[0].operation(function(){for(var Z=0;Z<j.length;Z++)t(j[Z])})}var Gs=!1;function Il(){if(Gs)return;Dl(),Gs=!0}function Dl(){var t;De(window,"resize",function(){t==null&&(t=setTimeout(function(){t=null,Ws(Ll)},100))}),De(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=s?ma.macDefault:ma.pcDefault;function kl(t){var a=t.split(/-(?!$)/);t=a[a.length-1];for(var j,M,G,Z,se=0;se<a.length-1;se++){var me=a[se];if(/^(cmd|meta|m)$/i.test(me))Z=!0;else if(/^a(lt)?$/i.test(me))j=!0;else if(/^(c|ctrl|control)$/i.test(me))M=!0;else if(/^s(hift)?$/i.test(me))G=!0;else throw new Error("Unrecognized modifier name: "+me)}return j&&(t="Alt-"+t),M&&(t="Ctrl-"+t),Z&&(t="Cmd-"+t),G&&(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 G=Ce(j.split(" "),kl),Z=0;Z<G.length;Z++){var se=void 0,me=void 0;Z==G.length-1?(me=G.join(" "),se=M):(me=G.slice(0,Z+1).join(" "),se="...");var ge=a[me];if(!ge)a[me]=se;else if(ge!=se)throw new Error("Inconsistent bindings for "+me)}delete t[j]}for(var we in a)t[we]=a[we];return t}function Ya(t,a,j,M){a=Ho(a);var G=a.call?a.call(t,M):a[t];if(G===!1)return"nothing";if(G==="...")return"multi";if(G!=null&&j(G))return"handled";if(a.fallthrough){if(Object.prototype.toString.call(a.fallthrough)!="[object Array]")return Ya(t,a.fallthrough,j,M);for(var Z=0;Z<a.fallthrough.length;Z++){var se=Ya(t,a.fallthrough[Z],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=[],G=0;G<j.length;G++){for(var Z=a(j[G]);M.length&&Ht(Z.from,ie(M).to)<=0;){var se=M.pop();if(Ht(se.from,Z.from)<0){Z.from=se.from;break}}M.push(Z)}Oi(t,function(){for(var me=M.length-1;me>=0;me--)Va(t.doc,"",M[me].from,M[me].to,"+delete");ya(t)})}function as(t,a,j){var M=xe(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 vt(a.line,M,j<0?"after":"before")}function ss(t,a,j,M,G){if(t){a.doc.direction=="rtl"&&(G=-G);var Z=at(j,a.doc.direction);if(Z){var se=G<0?ie(Z):Z[0],me=G<0==(se.level==1),ge=me?"after":"before",we;if(se.level>0||a.doc.direction=="rtl"){var We=$e(a,j);we=G<0?j.text.length-1:0;var Xe=ot(a,We,we).top;we=Ke(function(ut){return ot(a,We,ut).top==Xe},G<0==(se.level==1)?se.from:se.to-1,we),ge=="before"&&(we=as(j,we,1))}else we=G<0?se.to:se.from;return new vt(M,we,ge)}}return new vt(M,G<0?j.text.length:0,G<0?"before":"after")}function Pl(t,a,j,M){var G=at(a,t.doc.direction);if(!G)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 Z=et(G,j.ch,j.sticky),se=G[Z];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 me=function(jt,Vt){return as(a,jt instanceof vt?jt.ch:jt,Vt)},ge,we=function(jt){return t.options.lineWrapping?(ge=ge||$e(t,a),Zt(t,a,ge,jt)):{begin:0,end:a.text.length}},We=we(j.sticky=="before"?me(j,-1):j.ch);if(t.doc.direction=="rtl"||se.level==1){var Xe=se.level==1==M<0,ut=me(j,Xe?1:-1);if(ut!=null&&(Xe?ut<=se.to&&ut<=We.end:ut>=se.from&&ut>=We.begin)){var st=Xe?"before":"after";return new vt(j.line,ut,st)}}var mt=function(jt,Vt,Ft){for(var Jt=function(Sn,fi){return fi?new vt(j.line,me(Sn,1),"before"):new vt(j.line,Sn,"after")};jt>=0&&jt<G.length;jt+=Vt){var fr=G[jt],or=Vt>0==(fr.level!=1),Nr=or?Ft.begin:me(Ft.end,-1);if(fr.from<=Nr&&Nr<fr.to)return Jt(Nr,or);if(Nr=or?fr.from:me(fr.to,-1),Ft.begin<=Nr&&Nr<Ft.end)return Jt(Nr,or)}},xt=mt(Z+M,M,We);if(xt)return xt;var Lt=M>0?We.end:me(We.begin,-1);return Lt!=null&&!(M>0&&Lt==a.text.length)&&(xt=mt(M>0?0:G.length-1,M,we(Lt)),xt)?xt:null}var _o={selectAll:Is,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),be)},killLine:function(t){return $a(t,function(a){if(a.empty()){var j=wt(t.doc,a.head.line).text.length;return a.head.ch==j&&a.head.line<t.lastLine()?{from:a.head,to:vt(a.head.line+1,0)}:{from:a.head,to:vt(a.head.line,j)}}else return{from:a.from(),to:a.to()}})},deleteLine:function(t){return $a(t,function(a){return{from:vt(a.from().line,0),to:V(t.doc,vt(a.to().line+1,0))}})},delLineLeft:function(t){return $a(t,function(a){return{from:vt(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(vt(t.firstLine(),0))},goDocEnd:function(t){return t.extendSelection(vt(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")},Ie)},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")},Ie)},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},Ie)},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,G=0;G<j.length;G++){var Z=j[G].from(),se=W(t.getLine(Z.line),Z.ch,M);a.push(ue(M-se%M))}t.replaceSelections(a)},defaultTab:function(t){t.somethingSelected()?t.indentSelection("add"):t.execCommand("insertTab")},transposeChars:function(t){return Oi(t,function(){for(var a=t.listSelections(),j=[],M=0;M<a.length;M++){if(!a[M].empty())continue;var G=a[M].head,Z=wt(t.doc,G.line).text;if(Z){if(G.ch==Z.length&&(G=new vt(G.line,G.ch-1)),G.ch>0)G=new vt(G.line,G.ch+1),t.replaceRange(Z.charAt(G.ch-1)+Z.charAt(G.ch-2),vt(G.line,G.ch-2),G,"+transpose");else if(G.line>t.doc.first){var se=wt(t.doc,G.line-1).text;se&&(G=new vt(G.line,1),t.replaceRange(Z.charAt(0)+t.doc.lineSeparator()+se.charAt(se.length-1),vt(G.line-1,se.length-1),G,"+transpose"))}}j.push(new cn(G,G))}t.setSelections(j)})},newlineAndIndent:function(t){return Oi(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=wt(t.doc,a),M=Un(j);return M!=j&&(a=Nt(M)),ss(!0,t,M,a,1)}function Nl(t,a){var j=wt(t.doc,a),M=Di(j);return M!=j&&(a=Nt(M)),ss(!0,t,j,a,-1)}function Ys(t,a){var j=Xs(t,a.line),M=wt(t.doc,j.line),G=at(M,t.doc.direction);if(!G||G[0].level==0){var Z=Math.max(j.ch,M.text.search(/\S/)),se=a.line==j.line&&a.ch<=Z&&a.ch;return vt(j.line,se?0:Z,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,G=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),j&&(t.display.shift=!1),G=a(t)!=ye}finally{t.display.shift=M,t.state.suppressEdits=!1}return G}function jl(t,a,j){for(var M=0;M<t.state.keyMaps.length;M++){var G=Ya(a,t.state.keyMaps[M],j,t);if(G)return G}return t.options.extraKeys&&Ya(a,t.options.extraKeys,j,t)||Ya(a,t.options.keyMap,j,t)}var Fl=new Q;function Eo(t,a,j,M){var G=t.state.keySeq;if(G){if(Ks(a))return"handled";if(/\'$/.test(a)?t.state.keySeq=null:Fl.set(50,function(){t.state.keySeq==G&&(t.state.keySeq=null,t.display.input.reset())}),$s(t,G+" "+a,j,M))return!0}return $s(t,a,j,M)}function $s(t,a,j,M){var G=jl(t,a,M);return G=="multi"&&(t.state.keySeq=a),G=="handled"&&Ir(t,"keyHandled",t,a,j),(G=="handled"||G=="multi")&&(Ee(j),ii(t)),!!G}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=z(),Qe(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&&!Xt&&(s?t.metaKey:t.ctrlKey)&&a.replaceSelection("",null,"cut")),S&&!s&&!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;K(a,"CodeMirror-crosshair");function j(M){(M.keyCode==18||!M.altKey)&&(v(a,"CodeMirror-crosshair"),lt(document,"keyup",j),lt(document,"mouseover",j))}De(document,"keyup",j),De(document,"mouseover",j)}function Zs(t){t.keyCode==16&&(this.doc.sel.shift=!1),Qe(this,t)}function el(t){var a=this;if(t.target&&t.target!=a.display.input.getField())return;if(Jn(a.display,t)||Qe(a,t)||t.ctrlKey&&!t.altKey||s&&t.metaKey)return;var j=t.keyCode,M=t.charCode;if(c&&j==ls){ls=null,Ee(t);return}if(c&&(!t.which||t.which<10)&&Js(a,t))return;var G=String.fromCharCode(M==null?j:M);if(G=="\b")return;if(Ul(a,t,G))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&&Ht(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(Qe(a,t)||j.activeTouch&&j.input.supportsTouch())return;if(j.input.ensurePolled(),j.shift=t.shiftKey,Jn(j,t)){e||(j.scroller.draggable=!1,setTimeout(function(){return j.scroller.draggable=!0},100));return}if(cs(a,t))return;var M=ni(a,t),G=rt(t),Z=M?Wl(M,G):"single";if(window.focus(),G==1&&a.state.selectingText&&a.state.selectingText(t),M&&Gl(a,G,M,Z,t))return;G==1?M?zl(a,M,Z,t):He(t)==j.scroller&&Ee(t):G==2?(M&&No(a.doc,M),setTimeout(function(){return j.input.focus()},20)):G==3&&(L?a.display.input.onContextMenu(t):eo(a))}function Gl(t,a,j,M,G){var Z="Click";return M=="double"?Z="Double"+Z:M=="triple"&&(Z="Triple"+Z),Z=(a==1?"Left":a==2?"Middle":"Right")+Z,Eo(t,zs(Z,G),G,function(se){if(typeof se=="string"&&(se=_o[se]),!se)return!1;var me=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),me=se(t,j)!=ye}finally{t.state.suppressEdits=!1}return me})}function Kl(t,a,j){var M=t.getOption("configureMouse"),G=M?M(t,a,j):{};if(G.unit==null){var Z=l?j.shiftKey&&j.metaKey:j.altKey;G.unit=Z?"rectangle":a=="single"?"char":a=="double"?"word":"line"}return(G.extend==null||t.doc.extend)&&(G.extend=t.doc.extend||j.shiftKey),G.addNew==null&&(G.addNew=s?j.metaKey:j.ctrlKey),G.moveOnDrag==null&&(G.moveOnDrag=!(s?j.altKey:j.ctrlKey)),G}function zl(t,a,j,M){C?setTimeout(U(So,t),0):t.curOp.focus=z();var G=Kl(t,j,M),Z=t.doc.sel,se;t.options.dragDrop&&ct&&!t.isReadOnly()&&j=="single"&&(se=Z.contains(a))>-1&&(Ht((se=Z.ranges[se]).from(),a)<0||a.xRel>0)&&(Ht(se.to(),a)>0||a.xRel<0)?Vl(t,M,a,G):Xl(t,M,a,G)}function Vl(t,a,j,M){var G=t.display,Z=!1,se=zn(t,function(we){e&&(G.scroller.draggable=!1),t.state.draggingText=!1,lt(G.wrapper.ownerDocument,"mouseup",se),lt(G.wrapper.ownerDocument,"mousemove",me),lt(G.scroller,"dragstart",ge),lt(G.scroller,"drop",se),Z||(Ee(we),M.addNew||No(t.doc,j,null,null,M.extend),e&&!i||C&&_==9?setTimeout(function(){G.wrapper.ownerDocument.body.focus({preventScroll:!0}),G.input.focus()},20):G.input.focus())}),me=function(we){Z=Z||Math.abs(a.clientX-we.clientX)+Math.abs(a.clientY-we.clientY)>=10},ge=function(){return Z=!0};e&&(G.scroller.draggable=!0),t.state.draggingText=se,se.copy=!M.moveOnDrag,G.scroller.dragDrop&&G.scroller.dragDrop(),De(G.wrapper.ownerDocument,"mouseup",se),De(G.wrapper.ownerDocument,"mousemove",me),De(G.scroller,"dragstart",ge),De(G.scroller,"drop",se),eo(t),setTimeout(function(){return G.input.focus()},20)}function rl(t,a,j){if(j=="char")return new cn(a,a);if(j=="word")return t.findWordAt(a);if(j=="line")return new cn(vt(a.line,0),V(t.doc,vt(a.line+1,0)));var M=j(t,a);return new cn(M.from,M.to)}function Xl(t,a,j,M){var G=t.display,Z=t.doc;Ee(a);var se,me,ge=Z.sel,we=ge.ranges;if(M.addNew&&!M.extend?(me=Z.sel.contains(j),me>-1?se=we[me]:se=new cn(j,j)):(se=Z.sel.primary(),me=Z.sel.primIndex),M.unit=="rectangle")M.addNew||(se=new cn(j,j)),j=ni(t,a,!0,!0),me=-1;else{var We=rl(t,j,M.unit);M.extend?se=ns(se,We.anchor,We.head,M.extend):se=We}M.addNew?me==-1?(me=we.length,wi(Z,Vi(t,we.concat([se]),me),{scroll:!1,origin:"*mouse"})):we.length>1&&we[me].empty()&&M.unit=="char"&&!M.extend?(wi(Z,Vi(t,we.slice(0,me).concat(we.slice(me+1)),0),{scroll:!1,origin:"*mouse"}),ge=Z.sel):is(Z,me,se,he):(me=0,wi(Z,new Ri([se],0),he),ge=Z.sel);var Xe=j;function ut(Ft){if(Ht(Xe,Ft)==0)return;if(Xe=Ft,M.unit=="rectangle"){for(var Jt=[],fr=t.options.tabSize,or=W(wt(Z,j.line).text,j.ch,fr),Nr=W(wt(Z,Ft.line).text,Ft.ch,fr),Sn=Math.min(or,Nr),fi=Math.max(or,Nr),Fn=Math.min(j.line,Ft.line),Fi=Math.min(t.lastLine(),Math.max(j.line,Ft.line));Fn<=Fi;Fn++){var Mi=wt(Z,Fn).text,Qn=Se(Mi,Sn,fr);Sn==fi?Jt.push(new cn(vt(Fn,Qn),vt(Fn,Qn))):Mi.length>Qn&&Jt.push(new cn(vt(Fn,Qn),vt(Fn,Se(Mi,fi,fr))))}Jt.length||Jt.push(new cn(j,j)),wi(Z,Vi(t,ge.ranges.slice(0,me).concat(Jt),me),{origin:"*mouse",scroll:!1}),t.scrollIntoView(Ft)}else{var Pi=se,yi=rl(t,Ft,M.unit),si=Pi.anchor,Zn;Ht(yi.anchor,si)>0?(Zn=yi.head,si=Cn(Pi.from(),yi.anchor)):(Zn=yi.anchor,si=kn(Pi.to(),yi.head));var Gn=ge.ranges.slice(0);Gn[me]=Yl(t,new cn(V(Z,si),Zn)),wi(Z,Vi(t,Gn,me),he)}}var st=G.wrapper.getBoundingClientRect(),mt=0;function xt(Ft){var Jt=++mt,fr=ni(t,Ft,!0,M.unit=="rectangle");if(!fr)return;if(Ht(fr,Xe)!=0){t.curOp.focus=z(),ut(fr);var or=Pa(G,Z);(fr.line>=or.to||fr.line<or.from)&&setTimeout(zn(t,function(){mt==Jt&&xt(Ft)}),150)}else{var Nr=Ft.clientY<st.top?-20:Ft.clientY>st.bottom?20:0;Nr&&setTimeout(zn(t,function(){if(mt!=Jt)return;G.scroller.scrollTop+=Nr,xt(Ft)}),50)}}function Lt(Ft){t.state.selectingText=!1,mt=Infinity,Ft&&(Ee(Ft),G.input.focus()),lt(G.wrapper.ownerDocument,"mousemove",jt),lt(G.wrapper.ownerDocument,"mouseup",Vt),Z.history.lastSelOrigin=null}var jt=zn(t,function(Ft){Ft.buttons===0||!rt(Ft)?Lt(Ft):xt(Ft)}),Vt=zn(t,Lt);t.state.selectingText=Vt,De(G.wrapper.ownerDocument,"mousemove",jt),De(G.wrapper.ownerDocument,"mouseup",Vt)}function Yl(t,a){var j=a.anchor,M=a.head,G=wt(t.doc,j.line);if(Ht(j,M)==0&&j.sticky==M.sticky)return a;var Z=at(G);if(!Z)return a;var se=et(Z,j.ch,j.sticky),me=Z[se];if(me.from!=j.ch&&me.to!=j.ch)return a;var ge=se+(me.from==j.ch==(me.level!=1)?0:1);if(ge==0||ge==Z.length)return a;var we;if(M.line!=j.line)we=(M.line-j.line)*(t.doc.direction=="ltr"?1:-1)>0;else{var We=et(Z,M.ch,M.sticky),Xe=We-se||(M.ch-j.ch)*(me.level==1?-1:1);We==ge-1||We==ge?we=Xe<0:we=Xe>0}var ut=Z[ge+(we?-1:0)],st=we==(ut.level==1),mt=st?ut.from:ut.to,xt=st?"after":"before";return j.ch==mt&&j.sticky==xt?a:new cn(new vt(j.line,mt,xt),M)}function nl(t,a,j,M){var G,Z;if(a.touches)G=a.touches[0].clientX,Z=a.touches[0].clientY;else try{G=a.clientX,Z=a.clientY}catch(ut){return!1}if(G>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;M&&Ee(a);var se=t.display,me=se.lineDiv.getBoundingClientRect();if(Z>me.bottom||!Re(t,j))return ke(a);Z-=me.top-se.viewOffset;for(var ge=0;ge<t.display.gutterSpecs.length;++ge){var we=se.gutters.childNodes[ge];if(we&&we.getBoundingClientRect().right>=G){var We=vr(t.doc,Z),Xe=t.display.gutterSpecs[ge];return Ve(t,j,t,We,Xe.className,a),ke(a)}}}function cs(t,a){return nl(t,a,"gutterClick",!0)}function il(t,a){if(Jn(t.display,a)||$l(t,a))return;if(Qe(t,a,"contextmenu"))return;L||t.display.input.onContextMenu(a)}function $l(t,a){return Re(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-"),Or(t)}var Ja={toString:function(){return"CodeMirror.Init"}},ol={},Go={};function Jl(t){var a=t.optionHandlers;function j(M,G,Z,se){t.defaults[M]=G,Z&&(a[M]=se?function(me,ge,we){we!=Ja&&Z(me,ge,we)}:Z)}t.defineOption=j,t.Init=Ja,j("value","",function(M,G){return M.setValue(G)},!0),j("mode",null,function(M,G){M.doc.modeOption=G,pa(M)},!0),j("indentUnit",2,pa,!0),j("indentWithTabs",!1),j("smartIndent",!0),j("tabSize",4,function(M){co(M),Or(M),bn(M)},!0),j("lineSeparator",null,function(M,G){if(M.doc.lineSep=G,!G)return;var Z=[],se=M.doc.first;M.doc.iter(function(ge){for(var we=0;;){var We=ge.text.indexOf(G,we);if(We==-1)break;we=We+G.length,Z.push(vt(se,We))}se++});for(var me=Z.length-1;me>=0;me--)Va(M.doc,G,Z[me],vt(Z[me].line,Z[me].ch+G.length))}),j("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(M,G,Z){M.state.specialChars=new RegExp(G.source+(G.test(" ")?"":"| "),"g"),Z!=Ja&&M.refresh()}),j("specialCharPlaceholder",zr,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,G){return M.getInputField().spellcheck=G},!0),j("autocorrect",!1,function(M,G){return M.getInputField().autocorrect=G},!0),j("autocapitalize",!1,function(M,G){return M.getInputField().autocapitalize=G},!0),j("rtlMoveVisually",!E),j("wholeLineUpdateBefore",!0),j("theme","default",function(M){al(M),Qi(M)},!0),j("keyMap","default",function(M,G,Z){var se=Ho(G),me=Z!=Ja&&Ho(Z);me&&me.detach&&me.detach(M,se),se.attach&&se.attach(M,me||null)}),j("extraKeys",null),j("configureMouse",null),j("lineWrapping",!1,Zl,!0),j("gutters",[],function(M,G){M.display.gutterSpecs=Ai(G,M.options.lineNumbers),Qi(M)},!0),j("fixedGutter",!0,function(M,G){M.display.gutters.style.left=G?xi(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,G){M.display.gutterSpecs=Ai(M.options.gutters,G),Qi(M)},!0),j("firstLineNumber",1,Qi,!0),j("lineNumberFormatter",function(M){return M},Qi,!0),j("showCursorWhenSelecting",!1,gn,!0),j("resetSelectionOnContextMenu",!0),j("lineWiseCopyCut",!0),j("pasteLinesPerSelection",!0),j("selectionsMayTouch",!1),j("readOnly",!1,function(M,G){G=="nocursor"&&(va(M),M.display.input.blur()),M.display.input.readOnlyChanged(G)}),j("screenReaderLabel",null,function(M,G){G=G===""?null:G,M.display.input.screenReaderLabelChanged(G)}),j("disableInput",!1,function(M,G){G||M.display.input.reset()},!0),j("dragDrop",!0,Ql),j("allowDropFileTypes",null),j("cursorBlinkRate",530),j("cursorScrollMargin",0),j("cursorHeight",1,gn,!0),j("singleCursorHeightPerLine",!0,gn,!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,G){return M.doc.history.undoDepth=G}),j("historyEventDelay",1250),j("viewportMargin",10,function(M){return M.refresh()},!0),j("maxHighlightLength",1e4,co,!0),j("moveInputWithCursor",!0,function(M,G){G||M.display.input.resetPosition()}),j("tabindex",null,function(M,G){return M.display.input.getField().tabIndex=G||""}),j("autofocus",null),j("direction","ltr",function(M,G){return M.doc.setDirection(G)},!0),j("phrases",null)}function Ql(t,a,j){var M=j&&j!=Ja;if(!a!=!M){var G=t.display.dragFunctions,Z=a?De:lt;Z(t.display.scroller,"dragstart",G.start),Z(t.display.scroller,"dragenter",G.enter),Z(t.display.scroller,"dragover",G.over),Z(t.display.scroller,"dragleave",G.leave),Z(t.display.scroller,"drop",G.drop)}}function Zl(t){t.options.lineWrapping?(K(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(v(t.display.wrapper,"CodeMirror-wrap"),Hi(t)),Ci(t),bn(t),Or(t),setTimeout(function(){return da(t)},100)}function Nn(t,a){var j=this;if(!(this instanceof Nn))return new Nn(t,a);this.options=a=a?D(a):{},D(ol,a,!1);var M=a.value;typeof M=="string"?M=new ki(M,a.mode,null,a.lineSeparator,a.direction):a.mode&&(M.modeOption=a.mode),this.doc=M;var G=new Nn.inputStyles[a.inputStyle](this),Z=this.display=new Da(t,M,G,a);Z.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 Q,keySeq:null,specialChars:null},a.autofocus&&!u&&Z.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);ai(this),a.finishInit&&a.finishInit(this);for(var me=0;me<ds.length;++me)ds[me](this);ha(this),e&&a.lineWrapping&&getComputedStyle(Z.lineDiv).textRendering=="optimizelegibility"&&(Z.lineDiv.style.textRendering="auto")}Nn.defaults=ol,Nn.optionHandlers=Go;function ql(t){var a=t.display;De(a.scroller,"mousedown",zn(t,tl)),C&&_<11?De(a.scroller,"dblclick",zn(t,function(ge){if(Qe(t,ge))return;var we=ni(t,ge);if(!we||cs(t,ge)||Jn(t.display,ge))return;Ee(ge);var We=t.findWordAt(we);No(t.doc,We.anchor,We.head)})):De(a.scroller,"dblclick",function(ge){return Qe(t,ge)||Ee(ge)}),De(a.scroller,"contextmenu",function(ge){return il(t,ge)}),De(a.input.getField(),"contextmenu",function(ge){a.scroller.contains(ge.target)||il(t,ge)});var j,M={end:0};function G(){a.activeTouch&&(j=setTimeout(function(){return a.activeTouch=null},1e3),M=a.activeTouch,M.end=+new Date)}function Z(ge){if(ge.touches.length!=1)return!1;var we=ge.touches[0];return we.radiusX<=1&&we.radiusY<=1}function se(ge,we){if(we.left==null)return!0;var We=we.left-ge.left,Xe=we.top-ge.top;return We*We+Xe*Xe>20*20}De(a.scroller,"touchstart",function(ge){if(!Qe(t,ge)&&!Z(ge)&&!cs(t,ge)){a.input.ensurePolled(),clearTimeout(j);var we=+new Date;a.activeTouch={start:we,moved:!1,prev:we-M.end<=300?M:null},ge.touches.length==1&&(a.activeTouch.left=ge.touches[0].pageX,a.activeTouch.top=ge.touches[0].pageY)}}),De(a.scroller,"touchmove",function(){a.activeTouch&&(a.activeTouch.moved=!0)}),De(a.scroller,"touchend",function(ge){var we=a.activeTouch;if(we&&!Jn(a,ge)&&we.left!=null&&!we.moved&&new Date-we.start<300){var We=t.coordsChar(a.activeTouch,"page"),Xe;!we.prev||se(we,we.prev)?Xe=new cn(We,We):!we.prev.prev||se(we,we.prev.prev)?Xe=t.findWordAt(We):Xe=new cn(vt(We.line,0),V(t.doc,vt(We.line+1,0))),t.setSelection(Xe.anchor,Xe.head),t.focus(),Ee(ge)}G()}),De(a.scroller,"touchcancel",G),De(a.scroller,"scroll",function(){a.scroller.clientHeight&&(_a(t,a.scroller.scrollTop),Ki(t,a.scroller.scrollLeft,!0),Ve(t,"scroll",t))}),De(a.scroller,"mousewheel",function(ge){return lo(t,ge)}),De(a.scroller,"DOMMouseScroll",function(ge){return lo(t,ge)}),De(a.wrapper,"scroll",function(){return a.wrapper.scrollTop=a.wrapper.scrollLeft=0}),a.dragFunctions={enter:function(ge){Qe(t,ge)||Ne(ge)},over:function(ge){Qe(t,ge)||(Rl(t,ge),Ne(ge))},start:function(ge){return Al(t,ge)},drop:zn(t,Ol),leave:function(ge){Qe(t,ge)||Hs(t)}};var me=a.input.getField();De(me,"keyup",function(ge){return Zs.call(t,ge)}),De(me,"keydown",zn(t,Qs)),De(me,"keypress",zn(t,el)),De(me,"focus",function(ge){return ia(t,ge)}),De(me,"blur",function(ge){return va(t,ge)})}var ds=[];Nn.defineInitHook=function(t){return ds.push(t)};function To(t,a,j,M){var G=t.doc,Z;j==null&&(j="add"),j=="smart"&&(G.mode.indent?Z=Ct(t,a).state:j="prev");var se=t.options.tabSize,me=wt(G,a),ge=W(me.text,null,se);me.stateAfter&&(me.stateAfter=null);var we=me.text.match(/^\s*/)[0],We;if(!M&&!/\S/.test(me.text))We=0,j="not";else if(j=="smart"&&(We=G.mode.indent(Z,me.text.slice(we.length),me.text),We==ye||We>150)){if(!M)return;j="prev"}j=="prev"?a>G.first?We=W(wt(G,a-1).text,null,se):We=0:j=="add"?We=ge+t.options.indentUnit:j=="subtract"?We=ge-t.options.indentUnit:typeof j=="number"&&(We=ge+j),We=Math.max(0,We);var Xe="",ut=0;if(t.options.indentWithTabs)for(var st=Math.floor(We/se);st;--st)ut+=se,Xe+=" ";if(ut<We&&(Xe+=ue(We-ut)),Xe!=we)return Va(G,Xe,vt(a,0),vt(a,we.length),"+input"),me.stateAfter=null,!0;for(var mt=0;mt<G.sel.ranges.length;mt++){var xt=G.sel.ranges[mt];if(xt.head.line==a&&xt.head.ch<we.length){var Lt=vt(a,we.length);is(G,mt,new cn(Lt,Lt));break}}}var ea=null;function Ko(t){ea=t}function hs(t,a,j,M,G){var Z=t.doc;t.display.shift=!1,M||(M=Z.sel);var se=+new Date-200,me=G=="paste"||t.state.pasteIncoming>se,ge=At(a),we=null;if(me&&M.ranges.length>1)if(ea&&ea.text.join(`
`)==a){if(M.ranges.length%ea.text.length==0){we=[];for(var We=0;We<ea.text.length;We++)we.push(Z.splitLines(ea.text[We]))}}else ge.length==M.ranges.length&&t.options.pasteLinesPerSelection&&(we=Ce(ge,function(jt){return[jt]}));for(var Xe=t.curOp.updateInput,ut=M.ranges.length-1;ut>=0;ut--){var st=M.ranges[ut],mt=st.from(),xt=st.to();st.empty()&&(j&&j>0?mt=vt(mt.line,mt.ch-j):t.state.overwrite&&!me?xt=vt(xt.line,Math.min(wt(Z,xt.line).text.length,xt.ch+ie(ge).length)):me&&ea&&ea.lineWise&&ea.text.join(`
`)==ge.join(`
`)&&(mt=xt=vt(mt.line,0)));var Lt={from:mt,to:xt,text:we?we[ut%we.length]:ge,origin:G||(me?"paste":t.state.cutIncoming>se?"cut":"+input")};za(t.doc,Lt),Ir(t,"inputRead",t,Lt)}a&&!me&&ll(t,a),ya(t),t.curOp.updateInput<2&&(t.curOp.updateInput=Xe),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&&Oi(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 G=j.ranges[M];if(G.head.ch>100||M&&j.ranges[M-1].head.line==G.head.line)continue;var Z=t.getModeAt(G.head),se=!1;if(Z.electricChars){for(var me=0;me<Z.electricChars.length;me++)if(a.indexOf(Z.electricChars.charAt(me))>-1){se=To(t,G.head.line,"smart");break}}else Z.electricInput&&(Z.electricInput.test(wt(t.doc,G.head.line).text.slice(0,G.head.ch))&&(se=To(t,G.head.line,"smart")));se&&Ir(t,"electricInput",t,G.head.line)}}function ul(t){for(var a=[],j=[],M=0;M<t.doc.sel.ranges.length;M++){var G=t.doc.sel.ranges[M].head.line,Z={anchor:vt(G,0),head:vt(G+1,0)};j.push(Z),a.push(t.getRange(Z.anchor,Z.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"),h&&(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,G){var Z=this.options,se=Z[M];if(Z[M]==G&&M!="mode")return;Z[M]=G,a.hasOwnProperty(M)&&zn(this,a[M])(this,G,se),Ve(this,"optionChange",this,M)},getOption:function(M){return this.options[M]},getDoc:function(){return this.doc},addKeyMap:function(M,G){this.state.keyMaps[G?"push":"unshift"](Ho(M))},removeKeyMap:function(M){for(var G=this.state.keyMaps,Z=0;Z<G.length;++Z)if(G[Z]==M||G[Z].name==M)return G.splice(Z,1),!0},addOverlay:vi(function(M,G){var Z=M.token?M:t.getMode(this.options,M);if(Z.startState)throw new Error("Overlays may not be stateful.");ne(this.state.overlays,{mode:Z,modeSpec:M,opaque:G&&G.opaque,priority:G&&G.priority||0},function(se){return se.priority}),this.state.modeGen++,bn(this)}),removeOverlay:vi(function(M){for(var G=this.state.overlays,Z=0;Z<G.length;++Z){var se=G[Z].modeSpec;if(se==M||typeof M=="string"&&se.name==M){G.splice(Z,1),this.state.modeGen++,bn(this);return}}}),indentLine:vi(function(M,G,Z){typeof G!="string"&&typeof G!="number"&&(G==null?G=this.options.smartIndent?"smart":"prev":G=G?"add":"subtract"),Qr(this.doc,M)&&To(this,M,G,Z)}),indentSelection:vi(function(M){for(var G=this.doc.sel.ranges,Z=-1,se=0;se<G.length;se++){var me=G[se];if(me.empty())me.head.line>Z&&(To(this,me.head.line,M,!0),Z=me.head.line,se==this.doc.sel.primIndex&&ya(this));else{var ge=me.from(),we=me.to(),We=Math.max(Z,ge.line);Z=Math.min(this.lastLine(),we.line-(we.ch?0:1))+1;for(var Xe=We;Xe<Z;++Xe)To(this,Xe,M);var ut=this.doc.sel.ranges;ge.ch==0&&G.length==ut.length&&ut[se].from().ch>0&&is(this.doc,se,new cn(ge,ut[se].to()),be)}}}),getTokenAt:function(M,G){return Hr(this,M,G)},getLineTokens:function(M,G){return Hr(this,vt(M),G,!0)},getTokenTypeAt:function(M){M=V(this.doc,M);var G=ft(this,wt(this.doc,M.line)),Z=0,se=(G.length-1)/2,me=M.ch,ge;if(me==0)ge=G[2];else for(;;){var we=Z+se>>1;if((we?G[we*2-1]:0)>=me)se=we;else if(G[we*2+1]<me)Z=we+1;else{ge=G[we*2+2];break}}var We=ge?ge.indexOf("overlay "):-1;return We<0?ge:We==0?null:ge.slice(0,We-1)},getModeAt:function(M){var G=this.doc.mode;return G.innerMode?t.innerMode(G,this.getTokenAt(M).state).mode:G},getHelper:function(M,G){return this.getHelpers(M,G)[0]},getHelpers:function(M,G){var Z=[];if(!j.hasOwnProperty(G))return Z;var se=j[G],me=this.getModeAt(M);if(typeof me[G]=="string")se[me[G]]&&Z.push(se[me[G]]);else if(me[G])for(var ge=0;ge<me[G].length;ge++){var we=se[me[G][ge]];we&&Z.push(we)}else me.helperType&&se[me.helperType]?Z.push(se[me.helperType]):se[me.name]&&Z.push(se[me.name]);for(var We=0;We<se._global.length;We++){var Xe=se._global[We];Xe.pred(me,this)&&re(Z,Xe.val)==-1&&Z.push(Xe.val)}return Z},getStateAfter:function(M,G){var Z=this.doc;return M=le(Z,M==null?Z.first+Z.size-1:M),Ct(this,M+1,G).state},cursorCoords:function(M,G){var Z,se=this.doc.sel.primary();return M==null?Z=se.head:typeof M=="object"?Z=V(this.doc,M):Z=M?se.from():se.to(),Br(this,Z,G||"page")},charCoords:function(M,G){return In(this,V(this.doc,M),G||"page")},coordsChar:function(M,G){return M=Ur(this,M,G||"page"),Wr(this,M.left,M.top)},lineAtHeight:function(M,G){return M=Ur(this,{top:M,left:0},G||"page").top,vr(this.doc,M+this.display.viewOffset)},heightAtLine:function(M,G,Z){var se=!1,me;if(typeof M=="number"){var ge=this.doc.first+this.doc.size-1;M<this.doc.first?M=this.doc.first:M>ge&&(M=ge,se=!0),me=wt(this.doc,M)}else me=M;return Yr(this,me,{top:0,left:0},G||"page",Z||se).top+(se?this.doc.height-ci(me):0)},defaultTextHeight:function(){return Wn(this.display)},defaultCharWidth:function(){return ri(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(M,G,Z,se,me){var ge=this.display;M=Br(this,V(this.doc,M));var we=M.bottom,We=M.left;if(G.style.position="absolute",G.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(G),ge.sizer.appendChild(G),se=="over")we=M.top;else if(se=="above"||se=="near"){var Xe=Math.max(ge.wrapper.clientHeight,this.doc.height),ut=Math.max(ge.sizer.clientWidth,ge.lineSpace.clientWidth);(se=="above"||M.bottom+G.offsetHeight>Xe)&&M.top>G.offsetHeight?we=M.top-G.offsetHeight:M.bottom+G.offsetHeight<=Xe&&(we=M.bottom),We+G.offsetWidth>ut&&(We=ut-G.offsetWidth)}G.style.top=we+"px",G.style.left=G.style.right="",me=="right"?(We=ge.sizer.clientWidth-G.offsetWidth,G.style.right="0px"):(me=="left"?We=0:me=="middle"&&(We=(ge.sizer.clientWidth-G.offsetWidth)/2),G.style.left=We+"px"),Z&&Co(this,{left:We,top:we,right:We+G.offsetWidth,bottom:we+G.offsetHeight})},triggerOnKeyDown:vi(Qs),triggerOnKeyPress:vi(el),triggerOnKeyUp:Zs,triggerOnMouseDown:vi(tl),execCommand:function(M){if(_o.hasOwnProperty(M))return _o[M].call(null,this)},triggerElectric:vi(function(M){ll(this,M)}),findPosH:function(M,G,Z,se){var me=1;G<0&&(me=-1,G=-G);for(var ge=V(this.doc,M),we=0;we<G&&!(ge=fs(this.doc,ge,me,Z,se),ge.hitSide);++we);return ge},moveH:vi(function(M,G){var Z=this;this.extendSelectionsBy(function(se){return Z.display.shift||Z.doc.extend||se.empty()?fs(Z.doc,se.head,M,G,Z.options.rtlMoveVisually):M<0?se.from():se.to()},Ie)}),deleteH:vi(function(M,G){var Z=this.doc.sel,se=this.doc;Z.somethingSelected()?se.replaceSelection("",null,"+delete"):$a(this,function(me){var ge=fs(se,me.head,M,G,!1);return M<0?{from:ge,to:me.head}:{from:me.head,to:ge}})}),findPosV:function(M,G,Z,se){var me=1,ge=se;G<0&&(me=-1,G=-G);for(var we=V(this.doc,M),We=0;We<G;++We){var Xe=Br(this,we,"div");if(ge==null?ge=Xe.left:Xe.left=ge,we=hl(this,Xe,me,Z),we.hitSide)break}return we},moveV:vi(function(M,G){var Z=this,se=this.doc,me=[],ge=!this.display.shift&&!se.extend&&se.sel.somethingSelected();if(se.extendSelectionsBy(function(We){if(ge)return M<0?We.from():We.to();var Xe=Br(Z,We.head,"div");We.goalColumn!=null&&(Xe.left=We.goalColumn),me.push(Xe.left);var ut=hl(Z,Xe,M,G);return G=="page"&&We==se.sel.primary()&&no(Z,In(Z,ut,"div").top-Xe.top),ut},Ie),me.length)for(var we=0;we<se.sel.ranges.length;we++)se.sel.ranges[we].goalColumn=me[we]}),findWordAt:function(M){var G=this.doc,Z=wt(G,M.line).text,se=M.ch,me=M.ch;if(Z){var ge=this.getHelper(M,"wordChars");(M.sticky=="before"||me==Z.length)&&se?--se:++me;for(var we=Z.charAt(se),We=$(we,ge)?function(Xe){return $(Xe,ge)}:/\s/.test(we)?function(Xe){return/\s/.test(Xe)}:function(Xe){return!/\s/.test(Xe)&&!$(Xe)};se>0&&We(Z.charAt(se-1));)--se;for(;me<Z.length&&We(Z.charAt(me));)++me}return new cn(vt(M.line,se),vt(M.line,me))},toggleOverwrite:function(M){if(M!=null&&M==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?K(this.display.cursorDiv,"CodeMirror-overwrite"):v(this.display.cursorDiv,"CodeMirror-overwrite"),Ve(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==z()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:vi(function(M,G){ba(this,M,G)}),getScrollInfo:function(){var M=this.display.scroller;return{left:M.scrollLeft,top:M.scrollTop,height:M.scrollHeight-Ze(this)-this.display.barHeight,width:M.scrollWidth-Ze(this)-this.display.barWidth,clientHeight:_e(this),clientWidth:Ue(this)}},scrollIntoView:vi(function(M,G){M==null?(M={from:this.doc.sel.primary().head,to:null},G==null&&(G=this.options.cursorScrollMargin)):typeof M=="number"?M={from:vt(M,0),to:null}:M.from==null&&(M={from:M,to:null}),M.to||(M.to=M.from),M.margin=G||0,M.from.line!=null?$o(this,M):Oa(this,M.from,M.to,M.margin)}),setSize:vi(function(M,G){var Z=this,se=function(ge){return typeof ge=="number"||/^\d+$/.test(String(ge))?ge+"px":ge};M!=null&&(this.display.wrapper.style.width=se(M)),G!=null&&(this.display.wrapper.style.height=se(G)),this.options.lineWrapping&&wr(this);var me=this.display.viewFrom;this.doc.iter(me,this.display.viewTo,function(ge){if(ge.widgets){for(var we=0;we<ge.widgets.length;we++)if(ge.widgets[we].noHScroll){Pn(Z,me,"widget");break}}++me}),this.curOp.forceUpdate=!0,Ve(this,"refresh",this)}),operation:function(M){return Oi(this,M)},startOperation:function(){return oa(this)},endOperation:function(){return ha(this)},refresh:vi(function(){var M=this.display.cachedTextHeight;bn(this),this.curOp.forceUpdate=!0,Or(this),ba(this,this.doc.scrollLeft,this.doc.scrollTop),Ba(this.display),(M==null||Math.abs(M-Wn(this.display))>.5||this.options.lineWrapping)&&Ci(this),Ve(this,"refresh",this)}),swapDoc:vi(function(M){var G=this.doc;return G.cm=null,this.state.selectingText&&this.state.selectingText(),vs(this,M),Or(this),this.display.input.reset(),ba(this,M.scrollLeft,M.scrollTop),this.curOp.forceScroll=!0,Ir(this,"swapDoc",this,G),G}),phrase:function(M){var G=this.options.phrases;return G&&Object.prototype.hasOwnProperty.call(G,M)?G[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}},Me(t),t.registerHelper=function(M,G,Z){j.hasOwnProperty(M)||(j[M]=t[M]={_global:[]}),j[M][G]=Z},t.registerGlobalHelper=function(M,G,Z,se){t.registerHelper(M,G,se),j[M]._global.push({pred:Z,val:se})}}function fs(t,a,j,M,G){var Z=a,se=j,me=wt(t,a.line),ge=G&&t.direction=="rtl"?-j:j;function we(){var Vt=a.line+ge;return Vt<t.first||Vt>=t.first+t.size?!1:(a=new vt(Vt,a.ch,a.sticky),me=wt(t,Vt))}function We(Vt){var Ft;if(M=="codepoint"){var Jt=me.text.charCodeAt(a.ch+(M>0?0:-1));isNaN(Jt)?Ft=null:Ft=new vt(a.line,Math.max(0,Math.min(me.text.length,a.ch+j*(Jt>=55296&&Jt<56320?2:1))),-j)}else G?Ft=Pl(t.cm,me,a,j):Ft=os(me,a,j);if(Ft==null)if(!Vt&&we())a=ss(G,t.cm,me,a.line,ge);else return!1;else a=Ft;return!0}if(M=="char"||M=="codepoint")We();else if(M=="column")We(!0);else if(M=="word"||M=="group")for(var Xe=null,ut=M=="group",st=t.cm&&t.cm.getHelper(a,"wordChars"),mt=!0;!(j<0&&!We(!mt));mt=!1){var xt=me.text.charAt(a.ch)||`
`,Lt=$(xt,st)?"w":ut&&xt==`
`?"n":!ut||/\s/.test(xt)?null:"p";if(ut&&!mt&&!Lt&&(Lt="s"),Xe&&Xe!=Lt){j<0&&(j=1,We(),a.sticky="after");break}if(Lt&&(Xe=Lt),j>0&&!We(!mt))break}var jt=Fo(t,a,Z,se,!0);return Zr(Z,jt)&&(jt.hitSide=!0),jt}function hl(t,a,j,M){var G=t.doc,Z=a.left,se;if(M=="page"){var me=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ge=Math.max(me-.5*Wn(t.display),3);se=(j>0?a.bottom:a.top)+j*ge}else M=="line"&&(se=j>0?a.bottom+3:a.top-3);for(var we;!(we=Wr(t,Z,se),!we.outside);){if(j<0?se<=0:se>=G.height){we.hitSide=!0;break}se+=j*5}return we}var _n=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Q,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};_n.prototype.init=function(t){var a=this,j=this,M=j.cm,G=j.div=t.lineDiv;cl(G,M.options.spellcheck,M.options.autocorrect,M.options.autocapitalize);function Z(me){for(var ge=me.target;ge;ge=ge.parentNode){if(ge==G)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ge.className))break}return!1}De(G,"paste",function(me){if(!Z(me)||Qe(M,me)||sl(me,M))return;_<=11&&setTimeout(zn(M,function(){return a.updateFromDOM()}),20)}),De(G,"compositionstart",function(me){a.composing={data:me.data,done:!1}}),De(G,"compositionupdate",function(me){a.composing||(a.composing={data:me.data,done:!1})}),De(G,"compositionend",function(me){a.composing&&(me.data!=a.composing.data&&a.readFromDOMSoon(),a.composing.done=!0)}),De(G,"touchstart",function(){return j.forceCompositionEnd()}),De(G,"input",function(){a.composing||a.readFromDOMSoon()});function se(me){if(!Z(me)||Qe(M,me))return;if(M.somethingSelected())Ko({lineWise:!1,text:M.getSelections()}),me.type=="cut"&&M.replaceSelection("",null,"cut");else if(M.options.lineWiseCopyCut){var ge=ul(M);Ko({lineWise:!0,text:ge.text}),me.type=="cut"&&M.operation(function(){M.setSelections(ge.ranges,0,be),M.replaceSelection("",null,"cut")})}else return;if(me.clipboardData){me.clipboardData.clearData();var we=ea.text.join(`
`);if(me.clipboardData.setData("Text",we),me.clipboardData.getData("Text")==we){me.preventDefault();return}}var We=dl(),Xe=We.firstChild;M.display.lineSpace.insertBefore(We,M.display.lineSpace.firstChild),Xe.value=ea.text.join(`
`);var ut=document.activeElement;B(Xe),setTimeout(function(){M.display.lineSpace.removeChild(We),ut.focus(),ut==G&&j.showPrimarySelection()},50)}De(G,"copy",se),De(G,"cut",se)},_n.prototype.screenReaderLabelChanged=function(t){t?this.div.setAttribute("aria-label",t):this.div.removeAttribute("aria-label")},_n.prototype.prepareSelection=function(){var t=Ji(this.cm,!1);return t.focus=document.activeElement==this.div,t},_n.prototype.showSelection=function(t,a){if(!t||!this.cm.display.view.length)return;(t.focus||a)&&this.showPrimarySelection(),this.showMultipleSelections(t)},_n.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},_n.prototype.showPrimarySelection=function(){var t=this.getSelection(),a=this.cm,j=a.doc.sel.primary(),M=j.from(),G=j.to();if(a.display.viewTo==a.display.viewFrom||M.line>=a.display.viewTo||G.line<a.display.viewFrom){t.removeAllRanges();return}var Z=zo(a,t.anchorNode,t.anchorOffset),se=zo(a,t.focusNode,t.focusOffset);if(Z&&!Z.bad&&se&&!se.bad&&Ht(Cn(Z,se),M)==0&&Ht(kn(Z,se),G)==0)return;var me=a.display.view,ge=M.line>=a.display.viewFrom&&fl(a,M)||{node:me[0].measure.map[2],offset:0},we=G.line<a.display.viewTo&&fl(a,G);if(!we){var We=me[me.length-1].measure,Xe=We.maps?We.maps[We.maps.length-1]:We.map;we={node:Xe[Xe.length-1],offset:Xe[Xe.length-2]-Xe[Xe.length-3]}}if(!ge||!we){t.removeAllRanges();return}var ut=t.rangeCount&&t.getRangeAt(0),st;try{st=P(ge.node,ge.offset,we.offset,we.node)}catch(mt){}st&&(!S&&a.state.focused?(t.collapse(ge.node,ge.offset),st.collapsed||(t.removeAllRanges(),t.addRange(st))):(t.removeAllRanges(),t.addRange(st)),ut&&t.anchorNode==null?t.addRange(ut):S&&this.startGracePeriod()),this.rememberSelection()},_n.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)},_n.prototype.showMultipleSelections=function(t){w(this.cm.display.cursorDiv,t.cursors),w(this.cm.display.selectionDiv,t.selection)},_n.prototype.rememberSelection=function(){var t=this.getSelection();this.lastAnchorNode=t.anchorNode,this.lastAnchorOffset=t.anchorOffset,this.lastFocusNode=t.focusNode,this.lastFocusOffset=t.focusOffset},_n.prototype.selectionInEditor=function(){var t=this.getSelection();if(!t.rangeCount)return!1;var a=t.getRangeAt(0).commonAncestorContainer;return A(this.div,a)},_n.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},_n.prototype.blur=function(){this.div.blur()},_n.prototype.getField=function(){return this.div},_n.prototype.supportsTouch=function(){return!0},_n.prototype.receivedFocus=function(){var t=this;this.selectionInEditor()?this.pollSelection():Oi(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)},_n.prototype.selectionChanged=function(){var t=this.getSelection();return t.anchorNode!=this.lastAnchorNode||t.anchorOffset!=this.lastAnchorOffset||t.focusNode!=this.lastFocusNode||t.focusOffset!=this.lastFocusOffset},_n.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&&Oi(a,function(){wi(a.doc,Zi(j,M),be),(j.bad||M.bad)&&(a.curOp.selectionChanged=!0)})},_n.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(),G=j.to();if(M.ch==0&&M.line>t.firstLine()&&(M=vt(M.line-1,wt(t.doc,M.line-1).length)),G.ch==wt(t.doc,G.line).text.length&&G.line<t.lastLine()&&(G=vt(G.line+1,0)),M.line<a.viewFrom||G.line>a.viewTo-1)return!1;var Z,se,me;M.line==a.viewFrom||(Z=Tn(t,M.line))==0?(se=Nt(a.view[0].line),me=a.view[0].node):(se=Nt(a.view[Z].line),me=a.view[Z-1].node.nextSibling);var ge=Tn(t,G.line),we,We;if(ge==a.view.length-1?(we=a.viewTo-1,We=a.lineDiv.lastChild):(we=Nt(a.view[ge+1].line)-1,We=a.view[ge+1].node.previousSibling),!me)return!1;for(var Xe=t.doc.splitLines(ru(t,me,We,se,we)),ut=Er(t.doc,vt(se,0),vt(we,wt(t.doc,we).text.length));Xe.length>1&&ut.length>1;)if(ie(Xe)==ie(ut))Xe.pop(),ut.pop(),we--;else if(Xe[0]==ut[0])Xe.shift(),ut.shift(),se++;else break;for(var st=0,mt=0,xt=Xe[0],Lt=ut[0],jt=Math.min(xt.length,Lt.length);st<jt&&xt.charCodeAt(st)==Lt.charCodeAt(st);)++st;for(var Vt=ie(Xe),Ft=ie(ut),Jt=Math.min(Vt.length-(Xe.length==1?st:0),Ft.length-(ut.length==1?st:0));mt<Jt&&Vt.charCodeAt(Vt.length-mt-1)==Ft.charCodeAt(Ft.length-mt-1);)++mt;if(Xe.length==1&&ut.length==1&&se==M.line)for(;st&&st>M.ch&&Vt.charCodeAt(Vt.length-mt-1)==Ft.charCodeAt(Ft.length-mt-1);)st--,mt++;Xe[Xe.length-1]=Vt.slice(0,Vt.length-mt).replace(/^\u200b+/,""),Xe[0]=Xe[0].slice(st).replace(/\u200b+$/,"");var fr=vt(se,st),or=vt(we,ut.length?ie(ut).length-mt:0);if(Xe.length>1||Xe[0]||Ht(fr,or))return Va(t.doc,Xe,fr,or,"+input"),!0},_n.prototype.ensurePolled=function(){this.forceCompositionEnd()},_n.prototype.reset=function(){this.forceCompositionEnd()},_n.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},_n.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)},_n.prototype.updateFromDOM=function(){var t=this;(this.cm.isReadOnly()||!this.pollContent())&&Oi(this.cm,function(){return bn(t.cm)})},_n.prototype.setUneditable=function(t){t.contentEditable="false"},_n.prototype.onKeyPress=function(t){if(t.charCode==0||this.composing)return;t.preventDefault(),this.cm.isReadOnly()||zn(this.cm,hs)(this.cm,String.fromCharCode(t.charCode==null?t.keyCode:t.charCode),0)},_n.prototype.readOnlyChanged=function(t){this.div.contentEditable=String(t!="nocursor")},_n.prototype.onContextMenu=function(){},_n.prototype.resetPosition=function(){},_n.prototype.needsContentAttribute=!0;function fl(t,a){var j=Je(t,a.line);if(!j||j.hidden)return null;var M=wt(t.doc,a.line),G=Te(j,M,a.line),Z=at(M,t.doc.direction),se="left";if(Z){var me=et(Z,a.ch);se=me%2?"right":"left"}var ge=St(G.map,a.ch,se);return ge.offset=ge.collapse=="right"?ge.end:ge.start,ge}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,G){var Z="",se=!1,me=t.doc.lineSeparator(),ge=!1;function we(st){return function(mt){return mt.id==st}}function We(){se&&(Z+=me,ge&&(Z+=me),se=ge=!1)}function Xe(st){st&&(We(),Z+=st)}function ut(st){if(st.nodeType==1){var mt=st.getAttribute("cm-text");if(mt){Xe(mt);return}var xt=st.getAttribute("cm-marker"),Lt;if(xt){var jt=t.findMarks(vt(M,0),vt(G+1,0),we(+xt));jt.length&&(Lt=jt[0].find(0))&&Xe(Er(t.doc,Lt.from,Lt.to).join(me));return}if(st.getAttribute("contenteditable")=="false")return;var Vt=/^(pre|div|p|li|table|br)$/i.test(st.nodeName);if(!/^br$/i.test(st.nodeName)&&st.textContent.length==0)return;Vt&&We();for(var Ft=0;Ft<st.childNodes.length;Ft++)ut(st.childNodes[Ft]);/^(pre|p)$/i.test(st.nodeName)&&(ge=!0),Vt&&(se=!0)}else st.nodeType==3&&Xe(st.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(ut(a),a==j);)a=a.nextSibling,ge=!1;return Z}function zo(t,a,j){var M;if(a==t.display.lineDiv){if(M=t.display.lineDiv.childNodes[j],!M)return Qa(t.clipPos(vt(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 G=0;G<t.display.view.length;G++){var Z=t.display.view[G];if(Z.node==M)return nu(Z,a,j)}}function nu(t,a,j){var M=t.text.firstChild,G=!1;if(!a||!A(M,a))return Qa(vt(Nt(t.line),0),!0);if(a==M&&(G=!0,a=M.childNodes[j],j=0,!a)){var Z=t.rest?ie(t.rest):t.line;return Qa(vt(Nt(Z),Z.text.length),G)}var se=a.nodeType==3?a:null,me=a;for(!se&&a.childNodes.length==1&&a.firstChild.nodeType==3&&(se=a.firstChild,j&&(j=se.nodeValue.length));me.parentNode!=M;)me=me.parentNode;var ge=t.measure,we=ge.maps;function We(Lt,jt,Vt){for(var Ft=-1;Ft<(we?we.length:0);Ft++)for(var Jt=Ft<0?ge.map:we[Ft],fr=0;fr<Jt.length;fr+=3){var or=Jt[fr+2];if(or==Lt||or==jt){var Nr=Nt(Ft<0?t.line:t.rest[Ft]),Sn=Jt[fr]+Vt;return(Vt<0||or!=Lt)&&(Sn=Jt[fr+(Vt?1:0)]),vt(Nr,Sn)}}}var Xe=We(se,me,j);if(Xe)return Qa(Xe,G);for(var ut=me.nextSibling,st=se?se.nodeValue.length-j:0;ut;ut=ut.nextSibling){if(Xe=We(ut,ut.firstChild,0),Xe)return Qa(vt(Xe.line,Xe.ch-st),G);st+=ut.textContent.length}for(var mt=me.previousSibling,xt=j;mt;mt=mt.previousSibling){if(Xe=We(mt,mt.firstChild,-1),Xe)return Qa(vt(Xe.line,Xe.ch+xt),G);xt+=mt.textContent.length}}var Xn=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new Q,this.hasSelection=!1,this.composing=null};Xn.prototype.init=function(t){var a=this,j=this,M=this.cm;this.createField(t);var G=this.textarea;t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),h&&(G.style.width="0px"),De(G,"input",function(){C&&_>=9&&a.hasSelection&&(a.hasSelection=null),j.poll()}),De(G,"paste",function(se){if(Qe(M,se)||sl(se,M))return;M.state.pasteIncoming=+new Date,j.fastPoll()});function Z(se){if(Qe(M,se))return;if(M.somethingSelected())Ko({lineWise:!1,text:M.getSelections()});else if(M.options.lineWiseCopyCut){var me=ul(M);Ko({lineWise:!0,text:me.text}),se.type=="cut"?M.setSelections(me.ranges,null,be):(j.prevInput="",G.value=me.text.join(`
`),B(G))}else return;se.type=="cut"&&(M.state.cutIncoming=+new Date)}De(G,"cut",Z),De(G,"copy",Z),De(t.scroller,"paste",function(se){if(Jn(t,se)||Qe(M,se))return;if(!G.dispatchEvent){M.state.pasteIncoming=+new Date,j.focus();return}var me=new Event("paste");me.clipboardData=se.clipboardData,G.dispatchEvent(me)}),De(t.lineSpace,"selectstart",function(se){Jn(t,se)||Ee(se)}),De(G,"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"})}}),De(G,"compositionend",function(){j.composing&&(j.poll(),j.composing.range.clear(),j.composing=null)})},Xn.prototype.createField=function(t){this.wrapper=dl(),this.textarea=this.wrapper.firstChild},Xn.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},Xn.prototype.prepareSelection=function(){var t=this.cm,a=t.display,j=t.doc,M=Ji(t);if(t.options.moveInputWithCursor){var G=Br(t,j.sel.primary().head,"div"),Z=a.wrapper.getBoundingClientRect(),se=a.lineDiv.getBoundingClientRect();M.teTop=Math.max(0,Math.min(a.wrapper.clientHeight-10,G.top+se.top-Z.top)),M.teLeft=Math.max(0,Math.min(a.wrapper.clientWidth-10,G.left+se.left-Z.left))}return M},Xn.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")},Xn.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))},Xn.prototype.getField=function(){return this.textarea},Xn.prototype.supportsTouch=function(){return!1},Xn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!u||z()!=this.textarea))try{this.textarea.focus()}catch(t){}},Xn.prototype.blur=function(){this.textarea.blur()},Xn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Xn.prototype.receivedFocus=function(){this.slowPoll()},Xn.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()})},Xn.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)},Xn.prototype.poll=function(){var t=this,a=this.cm,j=this.textarea,M=this.prevInput;if(this.contextMenuPending||!a.state.focused||bt(j)&&!M&&!this.composing||a.isReadOnly()||a.options.disableInput||a.state.keySeq)return!1;var G=j.value;if(G==M&&!a.somethingSelected())return!1;if(C&&_>=9&&this.hasSelection===G||s&&/[\uf700-\uf7ff]/.test(G))return a.display.input.reset(),!1;if(a.doc.sel==a.display.selForContextMenu){var Z=G.charCodeAt(0);if(Z==8203&&!M&&(M="\u200B"),Z==8666)return this.reset(),this.cm.execCommand("undo")}for(var se=0,me=Math.min(M.length,G.length);se<me&&M.charCodeAt(se)==G.charCodeAt(se);)++se;return Oi(a,function(){hs(a,G.slice(se),M.length-se,null,t.composing?"*compose":null),G.length>1e3||G.indexOf(`
`)>-1?j.value=t.prevInput="":t.prevInput=G,t.composing&&(t.composing.range.clear(),t.composing.range=a.markText(t.composing.start,a.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Xn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Xn.prototype.onKeyPress=function(){C&&_>=9&&(this.hasSelection=null),this.fastPoll()},Xn.prototype.onContextMenu=function(t){var a=this,j=a.cm,M=j.display,G=a.textarea;a.contextMenuPending&&a.contextMenuPending();var Z=ni(j,t),se=M.scroller.scrollTop;if(!Z||c)return;var me=j.options.resetSelectionOnContextMenu;me&&j.doc.sel.contains(Z)==-1&&zn(j,wi)(j.doc,Zi(Z),be);var ge=G.style.cssText,we=a.wrapper.style.cssText,We=a.wrapper.offsetParent.getBoundingClientRect();a.wrapper.style.cssText="position: static",G.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(t.clientY-We.top-5)+"px; left: "+(t.clientX-We.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 Xe;e&&(Xe=window.scrollY),M.input.focus(),e&&window.scrollTo(null,Xe),M.input.reset(),j.somethingSelected()||(G.value=a.prevInput=" "),a.contextMenuPending=st,M.selForContextMenu=j.doc.sel,clearTimeout(M.detectingSelectAll);function ut(){if(G.selectionStart!=null){var xt=j.somethingSelected(),Lt="\u200B"+(xt?G.value:"");G.value="\u21DA",G.value=Lt,a.prevInput=xt?"":"\u200B",G.selectionStart=1,G.selectionEnd=Lt.length,M.selForContextMenu=j.doc.sel}}function st(){if(a.contextMenuPending!=st)return;if(a.contextMenuPending=!1,a.wrapper.style.cssText=we,G.style.cssText=ge,C&&_<9&&M.scrollbars.setScrollTop(M.scroller.scrollTop=se),G.selectionStart!=null){(!C||C&&_<9)&&ut();var xt=0,Lt=function(){M.selForContextMenu==j.doc.sel&&G.selectionStart==0&&G.selectionEnd>0&&a.prevInput=="\u200B"?zn(j,Is)(j):xt++<10?M.detectingSelectAll=setTimeout(Lt,500):(M.selForContextMenu=null,M.input.reset())};M.detectingSelectAll=setTimeout(Lt,200)}}if(C&&_>=9&&ut(),L){Ne(t);var mt=function(){lt(window,"mouseup",mt),setTimeout(st,20)};De(window,"mouseup",mt)}else setTimeout(st,50)},Xn.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled=t=="nocursor",this.textarea.readOnly=!!t},Xn.prototype.setUneditable=function(){},Xn.prototype.needsContentAttribute=!1;function iu(t,a){if(a=a?D(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=z();a.autofocus=j==t||t.getAttribute("autofocus")!=null&&j==document.body}function M(){t.value=me.getValue()}var G;if(t.form&&(De(t.form,"submit",M),!a.leaveSubmitMethodAlone)){var Z=t.form;G=Z.submit;try{var se=Z.submit=function(){M(),Z.submit=G,Z.submit(),Z.submit=se}}catch(ge){}}a.finishInit=function(ge){ge.save=M,ge.getTextArea=function(){return t},ge.toTextArea=function(){ge.toTextArea=isNaN,M(),t.parentNode.removeChild(ge.getWrapperElement()),t.style.display="",t.form&&(lt(t.form,"submit",M),!a.leaveSubmitMethodAlone&&typeof t.form.submit=="function"&&(t.form.submit=G))}},t.style.display="none";var me=Nn(function(ge){return t.parentNode.insertBefore(ge,t.nextSibling)},a);return me}function au(t){t.off=lt,t.on=De,t.wheelEventPixels=so,t.Doc=ki,t.splitLines=At,t.countColumn=W,t.findColumn=Se,t.isWordChar=q,t.Pass=ye,t.signal=Ve,t.Line=di,t.changeEnd=qi,t.scrollbarModel=io,t.Pos=vt,t.cmpPos=Ht,t.modes=sr,t.mimeModes=Kt,t.resolveMode=_t,t.getMode=Mt,t.modeExtensions=Rt,t.extendMode=Ot,t.copyState=qt,t.startState=Et,t.innerMode=Jr,t.commands=_o,t.keyMap=ma,t.keyName=Vs,t.isModifierKey=Ks,t.lookupKey=Ya,t.normalizeKeyMap=Ml,t.StringStream=It,t.SharedTextMarker=vo,t.TextMarker=Ta,t.LineWidget=go,t.e_preventDefault=Ee,t.e_stopPropagation=Oe,t.e_stop=Ne,t.addClass=K,t.contains=A,t.rmClass=v,t.keyNames=Sa}Jl(Nn),eu(Nn);var ou="iter insert remove copy getEditor constructor".split(" ");for(var Vo in ki.prototype)ki.prototype.hasOwnProperty(Vo)&&re(ou,Vo)<0&&(Nn.prototype[Vo]=function(t){return function(){return t.apply(this.doc,arguments)}}(ki.prototype[Vo]));return Me(ki),Nn.inputStyles={textarea:Xn,contenteditable:_n},Nn.defineMode=function(t){!Nn.defaults.mode&&t!="null"&&(Nn.defaults.mode=t),kt.apply(this,arguments)},Nn.defineMIME=ir,Nn.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),Nn.defineMIME("text/plain","null"),Nn.defineExtension=function(t,a){Nn.prototype[t]=a},Nn.defineDocExtension=function(t,a){ki.prototype[t]=a},Nn.fromTextArea=iu,au(Nn),Nn.version="5.58.2",Nn})},WYAk:function(H,J,I){(function(N,g){H.exports=J=g(I("Ib8C"))})(this,function(N){(function(){var g=N,S=g.lib,k=S.Base,y=g.enc,m=y.Utf8,C=g.algo,_=C.HMAC=k.extend({init:function(e,f){e=this._hasher=new e.init,typeof f=="string"&&(f=m.parse(f));var r=e.blockSize,c=r*4;f.sigBytes>c&&(f=e.finalize(f)),f.clamp();for(var i=this._oKey=f.clone(),n=this._iKey=f.clone(),o=i.words,h=n.words,d=0;d<r;d++)o[d]^=1549556828,h[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 f=this._hasher,r=f.finalize(e);f.reset();var c=f.finalize(this._oKey.clone().concat(r));return c}})})()})},WaYH:function(H,J,I){"use strict";var N=I("rePB"),g=I("Ff2n"),S=I("VTBJ"),k=I("1OyB"),y=I("vuIU"),m=I("JX7q"),C=I("Ji7U"),_=I("LK+K"),e=I("q1tI"),f=I("TSYQ"),r=I.n(f),c=I("sboe"),i=I("OZM5"),n=function(L){var R=L.prefixCls,v=L.level,x=L.isStart,w=L.isEnd;if(!v)return null;for(var T="".concat(R,"-indent-unit"),F=[],P=0;P<v;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)},o=n,h=I("815F"),d="open",u="close",s="---",l=function(p){Object(C.a)(R,p);var L=Object(_.a)(R);function R(){var v;return Object(k.a)(this,R),v=L.apply(this,arguments),v.state={dragNodeHighlight:!1},v.onSelectorClick=function(x){var w=v.props.context.onNodeClick;w(x,Object(h.b)(v.props)),v.isSelectable()?v.onSelect(x):v.onCheck(x)},v.onSelectorDoubleClick=function(x){var w=v.props.context.onNodeDoubleClick;w(x,Object(h.b)(v.props))},v.onSelect=function(x){if(v.isDisabled())return;var w=v.props.context.onNodeSelect;x.preventDefault(),w(x,Object(h.b)(v.props))},v.onCheck=function(x){if(v.isDisabled())return;var w=v.props,T=w.disableCheckbox,F=w.checked,P=v.props.context.onNodeCheck;if(!v.isCheckable()||T)return;x.preventDefault();var A=!F;P(x,Object(h.b)(v.props),A)},v.onMouseEnter=function(x){var w=v.props.context.onNodeMouseEnter;w(x,Object(h.b)(v.props))},v.onMouseLeave=function(x){var w=v.props.context.onNodeMouseLeave;w(x,Object(h.b)(v.props))},v.onContextMenu=function(x){var w=v.props.context.onNodeContextMenu;w(x,Object(h.b)(v.props))},v.onDragStart=function(x){var w=v.props.context.onNodeDragStart;x.stopPropagation(),v.setState({dragNodeHighlight:!0}),w(x,Object(m.a)(v));try{x.dataTransfer.setData("text/plain","")}catch(T){}},v.onDragEnter=function(x){var w=v.props.context.onNodeDragEnter;x.preventDefault(),x.stopPropagation(),w(x,Object(m.a)(v))},v.onDragOver=function(x){var w=v.props.context.onNodeDragOver;x.preventDefault(),x.stopPropagation(),w(x,Object(m.a)(v))},v.onDragLeave=function(x){var w=v.props.context.onNodeDragLeave;x.stopPropagation(),w(x,Object(m.a)(v))},v.onDragEnd=function(x){var w=v.props.context.onNodeDragEnd;x.stopPropagation(),v.setState({dragNodeHighlight:!1}),w(x,Object(m.a)(v))},v.onDrop=function(x){var w=v.props.context.onNodeDrop;x.preventDefault(),x.stopPropagation(),v.setState({dragNodeHighlight:!1}),w(x,Object(m.a)(v))},v.onExpand=function(x){var w=v.props.context.onNodeExpand;w(x,Object(h.b)(v.props))},v.setSelectHandle=function(x){v.selectHandle=x},v.getNodeState=function(){var x=v.props.expanded;return v.isLeaf()?null:x?d:u},v.hasChildren=function(){var x=v.props.eventKey,w=v.props.context.keyEntities,T=w[x]||{},F=T.children;return!!(F||[]).length},v.isLeaf=function(){var x=v.props,w=x.isLeaf,T=x.loaded,F=v.props.context.loadData,P=v.hasChildren();return w===!1?!1:w||!F&&!P||F&&T&&!P},v.isDisabled=function(){var x=v.props.disabled,w=v.props.context.disabled;return!!(w||x)},v.isCheckable=function(){var x=v.props.checkable,w=v.props.context.checkable;return!w||x===!1?!1:w},v.syncLoadData=function(x){var w=x.expanded,T=x.loading,F=x.loaded,P=v.props.context,A=P.loadData,z=P.onNodeLoad;if(T)return;A&&w&&!v.isLeaf()&&(!v.hasChildren()&&!F&&z(Object(h.b)(v.props)))},v.renderSwitcher=function(){var x=v.props,w=x.expanded,T=x.switcherIcon,F=v.props.context,P=F.prefixCls,A=F.switcherIcon,z=T||A;if(v.isLeaf())return e.createElement("span",{className:r()("".concat(P,"-switcher"),"".concat(P,"-switcher-noop"))},typeof z=="function"?z(Object(S.a)(Object(S.a)({},v.props),{},{isLeaf:!0})):z);var K=r()("".concat(P,"-switcher"),"".concat(P,"-switcher_").concat(w?d:u));return e.createElement("span",{onClick:v.onExpand,className:K},typeof z=="function"?z(Object(S.a)(Object(S.a)({},v.props),{},{isLeaf:!1})):z)},v.renderCheckbox=function(){var x=v.props,w=x.checked,T=x.halfChecked,F=x.disableCheckbox,P=v.props.context.prefixCls,A=v.isDisabled(),z=v.isCheckable();if(!z)return null;var K=typeof z!="boolean"?z: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:v.onCheck},K)},v.renderIcon=function(){var x=v.props.loading,w=v.props.context.prefixCls;return e.createElement("span",{className:r()("".concat(w,"-iconEle"),"".concat(w,"-icon__").concat(v.getNodeState()||"docu"),x&&"".concat(w,"-icon_loading"))})},v.renderSelector=function(){var x=v.state.dragNodeHighlight,w=v.props,T=w.title,F=w.selected,P=w.icon,A=w.loading,z=w.data,K=v.props.context,O=K.prefixCls,B=K.showIcon,U=K.icon,D=K.draggable,W=K.loadData,Q=K.titleRender,re=v.isDisabled(),ee="".concat(O,"-node-content-wrapper"),ye;if(B){var be=P||U;ye=be?e.createElement("span",{className:r()("".concat(O,"-iconEle"),"".concat(O,"-icon__customize"))},typeof be=="function"?be(v.props):be):v.renderIcon()}else W&&A&&(ye=v.renderIcon());var he;typeof T=="function"?he=T(z):Q?he=Q(z):he=T;var Ie=e.createElement("span",{className:"".concat(O,"-title")},he);return e.createElement("span",{ref:v.setSelectHandle,title:typeof T=="string"?T:"",className:r()("".concat(ee),"".concat(ee,"-").concat(v.getNodeState()||"normal"),!re&&(F||x)&&"".concat(O,"-node-selected"),!re&&D&&"draggable"),draggable:!re&&D||void 0,"aria-grabbed":!re&&D||void 0,onMouseEnter:v.onMouseEnter,onMouseLeave:v.onMouseLeave,onContextMenu:v.onContextMenu,onClick:v.onSelectorClick,onDoubleClick:v.onSelectorDoubleClick,onDragStart:D?v.onDragStart:void 0},ye,Ie)},v}return Object(y.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,z=w.dragOverGapTop,K=w.dragOverGapBottom,O=w.isLeaf,B=w.isStart,U=w.isEnd,D=w.expanded,W=w.selected,Q=w.checked,re=w.halfChecked,ee=w.loading,ye=w.domRef,be=w.active,he=w.onMouseMove,Ie=Object(g.a)(w,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),Se=this.props.context,fe=Se.prefixCls,ue=Se.filterTreeNode,ie=Se.draggable,Ce=Se.keyEntities,ne=this.isDisabled(),ce=Object(i.f)(Ie),Ae=Ce[T]||{},oe=Ae.level,q=U[U.length-1];return e.createElement("div",Object.assign({ref:ye,className:r()(F,"".concat(fe,"-treenode"),(x={},Object(N.a)(x,"".concat(fe,"-treenode-disabled"),ne),Object(N.a)(x,"".concat(fe,"-treenode-switcher-").concat(D?"open":"close"),!O),Object(N.a)(x,"".concat(fe,"-treenode-checkbox-checked"),Q),Object(N.a)(x,"".concat(fe,"-treenode-checkbox-indeterminate"),re),Object(N.a)(x,"".concat(fe,"-treenode-selected"),W),Object(N.a)(x,"".concat(fe,"-treenode-loading"),ee),Object(N.a)(x,"".concat(fe,"-treenode-active"),be),Object(N.a)(x,"".concat(fe,"-treenode-leaf-last"),q),Object(N.a)(x,"drag-over",!ne&&A),Object(N.a)(x,"drag-over-gap-top",!ne&&z),Object(N.a)(x,"drag-over-gap-bottom",!ne&&K),Object(N.a)(x,"filter-node",ue&&ue(Object(h.b)(this.props))),x)),style:P,onDragEnter:ie?this.onDragEnter:void 0,onDragOver:ie?this.onDragOver:void 0,onDragLeave:ie?this.onDragLeave:void 0,onDrop:ie?this.onDrop:void 0,onDragEnd:ie?this.onDragEnd:void 0,onMouseMove:he},ce),e.createElement(o,{prefixCls:fe,level:oe,isStart:B,isEnd:U}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),R}(e.Component),E=function(L){return e.createElement(c.a.Consumer,null,function(R){return e.createElement(l,Object.assign({},L,{context:R}))})};E.displayName="TreeNode",E.defaultProps={title:s},E.isTreeNode=1;var b=J.a=E},XIdC:function(H,J,I){"use strict";var N=I("rePB"),g=I("ODXe"),S=I("Ff2n"),k=I("q1tI"),y=I.n(k),m=I("TSYQ"),C=I.n(m),_=I("6cGi"),e=I("4IlW"),f=k.forwardRef(function(r,c){var i,n=r.prefixCls,o=n===void 0?"rc-switch":n,h=r.className,d=r.checked,u=r.defaultChecked,s=r.disabled,l=r.loadingIcon,E=r.checkedChildren,b=r.unCheckedChildren,p=r.onClick,L=r.onChange,R=r.onKeyDown,v=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 s||(U=O,F(U),L==null||L(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 z(O){var B=P(!T,O);p==null||p(B,O)}var K=C()(o,h,(i={},Object(N.a)(i,"".concat(o,"-checked"),T),Object(N.a)(i,"".concat(o,"-disabled"),s),i));return k.createElement("button",Object.assign({},v,{type:"button",role:"switch","aria-checked":T,disabled:s,className:K,ref:c,onKeyDown:A,onClick:z}),l,k.createElement("span",{className:"".concat(o,"-inner")},T?E:b))});f.displayName="Switch",J.a=f},Y1PL:function(H,J,I){"use strict";I.r(J),I.d(J,"ResizableTextArea",function(){return re});var N=I("wx14"),g=I("1OyB"),S=I("vuIU"),k=I("Ji7U"),y=I("LK+K"),m=I("q1tI"),C=I("VTBJ"),_=I("rePB"),e=I("Zm9Q"),f=I("Kwbf"),r=I("c+Xe"),c=I("m+aA"),i=I("bdgK"),n=new Map;function o(be){be.forEach(function(he){var Ie,Se=he.target;(Ie=n.get(Se))===null||Ie===void 0||Ie.forEach(function(fe){return fe(Se)})})}var h=new i.default(o),d=null,u=null;function s(be,he){n.has(be)||(n.set(be,new Set),h.observe(be)),n.get(be).add(he)}function l(be,he){n.has(be)&&(n.get(be).delete(he),n.get(be).size||(h.unobserve(be),n.delete(be)))}var E=function(be){Object(k.a)(Ie,be);var he=Object(y.a)(Ie);function Ie(){return Object(g.a)(this,Ie),he.apply(this,arguments)}return Object(S.a)(Ie,[{key:"render",value:function(){return this.props.children}}]),Ie}(m.Component),b=m.createContext(null);function p(be){var he=be.children,Ie=be.onBatchResize,Se=m.useRef(0),fe=m.useRef([]),ue=m.useContext(b),ie=m.useCallback(function(Ce,ne,ce){Se.current+=1;var Ae=Se.current;fe.current.push({size:Ce,element:ne,data:ce}),Promise.resolve().then(function(){Ae===Se.current&&(Ie==null||Ie(fe.current),fe.current=[])}),ue==null||ue(Ce,ne,ce)},[Ie,ue]);return m.createElement(b.Provider,{value:ie},he)}function L(be){var he=be.children,Ie=be.disabled,Se=m.useRef(null),fe=m.useRef(null),ue=m.useContext(b),ie=m.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Ce=m.isValidElement(he)&&Object(r.c)(he),ne=Ce?he.ref:null,ce=m.useMemo(function(){return Object(r.a)(ne,Se)},[ne,Se]),Ae=m.useRef(be);Ae.current=be;var oe=m.useCallback(function(q){var $=Ae.current,X=$.onResize,de=$.data,pe=q.getBoundingClientRect(),xe=pe.width,Ke=pe.height,qe=q.offsetWidth,tt=q.offsetHeight,et=Math.floor(xe),it=Math.floor(Ke);if(ie.current.width!==et||ie.current.height!==it||ie.current.offsetWidth!==qe||ie.current.offsetHeight!==tt){var at={width:et,height:it,offsetWidth:qe,offsetHeight:tt};ie.current=at;var je=qe===Math.round(xe)?xe:qe,De=tt===Math.round(Ke)?Ke:tt,nt=Object(C.a)(Object(C.a)({},at),{},{offsetWidth:je,offsetHeight:De});ue==null||ue(nt,q,de),X&&Promise.resolve().then(function(){X(nt,q)})}},[]);return m.useEffect(function(){var q=Object(c.a)(Se.current)||Object(c.a)(fe.current);return q&&!Ie&&s(q,oe),function(){return l(q,oe)}},[Se.current,Ie]),m.createElement(E,{ref:fe},Ce?m.cloneElement(he,{ref:ce}):he)}var R="rc-observer-key";function v(be){var he=be.children,Ie=Object(e.a)(he);return Ie.map(function(Se,fe){var ue=(Se==null?void 0:Se.key)||"".concat(R,"-").concat(fe);return m.createElement(L,Object(N.a)({},be,{key:ue}),Se)})}v.Collection=p;var x=v,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"],z={},K;function O(be){var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ie=be.getAttribute("id")||be.getAttribute("data-reactid")||be.getAttribute("name");if(he&&z[Ie])return z[Ie];var Se=window.getComputedStyle(be),fe=Se.getPropertyValue("box-sizing")||Se.getPropertyValue("-moz-box-sizing")||Se.getPropertyValue("-webkit-box-sizing"),ue=parseFloat(Se.getPropertyValue("padding-bottom"))+parseFloat(Se.getPropertyValue("padding-top")),ie=parseFloat(Se.getPropertyValue("border-bottom-width"))+parseFloat(Se.getPropertyValue("border-top-width")),Ce=A.map(function(ce){return"".concat(ce,":").concat(Se.getPropertyValue(ce))}).join(";"),ne={sizingStyle:Ce,paddingSize:ue,borderSize:ie,boxSizing:fe};return he&&Ie&&(z[Ie]=ne),ne}function B(be){var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ie=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Se=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;K||(K=document.createElement("textarea"),K.setAttribute("tab-index","-1"),K.setAttribute("aria-hidden","true"),document.body.appendChild(K)),be.getAttribute("wrap")?K.setAttribute("wrap",be.getAttribute("wrap")):K.removeAttribute("wrap");var fe=O(be,he),ue=fe.paddingSize,ie=fe.borderSize,Ce=fe.boxSizing,ne=fe.sizingStyle;K.setAttribute("style","".concat(ne,";").concat(P)),K.value=be.value||be.placeholder||"";var ce=Number.MIN_SAFE_INTEGER,Ae=Number.MAX_SAFE_INTEGER,oe=K.scrollHeight,q;if(Ce==="border-box"?oe+=ie:Ce==="content-box"&&(oe-=ue),Ie!==null||Se!==null){K.value=" ";var $=K.scrollHeight-ue;Ie!==null&&(ce=$*Ie,Ce==="border-box"&&(ce=ce+ue+ie),oe=Math.max(ce,oe)),Se!==null&&(Ae=$*Se,Ce==="border-box"&&(Ae=Ae+ue+ie),q=oe>Ae?"":"hidden",oe=Math.min(Ae,oe))}return{height:oe,minHeight:ce,maxHeight:Ae,overflowY:q,resize:"none"}}var U=I("Gytx"),D=I.n(U),W;(function(be){be[be.NONE=0]="NONE",be[be.RESIZING=1]="RESIZING",be[be.RESIZED=2]="RESIZED"})(W||(W={}));var Q=function(be){Object(k.a)(Ie,be);var he=Object(y.a)(Ie);function Ie(Se){var fe;return Object(g.a)(this,Ie),fe=he.call(this,Se),fe.nextFrameActionId=void 0,fe.resizeFrameId=void 0,fe.textArea=void 0,fe.saveTextArea=function(ue){fe.textArea=ue},fe.handleResize=function(ue){var ie=fe.state.resizeStatus,Ce=fe.props,ne=Ce.autoSize,ce=Ce.onResize;if(ie!==W.NONE)return;typeof ce=="function"&&ce(ue),ne&&fe.resizeOnNextFrame()},fe.resizeOnNextFrame=function(){cancelAnimationFrame(fe.nextFrameActionId),fe.nextFrameActionId=requestAnimationFrame(fe.resizeTextarea)},fe.resizeTextarea=function(){var ue=fe.props.autoSize;if(!ue||!fe.textArea)return;var ie=ue.minRows,Ce=ue.maxRows,ne=B(fe.textArea,!1,ie,Ce);fe.setState({textareaStyles:ne,resizeStatus:W.RESIZING},function(){cancelAnimationFrame(fe.resizeFrameId),fe.resizeFrameId=requestAnimationFrame(function(){fe.setState({resizeStatus:W.RESIZED},function(){fe.resizeFrameId=requestAnimationFrame(function(){fe.setState({resizeStatus:W.NONE}),fe.fixFirefoxAutoScroll()})})})})},fe.renderTextArea=function(){var ue=fe.props,ie=ue.prefixCls,Ce=ie===void 0?"rc-textarea":ie,ne=ue.autoSize,ce=ue.onResize,Ae=ue.className,oe=ue.disabled,q=fe.state,$=q.textareaStyles,X=q.resizeStatus,de=Object(w.a)(fe.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),pe=F()(Ce,Ae,Object(_.a)({},"".concat(Ce,"-disabled"),oe));"value"in de&&(de.value=de.value||"");var xe=Object(C.a)(Object(C.a)(Object(C.a)({},fe.props.style),$),X===W.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return m.createElement(x,{onResize:fe.handleResize,disabled:!(ne||ce)},m.createElement("textarea",Object(N.a)({},de,{className:pe,style:xe,ref:fe.saveTextArea})))},fe.state={textareaStyles:{},resizeStatus:W.NONE},fe}return Object(S.a)(Ie,[{key:"componentDidUpdate",value:function(fe){(fe.value!==this.props.value||!D()(fe.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 fe=this.textArea.selectionStart,ue=this.textArea.selectionEnd;this.textArea.setSelectionRange(fe,ue)}}catch(ie){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Ie}(m.Component),re=Q,ee=function(be){Object(k.a)(Ie,be);var he=Object(y.a)(Ie);function Ie(Se){var fe;Object(g.a)(this,Ie),fe=he.call(this,Se),fe.resizableTextArea=void 0,fe.focus=function(){fe.resizableTextArea.textArea.focus()},fe.saveTextArea=function(ie){fe.resizableTextArea=ie},fe.handleChange=function(ie){var Ce=fe.props.onChange;fe.setValue(ie.target.value,function(){fe.resizableTextArea.resizeTextarea()}),Ce&&Ce(ie)},fe.handleKeyDown=function(ie){var Ce=fe.props,ne=Ce.onPressEnter,ce=Ce.onKeyDown;ie.keyCode===13&&ne&&ne(ie),ce&&ce(ie)};var ue=typeof Se.value=="undefined"||Se.value===null?Se.defaultValue:Se.value;return fe.state={value:ue},fe}return Object(S.a)(Ie,[{key:"setValue",value:function(fe,ue){"value"in this.props||this.setState({value:fe},ue)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return m.createElement(re,Object(N.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(fe){return"value"in fe?{value:fe.value}:null}}]),Ie}(m.Component),ye=J.default=ee},ZD9Y:function(H,J,I){"use strict";var N=I("BoS7"),g=I("Sdc0"),S=I("OaEy"),k=I("2fM7"),y=I("q1tI"),m=I.n(y),C=I("lOMy"),_=I.n(C),e=k.a.Option;J.a=function(f){var r=f.onFontSizeChange,c=f.cmFontSize,i=f.cmCodeMode,n=f.onCodeModeChange,o=f.onTabToSpace,h=f.className,d=h===void 0?"":h,u=f.tabToSpace,s=f.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:o}))),m.a.createElement("h3",null,"\u5FEB\u6377\u952E"),m.a.createElement("section",null,m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),m.a.createElement("span",null,"Ctrl + S")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),m.a.createElement("span",null,"F1 / Alt + F1")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),m.a.createElement("span",null,"Ctrl + ]/[")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),m.a.createElement("span",null,"Ctrl + Shift + \\")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),m.a.createElement("span",null,"Home")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),m.a.createElement("span",null,"End"))),s)}},ZW9T:function(H,J,I){"use strict";I.d(J,"a",function(){return U});var N=I("k1fw"),g=I("oBTY"),S=I("miYZ"),k=I("tsqr"),y=I("rAM+"),m=I("tJVT"),C=I("PpiC"),_=I("q1tI"),e=I.n(_),f=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"]},o={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},h={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"),s=I.n(u),l={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(W,Q){return Q.map(function(re){return{label:re,kind:W.languages.CompletionItemKind.Keyword,insertText:re}})},b=function(W){return Object.keys(l.tables).map(function(Q){return{label:Q,kind:W.languages.CompletionItemKind.Variable,insertText:Q}})},p=function(W,Q){var re=l.tables[W];return re?re.map(function(ee){return{label:ee,kind:Q.languages.CompletionItemKind.Field,insertText:ee}}):[]};function L(D,W,Q,re,ee){var ye=W.getWordUntilPosition(Q),be={startLineNumber:Q.lineNumber,endLineNumber:Q.lineNumber,startColumn:ye.startColumn,endColumn:ye.endColumn},he=re.map(function(Ie){return{label:Ie,kind:D.languages.CompletionItemKind.Keyword,insertText:Ie,insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:be}});return ee.map(function(Ie){he.push(Object(N.a)(Object(N.a)({},Ie),{},{range:be}))}),he}var R=function(D){l.languages.map(function(ee){return D.languages.registerDocumentFormattingEditProvider(ee,{provideDocumentFormattingEdits:function(be,he,Ie){return Object(r.a)(i.a.mark(function Se(){var fe;return i.a.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return fe=s()(be.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}),ie.abrupt("return",[{range:be.getFullModelRange(),text:fe}]);case 2:case"end":return ie.stop()}},Se)}))()}}),ee});var W=h.quickKey.map(function(ee){return{label:ee.label,kind:D.languages.CompletionItemKind.Method,insertText:ee.content,insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),Q=d.quickKey.map(function(ee){return{label:ee.label,kind:D.languages.CompletionItemKind.Method,insertText:ee.content,insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),re=o.quickKey.map(function(ee){return{label:ee.label,kind:D.languages.CompletionItemKind.Method,insertText:ee.content,insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet}});D.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(ye,be){var he=ye.getWordUntilPosition(be),Ie={startLineNumber:be.lineNumber,endLineNumber:be.lineNumber,startColumn:he.startColumn,endColumn:he.endColumn},Se=ye.getLineContent(be.lineNumber).substring(he.startColumn-2,he.endColumn);return{suggestions:[].concat(Object(g.a)(h.keywords.map(function(fe){return{label:fe,kind:D.languages.CompletionItemKind.Function,documentation:fe,insertText:fe,insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ie}})),Object(g.a)(h.quickKey.map(function(fe){return{label:fe.label,kind:D.languages.CompletionItemKind.Function,documentation:fe.content,insertText:Se.startsWith("#")?fe.content.replace(/#/,""):fe.content,insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ie}})))}}}),D.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(ye,be){var he=ye.getWordUntilPosition(be),Ie={startLineNumber:be.lineNumber,endLineNumber:be.lineNumber,startColumn:he.startColumn,endColumn:he.endColumn};return{suggestions:Object(g.a)(n.keywords.map(function(Se){return{label:Se,kind:D.languages.CompletionItemKind.Function,documentation:Se,insertText:Se,insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ie}}))}}}),D.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(ye,be){var he=ye.getWordUntilPosition(be),Ie={startLineNumber:be.lineNumber,endLineNumber:be.lineNumber,startColumn:he.startColumn,endColumn:he.endColumn},Se=ye.getLineContent(be.lineNumber).substring(he.startColumn-2,he.endColumn);return{suggestions:[].concat(Object(g.a)(o.keywords.map(function(fe){return{label:fe,kind:D.languages.CompletionItemKind.Function,documentation:fe,insertText:fe,insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ie}})),Object(g.a)(o.quickKey.map(function(fe){return{label:fe.label,kind:D.languages.CompletionItemKind.Function,documentation:fe.content,insertText:Se.startsWith("#")?fe.content.replace(/#/,""):fe.content,insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ie}})))}}}),D.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(ye,be){var he=ye.getWordUntilPosition(be),Ie={startLineNumber:be.lineNumber,endLineNumber:be.lineNumber,startColumn:he.startColumn,endColumn:he.endColumn},Se=ye.getLineContent(be.lineNumber).substring(he.startColumn-2,he.endColumn);return{suggestions:[].concat(Object(g.a)(d.keywords.map(function(fe){return{label:fe,kind:D.languages.CompletionItemKind.Function,documentation:fe,insertText:fe,insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ie}})),Object(g.a)(d.quickKey.map(function(fe){return{label:fe.label,kind:D.languages.CompletionItemKind.Function,documentation:fe.content,insertText:Se.startsWith("#")?fe.content.replace(/#/,""):fe.content,insertTextRules:D.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ie}})))}}})},v="\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(D){return/^\d+$/.test(D)?"".concat(D,"px"):D}function P(){}var A=!1,z={"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 K(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],W=D;if(Array.isArray(D)){for(var Q=0;Q<D.length;Q++){var re=z[D[Q]];if(re)return re}return W[0]}return z[W]||W}var O=null,B=J.b=function(D){var W=D.width,Q=W===void 0?"100%":W,re=D.height,ee=re===void 0?"100%":re,ye=D.value,be=D.language,he=be===void 0?"javascript":be,Ie=D.style,Se=Ie===void 0?{}:Ie,fe=D.options,ue=fe===void 0?{}:fe,ie=D.overrideServices,Ce=ie===void 0?{}:ie,ne=D.theme,ce=ne===void 0?"vs-dark":ne,Ae=D.onEditBlur,oe=D.onSave,q=D.autoHeight,$=q===void 0?!1:q,X=D.forbidCopy,de=X===void 0?!1:X,pe=D.onChange,xe=pe===void 0?P:pe,Ke=D.editorDidMount,qe=Ke===void 0?P:Ke,tt=D.onFocus,et=tt===void 0?P:tt,it=D.filename,at=it===void 0?"educoder.txt":it,je=D.errorLine,De=D.errorContent,nt=De===void 0?"":De,lt=Object(C.a)(D,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),Ve=Object(_.useRef)(),Qe=Object(_.useRef)({}),Fe=Object(_.useRef)(),Re=Object(_.useRef)(),Me=Object(_.useRef)(!1),Ee=Object(_.useRef)(),Oe=Object(_.useState)(!1),ke=Object(m.a)(Oe,2),Ne=ke[0],He=ke[1];function rt(){var Rt;return Ve.current&&(Rt=new f.default(function(Ot){var qt=Object(y.a)(Ot),Jr;try{for(qt.s();!(Jr=qt.n()).done;){var Et=Jr.value;(Et.target.offsetHeight>0||Et.target.offsetWidth>0)&&Qe.current.instance.layout()}}catch(It){qt.e(It)}finally{qt.f()}}),Rt.observe(Ve.current)),Rt}function ct(){k.b.warn(decodeURIComponent(v))}var yt=function(){var Ot=Qe.current.instance;if(ye!=null&&Ot&&Ne){var qt=Ot.getModel();qt&&ye!==qt.getValue()&&(A=!0,qt.setValue(ye),Ot.layout(),A=!1)}};Object(_.useEffect)(function(){Re.current&&clearTimeout(Re.current),Re.current=setTimeout(function(){yt()},500)},[ye,Ne,Qe.current]),Object(_.useEffect)(function(){if(je&&Qe.current&&Qe.current.instance){var Rt=Qe.current.instance;Rt.changeViewZones(function(qt){var Jr=document.createElement("div");Jr.style.padding="10px 20px",Jr.style.width="calc(100% - 20px)",Jr.className="my-error-line-wrp",Jr.innerHTML=nt,qt.addZone({afterLineNumber:je||11,heightInLines:3,domNode:Jr})});var Ot={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}};Rt.addOverlayWidget(Ot),Rt.revealPositionInCenter({lineNumber:20,column:1})}},[je,Qe.current,Ne]);function ht(){var Rt=Qe.current.instance;if(Rt){var Ot=Rt.getSelection(),qt=Qe.current.pastePos||{},Jr=new O.Range(qt.startLineNumber||Ot.endLineNumber,qt.startColumn||Ot.endColumn,qt.endLineNumber||Ot.endLineNumber,qt.endColumn||Ot.endColumn);setTimeout(function(){Rt.executeEdits("",[{range:Jr,text:""}])},300)}}function pt(Rt){(window.navigator.platform.match("Mac")?Rt.metaKey:Rt.ctrlKey)&&Rt.keyCode==83&&(Rt.preventDefault(),oe())}var Dt=function(){if($&&Qe.current.instance){var Ot=Qe.current.instance.getContentHeight();_t(Ot<ee?ee:Ot)}else _t(ee)};function At(Rt){var Ot=document.createEvent("MouseEvents");Ot.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Rt.dispatchEvent(Ot)}function bt(Rt,Ot){var qt=window.URL||window.webkitURL||window,Jr=new Blob([Ot]),Et=document.createElementNS("http://www.w3.org/1999/xhtml","a");Et.href=qt.createObjectURL(Jr),Et.download=Rt,At(Et)}Object(_.useEffect)(function(){Dt()},[Dt]),Object(_.useEffect)(function(){Ve.current&&!Ne&&Promise.all([I.e(16),I.e(28)]).then(I.t.bind(null,"M/lh",7)).then(function(Rt){try{O=Rt,Qe.current.instance=O.editor.create(Ve.current,{value:ye,language:K(he),theme:ce,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},Ce);var Ot=Qe.current.instance,qt=x.d._menuItems,Jr=Object(g.a)(qt).find(function(nr){return nr[0]._debugName=="EditorContext"}),Et=Jr[1],It=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],wt=function(Bt,Nt){var vr=Bt._first;do{var Qr,Cr,vt=Nt.includes((Qr=vr.element)===null||Qr===void 0||((Cr=Qr.command)===null||Cr===void 0)?void 0:Cr.id);vt&&Bt._remove(vr)}while(vr=vr.next)};if(qe(Ot,O),setTimeout(function(){Dt(),Qe.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){bt(at||"educoder.txt",Ot.getValue())}}),Ot.getDomNode().addEventListener("input",function(){Fe.current.autoFormat&&Ot.getAction("editor.action.formatDocument").run()})},500),Qe.current.subscription=Ot.onDidChangeModelContent(function(nr){Me.current?clearTimeout(Ee.current):(Dt(),xe(Ot.getValue(),nr)),Ee.current=setTimeout(function(){Me.current=!1},500)}),window.Monaco||R(O,K(he)),de&&(wt(Et,It),Ve.current.classList.add("noCopyPaste"),Ot.onKeyDown(function(nr){var Bt=nr.keyCode,Nt=nr.ctrlKey,vr=nr.metaKey;(Bt===33||Bt===52)&&(vr||Nt)&&(ct(),nr.preventDefault())})),window.Monaco=O,Ae&&Ot.onDidBlurEditorWidget(function(){Ae(Ot.getValue())}),et&&Ot.onDidFocusEditorText(function(){et(Ot.getValue())}),de){Ot.addCommand(O.KeyMod.CtrlCmd|O.KeyCode.KEY_V,function(){return ct(),null}),Ot.onDidPaste(function(nr){Qe.current.pastePos=nr});try{window.addEventListener("paste",ht)}catch(nr){}}var Er=rt();return He(!0),function(){var nr=Qe.current.instance;nr.dispose();var Bt=nr.getModel();Bt&&Bt.dispose(),Qe.current.subscription&&Qe.current.subscription.dispose(),de&&window.removeEventListener("paste",ht),Er.unobserve(Ve.current)}}catch(nr){}})},[]),Object(_.useEffect)(function(){var Rt=Qe.current.instance;if(Rt&&Ne)return document.addEventListener("keydown",pt,!1),function(){document.removeEventListener("keydown",pt)}},[oe,Ne]),Object(_.useEffect)(function(){var Rt=Qe.current.instance;if(Rt&&Ne){var Ot=K(he);O.editor.setModelLanguage(Rt.getModel(),Ot),console.log("language:",he,Rt.getModel(),Ot)}},[he,Ne]),Object(_.useEffect)(function(){var Rt=Qe.current.instance;Rt&&Ne&&O.editor.setTheme(ce)},[ce,Ne]),Object(_.useEffect)(function(){var Rt=Qe.current.instance;Fe.current=ue,Rt&&Ne&&(Rt.updateOptions(Object(N.a)({},ue)),setTimeout(function(){Rt.getModel().updateOptions(Object(N.a)({},ue))},200))},[JSON.stringify(ue),Ne]),Object(_.useEffect)(function(){var Rt=Qe.current.instance;Rt&&Ne&&Rt.layout()},[Q,ee,Ne]);var Xt=Object(_.useState)(F(Q)),Gt=Object(m.a)(Xt,2),rr=Gt[0],sr=Gt[1],Kt=Object(_.useState)(F(ee)),kt=Object(m.a)(Kt,2),ir=kt[0],_t=kt[1],Mt=Object(N.a)(Object(N.a)({},Se),{},{width:rr,height:ir});return e.a.createElement("div",{className:"my-monaco-editor",ref:Ve,style:Mt})};function U(D){var W=D.width,Q=W===void 0?"100%":W,re=D.height,ee=re===void 0?"100%":re,ye=D.original,be=D.modified,he=D.language,Ie=D.options,Se=Ie===void 0?{}:Ie,fe=Object(_.useRef)(),ue=Object(_.useState)(null),ie=Object(m.a)(ue,2),Ce=ie[0],ne=ie[1];function ce($){var X;return fe.current&&(X=new f.default(function(de){var pe=Object(y.a)(de),xe;try{for(pe.s();!(xe=pe.n()).done;){var Ke=xe.value;(Ke.target.offsetHeight>0||Ke.target.offsetWidth>0)&&$.layout()}}catch(qe){pe.e(qe)}finally{pe.f()}}),X.observe(fe.current)),X}Object(_.useEffect)(function(){fe.current&&Promise.all([I.e(16),I.e(28)]).then(I.t.bind(null,"M/lh",7)).then(function($){O=$;var X=O.editor.createDiffEditor(fe.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},Se),{},{wordWrap:!0}));ne(X);var de=ce(X);return function(){X.dispose();var pe=X.getModel();pe&&pe.dispose(),de.unobserve(fe.current)}})},[]),Object(_.useEffect)(function(){Ce&&Ce.setModel({original:O.editor.createModel(ye,he),modified:O.editor.createModel(be,he)})},[ye,be,he,Ce]);var Ae=F(Q),oe=F(ee),q={width:Ae,height:oe};return e.a.createElement("div",{className:"my-diff-editor",ref:fe,style:q})}},ZpRC:function(H,J,I){"use strict";function N(r){return typeof r=="object"&&r!=null&&r.nodeType===1}function g(r,c){return(!c||r!=="hidden")&&r!=="visible"&&r!=="clip"}function S(r,c){if(r.clientHeight<r.scrollHeight||r.clientWidth<r.scrollWidth){var i=getComputedStyle(r,null);return g(i.overflowY,c)||g(i.overflowX,c)||function(n){var o=function(h){if(!h.ownerDocument||!h.ownerDocument.defaultView)return null;try{return h.ownerDocument.defaultView.frameElement}catch(d){return null}}(n);return!!o&&(o.clientHeight<n.scrollHeight||o.clientWidth<n.scrollWidth)}(r)}return!1}function k(r,c,i,n,o,h,d,u){return h<r&&d>c||h>r&&d<c?0:h<=r&&u<=i||d>=c&&u>=i?h-r-n:d>c&&u<i||h<r&&u>i?d-c+o:0}var y=function(r,c){var i=window,n=c.scrollMode,o=c.block,h=c.inline,d=c.boundary,u=c.skipOverflowHiddenElements,s=typeof d=="function"?d:function($){return $!==d};if(!N(r))throw new TypeError("Invalid target");for(var l=document.scrollingElement||document.documentElement,E=[],b=r;N(b)&&s(b);){if((b=b.parentElement)===l){E.push(b);break}b!=null&&b===document.body&&S(b)&&!S(document.documentElement)||b!=null&&S(b,u)&&E.push(b)}for(var p=i.visualViewport?i.visualViewport.width:innerWidth,L=i.visualViewport?i.visualViewport.height:innerHeight,R=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,x=r.getBoundingClientRect(),w=x.height,T=x.width,F=x.top,P=x.right,A=x.bottom,z=x.left,K=o==="start"||o==="nearest"?F:o==="end"?A:F+w/2,O=h==="center"?z+T/2:h==="end"?P:z,B=[],U=0;U<E.length;U++){var D=E[U],W=D.getBoundingClientRect(),Q=W.height,re=W.width,ee=W.top,ye=W.right,be=W.bottom,he=W.left;if(n==="if-needed"&&F>=0&&z>=0&&A<=L&&P<=p&&F>=ee&&A<=be&&z>=he&&P<=ye)return B;var Ie=getComputedStyle(D),Se=parseInt(Ie.borderLeftWidth,10),fe=parseInt(Ie.borderTopWidth,10),ue=parseInt(Ie.borderRightWidth,10),ie=parseInt(Ie.borderBottomWidth,10),Ce=0,ne=0,ce="offsetWidth"in D?D.offsetWidth-D.clientWidth-Se-ue:0,Ae="offsetHeight"in D?D.offsetHeight-D.clientHeight-fe-ie:0;if(l===D)Ce=o==="start"?K:o==="end"?K-L:o==="nearest"?k(v,v+L,L,fe,ie,v+K,v+K+w,w):K-L/2,ne=h==="start"?O:h==="center"?O-p/2:h==="end"?O-p:k(R,R+p,p,Se,ue,R+O,R+O+T,T),Ce=Math.max(0,Ce+v),ne=Math.max(0,ne+R);else{Ce=o==="start"?K-ee-fe:o==="end"?K-be+ie+Ae:o==="nearest"?k(ee,be,Q,fe,ie+Ae,K,K+w,w):K-(ee+Q/2)+Ae/2,ne=h==="start"?O-he-Se:h==="center"?O-(he+re/2)+ce/2:h==="end"?O-ye+ue+ce:k(he,ye,re,Se,ue+ce,O,O+T,T);var oe=D.scrollLeft,q=D.scrollTop;K+=q-(Ce=Math.max(0,Math.min(q+Ce,D.scrollHeight-Q+Ae))),O+=oe-(ne=Math.max(0,Math.min(oe+ne,D.scrollWidth-re+ce)))}B.push({el:D,top:Ce,left:ne})}return B};function m(r){return r===Object(r)&&Object.keys(r).length!==0}function C(r,c){c===void 0&&(c="auto");var i="scrollBehavior"in document.body.style;r.forEach(function(n){var o=n.el,h=n.top,d=n.left;o.scroll&&i?o.scroll({top:h,left:d,behavior:c}):(o.scrollTop=h,o.scrollLeft=d)})}function _(r){return r===!1?{block:"end",inline:"nearest"}:m(r)?r:{block:"start",inline:"nearest"}}function e(r,c){var i=!r.ownerDocument.documentElement.contains(r);if(m(c)&&typeof c.behavior=="function")return c.behavior(i?[]:y(r,c));if(i)return;var n=_(c);return C(y(r,n),n.behavior)}var f=J.a=e},Zss7:function(H,J,I){var N;(function(g){var S=/^\s+/,k=/\s+$/,y=0,m=g.round,C=g.min,_=g.max,e=g.random;function f(ie,Ce){if(ie=ie||"",Ce=Ce||{},ie instanceof f)return ie;if(!(this instanceof f))return new f(ie,Ce);var ne=r(ie);this._originalInput=ie,this._r=ne.r,this._g=ne.g,this._b=ne.b,this._a=ne.a,this._roundA=m(100*this._a)/100,this._format=Ce.format||ne.format,this._gradientType=Ce.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=ne.ok,this._tc_id=y++}f.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 ie=this.toRgb();return(ie.r*299+ie.g*587+ie.b*114)/1e3},getLuminance:function(){var ie=this.toRgb(),Ce,ne,ce,Ae,oe,q;return Ce=ie.r/255,ne=ie.g/255,ce=ie.b/255,Ce<=.03928?Ae=Ce/12.92:Ae=g.pow((Ce+.055)/1.055,2.4),ne<=.03928?oe=ne/12.92:oe=g.pow((ne+.055)/1.055,2.4),ce<=.03928?q=ce/12.92:q=g.pow((ce+.055)/1.055,2.4),.2126*Ae+.7152*oe+.0722*q},setAlpha:function(ie){return this._a=B(ie),this._roundA=m(100*this._a)/100,this},toHsv:function(){var ie=o(this._r,this._g,this._b);return{h:ie.h*360,s:ie.s,v:ie.v,a:this._a}},toHsvString:function(){var ie=o(this._r,this._g,this._b),Ce=m(ie.h*360),ne=m(ie.s*100),ce=m(ie.v*100);return this._a==1?"hsv("+Ce+", "+ne+"%, "+ce+"%)":"hsva("+Ce+", "+ne+"%, "+ce+"%, "+this._roundA+")"},toHsl:function(){var ie=i(this._r,this._g,this._b);return{h:ie.h*360,s:ie.s,l:ie.l,a:this._a}},toHslString:function(){var ie=i(this._r,this._g,this._b),Ce=m(ie.h*360),ne=m(ie.s*100),ce=m(ie.l*100);return this._a==1?"hsl("+Ce+", "+ne+"%, "+ce+"%)":"hsla("+Ce+", "+ne+"%, "+ce+"%, "+this._roundA+")"},toHex:function(ie){return d(this._r,this._g,this._b,ie)},toHexString:function(ie){return"#"+this.toHex(ie)},toHex8:function(ie){return u(this._r,this._g,this._b,this._a,ie)},toHex8String:function(ie){return"#"+this.toHex8(ie)},toRgb:function(){return{r:m(this._r),g:m(this._g),b:m(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+m(this._r)+", "+m(this._g)+", "+m(this._b)+")":"rgba("+m(this._r)+", "+m(this._g)+", "+m(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:m(U(this._r,255)*100)+"%",g:m(U(this._g,255)*100)+"%",b:m(U(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+m(U(this._r,255)*100)+"%, "+m(U(this._g,255)*100)+"%, "+m(U(this._b,255)*100)+"%)":"rgba("+m(U(this._r,255)*100)+"%, "+m(U(this._g,255)*100)+"%, "+m(U(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:K[d(this._r,this._g,this._b,!0)]||!1},toFilter:function(ie){var Ce="#"+s(this._r,this._g,this._b,this._a),ne=Ce,ce=this._gradientType?"GradientType = 1, ":"";if(ie){var Ae=f(ie);ne="#"+s(Ae._r,Ae._g,Ae._b,Ae._a)}return"progid:DXImageTransform.Microsoft.gradient("+ce+"startColorstr="+Ce+",endColorstr="+ne+")"},toString:function(ie){var Ce=!!ie;ie=ie||this._format;var ne=!1,ce=this._a<1&&this._a>=0,Ae=!Ce&&ce&&(ie==="hex"||ie==="hex6"||ie==="hex3"||ie==="hex4"||ie==="hex8"||ie==="name");return Ae?ie==="name"&&this._a===0?this.toName():this.toRgbString():(ie==="rgb"&&(ne=this.toRgbString()),ie==="prgb"&&(ne=this.toPercentageRgbString()),(ie==="hex"||ie==="hex6")&&(ne=this.toHexString()),ie==="hex3"&&(ne=this.toHexString(!0)),ie==="hex4"&&(ne=this.toHex8String(!0)),ie==="hex8"&&(ne=this.toHex8String()),ie==="name"&&(ne=this.toName()),ie==="hsl"&&(ne=this.toHslString()),ie==="hsv"&&(ne=this.toHsvString()),ne||this.toHexString())},clone:function(){return f(this.toString())},_applyModification:function(ie,Ce){var ne=ie.apply(null,[this].concat([].slice.call(Ce)));return this._r=ne._r,this._g=ne._g,this._b=ne._b,this.setAlpha(ne._a),this},lighten:function(){return this._applyModification(p,arguments)},brighten:function(){return this._applyModification(L,arguments)},darken:function(){return this._applyModification(R,arguments)},desaturate:function(){return this._applyModification(l,arguments)},saturate:function(){return this._applyModification(E,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(v,arguments)},_applyCombination:function(ie,Ce){return ie.apply(null,[this].concat([].slice.call(Ce)))},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)}},f.fromRatio=function(ie,Ce){if(typeof ie=="object"){var ne={};for(var ce in ie)ie.hasOwnProperty(ce)&&(ce==="a"?ne[ce]=ie[ce]:ne[ce]=ye(ie[ce]));ie=ne}return f(ie,Ce)};function r(ie){var Ce={r:0,g:0,b:0},ne=1,ce=null,Ae=null,oe=null,q=!1,$=!1;return typeof ie=="string"&&(ie=fe(ie)),typeof ie=="object"&&(Se(ie.r)&&Se(ie.g)&&Se(ie.b)?(Ce=c(ie.r,ie.g,ie.b),q=!0,$=String(ie.r).substr(-1)==="%"?"prgb":"rgb"):Se(ie.h)&&Se(ie.s)&&Se(ie.v)?(ce=ye(ie.s),Ae=ye(ie.v),Ce=h(ie.h,ce,Ae),q=!0,$="hsv"):Se(ie.h)&&Se(ie.s)&&Se(ie.l)&&(ce=ye(ie.s),oe=ye(ie.l),Ce=n(ie.h,ce,oe),q=!0,$="hsl"),ie.hasOwnProperty("a")&&(ne=ie.a)),ne=B(ne),{ok:q,format:ie.format||$,r:C(255,_(Ce.r,0)),g:C(255,_(Ce.g,0)),b:C(255,_(Ce.b,0)),a:ne}}function c(ie,Ce,ne){return{r:U(ie,255)*255,g:U(Ce,255)*255,b:U(ne,255)*255}}function i(ie,Ce,ne){ie=U(ie,255),Ce=U(Ce,255),ne=U(ne,255);var ce=_(ie,Ce,ne),Ae=C(ie,Ce,ne),oe,q,$=(ce+Ae)/2;if(ce==Ae)oe=q=0;else{var X=ce-Ae;q=$>.5?X/(2-ce-Ae):X/(ce+Ae);switch(ce){case ie:oe=(Ce-ne)/X+(Ce<ne?6:0);break;case Ce:oe=(ne-ie)/X+2;break;case ne:oe=(ie-Ce)/X+4;break}oe/=6}return{h:oe,s:q,l:$}}function n(ie,Ce,ne){var ce,Ae,oe;ie=U(ie,360),Ce=U(Ce,100),ne=U(ne,100);function q(de,pe,xe){return xe<0&&(xe+=1),xe>1&&(xe-=1),xe<1/6?de+(pe-de)*6*xe:xe<1/2?pe:xe<2/3?de+(pe-de)*(2/3-xe)*6:de}if(Ce===0)ce=Ae=oe=ne;else{var $=ne<.5?ne*(1+Ce):ne+Ce-ne*Ce,X=2*ne-$;ce=q(X,$,ie+1/3),Ae=q(X,$,ie),oe=q(X,$,ie-1/3)}return{r:ce*255,g:Ae*255,b:oe*255}}function o(ie,Ce,ne){ie=U(ie,255),Ce=U(Ce,255),ne=U(ne,255);var ce=_(ie,Ce,ne),Ae=C(ie,Ce,ne),oe,q,$=ce,X=ce-Ae;if(q=ce===0?0:X/ce,ce==Ae)oe=0;else{switch(ce){case ie:oe=(Ce-ne)/X+(Ce<ne?6:0);break;case Ce:oe=(ne-ie)/X+2;break;case ne:oe=(ie-Ce)/X+4;break}oe/=6}return{h:oe,s:q,v:$}}function h(ie,Ce,ne){ie=U(ie,360)*6,Ce=U(Ce,100),ne=U(ne,100);var ce=g.floor(ie),Ae=ie-ce,oe=ne*(1-Ce),q=ne*(1-Ae*Ce),$=ne*(1-(1-Ae)*Ce),X=ce%6,de=[ne,q,oe,oe,$,ne][X],pe=[$,ne,ne,q,oe,oe][X],xe=[oe,oe,$,ne,ne,q][X];return{r:de*255,g:pe*255,b:xe*255}}function d(ie,Ce,ne,ce){var Ae=[ee(m(ie).toString(16)),ee(m(Ce).toString(16)),ee(m(ne).toString(16))];return ce&&Ae[0].charAt(0)==Ae[0].charAt(1)&&Ae[1].charAt(0)==Ae[1].charAt(1)&&Ae[2].charAt(0)==Ae[2].charAt(1)?Ae[0].charAt(0)+Ae[1].charAt(0)+Ae[2].charAt(0):Ae.join("")}function u(ie,Ce,ne,ce,Ae){var oe=[ee(m(ie).toString(16)),ee(m(Ce).toString(16)),ee(m(ne).toString(16)),ee(be(ce))];return Ae&&oe[0].charAt(0)==oe[0].charAt(1)&&oe[1].charAt(0)==oe[1].charAt(1)&&oe[2].charAt(0)==oe[2].charAt(1)&&oe[3].charAt(0)==oe[3].charAt(1)?oe[0].charAt(0)+oe[1].charAt(0)+oe[2].charAt(0)+oe[3].charAt(0):oe.join("")}function s(ie,Ce,ne,ce){var Ae=[ee(be(ce)),ee(m(ie).toString(16)),ee(m(Ce).toString(16)),ee(m(ne).toString(16))];return Ae.join("")}f.equals=function(ie,Ce){return!ie||!Ce?!1:f(ie).toRgbString()==f(Ce).toRgbString()},f.random=function(){return f.fromRatio({r:e(),g:e(),b:e()})};function l(ie,Ce){Ce=Ce===0?0:Ce||10;var ne=f(ie).toHsl();return ne.s-=Ce/100,ne.s=D(ne.s),f(ne)}function E(ie,Ce){Ce=Ce===0?0:Ce||10;var ne=f(ie).toHsl();return ne.s+=Ce/100,ne.s=D(ne.s),f(ne)}function b(ie){return f(ie).desaturate(100)}function p(ie,Ce){Ce=Ce===0?0:Ce||10;var ne=f(ie).toHsl();return ne.l+=Ce/100,ne.l=D(ne.l),f(ne)}function L(ie,Ce){Ce=Ce===0?0:Ce||10;var ne=f(ie).toRgb();return ne.r=_(0,C(255,ne.r-m(255*-(Ce/100)))),ne.g=_(0,C(255,ne.g-m(255*-(Ce/100)))),ne.b=_(0,C(255,ne.b-m(255*-(Ce/100)))),f(ne)}function R(ie,Ce){Ce=Ce===0?0:Ce||10;var ne=f(ie).toHsl();return ne.l-=Ce/100,ne.l=D(ne.l),f(ne)}function v(ie,Ce){var ne=f(ie).toHsl(),ce=(ne.h+Ce)%360;return ne.h=ce<0?360+ce:ce,f(ne)}function x(ie){var Ce=f(ie).toHsl();return Ce.h=(Ce.h+180)%360,f(Ce)}function w(ie){var Ce=f(ie).toHsl(),ne=Ce.h;return[f(ie),f({h:(ne+120)%360,s:Ce.s,l:Ce.l}),f({h:(ne+240)%360,s:Ce.s,l:Ce.l})]}function T(ie){var Ce=f(ie).toHsl(),ne=Ce.h;return[f(ie),f({h:(ne+90)%360,s:Ce.s,l:Ce.l}),f({h:(ne+180)%360,s:Ce.s,l:Ce.l}),f({h:(ne+270)%360,s:Ce.s,l:Ce.l})]}function F(ie){var Ce=f(ie).toHsl(),ne=Ce.h;return[f(ie),f({h:(ne+72)%360,s:Ce.s,l:Ce.l}),f({h:(ne+216)%360,s:Ce.s,l:Ce.l})]}function P(ie,Ce,ne){Ce=Ce||6,ne=ne||30;var ce=f(ie).toHsl(),Ae=360/ne,oe=[f(ie)];for(ce.h=(ce.h-(Ae*Ce>>1)+720)%360;--Ce;)ce.h=(ce.h+Ae)%360,oe.push(f(ce));return oe}function A(ie,Ce){Ce=Ce||6;for(var ne=f(ie).toHsv(),ce=ne.h,Ae=ne.s,oe=ne.v,q=[],$=1/Ce;Ce--;)q.push(f({h:ce,s:Ae,v:oe})),oe=(oe+$)%1;return q}f.mix=function(ie,Ce,ne){ne=ne===0?0:ne||50;var ce=f(ie).toRgb(),Ae=f(Ce).toRgb(),oe=ne/100,q={r:(Ae.r-ce.r)*oe+ce.r,g:(Ae.g-ce.g)*oe+ce.g,b:(Ae.b-ce.b)*oe+ce.b,a:(Ae.a-ce.a)*oe+ce.a};return f(q)},f.readability=function(ie,Ce){var ne=f(ie),ce=f(Ce);return(g.max(ne.getLuminance(),ce.getLuminance())+.05)/(g.min(ne.getLuminance(),ce.getLuminance())+.05)},f.isReadable=function(ie,Ce,ne){var ce=f.readability(ie,Ce),Ae,oe;oe=!1,Ae=ue(ne);switch(Ae.level+Ae.size){case"AAsmall":case"AAAlarge":oe=ce>=4.5;break;case"AAlarge":oe=ce>=3;break;case"AAAsmall":oe=ce>=7;break}return oe},f.mostReadable=function(ie,Ce,ne){var ce=null,Ae=0,oe,q,$,X;ne=ne||{},q=ne.includeFallbackColors,$=ne.level,X=ne.size;for(var de=0;de<Ce.length;de++)oe=f.readability(ie,Ce[de]),oe>Ae&&(Ae=oe,ce=f(Ce[de]));return f.isReadable(ie,ce,{level:$,size:X})||!q?ce:(ne.includeFallbackColors=!1,f.mostReadable(ie,["#fff","#000"],ne))};var z=f.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},K=f.hexNames=O(z);function O(ie){var Ce={};for(var ne in ie)ie.hasOwnProperty(ne)&&(Ce[ie[ne]]=ne);return Ce}function B(ie){return ie=parseFloat(ie),(isNaN(ie)||ie<0||ie>1)&&(ie=1),ie}function U(ie,Ce){Q(ie)&&(ie="100%");var ne=re(ie);return ie=C(Ce,_(0,parseFloat(ie))),ne&&(ie=parseInt(ie*Ce,10)/100),g.abs(ie-Ce)<1e-6?1:ie%Ce/parseFloat(Ce)}function D(ie){return C(1,_(0,ie))}function W(ie){return parseInt(ie,16)}function Q(ie){return typeof ie=="string"&&ie.indexOf(".")!=-1&&parseFloat(ie)===1}function re(ie){return typeof ie=="string"&&ie.indexOf("%")!=-1}function ee(ie){return ie.length==1?"0"+ie:""+ie}function ye(ie){return ie<=1&&(ie=ie*100+"%"),ie}function be(ie){return g.round(parseFloat(ie)*255).toString(16)}function he(ie){return W(ie)/255}var Ie=function(){var ie="[-\\+]?\\d+%?",Ce="[-\\+]?\\d*\\.\\d+%?",ne="(?:"+Ce+")|(?:"+ie+")",ce="[\\s|\\(]+("+ne+")[,|\\s]+("+ne+")[,|\\s]+("+ne+")\\s*\\)?",Ae="[\\s|\\(]+("+ne+")[,|\\s]+("+ne+")[,|\\s]+("+ne+")[,|\\s]+("+ne+")\\s*\\)?";return{CSS_UNIT:new RegExp(ne),rgb:new RegExp("rgb"+ce),rgba:new RegExp("rgba"+Ae),hsl:new RegExp("hsl"+ce),hsla:new RegExp("hsla"+Ae),hsv:new RegExp("hsv"+ce),hsva:new RegExp("hsva"+Ae),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 Se(ie){return!!Ie.CSS_UNIT.exec(ie)}function fe(ie){ie=ie.replace(S,"").replace(k,"").toLowerCase();var Ce=!1;if(z[ie])ie=z[ie],Ce=!0;else if(ie=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ne;return(ne=Ie.rgb.exec(ie))?{r:ne[1],g:ne[2],b:ne[3]}:(ne=Ie.rgba.exec(ie))?{r:ne[1],g:ne[2],b:ne[3],a:ne[4]}:(ne=Ie.hsl.exec(ie))?{h:ne[1],s:ne[2],l:ne[3]}:(ne=Ie.hsla.exec(ie))?{h:ne[1],s:ne[2],l:ne[3],a:ne[4]}:(ne=Ie.hsv.exec(ie))?{h:ne[1],s:ne[2],v:ne[3]}:(ne=Ie.hsva.exec(ie))?{h:ne[1],s:ne[2],v:ne[3],a:ne[4]}:(ne=Ie.hex8.exec(ie))?{r:W(ne[1]),g:W(ne[2]),b:W(ne[3]),a:he(ne[4]),format:Ce?"name":"hex8"}:(ne=Ie.hex6.exec(ie))?{r:W(ne[1]),g:W(ne[2]),b:W(ne[3]),format:Ce?"name":"hex"}:(ne=Ie.hex4.exec(ie))?{r:W(ne[1]+""+ne[1]),g:W(ne[2]+""+ne[2]),b:W(ne[3]+""+ne[3]),a:he(ne[4]+""+ne[4]),format:Ce?"name":"hex8"}:(ne=Ie.hex3.exec(ie))?{r:W(ne[1]+""+ne[1]),g:W(ne[2]+""+ne[2]),b:W(ne[3]+""+ne[3]),format:Ce?"name":"hex"}:!1}function ue(ie){var Ce,ne;return ie=ie||{level:"AA",size:"small"},Ce=(ie.level||"AA").toUpperCase(),ne=(ie.size||"small").toLowerCase(),Ce!=="AA"&&Ce!=="AAA"&&(Ce="AA"),ne!=="small"&&ne!=="large"&&(ne="small"),{level:Ce,size:ne}}H.exports?H.exports=f:!(N=function(){return f}.call(J,I,J,H),N!==void 0&&(H.exports=N))})(Math)},bCnd:function(H,J,I){"use strict";I.d(J,"b",function(){return k}),I.d(J,"a",function(){return y});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 y(m,C){var _=g.a.get("__ec");return _?_[m]===void 0?C:_[m]:C}},bQjk:function(H,J,I){(function(N,g,S){H.exports=J=g(I("Ib8C"),I("OLod"))})(this,function(N){return function(g){var S=N,k=S.lib,y=k.CipherParams,m=S.enc,C=m.Hex,_=S.format,e=_.Hex={stringify:function(f){return f.ciphertext.toString(C)},parse:function(f){var r=C.parse(f);return y.create({ciphertext:r})}}}(),N.format.Hex})},bT9E:function(H,J,I){"use strict";I.d(J,"a",function(){return g});var N=I("VTBJ");function g(S,k){var y=Object(N.a)({},S);return Array.isArray(k)&&k.forEach(function(m){delete y[m]}),y}},biw7:function(H,J,I){"use strict";var N=I("q1tI"),g=I.n(N),S=N.createContext(null);J.a=S},c5Ni:function(H,J,I){},cDPC:function(H,J,I){"use strict";var N=I("tJVT"),g=I("q1tI"),S=I.n(g),k=I("i3hx"),y=I.n(k);J.a=function(m){var C=m.defaultX,_=C===void 0?"40%":C,e=m.leftChild,f=m.rightChild,r=m.className,c=m.hideResize,i=c===void 0?!1:c,n=Object(g.useState)(_),o=Object(N.a)(n,2),h=o[0],d=o[1],u=Object(g.useRef)();function s(){u.current=!0}Object(g.useEffect)(function(){function b(L){u.current&&d(L.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 l=typeof h=="number"&&h!==.01?"".concat(h,"px"):_,E="calc(100% - ".concat(i?"0px":"4px"," - ").concat(l,")");return S.a.createElement("div",{className:"split-panel-container ".concat(r)},S.a.createElement("section",{style:{width:l,display:h===.01?"none":""}},e),S.a.createElement("section",{className:"resize-x-bar",onMouseDown:s},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}},f))}},cv67:function(H,J,I){(function(N,g){H.exports=J=g(I("Ib8C"))})(this,function(N){return function(g){var S=N,k=S.lib,y=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 y.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(n,o){for(var h=0;h<16;h++){var d=o+h,u=n[d];n[d]=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360}var s=this._hash.words,l=n[o+0],E=n[o+1],b=n[o+2],p=n[o+3],L=n[o+4],R=n[o+5],v=n[o+6],x=n[o+7],w=n[o+8],T=n[o+9],F=n[o+10],P=n[o+11],A=n[o+12],z=n[o+13],K=n[o+14],O=n[o+15],B=s[0],U=s[1],D=s[2],W=s[3];B=f(B,U,D,W,l,7,_[0]),W=f(W,B,U,D,E,12,_[1]),D=f(D,W,B,U,b,17,_[2]),U=f(U,D,W,B,p,22,_[3]),B=f(B,U,D,W,L,7,_[4]),W=f(W,B,U,D,R,12,_[5]),D=f(D,W,B,U,v,17,_[6]),U=f(U,D,W,B,x,22,_[7]),B=f(B,U,D,W,w,7,_[8]),W=f(W,B,U,D,T,12,_[9]),D=f(D,W,B,U,F,17,_[10]),U=f(U,D,W,B,P,22,_[11]),B=f(B,U,D,W,A,7,_[12]),W=f(W,B,U,D,z,12,_[13]),D=f(D,W,B,U,K,17,_[14]),U=f(U,D,W,B,O,22,_[15]),B=r(B,U,D,W,E,5,_[16]),W=r(W,B,U,D,v,9,_[17]),D=r(D,W,B,U,P,14,_[18]),U=r(U,D,W,B,l,20,_[19]),B=r(B,U,D,W,R,5,_[20]),W=r(W,B,U,D,F,9,_[21]),D=r(D,W,B,U,O,14,_[22]),U=r(U,D,W,B,L,20,_[23]),B=r(B,U,D,W,T,5,_[24]),W=r(W,B,U,D,K,9,_[25]),D=r(D,W,B,U,p,14,_[26]),U=r(U,D,W,B,w,20,_[27]),B=r(B,U,D,W,z,5,_[28]),W=r(W,B,U,D,b,9,_[29]),D=r(D,W,B,U,x,14,_[30]),U=r(U,D,W,B,A,20,_[31]),B=c(B,U,D,W,R,4,_[32]),W=c(W,B,U,D,w,11,_[33]),D=c(D,W,B,U,P,16,_[34]),U=c(U,D,W,B,K,23,_[35]),B=c(B,U,D,W,E,4,_[36]),W=c(W,B,U,D,L,11,_[37]),D=c(D,W,B,U,x,16,_[38]),U=c(U,D,W,B,F,23,_[39]),B=c(B,U,D,W,z,4,_[40]),W=c(W,B,U,D,l,11,_[41]),D=c(D,W,B,U,p,16,_[42]),U=c(U,D,W,B,v,23,_[43]),B=c(B,U,D,W,T,4,_[44]),W=c(W,B,U,D,A,11,_[45]),D=c(D,W,B,U,O,16,_[46]),U=c(U,D,W,B,b,23,_[47]),B=i(B,U,D,W,l,6,_[48]),W=i(W,B,U,D,x,10,_[49]),D=i(D,W,B,U,K,15,_[50]),U=i(U,D,W,B,R,21,_[51]),B=i(B,U,D,W,A,6,_[52]),W=i(W,B,U,D,p,10,_[53]),D=i(D,W,B,U,F,15,_[54]),U=i(U,D,W,B,E,21,_[55]),B=i(B,U,D,W,w,6,_[56]),W=i(W,B,U,D,O,10,_[57]),D=i(D,W,B,U,v,15,_[58]),U=i(U,D,W,B,z,21,_[59]),B=i(B,U,D,W,L,6,_[60]),W=i(W,B,U,D,P,10,_[61]),D=i(D,W,B,U,b,15,_[62]),U=i(U,D,W,B,T,21,_[63]),s[0]=s[0]+B|0,s[1]=s[1]+U|0,s[2]=s[2]+D|0,s[3]=s[3]+W|0},_doFinalize:function(){var n=this._data,o=n.words,h=this._nDataBytes*8,d=n.sigBytes*8;o[d>>>5]|=128<<24-d%32;var u=g.floor(h/4294967296),s=h;o[(d+64>>>9<<4)+15]=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,o[(d+64>>>9<<4)+14]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360,n.sigBytes=(o.length+1)*4,this._process();for(var l=this._hash,E=l.words,b=0;b<4;b++){var p=E[b];E[b]=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360}return l},clone:function(){var n=m.clone.call(this);return n._hash=this._hash.clone(),n}});function f(n,o,h,d,u,s,l){var E=n+(o&h|~o&d)+u+l;return(E<<s|E>>>32-s)+o}function r(n,o,h,d,u,s,l){var E=n+(o&d|h&~d)+u+l;return(E<<s|E>>>32-s)+o}function c(n,o,h,d,u,s,l){var E=n+(o^h^d)+u+l;return(E<<s|E>>>32-s)+o}function i(n,o,h,d,u,s,l){var E=n+(h^(o|~d))+u+l;return(E<<s|E>>>32-s)+o}S.MD5=m._createHelper(e),S.HmacMD5=m._createHmacHelper(e)}(Math),N.MD5})},dejd:function(H,J,I){},dmUQ:function(H,J,I){"use strict";var N=I("Ff2n"),g=I("rePB"),S=I("1OyB"),k=I("vuIU"),y=I("Ji7U"),m=I("md7G"),C=I("foSv"),_=I("q1tI"),e=I.n(_),f=I("TSYQ"),r=I.n(f),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 o(w){var T=h();return function(){var P=Object(C.a)(w),A;if(T){var z=Object(C.a)(this).constructor;A=Reflect.construct(P,arguments,z)}else A=P.apply(this,arguments);return Object(m.a)(this,A)}}function h(){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 s=function(T){return T.replace(/[^\w.-]+/g,"")},l=200,E=600,b=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,p=function(T){return T!=null},L=function(T,F){return F===T||typeof F=="number"&&typeof T=="number"&&isNaN(F)&&isNaN(T)},R=function(w){Object(y.a)(F,w);var T=o(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,D=B.onPressEnter;if(O.keyCode===c.a.UP){var W=A.getRatio(O);A.up(O,W,null),A.stop()}else if(O.keyCode===c.a.DOWN){var Q=A.getRatio(O);A.down(O,Q,null),A.stop()}else O.keyCode===c.a.ENTER&&D&&D(O);if(A.recordCursorPosition(),A.lastKeyCode=O.keyCode,U){for(var re=arguments.length,ee=new Array(re>1?re-1:0),ye=1;ye<re;ye++)ee[ye-1]=arguments[ye];U.apply(void 0,[O].concat(ee))}},A.onKeyUp=function(O){var B=A.props.onKeyUp;if(A.stop(),A.recordCursorPosition(),B){for(var U=arguments.length,D=new Array(U>1?U-1:0),W=1;W<U;W++)D[W-1]=arguments[W];B.apply(void 0,[O].concat(D))}},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 D=A.input.value,W=A.getInputDisplayValue({focus:!1,value:U});A.input.value=W&&Number(W),O.apply(void 0,arguments),A.input.value=D}},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,D=B.inputValue,W=B.value,Q;U?Q=D:Q=A.toPrecisionAsStep(W),Q==null&&(Q="");var re=A.formatWrapper(Q);return p(A.props.decimalSeparator)&&(re=re.toString().replace(".",A.props.decimalSeparator)),re},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 D=A.cursorBefore.length;return A.lastKeyCode===c.a.DELETE&&A.cursorBefore.charAt(D-1)===O[0]?(A.fixCaret(D,D),!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 D=O.substring(U);return A.restoreByAfter(D)})},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 z=P.value;z===void 0&&(z=P.defaultValue),A.state={focused:P.autoFocus};var K=A.getValidValue(A.toNumber(z));return A.state=n(n({},A.state),{},{inputValue:A.toPrecisionAsStep(K),value:K}),A}return Object(k.a)(F,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(A){var z=this.props,K=z.value,O=z.onChange,B=z.max,U=z.min,D=this.state.focused;if(A){if(!L(A.value,K)||!L(A.max,B)||!L(A.min,U)){var W=D?K:this.getValidValue(K),Q;this.pressingUpOrDown?Q=W:this.inputting?Q=this.rawInput:Q=this.toPrecisionAsStep(W),this.setState({value:W,inputValue:Q})}var re="value"in this.props?K:this.state.value;"max"in this.props&&A.max!==B&&typeof re=="number"&&re>B&&O&&O(B),"min"in this.props&&A.min!==U&&typeof re=="number"&&re<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 ee=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===c.a.BACKSPACE?ee=this.cursorStart-1:this.lastKeyCode===c.a.DELETE&&(ee=this.cursorStart):ee=this.input.value.length,this.fixCaret(ee,ee)}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(ye){}if(this.lastKeyCode=null,!this.pressingUpOrDown)return;this.props.focusOnUpDown&&this.state.focused&&(document.activeElement!==this.input&&this.focus())}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"getCurrentValidValue",value:function(A){var z=A;return z===""?z="":this.isNotCompleteNumber(parseFloat(z))?z=this.state.value:z=this.getValidValue(z),this.toNumber(z)}},{key:"getValueFromEvent",value:function(A){var z=A.target.value.trim().replace(/。/g,".");return p(this.props.decimalSeparator)&&(z=z.replace(this.props.decimalSeparator,".")),z}},{key:"getValidValue",value:function(A){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,O=parseFloat(A);return isNaN(O)?A:(O<z&&(O=z),O>K&&(O=K),O)}},{key:"setValue",value:function(A,z){var K=this.props.precision,O=this.isNotCompleteNumber(parseFloat(A))?null:parseFloat(A),B=this.state.value,U=B===void 0?null:B,D=this.state.inputValue,W=D===void 0?null:D,Q=typeof O=="number"?O.toFixed(K):"".concat(O),re=O!==U||Q!=="".concat(W);return"value"in this.props?(W=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:W},z)):this.setState({value:O,inputValue:this.toPrecisionAsStep(A)},z),re&&this.props.onChange(O),O}},{key:"getMaxPrecision",value:function(A){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,K=this.props,O=K.precision,B=K.step;if(p(O))return O;var U=this.getPrecision(z),D=this.getPrecision(B),W=this.getPrecision(A);return A?Math.max(W,U+D):U+D}},{key:"getPrecisionFactor",value:function(A){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,K=this.getMaxPrecision(A,z);return Math.pow(10,K)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(A){return this.props.formatter?this.props.formatter(A):A}},{key:"toPrecisionAsStep",value:function(A){if(this.isNotCompleteNumber(A)||A==="")return A;var z=Math.abs(this.getMaxPrecision(A));return isNaN(z)?A.toString():Number(A).toFixed(z)}},{key:"toNumber",value:function(A){var z=this.props.precision,K=this.state.focused,O=A&&A.length>16&&K;return this.isNotCompleteNumber(A)||O?A:p(z)?Math.round(A*Math.pow(10,z))/Math.pow(10,z):Number(A)}},{key:"upStep",value:function(A,z){var K=this.props.step,O=this.getPrecisionFactor(A,z),B=Math.abs(this.getMaxPrecision(A,z)),U=((O*A+O*K*z)/O).toFixed(B);return this.toNumber(U)}},{key:"downStep",value:function(A,z){var K=this.props.step,O=this.getPrecisionFactor(A,z),B=Math.abs(this.getMaxPrecision(A,z)),U=((O*A-O*K*z)/O).toFixed(B);return this.toNumber(U)}},{key:"step",value:function(A,z){var K=this,O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,B=arguments.length>3?arguments[3]:void 0;this.stop(),z&&(z.persist(),z.preventDefault());var U=this.props;if(U.disabled)return;var D=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(D))return;var W=this["".concat(A,"Step")](D,O),Q=W>U.max||W<U.min;if(W>U.max?W=U.max:W<U.min&&(W=U.min),this.setValue(W,null),this.setState({focused:!0},function(){K.pressingUpOrDown=!1}),Q)return;this.autoStepTimer=setTimeout(function(){K[A](z,O,!0)},B?l:E)}},{key:"fixCaret",value:function(A,z){if(A===void 0||z===void 0||!this.input||!this.input.value)return;try{var K=this.input.selectionStart,O=this.input.selectionEnd;(A!==K||z!==O)&&this.input.setSelectionRange(A,z)}catch(B){}}},{key:"render",value:function(){var A,z=this.props,K=z.prefixCls,O=z.disabled,B=z.readOnly,U=z.useTouch,D=z.autoComplete,W=z.upHandler,Q=z.downHandler,re=z.className,ee=z.max,ye=z.min,be=z.style,he=z.title,Ie=z.onMouseEnter,Se=z.onMouseLeave,fe=z.onMouseOver,ue=z.onMouseOut,ie=z.required,Ce=z.onClick,ne=z.tabIndex,ce=z.type,Ae=z.placeholder,oe=z.id,q=z.inputMode,$=z.pattern,X=z.step,de=z.maxLength,pe=z.autoFocus,xe=z.name,Ke=z.onPaste,qe=z.onInput,tt=Object(N.a)(z,["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"]),et=this.state,it=et.value,at=et.focused,je=r()(K,(A={},Object(g.a)(A,re,!!re),Object(g.a)(A,"".concat(K,"-disabled"),O),Object(g.a)(A,"".concat(K,"-focused"),at),A)),De={};Object.keys(tt).forEach(function(Ne){(Ne.substr(0,5)==="data-"||Ne.substr(0,5)==="aria-"||Ne==="role")&&(De[Ne]=tt[Ne])});var nt=!B&&!O,lt=this.getInputDisplayValue(null),Ve=(it||it===0)&&(isNaN(it)||Number(it)>=ee),Qe=(it||it===0)&&(isNaN(it)||Number(it)<=ye),Fe=Ve||O||B,Re=Qe||O||B,Me=r()("".concat(K,"-handler"),"".concat(K,"-handler-up"),Object(g.a)({},"".concat(K,"-handler-up-disabled"),Fe)),Ee=r()("".concat(K,"-handler"),"".concat(K,"-handler-down"),Object(g.a)({},"".concat(K,"-handler-down-disabled"),Re)),Oe=U?{onTouchStart:Fe?d:this.up,onTouchEnd:this.stop}:{onMouseDown:Fe?d:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},ke=U?{onTouchStart:Re?d:this.down,onTouchEnd:this.stop}:{onMouseDown:Re?d:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return e.a.createElement("div",{className:je,style:be,title:he,onMouseEnter:Ie,onMouseLeave:Se,onMouseOver:fe,onMouseOut:ue,onFocus:function(){return null},onBlur:function(){return null}},e.a.createElement("div",{className:"".concat(K,"-handler-wrap")},e.a.createElement("span",Object.assign({unselectable:"on"},Oe,{role:"button","aria-label":"Increase Value","aria-disabled":Fe,className:Me}),W||e.a.createElement("span",{unselectable:"on",className:"".concat(K,"-handler-up-inner"),onClick:u})),e.a.createElement("span",Object.assign({unselectable:"on"},ke,{role:"button","aria-label":"Decrease Value","aria-disabled":Re,className:Ee}),Q||e.a.createElement("span",{unselectable:"on",className:"".concat(K,"-handler-down-inner"),onClick:u}))),e.a.createElement("div",{className:"".concat(K,"-input-wrap")},e.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":ye,"aria-valuemax":ee,"aria-valuenow":it,required:ie,type:ce,placeholder:Ae,onPaste:Ke,onClick:Ce,onMouseUp:this.onMouseUp,className:"".concat(K,"-input"),tabIndex:ne,autoComplete:D,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:nt?this.onKeyDown:d,onKeyUp:nt?this.onKeyUp:d,autoFocus:pe,maxLength:de,readOnly:B,disabled:O,max:ee,min:ye,step:X,name:xe,title:he,id:oe,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(lt),pattern:$,inputMode:q,onInput:qe},De))))}}]),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:s,required:!1,autoComplete:"off"};var v=R,x=J.a=v},e7zE:function(H,J,I){(function(N,g,S){H.exports=J=g(I("Ib8C"),I("3y9D"),I("WYAk"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.Base,y=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(f){this.cfg=this.cfg.extend(f)},compute:function(f,r){for(var c=this.cfg,i=_.create(c.hasher,f),n=y.create(),o=y.create([1]),h=n.words,d=o.words,u=c.keySize,s=c.iterations;h.length<u;){var l=i.update(r).finalize(o);i.reset();for(var E=l.words,b=E.length,p=l,L=1;L<s;L++){p=i.finalize(p),i.reset();for(var R=p.words,v=0;v<b;v++)E[v]^=R[v]}n.concat(l),d[0]++}return n.sigBytes=u*4,n}});g.PBKDF2=function(f,r,c){return e.create(c).compute(f,r)}}(),N.PBKDF2})},eRFJ:function(H,J,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,J,I){"use strict";var N=I("Ff2n"),g=I("1OyB"),S=I("vuIU"),k=I("Ji7U"),y=I("md7G"),m=I("foSv"),C=I("1W/9"),_=I("q1tI"),e=I("rePB"),f=I("JX7q"),r=I("TSYQ"),c=I.n(r),i=I("qx4F"),n=I("4IlW");function o(O){return Array.isArray(O)?O:[O]}var h={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},d=Object.keys(h).filter(function(O){if(typeof document=="undefined")return!1;var B=document.getElementsByTagName("html")[0];return O in(B?B.style:{})})[0],u=h[d];function s(O,B,U,D){O.addEventListener?O.addEventListener(B,U,D):O.attachEvent&&O.attachEvent("on".concat(B),U)}function l(O,B,U,D){O.removeEventListener?O.removeEventListener(B,U,D):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),L=function O(B,U,D,W){if(!U||U===document||U instanceof Document)return!1;if(U===B.parentNode)return!0;var Q=Math.max(Math.abs(D),Math.abs(W))===Math.abs(W),re=Math.max(Math.abs(D),Math.abs(W))===Math.abs(D),ee=U.scrollHeight-U.clientHeight,ye=U.scrollWidth-U.clientWidth,be=document.defaultView.getComputedStyle(U),he=be.overflowY==="auto"||be.overflowY==="scroll",Ie=be.overflowX==="auto"||be.overflowX==="scroll",Se=ee&&he,fe=ye&&Ie;return Q&&(!Se||Se&&(U.scrollTop>=ee&&W<0||U.scrollTop<=0&&W>0))||re&&(!fe||fe&&(U.scrollLeft>=ye&&D<0||U.scrollLeft<=0&&D>0))?O(B,U.parentNode,D,W):!1};function R(O){var B=v();return function(){var D=Object(m.a)(O),W;if(B){var Q=Object(m.a)(this).constructor;W=Reflect.construct(D,arguments,Q)}else W=D.apply(this,arguments);return Object(y.a)(this,W)}}function v(){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(D){var W;return Object(g.a)(this,U),W=B.call(this,D),W.domFocus=function(){W.dom&&W.dom.focus()},W.removeStartHandler=function(Q){if(Q.touches.length>1)return;W.startPos={x:Q.touches[0].clientX,y:Q.touches[0].clientY}},W.removeMoveHandler=function(Q){if(Q.changedTouches.length>1)return;var re=Q.currentTarget,ee=Q.changedTouches[0].clientX-W.startPos.x,ye=Q.changedTouches[0].clientY-W.startPos.y;(re===W.maskDom||re===W.handlerDom||re===W.contentDom&&L(re,Q.target,ee,ye))&&Q.cancelable&&Q.preventDefault()},W.transitionEnd=function(Q){var re=Q.target;l(re,u,W.transitionEnd),re.style.transition=""},W.onKeyDown=function(Q){if(Q.keyCode===n.a.ESC){var re=W.props.onClose;Q.stopPropagation(),re&&re(Q)}},W.onWrapperTransitionEnd=function(Q){var re=W.props,ee=re.open,ye=re.afterVisibleChange;Q.target===W.contentWrapper&&Q.propertyName.match(/transform$/)&&(W.dom.style.transition="",!ee&&W.getCurrentDrawerSome()&&(document.body.style.overflowX="",W.maskDom&&(W.maskDom.style.left="",W.maskDom.style.width="")),ye&&ye(!!ee))},W.openLevelTransition=function(){var Q=W.props,re=Q.open,ee=Q.width,ye=Q.height,be=W.getHorizontalBoolAndPlacementName(),he=be.isHorizontal,Ie=be.placementName,Se=W.contentDom?W.contentDom.getBoundingClientRect()[he?"width":"height"]:0,fe=(he?ee:ye)||Se;W.setLevelAndScrolling(re,Ie,fe)},W.setLevelTransform=function(Q,re,ee,ye){var be=W.props,he=be.placement,Ie=be.levelMove,Se=be.duration,fe=be.ease,ue=be.showMask;W.levelDom.forEach(function(ie){ie.style.transition="transform ".concat(Se," ").concat(fe),s(ie,u,W.transitionEnd);var Ce=Q?ee:0;if(Ie){var ne=E(Ie,{target:ie,open:Q});Ce=Q?ne[0]:ne[1]||0}var ce=typeof Ce=="number"?"".concat(Ce,"px"):Ce,Ae=he==="left"||he==="top"?ce:"-".concat(ce);Ae=ue&&he==="right"&&ye?"calc(".concat(Ae," + ").concat(ye,"px)"):Ae,ie.style.transform=Ce?"".concat(re,"(").concat(Ae,")"):""})},W.setLevelAndScrolling=function(Q,re,ee){var ye=W.props.onChange;if(!p){var be=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?Object(i.a)(!0):0;W.setLevelTransform(Q,re,ee,be),W.toggleScrollingToDrawerAndBody(be)}ye&&ye(Q)},W.toggleScrollingToDrawerAndBody=function(Q){var re=W.props,ee=re.getOpenCount,ye=re.getContainer,be=re.showMask,he=re.open,Ie=ye&&ye(),Se=ee&&ee();if(Ie&&Ie.parentNode===document.body&&be){var fe=["touchstart"],ue=[document.body,W.maskDom,W.handlerDom,W.contentDom];he&&document.body.style.overflow!=="hidden"?(Q&&W.addScrollingEffect(Q),Se===1&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",ue.forEach(function(ie,Ce){if(!ie)return;s(ie,fe[Ce]||"touchmove",Ce?W.removeMoveHandler:W.removeStartHandler,W.passive)})):W.getCurrentDrawerSome()&&(Se||(document.body.style.overflow=""),document.body.style.touchAction="",Q&&W.remScrollingEffect(Q),ue.forEach(function(ie,Ce){if(!ie)return;l(ie,fe[Ce]||"touchmove",Ce?W.removeMoveHandler:W.removeStartHandler,W.passive)}))}},W.addScrollingEffect=function(Q){var re=W.props,ee=re.placement,ye=re.duration,be=re.ease,he=re.getOpenCount,Ie=re.switchScrollingEffect,Se=he&&he();Se===1&&Ie();var fe="width ".concat(ye," ").concat(be),ue="transform ".concat(ye," ").concat(be);W.dom.style.transition="none";switch(ee){case"right":W.dom.style.transform="translateX(-".concat(Q,"px)");break;case"top":case"bottom":W.dom.style.width="calc(100% - ".concat(Q,"px)"),W.dom.style.transform="translateZ(0)";break;default:break}clearTimeout(W.timeout),W.timeout=setTimeout(function(){W.dom&&(W.dom.style.transition="".concat(ue,",").concat(fe),W.dom.style.width="",W.dom.style.transform="")})},W.remScrollingEffect=function(Q){var re=W.props,ee=re.placement,ye=re.duration,be=re.ease,he=re.getOpenCount,Ie=re.switchScrollingEffect,Se=he&&he();Se||Ie(!0),d&&(document.body.style.overflowX="hidden"),W.dom.style.transition="none";var fe,ue="width ".concat(ye," ").concat(be),ie="transform ".concat(ye," ").concat(be);switch(ee){case"left":{W.dom.style.width="100%",ue="width 0s ".concat(be," ").concat(ye);break}case"right":{W.dom.style.transform="translateX(".concat(Q,"px)"),W.dom.style.width="100%",ue="width 0s ".concat(be," ").concat(ye),W.maskDom&&(W.maskDom.style.left="-".concat(Q,"px"),W.maskDom.style.width="calc(100% + ".concat(Q,"px)"));break}case"top":case"bottom":{W.dom.style.width="calc(100% + ".concat(Q,"px)"),W.dom.style.height="100%",W.dom.style.transform="translateZ(0)",fe="height 0s ".concat(be," ").concat(ye);break}default:break}clearTimeout(W.timeout),W.timeout=setTimeout(function(){W.dom&&(W.dom.style.transition="".concat(ie,",").concat(fe?"".concat(fe,","):"").concat(ue),W.dom.style.transform="",W.dom.style.width="",W.dom.style.height="")})},W.getCurrentDrawerSome=function(){return!Object.keys(x).some(function(Q){return x[Q]})},W.getLevelDom=function(Q){var re=Q.level,ee=Q.getContainer;if(p)return;var ye=ee&&ee(),be=ye?ye.parentNode:null;if(W.levelDom=[],re==="all"){var he=be?Array.prototype.slice.call(be.children):[];he.forEach(function(Ie){Ie.nodeName!=="SCRIPT"&&Ie.nodeName!=="STYLE"&&Ie.nodeName!=="LINK"&&Ie!==ye&&W.levelDom.push(Ie)})}else re&&o(re).forEach(function(Ie){document.querySelectorAll(Ie).forEach(function(Se){W.levelDom.push(Se)})})},W.getHorizontalBoolAndPlacementName=function(){var Q=W.props.placement,re=Q==="left"||Q==="right",ee="translate".concat(re?"X":"Y");return{isHorizontal:re,placementName:ee}},W.state={_self:Object(f.a)(W)},W}return Object(S.a)(U,[{key:"componentDidMount",value:function(){var W=this;if(!p){var Q=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return Q=!0,null}}))}catch(he){}this.passive=Q?{passive:!1}:!1}var re=this.props,ee=re.open,ye=re.getContainer,be=ye&&ye();this.drawerId="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(Math.random()*9).toString())).toString(16)),this.getLevelDom(this.props),ee&&(be&&be.parentNode===document.body&&(x[this.drawerId]=ee),this.openLevelTransition(),this.forceUpdate(function(){W.domFocus()}))}},{key:"componentDidUpdate",value:function(W){var Q=this.props,re=Q.open,ee=Q.getContainer,ye=ee&&ee();re!==W.open&&(re&&this.domFocus(),ye&&ye.parentNode===document.body&&(x[this.drawerId]=!!re),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var W=this.props,Q=W.getOpenCount,re=W.open,ee=W.switchScrollingEffect,ye=typeof Q=="function"&&Q();delete x[this.drawerId],re&&(this.setLevelTransform(!1),document.body.style.touchAction=""),ye||(document.body.style.overflow="",ee(!0))}},{key:"render",value:function(){var W,Q=this,re=this.props,ee=re.className,ye=re.children,be=re.style,he=re.width,Ie=re.height,Se=re.defaultOpen,fe=re.open,ue=re.prefixCls,ie=re.placement,Ce=re.level,ne=re.levelMove,ce=re.ease,Ae=re.duration,oe=re.getContainer,q=re.handler,$=re.onChange,X=re.afterVisibleChange,de=re.showMask,pe=re.maskClosable,xe=re.maskStyle,Ke=re.onClose,qe=re.onHandleClick,tt=re.keyboard,et=re.getOpenCount,it=re.switchScrollingEffect,at=Object(N.a)(re,["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"]),je=this.dom?fe:!1,De=c()(ue,(W={},Object(e.a)(W,"".concat(ue,"-").concat(ie),!0),Object(e.a)(W,"".concat(ue,"-open"),je),Object(e.a)(W,ee||"",!!ee),Object(e.a)(W,"no-mask",!de),W)),nt=this.getHorizontalBoolAndPlacementName(),lt=nt.placementName,Ve=ie==="left"||ie==="top"?"-100%":"100%",Qe=je?"":"".concat(lt,"(").concat(Ve,")"),Fe=q&&_.cloneElement(q,{onClick:function(Me){q.props.onClick&&q.props.onClick(),qe&&qe(Me)},ref:function(Me){Q.handlerDom=Me}});return _.createElement("div",Object.assign({},at,{tabIndex:-1,className:De,style:be,ref:function(Me){Q.dom=Me},onKeyDown:je&&tt?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),de&&_.createElement("div",{className:"".concat(ue,"-mask"),onClick:pe?Ke:void 0,style:xe,ref:function(Me){Q.maskDom=Me}}),_.createElement("div",{className:"".concat(ue,"-content-wrapper"),style:{transform:Qe,msTransform:Qe,width:b(he)?"".concat(he,"px"):he,height:b(Ie)?"".concat(Ie,"px"):Ie},ref:function(Me){Q.contentWrapper=Me}},_.createElement("div",{className:"".concat(ue,"-content"),ref:function(Me){Q.contentDom=Me},onTouchStart:je&&de?this.removeStartHandler:void 0,onTouchMove:je&&de?this.removeMoveHandler:void 0},ye),Fe))}}],[{key:"getDerivedStateFromProps",value:function(W,Q){var re=Q.prevProps,ee=Q._self,ye={prevProps:W};if(re!==void 0){var be=W.placement,he=W.level;be!==re.placement&&(ee.contentDom=null),he!==re.level&&ee.getLevelDom(W)}return ye}}]),U}(_.Component);w.defaultProps={switchScrollingEffect:function(){}};var T=w;function F(O){var B=P();return function(){var D=Object(m.a)(O),W;if(B){var Q=Object(m.a)(this).constructor;W=Reflect.construct(D,arguments,Q)}else W=D.apply(this,arguments);return Object(y.a)(this,W)}}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(D){var W;Object(g.a)(this,U),W=B.call(this,D),W.onHandleClick=function(re){var ee=W.props,ye=ee.onHandleClick,be=ee.open;if(ye&&ye(re),typeof be=="undefined"){var he=W.state.open;W.setState({open:!he})}},W.onClose=function(re){var ee=W.props,ye=ee.onClose,be=ee.open;ye&&ye(re),typeof be=="undefined"&&W.setState({open:!1})};var Q=typeof D.open!="undefined"?D.open:!!D.defaultOpen;return W.state={open:Q},"onMaskClick"in D&&console.warn("`onMaskClick` are removed, please use `onClose` instead."),W}return Object(S.a)(U,[{key:"render",value:function(){var W=this,Q=this.props,re=Q.defaultOpen,ee=Q.getContainer,ye=Q.wrapperClassName,be=Q.forceRender,he=Q.handler,Ie=Object(N.a)(Q,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),Se=this.state.open;if(!ee)return _.createElement("div",{className:ye,ref:function(ie){W.dom=ie}},_.createElement(T,Object.assign({},Ie,{open:Se,handler:he,getContainer:function(){return W.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var fe=!!he||be;return _.createElement(C.a,{visible:Se,forceRender:fe,getContainer:ee,wrapperClassName:ye},function(ue){var ie=ue.visible,Ce=ue.afterClose,ne=Object(N.a)(ue,["visible","afterClose"]);return _.createElement(T,Object.assign({},Ie,ne,{open:ie!==void 0?ie:Se,afterVisibleChange:Ce!==void 0?Ce:Ie.afterVisibleChange,handler:he,onClose:W.onClose,onHandleClick:W.onHandleClick}))})}}],[{key:"getDerivedStateFromProps",value:function(W,Q){var re=Q.prevProps,ee={prevProps:W};return typeof re!="undefined"&&W.open!==re.open&&(ee.open=W.open),ee}}]),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 z=A,K=J.a=z},fjLI:function(H,J,I){"use strict";I.d(J,"f",function(){return i}),I.d(J,"b",function(){return n}),I.d(J,"a",function(){return o}),I.d(J,"d",function(){return h}),I.d(J,"e",function(){return d}),I.d(J,"c",function(){return u});var N=I("8HAY"),g=I("Vhoy"),S=I("MI8n"),k=I("JYp7"),y=I("pmY6"),m=I("24hK"),C=I("nnTU"),_=I("T8No"),e=I("Cg/j"),f=I("t9D7"),r=function(s,l,E,b){var p=arguments.length,L=p<3?l:b===null?b=Object.getOwnPropertyDescriptor(l,E):b,R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(s,l,E,b);else for(var v=s.length-1;v>=0;v--)(R=s[v])&&(L=(p<3?R(L):p>3?R(l,E,L):R(l,E))||L);return p>3&&L&&Object.defineProperty(l,E,L),L},c=function(s,l){return function(E,b){l(E,b,s)}};function i(s){return s.command!==void 0}class n{constructor(s){this.id=n._idPool++,this._debugName=s}}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 o=Object(e.c)("menuService"),h=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new S.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:s=>s===n.CommandPalette}}addCommand(s){return this.addCommands(k.a.single(s))}addCommands(s){for(const l of s)this._commands.set(l.id,l);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(y.i)(()=>{let l=!1;for(const E of s)l=this._commands.delete(E.id)||l;l&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(s){return this._commands.get(s)}getCommands(){const s=new Map;return this._commands.forEach((l,E)=>s.set(E,l)),s}appendMenuItem(s,l){return this.appendMenuItems(k.a.single({id:s,item:l}))}appendMenuItems(s){const l=new Set,E=new m.a;for(const{id:b,item:p}of s){let L=this._menuItems.get(b);L||(L=new m.a,this._menuItems.set(b,L)),E.push(L.push(p)),l.add(b)}return this._onDidChangeMenu.fire(l),Object(y.i)(()=>{if(E.size>0){for(let b of E)b();this._onDidChangeMenu.fire(l),E.clear()}})}getMenuItems(s){let l;return this._menuItems.has(s)?l=[...this._menuItems.get(s)]:l=[],s===n.CommandPalette&&this._appendImplicitItems(l),l}_appendImplicitItems(s){const l=new Set;for(const E of s)i(E)&&(l.add(E.command.id),E.alt&&l.add(E.alt.id));this._commands.forEach((E,b)=>{l.has(b)||s.push({command:E})})}};class d extends N.e{constructor(s,l,E,b){super(`submenuitem.${s.submenu.id}`,typeof s.title=="string"?s.title:s.title.value,[],"submenu");this.item=s,this._menuService=l,this._contextKeyService=E,this._options=b}get actions(){const s=[],l=this._menuService.createMenu(this.item.submenu,this._contextKeyService),E=l.getActions(this._options);l.dispose();for(const[,b]of E)b.length>0&&(s.push(...b),s.push(new N.d));return s.length&&s.pop(),s}}let u=class s{constructor(l,E,b,p,L){var R,v;if(this._commandService=L,this.id=l.id,this.label=(b==null?void 0:b.renderShortTitle)&&l.shortTitle?typeof l.shortTitle=="string"?l.shortTitle:l.shortTitle.value:typeof l.title=="string"?l.title:l.title.value,this.tooltip=(v=typeof l.tooltip=="string"?l.tooltip:(R=l.tooltip)===null||R===void 0?void 0:R.value)!==null&&v!==void 0?v:"",this.enabled=!l.precondition||p.contextMatchesRules(l.precondition),this.checked=void 0,l.toggled){const x=l.toggled.condition?l.toggled:{condition:l.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=l,this.alt=E?new s(E,void 0,b,p,L):void 0,this._options=b,f.d.isThemeIcon(l.icon)&&(this.class=g.a.asClassName(l.icon))}dispose(){}run(...l){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,...l]),this._commandService.executeCommand(this.id,...p)}};u=r([c(3,_.b),c(4,C.b)],u)},fyJ8:function(H,J,I){"use strict";var N=I("rePB"),g=I("VTBJ"),S=I("Ff2n"),k=I("U8pU"),y=I("q1tI"),m=I.n(y),C=I("TSYQ"),_=I.n(C),e=I("c+Xe"),f=I("sR1s");function r(h){return h&&Object(k.a)(h)==="object"&&!Array.isArray(h)&&!y.isValidElement(h)}function c(h){return typeof h=="string"?!0:Object(e.c)(h)}function i(h,d){var u,s=h.prefixCls,l=h.className,E=h.record,b=h.index,p=h.dataIndex,L=h.render,R=h.children,v=h.component,x=v===void 0?"td":v,w=h.colSpan,T=h.rowSpan,F=h.fixLeft,P=h.fixRight,A=h.firstFixLeft,z=h.lastFixLeft,K=h.firstFixRight,O=h.lastFixRight,B=h.appendNode,U=h.additionalProps,D=U===void 0?{}:U,W=h.ellipsis,Q=h.align,re=h.rowType,ee=h.isSticky,ye="".concat(s,"-cell"),be,he;if(R)he=R;else{var Ie=Object(f.b)(E,p);if(he=Ie,L){var Se=L(Ie,E,b);r(Se)?(he=Se.children,be=Se.props):he=Se}}Object(k.a)(he)==="object"&&!Array.isArray(he)&&!y.isValidElement(he)&&(he=null),W&&(z||K)&&(he=y.createElement("span",{className:"".concat(ye,"-content")},he));var fe=be||{},ue=fe.colSpan,ie=fe.rowSpan,Ce=fe.style,ne=fe.className,ce=Object(S.a)(fe,["colSpan","rowSpan","style","className"]),Ae=ue!==void 0?ue:w,oe=ie!==void 0?ie:T;if(Ae===0||oe===0)return null;var q={},$=typeof F=="number",X=typeof P=="number";$&&(q.position="sticky",q.left=F),X&&(q.position="sticky",q.right=P);var de={};Q&&(de.textAlign=Q);var pe,xe=W===!0?{showTitle:!0}:W;xe&&(xe.showTitle||re==="header")&&(typeof he=="string"||typeof he=="number"?pe=he.toString():y.isValidElement(he)&&typeof he.props.children=="string"&&(pe=he.props.children));var Ke=Object(g.a)(Object(g.a)(Object(g.a)({title:pe},ce),D),{},{colSpan:Ae&&Ae!==1?Ae:null,rowSpan:oe&&oe!==1?oe:null,className:_()(ye,l,(u={},Object(N.a)(u,"".concat(ye,"-fix-left"),$),Object(N.a)(u,"".concat(ye,"-fix-left-first"),A),Object(N.a)(u,"".concat(ye,"-fix-left-last"),z),Object(N.a)(u,"".concat(ye,"-fix-right"),X),Object(N.a)(u,"".concat(ye,"-fix-right-first"),K),Object(N.a)(u,"".concat(ye,"-fix-right-last"),O),Object(N.a)(u,"".concat(ye,"-ellipsis"),W),Object(N.a)(u,"".concat(ye,"-with-append"),B),Object(N.a)(u,"".concat(ye,"-fix-sticky"),($||X)&&ee),u),D.className,ne),style:Object(g.a)(Object(g.a)(Object(g.a)(Object(g.a)({},D.style),de),q),Ce),ref:c(x)?d:null});return y.createElement(x,Object.assign({},Ke),B,he)}var n=y.forwardRef(i);n.displayName="Cell";var o=y.memo(n,function(h,d){return d.shouldCellUpdate?!d.shouldCellUpdate(d.record,h.record):!1});J.a=o},gRFJ:function(H,J,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(J){var I=meta[J];return typeof I=="string"?I:"\\u"+("0000"+J.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+H+'"'}function str(H,J){var I,N,g,S,k=gap,y,m=J[H];m&&typeof m=="object"&&typeof m.toJSON=="function"&&(m=m.toJSON(H)),typeof rep=="function"&&(m=rep.call(J,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,y=[],Object.prototype.toString.apply(m)==="[object Array]"){for(S=m.length,I=0;I<S;I+=1)y[I]=str(I,m)||"null";return g=y.length===0?"[]":gap?`[
`+gap+y.join(`,
`+gap)+`
`+k+"]":"["+y.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&&y.push(quote(N)+(gap?": ":":")+g));else for(N in m)Object.prototype.hasOwnProperty.call(m,N)&&(g=str(N,m),g&&y.push(quote(N)+(gap?": ":":")+g));return g=y.length===0?"{}":gap?`{
`+gap+y.join(`,
`+gap)+`
`+k+"}":"{"+y.join(",")+"}",gap=k,g}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(H,J,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=J,J&&typeof J!="function"&&(typeof J!="object"||typeof J.length!="number"))throw new Error("JSON.stringify");return str("",{"":H})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(H,J){var I,N,g=H[J];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,J,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,J,I){(function(N,g,S){H.exports=J=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,J,I){"use strict";I.d(J,"a",function(){return A});var N=I("q1tI"),g=I.n(N),S=I("TSYQ"),k=I.n(S),y={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 D=Date.now(),W=!1;Object.keys(B).forEach(function(Q){var re=B[Q].current;if(!re)return;W=!0;var ee=re.style;ee.transitionDuration=".3s, .3s, .3s, .06s",U.current&&D-U.current<100&&(ee.transitionDuration="0s, 0s")}),W&&(U.current=Date.now())}),[B]};function C(){return C=Object.assign||function(K){for(var O=1;O<arguments.length;O++){var B=arguments[O];for(var U in B)Object.prototype.hasOwnProperty.call(B,U)&&(K[U]=B[U])}return K},C.apply(this,arguments)}function _(K,O){return i(K)||c(K,O)||f(K,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 f(K,O){if(!K)return;if(typeof K=="string")return r(K,O);var B=Object.prototype.toString.call(K).slice(8,-1);if(B==="Object"&&K.constructor&&(B=K.constructor.name),B==="Map"||B==="Set")return Array.from(K);if(B==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(B))return r(K,O)}function r(K,O){(O==null||O>K.length)&&(O=K.length);for(var B=0,U=new Array(O);B<O;B++)U[B]=K[B];return U}function c(K,O){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(K)))return;var B=[],U=!0,D=!1,W=void 0;try{for(var Q=K[Symbol.iterator](),re;!(U=(re=Q.next()).done)&&!(B.push(re.value),O&&B.length===O);U=!0);}catch(ee){D=!0,W=ee}finally{try{!U&&Q.return!=null&&Q.return()}finally{if(D)throw W}}return B}function i(K){if(Array.isArray(K))return K}function n(K,O){if(K==null)return{};var B=o(K,O),U,D;if(Object.getOwnPropertySymbols){var W=Object.getOwnPropertySymbols(K);for(D=0;D<W.length;D++){if(U=W[D],O.indexOf(U)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(K,U))continue;B[U]=K[U]}}return B}function o(K,O){if(K==null)return{};var B={},U=Object.keys(K),D,W;for(W=0;W<U.length;W++){if(D=U[W],O.indexOf(D)>=0)continue;B[D]=K[D]}return B}var h=function(O){var B=O.className,U=O.percent,D=O.prefixCls,W=O.strokeColor,Q=O.strokeLinecap,re=O.strokeWidth,ee=O.style,ye=O.trailColor,be=O.trailWidth,he=O.transition,Ie=n(O,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete Ie.gapPosition;var Se=Array.isArray(U)?U:[U],fe=Array.isArray(W)?W:[W],ue=m(Se),ie=_(ue,1),Ce=ie[0],ne=re/2,ce=100-re/2,Ae="M ".concat(Q==="round"?ne:0,",").concat(ne,`
L `).concat(Q==="round"?ce:100,",").concat(ne),oe="0 0 100 ".concat(re),q=0;return g.a.createElement("svg",C({className:k()("".concat(D,"-line"),B),viewBox:oe,preserveAspectRatio:"none",style:ee},Ie),g.a.createElement("path",{className:"".concat(D,"-line-trail"),d:Ae,strokeLinecap:Q,stroke:ye,strokeWidth:be||re,fillOpacity:"0"}),Se.map(function($,X){var de={strokeDasharray:"".concat($,"px, 100px"),strokeDashoffset:"-".concat(q,"px"),transition:he||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},pe=fe[X]||fe[fe.length-1];return q+=$,g.a.createElement("path",{key:X,className:"".concat(D,"-line-path"),d:Ae,strokeLinecap:Q,stroke:pe,strokeWidth:re,fillOpacity:"0",ref:Ce[X],style:de})}))};h.defaultProps=y;var d=h;function u(){return u=Object.assign||function(K){for(var O=1;O<arguments.length;O++){var B=arguments[O];for(var U in B)Object.prototype.hasOwnProperty.call(B,U)&&(K[U]=B[U])}return K},u.apply(this,arguments)}function s(K,O){return L(K)||p(K,O)||E(K,O)||l()}function l(){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(K,O){if(!K)return;if(typeof K=="string")return b(K,O);var B=Object.prototype.toString.call(K).slice(8,-1);if(B==="Object"&&K.constructor&&(B=K.constructor.name),B==="Map"||B==="Set")return Array.from(K);if(B==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(B))return b(K,O)}function b(K,O){(O==null||O>K.length)&&(O=K.length);for(var B=0,U=new Array(O);B<O;B++)U[B]=K[B];return U}function p(K,O){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(K)))return;var B=[],U=!0,D=!1,W=void 0;try{for(var Q=K[Symbol.iterator](),re;!(U=(re=Q.next()).done)&&!(B.push(re.value),O&&B.length===O);U=!0);}catch(ee){D=!0,W=ee}finally{try{!U&&Q.return!=null&&Q.return()}finally{if(D)throw W}}return B}function L(K){if(Array.isArray(K))return K}function R(K,O){if(K==null)return{};var B=v(K,O),U,D;if(Object.getOwnPropertySymbols){var W=Object.getOwnPropertySymbols(K);for(D=0;D<W.length;D++){if(U=W[D],O.indexOf(U)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(K,U))continue;B[U]=K[U]}}return B}function v(K,O){if(K==null)return{};var B={},U=Object.keys(K),D,W;for(W=0;W<U.length;W++){if(D=U[W],O.indexOf(D)>=0)continue;B[D]=K[D]}return B}var x=0;function w(K){return+K.replace("%","")}function T(K){return Array.isArray(K)?K:[K]}function F(K,O,B,U){var D=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,W=arguments.length>5?arguments[5]:void 0,Q=50-U/2,re=0,ee=-Q,ye=0,be=-2*Q;switch(W){case"left":re=-Q,ee=0,ye=2*Q,be=0;break;case"right":re=Q,ee=0,ye=-2*Q,be=0;break;case"bottom":ee=Q,be=2*Q;break;default:}var he="M 50,50 m ".concat(re,",").concat(ee,`
a `).concat(Q,",").concat(Q," 0 1 1 ").concat(ye,",").concat(-be,`
a `).concat(Q,",").concat(Q," 0 1 1 ").concat(-ye,",").concat(be),Ie=Math.PI*2*Q,Se={stroke:B,strokeDasharray:"".concat(O/100*(Ie-D),"px ").concat(Ie,"px"),strokeDashoffset:"-".concat(D/2+K/100*(Ie-D),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:he,pathStyle:Se}}var P=function(O){var B=O.prefixCls,U=O.strokeWidth,D=O.trailWidth,W=O.gapDegree,Q=O.gapPosition,re=O.trailColor,ee=O.strokeLinecap,ye=O.style,be=O.className,he=O.strokeColor,Ie=O.percent,Se=R(O,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),fe=Object(N.useMemo)(function(){return x+=1,x},[]),ue=F(0,100,re,U,W,Q),ie=ue.pathString,Ce=ue.pathStyle,ne=T(Ie),ce=T(he),Ae=ce.find(function(de){return Object.prototype.toString.call(de)==="[object Object]"}),oe=m(ne),q=s(oe,1),$=q[0],X=function(){var pe=0;return ne.map(function(xe,Ke){var qe=ce[Ke]||ce[ce.length-1],tt=Object.prototype.toString.call(qe)==="[object Object]"?"url(#".concat(B,"-gradient-").concat(fe,")"):"",et=F(pe,xe,qe,U,W,Q);return pe+=xe,g.a.createElement("path",{key:Ke,className:"".concat(B,"-circle-path"),d:et.pathString,stroke:tt,strokeLinecap:ee,strokeWidth:U,opacity:xe===0?0:1,fillOpacity:"0",style:et.pathStyle,ref:$[Ke]})})};return g.a.createElement("svg",u({className:k()("".concat(B,"-circle"),be),viewBox:"0 0 100 100",style:ye},Se),Ae&&g.a.createElement("defs",null,g.a.createElement("linearGradient",{id:"".concat(B,"-gradient-").concat(fe),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(Ae).sort(function(de,pe){return w(de)-w(pe)}).map(function(de,pe){return g.a.createElement("stop",{key:pe,offset:de,stopColor:Ae[de]})}))),g.a.createElement("path",{className:"".concat(B,"-circle-trail"),d:ie,stroke:re,strokeLinecap:ee,strokeWidth:D||U,fillOpacity:"0",style:Ce}),X().reverse())};P.defaultProps=y;var A=P,z={Line:d,Circle:A}},hW8S:function(H,J,I){"use strict";I.d(J,"a",function(){return k}),I.d(J,"c",function(){return y}),I.d(J,"b",function(){return m});var N=I("VTBJ"),g=I("Ff2n"),S=I("Kwbf"),k="RC_TABLE_INTERNAL_COL_DEFINE";function y(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,J,I){},ic2d:function(H,J,I){"use strict";I.d(J,"a",function(){return k});var N=I("FWmy"),g=I("746U");class S{constructor(){this.data=new Map}add(y,m){N.a(g.l(y)),N.a(g.k(m)),N.a(!this.data.has(y),"There is already an extension with this id"),this.data.set(y,m)}as(y){return this.data.get(y)||null}}const k=new S},jO9C:function(H,J,I){(function(N,g,S){H.exports=J=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,J,I){var N=I("5nXd"),g=I("gRFJ"),S=[I("uQRt")];H.exports=N.createStore(g,S)},k3GJ:function(H,J,I){"use strict";I.d(J,"a",function(){return Rn});var N=I("rePB"),g=I("ODXe"),S=I("Ff2n"),k=I("VTBJ"),y=I("q1tI"),m=I("TSYQ"),C=I.n(m),_=I("Zm9Q"),e=I("6cGi"),f=I("KQm4"),r=I("xEkU"),c=I.n(r),i=I("t23M");function n(Pe){var Ye=Object(y.useRef)(),Ze=Object(y.useRef)(!1);function Ue(){for(var _e=arguments.length,Le=new Array(_e),Te=0;Te<_e;Te++)Le[Te]=arguments[Te];Ze.current||(c.a.cancel(Ye.current),Ye.current=c()(function(){Pe.apply(void 0,Le)}))}return Object(y.useEffect)(function(){return function(){Ze.current=!0,c.a.cancel(Ye.current)}},[]),Ue}function o(Pe){var Ye=Object(y.useRef)([]),Ze=Object(y.useState)({}),Ue=Object(g.a)(Ze,2),_e=Ue[1],Le=Object(y.useRef)(typeof Pe=="function"?Pe():Pe),Te=n(function(){var Ge=Le.current;Ye.current.forEach(function(Je){Ge=Je(Ge)}),Ye.current=[],Le.current=Ge,_e({})});function Be(Ge){Ye.current.push(Ge),Te()}return[Le.current,Be]}var h=I("4IlW");function d(Pe,Ye){var Ze,Ue=Pe.prefixCls,_e=Pe.id,Le=Pe.active,Te=Pe.rtl,Be=Pe.tab,Ge=Be.key,Je=Be.tab,$e=Be.disabled,ot=Be.closeIcon,dt=Pe.tabBarGutter,St=Pe.tabPosition,Tt=Pe.closable,Pt=Pe.renderWrapper,tr=Pe.removeAriaLabel,_r=Pe.editable,wr=Pe.onClick,Or=Pe.onRemove,Mr=Pe.onFocus,Lr="".concat(Ue,"-tab");y.useEffect(function(){return Or},[]);var Ar={};St==="top"||St==="bottom"?Ar[Te?"marginLeft":"marginRight"]=dt:Ar.marginBottom=dt;var Yr=_r&&Tt!==!1&&!$e;function Ur(dr){if($e)return;wr(dr)}function In(dr){dr.preventDefault(),dr.stopPropagation(),_r.onEdit("remove",{key:Ge,event:dr})}var Br=y.createElement("div",{key:Ge,ref:Ye,className:C()(Lr,(Ze={},Object(N.a)(Ze,"".concat(Lr,"-with-remove"),Yr),Object(N.a)(Ze,"".concat(Lr,"-active"),Le),Object(N.a)(Ze,"".concat(Lr,"-disabled"),$e),Ze)),style:Ar,onClick:Ur},y.createElement("div",{role:"tab","aria-selected":Le,id:_e&&"".concat(_e,"-tab-").concat(Ge),className:"".concat(Lr,"-btn"),"aria-controls":_e&&"".concat(_e,"-panel-").concat(Ge),"aria-disabled":$e,tabIndex:$e?null:0,onClick:function(ar){ar.stopPropagation(),Ur(ar)},onKeyDown:function(ar){[h.a.SPACE,h.a.ENTER].includes(ar.which)&&(ar.preventDefault(),Ur(ar))},onFocus:Mr},Je),Yr&&y.createElement("button",{type:"button","aria-label":tr||"remove",tabIndex:0,className:"".concat(Lr,"-remove"),onClick:function(ar){ar.stopPropagation(),In(ar)}},ot||_r.removeIcon||"\xD7"));return Pt&&(Br=Pt(Br)),Br}var u=y.forwardRef(d),s={width:0,height:0,left:0,top:0};function l(Pe,Ye,Ze){return Object(y.useMemo)(function(){for(var Ue,_e=new Map,Le=Ye.get((Ue=Pe[0])===null||Ue===void 0?void 0:Ue.key)||s,Te=Le.left+Le.width,Be=0;Be<Pe.length;Be+=1){var Ge=Pe[Be].key,Je=Ye.get(Ge);if(!Je){var $e;Je=Ye.get(($e=Pe[Be-1])===null||$e===void 0?void 0:$e.key)||s}var ot=_e.get(Ge)||Object(k.a)({},Je);ot.right=Te-ot.left-ot.width,_e.set(Ge,ot)}return _e},[Pe.map(function(Ue){return Ue.key}).join("_"),Ye,Ze])}var E={width:0,height:0,left:0,top:0,right:0};function b(Pe,Ye,Ze,Ue,_e){var Le=_e.tabs,Te=_e.tabPosition,Be=_e.rtl,Ge,Je,$e;["top","bottom"].includes(Te)?(Ge="width",Je=Be?"right":"left",$e=Math.abs(Ye.left)):(Ge="height",Je="top",$e=-Ye.top);var ot=Ye[Ge],dt=Ze[Ge],St=Ue[Ge],Tt=ot;return dt+St>ot&&(Tt=ot-St),Object(y.useMemo)(function(){if(!Le.length)return[0,0];for(var Pt=Le.length,tr=Pt,_r=0;_r<Pt;_r+=1){var wr=Pe.get(Le[_r].key)||E;if(wr[Je]+wr[Ge]>$e+Tt){tr=_r-1;break}}for(var Or=0,Mr=Pt-1;Mr>=0;Mr-=1){var Lr=Pe.get(Le[Mr].key)||E;if(Lr[Je]<$e){Or=Mr+1;break}}return[Or,tr]},[Pe,$e,Tt,Te,Le.map(function(Pt){return Pt.key}).join("_"),Be])}var p=I("wx14"),L=I("1OyB"),R=I("vuIU"),v=I("JX7q"),x=I("Ji7U"),w=I("LK+K"),T=I("I8Z2"),F=I("bT9E"),P=I("2GS6"),A=I("Gytx"),z=I.n(A),K=I("U8pU"),O=/iPhone/i,B=/iPod/i,U=/iPad/i,D=/\bAndroid(?:.+)Mobile\b/i,W=/Android/i,Q=/\bAndroid(?:.+)SD4930UR\b/i,re=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,ee=/Windows Phone/i,ye=/\bWindows(?:.+)ARM\b/i,be=/BlackBerry/i,he=/BB10/i,Ie=/Opera Mini/i,Se=/\b(CriOS|Chrome)(?:.+)Mobile/i,fe=/Mobile(?:.+)Firefox\b/i;function ue(Pe,Ye){return Pe.test(Ye)}function ie(Pe){var Ye=Pe||(typeof navigator!="undefined"?navigator.userAgent:""),Ze=(Ye||"").split("[FBAN");if(typeof Ze[1]!="undefined"){var Ue=Ze,_e=Object(g.a)(Ue,1);Ye=_e[0]}if(Ze=Ye.split("Twitter"),typeof Ze[1]!="undefined"){var Le=Ze,Te=Object(g.a)(Le,1);Ye=Te[0]}var Be={apple:{phone:ue(O,Ye)&&!ue(ee,Ye),ipod:ue(B,Ye),tablet:!ue(O,Ye)&&ue(U,Ye)&&!ue(ee,Ye),device:(ue(O,Ye)||ue(B,Ye)||ue(U,Ye))&&!ue(ee,Ye)},amazon:{phone:ue(Q,Ye),tablet:!ue(Q,Ye)&&ue(re,Ye),device:ue(Q,Ye)||ue(re,Ye)},android:{phone:!ue(ee,Ye)&&ue(Q,Ye)||!ue(ee,Ye)&&ue(D,Ye),tablet:!ue(ee,Ye)&&!ue(Q,Ye)&&!ue(D,Ye)&&(ue(re,Ye)||ue(W,Ye)),device:!ue(ee,Ye)&&(ue(Q,Ye)||ue(re,Ye)||ue(D,Ye)||ue(W,Ye))||ue(/\bokhttp\b/i,Ye)},windows:{phone:ue(ee,Ye),tablet:ue(ye,Ye),device:ue(ee,Ye)||ue(ye,Ye)},other:{blackberry:ue(be,Ye),blackberry10:ue(he,Ye),opera:ue(Ie,Ye),firefox:ue(fe,Ye),chrome:ue(Se,Ye),device:ue(be,Ye)||ue(he,Ye)||ue(Ie,Ye)||ue(fe,Ye)||ue(Se,Ye)},any:null,phone:null,tablet:null};return Be.any=Be.apple.device||Be.android.device||Be.windows.device||Be.other.device,Be.phone=Be.apple.phone||Be.android.phone||Be.windows.phone,Be.tablet=Be.apple.tablet||Be.android.tablet||Be.windows.tablet,Be}var Ce=Object(k.a)(Object(k.a)({},ie()),{},{isMobile:ie}),ne=Ce;function ce(){}function Ae(Pe,Ye,Ze){var Ue=Ye||"";return Pe.key||"".concat(Ue,"item_").concat(Ze)}function oe(Pe){return"".concat(Pe,"-menu-")}function q(Pe,Ye){var Ze=-1;y.Children.forEach(Pe,function(Ue){Ze+=1,Ue&&Ue.type&&Ue.type.isMenuItemGroup?y.Children.forEach(Ue.props.children,function(_e){Ze+=1,Ye(_e,Ze)}):Ye(Ue,Ze)})}function $(Pe,Ye,Ze){if(!Pe||Ze.find)return;y.Children.forEach(Pe,function(Ue){if(Ue){var _e=Ue.type;if(!_e||!(_e.isSubMenu||_e.isMenuItem||_e.isMenuItemGroup))return;Ye.indexOf(Ue.key)!==-1?Ze.find=!0:Ue.props.children&&$(Ue.props.children,Ye,Ze)}})}var X=["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"],de=function(Ye){var Ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ue=Ye&&typeof Ye.getBoundingClientRect=="function"&&Ye.getBoundingClientRect().width;if(Ue){if(Ze){var _e=getComputedStyle(Ye),Le=_e.marginLeft,Te=_e.marginRight;Ue+=+Le.replace("px","")+ +Te.replace("px","")}Ue=+Ue.toFixed(6)}return Ue||0},pe=function(Ye,Ze,Ue){Ye&&Object(K.a)(Ye.style)==="object"&&(Ye.style[Ze]=Ue)},xe=function(){return ne.any},Ke=I("bdgK"),qe=I("i8i4"),tt=I.n(qe),et=I("wgJM"),it=I("l4aY"),at=I("m+aA"),je=I("c+Xe"),De=I("zT1h"),nt=I("QC+M");function lt(Pe,Ye,Ze){return Ze?Pe[0]===Ye[0]:Pe[0]===Ye[0]&&Pe[1]===Ye[1]}function Ve(Pe,Ye,Ze){var Ue=Pe[Ye]||{};return Object(k.a)(Object(k.a)({},Ue),Ze)}function Qe(Pe,Ye,Ze,Ue){for(var _e=Ze.points,Le=Object.keys(Pe),Te=0;Te<Le.length;Te+=1){var Be=Le[Te];if(lt(Pe[Be].points,_e,Ue))return"".concat(Ye,"-placement-").concat(Be)}return""}var Fe=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var Pe=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(Pe)||/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(Pe==null?void 0:Pe.substr(0,4)))},Re=I("MNnm");function Me(Pe,Ye){var Ze={};return Ze[Pe.toLowerCase()]=Ye.toLowerCase(),Ze["Webkit".concat(Pe)]="webkit".concat(Ye),Ze["Moz".concat(Pe)]="moz".concat(Ye),Ze["ms".concat(Pe)]="MS".concat(Ye),Ze["O".concat(Pe)]="o".concat(Ye.toLowerCase()),Ze}function Ee(Pe,Ye){var Ze={animationend:Me("Animation","AnimationEnd"),transitionend:Me("Transition","TransitionEnd")};return Pe&&("AnimationEvent"in Ye||delete Ze.animationend.animation,"TransitionEvent"in Ye||delete Ze.transitionend.transition),Ze}var Oe=Ee(Object(Re.a)(),typeof window!="undefined"?window:{}),ke={};if(Object(Re.a)()){var Ne=document.createElement("div");ke=Ne.style}var He={};function rt(Pe){if(He[Pe])return He[Pe];var Ye=Oe[Pe];if(Ye)for(var Ze=Object.keys(Ye),Ue=Ze.length,_e=0;_e<Ue;_e+=1){var Le=Ze[_e];if(Object.prototype.hasOwnProperty.call(Ye,Le)&&Le in ke)return He[Pe]=Ye[Le],He[Pe]}return""}var ct=rt("animationend"),yt=rt("transitionend"),ht=!!(ct&&yt),pt=ct||"animationend",Dt=yt||"transitionend";function At(Pe,Ye){if(!Pe)return null;if(Object(K.a)(Pe)==="object"){var Ze=Ye.replace(/-\w/g,function(Ue){return Ue[1].toUpperCase()});return Pe[Ze]}return"".concat(Pe,"-").concat(Ye)}var bt="none",Xt="appear",Gt="enter",rr="leave",sr="none",Kt="prepare",kt="start",ir="active",_t="end";function Mt(Pe){var Ye=Object(y.useRef)(!1),Ze=Object(y.useState)(Pe),Ue=Object(g.a)(Ze,2),_e=Ue[0],Le=Ue[1];function Te(Be){Ye.current||Le(Be)}return Object(y.useEffect)(function(){return function(){Ye.current=!0}},[]),[_e,Te]}var Rt=Object(Re.a)()?y.useLayoutEffect:y.useEffect,Ot=Rt,qt=function(){var Pe=y.useRef(null);function Ye(){et.a.cancel(Pe.current)}function Ze(Ue){var _e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;Ye();var Le=Object(et.a)(function(){_e<=1?Ue({isCanceled:function(){return Le!==Pe.current}}):Ze(Ue,_e-1)});Pe.current=Le}return y.useEffect(function(){return function(){Ye()}},[]),[Ze,Ye]},Jr=[Kt,kt,ir,_t],Et=!1,It=!0;function wt(Pe){return Pe===ir||Pe===_t}var Er=function(Pe,Ye){var Ze=y.useState(sr),Ue=Object(g.a)(Ze,2),_e=Ue[0],Le=Ue[1],Te=qt(),Be=Object(g.a)(Te,2),Ge=Be[0],Je=Be[1];function $e(){Le(Kt)}return Ot(function(){if(_e!==sr&&_e!==_t){var ot=Jr.indexOf(_e),dt=Jr[ot+1],St=Ye(_e);St===Et?Le(dt):Ge(function(Tt){function Pt(){if(Tt.isCanceled())return;Le(dt)}St===!0?Pt():Promise.resolve(St).then(Pt)})}},[Pe,_e]),y.useEffect(function(){return function(){Je()}},[]),[$e,_e]},nr=function(Pe){var Ye=Object(y.useRef)(),Ze=Object(y.useRef)(Pe);Ze.current=Pe;var Ue=y.useCallback(function(Te){Ze.current(Te)},[]);function _e(Te){Te&&(Te.removeEventListener(Dt,Ue),Te.removeEventListener(pt,Ue))}function Le(Te){Ye.current&&Ye.current!==Te&&_e(Ye.current),Te&&Te!==Ye.current&&(Te.addEventListener(Dt,Ue),Te.addEventListener(pt,Ue),Ye.current=Te)}return y.useEffect(function(){return function(){_e(Ye.current)}},[]),[Le,_e]};function Bt(Pe,Ye,Ze,Ue){var _e=Ue.motionEnter,Le=_e===void 0?!0:_e,Te=Ue.motionAppear,Be=Te===void 0?!0:Te,Ge=Ue.motionLeave,Je=Ge===void 0?!0:Ge,$e=Ue.motionDeadline,ot=Ue.motionLeaveImmediately,dt=Ue.onAppearPrepare,St=Ue.onEnterPrepare,Tt=Ue.onLeavePrepare,Pt=Ue.onAppearStart,tr=Ue.onEnterStart,_r=Ue.onLeaveStart,wr=Ue.onAppearActive,Or=Ue.onEnterActive,Mr=Ue.onLeaveActive,Lr=Ue.onAppearEnd,Ar=Ue.onEnterEnd,Yr=Ue.onLeaveEnd,Ur=Ue.onVisibleChanged,In=Mt(),Br=Object(g.a)(In,2),dr=Br[0],ar=Br[1],Wr=Mt(bt),$r=Object(g.a)(Wr,2),Zt=$r[0],rn=$r[1],Dn=Mt(null),sn=Object(g.a)(Dn,2),yn=sn[0],mn=sn[1],Wn=Object(y.useRef)(!1),ri=Object(y.useRef)(null),Mn=Object(y.useRef)(!1),xi=Object(y.useRef)(null);function Wi(){var wn=Ze();return wn||xi.current}var Ci=Object(y.useRef)(!1);function ni(wn){var pn=Wi();if(wn&&!wn.deadline&&wn.target!==pn)return;var ii;Zt===Xt&&Ci.current?ii=Lr==null?void 0:Lr(pn,wn):Zt===Gt&&Ci.current?ii=Ar==null?void 0:Ar(pn,wn):Zt===rr&&Ci.current&&(ii=Yr==null?void 0:Yr(pn,wn)),ii!==!1&&!Mn.current&&(rn(bt),mn(null))}var Tn=nr(ni),bn=Object(g.a)(Tn,1),Pn=bn[0],Ln=y.useMemo(function(){var wn,pn,ii;switch(Zt){case"appear":return wn={},Object(N.a)(wn,Kt,dt),Object(N.a)(wn,kt,Pt),Object(N.a)(wn,ir,wr),wn;case"enter":return pn={},Object(N.a)(pn,Kt,St),Object(N.a)(pn,kt,tr),Object(N.a)(pn,ir,Or),pn;case"leave":return ii={},Object(N.a)(ii,Kt,Tt),Object(N.a)(ii,kt,_r),Object(N.a)(ii,ir,Mr),ii;default:return{}}},[Zt]),Gi=Er(Zt,function(wn){if(wn===Kt){var pn=Ln[Kt];return pn?pn(Wi()):Et}if(gn in Ln){var ii;mn(((ii=Ln[gn])===null||ii===void 0?void 0:ii.call(Ln,Wi(),null))||null)}return gn===ir&&(Pn(Wi()),$e>0&&(clearTimeout(ri.current),ri.current=setTimeout(function(){ni({deadline:!0})},$e))),It}),ta=Object(g.a)(Gi,2),ra=ta[0],gn=ta[1],Ji=wt(gn);Ci.current=Ji,Ot(function(){ar(Ye);var wn=Wn.current;if(Wn.current=!0,!Pe)return;var pn;!wn&&Ye&&Be&&(pn=Xt),wn&&Ye&&Le&&(pn=Gt),(wn&&!Ye&&Je||!wn&&ot&&!Ye&&Je)&&(pn=rr),pn&&(rn(pn),ra())},[Ye]),Object(y.useEffect)(function(){(Zt===Xt&&!Be||Zt===Gt&&!Le||Zt===rr&&!Je)&&rn(bt)},[Be,Le,Je]),Object(y.useEffect)(function(){return function(){clearTimeout(ri.current),Mn.current=!0}},[]),Object(y.useEffect)(function(){dr!==void 0&&Zt===bt&&(Ur==null||Ur(dr))},[dr,Zt]);var na=yn;return Ln[Kt]&&gn===kt&&(na=Object(k.a)({transition:"none"},na)),[Zt,gn,na,dr!=null?dr:Ye]}var Nt=function(Pe){Object(x.a)(Ze,Pe);var Ye=Object(w.a)(Ze);function Ze(){return Object(L.a)(this,Ze),Ye.apply(this,arguments)}return Object(R.a)(Ze,[{key:"render",value:function(){return this.props.children}}]),Ze}(y.Component),vr=Nt;function Qr(Pe){var Ye=Pe;Object(K.a)(Pe)==="object"&&(Ye=Pe.transitionSupport);function Ze(_e){return!!(_e.motionName&&Ye)}var Ue=y.forwardRef(function(_e,Le){var Te=_e.visible,Be=Te===void 0?!0:Te,Ge=_e.removeOnLeave,Je=Ge===void 0?!0:Ge,$e=_e.forceRender,ot=_e.children,dt=_e.motionName,St=_e.leavedClassName,Tt=_e.eventProps,Pt=Ze(_e),tr=Object(y.useRef)(),_r=Object(y.useRef)();function wr(){try{return Object(at.a)(tr.current||_r.current)}catch(rn){return null}}var Or=Bt(Pt,Be,wr,_e),Mr=Object(g.a)(Or,4),Lr=Mr[0],Ar=Mr[1],Yr=Mr[2],Ur=Mr[3],In=y.useRef(Ur);Ur&&(In.current=!0);var Br=Object(y.useRef)(Le);Br.current=Le;var dr=y.useCallback(function(rn){tr.current=rn,Object(je.b)(Br.current,rn)},[]),ar,Wr=Object(k.a)(Object(k.a)({},Tt),{},{visible:Be});if(!ot)ar=null;else if(Lr===bt||!Ze(_e))Ur?ar=ot(Object(k.a)({},Wr),dr):!Je&&In.current?ar=ot(Object(k.a)(Object(k.a)({},Wr),{},{className:St}),dr):$e?ar=ot(Object(k.a)(Object(k.a)({},Wr),{},{style:{display:"none"}}),dr):ar=null;else{var $r,Zt;Ar===Kt?Zt="prepare":wt(Ar)?Zt="active":Ar===kt&&(Zt="start"),ar=ot(Object(k.a)(Object(k.a)({},Wr),{},{className:C()(At(dt,Lr),($r={},Object(N.a)($r,At(dt,"".concat(Lr,"-").concat(Zt)),Zt),Object(N.a)($r,dt,typeof dt=="string"),$r)),style:Yr}),dr)}return y.createElement(vr,{ref:_r},ar)});return Ue.displayName="CSSMotion",Ue}var Cr=Qr(ht),vt="add",Ht="keep",Zr="remove",ln="removed";function kn(Pe){var Ye;return Pe&&Object(K.a)(Pe)==="object"&&"key"in Pe?Ye=Pe:Ye={key:Pe},Object(k.a)(Object(k.a)({},Ye),{},{key:String(Ye.key)})}function Cn(){var Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Pe.map(kn)}function le(){var Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ze=[],Ue=0,_e=Ye.length,Le=Cn(Pe),Te=Cn(Ye);Le.forEach(function(Je){for(var $e=!1,ot=Ue;ot<_e;ot+=1){var dt=Te[ot];if(dt.key===Je.key){Ue<ot&&(Ze=Ze.concat(Te.slice(Ue,ot).map(function(St){return Object(k.a)(Object(k.a)({},St),{},{status:vt})})),Ue=ot),Ze.push(Object(k.a)(Object(k.a)({},dt),{},{status:Ht})),Ue+=1,$e=!0;break}}$e||Ze.push(Object(k.a)(Object(k.a)({},Je),{},{status:Zr}))}),Ue<_e&&(Ze=Ze.concat(Te.slice(Ue).map(function(Je){return Object(k.a)(Object(k.a)({},Je),{},{status:vt})})));var Be={};Ze.forEach(function(Je){var $e=Je.key;Be[$e]=(Be[$e]||0)+1});var Ge=Object.keys(Be).filter(function(Je){return Be[Je]>1});return Ge.forEach(function(Je){Ze=Ze.filter(function($e){var ot=$e.key,dt=$e.status;return ot!==Je||dt!==Zr}),Ze.forEach(function($e){$e.key===Je&&($e.status=Ht)})}),Ze}var V=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function Y(Pe){var Ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Cr,Ze=function(Ue){Object(x.a)(Le,Ue);var _e=Object(w.a)(Le);function Le(){var Te;return Object(L.a)(this,Le),Te=_e.apply(this,arguments),Te.state={keyEntities:[]},Te.removeKey=function(Be){Te.setState(function(Ge){var Je=Ge.keyEntities;return{keyEntities:Je.map(function($e){return $e.key!==Be?$e:Object(k.a)(Object(k.a)({},$e),{},{status:ln})})}})},Te}return Object(R.a)(Le,[{key:"render",value:function(){var Be=this,Ge=this.state.keyEntities,Je=this.props,$e=Je.component,ot=Je.children,dt=Je.onVisibleChanged,St=Object(S.a)(Je,["component","children","onVisibleChanged"]),Tt=$e||y.Fragment,Pt={};return V.forEach(function(tr){Pt[tr]=St[tr],delete St[tr]}),delete St.keys,y.createElement(Tt,St,Ge.map(function(tr){var _r=tr.status,wr=Object(S.a)(tr,["status"]),Or=_r===vt||_r===Ht;return y.createElement(Ye,Object(p.a)({},Pt,{key:wr.key,visible:Or,eventProps:wr,onVisibleChanged:function(Lr){dt==null||dt(Lr,{key:wr.key}),Lr||Be.removeKey(wr.key)}}),ot)}))}}],[{key:"getDerivedStateFromProps",value:function(Be,Ge){var Je=Be.keys,$e=Ge.keyEntities,ot=Cn(Je),dt=le($e,ot);return{keyEntities:dt.filter(function(St){var Tt=$e.find(function(Pt){var tr=Pt.key;return St.key===tr});return!(Tt&&Tt.status===ln&&St.status===Zr)})}}}]),Le}(y.Component);return Ze.defaultProps={component:"div"},Ze}var te=Y(ht),ve=Cr;function ae(Pe){var Ye=Pe.prefixCls,Ze=Pe.motion,Ue=Pe.animation,_e=Pe.transitionName;return Ze||(Ue?{motionName:"".concat(Ye,"-").concat(Ue)}:_e?{motionName:_e}:null)}function ze(Pe){var Ye=Pe.prefixCls,Ze=Pe.visible,Ue=Pe.zIndex,_e=Pe.mask,Le=Pe.maskMotion,Te=Pe.maskAnimation,Be=Pe.maskTransitionName;if(!_e)return null;var Ge={};return(Le||Be||Te)&&(Ge=Object(k.a)({motionAppear:!0},ae({motion:Le,prefixCls:Ye,transitionName:Be,animation:Te}))),y.createElement(ve,Object(p.a)({},Ge,{visible:Ze,removeOnLeave:!0}),function(Je){var $e=Je.className;return y.createElement("div",{style:{zIndex:Ue},className:C()("".concat(Ye,"-mask"),$e)})})}var ft=I("9mu1"),Ct=I("o0o1"),Wt=I.n(Ct),gt=I("HaE+"),Yt=["measure","align",null,"motion"],er=function(Pe,Ye){var Ze=Object(y.useState)(null),Ue=Object(g.a)(Ze,2),_e=Ue[0],Le=Ue[1],Te=Object(y.useRef)(),Be=Object(y.useRef)(!1);function Ge(ot){Be.current||Le(ot)}function Je(){et.a.cancel(Te.current)}function $e(ot){Je(),Te.current=Object(et.a)(function(){Ge(function(dt){switch(_e){case"align":return"motion";case"motion":return"stable";default:}return dt}),ot==null||ot()})}return Object(y.useEffect)(function(){Ge("measure")},[Pe]),Object(y.useEffect)(function(){switch(_e){case"measure":Ye();break;default:}_e&&(Te.current=Object(et.a)(Object(gt.a)(Wt.a.mark(function ot(){var dt,St;return Wt.a.wrap(function(Pt){for(;;)switch(Pt.prev=Pt.next){case 0:dt=Yt.indexOf(_e),St=Yt[dt+1],St&&dt!==-1&&Ge(St);case 3:case"end":return Pt.stop()}},ot)}))))},[_e]),Object(y.useEffect)(function(){return function(){Be.current=!0,Je()}},[]),[_e,$e]},Hr=function(Pe){var Ye=y.useState({width:0,height:0}),Ze=Object(g.a)(Ye,2),Ue=Ze[0],_e=Ze[1];function Le(Be){_e({width:Be.offsetWidth,height:Be.offsetHeight})}var Te=y.useMemo(function(){var Be={};if(Pe){var Ge=Ue.width,Je=Ue.height;Pe.indexOf("height")!==-1&&Je?Be.height=Je:Pe.indexOf("minHeight")!==-1&&Je&&(Be.minHeight=Je),Pe.indexOf("width")!==-1&&Ge?Be.width=Ge:Pe.indexOf("minWidth")!==-1&&Ge&&(Be.minWidth=Ge)}return Be},[Pe,Ue]);return[Te,Le]},on=y.forwardRef(function(Pe,Ye){var Ze=Pe.visible,Ue=Pe.prefixCls,_e=Pe.className,Le=Pe.style,Te=Pe.children,Be=Pe.zIndex,Ge=Pe.stretch,Je=Pe.destroyPopupOnHide,$e=Pe.forceRender,ot=Pe.align,dt=Pe.point,St=Pe.getRootDomNode,Tt=Pe.getClassNameFromAlign,Pt=Pe.onAlign,tr=Pe.onMouseEnter,_r=Pe.onMouseLeave,wr=Pe.onMouseDown,Or=Pe.onTouchStart,Mr=Object(y.useRef)(),Lr=Object(y.useRef)(),Ar=Object(y.useState)(),Yr=Object(g.a)(Ar,2),Ur=Yr[0],In=Yr[1],Br=Hr(Ge),dr=Object(g.a)(Br,2),ar=dr[0],Wr=dr[1];function $r(){Ge&&Wr(St())}var Zt=er(Ze,$r),rn=Object(g.a)(Zt,2),Dn=rn[0],sn=rn[1],yn=Object(y.useRef)();function mn(){return dt||St}function Wn(){var Tn;(Tn=Mr.current)===null||Tn===void 0||Tn.forceAlign()}function ri(Tn,bn){var Pn=Tt(bn);Ur!==Pn&&In(Pn),Dn==="align"&&(Ur!==Pn?Promise.resolve().then(function(){Wn()}):sn(function(){var Ln;(Ln=yn.current)===null||Ln===void 0||Ln.call(yn)}),Pt==null||Pt(Tn,bn))}var Mn=Object(k.a)({},ae(Pe));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(Tn){var bn=Mn[Tn];Mn[Tn]=function(Pn,Ln){return sn(),bn==null?void 0:bn(Pn,Ln)}});function xi(){return new Promise(function(Tn){yn.current=Tn})}y.useEffect(function(){!Mn.motionName&&Dn==="motion"&&sn()},[Mn.motionName,Dn]),y.useImperativeHandle(Ye,function(){return{forceAlign:Wn,getElement:function(){return Lr.current}}});var Wi=Object(k.a)(Object(k.a)({},ar),{},{zIndex:Be,opacity:Dn==="motion"||Dn==="stable"||!Ze?void 0:0,pointerEvents:Dn==="stable"?void 0:"none"},Le),Ci=!0;(ot==null?void 0:ot.points)&&(Dn==="align"||Dn==="stable")&&(Ci=!1);var ni=Te;return y.Children.count(Te)>1&&(ni=y.createElement("div",{className:"".concat(Ue,"-content")},Te)),y.createElement(ve,Object(p.a)({visible:Ze,ref:Lr,leavedClassName:"".concat(Ue,"-hidden")},Mn,{onAppearPrepare:xi,onEnterPrepare:xi,removeOnLeave:Je,forceRender:$e}),function(Tn,bn){var Pn=Tn.className,Ln=Tn.style,Gi=C()(Ue,_e,Ur,Pn);return y.createElement(ft.a,{target:mn(),key:"popup",ref:Mr,monitorWindowResize:!0,disabled:Ci,align:ot,onAlign:ri},y.createElement("div",{ref:bn,className:Gi,onMouseEnter:tr,onMouseLeave:_r,onMouseDownCapture:wr,onTouchStartCapture:Or,style:Object(k.a)(Object(k.a)({},Ln),Wi)},ni))})});on.displayName="PopupInner";var Gr=on,lr=y.forwardRef(function(Pe,Ye){var Ze=Pe.prefixCls,Ue=Pe.visible,_e=Pe.zIndex,Le=Pe.children,Te=Pe.mobile;Te=Te===void 0?{}:Te;var Be=Te.popupClassName,Ge=Te.popupStyle,Je=Te.popupMotion,$e=Je===void 0?{}:Je,ot=Te.popupRender,dt=y.useRef();y.useImperativeHandle(Ye,function(){return{forceAlign:function(){},getElement:function(){return dt.current}}});var St=Object(k.a)({zIndex:_e},Ge),Tt=Le;return y.Children.count(Le)>1&&(Tt=y.createElement("div",{className:"".concat(Ze,"-content")},Le)),ot&&(Tt=ot(Tt)),y.createElement(ve,Object(p.a)({visible:Ue,ref:dt,removeOnLeave:!0},$e),function(Pt,tr){var _r=Pt.className,wr=Pt.style,Or=C()(Ze,Be,_r);return y.createElement("div",{ref:tr,className:Or,style:Object(k.a)(Object(k.a)({},wr),St)},Tt)})});lr.displayName="MobilePopupInner";var qr=lr,On=["visible","mobile"],zt=y.forwardRef(function(Pe,Ye){var Ze=Pe.visible,Ue=Pe.mobile,_e=Object(S.a)(Pe,On),Le=Object(y.useState)(Ze),Te=Object(g.a)(Le,2),Be=Te[0],Ge=Te[1],Je=Object(y.useState)(!1),$e=Object(g.a)(Je,2),ot=$e[0],dt=$e[1],St=Object(k.a)(Object(k.a)({},_e),{},{visible:Be});Object(y.useEffect)(function(){Ge(Ze),Ze&&Ue&&dt(Fe())},[Ze,Ue]);var Tt=ot?y.createElement(qr,Object(p.a)({},St,{mobile:Ue,ref:Ye})):y.createElement(Gr,Object(p.a)({},St,{ref:Ye}));return y.createElement("div",null,y.createElement(ze,St),Tt)});zt.displayName="Popup";var mr=zt,pr=y.createContext(null),jr=pr;function Tr(){}function li(){return""}function An(Pe){return Pe?Pe.ownerDocument:window.document}var Ui=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function Bi(Pe){var Ye=function(Ze){Object(x.a)(_e,Ze);var Ue=Object(w.a)(_e);function _e(Le){var Te;Object(L.a)(this,_e),Te=Ue.call(this,Le),Te.popupRef=y.createRef(),Te.triggerRef=y.createRef(),Te.attachId=void 0,Te.clickOutsideHandler=void 0,Te.touchOutsideHandler=void 0,Te.contextMenuOutsideHandler1=void 0,Te.contextMenuOutsideHandler2=void 0,Te.mouseDownTimeout=void 0,Te.focusTime=void 0,Te.preClickTime=void 0,Te.preTouchTime=void 0,Te.delayTimer=void 0,Te.hasPopupMouseDown=void 0,Te.onMouseEnter=function(Ge){var Je=Te.props.mouseEnterDelay;Te.fireEvents("onMouseEnter",Ge),Te.delaySetPopupVisible(!0,Je,Je?null:Ge)},Te.onMouseMove=function(Ge){Te.fireEvents("onMouseMove",Ge),Te.setPoint(Ge)},Te.onMouseLeave=function(Ge){Te.fireEvents("onMouseLeave",Ge),Te.delaySetPopupVisible(!1,Te.props.mouseLeaveDelay)},Te.onPopupMouseEnter=function(){Te.clearDelayTimer()},Te.onPopupMouseLeave=function(Ge){var Je;if(Ge.relatedTarget&&!Ge.relatedTarget.setTimeout&&Object(it.a)((Je=Te.popupRef.current)===null||Je===void 0?void 0:Je.getElement(),Ge.relatedTarget))return;Te.delaySetPopupVisible(!1,Te.props.mouseLeaveDelay)},Te.onFocus=function(Ge){Te.fireEvents("onFocus",Ge),Te.clearDelayTimer(),Te.isFocusToShow()&&(Te.focusTime=Date.now(),Te.delaySetPopupVisible(!0,Te.props.focusDelay))},Te.onMouseDown=function(Ge){Te.fireEvents("onMouseDown",Ge),Te.preClickTime=Date.now()},Te.onTouchStart=function(Ge){Te.fireEvents("onTouchStart",Ge),Te.preTouchTime=Date.now()},Te.onBlur=function(Ge){Te.fireEvents("onBlur",Ge),Te.clearDelayTimer(),Te.isBlurToHide()&&Te.delaySetPopupVisible(!1,Te.props.blurDelay)},Te.onContextMenu=function(Ge){Ge.preventDefault(),Te.fireEvents("onContextMenu",Ge),Te.setPopupVisible(!0,Ge)},Te.onContextMenuClose=function(){Te.isContextMenuToShow()&&Te.close()},Te.onClick=function(Ge){if(Te.fireEvents("onClick",Ge),Te.focusTime){var Je;if(Te.preClickTime&&Te.preTouchTime?Je=Math.min(Te.preClickTime,Te.preTouchTime):Te.preClickTime?Je=Te.preClickTime:Te.preTouchTime&&(Je=Te.preTouchTime),Math.abs(Je-Te.focusTime)<20)return;Te.focusTime=0}Te.preClickTime=0,Te.preTouchTime=0,Te.isClickToShow()&&(Te.isClickToHide()||Te.isBlurToHide())&&Ge&&Ge.preventDefault&&Ge.preventDefault();var $e=!Te.state.popupVisible;(Te.isClickToHide()&&!$e||$e&&Te.isClickToShow())&&Te.setPopupVisible(!Te.state.popupVisible,Ge)},Te.onPopupMouseDown=function(){if(Te.hasPopupMouseDown=!0,clearTimeout(Te.mouseDownTimeout),Te.mouseDownTimeout=window.setTimeout(function(){Te.hasPopupMouseDown=!1},0),Te.context){var Ge;(Ge=Te.context).onPopupMouseDown.apply(Ge,arguments)}},Te.onDocumentClick=function(Ge){if(Te.props.mask&&!Te.props.maskClosable)return;var Je=Ge.target,$e=Te.getRootDomNode(),ot=Te.getPopupDomNode();(!Object(it.a)($e,Je)||Te.isContextMenuOnly())&&!Object(it.a)(ot,Je)&&!Te.hasPopupMouseDown&&Te.close()},Te.getRootDomNode=function(){var Ge=Te.props.getTriggerDOMNode;if(Ge)return Ge(Te.triggerRef.current);try{var Je=Object(at.a)(Te.triggerRef.current);if(Je)return Je}catch($e){}return tt.a.findDOMNode(Object(v.a)(Te))},Te.getPopupClassNameFromAlign=function(Ge){var Je=[],$e=Te.props,ot=$e.popupPlacement,dt=$e.builtinPlacements,St=$e.prefixCls,Tt=$e.alignPoint,Pt=$e.getPopupClassNameFromAlign;return ot&&dt&&Je.push(Qe(dt,St,Ge,Tt)),Pt&&Je.push(Pt(Ge)),Je.join(" ")},Te.getComponent=function(){var Ge=Te.props,Je=Ge.prefixCls,$e=Ge.destroyPopupOnHide,ot=Ge.popupClassName,dt=Ge.onPopupAlign,St=Ge.popupMotion,Tt=Ge.popupAnimation,Pt=Ge.popupTransitionName,tr=Ge.popupStyle,_r=Ge.mask,wr=Ge.maskAnimation,Or=Ge.maskTransitionName,Mr=Ge.maskMotion,Lr=Ge.zIndex,Ar=Ge.popup,Yr=Ge.stretch,Ur=Ge.alignPoint,In=Ge.mobile,Br=Ge.forceRender,dr=Te.state,ar=dr.popupVisible,Wr=dr.point,$r=Te.getPopupAlign(),Zt={};return Te.isMouseEnterToShow()&&(Zt.onMouseEnter=Te.onPopupMouseEnter),Te.isMouseLeaveToHide()&&(Zt.onMouseLeave=Te.onPopupMouseLeave),Zt.onMouseDown=Te.onPopupMouseDown,Zt.onTouchStart=Te.onPopupMouseDown,y.createElement(mr,Object(p.a)({prefixCls:Je,destroyPopupOnHide:$e,visible:ar,point:Ur&&Wr,className:ot,align:$r,onAlign:dt,animation:Tt,getClassNameFromAlign:Te.getPopupClassNameFromAlign},Zt,{stretch:Yr,getRootDomNode:Te.getRootDomNode,style:tr,mask:_r,zIndex:Lr,transitionName:Pt,maskAnimation:wr,maskTransitionName:Or,maskMotion:Mr,ref:Te.popupRef,motion:St,mobile:In,forceRender:Br}),typeof Ar=="function"?Ar():Ar)},Te.attachParent=function(Ge){et.a.cancel(Te.attachId);var Je=Te.props,$e=Je.getPopupContainer,ot=Je.getDocument,dt=Te.getRootDomNode(),St;$e?(dt||$e.length===0)&&(St=$e(dt)):St=ot(Te.getRootDomNode()).body,St?St.appendChild(Ge):Te.attachId=Object(et.a)(function(){Te.attachParent(Ge)})},Te.getContainer=function(){var Ge=Te.props.getDocument,Je=Ge(Te.getRootDomNode()).createElement("div");return Je.style.position="absolute",Je.style.top="0",Je.style.left="0",Je.style.width="100%",Te.attachParent(Je),Je},Te.setPoint=function(Ge){var Je=Te.props.alignPoint;if(!Je||!Ge)return;Te.setState({point:{pageX:Ge.pageX,pageY:Ge.pageY}})},Te.handlePortalUpdate=function(){Te.state.prevPopupVisible!==Te.state.popupVisible&&Te.props.afterPopupVisibleChange(Te.state.popupVisible)},Te.triggerContextValue={onPopupMouseDown:Te.onPopupMouseDown};var Be;return"popupVisible"in Le?Be=!!Le.popupVisible:Be=!!Le.defaultPopupVisible,Te.state={prevPopupVisible:Be,popupVisible:Be},Ui.forEach(function(Ge){Te["fire".concat(Ge)]=function(Je){Te.fireEvents(Ge,Je)}}),Te}return Object(R.a)(_e,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Te=this.props,Be=this.state;if(Be.popupVisible){var Ge;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(Ge=Te.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(De.a)(Ge,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(Ge=Ge||Te.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(De.a)(Ge,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(Ge=Ge||Te.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(De.a)(Ge,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(De.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),et.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var Te;return((Te=this.popupRef.current)===null||Te===void 0?void 0:Te.getElement())||null}},{key:"getPopupAlign",value:function(){var Te=this.props,Be=Te.popupPlacement,Ge=Te.popupAlign,Je=Te.builtinPlacements;return Be&&Je?Ve(Je,Be,Ge):Ge}},{key:"setPopupVisible",value:function(Te,Be){var Ge=this.props.alignPoint,Je=this.state.popupVisible;this.clearDelayTimer(),Je!==Te&&("popupVisible"in this.props||this.setState({popupVisible:Te,prevPopupVisible:Je}),this.props.onPopupVisibleChange(Te)),Ge&&Be&&Te&&this.setPoint(Be)}},{key:"delaySetPopupVisible",value:function(Te,Be,Ge){var Je=this,$e=Be*1e3;if(this.clearDelayTimer(),$e){var ot=Ge?{pageX:Ge.pageX,pageY:Ge.pageY}:null;this.delayTimer=window.setTimeout(function(){Je.setPopupVisible(Te,ot),Je.clearDelayTimer()},$e)}else this.setPopupVisible(Te,Ge)}},{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(Te){var Be=this.props.children.props,Ge=this.props;return Be[Te]&&Ge[Te]?this["fire".concat(Te)]:Be[Te]||Ge[Te]}},{key:"isClickToShow",value:function(){var Te=this.props,Be=Te.action,Ge=Te.showAction;return Be.indexOf("click")!==-1||Ge.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var Te=this.props.action;return Te==="contextMenu"||Te.length===1&&Te[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var Te=this.props,Be=Te.action,Ge=Te.showAction;return Be.indexOf("contextMenu")!==-1||Ge.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var Te=this.props,Be=Te.action,Ge=Te.hideAction;return Be.indexOf("click")!==-1||Ge.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var Te=this.props,Be=Te.action,Ge=Te.showAction;return Be.indexOf("hover")!==-1||Ge.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var Te=this.props,Be=Te.action,Ge=Te.hideAction;return Be.indexOf("hover")!==-1||Ge.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var Te=this.props,Be=Te.action,Ge=Te.showAction;return Be.indexOf("focus")!==-1||Ge.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var Te=this.props,Be=Te.action,Ge=Te.hideAction;return Be.indexOf("focus")!==-1||Ge.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var Te;(Te=this.popupRef.current)===null||Te===void 0||Te.forceAlign()}}},{key:"fireEvents",value:function(Te,Be){var Ge=this.props.children.props[Te];Ge&&Ge(Be);var Je=this.props[Te];Je&&Je(Be)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var Te=this.state.popupVisible,Be=this.props,Ge=Be.children,Je=Be.forceRender,$e=Be.alignPoint,ot=Be.className,dt=Be.autoDestroy,St=y.Children.only(Ge),Tt={key:"trigger"};this.isContextMenuToShow()?Tt.onContextMenu=this.onContextMenu:Tt.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(Tt.onClick=this.onClick,Tt.onMouseDown=this.onMouseDown,Tt.onTouchStart=this.onTouchStart):(Tt.onClick=this.createTwoChains("onClick"),Tt.onMouseDown=this.createTwoChains("onMouseDown"),Tt.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(Tt.onMouseEnter=this.onMouseEnter,$e&&(Tt.onMouseMove=this.onMouseMove)):Tt.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?Tt.onMouseLeave=this.onMouseLeave:Tt.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(Tt.onFocus=this.onFocus,Tt.onBlur=this.onBlur):(Tt.onFocus=this.createTwoChains("onFocus"),Tt.onBlur=this.createTwoChains("onBlur"));var Pt=C()(St&&St.props&&St.props.className,ot);Pt&&(Tt.className=Pt);var tr=Object(k.a)({},Tt);Object(je.c)(St)&&(tr.ref=Object(je.a)(this.triggerRef,St.ref));var _r=y.cloneElement(St,tr),wr;return(Te||this.popupRef.current||Je)&&(wr=y.createElement(Pe,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!Te&&dt&&(wr=null),y.createElement(jr.Provider,{value:this.triggerContextValue},_r,wr)}}],[{key:"getDerivedStateFromProps",value:function(Te,Be){var Ge=Te.popupVisible,Je={};return Ge!==void 0&&Be.popupVisible!==Ge&&(Je.popupVisible=Ge,Je.prevPopupVisible=Be.popupVisible),Je}}]),_e}(y.Component);return Ye.contextType=jr,Ye.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:li,getDocument:An,onPopupVisibleChange:Tr,afterPopupVisibleChange:Tr,onPopupAlign:Tr,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},Ye}var qn=Bi(nt.a),un={adjustX:1,adjustY:1},Si={topLeft:{points:["bl","tl"],overflow:un,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:un,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:un,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:un,offset:[4,0]}},hn={topLeft:{points:["bl","tl"],overflow:un,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:un,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:un,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:un,offset:[4,0]}},Yn=Si,en=0,hr={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},nn=function(Ye,Ze,Ue){var _e=oe(Ze),Le=Ye.getState();Ye.setState({defaultActiveFirst:Object(k.a)(Object(k.a)({},Le.defaultActiveFirst),{},Object(N.a)({},_e,Ue))})},xr=function(Pe){Object(x.a)(Ze,Pe);var Ye=Object(w.a)(Ze);function Ze(Ue){var _e;Object(L.a)(this,Ze),_e=Ye.call(this,Ue),_e.onDestroy=function($e){_e.props.onDestroy($e)},_e.onKeyDown=function($e){var ot=$e.keyCode,dt=_e.menuInstance,St=_e.props.store,Tt=_e.getVisible();if(ot===h.a.ENTER)return _e.onTitleClick($e),nn(St,_e.props.eventKey,!0),!0;if(ot===h.a.RIGHT)return Tt?dt.onKeyDown($e):(_e.triggerOpenChange(!0),nn(St,_e.props.eventKey,!0)),!0;if(ot===h.a.LEFT){var Pt;if(Tt)Pt=dt.onKeyDown($e);else return;return Pt||(_e.triggerOpenChange(!1),Pt=!0),Pt}return Tt&&(ot===h.a.UP||ot===h.a.DOWN)?dt.onKeyDown($e):void 0},_e.onOpenChange=function($e){_e.props.onOpenChange($e)},_e.onPopupVisibleChange=function($e){_e.triggerOpenChange($e,$e?"mouseenter":"mouseleave")},_e.onMouseEnter=function($e){var ot=_e.props,dt=ot.eventKey,St=ot.onMouseEnter,Tt=ot.store;nn(Tt,_e.props.eventKey,!1),St({key:dt,domEvent:$e})},_e.onMouseLeave=function($e){var ot=_e.props,dt=ot.parentMenu,St=ot.eventKey,Tt=ot.onMouseLeave;dt.subMenuInstance=Object(v.a)(_e),Tt({key:St,domEvent:$e})},_e.onTitleMouseEnter=function($e){var ot=_e.props,dt=ot.eventKey,St=ot.onItemHover,Tt=ot.onTitleMouseEnter;St({key:dt,hover:!0}),Tt({key:dt,domEvent:$e})},_e.onTitleMouseLeave=function($e){var ot=_e.props,dt=ot.parentMenu,St=ot.eventKey,Tt=ot.onItemHover,Pt=ot.onTitleMouseLeave;dt.subMenuInstance=Object(v.a)(_e),Tt({key:St,hover:!1}),Pt({key:St,domEvent:$e})},_e.onTitleClick=function($e){var ot=Object(v.a)(_e),dt=ot.props;if(dt.onTitleClick({key:dt.eventKey,domEvent:$e}),dt.triggerSubMenuAction==="hover")return;_e.triggerOpenChange(!_e.getVisible(),"click"),nn(dt.store,_e.props.eventKey,!1)},_e.onSubMenuClick=function($e){typeof _e.props.onClick=="function"&&_e.props.onClick(_e.addKeyPath($e))},_e.onSelect=function($e){_e.props.onSelect($e)},_e.onDeselect=function($e){_e.props.onDeselect($e)},_e.getPrefixCls=function(){return"".concat(_e.props.rootPrefixCls,"-submenu")},_e.getActiveClassName=function(){return"".concat(_e.getPrefixCls(),"-active")},_e.getDisabledClassName=function(){return"".concat(_e.getPrefixCls(),"-disabled")},_e.getSelectedClassName=function(){return"".concat(_e.getPrefixCls(),"-selected")},_e.getOpenClassName=function(){return"".concat(_e.props.rootPrefixCls,"-submenu-open")},_e.getVisible=function(){return _e.state.isOpen},_e.getMode=function(){return _e.state.mode},_e.saveMenuInstance=function($e){_e.menuInstance=$e},_e.addKeyPath=function($e){return Object(k.a)(Object(k.a)({},$e),{},{keyPath:($e.keyPath||[]).concat(_e.props.eventKey)})},_e.triggerOpenChange=function($e,ot){var dt=_e.props.eventKey,St=function(){_e.onOpenChange({key:dt,item:Object(v.a)(_e),trigger:ot,open:$e})};ot==="mouseenter"?_e.mouseenterTimeout=setTimeout(function(){St()},0):St()},_e.isChildrenSelected=function(){var $e={find:!1};return $(_e.props.children,_e.props.selectedKeys,$e),$e.find},_e.isInlineMode=function(){return _e.getMode()==="inline"},_e.adjustWidth=function(){if(!_e.subMenuTitle||!_e.menuInstance)return;var $e=qe.findDOMNode(_e.menuInstance);if($e.offsetWidth>=_e.subMenuTitle.offsetWidth)return;$e.style.minWidth="".concat(_e.subMenuTitle.offsetWidth,"px")},_e.saveSubMenuTitle=function($e){_e.subMenuTitle=$e},_e.getBaseProps=function(){var $e=Object(v.a)(_e),ot=$e.props,dt=_e.getMode();return{mode:dt==="horizontal"?"vertical":dt,visible:_e.getVisible(),level:ot.level+1,inlineIndent:ot.inlineIndent,focusable:!1,onClick:_e.onSubMenuClick,onSelect:_e.onSelect,onDeselect:_e.onDeselect,onDestroy:_e.onDestroy,selectedKeys:ot.selectedKeys,eventKey:"".concat(ot.eventKey,"-menu-"),openKeys:ot.openKeys,motion:ot.motion,onOpenChange:_e.onOpenChange,subMenuOpenDelay:ot.subMenuOpenDelay,parentMenu:Object(v.a)(_e),subMenuCloseDelay:ot.subMenuCloseDelay,forceSubMenuRender:ot.forceSubMenuRender,triggerSubMenuAction:ot.triggerSubMenuAction,builtinPlacements:ot.builtinPlacements,defaultActiveFirst:ot.store.getState().defaultActiveFirst[oe(ot.eventKey)],multiple:ot.multiple,prefixCls:ot.rootPrefixCls,id:_e.internalMenuId,manualRef:_e.saveMenuInstance,itemIcon:ot.itemIcon,expandIcon:ot.expandIcon,direction:ot.direction}},_e.getMotion=function($e,ot){var dt=Object(v.a)(_e),St=dt.haveRendered,Tt=_e.props,Pt=Tt.motion,tr=Tt.rootPrefixCls,_r=Object(k.a)(Object(k.a)({},Pt),{},{leavedClassName:"".concat(tr,"-hidden"),removeOnLeave:!1,motionAppear:St||!ot||$e!=="inline"});return _r};var Le=Ue.store,Te=Ue.eventKey,Be=Le.getState(),Ge=Be.defaultActiveFirst;_e.isRootMenu=!1;var Je=!1;return Ge&&(Je=Ge[Te]),nn(Le,Te,Je),_e.state={mode:Ue.mode,isOpen:Ue.isOpen},_e}return Object(R.a)(Ze,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var _e=this,Le=this.props,Te=Le.mode,Be=Le.parentMenu,Ge=Le.manualRef,Je=Le.isOpen,$e=function(){_e.setState({mode:Te,isOpen:Je})},ot=Je!==this.state.isOpen,dt=Te!==this.state.mode;if((dt||ot)&&(et.a.cancel(this.updateStateRaf),dt?this.updateStateRaf=Object(et.a)($e):$e()),Ge&&Ge(this),Te!=="horizontal"||!(Be==null?void 0:Be.isRootMenu)||!Je)return;this.minWidthTimeout=setTimeout(function(){return _e.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var _e=this.props,Le=_e.onDestroy,Te=_e.eventKey;Le&&Le(Te),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),et.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(_e,Le){var Te=this.getBaseProps();return y.createElement(Hi,Object(p.a)({},Te,{id:this.internalMenuId,className:_e,style:Le}),this.props.children)}},{key:"renderChildren",value:function(){var _e=this,Le=this.getBaseProps(),Te=Le.mode,Be=Le.visible,Ge=Le.forceSubMenuRender,Je=Le.direction,$e=this.getMotion(Te,Be);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||Be||Ge,!this.haveOpened)return y.createElement("div",null);var ot=C()("".concat(Le.prefixCls,"-sub"),Object(N.a)({},"".concat(Le.prefixCls,"-rtl"),Je==="rtl"));return this.isInlineMode()?y.createElement(ve,Object(p.a)({visible:Le.visible,forceRender:Ge},$e),function(dt){var St=dt.className,Tt=dt.style,Pt=C()(ot,St);return _e.renderPopupMenu(Pt,Tt)}):this.renderPopupMenu(ot)}},{key:"render",value:function(){var _e,Le,Te,Be=Object(k.a)({},this.props),Ge=this.getVisible(),Je=this.getPrefixCls(),$e=this.isInlineMode(),ot=this.getMode(),dt=C()(Je,"".concat(Je,"-").concat(ot),(_e={},Object(N.a)(_e,Be.className,!!Be.className),Object(N.a)(_e,this.getOpenClassName(),Ge),Object(N.a)(_e,this.getActiveClassName(),Be.active||Ge&&!$e),Object(N.a)(_e,this.getDisabledClassName(),Be.disabled),Object(N.a)(_e,this.getSelectedClassName(),this.isChildrenSelected()),_e));this.internalMenuId||(Be.eventKey?this.internalMenuId="".concat(Be.eventKey,"$Menu"):(en+=1,this.internalMenuId="$__$".concat(en,"$Menu")));var St={},Tt={},Pt={};Be.disabled||(St={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},Tt={onClick:this.onTitleClick},Pt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var tr={},_r=Be.direction,wr=_r==="rtl";$e&&(wr?tr.paddingRight=Be.inlineIndent*Be.level:tr.paddingLeft=Be.inlineIndent*Be.level);var Or={};this.getVisible()&&(Or={"aria-owns":this.internalMenuId});var Mr=null;ot!=="horizontal"&&(Mr=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Mr=y.createElement(this.props.expandIcon,Object(k.a)({},this.props))));var Lr=y.createElement("div",Object(p.a)({ref:this.saveSubMenuTitle,style:tr,className:"".concat(Je,"-title"),role:"button"},Pt,Tt,{"aria-expanded":Ge},Or,{"aria-haspopup":"true",title:typeof Be.title=="string"?Be.title:void 0}),Be.title,Mr||y.createElement("i",{className:"".concat(Je,"-arrow")})),Ar=this.renderChildren(),Yr=((Le=Be.parentMenu)===null||Le===void 0?void 0:Le.isRootMenu)?Be.parentMenu.props.getPopupContainer:function(mn){return mn.parentNode},Ur=hr[ot],In=Be.popupOffset?{offset:Be.popupOffset}:{},Br=C()((Te={},Object(N.a)(Te,Be.popupClassName,Be.popupClassName&&!$e),Object(N.a)(Te,"".concat(Je,"-rtl"),wr),Te)),dr=Be.disabled,ar=Be.triggerSubMenuAction,Wr=Be.subMenuOpenDelay,$r=Be.forceSubMenuRender,Zt=Be.subMenuCloseDelay,rn=Be.builtinPlacements;X.forEach(function(mn){return delete Be[mn]}),delete Be.onClick;var Dn=wr?Object(k.a)(Object(k.a)({},hn),rn):Object(k.a)(Object(k.a)({},Si),rn);delete Be.direction;var sn=this.getBaseProps(),yn=$e?null:this.getMotion(sn.mode,sn.visible);return y.createElement("li",Object(p.a)({},Be,St,{className:dt,role:"menuitem"}),y.createElement(qn,{prefixCls:Je,popupClassName:C()("".concat(Je,"-popup"),Br),getPopupContainer:Yr,builtinPlacements:Dn,popupPlacement:Ur,popupVisible:$e?!1:Ge,popupAlign:In,popup:$e?null:Ar,action:dr||$e?[]:[ar],mouseEnterDelay:Wr,mouseLeaveDelay:Zt,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:$r,popupMotion:yn},Lr),$e?Ar:null)}}]),Ze}(y.Component);xr.defaultProps={onMouseEnter:ce,onMouseLeave:ce,onTitleMouseEnter:ce,onTitleMouseLeave:ce,onTitleClick:ce,manualRef:ce,mode:"vertical",title:""};var fn=Object(T.b)(function(Pe,Ye){var Ze=Pe.openKeys,Ue=Pe.activeKey,_e=Pe.selectedKeys,Le=Ye.eventKey,Te=Ye.subMenuKey;return{isOpen:Ze.indexOf(Le)>-1,active:Ue[Te]===Le,selectedKeys:_e}})(xr);fn.isSubMenu=!0;var Fr=fn,mi="menuitem-overflowed",En=.5,Un=function(Pe){Object(x.a)(Ze,Pe);var Ye=Object(w.a)(Ze);function Ze(){var Ue;return Object(L.a)(this,Ze),Ue=Ye.apply(this,arguments),Ue.resizeObserver=null,Ue.mutationObserver=null,Ue.originalTotalWidth=0,Ue.overflowedItems=[],Ue.menuItemSizes=[],Ue.cancelFrameId=null,Ue.state={lastVisibleIndex:void 0},Ue.childRef=y.createRef(),Ue.getMenuItemNodes=function(){var _e=Ue.props.prefixCls,Le=Ue.childRef.current;return Le?[].slice.call(Le.children).filter(function(Te){return Te.className.split(" ").indexOf("".concat(_e,"-overflowed-submenu"))<0}):[]},Ue.getOverflowedSubMenuItem=function(_e,Le,Te){var Be=Ue.props,Ge=Be.overflowedIndicator,Je=Be.level,$e=Be.mode,ot=Be.prefixCls,dt=Be.theme;if(Je!==1||$e!=="horizontal")return null;var St=Ue.props.children[0],Tt=St.props,Pt=Tt.children,tr=Tt.title,_r=Tt.style,wr=Object(S.a)(Tt,["children","title","style"]),Or=Object(k.a)({},_r),Mr="".concat(_e,"-overflowed-indicator"),Lr="".concat(_e,"-overflowed-indicator");Le.length===0&&Te!==!0?Or=Object(k.a)(Object(k.a)({},Or),{},{display:"none"}):Te&&(Or=Object(k.a)(Object(k.a)({},Or),{},{visibility:"hidden",position:"absolute"}),Mr="".concat(Mr,"-placeholder"),Lr="".concat(Lr,"-placeholder"));var Ar=dt?"".concat(ot,"-").concat(dt):"",Yr={};return X.forEach(function(Ur){wr[Ur]!==void 0&&(Yr[Ur]=wr[Ur])}),y.createElement(Fr,Object(p.a)({title:Ge,className:"".concat(ot,"-overflowed-submenu"),popupClassName:Ar},Yr,{key:Mr,eventKey:Lr,disabled:!1,style:Or}),Le)},Ue.setChildrenWidthAndResize=function(){if(Ue.props.mode!=="horizontal")return;var _e=Ue.childRef.current;if(!_e)return;var Le=_e.children;if(!Le||Le.length===0)return;var Te=_e.children[Le.length-1];pe(Te,"display","inline-block");var Be=Ue.getMenuItemNodes(),Ge=Be.filter(function(Je){return Je.className.split(" ").indexOf(mi)>=0});Ge.forEach(function(Je){pe(Je,"display","inline-block")}),Ue.menuItemSizes=Be.map(function(Je){return de(Je,!0)}),Ge.forEach(function(Je){pe(Je,"display","none")}),Ue.overflowedIndicatorWidth=de(_e.children[_e.children.length-1],!0),Ue.originalTotalWidth=Ue.menuItemSizes.reduce(function(Je,$e){return Je+$e},0),Ue.handleResize(),pe(Te,"display","none")},Ue.handleResize=function(){if(Ue.props.mode!=="horizontal")return;var _e=Ue.childRef.current;if(!_e)return;var Le=de(_e);Ue.overflowedItems=[];var Te=0,Be;Ue.originalTotalWidth>Le+En&&(Be=-1,Ue.menuItemSizes.forEach(function(Ge){Te+=Ge,Te+Ue.overflowedIndicatorWidth<=Le&&(Be+=1)})),Ue.setState({lastVisibleIndex:Be})},Ue}return Object(R.a)(Ze,[{key:"componentDidMount",value:function(){var _e=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Le=this.childRef.current;if(!Le)return;this.resizeObserver=new Ke.default(function(Te){Te.forEach(function(){var Be=_e.cancelFrameId;cancelAnimationFrame(Be),_e.cancelFrameId=requestAnimationFrame(_e.setChildrenWidthAndResize)})}),[].slice.call(Le.children).concat(Le).forEach(function(Te){_e.resizeObserver.observe(Te)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){_e.resizeObserver.disconnect(),[].slice.call(Le.children).concat(Le).forEach(function(Te){_e.resizeObserver.observe(Te)}),_e.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(_e){var Le=this,Te=this.state.lastVisibleIndex;return(_e||[]).reduce(function(Be,Ge,Je){var $e=Ge;if(Le.props.mode==="horizontal"){var ot=Le.getOverflowedSubMenuItem(Ge.props.eventKey,[]);Te!==void 0&&Le.props.className.indexOf("".concat(Le.props.prefixCls,"-root"))!==-1&&(Je>Te&&($e=y.cloneElement(Ge,{style:{display:"none"},eventKey:"".concat(Ge.props.eventKey,"-hidden"),className:"".concat(mi)})),Je===Te+1&&(Le.overflowedItems=_e.slice(Te+1).map(function(St){return y.cloneElement(St,{key:St.props.eventKey,mode:"vertical-left"})}),ot=Le.getOverflowedSubMenuItem(Ge.props.eventKey,Le.overflowedItems)));var dt=[].concat(Object(f.a)(Be),[ot,$e]);return Je===_e.length-1&&dt.push(Le.getOverflowedSubMenuItem(Ge.props.eventKey,[],!0)),dt}return[].concat(Object(f.a)(Be),[$e])},[])}},{key:"render",value:function(){var _e=this.props,Le=_e.visible,Te=_e.prefixCls,Be=_e.overflowedIndicator,Ge=_e.mode,Je=_e.level,$e=_e.tag,ot=_e.children,dt=_e.theme,St=Object(S.a)(_e,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),Tt=$e;return y.createElement(Tt,Object(p.a)({ref:this.childRef},St),this.renderChildren(ot))}}]),Ze}(y.Component);Un.defaultProps={tag:"div",className:""};var Di=Un;function ui(Pe){return Pe.length?Pe.every(function(Ye){return!!Ye.props.disabled}):!0}function bi(Pe,Ye,Ze){var Ue=Pe.getState();Pe.setState({activeKey:Object(k.a)(Object(k.a)({},Ue.activeKey),{},Object(N.a)({},Ye,Ze))})}function ei(Pe){return Pe.eventKey||"0-menu-"}function ti(Pe,Ye){var Ze=Ye,Ue=Pe.children,_e=Pe.eventKey;if(Ze){var Le;if(q(Ue,function(Te,Be){Te&&Te.props&&!Te.props.disabled&&Ze===Ae(Te,_e,Be)&&(Le=!0)}),Le)return Ze}return Ze=null,Pe.defaultActiveFirst&&q(Ue,function(Te,Be){!Ze&&Te&&!Te.props.disabled&&(Ze=Ae(Te,_e,Be))}),Ze}function ji(Pe){if(!Pe)return;var Ye=this.instanceArray.indexOf(Pe);Ye!==-1?this.instanceArray[Ye]=Pe:this.instanceArray.push(Pe)}var ci=function(Pe){Object(x.a)(Ze,Pe);var Ye=Object(w.a)(Ze);function Ze(Ue){var _e;return Object(L.a)(this,Ze),_e=Ye.call(this,Ue),_e.onKeyDown=function(Le,Te){var Be=Le.keyCode,Ge;if(_e.getFlatInstanceArray().forEach(function($e){$e&&$e.props.active&&$e.onKeyDown&&(Ge=$e.onKeyDown(Le))}),Ge)return 1;var Je=null;return(Be===h.a.UP||Be===h.a.DOWN)&&(Je=_e.step(Be===h.a.UP?-1:1)),Je?(Le.preventDefault(),bi(_e.props.store,ei(_e.props),Je.props.eventKey),typeof Te=="function"&&Te(Je),1):void 0},_e.onItemHover=function(Le){var Te=Le.key,Be=Le.hover;bi(_e.props.store,ei(_e.props),Be?Te:null)},_e.onDeselect=function(Le){_e.props.onDeselect(Le)},_e.onSelect=function(Le){_e.props.onSelect(Le)},_e.onClick=function(Le){_e.props.onClick(Le)},_e.onOpenChange=function(Le){_e.props.onOpenChange(Le)},_e.onDestroy=function(Le){_e.props.onDestroy(Le)},_e.getFlatInstanceArray=function(){return _e.instanceArray},_e.step=function(Le){var Te=_e.getFlatInstanceArray(),Be=_e.props.store.getState().activeKey[ei(_e.props)],Ge=Te.length;if(!Ge)return null;Le<0&&(Te=Te.concat().reverse());var Je=-1;if(Te.every(function(St,Tt){return St&&St.props.eventKey===Be?(Je=Tt,!1):!0}),!_e.props.defaultActiveFirst&&Je!==-1&&ui(Te.slice(Je,Ge-1)))return;var $e=(Je+1)%Ge,ot=$e;do{var dt=Te[ot];if(!dt||dt.props.disabled)ot=(ot+1)%Ge;else return dt}while(ot!==$e);return null},_e.renderCommonMenuItem=function(Le,Te,Be){var Ge=_e.props.store.getState(),Je=Object(v.a)(_e),$e=Je.props,ot=Ae(Le,$e.eventKey,Te),dt=Le.props;if(!dt||typeof Le.type=="string")return Le;var St=ot===Ge.activeKey,Tt=Object(k.a)(Object(k.a)({mode:dt.mode||$e.mode,level:$e.level,inlineIndent:$e.inlineIndent,renderMenuItem:_e.renderMenuItem,rootPrefixCls:$e.prefixCls,index:Te,parentMenu:$e.parentMenu,manualRef:dt.disabled?void 0:Object(P.a)(Le.ref,ji.bind(Object(v.a)(_e))),eventKey:ot,active:!dt.disabled&&St,multiple:$e.multiple,onClick:function(tr){(dt.onClick||ce)(tr),_e.onClick(tr)},onItemHover:_e.onItemHover,motion:$e.motion,subMenuOpenDelay:$e.subMenuOpenDelay,subMenuCloseDelay:$e.subMenuCloseDelay,forceSubMenuRender:$e.forceSubMenuRender,onOpenChange:_e.onOpenChange,onDeselect:_e.onDeselect,onSelect:_e.onSelect,builtinPlacements:$e.builtinPlacements,itemIcon:dt.itemIcon||_e.props.itemIcon,expandIcon:dt.expandIcon||_e.props.expandIcon},Be),{},{direction:$e.direction});return($e.mode==="inline"||xe())&&(Tt.triggerSubMenuAction="click"),y.cloneElement(Le,Object(k.a)(Object(k.a)({},Tt),{},{key:ot||Te}))},_e.renderMenuItem=function(Le,Te,Be){if(!Le)return null;var Ge=_e.props.store.getState(),Je={openKeys:Ge.openKeys,selectedKeys:Ge.selectedKeys,triggerSubMenuAction:_e.props.triggerSubMenuAction,subMenuKey:Be};return _e.renderCommonMenuItem(Le,Te,Je)},Ue.store.setState({activeKey:Object(k.a)(Object(k.a)({},Ue.store.getState().activeKey),{},Object(N.a)({},Ue.eventKey,ti(Ue,Ue.activeKey)))}),_e.instanceArray=[],_e}return Object(R.a)(Ze,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(_e){return this.props.visible||_e.visible||this.props.className!==_e.className||!z()(this.props.style,_e.style)}},{key:"componentDidUpdate",value:function(_e){var Le=this.props,Te="activeKey"in Le?Le.activeKey:Le.store.getState().activeKey[ei(Le)],Be=ti(Le,Te);if(Be!==Te)bi(Le.store,ei(Le),Be);else if("activeKey"in _e){var Ge=ti(_e,_e.activeKey);Be!==Ge&&bi(Le.store,ei(Le),Be)}}},{key:"render",value:function(){var _e=this,Le=Object(p.a)({},this.props);this.instanceArray=[];var Te=C()(Le.prefixCls,Le.className,"".concat(Le.prefixCls,"-").concat(Le.mode)),Be={className:Te,role:Le.role||"menu"};Le.id&&(Be.id=Le.id),Le.focusable&&(Be.tabIndex=0,Be.onKeyDown=this.onKeyDown);var Ge=Le.prefixCls,Je=Le.eventKey,$e=Le.visible,ot=Le.level,dt=Le.mode,St=Le.overflowedIndicator,Tt=Le.theme;return X.forEach(function(Pt){return delete Le[Pt]}),delete Le.onClick,y.createElement(Di,Object(p.a)({},Le,{prefixCls:Ge,mode:dt,tag:"ul",level:ot,theme:Tt,visible:$e,overflowedIndicator:St},Be),Object(_.a)(Le.children).map(function(Pt,tr){return _e.renderMenuItem(Pt,tr,Je||"0-menu-")}))}}]),Ze}(y.Component);ci.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:ce};var _i=Object(T.b)()(ci),Hi=_i,di=I("Kwbf");function tn(Pe,Ye,Ze){var Ue=Pe.prefixCls,_e=Pe.motion,Le=Pe.defaultMotions,Te=Le===void 0?{}:Le,Be=Pe.openAnimation,Ge=Pe.openTransitionName,Je=Ye.switchingModeFromInline;if(_e)return _e;if(Object(K.a)(Be)==="object"&&Be)Object(di.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof Be=="string")return{motionName:"".concat(Ue,"-open-").concat(Be)};if(Ge)return{motionName:Ge};var $e=Te[Ze];return $e||(Je?null:Te.other)}var $t=function(Pe){Object(x.a)(Ze,Pe);var Ye=Object(w.a)(Ze);function Ze(Ue){var _e;Object(L.a)(this,Ze),_e=Ye.call(this,Ue),_e.onSelect=function(Be){var Ge=Object(v.a)(_e),Je=Ge.props;if(Je.selectable){var $e=_e.store.getState(),ot=$e.selectedKeys,dt=Be.key;Je.multiple?ot=ot.concat([dt]):ot=[dt],"selectedKeys"in Je||_e.store.setState({selectedKeys:ot}),Je.onSelect(Object(k.a)(Object(k.a)({},Be),{},{selectedKeys:ot}))}},_e.onClick=function(Be){var Ge=_e.getRealMenuMode(),Je=Object(v.a)(_e),$e=Je.store,ot=Je.props.onOpenChange;Ge!=="inline"&&!("openKeys"in _e.props)&&($e.setState({openKeys:[]}),ot([])),_e.props.onClick(Be)},_e.onKeyDown=function(Be,Ge){_e.innerMenu.getWrappedInstance().onKeyDown(Be,Ge)},_e.onOpenChange=function(Be){var Ge=Object(v.a)(_e),Je=Ge.props,$e=_e.store.getState().openKeys.concat(),ot=!1,dt=function(Tt){var Pt=!1;if(Tt.open)Pt=$e.indexOf(Tt.key)===-1,Pt&&$e.push(Tt.key);else{var tr=$e.indexOf(Tt.key);Pt=tr!==-1,Pt&&$e.splice(tr,1)}ot=ot||Pt};Array.isArray(Be)?Be.forEach(dt):dt(Be),ot&&("openKeys"in _e.props||_e.store.setState({openKeys:$e}),Je.onOpenChange($e))},_e.onDeselect=function(Be){var Ge=Object(v.a)(_e),Je=Ge.props;if(Je.selectable){var $e=_e.store.getState().selectedKeys.concat(),ot=Be.key,dt=$e.indexOf(ot);dt!==-1&&$e.splice(dt,1),"selectedKeys"in Je||_e.store.setState({selectedKeys:$e}),Je.onDeselect(Object(k.a)(Object(k.a)({},Be),{},{selectedKeys:$e}))}},_e.onMouseEnter=function(Be){_e.restoreModeVerticalFromInline();var Ge=_e.props.onMouseEnter;Ge&&Ge(Be)},_e.onTransitionEnd=function(Be){var Ge=Be.propertyName==="width"&&Be.target===Be.currentTarget,Je=Be.target.className,$e=Object.prototype.toString.call(Je)==="[object SVGAnimatedString]"?Je.animVal:Je,ot=Be.propertyName==="font-size"&&$e.indexOf("anticon")>=0;(Ge||ot)&&_e.restoreModeVerticalFromInline()},_e.setInnerMenu=function(Be){_e.innerMenu=Be},_e.isRootMenu=!0;var Le=Ue.defaultSelectedKeys,Te=Ue.defaultOpenKeys;return"selectedKeys"in Ue&&(Le=Ue.selectedKeys||[]),"openKeys"in Ue&&(Te=Ue.openKeys||[]),_e.store=Object(T.c)({selectedKeys:Le,openKeys:Te,activeKey:{"0-menu-":ti(Ue,Ue.activeKey)}}),_e.state={switchingModeFromInline:!1,prevProps:Ue,inlineOpenKeys:[],store:_e.store},_e}return Object(R.a)(Ze,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(_e){var Le=this.props,Te=Le.siderCollapsed,Be=Le.inlineCollapsed,Ge=Le.onOpenChange;(!_e.inlineCollapsed&&Be||!_e.siderCollapsed&&Te)&&Ge([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var _e=this.props.collapsedWidth,Le=this.store,Te=this.prevOpenKeys,Be=this.getInlineCollapsed()&&(_e===0||_e==="0"||_e==="0px");Be?(this.prevOpenKeys=Le.getState().openKeys.concat(),this.store.setState({openKeys:[]})):Te&&(this.store.setState({openKeys:Te}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var _e=this.props.mode,Le=this.state.switchingModeFromInline,Te=this.getInlineCollapsed();return Le&&Te?"inline":Te?"vertical":_e}},{key:"getInlineCollapsed",value:function(){var _e=this.props,Le=_e.inlineCollapsed,Te=_e.siderCollapsed;return Te!==void 0?Te:Le}},{key:"restoreModeVerticalFromInline",value:function(){var _e=this.state.switchingModeFromInline;_e&&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 _e=Object(k.a)({},Object(F.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Le=this.getRealMenuMode();return _e.className+=" ".concat(_e.prefixCls,"-root"),_e.direction==="rtl"&&(_e.className+=" ".concat(_e.prefixCls,"-rtl")),_e=Object(k.a)(Object(k.a)({},_e),{},{mode:Le,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:tn(this.props,this.state,Le)}),delete _e.openAnimation,delete _e.openTransitionName,y.createElement(T.a,{store:this.store},y.createElement(Hi,Object(p.a)({},_e,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(_e,Le){var Te=Le.prevProps,Be=Le.store,Ge=Be.getState(),Je={},$e={prevProps:_e};return Te.mode==="inline"&&_e.mode!=="inline"&&($e.switchingModeFromInline=!0),"openKeys"in _e?Je.openKeys=_e.openKeys||[]:((_e.inlineCollapsed&&!Te.inlineCollapsed||_e.siderCollapsed&&!Te.siderCollapsed)&&($e.switchingModeFromInline=!0,$e.inlineOpenKeys=Ge.openKeys,Je.openKeys=[]),(!_e.inlineCollapsed&&Te.inlineCollapsed||!_e.siderCollapsed&&Te.siderCollapsed)&&(Je.openKeys=Le.inlineOpenKeys,$e.inlineOpenKeys=[])),Object.keys(Je).length&&Be.setState(Je),$e}}]),Ze}(y.Component);$t.defaultProps={selectable:!0,onClick:ce,onSelect:ce,onOpenChange:ce,onDeselect:ce,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:y.createElement("span",null,"\xB7\xB7\xB7")};var ur=$t,Qt=function(Pe){Object(x.a)(Ze,Pe);var Ye=Object(w.a)(Ze);function Ze(){var Ue;return Object(L.a)(this,Ze),Ue=Ye.apply(this,arguments),Ue.onKeyDown=function(_e){var Le=_e.keyCode;return Le===h.a.ENTER?(Ue.onClick(_e),!0):void 0},Ue.onMouseLeave=function(_e){var Le=Ue.props,Te=Le.eventKey,Be=Le.onItemHover,Ge=Le.onMouseLeave;Be({key:Te,hover:!1}),Ge({key:Te,domEvent:_e})},Ue.onMouseEnter=function(_e){var Le=Ue.props,Te=Le.eventKey,Be=Le.onItemHover,Ge=Le.onMouseEnter;Be({key:Te,hover:!0}),Ge({key:Te,domEvent:_e})},Ue.onClick=function(_e){var Le=Ue.props,Te=Le.eventKey,Be=Le.multiple,Ge=Le.onClick,Je=Le.onSelect,$e=Le.onDeselect,ot=Le.isSelected,dt={key:Te,keyPath:[Te],item:Object(v.a)(Ue),domEvent:_e};Ge(dt),Be?ot?$e(dt):Je(dt):ot||Je(dt)},Ue.saveNode=function(_e){Ue.node=_e},Ue}return Object(R.a)(Ze,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var _e=this.props;_e.onDestroy&&_e.onDestroy(_e.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 _e,Le=Object(k.a)({},this.props),Te=C()(this.getPrefixCls(),Le.className,(_e={},Object(N.a)(_e,this.getActiveClassName(),!Le.disabled&&Le.active),Object(N.a)(_e,this.getSelectedClassName(),Le.isSelected),Object(N.a)(_e,this.getDisabledClassName(),Le.disabled),_e)),Be=Object(k.a)(Object(k.a)({},Le.attribute),{},{title:typeof Le.title=="string"?Le.title:void 0,className:Te,role:Le.role||"menuitem","aria-disabled":Le.disabled});Le.role==="option"?Be=Object(k.a)(Object(k.a)({},Be),{},{role:"option","aria-selected":Le.isSelected}):(Le.role===null||Le.role==="none")&&(Be.role="none");var Ge={onClick:Le.disabled?null:this.onClick,onMouseLeave:Le.disabled?null:this.onMouseLeave,onMouseEnter:Le.disabled?null:this.onMouseEnter},Je=Object(k.a)({},Le.style);Le.mode==="inline"&&(Le.direction==="rtl"?Je.paddingRight=Le.inlineIndent*Le.level:Je.paddingLeft=Le.inlineIndent*Le.level),X.forEach(function(ot){return delete Le[ot]}),delete Le.direction;var $e=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&($e=y.createElement(this.props.itemIcon,this.props)),y.createElement("li",Object(p.a)({},Object(F.a)(Le,["onClick","onMouseEnter","onMouseLeave","onSelect"]),Be,Ge,{style:Je,ref:this.saveNode}),Le.children,$e)}}]),Ze}(y.Component);Qt.isMenuItem=!0,Qt.defaultProps={onSelect:ce,onMouseEnter:ce,onMouseLeave:ce,manualRef:ce};var yr=Object(T.b)(function(Pe,Ye){var Ze=Pe.activeKey,Ue=Pe.selectedKeys,_e=Ye.eventKey,Le=Ye.subMenuKey;return{active:Ze[Le]===_e,isSelected:Array.isArray(Ue)?Ue.indexOf(_e)!==-1:Ue===_e}})(Qt),kr=yr,zr=function(Pe){Object(x.a)(Ze,Pe);var Ye=Object(w.a)(Ze);function Ze(){var Ue;return Object(L.a)(this,Ze),Ue=Ye.apply(this,arguments),Ue.renderInnerMenuItem=function(_e){var Le=Ue.props,Te=Le.renderMenuItem,Be=Le.index;return Te(_e,Be,Ue.props.subMenuKey)},Ue}return Object(R.a)(Ze,[{key:"render",value:function(){var _e=Object(p.a)({},this.props),Le=_e.className,Te=Le===void 0?"":Le,Be=_e.rootPrefixCls,Ge="".concat(Be,"-item-group-title"),Je="".concat(Be,"-item-group-list"),$e=_e.title,ot=_e.children;return X.forEach(function(dt){return delete _e[dt]}),delete _e.direction,y.createElement("li",Object(p.a)({},_e,{onClick:function(St){return St.stopPropagation()},className:"".concat(Te," ").concat(Be,"-item-group")}),y.createElement("div",{className:Ge,title:typeof $e=="string"?$e:void 0},$e),y.createElement("ul",{className:Je},y.Children.map(ot,this.renderInnerMenuItem)))}}]),Ze}(y.Component);zr.isMenuItemGroup=!0,zr.defaultProps={disabled:!0};var Rr=zr,vn=function(Ye){var Ze=Ye.className,Ue=Ye.rootPrefixCls,_e=Ye.style;return y.createElement("li",{className:"".concat(Ze," ").concat(Ue,"-item-divider"),style:_e})};vn.defaultProps={disabled:!0,className:"",style:{}};var $n=vn,Sr=ur,Ei=I("eDIo");function Vr(Pe,Ye){var Ze=Pe.prefixCls,Ue=Pe.editable,_e=Pe.locale,Le=Pe.style;return!Ue||Ue.showAdd===!1?null:y.createElement("button",{ref:Ye,type:"button",className:"".concat(Ze,"-nav-add"),style:Le,"aria-label":(_e==null?void 0:_e.addAriaLabel)||"Add tab",onClick:function(Be){Ue.onEdit("add",{event:Be})}},Ue.addIcon||"+")}var jn=y.forwardRef(Vr);function Bn(Pe,Ye){var Ze=Pe.prefixCls,Ue=Pe.id,_e=Pe.tabs,Le=Pe.locale,Te=Pe.mobile,Be=Pe.moreIcon,Ge=Be===void 0?"More":Be,Je=Pe.moreTransitionName,$e=Pe.style,ot=Pe.className,dt=Pe.editable,St=Pe.tabBarGutter,Tt=Pe.rtl,Pt=Pe.onTabClick,tr=Object(y.useState)(!1),_r=Object(g.a)(tr,2),wr=_r[0],Or=_r[1],Mr=Object(y.useState)(null),Lr=Object(g.a)(Mr,2),Ar=Lr[0],Yr=Lr[1],Ur="".concat(Ue,"-more-popup"),In="".concat(Ze,"-dropdown"),Br=Ar!==null?"".concat(Ur,"-").concat(Ar):null,dr=Le==null?void 0:Le.dropdownAriaLabel,ar=y.createElement(Sr,{onClick:function(yn){var mn=yn.key,Wn=yn.domEvent;Pt(mn,Wn),Or(!1)},id:Ur,tabIndex:-1,role:"listbox","aria-activedescendant":Br,selectedKeys:[Ar],"aria-label":dr!==void 0?dr:"expanded dropdown"},_e.map(function(sn){return y.createElement(kr,{key:sn.key,id:"".concat(Ur,"-").concat(sn.key),role:"option","aria-controls":Ue&&"".concat(Ue,"-panel-").concat(sn.key),disabled:sn.disabled},sn.tab)}));function Wr(sn){for(var yn=_e.filter(function(xi){return!xi.disabled}),mn=yn.findIndex(function(xi){return xi.key===Ar})||0,Wn=yn.length,ri=0;ri<Wn;ri+=1){mn=(mn+sn+Wn)%Wn;var Mn=yn[mn];if(!Mn.disabled){Yr(Mn.key);return}}}function $r(sn){var yn=sn.which;if(!wr){[h.a.DOWN,h.a.SPACE,h.a.ENTER].includes(yn)&&(Or(!0),sn.preventDefault());return}switch(yn){case h.a.UP:Wr(-1),sn.preventDefault();break;case h.a.DOWN:Wr(1),sn.preventDefault();break;case h.a.ESC:Or(!1);break;case h.a.SPACE:case h.a.ENTER:Ar!==null&&Pt(Ar,sn);break}}Object(y.useEffect)(function(){var sn=document.getElementById(Br);sn&&sn.scrollIntoView&&sn.scrollIntoView(!1)},[Ar]),Object(y.useEffect)(function(){wr||Yr(null)},[wr]);var Zt=Object(N.a)({},Tt?"marginLeft":"marginRight",St);_e.length||(Zt.visibility="hidden",Zt.order=1);var rn=C()(Object(N.a)({},"".concat(In,"-rtl"),Tt)),Dn=Te?null:y.createElement(Ei.a,{prefixCls:In,overlay:ar,trigger:["hover"],visible:wr,transitionName:Je,onVisibleChange:Or,overlayClassName:rn,mouseEnterDelay:.1,mouseLeaveDelay:.1},y.createElement("button",{type:"button",className:"".concat(Ze,"-nav-more"),style:Zt,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":Ur,id:"".concat(Ue,"-more"),"aria-expanded":wr,onKeyDown:$r},Ge));return y.createElement("div",{className:C()("".concat(Ze,"-nav-operations"),ot),style:$e,ref:Ye},Dn,y.createElement(jn,{prefixCls:Ze,locale:Le,editable:dt}))}var gi=y.forwardRef(Bn),ua=Object(y.createContext)(null),Xr=.1,Pr=.01,Ir=20,hi=Math.pow(.995,Ir);function Xi(){var Pe=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(Pe)||/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(Pe.substr(0,4)))}function Yi(Pe,Ye){var Ze=Object(y.useState)(),Ue=Object(g.a)(Ze,2),_e=Ue[0],Le=Ue[1],Te=Object(y.useState)(0),Be=Object(g.a)(Te,2),Ge=Be[0],Je=Be[1],$e=Object(y.useState)(0),ot=Object(g.a)($e,2),dt=ot[0],St=ot[1],Tt=Object(y.useState)(),Pt=Object(g.a)(Tt,2),tr=Pt[0],_r=Pt[1],wr=Object(y.useRef)();function Or(dr){var ar=dr.touches[0],Wr=ar.screenX,$r=ar.screenY;Le({x:Wr,y:$r}),window.clearInterval(wr.current)}function Mr(dr){if(!_e)return;dr.preventDefault();var ar=dr.touches[0],Wr=ar.screenX,$r=ar.screenY;Le({x:Wr,y:$r});var Zt=Wr-_e.x,rn=$r-_e.y;Ye(Zt,rn);var Dn=Date.now();Je(Dn),St(Dn-Ge),_r({x:Zt,y:rn})}function Lr(){if(!_e)return;if(Le(null),_r(null),tr){var dr=tr.x/dt,ar=tr.y/dt,Wr=Math.abs(dr),$r=Math.abs(ar);if(Math.max(Wr,$r)<Xr)return;var Zt=dr,rn=ar;wr.current=window.setInterval(function(){if(Math.abs(Zt)<Pr&&Math.abs(rn)<Pr){window.clearInterval(wr.current);return}Zt*=hi,rn*=hi,Ye(Zt*Ir,rn*Ir)},Ir)}}var Ar=Object(y.useRef)(0),Yr=Object(y.useRef)(!1),Ur=Object(y.useRef)();function In(dr){var ar=dr.deltaX,Wr=dr.deltaY,$r=0,Zt=Math.abs(ar),rn=Math.abs(Wr);Zt===rn?$r=Ur.current==="x"?ar:Wr:Zt>rn?($r=ar,Ur.current="x"):($r=Wr,Ur.current="y");var Dn=Date.now();Dn-Ar.current>100&&(Yr.current=!1),(Ye(-$r,-$r)||Yr.current)&&(dr.preventDefault(),Yr.current=!0),Ar.current=Dn}var Br=Object(y.useRef)(null);Br.current={onTouchStart:Or,onTouchMove:Mr,onTouchEnd:Lr,onWheel:In},y.useEffect(function(){function dr(Zt){Br.current.onTouchStart(Zt)}function ar(Zt){Br.current.onTouchMove(Zt)}function Wr(Zt){Br.current.onTouchEnd(Zt)}function $r(Zt){Br.current.onWheel(Zt)}return document.addEventListener("touchmove",ar,{passive:!1}),document.addEventListener("touchend",Wr,{passive:!1}),Pe.current.addEventListener("touchstart",dr,{passive:!1}),Pe.current.addEventListener("wheel",$r),function(){document.removeEventListener("touchmove",ar),document.removeEventListener("touchend",Wr)}},[])}function cr(){var Pe=Object(y.useRef)(new Map);function Ye(Ue){return Pe.current.has(Ue)||Pe.current.set(Ue,y.createRef()),Pe.current.get(Ue)}function Ze(Ue){Pe.current.delete(Ue)}return[Ye,Ze]}function Ut(Pe,Ye){var Ze=y.useRef(Pe),Ue=y.useState({}),_e=Object(g.a)(Ue,2),Le=_e[1];function Te(Be){var Ge=typeof Be=="function"?Be(Ze.current):Be;Ge!==Ze.current&&Ye(Ge,Ze.current),Ze.current=Ge,Le({})}return[Ze.current,Te]}var gr=function(Ye){var Ze=Ye.position,Ue=Ye.prefixCls,_e=Ye.extra;if(!_e)return null;var Le,Te=_e;return Ze==="right"&&(Le=Te.right||!Te.left&&Te||null),Ze==="left"&&(Le=Te.left||null),Le?y.createElement("div",{className:"".concat(Ue,"-extra-content")},Le):null};function br(Pe,Ye){var Ze,Ue=y.useContext(ua),_e=Ue.prefixCls,Le=Ue.tabs,Te=Pe.className,Be=Pe.style,Ge=Pe.id,Je=Pe.animated,$e=Pe.activeKey,ot=Pe.rtl,dt=Pe.extra,St=Pe.editable,Tt=Pe.locale,Pt=Pe.tabPosition,tr=Pe.tabBarGutter,_r=Pe.children,wr=Pe.onTabClick,Or=Pe.onTabScroll,Mr=Object(y.useRef)(),Lr=Object(y.useRef)(),Ar=Object(y.useRef)(),Yr=Object(y.useRef)(),Ur=cr(),In=Object(g.a)(Ur,2),Br=In[0],dr=In[1],ar=Pt==="top"||Pt==="bottom",Wr=Ut(0,function(dn,Kr){ar&&Or&&Or({direction:dn>Kr?"left":"right"})}),$r=Object(g.a)(Wr,2),Zt=$r[0],rn=$r[1],Dn=Ut(0,function(dn,Kr){!ar&&Or&&Or({direction:dn>Kr?"top":"bottom"})}),sn=Object(g.a)(Dn,2),yn=sn[0],mn=sn[1],Wn=Object(y.useState)(0),ri=Object(g.a)(Wn,2),Mn=ri[0],xi=ri[1],Wi=Object(y.useState)(0),Ci=Object(g.a)(Wi,2),ni=Ci[0],Tn=Ci[1],bn=Object(y.useState)(0),Pn=Object(g.a)(bn,2),Ln=Pn[0],Gi=Pn[1],ta=Object(y.useState)(0),ra=Object(g.a)(ta,2),gn=ra[0],Ji=ra[1],na=Object(y.useState)(null),wn=Object(g.a)(na,2),pn=wn[0],ii=wn[1],So=Object(y.useState)(null),eo=Object(g.a)(So,2),ia=eo[0],va=eo[1],Ma=Object(y.useState)(0),to=Object(g.a)(Ma,2),Pa=to[0],Xo=to[1],Yo=Object(y.useState)(0),Co=Object(g.a)(Yo,2),ro=Co[0],no=Co[1],ya=o(new Map),ba=Object(g.a)(ya,2),$o=ba[0],Na=ba[1],Oa=l(Le,$o,Mn),_a="".concat(_e,"-nav-operations-hidden"),Ea=0,Ki=0;ar?ot?(Ea=0,Ki=Math.max(0,Mn-pn)):(Ea=Math.min(0,pn-Mn),Ki=0):(Ea=Math.min(0,ia-ni),Ki=0);function ca(dn){return dn<Ea?[Ea,!1]:dn>Ki?[Ki,!1]:[dn,!0]}var aa=Object(y.useRef)(),Aa=Object(y.useState)(),da=Object(g.a)(Aa,2),ja=da[0],io=da[1];function Fa(){io(Date.now())}function ao(){window.clearTimeout(aa.current)}Yi(Mr,function(dn,Kr){var ai=!1;function Ai(xa,Qi){xa(function(Da){var sa=ca(Da+Qi),oi=Object(g.a)(sa,2),Ha=oi[0],so=oi[1];return ai=so,Ha})}if(ar){if(pn>=Mn)return ai;Ai(rn,dn)}else{if(ia>=ni)return ai;Ai(mn,Kr)}return ao(),Fa(),ai}),Object(y.useEffect)(function(){return ao(),ja&&(aa.current=window.setTimeout(function(){io(0)},100)),ao},[ja]);function oa(){var dn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:$e,Kr=Oa.get(dn);if(!Kr)return;if(ar){var ai=Zt;ot?Kr.right<Zt?ai=Kr.right:Kr.right+Kr.width>Zt+pn&&(ai=Kr.right+Kr.width-pn):Kr.left<-Zt?ai=-Kr.left:Kr.left+Kr.width>-Zt+pn&&(ai=-(Kr.left+Kr.width-pn)),mn(0),rn(ca(ai)[0])}else{var Ai=yn;Kr.top<-yn?Ai=-Kr.top:Kr.top+Kr.height>-yn+ia&&(Ai=-(Kr.top+Kr.height-ia)),rn(0),mn(ca(Ai)[0])}}var ha=b(Oa,{width:pn,height:ia,left:Zt,top:yn},{width:Ln,height:gn},{width:Pa,height:ro},Object(k.a)(Object(k.a)({},Pe),{},{tabs:Le})),Oo=Object(g.a)(ha,2),Jo=Oo[0],Qo=Oo[1],Zo=Le.map(function(dn){var Kr=dn.key;return y.createElement(u,{id:Ge,prefixCls:_e,key:Kr,rtl:ot,tab:dn,closable:dn.closable,editable:St,active:Kr===$e,tabPosition:Pt,tabBarGutter:tr,renderWrapper:_r,removeAriaLabel:Tt==null?void 0:Tt.removeAriaLabel,ref:Br(Kr),onClick:function(Ai){wr(Kr,Ai)},onRemove:function(){dr(Kr)},onFocus:function(){oa(Kr),Fa(),ot||(Mr.current.scrollLeft=0),Mr.current.scrollTop=0}})}),oo=n(function(){var dn,Kr,ai,Ai,xa,Qi,Da,sa,oi,Ha=((dn=Mr.current)===null||dn===void 0?void 0:dn.offsetWidth)||0,so=((Kr=Mr.current)===null||Kr===void 0?void 0:Kr.offsetHeight)||0,lo=((ai=Yr.current)===null||ai===void 0?void 0:ai.offsetWidth)||0,Ri=((Ai=Yr.current)===null||Ai===void 0?void 0:Ai.offsetHeight)||0,cn=((xa=Ar.current)===null||xa===void 0?void 0:xa.offsetWidth)||0,Vi=((Qi=Ar.current)===null||Qi===void 0?void 0:Qi.offsetHeight)||0;ii(Ha),va(so),Xo(lo),no(Ri);var Zi=(((Da=Lr.current)===null||Da===void 0?void 0:Da.offsetWidth)||0)-lo,qi=(((sa=Lr.current)===null||sa===void 0?void 0:sa.offsetHeight)||0)-Ri;xi(Zi),Tn(qi);var uo=(oi=Ar.current)===null||oi===void 0?void 0:oi.className.includes(_a);Gi(Zi-(uo?0:cn)),Ji(qi-(uo?0:Vi)),Na(function(){var Wa=new Map;return Le.forEach(function(Lo){var ko=Lo.key,pa=Br(ko).current;pa&&Wa.set(ko,{width:pa.offsetWidth,height:pa.offsetHeight,left:pa.offsetLeft,top:pa.offsetTop})}),Wa})}),qo=Le.slice(0,Jo),Oi=Le.slice(Qo+1),zn=[].concat(Object(f.a)(qo),Object(f.a)(Oi)),vi=Object(y.useState)(),Vn=Object(g.a)(vi,2),Ra=Vn[0],es=Vn[1],zi=Oa.get($e),Ao=Object(y.useRef)();function Ro(){c.a.cancel(Ao.current)}Object(y.useEffect)(function(){var dn={};return zi&&(ar?(ot?dn.right=zi.right:dn.left=zi.left,dn.width=zi.width):(dn.top=zi.top,dn.height=zi.height)),Ro(),Ao.current=c()(function(){es(dn)}),Ro},[zi,ar,ot]),Object(y.useEffect)(function(){oa()},[$e,zi,Oa,ar]),Object(y.useEffect)(function(){oo()},[ot,tr,$e,Le.map(function(dn){return dn.key}).join("_")]);var Io=!!zn.length,fa="".concat(_e,"-nav-wrap"),Ua,Ia,Do,Ba;return ar?ot?(Ia=Zt>0,Ua=Zt+pn<Mn):(Ua=Zt<0,Ia=-Zt+pn<Mn):(Do=yn<0,Ba=-yn+ia<ni),y.createElement("div",{ref:Ye,role:"tablist",className:C()("".concat(_e,"-nav"),Te),style:Be,onKeyDown:function(){Fa()}},y.createElement(gr,{position:"left",extra:dt,prefixCls:_e}),y.createElement(i.a,{onResize:oo},y.createElement("div",{className:C()(fa,(Ze={},Object(N.a)(Ze,"".concat(fa,"-ping-left"),Ua),Object(N.a)(Ze,"".concat(fa,"-ping-right"),Ia),Object(N.a)(Ze,"".concat(fa,"-ping-top"),Do),Object(N.a)(Ze,"".concat(fa,"-ping-bottom"),Ba),Ze)),ref:Mr},y.createElement(i.a,{onResize:oo},y.createElement("div",{ref:Lr,className:"".concat(_e,"-nav-list"),style:{transform:"translate(".concat(Zt,"px, ").concat(yn,"px)"),transition:ja?"none":void 0}},Zo,y.createElement(jn,{ref:Yr,prefixCls:_e,locale:Tt,editable:St,style:{visibility:Io?"hidden":null}}),y.createElement("div",{className:C()("".concat(_e,"-ink-bar"),Object(N.a)({},"".concat(_e,"-ink-bar-animated"),Je.inkBar)),style:Ra}))))),y.createElement(gi,Object.assign({},Pe,{ref:Ar,prefixCls:_e,tabs:zn,className:!Io&&_a})),y.createElement(gr,{position:"right",extra:dt,prefixCls:_e}))}var an=y.forwardRef(br);function Dr(Pe){var Ye=Pe.id,Ze=Pe.activeKey,Ue=Pe.animated,_e=Pe.tabPosition,Le=Pe.rtl,Te=Pe.destroyInactiveTabPane,Be=y.useContext(ua),Ge=Be.prefixCls,Je=Be.tabs,$e=Ue.tabPane,ot=Je.findIndex(function(dt){return dt.key===Ze});return y.createElement("div",{className:C()("".concat(Ge,"-content-holder"))},y.createElement("div",{className:C()("".concat(Ge,"-content"),"".concat(Ge,"-content-").concat(_e),Object(N.a)({},"".concat(Ge,"-content-animated"),$e)),style:ot&&$e?Object(N.a)({},Le?"marginRight":"marginLeft","-".concat(ot,"00%")):null},Je.map(function(dt){return y.cloneElement(dt.node,{key:dt.key,prefixCls:Ge,tabKey:dt.key,id:Ye,animated:$e,active:dt.key===Ze,destroyInactiveTabPane:Te})})))}function Rn(Pe){var Ye=Pe.prefixCls,Ze=Pe.forceRender,Ue=Pe.className,_e=Pe.style,Le=Pe.id,Te=Pe.active,Be=Pe.animated,Ge=Pe.destroyInactiveTabPane,Je=Pe.tabKey,$e=Pe.children,ot=y.useState(Ze),dt=Object(g.a)(ot,2),St=dt[0],Tt=dt[1];y.useEffect(function(){Te?Tt(!0):Ge&&Tt(!1)},[Te,Ge]);var Pt={};return Te||(Be?(Pt.visibility="hidden",Pt.height=0,Pt.overflowY="hidden"):Pt.display="none"),y.createElement("div",{id:Le&&"".concat(Le,"-panel-").concat(Je),role:"tabpanel",tabIndex:Te?0:-1,"aria-labelledby":Le&&"".concat(Le,"-tab-").concat(Je),"aria-hidden":!Te,style:Object(k.a)(Object(k.a)({},Pt),_e),className:C()("".concat(Ye,"-tabpane"),Te&&"".concat(Ye,"-tabpane-active"),Ue)},(Te||St||Ze)&&$e)}var xn=0;function Li(Pe){return Object(_.a)(Pe).map(function(Ye){if(y.isValidElement(Ye)){var Ze=Ye.key!==void 0?String(Ye.key):void 0;return Object(k.a)(Object(k.a)({key:Ze},Ye.props),{},{node:Ye})}return null}).filter(function(Ye){return Ye})}function Hn(Pe,Ye){var Ze,Ue=Pe.id,_e=Pe.prefixCls,Le=_e===void 0?"rc-tabs":_e,Te=Pe.className,Be=Pe.children,Ge=Pe.direction,Je=Pe.activeKey,$e=Pe.defaultActiveKey,ot=Pe.editable,dt=Pe.animated,St=Pe.tabPosition,Tt=St===void 0?"top":St,Pt=Pe.tabBarGutter,tr=Pe.tabBarStyle,_r=Pe.tabBarExtraContent,wr=Pe.locale,Or=Pe.moreIcon,Mr=Pe.moreTransitionName,Lr=Pe.destroyInactiveTabPane,Ar=Pe.renderTabBar,Yr=Pe.onChange,Ur=Pe.onTabClick,In=Pe.onTabScroll,Br=Object(S.a)(Pe,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),dr=Li(Be),ar=Ge==="rtl",Wr;dt===!1?Wr={inkBar:!1,tabPane:!1}:Wr=Object(k.a)({inkBar:!0,tabPane:!1},dt!==!0?dt:null);var $r=Object(y.useState)(!1),Zt=Object(g.a)($r,2),rn=Zt[0],Dn=Zt[1];Object(y.useEffect)(function(){Dn(Xi())},[]);var sn=Object(e.a)(function(){var gn;return(gn=dr[0])===null||gn===void 0?void 0:gn.key},{value:Je,defaultValue:$e}),yn=Object(g.a)(sn,2),mn=yn[0],Wn=yn[1],ri=Object(y.useState)(function(){return dr.findIndex(function(gn){return gn.key===mn})}),Mn=Object(g.a)(ri,2),xi=Mn[0],Wi=Mn[1];Object(y.useEffect)(function(){var gn=dr.findIndex(function(na){return na.key===mn});if(gn===-1){var Ji;gn=Math.max(0,Math.min(xi,dr.length-1)),Wn((Ji=dr[gn])===null||Ji===void 0?void 0:Ji.key)}Wi(gn)},[dr.map(function(gn){return gn.key}).join("_"),mn,xi]);var Ci=Object(e.a)(null,{value:Ue}),ni=Object(g.a)(Ci,2),Tn=ni[0],bn=ni[1],Pn=Tt;rn&&!["left","right"].includes(Tt)&&(Pn="top"),Object(y.useEffect)(function(){Ue||(bn("rc-tabs-".concat(xn)),xn+=1)},[]);function Ln(gn,Ji){Ur==null||Ur(gn,Ji),Wn(gn),Yr==null||Yr(gn)}var Gi={id:Tn,activeKey:mn,animated:Wr,tabPosition:Pn,rtl:ar,mobile:rn},ta,ra=Object(k.a)(Object(k.a)({},Gi),{},{editable:ot,locale:wr,moreIcon:Or,moreTransitionName:Mr,tabBarGutter:Pt,onTabClick:Ln,onTabScroll:In,extra:_r,style:tr,panes:Be});return Ar?ta=Ar(ra,an):ta=y.createElement(an,Object.assign({},ra)),y.createElement(ua.Provider,{value:{tabs:dr,prefixCls:Le}},y.createElement("div",Object.assign({ref:Ye,id:Ue,className:C()(Le,"".concat(Le,"-").concat(Pn),(Ze={},Object(N.a)(Ze,"".concat(Le,"-mobile"),rn),Object(N.a)(Ze,"".concat(Le,"-editable"),ot),Object(N.a)(Ze,"".concat(Le,"-rtl"),ar),Ze),Te)},Br),ta,y.createElement(Dr,Object.assign({destroyInactiveTabPane:Lr},Gi,{animated:Wr}))))}var Kn=y.forwardRef(Hn);Kn.TabPane=Rn;var Jn=Kn,$i=J.b=Jn},kSUc:function(H,J,I){},lOMy:function(H,J,I){},lPiR:function(H,J,I){(function(N,g){H.exports=J=g(I("Ib8C"))})(this,function(N){return function(g){var S=N,k=S.lib,y=k.WordArray,m=k.Hasher,C=S.algo,_=[],e=[];(function(){function c(h){for(var d=g.sqrt(h),u=2;u<=d;u++)if(!(h%u))return!1;return!0}function i(h){return(h-(h|0))*4294967296|0}for(var n=2,o=0;o<64;)c(n)&&(o<8&&(_[o]=i(g.pow(n,1/2))),e[o]=i(g.pow(n,1/3)),o++),n++})();var f=[],r=C.SHA256=m.extend({_doReset:function(){this._hash=new y.init(_.slice(0))},_doProcessBlock:function(c,i){for(var n=this._hash.words,o=n[0],h=n[1],d=n[2],u=n[3],s=n[4],l=n[5],E=n[6],b=n[7],p=0;p<64;p++){if(p<16)f[p]=c[i+p]|0;else{var L=f[p-15],R=(L<<25|L>>>7)^(L<<14|L>>>18)^L>>>3,v=f[p-2],x=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;f[p]=R+f[p-7]+x+f[p-16]}var w=s&l^~s&E,T=o&h^o&d^h&d,F=(o<<30|o>>>2)^(o<<19|o>>>13)^(o<<10|o>>>22),P=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),A=b+P+w+e[p]+f[p],z=F+T;b=E,E=l,l=s,s=u+A|0,u=d,d=h,h=o,o=A+z|0}n[0]=n[0]+o|0,n[1]=n[1]+h|0,n[2]=n[2]+d|0,n[3]=n[3]+u|0,n[4]=n[4]+s|0,n[5]=n[5]+l|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,o=c.sigBytes*8;return i[o>>>5]|=128<<24-o%32,i[(o+64>>>9<<4)+14]=g.floor(n/4294967296),i[(o+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,J,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"),y=k.name=="null";function m(U){if(N.findModeByName){var D=N.findModeByName(U);D&&(U=D.mime||D.mimes[0])}var W=N.getMode(g,U);return W.name=="null"?null:W}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*$/,f=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,r=/^\[(x| )\](?=\s)/i,c=S.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,i=/^ {0,3}(?:\={1,}|-{2,})\s*$/,n=/^[^#!\[\]*_\\<>` "'(~:]+/,o=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,h=/^\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 s(U,D,W){return D.f=D.inline=W,W(U,D)}function l(U,D,W){return D.f=D.block=W,W(U,D)}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==L){var D=y;if(!D){var W=N.innerMode(k,U.htmlState);D=W.mode.name=="xml"&&W.state.tagStart===null&&!W.state.context&&W.state.tokenize.isInText}D&&(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,D){var W=U.column()===D.indentation,Q=E(D.prevLine.stream),re=D.indentedCode,ee=D.prevLine.hr,ye=D.list!==!1,be=(D.listStack[D.listStack.length-1]||0)+3;D.indentedCode=!1;var he=D.indentation;if(D.indentationDiff===null&&(D.indentationDiff=D.indentation,ye)){for(D.list=null;he<D.listStack[D.listStack.length-1];)D.listStack.pop(),D.listStack.length?D.indentation=D.listStack[D.listStack.length-1]:D.list=!1;D.list!==!1&&(D.indentationDiff=he-D.listStack[D.listStack.length-1])}var Ie=!Q&&!ee&&!D.prevLine.header&&(!ye||!re)&&!D.prevLine.fencedCodeEnd,Se=(D.list===!1||ee||Q)&&D.indentation<=be&&U.match(e),fe=null;if(D.indentationDiff>=4&&(re||D.prevLine.fencedCodeEnd||D.prevLine.header||Q))return U.skipToEnd(),D.indentedCode=!0,C.code;if(U.eatSpace())return null;if(W&&D.indentation<=be&&(fe=U.match(c))&&fe[1].length<=6)return D.quote=0,D.header=fe[1].length,D.thisLine.header=!0,S.highlightFormatting&&(D.formatting="header"),D.f=D.inline,v(D);if(D.indentation<=be&&U.eat(">"))return D.quote=W?1:D.quote+1,S.highlightFormatting&&(D.formatting="quote"),U.eatSpace(),v(D);if(!Se&&!D.setext&&W&&D.indentation<=be&&(fe=U.match(f))){var ue=fe[1]?"ol":"ul";return D.indentation=he+U.current().length,D.list=!0,D.quote=0,D.listStack.push(D.indentation),D.em=!1,D.strong=!1,D.code=!1,D.strikethrough=!1,S.taskLists&&U.match(r,!1)&&(D.taskList=!0),D.f=D.inline,S.highlightFormatting&&(D.formatting=["list","list-"+ue]),v(D)}else{if(W&&D.indentation<=be&&(fe=U.match(o,!0)))return D.quote=0,D.fencedEndRE=new RegExp(fe[1]+"+ *$"),D.localMode=S.fencedCodeBlockHighlighting&&m(fe[2]||S.fencedCodeBlockDefaultMode),D.localMode&&(D.localState=N.startState(D.localMode)),D.f=D.block=R,S.highlightFormatting&&(D.formatting="code-block"),D.code=-1,v(D);if(D.setext||(!Ie||!ye)&&!D.quote&&D.list===!1&&!D.code&&!Se&&!h.test(U.string)&&(fe=U.lookAhead(1))&&(fe=fe.match(i)))return D.setext?(D.header=D.setext,D.setext=0,U.skipToEnd(),S.highlightFormatting&&(D.formatting="header")):(D.header=fe[0].charAt(0)=="="?1:2,D.setext=D.header),D.thisLine.header=!0,D.f=D.inline,v(D);if(Se)return U.skipToEnd(),D.hr=!0,D.thisLine.hr=!0,C.hr;if(U.peek()==="[")return s(U,D,z)}return s(U,D,D.inline)}function L(U,D){var W=k.token(U,D.htmlState);if(!y){var Q=N.innerMode(k,D.htmlState);(Q.mode.name=="xml"&&Q.state.tagStart===null&&!Q.state.context&&Q.state.tokenize.isInText||D.md_inside&&U.current().indexOf(">")>-1)&&(D.f=w,D.block=p,D.htmlState=null)}return W}function R(U,D){var W=D.listStack[D.listStack.length-1]||0,Q=D.indentation<W,re=W+3;if(D.fencedEndRE&&D.indentation<=re&&(Q||U.match(D.fencedEndRE))){S.highlightFormatting&&(D.formatting="code-block");var ee;return Q||(ee=v(D)),D.localMode=D.localState=null,D.block=p,D.f=w,D.fencedEndRE=null,D.code=0,D.thisLine.fencedCodeEnd=!0,Q?l(U,D,D.block):ee}else return D.localMode?D.localMode.token(U,D.localState):(U.skipToEnd(),C.code)}function v(U){var D=[];if(U.formatting){D.push(C.formatting),typeof U.formatting=="string"&&(U.formatting=[U.formatting]);for(var W=0;W<U.formatting.length;W++)D.push(C.formatting+"-"+U.formatting[W]),U.formatting[W]==="header"&&D.push(C.formatting+"-"+U.formatting[W]+"-"+U.header),U.formatting[W]==="quote"&&(!S.maxBlockquoteDepth||S.maxBlockquoteDepth>=U.quote?D.push(C.formatting+"-"+U.formatting[W]+"-"+U.quote):D.push("error"))}if(U.taskOpen)return D.push("meta"),D.length?D.join(" "):null;if(U.taskClosed)return D.push("property"),D.length?D.join(" "):null;if(U.linkHref?D.push(C.linkHref,"url"):(U.strong&&D.push(C.strong),U.em&&D.push(C.em),U.strikethrough&&D.push(C.strikethrough),U.emoji&&D.push(C.emoji),U.linkText&&D.push(C.linkText),U.code&&D.push(C.code),U.image&&D.push(C.image),U.imageAltText&&D.push(C.imageAltText,"link"),U.imageMarker&&D.push(C.imageMarker)),U.header&&D.push(C.header,C.header+"-"+U.header),U.quote&&(D.push(C.quote),!S.maxBlockquoteDepth||S.maxBlockquoteDepth>=U.quote?D.push(C.quote+"-"+U.quote):D.push(C.quote+"-"+S.maxBlockquoteDepth)),U.list!==!1){var Q=(U.listStack.length-1)%3;Q?Q===1?D.push(C.list2):D.push(C.list3):D.push(C.list1)}return U.trailingSpaceNewLine?D.push("trailing-space-new-line"):U.trailingSpace&&D.push("trailing-space-"+(U.trailingSpace%2?"a":"b")),D.length?D.join(" "):null}function x(U,D){return U.match(n,!0)?v(D):void 0}function w(U,D){var W=D.text(U,D);if(typeof W!="undefined")return W;if(D.list)return D.list=null,v(D);if(D.taskList){var Q=U.match(r,!0)[1]===" ";return Q?D.taskOpen=!0:D.taskClosed=!0,S.highlightFormatting&&(D.formatting="task"),D.taskList=!1,v(D)}if(D.taskOpen=!1,D.taskClosed=!1,D.header&&U.match(/^#+$/,!0))return S.highlightFormatting&&(D.formatting="header"),v(D);var re=U.next();if(D.linkTitle){D.linkTitle=!1;var ee=re;re==="("&&(ee=")"),ee=(ee+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ye="^\\s*(?:[^"+ee+"\\\\]+|\\\\\\\\|\\\\.)"+ee;if(U.match(new RegExp(ye),!0))return C.linkHref}if(re==="`"){var be=D.formatting;S.highlightFormatting&&(D.formatting="code"),U.eatWhile("`");var he=U.current().length;if(D.code==0&&(!D.quote||he==1))return D.code=he,v(D);if(he==D.code){var Ie=v(D);return D.code=0,Ie}else return D.formatting=be,v(D)}else if(D.code)return v(D);if(re==="\\"&&(U.next(),S.highlightFormatting)){var Se=v(D),fe=C.formatting+"-escape";return Se?Se+" "+fe:fe}if(re==="!"&&U.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return D.imageMarker=!0,D.image=!0,S.highlightFormatting&&(D.formatting="image"),v(D);if(re==="["&&D.imageMarker&&U.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return D.imageMarker=!1,D.imageAltText=!0,S.highlightFormatting&&(D.formatting="image"),v(D);if(re==="]"&&D.imageAltText){S.highlightFormatting&&(D.formatting="image");var Se=v(D);return D.imageAltText=!1,D.image=!1,D.inline=D.f=F,Se}if(re==="["&&!D.image)return D.linkText&&U.match(/^.*?\]/)||(D.linkText=!0,S.highlightFormatting&&(D.formatting="link")),v(D);if(re==="]"&&D.linkText){S.highlightFormatting&&(D.formatting="link");var Se=v(D);return D.linkText=!1,D.inline=D.f=U.match(/\(.*?\)| ?\[.*?\]/,!1)?F:w,Se}if(re==="<"&&U.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){D.f=D.inline=T,S.highlightFormatting&&(D.formatting="link");var Se=v(D);return Se?Se+=" ":Se="",Se+C.linkInline}if(re==="<"&&U.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){D.f=D.inline=T,S.highlightFormatting&&(D.formatting="link");var Se=v(D);return Se?Se+=" ":Se="",Se+C.linkEmail}if(S.xml&&re==="<"&&U.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var ue=U.string.indexOf(">",U.pos);if(ue!=-1){var ie=U.string.substring(U.start,ue);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(ie)&&(D.md_inside=!0)}return U.backUp(1),D.htmlState=N.startState(k),l(U,D,L)}if(S.xml&&re==="<"&&U.match(/^\/\w*?>/))return D.md_inside=!1,"tag";if(re==="*"||re==="_"){for(var Ce=1,ne=U.pos==1?" ":U.string.charAt(U.pos-2);Ce<3&&U.eat(re);)Ce++;var ce=U.peek()||" ",Ae=!/\s/.test(ce)&&(!d.test(ce)||/\s/.test(ne)||d.test(ne)),oe=!/\s/.test(ne)&&(!d.test(ne)||/\s/.test(ce)||d.test(ce)),q=null,$=null;if(Ce%2&&(!D.em&&Ae&&(re==="*"||!oe||d.test(ne))?q=!0:D.em==re&&oe&&(re==="*"||!Ae||d.test(ce))&&(q=!1)),Ce>1&&(!D.strong&&Ae&&(re==="*"||!oe||d.test(ne))?$=!0:D.strong==re&&oe&&(re==="*"||!Ae||d.test(ce))&&($=!1)),$!=null||q!=null){S.highlightFormatting&&(D.formatting=q==null?"strong":$==null?"em":"strong em"),q===!0&&(D.em=re),$===!0&&(D.strong=re);var Ie=v(D);return q===!1&&(D.em=!1),$===!1&&(D.strong=!1),Ie}}else if(re===" "&&(U.eat("*")||U.eat("_"))){if(U.peek()===" ")return v(D);U.backUp(1)}if(S.strikethrough){if(re==="~"&&U.eatWhile(re)){if(D.strikethrough){S.highlightFormatting&&(D.formatting="strikethrough");var Ie=v(D);return D.strikethrough=!1,Ie}else if(U.match(/^[^\s]/,!1))return D.strikethrough=!0,S.highlightFormatting&&(D.formatting="strikethrough"),v(D)}else if(re===" "&&U.match(/^~~/,!0)){if(U.peek()===" ")return v(D);U.backUp(2)}}if(S.emoji&&re===":"&&U.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){D.emoji=!0,S.highlightFormatting&&(D.formatting="emoji");var X=v(D);return D.emoji=!1,X}return re===" "&&(U.match(/^ +$/,!1)?D.trailingSpace++:D.trailingSpace&&(D.trailingSpaceNewLine=!0)),v(D)}function T(U,D){var W=U.next();if(W===">"){D.f=D.inline=w,S.highlightFormatting&&(D.formatting="link");var Q=v(D);return Q?Q+=" ":Q="",Q+C.linkInline}return U.match(/^[^>]+/,!0),C.linkInline}function F(U,D){if(U.eatSpace())return null;var W=U.next();return W==="("||W==="["?(D.f=D.inline=A(W==="("?")":"]"),S.highlightFormatting&&(D.formatting="link-string"),D.linkHref=!0,v(D)):"error"}var P={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function A(U){return function(D,W){var Q=D.next();if(Q===U){W.f=W.inline=w,S.highlightFormatting&&(W.formatting="link-string");var re=v(W);return W.linkHref=!1,re}return D.match(P[U]),W.linkHref=!0,v(W)}}function z(U,D){return U.match(/^([^\]\\]|\\.)*\]:/,!1)?(D.f=K,U.next(),S.highlightFormatting&&(D.formatting="link"),D.linkText=!0,v(D)):s(U,D,w)}function K(U,D){if(U.match(/^\]:/,!0)){D.f=D.inline=O,S.highlightFormatting&&(D.formatting="link");var W=v(D);return D.linkText=!1,W}return U.match(/^([^\]\\]|\\.)+/,!0),C.linkText}function O(U,D){return U.eatSpace()?null:(U.match(/^[^\s]+/,!0),U.peek()===void 0?D.linkTitle=!0:U.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),D.f=D.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,D){if(D.formatting=!1,U!=D.thisLine.stream){if(D.header=0,D.hr=!1,U.match(/^\s*$/,!0))return b(D),null;if(D.prevLine=D.thisLine,D.thisLine={stream:U},D.taskList=!1,D.trailingSpace=0,D.trailingSpaceNewLine=!1,!D.localState&&(D.f=D.block,D.f!=L)){var W=U.match(/^\s*/,!0)[0].replace(/\t/g,u).length;if(D.indentation=W,D.indentationDiff=null,W>0)return null}}return D.f(U,D)},innerMode:function(U){return U.block==L?{state:U.htmlState,mode:k}:U.localState?{state:U.localState,mode:U.localMode}:{state:U,mode:B}},indent:function(U,D,W){return U.block==L&&k.indent?k.indent(U.htmlState,D,W):U.localState&&U.localMode.indent?U.localMode.indent(U.localState,D,W):N.Pass},blankLine:b,getType:v,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 J})(function(){var define,module,exports;return function(){function H(J,I,N){function g(y,m){if(!I[y]){if(!J[y]){var C=typeof require=="function"&&require;if(!m&&C)return require(y,!0);if(S)return S(y,!0);var _=new Error("Cannot find module '"+y+"'");throw _.code="MODULE_NOT_FOUND",_}var e=I[y]={exports:{}};J[y][0].call(e.exports,function(f){var r=J[y][1][f];return g(r||f)},e,e.exports,H,J,I,N)}return I[y].exports}for(var S=typeof require=="function"&&require,k=0;k<N.length;k++)g(N[k]);return g}return H}()({1:[function(H,J,I){"use strict";var N=H("./browser/client");N.Buffer=H("buffer").Buffer,N.urllib=H("../shims/xhr"),N.version=H("./browser/version").version,J.exports=N},{"../shims/xhr":291,"./browser/client":2,"./browser/version":5,buffer:73}],2:[function(H,J,I){(function(N,g){"use strict";var S=H("babel-runtime/core-js/promise"),k=e(S),y=H("babel-runtime/regenerator"),m=e(y),C=H("babel-runtime/core-js/object/assign"),_=e(C);function e(z){return z&&z.__esModule?z:{default:z}}var f=H("debug")("ali-oss"),r=H("copy-to"),c=H("xml2js"),i=H("agentkeepalive"),n=H("merge-descriptors"),o=H("url"),h=H("is-type-of"),d=H("platform"),u=H("utility"),s=H("urllib"),l=H("./version"),E=H("bowser"),b=H("../common/signUtils"),p=H("../common/utils/isIP"),L=p.isIP,R=H("../common/client/initOptions"),v=H("../common/utils/createRequest"),x=v.createRequest,w=new i;function T(){var z=d.name,K=d.version;z&&z.toLowerCase&&z.toLowerCase()==="ie"&&K.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function F(){return location&&location.protocol==="https:"}function P(z,K){if(T(),!(this instanceof P))return new P(z,K);z&&z.inited?this.options=z:this.options=P.initOptions(z),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=s,this.agent=this.options.agent||w),this.ctx=K,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}J.exports=P,P.initOptions=function(K){K.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var O=(0,_.default)({secure:F(),useFetch:!1},K);return R(O)};var A=P.prototype;A.debug=f,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(K){return this.debug("authorization stringToSign: %s",K,"info"),b.computeSignature(this.options.accessKeySecret,K)},A.authorization=function(K,O,B,U){var D=b.buildCanonicalString(K.toUpperCase(),O,{headers:U,parameters:B});return b.authorization(this.options.accessKeyId,this.options.accessKeySecret,D)},A.request=function(K){var O,B,U,D,W,Q;return m.default.async(function(ee){for(;;)switch(ee.prev=ee.next){case 0:return O=x.call(this,K),this.options.useFetch||(O.params.mode="disable-fetch"),B=void 0,U=void 0,D=!!K.stream,ee.prev=5,ee.next=8,m.default.awrap(this.urllib.request(O.url,O.params));case 8:B=ee.sent,this.debug("response %s %s, got %s, headers: %j",K.method,O.url,B.status,B.headers,"info"),ee.next=15;break;case 12:ee.prev=12,ee.t0=ee.catch(5),U=ee.t0;case 15:if(W=void 0,!(B&&K.successStatuses&&K.successStatuses.indexOf(B.status)===-1)){ee.next=28;break}return ee.next=19,m.default.awrap(this.requestError(B));case 19:if(W=ee.sent,!(W.code==="RequestTimeTooSkewed"&&!D)){ee.next=25;break}return this.options.amendTimeSkewed=+new Date(W.serverTime)-new Date,ee.next=24,m.default.awrap(this.request(K));case 24:return ee.abrupt("return",ee.sent);case 25:W.params=K,ee.next=32;break;case 28:if(!U){ee.next=32;break}return ee.next=31,m.default.awrap(this.requestError(U));case 31:W=ee.sent;case 32:if(!W){ee.next=34;break}throw W;case 34:if(!K.xmlResponse){ee.next=39;break}return ee.next=37,m.default.awrap(this.parseXML(B.data));case 37:Q=ee.sent,B.data=Q;case 39:return ee.abrupt("return",B);case 40:case"end":return ee.stop()}},null,this,[[5,12]])},A._getResource=function(K){var O="/";return K.bucket&&(O+=K.bucket+"/"),K.object&&(O+=K.object),O},A._isIP=L,A._escape=function(K){return u.encodeURIComponent(K).replace(/%2F/g,"/")},A._getReqUrl=function(K){var O={};r(this.options.endpoint).to(O);var B=this._isIP(O.hostname),U=this.options.cname;K.bucket&&!U&&!B&&(O.host=K.bucket+"."+O.host);var D="/";K.bucket&&B&&(D+=K.bucket+"/"),K.object&&(D+=this._escape(K.object).replace(/\+/g,"%2B")),O.pathname=D;var W={};if(K.query&&n(W,K.query),K.subres){var Q={};h.string(K.subres)?Q[K.subres]="":h.array(K.subres)?K.subres.forEach(function(re){Q[re]=""}):Q=K.subres,n(W,Q)}return O.query=W,o.format(O)},A._getUserAgent=function(){var K=g&&g.browser?"js":"nodejs",O="aliyun-sdk-"+K+"/"+l.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(K){var O=K.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return O},A.checkBrowserAndVersion=function(K,O){return E.name===K&&E.version.split(".")[0]===O},A.parseXML=function(K){return new k.default(function(O,B){N.isBuffer(K)&&(K=K.toString()),c.parseString(K,{explicitRoot:!1,explicitArray:!1},function(U,D){U?B(U):O(D)})})},A.requestError=function(K){var O,B,U,D;return m.default.async(function(Q){for(;;)switch(Q.prev=Q.next){case 0:if(O=null,!(!K.data||!K.data.length)){Q.next=5;break}K.status===-1||K.status===-2?(O=new Error(K.message),O.name=K.name,O.status=K.status,O.code=K.name):(K.status===404?(O=new Error("Object not exists"),O.name="NoSuchKeyError",O.status=404,O.code="NoSuchKey"):K.status===412?(O=new Error("Pre condition failed"),O.name="PreconditionFailedError",O.status=412,O.code="PreconditionFailed"):(O=new Error("Unknow error, status: "+K.status),O.name="UnknowError",O.status=K.status),O.requestId=K.headers["x-oss-request-id"],O.host=""),Q.next=33;break;case 5:return B=String(K.data),this.debug("request response error data: %s",B,"error"),U=void 0,Q.prev=8,Q.next=11,m.default.awrap(this.parseXML(B));case 11:if(Q.t0=Q.sent,Q.t0){Q.next=14;break}Q.t0={};case 14:U=Q.t0,Q.next=24;break;case 17:return Q.prev=17,Q.t1=Q.catch(8),this.debug(B,"error"),Q.t1.message+=`
raw xml: `+B,Q.t1.status=K.status,Q.t1.requestId=K.headers["x-oss-request-id"],Q.abrupt("return",Q.t1);case 24:D=U.Message||"unknow request error, status: "+K.status,U.Condition&&(D+=" (condition: "+U.Condition+")"),O=new Error(D),O.name=U.Code?U.Code+"Error":"UnknowError",O.status=K.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"),Q.abrupt("return",O);case 35:case"end":return Q.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,J,I){(function(N){"use strict";var g=H("babel-runtime/core-js/array/from"),S=_(g),k=H("babel-runtime/core-js/promise"),y=_(k),m=H("babel-runtime/regenerator"),C=_(m);function _(b){return b&&b.__esModule?b:{default:b}}var e=H("is-type-of"),f=H("util"),r=H("path"),c=H("mime"),i=H("copy-to"),n=H("../common/utils/isBlob"),o=n.isBlob,h=H("../common/utils/isFile"),d=h.isFile,u=I;u.multipartUpload=function(p,L,R){var v,x,w,T,F,P,A,z,K;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 v=100*1024,R.mime||(d(L)?R.mime=c.getType(r.extname(L.name)):o(L)?R.mime=L.type:R.mime=c.getType(r.extname(L))),R.headers=R.headers||{},this._convertMetaToHeaders(R.meta,R.headers),B.next=12,C.default.awrap(this._getFileSize(L));case 12:if(x=B.sent,!(x<v)){B.next=25;break}return w=this._createStream(L,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<v)){B.next=29;break}throw new Error("partSize must not be smaller than "+v);case 29:return B.next=31,C.default.awrap(this.initMultipartUpload(p,R));case 31:if(P=B.sent,A=P.uploadId,z=this._getPartSize(x,R.partSize),K={file:L,name:p,fileSize:x,partSize:z,uploadId:A,doneParts:[]},!(R&&R.progress)){B.next=38;break}return B.next=38,C.default.awrap(R.progress(0,K,P.res));case 38:return B.next=40,C.default.awrap(this._resumeMultipart(K,R));case 40:return B.abrupt("return",B.sent);case 41:case"end":return B.stop()}},null,this)},u._resumeMultipart=function(p,L){var R,v,x,w,T,F,P,A,z,K,O,B,U,D,W,Q,re,ee;return C.default.async(function(be){for(;;)switch(be.prev=be.next){case 0:if(R=this,!this.isCancel()){be.next=3;break}throw this._makeCancelEvent();case 3:return v=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),z=this._divideParts(x,w),K=z.length,O=!1,B=function(Ie,Se){var fe=this;return new y.default(function(ie,Ce){var ne,ce,Ae,oe;return C.default.async(function($){for(;;)switch($.prev=$.next){case 0:if($.prev=0,Ie.isCancel()){$.next=18;break}return ne=z[Se-1],ce={stream:Ie._createStream(v,ne.start,ne.end),size:ne.end-ne.start},$.next=6,C.default.awrap(Ie._uploadPart(P,T,Se,ce));case 6:if(Ae=$.sent,!(!Ie.isCancel()&&!O)){$.next=15;break}if(p.doneParts.push({number:Se,etag:Ae.res.headers.etag}),!L.progress){$.next=12;break}return $.next=12,C.default.awrap(L.progress(F.length/K,p,Ae.res));case 12:ie({number:Se,etag:Ae.res.headers.etag}),$.next=16;break;case 15:ie();case 16:$.next=19;break;case 18:ie();case 19:$.next=30;break;case 21:$.prev=21,$.t0=$.catch(0),oe=new Error,oe.name=$.t0.name,oe.message=$.t0.message,oe.stack=$.t0.stack,oe.partNum=Se,i($.t0).to(oe),Ce(oe);case 30:case"end":return $.stop()}},null,fe,[[0,21]])})},U=(0,S.default)(new Array(K),function(he,Ie){return Ie+1}),D=A.map(function(he){return he.number}),W=U.filter(function(he){return D.indexOf(he)<0}),Q=5,re=L.parallel||Q,be.next=17,C.default.awrap(this._parallel(W,re,function(he){return new y.default(function(Ie,Se){B(R,he).then(function(fe){fe&&A.push(fe),Ie()}).catch(function(fe){Se(fe)})})}));case 17:if(ee=be.sent,O=!0,!this.isCancel()){be.next=22;break}throw B=null,this._makeCancelEvent();case 22:if(!(ee&&ee.length>0)){be.next=25;break}throw ee[0].message="Failed to upload some parts with error: "+ee[0].toString()+" part_num: "+ee[0].partNum,ee[0];case 25:return be.next=27,C.default.awrap(this.completeMultipartUpload(P,T,A,L));case 27:return be.abrupt("return",be.sent);case 28:case"end":return be.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(!(o(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 s=H("stream"),l=s.Readable;function E(b,p){if(!(this instanceof E))return new E(b,p);l.call(this,p),this.file=b,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}f.inherits(E,l),E.prototype.readFileAndPush=function(p){if(this.fileBuffer)for(var L=!0;L&&this.fileBuffer&&this.start<this.fileBuffer.length;){var R=this.start,v=R+p;v=v>this.fileBuffer.length?this.fileBuffer.length:v,this.start=v,L=this.push(this.fileBuffer.slice(R,v))}},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 L=16*1024;p=p||L;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,L,R){if(o(p)||d(p))return new E(p.slice(L,R));throw new Error("_createStream requires File/Blob.")},u._getPartSize=function(p,L){var R=10*1e3,v=1024*1024;return L?Math.max(Math.ceil(p/R),L):v},u._divideParts=function(p,L){for(var R=Math.ceil(p/L),v=[],x=0;x<R;x++){var w=L*x,T=Math.min(w+L,p);v.push({start:w,end:T})}return v}}).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,J,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),y=H("babel-runtime/core-js/object/assign"),m=e(y),C=H("babel-runtime/regenerator"),_=e(C);function e(R){return R&&R.__esModule?R:{default:R}}var f=H("utility"),r=H("fs"),c=H("is-type-of"),i=H("url"),n=H("copy-to"),o=H("path"),h=H("mime"),d=H("../common/callback"),u=H("../common/signUtils"),s=H("merge-descriptors"),l=H("../common/utils/isBlob"),E=l.isBlob,b=H("../common/utils/isFile"),p=b.isFile,L=I;L.append=function(v,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(v,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)},L.put=function(v,x,w){var T,F,P,A,z,K,O;return _.default.async(function(U){for(;;)switch(U.prev=U.next){case 0:if(T=void 0,w=w||{},v=this._objectName(v),!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=h.getType(o.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(v,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(v,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",z=this._objectRequestParams(A,v,w),d.encodeCallback(z,w),z.mime=w.mime,z.content=T,z.successStatuses=[200],U.next=43,_.default.awrap(this.request(z));case 43:return K=U.sent,O={name:v,url:this._objectUrl(v),res:K.res},z.headers&&z.headers["x-oss-callback"]&&(O.data=JSON.parse(K.data.toString())),U.abrupt("return",O);case 47:case"end":return U.stop()}},null,this,[[13,20]])},L.putStream=function(v,x,w){var T,F,P,A;return _.default.async(function(K){for(;;)switch(K.prev=K.next){case 0:return w=w||{},w.headers=w.headers||{},v=this._objectName(v),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,v,w),d.encodeCallback(F,w),F.mime=w.mime,F.stream=x,F.successStatuses=[200],K.next=13,_.default.awrap(this.request(F));case 13:return P=K.sent,A={name:v,url:this._objectUrl(v),res:P.res},F.headers&&F.headers["x-oss-callback"]&&(A.data=JSON.parse(P.data.toString())),K.abrupt("return",A);case 17:case"end":return K.stop()}},null,this)},s(L,H("../common/object/copyObject")),s(L,H("../common/object/getObjectTagging")),s(L,H("../common/object/putObjectTagging")),s(L,H("../common/object/deleteObjectTagging")),s(L,H("../common/image")),s(L,H("../common/object/getBucketVersions")),s(L,H("../common/object/getACL")),s(L,H("../common/object/putACL")),s(L,H("../common/object/head")),s(L,H("../common/object/delete")),s(L,H("../common/object/get")),s(L,H("../common/object/putSymlink")),s(L,H("../common/object/getSymlink")),s(L,H("../common/object/deleteMulti")),s(L,H("../common/object/getObjectMeta")),L.putMeta=function(v,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(v,v,{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)},L.list=function(v,x){var w,T,F,P,A;return _.default.async(function(K){for(;;)switch(K.prev=K.next){case 0:return w=this._objectRequestParams("GET","",x),w.query=v,w.xmlResponse=!0,w.successStatuses=[200],K.next=6,_.default.awrap(this.request(w));case 6:return T=K.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})),K.abrupt("return",{res:T.res,objects:F,prefixes:A,nextMarker:T.data.NextMarker||null,isTruncated:T.data.IsTruncated==="true"});case 13:case"end":return K.stop()}},null,this)},L.restore=function(v,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",v,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)},L.signatureUrl=function(v,x){x=x||{},v=this._objectName(v),x.method=x.method||"GET";var w=f.timestamp()+(x.expires||1800),T={bucket:this.options.bucket,object:v},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()},L.getObjectUrl=function(v,x){return x?x[x.length-1]!=="/"&&(x+="/"):x=this.options.endpoint.format(),x+this._escape(this._objectName(v))},L._objectUrl=function(v){return this._getReqUrl({bucket:this.options.bucket,object:v})},L.generateObjectUrl=function(R,v){if(v)v[v.length-1]!=="/"&&(v+="/");else{v=this.options.endpoint.format();var x=i.parse(v),w=this.options.bucket;x.hostname=w+"."+x.hostname,x.host=w+"."+x.host,v=x.format()}return v+this._escape(this._objectName(R))},L._objectRequestParams=function(v,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:v,subres:w&&w.subres,timeout:w&&w.timeout,ctx:w&&w.ctx};return w.headers&&(T.headers={},n(w.headers).to(T.headers)),T},L._objectName=function(v){return v.replace(/^\/+/,"")},L._convertMetaToHeaders=function(v,x){if(!v)return;(0,k.default)(v).forEach(function(w){x["x-oss-meta-"+w]=v[w]})},L._deleteFileSafe=function(v){var x=this;return new g.default(function(w){r.exists(v,function(T){T?r.unlink(v,function(F){F&&x.debug("unlink %j error: %s",v,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,J,I){"use strict";I.version="6.10.0"},{}],6:[function(H,J,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"),y=k.checkBucketName,m=I;m.deleteBucketLifecycle=function(_,e){var f,r;return g.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return y(_),f=this._bucketRequestParams("DELETE",_,"lifecycle",e),f.successStatuses=[204],i.next=5,g.default.awrap(this.request(f));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,J,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"),y=k.checkBucketName,m=I;m.deleteBucketWebsite=function(_,e){var f,r;return g.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return y(_),f=this._bucketRequestParams("DELETE",_,"website",e),f.successStatuses=[204],i.next=5,g.default.awrap(this.request(f));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,J,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"),y=k.checkBucketName,m=H("../utils/isArray"),C=m.isArray,_=H("../utils/formatObjKey"),e=_.formatObjKey,f=I;f.getBucketLifecycle=function(c,i){var n,o,h;return g.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return y(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 o=u.sent,h=o.data.Rule||null,h&&(C(h)||(h=[h]),h=h.map(function(s){return s.ID&&(s.id=s.ID,delete s.ID),s.Tag&&!C(s.Tag)&&(s.Tag=[s.Tag]),e(s,"firstLowerCase")})),u.abrupt("return",{rules:h,res:o.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,J,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"),y=k.checkBucketName,m=I;m.getBucketVersioning=function(_,e){var f,r,c;return g.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return y(_),f=this._bucketRequestParams("GET",_,"versioning",e),f.xmlResponse=!0,f.successStatuses=[200],n.next=6,g.default.awrap(this.request(f));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,J,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"),y=k.checkBucketName,m=H("../utils/isObject"),C=m.isObject,_=I;_.getBucketWebsite=function(f,r){var c,i,n;return g.default.async(function(h){for(;;)switch(h.prev=h.next){case 0:return y(f),c=this._bucketRequestParams("GET",f,"website",r),c.successStatuses=[200],c.xmlResponse=!0,h.next=6,g.default.awrap(this.request(c));case 6:return i=h.sent,n=[],i.data.RoutingRules&&i.data.RoutingRules.RoutingRule&&(C(i.data.RoutingRules.RoutingRule)?n=[i.data.RoutingRules.RoutingRule]:n=i.data.RoutingRules.RoutingRule),h.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 h.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isObject":46,"babel-runtime/regenerator":68}],11:[function(H,J,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"),y=k.checkBucketName,m=H("../utils/isArray"),C=m.isArray,_=H("../utils/deepCopy"),e=_.deepCopy,f=H("../utils/isObject"),r=f.isObject,c=H("../utils/obj2xml"),i=c.obj2xml,n=H("../utils/checkObjectTag"),o=n.checkObjectTag,h=H("../utils/getStrBytesCount"),d=h.getStrBytesCount,u=I;u.putBucketLifecycle=function(L,R,v){var x,w,T,F,P;return g.default.async(function(z){for(;;)switch(z.prev=z.next){case 0:if(y(L),C(R)){z.next=3;break}throw new Error("rules must be Array");case 3:return x=this._bucketRequestParams("PUT",L,"lifecycle",v),w=[],T={LifecycleConfiguration:{Rule:w}},R.forEach(function(K){s(K),b(K),K.id&&(K.ID=K.id,delete K.id),w.push(K)}),F=i(T,{headers:!0,firstUpperCase:!0}),x.content=F,x.mime="xml",x.successStatuses=[200],z.next=13,g.default.awrap(this.request(x));case 13:return P=z.sent,z.abrupt("return",{res:P.res});case 15:case"end":return z.stop()}},null,this)};function s(p){p.days&&(p.expiration={days:p.days}),p.date&&(p.expiration={createdBeforeDate:p.date})}function l(p,L){var R=p.days,v=p.createdBeforeDate;if(!R&&!v)throw new Error(L+" must includes days or createdBeforeDate");if(R&&!/^[1-9][0-9]*$/.test(R))throw new Error("days must be a positive integer");if(v&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(v))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 L={},R=e(p);R.forEach(function(v){L[v.key]=v.value}),o(L)}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");l(p.transition,"Transition")}if(p.expiration){if(!p.expiration.expiredObjectDeleteMarker)l(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&&l(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,J,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"),y=k.checkBucketName,m=H("../utils/obj2xml"),C=m.obj2xml,_=I;_.putBucketVersioning=function(f,r){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,n,o;return g.default.async(function(d){for(;;)switch(d.prev=d.next){case 0:if(y(f),["Enabled","Suspended"].includes(r)){d.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return i=this._bucketRequestParams("PUT",f,"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 o=d.sent,d.abrupt("return",{res:o.res,status:o.status});case 11:case"end":return d.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(H,J,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"),y=k.checkBucketName,m=H("../utils/obj2xml"),C=m.obj2xml,_=H("../utils/isArray"),e=_.isArray,f=I;f.putBucketWebsite=function(c){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments[2],o,h,d,u,s;return g.default.async(function(E){for(;;)switch(E.prev=E.next){case 0:if(y(c),o=this._bucketRequestParams("PUT",c,"website",n),h={Suffix:i.index||"index.html"},d={IndexDocument:h},u={WebsiteConfiguration:d},i.supportSubDir&&(h.SupportSubDir=i.supportSubDir),i.type&&(h.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),o.content=u,o.mime="xml",o.successStatuses=[200],E.next=18,g.default.awrap(this.request(o));case 18:return s=E.sent,E.abrupt("return",{res:s.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,J,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"),y=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 f={callbackUrl:encodeURI(e.callback.url),callbackBody:e.callback.body};e.callback.host&&(f.callbackHost=e.callback.host),e.callback.contentType&&(f.callbackBodyType=e.callback.contentType);var r=N.from((0,y.default)(f)).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,y.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,J,I){"use strict";var N=H("babel-runtime/core-js/object/assign"),g=S(N);function S(f){return f&&f.__esModule?f:{default:f}}var k=H("humanize-ms"),y=H("url"),m=H("../utils/checkBucketName"),C=m.checkBucketName;function _(f,r){var c=y.parse(f);if(c.protocol||(c=y.parse("http"+(r?"s":"")+"://"+f)),c.protocol!=="http:"&&c.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return c}function e(f,r,c){var i=c?"https://":"http://",n=r?"-internal.aliyuncs.com":".aliyuncs.com",o="vpc100-oss-cn-";return f.substr(0,o.length)===o&&(n=".aliyuncs.com"),y.parse(i+f+n)}J.exports=function(f){if(!f||!f.accessKeyId||!f.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");f.bucket&&C(f.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},f);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,J,I){"use strict";var N=H("merge-descriptors"),g=I;N(g,H("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(H,J,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"),y=k.checkBucketName,m=H("querystring"),C=H("js-base64"),_=C.Base64.encode,e=I;e.processObjectSave=function(c,i,n,o){var h,d,u,s;return g.default.async(function(E){for(;;)switch(E.prev=E.next){case 0:return f(c,"sourceObject"),f(i,"targetObject"),f(n,"process"),i=this._objectName(i),o&&y(o),h=this._objectRequestParams("POST",c,{subres:"x-oss-process"}),d=o?",b_"+_(o):"",i=_(i),u={"x-oss-process":n+"|sys/saveas,o_"+i+d},h.content=m.stringify(u),E.next=12,g.default.awrap(this.request(h));case 12:return s=E.sent,E.abrupt("return",{res:s.res,status:s.res.status});case 14:case"end":return E.stop()}},null,this)};function f(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,J,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"),y=H("./callback"),m=H("./utils/deepCopy"),C=m.deepCopy,_=I;_.listUploads=function(f,r){var c,i,n,o;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=f,i.xmlResponse=!0,i.successStatuses=[200],d.next=10,g.default.awrap(this.request(i));case 10:return n=d.sent,o=n.data.Upload||[],Array.isArray(o)||(o=[o]),o=o.map(function(u){return{name:u.Key,uploadId:u.UploadId,initiated:u.Initiated}}),d.abrupt("return",{res:n.res,uploads:o,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(f,r,c,i){var n,o,h;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},o=this._objectRequestParams("GET",f,n),o.query=c,o.xmlResponse=!0,o.successStatuses=[200],u.next=10,g.default.awrap(this.request(o));case 10:return h=u.sent,u.abrupt("return",{res:h.res,uploadId:h.data.UploadId,bucket:h.data.Bucket,name:h.data.Key,partNumberMarker:h.data.PartNumberMarker,nextPartNumberMarker:h.data.NextPartNumberMarker,maxParts:h.data.MaxParts,isTruncated:h.data.IsTruncated,parts:h.data.Part||[]});case 12:case"end":return u.stop()}},null,this)},_.abortMultipartUpload=function(f,r,c){var i,n,o;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",f,i),n.successStatuses=[204],d.next=9,g.default.awrap(this.request(n));case 9:return o=d.sent,d.abrupt("return",{res:o.res});case 11:case"end":return d.stop()}},null,this)},_.initMultipartUpload=function(f,r){var c,i,n;return g.default.async(function(h){for(;;)switch(h.prev=h.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",f,c),i.mime=r.mime,i.xmlResponse=!0,i.successStatuses=[200],h.next=12,g.default.awrap(this.request(i));case 12:return n=h.sent,h.abrupt("return",{res:n.res,bucket:n.data.Bucket,name:n.data.Key,uploadId:n.data.UploadId});case 14:case"end":return h.stop()}},null,this)},_.uploadPart=function(f,r,c,i,n,o,h){var d;return g.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return d={stream:this._createStream(i,n,o),size:o-n},s.next=3,g.default.awrap(this._uploadPart(f,r,c,d,h));case 3:return s.abrupt("return",s.sent);case 4:case"end":return s.stop()}},null,this)},_.completeMultipartUpload=function(f,r,c,i){var n,o,h,d,u,s,l,E;return g.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:for(n=c.concat().sort(function(L,R){return L.number-R.number}).filter(function(L,R,v){return!R||L.number!==v[R-1].number}),o=`<?xml version="1.0" encoding="UTF-8"?>
<CompleteMultipartUpload>
`,h=0;h<n.length;h++)d=n[h],o+=`<Part>
`,o+="<PartNumber>"+d.number+`</PartNumber>
`,o+="<ETag>"+d.etag+`</ETag>
`,o+=`</Part>
`;return o+="</CompleteMultipartUpload>",i=i||{},u={},u=C(i),u.headers&&delete u.headers["x-oss-server-side-encryption"],u.subres={uploadId:r},s=this._objectRequestParams("POST",f,u),y.encodeCallback(s,u),s.mime="xml",s.content=o,s.headers&&s.headers["x-oss-callback"]||(s.xmlResponse=!0),s.successStatuses=[200],p.next=17,g.default.awrap(this.request(s));case 17:return l=p.sent,E={res:l.res,bucket:s.bucket,name:f,etag:l.res.headers.etag},s.headers&&s.headers["x-oss-callback"]&&(E.data=JSON.parse(l.data.toString())),p.abrupt("return",E);case 21:case"end":return p.stop()}},null,this)},_._uploadPart=function(f,r,c,i,n){var o,h,d;return g.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return n=n||{},o={},k(n).to(o),o.headers={"Content-Length":i.size},o.subres={partNumber:c,uploadId:r},h=this._objectRequestParams("PUT",f,o),h.mime=o.mime,h.stream=i.stream,h.successStatuses=[200],s.next=11,g.default.awrap(this.request(h));case 11:if(d=s.sent,d.res.headers.etag){s.next=14;break}throw new Error(`Please set the etag of expose-headers in OSS
https://help.aliyun.com/document_detail/32069.html`);case 14:return i.stream=null,h.stream=null,s.abrupt("return",{name:f,etag:d.res.headers.etag,res:d.res});case 17:case"end":return s.stop()}},null,this)}},{"./callback":14,"./utils/deepCopy":39,"babel-runtime/regenerator":68,"copy-to":76}],19:[function(H,J,I){"use strict";var N=H("babel-runtime/regenerator"),g=C(N),S=H("babel-runtime/core-js/object/keys"),k=C(S),y=H("babel-runtime/helpers/typeof"),m=C(y);function C(r){return r&&r.__esModule?r:{default:r}}var _=H("../utils/checkBucketName"),e=_.checkBucketName,f=I;f.copy=function(c,i,n,o){var h,d,u;return g.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:return(typeof n=="undefined"?"undefined":(0,m.default)(n))==="object"&&(o=n),o=o||{},o.headers=o.headers||{},(0,k.default)(o.headers).forEach(function(E){o.headers["x-oss-copy-source-"+E.toLowerCase()]=o.headers[E]}),o.meta&&(o.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(o.meta,o.headers),i=this._getSourceName(i,n),o.versionId&&(i=i+"?versionId="+o.versionId),o.headers["x-oss-copy-source"]=i,h=this._objectRequestParams("PUT",c,o),h.xmlResponse=!0,h.successStatuses=[200,304],l.next=14,g.default.awrap(this.request(h));case 14:return d=l.sent,u=d.data,u&&(u={etag:u.ETag,lastModified:u.LastModified}),l.abrupt("return",{data:u,res:d.res});case 18:case"end":return l.stop()}},null,this)},f._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,J,I){"use strict";var N=H("babel-runtime/regenerator"),g=y(N),S=H("babel-runtime/core-js/object/assign"),k=y(S);function y(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]:{},f,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),f=this._objectRequestParams("DELETE",_,e),f.successStatuses=[204],i.next=6,g.default.awrap(this.request(f));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,J,I){"use strict";var N=H("babel-runtime/regenerator"),g=y(N),S=H("babel-runtime/core-js/object/assign"),k=y(S);function y(f){return f&&f.__esModule?f:{default:f}}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,o,h,d,u,s,l,E,b,p,L;return g.default.async(function(v){for(;;)switch(v.prev=v.next){case 0:if(i=[],!(!r||!r.length)){v.next=3;break}throw new Error("names is required");case 3:for(n=0;n<r.length;n++)o={},typeof r[n]=="string"?o.Key=m.escape(this._objectName(r[n])):(h=r[n],d=h.key,u=h.versionId,o.Key=m.escape(this._objectName(d)),o.VersionId=u),i.push(o);return s={Delete:{Quiet:!!c.quiet,Object:i}},l=_(s,{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=l,E.xmlResponse=!0,E.successStatuses=[200],v.next=15,g.default.awrap(this.request(E));case 15:return b=v.sent,p=b.data,L=p&&p.Deleted||null,L&&(Array.isArray(L)||(L=[L])),v.abrupt("return",{res:b.res,deleted:L||[]});case 20:case"end":return v.stop()}},null,this)}},{"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,utility:290}],22:[function(H,J,I){"use strict";var N=H("babel-runtime/regenerator"),g=y(N),S=H("babel-runtime/core-js/object/assign"),k=y(S);function y(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]:{},f,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(_),f=this._objectRequestParams("DELETE",_,e),f.successStatuses=[204],i.next=7,g.default.awrap(this.request(f));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,J,I){"use strict";var N=H("babel-runtime/regenerator"),g=y(N),S=H("babel-runtime/core-js/object/assign"),k=y(S);function y(e){return e&&e.__esModule?e:{default:e}}var m=H("fs"),C=H("is-type-of"),_=I;_.get=function(f,r){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,n,o,h;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),o=void 0,u.prev=8,h=this._objectRequestParams("GET",f,c),h.writeStream=i,h.successStatuses=[200,206,304],u.next=14,g.default.awrap(this.request(h));case 14:o=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:o.res,content:o.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,J,I){"use strict";var N=H("babel-runtime/regenerator"),g=y(N),S=H("babel-runtime/core-js/object/assign"),k=y(S);function y(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]:{},f,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(_),f=this._objectRequestParams("GET",_,e),f.successStatuses=[200],f.xmlResponse=!0,i.next=8,g.default.awrap(this.request(f));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,J,I){"use strict";var N=H("babel-runtime/core-js/object/keys"),g=C(N),S=H("babel-runtime/regenerator"),k=C(S),y=H("babel-runtime/core-js/object/assign"),m=C(y);function C(h){return h&&h.__esModule?h:{default:h}}var _=I,e=H("../utils/isObject"),f=e.isObject,r=H("../utils/isArray"),c=r.isArray;_.getBucketVersions=i,_.listObjectVersions=i;function i(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u,s,l,E,b,p;return k.default.async(function(R){for(;;)switch(R.prev=R.next){case 0:if(!(h.versionIdMarker&&h.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=o(h),R.next=10,k.default.awrap(this.request(u));case 10:return s=R.sent,l=s.data.Version||[],E=s.data.DeleteMarker||[],b=this,l&&(Array.isArray(l)||(l=[l]),l=l.map(function(v){return{name:v.Key,url:b._objectUrl(v.Key),lastModified:v.LastModified,isLatest:v.IsLatest==="true",versionId:v.VersionId,etag:v.ETag,type:v.Type,size:Number(v.Size),storageClass:v.StorageClass,owner:{id:v.Owner.ID,displayName:v.Owner.DisplayName}}})),E&&(c(E)||(E=[E]),E=E.map(function(v){return{name:v.Key,lastModified:v.LastModified,versionId:v.VersionId,owner:{id:v.Owner.ID,displayName:v.Owner.DisplayName}}})),p=s.data.CommonPrefixes||null,p&&(c(p)||(p=[p]),p=p.map(function(v){return v.Prefix})),R.abrupt("return",{res:s.res,objects:l,deleteMarker:E,prefixes:p,nextMarker:s.data.NextMarker||null,NextVersionIdMarker:s.data.NextVersionIdMarker||null,isTruncated:s.data.IsTruncated==="true"});case 19:case"end":return R.stop()}},null,this)}function n(h){return h.replace(/([A-Z])/g,"-$1").toLowerCase()}function o(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d={};return f(h)&&(0,g.default)(h).forEach(function(u){d[n(u)]=h[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,J,I){"use strict";var N=H("babel-runtime/regenerator"),g=y(N),S=H("babel-runtime/core-js/object/assign"),k=y(S);function y(C){return C&&C.__esModule?C:{default:C}}var m=I;m.getObjectMeta=function(_,e){var f,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),f=this._objectRequestParams("HEAD",_,e),f.successStatuses=[200],i.next=8,g.default.awrap(this.request(f));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,J,I){"use strict";var N=H("babel-runtime/regenerator"),g=y(N),S=H("babel-runtime/core-js/object/assign"),k=y(S);function y(e){return e&&e.__esModule?e:{default:e}}var m=I,C=H("../utils/isObject"),_=C.isObject;m.getObjectTagging=function(f){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c,i,n,o,h;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),f=this._objectName(f),c=this._objectRequestParams("GET",f,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,o=n.TagSet.Tag,o=o&&_(o)?[o]:o||[],h={},o.forEach(function(s){h[s.Key]=s.Value}),u.abrupt("return",{status:i.status,res:i.res,tag:h});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,J,I){"use strict";var N=H("babel-runtime/regenerator"),g=y(N),S=H("babel-runtime/core-js/object/assign"),k=y(S);function y(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]:{},f,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(_),f=this._objectRequestParams("GET",_,e),f.successStatuses=[200],n.next=7,g.default.awrap(this.request(f));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,J,I){"use strict";var N=H("babel-runtime/regenerator"),g=C(N),S=H("babel-runtime/core-js/object/keys"),k=C(S),y=H("babel-runtime/core-js/object/assign"),m=C(y);function C(e){return e&&e.__esModule?e:{default:e}}var _=I;_.head=function(f){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c,i,n;return g.default.async(function(h){for(;;)switch(h.prev=h.next){case 0:return r.subres=(0,m.default)({},r.subres),r.versionId&&(r.subres.versionId=r.versionId),c=this._objectRequestParams("HEAD",f,r),c.successStatuses=[200,304],h.next=6,g.default.awrap(this.request(c));case 6:return i=h.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])}),h.abrupt("return",n);case 10:case"end":return h.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],30:[function(H,J,I){"use strict";var N=H("babel-runtime/regenerator"),g=y(N),S=H("babel-runtime/core-js/object/assign"),k=y(S);function y(C){return C&&C.__esModule?C:{default:C}}var m=I;m.putACL=function(_,e,f){var r,c;return g.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return f=f||{},f.subres=(0,k.default)({acl:""},f.subres),f.versionId&&(f.subres.versionId=f.versionId),f.headers=f.headers||{},f.headers["x-oss-object-acl"]=e,_=this._objectName(_),r=this._objectRequestParams("PUT",_,f),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,J,I){"use strict";var N=H("babel-runtime/regenerator"),g=C(N),S=H("babel-runtime/core-js/object/keys"),k=C(S),y=H("babel-runtime/core-js/object/assign"),m=C(y);function C(i){return i&&i.__esModule?i:{default:i}}var _=H("../utils/obj2xml"),e=_.obj2xml,f=H("../utils/checkObjectTag"),r=f.checkObjectTag,c=I;c.putObjectTagging=function(n,o){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},d,u,s;return g.default.async(function(E){for(;;)switch(E.prev=E.next){case 0:return r(o),h.subres=(0,m.default)({tagging:""},h.subres),h.versionId&&(h.subres.versionId=h.versionId),n=this._objectName(n),d=this._objectRequestParams("PUT",n,h),d.successStatuses=[200],o=(0,k.default)(o).map(function(b){return{Key:b,Value:o[b]}}),u={Tagging:{TagSet:{Tag:o}}},d.mime="xml",d.content=e(u),E.next=12,g.default.awrap(this.request(d));case 12:return s=E.sent,E.abrupt("return",{res:s.res,status:s.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,J,I){"use strict";var N=H("babel-runtime/regenerator"),g=y(N),S=H("babel-runtime/core-js/object/assign"),k=y(S);function y(C){return C&&C.__esModule?C:{default:C}}var m=I;m.putSymlink=function(_,e,f){var r,c;return g.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return f=f||{},f.headers=f.headers||{},e=this._escape(this._objectName(e)),this._convertMetaToHeaders(f.meta,f.headers),f.headers["x-oss-symlink-target"]=e,f.subres=(0,k.default)({symlink:""},f.subres),f.versionId&&(f.subres.versionId=f.versionId),f.storageClass&&(f.headers["x-oss-storage-class"]=f.storageClass),_=this._objectName(_),r=this._objectRequestParams("PUT",_,f),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,J,I){"use strict";var N=H("babel-runtime/regenerator"),g=y(N),S=H("babel-runtime/core-js/promise"),k=y(S);function y(C){return C&&C.__esModule?C:{default:C}}var m=I;m._parallelNode=function(_,e,f,r){var c,i,n,o,h,d,u,s;return g.default.async(function(E){for(;;)switch(E.prev=E.next){case 0:c=this,i=[],n=[],o=_.length/e,h=_.length%e,d=h===0?o:(_.length-h)/e+1,u=1,s=0;case 8:if(!(s<_.length)){E.next=26;break}if(!c.isCancel()){E.next=11;break}return E.abrupt("break",26);case 11:if(r?n.push(f(c,_[s],r)):n.push(f(c,_[s])),!(n.length===e||u===d&&s===_.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:s++,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,f){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 L=p;p=null;for(var R=arguments.length,v=Array(R),x=0;x<R;x++)v[x]=arguments[x];L.apply(this,v)}}function o(p){var L=-1,R=p.length;return function(){return++L<R&&!r.isCancel()?{value:p[L],key:L}:null}}var h=o(_),d=!1,u=0,s=!1;function l(p,L){u-=1,p?(d=!0,i.push(p),c(i)):L==={}||d&&u<=0?(d=!0,c(i)):s||(r.isCancel()?c(i):b())}function E(p,L){f(p).then(function(R){L(null,R)}).catch(function(R){L(R)})}function b(){for(s=!0;u<e&&!d&&!r.isCancel();){var p=h();if(p===null||i.length>0){d=!0,u<=0&&c(i);return}u+=1,E(p.value,n(l))}s=!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,J,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"),y=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(f,r){var c=""+f,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},o=function(d){c+=i+d,r[d]&&(c+="="+r[d]),i="&"};(0,y.default)(r).sort(n).forEach(o)}return c},I.buildCanonicalString=function(f,r,c,i){c=c||{};var n=c.headers||{},o="x-oss-",h=[],d={},u=[f.toUpperCase(),n["Content-Md5"]||"",n["Content-Type"]||n["Content-Type".toLowerCase()],i||n["x-oss-date"]];return(0,y.default)(n).forEach(function(s){var l=s.toLowerCase();l.indexOf(o)===0&&(d[l]=String(n[s]).trim())}),(0,y.default)(d).sort().forEach(function(s){h.push(s+":"+d[s])}),u=u.concat(h),u.push(this.buildCanonicalizedResource(r,c.parameters)),u.join(`
`)},I.computeSignature=function(f,r){var c=C.createHmac("sha1",f);return c.update(N.from(r,"utf8")).digest("base64")},I.authorization=function(f,r,c){return"OSS "+f+":"+this.computeSignature(r,c)},I._signatureForURL=function(f){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=arguments[2],i=arguments[3],n={},o=r.subResource,h=o===void 0?{}:o;if(r.process){var d="x-oss-process";h[d]=r.process}if(r.trafficLimit){var u="x-oss-traffic-limit";h[u]=r.trafficLimit}if(r.response&&(0,y.default)(r.response).forEach(function(b){var p="response-"+b.toLowerCase();h[p]=r.response[b]}),(0,y.default)(r).forEach(function(b){var p=b.toLowerCase(),L=r[b];p.indexOf("x-oss-")===0?n[p]=L:(p.indexOf("content-md5")===0||p.indexOf("content-type")===0)&&(n[b]=L)}),Object.prototype.hasOwnProperty.call(r,"security-token")&&(h["security-token"]=r["security-token"]),Object.prototype.hasOwnProperty.call(r,"callback")){var s={callbackUrl:encodeURI(r.callback.url),callbackBody:r.callback.body};if(r.callback.host&&(s.callbackHost=r.callback.host),r.callback.contentType&&(s.callbackBodyType=r.callback.contentType),h.callback=N.from((0,S.default)(s)).toString("base64"),r.callback.customValue){var l={};(0,y.default)(r.callback.customValue).forEach(function(b){l["x:"+b]=r.callback.customValue[b]}),h["callback-var"]=N.from((0,S.default)(l)).toString("base64")}}var E=this.buildCanonicalString(r.method,c,{headers:n,parameters:h},i.toString());return{Signature:this.computeSignature(f,E),subResource:h}}}).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,J,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,J,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"),y=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 f(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(o,h){y(o,e[i[h]])})})}I.checkObjectTag=f},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(H,J,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,J,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 y=H("./../../../shims/crypto/crypto.js"),m=H("debug")("ali-oss"),C=H("mime"),_=H("dateformat"),e=H("copy-to"),f=H("path");function r(n,o){return n[o]||n[o.toLowerCase()]}function c(n,o){delete n[o],delete n[o.toLowerCase()]}function i(n){var o=new Date;this.options.amendTimeSkewed&&(o=+new Date+this.options.amendTimeSkewed);var h={"x-oss-date":_(o,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(h["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,S.default)(h,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(h["x-oss-security-token"]=this.options.stsToken),e(n.headers).to(h),r(h,"Content-Type")||(n.mime&&n.mime.indexOf("/")>0?h["Content-Type"]=n.mime:h["Content-Type"]=C.getType(n.mime||f.extname(n.object||""))),r(h,"Content-Type")||c(h,"Content-Type"),n.content&&(h["Content-Md5"]=y.createHash("md5").update(N.from(n.content,"utf8")).digest("base64"),h["Content-Length"]||(h["Content-Length"]=n.content.length));var d=this._getResource(n);h.authorization=this.authorization(n.method,d,n.subres,h);var u=this._getReqUrl(n);m("request %s %s, with headers %j, !!stream: %s",n.method,u,h,!!n.stream);var s=n.timeout||this.options.timeout,l={method:n.method,content:n.content,stream:n.stream,headers:h,timeout:s,writeStream:n.writeStream,customResponse:n.customResponse,ctx:n.ctx||this.ctx};return this.agent&&(l.agent=this.agent),this.httpsAgent&&(l.httpsAgent=this.httpsAgent),{url:u,params:l}}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,J,I){"use strict";var N=H("babel-runtime/core-js/object/keys"),g=y(N),S=H("babel-runtime/helpers/typeof"),k=y(S);function y(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,J,I){"use strict";var N=H("babel-runtime/core-js/object/keys"),g=y(N),S=H("babel-runtime/helpers/typeof"),k=y(S);function y(_){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 f=void 0;if(Array.isArray(_)){f=[];for(var r=0;r<_.length;r++)f.push(m(_[r],e))}else f={},(0,g.default)(_).forEach(function(c){f[C(c,e)]=m(_[c],e)});return f}I.formatObjKey=m;function C(_,e){return e==="firstUpperCase"?_=_.replace(/^./,function(f){return f.toUpperCase()}):e==="firstLowerCase"&&(_=_.replace(/^./,function(f){return f.toLowerCase()})),_}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],41:[function(H,J,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 y=g.charAt(k);/^[\u00-\uff]$/.test(y)?S+=1:S+=2}return S}I.getStrBytesCount=N},{}],42:[function(H,J,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,J,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,J,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,J,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,J,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,J,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 y(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")),y(C)==="object"?(0,g.default)(C).forEach(function(f){y(C[f])==="string"||y(C[f])==="number"?e+="<"+f+">"+C[f]+"</"+f+">":y(C[f])==="object"?e+="<"+f+">"+m(C[f])+"</"+f+">":y(C[f])==="array"?e+=C[f].map(function(r){return"<"+f+">"+m(r)+"</"+f+">"}).join(""):e+="<"+f+">"+C[f].toString()+"</"+f+">"}):e+=C.toString(),e}I.obj2xml=m},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(H,J,I){J.exports=N,J.exports.HttpsAgent=N;function N(){}},{}],49:[function(H,J,I){J.exports=H("./register")().Promise},{"./register":51}],50:[function(H,J,I){"use strict";var N="@@any-promise/REGISTRATION",g=null;J.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,J,I){"use strict";J.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,J,I){J.exports={default:H("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(H,J,I){J.exports={default:H("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(H,J,I){J.exports={default:H("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(H,J,I){J.exports={default:H("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(H,J,I){J.exports={default:H("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(H,J,I){J.exports={default:H("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(H,J,I){J.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,J,I){J.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,J,I){J.exports={default:H("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(H,J,I){J.exports={default:H("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(H,J,I){J.exports={default:H("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(H,J,I){J.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,J,I){J.exports={default:H("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(H,J,I){J.exports={default:H("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(H,J,I){J.exports={default:H("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(H,J,I){"use strict";I.__esModule=!0;var N=H("../core-js/symbol/iterator"),g=m(N),S=H("../core-js/symbol"),k=m(S),y=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"&&y(g.default)==="symbol"?function(C){return typeof C=="undefined"?"undefined":y(C)}:function(C){return C&&typeof k.default=="function"&&C.constructor===k.default&&C!==k.default.prototype?"symbol":typeof C=="undefined"?"undefined":y(C)}},{"../core-js/symbol":64,"../core-js/symbol/iterator":66}],68:[function(H,J,I){J.exports=H("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(H,J,I){"use strict";I.byteLength=_,I.toByteArray=f,I.fromByteArray=i;for(var N=[],g=[],S=typeof Uint8Array!="undefined"?Uint8Array:Array,k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y=0,m=k.length;y<m;++y)N[y]=k[y],g[k.charCodeAt(y)]=y;g["-".charCodeAt(0)]=62,g["_".charCodeAt(0)]=63;function C(n){var o=n.length;if(o%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var h=n.indexOf("=");h===-1&&(h=o);var d=h===o?0:4-h%4;return[h,d]}function _(n){var o=C(n),h=o[0],d=o[1];return(h+d)*3/4-d}function e(n,o,h){return(o+h)*3/4-h}function f(n){var o,h=C(n),d=h[0],u=h[1],s=new S(e(n,d,u)),l=0,E=u>0?d-4:d,b;for(b=0;b<E;b+=4)o=g[n.charCodeAt(b)]<<18|g[n.charCodeAt(b+1)]<<12|g[n.charCodeAt(b+2)]<<6|g[n.charCodeAt(b+3)],s[l++]=o>>16&255,s[l++]=o>>8&255,s[l++]=o&255;return u===2&&(o=g[n.charCodeAt(b)]<<2|g[n.charCodeAt(b+1)]>>4,s[l++]=o&255),u===1&&(o=g[n.charCodeAt(b)]<<10|g[n.charCodeAt(b+1)]<<4|g[n.charCodeAt(b+2)]>>2,s[l++]=o>>8&255,s[l++]=o&255),s}function r(n){return N[n>>18&63]+N[n>>12&63]+N[n>>6&63]+N[n&63]}function c(n,o,h){for(var d,u=[],s=o;s<h;s+=3)d=(n[s]<<16&16711680)+(n[s+1]<<8&65280)+(n[s+2]&255),u.push(r(d));return u.join("")}function i(n){for(var o,h=n.length,d=h%3,u=[],s=16383,l=0,E=h-d;l<E;l+=s)u.push(c(n,l,l+s>E?E:l+s));return d===1?(o=n[h-1],u.push(N[o>>2]+N[o<<4&63]+"==")):d===2&&(o=(n[h-2]<<8)+n[h-1],u.push(N[o>>10]+N[o>>4&63]+N[o<<2&63]+"=")),u.join("")}},{}],70:[function(H,J,I){/*!
* Bowser - a browser detector
* https://github.com/ded/bowser
* MIT License | (c) Dustin Diaz 2015
*/!function(N,g,S){typeof J!="undefined"&&J.exports?J.exports=S():typeof define=="function"&&define.amd?define(g,S):N[g]=S()}(this,"bowser",function(){var N=!0;function g(e){function f(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=f(/(ipod|iphone|ipad)/i).toLowerCase(),i=/like android/i.test(e),n=!i&&/android/i.test(e),o=/nexus\s*[0-6]\s*/i.test(e),h=!o&&/nexus\s*[0-9]+/i.test(e),d=/CrOS/.test(e),u=/silk/i.test(e),s=/sailfish/i.test(e),l=/tizen/i.test(e),E=/(web|hpw)(o|0)s/i.test(e),b=/windows phone/i.test(e),p=/SamsungBrowser/i.test(e),L=!b&&/windows/i.test(e),R=!c&&!u&&/macintosh/i.test(e),v=!n&&!s&&!l&&!E&&/linux/i.test(e),x=r(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),w=f(/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||f(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(e)?A={name:"Opera",opera:N,version:f(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||w}:/SamsungBrowser/i.test(e)?A={name:"Samsung Internet for Android",samsungBrowser:N,version:w||f(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(e)?A={name:"NAVER Whale browser",whale:N,version:f(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(e)?A={name:"MZ Browser",mzbrowser:N,version:f(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(e)?A={name:"Opera Coast",coast:N,version:w||f(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(e)?A={name:"Focus",focus:N,version:f(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(e)?A={name:"Yandex Browser",yandexbrowser:N,version:w||f(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(e)?A={name:"UC Browser",ucbrowser:N,version:f(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(e)?A={name:"Maxthon",maxthon:N,version:f(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(e)?A={name:"Epiphany",epiphany:N,version:f(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(e)?A={name:"Puffin",puffin:N,version:f(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(e)?A={name:"Sleipnir",sleipnir:N,version:f(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(e)?A={name:"K-Meleon",kMeleon:N,version:f(/(?: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=f(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(e)?A={name:"Internet Explorer",msie:N,version:f(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:d?A={name:"Chrome",osname:"Chrome OS",chromeos:N,chromeBook:N,chrome:N,version:f(/(?: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:f(/vivaldi\/(\d+(\.\d+)?)/i)||w}:s?A={name:"Sailfish",osname:"Sailfish OS",sailfish:N,version:f(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(e)?A={name:"SeaMonkey",seamonkey:N,version:f(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(e)?(A={name:"Firefox",firefox:N,version:f(/(?: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:f(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(e)?A={name:"PhantomJS",phantom:N,version:f(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(e)?A={name:"SlimerJS",slimer:N,version:f(/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||f(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:E?(A={name:"WebOS",osname:"WebOS",webos:N,version:w||f(/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:f(/dolfin\/(\d+(\.\d+)?)/i)}:l?A={name:"Tizen",osname:"Tizen",tizen:N,version:f(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||w}:/qupzilla/i.test(e)?A={name:"QupZilla",qupzilla:N,version:f(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||w}:/chromium/i.test(e)?A={name:"Chromium",chromium:N,version:f(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||w}:/chrome|crios|crmo/i.test(e)?A={name:"Chrome",chrome:N,version:f(/(?: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:f(/googlebot\/(\d+(\.\d+))/i)||w}:A={name:f(/^(.*)\/(.*) /),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||f(/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"):L?(A.windows=N,A.osname="Windows"):v&&(A.linux=N,A.osname="Linux");function z(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 K="";A.windows?K=z(f(/Windows ((NT|XP)( \d\d?.\d)?)/i)):A.windowsphone?K=f(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):A.mac?(K=f(/Mac OS X (\d+([_\.\s]\d+)*)/i),K=K.replace(/[_\s]/g,".")):c?(K=f(/os (\d+([_\s]\d+)*) like mac os x/i),K=K.replace(/[_\s]/g,".")):n?K=f(/android[ \/-](\d+(\.\d+)*)/i):A.webos?K=f(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):A.blackberry?K=f(/rim\stablet\sos\s(\d+(\.\d+)*)/i):A.bada?K=f(/bada\/(\d+(\.\d+)*)/i):A.tizen&&(K=f(/tizen[\/\s](\d+(\.\d+)*)/i)),K&&(A.osversion=K);var O=!A.windows&&K.split(".")[0];return T||h||c=="ipad"||n&&(O==3||O>=4&&!F)||A.silk?A.tablet=N:(F||c=="iphone"||c=="ipod"||n||o||A.blackberry||A.webos||A.bada)&&(A.mobile=N),A.msedge||A.msie&&A.version>=10||A.yandexbrowser&&A.version>=15||A.vivaldi&&A.version>=1||A.chrome&&A.version>=20||A.samsungBrowser&&A.version>=4||A.whale&&m([A.version,"1.0"])===1||A.mzbrowser&&m([A.version,"6.0"])===1||A.focus&&m([A.version,"1.0"])===1||A.firefox&&A.version>=20||A.safari&&A.version>=6||A.opera&&A.version>=10||A.ios&&A.osversion&&A.osversion.split(".")[0]>=6||A.blackberry&&A.version>=10.1||A.chromium&&A.version>=20?A.a=N:A.msie&&A.version<10||A.chrome&&A.version<20||A.firefox&&A.version<20||A.safari&&A.version<6||A.opera&&A.version<10||A.ios&&A.osversion&&A.osversion.split(".")[0]<6||A.chromium&&A.version<20?A.c=N:A.x=N,A}var S=g(typeof navigator!="undefined"&&navigator.userAgent||"");S.test=function(e){for(var f=0;f<e.length;++f){var r=e[f];if(typeof r=="string"&&r in S)return!0}return!1};function k(e){return e.split(".").length}function y(e,f){var r=[],c;if(Array.prototype.map)return Array.prototype.map.call(e,f);for(c=0;c<e.length;c++)r.push(f(e[c]));return r}function m(e){for(var f=Math.max(k(e[0]),k(e[1])),r=y(e,function(c){var i=f-k(c);return c=c+new Array(i+1).join(".0"),y(c.split("."),function(n){return new Array(20-n.length).join("0")+n}).reverse()});--f>=0;){if(r[0][f]>r[1][f])return 1;if(r[0][f]===r[1][f]){if(f===0)return 0}else return-1}}function C(e,f,r){var c=S;typeof f=="string"&&(r=f,f=void 0),f===void 0&&(f=!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 f}function _(e,f,r){return!C(e,f,r)}return S.isUnsupportedBrowser=C,S.compareVersions=m,S.check=_,S._detect=g,S.detect=g,S})},{}],71:[function(H,J,I){},{}],72:[function(H,J,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=y;return}this.charBuffer=new N(6),this.charReceived=0,this.charLength=0};k.prototype.write=function(_){for(var e="";this.charLength;){var f=_.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:_.length;if(_.copy(this.charBuffer,this.charReceived,0,f),this.charReceived+=f,this.charReceived<this.charLength)return"";_=_.slice(f,_.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 f=_[_.length-e];if(e==1&&f>>5==6){this.charLength=2;break}if(e<=2&&f>>4==14){this.charLength=3;break}if(e<=3&&f>>3==30){this.charLength=4;break}}this.charReceived=e},k.prototype.end=function(_){var e="";if(_&&_.length&&(e=this.write(_)),this.charReceived){var f=this.charReceived,r=this.charBuffer,c=this.encoding;e+=r.slice(0,f).toString(c)}return e};function y(_){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,J,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"),y=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 oe=new Uint8Array(1);return oe.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},oe.foo()===42&&typeof oe.subarray=="function"&&oe.subarray(1,1).byteLength===0}catch(q){return!1}}function C(){return g.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function _(oe,q){if(C()<q)throw new RangeError("Invalid typed array length");return g.TYPED_ARRAY_SUPPORT?(oe=new Uint8Array(q),oe.__proto__=g.prototype):(oe===null&&(oe=new g(q)),oe.length=q),oe}function g(oe,q,$){if(!g.TYPED_ARRAY_SUPPORT&&!(this instanceof g))return new g(oe,q,$);if(typeof oe=="number"){if(typeof q=="string")throw new Error("If encoding is specified then the first argument must be a string");return c(this,oe)}return e(this,oe,q,$)}g.poolSize=8192,g._augment=function(oe){return oe.__proto__=g.prototype,oe};function e(oe,q,$,X){if(typeof q=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&q instanceof ArrayBuffer?o(oe,q,$,X):typeof q=="string"?i(oe,q,$):h(oe,q)}g.from=function(oe,q,$){return e(null,oe,q,$)},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 f(oe){if(typeof oe!="number")throw new TypeError('"size" argument must be a number');if(oe<0)throw new RangeError('"size" argument must not be negative')}function r(oe,q,$,X){return f(q),q<=0?_(oe,q):$!==void 0?typeof X=="string"?_(oe,q).fill($,X):_(oe,q).fill($):_(oe,q)}g.alloc=function(oe,q,$){return r(null,oe,q,$)};function c(oe,q){if(f(q),oe=_(oe,q<0?0:d(q)|0),!g.TYPED_ARRAY_SUPPORT)for(var $=0;$<q;++$)oe[$]=0;return oe}g.allocUnsafe=function(oe){return c(null,oe)},g.allocUnsafeSlow=function(oe){return c(null,oe)};function i(oe,q,$){if((typeof $!="string"||$==="")&&($="utf8"),!g.isEncoding($))throw new TypeError('"encoding" must be a valid string encoding');var X=s(q,$)|0;oe=_(oe,X);var de=oe.write(q,$);return de!==X&&(oe=oe.slice(0,de)),oe}function n(oe,q){var $=q.length<0?0:d(q.length)|0;oe=_(oe,$);for(var X=0;X<$;X+=1)oe[X]=q[X]&255;return oe}function o(oe,q,$,X){if(q.byteLength,$<0||q.byteLength<$)throw new RangeError("'offset' is out of bounds");if(q.byteLength<$+(X||0))throw new RangeError("'length' is out of bounds");return $===void 0&&X===void 0?q=new Uint8Array(q):X===void 0?q=new Uint8Array(q,$):q=new Uint8Array(q,$,X),g.TYPED_ARRAY_SUPPORT?(oe=q,oe.__proto__=g.prototype):oe=n(oe,q),oe}function h(oe,q){if(g.isBuffer(q)){var $=d(q.length)|0;return oe=_(oe,$),oe.length===0||q.copy(oe,0,0,$),oe}if(q){if(typeof ArrayBuffer!="undefined"&&q.buffer instanceof ArrayBuffer||"length"in q)return typeof q.length!="number"||Ae(q.length)?_(oe,0):n(oe,q);if(q.type==="Buffer"&&y(q.data))return n(oe,q.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function d(oe){if(oe>=C())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+C().toString(16)+" bytes");return oe|0}function u(oe){return+oe!=oe&&(oe=0),g.alloc(+oe)}g.isBuffer=function(q){return!!(q!=null&&q._isBuffer)},g.compare=function(q,$){if(!g.isBuffer(q)||!g.isBuffer($))throw new TypeError("Arguments must be Buffers");if(q===$)return 0;for(var X=q.length,de=$.length,pe=0,xe=Math.min(X,de);pe<xe;++pe)if(q[pe]!==$[pe]){X=q[pe],de=$[pe];break}return X<de?-1:de<X?1:0},g.isEncoding=function(q){switch(String(q).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(q,$){if(!y(q))throw new TypeError('"list" argument must be an Array of Buffers');if(q.length===0)return g.alloc(0);var X;if($===void 0)for($=0,X=0;X<q.length;++X)$+=q[X].length;var de=g.allocUnsafe($),pe=0;for(X=0;X<q.length;++X){var xe=q[X];if(!g.isBuffer(xe))throw new TypeError('"list" argument must be an Array of Buffers');xe.copy(de,pe),pe+=xe.length}return de};function s(oe,q){if(g.isBuffer(oe))return oe.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(oe)||oe instanceof ArrayBuffer))return oe.byteLength;typeof oe!="string"&&(oe=""+oe);var $=oe.length;if($===0)return 0;for(var X=!1;;)switch(q){case"ascii":case"latin1":case"binary":return $;case"utf8":case"utf-8":case void 0:return ue(oe).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $*2;case"hex":return $>>>1;case"base64":return ne(oe).length;default:if(X)return ue(oe).length;q=(""+q).toLowerCase(),X=!0}}g.byteLength=s;function l(oe,q,$){var X=!1;if((q===void 0||q<0)&&(q=0),q>this.length)return"";if(($===void 0||$>this.length)&&($=this.length),$<=0)return"";if($>>>=0,q>>>=0,$<=q)return"";for(oe||(oe="utf8");;)switch(oe){case"hex":return B(this,q,$);case"utf8":case"utf-8":return P(this,q,$);case"ascii":return K(this,q,$);case"latin1":case"binary":return O(this,q,$);case"base64":return F(this,q,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,q,$);default:if(X)throw new TypeError("Unknown encoding: "+oe);oe=(oe+"").toLowerCase(),X=!0}}g.prototype._isBuffer=!0;function E(oe,q,$){var X=oe[q];oe[q]=oe[$],oe[$]=X}g.prototype.swap16=function(){var q=this.length;if(q%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var $=0;$<q;$+=2)E(this,$,$+1);return this},g.prototype.swap32=function(){var q=this.length;if(q%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var $=0;$<q;$+=4)E(this,$,$+3),E(this,$+1,$+2);return this},g.prototype.swap64=function(){var q=this.length;if(q%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var $=0;$<q;$+=8)E(this,$,$+7),E(this,$+1,$+6),E(this,$+2,$+5),E(this,$+3,$+4);return this},g.prototype.toString=function(){var q=this.length|0;return q===0?"":arguments.length===0?P(this,0,q):l.apply(this,arguments)},g.prototype.equals=function(q){if(!g.isBuffer(q))throw new TypeError("Argument must be a Buffer");return this===q?!0:g.compare(this,q)===0},g.prototype.inspect=function(){var q="",$=I.INSPECT_MAX_BYTES;return this.length>0&&(q=this.toString("hex",0,$).match(/.{2}/g).join(" "),this.length>$&&(q+=" ... ")),"<Buffer "+q+">"},g.prototype.compare=function(q,$,X,de,pe){if(!g.isBuffer(q))throw new TypeError("Argument must be a Buffer");if($===void 0&&($=0),X===void 0&&(X=q?q.length:0),de===void 0&&(de=0),pe===void 0&&(pe=this.length),$<0||X>q.length||de<0||pe>this.length)throw new RangeError("out of range index");if(de>=pe&&$>=X)return 0;if(de>=pe)return-1;if($>=X)return 1;if($>>>=0,X>>>=0,de>>>=0,pe>>>=0,this===q)return 0;for(var xe=pe-de,Ke=X-$,qe=Math.min(xe,Ke),tt=this.slice(de,pe),et=q.slice($,X),it=0;it<qe;++it)if(tt[it]!==et[it]){xe=tt[it],Ke=et[it];break}return xe<Ke?-1:Ke<xe?1:0};function b(oe,q,$,X,de){if(oe.length===0)return-1;if(typeof $=="string"?(X=$,$=0):$>2147483647?$=2147483647:$<-2147483648&&($=-2147483648),$=+$,isNaN($)&&($=de?0:oe.length-1),$<0&&($=oe.length+$),$>=oe.length){if(de)return-1;$=oe.length-1}else if($<0)if(de)$=0;else return-1;if(typeof q=="string"&&(q=g.from(q,X)),g.isBuffer(q))return q.length===0?-1:p(oe,q,$,X,de);if(typeof q=="number")return q=q&255,g.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?de?Uint8Array.prototype.indexOf.call(oe,q,$):Uint8Array.prototype.lastIndexOf.call(oe,q,$):p(oe,[q],$,X,de);throw new TypeError("val must be string, number or Buffer")}function p(oe,q,$,X,de){var pe=1,xe=oe.length,Ke=q.length;if(X!==void 0&&(X=String(X).toLowerCase(),X==="ucs2"||X==="ucs-2"||X==="utf16le"||X==="utf-16le")){if(oe.length<2||q.length<2)return-1;pe=2,xe/=2,Ke/=2,$/=2}function qe(je,De){return pe===1?je[De]:je.readUInt16BE(De*pe)}var tt;if(de){var et=-1;for(tt=$;tt<xe;tt++)if(qe(oe,tt)===qe(q,et===-1?0:tt-et)){if(et===-1&&(et=tt),tt-et+1===Ke)return et*pe}else et!==-1&&(tt-=tt-et),et=-1}else for($+Ke>xe&&($=xe-Ke),tt=$;tt>=0;tt--){for(var it=!0,at=0;at<Ke;at++)if(qe(oe,tt+at)!==qe(q,at)){it=!1;break}if(it)return tt}return-1}g.prototype.includes=function(q,$,X){return this.indexOf(q,$,X)!==-1},g.prototype.indexOf=function(q,$,X){return b(this,q,$,X,!0)},g.prototype.lastIndexOf=function(q,$,X){return b(this,q,$,X,!1)};function L(oe,q,$,X){$=Number($)||0;var de=oe.length-$;X?(X=Number(X),X>de&&(X=de)):X=de;var pe=q.length;if(pe%2!==0)throw new TypeError("Invalid hex string");X>pe/2&&(X=pe/2);for(var xe=0;xe<X;++xe){var Ke=parseInt(q.substr(xe*2,2),16);if(isNaN(Ke))return xe;oe[$+xe]=Ke}return xe}function R(oe,q,$,X){return ce(ue(q,oe.length-$),oe,$,X)}function v(oe,q,$,X){return ce(ie(q),oe,$,X)}function x(oe,q,$,X){return v(oe,q,$,X)}function w(oe,q,$,X){return ce(ne(q),oe,$,X)}function T(oe,q,$,X){return ce(Ce(q,oe.length-$),oe,$,X)}g.prototype.write=function(q,$,X,de){if($===void 0)de="utf8",X=this.length,$=0;else if(X===void 0&&typeof $=="string")de=$,X=this.length,$=0;else if(isFinite($))$=$|0,isFinite(X)?(X=X|0,de===void 0&&(de="utf8")):(de=X,X=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var pe=this.length-$;if((X===void 0||X>pe)&&(X=pe),q.length>0&&(X<0||$<0)||$>this.length)throw new RangeError("Attempt to write outside buffer bounds");de||(de="utf8");for(var xe=!1;;)switch(de){case"hex":return L(this,q,$,X);case"utf8":case"utf-8":return R(this,q,$,X);case"ascii":return v(this,q,$,X);case"latin1":case"binary":return x(this,q,$,X);case"base64":return w(this,q,$,X);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,q,$,X);default:if(xe)throw new TypeError("Unknown encoding: "+de);de=(""+de).toLowerCase(),xe=!0}},g.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function F(oe,q,$){return q===0&&$===oe.length?S.fromByteArray(oe):S.fromByteArray(oe.slice(q,$))}function P(oe,q,$){$=Math.min(oe.length,$);for(var X=[],de=q;de<$;){var pe=oe[de],xe=null,Ke=pe>239?4:pe>223?3:pe>191?2:1;if(de+Ke<=$){var qe,tt,et,it;switch(Ke){case 1:pe<128&&(xe=pe);break;case 2:qe=oe[de+1],(qe&192)===128&&(it=(pe&31)<<6|qe&63,it>127&&(xe=it));break;case 3:qe=oe[de+1],tt=oe[de+2],(qe&192)===128&&(tt&192)===128&&(it=(pe&15)<<12|(qe&63)<<6|tt&63,it>2047&&(it<55296||it>57343)&&(xe=it));break;case 4:qe=oe[de+1],tt=oe[de+2],et=oe[de+3],(qe&192)===128&&(tt&192)===128&&(et&192)===128&&(it=(pe&15)<<18|(qe&63)<<12|(tt&63)<<6|et&63,it>65535&&it<1114112&&(xe=it))}}xe===null?(xe=65533,Ke=1):xe>65535&&(xe-=65536,X.push(xe>>>10&1023|55296),xe=56320|xe&1023),X.push(xe),de+=Ke}return z(X)}var A=4096;function z(oe){var q=oe.length;if(q<=A)return String.fromCharCode.apply(String,oe);for(var $="",X=0;X<q;)$+=String.fromCharCode.apply(String,oe.slice(X,X+=A));return $}function K(oe,q,$){var X="";$=Math.min(oe.length,$);for(var de=q;de<$;++de)X+=String.fromCharCode(oe[de]&127);return X}function O(oe,q,$){var X="";$=Math.min(oe.length,$);for(var de=q;de<$;++de)X+=String.fromCharCode(oe[de]);return X}function B(oe,q,$){var X=oe.length;(!q||q<0)&&(q=0),(!$||$<0||$>X)&&($=X);for(var de="",pe=q;pe<$;++pe)de+=fe(oe[pe]);return de}function U(oe,q,$){for(var X=oe.slice(q,$),de="",pe=0;pe<X.length;pe+=2)de+=String.fromCharCode(X[pe]+X[pe+1]*256);return de}g.prototype.slice=function(q,$){var X=this.length;q=~~q,$=$===void 0?X:~~$,q<0?(q+=X,q<0&&(q=0)):q>X&&(q=X),$<0?($+=X,$<0&&($=0)):$>X&&($=X),$<q&&($=q);var de;if(g.TYPED_ARRAY_SUPPORT)de=this.subarray(q,$),de.__proto__=g.prototype;else{var pe=$-q;de=new g(pe,void 0);for(var xe=0;xe<pe;++xe)de[xe]=this[xe+q]}return de};function D(oe,q,$){if(oe%1!==0||oe<0)throw new RangeError("offset is not uint");if(oe+q>$)throw new RangeError("Trying to access beyond buffer length")}g.prototype.readUIntLE=function(q,$,X){q=q|0,$=$|0,X||D(q,$,this.length);for(var de=this[q],pe=1,xe=0;++xe<$&&(pe*=256);)de+=this[q+xe]*pe;return de},g.prototype.readUIntBE=function(q,$,X){q=q|0,$=$|0,X||D(q,$,this.length);for(var de=this[q+--$],pe=1;$>0&&(pe*=256);)de+=this[q+--$]*pe;return de},g.prototype.readUInt8=function(q,$){return $||D(q,1,this.length),this[q]},g.prototype.readUInt16LE=function(q,$){return $||D(q,2,this.length),this[q]|this[q+1]<<8},g.prototype.readUInt16BE=function(q,$){return $||D(q,2,this.length),this[q]<<8|this[q+1]},g.prototype.readUInt32LE=function(q,$){return $||D(q,4,this.length),(this[q]|this[q+1]<<8|this[q+2]<<16)+this[q+3]*16777216},g.prototype.readUInt32BE=function(q,$){return $||D(q,4,this.length),this[q]*16777216+(this[q+1]<<16|this[q+2]<<8|this[q+3])},g.prototype.readIntLE=function(q,$,X){q=q|0,$=$|0,X||D(q,$,this.length);for(var de=this[q],pe=1,xe=0;++xe<$&&(pe*=256);)de+=this[q+xe]*pe;return pe*=128,de>=pe&&(de-=Math.pow(2,8*$)),de},g.prototype.readIntBE=function(q,$,X){q=q|0,$=$|0,X||D(q,$,this.length);for(var de=$,pe=1,xe=this[q+--de];de>0&&(pe*=256);)xe+=this[q+--de]*pe;return pe*=128,xe>=pe&&(xe-=Math.pow(2,8*$)),xe},g.prototype.readInt8=function(q,$){return $||D(q,1,this.length),this[q]&128?(255-this[q]+1)*-1:this[q]},g.prototype.readInt16LE=function(q,$){$||D(q,2,this.length);var X=this[q]|this[q+1]<<8;return X&32768?X|4294901760:X},g.prototype.readInt16BE=function(q,$){$||D(q,2,this.length);var X=this[q+1]|this[q]<<8;return X&32768?X|4294901760:X},g.prototype.readInt32LE=function(q,$){return $||D(q,4,this.length),this[q]|this[q+1]<<8|this[q+2]<<16|this[q+3]<<24},g.prototype.readInt32BE=function(q,$){return $||D(q,4,this.length),this[q]<<24|this[q+1]<<16|this[q+2]<<8|this[q+3]},g.prototype.readFloatLE=function(q,$){return $||D(q,4,this.length),k.read(this,q,!0,23,4)},g.prototype.readFloatBE=function(q,$){return $||D(q,4,this.length),k.read(this,q,!1,23,4)},g.prototype.readDoubleLE=function(q,$){return $||D(q,8,this.length),k.read(this,q,!0,52,8)},g.prototype.readDoubleBE=function(q,$){return $||D(q,8,this.length),k.read(this,q,!1,52,8)};function W(oe,q,$,X,de,pe){if(!g.isBuffer(oe))throw new TypeError('"buffer" argument must be a Buffer instance');if(q>de||q<pe)throw new RangeError('"value" argument is out of bounds');if($+X>oe.length)throw new RangeError("Index out of range")}g.prototype.writeUIntLE=function(q,$,X,de){if(q=+q,$=$|0,X=X|0,!de){var pe=Math.pow(2,8*X)-1;W(this,q,$,X,pe,0)}var xe=1,Ke=0;for(this[$]=q&255;++Ke<X&&(xe*=256);)this[$+Ke]=q/xe&255;return $+X},g.prototype.writeUIntBE=function(q,$,X,de){if(q=+q,$=$|0,X=X|0,!de){var pe=Math.pow(2,8*X)-1;W(this,q,$,X,pe,0)}var xe=X-1,Ke=1;for(this[$+xe]=q&255;--xe>=0&&(Ke*=256);)this[$+xe]=q/Ke&255;return $+X},g.prototype.writeUInt8=function(q,$,X){return q=+q,$=$|0,X||W(this,q,$,1,255,0),g.TYPED_ARRAY_SUPPORT||(q=Math.floor(q)),this[$]=q&255,$+1};function Q(oe,q,$,X){q<0&&(q=65535+q+1);for(var de=0,pe=Math.min(oe.length-$,2);de<pe;++de)oe[$+de]=(q&255<<8*(X?de:1-de))>>>(X?de:1-de)*8}g.prototype.writeUInt16LE=function(q,$,X){return q=+q,$=$|0,X||W(this,q,$,2,65535,0),g.TYPED_ARRAY_SUPPORT?(this[$]=q&255,this[$+1]=q>>>8):Q(this,q,$,!0),$+2},g.prototype.writeUInt16BE=function(q,$,X){return q=+q,$=$|0,X||W(this,q,$,2,65535,0),g.TYPED_ARRAY_SUPPORT?(this[$]=q>>>8,this[$+1]=q&255):Q(this,q,$,!1),$+2};function re(oe,q,$,X){q<0&&(q=4294967295+q+1);for(var de=0,pe=Math.min(oe.length-$,4);de<pe;++de)oe[$+de]=q>>>(X?de:3-de)*8&255}g.prototype.writeUInt32LE=function(q,$,X){return q=+q,$=$|0,X||W(this,q,$,4,4294967295,0),g.TYPED_ARRAY_SUPPORT?(this[$+3]=q>>>24,this[$+2]=q>>>16,this[$+1]=q>>>8,this[$]=q&255):re(this,q,$,!0),$+4},g.prototype.writeUInt32BE=function(q,$,X){return q=+q,$=$|0,X||W(this,q,$,4,4294967295,0),g.TYPED_ARRAY_SUPPORT?(this[$]=q>>>24,this[$+1]=q>>>16,this[$+2]=q>>>8,this[$+3]=q&255):re(this,q,$,!1),$+4},g.prototype.writeIntLE=function(q,$,X,de){if(q=+q,$=$|0,!de){var pe=Math.pow(2,8*X-1);W(this,q,$,X,pe-1,-pe)}var xe=0,Ke=1,qe=0;for(this[$]=q&255;++xe<X&&(Ke*=256);)q<0&&qe===0&&this[$+xe-1]!==0&&(qe=1),this[$+xe]=(q/Ke>>0)-qe&255;return $+X},g.prototype.writeIntBE=function(q,$,X,de){if(q=+q,$=$|0,!de){var pe=Math.pow(2,8*X-1);W(this,q,$,X,pe-1,-pe)}var xe=X-1,Ke=1,qe=0;for(this[$+xe]=q&255;--xe>=0&&(Ke*=256);)q<0&&qe===0&&this[$+xe+1]!==0&&(qe=1),this[$+xe]=(q/Ke>>0)-qe&255;return $+X},g.prototype.writeInt8=function(q,$,X){return q=+q,$=$|0,X||W(this,q,$,1,127,-128),g.TYPED_ARRAY_SUPPORT||(q=Math.floor(q)),q<0&&(q=255+q+1),this[$]=q&255,$+1},g.prototype.writeInt16LE=function(q,$,X){return q=+q,$=$|0,X||W(this,q,$,2,32767,-32768),g.TYPED_ARRAY_SUPPORT?(this[$]=q&255,this[$+1]=q>>>8):Q(this,q,$,!0),$+2},g.prototype.writeInt16BE=function(q,$,X){return q=+q,$=$|0,X||W(this,q,$,2,32767,-32768),g.TYPED_ARRAY_SUPPORT?(this[$]=q>>>8,this[$+1]=q&255):Q(this,q,$,!1),$+2},g.prototype.writeInt32LE=function(q,$,X){return q=+q,$=$|0,X||W(this,q,$,4,2147483647,-2147483648),g.TYPED_ARRAY_SUPPORT?(this[$]=q&255,this[$+1]=q>>>8,this[$+2]=q>>>16,this[$+3]=q>>>24):re(this,q,$,!0),$+4},g.prototype.writeInt32BE=function(q,$,X){return q=+q,$=$|0,X||W(this,q,$,4,2147483647,-2147483648),q<0&&(q=4294967295+q+1),g.TYPED_ARRAY_SUPPORT?(this[$]=q>>>24,this[$+1]=q>>>16,this[$+2]=q>>>8,this[$+3]=q&255):re(this,q,$,!1),$+4};function ee(oe,q,$,X,de,pe){if($+X>oe.length)throw new RangeError("Index out of range");if($<0)throw new RangeError("Index out of range")}function ye(oe,q,$,X,de){return de||ee(oe,q,$,4,34028234663852886e22,-34028234663852886e22),k.write(oe,q,$,X,23,4),$+4}g.prototype.writeFloatLE=function(q,$,X){return ye(this,q,$,!0,X)},g.prototype.writeFloatBE=function(q,$,X){return ye(this,q,$,!1,X)};function be(oe,q,$,X,de){return de||ee(oe,q,$,8,17976931348623157e292,-17976931348623157e292),k.write(oe,q,$,X,52,8),$+8}g.prototype.writeDoubleLE=function(q,$,X){return be(this,q,$,!0,X)},g.prototype.writeDoubleBE=function(q,$,X){return be(this,q,$,!1,X)},g.prototype.copy=function(q,$,X,de){if(X||(X=0),!de&&de!==0&&(de=this.length),$>=q.length&&($=q.length),$||($=0),de>0&&de<X&&(de=X),de===X)return 0;if(q.length===0||this.length===0)return 0;if($<0)throw new RangeError("targetStart out of bounds");if(X<0||X>=this.length)throw new RangeError("sourceStart out of bounds");if(de<0)throw new RangeError("sourceEnd out of bounds");de>this.length&&(de=this.length),q.length-$<de-X&&(de=q.length-$+X);var pe=de-X,xe;if(this===q&&X<$&&$<de)for(xe=pe-1;xe>=0;--xe)q[xe+$]=this[xe+X];else if(pe<1e3||!g.TYPED_ARRAY_SUPPORT)for(xe=0;xe<pe;++xe)q[xe+$]=this[xe+X];else Uint8Array.prototype.set.call(q,this.subarray(X,X+pe),$);return pe},g.prototype.fill=function(q,$,X,de){if(typeof q=="string"){if(typeof $=="string"?(de=$,$=0,X=this.length):typeof X=="string"&&(de=X,X=this.length),q.length===1){var pe=q.charCodeAt(0);pe<256&&(q=pe)}if(de!==void 0&&typeof de!="string")throw new TypeError("encoding must be a string");if(typeof de=="string"&&!g.isEncoding(de))throw new TypeError("Unknown encoding: "+de)}else typeof q=="number"&&(q=q&255);if($<0||this.length<$||this.length<X)throw new RangeError("Out of range index");if(X<=$)return this;$=$>>>0,X=X===void 0?this.length:X>>>0,q||(q=0);var xe;if(typeof q=="number")for(xe=$;xe<X;++xe)this[xe]=q;else{var Ke=g.isBuffer(q)?q:ue(new g(q,de).toString()),qe=Ke.length;for(xe=0;xe<X-$;++xe)this[xe+$]=Ke[xe%qe]}return this};var he=/[^+\/0-9A-Za-z-_]/g;function Ie(oe){if(oe=Se(oe).replace(he,""),oe.length<2)return"";for(;oe.length%4!==0;)oe=oe+"=";return oe}function Se(oe){return oe.trim?oe.trim():oe.replace(/^\s+|\s+$/g,"")}function fe(oe){return oe<16?"0"+oe.toString(16):oe.toString(16)}function ue(oe,q){q=q||Infinity;for(var $,X=oe.length,de=null,pe=[],xe=0;xe<X;++xe){if($=oe.charCodeAt(xe),$>55295&&$<57344){if(!de){if($>56319){(q-=3)>-1&&pe.push(239,191,189);continue}else if(xe+1===X){(q-=3)>-1&&pe.push(239,191,189);continue}de=$;continue}if($<56320){(q-=3)>-1&&pe.push(239,191,189),de=$;continue}$=(de-55296<<10|$-56320)+65536}else de&&((q-=3)>-1&&pe.push(239,191,189));if(de=null,$<128){if((q-=1)<0)break;pe.push($)}else if($<2048){if((q-=2)<0)break;pe.push($>>6|192,$&63|128)}else if($<65536){if((q-=3)<0)break;pe.push($>>12|224,$>>6&63|128,$&63|128)}else if($<1114112){if((q-=4)<0)break;pe.push($>>18|240,$>>12&63|128,$>>6&63|128,$&63|128)}else throw new Error("Invalid code point")}return pe}function ie(oe){for(var q=[],$=0;$<oe.length;++$)q.push(oe.charCodeAt($)&255);return q}function Ce(oe,q){for(var $,X,de,pe=[],xe=0;xe<oe.length&&!((q-=2)<0);++xe)$=oe.charCodeAt(xe),X=$>>8,de=$%256,pe.push(de),pe.push(X);return pe}function ne(oe){return S.toByteArray(Ie(oe))}function ce(oe,q,$,X){for(var de=0;de<X&&!(de+$>=q.length||de>=oe.length);++de)q[de+$]=oe[de];return de}function Ae(oe){return oe!==oe}}).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,J,I){J.exports={"100":"Continue","101":"Switching Protocols","102":"Processing","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I'm a teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Unordered Collection","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}},{}],75:[function(H,J,I){J.exports={O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,O_NOCTTY:131072,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:1048576,O_NOFOLLOW:256,O_SYNC:128,O_SYMLINK:2097152,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,SIGHUP:1,SIGINT:2,SIGQUIT:3,SIGILL:4,SIGTRAP:5,SIGABRT:6,SIGIOT:6,SIGBUS:10,SIGFPE:8,SIGKILL:9,SIGUSR1:30,SIGSEGV:11,SIGUSR2:31,SIGPIPE:13,SIGALRM:14,SIGTERM:15,SIGCHLD:20,SIGCONT:19,SIGSTOP:17,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGXCPU:24,SIGXFSZ:25,SIGVTALRM:26,SIGPROF:27,SIGWINCH:28,SIGIO:23,SIGSYS:12,SSL_OP_ALL:2147486719,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:262144,SSL_OP_CIPHER_SERVER_PREFERENCE:4194304,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:2147483648,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:32,SSL_OP_MICROSOFT_SESS_ID_BUG:1,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:536870912,SSL_OP_NETSCAPE_CHALLENGE_BUG:2,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:1073741824,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:8,SSL_OP_NO_COMPRESSION:131072,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:16777216,SSL_OP_NO_SSLv3:33554432,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:67108864,SSL_OP_NO_TLSv1_1:268435456,SSL_OP_NO_TLSv1_2:134217728,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:1048576,SSL_OP_SINGLE_ECDH_USE:524288,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:128,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:512,SSL_OP_TLS_D5_BUG:256,SSL_OP_TLS_ROLLBACK_BUG:8388608,ENGINE_METHOD_DSA:2,ENGINE_METHOD_DH:4,ENGINE_METHOD_RAND:8,ENGINE_METHOD_ECDH:16,ENGINE_METHOD_ECDSA:32,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_STORE:256,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_NONE:0,DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_UDP_REUSEADDR:4}},{}],76:[function(H,J,I){/*!
* copy-to - index.js
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
* MIT Licensed
*/"use strict";var N=Array.prototype.slice;J.exports=g;function g(k,y){if(!(this instanceof g))return new g(k,y);this.src=k,this._withAccess=y}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 y=this.keys||Object.keys(this.src);if(!this._withAccess){for(var m=0;m<y.length;m++){if(C=y[m],k[C]!==void 0)continue;k[C]=this.src[C]}return k}for(var m=0;m<y.length;m++){var C=y[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 y=this.keys||Object.keys(this.src),m=0;m<y.length;m++){var C=y[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 y={};return this.to(y),this.src=k,this.to(y),this.src=y,this};function S(k,y){return k[y]===void 0&&k.__lookupGetter__(y)===void 0&&k.__lookupSetter__(y)===void 0}},{}],77:[function(H,J,I){H("../../modules/es6.string.iterator"),H("../../modules/es6.array.from"),J.exports=H("../../modules/_core").Array.from},{"../../modules/_core":99,"../../modules/es6.array.from":168,"../../modules/es6.string.iterator":180}],78:[function(H,J,I){var N=H("../../modules/_core"),g=N.JSON||(N.JSON={stringify:JSON.stringify});J.exports=function(k){return g.stringify.apply(g,arguments)}},{"../../modules/_core":99}],79:[function(H,J,I){H("../../modules/es6.object.assign"),J.exports=H("../../modules/_core").Object.assign},{"../../modules/_core":99,"../../modules/es6.object.assign":171}],80:[function(H,J,I){H("../../modules/es6.object.create");var N=H("../../modules/_core").Object;J.exports=function(S,k){return N.create(S,k)}},{"../../modules/_core":99,"../../modules/es6.object.create":172}],81:[function(H,J,I){H("../../modules/es6.object.define-property");var N=H("../../modules/_core").Object;J.exports=function(S,k,y){return N.defineProperty(S,k,y)}},{"../../modules/_core":99,"../../modules/es6.object.define-property":173}],82:[function(H,J,I){H("../../modules/es7.object.entries"),J.exports=H("../../modules/_core").Object.entries},{"../../modules/_core":99,"../../modules/es7.object.entries":182}],83:[function(H,J,I){H("../../modules/es6.object.get-own-property-names");var N=H("../../modules/_core").Object;J.exports=function(S){return N.getOwnPropertyNames(S)}},{"../../modules/_core":99,"../../modules/es6.object.get-own-property-names":174}],84:[function(H,J,I){H("../../modules/es6.object.get-prototype-of"),J.exports=H("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":99,"../../modules/es6.object.get-prototype-of":175}],85:[function(H,J,I){H("../../modules/es6.object.keys"),J.exports=H("../../modules/_core").Object.keys},{"../../modules/_core":99,"../../modules/es6.object.keys":176}],86:[function(H,J,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"),J.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,J,I){H("../modules/web.immediate"),J.exports=H("../modules/_core").setImmediate},{"../modules/_core":99,"../modules/web.immediate":188}],88:[function(H,J,I){H("../../modules/es6.string.from-code-point"),J.exports=H("../../modules/_core").String.fromCodePoint},{"../../modules/_core":99,"../../modules/es6.string.from-code-point":179}],89:[function(H,J,I){H("../../modules/es6.function.has-instance"),J.exports=H("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":165,"../../modules/es6.function.has-instance":170}],90:[function(H,J,I){H("../../modules/es6.symbol"),H("../../modules/es6.object.to-string"),H("../../modules/es7.symbol.async-iterator"),H("../../modules/es7.symbol.observable"),J.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,J,I){H("../../modules/es6.string.iterator"),H("../../modules/web.dom.iterable"),J.exports=H("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":165,"../../modules/es6.string.iterator":180,"../../modules/web.dom.iterable":187}],92:[function(H,J,I){J.exports=function(N){if(typeof N!="function")throw TypeError(N+" is not a function!");return N}},{}],93:[function(H,J,I){J.exports=function(){}},{}],94:[function(H,J,I){J.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,J,I){var N=H("./_is-object");J.exports=function(g){if(!N(g))throw TypeError(g+" is not an object!");return g}},{"./_is-object":119}],96:[function(H,J,I){var N=H("./_to-iobject"),g=H("./_to-length"),S=H("./_to-absolute-index");J.exports=function(k){return function(y,m,C){var _=N(y),e=g(_.length),f=S(C,e),r;if(k&&m!=m){for(;e>f;)if(r=_[f++],r!=r)return!0}else for(;e>f;f++)if((k||f in _)&&_[f]===m)return k||f||0;return!k&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(H,J,I){var N=H("./_cof"),g=H("./_wks")("toStringTag"),S=N(function(){return arguments}())=="Arguments",k=function(y,m){try{return y[m]}catch(C){}};J.exports=function(y){var m,C,_;return y===void 0?"Undefined":y===null?"Null":typeof(C=k(m=Object(y),g))=="string"?C:S?N(m):(_=N(m))=="Object"&&typeof m.callee=="function"?"Arguments":_}},{"./_cof":98,"./_wks":166}],98:[function(H,J,I){var N={}.toString;J.exports=function(g){return N.call(g).slice(8,-1)}},{}],99:[function(H,J,I){var N=J.exports={version:"2.6.11"};typeof __e=="number"&&(__e=N)},{}],100:[function(H,J,I){"use strict";var N=H("./_object-dp"),g=H("./_property-desc");J.exports=function(S,k,y){k in S?N.f(S,k,g(0,y)):S[k]=y}},{"./_object-dp":132,"./_property-desc":146}],101:[function(H,J,I){var N=H("./_a-function");J.exports=function(g,S,k){if(N(g),S===void 0)return g;switch(k){case 1:return function(y){return g.call(S,y)};case 2:return function(y,m){return g.call(S,y,m)};case 3:return function(y,m,C){return g.call(S,y,m,C)}}return function(){return g.apply(S,arguments)}}},{"./_a-function":92}],102:[function(H,J,I){J.exports=function(N){if(N==null)throw TypeError("Can't call method on "+N);return N}},{}],103:[function(H,J,I){J.exports=!H("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":108}],104:[function(H,J,I){var N=H("./_is-object"),g=H("./_global").document,S=N(g)&&N(g.createElement);J.exports=function(k){return S?g.createElement(k):{}}},{"./_global":110,"./_is-object":119}],105:[function(H,J,I){J.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(H,J,I){var N=H("./_object-keys"),g=H("./_object-gops"),S=H("./_object-pie");J.exports=function(k){var y=N(k),m=g.f;if(m)for(var C=m(k),_=S.f,e=0,f;C.length>e;)_.call(k,f=C[e++])&&y.push(f);return y}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(H,J,I){var N=H("./_global"),g=H("./_core"),S=H("./_ctx"),k=H("./_hide"),y=H("./_has"),m="prototype",C=function(_,e,f){var r=_&C.F,c=_&C.G,i=_&C.S,n=_&C.P,o=_&C.B,h=_&C.W,d=c?g:g[e]||(g[e]={}),u=d[m],s=c?N:i?N[e]:(N[e]||{})[m],l,E,b;c&&(f=e);for(l in f){if(E=!r&&s&&s[l]!==void 0,E&&y(d,l))continue;b=E?s[l]:f[l],d[l]=c&&typeof s[l]!="function"?f[l]:o&&E?S(b,N):h&&s[l]==b?function(p){var L=function(R,v,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,v)}return new p(R,v,x)}return p.apply(this,arguments)};return L[m]=p[m],L}(b):n&&typeof b=="function"?S(Function.call,b):b,n&&((d.virtual||(d.virtual={}))[l]=b,_&C.R&&u&&!u[l]&&k(u,l,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,J.exports=C},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(H,J,I){J.exports=function(N){try{return!!N()}catch(g){return!0}}},{}],109:[function(H,J,I){var N=H("./_ctx"),g=H("./_iter-call"),S=H("./_is-array-iter"),k=H("./_an-object"),y=H("./_to-length"),m=H("./core.get-iterator-method"),C={},_={},I=J.exports=function(e,f,r,c,i){var n=i?function(){return e}:m(e),o=N(r,c,f?2:1),h=0,d,u,s,l;if(typeof n!="function")throw TypeError(e+" is not iterable!");if(S(n)){for(d=y(e.length);d>h;h++)if(l=f?o(k(u=e[h])[0],u[1]):o(e[h]),l===C||l===_)return l}else for(s=n.call(e);!(u=s.next()).done;)if(l=g(s,o,u.value,f),l===C||l===_)return l};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,J,I){var N=J.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,J,I){var N={}.hasOwnProperty;J.exports=function(g,S){return N.call(g,S)}},{}],112:[function(H,J,I){var N=H("./_object-dp"),g=H("./_property-desc");J.exports=H("./_descriptors")?function(S,k,y){return N.f(S,k,g(1,y))}:function(S,k,y){return S[k]=y,S}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(H,J,I){var N=H("./_global").document;J.exports=N&&N.documentElement},{"./_global":110}],114:[function(H,J,I){J.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,J,I){J.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,J,I){var N=H("./_cof");J.exports=Object("z").propertyIsEnumerable(0)?Object:function(g){return N(g)=="String"?g.split(""):Object(g)}},{"./_cof":98}],117:[function(H,J,I){var N=H("./_iterators"),g=H("./_wks")("iterator"),S=Array.prototype;J.exports=function(k){return k!==void 0&&(N.Array===k||S[g]===k)}},{"./_iterators":125,"./_wks":166}],118:[function(H,J,I){var N=H("./_cof");J.exports=Array.isArray||function(S){return N(S)=="Array"}},{"./_cof":98}],119:[function(H,J,I){J.exports=function(N){return typeof N=="object"?N!==null:typeof N=="function"}},{}],120:[function(H,J,I){var N=H("./_an-object");J.exports=function(g,S,k,y){try{return y?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,J,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}),J.exports=function(y,m,C){y.prototype=N(k,{next:g(1,C)}),S(y,m+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(H,J,I){"use strict";var N=H("./_library"),g=H("./_export"),S=H("./_redefine"),k=H("./_hide"),y=H("./_iterators"),m=H("./_iter-create"),C=H("./_set-to-string-tag"),_=H("./_object-gpo"),e=H("./_wks")("iterator"),f=!([].keys&&"next"in[].keys()),r="@@iterator",c="keys",i="values",n=function(){return this};J.exports=function(o,h,d,u,s,l,E){m(d,h,u);var b=function(K){if(!f&&K in v)return v[K];switch(K){case c:return function(){return new d(this,K)};case i:return function(){return new d(this,K)}}return function(){return new d(this,K)}},p=h+" Iterator",L=s==i,R=!1,v=o.prototype,x=v[e]||v[r]||s&&v[s],w=x||b(s),T=s?L?b("entries"):w:void 0,F=h=="Array"&&v.entries||x,P,A,z;if(F&&(z=_(F.call(new o)),z!==Object.prototype&&z.next&&(C(z,p,!0),!N&&typeof z[e]!="function"&&k(z,e,n))),L&&x&&x.name!==i&&(R=!0,w=function(){return x.call(this)}),(!N||E)&&(f||R||!v[e])&&k(v,e,w),y[h]=w,y[p]=n,s)if(P={values:L?w:b(i),keys:l?w:b(c),entries:T},E)for(A in P)A in v||S(v,A,P[A]);else g(g.P+g.F*(f||R),h,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,J,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){}J.exports=function(k,y){if(!y&&!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,J,I){J.exports=function(N,g){return{value:g,done:!!N}}},{}],125:[function(H,J,I){J.exports={}},{}],126:[function(H,J,I){J.exports=!0},{}],127:[function(H,J,I){var N=H("./_uid")("meta"),g=H("./_is-object"),S=H("./_has"),k=H("./_object-dp").f,y=0,m=Object.isExtensible||function(){return!0},C=!H("./_fails")(function(){return m(Object.preventExtensions({}))}),_=function(i){k(i,N,{value:{i:"O"+ ++y,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},f=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=J.exports={KEY:N,NEED:!1,fastKey:e,getWeak:f,onFreeze:r}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(H,J,I){var N=H("./_global"),g=H("./_task").set,S=N.MutationObserver||N.WebKitMutationObserver,k=N.process,y=N.Promise,m=H("./_cof")(k)=="process";J.exports=function(){var C,_,e,f=function(){var n,o;for(m&&(n=k.domain)&&n.exit();C;){o=C.fn,C=C.next;try{o()}catch(h){throw C?e():_=void 0,h}}_=void 0,n&&n.enter()};if(m)e=function(){k.nextTick(f)};else if(S&&!(N.navigator&&N.navigator.standalone)){var r=!0,c=document.createTextNode("");new S(f).observe(c,{characterData:!0}),e=function(){c.data=r=!r}}else if(y&&y.resolve){var i=y.resolve(void 0);e=function(){i.then(f)}}else e=function(){g.call(N,f)};return function(n){var o={fn:n,next:void 0};_&&(_.next=o),C||(C=o,e()),_=o}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(H,J,I){"use strict";var N=H("./_a-function");function g(S){var k,y;this.promise=new S(function(m,C){if(k!==void 0||y!==void 0)throw TypeError("Bad Promise constructor");k=m,y=C}),this.resolve=N(k),this.reject=N(y)}J.exports.f=function(S){return new g(S)}},{"./_a-function":92}],130:[function(H,J,I){"use strict";var N=H("./_descriptors"),g=H("./_object-keys"),S=H("./_object-gops"),k=H("./_object-pie"),y=H("./_to-object"),m=H("./_iobject"),C=Object.assign;J.exports=!C||H("./_fails")(function(){var _={},e={},f=Symbol(),r="abcdefghijklmnopqrst";return _[f]=7,r.split("").forEach(function(c){e[c]=c}),C({},_)[f]!=7||Object.keys(C({},e)).join("")!=r})?function(e,f){for(var r=y(e),c=arguments.length,i=1,n=S.f,o=k.f;c>i;)for(var h=m(arguments[i++]),d=n?g(h).concat(n(h)):g(h),u=d.length,s=0,l;u>s;)l=d[s++],(!N||o.call(h,l))&&(r[l]=h[l]);return r}:C},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(H,J,I){var N=H("./_an-object"),g=H("./_object-dps"),S=H("./_enum-bug-keys"),k=H("./_shared-key")("IE_PROTO"),y=function(){},m="prototype",C=function(){var _=H("./_dom-create")("iframe"),e=S.length,f="<",r=">",c;for(_.style.display="none",H("./_html").appendChild(_),_.src="javascript:",c=_.contentWindow.document,c.open(),c.write(f+"script"+r+"document.F=Object"+f+"/script"+r),c.close(),C=c.F;e--;)delete C[m][S[e]];return C()};J.exports=Object.create||function(e,f){var r;return e!==null?(y[m]=N(e),r=new y,y[m]=null,r[k]=e):r=C(),f===void 0?r:g(r,f)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(H,J,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,J,I){var N=H("./_object-dp"),g=H("./_an-object"),S=H("./_object-keys");J.exports=H("./_descriptors")?Object.defineProperties:function(y,m){g(y);for(var C=S(m),_=C.length,e=0,f;_>e;)N.f(y,f=C[e++],m[f]);return y}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(H,J,I){var N=H("./_object-pie"),g=H("./_property-desc"),S=H("./_to-iobject"),k=H("./_to-primitive"),y=H("./_has"),m=H("./_ie8-dom-define"),C=Object.getOwnPropertyDescriptor;I.f=H("./_descriptors")?C:function(e,f){if(e=S(e),f=k(f,!0),m)try{return C(e,f)}catch(r){}if(y(e,f))return g(!N.f.call(e,f),e[f])}},{"./_descriptors":103,"./_has":111,"./_ie8-dom-define":114,"./_object-pie":141,"./_property-desc":146,"./_to-iobject":158,"./_to-primitive":161}],135:[function(H,J,I){var N=H("./_to-iobject"),g=H("./_object-gopn").f,S={}.toString,k=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],y=function(m){try{return g(m)}catch(C){return k.slice()}};J.exports.f=function(C){return k&&S.call(C)=="[object Window]"?y(C):g(N(C))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(H,J,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,J,I){I.f=Object.getOwnPropertySymbols},{}],138:[function(H,J,I){var N=H("./_has"),g=H("./_to-object"),S=H("./_shared-key")("IE_PROTO"),k=Object.prototype;J.exports=Object.getPrototypeOf||function(y){return y=g(y),N(y,S)?y[S]:typeof y.constructor=="function"&&y instanceof y.constructor?y.constructor.prototype:y instanceof Object?k:null}},{"./_has":111,"./_shared-key":151,"./_to-object":160}],139:[function(H,J,I){var N=H("./_has"),g=H("./_to-iobject"),S=H("./_array-includes")(!1),k=H("./_shared-key")("IE_PROTO");J.exports=function(y,m){var C=g(y),_=0,e=[],f;for(f in C)f!=k&&(N(C,f)&&e.push(f));for(;m.length>_;)N(C,f=m[_++])&&(~S(e,f)||e.push(f));return e}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(H,J,I){var N=H("./_object-keys-internal"),g=H("./_enum-bug-keys");J.exports=Object.keys||function(k){return N(k,g)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(H,J,I){I.f={}.propertyIsEnumerable},{}],142:[function(H,J,I){var N=H("./_export"),g=H("./_core"),S=H("./_fails");J.exports=function(k,y){var m=(g.Object||{})[k]||Object[k],C={};C[k]=y(m),N(N.S+N.F*S(function(){m(1)}),"Object",C)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(H,J,I){var N=H("./_descriptors"),g=H("./_object-keys"),S=H("./_to-iobject"),k=H("./_object-pie").f;J.exports=function(y){return function(m){for(var C=S(m),_=g(C),e=_.length,f=0,r=[],c;e>f;)c=_[f++],(!N||k.call(C,c))&&r.push(y?[c,C[c]]:C[c]);return r}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(H,J,I){J.exports=function(N){try{return{e:!1,v:N()}}catch(g){return{e:!0,v:g}}}},{}],145:[function(H,J,I){var N=H("./_an-object"),g=H("./_is-object"),S=H("./_new-promise-capability");J.exports=function(k,y){if(N(k),g(y)&&y.constructor===k)return y;var m=S.f(k),C=m.resolve;return C(y),m.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(H,J,I){J.exports=function(N,g){return{enumerable:!(N&1),configurable:!(N&2),writable:!(N&4),value:g}}},{}],147:[function(H,J,I){var N=H("./_hide");J.exports=function(g,S,k){for(var y in S)k&&g[y]?g[y]=S[y]:N(g,y,S[y]);return g}},{"./_hide":112}],148:[function(H,J,I){J.exports=H("./_hide")},{"./_hide":112}],149:[function(H,J,I){"use strict";var N=H("./_global"),g=H("./_core"),S=H("./_object-dp"),k=H("./_descriptors"),y=H("./_wks")("species");J.exports=function(m){var C=typeof g[m]=="function"?g[m]:N[m];k&&C&&!C[y]&&S.f(C,y,{configurable:!0,get:function(){return this}})}},{"./_core":99,"./_descriptors":103,"./_global":110,"./_object-dp":132,"./_wks":166}],150:[function(H,J,I){var N=H("./_object-dp").f,g=H("./_has"),S=H("./_wks")("toStringTag");J.exports=function(k,y,m){k&&!g(k=m?k:k.prototype,S)&&N(k,S,{configurable:!0,value:y})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(H,J,I){var N=H("./_shared")("keys"),g=H("./_uid");J.exports=function(S){return N[S]||(N[S]=g(S))}},{"./_shared":152,"./_uid":162}],152:[function(H,J,I){var N=H("./_core"),g=H("./_global"),S="__core-js_shared__",k=g[S]||(g[S]={});(J.exports=function(y,m){return k[y]||(k[y]=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,J,I){var N=H("./_an-object"),g=H("./_a-function"),S=H("./_wks")("species");J.exports=function(k,y){var m=N(k).constructor,C;return m===void 0||(C=N(m)[S])==null?y:g(C)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(H,J,I){var N=H("./_to-integer"),g=H("./_defined");J.exports=function(S){return function(k,y){var m=String(g(k)),C=N(y),_=m.length,e,f;return C<0||C>=_?S?"":void 0:(e=m.charCodeAt(C),e<55296||e>56319||C+1===_||(f=m.charCodeAt(C+1))<56320||f>57343?S?m.charAt(C):e:S?m.slice(C,C+2):(e-55296<<10)+(f-56320)+65536)}}},{"./_defined":102,"./_to-integer":157}],155:[function(H,J,I){var N=H("./_ctx"),g=H("./_invoke"),S=H("./_html"),k=H("./_dom-create"),y=H("./_global"),m=y.process,C=y.setImmediate,_=y.clearImmediate,e=y.MessageChannel,f=y.Dispatch,r=0,c={},i="onreadystatechange",n,o,h,d=function(){var s=+this;if(c.hasOwnProperty(s)){var l=c[s];delete c[s],l()}},u=function(s){d.call(s.data)};(!C||!_)&&(C=function(l){for(var E=[],b=1;arguments.length>b;)E.push(arguments[b++]);return c[++r]=function(){g(typeof l=="function"?l:Function(l),E)},n(r),r},_=function(l){delete c[l]},H("./_cof")(m)=="process"?n=function(s){m.nextTick(N(d,s,1))}:f&&f.now?n=function(s){f.now(N(d,s,1))}:e?(o=new e,h=o.port2,o.port1.onmessage=u,n=N(h.postMessage,h,1)):y.addEventListener&&typeof postMessage=="function"&&!y.importScripts?(n=function(s){y.postMessage(s+"","*")},y.addEventListener("message",u,!1)):i in k("script")?n=function(s){S.appendChild(k("script"))[i]=function(){S.removeChild(this),d.call(s)}}:n=function(s){setTimeout(N(d,s,1),0)}),J.exports={set:C,clear:_}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(H,J,I){var N=H("./_to-integer"),g=Math.max,S=Math.min;J.exports=function(k,y){return k=N(k),k<0?g(k+y,0):S(k,y)}},{"./_to-integer":157}],157:[function(H,J,I){var N=Math.ceil,g=Math.floor;J.exports=function(S){return isNaN(S=+S)?0:(S>0?g:N)(S)}},{}],158:[function(H,J,I){var N=H("./_iobject"),g=H("./_defined");J.exports=function(S){return N(g(S))}},{"./_defined":102,"./_iobject":116}],159:[function(H,J,I){var N=H("./_to-integer"),g=Math.min;J.exports=function(S){return S>0?g(N(S),9007199254740991):0}},{"./_to-integer":157}],160:[function(H,J,I){var N=H("./_defined");J.exports=function(g){return Object(N(g))}},{"./_defined":102}],161:[function(H,J,I){var N=H("./_is-object");J.exports=function(g,S){if(!N(g))return g;var k,y;if(S&&typeof(k=g.toString)=="function"&&!N(y=k.call(g)))return y;if(typeof(k=g.valueOf)=="function"&&!N(y=k.call(g)))return y;if(!S&&typeof(k=g.toString)=="function"&&!N(y=k.call(g)))return y;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(H,J,I){var N=0,g=Math.random();J.exports=function(S){return"Symbol(".concat(S===void 0?"":S,")_",(++N+g).toString(36))}},{}],163:[function(H,J,I){var N=H("./_global"),g=N.navigator;J.exports=g&&g.userAgent||""},{"./_global":110}],164:[function(H,J,I){var N=H("./_global"),g=H("./_core"),S=H("./_library"),k=H("./_wks-ext"),y=H("./_object-dp").f;J.exports=function(m){var C=g.Symbol||(g.Symbol=S?{}:N.Symbol||{});m.charAt(0)!="_"&&!(m in C)&&y(C,m,{value:k.f(m)})}},{"./_core":99,"./_global":110,"./_library":126,"./_object-dp":132,"./_wks-ext":165}],165:[function(H,J,I){I.f=H("./_wks")},{"./_wks":166}],166:[function(H,J,I){var N=H("./_shared")("wks"),g=H("./_uid"),S=H("./_global").Symbol,k=typeof S=="function",y=J.exports=function(m){return N[m]||(N[m]=k&&S[m]||(k?S:g)("Symbol."+m))};y.store=N},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(H,J,I){var N=H("./_classof"),g=H("./_wks")("iterator"),S=H("./_iterators");J.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,J,I){"use strict";var N=H("./_ctx"),g=H("./_export"),S=H("./_to-object"),k=H("./_iter-call"),y=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(f){var r=S(f),c=typeof this=="function"?this:Array,i=arguments.length,n=i>1?arguments[1]:void 0,o=n!==void 0,h=0,d=_(r),u,s,l,E;if(o&&(n=N(n,i>2?arguments[2]:void 0,2)),d!=null&&!(c==Array&&y(d)))for(E=d.call(r),s=new c;!(l=E.next()).done;h++)C(s,h,o?k(E,n,[l.value,h],!0):l.value);else for(u=m(r.length),s=new c(u);u>h;h++)C(s,h,o?n(r[h],h):r[h]);return s.length=h,s}})},{"./_create-property":100,"./_ctx":101,"./_export":107,"./_is-array-iter":117,"./_iter-call":120,"./_iter-detect":123,"./_to-length":159,"./_to-object":160,"./core.get-iterator-method":167}],169:[function(H,J,I){"use strict";var N=H("./_add-to-unscopables"),g=H("./_iter-step"),S=H("./_iterators"),k=H("./_to-iobject");J.exports=H("./_iter-define")(Array,"Array",function(y,m){this._t=k(y),this._i=0,this._k=m},function(){var y=this._t,m=this._k,C=this._i++;return!y||C>=y.length?(this._t=void 0,g(1)):m=="keys"?g(0,C):m=="values"?g(0,y[C]):g(0,[C,y[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,J,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(y){if(typeof this!="function"||!N(y))return!1;if(!N(this.prototype))return y instanceof this;for(;y=g(y);)if(this.prototype===y)return!0;return!1}})},{"./_is-object":119,"./_object-dp":132,"./_object-gpo":138,"./_wks":166}],171:[function(H,J,I){var N=H("./_export");N(N.S+N.F,"Object",{assign:H("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(H,J,I){var N=H("./_export");N(N.S,"Object",{create:H("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(H,J,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,J,I){H("./_object-sap")("getOwnPropertyNames",function(){return H("./_object-gopn-ext").f})},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(H,J,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,J,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,J,I){arguments[4][71][0].apply(I,arguments)},{dup:71}],178:[function(H,J,I){"use strict";var N=H("./_library"),g=H("./_global"),S=H("./_ctx"),k=H("./_classof"),y=H("./_export"),m=H("./_is-object"),C=H("./_a-function"),_=H("./_an-instance"),e=H("./_for-of"),f=H("./_species-constructor"),r=H("./_task").set,c=H("./_microtask")(),i=H("./_new-promise-capability"),n=H("./_perform"),o=H("./_user-agent"),h=H("./_promise-resolve"),d="Promise",u=g.TypeError,s=g.process,l=s&&s.versions,E=l&&l.v8||"",b=g[d],p=k(s)=="process",L=function(){},R,v,x,w,T=v=i.f,F=!!function(){try{var D=b.resolve(1),W=(D.constructor={})[H("./_wks")("species")]=function(Q){Q(L,L)};return(p||typeof PromiseRejectionEvent=="function")&&D.then(L)instanceof W&&E.indexOf("6.6")!==0&&o.indexOf("Chrome/66")===-1}catch(Q){}}(),P=function(D){var W;return m(D)&&typeof(W=D.then)=="function"?W:!1},A=function(D,W){if(D._n)return;D._n=!0;var Q=D._c;c(function(){for(var re=D._v,ee=D._s==1,ye=0,be=function(he){var Ie=ee?he.ok:he.fail,Se=he.resolve,fe=he.reject,ue=he.domain,ie,Ce,ne;try{Ie?(ee||(D._h==2&&O(D),D._h=1),Ie===!0?ie=re:(ue&&ue.enter(),ie=Ie(re),ue&&(ue.exit(),ne=!0)),ie===he.promise?fe(u("Promise-chain cycle")):(Ce=P(ie))?Ce.call(ie,Se,fe):Se(ie)):fe(re)}catch(ce){ue&&!ne&&ue.exit(),fe(ce)}};Q.length>ye;)be(Q[ye++]);D._c=[],D._n=!1,W&&!D._h&&z(D)})},z=function(D){r.call(g,function(){var W=D._v,Q=K(D),re,ee,ye;if(Q&&(re=n(function(){p?s.emit("unhandledRejection",W,D):(ee=g.onunhandledrejection)?ee({promise:D,reason:W}):(ye=g.console)&&ye.error&&ye.error("Unhandled promise rejection",W)}),D._h=p||K(D)?2:1),D._a=void 0,Q&&re.e)throw re.v})},K=function(D){return D._h!==1&&(D._a||D._c).length===0},O=function(D){r.call(g,function(){var W;p?s.emit("rejectionHandled",D):(W=g.onrejectionhandled)&&W({promise:D,reason:D._v})})},B=function(D){var W=this;if(W._d)return;W._d=!0,W=W._w||W,W._v=D,W._s=2,W._a||(W._a=W._c.slice()),A(W,!0)},U=function(D){var W=this,Q;if(W._d)return;W._d=!0,W=W._w||W;try{if(W===D)throw u("Promise can't be resolved itself");(Q=P(D))?c(function(){var re={_w:W,_d:!1};try{Q.call(D,S(U,re,1),S(B,re,1))}catch(ee){B.call(re,ee)}}):(W._v=D,W._s=1,A(W,!1))}catch(re){B.call({_w:W,_d:!1},re)}};F||(b=function(W){_(this,b,d,"_h"),C(W),R.call(this);try{W(S(U,this,1),S(B,this,1))}catch(Q){B.call(this,Q)}},R=function(W){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(W,Q){var re=T(f(this,b));return re.ok=typeof W=="function"?W:!0,re.fail=typeof Q=="function"&&Q,re.domain=p?s.domain:void 0,this._c.push(re),this._a&&this._a.push(re),this._s&&A(this,!1),re.promise},catch:function(D){return this.then(void 0,D)}}),x=function(){var D=new R;this.promise=D,this.resolve=S(U,D,1),this.reject=S(B,D,1)},i.f=T=function(D){return D===b||D===w?new x(D):v(D)}),y(y.G+y.W+y.F*!F,{Promise:b}),H("./_set-to-string-tag")(b,d),H("./_set-species")(d),w=H("./_core")[d],y(y.S+y.F*!F,d,{reject:function(W){var Q=T(this),re=Q.reject;return re(W),Q.promise}}),y(y.S+y.F*(N||!F),d,{resolve:function(W){return h(N&&this===w?b:this,W)}}),y(y.S+y.F*!(F&&H("./_iter-detect")(function(D){b.all(D).catch(L)})),d,{all:function(W){var Q=this,re=T(Q),ee=re.resolve,ye=re.reject,be=n(function(){var he=[],Ie=0,Se=1;e(W,!1,function(fe){var ue=Ie++,ie=!1;he.push(void 0),Se++,Q.resolve(fe).then(function(Ce){if(ie)return;ie=!0,he[ue]=Ce,--Se||ee(he)},ye)}),--Se||ee(he)});return be.e&&ye(be.v),re.promise},race:function(W){var Q=this,re=T(Q),ee=re.reject,ye=n(function(){e(W,!1,function(be){Q.resolve(be).then(re.resolve,ee)})});return ye.e&&ee(ye.v),re.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,J,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,f;_>e;){if(f=+arguments[e++],g(f,1114111)!==f)throw RangeError(f+" is not a valid code point");C.push(f<65536?S(f):S(((f-=65536)>>10)+55296,f%1024+56320))}return C.join("")}})},{"./_export":107,"./_to-absolute-index":156}],180:[function(H,J,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,J,I){"use strict";var N=H("./_global"),g=H("./_has"),S=H("./_descriptors"),k=H("./_export"),y=H("./_redefine"),m=H("./_meta").KEY,C=H("./_fails"),_=H("./_shared"),e=H("./_set-to-string-tag"),f=H("./_uid"),r=H("./_wks"),c=H("./_wks-ext"),i=H("./_wks-define"),n=H("./_enum-keys"),o=H("./_is-array"),h=H("./_an-object"),d=H("./_is-object"),u=H("./_to-object"),s=H("./_to-iobject"),l=H("./_to-primitive"),E=H("./_property-desc"),b=H("./_object-create"),p=H("./_object-gopn-ext"),L=H("./_object-gopd"),R=H("./_object-gops"),v=H("./_object-dp"),x=H("./_object-keys"),w=L.f,T=v.f,F=p.f,P=N.Symbol,A=N.JSON,z=A&&A.stringify,K="prototype",O=r("_hidden"),B=r("toPrimitive"),U={}.propertyIsEnumerable,D=_("symbol-registry"),W=_("symbols"),Q=_("op-symbols"),re=Object[K],ee=typeof P=="function"&&!!R.f,ye=N.QObject,be=!ye||!ye[K]||!ye[K].findChild,he=S&&C(function(){return b(T({},"a",{get:function(){return T(this,"a",{value:7}).a}})).a!=7})?function(pe,xe,Ke){var qe=w(re,xe);qe&&delete re[xe],T(pe,xe,Ke),qe&&pe!==re&&T(re,xe,qe)}:T,Ie=function(pe){var xe=W[pe]=b(P[K]);return xe._k=pe,xe},Se=ee&&typeof P.iterator=="symbol"?function(pe){return typeof pe=="symbol"}:function(pe){return pe instanceof P},fe=function(xe,Ke,qe){return xe===re&&fe(Q,Ke,qe),h(xe),Ke=l(Ke,!0),h(qe),g(W,Ke)?(qe.enumerable?(g(xe,O)&&xe[O][Ke]&&(xe[O][Ke]=!1),qe=b(qe,{enumerable:E(0,!1)})):(g(xe,O)||T(xe,O,E(1,{})),xe[O][Ke]=!0),he(xe,Ke,qe)):T(xe,Ke,qe)},ue=function(xe,Ke){h(xe);for(var qe=n(Ke=s(Ke)),tt=0,et=qe.length,it;et>tt;)fe(xe,it=qe[tt++],Ke[it]);return xe},ie=function(xe,Ke){return Ke===void 0?b(xe):ue(b(xe),Ke)},Ce=function(xe){var Ke=U.call(this,xe=l(xe,!0));return this===re&&g(W,xe)&&!g(Q,xe)?!1:Ke||!g(this,xe)||!g(W,xe)||g(this,O)&&this[O][xe]?Ke:!0},ne=function(xe,Ke){if(xe=s(xe),Ke=l(Ke,!0),xe===re&&g(W,Ke)&&!g(Q,Ke))return;var qe=w(xe,Ke);return qe&&g(W,Ke)&&!(g(xe,O)&&xe[O][Ke])&&(qe.enumerable=!0),qe},ce=function(xe){for(var Ke=F(s(xe)),qe=[],tt=0,et;Ke.length>tt;)!g(W,et=Ke[tt++])&&et!=O&&et!=m&&qe.push(et);return qe},Ae=function(xe){for(var Ke=xe===re,qe=F(Ke?Q:s(xe)),tt=[],et=0,it;qe.length>et;)g(W,it=qe[et++])&&(Ke?g(re,it):!0)&&tt.push(W[it]);return tt};ee||(P=function(){if(this instanceof P)throw TypeError("Symbol is not a constructor!");var xe=f(arguments.length>0?arguments[0]:void 0),Ke=function(qe){this===re&&Ke.call(Q,qe),g(this,O)&&g(this[O],xe)&&(this[O][xe]=!1),he(this,xe,E(1,qe))};return S&&be&&he(re,xe,{configurable:!0,set:Ke}),Ie(xe)},y(P[K],"toString",function(){return this._k}),L.f=ne,v.f=fe,H("./_object-gopn").f=p.f=ce,H("./_object-pie").f=Ce,R.f=Ae,S&&!H("./_library")&&y(re,"propertyIsEnumerable",Ce,!0),c.f=function(pe){return Ie(r(pe))}),k(k.G+k.W+k.F*!ee,{Symbol:P});for(var oe="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),q=0;oe.length>q;)r(oe[q++]);for(var $=x(r.store),X=0;$.length>X;)i($[X++]);k(k.S+k.F*!ee,"Symbol",{for:function(pe){return g(D,pe+="")?D[pe]:D[pe]=P(pe)},keyFor:function(xe){if(!Se(xe))throw TypeError(xe+" is not a symbol!");for(var Ke in D)if(D[Ke]===xe)return Ke},useSetter:function(){be=!0},useSimple:function(){be=!1}}),k(k.S+k.F*!ee,"Object",{create:ie,defineProperty:fe,defineProperties:ue,getOwnPropertyDescriptor:ne,getOwnPropertyNames:ce,getOwnPropertySymbols:Ae});var de=C(function(){R.f(1)});k(k.S+k.F*de,"Object",{getOwnPropertySymbols:function(xe){return R.f(u(xe))}}),A&&k(k.S+k.F*(!ee||C(function(){var pe=P();return z([pe])!="[null]"||z({a:pe})!="{}"||z(Object(pe))!="{}"})),"JSON",{stringify:function(xe){for(var Ke=[xe],qe=1,tt,et;arguments.length>qe;)Ke.push(arguments[qe++]);return et=tt=Ke[1],!d(tt)&&xe===void 0||Se(xe)?void 0:(o(tt)||(tt=function(it,at){if(typeof et=="function"&&(at=et.call(this,it,at)),!Se(at))return at}),Ke[1]=tt,z.apply(A,Ke))}}),P[K][B]||H("./_hide")(P[K],B,P[K].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,J,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,J,I){"use strict";var N=H("./_export"),g=H("./_core"),S=H("./_global"),k=H("./_species-constructor"),y=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 y(C,m()).then(function(){return e})}:m,_?function(e){return y(C,m()).then(function(){throw e})}:m)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(H,J,I){"use strict";var N=H("./_export"),g=H("./_new-promise-capability"),S=H("./_perform");N(N.S,"Promise",{try:function(k){var y=g.f(this),m=S(k);return(m.e?y.reject:y.resolve)(m.v),y.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(H,J,I){H("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(H,J,I){H("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(H,J,I){H("./es6.array.iterator");for(var N=H("./_global"),g=H("./_hide"),S=H("./_iterators"),k=H("./_wks")("toStringTag"),y="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),m=0;m<y.length;m++){var C=y[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,J,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,J,I){(function(N){"use strict";var g=H("babel-runtime/helpers/typeof"),S=k(g);function k(l){return l&&l.__esModule?l:{default:l}}function y(l){return Array.isArray?Array.isArray(l):s(l)==="[object Array]"}I.isArray=y;function m(l){return typeof l=="boolean"}I.isBoolean=m;function C(l){return l===null}I.isNull=C;function _(l){return l==null}I.isNullOrUndefined=_;function e(l){return typeof l=="number"}I.isNumber=e;function f(l){return typeof l=="string"}I.isString=f;function r(l){return(typeof l=="undefined"?"undefined":(0,S.default)(l))==="symbol"}I.isSymbol=r;function c(l){return l===void 0}I.isUndefined=c;function i(l){return s(l)==="[object RegExp]"}I.isRegExp=i;function n(l){return(typeof l=="undefined"?"undefined":(0,S.default)(l))==="object"&&l!==null}I.isObject=n;function o(l){return s(l)==="[object Date]"}I.isDate=o;function h(l){return s(l)==="[object Error]"||l instanceof Error}I.isError=h;function d(l){return typeof l=="function"}I.isFunction=d;function u(l){return l===null||typeof l=="boolean"||typeof l=="number"||typeof l=="string"||(typeof l=="undefined"?"undefined":(0,S.default)(l))==="symbol"||typeof l=="undefined"}I.isPrimitive=u,I.isBuffer=N.isBuffer;function s(l){return Object.prototype.toString.call(l)}}).call(this,{isBuffer:H("../../is-buffer/index.js")})},{"../../is-buffer/index.js":197,"babel-runtime/helpers/typeof":67}],190:[function(H,J,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 y=function(){var f=/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,o,h){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(y.masks[n]||n||y.masks.default);var d=n.slice(0,4);(d==="UTC:"||d==="GMT:")&&(n=n.slice(4),o=!0,d==="GMT:"&&(h=!0));var u=o?"getUTC":"get",s=i[u+"Date"](),l=i[u+"Day"](),E=i[u+"Month"](),b=i[u+"FullYear"](),p=i[u+"Hours"](),L=i[u+"Minutes"](),R=i[u+"Seconds"](),v=i[u+"Milliseconds"](),x=o?0:i.getTimezoneOffset(),w=C(i),T=_(i),F={d:s,dd:m(s),ddd:y.i18n.dayNames[l],dddd:y.i18n.dayNames[l+7],m:E+1,mm:m(E+1),mmm:y.i18n.monthNames[E],mmmm:y.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:L,MM:m(L),s:R,ss:m(R),l:m(v,3),L:m(Math.round(v/10)),t:p<12?"a":"p",tt:p<12?"am":"pm",T:p<12?"A":"P",TT:p<12?"AM":"PM",Z:h?"GMT":o?"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"][s%10>3?0:(s%100-s%10!=10)*s%10],W:w,N:T};return n.replace(f,function(P){return P in F?F[P]:P.slice(1,P.length-1)})}}();y.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},y.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]};function m(f,r){for(f=String(f),r=r||2;f.length<r;)f="0"+f;return f}function C(f){var r=new Date(f.getFullYear(),f.getMonth(),f.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 _(f){var r=f.getDay();return r===0&&(r=7),r}function e(f){return f===null?"null":f===void 0?"undefined":(typeof f=="undefined"?"undefined":(0,g.default)(f))!=="object"?typeof f=="undefined"?"undefined":(0,g.default)(f):Array.isArray(f)?"array":{}.toString.call(f).slice(8,-1).toLowerCase()}typeof define=="function"&&define.amd?define(function(){return y}):(typeof I=="undefined"?"undefined":(0,g.default)(I))==="object"?J.exports=y:k.dateFormat=y})(void 0)},{"babel-runtime/helpers/typeof":67}],191:[function(H,J,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=/["'&<>]/;J.exports=g;function g(S){var k=""+S,y=N.exec(k);if(!y)return k;var m,C="",_=0,e=0;for(_=y.index;_<k.length;_++){switch(k.charCodeAt(_)){case 34:m="&quot;";break;case 38:m="&amp;";break;case 39:m="&#39;";break;case 60:m="&lt;";break;case 62:m="&gt;";break;default:continue}e!==_&&(C+=k.substring(e,_)),e=_+1,C+=m}return e!==_?C+k.substring(e,_):C}},{}],192:[function(H,J,I){function N(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}J.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,f,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],y(_))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:f=Array.prototype.slice.call(arguments,1),_.apply(this,f)}else if(k(_))for(f=Array.prototype.slice.call(arguments,1),c=_.slice(),e=c.length,r=0;r<e;r++)c[r].apply(this,f);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&&(y(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,f,r;if(!g(C))throw TypeError("listener must be a function");if(!this._events||!this._events[m])return this;if(_=this._events[m],f=_.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=f;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 y(m){return m===void 0}},{}],193:[function(H,J,I){var N=H("http"),g=J.exports;for(var S in N)N.hasOwnProperty(S)&&(g[S]=N[S]);g.request=function(k,y){return k||(k={}),k.scheme="https",k.protocol="https:",N.request.call(this,k,y)}},{http:231}],194:[function(H,J,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");J.exports=function(S){if(typeof S=="number")return S;var k=g(S);if(k===void 0){var y=new Error(N.format("humanize-ms(%j) result undefined",S));console.warn(y.stack)}return k}},{ms:204,util:243}],195:[function(H,J,I){I.read=function(N,g,S,k,y){var m,C,_=y*8-k-1,e=(1<<_)-1,f=e>>1,r=-7,c=S?y-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-f;else{if(m===e)return C?NaN:(n?-1:1)*Infinity;C=C+Math.pow(2,k),m=m-f}return(n?-1:1)*C*Math.pow(2,m-k)},I.write=function(N,g,S,k,y,m){var C,_,e,f=m*8-y-1,r=(1<<f)-1,c=r>>1,i=y===23?Math.pow(2,-24)-Math.pow(2,-77):0,n=k?0:m-1,o=k?1:-1,h=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,y),C=C+c):(_=g*Math.pow(2,c-1)*Math.pow(2,y),C=0));y>=8;N[S+n]=_&255,n+=o,_/=256,y-=8);for(C=C<<y|_,f+=y;f>0;N[S+n]=C&255,n+=o,C/=256,f-=8);N[S+n-o]|=h*128}},{}],196:[function(H,J,I){typeof Object.create=="function"?J.exports=function(g,S){S&&(g.super_=S,g.prototype=Object.create(S.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}))}:J.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,J,I){/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/J.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,J,I){var N={}.toString;J.exports=Array.isArray||function(g){return N.call(g)=="[object Array]"}},{}],199:[function(require,module,exports){(function(global){(function(H,J){typeof exports=="object"&&typeof module!="undefined"?module.exports=J(H):typeof define=="function"&&define.amd?define(J):J(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 J={},I=0,N=H.length;I<N;I++)J[H.charAt(I)]=I;return J}(b64chars),fromCharCode=String.fromCharCode,cb_utob=function(H){if(H.length<2){var J=H.charCodeAt(0);return J<128?H:J<2048?fromCharCode(192|J>>>6)+fromCharCode(128|J&63):fromCharCode(224|J>>>12&15)+fromCharCode(128|J>>>6&63)+fromCharCode(128|J&63)}else{var J=65536+(H.charCodeAt(0)-55296)*1024+(H.charCodeAt(1)-56320);return fromCharCode(240|J>>>18&7)+fromCharCode(128|J>>>12&63)+fromCharCode(128|J>>>6&63)+fromCharCode(128|J&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 J=[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),J>=2?"=":b64chars.charAt(I>>>6&63),J>=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 J=Object.prototype.toString.call(H)==="[object Uint8Array]";return J?H.toString("base64"):btoa(utob(String(H)))},encode=function(H,J){return J?_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 J=(7&H.charCodeAt(0))<<18|(63&H.charCodeAt(1))<<12|(63&H.charCodeAt(2))<<6|63&H.charCodeAt(3),I=J-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 J=H.length,I=J%4,N=(J>0?b64tab[H.charAt(0)]<<18:0)|(J>1?b64tab[H.charAt(1)]<<12:0)|(J>2?b64tab[H.charAt(2)]<<6:0)|(J>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(J){return J=="-"?"+":"/"}).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,J,I){/*!
* merge-descriptors
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/"use strict";J.exports=g;var N=Object.prototype.hasOwnProperty;function g(S,k,y){if(!S)throw new TypeError("argument dest is required");if(!k)throw new TypeError("argument src is required");return y===void 0&&(y=!0),Object.getOwnPropertyNames(k).forEach(function(C){if(!y&&N.call(S,C))return;var _=Object.getOwnPropertyDescriptor(k,C);Object.defineProperty(S,C,_)}),S}},{}],201:[function(H,J,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 y=g[k].map(function(_){return _.toLowerCase()});k=k.toLowerCase();for(var m=0;m<y.length;m++){var C=y[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=y[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(),y=S.length<g.length,m=k.length<S.length-1;return(m||!y)&&this._types[k]||null},N.prototype.getExtension=function(g){return g=/^\s*([^;\s]*)/.test(g)&&RegExp.$1,g&&this._extensions[g.toLowerCase()]||null},J.exports=N},{}],202:[function(H,J,I){"use strict";var N=H("./Mime");J.exports=new N(H("./types/standard"))},{"./Mime":201,"./types/standard":203}],203:[function(H,J,I){J.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma","es"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/mrb-consumer+xml":["*xdf"],"application/mrb-publish+xml":["*xdf"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["*xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/ttml+xml":["ttml"],"application/urc-ressheet+xml":["rsheet"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-error+xml":["xer"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}},{}],204:[function(H,J,I){var N=1e3,g=N*60,S=g*60,k=S*24,y=k*7,m=k*365.25;J.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*y;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?f(r,c,k,"day"):c>=S?f(r,c,S,"hour"):c>=g?f(r,c,g,"minute"):c>=N?f(r,c,N,"second"):r+" ms"}function f(r,c,i,n){var o=c>=i*1.5;return Math.round(r/i)+" "+n+(o?"s":"")}},{}],205:[function(H,J,I){(function(N){function g(m,C){for(var _=0,e=m.length-1;e>=0;e--){var f=m[e];f==="."?m.splice(e,1):f===".."?(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(f){return!!f}),!C).join("/"),(C?"/":"")+m||"."},I.normalize=function(m){var C=I.isAbsolute(m),_=y(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 _(o){for(var h=0;h<o.length&&!(o[h]!=="");h++);for(var d=o.length-1;d>=0&&!(o[d]!=="");d--);return h>d?[]:o.slice(h,d-h+1)}for(var e=_(m.split("/")),f=_(C.split("/")),r=Math.min(e.length,f.length),c=r,i=0;i<r;i++)if(e[i]!==f[i]){c=i;break}for(var n=[],i=c;i<e.length;i++)n.push("..");return n=n.concat(f.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,f=!0,r=m.length-1;r>=1;--r)if(C=m.charCodeAt(r),C===47){if(!f){e=r;break}}else f=!1;return e===-1?_?"/":".":_&&e===1?"/":m.slice(0,e)};function S(m){typeof m!="string"&&(m=m+"");var C=0,_=-1,e=!0,f;for(f=m.length-1;f>=0;--f)if(m.charCodeAt(f)===47){if(!e){C=f+1;break}}else _===-1&&(e=!1,_=f+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,f=!0,r=0,c=m.length-1;c>=0;--c){var i=m.charCodeAt(c);if(i===47){if(!f){_=c+1;break}continue}e===-1&&(f=!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 y="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,J,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,y=g[typeof I]&&I,m=g[typeof J]&&J&&!J.nodeType&&J,C=y&&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/,f=this,r=Object.prototype,c=r.hasOwnProperty,i=r.toString;function n(v){return v=String(v),v.charAt(0).toUpperCase()+v.slice(1)}function o(v,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(v)&&!/^Windows Phone /i.test(v)&&(T=T[/[\d.]+$/.exec(v)])&&(v="Windows "+T),v=String(v),x&&w&&(v=v.replace(RegExp(x,"i"),w)),v=d(v.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]),v}function h(v,x){var w=-1,T=v?v.length:0;if(typeof T=="number"&&T>-1&&T<=_)for(;++w<T;)x(v[w],w,v);else u(v,x)}function d(v){return v=p(v),/^(?:webOS|i(?:OS|P))/.test(v)?v:n(v)}function u(v,x){for(var w in v)c.call(v,w)&&x(v[w],w,v)}function s(v){return v==null?n(v):i.call(v).slice(8,-1)}function l(v,x){var w=v!=null?typeof v[x]:"number";return!/^(?:boolean|number|string|undefined)$/.test(w)&&(w=="object"?!!v[x]:!0)}function E(v){return String(v).replace(/([ -])(?!$)/g,"$1?")}function b(v,x){var w=null;return h(v,function(T,F){w=x(w,T,F,v)}),w}function p(v){return String(v).replace(/^ +| +$/g,"")}function L(v){var x=S,w=v&&typeof v=="object"&&s(v)!="String";w&&(x=v,v=null);var T=x.navigator||{},F=T.userAgent||"";v||(v=F);var P=w||f==k,A=w?!!T.likeChrome:/\bChrome\b/.test(v)&&!/internal|\n/i.test(i.toString()),z="Object",K=w?z:"ScriptBridgingProxyObject",O=w?z:"Environment",B=w&&x.java?"JavaPackage":s(x.java),U=w?z:"RuntimeObject",D=/\bJava/.test(B)&&x.java,W=D&&s(x.environment)==O,Q=D?"a":"\u03B1",re=D?"b":"\u03B2",ee=x.document||{},ye=x.operamini||x.opera,be=e.test(be=w&&ye?ye["[[Class]]"]:s(ye))?be:ye=null,he,Ie=v,Se=[],fe=null,ue=v==F,ie=ue&&ye&&typeof ye.version=="function"&&ye.version(),Ce,ne=$([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),ce=de(["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"]),Ae=xe([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),oe=X({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}}),q=pe(["Windows Phone","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian","Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);function $(et){return b(et,function(it,at){return it||RegExp("\\b"+(at.pattern||E(at))+"\\b","i").exec(v)&&(at.label||at)})}function X(et){return b(et,function(it,at,je){return it||(at[Ae]||at[/^[a-z]+(?: +[a-z]+\b)*/i.exec(Ae)]||RegExp("\\b"+E(je)+"(?:\\b|\\w*\\d)","i").exec(v))&&je})}function de(et){return b(et,function(it,at){return it||RegExp("\\b"+(at.pattern||E(at))+"\\b","i").exec(v)&&(at.label||at)})}function pe(et){return b(et,function(it,at){var je=at.pattern||E(at);return!it&&(it=RegExp("\\b"+je+"(?:/[\\d.]+|[ \\w.]*)","i").exec(v))&&(it=o(it,je,at.label||at)),it})}function xe(et){return b(et,function(it,at){var je=at.pattern||E(at);return!it&&(it=RegExp("\\b"+je+" *\\d+[.\\w_]*","i").exec(v)||RegExp("\\b"+je+" *\\w+-[\\w]*","i").exec(v)||RegExp("\\b"+je+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(v))&&((it=String(at.label&&!RegExp(je,"i").test(at.label)?at.label:it).split("/"))[1]&&!/[\d.]+/.test(it[0])&&(it[0]+=" "+it[1]),at=at.label||at,it=d(it[0].replace(RegExp(je,"i"),at).replace(RegExp("; *(?:"+at+"[_-])?","i")," ").replace(RegExp("("+at+")[-_.]?(\\w)","i"),"$1 $2"))),it})}function Ke(et){return b(et,function(it,at){return it||(RegExp(at+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(v)||0)[1]||null})}function qe(){return this.description||""}if(ne&&(ne=[ne]),oe&&!Ae&&(Ae=xe([oe])),(he=/\bGoogle TV\b/.exec(Ae))&&(Ae=he[0]),/\bSimulator\b/i.test(v)&&(Ae=(Ae?Ae+" ":"")+"Simulator"),ce=="Opera Mini"&&/\bOPiOS\b/.test(v)&&Se.push("running in Turbo/Uncompressed mode"),ce=="IE"&&/\blike iPhone OS\b/.test(v)?(he=L(v.replace(/like iPhone OS/,"")),oe=he.manufacturer,Ae=he.product):/^iP/.test(Ae)?(ce||(ce="Safari"),q="iOS"+((he=/ OS ([\d_]+)/i.exec(v))?" "+he[1].replace(/_/g,"."):"")):ce=="Konqueror"&&!/buntu/i.test(q)?q="Kubuntu":oe&&oe!="Google"&&(/Chrome/.test(ce)&&!/\bMobile Safari\b/i.test(v)||/\bVita\b/.test(Ae))||/\bAndroid\b/.test(q)&&/^Chrome/.test(ce)&&/\bVersion\//i.test(v)?(ce="Android Browser",q=/\bAndroid\b/.test(q)?q:"Android"):ce=="Silk"?(/\bMobi/i.test(v)||(q="Android",Se.unshift("desktop mode")),/Accelerated *= *true/i.test(v)&&Se.unshift("accelerated")):ce=="PaleMoon"&&(he=/\bFirefox\/([\d.]+)\b/.exec(v))?Se.push("identifying as Firefox "+he[1]):ce=="Firefox"&&(he=/\b(Mobile|Tablet|TV)\b/i.exec(v))?(q||(q="Firefox OS"),Ae||(Ae=he[1])):!ce||(he=!/\bMinefield\b/i.test(v)&&/\b(?:Firefox|Safari)\b/.exec(ce))?(ce&&!Ae&&/[\/,]|^[^(]+?\)/.test(v.slice(v.indexOf(he+"/")+8))&&(ce=null),(he=Ae||oe||q)&&(Ae||oe||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(q))&&(ce=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(q)?q:he)+" Browser")):ce=="Electron"&&(he=(/\bChrome\/([\d.]+)\b/.exec(v)||0)[1])&&Se.push("Chromium "+he),ie||(ie=Ke(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",E(ce),"(?:Firefox|Minefield|NetFront)"])),(he=ne=="iCab"&&parseFloat(ie)>3&&"WebKit"||/\bOpera\b/.test(ce)&&(/\bOPR\b/.test(v)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(v)&&!/^(?:Trident|EdgeHTML)$/.test(ne)&&"WebKit"||!ne&&/\bMSIE\b/i.test(v)&&(q=="Mac OS"?"Tasman":"Trident")||ne=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(ce)&&"NetFront")&&(ne=[he]),ce=="IE"&&(he=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(v)||0)[1])?(ce+=" Mobile",q="Windows Phone "+(/\+$/.test(he)?he:he+".x"),Se.unshift("desktop mode")):/\bWPDesktop\b/i.test(v)?(ce="IE Mobile",q="Windows Phone 8.x",Se.unshift("desktop mode"),ie||(ie=(/\brv:([\d.]+)/.exec(v)||0)[1])):ce!="IE"&&ne=="Trident"&&(he=/\brv:([\d.]+)/.exec(v))&&(ce&&Se.push("identifying as "+ce+(ie?" "+ie:"")),ce="IE",ie=he[1]),ue){if(l(x,"global"))if(D&&(he=D.lang.System,Ie=he.getProperty("os.arch"),q=q||he.getProperty("os.name")+" "+he.getProperty("os.version")),W){try{ie=x.require("ringo/engine").version.join("."),ce="RingoJS"}catch(et){(he=x.system)&&he.global.system==x.system&&(ce="Narwhal",q||(q=he[0].os||null))}ce||(ce="Rhino")}else typeof x.process=="object"&&!x.process.browser&&(he=x.process)&&(typeof he.versions=="object"&&(typeof he.versions.electron=="string"?(Se.push("Node "+he.versions.node),ce="Electron",ie=he.versions.electron):typeof he.versions.nw=="string"&&(Se.push("Chromium "+ie,"Node "+he.versions.node),ce="NW.js",ie=he.versions.nw)),ce||(ce="Node.js",Ie=he.arch,q=he.platform,ie=/[\d.]+/.exec(he.version),ie=ie?ie[0]:null));else s(he=x.runtime)==K?(ce="Adobe AIR",q=he.flash.system.Capabilities.os):s(he=x.phantom)==U?(ce="PhantomJS",ie=(he=he.version||null)&&he.major+"."+he.minor+"."+he.patch):typeof ee.documentMode=="number"&&(he=/\bTrident\/(\d+)/i.exec(v))?(ie=[ie,ee.documentMode],(he=+he[1]+4)!=ie[1]&&(Se.push("IE "+ie[1]+" mode"),ne&&(ne[1]=""),ie[1]=he),ie=ce=="IE"?String(ie[1].toFixed(1)):ie[0]):typeof ee.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(ce)&&(Se.push("masking as "+ce+" "+ie),ce="IE",ie="11.0",ne=["Trident"],q="Windows");q=q&&d(q)}if(ie&&(he=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(ie)||/(?:alpha|beta)(?: ?\d)?/i.exec(v+";"+(ue&&T.appMinorVersion))||/\bMinefield\b/i.test(v)&&"a")&&(fe=/b/i.test(he)?"beta":"alpha",ie=ie.replace(RegExp(he+"\\+?$"),"")+(fe=="beta"?re:Q)+(/\d+\+?/.exec(he)||"")),ce=="Fennec"||ce=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(q))ce="Firefox Mobile";else if(ce=="Maxthon"&&ie)ie=ie.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Ae))Ae=="Xbox 360"&&(q=null),Ae=="Xbox 360"&&/\bIEMobile\b/.test(v)&&Se.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(ce)||ce&&!Ae&&!/Browser|Mobi/.test(ce))&&(q=="Windows CE"||/Mobi/i.test(v)))ce+=" Mobile";else if(ce=="IE"&&ue)try{x.external===null&&Se.unshift("platform preview")}catch(et){Se.unshift("embedded")}else(/\bBlackBerry\b/.test(Ae)||/\bBB10\b/.test(v))&&(he=(RegExp(Ae.replace(/ +/g," *")+"/([.\\d]+)","i").exec(v)||0)[1]||ie)?(he=[he,/BB10/.test(v)],q=(he[1]?(Ae=null,oe="BlackBerry"):"Device Software")+" "+he[0],ie=null):this!=u&&Ae!="Wii"&&(ue&&ye||/Opera/.test(ce)&&/\b(?:MSIE|Firefox)\b/i.test(v)||ce=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(q)||ce=="IE"&&(q&&!/^Win/.test(q)&&ie>5.5||/\bWindows XP\b/.test(q)&&ie>8||ie==8&&!/\bTrident\b/.test(v)))&&!e.test(he=L.call(u,v.replace(e,"")+";"))&&he.name&&(he="ing as "+he.name+((he=he.version)?" "+he:""),e.test(ce)?(/\bIE\b/.test(he)&&q=="Mac OS"&&(q=null),he="identify"+he):(he="mask"+he,be?ce=d(be.replace(/([a-z])([A-Z])/g,"$1 $2")):ce="Opera",/\bIE\b/.test(he)&&(q=null),ue||(ie=null)),ne=["Presto"],Se.push(he));(he=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(v)||0)[1])&&(he=[parseFloat(he.replace(/\.(\d)$/,".0$1")),he],ce=="Safari"&&he[1].slice(-1)=="+"?(ce="WebKit Nightly",fe="alpha",ie=he[1].slice(0,-1)):(ie==he[1]||ie==(he[2]=(/\bSafari\/([\d.]+\+?)/i.exec(v)||0)[1]))&&(ie=null),he[1]=(/\bChrome\/([\d.]+)/i.exec(v)||0)[1],he[0]==537.36&&he[2]==537.36&&parseFloat(he[1])>=28&&ne=="WebKit"&&(ne=["Blink"]),!ue||!A&&!he[1]?(ne&&(ne[1]="like Safari"),he=(he=he[0],he<400?1:he<500?2:he<526?3:he<533?4:he<534?"4+":he<535?5:he<537?6:he<538?7:he<601?8:"8")):(ne&&(ne[1]="like Chrome"),he=he[1]||(he=he[0],he<530?1:he<532?2:he<532.05?3:he<533?4:he<534.03?5:he<534.07?6:he<534.1?7:he<534.13?8:he<534.16?9:he<534.24?10:he<534.3?11:he<535.01?12:he<535.02?"13+":he<535.07?15:he<535.11?16:he<535.19?17:he<536.05?18:he<536.1?19:he<537.01?20:he<537.11?"21+":he<537.13?23:he<537.18?24:he<537.24?25:he<537.36?26:ne!="Blink"?"27":"28")),ne&&(ne[1]+=" "+(he+=typeof he=="number"?".x":/[.+]/.test(he)?"":"+")),ce=="Safari"&&(!ie||parseInt(ie)>45)&&(ie=he)),ce=="Opera"&&(he=/\bzbov|zvav$/.exec(q))?(ce+=" ",Se.unshift("desktop mode"),he=="zvav"?(ce+="Mini",ie=null):ce+="Mobile",q=q.replace(RegExp(" *"+he+"$"),"")):ce=="Safari"&&/\bChrome\b/.exec(ne&&ne[1])&&(Se.unshift("desktop mode"),ce="Chrome Mobile",ie=null,/\bOS X\b/.test(q)?(oe="Apple",q="iOS 4.3+"):q=null),ie&&ie.indexOf(he=/[\d.]+$/.exec(q))==0&&v.indexOf("/"+he+"-")>-1&&(q=p(q.replace(he,""))),ne&&!/\b(?:Avant|Nook)\b/.test(ce)&&(/Browser|Lunascape|Maxthon/.test(ce)||ce!="Safari"&&/^iOS/.test(q)&&/\bSafari\b/.test(ne[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(ce)&&ne[1])&&((he=ne[ne.length-1])&&Se.push(he)),Se.length&&(Se=["("+Se.join("; ")+")"]),oe&&Ae&&Ae.indexOf(oe)<0&&Se.push("on "+oe),Ae&&Se.push((/^on /.test(Se[Se.length-1])?"":"on ")+Ae),q&&(he=/ ([\d.+]+)$/.exec(q),Ce=he&&q.charAt(q.length-he[0].length-1)=="/",q={architecture:32,family:he&&!Ce?q.replace(he[0],""):q,version:he?he[1]:null,toString:function(){var et=this.version;return this.family+(et&&!Ce?" "+et:"")+(this.architecture==64?" 64-bit":"")}}),(he=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Ie))&&!/\bi686\b/i.test(Ie)?(q&&(q.architecture=64,q.family=q.family.replace(RegExp(" *"+he),"")),ce&&(/\bWOW64\b/i.test(v)||ue&&/\w(?:86|32)$/.test(T.cpuClass||T.platform)&&!/\bWin64; x64\b/i.test(v))&&Se.unshift("32-bit")):q&&/^OS X/.test(q.family)&&ce=="Chrome"&&parseFloat(ie)>=39&&(q.architecture=64),v||(v=null);var tt={};return tt.description=v,tt.layout=ne&&ne[0],tt.manufacturer=oe,tt.name=ce,tt.prerelease=fe,tt.product=Ae,tt.ua=v,tt.version=ce&&ie,tt.os=q||{architecture:null,family:null,version:null,toString:function(){return"null"}},tt.parse=L,tt.toString=qe,tt.version&&Se.unshift(ie),tt.name&&Se.unshift(ce),q&&ce&&!(q==String(q).split(" ")[0]&&(q==ce.split(" ")[0]||Ae))&&Se.push(Ae?"("+q+")":"on "+q),Se.length&&(tt.description=Se.join(" ")),tt}var R=L();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(S.platform=R,define(function(){return R})):y&&m?u(R,function(v,x){y[x]=v}):S.platform=R}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(H,J,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?J.exports={nextTick:g}:J.exports=N;function g(S,k,y,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,y)});case 4:return N.nextTick(function(){S.call(null,k,y,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,J,I){var N=J.exports={},g,S;function k(){throw new Error("setTimeout has not been defined")}function y(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?g=setTimeout:g=k}catch(h){g=k}try{typeof clearTimeout=="function"?S=clearTimeout:S=y}catch(h){S=y}})();function m(h){if(g===setTimeout)return setTimeout(h,0);if((g===k||!g)&&setTimeout)return g=setTimeout,setTimeout(h,0);try{return g(h,0)}catch(d){try{return g.call(null,h,0)}catch(u){return g.call(this,h,0)}}}function C(h){if(S===clearTimeout)return clearTimeout(h);if((S===y||!S)&&clearTimeout)return S=clearTimeout,clearTimeout(h);try{return S(h)}catch(d){try{return S.call(null,h)}catch(u){return S.call(this,h)}}}var _=[],e=!1,f,r=-1;function c(){if(!e||!f)return;e=!1,f.length?_=f.concat(_):r=-1,_.length&&i()}function i(){if(e)return;var h=m(c);e=!0;for(var d=_.length;d;){for(f=_,_=[];++r<d;)f&&f[r].run();r=-1,d=_.length}f=null,e=!1,C(h)}N.nextTick=function(h){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(h,d)),_.length===1&&!e&&m(i)};function n(h,d){this.fun=h,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 o(){}N.on=o,N.addListener=o,N.once=o,N.off=o,N.removeListener=o,N.removeAllListeners=o,N.emit=o,N.prependListener=o,N.prependOnceListener=o,N.listeners=function(h){return[]},N.binding=function(h){throw new Error("process.binding is not supported")},N.cwd=function(){return"/"},N.chdir=function(h){throw new Error("process.chdir is not supported")},N.umask=function(){return 0}},{}],209:[function(H,J,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 J=="object"&&J&&!J.nodeType&&J,y=typeof N=="object"&&N;(y.global===y||y.window===y||y.self===y)&&(g=y);var m,C=2147483647,_=36,e=1,f=26,r=38,c=700,i=72,n=128,o="-",h=/^xn--/,d=/[^\x20-\x7E]/,u=/[\x2E\u3002\uFF0E\uFF61]/g,s={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},l=_-e,E=Math.floor,b=String.fromCharCode,p;function L(B){throw new RangeError(s[B])}function R(B,U){for(var D=B.length,W=[];D--;)W[D]=U(B[D]);return W}function v(B,U){var D=B.split("@"),W="";D.length>1&&(W=D[0]+"@",B=D[1]),B=B.replace(u,".");var Q=B.split("."),re=R(Q,U).join(".");return W+re}function x(B){for(var U=[],D=0,W=B.length,Q,re;D<W;)Q=B.charCodeAt(D++),Q>=55296&&Q<=56319&&D<W?(re=B.charCodeAt(D++),(re&64512)==56320?U.push(((Q&1023)<<10)+(re&1023)+65536):(U.push(Q),D--)):U.push(Q);return U}function w(B){return R(B,function(U){var D="";return U>65535&&(U-=65536,D+=b(U>>>10&1023|55296),U=56320|U&1023),D+=b(U),D}).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,D){var W=0;for(B=D?E(B/c):B>>1,B+=E(B/U);B>l*f>>1;W+=_)B=E(B/l);return E(W+(l+1)*B/(B+r))}function A(B){var U=[],D=B.length,W,Q=0,re=n,ee=i,ye,be,he,Ie,Se,fe,ue,ie,Ce;for(ye=B.lastIndexOf(o),ye<0&&(ye=0),be=0;be<ye;++be)B.charCodeAt(be)>=128&&L("not-basic"),U.push(B.charCodeAt(be));for(he=ye>0?ye+1:0;he<D;){for(Ie=Q,Se=1,fe=_;!(he>=D&&L("invalid-input"),ue=T(B.charCodeAt(he++)),(ue>=_||ue>E((C-Q)/Se))&&L("overflow"),Q+=ue*Se,ie=fe<=ee?e:fe>=ee+f?f:fe-ee,ue<ie);fe+=_)Ce=_-ie,Se>E(C/Ce)&&L("overflow"),Se*=Ce;W=U.length+1,ee=P(Q-Ie,W,Ie==0),E(Q/W)>C-re&&L("overflow"),re+=E(Q/W),Q%=W,U.splice(Q++,0,re)}return w(U)}function z(B){var U,D,W,Q,re,ee,ye,be,he,Ie,Se,fe=[],ue,ie,Ce,ne;for(B=x(B),ue=B.length,U=n,D=0,re=i,ee=0;ee<ue;++ee)Se=B[ee],Se<128&&fe.push(b(Se));for(W=Q=fe.length,Q&&fe.push(o);W<ue;){for(ye=C,ee=0;ee<ue;++ee)Se=B[ee],Se>=U&&Se<ye&&(ye=Se);for(ie=W+1,ye-U>E((C-D)/ie)&&L("overflow"),D+=(ye-U)*ie,U=ye,ee=0;ee<ue;++ee)if(Se=B[ee],Se<U&&++D>C&&L("overflow"),Se==U){for(be=D,he=_;!(Ie=he<=re?e:he>=re+f?f:he-re,be<Ie);he+=_)ne=be-Ie,Ce=_-Ie,fe.push(b(F(Ie+ne%Ce,0))),be=E(ne/Ce);fe.push(b(F(be,0))),re=P(D,ie,W==Q),D=0,++W}++D,++U}return fe.join("")}function K(B){return v(B,function(U){return h.test(U)?A(U.slice(4).toLowerCase()):U})}function O(B){return v(B,function(U){return d.test(U)?"xn--"+z(U):U})}if(m={version:"1.4.1",ucs2:{decode:x,encode:w},decode:A,encode:z,toASCII:O,toUnicode:K},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return m});else if(S&&k)if(J.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,J,I){"use strict";function N(S,k){return Object.prototype.hasOwnProperty.call(S,k)}J.exports=function(S,k,y,m){k=k||"&",y=y||"=";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 f=S.length;e>0&&f>e&&(f=e);for(var r=0;r<f;++r){var c=S[r].replace(_,"%20"),i=c.indexOf(y),n,o,h,d;i>=0?(n=c.substr(0,i),o=c.substr(i+1)):(n=c,o=""),h=decodeURIComponent(n),d=decodeURIComponent(o),N(C,h)?g(C[h])?C[h].push(d):C[h]=[C[h],d]:C[h]=d}return C};var g=Array.isArray||function(S){return Object.prototype.toString.call(S)==="[object Array]"}},{}],211:[function(H,J,I){"use strict";var N=function(y){switch(typeof y){case"string":return y;case"boolean":return y?"true":"false";case"number":return isFinite(y)?y:"";default:return""}};J.exports=function(y,m,C,_){return m=m||"&",C=C||"=",y===null&&(y=void 0),typeof y=="object"?S(k(y),function(e){var f=encodeURIComponent(N(e))+C;return g(y[e])?S(y[e],function(r){return f+encodeURIComponent(N(r))}).join(m):f+encodeURIComponent(N(y[e]))}).join(m):_?encodeURIComponent(N(_))+C+encodeURIComponent(N(y)):""};var g=Array.isArray||function(y){return Object.prototype.toString.call(y)==="[object Array]"};function S(y,m){if(y.map)return y.map(m);for(var C=[],_=0;_<y.length;_++)C.push(m(y[_],_));return C}var k=Object.keys||function(y){var m=[];for(var C in y)Object.prototype.hasOwnProperty.call(y,C)&&m.push(C);return m}},{}],212:[function(H,J,I){"use strict";I.decode=I.parse=H("./decode"),I.encode=I.stringify=H("./encode")},{"./decode":210,"./encode":211}],213:[function(H,J,I){J.exports=H("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":214}],214:[function(H,J,I){"use strict";var N=H("babel-runtime/core-js/object/create"),g=y(N),S=H("babel-runtime/core-js/object/keys"),k=y(S);function y(d){return d&&d.__esModule?d:{default:d}}var m=H("process-nextick-args"),C=k.default||function(d){var u=[];for(var s in d)u.push(s);return u};J.exports=n;var _=(0,g.default)(H("core-util-is"));_.inherits=H("inherits");var e=H("./_stream_readable"),f=H("./_stream_writable");_.inherits(n,e);for(var r=C(f.prototype),c=0;c<r.length;c++){var i=r[c];n.prototype[i]||(n.prototype[i]=f.prototype[i])}function n(d){if(!(this instanceof n))return new n(d);e.call(this,d),f.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",o)}Object.defineProperty(n.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function o(){if(this.allowHalfOpen||this._writableState.ended)return;m.nextTick(h,this)}function h(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,J,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}}J.exports=m;var k=H("./_stream_transform"),y=(0,g.default)(H("core-util-is"));y.inherits=H("inherits"),y.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,J,I){(function(N,g){"use strict";var S=H("babel-runtime/core-js/object/get-prototype-of"),k=C(S),y=H("babel-runtime/core-js/object/create"),m=C(y);function C(ne){return ne&&ne.__esModule?ne:{default:ne}}var _=H("process-nextick-args");J.exports=x;var e=H("isarray"),f;x.ReadableState=v;var r=H("events").EventEmitter,c=function(ce,Ae){return ce.listeners(Ae).length},i=H("./internal/streams/stream"),n=H("safe-buffer").Buffer,o=g.Uint8Array||function(){};function h(ne){return n.from(ne)}function d(ne){return n.isBuffer(ne)||ne instanceof o}var u=(0,m.default)(H("core-util-is"));u.inherits=H("inherits");var s=H("util"),l=void 0;s&&s.debuglog?l=s.debuglog("stream"):l=function(){};var E=H("./internal/streams/BufferList"),b=H("./internal/streams/destroy"),p;u.inherits(x,i);var L=["error","close","destroy","pause","resume"];function R(ne,ce,Ae){if(typeof ne.prependListener=="function")return ne.prependListener(ce,Ae);!ne._events||!ne._events[ce]?ne.on(ce,Ae):e(ne._events[ce])?ne._events[ce].unshift(Ae):ne._events[ce]=[Ae,ne._events[ce]]}function v(ne,ce){f=f||H("./_stream_duplex"),ne=ne||{};var Ae=ce instanceof f;this.objectMode=!!ne.objectMode,Ae&&(this.objectMode=this.objectMode||!!ne.readableObjectMode);var oe=ne.highWaterMark,q=ne.readableHighWaterMark,$=this.objectMode?16:16*1024;oe||oe===0?this.highWaterMark=oe:Ae&&(q||q===0)?this.highWaterMark=q:this.highWaterMark=$,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=ne.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,ne.encoding&&(p||(p=H("string_decoder/").StringDecoder),this.decoder=new p(ne.encoding),this.encoding=ne.encoding)}function x(ne){if(f=f||H("./_stream_duplex"),!(this instanceof x))return new x(ne);this._readableState=new v(ne,this),this.readable=!0,ne&&(typeof ne.read=="function"&&(this._read=ne.read),typeof ne.destroy=="function"&&(this._destroy=ne.destroy)),i.call(this)}Object.defineProperty(x.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(ce){if(!this._readableState)return;this._readableState.destroyed=ce}}),x.prototype.destroy=b.destroy,x.prototype._undestroy=b.undestroy,x.prototype._destroy=function(ne,ce){this.push(null),ce(ne)},x.prototype.push=function(ne,ce){var Ae=this._readableState,oe;return Ae.objectMode?oe=!0:typeof ne=="string"&&(ce=ce||Ae.defaultEncoding,ce!==Ae.encoding&&(ne=n.from(ne,ce),ce=""),oe=!0),w(this,ne,ce,!1,oe)},x.prototype.unshift=function(ne){return w(this,ne,null,!0,!1)};function w(ne,ce,Ae,oe,q){var $=ne._readableState;if(ce===null)$.reading=!1,O(ne,$);else{var X;q||(X=F($,ce)),X?ne.emit("error",X):$.objectMode||ce&&ce.length>0?(typeof ce!="string"&&!$.objectMode&&(0,k.default)(ce)!==n.prototype&&(ce=h(ce)),oe?$.endEmitted?ne.emit("error",new Error("stream.unshift() after end event")):T(ne,$,ce,!0):$.ended?ne.emit("error",new Error("stream.push() after EOF")):($.reading=!1,$.decoder&&!Ae?(ce=$.decoder.write(ce),$.objectMode||ce.length!==0?T(ne,$,ce,!1):D(ne,$)):T(ne,$,ce,!1))):oe||($.reading=!1)}return P($)}function T(ne,ce,Ae,oe){ce.flowing&&ce.length===0&&!ce.sync?(ne.emit("data",Ae),ne.read(0)):(ce.length+=ce.objectMode?1:Ae.length,oe?ce.buffer.unshift(Ae):ce.buffer.push(Ae),ce.needReadable&&B(ne)),D(ne,ce)}function F(ne,ce){var Ae;return!d(ce)&&typeof ce!="string"&&ce!==void 0&&!ne.objectMode&&(Ae=new TypeError("Invalid non-string/buffer chunk")),Ae}function P(ne){return!ne.ended&&(ne.needReadable||ne.length<ne.highWaterMark||ne.length===0)}x.prototype.isPaused=function(){return this._readableState.flowing===!1},x.prototype.setEncoding=function(ne){return p||(p=H("string_decoder/").StringDecoder),this._readableState.decoder=new p(ne),this._readableState.encoding=ne,this};var A=8388608;function z(ne){return ne>=A?ne=A:(ne--,ne|=ne>>>1,ne|=ne>>>2,ne|=ne>>>4,ne|=ne>>>8,ne|=ne>>>16,ne++),ne}function K(ne,ce){return ne<=0||ce.length===0&&ce.ended?0:ce.objectMode?1:ne!==ne?ce.flowing&&ce.length?ce.buffer.head.data.length:ce.length:(ne>ce.highWaterMark&&(ce.highWaterMark=z(ne)),ne<=ce.length?ne:ce.ended?ce.length:(ce.needReadable=!0,0))}x.prototype.read=function(ne){l("read",ne),ne=parseInt(ne,10);var ce=this._readableState,Ae=ne;if(ne!==0&&(ce.emittedReadable=!1),ne===0&&ce.needReadable&&(ce.length>=ce.highWaterMark||ce.ended))return l("read: emitReadable",ce.length,ce.ended),ce.length===0&&ce.ended?ue(this):B(this),null;if(ne=K(ne,ce),ne===0&&ce.ended)return ce.length===0&&ue(this),null;var oe=ce.needReadable;l("need readable",oe),(ce.length===0||ce.length-ne<ce.highWaterMark)&&(oe=!0,l("length less than watermark",oe)),ce.ended||ce.reading?(oe=!1,l("reading or ended",oe)):oe&&(l("do read"),ce.reading=!0,ce.sync=!0,ce.length===0&&(ce.needReadable=!0),this._read(ce.highWaterMark),ce.sync=!1,ce.reading||(ne=K(Ae,ce)));var q;return ne>0?q=he(ne,ce):q=null,q===null?(ce.needReadable=!0,ne=0):ce.length-=ne,ce.length===0&&(ce.ended||(ce.needReadable=!0),Ae!==ne&&ce.ended&&ue(this)),q!==null&&this.emit("data",q),q};function O(ne,ce){if(ce.ended)return;if(ce.decoder){var Ae=ce.decoder.end();Ae&&Ae.length&&(ce.buffer.push(Ae),ce.length+=ce.objectMode?1:Ae.length)}ce.ended=!0,B(ne)}function B(ne){var ce=ne._readableState;ce.needReadable=!1,ce.emittedReadable||(l("emitReadable",ce.flowing),ce.emittedReadable=!0,ce.sync?_.nextTick(U,ne):U(ne))}function U(ne){l("emit readable"),ne.emit("readable"),be(ne)}function D(ne,ce){ce.readingMore||(ce.readingMore=!0,_.nextTick(W,ne,ce))}function W(ne,ce){for(var Ae=ce.length;!ce.reading&&!ce.flowing&&!ce.ended&&ce.length<ce.highWaterMark&&!(l("maybeReadMore read 0"),ne.read(0),Ae===ce.length);)Ae=ce.length;ce.readingMore=!1}x.prototype._read=function(ne){this.emit("error",new Error("_read() is not implemented"))},x.prototype.pipe=function(ne,ce){var Ae=this,oe=this._readableState;switch(oe.pipesCount){case 0:oe.pipes=ne;break;case 1:oe.pipes=[oe.pipes,ne];break;default:oe.pipes.push(ne);break}oe.pipesCount+=1,l("pipe count=%d opts=%j",oe.pipesCount,ce);var q=(!ce||ce.end!==!1)&&ne!==N.stdout&&ne!==N.stderr,$=q?de:je;oe.endEmitted?_.nextTick($):Ae.once("end",$),ne.on("unpipe",X);function X(De,nt){l("onunpipe"),De===Ae&&(nt&&nt.hasUnpiped===!1&&(nt.hasUnpiped=!0,Ke()))}function de(){l("onend"),ne.end()}var pe=Q(Ae);ne.on("drain",pe);var xe=!1;function Ke(){l("cleanup"),ne.removeListener("close",it),ne.removeListener("finish",at),ne.removeListener("drain",pe),ne.removeListener("error",et),ne.removeListener("unpipe",X),Ae.removeListener("end",de),Ae.removeListener("end",je),Ae.removeListener("data",tt),xe=!0,oe.awaitDrain&&(!ne._writableState||ne._writableState.needDrain)&&pe()}var qe=!1;Ae.on("data",tt);function tt(De){l("ondata"),qe=!1;var nt=ne.write(De);nt===!1&&!qe&&((oe.pipesCount===1&&oe.pipes===ne||oe.pipesCount>1&&Ce(oe.pipes,ne)!==-1)&&!xe&&(l("false write response, pause",Ae._readableState.awaitDrain),Ae._readableState.awaitDrain++,qe=!0),Ae.pause())}function et(De){l("onerror",De),je(),ne.removeListener("error",et),c(ne,"error")===0&&ne.emit("error",De)}R(ne,"error",et);function it(){ne.removeListener("finish",at),je()}ne.once("close",it);function at(){l("onfinish"),ne.removeListener("close",it),je()}ne.once("finish",at);function je(){l("unpipe"),Ae.unpipe(ne)}return ne.emit("pipe",Ae),oe.flowing||(l("pipe resume"),Ae.resume()),ne};function Q(ne){return function(){var ce=ne._readableState;l("pipeOnDrain",ce.awaitDrain),ce.awaitDrain&&ce.awaitDrain--,ce.awaitDrain===0&&c(ne,"data")&&(ce.flowing=!0,be(ne))}}x.prototype.unpipe=function(ne){var ce=this._readableState,Ae={hasUnpiped:!1};if(ce.pipesCount===0)return this;if(ce.pipesCount===1)return ne&&ne!==ce.pipes?this:(ne||(ne=ce.pipes),ce.pipes=null,ce.pipesCount=0,ce.flowing=!1,ne&&ne.emit("unpipe",this,Ae),this);if(!ne){var oe=ce.pipes,q=ce.pipesCount;ce.pipes=null,ce.pipesCount=0,ce.flowing=!1;for(var $=0;$<q;$++)oe[$].emit("unpipe",this,Ae);return this}var X=Ce(ce.pipes,ne);return X===-1?this:(ce.pipes.splice(X,1),ce.pipesCount-=1,ce.pipesCount===1&&(ce.pipes=ce.pipes[0]),ne.emit("unpipe",this,Ae),this)},x.prototype.on=function(ne,ce){var Ae=i.prototype.on.call(this,ne,ce);if(ne==="data")this._readableState.flowing!==!1&&this.resume();else if(ne==="readable"){var oe=this._readableState;!oe.endEmitted&&!oe.readableListening&&(oe.readableListening=oe.needReadable=!0,oe.emittedReadable=!1,oe.reading?oe.length&&B(this):_.nextTick(re,this))}return Ae},x.prototype.addListener=x.prototype.on;function re(ne){l("readable nexttick read 0"),ne.read(0)}x.prototype.resume=function(){var ne=this._readableState;return ne.flowing||(l("resume"),ne.flowing=!0,ee(this,ne)),this};function ee(ne,ce){ce.resumeScheduled||(ce.resumeScheduled=!0,_.nextTick(ye,ne,ce))}function ye(ne,ce){ce.reading||(l("resume read 0"),ne.read(0)),ce.resumeScheduled=!1,ce.awaitDrain=0,ne.emit("resume"),be(ne),ce.flowing&&!ce.reading&&ne.read(0)}x.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function be(ne){var ce=ne._readableState;for(l("flow",ce.flowing);ce.flowing&&ne.read()!==null;);}x.prototype.wrap=function(ne){var ce=this,Ae=this._readableState,oe=!1;ne.on("end",function(){if(l("wrapped end"),Ae.decoder&&!Ae.ended){var X=Ae.decoder.end();X&&X.length&&ce.push(X)}ce.push(null)}),ne.on("data",function(X){if(l("wrapped data"),Ae.decoder&&(X=Ae.decoder.write(X)),Ae.objectMode&&X==null)return;if(!Ae.objectMode&&(!X||!X.length))return;var de=ce.push(X);de||(oe=!0,ne.pause())});for(var q in ne)this[q]===void 0&&typeof ne[q]=="function"&&(this[q]=function(X){return function(){return ne[X].apply(ne,arguments)}}(q));for(var $=0;$<L.length;$++)ne.on(L[$],this.emit.bind(this,L[$]));return this._read=function(X){l("wrapped _read",X),oe&&(oe=!1,ne.resume())},this},Object.defineProperty(x.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),x._fromList=he;function he(ne,ce){if(ce.length===0)return null;var Ae;return ce.objectMode?Ae=ce.buffer.shift():!ne||ne>=ce.length?(ce.decoder?Ae=ce.buffer.join(""):ce.buffer.length===1?Ae=ce.buffer.head.data:Ae=ce.buffer.concat(ce.length),ce.buffer.clear()):Ae=Ie(ne,ce.buffer,ce.decoder),Ae}function Ie(ne,ce,Ae){var oe;return ne<ce.head.data.length?(oe=ce.head.data.slice(0,ne),ce.head.data=ce.head.data.slice(ne)):ne===ce.head.data.length?oe=ce.shift():oe=Ae?Se(ne,ce):fe(ne,ce),oe}function Se(ne,ce){var Ae=ce.head,oe=1,q=Ae.data;for(ne-=q.length;Ae=Ae.next;){var $=Ae.data,X=ne>$.length?$.length:ne;if(X===$.length?q+=$:q+=$.slice(0,ne),ne-=X,ne===0){X===$.length?(++oe,Ae.next?ce.head=Ae.next:ce.head=ce.tail=null):(ce.head=Ae,Ae.data=$.slice(X));break}++oe}return ce.length-=oe,q}function fe(ne,ce){var Ae=n.allocUnsafe(ne),oe=ce.head,q=1;for(oe.data.copy(Ae),ne-=oe.data.length;oe=oe.next;){var $=oe.data,X=ne>$.length?$.length:ne;if($.copy(Ae,Ae.length-ne,0,X),ne-=X,ne===0){X===$.length?(++q,oe.next?ce.head=oe.next:ce.head=ce.tail=null):(ce.head=oe,oe.data=$.slice(X));break}++q}return ce.length-=q,Ae}function ue(ne){var ce=ne._readableState;if(ce.length>0)throw new Error('"endReadable()" called on non-empty stream');ce.endEmitted||(ce.ended=!0,_.nextTick(ie,ce,ne))}function ie(ne,ce){!ne.endEmitted&&ne.length===0&&(ne.endEmitted=!0,ce.readable=!1,ce.emit("end"))}function Ce(ne,ce){for(var Ae=0,oe=ne.length;Ae<oe;Ae++)if(ne[Ae]===ce)return Ae;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,J,I){"use strict";var N=H("babel-runtime/core-js/object/create"),g=S(N);function S(f){return f&&f.__esModule?f:{default:f}}J.exports=C;var k=H("./_stream_duplex"),y=(0,g.default)(H("core-util-is"));y.inherits=H("inherits"),y.inherits(C,k);function m(f,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(f);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function C(f){if(!(this instanceof C))return new C(f);k.call(this,f),this._transformState={afterTransform:m.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,f&&(typeof f.transform=="function"&&(this._transform=f.transform),typeof f.flush=="function"&&(this._flush=f.flush)),this.on("prefinish",_)}function _(){var f=this;typeof this._flush=="function"?this._flush(function(r,c){e(f,r,c)}):e(this,null,null)}C.prototype.push=function(f,r){return this._transformState.needTransform=!1,k.prototype.push.call(this,f,r)},C.prototype._transform=function(f,r,c){throw new Error("_transform() is not implemented")},C.prototype._write=function(f,r,c){var i=this._transformState;if(i.writecb=c,i.writechunk=f,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(f){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(f,r){var c=this;k.prototype._destroy.call(this,f,function(i){r(i),c.emit("close")})};function e(f,r,c){if(r)return f.emit("error",r);if(c!=null&&f.push(c),f._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(f._transformState.transforming)throw new Error("Calling transform done when still transforming");return f.push(null)}},{"./_stream_duplex":214,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],218:[function(H,J,I){(function(N,g){"use strict";var S=H("babel-runtime/core-js/object/define-property"),k=i(S),y=H("babel-runtime/core-js/symbol/has-instance"),m=i(y),C=H("babel-runtime/core-js/symbol"),_=i(C),e=H("babel-runtime/core-js/object/create"),f=i(e),r=H("babel-runtime/core-js/set-immediate"),c=i(r);function i(fe){return fe&&fe.__esModule?fe:{default:fe}}var n=H("process-nextick-args");J.exports=F;function o(fe,ue,ie){this.chunk=fe,this.encoding=ue,this.callback=ie,this.next=null}function h(fe){var ue=this;this.next=null,this.entry=null,this.finish=function(){Se(ue,fe)}}var d=!N.browser&&["v0.10","v0.9."].indexOf(N.version.slice(0,5))>-1?c.default:n.nextTick,u;F.WritableState=w;var s=(0,f.default)(H("core-util-is"));s.inherits=H("inherits");var l={deprecate:H("util-deprecate")},E=H("./internal/streams/stream"),b=H("safe-buffer").Buffer,p=g.Uint8Array||function(){};function L(fe){return b.from(fe)}function R(fe){return b.isBuffer(fe)||fe instanceof p}var v=H("./internal/streams/destroy");s.inherits(F,E);function x(){}function w(fe,ue){u=u||H("./_stream_duplex"),fe=fe||{};var ie=ue instanceof u;this.objectMode=!!fe.objectMode,ie&&(this.objectMode=this.objectMode||!!fe.writableObjectMode);var Ce=fe.highWaterMark,ne=fe.writableHighWaterMark,ce=this.objectMode?16:16*1024;Ce||Ce===0?this.highWaterMark=Ce:ie&&(ne||ne===0)?this.highWaterMark=ne:this.highWaterMark=ce,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 Ae=fe.decodeStrings===!1;this.decodeStrings=!Ae,this.defaultEncoding=fe.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(oe){D(ue,oe)},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 h(this)}w.prototype.getBuffer=function(){for(var ue=this.bufferedRequest,ie=[];ue;)ie.push(ue),ue=ue.next;return ie},function(){try{Object.defineProperty(w.prototype,"buffer",{get:l.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(fe){}}();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(ue){return T.call(this,ue)?!0:this!==F?!1:ue&&ue._writableState instanceof w}})):T=function(ue){return ue instanceof this};function F(fe){if(u=u||H("./_stream_duplex"),!T.call(F,this)&&!(this instanceof u))return new F(fe);this._writableState=new w(fe,this),this.writable=!0,fe&&(typeof fe.write=="function"&&(this._write=fe.write),typeof fe.writev=="function"&&(this._writev=fe.writev),typeof fe.destroy=="function"&&(this._destroy=fe.destroy),typeof fe.final=="function"&&(this._final=fe.final)),E.call(this)}F.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function P(fe,ue){var ie=new Error("write after end");fe.emit("error",ie),n.nextTick(ue,ie)}function A(fe,ue,ie,Ce){var ne=!0,ce=!1;return ie===null?ce=new TypeError("May not write null values to stream"):typeof ie!="string"&&ie!==void 0&&!ue.objectMode&&(ce=new TypeError("Invalid non-string/buffer chunk")),ce&&(fe.emit("error",ce),n.nextTick(Ce,ce),ne=!1),ne}F.prototype.write=function(fe,ue,ie){var Ce=this._writableState,ne=!1,ce=!Ce.objectMode&&R(fe);return ce&&!b.isBuffer(fe)&&(fe=L(fe)),typeof ue=="function"&&(ie=ue,ue=null),ce?ue="buffer":ue||(ue=Ce.defaultEncoding),typeof ie!="function"&&(ie=x),Ce.ended?P(this,ie):(ce||A(this,Ce,fe,ie))&&(Ce.pendingcb++,ne=K(this,Ce,ce,fe,ue,ie)),ne},F.prototype.cork=function(){var fe=this._writableState;fe.corked++},F.prototype.uncork=function(){var fe=this._writableState;fe.corked&&(fe.corked--,!fe.writing&&!fe.corked&&!fe.finished&&!fe.bufferProcessing&&fe.bufferedRequest&&re(this,fe))},F.prototype.setDefaultEncoding=function(ue){if(typeof ue=="string"&&(ue=ue.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((ue+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+ue);return this._writableState.defaultEncoding=ue,this};function z(fe,ue,ie){return!fe.objectMode&&fe.decodeStrings!==!1&&typeof ue=="string"&&(ue=b.from(ue,ie)),ue}Object.defineProperty(F.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function K(fe,ue,ie,Ce,ne,ce){if(!ie){var Ae=z(ue,Ce,ne);Ce!==Ae&&(ie=!0,ne="buffer",Ce=Ae)}var oe=ue.objectMode?1:Ce.length;ue.length+=oe;var q=ue.length<ue.highWaterMark;if(q||(ue.needDrain=!0),ue.writing||ue.corked){var $=ue.lastBufferedRequest;ue.lastBufferedRequest={chunk:Ce,encoding:ne,isBuf:ie,callback:ce,next:null},$?$.next=ue.lastBufferedRequest:ue.bufferedRequest=ue.lastBufferedRequest,ue.bufferedRequestCount+=1}else O(fe,ue,!1,oe,Ce,ne,ce);return q}function O(fe,ue,ie,Ce,ne,ce,Ae){ue.writelen=Ce,ue.writecb=Ae,ue.writing=!0,ue.sync=!0,ie?fe._writev(ne,ue.onwrite):fe._write(ne,ce,ue.onwrite),ue.sync=!1}function B(fe,ue,ie,Ce,ne){--ue.pendingcb,ie?(n.nextTick(ne,Ce),n.nextTick(he,fe,ue),fe._writableState.errorEmitted=!0,fe.emit("error",Ce)):(ne(Ce),fe._writableState.errorEmitted=!0,fe.emit("error",Ce),he(fe,ue))}function U(fe){fe.writing=!1,fe.writecb=null,fe.length-=fe.writelen,fe.writelen=0}function D(fe,ue){var ie=fe._writableState,Ce=ie.sync,ne=ie.writecb;if(U(ie),ue)B(fe,ie,Ce,ue,ne);else{var ce=ee(ie);!ce&&!ie.corked&&!ie.bufferProcessing&&ie.bufferedRequest&&re(fe,ie),Ce?d(W,fe,ie,ce,ne):W(fe,ie,ce,ne)}}function W(fe,ue,ie,Ce){ie||Q(fe,ue),ue.pendingcb--,Ce(),he(fe,ue)}function Q(fe,ue){ue.length===0&&ue.needDrain&&(ue.needDrain=!1,fe.emit("drain"))}function re(fe,ue){ue.bufferProcessing=!0;var ie=ue.bufferedRequest;if(fe._writev&&ie&&ie.next){var Ce=ue.bufferedRequestCount,ne=new Array(Ce),ce=ue.corkedRequestsFree;ce.entry=ie;for(var Ae=0,oe=!0;ie;)ne[Ae]=ie,ie.isBuf||(oe=!1),ie=ie.next,Ae+=1;ne.allBuffers=oe,O(fe,ue,!0,ue.length,ne,"",ce.finish),ue.pendingcb++,ue.lastBufferedRequest=null,ce.next?(ue.corkedRequestsFree=ce.next,ce.next=null):ue.corkedRequestsFree=new h(ue),ue.bufferedRequestCount=0}else{for(;ie;){var q=ie.chunk,$=ie.encoding,X=ie.callback,de=ue.objectMode?1:q.length;if(O(fe,ue,!1,de,q,$,X),ie=ie.next,ue.bufferedRequestCount--,ue.writing)break}ie===null&&(ue.lastBufferedRequest=null)}ue.bufferedRequest=ie,ue.bufferProcessing=!1}F.prototype._write=function(fe,ue,ie){ie(new Error("_write() is not implemented"))},F.prototype._writev=null,F.prototype.end=function(fe,ue,ie){var Ce=this._writableState;typeof fe=="function"?(ie=fe,fe=null,ue=null):typeof ue=="function"&&(ie=ue,ue=null),fe!=null&&this.write(fe,ue),Ce.corked&&(Ce.corked=1,this.uncork()),!Ce.ending&&!Ce.finished&&Ie(this,Ce,ie)};function ee(fe){return fe.ending&&fe.length===0&&fe.bufferedRequest===null&&!fe.finished&&!fe.writing}function ye(fe,ue){fe._final(function(ie){ue.pendingcb--,ie&&fe.emit("error",ie),ue.prefinished=!0,fe.emit("prefinish"),he(fe,ue)})}function be(fe,ue){!ue.prefinished&&!ue.finalCalled&&(typeof fe._final=="function"?(ue.pendingcb++,ue.finalCalled=!0,n.nextTick(ye,fe,ue)):(ue.prefinished=!0,fe.emit("prefinish")))}function he(fe,ue){var ie=ee(ue);return ie&&(be(fe,ue),ue.pendingcb===0&&(ue.finished=!0,fe.emit("finish"))),ie}function Ie(fe,ue,ie){ue.ending=!0,he(fe,ue),ie&&(ue.finished?n.nextTick(ie):fe.once("finish",ie)),ue.ended=!0,fe.writable=!1}function Se(fe,ue,ie){var Ce=fe.entry;for(fe.entry=null;Ce;){var ne=Ce.callback;ue.pendingcb--,ne(ie),Ce=Ce.next}ue.corkedRequestsFree?ue.corkedRequestsFree.next=fe:ue.corkedRequestsFree=fe}Object.defineProperty(F.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(ue){if(!this._writableState)return;this._writableState.destroyed=ue}}),F.prototype.destroy=v.destroy,F.prototype._undestroy=v.undestroy,F.prototype._destroy=function(fe,ue){this.end(),ue(fe)}}).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,J,I){"use strict";function N(y,m){if(!(y instanceof m))throw new TypeError("Cannot call a class as a function")}var g=H("safe-buffer").Buffer,S=H("util");function k(y,m,C){y.copy(m,C)}J.exports=function(){function y(){N(this,y),this.head=null,this.tail=null,this.length=0}return y.prototype.push=function(C){var _={data:C,next:null};this.length>0?this.tail.next=_:this.head=_,this.tail=_,++this.length},y.prototype.unshift=function(C){var _={data:C,next:this.head};this.length===0&&(this.tail=_),this.head=_,++this.length},y.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},y.prototype.clear=function(){this.head=this.tail=null,this.length=0},y.prototype.join=function(C){if(this.length===0)return"";for(var _=this.head,e=""+_.data;_=_.next;)e+=C+_.data;return e},y.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,f=0;e;)k(e.data,_,f),f+=e.data.length,e=e.next;return _},y}(),S&&S.inspect&&S.inspect.custom&&(J.exports.prototype[S.inspect.custom]=function(){var y=S.inspect({length:this.length});return this.constructor.name+" "+y})},{"safe-buffer":228,util:71}],220:[function(H,J,I){"use strict";var N=H("process-nextick-args");function g(y,m){var C=this,_=this._readableState&&this._readableState.destroyed,e=this._writableState&&this._writableState.destroyed;return _||e?(m?m(y):y&&(!this._writableState||!this._writableState.errorEmitted)&&N.nextTick(k,this,y),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(y||null,function(f){!m&&f?(N.nextTick(k,C,f),C._writableState&&(C._writableState.errorEmitted=!0)):m&&m(f)}),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(y,m){y.emit("error",m)}J.exports={destroy:g,undestroy:S}},{"process-nextick-args":207}],221:[function(H,J,I){"use strict";J.exports=H("events").EventEmitter},{events:192}],222:[function(H,J,I){J.exports=H("./readable").PassThrough},{"./readable":223}],223:[function(H,J,I){I=J.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,J,I){J.exports=H("./readable").Transform},{"./readable":223}],225:[function(H,J,I){J.exports=H("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(H,J,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,J.exports=H("./runtime"),g)N.regeneratorRuntime=S;else try{delete N.regeneratorRuntime}catch(k){N.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(H,J,I){!function(N){"use strict";var g=Object.prototype,S=g.hasOwnProperty,k,y=typeof Symbol=="function"?Symbol:{},m=y.iterator||"@@iterator",C=y.asyncIterator||"@@asyncIterator",_=y.toStringTag||"@@toStringTag",e=typeof J=="object",f=N.regeneratorRuntime;if(f){e&&(J.exports=f);return}f=N.regeneratorRuntime=e?J.exports:{};function r(K,O,B,U){var D=O&&O.prototype instanceof u?O:u,W=Object.create(D.prototype),Q=new P(U||[]);return W._invoke=x(K,B,Q),W}f.wrap=r;function c(K,O,B){try{return{type:"normal",arg:K.call(O,B)}}catch(U){return{type:"throw",arg:U}}}var i="suspendedStart",n="suspendedYield",o="executing",h="completed",d={};function u(){}function s(){}function l(){}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 L=l.prototype=u.prototype=Object.create(E);s.prototype=L.constructor=l,l.constructor=s,l[_]=s.displayName="GeneratorFunction";function R(K){["next","throw","return"].forEach(function(O){K[O]=function(B){return this._invoke(O,B)}})}f.isGeneratorFunction=function(K){var O=typeof K=="function"&&K.constructor;return O?O===s||(O.displayName||O.name)==="GeneratorFunction":!1},f.mark=function(K){return Object.setPrototypeOf?Object.setPrototypeOf(K,l):(K.__proto__=l,_ in K||(K[_]="GeneratorFunction")),K.prototype=Object.create(L),K},f.awrap=function(K){return{__await:K}};function v(K){function O(D,W,Q,re){var ee=c(K[D],K,W);if(ee.type==="throw")re(ee.arg);else{var ye=ee.arg,be=ye.value;return be&&typeof be=="object"&&S.call(be,"__await")?Promise.resolve(be.__await).then(function(he){O("next",he,Q,re)},function(he){O("throw",he,Q,re)}):Promise.resolve(be).then(function(he){ye.value=he,Q(ye)},re)}}var B;function U(D,W){function Q(){return new Promise(function(re,ee){O(D,W,re,ee)})}return B=B?B.then(Q,Q):Q()}this._invoke=U}R(v.prototype),v.prototype[C]=function(){return this},f.AsyncIterator=v,f.async=function(K,O,B,U){var D=new v(r(K,O,B,U));return f.isGeneratorFunction(O)?D:D.next().then(function(W){return W.done?W.value:D.next()})};function x(K,O,B){var U=i;return function(W,Q){if(U===o)throw new Error("Generator is already running");if(U===h){if(W==="throw")throw Q;return z()}for(B.method=W,B.arg=Q;;){var re=B.delegate;if(re){var ee=w(re,B);if(ee){if(ee===d)continue;return ee}}if(B.method==="next")B.sent=B._sent=B.arg;else if(B.method==="throw"){if(U===i)throw U=h,B.arg;B.dispatchException(B.arg)}else B.method==="return"&&B.abrupt("return",B.arg);U=o;var ye=c(K,O,B);if(ye.type==="normal"){if(U=B.done?h:n,ye.arg===d)continue;return{value:ye.arg,done:B.done}}else ye.type==="throw"&&(U=h,B.method="throw",B.arg=ye.arg)}}}function w(K,O){var B=K.iterator[O.method];if(B===k){if(O.delegate=null,O.method==="throw"){if(K.iterator.return&&(O.method="return",O.arg=k,w(K,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,K.iterator,O.arg);if(U.type==="throw")return O.method="throw",O.arg=U.arg,O.delegate=null,d;var D=U.arg;if(!D)return O.method="throw",O.arg=new TypeError("iterator result is not an object"),O.delegate=null,d;if(D.done)O[K.resultName]=D.value,O.next=K.nextLoc,O.method!=="return"&&(O.method="next",O.arg=k);else return D;return O.delegate=null,d}R(L),L[_]="Generator",L[m]=function(){return this},L.toString=function(){return"[object Generator]"};function T(K){var O={tryLoc:K[0]};1 in K&&(O.catchLoc=K[1]),2 in K&&(O.finallyLoc=K[2],O.afterLoc=K[3]),this.tryEntries.push(O)}function F(K){var O=K.completion||{};O.type="normal",delete O.arg,K.completion=O}function P(K){this.tryEntries=[{tryLoc:"root"}],K.forEach(T,this),this.reset(!0)}f.keys=function(K){var O=[];for(var B in K)O.push(B);return O.reverse(),function U(){for(;O.length;){var D=O.pop();if(D in K)return U.value=D,U.done=!1,U}return U.done=!0,U}};function A(K){if(K){var O=K[m];if(O)return O.call(K);if(typeof K.next=="function")return K;if(!isNaN(K.length)){var B=-1,U=function D(){for(;++B<K.length;)if(S.call(K,B))return D.value=K[B],D.done=!1,D;return D.value=k,D.done=!0,D};return U.next=U}}return{next:z}}f.values=A;function z(){return{value:k,done:!0}}P.prototype={constructor:P,reset:function(K){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),!K)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 K=this.tryEntries[0],O=K.completion;if(O.type==="throw")throw O.arg;return this.rval},dispatchException:function(K){if(this.done)throw K;var O=this;function B(ee,ye){return W.type="throw",W.arg=K,O.next=ee,ye&&(O.method="next",O.arg=k),!!ye}for(var U=this.tryEntries.length-1;U>=0;--U){var D=this.tryEntries[U],W=D.completion;if(D.tryLoc==="root")return B("end");if(D.tryLoc<=this.prev){var Q=S.call(D,"catchLoc"),re=S.call(D,"finallyLoc");if(Q&&re){if(this.prev<D.catchLoc)return B(D.catchLoc,!0);if(this.prev<D.finallyLoc)return B(D.finallyLoc)}else if(Q){if(this.prev<D.catchLoc)return B(D.catchLoc,!0)}else if(re){if(this.prev<D.finallyLoc)return B(D.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(K,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 D=U;break}}D&&(K==="break"||K==="continue")&&D.tryLoc<=O&&O<=D.finallyLoc&&(D=null);var W=D?D.completion:{};return W.type=K,W.arg=O,D?(this.method="next",this.next=D.finallyLoc,d):this.complete(W)},complete:function(K,O){if(K.type==="throw")throw K.arg;return K.type==="break"||K.type==="continue"?this.next=K.arg:K.type==="return"?(this.rval=this.arg=K.arg,this.method="return",this.next="end"):K.type==="normal"&&O&&(this.next=O),d},finish:function(K){for(var O=this.tryEntries.length-1;O>=0;--O){var B=this.tryEntries[O];if(B.finallyLoc===K)return this.complete(B.completion,B.afterLoc),F(B),d}},catch:function(K){for(var O=this.tryEntries.length-1;O>=0;--O){var B=this.tryEntries[O];if(B.tryLoc===K){var U=B.completion;if(U.type==="throw"){var D=U.arg;F(B)}return D}}throw new Error("illegal catch attempt")},delegateYield:function(K,O,B){return this.delegate={iterator:A(K),resultName:O,nextLoc:B},this.method==="next"&&(this.arg=k),d}}}(function(){return this}()||Function("return this")())},{}],228:[function(H,J,I){var N=H("buffer"),g=N.Buffer;function S(y,m){for(var C in y)m[C]=y[C]}g.from&&g.alloc&&g.allocUnsafe&&g.allocUnsafeSlow?J.exports=N:(S(N,I),I.Buffer=k);function k(y,m,C){return g(y,m,C)}S(g,k),k.from=function(y,m,C){if(typeof y=="number")throw new TypeError("Argument must not be a number");return g(y,m,C)},k.alloc=function(y,m,C){if(typeof y!="number")throw new TypeError("Argument must be a number");var _=g(y);return m!==void 0?typeof C=="string"?_.fill(m,C):_.fill(m):_.fill(0),_},k.allocUnsafe=function(y){if(typeof y!="number")throw new TypeError("Argument must be a number");return g(y)},k.allocUnsafeSlow=function(y){if(typeof y!="number")throw new TypeError("Argument must be a number");return N.SlowBuffer(y)}},{buffer:73}],229:[function(H,J,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"),y=n(k),m=H("babel-runtime/helpers/typeof"),C=n(m),_=H("babel-runtime/core-js/object/define-property"),e=n(_),f=H("babel-runtime/core-js/object/keys"),r=n(f),c=H("babel-runtime/core-js/object/create"),i=n(c);function n(o){return o&&o.__esModule?o:{default:o}}(function(o){o.parser=function($,X){return new d($,X)},o.SAXParser=d,o.SAXStream=L,o.createStream=p,o.MAX_BUFFER_LENGTH=64*1024;var h=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];o.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function d($,X){if(!(this instanceof d))return new d($,X);var de=this;s(de),de.q=de.c="",de.bufferCheckPosition=o.MAX_BUFFER_LENGTH,de.opt=X||{},de.opt.lowercase=de.opt.lowercase||de.opt.lowercasetags,de.looseCase=de.opt.lowercase?"toLowerCase":"toUpperCase",de.tags=[],de.closed=de.closedRoot=de.sawRoot=!1,de.tag=de.error=null,de.strict=!!$,de.noscript=!!($||de.opt.noscript),de.state=W.BEGIN,de.strictEntities=de.opt.strictEntities,de.ENTITIES=de.strictEntities?(0,i.default)(o.XML_ENTITIES):(0,i.default)(o.ENTITIES),de.attribList=[],de.opt.xmlns&&(de.ns=(0,i.default)(T)),de.trackPosition=de.opt.position!==!1,de.trackPosition&&(de.position=de.line=de.column=0),re(de,"onready")}i.default||(Object.create=function($){function X(){}X.prototype=$;var de=new X;return de}),r.default||(Object.keys=function($){var X=[];for(var de in $)$.hasOwnProperty(de)&&X.push(de);return X});function u($){for(var X=Math.max(o.MAX_BUFFER_LENGTH,10),de=0,pe=0,xe=h.length;pe<xe;pe++){var Ke=$[h[pe]].length;if(Ke>X)switch(h[pe]){case"textNode":ye($);break;case"cdata":ee($,"oncdata",$.cdata),$.cdata="";break;case"script":ee($,"onscript",$.script),$.script="";break;default:he($,"Max buffer length exceeded: "+h[pe])}de=Math.max(de,Ke)}var qe=o.MAX_BUFFER_LENGTH-de;$.bufferCheckPosition=qe+$.position}function s($){for(var X=0,de=h.length;X<de;X++)$[h[X]]=""}function l($){ye($),$.cdata!==""&&(ee($,"oncdata",$.cdata),$.cdata=""),$.script!==""&&(ee($,"onscript",$.script),$.script="")}d.prototype={end:function(){Ie(this)},write:q,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){l(this)}};var E;try{E=H("stream").Stream}catch($){E=function(){}}var b=o.EVENTS.filter(function($){return $!=="error"&&$!=="end"});function p($,X){return new L($,X)}function L($,X){if(!(this instanceof L))return new L($,X);E.apply(this),this._parser=new d($,X),this.writable=!0,this.readable=!0;var de=this;this._parser.onend=function(){de.emit("end")},this._parser.onerror=function(pe){de.emit("error",pe),de._parser.error=null},this._decoder=null,b.forEach(function(pe){(0,e.default)(de,"on"+pe,{get:function(){return de._parser["on"+pe]},set:function(Ke){if(!Ke)return de.removeAllListeners(pe),de._parser["on"+pe]=Ke,Ke;de.on(pe,Ke)},enumerable:!0,configurable:!1})})}L.prototype=(0,i.default)(E.prototype,{constructor:{value:L}}),L.prototype.write=function($){if(typeof N=="function"&&typeof N.isBuffer=="function"&&N.isBuffer($)){if(!this._decoder){var X=H("string_decoder").StringDecoder;this._decoder=new X("utf8")}$=this._decoder.write($)}return this._parser.write($.toString()),this.emit("data",$),!0},L.prototype.end=function($){return $&&$.length&&this.write($),this._parser.end(),!0},L.prototype.on=function($,X){var de=this;return!de._parser["on"+$]&&b.indexOf($)!==-1&&(de._parser["on"+$]=function(){var pe=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);pe.splice(0,0,$),de.emit.apply(de,pe)}),E.prototype.on.call(de,$,X)};var R="[CDATA[",v="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]/,z=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function K($){return $===" "||$===`
`||$==="\r"||$===" "}function O($){return $==='"'||$==="'"}function B($){return $===">"||K($)}function U($,X){return $.test(X)}function D($,X){return!U($,X)}var W=0;o.STATE={BEGIN:W++,BEGIN_WHITESPACE:W++,TEXT:W++,TEXT_ENTITY:W++,OPEN_WAKA:W++,SGML_DECL:W++,SGML_DECL_QUOTED:W++,DOCTYPE:W++,DOCTYPE_QUOTED:W++,DOCTYPE_DTD:W++,DOCTYPE_DTD_QUOTED:W++,COMMENT_STARTING:W++,COMMENT:W++,COMMENT_ENDING:W++,COMMENT_ENDED:W++,CDATA:W++,CDATA_ENDING:W++,CDATA_ENDING_2:W++,PROC_INST:W++,PROC_INST_BODY:W++,PROC_INST_ENDING:W++,OPEN_TAG:W++,OPEN_TAG_SLASH:W++,ATTRIB:W++,ATTRIB_NAME:W++,ATTRIB_NAME_SAW_WHITE:W++,ATTRIB_VALUE:W++,ATTRIB_VALUE_QUOTED:W++,ATTRIB_VALUE_CLOSED:W++,ATTRIB_VALUE_UNQUOTED:W++,ATTRIB_VALUE_ENTITY_Q:W++,ATTRIB_VALUE_ENTITY_U:W++,CLOSE_TAG:W++,CLOSE_TAG_SAW_WHITE:W++,SCRIPT:W++,SCRIPT_ENDING:W++},o.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},o.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},(0,r.default)(o.ENTITIES).forEach(function($){var X=o.ENTITIES[$],de=typeof X=="number"?String.fromCharCode(X):X;o.ENTITIES[$]=de});for(var Q in o.STATE)o.STATE[o.STATE[Q]]=Q;W=o.STATE;function re($,X,de){$[X]&&$[X](de)}function ee($,X,de){$.textNode&&ye($),re($,X,de)}function ye($){$.textNode=be($.opt,$.textNode),$.textNode&&re($,"ontext",$.textNode),$.textNode=""}function be($,X){return $.trim&&(X=X.trim()),$.normalize&&(X=X.replace(/\s+/g," ")),X}function he($,X){return ye($),$.trackPosition&&(X+=`
Line: `+$.line+`
Column: `+$.column+`
Char: `+$.c),X=new Error(X),$.error=X,re($,"onerror",X),$}function Ie($){return $.sawRoot&&!$.closedRoot&&Se($,"Unclosed root tag"),$.state!==W.BEGIN&&$.state!==W.BEGIN_WHITESPACE&&$.state!==W.TEXT&&he($,"Unexpected end"),ye($),$.c="",$.closed=!0,re($,"onend"),d.call($,$.strict,$.opt),$}function Se($,X){if((typeof $=="undefined"?"undefined":(0,C.default)($))!=="object"||!($ instanceof d))throw new Error("bad call to strictFail");$.strict&&he($,X)}function fe($){$.strict||($.tagName=$.tagName[$.looseCase]());var X=$.tags[$.tags.length-1]||$,de=$.tag={name:$.tagName,attributes:{}};$.opt.xmlns&&(de.ns=X.ns),$.attribList.length=0,ee($,"onopentagstart",de)}function ue($,X){var de=$.indexOf(":"),pe=de<0?["",$]:$.split(":"),xe=pe[0],Ke=pe[1];return X&&$==="xmlns"&&(xe="xmlns",Ke=""),{prefix:xe,local:Ke}}function ie($){if($.strict||($.attribName=$.attribName[$.looseCase]()),$.attribList.indexOf($.attribName)!==-1||$.tag.attributes.hasOwnProperty($.attribName)){$.attribName=$.attribValue="";return}if($.opt.xmlns){var X=ue($.attribName,!0),de=X.prefix,pe=X.local;if(de==="xmlns")if(pe==="xml"&&$.attribValue!==x)Se($,"xml: prefix must be bound to "+x+`
Actual: `+$.attribValue);else if(pe==="xmlns"&&$.attribValue!==w)Se($,"xmlns: prefix must be bound to "+w+`
Actual: `+$.attribValue);else{var xe=$.tag,Ke=$.tags[$.tags.length-1]||$;xe.ns===Ke.ns&&(xe.ns=(0,i.default)(Ke.ns)),xe.ns[pe]=$.attribValue}$.attribList.push([$.attribName,$.attribValue])}else $.tag.attributes[$.attribName]=$.attribValue,ee($,"onattribute",{name:$.attribName,value:$.attribValue});$.attribName=$.attribValue=""}function Ce($,X){if($.opt.xmlns){var de=$.tag,pe=ue($.tagName);de.prefix=pe.prefix,de.local=pe.local,de.uri=de.ns[pe.prefix]||"",de.prefix&&!de.uri&&(Se($,"Unbound namespace prefix: "+(0,y.default)($.tagName)),de.uri=pe.prefix);var xe=$.tags[$.tags.length-1]||$;de.ns&&xe.ns!==de.ns&&(0,r.default)(de.ns).forEach(function(Ve){ee($,"onopennamespace",{prefix:Ve,uri:de.ns[Ve]})});for(var Ke=0,qe=$.attribList.length;Ke<qe;Ke++){var tt=$.attribList[Ke],et=tt[0],it=tt[1],at=ue(et,!0),je=at.prefix,De=at.local,nt=je===""?"":de.ns[je]||"",lt={name:et,value:it,prefix:je,local:De,uri:nt};je&&je!=="xmlns"&&!nt&&(Se($,"Unbound namespace prefix: "+(0,y.default)(je)),lt.uri=je),$.tag.attributes[et]=lt,ee($,"onattribute",lt)}$.attribList.length=0}$.tag.isSelfClosing=!!X,$.sawRoot=!0,$.tags.push($.tag),ee($,"onopentag",$.tag),X||(!$.noscript&&$.tagName.toLowerCase()==="script"?$.state=W.SCRIPT:$.state=W.TEXT,$.tag=null,$.tagName=""),$.attribName=$.attribValue="",$.attribList.length=0}function ne($){if(!$.tagName){Se($,"Weird empty close tag."),$.textNode+="</>",$.state=W.TEXT;return}if($.script){if($.tagName!=="script"){$.script+="</"+$.tagName+">",$.tagName="",$.state=W.SCRIPT;return}ee($,"onscript",$.script),$.script=""}var X=$.tags.length,de=$.tagName;$.strict||(de=de[$.looseCase]());for(var pe=de;X--;){var xe=$.tags[X];if(xe.name!==pe)Se($,"Unexpected close tag");else break}if(X<0){Se($,"Unmatched closing tag: "+$.tagName),$.textNode+="</"+$.tagName+">",$.state=W.TEXT;return}$.tagName=de;for(var Ke=$.tags.length;Ke-- >X;){var qe=$.tag=$.tags.pop();$.tagName=$.tag.name,ee($,"onclosetag",$.tagName);var tt={};for(var et in qe.ns)tt[et]=qe.ns[et];var it=$.tags[$.tags.length-1]||$;$.opt.xmlns&&qe.ns!==it.ns&&(0,r.default)(qe.ns).forEach(function(at){var je=qe.ns[at];ee($,"onclosenamespace",{prefix:at,uri:je})})}X===0&&($.closedRoot=!0),$.tagName=$.attribValue=$.attribName="",$.attribList.length=0,$.state=W.TEXT}function ce($){var X=$.entity,de=X.toLowerCase(),pe,xe="";return $.ENTITIES[X]?$.ENTITIES[X]:$.ENTITIES[de]?$.ENTITIES[de]:(X=de,X.charAt(0)==="#"&&(X.charAt(1)==="x"?(X=X.slice(2),pe=parseInt(X,16),xe=pe.toString(16)):(X=X.slice(1),pe=parseInt(X,10),xe=pe.toString(10))),X=X.replace(/^0+/,""),isNaN(pe)||xe.toLowerCase()!==X?(Se($,"Invalid character entity"),"&"+$.entity+";"):(0,S.default)(pe))}function Ae($,X){X==="<"?($.state=W.OPEN_WAKA,$.startTagPosition=$.position):K(X)||(Se($,"Non-whitespace before first tag."),$.textNode=X,$.state=W.TEXT)}function oe($,X){var de="";return X<$.length&&(de=$.charAt(X)),de}function q($){var X=this;if(this.error)throw this.error;if(X.closed)return he(X,"Cannot write after close. Assign an onready handler.");if($===null)return Ie(X);(typeof $=="undefined"?"undefined":(0,C.default)($))==="object"&&($=$.toString());for(var de=0,pe="";!(pe=oe($,de++),X.c=pe,!pe);){X.trackPosition&&(X.position++,pe===`
`?(X.line++,X.column=0):X.column++);switch(X.state){case W.BEGIN:if(X.state=W.BEGIN_WHITESPACE,pe==="\uFEFF")continue;Ae(X,pe);continue;case W.BEGIN_WHITESPACE:Ae(X,pe);continue;case W.TEXT:if(X.sawRoot&&!X.closedRoot){for(var xe=de-1;pe&&pe!=="<"&&pe!=="&";)pe=oe($,de++),pe&&X.trackPosition&&(X.position++,pe===`
`?(X.line++,X.column=0):X.column++);X.textNode+=$.substring(xe,de-1)}pe==="<"&&!(X.sawRoot&&X.closedRoot&&!X.strict)?(X.state=W.OPEN_WAKA,X.startTagPosition=X.position):(!K(pe)&&(!X.sawRoot||X.closedRoot)&&Se(X,"Text data outside of root node."),pe==="&"?X.state=W.TEXT_ENTITY:X.textNode+=pe);continue;case W.SCRIPT:pe==="<"?X.state=W.SCRIPT_ENDING:X.script+=pe;continue;case W.SCRIPT_ENDING:pe==="/"?X.state=W.CLOSE_TAG:(X.script+="<"+pe,X.state=W.SCRIPT);continue;case W.OPEN_WAKA:if(pe==="!")X.state=W.SGML_DECL,X.sgmlDecl="";else if(!K(pe))if(U(F,pe))X.state=W.OPEN_TAG,X.tagName=pe;else if(pe==="/")X.state=W.CLOSE_TAG,X.tagName="";else if(pe==="?")X.state=W.PROC_INST,X.procInstName=X.procInstBody="";else{if(Se(X,"Unencoded <"),X.startTagPosition+1<X.position){var Ke=X.position-X.startTagPosition;pe=new Array(Ke).join(" ")+pe}X.textNode+="<"+pe,X.state=W.TEXT}continue;case W.SGML_DECL:(X.sgmlDecl+pe).toUpperCase()===R?(ee(X,"onopencdata"),X.state=W.CDATA,X.sgmlDecl="",X.cdata=""):X.sgmlDecl+pe==="--"?(X.state=W.COMMENT,X.comment="",X.sgmlDecl=""):(X.sgmlDecl+pe).toUpperCase()===v?(X.state=W.DOCTYPE,(X.doctype||X.sawRoot)&&Se(X,"Inappropriately located doctype declaration"),X.doctype="",X.sgmlDecl=""):pe===">"?(ee(X,"onsgmldeclaration",X.sgmlDecl),X.sgmlDecl="",X.state=W.TEXT):(O(pe)&&(X.state=W.SGML_DECL_QUOTED),X.sgmlDecl+=pe);continue;case W.SGML_DECL_QUOTED:pe===X.q&&(X.state=W.SGML_DECL,X.q=""),X.sgmlDecl+=pe;continue;case W.DOCTYPE:pe===">"?(X.state=W.TEXT,ee(X,"ondoctype",X.doctype),X.doctype=!0):(X.doctype+=pe,pe==="["?X.state=W.DOCTYPE_DTD:O(pe)&&(X.state=W.DOCTYPE_QUOTED,X.q=pe));continue;case W.DOCTYPE_QUOTED:X.doctype+=pe,pe===X.q&&(X.q="",X.state=W.DOCTYPE);continue;case W.DOCTYPE_DTD:X.doctype+=pe,pe==="]"?X.state=W.DOCTYPE:O(pe)&&(X.state=W.DOCTYPE_DTD_QUOTED,X.q=pe);continue;case W.DOCTYPE_DTD_QUOTED:X.doctype+=pe,pe===X.q&&(X.state=W.DOCTYPE_DTD,X.q="");continue;case W.COMMENT:pe==="-"?X.state=W.COMMENT_ENDING:X.comment+=pe;continue;case W.COMMENT_ENDING:pe==="-"?(X.state=W.COMMENT_ENDED,X.comment=be(X.opt,X.comment),X.comment&&ee(X,"oncomment",X.comment),X.comment=""):(X.comment+="-"+pe,X.state=W.COMMENT);continue;case W.COMMENT_ENDED:pe!==">"?(Se(X,"Malformed comment"),X.comment+="--"+pe,X.state=W.COMMENT):X.state=W.TEXT;continue;case W.CDATA:pe==="]"?X.state=W.CDATA_ENDING:X.cdata+=pe;continue;case W.CDATA_ENDING:pe==="]"?X.state=W.CDATA_ENDING_2:(X.cdata+="]"+pe,X.state=W.CDATA);continue;case W.CDATA_ENDING_2:pe===">"?(X.cdata&&ee(X,"oncdata",X.cdata),ee(X,"onclosecdata"),X.cdata="",X.state=W.TEXT):pe==="]"?X.cdata+="]":(X.cdata+="]]"+pe,X.state=W.CDATA);continue;case W.PROC_INST:pe==="?"?X.state=W.PROC_INST_ENDING:K(pe)?X.state=W.PROC_INST_BODY:X.procInstName+=pe;continue;case W.PROC_INST_BODY:if(!X.procInstBody&&K(pe))continue;pe==="?"?X.state=W.PROC_INST_ENDING:X.procInstBody+=pe;continue;case W.PROC_INST_ENDING:pe===">"?(ee(X,"onprocessinginstruction",{name:X.procInstName,body:X.procInstBody}),X.procInstName=X.procInstBody="",X.state=W.TEXT):(X.procInstBody+="?"+pe,X.state=W.PROC_INST_BODY);continue;case W.OPEN_TAG:U(P,pe)?X.tagName+=pe:(fe(X),pe===">"?Ce(X):pe==="/"?X.state=W.OPEN_TAG_SLASH:(K(pe)||Se(X,"Invalid character in tag name"),X.state=W.ATTRIB));continue;case W.OPEN_TAG_SLASH:pe===">"?(Ce(X,!0),ne(X)):(Se(X,"Forward-slash in opening tag not followed by >"),X.state=W.ATTRIB);continue;case W.ATTRIB:if(K(pe))continue;pe===">"?Ce(X):pe==="/"?X.state=W.OPEN_TAG_SLASH:U(F,pe)?(X.attribName=pe,X.attribValue="",X.state=W.ATTRIB_NAME):Se(X,"Invalid attribute name");continue;case W.ATTRIB_NAME:pe==="="?X.state=W.ATTRIB_VALUE:pe===">"?(Se(X,"Attribute without value"),X.attribValue=X.attribName,ie(X),Ce(X)):K(pe)?X.state=W.ATTRIB_NAME_SAW_WHITE:U(P,pe)?X.attribName+=pe:Se(X,"Invalid attribute name");continue;case W.ATTRIB_NAME_SAW_WHITE:if(pe==="=")X.state=W.ATTRIB_VALUE;else{if(K(pe))continue;Se(X,"Attribute without value"),X.tag.attributes[X.attribName]="",X.attribValue="",ee(X,"onattribute",{name:X.attribName,value:""}),X.attribName="",pe===">"?Ce(X):U(F,pe)?(X.attribName=pe,X.state=W.ATTRIB_NAME):(Se(X,"Invalid attribute name"),X.state=W.ATTRIB)}continue;case W.ATTRIB_VALUE:if(K(pe))continue;O(pe)?(X.q=pe,X.state=W.ATTRIB_VALUE_QUOTED):(Se(X,"Unquoted attribute value"),X.state=W.ATTRIB_VALUE_UNQUOTED,X.attribValue=pe);continue;case W.ATTRIB_VALUE_QUOTED:if(pe!==X.q){pe==="&"?X.state=W.ATTRIB_VALUE_ENTITY_Q:X.attribValue+=pe;continue}ie(X),X.q="",X.state=W.ATTRIB_VALUE_CLOSED;continue;case W.ATTRIB_VALUE_CLOSED:K(pe)?X.state=W.ATTRIB:pe===">"?Ce(X):pe==="/"?X.state=W.OPEN_TAG_SLASH:U(F,pe)?(Se(X,"No whitespace between attributes"),X.attribName=pe,X.attribValue="",X.state=W.ATTRIB_NAME):Se(X,"Invalid attribute name");continue;case W.ATTRIB_VALUE_UNQUOTED:if(!B(pe)){pe==="&"?X.state=W.ATTRIB_VALUE_ENTITY_U:X.attribValue+=pe;continue}ie(X),pe===">"?Ce(X):X.state=W.ATTRIB;continue;case W.CLOSE_TAG:if(X.tagName)pe===">"?ne(X):U(P,pe)?X.tagName+=pe:X.script?(X.script+="</"+X.tagName,X.tagName="",X.state=W.SCRIPT):(K(pe)||Se(X,"Invalid tagname in closing tag"),X.state=W.CLOSE_TAG_SAW_WHITE);else{if(K(pe))continue;D(F,pe)?X.script?(X.script+="</"+pe,X.state=W.SCRIPT):Se(X,"Invalid tagname in closing tag."):X.tagName=pe}continue;case W.CLOSE_TAG_SAW_WHITE:if(K(pe))continue;pe===">"?ne(X):Se(X,"Invalid characters in closing tag");continue;case W.TEXT_ENTITY:case W.ATTRIB_VALUE_ENTITY_Q:case W.ATTRIB_VALUE_ENTITY_U:var qe,tt;switch(X.state){case W.TEXT_ENTITY:qe=W.TEXT,tt="textNode";break;case W.ATTRIB_VALUE_ENTITY_Q:qe=W.ATTRIB_VALUE_QUOTED,tt="attribValue";break;case W.ATTRIB_VALUE_ENTITY_U:qe=W.ATTRIB_VALUE_UNQUOTED,tt="attribValue";break}pe===";"?(X[tt]+=ce(X),X.entity="",X.state=qe):U(X.entity.length?z:A,pe)?X.entity+=pe:(Se(X,"Invalid character in entity name"),X[tt]+="&"+X.entity+pe,X.entity="",X.state=qe);continue;default:throw new Error(X,"Unknown state: "+X.state)}}return X.position>=X.bufferCheckPosition&&u(X),X}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */S.default||function(){var $=String.fromCharCode,X=Math.floor,de=function(){var xe=16384,Ke=[],qe,tt,et=-1,it=arguments.length;if(!it)return"";for(var at="";++et<it;){var je=Number(arguments[et]);if(!isFinite(je)||je<0||je>1114111||X(je)!==je)throw RangeError("Invalid code point: "+je);je<=65535?Ke.push(je):(je-=65536,qe=(je>>10)+55296,tt=je%1024+56320,Ke.push(qe,tt)),(et+1===it||Ke.length>xe)&&(at+=$.apply(null,Ke),Ke.length=0)}return at};e.default?Object.defineProperty(String,"fromCodePoint",{value:de,configurable:!0,writable:!0}):String.fromCodePoint=de}()})(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,J,I){J.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,y){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&&(!y||y.end!==!1)&&(m.on("end",f),m.on("close",r));var e=!1;function f(){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",f),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,J,I){(function(N){var g=H("./lib/request"),S=H("./lib/response"),k=H("xtend"),y=H("builtin-status-codes"),m=H("url"),C=I;C.request=function(_,e){typeof _=="string"?_=m.parse(_):_=k(_);var f=N.location.protocol.search(/^https?:$/)===-1?"http:":"",r=_.protocol||f,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 o=new g(_);return e&&o.on("response",e),o},C.get=function(e,f){var r=C.request(e,f);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=y,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,J,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(f){}return!1}var y=typeof N.ArrayBuffer!="undefined",m=y&&C(N.ArrayBuffer.prototype.slice);I.arraybuffer=I.fetch||y&&k("arraybuffer"),I.msstream=!I.fetch&&m&&k("ms-stream"),I.mozchunkedarraybuffer=!I.fetch&&y&&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,J,I){(function(N,g,S){"use strict";var k=H("babel-runtime/core-js/object/keys"),y=m(k);function m(u){return u&&u.__esModule?u:{default:u}}var C=H("./capability"),_=H("inherits"),e=H("./response"),f=H("readable-stream"),r=H("to-arraybuffer"),c=e.IncomingMessage,i=e.readyStates;function n(u,s){return C.fetch&&s?"fetch":C.mozchunkedarraybuffer?"moz-chunked-arraybuffer":C.msstream?"ms-stream":C.arraybuffer&&u?"arraybuffer":C.vbArray&&u?"text:vbarray":"text"}var o=J.exports=function(u){var s=this;f.Writable.call(s),s._opts=u,s._body=[],s._headers={},u.auth&&s.setHeader("Authorization","Basic "+new S(u.auth).toString("base64")),(0,y.default)(u.headers).forEach(function(b){s.setHeader(b,u.headers[b])});var l,E=!0;if(u.mode==="disable-fetch"||"requestTimeout"in u&&!C.abortController)E=!1,l=!0;else if(u.mode==="prefer-streaming")l=!1;else if(u.mode==="allow-wrong-content-type")l=!C.overrideMimeType;else if(!u.mode||u.mode==="default"||u.mode==="prefer-fast")l=!0;else throw new Error("Invalid value for opts.mode");s._mode=n(l,E),s._fetchTimer=null,s.on("finish",function(){s._onFinish()})};_(o,f.Writable),o.prototype.setHeader=function(u,s){var l=this,E=u.toLowerCase();if(d.indexOf(E)!==-1)return;l._headers[E]={name:u,value:s}},o.prototype.getHeader=function(u){var s=this._headers[u.toLowerCase()];return s?s.value:null},o.prototype.removeHeader=function(u){var s=this;delete s._headers[u.toLowerCase()]},o.prototype._onFinish=function(){var u=this;if(u._destroyed)return;var s=u._opts,l=u._headers,E=null;s.method!=="GET"&&s.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:(l["content-type"]||{}).value||""}):E=S.concat(u._body).toString());var b=[];if((0,y.default)(l).forEach(function(x){var w=l[x].name,T=l[x].value;Array.isArray(T)?T.forEach(function(F){b.push([w,F])}):b.push([w,T])}),u._mode==="fetch"){var p=null,L=null;if(C.abortController){var R=new AbortController;p=R.signal,u._fetchAbortController=R,"requestTimeout"in s&&s.requestTimeout!==0&&(u._fetchTimer=g.setTimeout(function(){u.emit("requestTimeout"),u._fetchAbortController&&u._fetchAbortController.abort()},s.requestTimeout))}g.fetch(u._opts.url,{method:u._opts.method,headers:b,body:E||void 0,mode:"cors",credentials:s.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 v=u._xhr=new g.XMLHttpRequest;try{v.open(u._opts.method,u._opts.url,!0)}catch(x){N.nextTick(function(){u.emit("error",x)});return}"responseType"in v&&(v.responseType=u._mode.split(":")[0]),"withCredentials"in v&&(v.withCredentials=!!s.withCredentials),u._mode==="text"&&"overrideMimeType"in v&&v.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in s&&(v.timeout=s.requestTimeout,v.ontimeout=function(){u.emit("requestTimeout")}),b.forEach(function(x){v.setRequestHeader(x[0],x[1])}),u._response=null,v.onreadystatechange=function(){switch(v.readyState){case i.LOADING:case i.DONE:u._onXHRProgress();break}},u._mode==="moz-chunked-arraybuffer"&&(v.onprogress=function(){u._onXHRProgress()}),v.onerror=function(){if(u._destroyed)return;u.emit("error",new Error("XHR error"))};try{v.send(E)}catch(x){N.nextTick(function(){u.emit("error",x)});return}}};function h(u){try{var s=u.status;return s!==null&&s!==0}catch(l){return!1}}o.prototype._onXHRProgress=function(){var u=this;if(!h(u._xhr)||u._destroyed)return;u._response||u._connect(),u._response._onXHRProgress()},o.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(s){u.emit("error",s)}),u.emit("response",u._response)},o.prototype._write=function(u,s,l){var E=this;E._body.push(u),l()},o.prototype.abort=o.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()},o.prototype.end=function(u,s,l){var E=this;typeof u=="function"&&(l=u,u=void 0),f.Writable.prototype.end.call(E,u,s,l)},o.prototype.flushHeaders=function(){},o.prototype.setTimeout=function(){},o.prototype.setNoDelay=function(){},o.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,J,I){(function(N,g,S){"use strict";var k=H("babel-runtime/core-js/promise"),y=m(k);function m(c){return c&&c.__esModule?c:{default:c}}var C=H("./capability"),_=H("inherits"),e=H("readable-stream"),f=I.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},r=I.IncomingMessage=function(c,i,n,o){var h=this;if(e.Readable.call(h),h._mode=n,h.headers={},h.rawHeaders=[],h.trailers={},h.rawTrailers=[],h.on("end",function(){N.nextTick(function(){h.emit("close")})}),n==="fetch"){var d=function p(){s.read().then(function(L){if(h._destroyed)return;if(L.done){g.clearTimeout(o),h.push(null);return}h.push(new S(L.value)),p()}).catch(function(L){g.clearTimeout(o),h._destroyed||h.emit("error",L)})};if(h._fetchResponse=i,h.url=i.url,h.statusCode=i.status,h.statusMessage=i.statusText,i.headers.forEach(function(p,L){h.headers[L.toLowerCase()]=p,h.rawHeaders.push(L,p)}),C.writableStream){var u=new WritableStream({write:function(L){return new y.default(function(R,v){h._destroyed?v():h.push(new S(L))?R():h._resumeFetch=R})},close:function(){g.clearTimeout(o),h._destroyed||h.push(null)},abort:function(L){h._destroyed||h.emit("error",L)}});try{i.body.pipeTo(u).catch(function(p){g.clearTimeout(o),h._destroyed||h.emit("error",p)});return}catch(p){}}var s=i.body.getReader();d()}else{h._xhr=c,h._pos=0,h.url=c.responseURL,h.statusCode=c.status,h.statusMessage=c.statusText;var l=c.getAllResponseHeaders().split(/\r?\n/);if(l.forEach(function(p){var L=p.match(/^([^:]+):\s*(.*)/);if(L){var R=L[1].toLowerCase();R==="set-cookie"?(h.headers[R]===void 0&&(h.headers[R]=[]),h.headers[R].push(L[2])):h.headers[R]!==void 0?h.headers[R]+=", "+L[2]:h.headers[R]=L[2],h.rawHeaders.push(L[1],L[2])}}),h._charset="x-user-defined",!C.overrideMimeType){var E=h.rawHeaders["mime-type"];if(E){var b=E.match(/;\s*charset=([^;])(;|$)/);b&&(h._charset=b[1].toLowerCase())}h._charset||(h._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!==f.DONE)break;try{n=new g.VBArray(i.responseBody).toArray()}catch(s){}if(n!==null){c.push(new S(n));break}case"text":try{n=i.responseText}catch(s){c._mode="text:vbarray";break}if(n.length>c._pos){var o=n.substr(c._pos);if(c._charset==="x-user-defined"){for(var h=new S(o.length),d=0;d<o.length;d++)h[d]=o.charCodeAt(d)&255;c.push(h)}else c.push(o,c._charset);c._pos=n.length}break;case"arraybuffer":if(i.readyState!==f.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!==f.LOADING||!n)break;c.push(new S(new Uint8Array(n)));break;case"ms-stream":if(n=i.response,i.readyState!==f.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===f.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,J,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 s;;)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(s)return;u=(""+u).toLowerCase(),s=!0}}function k(u){var s=S(u);if(typeof s!="string"&&(N.isEncoding===g||!g(u)))throw new Error("Unknown encoding: "+u);return s||u}I.StringDecoder=y;function y(u){this.encoding=k(u);var s;switch(this.encoding){case"utf16le":this.text=c,this.end=i,s=4;break;case"utf8":this.fillLast=e,s=4;break;case"base64":this.text=n,this.end=o,s=3;break;default:this.write=h,this.end=d;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=N.allocUnsafe(s)}y.prototype.write=function(u){if(u.length===0)return"";var s,l;if(this.lastNeed){if(s=this.fillLast(u),s===void 0)return"";l=this.lastNeed,this.lastNeed=0}else l=0;return l<u.length?s?s+this.text(u,l):this.text(u,l):s||""},y.prototype.end=r,y.prototype.text=f,y.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,s,l){var E=s.length-1;if(E<l)return 0;var b=m(s[E]);return b>=0?(b>0&&(u.lastNeed=b-1),b):--E<l||b===-2?0:(b=m(s[E]),b>=0?(b>0&&(u.lastNeed=b-2),b):--E<l||b===-2?0:(b=m(s[E]),b>=0?(b>0&&(b===2?b=0:u.lastNeed=b-3),b):0))}function _(u,s,l){if((s[0]&192)!==128)return u.lastNeed=0,"\uFFFD";if(u.lastNeed>1&&s.length>1){if((s[1]&192)!==128)return u.lastNeed=1,"\uFFFD";if(u.lastNeed>2&&s.length>2&&(s[2]&192)!==128)return u.lastNeed=2,"\uFFFD"}}function e(u){var s=this.lastTotal-this.lastNeed,l=_(this,u,s);if(l!==void 0)return l;if(this.lastNeed<=u.length)return u.copy(this.lastChar,s,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);u.copy(this.lastChar,s,0,u.length),this.lastNeed-=u.length}function f(u,s){var l=C(this,u,s);if(!this.lastNeed)return u.toString("utf8",s);this.lastTotal=l;var E=u.length-(l-this.lastNeed);return u.copy(this.lastChar,0,E),u.toString("utf8",s,E)}function r(u){var s=u&&u.length?this.write(u):"";return this.lastNeed?s+"\uFFFD":s}function c(u,s){if((u.length-s)%2===0){var l=u.toString("utf16le",s);if(l){var E=l.charCodeAt(l.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],l.slice(0,-1)}return l}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=u[u.length-1],u.toString("utf16le",s,u.length-1)}function i(u){var s=u&&u.length?this.write(u):"";if(this.lastNeed){var l=this.lastTotal-this.lastNeed;return s+this.lastChar.toString("utf16le",0,l)}return s}function n(u,s){var l=(u.length-s)%3;return l===0?u.toString("base64",s):(this.lastNeed=3-l,this.lastTotal=3,l===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",s,u.length-l))}function o(u){var s=u&&u.length?this.write(u):"";return this.lastNeed?s+this.lastChar.toString("base64",0,3-this.lastNeed):s}function h(u){return u.toString(this.encoding)}function d(u){return u&&u.length?this.write(u):""}},{"safe-buffer":228}],236:[function(H,J,I){(function(N,g){var S=H("process/browser.js").nextTick,k=Function.prototype.apply,y=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,f){this._id=e,this._clearFn=f}_.prototype.unref=_.prototype.ref=function(){},_.prototype.close=function(){this._clearFn.call(window,this._id)},I.enroll=function(e,f){clearTimeout(e._idleTimeoutId),e._idleTimeout=f},I.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},I._unrefActive=I.active=function(e){clearTimeout(e._idleTimeoutId);var f=e._idleTimeout;f>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},f))},I.setImmediate=typeof N=="function"?N:function(e){var f=C++,r=arguments.length<2?!1:y.call(arguments,1);return m[f]=!0,S(function(){m[f]&&(r?e.apply(null,r):e.call(null),I.clearImmediate(f))}),f},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,J,I){var N=H("buffer").Buffer;J.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,y=0;y<k;y++)S[y]=g[y];return S.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:73}],238:[function(H,J,I){"use strict";var N=H("punycode"),g=H("./util");I.parse=s,I.resolve=E,I.resolveObject=b,I.format=l,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,y=/:[0-9]*$/,m=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,C=["<",">",'"',"`"," ","\r",`
`," "],_=["{","}","|","\\","^","`"].concat(C),e=["'"].concat(_),f=["%","/","?",";","#"].concat(e),r=["/","?","#"],c=255,i=/^[+a-z0-9A-Z_-]{0,63}$/,n=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,o={javascript:!0,"javascript:":!0},h={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 s(p,L,R){if(p&&g.isObject(p)&&p instanceof S)return p;var v=new S;return v.parse(p,L,R),v}S.prototype.parse=function(p,L,R){if(!g.isString(p))throw new TypeError("Parameter 'url' must be a string, not "+typeof p);var v=p.indexOf("?"),x=v!==-1&&v<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],L?this.query=u.parse(this.search.substr(1)):this.query=this.search.substr(1)):L&&(this.search="",this.query={}),this}var A=k.exec(F);if(A){A=A[0];var z=A.toLowerCase();this.protocol=z,F=F.substr(A.length)}if(R||A||F.match(/^\/\/[^@\/]+@[^@\/]+/)){var K=F.substr(0,2)==="//";K&&!(A&&h[A])&&(F=F.substr(2),this.slashes=!0)}if(!h[A]&&(K||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 D,W;O===-1?W=F.lastIndexOf("@"):W=F.lastIndexOf("@",O),W!==-1&&(D=F.slice(0,W),F=F.slice(W+1),this.auth=decodeURIComponent(D)),O=-1;for(var B=0;B<f.length;B++){var U=F.indexOf(f[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 Q=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!Q)for(var re=this.hostname.split(/\./),B=0,ee=re.length;B<ee;B++){var ye=re[B];if(!ye)continue;if(!ye.match(i)){for(var be="",he=0,Ie=ye.length;he<Ie;he++)ye.charCodeAt(he)>127?be+="x":be+=ye[he];if(!be.match(i)){var Se=re.slice(0,B),fe=re.slice(B+1),ue=ye.match(n);ue&&(Se.push(ue[1]),fe.unshift(ue[2])),fe.length&&(F="/"+fe.join(".")+F),this.hostname=Se.join(".");break}}}this.hostname.length>c?this.hostname="":this.hostname=this.hostname.toLowerCase(),Q||(this.hostname=N.toASCII(this.hostname));var ie=this.port?":"+this.port:"",Ce=this.hostname||"";this.host=Ce+ie,this.href+=this.host,Q&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),F[0]!=="/"&&(F="/"+F))}if(!o[z])for(var B=0,ee=e.length;B<ee;B++){var ne=e[B];if(F.indexOf(ne)===-1)continue;var ce=encodeURIComponent(ne);ce===ne&&(ce=escape(ne)),F=F.split(ne).join(ce)}var Ae=F.indexOf("#");Ae!==-1&&(this.hash=F.substr(Ae),F=F.slice(0,Ae));var oe=F.indexOf("?");if(oe!==-1?(this.search=F.substr(oe),this.query=F.substr(oe+1),L&&(this.query=u.parse(this.query)),F=F.slice(0,oe)):L&&(this.search="",this.query={}),F&&(this.pathname=F),d[z]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var ie=this.pathname||"",q=this.search||"";this.path=ie+q}return this.href=this.format(),this};function l(p){return g.isString(p)&&(p=s(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 L=this.protocol||"",R=this.pathname||"",v=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 L&&L.substr(-1)!==":"&&(L+=":"),this.slashes||(!L||d[L])&&x!==!1?(x="//"+(x||""),R&&R.charAt(0)!=="/"&&(R="/"+R)):x||(x=""),v&&v.charAt(0)!=="#"&&(v="#"+v),T&&T.charAt(0)!=="?"&&(T="?"+T),R=R.replace(/[?#]/g,function(F){return encodeURIComponent(F)}),T=T.replace("#","%23"),L+x+R+T+v};function E(p,L){return s(p,!1,!0).resolve(L)}S.prototype.resolve=function(p){return this.resolveObject(s(p,!1,!0)).format()};function b(p,L){return p?s(p,!1,!0).resolveObject(L):L}S.prototype.resolveObject=function(p){if(g.isString(p)){var L=new S;L.parse(p,!1,!0),p=L}for(var R=new S,v=Object.keys(this),x=0;x<v.length;x++){var w=v[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),z=0;z<A.length;z++){var K=A[z];R[K]=p[K]}return R.href=R.format(),R}if(R.protocol=p.protocol,!p.host&&!h[p.protocol]){for(var ee=(p.pathname||"").split("/");ee.length&&!(p.host=ee.shift()););p.host||(p.host=""),p.hostname||(p.hostname=""),ee[0]!==""&&ee.unshift(""),ee.length<2&&ee.unshift(""),R.pathname=ee.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)==="/",D=p.host||p.pathname&&p.pathname.charAt(0)==="/",W=D||U||R.host&&p.pathname,Q=W,re=R.pathname&&R.pathname.split("/")||[],ee=p.pathname&&p.pathname.split("/")||[],ye=R.protocol&&!d[R.protocol];if(ye&&(R.hostname="",R.port=null,R.host&&(re[0]===""?re[0]=R.host:re.unshift(R.host)),R.host="",p.protocol&&(p.hostname=null,p.port=null,p.host&&(ee[0]===""?ee[0]=p.host:ee.unshift(p.host)),p.host=null),W=W&&(ee[0]===""||re[0]==="")),D)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,re=ee;else if(ee.length)re||(re=[]),re.pop(),re=re.concat(ee),R.search=p.search,R.query=p.query;else if(!g.isNullOrUndefined(p.search)){if(ye){R.hostname=R.host=re.shift();var be=R.host&&R.host.indexOf("@")>0?R.host.split("@"):!1;be&&(R.auth=be.shift(),R.host=R.hostname=be.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(!re.length)return R.pathname=null,R.search?R.path="/"+R.search:R.path=null,R.href=R.format(),R;for(var he=re.slice(-1)[0],Ie=(R.host||p.host||re.length>1)&&(he==="."||he==="..")||he==="",Se=0,fe=re.length;fe>=0;fe--)he=re[fe],he==="."?re.splice(fe,1):he===".."?(re.splice(fe,1),Se++):Se&&(re.splice(fe,1),Se--);if(!W&&!Q)for(;Se--;Se)re.unshift("..");W&&re[0]!==""&&(!re[0]||re[0].charAt(0)!=="/")&&re.unshift(""),Ie&&re.join("/").substr(-1)!=="/"&&re.push("");var ue=re[0]===""||re[0]&&re[0].charAt(0)==="/";if(ye){R.hostname=R.host=ue?"":re.length?re.shift():"";var be=R.host&&R.host.indexOf("@")>0?R.host.split("@"):!1;be&&(R.auth=be.shift(),R.host=R.hostname=be.shift())}return W=W||R.host&&re.length,W&&!ue&&re.unshift(""),re.length?R.pathname=re.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,L=y.exec(p);L&&(L=L[0],L!==":"&&(this.port=L.substr(1)),p=p.substr(0,p.length-L.length)),p&&(this.hostname=p)}},{"./util":239,punycode:209,querystring:212}],239:[function(H,J,I){"use strict";J.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,J,I){(function(N){J.exports=g;function g(k,y){if(S("noDeprecation"))return k;var m=!1;function C(){if(!m){if(S("throwDeprecation"))throw new Error(y);S("traceDeprecation")?console.trace(y):console.warn(y),m=!0}return k.apply(this,arguments)}return C}function S(k){try{if(!N.localStorage)return!1}catch(m){return!1}var y=N.localStorage[k];return y==null?!1:String(y).toLowerCase()==="true"}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],241:[function(H,J,I){typeof Object.create=="function"?J.exports=function(g,S){g.super_=S,g.prototype=Object.create(S.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}})}:J.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,J,I){J.exports=function(g){return g&&typeof g=="object"&&typeof g.copy=="function"&&typeof g.fill=="function"&&typeof g.readUInt8=="function"}},{}],243:[function(H,J,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,D=arguments,W=D.length,Q=String(O).replace(S,function(ee){if(ee==="%%")return"%";if(U>=W)return ee;switch(ee){case"%s":return String(D[U++]);case"%d":return Number(D[U++]);case"%j":try{return JSON.stringify(D[U++])}catch(ye){return"[Circular]"}default:return ee}}),re=D[U];U<W;re=D[++U])u(re)||!R(re)?Q+=" "+re:Q+=" "+m(re);return Q},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 D(){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 D};var k={},y;I.debuglog=function(O){if(p(y)&&(y=N.env.NODE_DEBUG||""),O=O.toUpperCase(),!k[O])if(new RegExp("\\b"+O+"\\b","i").test(y)){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),f(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,D){B[U]=!0}),B}function f(O,B,U){if(O.customInspect&&B&&w(B.inspect)&&B.inspect!==I.inspect&&!(B.constructor&&B.constructor.prototype===B)){var D=B.inspect(U,O);return E(D)||(D=f(O,D,U)),D}var W=r(O,B);if(W)return W;var Q=Object.keys(B),re=e(Q);if(O.showHidden&&(Q=Object.getOwnPropertyNames(B)),x(B)&&(Q.indexOf("message")>=0||Q.indexOf("description")>=0))return c(B);if(Q.length===0){if(w(B)){var ee=B.name?": "+B.name:"";return O.stylize("[Function"+ee+"]","special")}if(L(B))return O.stylize(RegExp.prototype.toString.call(B),"regexp");if(v(B))return O.stylize(Date.prototype.toString.call(B),"date");if(x(B))return c(B)}var ye="",be=!1,he=["{","}"];if(h(B)&&(be=!0,he=["[","]"]),w(B)){var Ie=B.name?": "+B.name:"";ye=" [Function"+Ie+"]"}if(L(B)&&(ye=" "+RegExp.prototype.toString.call(B)),v(B)&&(ye=" "+Date.prototype.toUTCString.call(B)),x(B)&&(ye=" "+c(B)),Q.length===0&&(!be||B.length==0))return he[0]+ye+he[1];if(U<0)return L(B)?O.stylize(RegExp.prototype.toString.call(B),"regexp"):O.stylize("[Object]","special");O.seen.push(B);var Se;return be?Se=i(O,B,U,re,Q):Se=Q.map(function(fe){return n(O,B,U,re,fe,be)}),O.seen.pop(),o(Se,ye,he)}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(l(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,D,W){for(var Q=[],re=0,ee=B.length;re<ee;++re)K(B,String(re))?Q.push(n(O,B,U,D,String(re),!0)):Q.push("");return W.forEach(function(ye){ye.match(/^\d+$/)||Q.push(n(O,B,U,D,ye,!0))}),Q}function n(O,B,U,D,W,Q){var re,ee,ye;if(ye=Object.getOwnPropertyDescriptor(B,W)||{value:B[W]},ye.get?ye.set?ee=O.stylize("[Getter/Setter]","special"):ee=O.stylize("[Getter]","special"):ye.set&&(ee=O.stylize("[Setter]","special")),K(D,W)||(re="["+W+"]"),ee||(O.seen.indexOf(ye.value)<0?(u(U)?ee=f(O,ye.value,null):ee=f(O,ye.value,U-1),ee.indexOf(`
`)>-1&&(Q?ee=ee.split(`
`).map(function(be){return" "+be}).join(`
`).substr(2):ee=`
`+ee.split(`
`).map(function(be){return" "+be}).join(`
`))):ee=O.stylize("[Circular]","special")),p(re)){if(Q&&W.match(/^\d+$/))return ee;re=JSON.stringify(""+W),re.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(re=re.substr(1,re.length-2),re=O.stylize(re,"name")):(re=re.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),re=O.stylize(re,"string"))}return re+": "+ee}function o(O,B,U){var D=0,W=O.reduce(function(Q,re){return D++,re.indexOf(`
`)>=0&&D++,Q+re.replace(/\u001b\[\d\d?m/g,"").length+1},0);return W>60?U[0]+(B===""?"":B+`
`)+" "+O.join(`,
`)+" "+U[1]:U[0]+B+" "+O.join(", ")+" "+U[1]}function h(O){return Array.isArray(O)}I.isArray=h;function d(O){return typeof O=="boolean"}I.isBoolean=d;function u(O){return O===null}I.isNull=u;function s(O){return O==null}I.isNullOrUndefined=s;function l(O){return typeof O=="number"}I.isNumber=l;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 L(O){return R(O)&&F(O)==="[object RegExp]"}I.isRegExp=L;function R(O){return typeof O=="object"&&O!==null}I.isObject=R;function v(O){return R(O)&&F(O)==="[object Date]"}I.isDate=v;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 z(){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",z(),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),D=U.length;D--;)O[U[D]]=B[U[D]];return O};function K(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,J,I){"use strict";(function(){"use strict";I.stripBOM=function(N){return N[0]==="\uFEFF"?N.substring(1):N}}).call(void 0)},{}],245:[function(H,J,I){"use strict";var N=H("babel-runtime/helpers/typeof"),g=y(N),S=H("babel-runtime/core-js/object/keys"),k=y(S);function y(m){return m&&m.__esModule?m:{default:m}}(function(){"use strict";var m,C,_,e,f,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)},f=function(i){return"<![CDATA["+_(i)+"]]>"},_=function(i){return i.replace("]]>","]]]]><![CDATA[>")},I.Builder=function(){function c(i){var n,o,h;this.options={},o=C["0.2"];for(n in o){if(!r.call(o,n))continue;h=o[n],this.options[n]=h}for(n in i){if(!r.call(i,n))continue;h=i[n],this.options[n]=h}}return c.prototype.buildObject=function(i){var n,o,h,d,u;return n=this.options.attrkey,o=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,h=function(s){return function(l,E){var b,p,L,R,v,x;if((typeof E=="undefined"?"undefined":(0,g.default)(E))!=="object")s.options.cdata&&e(E)?l.raw(f(E)):l.txt(E);else if(Array.isArray(E))for(R in E){if(!r.call(E,R))continue;p=E[R];for(v in p)L=p[v],l=h(l.ele(v),L).up()}else for(v in E){if(!r.call(E,v))continue;if(p=E[v],v===n){if((typeof p=="undefined"?"undefined":(0,g.default)(p))==="object")for(b in p)x=p[b],l=l.att(b,x)}else if(v===o)s.options.cdata&&e(p)?l=l.raw(f(p)):l=l.txt(p);else if(Array.isArray(p))for(R in p){if(!r.call(p,R))continue;L=p[R],typeof L=="string"?s.options.cdata&&e(L)?l=l.ele(v).raw(f(L)).up():l=l.ele(v,L).up():l=h(l.ele(v),L).up()}else(typeof p=="undefined"?"undefined":(0,g.default)(p))==="object"?l=h(l.ele(v),p).up():typeof p=="string"&&s.options.cdata&&e(p)?l=l.ele(v).raw(f(p)).up():(p==null&&(p=""),l=l.ele(v,p.toString()).up())}return l}}(this),d=m.create(u,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),h(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,J,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,J,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),y=H("babel-runtime/core-js/object/keys"),m=e(y),C=H("babel-runtime/helpers/typeof"),_=e(C);function e(f){return f&&f.__esModule?f:{default:f}}(function(){"use strict";var f,r,c,i,n,o,h,d,u=function(b,p){return function(){return b.apply(p,arguments)}},s=function(b,p){for(var L in p)l.call(p,L)&&(b[L]=p[L]);function R(){this.constructor=b}return R.prototype=p.prototype,b.prototype=new R,b.__super__=p.prototype,b},l={}.hasOwnProperty;h=H("sax"),c=H("events"),f=H("./bom"),o=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,L){var R,v,x;for(R=0,v=b.length;R<v;R++)x=b[R],p=x(p,L);return p},I.Parser=function(E){s(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 L,R,v;if(!(this instanceof I.Parser))return new I.Parser(p);this.options={},R=r["0.2"];for(L in R){if(!l.call(R,L))continue;v=R[L],this.options[L]=v}for(L in p){if(!l.call(p,L))continue;v=p[L],this.options[L]=v}this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(o.normalize)),this.reset()}return b.prototype.processAsync=function(){var p,L;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(L=R,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(L)}},b.prototype.assignOrPush=function(p,L,R){return L in p?(p[L]instanceof Array||(p[L]=[p[L]]),p[L].push(R)):this.options.explicitArray?p[L]=[R]:p[L]=R},b.prototype.reset=function(){var p,L,R,v;return this.removeAllListeners(),this.saxParser=h.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,v=[],p=this.options.attrkey,L=this.options.charkey,this.saxParser.onopentag=function(x){return function(w){var T,F,P,A,z;if(P={},P[L]="",!x.options.ignoreAttrs){z=w.attributes;for(T in z){if(!l.call(z,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}),v.push(P)}}(this),this.saxParser.onclosetag=function(x){return function(){var w,T,F,P,A,z,K,O,B,U;if(z=v.pop(),A=z["#name"],(!x.options.explicitChildren||!x.options.preserveChildrenOrder)&&delete z["#name"],z.cdata===!0&&(w=z.cdata,delete z.cdata),B=v[v.length-1],z[L].match(/^\s*$/)&&!w?(T=z[L],delete z[L]):(x.options.trim&&(z[L]=z[L].trim()),x.options.normalize&&(z[L]=z[L].replace(/\s{2,}/g," ").trim()),z[L]=x.options.valueProcessors?n(x.options.valueProcessors,z[L],A):z[L],(0,m.default)(z).length===1&&L in z&&!x.EXPLICIT_CHARKEY&&(z=z[L])),i(z)&&(z=x.options.emptyTag!==""?x.options.emptyTag:T),x.options.validator!=null&&(U="/"+function(){var D,W,Q;for(Q=[],D=0,W=v.length;D<W;D++)P=v[D],Q.push(P["#name"]);return Q}().concat(A).join("/"),function(){var D;try{return z=x.options.validator(U,B&&B[A],z)}catch(W){return D=W,x.emit("error",D)}}()),x.options.explicitChildren&&!x.options.mergeAttrs&&(typeof z=="undefined"?"undefined":(0,_.default)(z))==="object"){if(!x.options.preserveChildrenOrder)P={},x.options.attrkey in z&&(P[x.options.attrkey]=z[x.options.attrkey],delete z[x.options.attrkey]),!x.options.charsAsChildren&&x.options.charkey in z&&(P[x.options.charkey]=z[x.options.charkey],delete z[x.options.charkey]),(0,k.default)(z).length>0&&(P[x.options.childkey]=z),z=P;else if(B){B[x.options.childkey]=B[x.options.childkey]||[],K={};for(F in z){if(!l.call(z,F))continue;K[F]=z[F]}B[x.options.childkey].push(K),delete z["#name"],(0,m.default)(z).length===1&&L in z&&!x.EXPLICIT_CHARKEY&&(z=z[L])}}return v.length>0?x.assignOrPush(B,A,z):(x.options.explicitRoot&&(O=z,z={},z[A]=O),x.resultObject=z,x.saxParser.ended=!0,x.emit("end",x.resultObject))}}(this),R=function(x){return function(w){var T,F;if(F=v[v.length-1],F)return F[L]+=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[L]=w,x.options.normalize&&(T[L]=T[L].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,L){var R;L!=null&&typeof L=="function"&&(this.on("end",function(v){return this.reset(),L(null,v)}),this.on("error",function(v){return this.reset(),L(v)}));try{return p=p.toString(),p.trim()===""?(this.emit("end",null),!0):(p=f.stripBOM(p),this.options.async?(this.remaining=p,d(this.processAsync),this.saxParser):this.saxParser.write(p).close())}catch(v){if(R=v,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(L){return function(R,v){return L.parseString(p,function(x,w){return x?v(x):R(w)})}}(this))},b}(c),I.parseString=function(E,b,p){var L,R,v;return p!=null?(typeof p=="function"&&(L=p),(typeof b=="undefined"?"undefined":(0,_.default)(b))==="object"&&(R=b)):(typeof b=="function"&&(L=b),R={}),v=new I.Parser(R),v.parseString(E,L)},I.parseStringPromise=function(E,b){var p,L;return(typeof b=="undefined"?"undefined":(0,_.default)(b))==="object"&&(p=b),L=new I.Parser(p),L.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,J,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,J,I){"use strict";(function(){"use strict";var N,g,S,k,y=function(_,e){for(var f in e)m.call(e,f)&&(_[f]=e[f]);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){y(_,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,J,I){"use strict";(function(){J.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(H,J,I){"use strict";(function(){J.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,J,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),y=H("babel-runtime/core-js/object/assign"),m=C(y);function C(_){return _&&_.__esModule?_:{default:_}}(function(){var _,e,f,r,c,i,n,o=[].slice,h={}.hasOwnProperty;_=function(){var u,s,l,E,b,p;if(p=arguments[0],b=2<=arguments.length?o.call(arguments,1):[],c(m.default))m.default.apply(null,arguments);else for(u=0,l=b.length;u<l;u++)if(E=b[u],E!=null)for(s in E){if(!h.call(E,s))continue;p[s]=E[s]}return p},c=function(u){return!!u&&Object.prototype.toString.call(u)==="[object Function]"},i=function(u){var s;return!!u&&((s=typeof u=="undefined"?"undefined":(0,k.default)(u))==="function"||s==="object")},f=function(u){return c(Array.isArray)?Array.isArray(u):Object.prototype.toString.call(u)==="[object Array]"},r=function(u){var s;if(f(u))return!u.length;for(s in u){if(!h.call(u,s))continue;return!1}return!0},n=function(u){var s,l;return i(u)&&(l=(0,g.default)(u))&&(s=l.constructor)&&typeof s=="function"&&s instanceof s&&Function.prototype.toString.call(s)===Function.prototype.toString.call(Object)},e=function(u){return c(u.valueOf)?u.valueOf():u},J.exports.assign=_,J.exports.isFunction=c,J.exports.isObject=i,J.exports.isArray=f,J.exports.isEmpty=r,J.exports.isPlainObject=n,J.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,J,I){"use strict";(function(){J.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(void 0)},{}],254:[function(H,J,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,y,m;k=H("./NodeType"),m=H("./XMLNode"),J.exports=y=function(){function C(_,e,f){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(f),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,J,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,y,m,C=function(f,r){for(var c in r)_.call(r,c)&&(f[c]=r[c]);function i(){this.constructor=f}return i.prototype=r.prototype,f.prototype=new i,f.__super__=r.prototype,f},_={}.hasOwnProperty;k=H("./NodeType"),m=H("./XMLCharacterData"),J.exports=y=function(e){C(f,e);function f(r,c){if(f.__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 f.prototype.clone=function(){return(0,g.default)(this)},f.prototype.toString=function(r){return this.options.writer.cdata(this,this.options.writer.filterOptions(r))},f}(m)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(H,J,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,y,m=function(e,f){for(var r in f)C.call(f,r)&&(e[r]=f[r]);function c(){this.constructor=e}return c.prototype=f.prototype,e.prototype=new c,e.__super__=f.prototype,e},C={}.hasOwnProperty;y=H("./XMLNode"),J.exports=k=function(_){m(e,_);function e(f){e.__super__.constructor.call(this,f),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(f,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.appendData=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.insertData=function(f,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.deleteData=function(f,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.replaceData=function(f,r,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.isEqualNode=function(f){return e.__super__.isEqualNode.apply(this,arguments).isEqualNode(f)?!(f.data!==this.data):!1},e}(y)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(H,J,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,y,m,C=function(f,r){for(var c in r)_.call(r,c)&&(f[c]=r[c]);function i(){this.constructor=f}return i.prototype=r.prototype,f.prototype=new i,f.__super__=r.prototype,f},_={}.hasOwnProperty;k=H("./NodeType"),y=H("./XMLCharacterData"),J.exports=m=function(e){C(f,e);function f(r,c){if(f.__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 f.prototype.clone=function(){return(0,g.default)(this)},f.prototype.toString=function(r){return this.options.writer.comment(this,this.options.writer.filterOptions(r))},f}(y)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(H,J,I){"use strict";var N=H("babel-runtime/core-js/object/keys"),g=y(N),S=H("babel-runtime/core-js/object/create"),k=y(S);function y(m){return m&&m.__esModule?m:{default:m}}(function(){var m,C,_;C=H("./XMLDOMErrorHandler"),_=H("./XMLDOMStringList"),J.exports=m=function(){function e(){var f;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=f=(0,k.default)(this.defaultParams)}return Object.defineProperty(e.prototype,"parameterNames",{get:function(){return new _((0,g.default)(this.defaultParams))}}),e.prototype.getParameter=function(f){return this.params.hasOwnProperty(f)?this.params[f]:null},e.prototype.canSetParameter=function(f,r){return!0},e.prototype.setParameter=function(f,r){return r!=null?this.params[f]=r:delete this.params[f]},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,J,I){"use strict";(function(){var N;J.exports=N=function(){function g(){}return g.prototype.handleError=function(S){throw new Error(S)},g}()}).call(void 0)},{}],260:[function(H,J,I){"use strict";(function(){var N;J.exports=N=function(){function g(){}return g.prototype.hasFeature=function(S,k){return!0},g.prototype.createDocumentType=function(S,k,y){throw new Error("This DOM method is not implemented.")},g.prototype.createDocument=function(S,k,y){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,J,I){"use strict";(function(){var N;J.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,J,I){"use strict";(function(){var N,g,S,k=function(C,_){for(var e in _)y.call(_,e)&&(C[e]=_[e]);function f(){this.constructor=C}return f.prototype=_.prototype,C.prototype=new f,C.__super__=_.prototype,C},y={}.hasOwnProperty;S=H("./XMLNode"),N=H("./NodeType"),J.exports=g=function(m){k(C,m);function C(_,e,f,r,c,i){if(C.__super__.constructor.call(this,_),e==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(f==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(f),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,J,I){"use strict";(function(){var N,g,S,k=function(C,_){for(var e in _)y.call(_,e)&&(C[e]=_[e]);function f(){this.constructor=C}return f.prototype=_.prototype,C.prototype=new f,C.__super__=_.prototype,C},y={}.hasOwnProperty;S=H("./XMLNode"),N=H("./NodeType"),J.exports=g=function(m){k(C,m);function C(_,e,f){if(C.__super__.constructor.call(this,_),e==null)throw new Error("Missing DTD element name. "+this.debugInfo());f||(f="(#PCDATA)"),Array.isArray(f)&&(f="("+f.join(",")+")"),this.name=this.stringify.name(e),this.type=N.ElementDeclaration,this.value=this.stringify.dtdElementValue(f)}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,J,I){"use strict";(function(){var N,g,S,k,y=function(_,e){for(var f in e)m.call(e,f)&&(_[f]=e[f]);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"),J.exports=g=function(C){y(_,C);function _(e,f,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=!!f,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,J,I){"use strict";(function(){var N,g,S,k=function(C,_){for(var e in _)y.call(_,e)&&(C[e]=_[e]);function f(){this.constructor=C}return f.prototype=_.prototype,C.prototype=new f,C.__super__=_.prototype,C},y={}.hasOwnProperty;S=H("./XMLNode"),N=H("./NodeType"),J.exports=g=function(m){k(C,m);function C(_,e,f){if(C.__super__.constructor.call(this,_),e==null)throw new Error("Missing DTD notation name. "+this.debugInfo(e));if(!f.pubID&&!f.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,f.pubID!=null&&(this.pubID=this.stringify.dtdPubID(f.pubID)),f.sysID!=null&&(this.sysID=this.stringify.dtdSysID(f.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,J,I){"use strict";(function(){var N,g,S,k,y=function(_,e){for(var f in e)m.call(e,f)&&(_[f]=e[f]);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"),J.exports=g=function(C){y(_,C);function _(e,f,r,c){var i;_.__super__.constructor.call(this,e),k(f)&&(i=f,f=i.version,r=i.encoding,c=i.standalone),f||(f="1.0"),this.type=N.Declaration,this.version=this.stringify.xmlVersion(f),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,J,I){"use strict";(function(){var N,g,S,k,y,m,C,_,e,f=function(i,n){for(var o in n)r.call(n,o)&&(i[o]=n[o]);function h(){this.constructor=i}return h.prototype=n.prototype,i.prototype=new h,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"),y=H("./XMLDTDNotation"),C=H("./XMLNamedNodeMap"),J.exports=m=function(c){f(i,c);function i(n,o,h){var d,u,s,l,E,b;if(i.__super__.constructor.call(this,n),this.type=N.DocType,n.children){for(l=n.children,u=0,s=l.length;u<s;u++)if(d=l[u],d.type===N.Element){this.name=d.name;break}}this.documentObject=n,e(o)&&(E=o,o=E.pubID,h=E.sysID),h==null&&(b=[o,h],h=b[0],o=b[1]),o!=null&&(this.pubID=this.stringify.dtdPubID(o)),h!=null&&(this.sysID=this.stringify.dtdSysID(h))}return Object.defineProperty(i.prototype,"entities",{get:function(){var o,h,d,u,s;for(u={},s=this.children,h=0,d=s.length;h<d;h++)o=s[h],o.type===N.EntityDeclaration&&!o.pe&&(u[o.name]=o);return new C(u)}}),Object.defineProperty(i.prototype,"notations",{get:function(){var o,h,d,u,s;for(u={},s=this.children,h=0,d=s.length;h<d;h++)o=s[h],o.type===N.NotationDeclaration&&(u[o.name]=o);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,o){var h;return h=new S(this,n,o),this.children.push(h),this},i.prototype.attList=function(n,o,h,d,u){var s;return s=new g(this,n,o,h,d,u),this.children.push(s),this},i.prototype.entity=function(n,o){var h;return h=new k(this,!1,n,o),this.children.push(h),this},i.prototype.pEntity=function(n,o){var h;return h=new k(this,!0,n,o),this.children.push(h),this},i.prototype.notation=function(n,o){var h;return h=new y(this,n,o),this.children.push(h),this},i.prototype.toString=function(n){return this.options.writer.docType(this,this.options.writer.filterOptions(n))},i.prototype.ele=function(n,o){return this.element(n,o)},i.prototype.att=function(n,o,h,d,u){return this.attList(n,o,h,d,u)},i.prototype.ent=function(n,o){return this.entity(n,o)},i.prototype.pent=function(n,o){return this.pEntity(n,o)},i.prototype.not=function(n,o){return this.notation(n,o)},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,J,I){"use strict";(function(){var N,g,S,k,y,m,C,_,e=function(c,i){for(var n in i)f.call(i,n)&&(c[n]=i[n]);function o(){this.constructor=c}return o.prototype=i.prototype,c.prototype=new o,c.__super__=i.prototype,c},f={}.hasOwnProperty;_=H("./Utility").isPlainObject,S=H("./XMLDOMImplementation"),g=H("./XMLDOMConfiguration"),y=H("./XMLNode"),N=H("./NodeType"),C=H("./XMLStringifier"),m=H("./XMLStringWriter"),J.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,o,h,d;for(d=this.children,o=0,h=d.length;o<h;o++)if(n=d[o],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,o){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,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createTreeWalker=function(i,n,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},c}(y)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDOMConfiguration":258,"./XMLDOMImplementation":260,"./XMLNode":273,"./XMLStringWriter":278,"./XMLStringifier":279}],269:[function(H,J,I){"use strict";(function(){var N,g,S,k,y,m,C,_,e,f,r,c,i,n,o,h,d,u,s,l,E,b,p,L,R={}.hasOwnProperty;L=H("./Utility"),b=L.isObject,E=L.isFunction,p=L.isPlainObject,l=L.getValue,N=H("./NodeType"),c=H("./XMLDocument"),n=H("./XMLElement"),k=H("./XMLCData"),y=H("./XMLComment"),h=H("./XMLRaw"),s=H("./XMLText"),o=H("./XMLProcessingInstruction"),f=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"),J.exports=i=function(){function v(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 v.prototype.createChildNode=function(x){var w,T,F,P,A,z,K,O;switch(x.type){case N.CData:this.cdata(x.value);break;case N.Comment:this.comment(x.value);break;case N.Element:F={},K=x.attribs;for(T in K){if(!R.call(K,T))continue;w=K[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,z=O.length;A<z;A++)P=O[A],this.createChildNode(P),P.type===N.Element&&this.up();return this},v.prototype.dummy=function(){return this},v.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=l(x),w==null&&(w={}),w=l(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},v.prototype.element=function(x,w,T){var F,P,A,z,K,O;if(this.currentNode&&this.currentNode.type===N.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(x)||b(x)||E(x))for(z=this.options.noValidation,this.options.noValidation=!0,O=new c(this.options).element("TEMP_ROOT"),O.element(x),this.options.noValidation=z,K=O.children,P=0,A=K.length;P<A;P++)F=K[P],this.createChildNode(F),F.type===N.Element&&this.up();else this.node(x,w,T);return this},v.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=l(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},v.prototype.text=function(x){var w;return this.openCurrent(),w=new s(this,x),this.onData(this.writer.text(w,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},v.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},v.prototype.comment=function(x){var w;return this.openCurrent(),w=new y(this,x),this.onData(this.writer.comment(w,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},v.prototype.raw=function(x){var w;return this.openCurrent(),w=new h(this,x),this.onData(this.writer.raw(w,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},v.prototype.instruction=function(x,w){var T,F,P,A,z;if(this.openCurrent(),x!=null&&(x=l(x)),w!=null&&(w=l(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()),z=new o(this,x,w),this.onData(this.writer.processingInstruction(z,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},v.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 f(this,x,w,T),this.onData(this.writer.declaration(F,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},v.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},v.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},v.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},v.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},v.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},v.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},v.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},v.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},v.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},v.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}},v.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},v.prototype.onData=function(x,w){return this.documentStarted=!0,this.onDataCallback(x,w+1)},v.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},v.prototype.debugInfo=function(x){return x==null?"":"node: <"+x+">"},v.prototype.ele=function(){return this.element.apply(this,arguments)},v.prototype.nod=function(x,w,T){return this.node(x,w,T)},v.prototype.txt=function(x){return this.text(x)},v.prototype.dat=function(x){return this.cdata(x)},v.prototype.com=function(x){return this.comment(x)},v.prototype.ins=function(x,w){return this.instruction(x,w)},v.prototype.dec=function(x,w,T){return this.declaration(x,w,T)},v.prototype.dtd=function(x,w,T){return this.doctype(x,w,T)},v.prototype.e=function(x,w,T){return this.element(x,w,T)},v.prototype.n=function(x,w,T){return this.node(x,w,T)},v.prototype.t=function(x){return this.text(x)},v.prototype.d=function(x){return this.cdata(x)},v.prototype.c=function(x){return this.comment(x)},v.prototype.r=function(x){return this.raw(x)},v.prototype.i=function(x,w){return this.instruction(x,w)},v.prototype.att=function(){return this.currentNode&&this.currentNode.type===N.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},v.prototype.a=function(){return this.currentNode&&this.currentNode.type===N.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},v.prototype.ent=function(x,w){return this.entity(x,w)},v.prototype.pent=function(x,w){return this.pEntity(x,w)},v.prototype.not=function(x,w){return this.notation(x,w)},v}()}).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,J,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,y,m,C=function(f,r){for(var c in r)_.call(r,c)&&(f[c]=r[c]);function i(){this.constructor=f}return i.prototype=r.prototype,f.prototype=new i,f.__super__=r.prototype,f},_={}.hasOwnProperty;m=H("./XMLNode"),k=H("./NodeType"),J.exports=y=function(e){C(f,e);function f(r){f.__super__.constructor.call(this,r),this.type=k.Dummy}return f.prototype.clone=function(){return(0,g.default)(this)},f.prototype.toString=function(r){return""},f}(m)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(H,J,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,y,m,C,_,e,f,r,c,i=function(h,d){for(var u in d)n.call(d,u)&&(h[u]=d[u]);function s(){this.constructor=h}return s.prototype=d.prototype,h.prototype=new s,h.__super__=d.prototype,h},n={}.hasOwnProperty;c=H("./Utility"),r=c.isObject,f=c.isFunction,e=c.getValue,_=H("./XMLNode"),k=H("./NodeType"),y=H("./XMLAttribute"),C=H("./XMLNamedNodeMap"),J.exports=m=function(o){i(h,o);function h(d,u,s){var l,E,b,p;if(h.__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,s!=null&&this.attribute(s),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(l=p[E],l.type===k.DocType){l.name=this.name;break}}}return Object.defineProperty(h.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(h.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(h.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(h.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(h.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(h.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(h.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(h.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new C(this.attribs)),this.attributeMap}}),h.prototype.clone=function(){var d,u,s,l;s=(0,g.default)(this),s.isRoot&&(s.documentObject=null),s.attribs={},l=this.attribs;for(u in l){if(!n.call(l,u))continue;d=l[u],s.attribs[u]=d.clone()}return s.children=[],this.children.forEach(function(E){var b;return b=E.clone(),b.parent=s,s.children.push(b)}),s},h.prototype.attribute=function(d,u){var s,l;if(d!=null&&(d=e(d)),r(d))for(s in d){if(!n.call(d,s))continue;l=d[s],this.attribute(s,l)}else f(u)&&(u=u.apply()),this.options.keepNullAttributes&&u==null?this.attribs[d]=new y(this,d,""):u!=null&&(this.attribs[d]=new y(this,d,u));return this},h.prototype.removeAttribute=function(d){var u,s,l;if(d==null)throw new Error("Missing attribute name. "+this.debugInfo());if(d=e(d),Array.isArray(d))for(s=0,l=d.length;s<l;s++)u=d[s],delete this.attribs[u];else delete this.attribs[d];return this},h.prototype.toString=function(d){return this.options.writer.element(this,this.options.writer.filterOptions(d))},h.prototype.att=function(d,u){return this.attribute(d,u)},h.prototype.a=function(d,u){return this.attribute(d,u)},h.prototype.getAttribute=function(d){return this.attribs.hasOwnProperty(d)?this.attribs[d].value:null},h.prototype.setAttribute=function(d,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getAttributeNode=function(d){return this.attribs.hasOwnProperty(d)?this.attribs[d]:null},h.prototype.setAttributeNode=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.removeAttributeNode=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getElementsByTagName=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getAttributeNS=function(d,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.setAttributeNS=function(d,u,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.removeAttributeNS=function(d,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getAttributeNodeNS=function(d,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.setAttributeNodeNS=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getElementsByTagNameNS=function(d,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.hasAttribute=function(d){return this.attribs.hasOwnProperty(d)},h.prototype.hasAttributeNS=function(d,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.setIdAttribute=function(d,u){return this.attribs.hasOwnProperty(d)?this.attribs[d].isId:u},h.prototype.setIdAttributeNS=function(d,u,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.setIdAttributeNode=function(d,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getElementsByTagName=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getElementsByTagNameNS=function(d,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getElementsByClassName=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.isEqualNode=function(d){var u,s,l;if(!h.__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=s=0,l=this.attribs.length-1;0<=l?s<=l:s>=l;u=0<=l?++s:--s)if(!this.attribs[u].isEqualNode(d.attribs[u]))return!1;return!0},h}(_)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(H,J,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;J.exports=k=function(){function y(m){this.nodes=m}return Object.defineProperty(y.prototype,"length",{get:function(){return(0,g.default)(this.nodes).length||0}}),y.prototype.clone=function(){return this.nodes=null},y.prototype.getNamedItem=function(m){return this.nodes[m]},y.prototype.setNamedItem=function(m){var C;return C=this.nodes[m.nodeName],this.nodes[m.nodeName]=m,C||null},y.prototype.removeNamedItem=function(m){var C;return C=this.nodes[m],delete this.nodes[m],C||null},y.prototype.item=function(m){return this.nodes[(0,g.default)(this.nodes)[m]]||null},y.prototype.getNamedItemNS=function(m,C){throw new Error("This DOM method is not implemented.")},y.prototype.setNamedItemNS=function(m){throw new Error("This DOM method is not implemented.")},y.prototype.removeNamedItemNS=function(m,C){throw new Error("This DOM method is not implemented.")},y}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(H,J,I){"use strict";(function(){var N,g,S,k,y,m,C,_,e,f,r,c,i,n,o,h,d,u,s,l={}.hasOwnProperty;s=H("./Utility"),u=s.isObject,d=s.isFunction,h=s.isEmpty,o=s.getValue,_=null,S=null,k=null,y=null,m=null,i=null,n=null,c=null,C=null,g=null,r=null,e=null,N=null,J.exports=f=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"),y=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,L,R,v,x;if(this.nodeType===g.Element||this.nodeType===g.DocumentFragment){for(x="",v=this.children,L=0,R=v.length;L<R;L++)p=v[L],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,L,R,v,x;for(this.parent=b,b&&(this.options=b.options,this.stringify=b.stringify),v=this.children,x=[],L=0,R=v.length;L<R;L++)p=v[L],x.push(p.setParent(this));return x},E.prototype.element=function(b,p,L){var R,v,x,w,T,F,P,A,z,K,O;if(F=null,p===null&&L==null&&(z=[{},null],p=z[0],L=z[1]),p==null&&(p={}),p=o(p),u(p)||(K=[p,L],L=K[0],p=K[1]),b!=null&&(b=o(b)),Array.isArray(b))for(x=0,P=b.length;x<P;x++)v=b[x],F=this.element(v);else if(d(b))F=this.element(b.apply());else if(u(b))for(T in b){if(!l.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)&&h(O))F=this.dummy();else if(u(O)&&h(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++)v=O[w],R={},R[T]=v,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&&L===null?F=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&b.indexOf(this.stringify.convertTextKey)===0?F=this.text(L):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&b.indexOf(this.stringify.convertCDataKey)===0?F=this.cdata(L):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&b.indexOf(this.stringify.convertCommentKey)===0?F=this.comment(L):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&b.indexOf(this.stringify.convertRawKey)===0?F=this.raw(L):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&b.indexOf(this.stringify.convertPIKey)===0?F=this.instruction(b.substr(this.stringify.convertPIKey.length),L):F=this.node(b,p,L);if(F==null)throw new Error("Could not create any elements with: "+b+". "+this.debugInfo());return F},E.prototype.insertBefore=function(b,p,L){var R,v,x,w,T;if(b!=null?b.type:void 0)return x=b,w=p,x.setParent(this),w?(v=children.indexOf(w),T=children.splice(v),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 v=this.parent.children.indexOf(this),T=this.parent.children.splice(v),R=this.parent.element(b,p,L),Array.prototype.push.apply(this.parent.children,T),R},E.prototype.insertAfter=function(b,p,L){var R,v,x;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(b));return v=this.parent.children.indexOf(this),x=this.parent.children.splice(v+1),R=this.parent.element(b,p,L),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,L){var R,v;return b!=null&&(b=o(b)),p||(p={}),p=o(p),u(p)||(v=[p,L],L=v[0],p=v[1]),R=new _(this,b,p),L!=null&&R.text(L),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,L,R;return L=this.parent.children.indexOf(this),R=this.parent.children.splice(L),p=this.parent.comment(b),Array.prototype.push.apply(this.parent.children,R),this},E.prototype.commentAfter=function(b){var p,L,R;return L=this.parent.children.indexOf(this),R=this.parent.children.splice(L+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 L,R,v,x,w;if(b!=null&&(b=o(b)),p!=null&&(p=o(p)),Array.isArray(b))for(x=0,w=b.length;x<w;x++)L=b[x],this.instruction(L);else if(u(b))for(L in b){if(!l.call(b,L))continue;R=b[L],this.instruction(L,R)}else d(p)&&(p=p.apply()),v=new c(this,b,p),this.children.push(v);return this},E.prototype.instructionBefore=function(b,p){var L,R,v;return R=this.parent.children.indexOf(this),v=this.parent.children.splice(R),L=this.parent.instruction(b,p),Array.prototype.push.apply(this.parent.children,v),this},E.prototype.instructionAfter=function(b,p){var L,R,v;return R=this.parent.children.indexOf(this),v=this.parent.children.splice(R+1),L=this.parent.instruction(b,p),Array.prototype.push.apply(this.parent.children,v),this},E.prototype.declaration=function(b,p,L){var R,v;return R=this.document(),v=new y(R,b,p,L),R.children.length===0?R.children.unshift(v):R.children[0].type===g.Declaration?R.children[0]=v:R.children.unshift(v),R.root()||R},E.prototype.dtd=function(b,p){var L,R,v,x,w,T,F,P,A,z;for(R=this.document(),v=new m(R,b,p),A=R.children,x=w=0,F=A.length;w<F;x=++w)if(L=A[x],L.type===g.DocType)return R.children[x]=v,v;for(z=R.children,x=T=0,P=z.length;T<P;x=++T)if(L=z[x],L.isRoot)return R.children.splice(x,0,v),v;return R.children.push(v),v},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,L;return b=b||this.name,b==null&&!((p=this.parent)!=null?p.name:void 0)?"":b==null?"parent: <"+this.parent.name+">":((L=this.parent)!=null?L.name:void 0)?"node: <"+b+">, parent: <"+this.parent.name+">":"node: <"+b+">"},E.prototype.ele=function(b,p,L){return this.element(b,p,L)},E.prototype.nod=function(b,p,L){return this.node(b,p,L)},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,L){return this.declaration(b,p,L)},E.prototype.e=function(b,p,L){return this.element(b,p,L)},E.prototype.n=function(b,p,L){return this.node(b,p,L)},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,L;return p=this,p===b?0:this.document()!==b.document()?(L=N.Disconnected|N.ImplementationSpecific,Math.random()<.5?L|=N.Preceding:L|=N.Following,L):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,L,R;if(b.nodeType!==this.nodeType)return!1;if(b.children.length!==this.children.length)return!1;for(p=L=0,R=this.children.length-1;0<=R?L<=R:L>=R;p=0<=R?++L:--L)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,L){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,L,R,v,x;for(x=this.children,R=0,v=x.length;R<v;R++){if(p=x[R],b===p)return!0;if(L=p.isDescendant(b),L)return!0}return!1},E.prototype.isAncestor=function(b){return b.isDescendant(this)},E.prototype.isPreceding=function(b){var p,L;return p=this.treePosition(b),L=this.treePosition(this),p===-1||L===-1?!1:p<L},E.prototype.isFollowing=function(b){var p,L;return p=this.treePosition(b),L=this.treePosition(this),p===-1||L===-1?!1:p>L},E.prototype.treePosition=function(b){var p,L;return L=0,p=!1,this.foreachTreeNode(this.document(),function(R){if(L++,!p&&R===b)return p=!0}),p?L:-1},E.prototype.foreachTreeNode=function(b,p){var L,R,v,x,w;for(b||(b=this.document()),x=b.children,R=0,v=x.length;R<v;R++){if(L=x[R],w=p(L))return w;if(w=this.foreachTreeNode(L,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,J,I){"use strict";(function(){var N;J.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,J,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,y,m,C=function(f,r){for(var c in r)_.call(r,c)&&(f[c]=r[c]);function i(){this.constructor=f}return i.prototype=r.prototype,f.prototype=new i,f.__super__=r.prototype,f},_={}.hasOwnProperty;k=H("./NodeType"),y=H("./XMLCharacterData"),J.exports=m=function(e){C(f,e);function f(r,c,i){if(f.__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 f.prototype.clone=function(){return(0,g.default)(this)},f.prototype.toString=function(r){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(r))},f.prototype.isEqualNode=function(r){return f.__super__.isEqualNode.apply(this,arguments).isEqualNode(r)?!(r.target!==this.target):!1},f}(y)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],276:[function(H,J,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,y,m,C=function(f,r){for(var c in r)_.call(r,c)&&(f[c]=r[c]);function i(){this.constructor=f}return i.prototype=r.prototype,f.prototype=new i,f.__super__=r.prototype,f},_={}.hasOwnProperty;k=H("./NodeType"),y=H("./XMLNode"),J.exports=m=function(e){C(f,e);function f(r,c){if(f.__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 f.prototype.clone=function(){return(0,g.default)(this)},f.prototype.toString=function(r){return this.options.writer.raw(this,this.options.writer.filterOptions(r))},f}(y)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],277:[function(H,J,I){"use strict";(function(){var N,g,S,k,y=function(_,e){for(var f in e)m.call(e,f)&&(_[f]=e[f]);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"),J.exports=S=function(C){y(_,C);function _(e,f){this.stream=e,_.__super__.constructor.call(this,f)}return _.prototype.endline=function(e,f,r){return e.isLastRootNode&&f.state===g.CloseTag?"":_.__super__.endline.call(this,e,f,r)},_.prototype.document=function(e,f){var r,c,i,n,o,h,d,u,s;for(d=e.children,c=i=0,o=d.length;i<o;c=++i)r=d[c],r.isLastRootNode=c===e.children.length-1;for(f=this.filterOptions(f),u=e.children,s=[],n=0,h=u.length;n<h;n++)r=u[n],s.push(this.writeChildNode(r,f,0));return s},_.prototype.attribute=function(e,f,r){return this.stream.write(_.__super__.attribute.call(this,e,f,r))},_.prototype.cdata=function(e,f,r){return this.stream.write(_.__super__.cdata.call(this,e,f,r))},_.prototype.comment=function(e,f,r){return this.stream.write(_.__super__.comment.call(this,e,f,r))},_.prototype.declaration=function(e,f,r){return this.stream.write(_.__super__.declaration.call(this,e,f,r))},_.prototype.docType=function(e,f,r){var c,i,n,o;if(r||(r=0),this.openNode(e,f,r),f.state=g.OpenTag,this.stream.write(this.indent(e,f,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,f,r)),f.state=g.InsideTag,o=e.children,i=0,n=o.length;i<n;i++)c=o[i],this.writeChildNode(c,f,r+1);f.state=g.CloseTag,this.stream.write("]")}return f.state=g.CloseTag,this.stream.write(f.spaceBeforeSlash+">"),this.stream.write(this.endline(e,f,r)),f.state=g.None,this.closeNode(e,f,r)},_.prototype.element=function(e,f,r){var c,i,n,o,h,d,u,s,l,E;r||(r=0),this.openNode(e,f,r),f.state=g.OpenTag,this.stream.write(this.indent(e,f,r)+"<"+e.name),l=e.attribs;for(u in l){if(!m.call(l,u))continue;c=l[u],this.attribute(c,f,r)}if(n=e.children.length,o=n===0?null:e.children[0],n===0||e.children.every(function(b){return(b.type===N.Text||b.type===N.Raw)&&b.value===""}))f.allowEmpty?(this.stream.write(">"),f.state=g.CloseTag,this.stream.write("</"+e.name+">")):(f.state=g.CloseTag,this.stream.write(f.spaceBeforeSlash+"/>"));else if(f.pretty&&n===1&&(o.type===N.Text||o.type===N.Raw)&&o.value!=null)this.stream.write(">"),f.state=g.InsideTag,f.suppressPrettyCount++,s=!0,this.writeChildNode(o,f,r+1),f.suppressPrettyCount--,s=!1,f.state=g.CloseTag,this.stream.write("</"+e.name+">");else{for(this.stream.write(">"+this.endline(e,f,r)),f.state=g.InsideTag,E=e.children,h=0,d=E.length;h<d;h++)i=E[h],this.writeChildNode(i,f,r+1);f.state=g.CloseTag,this.stream.write(this.indent(e,f,r)+"</"+e.name+">")}return this.stream.write(this.endline(e,f,r)),f.state=g.None,this.closeNode(e,f,r)},_.prototype.processingInstruction=function(e,f,r){return this.stream.write(_.__super__.processingInstruction.call(this,e,f,r))},_.prototype.raw=function(e,f,r){return this.stream.write(_.__super__.raw.call(this,e,f,r))},_.prototype.text=function(e,f,r){return this.stream.write(_.__super__.text.call(this,e,f,r))},_.prototype.dtdAttList=function(e,f,r){return this.stream.write(_.__super__.dtdAttList.call(this,e,f,r))},_.prototype.dtdElement=function(e,f,r){return this.stream.write(_.__super__.dtdElement.call(this,e,f,r))},_.prototype.dtdEntity=function(e,f,r){return this.stream.write(_.__super__.dtdEntity.call(this,e,f,r))},_.prototype.dtdNotation=function(e,f,r){return this.stream.write(_.__super__.dtdNotation.call(this,e,f,r))},_}(k)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(H,J,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"),J.exports=N=function(y){S(m,y);function m(C){m.__super__.constructor.call(this,C)}return m.prototype.document=function(C,_){var e,f,r,c,i;for(_=this.filterOptions(_),c="",i=C.children,f=0,r=i.length;f<r;f++)e=i[f],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,J,I){"use strict";(function(){var N,g=function(y,m){return function(){return y.apply(m,arguments)}},S={}.hasOwnProperty;J.exports=N=function(){function k(y){this.assertLegalName=g(this.assertLegalName,this),this.assertLegalChar=g(this.assertLegalChar,this);var m,C,_;y||(y={}),this.options=y,this.options.version||(this.options.version="1.0"),C=y.stringify||{};for(m in C){if(!S.call(C,m))continue;_=C[m],this[m]=_}}return k.prototype.name=function(y){return this.options.noValidation?y:this.assertLegalName(""+y||"")},k.prototype.text=function(y){return this.options.noValidation?y:this.assertLegalChar(this.textEscape(""+y||""))},k.prototype.cdata=function(y){return this.options.noValidation?y:(y=""+y||"",y=y.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(y))},k.prototype.comment=function(y){if(this.options.noValidation)return y;if(y=""+y||"",y.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+y);return this.assertLegalChar(y)},k.prototype.raw=function(y){return this.options.noValidation?y:""+y||""},k.prototype.attValue=function(y){return this.options.noValidation?y:this.assertLegalChar(this.attEscape(y=""+y||""))},k.prototype.insTarget=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},k.prototype.insValue=function(y){if(this.options.noValidation)return y;if(y=""+y||"",y.match(/\?>/))throw new Error("Invalid processing instruction value: "+y);return this.assertLegalChar(y)},k.prototype.xmlVersion=function(y){if(this.options.noValidation)return y;if(y=""+y||"",!y.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+y);return y},k.prototype.xmlEncoding=function(y){if(this.options.noValidation)return y;if(y=""+y||"",!y.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+y);return this.assertLegalChar(y)},k.prototype.xmlStandalone=function(y){return this.options.noValidation?y:y?"yes":"no"},k.prototype.dtdPubID=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},k.prototype.dtdSysID=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},k.prototype.dtdElementValue=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},k.prototype.dtdAttType=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},k.prototype.dtdAttDefault=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},k.prototype.dtdEntityValue=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},k.prototype.dtdNData=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},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(y){var m,C;if(this.options.noValidation)return y;if(m="",this.options.version==="1.0"){if(m=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,C=y.match(m))throw new Error("Invalid character in string: "+y+" at index "+C.index)}else if(this.options.version==="1.1"&&(m=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,C=y.match(m)))throw new Error("Invalid character in string: "+y+" at index "+C.index);return y},k.prototype.assertLegalName=function(y){var m;if(this.options.noValidation)return y;if(this.assertLegalChar(y),m=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!y.match(m))throw new Error("Invalid character in name");return y},k.prototype.textEscape=function(y){var m;return this.options.noValidation?y:(m=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,y.replace(m,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))},k.prototype.attEscape=function(y){var m;return this.options.noValidation?y:(m=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,y.replace(m,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))},k}()}).call(void 0)},{}],280:[function(H,J,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,y,m,C=function(f,r){for(var c in r)_.call(r,c)&&(f[c]=r[c]);function i(){this.constructor=f}return i.prototype=r.prototype,f.prototype=new i,f.__super__=r.prototype,f},_={}.hasOwnProperty;k=H("./NodeType"),y=H("./XMLCharacterData"),J.exports=m=function(e){C(f,e);function f(r,c){if(f.__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(f.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(f.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}}),f.prototype.clone=function(){return(0,g.default)(this)},f.prototype.toString=function(r){return this.options.writer.text(this,this.options.writer.filterOptions(r))},f.prototype.splitText=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.replaceWholeText=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},f}(y)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],281:[function(H,J,I){"use strict";(function(){var N,g,S,k,y,m,C,_,e,f,r,c,i,n,o,h,d,u={}.hasOwnProperty;d=H("./Utility").assign,N=H("./NodeType"),e=H("./XMLDeclaration"),f=H("./XMLDocType"),S=H("./XMLCData"),k=H("./XMLComment"),c=H("./XMLElement"),n=H("./XMLRaw"),o=H("./XMLText"),i=H("./XMLProcessingInstruction"),r=H("./XMLDummy"),y=H("./XMLDTDAttList"),m=H("./XMLDTDElement"),C=H("./XMLDTDEntity"),_=H("./XMLDTDNotation"),g=H("./WriterState"),J.exports=h=function(){function s(l){var E,b,p;l||(l={}),this.options=l,b=l.writer||{};for(E in b){if(!u.call(b,E))continue;p=b[E],this["_"+E]=this[E],this[E]=p}}return s.prototype.filterOptions=function(l){var E,b,p,L,R,v,x,w;return l||(l={}),l=d({},this.options,l),E={writer:this},E.pretty=l.pretty||!1,E.allowEmpty=l.allowEmpty||!1,E.indent=(b=l.indent)!=null?b:" ",E.newline=(p=l.newline)!=null?p:`
`,E.offset=(L=l.offset)!=null?L:0,E.dontPrettyTextNodes=(R=(v=l.dontPrettyTextNodes)!=null?v:l.dontprettytextnodes)!=null?R:0,E.spaceBeforeSlash=(x=(w=l.spaceBeforeSlash)!=null?w:l.spacebeforeslash)!=null?x:"",E.spaceBeforeSlash===!0&&(E.spaceBeforeSlash=" "),E.suppressPrettyCount=0,E.user={},E.state=g.None,E},s.prototype.indent=function(l,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):""},s.prototype.endline=function(l,E,b){return!E.pretty||E.suppressPrettyCount?"":E.newline},s.prototype.attribute=function(l,E,b){var p;return this.openAttribute(l,E,b),p=" "+l.name+'="'+l.value+'"',this.closeAttribute(l,E,b),p},s.prototype.cdata=function(l,E,b){var p;return this.openNode(l,E,b),E.state=g.OpenTag,p=this.indent(l,E,b)+"<![CDATA[",E.state=g.InsideTag,p+=l.value,E.state=g.CloseTag,p+="]]>"+this.endline(l,E,b),E.state=g.None,this.closeNode(l,E,b),p},s.prototype.comment=function(l,E,b){var p;return this.openNode(l,E,b),E.state=g.OpenTag,p=this.indent(l,E,b)+"<!-- ",E.state=g.InsideTag,p+=l.value,E.state=g.CloseTag,p+=" -->"+this.endline(l,E,b),E.state=g.None,this.closeNode(l,E,b),p},s.prototype.declaration=function(l,E,b){var p;return this.openNode(l,E,b),E.state=g.OpenTag,p=this.indent(l,E,b)+"<?xml",E.state=g.InsideTag,p+=' version="'+l.version+'"',l.encoding!=null&&(p+=' encoding="'+l.encoding+'"'),l.standalone!=null&&(p+=' standalone="'+l.standalone+'"'),E.state=g.CloseTag,p+=E.spaceBeforeSlash+"?>",p+=this.endline(l,E,b),E.state=g.None,this.closeNode(l,E,b),p},s.prototype.docType=function(l,E,b){var p,L,R,v,x;if(b||(b=0),this.openNode(l,E,b),E.state=g.OpenTag,v=this.indent(l,E,b),v+="<!DOCTYPE "+l.root().name,l.pubID&&l.sysID?v+=' PUBLIC "'+l.pubID+'" "'+l.sysID+'"':l.sysID&&(v+=' SYSTEM "'+l.sysID+'"'),l.children.length>0){for(v+=" [",v+=this.endline(l,E,b),E.state=g.InsideTag,x=l.children,L=0,R=x.length;L<R;L++)p=x[L],v+=this.writeChildNode(p,E,b+1);E.state=g.CloseTag,v+="]"}return E.state=g.CloseTag,v+=E.spaceBeforeSlash+">",v+=this.endline(l,E,b),E.state=g.None,this.closeNode(l,E,b),v},s.prototype.element=function(l,E,b){var p,L,R,v,x,w,T,F,P,A,z,K,O,B;b||(b=0),A=!1,z="",this.openNode(l,E,b),E.state=g.OpenTag,z+=this.indent(l,E,b)+"<"+l.name,K=l.attribs;for(P in K){if(!u.call(K,P))continue;p=K[P],z+=this.attribute(p,E,b)}if(R=l.children.length,v=R===0?null:l.children[0],R===0||l.children.every(function(U){return(U.type===N.Text||U.type===N.Raw)&&U.value===""}))E.allowEmpty?(z+=">",E.state=g.CloseTag,z+="</"+l.name+">"+this.endline(l,E,b)):(E.state=g.CloseTag,z+=E.spaceBeforeSlash+"/>"+this.endline(l,E,b));else if(E.pretty&&R===1&&(v.type===N.Text||v.type===N.Raw)&&v.value!=null)z+=">",E.state=g.InsideTag,E.suppressPrettyCount++,A=!0,z+=this.writeChildNode(v,E,b+1),E.suppressPrettyCount--,A=!1,E.state=g.CloseTag,z+="</"+l.name+">"+this.endline(l,E,b);else{if(E.dontPrettyTextNodes){for(O=l.children,x=0,T=O.length;x<T;x++)if(L=O[x],(L.type===N.Text||L.type===N.Raw)&&L.value!=null){E.suppressPrettyCount++,A=!0;break}}for(z+=">"+this.endline(l,E,b),E.state=g.InsideTag,B=l.children,w=0,F=B.length;w<F;w++)L=B[w],z+=this.writeChildNode(L,E,b+1);E.state=g.CloseTag,z+=this.indent(l,E,b)+"</"+l.name+">",A&&E.suppressPrettyCount--,z+=this.endline(l,E,b),E.state=g.None}return this.closeNode(l,E,b),z},s.prototype.writeChildNode=function(l,E,b){switch(l.type){case N.CData:return this.cdata(l,E,b);case N.Comment:return this.comment(l,E,b);case N.Element:return this.element(l,E,b);case N.Raw:return this.raw(l,E,b);case N.Text:return this.text(l,E,b);case N.ProcessingInstruction:return this.processingInstruction(l,E,b);case N.Dummy:return"";case N.Declaration:return this.declaration(l,E,b);case N.DocType:return this.docType(l,E,b);case N.AttributeDeclaration:return this.dtdAttList(l,E,b);case N.ElementDeclaration:return this.dtdElement(l,E,b);case N.EntityDeclaration:return this.dtdEntity(l,E,b);case N.NotationDeclaration:return this.dtdNotation(l,E,b);default:throw new Error("Unknown XML node type: "+l.constructor.name)}},s.prototype.processingInstruction=function(l,E,b){var p;return this.openNode(l,E,b),E.state=g.OpenTag,p=this.indent(l,E,b)+"<?",E.state=g.InsideTag,p+=l.target,l.value&&(p+=" "+l.value),E.state=g.CloseTag,p+=E.spaceBeforeSlash+"?>",p+=this.endline(l,E,b),E.state=g.None,this.closeNode(l,E,b),p},s.prototype.raw=function(l,E,b){var p;return this.openNode(l,E,b),E.state=g.OpenTag,p=this.indent(l,E,b),E.state=g.InsideTag,p+=l.value,E.state=g.CloseTag,p+=this.endline(l,E,b),E.state=g.None,this.closeNode(l,E,b),p},s.prototype.text=function(l,E,b){var p;return this.openNode(l,E,b),E.state=g.OpenTag,p=this.indent(l,E,b),E.state=g.InsideTag,p+=l.value,E.state=g.CloseTag,p+=this.endline(l,E,b),E.state=g.None,this.closeNode(l,E,b),p},s.prototype.dtdAttList=function(l,E,b){var p;return this.openNode(l,E,b),E.state=g.OpenTag,p=this.indent(l,E,b)+"<!ATTLIST",E.state=g.InsideTag,p+=" "+l.elementName+" "+l.attributeName+" "+l.attributeType,l.defaultValueType!=="#DEFAULT"&&(p+=" "+l.defaultValueType),l.defaultValue&&(p+=' "'+l.defaultValue+'"'),E.state=g.CloseTag,p+=E.spaceBeforeSlash+">"+this.endline(l,E,b),E.state=g.None,this.closeNode(l,E,b),p},s.prototype.dtdElement=function(l,E,b){var p;return this.openNode(l,E,b),E.state=g.OpenTag,p=this.indent(l,E,b)+"<!ELEMENT",E.state=g.InsideTag,p+=" "+l.name+" "+l.value,E.state=g.CloseTag,p+=E.spaceBeforeSlash+">"+this.endline(l,E,b),E.state=g.None,this.closeNode(l,E,b),p},s.prototype.dtdEntity=function(l,E,b){var p;return this.openNode(l,E,b),E.state=g.OpenTag,p=this.indent(l,E,b)+"<!ENTITY",E.state=g.InsideTag,l.pe&&(p+=" %"),p+=" "+l.name,l.value?p+=' "'+l.value+'"':(l.pubID&&l.sysID?p+=' PUBLIC "'+l.pubID+'" "'+l.sysID+'"':l.sysID&&(p+=' SYSTEM "'+l.sysID+'"'),l.nData&&(p+=" NDATA "+l.nData)),E.state=g.CloseTag,p+=E.spaceBeforeSlash+">"+this.endline(l,E,b),E.state=g.None,this.closeNode(l,E,b),p},s.prototype.dtdNotation=function(l,E,b){var p;return this.openNode(l,E,b),E.state=g.OpenTag,p=this.indent(l,E,b)+"<!NOTATION",E.state=g.InsideTag,p+=" "+l.name,l.pubID&&l.sysID?p+=' PUBLIC "'+l.pubID+'" "'+l.sysID+'"':l.pubID?p+=' PUBLIC "'+l.pubID+'"':l.sysID&&(p+=' SYSTEM "'+l.sysID+'"'),E.state=g.CloseTag,p+=E.spaceBeforeSlash+">"+this.endline(l,E,b),E.state=g.None,this.closeNode(l,E,b),p},s.prototype.openNode=function(l,E,b){},s.prototype.closeNode=function(l,E,b){},s.prototype.openAttribute=function(l,E,b){},s.prototype.closeAttribute=function(l,E,b){},s}()}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLCData":255,"./XMLComment":257,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDummy":270,"./XMLElement":271,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLText":280}],282:[function(H,J,I){"use strict";(function(){var N,g,S,k,y,m,C,_,e,f;f=H("./Utility"),_=f.assign,e=f.isFunction,S=H("./XMLDOMImplementation"),k=H("./XMLDocument"),y=H("./XMLDocumentCB"),C=H("./XMLStringWriter"),m=H("./XMLStreamWriter"),N=H("./NodeType"),g=H("./WriterState"),J.exports.create=function(r,c,i,n){var o,h;if(r==null)throw new Error("Root element needs a name.");return n=_({},c,i,n),o=new k(n),h=o.element(r),n.headless||(o.declaration(n),(n.pubID!=null||n.sysID!=null)&&o.dtd(n)),h},J.exports.begin=function(r,c,i){var n;return e(r)&&(n=[r,c],c=n[0],i=n[1],r={}),c?new y(r,c,i):new k(r)},J.exports.stringWriter=function(r){return new C(r)},J.exports.streamWriter=function(r,c){return new m(r,c)},J.exports.implementation=new S,J.exports.nodeType=N,J.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,J,I){J.exports=g;var N=Object.prototype.hasOwnProperty;function g(){for(var S={},k=0;k<arguments.length;k++){var y=arguments[k];for(var m in y)N.call(y,m)&&(S[m]=y[m])}return S}},{}],284:[function(H,J,I){"use strict";var N=H("buffer").Buffer,g=H("./sha"),S=H("./md5"),k={sha1:g,md5:S},y=64,m=N.alloc(y);m.fill(0);function C(f,r,c){N.isBuffer(r)||(r=N.from(r)),N.isBuffer(c)||(c=N.from(c)),r.length>y?r=f(r):r.length<y&&(r=N.concat([r,m],y));for(var i=N.alloc(y),n=N.alloc(y),o=0;o<y;o++)i[o]=r[o]^54,n[o]=r[o]^92;var h=f(N.concat([i,c]));return f(N.concat([n,h]))}function _(f,r){f=f||"sha1";var c=k[f],i=[],n=0;return c||e("algorithm:",f,"is not yet supported"),{update:function(h){return N.isBuffer(h)||(h=N.from(h)),i.push(h),n+=h.length,this},digest:function(h){var d=N.concat(i),u=r?C(c,r,d):c(d);return i=null,h?u.toString(h):u}}}function e(){var f=[].slice.call(arguments).join(" ");throw new Error([f,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
`))}I.createHash=function(f){return _(f)},I.createHmac=function(f,r){return _(f,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,J,I){"use strict";var N=H("buffer").Buffer,g=4,S=N.alloc(g);S.fill(0);var k=8;function y(_,e){if(_.length%g!==0){var f=_.length+(g-_.length%g);_=N.concat([_,S],f)}for(var r=[],c=e?_.readInt32BE:_.readInt32LE,i=0;i<_.length;i+=g)r.push(c.call(_,i));return r}function m(_,e,f){for(var r=N.alloc(e),c=f?r.writeInt32BE:r.writeInt32LE,i=0;i<_.length;i++)c.call(r,_[i],i*4,!0);return r}function C(_,e,f,r){N.isBuffer(_)||(_=N.from(_));var c=e(y(_,r),_.length*k);return m(c,f,r)}J.exports={hash:C}},{buffer:73}],286:[function(H,J,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,o=-1732584194,h=271733878,d=0;d<r.length;d+=16){var u=i,s=n,l=o,E=h;i=y(i,n,o,h,r[d+0],7,-680876936),h=y(h,i,n,o,r[d+1],12,-389564586),o=y(o,h,i,n,r[d+2],17,606105819),n=y(n,o,h,i,r[d+3],22,-1044525330),i=y(i,n,o,h,r[d+4],7,-176418897),h=y(h,i,n,o,r[d+5],12,1200080426),o=y(o,h,i,n,r[d+6],17,-1473231341),n=y(n,o,h,i,r[d+7],22,-45705983),i=y(i,n,o,h,r[d+8],7,1770035416),h=y(h,i,n,o,r[d+9],12,-1958414417),o=y(o,h,i,n,r[d+10],17,-42063),n=y(n,o,h,i,r[d+11],22,-1990404162),i=y(i,n,o,h,r[d+12],7,1804603682),h=y(h,i,n,o,r[d+13],12,-40341101),o=y(o,h,i,n,r[d+14],17,-1502002290),n=y(n,o,h,i,r[d+15],22,1236535329),i=m(i,n,o,h,r[d+1],5,-165796510),h=m(h,i,n,o,r[d+6],9,-1069501632),o=m(o,h,i,n,r[d+11],14,643717713),n=m(n,o,h,i,r[d+0],20,-373897302),i=m(i,n,o,h,r[d+5],5,-701558691),h=m(h,i,n,o,r[d+10],9,38016083),o=m(o,h,i,n,r[d+15],14,-660478335),n=m(n,o,h,i,r[d+4],20,-405537848),i=m(i,n,o,h,r[d+9],5,568446438),h=m(h,i,n,o,r[d+14],9,-1019803690),o=m(o,h,i,n,r[d+3],14,-187363961),n=m(n,o,h,i,r[d+8],20,1163531501),i=m(i,n,o,h,r[d+13],5,-1444681467),h=m(h,i,n,o,r[d+2],9,-51403784),o=m(o,h,i,n,r[d+7],14,1735328473),n=m(n,o,h,i,r[d+12],20,-1926607734),i=C(i,n,o,h,r[d+5],4,-378558),h=C(h,i,n,o,r[d+8],11,-2022574463),o=C(o,h,i,n,r[d+11],16,1839030562),n=C(n,o,h,i,r[d+14],23,-35309556),i=C(i,n,o,h,r[d+1],4,-1530992060),h=C(h,i,n,o,r[d+4],11,1272893353),o=C(o,h,i,n,r[d+7],16,-155497632),n=C(n,o,h,i,r[d+10],23,-1094730640),i=C(i,n,o,h,r[d+13],4,681279174),h=C(h,i,n,o,r[d+0],11,-358537222),o=C(o,h,i,n,r[d+3],16,-722521979),n=C(n,o,h,i,r[d+6],23,76029189),i=C(i,n,o,h,r[d+9],4,-640364487),h=C(h,i,n,o,r[d+12],11,-421815835),o=C(o,h,i,n,r[d+15],16,530742520),n=C(n,o,h,i,r[d+2],23,-995338651),i=_(i,n,o,h,r[d+0],6,-198630844),h=_(h,i,n,o,r[d+7],10,1126891415),o=_(o,h,i,n,r[d+14],15,-1416354905),n=_(n,o,h,i,r[d+5],21,-57434055),i=_(i,n,o,h,r[d+12],6,1700485571),h=_(h,i,n,o,r[d+3],10,-1894986606),o=_(o,h,i,n,r[d+10],15,-1051523),n=_(n,o,h,i,r[d+1],21,-2054922799),i=_(i,n,o,h,r[d+8],6,1873313359),h=_(h,i,n,o,r[d+15],10,-30611744),o=_(o,h,i,n,r[d+6],15,-1560198380),n=_(n,o,h,i,r[d+13],21,1309151649),i=_(i,n,o,h,r[d+4],6,-145523070),h=_(h,i,n,o,r[d+11],10,-1120210379),o=_(o,h,i,n,r[d+2],15,718787259),n=_(n,o,h,i,r[d+9],21,-343485551),i=e(i,u),n=e(n,s),o=e(o,l),h=e(h,E)}return Array(i,n,o,h)}function k(r,c,i,n,o,h){return e(f(e(e(c,r),e(n,h)),o),i)}function y(r,c,i,n,o,h,d){return k(c&i|~c&n,r,c,o,h,d)}function m(r,c,i,n,o,h,d){return k(c&n|i&~n,r,c,o,h,d)}function C(r,c,i,n,o,h,d){return k(c^i^n,r,c,o,h,d)}function _(r,c,i,n,o,h,d){return k(i^(c|~n),r,c,o,h,d)}function e(r,c){var i=(r&65535)+(c&65535),n=(r>>16)+(c>>16)+(i>>16);return n<<16|i&65535}function f(r,c){return r<<c|r>>>32-c}J.exports=function(c){return N.hash(c,S,16)}},{"./helpers":285}],287:[function(H,J,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),f=1732584193,r=-271733879,c=-1732584194,i=271733878,n=-1009589776,o=0;o<C.length;o+=16){for(var h=f,d=r,u=c,s=i,l=n,E=0;E<80;E++){E<16?e[E]=C[o+E]:e[E]=m(e[E-3]^e[E-8]^e[E-14]^e[E-16],1);var b=y(y(m(f,5),S(E,r,c,i)),y(y(n,e[E]),k(E)));n=i,i=c,c=m(r,30),r=f,f=b}f=y(f,h),r=y(r,d),c=y(c,u),i=y(i,s),n=y(n,l)}return Array(f,r,c,i,n)}function S(C,_,e,f){return C<20?_&e|~_&f:C<40?_^e^f:C<60?_&e|_&f|e&f:_^e^f}function k(C){return C<20?1518500249:C<40?1859775393:C<60?-1894007588:-899497514}function y(C,_){var e=(C&65535)+(_&65535),f=(C>>16)+(_>>16)+(e>>16);return f<<16|e&65535}function m(C,_){return C<<_|C>>>32-_}J.exports=function(_){return N.hash(_,g,20,!0)}},{"./helpers":285}],288:[function(H,J,I){"use strict";J.exports=function(){return function(){}}},{}],289:[function(H,J,I){(function(N){"use strict";var g=H("babel-runtime/helpers/typeof"),S=k(g);function k(f){return f&&f.__esModule?f:{default:f}}var y=H("stream"),m=y.Stream,C=H("../lib/common/utils/isArray"),_=C.isArray;J.exports.string=function(r){return typeof r=="string"},J.exports.array=_,J.exports.buffer=N.isBuffer;function e(f){return f instanceof m}J.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,J,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,J,I){(function(N,g){"use strict";var S=H("babel-runtime/core-js/json/stringify"),k=C(S),y=H("babel-runtime/helpers/typeof"),m=C(y);function C(E){return E&&E.__esModule?E:{default:E}}var _=H("util"),e=H("url"),f=H("http"),r=H("https"),c=H("debug")("urllib"),i=H("humanize-ms"),n,o=0,h=Math.pow(2,31)-10,d=/^https?:\/\//i;function u(E,b){return E===void 0?b:E}function s(E,b){return function(p,L,R){if(p)return b(p);E({data:L,status:R.statusCode,headers:R.headers,res:R})}}I.TIMEOUTS=[i("300s"),i("300s")];var l=["json","text"];I.request=function(b,p,L){return arguments.length===2&&typeof p=="function"&&(L=p,p=null),typeof L=="function"?I.requestWithCallback(b,p,L):(n||(n=H("any-promise")),new n(function(R,v){I.requestWithCallback(b,p,s(R,v))}))},I.requestWithCallback=function(b,p,L){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"&&(L=p,p=null),p=p||{},o>=h&&(o=0);var v=++o;p.requestUrls=p.requestUrls||[];var x={requestId:v,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=f,z=u(p.agent,I.agent),K=p.fixJSONCtlChars;T.protocol==="https:"&&(A=r,z=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:z,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 D=B[U];p.hasOwnProperty(D)&&(O[D]=p[D])}O.rejectUnauthorized===!1&&!O.hasOwnProperty("secureOptions")&&(O.secureOptions=H("constants").SSL_OP_NO_TLSv1_2);var W=p.auth||T.auth;W&&(O.auth=W);var Q=p.content||p.data,re=F==="GET"||F==="HEAD"||p.dataAsQueryString;if(!p.content&&(Q&&!(typeof Q=="string"||g.isBuffer(Q))))if(re)Q=p.nestedQuerystring?qs.stringify(Q):querystring.stringify(Q);else{var ee=O.headers["Content-Type"]||O.headers["content-type"];ee||(p.contentType==="json"?ee="application/json":ee="application/x-www-form-urlencoded",O.headers["Content-Type"]=ee),parseContentType(ee).type==="application/json"?Q=(0,k.default)(Q):Q=p.nestedQuerystring?qs.stringify(Q):querystring.stringify(Q)}re&&Q&&(O.path+=(T.query?"&":"?")+Q,Q=null);var ye=0;if(Q){var be=Q.length;g.isBuffer(Q)||(be=g.byteLength(Q)),ye=O.headers["Content-Length"]=be}p.dataType==="json"&&(O.headers.Accept="application/json"),typeof p.beforeRequest=="function"&&p.beforeRequest(O);var he=null,Ie=null,Se=null,fe=!1,ue=!1,ie=0,Ce=-1,ne=!1,ce="",Ae="",oe=null;p.timing&&(oe={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function q(){he&&(clearTimeout(he),he=null)}function $(){Ie&&(clearTimeout(Ie),Ie=null)}function X(De,nt,lt){if($(),!L){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),v,N.pid,O.method,b),De&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
stack: %s`,Date(),v,N.pid,De.name,De.message,De.stack);return}var Ve=L;L=null;var Qe={};if(lt&&(Ce=lt.statusCode,Qe=lt.headers),Ce===401&&Qe["www-authenticate"]&&(!p.headers||!p.headers.Authorization)&&p.digestAuth){var Fe=Qe["www-authenticate"];if(Fe.indexOf("Digest ")>=0)return c("Request#%d %s: got digest auth header WWW-Authenticate: %s",v,b,Fe),p.headers=p.headers||{},p.headers.Authorization=digestAuthHeader(O.method,O.path,Fe,p.digestAuth),c("Request#%d %s: auth with digest header: %s",v,b,p.headers.Authorization),lt.headers["set-cookie"]&&(p.headers.Cookie=lt.headers["set-cookie"].join(";")),I.requestWithCallback(b,p,Ve)}var Re=Date.now()-w;oe&&(oe.contentDownload=Re),c("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Re,ie,Ce,O.method,O.host,O.path,ue,oe);var Me={status:Ce,statusCode:Ce,headers:Qe,size:ie,aborted:ne,rt:Re,keepAliveSocket:ue,data:nt,requestUrls:p.requestUrls,timing:oe,remoteAddress:ce,remotePort:Ae};if(De){var Ee="";z&&typeof z.getCurrentStatus=="function"&&(Ee=", agent status: "+(0,k.default)(z.getCurrentStatus())),De.message+=", "+O.method+" "+b+" "+Ce+" (connected: "+fe+", keepalive socket: "+ue+Ee+`)
headers: `+(0,k.default)(Qe),De.data=nt,De.path=O.path,De.status=Ce,De.headers=Qe,De.res=Me}Ve(De,nt,p.streaming?lt:Me),p.emitter&&(x.url=b,x.socket=at&&at.connection,x.options=O,x.size=ye,p.emitter.emit("response",{requestId:v,error:De,ctx:p.ctx,req:x,res:Me}))}function de(De){var nt=null;if(p.followRedirect&&statuses.redirect[De.statusCode]){p._followRedirectCount=(p._followRedirectCount||0)+1;var lt=De.headers.location;if(!lt)nt=new Error("Got statusCode "+De.statusCode+" but cannot resolve next location from headers"),nt.name="FollowRedirectError";else if(p._followRedirectCount>p.maxRedirects)nt=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+b),nt.name="MaxRedirectError";else{var Ve=p.formatRedirectUrl?p.formatRedirectUrl(b,lt):e.resolve(b,lt);c("Request#%d %s: `redirected` from %s to %s",v,O.path,b,Ve),$(),p.headers&&p.headers.Host&&d.test(lt)&&(p.headers.Host=null);var Qe=L;return L=null,I.requestWithCallback(Ve,p,Qe),{redirect:!0,error:null}}}return{redirect:!1,error:nt}}!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 pe(De,nt,lt){var Ve=De.headers["content-encoding"];return lt(null,nt,Ve)}var xe=p.writeStream;c("Request#%d %s %s with headers %j, options.path: %s",v,F,b,O.headers,O.path),p.requestUrls.push(b);function Ke(De){if(oe&&(oe.waiting=Date.now()-w),c("Request#%d %s `req response` event emit: status %d, headers: %j",v,b,De.statusCode,De.headers),p.streaming){var nt=de(De);if(nt.redirect){De.resume();return}return nt.error?(De.resume(),X(nt.error,null,De)):X(null,null,De)}if(De.on("close",function(){c("Request#%d %s: `res close` event emit, total size %d",v,b,ie)}),De.on("error",function(){c("Request#%d %s: `res error` event emit, total size %d",v,b,ie)}),De.on("aborted",function(){ne=!0,c("Request#%d %s: `res aborted` event emit, total size %d",v,b,ie)}),xe){var nt=de(De);if(nt.redirect){De.resume();return}return nt.error?(De.resume(),xe.end(),X(nt.error,null,De)):(p.consumeWriteStream===!1?De.on("end",X.bind(null,null,null,De)):isNode010||isNode012?first([[xe,"close"],[De,"aborted"]],function(Qe,Fe,Re){c("Request#%d %s: writeStream or res %s event emitted",v,b,Re),X(Se||null,null,De)}):xe.on("close",function(){c("Request#%d %s: writeStream close event emitted",v,b),X(Se||null,null,De)}),De.pipe(xe))}var lt=[];De.on("data",function(Ve){c("Request#%d %s: `res data` event emit, size %d",v,b,Ve.length),ie+=Ve.length,lt.push(Ve)}),De.on("end",function(){var Ve=g.concat(lt,ie);if(c("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",v,b,ie,De._dumped),Se)return X(Se,Ve,De);var Qe=de(De);if(Qe.error)return X(Qe.error,Ve,De);if(Qe.redirect)return;pe(De,Ve,function(Fe,Re,Me){if(Fe)return X(Fe,Ve,De);if(!Me&&l.indexOf(p.dataType)>=0){try{Re=decodeBodyByCharset(Re,De)}catch(Oe){return c("decodeBodyByCharset error: %s",Oe),X(null,Re,De)}if(p.dataType==="json")if(ie===0)Re=null;else{var Ee=parseJSON(Re,K);Ee.error?Fe=Ee.error:Re=Ee.data}}ne&&c("Request#%d %s: Remote socket was terminated before `response.end()` was called",v,b),X(Fe,Re,De)})})}var qe,tt;Array.isArray(p.timeout)?(qe=i(p.timeout[0]),tt=i(p.timeout[1])):qe=tt=i(p.timeout),c("ConnectTimeout: %d, ResponseTimeout: %d",qe,tt);function et(){c("Connect timer ticking, timeout: %d",qe),he=setTimeout(function(){he=null,Ce===-1&&(Ce=-2);var De="Connect timeout for "+qe+"ms",nt="ConnectionTimeoutError";at.socket||(nt="SocketAssignTimeoutError",De+=", working sockets is full"),Se=new Error(De),Se.name=nt,Se.requestId=v,c("ConnectTimeout: Request#%d %s %s: %s, connected: %s",v,b,Se.name,De,fe),je()},qe)}function it(){c("Response timer ticking, timeout: %d",tt),Ie=setTimeout(function(){Ie=null;var De="Response timeout for "+tt+"ms",nt="ResponseTimeoutError";Se=new Error(De),Se.name=nt,Se.requestId=v,c("ResponseTimeout: Request#%d %s %s: %s, connected: %s",v,b,Se.name,De,fe),je()},tt)}var at;O.mode=p.mode?p.mode:"";try{at=A.request(O,Ke)}catch(De){return X(De)}typeof window=="undefined"?et():at.on("requestTimeout",function(){Ce===-1&&(Ce=-2);var De="Connect timeout for "+qe+"ms",nt="ConnectionTimeoutError";Se=new Error(De),Se.name=nt,Se.requestId=v,je()});function je(){c("Request#%d %s abort, connected: %s",v,b,fe),at.socket||(Se.noSocket=!0,X(Se)),at.abort()}return oe&&at.on("finish",function(){oe.requestSent=Date.now()-w}),at.once("socket",function(De){oe&&(oe.queuing=Date.now()-w),isNode010&&De.socket&&(De=De.socket);var nt=De.readyState;if(nt==="opening"){De.once("lookup",function(lt,Ve,Qe){c("Request#%d %s lookup: %s, %s, %s",v,b,lt,Ve,Qe),oe&&(oe.dnslookup=Date.now()-w),Ve&&(ce=Ve)}),De.once("connect",function(){oe&&(oe.connected=Date.now()-w),q(),it(),c("Request#%d %s new socket connected",v,b),fe=!0,ce||(ce=De.remoteAddress),Ae=De.remotePort});return}c("Request#%d %s reuse socket connected, readyState: %s",v,b,nt),fe=!0,ue=!0,ce||(ce=De.remoteAddress),Ae=De.remotePort,q(),it()}),at.on("error",function(De){(De.name==="Error"||De.name==="TypeError")&&(De.name=fe?"ResponseError":"RequestError"),De.message+=' (req "error")',c("Request#%d %s `req error` event emit, %s: %s",v,b,De.name,De.message),X(Se||De)}),xe&&xe.once("error",function(De){De.message+=' (writeStream "error")',Se=De,c("Request#%d %s `writeStream error` event emit, %s: %s",v,b,De.name,De.message),je()}),p.stream?(p.stream.pipe(at),p.stream.once("error",function(De){De.message+=' (stream "error")',Se=De,c("Request#%d %s `readStream error` event emit, %s: %s",v,b,De.name,De.message),je()})):at.end(Q),at.requestId=v,at}}).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,J,I){"use strict";I.d(J,"a",function(){return _});var N=I("q1tI"),g=I("biw7"),S=I("fyJ8");function k(e){var f=e.className,r=e.index,c=e.children,i=e.colSpan,n=e.rowSpan,o=N.useContext(g.a),h=o.prefixCls,d=o.fixedInfoList,u=d[r];return N.createElement(S.a,Object.assign({className:f,index:r,component:"td",prefixCls:h,record:null,dataIndex:null,render:function(){return{children:c,props:{colSpan:i,rowSpan:n}}}},u))}function y(e){return N.createElement("tr",Object.assign({},e))}function m(e){var f=e.children,r=N.useContext(g.a),c=r.prefixCls;return N.createElement("tfoot",{className:"".concat(c,"-summary")},f)}var C=J.b=m,_={Cell:k,Row:y}},nEHx:function(H,J,I){"use strict";I.d(J,"a",function(){return N});var N;(function(g){g.DARK="dark",g.LIGHT="light",g.HIGH_CONTRAST="hc"})(N||(N={}))},nj2k:function(H,J,I){H.exports=I.p+"static/nodata.c3b0b86c.svg"},nnTU:function(H,J,I){"use strict";I.d(J,"b",function(){return C}),I.d(J,"a",function(){return _});var N=I("MI8n"),g=I("JYp7"),S=I("pmY6"),k=I("24hK"),y=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,f){if(!e)throw new Error("invalid command");if(typeof e=="string"){if(!f)throw new Error("invalid command");return this.registerCommand({id:e,handler:f})}if(e.description){const o=[];for(let d of e.description.args)o.push(d.constraint);const h=e.handler;e.handler=function(d,...u){return Object(y.o)(u,o),h(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 o=this._commands.get(r);(o==null?void 0:o.isEmpty())&&this._commands.delete(r)});return this._onDidRegisterCommand.fire(r),n}registerCommandAlias(e,f){return _.registerCommand(e,(r,...c)=>r.get(C).executeCommand(f,...c))}getCommand(e){const f=this._commands.get(e);return!f||f.isEmpty()?void 0:g.a.first(f)}getCommands(){const e=new Map;for(const f of this._commands.keys()){const r=this.getCommand(f);r&&e.set(f,r)}return e}};_.registerCommand("noop",()=>{})},oRuE:function(H,J,I){(function(N,g,S){H.exports=J=g(I("Ib8C"),I("OLod"))})(this,function(N){return N.pad.Iso10126={pad:function(g,S){var k=S*4,y=k-g.sigBytes%k;g.concat(N.lib.WordArray.random(y-1)).concat(N.lib.WordArray.create([y<<24],1))},unpad:function(g){var S=g.words[g.sigBytes-1>>>2]&255;g.sigBytes-=S}},N.pad.Iso10126})},osHv:function(H,J,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",y=k+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",m=new RegExp("<(/?)(["+k+"]["+y+"]*)","g");function C(d,u,s,l){this.line=u,this.ch=s,this.cm=d,this.text=d.getLine(u),this.min=l?Math.max(l.from,d.firstLine()):d.firstLine(),this.max=l?Math.min(l.to-1,d.lastLine()):d.lastLine()}function _(d,u){var s=d.cm.getTokenTypeAt(g(d.line,u));return s&&/\btag\b/.test(s)}function e(d){return d.line>=d.max?void 0:(d.ch=0,d.text=d.cm.getLine(++d.line),!0)}function f(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 s=d.text.lastIndexOf("/",u),l=s>-1&&!/\S/.test(d.text.slice(s+1,u));return d.ch=u+1,l?"selfClose":"regular"}}function c(d){for(;;){var u=d.ch?d.text.lastIndexOf("<",d.ch-1):-1;if(u==-1){if(f(d))continue;return}if(!_(d,u+1)){d.ch=u;continue}m.lastIndex=u,d.ch=u;var s=m.exec(d.text);if(s&&s.index==u)return s}}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(f(d))continue;return}if(!_(d,u+1)){d.ch=u;continue}var s=d.text.lastIndexOf("/",u),l=s>-1&&!/\S/.test(d.text.slice(s+1,u));return d.ch=u+1,l?"selfClose":"regular"}}function o(d,u){for(var s=[];;){var l=i(d),E,b=d.line,p=d.ch-(l?l[0].length:0);if(!l||!(E=r(d)))return;if(E=="selfClose")continue;if(l[1]){for(var L=s.length-1;L>=0;--L)if(s[L]==l[2]){s.length=L;break}if(L<0&&(!u||u==l[2]))return{tag:l[2],from:g(b,p),to:g(d.line,d.ch)}}else s.push(l[2])}}function h(d,u){for(var s=[];;){var l=n(d);if(!l)return;if(l=="selfClose"){c(d);continue}var E=d.line,b=d.ch,p=c(d);if(!p)return;if(p[1])s.push(p[2]);else{for(var L=s.length-1;L>=0;--L)if(s[L]==p[2]){s.length=L;break}if(L<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 s=new C(d,u.line,0);;){var l=i(s);if(!l||s.line!=u.line)return;var E=r(s);if(!E)return;if(!l[1]&&E!="selfClose"){var b=g(s.line,s.ch),p=o(s,l[2]);return p&&S(p.from,b)>0?{from:b,to:p.from}:null}}}),N.findMatchingTag=function(d,u,s){var l=new C(d,u.line,u.ch,s);if(l.text.indexOf(">")==-1&&l.text.indexOf("<")==-1)return;var E=r(l),b=E&&g(l.line,l.ch),p=E&&c(l);if(!E||!p||S(l,u)>0)return;var L={from:g(l.line,l.ch),to:b,tag:p[2]};return E=="selfClose"?{open:L,close:null,at:"open"}:p[1]?{open:h(l,p[2]),close:L,at:"close"}:(l=new C(d,b.line,b.ch,s),{open:L,close:o(l,p[2]),at:"open"})},N.findEnclosingTag=function(d,u,s,l){for(var E=new C(d,u.line,u.ch,s);;){var b=h(E,l);if(!b)break;var p=new C(d,u.line,u.ch,s),L=o(p,b.tag);if(L)return{open:b,close:L}}},N.scanForClosingTag=function(d,u,s,l){var E=new C(d,u.line,u.ch,l?{from:0,to:l}:null);return o(E,s)}})},p5ED:function(H,J,I){"use strict";var N=I("+L6B"),g=I("2/Rp"),S=I("5Dmo"),k=I("3S7+"),y=I("k1fw"),m=I("9og8"),C=I("tJVT"),_=I("WmNS"),e=I.n(_),f=I("q1tI"),r=I.n(f),c=I("vHTk"),i=I.n(c),n=I("yEEn"),o=I("ZW9T"),h=I("1vsH"),d=I("V0Rq"),u=I("m3rI");J.a=function(s){var l,E,b,p,L,R,v,x=s.editOffice,w=x===void 0?"view":x,T=s.data,F=s.theme,P=s.type,A=s.filename,z=s.monacoEditor,K=s.className,O=s.style,B=s.close,U=s.onClose,D=s.hasMask,W=s.disabledDownload,Q=Object(f.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),re=Object(C.a)(Q,2),ee=re[0],ye=re[1],be=Object(f.useState)(""),he=Object(C.a)(be,2),Ie=he[0],Se=he[1],fe=Object(f.useState)(),ue=Object(C.a)(fe,2),ie=ue[0],Ce=ue[1],ne=window.ENV==="build"?"/react/build":"",ce=u.a.PROXY_SERVER||location.origin,Ae,oe=1024*1024,q=10*oe,$=Object(f.useRef)();(l=T)!==null&&l!==void 0&&l.startsWith("/api")&&P!=="txt"&&(T=u.a.API_SERVER+T),P==="office"&&(Ae=Object(h.T)(T).filesize,Ae>q&&(P="other")),A&&z&&(z.filename=A),Object(f.useEffect)(function(){var xe,Ke,qe=(xe=document.cookie)===null||xe===void 0||((Ke=xe.replace(/\s/g,""))===null||Ke===void 0)?void 0:Ke.split(";");qe==null||qe.map(function(tt){var et=tt.split("=");et[0]==="_educoder_session"&&Se(et[1])})},[]),Object(f.useEffect)(function(){P==="office"&&X()},[P,T]);var X=function(){var xe=Object(m.a)(e.a.mark(function Ke(){var qe,tt,et;return e.a.wrap(function(at){for(;;)switch(at.prev=at.next){case 0:return console.log("data:",T),qe=T,T.startsWith("http")||(qe=location.origin+qe),tt=new URL(qe).pathname.split("/").pop(),at.next=6,Object(d.V)({attachment_id:tt});case 6:et=at.sent,Ce(et);case 8:case"end":return at.stop()}},Ke)}));return function(){return xe.apply(this,arguments)}}(),de=function(){if(T.startsWith("http")||T.startsWith("blob:")){pe();return}Object(h.z)(A||"educoder",T,A)},pe=function(){Object(h.x)(A||"educoder",decodeURIComponent(T))};return r.a.createElement("div",{style:Object(y.a)({},O||{}),className:"".concat(D&&i.a.bgBlack," ").concat(P?i.a.wrp:"hide")},B&&r.a.createElement("div",{className:i.a.close,ref:$},!W&&r.a.createElement(k.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return $.current}},r.a.createElement("span",{onClick:pe},r.a.createElement("i",{className:"icon-quxiaozhiding"}))),r.a.createElement(k.a,{title:"\u5173\u95ED",getPopupContainer:function(){return $.current}},r.a.createElement("span",{className:"",onClick:U},r.a.createElement("i",{className:"icon-guanbi1"})))),r.a.createElement("div",{className:"".concat(i.a[K]," ").concat(K," ").concat(i.a.monaco," ").concat(P==="txt"?"show":"hide")},P==="txt"&&r.a.createElement(o.b,z)),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"&&ie&&r.a.createElement("iframe",{src:"".concat(ne,"/office.html?key=").concat(ie.key,"&url=").concat(ce+ie.url,"&callbackUrl=").concat(ce+ie.callbackUrl,"&fileType=").concat(ie.fileType,"&title=").concat(ie.title,"&model=").concat(w,"&officeServer=").concat(u.a.OFFICE_SERVER,"&disabledDownload=").concat(!!W)}),P==="html"&&r.a.createElement("iframe",{src:T+"&disposition=inline"}),P==="pdf"&&r.a.createElement("iframe",{src:"".concat(ne,"/js/pdfview/index.html?url=").concat(T,"&disabledDownload=").concat(!!W)}),P==="image"&&r.a.createElement("img",{src:"".concat(((L=T)===null||L===void 0?void 0:L.indexOf("http://"))>-1||((R=T)===null||R===void 0?void 0:R.indexOf("https://"))>-1||(v=T)!==null&&v!==void 0&&v.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:de},r.a.createElement(n.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),P==="download"&&r.a.createElement(g.a,{type:"primary",size:"large",onClick:de},r.a.createElement(n.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(H,J,I){},pA7S:function(H,J,I){(function(N,g,S){H.exports=J=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,y=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],f=[{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=y.extend({_doReset:function(){for(var h=this._key,d=h.words,u=[],s=0;s<56;s++){var l=C[s]-1;u[s]=d[l>>>5]>>>31-l%32&1}for(var E=this._subKeys=[],b=0;b<16;b++){for(var p=E[b]=[],L=e[b],s=0;s<24;s++)p[s/6|0]|=u[(_[s]-1+L)%28]<<31-s%6,p[4+(s/6|0)]|=u[28+(_[s+24]-1+L)%28]<<31-s%6;p[0]=p[0]<<1|p[0]>>>31;for(var s=1;s<7;s++)p[s]=p[s]>>>(s-1)*4+3;p[7]=p[7]<<5|p[7]>>>27}for(var R=this._invSubKeys=[],s=0;s<16;s++)R[s]=E[15-s]},encryptBlock:function(h,d){this._doCryptBlock(h,d,this._subKeys)},decryptBlock:function(h,d){this._doCryptBlock(h,d,this._invSubKeys)},_doCryptBlock:function(h,d,u){this._lBlock=h[d],this._rBlock=h[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 s=0;s<16;s++){for(var l=u[s],E=this._lBlock,b=this._rBlock,p=0,L=0;L<8;L++)p|=f[L][((b^l[L])&r[L])>>>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),h[d]=this._lBlock,h[d+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function i(h,d){var u=(this._lBlock>>>h^this._rBlock)&d;this._rBlock^=u,this._lBlock^=u<<h}function n(h,d){var u=(this._rBlock>>>h^this._lBlock)&d;this._lBlock^=u,this._rBlock^=u<<h}g.DES=y._createHelper(c);var o=m.TripleDES=y.extend({_doReset:function(){var h=this._key,d=h.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),s=d.length<4?d.slice(0,2):d.slice(2,4),l=d.length<6?d.slice(0,2):d.slice(4,6);this._des1=c.createEncryptor(k.create(u)),this._des2=c.createEncryptor(k.create(s)),this._des3=c.createEncryptor(k.create(l))},encryptBlock:function(h,d){this._des1.encryptBlock(h,d),this._des2.decryptBlock(h,d),this._des3.encryptBlock(h,d)},decryptBlock:function(h,d){this._des3.decryptBlock(h,d),this._des2.encryptBlock(h,d),this._des1.decryptBlock(h,d)},keySize:192/32,ivSize:64/32,blockSize:64/32});g.TripleDES=y._createHelper(o)}(),N.TripleDES})},pmY6:function(H,J,I){"use strict";I.d(J,"h",function(){return f}),I.d(J,"g",function(){return c}),I.d(J,"f",function(){return i}),I.d(J,"e",function(){return n}),I.d(J,"i",function(){return o}),I.d(J,"b",function(){return h}),I.d(J,"a",function(){return d}),I.d(J,"d",function(){return u}),I.d(J,"c",function(){return s});var N=I("C/vA"),g=I("JYp7");const S=!1;let k=null;function y(l){k=l}if(S){const l="__is_disposable_tracked__";y(new class{trackDisposable(E){const b=new Error("Potentially leaked disposable").stack;setTimeout(()=>{E[l]||console.log(b)},3e3)}setParent(E,b){if(E&&E!==d.None)try{E[l]=!0}catch(p){}}markAsDisposed(E){if(E&&E!==d.None)try{E[l]=!0}catch(b){}}markAsSingleton(E){}})}function m(l){return k==null||k.trackDisposable(l),l}function C(l){k==null||k.markAsDisposed(l)}function _(l,E){k==null||k.setParent(l,E)}function e(l,E){if(!k)return;for(const b of l)k.setParent(b,E)}function f(l){return k==null||k.markAsSingleton(l),l}class r extends Error{constructor(l){super(`Encountered errors while disposing of store. Errors: [${l.join(", ")}]`);this.errors=l}}function c(l){return typeof l.dispose=="function"&&l.dispose.length===0}function i(l){if(g.a.is(l)){let E=[];for(const b of l)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(l)?[]:l}else if(l)return l.dispose(),l}function n(...l){const E=o(()=>i(l));return e(l,E),E}function o(l){const E=m({dispose:Object(N.a)(()=>{C(E),l()})});return E}class h{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(l){if(!l)return l;if(l===this)throw new Error("Cannot register a disposable on itself!");return _(l,this),this._isDisposed?h.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(l),l}}h.DISABLE_DISPOSED_WARNING=!1;class d{constructor(){this._store=new h,m(this),_(this._store,this)}dispose(){C(this),this._store.dispose()}_register(l){if(l===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(l)}}d.None=Object.freeze({dispose(){}});class u{constructor(){this._isDisposed=!1,m(this)}get value(){return this._isDisposed?void 0:this._value}set value(l){var E;if(this._isDisposed||l===this._value)return;(E=this._value)===null||E===void 0||E.dispose(),l&&_(l,this),this._value=l}clear(){this.value=void 0}dispose(){var l;this._isDisposed=!0,C(this),(l=this._value)===null||l===void 0||l.dispose(),this._value=void 0}clearAndLeak(){const l=this._value;return this._value=void 0,l&&_(l,null),l}}class s{constructor(l){this.object=l}dispose(){}}},psGv:function(H,J,I){var N,g;(function(){var S;(function(){"use strict";var C=[,,function(r){function c(o){this.__parent=o,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}c.prototype.clone_empty=function(){var o=new c(this.__parent);return o.set_indent(this.__indent_count,this.__alignment_count),o},c.prototype.item=function(o){return o<0?this.__items[this.__items.length+o]:this.__items[o]},c.prototype.has_match=function(o){for(var h=this.__items.length-1;h>=0;h--)if(this.__items[h].match(o))return!0;return!1},c.prototype.set_indent=function(o,h){this.is_empty()&&(this.__indent_count=o||0,this.__alignment_count=h||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 o=this.__parent.current_line;return o.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),o.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),o.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,o.__items[0]===" "&&(o.__items.splice(0,1),o.__character_count-=1),!0}return!1},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(o){this.__items.push(o);var h=o.lastIndexOf(`
`);h!==-1?this.__character_count=o.length-h:this.__character_count+=o.length},c.prototype.pop=function(){var o=null;return this.is_empty()||(o=this.__items.pop(),this.__character_count-=o.length),o},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 o="";return this.is_empty()?this.__parent.indent_empty_lines&&(o=this.__parent.get_indent_string(this.__indent_count)):(o=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),o+=this.__items.join("")),o};function i(o,h){this.__cache=[""],this.__indent_size=o.indent_size,this.__indent_string=o.indent_char,o.indent_with_tabs||(this.__indent_string=new Array(o.indent_size+1).join(o.indent_char)),h=h||"",o.indent_level>0&&(h=new Array(o.indent_level+1).join(this.__indent_string)),this.__base_string=h,this.__base_string_length=h.length}i.prototype.get_indent_size=function(o,h){var d=this.__base_string_length;return h=h||0,o<0&&(d=0),d+=o*this.__indent_size,d+=h,d},i.prototype.get_indent_string=function(o,h){var d=this.__base_string;return h=h||0,o<0&&(o=0,d=""),h+=o*this.__indent_size,this.__ensure_cache(h),d+=this.__cache[h],d},i.prototype.__ensure_cache=function(o){for(;o>=this.__cache.length;)this.__add_column()},i.prototype.__add_column=function(){var o=this.__cache.length,h=0,d="";this.__indent_size&&o>=this.__indent_size&&(h=Math.floor(o/this.__indent_size),o-=h*this.__indent_size,d=new Array(h+1).join(this.__indent_string)),o&&(d+=new Array(o+1).join(" ")),this.__cache.push(d)};function n(o,h){this.__indent_cache=new i(o,h),this.raw=!1,this._end_with_newline=o.end_with_newline,this.indent_size=o.indent_size,this.wrap_line_length=o.wrap_line_length,this.indent_empty_lines=o.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new 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(o,h){return this.__indent_cache.get_indent_string(o,h)},n.prototype.get_indent_size=function(o,h){return this.__indent_cache.get_indent_size(o,h)},n.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},n.prototype.add_new_line=function(o){return this.is_empty()||!o&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},n.prototype.get_code=function(o){this.trim(!0);var h=this.current_line.pop();h&&(h[h.length-1]===`
`&&(h=h.replace(/\n+$/g,"")),this.current_line.push(h)),this._end_with_newline&&this.__add_outputline();var d=this.__lines.join(`
`);return o!==`
`&&(d=d.replace(/[\n]/g,o)),d},n.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},n.prototype.set_indent=function(o,h){return o=o||0,h=h||0,this.next_line.set_indent(o,h),this.__lines.length>1?(this.current_line.set_indent(o,h),!0):(this.current_line.set_indent(),!1)},n.prototype.add_raw_token=function(o){for(var h=0;h<o.newlines;h++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(o.whitespace_before),this.current_line.push(o.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},n.prototype.add_token=function(o){this.__add_space_before_token(),this.current_line.push(o),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},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(o){for(var h=this.__lines.length;o<h;)this.__lines[o]._remove_indent(),o++;this.current_line._remove_wrap_indent()},n.prototype.trim=function(o){for(o=o===void 0?!1:o,this.current_line.trim();o&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},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(o,h){for(var d=this.__lines.length-2;d>=0;){var u=this.__lines[d];if(u.is_empty())break;if(u.item(0).indexOf(o)!==0&&u.item(-1)!==h){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,o,h){this.type=i,this.text=n,this.comments_before=null,this.newlines=o||0,this.whitespace_before=h||"",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(o,h){this.raw_options=i(o,h),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(o,h){var d=this.raw_options[o],u=h||[];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(o,h){var d=this.raw_options[o],u=d===void 0?!!h:!!d;return u},c.prototype._get_characters=function(o,h){var d=this.raw_options[o],u=h||"";return typeof d=="string"&&(u=d.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),u},c.prototype._get_number=function(o,h){var d=this.raw_options[o];h=parseInt(h,10),isNaN(h)&&(h=0);var u=parseInt(d,10);return isNaN(u)&&(u=h),u},c.prototype._get_selection=function(o,h,d){var u=this._get_selection_list(o,h,d);if(u.length!==1)throw new Error("Invalid Option Value: The option '"+o+`' can only be one of the following values:
`+h+`
You passed in: '`+this.raw_options[o]+"'");return u[0]},c.prototype._get_selection_list=function(o,h,d){if(!h||h.length===0)throw new Error("Selection list cannot be empty.");if(d=d||[h[0]],!this._is_valid_selection(d,h))throw new Error("Invalid Default Value!");var u=this._get_array(o,d);if(!this._is_valid_selection(u,h))throw new Error("Invalid Option Value: The option '"+o+`' can contain only the following values:
`+h+`
You passed in: '`+this.raw_options[o]+"'");return u},c.prototype._is_valid_selection=function(o,h){return o.length&&h.length&&!o.some(function(d){return h.indexOf(d)===-1})};function i(o,h){var d={};o=n(o);var u;for(u in o)u!==h&&(d[u]=o[u]);if(h&&o[h])for(u in o[h])d[u]=o[h][u];return d}function n(o){var h={},d;for(d in o){var u=d.replace(/-/g,"_");h[u]=o[d]}return h}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 o=null;return n=n||0,n+=this.__position,n>=0&&n<this.__input_length&&(o=this.__input.charAt(n)),o},i.prototype.__match=function(n,o){n.lastIndex=o;var h=n.exec(this.__input);return h&&!(c&&n.sticky)&&(h.index!==o&&(h=null)),h},i.prototype.test=function(n,o){return o=o||0,o+=this.__position,o>=0&&o<this.__input_length?!!this.__match(n,o):!1},i.prototype.testChar=function(n,o){var h=this.peek(o);return n.lastIndex=0,h!==null&&n.test(h)},i.prototype.match=function(n){var o=this.__match(n,this.__position);return o?this.__position+=o[0].length:o=null,o},i.prototype.read=function(n,o,h){var d="",u;return n&&(u=this.match(n),u&&(d+=u[0])),o&&(u||!n)&&(d+=this.readUntil(o,h)),d},i.prototype.readUntil=function(n,o){var h="",d=this.__position;n.lastIndex=this.__position;var u=n.exec(this.__input);return u?(d=u.index,o&&(d+=u[0].length)):d=this.__input_length,h=this.__input.substring(this.__position,d),this.__position=d,h},i.prototype.readUntilAfter=function(n){return this.readUntil(n,!0)},i.prototype.get_regexp=function(n,o){var h=null,d="g";return o&&c&&(d="y"),typeof n=="string"&&n!==""?h=new RegExp(n,d):n&&(h=new RegExp(n.source,d)),h},i.prototype.get_literal_regexp=function(n){return RegExp(n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},i.prototype.peekUntilAfter=function(n){var o=this.__position,h=this.readUntilAfter(n);return this.__position=o,h},i.prototype.lookBack=function(n){var o=this.__position-1;return o>=n.length&&this.__input.substring(o-n.length,o).toLowerCase()===n},r.exports.InputScanner=i},function(r,c,i){var n=i(8).InputScanner,o=i(3).Token,h=i(10).TokenStream,d=i(11).WhitespacePattern,u={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},s=function(l,E){this._input=new n(l),this._options=E||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new d(this._input)};s.prototype.tokenize=function(){this._input.restart(),this.__tokens=new h,this._reset();for(var l,E=new o(u.START,""),b=null,p=[],L=new h;E.type!==u.EOF;){for(l=this._get_next_token(E,b);this._is_comment(l);)L.add(l),l=this._get_next_token(E,b);L.isEmpty()||(l.comments_before=L,L=new h),l.parent=b,this._is_opening(l)?(p.push(b),b=l):b&&this._is_closing(l,b)&&(l.opened=b,b.closed=l,b=p.pop(),l.parent=b),l.previous=E,E.next=l,this.__tokens.add(l),E=l}return this.__tokens},s.prototype._is_first_token=function(){return this.__tokens.isEmpty()},s.prototype._reset=function(){},s.prototype._get_next_token=function(l,E){this._readWhitespace();var b=this._input.read(/.+/g);return b?this._create_token(u.RAW,b):this._create_token(u.EOF,"")},s.prototype._is_comment=function(l){return!1},s.prototype._is_opening=function(l){return!1},s.prototype._is_closing=function(l,E){return!1},s.prototype._create_token=function(l,E){var b=new o(l,E,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return b},s.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},r.exports.Tokenizer=s,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 o(h,d){n.call(this,h,d),d?this._line_regexp=this._input.get_regexp(d._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}o.prototype=new n,o.prototype.__set_whitespace_patterns=function(h,d){h+="\\t ",d+="\\n\\r",this._match_pattern=this._input.get_regexp("["+h+d+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+d+"]")},o.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var h=this._input.read(this._match_pattern);if(h===" ")this.whitespace_before_token=" ";else if(h){var d=this.__split(this._newline_regexp,h);this.newline_count=d.length-1,this.whitespace_before_token=d[this.newline_count]}return h},o.prototype.matching=function(h,d){var u=this._create();return u.__set_whitespace_patterns(h,d),u._update(),u},o.prototype._create=function(){return new o(this._input,this)},o.prototype.__split=function(h,d){h.lastIndex=0;for(var u=0,s=[],l=h.exec(d);l;)s.push(d.substring(u,l.index)),u=l.index+l[0].length,l=h.exec(d);return u<d.length?s.push(d.substring(u,d.length)):s.push(""),s},r.exports.WhitespacePattern=o},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 o=this.__directive_pattern.exec(i);o;)n[o[1]]=o[2],o=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,o={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function h(d,u){n.call(this,d,u),this.__template_pattern=null,this._disabled=Object.assign({},o),this._excluded=Object.assign({},o),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 s=new n(d);this.__patterns={handlebars_comment:s.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:s.starting_with(/{{{/).until_after(/}}}/),handlebars:s.starting_with(/{{/).until_after(/}}/),php:s.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:s.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:s.starting_with(/{%/).until_after(/%}/),django_value:s.starting_with(/{{/).until_after(/}}/),django_comment:s.starting_with(/{#/).until_after(/#}/),smarty:s.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:s.starting_with(/{\*/).until_after(/\*}/),smarty_literal:s.starting_with(/{literal}/).until_after(/{\/literal}/)}}h.prototype=new n,h.prototype._create=function(){return new h(this._input,this)},h.prototype._update=function(){this.__set_templated_pattern()},h.prototype.disable=function(d){var u=this._create();return u._disabled[d]=!0,u._update(),u},h.prototype.read_options=function(d){var u=this._create();for(var s in o)u._disabled[s]=d.templating.indexOf(s)===-1;return u._update(),u},h.prototype.exclude=function(d){var u=this._create();return u._excluded[d]=!0,u._update(),u},h.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},h.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("|")+")")},h.prototype._read_template=function(){var d="",u=this._input.peek();if(u==="<"){var s=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&s==="?"&&(d=d||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&s==="%"&&(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=h},,,,function(r,c,i){var n=i(19).Beautifier,o=i(20).Options;function h(d,u,s,l){var E=new n(d,u,s,l);return E.beautify()}r.exports=h,r.exports.defaultOptions=function(){return new o}},function(r,c,i){var n=i(20).Options,o=i(2).Output,h=i(21).Tokenizer,d=i(21).TOKEN,u=/\r\n|[\r\n]/,s=/\r\n|[\r\n]/g,l=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 o(F,P)};l.prototype.current_line_has_match=function(F){return this._output.current_line.has_match(F)},l.prototype.set_space_before_token=function(F,P){this._output.space_before_token=F,this._output.non_breaking_space=P},l.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},l.prototype.add_raw_token=function(F){this._output.add_raw_token(F)},l.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},l.prototype.traverse_whitespace=function(F){return F.whitespace_before||F.newlines?(this.print_preserved_newlines(F)||(this._output.space_before_token=!0),!0):!1},l.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},l.prototype.print_newline=function(F){this._output.add_new_line(F)},l.prototype.print_token=function(F){F.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(F.text))},l.prototype.indent=function(){this.indent_level++},l.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,z=null;return P.closed?(F==="script"?A="text/javascript":F==="style"&&(A="text/css"),A=E(P)||A,A.search("text/css")>-1?z="css":A.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?z="javascript":A.search(/(text|application|dojo)\/(x-)?(html)/)>-1?z="html":A.search(/test\/null/)>-1&&(z="null"),z):null};function p(F,P){return P.indexOf(F)!==-1}function L(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 L(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 v(F,P,A,z){this._source_text=F||"",P=P||{},this._js_beautify=A,this._css_beautify=z,this._tag_stack=null;var K=new n(P,"html");this._options=K,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,"force".length)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,"preserve".length)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}v.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(s,`
`);var A=F.match(/^[\t ]*/)[0],z={text:"",type:""},K=new x,O=new l(this._options,A),B=new h(F,this._options).tokenize();this._tag_stack=new R(O);for(var U=null,D=B.next();D.type!==d.EOF;)D.type===d.TAG_OPEN||D.type===d.COMMENT?(U=this._handle_tag_open(O,D,K,z),K=U):D.type===d.ATTRIBUTE||D.type===d.EQUALS||D.type===d.VALUE||D.type===d.TEXT&&!K.tag_complete?U=this._handle_inside_tag(O,D,K,B):D.type===d.TAG_CLOSE?U=this._handle_tag_close(O,D,K):D.type===d.TEXT?U=this._handle_text(O,D,K):O.add_raw_token(D),z=U,D=B.next();var W=O._output.get_code(P);return W},v.prototype._handle_tag_close=function(F,P,A){var z={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(),z},v.prototype._handle_inside_tag=function(F,P,A,z){var K=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),K=K||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,D=0,W;do{if(W=z.peek(D),W.type===d.ATTRIBUTE){U=!1;break}D+=1}while(D<4&&W.type!==d.EOF&&W.type!==d.TAG_CLOSE);B=!U}B&&(F.print_newline(!1),K=!0)}F.print_token(P),K=K||F.previous_token_wrapped(),A.has_wrapped_attrs=K}return O},v.prototype._handle_text=function(F,P,A){var z={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)),z},v.prototype._print_custom_beatifier_text=function(F,P,A){var z=this;if(P.text!==""){var K=P.text,O,B=1,U="",D="";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(be,he){var Ie=new v(be,he,z._js_beautify,z._css_beautify);return Ie.beautify()}),this._options.indent_scripts==="keep"?B=0:this._options.indent_scripts==="separate"&&(B=-F.indent_level);var W=F.get_full_indent(B);if(K=K.replace(/\n[ \t]*$/,""),A.custom_beautifier_name!=="html"&&K[0]==="<"&&K.match(/^(<!--|<!\[CDATA\[)/)){var Q=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(K);if(!Q){F.add_raw_token(P);return}U=W+Q[1]+`
`,K=Q[4],Q[5]&&(D=W+Q[5]),K=K.replace(/\n[ \t]*$/,""),(Q[2]||Q[3].indexOf(`
`)!==-1)&&(Q=Q[3].match(/[ \t]+$/),Q&&(P.whitespace_before=Q[0]))}if(K)if(O){var re=function(){this.eol=`
`};re.prototype=this._options.raw_options;var ee=new re;K=O(W+K,ee)}else{var ye=P.whitespace_before;ye&&(K=K.replace(new RegExp(`
(`+ye+")?","g"),`
`)),K=W+K.replace(/\n/g,`
`+W)}U&&(K?K=U+K+`
`+D:K=U+D),F.print_newline(!1),K&&(P.text=K,P.whitespace_before="",P.newlines=0,F.add_raw_token(P),F.print_newline(!0))}},v.prototype._handle_tag_open=function(F,P,A,z){var K=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),K.start_tag_token=this._tag_stack.try_pop(K.tag_name)):(F.traverse_whitespace(P),this._set_tag_position(F,P,K,A,z),K.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)&&(K.alignment_size=P.text.length+1),!K.tag_complete&&!K.is_unformatted&&(F.alignment_size=K.alignment_size),K};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 z=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(z=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(z)))}};v.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},v.prototype._set_tag_position=function(F,P,A,z,K){if(A.is_empty_element||(A.is_end_tag?A.start_tag_token=this._tag_stack.try_pop(A.tag_name):(this._do_optional_end_element(A)&&(A.is_inline_element||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==="!--"&&K.type===d.TAG_CLOSE&&z.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&&!(z.is_inline_element||z.is_unformatted)&&!(K.type===d.TAG_CLOSE&&A.start_tag_token===z)&&K.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)&&(K.type!=="TK_CONTENT"||A.is_content_unformatted)&&F.print_newline(!1),this._calcluate_parent_multiline(F,A)},v.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"];v.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=v},function(r,c,i){var n=i(6).Options;function o(h){n.call(this,h,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}o.prototype=new n,r.exports.Options=o},function(r,c,i){var n=i(9).Tokenizer,o=i(9).TOKEN,h=i(13).Directives,d=i(14).TemplatablePattern,u=i(12).Pattern,s={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:o.START,RAW:o.RAW,EOF:o.EOF},l=new h(/<\!--/,/-->/),E=function(b,p){n.call(this,b,p),this._current_tag_name="";var L=new d(this._input).read_options(this._options),R=new u(this._input);if(this.__patterns={word:L.until(/[\n\r\t <]/),single_quote:L.until_after(/'/),double_quote:L.until_after(/"/),attribute:L.until(/[\n\r\t =>]|\/>/),element_name:L.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 v=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=R.matching(v).until_after(v)}};E.prototype=new n,E.prototype._is_comment=function(b){return!1},E.prototype._is_opening=function(b){return b.type===s.TAG_OPEN},E.prototype._is_closing=function(b,p){return b.type===s.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 L=null;this._readWhitespace();var R=this._input.peek();return R===null?this._create_token(s.EOF,""):(L=L||this._read_open_handlebars(R,p),L=L||this._read_attribute(R,b,p),L=L||this._read_close(R,p),L=L||this._read_raw_content(R,b,p),L=L||this._read_content_word(R),L=L||this._read_comment_or_cdata(R),L=L||this._read_processing(R),L=L||this._read_open(R,p),L=L||this._create_token(s.UNKNOWN,this._input.next()),L)},E.prototype._read_comment_or_cdata=function(b){var p=null,L=null,R=null;if(b==="<"){var v=this._input.peek(1);v==="!"&&(L=this.__patterns.comment.read(),L?(R=l.get_directives(L),R&&R.ignore==="start"&&(L+=l.readIgnored(this._input))):L=this.__patterns.cdata.read()),L&&(p=this._create_token(s.COMMENT,L),p.directives=R)}return p},E.prototype._read_processing=function(b){var p=null,L=null,R=null;if(b==="<"){var v=this._input.peek(1);(v==="!"||v==="?")&&(L=this.__patterns.conditional_comment.read(),L=L||this.__patterns.processing.read()),L&&(p=this._create_token(s.COMMENT,L),p.directives=R)}return p},E.prototype._read_open=function(b,p){var L=null,R=null;return p||b==="<"&&(L=this._input.next(),this._input.peek()==="/"&&(L+=this._input.next()),L+=this.__patterns.element_name.read(),R=this._create_token(s.TAG_OPEN,L)),R},E.prototype._read_open_handlebars=function(b,p){var L=null,R=null;return p||this._options.indent_handlebars&&b==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(L=this.__patterns.handlebars_comment.read(),L=L||this.__patterns.handlebars.read(),R=this._create_token(s.COMMENT,L)):(L=this.__patterns.handlebars_open.read(),R=this._create_token(s.TAG_OPEN,L))),R},E.prototype._read_close=function(b,p){var L=null,R=null;return p&&(p.text[0]==="<"&&(b===">"||b==="/"&&this._input.peek(1)===">")?(L=this._input.next(),b==="/"&&(L+=this._input.next()),R=this._create_token(s.TAG_CLOSE,L)):p.text[0]==="{"&&b==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),R=this._create_token(s.TAG_CLOSE,"}}"))),R},E.prototype._read_attribute=function(b,p,L){var R=null,v="";if(L&&L.text[0]==="<")if(b==="=")R=this._create_token(s.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(s.VALUE,x)}else v=this.__patterns.attribute.read(),v&&(p.type===s.EQUALS?R=this._create_token(s.VALUE,v):R=this._create_token(s.ATTRIBUTE,v));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,L){var R="";if(L&&L.text[0]==="{")R=this.__patterns.handlebars_raw_close.read();else if(p.type===s.TAG_CLOSE&&p.opened.text[0]==="<"&&p.text[0]!=="/"){var v=p.opened.text.substr(1).toLowerCase();if(v==="script"||v==="style"){var x=this._read_comment_or_cdata(b);if(x)return x.type=s.TEXT,x;R=this._input.readUntil(new RegExp("</"+v+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(v)&&(R=this._input.readUntil(new RegExp("</"+v+"[\\n\\r\\t ]*?>","ig")))}return R?this._create_token(s.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(s.TEXT,p)},r.exports.Tokenizer=E,r.exports.TOKEN=s}],_={};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 f=e(18);S=f})();var k=S;if(!0)!(N=[I,I("6UM0"),I("TXwP")],g=function(C){var _=I("6UM0"),e=I("TXwP");return{html_beautify:function(f,r){return k(f,r,_.js_beautify,e.css_beautify)}}}.apply(J,N),g!==void 0&&(H.exports=g));else var y,m})()},qBft:function(H,J,I){(function(N,g,S){H.exports=J=g(I("Ib8C"),I("OLod"))})(this,function(N){return N.pad.AnsiX923={pad:function(g,S){var k=g.sigBytes,y=S*4,m=y-k%y,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,J,I){(function(N,g){H.exports=J=g(I("Ib8C"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.WordArray,y=g.enc,m=y.Utf16=y.Utf16BE={stringify:function(_){for(var e=_.words,f=_.sigBytes,r=[],c=0;c<f;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,f=[],r=0;r<e;r++)f[r>>>1]|=_.charCodeAt(r)<<16-r%2*16;return k.create(f,e*2)}};y.Utf16LE={stringify:function(_){for(var e=_.words,f=_.sigBytes,r=[],c=0;c<f;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,f=[],r=0;r<e;r++)f[r>>>1]|=C(_.charCodeAt(r)<<16-r%2*16);return k.create(f,e*2)}};function C(_){return _<<8&4278255360|_>>>8&16711935}}(),N.enc.Utf16})},qu8F:function(H,J,I){(function(N,g,S){H.exports=J=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 y=g.Encryptor=g.extend({processBlock:function(m,C){var _=this._cipher,e=_.blockSize,f=this._iv,r=this._counter;f&&(r=this._counter=f.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=y,g}(),N.mode.CTRGladman})},"rAM+":function(H,J,I){"use strict";I.d(J,"a",function(){return g});var N=I("Qw5x");function g(S,k){var y;if(typeof Symbol=="undefined"||S[Symbol.iterator]==null){if(Array.isArray(S)||(y=Object(N.a)(S))||k&&S&&typeof S.length=="number"){y&&(S=y);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,f;return{s:function(){y=S[Symbol.iterator]()},n:function(){var c=y.next();return _=c.done,c},e:function(c){e=!0,f=c},f:function(){try{!_&&y.return!=null&&y.return()}finally{if(e)throw f}}}}},rUJ1:function(H,J){const I=/[&<>"']/,N=/[&<>"']/g,g=/[<>"']|&(?!#?\w+;)/,S=/[<>"']|&(?!#?\w+;)/g,k={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},y=R=>k[R];function m(R,v){if(v){if(I.test(R))return R.replace(N,y)}else if(g.test(R))return R.replace(S,y);return R}const C=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function _(R){return R.replace(C,(v,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 f(R,v){R=R.source||R,v=v||"";const x={replace:(w,T)=>(T=T.source||T,T=T.replace(e,"$1"),R=R.replace(w,T),x),getRegex:()=>new RegExp(R,v)};return x}const r=/[^\w:]/g,c=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function i(R,v,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}v&&!c.test(x)&&(x=u(v,x));try{x=encodeURI(x).replace(/%25/g,"%")}catch(w){return null}return x}const n={},o=/^[^:]+:\/*[^/]*$/,h=/^([^:]+:)[\s\S]*$/,d=/^([^:]+:\/*[^/]*)[\s\S]*$/;function u(R,v){n[" "+R]||(o.test(R)?n[" "+R]=R+"/":n[" "+R]=b(R,"/",!0)),R=n[" "+R];const x=R.indexOf(":")===-1;return v.substring(0,2)==="//"?x?v:R.replace(h,"$1")+v:v.charAt(0)==="/"?x?v:R.replace(d,"$1")+v:R+v}const s={exec:function(){}};function l(R){let v=1,x,w;for(;v<arguments.length;v++){x=arguments[v];for(w in x)Object.prototype.hasOwnProperty.call(x,w)&&(R[w]=x[w])}return R}function E(R,v){const x=R.replace(/\|/g,(F,P,A)=>{let z=!1,K=P;for(;--K>=0&&A[K]==="\\";)z=!z;return z?"|":" |"}),w=x.split(/ \|/);let T=0;if(w.length>v)w.splice(v);else for(;w.length<v;)w.push("");for(;T<w.length;T++)w[T]=w[T].trim().replace(/\\\|/g,"|");return w}function b(R,v,x){const w=R.length;if(w===0)return"";let T=0;for(;T<w;){const F=R.charAt(w-T-1);if(F===v&&!x)T++;else if(F!==v&&x)T++;else break}return R.substr(0,w-T)}function p(R,v){if(R.indexOf(v[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]===v[0])w++;else if(R[T]===v[1]&&(w--,w<0))return T;return-1}function L(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:f,cleanUrl:i,resolveUrl:u,noopTest:s,merge:l,splitCells:E,rtrim:b,findClosingBracket:p,checkSanitizeDeprecation:L}},rWjI:function(H,J,I){"use strict";I.r(J),I.d(J,"Types",function(){return Mt});var N=I("P2fV"),g=I("NJEC"),S=I("CiB2"),k=I("DYRE"),y=I("zeV3"),m=I("sRBo"),C=I("kaz8"),_=I("7Kak"),e=I("9yH6"),f=I("giR+"),r=I("fyUT"),c=I("OaEy"),i=I("2fM7"),n=I("oBTY"),o=I("rAM+"),h=I("T2oS"),d=I("W9HT"),u=I("g9YV"),s=I("wCAj"),l=I("+L6B"),E=I("2/Rp"),b=I("14J3"),p=I("BMrR"),L=I("jCWc"),R=I("kPKH"),v=I("miYZ"),x=I("tsqr"),w=I("9og8"),T=I("y8nQ"),F=I("Vl3Y"),P=I("tJVT"),A=I("k1fw"),z=I("fu2T"),K=I("gK9i"),O=I("2qtc"),B=I("kLXV"),U=I("5NDa"),D=I("5rEg"),W=I("WmNS"),Q=I.n(W),re=I("q1tI"),ee=I.n(re),ye=I("eRFJ"),be=I.n(ye),he=I("jrin"),Ie,Se=i.a.Option,fe;(function(Et){Et[Et.language=0]="language",Et[Et.difficulty=1]="difficulty",Et[Et.category=2]="category",Et[Et.openOrNot=3]="openOrNot"})(fe||(fe={}));var ue=(Ie={},Object(he.a)(Ie,fe.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(he.a)(Ie,fe.difficulty,[{title:"\u7B80\u5355",key:1},{title:"\u9002\u4E2D",key:2},{title:"\u56F0\u96BE",key:3}]),Object(he.a)(Ie,fe.category,[{title:"\u7A0B\u5E8F\u8BBE\u8BA1",key:1},{title:"\u7B97\u6CD5",key:2}]),Object(he.a)(Ie,fe.openOrNot,[{title:"\u516C\u5F00",key:1},{title:"\u79C1\u6709",key:0}]),Ie);function ie(Et){return ue[Et].map(function(It){return ee.a.createElement(Se,{key:It.title,value:It.key}," ",It.title," ")})}function Ce(Et,It){Et.map(function(wt){var Er=wt.id,nr=wt.name,Bt=wt.sub_disciplines,Nt={value:Er,label:nr};It.push(Nt),Bt&&Bt.length>0&&(Nt.children=[],Ce(Bt,Nt.children))})}function ne(Et,It){for(var wt=[],Er=0;Er<Et.length;Er++){var nr,Bt=Et[Er];if(((nr=Bt.sub_disciplines)===null||nr===void 0?void 0:nr.length)>0){wt[0]=Bt.id;for(var Nt=0;Nt<Bt.sub_disciplines.length;Nt++){var vr=Bt.sub_disciplines[Nt];if(vr.id===It)return wt[1]=vr.id,[wt,vr.tag_disciplines||vr.sub_disciplines||[]]}}}return[wt,[]]}var ce=I("Ty5D"),Ae=I("9kvl"),oe=I("J66h"),q=I("GIiI"),$=I("2BaD"),X=I("Ot1p"),de=I("ErOA");function pe(Et){return Object(de.f)("practices.json",Et)}function xe(){return Object(de.c)("problems/new.json")}function Ke(Et){return Object(de.c)("practices/".concat(Et,"/edit.json"))}function qe(Et,It){return Object(de.g)("practices/".concat(Et),It)}function tt(Et,It){return Object(de.f)("exercises/".concat(Et,"/exercise_questions.json"),It)}function et(Et,It){return Object(de.g)("exercise_questions/".concat(Et,".json"),It)}var it=I("cDPC"),at=I("bbsP"),je=I("/wGt"),De=I("0Owb"),nt=I("ZW9T"),lt=I("ZD9Y"),Ve=I("M8RZ"),Qe=I("bCnd"),Fe=I("1T2W"),Re=I.n(Fe),Me={theme:Object(Qe.a)("cmCodeMode","vs-dark"),fontSize:Object(Qe.a)("cmFontSize",14),showEditorSetting:!1,tabToSpace:Object(Qe.a)("cmTabToSpace",!0)},Ee;(function(Et){Et[Et.set_font_size=0]="set_font_size",Et[Et.set_theme=1]="set_theme",Et[Et.on_tab_to_space=2]="on_tab_to_space",Et[Et.set_show_editor_setting=3]="set_show_editor_setting"})(Ee||(Ee={}));function Oe(Et,It){switch(It.type){case Ee.set_show_editor_setting:return Object(A.a)(Object(A.a)({},Et),{},{showEditorSetting:It.payload});case Ee.set_theme:return Object(A.a)(Object(A.a)({},Et),{},{theme:It.payload});case Ee.set_font_size:return Object(A.a)(Object(A.a)({},Et),{},{fontSize:It.payload});case Ee.on_tab_to_space:return Object(A.a)(Object(A.a)({},Et),{},{tabToSpace:It.payload});default:throw new Error}}var ke=function(Et){var It=Et.value,wt=Et.onChange,Er=Et.language,nr=Et.onLanguage,Bt=Et.languageItems,Nt=Et.ActionBarRender,vr=Nt===void 0?function(ve){return ee.a.createElement(Ne,{languageItems:Bt,onLanguage:nr,language:Er,onShowCodeSetting:ve})}:Nt,Qr=Object(re.useReducer)(Oe,Me),Cr=Object(P.a)(Qr,2),vt=Cr[0],Ht=Cr[1],Zr=vt.theme,ln=vt.fontSize,kn=vt.showEditorSetting,Cn=vt.tabToSpace;console.log(It,Er,"value");var le={onFontSizeChange:function(ae){Ht({type:Ee.set_font_size,payload:ae}),Object(Qe.b)("cmFontSize",ae)},tabToSpace:Cn,cmFontSize:ln,className:"oj",cmCodeMode:Zr,onTabToSpace:function(ae){Ht({type:Ee.on_tab_to_space,payload:ae}),Object(Qe.b)("cmTabToSpace",ae)},onCodeModeChange:function(ae){Ht({type:Ee.set_theme,payload:ae}),Object(Qe.b)("cmCodeMode",ae)}};function V(){Ht({type:Ee.set_show_editor_setting,payload:!1})}function Y(){Ht({type:Ee.set_show_editor_setting,payload:!0})}var te={value:It,language:Er,onChange:wt,theme:Zr,height:"calc(100% - 56px)",options:{fontSize:ln,insertSpaces:Cn}};return ee.a.createElement(re.Fragment,null,ee.a.createElement("div",{className:Re.a["code-panel-container"]},vr(Y),ee.a.createElement(nt.b,Object(De.a)({key:Er},te))),ee.a.createElement(Ve.a,null,ee.a.createElement(je.a,{className:"oj",title:null,placement:"right",closable:!1,visible:kn,onClose:V},ee.a.createElement(lt.a,le))))};function Ne(Et){var It=Et.languageItems,wt=Et.language,Er=Et.onShowCodeSetting,nr=Et.onLanguage;return ee.a.createElement("div",{className:Re.a["action-oj-bar"]},It==null?void 0:It.map(function(Bt){return ee.a.createElement("div",{className:wt===(Bt==null?void 0:Bt.language)?Re.a.active:"",onClick:function(){return nr(Bt==null?void 0:Bt.language)},key:Bt==null?void 0:Bt.language},Bt==null?void 0:Bt.language)}),ee.a.createElement("a",{onClick:Er},ee.a.createElement("i",{className:"iconfont icon-shezhi"})))}var He=I("Znn+"),rt=I("ZTPi"),ct=I("L9qf"),yt=I.n(ct),ht=function(It){var wt=It.visible,Er=It.onOK,nr=It.onCancel,Bt=Object(re.useState)(!1),Nt=Object(P.a)(Bt,2),vr=Nt[0],Qr=Nt[1],Cr=Object(re.useState)(!1),vt=Object(P.a)(Cr,2),Ht=vt[0],Zr=vt[1],ln=Object(re.useState)("1"),kn=Object(P.a)(ln,2),Cn=kn[0],le=kn[1],V=Object(re.useState)(""),Y=Object(P.a)(V,2),te=Y[0],ve=Y[1],ae=Object(re.useState)([]),ze=Object(P.a)(ae,2),ft=ze[0],Ct=ze[1],Wt=function(){var Gr=Object(w.a)(Q.a.mark(function lr(){var qr;return Q.a.wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:if(te){zt.next=3;break}return x.b.warn("\u9898\u76EE".concat(on,"\u4E0D\u80FD\u4E3A\u7A7A")),zt.abrupt("return");case 3:return Zr(!0),zt.next=6,Object(de.a)("/api/tag_disciplines.json",{method:"post",body:{target:wt,name:te}});case 6:if(qr=zt.sent,!((qr==null?void 0:qr.status)===0)){zt.next=10;break}return Er(),zt.abrupt("return");case 10:Zr(!1);case 11:case"end":return zt.stop()}},lr)}));return function(){return Gr.apply(this,arguments)}}(),gt=function(){var Gr=Object(w.a)(Q.a.mark(function lr(){var qr,On,zt=arguments;return Q.a.wrap(function(pr){for(;;)switch(pr.prev=pr.next){case 0:return qr=zt.length>0&&zt[0]!==void 0?zt[0]:"",Qr(!0),pr.next=4,Object(de.a)("/api/tag_disciplines.json",{method:"get",params:{target:wt,search:qr}});case 4:On=pr.sent,Ct(On.tag_disciplines||[]),Qr(!1);case 7:case"end":return pr.stop()}},lr)}));return function(){return Gr.apply(this,arguments)}}(),Yt=function(lr){var qr=lr.name;B.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u91CD\u547D\u540D",content:ee.a.createElement("div",null,ee.a.createElement(D.a,{defaultValue:qr,placeholder:"\u8BF7\u8F93\u5165".concat(on,"\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57"),maxLength:20,onChange:function(zt){qr=zt.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var On=Object(w.a)(Q.a.mark(function mr(){var pr;return Q.a.wrap(function(Tr){for(;;)switch(Tr.prev=Tr.next){case 0:if(qr){Tr.next=3;break}return x.b.warn("\u9898\u76EE".concat(on,"\u4E0D\u80FD\u4E3A\u7A7A")),Tr.abrupt("return",Promise.reject());case 3:return Tr.next=5,Object(de.a)("/api/tag_disciplines/".concat(lr.id,"/rename.json"),{method:"post",body:{id:lr.id,name:qr}});case 5:pr=Tr.sent,(pr==null?void 0:pr.status)===0&&gt();case 7:case"end":return Tr.stop()}},mr)}));function zt(){return On.apply(this,arguments)}return zt}()})},er=function(lr){B.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,width:570,title:"\u5220\u9664",content:wt==="practice"?ee.a.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u6765\u6E90\u201C",ee.a.createElement("span",{className:"c-light-primary"},lr.name),"\u201D\u5220\u9664\u5417\uFF1F",ee.a.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u6765\u6E90\u8FDB\u884C\u6E05\u9664\u3002"):ee.a.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u77E5\u8BC6\u70B9\u201C",ee.a.createElement("span",{className:"c-light-primary"},lr.name),"\u201D\u5220\u9664\u5417\uFF1F",ee.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 qr=Object(w.a)(Q.a.mark(function zt(){var mr;return Q.a.wrap(function(jr){for(;;)switch(jr.prev=jr.next){case 0:return jr.next=2,Object(de.a)("/api/tag_disciplines/".concat(lr.id,".json"),{method:"delete",body:{id:lr.id}});case 2:mr=jr.sent,(mr==null?void 0:mr.status)===0&&gt();case 4:case"end":return jr.stop()}},zt)}));function On(){return qr.apply(this,arguments)}return On}()})},Hr=function(lr){gt(lr)},on=wt==="practice"?"\u77E5\u8BC6\u70B9":"\u6765\u6E90";return ee.a.createElement(B.a,{afterClose:function(){Zr(!1),Qr(!1),ve(""),le("1"),Ct([])},centered:!0,keyboard:!1,width:600,title:"".concat(on,"\u7BA1\u7406"),visible:!!wt,className:yt.a.customModal,footer:null,onCancel:nr},ee.a.createElement("section",{className:yt.a.wrap},ee.a.createElement(rt.a,{activeKey:Cn,onChange:function(lr){ve(""),le(lr),gt()}},ee.a.createElement(rt.a.TabPane,{tab:"\u65B0\u589E".concat(on),key:"1"},ee.a.createElement(D.a,{value:te,onChange:function(lr){return ve(lr.target.value)},className:yt.a.in,placeholder:"\u8F93\u5165".concat(on,"\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57"),maxLength:20}),ee.a.createElement("div",{className:yt.a.btns},ee.a.createElement(E.a,{onClick:nr,className:"mr20"},"\u53D6\u6D88"," "),ee.a.createElement(E.a,{loading:Ht,onClick:Wt,type:"primary"},"\u786E\u8BA4\u65B0\u5EFA"))),ee.a.createElement(rt.a.TabPane,{tab:"\u5DF2\u6709".concat(on),key:"2"},ee.a.createElement(D.a.Search,{allowClear:!0,onSearch:Hr,value:te,onChange:function(lr){return ve(lr.target.value)},className:yt.a.in,placeholder:"\u8F93\u5165".concat(on,"\u540D\u79F0\u8FDB\u884C\u67E5\u8BE2")}),ee.a.createElement(s.a,{dataSource:ft,bordered:!1,loading:vr,scroll:ft.length>7?{y:300}:{},style:{padding:"0 40px 20px 40px"},columns:[{title:"".concat(on,"\u540D\u79F0"),dataIndex:"name",ellipsis:!0},{title:"\u64CD\u4F5C",dataIndex:"action",width:120,render:function(lr,qr){return ee.a.createElement("span",null,ee.a.createElement("span",{onClick:function(){return Yt(qr)},className:"current mr10 c-light-primary"},"\u91CD\u547D\u540D"),ee.a.createElement("span",{onClick:function(){return er(qr)},className:"current c-grey-666"},"\u5220\u9664"))}}],pagination:!1})))))},pt=ht,Dt=I("m3rI"),At=I("B7Ph"),bt=I("wd/R"),Xt=I.n(bt),Gt=I("1vsH"),rr=I("9Bee"),sr=I("xKgJ"),Kt=D.a.TextArea,kt=B.a.confirm,ir=K.a.Panel,_t={loading:!0,user:null,status:0,data:void 0,lastedUpdateTime:0},Mt;(function(Et){Et[Et.SET_INITAL_DATA=0]="SET_INITAL_DATA",Et[Et.SET_LOADING=1]="SET_LOADING",Et[Et.SET_STATUS=2]="SET_STATUS"})(Mt||(Mt={}));var Rt="#### \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 Ot(Et,It){switch(It.type){case Mt.SET_INITAL_DATA:return Object(A.a)(Object(A.a)({},Et),It.payload);case Mt.SET_LOADING:return Object(A.a)(Object(A.a)({},Et),{},{loading:It.payload});case Mt.SET_STATUS:return Object(A.a)(Object(A.a)({},Et),{},{status:It.payload});default:throw new Error}}var qt=J.default=function(){var Et,It,wt,Er=Object(ce.h)(),nr=Object(ce.g)(),Bt=Object(ce.i)(),Nt=Bt.id,vr=F.a.useForm(),Qr=Object(P.a)(vr,1),Cr=Qr[0],vt=Object(re.useState)(),Ht=Object(P.a)(vt,2),Zr=Ht[0],ln=Ht[1],kn=Object(re.useState)(!1),Cn=Object(P.a)(kn,2),le=Cn[0],V=Cn[1],Y=Object(re.useState)([]),te=Object(P.a)(Y,2),ve=te[0],ae=te[1],ze=Object(re.useState)([]),ft=Object(P.a)(ze,2),Ct=ft[0],Wt=ft[1],gt=Object(re.useState)([]),Yt=Object(P.a)(gt,2),er=Yt[0],Hr=Yt[1],on=Object(re.useState)([]),Gr=Object(P.a)(on,2),lr=Gr[0],qr=Gr[1],On=Object(re.useState)([]),zt=Object(P.a)(On,2),mr=zt[0],pr=zt[1],jr=Object(re.useState)("C"),Tr=Object(P.a)(jr,2),li=Tr[0],An=Tr[1],Ui=Object(re.useReducer)(Ot,_t),Bi=Object(P.a)(Ui,2),qn=Bi[0],un=Bi[1],Si=qn.loading,hn=qn.data,Yn=qn.user,en=qn.status,hr=hn==null?void 0:hn.hack_sets,nn=hn==null||((Et=hn.hack)===null||Et===void 0)?void 0:Et.test_set_average,xr=Object(re.useState)(!1),fn=Object(P.a)(xr,2),Fr=fn[0],mi=fn[1],En=Object(re.useRef)([]),Un=Object(re.useState)(!1),Di=Object(P.a)(Un,2),ui=Di[0],bi=Di[1],ei=Object(re.useState)(!1),ti=Object(P.a)(ei,2),ji=ti[0],ci=ti[1],_i=Object(re.useRef)(!0),Hi=Object(re.useState)({}),di=Object(P.a)(Hi,2),tn=di[0],$t=di[1];Object(re.useEffect)(function(){return Object(Ae.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),Object(Ae.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),function(){Object(Ae.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),Object(Ae.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}},[]),Object(re.useEffect)(function(){setTimeout(function(){document.title="\u5728\u7EBF\u5237\u9898"},400)});var ur=function(){var cr=Object(w.a)(Q.a.mark(function Ut(){var gr,br;return Q.a.wrap(function(Dr){for(;;)switch(Dr.prev=Dr.next){case 0:return Dr.next=2,Object(de.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice"}});case 2:return gr=Dr.sent,Dr.next=5,Object(de.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice_source"}});case 5:br=Dr.sent,Wt(gr.tag_disciplines||[]),Hr(br.tag_disciplines||[]);case 8:case"end":return Dr.stop()}},Ut)}));return function(){return cr.apply(this,arguments)}}(),Qt=[{language:"C",code:""},{language:"C++",code:""},{language:"Java",code:""},{language:"Python",code:""}],yr=Object(re.useCallback)(Object(w.a)(Q.a.mark(function cr(){var Ut,gr,br,an,Dr,Rn,xn,Li,Hn,Kn,Jn,$i,Pe,Ye,Ze,Ue,_e,Le,Te,Be,Ge,Je,$e,ot,dt,St,Tt;return Q.a.wrap(function(tr){for(;;)switch(tr.prev=tr.next){case 0:if(un({type:Mt.SET_LOADING,payload:!0}),!Nt){tr.next=19;break}return tr.next=4,Ke(Nt);case 4:Ut=tr.sent,gr=Ut.user,br=Ut.language,an=Ut.practice_sets,Dr=Ut.practice_codes,Rn=Ut.description,xn=Ut.difficulty,Li=Ut.name,Hn=Ut.open_or_not,Kn=Ut.time_limit,Jn=Ut.test_set_average,$i=Ut.test_set_score,Pe=Ut.status,Ye=Ut.tag_discipline_ids,Ze=Ut.source_discipline_ids,Ue=Ut.item_banks_group_id,_e=Ut.is_file,Le=_e===void 0?!1:_e,Te=Ut.hide_actual_output,Be=Ut.review_privilege,Ge=Ut.review_description,Je={review_privilege:Be,status:Pe,review_description:Ge,name:Li},$t(Je),mi(Te),$e=Le?[{input:"",output:"",score:100,position:1}]:an,Le?(ae(an),Cr.setFieldsValue({hack_sets:$e})):ae([]),ot={loading:!0,user:gr,status:Pe,data:{hack:{difficulty:xn,name:Li,description:Rn,open_or_not:Hn,time_limit:Kn,test_set_average:Jn,test_set_score:$i,tag_discipline_ids:Ye,source_discipline_ids:Ze,is_file:Le},hack_sets:$e}},un({type:Mt.SET_INITAL_DATA,payload:ot}),ln({hack:{difficulty:xn,name:Li,description:Rn,open_or_not:Hn,time_limit:Kn,test_set_average:Jn,test_set_score:$i,tag_discipline_ids:Ye,source_discipline_ids:Ze,is_file:Le}}),dt=Dr==null?void 0:Dr.map(function(_r){return Object(A.a)(Object(A.a)({},_r),{},{code:oe.Base64.decode(_r==null?void 0:_r.code)})}),pr(dt),En.current=dt,tr.next=27;break;case 19:return tr.next=21,xe();case 21:St=tr.sent,Tt=St.user,un({type:Mt.SET_INITAL_DATA,payload:{loading:!0,status:0,user:Tt,data:{hack:{difficulty:"",time_limit:3,description:Rt,test_set_score:!0,test_set_average:!0,open_or_not:!0,name:"",is_file:!1},hack_sets:[{input:"",output:"",score:100,position:1}]}}}),ln({hack:{difficulty:"",time_limit:3,description:"",test_set_average:!0,open_or_not:!0,name:"",is_file:!1}}),pr(Qt),En.current=Qt;case 27:un({type:Mt.SET_LOADING,payload:!1});case 28:case"end":return tr.stop()}},cr)})),[Nt]);Object(re.useEffect)(function(){try{yr(),ur()}catch(cr){console.log(cr,"----")}},[]);function kr(cr,Ut){return zr.apply(this,arguments)}function zr(){return zr=Object(w.a)(Q.a.mark(function cr(Ut,gr){var br,an,Dr,Rn,xn,Li,Hn,Kn,Jn,$i,Pe,Ye,Ze,Ue,_e,Le,Te,Be;return Q.a.wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:an=Object(A.a)({},Ut),Dr=an.hack_sets,Rn=an.hack,Rn.hide_actual_output=Fr,xn=[],Li=[],Hn=0,Kn=Rn!=null&&Rn.is_file?ve.map(function($e,ot){return Object(A.a)(Object(A.a)({},$e),{},{position:ot+1})}):Dr.map(function($e){return Object(A.a)(Object(A.a)({},$e),{},{is_file:!1})}),Jn=Object(o.a)(Kn);try{for(Jn.s();!($i=Jn.n()).done;)Pe=$i.value,Hn+=Pe.score,Pe.id&&Pe.id>=0?xn.push(Pe):Li.push(Pe)}catch($e){Jn.e($e)}finally{Jn.f()}if(Kn!=null&&Kn.length){Je.next=11;break}return x.b.error("\u6D4B\u8BD5\u96C6\u4E0D\u80FD\u4E3A\u7A7A"),Je.abrupt("return");case 11:if(!(Hn!==100&&!Rn.test_set_score)){Je.next=14;break}return x.b.error("\u6D4B\u8BD5\u96C6\u7684\u8BC4\u5206\u5360\u6BD4\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E100"),Je.abrupt("return");case 14:if(!(Kn!=null&&Kn.some(function($e){return!$e.output}))){Je.next=17;break}return x.b.error("\u6D4B\u8BD5\u96C6\u8F93\u51FA\u4E0D\u80FD\u4E3A\u7A7A"),Je.abrupt("return");case 17:if(_i.current?bi(!0):ci(!0),Ze=mr==null?void 0:mr.map(function($e){return Object(A.a)(Object(A.a)({},$e),{},{code:oe.Base64.encode($e==null?void 0:$e.code)})}),!Nt){Je.next=25;break}return Je.next=22,qe(Nt,{practice:Rn,practice_codes:Ze,practice_sets:Li,update_practice_sets:xn});case 22:Ye=Je.sent,Je.next=28;break;case 25:return Je.next=27,pe({practice:Rn,practice_codes:Ze,practice_sets:Kn,publish:!_i.current});case 27:Ye=Je.sent;case 28:if(bi(!1),ci(!1),!(((br=Ye)===null||br===void 0?void 0:br.status)===0)){Je.next=46;break}if(!((Ue=Ye)!==null&&Ue!==void 0&&(_e=Ue.similar_practice)!==null&&_e!==void 0&&_e.length)){Je.next=35;break}return V(!0),qr((Le=Ye)===null||Le===void 0?void 0:Le.similar_practice),Je.abrupt("return");case 35:if(!Nt){Je.next=44;break}if(x.b.success("\u4FDD\u5B58\u6210\u529F"),_i.current){Je.next=42;break}return Je.next=40,Object(de.a)("/api/practices/".concat(Nt,"/start"),{method:"get"});case 40:Te=Je.sent,(Te==null?void 0:Te.status)===0&&nr.push("/problems/".concat(Te==null?void 0:Te.identifier,"/oj/").concat(Nt));case 42:Je.next=46;break;case 44:x.b.success("\u65B0\u5EFA\u6210\u529F"),nr.replace("/problems/".concat((Be=Ye)===null||Be===void 0?void 0:Be.identifier,"/ojedit"));case 46:case"end":return Je.stop()}},cr)})),zr.apply(this,arguments)}function Rr(){nr.replace("/problems")}var vn=function(Ut){var gr=Math.floor(100/Ut.length),br=gr+100%Ut.length;Ut=Ut.map(function(an,Dr){return Dr===Ut.length-1?Object(A.a)(Object(A.a)({},an),{},{score:br}):Object(A.a)(Object(A.a)({},an),{},{score:gr})}),ae(Ut)};function $n(cr){cr.target.value||vn(ve),un({type:Mt.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},hn),{},{hack:Object(A.a)(Object(A.a)({},hn.hack),{},{test_set_score:cr.target.value})})}})}function Sr(cr){un({type:Mt.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},hn),{},{hack:Object(A.a)(Object(A.a)({},hn.hack),{},{is_file:cr.target.value})})}})}function Ei(cr){mi(cr.target.checked)}function Vr(cr){var Ut=cr.target.value;Ut&&vn(ve),un({type:Mt.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},hn),{},{hack:Object(A.a)(Object(A.a)({},hn.hack),{},{test_set_average:Ut})})}})}function jn(){var cr=Cr.getFieldValue("hack_sets"),Ut=cr.length+1,gr=Math.floor(100/Ut),br=100%Ut;cr.map(function(an,Dr){return nn&&(an.score=gr),an.position=Dr+1,an}),cr.push({input:"",output:"",position:Ut,score:nn?gr+br:0}),Cr.setFieldsValue({hack_sets:cr}),un({type:Mt.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},hn),{},{hack_sets:cr})}})}Object(re.useEffect)(function(){if(nn){var cr=hr==null?void 0:hr.length,Ut=Math.floor(100/cr),gr=100%cr;hr==null||hr.map(function(br,an){return br.score=Ut,br.position=an+1,an===cr-1&&(br.score=Ut+gr),br}),un({type:Mt.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},hn),{},{hack_sets:hr})}}),Cr.setFieldsValue({hack_sets:hr})}},[nn]);function Bn(cr){var Ut=Cr.getFieldValue("hack_sets"),gr=(Ut==null?void 0:Ut.length)-1,br=Math.ceil(100/gr),an=100%gr;Ut.splice(cr,1),Ut==null||Ut.map(function(Dr,Rn){return nn&&(Dr.score=br,Rn===gr-1&&(Dr.score=br+an)),Dr.position=Rn+1,Dr}),un({type:Mt.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},hn),{},{hack_sets:Ut})}}),Cr.setFieldsValue({hack_sets:Ut})}function gi(cr){An(cr)}var ua=function(Ut){var gr,br=(gr=En.current)===null||gr===void 0?void 0:gr.findIndex(function(an){return an.language===li});En.current[br].code=Ut,pr(En.current)},Xr=function(Ut){ln(Object(A.a)({},Cr.getFieldsValue()))},Pr=function(){var cr=Object(w.a)(Q.a.mark(function Ut(gr){var br;return Q.a.wrap(function(Dr){for(;;)switch(Dr.prev=Dr.next){case 0:return Dr.next=2,Object(de.a)("/api/practices/".concat(gr,"/start"),{method:"get"});case 2:br=Dr.sent,(br==null?void 0:br.status)===0&&Object(Gt.S)("/problems/".concat(br==null?void 0:br.identifier,"/oj/").concat(gr));case 4:case"end":return Dr.stop()}},Ut)}));return function(gr){return cr.apply(this,arguments)}}(),Ir=function(){var cr=Object(w.a)(Q.a.mark(function Ut(){var gr,br,an,Dr,Rn,xn;return Q.a.wrap(function(Hn){for(;;)switch(Hn.prev=Hn.next){case 0:return Hn.next=2,Ke(Nt);case 2:gr=Hn.sent,br=gr.name,an=gr.status,Dr=gr.review_privilege,Rn=gr.review_description,xn={review_privilege:Dr,status:an,review_description:Rn,name:br},$t(xn);case 6:case"end":return Hn.stop()}},Ut)}));return function(){return cr.apply(this,arguments)}}(),hi=function(){var Ut="";B.a.confirm({icon:null,width:700,className:"custom-modal-divider",centered:!0,title:"\u4E0D\u901A\u8FC7\u539F\u56E0",content:ee.a.createElement("div",{className:"mt20"},ee.a.createElement(X.a,{className:be.a.MdEditor,defaultValue:Ut,onChange:function(br){Ut=br}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var gr=Object(w.a)(Q.a.mark(function an(){var Dr;return Q.a.wrap(function(xn){for(;;)switch(xn.prev=xn.next){case 0:if(Ut){xn.next=3;break}return x.b.warn("\u4E0D\u901A\u8FC7\u539F\u56E0\u4E0D\u80FD\u4E3A\u7A7A"),xn.abrupt("return",Promise.reject());case 3:return xn.next=5,Object(de.a)("/api/practices/".concat(Nt,"/review.json"),{method:"post",body:{op:"fail",description:Ut}});case 5:Dr=xn.sent,(Dr==null?void 0:Dr.status)===0&&(x.b.success("\u63D0\u4EA4\u6210\u529F"),Ir());case 7:case"end":return xn.stop()}},an)}));function br(){return gr.apply(this,arguments)}return br}()})},Xi=function(){var cr=Object(w.a)(Q.a.mark(function Ut(){return Q.a.wrap(function(br){for(;;)switch(br.prev=br.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(tn==null?void 0:tn.name,"\u300B\u7684\u5BA1\u6838\u901A\u8FC7\u5417\uFF1F"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var an=Object(w.a)(Q.a.mark(function Rn(){var xn;return Q.a.wrap(function(Hn){for(;;)switch(Hn.prev=Hn.next){case 0:return Hn.next=2,Object(de.a)("/api/practices/".concat(Nt,"/review.json"),{method:"post",body:{op:"pass"}});case 2:xn=Hn.sent,(xn==null?void 0:xn.status)===0&&(x.b.success("\u63D0\u4EA4\u6210\u529F"),Ir());case 4:case"end":return Hn.stop()}},Rn)}));function Dr(){return an.apply(this,arguments)}return Dr}()});case 1:case"end":return br.stop()}},Ut)}));return function(){return cr.apply(this,arguments)}}(),Yi=function(){var Ut=B.a.confirm({icon:null,width:700,className:"".concat(be.a.cusModal," custom-modal-divider"),centered:!0,title:ee.a.createElement(p.a,null,ee.a.createElement(R.a,{flex:"1"},"\u4E0D\u901A\u8FC7\u539F\u56E0"),ee.a.createElement(R.a,null,ee.a.createElement("span",{className:"iconfont icon-guanbi7 font12 current c-grey-c",onClick:function(){return Ut.destroy()}}))),content:ee.a.createElement("div",null,ee.a.createElement(rr.a,{className:"mt20",value:(tn==null?void 0:tn.review_description)||""}))})};return ee.a.createElement(d.a,{spinning:Si,size:"large",className:be.a["oj-custom-large-spin"]},hn?ee.a.createElement(re.Fragment,null,ee.a.createElement("header",{className:be.a.header},ee.a.createElement("div",null,ee.a.createElement("img",{src:"".concat(Dt.a.IMG_SERVER,"/images/").concat(Yn==null?void 0:Yn.image_url),alt:"user",width:30}),ee.a.createElement("span",null,Yn==null?void 0:Yn.name)),ee.a.createElement("h2",null," ",hn==null||((It=hn.hack)===null||It===void 0)?void 0:It.name," "),Nt?ee.a.createElement("a",{className:be.a.btn_back,onClick:Rr}," ",ee.a.createElement(q.a,null),"\u9000\u51FA"):null),ee.a.createElement(F.a,{form:Cr,initialValues:hn,layout:"vertical",className:be.a["oj-form-container"],onValuesChange:Xr,onFinish:kr},ee.a.createElement(it.a,{hideResize:!0,className:be.a["oj-problems"],leftChild:ee.a.createElement(Jr,{formValue:Zr,onRemoveTestCase:Bn,onAddTestCase:jn,hack:hn.hack,onChangeScore:$n,onChangehide:Ei,onChangeAverage:Vr,onChangeFile:Sr,uploadData:ve,setUploadData:ae,handleUploadRatio:vn,ischecked:Fr,pointData:Ct,sourceData:er,getPointData:ur,id:Nt}),rightChild:ee.a.createElement(ke,{value:mr==null||((wt=mr.find(function(cr){return cr.language===li}))===null||wt===void 0)?void 0:wt.code,onChange:ua,onLanguage:gi,languageItems:mr,language:li})}),ee.a.createElement("div",{className:be.a.footer},!!Nt&&ee.a.createElement("div",{className:be.a.result},ee.a.createElement("span",null,"\u5BA1\u6838\u7ED3\u679C:"),tn!=null&&tn.review_privilege?ee.a.createElement(ee.a.Fragment,null,ee.a.createElement("div",{onClick:Xi,className:be.a.pass},"\u901A\u8FC7"),ee.a.createElement("div",{onClick:hi,className:be.a.noPass},"\u4E0D\u901A\u8FC7")):ee.a.createElement(ee.a.Fragment,null,(tn==null?void 0:tn.status)===0&&ee.a.createElement("div",{className:be.a.passText},ee.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u53D1\u5E03"),(tn==null?void 0:tn.status)===1&&ee.a.createElement("div",{className:be.a.passText},ee.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5DF2\u516C\u5F00"),(tn==null?void 0:tn.status)===2&&ee.a.createElement("div",{className:be.a.passText},ee.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u5BA1\u6279"),(tn==null?void 0:tn.status)===3&&ee.a.createElement("div",{className:be.a.passText},ee.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u4E2D"),(tn==null?void 0:tn.status)===4&&ee.a.createElement("div",{className:be.a.passText},ee.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u5B8C\u6210\u5F85\u516C\u5F00"),(tn==null?void 0:tn.status)===5&&ee.a.createElement("div",{className:be.a.noPassText},ee.a.createElement("i",{className:"iconfont icon-weitongguo1"}),"\u5BA1\u6838\u4E0D\u901A\u8FC7",ee.a.createElement("span",{onClick:Yi},"\u67E5\u770B\u539F\u56E0")))),ee.a.createElement(E.a,{type:"primary",ghost:!0,onClick:Rr},"\u9000\u51FA\u7F16\u8F91"),ee.a.createElement(E.a,{disabled:ji,loading:ui,type:"primary",onClick:function(){_i.current=!0,Cr.submit()}},"\u4FDD\u5B58"," "),Nt?ee.a.createElement(E.a,{disabled:ui,loading:ji,style:{background:"#2FC25B",border:0},type:"primary",onClick:function(){_i.current=!1,Cr.submit()}},"\u7ACB\u5373\u4F53\u9A8C"):ee.a.createElement(E.a,{disabled:ui,loading:ji,type:"primary",onClick:function(){_i.current=!1,Cr.submit()}},"\u4FDD\u5B58\u5E76\u53D1\u5E03\u5BA1\u6838")))):null,ee.a.createElement(B.a,{centered:!0,destroyOnClose:!0,footer:null,visible:le,onCancel:function(){return V(!1)},title:"\u76F8\u4F3C\u6027\u68C0\u6D4B",width:"600px"},ee.a.createElement("div",null,ee.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"),ee.a.createElement(s.a,{dataSource:lr,bordered:!1,scroll:lr.length>7?{y:300}:{},columns:[{title:"\u76F8\u4F3C\u9898\u9898\u76EE",dataIndex:"name",ellipsis:!0,render:function(Ut,gr){return ee.a.createElement("span",{onClick:function(){return Pr(gr==null?void 0:gr.identifier)},style:{textDecorationLine:"underline"},className:"current c-light-primary"},Ut)}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"create_time",width:170,render:function(Ut){var gr;return(gr=Xt()(Ut))===null||gr===void 0?void 0:gr.format("YYYY-MM-DD HH:mm")}}],pagination:!1}))))};function Jr(Et){var It,wt,Er=Et.ischecked,nr=Et.formValue,Bt=Et.hack,Nt=Et.onChangeAverage,vr=Et.onChangeScore,Qr=Et.onChangehide,Cr=Et.onChangeFile,vt=Et.onAddTestCase,Ht=Et.onRemoveTestCase,Zr=Et.uploadData,ln=Et.setUploadData,kn=Et.handleUploadRatio,Cn=Et.pointData,le=Et.sourceData,V=Et.getPointData,Y=Et.id,te=Bt.test_set_average,ve=Bt.test_set_score,ae=Object(re.useState)(!1),ze=Object(P.a)(ae,2),ft=ze[0],Ct=ze[1],Wt=Object(re.useState)(!1),gt=Object(P.a)(Wt,2),Yt=gt[0],er=gt[1],Hr=function(mr,pr){var jr=Object(n.a)(Zr);jr.splice(pr,1),te?kn(jr):ln(jr)},on=function(mr,pr){console.log(mr,pr);var jr=Zr.map(function(Tr,li){return li===pr?Object(A.a)(Object(A.a)({},Tr),{},{score:mr.target.value?Number(mr.target.value):0}):Tr});ln(jr)},Gr=function(mr){var pr=Zr.concat(mr);Bt.test_set_average?kn(pr):ln(pr)};function lr(zt){zt.stopPropagation()}function qr(){if(Object(sr.v)()){er("practice");return}var zt="";B.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u77E5\u8BC6\u70B9",content:ee.a.createElement("div",null,ee.a.createElement(D.a,{placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:function(pr){zt=pr.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var mr=Object(w.a)(Q.a.mark(function jr(){var Tr;return Q.a.wrap(function(An){for(;;)switch(An.prev=An.next){case 0:return An.next=2,Object(de.a)("/api/tag_disciplines.json",{method:"post",body:{target:"practice",name:zt}});case 2:Tr=An.sent,(Tr==null?void 0:Tr.status)===0&&V();case 4:case"end":return An.stop()}},jr)}));function pr(){return mr.apply(this,arguments)}return pr}()})}function On(){if(Object(sr.v)()){er("practice_source");return}var zt="";B.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u6765\u6E90",content:ee.a.createElement("div",null,ee.a.createElement(D.a,{placeholder:"\u8BF7\u8F93\u5165\u6765\u6E90\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:function(pr){zt=pr.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var mr=Object(w.a)(Q.a.mark(function jr(){var Tr;return Q.a.wrap(function(An){for(;;)switch(An.prev=An.next){case 0:return An.next=2,Object(de.a)("/api/tag_disciplines.json",{method:"post",body:{target:"practice_source",name:zt}});case 2:Tr=An.sent,(Tr==null?void 0:Tr.status)===0&&V();case 4:case"end":return An.stop()}},jr)}));function pr(){return mr.apply(this,arguments)}return pr}()})}return ee.a.createElement("div",{className:be.a["oj-left-panel"]},ee.a.createElement("div",{className:be.a["oj-form-info"]},ee.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:be.a.inputOne},ee.a.createElement(D.a,{bordered:!1,maxLength:60,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0",suffix:ee.a.createElement("span",null,(nr==null||((It=nr.hack)===null||It===void 0||((wt=It.name)===null||wt===void 0))?void 0:wt.length)||0,"/",ee.a.createElement("span",{className:"c-grey-999"},"60"))})),ee.a.createElement(F.a.Item,{name:["hack","description"],valuePropName:"defaultValue",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0\u5185\u5BB9"}]},ee.a.createElement(X.a,{placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u63CF\u8FF0\u2026",miniToolbar:!0,id:"moop_cases_content",noStorage:!0,height:200})),ee.a.createElement("div",{className:be.a.row},ee.a.createElement("div",{className:be.a.a},ee.a.createElement(F.a.Item,{label:"\u96BE\u6613\u5EA6",name:["hack","difficulty"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u6613\u5EA6"}]},ee.a.createElement(i.a,null,ie(fe.difficulty)))),ee.a.createElement("div",{className:be.a.b},ee.a.createElement(F.a.Item,{label:"\u9898\u76EE\u6765\u6E90",name:["hack","source_discipline_ids"]},ee.a.createElement(i.a,{placeholder:"\u9009\u62E9\u9898\u76EE\u6765\u6E90",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:function(mr){return mr.parentNode}},le.map(function(zt){return ee.a.createElement(i.a.Option,{key:zt.id,value:zt.id},zt.name)}))),ee.a.createElement(E.a,{style:{padding:"0 18px"},type:"primary",ghost:!0,onClick:function(){return On()}},Object(sr.v)()?"\u6765\u6E90\u7BA1\u7406":"\u65B0\u5EFA\u6765\u6E90"))),ee.a.createElement("div",{className:be.a.row},ee.a.createElement("div",{className:be.a.b,style:{width:"100%",marginLeft:0}},ee.a.createElement(F.a.Item,{label:"\u77E5\u8BC6\u70B9",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u77E5\u8BC6\u70B9"}],name:["hack","tag_discipline_ids"]},ee.a.createElement(i.a,{placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:function(mr){return mr.parentNode}},Cn.map(function(zt){return ee.a.createElement(i.a.Option,{key:zt.id,value:zt.id},zt.name)}))),ee.a.createElement(E.a,{type:"primary",ghost:!0,onClick:function(){return qr()}},Object(sr.v)()?"\u77E5\u8BC6\u70B9\u7BA1\u7406":"\u65B0\u5EFA\u77E5\u8BC6\u70B9"))),ee.a.createElement("div",{className:be.a.field},ee.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:be.a.inputTwo,extra:ee.a.createElement("span",{style:{position:"absolute",left:200,top:11,color:"#333"}},"\u79D2",ee.a.createElement("span",{className:"ml5 c-grey-999"},"(\u4EE3\u7801\u6267\u884C\u6240\u5141\u8BB8\u7684\u6700\u5927\u65F6\u957F)"))},ee.a.createElement(r.a,{style:{width:185},min:3}))),ee.a.createElement("div",{className:"tst-case-info"},ee.a.createElement("h3",{className:"flex-container",style:{justifyContent:"space-between"}}," ","\u6D4B\u8BD5\u7528\u4F8B\u4E0E\u7CFB\u7EDF\u8BC4\u5206\u89C4\u5219",!Bt.is_file&&ee.a.createElement(E.a,{style:{height:40},type:"primary",ghost:!0,onClick:vt},"\u6DFB\u52A0\u6D4B\u8BD5\u7528\u4F8B")),ee.a.createElement(F.a.Item,{name:["hack","test_set_score"]},ee.a.createElement(e.a.Group,{onChange:vr},ee.a.createElement(e.a,{value:!0},"\u901A\u8FC7\u5168\u90E8\u6D4B\u8BD5\u96C6",ee.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")),ee.a.createElement(e.a,{value:!1},"\u901A\u8FC7\u90E8\u5206\u6D4B\u8BD5\u96C6",ee.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")))),ee.a.createElement(C.a,{style:{marginBottom:"5px"},checked:Er,onChange:Qr},"\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"),ee.a.createElement(F.a.Item,{className:be.a.testJi,name:["hack","is_file"],label:"\u7528\u4F8B\u7C7B\u578B:"},ee.a.createElement(e.a.Group,{onChange:Cr},ee.a.createElement(y.a,{direction:"horizontal"},ee.a.createElement(e.a,{value:!1},"\u6587\u672C"),ee.a.createElement(e.a,{value:!0},"\u6587\u4EF6")))),!Bt.test_set_score&&ee.a.createElement(F.a.Item,{name:["hack","test_set_average"],label:"\u7CFB\u7EDF\u8BC4\u5206\u5360\u6BD4"},ee.a.createElement(e.a.Group,{onChange:Nt},ee.a.createElement(e.a,{value:!0},"\u5747\u5206\u6BD4\u4F8B"),ee.a.createElement(e.a,{value:!1},"\u81EA\u5B9A\u4E49\u6BD4\u4F8B"))),Bt.is_file&&ee.a.createElement("div",{className:be.a.upBtn},ee.a.createElement(E.a,{ghost:!0,type:"primary",className:"mb20",onClick:function(){return Ct(!0)}},"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"),ee.a.createElement(At.a,{disabled:Bt==null?void 0:Bt.test_set_average,inputChange:on,showScore:!Bt.test_set_score,data:Zr,onRemove:Hr})),!Bt.is_file&&ee.a.createElement(F.a.List,{name:"hack_sets"},function(zt,mr){return Object(S.a)(mr),ee.a.createElement(K.a,{accordion:!0},zt.map(function(pr,jr){return ee.a.createElement(ir,{key:"".concat(pr.key,"--").concat(jr),header:ee.a.createElement("a",{className:be.a["test-case-name"]},ee.a.createElement("span",null,"\u6D4B\u8BD5\u7528\u4F8B",jr+1),ve?null:ee.a.createElement(ee.a.Fragment,null,ee.a.createElement(F.a.Item,{name:[pr.name,"score"],fieldKey:[pr.fieldKey,"score"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6D4B\u8BD5\u96C6".concat(jr+1,"\u8BC4\u5206")}]},ee.a.createElement(r.a,{onClick:lr,min:0,max:100,disabled:te})),ee.a.createElement("span",null,"%"))),extra:jr>0?ee.a.createElement("div",{onClick:lr},ee.a.createElement(g.a,{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u5B9A\u5220\u9664\u6D4B\u8BD5\u96C6\b"+(jr+1),onConfirm:function(){Ht(jr)}},ee.a.createElement($.a,{className:be.a["btn-remove-case"]}))):null},ee.a.createElement(F.a.Item,{label:"\u8F93\u5165",name:[pr.name,"input"],fieldKey:[pr.fieldKey,"input"]},ee.a.createElement(Kt,null)),ee.a.createElement(F.a.Item,{label:"\u8F93\u51FA",name:[pr.name,"output"],fieldKey:[pr.fieldKey,"output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},ee.a.createElement(Kt,null)))}))}))),ee.a.createElement(At.b,{rootIdentifier:Y,visible:ft,onClose:function(){return Ct(!1)},onOK:Gr}),ee.a.createElement(pt,{visible:Yt,onCancel:function(){er(!1),V()},onOK:function(){er(!1),V()}}))}},rdUC:function(H,J,I){var N=I("MFOe"),g=N.Global;H.exports={name:"localStorage",read:k,write:y,each:m,remove:C,clearAll:_};function S(){return g.localStorage}function k(e){return S().getItem(e)}function y(e,f){return S().setItem(e,f)}function m(e){for(var f=S().length-1;f>=0;f--){var r=S().key(f);e(k(r),r)}}function C(e){return S().removeItem(e)}function _(){return S().clear()}},sR1s:function(H,J,I){"use strict";I.d(J,"b",function(){return k}),I.d(J,"a",function(){return y}),I.d(J,"c",function(){return m}),I.d(J,"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 f=S(e),r=_,c=0;c<f.length;c+=1){if(!r)return null;var i=f[c];r=r[i]}return r}function y(_){var e=[],f={};return _.forEach(function(r){for(var c=r||{},i=c.key,n=c.dataIndex,o=i||S(n).join("-")||g;f[o];)o="".concat(o,"_next");f[o]=!0,e.push(o)}),e}function m(){var _={};function e(i,n){n&&Object.keys(n).forEach(function(o){var h=n[o];h&&Object(N.a)(h)==="object"?(i[o]=i[o]||{},e(i[o],h)):i[o]=h})}for(var f=arguments.length,r=new Array(f),c=0;c<f;c++)r[c]=arguments[c];return r.forEach(function(i){e(_,i)}),_}function C(_){return _!=null}},sboe:function(H,J,I){"use strict";I.d(J,"a",function(){return S});var N=I("q1tI"),g=I.n(N),S=N.createContext(null)},t23M:function(H,J,I){"use strict";var N=I("VTBJ"),g=I("1OyB"),S=I("vuIU"),k=I("Ji7U"),y=I("LK+K"),m=I("q1tI"),C=I.n(m),_=I("m+aA"),e=I("Zm9Q"),f=I("Kwbf"),r=I("c+Xe"),c=I("bdgK"),i="rc-observer-key",n=function(o){Object(k.a)(d,o);var h=Object(y.a)(d);function d(){var u;return Object(g.a)(this,d),u=h.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(s){var l=u.props.onResize,E=s[0].target,b=E.getBoundingClientRect(),p=b.width,L=b.height,R=E.offsetWidth,v=E.offsetHeight,x=Math.floor(p),w=Math.floor(L);if(u.state.width!==x||u.state.height!==w||u.state.offsetWidth!==R||u.state.offsetHeight!==v){var T={width:x,height:w,offsetWidth:R,offsetHeight:v};u.setState(T),l&&Promise.resolve().then(function(){l(Object(N.a)(Object(N.a)({},T),{},{offsetWidth:R,offsetHeight:v}))})}},u.setChildNode=function(s){u.childNode=s},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 s=this.props.disabled;if(s){this.destroyObserver();return}var l=Object(_.a)(this.childNode||this),E=l!==this.currentElement;E&&(this.destroyObserver(),this.currentElement=l),!this.resizeObserver&&l&&(this.resizeObserver=new c.default(this.onResize),this.resizeObserver.observe(l))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var s=this.props.children,l=Object(e.a)(s);if(l.length>1)Object(f.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(l.length===0)return Object(f.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var E=l[0];if(m.isValidElement(E)&&Object(r.c)(E)){var b=E.ref;l[0]=m.cloneElement(E,{ref:Object(r.a)(b,this.setChildNode)})}return l.length===1?l[0]:l.map(function(p,L){return!m.isValidElement(p)||"key"in p&&p.key!==null?p:m.cloneElement(p,{key:"".concat(i,"-").concat(L)})})}}]),d}(m.Component);n.displayName="ResizeObserver",J.a=n},t9D7:function(H,J,I){"use strict";I.d(J,"b",function(){return C}),I.d(J,"g",function(){return e}),I.d(J,"d",function(){return f}),I.d(J,"e",function(){return r}),I.d(J,"a",function(){return c}),I.d(J,"f",function(){return o}),I.d(J,"c",function(){return h});var N=I("Vhoy"),g=I("MI8n"),S=I("pmY6"),k=I("Cg/j"),y=I("ic2d"),m=I("nEHx");const C=Object(k.c)("themeService");var _;(function(d){function u(s){return s&&typeof s=="object"&&typeof s.id=="string"}d.isThemeColor=u})(_||(_={}));function e(d){return{id:d}}var f;(function(d){function u(L){return L&&typeof L=="object"&&typeof L.id=="string"&&(typeof L.color=="undefined"||_.isThemeColor(L.color))}d.isThemeIcon=u;const s=new RegExp(`^\\$\\((${N.a.iconNameExpression}(?:${N.a.iconModifierExpression})?)\\)$`);function l(L){const R=s.exec(L);if(!R)return;let[,v]=R;return{id:v}}d.fromString=l;function E(L,R){let v=L.id;const x=v.lastIndexOf("~");return x!==-1&&(v=v.substring(0,x)),R&&(v=`${v}~${R}`),{id:v}}d.modify=E;function b(L,R){var v,x;return L.id===R.id&&((v=L.color)===null||v===void 0?void 0:v.id)===((x=R.color)===null||x===void 0?void 0:x.id)}d.isEqual=b;function p(L,R){return{id:L.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})(f||(f={}));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;y.a.add(c.ThemingContribution,n);function o(d){return n.onColorThemeChange(d)}class h 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,J,I){(function(N,g,S){H.exports=J=g(I("Ib8C"),I("MlIO"),I("1uat"))})(this,function(N){return function(){var g=N,S=g.x64,k=S.Word,y=S.WordArray,m=g.algo,C=m.SHA512,_=m.SHA384=C.extend({_doReset:function(){this._hash=new y.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,J,I){(function(N,g,S){H.exports=J=g(I("Ib8C"),I("OLod"))})(this,function(N){return N.pad.NoPadding={pad:function(){},unpad:function(){}},N.pad.NoPadding})},uQRt:function(H,J,I){H.exports=N;function N(){return I("gaXo"),{}}},ulZh:function(H,J,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 y=g[k]={i:k,l:!1,exports:{}};return N[k].call(y.exports,y,y.exports,S),y.l=!0,y.exports}return S.m=N,S.c=g,S.d=function(k,y,m){S.o(k,y)||Object.defineProperty(k,y,{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,y){if(y&1&&(k=S(k)),y&8)return k;if(y&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}),y&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 y=k&&k.__esModule?function(){return k.default}:function(){return k};return S.d(y,"a",y),y},S.o=function(k,y){return Object.prototype.hasOwnProperty.call(k,y)},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,y="~";function m(){}Object.create&&(m.prototype=Object.create(null),new m().__proto__||(y=!1));function C(r,c,i){this.fn=r,this.context=c,this.once=i||!1}function _(r,c,i,n,o){if(typeof i!="function")throw new TypeError("The listener must be a function");var h=new C(i,n||r,o),d=y?y+c:c;return r._events[d]?r._events[d].fn?r._events[d]=[r._events[d],h]:r._events[d].push(h):(r._events[d]=h,r._eventsCount++),r}function e(r,c){--r._eventsCount===0?r._events=new m:delete r._events[c]}function f(){this._events=new m,this._eventsCount=0}f.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(y?n.slice(1):n);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(i)):c},f.prototype.listeners=function(c){var i=y?y+c:c,n=this._events[i];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,h=n.length,d=new Array(h);o<h;o++)d[o]=n[o].fn;return d},f.prototype.listenerCount=function(c){var i=y?y+c:c,n=this._events[i];return n?n.fn?1:n.length:0},f.prototype.emit=function(c,i,n,o,h,d){var u=y?y+c:c;if(!this._events[u])return!1;var s=this._events[u],l=arguments.length,E,b;if(s.fn){s.once&&this.removeListener(c,s.fn,void 0,!0);switch(l){case 1:return s.fn.call(s.context),!0;case 2:return s.fn.call(s.context,i),!0;case 3:return s.fn.call(s.context,i,n),!0;case 4:return s.fn.call(s.context,i,n,o),!0;case 5:return s.fn.call(s.context,i,n,o,h),!0;case 6:return s.fn.call(s.context,i,n,o,h,d),!0}for(b=1,E=new Array(l-1);b<l;b++)E[b-1]=arguments[b];s.fn.apply(s.context,E)}else{var p=s.length,L;for(b=0;b<p;b++){s[b].once&&this.removeListener(c,s[b].fn,void 0,!0);switch(l){case 1:s[b].fn.call(s[b].context);break;case 2:s[b].fn.call(s[b].context,i);break;case 3:s[b].fn.call(s[b].context,i,n);break;case 4:s[b].fn.call(s[b].context,i,n,o);break;default:if(!E)for(L=1,E=new Array(l-1);L<l;L++)E[L-1]=arguments[L];s[b].fn.apply(s[b].context,E)}}}return!0},f.prototype.on=function(c,i,n){return _(this,c,i,n,!1)},f.prototype.once=function(c,i,n){return _(this,c,i,n,!0)},f.prototype.removeListener=function(c,i,n,o){var h=y?y+c:c;if(!this._events[h])return this;if(!i)return e(this,h),this;var d=this._events[h];if(d.fn)d.fn===i&&(!o||d.once)&&(!n||d.context===n)&&e(this,h);else{for(var u=0,s=[],l=d.length;u<l;u++)(d[u].fn!==i||o&&!d[u].once||n&&d[u].context!==n)&&s.push(d[u]);s.length?this._events[h]=s.length===1?s[0]:s:e(this,h)}return this},f.prototype.removeAllListeners=function(c){var i;return c?(i=y?y+c:c,this._events[i]&&e(this,i)):(this._events=new m,this._eventsCount=0),this},f.prototype.off=f.prototype.removeListener,f.prototype.addListener=f.prototype.on,f.prefixed=y,f.EventEmitter=f,N.exports=f},"./node_modules/url-toolkit/src/url-toolkit.js":function(N,g,S){(function(k){var y=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,m=/^([^\/?#]*)([^]*)$/,C=/(?:\/|^)\.(?=\/)/g,_=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,e={buildAbsoluteURL:function(f,r,c){if(c=c||{},f=f.trim(),r=r.trim(),!r){if(!c.alwaysNormalize)return f;var i=e.parseURL(f);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 o=e.parseURL(f);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&o.path[0]!=="/"){var h=m.exec(o.path);o.netLoc=h[1],o.path=h[2]}o.netLoc&&!o.path&&(o.path="/");var d={scheme:o.scheme,netLoc:n.netLoc,path:null,params:n.params,query:n.query,fragment:n.fragment};if(!n.netLoc&&(d.netLoc=o.netLoc,n.path[0]!=="/"))if(!n.path)d.path=o.path,n.params||(d.params=o.params,n.query||(d.query=o.query));else{var u=o.path,s=u.substring(0,u.lastIndexOf("/")+1)+n.path;d.path=e.normalizePath(s)}return d.path===null&&(d.path=c.alwaysNormalize?e.normalizePath(n.path):n.path),e.buildURLFromParts(d)},parseURL:function(f){var r=y.exec(f);return r?{scheme:r[1]||"",netLoc:r[2]||"",path:r[3]||"",params:r[4]||"",query:r[5]||"",fragment:r[6]||""}:null},normalizePath:function(f){for(f=f.split("").reverse().join("").replace(C,"");f.length!==(f=f.replace(_,"")).length;);return f.split("").reverse().join("")},buildURLFromParts:function(f){return f.scheme+f.netLoc+f.path+f.params+f.query+f.fragment}};N.exports=e})(this)},"./node_modules/webworkify-webpack/index.js":function(N,g,S){function k(c){var i={};function n(h){if(i[h])return i[h].exports;var d=i[h]={i:h,l:!1,exports:{}};return c[h].call(d.exports,d,d.exports,n),d.l=!0,d.exports}n.m=c,n.c=i,n.i=function(h){return h},n.d=function(h,d,u){n.o(h,d)||Object.defineProperty(h,d,{configurable:!1,enumerable:!0,get:u})},n.r=function(h){Object.defineProperty(h,"__esModule",{value:!0})},n.n=function(h){var d=h&&h.__esModule?function(){return h.default}:function(){return h};return n.d(d,"a",d),d},n.o=function(h,d){return Object.prototype.hasOwnProperty.call(h,d)},n.p="/",n.oe=function(h){throw console.error(h),h};var o=n(n.s=ENTRY_MODULE);return o.default||o}var y="[\\.|\\-|\\+|\\w|/|@]+",m="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+y+").*?\\)";function C(c){return(c+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function _(c){return!isNaN(1*c)}function e(c,i,n){var o={};o[n]=[];var h=i.toString(),d=h.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!d)return o;for(var u=d[1],s=new RegExp("(\\\\n|\\W)"+C(u)+m,"g"),l;l=s.exec(h);){if(l[3]==="dll-reference")continue;o[n].push(l[3])}for(s=new RegExp("\\("+C(u)+'\\("(dll-reference\\s('+y+'))"\\)\\)'+m,"g");l=s.exec(h);)c[l[2]]||(o[n].push(l[1]),c[l[2]]=S(l[1]).m),o[l[2]]=o[l[2]]||[],o[l[2]].push(l[4]);for(var E=Object.keys(o),b=0;b<E.length;b++)for(var p=0;p<o[E[b]].length;p++)_(o[E[b]][p])&&(o[E[b]][p]=1*o[E[b]][p]);return o}function f(c){var i=Object.keys(c);return i.reduce(function(n,o){return n||c[o].length>0},!1)}function r(c,i){for(var n={main:[i]},o={main:[]},h={main:{}};f(n);)for(var d=Object.keys(n),u=0;u<d.length;u++){var s=d[u],l=n[s],E=l.pop();if(h[s]=h[s]||{},h[s][E]||!c[s][E])continue;h[s][E]=!0,o[s]=o[s]||[],o[s].push(E);for(var b=e(c,c[s][E],s),p=Object.keys(b),L=0;L<p.length;L++)n[p[L]]=n[p[L]]||[],n[p[L]]=n[p[L]].concat(b[p[L]])}return o}N.exports=function(c,i){i=i||{};var n={main:S.m},o=i.all?{main:Object.keys(n.main)}:r(n,c),h="";Object.keys(o).filter(function(E){return E!=="main"}).forEach(function(E){for(var b=0;o[E][b];)b++;o[E].push(b),n[E][b]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",h=h+"var "+E+" = ("+k.toString().replace("ENTRY_MODULE",JSON.stringify(b))+")({"+o[E].map(function(p){return""+JSON.stringify(p)+": "+n[E][p].toString()}).join(",")+`});
`}),h=h+"new (("+k.toString().replace("ENTRY_MODULE",JSON.stringify(c))+")({"+o.main.map(function(E){return""+JSON.stringify(E)+": "+n.main[E].toString()}).join(",")+"}))(self);";var d=new window.Blob([h],{type:"text/javascript"});if(i.bare)return d;var u=window.URL||window.webkitURL||window.mozURL||window.msURL,s=u.createObjectURL(d),l=new window.Worker(s);return l.objectURL=s,l}},"./src/config.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"hlsDefaultConfig",function(){return L}),S.d(g,"mergeConfig",function(){return v}),S.d(g,"enableStreamingMode",function(){return x});var k=S("./src/controller/abr-controller.ts"),y=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"),f=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"),o=S("./src/utils/xhr-loader.ts"),h=S("./src/utils/fetch-loader.ts"),d=S("./src/utils/cues.ts"),u=S("./src/utils/mediakeys-helper.ts"),s=S("./src/utils/logger.ts");function l(){return l=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},l.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 L=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:o.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:f.TimelineController,audioStreamController:y.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 v(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 l({},w,T)}function x(w){var T=w.loader;if(T!==h.default&&T!==o.default)s.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),w.progressive=!1;else{var F=Object(h.fetchSupported)();F&&(w.loader=h.default,w.progressive=!0,w.enableSoftwareAES=!0,s.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"),y=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"),f=S("./src/utils/logger.ts");function r(n,o){for(var h=0;h<o.length;h++){var d=o[h];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(n,d.key,d)}}function c(n,o,h){return o&&r(n.prototype,o),h&&r(n,h),n}var i=function(){function n(h){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=h;var d=h.config;this.bwEstimator=new y.default(d.abrEwmaSlowVoD,d.abrEwmaFastVoD,d.abrEwmaDefaultEstimate),this.registerListeners()}var o=n.prototype;return o.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)},o.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)},o.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},o.onFragLoading=function(d,u){var s=u.frag;if(s.type===e.PlaylistLevelType.MAIN&&!this.timer){var l;this.fragCurrent=s,this.partCurrent=(l=u.part)!=null?l:null,this.timer=self.setInterval(this.onCheck,100)}},o.onLevelLoaded=function(d,u){var s=this.hls.config;u.details.live?this.bwEstimator.update(s.abrEwmaSlowLive,s.abrEwmaFastLive):this.bwEstimator.update(s.abrEwmaSlowVoD,s.abrEwmaFastVoD)},o._abandonRulesCheck=function(){var d=this.fragCurrent,u=this.partCurrent,s=this.hls,l=s.autoLevelEnabled,E=s.config,b=s.media;if(!d||!b)return;var p=u?u.stats:d.stats,L=u?u.duration:d.duration;if(p.aborted){f.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!l||b.paused||!b.playbackRate||!b.readyState)return;var R=performance.now()-p.loading.start,v=Math.abs(b.playbackRate);if(R<=500*L/v)return;var x=s.levels,w=s.minAutoLevel,T=x[d.level],F=p.total||Math.max(p.loaded,Math.round(L*T.maxBitrate/8)),P=Math.max(1,p.bwEstimate?p.bwEstimate/8:p.loaded*1e3/R),A=(F-p.loaded)/P,z=b.currentTime,K=(C.BufferHelper.bufferInfo(b,z,E.maxBufferHole).end-z)/v;if(K>=2*L/v||A<=K)return;var O=Number.POSITIVE_INFINITY,B;for(B=d.level-1;B>w;B--){var U=x[B].maxBitrate;if(O=L*U/(8*.8*P),O<K)break}if(O>=A)return;var D=this.bwEstimator.getEstimate();f.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)(D)?(D/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: `+K.toFixed(3)+" s"),s.nextLoadLevel=B,this.bwEstimator.sample(R,p.loaded),this.clearTimer(),d.loader&&(this.fragCurrent=this.partCurrent=null,d.loader.abort()),s.trigger(m.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:d,part:u,stats:p})},o.onFragLoaded=function(d,u){var s=u.frag,l=u.part;if(s.type===e.PlaylistLevelType.MAIN&&Object(k.isFiniteNumber)(s.sn)){var E=l?l.stats:s.stats,b=l?l.duration:s.duration;if(this.clearTimer(),this.lastLoadedFragLevel=s.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var p=this.hls.levels[s.level],L=(p.loaded?p.loaded.bytes:0)+E.loaded,R=(p.loaded?p.loaded.duration:0)+b;p.loaded={bytes:L,duration:R},p.realBitrate=Math.round(8*L/R)}if(s.bitrateTest){var v={stats:E,frag:s,part:l,id:s.type};this.onFragBuffered(m.Events.FRAG_BUFFERED,v),s.bitrateTest=!1}}},o.onFragBuffered=function(d,u){var s=u.frag,l=u.part,E=l?l.stats:s.stats;if(E.aborted)return;if(s.type!==e.PlaylistLevelType.MAIN||s.sn==="initSegment")return;var b=E.parsing.end-E.loading.start;this.bwEstimator.sample(b,E.loaded),E.bwEstimate=this.bwEstimator.getEstimate(),s.bitrateTest?this.bitrateTestDelay=b/1e3:this.bitrateTestDelay=0},o.onError=function(d,u){switch(u.details){case _.ErrorDetails.FRAG_LOAD_ERROR:case _.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},o.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},o.getNextABRAutoLevel=function(){var d=this.fragCurrent,u=this.partCurrent,s=this.hls,l=s.maxAutoLevel,E=s.config,b=s.minAutoLevel,p=s.media,L=u?u.duration:d?d.duration:0,R=p?p.currentTime:0,v=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)/v,T=this.findBestLevel(x,b,l,w,E.abrBandWidthFactor,E.abrBandWidthUpFactor);if(T>=0)return T;f.logger.trace((w?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var F=L?Math.min(L,E.maxStarvationDelay):E.maxStarvationDelay,P=E.abrBandWidthFactor,A=E.abrBandWidthUpFactor;if(!w){var z=this.bitrateTestDelay;if(z){var K=L?Math.min(L,E.maxLoadingDelay):E.maxLoadingDelay;F=K-z,f.logger.trace("bitrate test took "+Math.round(1e3*z)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*F)+" ms"),P=A=1}}return T=this.findBestLevel(x,b,l,w+F,P,A),Math.max(T,0)},o.findBestLevel=function(d,u,s,l,E,b){for(var p,L=this.fragCurrent,R=this.partCurrent,v=this.lastLoadedFragLevel,x=this.hls.levels,w=x[v],T=!!(w!=null&&(p=w.details)!==null&&p!==void 0&&p.live),F=w==null?void 0:w.codecSet,P=R?R.duration:L?L.duration:0,A=s;A>=u;A--){var z=x[A];if(!z||F&&z.codecSet!==F)continue;var K=z.details,O=(R?K==null?void 0:K.partTarget:K==null?void 0:K.averagetargetduration)||P,B=void 0;A<=v?B=E*d:B=b*d;var U=x[A].maxBitrate,D=U*O/B;if(f.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+A+"/"+Math.round(B)+"/"+U+"/"+O+"/"+l+"/"+D),B>U&&(!D||T&&!this.bitrateTestDelay||D<l))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 s=this.getNextABRAutoLevel();return d!==-1&&(s=Math.min(d,s)),s},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"),y=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"),f=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"),o=S("./src/controller/fragment-finders.ts"),h=S("./src/utils/discontinuities.ts"),d=S("./src/errors.ts"),u=S("./src/utils/logger.ts");function s(){return s=Object.assign||function(L){for(var R=1;R<arguments.length;R++){var v=arguments[R];for(var x in v)Object.prototype.hasOwnProperty.call(v,x)&&(L[x]=v[x])}return L},s.apply(this,arguments)}function l(L,R){L.prototype=Object.create(R.prototype),L.prototype.constructor=L,E(L,R)}function E(L,R){return E=Object.setPrototypeOf||function(x,w){return x.__proto__=w,x},E(L,R)}var b=100,p=function(L){l(R,L);function R(x,w){var T;return T=L.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 v=R.prototype;return v.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},v._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)},v._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)},v.onInitPtsFound=function(w,T){var F=T.frag,P=T.id,A=T.initPTS;if(P==="main"){var z=F.cc;this.initPTS[F.cc]=A,this.log("InitPTS for cc: "+z+" found from main: "+A),this.videoTrackCC=z,this.state===y.State.WAITING_INIT_PTS&&this.tick()}},v.startLoad=function(w){if(!this.levels){this.startPosition=w,this.state=y.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=y.State.IDLE):(this.loadedmetadata=!1,this.state=y.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=w,this.tick()},v.doTick=function(){switch(this.state){case y.State.IDLE:this.doTickIdle();break;case y.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=y.State.WAITING_INIT_PTS}break}case y.State.FRAG_LOADING_WAITING_RETRY:{var A,z=performance.now(),K=this.retryDate;(!K||z>=K||(A=this.media)!==null&&A!==void 0&&A.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=y.State.IDLE);break}case y.State.WAITING_INIT_PTS:{var O=this.waitingData;if(O){var B=O.frag,U=O.part,D=O.cache,W=O.complete;if(this.initPTS[B.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=y.State.FRAG_LOADING;var Q=D.flush(),re={frag:B,part:U,payload:Q,networkDetails:null};this._handleFragmentLoadProgress(re),W&&L.prototype._handleFragmentLoadComplete.call(this,re)}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 ee=this.getLoadPosition(),ye=C.BufferHelper.bufferInfo(this.mediaBuffer,ee,this.config.maxBufferHole),be=Object(o.fragmentWithinToleranceTest)(ye.end,this.config.maxFragLookUpTolerance,B);be<0&&(u.logger.log("Waiting fragment cc ("+B.cc+") @ "+B.start+" cancelled because another fragment at "+ye.end+" is needed"),this.clearWaitingFragment())}}else this.state=y.State.IDLE}}this.onTickEnd()},v.clearWaitingFragment=function(){var w=this.waitingData;w&&(this.fragmentTracker.removeFragment(w.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=y.State.IDLE)},v.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},v.doTickIdle=function(){var w,T,F=this.hls,P=this.levels,A=this.media,z=this.trackId,K=F.config;if(!P||!P[z])return;if(!A&&(this.startFragRequested||!K.startFragPrefetch))return;var O=P[z],B=O.details;if(!B||B.live&&this.levelLastLoaded!==z||this.waitForCdnTuneIn(B)){this.state=y.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,r.ElementaryStreamTypes.AUDIO,f.PlaylistLevelType.AUDIO));var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,f.PlaylistLevelType.AUDIO);if(U===null)return;var D=U.len,W=this.getMaxBufferLength(),Q=this.audioSwitch;if(D>=W&&!Q)return;if(!Q&&this._streamEnded(U,B)){F.trigger(m.Events.BUFFER_EOS,{type:"audio"}),this.state=y.State.ENDED;return}var re=B.fragments,ee=re[0].start,ye=U.end;if(Q){var be=this.getLoadPosition();ye=be,B.PTSKnown&&be<ee&&((U.end>ee||U.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),A.currentTime=ee+.05))}var he=this.getNextFragment(ye,B);if(!he){this.bufferFlushed=!0;return}((w=he.decryptdata)===null||w===void 0?void 0:w.keyFormat)==="identity"&&!((T=he.decryptdata)!==null&&T!==void 0&&T.key)?this.loadKey(he,B):this.loadFragment(he,B,ye)},v.getMaxBufferLength=function(){var w=L.prototype.getMaxBufferLength.call(this),T=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,f.PlaylistLevelType.MAIN);return T===null?w:Math.max(w,T.len)},v.onMediaDetaching=function(){this.videoBuffer=null,L.prototype.onMediaDetaching.call(this)},v.onAudioTracksUpdated=function(w,T){var F=T.audioTracks;this.resetTransmuxer(),this.levels=F.map(function(P){return new e.Level(P)})},v.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=y.State.IDLE):this.state=y.State.STOPPED,this.tick()},v.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},v.onLevelLoaded=function(w,T){this.mainDetails=T.details},v.onAudioTrackLoaded=function(w,T){var F,P=this.levels,A=T.details,z=T.id;if(!P){this.warn("Audio tracks were reset while loading level "+z);return}this.log("Track "+z+" loaded ["+A.startSN+","+A.endSN+"],duration:"+A.totalduration);var K=P[z],O=0;if(A.live||(F=K.details)!==null&&F!==void 0&&F.live){var B=this.mainDetails;if(A.fragments[0]||(A.deltaUpdateFailed=!0),A.deltaUpdateFailed||!B)return;!K.details&&A.hasProgramDateTime&&B.hasProgramDateTime?(Object(h.alignMediaPlaylistByPDT)(A,B),O=A.fragments[0].start):O=this.alignPlaylists(A,K.details)}K.details=A,this.levelLastLoaded=z,!this.startFragRequested&&(this.mainDetails||!A.live)&&this.setStartPosition(K.details,O),this.state===y.State.WAITING_TRACK&&!this.waitForCdnTuneIn(A)&&(this.state=y.State.IDLE),this.tick()},v._handleFragmentLoadProgress=function(w){var T,F=w.frag,P=w.part,A=w.payload,z=this.config,K=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[K];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 D=z.defaultAudioCodec||B.audioCodec||"mp4a.40.2",W=this.transmuxer;W||(W=this.transmuxer=new i.default(this.hls,f.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var Q=this.initPTS[F.cc],re=(T=F.initSegment)===null||T===void 0?void 0:T.data;if(Q!==void 0){var ee=!1,ye=P?P.index:-1,be=ye!==-1,he=new n.ChunkMetadata(F.level,F.sn,F.stats.chunkCount,A.byteLength,ye,be);W.push(A,re,D,"",F,P,U.totalduration,ee,he,Q)}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 "+K);var Ie=this.waitingData=this.waitingData||{frag:F,part:P,cache:new c.default,complete:!1},Se=Ie.cache;Se.push(new Uint8Array(A)),this.waitingVideoCC=this.videoTrackCC,this.state=y.State.WAITING_INIT_PTS}},v._handleFragmentLoadComplete=function(w){if(this.waitingData){this.waitingData.complete=!0;return}L.prototype._handleFragmentLoadComplete.call(this,w)},v.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},v.onBufferCreated=function(w,T){var F=T.tracks.audio;F&&(this.mediaBuffer=F.buffer),T.tracks.video&&(this.videoBuffer=T.tracks.video.buffer)},v.onFragBuffered=function(w,T){var F=T.frag,P=T.part;if(F.type!==f.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)},v.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(f.PlaylistLevelType.AUDIO,T);break;case d.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case d.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==y.State.ERROR&&this.state!==y.State.STOPPED&&(this.state=T.fatal?y.State.ERROR:y.State.IDLE,this.warn(T.details+" while loading frag, switching to "+this.state+" state"));break;case d.ErrorDetails.BUFFER_FULL_ERROR:if(T.parent==="audio"&&(this.state===y.State.PARSING||this.state===y.State.PARSED)){var F=!0,P=this.getFwdBufferInfo(this.mediaBuffer,f.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,L.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},v.onBufferFlushed=function(w,T){var F=T.type;F===r.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},v._handleTransmuxComplete=function(w){var T,F="audio",P=this.hls,A=w.remuxResult,z=w.chunkMeta,K=this.getCurrentContext(z);if(!K){this.warn("The loading context changed while buffering fragment "+z.sn+" of level "+z.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(z.level);return}var O=K.frag,B=K.part,U=A.audio,D=A.text,W=A.id3,Q=A.initSegment;if(this.fragContextChanged(O))return;if(this.state=y.State.PARSING,this.audioSwitch&&U&&this.completeAudioSwitch(),Q!=null&&Q.tracks&&(this._bufferInitSegment(Q.tracks,O,z),P.trigger(m.Events.FRAG_PARSING_INIT_SEGMENT,{frag:O,id:F,tracks:Q.tracks})),U){var re=U.startPTS,ee=U.endPTS,ye=U.startDTS,be=U.endDTS;B&&(B.elementaryStreams[r.ElementaryStreamTypes.AUDIO]={startPTS:re,endPTS:ee,startDTS:ye,endDTS:be}),O.setElementaryStreamInfo(r.ElementaryStreamTypes.AUDIO,re,ee,ye,be),this.bufferFragmentData(U,O,B,z)}if(W!=null&&(T=W.samples)!==null&&T!==void 0&&T.length){var he=s({frag:O,id:F},W);P.trigger(m.Events.FRAG_PARSING_METADATA,he)}if(D){var Ie=s({frag:O,id:F},D);P.trigger(m.Events.FRAG_PARSING_USERDATA,Ie)}},v._bufferInitSegment=function(w,T,F){if(this.state!==y.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 z={type:"audio",frag:T,part:null,chunkMeta:F,parent:T.type,data:A};this.hls.trigger(m.Events.BUFFER_APPENDING,z)}this.tick()},v.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=y.State.WAITING_INIT_PTS):(this.startFragRequested=!0,L.prototype.loadFragment.call(this,w,T,F)))},v.completeAudioSwitch=function(){var w=this.hls,T=this.media,F=this.trackId;T&&(this.log("Switching audio track : flushing all audio"),L.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,w.trigger(m.Events.AUDIO_TRACK_SWITCHED,{id:F})},R}(y.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"),y=S("./src/errors.ts"),m=S("./src/controller/base-playlist-controller.ts"),C=S("./src/types/loader.ts");function _(i,n){for(var o=0;o<n.length;o++){var h=n[o];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(i,h.key,h)}}function e(i,n,o){return n&&_(i.prototype,n),o&&_(i,o),i}function f(i,n){i.prototype=Object.create(n.prototype),i.prototype.constructor=i,r(i,n)}function r(i,n){return r=Object.setPrototypeOf||function(h,d){return h.__proto__=d,h},r(i,n)}var c=function(i){f(n,i);function n(h){var d;return d=i.call(this,h,"[audio-track-controller]")||this,d.tracks=[],d.groupId=null,d.tracksInGroup=[],d.trackId=-1,d.trackName="",d.selectDefaultTrack=!0,d.registerListeners(),d}var o=n.prototype;return o.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)},o.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)},o.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,i.prototype.destroy.call(this)},o.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},o.onManifestParsed=function(d,u){this.tracks=u.audioTracks||[]},o.onAudioTrackLoaded=function(d,u){var s=u.id,l=u.details,E=this.tracksInGroup[s];if(!E){this.warn("Invalid audio track id "+s);return}var b=E.details;E.details=u.details,this.log("audioTrack "+s+" loaded ["+l.startSN+"-"+l.endSN+"]"),s===this.trackId&&(this.retryCount=0,this.playlistLoaded(s,u,b))},o.onLevelLoading=function(d,u){this.switchLevel(u.level)},o.onLevelSwitching=function(d,u){this.switchLevel(u.level)},o.switchLevel=function(d){var u=this.hls.levels[d];if(!(u!=null&&u.audioGroupIds))return;var s=u.audioGroupIds[u.urlId];if(this.groupId!==s){this.groupId=s;var l=this.tracks.filter(function(b){return!s||b.groupId===s});this.selectDefaultTrack&&!l.some(function(b){return b.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=l;var E={audioTracks:l};this.log("Updating audio tracks, "+l.length+' track(s) found in "'+s+'" group-id'),this.hls.trigger(k.Events.AUDIO_TRACKS_UPDATED,E),this.selectInitialTrack()}},o.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)},o.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 s=u[this.trackId];this.log("Now switching to audio-track index "+d);var l=u[d],E=l.id,b=l.groupId,p=b===void 0?"":b,L=l.name,R=l.type,v=l.url;if(this.trackId=d,this.trackName=L,this.selectDefaultTrack=!1,this.hls.trigger(k.Events.AUDIO_TRACK_SWITCHING,{id:E,groupId:p,name:L,type:R,url:v}),l.details&&!l.details.live)return;var x=this.switchParams(l.url,s==null?void 0:s.details);this.loadPlaylist(x)},o.selectInitialTrack=function(){var d=this.tracksInGroup;console.assert(d.length,"Initial audio track should be selected when tracks are known");var u=this.trackName,s=this.findTrackId(u)||this.findTrackId();s!==-1?this.setAudioTrack(s):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(k.Events.ERROR,{type:y.ErrorTypes.MEDIA_ERROR,details:y.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},o.findTrackId=function(d){for(var u=this.tracksInGroup,s=0;s<u.length;s++){var l=u[s];if((!this.selectDefaultTrack||l.default)&&(!d||d===l.name))return l.id}return-1},o.loadPlaylist=function(d){var u=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(u)){var s=u.id,l=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: "+s),this.clearTimer(),this.hls.trigger(k.Events.AUDIO_TRACK_LOADING,{url:E,id:s,groupId:l,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"),y=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 f(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=f.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 o=n==null?void 0:n.renditionReports;if(o)for(var h=0;h<o.length;h++){var d=o[h],u=""+d.URI;if(u===i.substr(-u.length)){var s=parseInt(d["LAST-MSN"]),l=parseInt(d["LAST-PART"]);if(n&&this.hls.config.lowLatencyMode){var E=Math.min(n.age-n.partTarget,n.targetduration);l!==void 0&&E>n.partTarget&&(l+=1)}if(Object(k.isFiniteNumber)(s))return new y.HlsUrlParameters(s,Object(k.isFiniteNumber)(l)?l:void 0,y.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,o){var h=this,d=n.details,u=n.stats,s=u.loading.end?Math.max(0,self.performance.now()-u.loading.end):0;if(d.advancedDateTime=Date.now()-s,d.live||o!=null&&o.live){if(d.reloaded(o),o&&this.log("live playlist "+i+" "+(d.advanced?"REFRESHED "+d.lastPartSn+"-"+d.lastPartIndex:"MISSED")),o&&d.fragments.length>0&&Object(m.mergeDetails)(o,d),!this.canLoad||!d.live)return;var l,E=void 0,b=void 0;if(d.canBlockReload&&d.endSN&&d.advanced){var p=this.hls.config.lowLatencyMode,L=d.lastPartSn,R=d.endSN,v=d.lastPartIndex,x=v!==-1,w=L===R,T=p?0:v;x?(E=w?R+1:L,b=w?T:v+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(o&&A>o.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+o.tuneInGoal+" to: "+A+" with playlist age: "+d.age),A=0;else{var z=Math.floor(A/d.targetduration);if(E+=z,b!==void 0){var K=Math.round(A%d.targetduration/d.partTarget);b+=K}this.log("CDN Tune-in age: "+d.ageHeader+"s last advanced "+F.toFixed(2)+"s goal: "+A+" skip sn "+z+" to part "+b)}d.tuneInGoal=A}if(l=this.getDeliveryDirectives(d,n.deliveryDirectives,E,b),p||!w){this.loadPlaylist(l);return}}else l=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 h.loadPlaylist(l)},O)}else this.clearTimer()},r.getDeliveryDirectives=function(i,n,o,h){var d=Object(y.getSkipValue)(i,o);return n!=null&&n.skip&&i.deltaUpdateFailed&&(o=n.msn,h=n.part,d=y.HlsSkip.No),new y.HlsUrlParameters(o,h,d)},r.retryLoadingOrFail=function(i){var n=this,o=this.hls.config,h=this.retryCount<o.levelLoadingMaxRetry;if(h){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)*o.levelLoadingRetryDelay,o.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 h},f}()},"./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 v});var k=S("./src/polyfills/number.ts"),y=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"),f=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"),o=S("./src/controller/level-helper.ts"),h=S("./src/loader/fragment-loader.ts"),d=S("./src/crypt/decrypter.ts"),u=S("./src/utils/time-ranges.ts"),s=S("./src/types/loader.ts");function l(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&&l(x.prototype,w),T&&l(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,L(x,w)}function L(x,w){return L=Object.setPrototypeOf||function(F,P){return F.__proto__=P,F},L(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"},v=function(x){p(w,x);function w(F,P,A){var z;return z=x.call(this)||this,z.hls=void 0,z.fragPrevious=null,z.fragCurrent=null,z.fragmentTracker=void 0,z.transmuxer=null,z._state=R.STOPPED,z.media=void 0,z.mediaBuffer=void 0,z.config=void 0,z.bitrateTest=!1,z.lastCurrentTime=0,z.nextLoadPosition=0,z.startPosition=0,z.loadedmetadata=!1,z.fragLoadError=0,z.retryDate=0,z.levels=null,z.fragmentLoader=void 0,z.levelLastLoaded=null,z.startFragRequested=!1,z.decrypter=void 0,z.initPTS=[],z.onvseeking=null,z.onvended=null,z.logPrefix="",z.log=void 0,z.warn=void 0,z.logPrefix=A,z.log=_.logger.log.bind(_.logger,A+":"),z.warn=_.logger.warn.bind(_.logger,A+":"),z.hls=F,z.fragmentLoader=new h.default(F.config),z.fragmentTracker=P,z.config=F.config,z.decrypter=new d.default(F,F.config),F.on(e.Events.KEY_LOADED,z.onKeyLoaded,b(z)),z}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 z=this.fragCurrent,K=this.fragmentTracker;if(!A.live&&z&&z.sn===A.endSN&&!P.nextStart){var O=K.getState(z);return O===m.FragmentState.PARTIAL||O===m.FragmentState.OK}return!1},T.onMediaAttached=function(P,A){var z=this.media=this.mediaBuffer=A.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),z.addEventListener("seeking",this.onvseeking),z.addEventListener("ended",this.onvended);var K=this.config;this.levels&&K.autoStartLoad&&this.state===R.STOPPED&&this.startLoad(K.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,z=this.media,K=this.mediaBuffer,O=this.state,B=z?z.currentTime:0,U=C.BufferHelper.bufferInfo(K||z,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 D=P.maxFragLookUpTolerance,W=A.start-D,Q=A.start+A.duration+D,re=B>Q;(B<W||re)&&(re&&A.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),A.loader.abort()),this.resetLoadingState())}z&&(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 z=this.levels[A.frag.level].details;z&&this.loadFragment(A.frag,z,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,z){this._loadFragForPlayback(P,A,z)},T._loadFragForPlayback=function(P,A,z){var K=this,O=function(U){if(K.fragContextChanged(P)){K.warn("Fragment "+P.sn+(U.part?" p: "+U.part.index:"")+" of level "+P.level+" was dropped during download."),K.fragmentTracker.removeFragment(P);return}P.stats.chunkCount++,K._handleFragmentLoadProgress(U)};this._doFragLoad(P,A,z,O).then(function(B){if(!B)return;K.fragLoadError=0;var U=K.state;if(K.fragContextChanged(P)){(U===R.FRAG_LOADING||U===R.BACKTRACKING||!K.fragCurrent&&U===R.PARSING)&&(K.fragmentTracker.removeFragment(P),K.state=R.IDLE);return}if("payload"in B&&(K.log("Loaded fragment "+P.sn+" of level "+P.level),K.hls.trigger(e.Events.FRAG_LOADED,B),K.state===R.BACKTRACKING)){K.fragmentTracker.backtrack(P,B),K.resetFragmentLoading(P);return}K._handleFragmentLoadComplete(B)}).catch(function(B){K.warn(B),K.resetFragmentLoading(P)})},T.flushMainBuffer=function(P,A,z){if(z===void 0&&(z=null),!(P-A))return;var K={startOffset:P,endOffset:A,type:z};this.fragLoadError=0,this.hls.trigger(e.Events.BUFFER_FLUSHING,K)},T._loadInitSegment=function(P){var A=this;this._doFragLoad(P).then(function(z){if(!z||A.fragContextChanged(P)||!A.levels)throw new Error("init load aborted");return z}).then(function(z){var K=A.hls,O=z.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(D){var W=self.performance.now();return K.trigger(e.Events.FRAG_DECRYPTED,{frag:P,payload:D,stats:{tstart:U,tdecrypt:W}}),z.payload=D,z})}return z}).then(function(z){var K=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 D=P.stats;A.state=R.IDLE,A.fragLoadError=0,P.data=new Uint8Array(z.payload),D.parsing.start=D.buffering.start=self.performance.now(),D.parsing.end=D.buffering.end=self.performance.now(),z.frag===K&&O.trigger(e.Events.FRAG_BUFFERED,{stats:D,frag:K,part:null,id:P.type}),A.tick()}).catch(function(z){A.warn(z),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 z=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(z))),this.state=R.IDLE,this.tick()},T._handleFragmentLoadComplete=function(P){var A=this.transmuxer;if(!A)return;var z=P.frag,K=P.part,O=P.partsLoaded,B=!O||O.length===0||O.some(function(D){return!D}),U=new r.ChunkMetadata(z.level,z.sn,z.stats.chunkCount+1,0,K?K.index:-1,!B);A.flush(U)},T._handleFragmentLoadProgress=function(P){},T._doFragLoad=function(P,A,z,K){var O=this;if(z===void 0&&(z=null),!this.levels)throw new Error("frag load aborted, missing levels");if(z=Math.max(P.start,z||0),this.config.lowLatencyMode&&A){var B=A.partList;if(B&&K){z>P.end&&A.fragmentHint&&(P=A.fragmentHint);var U=this.getNextPart(B,P,z);if(U>-1){var D=B[U];return this.log("Loading part sn: "+P.sn+" p: "+D.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(z.toFixed(3))),this.nextLoadPosition=D.start+D.duration,this.state=R.FRAG_LOADING,this.hls.trigger(e.Events.FRAG_LOADING,{frag:P,part:B[U],targetBufferTime:z}),this.doFragPartsLoad(P,B,U,K).catch(function(W){return O.handleFragLoadError(W)})}else if(!P.url||this.loadedEndOfParts(B,z))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(z.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:z}),this.fragmentLoader.load(P,K).catch(function(W){return O.handleFragLoadError(W)})},T.doFragPartsLoad=function(P,A,z,K){var O=this;return new Promise(function(B,U){var D=[],W=function Q(re){var ee=A[re];O.fragmentLoader.loadPart(P,ee,K).then(function(ye){D[ee.index]=ye;var be=ye.part;O.hls.trigger(e.Events.FRAG_LOADED,ye);var he=A[re+1];if(he&&he.fragment===P)Q(re+1);else return B({frag:P,part:be,partsLoaded:D})}).catch(U)};W(z)})},T.handleFragLoadError=function(P){var A=P.data;return A&&A.details===f.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 z=A.frag,K=A.part,O=A.level,B=self.performance.now();z.stats.parsing.end=B,K&&(K.stats.parsing.end=B),this.updateLevelTiming(z,K,O,P.partial)},T.getCurrentContext=function(P){var A=this.levels,z=P.level,K=P.sn,O=P.part;if(!A||!A[z])return this.warn("Levels object was unset while buffering fragment "+K+" of level "+z+". The current chunk will not be buffered."),null;var B=A[z],U=O>-1?Object(o.getPartWith)(B,K,O):null,D=U?U.fragment:Object(o.getFragmentWithSN)(B,K,this.fragCurrent);return D?{frag:D,part:U,level:B}:null},T.bufferFragmentData=function(P,A,z,K){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 D={type:P.type,frag:A,part:z,chunkMeta:K,parent:A.type,data:U};this.hls.trigger(e.Events.BUFFER_APPENDING,D),P.dropped&&P.independent&&!z&&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 z=A.currentTime,K=C.BufferHelper.bufferInfo(A,z,0),O=P.duration,B=Math.min(this.config.maxFragLookUpTolerance*2,O*.25),U=Math.max(Math.min(P.start-B,K.end-B),z+B);P.start-U>B&&this.flushMainBuffer(U,P.start)},T.getFwdBufferInfo=function(P,A){var z=this.config,K=this.getLoadPosition();if(!Object(k.isFiniteNumber)(K))return null;var O=C.BufferHelper.bufferInfo(P,K,z.maxBufferHole);if(O.len===0&&O.nextStart!==void 0){var B=this.fragmentTracker.getBufferedFrag(K,A);if(B&&O.nextStart<B.end)return C.BufferHelper.bufferInfo(P,K,Math.max(O.nextStart,z.maxBufferHole))}return O},T.getMaxBufferLength=function(P){var A=this.config,z;return P?z=Math.max(8*A.maxBufferSize/P,A.maxBufferLength):z=A.maxBufferLength,Math.min(z,A.maxMaxBufferLength)},T.reduceMaxBufferLength=function(P){var A=this.config,z=P||A.maxBufferLength;return A.maxMaxBufferLength>=z?(A.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+A.maxMaxBufferLength+"s"),!0):!1},T.getNextFragment=function(P,A){var z,K,O=A.fragments,B=O.length;if(!B)return null;var U=this.config,D=O[0].start,W;if(A.live){var Q=U.initialLiveManifestSize;if(B<Q)return this.warn("Not enough fragments to start playback (have: "+B+", need: "+Q+")"),null;!A.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(W=this.getInitialLiveFragment(A,O),this.startPosition=W?this.hls.liveSyncPosition||W.start:P)}else P<=D&&(W=O[0]);if(!W){var re=U.lowLatencyMode?A.partEnd:A.fragmentEnd;W=this.getFragmentAtPosition(P,re,A)}return(z=W)!==null&&z!==void 0&&z.initSegment&&!((K=W)!==null&&K!==void 0&&K.initSegment.data)&&!this.bitrateTest&&(W=W.initSegment),W},T.getNextPart=function(P,A,z){for(var K=-1,O=!1,B=!0,U=0,D=P.length;U<D;U++){var W=P[U];if(B=B&&!W.independent,K>-1&&z<W.start)break;var Q=W.loaded;!Q&&(O||W.independent||B)&&W.fragment===A&&(K=U),O=Q}return K},T.loadedEndOfParts=function(P,A){var z=P[P.length-1];return z&&A>z.start&&z.loaded},T.getInitialLiveFragment=function(P,A){var z=this.fragPrevious,K=null;if(z){if(P.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+z.programDateTime),K=Object(n.findFragmentByPDT)(A,z.endProgramDateTime,this.config.maxFragLookUpTolerance)),!K){var O=z.sn+1;if(O>=P.startSN&&O<=P.endSN){var B=A[O-P.startSN];z.cc===B.cc&&(K=B,this.log("Live playlist, switching playlist, load frag with next SN: "+K.sn))}K||(K=Object(n.findFragWithCC)(A,z.cc),K&&this.log("Live playlist, switching playlist, load frag with same CC: "+K.sn))}}else{var U=this.hls.liveSyncPosition;U!==null&&(K=this.getFragmentAtPosition(U,this.bitrateTest?P.fragmentEnd:P.edge,P))}return K},T.getFragmentAtPosition=function(P,A,z){var K=this.config,O=this.fragPrevious,B=z.fragments,U=z.endSN,D=z.fragmentHint,W=K.maxFragLookUpTolerance,Q=!!(K.lowLatencyMode&&z.partList&&D);Q&&D&&!this.bitrateTest&&(B=B.concat(D),U=D.sn);var re;if(P<A){var ee=P>A-W?0:W;re=Object(n.findFragmentByPTS)(O,B,P,ee)}else re=B[B.length-1];if(re){var ye=re.sn-z.startSN,be=O&&re.level===O.level,he=B[ye+1],Ie=this.fragmentTracker.getState(re);if(Ie===m.FragmentState.BACKTRACKED){re=null;for(var Se=ye;B[Se]&&this.fragmentTracker.getState(B[Se])===m.FragmentState.BACKTRACKED;)O?re=B[Se--]:re=B[--Se];re||(re=he)}else O&&re.sn===O.sn&&!Q&&(be&&(re.sn<U&&this.fragmentTracker.getState(he)!==m.FragmentState.OK?(this.log("SN "+re.sn+" just loaded, load next one: "+he.sn),re=he):re=null))}return re},T.synchronizeToLiveEdge=function(P){var A=this.config,z=this.media;if(!z)return;var K=this.hls.liveSyncPosition,O=z.currentTime,B=P.fragments[0].start,U=P.edge,D=O>=B-A.maxFragLookUpTolerance&&O<=U;if(K!==null&&z.duration>K&&(O<K||!D)){var W=A.liveMaxLatencyDuration!==void 0?A.liveMaxLatencyDuration:A.liveMaxLatencyDurationCount*P.targetduration;(!D&&z.readyState<4||O<U-W)&&(this.loadedmetadata||(this.nextLoadPosition=K),z.readyState&&(this.warn("Playback: "+O.toFixed(3)+" is located too far from the end of live sliding playlist: "+U+", reset currentTime to : "+K.toFixed(3)),z.currentTime=K))}},T.alignPlaylists=function(P,A){var z=this.levels,K=this.levelLastLoaded,O=this.fragPrevious,B=K!==null?z[K]:null,U=P.fragments.length;if(!U)return this.warn("No fragments in live playlist"),0;var D=P.fragments[0].start,W=!A,Q=P.alignedSliding&&Object(k.isFiniteNumber)(D);if(W||!Q&&!D){Object(i.alignStream)(O,B,P);var re=P.fragments[0].start;return this.log("Live playlist sliding: "+re.toFixed(2)+" start-sn: "+(A?A.startSN:"na")+"->"+P.startSN+" prev-sn: "+(O?O.sn:"na")+" fragments: "+U),re}return D},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 z=this.startPosition;if(z<A&&(z=-1),z===-1||this.lastCurrentTime===-1){var K=P.startTimeOffset;Object(k.isFiniteNumber)(K)?(z=A+K,K<0&&(z+=P.totalduration),z=Math.min(Math.max(A,z),A+P.totalduration),this.log("Start time offset "+K+" found in playlist, adjust startPosition to "+z),this.startPosition=z):P.live?z=this.hls.liveSyncPosition||A:this.startPosition=z=0,this.lastCurrentTime=z}this.nextLoadPosition=z},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 z=A.frag;if(!z||z.type!==P)return;var K=this.fragCurrent;console.assert(K&&z.sn===K.sn&&z.level===K.level&&z.urlId===K.urlId,"Frag load error must match current frag to retry");var O=this.config;if(this.fragLoadError+1<=O.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(z.level))return;var B=Math.min(Math.pow(2,this.fragLoadError)*O.fragLoadingRetryDelay,O.fragLoadingMaxRetryTimeout);this.warn("Fragment "+z.sn+" of "+P+" "+z.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===s.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,z){if(!P)return;var K=C.BufferHelper.getBuffered(P);this.fragmentTracker.detectEvictedFragments(A,K,z),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,z,K){var O=this,B=z.details;console.assert(!!B,"level.details must be defined");var U=Object.keys(P.elementaryStreams).reduce(function(D,W){var Q=P.elementaryStreams[W];if(Q){var re=Q.endPTS-Q.startPTS;if(re<=0)return O.warn("Could not parse fragment "+P.sn+" "+W+" duration reliably ("+re+") resetting transmuxer to fallback to playlist timing"),O.resetTransmuxer(),D||!1;var ee=K?0:Object(o.updateFragPTSDTS)(B,P,Q.startPTS,Q.endPTS,Q.startDTS,Q.endDTS);return O.hls.trigger(e.Events.LEVEL_PTS_UPDATED,{details:B,level:z,drift:ee,type:W,frag:P,start:Q.startPTS,end:Q.endPTS}),!0}return D},!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}(y.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"),y=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"),f=S("./src/loader/fragment.ts"),r=S("./src/controller/buffer-operation-queue.ts"),c=Object(e.getMediaSource)(),i=/([ha]vc.)(?:\.[^.,]+)+/,n=function(){function o(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 s=u.hls,l=u.media,E=u.mediaSource;m.logger.log("[buffer-controller]: Media source opened"),l&&(u.updateMediaElementDuration(),s.trigger(y.Events.MEDIA_ATTACHED,{media:l})),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 h=o.prototype;return h.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},h.destroy=function(){this.unregisterListeners(),this.details=null},h.registerListeners=function(){var u=this.hls;u.on(y.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),u.on(y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.on(y.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.on(y.Events.BUFFER_RESET,this.onBufferReset,this),u.on(y.Events.BUFFER_APPENDING,this.onBufferAppending,this),u.on(y.Events.BUFFER_CODECS,this.onBufferCodecs,this),u.on(y.Events.BUFFER_EOS,this.onBufferEos,this),u.on(y.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),u.on(y.Events.LEVEL_UPDATED,this.onLevelUpdated,this),u.on(y.Events.FRAG_PARSED,this.onFragParsed,this),u.on(y.Events.FRAG_CHANGED,this.onFragChanged,this)},h.unregisterListeners=function(){var u=this.hls;u.off(y.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),u.off(y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.off(y.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.off(y.Events.BUFFER_RESET,this.onBufferReset,this),u.off(y.Events.BUFFER_APPENDING,this.onBufferAppending,this),u.off(y.Events.BUFFER_CODECS,this.onBufferCodecs,this),u.off(y.Events.BUFFER_EOS,this.onBufferEos,this),u.off(y.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),u.off(y.Events.LEVEL_UPDATED,this.onLevelUpdated,this),u.off(y.Events.FRAG_PARSED,this.onFragParsed,this),u.off(y.Events.FRAG_CHANGED,this.onFragChanged,this)},h._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new r.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},h.onManifestParsed=function(u,s){var l=2;(s.audio&&!s.video||!s.altAudio)&&(l=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=l,this.details=null,m.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},h.onMediaAttaching=function(u,s){var l=this.media=s.media;if(l&&c){var E=this.mediaSource=new c;E.addEventListener("sourceopen",this._onMediaSourceOpen),E.addEventListener("sourceended",this._onMediaSourceEnded),E.addEventListener("sourceclose",this._onMediaSourceClose),l.src=self.URL.createObjectURL(E),this._objectUrl=l.src}},h.onMediaDetaching=function(){var u=this.media,s=this.mediaSource,l=this._objectUrl;if(s){if(m.logger.log("[buffer-controller]: media source detaching"),s.readyState==="open")try{s.endOfStream()}catch(E){m.logger.warn("[buffer-controller]: onMediaDetaching: "+E.message+" while calling endOfStream")}this.onBufferReset(),s.removeEventListener("sourceopen",this._onMediaSourceOpen),s.removeEventListener("sourceended",this._onMediaSourceEnded),s.removeEventListener("sourceclose",this._onMediaSourceClose),u&&(l&&self.URL.revokeObjectURL(l),u.src===l?(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(y.Events.MEDIA_DETACHED,void 0)},h.onBufferReset=function(){var u=this;this.getSourceBufferTypes().forEach(function(s){var l=u.sourceBuffer[s];try{l&&(u.removeBufferListeners(s),u.mediaSource&&u.mediaSource.removeSourceBuffer(l),u.sourceBuffer[s]=void 0)}catch(E){m.logger.warn("[buffer-controller]: Failed to reset the "+s+" buffer",E)}}),this._initSourceBuffer()},h.onBufferCodecs=function(u,s){var l=this,E=this.getSourceBufferTypes().length;if(Object.keys(s).forEach(function(b){if(E){var p=l.tracks[b];if(p&&typeof p.buffer.changeType=="function"){var L=s[b],R=L.codec,v=L.levelCodec,x=L.container,w=(p.levelCodec||p.codec).replace(i,"$1"),T=(v||R).replace(i,"$1");if(w!==T){var F=x+";codecs="+(v||R);l.appendChangeType(b,F)}}}else l.pendingTracks[b]=s[b]}),E)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},h.appendChangeType=function(u,s){var l=this,E=this.operationQueue,b={execute:function(){var L=l.sourceBuffer[u];L&&(m.logger.log("[buffer-controller]: changing "+u+" sourceBuffer type to "+s),L.changeType(s)),E.shiftAndExecuteNext(u)},onStart:function(){},onComplete:function(){},onError:function(L){m.logger.warn("[buffer-controller]: Failed to change "+u+" SourceBuffer type",L)}};E.append(b,u)},h.onBufferAppending=function(u,s){var l=this,E=this.hls,b=this.operationQueue,p=this.tracks,L=s.data,R=s.type,v=s.frag,x=s.part,w=s.chunkMeta,T=w.buffering[R],F=self.performance.now();T.start=F;var P=v.stats.buffering,A=x?x.stats.buffering:null;P.start===0&&(P.start=F),A&&A.start===0&&(A.start=F);var z=p.audio,K=R==="audio"&&w.id===1&&(z==null?void 0:z.container)==="audio/mpeg",O={execute:function(){if(T.executeStart=self.performance.now(),K){var U=l.sourceBuffer[R];if(U){var D=v.start-U.timestampOffset;Math.abs(D)>=.1&&(m.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+v.start+" (delta: "+D+") sn: "+v.sn+")"),U.timestampOffset=v.start)}}l.appendExecutor(L,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 D=l.sourceBuffer,W={};for(var Q in D)W[Q]=_.BufferHelper.getBuffered(D[Q]);l.appendError=0,l.hls.trigger(y.Events.BUFFER_APPENDED,{type:R,frag:v,part:x,chunkMeta:w,parent:v.type,timeRanges:W})},onError:function(U){m.logger.error("[buffer-controller]: Error encountered while trying to append to the "+R+" SourceBuffer",U);var D={type:C.ErrorTypes.MEDIA_ERROR,parent:v.type,details:C.ErrorDetails.BUFFER_APPEND_ERROR,err:U,fatal:!1};U.code===DOMException.QUOTA_EXCEEDED_ERR?D.details=C.ErrorDetails.BUFFER_FULL_ERROR:(l.appendError++,D.details=C.ErrorDetails.BUFFER_APPEND_ERROR,l.appendError>E.config.appendErrorMaxRetry&&(m.logger.error("[buffer-controller]: Failed "+E.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),D.fatal=!0)),E.trigger(y.Events.ERROR,D)}};b.append(O,R)},h.onBufferFlushing=function(u,s){var l=this,E=this.operationQueue,b=function(L){return{execute:l.removeExecutor.bind(l,L,s.startOffset,s.endOffset),onStart:function(){},onComplete:function(){l.hls.trigger(y.Events.BUFFER_FLUSHED,{type:L})},onError:function(v){m.logger.warn("[buffer-controller]: Failed to remove from "+L+" SourceBuffer",v)}}};s.type?E.append(b(s.type),s.type):this.getSourceBufferTypes().forEach(function(p){E.append(b(p),p)})},h.onFragParsed=function(u,s){var l=this,E=s.frag,b=s.part,p=[],L=b?b.elementaryStreams:E.elementaryStreams;L[f.ElementaryStreamTypes.AUDIOVIDEO]?p.push("audiovideo"):(L[f.ElementaryStreamTypes.AUDIO]&&p.push("audio"),L[f.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;l.hls.trigger(y.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)},h.onFragChanged=function(u,s){this.flushBackBuffer()},h.onBufferEos=function(u,s){var l=this,E=this.getSourceBufferTypes().reduce(function(b,p){var L=l.sourceBuffer[p];return(!s.type||s.type===p)&&(L&&!L.ended&&(L.ended=!0,m.logger.log("[buffer-controller]: "+p+" sourceBuffer now EOS"))),b&&!!(!L||L.ended)},!0);E&&this.blockBuffers(function(){var b=l.mediaSource;if(!b||b.readyState!=="open")return;b.endOfStream()})},h.onLevelUpdated=function(u,s){var l=s.details;if(!l.fragments.length)return;this.details=l,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},h.flushBackBuffer=function(){var u=this.hls,s=this.details,l=this.media,E=this.sourceBuffer;if(!l||s===null)return;var b=this.getSourceBufferTypes();if(!b.length)return;var p=s.live&&u.config.liveBackBufferLength!==null?u.config.liveBackBufferLength:u.config.backBufferLength;if(!Object(k.isFiniteNumber)(p)||p<0)return;var L=l.currentTime,R=s.levelTargetDuration,v=Math.max(p,R),x=Math.floor(L/R)*R-v;b.forEach(function(w){var T=E[w];if(T){var F=_.BufferHelper.getBuffered(T);F.length>0&&x>F.start(0)&&(u.trigger(y.Events.BACK_BUFFER_REACHED,{bufferEnd:x}),s.live&&u.trigger(y.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:x}),u.trigger(y.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:x,type:w}))}})},h.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var u=this.details,s=this.hls,l=this.media,E=this.mediaSource,b=u.fragments[0].start+u.totalduration,p=l.duration,L=Object(k.isFiniteNumber)(E.duration)?E.duration:0;u.live&&s.config.liveDurationInfinity?(m.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),E.duration=Infinity,this.updateSeekableRange(u)):(b>L&&b>p||!Object(k.isFiniteNumber)(p))&&(m.logger.log("[buffer-controller]: Updating Media Source duration to "+b.toFixed(3)),E.duration=b)},h.updateSeekableRange=function(u){var s=this.mediaSource,l=u.fragments,E=l.length;if(E&&u.live&&s!==null&&s!==void 0&&s.setLiveSeekableRange){var b=Math.max(0,l[0].start),p=Math.max(b,b+u.totalduration);s.setLiveSeekableRange(b,p)}},h.checkPendingTracks=function(){var u=this.bufferCodecEventsExpected,s=this.operationQueue,l=this.pendingTracks,E=Object.keys(l).length;if(E&&!u||E===2){this.createSourceBuffers(l),this.pendingTracks={};var b=this.getSourceBufferTypes();if(b.length===0){this.hls.trigger(y.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){s.executeNext(p)})}},h.createSourceBuffers=function(u){var s=this.sourceBuffer,l=this.mediaSource;if(!l)throw Error("createSourceBuffers called when mediaSource was null");var E=0;for(var b in u)if(!s[b]){var p=u[b];if(!p)throw Error("source buffer exists for track "+b+", however track does not");var L=p.levelCodec||p.codec,R=p.container+";codecs="+L;m.logger.log("[buffer-controller]: creating sourceBuffer("+R+")");try{var v=s[b]=l.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:v,codec:L,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(y.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:w,mimeType:R})}}E&&this.hls.trigger(y.Events.BUFFER_CREATED,{tracks:this.tracks})},h._onSBUpdateStart=function(u){var s=this.operationQueue,l=s.current(u);l.onStart()},h._onSBUpdateEnd=function(u){var s=this.operationQueue,l=s.current(u);l.onComplete(),s.shiftAndExecuteNext(u)},h._onSBUpdateError=function(u,s){m.logger.error("[buffer-controller]: "+u+" SourceBuffer error",s),this.hls.trigger(y.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var l=this.operationQueue.current(u);l&&l.onError(s)},h.removeExecutor=function(u,s,l){var E=this.media,b=this.mediaSource,p=this.operationQueue,L=this.sourceBuffer,R=L[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 v=Object(k.isFiniteNumber)(E.duration)?E.duration:Infinity,x=Object(k.isFiniteNumber)(b.duration)?b.duration:Infinity,w=Math.max(0,s),T=Math.min(l,v,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)},h.appendExecutor=function(u,s){var l=this.operationQueue,E=this.sourceBuffer,b=E[s];if(!b){m.logger.warn("[buffer-controller]: Attempting to append to the "+s+" SourceBuffer, but it does not exist"),l.shiftAndExecuteNext(s);return}b.ended=!1,console.assert(!b.updating,s+" sourceBuffer must not be updating"),b.appendBuffer(u)},h.blockBuffers=function(u,s){var l=this;if(s===void 0&&(s=this.getSourceBufferTypes()),!s.length){m.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(u);return}var E=this.operationQueue,b=s.map(function(p){return E.appendBlocker(p)});Promise.all(b).then(function(){u(),s.forEach(function(p){var L=l.sourceBuffer[p];(!L||!L.updating)&&E.shiftAndExecuteNext(p)})})},h.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},h.addBufferListener=function(u,s,l){var E=this.sourceBuffer[u];if(!E)return;var b=l.bind(this,u);this.listeners[u].push({event:s,listener:b}),E.addEventListener(s,b)},h.removeBufferListeners=function(u){var s=this.sourceBuffer[u];if(!s)return;this.listeners[u].forEach(function(l){s.removeEventListener(l.event,l.listener)})},o}()},"./src/controller/buffer-operation-queue.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"default",function(){return y});var k=S("./src/utils/logger.ts"),y=function(){function m(_){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=_}var C=m.prototype;return C.append=function(e,f){var r=this.queues[f];r.push(e),r.length===1&&this.buffers[f]&&this.executeNext(f)},C.insertAbort=function(e,f){var r=this.queues[f];r.unshift(e),this.executeNext(f)},C.appendBlocker=function(e){var f,r=new Promise(function(i){f=i}),c={execute:f,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(c,e),r},C.executeNext=function(e){var f=this.buffers,r=this.queues,c=f[e],i=r[e];if(i.length){var n=i[0];try{n.execute()}catch(o){k.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),n.onError(o),(!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 y(_,e){for(var f=0;f<e.length;f++){var r=e[f];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(_,r.key,r)}}function m(_,e,f){return e&&y(_.prototype,e),f&&y(_,f),_}var C=function(){function _(f){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=f,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(o,h){return _.isLevelAllowed(h,c.restrictedLevels)&&h<=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(s,l){return l?s.width!==l.width||s.height!==l.height:!0},o=r.length-1,h=0;h<r.length;h+=1){var d=r[h];if((d.width>=c||d.height>=i)&&n(d,r[h+1])){o=h;break}}return o},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"),y=S("./src/types/cmcd.ts"),m=S("./src/utils/buffer-helper.ts"),C=S("./src/utils/logger.ts");function _(o,h){for(var d=0;d<h.length;d++){var u=h[d];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(o,u.key,u)}}function e(o,h,d){return h&&_(o.prototype,h),d&&_(o,d),o}function f(o,h){var d=typeof Symbol!="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(d)return(d=d.call(o)).next.bind(d);if(Array.isArray(o)||(d=r(o))||h&&o&&typeof o.length=="number"){d&&(o=d);var u=0;return function(){return u>=o.length?{done:!0}:{done:!1,value:o[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(o,h){if(!o)return;if(typeof o=="string")return c(o,h);var d=Object.prototype.toString.call(o).slice(8,-1);if(d==="Object"&&o.constructor&&(d=o.constructor.name),d==="Map"||d==="Set")return Array.from(o);if(d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d))return c(o,h)}function c(o,h){(h==null||h>o.length)&&(h=o.length);for(var d=0,u=new Array(h);d<h;d++)u[d]=o[d];return u}function i(){return i=Object.assign||function(o){for(var h=1;h<arguments.length;h++){var d=arguments[h];for(var u in d)Object.prototype.hasOwnProperty.call(d,u)&&(o[u]=d[u])}return o},i.apply(this,arguments)}var n=function(){function o(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:y.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],L=u.getObjectType(b),R={d:b.duration*1e3,ot:L};(L===y.CMCDObjectType.VIDEO||L===y.CMCDObjectType.AUDIO||L==y.CMCDObjectType.MUXED)&&(R.br=p.bitrate/1e3,R.tb=u.getTopBandwidth(L),R.bl=u.getBufferLength(L)),u.apply(E,R)}catch(v){C.logger.warn("Could not generate segment CMCD data.",v)}},this.hls=d;var s=this.config=d.config,l=s.cmcd;l!=null&&(s.pLoader=this.createPlaylistLoader(),s.fLoader=this.createFragmentLoader(),this.sid=l.sessionId||o.uuid(),this.cid=l.contentId,this.useHeaders=l.useHeaders===!0,this.registerListeners())}var h=o.prototype;return h.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)},h.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()},h.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},h.onMediaAttached=function(u,s){this.media=s.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},h.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},h.onBufferCreated=function(u,s){var l,E;this.audioBuffer=(l=s.tracks.audio)===null||l===void 0?void 0:l.buffer,this.videoBuffer=(E=s.tracks.video)===null||E===void 0?void 0:E.buffer},h.createData=function(){var u;return{v:y.CMCDVersion,sf:y.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}},h.apply=function(u,s){s===void 0&&(s={}),i(s,this.createData());var l=s.ot===y.CMCDObjectType.INIT||s.ot===y.CMCDObjectType.VIDEO||s.ot===y.CMCDObjectType.MUXED;if(this.starved&&l&&(s.bs=!0,s.su=!0,this.starved=!1),s.su==null&&(s.su=this.buffering),this.useHeaders){var E=o.toHeaders(s);if(!Object.keys(E).length)return;u.headers||(u.headers={}),i(u.headers,E)}else{var b=o.toQuery(s);if(!b)return;u.url=o.appendQueryToUri(u.url,b)}},h.getObjectType=function(u){var s=u.type;return s==="subtitle"?y.CMCDObjectType.TIMED_TEXT:u.sn==="initSegment"?y.CMCDObjectType.INIT:s==="audio"?y.CMCDObjectType.AUDIO:s==="main"?this.hls.audioTracks.length?y.CMCDObjectType.VIDEO:y.CMCDObjectType.MUXED:void 0},h.getTopBandwidth=function(u){for(var s=0,l=u===y.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,E=f(l),b;!(b=E()).done;){var p=b.value;p.bitrate>s&&(s=p.bitrate)}return s>0?s:NaN},h.getBufferLength=function(u){var s=this.hls.media,l=u===y.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!l||!s)return NaN;var E=m.BufferHelper.bufferInfo(l,s.currentTime,this.config.maxBufferHole);return E.len*1e3},h.createPlaylistLoader=function(){var u=this.config.pLoader,s=this.applyPlaylistData,l=u||this.config.loader;return function(){function E(p){this.loader=void 0,this.loader=new l(p)}var b=E.prototype;return b.destroy=function(){this.loader.destroy()},b.abort=function(){this.loader.abort()},b.load=function(L,R,v){s(L),this.loader.load(L,R,v)},e(E,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),E}()},h.createFragmentLoader=function(){var u=this.config.fLoader,s=this.applyFragmentData,l=u||this.config.loader;return function(){function E(p){this.loader=void 0,this.loader=new l(p)}var b=E.prototype;return b.destroy=function(){this.loader.destroy()},b.abort=function(){this.loader.abort()},b.load=function(L,R,v){s(L),this.loader.load(L,R,v)},e(E,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),E}()},o.uuid=function(){var u=URL.createObjectURL(new Blob),s=u.toString();return URL.revokeObjectURL(u),s.substr(s.lastIndexOf("/")+1)},o.serialize=function(u){for(var s=[],l=function(K){return!Number.isNaN(K)&&K!=null&&K!==""&&K!==!1},E=function(K){return Math.round(K)},b=function(K){return E(K/100)*100},p=function(K){return encodeURIComponent(K)},L={br:E,d:E,bl:b,dl:b,mtp:b,nor:p,rtp:b,tb:E},R=Object.keys(u||{}).sort(),v=f(R),x;!(x=v()).done;){var w=x.value,T=u[w];if(!l(T))continue;if(w==="v"&&T===1)continue;if(w=="pr"&&T===1)continue;var F=L[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),s.push(A)}return s.join(",")},o.toHeaders=function(u){for(var s=Object.keys(u),l={},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},L=0,R=s;L<R.length;L++){var v=R[L],x=p[v]!=null?p[v]:1;b[x][v]=u[v]}for(var w=0;w<b.length;w++){var T=o.serialize(b[w]);T&&(l["CMCD-"+E[w]]=T)}return l},o.toQuery=function(u){return"CMCD="+encodeURIComponent(o.serialize(u))},o.appendQueryToUri=function(u,s){if(!s)return u;var l=u.includes("?")?"&":"?";return""+u+l+s},o}()},"./src/controller/eme-controller.ts":function(N,g,S){"use strict";S.r(g);var k=S("./src/events.ts"),y=S("./src/errors.ts"),m=S("./src/utils/logger.ts"),C=S("./src/utils/mediakeys-helper.ts");function _(n,o){for(var h=0;h<o.length;h++){var d=o[h];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(n,d.key,d)}}function e(n,o,h){return o&&_(n.prototype,o),h&&_(n,h),n}var f=3,r=function(o,h,d){var u={audioCapabilities:[],videoCapabilities:[]};return o.forEach(function(s){u.audioCapabilities.push({contentType:'audio/mp4; codecs="'+s+'"',robustness:d.audioRobustness||""})}),h.forEach(function(s){u.videoCapabilities.push({contentType:'video/mp4; codecs="'+s+'"',robustness:d.videoRobustness||""})}),[u]},c=function(o,h,d,u){switch(o){case C.KeySystems.WIDEVINE:return r(h,d,u);default:throw new Error("Unknown key-system: "+o)}},i=function(){function n(h){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=h,this._config=h.config,this._widevineLicenseUrl=this._config.widevineLicenseUrl,this._licenseXhrSetup=this._config.licenseXhrSetup,this._licenseResponseCallback=this._config.licenseResponseCallback,this._emeEnabled=this._config.emeEnabled,this._requestMediaKeySystemAccess=this._config.requestMediaKeySystemAccessFunc,this._drmSystemOptions=this._config.drmSystemOptions,this._registerListeners()}var o=n.prototype;return o.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},o._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)},o._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)},o.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+'"')},o._attemptKeySystemAccess=function(d,u,s){var l=this,E=c(d,u,s,this._drmSystemOptions);m.logger.log("Requesting encrypted media key-system access");var b=this.requestMediaKeySystemAccess(d,E);this.mediaKeysPromise=b.then(function(p){return l._onMediaKeySystemAccessObtained(d,p)}),b.catch(function(p){m.logger.error('Failed to obtain key-system "'+d+'" access:',p)})},o._onMediaKeySystemAccessObtained=function(d,u){var s=this;m.logger.log('Access for key-system "'+d+'" obtained');var l={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:u,mediaKeySystemDomain:d};this._mediaKeysList.push(l);var E=Promise.resolve().then(function(){return u.createMediaKeys()}).then(function(b){return l.mediaKeys=b,m.logger.log('Media-keys created for key-system "'+d+'"'),s._onMediaKeysCreated(),b});return E.catch(function(b){m.logger.error("Failed to create media-keys:",b)}),E},o._onMediaKeysCreated=function(){var d=this;this._mediaKeysList.forEach(function(u){u.mediaKeysSession||(u.mediaKeysSession=u.mediaKeys.createSession(),d._onNewMediaKeySession(u.mediaKeysSession))})},o._onNewMediaKeySession=function(d){var u=this;m.logger.log("New key-system session "+d.sessionId),d.addEventListener("message",function(s){u._onKeySessionMessage(d,s.message)},!1)},o._onKeySessionMessage=function(d,u){m.logger.log("Got EME message event, creating license request"),this._requestLicense(u,function(s){m.logger.log("Received license data (length: "+(s&&s.byteLength)+"), updating key-session"),d.update(s)})},o.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:y.ErrorTypes.KEY_SYSTEM_ERROR,details:y.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var s=function(E){if(!u._media)return;u._attemptSetMediaKeys(E),u._generateRequestWithPreferredKeySession(d.initDataType,d.initData)};this.mediaKeysPromise.then(s).catch(s)},o._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:y.ErrorTypes.KEY_SYSTEM_ERROR,details:y.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}m.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(u.mediaKeys),this._hasSetMediaKeys=!0}},o._generateRequestWithPreferredKeySession=function(d,u){var s=this,l=this._mediaKeysList[0];if(!l){m.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(k.Events.ERROR,{type:y.ErrorTypes.KEY_SYSTEM_ERROR,details:y.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(l.mediaKeysSessionInitialized){m.logger.warn("Key-Session already initialized but requested again");return}var E=l.mediaKeysSession;if(!E){m.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(k.Events.ERROR,{type:y.ErrorTypes.KEY_SYSTEM_ERROR,details:y.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:y.ErrorTypes.KEY_SYSTEM_ERROR,details:y.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}m.logger.log('Generating key-session request for "'+d+'" init data type'),l.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),s.hls.trigger(k.Events.ERROR,{type:y.ErrorTypes.KEY_SYSTEM_ERROR,details:y.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},o._createLicenseXhr=function(d,u,s){var l=new XMLHttpRequest;l.responseType="arraybuffer",l.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,l,d,u,s);var E=this._licenseXhrSetup;if(E)try{E.call(this.hls,l,d),E=void 0}catch(b){m.logger.error(b)}try{l.readyState||l.open("POST",d,!0),E&&E.call(this.hls,l,d)}catch(b){throw new Error("issue setting up KeySystem license XHR "+b)}return l},o._onLicenseRequestReadyStageChange=function(d,u,s,l){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(L){m.logger.error(L)}l(E)}else{if(m.logger.error("License Request XHR failed ("+u+"). Status: "+d.status+" ("+d.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>f){this.hls.trigger(k.Events.ERROR,{type:y.ErrorTypes.KEY_SYSTEM_ERROR,details:y.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var p=f-this._requestLicenseFailureCount+1;m.logger.warn("Retrying license request, "+p+" attempts left"),this._requestLicense(s,l)}break}},o._generateLicenseRequestChallenge=function(d,u){switch(d.mediaKeySystemDomain){case C.KeySystems.WIDEVINE:return u}throw new Error("unsupported key-system: "+d.mediaKeySystemDomain)},o._requestLicense=function(d,u){m.logger.log("Requesting content license for key-system");var s=this._mediaKeysList[0];if(!s){m.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(k.Events.ERROR,{type:y.ErrorTypes.KEY_SYSTEM_ERROR,details:y.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var l=this.getLicenseServerUrl(s.mediaKeySystemDomain),E=this._createLicenseXhr(l,d,u);m.logger.log("Sending license request to URL: "+l);var b=this._generateLicenseRequestChallenge(s,d);E.send(b)}catch(p){m.logger.error("Failure requesting DRM license: "+p),this.hls.trigger(k.Events.ERROR,{type:y.ErrorTypes.KEY_SYSTEM_ERROR,details:y.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},o.onMediaAttached=function(d,u){if(!this._emeEnabled)return;var s=u.media;this._media=s,s.addEventListener("encrypted",this._onMediaEncrypted)},o.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(s){if(s.mediaKeysSession)return s.mediaKeysSession.close().catch(function(){})})).then(function(){return d.setMediaKeys(null)}).catch(function(){})},o.onManifestParsed=function(d,u){if(!this._emeEnabled)return;var s=u.levels.map(function(E){return E.audioCodec}).filter(function(E){return!!E}),l=u.levels.map(function(E){return E.videoCodec}).filter(function(E){return!!E});this._attemptKeySystemAccess(C.KeySystems.WIDEVINE,s,l)},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"),y=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(f){this.streamController=f},_.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(f,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(f,r,c){var i=performance.now();if(r){if(this.lastTime){var n=i-this.lastTime,o=c-this.lastDroppedFrames,h=r-this.lastDecodedFrames,d=1e3*o/n,u=this.hls;if(u.trigger(k.Events.FPS_DROP,{currentDropped:o,currentDecoded:h,totalDroppedFrames:c}),d>0&&o>u.config.fpsDroppedMonitoringThreshold*h){var s=u.currentLevel;y.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+s),s>0&&(u.autoLevelCapping===-1||u.autoLevelCapping>=s)&&(s=s-1,u.trigger(k.Events.FPS_DROP_LEVEL_CAPPING,{level:s,droppedLevel:u.currentLevel}),u.autoLevelCapping=s,this.streamController.nextLevelSwitch())}}this.lastTime=i,this.lastDroppedFrames=c,this.lastDecodedFrames=r}},_.checkFPSInterval=function(){var f=this.media;if(f)if(this.isVideoPlaybackQualityAvailable){var r=f.getVideoPlaybackQuality();this.checkFPS(f,r.totalVideoFrames,r.droppedVideoFrames)}else this.checkFPS(f,f.webkitDecodedFrameCount,f.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 f});var k=S("./src/polyfills/number.ts"),y=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 o=r[r.length-1].endProgramDateTime;if(c>=(o||0))return null;i=i||0;for(var h=0;h<r.length;++h){var d=r[h];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 o=null;if(r?o=c[r.sn-c[0].sn+1]||null:i===0&&c[0].start===0&&(o=c[0]),o&&_(i,n,o)===0)return o;var h=y.default.search(c,_.bind(null,i,n));return h||o}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,o=i.endProgramDateTime||0;return o-n>r}function f(r,c){return y.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"),y=S("./src/types/loader.ts"),m;(function(f){f.NOT_LOADED="NOT_LOADED",f.BACKTRACKED="BACKTRACKED",f.APPENDING="APPENDING",f.PARTIAL="PARTIAL",f.OK="OK"})(m||(m={}));var C=function(){function f(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=f.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===y.PlaylistLevelType.MAIN){var o=this.activeFragment,h=this.activeParts;if(!o)return null;if(h)for(var d=h.length;d--;){var u=h[d],s=u?u.end:o.appendedPTS;if(u.start<=i&&s!==void 0&&i<=s)return d>9&&(this.activeParts=h.slice(d-9)),u}else if(o.start<=i&&o.appendedPTS!==void 0&&i<=o.appendedPTS)return o}return this.getBufferedFrag(i,n)},r.getBufferedFrag=function(i,n){for(var o=this.fragments,h=Object.keys(o),d=h.length;d--;){var u=o[h[d]];if((u==null?void 0:u.body.type)===n&&u.buffered){var s=u.body;if(s.start<=i&&i<=s.end)return s}}return null},r.detectEvictedFragments=function(i,n,o){var h=this;Object.keys(this.fragments).forEach(function(d){var u=h.fragments[d];if(!u)return;if(!u.buffered){u.body.type===o&&h.removeFragment(u.body);return}var s=u.range[i];if(!s)return;s.time.some(function(l){var E=!h.isTimeBuffered(l.startPTS,l.endPTS,n);return E&&h.removeFragment(u.body),E})})},r.detectPartialFragments=function(i){var n=this,o=this.timeRanges,h=i.frag,d=i.part;if(!o||h.sn==="initSegment")return;var u=e(h),s=this.fragments[u];if(!s)return;Object.keys(o).forEach(function(l){var E=h.elementaryStreams[l];if(!E)return;var b=o[l],p=d!==null||E.partial===!0;s.range[l]=n.getBufferedTimes(h,d,p,b)}),s.backtrack=s.loaded=null,Object.keys(s.range).length?s.buffered=!0:this.removeFragment(s.body)},r.fragBuffered=function(i){var n=e(i),o=this.fragments[n];o&&(o.backtrack=o.loaded=null,o.buffered=!0)},r.getBufferedTimes=function(i,n,o,h){for(var d={time:[],partial:o},u=n?n.start:i.start,s=n?n.end:i.end,l=i.minEndPTS||s,E=i.maxStartPTS||u,b=0;b<h.length;b++){var p=h.start(b)-this.bufferPadding,L=h.end(b)+this.bufferPadding;if(E>=p&&l<=L){d.time.push({startPTS:Math.max(u,h.start(b)),endPTS:Math.min(s,h.end(b))});break}else if(u<L&&s>p)d.partial=!0,d.time.push({startPTS:Math.max(u,h.start(b)),endPTS:Math.min(s,h.end(b))});else if(s<=p)break}return d},r.getPartialFragment=function(i){var n=null,o,h,d,u=0,s=this.bufferPadding,l=this.fragments;return Object.keys(l).forEach(function(E){var b=l[E];if(!b)return;_(b)&&(h=b.body.start-s,d=b.body.end+s,i>=h&&i<=d&&(o=Math.min(i-h,d-i),u<=o&&(n=b.body,u=o)))}),n},r.getState=function(i){var n=e(i),o=this.fragments[n];return o?o.buffered?_(o)?m.PARTIAL:m.OK:o.backtrack?m.BACKTRACKED:m.APPENDING:m.NOT_LOADED},r.backtrack=function(i,n){var o=e(i),h=this.fragments[o];if(!h||h.backtrack)return null;var d=h.backtrack=n||h.loaded;return h.loaded=null,d},r.getBacktrackData=function(i){var n=e(i),o=this.fragments[n];if(o){var h,d=o.backtrack;if(d!=null&&(h=d.payload)!==null&&h!==void 0&&h.byteLength)return d;this.removeFragment(i)}return null},r.isTimeBuffered=function(i,n,o){for(var h,d,u=0;u<o.length;u++){if(h=o.start(u)-this.bufferPadding,d=o.end(u)+this.bufferPadding,i>=h&&n<=d)return!0;if(n<=h)return!1}return!1},r.onFragLoaded=function(i,n){var o=n.frag,h=n.part;if(o.sn==="initSegment"||o.bitrateTest||h)return;var d=e(o);this.fragments[d]={body:o,loaded:n,backtrack:null,buffered:!1,range:Object.create(null)}},r.onBufferAppended=function(i,n){var o=this,h=n.frag,d=n.part,u=n.timeRanges;if(h.type===y.PlaylistLevelType.MAIN)if(this.activeFragment=h,d){var s=this.activeParts;s||(this.activeParts=s=[]),s.push(d)}else this.activeParts=null;this.timeRanges=u,Object.keys(u).forEach(function(l){var E=u[l];if(o.detectEvictedFragments(l,E),!d)for(var b=0;b<E.length;b++)h.appendedPTS=Math.max(E.end(b),h.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,o){var h=this;Object.keys(this.fragments).forEach(function(d){var u=h.fragments[d];if(!u)return;if(u.buffered){var s=u.body;s.type===o&&s.start<n&&s.end>i&&h.removeFragment(s)}})},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},f}();function _(f){var r,c;return f.buffered&&(((r=f.range.video)===null||r===void 0?void 0:r.partial)||((c=f.range.audio)===null||c===void 0?void 0:c.partial))}function e(f){return f.type+"_"+f.level+"_"+f.urlId+"_"+f.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 f}),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"),y=S("./src/errors.ts"),m=S("./src/events.ts"),C=S("./src/utils/logger.ts"),_=250,e=2,f=.1,r=.05,c=function(){function i(o,h,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=o,this.media=h,this.fragmentTracker=d,this.hls=u}var n=i.prototype;return n.destroy=function(){this.hls=this.fragmentTracker=this.media=null},n.poll=function(h){var d=this.config,u=this.media,s=this.stalled,l=u.currentTime,E=u.seeking,b=this.seeking&&!E,p=!this.seeking&&E;if(this.seeking=E,l!==h){if(this.moved=!0,s!==null){if(this.stallReported){var L=self.performance.now()-s;C.logger.warn("playback not stuck anymore @"+l+", after "+Math.round(L)+"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,l,0),v=R.len>0,x=R.nextStart||0;if(!v&&!x)return;if(E){var w=R.len>e,T=!x||x-l>e&&!this.fragmentTracker.getPartialFragment(l);if(w||T)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var F,P=Math.max(x,R.start||0)-l,A=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,z=A==null||((F=A.details)===null||F===void 0)?void 0:F.live,K=z?A.details.targetduration*2:e;if(P>0&&P<=K){this._trySkipBufferHole(null);return}}var O=self.performance.now();if(s===null){this.stalled=O;return}var B=O-s;!E&&B>=_&&this._reportStall(R.len);var U=k.BufferHelper.bufferInfo(u,l,d.maxBufferHole);this._tryFixBufferStall(U,B)},n._tryFixBufferStall=function(h,d){var u=this.config,s=this.fragmentTracker,l=this.media,E=l.currentTime,b=s.getPartialFragment(E);if(b){var p=this._trySkipBufferHole(b);if(p)return}h.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(h){var d=this.hls,u=this.media,s=this.stallReported;s||(this.stallReported=!0,C.logger.warn("Playback stalling at @"+u.currentTime+" due to low buffer (buffer="+h+")"),d.trigger(m.Events.ERROR,{type:y.ErrorTypes.MEDIA_ERROR,details:y.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:h}))},n._trySkipBufferHole=function(h){for(var d=this.config,u=this.hls,s=this.media,l=s.currentTime,E=0,b=k.BufferHelper.getBuffered(s),p=0;p<b.length;p++){var L=b.start(p);if(l+d.maxBufferHole>=E&&l<L){var R=Math.max(L+r,s.currentTime+f);return C.logger.warn("skipping hole, adjusting currentTime from "+l+" to "+R),this.moved=!0,this.stalled=null,s.currentTime=R,h&&u.trigger(m.Events.ERROR,{type:y.ErrorTypes.MEDIA_ERROR,details:y.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+l+" to "+R,frag:h}),R}E=b.end(p)}return 0},n._tryNudgeBuffer=function(){var h=this.config,d=this.hls,u=this.media,s=u.currentTime,l=(this.nudgeRetry||0)+1;if(this.nudgeRetry=l,l<h.nudgeMaxRetry){var E=s+l*h.nudgeOffset;C.logger.warn("Nudging 'currentTime' from "+s+" to "+E),u.currentTime=E,d.trigger(m.Events.ERROR,{type:y.ErrorTypes.MEDIA_ERROR,details:y.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else C.logger.error("Playhead still not moving while enough data buffered @"+s+" after "+h.nudgeMaxRetry+" nudges"),d.trigger(m.Events.ERROR,{type:y.ErrorTypes.MEDIA_ERROR,details:y.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"),y=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 f=e.prototype;return f.destroy=function(){this._unregisterListeners()},f._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)},f._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)},f.onMediaAttached=function(c,i){this.media=i.media},f.onMediaDetaching=function(){if(!this.id3Track)return;Object(y.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},f.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(y.sendAddTrackEvent)(n,this.media),n}return this.media.addTextTrack("metadata","id3")},f.onFragParsingMetadata=function(c,i){if(!this.media)return;var n=i.frag,o=i.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var h=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,d=0;d<o.length;d++){var u=m.getID3Frames(o[d].data);if(u){var s=o[d].pts,l=d<o.length-1?o[d+1].pts:n.end,E=l-s;E<=0&&(l=s+C);for(var b=0;b<u.length;b++){var p=u[b];if(!m.isTimeStampFrame(p)){var L=new h(s,l,"");L.value=p,this.id3Track.addCue(L)}}}}},f.onBufferFlushing=function(c,i){var n=i.startOffset,o=i.endOffset,h=i.type;if(!h||h==="audio"){var d=this.id3Track;d&&Object(y.removeCuesInRange)(d,n,o)}},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"),y=S("./src/events.ts"),m=S("./src/utils/logger.ts");function C(f,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(f,i.key,i)}}function _(f,r,c){return r&&C(f.prototype,r),c&&C(f,c),f}var e=function(){function f(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=f.prototype;return r.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},r.registerListeners=function(){this.hls.on(y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(y.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(y.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(y.Events.ERROR,this.onError,this)},r.unregisterListeners=function(){this.hls.off(y.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(y.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(y.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(y.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(y.Events.ERROR,this.onError)},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 o=n.details;this.levelDetails=o,o.advanced&&this.timeupdate(),!o.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 o=this.computeLatency();if(o===null)return;this._latency=o;var h=this.config,d=h.lowLatencyMode,u=h.maxLiveSyncPlaybackRate;if(!d||u===1)return;var s=this.targetLatency;if(s===null)return;var l=o-s,E=Math.min(this.maxLatency,s+n.targetduration),b=l<E;if(n.live&&b&&l>.05&&this.forwardBufferLength>1){var p=Math.min(2,Math.max(1,u)),L=Math.round(2/(1+Math.exp(-.75*l-this.edgeStalled))*20)/20;i.playbackRate=Math.min(p,Math.max(1,L))}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},_(f,[{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,o=i.partHoldBack,h=i.targetduration,d=this.config,u=d.liveSyncDuration,s=d.liveSyncDurationCount,l=d.lowLatencyMode,E=this.hls.userConfig,b=l&&o||n;(E.liveSyncDuration||E.liveSyncDurationCount||b===0)&&(b=u!==void 0?u:s*h);var p=h,L=1;return b+Math.min(this.stallCount*L,p)}},{key:"liveSyncPosition",get:function(){var i=this.estimateLiveEdge(),n=this.targetLatency,o=this.levelDetails;if(i===null||n===null||o===null)return null;var h=o.edge,d=i-n-this.edgeStalled,u=h-o.totalduration,s=h-(this.config.lowLatencyMode&&o.partTarget||o.targetduration);return Math.min(Math.max(u,d),s)}},{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 o=i.buffered.length;return o?i.buffered.end(o-1):n.edge-this.currentTime}}]),f}()},"./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"),y=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"),f=S("./src/types/loader.ts");function r(){return r=Object.assign||function(u){for(var s=1;s<arguments.length;s++){var l=arguments[s];for(var E in l)Object.prototype.hasOwnProperty.call(l,E)&&(u[E]=l[E])}return u},r.apply(this,arguments)}function c(u,s){for(var l=0;l<s.length;l++){var E=s[l];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(u,E.key,E)}}function i(u,s,l){return s&&c(u.prototype,s),l&&c(u,l),u}function n(u,s){u.prototype=Object.create(s.prototype),u.prototype.constructor=u,o(u,s)}function o(u,s){return o=Object.setPrototypeOf||function(E,b){return E.__proto__=b,E},o(u,s)}var h=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),d=function(u){n(s,u);function s(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 l=s.prototype;return l._registerListeners=function(){var b=this.hls;b.on(y.Events.MANIFEST_LOADED,this.onManifestLoaded,this),b.on(y.Events.LEVEL_LOADED,this.onLevelLoaded,this),b.on(y.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),b.on(y.Events.FRAG_LOADED,this.onFragLoaded,this),b.on(y.Events.ERROR,this.onError,this)},l._unregisterListeners=function(){var b=this.hls;b.off(y.Events.MANIFEST_LOADED,this.onManifestLoaded,this),b.off(y.Events.LEVEL_LOADED,this.onLevelLoaded,this),b.off(y.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),b.off(y.Events.FRAG_LOADED,this.onFragLoaded,this),b.off(y.Events.ERROR,this.onError,this)},l.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,u.prototype.destroy.call(this)},l.startLoad=function(){var b=this._levels;b.forEach(function(p){p.loadError=0}),u.prototype.startLoad.call(this)},l.onManifestLoaded=function(b,p){var L=[],R=[],v=[],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,h&&B.audioCodec&&B.audioCodec.indexOf("mp4a.40.34")!==-1&&(B.audioCodec=void 0);var D=B.bitrate+"-"+B.attrs.RESOLUTION+"-"+B.attrs.CODECS;T=w[D],T?T.url.push(B.url):(T=new k.Level(B),w[D]=T,L.push(T)),U&&(U.AUDIO&&Object(_.addGroupId)(T,"audio",U.AUDIO),U.SUBTITLES&&Object(_.addGroupId)(T,"text",U.SUBTITLES))}),(F||P)&&A&&(L=L.filter(function(B){var U=B.videoCodec,D=B.width,W=B.height;return!!U||!!(D&&W)})),L=L.filter(function(B){var U=B.audioCodec,D=B.videoCodec;return(!U||Object(C.isCodecSupportedInMp4)(U,"audio"))&&(!D||Object(C.isCodecSupportedInMp4)(D,"video"))}),p.audioTracks&&(R=p.audioTracks.filter(function(B){return!B.audioCodec||Object(C.isCodecSupportedInMp4)(B.audioCodec,"audio")}),Object(_.assignTrackIdsByGroup)(R)),p.subtitles&&(v=p.subtitles,Object(_.assignTrackIdsByGroup)(v)),L.length>0){x=L[0].bitrate,L.sort(function(B,U){return B.bitrate-U.bitrate}),this._levels=L;for(var z=0;z<L.length;z++)if(L[z].bitrate===x){this._firstLevel=z,this.log("manifest loaded, "+L.length+" level(s) found, first bitrate: "+x);break}var K=A&&!P,O={levels:L,audioTracks:R,subtitleTracks:v,firstLevel:this._firstLevel,stats:p.stats,audio:A,video:P,altAudio:!K&&R.some(function(B){return!!B.url})};this.hls.trigger(y.Events.MANIFEST_PARSED,O),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(y.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:p.url,reason:"no level with compatible codecs found in manifest"})},l.onError=function(b,p){if(u.prototype.onError.call(this,b,p),p.fatal)return;var L=p.context,R=this._levels[this.currentLevelIndex];if(L&&(L.type===f.PlaylistContextType.AUDIO_TRACK&&R.audioGroupIds&&L.groupId===R.audioGroupIds[R.urlId]||L.type===f.PlaylistContextType.SUBTITLE_TRACK&&R.textGroupIds&&L.groupId===R.textGroupIds[R.urlId])){this.redundantFailover(this.currentLevelIndex);return}var v=!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:L&&(L.deliveryDirectives&&(x=!1),w=L.level),v=!0;break;case m.ErrorDetails.REMUX_ALLOC_ERROR:w=p.level,v=!0;break}w!==void 0&&this.recoverLevel(p,w,v,x)},l.recoverLevel=function(b,p,L,R){var v=b.details,x=this._levels[p];if(x.loadError++,L){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(v+": switch to "+F),b.levelRetry=!0,this.hls.nextAutoLevel=F)}}},l.redundantFailover=function(b){var p=this._levels[b],L=p.url.length;if(L>1){var R=(p.urlId+1)%L;this.warn("Switching to redundant URL-id "+R),this._levels.forEach(function(v){v.urlId=R}),this.level=b}},l.onFragLoaded=function(b,p){var L=p.frag;if(L!==void 0&&L.type===f.PlaylistLevelType.MAIN){var R=this._levels[L.level];R!==void 0&&(R.fragmentError=0,R.loadError=0)}},l.onLevelLoaded=function(b,p){var L,R=p.level,v=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&&(v.deltaUpdateFailed=!0);return}R===this.currentLevelIndex?(x.fragmentError===0&&(x.loadError=0,this.retryCount=0),this.playlistLoaded(R,p,x.details)):(L=p.deliveryDirectives)!==null&&L!==void 0&&L.skip&&(v.deltaUpdateFailed=!0)},l.onAudioTrackSwitched=function(b,p){var L=this.hls.levels[this.currentLevelIndex];if(!L)return;if(L.audioGroupIds){for(var R=-1,v=this.hls.audioTracks[p.id].groupId,x=0;x<L.audioGroupIds.length;x++)if(L.audioGroupIds[x]===v){R=x;break}R!==L.urlId&&(L.urlId=R,this.startLoad())}},l.loadPlaylist=function(b){var p=this.currentLevelIndex,L=this._levels[p];if(this.canLoad&&L&&L.url.length>0){var R=L.urlId,v=L.url[R];if(b)try{v=b.addDirectives(v)}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+" "+v),this.clearTimer(),this.hls.trigger(y.Events.LEVEL_LOADING,{url:v,level:p,id:R,deliveryDirectives:b||null})}},l.removeLevel=function(b,p){var L=function(x,w){return w!==p},R=this._levels.filter(function(v,x){return x!==b?!0:v.url.length>1&&p!==void 0?(v.url=v.url.filter(L),v.audioGroupIds&&(v.audioGroupIds=v.audioGroupIds.filter(L)),v.textGroupIds&&(v.textGroupIds=v.textGroupIds.filter(L)),v.urlId=0,!0):!1}).map(function(v,x){var w=v.details;return w!=null&&w.fragments&&w.fragments.forEach(function(T){T.level=x}),v});this._levels=R,this.hls.trigger(y.Events.LEVELS_UPDATED,{levels:R})},i(s,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(b){var p,L=this._levels;if(L.length===0)return;if(this.currentLevelIndex===b&&(p=L[b])!==null&&p!==void 0&&p.details)return;if(b<0||b>=L.length){var R=b<0;if(this.hls.trigger(y.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,L.length-1)}this.clearTimer();var v=this.currentLevelIndex,x=L[v],w=L[b];this.log("switching to level "+b+" from "+v),this.currentLevelIndex=b;var T=r({},w,{level:b,maxBitrate:w.maxBitrate,uri:w.uri,urlId:w.urlId});delete T._urlId,this.hls.trigger(y.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)}}]),s}(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 f}),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 o}),S.d(g,"computeReloadInterval",function(){return h}),S.d(g,"getFragmentWithSN",function(){return d}),S.d(g,"getPartWith",function(){return u});var k=S("./src/polyfills/number.ts"),y=S("./src/utils/logger.ts");function m(s,l,E){switch(l){case"audio":s.audioGroupIds||(s.audioGroupIds=[]),s.audioGroupIds.push(E);break;case"text":s.textGroupIds||(s.textGroupIds=[]),s.textGroupIds.push(E);break}}function C(s){var l={};s.forEach(function(E){var b=E.groupId||"";E.id=l[b]=l[b]||0,l[b]++})}function _(s,l,E){var b=s[l],p=s[E];e(b,p)}function e(s,l){var E=l.startPTS;if(Object(k.isFiniteNumber)(E)){var b=0,p;l.sn>s.sn?(b=E-s.start,p=s):(b=s.start-E,p=l),p.duration!==b&&(p.duration=b)}else if(l.sn>s.sn){var L=s.cc===l.cc;L&&s.minEndPTS?l.start=s.start+(s.minEndPTS-s.start):l.start=s.start+s.duration}else l.start=Math.max(s.start-l.duration,0)}function f(s,l,E,b,p,L){var R=b-E;R<=0&&(y.logger.warn("Fragment should have a positive duration",l),b=E+l.duration,L=p+l.duration);var v=E,x=b,w=l.startPTS,T=l.endPTS;if(Object(k.isFiniteNumber)(w)){var F=Math.abs(w-E);Object(k.isFiniteNumber)(l.deltaPTS)?l.deltaPTS=Math.max(F,l.deltaPTS):l.deltaPTS=F,v=Math.max(E,w),E=Math.min(E,w),p=Math.min(p,l.startDTS),x=Math.min(b,T),b=Math.max(b,T),L=Math.max(L,l.endDTS)}l.duration=b-E;var P=E-l.start;l.appendedPTS=b,l.start=l.startPTS=E,l.maxStartPTS=v,l.startDTS=p,l.endPTS=b,l.minEndPTS=x,l.endDTS=L;var A=l.sn;if(!s||A<s.startSN||A>s.endSN)return 0;var z,K=A-s.startSN,O=s.fragments;for(O[K]=l,z=K;z>0;z--)e(O[z],O[z-1]);for(z=K;z<O.length-1;z++)e(O[z],O[z+1]);return s.fragmentHint&&e(O[O.length-1],s.fragmentHint),s.PTSKnown=s.alignedSliding=!0,P}function r(s,l){for(var E=null,b=s.fragments,p=b.length-1;p>=0;p--){var L=b[p].initSegment;if(L){E=L;break}}s.fragmentHint&&delete s.fragmentHint.endPTS;var R=0,v;if(i(s,l,function(z,K){z.relurl&&(R=z.cc-K.cc),Object(k.isFiniteNumber)(z.startPTS)&&Object(k.isFiniteNumber)(z.endPTS)&&(K.start=K.startPTS=z.startPTS,K.startDTS=z.startDTS,K.appendedPTS=z.appendedPTS,K.maxStartPTS=z.maxStartPTS,K.endPTS=z.endPTS,K.endDTS=z.endDTS,K.minEndPTS=z.minEndPTS,K.duration=z.endPTS-z.startPTS,K.duration&&(v=K),l.PTSKnown=l.alignedSliding=!0),K.elementaryStreams=z.elementaryStreams,K.loader=z.loader,K.stats=z.stats,K.urlId=z.urlId,z.initSegment&&(K.initSegment=z.initSegment,E=z.initSegment)}),E){var x=l.fragmentHint?l.fragments.concat(l.fragmentHint):l.fragments;x.forEach(function(z){var K;(!z.initSegment||z.initSegment.relurl===((K=E)===null||K===void 0?void 0:K.relurl))&&(z.initSegment=E)})}if(l.skippedSegments&&(l.deltaUpdateFailed=l.fragments.some(function(z){return!z}),l.deltaUpdateFailed)){y.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var w=l.skippedSegments;w--;)l.fragments.shift();l.startSN=l.fragments[0].sn,l.startCC=l.fragments[0].cc}var T=l.fragments;if(R){y.logger.warn("discontinuity sliding from playlist, take drift into account");for(var F=0;F<T.length;F++)T[F].cc+=R}l.skippedSegments&&(l.startCC=l.fragments[0].cc),c(s.partList,l.partList,function(z,K){K.elementaryStreams=z.elementaryStreams,K.stats=z.stats}),v?f(l,v,v.startPTS,v.endPTS,v.startDTS,v.endDTS):n(s,l),T.length&&(l.totalduration=l.edge-T[0].start),l.driftStartTime=s.driftStartTime,l.driftStart=s.driftStart;var P=l.advancedDateTime;if(l.advanced&&P){var A=l.edge;l.driftStart||(l.driftStartTime=P,l.driftStart=A),l.driftEndTime=P,l.driftEnd=A}else l.driftEndTime=s.driftEndTime,l.driftEnd=s.driftEnd,l.advancedDateTime=s.advancedDateTime}function c(s,l,E){if(s&&l)for(var b=0,p=0,L=s.length;p<=L;p++){var R=s[p],v=l[p+b];R&&v&&R.index===v.index&&R.fragment.sn===v.fragment.sn?E(R,v):b--}}function i(s,l,E){for(var b=l.skippedSegments,p=Math.max(s.startSN,l.startSN)-l.startSN,L=(s.fragmentHint?1:0)+(b?l.endSN:Math.min(s.endSN,l.endSN))-l.startSN,R=l.startSN-s.startSN,v=l.fragmentHint?l.fragments.concat(l.fragmentHint):l.fragments,x=s.fragmentHint?s.fragments.concat(s.fragmentHint):s.fragments,w=p;w<=L;w++){var T=x[R+w],F=v[w];b&&!F&&w<b&&(F=l.fragments[w]=T),T&&F&&E(T,F)}}function n(s,l){var E=l.startSN+l.skippedSegments-s.startSN,b=s.fragments;if(E<0||E>=b.length)return;o(l,b[E].start)}function o(s,l){if(l){for(var E=s.fragments,b=s.skippedSegments;b<E.length;b++)E[b].start+=l;s.fragmentHint&&(s.fragmentHint.start+=l)}}function h(s,l){var E=1e3*s.levelTargetDuration,b=E/2,p=s.age,L=p>0&&p<E*3,R=l.loading.end-l.loading.start,v,x=s.availabilityDelay;if(s.updated===!1)if(L){var w=333*s.misses;v=Math.max(Math.min(b,R*2),w),s.availabilityDelay=(s.availabilityDelay||0)+v}else v=b;else L?(x=Math.min(x||E/2,p),s.availabilityDelay=x,v=x+E-p):v=E-R;return Math.round(v)}function d(s,l,E){if(!s||!s.details)return null;var b=s.details,p=b.fragments[l-b.startSN];return p||(p=b.fragmentHint,p&&p.sn===l?p:l<b.startSN&&E&&E.sn===l?E:null)}function u(s,l,E){if(!s||!s.details)return null;var b=s.details.partList;if(b)for(var p=b.length;p--;){var L=b[p];if(L.index===E&&L.fragment.sn===l)return L}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"),y=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"),f=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"),o=S("./src/errors.ts"),h=S("./src/utils/logger.ts");function d(p,L){for(var R=0;R<L.length;R++){var v=L[R];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(p,v.key,v)}}function u(p,L,R){return L&&d(p.prototype,L),R&&d(p,R),p}function s(p,L){p.prototype=Object.create(L.prototype),p.prototype.constructor=p,l(p,L)}function l(p,L){return l=Object.setPrototypeOf||function(v,x){return v.__proto__=x,v},l(p,L)}var E=100,b=function(p){s(L,p);function L(v,x){var w;return w=p.call(this,v,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=L.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=y.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=x,this.tick()}else this._forceStartLoad=!0,this.state=y.State.STOPPED},R.stopLoad=function(){this._forceStartLoad=!1,p.prototype.stopLoad.call(this)},R.doTick=function(){switch(this.state){case y.State.IDLE:this.doTickIdle();break;case y.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=y.State.IDLE;break}break}case y.State.FRAG_LOADING_WAITING_RETRY:{var P,A=self.performance.now(),z=this.retryDate;(!z||A>=z||(P=this.media)!==null&&P!==void 0&&P.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=y.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,z=T.config,K=T.nextLoadLevel;if(F===null||!A&&(this.startFragRequested||!z.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!P||!P[K])return;var O=P[K];this.level=T.nextLoadLevel=K;var B=O.details;if(!B||this.state===y.State.WAITING_LEVEL||B.live&&this.levelLastLoaded!==K){this.state=y.State.WAITING_LEVEL;return}var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:A,f.PlaylistLevelType.MAIN);if(U===null)return;var D=U.len,W=this.getMaxBufferLength(O.maxBitrate);if(D>=W)return;if(this._streamEnded(U,B)){var Q={};this.altAudio&&(Q.type="video"),this.hls.trigger(C.Events.BUFFER_EOS,Q),this.state=y.State.ENDED;return}var re=U.end,ee=this.getNextFragment(re,B);if(this.couldBacktrack&&!this.fragPrevious&&ee&&ee.sn!=="initSegment"){var ye=ee.sn-B.startSN;ye>1&&(ee=B.fragments[ye-1],this.fragmentTracker.removeFragment(ee))}if(ee&&this.fragmentTracker.getState(ee)===e.FragmentState.OK&&this.nextLoadPosition>re){var be=this.audioOnly&&!this.altAudio?r.ElementaryStreamTypes.AUDIO:r.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(A,be,f.PlaylistLevelType.MAIN),ee=this.getNextFragment(this.nextLoadPosition,B)}if(!ee)return;ee.initSegment&&!ee.initSegment.data&&!this.bitrateTest&&(ee=ee.initSegment),((x=ee.decryptdata)===null||x===void 0?void 0:x.keyFormat)==="identity"&&!((w=ee.decryptdata)!==null&&w!==void 0&&w.key)?this.loadKey(ee,B):this.loadFragment(ee,B,re)},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,f.PlaylistLevelType.MAIN);return w&&"fragment"in w?w.fragment:w},R.getBufferedFrag=function(x){return this.fragmentTracker.getBufferedFrag(x,f.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],z=this.fragLastKbps;z&&this.fragCurrent?T=this.fragCurrent.duration*A.maxBitrate/(1e3*z)+1:T=0}else T=0;var K=this.getBufferedFrag(w.currentTime+T);if(K){var O=this.followingBufferedFrag(K);if(O){this.abortCurrentFrag();var B=O.maxStartPTS?O.maxStartPTS:O.start,U=O.duration,D=Math.max(K.end,B+Math.min(Math.max(U-this.config.maxFragLookUpTolerance,U*.5),U*.75));this.flushMainBuffer(D,Number.POSITIVE_INFINITY)}}}},R.abortCurrentFrag=function(){var x=this.fragCurrent;this.fragCurrent=null,x!=null&&x.loader&&x.loader.abort(),this.state===y.State.KEY_LOADING&&(this.state=y.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},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!==y.State.IDLE)return;var F=T[w.level];(!F.details||F.details.live&&this.levelLastLoaded!==w.level||this.waitForCdnTuneIn(F.details))&&(this.state=y.State.WAITING_LEVEL)},R.onLevelLoaded=function(x,w){var T,F=this.levels,P=w.level,A=w.details,z=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:"+z);var K=this.fragCurrent;K&&(this.state===y.State.FRAG_LOADING||this.state===y.State.FRAG_LOADING_WAITING_RETRY)&&(K.level!==w.level&&K.loader&&(this.state=y.State.IDLE,K.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===y.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(A))return;this.state=y.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 z=A[T.level],K=z.details;if(!K){this.warn("Dropping fragment "+T.sn+" of level "+T.level+" after level details were reset");return}var O=z.videoCodec,B=K.PTSKnown||!K.live,U=(w=T.initSegment)===null||w===void 0?void 0:w.data,D=this._getAudioCodec(z),W=this.transmuxer=this.transmuxer||new c.default(this.hls,f.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),Q=F?F.index:-1,re=Q!==-1,ee=new i.ChunkMetadata(T.level,T.sn,T.stats.chunkCount,P.byteLength,Q,re),ye=this.initPTS[T.cc];W.push(P,U,D,O,T,F,K.totalduration,B,ee,ye)},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 z=this.hls;T&&z.trigger(C.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),z.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 z in T){var K=T[z];if(K.id==="main"){if(P=z,F=K,z==="video"){var O=T[z];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!==f.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===y.State.PARSED&&(this.state=y.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 o.ErrorDetails.FRAG_LOAD_ERROR:case o.ErrorDetails.FRAG_LOAD_TIMEOUT:case o.ErrorDetails.KEY_LOAD_ERROR:case o.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(f.PlaylistLevelType.MAIN,w);break;case o.ErrorDetails.LEVEL_LOAD_ERROR:case o.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==y.State.ERROR&&(w.fatal?(this.warn(""+w.details),this.state=y.State.ERROR):!w.levelRetry&&this.state===y.State.WAITING_LEVEL&&(this.state=y.State.IDLE));break;case o.ErrorDetails.BUFFER_FULL_ERROR:if(w.parent==="main"&&(this.state===y.State.PARSING||this.state===y.State.PARSED)){var T=!0,F=this.getFwdBufferInfo(this.media,f.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=y.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,f.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){h.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)&&(h.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=y.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,z=this.getCurrentContext(A);if(!z){this.warn("The loading context changed while buffering fragment "+A.sn+" of level "+A.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(A.level);return}var K=z.frag,O=z.part,B=z.level,U=P.video,D=P.text,W=P.id3,Q=P.initSegment,re=this.altAudio?void 0:P.audio;if(this.fragContextChanged(K))return;if(this.state=y.State.PARSING,Q){Q.tracks&&(this._bufferInitSegment(B,Q.tracks,K,A),F.trigger(C.Events.FRAG_PARSING_INIT_SEGMENT,{frag:K,id:T,tracks:Q.tracks}));var ee=Q.initPTS,ye=Q.timescale;Object(k.isFiniteNumber)(ee)&&(this.initPTS[K.cc]=ee,F.trigger(C.Events.INIT_PTS_FOUND,{frag:K,id:T,initPTS:ee,timescale:ye}))}if(U&&P.independent!==!1){if(B.details){var be=U.startPTS,he=U.endPTS,Ie=U.startDTS,Se=U.endDTS;if(O)O.elementaryStreams[U.type]={startPTS:be,endPTS:he,startDTS:Ie,endDTS:Se};else if(U.firstKeyFrame&&U.independent&&(this.couldBacktrack=!0),U.dropped&&U.independent){var fe=this.getLoadPosition()+this.config.maxBufferHole;if(fe<be){this.backtrack(K);return}K.setElementaryStreamInfo(U.type,K.start,he,K.start,Se,!0)}K.setElementaryStreamInfo(U.type,be,he,Ie,Se),this.bufferFragmentData(U,K,O,A)}}else if(P.independent===!1){this.backtrack(K);return}if(re){var ue=re.startPTS,ie=re.endPTS,Ce=re.startDTS,ne=re.endDTS;O&&(O.elementaryStreams[r.ElementaryStreamTypes.AUDIO]={startPTS:ue,endPTS:ie,startDTS:Ce,endDTS:ne}),K.setElementaryStreamInfo(r.ElementaryStreamTypes.AUDIO,ue,ie,Ce,ne),this.bufferFragmentData(re,K,O,A)}if(W!=null&&(w=W.samples)!==null&&w!==void 0&&w.length){var ce={frag:K,id:T,samples:W.samples};F.trigger(C.Events.FRAG_PARSING_METADATA,ce)}if(D){var Ae={frag:K,id:T,samples:D.samples};F.trigger(C.Events.FRAG_PARSING_USERDATA,Ae)}},R._bufferInitSegment=function(x,w,T,F){var P=this;if(this.state!==y.State.PARSING)return;this.audioOnly=!!w.audio&&!w.video,this.altAudio&&!this.audioOnly&&delete w.audio;var A=w.audio,z=w.video,K=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+"]")}z&&(z.levelCodec=x.videoCodec,z.id="main",this.log("Init video buffer, container:"+z.container+", codecs[level/parsed]=["+(x.videoCodec||"")+"/"+z.codec+"]")),K&&this.log("Init audiovideo buffer, container:"+K.container+", codecs[level/parsed]=["+(x.attrs.CODECS||"")+"/"+K.codec+"]"),this.hls.trigger(C.Events.BUFFER_CODECS,w),Object.keys(w).forEach(function(U){var D=w[U],W=D.initSegment;W!=null&&W.byteLength&&P.hls.trigger(C.Events.BUFFER_APPENDING,{type:U,data:W,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=y.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(L,[{key:"nextLevel",get:function(){var x=this.nextBufferedFrag;return x?x.level:-1}},{key:"currentLevel",get:function(){var x=this.media;if(x){var 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}}]),L}(y.default)},"./src/controller/subtitle-stream-controller.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"SubtitleStreamController",function(){return s});var k=S("./src/events.ts"),y=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"),f=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(l,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(l,p.key,p)}}function o(l,E,b){return E&&n(l.prototype,E),b&&n(l,b),l}function h(l,E){l.prototype=Object.create(E.prototype),l.prototype.constructor=l,d(l,E)}function d(l,E){return d=Object.setPrototypeOf||function(p,L){return p.__proto__=L,p},d(l,E)}var u=500,s=function(l){h(E,l);function E(p,L){var R;return R=l.call(this,p,L,"[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 L=this.hls;L.on(k.Events.MEDIA_ATTACHED,this.onMediaAttached,this),L.on(k.Events.MEDIA_DETACHING,this.onMediaDetaching,this),L.on(k.Events.MANIFEST_LOADING,this.onManifestLoading,this),L.on(k.Events.LEVEL_LOADED,this.onLevelLoaded,this),L.on(k.Events.ERROR,this.onError,this),L.on(k.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),L.on(k.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),L.on(k.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),L.on(k.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),L.on(k.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},b._unregisterListeners=function(){var L=this.hls;L.off(k.Events.MEDIA_ATTACHED,this.onMediaAttached,this),L.off(k.Events.MEDIA_DETACHING,this.onMediaDetaching,this),L.off(k.Events.MANIFEST_LOADING,this.onManifestLoading,this),L.off(k.Events.LEVEL_LOADED,this.onLevelLoaded,this),L.off(k.Events.ERROR,this.onError,this),L.off(k.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),L.off(k.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),L.off(k.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),L.off(k.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),L.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(L,R){this.mainDetails=R.details},b.onSubtitleFragProcessed=function(L,R){var v=R.frag,x=R.success;if(this.fragPrevious=v,this.state=r.State.IDLE,!x)return;var w=this.tracksBuffered[this.currentTrackId];if(!w)return;for(var T,F=v.start,P=0;P<w.length;P++)if(F>=w[P].start&&F<=w[P].end){T=w[P];break}var A=v.start+v.duration;T?T.end=A:(T={start:F,end:A},w.push(T)),this.fragmentTracker.fragBuffered(v)},b.onBufferFlushing=function(L,R){var v=R.startOffset,x=R.endOffset;if(v===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(z){for(var K=0;K<z.length;){if(z[K].end<=A){z.shift();continue}else if(z[K].start<A)z[K].start=A;else break;K++}}),this.fragmentTracker.removeFragmentsInRange(v,A,c.PlaylistLevelType.SUBTITLE)}},b.onError=function(L,R){var v,x=R.frag;if(!x||x.type!==c.PlaylistLevelType.SUBTITLE)return;(v=this.fragCurrent)!==null&&v!==void 0&&v.loader&&this.fragCurrent.loader.abort(),this.state=r.State.IDLE},b.onSubtitleTracksUpdated=function(L,R){var v=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){v.tracksBuffered[w.id]=[]}),this.mediaBuffer=null},b.onSubtitleTrackSwitch=function(L,R){if(this.currentTrackId=R.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var v=this.levels[this.currentTrackId];v!=null&&v.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,v&&this.setInterval(u)},b.onSubtitleTrackLoaded=function(L,R){var v,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||(v=P.details)!==null&&v!==void 0&&v.live){var A=this.mainDetails;if(x.deltaUpdateFailed||!A)return;var z=A.fragments[0];if(!P.details)x.hasProgramDateTime&&A.hasProgramDateTime?Object(_.alignMediaPlaylistByPDT)(x,A):z&&Object(e.addSliding)(x,z.start);else{var K=this.alignPlaylists(x,P.details);K===0&&z&&Object(e.addSliding)(x,z.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(L){var R=L.frag,v=L.payload,x=R.decryptdata,w=this.hls;if(this.fragContextChanged(R))return;if(v&&v.byteLength>0&&x&&x.key&&x.iv&&x.method==="AES-128"){var T=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(v),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 L,R=this.currentTrackId,v=this.levels;if(!v.length||!v[R]||!v[R].details)return;var x=v[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,z=P.len,K=this.getMaxBufferLength()+w;if(z>K)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,D,W=this.fragPrevious;if(A<U){var Q=T.maxFragLookUpTolerance;W&&x.hasProgramDateTime&&(D=Object(C.findFragmentByPDT)(O,W.endProgramDateTime,Q)),D||(D=Object(C.findFragmentByPTS)(W,O,A,Q),!D&&W&&W.start<O[0].start&&(D=O[0]))}else D=O[B-1];(L=D)!==null&&L!==void 0&&L.encrypted?(y.logger.log("Loading key for "+D.sn),this.state=r.State.KEY_LOADING,this.hls.trigger(k.Events.KEY_LOADING,{frag:D})):D&&this.fragmentTracker.getState(D)===f.FragmentState.NOT_LOADED&&this.loadFragment(D,x,A)}},b.loadFragment=function(L,R,v){this.fragCurrent=L,l.prototype.loadFragment.call(this,L,R,v)},o(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"),y=S("./src/utils/texttrack-utils.ts"),m=S("./src/controller/base-playlist-controller.ts"),C=S("./src/types/loader.ts");function _(n,o){for(var h=0;h<o.length;h++){var d=o[h];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(n,d.key,d)}}function e(n,o,h){return o&&_(n.prototype,o),h&&_(n,h),n}function f(n,o){n.prototype=Object.create(o.prototype),n.prototype.constructor=n,r(n,o)}function r(n,o){return r=Object.setPrototypeOf||function(d,u){return d.__proto__=u,d},r(n,o)}var c=function(n){f(o,n);function o(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 h=o.prototype;return h.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,n.prototype.destroy.call(this)},h.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)},h.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)},h.onMediaAttached=function(u,s){if(this.media=s.media,!this.media)return;this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange)},h.pollTrackChange=function(u){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,u)},h.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(s){Object(y.clearCurrentCues)(s)}),this.subtitleTrack=-1,this.media=null},h.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},h.onManifestParsed=function(u,s){this.tracks=s.subtitleTracks},h.onSubtitleTrackLoaded=function(u,s){var l=s.id,E=s.details,b=this.trackId,p=this.tracksInGroup[b];if(!p){this.warn("Invalid subtitle track id "+l);return}var L=p.details;p.details=s.details,this.log("subtitle track "+l+" loaded ["+E.startSN+"-"+E.endSN+"]"),l===this.trackId&&(this.retryCount=0,this.playlistLoaded(l,s,L))},h.onLevelLoading=function(u,s){this.switchLevel(s.level)},h.onLevelSwitching=function(u,s){this.switchLevel(s.level)},h.switchLevel=function(u){var s=this.hls.levels[u];if(!(s!=null&&s.textGroupIds))return;var l=s.textGroupIds[s.urlId];if(this.groupId!==l){var E=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,b=this.tracks.filter(function(R){return!l||R.groupId===l});this.tracksInGroup=b;var p=this.findTrackId(E==null?void 0:E.name)||this.findTrackId();this.groupId=l;var L={subtitleTracks:b};this.log("Updating subtitle tracks, "+b.length+' track(s) found in "'+l+'" group-id'),this.hls.trigger(k.Events.SUBTITLE_TRACKS_UPDATED,L),p!==-1&&this.setSubtitleTrack(p,E)}},h.findTrackId=function(u){for(var s=this.tracksInGroup,l=0;l<s.length;l++){var E=s[l];if((!this.selectDefaultTrack||E.default)&&(!u||u===E.name))return E.id}return-1},h.onError=function(u,s){if(n.prototype.onError.call(this,u,s),s.fatal||!s.context)return;s.context.type===C.PlaylistContextType.SUBTITLE_TRACK&&s.context.id===this.trackId&&s.context.groupId===this.groupId&&this.retryLoadingOrFail(s)},h.loadPlaylist=function(u){var s=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(s)){var l=s.id,E=s.groupId,b=s.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 "+l),this.hls.trigger(k.Events.SUBTITLE_TRACK_LOADING,{url:b,id:l,groupId:E,deliveryDirectives:u||null})}},h.toggleTrackModes=function(u){var s=this,l=this.media,E=this.subtitleDisplay,b=this.trackId;if(!l)return;var p=i(l.textTracks),L=p.filter(function(x){return x.groupId===s.groupId});if(u===-1)[].slice.call(p).forEach(function(x){x.mode="disabled"});else{var R=L[b];R&&(R.mode="disabled")}var v=L[u];v&&(v.mode=E?"showing":"hidden")},h.setSubtitleTrack=function(u,s){var l,E=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=u;return}if(this.trackId!==u&&this.toggleTrackModes(u),this.trackId===u&&(u===-1||(l=E[u])!==null&&l!==void 0&&l.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,L=b.groupId,R=L===void 0?"":L,v=b.name,x=b.type,w=b.url;this.hls.trigger(k.Events.SUBTITLE_TRACK_SWITCH,{id:p,groupId:R,name:v,type:x,url:w});var T=this.switchParams(b.url,s==null?void 0:s.details);this.loadPlaylist(T)}else this.hls.trigger(k.Events.SUBTITLE_TRACK_SWITCH,{id:u})},h.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var u=-1,s=i(this.media.textTracks),l=0;l<s.length;l++)if(s[l].mode==="hidden")u=l;else if(s[l].mode==="showing"){u=l;break}this.subtitleTrack!==u&&(this.subtitleTrack=u)},e(o,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(u){this.selectDefaultTrack=!1;var s=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(u,s)}}]),o}(m.default);function i(n){for(var o=[],h=0;h<n.length;h++){var d=n[h];d.kind==="subtitles"&&d.label&&o.push(n[h])}return o}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"),y=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"),f=S("./src/utils/imsc1-ttml-parser.ts"),r=S("./src/types/loader.ts"),c=S("./src/utils/logger.ts"),i=function(){function d(s){if(this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.timescale=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=h(),this.captionsProperties=void 0,this.hls=s,this.config=s.config,this.Cues=s.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},this.config.enableCEA708Captions){var l=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,l,E),this.cea608Parser2=new m.default(3,b,p)}s.on(y.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),s.on(y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),s.on(y.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.on(y.Events.MANIFEST_LOADED,this.onManifestLoaded,this),s.on(y.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),s.on(y.Events.FRAG_LOADING,this.onFragLoading,this),s.on(y.Events.FRAG_LOADED,this.onFragLoaded,this),s.on(y.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),s.on(y.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),s.on(y.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),s.on(y.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),s.on(y.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var u=d.prototype;return u.destroy=function(){var l=this.hls;l.off(y.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),l.off(y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.off(y.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.off(y.Events.MANIFEST_LOADED,this.onManifestLoaded,this),l.off(y.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),l.off(y.Events.FRAG_LOADING,this.onFragLoading,this),l.off(y.Events.FRAG_LOADED,this.onFragLoaded,this),l.off(y.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),l.off(y.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),l.off(y.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),l.off(y.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),l.off(y.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},u.addCues=function(l,E,b,p,L){for(var R=!1,v=L.length;v--;){var x=L[v],w=o(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||L.push([E,b]),this.config.renderTextTracksNatively){var T=this.captionsTracks[l];this.Cues.newCue(T,E,b,p)}else{var F=this.Cues.newCue(null,E,b,p);this.hls.trigger(y.Events.CUES_PARSED,{type:"captions",cues:F,track:l})}},u.onInitPtsFound=function(l,E){var b=this,p=E.frag,L=E.id,R=E.initPTS,v=E.timescale,x=this.unparsedVttFrags;L==="main"&&(this.initPTS[p.cc]=R,this.timescale[p.cc]=v),x.length&&(this.unparsedVttFrags=[],x.forEach(function(w){b.onFragLoaded(y.Events.FRAG_LOADED,w)}))},u.getExistingTrack=function(l){var E=this.media;if(E)for(var b=0;b<E.textTracks.length;b++){var p=E.textTracks[b];if(p[l])return p}return null},u.createCaptionsTrack=function(l){this.config.renderTextTracksNatively?this.createNativeTrack(l):this.createNonNativeTrack(l)},u.createNativeTrack=function(l){if(this.captionsTracks[l])return;var E=this.captionsProperties,b=this.captionsTracks,p=this.media,L=E[l],R=L.label,v=L.languageCode,x=this.getExistingTrack(l);if(x)b[l]=x,Object(e.clearCurrentCues)(b[l]),Object(e.sendAddTrackEvent)(b[l],p);else{var w=this.createTextTrack("captions",R,v);w&&(w[l]=!0,b[l]=w)}},u.createNonNativeTrack=function(l){if(this.nonNativeCaptionsTracks[l])return;var E=this.captionsProperties[l];if(!E)return;var b=E.label,p={_id:l,label:b,kind:"captions",default:E.media?!!E.media.default:!1,closedCaptions:E.media};this.nonNativeCaptionsTracks[l]=p,this.hls.trigger(y.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[p]})},u.createTextTrack=function(l,E,b){var p=this.media;return p?p.addTextTrack(l,E,b):void 0},u.onMediaAttaching=function(l,E){this.media=E.media,this._cleanTracks()},u.onMediaDetaching=function(){var l=this.captionsTracks;Object.keys(l).forEach(function(E){Object(e.clearCurrentCues)(l[E]),delete l[E]}),this.nonNativeCaptionsTracks={}},u.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=h(),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 l=this.media;if(!l)return;var E=l.textTracks;if(E)for(var b=0;b<E.length;b++)Object(e.clearCurrentCues)(E[b])},u.onSubtitleTracksUpdated=function(l,E){var b=this;this.textTracks=[];var p=E.subtitleTracks||[],L=p.some(function(w){return w.textCodec===f.IMSC1_CODEC});if(this.config.enableWebVTT||L&&this.config.enableIMSC1){var R=this.tracks&&p&&this.tracks.length===p.length;if(this.tracks=p||[],this.config.renderTextTracksNatively){var v=this.media?this.media.textTracks:[];this.tracks.forEach(function(w,T){var F;if(T<v.length){for(var P=null,A=0;A<v.length;A++)if(n(v[A],w)){P=v[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(y.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:x})}}},u.onManifestLoaded=function(l,E){var b=this;this.config.enableCEA708Captions&&E.captions&&E.captions.forEach(function(p){var L=/(?:CC|SERVICE)([1-4])/.exec(p.instreamId);if(!L)return;var R="textTrack"+L[1],v=b.captionsProperties[R];if(!v)return;v.label=p.name,p.lang&&(v.languageCode=p.lang),v.media=p})},u.onFragLoading=function(l,E){var b=this.cea608Parser1,p=this.cea608Parser2,L=this.lastSn,R=this.lastPartIndex;if(!this.enabled||!(b&&p))return;if(E.frag.type===r.PlaylistLevelType.MAIN){var v,x,w=E.frag.sn,T=(v=E==null||((x=E.part)===null||x===void 0)?void 0:x.index)!=null?v:-1;w===L+1||w===L&&T===R+1||(b.reset(),p.reset()),this.lastSn=w,this.lastPartIndex=T}},u.onFragLoaded=function(l,E){var b=E.frag,p=E.payload,L=this.initPTS,R=this.unparsedVttFrags;if(b.type===r.PlaylistLevelType.SUBTITLE)if(p.byteLength){if(!Object(k.isFiniteNumber)(L[b.cc])){R.push(E),L.length&&this.hls.trigger(y.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:b,error:new Error("Missing initial subtitle PTS")});return}var v=b.decryptdata;if(v==null||v.key==null||v.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===f.IMSC1_CODEC?this._parseIMSC1(b,p):this._parseVTTs(b,p,w)}}else this.hls.trigger(y.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:b,error:new Error("Empty subtitle payload")})},u._parseIMSC1=function(l,E){var b=this,p=this.hls;Object(f.parseIMSC1)(E,this.initPTS[l.cc],this.timescale[l.cc],function(L){b._appendCues(L,l.level),p.trigger(y.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:l})},function(L){c.logger.log("Failed to parse IMSC1: "+L),p.trigger(y.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:l,error:L})})},u._parseVTTs=function(l,E,b){var p=this,L=this.hls;Object(_.parseWebVTT)(E,this.initPTS[l.cc],this.timescale[l.cc],b,l.cc,l.start,function(R){p._appendCues(R,l.level),L.trigger(y.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:l})},function(R){p._fallbackToIMSC1(l,E),c.logger.log("Failed to parse VTT cue: "+R),L.trigger(y.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:l,error:R})})},u._fallbackToIMSC1=function(l,E){var b=this,p=this.tracks[l.level];p.textCodec||Object(f.parseIMSC1)(E,this.initPTS[l.cc],this.timescale[l.cc],function(){p.textCodec=f.IMSC1_CODEC,b._parseIMSC1(l,E)},function(){p.textCodec="wvtt"})},u._appendCues=function(l,E){var b=this.hls;if(this.config.renderTextTracksNatively){var p=this.textTracks[E];if(p.mode==="disabled")return;l.forEach(function(v){return Object(e.addCueToTrack)(p,v)})}else{var L=this.tracks[E],R=L.default?"default":"subtitles"+E;b.trigger(y.Events.CUES_PARSED,{type:"subtitles",cues:l,track:R})}},u.onFragDecrypted=function(l,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(y.Events.FRAG_LOADED,E)}},u.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},u.onFragParsingUserdata=function(l,E){var b=this.cea608Parser1,p=this.cea608Parser2;if(!this.enabled||!(b&&p))return;for(var L=0;L<E.samples.length;L++){var R=E.samples[L].bytes;if(R){var v=this.extractCea608Data(R);b.addData(E.samples[L].pts,v[0]),p.addData(E.samples[L].pts,v[1])}}},u.onBufferFlushing=function(l,E){var b=E.startOffset,p=E.endOffset,L=E.endOffsetSubtitles,R=E.type,v=this.media;if(!v||v.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&&L!==void 0)){var w=this.textTracks;Object.keys(w).forEach(function(T){return Object(e.removeCuesInRange)(w[T],b,L)})}},u.extractCea608Data=function(l){for(var E=l[0]&31,b=2,p=[[],[]],L=0;L<E;L++){var R=l[b++],v=127&l[b++],x=127&l[b++],w=(4&R)!==0,T=3&R;if(v===0&&x===0)continue;w&&((T===0||T===1)&&(p[T].push(v),p[T].push(x)))}return p},d}();function n(d,u){return d&&d.label===u.name&&!(d.textTrack1||d.textTrack2)}function o(d,u,s,l){return Math.min(u,l)-Math.max(d,s)}function h(){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 y(C,_){this.subtle=void 0,this.aesIV=void 0,this.subtle=C,this.aesIV=_}var m=y.prototype;return m.decrypt=function(_,e){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},e,_)},y}()},"./src/crypt/aes-decryptor.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"removePadding",function(){return y}),S.d(g,"default",function(){return m});var k=S("./src/utils/typed-array.ts");function y(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(f){for(var r=new DataView(f),c=new Uint32Array(4),i=0;i<4;i++)c[i]=r.getUint32(i*4);return c},_.initTable=function(){var f=this.sBox,r=this.invSBox,c=this.subMix,i=c[0],n=c[1],o=c[2],h=c[3],d=this.invSubMix,u=d[0],s=d[1],l=d[2],E=d[3],b=new Uint32Array(256),p=0,L=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 v=L^L<<1^L<<2^L<<3^L<<4;v=v>>>8^v&255^99,f[p]=v,r[v]=p;var x=b[p],w=b[x],T=b[w],F=b[v]*257^v*16843008;i[p]=F<<24|F>>>8,n[p]=F<<16|F>>>16,o[p]=F<<8|F>>>24,h[p]=F,F=T*16843009^w*65537^x*257^p*16843008,u[v]=F<<24|F>>>8,s[v]=F<<16|F>>>16,l[v]=F<<8|F>>>24,E[v]=F,p?(p=x^b[b[b[T^x]]],L^=b[b[L]]):p=L=1}},_.expandKey=function(f){for(var r=this.uint8ArrayToUint32Array_(f),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 o=this.ksRows=(n+6+1)*4,h,d,u=this.keySchedule=new Uint32Array(o),s=this.invKeySchedule=new Uint32Array(o),l=this.sBox,E=this.rcon,b=this.invSubMix,p=b[0],L=b[1],R=b[2],v=b[3],x,w;for(h=0;h<o;h++){if(h<n){x=u[h]=r[h];continue}w=x,h%n===0?(w=w<<8|w>>>24,w=l[w>>>24]<<24|l[w>>>16&255]<<16|l[w>>>8&255]<<8|l[w&255],w^=E[h/n|0]<<24):n>6&&h%n===4&&(w=l[w>>>24]<<24|l[w>>>16&255]<<16|l[w>>>8&255]<<8|l[w&255]),u[h]=x=(u[h-n]^w)>>>0}for(d=0;d<o;d++)h=o-d,d&3?w=u[h]:w=u[h-4],d<4||h<=4?s[d]=w:s[d]=p[l[w>>>24]]^L[l[w>>>16&255]]^R[l[w>>>8&255]]^v[l[w&255]],s[d]=s[d]>>>0},_.networkToHostOrderSwap=function(f){return f<<24|(f&65280)<<8|(f&16711680)>>8|f>>>24},_.decrypt=function(f,r,c){for(var i=this.keySize+6,n=this.invKeySchedule,o=this.invSBox,h=this.invSubMix,d=h[0],u=h[1],s=h[2],l=h[3],E=this.uint8ArrayToUint32Array_(c),b=E[0],p=E[1],L=E[2],R=E[3],v=new Int32Array(f),x=new Int32Array(v.length),w,T,F,P,A,z,K,O,B,U,D,W,Q,re,ee=this.networkToHostOrderSwap;r<v.length;){for(B=ee(v[r]),U=ee(v[r+1]),D=ee(v[r+2]),W=ee(v[r+3]),A=B^n[0],z=W^n[1],K=D^n[2],O=U^n[3],Q=4,re=1;re<i;re++)w=d[A>>>24]^u[z>>16&255]^s[K>>8&255]^l[O&255]^n[Q],T=d[z>>>24]^u[K>>16&255]^s[O>>8&255]^l[A&255]^n[Q+1],F=d[K>>>24]^u[O>>16&255]^s[A>>8&255]^l[z&255]^n[Q+2],P=d[O>>>24]^u[A>>16&255]^s[z>>8&255]^l[K&255]^n[Q+3],A=w,z=T,K=F,O=P,Q=Q+4;w=o[A>>>24]<<24^o[z>>16&255]<<16^o[K>>8&255]<<8^o[O&255]^n[Q],T=o[z>>>24]<<24^o[K>>16&255]<<16^o[O>>8&255]<<8^o[A&255]^n[Q+1],F=o[K>>>24]<<24^o[O>>16&255]<<16^o[A>>8&255]<<8^o[z&255]^n[Q+2],P=o[O>>>24]<<24^o[A>>16&255]<<16^o[z>>8&255]<<8^o[K&255]^n[Q+3],x[r]=ee(w^b),x[r+1]=ee(P^p),x[r+2]=ee(F^L),x[r+3]=ee(T^R),b=B,p=U,L=D,R=W,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"),y=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"),f=16,r=function(){function c(n,o,h){var d=h===void 0?{}:h,u=d.removePKCS7Padding,s=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=o,this.removePKCS7Padding=s,s)try{var l=self.crypto;l&&(this.subtle=l.subtle||l.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 o=this.currentResult;if(!o){this.reset();return}var h=new Uint8Array(o);return this.reset(),this.removePKCS7Padding?Object(m.removePadding)(h):h},i.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},i.decrypt=function(o,h,d,u){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(o),h,d);var s=this.flush();s&&u(s.buffer)}else this.webCryptoDecrypt(new Uint8Array(o),h,d).then(u)},i.softwareDecrypt=function(o,h,d){var u=this.currentIV,s=this.currentResult,l=this.remainderData;this.logOnce("JS AES decrypt"),l&&(o=Object(_.appendUint8Array)(l,o),this.remainderData=null);var E=this.getValidChunk(o);if(!E.length)return null;u&&(d=u);var b=this.softwareDecrypter;b||(b=this.softwareDecrypter=new m.default),b.expandKey(h);var p=s;return this.currentResult=b.decrypt(E.buffer,0,d),this.currentIV=Object(e.sliceUint8)(E,-16).buffer,p||null},i.webCryptoDecrypt=function(o,h,d){var u=this,s=this.subtle;return(this.key!==h||!this.fastAesKey)&&(this.key=h,this.fastAesKey=new y.default(s,h)),this.fastAesKey.expandKey().then(function(l){if(!s)return Promise.reject(new Error("web crypto not initialized"));var E=new k.default(s,d);return E.decrypt(o.buffer,l)}).catch(function(l){return u.onWebCryptoError(l,o,h,d)})},i.onWebCryptoError=function(o,h,d,u){return C.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",o),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(h,d,u)},i.getValidChunk=function(o){var h=o,d=o.length-o.length%f;return d!==o.length&&(h=Object(e.sliceUint8)(o,0,d),this.remainderData=Object(e.sliceUint8)(o,d)),h},i.logOnce=function(o){if(!this.logEnabled)return;C.logger.log("[decrypter.ts]: "+o),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 y(C,_){this.subtle=void 0,this.key=void 0,this.subtle=C,this.key=_}var m=y.prototype;return m.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},y}()},"./src/demux/aacdemuxer.ts":function(N,g,S){"use strict";S.r(g);var k=S("./src/demux/base-audio-demuxer.ts"),y=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,o){return n.__proto__=o,n},e(r,c)}var f=function(r){_(c,r);function c(n,o){var h;return h=r.call(this)||this,h.observer=void 0,h.config=void 0,h.observer=n,h.config=o,h}var i=c.prototype;return i.resetInitSegment=function(o,h,d){r.prototype.resetInitSegment.call(this,o,h,d),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:o,duration:d,inputTimeScale:9e4,dropped:0}},c.probe=function(o){if(!o)return!1;for(var h=C.getID3Data(o,0)||[],d=h.length,u=o.length;d<u;d++)if(y.probe(o,d))return m.logger.log("ADTS sync word found !"),!0;return!1},i.canParse=function(o,h){return y.canParse(o,h)},i.appendFrame=function(o,h,d){y.initTrackConfig(o,this.observer,h,d,o.manifestCodec);var u=y.appendFrame(o,h,d,this.initPTS,this.frameIndex);if(u&&u.missing===0)return u},c}(k.default);f.minProbeByteLength=9,g.default=f},"./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 f}),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 o}),S.d(g,"getFrameDuration",function(){return h}),S.d(g,"parseFrameHeader",function(){return d}),S.d(g,"appendFrame",function(){return u});var k=S("./src/utils/logger.ts"),y=S("./src/errors.ts"),m=S("./src/events.ts");function C(s,l,E,b){var p,L,R,v,x=navigator.userAgent.toLowerCase(),w=b,T=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];p=((l[E+2]&192)>>>6)+1;var F=(l[E+2]&60)>>>2;if(F>T.length-1){s.trigger(m.Events.ERROR,{type:y.ErrorTypes.MEDIA_ERROR,details:y.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+F});return}return R=(l[E+2]&1)<<2,R|=(l[E+3]&192)>>>6,k.logger.log("manifest codec:"+b+", ADTS type:"+p+", samplingIndex:"+F),/firefox/i.test(x)?F>=6?(p=5,v=new Array(4),L=F-3):(p=2,v=new Array(2),L=F):x.indexOf("android")!==-1?(p=2,v=new Array(2),L=F):(p=5,v=new Array(4),b&&(b.indexOf("mp4a.40.29")!==-1||b.indexOf("mp4a.40.5")!==-1)||!b&&F>=6?L=F-3:((b&&b.indexOf("mp4a.40.2")!==-1&&(F>=6&&R===1||/vivaldi/i.test(x))||!b&&R===1)&&(p=2,v=new Array(2)),L=F)),v[0]=p<<3,v[0]|=(F&14)>>1,v[1]|=(F&1)<<7,v[1]|=R<<3,p===5&&(v[1]|=(L&14)>>1,v[2]=(L&1)<<7,v[2]|=2<<2,v[3]=0),{config:v,samplerate:T[F],channelCount:R,codec:"mp4a.40."+p,manifestCodec:w}}function _(s,l){return s[l]===255&&(s[l+1]&246)===240}function e(s,l){return s[l+1]&1?7:9}function f(s,l){return(s[l+3]&3)<<11|s[l+4]<<3|(s[l+5]&224)>>>5}function r(s,l){return l+5<s.length}function c(s,l){return l+1<s.length&&_(s,l)}function i(s,l){return r(s,l)&&_(s,l)&&f(s,l)<=s.length-l}function n(s,l){if(c(s,l)){var E=e(s,l);if(l+E>=s.length)return!1;var b=f(s,l);if(b<=E)return!1;var p=l+b;return p===s.length||c(s,p)}return!1}function o(s,l,E,b,p){if(!s.samplerate){var L=C(l,E,b,p);if(!L)return;s.config=L.config,s.samplerate=L.samplerate,s.channelCount=L.channelCount,s.codec=L.codec,s.manifestCodec=L.manifestCodec,k.logger.log("parsed codec:"+s.codec+", rate:"+L.samplerate+", channels:"+L.channelCount)}}function h(s){return 1024*9e4/s}function d(s,l,E,b,p){var L=e(s,l),R=f(s,l);if(R-=L,R>0){var v=E+b*p;return{headerLength:L,frameLength:R,stamp:v}}}function u(s,l,E,b,p){var L=h(s.samplerate),R=d(l,E,b,p,L);if(R){var v=R.frameLength,x=R.headerLength,w=R.stamp,T=x+v,F=Math.max(0,E+T-l.length),P;F?(P=new Uint8Array(T-x),P.set(l.subarray(E+x,l.length),0)):P=l.subarray(E+x,E+T);var A={unit:P,pts:w};return F||s.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 f});var k=S("./src/polyfills/number.ts"),y=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,o,h){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,o){return!1},c.appendFrame=function(n,o,h){},c.demux=function(n,o){this.cachedData&&(n=Object(C.appendUint8Array)(this.cachedData,n),this.cachedData=null);var h=y.getID3Data(n,0),d=h?h.length:0,u,s,l=this._audioTrack,E=this._id3Track,b=h?y.getTimeStamp(h):void 0,p=n.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=f(b,o)),h&&h.length>0&&E.samples.push({pts:this.initPTS,dts:this.initPTS,data:h}),s=this.initPTS;d<p;){if(this.canParse(n,d)){var L=this.appendFrame(l,n,d);L?(this.frameIndex++,s=L.sample.pts,d+=L.length,u=d):d=p}else y.canParse(n,d)?(h=y.getID3Data(n,d),E.samples.push({pts:s,dts:s,data:h}),d+=h.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:l,avcTrack:Object(m.dummyTrack)(),id3Track:E,textTrack:Object(m.dummyTrack)()}},c.demuxSampleAes=function(n,o,h){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},c.flush=function(n){var o=this.cachedData;return o&&(this.cachedData=null,this.demux(o,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(m.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(m.dummyTrack)()}},c.destroy=function(){},r}(),f=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,f=this.dataLength,r;if(e.length)e.length===1?r=e[0]:r=y(e,f);else return new Uint8Array(0);return this.reset(),r},C.reset=function(){this.chunks.length=0,this.dataLength=0},m}();function y(m,C){for(var _=new Uint8Array(C),e=0,f=0;f<m.length;f++){var r=m[f];_.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"),y=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,f=this.bytesAvailable,r=e.byteLength-f,c=new Uint8Array(4),i=Math.min(4,f);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 f;this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,f=e>>3,e-=f>>3,this.bytesAvailable-=f,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)},C.readBits=function(e){var f=Math.min(this.bitsAvailable,e),r=this.word>>>32-f;return e>32&&k.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=f,this.bitsAvailable>0?this.word<<=f:this.bytesAvailable>0&&this.loadWord(),f=e-f,f>0&&this.bitsAvailable?r<<f|this.readBits(f):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 f=8,r=8,c,i=0;i<e;i++)r!==0&&(c=this.readEG(),r=(f+c+256)%256),f=r===0?f:r},C.readSPS=function(){var e=0,f=0,r=0,c=0,i,n,o,h=this.readUByte.bind(this),d=this.readBits.bind(this),u=this.readUEG.bind(this),s=this.readBoolean.bind(this),l=this.skipBits.bind(this),E=this.skipEG.bind(this),b=this.skipUEG.bind(this),p=this.skipScalingList.bind(this);h();var L=h();if(d(5),l(3),h(),b(),L===100||L===110||L===122||L===244||L===44||L===83||L===86||L===118||L===128){var R=u();if(R===3&&l(1),b(),b(),l(1),s())for(n=R!==3?8:12,o=0;o<n;o++)s()&&(o<6?p(16):p(64))}b();var v=u();if(v===0)u();else if(v===1)for(l(1),E(),E(),i=u(),o=0;o<i;o++)E();b(),l(1);var x=u(),w=u(),T=d(1);T===0&&l(1),l(1),s()&&(e=u(),f=u(),r=u(),c=u());var F=[1,1];if(s()&&s()){var P=h();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=[h()<<8|h(),h()<<8|h()];break}}}return{width:Math.ceil((x+1)*16-e*2-f*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=y},"./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 y}),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 f}),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 s});var k=function(p,L){return L+10<=p.length&&(p[L]===73&&p[L+1]===68&&p[L+2]===51&&(p[L+3]<255&&p[L+4]<255&&(p[L+6]<128&&p[L+7]<128&&p[L+8]<128&&p[L+9]<128)))},y=function(p,L){return L+10<=p.length&&(p[L]===51&&p[L+1]===68&&p[L+2]===73&&(p[L+3]<255&&p[L+4]<255&&(p[L+6]<128&&p[L+7]<128&&p[L+8]<128&&p[L+9]<128)))},m=function(p,L){for(var R=L,v=0;k(p,L);){v+=10;var x=C(p,L+6);v+=x,y(p,L+10)&&(v+=10),L+=v}return v>0?p.subarray(R,R+v):void 0},C=function(p,L){var R=0;return R=(p[L]&127)<<21,R|=(p[L+1]&127)<<14,R|=(p[L+2]&127)<<7,R|=p[L+3]&127,R},_=function(p,L){return k(p,L)&&C(p,L+6)+10<=p.length-L},e=function(p){for(var L=c(p),R=0;R<L.length;R++){var v=L[R];if(f(v))return d(v)}return},f=function(p){return p&&p.key==="PRIV"&&p.info==="com.apple.streaming.transportStreamTimestamp"},r=function(p){var L=String.fromCharCode(p[0],p[1],p[2],p[3]),R=C(p,4),v=10;return{type:L,size:R,data:p.subarray(v,v+R)}},c=function(p){for(var L=0,R=[];k(p,L);){var v=C(p,L+6);L+=10;for(var x=L+v;L+8<x;){var w=r(p.subarray(L)),T=i(w);T&&R.push(T),L+=w.size+10}y(p,L)&&(L+=10)}return R},i=function(p){return p.type==="PRIV"?n(p):p.type[0]==="W"?h(p):o(p)},n=function(p){if(p.size<2)return;var L=u(p.data,!0),R=new Uint8Array(p.data.subarray(L.length+1));return{key:p.type,info:L,data:R.buffer}},o=function(p){if(p.size<2)return;if(p.type==="TXXX"){var L=1,R=u(p.data.subarray(L),!0);L+=R.length+1;var v=u(p.data.subarray(L));return{key:p.type,info:R,data:v}}var x=u(p.data.subarray(1));return{key:p.type,data:x}},h=function(p){if(p.type==="WXXX"){if(p.size<2)return;var L=1,R=u(p.data.subarray(L),!0);L+=R.length+1;var v=u(p.data.subarray(L));return{key:p.type,info:R,data:v}}var x=u(p.data);return{key:p.type,data:x}},d=function(p){if(p.data.byteLength===8){var L=new Uint8Array(p.data),R=L[3]&1,v=(L[4]<<23)+(L[5]<<15)+(L[6]<<7)+L[7];return v/=45,R&&(v+=4772185884e-2),Math.round(v)}return},u=function(p,L){L===void 0&&(L=!1);var R=E();if(R){var v=R.decode(p);if(L){var x=v.indexOf("\0");return x!==-1?v.substring(0,x):v}return v.replace(/\0/g,"")}for(var w=p.length,T,F,P,A="",z=0;z<w;){if(T=p[z++],T===0&&L)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[z++],A+=String.fromCharCode((T&31)<<6|F&63);break;case 14:F=p[z++],P=p[z++],A+=String.fromCharCode((T&15)<<12|(F&63)<<6|(P&63)<<0);break;default:}}return A},s={decodeTextFrame:o},l;function E(){return!l&&typeof self.TextDecoder!="undefined"&&(l=new self.TextDecoder("utf-8")),l}},"./src/demux/mp3demuxer.ts":function(N,g,S){"use strict";S.r(g);var k=S("./src/demux/base-audio-demuxer.ts"),y=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,o){return n.__proto__=o,n},e(r,c)}var f=function(r){_(c,r);function c(){return r.apply(this,arguments)||this}var i=c.prototype;return i.resetInitSegment=function(o,h,d){r.prototype.resetInitSegment.call(this,o,h,d),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:o,duration:d,inputTimeScale:9e4,dropped:0}},c.probe=function(o){if(!o)return!1;for(var h=y.getID3Data(o,0)||[],d=h.length,u=o.length;d<u;d++)if(C.probe(o,d))return m.logger.log("MPEG Audio sync word found !"),!0;return!1},i.canParse=function(o,h){return C.canParse(o,h)},i.appendFrame=function(o,h,d){return this.initPTS===null?void 0:C.appendFrame(o,h,d,this.initPTS,this.frameIndex)},c}(k.default);f.minProbeByteLength=4,g.default=f},"./src/demux/mp4demuxer.ts":function(N,g,S){"use strict";S.r(g);var k=S("./src/utils/mp4-tools.ts"),y=S("./src/demux/dummy-demuxed-track.ts"),m=function(){function C(e,f){this.remainderData=null,this.config=void 0,this.config=f}var _=C.prototype;return _.resetTimeStamp=function(){},_.resetInitSegment=function(){},_.resetContiguity=function(){},C.probe=function(f){return Object(k.findBox)({data:f,start:0,end:Math.min(f.length,16384)},["moof"]).length>0},_.demux=function(f){var r=f,c=Object(y.dummyTrack)();if(this.config.progressive){this.remainderData&&(r=Object(k.appendUint8Array)(this.remainderData,f));var i=Object(k.segmentValidRange)(r);this.remainderData=i.remainder,c.samples=i.valid||new Uint8Array}else c.samples=r;return{audioTrack:Object(y.dummyTrack)(),avcTrack:c,id3Track:Object(y.dummyTrack)(),textTrack:Object(y.dummyTrack)()}},_.flush=function(){var f=Object(y.dummyTrack)();return f.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(y.dummyTrack)(),avcTrack:f,id3Track:Object(y.dummyTrack)(),textTrack:Object(y.dummyTrack)()}},_.demuxSampleAes=function(f,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 f}),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,y=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],m=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],C=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],_=[0,1,1,4];function e(o,h,d,u,s){if(d+24>h.length)return;var l=f(h,d);if(l&&d+l.frameLength<=h.length){var E=l.samplesPerFrame*9e4/l.sampleRate,b=u+s*E,p={unit:h.subarray(d,d+l.frameLength),pts:b,dts:b};return o.config=[],o.channelCount=l.channelCount,o.samplerate=l.sampleRate,o.samples.push(p),{sample:p,length:l.frameLength,missing:0}}}function f(o,h){var d=o[h+1]>>3&3,u=o[h+1]>>1&3,s=o[h+2]>>4&15,l=o[h+2]>>2&3;if(d!==1&&s!==0&&s!==15&&l!==3){var E=o[h+2]>>1&1,b=o[h+3]>>6,p=d===3?3-u:u===3?3:4,L=y[p*14+s-1]*1e3,R=d===3?0:d===2?1:2,v=m[R*3+l],x=b===3?1:2,w=C[d][u],T=_[u],F=w*8*T,P=Math.floor(w*L/v+E)*T;if(k===null){var A=navigator.userAgent||"",z=A.match(/Chrome\/(\d+)/i);k=z?parseInt(z[1]):0}var K=!!k&&k<=87;return K&&u===2&&L>=224e3&&b===0&&(o[h+3]=o[h+3]|128),{sampleRate:v,channelCount:x,frameLength:P,samplesPerFrame:F}}}function r(o,h){return o[h]===255&&(o[h+1]&224)===224&&(o[h+1]&6)!==0}function c(o,h){return h+1<o.length&&r(o,h)}function i(o,h){var d=4;return r(o,h)&&d<=o.length-h}function n(o,h){if(h+1<o.length&&r(o,h)){var d=4,u=f(o,h),s=d;u!=null&&u.frameLength&&(s=u.frameLength);var l=h+s;return l===o.length||c(o,l)}return!1}},"./src/demux/sample-aes.ts":function(N,g,S){"use strict";S.r(g);var k=S("./src/crypt/decrypter.ts"),y=S("./src/demux/tsdemuxer.ts"),m=function(){function C(e,f,r){this.keyData=void 0,this.decrypter=void 0,this.keyData=r,this.decrypter=new k.default(e,f,{removePKCS7Padding:!1})}var _=C.prototype;return _.decryptBuffer=function(f,r){this.decrypter.decrypt(f,this.keyData.key.buffer,this.keyData.iv.buffer,r)},_.decryptAacSample=function(f,r,c,i){var n=f[r].unit,o=n.subarray(16,n.length-n.length%16),h=o.buffer.slice(o.byteOffset,o.byteOffset+o.length),d=this;this.decryptBuffer(h,function(u){var s=new Uint8Array(u);n.set(s,16),i||d.decryptAacSamples(f,r+1,c)})},_.decryptAacSamples=function(f,r,c){for(;;r++){if(r>=f.length){c();return}if(f[r].unit.length<32)continue;var i=this.decrypter.isSync();if(this.decryptAacSample(f,r,c,i),!i)return}},_.getAvcEncryptedData=function(f){for(var r=Math.floor((f.length-48)/160)*16+16,c=new Int8Array(r),i=0,n=32;n<=f.length-16;n+=160,i+=16)c.set(f.subarray(n,n+16),i);return c},_.getAvcDecryptedUnit=function(f,r){for(var c=new Uint8Array(r),i=0,n=32;n<=f.length-16;n+=160,i+=16)f.set(c.subarray(i,i+16),n);return f},_.decryptAvcSample=function(f,r,c,i,n,o){var h=Object(y.discardEPB)(n.data),d=this.getAvcEncryptedData(h),u=this;this.decryptBuffer(d.buffer,function(s){n.data=u.getAvcDecryptedUnit(h,s),o||u.decryptAvcSamples(f,r,c+1,i)})},_.decryptAvcSamples=function(f,r,c,i){if(f instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;r++,c=0){if(r>=f.length){i();return}for(var n=f[r].units;!(c>=n.length);c++){var o=n[c];if(o.data.length<=48||o.type!==1&&o.type!==5)continue;var h=this.decrypter.isSync();if(this.decryptAvcSample(f,r,c,i,o,h),!h)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"),y=S.n(k),m=S("./src/events.ts"),C=S("./src/demux/transmuxer.ts"),_=S("./src/utils/logger.ts"),e=S("./src/errors.ts"),f=S("./src/utils/mediasource-helper.ts"),r=S("./node_modules/eventemitter3/index.js"),c=S.n(r),i=Object(f.getMediaSource)()||{isTypeSupported:function(){return!1}},n=function(){function o(d,u,s,l){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=s,this.onFlush=l;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 L={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 v;try{v=this.worker=k("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),v.addEventListener("message",this.onwmsg),v.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+")")})},v.postMessage({cmd:"init",typeSupported:L,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"),v&&self.URL.revokeObjectURL(v.objectURL),this.transmuxer=new C.default(this.observer,L,b,R,u),this.worker=null}}else this.transmuxer=new C.default(this.observer,L,b,R,u)}var h=o.prototype;return h.destroy=function(){var u=this.worker;if(u)u.removeEventListener("message",this.onwmsg),u.terminate(),this.worker=null;else{var s=this.transmuxer;s&&(s.destroy(),this.transmuxer=null)}var l=this.observer;l&&l.removeAllListeners(),this.observer=null},h.push=function(u,s,l,E,b,p,L,R,v,x){var w=this;v.transmuxing.start=self.performance.now();var T=this.transmuxer,F=this.worker,P=p?p.start:b.start,A=b.decryptdata,z=this.frag,K=!(z&&b.cc===z.cc),O=!(z&&v.level===z.level),B=z?v.sn-z.sn:-1,U=this.part?v.part-this.part.index:1,D=!O&&(B===1||B===0&&U===1),W=self.performance.now();(O||B||b.stats.parsing.start===0)&&(b.stats.parsing.start=W),p&&(U||!D)&&(p.stats.parsing.start=W);var Q=new C.TransmuxState(K,D,R,O,P);if(!D||K){_.logger.log("[transmuxer-interface, "+b.type+"]: Starting new transmux session for sn: "+v.sn+" p: "+v.part+" level: "+v.level+" id: "+v.id+`
discontinuity: `+K+`
trackSwitch: `+O+`
contiguous: `+D+`
accurateTimeOffset: `+R+`
timeOffset: `+P);var re=new C.TransmuxConfig(l,E,s,L,x);this.configureTransmuxer(re)}if(this.frag=b,this.part=p,F)F.postMessage({cmd:"demux",data:u,decryptdata:A,chunkMeta:v,state:Q},u instanceof ArrayBuffer?[u]:[]);else if(T){var ee=T.push(u,A,v,Q);Object(C.isPromise)(ee)?ee.then(function(ye){w.handleTransmuxComplete(ye)}):this.handleTransmuxComplete(ee)}},h.flush=function(u){var s=this;u.transmuxing.start=self.performance.now();var l=this.transmuxer,E=this.worker;if(E)E.postMessage({cmd:"flush",chunkMeta:u});else if(l){var b=l.flush(u);Object(C.isPromise)(b)?b.then(function(p){s.handleFlushResult(p,u)}):this.handleFlushResult(b,u)}},h.handleFlushResult=function(u,s){var l=this;u.forEach(function(E){l.handleTransmuxComplete(E)}),this.onFlush(s)},h.onWorkerMessage=function(u){var s=u.data,l=this.hls;switch(s.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(s.data);break}case"flush":{this.onFlush(s.data);break}default:{s.data=s.data||{},s.data.frag=this.frag,s.data.id=this.id,l.trigger(s.event,s.data);break}}},h.configureTransmuxer=function(u){var s=this.worker,l=this.transmuxer;s?s.postMessage({cmd:"configure",config:u}):l&&l.configure(u)},h.handleTransmuxComplete=function(u){u.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(u)},o}()},"./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"),y=S("./src/events.ts"),m=S("./src/utils/logger.ts"),C=S("./node_modules/eventemitter3/index.js"),_=S.n(C);function e(n){var o=new C.EventEmitter,h=function(u,s){n.postMessage({event:u,data:s})};o.on(y.Events.FRAG_DECRYPTED,h),o.on(y.Events.ERROR,h),n.addEventListener("message",function(d){var u=d.data;switch(u.cmd){case"init":{var s=JSON.parse(u.config);n.transmuxer=new k.default(o,u.typeSupported,s,u.vendor,u.id),Object(m.enableLogs)(s.debug),h("init",null);break}case"configure":{n.transmuxer.configure(u.config);break}case"demux":{var l=n.transmuxer.push(u.data,u.decryptdata,u.chunkMeta,u.state);Object(k.isPromise)(l)?l.then(function(p){f(n,p)}):f(n,l);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 f(n,o){if(i(o.remuxResult))return;var h=[],d=o.remuxResult,u=d.audio,s=d.video;u&&r(h,u),s&&r(h,s),n.postMessage({event:"transmuxComplete",data:o},h)}function r(n,o){o.data1&&n.push(o.data1.buffer),o.data2&&n.push(o.data2.buffer)}function c(n,o,h){o.forEach(function(d){f(n,d)}),n.postMessage({event:"flush",data:h})}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 s}),S.d(g,"isPromise",function(){return b}),S.d(g,"TransmuxConfig",function(){return p}),S.d(g,"TransmuxState",function(){return L});var k=S("./src/events.ts"),y=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"),f=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"),o=S("./src/utils/logger.ts"),h;try{h=self.performance.now.bind(self.performance)}catch(R){o.logger.debug("Unable to use Performance API on this environment"),h=self.Date.now}var d=[{demux:e.default,remux:r.default},{demux:_.default,remux:c.default},{demux:C.default,remux:r.default},{demux:f.default,remux:r.default}],u=1024;d.forEach(function(R){var v=R.demux;u=Math.max(u,v.minProbeByteLength)});var s=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 v=R.prototype;return v.configure=function(w){this.transmuxConfig=w,this.decrypter&&this.decrypter.reset()},v.push=function(w,T,F,P){var A=this,z=F.transmuxing;z.executeStart=h();var K=new Uint8Array(w),O=this.cache,B=this.config,U=this.currentTransmuxState,D=this.transmuxConfig;P&&(this.currentTransmuxState=P);var W=l(K,T);if(W&&W.method==="AES-128"){var Q=this.getDecrypter();if(B.enableSoftwareAES){var re=Q.softwareDecrypt(K,W.key.buffer,W.iv.buffer);if(!re)return z.executeEnd=h(),E(F);K=new Uint8Array(re)}else return this.decryptionPromise=Q.webCryptoDecrypt(K,W.key.buffer,W.iv.buffer).then(function(q){var $=A.push(q,null,F);return A.decryptionPromise=null,$}),this.decryptionPromise}var ee=P||U,ye=ee.contiguous,be=ee.discontinuity,he=ee.trackSwitch,Ie=ee.accurateTimeOffset,Se=ee.timeOffset,fe=D.audioCodec,ue=D.videoCodec,ie=D.defaultInitPts,Ce=D.duration,ne=D.initSegmentData;if((be||he)&&this.resetInitSegment(ne,fe,ue,Ce),be&&this.resetInitialTimestamp(ie),ye||this.resetContiguity(),this.needsProbing(K,be,he)){if(O.dataLength){var ce=O.flush();K=Object(n.appendUint8Array)(ce,K)}this.configureTransmuxer(K,D)}var Ae=this.transmux(K,W,Se,Ie,F),oe=this.currentTransmuxState;return oe.contiguous=!0,oe.discontinuity=!1,oe.trackSwitch=!1,z.executeEnd=h(),Ae},v.flush=function(w){var T=this,F=w.transmuxing;F.executeStart=h();var P=this.decrypter,A=this.cache,z=this.currentTransmuxState,K=this.decryptionPromise;if(K)return K.then(function(){return T.flush(w)});var O=[],B=z.timeOffset;if(P){var U=P.flush();U&&O.push(this.push(U,null,w))}var D=A.dataLength;A.reset();var W=this.demuxer,Q=this.remuxer;if(!W||!Q)return D>=u&&this.observer.emit(k.Events.ERROR,k.Events.ERROR,{type:y.ErrorTypes.MEDIA_ERROR,details:y.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),F.executeEnd=h(),[E(w)];var re=W.flush(B);return b(re)?re.then(function(ee){return T.flushRemux(O,ee,w),O}):(this.flushRemux(O,re,w),O)},v.flushRemux=function(w,T,F){var P=T.audioTrack,A=T.avcTrack,z=T.id3Track,K=T.textTrack,O=this.currentTransmuxState,B=O.accurateTimeOffset,U=O.timeOffset;o.logger.log("[transmuxer.ts]: Flushed fragment "+F.sn+(F.part>-1?" p: "+F.part:"")+" of level "+F.level);var D=this.remuxer.remux(P,A,z,K,U,B,!0,this.id);w.push({remuxResult:D,chunkMeta:F}),F.transmuxing.executeEnd=h()},v.resetInitialTimestamp=function(w){var T=this.demuxer,F=this.remuxer;if(!T||!F)return;T.resetTimeStamp(w),F.resetTimeStamp(w)},v.resetContiguity=function(){var w=this.demuxer,T=this.remuxer;if(!w||!T)return;w.resetContiguity(),T.resetNextTimestamp()},v.resetInitSegment=function(w,T,F,P){var A=this.demuxer,z=this.remuxer;if(!A||!z)return;A.resetInitSegment(T,F,P),z.resetInitSegment(w,T,F)},v.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},v.transmux=function(w,T,F,P,A){var z;return T&&T.method==="SAMPLE-AES"?z=this.transmuxSampleAes(w,T,F,P,A):z=this.transmuxUnencrypted(w,F,P,A),z},v.transmuxUnencrypted=function(w,T,F,P){var A=this.demuxer.demux(w,T,!1,!this.config.progressive),z=A.audioTrack,K=A.avcTrack,O=A.id3Track,B=A.textTrack,U=this.remuxer.remux(z,K,O,B,T,F,!1,this.id);return{remuxResult:U,chunkMeta:P}},v.transmuxSampleAes=function(w,T,F,P,A){var z=this;return this.demuxer.demuxSampleAes(w,T,F).then(function(K){var O=z.remuxer.remux(K.audioTrack,K.avcTrack,K.id3Track,K.textTrack,F,P,!1,z.id);return{remuxResult:O,chunkMeta:A}})},v.configureTransmuxer=function(w,T){for(var F=this.config,P=this.observer,A=this.typeSupported,z=this.vendor,K=T.audioCodec,O=T.defaultInitPts,B=T.duration,U=T.initSegmentData,D=T.videoCodec,W,Q=0,re=d.length;Q<re;Q++)if(d[Q].demux.probe(w)){W=d[Q];break}W||(o.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),W={demux:_.default,remux:c.default});var ee=this.demuxer,ye=this.remuxer,be=W.remux,he=W.demux;(!ye||!(ye instanceof be))&&(this.remuxer=new be(P,F,A,z)),(!ee||!(ee instanceof he))&&(this.demuxer=new he(P,F,A),this.probe=he.probe),this.resetInitSegment(U,K,D,B),this.resetInitialTimestamp(O)},v.needsProbing=function(w,T,F){return!this.demuxer||!this.remuxer||T||F},v.getDecrypter=function(){var w=this.decrypter;return w||(w=this.decrypter=new m.default(this.observer,this.config)),w},R}();function l(R,v){var x=null;return R.byteLength>0&&v!=null&&v.key!=null&&v.iv!==null&&v.method!=null&&(x=v),x}var E=function(v){return{remuxResult:{},chunkMeta:v}};function b(R){return"then"in R&&R.then instanceof Function}var p=function(v,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=v,this.videoCodec=x,this.initSegmentData=w,this.duration=T,this.defaultInitPts=F},L=function(v,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=v,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"),y=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"),f=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(L,R,v){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=L,this.config=R,this.typeSupported=v}b.probe=function(R){var v=b.syncOffset(R);return v<0?!1:(v&&r.logger.warn("MPEG2-TS detected but first sync word found @ offset "+v+", junk ahead ?"),!0)},b.syncOffset=function(R){for(var v=Math.min(1e3,R.length-3*188),x=0;x<v;){if(R[x]===71&&R[x+188]===71&&R[x+2*188]===71)return x;x++}return-1},b.createTrack=function(R,v){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"?v:void 0}};var p=b.prototype;return p.resetInitSegment=function(R,v,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=v,this._duration=x},p.resetTimeStamp=function(){},p.resetContiguity=function(){var R=this._audioTrack,v=this._avcTrack,x=this._id3Track;R&&(R.pesData=null),v&&(v.pesData=null),x&&(x.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},p.demux=function(R,v,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,z=F.pid,K=F.pesData,O=P.pid,B=A.pid,U=P.pesData,D=A.pesData,W=!1,Q=this.pmtParsed,re=this._pmtId,ee=R.length;if(this.remainderData&&(R=Object(f.appendUint8Array)(this.remainderData,R),ee=R.length,this.remainderData=null),ee<188&&!w)return this.remainderData=R,{audioTrack:P,avcTrack:F,id3Track:A,textTrack:this._txtTrack};var ye=Math.max(0,b.syncOffset(R));ee-=(ee+ye)%188,ee<R.byteLength&&!w&&(this.remainderData=new Uint8Array(R.buffer,ee,R.buffer.byteLength-ee));for(var be=ye;be<ee;be+=188)if(R[be]===71){var he=!!(R[be+1]&64),Ie=((R[be+1]&31)<<8)+R[be+2],Se=(R[be+3]&48)>>4,fe=void 0;if(Se>1){if(fe=be+5+R[be+4],fe===be+188)continue}else fe=be+4;switch(Ie){case z:he&&(K&&(T=u(K))&&this.parseAVCPES(T,!1),K={data:[],size:0}),K&&(K.data.push(R.subarray(fe,be+188)),K.size+=be+188-fe);break;case O:he&&(U&&(T=u(U))&&(P.isAAC?this.parseAACPES(T):this.parseMPEGPES(T)),U={data:[],size:0}),U&&(U.data.push(R.subarray(fe,be+188)),U.size+=be+188-fe);break;case B:he&&(D&&(T=u(D))&&this.parseID3PES(T),D={data:[],size:0}),D&&(D.data.push(R.subarray(fe,be+188)),D.size+=be+188-fe);break;case 0:he&&(fe+=R[fe]+1),re=this._pmtId=h(R,fe);break;case re:{he&&(fe+=R[fe]+1);var ue=d(R,fe,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,x);z=ue.avc,z>0&&(F.pid=z),O=ue.audio,O>0&&(P.pid=O,P.isAAC=ue.isAAC),B=ue.id3,B>0&&(A.pid=B),W&&!Q&&(r.logger.log("reparse from beginning"),W=!1,be=ye-188),Q=this.pmtParsed=!0;break}case 17:case 8191:break;default:W=!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=K,P.pesData=U,A.pesData=D;var ie={audioTrack:P,avcTrack:F,id3Track:A,textTrack:this._txtTrack};return w&&this.extractRemainingSamples(ie),ie},p.flush=function(){var R=this.remainderData;this.remainderData=null;var v;return R?v=this.demux(R,-1,!1,!0):v={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(v),this.sampleAes?this.decrypt(v,this.sampleAes):v},p.extractRemainingSamples=function(R){var v=R.audioTrack,x=R.avcTrack,w=R.id3Track,T=x.pesData,F=v.pesData,P=w.pesData,A;T&&(A=u(T))?(this.parseAVCPES(A,!0),x.pesData=null):x.pesData=T,F&&(A=u(F))?(v.isAAC?this.parseAACPES(A):this.parseMPEGPES(A),v.pesData=null):(F!=null&&F.size&&r.logger.log("last AAC PES packet truncated,might overlap between fragments"),v.pesData=F),P&&(A=u(P))?(this.parseID3PES(A),w.pesData=null):w.pesData=P},p.demuxSampleAes=function(R,v,x){var w=this.demux(R,x,!0,!this.config.progressive),T=this.sampleAes=new _.default(this.observer,this.config,v);return this.decrypt(w,T)},p.decrypt=function(R,v){return new Promise(function(x){var w=R.audioTrack,T=R.avcTrack;w.samples&&w.isAAC?v.decryptAacSamples(w.samples,0,function(){T.samples?v.decryptAvcSamples(T.samples,0,0,function(){x(R)}):x(R)}):T.samples&&v.decryptAvcSamples(T.samples,0,0,function(){x(R)})})},p.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},p.parseAVCPES=function(R,v){var x=this,w=this._avcTrack,T=this.parseAVCNALu(R.data),F=!1,P=this.avcSample,A,z=!1;R.data=null,P&&T.length&&!w.audFound&&(s(P,w),P=this.avcSample=o(!1,R.pts,R.dts,"")),T.forEach(function(K){switch(K.type){case 1:{A=!0,P||(P=x.avcSample=o(!0,R.pts,R.dts,"")),F&&(P.debug+="NDR "),P.frame=!0;var O=K.data;if(z&&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=o(!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(K.data));U.readUByte();for(var D=0,W=0,Q=!1,re=0;!Q&&U.bytesAvailable>1;){D=0;do re=U.readUByte(),D+=re;while(re===255);W=0;do re=U.readUByte(),W+=re;while(re===255);if(D===4&&U.bytesAvailable!==0){Q=!0;var ee=U.readUByte();if(ee===181){var ye=U.readUShort();if(ye===49){var be=U.readUInt();if(be===1195456820){var he=U.readUByte();if(he===3){for(var Ie=U.readUByte(),Se=U.readUByte(),fe=31&Ie,ue=[Ie,Se],ie=0;ie<fe;ie++)ue.push(U.readUByte()),ue.push(U.readUByte()),ue.push(U.readUByte());l(x._txtTrack.samples,{type:3,pts:R.pts,bytes:ue})}}}}}else if(D===5&&U.bytesAvailable!==0){if(Q=!0,W>16){for(var Ce=[],ne=0;ne<16;ne++)Ce.push(U.readUByte().toString(16)),(ne===3||ne===5||ne===7||ne===9)&&Ce.push("-");for(var ce=W-16,Ae=new Uint8Array(ce),oe=0;oe<ce;oe++)Ae[oe]=U.readUByte();l(x._txtTrack.samples,{pts:R.pts,payloadType:D,uuid:Ce.join(""),userData:Object(C.utf8ArrayToStr)(Ae),userDataBytes:Ae})}}else if(W<U.bytesAvailable)for(var q=0;q<W;q++)U.readUByte()}break}case 7:if(A=!0,z=!0,F&&P&&(P.debug+="SPS "),!w.sps){var $=new m.default(K.data),X=$.readSPS();w.width=X.width,w.height=X.height,w.pixelRatio=X.pixelRatio,w.sps=[K.data],w.duration=x._duration;for(var de=K.data.subarray(1,4),pe="avc1.",xe=0;xe<3;xe++){var Ke=de[xe].toString(16);Ke.length<2&&(Ke="0"+Ke),pe+=Ke}w.codec=pe}break;case 8:A=!0,F&&P&&(P.debug+="PPS "),w.pps||(w.pps=[K.data]);break;case 9:A=!1,w.audFound=!0,P&&s(P,w),P=x.avcSample=o(!1,R.pts,R.dts,F?"AUD ":"");break;case 12:A=!1;break;default:A=!1,P&&(P.debug+="unknown NAL "+K.type+" ");break}if(P&&A){var qe=P.units;qe.push(K)}}),v&&P&&(s(P,w),this.avcSample=null)},p.getLastNalUnit=function(){var R,v=this.avcSample,x;if(!v||v.units.length===0){var w=this._avcTrack.samples;v=w[w.length-1]}if((R=v)!==null&&R!==void 0&&R.units){var T=v.units;x=T[T.length-1]}return x},p.parseAVCNALu=function(R){var v=R.byteLength,x=this._avcTrack,w=x.naluState||0,T=w,F=[],P=0,A,z,K,O=-1,B=0;for(w===-1&&(O=0,B=R[0]&31,w=0,P=1);P<v;){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 D=this.getLastNalUnit();if(D&&(T&&P<=4-T&&(D.state&&(D.data=D.data.subarray(0,D.data.byteLength-T))),z=P-w-1,z>0)){var W=new Uint8Array(D.data.byteLength+z);W.set(D.data,0),W.set(R.subarray(0,z),D.data.byteLength),D.data=W,D.state=0}}P<v?(K=R[P]&31,O=P,B=K,w=0):w=-1}else w=0}if(O>=0&&w>=0){var Q={data:R.subarray(O,v),type:B,state:w};F.push(Q)}if(F.length===0){var re=this.getLastNalUnit();if(re){var ee=new Uint8Array(re.data.byteLength+R.byteLength);ee.set(re.data,0),ee.set(R,re.data.byteLength),re.data=ee}}return x.naluState=w,F},p.parseAACPES=function(R){var v=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),v=w.missing}var z,K;for(z=v,K=T.length;z<K-1&&!k.isHeader(T,z);z++);if(z!==v){var O,B;if(z<K-1?(O="AAC PES did not start with ADTS header,offset:"+z,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,z,this.audioCodec);var U;if(R.pts!==void 0)U=R.pts;else if(w){var D=k.getFrameDuration(x.samplerate);U=w.sample.pts+D}else{r.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var W=0;z<K;)if(k.isHeader(T,z)){if(z+5<K){var Q=k.appendFrame(x,T,z,U,W);if(Q)if(Q.missing)this.aacOverFlow=Q;else{z+=Q.length,W++;continue}}break}else z++},p.parseMPEGPES=function(R){var v=R.data,x=v.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(y.isHeader(v,T)){var P=y.appendFrame(this._audioTrack,v,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 o(b,p,L,R){return{key:b,frame:!1,pts:p,dts:L,units:[],debug:R,length:0}}function h(b,p){return(b[p+10]&31)<<8|b[p+11]}function d(b,p,L,R){var v={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:v.audio===-1&&(v.audio=F);break;case 21:v.id3===-1&&(v.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:v.avc===-1&&(v.avc=F);break;case 3:case 4:L?v.audio===-1&&(v.audio=F,v.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 v}function u(b){var p=0,L,R,v,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)}L=T[0];var P=(L[0]<<16)+(L[1]<<8)+L[2];if(P===1){if(R=(L[4]<<8)+L[5],R&&R>b.size-6)return null;var A=L[7];A&192&&(x=(L[9]&14)*536870912+(L[10]&255)*4194304+(L[11]&254)*16384+(L[12]&255)*128+(L[13]&254)/2,A&64?(w=(L[14]&14)*536870912+(L[15]&255)*4194304+(L[16]&254)*16384+(L[17]&255)*128+(L[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),v=L[8];var z=v+9;if(b.size<=z)return null;b.size-=z;for(var K=new Uint8Array(b.size),O=0,B=T.length;O<B;O++){L=T[O];var U=L.byteLength;if(z)if(z>U){z-=U;continue}else L=L.subarray(z),U-=z,z=0;K.set(L,p),p+=U}return R&&(R-=v+3),{data:K,pts:x,dts:w,len:R}}return null}function s(b,p){if(b.units.length&&b.frame){if(b.pts===void 0){var L=p.samples,R=L.length;if(R){var v=L[R-1];b.pts=v.pts,b.dts=v.dts}else{p.dropped++;return}}p.samples.push(b)}b.debug.length&&r.logger.log(b.pts+"/"+b.dts+":"+b.debug)}function l(b,p){var L=b.length;if(L>0){if(p.pts>=b[L-1].pts)b.push(p);else for(var R=L-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,L=[],R=1;R<p-2;)b[R]===0&&b[R+1]===0&&b[R+2]===3?(L.push(R+2),R+=2):R++;if(L.length===0)return b;var v=p-L.length,x=new Uint8Array(v),w=0;for(R=0;R<v;w++,R++)w===L[0]&&(w++,L.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 y});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 y;(function(m){m.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",m.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",m.KEY_SYSTEM_NO_SESSION="keySystemNoSession",m.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",m.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",m.MANIFEST_LOAD_ERROR="manifestLoadError",m.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",m.MANIFEST_PARSING_ERROR="manifestParsingError",m.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",m.LEVEL_EMPTY_ERROR="levelEmptyError",m.LEVEL_LOAD_ERROR="levelLoadError",m.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",m.LEVEL_SWITCH_ERROR="levelSwitchError",m.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",m.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",m.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",m.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",m.FRAG_LOAD_ERROR="fragLoadError",m.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",m.FRAG_DECRYPT_ERROR="fragDecryptError",m.FRAG_PARSING_ERROR="fragParsingError",m.REMUX_ALLOC_ERROR="remuxAllocError",m.KEY_LOAD_ERROR="keyLoadError",m.KEY_LOAD_TIMEOUT="keyLoadTimeOut",m.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",m.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",m.BUFFER_APPEND_ERROR="bufferAppendError",m.BUFFER_APPENDING_ERROR="bufferAppendingError",m.BUFFER_STALLED_ERROR="bufferStalledError",m.BUFFER_FULL_ERROR="bufferFullError",m.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",m.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",m.INTERNAL_EXCEPTION="internalException",m.INTERNAL_ABORTED="aborted",m.UNKNOWN="unknown"})(y||(y={}))},"./src/events.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"Events",function(){return k});var k;(function(y){y.MEDIA_ATTACHING="hlsMediaAttaching",y.MEDIA_ATTACHED="hlsMediaAttached",y.MEDIA_DETACHING="hlsMediaDetaching",y.MEDIA_DETACHED="hlsMediaDetached",y.BUFFER_RESET="hlsBufferReset",y.BUFFER_CODECS="hlsBufferCodecs",y.BUFFER_CREATED="hlsBufferCreated",y.BUFFER_APPENDING="hlsBufferAppending",y.BUFFER_APPENDED="hlsBufferAppended",y.BUFFER_EOS="hlsBufferEos",y.BUFFER_FLUSHING="hlsBufferFlushing",y.BUFFER_FLUSHED="hlsBufferFlushed",y.MANIFEST_LOADING="hlsManifestLoading",y.MANIFEST_LOADED="hlsManifestLoaded",y.MANIFEST_PARSED="hlsManifestParsed",y.LEVEL_SWITCHING="hlsLevelSwitching",y.LEVEL_SWITCHED="hlsLevelSwitched",y.LEVEL_LOADING="hlsLevelLoading",y.LEVEL_LOADED="hlsLevelLoaded",y.LEVEL_UPDATED="hlsLevelUpdated",y.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",y.LEVELS_UPDATED="hlsLevelsUpdated",y.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",y.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",y.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",y.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",y.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",y.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",y.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",y.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",y.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",y.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",y.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",y.CUES_PARSED="hlsCuesParsed",y.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",y.INIT_PTS_FOUND="hlsInitPtsFound",y.FRAG_LOADING="hlsFragLoading",y.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",y.FRAG_LOADED="hlsFragLoaded",y.FRAG_DECRYPTED="hlsFragDecrypted",y.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",y.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",y.FRAG_PARSING_METADATA="hlsFragParsingMetadata",y.FRAG_PARSED="hlsFragParsed",y.FRAG_BUFFERED="hlsFragBuffered",y.FRAG_CHANGED="hlsFragChanged",y.FPS_DROP="hlsFpsDrop",y.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",y.ERROR="hlsError",y.DESTROYING="hlsDestroying",y.KEY_LOADING="hlsKeyLoading",y.KEY_LOADED="hlsKeyLoaded",y.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",y.BACK_BUFFER_REACHED="hlsBackBufferReached"})(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"),y=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"),f=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"),o=S("./src/config.ts"),h=S("./node_modules/eventemitter3/index.js"),d=S.n(h),u=S("./src/events.ts"),s=S("./src/errors.ts");function l(p,L){for(var R=0;R<L.length;R++){var v=L[R];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(p,v.key,v)}}function E(p,L,R){return L&&l(p.prototype,L),R&&l(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 h.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 v=this.config=Object(o.mergeConfig)(p.DefaultConfig,R);this.userConfig=R,Object(n.enableLogs)(v.debug),this._autoLevelCapping=-1,v.progressive&&Object(o.enableStreamingMode)(v);var x=v.abrController,w=v.bufferController,T=v.capLevelController,F=v.fpsController,P=this.abrController=new x(this),A=this.bufferController=new w(this),z=this.capLevelController=new T(this),K=new F(this),O=new m.default(this),B=new C.default(this),U=new _.default(this),D=this.levelController=new f.default(this),W=new r.FragmentTracker(this),Q=this.streamController=new c.default(this,W);z.setStreamController(Q),K.setStreamController(Q);var re=[D,Q];this.networkControllers=re;var ee=[O,B,P,A,z,K,U,W];this.audioTrackController=this.createController(v.audioTrackController,null,re),this.createController(v.audioStreamController,W,re),this.subtitleTrackController=this.createController(v.subtitleTrackController,null,re),this.createController(v.subtitleStreamController,W,re),this.createController(v.timelineController,null,ee),this.emeController=this.createController(v.emeController,null,ee),this.cmcdController=this.createController(v.cmcdController,null,ee),this.latencyController=this.createController(e.default,null,ee),this.coreComponents=ee}var L=p.prototype;return L.createController=function(v,x,w){if(v){var T=x?new v(this,x):new v(this);return w&&w.push(T),T}return null},L.on=function(v,x,w){w===void 0&&(w=this),this._emitter.on(v,x,w)},L.once=function(v,x,w){w===void 0&&(w=this),this._emitter.once(v,x,w)},L.removeAllListeners=function(v){this._emitter.removeAllListeners(v)},L.off=function(v,x,w,T){w===void 0&&(w=this),this._emitter.off(v,x,w,T)},L.listeners=function(v){return this._emitter.listeners(v)},L.emit=function(v,x,w){return this._emitter.emit(v,x,w)},L.trigger=function(v,x){if(this.config.debug)return this.emit(v,v,x);try{return this.emit(v,v,x)}catch(w){n.logger.error("An internal error happened while handling event "+v+'. Error message: "'+w.message+'". Here is a stacktrace:',w),this.trigger(u.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:v,error:w})}return!1},L.listenerCount=function(v){return this._emitter.listenerCount(v)},L.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(v){return v.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(v){return v.destroy()}),this.coreComponents.length=0},L.attachMedia=function(v){n.logger.log("attachMedia"),this._media=v,this.trigger(u.Events.MEDIA_ATTACHING,{media:v})},L.detachMedia=function(){n.logger.log("detachMedia"),this.trigger(u.Events.MEDIA_DETACHING,void 0),this._media=null},L.loadSource=function(v){this.stopLoad();var x=this.media,w=this.url,T=this.url=k.buildAbsoluteURL(self.location.href,v,{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:v})},L.startLoad=function(v){v===void 0&&(v=-1),n.logger.log("startLoad("+v+")"),this.networkControllers.forEach(function(x){x.startLoad(v)})},L.stopLoad=function(){n.logger.log("stopLoad"),this.networkControllers.forEach(function(v){v.stopLoad()})},L.swapAudioCodec=function(){n.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},L.recoverMediaError=function(){n.logger.log("recoverMediaError");var v=this._media;this.detachMedia(),v&&this.attachMedia(v)},L.removeLevel=function(v,x){x===void 0&&(x=0),this.levelController.removeLevel(v,x)},E(p,[{key:"levels",get:function(){var v=this.levelController.levels;return v||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(v){n.logger.log("set currentLevel:"+v),this.loadLevel=v,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(v){n.logger.log("set nextLevel:"+v),this.levelController.manualLevel=v,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(v){n.logger.log("set loadLevel:"+v),this.levelController.manualLevel=v}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(v){this.levelController.nextLoadLevel=v}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(v){n.logger.log("set firstLevel:"+v),this.levelController.firstLevel=v}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(v){n.logger.log("set startLevel:"+v),v!==-1&&(v=Math.max(v,this.minAutoLevel)),this.levelController.startLevel=v}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(v){var x=!!v;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(v){this._autoLevelCapping!==v&&(n.logger.log("set autoLevelCapping:"+v),this._autoLevelCapping=v)}},{key:"bandwidthEstimate",get:function(){var v=this.abrController.bwEstimator;return v?v.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var v=this.levels,x=this.config.minAutoBitrate;if(!v)return 0;for(var w=v.length,T=0;T<w;T++)if(v[T].maxBitrate>x)return T;return 0}},{key:"maxAutoLevel",get:function(){var v=this.levels,x=this.autoLevelCapping,w;return x===-1&&v&&v.length?w=v.length-1:w=x,w}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(v){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,v)}},{key:"audioTracks",get:function(){var v=this.audioTrackController;return v?v.audioTracks:[]}},{key:"audioTrack",get:function(){var v=this.audioTrackController;return v?v.audioTrack:-1},set:function(v){var x=this.audioTrackController;x&&(x.audioTrack=v)}},{key:"subtitleTracks",get:function(){var v=this.subtitleTrackController;return v?v.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var v=this.subtitleTrackController;return v?v.subtitleTrack:-1},set:function(v){var x=this.subtitleTrackController;x&&(x.subtitleTrack=v)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var v=this.subtitleTrackController;return v?v.subtitleDisplay:!1},set:function(v){var x=this.subtitleTrackController;x&&(x.subtitleDisplay=v)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(v){this.config.lowLatencyMode=v}},{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 s.ErrorTypes}},{key:"ErrorDetails",get:function(){return s.ErrorDetails}},{key:"DefaultConfig",get:function(){return p.defaultConfig?p.defaultConfig:o.hlsDefaultConfig},set:function(v){p.defaultConfig=v}}]),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 y(){return self.SourceBuffer||self.WebKitSourceBuffer}function m(){var _=Object(k.getMediaSource)();if(!_)return!1;var e=y(),f=_&&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!!f&&!!r}function C(){var _,e=y();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 h});var k=S("./src/polyfills/number.ts"),y=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(l){if(l===null||!f(l))return l;if(typeof l!="function")throw new TypeError("Super expression must either be null or a function");if(typeof u!="undefined"){if(u.has(l))return u.get(l);u.set(l,E)}function E(){return _(l,arguments,c(this).constructor)}return E.prototype=Object.create(l.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),r(E,l)},C(d)}function _(d,u,s){return e()?_=Reflect.construct:_=function(E,b,p){var L=[null];L.push.apply(L,b);var R=Function.bind.apply(E,L),v=new R;return p&&r(v,p.prototype),v},_.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 f(d){return Function.toString.call(d).indexOf("[native code]")!==-1}function r(d,u){return r=Object.setPrototypeOf||function(l,E){return l.__proto__=E,l},r(d,u)}function c(d){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(s){return s.__proto__||Object.getPrototypeOf(s)},c(d)}var i=Math.pow(2,17),n=function(){function d(s){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=s}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(l,E){var b=this,p=l.url;if(!p)return Promise.reject(new h({type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:l,networkDetails:null},"Fragment does not have a "+(p?"part list":"url")));this.abort();var L=this.config,R=L.fLoader,v=L.loader;return new Promise(function(x,w){b.loader&&b.loader.destroy();var T=b.loader=l.loader=R?new R(L):new v(L),F=o(l),P={timeout:L.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:L.fragLoadingMaxRetryTimeout,highWaterMark:i};l.stats=T.stats,T.load(F,P,{onSuccess:function(z,K,O,B){b.resetLoader(l,T),x({frag:l,part:null,payload:z.data,networkDetails:B})},onError:function(z,K,O){b.resetLoader(l,T),w(new h({type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:l,response:z,networkDetails:O}))},onAbort:function(z,K,O){b.resetLoader(l,T),w(new h({type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:l,networkDetails:O}))},onTimeout:function(z,K,O){b.resetLoader(l,T),w(new h({type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:l,networkDetails:O}))},onProgress:function(z,K,O,B){E&&E({frag:l,part:null,payload:O,networkDetails:B})}})})},u.loadPart=function(l,E,b){var p=this;this.abort();var L=this.config,R=L.fLoader,v=L.loader;return new Promise(function(x,w){p.loader&&p.loader.destroy();var T=p.loader=l.loader=R?new R(L):new v(L),F=o(l,E),P={timeout:L.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:L.fragLoadingMaxRetryTimeout,highWaterMark:i};E.stats=T.stats,T.load(F,P,{onSuccess:function(z,K,O,B){p.resetLoader(l,T),p.updateStatsFromPart(l,E);var U={frag:l,part:E,payload:z.data,networkDetails:B};b(U),x(U)},onError:function(z,K,O){p.resetLoader(l,T),w(new h({type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:l,part:E,response:z,networkDetails:O}))},onAbort:function(z,K,O){l.stats.aborted=E.stats.aborted,p.resetLoader(l,T),w(new h({type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:l,part:E,networkDetails:O}))},onTimeout:function(z,K,O){p.resetLoader(l,T),w(new h({type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:l,part:E,networkDetails:O}))}})})},u.updateStatsFromPart=function(l,E){var b=l.stats,p=E.stats,L=p.total;if(b.loaded+=p.loaded,L){var R=Math.round(l.duration/E.duration),v=Math.min(Math.round(b.loaded/L),R),x=R-v,w=x*Math.round(b.loaded/v);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(l,E){l.loader=null,this.loader===E&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),E.destroy()},d}();function o(d,u){u===void 0&&(u=null);var s=u||d,l={frag:d,part:u,responseType:"arraybuffer",url:s.url,headers:{},rangeStart:0,rangeEnd:0},E=s.byteRangeStartOffset,b=s.byteRangeEndOffset;return Object(k.isFiniteNumber)(E)&&Object(k.isFiniteNumber)(b)&&(l.rangeStart=E,l.rangeEnd=b),l}var h=function(d){m(u,d);function u(s){for(var l,E=arguments.length,b=new Array(E>1?E-1:0),p=1;p<E;p++)b[p-1]=arguments[p];return l=d.call.apply(d,[this].concat(b))||this,l.data=void 0,l.data=s,l}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 o}),S.d(g,"Fragment",function(){return h}),S.d(g,"Part",function(){return d});var k=S("./src/polyfills/number.ts"),y=S("./node_modules/url-toolkit/src/url-toolkit.js"),m=S.n(y),C=S("./src/utils/logger.ts"),_=S("./src/loader/level-key.ts"),e=S("./src/loader/load-stats.ts");function f(u,s){u.prototype=Object.create(s.prototype),u.prototype.constructor=u,r(u,s)}function r(u,s){return r=Object.setPrototypeOf||function(E,b){return E.__proto__=b,E},r(u,s)}function c(u,s){for(var l=0;l<s.length;l++){var E=s[l];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(u,E.key,E)}}function i(u,s,l){return s&&c(u.prototype,s),l&&c(u,l),u}var n;(function(u){u.AUDIO="audio",u.VIDEO="video",u.AUDIOVIDEO="audiovideo"})(n||(n={}));var o=function(){function u(l){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=l}var s=u.prototype;return s.setByteRange=function(E,b){var p=E.split("@",2),L=[];p.length===1?L[0]=b?b.byteRangeEndOffset:0:L[0]=parseInt(p[1]),L[1]=parseInt(p[0])+L[0],this._byteRange=L},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(y.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(E){this._url=E}}]),u}(),h=function(u){f(s,u);function s(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 l=s.prototype;return l.createInitializationVector=function(b){for(var p=new Uint8Array(16),L=12;L<16;L++)p[L]=b>>8*(15-L)&255;return p},l.setDecryptDataFromLevelKey=function(b,p){var L=b;return(b==null?void 0:b.method)==="AES-128"&&b.uri&&!b.iv&&(L=_.LevelKey.fromURI(b.uri),L.method=b.method,L.iv=this.createInitializationVector(p),L.keyFormat="identity"),L},l.setElementaryStreamInfo=function(b,p,L,R,v,x){x===void 0&&(x=!1);var w=this.elementaryStreams,T=w[b];if(!T){w[b]={startPTS:p,endPTS:L,startDTS:R,endDTS:v,partial:x};return}T.startPTS=Math.min(T.startPTS,p),T.endPTS=Math.max(T.endPTS,L),T.startDTS=Math.min(T.startDTS,R),T.endDTS=Math.max(T.endDTS,v)},l.clearElementaryStreamInfo=function(){var b=this.elementaryStreams;b[n.AUDIO]=null,b[n.VIDEO]=null,b[n.AUDIOVIDEO]=null},i(s,[{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)}}]),s}(o),d=function(u){f(s,u);function s(l,E,b,p,L){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=l.decimalFloatingPoint("DURATION"),R.gap=l.bool("GAP"),R.independent=l.bool("INDEPENDENT"),R.relurl=l.enumeratedString("URI"),R.fragment=E,R.index=p;var v=l.enumeratedString("BYTERANGE");return v&&R.setByteRange(v,L),L&&(R.fragOffset=L.fragOffset+L.duration),R}return i(s,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var E=this.elementaryStreams;return!!(E.audio||E.video||E.audiovideo)}}]),s}(o)},"./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"),y=S("./src/errors.ts"),m=S("./src/utils/logger.ts"),C=function(){function _(f){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=f,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,o=this.loaders[n];if(!i.decryptdata){m.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var h=i.decryptdata.uri;if(h!==this.decrypturl||this.decryptkey===null){var d=this.hls.config;if(o&&(m.logger.warn("abort previous key loader for type:"+n),o.abort()),!h){m.logger.warn("key uri is falsy");return}var u=d.loader,s=i.loader=this.loaders[n]=new u(d);this.decrypturl=h,this.decryptkey=null;var l={url:h,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)};s.load(l,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:y.ErrorTypes.NETWORK_ERROR,details:y.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:y.ErrorTypes.NETWORK_ERROR,details:y.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 y(e,f){for(var r=0;r<f.length;r++){var c=f[r];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(e,c.key,c)}}function m(e,f,r){return f&&y(e.prototype,f),r&&y(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 f=e.prototype;return f.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"),y=S.n(k);function m(e,f){for(var r=0;r<f.length;r++){var c=f[r];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(e,c.key,c)}}function C(e,f,r){return f&&m(e.prototype,f),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(f,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)(f,r,{alwaysNormalize:!0}):this._uri=f}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 s});var k=S("./src/polyfills/number.ts"),y=S("./node_modules/url-toolkit/src/url-toolkit.js"),m=S.n(y),C=S("./src/loader/fragment.ts"),_=S("./src/loader/level-details.ts"),e=S("./src/loader/level-key.ts"),f=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,o=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),h=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(L){var R,v;return d.test((R=(v=y.parseURL(L))===null||v===void 0?void 0:v.path)!=null?R:"")}var s=function(){function L(){}return L.findGroup=function(v,x){for(var w=0;w<v.length;w++){var T=v[w];if(T.id===x)return T}},L.convertAVC1ToAVCOTI=function(v){var x=v.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 v},L.resolve=function(v,x){return y.buildAbsoluteURL(x,v,{alwaysNormalize:!0})},L.parseMasterPlaylist=function(v,x){var w=[],T={},F=!1;i.lastIndex=0;for(var P;(P=i.exec(v))!=null;)if(P[1]){var A=new f.AttrList(P[1]),z={attrs:A,bitrate:A.decimalInteger("AVERAGE-BANDWIDTH")||A.decimalInteger("BANDWIDTH"),name:A.NAME,url:L.resolve(P[2],x)},K=A.decimalResolution("RESOLUTION");K&&(z.width=K.width,z.height=K.height),l((A.CODECS||"").split(/[ ,]+/).filter(function(B){return B}),z),z.videoCodec&&z.videoCodec.indexOf("avc1")!==-1&&(z.videoCodec=L.convertAVC1ToAVCOTI(z.videoCodec)),w.push(z)}else if(P[3]){var O=new f.AttrList(P[3]);O["DATA-ID"]&&(F=!0,T[O["DATA-ID"]]=O)}return{levels:w,sessionData:F?T:null}},L.parseMasterPlaylistMedia=function(v,x,w,T){T===void 0&&(T=[]);var F,P=[],A=0;for(n.lastIndex=0;(F=n.exec(v))!==null;){var z=new f.AttrList(F[1]);if(z.TYPE===w){var K={attrs:z,bitrate:0,id:A++,groupId:z["GROUP-ID"],instreamId:z["INSTREAM-ID"],name:z.NAME||z.LANGUAGE||"",type:w,default:z.bool("DEFAULT"),autoselect:z.bool("AUTOSELECT"),forced:z.bool("FORCED"),lang:z.LANGUAGE,url:z.URI?L.resolve(z.URI,x):""};if(T.length){var O=L.findGroup(T,K.groupId)||T[0];E(K,O,"audioCodec"),E(K,O,"textCodec")}P.push(K)}}return P},L.parseLevelPlaylist=function(v,x,w,T,F){var P=new _.LevelDetails(x),A=P.fragments,z=null,K=0,O=0,B=0,U=0,D=null,W=new C.Fragment(T,x),Q,re,ee,ye=-1,be=!1;for(o.lastIndex=0,P.m3u8=v;(Q=o.exec(v))!==null;){be&&(be=!1,W=new C.Fragment(T,x),W.start=B,W.sn=K,W.cc=U,W.level=w,z&&(W.initSegment=z,W.rawProgramDateTime=z.rawProgramDateTime));var he=Q[1];if(he){W.duration=parseFloat(he);var Ie=(" "+Q[2]).slice(1);W.title=Ie||null,W.tagList.push(Ie?["INF",he,Ie]:["INF",he])}else if(Q[3])Object(k.isFiniteNumber)(W.duration)&&(W.start=B,ee&&(W.levelkey=ee),W.sn=K,W.level=w,W.cc=U,W.urlId=F,A.push(W),W.relurl=(" "+Q[3]).slice(1),p(W,D),D=W,B+=W.duration,K++,O=0,be=!0);else if(Q[4]){var Se=(" "+Q[4]).slice(1);D?W.setByteRange(Se,D):W.setByteRange(Se)}else if(Q[5])W.rawProgramDateTime=(" "+Q[5]).slice(1),W.tagList.push(["PROGRAM-DATE-TIME",W.rawProgramDateTime]),ye===-1&&(ye=A.length);else{if(Q=Q[0].match(h),!Q){r.logger.warn("No matches on slow regex match for level playlist!");continue}for(re=1;re<Q.length&&!(typeof Q[re]!="undefined");re++);var fe=(" "+Q[re]).slice(1),ue=(" "+Q[re+1]).slice(1),ie=Q[re+2]?(" "+Q[re+2]).slice(1):"";switch(fe){case"PLAYLIST-TYPE":P.type=ue.toUpperCase();break;case"MEDIA-SEQUENCE":K=P.startSN=parseInt(ue);break;case"SKIP":{var Ce=new f.AttrList(ue),ne=Ce.decimalInteger("SKIPPED-SEGMENTS");if(Object(k.isFiniteNumber)(ne)){P.skippedSegments=ne;for(var ce=ne;ce--;)A.unshift(null);K+=ne}var Ae=Ce.enumeratedString("RECENTLY-REMOVED-DATERANGES");Ae&&(P.recentlyRemovedDateranges=Ae.split(" "));break}case"TARGETDURATION":P.targetduration=parseFloat(ue);break;case"VERSION":P.version=parseInt(ue);break;case"EXTM3U":break;case"ENDLIST":P.live=!1;break;case"#":(ue||ie)&&W.tagList.push(ie?[ue,ie]:[ue]);break;case"DIS":U++;case"GAP":W.tagList.push([fe]);break;case"BITRATE":W.tagList.push([fe,ue]);break;case"DISCONTINUITY-SEQ":U=parseInt(ue);break;case"KEY":{var oe,q=new f.AttrList(ue),$=q.enumeratedString("METHOD"),X=q.URI,de=q.hexadecimalInteger("IV"),pe=q.enumeratedString("KEYFORMATVERSIONS"),xe=q.enumeratedString("KEYID"),Ke=(oe=q.enumeratedString("KEYFORMAT"))!=null?oe:"identity",qe=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(qe.indexOf(Ke)>-1){r.logger.warn("Keyformat "+Ke+" is not supported from the manifest");continue}else if(Ke!=="identity")continue;$&&(ee=e.LevelKey.fromURL(x,X),X&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf($)>=0&&(ee.method=$,ee.keyFormat=Ke,xe&&(ee.keyID=xe),pe&&(ee.keyFormatVersions=pe),ee.iv=de));break}case"START":{var tt=new f.AttrList(ue),et=tt.decimalFloatingPoint("TIME-OFFSET");Object(k.isFiniteNumber)(et)&&(P.startTimeOffset=et);break}case"MAP":{var it=new f.AttrList(ue);W.relurl=it.URI,it.BYTERANGE&&W.setByteRange(it.BYTERANGE),W.level=w,W.sn="initSegment",ee&&(W.levelkey=ee),W.initSegment=null,z=W,be=!0;break}case"SERVER-CONTROL":{var at=new f.AttrList(ue);P.canBlockReload=at.bool("CAN-BLOCK-RELOAD"),P.canSkipUntil=at.optionalFloat("CAN-SKIP-UNTIL",0),P.canSkipDateRanges=P.canSkipUntil>0&&at.bool("CAN-SKIP-DATERANGES"),P.partHoldBack=at.optionalFloat("PART-HOLD-BACK",0),P.holdBack=at.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var je=new f.AttrList(ue);P.partTarget=je.decimalFloatingPoint("PART-TARGET");break}case"PART":{var De=P.partList;De||(De=P.partList=[]);var nt=O>0?De[De.length-1]:void 0,lt=O++,Ve=new C.Part(new f.AttrList(ue),W,x,lt,nt);De.push(Ve),W.duration+=Ve.duration;break}case"PRELOAD-HINT":{var Qe=new f.AttrList(ue);P.preloadHint=Qe;break}case"RENDITION-REPORT":{var Fe=new f.AttrList(ue);P.renditionReports=P.renditionReports||[],P.renditionReports.push(Fe);break}default:r.logger.warn("line parsed but not handled: "+Q);break}}}D&&!D.relurl?(A.pop(),B-=D.duration,P.partList&&(P.fragmentHint=D)):P.partList&&(p(W,D),W.cc=U,P.fragmentHint=W);var Re=A.length,Me=A[0],Ee=A[Re-1];if(B+=P.skippedSegments*P.targetduration,B>0&&Re&&Ee){P.averagetargetduration=B/Re;var Oe=Ee.sn;P.endSN=Oe!=="initSegment"?Oe:0,Me&&(P.startCC=Me.cc,Me.initSegment||P.fragments.every(function(ke){return ke.relurl&&u(ke.relurl)})&&(r.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),W=new C.Fragment(T,x),W.relurl=Ee.relurl,W.level=w,W.sn="initSegment",Me.initSegment=W,P.needSidxRanges=!0))}else P.endSN=0,P.startCC=0;return P.fragmentHint&&(B+=P.fragmentHint.duration),P.totalduration=B,P.endCC=U,ye>0&&b(A,ye),P},L}();function l(L,R){["video","audio","text"].forEach(function(v){var x=L.filter(function(T){return Object(c.isCodecType)(T,v)});if(x.length){var w=x.filter(function(T){return T.lastIndexOf("avc1",0)===0||T.lastIndexOf("mp4a",0)===0});R[v+"Codec"]=w.length>0?w[0]:x[0],L=L.filter(function(T){return x.indexOf(T)===-1})}}),R.unknownCodecs=L}function E(L,R,v){var x=R[v];x&&(L[v]=x)}function b(L,R){for(var v=L[R],x=R;x--;){var w=L[x];if(!w)return;w.programDateTime=v.programDateTime-w.duration*1e3,v=w}}function p(L,R){L.rawProgramDateTime?L.programDateTime=Date.parse(L.rawProgramDateTime):R!=null&&R.programDateTime&&(L.programDateTime=R.endProgramDateTime),Object(k.isFiniteNumber)(L.programDateTime)||(L.programDateTime=null,L.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(N,g,S){"use strict";S.r(g);var k=S("./src/polyfills/number.ts"),y=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"),f=S("./src/types/loader.ts"),r=S("./src/utils/attr-list.ts");function c(o){var h=o.type;switch(h){case f.PlaylistContextType.AUDIO_TRACK:return f.PlaylistLevelType.AUDIO;case f.PlaylistContextType.SUBTITLE_TRACK:return f.PlaylistLevelType.SUBTITLE;default:return f.PlaylistLevelType.MAIN}}function i(o,h){var d=o.url;return(d===void 0||d.indexOf("data:")===0)&&(d=h.url),d}var n=function(){function o(d){this.hls=void 0,this.loaders=Object.create(null),this.hls=d,this.registerListeners()}var h=o.prototype;return h.registerListeners=function(){var u=this.hls;u.on(y.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.on(y.Events.LEVEL_LOADING,this.onLevelLoading,this),u.on(y.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),u.on(y.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},h.unregisterListeners=function(){var u=this.hls;u.off(y.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.off(y.Events.LEVEL_LOADING,this.onLevelLoading,this),u.off(y.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),u.off(y.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},h.createInternalLoader=function(u){var s=this.hls.config,l=s.pLoader,E=s.loader,b=l||E,p=new b(s);return u.loader=p,this.loaders[u.type]=p,p},h.getInternalLoader=function(u){return this.loaders[u.type]},h.resetInternalLoader=function(u){this.loaders[u]&&delete this.loaders[u]},h.destroyInternalLoaders=function(){for(var u in this.loaders){var s=this.loaders[u];s&&s.destroy(),this.resetInternalLoader(u)}},h.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},h.onManifestLoading=function(u,s){var l=s.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:f.PlaylistContextType.MANIFEST,url:l,deliveryDirectives:null})},h.onLevelLoading=function(u,s){var l=s.id,E=s.level,b=s.url,p=s.deliveryDirectives;this.load({id:l,groupId:null,level:E,responseType:"text",type:f.PlaylistContextType.LEVEL,url:b,deliveryDirectives:p})},h.onAudioTrackLoading=function(u,s){var l=s.id,E=s.groupId,b=s.url,p=s.deliveryDirectives;this.load({id:l,groupId:E,level:null,responseType:"text",type:f.PlaylistContextType.AUDIO_TRACK,url:b,deliveryDirectives:p})},h.onSubtitleTrackLoading=function(u,s){var l=s.id,E=s.groupId,b=s.url,p=s.deliveryDirectives;this.load({id:l,groupId:E,level:null,responseType:"text",type:f.PlaylistContextType.SUBTITLE_TRACK,url:b,deliveryDirectives:p})},h.load=function(u){var s,l=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,L,R,v;switch(u.type){case f.PlaylistContextType.MANIFEST:p=l.manifestLoadingMaxRetry,L=l.manifestLoadingTimeOut,R=l.manifestLoadingRetryDelay,v=l.manifestLoadingMaxRetryTimeout;break;case f.PlaylistContextType.LEVEL:case f.PlaylistContextType.AUDIO_TRACK:case f.PlaylistContextType.SUBTITLE_TRACK:p=0,L=l.levelLoadingTimeOut;break;default:p=l.levelLoadingMaxRetry,L=l.levelLoadingTimeOut,R=l.levelLoadingRetryDelay,v=l.levelLoadingMaxRetryTimeout;break}if(E=this.createInternalLoader(u),(s=u.deliveryDirectives)!==null&&s!==void 0&&s.part){var x;if(u.type===f.PlaylistContextType.LEVEL&&u.level!==null?x=this.hls.levels[u.level].details:u.type===f.PlaylistContextType.AUDIO_TRACK&&u.id!==null?x=this.hls.audioTracks[u.id].details:u.type===f.PlaylistContextType.SUBTITLE_TRACK&&u.id!==null&&(x=this.hls.subtitleTracks[u.id].details),x){var w=x.partTarget,T=x.targetduration;w&&T&&(L=Math.min(Math.max(w*3,T*.8)*1e3,L))}}var F={timeout:L,maxRetry:p,retryDelay:R,maxRetryDelay:v,highWaterMark:0},P={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};E.load(u,F,P)},h.loadsuccess=function(u,s,l,E){if(E===void 0&&(E=null),l.isSidxRequest){this.handleSidxRequest(u,l),this.handlePlaylistLoaded(u,s,l,E);return}this.resetInternalLoader(l.type);var b=u.data;if(b.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(u,l,"no EXTM3U delimiter",E);return}s.parsing.start=performance.now(),b.indexOf("#EXTINF:")>0||b.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(u,s,l,E):this.handleMasterPlaylist(u,s,l,E)},h.loaderror=function(u,s,l){l===void 0&&(l=null),this.handleNetworkError(s,l,!1,u)},h.loadtimeout=function(u,s,l){l===void 0&&(l=null),this.handleNetworkError(s,l,!0)},h.handleMasterPlaylist=function(u,s,l,E){var b=this.hls,p=u.data,L=i(u,l),R=e.default.parseMasterPlaylist(p,L),v=R.levels,x=R.sessionData;if(!v.length){this.handleManifestParsingError(u,l,"no level found in manifest",E);return}var w=v.map(function(K){return{id:K.attrs.AUDIO,audioCodec:K.audioCodec}}),T=v.map(function(K){return{id:K.attrs.SUBTITLES,textCodec:K.textCodec}}),F=e.default.parseMasterPlaylistMedia(p,L,"AUDIO",w),P=e.default.parseMasterPlaylistMedia(p,L,"SUBTITLES",T),A=e.default.parseMasterPlaylistMedia(p,L,"CLOSED-CAPTIONS");if(F.length){var z=F.some(function(K){return!K.url});!z&&v[0].audioCodec&&!v[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(y.Events.MANIFEST_LOADED,{levels:v,audioTracks:F,subtitles:P,captions:A,url:L,stats:s,networkDetails:E,sessionData:x})},h.handleTrackOrLevelPlaylist=function(u,s,l,E){var b=this.hls,p=l.id,L=l.level,R=l.type,v=i(u,l),x=Object(k.isFiniteNumber)(p)?p:0,w=Object(k.isFiniteNumber)(L)?L:x,T=c(l),F=e.default.parseLevelPlaylist(u.data,v,w,T,x);if(!F.fragments.length){b.trigger(y.Events.ERROR,{type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:v,reason:"no fragments found in level",level:typeof l.level=="number"?l.level:void 0});return}if(R===f.PlaylistContextType.MANIFEST){var P={attrs:new r.AttrList({}),bitrate:0,details:F,name:"",url:v};b.trigger(y.Events.MANIFEST_LOADED,{levels:[P],audioTracks:[],url:v,stats:s,networkDetails:E,sessionData:null})}if(s.parsing.end=performance.now(),F.needSidxRanges){var A,z=(A=F.fragments[0].initSegment)===null||A===void 0?void 0:A.url;this.load({url:z,isSidxRequest:!0,type:R,level:L,levelDetails:F,id:p,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}l.levelDetails=F,this.handlePlaylistLoaded(u,s,l,E)},h.handleSidxRequest=function(u,s){var l=Object(_.parseSegmentIndex)(new Uint8Array(u.data));if(!l)return;var E=l.references,b=s.levelDetails;E.forEach(function(p,L){var R=p.info,v=b.fragments[L];v.byteRange.length===0&&v.setByteRange(String(1+R.end-R.start)+"@"+String(R.start)),v.initSegment&&v.initSegment.setByteRange(String(l.moovEndOffset)+"@0")})},h.handleManifestParsingError=function(u,s,l,E){this.hls.trigger(y.Events.ERROR,{type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:s.type===f.PlaylistContextType.MANIFEST,url:u.url,reason:l,response:u,context:s,networkDetails:E})},h.handleNetworkError=function(u,s,l,E){l===void 0&&(l=!1),C.logger.warn("[playlist-loader]: A network "+(l?"timeout":"error")+" occurred while loading "+u.type+" level: "+u.level+" id: "+u.id+' group-id: "'+u.groupId+'"');var b=m.ErrorDetails.UNKNOWN,p=!1,L=this.getInternalLoader(u);switch(u.type){case f.PlaylistContextType.MANIFEST:b=l?m.ErrorDetails.MANIFEST_LOAD_TIMEOUT:m.ErrorDetails.MANIFEST_LOAD_ERROR,p=!0;break;case f.PlaylistContextType.LEVEL:b=l?m.ErrorDetails.LEVEL_LOAD_TIMEOUT:m.ErrorDetails.LEVEL_LOAD_ERROR,p=!1;break;case f.PlaylistContextType.AUDIO_TRACK:b=l?m.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:m.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,p=!1;break;case f.PlaylistContextType.SUBTITLE_TRACK:b=l?m.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:m.ErrorDetails.SUBTITLE_LOAD_ERROR,p=!1;break}L&&this.resetInternalLoader(u.type);var R={type:m.ErrorTypes.NETWORK_ERROR,details:b,fatal:p,url:u.url,loader:L,context:u,networkDetails:s};E&&(R.response=E),this.hls.trigger(y.Events.ERROR,R)},h.handlePlaylistLoaded=function(u,s,l,E){var b=l.type,p=l.level,L=l.id,R=l.groupId,v=l.loader,x=l.levelDetails,w=l.deliveryDirectives;if(!(x!=null&&x.targetduration)){this.handleManifestParsingError(u,l,"invalid target duration",E);return}if(!v)return;x.live&&(v.getCacheAge&&(x.ageHeader=v.getCacheAge()||0),(!v.getCacheAge||isNaN(x.ageHeader))&&(x.ageHeader=0));switch(b){case f.PlaylistContextType.MANIFEST:case f.PlaylistContextType.LEVEL:this.hls.trigger(y.Events.LEVEL_LOADED,{details:x,level:p||0,id:L||0,stats:s,networkDetails:E,deliveryDirectives:w});break;case f.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(y.Events.AUDIO_TRACK_LOADED,{details:x,id:L||0,groupId:R||"",stats:s,networkDetails:E,deliveryDirectives:w});break;case f.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(y.Events.SUBTITLE_TRACK_LOADED,{details:x,id:L||0,groupId:R||"",stats:s,networkDetails:E,deliveryDirectives:w});break}},o}();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 y});var k=Number.isFinite||function(m){return typeof m=="number"&&isFinite(m)},y=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(N,g,S){"use strict";S.r(g);var k=function(){function y(){}return y.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},y}();g.default=k},"./src/remux/mp4-generator.ts":function(N,g,S){"use strict";S.r(g);var k=Math.pow(2,32)-1,y=function(){function m(){}return m.init=function(){m.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var _;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]),f=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:f};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]),o=new Uint8Array([0,0,0,1]);m.FTYP=m.box(m.types.ftyp,i,o,i,n),m.DINF=m.box(m.types.dinf,m.box(m.types.dref,r))},m.box=function(_){for(var e=8,f=arguments.length,r=new Array(f>1?f-1:0),c=1;c<f;c++)r[c-1]=arguments[c];for(var i=r.length,n=i;i--;)e+=r[i].byteLength;var o=new Uint8Array(e);for(o[0]=e>>24&255,o[1]=e>>16&255,o[2]=e>>8&255,o[3]=e&255,o.set(_,4),i=0,e=8;i<n;i++)o.set(r[i],e),e+=r[i].byteLength;return o},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 f=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,f>>24,f>>16&255,f>>8&255,f&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,f){return m.box(m.types.moof,m.mfhd(_),m.traf(f,e))},m.moov=function(_){for(var e=_.length,f=[];e--;)f[e]=m.trak(_[e]);return m.box.apply(null,[m.types.moov,m.mvhd(_[0].timescale,_[0].duration)].concat(f).concat(m.mvex(_)))},m.mvex=function(_){for(var e=_.length,f=[];e--;)f[e]=m.trex(_[e]);return m.box.apply(null,[m.types.mvex].concat(f))},m.mvhd=function(_,e){e*=_;var f=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,f>>24,f>>16&255,f>>8&255,f&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||[],f=new Uint8Array(4+e.length),r,c;for(r=0;r<e.length;r++)c=e[r].flags,f[r+4]=c.dependsOn<<4|c.isDependedOn<<2|c.hasRedundancy;return m.box(m.types.sdtp,f)},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=[],f=[],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,f.push(i>>>8&255),f.push(i&255),f=f.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(f))),o=_.width,h=_.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,o>>8&255,o&255,h>>8&255,h&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,f=_.duration*_.timescale,r=_.width,c=_.height,i=Math.floor(f/(k+1)),n=Math.floor(f%(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 f=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(_,f.length+16+20+8+16+8+8),f)},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 f=_.samples||[],r=f.length,c=12+16*r,i=new Uint8Array(c),n,o,h,d,u,s;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++)o=f[n],h=o.duration,d=o.size,u=o.flags,s=o.cts,i.set([h>>>24&255,h>>>16&255,h>>>8&255,h&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,s>>>24&255,s>>>16&255,s>>>8&255,s&255],12+16*n);return m.box(m.types.trun,i)},m.initSegment=function(_){m.types||m.init();var e=m.moov(_),f=new Uint8Array(m.FTYP.byteLength+e.byteLength);return f.set(m.FTYP),f.set(e,m.FTYP.byteLength),f},m}();y.types=void 0,y.HDLR_TYPES=void 0,y.STTS=void 0,y.STSC=void 0,y.STCO=void 0,y.STSZ=void 0,y.VMHD=void 0,y.SMHD=void 0,y.STSD=void 0,y.FTYP=void 0,y.DINF=void 0,g.default=y},"./src/remux/mp4-remuxer.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"default",function(){return s}),S.d(g,"normalizePts",function(){return l});var k=S("./src/polyfills/number.ts"),y=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"),f=S("./src/types/loader.ts"),r=S("./src/utils/timescale-conversion.ts");function c(){return c=Object.assign||function(L){for(var R=1;R<arguments.length;R++){var v=arguments[R];for(var x in v)Object.prototype.hasOwnProperty.call(v,x)&&(L[x]=v[x])}return L},c.apply(this,arguments)}var i=10*1e3,n=1024,o=1152,h=null,d=null,u=!1,s=function(){function L(v,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=v,this.config=x,this.typeSupported=w,this.ISGenerated=!1,h===null){var F=navigator.userAgent||"",P=F.match(/Chrome\/(\d+)/i);h=P?parseInt(P[1]):0}if(d===null){var A=navigator.userAgent.match(/Safari\/(\d+)/i);d=A?parseInt(A[1]):0}u=!!h&&h<75||!!d&&d<600}var R=L.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,l(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,z,K){var O,B,U,D,W,Q,re=P,ee=P,ye=x.pid>-1,be=w.pid>-1,he=w.samples.length,Ie=x.samples.length>0,Se=he>1,fe=(!ye||Ie)&&(!be||Se)||this.ISGenerated||z;if(fe){this.ISGenerated||(U=this.generateIS(x,w,P));var ue=this.isVideoContiguous,ie=-1;if(Se&&(ie=E(w.samples),!ue&&this.config.forceKeyFrameOnDiscontinuity))if(Q=!0,ie>0){e.logger.warn("[mp4-remuxer]: Dropped "+ie+" out of "+he+" video samples due to a missing keyframe");var Ce=this.getVideoStartPts(w.samples);w.samples=w.samples.slice(ie),w.dropped+=ie,ee+=(w.samples[0].pts-Ce)/(w.timescale||9e4)}else ie===-1&&(e.logger.warn("[mp4-remuxer]: No keyframe found out of "+he+" video samples"),Q=!1);if(this.ISGenerated){if(Ie&&Se){var ne=this.getVideoStartPts(w.samples),ce=l(x.samples[0].pts,ne)-ne,Ae=ce/w.inputTimeScale;re+=Math.max(0,Ae),ee+=Math.max(0,-Ae)}if(Ie){if(x.samplerate||(e.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),U=this.generateIS(x,w,P)),B=this.remuxAudio(x,re,this.isAudioContiguous,A,be||Se||K===f.PlaylistLevelType.AUDIO?ee:void 0),Se){var oe=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,ee,ue,oe)}}else Se&&(O=this.remuxVideo(w,ee,ue,0));O&&(O.firstKeyFrame=ie,O.independent=ie!==-1)}}return this.ISGenerated&&(T.samples.length&&(W=this.remuxID3(T,P)),F.samples.length&&(D=this.remuxText(F,P))),{audio:B,video:O,initSegment:U,independent:Q,text:D,id3:W}},R.generateIS=function(x,w,T){var F=x.samples,P=w.samples,A=this.typeSupported,z={},K=!Object(k.isFiniteNumber)(this._initPTS),O="audio/mp4",B,U,D;if(K&&(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")),z.audio={id:"audio",container:O,codec:x.codec,initSegment:!x.isAAC&&A.mpeg?new Uint8Array(0):m.default.initSegment([x]),metadata:{channelCount:x.channelCount}},K&&(D=x.inputTimeScale,B=U=F[0].pts-Math.round(D*T))),w.sps&&w.pps&&P.length&&(w.timescale=w.inputTimeScale,z.video={id:"main",container:"video/mp4",codec:w.codec,initSegment:m.default.initSegment([w]),metadata:{width:w.width,height:w.height}},K)){D=w.inputTimeScale;var W=this.getVideoStartPts(P),Q=Math.round(D*T);U=Math.min(U,l(P[0].dts,W)-Q),B=Math.min(B,W-Q)}if(Object.keys(z).length)return this.ISGenerated=!0,K&&(this._initPTS=B,this._initDTS=U),{tracks:z,initPTS:B,timescale:D}},R.remuxVideo=function(x,w,T,F){var P=x.inputTimeScale,A=x.samples,z=[],K=A.length,O=this._initPTS,B=this.nextAvcDts,U=8,D,W,Q,re=Number.POSITIVE_INFINITY,ee=Number.NEGATIVE_INFINITY,ye=0,be=!1;if(!T||B===null){var he=w*P,Ie=A[0].pts-l(A[0].dts,A[0].pts);B=he-Ie}for(var Se=0;Se<K;Se++){var fe=A[Se];if(fe.pts=l(fe.pts-O,B),fe.dts=l(fe.dts-O,B),fe.dts>fe.pts){var ue=9e4*.2;ye=Math.max(Math.min(ye,fe.pts-fe.dts),-1*ue)}fe.dts<A[Se>0?Se-1:Se].dts&&(be=!0)}be&&A.sort(function(Dt,At){var bt=Dt.dts-At.dts,Xt=Dt.pts-At.pts;return bt||Xt}),W=A[0].dts,Q=A[A.length-1].dts;var ie=Math.round((Q-W)/(K-1));if(ye<0){if(ye<ie*-2){e.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(r.toMsFromMpegTsClock)(-ie,!0)+" ms");for(var Ce=ye,ne=0;ne<K;ne++)A[ne].dts=Ce=Math.max(Ce,A[ne].pts-ie),A[ne].pts=Math.max(Ce,A[ne].pts)}else{e.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(r.toMsFromMpegTsClock)(ye,!0)+" ms to overcome this issue");for(var ce=0;ce<K;ce++)A[ce].dts=A[ce].dts+ye}W=A[0].dts}if(T){var Ae=W-B,oe=Ae>ie,q=Ae<-1;if(oe||q){oe?e.logger.warn("AVC: "+Object(r.toMsFromMpegTsClock)(Ae,!0)+" ms ("+Ae+"dts) hole between fragments detected, filling it"):e.logger.warn("AVC: "+Object(r.toMsFromMpegTsClock)(-Ae,!0)+" ms ("+Ae+"dts) overlapping between fragments detected"),W=B;var $=A[0].pts-Ae;A[0].dts=W,A[0].pts=$,e.logger.log("Video: First PTS/DTS adjusted: "+Object(r.toMsFromMpegTsClock)($,!0)+"/"+Object(r.toMsFromMpegTsClock)(W,!0)+", delta: "+Object(r.toMsFromMpegTsClock)(Ae,!0)+" ms")}}u&&(W=Math.max(0,W));for(var X=0,de=0,pe=0;pe<K;pe++){for(var xe=A[pe],Ke=xe.units,qe=Ke.length,tt=0,et=0;et<qe;et++)tt+=Ke[et].data.length;de+=tt,X+=qe,xe.length=tt,xe.dts=Math.max(xe.dts,W),xe.pts=Math.max(xe.pts,xe.dts,0),re=Math.min(xe.pts,re),ee=Math.max(xe.pts,ee)}Q=A[K-1].dts;var it=de+4*X+8,at;try{at=new Uint8Array(it)}catch(Dt){this.observer.emit(C.Events.ERROR,C.Events.ERROR,{type:_.ErrorTypes.MUX_ERROR,details:_.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:it,reason:"fail allocating video mdat "+it});return}var je=new DataView(at.buffer);je.setUint32(0,it),at.set(m.default.types.mdat,4);for(var De=0;De<K;De++){for(var nt=A[De],lt=nt.units,Ve=0,Qe=0,Fe=lt.length;Qe<Fe;Qe++){var Re=lt[Qe],Me=Re.data,Ee=Re.data.byteLength;je.setUint32(U,Ee),U+=4,at.set(Me,U),U+=Ee,Ve+=4+Ee}if(De<K-1)D=A[De+1].dts-nt.dts;else{var Oe=this.config,ke=nt.dts-A[De>0?De-1:De].dts;if(Oe.stretchShortVideoTrack&&this.nextAudioPts!==null){var Ne=Math.floor(Oe.maxBufferHole*P),He=(F?re+F*P:this.nextAudioPts)-nt.pts;He>Ne?(D=He-ke,D<0&&(D=ke),e.logger.log("[mp4-remuxer]: It is approximately "+He/90+" ms to the next segment; using duration "+D/90+" ms for the last video frame.")):D=ke}else D=ke}var rt=Math.round(nt.pts-nt.dts);z.push(new b(nt.key,D,Ve,rt))}if(z.length&&h&&h<70){var ct=z[0].flags;ct.dependsOn=2,ct.isNonSync=0}console.assert(D!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=B=Q+D,this.isVideoContiguous=!0;var yt=m.default.moof(x.sequenceNumber++,W,c({},x,{samples:z})),ht="video",pt={data1:yt,data2:at,startPTS:re/P,endPTS:(ee+D)/P,startDTS:W/P,endDTS:B/P,type:ht,hasAudio:!1,hasVideo:!0,nb:z.length,dropped:x.dropped};return x.samples=[],x.dropped=0,console.assert(at.length,"MDAT length must not be zero"),pt},R.remuxAudio=function(x,w,T,F,P){var A=x.inputTimeScale,z=x.samplerate?x.samplerate:A,K=A/z,O=x.isAAC?n:o,B=O*K,U=this._initPTS,D=!x.isAAC&&this.typeSupported.mpeg,W=[],Q=x.samples,re=D?0:8,ee=this.nextAudioPts||-1,ye=w*A;if(this.isAudioContiguous=T=T||Q.length&&ee>0&&(F&&Math.abs(ye-ee)<9e3||Math.abs(l(Q[0].pts-U,ye)-ee)<20*B),Q.forEach(function(Me){Me.pts=l(Me.pts-U,ye)}),!T||ee<0){if(Q=Q.filter(function(Me){return Me.pts>=0}),!Q.length)return;P===0?ee=0:F?ee=Math.max(0,ye):ee=Q[0].pts}if(x.isAAC)for(var be=P!==void 0,he=this.config.maxAudioFramesDrift,Ie=0,Se=ee;Ie<Q.length;Ie++){var fe=Q[Ie],ue=fe.pts,ie=ue-Se,Ce=Math.abs(1e3*ie/A);if(ie<=-he*B&&be)Ie===0&&(e.logger.warn("Audio frame @ "+(ue/A).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*ie/A)+" ms."),this.nextAudioPts=ee=Se=ue);else if(ie>=he*B&&Ce<i&&be){var ne=Math.round(ie/B);Se=ue-ne*B,Se<0&&(ne--,Se+=B),Ie===0&&(this.nextAudioPts=ee=Se),e.logger.warn("[mp4-remuxer]: Injecting "+ne+" audio frame @ "+(Se/A).toFixed(3)+"s due to "+Math.round(1e3*ie/A)+" ms gap.");for(var ce=0;ce<ne;ce++){var Ae=Math.max(Se,0),oe=y.default.getSilentFrame(x.manifestCodec||x.codec,x.channelCount);oe||(e.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),oe=fe.unit.subarray()),Q.splice(Ie,0,{unit:oe,pts:Ae}),Se+=B,Ie++}}fe.pts=Se,Se+=B}for(var q=null,$=null,X,de=0,pe=Q.length;pe--;)de+=Q[pe].unit.byteLength;for(var xe=0,Ke=Q.length;xe<Ke;xe++){var qe=Q[xe],tt=qe.unit,et=qe.pts;if($!==null){var it=W[xe-1];it.duration=Math.round((et-$)/K)}else if(T&&x.isAAC&&(et=ee),q=et,de>0){de+=re;try{X=new Uint8Array(de)}catch(Me){this.observer.emit(C.Events.ERROR,C.Events.ERROR,{type:_.ErrorTypes.MUX_ERROR,details:_.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:de,reason:"fail allocating audio mdat "+de});return}if(!D){var at=new DataView(X.buffer);at.setUint32(0,de),X.set(m.default.types.mdat,4)}}else return;X.set(tt,re);var je=tt.byteLength;re+=je,W.push(new b(!0,O,je,0)),$=et}var De=W.length;if(!De)return;var nt=W[W.length-1];this.nextAudioPts=ee=$+K*nt.duration;var lt=D?new Uint8Array(0):m.default.moof(x.sequenceNumber++,q/K,c({},x,{samples:W}));x.samples=[];var Ve=q/A,Qe=ee/A,Fe="audio",Re={data1:lt,data2:X,startPTS:Ve,endPTS:Qe,startDTS:Ve,endDTS:Qe,type:Fe,hasAudio:!0,hasVideo:!1,nb:De};return this.isAudioContiguous=!0,console.assert(X.length,"MDAT length must not be zero"),Re},R.remuxEmptyAudio=function(x,w,T,F){var P=x.inputTimeScale,A=x.samplerate?x.samplerate:P,z=P/A,K=this.nextAudioPts,O=(K!==null?K:F.startDTS*P)+this._initDTS,B=F.endDTS*P+this._initDTS,U=z*n,D=Math.ceil((B-O)/U),W=y.default.getSilentFrame(x.manifestCodec||x.codec,x.channelCount);if(e.logger.warn("[mp4-remuxer]: remux empty Audio"),!W){e.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var Q=[],re=0;re<D;re++){var ee=O+re*U;Q.push({unit:W,pts:ee,dts:ee})}return x.samples=Q,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,z=0;z<T;z++){var K=x.samples[z];K.pts=l(K.pts-P,w*F)/F,K.dts=l(K.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 z=x.samples[A];z.pts=l(z.pts-P,w*F)/F}x.samples.sort(function(O,B){return O.pts-B.pts});var K=x.samples;return x.samples=[],{samples:K}},L}();function l(L,R){var v;if(R===null)return L;for(R<L?v=-8589934592:v=8589934592;Math.abs(L-R)>4294967296;)L+=v;return L}function E(L){for(var R=0;R<L.length;R++)if(L[R].key)return R;return-1}var b=function(R,v,x,w){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=v,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"),y=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,o,h){this.audioCodec=o,this.videoCodec=h,this.generateInitSegment(n),this.emitInitSegment=!0},c.generateInitSegment=function(n){var o=this.audioCodec,h=this.videoCodec;if(!n||!n.byteLength){this.initTracks=void 0,this.initData=void 0;return}var d=this.initData=Object(y.parseInitSegment)(n);o||(o=f(d.audio,m.ElementaryStreamTypes.AUDIO)),h||(h=f(d.video,m.ElementaryStreamTypes.VIDEO));var u={};d.audio&&d.video?u.audiovideo={container:"video/mp4",codec:o+","+h,initSegment:n,id:"main"}:d.audio?u.audio={container:"audio/mp4",codec:o,initSegment:n,id:"audio"}:d.video?u.video={container:"video/mp4",codec:h,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,o,h,d,u){var s=this.initPTS,l=this.lastEndDTS,E={audio:void 0,video:void 0,text:d,id3:h,initSegment:void 0};Object(k.isFiniteNumber)(l)||(l=this.lastEndDTS=u||0);var b=o.samples;if(!b||!b.length)return E;var p={initPTS:void 0,timescale:1},L=this.initData;if((!L||!L.length)&&(this.generateInitSegment(b),L=this.initData),!L||!L.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)(s)||(this.initPTS=p.initPTS=s=e(L,b,l));var R=Object(y.getDuration)(b,L),v=l,x=R+v;Object(y.offsetStartDTS)(L,b,s),R>0?this.lastEndDTS=x:(C.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var w=!!L.audio,T=!!L.video,F="";w&&(F+="audio"),T&&(F+="video");var P={data1:b,startPTS:v,startDTS:v,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=h,E.initSegment=p,E},r}(),e=function(c,i,n){return Object(y.getStartDTS)(c,i)-n};function f(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 y(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var m=y.prototype;return m.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},m.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},m.onHandlerDestroyed=function(){},m.hasInterval=function(){return!!this._tickInterval},m.hasNextTick=function(){return!!this._tickTimer},m.setInterval=function(_){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(){},y}()},"./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 y}),S.d(g,"CMCDStreamingFormat",function(){return m}),S.d(g,"CMCDStreamType",function(){return C});var k=1,y;(function(_){_.MANIFEST="m",_.AUDIO="a",_.VIDEO="v",_.MUXED="av",_.INIT="i",_.CAPTION="c",_.TIMED_TEXT="tt",_.KEY="k",_.OTHER="o"})(y||(y={}));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(f,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(f,i.key,i)}}function y(f,r,c){return r&&k(f.prototype,r),c&&k(f,c),f}var m;(function(f){f.No="",f.Yes="YES",f.v2="v2"})(m||(m={}));function C(f,r){var c=f.canSkipUntil,i=f.canSkipDateRanges,n=f.endSN,o=r!==void 0?r-n:0;return c&&o<c?i?m.v2:m.Yes:m.No}var _=function(){function f(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=f.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()},f}(),e=function(){function f(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 y(f,[{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)}}]),f}()},"./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 y});var k;(function(m){m.MANIFEST="manifest",m.LEVEL="level",m.AUDIO_TRACK="audioTrack",m.SUBTITLE_TRACK="subtitleTrack"})(k||(k={}));var y;(function(m){m.MAIN="main",m.AUDIO="audio",m.SUBTITLE="subtitle"})(y||(y={}))},"./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,f,r,c){f===void 0&&(f=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=y(),this.buffering={audio:y(),video:y(),audiovideo:y()},this.level=C,this.sn=_,this.id=e,this.size=f,this.part=r,this.partial=c};function y(){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+)$/,y=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,m=function(){function C(e){typeof e=="string"&&(e=C.parseAttrList(e));for(var f in e)e.hasOwnProperty(f)&&(this[f]=e[f])}var _=C.prototype;return _.decimalInteger=function(f){var r=parseInt(this[f],10);return r>Number.MAX_SAFE_INTEGER?Infinity:r},_.hexadecimalInteger=function(f){if(this[f]){var r=(this[f]||"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(f){var r=parseInt(this[f],16);return r>Number.MAX_SAFE_INTEGER?Infinity:r},_.decimalFloatingPoint=function(f){return parseFloat(this[f])},_.optionalFloat=function(f,r){var c=this[f];return c?parseFloat(c):r},_.enumeratedString=function(f){return this[f]},_.bool=function(f){return this[f]==="YES"},_.decimalResolution=function(f){var r=k.exec(this[f]);return r===null?void 0:{width:parseInt(r[1],10),height:parseInt(r[2],10)}},C.parseAttrList=function(f){var r,c={},i='"';for(y.lastIndex=0;(r=y.exec(f))!==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,f=null,r=null;_<=e;){f=(_+e)/2|0,r=m[f];var c=C(r);if(c>0)_=f+1;else if(c<0)e=f-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"),y={length:0,start:function(){return 0},end:function(){return 0}},m=function(){function C(){}return C.isBuffered=function(e,f){try{if(e){for(var r=C.getBuffered(e),c=0;c<r.length;c++)if(f>=r.start(c)&&f<=r.end(c))return!0}}catch(i){}return!1},C.bufferInfo=function(e,f,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,f,r)}}catch(o){}return{len:0,start:f,end:f,nextStart:void 0}},C.bufferedInfo=function(e,f,r){f=Math.max(0,f),e.sort(function(p,L){var R=p.start-L.start;return R||L.end-p.end});var c=[];if(r)for(var i=0;i<e.length;i++){var n=c.length;if(n){var o=c[n-1].end;e[i].start-o<r?e[i].end>o&&(c[n-1].end=e[i].end):c.push(e[i])}else c.push(e[i])}else c=e;for(var h=0,d,u=f,s=f,l=0;l<c.length;l++){var E=c[l].start,b=c[l].end;if(f+r>=E&&f<b)u=E,s=b,h=s-f;else if(f+r<E){d=E;break}}return{len:h,start:u||0,end:s||0,nextStart:d}},C.getBuffered=function(e){try{return e.buffered}catch(f){return k.logger.log("failed to get media.buffered",f),y}},C}()},"./src/utils/cea-608-parser.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"Row",function(){return s}),S.d(g,"CaptionScreen",function(){return l});var k=S("./src/utils/logger.ts"),y={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},m=function(x){var w=x;return y.hasOwnProperty(x)&&(w=y[x]),String.fromCharCode(w)},C=15,_=100,e={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},f={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(v){v[v.ERROR=0]="ERROR",v[v.TEXT=1]="TEXT",v[v.WARNING=2]="WARNING",v[v.INFO=2]="INFO",v[v.DEBUG=3]="DEBUG",v[v.DATA=3]="DATA"})(n||(n={}));var o=function(){function v(){this.time=null,this.verboseLevel=n.ERROR}var x=v.prototype;return x.log=function(T,F){this.verboseLevel>=T&&k.logger.log(this.time+" ["+T+"] "+F)},v}(),h=function(x){for(var w=[],T=0;T<x.length;T++)w.push(x[T].toString(16));return w},d=function(){function v(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=v.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},v}(),u=function(){function v(w,T,F,P,A,z){this.uchar=void 0,this.penState=void 0,this.uchar=w||" ",this.penState=new d(T,F,P,A,z)}var x=v.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()},v}(),s=function(){function v(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=v.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)},v}(),l=function(){function v(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 s(w));this.logger=w,this.currRow=C-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var x=v.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,z=this.lastOutputScreen;if(z){var K=z.rows[A].cueStartTime,O=this.logger.time;if(K&&O!==null&&K<O)for(var B=0;B<this.nrRollUpRows;B++)this.rows[F-this.nrRollUpRows+B+1].copy(z.rows[A+B])}}this.currRow=F;var U=this.rows[this.currRow];if(T.indent!==null){var D=T.indent,W=Math.max(D-1,0);U.setCursor(T.indent),T.color=U.chars[W].penState.foreground}var Q={foreground:T.color,underline:T.underline,italics:T.italics,background:"black",flash:!1};this.setPen(Q)},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,z=0;z<C;z++){var K=this.rows[z].getTextString();K&&(A=z+1,T?F.push("Row "+A+": '"+K+"'"):F.push(K.trim()))}return F.length>0&&(T?P="["+F.join(" | ")+"]":P=F.join(`
`)),P},x.getTextAndFormat=function(){return this.rows},v}(),E=function(){function v(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 l(F),this.nonDisplayedMemory=new l(F),this.lastOutputScreen=new l(F),this.currRollUpRow=this.displayedMemory.rows[C-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=F}var x=v.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))},v}(),b=function(){function v(w,T,F){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var P=new o;this.channels=[null,new E(w,T,P),new E(w+1,F,P)],this.cmdHistory=R(),this.logger=P}var x=v.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,z,K=!1;this.logger.time=T;for(var O=0;O<F.length;O+=2){if(A=F[O]&127,z=F[O+1]&127,A===0&&z===0)continue;if(this.logger.log(n.DATA,"["+h([F[O],F[O+1]])+"] -> ("+h([A,z])+")"),P=this.parseCmd(A,z),P||(P=this.parseMidrow(A,z)),P||(P=this.parsePAC(A,z)),P||(P=this.parseBackgroundAttributes(A,z)),!P&&(K=this.parseChars(A,z),K)){var B=this.currentChannel;if(B&&B>0){var U=this.channels[B];U.insertChars(K)}else this.logger.log(n.WARNING,"No channel found yet. TEXT-MODE?")}!P&&!K&&this.logger.log(n.WARNING,"Couldn't parse cleaned data "+h([A,z])+" orig: "+h([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,z=(T===23||T===31)&&F>=33&&F<=35;if(!(A||z))return!1;if(L(T,F,P))return p(null,null,P),this.logger.log(n.DEBUG,"Repeated command ("+h([T,F])+") is dropped"),!0;var K=T===20||T===21||T===23?1:2,O=this.channels[K];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=K,!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 ("+h([T,F])+")"),!0):!1}return!1},x.parsePAC=function(T,F){var P,A=this.cmdHistory,z=(T>=17&&T<=23||T>=25&&T<=31)&&F>=64&&F<=127,K=(T===16||T===24)&&F>=64&&F<=95;if(!(z||K))return!1;if(L(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?f[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,z=null;if(T>=25?(P=2,z=T-8):(P=1,z=T),z>=17&&z<=19){var K;z===17?K=F+80:z===18?K=F+112:K=F+144,this.logger.log(n.INFO,"Special char '"+m(K)+"' in channel "+P),A=[K]}else T>=32&&T<=127&&(A=F===0?[T]:[T,F]);if(A){var O=h(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 z,K={};T===16||T===24?(z=Math.floor((F-32)/2),K.background=i[z],F%2===1&&(K.background=K.background+"_semi")):F===45?K.background="transparent":(K.foreground="black",F===47&&(K.underline=!0));var O=T<=23?1:2,B=this.channels[O];return B.setBkgData(K),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)}},v}();function p(v,x,w){w.a=v,w.b=x}function L(v,x,w){return w.a===v&&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 y}),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 y(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"),y=S("./src/utils/webvtt-parser.ts"),m=S("./src/utils/texttrack-utils.ts"),C=/\s/,_={newCue:function(f,r,c,i){for(var n=[],o,h,d,u,s,l=self.VTTCue||self.TextTrackCue,E=0;E<i.rows.length;E++)if(o=i.rows[E],d=!0,u=0,s="",!o.isEmpty()){for(var b=0;b<o.chars.length;b++)C.test(o.chars[b].uchar)&&d?u++:(s+=o.chars[b].uchar,d=!1);o.cueStartTime=r,r===c&&(c+=1e-4),u>=16?u--:u++;var p=Object(k.fixLineBreaks)(s.trim()),L=Object(y.generateCueId)(r,c,p);(!f||!f.cues||!f.cues.getCueById(L))&&(h=new l(r,c,p),h.id=L,h.line=E+1,h.align="left",h.position=10+Math.min(80,Math.floor(u*8/32)*10),n.push(h))}return f&&n.length&&(n.sort(function(R,v){return R.line==="auto"||v.line==="auto"?0:R.line>8&&v.line>8?v.line-R.line:R.line-v.line}),n.forEach(function(R){return Object(m.addCueToTrack)(f,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 o}),S.d(g,"alignMediaPlaylistByPDT",function(){return h});var k=S("./src/polyfills/number.ts"),y=S("./src/utils/logger.ts"),m=S("./src/controller/level-helper.ts");function C(d,u){for(var s=null,l=0,E=d.length;l<E;l++){var b=d[l];if(b&&b.cc===u){s=b;break}}return s}function _(d,u,s){return!!(u.details&&(s.endCC>s.startCC||d&&d.cc<s.startCC))}function e(d,u){var s=d.fragments,l=u.fragments;if(!l.length||!s.length){y.logger.log("No fragments to align");return}var E=C(s,l[0].cc);if(!E||E&&!E.startPTS){y.logger.log("No frag in previous level to align on");return}return E}function f(d,u){if(d){var s=d.start+u;d.start=d.startPTS=s,d.endPTS=s+d.duration}}function r(d,u){for(var s=u.fragments,l=0,E=s.length;l<E;l++)f(s[l],d);u.fragmentHint&&f(u.fragmentHint,d),u.alignedSliding=!0}function c(d,u,s){if(!u)return;i(d,s,u),!s.alignedSliding&&u.details&&n(s,u.details),!s.alignedSliding&&u.details&&!s.skippedSegments&&Object(m.adjustSliding)(u.details,s)}function i(d,u,s){if(_(d,s,u)){var l=e(s.details,u);l&&Object(k.isFiniteNumber)(l.start)&&(y.logger.log("Adjusting PTS using last level due to CC increase within current level "+u.url),r(l.start,u))}}function n(d,u){if(!u.fragments.length||!d.hasProgramDateTime||!u.hasProgramDateTime)return;var s=u.fragments[0].programDateTime,l=d.fragments[0].programDateTime,E=(l-s)/1e3+u.fragments[0].start;E&&Object(k.isFiniteNumber)(E)&&(y.logger.log("Adjusting PTS using programDateTime delta "+(l-s)+"ms, sliding:"+E.toFixed(3)+" "+d.url+" "),r(E,d))}function o(d,u){var s=d.programDateTime;if(!s)return;var l=(s-u)/1e3;d.start=d.startPTS=l,d.endPTS=l+d.duration}function h(d,u){if(!u.fragments.length||!d.hasProgramDateTime||!u.hasProgramDateTime)return;var s=u.fragments[0].programDateTime,l=u.fragments[0].start,E=s-l*1e3;d.fragments.forEach(function(b){o(b,E)}),d.fragmentHint&&o(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"),y=function(){function m(_,e,f){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=f,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,f){var r=this.slow_,c=this.fast_;this.slow_.halfLife!==e&&(this.slow_=new k.default(e,r.getEstimate(),r.getTotalWeight())),this.fast_.halfLife!==f&&(this.fast_=new k.default(f,c.getEstimate(),c.getTotalWeight()))},C.sample=function(e,f){e=Math.max(e,this.minDelayMs_);var r=8*f,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=y},"./src/utils/ewma.ts":function(N,g,S){"use strict";S.r(g);var k=function(){function y(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=y.prototype;return m.sample=function(_,e){var f=Math.pow(this.alpha_,_);this.estimate_=e*(1-f)+f*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_},y}();g.default=k},"./src/utils/fetch-loader.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"fetchSupported",function(){return o});var k=S("./src/polyfills/number.ts"),y=S("./src/loader/load-stats.ts"),m=S("./src/demux/chunk-cache.ts");function C(l,E){l.prototype=Object.create(E.prototype),l.prototype.constructor=l,c(l,E)}function _(l){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,L)}function L(){return e(p,arguments,i(this).constructor)}return L.prototype=Object.create(p.prototype,{constructor:{value:L,enumerable:!1,writable:!0,configurable:!0}}),c(L,p)},_(l)}function e(l,E,b){return f()?e=Reflect.construct:e=function(L,R,v){var x=[null];x.push.apply(x,R);var w=Function.bind.apply(L,x),T=new w;return v&&c(T,v.prototype),T},e.apply(null,arguments)}function f(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(l){return!1}}function r(l){return Function.toString.call(l).indexOf("[native code]")!==-1}function c(l,E){return c=Object.setPrototypeOf||function(p,L){return p.__proto__=L,p},c(l,E)}function i(l){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(b){return b.__proto__||Object.getPrototypeOf(b)},i(l)}function n(){return n=Object.assign||function(l){for(var E=1;E<arguments.length;E++){var b=arguments[E];for(var p in b)Object.prototype.hasOwnProperty.call(b,p)&&(l[p]=b[p])}return l},n.apply(this,arguments)}function o(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(l){}return!1}var h=function(){function l(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 y.LoadStats}var E=l.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,L,R){var v=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=L,this.callbacks=R,this.request=this.fetchSetup(p,w),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){v.abortInternal(),R.onTimeout(x,p,v.response)},L.timeout),self.fetch(this.request).then(function(A){if(v.response=v.loader=A,!A.ok){var z=A.status,K=A.statusText;throw new s(K||"fetch, bad network response",z,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)(L.highWaterMark)?v.loadProgressively(A,x,p,L.highWaterMark,T):F?A.arrayBuffer():A.text()}).then(function(A){var z=v.response;self.clearTimeout(v.requestTimeout),x.loading.end=Math.max(self.performance.now(),x.loading.first),x.loaded=x.total=A[P];var K={url:z.url,data:A};T&&!Object(k.isFiniteNumber)(L.highWaterMark)&&T(x,p,A,z),R.onSuccess(K,x,p,z)}).catch(function(A){if(self.clearTimeout(v.requestTimeout),x.aborted)return;var z=A.code||0;R.onError({code:z,text:A.message},p,A.details)})},E.getCacheAge=function(){var p=null;if(this.response){var L=this.response.headers.get("age");p=L?parseFloat(L):null}return p},E.loadProgressively=function(p,L,R,v,x){v===void 0&&(v=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(L,R,w.flush(),p),Promise.resolve(new ArrayBuffer(0));var z=A.value,K=z.length;return L.loaded+=K,K<v||w.dataLength?(w.push(z),w.dataLength>=v&&x(L,R,w.flush(),p)):x(L,R,z,p),P()}).catch(function(){return Promise.reject()})};return F()},l}();function d(l,E){var b={method:"GET",mode:"cors",credentials:"same-origin",signal:E,headers:new self.Headers(n({},l.headers))};return l.rangeEnd&&b.headers.set("Range","bytes="+l.rangeStart+"-"+String(l.rangeEnd-1)),b}function u(l,E){return new self.Request(l.url,E)}var s=function(l){C(E,l);function E(b,p,L){var R;return R=l.call(this,b)||this,R.code=void 0,R.details=void 0,R.code=p,R.details=L,R}return E}(_(Error));g.default=h},"./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 o});var k=S("./src/utils/mp4-tools.ts"),y=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 f(){return f=Object.assign||function(v){for(var x=1;x<arguments.length;x++){var w=arguments[x];for(var T in w)Object.prototype.hasOwnProperty.call(w,T)&&(v[T]=w[T])}return v},f.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 o(v,x,w,T,F){var P=Object(k.findBox)(new Uint8Array(v),["mdat"]);if(P.length===0){F(new Error("Could not parse IMSC1 mdat"));return}var A=P[0],z=Object(C.utf8ArrayToStr)(new Uint8Array(v,A.start,A.end-A.start)),K=Object(_.toTimescaleFromScale)(x,1,w);try{T(h(z,K))}catch(O){F(O)}}function h(v,x){var w=new DOMParser,T=w.parseFromString(v,"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,D){return U[D]=F.getAttribute("ttp:"+D)||P[D],U},{}),z=F.getAttribute("xml:space")!=="preserve",K=u(d(F,"styling","style")),O=u(d(F,"layout","region")),B=d(F,"body","[begin]");return[].map.call(B,function(U){var D=s(U,z);if(!D||!U.hasAttribute("begin"))return null;var W=p(U.getAttribute("begin"),A),Q=p(U.getAttribute("dur"),A),re=p(U.getAttribute("end"),A);if(W===null)throw b(U);if(re===null){if(Q===null)throw b(U);re=W+Q}var ee=new m.default(W-x,re-x,D);ee.id=Object(e.generateCueId)(ee.startTime,ee.endTime,ee.text);var ye=O[U.getAttribute("region")],be=K[U.getAttribute("style")];ee.position=10,ee.size=80;var he=l(ye,be),Ie=he.textAlign;if(Ie){var Se=n[Ie];Se&&(ee.lineAlign=Se),ee.align=Ie}return f(ee,he),ee}).filter(function(U){return U!==null})}function d(v,x,w){var T=v.getElementsByTagName(x)[0];return T?[].slice.call(T.querySelectorAll(w)):[]}function u(v){return v.reduce(function(x,w){var T=w.getAttribute("xml:id");return T&&(x[T]=w),x},{})}function s(v,x){return[].slice.call(v.childNodes).reduce(function(w,T,F){var P;return T.nodeName==="br"&&F?w+`
`:(P=T.childNodes)!==null&&P!==void 0&&P.length?s(T,x):x?w+T.textContent.trim().replace(/\s+/g," "):w+T.textContent},"")}function l(v,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(v,w,P);return A&&(F[P]=A),F},{})}function E(v,x,w){return v.hasAttributeNS(x,w)?v.getAttributeNS(x,w):null}function b(v){return new Error("Could not parse ttml timestamp "+v)}function p(v,x){if(!v)return null;var w=Object(y.parseTimeStamp)(v);return w===null&&(c.test(v)?w=L(v,x):i.test(v)&&(w=R(v,x))),w}function L(v,x){var w=c.exec(v),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(v,x){var w=i.exec(v),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 f});var k=function(){},y={trace:k,debug:k,log:k,warn:k,info:k,error:k},m=y;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(o){m[o]=r[o]?r[o].bind(r):C(o)})}function e(r){if(self.console&&r===!0||typeof r=="object"){_(r,"debug","log","info","warn","error");try{m.log()}catch(c){m=y}}else m=y}var f=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 y});var k;(function(m){m.WIDEVINE="com.widevine.alpha",m.PLAYREADY="com.microsoft.playready"})(k||(k={}));var y=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(N,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 f}),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 o}),S.d(g,"getDuration",function(){return h}),S.d(g,"computeRawDurationFromSamples",function(){return d}),S.d(g,"offsetStartDTS",function(){return u}),S.d(g,"segmentValidRange",function(){return s}),S.d(g,"appendUint8Array",function(){return l});var k=S("./src/utils/typed-array.ts"),y=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 f(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 L,R,v;"data"in E?(L=E.data,R=E.start,v=E.end):(L=E,R=0,v=L.byteLength);for(var x=R;x<v;){var w=f(L,x),T=_(L.subarray(x+4,x+8)),F=w>1?x+w:v;if(T===b[0])if(b.length===1)p.push({data:L,start:x+8,end:F});else{var P=c({data:L,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],L=p?p.end:null,R=c(E,["sidx"]);if(!R||!R[0])return null;var v=[],x=R[0],w=x.data[0],T=w===0?8:16,F=f(x,T);T+=4;var P=0,A=0;w===0?T+=8:T+=16,T+=2;var z=x.end+A,K=e(x,T);T+=2;for(var O=0;O<K;O++){var B=T,U=f(x,B);B+=4;var D=U&2147483647,W=(U&2147483648)>>>31;if(W===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var Q=f(x,B);B+=4,v.push({referenceSize:D,subsegmentDuration:Q,info:{duration:Q/F,start:z,end:z+D-1}}),z+=D,B+=4,T=B}return{earliestPresentationTime:P,timescale:F,version:w,referencesCount:K,references:v,moovEndOffset:L}}function n(E){for(var b=[],p=c(E,["moov","trak"]),L=0;L<p.length;L++){var R=p[L],v=c(R,["tkhd"])[0];if(v){var x=v.data[v.start],w=x===0?12:20,T=f(v,w),F=c(R,["mdia","mdhd"])[0];if(F){x=F.data[F.start],w=x===0?12:20;var P=f(F,w),A=c(R,["mdia","hdlr"])[0];if(A){var z=_(A.data.subarray(A.start+8,A.start+12)),K={soun:y.ElementaryStreamTypes.AUDIO,vide:y.ElementaryStreamTypes.VIDEO}[z];if(K){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:K},b[K]={timescale:P,id:T,codec:B}}}}}}var U=c(E,["moov","mvex","trex"]);return U.forEach(function(D){var W=f(D,4),Q=b[W];Q&&(Q.default={duration:f(D,12),flags:f(D,20)})}),b}function o(E,b){return c(b,["moof","traf"]).reduce(function(p,L){var R=c(L,["tfdt"])[0],v=R.data[R.start],x=c(L,["tfhd"]).reduce(function(w,T){var F=f(T,4),P=E[F];if(P){var A=f(R,4);v===1&&(A*=Math.pow(2,32),A+=f(R,8));var z=P.timescale||9e4,K=A/z;if(isFinite(K)&&(w===null||K<w))return K}return w},null);return x!==null&&isFinite(x)&&(p===null||x<p)?x:p},null)||0}function h(E,b){for(var p=0,L=0,R=0,v=c(E,["moof","traf"]),x=0;x<v.length;x++){var w=v[x],T=c(w,["tfhd"])[0],F=f(T,4),P=b[F];if(!P)continue;var A=P.default,z=f(T,0)|(A==null?void 0:A.flags),K=A==null?void 0:A.duration;z&8&&(z&2?K=f(T,12):K=f(T,8));for(var O=P.timescale||9e4,B=c(w,["trun"]),U=0;U<B.length;U++){if(K){var D=f(B[U],4);p=K*D}else p=d(B[U]);P.type===y.ElementaryStreamTypes.VIDEO?L+=p/O:P.type===y.ElementaryStreamTypes.AUDIO&&(R+=p/O)}}if(L===0&&R===0){var W=i(E);if(W!=null&&W.references)return W.references.reduce(function(Q,re){return Q+re.info.duration||0},0)}return L||R}function d(E){var b=f(E,0),p=8;b&1&&(p+=4),b&4&&(p+=4);for(var L=0,R=f(E,4),v=0;v<R;v++){if(b&256){var x=f(E,p);L+=x,p+=4}b&512&&(p+=4),b&1024&&(p+=4),b&2048&&(p+=4)}return L}function u(E,b,p){c(b,["moof","traf"]).forEach(function(L){c(L,["tfhd"]).forEach(function(R){var v=f(R,4),x=E[v];if(!x)return;var w=x.timescale||9e4;c(L,["tfdt"]).forEach(function(T){var F=T.data[T.start],P=f(T,4);if(F===0)r(T,4,P-p*w);else{P*=Math.pow(2,32),P+=f(T,8),P-=p*w,P=Math.max(P,0);var A=Math.floor(P/(m+1)),z=Math.floor(P%(m+1));r(T,4,A),r(T,8,z)}})})})}function s(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 L=p[p.length-1];return b.valid=Object(k.sliceUint8)(E,0,L.start-8),b.remainder=Object(k.sliceUint8)(E,L.start-8),b}function l(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 y(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=y.prototype;return m.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},m.newCue=function(_,e,f){(this.startTime===null||this.startTime>_)&&(this.startTime=_),this.endTime=e,this.screen=f,this.timelineController.createCaptionsTrack(this.trackName)},m.reset=function(){this.cueRanges=[]},y}()},"./src/utils/texttrack-utils.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"sendAddTrackEvent",function(){return y}),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 f});var k=S("./src/utils/logger.ts");function y(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(o){k.logger.debug("[texttrack-utils]: "+o);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 o=f(r.cues,c,i),h=0;h<o.length;h++)r.removeCue(o[h]);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,o=i;n<=o;){var h=Math.floor((o+n)/2);if(c<r[h].startTime)o=h-1;else if(c>r[h].startTime&&n<i)n=h+1;else return h}return r[n].startTime-c<c-r[o].startTime?n:o}function f(r,c,i){var n=[],o=e(r,c);if(o>-1)for(var h=o,d=r.length;h<d;h++){var u=r[h];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 y}),S.d(g,"toTimescaleFromScale",function(){return m}),S.d(g,"toMsFromMpegTsClock",function(){return C}),S.d(g,"toMpegTsClockFromTimescale",function(){return _});var k=9e4;function y(e,f,r,c){r===void 0&&(r=1),c===void 0&&(c=!1);var i=e*f*r;return c?Math.round(i):i}function m(e,f,r,c){return r===void 0&&(r=1),c===void 0&&(c=!1),y(e,f,1/r,c)}function C(e,f){return f===void 0&&(f=!1),y(e,1e3,1/k,f)}function _(e,f){return f===void 0&&(f=1),y(e,k,1/f)}},"./src/utils/typed-array.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"sliceUint8",function(){return k});function k(y,m,C){return Uint8Array.prototype.slice?y.slice(m,C):new Uint8Array(Array.prototype.slice.call(y,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"],y=["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(y,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 o=1;o<arguments.length;o++){var h=arguments[o];for(var d in h)r[d]=h[d]}return r}function f(r,c,i){var n=this,o={enumerable:!0};n.hasBeenReset=!1;var h="",d=!1,u=r,s=c,l=i,E=null,b="",p=!0,L="auto",R="start",v=50,x="middle",w=50,T="middle";Object.defineProperty(n,"id",e({},o,{get:function(){return h},set:function(P){h=""+P}})),Object.defineProperty(n,"pauseOnExit",e({},o,{get:function(){return d},set:function(P){d=!!P}})),Object.defineProperty(n,"startTime",e({},o,{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({},o,{get:function(){return s},set:function(P){if(typeof P!="number")throw new TypeError("End time must be set to a number.");s=P,this.hasBeenReset=!0}})),Object.defineProperty(n,"text",e({},o,{get:function(){return l},set:function(P){l=""+P,this.hasBeenReset=!0}})),Object.defineProperty(n,"region",e({},o,{get:function(){return E},set:function(P){E=P,this.hasBeenReset=!0}})),Object.defineProperty(n,"vertical",e({},o,{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({},o,{get:function(){return p},set:function(P){p=!!P,this.hasBeenReset=!0}})),Object.defineProperty(n,"line",e({},o,{get:function(){return L},set:function(P){if(typeof P!="number"&&P!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");L=P,this.hasBeenReset=!0}})),Object.defineProperty(n,"lineAlign",e({},o,{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({},o,{get:function(){return v},set:function(P){if(P<0||P>100)throw new Error("Position must be between 0 and 100.");v=P,this.hasBeenReset=!0}})),Object.defineProperty(n,"positionAlign",e({},o,{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({},o,{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({},o,{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 f.prototype.getCueAsHTML=function(){var r=self.WebVTT;return r.convertCueToDOMTree(self,this.text)},f}()},"./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"),y=function(){function n(){}var o=n.prototype;return o.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 o(d,u,s,l){return(d|0)*3600+(u|0)*60+(s|0)+parseFloat(l||0)}var h=n.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return h?parseFloat(h[2])>59?o(h[2],h[3],0,h[4]):o(h[1],h[2],h[3],h[4]):null}var C=function(){function n(){this.values=Object.create(null)}var o=n.prototype;return o.set=function(d,u){!this.get(d)&&u!==""&&(this.values[d]=u)},o.get=function(d,u,s){return s?this.has(d)?this.values[d]:u[s]:this.has(d)?this.values[d]:u},o.has=function(d){return d in this.values},o.alt=function(d,u,s){for(var l=0;l<s.length;++l)if(u===s[l]){this.set(d,u);break}},o.integer=function(d,u){/^-?\d+$/.test(u)&&this.set(d,parseInt(u,10))},o.percent=function(d,u){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(u)){var s=parseFloat(u);if(s>=0&&s<=100)return this.set(d,s),!0}return!1},n}();function _(n,o,h,d){var u=d?n.split(d):[n];for(var s in u){if(typeof u[s]!="string")continue;var l=u[s].split(h);if(l.length!==2)continue;var E=l[0],b=l[1];o(E,b)}}var e=new k.default(0,0,""),f=e.align==="middle"?"middle":"center";function r(n,o,h){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 s(E,b){var p=new C;_(E,function(v,x){var w;switch(v){case"region":for(var T=h.length-1;T>=0;T--)if(h[T].id===x){p.set(v,h[T].region);break}break;case"vertical":p.alt(v,x,["rl","lr"]);break;case"line":w=x.split(","),p.integer(v,w[0]),p.percent(v,w[0])&&p.set("snapToLines",!1),p.alt(v,w[0],["auto"]),w.length===2&&p.alt("lineAlign",w[1],["start",f,"end"]);break;case"position":w=x.split(","),p.percent(v,w[0]),w.length===2&&p.alt("positionAlign",w[1],["start",f,"end","line-left","line-right","auto"]);break;case"size":p.percent(v,x);break;case"align":p.alt(v,x,["start",f,"end","left","right"]);break}},/:/,/\s/),b.region=p.get("region",null),b.vertical=p.get("vertical","");var L=p.get("line","auto");L==="auto"&&e.line===-1&&(L=-1),b.line=L,b.lineAlign=p.get("lineAlign","start"),b.snapToLines=p.get("snapToLines",!0),b.size=p.get("size",100),b.align=p.get("align",f);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 l(){n=n.replace(/^\s+/,"")}if(l(),o.startTime=u(),l(),n.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+d);n=n.substr(3),l(),o.endTime=u(),l(),s(n,o)}function c(n){return n.replace(/<br(?: \/)?>/gi,`
`)}var i=function(){function n(){this.state="INITIAL",this.buffer="",this.decoder=new y,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var o=n.prototype;return o.parse=function(d){var u=this;d&&(u.buffer+=u.decoder.decode(d,{stream:!0}));function s(){var R=u.buffer,v=0;for(R=c(R);v<R.length&&R[v]!=="\r"&&R[v]!==`
`;)++v;var x=R.substr(0,v);return R[v]==="\r"&&++v,R[v]===`
`&&++v,u.buffer=R.substr(v),x}function l(R){_(R,function(v,x){},/:/)}try{var E="";if(u.state==="INITIAL"){if(!/\r\n|\n/.test(u.buffer))return this;E=s();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=s();switch(u.state){case"HEADER":/:/.test(E)?l(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 L=E.indexOf("-->")!==-1;if(!E||L&&(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},o.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 o});var k=S("./src/polyfills/number.ts"),y=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,f=function(d,u,s){return s===void 0&&(s=0),d.substr(s,u.length)===u},r=function(d){var u=parseInt(d.substr(-3)),s=parseInt(d.substr(-6,2)),l=parseInt(d.substr(-9,2)),E=d.length>9?parseInt(d.substr(0,d.indexOf(":"))):0;if(!Object(k.isFiniteNumber)(u)||!Object(k.isFiniteNumber)(s)||!Object(k.isFiniteNumber)(l)||!Object(k.isFiniteNumber)(E))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+d);return u+=1e3*s,u+=60*1e3*l,u+=60*60*1e3*E,u},c=function(d){for(var u=5381,s=d.length;s;)u=u*33^d.charCodeAt(--s);return(u>>>0).toString()};function i(h,d,u){return c(h.toString())+c(d.toString())+c(u)}var n=function(d,u,s){var l=d[u],E=d[l.prevCC];if(!E||!E.new&&l.new){d.ccOffset=d.presentationOffset=l.start,l.new=!1;return}for(;(b=E)!==null&&b!==void 0&&b.new;){var b;d.ccOffset+=l.start-E.start,l.new=!1,l=E,E=d[l.prevCC]}d.presentationOffset=s};function o(h,d,u,s,l,E,b,p){var L=new y.VTTParser,R=Object(m.utf8ArrayToStr)(new Uint8Array(h)).trim().replace(e,`
`).split(`
`),v=[],x=Object(C.toMpegTsClockFromTimescale)(d,u),w="00:00.000",T=0,F=0,P,A=!0,z=!1;L.oncue=function(K){var O=s[l],B=s.ccOffset,U=(T-x)/9e4;if(O!=null&&O.new&&(F!==void 0?B=s.ccOffset=O.start:n(s,l,U)),U&&(B=U-s.presentationOffset),z){var D=K.endTime-K.startTime,W=Object(_.normalizePts)((K.startTime+B-F)*9e4,E*9e4)/9e4;K.startTime=W,K.endTime=W+D}var Q=K.text.trim();K.text=decodeURIComponent(encodeURIComponent(Q)),K.id||(K.id=i(K.startTime,K.endTime,Q)),K.endTime>0&&v.push(K)},L.onparsingerror=function(K){P=K},L.onflush=function(){if(P){p(P);return}b(v)},R.forEach(function(K){if(A)if(f(K,"X-TIMESTAMP-MAP=")){A=!1,z=!0,K.substr(16).split(",").forEach(function(O){f(O,"LOCAL:")?w=O.substr(6):f(O,"MPEGTS:")&&(T=parseInt(O.substr(7)))});try{F=r(w)/1e3}catch(O){z=!1,P=O}return}else K===""&&(A=!1);L.parse(K+`
`)}),L.flush()}},"./src/utils/xhr-loader.ts":function(N,g,S){"use strict";S.r(g);var k=S("./src/utils/logger.ts"),y=S("./src/loader/load-stats.ts"),m=/^age:\s*[\d.]+\s*$/m,C=function(){function _(f){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=f?f.xhrSetup:null,this.stats=new y.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 o=this.xhrSetup;try{if(o)try{o(i,c.url)}catch(u){i.open("GET",c.url,!0),o(i,c.url)}i.readyState||i.open("GET",c.url,!0);var h=this.context.headers;if(h)for(var d in h)i.setRequestHeader(d,h[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,o=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 h=c.status;if(h>=200&&h<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 s=this.callbacks.onProgress;if(s&&s(i,r,d,c),!this.callbacks)return;var l={url:c.responseURL,data:d};this.callbacks.onSuccess(l,i,r,c)}else i.retry>=o.maxRetry||h>=400&&h<499?(k.logger.error(h+" while loading "+r.url),this.callbacks.onError({code:h,text:c.statusText},r,c)):(k.logger.warn(h+" 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,o.maxRetryDelay),i.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),o.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,J,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,J,I){(function(N,g,S){H.exports=J=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,y=g.algo,m=y.RC4=k.extend({_doReset:function(){for(var e=this._key,f=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 o=i%r,h=f[o>>>2]>>>24-o%4*8&255;n=(n+c[i]+h)%256;var d=c[i];c[i]=c[n],c[n]=d}this._i=this._j=0},_doProcessBlock:function(e,f){e[f]^=C.call(this)},keySize:256/32,ivSize:0});function C(){for(var e=this._S,f=this._i,r=this._j,c=0,i=0;i<4;i++){f=(f+1)%256,r=(r+e[f])%256;var n=e[f];e[f]=e[r],e[r]=n,c|=e[(e[f]+e[r])%256]<<24-i*8}return this._i=f,this._j=r,c}g.RC4=k._createHelper(m);var _=y.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,J,I){"use strict";I.d(J,"a",function(){return tt});var N=I("rePB"),g=I("VTBJ"),S=I("KQm4"),k=I("U8pU"),y=I("ODXe"),m=I("q1tI"),C=I("TSYQ"),_=I.n(C),e=I("Gytx"),f=I.n(e),r=I("Kwbf"),c=I("t23M"),i=I("qx4F"),n=I("6eGT"),o=I("IBYe"),h=I("Ff2n"),d=I("c+Xe"),u=I("fyJ8"),s=I("biw7");function l(je,De,nt,lt,Ve){var Qe=nt[je]||{},Fe=nt[De]||{},Re,Me;Qe.fixed==="left"?Re=lt.left[je]:Fe.fixed==="right"&&(Me=lt.right[De]);var Ee=!1,Oe=!1,ke=!1,Ne=!1,He=nt[De+1],rt=nt[je-1];if(Ve==="rtl"){if(Re!==void 0){var ct=rt&&rt.fixed==="left";Ne=!ct}else if(Me!==void 0){var yt=He&&He.fixed==="right";ke=!yt}}else if(Re!==void 0){var ht=He&&He.fixed==="left";Ee=!ht}else if(Me!==void 0){var pt=rt&&rt.fixed==="right";Oe=!pt}return{fixLeft:Re,fixRight:Me,lastFixLeft:Ee,firstFixRight:Oe,lastFixRight:ke,firstFixLeft:Ne,isSticky:lt.isSticky}}var E=I("sR1s");function b(je){var De=je.cells,nt=je.stickyOffsets,lt=je.flattenColumns,Ve=je.rowComponent,Qe=je.cellComponent,Fe=je.onHeaderRow,Re=je.index,Me=m.useContext(s.a),Ee=Me.prefixCls,Oe=Me.direction,ke;Fe&&(ke=Fe(De.map(function(He){return He.column}),Re));var Ne=Object(E.a)(De.map(function(He){return He.column}));return m.createElement(Ve,Object.assign({},ke),De.map(function(He,rt){var ct=He.column,yt=l(He.colStart,He.colEnd,lt,nt,Oe),ht;return ct&&ct.onHeaderCell&&(ht=He.column.onHeaderCell(ct)),m.createElement(u.a,Object.assign({},He,{ellipsis:ct.ellipsis,align:ct.align,component:Qe,prefixCls:Ee,key:Ne[rt]},yt,{additionalProps:ht,rowType:"header"}))}))}b.displayName="HeaderRow";var p=b;function L(je){var De=[];function nt(Fe,Re){var Me=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;De[Me]=De[Me]||[];var Ee=Re,Oe=Fe.filter(Boolean).map(function(ke){var Ne={key:ke.key,className:ke.className||"",children:ke.title,column:ke,colStart:Ee},He=1,rt=ke.children;return rt&&rt.length>0&&(He=nt(rt,Ee,Me+1).reduce(function(ct,yt){return ct+yt},0),Ne.hasSubColumns=!0),"colSpan"in ke&&(He=ke.colSpan),"rowSpan"in ke&&(Ne.rowSpan=ke.rowSpan),Ne.colSpan=He,Ne.colEnd=Ne.colStart+He-1,De[Me].push(Ne),Ee+=He,He});return Oe}nt(je,0);for(var lt=De.length,Ve=function(Re){De[Re].forEach(function(Me){!("rowSpan"in Me)&&!Me.hasSubColumns&&(Me.rowSpan=lt-Re)})},Qe=0;Qe<lt;Qe+=1)Ve(Qe);return De}function R(je){var De=je.stickyOffsets,nt=je.columns,lt=je.flattenColumns,Ve=je.onHeaderRow,Qe=m.useContext(s.a),Fe=Qe.prefixCls,Re=Qe.getComponent,Me=m.useMemo(function(){return L(nt)},[nt]),Ee=Re(["header","wrapper"],"thead"),Oe=Re(["header","row"],"tr"),ke=Re(["header","cell"],"th");return m.createElement(Ee,{className:"".concat(Fe,"-thead")},Me.map(function(Ne,He){var rt=m.createElement(p,{key:He,flattenColumns:lt,cells:Ne,stickyOffsets:De,rowComponent:Oe,cellComponent:ke,onHeaderRow:Ve,index:He});return rt}))}var v=R,x=I("hW8S");function w(je){for(var De=je.colWidths,nt=je.columns,lt=je.columCount,Ve=[],Qe=lt||nt.length,Fe=!1,Re=Qe-1;Re>=0;Re-=1){var Me=De[Re],Ee=nt&&nt[Re],Oe=Ee&&Ee[x.a];(Me||Oe||Fe)&&(Ve.unshift(m.createElement("col",Object.assign({key:Re,style:{width:Me,minWidth:Me}},Oe))),Fe=!0)}return m.createElement("colgroup",null,Ve)}var T=w;function F(je,De){return Object(m.useMemo)(function(){for(var nt=[],lt=0;lt<De;lt+=1){var Ve=je[lt];if(Ve!==void 0)nt[lt]=Ve;else return null}return nt},[je.join("_"),De])}var P=m.forwardRef(function(je,De){var nt=je.noData,lt=je.columns,Ve=je.flattenColumns,Qe=je.colWidths,Fe=je.columCount,Re=je.stickyOffsets,Me=je.direction,Ee=je.fixHeader,Oe=je.offsetHeader,ke=je.stickyClassName,Ne=je.onScroll,He=Object(h.a)(je,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),rt=m.useContext(s.a),ct=rt.prefixCls,yt=rt.scrollbarSize,ht=rt.isSticky,pt=ht&&!Ee?0:yt,Dt=m.useRef(null),At=m.useCallback(function(kt){Object(d.b)(De,kt),Object(d.b)(Dt,kt)},[]);m.useEffect(function(){var kt;function ir(_t){var Mt=_t.currentTarget,Rt=_t.deltaX;Rt&&(Ne({currentTarget:Mt,scrollLeft:Mt.scrollLeft+Rt}),_t.preventDefault())}return(kt=Dt.current)===null||kt===void 0||kt.addEventListener("wheel",ir),function(){var _t;(_t=Dt.current)===null||_t===void 0||_t.removeEventListener("wheel",ir)}},[]);var bt=Ve[Ve.length-1],Xt={fixed:bt?bt.fixed:null,onHeaderCell:function(){return{className:"".concat(ct,"-cell-scrollbar")}}},Gt=Object(m.useMemo)(function(){return pt?[].concat(Object(S.a)(lt),[Xt]):lt},[pt,lt]),rr=Object(m.useMemo)(function(){return pt?[].concat(Object(S.a)(Ve),[Xt]):Ve},[pt,Ve]),sr=Object(m.useMemo)(function(){var kt=Re.right,ir=Re.left;return Object(g.a)(Object(g.a)({},Re),{},{left:Me==="rtl"?[].concat(Object(S.a)(ir.map(function(_t){return _t+pt})),[0]):ir,right:Me==="rtl"?kt:[].concat(Object(S.a)(kt.map(function(_t){return _t+pt})),[0]),isSticky:ht})},[pt,Re,ht]),Kt=F(Qe,Fe);return m.createElement("div",{style:Object(g.a)({overflow:"hidden"},ht?{top:Oe}:{}),ref:At,className:_()("".concat(ct,"-header"),Object(N.a)({},ke,!!ke))},m.createElement("table",{style:{tableLayout:"fixed",visibility:nt||Kt?null:"hidden"}},m.createElement(T,{colWidths:Kt?[].concat(Object(S.a)(Kt),[pt]):[],columCount:Fe+1,columns:rr}),m.createElement(v,Object.assign({},He,{stickyOffsets:sr,columns:Gt,flattenColumns:rr}))))});P.displayName="FixedHeader";var A=P,z=m.createContext(null),K=z;function O(je){var De=je.prefixCls,nt=je.children,lt=je.component,Ve=je.cellComponent,Qe=je.fixHeader,Fe=je.fixColumn,Re=je.horizonScroll,Me=je.className,Ee=je.expanded,Oe=je.componentWidth,ke=je.colSpan,Ne=m.useContext(s.a),He=Ne.scrollbarSize;return m.useMemo(function(){var rt=nt;return Fe&&(rt=m.createElement("div",{style:{width:Oe-(Qe?He:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(De,"-expanded-row-fixed")},rt)),m.createElement(lt,{className:Me,style:{display:Ee?null:"none"}},m.createElement(u.a,{component:Ve,prefixCls:De,colSpan:ke},rt))},[nt,lt,Qe,Re,Me,Ee,Oe,ke,He])}var B=O;function U(je){var De=je.className,nt=je.style,lt=je.record,Ve=je.index,Qe=je.rowKey,Fe=je.getRowKey,Re=je.rowExpandable,Me=je.expandedKeys,Ee=je.onRow,Oe=je.indent,ke=Oe===void 0?0:Oe,Ne=je.rowComponent,He=je.cellComponent,rt=je.childrenColumnName,ct=m.useContext(s.a),yt=ct.prefixCls,ht=ct.fixedInfoList,pt=m.useContext(K),Dt=pt.fixHeader,At=pt.fixColumn,bt=pt.horizonScroll,Xt=pt.componentWidth,Gt=pt.flattenColumns,rr=pt.expandableType,sr=pt.expandRowByClick,Kt=pt.onTriggerExpand,kt=pt.rowClassName,ir=pt.expandedRowClassName,_t=pt.indentSize,Mt=pt.expandIcon,Rt=pt.expandedRowRender,Ot=pt.expandIconColumnIndex,qt=m.useState(!1),Jr=Object(y.a)(qt,2),Et=Jr[0],It=Jr[1],wt=Me&&Me.has(je.recordKey);m.useEffect(function(){wt&&It(!0)},[wt]);var Er=rr==="row"&&(!Re||Re(lt)),nr=rr==="nest",Bt=rt&&lt&&lt[rt],Nt=Er||nr,vr;Ee&&(vr=Ee(lt,Ve));var Qr=function(V){if(sr&&Nt&&Kt(lt,V),vr&&vr.onClick){for(var Y,te=arguments.length,ve=new Array(te>1?te-1:0),ae=1;ae<te;ae++)ve[ae-1]=arguments[ae];(Y=vr).onClick.apply(Y,[V].concat(ve))}},Cr;typeof kt=="string"?Cr=kt:typeof kt=="function"&&(Cr=kt(lt,Ve,ke));var vt=Object(E.a)(Gt),Ht=m.createElement(Ne,Object.assign({},vr,{"data-row-key":Qe,className:_()(De,"".concat(yt,"-row"),"".concat(yt,"-row-level-").concat(ke),Cr,vr&&vr.className),style:Object(g.a)(Object(g.a)({},nt),vr?vr.style:null),onClick:Qr}),Gt.map(function(le,V){var Y=le.render,te=le.dataIndex,ve=le.className,ae=vt[V],ze=ht[V],ft;V===(Ot||0)&&nr&&(ft=m.createElement(m.Fragment,null,m.createElement("span",{style:{paddingLeft:"".concat(_t*ke,"px")},className:"".concat(yt,"-row-indent indent-level-").concat(ke)}),Mt({prefixCls:yt,expanded:wt,expandable:Bt,record:lt,onExpand:Kt})));var Ct;return le.onCell&&(Ct=le.onCell(lt,Ve)),m.createElement(u.a,Object.assign({className:ve,ellipsis:le.ellipsis,align:le.align,component:He,prefixCls:yt,key:ae,record:lt,index:Ve,dataIndex:te,render:Y,shouldCellUpdate:le.shouldCellUpdate},ze,{appendNode:ft,additionalProps:Ct}))})),Zr;if(Er&&(Et||wt)){var ln=Rt(lt,Ve,ke+1,wt),kn=ir&&ir(lt,Ve,ke);Zr=m.createElement(B,{expanded:wt,className:_()("".concat(yt,"-expanded-row"),"".concat(yt,"-expanded-row-level-").concat(ke+1),kn),prefixCls:yt,fixHeader:Dt,fixColumn:At,horizonScroll:bt,component:Ne,componentWidth:Xt,cellComponent:He,colSpan:Gt.length},ln)}var Cn;return Bt&&wt&&(Cn=(lt[rt]||[]).map(function(le,V){var Y=Fe(le,V);return m.createElement(U,Object.assign({},je,{key:Y,rowKey:Y,record:le,recordKey:Y,index:V,indent:ke+1}))})),m.createElement(m.Fragment,null,Ht,Zr,Cn)}U.displayName="BodyRow";var D=U,W=m.createContext(null),Q=W;function re(je){var De=je.columnKey,nt=je.onColumnResize,lt=m.useRef();return m.useEffect(function(){lt.current&&nt(De,lt.current.offsetWidth)},[]),m.createElement(c.a,{onResize:function(Qe){var Fe=Qe.offsetWidth;nt(De,Fe)}},m.createElement("td",{ref:lt,style:{padding:0,border:0,height:0}},m.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function ee(je){var De=je.data,nt=je.getRowKey,lt=je.measureColumnWidth,Ve=je.expandedKeys,Qe=je.onRow,Fe=je.rowExpandable,Re=je.emptyNode,Me=je.childrenColumnName,Ee=m.useContext(Q),Oe=Ee.onColumnResize,ke=m.useContext(s.a),Ne=ke.prefixCls,He=ke.getComponent,rt=m.useContext(K),ct=rt.fixHeader,yt=rt.horizonScroll,ht=rt.flattenColumns,pt=rt.componentWidth;return m.useMemo(function(){var Dt=He(["body","wrapper"],"tbody"),At=He(["body","row"],"tr"),bt=He(["body","cell"],"td"),Xt;De.length?Xt=De.map(function(rr,sr){var Kt=nt(rr,sr);return m.createElement(D,{key:Kt,rowKey:Kt,record:rr,recordKey:Kt,index:sr,rowComponent:At,cellComponent:bt,expandedKeys:Ve,onRow:Qe,getRowKey:nt,rowExpandable:Fe,childrenColumnName:Me})}):Xt=m.createElement(B,{expanded:!0,className:"".concat(Ne,"-placeholder"),prefixCls:Ne,fixHeader:ct,fixColumn:yt,horizonScroll:yt,component:At,componentWidth:pt,cellComponent:bt,colSpan:ht.length},Re);var Gt=Object(E.a)(ht);return m.createElement(Dt,{className:"".concat(Ne,"-tbody")},lt&&m.createElement("tr",{"aria-hidden":"true",className:"".concat(Ne,"-measure-row"),style:{height:0}},Gt.map(function(rr){return m.createElement(re,{key:rr,columnKey:rr,onColumnResize:Oe})})),Xt)},[De,Ne,Qe,lt,Ve,nt,He,pt,Re,ht])}var ye=m.memo(ee);ye.displayName="Body";var be=ye,he=I("wRmb"),Ie=I("xEkU"),Se=I.n(Ie);function fe(je){var De=Object(m.useRef)(je),nt=Object(m.useState)({}),lt=Object(y.a)(nt,2),Ve=lt[1],Qe=Object(m.useRef)(null),Fe=Object(m.useRef)([]);function Re(Me){Qe.current===null&&(Fe.current=[],Qe.current=Se()(function(){Fe.current.forEach(function(Ee){De.current=Ee(De.current)}),Qe.current=null,Ve({})})),Fe.current.push(Me)}return Object(m.useEffect)(function(){return function(){Se.a.cancel(Qe.current)}},[]),[De.current,Re]}function ue(je){var De=Object(m.useRef)(je),nt=Object(m.useRef)(null);function lt(){window.clearTimeout(nt.current)}function Ve(Fe){De.current=Fe,lt(),nt.current=window.setTimeout(function(){De.current=null,nt.current=null},100)}function Qe(){return De.current}return Object(m.useEffect)(function(){return lt},[]),[Ve,Qe]}function ie(je,De,nt){var lt=Object(m.useMemo)(function(){for(var Ve=[],Qe=[],Fe=0,Re=0,Me=0;Me<De;Me+=1)if(nt==="rtl"){Qe[Me]=Re,Re+=je[Me]||0;var Ee=De-Me-1;Ve[Ee]=Fe,Fe+=je[Ee]||0}else{Ve[Me]=Fe,Fe+=je[Me]||0;var Oe=De-Me-1;Qe[Oe]=Re,Re+=je[Oe]||0}return{left:Ve,right:Qe}},[je,De,nt]);return lt}var Ce=ie;function ne(je){var De=je.className,nt=je.children;return m.createElement("div",{className:De},nt)}var ce=ne,Ae=I("n6Qo");function oe(je){var De,nt=je.prefixCls,lt=je.record,Ve=je.onExpand,Qe=je.expanded,Fe=je.expandable,Re="".concat(nt,"-row-expand-icon");if(!Fe)return m.createElement("span",{className:_()(Re,"".concat(nt,"-row-spaced"))});var Me=function(Oe){Ve(lt,Oe),Oe.stopPropagation()};return m.createElement("span",{className:_()(Re,(De={},Object(N.a)(De,"".concat(nt,"-row-expanded"),Qe),Object(N.a)(De,"".concat(nt,"-row-collapsed"),!Qe),De)),onClick:Me})}function q(je,De,nt){var lt=[];function Ve(Qe){(Qe||[]).forEach(function(Fe,Re){lt.push(De(Fe,Re)),Ve(Fe[nt])})}return Ve(je),lt}var $=I("zT1h"),X=I("y0+3"),de=function(De,nt){var lt,Ve,Qe=De.scrollBodyRef,Fe=De.onScroll,Re=De.offsetScroll,Me=m.useContext(s.a),Ee=Me.prefixCls,Oe=((lt=Qe.current)===null||lt===void 0?void 0:lt.scrollWidth)||0,ke=((Ve=Qe.current)===null||Ve===void 0?void 0:Ve.clientWidth)||0,Ne=Oe&&ke*(ke/Oe),He=m.useRef(),rt=fe({scrollLeft:0,isHiddenScrollBar:!1}),ct=Object(y.a)(rt,2),yt=ct[0],ht=ct[1],pt=m.useRef({delta:0,x:0}),Dt=m.useState(!1),At=Object(y.a)(Dt,2),bt=At[0],Xt=At[1],Gt=function(){Xt(!1)},rr=function(_t){_t.persist(),pt.current.delta=_t.pageX-yt.scrollLeft,pt.current.x=0,Xt(!0),_t.preventDefault()},sr=function(_t){var Mt,Rt=_t||((Mt=window)===null||Mt===void 0?void 0:Mt.event),Ot=Rt.buttons;if(!bt||Ot===0){bt&&Xt(!1);return}var qt=pt.current.x+_t.pageX-pt.current.x-pt.current.delta;qt<=0&&(qt=0),qt+Ne>=ke&&(qt=ke-Ne),Fe({scrollLeft:qt/ke*(Oe+2)}),pt.current.x=_t.pageX},Kt=function(){var _t=Object(X.b)(Qe.current).top,Mt=_t+Qe.current.offsetHeight,Rt=document.documentElement.scrollTop+window.innerHeight;Mt-Object(i.a)()<=Rt||_t>=Rt-Re?ht(function(Ot){return Object(g.a)(Object(g.a)({},Ot),{},{isHiddenScrollBar:!0})}):ht(function(Ot){return Object(g.a)(Object(g.a)({},Ot),{},{isHiddenScrollBar:!1})})},kt=function(_t){ht(function(Mt){return Object(g.a)(Object(g.a)({},Mt),{},{scrollLeft:_t/Oe*ke||0})})};return m.useImperativeHandle(nt,function(){return{setScrollLeft:kt}}),m.useEffect(function(){var ir=Object($.a)(document.body,"mouseup",Gt,!1),_t=Object($.a)(document.body,"mousemove",sr,!1);return Kt(),function(){ir.remove(),_t.remove()}},[Ne,bt]),m.useEffect(function(){var ir=Object($.a)(window,"scroll",Kt,!1),_t=Object($.a)(window,"resize",Kt,!1);return function(){ir.remove(),_t.remove()}},[]),m.useEffect(function(){yt.isHiddenScrollBar||ht(function(ir){var _t,Mt;return Object(g.a)(Object(g.a)({},ir),{},{scrollLeft:Qe.current.scrollLeft/((_t=Qe.current)===null||_t===void 0?void 0:_t.scrollWidth)*((Mt=Qe.current)===null||Mt===void 0?void 0:Mt.clientWidth)})})},[yt.isHiddenScrollBar]),Oe<=ke||!Ne||yt.isHiddenScrollBar?null:m.createElement("div",{style:{height:Object(i.a)(),width:ke,bottom:Re},className:"".concat(Ee,"-sticky-scroll")},m.createElement("div",{onMouseDown:rr,ref:He,className:_()("".concat(Ee,"-sticky-scroll-bar"),Object(N.a)({},"".concat(Ee,"-sticky-scroll-bar-active"),bt)),style:{width:"".concat(Ne,"px"),transform:"translate3d(".concat(yt.scrollLeft,"px, 0, 0)")}}))},pe=m.forwardRef(de);function xe(je,De){return m.useMemo(function(){var nt=!!je;return{isSticky:nt,stickyClassName:nt?"".concat(De,"-sticky-header"):"",offsetHeader:Object(k.a)(je)==="object"&&je.offsetHeader||0,offsetScroll:Object(k.a)(je)==="object"&&je.offsetScroll||0}},[je,De])}var Ke=[],qe={},tt="rc-table-internal-hook",et=m.memo(function(je){var De=je.children;return De},function(je,De){return f()(je.props,De.props)?je.pingLeft!==De.pingLeft||je.pingRight!==De.pingRight:!1});function it(je){var De,nt=je.prefixCls,lt=je.className,Ve=je.rowClassName,Qe=je.style,Fe=je.data,Re=je.rowKey,Me=je.scroll,Ee=je.tableLayout,Oe=je.direction,ke=je.title,Ne=je.footer,He=je.summary,rt=je.id,ct=je.showHeader,yt=je.components,ht=je.emptyText,pt=je.onRow,Dt=je.onHeaderRow,At=je.internalHooks,bt=je.transformColumns,Xt=je.internalRefs,Gt=je.sticky,rr=Fe||Ke,sr=!!rr.length,Kt=m.useState(0),kt=Object(y.a)(Kt,2),ir=kt[0],_t=kt[1];m.useEffect(function(){_t(Object(i.a)())});var Mt=m.useMemo(function(){return Object(E.c)(yt,{})},[yt]),Rt=m.useCallback(function(Xr,Pr){return Object(E.b)(Mt,Xr)||Pr},[Mt]),Ot=m.useMemo(function(){return typeof Re=="function"?Re:function(Xr){var Pr=Xr&&Xr[Re];return Pr}},[Re]),qt=Object(x.c)(je),Jr=qt.expandIcon,Et=qt.expandedRowKeys,It=qt.defaultExpandedRowKeys,wt=qt.defaultExpandAllRows,Er=qt.expandedRowRender,nr=qt.onExpand,Bt=qt.onExpandedRowsChange,Nt=qt.expandRowByClick,vr=qt.rowExpandable,Qr=qt.expandIconColumnIndex,Cr=qt.expandedRowClassName,vt=qt.childrenColumnName,Ht=qt.indentSize,Zr=Jr||oe,ln=vt||"children",kn=m.useMemo(function(){return Er?"row":je.expandable&&At===tt&&je.expandable.__PARENT_RENDER_ICON__||rr.some(function(Xr){return Xr&&Object(k.a)(Xr)==="object"&&Xr[ln]})?"nest":!1},[!!Er,rr]),Cn=m.useState(function(){return It||(wt?q(rr,Ot,ln):[])}),le=Object(y.a)(Cn,2),V=le[0],Y=le[1],te=m.useMemo(function(){return new Set(Et||V||[])},[Et,V]),ve=m.useCallback(function(Xr){var Pr=Ot(Xr,rr.indexOf(Xr)),Ir,hi=te.has(Pr);hi?(te.delete(Pr),Ir=Object(S.a)(te)):Ir=[].concat(Object(S.a)(te),[Pr]),Y(Ir),nr&&nr(!hi,Xr),Bt&&Bt(Ir)},[Ot,te,rr,nr,Bt]),ae=m.useState(0),ze=Object(y.a)(ae,2),ft=ze[0],Ct=ze[1],Wt=Object(he.b)(Object(g.a)(Object(g.a)(Object(g.a)({},je),qt),{},{expandable:!!Er,expandedKeys:te,getRowKey:Ot,onTriggerExpand:ve,expandIcon:Zr,expandIconColumnIndex:Qr,direction:Oe}),At===tt?bt:null),gt=Object(y.a)(Wt,2),Yt=gt[0],er=gt[1],Hr=m.useMemo(function(){return{columns:Yt,flattenColumns:er}},[Yt,er]),on=m.useRef(),Gr=m.useRef(),lr=m.useRef(),qr=m.useState(!1),On=Object(y.a)(qr,2),zt=On[0],mr=On[1],pr=m.useState(!1),jr=Object(y.a)(pr,2),Tr=jr[0],li=jr[1],An=fe(new Map),Ui=Object(y.a)(An,2),Bi=Ui[0],qn=Ui[1],un=Object(E.a)(er),Si=un.map(function(Xr){return Bi.get(Xr)}),hn=m.useMemo(function(){return Si},[Si.join("_")]),Yn=Ce(hn,er.length,Oe),en=Me&&Object(E.d)(Me.y),hr=Me&&Object(E.d)(Me.x),nn=hr&&er.some(function(Xr){var Pr=Xr.fixed;return Pr}),xr=m.useRef(),fn=xe(Gt,nt),Fr=fn.isSticky,mi=fn.offsetHeader,En=fn.offsetScroll,Un=fn.stickyClassName,Di,ui,bi;en&&(ui={overflowY:"scroll",maxHeight:Me.y}),hr&&(Di={overflowX:"auto"},en||(ui={overflowY:"hidden"}),bi={width:Me.x===!0?"auto":Me.x,minWidth:"100%"});var ei=m.useCallback(function(Xr,Pr){qn(function(Ir){var hi=new Map(Ir);return hi.set(Xr,Pr),hi})},[]),ti=ue(null),ji=Object(y.a)(ti,2),ci=ji[0],_i=ji[1];function Hi(Xr,Pr){if(!Pr)return;typeof Pr=="function"?Pr(Xr):Pr.scrollLeft!==Xr&&(Pr.scrollLeft=Xr)}var di=function(Pr){var Ir=Pr.currentTarget,hi=Pr.scrollLeft,Xi=typeof hi=="number"?hi:Ir.scrollLeft,Yi=Ir||qe;if(!_i()||_i()===Yi){var cr;ci(Yi),Hi(Xi,Gr.current),Hi(Xi,lr.current),Hi(Xi,(cr=xr.current)===null||cr===void 0?void 0:cr.setScrollLeft)}if(Ir){var Ut=Ir.scrollWidth,gr=Ir.clientWidth;mr(Xi>0),li(Xi<Ut-gr)}},tn=function(){lr.current&&di({currentTarget:lr.current})},$t=function(Pr){var Ir=Pr.width;tn(),Ct(on.current?on.current.offsetWidth:Ir)};m.useEffect(function(){return tn},[]),m.useEffect(function(){hr&&tn()},[hr]),m.useEffect(function(){At===tt&&Xt&&(Xt.body.current=lr.current)});var ur=Rt(["table"],"table"),Qt=m.useMemo(function(){return Ee||(nn?Me.x==="max-content"?"auto":"fixed":en||er.some(function(Xr){var Pr=Xr.ellipsis;return Pr})?"fixed":"auto")},[en,nn,er,Ee]),yr,kr={colWidths:hn,columCount:er.length,stickyOffsets:Yn,onHeaderRow:Dt,fixHeader:en},zr=m.useMemo(function(){return sr?null:typeof ht=="function"?ht():ht},[sr,ht]),Rr=m.createElement(be,{data:rr,measureColumnWidth:en||hr||Fr,expandedKeys:te,rowExpandable:vr,getRowKey:Ot,onRow:pt,emptyNode:zr,childrenColumnName:ln}),vn=m.createElement(T,{colWidths:er.map(function(Xr){var Pr=Xr.width;return Pr}),columns:er}),$n=He&&m.createElement(Ae.b,null,He(rr)),Sr=Rt(["body"]);if(en||Fr){var Ei;typeof Sr=="function"?(Ei=Sr(rr,{scrollbarSize:ir,ref:lr,onScroll:di}),kr.colWidths=er.map(function(Xr,Pr){var Ir=Xr.width,hi=Pr===Yt.length-1?Ir-ir:Ir;return typeof hi=="number"&&!Number.isNaN(hi)?hi:(Object(r.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):Ei=m.createElement("div",{style:Object(g.a)(Object(g.a)({},Di),ui),onScroll:di,ref:lr,className:_()("".concat(nt,"-body"))},m.createElement(ur,{style:Object(g.a)(Object(g.a)({},bi),{},{tableLayout:Qt})},vn,Rr,$n),Fr&&m.createElement(pe,{ref:xr,offsetScroll:En,scrollBodyRef:lr,onScroll:di})),yr=m.createElement(m.Fragment,null,ct!==!1&&m.createElement(A,Object.assign({noData:!rr.length},kr,Hr,{direction:Oe,offsetHeader:mi,stickyClassName:Un,ref:Gr,onScroll:di})),Ei)}else yr=m.createElement("div",{style:Object(g.a)(Object(g.a)({},Di),ui),className:_()("".concat(nt,"-content")),onScroll:di,ref:lr},m.createElement(ur,{style:Object(g.a)(Object(g.a)({},bi),{},{tableLayout:Qt})},vn,ct!==!1&&m.createElement(v,Object.assign({},kr,Hr)),Rr,$n));var Vr=Object(x.b)(je),jn=m.createElement("div",Object.assign({className:_()(nt,lt,(De={},Object(N.a)(De,"".concat(nt,"-rtl"),Oe==="rtl"),Object(N.a)(De,"".concat(nt,"-ping-left"),zt),Object(N.a)(De,"".concat(nt,"-ping-right"),Tr),Object(N.a)(De,"".concat(nt,"-layout-fixed"),Ee==="fixed"),Object(N.a)(De,"".concat(nt,"-fixed-header"),en),Object(N.a)(De,"".concat(nt,"-fixed-column"),nn),Object(N.a)(De,"".concat(nt,"-scroll-horizontal"),hr),Object(N.a)(De,"".concat(nt,"-has-fix-left"),er[0]&&er[0].fixed),Object(N.a)(De,"".concat(nt,"-has-fix-right"),er[er.length-1]&&er[er.length-1].fixed==="right"),De)),style:Qe,id:rt,ref:on},Vr),m.createElement(et,{pingLeft:zt,pingRight:Tr,props:Object(g.a)(Object(g.a)({},je),{},{stickyOffsets:Yn,mergedExpandedKeys:te})},ke&&m.createElement(ce,{className:"".concat(nt,"-title")},ke(rr)),m.createElement("div",{className:"".concat(nt,"-container")},yr),Ne&&m.createElement(ce,{className:"".concat(nt,"-footer")},Ne(rr))));hr&&(jn=m.createElement(c.a,{onResize:$t},jn));var Bn=m.useMemo(function(){return{prefixCls:nt,getComponent:Rt,scrollbarSize:ir,direction:Oe,fixedInfoList:er.map(function(Xr,Pr){return l(Pr,Pr,er,Yn,Oe)}),isSticky:Fr}},[nt,Rt,ir,Oe,er,Yn,Oe,Fr]),gi=m.useMemo(function(){return Object(g.a)(Object(g.a)({},Hr),{},{tableLayout:Qt,rowClassName:Ve,expandedRowClassName:Cr,componentWidth:ft,fixHeader:en,fixColumn:nn,horizonScroll:hr,expandIcon:Zr,expandableType:kn,expandRowByClick:Nt,expandedRowRender:Er,onTriggerExpand:ve,expandIconColumnIndex:Qr,indentSize:Ht})},[Hr,Qt,Ve,Cr,ft,en,nn,hr,Zr,kn,Nt,Er,ve,Qr,Ht]),ua=m.useMemo(function(){return{onColumnResize:ei}},[ei]);return m.createElement(s.a.Provider,{value:Bn},m.createElement(K.Provider,{value:gi},m.createElement(Q.Provider,{value:ua},jn)))}it.Column=o.a,it.ColumnGroup=n.a,it.Summary=Ae.a,it.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var at=J.b=it},wRmb:function(H,J,I){"use strict";I.d(J,"a",function(){return f});var N=I("rePB"),g=I("KQm4"),S=I("VTBJ"),k=I("Ff2n"),y=I("q1tI"),m=I.n(y),C=I("Kwbf"),_=I("Zm9Q"),e=I("hW8S");function f(o){return Object(_.a)(o).filter(function(h){return y.isValidElement(h)}).map(function(h){var d=h.key,u=h.props,s=u.children,l=Object(k.a)(u,["children"]),E=Object(S.a)({key:d},l);return s&&(E.children=f(s)),E})}function r(o){return o.reduce(function(h,d){var u=d.fixed,s=u===!0?"left":u,l=d.children;return l&&l.length>0?[].concat(Object(g.a)(h),Object(g.a)(r(l).map(function(E){return Object(S.a)({fixed:s},E)}))):[].concat(Object(g.a)(h),[Object(S.a)(Object(S.a)({},d),{},{fixed:s})])},[])}function c(o){for(var h=!0,d=0;d<o.length;d+=1){var u=o[d];if(h&&u.fixed!=="left")h=!1;else if(!h&&u.fixed==="left"){Object(C.a)(!1,"Index ".concat(d-1," of `columns` missing `fixed='left'` prop."));break}}for(var s=!0,l=o.length-1;l>=0;l-=1){var E=o[l];if(s&&E.fixed!=="right")s=!1;else if(!s&&E.fixed==="right"){Object(C.a)(!1,"Index ".concat(l+1," of `columns` missing `fixed='right'` prop."));break}}}function i(o){return o.map(function(h){var d=h.fixed,u=Object(k.a)(h,["fixed"]),s=d;return d==="left"?s="right":d==="right"&&(s="left"),Object(S.a)({fixed:s},u)})}function n(o,h){var d=o.prefixCls,u=o.columns,s=o.children,l=o.expandable,E=o.expandedKeys,b=o.getRowKey,p=o.onTriggerExpand,L=o.expandIcon,R=o.rowExpandable,v=o.expandIconColumnIndex,x=o.direction,w=o.expandRowByClick,T=y.useMemo(function(){return u||f(s)},[u,s]),F=y.useMemo(function(){if(l){var z,K=v||0,O=T[K],B=(z={},Object(N.a)(z,e.a,{className:"".concat(d,"-expand-icon-col")}),Object(N.a)(z,"title",""),Object(N.a)(z,"fixed",O?O.fixed:null),Object(N.a)(z,"className","".concat(d,"-row-expand-icon-cell")),Object(N.a)(z,"render",function(W,Q,re){var ee=b(Q,re),ye=E.has(ee),be=R?R(Q):!0,he=L({prefixCls:d,expanded:ye,expandable:be,record:Q,onExpand:p});return w?y.createElement("span",{onClick:function(Se){return Se.stopPropagation()}},he):he}),z),U=T.slice();return K>=0&&U.splice(K,0,B),U}return T},[l,T,b,E,L,x]),P=y.useMemo(function(){var z=F;return h&&(z=h(z)),z.length||(z=[{render:function(){return null}}]),z},[h,F,x]),A=y.useMemo(function(){return x==="rtl"?i(r(P)):r(P)},[P,x]);return[P,A]}J.b=n},wZgz:function(H,J,I){(function(N,g,S){H.exports=J=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,y=g.algo,m=[],C=[],_=[],e=[],f=[],r=[],c=[],i=[],n=[],o=[];(function(){for(var u=[],s=0;s<256;s++)s<128?u[s]=s<<1:u[s]=s<<1^283;for(var l=0,E=0,s=0;s<256;s++){var b=E^E<<1^E<<2^E<<3^E<<4;b=b>>>8^b&255^99,m[l]=b,C[b]=l;var p=u[l],L=u[p],R=u[L],v=u[b]*257^b*16843008;_[l]=v<<24|v>>>8,e[l]=v<<16|v>>>16,f[l]=v<<8|v>>>24,r[l]=v;var v=R*16843009^L*65537^p*257^l*16843008;c[b]=v<<24|v>>>8,i[b]=v<<16|v>>>16,n[b]=v<<8|v>>>24,o[b]=v,l?(l=p^u[u[u[R^p]]],E^=u[u[E]]):l=E=1}})();var h=[0,1,2,4,8,16,32,64,128,27,54],d=y.AES=k.extend({_doReset:function(){var u;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var s=this._keyPriorReset=this._key,l=s.words,E=s.sigBytes/4,b=this._nRounds=E+6,p=(b+1)*4,L=this._keySchedule=[],R=0;R<p;R++)R<E?L[R]=l[R]:(u=L[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^=h[R/E|0]<<24),L[R]=L[R-E]^u);for(var v=this._invKeySchedule=[],x=0;x<p;x++){var R=p-x;if(x%4)var u=L[R];else var u=L[R-4];x<4||R<=4?v[x]=u:v[x]=c[m[u>>>24]]^i[m[u>>>16&255]]^n[m[u>>>8&255]]^o[m[u&255]]}},encryptBlock:function(u,s){this._doCryptBlock(u,s,this._keySchedule,_,e,f,r,m)},decryptBlock:function(u,s){var l=u[s+1];u[s+1]=u[s+3],u[s+3]=l,this._doCryptBlock(u,s,this._invKeySchedule,c,i,n,o,C);var l=u[s+1];u[s+1]=u[s+3],u[s+3]=l},_doCryptBlock:function(u,s,l,E,b,p,L,R){for(var v=this._nRounds,x=u[s]^l[0],w=u[s+1]^l[1],T=u[s+2]^l[2],F=u[s+3]^l[3],P=4,A=1;A<v;A++){var z=E[x>>>24]^b[w>>>16&255]^p[T>>>8&255]^L[F&255]^l[P++],K=E[w>>>24]^b[T>>>16&255]^p[F>>>8&255]^L[x&255]^l[P++],O=E[T>>>24]^b[F>>>16&255]^p[x>>>8&255]^L[w&255]^l[P++],B=E[F>>>24]^b[x>>>16&255]^p[w>>>8&255]^L[T&255]^l[P++];x=z,w=K,T=O,F=B}var z=(R[x>>>24]<<24|R[w>>>16&255]<<16|R[T>>>8&255]<<8|R[F&255])^l[P++],K=(R[w>>>24]<<24|R[T>>>16&255]<<16|R[F>>>8&255]<<8|R[x&255])^l[P++],O=(R[T>>>24]<<24|R[F>>>16&255]<<16|R[x>>>8&255]<<8|R[w&255])^l[P++],B=(R[F>>>24]<<24|R[x>>>16&255]<<16|R[w>>>8&255]<<8|R[T&255])^l[P++];u[s]=z,u[s+1]=K,u[s+2]=O,u[s+3]=B},keySize:256/32});g.AES=k._createHelper(d)}(),N.AES})},wbyO:function(H,J,I){(function(N,g){H.exports=J=g(I("Ib8C"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.WordArray,y=g.enc,m=y.Base64url={stringify:function(_,e=!0){var f=_.words,r=_.sigBytes,c=e?this._safe_map:this._map;_.clamp();for(var i=[],n=0;n<r;n+=3)for(var o=f[n>>>2]>>>24-n%4*8&255,h=f[n+1>>>2]>>>24-(n+1)%4*8&255,d=f[n+2>>>2]>>>24-(n+2)%4*8&255,u=o<<16|h<<8|d,s=0;s<4&&n+s*.75<r;s++)i.push(c.charAt(u>>>6*(3-s)&63));var l=c.charAt(64);if(l)for(;i.length%4;)i.push(l);return i.join("")},parse:function(_,e=!0){var f=_.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 o=_.indexOf(n);o!==-1&&(f=o)}return C(_,f,c)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function C(_,e,f){for(var r=[],c=0,i=0;i<e;i++)if(i%4){var n=f[_.charCodeAt(i-1)]<<i%4*2,o=f[_.charCodeAt(i)]>>>6-i%4*2,h=n|o;r[c>>>2]|=h<<24-c%4*8,c++}return k.create(r,c)}}(),N.enc.Base64url})},"y0+3":function(H,J,I){"use strict";I.d(J,"a",function(){return r}),I.d(J,"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 y(n,o,h){if(o=o.toLowerCase(),h==="auto"){if(o==="height")return n.offsetHeight;if(o==="width")return n.offsetWidth}return o in g||(g[o]=N.test(o)),g[o]?parseFloat(h)||0:h}function m(n,o){var h=arguments.length,d=k(n);return o=S[o]?"cssFloat"in n.style?"cssFloat":"styleFloat":o,h===1?d:y(n,o,d[o]||n.style[o])}function C(n,o,h){var d=arguments.length;if(o=S[o]?"cssFloat"in n.style?"cssFloat":"styleFloat":o,d===3)return typeof h=="number"&&N.test(o)&&(h="".concat(h,"px")),n.style[o]=h,h;for(var u in o)o.hasOwnProperty(u)&&C(n,u,o[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 f(){var n=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),o=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:n,height:o}}function r(){var n=document.documentElement.clientWidth,o=window.innerHeight||document.documentElement.clientHeight;return{width:n,height:o}}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 o=n.getBoundingClientRect(),h=document.documentElement;return{left:o.left+(window.pageXOffset||h.scrollLeft)-(h.clientLeft||document.body.clientLeft||0),top:o.top+(window.pageYOffset||h.scrollTop)-(h.clientTop||document.body.clientTop||0)}}},ynwM:function(H,J,I){var N=I("MFOe"),g=N.Global;H.exports={name:"oldFF-globalStorage",read:k,write:y,each:m,remove:C,clearAll:_};var S=g.globalStorage;function k(e){return S[e]}function y(e,f){S[e]=f}function m(e){for(var f=S.length-1;f>=0;f--){var r=S.key(f);e(S[r],r)}}function C(e){return S.removeItem(e)}function _(){m(function(e,f){delete S[e]})}}}]);