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__Competitions__Detail.cee...

530 lines
1.9 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([[135,5,6,7,8,14,21],{"+NIl":function(H,J,D){(function(k){k(D("VrN/"))})(function(k){"use strict";k.defineMode("stex",function(g,C){"use strict";function M(i,s){i.cmdState.push(s)}function m(i){return i.cmdState.length>0?i.cmdState[i.cmdState.length-1]:null}function y(i){var s=i.cmdState.pop();s&&s.closeBracket()}function S(i){for(var s=i.cmdState,d=s.length-1;d>=0;d--){var f=s[d];if(f.name=="DEFAULT")continue;return f}return{styleIdentifier:function(){return null}}}function _(i,s,d){return function(){this.name=i,this.bracketNo=0,this.style=s,this.styles=d,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var t={};t.importmodule=_("importmodule","tag",["string","builtin"]),t.documentclass=_("documentclass","tag",["","atom"]),t.usepackage=_("usepackage","tag",["atom"]),t.begin=_("begin","tag",["atom"]),t.end=_("end","tag",["atom"]),t.label=_("label","tag",["atom"]),t.ref=_("ref","tag",["atom"]),t.eqref=_("eqref","tag",["atom"]),t.cite=_("cite","tag",["atom"]),t.bibitem=_("bibitem","tag",["atom"]),t.Bibitem=_("Bibitem","tag",["atom"]),t.RBibitem=_("RBibitem","tag",["atom"]),t.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function h(i,s){i.f=s}function n(i,s){var d;if(i.match(/^\\[a-zA-Z@]+/)){var f=i.current().slice(1);return d=t.hasOwnProperty(f)?t[f]:t.DEFAULT,d=new d,M(s,d),h(s,a),d.style}if(i.match(/^\\[$&%#{}_]/))return"tag";if(i.match(/^\\[,;!\/\\]/))return"tag";if(i.match("\\["))return h(s,function(o,r){return c(o,r,"\\]")}),"keyword";if(i.match("\\("))return h(s,function(o,r){return c(o,r,"\\)")}),"keyword";if(i.match("$$"))return h(s,function(o,r){return c(o,r,"$$")}),"keyword";if(i.match("$"))return h(s,function(o,r){return c(o,r,"$")}),"keyword";var l=i.next();if(l=="%")return i.skipToEnd(),"comment";if(l=="}"||l=="]"){if(d=m(s),d)d.closeBracket(l),h(s,a);else return"error";return"bracket"}else return l=="{"||l=="["?(d=t.DEFAULT,d=new d,M(s,d),"bracket"):/\d/.test(l)?(i.eatWhile(/[\w.%]/),"atom"):(i.eatWhile(/[\w\-_]/),d=S(s),d.name=="begin"&&(d.argument=i.current()),d.styleIdentifier())}function c(i,s,d){if(i.eatSpace())return null;if(d&&i.match(d))return h(s,n),"keyword";if(i.match(/^\\[a-zA-Z@]+/))return"tag";if(i.match(/^[a-zA-Z]+/))return"variable-2";if(i.match(/^\\[$&%#{}_]/))return"tag";if(i.match(/^\\[,;!\/]/))return"tag";if(i.match(/^[\^_&]/))return"tag";if(i.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(i.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var f=i.next();return f=="{"||f=="}"||f=="["||f=="]"||f=="("||f==")"?"bracket":f=="%"?(i.skipToEnd(),"comment"):"error"}function a(i,s){var d=i.peek(),f;return d=="{"||d=="["?(f=m(s),f.openBracket(d),i.eat(d),h(s,n),"bracket"):/[ \t\r]/.test(d)?(i.eat(d),null):(h(s,n),y(s),n(i,s))}return{startState:function(){var i=C.inMathMode?function(s,d){return c(s,d)}:n;return{cmdState:[],f:i}},copyState:function(i){return{cmdState:i.cmdState.slice(),f:i.f}},token:function(i,s){return s.f(i,s)},blankLine:function(i){i.f=n,i.cmdState.length=0},lineComment:"%"}}),k.defineMIME("text/x-stex","stex"),k.defineMIME("text/x-latex","stex")})},"+ua5":function(H,J,D){},"/cxE":function(H,J,D){"use strict";D.d(J,"f",function(){return C}),D.d(J,"g",function(){return M}),D.d(J,"h",function(){return m}),D.d(J,"e",function(){return S}),D.d(J,"b",function(){return _}),D.d(J,"c",function(){return t}),D.d(J,"d",function(){return h}),D.d(J,"a",function(){return n});class k{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(c){setTimeout(()=>{throw c.stack?new Error(c.message+`
`+c.stack):c},0)}}emit(c){this.listeners.forEach(a=>{a(c)})}onUnexpectedError(c){this.unexpectedErrorHandler(c),this.emit(c)}onUnexpectedExternalError(c){this.unexpectedErrorHandler(c)}}const g=new k;function C(c){S(c)||g.onUnexpectedError(c);return}function M(c){S(c)||g.onUnexpectedExternalError(c);return}function m(c){if(c instanceof Error){let{name:a,message:i}=c;const s=c.stacktrace||c.stack;return{$isError:!0,name:a,message:i,stack:s}}return c}const y="Canceled";function S(c){return c instanceof Error&&c.name===y&&c.message===y}function _(){const c=new Error(y);return c.name=c.message,c}function t(c){return c?new Error(`Illegal argument: ${c}`):new Error("Illegal argument")}function h(c){return c?new Error(`Illegal state: ${c}`):new Error("Illegal state")}class n extends Error{constructor(c){super("NotSupported");c&&(this.message=c)}}},"19Vz":function(H,J,D){(function(k){k(D("VrN/"))})(function(k){k.defineOption("placeholder","",function(_,t,h){var n=h&&h!=k.Init;if(t&&!n)_.on("blur",m),_.on("change",y),_.on("swapDoc",y),k.on(_.getInputField(),"compositionupdate",_.state.placeholderCompose=function(){M(_)}),y(_);else if(!t&&n){_.off("blur",m),_.off("change",y),_.off("swapDoc",y),k.off(_.getInputField(),"compositionupdate",_.state.placeholderCompose),g(_);var c=_.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}t&&!_.hasFocus()&&m(_)});function g(_){_.state.placeholder&&(_.state.placeholder.parentNode.removeChild(_.state.placeholder),_.state.placeholder=null)}function C(_){g(_);var t=_.state.placeholder=document.createElement("pre");t.style.cssText="height: 0; overflow: visible",t.style.direction=_.getOption("direction"),t.className="CodeMirror-placeholder CodeMirror-line-like";var h=_.getOption("placeholder");typeof h=="string"&&(h=document.createTextNode(h)),t.appendChild(h),_.display.lineSpace.insertBefore(t,_.display.lineSpace.firstChild)}function M(_){setTimeout(function(){var t=!1,h=_.getInputField();h.nodeName=="TEXTAREA"?t=!h.value:_.lineCount()==1&&(t=!/[^\u200b]/.test(h.querySelector(".CodeMirror-line").textContent)),t?C(_):g(_)},20)}function m(_){S(_)&&C(_)}function y(_){var t=_.getWrapperElement(),h=S(_);t.className=t.className.replace(" CodeMirror-empty","")+(h?" CodeMirror-empty":""),h?C(_):g(_)}function S(_){return _.lineCount()===1&&_.getLine(0)===""}})},"1eCo":function(H,J,D){(function(k){k(D("VrN/"))})(function(k){"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},C={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};k.defineMode("xml",function(M,m){var y=M.indentUnit,S={},_=m.htmlMode?g:C;for(var t in _)S[t]=_[t];for(var t in m)S[t]=m[t];var h,n;function c(T,F){function N(z){return F.tokenize=z,z(T,F)}var L=T.next();if(L=="<")return T.eat("!")?T.eat("[")?T.match("CDATA[")?N(s("atom","]]>")):null:T.match("--")?N(s("comment","-->")):T.match("DOCTYPE",!0,!0)?(T.eatWhile(/[\w\._\-]/),N(d(1))):null:T.eat("?")?(T.eatWhile(/[\w\._\-]/),F.tokenize=s("meta","?>"),"meta"):(h=T.eat("/")?"closeTag":"openTag",F.tokenize=a,"tag bracket");if(L=="&"){var G;return T.eat("#")?T.eat("x")?G=T.eatWhile(/[a-fA-F\d]/)&&T.eat(";"):G=T.eatWhile(/[\d]/)&&T.eat(";"):G=T.eatWhile(/[\w\.\-:]/)&&T.eat(";"),G?"atom":"error"}else return T.eatWhile(/[^&<]/),null}c.isInText=!0;function a(T,F){var N=T.next();if(N==">"||N=="/"&&T.eat(">"))return F.tokenize=c,h=N==">"?"endTag":"selfcloseTag","tag bracket";if(N=="=")return h="equals",null;if(N=="<"){F.tokenize=c,F.state=r,F.tagName=F.tagStart=null;var L=F.tokenize(T,F);return L?L+" tag error":"tag error"}else return/[\'\"]/.test(N)?(F.tokenize=i(N),F.stringStartCol=T.column(),F.tokenize(T,F)):(T.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function i(T){var F=function(N,L){for(;!N.eol();)if(N.next()==T){L.tokenize=a;break}return"string"};return F.isInAttribute=!0,F}function s(T,F){return function(N,L){for(;!N.eol();){if(N.match(F)){L.tokenize=c;break}N.next()}return T}}function d(T){return function(F,N){for(var L;(L=F.next())!=null;){if(L=="<")return N.tokenize=d(T+1),N.tokenize(F,N);if(L==">")if(T==1){N.tokenize=c;break}else return N.tokenize=d(T-1),N.tokenize(F,N)}return"meta"}}function f(T,F,N){this.prev=T.context,this.tagName=F,this.indent=T.indented,this.startOfLine=N,(S.doNotIndent.hasOwnProperty(F)||T.context&&T.context.noIndent)&&(this.noIndent=!0)}function l(T){T.context&&(T.context=T.context.prev)}function o(T,F){for(var N;;){if(!T.context)return;if(N=T.context.tagName,!S.contextGrabbers.hasOwnProperty(N)||!S.contextGrabbers[N].hasOwnProperty(F))return;l(T)}}function r(T,F,N){return T=="openTag"?(N.tagStart=F.column(),x):T=="closeTag"?v:r}function x(T,F,N){return T=="word"?(N.tagName=F.current(),n="tag",O):S.allowMissingTagName&&T=="endTag"?(n="tag bracket",O(T,F,N)):(n="error",x)}function v(T,F,N){if(T=="word"){var L=F.current();return N.context&&N.context.tagName!=L&&S.implicitlyClosed.hasOwnProperty(N.context.tagName)&&l(N),N.context&&N.context.tagName==L||S.matchClosing===!1?(n="tag",p):(n="tag error",R)}else return S.allowMissingTagName&&T=="endTag"?(n="tag bracket",p(T,F,N)):(n="error",R)}function p(T,F,N){return T!="endTag"?(n="error",p):(l(N),r)}function R(T,F,N){return n="error",p(T,F,N)}function O(T,F,N){if(T=="word")return n="attribute",b;if(T=="endTag"||T=="selfcloseTag"){var L=N.tagName,G=N.tagStart;return N.tagName=N.tagStart=null,T=="selfcloseTag"||S.autoSelfClosers.hasOwnProperty(L)?o(N,L):(o(N,L),N.context=new f(N,L,G==N.indented)),r}return n="error",O}function b(T,F,N){return T=="equals"?E:(S.allowMissing||(n="error"),O(T,F,N))}function E(T,F,N){return T=="string"?w:T=="word"&&S.allowUnquoted?(n="string",O):(n="error",O(T,F,N))}function w(T,F,N){return T=="string"?w:O(T,F,N)}return{startState:function(T){var F={tokenize:c,state:r,indented:T||0,tagName:null,tagStart:null,context:null};return T!=null&&(F.baseIndent=T),F},token:function(T,F){if(!F.tagName&&T.sol()&&(F.indented=T.indentation()),T.eatSpace())return null;h=null;var N=F.tokenize(T,F);return(N||h)&&N!="comment"&&(n=null,F.state=F.state(h||N,T,F),n&&(N=n=="error"?N+" error":n)),N},indent:function(T,F,N){var L=T.context;if(T.tokenize.isInAttribute)return T.tagStart==T.indented?T.stringStartCol+1:T.indented+y;if(L&&L.noIndent)return k.Pass;if(T.tokenize!=a&&T.tokenize!=c)return N?N.match(/^(\s*)/)[0].length:0;if(T.tagName)return S.multilineTagIndentPastTag!==!1?T.tagStart+T.tagName.length+2:T.tagStart+y*(S.multilineTagIndentFactor||1);if(S.alignCDATA&&/<!\[CDATA\[/.test(F))return 0;var G=F&&/^<(\/)?([\w_:\.-]*)/.exec(F);if(G&&G[1])for(;L;)if(L.tagName==G[2]){L=L.prev;break}else if(S.implicitlyClosed.hasOwnProperty(L.tagName))L=L.prev;else break;else if(G)for(;L;){var z=S.contextGrabbers[L.tagName];if(z&&z.hasOwnProperty(G[2]))L=L.prev;else break}for(;L&&L.prev&&!L.startOfLine;)L=L.prev;return L?L.indent+y:T.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:S.htmlMode?"html":"xml",helperType:S.htmlMode?"html":"xml",skipAttribute:function(T){T.state==E&&(T.state=O)},xmlCurrentTag:function(T){return T.tagName?{name:T.tagName,close:T.type=="closeTag"}:null},xmlCurrentContext:function(T){for(var F=[],N=T.context;N;N=N.prev)N.tagName&&F.push(N.tagName);return F.reverse()}}}),k.defineMIME("text/xml","xml"),k.defineMIME("application/xml","xml"),k.mimeModes.hasOwnProperty("text/html")||k.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1uat":function(H,J,D){(function(k,g,C){H.exports=J=g(D("Ib8C"),D("MlIO"))})(this,function(k){return function(){var g=k,C=g.lib,M=C.Hasher,m=g.x64,y=m.Word,S=m.WordArray,_=g.algo;function t(){return y.create.apply(y,arguments)}var h=[t(1116352408,3609767458),t(1899447441,602891725),t(3049323471,3964484399),t(3921009573,2173295548),t(961987163,4081628472),t(1508970993,3053834265),t(2453635748,2937671579),t(2870763221,3664609560),t(3624381080,2734883394),t(310598401,1164996542),t(607225278,1323610764),t(1426881987,3590304994),t(1925078388,4068182383),t(2162078206,991336113),t(2614888103,633803317),t(3248222580,3479774868),t(3835390401,2666613458),t(4022224774,944711139),t(264347078,2341262773),t(604807628,2007800933),t(770255983,1495990901),t(1249150122,1856431235),t(1555081692,3175218132),t(1996064986,2198950837),t(2554220882,3999719339),t(2821834349,766784016),t(2952996808,2566594879),t(3210313671,3203337956),t(3336571891,1034457026),t(3584528711,2466948901),t(113926993,3758326383),t(338241895,168717936),t(666307205,1188179964),t(773529912,1546045734),t(1294757372,1522805485),t(1396182291,2643833823),t(1695183700,2343527390),t(1986661051,1014477480),t(2177026350,1206759142),t(2456956037,344077627),t(2730485921,1290863460),t(2820302411,3158454273),t(3259730800,3505952657),t(3345764771,106217008),t(3516065817,3606008344),t(3600352804,1432725776),t(4094571909,1467031594),t(275423344,851169720),t(430227734,3100823752),t(506948616,1363258195),t(659060556,3750685593),t(883997877,3785050280),t(958139571,3318307427),t(1322822218,3812723403),t(1537002063,2003034995),t(1747873779,3602036899),t(1955562222,1575990012),t(2024104815,1125592928),t(2227730452,2716904306),t(2361852424,442776044),t(2428436474,593698344),t(2756734187,3733110249),t(3204031479,2999351573),t(3329325298,3815920427),t(3391569614,3928383900),t(3515267271,566280711),t(3940187606,3454069534),t(4118630271,4000239992),t(116418474,1914138554),t(174292421,2731055270),t(289380356,3203993006),t(460393269,320620315),t(685471733,587496836),t(852142971,1086792851),t(1017036298,365543100),t(1126000580,2618297676),t(1288033470,3409855158),t(1501505948,4234509866),t(1607167915,987167468),t(1816402316,1246189591)],n=[];(function(){for(var a=0;a<80;a++)n[a]=t()})();var c=_.SHA512=M.extend({_doReset:function(){this._hash=new S.init([new y.init(1779033703,4089235720),new y.init(3144134277,2227873595),new y.init(1013904242,4271175723),new y.init(2773480762,1595750129),new y.init(1359893119,2917565137),new y.init(2600822924,725511199),new y.init(528734635,4215389547),new y.init(1541459225,327033209)])},_doProcessBlock:function(a,i){for(var s=this._hash.words,d=s[0],f=s[1],l=s[2],o=s[3],r=s[4],x=s[5],v=s[6],p=s[7],R=d.high,O=d.low,b=f.high,E=f.low,w=l.high,T=l.low,F=o.high,N=o.low,L=r.high,G=r.low,z=x.high,A=x.low,B=v.high,U=v.low,I=p.high,K=p.low,Z=R,ue=O,de=b,Ce=E,Re=w,me=T,Oe=F,be=N,ce=L,se=G,ne=z,ge=A,ee=B,re=U,Te=I,ie=K,q=0;q<80;q++){var Y,X,he=n[q];if(q<16)X=he.high=a[i+q*2]|0,Y=he.low=a[i+q*2+1]|0;else{var fe=n[q-15],Ee=fe.high,He=fe.low,Qe=(Ee>>>1|He<<31)^(Ee>>>8|He<<24)^Ee>>>7,et=(He>>>1|Ee<<31)^(He>>>8|Ee<<24)^(He>>>7|Ee<<25),it=n[q-2],ut=it.high,dt=it.low,Fe=(ut>>>19|dt<<13)^(ut<<3|dt>>>29)^ut>>>6,Ie=(dt>>>19|ut<<13)^(dt<<3|ut>>>29)^(dt>>>6|ut<<26),st=n[q-7],ft=st.high,Ze=st.low,tt=n[q-16],Be=tt.high,Pe=tt.low;Y=et+Ze,X=Qe+ft+(Y>>>0<et>>>0?1:0),Y=Y+Ie,X=X+Fe+(Y>>>0<Ie>>>0?1:0),Y=Y+Pe,X=X+Be+(Y>>>0<Pe>>>0?1:0),he.high=X,he.low=Y}var Ne=ce&ne^~ce&ee,xe=se&ge^~se&re,Ae=Z&de^Z&Re^de&Re,Le=ue&Ce^ue&me^Ce&me,Me=(Z>>>28|ue<<4)^(Z<<30|ue>>>2)^(Z<<25|ue>>>7),We=(ue>>>28|Z<<4)^(ue<<30|Z>>>2)^(ue<<25|Z>>>7),nt=(ce>>>14|se<<18)^(ce>>>18|se<<14)^(ce<<23|se>>>9),vt=(se>>>14|ce<<18)^(se>>>18|ce<<14)^(se<<23|ce>>>9),bt=h[q],Wt=bt.high,Bt=bt.low,lr=ie+vt,dr=Te+nt+(lr>>>0<ie>>>0?1:0),lr=lr+xe,dr=dr+Ne+(lr>>>0<xe>>>0?1:0),lr=lr+Bt,dr=dr+Wt+(lr>>>0<Bt>>>0?1:0),lr=lr+Y,dr=dr+X+(lr>>>0<Y>>>0?1:0),Ot=We+Le,Vr=Me+Ae+(Ot>>>0<We>>>0?1:0);Te=ee,ie=re,ee=ne,re=ge,ne=ce,ge=se,se=be+lr|0,ce=Oe+dr+(se>>>0<be>>>0?1:0)|0,Oe=Re,be=me,Re=de,me=Ce,de=Z,Ce=ue,ue=lr+Ot|0,Z=dr+Vr+(ue>>>0<lr>>>0?1:0)|0}O=d.low=O+ue,d.high=R+Z+(O>>>0<ue>>>0?1:0),E=f.low=E+Ce,f.high=b+de+(E>>>0<Ce>>>0?1:0),T=l.low=T+me,l.high=w+Re+(T>>>0<me>>>0?1:0),N=o.low=N+be,o.high=F+Oe+(N>>>0<be>>>0?1:0),G=r.low=G+se,r.high=L+ce+(G>>>0<se>>>0?1:0),A=x.low=A+ge,x.high=z+ne+(A>>>0<ge>>>0?1:0),U=v.low=U+re,v.high=B+ee+(U>>>0<re>>>0?1:0),K=p.low=K+ie,p.high=I+Te+(K>>>0<ie>>>0?1:0)},_doFinalize:function(){var a=this._data,i=a.words,s=this._nDataBytes*8,d=a.sigBytes*8;i[d>>>5]|=128<<24-d%32,i[(d+128>>>10<<5)+30]=Math.floor(s/4294967296),i[(d+128>>>10<<5)+31]=s,a.sigBytes=i.length*4,this._process();var f=this._hash.toX32();return f},clone:function(){var a=M.clone.call(this);return a._hash=this._hash.clone(),a},blockSize:1024/32});g.SHA512=M._createHelper(c),g.HmacSHA512=M._createHmacHelper(c)}(),k.SHA512})},"24hK":function(H,J,D){"use strict";D.d(J,"a",function(){return g});class k{constructor(C){this.element=C,this.next=k.Undefined,this.prev=k.Undefined}}k.Undefined=new k(void 0);class g{constructor(){this._first=k.Undefined,this._last=k.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===k.Undefined}clear(){let C=this._first;for(;C!==k.Undefined;){const M=C.next;C.prev=k.Undefined,C.next=k.Undefined,C=M}this._first=k.Undefined,this._last=k.Undefined,this._size=0}unshift(C){return this._insert(C,!1)}push(C){return this._insert(C,!0)}_insert(C,M){const m=new k(C);if(this._first===k.Undefined)this._first=m,this._last=m;else if(M){const S=this._last;this._last=m,m.prev=S,S.next=m}else{const S=this._first;this._first=m,m.next=S,S.prev=m}this._size+=1;let y=!1;return()=>{y||(y=!0,this._remove(m))}}shift(){if(this._first===k.Undefined)return;{const C=this._first.element;return this._remove(this._first),C}}pop(){if(this._last===k.Undefined)return;{const C=this._last.element;return this._remove(this._last),C}}_remove(C){if(C.prev!==k.Undefined&&C.next!==k.Undefined){const M=C.prev;M.next=C.next,C.next.prev=M}else C.prev===k.Undefined&&C.next===k.Undefined?(this._first=k.Undefined,this._last=k.Undefined):C.next===k.Undefined?(this._last=this._last.prev,this._last.next=k.Undefined):C.prev===k.Undefined&&(this._first=this._first.next,this._first.prev=k.Undefined);this._size-=1}*[Symbol.iterator](){let C=this._first;for(;C!==k.Undefined;)yield C.element,C=C.next}}},"3/fG":function(H,J,D){"use strict";D.d(J,"a",function(){return g});function k(C,M){let m;return M.length===0?m=C:m=C.replace(/\{(\d+)\}/g,function(y,S){const _=S[0];return typeof M[_]!="undefined"?M[_]:y}),m}function g(C,M,...m){return k(M,m)}},"3y9D":function(H,J,D){(function(k,g){H.exports=J=g(D("Ib8C"))})(this,function(k){return function(){var g=k,C=g.lib,M=C.WordArray,m=C.Hasher,y=g.algo,S=[],_=y.SHA1=m.extend({_doReset:function(){this._hash=new M.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,h){for(var n=this._hash.words,c=n[0],a=n[1],i=n[2],s=n[3],d=n[4],f=0;f<80;f++){if(f<16)S[f]=t[h+f]|0;else{var l=S[f-3]^S[f-8]^S[f-14]^S[f-16];S[f]=l<<1|l>>>31}var o=(c<<5|c>>>27)+d+S[f];f<20?o+=(a&i|~a&s)+1518500249:f<40?o+=(a^i^s)+1859775393:f<60?o+=(a&i|a&s|i&s)-1894007588:o+=(a^i^s)-899497514,d=s,s=i,i=a<<30|a>>>2,a=c,c=o}n[0]=n[0]+c|0,n[1]=n[1]+a|0,n[2]=n[2]+i|0,n[3]=n[3]+s|0,n[4]=n[4]+d|0},_doFinalize:function(){var t=this._data,h=t.words,n=this._nDataBytes*8,c=t.sigBytes*8;return h[c>>>5]|=128<<24-c%32,h[(c+64>>>9<<4)+14]=Math.floor(n/4294967296),h[(c+64>>>9<<4)+15]=n,t.sigBytes=h.length*4,this._process(),this._hash},clone:function(){var t=m.clone.call(this);return t._hash=this._hash.clone(),t}});g.SHA1=m._createHelper(_),g.HmacSHA1=m._createHmacHelper(_)}(),k.SHA1})},4:function(H,J){},"55Ip":function(H,J,D){"use strict";D.d(J,"a",function(){return o});var k=D("Ty5D"),g=D("dI71"),C=D("q1tI"),M=D.n(C),m=D("YS25"),y=D("17x9"),S=D.n(y),_=D("wx14"),t=D("zLVn"),h=D("9R94"),n=function(E){Object(g.a)(w,E);function w(){for(var F,N=arguments.length,L=new Array(N),G=0;G<N;G++)L[G]=arguments[G];return F=E.call.apply(E,[this].concat(L))||this,F.history=Object(m.a)(F.props),F}var T=w.prototype;return T.render=function(){return M.a.createElement(k.c,{history:this.history,children:this.props.children})},w}(M.a.Component),c=function(E){Object(g.a)(w,E);function w(){for(var F,N=arguments.length,L=new Array(N),G=0;G<N;G++)L[G]=arguments[G];return F=E.call.apply(E,[this].concat(L))||this,F.history=Object(m.b)(F.props),F}var T=w.prototype;return T.render=function(){return M.a.createElement(k.c,{history:this.history,children:this.props.children})},w}(M.a.Component),a=function(w,T){return typeof w=="function"?w(T):w},i=function(w,T){return typeof w=="string"?Object(m.c)(w,null,null,T):w},s=function(w){return w},d=M.a.forwardRef;typeof d=="undefined"&&(d=s);function f(E){return!!(E.metaKey||E.altKey||E.ctrlKey||E.shiftKey)}var l=d(function(E,w){var T=E.innerRef,F=E.navigate,N=E.onClick,L=Object(t.a)(E,["innerRef","navigate","onClick"]),G=L.target,z=Object(_.a)({},L,{onClick:function(B){try{N&&N(B)}catch(U){throw B.preventDefault(),U}!B.defaultPrevented&&B.button===0&&(!G||G==="_self")&&!f(B)&&(B.preventDefault(),F())}});return s!==d?z.ref=w||T:z.ref=T,M.a.createElement("a",z)}),o=d(function(E,w){var T=E.component,F=T===void 0?l:T,N=E.replace,L=E.to,G=E.innerRef,z=Object(t.a)(E,["component","replace","to","innerRef"]);return M.a.createElement(k.e.Consumer,null,function(A){A||Object(h.a)(!1);var B=A.history,U=i(a(L,A.location),A.location),I=U?B.createHref(U):"",K=Object(_.a)({},z,{href:I,navigate:function(){var ue=a(L,A.location),de=N?B.replace:B.push;de(ue)}});return s!==d?K.ref=w||G:K.innerRef=G,M.a.createElement(F,K)})});if(!1)var r,x;var v=function(w){return w},p=M.a.forwardRef;typeof p=="undefined"&&(p=v);function R(){for(var E=arguments.length,w=new Array(E),T=0;T<E;T++)w[T]=arguments[T];return w.filter(function(F){return F}).join(" ")}var O=p(function(E,w){var T=E["aria-current"],F=T===void 0?"page":T,N=E.activeClassName,L=N===void 0?"active":N,G=E.activeStyle,z=E.className,A=E.exact,B=E.isActive,U=E.location,I=E.sensitive,K=E.strict,Z=E.style,ue=E.to,de=E.innerRef,Ce=Object(t.a)(E,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return M.a.createElement(k.e.Consumer,null,function(Re){Re||Object(h.a)(!1);var me=U||Re.location,Oe=i(a(ue,me),me),be=Oe.pathname,ce=be&&be.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),se=ce?Object(k.f)(me.pathname,{path:ce,exact:A,sensitive:I,strict:K}):null,ne=!!(B?B(se,me):se),ge=ne?R(z,L):z,ee=ne?Object(_.a)({},Z,{},G):Z,re=Object(_.a)({"aria-current":ne&&F||null,className:ge,style:ee,to:Oe},Ce);return v!==p?re.ref=w||de:re.innerRef=de,M.a.createElement(o,re)})});if(!1)var b},"5VLF":function(H,J,D){"use strict";var k,g;function C(M,m,y){var S=function(_,t){return M.js_beautify(_,t)};return S.js=M.js_beautify,S.css=m.css_beautify,S.html=y.html_beautify,S.js_beautify=M.js_beautify,S.css_beautify=m.css_beautify,S.html_beautify=y.html_beautify,S}!(k=[D("6UM0"),D("TXwP"),D("psGv")],g=function(M,m,y){return C(M,m,y)}.apply(J,k),g!==void 0&&(H.exports=g))},"5Y4S":function(H,J,D){"use strict";D.d(J,"a",function(){return C});var k=D("MNsG");const g=k.b.performance&&typeof k.b.performance.now=="function";class C{constructor(M){this._highResolution=g&&M,this._startTime=this._now(),this._stopTime=-1}static create(M=!0){return new C(M)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?k.b.performance.now():Date.now()}}},"5hvy":function(H,J,D){(function(k,g,C){H.exports=J=g(D("Ib8C"),D("MlIO"))})(this,function(k){return function(g){var C=k,M=C.lib,m=M.WordArray,y=M.Hasher,S=C.x64,_=S.Word,t=C.algo,h=[],n=[],c=[];(function(){for(var s=1,d=0,f=0;f<24;f++){h[s+5*d]=(f+1)*(f+2)/2%64;var l=d%5,o=(2*s+3*d)%5;s=l,d=o}for(var s=0;s<5;s++)for(var d=0;d<5;d++)n[s+5*d]=d+(2*s+3*d)%5*5;for(var r=1,x=0;x<24;x++){for(var v=0,p=0,R=0;R<7;R++){if(r&1){var O=(1<<R)-1;O<32?p^=1<<O:v^=1<<O-32}r&128?r=r<<1^113:r<<=1}c[x]=_.create(v,p)}})();var a=[];(function(){for(var s=0;s<25;s++)a[s]=_.create()})();var i=t.SHA3=y.extend({cfg:y.cfg.extend({outputLength:512}),_doReset:function(){for(var s=this._state=[],d=0;d<25;d++)s[d]=new _.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(s,d){for(var f=this._state,l=this.blockSize/2,o=0;o<l;o++){var r=s[d+2*o],x=s[d+2*o+1];r=(r<<8|r>>>24)&16711935|(r<<24|r>>>8)&4278255360,x=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360;var v=f[o];v.high^=x,v.low^=r}for(var p=0;p<24;p++){for(var R=0;R<5;R++){for(var O=0,b=0,E=0;E<5;E++){var v=f[R+5*E];O^=v.high,b^=v.low}var w=a[R];w.high=O,w.low=b}for(var R=0;R<5;R++)for(var T=a[(R+4)%5],F=a[(R+1)%5],N=F.high,L=F.low,O=T.high^(N<<1|L>>>31),b=T.low^(L<<1|N>>>31),E=0;E<5;E++){var v=f[R+5*E];v.high^=O,v.low^=b}for(var G=1;G<25;G++){var O,b,v=f[G],z=v.high,A=v.low,B=h[G];B<32?(O=z<<B|A>>>32-B,b=A<<B|z>>>32-B):(O=A<<B-32|z>>>64-B,b=z<<B-32|A>>>64-B);var U=a[n[G]];U.high=O,U.low=b}var I=a[0],K=f[0];I.high=K.high,I.low=K.low;for(var R=0;R<5;R++)for(var E=0;E<5;E++){var G=R+5*E,v=f[G],Z=a[G],ue=a[(R+1)%5+5*E],de=a[(R+2)%5+5*E];v.high=Z.high^~ue.high&de.high,v.low=Z.low^~ue.low&de.low}var v=f[0],Ce=c[p];v.high^=Ce.high,v.low^=Ce.low}},_doFinalize:function(){var s=this._data,d=s.words,f=this._nDataBytes*8,l=s.sigBytes*8,o=this.blockSize*32;d[l>>>5]|=1<<24-l%32,d[(g.ceil((l+1)/o)*o>>>5)-1]|=128,s.sigBytes=d.length*4,this._process();for(var r=this._state,x=this.cfg.outputLength/8,v=x/8,p=[],R=0;R<v;R++){var O=r[R],b=O.high,E=O.low;b=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,E=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,p.push(E),p.push(b)}return new m.init(p,x)},clone:function(){for(var s=y.clone.call(this),d=s._state=this._state.slice(0),f=0;f<25;f++)d[f]=d[f].clone();return s}});C.SHA3=y._createHelper(i),C.HmacSHA3=y._createHmacHelper(i)}(Math),k.SHA3})},"6+eU":function(H,J,D){"use strict";D.d(J,"a",function(){return p});var k=D("wx14"),g=D("rePB"),C=D("VTBJ"),M=D("1OyB"),m=D("vuIU"),y=D("Ji7U"),S=D("LK+K"),_=D("q1tI"),t=D.n(_),h=D("TSYQ"),n=D.n(h),c=function(O){var b,E="".concat(O.rootPrefixCls,"-item"),w=n()(E,"".concat(E,"-").concat(O.page),(b={},Object(g.a)(b,"".concat(E,"-active"),O.active),Object(g.a)(b,O.className,!!O.className),Object(g.a)(b,"".concat(E,"-disabled"),!O.page),b)),T=function(){O.onClick(O.page)},F=function(L){O.onKeyPress(L,O.onClick,O.page)};return t.a.createElement("li",{title:O.showTitle?O.page:null,className:w,onClick:T,onKeyPress:F,tabIndex:"0"},O.itemRender(O.page,"page",t.a.createElement("a",{rel:"nofollow"},O.page)))},a=c,i={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},s=function(R){Object(y.a)(b,R);var O=Object(S.a)(b);function b(){var E;Object(M.a)(this,b);for(var w=arguments.length,T=new Array(w),F=0;F<w;F++)T[F]=arguments[F];return E=O.call.apply(O,[this].concat(T)),E.state={goInputText:""},E.buildOptionText=function(N){return"".concat(N," ").concat(E.props.locale.items_per_page)},E.changeSize=function(N){E.props.changeSize(Number(N))},E.handleChange=function(N){E.setState({goInputText:N.target.value})},E.handleBlur=function(N){var L=E.props,G=L.goButton,z=L.quickGo,A=L.rootPrefixCls,B=E.state.goInputText;if(G||B==="")return;if(N.relatedTarget&&(N.relatedTarget.className.indexOf("".concat(A,"-prev"))>=0||N.relatedTarget.className.indexOf("".concat(A,"-next"))>=0))return;E.setState({goInputText:""}),z(E.getValidValue())},E.go=function(N){var L=E.state.goInputText;if(L==="")return;(N.keyCode===i.ENTER||N.type==="click")&&(E.setState({goInputText:""}),E.props.quickGo(E.getValidValue()))},E}return Object(m.a)(b,[{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(N){return N.toString()===T.toString()})?F:F.concat([T.toString()]).sort(function(N,L){var G=isNaN(Number(N))?0:Number(N),z=isNaN(Number(L))?0:Number(L);return G-z})}},{key:"render",value:function(){var w=this,T=this.props,F=T.pageSize,N=T.locale,L=T.rootPrefixCls,G=T.changeSize,z=T.quickGo,A=T.goButton,B=T.selectComponentClass,U=T.buildOptionText,I=T.selectPrefixCls,K=T.disabled,Z=this.state.goInputText,ue="".concat(L,"-options"),de=B,Ce=null,Re=null,me=null;if(!G&&!z)return null;var Oe=this.getPageSizeOptions();if(G&&de){var be=Oe.map(function(ce,se){return t.a.createElement(de.Option,{key:se,value:ce.toString()},(U||w.buildOptionText)(ce))});Ce=t.a.createElement(de,{disabled:K,prefixCls:I,showSearch:!1,className:"".concat(ue,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(F||Oe[0]).toString(),onChange:this.changeSize,getPopupContainer:function(se){return se.parentNode}},be)}return z&&(A&&(me=typeof A=="boolean"?t.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:K,className:"".concat(ue,"-quick-jumper-button")},N.jump_to_confirm):t.a.createElement("span",{onClick:this.go,onKeyUp:this.go},A)),Re=t.a.createElement("div",{className:"".concat(ue,"-quick-jumper")},N.jump_to,t.a.createElement("input",{disabled:K,type:"text",value:Z,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),N.page,me)),t.a.createElement("li",{className:"".concat(ue)},Ce,Re)}}]),b}(t.a.Component);s.defaultProps={pageSizeOptions:["10","20","50","100"]};var d=s,f=D("N2Kk");function l(){}function o(R){return typeof R=="number"&&isFinite(R)&&Math.floor(R)===R}function r(R,O,b){return b}function x(R,O,b){var E=typeof R=="undefined"?O.pageSize:R;return Math.floor((b.total-1)/E)+1}var v=function(R){Object(y.a)(b,R);var O=Object(S.a)(b);function b(E){var w;Object(M.a)(this,b),w=O.call(this,E),w.getJumpPrevPage=function(){return Math.max(1,w.state.current-(w.props.showLessItems?3:5))},w.getJumpNextPage=function(){return Math.min(x(void 0,w.state,w.props),w.state.current+(w.props.showLessItems?3:5))},w.getItemIcon=function(G,z){var A=w.props.prefixCls,B=G||t.a.createElement("button",{type:"button","aria-label":z,className:"".concat(A,"-item-link")});return typeof G=="function"&&(B=t.a.createElement(G,Object(C.a)({},w.props))),B},w.savePaginationNode=function(G){w.paginationNode=G},w.isValid=function(G){return o(G)&&G!==w.state.current},w.shouldDisplayQuickJumper=function(){var G=w.props,z=G.showQuickJumper,A=G.pageSize,B=G.total;return B<=A?!1:z},w.handleKeyDown=function(G){(G.keyCode===i.ARROW_UP||G.keyCode===i.ARROW_DOWN)&&G.preventDefault()},w.handleKeyUp=function(G){var z=w.getValidValue(G),A=w.state.currentInputValue;z!==A&&w.setState({currentInputValue:z}),G.keyCode===i.ENTER?w.handleChange(z):G.keyCode===i.ARROW_UP?w.handleChange(z-1):G.keyCode===i.ARROW_DOWN&&w.handleChange(z+1)},w.changePageSize=function(G){var z=w.state.current,A=x(G,w.state,w.props);z=z>A?A:z,A===0&&(z=w.state.current),typeof G=="number"&&("pageSize"in w.props||w.setState({pageSize:G}),"current"in w.props||w.setState({current:z,currentInputValue:z})),w.props.onShowSizeChange(z,G),"onChange"in w.props&&w.props.onChange&&w.props.onChange(z,G)},w.handleChange=function(G){var z=w.props.disabled,A=G;if(w.isValid(A)&&!z){var B=x(void 0,w.state,w.props);A>B?A=B:A<1&&(A=1),"current"in w.props||w.setState({current:A,currentInputValue:A});var U=w.state.pageSize;return w.props.onChange(A,U),A}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<x(void 0,w.state,w.props)},w.runIfEnter=function(G,z){if(G.key==="Enter"||G.charCode===13){for(var A=arguments.length,B=new Array(A>2?A-2:0),U=2;U<A;U++)B[U-2]=arguments[U];z.apply(void 0,B)}},w.runIfEnterPrev=function(G){w.runIfEnter(G,w.prev)},w.runIfEnterNext=function(G){w.runIfEnter(G,w.next)},w.runIfEnterJumpPrev=function(G){w.runIfEnter(G,w.jumpPrev)},w.runIfEnterJumpNext=function(G){w.runIfEnter(G,w.jumpNext)},w.handleGoTO=function(G){(G.keyCode===i.ENTER||G.type==="click")&&w.handleChange(w.state.currentInputValue)};var T=E.onChange!==l,F="current"in E;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 N=E.defaultCurrent;"current"in E&&(N=E.current);var L=E.defaultPageSize;return"pageSize"in E&&(L=E.pageSize),N=Math.min(N,x(L,void 0,E)),w.state={current:N,currentInputValue:N,pageSize:L},w}return Object(m.a)(b,[{key:"componentDidUpdate",value:function(w,T){var F=this.props.prefixCls;if(T.current!==this.state.current&&this.paginationNode){var N=this.paginationNode.querySelector(".".concat(F,"-item-").concat(T.current));N&&document.activeElement===N&&N.blur()}}},{key:"getValidValue",value:function(w){var T=w.target.value,F=x(void 0,this.state,this.props),N=this.state.currentInputValue,L;return T===""?L=T:isNaN(Number(T))?L=N:T>=F?L=F:L=Number(T),L}},{key:"getShowSizeChanger",value:function(){var w=this.props,T=w.showSizeChanger,F=w.total,N=w.totalBoundaryShowSizeChanger;return typeof T!="undefined"?T:F>N}},{key:"renderPrev",value:function(w){var T=this.props,F=T.prevIcon,N=T.itemRender,L=N(w,"prev",this.getItemIcon(F,"prev page")),G=!this.hasPrev();return Object(_.isValidElement)(L)?Object(_.cloneElement)(L,{disabled:G}):L}},{key:"renderNext",value:function(w){var T=this.props,F=T.nextIcon,N=T.itemRender,L=N(w,"next",this.getItemIcon(F,"next page")),G=!this.hasNext();return Object(_.isValidElement)(L)?Object(_.cloneElement)(L,{disabled:G}):L}},{key:"render",value:function(){var w=this,T=this.props,F=T.prefixCls,N=T.className,L=T.style,G=T.disabled,z=T.hideOnSinglePage,A=T.total,B=T.locale,U=T.showQuickJumper,I=T.showLessItems,K=T.showTitle,Z=T.showTotal,ue=T.simple,de=T.itemRender,Ce=T.showPrevNextJumpers,Re=T.jumpPrevIcon,me=T.jumpNextIcon,Oe=T.selectComponentClass,be=T.selectPrefixCls,ce=T.pageSizeOptions,se=this.state,ne=se.current,ge=se.pageSize,ee=se.currentInputValue;if(z===!0&&A<=ge)return null;var re=x(void 0,this.state,this.props),Te=[],ie=null,q=null,Y=null,X=null,he=null,fe=U&&U.goButton,Ee=I?1:2,He=ne-1>0?ne-1:0,Qe=ne+1<re?ne+1:re,et=Object.keys(this.props).reduce(function(xe,Ae){return(Ae.substr(0,5)==="data-"||Ae.substr(0,5)==="aria-"||Ae==="role")&&(xe[Ae]=w.props[Ae]),xe},{});if(ue)return fe&&(typeof fe=="boolean"?he=t.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},B.jump_to_confirm):he=t.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},fe),he=t.a.createElement("li",{title:K?"".concat(B.jump_to).concat(ne,"/").concat(re):null,className:"".concat(F,"-simple-pager")},he)),t.a.createElement("ul",Object(k.a)({className:n()(F,"".concat(F,"-simple"),Object(g.a)({},"".concat(F,"-disabled"),G),N),style:L,ref:this.savePaginationNode},et),t.a.createElement("li",{title:K?B.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:n()("".concat(F,"-prev"),Object(g.a)({},"".concat(F,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(He)),t.a.createElement("li",{title:K?"".concat(ne,"/").concat(re):null,className:"".concat(F,"-simple-pager")},t.a.createElement("input",{type:"text",value:ee,disabled:G,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),t.a.createElement("span",{className:"".concat(F,"-slash")},"/"),re),t.a.createElement("li",{title:K?B.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:n()("".concat(F,"-next"),Object(g.a)({},"".concat(F,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(Qe)),he);if(re<=3+Ee*2){var it={locale:B,rootPrefixCls:F,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:K,itemRender:de};re||Te.push(t.a.createElement(a,Object(k.a)({},it,{key:"noPager",page:re,className:"".concat(F,"-disabled")})));for(var ut=1;ut<=re;ut+=1){var dt=ne===ut;Te.push(t.a.createElement(a,Object(k.a)({},it,{key:ut,page:ut,active:dt})))}}else{var Fe=I?B.prev_3:B.prev_5,Ie=I?B.next_3:B.next_5;Ce&&(ie=t.a.createElement("li",{title:K?Fe:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:n()("".concat(F,"-jump-prev"),Object(g.a)({},"".concat(F,"-jump-prev-custom-icon"),!!Re))},de(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(Re,"prev page"))),q=t.a.createElement("li",{title:K?Ie:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:n()("".concat(F,"-jump-next"),Object(g.a)({},"".concat(F,"-jump-next-custom-icon"),!!me))},de(this.getJumpNextPage(),"jump-next",this.getItemIcon(me,"next page")))),X=t.a.createElement(a,{locale:B,last:!0,rootPrefixCls:F,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:re,page:re,active:!1,showTitle:K,itemRender:de}),Y=t.a.createElement(a,{locale:B,rootPrefixCls:F,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:K,itemRender:de});var st=Math.max(1,ne-Ee),ft=Math.min(ne+Ee,re);ne-1<=Ee&&(ft=1+Ee*2),re-ne<=Ee&&(st=re-Ee*2);for(var Ze=st;Ze<=ft;Ze+=1){var tt=ne===Ze;Te.push(t.a.createElement(a,{locale:B,rootPrefixCls:F,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ze,page:Ze,active:tt,showTitle:K,itemRender:de}))}ne-1>=Ee*2&&ne!==1+2&&(Te[0]=Object(_.cloneElement)(Te[0],{className:"".concat(F,"-item-after-jump-prev")}),Te.unshift(ie)),re-ne>=Ee*2&&ne!==re-2&&(Te[Te.length-1]=Object(_.cloneElement)(Te[Te.length-1],{className:"".concat(F,"-item-before-jump-next")}),Te.push(q)),st!==1&&Te.unshift(Y),ft!==re&&Te.push(X)}var Be=null;Z&&(Be=t.a.createElement("li",{className:"".concat(F,"-total-text")},Z(A,[A===0?0:(ne-1)*ge+1,ne*ge>A?A:ne*ge])));var Pe=!this.hasPrev()||!re,Ne=!this.hasNext()||!re;return t.a.createElement("ul",Object(k.a)({className:n()(F,N,Object(g.a)({},"".concat(F,"-disabled"),G)),style:L,unselectable:"unselectable",ref:this.savePaginationNode},et),Be,t.a.createElement("li",{title:K?B.prev_page:null,onClick:this.prev,tabIndex:Pe?null:0,onKeyPress:this.runIfEnterPrev,className:n()("".concat(F,"-prev"),Object(g.a)({},"".concat(F,"-disabled"),Pe)),"aria-disabled":Pe},this.renderPrev(He)),Te,t.a.createElement("li",{title:K?B.next_page:null,onClick:this.next,tabIndex:Ne?null:0,onKeyPress:this.runIfEnterNext,className:n()("".concat(F,"-next"),Object(g.a)({},"".concat(F,"-disabled"),Ne)),"aria-disabled":Ne},this.renderNext(Qe)),t.a.createElement(d,{disabled:G,locale:B,rootPrefixCls:F,selectComponentClass:Oe,selectPrefixCls:be,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:ne,pageSize:ge,pageSizeOptions:ce,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:fe}))}}],[{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 N=T.current,L=x(w.pageSize,T,w);N=N>L?L:N,"current"in w||(F.current=N,F.currentInputValue=N),F.pageSize=w.pageSize}return F}}]),b}(t.a.Component);v.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:l,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:l,locale:f.a,style:{},itemRender:r,totalBoundaryShowSizeChanger:50};var p=v},"6RRn":function(H,J,D){"use strict";var k=D("wCXF"),g=D("n6Qo");D.d(J,"b",function(){return g.a});var C=D("IBYe"),M=D("6eGT"),m=D("hW8S");D.d(J,"a",function(){return m.a}),J.c=k.b},"6UM0":function(H,J,D){var k,g;(function(){var C;(function(){"use strict";var m=[function(t,h,n){var c=n(1).Beautifier,a=n(5).Options;function i(s,d){var f=new c(s,d);return f.beautify()}t.exports=i,t.exports.defaultOptions=function(){return new a}},function(t,h,n){var c=n(2).Output,a=n(3).Token,i=n(4),s=n(5).Options,d=n(7).Tokenizer,f=n(7).line_starters,l=n(7).positionable_operators,o=n(7).TOKEN;function r(I,K){return K.indexOf(I)!==-1}function x(I){return I.replace(/^\s+/g,"")}function v(I){for(var K={},Z=0;Z<I.length;Z++)K[I[Z].replace(/-/g,"_")]=I[Z];return K}function p(I,K){return I&&I.type===o.RESERVED&&I.text===K}function R(I,K){return I&&I.type===o.RESERVED&&r(I.text,K)}var O=["case","return","do","if","throw","else","await","break","continue","async"],b=["before-newline","after-newline","preserve-newline"],E=v(b),w=[E.before_newline,E.preserve_newline],T={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function F(I,K){if(K.multiline_frame||K.mode===T.ForInitializer||K.mode===T.Conditional)return;I.remove_indent(K.start_line_index)}function N(I){I=I.replace(i.allLineBreaks,`
`);for(var K=[],Z=I.indexOf(`
`);Z!==-1;)K.push(I.substring(0,Z)),I=I.substring(Z+1),Z=I.indexOf(`
`);return I.length&&K.push(I),K}function L(I){return I===T.ArrayLiteral}function G(I){return r(I,[T.Expression,T.ForInitializer,T.Conditional])}function z(I,K){for(var Z=0;Z<I.length;Z++){var ue=I[Z].trim();if(ue.charAt(0)!==K)return!1}return!0}function A(I,K){for(var Z=0,ue=I.length,de;Z<ue;Z++)if(de=I[Z],de&&de.indexOf(K)!==0)return!1;return!0}function B(I,K){K=K||{},this._source_text=I||"",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 s(K)}B.prototype.create_flags=function(I,K){var Z=0;I&&(Z=I.indentation_level,!this._output.just_added_newline()&&I.line_indent_level>Z&&(Z=I.line_indent_level));var ue={mode:K,parent:I,last_token:I?I.last_token:new a(o.START_BLOCK,""),last_word:I?I.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:Z,alignment:0,line_indent_level:I?I.line_indent_level:Z,start_line_index:this._output.get_line_number(),ternary_depth:0};return ue},B.prototype._reset=function(I){var K=I.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new c(this._options,K),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(T.BlockStatement);var Z=new d(I,this._options);return this._tokens=Z.tokenize(),I},B.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var I,K=this._reset(this._source_text),Z=this._options.eol;this._options.eol==="auto"&&(Z=`
`,K&&i.lineBreak.test(K||"")&&(Z=K.match(i.lineBreak)[0]));for(var ue=this._tokens.next();ue;)this.handle_token(ue),this._last_last_text=this._flags.last_token.text,this._flags.last_token=ue,ue=this._tokens.next();return I=this._output.get_code(Z),I},B.prototype.handle_token=function(I,K){I.type===o.START_EXPR?this.handle_start_expr(I):I.type===o.END_EXPR?this.handle_end_expr(I):I.type===o.START_BLOCK?this.handle_start_block(I):I.type===o.END_BLOCK?this.handle_end_block(I):I.type===o.WORD?this.handle_word(I):I.type===o.RESERVED?this.handle_word(I):I.type===o.SEMICOLON?this.handle_semicolon(I):I.type===o.STRING?this.handle_string(I):I.type===o.EQUALS?this.handle_equals(I):I.type===o.OPERATOR?this.handle_operator(I):I.type===o.COMMA?this.handle_comma(I):I.type===o.BLOCK_COMMENT?this.handle_block_comment(I,K):I.type===o.COMMENT?this.handle_comment(I,K):I.type===o.DOT?this.handle_dot(I):I.type===o.EOF?this.handle_eof(I):I.type===o.UNKNOWN?this.handle_unknown(I,K):this.handle_unknown(I,K)},B.prototype.handle_whitespace_and_comments=function(I,K){var Z=I.newlines,ue=this._options.keep_array_indentation&&L(this._flags.mode);if(I.comments_before)for(var de=I.comments_before.next();de;)this.handle_whitespace_and_comments(de,K),this.handle_token(de,K),de=I.comments_before.next();if(ue)for(var Ce=0;Ce<Z;Ce+=1)this.print_newline(Ce>0,K);else if(this._options.max_preserve_newlines&&Z>this._options.max_preserve_newlines&&(Z=this._options.max_preserve_newlines),this._options.preserve_newlines&&Z>1){this.print_newline(!1,K);for(var Re=1;Re<Z;Re+=1)this.print_newline(!0,K)}};var U=["async","break","continue","return","throw","yield"];B.prototype.allow_wrap_or_preserved_newline=function(I,K){if(K=K===void 0?!1:K,this._output.just_added_newline())return;var Z=this._options.preserve_newlines&&I.newlines||K,ue=r(this._flags.last_token.text,l)||r(I.text,l);if(ue){var de=r(this._flags.last_token.text,l)&&r(this._options.operator_position,w)||r(I.text,l);Z=Z&&de}if(Z)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(R(this._flags.last_token,U))return;this._output.set_wrap_point()}},B.prototype.print_newline=function(I,K){if(!K&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==o.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var Z=this._tokens.peek();this._flags.mode===T.Statement&&!(this._flags.if_block&&p(Z,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(I)&&(this._flags.multiline_frame=!0)},B.prototype.print_token_line_indentation=function(I){this._output.just_added_newline()&&(this._options.keep_array_indentation&&I.newlines&&(I.text==="["||L(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(I.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(I){if(this._output.raw){this._output.add_raw_token(I);return}if(this._options.comma_first&&I.previous&&I.previous.type===o.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var K=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(K),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(I),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(I),this._output.non_breaking_space=!0,this._output.add_token(I.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(I){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,I),this._flags=this.create_flags(this._previous_flags,I),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||R(this._flags.last_token,["get","set"]))},B.prototype.start_of_statement=function(I){var K=!1;return K=K||R(this._flags.last_token,["var","let","const"])&&I.type===o.WORD,K=K||p(this._flags.last_token,"do"),K=K||!(this._flags.parent.mode===T.ObjectLiteral&&this._flags.mode===T.Statement)&&R(this._flags.last_token,U)&&!I.newlines,K=K||p(this._flags.last_token,"else")&&!(p(I,"if")&&!I.comments_before),K=K||this._flags.last_token.type===o.END_EXPR&&(this._previous_flags.mode===T.ForInitializer||this._previous_flags.mode===T.Conditional),K=K||this._flags.last_token.type===o.WORD&&this._flags.mode===T.BlockStatement&&!this._flags.in_case&&!(I.text==="--"||I.text==="++")&&this._last_last_text!=="function"&&I.type!==o.WORD&&I.type!==o.RESERVED,K=K||this._flags.mode===T.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||R(this._flags.last_token,["get","set"])),K?(this.set_mode(T.Statement),this.indent(),this.handle_whitespace_and_comments(I,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(I,R(I,["do","for","if","while"])),!0):!1},B.prototype.handle_start_expr=function(I){this.start_of_statement(I)||this.handle_whitespace_and_comments(I);var K=T.Expression;if(I.text==="["){if(this._flags.last_token.type===o.WORD||this._flags.last_token.text===")"){R(this._flags.last_token,f)&&(this._output.space_before_token=!0),this.print_token(I),this.set_mode(K),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}K=T.ArrayLiteral,L(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())),r(this._flags.last_token.type,[o.START_EXPR,o.END_EXPR,o.WORD,o.OPERATOR,o.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===o.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,K=T.ForInitializer):r(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,K=T.Conditional):r(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&I.whitespace_before===""?this._output.space_before_token=!1:(r(this._flags.last_token.text,f)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===o.EQUALS||this._flags.last_token.type===o.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(I);else if(this._flags.last_token.type===o.WORD){this._output.space_before_token=!1;var Z=this._tokens.peek(-3);if(this._options.space_after_named_function&&Z){var ue=this._tokens.peek(-4);R(Z,["async","function"])||Z.text==="*"&&R(ue,["async","function"])?this._output.space_before_token=!0:this._flags.mode===T.ObjectLiteral?(Z.text==="{"||Z.text===","||Z.text==="*"&&(ue.text==="{"||ue.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(I);(this._flags.last_token.type===o.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(r(this._last_last_text,["function","yield"])||this._flags.mode===T.ObjectLiteral&&r(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===o.START_BLOCK?this.print_newline():(this._flags.last_token.type===o.END_EXPR||this._flags.last_token.type===o.START_EXPR||this._flags.last_token.type===o.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===o.COMMA)&&this.allow_wrap_or_preserved_newline(I,I.newlines),this.print_token(I),this.set_mode(K),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},B.prototype.handle_end_expr=function(I){for(;this._flags.mode===T.Statement;)this.restore_mode();this.handle_whitespace_and_comments(I),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(I,I.text==="]"&&L(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===o.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(I),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(I){this.handle_whitespace_and_comments(I);var K=this._tokens.peek(),Z=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===o.END_EXPR?(this.set_mode(T.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(T.BlockStatement):Z&&(r(Z.text,[":",","])&&r(K.type,[o.STRING,o.WORD,o.RESERVED])||r(K.text,["get","set","..."])&&r(Z.type,[o.WORD,o.RESERVED]))?r(this._last_last_text,["class","interface"])&&!r(Z.text,[":",","])?this.set_mode(T.BlockStatement):this.set_mode(T.ObjectLiteral):this._flags.last_token.type===o.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(T.BlockStatement):r(this._flags.last_token.type,[o.EQUALS,o.START_EXPR,o.COMMA,o.OPERATOR])||R(this._flags.last_token,["return","throw","import","default"])?this.set_mode(T.ObjectLiteral):this.set_mode(T.BlockStatement),this._flags.last_token&&(R(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var ue=!K.comments_before&&K.text==="}",de=ue&&this._flags.last_word==="function"&&this._flags.last_token.type===o.END_EXPR;if(this._options.brace_preserve_inline){var Ce=0,Re=null;this._flags.inline_frame=!0;do if(Ce+=1,Re=this._tokens.peek(Ce-1),Re.newlines){this._flags.inline_frame=!1;break}while(Re.type!==o.EOF&&!(Re.type===o.END_BLOCK&&Re.opened===I))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&I.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==o.OPERATOR&&(de||this._flags.last_token.type===o.EQUALS||R(this._flags.last_token,O)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(L(this._previous_flags.mode)&&(this._flags.last_token.type===o.START_EXPR||this._flags.last_token.type===o.COMMA)&&((this._flags.last_token.type===o.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===o.COMMA||this._flags.last_token.type===o.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(I),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==o.OPERATOR&&this._flags.last_token.type!==o.START_EXPR&&(this._flags.last_token.type===o.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(I),this.indent(),!ue&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},B.prototype.handle_end_block=function(I){for(this.handle_whitespace_and_comments(I);this._flags.mode===T.Statement;)this.restore_mode();var K=this._flags.last_token.type===o.START_BLOCK;this._flags.inline_frame&&!K?this._output.space_before_token=!0:this._options.brace_style==="expand"?K||this.print_newline():K||(L(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(I)},B.prototype.handle_word=function(I){if(I.type===o.RESERVED){if(r(I.text,["set","get"])&&this._flags.mode!==T.ObjectLiteral)I.type=o.WORD;else if(I.text==="import"&&r(this._tokens.peek().text,["(","."]))I.type=o.WORD;else if(r(I.text,["as","from"])&&!this._flags.import_block)I.type=o.WORD;else if(this._flags.mode===T.ObjectLiteral){var K=this._tokens.peek();K.text===":"&&(I.type=o.WORD)}}if(this.start_of_statement(I)?R(this._flags.last_token,["var","let","const"])&&I.type===o.WORD&&(this._flags.declaration_statement=!0):I.newlines&&!G(this._flags.mode)&&(this._flags.last_token.type!==o.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==o.EQUALS&&(this._options.preserve_newlines||!R(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(I),this.print_newline()):this.handle_whitespace_and_comments(I),this._flags.do_block&&!this._flags.do_while)if(p(I,"while")){this._output.space_before_token=!0,this.print_token(I),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(I,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===T.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&R(I,["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(I),this._flags.in_case=!0;return}if((this._flags.last_token.type===o.COMMA||this._flags.last_token.type===o.START_EXPR||this._flags.last_token.type===o.EQUALS||this._flags.last_token.type===o.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(I)),p(I,"function")){(r(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(r(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===o.OPERATOR))&&(!this._output.just_added_blankline()&&!I.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===o.RESERVED||this._flags.last_token.type===o.WORD?R(this._flags.last_token,["get","set","new","export"])||R(this._flags.last_token,U)?this._output.space_before_token=!0:p(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===o.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(G(this._flags.mode)||L(this._flags.mode))||this.print_newline(),this.print_token(I),this._flags.last_word=I.text;return}var Z="NONE";if(this._flags.last_token.type===o.END_BLOCK?this._previous_flags.inline_frame?Z="SPACE":R(I,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&I.newlines?Z="NEWLINE":(Z="SPACE",this._output.space_before_token=!0):Z="NEWLINE":this._flags.last_token.type===o.SEMICOLON&&this._flags.mode===T.BlockStatement?Z="NEWLINE":this._flags.last_token.type===o.SEMICOLON&&G(this._flags.mode)?Z="SPACE":this._flags.last_token.type===o.STRING?Z="NEWLINE":this._flags.last_token.type===o.RESERVED||this._flags.last_token.type===o.WORD||this._flags.last_token.text==="*"&&(r(this._last_last_text,["function","yield"])||this._flags.mode===T.ObjectLiteral&&r(this._last_last_text,["{",","]))?Z="SPACE":this._flags.last_token.type===o.START_BLOCK?this._flags.inline_frame?Z="SPACE":Z="NEWLINE":this._flags.last_token.type===o.END_EXPR&&(this._output.space_before_token=!0,Z="NEWLINE"),R(I,f)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?Z="SPACE":Z="NEWLINE"),R(I,["else","catch","finally"]))if((!(this._flags.last_token.type===o.END_BLOCK&&this._previous_flags.mode===T.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&I.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var ue=this._output.current_line;ue.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else Z==="NEWLINE"?R(this._flags.last_token,O)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&R(I,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==o.END_EXPR?(this._flags.last_token.type!==o.START_EXPR||!R(I,["var","let","const"]))&&this._flags.last_token.text!==":"&&(p(I,"if")&&p(I.previous,"else")?this._output.space_before_token=!0:this.print_newline()):R(I,f)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&L(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():Z==="SPACE"&&(this._output.space_before_token=!0);I.previous&&(I.previous.type===o.WORD||I.previous.type===o.RESERVED)&&(this._output.space_before_token=!0),this.print_token(I),this._flags.last_word=I.text,I.type===o.RESERVED&&(I.text==="do"?this._flags.do_block=!0:I.text==="if"?this._flags.if_block=!0:I.text==="import"?this._flags.import_block=!0:this._flags.import_block&&p(I,"from")&&(this._flags.import_block=!1))},B.prototype.handle_semicolon=function(I){this.start_of_statement(I)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(I);for(var K=this._tokens.peek();this._flags.mode===T.Statement&&!(this._flags.if_block&&p(K,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(I)},B.prototype.handle_string=function(I){I.text.startsWith("`")&&I.newlines===0&&I.whitespace_before===""&&(I.previous.text===")"||this._flags.last_token.type===o.WORD)||(this.start_of_statement(I)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(I),this._flags.last_token.type===o.RESERVED||this._flags.last_token.type===o.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===o.COMMA||this._flags.last_token.type===o.START_EXPR||this._flags.last_token.type===o.EQUALS||this._flags.last_token.type===o.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(I):I.text.startsWith("`")&&this._flags.last_token.type===o.END_EXPR&&(I.previous.text==="]"||I.previous.text===")")&&I.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(I)},B.prototype.handle_equals=function(I){this.start_of_statement(I)||this.handle_whitespace_and_comments(I),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(I),this._output.space_before_token=!0},B.prototype.handle_comma=function(I){this.handle_whitespace_and_comments(I,!0),this.print_token(I),this._output.space_before_token=!0,this._flags.declaration_statement?(G(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(I)):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(I)},B.prototype.handle_operator=function(I){var K=I.text==="*"&&(R(this._flags.last_token,["function","yield"])||r(this._flags.last_token.type,[o.START_BLOCK,o.COMMA,o.END_BLOCK,o.SEMICOLON])),Z=r(I.text,["-","+"])&&(r(this._flags.last_token.type,[o.START_BLOCK,o.START_EXPR,o.EQUALS,o.OPERATOR])||r(this._flags.last_token.text,f)||this._flags.last_token.text===",");if(!this.start_of_statement(I)){var ue=!K;this.handle_whitespace_and_comments(I,ue)}if(I.text==="*"&&this._flags.last_token.type===o.DOT){this.print_token(I);return}if(I.text==="::"){this.print_token(I);return}if(this._flags.last_token.type===o.OPERATOR&&r(this._options.operator_position,w)&&this.allow_wrap_or_preserved_newline(I),I.text===":"&&this._flags.in_case){this.print_token(I),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==o.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var de=!0,Ce=!0,Re=!1;if(I.text===":"?this._flags.ternary_depth===0?de=!1:(this._flags.ternary_depth-=1,Re=!0):I.text==="?"&&(this._flags.ternary_depth+=1),!Z&&!K&&this._options.preserve_newlines&&r(I.text,l)){var me=I.text===":",Oe=me&&Re,be=me&&!Re;switch(this._options.operator_position){case E.before_newline:this._output.space_before_token=!be,this.print_token(I),(!me||Oe)&&this.allow_wrap_or_preserved_newline(I),this._output.space_before_token=!0;return;case E.after_newline:this._output.space_before_token=!0,!me||Oe?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(I):this._output.space_before_token=!1,this.print_token(I),this._output.space_before_token=!0;return;case E.preserve_newline:be||this.allow_wrap_or_preserved_newline(I),de=!(this._output.just_added_newline()||be),this._output.space_before_token=de,this.print_token(I),this._output.space_before_token=!0;return}}if(K){this.allow_wrap_or_preserved_newline(I),de=!1;var ce=this._tokens.peek();Ce=ce&&r(ce.type,[o.WORD,o.RESERVED])}else if(I.text==="...")this.allow_wrap_or_preserved_newline(I),de=this._flags.last_token.type===o.START_BLOCK,Ce=!1;else if(r(I.text,["--","++","!","~"])||Z){if((this._flags.last_token.type===o.COMMA||this._flags.last_token.type===o.START_EXPR)&&this.allow_wrap_or_preserved_newline(I),de=!1,Ce=!1,I.newlines&&(I.text==="--"||I.text==="++"||I.text==="~")){var se=R(this._flags.last_token,O)&&I.newlines;se&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(se,!0)}this._flags.last_token.text===";"&&G(this._flags.mode)&&(de=!0),this._flags.last_token.type===o.RESERVED?de=!0:this._flags.last_token.type===o.END_EXPR?de=!(this._flags.last_token.text==="]"&&(I.text==="--"||I.text==="++")):this._flags.last_token.type===o.OPERATOR&&(de=r(I.text,["--","-","++","+"])&&r(this._flags.last_token.text,["--","-","++","+"]),r(I.text,["+","-"])&&r(this._flags.last_token.text,["--","++"])&&(Ce=!0)),(this._flags.mode===T.BlockStatement&&!this._flags.inline_frame||this._flags.mode===T.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||de,this.print_token(I),this._output.space_before_token=Ce},B.prototype.handle_block_comment=function(I,K){if(this._output.raw){this._output.add_raw_token(I),I.directives&&I.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(I.directives){this.print_newline(!1,K),this.print_token(I),I.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!i.newline.test(I.text)&&!I.newlines){this._output.space_before_token=!0,this.print_token(I),this._output.space_before_token=!0;return}else this.print_block_commment(I,K)},B.prototype.print_block_commment=function(I,K){var Z=N(I.text),ue,de=!1,Ce=!1,Re=I.whitespace_before,me=Re.length;if(this.print_newline(!1,K),this.print_token_line_indentation(I),this._output.add_token(Z[0]),this.print_newline(!1,K),Z.length>1){for(Z=Z.slice(1),de=z(Z,"*"),Ce=A(Z,Re),de&&(this._flags.alignment=1),ue=0;ue<Z.length;ue++)de?(this.print_token_line_indentation(I),this._output.add_token(x(Z[ue]))):Ce&&Z[ue]?(this.print_token_line_indentation(I),this._output.add_token(Z[ue].substring(me))):(this._output.current_line.set_indent(-1),this._output.add_token(Z[ue])),this.print_newline(!1,K);this._flags.alignment=0}},B.prototype.handle_comment=function(I,K){I.newlines?this.print_newline(!1,K):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(I),this.print_newline(!1,K)},B.prototype.handle_dot=function(I){this.start_of_statement(I)||this.handle_whitespace_and_comments(I,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),R(this._flags.last_token,O)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(I,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(I)},B.prototype.handle_unknown=function(I,K){this.print_token(I),I.text[I.text.length-1]===`
`&&this.print_newline(!1,K)},B.prototype.handle_eof=function(I){for(;this._flags.mode===T.Statement;)this.restore_mode();this.handle_whitespace_and_comments(I)},t.exports.Beautifier=B},function(t){function h(a){this.__parent=a,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}h.prototype.clone_empty=function(){var a=new h(this.__parent);return a.set_indent(this.__indent_count,this.__alignment_count),a},h.prototype.item=function(a){return a<0?this.__items[this.__items.length+a]:this.__items[a]},h.prototype.has_match=function(a){for(var i=this.__items.length-1;i>=0;i--)if(this.__items[i].match(a))return!0;return!1},h.prototype.set_indent=function(a,i){this.is_empty()&&(this.__indent_count=a||0,this.__alignment_count=i||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},h.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},h.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},h.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var a=this.__parent.current_line;return a.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),a.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),a.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,a.__items[0]===" "&&(a.__items.splice(0,1),a.__character_count-=1),!0}return!1},h.prototype.is_empty=function(){return this.__items.length===0},h.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},h.prototype.push=function(a){this.__items.push(a);var i=a.lastIndexOf(`
`);i!==-1?this.__character_count=a.length-i:this.__character_count+=a.length},h.prototype.pop=function(){var a=null;return this.is_empty()||(a=this.__items.pop(),this.__character_count-=a.length),a},h.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},h.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},h.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},h.prototype.toString=function(){var a="";return this.is_empty()?this.__parent.indent_empty_lines&&(a=this.__parent.get_indent_string(this.__indent_count)):(a=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),a+=this.__items.join("")),a};function n(a,i){this.__cache=[""],this.__indent_size=a.indent_size,this.__indent_string=a.indent_char,a.indent_with_tabs||(this.__indent_string=new Array(a.indent_size+1).join(a.indent_char)),i=i||"",a.indent_level>0&&(i=new Array(a.indent_level+1).join(this.__indent_string)),this.__base_string=i,this.__base_string_length=i.length}n.prototype.get_indent_size=function(a,i){var s=this.__base_string_length;return i=i||0,a<0&&(s=0),s+=a*this.__indent_size,s+=i,s},n.prototype.get_indent_string=function(a,i){var s=this.__base_string;return i=i||0,a<0&&(a=0,s=""),i+=a*this.__indent_size,this.__ensure_cache(i),s+=this.__cache[i],s},n.prototype.__ensure_cache=function(a){for(;a>=this.__cache.length;)this.__add_column()},n.prototype.__add_column=function(){var a=this.__cache.length,i=0,s="";this.__indent_size&&a>=this.__indent_size&&(i=Math.floor(a/this.__indent_size),a-=i*this.__indent_size,s=new Array(i+1).join(this.__indent_string)),a&&(s+=new Array(a+1).join(" ")),this.__cache.push(s)};function c(a,i){this.__indent_cache=new n(a,i),this.raw=!1,this._end_with_newline=a.end_with_newline,this.indent_size=a.indent_size,this.wrap_line_length=a.wrap_line_length,this.indent_empty_lines=a.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new h(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}c.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},c.prototype.get_line_number=function(){return this.__lines.length},c.prototype.get_indent_string=function(a,i){return this.__indent_cache.get_indent_string(a,i)},c.prototype.get_indent_size=function(a,i){return this.__indent_cache.get_indent_size(a,i)},c.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},c.prototype.add_new_line=function(a){return this.is_empty()||!a&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},c.prototype.get_code=function(a){this.trim(!0);var i=this.current_line.pop();i&&(i[i.length-1]===`
`&&(i=i.replace(/\n+$/g,"")),this.current_line.push(i)),this._end_with_newline&&this.__add_outputline();var s=this.__lines.join(`
`);return a!==`
`&&(s=s.replace(/[\n]/g,a)),s},c.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},c.prototype.set_indent=function(a,i){return a=a||0,i=i||0,this.next_line.set_indent(a,i),this.__lines.length>1?(this.current_line.set_indent(a,i),!0):(this.current_line.set_indent(),!1)},c.prototype.add_raw_token=function(a){for(var i=0;i<a.newlines;i++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(a.whitespace_before),this.current_line.push(a.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},c.prototype.add_token=function(a){this.__add_space_before_token(),this.current_line.push(a),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(a){for(var i=this.__lines.length;a<i;)this.__lines[a]._remove_indent(),a++;this.current_line._remove_wrap_indent()},c.prototype.trim=function(a){for(a=a===void 0?!1:a,this.current_line.trim();a&&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(a,i){for(var s=this.__lines.length-2;s>=0;){var d=this.__lines[s];if(d.is_empty())break;if(d.item(0).indexOf(a)!==0&&d.item(-1)!==i){this.__lines.splice(s+1,0,new h(this)),this.previous_line=this.__lines[this.__lines.length-2];break}s--}},t.exports.Output=c},function(t){function h(n,c,a,i){this.type=n,this.text=c,this.comments_before=null,this.newlines=a||0,this.whitespace_before=i||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}t.exports.Token=h},function(t,h){var n="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",c="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",a="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",i="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",s="(?:\\\\u[0-9a-fA-F]{4}|["+n+a+"])",d="(?:\\\\u[0-9a-fA-F]{4}|["+c+a+i+"])*";h.identifier=new RegExp(s+d,"g"),h.identifierStart=new RegExp(s),h.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+c+a+i+"])+");var f=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;h.newline=/[\n\r\u2028\u2029]/,h.lineBreak=new RegExp(`\r
|`+h.newline.source),h.allLineBreaks=new RegExp(h.lineBreak.source,"g")},function(t,h,n){var c=n(6).Options,a=["before-newline","after-newline","preserve-newline"];function i(s){c.call(this,s,"js");var d=this.raw_options.brace_style||null;d==="expand-strict"?this.raw_options.brace_style="expand":d==="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 f=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var l=0;l<f.length;l++)f[l]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=f[l];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",a),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}i.prototype=new c,t.exports.Options=i},function(t){function h(a,i){this.raw_options=n(a,i),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}h.prototype._get_array=function(a,i){var s=this.raw_options[a],d=i||[];return typeof s=="object"?s!==null&&typeof s.concat=="function"&&(d=s.concat()):typeof s=="string"&&(d=s.split(/[^a-zA-Z0-9_\/\-]+/)),d},h.prototype._get_boolean=function(a,i){var s=this.raw_options[a],d=s===void 0?!!i:!!s;return d},h.prototype._get_characters=function(a,i){var s=this.raw_options[a],d=i||"";return typeof s=="string"&&(d=s.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),d},h.prototype._get_number=function(a,i){var s=this.raw_options[a];i=parseInt(i,10),isNaN(i)&&(i=0);var d=parseInt(s,10);return isNaN(d)&&(d=i),d},h.prototype._get_selection=function(a,i,s){var d=this._get_selection_list(a,i,s);if(d.length!==1)throw new Error("Invalid Option Value: The option '"+a+`' can only be one of the following values:
`+i+`
You passed in: '`+this.raw_options[a]+"'");return d[0]},h.prototype._get_selection_list=function(a,i,s){if(!i||i.length===0)throw new Error("Selection list cannot be empty.");if(s=s||[i[0]],!this._is_valid_selection(s,i))throw new Error("Invalid Default Value!");var d=this._get_array(a,s);if(!this._is_valid_selection(d,i))throw new Error("Invalid Option Value: The option '"+a+`' can contain only the following values:
`+i+`
You passed in: '`+this.raw_options[a]+"'");return d},h.prototype._is_valid_selection=function(a,i){return a.length&&i.length&&!a.some(function(s){return i.indexOf(s)===-1})};function n(a,i){var s={};a=c(a);var d;for(d in a)d!==i&&(s[d]=a[d]);if(i&&a[i])for(d in a[i])s[d]=a[i][d];return s}function c(a){var i={},s;for(s in a){var d=s.replace(/-/g,"_");i[d]=a[s]}return i}t.exports.Options=h,t.exports.normalizeOpts=c,t.exports.mergeOpts=n},function(t,h,n){var c=n(8).InputScanner,a=n(9).Tokenizer,i=n(9).TOKEN,s=n(13).Directives,d=n(4),f=n(12).Pattern,l=n(14).TemplatablePattern;function o(z,A){return A.indexOf(z)!==-1}var r={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:i.START,RAW:i.RAW,EOF:i.EOF},x=new s(/\/\*/,/\*\//),v=/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]/,R=/[^\d\.]/,O=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),b=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";b=b.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),b="\\?\\.(?!\\d) "+b,b=b.replace(/ /g,"|");var E=new RegExp(b),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("|")+")$"),N,L=function(z,A){a.call(this,z,A),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var B=new f(this._input),U=new l(this._input).read_options(this._options);this.__patterns={template:U,identifier:U.starting_with(d.identifier).matching(d.identifierMatch),number:B.matching(v),punct:B.matching(E),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(d.lineBreak),shebang:B.starting_with(/#!/).until_after(d.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(/[`}\\]/)}};L.prototype=new a,L.prototype._is_comment=function(z){return z.type===r.COMMENT||z.type===r.BLOCK_COMMENT||z.type===r.UNKNOWN},L.prototype._is_opening=function(z){return z.type===r.START_BLOCK||z.type===r.START_EXPR},L.prototype._is_closing=function(z,A){return(z.type===r.END_BLOCK||z.type===r.END_EXPR)&&A&&(z.text==="]"&&A.text==="["||z.text===")"&&A.text==="("||z.text==="}"&&A.text==="{")},L.prototype._reset=function(){N=!1},L.prototype._get_next_token=function(z,A){var B=null;this._readWhitespace();var U=this._input.peek();return U===null?this._create_token(r.EOF,""):(B=B||this._read_non_javascript(U),B=B||this._read_string(U),B=B||this._read_word(z),B=B||this._read_singles(U),B=B||this._read_comment(U),B=B||this._read_regexp(U,z),B=B||this._read_xml(U,z),B=B||this._read_punctuation(),B=B||this._create_token(r.UNKNOWN,this._input.next()),B)},L.prototype._read_word=function(z){var A;if(A=this.__patterns.identifier.read(),A!=="")return A=A.replace(d.allLineBreaks,`
`),!(z.type===r.DOT||z.type===r.RESERVED&&(z.text==="set"||z.text==="get"))&&F.test(A)?(A==="in"||A==="of")&&(z.type===r.WORD||z.type===r.STRING)?this._create_token(r.OPERATOR,A):this._create_token(r.RESERVED,A):this._create_token(r.WORD,A);if(A=this.__patterns.number.read(),A!=="")return this._create_token(r.WORD,A)},L.prototype._read_singles=function(z){var A=null;return z==="("||z==="["?A=this._create_token(r.START_EXPR,z):z===")"||z==="]"?A=this._create_token(r.END_EXPR,z):z==="{"?A=this._create_token(r.START_BLOCK,z):z==="}"?A=this._create_token(r.END_BLOCK,z):z===";"?A=this._create_token(r.SEMICOLON,z):z==="."&&R.test(this._input.peek(1))?A=this._create_token(r.DOT,z):z===","&&(A=this._create_token(r.COMMA,z)),A&&this._input.next(),A},L.prototype._read_punctuation=function(){var z=this.__patterns.punct.read();if(z!=="")return z==="="?this._create_token(r.EQUALS,z):z==="?."?this._create_token(r.DOT,z):this._create_token(r.OPERATOR,z)},L.prototype._read_non_javascript=function(z){var A="";if(z==="#"){if(this._is_first_token()&&(A=this.__patterns.shebang.read(),A))return this._create_token(r.UNKNOWN,A.trim()+`
`);if(A=this.__patterns.include.read(),A)return this._create_token(r.UNKNOWN,A.trim()+`
`);z=this._input.next();var B="#";if(this._input.hasNext()&&this._input.testChar(p)){do z=this._input.next(),B+=z;while(this._input.hasNext()&&z!=="#"&&z!=="=");return z==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(B+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(B+="{}",this._input.next(),this._input.next())),this._create_token(r.WORD,B)}this._input.back()}else if(z==="<"&&this._is_first_token()){if(A=this.__patterns.html_comment_start.read(),A){for(;this._input.hasNext()&&!this._input.testChar(d.newline);)A+=this._input.next();return N=!0,this._create_token(r.COMMENT,A)}}else if(N&&z==="-"&&(A=this.__patterns.html_comment_end.read(),A))return N=!1,this._create_token(r.COMMENT,A);return null},L.prototype._read_comment=function(z){var A=null;if(z==="/"){var B="";if(this._input.peek(1)==="*"){B=this.__patterns.block_comment.read();var U=x.get_directives(B);U&&U.ignore==="start"&&(B+=x.readIgnored(this._input)),B=B.replace(d.allLineBreaks,`
`),A=this._create_token(r.BLOCK_COMMENT,B),A.directives=U}else this._input.peek(1)==="/"&&(B=this.__patterns.comment.read(),A=this._create_token(r.COMMENT,B))}return A},L.prototype._read_string=function(z){if(z==="`"||z==="'"||z==='"'){var A=this._input.next();return this.has_char_escapes=!1,z==="`"?A+=this._read_string_recursive("`",!0,"${"):A+=this._read_string_recursive(z),this.has_char_escapes&&this._options.unescape_strings&&(A=G(A)),this._input.peek()===z&&(A+=this._input.next()),A=A.replace(d.allLineBreaks,`
`),this._create_token(r.STRING,A)}return null},L.prototype._allow_regexp_or_xml=function(z){return z.type===r.RESERVED&&o(z.text,["return","case","throw","else","do","typeof","yield"])||z.type===r.END_EXPR&&z.text===")"&&z.opened.previous.type===r.RESERVED&&o(z.opened.previous.text,["if","while","for"])||o(z.type,[r.COMMENT,r.START_EXPR,r.START_BLOCK,r.START,r.END_BLOCK,r.OPERATOR,r.EQUALS,r.EOF,r.SEMICOLON,r.COMMA])},L.prototype._read_regexp=function(z,A){if(z==="/"&&this._allow_regexp_or_xml(A)){for(var B=this._input.next(),U=!1,I=!1;this._input.hasNext()&&(U||I||this._input.peek()!==z)&&!this._input.testChar(d.newline);)B+=this._input.peek(),U?U=!1:(U=this._input.peek()==="\\",this._input.peek()==="["?I=!0:this._input.peek()==="]"&&(I=!1)),this._input.next();return this._input.peek()===z&&(B+=this._input.next(),B+=this._input.read(d.identifier)),this._create_token(r.STRING,B)}return null},L.prototype._read_xml=function(z,A){if(this._options.e4x&&z==="<"&&this._allow_regexp_or_xml(A)){var B="",U=this.__patterns.xml.read_match();if(U){for(var I=U[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),K=I.indexOf("{")===0,Z=0;U;){var ue=!!U[1],de=U[2],Ce=!!U[U.length-1]||de.slice(0,8)==="![CDATA[";if(!Ce&&(de===I||K&&de.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(ue?--Z:++Z),B+=U[0],Z<=0)break;U=this.__patterns.xml.read_match()}return U||(B+=this._input.match(/[\s\S]*/g)[0]),B=B.replace(d.allLineBreaks,`
`),this._create_token(r.STRING,B)}}return null};function G(z){for(var A="",B=0,U=new c(z),I=null;U.hasNext();)if(I=U.match(/([\s]|[^\\]|\\\\)+/g),I&&(A+=I[0]),U.peek()==="\\"){if(U.next(),U.peek()==="x")I=U.match(/x([0-9A-Fa-f]{2})/g);else if(U.peek()==="u")I=U.match(/u([0-9A-Fa-f]{4})/g);else{A+="\\",U.hasNext()&&(A+=U.next());continue}if(!I)return z;if(B=parseInt(I[1],16),B>126&&B<=255&&I[0].indexOf("x")===0)return z;if(B>=0&&B<32){A+="\\"+I[0];continue}else B===34||B===39||B===92?A+="\\"+String.fromCharCode(B):A+=String.fromCharCode(B)}return A}L.prototype._read_string_recursive=function(z,A,B){var U,I;z==="'"?I=this.__patterns.single_quote:z==='"'?I=this.__patterns.double_quote:z==="`"?I=this.__patterns.template_text:z==="}"&&(I=this.__patterns.template_expression);for(var K=I.read(),Z="";this._input.hasNext();){if(Z=this._input.next(),Z===z||!A&&d.newline.test(Z)){this._input.back();break}else Z==="\\"&&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(),Z+=this._input.next()):B&&(B==="${"&&Z==="$"&&this._input.peek()==="{"&&(Z+=this._input.next()),B===Z&&(z==="`"?Z+=this._read_string_recursive("}",A,"`"):Z+=this._read_string_recursive("`",A,"${"),this._input.hasNext()&&(Z+=this._input.next())));Z+=I.read(),K+=Z}return K},t.exports.Tokenizer=L,t.exports.TOKEN=r,t.exports.positionable_operators=O.slice(),t.exports.line_starters=w.slice()},function(t){var h=RegExp.prototype.hasOwnProperty("sticky");function n(c){this.__input=c||"",this.__input_length=this.__input.length,this.__position=0}n.prototype.restart=function(){this.__position=0},n.prototype.back=function(){this.__position>0&&(this.__position-=1)},n.prototype.hasNext=function(){return this.__position<this.__input_length},n.prototype.next=function(){var c=null;return this.hasNext()&&(c=this.__input.charAt(this.__position),this.__position+=1),c},n.prototype.peek=function(c){var a=null;return c=c||0,c+=this.__position,c>=0&&c<this.__input_length&&(a=this.__input.charAt(c)),a},n.prototype.__match=function(c,a){c.lastIndex=a;var i=c.exec(this.__input);return i&&!(h&&c.sticky)&&(i.index!==a&&(i=null)),i},n.prototype.test=function(c,a){return a=a||0,a+=this.__position,a>=0&&a<this.__input_length?!!this.__match(c,a):!1},n.prototype.testChar=function(c,a){var i=this.peek(a);return c.lastIndex=0,i!==null&&c.test(i)},n.prototype.match=function(c){var a=this.__match(c,this.__position);return a?this.__position+=a[0].length:a=null,a},n.prototype.read=function(c,a,i){var s="",d;return c&&(d=this.match(c),d&&(s+=d[0])),a&&(d||!c)&&(s+=this.readUntil(a,i)),s},n.prototype.readUntil=function(c,a){var i="",s=this.__position;c.lastIndex=this.__position;var d=c.exec(this.__input);return d?(s=d.index,a&&(s+=d[0].length)):s=this.__input_length,i=this.__input.substring(this.__position,s),this.__position=s,i},n.prototype.readUntilAfter=function(c){return this.readUntil(c,!0)},n.prototype.get_regexp=function(c,a){var i=null,s="g";return a&&h&&(s="y"),typeof c=="string"&&c!==""?i=new RegExp(c,s):c&&(i=new RegExp(c.source,s)),i},n.prototype.get_literal_regexp=function(c){return RegExp(c.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},n.prototype.peekUntilAfter=function(c){var a=this.__position,i=this.readUntilAfter(c);return this.__position=a,i},n.prototype.lookBack=function(c){var a=this.__position-1;return a>=c.length&&this.__input.substring(a-c.length,a).toLowerCase()===c},t.exports.InputScanner=n},function(t,h,n){var c=n(8).InputScanner,a=n(3).Token,i=n(10).TokenStream,s=n(11).WhitespacePattern,d={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},f=function(l,o){this._input=new c(l),this._options=o||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new s(this._input)};f.prototype.tokenize=function(){this._input.restart(),this.__tokens=new i,this._reset();for(var l,o=new a(d.START,""),r=null,x=[],v=new i;o.type!==d.EOF;){for(l=this._get_next_token(o,r);this._is_comment(l);)v.add(l),l=this._get_next_token(o,r);v.isEmpty()||(l.comments_before=v,v=new i),l.parent=r,this._is_opening(l)?(x.push(r),r=l):r&&this._is_closing(l,r)&&(l.opened=r,r.closed=l,r=x.pop(),l.parent=r),l.previous=o,o.next=l,this.__tokens.add(l),o=l}return this.__tokens},f.prototype._is_first_token=function(){return this.__tokens.isEmpty()},f.prototype._reset=function(){},f.prototype._get_next_token=function(l,o){this._readWhitespace();var r=this._input.read(/.+/g);return r?this._create_token(d.RAW,r):this._create_token(d.EOF,"")},f.prototype._is_comment=function(l){return!1},f.prototype._is_opening=function(l){return!1},f.prototype._is_closing=function(l,o){return!1},f.prototype._create_token=function(l,o){var r=new a(l,o,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return r},f.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},t.exports.Tokenizer=f,t.exports.TOKEN=d},function(t){function h(n){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=n}h.prototype.restart=function(){this.__position=0},h.prototype.isEmpty=function(){return this.__tokens_length===0},h.prototype.hasNext=function(){return this.__position<this.__tokens_length},h.prototype.next=function(){var n=null;return this.hasNext()&&(n=this.__tokens[this.__position],this.__position+=1),n},h.prototype.peek=function(n){var c=null;return n=n||0,n+=this.__position,n>=0&&n<this.__tokens_length&&(c=this.__tokens[n]),c},h.prototype.add=function(n){this.__parent_token&&(n.parent=this.__parent_token),this.__tokens.push(n),this.__tokens_length+=1},t.exports.TokenStream=h},function(t,h,n){var c=n(12).Pattern;function a(i,s){c.call(this,i,s),s?this._line_regexp=this._input.get_regexp(s._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}a.prototype=new c,a.prototype.__set_whitespace_patterns=function(i,s){i+="\\t ",s+="\\n\\r",this._match_pattern=this._input.get_regexp("["+i+s+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+s+"]")},a.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var i=this._input.read(this._match_pattern);if(i===" ")this.whitespace_before_token=" ";else if(i){var s=this.__split(this._newline_regexp,i);this.newline_count=s.length-1,this.whitespace_before_token=s[this.newline_count]}return i},a.prototype.matching=function(i,s){var d=this._create();return d.__set_whitespace_patterns(i,s),d._update(),d},a.prototype._create=function(){return new a(this._input,this)},a.prototype.__split=function(i,s){i.lastIndex=0;for(var d=0,f=[],l=i.exec(s);l;)f.push(s.substring(d,l.index)),d=l.index+l[0].length,l=i.exec(s);return d<s.length?f.push(s.substring(d,s.length)):f.push(""),f},t.exports.WhitespacePattern=a},function(t){function h(n,c){this._input=n,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,c&&(this._starting_pattern=this._input.get_regexp(c._starting_pattern,!0),this._match_pattern=this._input.get_regexp(c._match_pattern,!0),this._until_pattern=this._input.get_regexp(c._until_pattern),this._until_after=c._until_after)}h.prototype.read=function(){var n=this._input.read(this._starting_pattern);return(!this._starting_pattern||n)&&(n+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),n},h.prototype.read_match=function(){return this._input.match(this._match_pattern)},h.prototype.until_after=function(n){var c=this._create();return c._until_after=!0,c._until_pattern=this._input.get_regexp(n),c._update(),c},h.prototype.until=function(n){var c=this._create();return c._until_after=!1,c._until_pattern=this._input.get_regexp(n),c._update(),c},h.prototype.starting_with=function(n){var c=this._create();return c._starting_pattern=this._input.get_regexp(n,!0),c._update(),c},h.prototype.matching=function(n){var c=this._create();return c._match_pattern=this._input.get_regexp(n,!0),c._update(),c},h.prototype._create=function(){return new h(this._input,this)},h.prototype._update=function(){},t.exports.Pattern=h},function(t){function h(n,c){n=typeof n=="string"?n:n.source,c=typeof c=="string"?c:c.source,this.__directives_block_pattern=new RegExp(n+/ beautify( \w+[:]\w+)+ /.source+c,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(n+/\sbeautify\signore:end\s/.source+c,"g")}h.prototype.get_directives=function(n){if(!n.match(this.__directives_block_pattern))return null;var c={};this.__directive_pattern.lastIndex=0;for(var a=this.__directive_pattern.exec(n);a;)c[a[1]]=a[2],a=this.__directive_pattern.exec(n);return c},h.prototype.readIgnored=function(n){return n.readUntilAfter(this.__directives_end_ignore_pattern)},t.exports.Directives=h},function(t,h,n){var c=n(12).Pattern,a={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function i(s,d){c.call(this,s,d),this.__template_pattern=null,this._disabled=Object.assign({},a),this._excluded=Object.assign({},a),d&&(this.__template_pattern=this._input.get_regexp(d.__template_pattern),this._excluded=Object.assign(this._excluded,d._excluded),this._disabled=Object.assign(this._disabled,d._disabled));var f=new c(s);this.__patterns={handlebars_comment:f.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:f.starting_with(/{{{/).until_after(/}}}/),handlebars:f.starting_with(/{{/).until_after(/}}/),php:f.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:f.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:f.starting_with(/{%/).until_after(/%}/),django_value:f.starting_with(/{{/).until_after(/}}/),django_comment:f.starting_with(/{#/).until_after(/#}/),smarty:f.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:f.starting_with(/{\*/).until_after(/\*}/),smarty_literal:f.starting_with(/{literal}/).until_after(/{\/literal}/)}}i.prototype=new c,i.prototype._create=function(){return new i(this._input,this)},i.prototype._update=function(){this.__set_templated_pattern()},i.prototype.disable=function(s){var d=this._create();return d._disabled[s]=!0,d._update(),d},i.prototype.read_options=function(s){var d=this._create();for(var f in a)d._disabled[f]=s.templating.indexOf(f)===-1;return d._update(),d},i.prototype.exclude=function(s){var d=this._create();return d._excluded[s]=!0,d._update(),d},i.prototype.read=function(){var s="";this._match_pattern?s=this._input.read(this._starting_pattern):s=this._input.read(this._starting_pattern,this.__template_pattern);for(var d=this._read_template();d;)this._match_pattern?d+=this._input.read(this._match_pattern):d+=this._input.readUntil(this.__template_pattern),s+=d,d=this._read_template();return this._until_after&&(s+=this._input.readUntilAfter(this._until_pattern)),s},i.prototype.__set_templated_pattern=function(){var s=[];this._disabled.php||s.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||s.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||s.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(s.push(this.__patterns.django._starting_pattern.source),s.push(this.__patterns.django_value._starting_pattern.source),s.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||s.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&s.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+s.join("|")+")")},i.prototype._read_template=function(){var s="",d=this._input.peek();if(d==="<"){var f=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&f==="?"&&(s=s||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&f==="%"&&(s=s||this.__patterns.erb.read())}else d==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(s=s||this.__patterns.handlebars_comment.read(),s=s||this.__patterns.handlebars_unescaped.read(),s=s||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(s=s||this.__patterns.django_value.read()),this._excluded.django||(s=s||this.__patterns.django_comment.read(),s=s||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(s=s||this.__patterns.smarty_comment.read(),s=s||this.__patterns.smarty_literal.read(),s=s||this.__patterns.smarty.read()));return s},t.exports.TemplatablePattern=i}],y={};function S(t){var h=y[t];if(h!==void 0)return h.exports;var n=y[t]={exports:{}};return m[t](n,n.exports,S),n.exports}var _=S(0);C=_})();var M=C;!(k=[],g=function(){return{js_beautify:M}}.apply(J,k),g!==void 0&&(H.exports=g))})()},"6eGT":function(H,J,D){"use strict";function k(g){return null}J.a=k},"746U":function(H,J,D){"use strict";D.d(J,"f",function(){return k}),D.d(J,"l",function(){return g}),D.d(J,"k",function(){return C}),D.d(J,"j",function(){return M}),D.d(J,"g",function(){return m}),D.d(J,"m",function(){return y}),D.d(J,"h",function(){return S}),D.d(J,"n",function(){return _}),D.d(J,"c",function(){return t}),D.d(J,"a",function(){return h}),D.d(J,"i",function(){return n}),D.d(J,"o",function(){return c}),D.d(J,"e",function(){return s}),D.d(J,"d",function(){return d}),D.d(J,"p",function(){return f}),D.d(J,"b",function(){return l});function k(o){return Array.isArray(o)}function g(o){return typeof o=="string"}function C(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)&&!(o instanceof RegExp)&&!(o instanceof Date)}function M(o){return typeof o=="number"&&!isNaN(o)}function m(o){return o===!0||o===!1}function y(o){return typeof o=="undefined"}function S(o){return!_(o)}function _(o){return y(o)||o===null}function t(o,r){if(!o)throw new Error(r?`Unexpected type, expected '${r}'`:"Unexpected type")}function h(o){if(_(o))throw new Error("Assertion Failed: argument is undefined or null");return o}function n(o){return typeof o=="function"}function c(o,r){const x=Math.min(o.length,r.length);for(let v=0;v<x;v++)a(o[v],r[v])}function a(o,r){if(g(r)){if(typeof o!==r)throw new Error(`argument does not match constraint: typeof ${r}`)}else if(n(r)){try{if(o instanceof r)return}catch(x){}if(!_(o)&&o.constructor===r)return;if(r.length===1&&r.call(void 0,o)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function i(o){let r=[],x=Object.getPrototypeOf(o);for(;Object.prototype!==x;)r=r.concat(Object.getOwnPropertyNames(x)),x=Object.getPrototypeOf(x);return r}function s(o){const r=[];for(const x of i(o))typeof o[x]=="function"&&r.push(x);return r}function d(o,r){const x=p=>function(){const R=Array.prototype.slice.call(arguments,0);return r(p,R)};let v={};for(const p of o)v[p]=x(p);return v}function f(o){return o===null?void 0:o}function l(o,r="Unreachable"){throw new Error(r)}},"7Cbv":function(H,J,D){"use strict";var k=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 C(){if(!k)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return k(g)}var M=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function m(a){return typeof a=="string"&&M.test(a)}for(var y=m,S=[],_=0;_<256;++_)S.push((_+256).toString(16).substr(1));function t(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=(S[a[i+0]]+S[a[i+1]]+S[a[i+2]]+S[a[i+3]]+"-"+S[a[i+4]]+S[a[i+5]]+"-"+S[a[i+6]]+S[a[i+7]]+"-"+S[a[i+8]]+S[a[i+9]]+"-"+S[a[i+10]]+S[a[i+11]]+S[a[i+12]]+S[a[i+13]]+S[a[i+14]]+S[a[i+15]]).toLowerCase();if(!y(s))throw TypeError("Stringified UUID is invalid");return s}var h=t;function n(a,i,s){a=a||{};var d=a.random||(a.rng||C)();if(d[6]=d[6]&15|64,d[8]=d[8]&63|128,i){s=s||0;for(var f=0;f<16;++f)i[s+f]=d[f];return i}return h(d)}var c=J.a=n},"7ahc":function(H,J,D){"use strict";D.d(J,"a",function(){return x});var k=D("k1fw"),g=D("0Owb"),C=D("+L6B"),M=D("2/Rp"),m=D("y8nQ"),y=D("Vl3Y"),S=D("tJVT"),_=D("OaEy"),t=D("2fM7"),h=D("q1tI"),n=D.n(h),c=D("VrN/"),a=D.n(c),i=D("p77/"),s=D.n(i),d=D("c5Ni"),f=D.n(d),l=t.a.Option,o={labelCol:{span:4},wrapperCol:{span:20}},r={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(v){var p=v.callback,R=v.onCancel,O=Object(h.useState)("python"),b=Object(S.a)(O,2),E=b[0],w=b[1];function T(N){w(r[N][1])}function F(N){p(N)}return n.a.createElement(y.a,Object(g.a)({},o,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:F}),n.a.createElement(y.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},n.a.createElement(t.a,{onChange:T},Object.keys(r).map(function(N){return n.a.createElement(l,{key:N,value:N},r[N][0])}))),n.a.createElement(y.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},n.a.createElement(x,{mode:E})),n.a.createElement("div",{className:"flex-container flex-end"},n.a.createElement(M.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),n.a.createElement(M.a,{type:"ghost",onClick:R},"\u53D6\u6D88")))};function x(v){var p=v.value,R=v.onChange,O=v.mode,b=v.options,E=b===void 0?{}:b,w=Object(h.useRef)(),T=Object(h.useState)(),F=Object(S.a)(T,2),N=F[0],L=F[1];return Object(h.useEffect)(function(){if(N){function G(z){var A=z.getValue();R&&R(A)}return N.on("change",G),function(){N.off("change",G)}}},[N,R]),Object(h.useEffect)(function(){N&&N.setOption("mode",O)},[N,O]),Object(h.useEffect)(function(){N&&((p!==N.getValue()||p==="")&&setTimeout(function(){N.setValue(p||" ")},300))},[N,p]),Object(h.useEffect)(function(){if(w.current&&!N){var G=a.a.fromTextArea(w.current,Object(k.a)({mode:O,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},E));L(G)}},[w.current,N]),n.a.createElement("div",{className:"my-codemirror-container"},n.a.createElement("textarea",{ref:w}))}},"815F":function(H,J,D){"use strict";D.d(J,"e",function(){return S}),D.d(J,"c",function(){return t}),D.d(J,"d",function(){return h}),D.d(J,"a",function(){return c}),D.d(J,"f",function(){return a}),D.d(J,"b",function(){return i});var k=D("KQm4"),g=D("VTBJ"),C=D("Ff2n"),M=D("Zm9Q"),m=D("Kwbf"),y=D("OZM5");function S(s,d){return s!=null?s:d}function _(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],d=new Map;function f(l){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(l||[]).forEach(function(r){var x=r.key,v=r.children;Object(m.a)(x!=null,"Tree node must have a certain key: [".concat(o).concat(x,"]"));var p=String(x);Object(m.a)(!d.has(p)||x===null||x===void 0,"Same 'key' exist in the Tree: ".concat(p)),d.set(p,!0),f(v,"".concat(o).concat(p," > "))})}f(s)}function t(s){function d(f){var l=Object(M.a)(f);return l.map(function(o){if(!Object(y.i)(o))return Object(m.a)(!o,"Tree/TreeNode can only accept TreeNode as children."),null;var r=o.key,x=o.props,v=x.children,p=Object(C.a)(x,["children"]),R=Object(g.a)({key:r},p),O=d(v);return O.length&&(R.children=O),R}).filter(function(o){return o})}return d(s)}function h(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],f=new Set(d===!0?[]:d),l=[];function o(r){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return r.map(function(v,p){var R=Object(y.h)(x?x.pos:"0",p),O=S(v.key,R),b=Object(g.a)(Object(g.a)({},v),{},{parent:x,pos:R,children:null,data:v,isStart:[].concat(Object(k.a)(x?x.isStart:[]),[p===0]),isEnd:[].concat(Object(k.a)(x?x.isEnd:[]),[p===r.length-1])});return l.push(b),d===!0||f.has(O)?b.children=o(v.children||[],b):b.children=[],b})}return o(s),l}function n(s,d,f){var l;f?typeof f=="string"?l=function(x){return x[f]}:typeof f=="function"&&(l=function(x){return f(x)}):l=function(x,v){return S(x.key,v)};function o(r,x,v){var p=r?r.children:s,R=r?Object(y.h)(v.pos,x):"0";if(r){var O=l(r,R),b={node:r,index:x,pos:R,key:O,parentPos:v.node?v.pos:null,level:v.level+1};d(b)}p&&p.forEach(function(E,w){o(E,w,{node:r,pos:R,level:v?v.level+1:-1})})}o(null)}function c(s){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=d.initWrapper,l=d.processEntity,o=d.onProcessFinished,r=arguments.length>2?arguments[2]:void 0,x={},v={},p={posEntities:x,keyEntities:v};return f&&(p=f(p)||p),n(s,function(R){var O=R.node,b=R.index,E=R.pos,w=R.key,T=R.parentPos,F=R.level,N={node:O,index:b,key:w,pos:E,level:F},L=S(w,E);x[E]=N,v[L]=N,N.parent=x[T],N.parent&&(N.parent.children=N.parent.children||[],N.parent.children.push(N)),l&&l(N,p)},r),o&&o(p),p}function a(s,d){var f=d.expandedKeys,l=d.selectedKeys,o=d.loadedKeys,r=d.loadingKeys,x=d.checkedKeys,v=d.halfCheckedKeys,p=d.dragOverNodeKey,R=d.dropPosition,O=d.keyEntities,b=O[s],E={eventKey:s,expanded:f.indexOf(s)!==-1,selected:l.indexOf(s)!==-1,loaded:o.indexOf(s)!==-1,loading:r.indexOf(s)!==-1,checked:x.indexOf(s)!==-1,halfChecked:v.indexOf(s)!==-1,pos:String(b?b.pos:""),dragOver:p===s&&R===0,dragOverGapTop:p===s&&R===-1,dragOverGapBottom:p===s&&R===1};return E}function i(s){var d=s.data,f=s.expanded,l=s.selected,o=s.checked,r=s.loaded,x=s.loading,v=s.halfChecked,p=s.dragOver,R=s.dragOverGapTop,O=s.dragOverGapBottom,b=s.pos,E=s.active,w=Object(g.a)(Object(g.a)({},d),{},{expanded:f,selected:l,checked:o,loaded:r,loading:x,halfChecked:v,dragOver:p,dragOverGapTop:R,dragOverGapBottom:O,pos:b,active:E});return"props"in w||Object.defineProperty(w,"props",{get:function(){return Object(m.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),s}}),w}},"8EBN":function(H,J,D){(function(k){k(D("VrN/"))})(function(k){"use strict";k.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var g=0;g<k.modeInfo.length;g++){var C=k.modeInfo[g];C.mimes&&(C.mime=C.mimes[0])}k.findModeByMIME=function(M){M=M.toLowerCase();for(var m=0;m<k.modeInfo.length;m++){var y=k.modeInfo[m];if(y.mime==M)return y;if(y.mimes){for(var S=0;S<y.mimes.length;S++)if(y.mimes[S]==M)return y}}if(/\+xml$/.test(M))return k.findModeByMIME("application/xml");if(/\+json$/.test(M))return k.findModeByMIME("application/json")},k.findModeByExtension=function(M){M=M.toLowerCase();for(var m=0;m<k.modeInfo.length;m++){var y=k.modeInfo[m];if(y.ext){for(var S=0;S<y.ext.length;S++)if(y.ext[S]==M)return y}}},k.findModeByFileName=function(M){for(var m=0;m<k.modeInfo.length;m++){var y=k.modeInfo[m];if(y.file&&y.file.test(M))return y}var S=M.lastIndexOf("."),_=S>-1&&M.substring(S+1,M.length);if(_)return k.findModeByExtension(_)},k.findModeByName=function(M){M=M.toLowerCase();for(var m=0;m<k.modeInfo.length;m++){var y=k.modeInfo[m];if(y.name.toLowerCase()==M)return y;if(y.alias){for(var S=0;S<y.alias.length;S++)if(y.alias[S].toLowerCase()==M)return y}}}})},"8HAY":function(H,J,D){"use strict";D.d(J,"a",function(){return m}),D.d(J,"b",function(){return y}),D.d(J,"d",function(){return S}),D.d(J,"e",function(){return _}),D.d(J,"c",function(){return t});var k=D("MI8n"),g=D("pmY6"),C=D("3/fG"),M=function(h,n,c,a){function i(s){return s instanceof c?s:new c(function(d){d(s)})}return new(c||(c=Promise))(function(s,d){function f(r){try{o(a.next(r))}catch(x){d(x)}}function l(r){try{o(a.throw(r))}catch(x){d(x)}}function o(r){r.done?s(r.value):i(r.value).then(f,l)}o((a=a.apply(h,n||[])).next())})};class m extends g.a{constructor(h,n="",c="",a=!0,i){super();this._onDidChange=this._register(new k.b),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=h,this._label=n,this._cssClass=c,this._enabled=a,this._actionCallback=i}get id(){return this._id}get label(){return this._label}set label(h){this._setLabel(h)}_setLabel(h){this._label!==h&&(this._label=h,this._onDidChange.fire({label:h}))}get tooltip(){return this._tooltip||""}set tooltip(h){this._setTooltip(h)}_setTooltip(h){this._tooltip!==h&&(this._tooltip=h,this._onDidChange.fire({tooltip:h}))}get class(){return this._cssClass}set class(h){this._setClass(h)}_setClass(h){this._cssClass!==h&&(this._cssClass=h,this._onDidChange.fire({class:h}))}get enabled(){return this._enabled}set enabled(h){this._setEnabled(h)}_setEnabled(h){this._enabled!==h&&(this._enabled=h,this._onDidChange.fire({enabled:h}))}get checked(){return this._checked}set checked(h){this._setChecked(h)}_setChecked(h){this._checked!==h&&(this._checked=h,this._onDidChange.fire({checked:h}))}run(h,n){return M(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(h))})}}class y extends g.a{constructor(){super(...arguments);this._onBeforeRun=this._register(new k.b),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new k.b),this.onDidRun=this._onDidRun.event}run(h,n){return M(this,void 0,void 0,function*(){if(!h.enabled)return;this._onBeforeRun.fire({action:h});let c;try{yield this.runAction(h,n)}catch(a){c=a}this._onDidRun.fire({action:h,error:c})})}runAction(h,n){return M(this,void 0,void 0,function*(){yield h.run(n)})}}class S extends m{constructor(h){super(S.ID,h,h?"separator text":"separator");this.checked=!1,this.enabled=!1}}S.ID="vs.actions.separator";class _{constructor(h,n,c,a){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=h,this.label=n,this.class=a,this._actions=c}get actions(){return this._actions}dispose(){}run(){return M(this,void 0,void 0,function*(){})}}class t extends m{constructor(){super(t.ID,C.a("submenu.empty","(empty)"),void 0,!1)}}t.ID="vs.actions.empty"},"8hTe":function(H,J,D){H.exports={button:"button___1wy9m"}},"9Bee":function(H,J,D){"use strict";var k=D("DYRE"),g=D("zeV3"),C=D("+L6B"),M=D("2/Rp"),m=D("k1fw"),y=D("9og8"),S=D("tJVT"),_=D("WmNS"),t=D.n(_),h=D("q1tI"),n=D.n(h),c=D("vg9a"),a=D("DlQD"),i=D.n(a),s=D("rUJ1");function d(le,V){var $=le.match(/^(\s+)(?:```)/);if($===null)return V;var te=$[1];return V.split(`
`).map(function(ye){var oe=ye.match(/^\s+/);if(oe===null)return ye;var Ve=Object(S.a)(oe,1),Tt=Ve[0];return Tt.length>=te.length?ye.slice(te.length):ye}).join(`
`)}var f=[],l=["<ul>"],o=new i.a.Renderer,r=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function x(){f.length=0,l=["<ul>"]}var v={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function p(le,V,$,te){if(V>=le.length||le[V].level<=$)return V;var ye=le[V];te.push("<li><a href='#"+ye.anchor+"'>"+ye.text+"</a>"),V++;var oe=[];return V=p(le,V,ye.level,oe),oe.length>0&&(te.push("<ul>"),oe.forEach(function(Ve){te.push(Ve)}),te.push("</ul>")),te.push("</li>"),V=p(le,V,$,te),V}function R(){return p(f,0,0,l),l.push("</ul>"),l.join("")}var O={heading:function(V){var $=r.exec(V);if($)return{type:"heading",raw:$[0],depth:$[1].length,text:$[2]}},fences:function(V){var $=this.rules.block.fences.exec(V);if($){var te=$[0],ye=d(te,$[3]||""),oe=$[2]?$[2].trim():$[2];if(["latex","katex","math"].indexOf(oe)>=0){var Ve=w(),Tt=ye;ye=Ve,T[Ve]={type:"block",expression:Tt}}return{type:"code",raw:te,lang:oe,text:ye}}}},b=/(?:\${2})([^\n`]+?)(?:\${2})/gi,E=0,w=function(){return"__special_katext_id_".concat(E++,"__")},T={};function F(){return T}function N(){E=0,T={}}function L(le){return le=le.replace(b,function(V,$){var te=w();return T[te]={type:"inline",expression:$},te}),le}var G=o.listitem;o.listitem=function(le){return G(L(le))};var z=o.paragraph;o.paragraph=function(le){return z(L(le))};var A=o.tablecell;o.tablecell=function(le,V){return A(L(le),V)},o.code=function(le,V,$){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($?le:Object(s.escape)(le,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+($?le:Object(s.escape)(le,!0))+"</code></pre>"},o.heading=function(le,V,$){var te=this.options.headerPrefix+$.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return f.push({anchor:te,level:V,text:le}),"<h"+V+' id="'+te+'">'+le+"</h"+V+">"},i.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),i.a.use({tokenizer:O,renderer:o});var B=i.a,U=D("SJMd"),I=D("ulZh"),K=D.n(I),Z=D("m3rI"),ue=D("Oy/b"),de=D("p5ED"),Ce=D("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 Re=function(le,V){return(Re=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function($,te){$.__proto__=te}||function($,te){for(var ye in te)Object.prototype.hasOwnProperty.call(te,ye)&&($[ye]=te[ye])})(le,V)};function me(le,V){function $(){this.constructor=le}Re(le,V),le.prototype=V===null?Object.create(V):($.prototype=V.prototype,new $)}function Oe(le,V,$,te){return new($||($=Promise))(function(ye,oe){function Ve(Er){try{Xt(te.next(Er))}catch(Pt){oe(Pt)}}function Tt(Er){try{Xt(te.throw(Er))}catch(Pt){oe(Pt)}}function Xt(Er){var Pt;Er.done?ye(Er.value):(Pt=Er.value,Pt instanceof $?Pt:new $(function(kr){kr(Pt)})).then(Ve,Tt)}Xt((te=te.apply(le,V||[])).next())})}function be(le,V){var $,te,ye,oe,Ve={label:0,sent:function(){if(1&ye[0])throw ye[1];return ye[1]},trys:[],ops:[]};return oe={next:Tt(0),throw:Tt(1),return:Tt(2)},typeof Symbol=="function"&&(oe[Symbol.iterator]=function(){return this}),oe;function Tt(Xt){return function(Er){return function(Pt){if($)throw new TypeError("Generator is already executing.");for(;Ve;)try{if($=1,te&&(ye=2&Pt[0]?te.return:Pt[0]?te.throw||((ye=te.return)&&ye.call(te),0):te.next)&&!(ye=ye.call(te,Pt[1])).done)return ye;switch(te=0,ye&&(Pt=[2&Pt[0],ye.value]),Pt[0]){case 0:case 1:ye=Pt;break;case 4:return Ve.label++,{value:Pt[1],done:!1};case 5:Ve.label++,te=Pt[1],Pt=[0];continue;case 7:Pt=Ve.ops.pop(),Ve.trys.pop();continue;default:if(!(ye=Ve.trys,(ye=ye.length>0&&ye[ye.length-1])||Pt[0]!==6&&Pt[0]!==2)){Ve=0;continue}if(Pt[0]===3&&(!ye||Pt[1]>ye[0]&&Pt[1]<ye[3])){Ve.label=Pt[1];break}if(Pt[0]===6&&Ve.label<ye[1]){Ve.label=ye[1],ye=Pt;break}if(ye&&Ve.label<ye[2]){Ve.label=ye[2],Ve.ops.push(Pt);break}ye[2]&&Ve.ops.pop(),Ve.trys.pop();continue}Pt=V.call(le,Ve)}catch(kr){Pt=[6,kr],te=0}finally{$=ye=0}if(5&Pt[0])throw Pt[1];return{value:Pt[0]?Pt[1]:void 0,done:!0}}([Xt,Er])}}}function ce(){for(var le=0,V=0,$=arguments.length;V<$;V++)le+=arguments[V].length;var te=Array(le),ye=0;for(V=0;V<$;V++)for(var oe=arguments[V],Ve=0,Tt=oe.length;Ve<Tt;Ve++,ye++)te[ye]=oe[Ve];return te}var se=function(){function le(){}return le.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},le.setAttributes=function(V,$){for(var te=0,ye=$;te<ye.length;te++){var oe=ye[te],Ve=oe[0],Tt=oe[1];V.setAttribute(Ve,Tt)}},le.createRect=function(V,$,te){var ye=document.createElementNS("http://www.w3.org/2000/svg","rect");return ye.setAttribute("width",V.toString()),ye.setAttribute("height",$.toString()),te&&le.setAttributes(ye,te),ye},le.createLine=function(V,$,te,ye,oe){var Ve=document.createElementNS("http://www.w3.org/2000/svg","line");return Ve.setAttribute("x1",V.toString()),Ve.setAttribute("y1",$.toString()),Ve.setAttribute("x2",te.toString()),Ve.setAttribute("y2",ye.toString()),oe&&le.setAttributes(Ve,oe),Ve},le.createPolygon=function(V,$){var te=document.createElementNS("http://www.w3.org/2000/svg","polygon");return te.setAttribute("points",V),$&&le.setAttributes(te,$),te},le.createCircle=function(V,$){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()),$&&le.setAttributes(te,$),te},le.createEllipse=function(V,$,te){var ye=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ye.setAttribute("cx",(V/2).toString()),ye.setAttribute("cy",($/2).toString()),ye.setAttribute("rx",(V/2).toString()),ye.setAttribute("ry",($/2).toString()),te&&le.setAttributes(ye,te),ye},le.createGroup=function(V){var $=document.createElementNS("http://www.w3.org/2000/svg","g");return V&&le.setAttributes($,V),$},le.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},le.createMarker=function(V,$,te,ye,oe,Ve,Tt){var Xt=document.createElementNS("http://www.w3.org/2000/svg","marker");return le.setAttributes(Xt,[["id",V],["orient",$],["markerWidth",te.toString()],["markerHeight",ye.toString()],["refX",oe.toString()],["refY",Ve.toString()]]),Xt.appendChild(Tt),Xt},le.createText=function(V){var $=document.createElementNS("http://www.w3.org/2000/svg","text");return $.setAttribute("x","0"),$.setAttribute("y","0"),V&&le.setAttributes($,V),$},le.createTSpan=function(V,$){var te=document.createElementNS("http://www.w3.org/2000/svg","tspan");return te.textContent=V,$&&le.setAttributes(te,$),te},le.createImage=function(V){var $=document.createElementNS("http://www.w3.org/2000/svg","image");return V&&le.setAttributes($,V),$},le.createPoint=function(V,$){var te=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return te.x=V,te.y=$,te},le.createPath=function(V,$){var te=document.createElementNS("http://www.w3.org/2000/svg","path");return te.setAttribute("d",V),$&&le.setAttributes(te,$),te},le}(),ne=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}(),ge=function(){function le(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return le.prototype.rasterize=function(V,$,te){var ye=this;return new Promise(function(oe){var Ve=te!==void 0?te:document.createElement("canvas");V===null&&(ye.markersOnly=!0,ye.naturalSize=!1);var Tt=document.createElementNS("http://www.w3.org/2000/svg","svg");Tt.setAttribute("xmlns","http://www.w3.org/2000/svg"),Tt.setAttribute("width",$.width.baseVal.valueAsString),Tt.setAttribute("height",$.height.baseVal.valueAsString),Tt.setAttribute("viewBox","0 0 "+$.viewBox.baseVal.width.toString()+" "+$.viewBox.baseVal.height.toString()),Tt.innerHTML=$.innerHTML,ye.naturalSize===!0?(Tt.width.baseVal.value=V.naturalWidth,Tt.height.baseVal.value=V.naturalHeight):ye.width!==void 0&&ye.height!==void 0&&(Tt.width.baseVal.value=ye.width,Tt.height.baseVal.value=ye.height),Ve.width=Tt.width.baseVal.value,Ve.height=Tt.height.baseVal.value;var Xt=Tt.outerHTML,Er=Ve.getContext("2d");ye.markersOnly!==!0&&Er.drawImage(V,0,0,Ve.width,Ve.height);var Pt=window.URL,kr=new Image(Ve.width,Ve.height);kr.setAttribute("crossOrigin","anonymous");var Gr=new Blob([Xt],{type:"image/svg+xml"}),yn=Pt.createObjectURL(Gr);kr.onload=function(){Er.drawImage(kr,0,0),Pt.revokeObjectURL(yn);var ni=Ve.toDataURL(ye.imageType,ye.imageQuality);oe(ni)},kr.src=yn})},le}(),ee=function(){},re=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 Te("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Te("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Te("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new ie("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new ie("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}(),Te=function(le,V){this.selector=le,this.style=V},ie=function(le,V){this.localName=le,this.style=V},q=function(){function le(V,$,te,ye,oe){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=V,this.displayMode=$,this.markerItems=te,this.uiStyleSettings=ye,this.styles=oe,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 $=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(oe){var Ve=document.createElement("div");Ve.className=""+$.toolbarButtonStyleClass.name,Ve.setAttribute("data-type-name",oe.typeName),Ve.innerHTML=oe.icon,Ve.addEventListener("click",function(){$.markerToolbarButtonClicked(Ve,oe)}),$.buttons.push(Ve),$.markerButtons.push(Ve)}),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 ye=document.createElement("div");ye.className=this.toolbarBlockStyleClass.name,ye.style.whiteSpace="nowrap",ye.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ye),this.addActionButton(ye,'<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(ye,'<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 $=0;$<this.markerButtons.length;$++)$<V||$===V&&this.markerButtons.length-1===V?this.markerButtonBlock.appendChild(this.markerButtons[$]):($===V&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[$]))}},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($){$.className=$.className.replace(V.uiStyleSettings.toolbarButtonStyleColorsClassName?V.uiStyleSettings.toolbarButtonStyleColorsClassName:V.toolbarButtonStyleColorsClass.name,"").trim(),$.className=$.className.replace(V.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?V.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:V.toolbarActiveButtonStyleColorsClass.name,"").trim(),$.className+=" "+(V.uiStyleSettings.toolbarButtonStyleColorsClassName?V.uiStyleSettings.toolbarButtonStyleColorsClassName:V.toolbarButtonStyleColorsClass.name)})},le.prototype.addActionButton=function(V,$,te){var ye=this,oe=document.createElement("div");switch(oe.className=""+this.toolbarButtonStyleClass.name,oe.innerHTML=$,oe.setAttribute("data-action",te),oe.addEventListener("click",function(){ye.actionToolbarButtonClicked(oe,te)}),te){case"select":oe.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":oe.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":oe.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":oe.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":oe.style.fill=this.uiStyleSettings.closeButtonColor}V.appendChild(oe),this.buttons.push(oe)},le.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new ie("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 ie("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new ie("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new ie("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 ie("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var V=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ie("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 ie("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ie("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Te("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new Te("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},le.prototype.markerToolbarButtonClicked=function(V,$){this.setActiveButton(V),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(te){return te("marker",$)}),this.markerButtonOverflowBlock.style.display="none"},le.prototype.actionToolbarButtonClicked=function(V,$){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(te){return te("action",$)}),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 $=this.markerButtons.find(function(te){return te.getAttribute("data-type-name")===V});$&&this.setActiveButton($)},le.prototype.setCurrentMarker=function(V){var $=this;this.currentMarker=V,this.buttons.filter(function(te){return/delete|notes/.test(te.getAttribute("data-action"))}).forEach(function(te){$.currentMarker===void 0?(te.style.fillOpacity="0.4",te.style.pointerEvents="none"):(te.style.fillOpacity="1",te.style.pointerEvents="all")})},le}(),Y=function(){function le(V,$,te,ye){this.panels=[],this.panelButtons=[],this.markerjsContainer=V,this.displayMode=$,this.uiStyleSettings=te,this.styles=ye,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return le.prototype.addStyles=function(){var V;this.toolboxStyleClass=this.styles.addClass(new ie("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 ie("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var $=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ie("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ie("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ie("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 ie("toolbox-panel-row_colors",`
background-color: `+((V=this.uiStyleSettings.toolboxBackgroundColor)!==null&&V!==void 0?V:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ie("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*$)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*$)+`px;
padding: `+$+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ie("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ie("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Te("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Te("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},le.prototype.show=function(V){var $;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=V,this.uiContainer.className=this.toolboxStyleClass.name+" "+(($=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&$!==void 0?$:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},le.prototype.setPanelButtons=function(V){var $,te,ye=this;this.panels=V,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+(($=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&$!==void 0?$: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(oe){var Ve;oe.uiStyleSettings=ye.uiStyleSettings;var Tt=document.createElement("div");Tt.className=ye.toolboxButtonStyleClass.name+" "+((Ve=ye.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ve!==void 0?Ve:ye.toolboxButtonStyleColorsClass.name),Tt.innerHTML=oe.icon,Tt.title=oe.title,Tt.addEventListener("click",function(){ye.panelButtonClick(oe)}),ye.panelButtons.push(Tt),ye.buttonRow.appendChild(Tt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},le.prototype.panelButtonClick=function(V){var $=this,te=-1;if(V!==this.activePanel){te=this.panels.indexOf(V),this.panelRow.innerHTML="";var ye=V.getUi();ye.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ye),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(){$.displayMode==="inline"?$.panelRow.style.display="none":$.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(oe,Ve){var Tt,Xt;oe.className=$.toolboxButtonStyleClass.name+" "+(Ve===te?""+((Tt=$.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Tt!==void 0?Tt:$.toolboxActiveButtonStyleColorsClass.name):""+((Xt=$.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Xt!==void 0?Xt:$.toolboxButtonStyleColorsClass.name))})},le}(),X=function(le,V){this.title=le,this.icon=V},he=function(le){function V($,te,ye,oe){var Ve=le.call(this,$,oe||'<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 Ve.colors=[],Ve.addTransparent=!1,Ve.colorBoxes=[],Ve.colors=te,Ve.currentColor=ye,Ve.setCurrentColor=Ve.setCurrentColor.bind(Ve),Ve.getColorBox=Ve.getColorBox.bind(Ve),Ve}return me(V,le),V.prototype.getUi=function(){var $=this,te=document.createElement("div");return te.style.overflow="hidden",te.style.whiteSpace="nowrap",this.colors.forEach(function(ye){var oe=$.getColorBox(ye);te.appendChild(oe),$.colorBoxes.push(oe)}),te},V.prototype.getColorBox=function($){var te=this,ye=this.uiStyleSettings.toolbarHeight/4,oe=this.uiStyleSettings.toolbarHeight-ye,Ve=document.createElement("div");Ve.style.display="inline-block",Ve.style.boxSizing="content-box",Ve.style.width=oe-2+"px",Ve.style.height=oe-2+"px",Ve.style.padding="1px",Ve.style.marginRight="2px",Ve.style.marginBottom="2px",Ve.style.borderWidth="2px",Ve.style.borderStyle="solid",Ve.style.borderRadius=(oe+2)/2+"px",Ve.style.borderColor=$===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Ve.addEventListener("click",function(){te.setCurrentColor($,Ve)});var Tt=document.createElement("div");return Tt.style.display="inline-block",Tt.style.width=oe-2+"px",Tt.style.height=oe-2+"px",Tt.style.backgroundColor=$,Tt.style.borderRadius=oe/2+"px",$==="transparent"&&(Tt.style.fill=this.uiStyleSettings.toolboxAccentColor,Tt.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>`),Ve.appendChild(Tt),Ve},V.prototype.setCurrentColor=function($,te){var ye=this;this.currentColor=$,this.colorBoxes.forEach(function(oe){oe.style.borderColor=oe===te?ye.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged($)},V}(X),fe=function(){function le(V,$,te){this._state="new",this._isSelected=!1,this._container=V,this._overlayContainer=$,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,$){},le.prototype.dblClick=function(V,$){},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,$){},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}(),Ee=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}(),He=function(){function le(){this.GRIP_SIZE=10,this.visual=se.createGroup(),this.visual.appendChild(se.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(se.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,$){return V.a=$.a,V.b=$.b,V.c=$.c,V.d=$.d,V.e=$.e,V.f=$.f,V},le}(),et=function(le){function V($,te,ye){var oe=le.call(this,$,te,ye)||this;return oe.left=0,oe.top=0,oe.width=0,oe.height=0,oe.defaultSize={x:50,y:20},oe.offsetX=0,oe.offsetY=0,oe.rotationAngle=0,oe.CB_DISTANCE=10,oe._suppressMarkerCreateEvent=!1,oe.container.transform.baseVal.appendItem(se.createTransform()),oe.setupControlBox(),oe}return me(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($){this._visual=$;var te=se.createTransform();this._visual.transform.baseVal.appendItem(te)},enumerable:!1,configurable:!0}),V.prototype.ownsTarget=function($){return!!le.prototype.ownsTarget.call(this,$)||!!(this.controlGrips.findGripByVisual($)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget($))},V.prototype.pointerDown=function($,te){le.prototype.pointerDown.call(this,$,te),this.state==="new"&&(this.left=$.x,this.top=$.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ye=this.unrotatePoint($);if(this.manipulationStartX=ye.x,this.manipulationStartY=ye.y,this.offsetX=ye.x-this.left,this.offsetY=ye.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 oe=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=oe.x-this.width/2,this.top=oe.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Ve=this.container.transform.baseVal.getItem(0);Ve.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ve,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},V.prototype.pointerUp=function($){var te=this.state;le.prototype.pointerUp.call(this,$),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate($),this._state="select",te==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},V.prototype.moveVisual=function($){this.visual.style.transform="translate("+$.x+"px, "+$.y+"px)"},V.prototype.manipulate=function($){var te=this.unrotatePoint($);this.state==="creating"?this.resize($):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($)},V.prototype.resize=function($){var te=this.manipulationStartLeft,ye=this.manipulationStartWidth,oe=this.manipulationStartTop,Ve=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:te=this.manipulationStartLeft+$.x-this.manipulationStartX,ye=this.manipulationStartWidth+this.manipulationStartLeft-te;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ye=this.manipulationStartWidth+$.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:oe=this.manipulationStartTop+$.y-this.manipulationStartY,Ve=this.manipulationStartHeight+this.manipulationStartTop-oe;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Ve=this.manipulationStartHeight+$.y-this.manipulationStartY}ye>=0?(this.left=te,this.width=ye):(this.left=te+ye,this.width=-ye),Ve>=0?(this.top=oe,this.height=Ve):(this.top=oe+Ve,this.height=-Ve),this.setSize()},V.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},V.prototype.rotate=function($){if(Math.abs($.x-this.centerX)>.1){var te=Math.sign($.x-this.centerX);this.rotationAngle=180*Math.atan(($.y-this.centerY)/($.x-this.centerX))/Math.PI+90*te,this.applyRotation()}},V.prototype.applyRotation=function(){var $=this.container.transform.baseVal.getItem(0);$.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem($,0)},V.prototype.rotatePoint=function($){if(this.rotationAngle===0)return $;var te=this.container.getCTM(),ye=se.createPoint($.x,$.y);return{x:(ye=ye.matrixTransform(te)).x,y:ye.y}},V.prototype.unrotatePoint=function($){if(this.rotationAngle===0)return $;var te=this.container.getCTM();te=te.inverse();var ye=se.createPoint($.x,$.y);return{x:(ye=ye.matrixTransform(te)).x,y:ye.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=se.createGroup();var $=se.createTransform();$.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem($),this.container.appendChild(this.controlBox),this.controlRect=se.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=se.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 Ee,this.addControlGrips(),this.controlBox.style.display="none"},V.prototype.adjustControlBox=function(){var $=this.controlBox.transform.baseVal.getItem(0);$.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem($,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 $=new He;return $.visual.transform.baseVal.appendItem(se.createTransform()),this.controlBox.appendChild($.visual),$},V.prototype.positionGrips=function(){var $=this.controlGrips.topLeft.GRIP_SIZE,te=-$/2,ye=te,oe=(this.width+this.CB_DISTANCE)/2-$/2,Ve=(this.height+this.CB_DISTANCE)/2-$/2,Tt=this.height+this.CB_DISTANCE-$/2,Xt=this.width+this.CB_DISTANCE-$/2;this.positionGrip(this.controlGrips.topLeft.visual,te,ye),this.positionGrip(this.controlGrips.topCenter.visual,oe,ye),this.positionGrip(this.controlGrips.topRight.visual,Xt,ye),this.positionGrip(this.controlGrips.centerLeft.visual,te,Ve),this.positionGrip(this.controlGrips.centerRight.visual,Xt,Ve),this.positionGrip(this.controlGrips.bottomLeft.visual,te,Tt),this.positionGrip(this.controlGrips.bottomCenter.visual,oe,Tt),this.positionGrip(this.controlGrips.bottomRight.visual,Xt,Tt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,oe,ye-3*this.CB_DISTANCE)},V.prototype.positionGrip=function($,te,ye){var oe=$.transform.baseVal.getItem(0);oe.setTranslate(te,ye),$.transform.baseVal.replaceItem(oe,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($){le.prototype.restoreState.call(this,$);var te=$;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($,te){le.prototype.scale.call(this,$,te);var ye=this.rotatePoint({x:this.left,y:this.top}),oe=this.unrotatePoint({x:ye.x*$,y:ye.y*te});this.left=oe.x,this.top=oe.y,this.width=this.width*$,this.height=this.height*te,this.adjustControlBox()},V}(fe),it=function(le){function V($,te,ye){var oe=le.call(this,$,te,ye)||this;return oe.fillColor="transparent",oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.opacity=1,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setFillColor=oe.setFillColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.createVisual=oe.createVisual.bind(oe),oe}return me(V,le),V.prototype.ownsTarget=function($){return!(!le.prototype.ownsTarget.call(this,$)&&$!==this.visual)},V.prototype.createVisual=function(){this.visual=se.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($,te){le.prototype.pointerDown.call(this,$,te),this.state==="new"&&(this.createVisual(),this.moveVisual($),this._state="creating")},V.prototype.manipulate=function($){le.prototype.manipulate.call(this,$)},V.prototype.resize=function($){le.prototype.resize.call(this,$),this.setSize()},V.prototype.setSize=function(){le.prototype.setSize.call(this),se.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},V.prototype.pointerUp=function($){le.prototype.pointerUp.call(this,$),this.setSize()},V.prototype.setStrokeColor=function($){this.strokeColor=$,this.visual&&se.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged($),this.stateChanged()},V.prototype.setFillColor=function($){this.fillColor=$,this.visual&&se.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},V.prototype.setStrokeWidth=function($){this.strokeWidth=$,this.visual&&se.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},V.prototype.setStrokeDasharray=function($){this.strokeDasharray=$,this.visual&&se.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($){var te=$;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,$),this.setSize()},V.prototype.scale=function($,te){le.prototype.scale.call(this,$,te),this.setSize()},V.title="Rectangle marker",V}(et),ut=function(le){function V($,te,ye,oe){var Ve=le.call(this,$,oe||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Ve.widths=[],Ve.widthBoxes=[],Ve.widths=te,Ve.currentWidth=ye,Ve.setCurrentWidth=Ve.setCurrentWidth.bind(Ve),Ve}return me(V,le),V.prototype.getUi=function(){var $=this,te=document.createElement("div");return te.style.display="flex",te.style.overflow="hidden",te.style.flexGrow="2",this.widths.forEach(function(ye){var oe=document.createElement("div");oe.style.display="flex",oe.style.flexGrow="2",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.borderColor=ye===$.currentWidth?$.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){$.setCurrentWidth(ye,oe)}),te.appendChild(oe);var Ve=document.createElement("div");Ve.innerText=ye.toString(),Ve.style.marginRight="5px",oe.appendChild(Ve);var Tt=document.createElement("div");Tt.style.minHeight="20px",Tt.style.flexGrow="2",Tt.style.display="flex",Tt.style.alignItems="center";var Xt=document.createElement("hr");Xt.style.minWidth="20px",Xt.style.border="0px",Xt.style.borderTop=ye+"px solid "+$.uiStyleSettings.toolboxColor,Xt.style.flexGrow="2",Tt.appendChild(Xt),oe.appendChild(Tt),$.widthBoxes.push(oe)}),te},V.prototype.setCurrentWidth=function($,te){var ye=this;this.currentWidth=$,this.widthBoxes.forEach(function(oe){oe.style.borderColor=oe===te?ye.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},V}(X),dt=function(le){function V($,te,ye,oe){var Ve=le.call(this,$,oe||'<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 Ve.styles=[],Ve.styleBoxes=[],Ve.styles=te,Ve.currentStyle=ye,Ve.setCurrentStyle=Ve.setCurrentStyle.bind(Ve),Ve}return me(V,le),V.prototype.getUi=function(){var $=this,te=document.createElement("div");return te.style.display="flex",te.style.overflow="hidden",te.style.flexGrow="2",this.styles.forEach(function(ye){var oe=document.createElement("div");oe.style.display="flex",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.overflow="hidden",oe.style.maxWidth=100/$.styles.length-5+"%",oe.style.borderColor=ye===$.currentStyle?$.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){$.setCurrentStyle(ye,oe)}),te.appendChild(oe);var Ve=document.createElement("div");Ve.style.minHeight="20px",Ve.style.flexGrow="2",Ve.style.overflow="hidden";var Tt=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+$.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(ye!==""?'stroke-dasharray="'+ye+'"':"")+` />
</svg>`;Ve.innerHTML=Tt,oe.appendChild(Ve),$.styleBoxes.push(oe)}),te},V.prototype.setCurrentStyle=function($,te){var ye=this;this.currentStyle=$,this.styleBoxes.forEach(function(oe){oe.style.borderColor=oe===te?ye.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},V}(X),Fe=function(le){function V($,te,ye){var oe=le.call(this,$,te,ye)||this;return oe.strokeColor=ye.defaultColor,oe.strokeWidth=ye.defaultStrokeWidth,oe.strokeDasharray=ye.defaultStrokeDasharray,oe.strokePanel=new he("Line color",ye.defaultColorSet,ye.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new ut("Line width",ye.defaultStrokeWidths,ye.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new dt("Line style",ye.defaultStrokeDasharrays,ye.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return me(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 $=le.prototype.getState.call(this);return $.typeName=V.typeName,$},V.typeName="FrameMarker",V.title="Frame marker",V.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',V}(it),Ie=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},st=function(le){function V($,te,ye){var oe=le.call(this,$,te,ye)||this;return oe.x1=0,oe.y1=0,oe.x2=0,oe.y2=0,oe.defaultLength=50,oe.manipulationStartX=0,oe.manipulationStartY=0,oe.manipulationStartX1=0,oe.manipulationStartY1=0,oe.manipulationStartX2=0,oe.manipulationStartY2=0,oe.setupControlBox(),oe}return me(V,le),V.prototype.ownsTarget=function($){return!!le.prototype.ownsTarget.call(this,$)||!(!this.grip1.ownsTarget($)&&!this.grip2.ownsTarget($))},V.prototype.pointerDown=function($,te){le.prototype.pointerDown.call(this,$,te),this.manipulationStartX=$.x,this.manipulationStartY=$.y,this.state==="new"&&(this.x1=$.x,this.y1=$.y,this.x2=$.x,this.y2=$.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($){var te=this.state;le.prototype.pointerUp.call(this,$),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($),this._state="select",te==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},V.prototype.adjustVisual=function(){},V.prototype.manipulate=function($){this.state==="creating"?this.resize($):this.state==="move"?(this.x1=this.manipulationStartX1+$.x-this.manipulationStartX,this.y1=this.manipulationStartY1+$.y-this.manipulationStartY,this.x2=this.manipulationStartX2+$.x-this.manipulationStartX,this.y2=this.manipulationStartY2+$.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize($)},V.prototype.resize=function($){switch(this.activeGrip){case this.grip1:this.x1=$.x,this.y1=$.y;break;case this.grip2:case void 0:this.x2=$.x,this.y2=$.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=se.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 $=new He;return $.visual.transform.baseVal.appendItem(se.createTransform()),this.controlBox.appendChild($.visual),$},V.prototype.positionGrips=function(){var $=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-$/2,this.y1-$/2),this.positionGrip(this.grip2.visual,this.x2-$/2,this.y2-$/2)},V.prototype.positionGrip=function($,te,ye){var oe=$.transform.baseVal.getItem(0);oe.setTranslate(te,ye),$.transform.baseVal.replaceItem(oe,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($){le.prototype.restoreState.call(this,$);var te=$;this.x1=te.x1,this.y1=te.y1,this.x2=te.x2,this.y2=te.y2},V.prototype.scale=function($,te){le.prototype.scale.call(this,$,te),this.x1=this.x1*$,this.y1=this.y1*te,this.x2=this.x2*$,this.y2=this.y2*te,this.adjustVisual(),this.adjustControlBox()},V}(fe),ft=function(le){function V($,te,ye){var oe=le.call(this,$,te,ye)||this;return oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.strokeColor=ye.defaultColor,oe.strokeWidth=ye.defaultStrokeWidth,oe.strokeDasharray=ye.defaultStrokeDasharray,oe.strokePanel=new he("Line color",ye.defaultColorSet,ye.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new ut("Line width",ye.defaultStrokeWidths,ye.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new dt("Line style",ye.defaultStrokeDasharrays,ye.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return me(V,le),V.prototype.ownsTarget=function($){return!(!le.prototype.ownsTarget.call(this,$)&&$!==this.visual&&$!==this.selectorLine&&$!==this.visibleLine)},V.prototype.createVisual=function(){this.visual=se.createGroup(),this.selectorLine=se.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=se.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($,te){le.prototype.pointerDown.call(this,$,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()),se.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),se.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),se.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},V.prototype.setStrokeColor=function($){this.strokeColor=$,this.adjustVisual(),this.colorChanged($)},V.prototype.setStrokeWidth=function($){this.strokeWidth=$,this.adjustVisual()},V.prototype.setStrokeDasharray=function($){this.strokeDasharray=$,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 $=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},le.prototype.getState.call(this));return $.typeName=V.typeName,$},V.prototype.restoreState=function($){le.prototype.restoreState.call(this,$);var te=$;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}(st),Ze=function(le){function V($,te,ye,oe){var Ve=le.call(this,$,oe||'<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 Ve.fonts=[],Ve.fontBoxes=[],Ve.fonts=te,Ve.currentFont=ye,Ve.setCurrentFont=Ve.setCurrentFont.bind(Ve),Ve}return me(V,le),V.prototype.getUi=function(){var $=this,te=document.createElement("div");return te.style.overflow="hidden",te.style.flexGrow="2",this.fonts.forEach(function(ye){var oe=document.createElement("div");oe.style.display="inline-block",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.overflow="hidden",oe.style.maxWidth=100/$.fonts.length-5+"%",oe.style.borderColor=ye===$.currentFont?$.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){$.setCurrentFont(ye,oe)}),te.appendChild(oe);var Ve=document.createElement("div");Ve.style.display="flex",Ve.style.minHeight="20px",Ve.style.flexGrow="2",Ve.style.fontFamily=ye,Ve.style.overflow="hidden";var Tt=document.createElement("div");Tt.style.whiteSpace="nowrap",Tt.style.overflow="hidden",Tt.style.textOverflow="ellipsis",Tt.innerHTML="The quick brown fox jumps over the lazy dog",Ve.appendChild(Tt),oe.appendChild(Ve),$.fontBoxes.push(oe)}),te},V.prototype.setCurrentFont=function($,te){var ye=this;this.currentFont=$,this.fontBoxes.forEach(function(oe){oe.style.borderColor=oe===te?ye.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},V}(X),tt=function(le){function V($,te,ye){var oe=le.call(this,$,te,ye)||this;return oe.color="transparent",oe.padding=5,oe.DEFAULT_TEXT="your text here",oe.text=oe.DEFAULT_TEXT,oe.isMoved=!1,oe.color=ye.defaultColor,oe.fontFamily=ye.defaultFontFamily,oe.defaultSize={x:100,y:30},oe.setColor=oe.setColor.bind(oe),oe.setFont=oe.setFont.bind(oe),oe.renderText=oe.renderText.bind(oe),oe.sizeText=oe.sizeText.bind(oe),oe.textEditDivClicked=oe.textEditDivClicked.bind(oe),oe.showTextEditor=oe.showTextEditor.bind(oe),oe.setSize=oe.setSize.bind(oe),oe.positionTextEditor=oe.positionTextEditor.bind(oe),oe.colorPanel=new he("Color",ye.defaultColorSet,ye.defaultColor),oe.colorPanel.onColorChanged=oe.setColor,oe.fontFamilyPanel=new Ze("Font",ye.defaultFontFamilies,ye.defaultFontFamily),oe.fontFamilyPanel.onFontChanged=oe.setFont,oe}return me(V,le),V.prototype.ownsTarget=function($){if(le.prototype.ownsTarget.call(this,$)||$===this.visual||$===this.textElement||$===this.bgRectangle)return!0;var te=!1;return this.textElement.childNodes.forEach(function(ye){ye===$&&(te=!0)}),te},V.prototype.createVisual=function(){this.visual=se.createGroup(),this.bgRectangle=se.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=se.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(se.createTransform()),this.textElement.transform.baseVal.appendItem(se.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},V.prototype.pointerDown=function($,te){le.prototype.pointerDown.call(this,$,te),this.isMoved=!1,this.pointerDownPoint=$,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual($),this._state="creating")},V.prototype.renderText=function(){var $=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){$.textElement.appendChild(se.createTSpan(te.trim()===""?" ":te.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},V.prototype.getTextScale=function(){var $=this.textElement.getBBox(),te=1;if($.width>0&&$.height>0){var ye=(1*this.width-this.width*this.padding*2/100)/$.width,oe=(1*this.height-this.height*this.padding*2/100)/$.height;te=Math.min(ye,oe)}return te},V.prototype.getTextPosition=function($){var te=this.textElement.getBBox(),ye=0,oe=0;return te.width>0&&te.height>0&&(ye=(this.width-te.width*$)/2,oe=this.height/2-te.height*$/2),{x:ye,y:oe}},V.prototype.sizeText=function(){var $=this.textElement.getBBox(),te=this.getTextScale(),ye=this.getTextPosition(te);ye.y-=$.y*te,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ye.x+"px, "+ye.y+"px) scale("+te+", "+te+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ye.x,ye.y),this.textElement.transform.baseVal.getItem(1).setScale(te,te))},V.prototype.manipulate=function($){le.prototype.manipulate.call(this,$),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs($.x-this.pointerDownPoint.x)>5||Math.abs($.y-this.pointerDownPoint.y)>5)},V.prototype.resize=function($){le.prototype.resize.call(this,$),this.isMoved=!0,this.setSize(),this.sizeText()},V.prototype.setSize=function(){le.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(se.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),se.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},V.prototype.pointerUp=function($){var te=this.state;te==="creating"&&(this._suppressMarkerCreateEvent=!0),le.prototype.pointerUp.call(this,$),this.setSize(),(te==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},V.prototype.showTextEditor=function(){var $=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($.textEditor.style.fontSize);$.textEditor.clientWidth>=Number.parseInt($.textEditor.style.maxWidth)&&te>.9;)te-=.1,$.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 ye=te.clipboardData.getData("text"),oe=window.getSelection();if(!oe.rangeCount)return!1;oe.deleteFromDocument(),oe.getRangeAt(0).insertNode(document.createTextNode(ye)),te.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){$.textEditDivClicked($.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 $=this.getTextScale(),te=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ye=this.textElement.getBBox(),oe={x:ye.width*$,y:ye.height*$};te.x-=oe.x/2,te.y-=oe.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*$,12)+"px",this.textElement.style.display="none"}},V.prototype.textEditDivClicked=function($){this.text=$.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($,te){le.prototype.dblClick.call(this,$,te),this.showTextEditor()},V.prototype.setColor=function($){this.textElement&&se.setAttributes(this.textElement,[["fill",$]]),this.color=$,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged($)},V.prototype.setFont=function($){this.textElement&&se.setAttributes(this.textElement,[["font-family",$]]),this.fontFamily=$,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 $=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},le.prototype.getState.call(this));return $.typeName=V.typeName,$},V.prototype.restoreState=function($){var te=$;this.color=te.color,this.fontFamily=te.fontFamily,this.padding=te.padding,this.text=te.text,this.createVisual(),le.prototype.restoreState.call(this,$),this.setSize()},V.prototype.scale=function($,te){le.prototype.scale.call(this,$,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}(et),Be=function(le){function V($,te,ye){var oe=le.call(this,$,te,ye)||this;return oe.color="transparent",oe.lineWidth=3,oe.drawing=!1,oe.pixelRatio=1,oe.color=ye.defaultColor,oe.lineWidth=ye.defaultStrokeWidth,oe.pixelRatio=ye.freehandPixelRatio,oe.setColor=oe.setColor.bind(oe),oe.addCanvas=oe.addCanvas.bind(oe),oe.finishCreation=oe.finishCreation.bind(oe),oe.setLineWidth=oe.setLineWidth.bind(oe),oe.colorPanel=new he("Color",ye.defaultColorSet,ye.defaultColor),oe.colorPanel.onColorChanged=oe.setColor,oe.lineWidthPanel=new ut("Line width",ye.defaultStrokeWidths,ye.defaultStrokeWidth),oe.lineWidthPanel.onWidthChanged=oe.setLineWidth,oe}return me(V,le),V.prototype.ownsTarget=function($){return!(!le.prototype.ownsTarget.call(this,$)&&$!==this.visual&&$!==this.drawingImage)},V.prototype.createVisual=function(){this.visual=se.createGroup(),this.drawingImage=se.createImage(),this.visual.appendChild(this.drawingImage);var $=se.createTransform();this.visual.transform.baseVal.appendItem($),this.addMarkerVisualToContainer(this.visual)},V.prototype.pointerDown=function($,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($.x,$.y),this.drawing=!0):le.prototype.pointerDown.call(this,$,te)},V.prototype.manipulate=function($){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo($.x,$.y),this.canvasContext.stroke()):le.prototype.manipulate.call(this,$)},V.prototype.resize=function($){le.prototype.resize.call(this,$),se.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),se.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},V.prototype.pointerUp=function($){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):le.prototype.pointerUp.call(this,$)},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 $=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),te=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ye=te[0],oe=te[1],Ve=te[2],Tt=te[3],Xt=!1,Er=0;Er<this.canvasElement.height;Er++)for(var Pt=0;Pt<this.canvasElement.width;Pt++)$.data[Er*this.canvasElement.width*4+4*Pt+3]>0&&(Xt=!0,Er<oe&&(oe=Er),Pt<ye&&(ye=Pt),Er>Tt&&(Tt=Er),Pt>Ve&&(Ve=Pt));if(Xt){this.left=ye/this.pixelRatio,this.top=oe/this.pixelRatio,this.width=(Ve-ye)/this.pixelRatio,this.height=(Tt-oe)/this.pixelRatio;var kr=document.createElement("canvas");kr.width=Ve-ye,kr.height=Tt-oe,kr.getContext("2d").putImageData(this.canvasContext.getImageData(ye,oe,Ve-ye,Tt-oe),0,0),this.drawingImgUrl=kr.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},V.prototype.setDrawingImage=function(){se.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),se.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},V.prototype.setColor=function($){this.color=$,this.colorChanged($)},V.prototype.setLineWidth=function($){this.lineWidth=$},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 $=Object.assign({drawingImgUrl:this.drawingImgUrl},le.prototype.getState.call(this));return $.typeName=V.typeName,$},V.prototype.restoreState=function($){this.createVisual(),le.prototype.restoreState.call(this,$),this.drawingImgUrl=$.drawingImgUrl,this.setDrawingImage()},V.prototype.scale=function($,te){le.prototype.scale.call(this,$,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}(et),Pe=function(le){function V($,te,ye){var oe=le.call(this,$,ye||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return oe.typeBoxes=[],oe.currentType=te,oe.setCurrentType=oe.setCurrentType.bind(oe),oe}return me(V,le),V.prototype.getUi=function(){var $=this,te=document.createElement("div");te.style.display="flex",te.style.overflow="hidden",te.style.flexGrow="2";for(var ye=function(Tt){var Xt="both";switch(Tt){case 0:Xt="both";break;case 1:Xt="start";break;case 2:Xt="end";break;case 3:Xt="none"}var Er=document.createElement("div");if(Er.style.display="flex",Er.style.flexGrow="2",Er.style.alignItems="center",Er.style.justifyContent="space-between",Er.style.padding="5px",Er.style.borderWidth="2px",Er.style.borderStyle="solid",Er.style.borderColor=Xt===oe.currentType?oe.uiStyleSettings.toolboxAccentColor:"transparent",Er.addEventListener("click",function(){$.setCurrentType(Xt,Er)}),te.appendChild(Er),Xt==="both"||Xt==="start"){var Pt=document.createElement("div");Pt.style.display="flex",Pt.style.alignItems="center",Pt.style.minHeight="20px",Pt.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="`+(oe.uiStyleSettings!==void 0?oe.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Pt.style.marginLeft="5px",Er.appendChild(Pt)}var kr=document.createElement("div");kr.style.display="flex",kr.style.alignItems="center",kr.style.minHeight="20px",kr.style.flexGrow="2";var Gr=document.createElement("hr");if(Gr.style.minWidth="20px",Gr.style.border="0px",Gr.style.borderTop="3px solid "+(oe.uiStyleSettings!==void 0?oe.uiStyleSettings.toolboxColor:"#eeeeee"),Gr.style.flexGrow="2",kr.appendChild(Gr),Er.appendChild(kr),Xt==="both"||Xt==="end"){var yn=document.createElement("div");yn.style.display="flex",yn.style.alignItems="center",yn.style.minHeight="20px",yn.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="`+(oe.uiStyleSettings!==void 0?oe.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,yn.style.marginRight="5px",Er.appendChild(yn)}oe.typeBoxes.push(Er)},oe=this,Ve=0;Ve<4;Ve++)ye(Ve);return te},V.prototype.setCurrentType=function($,te){var ye=this;this.currentType=$,this.typeBoxes.forEach(function(oe){oe.style.borderColor=oe===te?ye.uiStyleSettings!==void 0?ye.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},V}(X),Ne=function(le){function V($,te,ye){var oe=le.call(this,$,te,ye)||this;return oe.arrowType="end",oe.arrowBaseHeight=10,oe.arrowBaseWidth=10,oe.getArrowPoints=oe.getArrowPoints.bind(oe),oe.setArrowType=oe.setArrowType.bind(oe),oe.arrowTypePanel=new Pe("Arrow type","end"),oe.arrowTypePanel.onArrowTypeChanged=oe.setArrowType,oe}return me(V,le),V.prototype.ownsTarget=function($){return!(!le.prototype.ownsTarget.call(this,$)&&$!==this.arrow1&&$!==this.arrow2)},V.prototype.getArrowPoints=function($,te){var ye=this.arrowBaseWidth+2*this.strokeWidth,oe=this.arrowBaseHeight+2*this.strokeWidth;return $-ye/2+","+(te+oe/2)+" "+$+","+(te-oe/2)+" "+($+ye/2)+","+(te+oe/2)},V.prototype.createTips=function(){this.arrow1=se.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(se.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=se.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(se.createTransform()),this.visual.appendChild(this.arrow2)},V.prototype.pointerDown=function($,te){le.prototype.pointerDown.call(this,$,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",se.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),se.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var $=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($,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(te,0);var ye=this.arrow2.transform.baseVal.getItem(0);ye.setRotate($+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ye,0)}},V.prototype.setArrowType=function($){this.arrowType=$,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 $=Object.assign({arrowType:this.arrowType},le.prototype.getState.call(this));return $.typeName=V.typeName,$},V.prototype.restoreState=function($){le.prototype.restoreState.call(this,$);var te=$;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}(ft),xe=function(le){function V($,te,ye){var oe=le.call(this,$,te,ye)||this;return oe.fillColor=ye.defaultFillColor,oe.strokeWidth=0,oe.fillPanel=new he("Color",ye.defaultColorSet,ye.defaultFillColor),oe.fillPanel.onColorChanged=oe.setFillColor,oe}return me(V,le),Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var $=le.prototype.getState.call(this);return $.typeName=V.typeName,$},V.typeName="CoverMarker",V.title="Cover marker",V.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',V}(it),Ae=function(le){function V($,te,ye,oe){var Ve=le.call(this,$,oe||'<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 Ve.opacities=[],Ve.opacityBoxes=[],Ve.opacities=te,Ve.currentOpacity=ye,Ve.setCurrentOpacity=Ve.setCurrentOpacity.bind(Ve),Ve}return me(V,le),V.prototype.getUi=function(){var $=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(ye){var oe=document.createElement("div");oe.style.display="flex",oe.style.alignItems="center",oe.style.justifyContent="center",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.borderColor=ye===$.currentOpacity?$.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){$.setCurrentOpacity(ye,oe)}),te.appendChild(oe);var Ve=document.createElement("div");Ve.innerText=100*ye+"%",oe.appendChild(Ve),$.opacityBoxes.push(oe)}),te},V.prototype.setCurrentOpacity=function($,te){var ye=this;this.currentOpacity=$,this.opacityBoxes.forEach(function(oe){oe.style.borderColor=oe===te?ye.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},V}(X),Le=function(le){function V($,te,ye){var oe=le.call(this,$,te,ye)||this;return oe.setOpacity=oe.setOpacity.bind(oe),oe.fillColor=ye.defaultHighlightColor,oe.strokeWidth=0,oe.opacity=ye.defaultHighlightOpacity,oe.fillPanel=new he("Color",ye.defaultColorSet,oe.fillColor),oe.fillPanel.onColorChanged=oe.setFillColor,oe.opacityPanel=new Ae("Opacity",ye.defaultOpacitySteps,oe.opacity),oe.opacityPanel.onOpacityChanged=oe.setOpacity,oe}return me(V,le),V.prototype.setOpacity=function($){this.opacity=$,this.visual&&se.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 $=le.prototype.getState.call(this);return $.typeName=V.typeName,$},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}(xe),Me='<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>',We=function(le){function V($,te,ye){var oe=le.call(this,$,te,ye)||this;return oe.bgColor="transparent",oe.tipPosition={x:0,y:0},oe.tipBase1Position={x:0,y:0},oe.tipBase2Position={x:0,y:0},oe.tipMoving=!1,oe.color=ye.defaultStrokeColor,oe.bgColor=ye.defaultFillColor,oe.fontFamily=ye.defaultFontFamily,oe.defaultSize={x:100,y:30},oe.setBgColor=oe.setBgColor.bind(oe),oe.getTipPoints=oe.getTipPoints.bind(oe),oe.positionTip=oe.positionTip.bind(oe),oe.setTipPoints=oe.setTipPoints.bind(oe),oe.colorPanel=new he("Text color",ye.defaultColorSet,oe.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>'),oe.colorPanel.onColorChanged=oe.setColor,oe.bgColorPanel=new he("Fill color",ye.defaultColorSet,oe.bgColor,Me),oe.bgColorPanel.onColorChanged=oe.setBgColor,oe.fontFamilyPanel=new Ze("Font",ye.defaultFontFamilies,ye.defaultFontFamily),oe.fontFamilyPanel.onFontChanged=oe.setFont,oe.tipGrip=new He,oe.tipGrip.visual.transform.baseVal.appendItem(se.createTransform()),oe.controlBox.appendChild(oe.tipGrip.visual),oe}return me(V,le),V.prototype.ownsTarget=function($){return le.prototype.ownsTarget.call(this,$)||this.tipGrip.ownsTarget($)||this.tip===$},V.prototype.createTip=function(){se.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=se.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},V.prototype.pointerDown=function($,te){this.state==="new"&&le.prototype.pointerDown.call(this,$,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,$,te)},V.prototype.pointerUp=function($){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,le.prototype.pointerUp.call(this,$);else{var te=this.state==="creating";le.prototype.pointerUp.call(this,$),this.setTipPoints(te),this.positionTip()}},V.prototype.manipulate=function($){if(this.tipMoving){var te=this.unrotatePoint($);this.tipPosition={x:te.x-this.manipulationStartLeft,y:te.y-this.manipulationStartTop},this.positionTip()}else le.prototype.manipulate.call(this,$)},V.prototype.setBgColor=function($){this.bgRectangle&&this.tip&&(se.setAttributes(this.bgRectangle,[["fill",$]]),se.setAttributes(this.tip,[["fill",$]])),this.bgColor=$,this.fillColorChanged($)},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($){$===void 0&&($=!1);var te=Math.min(this.height/2,15),ye=this.height/5;$&&(this.tipPosition={x:te+ye/2,y:this.height+20});var oe=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?oe<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(ye=this.width/5,te=Math.min(this.width/2,15),this.tipBase1Position={x:te,y:0},this.tipBase2Position={x:te+ye,y:0}):(this.tipBase1Position={x:0,y:te},this.tipBase2Position={x:0,y:te+ye}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?oe<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(ye=this.width/5,te=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-te-ye,y:0},this.tipBase2Position={x:this.width-te,y:0}):(this.tipBase1Position={x:this.width,y:te},this.tipBase2Position={x:this.width,y:te+ye}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?oe<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(ye=this.width/5,te=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-te-ye,y:this.height},this.tipBase2Position={x:this.width-te,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-te-ye},this.tipBase2Position={x:this.width,y:this.height-te}):oe<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(ye=this.width/5,te=Math.min(this.width/2,15),this.tipBase1Position={x:te,y:this.height},this.tipBase2Position={x:te+ye,y:this.height}):(this.tipBase1Position={x:0,y:this.height-te},this.tipBase2Position={x:0,y:this.height-te-ye})},V.prototype.resize=function($){le.prototype.resize.call(this,$),this.positionTip()},V.prototype.positionTip=function(){se.setAttributes(this.tip,[["points",this.getTipPoints()]]);var $=this.tipGrip.visual.transform.baseVal.getItem(0);$.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem($,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 $=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},le.prototype.getState.call(this));return $.typeName=V.typeName,$},V.prototype.restoreState=function($){var te=$;this.bgColor=te.bgColor,this.tipPosition=te.tipPosition,le.prototype.restoreState.call(this,$),this.createTip(),this.setTipPoints()},V.prototype.scale=function($,te){le.prototype.scale.call(this,$,te),this.tipPosition={x:this.tipPosition.x*$,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}(tt),nt=function(le){function V($,te,ye){var oe=le.call(this,$,te,ye)||this;return oe.fillColor="transparent",oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.opacity=1,oe.strokeColor=ye.defaultColor,oe.strokeWidth=ye.defaultStrokeWidth,oe.strokeDasharray=ye.defaultStrokeDasharray,oe.fillColor=ye.defaultFillColor,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setFillColor=oe.setFillColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.setOpacity=oe.setOpacity.bind(oe),oe.createVisual=oe.createVisual.bind(oe),oe.strokePanel=new he("Line color",ce(ye.defaultColorSet,["transparent"]),ye.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.fillPanel=new he("Fill color",ce(ye.defaultColorSet,["transparent"]),oe.fillColor,Me),oe.fillPanel.onColorChanged=oe.setFillColor,oe.strokeWidthPanel=new ut("Line width",ye.defaultStrokeWidths,ye.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new dt("Line style",ye.defaultStrokeDasharrays,ye.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe.opacityPanel=new Ae("Opacity",ye.defaultOpacitySteps,oe.opacity),oe.opacityPanel.onOpacityChanged=oe.setOpacity,oe}return me(V,le),V.prototype.ownsTarget=function($){return!(!le.prototype.ownsTarget.call(this,$)&&$!==this.visual)},V.prototype.createVisual=function(){this.visual=se.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($,te){le.prototype.pointerDown.call(this,$,te),this.state==="new"&&(this.createVisual(),this.moveVisual($),this._state="creating")},V.prototype.manipulate=function($){le.prototype.manipulate.call(this,$)},V.prototype.resize=function($){le.prototype.resize.call(this,$),this.setSize()},V.prototype.setSize=function(){le.prototype.setSize.call(this),se.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($){le.prototype.pointerUp.call(this,$),this.setSize()},V.prototype.setStrokeColor=function($){this.strokeColor=$,this.visual&&se.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged($),this.stateChanged()},V.prototype.setFillColor=function($){this.fillColor=$,this.visual&&se.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged($),this.stateChanged()},V.prototype.setStrokeWidth=function($){this.strokeWidth=$,this.visual&&se.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},V.prototype.setStrokeDasharray=function($){this.strokeDasharray=$,this.visual&&se.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},V.prototype.setOpacity=function($){this.opacity=$,this.visual&&se.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 $=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},le.prototype.getState.call(this));return $.typeName=V.typeName,$},V.prototype.restoreState=function($){var te=$;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,$),this.setSize()},V.prototype.scale=function($,te){le.prototype.scale.call(this,$,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}(et),vt=function(le){function V($,te,ye){return le.call(this,$,te,ye)||this}return me(V,le),Object.defineProperty(V.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),V.prototype.ownsTarget=function($){return!(!le.prototype.ownsTarget.call(this,$)&&$!==this.tip1&&$!==this.tip2)},V.prototype.createTips=function(){this.tip1=se.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(se.createTransform()),this.visual.appendChild(this.tip1),this.tip2=se.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(se.createTransform()),this.visual.appendChild(this.tip2)},V.prototype.pointerDown=function($,te){le.prototype.pointerDown.call(this,$,te),this.state==="creating"&&this.createTips()},V.prototype.adjustVisual=function(){if(le.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(se.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()]]),se.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 $=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($,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(te,0);var ye=this.tip2.transform.baseVal.getItem(0);ye.setRotate($+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ye,0)}},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var $=le.prototype.getState.call(this);return $.typeName=V.typeName,$},V.prototype.restoreState=function($){le.prototype.restoreState.call(this,$),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}(ft),bt=function(le){function V($,te,ye){var oe=le.call(this,$,te,ye)||this;return oe.strokePanel.colors=ye.defaultColorSet,oe.fillColor="transparent",oe}return me(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 $=le.prototype.getState.call(this);return $.typeName=V.typeName,$},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}(nt),Wt=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}(),Bt=function(le){function V($,te,ye){var oe=le.call(this,$,te,ye)||this;return oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.curveX=0,oe.curveY=0,oe.manipulationStartCurveX=0,oe.manipulationStartCurveY=0,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.positionGrips=oe.positionGrips.bind(oe),oe.addControlGrips=oe.addControlGrips.bind(oe),oe.adjustVisual=oe.adjustVisual.bind(oe),oe.setupControlBox=oe.setupControlBox.bind(oe),oe.resize=oe.resize.bind(oe),oe.strokeColor=ye.defaultColor,oe.strokeWidth=ye.defaultStrokeWidth,oe.strokeDasharray=ye.defaultStrokeDasharray,oe.strokePanel=new he("Line color",ye.defaultColorSet,ye.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new ut("Line width",ye.defaultStrokeWidths,ye.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new dt("Line style",ye.defaultStrokeDasharrays,ye.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return me(V,le),V.prototype.ownsTarget=function($){return!(!le.prototype.ownsTarget.call(this,$)&&$!==this.visual&&$!==this.selectorCurve&&$!==this.visibleCurve&&!this.curveGrip.ownsTarget($))},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=se.createGroup(),this.selectorCurve=se.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=se.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($,te){le.prototype.pointerDown.call(this,$,te),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=$.x,this.curveY=$.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()),se.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),se.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),se.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},V.prototype.setupControlBox=function(){le.prototype.setupControlBox.call(this),this.curveControlLine1=se.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=se.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 $=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-$/2,this.curveY-$/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($){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+$.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+$.y-this.manipulationStartY),le.prototype.manipulate.call(this,$)},V.prototype.resize=function($){this.activeGrip===this.curveGrip&&(this.curveX=$.x,this.curveY=$.y),le.prototype.resize.call(this,$),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($){this.strokeColor=$,this.adjustVisual(),this.colorChanged($)},V.prototype.setStrokeWidth=function($){this.strokeWidth=$,this.adjustVisual()},V.prototype.setStrokeDasharray=function($){this.strokeDasharray=$,this.adjustVisual()},V.prototype.scale=function($,te){this.curveX=this.curveX*$,this.curveY=this.curveY*te,le.prototype.scale.call(this,$,te)},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var $=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},le.prototype.getState.call(this));return $.typeName=V.typeName,$},V.prototype.restoreState=function($){le.prototype.restoreState.call(this,$);var te=$;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}(st),lr=function(){function le(V,$){$===void 0&&($=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=V,this.cancelable=$}return Object.defineProperty(le.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),le.prototype.preventDefault=function(){this._defaultPrevented=!0},le}(),dr=function(le){function V($,te,ye){var oe=le.call(this,$,!1)||this;return oe.dataUrl=te,oe.state=ye,oe}return me(V,le),V}(lr),Ot=function(le){function V($,te,ye){ye===void 0&&(ye=!1);var oe=le.call(this,$,ye)||this;return oe.marker=te,oe}return me(V,le),V}(lr),Vr=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,$){this[V].push($)},le.prototype.removeEventListener=function(V,$){var te=this[V].indexOf($);te>-1&&this[V].splice(te,1)},le}(),Wr=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 Ie,this._isOpen=!1,this.undoRedoManager=new Wt,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 Vr,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=le.instanceCounter++,this.styles=new re(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[Fe,Be,Ne,tt,bt,nt,Le,We,vt,xe,ft,Bt]},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Fe,Be,Ne,tt,nt,Le,We]},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Fe,Be,Ne,tt,Le]},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(V){var $=this;this._availableMarkerTypes.splice(0),V.forEach(function(te){if(typeof te=="string"){var ye=$.ALL_MARKER_TYPES.find(function(oe){return oe.typeName===te});ye!==void 0&&$._availableMarkerTypes.push(ye)}else $._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(),ne.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},le.prototype.show=function(){var V=this;this.styles.styleSheetRoot===void 0&&ee.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=ee.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function($){return $(new lr(V))})},le.prototype.render=function(){return Oe(this,void 0,void 0,function(){var V;return be(this,function($){switch($.label){case 0:return this.setCurrentMarker(),(V=new ge).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 $.sent(),[4,V.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,$.sent()]}})})},le.prototype.close=function(V){var $=this;if(V===void 0&&(V=!1),this.isOpen){var te=!1;V||this.eventListeners.beforeclose.forEach(function(ye){var oe=new lr($,!0);ye(oe),oe.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(ye){return ye(new lr($))}),this.detachEvents(),this._isOpen=!1)}},le.prototype.addMarkersToToolbar=function(){for(var V,$=[],te=0;te<arguments.length;te++)$[te]=arguments[te];(V=this._availableMarkerTypes).push.apply(V,$)},le.prototype.addRenderEventListener=function(V){this.addEventListener("render",function($){V($.dataUrl,$.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,$=this.editorCanvas.clientWidth/V>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*V:this.editorCanvas.clientWidth,te=$<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/V;this.resize($,te)},le.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},le.prototype.resize=function(V,$){this._isResizing=!0;var te=V/this.imageWidth,ye=$/this.imageHeight;this.imageWidth=Math.round(V),this.imageHeight=Math.round($),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,ye),this._isResizing=!1},le.prototype.scaleMarkers=function(V,$){var te,ye=this;this._currentMarker&&this._currentMarker instanceof tt?this._currentMarker.scale(V,$):(te=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(oe){oe!==ye._currentMarker&&oe.scale(V,$)}),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(),$=this.editorCanvas.getBoundingClientRect();this.left=V.left-$.left,this.top=V.top-$.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,$=[],te=0;te<arguments.length;te++)$[te]=arguments[te];this.defs=se.createDefs(),this.addDefsToImage(),(V=this.defs).append.apply(V,$)},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 Y(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,$){if(V==="marker"&&$!==void 0)this.createNewMarker($);else if(V==="action")switch($){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 $=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ye){var oe=new Ot(V,V._currentMarker,!0);ye(oe),oe.defaultPrevented&&($=!0)}),!$){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(ye){return ye(new Ot(V,te))})}}},le.prototype.clear=function(){var V=this,$=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ve){var Tt=new Ot(V,void 0,!0);Ve(Tt),Tt.defaultPrevented&&($=!0)}),!$)){this.setCurrentMarker();for(var te=function(Ve){var Tt=ye.markers[Ve];ye.setCurrentMarker(ye.markers[Ve]),ye._currentMarker.dispose(),ye.markerImage.removeChild(ye._currentMarker.container),ye.markers.splice(ye.markers.indexOf(ye._currentMarker),1),ye.eventListeners.markerdelete.forEach(function(Xt){return Xt(new Ot(V,Tt))})},ye=this,oe=this.markers.length-1;oe>=0;oe--)te(oe);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 $=this.getState(),te=this.undoRedoManager.getLastUndoStep();if(!te||te.width===$.width&&te.height===$.height){var ye=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep($),ye<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(oe){return oe(new lr(V))})}else this.undoRedoManager.replaceLastUndoStep($),this.eventListeners.statechange.forEach(function(oe){return oe(new lr(V))})}},le.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},le.prototype.undoStep=function(){var V=this,$=this.undoRedoManager.undo();$!==void 0&&(this.restoreState($),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(te){return te(new lr(V))}))},le.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},le.prototype.redoStep=function(){var V=this,$=this.undoRedoManager.redo();$!==void 0&&(this.restoreState($),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(te){return te(new lr(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 Oe(this,void 0,void 0,function(){var V,$,te=this;return be(this,function(ye){switch(ye.label){case 0:return[4,this.render()];case 1:return V=ye.sent(),$=this.getState(),this.eventListeners.render.forEach(function(oe){return oe(new dr(te,V,$))}),this.close(!0),[2]}})})},le.prototype.getState=function(V){V===!0&&this.setCurrentMarker();var $={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(te){return $.markers.push(te.getState())}),$},le.prototype.restoreState=function(V){var $=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);V.markers.forEach(function(te){var ye=$._availableMarkerTypes.find(function(Ve){return Ve.typeName===te.typeName});if(ye!==void 0){var oe=$.addNewMarker(ye);oe.restoreState(te),$.markers.push(oe)}}),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 lr($))})},le.prototype.addNewMarker=function(V){var $=se.createGroup();return this.markerImage.appendChild($),new V($,this.overlayContainer,this.settings)},le.prototype.createNewMarker=function(V){var $,te=this;($=typeof V=="string"?this._availableMarkerTypes.find(function(ye){return ye.typeName===V}):V)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker($),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($.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(ye){return ye(new Ot(te,te._currentMarker))}))},le.prototype.markerCreated=function(V){var $=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(V),this.setCurrentMarker(V),V instanceof Be&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Be):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(te){return te(new Ot($,$._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 $=this;this.eventListeners.markerchange.forEach(function(te){return te(new Ot($,V))})},le.prototype.setCurrentMarker=function(V){var $=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 Ot($,$._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 Ot($,$._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 $=this.markers.find(function(te){return te.ownsTarget(V.target)});$!==void 0?(this.setCurrentMarker($),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 $=this.markers.find(function(te){return te.ownsTarget(V.target)});$!==void 0&&$!==this._currentMarker&&this.setCurrentMarker($),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,$){var te=this.markerImage.getBoundingClientRect();return{x:(V-te.left)/this.zoomLevel,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){ne.addKey(V)},le.prototype.addEventListener=function(V,$){this.eventListeners.addEventListener(V,$)},le.prototype.removeEventListener=function(V,$){this.eventListeners.removeEventListener(V,$)},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($){return $(new lr(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($){return $(new lr(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 Yr=function(le,V){return(Yr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function($,te){$.__proto__=te}||function($,te){for(var ye in te)Object.prototype.hasOwnProperty.call(te,ye)&&($[ye]=te[ye])})(le,V)};function bn(le,V){if(typeof V!="function"&&V!==null)throw new TypeError("Class extends value "+String(V)+" is not a constructor or null");function $(){this.constructor=le}Yr(le,V),le.prototype=V===null?Object.create(V):($.prototype=V.prototype,new $)}function Ar(le,V,$,te){return new($||($=Promise))(function(ye,oe){function Ve(Er){try{Xt(te.next(Er))}catch(Pt){oe(Pt)}}function Tt(Er){try{Xt(te.throw(Er))}catch(Pt){oe(Pt)}}function Xt(Er){var Pt;Er.done?ye(Er.value):(Pt=Er.value,Pt instanceof $?Pt:new $(function(kr){kr(Pt)})).then(Ve,Tt)}Xt((te=te.apply(le,V||[])).next())})}function fn(le,V){var $,te,ye,oe,Ve={label:0,sent:function(){if(1&ye[0])throw ye[1];return ye[1]},trys:[],ops:[]};return oe={next:Tt(0),throw:Tt(1),return:Tt(2)},typeof Symbol=="function"&&(oe[Symbol.iterator]=function(){return this}),oe;function Tt(Xt){return function(Er){return function(Pt){if($)throw new TypeError("Generator is already executing.");for(;Ve;)try{if($=1,te&&(ye=2&Pt[0]?te.return:Pt[0]?te.throw||((ye=te.return)&&ye.call(te),0):te.next)&&!(ye=ye.call(te,Pt[1])).done)return ye;switch(te=0,ye&&(Pt=[2&Pt[0],ye.value]),Pt[0]){case 0:case 1:ye=Pt;break;case 4:return Ve.label++,{value:Pt[1],done:!1};case 5:Ve.label++,te=Pt[1],Pt=[0];continue;case 7:Pt=Ve.ops.pop(),Ve.trys.pop();continue;default:if(!(ye=Ve.trys,(ye=ye.length>0&&ye[ye.length-1])||Pt[0]!==6&&Pt[0]!==2)){Ve=0;continue}if(Pt[0]===3&&(!ye||Pt[1]>ye[0]&&Pt[1]<ye[3])){Ve.label=Pt[1];break}if(Pt[0]===6&&Ve.label<ye[1]){Ve.label=ye[1],ye=Pt;break}if(ye&&Ve.label<ye[2]){Ve.label=ye[2],Ve.ops.push(Pt);break}ye[2]&&Ve.ops.pop(),Ve.trys.pop();continue}Pt=V.call(le,Ve)}catch(kr){Pt=[6,kr],te=0}finally{$=ye=0}if(5&Pt[0])throw Pt[1];return{value:Pt[0]?Pt[1]:void 0,done:!0}}([Xt,Er])}}}var cn=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}(),Vt=function(){function le(){}return le.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},le.setAttributes=function(V,$){for(var te=0,ye=$;te<ye.length;te++){var oe=ye[te],Ve=oe[0],Tt=oe[1];V.setAttribute(Ve,Tt)}},le.createRect=function(V,$,te){var ye=document.createElementNS("http://www.w3.org/2000/svg","rect");return ye.setAttribute("width",V.toString()),ye.setAttribute("height",$.toString()),te&&le.setAttributes(ye,te),ye},le.createLine=function(V,$,te,ye,oe){var Ve=document.createElementNS("http://www.w3.org/2000/svg","line");return Ve.setAttribute("x1",V.toString()),Ve.setAttribute("y1",$.toString()),Ve.setAttribute("x2",te.toString()),Ve.setAttribute("y2",ye.toString()),oe&&le.setAttributes(Ve,oe),Ve},le.createPolygon=function(V,$){var te=document.createElementNS("http://www.w3.org/2000/svg","polygon");return te.setAttribute("points",V),$&&le.setAttributes(te,$),te},le.createCircle=function(V,$){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()),$&&le.setAttributes(te,$),te},le.createEllipse=function(V,$,te){var ye=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ye.setAttribute("cx",(V/2).toString()),ye.setAttribute("cy",($/2).toString()),ye.setAttribute("rx",(V/2).toString()),ye.setAttribute("ry",($/2).toString()),te&&le.setAttributes(ye,te),ye},le.createGroup=function(V){var $=document.createElementNS("http://www.w3.org/2000/svg","g");return V&&le.setAttributes($,V),$},le.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},le.createMarker=function(V,$,te,ye,oe,Ve,Tt){var Xt=document.createElementNS("http://www.w3.org/2000/svg","marker");return le.setAttributes(Xt,[["id",V],["orient",$],["markerWidth",te.toString()],["markerHeight",ye.toString()],["refX",oe.toString()],["refY",Ve.toString()]]),Xt.appendChild(Tt),Xt},le.createText=function(V){var $=document.createElementNS("http://www.w3.org/2000/svg","text");return $.setAttribute("x","0"),$.setAttribute("y","0"),V&&le.setAttributes($,V),$},le.createTSpan=function(V,$){var te=document.createElementNS("http://www.w3.org/2000/svg","tspan");return te.textContent=V,$&&le.setAttributes(te,$),te},le.createImage=function(V){var $=document.createElementNS("http://www.w3.org/2000/svg","image");return V&&le.setAttributes($,V),$},le.createPoint=function(V,$){var te=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return te.x=V,te.y=$,te},le.createPath=function(V,$){var te=document.createElementNS("http://www.w3.org/2000/svg","path");return te.setAttribute("d",V),$&&le.setAttributes(te,$),te},le.createElement=function(V,$){var te=document.createElementNS("http://www.w3.org/2000/svg",V);return $&&le.setAttributes(te,$),te},le.getHollowRectanglePath=function(V,$,te,ye,oe,Ve,Tt,Xt){return"M"+V+","+$+"V"+($+ye)+"H"+(V+te)+"V"+$+"H"+oe+"V"+Ve+"H"+(oe+Tt)+"V"+(Ve+Xt)+"H"+oe+"V"+$+"Z"},le}(),En=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 fr("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new fr("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new fr("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new br("_fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new br("_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}(),fr=function(le,V){this.selector=le,this.style=V},br=function(le,V){this.localName=le,this.style=V},Br=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($){return V.appendChild($.getUI())}),V},le}(),Pn=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}(),Kn=function(le){function V(){var $=le!==null&&le.apply(this,arguments)||this;return $.buttons=[],$}return bn(V,le),V.prototype.addButton=function($){$.className=this.buttonClassName,$.colorsClassName=this.buttonColorsClassName,$.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push($)},V.prototype.getUI=function(){var $=le.prototype.getUI.call(this);return this.buttons.forEach(function(te){return $.appendChild(te.getUI())}),$},V}(Pn),dn=function(){function le(V,$){this._isActive=!1,this._isHidden=!1,this._icon=V,this.title=$,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}(),sr=function(le){function V(){var $=le!==null&&le.apply(this,arguments)||this;return $.elements=[],$}return bn(V,le),V.prototype.addElement=function($){this.elements.push($)},V.prototype.getUI=function(){var $=le.prototype.getUI.call(this);return this.elements.forEach(function(te){return $.appendChild(te)}),$},V}(Pn),Jn=function(){function le(V,$){this.horizontal=V,this.vertical=$}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}(),Tn=function(){function le(){}return le.getIcon=function(V,$){if(V>0&&$>0){var te=new Jn(V,$),ye=te.ratio>=1?20:te.getHorizontalLength(20),oe=te.ratio<1?20:te.getVerticalLength(20),Ve=document.createElementNS("http://www.w3.org/2000/svg","svg");Ve.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ve.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(Ve);var Tt=Vt.createDefs();Ve.appendChild(Tt);var Xt=Vt.createElement("clipPath",[["id","text-bg-clip"]]);Tt.appendChild(Xt);var Er=Vt.createPath(Vt.getHollowRectanglePath((24-ye)/2,(24-oe)/2,ye,oe,(24-ye)/2+2,(24-oe)/2+2,ye-4,oe-4));Ve.appendChild(Er);var Pt=Vt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Pt.appendChild(Vt.createTSpan(V+":"+$)),Ve.appendChild(Pt);var kr=Pt.getBBox();Vt.setAttributes(Pt,[["x",((24-kr.width)/2).toString()],["y",((24-kr.height)/2-kr.y).toString()]]);var Gr=Vt.createPath(Vt.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(kr.width))/2,(24-Math.ceil(kr.height))/2,Math.ceil(kr.width),Math.ceil(kr.height)));return Xt.appendChild(Gr),Vt.setAttributes(Er,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Ve),Ve.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}(),On=function(le){function V($,te,ye){var oe=le.call(this,$,te)||this;return oe.isDropdownOpen=!1,oe.onClick=oe.dropdownButtonClicked,oe.dropdownButtons=ye,oe}return bn(V,le),V.prototype.setupDropdown=function(){var $=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=$.className,te.colorsClassName=$.colorsClassName,$.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}(dn),Jr=function(){function le(V,$){this.GRIP_SIZE=10,this.color=V,this.fillColor=$,this.visual=Vt.createGroup(),this.visual.appendChild(Vt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Vt.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,$){this.visual.childNodes.forEach(function(te){return Vt.setAttributes(te,[["cx",V.toString()],["cy",$.toString()]])})},le}(),An=function(){function le(V,$,te,ye){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=V,this.canvasHeight=$,this.margin=te,this.container=ye,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&&Vt.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=Vt.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Vt.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var $=0;$<this.numberOfGridLines;$++)this.horizontalGridLines.push(Vt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(Vt.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=Vt.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new Jr(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new Jr(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new Jr(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new Jr(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},le.prototype.setCropRectangle=function(V){this.cropRect=V;var $=Object.assign({},this.cropRect);this.zoomFactor!==1&&($.width=this.cropRect.width*this.zoomFactor,$.height=this.cropRect.height*this.zoomFactor,$.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-$.width/2,$.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-$.height/2),Vt.setAttributes(this.cropRectElement,[["x",$.x.toString()],["y",$.y.toString()],["width",$.width.toString()],["height",$.height.toString()]]);var te=$.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(oe,Ve){var Tt=$.y+te*(Ve+1);Vt.setAttributes(oe,[["x1",""+$.x],["y1",""+Tt],["x2",""+($.x+$.width)],["y2",""+Tt]])});var ye=$.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(oe,Ve){var Tt=$.x+ye*(Ve+1);Vt.setAttributes(oe,[["x1",""+Tt],["y1",""+$.y],["x2",""+Tt],["y2",""+($.y+$.height)]])}),Vt.setAttributes(this.cropShadeElement,[["d",Vt.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,$.x,$.y,$.width,$.height)]]),this.topLeftGrip.setCenter($.x,$.y),this.topRightGrip.setCenter($.x+$.width,$.y),this.bottomLeftGrip.setCenter($.x,$.y+$.height),this.bottomRightGrip.setCenter($.x+$.width,$.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,$){var te=this.container.getBoundingClientRect();return{x:V-te.left+this.margin,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 $=this.clientToLocalCoordinates(V.clientX,V.clientY);this.resize($)}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 $=V.x-this.previousPoint.x,te=V.y-this.previousPoint.y;this.zoomFactor!==1&&($=-$/this.zoomFactor,te=-te/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+$),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 $=Object.assign({},this.cropRect),te=V.x-this.previousPoint.x,ye=V.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:$.x+te<this.margin&&(te=this.margin-$.x),$.x+=te,$.width=this.cropRect.x+this.cropRect.width-$.x;break;case this.bottomRightGrip:case this.topRightGrip:$.width+te>this.canvasWidth*this.zoomFactor&&(te=this.canvasWidth*this.zoomFactor-$.width),$.width+=te}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?($.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(te),$.height=this.aspectRatio.getVerticalLength($.width)):($.y+=ye,$.height=this.cropRect.y+this.cropRect.height-$.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?$.height=this.aspectRatio.getVerticalLength($.width):$.height+=ye}$.width<10&&($.x=this.cropRect.x,$.width=10),$.height<10&&($.y=this.cropRect.y,$.height=10),this.previousPoint=V,$.x>=this.margin&&$.y>=this.margin&&$.x-this.margin+$.width<=this.canvasWidth&&$.y-this.margin+$.height<=this.canvasHeight&&(this.cropRect=$,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,$=this.cropRect.y+this.cropRect.height/2,te=this.aspectRatio.getHorizontalLength(this.cropRect.height),ye=this.aspectRatio.getVerticalLength(this.cropRect.width);te/this.canvasWidth<ye/this.canvasHeight?this.cropRect.width=te:this.cropRect.height=ye,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=$-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,$,te,ye,oe,Ve){var Tt=te/V,Xt=ye/$;return{x:(oe.x-Ve)*Tt+Ve,y:(oe.y-Ve)*Xt+Ve,width:oe.width*Tt,height:oe.height*Xt}},le.prototype.scaleCanvas=function(V,$){var te=this.getRescaledRect(this.canvasWidth,this.canvasHeight,V,$,this.cropRect,this.margin);this.canvasWidth=V,this.canvasHeight=$,this.onCropChange&&this.onCropChange(te),this.setCropRectangle(te)},le}(),Zn=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();Vt.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 $="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,te=1;te<=this.width/5+10;te++){var ye=te%5==0?this.height/3:this.height/6;$+="h4v"+-ye+"h1v"+ye}$+="v1H0Z",this.scaleShape=Vt.createPath($);var oe=Vt.createTransform();this.scaleShape.transform.baseVal.appendItem(oe),V.appendChild(this.scaleShape),this.angleLabelElement=Vt.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Vt.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Ve=Vt.createTSpan("");return Ve.innerHTML="&deg;",this.angleLabelElement.appendChild(Ve),V.appendChild(this.angleLabelElement),document.body.removeChild(V),V},le}(),ri=function(){function le(){this.naturalSize=!1,this.imageType="image/png"}return le.prototype.rasterize=function(V,$,te,ye,oe,Ve,Tt){var Xt=this;return new Promise(function(Er){var Pt=document.createElement("canvas");Pt.width=V.width.baseVal.value-2*ye,Pt.height=V.height.baseVal.value-2*ye;var kr=1,Gr=1;Xt.naturalSize===!0?(kr=$.naturalWidth/(V.width.baseVal.value-2*ye)/Ve,Gr=$.naturalHeight/(V.height.baseVal.value-2*ye)/Tt,Pt.width=$.naturalWidth/Ve,Pt.height=$.naturalHeight/Tt):Xt.width!==void 0&&Xt.height!==void 0&&(kr=Xt.width/te.width,Gr=Xt.height/te.height,Pt.width*=kr,Pt.height*=Gr);var yn=Pt.getContext("2d");yn.translate(Pt.width/2,Pt.height/2),yn.rotate(oe*Math.PI/180),yn.scale(Ve,Tt),yn.translate(-Pt.width/2,-Pt.height/2),yn.drawImage($,0,0,Pt.width,Pt.height);var ni=document.createElement("canvas");ni.width=te.width*kr,ni.height=te.height*Gr,ni.getContext("2d").putImageData(yn.getImageData((te.x-ye)*kr,(te.y-ye)*Gr,te.width*kr,te.height*Gr),0,0),Er(ni.toDataURL(Xt.imageType,Xt.imageQuality))})},le}(),Nt=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 En(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($){return $()}),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,$=this.contentDiv.clientWidth/V>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*V:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,te=$+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/V;this.resize($,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",Vt.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,$){this.imageWidth=Math.round(V),this.imageHeight=Math.round($),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 $=V.toDataURL();Vt.setAttributes(this.editingTarget,[["href",$]]),this.setEditingTargetSize()},le.prototype.setTopLeft=function(){var V=this.target.getBoundingClientRect(),$=this.editorCanvas.getBoundingClientRect();this.left=V.left-$.left-this.CANVAS_MARGIN,this.top=V.top-$.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=Vt.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=Vt.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=Vt.createGroup(),this.editingTargetRotationScaleContainer=Vt.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var V=Vt.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(V);var $=Vt.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem($),this.editingTargetContainer=Vt.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=Vt.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new An(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,$=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 "+$+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-V+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-$+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,$=this.target.offsetTop>V+this.CANVAS_MARGIN?this.target.offsetTop-(V+this.CANVAS_MARGIN):0;this.coverDiv.style.top=$+"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 Br,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 $=new Kn;$.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock($);var te=[];this.aspectRatios.forEach(function(Gr){var yn=new dn(Tn.getIcon(Gr.horizontal,Gr.vertical),Gr.horizontal===0&&Gr.vertical===0?"FREE":Gr.horizontal+":"+Gr.vertical);yn.onClick=function(){return V.ratioButtonClicked(Gr)},te.push(yn)}),this.aspectRatioButton=new On(Tn.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,$.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var ye=new dn('<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");ye.isActive=this.isGridVisible,ye.onClick=function(){V.isGridVisible=!V.isGridVisible,ye.isActive=V.isGridVisible},$.addButton(ye);var oe=new dn('<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(oe.isActive=this.zoomToCropEnabled,oe.onClick=function(){V.zoomToCropEnabled=!V.zoomToCropEnabled,oe.isActive=V.zoomToCropEnabled},$.addButton(oe),!cn.isLicensed){var Ve=new sr;this.topToolbar.addElementBlock(Ve);var Tt=document.createElement("div");Tt.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Xt=document.createElement("a");Xt.style.color="currentColor",Xt.href="https://markerjs.com/products/cropro",Xt.target="_blank",Xt.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>',Tt.appendChild(Xt),Ve.addElement(Tt)}var Er=new Kn;Er.minWidth=3*this.toolbarHeight+"px",Er.contentAlign="end",this.topToolbar.addButtonBlock(Er);var Pt=new dn('<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");Pt.onClick=this.startRenderAndClose,Er.addButton(Pt),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Pt.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var kr=new dn('<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");kr.onClick=this.close,Er.addButton(kr),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(kr.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},le.prototype.addBottomToolbar=function(){var V=this;this.bottomToolbar=new Br,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 $=new Kn;$.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock($);var te=new dn('<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,$.addButton(te);var ye=new dn('<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");ye.onClick=this.rotateRightButtonClicked,$.addButton(ye);var oe=new sr;oe.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(oe),this.straightener=new Zn("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(Er){V.rotateBy(Er),V.straightener.angle=V.rotationAngle},oe.addElement(this.straightener.getUI());var Ve=new Kn;Ve.minWidth=2*this.toolbarHeight+"px",Ve.contentAlign="end",this.bottomToolbar.addButtonBlock(Ve);var Tt=new dn('<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");Tt.onClick=this.flipHorizontallyButtonClicked,Ve.addButton(Tt);var Xt=new dn('<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");Xt.onClick=this.flipVerticallyButtonClicked,Ve.addButton(Xt)},le.prototype.ratioButtonClicked=function(V){this.aspectRatio=V,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},le.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Tn.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 Jn(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 $=this.cropLayer.getRescaledRect(V.width,V.height,this.imageWidth,this.imageHeight,V.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle($),this.cropRectChanged($),this.flippedHorizontally=V.flippedHorizontally,this.flippedVertically=V.flippedVertically,this.applyFlip(),this.rotationAngle=V.rotationAngle,this.applyRotation()}},le.prototype.clientToLocalCoordinates=function(V,$){var te=this.cropImage.getBoundingClientRect();return{x:V-te.left,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 $=this.editingTargetRotationContainer.transform.baseVal.getItem(0);$.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem($,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 Ar(this,void 0,void 0,function(){var V,$;return fn(this,function(te){switch(te.label){case 0:return[4,this.render()];case 1:return V=te.sent(),$=this.getState(),this.renderEventListeners.forEach(function(ye){return ye(V,$)}),this.close(!0),[2]}})})},le.prototype.render=function(){return Ar(this,void 0,void 0,function(){var V;return fn(this,function($){switch($.label){case 0:return(V=new ri).naturalSize=this.renderAtNaturalSize,V.imageType=this.renderImageType,V.imageQuality=this.renderImageQuality,V.width=this.renderWidth,V.height=this.renderHeight,this.unzoomFromCrop(),Vt.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 $.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,$.sent()]}})})},le.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new br("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 br("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new br("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var V=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new br("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 br("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new br("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new fr("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new fr("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new br("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 br("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new br("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 br("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 br("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},le.instanceCounter=0,le}(),_r=D("8hTe"),mi=D.n(_r),xi=/<pre[^>]*>/g;function Di(le){var V=document.createElement("div");return V.innerHTML=le,V.childNodes.length===0?"":V.childNodes[0].nodeValue}var wi=J.a=function(le){var V=le.value,$=V===void 0?"":V,te=le.edit,ye=te===void 0?!1:te,oe=le.className,Ve=le.showTextOnly,Tt=le.showLines,Xt=le.replaces,Er=le.zoomImg,Pt=le.hasMask,kr=le.style,Gr=kr===void 0?{}:kr,yn=le.stylesPrev,ni=yn===void 0?{}:yn,ii=String($),Bn=Object(h.useRef)(),Ni=Object(h.useRef)(),Ki=Object(h.useState)(""),Gn=Object(S.a)(Ki,2),Ti=Gn[0],Gi=Gn[1],Li=Object(h.useState)("office"),li=Object(S.a)(Li,2),ea=li[0],Vi=li[1],ta=function(){var mt=new Nt(Ni.current);mt.displayMode="popup",mt.addRenderEventListener(function(){var wt=Object(y.a)(t.a.mark(function Lt(It){var Kt;return t.a.wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:return Bn.current.style.display="none",ht.next=3,Object(Ce.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:It}});case 3:Kt=ht.sent,Kt!=null&&Kt.id&&Xt(Ni.current.getAttribute("src").replace(Z.a.API_SERVER,""),"/api/attachments/".concat(Kt==null?void 0:Kt.id,"?type=").concat(Kt.content_type));case 5:case"end":return ht.stop()}},Lt)}));return function(Lt){return wt.apply(this,arguments)}}()),mt.show()},oa=function(){var mt=new Wr(Ni.current);mt.settings.displayMode="popup",mt.addEventListener("render",function(){var wt=Object(y.a)(t.a.mark(function Lt(It){var Kt;return t.a.wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:if(Bn.current.style.display="none",!Ni.current){ht.next=6;break}return ht.next=4,Object(Ce.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:It.dataUrl}});case 4:Kt=ht.sent,Kt!=null&&Kt.id&&Xt(Ni.current.getAttribute("src").replace(Z.a.API_SERVER,""),"/api/attachments/".concat(Kt==null?void 0:Kt.id,"?type=").concat(Kt.content_type));case 6:case"end":return ht.stop()}},Lt)}));return function(Lt){return wt.apply(this,arguments)}}()),mt.show(),window.markerArea=mt},Pi=Object(h.useMemo)(function(){Bn.current&&(Bn.current.style.zIndex=-1);try{var rt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,mt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,wt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;ii=ii.replace(rt,"("+Z.a.API_SERVER+"/api/attachments/").replace(mt,'"'+Z.a.API_SERVER+"/api/attachments/").replace(wt,'"'+Z.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(Ht){}var Lt=B(ii),It=F();if(ii.match(/\[TOC\]/)&&(Lt=Lt.replace("<p>[TOC]</p>",R()),x()),Lt=Lt.replace(/(__special_katext_id_\d+__)/g,function(Ht,ht){var St=It[ht],At=St.type,ur=St.expression;return Object(ue.renderToString)(Di(ur)||"",{displayMode:At==="block",throwOnError:!1,output:"html"})}),Lt=Lt.replace(/▁/g,"\u2581\u2581\u2581"),N(),Ve){var Kt=document.createElement("div");return Kt.innerHTML=Lt,Kt.innerText}return setTimeout(function(){return ha()},500),Lt},[ii]),qn=Object(h.useRef)();v.WebkitLineClamp=Tt,Tt&&(Gr=Object(m.a)(Object(m.a)({},Gr),v));function ji(rt){var mt=rt.target;if(mt.tagName.toUpperCase()==="IMG"){if(Er){var wt=mt.getAttribute("src");Gi(wt),Vi("image")}}else if(mt.tagName.toUpperCase()==="A"){var Lt=mt.getAttribute("href");if(Lt.indexOf("office")>-1)rt.preventDefault(),Gi(Lt),Vi("office");else if(Lt.indexOf("application/pdf")>-1)rt.preventDefault(),Gi(Lt),Vi("pdf");else if(Lt.indexOf("text/html")>-1)rt.preventDefault(),Gi(Lt),Vi("html");else if(Lt.startsWith("#")){rt.preventDefault();var It=document.getElementById(Lt.replace("#",""));It&&It.scrollIntoView(!0)}}}var ha=function(){var mt,wt=(mt=qn.current)===null||mt===void 0?void 0:mt.querySelectorAll("video");wt==null||wt.forEach(function(Lt){if(Lt.oncontextmenu=function(){return!1},Lt.src.indexOf(".m3u8")>-1&&!Lt.canPlayType("application/vnd.apple.mpegurl")){if(K.a.isSupported()){var It=new K.a;It.loadSource(Lt.src),It.attachMedia(Lt)}}})};Object(h.useEffect)(function(){if(qn.current&&Pi&&(Pi.match(xi)&&window.PR.prettyPrint()),qn.current)return qn.current.addEventListener("click",ji),function(){qn.current.removeEventListener("click",ji),N(),x()}},[Pi,qn.current,ji]);var xt=function(mt){if(!ye)return;mt.target.nodeName==="IMG"?(Bn.current.style.zIndex=1,Bn.current.style.display="flex",Bn.current.style.width=mt.target.clientWidth+"px",Bn.current.style.height=mt.target.clientHeight+"px",Bn.current.style.top=mt.target.offsetTop+"px",Bn.current.style.left=mt.target.offsetLeft+"px",Ni.current.src=mt.target.getAttribute("src")):Bn.current.style.display="none"};return n.a.createElement("div",{style:{position:"relative"}},n.a.createElement("div",{ref:qn,style:Object(m.a)({},Gr),className:"".concat(oe||""," markdown-body ").concat(mi.a.mdBody),onMouseOver:xt,dangerouslySetInnerHTML:{__html:Pi}}),n.a.createElement("div",{ref:Bn,className:mi.a.button},n.a.createElement(g.a,null,n.a.createElement(M.a,{onClick:function(){return ta()}},"\u88C1\u526A"),n.a.createElement(M.a,{onClick:function(){return oa()}},"\u7F16\u8F91"))),n.a.createElement("img",{ref:Ni,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),n.a.createElement(de.a,{close:!0,data:Ti,type:Ti!=null&&Ti.length?ea:"",style:Object(m.a)({},ni),onClose:function(){return Gi("")}}))}},"9OqN":function(H,J,D){(function(k,g,C){H.exports=J=g(D("Ib8C"),D("OLod"))})(this,function(k){return k.mode.CTR=function(){var g=k.lib.BlockCipherMode.extend(),C=g.Encryptor=g.extend({processBlock:function(M,m){var y=this._cipher,S=y.blockSize,_=this._iv,t=this._counter;_&&(t=this._counter=_.slice(0),this._iv=void 0);var h=t.slice(0);y.encryptBlock(h,0),t[S-1]=t[S-1]+1|0;for(var n=0;n<S;n++)M[m+n]^=h[n]}});return g.Decryptor=C,g}(),k.mode.CTR})},"9VGf":function(H,J,D){"use strict";D.d(J,"a",function(){return C});var k=D("q1tI"),g=D.n(k);function C(M,m){var y=Object(k.useRef)();Object(k.useEffect)(function(){y.current=M}),Object(k.useEffect)(function(){function S(){y.current()}if(m!==null){var _=setInterval(S,m);return function(){return clearInterval(_)}}},[m])}},ALsQ:function(H,J,D){(function(k,g,C){H.exports=J=g(D("Ib8C"),D("OLod"))})(this,function(k){return k.mode.CFB=function(){var g=k.lib.BlockCipherMode.extend();g.Encryptor=g.extend({processBlock:function(M,m){var y=this._cipher,S=y.blockSize;C.call(this,M,m,S,y),this._prevBlock=M.slice(m,m+S)}}),g.Decryptor=g.extend({processBlock:function(M,m){var y=this._cipher,S=y.blockSize,_=M.slice(m,m+S);C.call(this,M,m,S,y),this._prevBlock=_}});function C(M,m,y,S){var _,t=this._iv;t?(_=t.slice(0),this._iv=void 0):_=this._prevBlock,S.encryptBlock(_,0);for(var h=0;h<y;h++)M[m+h]^=_[h]}return g}(),k.mode.CFB})},BJfS:function(H,J){var D=function(k){return k.replace(/[A-Z]/g,function(g){return"-"+g.toLowerCase()}).toLowerCase()};H.exports=D},BU3w:function(H,J,D){"use strict";D.d(J,"a",function(){return y});var k=D("MNnm"),g="rc-util-key";function C(S){if(S.attachTo)return S.attachTo;var _=document.querySelector("head");return _||document.body}function M(S){var _,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(k.a)())return null;var h=document.createElement("style");if((_=t.csp)===null||_===void 0?void 0:_.nonce){var n;h.nonce=(n=t.csp)===null||n===void 0?void 0:n.nonce}h.innerHTML=S;var c=C(t),a=c.firstChild;return t.prepend&&c.prepend?c.prepend(h):t.prepend&&a?c.insertBefore(h,a):c.appendChild(h),h}var m=new Map;function y(S,_){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},h=C(t);if(!m.has(h)){var n=M("",t),c=n.parentNode;m.set(h,c),c.removeChild(n)}var a=Array.from(m.get(h).children).find(function(l){return l.tagName==="STYLE"&&l[g]===_});if(a){var i,s;if(((i=t.csp)===null||i===void 0?void 0:i.nonce)&&a.nonce!==((s=t.csp)===null||s===void 0?void 0:s.nonce)){var d;a.nonce=(d=t.csp)===null||d===void 0?void 0:d.nonce}return a.innerHTML!==S&&(a.innerHTML=S),a}var f=M(S,t);return f[g]=_,f}},Bd2K:function(H,J,D){(function(k){k(D("VrN/"),D("osHv"))})(function(k){k.defineOption("autoCloseTags",!1,function(t,h,n){if(n!=k.Init&&n&&t.removeKeyMap("autoCloseTags"),!h)return;var c={name:"autoCloseTags"};(typeof h!="object"||h.whenClosing!==!1)&&(c["'/'"]=function(a){return y(a)}),(typeof h!="object"||h.whenOpening!==!1)&&(c["'>'"]=function(a){return M(a)}),t.addKeyMap(c)});var g=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],C=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function M(t){if(t.getOption("disableInput"))return k.Pass;for(var h=t.listSelections(),n=[],c=t.getOption("autoCloseTags"),a=0;a<h.length;a++){if(!h[a].empty())return k.Pass;var i=h[a].head,s=t.getTokenAt(i),d=k.innerMode(t.getMode(),s.state),f=d.state,l=d.mode.xmlCurrentTag&&d.mode.xmlCurrentTag(f),o=l&&l.name;if(!o)return k.Pass;var r=d.mode.configuration=="html",x=typeof c=="object"&&c.dontCloseTags||r&&g,v=typeof c=="object"&&c.indentTags||r&&C;s.end>i.ch&&(o=o.slice(0,o.length-s.end+i.ch));var p=o.toLowerCase();if(!o||s.type=="string"&&(s.end!=i.ch||!/[\"\']/.test(s.string.charAt(s.string.length-1))||s.string.length==1)||s.type=="tag"&&l.close||s.string.indexOf("/")==i.ch-s.start-1||x&&S(x,p)>-1||_(t,d.mode.xmlCurrentContext&&d.mode.xmlCurrentContext(f)||[],o,i,!0))return k.Pass;var R=typeof c=="object"&&c.emptyTags;if(R&&S(R,o)>-1){n[a]={text:"/>",newPos:k.Pos(i.line,i.ch+2)};continue}var O=v&&S(v,p)>-1;n[a]={indent:O,text:">"+(O?`
`:"")+"</"+o+">",newPos:O?k.Pos(i.line+1,0):k.Pos(i.line,i.ch+1)}}for(var b=typeof c=="object"&&c.dontIndentOnAutoClose,a=h.length-1;a>=0;a--){var E=n[a];t.replaceRange(E.text,h[a].head,h[a].anchor,"+insert");var w=t.listSelections().slice(0);w[a]={head:E.newPos,anchor:E.newPos},t.setSelections(w),!b&&E.indent&&(t.indentLine(E.newPos.line,null,!0),t.indentLine(E.newPos.line+1,null,!0))}}function m(t,h){for(var n=t.listSelections(),c=[],a=h?"/":"</",i=t.getOption("autoCloseTags"),s=typeof i=="object"&&i.dontIndentOnSlash,d=0;d<n.length;d++){if(!n[d].empty())return k.Pass;var f=n[d].head,l=t.getTokenAt(f),o=k.innerMode(t.getMode(),l.state),r=o.state;if(h&&(l.type=="string"||l.string.charAt(0)!="<"||l.start!=f.ch-1))return k.Pass;var x,v=o.mode.name!="xml"&&t.getMode().name=="htmlmixed";if(v&&o.mode.name=="javascript")x=a+"script";else if(v&&o.mode.name=="css")x=a+"style";else{var p=o.mode.xmlCurrentContext&&o.mode.xmlCurrentContext(r);if(!p||p.length&&_(t,p,p[p.length-1],f))return k.Pass;x=a+p[p.length-1]}t.getLine(f.line).charAt(l.end)!=">"&&(x+=">"),c[d]=x}if(t.replaceSelections(c),n=t.listSelections(),!s)for(var d=0;d<n.length;d++)(d==n.length-1||n[d].head.line<n[d+1].head.line)&&t.indentLine(n[d].head.line)}function y(t){return t.getOption("disableInput")?k.Pass:m(t,!0)}k.commands.closeTag=function(t){return m(t)};function S(t,h){if(t.indexOf)return t.indexOf(h);for(var n=0,c=t.length;n<c;++n)if(t[n]==h)return n;return-1}function _(t,h,n,c,a){if(!k.scanForClosingTag)return!1;var i=Math.min(t.lastLine()+1,c.line+500),s=k.scanForClosingTag(t,c,null,i);if(!s||s.tag!=n)return!1;for(var d=a?1:0,f=h.length-1;f>=0&&h[f]==n;f--)++d;c=s.to;for(var f=1;f<d;f++){var l=k.scanForClosingTag(t,c,null,i);if(!l||l.tag!=n)return!1;c=l.to}return!0}})},BjJ7:function(H,J,D){"use strict";D.d(J,"d",function(){return g}),D.d(J,"c",function(){return C}),D.d(J,"e",function(){return M}),D.d(J,"b",function(){return m}),D.d(J,"a",function(){return S});var k=D("m3rI");function g(_){var t=!0;if(_.length>0){for(var h=0;h<_.length;h++)if(_[h].compile_success==0||!_[h].compile_success){t=!1;break}}else t=!1;return t}function C(_){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",h=[],n=0;n<_.length;n++){var c=_[n],a=t?"".concat(t,"/").concat(c.name):"".concat(c.name);h.push({title:c.name,isLeaf:!(c.type==="tree"),key:a})}return h}function M(_,t,h){for(var n=0;n<_.length;n++){var c=_[n];if(c.key===t){c.children=h;break}c.children&&M(c.children,t,h)}return _}function m(_,t,h){var n;return function(){var c=this,a=arguments,i=function(){n=null,h||_.apply(c,a)},s=h&&!n;clearTimeout(n),n=setTimeout(i,t),s&&_.apply(c,a)}}var y=!0,S=k.a.API_SERVER},"C+DQ":function(H,J,D){},"C/vA":function(H,J,D){"use strict";D.d(J,"a",function(){return k});function k(g){const C=this;let M=!1,m;return function(){return M||(M=!0,m=g.apply(C,arguments)),m}}},"Cg/j":function(H,J,D){"use strict";D.d(J,"b",function(){return k}),D.d(J,"a",function(){return g}),D.d(J,"c",function(){return M}),D.d(J,"d",function(){return m});var k;(function(y){y.serviceIds=new Map,y.DI_TARGET="$di$target",y.DI_DEPENDENCIES="$di$dependencies";function S(_){return _[y.DI_DEPENDENCIES]||[]}y.getServiceDependencies=S})(k||(k={}));const g=M("instantiationService");function C(y,S,_,t){S[k.DI_TARGET]===S?S[k.DI_DEPENDENCIES].push({id:y,index:_,optional:t}):(S[k.DI_DEPENDENCIES]=[{id:y,index:_,optional:t}],S[k.DI_TARGET]=S)}function M(y){if(k.serviceIds.has(y))return k.serviceIds.get(y);const S=function(_,t,h){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");C(S,_,h,!1)};return S.toString=()=>y,k.serviceIds.set(y,S),S}function m(y){return function(S,_,t){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");C(y,S,t,!0)}}},Dgm7:function(H,J,D){H.exports=D.p+"static/auth.ea067b42.png"},DlQD:function(H,J,D){(function(k,g){H.exports=g()})(this,function(){"use strict";function k(Be,Pe){for(var Ne=0;Ne<Pe.length;Ne++){var xe=Pe[Ne];xe.enumerable=xe.enumerable||!1,xe.configurable=!0,"value"in xe&&(xe.writable=!0),Object.defineProperty(Be,xe.key,xe)}}function g(Be,Pe,Ne){return Pe&&k(Be.prototype,Pe),Ne&&k(Be,Ne),Be}function C(Be,Pe){if(!Be)return;if(typeof Be=="string")return M(Be,Pe);var Ne=Object.prototype.toString.call(Be).slice(8,-1);if(Ne==="Object"&&Be.constructor&&(Ne=Be.constructor.name),Ne==="Map"||Ne==="Set")return Array.from(Be);if(Ne==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ne))return M(Be,Pe)}function M(Be,Pe){(Pe==null||Pe>Be.length)&&(Pe=Be.length);for(var Ne=0,xe=new Array(Pe);Ne<Pe;Ne++)xe[Ne]=Be[Ne];return xe}function m(Be,Pe){var Ne;if(typeof Symbol=="undefined"||Be[Symbol.iterator]==null){if(Array.isArray(Be)||(Ne=C(Be))||Pe&&Be&&typeof Be.length=="number"){Ne&&(Be=Ne);var xe=0;return function(){return xe>=Be.length?{done:!0}:{done:!1,value:Be[xe++]}}}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 Ne=Be[Symbol.iterator](),Ne.next.bind(Ne)}function y(Be,Pe){return Pe={exports:{}},Be(Pe,Pe.exports),Pe.exports}var S=y(function(Be){function Pe(){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 Ne(xe){Be.exports.defaults=xe}Be.exports={defaults:Pe(),getDefaults:Pe,changeDefaults:Ne}}),_=S.defaults,t=S.getDefaults,h=S.changeDefaults,n=/[&<>"']/,c=/[&<>"']/g,a=/[<>"']|&(?!#?\w+;)/,i=/[<>"']|&(?!#?\w+;)/g,s={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},d=function(Pe){return s[Pe]};function f(Be,Pe){if(Pe){if(n.test(Be))return Be.replace(c,d)}else if(a.test(Be))return Be.replace(i,d);return Be}var l=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function o(Be){return Be.replace(l,function(Pe,Ne){return Ne=Ne.toLowerCase(),Ne==="colon"?":":Ne.charAt(0)==="#"?Ne.charAt(1)==="x"?String.fromCharCode(parseInt(Ne.substring(2),16)):String.fromCharCode(+Ne.substring(1)):""})}var r=/(^|[^\[])\^/g;function x(Be,Pe){Be=Be.source||Be,Pe=Pe||"";var Ne={replace:function(Ae,Le){return Le=Le.source||Le,Le=Le.replace(r,"$1"),Be=Be.replace(Ae,Le),Ne},getRegex:function(){return new RegExp(Be,Pe)}};return Ne}var v=/[^\w:]/g,p=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function R(Be,Pe,Ne){if(Be){var xe;try{xe=decodeURIComponent(o(Ne)).replace(v,"").toLowerCase()}catch(Ae){return null}if(xe.indexOf("javascript:")===0||xe.indexOf("vbscript:")===0||xe.indexOf("data:")===0)return null}Pe&&!p.test(Ne)&&(Ne=T(Pe,Ne));try{Ne=encodeURI(Ne).replace(/%25/g,"%")}catch(Ae){return null}return Ne}var O={},b=/^[^:]+:\/*[^/]*$/,E=/^([^:]+:)[\s\S]*$/,w=/^([^:]+:\/*[^/]*)[\s\S]*$/;function T(Be,Pe){O[" "+Be]||(b.test(Be)?O[" "+Be]=Be+"/":O[" "+Be]=G(Be,"/",!0)),Be=O[" "+Be];var Ne=Be.indexOf(":")===-1;return Pe.substring(0,2)==="//"?Ne?Pe:Be.replace(E,"$1")+Pe:Pe.charAt(0)==="/"?Ne?Pe:Be.replace(w,"$1")+Pe:Be+Pe}var F={exec:function(){}};function N(Be){for(var Pe=1,Ne,xe;Pe<arguments.length;Pe++){Ne=arguments[Pe];for(xe in Ne)Object.prototype.hasOwnProperty.call(Ne,xe)&&(Be[xe]=Ne[xe])}return Be}function L(Be,Pe){var Ne=Be.replace(/\|/g,function(Le,Me,We){for(var nt=!1,vt=Me;--vt>=0&&We[vt]==="\\";)nt=!nt;return nt?"|":" |"}),xe=Ne.split(/ \|/),Ae=0;if(xe.length>Pe)xe.splice(Pe);else for(;xe.length<Pe;)xe.push("");for(;Ae<xe.length;Ae++)xe[Ae]=xe[Ae].trim().replace(/\\\|/g,"|");return xe}function G(Be,Pe,Ne){var xe=Be.length;if(xe===0)return"";for(var Ae=0;Ae<xe;){var Le=Be.charAt(xe-Ae-1);if(Le===Pe&&!Ne)Ae++;else if(Le!==Pe&&Ne)Ae++;else break}return Be.substr(0,xe-Ae)}function z(Be,Pe){if(Be.indexOf(Pe[1])===-1)return-1;for(var Ne=Be.length,xe=0,Ae=0;Ae<Ne;Ae++)if(Be[Ae]==="\\")Ae++;else if(Be[Ae]===Pe[0])xe++;else if(Be[Ae]===Pe[1]&&(xe--,xe<0))return Ae;return-1}function A(Be){Be&&Be.sanitize&&!Be.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:f,unescape:o,edit:x,cleanUrl:R,resolveUrl:T,noopTest:F,merge:N,splitCells:L,rtrim:G,findClosingBracket:z,checkSanitizeDeprecation:A},U=S.defaults,I=B.rtrim,K=B.splitCells,Z=B.escape,ue=B.findClosingBracket;function de(Be,Pe,Ne){var xe=Pe.href,Ae=Pe.title?Z(Pe.title):null,Le=Be[1].replace(/\\([\[\]])/g,"$1");return Be[0].charAt(0)!=="!"?{type:"link",raw:Ne,href:xe,title:Ae,text:Le}:{type:"image",raw:Ne,href:xe,title:Ae,text:Z(Le)}}function Ce(Be,Pe){var Ne=Be.match(/^(\s+)(?:```)/);if(Ne===null)return Pe;var xe=Ne[1];return Pe.split(`
`).map(function(Ae){var Le=Ae.match(/^\s+/);if(Le===null)return Ae;var Me=Le[0];return Me.length>=xe.length?Ae.slice(xe.length):Ae}).join(`
`)}var Re=function(){function Be(Ne){this.options=Ne||U}var Pe=Be.prototype;return Pe.space=function(xe){var Ae=this.rules.block.newline.exec(xe);if(Ae)return Ae[0].length>1?{type:"space",raw:Ae[0]}:{raw:`
`}},Pe.code=function(xe,Ae){var Le=this.rules.block.code.exec(xe);if(Le){var Me=Ae[Ae.length-1];if(Me&&Me.type==="paragraph")return{raw:Le[0],text:Le[0].trimRight()};var We=Le[0].replace(/^ {4}/gm,"");return{type:"code",raw:Le[0],codeBlockStyle:"indented",text:this.options.pedantic?We:I(We,`
`)}}},Pe.fences=function(xe){var Ae=this.rules.block.fences.exec(xe);if(Ae){var Le=Ae[0],Me=Ce(Le,Ae[3]||"");return{type:"code",raw:Le,lang:Ae[2]?Ae[2].trim():Ae[2],text:Me}}},Pe.heading=function(xe){var Ae=this.rules.block.heading.exec(xe);if(Ae)return{type:"heading",raw:Ae[0],depth:Ae[1].length,text:Ae[2]}},Pe.nptable=function(xe){var Ae=this.rules.block.nptable.exec(xe);if(Ae){var Le={type:"table",header:K(Ae[1].replace(/^ *| *\| *$/g,"")),align:Ae[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Ae[3]?Ae[3].replace(/\n$/,"").split(`
`):[],raw:Ae[0]};if(Le.header.length===Le.align.length){var Me=Le.align.length,We;for(We=0;We<Me;We++)/^ *-+: *$/.test(Le.align[We])?Le.align[We]="right":/^ *:-+: *$/.test(Le.align[We])?Le.align[We]="center":/^ *:-+ *$/.test(Le.align[We])?Le.align[We]="left":Le.align[We]=null;for(Me=Le.cells.length,We=0;We<Me;We++)Le.cells[We]=K(Le.cells[We],Le.header.length);return Le}}},Pe.hr=function(xe){var Ae=this.rules.block.hr.exec(xe);if(Ae)return{type:"hr",raw:Ae[0]}},Pe.blockquote=function(xe){var Ae=this.rules.block.blockquote.exec(xe);if(Ae){var Le=Ae[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:Ae[0],text:Le}}},Pe.list=function(xe){var Ae=this.rules.block.list.exec(xe);if(Ae){for(var Le=Ae[0],Me=Ae[2],We=Me.length>1,nt=Me[Me.length-1]===")",vt={type:"list",raw:Le,ordered:We,start:We?+Me.slice(0,-1):"",loose:!1,items:[]},bt=Ae[0].match(this.rules.block.item),Wt=!1,Bt,lr,dr,Ot,Vr,Wr,Yr,bn=bt.length,Ar=0;Ar<bn;Ar++)Bt=bt[Ar],Le=Bt,lr=Bt.length,Bt=Bt.replace(/^ *([*+-]|\d+[.)]) */,""),~Bt.indexOf(`
`)&&(lr-=Bt.length,Bt=this.options.pedantic?Bt.replace(/^ {1,4}/gm,""):Bt.replace(new RegExp("^ {1,"+lr+"}","gm"),"")),Ar!==bn-1&&(dr=this.rules.block.bullet.exec(bt[Ar+1])[0],(We?dr.length===1||!nt&&dr[dr.length-1]===")":dr.length>1||this.options.smartLists&&dr!==Me)&&(Ot=bt.slice(Ar+1).join(`
`),vt.raw=vt.raw.substring(0,vt.raw.length-Ot.length),Ar=bn-1)),Vr=Wt||/\n\n(?!\s*$)/.test(Bt),Ar!==bn-1&&(Wt=Bt.charAt(Bt.length-1)===`
`,Vr||(Vr=Wt)),Vr&&(vt.loose=!0),Wr=/^\[[ xX]\] /.test(Bt),Yr=void 0,Wr&&(Yr=Bt[1]!==" ",Bt=Bt.replace(/^\[[ xX]\] +/,"")),vt.items.push({type:"list_item",raw:Le,task:Wr,checked:Yr,loose:Vr,text:Bt});return vt}},Pe.html=function(xe){var Ae=this.rules.block.html.exec(xe);if(Ae)return{type:this.options.sanitize?"paragraph":"html",raw:Ae[0],pre:!this.options.sanitizer&&(Ae[1]==="pre"||Ae[1]==="script"||Ae[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ae[0]):Z(Ae[0]):Ae[0]}},Pe.def=function(xe){var Ae=this.rules.block.def.exec(xe);if(Ae){Ae[3]&&(Ae[3]=Ae[3].substring(1,Ae[3].length-1));var Le=Ae[1].toLowerCase().replace(/\s+/g," ");return{tag:Le,raw:Ae[0],href:Ae[2],title:Ae[3]}}},Pe.table=function(xe){var Ae=this.rules.block.table.exec(xe);if(Ae){var Le={type:"table",header:K(Ae[1].replace(/^ *| *\| *$/g,"")),align:Ae[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Ae[3]?Ae[3].replace(/\n$/,"").split(`
`):[]};if(Le.header.length===Le.align.length){Le.raw=Ae[0];var Me=Le.align.length,We;for(We=0;We<Me;We++)/^ *-+: *$/.test(Le.align[We])?Le.align[We]="right":/^ *:-+: *$/.test(Le.align[We])?Le.align[We]="center":/^ *:-+ *$/.test(Le.align[We])?Le.align[We]="left":Le.align[We]=null;for(Me=Le.cells.length,We=0;We<Me;We++)Le.cells[We]=K(Le.cells[We].replace(/^ *\| *| *\| *$/g,""),Le.header.length);return Le}}},Pe.lheading=function(xe){var Ae=this.rules.block.lheading.exec(xe);if(Ae)return{type:"heading",raw:Ae[0],depth:Ae[2].charAt(0)==="="?1:2,text:Ae[1]}},Pe.paragraph=function(xe){var Ae=this.rules.block.paragraph.exec(xe);if(Ae)return{type:"paragraph",raw:Ae[0],text:Ae[1].charAt(Ae[1].length-1)===`
`?Ae[1].slice(0,-1):Ae[1]}},Pe.text=function(xe,Ae){var Le=this.rules.block.text.exec(xe);if(Le){var Me=Ae[Ae.length-1];return Me&&Me.type==="text"?{raw:Le[0],text:Le[0]}:{type:"text",raw:Le[0],text:Le[0]}}},Pe.escape=function(xe){var Ae=this.rules.inline.escape.exec(xe);if(Ae)return{type:"escape",raw:Ae[0],text:Z(Ae[1])}},Pe.tag=function(xe,Ae,Le){var Me=this.rules.inline.tag.exec(xe);if(Me)return!Ae&&/^<a /i.test(Me[0])?Ae=!0:Ae&&/^<\/a>/i.test(Me[0])&&(Ae=!1),!Le&&/^<(pre|code|kbd|script)(\s|>)/i.test(Me[0])?Le=!0:Le&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Me[0])&&(Le=!1),{type:this.options.sanitize?"text":"html",raw:Me[0],inLink:Ae,inRawBlock:Le,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Me[0]):Z(Me[0]):Me[0]}},Pe.link=function(xe){var Ae=this.rules.inline.link.exec(xe);if(Ae){var Le=ue(Ae[2],"()");if(Le>-1){var Me=Ae[0].indexOf("!")===0?5:4,We=Me+Ae[1].length+Le;Ae[2]=Ae[2].substring(0,Le),Ae[0]=Ae[0].substring(0,We).trim(),Ae[3]=""}var nt=Ae[2],vt="";if(this.options.pedantic){var bt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(nt);bt?(nt=bt[1],vt=bt[3]):vt=""}else vt=Ae[3]?Ae[3].slice(1,-1):"";nt=nt.trim().replace(/^<([\s\S]*)>$/,"$1");var Wt=de(Ae,{href:nt&&nt.replace(this.rules.inline._escapes,"$1"),title:vt&&vt.replace(this.rules.inline._escapes,"$1")},Ae[0]);return Wt}},Pe.reflink=function(xe,Ae){var Le;if((Le=this.rules.inline.reflink.exec(xe))||(Le=this.rules.inline.nolink.exec(xe))){var Me=(Le[2]||Le[1]).replace(/\s+/g," ");if(Me=Ae[Me.toLowerCase()],!Me||!Me.href){var We=Le[0].charAt(0);return{type:"text",raw:We,text:We}}var nt=de(Le,Me,Le[0]);return nt}},Pe.strong=function(xe,Ae,Le){Le===void 0&&(Le="");var Me=this.rules.inline.strong.start.exec(xe);if(Me&&(!Me[1]||Me[1]&&(Le===""||this.rules.inline.punctuation.exec(Le)))){Ae=Ae.slice(-1*xe.length);var We=Me[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;We.lastIndex=0;for(var nt;(Me=We.exec(Ae))!=null;)if(nt=this.rules.inline.strong.middle.exec(Ae.slice(0,Me.index+3)),nt)return{type:"strong",raw:xe.slice(0,nt[0].length),text:xe.slice(2,nt[0].length-2)}}},Pe.em=function(xe,Ae,Le){Le===void 0&&(Le="");var Me=this.rules.inline.em.start.exec(xe);if(Me&&(!Me[1]||Me[1]&&(Le===""||this.rules.inline.punctuation.exec(Le)))){Ae=Ae.slice(-1*xe.length);var We=Me[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;We.lastIndex=0;for(var nt;(Me=We.exec(Ae))!=null;)if(nt=this.rules.inline.em.middle.exec(Ae.slice(0,Me.index+2)),nt)return{type:"em",raw:xe.slice(0,nt[0].length),text:xe.slice(1,nt[0].length-1)}}},Pe.codespan=function(xe){var Ae=this.rules.inline.code.exec(xe);if(Ae){var Le=Ae[2].replace(/\n/g," "),Me=/[^ ]/.test(Le),We=Le.startsWith(" ")&&Le.endsWith(" ");return Me&&We&&(Le=Le.substring(1,Le.length-1)),Le=Z(Le,!0),{type:"codespan",raw:Ae[0],text:Le}}},Pe.br=function(xe){var Ae=this.rules.inline.br.exec(xe);if(Ae)return{type:"br",raw:Ae[0]}},Pe.del=function(xe){var Ae=this.rules.inline.del.exec(xe);if(Ae)return{type:"del",raw:Ae[0],text:Ae[1]}},Pe.autolink=function(xe,Ae){var Le=this.rules.inline.autolink.exec(xe);if(Le){var Me,We;return Le[2]==="@"?(Me=Z(this.options.mangle?Ae(Le[1]):Le[1]),We="mailto:"+Me):(Me=Z(Le[1]),We=Me),{type:"link",raw:Le[0],text:Me,href:We,tokens:[{type:"text",raw:Me,text:Me}]}}},Pe.url=function(xe,Ae){var Le;if(Le=this.rules.inline.url.exec(xe)){var Me,We;if(Le[2]==="@")Me=Z(this.options.mangle?Ae(Le[0]):Le[0]),We="mailto:"+Me;else{var nt;do nt=Le[0],Le[0]=this.rules.inline._backpedal.exec(Le[0])[0];while(nt!==Le[0]);Me=Z(Le[0]),Le[1]==="www."?We="http://"+Me:We=Me}return{type:"link",raw:Le[0],text:Me,href:We,tokens:[{type:"text",raw:Me,text:Me}]}}},Pe.inlineText=function(xe,Ae,Le){var Me=this.rules.inline.text.exec(xe);if(Me){var We;return Ae?We=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Me[0]):Z(Me[0]):Me[0]:We=Z(this.options.smartypants?Le(Me[0]):Me[0]),{type:"text",raw:Me[0],text:We}}},Be}(),me=B.noopTest,Oe=B.edit,be=B.merge,ce={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:me,table:me,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};ce._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,ce._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,ce.def=Oe(ce.def).replace("label",ce._label).replace("title",ce._title).getRegex(),ce.bullet=/(?:[*+-]|\d{1,9}[.)])/,ce.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,ce.item=Oe(ce.item,"gm").replace(/bull/g,ce.bullet).getRegex(),ce.list=Oe(ce.list).replace(/bull/g,ce.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ce.def.source+")").getRegex(),ce._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",ce._comment=/<!--(?!-?>)[\s\S]*?-->/,ce.html=Oe(ce.html,"i").replace("comment",ce._comment).replace("tag",ce._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ce.paragraph=Oe(ce._paragraph).replace("hr",ce.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",ce._tag).getRegex(),ce.blockquote=Oe(ce.blockquote).replace("paragraph",ce.paragraph).getRegex(),ce.normal=be({},ce),ce.gfm=be({},ce.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*|$)"}),ce.gfm.nptable=Oe(ce.gfm.nptable).replace("hr",ce.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",ce._tag).getRegex(),ce.gfm.table=Oe(ce.gfm.table).replace("hr",ce.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",ce._tag).getRegex(),ce.pedantic=be({},ce.normal,{html:Oe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ce._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:me,paragraph:Oe(ce.normal._paragraph).replace("hr",ce.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",ce.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var se={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:me,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:me,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};se._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",se.punctuation=Oe(se.punctuation).replace(/punctuation/g,se._punctuation).getRegex(),se._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",se._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",se.em.start=Oe(se.em.start).replace(/punctuation/g,se._punctuation).getRegex(),se.em.middle=Oe(se.em.middle).replace(/punctuation/g,se._punctuation).replace(/overlapSkip/g,se._overlapSkip).getRegex(),se.em.endAst=Oe(se.em.endAst,"g").replace(/punctuation/g,se._punctuation).getRegex(),se.em.endUnd=Oe(se.em.endUnd,"g").replace(/punctuation/g,se._punctuation).getRegex(),se.strong.start=Oe(se.strong.start).replace(/punctuation/g,se._punctuation).getRegex(),se.strong.middle=Oe(se.strong.middle).replace(/punctuation/g,se._punctuation).replace(/blockSkip/g,se._blockSkip).getRegex(),se.strong.endAst=Oe(se.strong.endAst,"g").replace(/punctuation/g,se._punctuation).getRegex(),se.strong.endUnd=Oe(se.strong.endUnd,"g").replace(/punctuation/g,se._punctuation).getRegex(),se.blockSkip=Oe(se._blockSkip,"g").getRegex(),se.overlapSkip=Oe(se._overlapSkip,"g").getRegex(),se._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,se._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,se._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,se.autolink=Oe(se.autolink).replace("scheme",se._scheme).replace("email",se._email).getRegex(),se._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,se.tag=Oe(se.tag).replace("comment",ce._comment).replace("attribute",se._attribute).getRegex(),se._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,se._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,se._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,se.link=Oe(se.link).replace("label",se._label).replace("href",se._href).replace("title",se._title).getRegex(),se.reflink=Oe(se.reflink).replace("label",se._label).getRegex(),se.reflinkSearch=Oe(se.reflinkSearch,"g").replace("reflink",se.reflink).replace("nolink",se.nolink).getRegex(),se.normal=be({},se),se.pedantic=be({},se.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Oe(/^!?\[(label)\]\((.*?)\)/).replace("label",se._label).getRegex(),reflink:Oe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",se._label).getRegex()}),se.gfm=be({},se.normal,{escape:Oe(se.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),se.gfm.url=Oe(se.gfm.url,"i").replace("email",se.gfm._extended_email).getRegex(),se.breaks=be({},se.gfm,{br:Oe(se.br).replace("{2,}","*").getRegex(),text:Oe(se.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var ne={block:ce,inline:se},ge=S.defaults,ee=ne.block,re=ne.inline;function Te(Be){return Be.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function ie(Be){var Pe="",Ne,xe,Ae=Be.length;for(Ne=0;Ne<Ae;Ne++)xe=Be.charCodeAt(Ne),Math.random()>.5&&(xe="x"+xe.toString(16)),Pe+="&#"+xe+";";return Pe}var q=function(){function Be(Ne){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ne||ge,this.options.tokenizer=this.options.tokenizer||new Re,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var xe={block:ee.normal,inline:re.normal};this.options.pedantic?(xe.block=ee.pedantic,xe.inline=re.pedantic):this.options.gfm&&(xe.block=ee.gfm,this.options.breaks?xe.inline=re.breaks:xe.inline=re.gfm),this.tokenizer.rules=xe}Be.lex=function(xe,Ae){var Le=new Be(Ae);return Le.lex(xe)};var Pe=Be.prototype;return Pe.lex=function(xe){return xe=xe.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(xe,this.tokens,!0),this.inline(this.tokens),this.tokens},Pe.blockTokens=function(xe,Ae,Le){Ae===void 0&&(Ae=[]),Le===void 0&&(Le=!0),xe=xe.replace(/^ +$/gm,"");for(var Me,We,nt,vt;xe;){if(Me=this.tokenizer.space(xe)){xe=xe.substring(Me.raw.length),Me.type&&Ae.push(Me);continue}if(Me=this.tokenizer.code(xe,Ae)){xe=xe.substring(Me.raw.length),Me.type?Ae.push(Me):(vt=Ae[Ae.length-1],vt.raw+=`
`+Me.raw,vt.text+=`
`+Me.text);continue}if(Me=this.tokenizer.fences(xe)){xe=xe.substring(Me.raw.length),Ae.push(Me);continue}if(Me=this.tokenizer.heading(xe)){xe=xe.substring(Me.raw.length),Ae.push(Me);continue}if(Me=this.tokenizer.nptable(xe)){xe=xe.substring(Me.raw.length),Ae.push(Me);continue}if(Me=this.tokenizer.hr(xe)){xe=xe.substring(Me.raw.length),Ae.push(Me);continue}if(Me=this.tokenizer.blockquote(xe)){xe=xe.substring(Me.raw.length),Me.tokens=this.blockTokens(Me.text,[],Le),Ae.push(Me);continue}if(Me=this.tokenizer.list(xe)){for(xe=xe.substring(Me.raw.length),nt=Me.items.length,We=0;We<nt;We++)Me.items[We].tokens=this.blockTokens(Me.items[We].text,[],!1);Ae.push(Me);continue}if(Me=this.tokenizer.html(xe)){xe=xe.substring(Me.raw.length),Ae.push(Me);continue}if(Le&&(Me=this.tokenizer.def(xe))){xe=xe.substring(Me.raw.length),this.tokens.links[Me.tag]||(this.tokens.links[Me.tag]={href:Me.href,title:Me.title});continue}if(Me=this.tokenizer.table(xe)){xe=xe.substring(Me.raw.length),Ae.push(Me);continue}if(Me=this.tokenizer.lheading(xe)){xe=xe.substring(Me.raw.length),Ae.push(Me);continue}if(Le&&(Me=this.tokenizer.paragraph(xe))){xe=xe.substring(Me.raw.length),Ae.push(Me);continue}if(Me=this.tokenizer.text(xe,Ae)){xe=xe.substring(Me.raw.length),Me.type?Ae.push(Me):(vt=Ae[Ae.length-1],vt.raw+=`
`+Me.raw,vt.text+=`
`+Me.text);continue}if(xe){var bt="Infinite loop on byte: "+xe.charCodeAt(0);if(this.options.silent){console.error(bt);break}else throw new Error(bt)}}return Ae},Pe.inline=function(xe){var Ae,Le,Me,We,nt,vt,bt=xe.length;for(Ae=0;Ae<bt;Ae++){vt=xe[Ae];switch(vt.type){case"paragraph":case"text":case"heading":{vt.tokens=[],this.inlineTokens(vt.text,vt.tokens);break}case"table":{for(vt.tokens={header:[],cells:[]},We=vt.header.length,Le=0;Le<We;Le++)vt.tokens.header[Le]=[],this.inlineTokens(vt.header[Le],vt.tokens.header[Le]);for(We=vt.cells.length,Le=0;Le<We;Le++)for(nt=vt.cells[Le],vt.tokens.cells[Le]=[],Me=0;Me<nt.length;Me++)vt.tokens.cells[Le][Me]=[],this.inlineTokens(nt[Me],vt.tokens.cells[Le][Me]);break}case"blockquote":{this.inline(vt.tokens);break}case"list":{for(We=vt.items.length,Le=0;Le<We;Le++)this.inline(vt.items[Le].tokens);break}}}return xe},Pe.inlineTokens=function(xe,Ae,Le,Me,We){Ae===void 0&&(Ae=[]),Le===void 0&&(Le=!1),Me===void 0&&(Me=!1),We===void 0&&(We="");var nt,vt=xe,bt;if(this.tokens.links){var Wt=Object.keys(this.tokens.links);if(Wt.length>0)for(;(bt=this.tokenizer.rules.inline.reflinkSearch.exec(vt))!=null;)Wt.includes(bt[0].slice(bt[0].lastIndexOf("[")+1,-1))&&(vt=vt.slice(0,bt.index)+"["+"a".repeat(bt[0].length-2)+"]"+vt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(bt=this.tokenizer.rules.inline.blockSkip.exec(vt))!=null;)vt=vt.slice(0,bt.index)+"["+"a".repeat(bt[0].length-2)+"]"+vt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;xe;){if(nt=this.tokenizer.escape(xe)){xe=xe.substring(nt.raw.length),Ae.push(nt);continue}if(nt=this.tokenizer.tag(xe,Le,Me)){xe=xe.substring(nt.raw.length),Le=nt.inLink,Me=nt.inRawBlock,Ae.push(nt);continue}if(nt=this.tokenizer.link(xe)){xe=xe.substring(nt.raw.length),nt.type==="link"&&(nt.tokens=this.inlineTokens(nt.text,[],!0,Me)),Ae.push(nt);continue}if(nt=this.tokenizer.reflink(xe,this.tokens.links)){xe=xe.substring(nt.raw.length),nt.type==="link"&&(nt.tokens=this.inlineTokens(nt.text,[],!0,Me)),Ae.push(nt);continue}if(nt=this.tokenizer.strong(xe,vt,We)){xe=xe.substring(nt.raw.length),nt.tokens=this.inlineTokens(nt.text,[],Le,Me),Ae.push(nt);continue}if(nt=this.tokenizer.em(xe,vt,We)){xe=xe.substring(nt.raw.length),nt.tokens=this.inlineTokens(nt.text,[],Le,Me),Ae.push(nt);continue}if(nt=this.tokenizer.codespan(xe)){xe=xe.substring(nt.raw.length),Ae.push(nt);continue}if(nt=this.tokenizer.br(xe)){xe=xe.substring(nt.raw.length),Ae.push(nt);continue}if(nt=this.tokenizer.del(xe)){xe=xe.substring(nt.raw.length),nt.tokens=this.inlineTokens(nt.text,[],Le,Me),Ae.push(nt);continue}if(nt=this.tokenizer.autolink(xe,ie)){xe=xe.substring(nt.raw.length),Ae.push(nt);continue}if(!Le&&(nt=this.tokenizer.url(xe,ie))){xe=xe.substring(nt.raw.length),Ae.push(nt);continue}if(nt=this.tokenizer.inlineText(xe,Me,Te)){xe=xe.substring(nt.raw.length),We=nt.raw.slice(-1),Ae.push(nt);continue}if(xe){var Bt="Infinite loop on byte: "+xe.charCodeAt(0);if(this.options.silent){console.error(Bt);break}else throw new Error(Bt)}}return Ae},g(Be,null,[{key:"rules",get:function(){return{block:ee,inline:re}}}]),Be}(),Y=S.defaults,X=B.cleanUrl,he=B.escape,fe=function(){function Be(Ne){this.options=Ne||Y}var Pe=Be.prototype;return Pe.code=function(xe,Ae,Le){var Me=(Ae||"").match(/\S*/)[0];if(this.options.highlight){var We=this.options.highlight(xe,Me);We!=null&&We!==xe&&(Le=!0,xe=We)}return Me?'<pre><code class="'+this.options.langPrefix+he(Me,!0)+'">'+(Le?xe:he(xe,!0))+`</code></pre>
`:"<pre><code>"+(Le?xe:he(xe,!0))+`</code></pre>
`},Pe.blockquote=function(xe){return`<blockquote>
`+xe+`</blockquote>
`},Pe.html=function(xe){return xe},Pe.heading=function(xe,Ae,Le,Me){return this.options.headerIds?"<h"+Ae+' id="'+this.options.headerPrefix+Me.slug(Le)+'">'+xe+"</h"+Ae+`>
`:"<h"+Ae+">"+xe+"</h"+Ae+`>
`},Pe.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},Pe.list=function(xe,Ae,Le){var Me=Ae?"ol":"ul",We=Ae&&Le!==1?' start="'+Le+'"':"";return"<"+Me+We+`>
`+xe+"</"+Me+`>
`},Pe.listitem=function(xe){return"<li>"+xe+`</li>
`},Pe.checkbox=function(xe){return"<input "+(xe?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Pe.paragraph=function(xe){return"<p>"+xe+`</p>
`},Pe.table=function(xe,Ae){return Ae&&(Ae="<tbody>"+Ae+"</tbody>"),`<table>
<thead>
`+xe+`</thead>
`+Ae+`</table>
`},Pe.tablerow=function(xe){return`<tr>
`+xe+`</tr>
`},Pe.tablecell=function(xe,Ae){var Le=Ae.header?"th":"td",Me=Ae.align?"<"+Le+' align="'+Ae.align+'">':"<"+Le+">";return Me+xe+"</"+Le+`>
`},Pe.strong=function(xe){return"<strong>"+xe+"</strong>"},Pe.em=function(xe){return"<em>"+xe+"</em>"},Pe.codespan=function(xe){return"<code>"+xe+"</code>"},Pe.br=function(){return this.options.xhtml?"<br/>":"<br>"},Pe.del=function(xe){return"<del>"+xe+"</del>"},Pe.link=function(xe,Ae,Le){if(xe=X(this.options.sanitize,this.options.baseUrl,xe),xe===null)return Le;var Me='<a href="'+he(xe)+'"';return Ae&&(Me+=' title="'+Ae+'"'),Me+=">"+Le+"</a>",Me},Pe.image=function(xe,Ae,Le){if(xe=X(this.options.sanitize,this.options.baseUrl,xe),xe===null)return Le;var Me='<img src="'+xe+'" alt="'+Le+'"';return Ae&&(Me+=' title="'+Ae+'"'),Me+=this.options.xhtml?"/>":">",Me},Pe.text=function(xe){return xe},Be}(),Ee=function(){function Be(){}var Pe=Be.prototype;return Pe.strong=function(xe){return xe},Pe.em=function(xe){return xe},Pe.codespan=function(xe){return xe},Pe.del=function(xe){return xe},Pe.html=function(xe){return xe},Pe.text=function(xe){return xe},Pe.link=function(xe,Ae,Le){return""+Le},Pe.image=function(xe,Ae,Le){return""+Le},Pe.br=function(){return""},Be}(),He=function(){function Be(){this.seen={}}var Pe=Be.prototype;return Pe.slug=function(xe){var Ae=xe.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Ae)){var Le=Ae;do this.seen[Le]++,Ae=Le+"-"+this.seen[Le];while(this.seen.hasOwnProperty(Ae))}return this.seen[Ae]=0,Ae},Be}(),Qe=S.defaults,et=B.unescape,it=function(){function Be(Ne){this.options=Ne||Qe,this.options.renderer=this.options.renderer||new fe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ee,this.slugger=new He}Be.parse=function(xe,Ae){var Le=new Be(Ae);return Le.parse(xe)};var Pe=Be.prototype;return Pe.parse=function(xe,Ae){Ae===void 0&&(Ae=!0);var Le="",Me,We,nt,vt,bt,Wt,Bt,lr,dr,Ot,Vr,Wr,Yr,bn,Ar,fn,cn,Vt,En=xe.length;for(Me=0;Me<En;Me++){Ot=xe[Me];switch(Ot.type){case"space":continue;case"hr":{Le+=this.renderer.hr();continue}case"heading":{Le+=this.renderer.heading(this.parseInline(Ot.tokens),Ot.depth,et(this.parseInline(Ot.tokens,this.textRenderer)),this.slugger);continue}case"code":{Le+=this.renderer.code(Ot.text,Ot.lang,Ot.escaped);continue}case"table":{for(lr="",Bt="",vt=Ot.header.length,We=0;We<vt;We++)Bt+=this.renderer.tablecell(this.parseInline(Ot.tokens.header[We]),{header:!0,align:Ot.align[We]});for(lr+=this.renderer.tablerow(Bt),dr="",vt=Ot.cells.length,We=0;We<vt;We++){for(Wt=Ot.tokens.cells[We],Bt="",bt=Wt.length,nt=0;nt<bt;nt++)Bt+=this.renderer.tablecell(this.parseInline(Wt[nt]),{header:!1,align:Ot.align[nt]});dr+=this.renderer.tablerow(Bt)}Le+=this.renderer.table(lr,dr);continue}case"blockquote":{dr=this.parse(Ot.tokens),Le+=this.renderer.blockquote(dr);continue}case"list":{for(Vr=Ot.ordered,Wr=Ot.start,Yr=Ot.loose,vt=Ot.items.length,dr="",We=0;We<vt;We++)Ar=Ot.items[We],fn=Ar.checked,cn=Ar.task,bn="",Ar.task&&(Vt=this.renderer.checkbox(fn),Yr?Ar.tokens.length>0&&Ar.tokens[0].type==="text"?(Ar.tokens[0].text=Vt+" "+Ar.tokens[0].text,Ar.tokens[0].tokens&&Ar.tokens[0].tokens.length>0&&Ar.tokens[0].tokens[0].type==="text"&&(Ar.tokens[0].tokens[0].text=Vt+" "+Ar.tokens[0].tokens[0].text)):Ar.tokens.unshift({type:"text",text:Vt}):bn+=Vt),bn+=this.parse(Ar.tokens,Yr),dr+=this.renderer.listitem(bn,cn,fn);Le+=this.renderer.list(dr,Vr,Wr);continue}case"html":{Le+=this.renderer.html(Ot.text);continue}case"paragraph":{Le+=this.renderer.paragraph(this.parseInline(Ot.tokens));continue}case"text":{for(dr=Ot.tokens?this.parseInline(Ot.tokens):Ot.text;Me+1<En&&xe[Me+1].type==="text";)Ot=xe[++Me],dr+=`
`+(Ot.tokens?this.parseInline(Ot.tokens):Ot.text);Le+=Ae?this.renderer.paragraph(dr):dr;continue}default:{var fr='Token with "'+Ot.type+'" type was not found.';if(this.options.silent){console.error(fr);return}else throw new Error(fr)}}}return Le},Pe.parseInline=function(xe,Ae){Ae=Ae||this.renderer;var Le="",Me,We,nt=xe.length;for(Me=0;Me<nt;Me++){We=xe[Me];switch(We.type){case"escape":{Le+=Ae.text(We.text);break}case"html":{Le+=Ae.html(We.text);break}case"link":{Le+=Ae.link(We.href,We.title,this.parseInline(We.tokens,Ae));break}case"image":{Le+=Ae.image(We.href,We.title,We.text);break}case"strong":{Le+=Ae.strong(this.parseInline(We.tokens,Ae));break}case"em":{Le+=Ae.em(this.parseInline(We.tokens,Ae));break}case"codespan":{Le+=Ae.codespan(We.text);break}case"br":{Le+=Ae.br();break}case"del":{Le+=Ae.del(this.parseInline(We.tokens,Ae));break}case"text":{Le+=Ae.text(We.text);break}default:{var vt='Token with "'+We.type+'" type was not found.';if(this.options.silent){console.error(vt);return}else throw new Error(vt)}}}return Le},Be}(),ut=B.merge,dt=B.checkSanitizeDeprecation,Fe=B.escape,Ie=S.getDefaults,st=S.changeDefaults,ft=S.defaults;function Ze(Be,Pe,Ne){if(typeof Be=="undefined"||Be===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Be!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Be)+", string expected");if(typeof Pe=="function"&&(Ne=Pe,Pe=null),Pe=ut({},Ze.defaults,Pe||{}),dt(Pe),Ne){var xe=Pe.highlight,Ae;try{Ae=q.lex(Be,Pe)}catch(nt){return Ne(nt)}var Le=function(vt){var bt;if(!vt)try{bt=it.parse(Ae,Pe)}catch(Wt){vt=Wt}return Pe.highlight=xe,vt?Ne(vt):Ne(null,bt)};if(!xe||xe.length<3)return Le();if(delete Pe.highlight,!Ae.length)return Le();var Me=0;Ze.walkTokens(Ae,function(nt){nt.type==="code"&&(Me++,setTimeout(function(){xe(nt.text,nt.lang,function(vt,bt){if(vt)return Le(vt);bt!=null&&bt!==nt.text&&(nt.text=bt,nt.escaped=!0),Me--,Me===0&&Le()})},0))}),Me===0&&Le();return}try{var We=q.lex(Be,Pe);return Pe.walkTokens&&Ze.walkTokens(We,Pe.walkTokens),it.parse(We,Pe)}catch(nt){if(nt.message+=`
Please report this to https://github.com/markedjs/marked.`,Pe.silent)return"<p>An error occurred:</p><pre>"+Fe(nt.message+"",!0)+"</pre>";throw nt}}Ze.options=Ze.setOptions=function(Be){return ut(Ze.defaults,Be),st(Ze.defaults),Ze},Ze.getDefaults=Ie,Ze.defaults=ft,Ze.use=function(Be){var Pe=ut({},Be);if(Be.renderer&&function(){var xe=Ze.defaults.renderer||new fe,Ae=function(We){var nt=xe[We];xe[We]=function(){for(var vt=arguments.length,bt=new Array(vt),Wt=0;Wt<vt;Wt++)bt[Wt]=arguments[Wt];var Bt=Be.renderer[We].apply(xe,bt);return Bt===!1&&(Bt=nt.apply(xe,bt)),Bt}};for(var Le in Be.renderer)Ae(Le);Pe.renderer=xe}(),Be.tokenizer&&function(){var xe=Ze.defaults.tokenizer||new Re,Ae=function(We){var nt=xe[We];xe[We]=function(){for(var vt=arguments.length,bt=new Array(vt),Wt=0;Wt<vt;Wt++)bt[Wt]=arguments[Wt];var Bt=Be.tokenizer[We].apply(xe,bt);return Bt===!1&&(Bt=nt.apply(xe,bt)),Bt}};for(var Le in Be.tokenizer)Ae(Le);Pe.tokenizer=xe}(),Be.walkTokens){var Ne=Ze.defaults.walkTokens;Pe.walkTokens=function(xe){Be.walkTokens(xe),Ne&&Ne(xe)}}Ze.setOptions(Pe)},Ze.walkTokens=function(Be,Pe){for(var Ne=m(Be),xe;!(xe=Ne()).done;){var Ae=xe.value;Pe(Ae);switch(Ae.type){case"table":{for(var Le=m(Ae.tokens.header),Me;!(Me=Le()).done;){var We=Me.value;Ze.walkTokens(We,Pe)}for(var nt=m(Ae.tokens.cells),vt;!(vt=nt()).done;)for(var bt=vt.value,Wt=m(bt),Bt;!(Bt=Wt()).done;){var lr=Bt.value;Ze.walkTokens(lr,Pe)}break}case"list":{Ze.walkTokens(Ae.items,Pe);break}default:Ae.tokens&&Ze.walkTokens(Ae.tokens,Pe)}}},Ze.Parser=it,Ze.parser=it.parse,Ze.Renderer=fe,Ze.TextRenderer=Ee,Ze.Lexer=q,Ze.lexer=q.lex,Ze.Tokenizer=Re,Ze.Slugger=He,Ze.parse=Ze;var tt=Ze;return tt})},E4JC:function(H,J,D){(function(k,g,C){H.exports=J=g(D("Ib8C"),D("ETIr"),D("cv67"),D("K3mO"),D("OLod"))})(this,function(k){return function(){var g=k,C=g.lib,M=C.StreamCipher,m=g.algo,y=[],S=[],_=[],t=m.Rabbit=M.extend({_doReset:function(){for(var n=this._key.words,c=this.cfg.iv,a=0;a<4;a++)n[a]=(n[a]<<8|n[a]>>>24)&16711935|(n[a]<<24|n[a]>>>8)&4278255360;var i=this._X=[n[0],n[3]<<16|n[2]>>>16,n[1],n[0]<<16|n[3]>>>16,n[2],n[1]<<16|n[0]>>>16,n[3],n[2]<<16|n[1]>>>16],s=this._C=[n[2]<<16|n[2]>>>16,n[0]&4294901760|n[1]&65535,n[3]<<16|n[3]>>>16,n[1]&4294901760|n[2]&65535,n[0]<<16|n[0]>>>16,n[2]&4294901760|n[3]&65535,n[1]<<16|n[1]>>>16,n[3]&4294901760|n[0]&65535];this._b=0;for(var a=0;a<4;a++)h.call(this);for(var a=0;a<8;a++)s[a]^=i[a+4&7];if(c){var d=c.words,f=d[0],l=d[1],o=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,r=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,x=o>>>16|r&4294901760,v=r<<16|o&65535;s[0]^=o,s[1]^=x,s[2]^=r,s[3]^=v,s[4]^=o,s[5]^=x,s[6]^=r,s[7]^=v;for(var a=0;a<4;a++)h.call(this)}},_doProcessBlock:function(n,c){var a=this._X;h.call(this),y[0]=a[0]^a[5]>>>16^a[3]<<16,y[1]=a[2]^a[7]>>>16^a[5]<<16,y[2]=a[4]^a[1]>>>16^a[7]<<16,y[3]=a[6]^a[3]>>>16^a[1]<<16;for(var i=0;i<4;i++)y[i]=(y[i]<<8|y[i]>>>24)&16711935|(y[i]<<24|y[i]>>>8)&4278255360,n[c+i]^=y[i]},blockSize:128/32,ivSize:64/32});function h(){for(var n=this._X,c=this._C,a=0;a<8;a++)S[a]=c[a];c[0]=c[0]+1295307597+this._b|0,c[1]=c[1]+3545052371+(c[0]>>>0<S[0]>>>0?1:0)|0,c[2]=c[2]+886263092+(c[1]>>>0<S[1]>>>0?1:0)|0,c[3]=c[3]+1295307597+(c[2]>>>0<S[2]>>>0?1:0)|0,c[4]=c[4]+3545052371+(c[3]>>>0<S[3]>>>0?1:0)|0,c[5]=c[5]+886263092+(c[4]>>>0<S[4]>>>0?1:0)|0,c[6]=c[6]+1295307597+(c[5]>>>0<S[5]>>>0?1:0)|0,c[7]=c[7]+3545052371+(c[6]>>>0<S[6]>>>0?1:0)|0,this._b=c[7]>>>0<S[7]>>>0?1:0;for(var a=0;a<8;a++){var i=n[a]+c[a],s=i&65535,d=i>>>16,f=((s*s>>>17)+s*d>>>15)+d*d,l=((i&4294901760)*i|0)+((i&65535)*i|0);_[a]=f^l}n[0]=_[0]+(_[7]<<16|_[7]>>>16)+(_[6]<<16|_[6]>>>16)|0,n[1]=_[1]+(_[0]<<8|_[0]>>>24)+_[7]|0,n[2]=_[2]+(_[1]<<16|_[1]>>>16)+(_[0]<<16|_[0]>>>16)|0,n[3]=_[3]+(_[2]<<8|_[2]>>>24)+_[1]|0,n[4]=_[4]+(_[3]<<16|_[3]>>>16)+(_[2]<<16|_[2]>>>16)|0,n[5]=_[5]+(_[4]<<8|_[4]>>>24)+_[3]|0,n[6]=_[6]+(_[5]<<16|_[5]>>>16)+(_[4]<<16|_[4]>>>16)|0,n[7]=_[7]+(_[6]<<8|_[6]>>>24)+_[5]|0}g.Rabbit=M._createHelper(t)}(),k.Rabbit})},ELLl:function(H,J,D){(function(k){k(D("VrN/"))})(function(k){var g={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},C=k.Pos;k.defineOption("autoCloseBrackets",!1,function(s,d,f){f&&f!=k.Init&&(s.removeKeyMap(m),s.state.closeBrackets=null),d&&(y(M(d,"pairs")),s.state.closeBrackets=d,s.addKeyMap(m))});function M(s,d){return d=="pairs"&&typeof s=="string"?s:typeof s=="object"&&s[d]!=null?s[d]:g[d]}var m={Backspace:t,Enter:h};function y(s){for(var d=0;d<s.length;d++){var f=s.charAt(d),l="'"+f+"'";m[l]||(m[l]=S(f))}}y(g.pairs+"`");function S(s){return function(d){return c(d,s)}}function _(s){var d=s.state.closeBrackets;if(!d||d.override)return d;var f=s.getModeAt(s.getCursor());return f.closeBrackets||d}function t(s){var d=_(s);if(!d||s.getOption("disableInput"))return k.Pass;for(var f=M(d,"pairs"),l=s.listSelections(),o=0;o<l.length;o++){if(!l[o].empty())return k.Pass;var r=a(s,l[o].head);if(!r||f.indexOf(r)%2!=0)return k.Pass}for(var o=l.length-1;o>=0;o--){var x=l[o].head;s.replaceRange("",C(x.line,x.ch-1),C(x.line,x.ch+1),"+delete")}}function h(s){var d=_(s),f=d&&M(d,"explode");if(!f||s.getOption("disableInput"))return k.Pass;for(var l=s.listSelections(),o=0;o<l.length;o++){if(!l[o].empty())return k.Pass;var r=a(s,l[o].head);if(!r||f.indexOf(r)%2!=0)return k.Pass}s.operation(function(){var x=s.lineSeparator()||`
`;s.replaceSelection(x+x,null),s.execCommand("goCharLeft"),l=s.listSelections();for(var v=0;v<l.length;v++){var p=l[v].head.line;s.indentLine(p,null,!0),s.indentLine(p+1,null,!0)}})}function n(s){var d=k.cmpPos(s.anchor,s.head)>0;return{anchor:new C(s.anchor.line,s.anchor.ch+(d?-1:1)),head:new C(s.head.line,s.head.ch+(d?1:-1))}}function c(s,d){var f=_(s);if(!f||s.getOption("disableInput"))return k.Pass;var l=M(f,"pairs"),o=l.indexOf(d);if(o==-1)return k.Pass;for(var r=M(f,"closeBefore"),x=M(f,"triples"),v=l.charAt(o+1)==d,p=s.listSelections(),R=o%2==0,O,b=0;b<p.length;b++){var E=p[b],w=E.head,T,F=s.getRange(w,C(w.line,w.ch+1));if(R&&!E.empty())T="surround";else if((v||!R)&&F==d)v&&i(s,w)?T="both":x.indexOf(d)>=0&&s.getRange(w,C(w.line,w.ch+3))==d+d+d?T="skipThree":T="skip";else if(v&&w.ch>1&&x.indexOf(d)>=0&&s.getRange(C(w.line,w.ch-2),w)==d+d){if(w.ch>2&&/\bstring/.test(s.getTokenTypeAt(C(w.line,w.ch-2))))return k.Pass;T="addFour"}else if(v){var N=w.ch==0?" ":s.getRange(C(w.line,w.ch-1),w);if(!k.isWordChar(F)&&N!=d&&!k.isWordChar(N))T="both";else return k.Pass}else if(R&&(F.length===0||/\s/.test(F)||r.indexOf(F)>-1))T="both";else return k.Pass;if(!O)O=T;else if(O!=T)return k.Pass}var L=o%2?l.charAt(o-1):d,G=o%2?d:l.charAt(o+1);s.operation(function(){if(O=="skip")s.execCommand("goCharRight");else if(O=="skipThree")for(var z=0;z<3;z++)s.execCommand("goCharRight");else if(O=="surround"){for(var A=s.getSelections(),z=0;z<A.length;z++)A[z]=L+A[z]+G;s.replaceSelections(A,"around"),A=s.listSelections().slice();for(var z=0;z<A.length;z++)A[z]=n(A[z]);s.setSelections(A)}else O=="both"?(s.replaceSelection(L+G,null),s.triggerElectric(L+G),s.execCommand("goCharLeft")):O=="addFour"&&(s.replaceSelection(L+L+L+L,"before"),s.execCommand("goCharRight"))})}function a(s,d){var f=s.getRange(C(d.line,d.ch-1),C(d.line,d.ch+1));return f.length==2?f:null}function i(s,d){var f=s.getTokenAt(C(d.line,d.ch+1));return/\bstring/.test(f.type)&&f.start==d.ch&&(d.ch==0||!/\bstring/.test(s.getTokenTypeAt(d)))}})},ELcG:function(H,J,D){(function(k,g){H.exports=J=g(D("Ib8C"))})(this,function(k){/** @preserve
(c) 2012 by Cédric Mesnil. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/return function(g){var C=k,M=C.lib,m=M.WordArray,y=M.Hasher,S=C.algo,_=m.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]),t=m.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),h=m.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]),n=m.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=m.create([0,1518500249,1859775393,2400959708,2840853838]),a=m.create([1352829926,1548603684,1836072691,2053994217,0]),i=S.RIPEMD160=y.extend({_doReset:function(){this._hash=m.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(x,v){for(var p=0;p<16;p++){var R=v+p,O=x[R];x[R]=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360}var b=this._hash.words,E=c.words,w=a.words,T=_.words,F=t.words,N=h.words,L=n.words,G,z,A,B,U,I,K,Z,ue,de;I=G=b[0],K=z=b[1],Z=A=b[2],ue=B=b[3],de=U=b[4];for(var Ce,p=0;p<80;p+=1)Ce=G+x[v+T[p]]|0,p<16?Ce+=s(z,A,B)+E[0]:p<32?Ce+=d(z,A,B)+E[1]:p<48?Ce+=f(z,A,B)+E[2]:p<64?Ce+=l(z,A,B)+E[3]:Ce+=o(z,A,B)+E[4],Ce=Ce|0,Ce=r(Ce,N[p]),Ce=Ce+U|0,G=U,U=B,B=r(A,10),A=z,z=Ce,Ce=I+x[v+F[p]]|0,p<16?Ce+=o(K,Z,ue)+w[0]:p<32?Ce+=l(K,Z,ue)+w[1]:p<48?Ce+=f(K,Z,ue)+w[2]:p<64?Ce+=d(K,Z,ue)+w[3]:Ce+=s(K,Z,ue)+w[4],Ce=Ce|0,Ce=r(Ce,L[p]),Ce=Ce+de|0,I=de,de=ue,ue=r(Z,10),Z=K,K=Ce;Ce=b[1]+A+ue|0,b[1]=b[2]+B+de|0,b[2]=b[3]+U+I|0,b[3]=b[4]+G+K|0,b[4]=b[0]+z+Z|0,b[0]=Ce},_doFinalize:function(){var x=this._data,v=x.words,p=this._nDataBytes*8,R=x.sigBytes*8;v[R>>>5]|=128<<24-R%32,v[(R+64>>>9<<4)+14]=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360,x.sigBytes=(v.length+1)*4,this._process();for(var O=this._hash,b=O.words,E=0;E<5;E++){var w=b[E];b[E]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360}return O},clone:function(){var x=y.clone.call(this);return x._hash=this._hash.clone(),x}});function s(x,v,p){return x^v^p}function d(x,v,p){return x&v|~x&p}function f(x,v,p){return(x|~v)^p}function l(x,v,p){return x&p|v&~p}function o(x,v,p){return x^(v|~p)}function r(x,v){return x<<v|x>>>32-v}C.RIPEMD160=y._createHelper(i),C.HmacRIPEMD160=y._createHmacHelper(i)}(Math),k.RIPEMD160})},ETIr:function(H,J,D){(function(k,g){H.exports=J=g(D("Ib8C"))})(this,function(k){return function(){var g=k,C=g.lib,M=C.WordArray,m=g.enc,y=m.Base64={stringify:function(_){var t=_.words,h=_.sigBytes,n=this._map;_.clamp();for(var c=[],a=0;a<h;a+=3)for(var i=t[a>>>2]>>>24-a%4*8&255,s=t[a+1>>>2]>>>24-(a+1)%4*8&255,d=t[a+2>>>2]>>>24-(a+2)%4*8&255,f=i<<16|s<<8|d,l=0;l<4&&a+l*.75<h;l++)c.push(n.charAt(f>>>6*(3-l)&63));var o=n.charAt(64);if(o)for(;c.length%4;)c.push(o);return c.join("")},parse:function(_){var t=_.length,h=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var c=0;c<h.length;c++)n[h.charCodeAt(c)]=c}var a=h.charAt(64);if(a){var i=_.indexOf(a);i!==-1&&(t=i)}return S(_,t,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function S(_,t,h){for(var n=[],c=0,a=0;a<t;a++)if(a%4){var i=h[_.charCodeAt(a-1)]<<a%4*2,s=h[_.charCodeAt(a)]>>>6-a%4*2,d=i|s;n[c>>>2]|=d<<24-c%4*8,c++}return M.create(n,c)}}(),k.enc.Base64})},"F+F2":function(H,J,D){(function(k,g){H.exports=J=g(D("Ib8C"))})(this,function(k){return function(){if(typeof ArrayBuffer!="function")return;var g=k,C=g.lib,M=C.WordArray,m=M.init,y=M.init=function(S){if(S instanceof ArrayBuffer&&(S=new Uint8Array(S)),(S instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&S instanceof Uint8ClampedArray||S instanceof Int16Array||S instanceof Uint16Array||S instanceof Int32Array||S instanceof Uint32Array||S instanceof Float32Array||S instanceof Float64Array)&&(S=new Uint8Array(S.buffer,S.byteOffset,S.byteLength)),S instanceof Uint8Array){for(var _=S.byteLength,t=[],h=0;h<_;h++)t[h>>>2]|=S[h]<<24-h%4*8;m.call(this,t,_)}else m.apply(this,arguments)};y.prototype=M}(),k.lib.WordArray})},FWmy:function(H,J,D){"use strict";D.d(J,"a",function(){return k});function k(g,C){if(!g)throw new Error(C?`Assertion failed (${C})`:"Assertion Failed")}},GRO8:function(H,J,D){"use strict";D.r(J);var k=D("k1fw"),g=D("2qtc"),C=D("kLXV"),M=D("lUTK"),m=D("BvKs"),y=D("+L6B"),S=D("2/Rp"),_=D("T2oS"),t=D("W9HT"),h=D("sPJy"),n=D("bE4q"),c=D("miYZ"),a=D("tsqr"),i=D("9og8"),s=D("tJVT"),d=D("PpiC"),f=D("WmNS"),l=D.n(f),o=D("q1tI"),r=D.n(o),x=D("Ty5D"),v=D("55Ip"),p=D("9kvl"),R=D("KeDT"),O=D.n(R),b=D("zrhs"),E=D("DZo9"),w=D("8z0m"),T=D("LtfV"),F=D("KhGG"),N=w.a.Dragger,L=function(rt){var mt=rt.user,wt=rt.dispatch,Lt=rt.classroomList,It=rt.shixunsDetail,Kt=rt.getResults,Ht=Object(x.i)(),ht=Object(o.useState)(),St=Object(s.a)(ht,2),At=St[0],ur=St[1],ar=Object(o.useState)([]),Zt=Object(s.a)(ar,2),$t=Zt[0],rr=Zt[1],cr=Object(o.useState)(!1),lt=Object(s.a)(cr,2),Rr=lt[0],jr=lt[1],xr={onRemove:function(){rr([])},beforeUpload:function(Rt){if(console.log(Rt),(Rt==null?void 0:Rt.size)>1024*1024*500)return a.b.info("\u6587\u4EF6\u8D85\u8FC7500M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;var Et=[];return Et.push(Rt),rr([].concat(Et)),!1},fileList:$t};return r.a.createElement(C.a,{title:"\u63D0\u4EA4\u6587\u4EF6",visible:It.actionTabs.key==="md-tab",confirmLoading:Rr,onOk:Object(i.a)(l.a.mark(function _t(){var Rt,Et,Mt;return l.a.wrap(function(pr){for(;;)switch(pr.prev=pr.next){case 0:if(!(($t==null?void 0:$t.length)<=0)){pr.next=3;break}return a.b.info("\u8BF7\u5148\u9009\u62E9\u6587\u4EF6"),pr.abrupt("return");case 3:return jr(!0),pr.next=6,Object(F.c)($t[0],{login:(Rt=mt.userInfo)===null||Rt===void 0?void 0:Rt.login,container_type:"Competition",container_id:It.actionTabs.params.id,stage_type:It.actionTabs.params.value,file_name:(Et=$t[0])===null||Et===void 0?void 0:Et.name});case 6:Mt=pr.sent,(Mt==null?void 0:Mt.status)===0?(a.b.info("\u63D0\u4EA4\u6210\u529F"),wt({type:"shixunsDetail/setActionTabs",payload:{key:""}}),jr(!1),rr([]),Kt(It.actionTabs.params.value)):(jr(!1),a.b.info("\u63D0\u4EA4\u5931\u8D25"));case 8:case"end":return pr.stop()}},_t)})),onCancel:function(){rr([]),wt({type:"shixunsDetail/setActionTabs",payload:{key:""}})}},r.a.createElement(N,xr,r.a.createElement("p",{className:"ant-upload-drag-icon"},r.a.createElement(T.a,null)),r.a.createElement("p",{className:"ant-upload-hint"},"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20")))},G=Object(p.a)(function(xt){var rt=xt.user,mt=xt.classroomList,wt=xt.shixunsDetail;return{user:rt,classroomList:mt,shixunsDetail:wt}})(L),z=D("14J3"),A=D("BMrR"),B=D("5NDa"),U=D("5rEg"),I=D("9Bee"),K=D("m3rI"),Z=D("ErOA"),ue=D("NLgs"),de=D("fV52"),Ce=D("3I+P"),Re=D("OaEy"),me=D("2fM7"),Oe=D("5bA4"),be=D("UESt"),ce=me.a.Option;function se(xt){var rt=xt.rewarddata,mt=xt.getlistdatas,wt=xt.is_signed,Lt=xt.dispatch,It=xt.userlist,Kt=Object(o.useRef)(null),Ht=Object(o.useState)(!1),ht=Object(s.a)(Ht,2),St=ht[0],At=ht[1],ur=Object(o.useState)(void 0),ar=Object(s.a)(ur,2),Zt=ar[0],$t=ar[1],rr=Object(o.useState)(""),cr=Object(s.a)(rr,2),lt=cr[0],Rr=cr[1],jr=Object(o.useState)(void 0),xr=Object(s.a)(jr,2),_t=xr[0],Rt=xr[1],Et=Object(o.useState)(void 0),Mt=Object(s.a)(Et,2),qt=Mt[0],pr=Mt[1],er=Object(o.useState)(void 0),Ir=Object(s.a)(er,2),Hr=Ir[0],yr=Ir[1];function ot(mr){return zt.apply(this,arguments)}function zt(){return zt=Object(i.a)(l.a.mark(function mr(Dr){var Mr;return l.a.wrap(function(Qt){for(;;)switch(Qt.prev=Qt.next){case 0:if(!Dr.user_received){Qt.next=3;break}return window.open(Dr.click_info),Qt.abrupt("return");case 3:if(Object(ue.f)(Lt)){Qt.next=5;break}return Qt.abrupt("return");case 5:if(!(wt===!1)){Qt.next=8;break}return a.b.info("\u60A8\u5C1A\u672A\u62A5\u540D\u53C2\u8D5B\uFF0C\u8BF7\u62A5\u540D\u53C2\u8D5B\u540E\u9886\u53D6"),Qt.abrupt("return");case 8:if(!(Dr.click_event==="Pop")){Qt.next=14;break}return Rr(Dr.id),At(!0),Qt.abrupt("return");case 14:$t(void 0);case 15:return Qt.next=17,Lt({type:"competitions/Reward",payload:{competition_module_setting_id:Dr.id}});case 17:Mr=Qt.sent,Mr&&Mr.status===0&&(mt(),Dr.click_event==="Link"?(a.b.info("\u9886\u53D6\u6210\u529F"),window.open(Dr.click_info)):a.b.info(Dr.click_info));case 19:case"end":return Qt.stop()}},mr)})),zt.apply(this,arguments)}function sn(){return en.apply(this,arguments)}function en(){return en=Object(i.a)(l.a.mark(function mr(){var Dr;return l.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:if(!(It&&!It.real_name)){Ft.next=4;break}if(_t){Ft.next=4;break}return a.b.info("\u59D3\u540D\u4E0D\u80FD\u4E3A\u7A7A"),Ft.abrupt("return");case 4:if(!(It&&!It.email)){Ft.next=8;break}if(qt){Ft.next=8;break}return a.b.info("\u90AE\u7BB1\u4E0D\u80FD\u4E3A\u7A7A"),Ft.abrupt("return");case 8:if(!(It&&!It.phone)){Ft.next=12;break}if(Hr){Ft.next=12;break}return a.b.info("\u624B\u673A\u53F7\u7801\u4E0D\u80FD\u4E3A\u7A7A"),Ft.abrupt("return");case 12:if(Zt){Ft.next=15;break}return a.b.info("\u8BF7\u9009\u62E9\u4F60\u7684\u5E74\u7EA7"),Ft.abrupt("return");case 15:return Ft.next=17,Lt({type:"competitions/Reward",payload:{competition_module_setting_id:lt,className:Zt,name:_t,mail:qt,phone:Hr}});case 17:Dr=Ft.sent,Dr&&Dr.status===0&&(At(!1),mt(),a.b.info("HCIA\u8BA4\u8BC1\u8003\u8BD5\u4EE3\u91D1\u52B5\u5C06\u7531Educoder\u5E73\u53F0\u7EDF\u4E00\u53D1\u653E\uFF0C\u8BF7\u53CA\u65F6\u5173\u6CE8\u90AE\u7BB1\u6216\u7AD9\u5185\u77ED\u4FE1\u67E5\u6536"));case 19:case"end":return Ft.stop()}},mr)})),en.apply(this,arguments)}return r.a.createElement("div",null,r.a.createElement(C.a,{visible:St,title:"\u5B8C\u5584\u4FE1\u606F",onCancel:function(){return At(!1)},onOk:function(){sn()}},r.a.createElement("p",null,"\u60A8\u7684\u59D3\u540D\uFF1A",r.a.createElement(U.a,{className:It&&It.real_name?"":O.a.bkfff,style:{width:"300px",marginLeft:"14px",background:It&&It.phone?"":"#ffffff!important"},value:It&&It.real_name||_t,disabled:It&&It.real_name||!1,onChange:function(Dr){return Rt(Dr.target.value)}})),r.a.createElement("p",{style:{marginTop:"1em"}},"\u60A8\u7684\u90AE\u7BB1\uFF1A",r.a.createElement(U.a,{className:It&&It.email?"":"bkfff",style:{width:"300px",marginLeft:"14px",background:It&&It.phone?"":"#ffffff!important"},value:It&&It.email||qt,disabled:It&&It.email||!1,onChange:function(Dr){return pr(Dr.target.value)}})),r.a.createElement("p",{style:{marginTop:"1em"}},"\u60A8\u7684\u624B\u673A\u53F7\uFF1A",r.a.createElement(U.a,{style:{width:"300px"},className:It&&It.phone?"":"bkfff",value:It&&It.phone||Hr,disabled:It&&It.phone||!1,onChange:function(Dr){return yr(Dr.target.value)}})),"\u60A8\u7684\u5E74\u7EA7\uFF1A",r.a.createElement(me.a,{style:{width:"300px",marginTop:"1em",marginLeft:"14px"},onChange:function(Dr){$t(Dr)}},r.a.createElement(ce,{value:"\u5927\u4E00"},"\u5927\u4E00"),r.a.createElement(ce,{value:"\u5927\u4E8C"},"\u5927\u4E8C"),r.a.createElement(ce,{value:"\u5927\u4E09"},"\u5927\u4E09"),r.a.createElement(ce,{value:"\u5927\u56DB"},"\u5927\u56DB"),r.a.createElement(ce,{value:"\u5927\u4E94"},"\u5927\u4E94"),r.a.createElement(ce,{value:"\u7855\u4E00"},"\u7855\u4E00"),r.a.createElement(ce,{value:"\u7855\u4E8C"},"\u7855\u4E8C"),r.a.createElement(ce,{value:"\u7855\u4E09"},"\u7855\u4E09"),r.a.createElement(ce,{value:"\u535A\u4E00"},"\u535A\u4E00"),r.a.createElement(ce,{value:"\u535A\u4E8C"},"\u535A\u4E8C"),r.a.createElement(ce,{value:"\u535A\u4E09"},"\u535A\u4E09"),r.a.createElement(ce,{value:"\u535A\u56DB"},"\u535A\u56DB"),r.a.createElement(ce,{value:"\u535A\u4E94"},"\u535A\u4E94")),r.a.createElement("p",{style:{marginTop:"1em"}},"\u63D0\u9192\uFF1A\u5982\u65E0\u534E\u4E3A\u4E91\u8D26\u53F7\uFF0C\u8BF7\u5C3D\u5FEB\u6CE8\u518C\u534E\u4E3A\u4E91\uFF01")),rt&&rt.length>3?r.a.createElement("div",{style:{position:"relative",marginBottom:"10px",marginTop:"10px"}},r.a.createElement("span",{className:O.a.spanprev,onClick:function(){Kt.current.prev()}},r.a.createElement(Oe.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"15px"}})),r.a.createElement(Ce.a,{ref:Kt,className:O.a.divwidth,slidesToShow:3,slidesToScroll:1},rt&&rt.map(function(mr,Dr){return r.a.createElement("div",{style:{textAlign:"center",position:"relative"}},r.a.createElement("img",{src:K.a.IMG_SERVER+"/".concat(mr.image_url)}),mr.user_received===!1||mr.click_event==="Link"?r.a.createElement("p",{className:O.a.receiveclick,onClick:function(){return ot(mr)}},"\u70B9\u51FB\u9886\u53D6"):r.a.createElement("p",{className:O.a.receivealready},"\u5DF2\u7ECF\u9886\u53D6"))})),r.a.createElement("span",{className:O.a.spannext,onClick:function(){Kt.current.next()}},r.a.createElement(be.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"5px"}}))):r.a.createElement("div",{className:O.a.divwidth,style:{justifyContent:"space-around",marginBottom:"10px",marginTop:"10px"}},rt&&rt.map(function(mr,Dr){return r.a.createElement("div",{style:{textAlign:"center",position:"relative"}},r.a.createElement("img",{src:K.a.IMG_SERVER+"/".concat(mr.image_url)}),mr.user_received===!1||mr.click_event==="Link"?r.a.createElement("p",{className:O.a.receiveclick,onClick:function(){return ot(mr)}},"\u70B9\u51FB\u9886\u53D6"):r.a.createElement("p",{className:O.a.receivealready},"\u5DF2\u7ECF\u9886\u53D6"))})))}var ne=se,ge=function(rt,mt){var wt=rt.StaffDetail,Lt=rt.HeaderDetail,It=rt.ItemData,Kt=rt.setIssee,Ht=rt.ModelType,ht=rt.dispatch,St=rt.userinfo,At=rt.Editable,ur=Object(o.useState)(!1),ar=Object(s.a)(ur,2),Zt=ar[0],$t=ar[1],rr=Object(o.useState)([]),cr=Object(s.a)(rr,2),lt=cr[0],Rr=cr[1],jr=Object(o.useState)(""),xr=Object(s.a)(jr,2),_t=xr[0],Rt=xr[1],Et=Object(o.useState)(""),Mt=Object(s.a)(Et,2),qt=Mt[0],pr=Mt[1],er=Object(o.useState)(!1),Ir=Object(s.a)(er,2),Hr=Ir[0],yr=Ir[1],ot=Object(x.i)(),zt=ot.identifier,sn=Object(o.useRef)(null),en=Object(o.useRef)(null);sn.current=wt==null?void 0:wt.enrolled,Object(o.useEffect)(function(){var Ft;return(Ft=en.current)===null||Ft===void 0||Ft.addEventListener("click",mr),function(){var Qt;(Qt=en.current)===null||Qt===void 0||Qt.removeEventListener("click",mr)}},[]);var mr=function(Qt){var gr;if((Qt==null||((gr=Qt.target)===null||gr===void 0)?void 0:gr.id)==="modal-upload"){if(!Object(ue.e)(ht))return;if(!sn.current){C.a.info({title:"\u63D0\u793A",centered:!0,okText:"\u6211\u77E5\u9053\u4E86",content:"\u8BF7\u5148\u62A5\u540D\uFF0C\u518D\u63D0\u4EA4\u4F5C\u54C1"});return}$t(!0)}};Object(o.useEffect)(function(){if(Lt!=null&&Lt.upload_file){var Ft,Qt,gr;Rr([{name:Lt==null||((Ft=Lt.upload_file)===null||Ft===void 0)?void 0:Ft.title,status:"done",uid:"123456789"}]),pr(Lt==null?void 0:Lt.upload_file_url),Rt(Lt==null||((Qt=Lt.upload_file)===null||Qt===void 0||((gr=Qt.url)===null||gr===void 0))?void 0:gr.split("/")[3])}},[Lt==null?void 0:Lt.upload_file]);var Dr={name:"file",multiple:!1,withCredentials:!0,action:K.a.API_SERVER+"/api/attachments.json",showUploadList:{showRemoveIcon:!1},fileList:lt,onChange:function(Qt){var gr=Qt.file.status,tr=[Object(k.a)({},Qt.file)];if(Rr(tr),Qt.file.status==="uploading"&&yr(!0),gr==="done"){var gt,yt;Rt((gt=tr[0])===null||gt===void 0||((yt=gt.response)===null||yt===void 0)?void 0:yt.id),yr(!1)}gr==="error"&&(Rr([]),yr(!1))},beforeUpload:function(Qt){var gr=Qt.size/1024/1024<1e3;return gr?Promise.resolve():(a.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E1000MB"),Promise.reject())}},Mr=function(){$t(!0)};return Object(o.useImperativeHandle)(mt,function(){return{handleVisible:Mr}}),r.a.createElement("div",{ref:en},Ht==="reward"?r.a.createElement(ne,{userlist:St,dispatch:ht,rewarddata:It.reward_setting,is_signed:It.is_signed}):null,r.a.createElement("div",{style:{textAlign:"right"}},((St==null?void 0:St.admin)||(St==null?void 0:St.business)||At)&&r.a.createElement(S.a,{onClick:function(){return Kt(!1)}},"\u7F16\u8F91")),r.a.createElement(I.a,{value:It.md_content}),It&&It.attachments&&It.attachments.map(function(Ft,Qt){return r.a.createElement("div",null,r.a.createElement("a",{href:(K.a===null||K.a===void 0?void 0:K.a.API_SERVER)+Ft.url,target:"_self",download:Ft.title},r.a.createElement("i",{style:{color:"#29BD8B"},className:"font-14 color-green iconfont icon-fujian mr8"}),r.a.createElement("span",{style:{color:"#000000"}},Ft.title),r.a.createElement("span",{style:{color:"#000000",marginLeft:"10px"}},Ft.filesize)))}),r.a.createElement(C.a,{centered:!0,title:"\u4E0A\u4F20\u4F5C\u54C1",visible:Zt,okText:"\u63D0\u4EA4\u4F5C\u54C1",cancelText:"\u53D6\u6D88",confirmLoading:Hr,onCancel:function(){return $t(!1)},onOk:Object(i.a)(l.a.mark(function Ft(){var Qt;return l.a.wrap(function(tr){for(;;)switch(tr.prev=tr.next){case 0:if(!(!_t&&!qt)){tr.next=3;break}return $t(!1),tr.abrupt("return");case 3:return yr(!0),tr.next=6,Object(Z.a)("/api/competitions/".concat(zt,"/upload_file.json"),{method:"post",body:{attachment_id:_t,upload_file_url:qt}});case 6:Qt=tr.sent,Qt.status===0&&($t(!1),yr(!1));case 8:case"end":return tr.stop()}},Ft)}))},r.a.createElement("div",null,r.a.createElement(A.a,{align:"middle",className:"mb20"},r.a.createElement("span",null,"\u4F5C\u54C1\u94FE\u63A5\uFF1A"),r.a.createElement(U.a,{style:{width:416},value:qt,onChange:function(Qt){var gr;return pr((gr=Qt.target)===null||gr===void 0?void 0:gr.value)}})),r.a.createElement(A.a,{align:"top"},r.a.createElement("span",{style:{lineHeight:"28px"}},"\u4F5C\u54C1\u6587\u4EF6\uFF1A"),r.a.createElement(w.a,Dr,r.a.createElement(S.a,{type:"primary",className:"mb10"},"\u4E0A\u4F20\u4F5C\u54C1"))))))},ee=Object(o.forwardRef)(ge),re=D("Ot1p"),Te=D("hJwl");function ie(xt){var rt=xt.ItemData,mt=xt.setIssee,wt=xt.MenuItem,Lt=xt.dispatch,It=xt.identifier,Kt=xt.ModelType,Ht=xt.userinfo,ht=xt.getrightdatas,St=Object(o.useState)([]),At=Object(s.a)(St,2),ur=At[0],ar=At[1],Zt=Object(o.useState)(rt.md_content),$t=Object(s.a)(Zt,2),rr=$t[0],cr=$t[1];Object(o.useEffect)(function(){var Rt,Et=[];rt==null||((Rt=rt.attachments)===null||Rt===void 0)||Rt.map(function(Mt){var qt={uid:Mt.id,name:Mt.title,response:{id:Mt.id}};Et.push(qt)}),ar(Et)},[rt==null?void 0:rt.attachments]);function lt(){var Rt,Et=[];return rt==null||((Rt=rt.attachments)===null||Rt===void 0)||Rt.map(function(Mt){var qt={uid:Mt==null?void 0:Mt.id,name:Mt.title,response:{id:Mt.id}};Et.push(qt)}),Et}var Rr={name:"file",multiple:!0,withCredentials:!0,action:K.a.API_SERVER+"/api/attachments.json",defaultFileList:lt(),onRemove:function(Et){Object(Te.t)({id:Et.uid})},onChange:function(Et){var Mt=Et.file.status;Mt!=="uploading",Mt==="removed"&&ar(Et.fileList),Mt==="done"?(ar(Et.fileList),a.b.success("".concat(Et.file.name," \u6587\u4EF6\u4E0A\u4F20\u6210\u529F"))):Mt==="error"&&a.b.error("".concat(Et.file.name," \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"))},beforeUpload:function(Et){var Mt=Et.size/1024/1024<150;return Mt||a.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E150MB"),Mt}};console.log(Rr);function jr(){return xr.apply(this,arguments)}function xr(){return xr=Object(i.a)(l.a.mark(function Rt(){var Et;return l.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return qt.next=2,Lt({type:"competitions/updateMdContent",payload:{attachment_ids:_t(ur),competition_module_id:rt.id,md_content_id:rt.md_id,content:rr,identifier:It}});case 2:Et=qt.sent,Et&&(a.b.info("\u63D0\u4EA4\u6210\u529F"),mt(!0),ht(wt));case 4:case"end":return qt.stop()}},Rt)})),xr.apply(this,arguments)}function _t(Rt){var Et=[];return Rt&&Rt.map(function(Mt){Et.push(Mt.response.id)}),Et}return r.a.createElement("div",null,Kt==="reward"?r.a.createElement(ne,{userlist:Ht,dispatch:Lt,rewarddata:rt.reward_setting,is_signed:rt.is_signed}):null,r.a.createElement(re.a,{defaultValue:rr,onChange:function(Et){return cr(Et)}}),r.a.createElement(w.a,Rr,r.a.createElement(S.a,{className:"uploadBtn"},"\u4E0A\u4F20\u9644\u4EF6"),"(\u5355\u4E2A\u6587\u4EF6150M\u4EE5\u5185)"),r.a.createElement("p",{style:{marginTop:"10px"}},r.a.createElement(S.a,{style:{width:"90px"},type:"primary",onClick:function(){return jr()}},"\u63D0\u4EA4"),r.a.createElement(S.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return mt(!0)}},"\u53D6\u6D88")))}var q=ie,Y=D("g9YV"),X=D("wCAj"),he=D("Znn+"),fe=D("ZTPi");function Ee(){return r.a.createElement("div",null,r.a.createElement("p",{style:{fontSize:"24px",color:"#05101a"}},"\u603B\u6392\u884C"),r.a.createElement("div",{style:{textAlign:"center"}},r.a.createElement("img",{src:K.a.IMG_SERVER+"/images/educoder/competitions/trophy.png"}),r.a.createElement("p",null,"\u8981\u6293\u4F4F\u4E00\u5207\u673A\u4F1A\uFF0C\u5411\u6240\u6709\u4EBA\u8BC1\u660E\u81EA\u5DF1\uFF0C\u8BC1\u660E\u4F60\u80FD\u591F\u8FCE\u63A5\u8363\u8000")))}var He=Ee,Qe=D("5Dmo"),et=D("3S7+"),it=D("jCWc"),ut=D("kPKH"),dt=D("IzEo"),Fe=D("bx4M");function Ie(xt){var rt=xt.oneItem,mt=xt.towItem,wt=xt.threeItem;return r.a.createElement("div",{style:{textAlign:"center"}},r.a.createElement(A.a,{gutter:16,style:{justifyContent:"center"}},r.a.createElement(ut.a,{span:6,style:{marginTop:"30px",marginRight:"20px"}},r.a.createElement(Fe.a,{title:r.a.createElement("div",{className:O.a.towtop},r.a.createElement("img",{style:{marginTop:"20px"},src:K.a.IMG_SERVER+"/images/educoder/huangguan-two.png"}),r.a.createElement("p",{style:{marginTop:"10px"}},r.a.createElement(v.a,{to:"/users/".concat(mt==null?void 0:mt.user_login,"/classrooms")},r.a.createElement("img",{className:O.a.imgradius,src:K.a.IMG_SERVER+"/images/".concat(mt==null?void 0:mt.user_image)}),(mt==null?void 0:mt.competition_prize)&&r.a.createElement("p",{className:O.a.prize},mt==null?void 0:mt.competition_prize),r.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},mt==null?void 0:mt.record_user_name)))),className:O.a.towdiv,bordered:!1},r.a.createElement("p",{style:{fontSize:"14px"}},mt==null?void 0:mt.school_name),r.a.createElement("p",{style:{fontSize:"18px"}},mt==null?void 0:mt.spend_time),r.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(mt==null?void 0:mt.extra_score)+parseFloat(mt==null?void 0:mt.score),"\u5206"))),r.a.createElement(ut.a,{span:6},r.a.createElement(Fe.a,{title:r.a.createElement("div",{className:O.a.onetop},r.a.createElement("img",{style:{marginTop:"20px"},src:K.a.IMG_SERVER+"/images/educoder/huangguan.png"}),r.a.createElement("p",{style:{marginTop:"10px"}},r.a.createElement(v.a,{to:"/users/".concat(rt==null?void 0:rt.user_login,"/classrooms")},r.a.createElement("img",{className:O.a.imgradius,src:K.a.IMG_SERVER+"/images/".concat(rt==null?void 0:rt.user_image)}),(rt==null?void 0:rt.competition_prize)&&r.a.createElement("p",{className:O.a.prize},rt==null?void 0:rt.competition_prize),r.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},rt==null?void 0:rt.record_user_name)))),className:O.a.onediv,bordered:!1},r.a.createElement("p",{style:{fontSize:"14px"}},rt==null?void 0:rt.school_name),r.a.createElement("p",{style:{fontSize:"18px"}},rt==null?void 0:rt.spend_time),r.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(rt==null?void 0:rt.extra_score)+parseFloat(rt==null?void 0:rt.score),"\u5206"))),r.a.createElement(ut.a,{span:6,style:{marginTop:"40px",marginLeft:"20px"}},r.a.createElement(Fe.a,{title:r.a.createElement("div",{className:O.a.threetop},r.a.createElement("img",{style:{marginTop:"20px"},src:K.a.IMG_SERVER+"/images/educoder/huangguan-three.png"}),r.a.createElement("p",{style:{marginTop:"10px"}},r.a.createElement(v.a,{to:"/users/".concat(wt==null?void 0:wt.user_login,"/classrooms")},r.a.createElement("img",{className:O.a.imgradius,src:K.a.IMG_SERVER+"/images/".concat(wt==null?void 0:wt.user_image)}),(wt==null?void 0:wt.competition_prize)&&r.a.createElement("p",{className:O.a.prize},wt==null?void 0:wt.competition_prize),r.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},wt==null?void 0:wt.record_user_name)))),className:O.a.threediv,bordered:!1},r.a.createElement("p",{style:{fontSize:"14px"}},wt==null?void 0:wt.school_name),r.a.createElement("p",{style:{fontSize:"18px"}},wt==null?void 0:wt.spend_time),r.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(wt==null?void 0:wt.extra_score)+parseFloat(wt==null?void 0:wt.score),"\u5206")))))}var st=Ie;function ft(xt){var rt,mt,wt,Lt,It,Kt,Ht,ht,St,At,ur,ar,Zt,$t,rr,cr,lt,Rr,jr,xr,_t,Rt,Et,Mt,qt,pr,er,Ir,Hr,yr,ot=xt.ItemData;return r.a.createElement("div",null,r.a.createElement("p",{style:{fontSize:"24px",color:"#05101a"}},"\u603B\u6392\u884C"),r.a.createElement(st,{oneItem:ot==null?void 0:ot.teams[0],towItem:ot==null?void 0:ot.teams[1],threeItem:ot==null?void 0:ot.teams[2]}),(ot==null||((rt=ot.user_ranks)===null||rt===void 0)?void 0:rt.length)>0&&r.a.createElement("div",{className:O.a.myTeam},(ot==null||((mt=ot.user_ranks)===null||mt===void 0||((wt=mt[0])===null||wt===void 0))?void 0:wt.success)===!1?r.a.createElement("span",{style:{marginRight:"70px",padding:"10px"}},r.a.createElement("p",{style:{marginBottom:"0px"}}," ","\u662F\u5426\u664B\u7EA7\uFF1A",r.a.createElement("span",{style:{color:(ot==null||((Lt=ot.user_ranks)===null||Lt===void 0||((It=Lt[0])===null||It===void 0))?void 0:It.success)===!1?"red":"green"}},(ot==null||((Kt=ot.user_ranks)===null||Kt===void 0||((Ht=Kt[0])===null||Ht===void 0))?void 0:Ht.success)===!1?"\u5426":ot!=null&&(ht=ot.user_ranks)!==null&&ht!==void 0&&(St=ht[0])!==null&&St!==void 0&&St.success?"\u662F":"")),(ot==null||((At=ot.user_ranks)===null||At===void 0||((ur=At[0])===null||ur===void 0))?void 0:ur.awards)&&r.a.createElement("p",{style:{marginBottom:"0px"}}," ","\u662F\u5426\u83B7\u5956\uFF1A",r.a.createElement("span",null,(ot==null||((ar=ot.user_ranks)===null||ar===void 0||((Zt=ar[0])===null||Zt===void 0))?void 0:Zt.awards)==="percent_20"?"\u4E8C\u7B49\u5956":(ot==null||(($t=ot.user_ranks)===null||$t===void 0||((rr=$t[0])===null||rr===void 0))?void 0:rr.awards)==="percent_30"?"\u4E09\u7B49\u5956":"\u6CA1\u6709\u83B7\u5F97\u5956\u9879"))):r.a.createElement("span",{style:{marginRight:"70px"}},"\u6211\u7684\u6392\u540D\uFF1A",ot==null||((cr=ot.user_ranks)===null||cr===void 0||((lt=cr[0])===null||lt===void 0))?void 0:lt.rank),r.a.createElement("span",{style:{flex:1}},r.a.createElement(et.a,{title:"\u6218\u961F\u540D"},ot==null||((Rr=ot.user_ranks)===null||Rr===void 0||((jr=Rr[0])===null||jr===void 0))?void 0:jr.team_name)),r.a.createElement("span",{style:{flex:1}},r.a.createElement(et.a,{title:"\u65F6\u95F4"},ot==null||((xr=ot.user_ranks)===null||xr===void 0||((_t=xr[0])===null||_t===void 0))?void 0:_t.cost_time)),r.a.createElement("span",{style:{flex:1,textAlign:"center"}},r.a.createElement(et.a,{title:"\u8D4B\u80FD\u8D5B\u52A0\u5206"},ot==null||((Rt=ot.user_ranks)===null||Rt===void 0||((Et=Rt[0])===null||Et===void 0))?void 0:Et.extra_score)),r.a.createElement("span",{style:{flex:1}},r.a.createElement(et.a,{title:"\u6BD4\u8D5B\u6210\u7EE9"},ot==null||((Mt=ot.user_ranks)===null||Mt===void 0||((qt=Mt[0])===null||qt===void 0))?void 0:qt.score)),r.a.createElement("span",null,r.a.createElement(et.a,{title:"\u603B\u5206"},parseFloat(ot==null||((pr=ot.user_ranks)===null||pr===void 0||((er=pr[0])===null||er===void 0))?void 0:er.extra_score)+parseFloat(ot==null||((Ir=ot.user_ranks)===null||Ir===void 0||((Hr=Ir[0])===null||Hr===void 0))?void 0:Hr.score)||0))),ot==null||((yr=ot.teams)===null||yr===void 0)?void 0:yr.map(function(zt,sn){return r.a.createElement("div",{className:O.a.bottomItem},r.a.createElement("span",{style:{color:"#0152d9",marginRight:"20px"}},sn+1),r.a.createElement(v.a,{to:"/users/".concat(zt==null?void 0:zt.user_login,"/classrooms"),style:{marginRight:"80px",position:"relative"}},r.a.createElement("img",{className:O.a.imgradius,src:K.a.IMG_SERVER+"/images/".concat(zt==null?void 0:zt.user_image)}),(zt==null?void 0:zt.competition_prize)&&r.a.createElement("span",{className:O.a.spanrightradius},zt==null?void 0:zt.competition_prize)),r.a.createElement("span",{style:{flex:1}},r.a.createElement(et.a,{title:"\u6218\u961F\u540D"},zt==null?void 0:zt.team_name)),r.a.createElement("span",{style:{flex:1}},r.a.createElement(et.a,{title:"\u5355\u4F4D/\u5B66\u6821\u540D"},zt.school_name)),r.a.createElement("span",{style:{flex:1,textAlign:"center"}},r.a.createElement(et.a,{title:"\u8D4B\u80FD\u8D5B\u52A0\u5206"},zt.extra_score)),r.a.createElement("span",{style:{flex:1}},r.a.createElement(et.a,{title:"\u6BD4\u8D5B\u6210\u7EE9"},zt.score)),r.a.createElement("span",{style:{color:"#0152d9"}},r.a.createElement(et.a,{title:"\u603B\u5206"},parseFloat(zt.extra_score)+parseFloat(zt.score))))}))}var Ze=ft,tt=fe.a.TabPane;function Be(xt){var rt,mt,wt,Lt,It,Kt,Ht=xt.ChartRules,ht=xt.ItemData,St=xt.getCharts,At=xt.Selectkey,ur=xt.getChartRules,ar=xt.userinfo,Zt=xt.Editable,$t=xt.HeaderDetail,rr=Object(o.useState)(!1),cr=Object(s.a)(rr,2),lt=cr[0],Rr=cr[1],jr=Object(o.useState)(""),xr=Object(s.a)(jr,2),_t=xr[0],Rt=xr[1],Et=Object(o.useState)(!0),Mt=Object(s.a)(Et,2),qt=Mt[0],pr=Mt[1],er=Object(o.useState)(),Ir=Object(s.a)(er,2),Hr=Ir[0],yr=Ir[1],ot=Object(o.useState)(),zt=Object(s.a)(ot,2),sn=zt[0],en=zt[1],mr=Object(x.i)(),Dr=mr.identifier;Object(o.useEffect)(function(){if(qt){var gr,tr=Ht==null||((gr=Ht.stages)===null||gr===void 0)?void 0:gr[0];if(yr(tr),tr!=null&&tr.id){var gt,yt,Gt;(($t==null?void 0:$t.task)==="mAP"||($t==null?void 0:$t.task)==="dog")&&St(tr==null?void 0:tr.id),Rt(((gt=Ht.rule_contents)===null||gt===void 0||((yt=gt.filter(function(ln){return parseInt(ln.competition_stage_id)===parseInt(tr==null?void 0:tr.id)}))===null||yt===void 0||((Gt=yt[0])===null||Gt===void 0))?void 0:Gt.content)||"")}else{var kt,Lr,an;($t==null?void 0:$t.task)==="mAP"||($t==null?void 0:$t.task)==="dog",Rt(((kt=Ht.rule_contents)===null||kt===void 0||((Lr=kt.filter(function(ln){return parseInt(ln.competition_stage_id)===0}))===null||Lr===void 0||((an=Lr[0])===null||an===void 0))?void 0:an.content)||"")}}},[Ht]);function Mr(){return Ft.apply(this,arguments)}function Ft(){return Ft=Object(i.a)(l.a.mark(function gr(){var tr,gt,yt,Gt,kt,Lr,an,ln,Or;return l.a.wrap(function(Fr){for(;;)switch(Fr.prev=Fr.next){case 0:if(_t){Fr.next=3;break}return a.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),Fr.abrupt("return");case 3:if(pr(!1),tr=Hr==null?void 0:Hr.id,!tr){Fr.next=12;break}return Fr.next=8,Object(Z.a)("/api/competitions/".concat(Dr,"/update_md_content.json"),{method:"post",body:{competition_module_id:At,content:_t,md_content_id:(gt=Ht.rule_contents)===null||gt===void 0||((yt=gt.filter(function(pn){return parseInt(pn.competition_stage_id)===parseInt(tr)}))===null||yt===void 0||((Gt=yt[0])===null||Gt===void 0))?void 0:Gt.id,stage_id:Hr==null?void 0:Hr.id}});case 8:kt=Fr.sent,kt.status===0&&(a.b.info("\u66F4\u65B0\u6210\u529F"),Rr(!1),ur()),Fr.next=16;break;case 12:return Fr.next=14,Object(Z.a)("/api/competitions/".concat(Dr,"/update_md_content.json"),{method:"post",body:{competition_module_id:At,content:_t,md_content_id:(Lr=Ht.rule_contents)===null||Lr===void 0||((an=Lr.filter(function(pn){return parseInt(pn.competition_stage_id)===0}))===null||an===void 0||((ln=an[0])===null||ln===void 0))?void 0:ln.id,stage_id:Hr==null?void 0:Hr.id}});case 14:Or=Fr.sent,Or.status===0&&(a.b.info("\u66F4\u65B0\u6210\u529F"),Rr(!1),ur());case 16:case"end":return Fr.stop()}},gr)})),Ft.apply(this,arguments)}var Qt=[{title:"\u6392\u540D",dataIndex:"name",align:"center",key:"name",render:function(tr,gt,yt){return r.a.createElement("span",null,yt+1)}},{title:"\u5934\u50CF",dataIndex:"user_image",align:"center",key:"user_image",render:function(tr){return r.a.createElement("img",{className:O.a.imgradius,src:K.a.IMG_SERVER+"/images/".concat(tr)})}},{title:"\u6218\u961F\u540D\u79F0",dataIndex:"team_name",key:"team_name",render:function(tr){return r.a.createElement("span",{title:tr},tr&&(tr==null?void 0:tr.length)>=15?(tr==null?void 0:tr.substr(0,15))+"...":tr||"--")}},{title:"\u5355\u4F4D",dataIndex:"school_name",key:"school_name",align:"center",render:function(tr){return r.a.createElement("span",null,tr||"--")}},{title:($t==null?void 0:$t.task)==="mAP"?"mAP\u6307\u6807":($t==null?void 0:$t.task)==="Jittor-3"?"\u603B\u5206":"top1\u6307\u6807",dataIndex:"score",key:"score",render:function(tr){return r.a.createElement("span",null,tr||"--")}}];return r.a.createElement("div",null,(Ht==null||((rt=Ht.stages)===null||rt===void 0)?void 0:rt.length)>0?null:r.a.createElement(He,null),(Ht==null||((mt=Ht.stages)===null||mt===void 0)?void 0:mt.length)>0&&r.a.createElement(fe.a,{animated:!0,tabBarExtraContent:((ar==null?void 0:ar.admin)||(ar==null?void 0:ar.business)||Zt)&&r.a.createElement(S.a,{onClick:function(){Rr(!0)}},"\u7F16\u8F91"),onChange:function(tr){var gt,yt,Gt,kt,Lr;Rr(!1);var an=Ht==null||((gt=Ht.stages)===null||gt===void 0)?void 0:gt.filter(function(Or){return parseInt(tr)===parseInt(Or==null?void 0:Or.id)})[0];yr(an);var ln=an==null||((yt=an.children)===null||yt===void 0)?void 0:yt[0];en(ln),Rt(((Gt=Ht.rule_contents)===null||Gt===void 0||((kt=Gt.filter(function(Or){return parseInt(Or.competition_stage_id)===parseInt(an==null?void 0:an.id)}))===null||kt===void 0||((Lr=kt[0])===null||Lr===void 0))?void 0:Lr.content)||""),St((ln==null?void 0:ln.id)||tr)}},Ht&&Ht.stages.map(function(gr,tr){return r.a.createElement(tt,{tab:gr.name,key:gr.id===null?0:gr.id},lt===!1&&Ht&&Ht.rule_contents.map(function(gt,yt){if(gr.id===gt.competition_stage_id)return r.a.createElement(I.a,{key:yt,value:gt.content===void 0||gt.content===null?"":gt.content});if(gr.id===null&&gt.competition_stage_id===0)return r.a.createElement(I.a,{key:yt,value:gt.content===void 0||gt.content===null?"":gt.content})}))})),(Hr==null||((wt=Hr.children)===null||wt===void 0)?void 0:wt.length)>0&&r.a.createElement(fe.a,{activeKey:(sn==null?void 0:sn.id)+"",onChange:function(tr){var gt,yt=Hr==null||((gt=Hr.children)===null||gt===void 0)?void 0:gt.filter(function(Gt){return parseInt(tr)===parseInt(Gt==null?void 0:Gt.id)})[0];en(yt),St(tr)}},Hr==null||((Lt=Hr.children)===null||Lt===void 0)?void 0:Lt.map(function(gr,tr){return r.a.createElement(tt,{tab:gr.name,key:gr.id===null?0:gr.id})})),lt&&r.a.createElement("div",null,r.a.createElement(re.a,{defaultValue:_t,onChange:function(tr){Rt(tr)}}),r.a.createElement("p",{style:{marginTop:"10px"}},r.a.createElement(S.a,{style:{width:"90px"},type:"primary",onClick:function(){return Mr()}},"\u63D0\u4EA4"),r.a.createElement(S.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return Rr(!1)}},"\u53D6\u6D88"))),(ht==null||((It=ht.teams)===null||It===void 0)?void 0:It.length)>0&&(($t==null?void 0:$t.task)==="mAP"||($t==null?void 0:$t.task)==="dog"||($t==null?void 0:$t.task)==="Jittor-3")?r.a.createElement(X.a,{dataSource:ht==null?void 0:ht.teams,columns:Qt,pagination:!1}):(ht==null||((Kt=ht.teams)===null||Kt===void 0)?void 0:Kt.length)>0&&r.a.createElement(Ze,{ItemData:ht}))}var Pe=Be,Ne=D("/zsF"),xe=D("PArb");function Ae(xt){var rt,mt,wt,Lt,It,Kt,Ht,ht=xt.Prize,St=Object(x.i)(),At=Object(o.useState)([{type:1,name:"\u56E2\u4F53\u5956\u8BC1\u4E66"},{type:2,name:"\u4E2A\u4EBA\u5956\u8BC1\u4E66"},{type:3,name:"\u4F18\u79C0\u6307\u5BFC\u6559\u5E08\u8BC1\u4E66"}]),ur=Object(s.a)(At,2),ar=ur[0],Zt=ur[1],$t=function(){var rr=Object(i.a)(l.a.mark(function cr(lt){var Rr;return l.a.wrap(function(xr){for(;;)switch(xr.prev=xr.next){case 0:return xr.next=2,Object(Te.u)({type:lt.type,id:St.identifier});case 2:Rr=xr.sent,(Rr==null?void 0:Rr.status)===0&&(location.href="/competitions/exports?id=".concat(St.identifier,"&type=").concat(lt.type));case 4:case"end":return xr.stop()}},cr)}));return function(lt){return rr.apply(this,arguments)}}();return r.a.createElement("div",null,r.a.createElement("p",{className:O.a.downloadpdf},"\u6E29\u99A8\u63D0\u793A\uFF1A\u586B\u5199\u7684\u4E2A\u4EBA\u4FE1\u606F\u7ECF\u5BA1\u6279\u540E\uFF0C\u5C06\u63D0\u4F9B\u4E2A\u4EBA\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D\uFF1B\u56E2\u961F\u961F\u5458\u4FE1\u606F\u5168\u90E8\u5BA1\u6279\u540E\uFF0C\u5C06\u63D0\u4F9B\u56E2\u961F\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D\u3002"),r.a.createElement("p",{style:{marginTop:"30px",fontSize:"16px",color:"#000"}},"\u8BC1\u4E66\u60C5\u51B5"),(ht==null||((rt=ht.personal_certifications)===null||rt===void 0)?void 0:rt.length)>0?r.a.createElement("p",null,r.a.createElement("span",null,"\u4E2A\u4EBA\u8BC1\u4E66\uFF1A"),r.a.createElement("img",{src:K.a.IMG_SERVER+"/images/educoder/pdfs.png"}),r.a.createElement("a",{style:{marginLeft:"5px"},href:K.a.API_SERVER+"".concat(ht==null||((mt=ht.personal_certifications[0])===null||mt===void 0)?void 0:mt.url)},"\u7ACB\u5373\u4E0B\u8F7D")):r.a.createElement("p",null,r.a.createElement("span",null,"\u4E2A\u4EBA\u8BC1\u4E66\uFF1A")," ",r.a.createElement("span",{style:{color:"#000"}},"\u6682\u672A\u751F\u6210"),r.a.createElement("span",{style:{marginLeft:"20px"}},"\u539F\u56E0\uFF1A")," ",r.a.createElement("span",{style:{color:"#000"}},"\u7EC4\u59D4\u4F1A\u672A\u5B8C\u6210\u8BC1\u4E66\u5BA1\u6279\uFF0C\u8BF7\u7A0D\u540E")),(ht==null||((wt=ht.team_certifications)===null||wt===void 0)?void 0:wt.length)>0?r.a.createElement("p",null,r.a.createElement("span",null,"\u56E2\u961F\u8BC1\u4E66\uFF1A"),r.a.createElement("img",{src:K.a.IMG_SERVER+"/images/educoder/pdfs.png"}),r.a.createElement("a",{style:{marginLeft:"5px"},href:K.a.API_SERVER+"".concat(ht==null||((Lt=ht.team_certifications[0])===null||Lt===void 0)?void 0:Lt.url)},"\u7ACB\u5373\u4E0B\u8F7D")):r.a.createElement("p",null,r.a.createElement("span",null,"\u56E2\u961F\u8BC1\u4E66\uFF1A")," ",r.a.createElement("span",{style:{color:"#000"}},"\u6682\u672A\u751F\u6210")),r.a.createElement(xe.a,null),(ht==null||((It=ht.teams)===null||It===void 0)?void 0:It.length)>0?r.a.createElement("div",null,r.a.createElement("p",null,(ht==null?void 0:ht.teams)&&(ht==null||((Kt=ht.teams[0])===null||Kt===void 0)?void 0:Kt.name),"\u6218\u961F\u4FE1\u606F\u586B\u62A5\u6982\u51B5"),r.a.createElement("p",{style:{display:"flex",height:"50px",background:"#f5f5f5",alignItems:"center",justifyContent:"space-around"}},r.a.createElement("span",{style:{width:"5%"}},"\u89D2\u8272"),r.a.createElement("span",{style:{width:"5%"}},"\u59D3\u540D"),r.a.createElement("span",{style:{width:"10%"}},"\u5B9E\u540D\u8BA4\u8BC1"),r.a.createElement("span",{style:{width:"10%"}},"\u804C\u4E1A\u8BA4\u8BC1"),r.a.createElement("span",{style:{width:"10%"}},"\u624B\u673A\u7ED1\u5B9A"),r.a.createElement("span",{style:{width:"10%"}},"\u90AE\u7BB1\u7ED1\u5B9A"),r.a.createElement("span",{style:{width:"50%",textAlign:"center"}},"\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7\u4FE1\u606F\uFF08\u961F\u957F\u586B\u5199\uFF09")),(ht==null?void 0:ht.teams)&&(ht==null||((Ht=ht.teams[0])===null||Ht===void 0)?void 0:Ht.team_members.map(function(rr,cr){var lt,Rr,jr,xr,_t,Rt;return r.a.createElement("p",{className:O.a.teamItem},r.a.createElement("span",{style:{width:"5%"}},rr==null?void 0:rr.role),r.a.createElement("span",{style:{width:"5%"}},rr==null?void 0:rr.name),r.a.createElement("span",{style:{width:"10%"}},(rr==null?void 0:rr.real_name_auth)==="authed"?"\u5DF2\u8BA4\u8BC1":(rr==null?void 0:rr.real_name_auth)==="authing"?"\u5F85\u5BA1\u6838":"\u672A\u8BA4\u8BC1"),r.a.createElement("span",{style:{width:"10%"}},(rr==null?void 0:rr.professional_auth)==="authed"?"\u5DF2\u8BA4\u8BC1":(rr==null?void 0:rr.professional_auth)==="authing"?"\u5F85\u5BA1\u6838":"\u672A\u8BA4\u8BC1"),r.a.createElement("span",{style:{width:"10%"}},rr!=null&&rr.phone_binded?"\u5DF2\u7ED1\u5B9A":"\u672A\u7ED1\u5B9A"),r.a.createElement("span",{style:{width:"10%"}},rr!=null&&rr.email_binded?"\u5DF2\u7ED1\u5B9A":"\u672A\u7ED1\u5B9A"),(rr==null?void 0:rr.role)==="\u961F\u957F"?r.a.createElement("span",{style:{width:"50%",textAlign:"center"}},(ht==null?void 0:ht.teams)&&(ht==null||((lt=ht.teams[0])===null||lt===void 0||((Rr=lt.bank_account)===null||Rr===void 0))?void 0:Rr.bank),(ht==null?void 0:ht.teams)&&(ht==null||((jr=ht.teams[0])===null||jr===void 0||((xr=jr.bank_account)===null||xr===void 0))?void 0:xr.second_bank),(ht==null?void 0:ht.teams)&&(ht==null||((_t=ht.teams[0])===null||_t===void 0||((Rt=_t.bank_account)===null||Rt===void 0))?void 0:Rt.card_no)):r.a.createElement("span",{style:{width:"50%"}}))}))):null,r.a.createElement(A.a,{gutter:[20,20]},ar.map(function(rr,cr){return r.a.createElement(ut.a,{key:cr},r.a.createElement(S.a,{type:"primary",onClick:function(){return $t(rr)}},rr.name))})))}var Le=Ae,Me=D("0Owb"),We=D("7Kak"),nt=D("9yH6"),vt=D("y8nQ"),bt=D("Vl3Y"),Wt=D("1vsH"),Bt=D("Dgm7"),lr=D.n(Bt),dr=D("NnUe"),Ot=D.n(dr),Vr=w.a.Dragger,Wr=10,Yr=function(rt){var mt=rt.user,wt=rt.account,Lt=rt.globalSetting,It=rt.loading,Kt=rt.dispatch,Ht=Object(d.a)(rt,["user","account","globalSetting","loading","dispatch"]),ht=bt.a.useForm(),St=Object(s.a)(ht,1),At=St[0],ur=Object(o.useState)({}),ar=Object(s.a)(ur,2),Zt=ar[0],$t=ar[1],rr=Object(o.useState)(!0),cr=Object(s.a)(rr,2),lt=cr[0],Rr=cr[1],jr=Object(o.useState)(),xr=Object(s.a)(jr,2),_t=xr[0],Rt=xr[1],Et=Object(o.useState)(),Mt=Object(s.a)(Et,2),qt=Mt[0],pr=Mt[1],er=Object(o.useState)(),Ir=Object(s.a)(er,2),Hr=Ir[0],yr=Ir[1],ot=Object(o.useState)(),zt=Object(s.a)(ot,2),sn=zt[0],en=zt[1];Object(o.useEffect)(function(){if(!wt.basicInfo)return;var tr=wt.basicInfo,gt={name:tr.show_realname?tr.name:Object(Wt.H)(tr.name),gender:tr.gender};Rt(tr.name),Rr(tr.show_realname),At.setFieldsValue(gt),$t(gt)},[wt.basicInfo]);var mr=function(gt){if(gt.file.status==="uploading"){en(!0);return}if(gt.file.status==="done"){var yt;console.log(gt.file,gt.file.response),yr((yt=gt.file.response)===null||yt===void 0?void 0:yt.id),Object(Wt.D)(gt.file.originFileObj,function(Gt){pr(Gt),en(!1)})}},Dr=function(gt){$t(Object(k.a)({},At.getFieldsValue())),"name"in gt&&Rt(gt.name)},Mr=function(){var gt=!lt;Rr(gt);var yt=gt?_t:Object(Wt.H)(_t);At.setFieldsValue({name:yt})},Ft=function(){var tr=Object(i.a)(l.a.mark(function gt(yt){var Gt,kt,Lr,an,ln,Or,tn,Fr;return l.a.wrap(function(Xr){for(;;)switch(Xr.prev=Xr.next){case 0:if(Lr=yt||{},an=Lr.name,ln=Lr.gender,Or=Lr.idNumber,qt){Xr.next=4;break}return a.b.info("\u8BF7\u5148\u4E0A\u4F20\u7167\u7247\uFF01"),Xr.abrupt("return");case 4:return Xr.next=6,Kt({type:"account/applyRealNameAuth",payload:{id:((Gt=wt.basicInfo)===null||Gt===void 0?void 0:Gt.id)||((kt=mt.userInfo)===null||kt===void 0?void 0:kt.login),name:an,gender:ln,id_number:Or,show_realname:lt,attachment_ids:[Hr]}});case 6:tn=Xr.sent,Qt(),tn&&(a.b.info("\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5BA1\u6838!"),Kt({type:"account/getBasicInfo",payload:{login:(Fr=mt.userInfo)===null||Fr===void 0?void 0:Fr.login}}));case 9:case"end":return Xr.stop()}},gt)}));return function(yt){return tr.apply(this,arguments)}}(),Qt=function(){Kt({type:"account/setActionTabs",payload:{}})},gr={data:{type:"real_name"},multiple:!0,showUploadList:!1,action:"".concat(K.a.API_SERVER,"/api/attachments.json"),className:Ot.a.uploader,onChange:mr,beforeUpload:function(gt){var yt=gt.type==="image/jpeg"||gt.type==="image/png"||gt.type==="image/jpg"||gt.type==="image/bmp";return yt||a.b.info("\u8BF7\u4E0A\u4F20\u6B63\u786E\u6587\u4EF6\u683C\u5F0F"),yt}};return r.a.createElement(C.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:wt.actionTabs.key==="Account-RealNameAuth",title:"\u4FEE\u6539\u5B9E\u540D\u4FE1\u606F",width:"600px",footer:null},r.a.createElement(t.a,{spinning:!!sn},r.a.createElement(bt.a,{className:Ot.a.formWrap,form:At,layout:"horizontal",onValuesChange:Dr,onFinish:Ft},r.a.createElement(bt.a.Item,{label:"\u59D3\u540D",name:"name",labelCol:{span:3},wrapperCol:{span:12},rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u771F\u5B9E\u59D3\u540D\uFF0C\u6700\u5927\u9650\u5236".concat(Wr,"\u4E2A\u5B57\u7B26")},{validator:Wt.K}],extra:r.a.createElement("span",null,lt?"\uFF08\u663E\u793A\uFF1A\u5E73\u53F0\u5C06\u663E\u793A\u60A8\u7684\u771F\u5B9E\u59D3\u540D\uFF09":"\uFF08\u9690\u85CF\uFF1A\u5E73\u53F0\u5C06\u663E\u793A\u4F60\u7684\u6635\u79F0\uFF09")},r.a.createElement(U.a,{disabled:!lt,placeholder:"\u8BF7\u8F93\u5165\u771F\u5B9E\u59D3\u540D\uFF0C\u6700\u5927\u9650\u5236".concat(Wr,"\u4E2A\u5B57\u7B26"),maxLength:Wr,addonAfter:r.a.createElement("i",{className:"iconfont ".concat(lt?"icon-xianshi":"icon-yincang"," font18 ").concat(Ot.a.color0152d9),onClick:Mr})})),r.a.createElement(bt.a.Item,{label:"\u6027\u522B\uFF1A",name:"gender",labelCol:{span:3},wrapperCol:{span:12},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6027\u522B"}]},r.a.createElement(nt.a.Group,null,r.a.createElement(nt.a,{value:0},"\u7537"),r.a.createElement(nt.a,{value:1},"\u5973"))),r.a.createElement(bt.a.Item,{label:"\u8BC1\u4EF6\u53F7\uFF1A",labelCol:{span:3},name:"idNumber",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BC1\u4EF6\u53F7"}]},r.a.createElement(U.a,{placeholder:"\u8BF7\u8F93\u5165\u8BC1\u4EF6\u53F7"})),r.a.createElement(bt.a.Item,{label:"\u8EAB\u4EFD\u8BC1\u4E0A\u4F20",labelCol:{span:3}},r.a.createElement("div",{className:Ot.a.flexRow},r.a.createElement("div",{className:"".concat(Ot.a.flexColumn," ").concat(Ot.a.example)},r.a.createElement("span",{className:Ot.a.exampleImg},r.a.createElement("img",{src:lr.a})),r.a.createElement("span",{className:"tc"},r.a.createElement("p",null,"\u793A\u4F8B\u56FE\u7247"),r.a.createElement("p",{className:"".concat(Ot.a.colorOrange," font12")},"\uFF08png/jpg/bmp\u683C\u5F0F\uFF0C\u4E0D\u8D85\u8FC72MB\uFF09"))),r.a.createElement("div",{className:Ot.a.flexColumn},r.a.createElement(Vr,Object(Me.a)({},gr,{accept:".png,.jpg,.bmp,.jpeg"}),qt?r.a.createElement("img",{src:qt,className:Ot.a.uploadImg}):r.a.createElement("div",{className:Ot.a.imageTip},r.a.createElement("p",null,r.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(Ot.a.uploadTipIcon)})),r.a.createElement("p",{className:Ot.a.uploadTip},r.a.createElement("a",{className:Ot.a.color05101a},"\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u56FE\u7247")))),r.a.createElement("span",{className:"tc"},r.a.createElement("p",{className:Ot.a.viewLargerImg},"\u67E5\u770B\u5927\u56FE"))))),r.a.createElement("div",{className:Ot.a.footerWrap},r.a.createElement(bt.a.Item,null,r.a.createElement(S.a,{className:"mr5",size:"large",onClick:Qt},"\u53D6\u6D88"),r.a.createElement(S.a,{size:"large",type:"primary",htmlType:"submit",loading:It["account/applyRealNameAuth"]},"\u4FDD\u5B58"))),r.a.createElement("div",{className:Ot.a.note},r.a.createElement("p",null,"\u8BA4\u8BC1\u987B\u77E5\uFF1A"),r.a.createElement("p",null,"1.\u4F60\u9700\u8981\u51C6\u5907\u6709\u6548\u7684\u8EAB\u4EFD\u8BC1\u6B63\u9762\uFF08\u4EBA\u50CF\u9762\uFF09\u7684\u8BC1\u4EF6\u7167\u7167\u7247\uFF0C\u8BF7\u786E\u4FDD\u8BC1\u4EF6\u7167\u7247\u6E05\u6670\u53EF\u89C1\uFF0C\u4E25\u7981PS\uFF1B"),r.a.createElement("p",null,"2.\u6211\u4EEC\u5C06\u5728\u4F60\u63D0\u4EA4\u8BA4\u8BC1\u4FE1\u606F\u540E\u768424\u5C0F\u65F6\uFF08\u4E0D\u5305\u542B\u8282\u5047\u65E5\uFF09\u5185\u5B8C\u6210\u5BA1\u6838\uFF0C\u5BA1\u6838\u7ED3\u679C\u5C06\u4F1A\u4EE5\u7CFB\u7EDF\u6D88\u606F\u7684\u5F62\u5F0F\u53D1\u9001\u7ED9\u4F60\uFF1B"),r.a.createElement("p",null,"3.\u5B9E\u540D\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u65E0\u6CD5\u5220\u9664\uFF0C\u8BF7\u8C28\u614E\u586B\u5199\uFF1B"),r.a.createElement("p",null,"4.\u5B9E\u540D\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u7CFB\u7EDF\u5C06\u81EA\u52A8\u53D1\u653E500\u4E2A\u91D1\u5E01\u4F5C\u4E3A\u5956\u52B1\uFF1B"),r.a.createElement("p",null,"5.\u6211\u4EEC\u4F1A\u786E\u4FDD\u4F60\u6240\u63D0\u4F9B\u7684\u4FE1\u606F\u5747\u5904\u4E8E\u4E25\u683C\u7684\u4FDD\u5BC6\u72B6\u6001\uFF0C\u4E0D\u4F1A\u6CC4\u9732\uFF1B"),r.a.createElement("p",null,"6.\u5982\u5B58\u5728\u6076\u610F\u4E71\u586B\u5199\u59D3\u540D\uFF0C\u8BC1\u4EF6\u53F7\uFF0C\u53CA\u4E0A\u4F20\u4E0E\u5B9E\u540D\u8BA4\u8BC1\u8BC1\u4EF6\u65E0\u5173\u56FE\u7247\u8005\uFF0C\u4E00\u7ECF\u53D1\u73B0\u5C06\u51BB\u7ED3EduCoder\u8D26\u53F7\u3002"),r.a.createElement("p",null,"7.\u63D0\u4EA4\u5B9E\u540D\u8BA4\u8BC1\u540E\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u5C06\u72B6\u6001\u6539\u4E3A\u5DF2\u8BA4\u8BC1\uFF0C\u4F60\u5C06\u53EF\u4EE5\u4F53\u9A8C\u5E73\u53F0\u9700\u8981\u5B9E\u540D\u8BA4\u8BC1\u7684\u529F\u80FD\uFF1B\u5982\u679C\u5728\u8BA4\u8BC1\u540E\u7684\u4F7F\u7528\u8FC7\u7A0B\u4E2D\u672A\u901A\u8FC7\u5BA1\u6838\uFF0C\u4F60\u5C06\u4E0D\u80FD\u7EE7\u7EED\u4F53\u9A8C\u9700\u8981\u8BA4\u8BC1\u7684\u529F\u80FD\u3002")))))},bn=Object(p.a)(function(xt){var rt=xt.user,mt=xt.account,wt=xt.loading,Lt=xt.globalSetting;return{user:rt,account:mt,globalSetting:Lt,loading:wt.effects}})(Yr),Ar=D("O3gP"),fn=D("lrIw"),cn=D("KXlV"),Vt=D.n(cn),En=D("Sjjz"),fr=D.n(En),br=U.a.TextArea,Br=function(rt){var mt=rt.account,wt=rt.globalSetting,Lt=rt.loading,It=rt.dispatch,Kt=rt.schoolName,Ht=rt.departmentName,ht=rt.visible,St=rt.onClose,At=St===void 0?function(){}:St,ur=rt.onSuccess,ar=ur===void 0?function(){}:ur,Zt=Object(d.a)(rt,["account","globalSetting","loading","dispatch","schoolName","departmentName","visible","onClose","onSuccess"]),$t=bt.a.useForm(),rr=Object(s.a)($t,1),cr=rr[0],lt=Object(o.useRef)();Object(o.useEffect)(function(){lt.current=Zt.schoolId},[Zt.schoolId]),Object(o.useEffect)(function(){cr.setFieldsValue({department:Ht})},[Ht]);var Rr=function(){var jr=Object(i.a)(l.a.mark(function xr(_t){var Rt,Et,Mt,qt;return l.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:return Rt=_t||{},Et=Rt.department,Mt=Rt.remarks,er.next=3,It({type:"account/appplyDepartment",payload:{school_id:lt.current,name:Et,remarks:Mt}});case 3:qt=er.sent,At(),qt&&(a.b.success("\u65B0\u589E\u9662\u7CFB/\u90E8\u95E8\u6210\u529F\uFF01"),ar(Et));case 6:case"end":return er.stop()}},xr)}));return function(_t){return jr.apply(this,arguments)}}();return r.a.createElement(C.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:ht,title:"\u7533\u8BF7\u6DFB\u52A0\u5B50\u5355\u4F4D\u540D\u79F0",width:"600px",footer:null},r.a.createElement(bt.a,{className:fr.a.formWrap,form:cr,labelCol:{span:4},wrapperCol:{span:20},onFinish:Rr},r.a.createElement(bt.a.Item,{label:"\u5355\u4F4D\u540D\u79F0\uFF1A"},Kt),r.a.createElement(bt.a.Item,{label:"\u90E8\u95E8\u540D\u79F0\uFF1A",name:"department",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u90E8\u95E8\u6216\u8005\u5B66\u9662\u540D\u79F0"}]},r.a.createElement(U.a,{placeholder:"\u8BF7\u8F93\u5165\u90E8\u95E8\u6216\u8005\u5B66\u9662\u540D\u79F0"})),r.a.createElement(bt.a.Item,{label:"\u8BF4\u660E\uFF1A",name:"remarks"},r.a.createElement(br,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"})),r.a.createElement("div",{className:fr.a.footerWrap},r.a.createElement(bt.a.Item,null,r.a.createElement(S.a,{className:"mr5",size:"large",onClick:function(){At()}},"\u53D6\u6D88"),r.a.createElement(S.a,{size:"large",type:"primary",htmlType:"submit",loading:Lt["account/appplyDepartment"]},"\u4FDD\u5B58")))))},Pn=Object(p.a)(function(xt){var rt=xt.account,mt=xt.loading,wt=xt.globalSetting;return{account:rt,globalSetting:wt,loading:mt.effects}})(Br),Kn=D("6UJt"),dn=D("DFOY"),sr=D("jO45"),Jn=D("jN4g"),Tn=D("gJ3r"),On=D("jwmR"),Jr=D.n(On),An=function(rt,mt){return mt.some(function(wt){return wt.label.toLowerCase().indexOf(rt.toLowerCase())>-1})},Zn=U.a.TextArea,ri=function(rt){var mt=rt.account,wt=rt.globalSetting,Lt=rt.loading,It=rt.dispatch,Kt=rt.schoolName,Ht=rt.visible,ht=rt.onClose,St=ht===void 0?function(){}:ht,At=rt.onSuccess,ur=At===void 0?function(){}:At,ar=Object(d.a)(rt,["account","globalSetting","loading","dispatch","schoolName","visible","onClose","onSuccess"]),Zt=bt.a.useForm(),$t=Object(s.a)(Zt,1),rr=$t[0];Object(o.useEffect)(function(){rr.setFieldsValue({name:Kt})},[Kt]);var cr=function(){var lt=Object(i.a)(l.a.mark(function Rr(jr){var xr,_t,Rt,Et,Mt,qt,pr;return l.a.wrap(function(Ir){for(;;)switch(Ir.prev=Ir.next){case 0:return xr=jr||{},_t=xr.name,Rt=xr.city,Et=Rt===void 0?[]:Rt,Mt=xr.address,qt=xr.remarks,Ir.next=3,It({type:"account/appplySchool",payload:{name:_t,province:Et[0],city:Et[1],address:Mt,remarks:qt}});case 3:pr=Ir.sent,St(),pr&&(a.b.success("\u65B0\u589E\u5B66\u6821/\u5355\u4F4D\u6210\u529F\uFF01"),ur(_t));case 6:case"end":return Ir.stop()}},Rr)}));return function(jr){return lt.apply(this,arguments)}}();return r.a.createElement(C.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:Ht,title:"\u7533\u8BF7\u6DFB\u52A0\u5355\u4F4D\u540D\u79F0",width:"600px",footer:null},r.a.createElement(bt.a,{className:Jr.a.formWrap,form:rr,labelCol:{span:4},wrapperCol:{span:20},onFinish:cr},r.a.createElement(bt.a.Item,{label:"\u5355\u4F4D\u5168\u79F0\uFF1A",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B66\u6821\u6216\u5DE5\u4F5C\u5355\u4F4D"}]},r.a.createElement(U.a,{placeholder:"\u5B66\u6821\u6216\u5DE5\u4F5C\u5355\u4F4D"})),r.a.createElement("div",{className:"".concat(Jr.a.flexRow," ").concat(Jr.a.example)},r.a.createElement("div",null,"\u793A\u4F8B\uFF1A"),r.a.createElement("div",{className:Jr.a.flexColumn},r.a.createElement("div",null,r.a.createElement(sr.a,{style:{color:"rgb(82, 196, 26)"}}),r.a.createElement("span",{className:"font14 ml5"},"\u6B63\u786E\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u6784")),r.a.createElement("div",null,r.a.createElement(Jn.a,{style:{color:"red"}}),r.a.createElement("span",{className:"font14 ml5"},"\u9519\u8BEF\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u67842019\u6625")))),r.a.createElement(bt.a.Item,{label:"\u5730\u533A\uFF1A",name:"city"},r.a.createElement(dn.a,{allowClear:!0,size:"large",options:Tn.a,placeholder:"\u8BF7\u9009\u62E9\u6240\u5728\u5730",showSearch:{matchInputWidth:!0,filter:An}})),r.a.createElement(bt.a.Item,{label:"\u8BE6\u7EC6\u5730\u5740\uFF1A",name:"address"},r.a.createElement(U.a,{placeholder:"\u8BF7\u586B\u5199\u5B8C\u6574\u7684\u5730\u5740\u4FE1\u606F"})),r.a.createElement(bt.a.Item,{label:"\u8BF4\u660E\uFF1A",name:"remarks"},r.a.createElement(Zn,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"})),r.a.createElement("div",{className:Jr.a.footerWrap},r.a.createElement(bt.a.Item,null,r.a.createElement(S.a,{className:"mr5",size:"large",onClick:function(){St()}},"\u53D6\u6D88"),r.a.createElement(S.a,{size:"large",type:"primary",htmlType:"submit",loading:Lt["account/appplySchool"]},"\u4FDD\u5B58")))))},Nt=Object(p.a)(function(xt){var rt=xt.account,mt=xt.loading,wt=xt.globalSetting;return{account:rt,globalSetting:wt,loading:mt.effects}})(ri),_r=me.a.Option,mi=w.a.Dragger,xi=function(rt){var mt,wt,Lt=rt.user,It=rt.account,Kt=rt.globalSetting,Ht=rt.loading,ht=rt.dispatch,St=rt.Scoid,At=Object(d.a)(rt,["user","account","globalSetting","loading","dispatch","Scoid"]),ur=bt.a.useForm(),ar=Object(s.a)(ur,1),Zt=ar[0],$t=Object(o.useState)({}),rr=Object(s.a)($t,2),cr=rr[0],lt=rr[1],Rr=Object(o.useState)([]),jr=Object(s.a)(Rr,2),xr=jr[0],_t=jr[1],Rt=Object(o.useState)([]),Et=Object(s.a)(Rt,2),Mt=Et[0],qt=Et[1],pr=Object(o.useState)([]),er=Object(s.a)(pr,2),Ir=er[0],Hr=er[1],yr=Object(o.useState)([]),ot=Object(s.a)(yr,2),zt=ot[0],sn=ot[1],en=Object(o.useState)(),mr=Object(s.a)(en,2),Dr=mr[0],Mr=mr[1],Ft=Object(o.useState)(),Qt=Object(s.a)(Ft,2),gr=Qt[0],tr=Qt[1],gt=Object(o.useState)(),yt=Object(s.a)(gt,2),Gt=yt[0],kt=yt[1],Lr=Object(o.useState)(),an=Object(s.a)(Lr,2),ln=an[0],Or=an[1],tn=Object(o.useState)(),Fr=Object(s.a)(tn,2),pn=Fr[0],Xr=Fr[1];Object(o.useEffect)(function(){mn()},[]),Object(o.useEffect)(function(){Object(i.a)(l.a.mark(function $e(){var Ke;return l.a.wrap(function(pt){for(;;)switch(pt.prev=pt.next){case 0:if(St){pt.next=2;break}return pt.abrupt("return");case 2:return pt.next=4,Qn(St);case 4:Ke=pt.sent,Hr(Ke==null?void 0:Ke.departments);case 6:case"end":return pt.stop()}},$e)}))()},[St]);var mn=function(){var $e=Object(i.a)(l.a.mark(function Ke(){var qe;return l.a.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:return Dt.next=2,ht({type:"account/getSchoolOption"});case 2:qe=Dt.sent,_t(qe==null?void 0:qe.schools);case 4:case"end":return Dt.stop()}},Ke)}));return function(){return $e.apply(this,arguments)}}(),Qn=function(Ke){return ht({type:"account/getDepartmentOption",payload:{id:Ke}})};Object(o.useEffect)(function(){if(!It.basicInfo)return;var $e=It.basicInfo,Ke={identity:$e.identity,school:$e.school_name,department:$e.department_name,studentNo:$e.student_id,jobTitle:$e.identity=="teacher"?$e.technical_title:"\u6559\u6388",manager:$e.identity=="professional"?$e.technical_title:"\u4F01\u4E1A\u7BA1\u7406\u8005"};Zt.setFieldsValue(Ke),lt(Ke)},[It.basicInfo]);var ke=function(){Or(!0)},Xe=function(){if(!xr.find(function(Ke){return Ke.name===cr.school})){a.b.info("\u8BF7\u5148\u9009\u62E9\u6B63\u786E\u7684\u5355\u4F4D\u6216\u8005\u5B66\u6821\uFF01");return}Xr(!0)},Je=function(Ke){if(lt(Object(k.a)({},Zt.getFieldsValue())),"school"in Ke){qt(xr.filter(function(pt){return pt.name.includes(Ke.school)}));var qe=(xr.find(function(pt){return pt.name===Ke.school})||{}).id;qe?Ue(Ke.school):(Zt.setFieldsValue({department:""}),lt(Object(k.a)(Object(k.a)({},cr),{school:Ke.school,department:""})))}},Ue=function(){var $e=Object(i.a)(l.a.mark(function Ke(qe,pt){var Dt,jt,Yt,Pr,Qr,$r;return l.a.wrap(function(zr){for(;;)switch(zr.prev=zr.next){case 0:return Pr=(Dt=xr.find(function(rn){return rn.name===qe}))===null||Dt===void 0?void 0:Dt.id,zr.next=3,Qn(Pr);case 3:if(zr.t0=zr.sent,zr.t0){zr.next=6;break}zr.t0={};case 6:Qr=zr.t0,Hr(Qr==null?void 0:Qr.departments),$r=pt||(Qr==null||((jt=Qr.departments)===null||jt===void 0||((Yt=jt[0])===null||Yt===void 0))?void 0:Yt.name),Zt.setFieldsValue({department:$r}),lt(Object(k.a)(Object(k.a)({},cr),{school:qe,department:$r}));case 11:case"end":return zr.stop()}},Ke)}));return function(qe,pt){return $e.apply(this,arguments)}}(),_e=function(){var $e=Object(i.a)(l.a.mark(function Ke(qe){return l.a.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:return Dt.next=2,mn();case 2:Zt.setFieldsValue({school:qe,department:""}),lt(Object(k.a)(Object(k.a)({},cr),{school:qe,department:""}));case 4:case"end":return Dt.stop()}},Ke)}));return function(qe){return $e.apply(this,arguments)}}(),De=function(Ke){if(Ke.file.status==="uploading"){kt(!0);return}if(Ke.file.status==="done"){var qe;console.log(Ke.file,Ke.file.response),tr((qe=Ke.file.response)===null||qe===void 0?void 0:qe.id),Object(Wt.D)(Ke.file.originFileObj,function(pt){Mr(pt),kt(!1)})}},Se=function(){var $e=Object(i.a)(l.a.mark(function Ke(qe){var pt,Dt,jt,Yt,Pr,Qr,$r,qr,zr,rn,nn,vn,un,kn,hn,Nr;return l.a.wrap(function(on){for(;;)switch(on.prev=on.next){case 0:if(Pr=qe||{},Qr=Pr.school,$r=Pr.department,qr=Pr.identity,zr=Pr.studentNo,rn=Pr.jobTitle,nn=Pr.manager,Dr){on.next=4;break}return a.b.info("\u8BF7\u5148\u4E0A\u4F20\u7167\u7247\uFF01"),on.abrupt("return");case 4:return vn=(pt=xr.find(function(gn){return gn.name===Qr}))===null||pt===void 0?void 0:pt.id,un=(Dt=Ir.find(function(gn){return gn.name===$r}))===null||Dt===void 0?void 0:Dt.id,qr==="student"?kn=zr:qr==="teacher"?kn=rn:kn=nn,on.next=9,ht({type:"account/applyProfessionalAuth",payload:{id:((jt=It.basicInfo)===null||jt===void 0?void 0:jt.id)||((Yt=Lt.userInfo)===null||Yt===void 0?void 0:Yt.login),school_id:vn,department_id:un,identity:qr,extra:kn,attachment_ids:[gr]}});case 9:hn=on.sent,je(),hn&&(a.b.info("\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5BA1\u6838!"),ht({type:"account/getBasicInfo",payload:{login:(Nr=Lt.userInfo)===null||Nr===void 0?void 0:Nr.login}}));case 12:case"end":return on.stop()}},Ke)}));return function(qe){return $e.apply(this,arguments)}}(),je=function(){ht({type:"account/setActionTabs",payload:{}})},Ge={data:{type:"professional"},multiple:!0,showUploadList:!1,action:"".concat(K.a.API_SERVER,"/api/attachments.json"),className:Ot.a.uploader,onChange:De,beforeUpload:function(Ke){var qe=Ke.type==="image/jpeg"||Ke.type==="image/png"||Ke.type==="image/jpg"||Ke.type==="image/bmp";return qe||a.b.info("\u8BF7\u4E0A\u4F20\u6B63\u786E\u6587\u4EF6\u683C\u5F0F"),qe}};return r.a.createElement(C.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,className:Ot.a.modal,visible:It.actionTabs.key==="Account-ProfessionalAuth",title:r.a.createElement("div",null,r.a.createElement("i",{className:"iconfont icon-zhiyerenzheng font18 mr5 ".concat(Ot.a.colorBlue)}),"\u804C\u4E1A\u8BA4\u8BC1"),width:"660px",footer:null},r.a.createElement(t.a,{spinning:!!Gt},r.a.createElement(bt.a,{className:Ot.a.formWrap,form:Zt,layout:"horizontal",onValuesChange:Je,onFinish:Se},r.a.createElement(A.a,{gutter:[10,0]},r.a.createElement(ut.a,{flex:"300px"},r.a.createElement(bt.a.Item,{label:"\u804C\u4E1A",name:"identity",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u4E1A"}]},r.a.createElement(me.a,null,r.a.createElement(_r,{value:"teacher"},"\u6559\u5E08"),r.a.createElement(_r,{value:"student"},"\u5B66\u751F"),r.a.createElement(_r,{value:"professional"},"\u4E13\u4E1A\u4EBA\u58EB")))),cr.identity==="student"&&r.a.createElement(ut.a,{flex:"200px"},r.a.createElement(bt.a.Item,{initialValue:cr.studentNo,name:"studentNo",rules:[{required:!0,message:"\u8BF7\u5148\u8F93\u5165\u5B66\u53F7"}]},r.a.createElement(U.a,{type:"text",placeholder:"\u8BF7\u8F93\u5165\u5B66\u53F7"}))),cr.identity==="teacher"&&r.a.createElement(ut.a,{flex:"200px"},r.a.createElement(bt.a.Item,{initialValue:cr.jobTitle,name:"jobTitle",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u79F0"}]},r.a.createElement(me.a,null,r.a.createElement(_r,{value:"\u6559\u6388"},"\u6559\u6388"),r.a.createElement(_r,{value:"\u526F\u6559\u6388"},"\u526F\u6559\u6388"),r.a.createElement(_r,{value:"\u8BB2\u5E08"},"\u8BB2\u5E08"),r.a.createElement(_r,{value:"\u52A9\u6559"},"\u52A9\u6559")))),cr.identity==="professional"&&r.a.createElement(ut.a,{flex:"200px"},r.a.createElement(bt.a.Item,{initialValue:cr.manager,name:"manager",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u79F0"}]},r.a.createElement(me.a,null,r.a.createElement(_r,{value:"\u4F01\u4E1A\u7BA1\u7406\u8005"},"\u4F01\u4E1A\u7BA1\u7406\u8005"),r.a.createElement(_r,{value:"\u90E8\u95E8\u7BA1\u7406\u8005"},"\u90E8\u95E8\u7BA1\u7406\u8005"),r.a.createElement(_r,{value:"\u9AD8\u7EA7\u5DE5\u7A0B\u5E08"},"\u9AD8\u7EA7\u5DE5\u7A0B\u5E08"),r.a.createElement(_r,{value:"\u5DE5\u7A0B\u5E08"},"\u5DE5\u7A0B\u5E08"),r.a.createElement(_r,{value:"\u52A9\u7406\u5DE5\u7A0B\u5E08"},"\u52A9\u7406\u5DE5\u7A0B\u5E08"))))),r.a.createElement(bt.a.Item,{label:"\u9662\u7CFB/\u90E8\u95E8",name:"department",extra:cr.department&&!(Ir!=null&&Ir.find(function($e){return $e.name===cr.department}))&&r.a.createElement("div",{className:Ot.a.schoolHintWrap},r.a.createElement("span",{className:Ot.a.colorCDCDCD},cr.department?"\u672A\u627E\u5230\u5305\u542B\u201C".concat(cr.department,"\u201D\u7684\u9AD8\u6821\uFF0C"):"\u672A\u627E\u5230\u9662\u7CFB\uFF0C"),r.a.createElement("span",{className:"".concat(Ot.a.color0152d9," current"),onClick:Xe},"\u7533\u8BF7\u65B0\u589E")),rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u9662\u7CFB/\u90E8\u95E8"}]},r.a.createElement(fn.a,{showSearch:!0,onChange:function(Ke){return sn(Ir.filter(function(qe){return qe.name.includes(Ke)}))},options:zt==null?void 0:zt.map(function($e){return{value:$e.name}})})),r.a.createElement(bt.a.Item,{label:"\u804C\u4E1A\u8BC1\u4E0A\u4F20"},r.a.createElement("div",{className:Ot.a.flexRow},r.a.createElement("div",{className:"".concat(Ot.a.flexColumn," ").concat(Ot.a.example)},r.a.createElement("span",{className:Ot.a.exampleImg},r.a.createElement("img",{src:Vt.a})),r.a.createElement("span",{className:"tc"},r.a.createElement("p",null,"\u793A\u4F8B\u56FE\u7247"),r.a.createElement("p",{className:"".concat(Ot.a.colorOrange," font12")},"\uFF08png/jpg/bmp\u683C\u5F0F\uFF0C\u4E0D\u8D85\u8FC72MB\uFF09"))),r.a.createElement("div",{className:Ot.a.flexColumn},r.a.createElement(mi,Object(Me.a)({},Ge,{accept:".png,.jpg,.bmp,.jpeg"}),Dr?r.a.createElement("img",{src:Dr,className:Ot.a.uploadImg}):r.a.createElement("div",{className:Ot.a.imageTip},r.a.createElement("p",null,r.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(Ot.a.uploadTipIcon)})),r.a.createElement("p",{className:Ot.a.uploadTip},r.a.createElement("a",{className:Ot.a.color05101a},"\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u56FE\u7247")))),r.a.createElement("span",{className:"tc"},r.a.createElement("p",{className:Ot.a.viewLargerImg},"\u67E5\u770B\u5927\u56FE"))))),r.a.createElement("div",{className:Ot.a.footerWrap},r.a.createElement(bt.a.Item,null,r.a.createElement(S.a,{className:"mr5",size:"large",onClick:je},"\u53D6\u6D88"),r.a.createElement(S.a,{size:"large",type:"primary",htmlType:"submit",loading:Ht["account/applyProfessionalAuth"]},"\u4FDD\u5B58"))),r.a.createElement("div",{className:Ot.a.note},r.a.createElement("p",null,"\u8BA4\u8BC1\u987B\u77E5\uFF1A"),r.a.createElement("p",null,"1.\u6839\u636E\u804C\u4E1A\u4E0A\u4F20\u76F8\u5E94\u7684\u8BC1\u4EF6\u7167\uFF1A\u6559\u5E08\uFF08\u6559\u5E08\u8BC1\uFF09\uFF0C\u4E13\u4E1A\u4EBA\u58EB\uFF08\u5458\u5DE5\u8BC1\uFF09\u3001\u5B66\u751F\uFF08\u5B66\u751F\u8BC1\uFF09\uFF0C\u8BF7\u786E\u4FDD\u8BC1\u4EF6\u7167\u5185\u5BB9\u5B8C\u6574\u5E76\u4E14\u6E05\u6670\u53EF\u89C1\uFF0C\u4E25\u7981PS\uFF1B"),r.a.createElement("p",null,"2.\u6211\u4EEC\u5C06\u5728\u4F60\u63D0\u4EA4\u804C\u4E1A\u8BC1\u4FE1\u606F\u540E\u768424\u5C0F\u65F6\uFF08\u4E0D\u5305\u542B\u8282\u5047\u65E5\uFF09\u5185\u5B8C\u6210\u5BA1\u6838\uFF0C\u5BA1\u6838\u7ED3\u679C\u5C06\u4F1A\u4EE5\u7CFB\u7EDF\u6D88\u606F\u7684\u5F62\u5F0F\u53D1\u9001\u7ED9\u4F60\uFF1B"),r.a.createElement("p",null,"3.\u804C\u4E1A\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u65E0\u6CD5\u5220\u9664\uFF0C\u8BF7\u8C28\u614E\u586B\u5199\uFF1B\u804C\u4E1A\u53D8\u66F4\u8BF7\u9009\u62E9\u91CD\u65B0\u8BA4\u8BC1\uFF1B"),r.a.createElement("p",null,"4.\u804C\u4E1A\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u7CFB\u7EDF\u5C06\u81EA\u52A8\u53D1\u653E500\u4E2A\u91D1\u5E01\u4F5C\u4E3A\u5956\u52B1\uFF1B"),r.a.createElement("p",null,"5.\u6211\u4EEC\u4F1A\u786E\u4FDD\u4F60\u6240\u63D0\u4F9B\u7684\u4FE1\u606F\u5747\u5904\u4E8E\u4E25\u683C\u7684\u4FDD\u5BC6\u72B6\u6001\uFF0C\u4E0D\u4F1A\u6CC4\u9732\uFF1B"),r.a.createElement("p",null,"6.\u5982\u5B58\u5728\u6076\u610F\u4E71\u586B\u5199\u59D3\u540D\uFF0C\u5B66\u53F7\uFF0C\u53CA\u4E0A\u4F20\u4E0E\u804C\u4E1A\u8BC1\u4EF6\u65E0\u5173\u56FE\u7247\u8005\uFF0C\u4E00\u7ECF\u53D1\u73B0\u5C06\u51BB\u7ED3",!(Kt!=null&&(mt=Kt.setting)!==null&&mt!==void 0&&mt.is_local)&&"EduCoder","\u8D26\u53F7\u3002"),r.a.createElement("p",null,"7.\u975E\u8001\u5E08\u8EAB\u4EFD\u63D0\u4EA4\u804C\u4E1A\u8BA4\u8BC1\u540E\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u5C06\u72B6\u6001\u6539\u4E3A\u5DF2\u8BA4\u8BC1\uFF0C\u4F60\u5C06\u53EF\u4EE5\u4F53\u9A8C\u5E73\u53F0\u9700\u8981\u804C\u4E1A\u8BA4\u8BC1\u7684\u529F\u80FD\uFF1B\u5982\u679C\u5728\u8BA4\u8BC1\u540E\u7684\u4F7F\u7528\u8FC7\u7A0B\u4E2D\u672A\u901A\u8FC7\u5BA1\u6838\uFF0C\u4F60\u5C06\u4E0D\u80FD\u7EE7\u7EED\u4F53\u9A8C\u9700\u8981\u8BA4\u8BC1\u7684\u529F\u80FD\u3002")))),r.a.createElement(Nt,{visible:ln,onClose:function(){return Or(!1)},schoolName:cr.school,onSuccess:_e}),r.a.createElement(Pn,{visible:pn,onClose:function(){return Xr(!1)},schoolId:(wt=xr.find(function($e){return $e.name===cr.school}))===null||wt===void 0?void 0:wt.id,schoolName:cr.school,departmentName:cr.department,onSuccess:function(Ke){return Ue(cr.school,Ke)}}))},Di=Object(p.a)(function(xt){var rt=xt.user,mt=xt.account,wt=xt.loading,Lt=xt.globalSetting;return{user:rt,account:mt,globalSetting:Lt,loading:wt.effects}})(xi),wi=D("aCH8"),le=D.n(wi);function V(xt){var rt=xt.type,mt=xt.dispatch,wt=xt.userid,Lt=xt.isshow,It=xt.setPhoneshow,Kt=xt.setEmailshow,Ht="79e33abd4b6588941ab7622aed1e67e8",ht=Object(o.useState)(""),St=Object(s.a)(ht,2),At=St[0],ur=St[1],ar=Object(o.useState)("\u83B7\u53D6\u9A8C\u8BC1\u7801"),Zt=Object(s.a)(ar,2),$t=Zt[0],rr=Zt[1],cr=Object(o.useState)(60),lt=Object(s.a)(cr,2),Rr=lt[0],jr=lt[1],xr=Object(o.useState)(!1),_t=Object(s.a)(xr,2),Rt=_t[0],Et=_t[1],Mt=Object(o.useState)(""),qt=Object(s.a)(Mt,2),pr=qt[0],er=qt[1];function Ir(){return Hr.apply(this,arguments)}function Hr(){return Hr=Object(i.a)(l.a.mark(function mr(){var Dr;return l.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:if(At){Ft.next=3;break}return rt===3?a.b.info("\u624B\u673A\u53F7\u4E0D\u80FD\u4E3A\u7A7A"):a.b.info("\u90AE\u7BB1\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A"),Ft.abrupt("return");case 3:return Ft.next=5,mt({type:"competitions/getVerification",payload:{type:rt,login:At,smscode:le()(Ht+At)}});case 5:Dr=Ft.sent,Dr.status===1&&(a.b.info("\u83B7\u53D6\u9A8C\u8BC1\u7801\u6210\u529F"),yr(),Et(!0));case 7:case"end":return Ft.stop()}},mr)})),Hr.apply(this,arguments)}function yr(){jr(60);var mr=setInterval(function(){--Rr,Rr>-1?jr(Rr):(clearInterval(mr),Et(!1))},1e3)}function ot(){return zt.apply(this,arguments)}function zt(){return zt=Object(i.a)(l.a.mark(function mr(){var Dr;return l.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return Ft.next=2,mt({type:"competitions/PhoneBind",payload:{userid:wt,code:pr,phone:At}});case 2:Dr=Ft.sent,Dr.status===0&&(a.b.info("\u7ED1\u5B9A\u6210\u529F"),It("none"));case 4:case"end":return Ft.stop()}},mr)})),zt.apply(this,arguments)}function sn(){return en.apply(this,arguments)}function en(){return en=Object(i.a)(l.a.mark(function mr(){var Dr;return l.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return Ft.next=2,mt({type:"competitions/EmailBind",payload:{userid:wt,code:pr,email:At}});case 2:Dr=Ft.sent,Dr.status===0&&(a.b.info("\u7ED1\u5B9A\u6210\u529F"),Kt("none"));case 4:case"end":return Ft.stop()}},mr)})),en.apply(this,arguments)}return r.a.createElement("div",{style:{display:Lt}},r.a.createElement("p",null,r.a.createElement(U.a,{value:At,onChange:function(Dr){return ur(Dr.target.value)},placeholder:rt===3?"\u8BF7\u8F93\u5165\u624B\u673A\u53F7":"\u8BF7\u8F93\u5165\u90AE\u7BB1\u5730\u5740",style:{width:"370px"}})),r.a.createElement("span",null,r.a.createElement(U.a,{value:pr,onChange:function(Dr){return er(Dr.target.value)},placeholder:rt===3?"\u8BF7\u8F93\u5165\u624B\u673A\u83B7\u53D6\u7684\u9A8C\u8BC1\u7801":"\u8BF7\u8F93\u5165\u90AE\u7BB1\u83B7\u53D6\u7684\u9A8C\u8BC1\u7801",style:{width:"250px"}}))," ",r.a.createElement(S.a,{disabled:Rt,onClick:function(){return Ir()},type:"primary",style:{marginLeft:"20px",width:"100px"}},Rt?"\u91CD\u65B0\u53D1\u9001".concat(Rr,"s"):$t),r.a.createElement("p",{style:{marginTop:"30px",width:"370px",textAlign:"center"}},r.a.createElement(S.a,{type:"primary",style:{marginRight:"15px"},onClick:function(){if(!pr){a.b.info("\u9A8C\u8BC1\u7801\u4E0D\u80FD\u4E3A\u7A7A");return}rt===3?ot():sn()}},"\u786E\u8BA4"),r.a.createElement(S.a,{style:{marginLeft:"20px"},onClick:function(){rt===3?It("none"):Kt("none")}},"\u53D6\u6D88")))}var $=V;function te(xt){var rt=xt.dispatch,mt=xt.userid,wt={wrapperCol:{offset:3,span:21}},Lt=bt.a.useForm(),It=Object(s.a)(Lt,1),Kt=It[0],Ht=Object(x.i)(),ht=Ht.identifier;return r.a.createElement("div",{style:{width:"500px"}},r.a.createElement(bt.a,{form:Kt,name:"basic"},r.a.createElement(bt.a.Item,Object(Me.a)({},wt,{label:r.a.createElement("div",{style:{width:"30px"}},"\u5F00\u6237\u884C"),name:"bank",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5F00\u6237\u884C"}]}),r.a.createElement(U.a,null)),r.a.createElement(bt.a.Item,Object(Me.a)({},wt,{label:r.a.createElement("div",{style:{width:"30px"}},"\u652F\u884C"),name:"second_bank",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u652F\u884C"}]}),r.a.createElement(U.a,null)),r.a.createElement(bt.a.Item,Object(Me.a)({},wt,{label:r.a.createElement("div",{style:{width:"30px"}},"\u8D26\u53F7"),name:"card_no",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8D26\u53F7"}]}),r.a.createElement(U.a,null)),r.a.createElement(bt.a.Item,null,r.a.createElement(S.a,{type:"primary",htmlType:"submit",onClick:Object(i.a)(l.a.mark(function St(){return l.a.wrap(function(ur){for(;;)switch(ur.prev=ur.next){case 0:Kt.validateFields().then(function(){var ar=Object(i.a)(l.a.mark(function Zt($t){var rr;return l.a.wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:return lt.next=2,rt({type:"competitions/setleader",payload:Object(k.a)({identifier:ht,user_id:mt},$t)});case 2:rr=lt.sent,rr.status===0&&a.b.info("\u63D0\u4EA4\u6210\u529F");case 4:case"end":return lt.stop()}},Zt)}));return function(Zt){return ar.apply(this,arguments)}}());case 1:case"end":return ur.stop()}},St)}))},"\u63D0\u4EA4"))))}var ye=te,oe={teacher:"\u6559\u5E08",student:"\u5B66\u751F",professional:"\u4E13\u4E1A\u4EBA\u58EB"};function Ve(xt){var rt,mt,wt,Lt,It,Kt,Ht,ht,St=xt.Prize,At=xt.Accounts,ur=xt.dispatch,ar=xt.userid,Zt=Object(o.useState)("none"),$t=Object(s.a)(Zt,2),rr=$t[0],cr=$t[1],lt=Object(o.useState)("none"),Rr=Object(s.a)(lt,2),jr=Rr[0],xr=Rr[1];function _t(Et){return Rt.apply(this,arguments)}function Rt(){return Rt=Object(i.a)(l.a.mark(function Et(Mt){var qt;return l.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:if(!(Mt==="1")){er.next=6;break}return er.next=3,ur({type:"competitions/Authentication"});case 3:qt=er.sent,er.next=9;break;case 6:return er.next=8,ur({type:"competitions/Professional"});case 8:qt=er.sent;case 9:qt.status===0&&a.b.info("\u64A4\u9500\u6210\u529F");case 10:case"end":return er.stop()}},Et)})),Rt.apply(this,arguments)}return r.a.createElement("div",null,r.a.createElement("p",null,r.a.createElement("span",{style:{color:"red"}},"*"),r.a.createElement("span",{style:{fontSize:"16px"}},"\u5B9E\u540D\u4FE1\u606F"),(At==null?void 0:At.authentication)==="uncertified"?r.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px"}},"\u901A\u8FC7\u5B9E\u540D\u8BA4\u8BC1\u540E\u624D\u80FD\u83B7\u5F97\u8BC1\u4E66"):null,(At==null?void 0:At.authentication)==="uncertified"?r.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9",cursor:"pointer"},onClick:function(){ur({type:"account/setActionTabs",payload:{key:"Account-RealNameAuth"}})}},"\u7ACB\u5373\u8BA4\u8BC1"):null),r.a.createElement("div",{style:{padding:"20px"}},r.a.createElement("p",null,"\u59D3\u540D\uFF1A",r.a.createElement("span",null,At==null?void 0:At.name),(At==null?void 0:At.authentication)==="uncertified"?null:(At==null?void 0:At.authentication)==="applying"?r.a.createElement("span",null,r.a.createElement("span",null,"\u5F85\u5BA1\u6838"),r.a.createElement(S.a,{type:"primary",onClick:function(){return _t("1")},ghost:!0,style:{marginLeft:"20px"}},"\u64A4\u9500\u8BA4\u8BC1")):r.a.createElement("span",{style:{color:"#6ec76e"}},r.a.createElement("span",{className:"iconfont icon-wancheng font-14 ml20"})," ","\u5DF2\u8BA4\u8BC1")),r.a.createElement("p",null,"\u6027\u522B\uFF1A",r.a.createElement("span",null,(At==null?void 0:At.gender)===0?"\u7537":"\u5973"))),r.a.createElement("p",null,r.a.createElement("span",{style:{color:"red"}},"*"),r.a.createElement("span",{style:{fontSize:"16px"}},"\u804C\u4E1A\u4FE1\u606F"),(At==null?void 0:At.authentication)==="uncertified"?r.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px"}},"\u901A\u8FC7\u5B9E\u540D\u8BA4\u8BC1\u540E\u624D\u80FD\u83B7\u5F97\u8BC1\u4E66"):null,(At==null?void 0:At.authentication)==="uncertified"?r.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9"},onClick:function(){ur({type:"account/setActionTabs",payload:{key:"Account-ProfessionalAuth"}})}},"\u7ACB\u5373\u8BA4\u8BC1"):null),r.a.createElement("div",{style:{padding:"20px"}},r.a.createElement("p",null,"\u804C\u4E1A\uFF1A",r.a.createElement("span",null,At&&At.identity&&oe[At.identity]),(At==null?void 0:At.authentication)==="uncertified"?null:(At==null?void 0:At.authentication)==="applying"?r.a.createElement("span",null,r.a.createElement("span",null,"\u5F85\u5BA1\u6838"),r.a.createElement(S.a,{type:"primary",onClick:function(){return _t("2")},ghost:!0,style:{marginLeft:"20px"}},"\u64A4\u9500\u8BA4\u8BC1")):r.a.createElement("span",{style:{color:"#6ec76e"}},r.a.createElement("span",{className:"iconfont icon-wancheng font-12 ml20"}),r.a.createElement("span",null,"\u5DF2\u8BA4\u8BC1"),r.a.createElement(S.a,{type:"primary",onClick:function(){ur({type:"account/setActionTabs",payload:{key:"Account-ProfessionalAuth"}})},ghost:!0,style:{marginLeft:"20px"}},"\u91CD\u65B0\u8BA4\u8BC1"))),r.a.createElement("p",null,"\u5B66\u53F7\uFF1A",r.a.createElement("span",null,(At==null?void 0:At.student_id)||"--")),r.a.createElement("p",null,"\u5B66\u6821\uFF1A",r.a.createElement("span",null,(At==null?void 0:At.school_name)||"--")),r.a.createElement("p",null,"\u9662\u7CFB\uFF1A",r.a.createElement("span",null,(At==null?void 0:At.department_name)||"--"))),r.a.createElement("p",null,r.a.createElement("span",{style:{color:"red"}},"*"),r.a.createElement("span",{style:{fontSize:"16px"}},"\u8054\u7CFB\u65B9\u5F0F")),r.a.createElement("div",{style:{padding:"20px"}},r.a.createElement("p",{style:{display:"flex"}},r.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u624B\u673A\u53F7\uFF1A"),r.a.createElement("span",{style:{width:"150px"}},(At==null?void 0:At.phone)||"--"),rr==="none"?r.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){cr("block")}},"\u66F4\u6362"):null),r.a.createElement($,{type:3,dispatch:ur,userid:At==null?void 0:At.id,isshow:rr,setPhoneshow:cr,setEmailshow:xr}),r.a.createElement("p",{style:{display:"flex"}},r.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"Email\uFF1A"),r.a.createElement("span",{style:{width:"150px"}},(At==null?void 0:At.mail)||"--"),jr==="none"?r.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){xr("block")}},"\u66F4\u6362"):null),r.a.createElement($,{type:4,dispatch:ur,userid:At==null?void 0:At.id,isshow:jr,setEmailshow:xr,setPhoneshow:cr})),St!=null&&St.leader&&St!==null&&St!==void 0&&St.teams&&St!==null&&St!==void 0&&(rt=St.teams[0])!==null&&rt!==void 0&&(mt=rt.bank_account)!==null&&mt!==void 0&&mt.bank?r.a.createElement("p",null,r.a.createElement("span",{style:{fontSize:"16px"}},"\u7B7E/\u9886/\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7"),r.a.createElement("span",{style:{fontSize:"12px",marginLeft:"20px"}},"\u4E3A\u4FDD\u969C\u5956\u91D1\u7684\u53CA\u65F6\u53D1\u653E\uFF0C\u8BF7\u961F\u957F\u5982\u5B9E\u586B\u5199\u4F60\u540D\u4E0B\u7684\u94F6\u884C\u5361\u4FE1\u606F")):r.a.createElement("div",null,r.a.createElement("p",null,r.a.createElement("span",{style:{fontSize:"16px"}},"\u7B7E/\u9886/\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7"),r.a.createElement("span",{style:{fontSize:"12px",marginLeft:"20px"}},"\u4E3A\u4FDD\u969C\u5956\u91D1\u7684\u53CA\u65F6\u53D1\u653E\uFF0C\u8BF7\u961F\u957F\u5982\u5B9E\u586B\u5199\u4F60\u540D\u4E0B\u7684\u94F6\u884C\u5361\u4FE1\u606F")),r.a.createElement(ye,{dispatch:ur,userid:ar})),St!=null&&St.leader?r.a.createElement("div",{style:{padding:"20px"}},r.a.createElement("p",{style:{display:"flex"}},r.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u5F00\u6237\u884C\uFF1A"),r.a.createElement("span",null,(St==null?void 0:St.teams)&&(St==null||((wt=St.teams[0])===null||wt===void 0||((Lt=wt.bank_account)===null||Lt===void 0))?void 0:Lt.bank)||"--")),r.a.createElement("p",{style:{display:"flex"}},r.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u652F\u884C\uFF1A"),r.a.createElement("span",null,(St==null?void 0:St.teams)&&(St==null||((It=St.teams[0])===null||It===void 0||((Kt=It.bank_account)===null||Kt===void 0))?void 0:Kt.second_bank)||"--")),r.a.createElement("p",{style:{display:"flex"}},r.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u8D26\u53F7\uFF1A"),r.a.createElement("span",null,(St==null?void 0:St.teams)&&(St==null||((Ht=St.teams[0])===null||Ht===void 0||((ht=Ht.bank_account)===null||ht===void 0))?void 0:ht.card_no)||"--"))):null,r.a.createElement(Di,{Scoid:At==null?void 0:At.school_id}),r.a.createElement(bn,null))}var Tt=Ve,Xt=fe.a.TabPane;function Er(xt){var rt=xt.Prize,mt=xt.Accounts,wt=xt.getAccounts,Lt=xt.dispatch,It=xt.userid;return r.a.createElement("div",{className:"fr"},r.a.createElement("div",{className:"mb100 "},r.a.createElement(fe.a,{defaultActiveKey:"1",onChange:function(Ht){Ht==="2"&&wt()}},r.a.createElement(Xt,{tab:"\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D",key:"1"},r.a.createElement(Le,{Prize:rt})),r.a.createElement(Xt,{tab:"\u5B8C\u5584\u4E2A\u4EBA\u4FE1\u606F",key:"2"},r.a.createElement(Tt,{userid:It,dispatch:Lt,Prize:rt,Accounts:mt})))))}var Pt=Er,kr=D("xKgJ"),Gr=D("wd/R"),yn=D.n(Gr),ni=fe.a.TabPane;function ii(xt){var rt,mt,wt,Lt,It,Kt,Ht=xt.ChartRules,ht=xt.ItemData,St=xt.getCharts,At=xt.Selectkey,ur=xt.HeaderDetail,ar=xt.getChartRules,Zt=xt.userinfo,$t=xt.Editable,rr=xt.dispatch,cr=xt.StaffDetail,lt=Object(o.useState)(!1),Rr=Object(s.a)(lt,2),jr=Rr[0],xr=Rr[1],_t=Object(o.useState)(""),Rt=Object(s.a)(_t,2),Et=Rt[0],Mt=Rt[1],qt=Object(o.useState)(!0),pr=Object(s.a)(qt,2),er=pr[0],Ir=pr[1],Hr=Object(o.useState)(),yr=Object(s.a)(Hr,2),ot=yr[0],zt=yr[1],sn=Object(o.useState)(),en=Object(s.a)(sn,2),mr=en[0],Dr=en[1],Mr=Object(x.i)(),Ft=Mr.identifier;Object(o.useEffect)(function(){if(er){var gt,yt,Gt,kt,Lr=Ht==null||((gt=Ht.stages)===null||gt===void 0)?void 0:gt[0];zt(Lr);var an=Ht==null||((yt=Ht.stages)===null||yt===void 0||((Gt=yt[0])===null||Gt===void 0||((kt=Gt.children)===null||kt===void 0)))?void 0:kt[0];if(Dr(an),Lr!=null&&Lr.id){var ln,Or,tn;St(Lr==null?void 0:Lr.id),Mt(((ln=Ht.rule_contents)===null||ln===void 0||((Or=ln.filter(function(mn){return parseInt(mn.competition_stage_id)===parseInt(Lr==null?void 0:Lr.id)}))===null||Or===void 0||((tn=Or[0])===null||tn===void 0))?void 0:tn.content)||"")}else{var Fr,pn,Xr;St(0),Mt(((Fr=Ht.rule_contents)===null||Fr===void 0||((pn=Fr.filter(function(mn){return parseInt(mn.competition_stage_id)===0}))===null||pn===void 0||((Xr=pn[0])===null||Xr===void 0))?void 0:Xr.content)||"")}}},[Ht]);function Qt(){return gr.apply(this,arguments)}function gr(){return gr=Object(i.a)(l.a.mark(function gt(){var yt,Gt,kt,Lr,an,ln,Or,tn,Fr;return l.a.wrap(function(Xr){for(;;)switch(Xr.prev=Xr.next){case 0:if(Et){Xr.next=3;break}return a.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),Xr.abrupt("return");case 3:if(Ir(!1),yt=ot==null?void 0:ot.id,!yt){Xr.next=12;break}return Xr.next=8,Object(Z.a)("/api/competitions/".concat(Ft,"/update_md_content.json"),{method:"post",body:{competition_module_id:At,content:Et,md_content_id:(Gt=Ht.rule_contents)===null||Gt===void 0||((kt=Gt.filter(function(mn){return parseInt(mn.competition_stage_id)===parseInt(yt)}))===null||kt===void 0||((Lr=kt[0])===null||Lr===void 0))?void 0:Lr.id,stage_id:ot==null?void 0:ot.id}});case 8:an=Xr.sent,an.status===0&&(a.b.info("\u66F4\u65B0\u6210\u529F"),xr(!1),ar()),Xr.next=16;break;case 12:return Xr.next=14,Object(Z.a)("/api/competitions/".concat(Ft,"/update_md_content.json"),{method:"post",body:{competition_module_id:At,content:Et,md_content_id:(ln=Ht.rule_contents)===null||ln===void 0||((Or=ln.filter(function(mn){return parseInt(mn.competition_stage_id)===0}))===null||Or===void 0||((tn=Or[0])===null||tn===void 0))?void 0:tn.id,stage_id:ot==null?void 0:ot.id}});case 14:Fr=Xr.sent,Fr.status===0&&(a.b.info("\u66F4\u65B0\u6210\u529F"),xr(!1),ar());case 16:case"end":return Xr.stop()}},gt)})),gr.apply(this,arguments)}var tr=[{title:"request_id",dataIndex:"request_id",width:120,align:"center",key:"name",render:function(yt,Gt,kt){return r.a.createElement("span",null,yt)}},{title:"\u9644\u4EF6",dataIndex:"file_name",align:"center",width:150,key:"file_name",render:function(yt){return r.a.createElement(et.a,{title:yt},r.a.createElement("span",{title:yt},yt&&(yt==null?void 0:yt.length)>=10?(yt==null?void 0:yt.substr(0,10))+"...":yt||"--"))}},{title:"\u63D0\u4EA4\u4EBA",dataIndex:"user_name",key:"user_name",width:100,render:function(yt){return r.a.createElement("span",{title:yt},yt&&(yt==null?void 0:yt.length)>=6?(yt==null?void 0:yt.substr(0,6))+"...":yt||"--")}},{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",align:"center"},{title:"\u72B6\u6001",dataIndex:"status",key:"status",width:50,render:function(yt){return r.a.createElement("span",null,yt===1?"\u8BA1\u7B97\u4E2D":yt===2?"\u5B8C\u6210":yt===0?"\u5F85\u8BA1\u7B97":yt===3&&"\u9519\u8BEF")}},!(ot!=null&&ot.display_four_indicators)&&(ot==null?void 0:ot.name)==="\u8BA1\u56FE\u6311\u6218\u70ED\u8EAB\u8D5B"&&{title:"\u6570\u636E\u6307\u68071",dataIndex:"data_ranking",key:"data_ranking",align:"center",render:function(yt){return r.a.createElement("span",null,yt||"--")}},!(ot!=null&&ot.display_four_indicators)&&(ot==null?void 0:ot.name)==="\u8BA1\u56FE\u6311\u6218\u70ED\u8EAB\u8D5B"&&{title:"\u6570\u636E\u6307\u68072",dataIndex:"data_other",key:"data_other",align:"left",render:function(yt){return(yt==null?void 0:yt.length)>0?yt==null?void 0:yt.map(function(Gt,kt){return r.a.createElement("span",null,Gt==null?void 0:Gt.name,"\uFF1A",Gt==null?void 0:Gt.value," ",r.a.createElement("br",null))}):r.a.createElement("span",null,"--")}},(ot==null?void 0:ot.display_four_indicators)&&{title:"mask accuary",dataIndex:"data_ranking",key:"data_ranking",align:"left",render:function(yt){return r.a.createElement("span",null,yt||"--")}},(ot==null?void 0:ot.display_four_indicators)&&{title:"\u7F8E\u5B66\u8BC4\u5206",dataIndex:"data_other",key:"data_other",align:"left",render:function(yt){var Gt;return r.a.createElement("span",null,(yt==null||((Gt=yt.find(function(kt){return(kt==null?void 0:kt.name)==="score"}))===null||Gt===void 0)?void 0:Gt.value)||"--")}},(ot==null?void 0:ot.display_four_indicators)&&{title:"FID",dataIndex:"data_other",key:"data_other",align:"left",render:function(yt){var Gt;return r.a.createElement("span",null,(yt==null||((Gt=yt.find(function(kt){return(kt==null?void 0:kt.name)==="fid"}))===null||Gt===void 0)?void 0:Gt.value)||"--")}},(ot==null?void 0:ot.display_four_indicators)&&{title:"\u603B\u5206",dataIndex:"data_other",key:"data_other",align:"left",render:function(yt){var Gt;return r.a.createElement("span",null,(yt==null||((Gt=yt.find(function(kt){return(kt==null?void 0:kt.name)==="total_score"}))===null||Gt===void 0)?void 0:Gt.value)||"--")}},!(ot!=null&&ot.display_four_indicators)&&(ot==null?void 0:ot.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Car",dataIndex:"data_ranking",key:"data_ranking",align:"center",render:function(yt){return r.a.createElement("span",null,yt||"--")}},!(ot!=null&&ot.display_four_indicators)&&(ot==null?void 0:ot.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Coffee",dataIndex:"data_other",key:"data_other",align:"center",render:function(yt){var Gt;return r.a.createElement("span",null,(yt==null||((Gt=yt.find(function(kt){return(kt==null?void 0:kt.name)==="Coffee"}))===null||Gt===void 0)?void 0:Gt.value)||"--")}},!(ot!=null&&ot.display_four_indicators)&&(ot==null?void 0:ot.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Easyship",dataIndex:"data_other",key:"data_other",align:"center",render:function(yt){var Gt;return r.a.createElement("span",null,(yt==null||((Gt=yt.find(function(kt){return(kt==null?void 0:kt.name)==="Easyship"}))===null||Gt===void 0)?void 0:Gt.value)||"--")}},!(ot!=null&&ot.display_four_indicators)&&(ot==null?void 0:ot.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Scar",dataIndex:"data_other",key:"data_other",align:"center",render:function(yt){var Gt;return r.a.createElement("span",null,(yt==null||((Gt=yt.find(function(kt){return(kt==null?void 0:kt.name)==="Scar"}))===null||Gt===void 0)?void 0:Gt.value)||"--")}},!(ot!=null&&ot.display_four_indicators)&&(ot==null?void 0:ot.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Scarf",dataIndex:"data_other",key:"data_other",align:"center",render:function(yt){var Gt;return r.a.createElement("span",null,(yt==null||((Gt=yt.find(function(kt){return(kt==null?void 0:kt.name)==="Scarf"}))===null||Gt===void 0)?void 0:Gt.value)||"--")}},!(ot!=null&&ot.display_four_indicators)&&(ot==null?void 0:ot.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"\u603B\u5206",dataIndex:"data_other",key:"data_other",align:"center",render:function(yt){var Gt;return r.a.createElement("span",null,(yt==null||((Gt=yt.find(function(kt){return(kt==null?void 0:kt.name)==="Total"}))===null||Gt===void 0)?void 0:Gt.value)||"--")}},{title:"\u64CD\u4F5C",dataIndex:"result_url",width:50,key:"result_url",render:function(yt){return r.a.createElement("a",{href:yt,target:"_blank",download:"\u9644\u4EF6"},"\u4E0B\u8F7D")}}].filter(function(gt){return!!gt});return r.a.createElement("div",null,(Ht==null||((rt=Ht.stages)===null||rt===void 0)?void 0:rt.length)>0?null:r.a.createElement(He,null),(Ht==null||((mt=Ht.stages)===null||mt===void 0)?void 0:mt.length)>0&&r.a.createElement(fe.a,{animated:!0,tabBarExtraContent:Zt!=null&&Zt.admin||Zt!=null&&Zt.business||$t?r.a.createElement(S.a,{onClick:function(){xr(!0)}},"\u7F16\u8F91"):cr.enrolled&&(ot==null?void 0:ot.start_time)&&(ot==null?void 0:ot.end_time)&&r.a.createElement("span",null,"\u63D0\u4EA4\u65F6\u95F4\uFF1A",yn()(ot==null?void 0:ot.start_time).format("YYYY-MM-DD HH:mm:ss"),"\u81F3",yn()(ot==null?void 0:ot.end_time).format("YYYY-MM-DD HH:mm:ss"),r.a.createElement(S.a,{style:{marginLeft:"20px"},disabled:yn()(ot==null?void 0:ot.start_time).unix()>yn()(yn()().format("YYYY-MM-DD HH:mm:s")).unix()||yn()(yn()().format("YYYY-MM-DD HH:mm:s")).unix()>yn()(ot==null?void 0:ot.end_time).unix(),onClick:function(){rr({type:"shixunsDetail/setActionTabs",payload:{key:"md-tab",params:{value:(mr==null?void 0:mr.id)||(ot==null?void 0:ot.id),id:ur==null?void 0:ur.id}}})}},"\u63D0\u4EA4\u7ED3\u679C")),onChange:function(yt){var Gt,kt,Lr,an,ln;xr(!1);var Or=Ht==null||((Gt=Ht.stages)===null||Gt===void 0)?void 0:Gt.filter(function(Fr){return parseInt(yt)===parseInt(Fr==null?void 0:Fr.id)})[0],tn=Or==null||((kt=Or.children)===null||kt===void 0)?void 0:kt[0];Dr(tn),zt(Or),Mt(((Lr=Ht.rule_contents)===null||Lr===void 0||((an=Lr.filter(function(Fr){return parseInt(Fr.competition_stage_id)===parseInt(Or==null?void 0:Or.id)}))===null||an===void 0||((ln=an[0])===null||ln===void 0))?void 0:ln.content)||""),St((tn==null?void 0:tn.id)||yt)}},Ht&&Ht.stages.map(function(gt,yt){return r.a.createElement(ni,{tab:gt.name,key:gt.id===null?0:gt.id},jr===!1&&Ht&&Ht.rule_contents.map(function(Gt,kt){if(gt.id===Gt.competition_stage_id)return r.a.createElement(I.a,{key:kt,value:Gt.content===void 0||Gt.content===null?"":Gt.content});if(gt.id===null&&Gt.competition_stage_id===0)return r.a.createElement(I.a,{key:kt,value:Gt.content===void 0||Gt.content===null?"":Gt.content})}))})),(ot==null||((wt=ot.children)===null||wt===void 0)?void 0:wt.length)>0&&r.a.createElement(fe.a,{activeKey:(mr==null?void 0:mr.id)+"",onChange:function(yt){var Gt,kt=ot==null||((Gt=ot.children)===null||Gt===void 0)?void 0:Gt.filter(function(Lr){return parseInt(yt)===parseInt(Lr==null?void 0:Lr.id)})[0];Dr(kt),St(yt)}},ot==null||((Lt=ot.children)===null||Lt===void 0)?void 0:Lt.map(function(gt,yt){return r.a.createElement(ni,{tab:gt.name,key:gt.id===null?0:gt.id})})),jr&&r.a.createElement("div",null,r.a.createElement(re.a,{defaultValue:Et,onChange:function(yt){Mt(yt)}}),r.a.createElement("p",{style:{marginTop:"10px"}},r.a.createElement(S.a,{style:{width:"90px"},type:"primary",onClick:function(){return Qt()}},"\u63D0\u4EA4"),r.a.createElement(S.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return xr(!1)}},"\u53D6\u6D88"))),((It=ur.competition_modules.filter(function(gt){return gt.id===At}))===null||It===void 0||((Kt=It[0])===null||Kt===void 0)?void 0:Kt.show_leaderboard)&&r.a.createElement(X.a,{dataSource:ht==null?void 0:ht.results,columns:tr}))}var Bn=ii,Ni=D("DjyN"),Ki=D("NUBc"),Gn=fe.a.TabPane;function Ti(xt){var rt,mt,wt,Lt,It,Kt,Ht=xt.loading,ht=xt.ChartRules,St=xt.ItemData,At=xt.getCharts,ur=xt.Selectkey,ar=xt.HeaderDetail,Zt=xt.getChartRules,$t=xt.userinfo,rr=xt.Editable,cr=xt.dispatch,lt=xt.StaffDetail,Rr=Object(o.useState)(!1),jr=Object(s.a)(Rr,2),xr=jr[0],_t=jr[1],Rt=Object(o.useState)(""),Et=Object(s.a)(Rt,2),Mt=Et[0],qt=Et[1],pr=Object(o.useState)(!0),er=Object(s.a)(pr,2),Ir=er[0],Hr=er[1],yr=Object(o.useState)(),ot=Object(s.a)(yr,2),zt=ot[0],sn=ot[1],en=Object(o.useState)(),mr=Object(s.a)(en,2),Dr=mr[0],Mr=mr[1],Ft=Object(x.i)(),Qt=Ft.identifier,gr=Object(o.useState)({page:1,limit:10,sort:"desc"}),tr=Object(s.a)(gr,2),gt=tr[0],yt=tr[1];Object(o.useEffect)(function(){var kt;Ir&&ht!==null&&ht!==void 0&&(kt=ht.stages)!==null&&kt!==void 0&&kt[0]&&Gt()},[ht==null||((rt=ht.stages)===null||rt===void 0)?void 0:rt[0]]);var Gt=function(){var kt=Object(i.a)(l.a.mark(function Lr(){var an,ln,Or,tn,Fr,pn;return l.a.wrap(function(mn){for(;;)switch(mn.prev=mn.next){case 0:return Fr=ht==null||((an=ht.stages)===null||an===void 0)?void 0:an[0],sn(Fr),pn=ht==null||((ln=ht.stages)===null||ln===void 0||((Or=ln[0])===null||Or===void 0||((tn=Or.children)===null||tn===void 0)))?void 0:tn[0],Mr(pn),gt.id=(pn==null?void 0:pn.id)||(Fr==null?void 0:Fr.id),yt(Object(k.a)({},gt)),mn.next=7,At(Object(k.a)(Object(k.a)({},gt),{},{stage_id:gt.id}));case 7:case"end":return mn.stop()}},Lr)}));return function(){return kt.apply(this,arguments)}}();return r.a.createElement("div",null,(ht==null||((mt=ht.stages)===null||mt===void 0)?void 0:mt.length)>0?null:r.a.createElement(He,null),(ht==null||((wt=ht.stages)===null||wt===void 0)?void 0:wt.length)>0&&r.a.createElement(fe.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var kt=Object(i.a)(l.a.mark(function Lr(an){var ln,Or,tn,Fr,pn,Xr,mn;return l.a.wrap(function(ke){for(;;)switch(ke.prev=ke.next){case 0:return _t(!1),Xr=ht==null||((ln=ht.stages)===null||ln===void 0)?void 0:ln.filter(function(Xe){return parseInt(an)===parseInt(Xe==null?void 0:Xe.id)})[0],mn=Xr==null||((Or=Xr.children)===null||Or===void 0)?void 0:Or[0],Mr(mn),sn(Xr),qt(((tn=ht.rule_contents)===null||tn===void 0||((Fr=tn.filter(function(Xe){return parseInt(Xe.competition_stage_id)===parseInt(Xr==null?void 0:Xr.id)}))===null||Fr===void 0||((pn=Fr[0])===null||pn===void 0))?void 0:pn.content)||""),gt.page=1,gt.limit=10,gt.id=(mn==null?void 0:mn.id)||an,yt(Object(k.a)({},gt)),ke.next=9,At(Object(k.a)({},gt));case 9:case"end":return ke.stop()}},Lr)}));return function(Lr){return kt.apply(this,arguments)}}()},ht&&ht.stages.map(function(kt,Lr){return r.a.createElement(Gn,{tab:kt.name,key:kt.id===null?0:kt.id})})),(zt==null||((Lt=zt.children)===null||Lt===void 0)?void 0:Lt.length)>0&&r.a.createElement(fe.a,{activeKey:(Dr==null?void 0:Dr.id)+"",onChange:function(){var kt=Object(i.a)(l.a.mark(function Lr(an){var ln,Or;return l.a.wrap(function(Fr){for(;;)switch(Fr.prev=Fr.next){case 0:return Or=zt==null||((ln=zt.children)===null||ln===void 0)?void 0:ln.filter(function(pn){return parseInt(an)===parseInt(pn==null?void 0:pn.id)})[0],Mr(Or),gt.page=1,gt.limit=10,gt.id=an,yt(Object(k.a)({},gt)),Fr.next=5,At(Object(k.a)({},gt));case 5:case"end":return Fr.stop()}},Lr)}));return function(Lr){return kt.apply(this,arguments)}}()},zt==null||((It=zt.children)===null||It===void 0)?void 0:It.map(function(kt,Lr){return r.a.createElement(Gn,{tab:kt.name,key:kt.id===null?0:kt.id})})),r.a.createElement("div",{style:{height:10,background:"#F5F5F5"}}),r.a.createElement("div",{style:{padding:"20px 30px"}},r.a.createElement("span",{style:{cursor:"pointer",marginRight:20},onClick:function(){gt.page=1,gt.sort=gt.sort==="desc"?"asc":"desc",yt(Object(k.a)({},gt)),At(Object(k.a)({},gt))}},"\u6309\u63D0\u4EA4\u65F6\u95F4",gt.sort==="asc"?"\u6B63":"\u5012","\u5E8F\u6392\u5E8F"," ",r.a.createElement("i",{className:"iconfont font14 ".concat(gt.sort==="asc"?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",r.a.createElement(U.a.Search,{onSearch:function(Lr){gt.page=1,gt.search=Lr,yt(Object(k.a)({},gt)),At(Object(k.a)({},gt))},style:{width:"82%"},placeholder:"\u8F93\u5165\u4EBA\u5458/\u6218\u961F\u540D\u79F0\u8FDB\u884C\u641C\u7D22"}),r.a.createElement(t.a,{spinning:Ht},St==null||((Kt=St.results)===null||Kt===void 0)?void 0:Kt.map(function(kt,Lr){return r.a.createElement("div",{style:{border:"1px solid #E3EFFC",height:100,borderRadius:"2px 2px 0px 0px",marginTop:Lr===0?14:30}},r.a.createElement("div",{style:{height:60,padding:10,display:"flex",alignItems:"center"}},r.a.createElement("img",{src:K.a.IMG_SERVER+"/images/"+(kt==null?void 0:kt.image_url),style:{width:40,height:40,borderRadius:"50%"}}),r.a.createElement("div",{style:{marginLeft:10}},r.a.createElement("span",{style:{color:"#333333",fontWeight:500,fontSize:"16px"}},kt==null?void 0:kt.user_name),r.a.createElement("span",{style:{color:"#999999",fontWeight:400,fontSize:"14px",marginLeft:60}},"\u6240\u5C5E\u6218\u961F",r.a.createElement("span",{style:{marginLeft:10,color:"#333"}},(kt==null?void 0:kt.team_name)||"- -")),r.a.createElement("span",{style:{color:"#333333",fontWeight:400,fontSize:"14px",marginLeft:40}},"\u5B66\u6821"," ",r.a.createElement("span",{style:{marginLeft:10,color:"#333"}},(kt==null?void 0:kt.school_name)||"- -")))),r.a.createElement("div",{style:{background:"#EEF2F8",height:40,borderRadius:"0px 0px 2px 2px",paddingLeft:60,paddingRight:40,display:"flex",alignItems:"center",justifyContent:"space-between"}},r.a.createElement("div",null,r.a.createElement("span",{style:{color:"#666666",fontSize:"12px"}},"\u63D0\u4EA4\u65F6\u95F4\uFF1A",kt==null?void 0:kt.created_at),r.a.createElement("span",{style:{color:"#666666",fontSize:"12px",margin:"0px 40px"}},"\u6D88\u8017\u5185\u5B58\uFF1A",(kt==null?void 0:kt.ts_mem)||"- -","MB"),r.a.createElement("span",{style:{color:"#666666",fontSize:"12px"}},"\u4EE3\u7801\u6267\u884C\u65F6\u95F4\uFF1A",(kt==null?void 0:kt.ts_time)||"- -","\u79D2")),r.a.createElement("a",{style:{display:"flex",alignItems:"center"},href:"/tasks/".concat(kt==null?void 0:kt.game_identifier),target:"_blank"},r.a.createElement("i",{className:"iconfont icon-chakandaima",style:{marginRight:4}}),r.a.createElement("span",{style:{lineHeight:"14px"}},"\u67E5\u770B\u4EE3\u7801"))))})),r.a.createElement(Ki.a,{total:St==null?void 0:St.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:gt.page,onChange:function(Lr,an){gt.page=Lr,yt(Object(k.a)({},gt)),At(Object(k.a)({},gt))}})))}var Gi=Ti,Li=function(rt){var mt=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],wt=["","\u5341","\u767E","\u5343","\u4E07"];rt=parseInt(rt);var Lt=function(ht){for(var St=ht.toString().split("").reverse(),At="",ur=0;ur<St.length;ur++)At=(ur==0&&St[ur]==0||ur>0&&St[ur]==0&&St[ur-1]==0?"":mt[St[ur]]+(St[ur]==0?wt[0]:wt[ur]))+At;return At},It=Math.floor(rt/1e4),Kt=rt%1e4;return Kt.toString().length<4&&(Kt="0"+Kt),It?Lt(It)+"\u4E07"+Lt(Kt):Lt(rt)};function li(xt){var rt,mt=xt.item,wt=xt.index,Lt=xt.StaffDetail,It=Object(o.useState)(!0),Kt=Object(s.a)(It,2),Ht=Kt[0],ht=Kt[1],St=Object(o.useState)(!0),At=Object(s.a)(St,2),ur=At[0],ar=At[1],Zt=Object(o.useRef)();return r.a.createElement("div",{style:{border:"1px solid #E3EFFC",borderRadius:"2px",marginTop:20}},r.a.createElement("div",{style:{padding:10,display:"flex",position:"relative"}},r.a.createElement("img",{src:K.a.IMG_SERVER+"/"+(mt==null?void 0:mt.pic),style:{width:220,height:130,borderRadius:"4px"}}),r.a.createElement("div",{style:{marginLeft:20,width:"75%"}},r.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},r.a.createElement("span",{style:{color:"#333333",fontWeight:500,fontSize:"16px"}},"\u4EFB\u52A1",Li(wt+1),"\uFF1A",r.a.createElement("span",{style:{color:"#333",fontWeight:"400"}},mt==null?void 0:mt.name)),r.a.createElement("span",{style:{color:"#9096A3"}},"\u5173\u5361",r.a.createElement("span",{style:{color:"#333333",marginLeft:5}},mt==null?void 0:mt.challenges_count)," ")),r.a.createElement("div",{ref:Zt},r.a.createElement(I.a,{style:{maxHeight:Ht&&100},value:mt==null?void 0:mt.description})),r.a.createElement("div",{style:{textAlign:"center",color:"#145DFF",cursor:"pointer"},onClick:function(){ht(!Ht)}},Ht?"\u9605\u8BFB\u5168\u6587 ":"\u6536\u8D77\u5168\u6587 ",r.a.createElement("i",{className:"iconfont font14 ".concat(Ht?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")})),r.a.createElement("div",{style:{marginTop:14,maxHeight:ur&&58,overflow:"hidden"}},mt==null||((rt=mt.challenges)===null||rt===void 0)?void 0:rt.map(function($t,rr){return r.a.createElement("div",{style:{marginTop:rr===0?0:12}},r.a.createElement("i",{className:"iconfont icon-shixunti2 c-light-primary font20"}),r.a.createElement("span",{style:{marginLeft:10}},"\u7B2C",rr+1,"\u5173",$t==null?void 0:$t.name))})),r.a.createElement("div",{style:{position:"absolute",bottom:14,right:10,color:"#145DFF",cursor:"pointer"}},r.a.createElement("span",{onClick:function(){ar(!ur)}},ur?"\u5C55\u5F00":"\u6536\u8D77"," ",r.a.createElement("i",{className:"iconfont font14 ".concat(ur?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",(Lt==null?void 0:Lt.enrolled)&&r.a.createElement(S.a,{onClick:function(){window.open("/shixuns/".concat(mt==null?void 0:mt.identifier,"/challenges"))},style:{marginLeft:30},type:"primary"},"\u5F00\u542F\u6311\u6218")))))}var ea=li,Vi=fe.a.TabPane;function ta(xt){var rt,mt,wt,Lt,It,Kt,Ht=xt.loading,ht=xt.ChartRules,St=xt.ItemData,At=xt.getCharts,ur=xt.Selectkey,ar=xt.HeaderDetail,Zt=xt.getChartRules,$t=xt.userinfo,rr=xt.Editable,cr=xt.dispatch,lt=xt.StaffDetail,Rr=Object(o.useState)(!1),jr=Object(s.a)(Rr,2),xr=jr[0],_t=jr[1],Rt=Object(o.useState)(""),Et=Object(s.a)(Rt,2),Mt=Et[0],qt=Et[1],pr=Object(o.useState)(!0),er=Object(s.a)(pr,2),Ir=er[0],Hr=er[1],yr=Object(o.useState)(),ot=Object(s.a)(yr,2),zt=ot[0],sn=ot[1],en=Object(o.useState)(),mr=Object(s.a)(en,2),Dr=mr[0],Mr=mr[1],Ft=Object(x.i)(),Qt=Ft.identifier,gr=Object(o.useState)({page:1,limit:10}),tr=Object(s.a)(gr,2),gt=tr[0],yt=tr[1],Gt=Object(o.useState)(),kt=Object(s.a)(Gt,2),Lr=kt[0],an=kt[1];Object(o.useEffect)(function(){var Or;Ir&&ht!==null&&ht!==void 0&&(Or=ht.stages)!==null&&Or!==void 0&&Or[0]&&ln()},[ht==null||((rt=ht.stages)===null||rt===void 0)?void 0:rt[0]]);var ln=function(){var Or=Object(i.a)(l.a.mark(function tn(){var Fr,pn,Xr,mn,Qn,ke;return l.a.wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:return Qn=ht==null||((Fr=ht.stages)===null||Fr===void 0)?void 0:Fr[0],sn(Qn),ke=ht==null||((pn=ht.stages)===null||pn===void 0||((Xr=pn[0])===null||Xr===void 0||((mn=Xr.children)===null||mn===void 0)))?void 0:mn[0],Mr(ke),gt.id=(ke==null?void 0:ke.id)||(Qn==null?void 0:Qn.id),yt(Object(k.a)({},gt)),Je.next=7,At(Object(k.a)(Object(k.a)({},gt),{},{stage_id:gt.id}));case 7:case"end":return Je.stop()}},tn)}));return function(){return Or.apply(this,arguments)}}();return r.a.createElement("div",null,(ht==null||((mt=ht.stages)===null||mt===void 0)?void 0:mt.length)>0?null:r.a.createElement(He,null),(ht==null||((wt=ht.stages)===null||wt===void 0)?void 0:wt.length)>0&&r.a.createElement(fe.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var Or=Object(i.a)(l.a.mark(function tn(Fr){var pn,Xr,mn,Qn,ke,Xe,Je;return l.a.wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:return _t(!1),Xe=ht==null||((pn=ht.stages)===null||pn===void 0)?void 0:pn.filter(function(De){return parseInt(Fr)===parseInt(De==null?void 0:De.id)})[0],Je=Xe==null||((Xr=Xe.children)===null||Xr===void 0)?void 0:Xr[0],Mr(Je),sn(Xe),qt(((mn=ht.rule_contents)===null||mn===void 0||((Qn=mn.filter(function(De){return parseInt(De.competition_stage_id)===parseInt(Xe==null?void 0:Xe.id)}))===null||Qn===void 0||((ke=Qn[0])===null||ke===void 0))?void 0:ke.content)||""),gt.page=1,gt.limit=10,gt.id=(Je==null?void 0:Je.id)||Fr,yt(Object(k.a)({},gt)),_e.next=9,At(Object(k.a)({},gt));case 9:case"end":return _e.stop()}},tn)}));return function(tn){return Or.apply(this,arguments)}}()},ht&&ht.stages.map(function(Or,tn){return r.a.createElement(Vi,{tab:Or.name,key:Or.id===null?0:Or.id})})),(zt==null||((Lt=zt.children)===null||Lt===void 0)?void 0:Lt.length)>0&&r.a.createElement(fe.a,{activeKey:(Dr==null?void 0:Dr.id)+"",tabBarStyle:{height:65,marginLeft:35,marginRight:30},onChange:function(){var Or=Object(i.a)(l.a.mark(function tn(Fr){var pn,Xr;return l.a.wrap(function(Qn){for(;;)switch(Qn.prev=Qn.next){case 0:return Xr=zt==null||((pn=zt.children)===null||pn===void 0)?void 0:pn.filter(function(ke){return parseInt(Fr)===parseInt(ke==null?void 0:ke.id)})[0],Mr(Xr),gt.page=1,gt.limit=10,gt.id=Fr,yt(Object(k.a)({},gt)),Qn.next=5,At(Object(k.a)({},gt));case 5:case"end":return Qn.stop()}},tn)}));return function(tn){return Or.apply(this,arguments)}}()},zt==null||((It=zt.children)===null||It===void 0)?void 0:It.map(function(Or,tn){return r.a.createElement(Vi,{tab:Or.name,key:Or.id===null?0:Or.id})})),r.a.createElement("div",{style:{height:10,background:"#F5F5F5"}}),r.a.createElement("div",{style:{padding:"20px 30px"}},r.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},r.a.createElement("span",{style:{color:"#9096A3"}},"\u4F5C\u54C1\u63D0\u4EA4\u65F6\u95F4",r.a.createElement("span",{style:{color:"#333333",marginLeft:5}},St==null?void 0:St.start_time,"~",St==null?void 0:St.end_time)),r.a.createElement("span",{style:{color:"#9096A3"}},"\u6210\u7EE9\u6765\u6E90",r.a.createElement("span",{style:{color:"#333333",marginLeft:5}},(St==null?void 0:St.score_source)===0?"\u7ECF\u9A8C\u503C":"\u9884\u6D4B\u51C6\u786E\u7387")," ")),r.a.createElement(t.a,{spinning:Ht},St==null||((Kt=St.results)===null||Kt===void 0)?void 0:Kt.map(function(Or,tn){return r.a.createElement(ea,{StaffDetail:lt,item:Or,index:tn})})),r.a.createElement(Ki.a,{total:St==null?void 0:St.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:gt.page,onChange:function(tn,Fr){gt.page=tn,yt(Object(k.a)({},gt)),At(Object(k.a)({},gt))}})))}var oa=ta,Pi=D("UfjD"),qn=D("qHvr"),ji=function(rt){var mt,wt,Lt,It,Kt,Ht,ht,St,At=rt.globalSetting,ur=rt.loading,ar=rt.dispatch,Zt=rt.user,$t=Object(d.a)(rt,["globalSetting","loading","dispatch","user"]),rr=Object(o.useState)({avatar_url:""}),cr=Object(s.a)(rr,2),lt=cr[0],Rr=cr[1],jr=Object(o.useState)([]),xr=Object(s.a)(jr,2),_t=xr[0],Rt=xr[1],Et=Object(x.i)(),Mt=Et.identifier,qt=Object(o.useState)([]),pr=Object(s.a)(qt,2),er=pr[0],Ir=pr[1],Hr=Object(o.useState)(!0),yr=Object(s.a)(Hr,2),ot=yr[0],zt=yr[1],sn=Object(o.useState)([]),en=Object(s.a)(sn,2),mr=en[0],Dr=en[1],Mr=Object(o.useState)([]),Ft=Object(s.a)(Mr,2),Qt=Ft[0],gr=Ft[1],tr=Object(o.useState)(!1),gt=Object(s.a)(tr,2),yt=gt[0],Gt=gt[1],kt=Object(o.useState)(!1),Lr=Object(s.a)(kt,2),an=Lr[0],ln=Lr[1],Or=Object(o.useState)(!1),tn=Object(s.a)(Or,2),Fr=tn[0],pn=tn[1],Xr=Object(o.useState)([]),mn=Object(s.a)(Xr,2),Qn=mn[0],ke=mn[1],Xe=Object(o.useState)([]),Je=Object(s.a)(Xe,2),Ue=Je[0],_e=Je[1],De=Object(o.useState)([]),Se=Object(s.a)(De,2),je=Se[0],Ge=Se[1],$e=Object(o.useState)(!1),Ke=Object(s.a)($e,2),qe=Ke[0],pt=Ke[1],Dt=Object(o.useState)([]),jt=Object(s.a)(Dt,2),Yt=jt[0],Pr=jt[1],Qr=Object(o.useState)(),$r=Object(s.a)(Qr,2),qr=$r[0],zr=$r[1],rn=Object(o.useState)(!0),nn=Object(s.a)(rn,2),vn=nn[0],un=nn[1],kn=Object(o.useState)(!1),hn=Object(s.a)(kn,2),Nr=hn[0],Ur=hn[1],on=Object(o.useState)(!1),gn=Object(s.a)(on,2),Tr=gn[0],xn=gn[1],Vn=Object(o.useState)(!1),Cn=Object(s.a)(Vn,2),jn=Cn[0],Rn=Cn[1],ei=Object(o.useState)(!1),ui=Object(s.a)(ei,2),Xn=ui[0],gi=ui[1],Xi=Object(o.useState)(!1),Si=Object(s.a)(Xi,2),ci=Si[0],Fn=Si[1],Un=Object(o.useState)(!0),Yn=Object(s.a)(Un,2),zn=Yn[0],ai=Yn[1],Ai=Object(x.h)(),ra=Object(o.useRef)(null);Object(o.useEffect)(function(){Mt&&Dn(),Object(Wt.X)("\u7ADE\u8D5B")},[Mt]);function Dn(){return Fi.apply(this,arguments)}function Fi(){return Fi=Object(i.a)(l.a.mark(function wr(){var Sr;return l.a.wrap(function(wn){for(;;)switch(wn.prev=wn.next){case 0:return wn.t0=Rt,wn.next=3,ar({type:"competitions/getStaff",payload:{identifier:Mt}});case 3:return wn.t1=wn.sent,(0,wn.t0)(wn.t1),wn.next=7,ar({type:"competitions/getHeader",payload:{identifier:Mt}});case 7:Sr=wn.sent,Rr(Sr),Object(Wt.X)((Sr==null?void 0:Sr.name)||"\u7ADE\u8D5B");case 10:case"end":return wn.stop()}},wr)})),Fi.apply(this,arguments)}Object(o.useEffect)(function(){var wr;zr(parseInt(Ai==null||((wr=Ai.query)===null||wr===void 0)?void 0:wr.type)===1)},[Ai]),Object(o.useEffect)(function(){var wr;if((lt==null||((wr=lt.competition_modules)===null||wr===void 0)?void 0:wr.length)>0){var Sr,or;if((Ai==null||((Sr=Ai.query)===null||Sr===void 0)?void 0:Sr.active)==="\u8D5B\u9898\u53D1\u5E03"){var wn,hr=lt==null||((wn=lt.competition_modules)===null||wn===void 0)?void 0:wn.find(function(pa){return pa.name==="\u8D5B\u9898\u53D1\u5E03"});if(hr){Ui(hr);return}}Ui(lt==null||((or=lt.competition_modules)===null||or===void 0)?void 0:or[0])}},[lt]);function Ui(wr){return Mn.apply(this,arguments)}function Mn(){return Mn=Object(i.a)(l.a.mark(function wr(Sr){var or;return l.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:if(Ge(Sr.id),je=Sr.id,Dr(Sr),!(Sr.module_type==="entrance")){hr.next=9;break}return hr.next=6,ar({type:"competitions/getItem",payload:{url:Sr.module_url,module_type:"entrance"}});case 6:or=hr.sent,hr.next=12;break;case 9:return hr.next=11,ar({type:"competitions/getItem",payload:{url:Sr.module_url}});case 11:or=hr.sent;case 12:Gt(!1),pn(!1),pt(!1),Ir(or),Ur(!1),xn(!1),gr(Sr.module_type),Sr.module_type==="chart"?(Gt(!0),zt(!1),Ba()):Sr.module_type==="certificate"?(pn(!0),Gt(!1),zt(!1),ba()):Sr.module_type==="md_tab"?(pt(!0),zt(!1),localStorage.setItem("issee","2"),Gt(!1),pn(!1),ua()):Sr.module_type==="md_shixun"?(Ur(!0),zt(!1),ua()):Sr.module_type==="entrance"?(xn(!0),zt(!1),ua()):(zt(!0),localStorage.setItem("issee","1"));case 20:case"end":return hr.stop()}},wr)})),Mn.apply(this,arguments)}function In(wr,Sr,or){return oi.apply(this,arguments)}function oi(){return oi=Object(i.a)(l.a.mark(function wr(Sr,or,wn){var hr,pa;return l.a.wrap(function(Hn){for(;;)switch(Hn.prev=Hn.next){case 0:if(Sr.stopPropagation(),Object(ue.e)(ar)){Hn.next=3;break}return Hn.abrupt("return");case 3:if(!(lt!=null&&lt.is_authentication&&!(Zt!=null&&(hr=Zt.userInfo)!==null&&hr!==void 0&&hr.authentication))){Hn.next=6;break}return ar({type:"shixunsDetail/setActionTabs",payload:{key:"Banner-Auth"}}),Hn.abrupt("return");case 6:if(!(lt!=null&&lt.enroll_url)){Hn.next=9;break}return Object(Wt.S)(lt==null?void 0:lt.enroll_url),Hn.abrupt("return");case 9:if(!(wn==="ismodel")){Hn.next=23;break}if(!(or.member_of_course===!0)){Hn.next=14;break}Object(Wt.S)("/classrooms/".concat(or.course_id)),Hn.next=21;break;case 14:if(or.invite_code){Hn.next=17;break}return a.b.info("\u672C\u7ADE\u8D5B\u53EA\u9762\u5411\u90E8\u5206\u5B66\u6821/\u5355\u4F4D\u5F00\u653E\uFF0C\u4F60\u6682\u65F6\u6CA1\u6709\u53C2\u8D5B\u8D44\u683C"),Hn.abrupt("return");case 17:return Hn.next=19,ar({type:"competitions/addApplytojoincourse",payload:{invite_code:or.invite_code,student:1}});case 19:pa=Hn.sent,pa.status===0&&Object(Wt.S)("/classrooms/".concat(or.course_id));case 21:Hn.next=27;break;case 23:if(!(_t.enrolled===!0)){Hn.next=26;break}return Object(Wt.S)(wn),Hn.abrupt("return");case 26:Rn(!0);case 27:case"end":return Hn.stop()}},wr)})),oi.apply(this,arguments)}function Ba(){return wa.apply(this,arguments)}function wa(){return wa=Object(i.a)(l.a.mark(function wr(){return l.a.wrap(function(or){for(;;)switch(or.prev=or.next){case 0:return or.t0=ln,or.next=3,ar({type:"competitions/ChartRules",payload:{identifier:Mt}});case 3:return or.t1=or.sent,or.next=6,(0,or.t0)(or.t1);case 6:case"end":return or.stop()}},wr)})),wa.apply(this,arguments)}function sa(wr){return la.apply(this,arguments)}function la(){return la=Object(i.a)(l.a.mark(function wr(Sr){var or;return l.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return hr.next=2,ar({type:"competitions/Charts",payload:{identifier:Mt,stage_id:Sr}});case 2:or=hr.sent,Ir(or);case 4:case"end":return hr.stop()}},wr)})),la.apply(this,arguments)}function La(wr){return Ta.apply(this,arguments)}function Ta(){return Ta=Object(i.a)(l.a.mark(function wr(Sr){var or;return l.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return un(!0),hr.next=3,ar({type:"competitions/Results",payload:Object(k.a)({identifier:Mt,stage_id:Sr==null?void 0:Sr.id},Sr)});case 3:or=hr.sent,Ir(or),un(!1);case 6:case"end":return hr.stop()}},wr)})),Ta.apply(this,arguments)}function Pa(wr){return Ha.apply(this,arguments)}function Ha(){return Ha=Object(i.a)(l.a.mark(function wr(Sr){var or;return l.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return un(!0),hr.next=3,ar({type:"competitions/Results",payload:Object(k.a)({identifier:Mt,stage_id:Sr==null?void 0:Sr.id,module_type:"entrance"},Sr)});case 3:or=hr.sent,Ir(or),un(!1);case 6:case"end":return hr.stop()}},wr)})),Ha.apply(this,arguments)}function Xa(wr){return ka.apply(this,arguments)}function ka(){return ka=Object(i.a)(l.a.mark(function wr(Sr){var or;return l.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return hr.next=2,ar({type:"competitions/Results",payload:{identifier:Mt,stage_id:Sr}});case 2:if(or=hr.sent,!(localStorage.getItem("issee")==="1")){hr.next=5;break}return hr.abrupt("return");case 5:Ir(or);case 6:case"end":return hr.stop()}},wr)})),ka.apply(this,arguments)}function ua(){return Sa.apply(this,arguments)}function Sa(){return Sa=Object(i.a)(l.a.mark(function wr(){return l.a.wrap(function(or){for(;;)switch(or.prev=or.next){case 0:return or.t0=Pr,or.next=3,ar({type:"competitions/TabResults",payload:{identifier:Mt,competition_module_id:je}});case 3:or.t1=or.sent,(0,or.t0)(or.t1);case 5:case"end":return or.stop()}},wr)})),Sa.apply(this,arguments)}function ba(){return ca.apply(this,arguments)}function ca(){return ca=Object(i.a)(l.a.mark(function wr(){var Sr,or;return l.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return hr.next=2,ar({type:"competitions/Prize",payload:{identifier:Mt,user_id:Zt==null||((Sr=Zt.userInfo)===null||Sr===void 0)?void 0:Sr.user_id}});case 2:or=hr.sent,ke(or);case 4:case"end":return hr.stop()}},wr)})),ca.apply(this,arguments)}function co(){return _a.apply(this,arguments)}function _a(){return _a=Object(i.a)(l.a.mark(function wr(){var Sr,or;return l.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return hr.next=2,ar({type:"competitions/Accounts",payload:{id:Zt==null||((Sr=Zt.userInfo)===null||Sr===void 0)?void 0:Sr.user_id}});case 2:or=hr.sent,_e(or);case 4:case"end":return hr.stop()}},wr)})),_a.apply(this,arguments)}function Ca(wr){return da.apply(this,arguments)}function da(){return da=Object(i.a)(l.a.mark(function wr(Sr){var or;return l.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:if(zn){hr.next=2;break}return hr.abrupt("return");case 2:if(ai(!1),!fa()){hr.next=5;break}return hr.abrupt("return");case 5:return hr.next=7,ar({type:"competitions/AddTeam",payload:{identifier:Mt,name:Sr}});case 7:or=hr.sent,or&&or.status===0?(a.b.info("\u521B\u5EFA\u6218\u961F\u6210\u529F"),Dn(),gi(!1)):ai(!0);case 9:case"end":return hr.stop()}},wr)})),da.apply(this,arguments)}function fa(){var wr,Sr;if(Zt!=null&&(wr=Zt.userInfo)!==null&&wr!==void 0&&wr.is_teacher){var or;if(_t!=null&&(or=_t.teacher_staff)!==null&&or!==void 0&&or.mutiple_limited&&(_t!=null&&_t.enrolled))return a.b.info("\u4F60\u5DF2\u7ECF\u62A5\u540D\uFF0C\u4E0D\u80FD\u91CD\u590D\u62A5\u540D"),ai(!0),!0}else{var wn;if(_t!=null&&(wn=_t.member_staff)!==null&&wn!==void 0&&wn.mutiple_limited&&(_t!=null&&_t.enrolled))return a.b.info("\u4F60\u5DF2\u7ECF\u62A5\u540D\uFF0C\u4E0D\u80FD\u91CD\u590D\u62A5\u540D"),ai(!0),!0}if(_t!=null&&_t.enroll_ended)return a.b.info("\u62A5\u540D\u5DF2\u622A\u6B62\uFF0C\u65E0\u9700\u62A5\u540D"),ai(!0),!0;if(Zt!=null&&(Sr=Zt.userInfo)!==null&&Sr!==void 0&&Sr.is_teacher){if(!_t.teacher_staff)return a.b.info("\u5DF2\u7981\u6B62\u8001\u5E08\u62A5\u540D"),ai(!0),!0}else if(!(_t!=null&&_t.member_staff))return a.b.info("\u5DF2\u7981\u6B62\u5B66\u751F\u62A5\u540D"),ai(!0),!0}function Yi(wr){return na.apply(this,arguments)}function na(){return na=Object(i.a)(l.a.mark(function wr(Sr){var or;return l.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:if(zn){hr.next=2;break}return hr.abrupt("return");case 2:if(!fa()){hr.next=4;break}return hr.abrupt("return");case 4:return ai(!1),hr.next=7,ar({type:"competitions/JoinTeam",payload:{identifier:Mt,invite_code:Sr}});case 7:or=hr.sent,or&&or.status===0?(a.b.info("\u52A0\u5165\u6218\u961F\u6210\u529F"),Fn(!1),ai(!0),Dn()):ai(!0);case 9:case"end":return hr.stop()}},wr)})),na.apply(this,arguments)}return r.a.createElement("div",{className:"edu-container minH500"},r.a.createElement(n.a,{className:"mt10",separator:">"},r.a.createElement(n.a.Item,null,r.a.createElement(v.a,{to:"/competitions/index"},"\u5728\u7EBF\u7ADE\u8D5B")),r.a.createElement(n.a.Item,null,lt.name,lt.sub_title?"-"+lt.sub_title:null)),r.a.createElement("div",{className:"mt10",style:{display:"flex",background:"#fff",position:"relative",padding:"20px 12px"}},r.a.createElement(t.a,{spinning:ur.effects["competitions/getHeader"]},r.a.createElement("div",{style:{height:"355px",width:"800px"}},(lt==null?void 0:lt.avatar_url)&&(lt==null?void 0:lt.avatar_url)!==null&&r.a.createElement("img",{style:{height:"355px",width:"800px"},src:K.a.IMG_SERVER+"/"+(lt==null?void 0:lt.avatar_url)}),!(lt!=null&&lt.avatar_url)&&(lt==null?void 0:lt.avatar_url)==null&&r.a.createElement("img",{style:{height:"355px",width:"800px"},src:K.a.IMG_SERVER+"/images/educoder/competitions/mainbanner.jpg"}))),r.a.createElement("div",{style:{marginLeft:"20px",width:"400px"}},r.a.createElement("p",{className:"".concat(O.a.titlesize)},lt.name,lt.sub_title?"-"+lt.sub_title:null),r.a.createElement("p",{style:{display:"flex",justifyContent:"space-between",marginRight:18}},r.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},r.a.createElement("span",null,"\u5956\u91D1"),lt!=null&&lt.bonus?r.a.createElement("span",{style:{fontSize:"24px"}},"\xA5",parseInt(lt&&lt.bonus).toLocaleString()):r.a.createElement("span",{style:{fontSize:"24px"}},"\u6682\u65E0")),r.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},r.a.createElement("span",null,"\u6D4F\u89C8"),r.a.createElement("span",{style:{fontSize:"24px"}},parseInt(lt&&lt.visits_count).toLocaleString())),r.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},r.a.createElement("span",null,"\u62A5\u540D"),r.a.createElement("span",{style:{fontSize:"24px"}},parseInt(lt&&lt.member_count).toLocaleString()))),r.a.createElement("p",{className:O.a.timesize,style:{marginTop:30}},r.a.createElement("span",{style:{color:"#9b9b9b",marginTop:"30px"}},"\u7ADE\u8D5B\u65F6\u95F4\uFF1A"),lt.start_time,"~",lt.end_time),r.a.createElement("p",{className:O.a.timesize},r.a.createElement("span",{style:{color:"#9b9b9b"}},"\u62A5\u540D\u622A\u6B62\uFF1A"),lt.enroll_end_time),lt.competition_status==="ended"?r.a.createElement("p",{className:O.a.timesize},r.a.createElement("span",{style:{color:"#9b9b9b"}},"\u7ADE\u8D5B\u72B6\u6001\uFF1A"),"\u5DF2\u7ED3\u675F"):null,lt.competition_status==="nearly_published"?r.a.createElement("p",{className:O.a.timesize},r.a.createElement("span",{style:{color:"#9b9b9b"}},"\u7ADE\u8D5B\u72B6\u6001\uFF1A"),"\u672A\u53D1\u5E03"):null,lt.competition_status==="progressing"?r.a.createElement("p",{className:O.a.timesize},r.a.createElement("span",{style:{color:"#9b9b9b"}},"\u7ADE\u8D5B\u72B6\u6001\uFF1A"),"\u8FDB\u884C\u4E2D"):null,r.a.createElement("div",{style:{display:"flex",justifyContent:"center"}},(lt==null?void 0:lt.mode)<=2&&_t.enrolled&&r.a.createElement(S.a,{onClick:function(Sr){if((lt==null?void 0:lt.mode)===1){var or;Ui((or=lt.competition_modules)===null||or===void 0?void 0:or.find(function(wn){return wn.module_type==="entrance"}))}else In(Sr,lt,"ismodel")},style:{background:"#07C160",color:"#fff",border:"1px solid #07C160",marginRight:20,display:(lt==null?void 0:lt.mode)===2||(lt==null?void 0:lt.mode)===1&&((mt=lt.competition_modules)===null||mt===void 0||((wt=mt.filter(function(wr){return wr.module_type==="entrance"}))===null||wt===void 0)?void 0:wt.length)>0?"":"none"},className:O.a.buttonsize},(lt==null?void 0:lt.mode)===1&&"\u8D5B\u9898\u5165\u53E3",(lt==null?void 0:lt.mode)===2&&"\u8FDB\u5165\u8BFE\u5802"),lt.competition_status==="ended"?r.a.createElement(S.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u5DF2\u7ED3\u675F"):null,lt.competition_status==="nearly_published"?r.a.createElement(S.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u672A\u53D1\u5E03"):null,lt.competition_status!=="nearly_published"&&lt.enroll_end&&lt.competition_status!=="ended"?r.a.createElement(S.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u62A5\u540D\u622A\u6B62"):null,lt.competition_status==="progressing"&&lt.enroll_end!=!0?r.a.createElement(S.a,{type:"primary",disabled:_t.enrolled&&!lt.need_attachment,className:O.a.buttonsize,onClick:function(Sr){if(_t.enrolled&&lt.need_attachment){var or;(or=ra.current)===null||or===void 0||or.handleVisible();return}In(Sr,lt,lt.mode===2?"ismodel":lt.personal?"personal":"/competitions/index/".concat(lt.identifier,"/enroll"))}},_t.enrolled?lt.need_attachment?"\u4E0A\u4F20\u4F5C\u54C1":"\u5DF2\u62A5\u540D":lt!=null&&lt.enroll_url?"\u524D\u5F80\u5927\u8D5B\u5B98\u7F51\u62A5\u540D":"\u7ACB\u5373\u62A5\u540D"):null),Zt.userInfo.real_name!="\u6E38\u5BA2"&&!(lt!=null&&lt.enroll_url)&&r.a.createElement("span",{onClick:function(Sr){return In(Sr,lt,lt.mode===2?"ismodel":lt.personal?"personal":"/competitions/index/".concat(lt.identifier,"/enroll"))},className:O.a.myteam},Object(kr.u)()?"\u53C2\u8D5B\u6218\u961F>>":"\u6211\u7684\u6218\u961F>>"))),r.a.createElement("div",{className:O.a.bootmdetail},r.a.createElement("div",{className:O.a.flex1},r.a.createElement(m.a,{selectedKeys:["".concat(je)]},lt&&lt.competition_modules&&lt.competition_modules.map(function(wr,Sr){if(wr.module_type!="enroll")return r.a.createElement(m.a.Item,{className:O.a.menuItem,onClick:function(){if(wr!=null&&wr.is_authentication){if(!Object(ue.e)(ar))return;a.b.info("\u52A0\u5165\u6218\u961F\u624D\u80FD\u67E5\u770B");return}Ui(wr)},key:wr.id},wr.name)}))),r.a.createElement("div",{className:O.a.flex6,style:{padding:(Nr||Tr)&&0}},Fr?r.a.createElement(Pt,{dispatch:ar,userid:Zt==null||((Lt=Zt.userInfo)===null||Lt===void 0)?void 0:Lt.user_id,Prize:Qn,Accounts:Ue,getAccounts:co}):null,yt?r.a.createElement(Pe,{HeaderDetail:lt,userinfo:Zt.userInfo,Editable:lt==null||((It=lt.permission)===null||It===void 0)?void 0:It.editable,getCharts:sa,getChartRules:Ba,Selectkey:je,ChartRules:an,ItemData:er}):null,ot?r.a.createElement(ee,{ref:ra,StaffDetail:_t,HeaderDetail:lt,userinfo:Zt.userInfo,Editable:lt==null||((Kt=lt.permission)===null||Kt===void 0)?void 0:Kt.editable,ItemData:er,setIssee:zt,ModelType:Qt,dispatch:ar}):null,!ot&&!Nr&&!Tr&&!yt&&!Fr&&!qe?r.a.createElement(q,{userinfo:Zt.userInfo,ModelType:Qt,getrightdatas:Ui,dispatch:ar,MenuItem:mr,setIssee:zt,identifier:Mt,ItemData:er}):null,qe&&r.a.createElement(Bn,{dispatch:ar,StaffDetail:_t,userinfo:Zt.userInfo,HeaderDetail:lt,Editable:lt==null||((Ht=lt.permission)===null||Ht===void 0)?void 0:Ht.editable,getCharts:Xa,getChartRules:ua,Selectkey:je,ChartRules:Yt,ItemData:er}),Nr&&r.a.createElement(Gi,{loading:vn,dispatch:ar,StaffDetail:_t,userinfo:Zt.userInfo,HeaderDetail:lt,Editable:lt==null||((ht=lt.permission)===null||ht===void 0)?void 0:ht.editable,getCharts:La,getChartRules:ua,Selectkey:je,ChartRules:Yt,ItemData:er}),Tr&&r.a.createElement(oa,{loading:vn,dispatch:ar,StaffDetail:_t,userinfo:Zt.userInfo,HeaderDetail:lt,Editable:lt==null||((St=lt.permission)===null||St===void 0)?void 0:St.editable,getCharts:Pa,getChartRules:ua,Selectkey:je,ChartRules:Yt,ItemData:er}))),r.a.createElement(b.a,null),r.a.createElement(G,{getResults:Xa}),r.a.createElement(C.a,{visible:qr,footer:null,width:720,title:"\u63D0\u793A",centered:!0,onCancel:function(){return zr(!1)}},r.a.createElement("div",{className:O.a.modal},r.a.createElement("div",null,"\u534E\u4E3A\u6A21\u578B\u738B\u8005\u6311\u6218\u8D5B\u9EC4\u91D1\u8D5B\u6B63\u5F0F\u5F00\u542F\u5566"),r.a.createElement("div",null,"\u672C\u8D5B\u6BB5\u603B\u5956\u91D1\u9AD8\u8FBE",r.a.createElement("span",{style:{color:"#FF8C29"}},"300,000"),"\u5143"),r.a.createElement("div",null,"1\u3001\u7B26\u5408\u8D5B\u9898\u8981\u6C42\u7684\u961F\u4F0D\uFF08\u517125\u652F\uFF09\u53EF\u83B7\u5F97\u5956\u91D1\uFF1A12000RMB/\u961F \uFF1B"),r.a.createElement("div",null,"2\u3001\u53C2\u4E0E\u83B7\u5F97\u201C\u8363\u8000\u6BBF\u5802\u201D\u699C\u4E3B\u7684\u961F\u4F0D\uFF0C\u53EF\u83B7\u5F97\u7531\u4E2D\u56FD\u8F6F\u4EF6\u5F00\u6E90\u521B\u65B0\u5927\u8D5B\u7EC4\u59D4\u4F1A\u9881\u53D1\u7684\u9EC4\u91D1\u5B9D\u7BB1\uFF1B"),r.a.createElement("div",null,"3\u3001\u5404\u8D5B\u9898\u7CBE\u5EA6\u6700\u9AD8\u7684\u961F\u4F0D\uFF0C\u53EF\u83B7\u5F97\u7531\u4E2D\u56FD\u8F6F\u4EF6\u5F00\u6E90\u521B\u65B0\u5927\u8D5B\u7EC4\u59D4\u4F1A\u9881\u53D1\u7684\u9EC4\u91D1\u5B9D\u7BB1+\u8363\u8A89\u8BC1\u4E66\uFF1B"),r.a.createElement("div",null,"\u5FC3\u52A8\u5427\uFF0C\u90A3\u5C31\u5FEB\u70B9\u51FB\u4E0B\u65B9\u6309\u94AE\u62A5\u540D\u53C2\u8D5B"),r.a.createElement(S.a,{type:"primary",onClick:function(){return Object(Wt.S)("https://competition.huaweicloud.com/information/1000041485/introduction")}},"\u524D\u5F80\u62A5\u540D\u53C2\u8D5B"))),r.a.createElement(C.a,{title:"\u9009\u62E9\u53C2\u8D5B\u65B9\u5F0F",visible:jn,onCancel:function(){Rn(!1)},footer:!1},r.a.createElement("div",{style:{display:"flex",justifyContent:"space-around",height:100,alignItems:"center"}},r.a.createElement(S.a,{type:"primary",style:{height:40},onClick:function(){Fn(!0),Rn(!1)}},"\u52A0\u5165\u6218\u961F\u53C2\u8D5B"),r.a.createElement(S.a,{style:{height:40},onClick:function(){gi(!0),Rn(!1)}},"\u53BB\u521B\u5EFA\u6218\u961F\u53C2\u8D5B"))),ci?r.a.createElement(Pi.a,{isjoin:ci,setJoin:Fn,JoinTeams:Yi}):null,Xn?r.a.createElement(qn.a,{isAddmodle:Xn,setIsAdd:gi,createTeam:Ca}):null)},ha=J.default=Object(p.a)(function(xt){var rt=xt.loading,mt=xt.globalSetting,wt=xt.user;return{globalSetting:mt,loading:rt,user:wt}})(ji)},GRuw:function(H,J,D){(function(k,g,C){H.exports=J=g(D("Ib8C"),D("lPiR"))})(this,function(k){return function(){var g=k,C=g.lib,M=C.WordArray,m=g.algo,y=m.SHA256,S=m.SHA224=y.extend({_doReset:function(){this._hash=new M.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var _=y._doFinalize.call(this);return _.sigBytes-=4,_}});g.SHA224=y._createHelper(S),g.HmacSHA224=y._createHmacHelper(S)}(),k.SHA224})},GfqC:function(H,J,D){"use strict";var k=D("q1tI"),g=D.n(k),C=D("TSYQ"),M=D.n(C);function m(B,U){var I="cannot "+B.method+" "+B.action+" "+U.status+"'",K=new Error(I);return K.status=U.status,K.method=B.method,K.url=B.action,K}function y(B){var U=B.responseText||B.response;if(!U)return U;try{return JSON.parse(U)}catch(I){return U}}function S(B){var U=new XMLHttpRequest;B.onProgress&&U.upload&&(U.upload.onprogress=function(ue){ue.total>0&&(ue.percent=ue.loaded/ue.total*100),B.onProgress(ue)});var I=new FormData;B.data&&Object.keys(B.data).forEach(function(Z){var ue=B.data[Z];if(Array.isArray(ue)){ue.forEach(function(de){I.append(Z+"[]",de)});return}I.append(Z,B.data[Z])}),B.file instanceof Blob?I.append(B.filename,B.file,B.file.name):I.append(B.filename,B.file),U.onerror=function(ue){B.onError(ue)},U.onload=function(){return U.status<200||U.status>=300?B.onError(m(B,U),y(U)):B.onSuccess(y(U),U)},U.open(B.method,B.action,!0),B.withCredentials&&"withCredentials"in U&&(U.withCredentials=!0);var K=B.headers||{};return K["X-Requested-With"]!==null&&U.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(K).forEach(function(Z){K[Z]!==null&&U.setRequestHeader(Z,K[Z])}),U.send(I),{abort:function(){U.abort()}}}var _=+new Date,t=0;function h(){return"rc-upload-"+_+"-"+ ++t}function n(B,U){return B.indexOf(U,B.length-U.length)!==-1}var c=function(B,U){if(B&&U){var I=Array.isArray(U)?U:U.split(","),K=B.name||"",Z=B.type||"",ue=Z.replace(/\/.*$/,"");return I.some(function(de){var Ce=de.trim();return Ce.charAt(0)==="."?n(K.toLowerCase(),Ce.toLowerCase()):/\/\*$/.test(Ce)?ue===Ce.replace(/\/.*$/,""):Z===Ce})}return!0};function a(B,U){var I=B.createReader(),K=[];function Z(){I.readEntries(function(ue){var de=Array.prototype.slice.apply(ue);K=K.concat(de);var Ce=!de.length;Ce?U(K):Z()})}Z()}var i=function(U,I,K){var Z=function ue(de,Ce){Ce=Ce||"",de.isFile?de.file(function(Re){K(Re)&&(de.fullPath&&!Re.webkitRelativePath&&(Object.defineProperties(Re,{webkitRelativePath:{writable:!0}}),Re.webkitRelativePath=de.fullPath.replace(/^\//,""),Object.defineProperties(Re,{webkitRelativePath:{writable:!1}})),I([Re]))}):de.isDirectory&&a(de,function(Re){Re.forEach(function(me){ue(me,""+Ce+de.name+"/")})})};U.forEach(function(ue){Z(ue.webkitGetAsEntry())})},s=i,d=Object.assign||function(B){for(var U=1;U<arguments.length;U++){var I=arguments[U];for(var K in I)Object.prototype.hasOwnProperty.call(I,K)&&(B[K]=I[K])}return B},f=function(){function B(U,I){var K=[],Z=!0,ue=!1,de=void 0;try{for(var Ce=U[Symbol.iterator](),Re;!(Z=(Re=Ce.next()).done)&&!(K.push(Re.value),I&&K.length===I);Z=!0);}catch(me){ue=!0,de=me}finally{try{!Z&&Ce.return&&Ce.return()}finally{if(ue)throw de}}return K}return function(U,I){if(Array.isArray(U))return U;if(Symbol.iterator in Object(U))return B(U,I);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function B(U,I){for(var K=0;K<I.length;K++){var Z=I[K];Z.enumerable=Z.enumerable||!1,Z.configurable=!0,"value"in Z&&(Z.writable=!0),Object.defineProperty(U,Z.key,Z)}}return function(U,I,K){return I&&B(U.prototype,I),K&&B(U,K),U}}();function o(B,U,I){return U in B?Object.defineProperty(B,U,{value:I,enumerable:!0,configurable:!0,writable:!0}):B[U]=I,B}function r(B,U){var I={};for(var K in B){if(U.indexOf(K)>=0)continue;if(!Object.prototype.hasOwnProperty.call(B,K))continue;I[K]=B[K]}return I}function x(B,U){if(!(B instanceof U))throw new TypeError("Cannot call a class as a function")}function v(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 R=function(U){return Object.keys(U).reduce(function(I,K){return(K.substr(0,5)==="data-"||K.substr(0,5)==="aria-"||K==="role")&&(I[K]=U[K]),I},{})},O=function(B){p(U,B);function U(){var I,K,Z,ue;x(this,U);for(var de=arguments.length,Ce=Array(de),Re=0;Re<de;Re++)Ce[Re]=arguments[Re];return ue=(K=(Z=v(this,(I=U.__proto__||Object.getPrototypeOf(U)).call.apply(I,[this].concat(Ce))),Z),Z.state={uid:h()},Z.reqs={},Z.onChange=function(me){var Oe=me.target.files;Z.uploadFiles(Oe),Z.reset()},Z.onClick=function(me){var Oe=Z.fileInput;if(!Oe)return;var be=Z.props,ce=be.children,se=be.onClick;ce&&ce.type==="button"&&(Oe.parentNode.focus(),Oe.parentNode.querySelector("button").blur()),Oe.click(),se&&se(me)},Z.onKeyDown=function(me){me.key==="Enter"&&Z.onClick()},Z.onFileDrop=function(me){var Oe=Z.props.multiple;if(me.preventDefault(),me.type==="dragover")return;if(Z.props.directory)s(Array.prototype.slice.call(me.dataTransfer.items),Z.uploadFiles,function(ce){return c(ce,Z.props.accept)});else{var be=Array.prototype.slice.call(me.dataTransfer.files).filter(function(ce){return c(ce,Z.props.accept)});Oe===!1&&(be=be.slice(0,1)),Z.uploadFiles(be)}},Z.uploadFiles=function(me){var Oe=Array.prototype.slice.call(me);Oe.map(function(be){return be.uid=h(),be}).forEach(function(be){Z.upload(be,Oe)})},Z.saveFileInput=function(me){Z.fileInput=me},K),v(Z,ue)}return l(U,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(K,Z){var ue=this,de=this.props;if(!de.beforeUpload)return setTimeout(function(){return ue.post(K)},0);var Ce=de.beforeUpload(K,Z);Ce&&Ce.then?Ce.then(function(Re){var me=Object.prototype.toString.call(Re);return me==="[object File]"||me==="[object Blob]"?ue.post(Re):ue.post(K)}).catch(function(Re){console.log(Re)}):Ce!==!1&&setTimeout(function(){return ue.post(K)},0);return}},{key:"post",value:function(K){var Z=this;if(!this._isMounted)return;var ue=this.props,de=ue.onStart,Ce=ue.onProgress,Re=ue.transformFile,me=Re===void 0?function(Oe){return Oe}:Re;new Promise(function(Oe){var be=ue.action;return typeof be=="function"&&(be=be(K)),Oe(be)}).then(function(Oe){var be=K.uid,ce=ue.customRequest||S,se=Promise.resolve(me(K)).then(function(ne){var ge=ue.data;return typeof ge=="function"&&(ge=ge(ne)),Promise.all([ne,ge])}).catch(function(ne){console.error(ne)});se.then(function(ne){var ge=f(ne,2),ee=ge[0],re=ge[1],Te={action:Oe,filename:ue.name,data:re,file:ee,headers:ue.headers,withCredentials:ue.withCredentials,method:ue.method||"post",onProgress:Ce?function(ie){Ce(ie,K)}:null,onSuccess:function(q,Y){delete Z.reqs[be],ue.onSuccess(q,K,Y)},onError:function(q,Y){delete Z.reqs[be],ue.onError(q,Y,K)}};de(K),Z.reqs[be]=ce(Te)})})}},{key:"reset",value:function(){this.setState({uid:h()})}},{key:"abort",value:function(K){var Z=this.reqs;if(K){var ue=K;K&&K.uid&&(ue=K.uid),Z[ue]&&Z[ue].abort&&Z[ue].abort(),delete Z[ue]}else Object.keys(Z).forEach(function(de){Z[de]&&Z[de].abort&&Z[de].abort(),delete Z[de]})}},{key:"render",value:function(){var K,Z=this.props,ue=Z.component,de=Z.prefixCls,Ce=Z.className,Re=Z.disabled,me=Z.id,Oe=Z.style,be=Z.multiple,ce=Z.accept,se=Z.children,ne=Z.directory,ge=Z.openFileDialogOnClick,ee=Z.onMouseEnter,re=Z.onMouseLeave,Te=r(Z,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),ie=M()((K={},o(K,de,!0),o(K,de+"-disabled",Re),o(K,Ce,Ce),K)),q=Re?{}:{onClick:ge?this.onClick:function(){},onKeyDown:ge?this.onKeyDown:function(){},onMouseEnter:ee,onMouseLeave:re,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return g.a.createElement(ue,d({},q,{className:ie,role:"button",style:Oe}),g.a.createElement("input",d({},R(Te),{id:me,type:"file",ref:this.saveFileInput,onClick:function(X){return X.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:ce,directory:ne?"directory":null,webkitdirectory:ne?"webkitdirectory":null,multiple:be,onChange:this.onChange})),se)}}]),U}(k.Component),b=O,E=Object.assign||function(B){for(var U=1;U<arguments.length;U++){var I=arguments[U];for(var K in I)Object.prototype.hasOwnProperty.call(I,K)&&(B[K]=I[K])}return B},w=function(){function B(U,I){for(var K=0;K<I.length;K++){var Z=I[K];Z.enumerable=Z.enumerable||!1,Z.configurable=!0,"value"in Z&&(Z.writable=!0),Object.defineProperty(U,Z.key,Z)}}return function(U,I,K){return I&&B(U.prototype,I),K&&B(U,K),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 N(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 L(){}var G=function(B){N(U,B);function U(){var I,K,Z,ue;T(this,U);for(var de=arguments.length,Ce=Array(de),Re=0;Re<de;Re++)Ce[Re]=arguments[Re];return ue=(K=(Z=F(this,(I=U.__proto__||Object.getPrototypeOf(U)).call.apply(I,[this].concat(Ce))),Z),Z.saveUploader=function(me){Z.uploader=me},K),F(Z,ue)}return w(U,[{key:"abort",value:function(K){this.uploader.abort(K)}},{key:"render",value:function(){return g.a.createElement(b,E({},this.props,{ref:this.saveUploader}))}}]),U}(k.Component);G.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:L,onError:L,onSuccess:L,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var z=G,A=J.a=z},HmJG:function(H,J,D){},IBYe:function(H,J,D){"use strict";function k(g){return null}J.a=k},Ib8C:function(H,J,D){(function(k){(function(g,C){H.exports=J=C()})(this,function(){var g=g||function(C,M){var m;if(typeof window!="undefined"&&window.crypto&&(m=window.crypto),typeof self!="undefined"&&self.crypto&&(m=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(m=globalThis.crypto),!m&&typeof window!="undefined"&&window.msCrypto&&(m=window.msCrypto),!m&&typeof k!="undefined"&&k.crypto&&(m=k.crypto),!m&&!0)try{m=D(4)}catch(o){}var y=function(){if(m){if(typeof m.getRandomValues=="function")try{return m.getRandomValues(new Uint32Array(1))[0]}catch(o){}if(typeof m.randomBytes=="function")try{return m.randomBytes(4).readInt32LE()}catch(o){}}throw new Error("Native crypto module could not be used to get secure random number.")},S=Object.create||function(){function o(){}return function(r){var x;return o.prototype=r,x=new o,o.prototype=null,x}}(),_={},t=_.lib={},h=t.Base=function(){return{extend:function(o){var r=S(this);return o&&r.mixIn(o),(!r.hasOwnProperty("init")||this.init===r.init)&&(r.init=function(){r.$super.init.apply(this,arguments)}),r.init.prototype=r,r.$super=this,r},create:function(){var o=this.extend();return o.init.apply(o,arguments),o},init:function(){},mixIn:function(o){for(var r in o)o.hasOwnProperty(r)&&(this[r]=o[r]);o.hasOwnProperty("toString")&&(this.toString=o.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),n=t.WordArray=h.extend({init:function(o,r){o=this.words=o||[],r!=M?this.sigBytes=r:this.sigBytes=o.length*4},toString:function(o){return(o||a).stringify(this)},concat:function(o){var r=this.words,x=o.words,v=this.sigBytes,p=o.sigBytes;if(this.clamp(),v%4)for(var R=0;R<p;R++){var O=x[R>>>2]>>>24-R%4*8&255;r[v+R>>>2]|=O<<24-(v+R)%4*8}else for(var b=0;b<p;b+=4)r[v+b>>>2]=x[b>>>2];return this.sigBytes+=p,this},clamp:function(){var o=this.words,r=this.sigBytes;o[r>>>2]&=4294967295<<32-r%4*8,o.length=C.ceil(r/4)},clone:function(){var o=h.clone.call(this);return o.words=this.words.slice(0),o},random:function(o){for(var r=[],x=0;x<o;x+=4)r.push(y());return new n.init(r,o)}}),c=_.enc={},a=c.Hex={stringify:function(o){for(var r=o.words,x=o.sigBytes,v=[],p=0;p<x;p++){var R=r[p>>>2]>>>24-p%4*8&255;v.push((R>>>4).toString(16)),v.push((R&15).toString(16))}return v.join("")},parse:function(o){for(var r=o.length,x=[],v=0;v<r;v+=2)x[v>>>3]|=parseInt(o.substr(v,2),16)<<24-v%8*4;return new n.init(x,r/2)}},i=c.Latin1={stringify:function(o){for(var r=o.words,x=o.sigBytes,v=[],p=0;p<x;p++){var R=r[p>>>2]>>>24-p%4*8&255;v.push(String.fromCharCode(R))}return v.join("")},parse:function(o){for(var r=o.length,x=[],v=0;v<r;v++)x[v>>>2]|=(o.charCodeAt(v)&255)<<24-v%4*8;return new n.init(x,r)}},s=c.Utf8={stringify:function(o){try{return decodeURIComponent(escape(i.stringify(o)))}catch(r){throw new Error("Malformed UTF-8 data")}},parse:function(o){return i.parse(unescape(encodeURIComponent(o)))}},d=t.BufferedBlockAlgorithm=h.extend({reset:function(){this._data=new n.init,this._nDataBytes=0},_append:function(o){typeof o=="string"&&(o=s.parse(o)),this._data.concat(o),this._nDataBytes+=o.sigBytes},_process:function(o){var r,x=this._data,v=x.words,p=x.sigBytes,R=this.blockSize,O=R*4,b=p/O;o?b=C.ceil(b):b=C.max((b|0)-this._minBufferSize,0);var E=b*R,w=C.min(E*4,p);if(E){for(var T=0;T<E;T+=R)this._doProcessBlock(v,T);r=v.splice(0,E),x.sigBytes-=w}return new n.init(r,w)},clone:function(){var o=h.clone.call(this);return o._data=this._data.clone(),o},_minBufferSize:0}),f=t.Hasher=d.extend({cfg:h.extend(),init:function(o){this.cfg=this.cfg.extend(o),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(o){return this._append(o),this._process(),this},finalize:function(o){o&&this._append(o);var r=this._doFinalize();return r},blockSize:512/32,_createHelper:function(o){return function(r,x){return new o.init(x).finalize(r)}},_createHmacHelper:function(o){return function(r,x){return new l.HMAC.init(o,x).finalize(r)}}}),l=_.algo={};return _}(Math);return g})}).call(this,D("IyRk"))},JYp7:function(H,J,D){"use strict";D.d(J,"a",function(){return k});var k;(function(g){function C(r){return r&&typeof r=="object"&&typeof r[Symbol.iterator]=="function"}g.is=C;const M=Object.freeze([]);function m(){return M}g.empty=m;function*y(r){yield r}g.single=y;function S(r){return r||M}g.from=S;function _(r){return!r||r[Symbol.iterator]().next().done===!0}g.isEmpty=_;function t(r){return r[Symbol.iterator]().next().value}g.first=t;function h(r,x){for(const v of r)if(x(v))return!0;return!1}g.some=h;function n(r,x){for(const v of r)if(x(v))return v;return}g.find=n;function*c(r,x){for(const v of r)x(v)&&(yield v)}g.filter=c;function*a(r,x){let v=0;for(const p of r)yield x(p,v++)}g.map=a;function*i(...r){for(const x of r)for(const v of x)yield v}g.concat=i;function*s(r){for(const x of r)for(const v of x)yield v}g.concatNested=s;function d(r,x,v){let p=v;for(const R of r)p=x(p,R);return p}g.reduce=d;function*f(r,x,v=r.length){for(x<0&&(x+=r.length),v<0?v+=r.length:v>r.length&&(v=r.length);x<v;x++)yield r[x]}g.slice=f;function l(r,x=Number.POSITIVE_INFINITY){const v=[];if(x===0)return[v,r];const p=r[Symbol.iterator]();for(let R=0;R<x;R++){const O=p.next();if(O.done)return[v,g.empty()];v.push(O.value)}return[v,{[Symbol.iterator](){return p}}]}g.consume=l;function o(r,x,v=(p,R)=>p===R){const p=r[Symbol.iterator](),R=x[Symbol.iterator]();for(;;){const O=p.next(),b=R.next();if(O.done!==b.done)return!1;if(O.done)return!0;if(!v(O.value,b.value))return!1}}g.equals=o})(k||(k={}))},K3mO:function(H,J,D){(function(k,g,C){H.exports=J=g(D("Ib8C"),D("3y9D"),D("WYAk"))})(this,function(k){return function(){var g=k,C=g.lib,M=C.Base,m=C.WordArray,y=g.algo,S=y.MD5,_=y.EvpKDF=M.extend({cfg:M.extend({keySize:128/32,hasher:S,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,h){for(var n,c=this.cfg,a=c.hasher.create(),i=m.create(),s=i.words,d=c.keySize,f=c.iterations;s.length<d;){n&&a.update(n),n=a.update(t).finalize(h),a.reset();for(var l=1;l<f;l++)n=a.finalize(n),a.reset();i.concat(n)}return i.sigBytes=d*4,i}});g.EvpKDF=function(t,h,n){return _.create(n).compute(t,h)}}(),k.EvpKDF})},KXlV:function(H,J,D){H.exports=D.p+"static/job.65c6034f.png"},KeDT:function(H,J,D){H.exports={flex_box_center:"flex_box_center___3otMp",flex_space_between:"flex_space_between___2nig-",flex_box_vertical_center:"flex_box_vertical_center___3opWF",flex_box_center_end:"flex_box_center_end___1u2JP",flex_box_column:"flex_box_column___1RMsI",wrp:"wrp___-Shy4",bg:"bg___3aDMI",commonimg:"commonimg___15xnD",titlesize:"titlesize___2x92E",timesize:"timesize___3GFem",flex1:"flex1___1D3Li",buttonsize:"buttonsize___3oghG",myteam:"myteam___v6SIK",bootmdetail:"bootmdetail___3hk9v",flex6:"flex6___2iMiQ",menuItem:"menuItem___20c2q",spanprev:"spanprev___1dQoJ",spannext:"spannext___3fFnS",divwidth:"divwidth___1Dk29",receiveclick:"receiveclick___3mYYR",receivealready:"receivealready___20cCL",bkfff:"bkfff___WkCDR","ant-input":"ant-input___Zl9Xd",onediv:"onediv___2hHLH",onetop:"onetop___73xTC",towdiv:"towdiv___nqi1b",towtop:"towtop___pPhtO",threediv:"threediv___2G0u0",threetop:"threetop___2DsrB",imgradius:"imgradius___2WlXC",prize:"prize___1al1u",spanrightradius:"spanrightradius___3VHYc",bottomItem:"bottomItem___1NfPd",myTeam:"myTeam___2A-RJ",downloadpdf:"downloadpdf___1BQ_n",teamItem:"teamItem___220Fc",dash:"dash___3pxuh",modal:"modal___27esx"}},KhGG:function(H,J,D){"use strict";D.d(J,"a",function(){return p}),D.d(J,"c",function(){return b});var k=D("0Owb"),g=D("miYZ"),C=D("tsqr"),M=D("oBTY"),m=D("tJVT"),y=D("PpiC"),S=D("k1fw"),_=D("9og8"),t=D("DZo9"),h=D("8z0m"),n=D("WmNS"),c=D.n(n),a=D("q1tI"),i=D.n(a),s=D("ErOA"),d=D("NFKh"),f=D.n(d),l=D("7Cbv"),o=D("9kvl"),r=D("mxV5"),x=D.n(r),v=h.a.Dragger,p=function(T){var F="bf3c199c2470cb477d907b1e0917c17b",N="5183666c72eec9e4",L=f.a.enc.Utf8.parse(F),G=f.a.enc.Utf8.parse(N),z=f.a.AES.decrypt(T,L,{iv:G,mode:f.a.mode.CBC});return z.toString(f.a.enc.Utf8)},R,O=function(){var w=Object(_.a)(c.a.mark(function T(F){var N,L,G,z,A,B,U,I,K,Z,ue;return c.a.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return U=F.identifier,I=F.oldFilename,K=F.newFilename,Ce.next=3,Object(s.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 3:return Z=Ce.sent,Z.data=JSON.parse(p(Z.data)),ue=new x.a({endpoint:Z==null||((N=Z.data)===null||N===void 0)?void 0:N.end_point,region:Z==null||((L=Z.data)===null||L===void 0)?void 0:L.region,accessKeyId:Z==null||((G=Z.data)===null||G===void 0)?void 0:G.access_key_id,accessKeySecret:Z==null||((z=Z.data)===null||z===void 0)?void 0:z.access_key_secret,bucket:Z==null||((A=Z.data)===null||A===void 0)?void 0:A.bucket,stsToken:Z==null||((B=Z.data)===null||B===void 0)?void 0:B.security_token}),Ce.abrupt("return",new Promise(function(Re,me){console.log(11111,"".concat(U,"/").concat(I),"".concat(U,"/").concat(K),Z.data),ue.copy("/".concat(U,"/").concat(I),"/".concat(U,"/").concat(K)).then(function(Oe){console.log("\u62F7\u8D1D\u6210\u529F",Oe)}).catch(function(Oe){console.log(Oe)})}));case 7:case"end":return Ce.stop()}},T)}));return function(F){return w.apply(this,arguments)}}(),b=function(){var w=Object(_.a)(c.a.mark(function T(F,N,L){var G,z,A,B,U,I,K,Z,ue,de;return c.a.wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:return N.file_name=F.name,Re.next=3,Object(s.a)("/api/buckets/get_upload_token.json",{method:"get"});case 3:return K=Re.sent,console.log("decrypt(res.data):",p(K.data)),K.data=JSON.parse(p(K.data)),Z=F.name.split("."),Z.pop(),ue=N.realFileName?Z:Object(l.a)(),de=new x.a({endpoint:K==null||((G=K.data)===null||G===void 0)?void 0:G.end_point,region:K==null||((z=K.data)===null||z===void 0)?void 0:z.region,accessKeyId:K==null||((A=K.data)===null||A===void 0)?void 0:A.access_key_id,accessKeySecret:K==null||((B=K.data)===null||B===void 0)?void 0:B.access_key_secret,bucket:K==null||((U=K.data)===null||U===void 0)?void 0:U.bucket,stsToken:K==null||((I=K.data)===null||I===void 0)?void 0:I.security_token}),Re.abrupt("return",new Promise(function(me,Oe){var be;de.multipartUpload("".concat(ue),new Blob([F],{type:F.type}),Object(S.a)(Object(S.a)({timeout:200*1e3,partSize:102400},L),{},{callback:{url:K==null||((be=K.data)===null||be===void 0)?void 0:be.callback_url,host:K==null?void 0:K.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(s.e)(N)}})).then(function(ce){var se;F.response=(se=ce.data)===null||se===void 0?void 0:se.data,me(ce==null?void 0:ce.data)}).catch(function(ce){Oe(ce),console.log("err:",ce)})}));case 11:case"end":return Re.stop()}},T)}));return function(F,N,L){return w.apply(this,arguments)}}(),E=function(T){var F=T.user,N=T.cancelUpload,L=Object(y.a)(T,["user","cancelUpload"]),G=Object(a.useState)([]),z=Object(m.a)(G,2),A=z[0],B=z[1],U=Object(a.useState)(),I=Object(m.a)(U,2),K=I[0],Z=I[1],ue={onRemove:function(Re){B(Object(M.a)(A.filter(function(me){return me.name!==Re.name}))),L.onChange(A.filter(function(me){return me.name!==Re.name}))},disabled:L.disabled,multiple:!0,fileList:A==null?void 0:A.map(function(Ce){return Ce.file}),customRequest:function(){},beforeUpload:function(){var Ce=Object(_.a)(c.a.mark(function me(Oe){var be;return c.a.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:if(be=L.maxSize||1024*1024*1024*1,!A.filter(function(ne){return ne.name===Oe.name}).length){se.next=4;break}return C.b.info("".concat(Oe.name,"\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9")),se.abrupt("return");case 4:if(!((Oe==null?void 0:Oe.size)>be)){se.next=7;break}return C.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(be/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),se.abrupt("return",!1);case 7:return A.push({name:Oe.name,file:Oe}),B(Object(M.a)(A)),L.onChange(A),se.abrupt("return",!1);case 11:case"end":return se.stop()}},me)}));function Re(me){return Ce.apply(this,arguments)}return Re}()},de=function(){var Ce=Object(_.a)(c.a.mark(function Re(me,Oe){var be,ce,se,ne,ge,ee,re,Te,ie,q;return c.a.wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return Oe.file_name=me.name,re=me.name,X.next=4,Object(s.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if(Te=X.sent,Te.data=JSON.parse(p(Te.data)),!((Te==null?void 0:Te.status)!==0)){X.next=12;break}return A[A.findIndex(function(he){return he.name===re})].status="error",A[A.findIndex(function(he){return he.name===re})].file.status="error",L.onChange(A),C.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),X.abrupt("return");case 12:return K=new x.a({endpoint:Te==null||((be=Te.data)===null||be===void 0)?void 0:be.end_point,region:Te==null||((ce=Te.data)===null||ce===void 0)?void 0:ce.region,accessKeyId:Te==null||((se=Te.data)===null||se===void 0)?void 0:se.access_key_id,accessKeySecret:Te==null||((ne=Te.data)===null||ne===void 0)?void 0:ne.access_key_secret,bucket:Te==null||((ge=Te.data)===null||ge===void 0)?void 0:ge.bucket,stsToken:Te==null||((ee=Te.data)===null||ee===void 0)?void 0:ee.security_token}),console.log(me,"file"),Z(K),ie=me.name.split("."),ie.pop(),q=Oe.realFileName?ie:Object(l.a)(),X.abrupt("return",new Promise(function(he,fe){try{var Ee;K.multipartUpload("".concat(L.identifier,"/").concat(q).concat(re.indexOf(".")>-1?"."+re.split(".").pop():""),new Blob([me.file],{type:me.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(Qe,et,it){try{console.log("\u8FDB\u5EA6",Qe,et,it);var ut=A.findIndex(function(dt){return dt.name===re});A[ut].file.percent=Qe*100,A[ut].tempCheckpoint=et,B(Object(M.a)(A))}catch(dt){}},checkpoint:A[A.findIndex(function(He){return He.name===re})].tempCheckpoint,callback:{customValue:{id:re+""},url:Te==null||((Ee=Te.data)===null||Ee===void 0)?void 0:Ee.callback_url,host:Te==null?void 0:Te.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(s.e)(Oe)}}).then(function(He){var Qe,et=A.findIndex(function(Ie){return Ie.name===re}),it="done";if(((Qe=He.data)===null||Qe===void 0?void 0:Qe.status)===0){var ut;me.response=(ut=He.data)===null||ut===void 0?void 0:ut.data;var dt=A.findIndex(function(Ie){return Ie.name===re});A[dt].status="done",A[dt].file.status="done"}else{var Fe;C.b.warn((Fe=He.data)===null||Fe===void 0?void 0:Fe.message),it="error"}A[et].status=it,A[et].file.status=it,L.onChange(A),he(He==null?void 0:He.data)}).catch(function(He){A[A.findIndex(function(Qe){return Qe.name===re})].status="error",A[A.findIndex(function(Qe){return Qe.name===re})].file.status="error",C.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),B(Object(M.a)(A)),L.onChange(A),fe(He),console.log("err:",He)})}catch(He){}}));case 19:case"end":return X.stop()}},Re)}));return function(me,Oe){return Ce.apply(this,arguments)}}();return Object(a.useEffect)(function(){A.every(function(Ce){return Ce==="done"||Ce==="error"})&&L.onComplete(A)},[A]),Object(a.useEffect)(function(){if(N){var Ce;(Ce=K)===null||Ce===void 0||Ce.cancel()}},[N]),Object(a.useEffect)(function(){L.uploading&&A.map(function(){var Ce=Object(_.a)(c.a.mark(function Re(me){var Oe,be;return c.a.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:if(!((!me.status||me.status==="error")&&!N)){se.next=6;break}return me.status="uploading",me.file.status="uploading",se.next=5,de(me,{login:F==null||((Oe=F.userInfo)===null||Oe===void 0)?void 0:Oe.login,container_type:L.container_type,container_id:L.container_id,description:L.description,realFileName:L.realFileName});case 5:be=se.sent;case 6:case"end":return se.stop()}},Re)}));return function(Re){return Ce.apply(this,arguments)}}())},[L.uploading]),i.a.createElement(v,Object(k.a)({},ue,{height:L.height,className:L.className}),i.a.createElement("p",{className:"ant-upload-hint"},L.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};J.b=Object(o.a)(function(w){var T=w.loading,F=w.globalSetting,N=w.user;return{globalSetting:F,loading:T.models.competitions,user:N}})(E)},KmYQ:function(H,J,D){(function(k,g,C){H.exports=J=g(D("Ib8C"),D("OLod"))})(this,function(k){return k.pad.ZeroPadding={pad:function(g,C){var M=C*4;g.clamp(),g.sigBytes+=M-(g.sigBytes%M||M)},unpad:function(g){for(var C=g.words,M=g.sigBytes-1,M=g.sigBytes-1;M>=0;M--)if(C[M>>>2]>>>24-M%4*8&255){g.sigBytes=M+1;break}}},k.pad.ZeroPadding})},LdHM:function(H,J,D){"use strict";D.d(J,"b",function(){return r}),D.d(J,"a",function(){return v});var k=D("1OyB"),g=D("vuIU"),C=D("Ji7U"),M=D("LK+K"),m=D("q1tI"),y=D("rePB"),S=D("Ff2n"),_=D("ODXe"),t=D("4IlW"),h=D("bX4T"),n=D("YrtM"),c=D("TSYQ"),a=D.n(c),i=D("+nKL"),s=D("8OUc"),d=function(K,Z){var ue=K.prefixCls,de=K.id,Ce=K.flattenOptions,Re=K.childrenAsData,me=K.values,Oe=K.searchValue,be=K.multiple,ce=K.defaultActiveFirstOption,se=K.height,ne=K.itemHeight,ge=K.notFoundContent,ee=K.open,re=K.menuItemSelectedIcon,Te=K.virtual,ie=K.onSelect,q=K.onToggleOpen,Y=K.onActiveValue,X=K.onScroll,he=K.onMouseEnter,fe="".concat(ue,"-item"),Ee=Object(n.a)(function(){return Ce},[ee,Ce],function(tt,Be){return Be[0]&&tt[1]!==Be[1]}),He=m.useRef(null),Qe=function(Be){Be.preventDefault()},et=function(Be){He.current&&He.current.scrollTo({index:Be})},it=function(Be){for(var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Ne=Ee.length,xe=0;xe<Ne;xe+=1){var Ae=(Be+xe*Pe+Ne)%Ne,Le=Ee[Ae],Me=Le.group,We=Le.data;if(!Me&&!We.disabled)return Ae}return-1},ut=m.useState(function(){return it(0)}),dt=Object(_.a)(ut,2),Fe=dt[0],Ie=dt[1],st=function(Be){Ie(Be);var Pe=Ee[Be];if(!Pe){Y(null,-1);return}Y(Pe.data.value,Be)};m.useEffect(function(){st(ce!==!1?it(0):-1)},[Ee.length,Oe]),m.useEffect(function(){var tt=setTimeout(function(){if(!be&&ee&&me.size===1){var Be=Array.from(me)[0],Pe=Ee.findIndex(function(Ne){var xe=Ne.data;return xe.value===Be});st(Pe),et(Pe)}});return function(){return clearTimeout(tt)}},[ee]);var ft=function(Be){Be!==void 0&&ie(Be,{selected:!me.has(Be)}),be||q(!1)};if(m.useImperativeHandle(Z,function(){return{onKeyDown:function(Be){var Pe=Be.which;switch(Pe){case t.a.UP:case t.a.DOWN:{var Ne=0;if(Pe===t.a.UP?Ne=-1:Pe===t.a.DOWN&&(Ne=1),Ne!==0){var xe=it(Fe+Ne,Ne);et(xe),st(xe)}break}case t.a.ENTER:{var Ae=Ee[Fe];Ae&&!Ae.data.disabled?ft(Ae.data.value):ft(void 0),ee&&Be.preventDefault();break}case t.a.ESC:q(!1)}},onKeyUp:function(){},scrollTo:function(Be){et(Be)}}}),Ee.length===0)return m.createElement("div",{role:"listbox",id:"".concat(de,"_list"),className:"".concat(fe,"-empty"),onMouseDown:Qe},ge);function Ze(tt){var Be=Ee[tt];if(!Be)return null;var Pe=Be.data||{},Ne=Pe.value,xe=Pe.label,Ae=Pe.children,Le=Object(h.a)(Pe,!0),Me=Re?Ae:xe;return Be?m.createElement("div",Object.assign({"aria-label":typeof Me=="string"?Me:null},Le,{key:tt,role:"option",id:"".concat(de,"_list_").concat(tt),"aria-selected":me.has(Ne)}),Ne):null}return m.createElement(m.Fragment,null,m.createElement("div",{role:"listbox",id:"".concat(de,"_list"),style:{height:0,width:0,overflow:"hidden"}},Ze(Fe-1),Ze(Fe),Ze(Fe+1)),m.createElement(i.a,{itemKey:"key",ref:He,data:Ee,height:se,itemHeight:ne,fullHeight:!1,onMouseDown:Qe,onScroll:X,virtual:Te,onMouseEnter:he},function(tt,Be){var Pe,Ne=tt.group,xe=tt.groupOption,Ae=tt.data,Le=Ae.label,Me=Ae.key;if(Ne)return m.createElement("div",{className:a()(fe,"".concat(fe,"-group"))},Le!==void 0?Le:Me);var We=Ae.disabled,nt=Ae.value,vt=Ae.title,bt=Ae.children,Wt=Ae.style,Bt=Ae.className,lr=Object(S.a)(Ae,["disabled","value","title","children","style","className"]),dr=me.has(nt),Ot="".concat(fe,"-option"),Vr=a()(fe,Ot,Bt,(Pe={},Object(y.a)(Pe,"".concat(Ot,"-grouped"),xe),Object(y.a)(Pe,"".concat(Ot,"-active"),Fe===Be&&!We),Object(y.a)(Pe,"".concat(Ot,"-disabled"),We),Object(y.a)(Pe,"".concat(Ot,"-selected"),dr),Pe)),Wr=Re?bt:Le,Yr=!re||typeof re=="function"||dr;return m.createElement("div",Object.assign({},lr,{"aria-selected":dr,className:Vr,title:vt,onMouseMove:function(){if(Fe===Be||We)return;st(Be)},onClick:function(){We||ft(nt)},style:Wt}),m.createElement("div",{className:"".concat(Ot,"-content")},Wr||nt),m.isValidElement(re)||dr,Yr&&m.createElement(s.a,{className:"".concat(fe,"-option-state"),customizeIcon:re,customizeIconProps:{isSelected:dr}},dr?"\u2713":null))}))},f=m.forwardRef(d);f.displayName="OptionList";var l=f,o=function(){return null};o.isSelectOption=!0;var r=o,x=function(){return null};x.isSelectOptGroup=!0;var v=x,p=D("VTBJ"),R=D("Zm9Q");function O(I){var K=I.key,Z=I.props,ue=Z.children,de=Z.value,Ce=Object(S.a)(Z,["children","value"]);return Object(p.a)({key:K,value:de!==void 0?de:K,children:ue},Ce)}function b(I){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(R.a)(I).map(function(Z,ue){if(!m.isValidElement(Z)||!Z.type)return null;var de=Z.type.isSelectOptGroup,Ce=Z.key,Re=Z.props,me=Re.children,Oe=Object(S.a)(Re,["children"]);return K||!de?O(Z):Object(p.a)(Object(p.a)({key:"__RC_SELECT_GRP__".concat(Ce===null?ue:Ce,"__"),label:Ce},Oe),{},{options:b(me)})}).filter(function(Z){return Z})}var E=D("2Qr1"),w=D("qNPg"),T=D("U8pU"),F=D("Kwbf"),N=D("WKfj");function L(I){var K=I.mode,Z=I.options,ue=I.children,de=I.backfill,Ce=I.allowClear,Re=I.placeholder,me=I.getInputElement,Oe=I.showSearch,be=I.onSearch,ce=I.defaultOpen,se=I.autoFocus,ne=I.labelInValue,ge=I.value,ee=I.inputValue,re=I.optionLabelProp,Te=K==="multiple"||K==="tags",ie=Oe!==void 0?Oe:Te||K==="combobox",q=Z||b(ue);if(Object(F.a)(K!=="tags"||q.every(function(fe){return!fe.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),K==="tags"||K==="combobox"){var Y=q.some(function(fe){return fe.options?fe.options.some(function(Ee){return typeof("value"in Ee?Ee.value:Ee.key)=="number"}):typeof("value"in fe?fe.value:fe.key)=="number"});Object(F.a)(!Y,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(F.a)(K!=="combobox"||!re,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(F.a)(K==="combobox"||!de,"`backfill` only works with `combobox` mode."),Object(F.a)(K==="combobox"||!me,"`getInputElement` only work with `combobox` mode."),Object(F.b)(K!=="combobox"||!me||!Ce||!Re,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),be&&!ie&&K!=="combobox"&&K!=="tags"&&Object(F.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(F.b)(!ce||se,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),ge!=null){var X=Object(N.d)(ge);Object(F.a)(!ne||X.every(function(fe){return Object(T.a)(fe)==="object"&&("key"in fe||"value"in fe)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(F.a)(!Te||Array.isArray(ge),"`value` should be array when `mode` is `multiple` or `tags`")}if(ue){var he=null;Object(R.a)(ue).some(function(fe){if(!m.isValidElement(fe)||!fe.type)return!1;var Ee=fe.type;if(Ee.isSelectOption)return!1;if(Ee.isSelectOptGroup){var He=Object(R.a)(fe.props.children).every(function(Qe){return!m.isValidElement(Qe)||!fe.type||Qe.type.isSelectOption?!0:(he=Qe.type,!1)});return!He}return he=Ee,!0}),he&&Object(F.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(he.displayName||he.name||he,"`.")),Object(F.a)(ee===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var G=L,z=Object(w.a)({prefixCls:"rc-select",components:{optionList:l},convertChildrenToData:b,flattenOptions:E.d,getLabeledValue:E.e,filterOptions:E.b,isValueDisabled:E.g,findValueOption:E.c,warningProps:G,fillOptionsWithMissingValue:E.a}),A=function(I){Object(C.a)(Z,I);var K=Object(M.a)(Z);function Z(){var ue;return Object(k.a)(this,Z),ue=K.apply(this,arguments),ue.selectRef=m.createRef(),ue.focus=function(){ue.selectRef.current.focus()},ue.blur=function(){ue.selectRef.current.blur()},ue}return Object(g.a)(Z,[{key:"render",value:function(){return m.createElement(z,Object.assign({ref:this.selectRef},this.props))}}]),Z}(m.Component);A.Option=r,A.OptGroup=v;var B=A,U=J.c=B},M8RZ:function(H,J,D){"use strict";D.d(J,"a",function(){return t});var k=D("fWQN"),g=D("mtLc"),C=D("yKVA"),M=D("879j"),m=D("q1tI"),y=D.n(m),S=D("i8i4"),_=D.n(S),t=function(h){Object(C.a)(c,h);var n=Object(M.a)(c);function c(a){var i;Object(k.a)(this,c),i=n.call(this,a);var s=window.document;return i.node=s.createElement("div"),s.body.appendChild(i.node),i}return Object(g.a)(c,[{key:"render",value:function(){var i=this.props.children;return Object(S.createPortal)(i,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),c}(y.a.Component)},MI8n:function(H,J,D){"use strict";D.d(J,"c",function(){return m}),D.d(J,"b",function(){return t}),D.d(J,"e",function(){return h}),D.d(J,"a",function(){return n}),D.d(J,"d",function(){return c}),D.d(J,"f",function(){return a});var k=D("/cxE"),g=D("pmY6"),C=D("24hK"),M=D("5Y4S"),m;(function(i){i.None=()=>g.a.None;function s(L){return(G,z=null,A)=>{let B=!1,U;return U=L(I=>B?void 0:(U?U.dispose():B=!0,G.call(z,I)),null,A),B&&U.dispose(),U}}i.once=s;function d(L,G){return v((z,A=null,B)=>L(U=>z.call(A,G(U)),null,B))}i.map=d;function f(L,G){return v((z,A=null,B)=>L(U=>{G(U),z.call(A,U)},null,B))}i.forEach=f;function l(L,G){return v((z,A=null,B)=>L(U=>G(U)&&z.call(A,U),null,B))}i.filter=l;function o(L){return L}i.signal=o;function r(...L){return(G,z=null,A)=>Object(g.e)(...L.map(B=>B(U=>G.call(z,U),null,A)))}i.any=r;function x(L,G,z){let A=z;return d(L,B=>(A=G(A,B),A))}i.reduce=x;function v(L){let G;const z=new t({onFirstListenerAdd(){G=L(z.fire,z)},onLastListenerRemove(){G.dispose()}});return z.event}function p(L,G,z=100,A=!1,B){let U,I,K,Z=0;const ue=new t({leakWarningThreshold:B,onFirstListenerAdd(){U=L(de=>{Z++,I=G(I,de),A&&!K&&(ue.fire(I),I=void 0),clearTimeout(K),K=setTimeout(()=>{const Ce=I;I=void 0,K=void 0,(!A||Z>1)&&ue.fire(Ce),Z=0},z)})},onLastListenerRemove(){U.dispose()}});return ue.event}i.debounce=p;function R(L,G=(z,A)=>z===A){let z=!0,A;return l(L,B=>{const U=z||!G(B,A);return z=!1,A=B,U})}i.latch=R;function O(L,G){return[i.filter(L,G),i.filter(L,z=>!G(z))]}i.split=O;function b(L,G=!1,z=[]){let A=z.slice(),B=L(K=>{A?A.push(K):I.fire(K)});const U=()=>{A&&A.forEach(K=>I.fire(K)),A=null},I=new t({onFirstListenerAdd(){B||(B=L(K=>I.fire(K)))},onFirstListenerDidAdd(){A&&(G?setTimeout(U):U())},onLastListenerRemove(){B&&B.dispose(),B=null}});return I.event}i.buffer=b;class E{constructor(L){this.event=L}map(L){return new E(d(this.event,L))}forEach(L){return new E(f(this.event,L))}filter(L){return new E(l(this.event,L))}reduce(L,G){return new E(x(this.event,L,G))}latch(){return new E(R(this.event))}debounce(L,G=100,z=!1,A){return new E(p(this.event,L,G,z,A))}on(L,G,z){return this.event(L,G,z)}once(L,G,z){return s(this.event)(L,G,z)}}function w(L){return new E(L)}i.chain=w;function T(L,G,z=A=>A){const A=(...K)=>I.fire(z(...K)),B=()=>L.on(G,A),U=()=>L.removeListener(G,A),I=new t({onFirstListenerAdd:B,onLastListenerRemove:U});return I.event}i.fromNodeEventEmitter=T;function F(L,G,z=A=>A){const A=(...K)=>I.fire(z(...K)),B=()=>L.addEventListener(G,A),U=()=>L.removeEventListener(G,A),I=new t({onFirstListenerAdd:B,onLastListenerRemove:U});return I.event}i.fromDOMEventEmitter=F;function N(L){return new Promise(G=>s(L)(G))}i.toPromise=N})(m||(m={}));class y{constructor(i){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${i}_${y._idPool++}`}start(i){this._stopWatch=new M.a(!0),this._listenerCount=i}stop(){if(this._stopWatch){const i=this._stopWatch.elapsed();this._elapsedOverall+=i,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${i.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}y._idPool=0;let S=-1;class _{constructor(i,s=Math.random().toString(18).slice(2,5)){this.customThreshold=i,this.name=s,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(i){let s=S;if(typeof this.customThreshold=="number"&&(s=this.customThreshold),s<=0||i<s)return;this._stacks||(this._stacks=new Map);const d=new Error().stack.split(`
`).slice(3).join(`
`),f=this._stacks.get(d)||0;if(this._stacks.set(d,f+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=s*.5;let l,o=0;for(const[r,x]of this._stacks)(!l||o<x)&&(l=r,o=x);console.warn(`[${this.name}] potential listener LEAK detected, having ${i} listeners already. MOST frequent listener (${o}):`),console.warn(l)}return()=>{const l=this._stacks.get(d)||0;this._stacks.set(d,l-1)}}}class t{constructor(i){var s;this._disposed=!1,this._options=i,this._leakageMon=S>0?new _(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((s=this._options)===null||s===void 0?void 0:s._profName)?new y(this._options._profName):void 0}get event(){return this._event||(this._event=(i,s,d)=>{var f;this._listeners||(this._listeners=new C.a);const l=this._listeners.isEmpty();l&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const o=this._listeners.push(s?[i,s]:i);l&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,i,s);const r=(f=this._leakageMon)===null||f===void 0?void 0:f.check(this._listeners.size),x=Object(g.i)(()=>{if(r&&r(),!this._disposed&&(o(),this._options&&this._options.onLastListenerRemove)){const v=this._listeners&&!this._listeners.isEmpty();v||this._options.onLastListenerRemove(this)}});return d instanceof g.b?d.add(x):Array.isArray(d)&&d.push(x),x}),this._event}fire(i){var s,d;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new C.a);for(let f of this._listeners)this._deliveryQueue.push([f,i]);for((s=this._perfMon)===null||s===void 0||s.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[f,l]=this._deliveryQueue.shift();try{typeof f=="function"?f.call(void 0,l):f[0].call(f[1],l)}catch(o){Object(k.f)(o)}}(d=this._perfMon)===null||d===void 0||d.stop()}}dispose(){var i,s,d,f,l;this._disposed||(this._disposed=!0,(i=this._listeners)===null||i===void 0||i.clear(),(s=this._deliveryQueue)===null||s===void 0||s.clear(),(f=(d=this._options)===null||d===void 0?void 0:d.onLastListenerRemove)===null||f===void 0||f.call(d),(l=this._leakageMon)===null||l===void 0||l.dispose())}}class h extends t{constructor(i){super(i);this._isPaused=0,this._eventQueue=new C.a,this._mergeFn=i==null?void 0:i.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const i=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(i))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(i){this._listeners&&(this._isPaused!==0?this._eventQueue.push(i):super.fire(i))}}class n extends h{constructor(i){var s;super(i);this._delay=(s=i.delay)!==null&&s!==void 0?s:100}fire(i){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(i)}}class c{constructor(){this.buffers=[]}wrapEvent(i){return(s,d,f)=>i(l=>{const o=this.buffers[this.buffers.length-1];o?o.push(()=>s.call(d,l)):s.call(d,l)},void 0,f)}bufferEvents(i){const s=[];this.buffers.push(s);const d=i();return this.buffers.pop(),s.forEach(f=>f()),d}}class a{constructor(){this.listening=!1,this.inputEvent=m.None,this.inputEventListener=g.a.None,this.emitter=new t({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(i){this.inputEvent=i,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=i(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(H,J,D){"use strict";(function(k,g){D.d(J,"b",function(){return d}),D.d(J,"i",function(){return r}),D.d(J,"f",function(){return x}),D.d(J,"d",function(){return v}),D.d(J,"g",function(){return p}),D.d(J,"h",function(){return R}),D.d(J,"c",function(){return O}),D.d(J,"k",function(){return b}),D.d(J,"j",function(){return E}),D.d(J,"a",function(){return w}),D.d(J,"e",function(){return N});var C;const M="en";let m=!1,y=!1,S=!1,_=!1,t=!1,h=!1,n=!1,c,a=M,i,s;const d=typeof self=="object"?self:typeof k=="object"?k:{};let f;typeof d.vscode!="undefined"&&typeof d.vscode.process!="undefined"?f=d.vscode.process:typeof g!="undefined"&&(f=g);const l=typeof((C=f==null?void 0:f.versions)===null||C===void 0?void 0:C.electron)=="string"&&f.type==="renderer";if(typeof navigator=="object"&&!l)s=navigator.userAgent,m=s.indexOf("Windows")>=0,y=s.indexOf("Macintosh")>=0,n=(s.indexOf("Macintosh")>=0||s.indexOf("iPad")>=0||s.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,S=s.indexOf("Linux")>=0,h=!0,c=navigator.language,a=c;else if(typeof f=="object"){m=f.platform==="win32",y=f.platform==="darwin",S=f.platform==="linux",_=S&&!!f.env.SNAP&&!!f.env.SNAP_REVISION,c=M,a=M;const L=f.env.VSCODE_NLS_CONFIG;if(L)try{const G=JSON.parse(L),z=G.availableLanguages["*"];c=G.locale,a=z||M,i=G._translationsConfigFile}catch(G){}t=!0}else console.error("Unable to resolve platform.");let o=0;y?o=1:m?o=3:S&&(o=2);const r=m,x=y,v=S,p=t,R=h,O=n,b=s,E=function(){if(d.setImmediate)return d.setImmediate.bind(d);if(typeof d.postMessage=="function"&&!d.importScripts){let z=[];d.addEventListener("message",B=>{if(B.data&&B.data.vscodeSetImmediateId)for(let U=0,I=z.length;U<I;U++){const K=z[U];if(K.id===B.data.vscodeSetImmediateId){z.splice(U,1),K.callback();return}}});let A=0;return B=>{const U=++A;z.push({id:U,callback:B}),d.postMessage({vscodeSetImmediateId:U},"*")}}if(typeof(f==null?void 0:f.nextTick)=="function")return f.nextTick.bind(f);const G=Promise.resolve();return z=>G.then(z)}(),w=y||n?2:m?1:3;let T=!0,F=!1;function N(){if(!F){F=!0;const L=new Uint8Array(2);L[0]=1,L[1]=2;const G=new Uint16Array(L.buffer);T=G[0]===(2<<8)+1}return T}}).call(this,D("IyRk"),D("Q2Ig"))},MlIO:function(H,J,D){(function(k,g){H.exports=J=g(D("Ib8C"))})(this,function(k){return function(g){var C=k,M=C.lib,m=M.Base,y=M.WordArray,S=C.x64={},_=S.Word=m.extend({init:function(h,n){this.high=h,this.low=n}}),t=S.WordArray=m.extend({init:function(h,n){h=this.words=h||[],n!=g?this.sigBytes=n:this.sigBytes=h.length*8},toX32:function(){for(var h=this.words,n=h.length,c=[],a=0;a<n;a++){var i=h[a];c.push(i.high),c.push(i.low)}return y.create(c,this.sigBytes)},clone:function(){for(var h=m.clone.call(this),n=h.words=this.words.slice(0),c=n.length,a=0;a<c;a++)n[a]=n[a].clone();return h}})}(),k})},N0LK:function(H,J,D){"use strict";D.d(J,"C",function(){return k}),D.d(J,"v",function(){return C}),D.d(J,"s",function(){return M}),D.d(J,"t",function(){return m}),D.d(J,"U",function(){return y}),D.d(J,"J",function(){return S}),D.d(J,"O",function(){return _}),D.d(J,"p",function(){return t}),D.d(J,"T",function(){return h}),D.d(J,"q",function(){return n}),D.d(J,"N",function(){return c}),D.d(J,"M",function(){return a}),D.d(J,"Q",function(){return i}),D.d(J,"u",function(){return s}),D.d(J,"x",function(){return d}),D.d(J,"I",function(){return f}),D.d(J,"f",function(){return l}),D.d(J,"h",function(){return o}),D.d(J,"g",function(){return r}),D.d(J,"i",function(){return x}),D.d(J,"G",function(){return v}),D.d(J,"H",function(){return p}),D.d(J,"r",function(){return R}),D.d(J,"R",function(){return O}),D.d(J,"d",function(){return b}),D.d(J,"e",function(){return E}),D.d(J,"E",function(){return w}),D.d(J,"F",function(){return T}),D.d(J,"j",function(){return F}),D.d(J,"z",function(){return N}),D.d(J,"K",function(){return G}),D.d(J,"L",function(){return z}),D.d(J,"m",function(){return B}),D.d(J,"k",function(){return I}),D.d(J,"A",function(){return Z}),D.d(J,"a",function(){return ue}),D.d(J,"n",function(){return de}),D.d(J,"l",function(){return Ce}),D.d(J,"D",function(){return Re}),D.d(J,"B",function(){return me}),D.d(J,"b",function(){return Oe}),D.d(J,"S",function(){return be}),D.d(J,"o",function(){return ce}),D.d(J,"P",function(){return se}),D.d(J,"w",function(){return ne}),D.d(J,"c",function(){return ge}),D.d(J,"y",function(){return Te});function k(X){return!X||typeof X!="string"?!0:X.trim().length===0}const g=/{(\d+)}/g;function C(X,...he){return he.length===0?X:X.replace(g,function(fe,Ee){const He=parseInt(Ee,10);return isNaN(He)||He<0||He>=he.length?fe:he[He]})}function M(X){return X.replace(/[<>&]/g,function(he){switch(he){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return he}})}function m(X){return X.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function y(X,he=" "){const fe=S(X,he);return _(fe,he)}function S(X,he){if(!X||!he)return X;const fe=he.length;if(fe===0||X.length===0)return X;let Ee=0;for(;X.indexOf(he,Ee)===Ee;)Ee=Ee+fe;return X.substring(Ee)}function _(X,he){if(!X||!he)return X;const fe=he.length,Ee=X.length;if(fe===0||Ee===0)return X;let He=Ee,Qe=-1;for(;!(Qe=X.lastIndexOf(he,He-1),Qe===-1||Qe+fe!==He);){if(Qe===0)return"";He=Qe}return X.substring(0,He)}function t(X){return X.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function h(X){return X.replace(/\*/g,"")}function n(X,he,fe={}){if(!X)throw new Error("Cannot create regex from empty string");he||(X=m(X)),fe.wholeWord&&(/\B/.test(X.charAt(0))||(X="\\b"+X),/\B/.test(X.charAt(X.length-1))||(X=X+"\\b"));let Ee="";return fe.global&&(Ee+="g"),fe.matchCase||(Ee+="i"),fe.multiline&&(Ee+="m"),fe.unicode&&(Ee+="u"),new RegExp(X,Ee)}function c(X){if(X.source==="^"||X.source==="^$"||X.source==="$"||X.source==="^\\s*$")return!1;const he=X.exec("");return!!(he&&X.lastIndex===0)}function a(X){return(X.global?"g":"")+(X.ignoreCase?"i":"")+(X.multiline?"m":"")+(X.unicode?"u":"")}function i(X){return X.split(/\r\n|\r|\n/)}function s(X){for(let he=0,fe=X.length;he<fe;he++){const Ee=X.charCodeAt(he);if(Ee!==32&&Ee!==9)return he}return-1}function d(X,he=0,fe=X.length){for(let Ee=he;Ee<fe;Ee++){const He=X.charCodeAt(Ee);if(He!==32&&He!==9)return X.substring(he,Ee)}return X.substring(he,fe)}function f(X,he=X.length-1){for(let fe=he;fe>=0;fe--){const Ee=X.charCodeAt(fe);if(Ee!==32&&Ee!==9)return fe}return-1}function l(X,he){return X<he?-1:X>he?1:0}function o(X,he,fe=0,Ee=X.length,He=0,Qe=he.length){for(;fe<Ee&&He<Qe;fe++,He++){let ut=X.charCodeAt(fe),dt=he.charCodeAt(He);if(ut<dt)return-1;if(ut>dt)return 1}const et=Ee-fe,it=Qe-He;return et<it?-1:et>it?1:0}function r(X,he){return x(X,he,0,X.length,0,he.length)}function x(X,he,fe=0,Ee=X.length,He=0,Qe=he.length){for(;fe<Ee&&He<Qe;fe++,He++){let ut=X.charCodeAt(fe),dt=he.charCodeAt(He);if(ut===dt)continue;if(ut>=128||dt>=128)return o(X.toLowerCase(),he.toLowerCase(),fe,Ee,He,Qe);v(ut)&&(ut-=32),v(dt)&&(dt-=32);const Fe=ut-dt;if(Fe===0)continue;return Fe}const et=Ee-fe,it=Qe-He;return et<it?-1:et>it?1:0}function v(X){return X>=97&&X<=122}function p(X){return X>=65&&X<=90}function R(X,he){return X.length===he.length&&x(X,he)===0}function O(X,he){const fe=he.length;return he.length>X.length?!1:x(X,he,0,fe)===0}function b(X,he){let fe,Ee=Math.min(X.length,he.length);for(fe=0;fe<Ee;fe++)if(X.charCodeAt(fe)!==he.charCodeAt(fe))return fe;return Ee}function E(X,he){let fe,Ee=Math.min(X.length,he.length);const He=X.length-1,Qe=he.length-1;for(fe=0;fe<Ee;fe++)if(X.charCodeAt(He-fe)!==he.charCodeAt(Qe-fe))return fe;return Ee}function w(X){return 55296<=X&&X<=56319}function T(X){return 56320<=X&&X<=57343}function F(X,he){return(X-55296<<10)+(he-56320)+65536}function N(X,he,fe){const Ee=X.charCodeAt(fe);if(w(Ee)&&fe+1<he){const He=X.charCodeAt(fe+1);if(T(He))return F(Ee,He)}return Ee}function L(X,he){const fe=X.charCodeAt(he-1);if(T(fe)&&he>1){const Ee=X.charCodeAt(he-2);if(w(Ee))return F(Ee,fe)}return fe}function G(X,he){const fe=ee.getInstance(),Ee=he,He=X.length,Qe=N(X,He,he);he+=Qe>=65536?2:1;let et=fe.getGraphemeBreakType(Qe);for(;he<He;){const it=N(X,He,he),ut=fe.getGraphemeBreakType(it);if(ge(et,ut))break;he+=it>=65536?2:1,et=ut}return he-Ee}function z(X,he){const fe=ee.getInstance(),Ee=he,He=L(X,he);he-=He>=65536?2:1;let Qe=fe.getGraphemeBreakType(He);for(;he>0;){const et=L(X,he),it=fe.getGraphemeBreakType(et);if(ge(it,Qe))break;he-=et>=65536?2:1,Qe=it}return Ee-he}const A=/(?:[\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 A.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 I(X){return U.test(X)}const K=/^[\t\n\r\x20-\x7E]*$/;function Z(X){return K.test(X)}const ue=/[\u2028\u2029]/;function de(X){return ue.test(X)}function Ce(X){for(let he=0,fe=X.length;he<fe;he++)if(Re(X.charCodeAt(he)))return!0;return!1}function Re(X){return X=+X,X>=11904&&X<=55215||X>=63744&&X<=64255||X>=65281&&X<=65374}function me(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 Oe=String.fromCharCode(65279);function be(X){return!!(X&&X.length>0&&X.charCodeAt(0)===65279)}function ce(X,he=!1){return X?(he&&(X=X.replace(/\\./g,"")),X.toLowerCase()!==X):!1}function se(X){const he=90-65+1;return X=X%(2*he),X<he?String.fromCharCode(97+X):String.fromCharCode(65+X-he)}function ne(X){const he=ee.getInstance();return he.getGraphemeBreakType(X)}function ge(X,he){return X===0?he!==5&&he!==7:X===2&&he===3?!1:X===4||X===2||X===3||(he===4||he===2||he===3)?!0:X===8&&(he===8||he===9||he===11||he===12)||((X===11||X===9)&&(he===9||he===10)||((X===12||X===10)&&he===10||(he===5||he===13||(he===7||(X===1||X===13&&he===14)))))?!1:!(X===6&&he===6)}class ee{constructor(){this._data=re()}static getInstance(){return ee._INSTANCE||(ee._INSTANCE=new ee),ee._INSTANCE}getGraphemeBreakType(X){if(X<32)return X===10?3:X===13?2:4;if(X<127)return 0;const he=this._data,fe=he.length/3;let Ee=1;for(;Ee<=fe;)if(X<he[3*Ee])Ee=2*Ee;else if(X>he[3*Ee+1])Ee=2*Ee+1;else return he[3*Ee+2];return 0}}ee._INSTANCE=null;function re(){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 Te(X,he){if(X===0)return 0;const fe=ie(X,he);if(fe!==void 0)return fe;const Ee=L(he,X);return X-=q(Ee),X}function ie(X,he){let fe=L(he,X);for(X-=q(fe);Y(fe)||fe===65039||fe===8419;){if(X===0)return;fe=L(he,X),X-=q(fe)}if(!me(fe))return;if(X>=0){const Ee=L(he,X);Ee===8205&&(X-=q(Ee))}return X}function q(X){return X>=65536?2:1}function Y(X){return 127995<=X&&X<=127999}},NFKh:function(H,J,D){(function(k,g,C){H.exports=J=g(D("Ib8C"),D("MlIO"),D("F+F2"),D("qM6L"),D("ETIr"),D("wbyO"),D("cv67"),D("3y9D"),D("lPiR"),D("GRuw"),D("1uat"),D("uGsb"),D("5hvy"),D("ELcG"),D("WYAk"),D("e7zE"),D("K3mO"),D("OLod"),D("ALsQ"),D("9OqN"),D("qu8F"),D("S6kV"),D("gb/T"),D("qBft"),D("oRuE"),D("jO9C"),D("KmYQ"),D("uGxW"),D("bQjk"),D("wZgz"),D("pA7S"),D("w7YG"),D("E4JC"),D("PVpz"))})(this,function(k){return k})},NLgs:function(H,J,D){"use strict";D.d(J,"e",function(){return f}),D.d(J,"f",function(){return l}),D.d(J,"d",function(){return r}),D.d(J,"c",function(){return x}),D.d(J,"a",function(){return v}),D.d(J,"b",function(){return p});var k=D("miYZ"),g=D("tsqr"),C=D("9og8"),M=D("2qtc"),m=D("kLXV"),y=D("WmNS"),S=D.n(y),_=D("q1tI"),t=D.n(_),h=D("9kvl"),n=D("xKgJ"),c=D("1vsH"),a=D("RCxd"),i=D("yTi+"),s=D.n(i),d=D("m3rI"),f=function(O){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!!(l(O)&&o(b))},l=function(O){return Object(n.p)()?!0:(O({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},o=function(){var O,b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,E=Object(h.c)()._store.getState(),w=E.user;return(O=w.userInfo)!==null&&O!==void 0&&O.profile_completed?!0:(m.a.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:b?"\u6309\u7167\u6709\u5173\u653F\u7B56\u89C4\u5B9A\uFF0C\u7279\u6B8A\u5B9E\u9A8C\u9700\u8981\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u624D\u80FD\u4F7F\u7528\uFF0C\u8BF7\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u7801":"\u60A8\u9700\u8981\u53BB\u5B8C\u5584\u60A8\u7684\u4E2A\u4EBA\u8D44\u6599\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD",okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){h.d.push("/account/profile/edit")}}),!1)},r=function(){var O,b=Object(h.c)()._store.getState(),E=b.user;return(O=E.userInfo)!==null&&O!==void 0&&O.professional_certification?!0:(m.a.confirm({title:"\u63D0\u793A",centered:!0,content:t.a.createElement("div",{className:"tc"},"\u60A8\u9700\u8981\u53BB\u5B8C\u6210\u60A8\u7684\u804C\u4E1A\u8BA4\u8BC1\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD"),okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){Object(c.S)("/account/certification")}}),!1)},x=function(){var O;if(Object(n.a)())return!0;var b=Object(h.c)()._store.getState(),E=b.user,w=b.globalSetting;return m.a.warning({centered:!0,width:530,title:"\u63D0\u793A",content:t.a.createElement("div",{className:"tc",style:{marginLeft:-38}},t.a.createElement("p",null,"\u626B\u7801\u6DFB\u52A0\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650"),t.a.createElement("img",{src:d.a.IMG_SERVER+(w==null||((O=w.setting)===null||O===void 0)?void 0:O.authority_qrcode_url),width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1},v=function(O,b){var E;if(O)return!0;var w=Object(h.c)()._store.getState(),T=w.user,F=w.globalSetting;return m.a.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:t.a.createElement("div",null,t.a.createElement("p",null,b||"\u8BE5\u5B9E\u8DF5\u8D44\u6E90\u9700\u6388\u6743\u540E\u624D\u53EF\u4F7F\u7528\u3002 \u60A8\u53EF\u4EE5\u5728QQ\u670D\u52A1\u7FA4\u5411\u7BA1\u7406\u5458\u7533\u8BF7\uFF0C\u83B7\u5F97\u7EE7\u7EED\u64CD\u4F5C\u7684\u6743\u9650\u3002"),t.a.createElement("div",{style:{marginLeft:"110px"}},t.a.createElement("img",{src:d.a.IMG_SERVER+(F==null||((E=F.setting)===null||E===void 0)?void 0:E.authority_qrcode_url),width:200}),t.a.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:function(){Object(c.S)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1},p=function(O){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",E=Object(h.c)()._store.getState(),w=E.shixunsDetail.detail;return(w==null?void 0:w.public)===2||(w==null?void 0:w.public)===1||(w==null?void 0:w.shixun_status)===3?(m.a.info({centered:!0,icon:t.a.createElement(a.a,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:t.a.createElement("div",{className:"tc",style:{marginLeft:-38}},t.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},t.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",(w==null?void 0:w.public)===2?"\u5DF2\u516C\u5F00":(w==null?void 0:w.public)===1?"\u5F85\u5BA1\u6838":"\u5DF2\u5173\u95ED","\uFF0C",b,"\u3002"),t.a.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),t.a.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:s.a,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0):(w==null?void 0:w.shixun_status)===2?(m.a.confirm({centered:!0,icon:t.a.createElement(a.a,null),title:"\u63D0\u793A",content:t.a.createElement("div",null,t.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",b,"\u3002"),t.a.createElement("br",null),t.a.createElement("span",null,"\u5982\u6709\u9700\u8981\uFF0C\u60A8\u53EF\u4EE5\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u518D\u8FDB\u884C\u64CD\u4F5C\u3002")),okText:"\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){m.a.confirm({width:440,centered:!0,icon:t.a.createElement(a.a,{style:{color:"#faad14"}}),title:"\u63D0\u793A",content:"\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u5B66\u5458\u5C06\u65E0\u6CD5\u8FDB\u884C\u7EC3\u4E60\u3002\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F",okText:"\u786E\u5B9A\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){var F=Object(C.a)(S.a.mark(function L(){var G;return S.a.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.next=2,O({type:"shixunsDetail/cancelRelease",payload:{id:w==null?void 0:w.identifier}});case 2:G=A.sent,G.status!==401&&(g.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),O({type:"shixunsDetail/getShixunsDetail",payload:{id:w==null?void 0:w.identifier}}),O({type:"practiceSetting/getCommonData",payload:{id:w==null?void 0:w.identifier}}));case 4:case"end":return A.stop()}},L)}));function N(){return F.apply(this,arguments)}return N}()})}}),!0):!1}},NnUe:function(H,J,D){H.exports={modal:"modal___sZeHv",colorBlue:"colorBlue___3FmfG",formWrap:"formWrap___3YEqH",flexRow:"flexRow___37Sa0",flexColumn:"flexColumn___1ykGy",example:"example___7mYRk",exampleImg:"exampleImg___UGH9Y",colorOrange:"colorOrange___1IJLa",uploader:"uploader___3f2Sm",uploadImg:"uploadImg___3WCoA",imageTip:"imageTip___FhklW",uploadTipIcon:"uploadTipIcon___2YZJx",uploadTip:"uploadTip___1eikX",color05101a:"color05101a___1Nuwt",viewLargerImg:"viewLargerImg___Ek8jW",footerWrap:"footerWrap___F9F0q",note:"note___1U6xc",schoolHintWrap:"schoolHintWrap___31S22",colorCDCDCD:"colorCDCDCD___1KqvR",color0152d9:"color0152d9___1YXxu"}},NvD2:function(H,J,D){"use strict";D.d(J,"a",function(){return y});var k=D("Kwbf");function g(S,_){var t=new Set;return S.forEach(function(h){_.has(h)||t.add(h)}),t}function C(S){var _=S||{},t=_.disabled,h=_.disableCheckbox,n=_.checkable;return!!(t||h)||n===!1}function M(S,_,t,h){for(var n=new Set(S),c=new Set,a=0;a<=t;a+=1){var i=_.get(a)||new Set;i.forEach(function(l){var o=l.key,r=l.node,x=l.children,v=x===void 0?[]:x;n.has(o)&&!h(r)&&v.filter(function(p){return!h(p.node)}).forEach(function(p){n.add(p.key)})})}for(var s=new Set,d=t;d>=0;d-=1){var f=_.get(d)||new Set;f.forEach(function(l){var o=l.parent,r=l.node;if(h(r)||!l.parent||s.has(l.parent.key))return;if(h(l.parent.node)){s.add(o.key);return}var x=!0,v=!1;(o.children||[]).filter(function(p){return!h(p.node)}).forEach(function(p){var R=p.key,O=n.has(R);x&&!O&&(x=!1),!v&&(O||c.has(R))&&(v=!0)}),x&&n.add(o.key),v&&c.add(o.key),s.add(o.key)})}return{checkedKeys:Array.from(n),halfCheckedKeys:Array.from(g(c,n))}}function m(S,_,t,h,n){for(var c=new Set(S),a=new Set(_),i=0;i<=h;i+=1){var s=t.get(i)||new Set;s.forEach(function(o){var r=o.key,x=o.node,v=o.children,p=v===void 0?[]:v;!c.has(r)&&!a.has(r)&&!n(x)&&p.filter(function(R){return!n(R.node)}).forEach(function(R){c.delete(R.key)})})}a=new Set;for(var d=new Set,f=h;f>=0;f-=1){var l=t.get(f)||new Set;l.forEach(function(o){var r=o.parent,x=o.node;if(n(x)||!o.parent||d.has(o.parent.key))return;if(n(o.parent.node)){d.add(r.key);return}var v=!0,p=!1;(r.children||[]).filter(function(R){return!n(R.node)}).forEach(function(R){var O=R.key,b=c.has(O);v&&!b&&(v=!1),!p&&(b||a.has(O))&&(p=!0)}),v||c.delete(r.key),p&&a.add(r.key),d.add(r.key)})}return{checkedKeys:Array.from(c),halfCheckedKeys:Array.from(g(a,c))}}function y(S,_,t,h){var n=[],c;h?c=h:c=C;var a=new Set(S.filter(function(f){var l=!!t[f];return l||n.push(f),l})),i=new Map,s=0;Object.keys(t).forEach(function(f){var l=t[f],o=l.level,r=i.get(o);r||(r=new Set,i.set(o,r)),r.add(l),s=Math.max(s,o)}),Object(k.a)(!n.length,"Tree missing follow keys: ".concat(n.slice(0,100).map(function(f){return"'".concat(f,"'")}).join(", ")));var d;return _===!0?d=M(a,i,s,c):d=m(a,_.halfCheckedKeys,i,s,c),d}},OLod:function(H,J,D){(function(k,g,C){H.exports=J=g(D("Ib8C"),D("K3mO"))})(this,function(k){k.lib.Cipher||function(g){var C=k,M=C.lib,m=M.Base,y=M.WordArray,S=M.BufferedBlockAlgorithm,_=C.enc,t=_.Utf8,h=_.Base64,n=C.algo,c=n.EvpKDF,a=M.Cipher=S.extend({cfg:m.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(){S.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"?E:R}return function(T){return{encrypt:function(F,N,L){return w(N).encrypt(T,F,N,L)},decrypt:function(F,N,L){return w(N).decrypt(T,F,N,L)}}}}()}),i=M.StreamCipher=a.extend({_doFinalize:function(){var w=this._process(!0);return w},blockSize:1}),s=C.mode={},d=M.BlockCipherMode=m.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}}),f=s.CBC=function(){var w=d.extend();w.Encryptor=w.extend({processBlock:function(F,N){var L=this._cipher,G=L.blockSize;T.call(this,F,N,G),L.encryptBlock(F,N),this._prevBlock=F.slice(N,N+G)}}),w.Decryptor=w.extend({processBlock:function(F,N){var L=this._cipher,G=L.blockSize,z=F.slice(N,N+G);L.decryptBlock(F,N),T.call(this,F,N,G),this._prevBlock=z}});function T(F,N,L){var G,z=this._iv;z?(G=z,this._iv=g):G=this._prevBlock;for(var A=0;A<L;A++)F[N+A]^=G[A]}return w}(),l=C.pad={},o=l.Pkcs7={pad:function(w,T){for(var F=T*4,N=F-w.sigBytes%F,L=N<<24|N<<16|N<<8|N,G=[],z=0;z<N;z+=4)G.push(L);var A=y.create(G,N);w.concat(A)},unpad:function(w){var T=w.words[w.sigBytes-1>>>2]&255;w.sigBytes-=T}},r=M.BlockCipher=a.extend({cfg:a.cfg.extend({mode:f,padding:o}),reset:function(){var w;a.reset.call(this);var T=this.cfg,F=T.iv,N=T.mode;this._xformMode==this._ENC_XFORM_MODE?w=N.createEncryptor:(w=N.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==w?this._mode.init(this,F&&F.words):(this._mode=w.call(N,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}),x=M.CipherParams=m.extend({init:function(w){this.mixIn(w)},toString:function(w){return(w||this.formatter).stringify(this)}}),v=C.format={},p=v.OpenSSL={stringify:function(w){var T,F=w.ciphertext,N=w.salt;return N?T=y.create([1398893684,1701076831]).concat(N).concat(F):T=F,T.toString(h)},parse:function(w){var T,F=h.parse(w),N=F.words;return N[0]==1398893684&&N[1]==1701076831&&(T=y.create(N.slice(2,4)),N.splice(0,4),F.sigBytes-=16),x.create({ciphertext:F,salt:T})}},R=M.SerializableCipher=m.extend({cfg:m.extend({format:p}),encrypt:function(w,T,F,N){N=this.cfg.extend(N);var L=w.createEncryptor(F,N),G=L.finalize(T),z=L.cfg;return x.create({ciphertext:G,key:F,iv:z.iv,algorithm:w,mode:z.mode,padding:z.padding,blockSize:w.blockSize,formatter:N.format})},decrypt:function(w,T,F,N){N=this.cfg.extend(N),T=this._parse(T,N.format);var L=w.createDecryptor(F,N).finalize(T.ciphertext);return L},_parse:function(w,T){return typeof w=="string"?T.parse(w,this):w}}),O=C.kdf={},b=O.OpenSSL={execute:function(w,T,F,N){N||(N=y.random(64/8));var L=c.create({keySize:T+F}).compute(w,N),G=y.create(L.words.slice(T),F*4);return L.sigBytes=T*4,x.create({key:L,iv:G,salt:N})}},E=M.PasswordBasedCipher=R.extend({cfg:R.cfg.extend({kdf:b}),encrypt:function(w,T,F,N){N=this.cfg.extend(N);var L=N.kdf.execute(F,w.keySize,w.ivSize);N.iv=L.iv;var G=R.encrypt.call(this,w,T,L.key,N);return G.mixIn(L),G},decrypt:function(w,T,F,N){N=this.cfg.extend(N),T=this._parse(T,N.format);var L=N.kdf.execute(F,w.keySize,w.ivSize,T.salt);N.iv=L.iv;var G=R.decrypt.call(this,w,T,L.key,N);return G}})}()})},OZM5:function(H,J,D){"use strict";D.d(J,"b",function(){return h}),D.d(J,"a",function(){return n}),D.d(J,"k",function(){return c}),D.d(J,"h",function(){return a}),D.d(J,"i",function(){return i}),D.d(J,"g",function(){return s}),D.d(J,"c",function(){return d}),D.d(J,"d",function(){return f}),D.d(J,"j",function(){return r}),D.d(J,"e",function(){return x}),D.d(J,"f",function(){return v});var k=D("KQm4"),g=D("U8pU"),C=D("Ff2n"),M=D("q1tI"),m=D.n(M),y=D("Kwbf"),S=D("WaYH"),_=.25,t=2;function h(p,R){var O=p.slice(),b=O.indexOf(R);return b>=0&&O.splice(b,1),O}function n(p,R){var O=p.slice();return O.indexOf(R)===-1&&O.push(R),O}function c(p){return p.split("-")}function a(p,R){return"".concat(p,"-").concat(R)}function i(p){return p&&p.type&&p.type.isTreeNode}function s(p,R){var O=[p],b=R[p];function E(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];w.forEach(function(T){var F=T.key,N=T.children;O.push(F),E(N)})}return E(b.children),O}function d(p,R){var O=p.clientY,b=R.selectHandle.getBoundingClientRect(),E=b.top,w=b.bottom,T=b.height,F=Math.max(T*_,t);return O<=E+F?-1:O>=w-F?1:0}function f(p,R){if(!p)return;var O=R.multiple;return O?p.slice():p.length?[p[0]]:p}var l=function(R){return R};function o(p,R){if(!p)return[];var O=R||{},b=O.processProps,E=b===void 0?l:b,w=Array.isArray(p)?p:[p];return w.map(function(T){var F=T.children,N=Object(C.a)(T,["children"]),L=o(F,R);return m.a.createElement(S.a,Object.assign({},E(N)),L)})}function r(p){if(!p)return null;var R;if(Array.isArray(p))R={checkedKeys:p,halfCheckedKeys:void 0};else if(Object(g.a)(p)==="object")R={checkedKeys:p.checked||void 0,halfCheckedKeys:p.halfChecked||void 0};else return Object(y.a)(!1,"`checkedKeys` is not an array or an object"),null;return R}function x(p,R){var O=new Set;function b(E){if(O.has(E))return;var w=R[E];if(!w)return;O.add(E);var T=w.parent,F=w.node;if(F.disabled)return;T&&b(T.key)}return(p||[]).forEach(function(E){b(E)}),Object(k.a)(O)}function v(p){var R={};return Object.keys(p).forEach(function(O){(O.startsWith("data-")||O.startsWith("aria-"))&&(R[O]=p[O])}),R}},Ot1p:function(H,J,D){"use strict";var k=D("2qtc"),g=D("kLXV"),C=D("rAM+"),M=D("miYZ"),m=D("tsqr"),y=D("9og8"),S=D("tJVT"),_=D("jrin"),t=D("WmNS"),h=D.n(t),n=D("q1tI"),c=D.n(n),a=D("VrN/"),i=D.n(a),s=D("bdgK"),d=D("p77/"),f=D("Bd2K"),l=D("ELLl"),o=D("19Vz"),r=D("lZu9"),x=D("+NIl"),v=D("kSUc"),p=D("9Bee"),R=function(We){var nt=We.value,vt=nt===void 0?"":nt,bt=We.className,Wt=We.showTextOnly,Bt=We.showLines,lr=We.style,dr=lr===void 0?{}:lr,Ot=Object(n.useMemo)(function(){return""},[vt]);return c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{dangerouslySetInnerHTML:{__html:Ot}}))},O=D("0Owb"),b=D("dejd"),E=D("C+DQ"),w=D("1vsH"),T=D("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 N(We){var nt=We.onActionCallback,vt=We.title,bt=We.icon,Wt=We.actionName,Bt=We.className,lr=Bt===void 0?"":Bt,dr=We.children;function Ot(){nt(Wt)}return c.a.createElement("a",{title:vt,className:lr,onClick:Ot},c.a.createElement("i",{className:"md-iconfont ".concat(bt)}),dr)}var L=function(We){var nt=We.watch,vt=We.showNullButton,bt=We.onActionCallback,Wt=We.fullScreen,Bt=We.insertTemp,lr=We.hidetoolBar,dr=We.uuid,Ot=We.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(dr,"&api=").concat(encodeURIComponent(T.a.PROXY_SERVER)));var Vr=[].concat(F,[{title:"".concat(nt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(nt?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return c.a.createElement("ul",{className:"markdown-toolbar-container"},!lr&&Vr.map(function(Wr,Yr){return c.a.createElement("li",{key:Yr},Wr.actionName?c.a.createElement(N,Object(O.a)({},Wr,{onActionCallback:bt})):c.a.createElement("span",{className:"v-line"}))}),vt?c.a.createElement("li",null,c.a.createElement(N,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:bt},c.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Bt&&c.a.createElement("li",null,c.a.createElement(N,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(Bt),onActionCallback:bt},c.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),c.a.createElement("li",{className:"btn-full-screen"},c.a.createElement(N,{icon:"".concat(Wt?"icon-shrink":"icon-enlarge"),title:Wt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:bt})))},G=D("M8RZ"),z=D("+L6B"),A=D("2/Rp"),B=D("y8nQ"),U=D("Vl3Y"),I=D("5NDa"),K=D("5rEg"),Z={labelCol:{span:4},wrapperCol:{span:20}},ue=function(We){var nt=We.callback,vt=We.onCancel;function bt(Wt){nt(Wt)}return c.a.createElement(U.a,Object(O.a)({},Z,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:bt}),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(K.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(K.a,null)),c.a.createElement("div",{className:"flex-container flex-end"},c.a.createElement(A.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(A.a,{type:"ghost",onClick:vt},"\u53D6\u6D88")))},de=D("7ahc"),Ce=D("HmJG"),Re=D("BjJ7"),me=U.a.useForm,Oe={width:280,marginRight:10},be={labelCol:{span:5},wrapperCol:{span:19}},ce=function(We){var nt=We.callback,vt=We.onCancel,bt=me(),Wt=Object(S.a)(bt,1),Bt=Wt[0];function lr(Vr){nt(Vr)}function dr(Vr,Wr){if(Vr.status===-1){m.b.error(Vr.message);return}Bt.setFieldsValue({src:"/api/attachments/".concat(Vr.id),type:Wr.type})}function Ot(Vr){var Wr=Vr.target.files[0];ne(Wr,dr)}return c.a.createElement(U.a,Object(O.a)({form:Bt},be,{className:"upload-image-panel",onFinish:lr}),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(K.a,{style:Oe})),c.a.createElement(se,{onFileChange:Ot}))),c.a.createElement(U.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},c.a.createElement(K.a,{style:{width:264}})),c.a.createElement(U.a.Item,{style:{textAlign:"right"}},c.a.createElement(A.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(A.a,{type:"ghost",onClick:vt},"\u53D6\u6D88")))};function se(We){var nt=We.onFileChange;return c.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",c.a.createElement("input",{type:"file",onChange:nt}))}function ne(We,nt){if(!We)throw new String("\u6CA1\u6709\u6587\u4EF6");var vt=new FormData;vt.append("editormd-image-file",We),vt.append("file_param_name","editormd-image-file"),vt.append("byxhr","true");var bt=new window.XMLHttpRequest;bt.withCredentials=!0,bt.addEventListener("load",function(Wt){nt(JSON.parse(Wt.target.responseText),We)},!1),bt.addEventListener("error",function(Wt){console.error(Wt)},!1),bt.open("POST","".concat(Re.a,"/api/attachments.json")),bt.send(vt)}var ge=D("giR+"),ee=D("fyUT"),re=D("7Kak"),Te=D("9yH6"),ie=Te.a.Group,q={margin:"0 8px"},Y=function(We){var nt=We.callback,vt=We.onCancel;function bt(Wt){nt(Wt)}return c.a.createElement(U.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:bt},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(ee.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(ee.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(ie,null,c.a.createElement(Te.a,{value:"default"},c.a.createElement("i",{className:"fa fa-align-justify"})),c.a.createElement(Te.a,{value:"left"},c.a.createElement("i",{className:"fa fa-align-left"})),c.a.createElement(Te.a,{value:"center"},c.a.createElement("i",{className:"fa fa-align-center"})),c.a.createElement(Te.a,{value:"right"},c.a.createElement("i",{className:"fa fa-align-right"}))))),c.a.createElement("div",{className:"flex-container flex-end"},c.a.createElement(A.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(A.a,{type:"ghost",onClick:vt},"\u53D6\u6D88")))},X=D("ErOA"),he=D("7Cbv"),fe="link",Ee="upload-image",He="code-block",Qe="add-table",et="------------",it={default:et,left:":".concat(et),center:":".concat(et,":"),right:"".concat(et,":")},ut=D("9VGf"),dt,Fe;function Ie(){}var st=0,ft=1e4,Ze="\u2581",tt=`
**\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 Be(We){return/^\d+$/.test(We)?"".concat(We,"px"):We}var Pe=navigator.platform.toUpperCase().indexOf("MAC")>=0,Ne=Pe?"Cmd":"Ctrl",xe=["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"],Ae=(dt={},Object(_.a)(dt,Ne+"-B","bold"),Object(_.a)(dt,Ne+"-I","italic"),dt),Le=(Fe={},Object(_.a)(Fe,fe,"\u6DFB\u52A0\u94FE\u63A5"),Object(_.a)(Fe,He,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(_.a)(Fe,Ee,"\u6DFB\u52A0\u6587\u4EF6"),Object(_.a)(Fe,Qe,"\u6DFB\u52A0\u8868\u683C"),Fe),Me=J.a=function(We){var nt=We.defaultValue,vt=nt===void 0?"":nt,bt=We.onChange,Wt=We.width,Bt=Wt===void 0?"100%":Wt,lr=We.height,dr=lr===void 0?400:lr,Ot=We.miniToolbar,Vr=Ot===void 0?!1:Ot,Wr=We.isFocus,Yr=Wr===void 0?!1:Wr,bn=We.watch,Ar=We.insertTemp,fn=We.mode,cn=fn===void 0?"markdown":fn,Vt=We.id,En=Vt===void 0?"markdown-editor-id":Vt,fr=We.showResizeBar,br=fr===void 0?!1:fr,Br=We.noStorage,Pn=Br===void 0?!1:Br,Kn=We.showNullButton,dn=Kn===void 0?!1:Kn,sr=We.hidetoolBar,Jn=sr===void 0?!1:sr,Tn=We.fullScreen,On=Tn===void 0?!1:Tn,Jr=We.onBlur,An=We.onCMBeforeChange,Zn=We.onFullScreen,ri=We.className,Nt=ri===void 0?"":ri,_r=We.disablePaste,mi=_r===void 0?!1:_r,xi=We.placeholder,Di=xi===void 0?"":xi,wi=We.values,le=wi===void 0?"":wi,V=Object(n.useState)(null),$=Object(S.a)(V,2),te=$[0],ye=$[1],oe=Object(n.useState)(vt),Ve=Object(S.a)(oe,2),Tt=Ve[0],Xt=Ve[1],Er=Object(n.useState)(bn),Pt=Object(S.a)(Er,2),kr=Pt[0],Gr=Pt[1],yn=Object(n.useState)(On),ni=Object(S.a)(yn,2),ii=ni[0],Bn=ni[1],Ni=Object(n.useState)(""),Ki=Object(S.a)(Ni,2),Gn=Ki[0],Ti=Ki[1],Gi=Object(n.useState)(0),Li=Object(S.a)(Gi,2),li=Li[0],ea=Li[1],Vi=Object(n.useState)(dr),ta=Object(S.a)(Vi,2),oa=ta[0],Pi=ta[1],qn=Object(n.useState)(!1),ji=Object(S.a)(qn,2),ha=ji[0],xt=ji[1],rt=Object(n.useRef)(Object(he.a)()),mt=Object(n.useRef)(!1),wt=Object(n.useRef)(),Lt=Object(n.useRef)(),It=Object(n.useRef)(),Kt=Object(n.useRef)(),Ht=Object(n.useRef)(),ht=function(){var _t=Object(y.a)(h.a.mark(function Rt(){var Et,Mt;return h.a.wrap(function(pr){for(;;)switch(pr.prev=pr.next){case 0:return pr.next=2,Object(X.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:rt.current}});case 2:Mt=pr.sent,Mt!=null&&(Et=Mt.attachments)!==null&&Et!==void 0&&Et.length&&(console.log("cm:",te,Lt),Mt.attachments.map(function(er){er.content_type.indexOf("image")>-1?te.replaceSelection("![,](/api/attachments/".concat(er.id,"?type=").concat(er.content_type,")")):er.content_type.indexOf("video")>-1?te.replaceSelection('<video width="100%" controls src="'.concat(T.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):er.content_type.indexOf("pdf")>-1?te.replaceSelection('<a href="'.concat(T.a.API_SERVER,"/api/attachments/").concat(er.id,"?type=").concat(er.content_type,'&disposition=inline" target="_blank">').concat(er.name,"</a>")):te.replaceSelection("[".concat(er.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(er.id,"?type=").concat(er.content_type,")"))}));case 4:case"end":return pr.stop()}},Rt)}));return function(){return _t.apply(this,arguments)}}();Object(n.useEffect)(function(){Xt(le),te==null||te.setValue(le)},[le]),Object(n.useEffect)(function(){Zn==null||Zn(ii)},[ii]),Object(n.useEffect)(function(){if(Lt.current){var _t=i.a.fromTextArea(Lt.current,{mode:cn,lineNumbers:!Vr,lineWrapping:!0,value:vt,autoCloseTags:!0,autoCloseBrackets:!0});Yr&&_t.focus();function Rt(Et,Mt){if(mi){Mt.preventDefault();return}var qt=Mt.clipboardData;if(qt){var pr=qt.types.toString(),er=qt.items;if(pr==="Files"||qt.types.indexOf("Files")>-1){if(Mt.preventDefault(),cn=="stex")return;try{var Ir,Hr=er[1];((Ir=er[0])===null||Ir===void 0?void 0:Ir.kind)==="file"&&(Hr=er[0]);var yr=Hr.getAsFile(),ot=yr.name.split(".").pop();ne(yr,function(zt){if(zt.id){var sn,en,mr;(yr==null||((sn=yr.type)===null||sn===void 0)?void 0:sn.indexOf("image"))>-1?_t.replaceSelection("![,](/api/attachments/".concat(zt.id,"?type=").concat(zt.content_type,")")):(yr==null||((en=yr.type)===null||en===void 0)?void 0:en.indexOf("video"))>-1?_t.replaceSelection('<video width="100%" controls src="'.concat(T.a.API_SERVER,"/api/attachments/").concat(zt.id,'"></video>')):(yr==null||((mr=yr.type)===null||mr===void 0)?void 0:mr.indexOf("pdf"))>-1?_t.replaceSelection('<a href="'.concat(T.a.API_SERVER,"/api/attachments/").concat(zt.id,"?type=").concat(yr.type,'&disposition=inline" target="_blank">').concat(yr.name,"</a>")):xe.includes(ot)?_t.replaceSelection('<a href="'.concat(T.a.API_SERVER,"/api/attachments/").concat(zt.id,'?type=office&disposition=inline" target="_blank">').concat(yr.name,"</a>")):_t.replaceSelection("[".concat(yr.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(zt.id,"?type=").concat(zt.content_type,")"))}else(zt==null?void 0:zt.status)===401&&(document.location.href="/user/login")})}catch(zt){m.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return _t.on("paste",Rt),_t.on("dragleave",function(Et,Mt){It.current.classList.remove("mouse-hover-md")}),_t.on("dragover",function(Et,Mt){It.current.classList.add("mouse-hover-md")}),_t.on("drop",function(Et,Mt){It.current.classList.add("mouse-hover-md");var qt;if(qt=Mt.dataTransfer.files,qt.length>0){Mt.preventDefault(),Mt.stopPropagation();for(var pr=function(Hr){var yr=qt[Hr],ot=yr.name.split(".").pop();ne(yr,function(zt){if(zt.id){var sn,en,mr;(yr==null||((sn=yr.type)===null||sn===void 0)?void 0:sn.indexOf("image"))>-1?_t.replaceSelection("![,](/api/attachments/".concat(zt.id,"?type=").concat(zt.content_type,")")):(yr==null||((en=yr.type)===null||en===void 0)?void 0:en.indexOf("video"))>-1?_t.replaceSelection('<video width="100%" controls src="'.concat(T.a.API_SERVER,"/api/attachments/").concat(zt.id,'"></video>')):(yr==null||((mr=yr.type)===null||mr===void 0)?void 0:mr.indexOf("pdf"))>-1?_t.replaceSelection('<a href="'.concat(T.a.API_SERVER,"/api/attachments/").concat(zt.id,"?type=").concat(yr.type,'&disposition=inline" target="_blank">').concat(yr.name,"</a>")):xe.includes(ot)?_t.replaceSelection('<a href="'.concat(T.a.API_SERVER,"/api/attachments/").concat(zt.id,'?type=office&disposition=inline" target="_blank">').concat(yr.name,"</a>")):_t.replaceSelection("[".concat(yr.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(zt.id,"?type=").concat(zt.content_type,")"))}else(zt==null?void 0:zt.status)===401&&(document.location.href="/user/login")})},er=0;er<qt.length;er++)pr(er)}}),ye(_t),function(){_t.off("paste",Rt)}}},[]);var St=Object(n.useCallback)(function(){if(It.current)try{}catch(_t){console.log(_t,"---- to set md editor body height")}},[oa,It,ii]);Object(n.useEffect)(function(){function _t(){var Et=new s.default(function(Mt){var qt=Object(C.a)(Mt),pr;try{for(qt.s();!(pr=qt.n()).done;){var er=pr.value;(er.target.offsetHeight>0||er.target.offsetWidth>0)&&(St(),te.setSize("100%","100%"),te.refresh())}}catch(Ir){qt.e(Ir)}finally{qt.f()}});return Et.observe(Lt.current.parentElement),Et}if(te){var Rt=_t();return function(){Rt.unobserve(Lt.current.parentElement)}}},[te,St]),Object(n.useEffect)(function(){if(te){for(var _t=[],Rt=function(){var er=Mt[Et];qt=Object(S.a)(er,2);var Ir=qt[0],Hr=qt[1],yr=Object(_.a)({},Ir,function(){At(Hr)});_t.push(yr),te.addKeyMap(yr)},Et=0,Mt=Object.entries(Ae);Et<Mt.length;Et++){var qt;Rt()}return wt.current=setInterval(function(){mt.current&&ht()},4e3),function(){clearInterval(wt.current);var pr=Object(C.a)(_t),er;try{for(pr.s();!(er=pr.n()).done;){var Ir=er.value;te.removeKeyMap(Ir)}}catch(Hr){pr.e(Hr)}finally{pr.f()}}}},[te]),Object(n.useEffect)(function(){On!==ii&&Bn(On)},[On]),Object(ut.a)(function(){if(!Pn&&li>0){var _t=new Date().getTime(),Rt=window.sessionStorage.getItem(En);_t>=li+ft&&(!Rt||Rt!==Tt)&&(window.sessionStorage.setItem(En,Tt),xt(!0))}},ft),Object(n.useEffect)(function(){Gr(bn)},[te,bn]),Object(n.useEffect)(function(){te&&(Yr&&te.focus())},[te,Yr]),Object(n.useEffect)(function(){if(kr&&te){var _t=te.getScrollerElement();function Rt(Et){var Mt=Et.target;if(Ht.current){var qt=Mt.scrollTop/Mt.scrollHeight;Ht.current.scrollTop=Ht.current.scrollHeight*qt}}return _t.addEventListener("scroll",Rt),function(){_t.removeEventListener("scroll",Rt)}}},[te,kr]),Object(n.useEffect)(function(){if(te&&An){function _t(Rt,Et){An(Rt,Et)}return te.on("beforeChange",_t),function(){te.off("beforeChange",_t)}}},[te,An]),Object(n.useEffect)(function(){if(te&&Jr){function _t(){Jr(te.getValue())}return te.on("blur",_t),function(){te.off("blur",_t)}}},[te,Jr]),Object(n.useEffect)(function(){if(te){function _t(Rt){var Et=Rt.getValue();Xt(Et),ea(new Date().getTime()),Rt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),bt&&bt(Et)}return te.on("change",_t),function(){te.off("change",_t)}}},[te,bt]),Object(n.useEffect)(function(){te&&(vt==null?(te.setValue(""),Xt("")):vt!==te.getValue()&&(te.setValue(vt),Xt(vt),te.setCursor(te.lineCount(),0)))},[te,vt]);var At=Object(n.useCallback)(function(_t){var Rt=te.getCursor(),Et=te.getSelection(),Mt=Et.split(`
`);switch(_t){case"bold":return te.replaceSelection("**"+Et+"**"),Et===""&&te.setCursor(Rt.line,Rt.ch+2),te.focus();case"italic":return te.replaceSelection("*"+Et+"*"),Et===""&&te.setCursor(Rt.line,Rt.ch+1),te.focus();case"code":return te.replaceSelection("`"+Et+"`"),Et===""&&te.setCursor(Rt.line,Rt.ch+1),te.focus();case"inline-latex":return te.replaceSelection("`$$"+Et+"$$`"),Et===""&&te.setCursor(Rt.line,Rt.ch+3),te.focus();case"latex":return te.replaceSelection("```latex\n"+Et+"\n```"),te.setCursor(Rt.line+1,Et.length+1),te.focus();case"line-break":return te.replaceSelection(`<br/>
`),te.focus();case"list-ul":return Et===""?te.replaceSelection("- "+Et):te.replaceSelection(Mt.map(function(qt){return qt===""?"":"- ".concat(qt)}).join(`
`)),te.focus();case"list-ol":return Et===""?te.replaceSelection("1. "+Et):te.replaceSelection(Mt.map(function(qt,pr){return qt===""?"":"".concat(pr+1,". ").concat(qt)}).join(`
`)),te.focus();case"add-null-ch":return Et===""&&te.setCursor(Rt.line,Rt.ch+1),te.replaceSelection(Ze),te.focus();case"inster-template-1":return Et===""&&te.setCursor(Rt.line,Rt.ch),te.replaceSelection(tt),te.focus();case"eraser":return te.setValue(""),te.focus();case"trigger-watch":return Gr(!kr),te.focus();case"trigger-full-screen":return Bn(!ii),te.focus();case fe:Ti(fe);return;case He:Ti(He);return;case Ee:Ti(Ee);return;case Qe:Ti(Qe);return;default:throw new Error}},[te,kr,ii]),ur=Object(n.useCallback)(function(_t){Ti("");switch(Gn){case fe:var Rt=_t.title,Et=_t.link;return te.replaceSelection("[".concat(Rt,"](").concat(Et,")")),te.focus();case He:var Mt=_t.language,qt=_t.content;return te.replaceSelection(["```"+Mt,qt,"```"].join(`
`)),te.focus();case Ee:var pr=_t.src,er=_t.alt;return er?te.replaceSelection("![ ".concat(er," ]( ").concat(pr,' "').concat(er,'" )')):te.replaceSelection("![,](".concat(pr,")")),te.focus();case Qe:for(var Ir=_t.row,Hr=_t.col,yr=_t.align,ot=`
`,zt=0;zt<Ir;zt++){for(var sn=[],en=[],mr=0;mr<Hr;mr++)zt===1&&en.push(it[yr]),sn.push(" ");zt===1&&(ot+="| ".concat(en.join(" | "),` |
`)),ot+="| ".concat(sn.join(Hr===1?"":" | "),` |
`)}return te.replaceSelection(ot+`
`),te.focus();default:throw new Error}},[te,Gn]),ar=Object(n.useMemo)(function(){switch(Gn){case fe:return c.a.createElement(ue,{callback:ur,onCancel:Zt});case He:return c.a.createElement(de.b,{callback:ur,onCancel:Zt});case Ee:return c.a.createElement(ce,{callback:ur,onCancel:Zt});case Qe:return c.a.createElement(Y,{callback:ur,onCancel:Zt});default:return null}},[Gn]);function Zt(){Ti("")}Object(n.useEffect)(function(){if(Kt.current){var _t=Kt.current,Rt=!1,Et=0;function Mt(er){Rt=!0,Et=er.pageY}function qt(){Rt=!1}function pr(er){if(Rt){var Ir=er.pageY-Et;Ir<0&&(Ir=0),Ir>300&&(Ir=300);var Hr=dr+Ir+"px";Pi(Hr)}}return _t.addEventListener("mousedown",Mt),document.addEventListener("mousemove",pr),document.addEventListener("mouseup",qt),function(){_t.removeEventListener("mousedown",Mt),document.removeEventListener("mousemove",pr),document.removeEventListener("mouseup",qt)}}},[te,Kt]),Object(n.useEffect)(function(){Pi(dr)},[dr]);var $t=Be(Bt),rr=Be(oa),cr={width:$t,height:rr},lt=Object(n.useMemo)(function(){if(li){var _t=new Date(li),Rt=_t.getHours(),Et=_t.getMinutes(),Mt=_t.getSeconds();return Rt=Rt<10?"0"+Rt:Rt,Et=Et<10?"0"+Et:Et,Mt=Mt<10?"0"+Mt:Mt,"".concat(Rt,":").concat(Et,":").concat(Mt)}return 0},[li]);function Rr(){window.sessionStorage.removeItem(En),xt(!1),ea(0)}function jr(){xt(!1),ea(0),te.setValue(window.sessionStorage.getItem(En))}function xr(_t,Rt){var Et=te.getValue();Et=Et.replace(_t,Rt),Xt(Et),te==null||te.setValue(Et)}return c.a.createElement(n.Fragment,null,c.a.createElement("div",{className:"markdown-editor-wrapper",ref:It},c.a.createElement("div",{className:"markdown-editor-container ".concat(Nt," ").concat(kr?"on-preview":""," ").concat(Vr?"mini":""," ").concat(ii?"full-screen":""),style:cr},c.a.createElement(L,{insertTemp:Ar,watch:kr,fullScreen:ii,showNullButton:dn,onActionCallback:At,hidetoolBar:Jn,uuid:rt.current,setOpenPhones:function(){mt.current=!0}}),c.a.createElement("div",{className:"markdown-editor-body"},c.a.createElement("div",{className:"codemirror-container"},c.a.createElement("textarea",{ref:Lt,placeholder:Di})),kr?c.a.createElement("div",{ref:Ht,className:"preview-container"},cn==="stex"&&c.a.createElement(R,{value:Tt}),cn!=="stex"&&c.a.createElement(p.a,{edit:!0,value:Tt,replaces:xr})):null))),br?c.a.createElement("a",{ref:Kt,className:"editor-resize"}):null,c.a.createElement(G.a,null,Le[Gn]?c.a.createElement(g.a,{centered:!0,title:Le[Gn],visible:!0,onCancel:Zt,footer:null,className:"markdown-popup-form"},ar):null))}},PVpz:function(H,J,D){(function(k,g,C){H.exports=J=g(D("Ib8C"),D("ETIr"),D("cv67"),D("K3mO"),D("OLod"))})(this,function(k){return function(){var g=k,C=g.lib,M=C.StreamCipher,m=g.algo,y=[],S=[],_=[],t=m.RabbitLegacy=M.extend({_doReset:function(){var n=this._key.words,c=this.cfg.iv,a=this._X=[n[0],n[3]<<16|n[2]>>>16,n[1],n[0]<<16|n[3]>>>16,n[2],n[1]<<16|n[0]>>>16,n[3],n[2]<<16|n[1]>>>16],i=this._C=[n[2]<<16|n[2]>>>16,n[0]&4294901760|n[1]&65535,n[3]<<16|n[3]>>>16,n[1]&4294901760|n[2]&65535,n[0]<<16|n[0]>>>16,n[2]&4294901760|n[3]&65535,n[1]<<16|n[1]>>>16,n[3]&4294901760|n[0]&65535];this._b=0;for(var s=0;s<4;s++)h.call(this);for(var s=0;s<8;s++)i[s]^=a[s+4&7];if(c){var d=c.words,f=d[0],l=d[1],o=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,r=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,x=o>>>16|r&4294901760,v=r<<16|o&65535;i[0]^=o,i[1]^=x,i[2]^=r,i[3]^=v,i[4]^=o,i[5]^=x,i[6]^=r,i[7]^=v;for(var s=0;s<4;s++)h.call(this)}},_doProcessBlock:function(n,c){var a=this._X;h.call(this),y[0]=a[0]^a[5]>>>16^a[3]<<16,y[1]=a[2]^a[7]>>>16^a[5]<<16,y[2]=a[4]^a[1]>>>16^a[7]<<16,y[3]=a[6]^a[3]>>>16^a[1]<<16;for(var i=0;i<4;i++)y[i]=(y[i]<<8|y[i]>>>24)&16711935|(y[i]<<24|y[i]>>>8)&4278255360,n[c+i]^=y[i]},blockSize:128/32,ivSize:64/32});function h(){for(var n=this._X,c=this._C,a=0;a<8;a++)S[a]=c[a];c[0]=c[0]+1295307597+this._b|0,c[1]=c[1]+3545052371+(c[0]>>>0<S[0]>>>0?1:0)|0,c[2]=c[2]+886263092+(c[1]>>>0<S[1]>>>0?1:0)|0,c[3]=c[3]+1295307597+(c[2]>>>0<S[2]>>>0?1:0)|0,c[4]=c[4]+3545052371+(c[3]>>>0<S[3]>>>0?1:0)|0,c[5]=c[5]+886263092+(c[4]>>>0<S[4]>>>0?1:0)|0,c[6]=c[6]+1295307597+(c[5]>>>0<S[5]>>>0?1:0)|0,c[7]=c[7]+3545052371+(c[6]>>>0<S[6]>>>0?1:0)|0,this._b=c[7]>>>0<S[7]>>>0?1:0;for(var a=0;a<8;a++){var i=n[a]+c[a],s=i&65535,d=i>>>16,f=((s*s>>>17)+s*d>>>15)+d*d,l=((i&4294901760)*i|0)+((i&65535)*i|0);_[a]=f^l}n[0]=_[0]+(_[7]<<16|_[7]>>>16)+(_[6]<<16|_[6]>>>16)|0,n[1]=_[1]+(_[0]<<8|_[0]>>>24)+_[7]|0,n[2]=_[2]+(_[1]<<16|_[1]>>>16)+(_[0]<<16|_[0]>>>16)|0,n[3]=_[3]+(_[2]<<8|_[2]>>>24)+_[1]|0,n[4]=_[4]+(_[3]<<16|_[3]>>>16)+(_[2]<<16|_[2]>>>16)|0,n[5]=_[5]+(_[4]<<8|_[4]>>>24)+_[3]|0,n[6]=_[6]+(_[5]<<16|_[5]>>>16)+(_[4]<<16|_[4]>>>16)|0,n[7]=_[7]+(_[6]<<8|_[6]>>>24)+_[5]|0}g.RabbitLegacy=M._createHelper(t)}(),k.RabbitLegacy})},RxwV:function(H,J,D){"use strict";var k=D("q1tI"),g=D("uciX"),C=D("2W6z"),M=D.n(C),m=D("4IlW"),y=D("uK0f"),S=D.n(y);function _(Oe,be){if(Oe===be)return!0;if(!Oe||!be)return!1;var ce=Oe.length;if(be.length!==ce)return!1;for(var se=0;se<ce;se++)if(Oe[se]!==be[se])return!1;return!0}function t(Oe){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?t=function(ce){return typeof ce}:t=function(ce){return ce&&typeof Symbol=="function"&&ce.constructor===Symbol&&ce!==Symbol.prototype?"symbol":typeof ce},t(Oe)}function h(Oe,be){if(!(Oe instanceof be))throw new TypeError("Cannot call a class as a function")}function n(Oe,be){for(var ce=0;ce<be.length;ce++){var se=be[ce];se.enumerable=se.enumerable||!1,se.configurable=!0,"value"in se&&(se.writable=!0),Object.defineProperty(Oe,se.key,se)}}function c(Oe,be,ce){return be&&n(Oe.prototype,be),ce&&n(Oe,ce),Oe}function a(Oe,be){if(typeof be!="function"&&be!==null)throw new TypeError("Super expression must either be null or a function");Oe.prototype=Object.create(be&&be.prototype,{constructor:{value:Oe,writable:!0,configurable:!0}}),be&&i(Oe,be)}function i(Oe,be){return i=Object.setPrototypeOf||function(se,ne){return se.__proto__=ne,se},i(Oe,be)}function s(Oe){var be=l();return function(){var ce=o(Oe),se;if(be){var ne=o(this).constructor;se=Reflect.construct(ce,arguments,ne)}else se=ce.apply(this,arguments);return d(this,se)}}function d(Oe,be){return be&&(t(be)==="object"||typeof be=="function")?be:f(Oe)}function f(Oe){if(Oe===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Oe}function l(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(Oe){return!1}}function o(Oe){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(ce){return ce.__proto__||Object.getPrototypeOf(ce)},o(Oe)}var r=function(){var Oe=function(be){a(se,be);var ce=s(se);function se(){var ne;return h(this,se),ne=ce.apply(this,arguments),ne.menuItems={},ne.saveMenuItem=function(ge){return function(ee){ne.menuItems[ge]=ee}},ne}return c(se,[{key:"componentDidMount",value:function(){this.scrollActiveItemToView()}},{key:"componentDidUpdate",value:function(ge){!ge.visible&&this.props.visible&&this.scrollActiveItemToView()}},{key:"getFieldName",value:function(ge){var ee=this.props,re=ee.fieldNames,Te=ee.defaultFieldNames;return re[ge]||Te[ge]}},{key:"getOption",value:function(ge,ee){var re=this.props,Te=re.prefixCls,ie=re.expandTrigger,q=re.expandIcon,Y=re.loadingIcon,X=this.props.onSelect.bind(this,ge,ee),he=this.props.onItemDoubleClick.bind(this,ge,ee),fe={onClick:X,onDoubleClick:he},Ee="".concat(Te,"-menu-item"),He=null,Qe=ge[this.getFieldName("children")]&&ge[this.getFieldName("children")].length>0;(Qe||ge.isLeaf===!1)&&(Ee+=" ".concat(Te,"-menu-item-expand"),ge.loading||(He=k.createElement("span",{className:"".concat(Te,"-menu-item-expand-icon")},q))),ie==="hover"&&(Qe||ge.isLeaf===!1)&&(fe={onMouseEnter:this.delayOnSelect.bind(this,X),onMouseLeave:this.delayOnSelect.bind(this),onClick:X}),this.isActiveOption(ge,ee)&&(Ee+=" ".concat(Te,"-menu-item-active"),fe.ref=this.saveMenuItem(ee)),ge.disabled&&(Ee+=" ".concat(Te,"-menu-item-disabled"));var et=null;ge.loading&&(Ee+=" ".concat(Te,"-menu-item-loading"),et=Y||null);var it="";return"title"in ge?it=ge.title:typeof ge[this.getFieldName("label")]=="string"&&(it=ge[this.getFieldName("label")]),k.createElement("li",Object.assign({key:ge[this.getFieldName("value")],className:Ee,title:it},fe,{role:"menuitem",onMouseDown:function(dt){return dt.preventDefault()}}),ge[this.getFieldName("label")],He,et)}},{key:"getActiveOptions",value:function(ge){var ee=this,re=this.props.options,Te=ge||this.props.activeValue;return S()(re,function(ie,q){return ie[ee.getFieldName("value")]===Te[q]},{childrenKeyName:this.getFieldName("children")})}},{key:"getShowOptions",value:function(){var ge=this,ee=this.props.options,re=this.getActiveOptions().map(function(Te){return Te[ge.getFieldName("children")]}).filter(function(Te){return!!Te});return re.unshift(ee),re}},{key:"delayOnSelect",value:function(ge){for(var ee=this,re=arguments.length,Te=new Array(re>1?re-1:0),ie=1;ie<re;ie++)Te[ie-1]=arguments[ie];this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null),typeof ge=="function"&&(this.delayTimer=window.setTimeout(function(){ge(Te),ee.delayTimer=null},150))}},{key:"scrollActiveItemToView",value:function(){for(var ge=this.getShowOptions().length,ee=0;ee<ge;ee++){var re=this.menuItems[ee];re&&re.parentElement&&(re.parentElement.scrollTop=re.offsetTop)}}},{key:"isActiveOption",value:function(ge,ee){var re=this.props.activeValue,Te=re===void 0?[]:re;return Te[ee]===ge[this.getFieldName("value")]}},{key:"render",value:function(){var ge=this,ee=this.props,re=ee.prefixCls,Te=ee.dropdownMenuColumnStyle;return k.createElement("div",null,this.getShowOptions().map(function(ie,q){return k.createElement("ul",{className:"".concat(re,"-menu"),key:q,style:Te},ie.map(function(Y){return ge.getOption(Y,q)}))}))}}]),se}(k.Component);return Oe.defaultProps={options:[],value:[],activeValue:[],onSelect:function(){},prefixCls:"rc-cascader-menus",visible:!1,expandTrigger:"click"},Oe}(),x=r,v={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:1,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:1,adjustY:1}}},p=v;function R(Oe){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?R=function(ce){return typeof ce}:R=function(ce){return ce&&typeof Symbol=="function"&&ce.constructor===Symbol&&ce!==Symbol.prototype?"symbol":typeof ce},R(Oe)}function O(Oe,be){if(Oe==null)return{};var ce=b(Oe,be),se,ne;if(Object.getOwnPropertySymbols){var ge=Object.getOwnPropertySymbols(Oe);for(ne=0;ne<ge.length;ne++){if(se=ge[ne],be.indexOf(se)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(Oe,se))continue;ce[se]=Oe[se]}}return ce}function b(Oe,be){if(Oe==null)return{};var ce={},se=Object.keys(Oe),ne,ge;for(ge=0;ge<se.length;ge++){if(ne=se[ge],be.indexOf(ne)>=0)continue;ce[ne]=Oe[ne]}return ce}function E(Oe){return N(Oe)||F(Oe)||T(Oe)||w()}function w(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function T(Oe,be){if(!Oe)return;if(typeof Oe=="string")return L(Oe,be);var ce=Object.prototype.toString.call(Oe).slice(8,-1);if(ce==="Object"&&Oe.constructor&&(ce=Oe.constructor.name),ce==="Map"||ce==="Set")return Array.from(Oe);if(ce==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ce))return L(Oe,be)}function F(Oe){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(Oe))return Array.from(Oe)}function N(Oe){if(Array.isArray(Oe))return L(Oe)}function L(Oe,be){(be==null||be>Oe.length)&&(be=Oe.length);for(var ce=0,se=new Array(be);ce<be;ce++)se[ce]=Oe[ce];return se}function G(Oe,be){if(!(Oe instanceof be))throw new TypeError("Cannot call a class as a function")}function z(Oe,be){for(var ce=0;ce<be.length;ce++){var se=be[ce];se.enumerable=se.enumerable||!1,se.configurable=!0,"value"in se&&(se.writable=!0),Object.defineProperty(Oe,se.key,se)}}function A(Oe,be,ce){return be&&z(Oe.prototype,be),ce&&z(Oe,ce),Oe}function B(Oe,be){if(typeof be!="function"&&be!==null)throw new TypeError("Super expression must either be null or a function");Oe.prototype=Object.create(be&&be.prototype,{constructor:{value:Oe,writable:!0,configurable:!0}}),be&&U(Oe,be)}function U(Oe,be){return U=Object.setPrototypeOf||function(se,ne){return se.__proto__=ne,se},U(Oe,be)}function I(Oe){var be=ue();return function(){var ce=de(Oe),se;if(be){var ne=de(this).constructor;se=Reflect.construct(ce,arguments,ne)}else se=ce.apply(this,arguments);return K(this,se)}}function K(Oe,be){return be&&(R(be)==="object"||typeof be=="function")?be:Z(Oe)}function Z(Oe){if(Oe===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Oe}function ue(){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(Oe){return!1}}function de(Oe){return de=Object.setPrototypeOf?Object.getPrototypeOf:function(ce){return ce.__proto__||Object.getPrototypeOf(ce)},de(Oe)}var Ce=function(){var Oe=function(be){B(se,be);var ce=I(se);function se(ne){var ge;G(this,se),ge=ce.call(this,ne),ge.setPopupVisible=function(re){var Te=ge.state.value;"popupVisible"in ge.props||ge.setState({popupVisible:re}),re&&!ge.state.popupVisible&&ge.setState({activeValue:Te}),ge.props.onPopupVisibleChange(re)},ge.handleChange=function(re,Te,ie){var q=Te.visible;(ie.type!=="keydown"||ie.keyCode===m.a.ENTER)&&(ge.props.onChange(re.map(function(Y){return Y[ge.getFieldName("value")]}),re),ge.setPopupVisible(q))},ge.handlePopupVisibleChange=function(re){ge.setPopupVisible(re)},ge.handleMenuSelect=function(re,Te,ie){var q=ge.trigger.getRootDomNode();q&&q.focus&&q.focus();var Y=ge.props,X=Y.changeOnSelect,he=Y.loadData,fe=Y.expandTrigger;if(!re||re.disabled)return;var Ee=ge.state.activeValue;Ee=Ee.slice(0,Te+1),Ee[Te]=re[ge.getFieldName("value")];var He=ge.getActiveOptions(Ee);if(re.isLeaf===!1&&!re[ge.getFieldName("children")]&&he){X&&ge.handleChange(He,{visible:!0},ie),ge.setState({activeValue:Ee}),he(He);return}var Qe={};!re[ge.getFieldName("children")]||!re[ge.getFieldName("children")].length?(ge.handleChange(He,{visible:!1},ie),Qe.value=Ee):X&&(ie.type==="click"||ie.type==="keydown")&&(fe==="hover"?ge.handleChange(He,{visible:!1},ie):ge.handleChange(He,{visible:!0},ie),Qe.value=Ee),Qe.activeValue=Ee,("value"in ge.props||ie.type==="keydown"&&ie.keyCode!==m.a.ENTER)&&delete Qe.value,ge.setState(Qe)},ge.handleItemDoubleClick=function(){var re=ge.props.changeOnSelect;re&&ge.setPopupVisible(!1)},ge.handleKeyDown=function(re){var Te=ge.props.children;if(Te&&Te.props.onKeyDown){Te.props.onKeyDown(re);return}var ie=E(ge.state.activeValue),q=ie.length-1<0?0:ie.length-1,Y=ge.getCurrentLevelOptions(),X=Y.map(function(He){return He[ge.getFieldName("value")]}).indexOf(ie[q]);if(re.keyCode!==m.a.DOWN&&re.keyCode!==m.a.UP&&re.keyCode!==m.a.LEFT&&re.keyCode!==m.a.RIGHT&&re.keyCode!==m.a.ENTER&&re.keyCode!==m.a.SPACE&&re.keyCode!==m.a.BACKSPACE&&re.keyCode!==m.a.ESC&&re.keyCode!==m.a.TAB)return;if(!ge.state.popupVisible&&re.keyCode!==m.a.BACKSPACE&&re.keyCode!==m.a.LEFT&&re.keyCode!==m.a.RIGHT&&re.keyCode!==m.a.ESC&&re.keyCode!==m.a.TAB){ge.setPopupVisible(!0);return}if(re.keyCode===m.a.DOWN||re.keyCode===m.a.UP){re.preventDefault();var he=X;he!==-1?re.keyCode===m.a.DOWN?(he+=1,he=he>=Y.length?0:he):(he-=1,he=he<0?Y.length-1:he):he=0,ie[q]=Y[he][ge.getFieldName("value")]}else if(re.keyCode===m.a.LEFT||re.keyCode===m.a.BACKSPACE)re.preventDefault(),ie.splice(ie.length-1,1);else if(re.keyCode===m.a.RIGHT)re.preventDefault(),Y[X]&&Y[X][ge.getFieldName("children")]&&ie.push(Y[X][ge.getFieldName("children")][0][ge.getFieldName("value")]);else if(re.keyCode===m.a.ESC||re.keyCode===m.a.TAB){ge.setPopupVisible(!1);return}(!ie||ie.length===0)&&ge.setPopupVisible(!1);var fe=ge.getActiveOptions(ie),Ee=fe[fe.length-1];ge.handleMenuSelect(Ee,fe.length-1,re),ge.props.onKeyDown&&ge.props.onKeyDown(re)},ge.saveTrigger=function(re){ge.trigger=re};var ee=[];return"value"in ne?ee=ne.value||[]:"defaultValue"in ne&&(ee=ne.defaultValue||[]),M()(!("filedNames"in ne),"`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead."),ge.state={popupVisible:ne.popupVisible,activeValue:ee,value:ee,prevProps:ne},ge.defaultFieldNames={label:"label",value:"value",children:"children"},ge}return A(se,[{key:"getPopupDOMNode",value:function(){return this.trigger.getPopupDomNode()}},{key:"getFieldName",value:function(ge){var ee=this.defaultFieldNames,re=this.props,Te=re.fieldNames,ie=re.filedNames;return"filedNames"in this.props?ie[ge]||ee[ge]:Te[ge]||ee[ge]}},{key:"getFieldNames",value:function(){var ge=this.props,ee=ge.fieldNames,re=ge.filedNames;return"filedNames"in this.props?re:ee}},{key:"getCurrentLevelOptions",value:function(){var ge=this,ee=this.props.options,re=ee===void 0?[]:ee,Te=this.state.activeValue,ie=Te===void 0?[]:Te,q=S()(re,function(Y,X){return Y[ge.getFieldName("value")]===ie[X]},{childrenKeyName:this.getFieldName("children")});return q[q.length-2]?q[q.length-2][this.getFieldName("children")]:E(re).filter(function(Y){return!Y.disabled})}},{key:"getActiveOptions",value:function(ge){var ee=this;return S()(this.props.options||[],function(re,Te){return re[ee.getFieldName("value")]===ge[Te]},{childrenKeyName:this.getFieldName("children")})}},{key:"render",value:function(){var ge=this.props,ee=ge.prefixCls,re=ge.transitionName,Te=ge.popupClassName,ie=ge.options,q=ie===void 0?[]:ie,Y=ge.disabled,X=ge.builtinPlacements,he=ge.popupPlacement,fe=ge.children,Ee=ge.dropdownRender,He=O(ge,["prefixCls","transitionName","popupClassName","options","disabled","builtinPlacements","popupPlacement","children","dropdownRender"]),Qe=k.createElement("div",null),et="";q&&q.length>0?Qe=k.createElement(x,Object.assign({},this.props,{fieldNames:this.getFieldNames(),defaultFieldNames:this.defaultFieldNames,activeValue:this.state.activeValue,onSelect:this.handleMenuSelect,onItemDoubleClick:this.handleItemDoubleClick,visible:this.state.popupVisible})):et=" ".concat(ee,"-menus-empty");var it=Qe;return Ee&&(it=Ee(Qe)),k.createElement(g.a,Object.assign({ref:this.saveTrigger},He,{popupPlacement:he,builtinPlacements:X,popupTransitionName:re,action:Y?[]:["click"],popupVisible:Y?!1:this.state.popupVisible,onPopupVisibleChange:this.handlePopupVisibleChange,prefixCls:"".concat(ee,"-menus"),popupClassName:Te+et,popup:it}),k.cloneElement(fe,{onKeyDown:this.handleKeyDown,tabIndex:Y?void 0:0}))}}],[{key:"getDerivedStateFromProps",value:function(ge,ee){var re=ee.prevProps,Te=re===void 0?{}:re,ie={prevProps:ge};return"value"in ge&&!_(Te.value,ge.value)&&(ie.value=ge.value||[],"loadData"in ge||(ie.activeValue=ge.value||[])),"popupVisible"in ge&&(ie.popupVisible=ge.popupVisible),ie}}]),se}(k.Component);return Oe.defaultProps={onChange:function(){},onPopupVisibleChange:function(){},disabled:!1,transitionName:"",prefixCls:"rc-cascader",popupClassName:"",popupPlacement:"bottomLeft",builtinPlacements:p,expandTrigger:"click",fieldNames:{label:"label",value:"value",children:"children"},expandIcon:">"},Oe}(),Re=Ce,me=J.a=Re},S6kV:function(H,J,D){(function(k,g,C){H.exports=J=g(D("Ib8C"),D("OLod"))})(this,function(k){return k.mode.OFB=function(){var g=k.lib.BlockCipherMode.extend(),C=g.Encryptor=g.extend({processBlock:function(M,m){var y=this._cipher,S=y.blockSize,_=this._iv,t=this._keystream;_&&(t=this._keystream=_.slice(0),this._iv=void 0),y.encryptBlock(t,0);for(var h=0;h<S;h++)M[m+h]^=t[h]}});return g.Decryptor=C,g}(),k.mode.OFB})},"SA+Z":function(H,J,D){var k=D("wTVA"),g=D("EbDI"),C=D("ZhPi"),M=D("wkBT");function m(y){return k(y)||g(y)||C(y)||M()}H.exports=m,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 D,k,g,C=!1,M,m;window.PR_SHOULD_USE_CONTINUATION=!0;var y,S;(function(){var _=window,t=["break,continue,do,else,for,if,return,while"],h=[t,"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"],n=[h,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],c=[n,"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"],a=[n,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],i=[n,"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"],s="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",d=[n,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],f="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",l=[t,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],o=[t,"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"],r=[t,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],x=[c,i,a,d,f,l,o,r],v=/^(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",R="kwd",O="com",b="typ",E="lit",w="pun",T="pln",F="tag",N="dec",L="src",G="atn",z="atv",A="nocode",B="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function U(ie){for(var q=0,Y=!1,X=!1,he=0,fe=ie.length;he<fe;++he){var Ee=ie[he];if(Ee.ignoreCase)X=!0;else if(/[a-z]/i.test(Ee.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Y=!0,X=!1;break}}var He={b:8,t:9,n:10,v:11,f:12,r:13};function Qe(Fe){var Ie=Fe.charCodeAt(0);if(Ie!==92)return Ie;var st=Fe.charAt(1);return Ie=He[st],Ie||("0"<=st&&st<="7"?parseInt(Fe.substring(1),8):st==="u"||st==="x"?parseInt(Fe.substring(2),16):Fe.charCodeAt(1))}function et(Fe){if(Fe<32)return(Fe<16?"\\x0":"\\x")+Fe.toString(16);var Ie=String.fromCharCode(Fe);return Ie==="\\"||Ie==="-"||Ie==="]"||Ie==="^"?"\\"+Ie:Ie}function it(Fe){var Ie=Fe.substring(1,Fe.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")),st=[],ft=Ie[0]==="^",Ze=["["];ft&&Ze.push("^");for(var tt=ft?1:0,Be=Ie.length;tt<Be;++tt){var Pe=Ie[tt];if(/\\[bdsw]/i.test(Pe))Ze.push(Pe);else{var Ne=Qe(Pe),xe;tt+2<Be&&Ie[tt+1]==="-"?(xe=Qe(Ie[tt+2]),tt+=2):xe=Ne,st.push([Ne,xe]),xe<65||Ne>122||(xe<65||Ne>90||st.push([Math.max(65,Ne)|32,Math.min(xe,90)|32]),xe<97||Ne>122||st.push([Math.max(97,Ne)&~32,Math.min(xe,122)&~32]))}}st.sort(function(We,nt){return We[0]-nt[0]||nt[1]-We[1]});for(var Ae=[],Le=[],tt=0;tt<st.length;++tt){var Me=st[tt];Me[0]<=Le[1]+1?Le[1]=Math.max(Le[1],Me[1]):Ae.push(Le=Me)}for(var tt=0;tt<Ae.length;++tt){var Me=Ae[tt];Ze.push(et(Me[0])),Me[1]>Me[0]&&(Me[1]+1>Me[0]&&Ze.push("-"),Ze.push(et(Me[1])))}return Ze.push("]"),Ze.join("")}function ut(Fe){for(var Ie=Fe.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")),st=Ie.length,ft=[],Ze=0,tt=0;Ze<st;++Ze){var Be=Ie[Ze];if(Be==="(")++tt;else if(Be.charAt(0)==="\\"){var Pe=+Be.substring(1);Pe&&(Pe<=tt?ft[Pe]=-1:Ie[Ze]=et(Pe))}}for(var Ze=1;Ze<ft.length;++Ze)ft[Ze]===-1&&(ft[Ze]=++q);for(var Ze=0,tt=0;Ze<st;++Ze){var Be=Ie[Ze];if(Be==="(")++tt,ft[tt]||(Ie[Ze]="(?:");else if(Be.charAt(0)==="\\"){var Pe=+Be.substring(1);Pe&&Pe<=tt&&(Ie[Ze]="\\"+ft[Pe])}}for(var Ze=0;Ze<st;++Ze)Ie[Ze]==="^"&&Ie[Ze+1]!=="^"&&(Ie[Ze]="");if(Fe.ignoreCase&&Y)for(var Ze=0;Ze<st;++Ze){var Be=Ie[Ze],Ne=Be.charAt(0);Be.length>=2&&Ne==="["?Ie[Ze]=it(Be):Ne!=="\\"&&(Ie[Ze]=Be.replace(/[a-zA-Z]/g,function(Le){var Me=Le.charCodeAt(0);return"["+String.fromCharCode(Me&~32,Me|32)+"]"}))}return Ie.join("")}for(var dt=[],he=0,fe=ie.length;he<fe;++he){var Ee=ie[he];if(Ee.global||Ee.multiline)throw new Error(""+Ee);dt.push("(?:"+ut(Ee)+")")}return new RegExp(dt.join("|"),X?"gi":"g")}function I(ie,q){var Y=/(?:^|\s)nocode(?:\s|$)/,X=[],he=0,fe=[],Ee=0;function He(Qe){var et=Qe.nodeType;if(et==1){if(Y.test(Qe.className))return;for(var it=Qe.firstChild;it;it=it.nextSibling)He(it);var ut=Qe.nodeName.toLowerCase();(ut==="br"||ut==="li")&&(X[Ee]=`
`,fe[Ee<<1]=he++,fe[Ee++<<1|1]=Qe)}else if(et==3||et==4){var dt=Qe.nodeValue;dt.length&&(q?dt=dt.replace(/\r\n?/g,`
`):dt=dt.replace(/[ \t\r\n]+/g," "),X[Ee]=dt,fe[Ee<<1]=he,he+=dt.length,fe[Ee++<<1|1]=Qe)}}return He(ie),{sourceCode:X.join("").replace(/\n$/,""),spans:fe}}function K(ie,q,Y,X,he){if(!Y)return;var fe={sourceNode:ie,pre:1,langExtension:null,numberLines:null,sourceCode:Y,spans:null,basePos:q,decorations:null};X(fe),he.push.apply(he,fe.decorations)}var Z=/\S/;function ue(ie){for(var q=void 0,Y=ie.firstChild;Y;Y=Y.nextSibling){var X=Y.nodeType;q=X===1?q?ie:Y:X===3&&Z.test(Y.nodeValue)?ie:q}return q===ie?void 0:q}function de(ie,q){var Y={},X;(function(){for(var Ee=ie.concat(q),He=[],Qe={},et=0,it=Ee.length;et<it;++et){var ut=Ee[et],dt=ut[3];if(dt)for(var Fe=dt.length;--Fe>=0;)Y[dt.charAt(Fe)]=ut;var Ie=ut[1],st=""+Ie;Qe.hasOwnProperty(st)||(He.push(Ie),Qe[st]=null)}He.push(/[\0-\uffff]/),X=U(He)})();var he=q.length,fe=function(Ee){for(var He=Ee.sourceCode,Qe=Ee.basePos,et=Ee.sourceNode,it=[Qe,T],ut=0,dt=He.match(X)||[],Fe={},Ie=0,st=dt.length;Ie<st;++Ie){var ft=dt[Ie],Ze=Fe[ft],tt=void 0,Be;if(typeof Ze=="string")Be=!1;else{var Pe=Y[ft.charAt(0)];if(Pe)tt=ft.match(Pe[1]),Ze=Pe[0];else{for(var Ne=0;Ne<he;++Ne)if(Pe=q[Ne],tt=ft.match(Pe[1]),tt){Ze=Pe[0];break}tt||(Ze=T)}Be=Ze.length>=5&&Ze.substring(0,5)==="lang-",Be&&!(tt&&typeof tt[1]=="string")&&(Be=!1,Ze=L),Be||(Fe[ft]=Ze)}var xe=ut;if(ut+=ft.length,!Be)it.push(Qe+xe,Ze);else{var Ae=tt[1],Le=ft.indexOf(Ae),Me=Le+Ae.length;tt[2]&&(Me=ft.length-tt[2].length,Le=Me-Ae.length);var We=Ze.substring(5);K(et,Qe+xe,ft.substring(0,Le),fe,it),K(et,Qe+xe+Le,Ae,se(We,Ae),it),K(et,Qe+xe+Me,ft.substring(Me),fe,it)}}Ee.decorations=it};return fe}function Ce(ie){var q=[],Y=[];ie.tripleQuotedStrings?q.push([p,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ie.multiLineStrings?q.push([p,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):q.push([p,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ie.verbatimStrings&&Y.push([p,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var X=ie.hashComments;X&&(ie.cStyleComments?(X>1?q.push([O,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):q.push([O,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Y.push([p,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):q.push([O,/^#[^\r\n]*/,null,"#"])),ie.cStyleComments&&(Y.push([O,/^\/\/[^\r\n]*/,null]),Y.push([O,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var he=ie.regexLiterals;if(he){var fe=he>1?"":`
\r`,Ee=fe?".":"[\\S\\s]",He="/(?=[^/*"+fe+"])(?:[^/\\x5B\\x5C"+fe+"]|\\x5C"+Ee+"|\\x5B(?:[^\\x5C\\x5D"+fe+"]|\\x5C"+Ee+")*(?:\\x5D|$))+/";Y.push(["lang-regex",RegExp("^"+B+"("+He+")")])}var Qe=ie.types;Qe&&Y.push([b,Qe]);var et=(""+ie.keywords).replace(/^ | $/g,"");et.length&&Y.push([R,new RegExp("^(?:"+et.replace(/[\s,]+/g,"|")+")\\b"),null]),q.push([T,/^\s+/,null,` \r
\xA0`]);var it="^.[^\\s\\w.$@'\"`/\\\\]*";return ie.regexLiterals&&(it+="(?!s*/)"),Y.push([E,/^@[a-z_$][a-z_$@0-9]*/i,null],[b,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[T,/^[a-z_$][a-z_$@0-9]*/i,null],[E,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(it),null]),de(q,Y)}var Re=Ce({keywords:x,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function me(ie,q,Y){for(var X=/(?:^|\s)nocode(?:\s|$)/,he=/\r\n?|\n/,fe=ie.ownerDocument,Ee=fe.createElement("li");ie.firstChild;)Ee.appendChild(ie.firstChild);var He=[Ee];function Qe(Ie){var st=Ie.nodeType;if(st==1&&!X.test(Ie.className))if(Ie.nodeName==="br")et(Ie),Ie.parentNode&&Ie.parentNode.removeChild(Ie);else for(var ft=Ie.firstChild;ft;ft=ft.nextSibling)Qe(ft);else if((st==3||st==4)&&Y){var Ze=Ie.nodeValue,tt=Ze.match(he);if(tt){var Be=Ze.substring(0,tt.index);Ie.nodeValue=Be;var Pe=Ze.substring(tt.index+tt[0].length);if(Pe){var Ne=Ie.parentNode;Ne.insertBefore(fe.createTextNode(Pe),Ie.nextSibling)}et(Ie),Be||Ie.parentNode.removeChild(Ie)}}}function et(Ie){for(;!Ie.nextSibling;)if(Ie=Ie.parentNode,!Ie)return;function st(tt,Be){var Pe=Be?tt.cloneNode(!1):tt,Ne=tt.parentNode;if(Ne){var xe=st(Ne,1),Ae=tt.nextSibling;xe.appendChild(Pe);for(var Le=Ae;Le;Le=Ae)Ae=Le.nextSibling,xe.appendChild(Le)}return Pe}for(var ft=st(Ie.nextSibling,0),Ze;(Ze=ft.parentNode)&&Ze.nodeType===1;)ft=Ze;He.push(ft)}for(var it=0;it<He.length;++it)Qe(He[it]);q===(q|0)&&He[0].setAttribute("value",q);var ut=fe.createElement("ol");ut.className="linenums";for(var dt=Math.max(0,q-1|0)||0,it=0,Fe=He.length;it<Fe;++it)Ee=He[it],Ee.className="L"+(it+dt)%10,Ee.firstChild||Ee.appendChild(fe.createTextNode("\xA0")),ut.appendChild(Ee);ie.appendChild(ut)}function Oe(ie){var q=/\bMSIE\s(\d+)/.exec(navigator.userAgent);q=q&&+q[1]<=8;var Y=/\n/g,X=ie.sourceCode,he=X.length,fe=0,Ee=ie.spans,He=Ee.length,Qe=0,et=ie.decorations,it=et.length,ut=0;et[it]=he;var dt,Fe;for(Fe=dt=0;Fe<it;)et[Fe]!==et[Fe+2]?(et[dt++]=et[Fe++],et[dt++]=et[Fe++]):Fe+=2;for(it=dt,Fe=dt=0;Fe<it;){for(var Ie=et[Fe],st=et[Fe+1],ft=Fe+2;ft+2<=it&&et[ft+1]===st;)ft+=2;et[dt++]=Ie,et[dt++]=st,Fe=ft}it=et.length=dt;var Ze=ie.sourceNode,tt="";Ze&&(tt=Ze.style.display,Ze.style.display="none");try{for(var Be=null;Qe<He;){var Pe=Ee[Qe],Ne=Ee[Qe+2]||he,xe=et[ut+2]||he,ft=Math.min(Ne,xe),Ae=Ee[Qe+1],Le;if(Ae.nodeType!==1&&(Le=X.substring(fe,ft))){q&&(Le=Le.replace(Y,"\r")),Ae.nodeValue=Le;var Me=Ae.ownerDocument,We=Me.createElement("span");We.className=et[ut+1];var nt=Ae.parentNode;nt.replaceChild(We,Ae),We.appendChild(Ae),fe<Ne&&(Ee[Qe+1]=Ae=Me.createTextNode(X.substring(ft,Ne)),nt.insertBefore(Ae,We.nextSibling))}fe=ft,fe>=Ne&&(Qe+=2),fe>=xe&&(ut+=2)}}finally{Ze&&(Ze.style.display=tt)}}var be={};function ce(ie,q){for(var Y=q.length;--Y>=0;){var X=q[Y];be.hasOwnProperty(X)?_.console&&console.warn("cannot override language handler %s",X):be[X]=ie}}function se(ie,q){return ie&&be.hasOwnProperty(ie)||(ie=/^\s*</.test(q)?"default-markup":"default-code"),be[ie]}ce(Re,["default-code"]),ce(de([],[[T,/^[^<?]+/],[N,/^<!\w[^>]*(?:>|$)/],[O,/^<\!--[\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"]),ce(de([[T,/^[\s]+/,null,` \r
`],[z,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[F,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[G,/^(?!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"]),ce(de([],[[z,/^[\s\S]+/]]),["uq.val"]),ce(Ce({keywords:c,hashComments:!0,cStyleComments:!0,types:v}),["c","cc","cpp","cxx","cyc","m"]),ce(Ce({keywords:"null,true,false"}),["json"]),ce(Ce({keywords:i,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:v}),["cs"]),ce(Ce({keywords:a,cStyleComments:!0}),["java"]),ce(Ce({keywords:r,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),ce(Ce({keywords:l,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),ce(Ce({keywords:f,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),ce(Ce({keywords:o,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),ce(Ce({keywords:d,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),ce(Ce({keywords:s,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),ce(de([],[[p,/^[\s\S]+/]]),["regex"]);function ne(ie){var q=ie.langExtension;try{var Y=I(ie.sourceNode,ie.pre),X=Y.sourceCode;ie.sourceCode=X,ie.spans=Y.spans,ie.basePos=0,se(q,X)(ie),Oe(ie)}catch(he){_.console&&console.log(he&&he.stack||he)}}function ge(ie,q,Y){var X=Y||!1,he=q||null,fe=document.createElement("div");fe.innerHTML="<pre>"+ie+"</pre>",fe=fe.firstChild,X&&me(fe,X,!0);var Ee={langExtension:he,numberLines:X,sourceNode:fe,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return ne(Ee),fe.innerHTML}function ee(ie,q){var Y=q||document.body,X=Y.ownerDocument||document;function he(Pe){return Y.getElementsByTagName(Pe)}for(var fe=[he("pre"),he("code"),he("xmp")],Ee=[],He=0;He<fe.length;++He)for(var Qe=0,et=fe[He].length;Qe<et;++Qe)Ee.push(fe[He][Qe]);fe=null;var it=Date;it.now||(it={now:function(){return+new Date}});var ut=0,dt=/\blang(?:uage)?-([\w.]+)(?!\S)/,Fe=/\bprettyprint\b/,Ie=/\bprettyprinted\b/,st=/pre|xmp/i,ft=/^code$/i,Ze=/^(?:pre|code|xmp)$/i,tt={};function Be(){for(var Pe=_.PR_SHOULD_USE_CONTINUATION?it.now()+250:Infinity;ut<Ee.length&&it.now()<Pe;ut++){for(var Ne=Ee[ut],xe=tt,Ae=Ne;Ae=Ae.previousSibling;){var Le=Ae.nodeType,Me=(Le===7||Le===8)&&Ae.nodeValue;if(Me?!/^\??prettify\b/.test(Me):Le!==3||/\S/.test(Ae.nodeValue))break;if(Me){xe={},Me.replace(/\b(\w+)=([\w:.%+-]+)/g,function(bn,Ar,fn){xe[Ar]=fn});break}}var We=Ne.className;if((xe!==tt||Fe.test(We))&&!Ie.test(We)){for(var nt=!1,vt=Ne.parentNode;vt;vt=vt.parentNode){var bt=vt.tagName;if(Ze.test(bt)&&vt.className&&Fe.test(vt.className)){nt=!0;break}}if(!nt){Ne.className+=" prettyprinted";var Wt=xe.lang;if(!Wt){Wt=We.match(dt);var Bt;!Wt&&(Bt=ue(Ne))&&ft.test(Bt.tagName)&&(Wt=Bt.className.match(dt)),Wt&&(Wt=Wt[1])}var lr;if(st.test(Ne.tagName))lr=1;else{var dr=Ne.currentStyle,Ot=X.defaultView,Vr=dr?dr.whiteSpace:Ot&&Ot.getComputedStyle?Ot.getComputedStyle(Ne,null).getPropertyValue("white-space"):0;lr=Vr&&Vr.substring(0,3)==="pre"}var Wr=xe.linenums;(Wr=Wr==="true"||+Wr)||(Wr=We.match(/\blinenums\b(?::(\d+))?/),Wr=Wr?Wr[1]&&Wr[1].length?+Wr[1]:!0:!1),Wr&&me(Ne,Wr,lr);var Yr={langExtension:Wt,sourceNode:Ne,numberLines:Wr,pre:lr,sourceCode:null,basePos:null,spans:null,decorations:null};ne(Yr)}}}ut<Ee.length?_.setTimeout(Be,250):typeof ie=="function"&&ie()}Be()}var re=_.PR={createSimpleLexer:de,registerLangHandler:ce,sourceDecorator:Ce,PR_ATTRIB_NAME:G,PR_ATTRIB_VALUE:z,PR_COMMENT:O,PR_DECLARATION:N,PR_KEYWORD:R,PR_LITERAL:E,PR_NOCODE:A,PR_PLAIN:T,PR_PUNCTUATION:w,PR_SOURCE:L,PR_STRING:p,PR_TAG:F,PR_TYPE:b,prettyPrintOne:C?_.prettyPrintOne=ge:y=ge,prettyPrint:S=C?_.prettyPrint=ee:S=ee},Te=_.define;typeof Te=="function"&&Te.amd&&Te("google-code-prettify",[],function(){return re})})()},Sjjz:function(H,J,D){H.exports={flexRow:"flexRow___1u_bL",flexColumn:"flexColumn___1kaUk",formWrap:"formWrap___31wys",example:"example___Cqoob",footerWrap:"footerWrap___2syNI"}},T8No:function(H,J,D){"use strict";D.d(J,"a",function(){return S}),D.d(J,"e",function(){return _}),D.d(J,"c",function(){return w}),D.d(J,"b",function(){return T}),D.d(J,"d",function(){return F}),D.d(J,"f",function(){return G});var k=D("MNsG"),g=D("N0LK"),C=D("Cg/j");let M=k.k||"";const m=new Map;m.set("false",!1),m.set("true",!0),m.set("isMac",k.f),m.set("isLinux",k.d),m.set("isWindows",k.i),m.set("isWeb",k.h),m.set("isMacNative",k.f&&!k.h),m.set("isEdge",M.indexOf("Edg/")>=0),m.set("isFirefox",M.indexOf("Firefox")>=0),m.set("isChrome",M.indexOf("Chrome")>=0),m.set("isSafari",M.indexOf("Safari")>=0);const y=Object.prototype.hasOwnProperty;class S{static has(A){return c.create(A)}static equals(A,B){return a.create(A,B)}static regex(A,B){return p.create(A,B)}static not(A){return f.create(A)}static and(...A){return b.create(A,null)}static or(...A){return E.create(A,null,!0)}static deserialize(A,B=!1){return A?this._deserializeOrExpression(A,B):void 0}static _deserializeOrExpression(A,B){let U=A.split("||");return E.create(U.map(I=>this._deserializeAndExpression(I,B)),null,!0)}static _deserializeAndExpression(A,B){let U=A.split("&&");return b.create(U.map(I=>this._deserializeOne(I,B)),null)}static _deserializeOne(A,B){if(A=A.trim(),A.indexOf("!=")>=0){let U=A.split("!=");return d.create(U[0].trim(),this._deserializeValue(U[1],B))}if(A.indexOf("==")>=0){let U=A.split("==");return a.create(U[0].trim(),this._deserializeValue(U[1],B))}if(A.indexOf("=~")>=0){let U=A.split("=~");return p.create(U[0].trim(),this._deserializeRegexValue(U[1],B))}if(A.indexOf(" in ")>=0){let U=A.split(" in ");return i.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(A)){const U=A.split(">=");return r.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(A)){const U=A.split(">");return o.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(A)){const U=A.split("<=");return v.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(A)){const U=A.split("<");return x.create(U[0].trim(),U[1].trim())}return/^\!\s*/.test(A)?f.create(A.substr(1).trim()):c.create(A)}static _deserializeValue(A,B){if(A=A.trim(),A==="true")return!0;if(A==="false")return!1;let U=/^'([^']*)'$/.exec(A);return U?U[1].trim():A}static _deserializeRegexValue(A,B){if(Object(g.C)(A)){if(B)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let U=A.indexOf("/"),I=A.lastIndexOf("/");if(U===I||U<0){if(B)throw new Error(`bad regexp-value '${A}', missing /-enclosure`);return console.warn(`bad regexp-value '${A}', missing /-enclosure`),null}let K=A.slice(U+1,I),Z=A[I+1]==="i"?"i":"";try{return new RegExp(K,Z)}catch(ue){if(B)throw new Error(`bad regexp-value '${A}', parse error: ${ue}`);return console.warn(`bad regexp-value '${A}', parse error: ${ue}`),null}}}function _(A,B){const U=A?A.substituteConstants():void 0,I=B?B.substituteConstants():void 0;return!U&&!I?!0:!U||!I?!1:U.equals(I)}function t(A,B){return A.cmp(B)}class h{constructor(){this.type=0}cmp(A){return this.type-A.type}equals(A){return A.type===this.type}substituteConstants(){return this}evaluate(A){return!1}serialize(){return"false"}keys(){return[]}negate(){return n.INSTANCE}}h.INSTANCE=new h;class n{constructor(){this.type=1}cmp(A){return this.type-A.type}equals(A){return A.type===this.type}substituteConstants(){return this}evaluate(A){return!0}serialize(){return"true"}keys(){return[]}negate(){return h.INSTANCE}}n.INSTANCE=new n;class c{constructor(A,B){this.key=A,this.negated=B,this.type=2}static create(A,B=null){const U=m.get(A);return typeof U=="boolean"?U?n.INSTANCE:h.INSTANCE:new c(A,B)}cmp(A){return A.type!==this.type?this.type-A.type:N(this.key,A.key)}equals(A){return A.type===this.type?this.key===A.key:!1}substituteConstants(){const A=m.get(this.key);return typeof A=="boolean"?A?n.INSTANCE:h.INSTANCE:this}evaluate(A){return!!A.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=f.create(this.key,this)),this.negated}}class a{constructor(A,B,U){this.key=A,this.value=B,this.negated=U,this.type=4}static create(A,B,U=null){if(typeof B=="boolean")return B?c.create(A,U):f.create(A,U);const I=m.get(A);if(typeof I=="boolean"){const K=I?"true":"false";return B===K?n.INSTANCE:h.INSTANCE}return new a(A,B,U)}cmp(A){return A.type!==this.type?this.type-A.type:L(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){const A=m.get(this.key);if(typeof A=="boolean"){const B=A?"true":"false";return this.value===B?n.INSTANCE:h.INSTANCE}return this}evaluate(A){return A.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=d.create(this.key,this.value,this)),this.negated}}class i{constructor(A,B){this.key=A,this.valueKey=B,this.type=10,this.negated=null}static create(A,B){return new i(A,B)}cmp(A){return A.type!==this.type?this.type-A.type:L(this.key,this.valueKey,A.key,A.valueKey)}equals(A){return A.type===this.type?this.key===A.key&&this.valueKey===A.valueKey:!1}substituteConstants(){return this}evaluate(A){const B=A.getValue(this.valueKey),U=A.getValue(this.key);return Array.isArray(B)?B.indexOf(U)>=0:typeof U=="string"&&typeof B=="object"&&B!==null?y.call(B,U):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=s.create(this)),this.negated}}class s{constructor(A){this._actual=A,this.type=11}static create(A){return new s(A)}cmp(A){return A.type!==this.type?this.type-A.type:this._actual.cmp(A._actual)}equals(A){return A.type===this.type?this._actual.equals(A._actual):!1}substituteConstants(){return this}evaluate(A){return!this._actual.evaluate(A)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class d{constructor(A,B,U){this.key=A,this.value=B,this.negated=U,this.type=5}static create(A,B,U=null){if(typeof B=="boolean")return B?f.create(A,U):c.create(A,U);const I=m.get(A);if(typeof I=="boolean"){const K=I?"true":"false";return B===K?h.INSTANCE:n.INSTANCE}return new d(A,B,U)}cmp(A){return A.type!==this.type?this.type-A.type:L(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){const A=m.get(this.key);if(typeof A=="boolean"){const B=A?"true":"false";return this.value===B?h.INSTANCE:n.INSTANCE}return this}evaluate(A){return A.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=a.create(this.key,this.value,this)),this.negated}}class f{constructor(A,B){this.key=A,this.negated=B,this.type=3}static create(A,B=null){const U=m.get(A);return typeof U=="boolean"?U?h.INSTANCE:n.INSTANCE:new f(A,B)}cmp(A){return A.type!==this.type?this.type-A.type:N(this.key,A.key)}equals(A){return A.type===this.type?this.key===A.key:!1}substituteConstants(){const A=m.get(this.key);return typeof A=="boolean"?A?h.INSTANCE:n.INSTANCE:this}evaluate(A){return!A.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 l(A,B){if(typeof A=="string"){const U=parseFloat(A);isNaN(U)||(A=U)}return typeof A=="string"||typeof A=="number"?B(A):h.INSTANCE}class o{constructor(A,B,U){this.key=A,this.value=B,this.negated=U,this.type=12}static create(A,B,U=null){return l(B,I=>new o(A,I,U))}cmp(A){return A.type!==this.type?this.type-A.type:L(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){return this}evaluate(A){return typeof this.value=="string"?!1:parseFloat(A.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=v.create(this.key,this.value,this)),this.negated}}class r{constructor(A,B,U){this.key=A,this.value=B,this.negated=U,this.type=13}static create(A,B,U=null){return l(B,I=>new r(A,I,U))}cmp(A){return A.type!==this.type?this.type-A.type:L(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){return this}evaluate(A){return typeof this.value=="string"?!1:parseFloat(A.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=x.create(this.key,this.value,this)),this.negated}}class x{constructor(A,B,U){this.key=A,this.value=B,this.negated=U,this.type=14}static create(A,B,U=null){return l(B,I=>new x(A,I,U))}cmp(A){return A.type!==this.type?this.type-A.type:L(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){return this}evaluate(A){return typeof this.value=="string"?!1:parseFloat(A.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=r.create(this.key,this.value,this)),this.negated}}class v{constructor(A,B,U){this.key=A,this.value=B,this.negated=U,this.type=15}static create(A,B,U=null){return l(B,I=>new v(A,I,U))}cmp(A){return A.type!==this.type?this.type-A.type:L(this.key,this.value,A.key,A.value)}equals(A){return A.type===this.type?this.key===A.key&&this.value===A.value:!1}substituteConstants(){return this}evaluate(A){return typeof this.value=="string"?!1:parseFloat(A.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=o.create(this.key,this.value,this)),this.negated}}class p{constructor(A,B){this.key=A,this.regexp=B,this.type=7,this.negated=null}static create(A,B){return new p(A,B)}cmp(A){if(A.type!==this.type)return this.type-A.type;if(this.key<A.key)return-1;if(this.key>A.key)return 1;const B=this.regexp?this.regexp.source:"",U=A.regexp?A.regexp.source:"";return B<U?-1:B>U?1:0}equals(A){if(A.type===this.type){const B=this.regexp?this.regexp.source:"",U=A.regexp?A.regexp.source:"";return this.key===A.key&&B===U}return!1}substituteConstants(){return this}evaluate(A){let B=A.getValue(this.key);return this.regexp?this.regexp.test(B):!1}serialize(){const A=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${A}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=R.create(this)),this.negated}}class R{constructor(A){this._actual=A,this.type=8}static create(A){return new R(A)}cmp(A){return A.type!==this.type?this.type-A.type:this._actual.cmp(A._actual)}equals(A){return A.type===this.type?this._actual.equals(A._actual):!1}substituteConstants(){return this}evaluate(A){return!this._actual.evaluate(A)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function O(A){let B=null;for(let U=0,I=A.length;U<I;U++){const K=A[U].substituteConstants();if(A[U]!==K&&B===null){B=[];for(let Z=0;Z<U;Z++)B[Z]=A[Z]}B!==null&&(B[U]=K)}return B===null?A:B}class b{constructor(A,B){this.expr=A,this.negated=B,this.type=6}static create(A,B){return b._normalizeArr(A,B)}cmp(A){if(A.type!==this.type)return this.type-A.type;if(this.expr.length<A.expr.length)return-1;if(this.expr.length>A.expr.length)return 1;for(let B=0,U=this.expr.length;B<U;B++){const I=t(this.expr[B],A.expr[B]);if(I!==0)return I}return 0}equals(A){if(A.type===this.type){if(this.expr.length!==A.expr.length)return!1;for(let B=0,U=this.expr.length;B<U;B++)if(!this.expr[B].equals(A.expr[B]))return!1;return!0}return!1}substituteConstants(){const A=O(this.expr);return A===this.expr?this:b.create(A,this.negated)}evaluate(A){for(let B=0,U=this.expr.length;B<U;B++)if(!this.expr[B].evaluate(A))return!1;return!0}static _normalizeArr(A,B){const U=[];let I=!1;for(const K of A){if(!K)continue;if(K.type===1){I=!0;continue}if(K.type===0)return h.INSTANCE;if(K.type===6){U.push(...K.expr);continue}U.push(K)}if(U.length===0&&I)return n.INSTANCE;if(U.length===0)return;if(U.length===1)return U[0];U.sort(t);for(let K=1;K<U.length;K++)U[K-1].equals(U[K])&&(U.splice(K,1),K--);if(U.length===1)return U[0];for(;U.length>1;){const K=U[U.length-1];if(K.type!==9)break;U.pop();const Z=U.pop(),ue=U.length===0,de=E.create(K.expr.map(Ce=>b.create([Ce,Z],null)),null,ue);de&&(U.push(de),U.sort(t))}return U.length===1?U[0]:new b(U,B)}serialize(){return this.expr.map(A=>A.serialize()).join(" && ")}keys(){const A=[];for(let B of this.expr)A.push(...B.keys());return A}negate(){if(!this.negated){const A=[];for(let B of this.expr)A.push(B.negate());this.negated=E.create(A,this,!0)}return this.negated}}class E{constructor(A,B){this.expr=A,this.negated=B,this.type=9}static create(A,B,U){return E._normalizeArr(A,B,U)}cmp(A){if(A.type!==this.type)return this.type-A.type;if(this.expr.length<A.expr.length)return-1;if(this.expr.length>A.expr.length)return 1;for(let B=0,U=this.expr.length;B<U;B++){const I=t(this.expr[B],A.expr[B]);if(I!==0)return I}return 0}equals(A){if(A.type===this.type){if(this.expr.length!==A.expr.length)return!1;for(let B=0,U=this.expr.length;B<U;B++)if(!this.expr[B].equals(A.expr[B]))return!1;return!0}return!1}substituteConstants(){const A=O(this.expr);return A===this.expr?this:E.create(A,this.negated,!1)}evaluate(A){for(let B=0,U=this.expr.length;B<U;B++)if(this.expr[B].evaluate(A))return!0;return!1}static _normalizeArr(A,B,U){let I=[],K=!1;if(A){for(let Z=0,ue=A.length;Z<ue;Z++){const de=A[Z];if(!de)continue;if(de.type===0){K=!0;continue}if(de.type===1)return n.INSTANCE;if(de.type===9){I=I.concat(de.expr);continue}I.push(de)}if(I.length===0&&K)return h.INSTANCE;I.sort(t)}if(I.length===0)return;if(I.length===1)return I[0];for(let Z=1;Z<I.length;Z++)I[Z-1].equals(I[Z])&&(I.splice(Z,1),Z--);if(I.length===1)return I[0];if(U){for(let Z=0;Z<I.length;Z++)for(let ue=Z+1;ue<I.length;ue++)G(I[Z],I[ue])&&(I.splice(ue,1),ue--);if(I.length===1)return I[0]}return new E(I,B)}serialize(){return this.expr.map(A=>A.serialize()).join(" || ")}keys(){const A=[];for(let B of this.expr)A.push(...B.keys());return A}negate(){if(!this.negated){let A=[];for(let B of this.expr)A.push(B.negate());for(;A.length>1;){const B=A.shift(),U=A.shift(),I=[];for(const Z of z(B))for(const ue of z(U))I.push(b.create([Z,ue],null));const K=A.length===0;A.unshift(E.create(I,null,K))}this.negated=A[0]}return this.negated}}class w extends c{constructor(A,B,U){super(A,null);this._defaultValue=B,typeof U=="object"?w._info.push(Object.assign(Object.assign({},U),{key:A})):U!==!0&&w._info.push({key:A,description:U,type:B!=null?typeof B:void 0})}static all(){return w._info.values()}bindTo(A){return A.createKey(this.key,this._defaultValue)}getValue(A){return A.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(A){return a.create(this.key,A)}}w._info=[];const T=Object(C.c)("contextKeyService"),F="setContext";function N(A,B){return A<B?-1:A>B?1:0}function L(A,B,U,I){return A<U?-1:A>U?1:B<I?-1:B>I?1:0}function G(A,B){if(B.type===6&&A.type!==9&&A.type!==6){for(const K of B.expr)if(A.equals(K))return!0}const U=A.negate(),I=z(U).concat(z(B));I.sort(t);for(let K=0;K<I.length;K++){const Z=I[K],ue=Z.negate();for(let de=K+1;de<I.length;de++){const Ce=I[de];if(ue.equals(Ce))return!0}}return!1}function z(A){return A.type===9?A.expr:[A]}},TXwP:function(H,J,D){var k,g;(function(){var C;(function(){"use strict";var m=[,,function(t){function h(a){this.__parent=a,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}h.prototype.clone_empty=function(){var a=new h(this.__parent);return a.set_indent(this.__indent_count,this.__alignment_count),a},h.prototype.item=function(a){return a<0?this.__items[this.__items.length+a]:this.__items[a]},h.prototype.has_match=function(a){for(var i=this.__items.length-1;i>=0;i--)if(this.__items[i].match(a))return!0;return!1},h.prototype.set_indent=function(a,i){this.is_empty()&&(this.__indent_count=a||0,this.__alignment_count=i||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},h.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},h.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},h.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var a=this.__parent.current_line;return a.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),a.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),a.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,a.__items[0]===" "&&(a.__items.splice(0,1),a.__character_count-=1),!0}return!1},h.prototype.is_empty=function(){return this.__items.length===0},h.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},h.prototype.push=function(a){this.__items.push(a);var i=a.lastIndexOf(`
`);i!==-1?this.__character_count=a.length-i:this.__character_count+=a.length},h.prototype.pop=function(){var a=null;return this.is_empty()||(a=this.__items.pop(),this.__character_count-=a.length),a},h.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},h.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},h.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},h.prototype.toString=function(){var a="";return this.is_empty()?this.__parent.indent_empty_lines&&(a=this.__parent.get_indent_string(this.__indent_count)):(a=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),a+=this.__items.join("")),a};function n(a,i){this.__cache=[""],this.__indent_size=a.indent_size,this.__indent_string=a.indent_char,a.indent_with_tabs||(this.__indent_string=new Array(a.indent_size+1).join(a.indent_char)),i=i||"",a.indent_level>0&&(i=new Array(a.indent_level+1).join(this.__indent_string)),this.__base_string=i,this.__base_string_length=i.length}n.prototype.get_indent_size=function(a,i){var s=this.__base_string_length;return i=i||0,a<0&&(s=0),s+=a*this.__indent_size,s+=i,s},n.prototype.get_indent_string=function(a,i){var s=this.__base_string;return i=i||0,a<0&&(a=0,s=""),i+=a*this.__indent_size,this.__ensure_cache(i),s+=this.__cache[i],s},n.prototype.__ensure_cache=function(a){for(;a>=this.__cache.length;)this.__add_column()},n.prototype.__add_column=function(){var a=this.__cache.length,i=0,s="";this.__indent_size&&a>=this.__indent_size&&(i=Math.floor(a/this.__indent_size),a-=i*this.__indent_size,s=new Array(i+1).join(this.__indent_string)),a&&(s+=new Array(a+1).join(" ")),this.__cache.push(s)};function c(a,i){this.__indent_cache=new n(a,i),this.raw=!1,this._end_with_newline=a.end_with_newline,this.indent_size=a.indent_size,this.wrap_line_length=a.wrap_line_length,this.indent_empty_lines=a.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new h(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}c.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},c.prototype.get_line_number=function(){return this.__lines.length},c.prototype.get_indent_string=function(a,i){return this.__indent_cache.get_indent_string(a,i)},c.prototype.get_indent_size=function(a,i){return this.__indent_cache.get_indent_size(a,i)},c.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},c.prototype.add_new_line=function(a){return this.is_empty()||!a&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},c.prototype.get_code=function(a){this.trim(!0);var i=this.current_line.pop();i&&(i[i.length-1]===`
`&&(i=i.replace(/\n+$/g,"")),this.current_line.push(i)),this._end_with_newline&&this.__add_outputline();var s=this.__lines.join(`
`);return a!==`
`&&(s=s.replace(/[\n]/g,a)),s},c.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},c.prototype.set_indent=function(a,i){return a=a||0,i=i||0,this.next_line.set_indent(a,i),this.__lines.length>1?(this.current_line.set_indent(a,i),!0):(this.current_line.set_indent(),!1)},c.prototype.add_raw_token=function(a){for(var i=0;i<a.newlines;i++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(a.whitespace_before),this.current_line.push(a.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},c.prototype.add_token=function(a){this.__add_space_before_token(),this.current_line.push(a),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(a){for(var i=this.__lines.length;a<i;)this.__lines[a]._remove_indent(),a++;this.current_line._remove_wrap_indent()},c.prototype.trim=function(a){for(a=a===void 0?!1:a,this.current_line.trim();a&&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(a,i){for(var s=this.__lines.length-2;s>=0;){var d=this.__lines[s];if(d.is_empty())break;if(d.item(0).indexOf(a)!==0&&d.item(-1)!==i){this.__lines.splice(s+1,0,new h(this)),this.previous_line=this.__lines[this.__lines.length-2];break}s--}},t.exports.Output=c},,,,function(t){function h(a,i){this.raw_options=n(a,i),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}h.prototype._get_array=function(a,i){var s=this.raw_options[a],d=i||[];return typeof s=="object"?s!==null&&typeof s.concat=="function"&&(d=s.concat()):typeof s=="string"&&(d=s.split(/[^a-zA-Z0-9_\/\-]+/)),d},h.prototype._get_boolean=function(a,i){var s=this.raw_options[a],d=s===void 0?!!i:!!s;return d},h.prototype._get_characters=function(a,i){var s=this.raw_options[a],d=i||"";return typeof s=="string"&&(d=s.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),d},h.prototype._get_number=function(a,i){var s=this.raw_options[a];i=parseInt(i,10),isNaN(i)&&(i=0);var d=parseInt(s,10);return isNaN(d)&&(d=i),d},h.prototype._get_selection=function(a,i,s){var d=this._get_selection_list(a,i,s);if(d.length!==1)throw new Error("Invalid Option Value: The option '"+a+`' can only be one of the following values:
`+i+`
You passed in: '`+this.raw_options[a]+"'");return d[0]},h.prototype._get_selection_list=function(a,i,s){if(!i||i.length===0)throw new Error("Selection list cannot be empty.");if(s=s||[i[0]],!this._is_valid_selection(s,i))throw new Error("Invalid Default Value!");var d=this._get_array(a,s);if(!this._is_valid_selection(d,i))throw new Error("Invalid Option Value: The option '"+a+`' can contain only the following values:
`+i+`
You passed in: '`+this.raw_options[a]+"'");return d},h.prototype._is_valid_selection=function(a,i){return a.length&&i.length&&!a.some(function(s){return i.indexOf(s)===-1})};function n(a,i){var s={};a=c(a);var d;for(d in a)d!==i&&(s[d]=a[d]);if(i&&a[i])for(d in a[i])s[d]=a[i][d];return s}function c(a){var i={},s;for(s in a){var d=s.replace(/-/g,"_");i[d]=a[s]}return i}t.exports.Options=h,t.exports.normalizeOpts=c,t.exports.mergeOpts=n},,function(t){var h=RegExp.prototype.hasOwnProperty("sticky");function n(c){this.__input=c||"",this.__input_length=this.__input.length,this.__position=0}n.prototype.restart=function(){this.__position=0},n.prototype.back=function(){this.__position>0&&(this.__position-=1)},n.prototype.hasNext=function(){return this.__position<this.__input_length},n.prototype.next=function(){var c=null;return this.hasNext()&&(c=this.__input.charAt(this.__position),this.__position+=1),c},n.prototype.peek=function(c){var a=null;return c=c||0,c+=this.__position,c>=0&&c<this.__input_length&&(a=this.__input.charAt(c)),a},n.prototype.__match=function(c,a){c.lastIndex=a;var i=c.exec(this.__input);return i&&!(h&&c.sticky)&&(i.index!==a&&(i=null)),i},n.prototype.test=function(c,a){return a=a||0,a+=this.__position,a>=0&&a<this.__input_length?!!this.__match(c,a):!1},n.prototype.testChar=function(c,a){var i=this.peek(a);return c.lastIndex=0,i!==null&&c.test(i)},n.prototype.match=function(c){var a=this.__match(c,this.__position);return a?this.__position+=a[0].length:a=null,a},n.prototype.read=function(c,a,i){var s="",d;return c&&(d=this.match(c),d&&(s+=d[0])),a&&(d||!c)&&(s+=this.readUntil(a,i)),s},n.prototype.readUntil=function(c,a){var i="",s=this.__position;c.lastIndex=this.__position;var d=c.exec(this.__input);return d?(s=d.index,a&&(s+=d[0].length)):s=this.__input_length,i=this.__input.substring(this.__position,s),this.__position=s,i},n.prototype.readUntilAfter=function(c){return this.readUntil(c,!0)},n.prototype.get_regexp=function(c,a){var i=null,s="g";return a&&h&&(s="y"),typeof c=="string"&&c!==""?i=new RegExp(c,s):c&&(i=new RegExp(c.source,s)),i},n.prototype.get_literal_regexp=function(c){return RegExp(c.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},n.prototype.peekUntilAfter=function(c){var a=this.__position,i=this.readUntilAfter(c);return this.__position=a,i},n.prototype.lookBack=function(c){var a=this.__position-1;return a>=c.length&&this.__input.substring(a-c.length,a).toLowerCase()===c},t.exports.InputScanner=n},,,,,function(t){function h(n,c){n=typeof n=="string"?n:n.source,c=typeof c=="string"?c:c.source,this.__directives_block_pattern=new RegExp(n+/ beautify( \w+[:]\w+)+ /.source+c,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(n+/\sbeautify\signore:end\s/.source+c,"g")}h.prototype.get_directives=function(n){if(!n.match(this.__directives_block_pattern))return null;var c={};this.__directive_pattern.lastIndex=0;for(var a=this.__directive_pattern.exec(n);a;)c[a[1]]=a[2],a=this.__directive_pattern.exec(n);return c},h.prototype.readIgnored=function(n){return n.readUntilAfter(this.__directives_end_ignore_pattern)},t.exports.Directives=h},,function(t,h,n){var c=n(16).Beautifier,a=n(17).Options;function i(s,d){var f=new c(s,d);return f.beautify()}t.exports=i,t.exports.defaultOptions=function(){return new a}},function(t,h,n){var c=n(17).Options,a=n(2).Output,i=n(8).InputScanner,s=n(13).Directives,d=new s(/\/\*/,/\*\//),f=/\r\n|[\r\n]/,l=/\r\n|[\r\n]/g,o=/\s/,r=/(?:\s|\n)+/g,x=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,v=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function p(R,O){this._source_text=R||"",this._options=new c(O),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(R){var O="";for(this._ch=this._input.next();this._ch;){if(O+=this._ch,this._ch==="\\")O+=this._input.next();else if(R.indexOf(this._ch)!==-1||this._ch===`
`)break;this._ch=this._input.next()}return O},p.prototype.eatWhitespace=function(R){for(var O=o.test(this._input.peek()),b=0;o.test(this._input.peek());)this._ch=this._input.next(),R&&this._ch===`
`&&((b===0||b<this._options.max_preserve_newlines)&&(b++,this._output.add_new_line(!0)));return O},p.prototype.foundNestedPseudoClass=function(){for(var R=0,O=1,b=this._input.peek(O);b;){if(b==="{")return!0;if(b==="(")R+=1;else if(b===")"){if(R===0)return!1;R-=1}else if(b===";"||b==="}")return!1;O++,b=this._input.peek(O)}return!1},p.prototype.print_string=function(R){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(R)},p.prototype.preserveSingleSpace=function(R){R&&(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 R=this._source_text,O=this._options.eol;O==="auto"&&(O=`
`,R&&f.test(R||"")&&(O=R.match(f)[0])),R=R.replace(l,`
`);var b=R.match(/^[\t ]*/)[0];this._output=new a(this._options,b),this._input=new i(R),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var E=0,w=!1,T=!1,F=!1,N=!1,L=!1,G=!1,z=this._ch,A=!1,B,U,I;B=this._input.read(r),U=B!=="",I=z,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),z=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var K=this._input.read(x),Z=d.get_directives(K);Z&&Z.ignore==="start"&&(K+=d.readIgnored(this._input)),this.print_string(K),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(v)),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 ue=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);ue.match(/[ :]$/)&&(ue=this.eatString(": ").replace(/\s$/,""),this.print_string(ue),this._output.space_before_token=!0),ue=ue.replace(/\s$/,""),ue==="extend"?N=!0:ue==="import"&&(L=!0),ue in this.NESTED_AT_RULE?(this._nestedLevel+=1,ue in this.CONDITIONAL_GROUP_RULE&&(F=!0)):!w&&E===0&&ue.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)):(I==="("?this._output.space_before_token=!1:I!==","&&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(),I==="{"&&this._output.trim(!0),L=!1,N=!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 de=0;de<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;de++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[de])){A=!0;break}(w||F)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!N&&E===0?(this.print_string(":"),T||(T=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var Ce=I==='"'||I==="'";this.preserveSingleSpace(Ce||U),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")A=!1,E===0?(T&&(this.outdent(),T=!1),N=!1,L=!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(),E++,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(")")),E&&(E--,this.outdent()));else{var Re=!1;this._input.lookBack("with")&&(Re=!0),this.preserveSingleSpace(U||Re),this.print_string(this._ch),T&&I==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),G=!0):(this.eatWhitespace(),E++,this.indent())}else if(this._ch===")")E&&(E--,this.outdent()),G&&this._input.peek()===";"&&this._options.selector_separator_newline&&(G=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!T||G)&&E===0&&!L&&!N?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!T&&E===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&o.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(U),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),o.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var me=I==='"'||I==="'";this.preserveSingleSpace(me||U),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
`&&A&&this._output.add_new_line()}var Oe=this._output.get_code(O);return Oe},t.exports.Beautifier=p},function(t,h,n){var c=n(6).Options;function a(i){c.call(this,i,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var s=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||s;var d=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var f=0;f<d.length;f++)d[f]!=="expand"?this.brace_style="collapse":this.brace_style=d[f]}a.prototype=new c,t.exports.Options=a}],y={};function S(t){var h=y[t];if(h!==void 0)return h.exports;var n=y[t]={exports:{}};return m[t](n,n.exports,S),n.exports}var _=S(15);C=_})();var M=C;!(k=[],g=function(){return{css_beautify:M}}.apply(J,k),g!==void 0&&(H.exports=g))})()},UfjD:function(H,J,D){"use strict";var k=D("2qtc"),g=D("kLXV"),C=D("5NDa"),M=D("5rEg"),m=D("miYZ"),y=D("tsqr"),S=D("tJVT"),_=D("q1tI"),t=D.n(_),h=D("4i/N");function n(c){var a=c.isjoin,i=c.setJoin,s=c.JoinTeams,d=Object(_.useState)(""),f=Object(S.a)(d,2),l=f[0],o=f[1];return t.a.createElement(g.a,{centered:!0,title:t.a.createElement("div",{style:{alignItems:"center",display:"flex"}},t.a.createElement("div",{style:{textAlign:"left",flex:"1"}},"\u52A0\u5165\u6218\u961F"),t.a.createElement(h.a,{onClick:function(){return i(!1)},style:{cursor:"porint"}})),visible:a,closable:!1,destroyOnClose:!0,onOk:function(){if(!l){y.b.info("\u9080\u8BF7\u7801\u4E0D\u80FD\u4E3A\u7A7A");return}s(l)},onCancel:function(){return i(!1)}},t.a.createElement("div",null,t.a.createElement("p",{style:{marginTop:"15px",marginLeft:"15px",display:"flex",alignItems:"center"}},t.a.createElement("span",{style:{flex:"none"}},"\u9080\u8BF7\u7801\uFF1A")," ",t.a.createElement(M.a,{placeholder:"\u8BF7\u8F93\u5165\u9080\u8BF7\u7801",value:l,maxLength:60,addonAfter:String(l&&l.length||0)+"/60",onChange:function(x){return o(x.target.value)}}))))}J.a=n},Vhoy:function(H,J,D){"use strict";D.d(J,"d",function(){return M}),D.d(J,"e",function(){return m}),D.d(J,"c",function(){return y}),D.d(J,"b",function(){return S}),D.d(J,"a",function(){return _});var k=D("MI8n");class g{constructor(){this._icons=new Map,this._onDidRegister=new k.b}add(t){const h=this._icons.get(t.id);h?t.description?h.description=t.description:console.error(`Duplicate registration of codicon ${t.id}`):(this._icons.set(t.id,t),this._onDidRegister.fire(t))}get(t){return this._icons.get(t)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const C=new g,M=C;function m(t,h){return new S(t,h)}function y(t){return t?t.replace(/\$\((.*?)\)/g,(h,n)=>` ${n} `).trim():""}class S{constructor(t,h,n){this.id=t,this.definition=h,this.description=n,C.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(t){t.iconNameSegment="[A-Za-z0-9]+",t.iconNameExpression="[A-Za-z0-9\\-]+",t.iconModifierExpression="~[A-Za-z]+";const h=new RegExp(`^(${t.iconNameExpression})(${t.iconModifierExpression})?$`);function n(i){if(i instanceof S)return["codicon","codicon-"+i.id];const s=h.exec(i.id);if(!s)return n(S.error);let[,d,f]=s;const l=["codicon","codicon-"+d];return f&&l.push("codicon-modifier-"+f.substr(1)),l}t.asClassNameArray=n;function c(i){return n(i).join(" ")}t.asClassName=c;function a(i){return"."+n(i).join(".")}t.asCSSSelector=a})(_||(_={})),function(t){t.add=new t("add",{fontCharacter:"\\ea60"}),t.plus=new t("plus",t.add.definition),t.gistNew=new t("gist-new",t.add.definition),t.repoCreate=new t("repo-create",t.add.definition),t.lightbulb=new t("lightbulb",{fontCharacter:"\\ea61"}),t.lightBulb=new t("light-bulb",{fontCharacter:"\\ea61"}),t.repo=new t("repo",{fontCharacter:"\\ea62"}),t.repoDelete=new t("repo-delete",{fontCharacter:"\\ea62"}),t.gistFork=new t("gist-fork",{fontCharacter:"\\ea63"}),t.repoForked=new t("repo-forked",{fontCharacter:"\\ea63"}),t.gitPullRequest=new t("git-pull-request",{fontCharacter:"\\ea64"}),t.gitPullRequestAbandoned=new t("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),t.recordKeys=new t("record-keys",{fontCharacter:"\\ea65"}),t.keyboard=new t("keyboard",{fontCharacter:"\\ea65"}),t.tag=new t("tag",{fontCharacter:"\\ea66"}),t.tagAdd=new t("tag-add",{fontCharacter:"\\ea66"}),t.tagRemove=new t("tag-remove",{fontCharacter:"\\ea66"}),t.person=new t("person",{fontCharacter:"\\ea67"}),t.personFollow=new t("person-follow",{fontCharacter:"\\ea67"}),t.personOutline=new t("person-outline",{fontCharacter:"\\ea67"}),t.personFilled=new t("person-filled",{fontCharacter:"\\ea67"}),t.gitBranch=new t("git-branch",{fontCharacter:"\\ea68"}),t.gitBranchCreate=new t("git-branch-create",{fontCharacter:"\\ea68"}),t.gitBranchDelete=new t("git-branch-delete",{fontCharacter:"\\ea68"}),t.sourceControl=new t("source-control",{fontCharacter:"\\ea68"}),t.mirror=new t("mirror",{fontCharacter:"\\ea69"}),t.mirrorPublic=new t("mirror-public",{fontCharacter:"\\ea69"}),t.star=new t("star",{fontCharacter:"\\ea6a"}),t.starAdd=new t("star-add",{fontCharacter:"\\ea6a"}),t.starDelete=new t("star-delete",{fontCharacter:"\\ea6a"}),t.starEmpty=new t("star-empty",{fontCharacter:"\\ea6a"}),t.comment=new t("comment",{fontCharacter:"\\ea6b"}),t.commentAdd=new t("comment-add",{fontCharacter:"\\ea6b"}),t.alert=new t("alert",{fontCharacter:"\\ea6c"}),t.warning=new t("warning",{fontCharacter:"\\ea6c"}),t.search=new t("search",{fontCharacter:"\\ea6d"}),t.searchSave=new t("search-save",{fontCharacter:"\\ea6d"}),t.logOut=new t("log-out",{fontCharacter:"\\ea6e"}),t.signOut=new t("sign-out",{fontCharacter:"\\ea6e"}),t.logIn=new t("log-in",{fontCharacter:"\\ea6f"}),t.signIn=new t("sign-in",{fontCharacter:"\\ea6f"}),t.eye=new t("eye",{fontCharacter:"\\ea70"}),t.eyeUnwatch=new t("eye-unwatch",{fontCharacter:"\\ea70"}),t.eyeWatch=new t("eye-watch",{fontCharacter:"\\ea70"}),t.circleFilled=new t("circle-filled",{fontCharacter:"\\ea71"}),t.primitiveDot=new t("primitive-dot",{fontCharacter:"\\ea71"}),t.closeDirty=new t("close-dirty",{fontCharacter:"\\ea71"}),t.debugBreakpoint=new t("debug-breakpoint",{fontCharacter:"\\ea71"}),t.debugBreakpointDisabled=new t("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),t.debugHint=new t("debug-hint",{fontCharacter:"\\ea71"}),t.primitiveSquare=new t("primitive-square",{fontCharacter:"\\ea72"}),t.edit=new t("edit",{fontCharacter:"\\ea73"}),t.pencil=new t("pencil",{fontCharacter:"\\ea73"}),t.info=new t("info",{fontCharacter:"\\ea74"}),t.issueOpened=new t("issue-opened",{fontCharacter:"\\ea74"}),t.gistPrivate=new t("gist-private",{fontCharacter:"\\ea75"}),t.gitForkPrivate=new t("git-fork-private",{fontCharacter:"\\ea75"}),t.lock=new t("lock",{fontCharacter:"\\ea75"}),t.mirrorPrivate=new t("mirror-private",{fontCharacter:"\\ea75"}),t.close=new t("close",{fontCharacter:"\\ea76"}),t.removeClose=new t("remove-close",{fontCharacter:"\\ea76"}),t.x=new t("x",{fontCharacter:"\\ea76"}),t.repoSync=new t("repo-sync",{fontCharacter:"\\ea77"}),t.sync=new t("sync",{fontCharacter:"\\ea77"}),t.clone=new t("clone",{fontCharacter:"\\ea78"}),t.desktopDownload=new t("desktop-download",{fontCharacter:"\\ea78"}),t.beaker=new t("beaker",{fontCharacter:"\\ea79"}),t.microscope=new t("microscope",{fontCharacter:"\\ea79"}),t.vm=new t("vm",{fontCharacter:"\\ea7a"}),t.deviceDesktop=new t("device-desktop",{fontCharacter:"\\ea7a"}),t.file=new t("file",{fontCharacter:"\\ea7b"}),t.fileText=new t("file-text",{fontCharacter:"\\ea7b"}),t.more=new t("more",{fontCharacter:"\\ea7c"}),t.ellipsis=new t("ellipsis",{fontCharacter:"\\ea7c"}),t.kebabHorizontal=new t("kebab-horizontal",{fontCharacter:"\\ea7c"}),t.mailReply=new t("mail-reply",{fontCharacter:"\\ea7d"}),t.reply=new t("reply",{fontCharacter:"\\ea7d"}),t.organization=new t("organization",{fontCharacter:"\\ea7e"}),t.organizationFilled=new t("organization-filled",{fontCharacter:"\\ea7e"}),t.organizationOutline=new t("organization-outline",{fontCharacter:"\\ea7e"}),t.newFile=new t("new-file",{fontCharacter:"\\ea7f"}),t.fileAdd=new t("file-add",{fontCharacter:"\\ea7f"}),t.newFolder=new t("new-folder",{fontCharacter:"\\ea80"}),t.fileDirectoryCreate=new t("file-directory-create",{fontCharacter:"\\ea80"}),t.trash=new t("trash",{fontCharacter:"\\ea81"}),t.trashcan=new t("trashcan",{fontCharacter:"\\ea81"}),t.history=new t("history",{fontCharacter:"\\ea82"}),t.clock=new t("clock",{fontCharacter:"\\ea82"}),t.folder=new t("folder",{fontCharacter:"\\ea83"}),t.fileDirectory=new t("file-directory",{fontCharacter:"\\ea83"}),t.symbolFolder=new t("symbol-folder",{fontCharacter:"\\ea83"}),t.logoGithub=new t("logo-github",{fontCharacter:"\\ea84"}),t.markGithub=new t("mark-github",{fontCharacter:"\\ea84"}),t.github=new t("github",{fontCharacter:"\\ea84"}),t.terminal=new t("terminal",{fontCharacter:"\\ea85"}),t.console=new t("console",{fontCharacter:"\\ea85"}),t.repl=new t("repl",{fontCharacter:"\\ea85"}),t.zap=new t("zap",{fontCharacter:"\\ea86"}),t.symbolEvent=new t("symbol-event",{fontCharacter:"\\ea86"}),t.error=new t("error",{fontCharacter:"\\ea87"}),t.stop=new t("stop",{fontCharacter:"\\ea87"}),t.variable=new t("variable",{fontCharacter:"\\ea88"}),t.symbolVariable=new t("symbol-variable",{fontCharacter:"\\ea88"}),t.array=new t("array",{fontCharacter:"\\ea8a"}),t.symbolArray=new t("symbol-array",{fontCharacter:"\\ea8a"}),t.symbolModule=new t("symbol-module",{fontCharacter:"\\ea8b"}),t.symbolPackage=new t("symbol-package",{fontCharacter:"\\ea8b"}),t.symbolNamespace=new t("symbol-namespace",{fontCharacter:"\\ea8b"}),t.symbolObject=new t("symbol-object",{fontCharacter:"\\ea8b"}),t.symbolMethod=new t("symbol-method",{fontCharacter:"\\ea8c"}),t.symbolFunction=new t("symbol-function",{fontCharacter:"\\ea8c"}),t.symbolConstructor=new t("symbol-constructor",{fontCharacter:"\\ea8c"}),t.symbolBoolean=new t("symbol-boolean",{fontCharacter:"\\ea8f"}),t.symbolNull=new t("symbol-null",{fontCharacter:"\\ea8f"}),t.symbolNumeric=new t("symbol-numeric",{fontCharacter:"\\ea90"}),t.symbolNumber=new t("symbol-number",{fontCharacter:"\\ea90"}),t.symbolStructure=new t("symbol-structure",{fontCharacter:"\\ea91"}),t.symbolStruct=new t("symbol-struct",{fontCharacter:"\\ea91"}),t.symbolParameter=new t("symbol-parameter",{fontCharacter:"\\ea92"}),t.symbolTypeParameter=new t("symbol-type-parameter",{fontCharacter:"\\ea92"}),t.symbolKey=new t("symbol-key",{fontCharacter:"\\ea93"}),t.symbolText=new t("symbol-text",{fontCharacter:"\\ea93"}),t.symbolReference=new t("symbol-reference",{fontCharacter:"\\ea94"}),t.goToFile=new t("go-to-file",{fontCharacter:"\\ea94"}),t.symbolEnum=new t("symbol-enum",{fontCharacter:"\\ea95"}),t.symbolValue=new t("symbol-value",{fontCharacter:"\\ea95"}),t.symbolRuler=new t("symbol-ruler",{fontCharacter:"\\ea96"}),t.symbolUnit=new t("symbol-unit",{fontCharacter:"\\ea96"}),t.activateBreakpoints=new t("activate-breakpoints",{fontCharacter:"\\ea97"}),t.archive=new t("archive",{fontCharacter:"\\ea98"}),t.arrowBoth=new t("arrow-both",{fontCharacter:"\\ea99"}),t.arrowDown=new t("arrow-down",{fontCharacter:"\\ea9a"}),t.arrowLeft=new t("arrow-left",{fontCharacter:"\\ea9b"}),t.arrowRight=new t("arrow-right",{fontCharacter:"\\ea9c"}),t.arrowSmallDown=new t("arrow-small-down",{fontCharacter:"\\ea9d"}),t.arrowSmallLeft=new t("arrow-small-left",{fontCharacter:"\\ea9e"}),t.arrowSmallRight=new t("arrow-small-right",{fontCharacter:"\\ea9f"}),t.arrowSmallUp=new t("arrow-small-up",{fontCharacter:"\\eaa0"}),t.arrowUp=new t("arrow-up",{fontCharacter:"\\eaa1"}),t.bell=new t("bell",{fontCharacter:"\\eaa2"}),t.bold=new t("bold",{fontCharacter:"\\eaa3"}),t.book=new t("book",{fontCharacter:"\\eaa4"}),t.bookmark=new t("bookmark",{fontCharacter:"\\eaa5"}),t.debugBreakpointConditionalUnverified=new t("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),t.debugBreakpointConditional=new t("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),t.debugBreakpointConditionalDisabled=new t("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),t.debugBreakpointDataUnverified=new t("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),t.debugBreakpointData=new t("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),t.debugBreakpointDataDisabled=new t("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),t.debugBreakpointLogUnverified=new t("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),t.debugBreakpointLog=new t("debug-breakpoint-log",{fontCharacter:"\\eaab"}),t.debugBreakpointLogDisabled=new t("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),t.briefcase=new t("briefcase",{fontCharacter:"\\eaac"}),t.broadcast=new t("broadcast",{fontCharacter:"\\eaad"}),t.browser=new t("browser",{fontCharacter:"\\eaae"}),t.bug=new t("bug",{fontCharacter:"\\eaaf"}),t.calendar=new t("calendar",{fontCharacter:"\\eab0"}),t.caseSensitive=new t("case-sensitive",{fontCharacter:"\\eab1"}),t.check=new t("check",{fontCharacter:"\\eab2"}),t.checklist=new t("checklist",{fontCharacter:"\\eab3"}),t.chevronDown=new t("chevron-down",{fontCharacter:"\\eab4"}),t.dropDownButton=new t("drop-down-button",t.chevronDown.definition),t.chevronLeft=new t("chevron-left",{fontCharacter:"\\eab5"}),t.chevronRight=new t("chevron-right",{fontCharacter:"\\eab6"}),t.chevronUp=new t("chevron-up",{fontCharacter:"\\eab7"}),t.chromeClose=new t("chrome-close",{fontCharacter:"\\eab8"}),t.chromeMaximize=new t("chrome-maximize",{fontCharacter:"\\eab9"}),t.chromeMinimize=new t("chrome-minimize",{fontCharacter:"\\eaba"}),t.chromeRestore=new t("chrome-restore",{fontCharacter:"\\eabb"}),t.circleOutline=new t("circle-outline",{fontCharacter:"\\eabc"}),t.debugBreakpointUnverified=new t("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),t.circleSlash=new t("circle-slash",{fontCharacter:"\\eabd"}),t.circuitBoard=new t("circuit-board",{fontCharacter:"\\eabe"}),t.clearAll=new t("clear-all",{fontCharacter:"\\eabf"}),t.clippy=new t("clippy",{fontCharacter:"\\eac0"}),t.closeAll=new t("close-all",{fontCharacter:"\\eac1"}),t.cloudDownload=new t("cloud-download",{fontCharacter:"\\eac2"}),t.cloudUpload=new t("cloud-upload",{fontCharacter:"\\eac3"}),t.code=new t("code",{fontCharacter:"\\eac4"}),t.collapseAll=new t("collapse-all",{fontCharacter:"\\eac5"}),t.colorMode=new t("color-mode",{fontCharacter:"\\eac6"}),t.commentDiscussion=new t("comment-discussion",{fontCharacter:"\\eac7"}),t.compareChanges=new t("compare-changes",{fontCharacter:"\\eafd"}),t.creditCard=new t("credit-card",{fontCharacter:"\\eac9"}),t.dash=new t("dash",{fontCharacter:"\\eacc"}),t.dashboard=new t("dashboard",{fontCharacter:"\\eacd"}),t.database=new t("database",{fontCharacter:"\\eace"}),t.debugContinue=new t("debug-continue",{fontCharacter:"\\eacf"}),t.debugDisconnect=new t("debug-disconnect",{fontCharacter:"\\ead0"}),t.debugPause=new t("debug-pause",{fontCharacter:"\\ead1"}),t.debugRestart=new t("debug-restart",{fontCharacter:"\\ead2"}),t.debugStart=new t("debug-start",{fontCharacter:"\\ead3"}),t.debugStepInto=new t("debug-step-into",{fontCharacter:"\\ead4"}),t.debugStepOut=new t("debug-step-out",{fontCharacter:"\\ead5"}),t.debugStepOver=new t("debug-step-over",{fontCharacter:"\\ead6"}),t.debugStop=new t("debug-stop",{fontCharacter:"\\ead7"}),t.debug=new t("debug",{fontCharacter:"\\ead8"}),t.deviceCameraVideo=new t("device-camera-video",{fontCharacter:"\\ead9"}),t.deviceCamera=new t("device-camera",{fontCharacter:"\\eada"}),t.deviceMobile=new t("device-mobile",{fontCharacter:"\\eadb"}),t.diffAdded=new t("diff-added",{fontCharacter:"\\eadc"}),t.diffIgnored=new t("diff-ignored",{fontCharacter:"\\eadd"}),t.diffModified=new t("diff-modified",{fontCharacter:"\\eade"}),t.diffRemoved=new t("diff-removed",{fontCharacter:"\\eadf"}),t.diffRenamed=new t("diff-renamed",{fontCharacter:"\\eae0"}),t.diff=new t("diff",{fontCharacter:"\\eae1"}),t.discard=new t("discard",{fontCharacter:"\\eae2"}),t.editorLayout=new t("editor-layout",{fontCharacter:"\\eae3"}),t.emptyWindow=new t("empty-window",{fontCharacter:"\\eae4"}),t.exclude=new t("exclude",{fontCharacter:"\\eae5"}),t.extensions=new t("extensions",{fontCharacter:"\\eae6"}),t.eyeClosed=new t("eye-closed",{fontCharacter:"\\eae7"}),t.fileBinary=new t("file-binary",{fontCharacter:"\\eae8"}),t.fileCode=new t("file-code",{fontCharacter:"\\eae9"}),t.fileMedia=new t("file-media",{fontCharacter:"\\eaea"}),t.filePdf=new t("file-pdf",{fontCharacter:"\\eaeb"}),t.fileSubmodule=new t("file-submodule",{fontCharacter:"\\eaec"}),t.fileSymlinkDirectory=new t("file-symlink-directory",{fontCharacter:"\\eaed"}),t.fileSymlinkFile=new t("file-symlink-file",{fontCharacter:"\\eaee"}),t.fileZip=new t("file-zip",{fontCharacter:"\\eaef"}),t.files=new t("files",{fontCharacter:"\\eaf0"}),t.filter=new t("filter",{fontCharacter:"\\eaf1"}),t.flame=new t("flame",{fontCharacter:"\\eaf2"}),t.foldDown=new t("fold-down",{fontCharacter:"\\eaf3"}),t.foldUp=new t("fold-up",{fontCharacter:"\\eaf4"}),t.fold=new t("fold",{fontCharacter:"\\eaf5"}),t.folderActive=new t("folder-active",{fontCharacter:"\\eaf6"}),t.folderOpened=new t("folder-opened",{fontCharacter:"\\eaf7"}),t.gear=new t("gear",{fontCharacter:"\\eaf8"}),t.gift=new t("gift",{fontCharacter:"\\eaf9"}),t.gistSecret=new t("gist-secret",{fontCharacter:"\\eafa"}),t.gist=new t("gist",{fontCharacter:"\\eafb"}),t.gitCommit=new t("git-commit",{fontCharacter:"\\eafc"}),t.gitCompare=new t("git-compare",{fontCharacter:"\\eafd"}),t.gitMerge=new t("git-merge",{fontCharacter:"\\eafe"}),t.githubAction=new t("github-action",{fontCharacter:"\\eaff"}),t.githubAlt=new t("github-alt",{fontCharacter:"\\eb00"}),t.globe=new t("globe",{fontCharacter:"\\eb01"}),t.grabber=new t("grabber",{fontCharacter:"\\eb02"}),t.graph=new t("graph",{fontCharacter:"\\eb03"}),t.gripper=new t("gripper",{fontCharacter:"\\eb04"}),t.heart=new t("heart",{fontCharacter:"\\eb05"}),t.home=new t("home",{fontCharacter:"\\eb06"}),t.horizontalRule=new t("horizontal-rule",{fontCharacter:"\\eb07"}),t.hubot=new t("hubot",{fontCharacter:"\\eb08"}),t.inbox=new t("inbox",{fontCharacter:"\\eb09"}),t.issueClosed=new t("issue-closed",{fontCharacter:"\\eba4"}),t.issueReopened=new t("issue-reopened",{fontCharacter:"\\eb0b"}),t.issues=new t("issues",{fontCharacter:"\\eb0c"}),t.italic=new t("italic",{fontCharacter:"\\eb0d"}),t.jersey=new t("jersey",{fontCharacter:"\\eb0e"}),t.json=new t("json",{fontCharacter:"\\eb0f"}),t.kebabVertical=new t("kebab-vertical",{fontCharacter:"\\eb10"}),t.key=new t("key",{fontCharacter:"\\eb11"}),t.law=new t("law",{fontCharacter:"\\eb12"}),t.lightbulbAutofix=new t("lightbulb-autofix",{fontCharacter:"\\eb13"}),t.linkExternal=new t("link-external",{fontCharacter:"\\eb14"}),t.link=new t("link",{fontCharacter:"\\eb15"}),t.listOrdered=new t("list-ordered",{fontCharacter:"\\eb16"}),t.listUnordered=new t("list-unordered",{fontCharacter:"\\eb17"}),t.liveShare=new t("live-share",{fontCharacter:"\\eb18"}),t.loading=new t("loading",{fontCharacter:"\\eb19"}),t.location=new t("location",{fontCharacter:"\\eb1a"}),t.mailRead=new t("mail-read",{fontCharacter:"\\eb1b"}),t.mail=new t("mail",{fontCharacter:"\\eb1c"}),t.markdown=new t("markdown",{fontCharacter:"\\eb1d"}),t.megaphone=new t("megaphone",{fontCharacter:"\\eb1e"}),t.mention=new t("mention",{fontCharacter:"\\eb1f"}),t.milestone=new t("milestone",{fontCharacter:"\\eb20"}),t.mortarBoard=new t("mortar-board",{fontCharacter:"\\eb21"}),t.move=new t("move",{fontCharacter:"\\eb22"}),t.multipleWindows=new t("multiple-windows",{fontCharacter:"\\eb23"}),t.mute=new t("mute",{fontCharacter:"\\eb24"}),t.noNewline=new t("no-newline",{fontCharacter:"\\eb25"}),t.note=new t("note",{fontCharacter:"\\eb26"}),t.octoface=new t("octoface",{fontCharacter:"\\eb27"}),t.openPreview=new t("open-preview",{fontCharacter:"\\eb28"}),t.package_=new t("package",{fontCharacter:"\\eb29"}),t.paintcan=new t("paintcan",{fontCharacter:"\\eb2a"}),t.pin=new t("pin",{fontCharacter:"\\eb2b"}),t.play=new t("play",{fontCharacter:"\\eb2c"}),t.run=new t("run",{fontCharacter:"\\eb2c"}),t.plug=new t("plug",{fontCharacter:"\\eb2d"}),t.preserveCase=new t("preserve-case",{fontCharacter:"\\eb2e"}),t.preview=new t("preview",{fontCharacter:"\\eb2f"}),t.project=new t("project",{fontCharacter:"\\eb30"}),t.pulse=new t("pulse",{fontCharacter:"\\eb31"}),t.question=new t("question",{fontCharacter:"\\eb32"}),t.quote=new t("quote",{fontCharacter:"\\eb33"}),t.radioTower=new t("radio-tower",{fontCharacter:"\\eb34"}),t.reactions=new t("reactions",{fontCharacter:"\\eb35"}),t.references=new t("references",{fontCharacter:"\\eb36"}),t.refresh=new t("refresh",{fontCharacter:"\\eb37"}),t.regex=new t("regex",{fontCharacter:"\\eb38"}),t.remoteExplorer=new t("remote-explorer",{fontCharacter:"\\eb39"}),t.remote=new t("remote",{fontCharacter:"\\eb3a"}),t.remove=new t("remove",{fontCharacter:"\\eb3b"}),t.replaceAll=new t("replace-all",{fontCharacter:"\\eb3c"}),t.replace=new t("replace",{fontCharacter:"\\eb3d"}),t.repoClone=new t("repo-clone",{fontCharacter:"\\eb3e"}),t.repoForcePush=new t("repo-force-push",{fontCharacter:"\\eb3f"}),t.repoPull=new t("repo-pull",{fontCharacter:"\\eb40"}),t.repoPush=new t("repo-push",{fontCharacter:"\\eb41"}),t.report=new t("report",{fontCharacter:"\\eb42"}),t.requestChanges=new t("request-changes",{fontCharacter:"\\eb43"}),t.rocket=new t("rocket",{fontCharacter:"\\eb44"}),t.rootFolderOpened=new t("root-folder-opened",{fontCharacter:"\\eb45"}),t.rootFolder=new t("root-folder",{fontCharacter:"\\eb46"}),t.rss=new t("rss",{fontCharacter:"\\eb47"}),t.ruby=new t("ruby",{fontCharacter:"\\eb48"}),t.saveAll=new t("save-all",{fontCharacter:"\\eb49"}),t.saveAs=new t("save-as",{fontCharacter:"\\eb4a"}),t.save=new t("save",{fontCharacter:"\\eb4b"}),t.screenFull=new t("screen-full",{fontCharacter:"\\eb4c"}),t.screenNormal=new t("screen-normal",{fontCharacter:"\\eb4d"}),t.searchStop=new t("search-stop",{fontCharacter:"\\eb4e"}),t.server=new t("server",{fontCharacter:"\\eb50"}),t.settingsGear=new t("settings-gear",{fontCharacter:"\\eb51"}),t.settings=new t("settings",{fontCharacter:"\\eb52"}),t.shield=new t("shield",{fontCharacter:"\\eb53"}),t.smiley=new t("smiley",{fontCharacter:"\\eb54"}),t.sortPrecedence=new t("sort-precedence",{fontCharacter:"\\eb55"}),t.splitHorizontal=new t("split-horizontal",{fontCharacter:"\\eb56"}),t.splitVertical=new t("split-vertical",{fontCharacter:"\\eb57"}),t.squirrel=new t("squirrel",{fontCharacter:"\\eb58"}),t.starFull=new t("star-full",{fontCharacter:"\\eb59"}),t.starHalf=new t("star-half",{fontCharacter:"\\eb5a"}),t.symbolClass=new t("symbol-class",{fontCharacter:"\\eb5b"}),t.symbolColor=new t("symbol-color",{fontCharacter:"\\eb5c"}),t.symbolConstant=new t("symbol-constant",{fontCharacter:"\\eb5d"}),t.symbolEnumMember=new t("symbol-enum-member",{fontCharacter:"\\eb5e"}),t.symbolField=new t("symbol-field",{fontCharacter:"\\eb5f"}),t.symbolFile=new t("symbol-file",{fontCharacter:"\\eb60"}),t.symbolInterface=new t("symbol-interface",{fontCharacter:"\\eb61"}),t.symbolKeyword=new t("symbol-keyword",{fontCharacter:"\\eb62"}),t.symbolMisc=new t("symbol-misc",{fontCharacter:"\\eb63"}),t.symbolOperator=new t("symbol-operator",{fontCharacter:"\\eb64"}),t.symbolProperty=new t("symbol-property",{fontCharacter:"\\eb65"}),t.wrench=new t("wrench",{fontCharacter:"\\eb65"}),t.wrenchSubaction=new t("wrench-subaction",{fontCharacter:"\\eb65"}),t.symbolSnippet=new t("symbol-snippet",{fontCharacter:"\\eb66"}),t.tasklist=new t("tasklist",{fontCharacter:"\\eb67"}),t.telescope=new t("telescope",{fontCharacter:"\\eb68"}),t.textSize=new t("text-size",{fontCharacter:"\\eb69"}),t.threeBars=new t("three-bars",{fontCharacter:"\\eb6a"}),t.thumbsdown=new t("thumbsdown",{fontCharacter:"\\eb6b"}),t.thumbsup=new t("thumbsup",{fontCharacter:"\\eb6c"}),t.tools=new t("tools",{fontCharacter:"\\eb6d"}),t.triangleDown=new t("triangle-down",{fontCharacter:"\\eb6e"}),t.triangleLeft=new t("triangle-left",{fontCharacter:"\\eb6f"}),t.triangleRight=new t("triangle-right",{fontCharacter:"\\eb70"}),t.triangleUp=new t("triangle-up",{fontCharacter:"\\eb71"}),t.twitter=new t("twitter",{fontCharacter:"\\eb72"}),t.unfold=new t("unfold",{fontCharacter:"\\eb73"}),t.unlock=new t("unlock",{fontCharacter:"\\eb74"}),t.unmute=new t("unmute",{fontCharacter:"\\eb75"}),t.unverified=new t("unverified",{fontCharacter:"\\eb76"}),t.verified=new t("verified",{fontCharacter:"\\eb77"}),t.versions=new t("versions",{fontCharacter:"\\eb78"}),t.vmActive=new t("vm-active",{fontCharacter:"\\eb79"}),t.vmOutline=new t("vm-outline",{fontCharacter:"\\eb7a"}),t.vmRunning=new t("vm-running",{fontCharacter:"\\eb7b"}),t.watch=new t("watch",{fontCharacter:"\\eb7c"}),t.whitespace=new t("whitespace",{fontCharacter:"\\eb7d"}),t.wholeWord=new t("whole-word",{fontCharacter:"\\eb7e"}),t.window=new t("window",{fontCharacter:"\\eb7f"}),t.wordWrap=new t("word-wrap",{fontCharacter:"\\eb80"}),t.zoomIn=new t("zoom-in",{fontCharacter:"\\eb81"}),t.zoomOut=new t("zoom-out",{fontCharacter:"\\eb82"}),t.listFilter=new t("list-filter",{fontCharacter:"\\eb83"}),t.listFlat=new t("list-flat",{fontCharacter:"\\eb84"}),t.listSelection=new t("list-selection",{fontCharacter:"\\eb85"}),t.selection=new t("selection",{fontCharacter:"\\eb85"}),t.listTree=new t("list-tree",{fontCharacter:"\\eb86"}),t.debugBreakpointFunctionUnverified=new t("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),t.debugBreakpointFunction=new t("debug-breakpoint-function",{fontCharacter:"\\eb88"}),t.debugBreakpointFunctionDisabled=new t("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),t.debugStackframeActive=new t("debug-stackframe-active",{fontCharacter:"\\eb89"}),t.debugStackframeDot=new t("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),t.debugStackframe=new t("debug-stackframe",{fontCharacter:"\\eb8b"}),t.debugStackframeFocused=new t("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),t.debugBreakpointUnsupported=new t("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),t.symbolString=new t("symbol-string",{fontCharacter:"\\eb8d"}),t.debugReverseContinue=new t("debug-reverse-continue",{fontCharacter:"\\eb8e"}),t.debugStepBack=new t("debug-step-back",{fontCharacter:"\\eb8f"}),t.debugRestartFrame=new t("debug-restart-frame",{fontCharacter:"\\eb90"}),t.callIncoming=new t("call-incoming",{fontCharacter:"\\eb92"}),t.callOutgoing=new t("call-outgoing",{fontCharacter:"\\eb93"}),t.menu=new t("menu",{fontCharacter:"\\eb94"}),t.expandAll=new t("expand-all",{fontCharacter:"\\eb95"}),t.feedback=new t("feedback",{fontCharacter:"\\eb96"}),t.groupByRefType=new t("group-by-ref-type",{fontCharacter:"\\eb97"}),t.ungroupByRefType=new t("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),t.account=new t("account",{fontCharacter:"\\eb99"}),t.bellDot=new t("bell-dot",{fontCharacter:"\\eb9a"}),t.debugConsole=new t("debug-console",{fontCharacter:"\\eb9b"}),t.library=new t("library",{fontCharacter:"\\eb9c"}),t.output=new t("output",{fontCharacter:"\\eb9d"}),t.runAll=new t("run-all",{fontCharacter:"\\eb9e"}),t.syncIgnored=new t("sync-ignored",{fontCharacter:"\\eb9f"}),t.pinned=new t("pinned",{fontCharacter:"\\eba0"}),t.githubInverted=new t("github-inverted",{fontCharacter:"\\eba1"}),t.debugAlt=new t("debug-alt",{fontCharacter:"\\eb91"}),t.serverProcess=new t("server-process",{fontCharacter:"\\eba2"}),t.serverEnvironment=new t("server-environment",{fontCharacter:"\\eba3"}),t.pass=new t("pass",{fontCharacter:"\\eba4"}),t.stopCircle=new t("stop-circle",{fontCharacter:"\\eba5"}),t.playCircle=new t("play-circle",{fontCharacter:"\\eba6"}),t.record=new t("record",{fontCharacter:"\\eba7"}),t.debugAltSmall=new t("debug-alt-small",{fontCharacter:"\\eba8"}),t.vmConnect=new t("vm-connect",{fontCharacter:"\\eba9"}),t.cloud=new t("cloud",{fontCharacter:"\\ebaa"}),t.merge=new t("merge",{fontCharacter:"\\ebab"}),t.exportIcon=new t("export",{fontCharacter:"\\ebac"}),t.graphLeft=new t("graph-left",{fontCharacter:"\\ebad"}),t.magnet=new t("magnet",{fontCharacter:"\\ebae"}),t.notebook=new t("notebook",{fontCharacter:"\\ebaf"}),t.redo=new t("redo",{fontCharacter:"\\ebb0"}),t.checkAll=new t("check-all",{fontCharacter:"\\ebb1"}),t.pinnedDirty=new t("pinned-dirty",{fontCharacter:"\\ebb2"}),t.passFilled=new t("pass-filled",{fontCharacter:"\\ebb3"}),t.circleLargeFilled=new t("circle-large-filled",{fontCharacter:"\\ebb4"}),t.circleLargeOutline=new t("circle-large-outline",{fontCharacter:"\\ebb5"}),t.combine=new t("combine",{fontCharacter:"\\ebb6"}),t.gather=new t("gather",{fontCharacter:"\\ebb6"}),t.table=new t("table",{fontCharacter:"\\ebb7"}),t.variableGroup=new t("variable-group",{fontCharacter:"\\ebb8"}),t.typeHierarchy=new t("type-hierarchy",{fontCharacter:"\\ebb9"}),t.typeHierarchySub=new t("type-hierarchy-sub",{fontCharacter:"\\ebba"}),t.typeHierarchySuper=new t("type-hierarchy-super",{fontCharacter:"\\ebbb"}),t.gitPullRequestCreate=new t("git-pull-request-create",{fontCharacter:"\\ebbc"}),t.runAbove=new t("run-above",{fontCharacter:"\\ebbd"}),t.runBelow=new t("run-below",{fontCharacter:"\\ebbe"}),t.notebookTemplate=new t("notebook-template",{fontCharacter:"\\ebbf"}),t.debugRerun=new t("debug-rerun",{fontCharacter:"\\ebc0"}),t.workspaceTrusted=new t("workspace-trusted",{fontCharacter:"\\ebc1"}),t.workspaceUntrusted=new t("workspace-untrusted",{fontCharacter:"\\ebc2"}),t.workspaceUnspecified=new t("workspace-unspecified",{fontCharacter:"\\ebc3"}),t.terminalCmd=new t("terminal-cmd",{fontCharacter:"\\ebc4"}),t.terminalDebian=new t("terminal-debian",{fontCharacter:"\\ebc5"}),t.terminalLinux=new t("terminal-linux",{fontCharacter:"\\ebc6"}),t.terminalPowershell=new t("terminal-powershell",{fontCharacter:"\\ebc7"}),t.terminalTmux=new t("terminal-tmux",{fontCharacter:"\\ebc8"}),t.terminalUbuntu=new t("terminal-ubuntu",{fontCharacter:"\\ebc9"}),t.terminalBash=new t("terminal-bash",{fontCharacter:"\\ebca"}),t.arrowSwap=new t("arrow-swap",{fontCharacter:"\\ebcb"}),t.copy=new t("copy",{fontCharacter:"\\ebcc"}),t.personAdd=new t("person-add",{fontCharacter:"\\ebcd"}),t.filterFilled=new t("filter-filled",{fontCharacter:"\\ebce"}),t.wand=new t("wand",{fontCharacter:"\\ebcf"}),t.debugLineByLine=new t("debug-line-by-line",{fontCharacter:"\\ebd0"}),t.inspect=new t("inspect",{fontCharacter:"\\ebd1"}),t.layers=new t("layers",{fontCharacter:"\\ebd2"}),t.layersDot=new t("layers-dot",{fontCharacter:"\\ebd3"}),t.layersActive=new t("layers-active",{fontCharacter:"\\ebd4"}),t.compass=new t("compass",{fontCharacter:"\\ebd5"}),t.compassDot=new t("compass-dot",{fontCharacter:"\\ebd6"}),t.compassActive=new t("compass-active",{fontCharacter:"\\ebd7"}),t.azure=new t("azure",{fontCharacter:"\\ebd8"}),t.issueDraft=new t("issue-draft",{fontCharacter:"\\ebd9"}),t.gitPullRequestClosed=new t("git-pull-request-closed",{fontCharacter:"\\ebda"}),t.gitPullRequestDraft=new t("git-pull-request-draft",{fontCharacter:"\\ebdb"}),t.debugAll=new t("debug-all",{fontCharacter:"\\ebdc"}),t.debugCoverage=new t("debug-coverage",{fontCharacter:"\\ebdd"}),t.runErrors=new t("run-errors",{fontCharacter:"\\ebde"}),t.folderLibrary=new t("folder-library",{fontCharacter:"\\ebdf"}),t.debugContinueSmall=new t("debug-continue-small",{fontCharacter:"\\ebe0"}),t.beakerStop=new t("beaker-stop",{fontCharacter:"\\ebe1"}),t.graphLine=new t("graph-line",{fontCharacter:"\\ebe2"}),t.graphScatter=new t("graph-scatter",{fontCharacter:"\\ebe3"}),t.pieChart=new t("pie-chart",{fontCharacter:"\\ebe4"}),t.bracket=new t("bracket",t.json.definition),t.bracketDot=new t("bracket-dot",{fontCharacter:"\\ebe5"}),t.bracketError=new t("bracket-error",{fontCharacter:"\\ebe6"}),t.lockSmall=new t("lock-small",{fontCharacter:"\\ebe7"}),t.azureDevops=new t("azure-devops",{fontCharacter:"\\ebe8"}),t.verifiedFilled=new t("verified-filled",{fontCharacter:"\\ebe9"})}(S||(S={}))},"VrN/":function(H,J,D){(function(k,g){H.exports=g()})(this,function(){"use strict";var k=navigator.userAgent,g=navigator.platform,C=/gecko\/\d/i.test(k),M=/MSIE \d/.test(k),m=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(k),y=/Edge\/(\d+)/.exec(k),S=M||m||y,_=S&&(M?document.documentMode||6:+(y||m)[1]),t=!y&&/WebKit\//.test(k),h=t&&/Qt\/\d+\.\d+/.test(k),n=!y&&/Chrome\//.test(k),c=/Opera\//.test(k),a=/Apple Computer/.test(navigator.vendor),i=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(k),s=/PhantomJS/.test(k),d=!y&&/AppleWebKit/.test(k)&&/Mobile\/\w+/.test(k),f=/Android/.test(k),l=d||f||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(k),o=d||/Mac/.test(g),r=/\bCrOS\b/.test(k),x=/win/i.test(g),v=c&&k.match(/Version\/(\d*\.\d*)/);v&&(v=Number(v[1])),v&&v>=15&&(c=!1,t=!0);var p=o&&(h||c&&(v==null||v<12.11)),R=C||S&&_>=9;function O(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var b=function(e,u){var j=e.className,P=O(u).exec(j);if(P){var W=j.slice(P.index+P[0].length);e.className=j.slice(0,P.index)+(W?P[1]+W:"")}};function E(e){for(var u=e.childNodes.length;u>0;--u)e.removeChild(e.firstChild);return e}function w(e,u){return E(e).appendChild(u)}function T(e,u,j,P){var W=document.createElement(e);if(j&&(W.className=j),P&&(W.style.cssText=P),typeof u=="string")W.appendChild(document.createTextNode(u));else if(u)for(var Q=0;Q<u.length;++Q)W.appendChild(u[Q]);return W}function F(e,u,j,P){var W=T(e,u,j,P);return W.setAttribute("role","presentation"),W}var N;document.createRange?N=function(e,u,j,P){var W=document.createRange();return W.setEnd(P||e,j),W.setStart(e,u),W}:N=function(e,u,j){var P=document.body.createTextRange();try{P.moveToElementText(e.parentNode)}catch(W){return P}return P.collapse(!0),P.moveEnd("character",j),P.moveStart("character",u),P};function L(e,u){if(u.nodeType==3&&(u=u.parentNode),e.contains)return e.contains(u);do if(u.nodeType==11&&(u=u.host),u==e)return!0;while(u=u.parentNode)}function G(){var e;try{e=document.activeElement}catch(u){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function z(e,u){var j=e.className;O(u).test(j)||(e.className+=(j?" ":"")+u)}function A(e,u){for(var j=e.split(" "),P=0;P<j.length;P++)j[P]&&!O(j[P]).test(u)&&(u+=" "+j[P]);return u}var B=function(e){e.select()};d?B=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:S&&(B=function(e){try{e.select()}catch(u){}});function U(e){var u=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,u)}}function I(e,u,j){u||(u={});for(var P in e)e.hasOwnProperty(P)&&(j!==!1||!u.hasOwnProperty(P))&&(u[P]=e[P]);return u}function K(e,u,j,P,W){u==null&&(u=e.search(/[^\s\u00a0]/),u==-1&&(u=e.length));for(var Q=P||0,ae=W||0;;){var pe=e.indexOf(" ",Q);if(pe<0||pe>=u)return ae+(u-Q);ae+=pe-Q,ae+=j-ae%j,Q=pe+1}}var Z=function(){this.id=null,this.f=null,this.time=0,this.handler=U(this.onTimeout,this)};Z.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Z.prototype.set=function(e,u){this.f=u;var j=+new Date+e;(!this.id||j<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=j)};function ue(e,u){for(var j=0;j<e.length;++j)if(e[j]==u)return j;return-1}var de=50,Ce={toString:function(){return"CodeMirror.Pass"}},Re={scroll:!1},me={origin:"*mouse"},Oe={origin:"+move"};function be(e,u,j){for(var P=0,W=0;;){var Q=e.indexOf(" ",P);Q==-1&&(Q=e.length);var ae=Q-P;if(Q==e.length||W+ae>=u)return P+Math.min(ae,u-W);if(W+=Q-P,W+=j-W%j,P=Q+1,W>=u)return P}}var ce=[""];function se(e){for(;ce.length<=e;)ce.push(ne(ce)+" ");return ce[e]}function ne(e){return e[e.length-1]}function ge(e,u){for(var j=[],P=0;P<e.length;P++)j[P]=u(e[P],P);return j}function ee(e,u,j){for(var P=0,W=j(u);P<e.length&&j(e[P])<=W;)P++;e.splice(P,0,u)}function re(){}function Te(e,u){var j;return Object.create?j=Object.create(e):(re.prototype=e,j=new re),u&&I(u,j),j}var ie=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function q(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ie.test(e))}function Y(e,u){return u?u.source.indexOf("\\w")>-1&&q(e)?!0:u.test(e):q(e)}function X(e){for(var u in e)if(e.hasOwnProperty(u)&&e[u])return!1;return!0}var he=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function fe(e){return e.charCodeAt(0)>=768&&he.test(e)}function Ee(e,u,j){for(;(j<0?u>0:u<e.length)&&fe(e.charAt(u));)u+=j;return u}function He(e,u,j){for(var P=u>j?-1:1;;){if(u==j)return u;var W=(u+j)/2,Q=P<0?Math.ceil(W):Math.floor(W);if(Q==u)return e(Q)?u:j;e(Q)?j=Q:u=Q+P}}function Qe(e,u,j,P){if(!e)return P(u,j,"ltr",0);for(var W=!1,Q=0;Q<e.length;++Q){var ae=e[Q];(ae.from<j&&ae.to>u||u==j&&ae.to==u)&&(P(Math.max(ae.from,u),Math.min(ae.to,j),ae.level==1?"rtl":"ltr",Q),W=!0)}W||P(u,j,"ltr")}var et=null;function it(e,u,j){var P;et=null;for(var W=0;W<e.length;++W){var Q=e[W];if(Q.from<u&&Q.to>u)return W;Q.to==u&&(Q.from!=Q.to&&j=="before"?P=W:et=W),Q.from==u&&(Q.from!=Q.to&&j!="before"?P=W:et=W)}return P!=null?P:et}var ut=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",u="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function j(we){return we<=247?e.charAt(we):1424<=we&&we<=1524?"R":1536<=we&&we<=1785?u.charAt(we-1536):1774<=we&&we<=2220?"r":8192<=we&&we<=8203?"w":we==8204?"b":"L"}var P=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,W=/[stwN]/,Q=/[LRr]/,ae=/[Lb1n]/,pe=/[1n]/;function ve(we,ze,Ye){this.level=we,this.from=ze,this.to=Ye}return function(we,ze){var Ye=ze=="ltr"?"L":"R";if(we.length==0||ze=="ltr"&&!P.test(we))return!1;for(var ct=we.length,at=[],Ct=0;Ct<ct;++Ct)at.push(j(we.charCodeAt(Ct)));for(var Ut=0,Jt=Ye;Ut<ct;++Ut){var nr=at[Ut];nr=="m"?at[Ut]=Jt:Jt=nr}for(var vr=0,ir=Ye;vr<ct;++vr){var Cr=at[vr];Cr=="1"&&ir=="r"?at[vr]="n":Q.test(Cr)&&(ir=Cr,Cr=="r"&&(at[vr]="R"))}for(var Zr=1,Kr=at[0];Zr<ct-1;++Zr){var _n=at[Zr];_n=="+"&&Kr=="1"&&at[Zr+1]=="1"?at[Zr]="1":_n==","&&Kr==at[Zr+1]&&(Kr=="1"||Kr=="n")&&(at[Zr]=Kr),Kr=_n}for(var $n=0;$n<ct;++$n){var Ci=at[$n];if(Ci==",")at[$n]="N";else if(Ci=="%"){var si=void 0;for(si=$n+1;si<ct&&at[si]=="%";++si);for(var qi=$n&&at[$n-1]=="!"||si<ct&&at[si]=="1"?"1":"N",Ji=$n;Ji<si;++Ji)at[Ji]=qi;$n=si-1}}for(var vi=0,Qi=Ye;vi<ct;++vi){var Ii=at[vi];Qi=="L"&&Ii=="1"?at[vi]="L":Q.test(Ii)&&(Qi=Ii)}for(var Ei=0;Ei<ct;++Ei)if(W.test(at[Ei])){var yi=void 0;for(yi=Ei+1;yi<ct&&W.test(at[yi]);++yi);for(var di=(Ei?at[Ei-1]:Ye)=="L",Zi=(yi<ct?at[yi]:Ye)=="L",lo=di==Zi?di?"L":"R":Ye,Ua=Ei;Ua<yi;++Ua)at[Ua]=lo;Ei=yi-1}for(var Mi=[],xa,Oi=0;Oi<ct;)if(ae.test(at[Oi])){var ps=Oi;for(++Oi;Oi<ct&&ae.test(at[Oi]);++Oi);Mi.push(new ve(0,ps,Oi))}else{var Da=Oi,Ga=Mi.length,Va=ze=="rtl"?1:0;for(++Oi;Oi<ct&&at[Oi]!="L";++Oi);for(var zi=Da;zi<Oi;)if(pe.test(at[zi])){Da<zi&&(Mi.splice(Ga,0,new ve(1,Da,zi)),Ga+=Va);var uo=zi;for(++zi;zi<Oi&&pe.test(at[zi]);++zi);Mi.splice(Ga,0,new ve(2,uo,zi)),Ga+=Va,Da=zi}else++zi;Da<Oi&&Mi.splice(Ga,0,new ve(1,Da,Oi))}return ze=="ltr"&&(Mi[0].level==1&&(xa=we.match(/^\s+/))&&(Mi[0].from=xa[0].length,Mi.unshift(new ve(0,0,xa[0].length))),ne(Mi).level==1&&(xa=we.match(/\s+$/))&&(ne(Mi).to-=xa[0].length,Mi.push(new ve(0,ct-xa[0].length,ct)))),ze=="rtl"?Mi.reverse():Mi}}();function dt(e,u){var j=e.order;return j==null&&(j=e.order=ut(e.text,u)),j}var Fe=[],Ie=function(e,u,j){if(e.addEventListener)e.addEventListener(u,j,!1);else if(e.attachEvent)e.attachEvent("on"+u,j);else{var P=e._handlers||(e._handlers={});P[u]=(P[u]||Fe).concat(j)}};function st(e,u){return e._handlers&&e._handlers[u]||Fe}function ft(e,u,j){if(e.removeEventListener)e.removeEventListener(u,j,!1);else if(e.detachEvent)e.detachEvent("on"+u,j);else{var P=e._handlers,W=P&&P[u];if(W){var Q=ue(W,j);Q>-1&&(P[u]=W.slice(0,Q).concat(W.slice(Q+1)))}}}function Ze(e,u){var j=st(e,u);if(!j.length)return;for(var P=Array.prototype.slice.call(arguments,2),W=0;W<j.length;++W)j[W].apply(null,P)}function tt(e,u,j){return typeof u=="string"&&(u={type:u,preventDefault:function(){this.defaultPrevented=!0}}),Ze(e,j||u.type,e,u),Le(u)||u.codemirrorIgnore}function Be(e){var u=e._handlers&&e._handlers.cursorActivity;if(!u)return;for(var j=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),P=0;P<u.length;++P)ue(j,u[P])==-1&&j.push(u[P])}function Pe(e,u){return st(e,u).length>0}function Ne(e){e.prototype.on=function(u,j){Ie(this,u,j)},e.prototype.off=function(u,j){ft(this,u,j)}}function xe(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ae(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Le(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Me(e){xe(e),Ae(e)}function We(e){return e.target||e.srcElement}function nt(e){var u=e.which;return u==null&&(e.button&1?u=1:e.button&2?u=3:e.button&4&&(u=2)),o&&e.ctrlKey&&u==1&&(u=3),u}var vt=function(){if(S&&_<9)return!1;var e=T("div");return"draggable"in e||"dragDrop"in e}(),bt;function Wt(e){if(bt==null){var u=T("span","\u200B");w(e,T("span",[u,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(bt=u.offsetWidth<=1&&u.offsetHeight>2&&!(S&&_<8))}var j=bt?T("span","\u200B"):T("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return j.setAttribute("cm-text",""),j}var Bt;function lr(e){if(Bt!=null)return Bt;var u=w(e,document.createTextNode("A\u062EA")),j=N(u,0,1).getBoundingClientRect(),P=N(u,1,2).getBoundingClientRect();return E(e),!j||j.left==j.right?!1:Bt=P.right-j.right<3}var dr=`
b`.split(/\n/).length!=3?function(e){for(var u=0,j=[],P=e.length;u<=P;){var W=e.indexOf(`
`,u);W==-1&&(W=e.length);var Q=e.slice(u,e.charAt(W-1)=="\r"?W-1:W),ae=Q.indexOf("\r");ae!=-1?(j.push(Q.slice(0,ae)),u+=ae+1):(j.push(Q),u=W+1)}return j}:function(e){return e.split(/\r\n?|\n/)},Ot=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(u){return!1}}:function(e){var u;try{u=e.ownerDocument.selection.createRange()}catch(j){}return!u||u.parentElement()!=e?!1:u.compareEndPoints("StartToEnd",u)!=0},Vr=function(){var e=T("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Wr=null;function Yr(e){if(Wr!=null)return Wr;var u=w(e,T("span","x")),j=u.getBoundingClientRect(),P=N(u,0,1).getBoundingClientRect();return Wr=Math.abs(j.left-P.left)>1}var bn={},Ar={};function fn(e,u){arguments.length>2&&(u.dependencies=Array.prototype.slice.call(arguments,2)),bn[e]=u}function cn(e,u){Ar[e]=u}function Vt(e){if(typeof e=="string"&&Ar.hasOwnProperty(e))e=Ar[e];else if(e&&typeof e.name=="string"&&Ar.hasOwnProperty(e.name)){var u=Ar[e.name];typeof u=="string"&&(u={name:u}),e=Te(u,e),e.name=u.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Vt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Vt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function En(e,u){u=Vt(u);var j=bn[u.name];if(!j)return En(e,"text/plain");var P=j(e,u);if(fr.hasOwnProperty(u.name)){var W=fr[u.name];for(var Q in W){if(!W.hasOwnProperty(Q))continue;P.hasOwnProperty(Q)&&(P["_"+Q]=P[Q]),P[Q]=W[Q]}}if(P.name=u.name,u.helperType&&(P.helperType=u.helperType),u.modeProps)for(var ae in u.modeProps)P[ae]=u.modeProps[ae];return P}var fr={};function br(e,u){var j=fr.hasOwnProperty(e)?fr[e]:fr[e]={};I(u,j)}function Br(e,u){if(u===!0)return u;if(e.copyState)return e.copyState(u);var j={};for(var P in u){var W=u[P];W instanceof Array&&(W=W.concat([])),j[P]=W}return j}function Pn(e,u){for(var j;e.innerMode&&!(j=e.innerMode(u),!j||j.mode==e);)u=j.state,e=j.mode;return j||{mode:e,state:u}}function Kn(e,u,j){return e.startState?e.startState(u,j):!0}var dn=function(e,u,j){this.pos=this.start=0,this.string=e,this.tabSize=u||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=j};dn.prototype.eol=function(){return this.pos>=this.string.length},dn.prototype.sol=function(){return this.pos==this.lineStart},dn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},dn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},dn.prototype.eat=function(e){var u=this.string.charAt(this.pos),j;if(typeof e=="string"?j=u==e:j=u&&(e.test?e.test(u):e(u)),j)return++this.pos,u},dn.prototype.eatWhile=function(e){for(var u=this.pos;this.eat(e););return this.pos>u},dn.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},dn.prototype.skipToEnd=function(){this.pos=this.string.length},dn.prototype.skipTo=function(e){var u=this.string.indexOf(e,this.pos);if(u>-1)return this.pos=u,!0},dn.prototype.backUp=function(e){this.pos-=e},dn.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=K(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?K(this.string,this.lineStart,this.tabSize):0)},dn.prototype.indentation=function(){return K(this.string,null,this.tabSize)-(this.lineStart?K(this.string,this.lineStart,this.tabSize):0)},dn.prototype.match=function(e,u,j){if(typeof e=="string"){var P=function(ae){return j?ae.toLowerCase():ae},W=this.string.substr(this.pos,e.length);if(P(W)==P(e))return u!==!1&&(this.pos+=e.length),!0}else{var Q=this.string.slice(this.pos).match(e);return Q&&Q.index>0?null:(Q&&u!==!1&&(this.pos+=Q[0].length),Q)}},dn.prototype.current=function(){return this.string.slice(this.start,this.pos)},dn.prototype.hideFirstChars=function(e,u){this.lineStart+=e;try{return u()}finally{this.lineStart-=e}},dn.prototype.lookAhead=function(e){var u=this.lineOracle;return u&&u.lookAhead(e)},dn.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function sr(e,u){if(u-=e.first,u<0||u>=e.size)throw new Error("There is no line "+(u+e.first)+" in the document.");for(var j=e;!j.lines;)for(var P=0;;++P){var W=j.children[P],Q=W.chunkSize();if(u<Q){j=W;break}u-=Q}return j.lines[u]}function Jn(e,u,j){var P=[],W=u.line;return e.iter(u.line,j.line+1,function(Q){var ae=Q.text;W==j.line&&(ae=ae.slice(0,j.ch)),W==u.line&&(ae=ae.slice(u.ch)),P.push(ae),++W}),P}function Tn(e,u,j){var P=[];return e.iter(u,j,function(W){P.push(W.text)}),P}function On(e,u){var j=u-e.height;if(j)for(var P=e;P;P=P.parent)P.height+=j}function Jr(e){if(e.parent==null)return null;for(var u=e.parent,j=ue(u.lines,e),P=u.parent;P;u=P,P=P.parent)for(var W=0;!(P.children[W]==u);++W)j+=P.children[W].chunkSize();return j+u.first}function An(e,u){var j=e.first;e:do{for(var P=0;P<e.children.length;++P){var W=e.children[P],Q=W.height;if(u<Q){e=W;continue e}u-=Q,j+=W.chunkSize()}return j}while(!e.lines);for(var ae=0;ae<e.lines.length;++ae){var pe=e.lines[ae],ve=pe.height;if(u<ve)break;u-=ve}return j+ae}function Zn(e,u){return u>=e.first&&u<e.first+e.size}function ri(e,u){return String(e.lineNumberFormatter(u+e.firstLineNumber))}function Nt(e,u,j){if(j===void 0&&(j=null),!(this instanceof Nt))return new Nt(e,u,j);this.line=e,this.ch=u,this.sticky=j}function _r(e,u){return e.line-u.line||e.ch-u.ch}function mi(e,u){return e.sticky==u.sticky&&_r(e,u)==0}function xi(e){return Nt(e.line,e.ch)}function Di(e,u){return _r(e,u)<0?u:e}function wi(e,u){return _r(e,u)<0?e:u}function le(e,u){return Math.max(e.first,Math.min(u,e.first+e.size-1))}function V(e,u){if(u.line<e.first)return Nt(e.first,0);var j=e.first+e.size-1;return u.line>j?Nt(j,sr(e,j).text.length):$(u,sr(e,u.line).text.length)}function $(e,u){var j=e.ch;return j==null||j>u?Nt(e.line,u):j<0?Nt(e.line,0):e}function te(e,u){for(var j=[],P=0;P<u.length;P++)j[P]=V(e,u[P]);return j}var ye=function(e,u){this.state=e,this.lookAhead=u},oe=function(e,u,j,P){this.state=u,this.doc=e,this.line=j,this.maxLookAhead=P||0,this.baseTokens=null,this.baseTokenPos=1};oe.prototype.lookAhead=function(e){var u=this.doc.getLine(this.line+e);return u!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),u},oe.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var u=this.baseTokens[this.baseTokenPos+1];return{type:u&&u.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},oe.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},oe.fromSaved=function(e,u,j){return u instanceof ye?new oe(e,Br(e.mode,u.state),j,u.lookAhead):new oe(e,Br(e.mode,u),j)},oe.prototype.save=function(e){var u=e!==!1?Br(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ye(u,this.maxLookAhead):u};function Ve(e,u,j,P){var W=[e.state.modeGen],Q={};ii(e,u.text,e.doc.mode,j,function(we,ze){return W.push(we,ze)},Q,P);for(var ae=j.state,pe=function(we){j.baseTokens=W;var ze=e.state.overlays[we],Ye=1,ct=0;j.state=!0,ii(e,u.text,ze.mode,j,function(at,Ct){for(var Ut=Ye;ct<at;){var Jt=W[Ye];Jt>at&&W.splice(Ye,1,at,W[Ye+1],Jt),Ye+=2,ct=Math.min(at,Jt)}if(!Ct)return;if(ze.opaque)W.splice(Ut,Ye-Ut,at,"overlay "+Ct),Ye=Ut+2;else for(;Ut<Ye;Ut+=2){var nr=W[Ut+1];W[Ut+1]=(nr?nr+" ":"")+"overlay "+Ct}},Q),j.state=ae,j.baseTokens=null,j.baseTokenPos=1},ve=0;ve<e.state.overlays.length;++ve)pe(ve);return{styles:W,classes:Q.bgClass||Q.textClass?Q:null}}function Tt(e,u,j){if(!u.styles||u.styles[0]!=e.state.modeGen){var P=Xt(e,Jr(u)),W=u.text.length>e.options.maxHighlightLength&&Br(e.doc.mode,P.state),Q=Ve(e,u,P);W&&(P.state=W),u.stateAfter=P.save(!W),u.styles=Q.styles,Q.classes?u.styleClasses=Q.classes:u.styleClasses&&(u.styleClasses=null),j===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return u.styles}function Xt(e,u,j){var P=e.doc,W=e.display;if(!P.mode.startState)return new oe(P,!0,u);var Q=Bn(e,u,j),ae=Q>P.first&&sr(P,Q-1).stateAfter,pe=ae?oe.fromSaved(P,ae,Q):new oe(P,Kn(P.mode),Q);return P.iter(Q,u,function(ve){Er(e,ve.text,pe);var we=pe.line;ve.stateAfter=we==u-1||we%5==0||we>=W.viewFrom&&we<W.viewTo?pe.save():null,pe.nextLine()}),j&&(P.modeFrontier=pe.line),pe}function Er(e,u,j,P){var W=e.doc.mode,Q=new dn(u,e.options.tabSize,j);for(Q.start=Q.pos=P||0,u==""&&Pt(W,j.state);!Q.eol();)kr(W,Q,j.state),Q.start=Q.pos}function Pt(e,u){if(e.blankLine)return e.blankLine(u);if(!e.innerMode)return;var j=Pn(e,u);if(j.mode.blankLine)return j.mode.blankLine(j.state)}function kr(e,u,j,P){for(var W=0;W<10;W++){P&&(P[0]=Pn(e,j).mode);var Q=e.token(u,j);if(u.pos>u.start)return Q}throw new Error("Mode "+e.name+" failed to advance stream.")}var Gr=function(e,u,j){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=u||null,this.state=j};function yn(e,u,j,P){var W=e.doc,Q=W.mode,ae;u=V(W,u);var pe=sr(W,u.line),ve=Xt(e,u.line,j),we=new dn(pe.text,e.options.tabSize,ve),ze;for(P&&(ze=[]);(P||we.pos<u.ch)&&!we.eol();)we.start=we.pos,ae=kr(Q,we,ve.state),P&&ze.push(new Gr(we,ae,Br(W.mode,ve.state)));return P?ze:new Gr(we,ae,ve.state)}function ni(e,u){if(e)for(;;){var j=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!j)break;e=e.slice(0,j.index)+e.slice(j.index+j[0].length);var P=j[1]?"bgClass":"textClass";u[P]==null?u[P]=j[2]:new RegExp("(?:^|\\s)"+j[2]+"(?:$|\\s)").test(u[P])||(u[P]+=" "+j[2])}return e}function ii(e,u,j,P,W,Q,ae){var pe=j.flattenSpans;pe==null&&(pe=e.options.flattenSpans);var ve=0,we=null,ze=new dn(u,e.options.tabSize,P),Ye,ct=e.options.addModeClass&&[null];for(u==""&&ni(Pt(j,P.state),Q);!ze.eol();){if(ze.pos>e.options.maxHighlightLength?(pe=!1,ae&&Er(e,u,P,ze.pos),ze.pos=u.length,Ye=null):Ye=ni(kr(j,ze,P.state,ct),Q),ct){var at=ct[0].name;at&&(Ye="m-"+(Ye?at+" "+Ye:at))}if(!pe||we!=Ye){for(;ve<ze.start;)ve=Math.min(ze.start,ve+5e3),W(ve,we);we=Ye}ze.start=ze.pos}for(;ve<ze.pos;){var Ct=Math.min(ze.pos,ve+5e3);W(Ct,we),ve=Ct}}function Bn(e,u,j){for(var P,W,Q=e.doc,ae=j?-1:u-(e.doc.mode.innerMode?1e3:100),pe=u;pe>ae;--pe){if(pe<=Q.first)return Q.first;var ve=sr(Q,pe-1),we=ve.stateAfter;if(we&&(!j||pe+(we instanceof ye?we.lookAhead:0)<=Q.modeFrontier))return pe;var ze=K(ve.text,null,e.options.tabSize);(W==null||P>ze)&&(W=pe-1,P=ze)}return W}function Ni(e,u){if(e.modeFrontier=Math.min(e.modeFrontier,u),e.highlightFrontier<u-10)return;for(var j=e.first,P=u-1;P>j;P--){var W=sr(e,P).stateAfter;if(W&&(!(W instanceof ye)||P+W.lookAhead<u)){j=P+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,j)}var Ki=!1,Gn=!1;function Ti(){Ki=!0}function Gi(){Gn=!0}function Li(e,u,j){this.marker=e,this.from=u,this.to=j}function li(e,u){if(e)for(var j=0;j<e.length;++j){var P=e[j];if(P.marker==u)return P}}function ea(e,u){for(var j,P=0;P<e.length;++P)e[P]!=u&&(j||(j=[])).push(e[P]);return j}function Vi(e,u){e.markedSpans=e.markedSpans?e.markedSpans.concat([u]):[u],u.marker.attachLine(e)}function ta(e,u,j){var P;if(e)for(var W=0;W<e.length;++W){var Q=e[W],ae=Q.marker,pe=Q.from==null||(ae.inclusiveLeft?Q.from<=u:Q.from<u);if(pe||Q.from==u&&ae.type=="bookmark"&&(!j||!Q.marker.insertLeft)){var ve=Q.to==null||(ae.inclusiveRight?Q.to>=u:Q.to>u);(P||(P=[])).push(new Li(ae,Q.from,ve?null:Q.to))}}return P}function oa(e,u,j){var P;if(e)for(var W=0;W<e.length;++W){var Q=e[W],ae=Q.marker,pe=Q.to==null||(ae.inclusiveRight?Q.to>=u:Q.to>u);if(pe||Q.from==u&&ae.type=="bookmark"&&(!j||Q.marker.insertLeft)){var ve=Q.from==null||(ae.inclusiveLeft?Q.from<=u:Q.from<u);(P||(P=[])).push(new Li(ae,ve?null:Q.from-u,Q.to==null?null:Q.to-u))}}return P}function Pi(e,u){if(u.full)return null;var j=Zn(e,u.from.line)&&sr(e,u.from.line).markedSpans,P=Zn(e,u.to.line)&&sr(e,u.to.line).markedSpans;if(!j&&!P)return null;var W=u.from.ch,Q=u.to.ch,ae=_r(u.from,u.to)==0,pe=ta(j,W,ae),ve=oa(P,Q,ae),we=u.text.length==1,ze=ne(u.text).length+(we?W:0);if(pe)for(var Ye=0;Ye<pe.length;++Ye){var ct=pe[Ye];if(ct.to==null){var at=li(ve,ct.marker);at?we&&(ct.to=at.to==null?null:at.to+ze):ct.to=W}}if(ve)for(var Ct=0;Ct<ve.length;++Ct){var Ut=ve[Ct];if(Ut.to!=null&&(Ut.to+=ze),Ut.from==null){var Jt=li(pe,Ut.marker);Jt||(Ut.from=ze,we&&(pe||(pe=[])).push(Ut))}else Ut.from+=ze,we&&(pe||(pe=[])).push(Ut)}pe&&(pe=qn(pe)),ve&&ve!=pe&&(ve=qn(ve));var nr=[pe];if(!we){var vr=u.text.length-2,ir;if(vr>0&&pe)for(var Cr=0;Cr<pe.length;++Cr)pe[Cr].to==null&&(ir||(ir=[])).push(new Li(pe[Cr].marker,null,null));for(var Zr=0;Zr<vr;++Zr)nr.push(ir);nr.push(ve)}return nr}function qn(e){for(var u=0;u<e.length;++u){var j=e[u];j.from!=null&&j.from==j.to&&j.marker.clearWhenEmpty!==!1&&e.splice(u--,1)}return e.length?e:null}function ji(e,u,j){var P=null;if(e.iter(u.line,j.line+1,function(at){if(at.markedSpans)for(var Ct=0;Ct<at.markedSpans.length;++Ct){var Ut=at.markedSpans[Ct].marker;Ut.readOnly&&(!P||ue(P,Ut)==-1)&&(P||(P=[])).push(Ut)}}),!P)return null;for(var W=[{from:u,to:j}],Q=0;Q<P.length;++Q)for(var ae=P[Q],pe=ae.find(0),ve=0;ve<W.length;++ve){var we=W[ve];if(_r(we.to,pe.from)<0||_r(we.from,pe.to)>0)continue;var ze=[ve,1],Ye=_r(we.from,pe.from),ct=_r(we.to,pe.to);(Ye<0||!ae.inclusiveLeft&&!Ye)&&ze.push({from:we.from,to:pe.from}),(ct>0||!ae.inclusiveRight&&!ct)&&ze.push({from:pe.to,to:we.to}),W.splice.apply(W,ze),ve+=ze.length-3}return W}function ha(e){var u=e.markedSpans;if(!u)return;for(var j=0;j<u.length;++j)u[j].marker.detachLine(e);e.markedSpans=null}function xt(e,u){if(!u)return;for(var j=0;j<u.length;++j)u[j].marker.attachLine(e);e.markedSpans=u}function rt(e){return e.inclusiveLeft?-1:0}function mt(e){return e.inclusiveRight?1:0}function wt(e,u){var j=e.lines.length-u.lines.length;if(j!=0)return j;var P=e.find(),W=u.find(),Q=_r(P.from,W.from)||rt(e)-rt(u);if(Q)return-Q;var ae=_r(P.to,W.to)||mt(e)-mt(u);return ae||u.id-e.id}function Lt(e,u){var j=Gn&&e.markedSpans,P;if(j)for(var W=void 0,Q=0;Q<j.length;++Q)W=j[Q],W.marker.collapsed&&(u?W.from:W.to)==null&&(!P||wt(P,W.marker)<0)&&(P=W.marker);return P}function It(e){return Lt(e,!0)}function Kt(e){return Lt(e,!1)}function Ht(e,u){var j=Gn&&e.markedSpans,P;if(j)for(var W=0;W<j.length;++W){var Q=j[W];Q.marker.collapsed&&(Q.from==null||Q.from<u)&&(Q.to==null||Q.to>u)&&(!P||wt(P,Q.marker)<0)&&(P=Q.marker)}return P}function ht(e,u,j,P,W){var Q=sr(e,u),ae=Gn&&Q.markedSpans;if(ae)for(var pe=0;pe<ae.length;++pe){var ve=ae[pe];if(!ve.marker.collapsed)continue;var we=ve.marker.find(0),ze=_r(we.from,j)||rt(ve.marker)-rt(W),Ye=_r(we.to,P)||mt(ve.marker)-mt(W);if(ze>=0&&Ye<=0||ze<=0&&Ye>=0)continue;if(ze<=0&&(ve.marker.inclusiveRight&&W.inclusiveLeft?_r(we.to,j)>=0:_r(we.to,j)>0)||ze>=0&&(ve.marker.inclusiveRight&&W.inclusiveLeft?_r(we.from,P)<=0:_r(we.from,P)<0))return!0}}function St(e){for(var u;u=It(e);)e=u.find(-1,!0).line;return e}function At(e){for(var u;u=Kt(e);)e=u.find(1,!0).line;return e}function ur(e){for(var u,j;u=Kt(e);)e=u.find(1,!0).line,(j||(j=[])).push(e);return j}function ar(e,u){var j=sr(e,u),P=St(j);return j==P?u:Jr(P)}function Zt(e,u){if(u>e.lastLine())return u;var j=sr(e,u),P;if(!$t(e,j))return u;for(;P=Kt(j);)j=P.find(1,!0).line;return Jr(j)+1}function $t(e,u){var j=Gn&&u.markedSpans;if(j)for(var P=void 0,W=0;W<j.length;++W){if(P=j[W],!P.marker.collapsed)continue;if(P.from==null)return!0;if(P.marker.widgetNode)continue;if(P.from==0&&P.marker.inclusiveLeft&&rr(e,u,P))return!0}}function rr(e,u,j){if(j.to==null){var P=j.marker.find(1,!0);return rr(e,P.line,li(P.line.markedSpans,j.marker))}if(j.marker.inclusiveRight&&j.to==u.text.length)return!0;for(var W=void 0,Q=0;Q<u.markedSpans.length;++Q)if(W=u.markedSpans[Q],W.marker.collapsed&&!W.marker.widgetNode&&W.from==j.to&&(W.to==null||W.to!=j.from)&&(W.marker.inclusiveLeft||j.marker.inclusiveRight)&&rr(e,u,W))return!0}function cr(e){e=St(e);for(var u=0,j=e.parent,P=0;P<j.lines.length;++P){var W=j.lines[P];if(W==e)break;u+=W.height}for(var Q=j.parent;Q;j=Q,Q=j.parent)for(var ae=0;ae<Q.children.length;++ae){var pe=Q.children[ae];if(pe==j)break;u+=pe.height}return u}function lt(e){if(e.height==0)return 0;for(var u=e.text.length,j,P=e;j=It(P);){var W=j.find(0,!0);P=W.from.line,u+=W.from.ch-W.to.ch}for(P=e;j=Kt(P);){var Q=j.find(0,!0);u-=P.text.length-Q.from.ch,P=Q.to.line,u+=P.text.length-Q.to.ch}return u}function Rr(e){var u=e.display,j=e.doc;u.maxLine=sr(j,j.first),u.maxLineLength=lt(u.maxLine),u.maxLineChanged=!0,j.iter(function(P){var W=lt(P);W>u.maxLineLength&&(u.maxLineLength=W,u.maxLine=P)})}var jr=function(e,u,j){this.text=e,xt(this,u),this.height=j?j(this):1};jr.prototype.lineNo=function(){return Jr(this)},Ne(jr);function xr(e,u,j,P){e.text=u,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),ha(e),xt(e,j);var W=P?P(e):1;W!=e.height&&On(e,W)}function _t(e){e.parent=null,ha(e)}var Rt={},Et={};function Mt(e,u){if(!e||/^\s*$/.test(e))return null;var j=u.addModeClass?Et:Rt;return j[e]||(j[e]=e.replace(/\S+/g,"cm-$&"))}function qt(e,u){var j=F("span",null,null,t?"padding-right: .1px":null),P={pre:F("pre",[j],"CodeMirror-line"),content:j,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};u.measure={};for(var W=0;W<=(u.rest?u.rest.length:0);W++){var Q=W?u.rest[W-1]:u.line,ae=void 0;P.pos=0,P.addToken=er,lr(e.display.measure)&&(ae=dt(Q,e.doc.direction))&&(P.addToken=Hr(P.addToken,ae)),P.map=[];var pe=u!=e.display.externalMeasured&&Jr(Q);ot(Q,P,Tt(e,Q,pe)),Q.styleClasses&&(Q.styleClasses.bgClass&&(P.bgClass=A(Q.styleClasses.bgClass,P.bgClass||"")),Q.styleClasses.textClass&&(P.textClass=A(Q.styleClasses.textClass,P.textClass||""))),P.map.length==0&&P.map.push(0,0,P.content.appendChild(Wt(e.display.measure))),W==0?(u.measure.map=P.map,u.measure.cache={}):((u.measure.maps||(u.measure.maps=[])).push(P.map),(u.measure.caches||(u.measure.caches=[])).push({}))}if(t){var ve=P.content.lastChild;(/\bcm-tab\b/.test(ve.className)||ve.querySelector&&ve.querySelector(".cm-tab"))&&(P.content.className="cm-tab-wrap-hack")}return Ze(e,"renderLine",e,u.line,P.pre),P.pre.className&&(P.textClass=A(P.pre.className,P.textClass||"")),P}function pr(e){var u=T("span","\u2022","cm-invalidchar");return u.title="\\u"+e.charCodeAt(0).toString(16),u.setAttribute("aria-label",u.title),u}function er(e,u,j,P,W,Q,ae){if(!u)return;var pe=e.splitSpaces?Ir(u,e.trailingSpace):u,ve=e.cm.state.specialChars,we=!1,ze;if(!ve.test(u))e.col+=u.length,ze=document.createTextNode(pe),e.map.push(e.pos,e.pos+u.length,ze),S&&_<9&&(we=!0),e.pos+=u.length;else{ze=document.createDocumentFragment();for(var Ye=0;;){ve.lastIndex=Ye;var ct=ve.exec(u),at=ct?ct.index-Ye:u.length-Ye;if(at){var Ct=document.createTextNode(pe.slice(Ye,Ye+at));S&&_<9?ze.appendChild(T("span",[Ct])):ze.appendChild(Ct),e.map.push(e.pos,e.pos+at,Ct),e.col+=at,e.pos+=at}if(!ct)break;Ye+=at+1;var Ut=void 0;if(ct[0]==" "){var Jt=e.cm.options.tabSize,nr=Jt-e.col%Jt;Ut=ze.appendChild(T("span",se(nr),"cm-tab")),Ut.setAttribute("role","presentation"),Ut.setAttribute("cm-text"," "),e.col+=nr}else ct[0]=="\r"||ct[0]==`
`?(Ut=ze.appendChild(T("span",ct[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Ut.setAttribute("cm-text",ct[0]),e.col+=1):(Ut=e.cm.options.specialCharPlaceholder(ct[0]),Ut.setAttribute("cm-text",ct[0]),S&&_<9?ze.appendChild(T("span",[Ut])):ze.appendChild(Ut),e.col+=1);e.map.push(e.pos,e.pos+1,Ut),e.pos++}}if(e.trailingSpace=pe.charCodeAt(u.length-1)==32,j||P||W||we||Q||ae){var vr=j||"";P&&(vr+=P),W&&(vr+=W);var ir=T("span",[ze],vr,Q);if(ae)for(var Cr in ae)ae.hasOwnProperty(Cr)&&Cr!="style"&&Cr!="class"&&ir.setAttribute(Cr,ae[Cr]);return e.content.appendChild(ir)}e.content.appendChild(ze)}function Ir(e,u){if(e.length>1&&!/ /.test(e))return e;for(var j=u,P="",W=0;W<e.length;W++){var Q=e.charAt(W);Q==" "&&j&&(W==e.length-1||e.charCodeAt(W+1)==32)&&(Q="\xA0"),P+=Q,j=Q==" "}return P}function Hr(e,u){return function(j,P,W,Q,ae,pe,ve){W=W?W+" cm-force-border":"cm-force-border";for(var we=j.pos,ze=we+P.length;;){for(var Ye=void 0,ct=0;ct<u.length&&!(Ye=u[ct],Ye.to>we&&Ye.from<=we);ct++);if(Ye.to>=ze)return e(j,P,W,Q,ae,pe,ve);e(j,P.slice(0,Ye.to-we),W,Q,null,pe,ve),Q=null,P=P.slice(Ye.to-we),we=Ye.to}}}function yr(e,u,j,P){var W=!P&&j.widgetNode;W&&e.map.push(e.pos,e.pos+u,W),!P&&e.cm.display.input.needsContentAttribute&&(W||(W=e.content.appendChild(document.createElement("span"))),W.setAttribute("cm-marker",j.id)),W&&(e.cm.display.input.setUneditable(W),e.content.appendChild(W)),e.pos+=u,e.trailingSpace=!1}function ot(e,u,j){var P=e.markedSpans,W=e.text,Q=0;if(!P){for(var ae=1;ae<j.length;ae+=2)u.addToken(u,W.slice(Q,Q=j[ae]),Mt(j[ae+1],u.cm.options));return}for(var pe=W.length,ve=0,we=1,ze="",Ye,ct,at=0,Ct,Ut,Jt,nr,vr;;){if(at==ve){Ct=Ut=Jt=ct="",vr=null,nr=null,at=Infinity;for(var ir=[],Cr=void 0,Zr=0;Zr<P.length;++Zr){var Kr=P[Zr],_n=Kr.marker;if(_n.type=="bookmark"&&Kr.from==ve&&_n.widgetNode)ir.push(_n);else if(Kr.from<=ve&&(Kr.to==null||Kr.to>ve||_n.collapsed&&Kr.to==ve&&Kr.from==ve)){if(Kr.to!=null&&Kr.to!=ve&&at>Kr.to&&(at=Kr.to,Ut=""),_n.className&&(Ct+=" "+_n.className),_n.css&&(ct=(ct?ct+";":"")+_n.css),_n.startStyle&&Kr.from==ve&&(Jt+=" "+_n.startStyle),_n.endStyle&&Kr.to==at&&(Cr||(Cr=[])).push(_n.endStyle,Kr.to),_n.title&&((vr||(vr={})).title=_n.title),_n.attributes)for(var $n in _n.attributes)(vr||(vr={}))[$n]=_n.attributes[$n];_n.collapsed&&(!nr||wt(nr.marker,_n)<0)&&(nr=Kr)}else Kr.from>ve&&at>Kr.from&&(at=Kr.from)}if(Cr)for(var Ci=0;Ci<Cr.length;Ci+=2)Cr[Ci+1]==at&&(Ut+=" "+Cr[Ci]);if(!nr||nr.from==ve)for(var si=0;si<ir.length;++si)yr(u,0,ir[si]);if(nr&&(nr.from||0)==ve){if(yr(u,(nr.to==null?pe+1:nr.to)-ve,nr.marker,nr.from==null),nr.to==null)return;nr.to==ve&&(nr=!1)}}if(ve>=pe)break;for(var qi=Math.min(pe,at);;){if(ze){var Ji=ve+ze.length;if(!nr){var vi=Ji>qi?ze.slice(0,qi-ve):ze;u.addToken(u,vi,Ye?Ye+Ct:Ct,Jt,ve+vi.length==at?Ut:"",ct,vr)}if(Ji>=qi){ze=ze.slice(qi-ve),ve=qi;break}ve=Ji,Jt=""}ze=W.slice(Q,Q=j[we++]),Ye=Mt(j[we++],u.cm.options)}}}function zt(e,u,j){this.line=u,this.rest=ur(u),this.size=this.rest?Jr(ne(this.rest))-j+1:1,this.node=this.text=null,this.hidden=$t(e,u)}function sn(e,u,j){for(var P=[],W,Q=u;Q<j;Q=W){var ae=new zt(e.doc,sr(e.doc,Q),Q);W=Q+ae.size,P.push(ae)}return P}var en=null;function mr(e){en?en.ops.push(e):e.ownsGroup=en={ops:[e],delayedCallbacks:[]}}function Dr(e){var u=e.delayedCallbacks,j=0;do{for(;j<u.length;j++)u[j].call(null);for(var P=0;P<e.ops.length;P++){var W=e.ops[P];if(W.cursorActivityHandlers)for(;W.cursorActivityCalled<W.cursorActivityHandlers.length;)W.cursorActivityHandlers[W.cursorActivityCalled++].call(null,W.cm)}}while(j<u.length)}function Mr(e,u){var j=e.ownsGroup;if(!j)return;try{Dr(j)}finally{en=null,u(j)}}var Ft=null;function Qt(e,u){var j=st(e,u);if(!j.length)return;var P=Array.prototype.slice.call(arguments,2),W;en?W=en.delayedCallbacks:Ft?W=Ft:(W=Ft=[],setTimeout(gr,0));for(var Q=function(pe){W.push(function(){return j[pe].apply(null,P)})},ae=0;ae<j.length;++ae)Q(ae)}function gr(){var e=Ft;Ft=null;for(var u=0;u<e.length;++u)e[u]()}function tr(e,u,j,P){for(var W=0;W<u.changes.length;W++){var Q=u.changes[W];Q=="text"?kt(e,u):Q=="gutter"?an(e,u,j,P):Q=="class"?Lr(e,u):Q=="widget"&&ln(e,u,P)}u.changes=null}function gt(e){return e.node==e.text&&(e.node=T("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),S&&_<8&&(e.node.style.zIndex=2)),e.node}function yt(e,u){var j=u.bgClass?u.bgClass+" "+(u.line.bgClass||""):u.line.bgClass;if(j&&(j+=" CodeMirror-linebackground"),u.background)j?u.background.className=j:(u.background.parentNode.removeChild(u.background),u.background=null);else if(j){var P=gt(u);u.background=P.insertBefore(T("div",null,j),P.firstChild),e.display.input.setUneditable(u.background)}}function Gt(e,u){var j=e.display.externalMeasured;return j&&j.line==u.line?(e.display.externalMeasured=null,u.measure=j.measure,j.built):qt(e,u)}function kt(e,u){var j=u.text.className,P=Gt(e,u);u.text==u.node&&(u.node=P.pre),u.text.parentNode.replaceChild(P.pre,u.text),u.text=P.pre,P.bgClass!=u.bgClass||P.textClass!=u.textClass?(u.bgClass=P.bgClass,u.textClass=P.textClass,Lr(e,u)):j&&(u.text.className=j)}function Lr(e,u){yt(e,u),u.line.wrapClass?gt(u).className=u.line.wrapClass:u.node!=u.text&&(u.node.className="");var j=u.textClass?u.textClass+" "+(u.line.textClass||""):u.line.textClass;u.text.className=j||""}function an(e,u,j,P){if(u.gutter&&(u.node.removeChild(u.gutter),u.gutter=null),u.gutterBackground&&(u.node.removeChild(u.gutterBackground),u.gutterBackground=null),u.line.gutterClass){var W=gt(u);u.gutterBackground=T("div",null,"CodeMirror-gutter-background "+u.line.gutterClass,"left: "+(e.options.fixedGutter?P.fixedPos:-P.gutterTotalWidth)+"px; width: "+P.gutterTotalWidth+"px"),e.display.input.setUneditable(u.gutterBackground),W.insertBefore(u.gutterBackground,u.text)}var Q=u.line.gutterMarkers;if(e.options.lineNumbers||Q){var ae=gt(u),pe=u.gutter=T("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?P.fixedPos:-P.gutterTotalWidth)+"px");if(e.display.input.setUneditable(pe),ae.insertBefore(pe,u.text),u.line.gutterClass&&(pe.className+=" "+u.line.gutterClass),e.options.lineNumbers&&(!Q||!Q["CodeMirror-linenumbers"])&&(u.lineNumber=pe.appendChild(T("div",ri(e.options,j),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+P.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),Q)for(var ve=0;ve<e.display.gutterSpecs.length;++ve){var we=e.display.gutterSpecs[ve].className,ze=Q.hasOwnProperty(we)&&Q[we];ze&&pe.appendChild(T("div",[ze],"CodeMirror-gutter-elt","left: "+P.gutterLeft[we]+"px; width: "+P.gutterWidth[we]+"px"))}}}function ln(e,u,j){u.alignable&&(u.alignable=null);for(var P=O("CodeMirror-linewidget"),W=u.node.firstChild,Q=void 0;W;W=Q)Q=W.nextSibling,P.test(W.className)&&u.node.removeChild(W);tn(e,u,j)}function Or(e,u,j,P){var W=Gt(e,u);return u.text=u.node=W.pre,W.bgClass&&(u.bgClass=W.bgClass),W.textClass&&(u.textClass=W.textClass),Lr(e,u),an(e,u,j,P),tn(e,u,P),u.node}function tn(e,u,j){if(Fr(e,u.line,u,j,!0),u.rest)for(var P=0;P<u.rest.length;P++)Fr(e,u.rest[P],u,j,!1)}function Fr(e,u,j,P,W){if(!u.widgets)return;for(var Q=gt(j),ae=0,pe=u.widgets;ae<pe.length;++ae){var ve=pe[ae],we=T("div",[ve.node],"CodeMirror-linewidget"+(ve.className?" "+ve.className:""));ve.handleMouseEvents||we.setAttribute("cm-ignore-events","true"),pn(ve,we,j,P),e.display.input.setUneditable(we),W&&ve.above?Q.insertBefore(we,j.gutter||j.text):Q.appendChild(we),Qt(ve,"redraw")}}function pn(e,u,j,P){if(e.noHScroll){(j.alignable||(j.alignable=[])).push(u);var W=P.wrapperWidth;u.style.left=P.fixedPos+"px",e.coverGutter||(W-=P.gutterTotalWidth,u.style.paddingLeft=P.gutterTotalWidth+"px"),u.style.width=W+"px"}e.coverGutter&&(u.style.zIndex=5,u.style.position="relative",e.noHScroll||(u.style.marginLeft=-P.gutterTotalWidth+"px"))}function Xr(e){if(e.height!=null)return e.height;var u=e.doc.cm;if(!u)return 0;if(!L(document.body,e.node)){var j="position: relative;";e.coverGutter&&(j+="margin-left: -"+u.display.gutters.offsetWidth+"px;"),e.noHScroll&&(j+="width: "+u.display.wrapper.clientWidth+"px;"),w(u.display.measure,T("div",[e.node],null,j))}return e.height=e.node.parentNode.offsetHeight}function mn(e,u){for(var j=We(u);j!=e.wrapper;j=j.parentNode)if(!j||j.nodeType==1&&j.getAttribute("cm-ignore-events")=="true"||j.parentNode==e.sizer&&j!=e.mover)return!0}function Qn(e){return e.lineSpace.offsetTop}function ke(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Xe(e){if(e.cachedPaddingH)return e.cachedPaddingH;var u=w(e.measure,T("pre","x","CodeMirror-line-like")),j=window.getComputedStyle?window.getComputedStyle(u):u.currentStyle,P={left:parseInt(j.paddingLeft),right:parseInt(j.paddingRight)};return!isNaN(P.left)&&!isNaN(P.right)&&(e.cachedPaddingH=P),P}function Je(e){return de-e.display.nativeBarWidth}function Ue(e){return e.display.scroller.clientWidth-Je(e)-e.display.barWidth}function _e(e){return e.display.scroller.clientHeight-Je(e)-e.display.barHeight}function De(e,u,j){var P=e.options.lineWrapping,W=P&&Ue(e);if(!u.measure.heights||P&&u.measure.width!=W){var Q=u.measure.heights=[];if(P){u.measure.width=W;for(var ae=u.text.firstChild.getClientRects(),pe=0;pe<ae.length-1;pe++){var ve=ae[pe],we=ae[pe+1];Math.abs(ve.bottom-we.bottom)>2&&Q.push((ve.bottom+we.top)/2-j.top)}}Q.push(j.bottom-j.top)}}function Se(e,u,j){if(e.line==u)return{map:e.measure.map,cache:e.measure.cache};for(var P=0;P<e.rest.length;P++)if(e.rest[P]==u)return{map:e.measure.maps[P],cache:e.measure.caches[P]};for(var W=0;W<e.rest.length;W++)if(Jr(e.rest[W])>j)return{map:e.measure.maps[W],cache:e.measure.caches[W],before:!0}}function je(e,u){u=St(u);var j=Jr(u),P=e.display.externalMeasured=new zt(e.doc,u,j);P.lineN=j;var W=P.built=qt(e,P);return P.text=W.pre,w(e.display.lineMeasure,W.pre),P}function Ge(e,u,j,P){return qe(e,Ke(e,u),j,P)}function $e(e,u){if(u>=e.display.viewFrom&&u<e.display.viewTo)return e.display.view[Fn(e,u)];var j=e.display.externalMeasured;if(j&&u>=j.lineN&&u<j.lineN+j.size)return j}function Ke(e,u){var j=Jr(u),P=$e(e,j);P&&!P.text?P=null:P&&P.changes&&(tr(e,P,j,Xn(e)),e.curOp.forceUpdate=!0),P||(P=je(e,u));var W=Se(P,u,j);return{line:u,view:P,rect:null,map:W.map,cache:W.cache,before:W.before,hasHeights:!1}}function qe(e,u,j,P,W){u.before&&(j=-1);var Q=j+(P||""),ae;return u.cache.hasOwnProperty(Q)?ae=u.cache[Q]:(u.rect||(u.rect=u.view.text.getBoundingClientRect()),u.hasHeights||(De(e,u.view,u.rect),u.hasHeights=!0),ae=Yt(e,u,j,P),ae.bogus||(u.cache[Q]=ae)),{left:ae.left,right:ae.right,top:W?ae.rtop:ae.top,bottom:W?ae.rbottom:ae.bottom}}var pt={left:0,right:0,top:0,bottom:0};function Dt(e,u,j){for(var P,W,Q,ae,pe,ve,we=0;we<e.length;we+=3)if(pe=e[we],ve=e[we+1],u<pe?(W=0,Q=1,ae="left"):u<ve?(W=u-pe,Q=W+1):(we==e.length-3||u==ve&&e[we+3]>u)&&(Q=ve-pe,W=Q-1,u>=ve&&(ae="right")),W!=null){if(P=e[we+2],pe==ve&&j==(P.insertLeft?"left":"right")&&(ae=j),j=="left"&&W==0)for(;we&&e[we-2]==e[we-3]&&e[we-1].insertLeft;)P=e[(we-=3)+2],ae="left";if(j=="right"&&W==ve-pe)for(;we<e.length-3&&e[we+3]==e[we+4]&&!e[we+5].insertLeft;)P=e[(we+=3)+2],ae="right";break}return{node:P,start:W,end:Q,collapse:ae,coverStart:pe,coverEnd:ve}}function jt(e,u){var j=pt;if(u=="left")for(var P=0;P<e.length&&!((j=e[P]).left!=j.right);P++);else for(var W=e.length-1;W>=0&&!((j=e[W]).left!=j.right);W--);return j}function Yt(e,u,j,P){var W=Dt(u.map,j,P),Q=W.node,ae=W.start,pe=W.end,ve=W.collapse,we;if(Q.nodeType==3){for(var ze=0;ze<4;ze++){for(;ae&&fe(u.line.text.charAt(W.coverStart+ae));)--ae;for(;W.coverStart+pe<W.coverEnd&&fe(u.line.text.charAt(W.coverStart+pe));)++pe;if(S&&_<9&&ae==0&&pe==W.coverEnd-W.coverStart?we=Q.parentNode.getBoundingClientRect():we=jt(N(Q,ae,pe).getClientRects(),P),we.left||we.right||ae==0)break;pe=ae,ae=ae-1,ve="right"}S&&_<11&&(we=Pr(e.display.measure,we))}else{ae>0&&(ve=P="right");var Ye;e.options.lineWrapping&&(Ye=Q.getClientRects()).length>1?we=Ye[P=="right"?Ye.length-1:0]:we=Q.getBoundingClientRect()}if(S&&_<9&&!ae&&(!we||!we.left&&!we.right)){var ct=Q.parentNode.getClientRects()[0];ct?we={left:ct.left,right:ct.left+ui(e.display),top:ct.top,bottom:ct.bottom}:we=pt}for(var at=we.top-u.rect.top,Ct=we.bottom-u.rect.top,Ut=(at+Ct)/2,Jt=u.view.measure.heights,nr=0;nr<Jt.length-1&&!(Ut<Jt[nr]);nr++);var vr=nr?Jt[nr-1]:0,ir=Jt[nr],Cr={left:(ve=="right"?we.right:we.left)-u.rect.left,right:(ve=="left"?we.left:we.right)-u.rect.left,top:vr,bottom:ir};return!we.left&&!we.right&&(Cr.bogus=!0),e.options.singleCursorHeightPerLine||(Cr.rtop=at,Cr.rbottom=Ct),Cr}function Pr(e,u){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Yr(e))return u;var j=screen.logicalXDPI/screen.deviceXDPI,P=screen.logicalYDPI/screen.deviceYDPI;return{left:u.left*j,right:u.right*j,top:u.top*P,bottom:u.bottom*P}}function Qr(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var u=0;u<e.rest.length;u++)e.measure.caches[u]={}}function $r(e){e.display.externalMeasure=null,E(e.display.lineMeasure);for(var u=0;u<e.display.view.length;u++)Qr(e.display.view[u])}function qr(e){$r(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function zr(){return n&&f?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function rn(){return n&&f?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function nn(e){var u=0;if(e.widgets)for(var j=0;j<e.widgets.length;++j)e.widgets[j].above&&(u+=Xr(e.widgets[j]));return u}function vn(e,u,j,P,W){if(!W){var Q=nn(u);j.top+=Q,j.bottom+=Q}if(P=="line")return j;P||(P="local");var ae=cr(u);if(P=="local"?ae+=Qn(e.display):ae-=e.display.viewOffset,P=="page"||P=="window"){var pe=e.display.lineSpace.getBoundingClientRect();ae+=pe.top+(P=="window"?0:rn());var ve=pe.left+(P=="window"?0:zr());j.left+=ve,j.right+=ve}return j.top+=ae,j.bottom+=ae,j}function un(e,u,j){if(j=="div")return u;var P=u.left,W=u.top;if(j=="page")P-=zr(),W-=rn();else if(j=="local"||!j){var Q=e.display.sizer.getBoundingClientRect();P+=Q.left,W+=Q.top}var ae=e.display.lineSpace.getBoundingClientRect();return{left:P-ae.left,top:W-ae.top}}function kn(e,u,j,P,W){return P||(P=sr(e.doc,u.line)),vn(e,P,Ge(e,P,u.ch,W),j)}function hn(e,u,j,P,W,Q){P=P||sr(e.doc,u.line),W||(W=Ke(e,P));function ae(Ct,Ut){var Jt=qe(e,W,Ct,Ut?"right":"left",Q);return Ut?Jt.left=Jt.right:Jt.right=Jt.left,vn(e,P,Jt,j)}var pe=dt(P,e.doc.direction),ve=u.ch,we=u.sticky;if(ve>=P.text.length?(ve=P.text.length,we="before"):ve<=0&&(ve=0,we="after"),!pe)return ae(we=="before"?ve-1:ve,we=="before");function ze(Ct,Ut,Jt){var nr=pe[Ut],vr=nr.level==1;return ae(Jt?Ct-1:Ct,vr!=Jt)}var Ye=it(pe,ve,we),ct=et,at=ze(ve,Ye,we=="before");return ct!=null&&(at.other=ze(ve,ct,we!="before")),at}function Nr(e,u){var j=0;u=V(e.doc,u),e.options.lineWrapping||(j=ui(e.display)*u.ch);var P=sr(e.doc,u.line),W=cr(P)+Qn(e.display);return{left:j,right:j,top:W,bottom:W+P.height}}function Ur(e,u,j,P,W){var Q=Nt(e,u,j);return Q.xRel=W,P&&(Q.outside=P),Q}function on(e,u,j){var P=e.doc;if(j+=e.display.viewOffset,j<0)return Ur(P.first,0,null,-1,-1);var W=An(P,j),Q=P.first+P.size-1;if(W>Q)return Ur(P.first+P.size-1,sr(P,Q).text.length,null,1,1);u<0&&(u=0);for(var ae=sr(P,W);;){var pe=Vn(e,ae,W,u,j),ve=Ht(ae,pe.ch+(pe.xRel>0||pe.outside>0?1:0));if(!ve)return pe;var we=ve.find(1);if(we.line==W)return we;ae=sr(P,W=we.line)}}function gn(e,u,j,P){P-=nn(u);var W=u.text.length,Q=He(function(ae){return qe(e,j,ae-1).bottom<=P},W,0);return W=He(function(ae){return qe(e,j,ae).top>P},Q,W),{begin:Q,end:W}}function Tr(e,u,j,P){j||(j=Ke(e,u));var W=vn(e,u,qe(e,j,P),"line").top;return gn(e,u,j,W)}function xn(e,u,j,P){return e.bottom<=j?!1:e.top>j?!0:(P?e.left:e.right)>u}function Vn(e,u,j,P,W){W-=cr(u);var Q=Ke(e,u),ae=nn(u),pe=0,ve=u.text.length,we=!0,ze=dt(u,e.doc.direction);if(ze){var Ye=(e.options.lineWrapping?jn:Cn)(e,u,j,Q,ze,P,W);we=Ye.level!=1,pe=we?Ye.from:Ye.to-1,ve=we?Ye.to:Ye.from-1}var ct=null,at=null,Ct=He(function(Zr){var Kr=qe(e,Q,Zr);return Kr.top+=ae,Kr.bottom+=ae,xn(Kr,P,W,!1)?(Kr.top<=W&&Kr.left<=P&&(ct=Zr,at=Kr),!0):!1},pe,ve),Ut,Jt,nr=!1;if(at){var vr=P-at.left<at.right-P,ir=vr==we;Ct=ct+(ir?0:1),Jt=ir?"after":"before",Ut=vr?at.left:at.right}else{!we&&(Ct==ve||Ct==pe)&&Ct++,Jt=Ct==0?"after":Ct==u.text.length?"before":qe(e,Q,Ct-(we?1:0)).bottom+ae<=W==we?"after":"before";var Cr=hn(e,Nt(j,Ct,Jt),"line",u,Q);Ut=Cr.left,nr=W<Cr.top?-1:W>=Cr.bottom?1:0}return Ct=Ee(u.text,Ct,1),Ur(j,Ct,Jt,nr,P-Ut)}function Cn(e,u,j,P,W,Q,ae){var pe=He(function(Ye){var ct=W[Ye],at=ct.level!=1;return xn(hn(e,Nt(j,at?ct.to:ct.from,at?"before":"after"),"line",u,P),Q,ae,!0)},0,W.length-1),ve=W[pe];if(pe>0){var we=ve.level!=1,ze=hn(e,Nt(j,we?ve.from:ve.to,we?"after":"before"),"line",u,P);xn(ze,Q,ae,!0)&&ze.top>ae&&(ve=W[pe-1])}return ve}function jn(e,u,j,P,W,Q,ae){var pe=gn(e,u,P,ae),ve=pe.begin,we=pe.end;/\s/.test(u.text.charAt(we-1))&&we--;for(var ze=null,Ye=null,ct=0;ct<W.length;ct++){var at=W[ct];if(at.from>=we||at.to<=ve)continue;var Ct=at.level!=1,Ut=qe(e,P,Ct?Math.min(we,at.to)-1:Math.max(ve,at.from)).right,Jt=Ut<Q?Q-Ut+1e9:Ut-Q;(!ze||Ye>Jt)&&(ze=at,Ye=Jt)}return ze||(ze=W[W.length-1]),ze.from<ve&&(ze={from:ve,to:ze.to,level:ze.level}),ze.to>we&&(ze={from:ze.from,to:we,level:ze.level}),ze}var Rn;function ei(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Rn==null){Rn=T("pre",null,"CodeMirror-line-like");for(var u=0;u<49;++u)Rn.appendChild(document.createTextNode("x")),Rn.appendChild(T("br"));Rn.appendChild(document.createTextNode("x"))}w(e.measure,Rn);var j=Rn.offsetHeight/50;return j>3&&(e.cachedTextHeight=j),E(e.measure),j||1}function ui(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var u=T("span","xxxxxxxxxx"),j=T("pre",[u],"CodeMirror-line-like");w(e.measure,j);var P=u.getBoundingClientRect(),W=(P.right-P.left)/10;return W>2&&(e.cachedCharWidth=W),W||10}function Xn(e){for(var u=e.display,j={},P={},W=u.gutters.clientLeft,Q=u.gutters.firstChild,ae=0;Q;Q=Q.nextSibling,++ae){var pe=e.display.gutterSpecs[ae].className;j[pe]=Q.offsetLeft+Q.clientLeft+W,P[pe]=Q.clientWidth}return{fixedPos:gi(u),gutterTotalWidth:u.gutters.offsetWidth,gutterLeft:j,gutterWidth:P,wrapperWidth:u.wrapper.clientWidth}}function gi(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Xi(e){var u=ei(e.display),j=e.options.lineWrapping,P=j&&Math.max(5,e.display.scroller.clientWidth/ui(e.display)-3);return function(W){if($t(e.doc,W))return 0;var Q=0;if(W.widgets)for(var ae=0;ae<W.widgets.length;ae++)W.widgets[ae].height&&(Q+=W.widgets[ae].height);return j?Q+(Math.ceil(W.text.length/P)||1)*u:Q+u}}function Si(e){var u=e.doc,j=Xi(e);u.iter(function(P){var W=j(P);W!=P.height&&On(P,W)})}function ci(e,u,j,P){var W=e.display;if(!j&&We(u).getAttribute("cm-not-content")=="true")return null;var Q,ae,pe=W.lineSpace.getBoundingClientRect();try{Q=u.clientX-pe.left,ae=u.clientY-pe.top}catch(Ye){return null}var ve=on(e,Q,ae),we;if(P&&ve.xRel>0&&(we=sr(e.doc,ve.line).text).length==ve.ch){var ze=K(we,we.length,e.options.tabSize)-we.length;ve=Nt(ve.line,Math.max(0,Math.round((Q-Xe(e.display).left)/ui(e.display))-ze))}return ve}function Fn(e,u){if(u>=e.display.viewTo)return null;if(u-=e.display.viewFrom,u<0)return null;for(var j=e.display.view,P=0;P<j.length;P++)if(u-=j[P].size,u<0)return P}function Un(e,u,j,P){u==null&&(u=e.doc.first),j==null&&(j=e.doc.first+e.doc.size),P||(P=0);var W=e.display;if(P&&j<W.viewTo&&(W.updateLineNumbers==null||W.updateLineNumbers>u)&&(W.updateLineNumbers=u),e.curOp.viewChanged=!0,u>=W.viewTo)Gn&&ar(e.doc,u)<W.viewTo&&zn(e);else if(j<=W.viewFrom)Gn&&Zt(e.doc,j+P)>W.viewFrom?zn(e):(W.viewFrom+=P,W.viewTo+=P);else if(u<=W.viewFrom&&j>=W.viewTo)zn(e);else if(u<=W.viewFrom){var Q=ai(e,j,j+P,1);Q?(W.view=W.view.slice(Q.index),W.viewFrom=Q.lineN,W.viewTo+=P):zn(e)}else if(j>=W.viewTo){var ae=ai(e,u,u,-1);ae?(W.view=W.view.slice(0,ae.index),W.viewTo=ae.lineN):zn(e)}else{var pe=ai(e,u,u,-1),ve=ai(e,j,j+P,1);pe&&ve?(W.view=W.view.slice(0,pe.index).concat(sn(e,pe.lineN,ve.lineN)).concat(W.view.slice(ve.index)),W.viewTo+=P):zn(e)}var we=W.externalMeasured;we&&(j<we.lineN?we.lineN+=P:u<we.lineN+we.size&&(W.externalMeasured=null))}function Yn(e,u,j){e.curOp.viewChanged=!0;var P=e.display,W=e.display.externalMeasured;if(W&&u>=W.lineN&&u<W.lineN+W.size&&(P.externalMeasured=null),u<P.viewFrom||u>=P.viewTo)return;var Q=P.view[Fn(e,u)];if(Q.node==null)return;var ae=Q.changes||(Q.changes=[]);ue(ae,j)==-1&&ae.push(j)}function zn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function ai(e,u,j,P){var W=Fn(e,u),Q,ae=e.display.view;if(!Gn||j==e.doc.first+e.doc.size)return{index:W,lineN:j};for(var pe=e.display.viewFrom,ve=0;ve<W;ve++)pe+=ae[ve].size;if(pe!=u){if(P>0){if(W==ae.length-1)return null;Q=pe+ae[W].size-u,W++}else Q=pe-u;u+=Q,j+=Q}for(;ar(e.doc,j)!=j;){if(W==(P<0?0:ae.length-1))return null;j+=P*ae[W-(P<0?1:0)].size,W+=P}return{index:W,lineN:j}}function Ai(e,u,j){var P=e.display,W=P.view;W.length==0||u>=P.viewTo||j<=P.viewFrom?(P.view=sn(e,u,j),P.viewFrom=u):(P.viewFrom>u?P.view=sn(e,u,P.viewFrom).concat(P.view):P.viewFrom<u&&(P.view=P.view.slice(Fn(e,u))),P.viewFrom=u,P.viewTo<j?P.view=P.view.concat(sn(e,P.viewTo,j)):P.viewTo>j&&(P.view=P.view.slice(0,Fn(e,j)))),P.viewTo=j}function ra(e){for(var u=e.display.view,j=0,P=0;P<u.length;P++){var W=u[P];!W.hidden&&(!W.node||W.changes)&&++j}return j}function Dn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Fi(e,u){u===void 0&&(u=!0);for(var j=e.doc,P={},W=P.cursors=document.createDocumentFragment(),Q=P.selection=document.createDocumentFragment(),ae=0;ae<j.sel.ranges.length;ae++){if(!u&&ae==j.sel.primIndex)continue;var pe=j.sel.ranges[ae];if(pe.from().line>=e.display.viewTo||pe.to().line<e.display.viewFrom)continue;var ve=pe.empty();(ve||e.options.showCursorWhenSelecting)&&Ui(e,pe.head,W),ve||In(e,pe,Q)}return P}function Ui(e,u,j){var P=hn(e,u,"div",null,null,!e.options.singleCursorHeightPerLine),W=j.appendChild(T("div","\xA0","CodeMirror-cursor"));if(W.style.left=P.left+"px",W.style.top=P.top+"px",W.style.height=Math.max(0,P.bottom-P.top)*e.options.cursorHeight+"px",P.other){var Q=j.appendChild(T("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Q.style.display="",Q.style.left=P.other.left+"px",Q.style.top=P.other.top+"px",Q.style.height=(P.other.bottom-P.other.top)*.85+"px"}}function Mn(e,u){return e.top-u.top||e.left-u.left}function In(e,u,j){var P=e.display,W=e.doc,Q=document.createDocumentFragment(),ae=Xe(e.display),pe=ae.left,ve=Math.max(P.sizerWidth,Ue(e)-P.sizer.offsetLeft)-ae.right,we=W.direction=="ltr";function ze(ir,Cr,Zr,Kr){Cr<0&&(Cr=0),Cr=Math.round(Cr),Kr=Math.round(Kr),Q.appendChild(T("div",null,"CodeMirror-selected","position: absolute; left: "+ir+`px;
top: `+Cr+"px; width: "+(Zr==null?ve-ir:Zr)+`px;
height: `+(Kr-Cr)+"px"))}function Ye(ir,Cr,Zr){var Kr=sr(W,ir),_n=Kr.text.length,$n,Ci;function si(vi,Qi){return kn(e,Nt(ir,vi),"div",Kr,Qi)}function qi(vi,Qi,Ii){var Ei=Tr(e,Kr,null,vi),yi=Qi=="ltr"==(Ii=="after")?"left":"right",di=Ii=="after"?Ei.begin:Ei.end-(/\s/.test(Kr.text.charAt(Ei.end-1))?2:1);return si(di,yi)[yi]}var Ji=dt(Kr,W.direction);return Qe(Ji,Cr||0,Zr==null?_n:Zr,function(vi,Qi,Ii,Ei){var yi=Ii=="ltr",di=si(vi,yi?"left":"right"),Zi=si(Qi-1,yi?"right":"left"),lo=Cr==null&&vi==0,Ua=Zr==null&&Qi==_n,Mi=Ei==0,xa=!Ji||Ei==Ji.length-1;if(Zi.top-di.top<=3){var Oi=(we?lo:Ua)&&Mi,ps=(we?Ua:lo)&&xa,Da=Oi?pe:(yi?di:Zi).left,Ga=ps?ve:(yi?Zi:di).right;ze(Da,di.top,Ga-Da,di.bottom)}else{var Va,zi,uo,ms;yi?(Va=we&&lo&&Mi?pe:di.left,zi=we?ve:qi(vi,Ii,"before"),uo=we?pe:qi(Qi,Ii,"after"),ms=we&&Ua&&xa?ve:Zi.right):(Va=we?qi(vi,Ii,"before"):pe,zi=!we&&lo&&Mi?ve:di.right,uo=!we&&Ua&&xa?pe:Zi.left,ms=we?qi(Qi,Ii,"after"):ve),ze(Va,di.top,zi-Va,di.bottom),di.bottom<Zi.top&&ze(pe,di.bottom,null,Zi.top),ze(uo,Zi.top,ms-uo,Zi.bottom)}(!$n||Mn(di,$n)<0)&&($n=di),Mn(Zi,$n)<0&&($n=Zi),(!Ci||Mn(di,Ci)<0)&&(Ci=di),Mn(Zi,Ci)<0&&(Ci=Zi)}),{start:$n,end:Ci}}var ct=u.from(),at=u.to();if(ct.line==at.line)Ye(ct.line,ct.ch,at.ch);else{var Ct=sr(W,ct.line),Ut=sr(W,at.line),Jt=St(Ct)==St(Ut),nr=Ye(ct.line,ct.ch,Jt?Ct.text.length+1:null).end,vr=Ye(at.line,Jt?0:null,at.ch).start;Jt&&(nr.top<vr.top-2?(ze(nr.right,nr.top,null,nr.bottom),ze(pe,vr.top,vr.left,vr.bottom)):ze(nr.right,nr.top,vr.left-nr.right,nr.bottom)),nr.bottom<vr.top&&ze(pe,nr.bottom,null,vr.top)}j.appendChild(Q)}function oi(e){if(!e.state.focused)return;var u=e.display;clearInterval(u.blinker);var j=!0;u.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?u.blinker=setInterval(function(){e.hasFocus()||la(e),u.cursorDiv.style.visibility=(j=!j)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(u.cursorDiv.style.visibility="hidden")}function Ba(e){e.state.focused||(e.display.input.focus(),sa(e))}function wa(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,la(e))},100)}function sa(e,u){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Ze(e,"focus",e,u),e.state.focused=!0,z(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),t&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),oi(e)}function la(e,u){if(e.state.delayingBlurEvent)return;e.state.focused&&(Ze(e,"blur",e,u),e.state.focused=!1,b(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function La(e){for(var u=e.display,j=u.lineDiv.offsetTop,P=0;P<u.view.length;P++){var W=u.view[P],Q=e.options.lineWrapping,ae=void 0,pe=0;if(W.hidden)continue;if(S&&_<8){var ve=W.node.offsetTop+W.node.offsetHeight;ae=ve-j,j=ve}else{var we=W.node.getBoundingClientRect();ae=we.bottom-we.top,!Q&&W.text.firstChild&&(pe=W.text.firstChild.getBoundingClientRect().right-we.left-1)}var ze=W.line.height-ae;if((ze>.005||ze<-.005)&&(On(W.line,ae),Ta(W.line),W.rest))for(var Ye=0;Ye<W.rest.length;Ye++)Ta(W.rest[Ye]);if(pe>e.display.sizerWidth){var ct=Math.ceil(pe/ui(e.display));ct>e.display.maxLineLength&&(e.display.maxLineLength=ct,e.display.maxLine=W.line,e.display.maxLineChanged=!0)}}}function Ta(e){if(e.widgets)for(var u=0;u<e.widgets.length;++u){var j=e.widgets[u],P=j.node.parentNode;P&&(j.height=P.offsetHeight)}}function Pa(e,u,j){var P=j&&j.top!=null?Math.max(0,j.top):e.scroller.scrollTop;P=Math.floor(P-Qn(e));var W=j&&j.bottom!=null?j.bottom:P+e.wrapper.clientHeight,Q=An(u,P),ae=An(u,W);if(j&&j.ensure){var pe=j.ensure.from.line,ve=j.ensure.to.line;pe<Q?(Q=pe,ae=An(u,cr(sr(u,pe))+e.wrapper.clientHeight)):Math.min(ve,u.lastLine())>=ae&&(Q=An(u,cr(sr(u,ve))-e.wrapper.clientHeight),ae=ve)}return{from:Q,to:Math.max(ae,Q+1)}}function Ha(e,u){if(tt(e,"scrollCursorIntoView"))return;var j=e.display,P=j.sizer.getBoundingClientRect(),W=null;if(u.top+P.top<0?W=!0:u.bottom+P.top>(window.innerHeight||document.documentElement.clientHeight)&&(W=!1),W!=null&&!s){var Q=T("div","\u200B",null,`position: absolute;
top: `+(u.top-j.viewOffset-Qn(e.display))+`px;
height: `+(u.bottom-u.top+Je(e)+j.barHeight)+`px;
left: `+u.left+"px; width: "+Math.max(2,u.right-u.left)+"px;");e.display.lineSpace.appendChild(Q),Q.scrollIntoView(W),e.display.lineSpace.removeChild(Q)}}function Xa(e,u,j,P){P==null&&(P=0);var W;!e.options.lineWrapping&&u==j&&(u=u.ch?Nt(u.line,u.sticky=="before"?u.ch-1:u.ch,"after"):u,j=u.sticky=="before"?Nt(u.line,u.ch+1,"before"):u);for(var Q=0;Q<5;Q++){var ae=!1,pe=hn(e,u),ve=!j||j==u?pe:hn(e,j);W={left:Math.min(pe.left,ve.left),top:Math.min(pe.top,ve.top)-P,right:Math.max(pe.left,ve.left),bottom:Math.max(pe.bottom,ve.bottom)+P};var we=ua(e,W),ze=e.doc.scrollTop,Ye=e.doc.scrollLeft;if(we.scrollTop!=null&&(da(e,we.scrollTop),Math.abs(e.doc.scrollTop-ze)>1&&(ae=!0)),we.scrollLeft!=null&&(Yi(e,we.scrollLeft),Math.abs(e.doc.scrollLeft-Ye)>1&&(ae=!0)),!ae)break}return W}function ka(e,u){var j=ua(e,u);j.scrollTop!=null&&da(e,j.scrollTop),j.scrollLeft!=null&&Yi(e,j.scrollLeft)}function ua(e,u){var j=e.display,P=ei(e.display);u.top<0&&(u.top=0);var W=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:j.scroller.scrollTop,Q=_e(e),ae={};u.bottom-u.top>Q&&(u.bottom=u.top+Q);var pe=e.doc.height+ke(j),ve=u.top<P,we=u.bottom>pe-P;if(u.top<W)ae.scrollTop=ve?0:u.top;else if(u.bottom>W+Q){var ze=Math.min(u.top,(we?pe:u.bottom)-Q);ze!=W&&(ae.scrollTop=ze)}var Ye=e.options.fixedGutter?0:j.gutters.offsetWidth,ct=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:j.scroller.scrollLeft-Ye,at=Ue(e)-j.gutters.offsetWidth,Ct=u.right-u.left>at;return Ct&&(u.right=u.left+at),u.left<10?ae.scrollLeft=0:u.left<ct?ae.scrollLeft=Math.max(0,u.left+Ye-(Ct?0:10)):u.right>at+ct-3&&(ae.scrollLeft=u.right+(Ct?0:10)-at),ae}function Sa(e,u){if(u==null)return;_a(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+u}function ba(e){_a(e);var u=e.getCursor();e.curOp.scrollToPos={from:u,to:u,margin:e.options.cursorScrollMargin}}function ca(e,u,j){(u!=null||j!=null)&&_a(e),u!=null&&(e.curOp.scrollLeft=u),j!=null&&(e.curOp.scrollTop=j)}function co(e,u){_a(e),e.curOp.scrollToPos=u}function _a(e){var u=e.curOp.scrollToPos;if(u){e.curOp.scrollToPos=null;var j=Nr(e,u.from),P=Nr(e,u.to);Ca(e,j,P,u.margin)}}function Ca(e,u,j,P){var W=ua(e,{left:Math.min(u.left,j.left),top:Math.min(u.top,j.top)-P,right:Math.max(u.right,j.right),bottom:Math.max(u.bottom,j.bottom)+P});ca(e,W.scrollLeft,W.scrollTop)}function da(e,u){if(Math.abs(e.doc.scrollTop-u)<2)return;C||za(e,{top:u}),fa(e,u,!0),C&&za(e),Wa(e,100)}function fa(e,u,j){if(u=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,u)),e.display.scroller.scrollTop==u&&!j)return;e.doc.scrollTop=u,e.display.scrollbars.setScrollTop(u),e.display.scroller.scrollTop!=u&&(e.display.scroller.scrollTop=u)}function Yi(e,u,j,P){if(u=Math.max(0,Math.min(u,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(j?u==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-u)<2)&&!P)return;e.doc.scrollLeft=u,Sn(e),e.display.scroller.scrollLeft!=u&&(e.display.scroller.scrollLeft=u),e.display.scrollbars.setScrollLeft(u)}function na(e){var u=e.display,j=u.gutters.offsetWidth,P=Math.round(e.doc.height+ke(e.display));return{clientHeight:u.scroller.clientHeight,viewHeight:u.wrapper.clientHeight,scrollWidth:u.scroller.scrollWidth,clientWidth:u.scroller.clientWidth,viewWidth:u.wrapper.clientWidth,barLeft:e.options.fixedGutter?j:0,docHeight:P,scrollHeight:P+Je(e)+u.barHeight,nativeBarWidth:u.nativeBarWidth,gutterWidth:j}}var wr=function(e,u,j){this.cm=j;var P=this.vert=T("div",[T("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),W=this.horiz=T("div",[T("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");P.tabIndex=W.tabIndex=-1,e(P),e(W),Ie(P,"scroll",function(){P.clientHeight&&u(P.scrollTop,"vertical")}),Ie(W,"scroll",function(){W.clientWidth&&u(W.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,S&&_<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};wr.prototype.update=function(e){var u=e.scrollWidth>e.clientWidth+1,j=e.scrollHeight>e.clientHeight+1,P=e.nativeBarWidth;if(j){this.vert.style.display="block",this.vert.style.bottom=u?P+"px":"0";var W=e.viewHeight-(u?P:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+W)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(u){this.horiz.style.display="block",this.horiz.style.right=j?P+"px":"0",this.horiz.style.left=e.barLeft+"px";var Q=e.viewWidth-e.barLeft-(j?P:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+Q)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(P==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:j?P:0,bottom:u?P:0}},wr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},wr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},wr.prototype.zeroWidthHack=function(){var e=o&&!i?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Z,this.disableVert=new Z},wr.prototype.enableZeroWidthBar=function(e,u,j){e.style.pointerEvents="auto";function P(){var W=e.getBoundingClientRect(),Q=j=="vert"?document.elementFromPoint(W.right-1,(W.top+W.bottom)/2):document.elementFromPoint((W.right+W.left)/2,W.bottom-1);Q!=e?e.style.pointerEvents="none":u.set(1e3,P)}u.set(1e3,P)},wr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Sr=function(){};Sr.prototype.update=function(){return{bottom:0,right:0}},Sr.prototype.setScrollLeft=function(){},Sr.prototype.setScrollTop=function(){},Sr.prototype.clear=function(){};function or(e,u){u||(u=na(e));var j=e.display.barWidth,P=e.display.barHeight;wn(e,u);for(var W=0;W<4&&j!=e.display.barWidth||P!=e.display.barHeight;W++)j!=e.display.barWidth&&e.options.lineWrapping&&La(e),wn(e,na(e)),j=e.display.barWidth,P=e.display.barHeight}function wn(e,u){var j=e.display,P=j.scrollbars.update(u);j.sizer.style.paddingRight=(j.barWidth=P.right)+"px",j.sizer.style.paddingBottom=(j.barHeight=P.bottom)+"px",j.heightForcer.style.borderBottom=P.bottom+"px solid transparent",P.right&&P.bottom?(j.scrollbarFiller.style.display="block",j.scrollbarFiller.style.height=P.bottom+"px",j.scrollbarFiller.style.width=P.right+"px"):j.scrollbarFiller.style.display="",P.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(j.gutterFiller.style.display="block",j.gutterFiller.style.height=P.bottom+"px",j.gutterFiller.style.width=u.gutterWidth+"px"):j.gutterFiller.style.display=""}var hr={native:wr,null:Sr};function pa(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&b(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new hr[e.options.scrollbarStyle](function(u){e.display.wrapper.insertBefore(u,e.display.scrollbarFiller),Ie(u,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),u.setAttribute("cm-not-content","true")},function(u,j){j=="horizontal"?Yi(e,u):da(e,u)},e),e.display.scrollbars.addClass&&z(e.display.wrapper,e.display.scrollbars.addClass)}var Ya=0;function Hn(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ya},mr(e.curOp)}function Oa(e){var u=e.curOp;u&&Mr(u,function(j){for(var P=0;P<j.ops.length;P++)j.ops[P].cm.curOp=null;Io(j)})}function Io(e){for(var u=e.ops,j=0;j<u.length;j++)Jo(u[j]);for(var P=0;P<u.length;P++)Qo(u[P]);for(var W=0;W<u.length;W++)Zo(u[W]);for(var Q=0;Q<u.length;Q++)ho(u[Q]);for(var ae=0;ae<u.length;ae++)qo(u[ae])}function Jo(e){var u=e.cm,j=u.display;Do(u),e.updateMaxLine&&Rr(u),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<j.viewFrom||e.scrollToPos.to.line>=j.viewTo)||j.maxLineChanged&&u.options.lineWrapping,e.update=e.mustUpdate&&new ia(u,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qo(e){e.updatedDisplay=e.mustUpdate&&Aa(e.cm,e.update)}function Zo(e){var u=e.cm,j=u.display;e.updatedDisplay&&La(u),e.barMeasure=na(u),j.maxLineChanged&&!u.options.lineWrapping&&(e.adjustWidthTo=Ge(u,j.maxLine,j.maxLine.text.length).left+3,u.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(j.scroller.clientWidth,j.sizer.offsetLeft+e.adjustWidthTo+Je(u)+u.display.barWidth),e.maxScrollLeft=Math.max(0,j.sizer.offsetLeft+e.adjustWidthTo-Ue(u))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=j.input.prepareSelection())}function ho(e){var u=e.cm;e.adjustWidthTo!=null&&(u.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<u.doc.scrollLeft&&Yi(u,Math.min(u.display.scroller.scrollLeft,e.maxScrollLeft),!0),u.display.maxLineChanged=!1);var j=e.focus&&e.focus==G();e.preparedSelection&&u.display.input.showSelection(e.preparedSelection,j),(e.updatedDisplay||e.startHeight!=u.doc.height)&&or(u,e.barMeasure),e.updatedDisplay&&Nn(u,e.barMeasure),e.selectionChanged&&oi(u),u.state.focused&&e.updateInput&&u.display.input.reset(e.typing),j&&Ba(e.cm)}function qo(e){var u=e.cm,j=u.display,P=u.doc;if(e.updatedDisplay&&$a(u,e.update),j.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(j.wheelStartX=j.wheelStartY=null),e.scrollTop!=null&&fa(u,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Yi(u,e.scrollLeft,!0,!0),e.scrollToPos){var W=Xa(u,V(P,e.scrollToPos.from),V(P,e.scrollToPos.to),e.scrollToPos.margin);Ha(u,W)}var Q=e.maybeHiddenMarkers,ae=e.maybeUnhiddenMarkers;if(Q)for(var pe=0;pe<Q.length;++pe)Q[pe].lines.length||Ze(Q[pe],"hide");if(ae)for(var ve=0;ve<ae.length;++ve)ae[ve].lines.length&&Ze(ae[ve],"unhide");j.wrapper.offsetHeight&&(P.scrollTop=u.display.scroller.scrollTop),e.changeObjs&&Ze(u,"changes",u,e.changeObjs),e.update&&e.update.finish()}function Bi(e,u){if(e.curOp)return u();Hn(e);try{return u()}finally{Oa(e)}}function hi(e,u){return function(){if(e.curOp)return u.apply(e,arguments);Hn(e);try{return u.apply(e,arguments)}finally{Oa(e)}}}function Ri(e){return function(){if(this.curOp)return e.apply(this,arguments);Hn(this);try{return e.apply(this,arguments)}finally{Oa(this)}}}function fi(e){return function(){var u=this.cm;if(!u||u.curOp)return e.apply(this,arguments);Hn(u);try{return e.apply(this,arguments)}finally{Oa(u)}}}function Wa(e,u){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(u,U(es,e))}function es(e){var u=e.doc;if(u.highlightFrontier>=e.display.viewTo)return;var j=+new Date+e.options.workTime,P=Xt(e,u.highlightFrontier),W=[];u.iter(P.line,Math.min(u.first+u.size,e.display.viewTo+500),function(Q){if(P.line>=e.display.viewFrom){var ae=Q.styles,pe=Q.text.length>e.options.maxHighlightLength?Br(u.mode,P.state):null,ve=Ve(e,Q,P,!0);pe&&(P.state=pe),Q.styles=ve.styles;var we=Q.styleClasses,ze=ve.classes;ze?Q.styleClasses=ze:we&&(Q.styleClasses=null);for(var Ye=!ae||ae.length!=Q.styles.length||we!=ze&&(!we||!ze||we.bgClass!=ze.bgClass||we.textClass!=ze.textClass),ct=0;!Ye&&ct<ae.length;++ct)Ye=ae[ct]!=Q.styles[ct];Ye&&W.push(P.line),Q.stateAfter=P.save(),P.nextLine()}else Q.text.length<=e.options.maxHighlightLength&&Er(e,Q.text,P),Q.stateAfter=P.line%5==0?P.save():null,P.nextLine();if(+new Date>j)return Wa(e,e.options.workDelay),!0}),u.highlightFrontier=P.line,u.modeFrontier=Math.max(u.modeFrontier,P.line),W.length&&Bi(e,function(){for(var Q=0;Q<W.length;Q++)Yn(e,W[Q],"text")})}var ia=function(e,u,j){var P=e.display;this.viewport=u,this.visible=Pa(P,e.doc,u),this.editorIsHidden=!P.wrapper.offsetWidth,this.wrapperHeight=P.wrapper.clientHeight,this.wrapperWidth=P.wrapper.clientWidth,this.oldDisplayWidth=Ue(e),this.force=j,this.dims=Xn(e),this.events=[]};ia.prototype.signal=function(e,u){Pe(e,u)&&this.events.push(arguments)},ia.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ze.apply(null,this.events[e])};function Do(e){var u=e.display;!u.scrollbarsClipped&&u.scroller.offsetWidth&&(u.nativeBarWidth=u.scroller.offsetWidth-u.scroller.clientWidth,u.heightForcer.style.height=Je(e)+"px",u.sizer.style.marginBottom=-u.nativeBarWidth+"px",u.sizer.style.borderRightWidth=Je(e)+"px",u.scrollbarsClipped=!0)}function Lo(e){if(e.hasFocus())return null;var u=G();if(!u||!L(e.display.lineDiv,u))return null;var j={activeElt:u};if(window.getSelection){var P=window.getSelection();P.anchorNode&&P.extend&&L(e.display.lineDiv,P.anchorNode)&&(j.anchorNode=P.anchorNode,j.anchorOffset=P.anchorOffset,j.focusNode=P.focusNode,j.focusOffset=P.focusOffset)}return j}function Po(e){if(!e||!e.activeElt||e.activeElt==G())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&L(document.body,e.anchorNode)&&L(document.body,e.focusNode)){var u=window.getSelection(),j=document.createRange();j.setEnd(e.anchorNode,e.anchorOffset),j.collapse(!1),u.removeAllRanges(),u.addRange(j),u.extend(e.focusNode,e.focusOffset)}}function Aa(e,u){var j=e.display,P=e.doc;if(u.editorIsHidden)return zn(e),!1;if(!u.force&&u.visible.from>=j.viewFrom&&u.visible.to<=j.viewTo&&(j.updateLineNumbers==null||j.updateLineNumbers>=j.viewTo)&&j.renderedView==j.view&&ra(e)==0)return!1;bi(e)&&(zn(e),u.dims=Xn(e));var W=P.first+P.size,Q=Math.max(u.visible.from-e.options.viewportMargin,P.first),ae=Math.min(W,u.visible.to+e.options.viewportMargin);j.viewFrom<Q&&Q-j.viewFrom<20&&(Q=Math.max(P.first,j.viewFrom)),j.viewTo>ae&&j.viewTo-ae<20&&(ae=Math.min(W,j.viewTo)),Gn&&(Q=ar(e.doc,Q),ae=Zt(e.doc,ae));var pe=Q!=j.viewFrom||ae!=j.viewTo||j.lastWrapHeight!=u.wrapperHeight||j.lastWrapWidth!=u.wrapperWidth;Ai(e,Q,ae),j.viewOffset=cr(sr(e.doc,j.viewFrom)),e.display.mover.style.top=j.viewOffset+"px";var ve=ra(e);if(!pe&&ve==0&&!u.force&&j.renderedView==j.view&&(j.updateLineNumbers==null||j.updateLineNumbers>=j.viewTo))return!1;var we=Lo(e);return ve>4&&(j.lineDiv.style.display="none"),ko(e,j.updateLineNumbers,u.dims),ve>4&&(j.lineDiv.style.display=""),j.renderedView=j.view,Po(we),E(j.cursorDiv),E(j.selectionDiv),j.gutters.style.height=j.sizer.style.minHeight=0,pe&&(j.lastWrapHeight=u.wrapperHeight,j.lastWrapWidth=u.wrapperWidth,Wa(e,400)),j.updateLineNumbers=null,!0}function $a(e,u){for(var j=u.viewport,P=!0;;P=!1){if(!P||!e.options.lineWrapping||u.oldDisplayWidth==Ue(e)){if(j&&j.top!=null&&(j={top:Math.min(e.doc.height+ke(e.display)-_e(e),j.top)}),u.visible=Pa(e.display,e.doc,j),u.visible.from>=e.display.viewFrom&&u.visible.to<=e.display.viewTo)break}else P&&(u.visible=Pa(e.display,e.doc,j));if(!Aa(e,u))break;La(e);var W=na(e);Dn(e),or(e,W),Nn(e,W),u.force=!1}u.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(u.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function za(e,u){var j=new ia(e,u);if(Aa(e,j)){La(e),$a(e,j);var P=na(e);Dn(e),or(e,P),Nn(e,P),j.finish()}}function ko(e,u,j){var P=e.display,W=e.options.lineNumbers,Q=P.lineDiv,ae=Q.firstChild;function pe(Ct){var Ut=Ct.nextSibling;return t&&o&&e.display.currentWheelTarget==Ct?Ct.style.display="none":Ct.parentNode.removeChild(Ct),Ut}for(var ve=P.view,we=P.viewFrom,ze=0;ze<ve.length;ze++){var Ye=ve[ze];if(!Ye.hidden)if(!Ye.node||Ye.node.parentNode!=Q){var ct=Or(e,Ye,we,j);Q.insertBefore(ct,ae)}else{for(;ae!=Ye.node;)ae=pe(ae);var at=W&&u!=null&&u<=we&&Ye.lineNumber;Ye.changes&&(ue(Ye.changes,"gutter")>-1&&(at=!1),tr(e,Ye,we,j)),at&&(E(Ye.lineNumber),Ye.lineNumber.appendChild(document.createTextNode(ri(e.options,we)))),ae=Ye.node.nextSibling}we+=Ye.size}for(;ae;)ae=pe(ae)}function Ja(e){var u=e.gutters.offsetWidth;e.sizer.style.marginLeft=u+"px"}function Nn(e,u){e.display.sizer.style.minHeight=u.docHeight+"px",e.display.heightForcer.style.top=u.docHeight+"px",e.display.gutters.style.height=u.docHeight+e.display.barHeight+Je(e)+"px"}function Sn(e){var u=e.display,j=u.view;if(!u.alignWidgets&&(!u.gutters.firstChild||!e.options.fixedGutter))return;for(var P=gi(u)-u.scroller.scrollLeft+e.doc.scrollLeft,W=u.gutters.offsetWidth,Q=P+"px",ae=0;ae<j.length;ae++)if(!j[ae].hidden){e.options.fixedGutter&&(j[ae].gutter&&(j[ae].gutter.style.left=Q),j[ae].gutterBackground&&(j[ae].gutterBackground.style.left=Q));var pe=j[ae].alignable;if(pe)for(var ve=0;ve<pe.length;ve++)pe[ve].style.left=Q}e.options.fixedGutter&&(u.gutters.style.left=P+W+"px")}function bi(e){if(!e.options.lineNumbers)return!1;var u=e.doc,j=ri(e.options,u.first+u.size-1),P=e.display;if(j.length!=P.lineNumChars){var W=P.measure.appendChild(T("div",[T("div",j)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Q=W.firstChild.offsetWidth,ae=W.offsetWidth-Q;return P.lineGutter.style.width="",P.lineNumInnerWidth=Math.max(Q,P.lineGutter.offsetWidth-ae)+1,P.lineNumWidth=P.lineNumInnerWidth+ae,P.lineNumChars=P.lineNumInnerWidth?j.length:-1,P.lineGutter.style.width=P.lineNumWidth+"px",Ja(e.display),!0}return!1}function Hi(e,u){for(var j=[],P=!1,W=0;W<e.length;W++){var Q=e[W],ae=null;if(typeof Q!="string"&&(ae=Q.style,Q=Q.className),Q=="CodeMirror-linenumbers")if(u)P=!0;else continue;j.push({className:Q,style:ae})}return u&&!P&&j.push({className:"CodeMirror-linenumbers",style:null}),j}function Ma(e){var u=e.gutters,j=e.gutterSpecs;E(u),e.lineGutter=null;for(var P=0;P<j.length;++P){var W=j[P],Q=W.className,ae=W.style,pe=u.appendChild(T("div",null,"CodeMirror-gutter "+Q));ae&&(pe.style.cssText=ae),Q=="CodeMirror-linenumbers"&&(e.lineGutter=pe,pe.style.width=(e.lineNumWidth||1)+"px")}u.style.display=j.length?"":"none",Ja(e)}function ma(e){Ma(e.display),Un(e),Sn(e)}function Ka(e,u,j,P){var W=this;this.input=j,W.scrollbarFiller=T("div",null,"CodeMirror-scrollbar-filler"),W.scrollbarFiller.setAttribute("cm-not-content","true"),W.gutterFiller=T("div",null,"CodeMirror-gutter-filler"),W.gutterFiller.setAttribute("cm-not-content","true"),W.lineDiv=F("div",null,"CodeMirror-code"),W.selectionDiv=T("div",null,null,"position: relative; z-index: 1"),W.cursorDiv=T("div",null,"CodeMirror-cursors"),W.measure=T("div",null,"CodeMirror-measure"),W.lineMeasure=T("div",null,"CodeMirror-measure"),W.lineSpace=F("div",[W.measure,W.lineMeasure,W.selectionDiv,W.cursorDiv,W.lineDiv],null,"position: relative; outline: none");var Q=F("div",[W.lineSpace],"CodeMirror-lines");W.mover=T("div",[Q],null,"position: relative"),W.sizer=T("div",[W.mover],"CodeMirror-sizer"),W.sizerWidth=null,W.heightForcer=T("div",null,null,"position: absolute; height: "+de+"px; width: 1px;"),W.gutters=T("div",null,"CodeMirror-gutters"),W.lineGutter=null,W.scroller=T("div",[W.sizer,W.heightForcer,W.gutters],"CodeMirror-scroll"),W.scroller.setAttribute("tabIndex","-1"),W.wrapper=T("div",[W.scrollbarFiller,W.gutterFiller,W.scroller],"CodeMirror"),S&&_<8&&(W.gutters.style.zIndex=-1,W.scroller.style.paddingRight=0),!t&&!(C&&l)&&(W.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(W.wrapper):e(W.wrapper)),W.viewFrom=W.viewTo=u.first,W.reportedViewFrom=W.reportedViewTo=u.first,W.view=[],W.renderedView=null,W.externalMeasured=null,W.viewOffset=0,W.lastWrapHeight=W.lastWrapWidth=0,W.updateLineNumbers=null,W.nativeBarWidth=W.barHeight=W.barWidth=0,W.scrollbarsClipped=!1,W.lineNumWidth=W.lineNumInnerWidth=W.lineNumChars=null,W.alignWidgets=!1,W.cachedCharWidth=W.cachedTextHeight=W.cachedPaddingH=null,W.maxLine=null,W.maxLineLength=0,W.maxLineChanged=!1,W.wheelDX=W.wheelDY=W.wheelStartX=W.wheelStartY=null,W.shift=!1,W.selForContextMenu=null,W.activeTouch=null,W.gutterSpecs=Hi(P.gutters,P.lineNumbers),Ma(W),j.init(W)}var Ea=0,_i=null;S?_i=-.53:C?_i=15:n?_i=-.7:a&&(_i=-1/3);function Qa(e){var u=e.wheelDeltaX,j=e.wheelDeltaY;return u==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(u=e.detail),j==null&&e.detail&&e.axis==e.VERTICAL_AXIS?j=e.detail:j==null&&(j=e.wheelDelta),{x:u,y:j}}function fo(e){var u=Qa(e);return u.x*=_i,u.y*=_i,u}function po(e,u){var j=Qa(u),P=j.x,W=j.y,Q=e.display,ae=Q.scroller,pe=ae.scrollWidth>ae.clientWidth,ve=ae.scrollHeight>ae.clientHeight;if(!(P&&pe||W&&ve))return;if(W&&o&&t){e:for(var we=u.target,ze=Q.view;we!=ae;we=we.parentNode)for(var Ye=0;Ye<ze.length;Ye++)if(ze[Ye].node==we){e.display.currentWheelTarget=we;break e}}if(P&&!C&&!c&&_i!=null){W&&ve&&da(e,Math.max(0,ae.scrollTop+W*_i)),Yi(e,Math.max(0,ae.scrollLeft+P*_i)),(!W||W&&ve)&&xe(u),Q.wheelStartX=null;return}if(W&&_i!=null){var ct=W*_i,at=e.doc.scrollTop,Ct=at+Q.wrapper.clientHeight;ct<0?at=Math.max(0,at+ct-50):Ct=Math.min(e.doc.height,Ct+ct+50),za(e,{top:at,bottom:Ct})}Ea<20&&(Q.wheelStartX==null?(Q.wheelStartX=ae.scrollLeft,Q.wheelStartY=ae.scrollTop,Q.wheelDX=P,Q.wheelDY=W,setTimeout(function(){if(Q.wheelStartX==null)return;var Ut=ae.scrollLeft-Q.wheelStartX,Jt=ae.scrollTop-Q.wheelStartY,nr=Jt&&Q.wheelDY&&Jt/Q.wheelDY||Ut&&Q.wheelDX&&Ut/Q.wheelDX;if(Q.wheelStartX=Q.wheelStartY=null,!nr)return;_i=(_i*Ea+nr)/(Ea+1),++Ea},200)):(Q.wheelDX+=P,Q.wheelDY+=W))}var Wi=function(e,u){this.ranges=e,this.primIndex=u};Wi.prototype.primary=function(){return this.ranges[this.primIndex]},Wi.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var u=0;u<this.ranges.length;u++){var j=this.ranges[u],P=e.ranges[u];if(!mi(j.anchor,P.anchor)||!mi(j.head,P.head))return!1}return!0},Wi.prototype.deepCopy=function(){for(var e=[],u=0;u<this.ranges.length;u++)e[u]=new Ln(xi(this.ranges[u].anchor),xi(this.ranges[u].head));return new Wi(e,this.primIndex)},Wi.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Wi.prototype.contains=function(e,u){u||(u=e);for(var j=0;j<this.ranges.length;j++){var P=this.ranges[j];if(_r(u,P.from())>=0&&_r(e,P.to())<=0)return j}return-1};var Ln=function(e,u){this.anchor=e,this.head=u};Ln.prototype.from=function(){return wi(this.anchor,this.head)},Ln.prototype.to=function(){return Di(this.anchor,this.head)},Ln.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function aa(e,u,j){var P=e&&e.options.selectionsMayTouch,W=u[j];u.sort(function(ct,at){return _r(ct.from(),at.from())}),j=ue(u,W);for(var Q=1;Q<u.length;Q++){var ae=u[Q],pe=u[Q-1],ve=_r(pe.to(),ae.from());if(P&&!ae.empty()?ve>0:ve>=0){var we=wi(pe.from(),ae.from()),ze=Di(pe.to(),ae.to()),Ye=pe.empty()?ae.from()==ae.head:pe.from()==pe.head;Q<=j&&--j,u.splice(--Q,2,new Ln(Ye?ze:we,Ye?we:ze))}}return new Wi(u,j)}function ga(e,u){return new Wi([new Ln(e,u||e)],0)}function va(e){return e.text?Nt(e.from.line+e.text.length-1,ne(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function mo(e,u){if(_r(e,u.from)<0)return e;if(_r(e,u.to)<=0)return va(u);var j=e.line+u.text.length-(u.to.line-u.from.line)-1,P=e.ch;return e.line==u.to.line&&(P+=va(u).ch-u.to.ch),Nt(j,P)}function Za(e,u){for(var j=[],P=0;P<e.sel.ranges.length;P++){var W=e.sel.ranges[P];j.push(new Ln(mo(W.anchor,u),mo(W.head,u)))}return aa(e.cm,j,e.sel.primIndex)}function Mo(e,u,j){return e.line==u.line?Nt(j.line,e.ch-u.ch+j.ch):Nt(j.line+(e.line-u.line),e.ch)}function No(e,u,j){for(var P=[],W=Nt(e.first,0),Q=W,ae=0;ae<u.length;ae++){var pe=u[ae],ve=Mo(pe.from,W,Q),we=Mo(va(pe),W,Q);if(W=pe.to,Q=we,j=="around"){var ze=e.sel.ranges[ae],Ye=_r(ze.head,ze.anchor)<0;P[ae]=new Ln(Ye?we:ve,Ye?ve:we)}else P[ae]=new Ln(ve,ve)}return new Wi(P,e.sel.primIndex)}function Ra(e){e.doc.mode=En(e.options,e.doc.modeOption),go(e)}function go(e){e.doc.iter(function(u){u.stateAfter&&(u.stateAfter=null),u.styles&&(u.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Wa(e,100),e.state.modeGen++,e.curOp&&Un(e)}function gs(e,u){return u.from.ch==0&&u.to.ch==0&&ne(u.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ts(e,u,j,P){function W(vr){return j?j[vr]:null}function Q(vr,ir,Cr){xr(vr,ir,Cr,P),Qt(vr,"change",vr,u)}function ae(vr,ir){for(var Cr=[],Zr=vr;Zr<ir;++Zr)Cr.push(new jr(we[Zr],W(Zr),P));return Cr}var pe=u.from,ve=u.to,we=u.text,ze=sr(e,pe.line),Ye=sr(e,ve.line),ct=ne(we),at=W(we.length-1),Ct=ve.line-pe.line;if(u.full)e.insert(0,ae(0,we.length)),e.remove(we.length,e.size-we.length);else if(gs(e,u)){var Ut=ae(0,we.length-1);Q(Ye,Ye.text,at),Ct&&e.remove(pe.line,Ct),Ut.length&&e.insert(pe.line,Ut)}else if(ze==Ye)if(we.length==1)Q(ze,ze.text.slice(0,pe.ch)+ct+ze.text.slice(ve.ch),at);else{var Jt=ae(1,we.length-1);Jt.push(new jr(ct+ze.text.slice(ve.ch),at,P)),Q(ze,ze.text.slice(0,pe.ch)+we[0],W(0)),e.insert(pe.line+1,Jt)}else if(we.length==1)Q(ze,ze.text.slice(0,pe.ch)+we[0]+Ye.text.slice(ve.ch),W(0)),e.remove(pe.line+1,Ct);else{Q(ze,ze.text.slice(0,pe.ch)+we[0],W(0)),Q(Ye,ct+Ye.text.slice(ve.ch),at);var nr=ae(1,we.length-1);Ct>1&&e.remove(pe.line+1,Ct-1),e.insert(pe.line+1,nr)}Qt(e,"change",e,u)}function Na(e,u,j){function P(W,Q,ae){if(W.linked)for(var pe=0;pe<W.linked.length;++pe){var ve=W.linked[pe];if(ve.doc==Q)continue;var we=ae&&ve.sharedHist;if(j&&!we)continue;u(ve.doc,we),P(ve.doc,W,we)}}P(e,null,!0)}function vs(e,u){if(u.cm)throw new Error("This document is already in use.");e.doc=u,u.cm=e,Si(e),Ra(e),ys(e),e.options.lineWrapping||Rr(e),e.options.mode=u.modeOption,Un(e)}function ys(e){(e.doc.direction=="rtl"?z:b)(e.display.lineDiv,"CodeMirror-rtl")}function pl(e){Bi(e,function(){ys(e),Un(e)})}function jo(e){this.done=[],this.undone=[],this.undoDepth=Infinity,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function rs(e,u){var j={from:xi(u.from),to:va(u),text:Jn(e,u.from,u.to)};return Es(e,j,u.from.line,u.to.line+1),Na(e,function(P){return Es(P,j,u.from.line,u.to.line+1)},!0),j}function bs(e){for(;e.length;){var u=ne(e);if(u.ranges)e.pop();else break}}function ml(e,u){if(u)return bs(e.done),ne(e.done);if(e.done.length&&!ne(e.done).ranges)return ne(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),ne(e.done)}function _s(e,u,j,P){var W=e.history;W.undone.length=0;var Q=+new Date,ae,pe;if((W.lastOp==P||W.lastOrigin==u.origin&&u.origin&&(u.origin.charAt(0)=="+"&&W.lastModTime>Q-(e.cm?e.cm.options.historyEventDelay:500)||u.origin.charAt(0)=="*"))&&(ae=ml(W,W.lastOp==P)))pe=ne(ae.changes),_r(u.from,u.to)==0&&_r(u.from,pe.to)==0?pe.to=va(u):ae.changes.push(rs(e,u));else{var ve=ne(W.done);for((!ve||!ve.ranges)&&Fo(e.sel,W.done),ae={changes:[rs(e,u)],generation:W.generation},W.done.push(ae);W.done.length>W.undoDepth;)W.done.shift(),W.done[0].ranges||W.done.shift()}W.done.push(j),W.generation=++W.maxGeneration,W.lastModTime=W.lastSelTime=Q,W.lastOp=W.lastSelOp=P,W.lastOrigin=W.lastSelOrigin=u.origin,pe||Ze(e,"historyAdded")}function gl(e,u,j,P){var W=u.charAt(0);return W=="*"||W=="+"&&j.ranges.length==P.ranges.length&&j.somethingSelected()==P.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function vl(e,u,j,P){var W=e.history,Q=P&&P.origin;j==W.lastSelOp||Q&&W.lastSelOrigin==Q&&(W.lastModTime==W.lastSelTime&&W.lastOrigin==Q||gl(e,Q,ne(W.done),u))?W.done[W.done.length-1]=u:Fo(u,W.done),W.lastSelTime=+new Date,W.lastSelOrigin=Q,W.lastSelOp=j,P&&P.clearRedo!==!1&&bs(W.undone)}function Fo(e,u){var j=ne(u);j&&j.ranges&&j.equals(e)||u.push(e)}function Es(e,u,j,P){var W=u["spans_"+e.id],Q=0;e.iter(Math.max(e.first,j),Math.min(e.first+e.size,P),function(ae){ae.markedSpans&&((W||(W=u["spans_"+e.id]={}))[Q]=ae.markedSpans),++Q})}function yl(e){if(!e)return null;for(var u,j=0;j<e.length;++j)e[j].marker.explicitlyCleared?u||(u=e.slice(0,j)):u&&u.push(e[j]);return u?u.length?u:null:e}function bl(e,u){var j=u["spans_"+e.id];if(!j)return null;for(var P=[],W=0;W<u.text.length;++W)P.push(yl(j[W]));return P}function xs(e,u){var j=bl(e,u),P=Pi(e,u);if(!j)return P;if(!P)return j;for(var W=0;W<j.length;++W){var Q=j[W],ae=P[W];if(Q&&ae){e:for(var pe=0;pe<ae.length;++pe){for(var ve=ae[pe],we=0;we<Q.length;++we)if(Q[we].marker==ve.marker)continue e;Q.push(ve)}}else ae&&(j[W]=ae)}return j}function qa(e,u,j){for(var P=[],W=0;W<e.length;++W){var Q=e[W];if(Q.ranges){P.push(j?Wi.prototype.deepCopy.call(Q):Q);continue}var ae=Q.changes,pe=[];P.push({changes:pe});for(var ve=0;ve<ae.length;++ve){var we=ae[ve],ze=void 0;if(pe.push({from:we.from,to:we.to,text:we.text}),u)for(var Ye in we)(ze=Ye.match(/^spans_(\d+)$/))&&(ue(u,Number(ze[1]))>-1&&(ne(pe)[Ye]=we[Ye],delete we[Ye]))}}return P}function ns(e,u,j,P){if(P){var W=e.anchor;if(j){var Q=_r(u,W)<0;Q!=_r(j,W)<0?(W=u,u=j):Q!=_r(u,j)<0&&(u=j)}return new Ln(W,u)}else return new Ln(j||u,u)}function Uo(e,u,j,P,W){W==null&&(W=e.cm&&(e.cm.display.shift||e.extend)),ki(e,new Wi([ns(e.sel.primary(),u,j,W)],0),P)}function ws(e,u,j){for(var P=[],W=e.cm&&(e.cm.display.shift||e.extend),Q=0;Q<e.sel.ranges.length;Q++)P[Q]=ns(e.sel.ranges[Q],u[Q],null,W);var ae=aa(e.cm,P,e.sel.primIndex);ki(e,ae,j)}function is(e,u,j,P){var W=e.sel.ranges.slice(0);W[u]=j,ki(e,aa(e.cm,W,e.sel.primIndex),P)}function Ts(e,u,j,P){ki(e,ga(u,j),P)}function _l(e,u,j){var P={ranges:u.ranges,update:function(W){this.ranges=[];for(var Q=0;Q<W.length;Q++)this.ranges[Q]=new Ln(V(e,W[Q].anchor),V(e,W[Q].head))},origin:j&&j.origin};return Ze(e,"beforeSelectionChange",e,P),e.cm&&Ze(e.cm,"beforeSelectionChange",e.cm,P),P.ranges!=u.ranges?aa(e.cm,P.ranges,P.ranges.length-1):u}function Ss(e,u,j){var P=e.history.done,W=ne(P);W&&W.ranges?(P[P.length-1]=u,Bo(e,u,j)):ki(e,u,j)}function ki(e,u,j){Bo(e,u,j),vl(e,e.sel,e.cm?e.cm.curOp.id:NaN,j)}function Bo(e,u,j){(Pe(e,"beforeSelectionChange")||e.cm&&Pe(e.cm,"beforeSelectionChange"))&&(u=_l(e,u,j));var P=j&&j.bias||(_r(u.primary().head,e.sel.primary().head)<0?-1:1);Cs(e,As(e,u,P,!0)),!(j&&j.scroll===!1)&&e.cm&&ba(e.cm)}function Cs(e,u){if(u.equals(e.sel))return;e.sel=u,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Be(e.cm)),Qt(e,"cursorActivity",e)}function Os(e){Cs(e,As(e,e.sel,null,!1))}function As(e,u,j,P){for(var W,Q=0;Q<u.ranges.length;Q++){var ae=u.ranges[Q],pe=u.ranges.length==e.sel.ranges.length&&e.sel.ranges[Q],ve=Ho(e,ae.anchor,pe&&pe.anchor,j,P),we=Ho(e,ae.head,pe&&pe.head,j,P);(W||ve!=ae.anchor||we!=ae.head)&&(W||(W=u.ranges.slice(0,Q)),W[Q]=new Ln(ve,we))}return W?aa(e.cm,W,u.primIndex):u}function eo(e,u,j,P,W){var Q=sr(e,u.line);if(Q.markedSpans)for(var ae=0;ae<Q.markedSpans.length;++ae){var pe=Q.markedSpans[ae],ve=pe.marker,we="selectLeft"in ve?!ve.selectLeft:ve.inclusiveLeft,ze="selectRight"in ve?!ve.selectRight:ve.inclusiveRight;if((pe.from==null||(we?pe.from<=u.ch:pe.from<u.ch))&&(pe.to==null||(ze?pe.to>=u.ch:pe.to>u.ch))){if(W&&(Ze(ve,"beforeCursorEnter"),ve.explicitlyCleared))if(Q.markedSpans){--ae;continue}else break;if(!ve.atomic)continue;if(j){var Ye=ve.find(P<0?1:-1),ct=void 0;if((P<0?ze:we)&&(Ye=Rs(e,Ye,-P,Ye&&Ye.line==u.line?Q:null)),Ye&&Ye.line==u.line&&(ct=_r(Ye,j))&&(P<0?ct<0:ct>0))return eo(e,Ye,u,P,W)}var at=ve.find(P<0?-1:1);return(P<0?we:ze)&&(at=Rs(e,at,P,at.line==u.line?Q:null)),at?eo(e,at,u,P,W):null}}return u}function Ho(e,u,j,P,W){var Q=P||1,ae=eo(e,u,j,Q,W)||!W&&eo(e,u,j,Q,!0)||eo(e,u,j,-Q,W)||!W&&eo(e,u,j,-Q,!0);return ae||(e.cantEdit=!0,Nt(e.first,0))}function Rs(e,u,j,P){return j<0&&u.ch==0?u.line>e.first?V(e,Nt(u.line-1)):null:j>0&&u.ch==(P||sr(e,u.line)).text.length?u.line<e.first+e.size-1?Nt(u.line+1,0):null:new Nt(u.line,u.ch+j)}function Is(e){e.setSelection(Nt(e.firstLine(),0),Nt(e.lastLine()),Re)}function Ds(e,u,j){var P={canceled:!1,from:u.from,to:u.to,text:u.text,origin:u.origin,cancel:function(){return P.canceled=!0}};return j&&(P.update=function(W,Q,ae,pe){W&&(P.from=V(e,W)),Q&&(P.to=V(e,Q)),ae&&(P.text=ae),pe!==void 0&&(P.origin=pe)}),Ze(e,"beforeChange",e,P),e.cm&&Ze(e.cm,"beforeChange",e.cm,P),P.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:P.from,to:P.to,text:P.text,origin:P.origin}}function to(e,u,j){if(e.cm){if(!e.cm.curOp)return hi(e.cm,to)(e,u,j);if(e.cm.state.suppressEdits)return}if((Pe(e,"beforeChange")||e.cm&&Pe(e.cm,"beforeChange"))&&(u=Ds(e,u,!0),!u))return;var P=Ki&&!j&&ji(e,u.from,u.to);if(P)for(var W=P.length-1;W>=0;--W)Ls(e,{from:P[W].from,to:P[W].to,text:W?[""]:u.text,origin:u.origin});else Ls(e,u)}function Ls(e,u){if(u.text.length==1&&u.text[0]==""&&_r(u.from,u.to)==0)return;var j=Za(e,u);_s(e,u,j,e.cm?e.cm.curOp.id:NaN),vo(e,u,j,Pi(e,u));var P=[];Na(e,function(W,Q){!Q&&ue(P,W.history)==-1&&(Ns(W.history,u),P.push(W.history)),vo(W,u,null,Pi(W,u))})}function Wo(e,u,j){var P=e.cm&&e.cm.state.suppressEdits;if(P&&!j)return;for(var W=e.history,Q,ae=e.sel,pe=u=="undo"?W.done:W.undone,ve=u=="undo"?W.undone:W.done,we=0;we<pe.length&&!(Q=pe[we],j?Q.ranges&&!Q.equals(e.sel):!Q.ranges);we++);if(we==pe.length)return;for(W.lastOrigin=W.lastSelOrigin=null;;)if(Q=pe.pop(),Q.ranges){if(Fo(Q,ve),j&&!Q.equals(e.sel)){ki(e,Q,{clearRedo:!1});return}ae=Q}else if(P){pe.push(Q);return}else break;var ze=[];Fo(ae,ve),ve.push({changes:ze,generation:W.generation}),W.generation=Q.generation||++W.maxGeneration;for(var Ye=Pe(e,"beforeChange")||e.cm&&Pe(e.cm,"beforeChange"),ct=function(Ut){var Jt=Q.changes[Ut];if(Jt.origin=u,Ye&&!Ds(e,Jt,!1))return pe.length=0,{};ze.push(rs(e,Jt));var nr=Ut?Za(e,Jt):ne(pe);vo(e,Jt,nr,xs(e,Jt)),!Ut&&e.cm&&e.cm.scrollIntoView({from:Jt.from,to:va(Jt)});var vr=[];Na(e,function(ir,Cr){!Cr&&ue(vr,ir.history)==-1&&(Ns(ir.history,Jt),vr.push(ir.history)),vo(ir,Jt,null,xs(ir,Jt))})},at=Q.changes.length-1;at>=0;--at){var Ct=ct(at);if(Ct)return Ct.v}}function Ps(e,u){if(u==0)return;if(e.first+=u,e.sel=new Wi(ge(e.sel.ranges,function(W){return new Ln(Nt(W.anchor.line+u,W.anchor.ch),Nt(W.head.line+u,W.head.ch))}),e.sel.primIndex),e.cm){Un(e.cm,e.first,e.first-u,u);for(var j=e.cm.display,P=j.viewFrom;P<j.viewTo;P++)Yn(e.cm,P,"gutter")}}function vo(e,u,j,P){if(e.cm&&!e.cm.curOp)return hi(e.cm,vo)(e,u,j,P);if(u.to.line<e.first){Ps(e,u.text.length-1-(u.to.line-u.from.line));return}if(u.from.line>e.lastLine())return;if(u.from.line<e.first){var W=u.text.length-1-(e.first-u.from.line);Ps(e,W),u={from:Nt(e.first,0),to:Nt(u.to.line+W,u.to.ch),text:[ne(u.text)],origin:u.origin}}var Q=e.lastLine();u.to.line>Q&&(u={from:u.from,to:Nt(Q,sr(e,Q).text.length),text:[u.text[0]],origin:u.origin}),u.removed=Jn(e,u.from,u.to),j||(j=Za(e,u)),e.cm?El(e.cm,u,P):ts(e,u,P),Bo(e,j,Re),e.cantEdit&&Ho(e,Nt(e.firstLine(),0))&&(e.cantEdit=!1)}function El(e,u,j){var P=e.doc,W=e.display,Q=u.from,ae=u.to,pe=!1,ve=Q.line;e.options.lineWrapping||(ve=Jr(St(sr(P,Q.line))),P.iter(ve,ae.line+1,function(at){if(at==W.maxLine)return pe=!0,!0})),P.sel.contains(u.from,u.to)>-1&&Be(e),ts(P,u,j,Xi(e)),e.options.lineWrapping||(P.iter(ve,Q.line+u.text.length,function(at){var Ct=lt(at);Ct>W.maxLineLength&&(W.maxLine=at,W.maxLineLength=Ct,W.maxLineChanged=!0,pe=!1)}),pe&&(e.curOp.updateMaxLine=!0)),Ni(P,Q.line),Wa(e,400);var we=u.text.length-(ae.line-Q.line)-1;u.full?Un(e):Q.line==ae.line&&u.text.length==1&&!gs(e.doc,u)?Yn(e,Q.line,"text"):Un(e,Q.line,ae.line+1,we);var ze=Pe(e,"changes"),Ye=Pe(e,"change");if(Ye||ze){var ct={from:Q,to:ae,text:u.text,removed:u.removed,origin:u.origin};Ye&&Qt(e,"change",e,ct),ze&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(ct)}e.display.selForContextMenu=null}function ro(e,u,j,P,W){var Q;P||(P=j),_r(P,j)<0&&(Q=[P,j],j=Q[0],P=Q[1]),typeof u=="string"&&(u=e.splitLines(u)),to(e,{from:j,to:P,text:u,origin:W})}function ks(e,u,j,P){j<e.line?e.line+=P:u<e.line&&(e.line=u,e.ch=0)}function Ms(e,u,j,P){for(var W=0;W<e.length;++W){var Q=e[W],ae=!0;if(Q.ranges){Q.copied||(Q=e[W]=Q.deepCopy(),Q.copied=!0);for(var pe=0;pe<Q.ranges.length;pe++)ks(Q.ranges[pe].anchor,u,j,P),ks(Q.ranges[pe].head,u,j,P);continue}for(var ve=0;ve<Q.changes.length;++ve){var we=Q.changes[ve];if(j<we.from.line)we.from=Nt(we.from.line+P,we.from.ch),we.to=Nt(we.to.line+P,we.to.ch);else if(u<=we.to.line){ae=!1;break}}ae||(e.splice(0,W+1),W=0)}}function Ns(e,u){var j=u.from.line,P=u.to.line,W=u.text.length-(P-j)-1;Ms(e.done,j,P,W),Ms(e.undone,j,P,W)}function yo(e,u,j,P){var W=u,Q=u;return typeof u=="number"?Q=sr(e,le(e,u)):W=Jr(u),W==null?null:(P(Q,W)&&e.cm&&Yn(e.cm,W,j),Q)}function bo(e){this.lines=e,this.parent=null;for(var u=0,j=0;j<e.length;++j)e[j].parent=this,u+=e[j].height;this.height=u}bo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,u){for(var j=e,P=e+u;j<P;++j){var W=this.lines[j];this.height-=W.height,_t(W),Qt(W,"delete")}this.lines.splice(e,u)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,u,j){this.height+=j,this.lines=this.lines.slice(0,e).concat(u).concat(this.lines.slice(e));for(var P=0;P<u.length;++P)u[P].parent=this},iterN:function(e,u,j){for(var P=e+u;e<P;++e)if(j(this.lines[e]))return!0}};function _o(e){this.children=e;for(var u=0,j=0,P=0;P<e.length;++P){var W=e[P];u+=W.chunkSize(),j+=W.height,W.parent=this}this.size=u,this.height=j,this.parent=null}_o.prototype={chunkSize:function(){return this.size},removeInner:function(e,u){this.size-=u;for(var j=0;j<this.children.length;++j){var P=this.children[j],W=P.chunkSize();if(e<W){var Q=Math.min(u,W-e),ae=P.height;if(P.removeInner(e,Q),this.height-=ae-P.height,W==Q&&(this.children.splice(j--,1),P.parent=null),(u-=Q)==0)break;e=0}else e-=W}if(this.size-u<25&&(this.children.length>1||!(this.children[0]instanceof bo))){var pe=[];this.collapse(pe),this.children=[new bo(pe)],this.children[0].parent=this}},collapse:function(e){for(var u=0;u<this.children.length;++u)this.children[u].collapse(e)},insertInner:function(e,u,j){this.size+=u.length,this.height+=j;for(var P=0;P<this.children.length;++P){var W=this.children[P],Q=W.chunkSize();if(e<=Q){if(W.insertInner(e,u,j),W.lines&&W.lines.length>50){for(var ae=W.lines.length%25+25,pe=ae;pe<W.lines.length;){var ve=new bo(W.lines.slice(pe,pe+=25));W.height-=ve.height,this.children.splice(++P,0,ve),ve.parent=this}W.lines=W.lines.slice(0,ae),this.maybeSpill()}break}e-=Q}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var u=e.children.splice(e.children.length-5,5),j=new _o(u);if(e.parent){e.size-=j.size,e.height-=j.height;var W=ue(e.parent.children,e);e.parent.children.splice(W+1,0,j)}else{var P=new _o(e.children);P.parent=e,e.children=[P,j],e=P}j.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,u,j){for(var P=0;P<this.children.length;++P){var W=this.children[P],Q=W.chunkSize();if(e<Q){var ae=Math.min(u,Q-e);if(W.iterN(e,ae,j))return!0;if((u-=ae)==0)break;e=0}else e-=Q}}};var Eo=function(e,u,j){if(j)for(var P in j)j.hasOwnProperty(P)&&(this[P]=j[P]);this.doc=e,this.node=u};Eo.prototype.clear=function(){var e=this.doc.cm,u=this.line.widgets,j=this.line,P=Jr(j);if(P==null||!u)return;for(var W=0;W<u.length;++W)u[W]==this&&u.splice(W--,1);u.length||(j.widgets=null);var Q=Xr(this);On(j,Math.max(0,j.height-Q)),e&&(Bi(e,function(){js(e,j,-Q),Yn(e,P,"widget")}),Qt(e,"lineWidgetCleared",e,this,P))},Eo.prototype.changed=function(){var e=this,u=this.height,j=this.doc.cm,P=this.line;this.height=null;var W=Xr(this)-u;if(!W)return;$t(this.doc,P)||On(P,P.height+W),j&&Bi(j,function(){j.curOp.forceUpdate=!0,js(j,P,W),Qt(j,"lineWidgetChanged",j,e,Jr(P))})},Ne(Eo);function js(e,u,j){cr(u)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Sa(e,j)}function xl(e,u,j,P){var W=new Eo(e,j,P),Q=e.cm;return Q&&W.noHScroll&&(Q.display.alignWidgets=!0),yo(e,u,"widget",function(ae){var pe=ae.widgets||(ae.widgets=[]);if(W.insertAt==null?pe.push(W):pe.splice(Math.min(pe.length-1,Math.max(0,W.insertAt)),0,W),W.line=ae,Q&&!$t(e,ae)){var ve=cr(ae)<e.scrollTop;On(ae,ae.height+Xr(W)),ve&&Sa(Q,W.height),Q.curOp.forceUpdate=!0}return!0}),Q&&Qt(Q,"lineWidgetAdded",Q,W,typeof u=="number"?u:Jr(u)),W}var Fs=0,ja=function(e,u){this.lines=[],this.type=u,this.doc=e,this.id=++Fs};ja.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,u=e&&!e.curOp;if(u&&Hn(e),Pe(this,"clear")){var j=this.find();j&&Qt(this,"clear",j.from,j.to)}for(var P=null,W=null,Q=0;Q<this.lines.length;++Q){var ae=this.lines[Q],pe=li(ae.markedSpans,this);e&&!this.collapsed?Yn(e,Jr(ae),"text"):e&&(pe.to!=null&&(W=Jr(ae)),pe.from!=null&&(P=Jr(ae))),ae.markedSpans=ea(ae.markedSpans,pe),pe.from==null&&this.collapsed&&!$t(this.doc,ae)&&e&&On(ae,ei(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var ve=0;ve<this.lines.length;++ve){var we=St(this.lines[ve]),ze=lt(we);ze>e.display.maxLineLength&&(e.display.maxLine=we,e.display.maxLineLength=ze,e.display.maxLineChanged=!0)}P!=null&&e&&this.collapsed&&Un(e,P,W+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Os(e.doc)),e&&Qt(e,"markerCleared",e,this,P,W),u&&Oa(e),this.parent&&this.parent.clear()},ja.prototype.find=function(e,u){e==null&&this.type=="bookmark"&&(e=1);for(var j,P,W=0;W<this.lines.length;++W){var Q=this.lines[W],ae=li(Q.markedSpans,this);if(ae.from!=null&&(j=Nt(u?Q:Jr(Q),ae.from),e==-1))return j;if(ae.to!=null&&(P=Nt(u?Q:Jr(Q),ae.to),e==1))return P}return j&&{from:j,to:P}},ja.prototype.changed=function(){var e=this,u=this.find(-1,!0),j=this,P=this.doc.cm;if(!u||!P)return;Bi(P,function(){var W=u.line,Q=Jr(u.line),ae=$e(P,Q);if(ae&&(Qr(ae),P.curOp.selectionChanged=P.curOp.forceUpdate=!0),P.curOp.updateMaxLine=!0,!$t(j.doc,W)&&j.height!=null){var pe=j.height;j.height=null;var ve=Xr(j)-pe;ve&&On(W,W.height+ve)}Qt(P,"markerChanged",P,e)})},ja.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var u=this.doc.cm.curOp;(!u.maybeHiddenMarkers||ue(u.maybeHiddenMarkers,this)==-1)&&(u.maybeUnhiddenMarkers||(u.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ja.prototype.detachLine=function(e){if(this.lines.splice(ue(this.lines,e),1),!this.lines.length&&this.doc.cm){var u=this.doc.cm.curOp;(u.maybeHiddenMarkers||(u.maybeHiddenMarkers=[])).push(this)}},Ne(ja);function no(e,u,j,P,W){if(P&&P.shared)return wl(e,u,j,P,W);if(e.cm&&!e.cm.curOp)return hi(e.cm,no)(e,u,j,P,W);var Q=new ja(e,W),ae=_r(u,j);if(P&&I(P,Q,!1),ae>0||ae==0&&Q.clearWhenEmpty!==!1)return Q;if(Q.replacedWith&&(Q.collapsed=!0,Q.widgetNode=F("span",[Q.replacedWith],"CodeMirror-widget"),P.handleMouseEvents||Q.widgetNode.setAttribute("cm-ignore-events","true"),P.insertLeft&&(Q.widgetNode.insertLeft=!0)),Q.collapsed){if(ht(e,u.line,u,j,Q)||u.line!=j.line&&ht(e,j.line,u,j,Q))throw new Error("Inserting collapsed marker partially overlapping an existing one");Gi()}Q.addToHistory&&_s(e,{from:u,to:j,origin:"markText"},e.sel,NaN);var pe=u.line,ve=e.cm,we;if(e.iter(pe,j.line+1,function(Ye){ve&&Q.collapsed&&!ve.options.lineWrapping&&St(Ye)==ve.display.maxLine&&(we=!0),Q.collapsed&&pe!=u.line&&On(Ye,0),Vi(Ye,new Li(Q,pe==u.line?u.ch:null,pe==j.line?j.ch:null)),++pe}),Q.collapsed&&e.iter(u.line,j.line+1,function(Ye){$t(e,Ye)&&On(Ye,0)}),Q.clearOnEnter&&Ie(Q,"beforeCursorEnter",function(){return Q.clear()}),Q.readOnly&&(Ti(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),Q.collapsed&&(Q.id=++Fs,Q.atomic=!0),ve){if(we&&(ve.curOp.updateMaxLine=!0),Q.collapsed)Un(ve,u.line,j.line+1);else if(Q.className||Q.startStyle||Q.endStyle||Q.css||Q.attributes||Q.title)for(var ze=u.line;ze<=j.line;ze++)Yn(ve,ze,"text");Q.atomic&&Os(ve.doc),Qt(ve,"markerAdded",ve,Q)}return Q}var xo=function(e,u){this.markers=e,this.primary=u;for(var j=0;j<e.length;++j)e[j].parent=this};xo.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Qt(this,"clear")},xo.prototype.find=function(e,u){return this.primary.find(e,u)},Ne(xo);function wl(e,u,j,P,W){P=I(P),P.shared=!1;var Q=[no(e,u,j,P,W)],ae=Q[0],pe=P.widgetNode;return Na(e,function(ve){pe&&(P.widgetNode=pe.cloneNode(!0)),Q.push(no(ve,V(ve,u),V(ve,j),P,W));for(var we=0;we<ve.linked.length;++we)if(ve.linked[we].isParent)return;ae=ne(Q)}),new xo(Q,ae)}function Us(e){return e.findMarks(Nt(e.first,0),e.clipPos(Nt(e.lastLine())),function(u){return u.parent})}function Tl(e,u){for(var j=0;j<u.length;j++){var P=u[j],W=P.find(),Q=e.clipPos(W.from),ae=e.clipPos(W.to);if(_r(Q,ae)){var pe=no(e,Q,ae,P.primary,P.primary.type);P.markers.push(pe),pe.parent=P}}}function Sl(e){for(var u=function(P){var W=e[P],Q=[W.primary.doc];Na(W.primary.doc,function(ve){return Q.push(ve)});for(var ae=0;ae<W.markers.length;ae++){var pe=W.markers[ae];ue(Q,pe.doc)==-1&&(pe.parent=null,W.markers.splice(ae--,1))}},j=0;j<e.length;j++)u(j)}var Cl=0,$i=function(e,u,j,P,W){if(!(this instanceof $i))return new $i(e,u,j,P,W);j==null&&(j=0),_o.call(this,[new bo([new jr("",null)])]),this.first=j,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=j;var Q=Nt(j,0);this.sel=ga(Q),this.history=new jo(null),this.id=++Cl,this.modeOption=u,this.lineSep=P,this.direction=W=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),ts(this,{from:Q,to:Q,text:e}),ki(this,ga(Q),Re)};$i.prototype=Te(_o.prototype,{constructor:$i,iter:function(e,u,j){j?this.iterN(e-this.first,u-e,j):this.iterN(this.first,this.first+this.size,e)},insert:function(e,u){for(var j=0,P=0;P<u.length;++P)j+=u[P].height;this.insertInner(e-this.first,u,j)},remove:function(e,u){this.removeInner(e-this.first,u)},getValue:function(e){var u=Tn(this,this.first,this.first+this.size);return e===!1?u:u.join(e||this.lineSeparator())},setValue:fi(function(e){var u=Nt(this.first,0),j=this.first+this.size-1;to(this,{from:u,to:Nt(j,sr(this,j).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&ca(this.cm,0,0),ki(this,ga(u),Re)}),replaceRange:function(e,u,j,P){u=V(this,u),j=j?V(this,j):u,ro(this,e,u,j,P)},getRange:function(e,u,j){var P=Jn(this,V(this,e),V(this,u));return j===!1?P:P.join(j||this.lineSeparator())},getLine:function(e){var u=this.getLineHandle(e);return u&&u.text},getLineHandle:function(e){if(Zn(this,e))return sr(this,e)},getLineNumber:function(e){return Jr(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=sr(this,e)),St(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return V(this,e)},getCursor:function(e){var u=this.sel.primary(),j;return e==null||e=="head"?j=u.head:e=="anchor"?j=u.anchor:e=="end"||e=="to"||e===!1?j=u.to():j=u.from(),j},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:fi(function(e,u,j){Ts(this,V(this,typeof e=="number"?Nt(e,u||0):e),null,j)}),setSelection:fi(function(e,u,j){Ts(this,V(this,e),V(this,u||e),j)}),extendSelection:fi(function(e,u,j){Uo(this,V(this,e),u&&V(this,u),j)}),extendSelections:fi(function(e,u){ws(this,te(this,e),u)}),extendSelectionsBy:fi(function(e,u){var j=ge(this.sel.ranges,e);ws(this,te(this,j),u)}),setSelections:fi(function(e,u,j){if(!e.length)return;for(var P=[],W=0;W<e.length;W++)P[W]=new Ln(V(this,e[W].anchor),V(this,e[W].head));u==null&&(u=Math.min(e.length-1,this.sel.primIndex)),ki(this,aa(this.cm,P,u),j)}),addSelection:fi(function(e,u,j){var P=this.sel.ranges.slice(0);P.push(new Ln(V(this,e),V(this,u||e))),ki(this,aa(this.cm,P,P.length-1),j)}),getSelection:function(e){for(var u=this.sel.ranges,j,P=0;P<u.length;P++){var W=Jn(this,u[P].from(),u[P].to());j=j?j.concat(W):W}return e===!1?j:j.join(e||this.lineSeparator())},getSelections:function(e){for(var u=[],j=this.sel.ranges,P=0;P<j.length;P++){var W=Jn(this,j[P].from(),j[P].to());e!==!1&&(W=W.join(e||this.lineSeparator())),u[P]=W}return u},replaceSelection:function(e,u,j){for(var P=[],W=0;W<this.sel.ranges.length;W++)P[W]=e;this.replaceSelections(P,u,j||"+input")},replaceSelections:fi(function(e,u,j){for(var P=[],W=this.sel,Q=0;Q<W.ranges.length;Q++){var ae=W.ranges[Q];P[Q]={from:ae.from(),to:ae.to(),text:this.splitLines(e[Q]),origin:j}}for(var pe=u&&u!="end"&&No(this,P,u),ve=P.length-1;ve>=0;ve--)to(this,P[ve]);pe?Ss(this,pe):this.cm&&ba(this.cm)}),undo:fi(function(){Wo(this,"undo")}),redo:fi(function(){Wo(this,"redo")}),undoSelection:fi(function(){Wo(this,"undo",!0)}),redoSelection:fi(function(){Wo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,u=0,j=0,P=0;P<e.done.length;P++)e.done[P].ranges||++u;for(var W=0;W<e.undone.length;W++)e.undone[W].ranges||++j;return{undo:u,redo:j}},clearHistory:function(){var e=this;this.history=new jo(this.history.maxGeneration),Na(this,function(u){return u.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:qa(this.history.done),undone:qa(this.history.undone)}},setHistory:function(e){var u=this.history=new jo(this.history.maxGeneration);u.done=qa(e.done.slice(0),null,!0),u.undone=qa(e.undone.slice(0),null,!0)},setGutterMarker:fi(function(e,u,j){return yo(this,e,"gutter",function(P){var W=P.gutterMarkers||(P.gutterMarkers={});return W[u]=j,!j&&X(W)&&(P.gutterMarkers=null),!0})}),clearGutter:fi(function(e){var u=this;this.iter(function(j){j.gutterMarkers&&j.gutterMarkers[e]&&yo(u,j,"gutter",function(){return j.gutterMarkers[e]=null,X(j.gutterMarkers)&&(j.gutterMarkers=null),!0})})}),lineInfo:function(e){var u;if(typeof e=="number"){if(!Zn(this,e))return null;if(u=e,e=sr(this,e),!e)return null}else if(u=Jr(e),u==null)return null;return{line:u,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:fi(function(e,u,j){return yo(this,e,u=="gutter"?"gutter":"class",function(P){var W=u=="text"?"textClass":u=="background"?"bgClass":u=="gutter"?"gutterClass":"wrapClass";if(!P[W])P[W]=j;else{if(O(j).test(P[W]))return!1;P[W]+=" "+j}return!0})}),removeLineClass:fi(function(e,u,j){return yo(this,e,u=="gutter"?"gutter":"class",function(P){var W=u=="text"?"textClass":u=="background"?"bgClass":u=="gutter"?"gutterClass":"wrapClass",Q=P[W];if(Q)if(j==null)P[W]=null;else{var ae=Q.match(O(j));if(!ae)return!1;var pe=ae.index+ae[0].length;P[W]=Q.slice(0,ae.index)+(!ae.index||pe==Q.length?"":" ")+Q.slice(pe)||null}else return!1;return!0})}),addLineWidget:fi(function(e,u,j){return xl(this,e,u,j)}),removeLineWidget:function(e){e.clear()},markText:function(e,u,j){return no(this,V(this,e),V(this,u),j,j&&j.type||"range")},setBookmark:function(e,u){var j={replacedWith:u&&(u.nodeType==null?u.widget:u),insertLeft:u&&u.insertLeft,clearWhenEmpty:!1,shared:u&&u.shared,handleMouseEvents:u&&u.handleMouseEvents};return e=V(this,e),no(this,e,e,j,"bookmark")},findMarksAt:function(e){e=V(this,e);var u=[],j=sr(this,e.line).markedSpans;if(j)for(var P=0;P<j.length;++P){var W=j[P];(W.from==null||W.from<=e.ch)&&(W.to==null||W.to>=e.ch)&&u.push(W.marker.parent||W.marker)}return u},findMarks:function(e,u,j){e=V(this,e),u=V(this,u);var P=[],W=e.line;return this.iter(e.line,u.line+1,function(Q){var ae=Q.markedSpans;if(ae)for(var pe=0;pe<ae.length;pe++){var ve=ae[pe];!(ve.to!=null&&W==e.line&&e.ch>=ve.to||ve.from==null&&W!=e.line||ve.from!=null&&W==u.line&&ve.from>=u.ch)&&(!j||j(ve.marker))&&P.push(ve.marker.parent||ve.marker)}++W}),P},getAllMarks:function(){var e=[];return this.iter(function(u){var j=u.markedSpans;if(j)for(var P=0;P<j.length;++P)j[P].from!=null&&e.push(j[P].marker)}),e},posFromIndex:function(e){var u,j=this.first,P=this.lineSeparator().length;return this.iter(function(W){var Q=W.text.length+P;if(Q>e)return u=e,!0;e-=Q,++j}),V(this,Nt(j,u))},indexFromPos:function(e){e=V(this,e);var u=e.ch;if(e.line<this.first||e.ch<0)return 0;var j=this.lineSeparator().length;return this.iter(this.first,e.line,function(P){u+=P.text.length+j}),u},copy:function(e){var u=new $i(Tn(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return u.scrollTop=this.scrollTop,u.scrollLeft=this.scrollLeft,u.sel=this.sel,u.extend=!1,e&&(u.history.undoDepth=this.history.undoDepth,u.setHistory(this.getHistory())),u},linkedDoc:function(e){e||(e={});var u=this.first,j=this.first+this.size;e.from!=null&&e.from>u&&(u=e.from),e.to!=null&&e.to<j&&(j=e.to);var P=new $i(Tn(this,u,j),e.mode||this.modeOption,u,this.lineSep,this.direction);return e.sharedHist&&(P.history=this.history),(this.linked||(this.linked=[])).push({doc:P,sharedHist:e.sharedHist}),P.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Tl(P,Us(this)),P},unlinkDoc:function(e){if(e instanceof ti&&(e=e.doc),this.linked)for(var u=0;u<this.linked.length;++u){var j=this.linked[u];if(j.doc!=e)continue;this.linked.splice(u,1),e.unlinkDoc(this),Sl(Us(this));break}if(e.history==this.history){var P=[e.id];Na(e,function(W){return P.push(W.id)},!0),e.history=new jo(null),e.history.done=qa(this.history.done,P),e.history.undone=qa(this.history.undone,P)}},iterLinkedDocs:function(e){Na(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):dr(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:fi(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(u){return u.order=null}),this.cm&&pl(this.cm)})}),$i.prototype.eachLine=$i.prototype.iter;var Bs=0;function Ol(e){var u=this;if(Hs(u),tt(u,e)||mn(u.display,e))return;xe(e),S&&(Bs=+new Date);var j=ci(u,e,!0),P=e.dataTransfer.files;if(!j||u.isReadOnly())return;if(P&&P.length&&window.FileReader&&window.File)for(var W=P.length,Q=Array(W),ae=0,pe=function(){++ae==W&&hi(u,function(){j=V(u.doc,j);var at={from:j,to:j,text:u.doc.splitLines(Q.filter(function(Ct){return Ct!=null}).join(u.doc.lineSeparator())),origin:"paste"};to(u.doc,at),Ss(u.doc,ga(V(u.doc,j),V(u.doc,va(at))))})()},ve=function(at,Ct){if(u.options.allowDropFileTypes&&ue(u.options.allowDropFileTypes,at.type)==-1){pe();return}var Ut=new FileReader;Ut.onerror=function(){return pe()},Ut.onload=function(){var Jt=Ut.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Jt)){pe();return}Q[Ct]=Jt,pe()},Ut.readAsText(at)},we=0;we<P.length;we++)ve(P[we],we);else{if(u.state.draggingText&&u.doc.sel.contains(j)>-1){u.state.draggingText(e),setTimeout(function(){return u.display.input.focus()},20);return}try{var ze=e.dataTransfer.getData("Text");if(ze){var Ye;if(u.state.draggingText&&!u.state.draggingText.copy&&(Ye=u.listSelections()),Bo(u.doc,ga(j,j)),Ye)for(var ct=0;ct<Ye.length;++ct)ro(u.doc,"",Ye[ct].anchor,Ye[ct].head,"drag");u.replaceSelection(ze,"around","paste"),u.display.input.focus()}}catch(at){}}}function Al(e,u){if(S&&(!e.state.draggingText||+new Date-Bs<100)){Me(u);return}if(tt(e,u)||mn(e.display,u))return;if(u.dataTransfer.setData("Text",e.getSelection()),u.dataTransfer.effectAllowed="copyMove",u.dataTransfer.setDragImage&&!a){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,e.display.wrapper.appendChild(j),j._top=j.offsetTop),u.dataTransfer.setDragImage(j,0,0),c&&j.parentNode.removeChild(j)}}function Rl(e,u){var j=ci(e,u);if(!j)return;var P=document.createDocumentFragment();Ui(e,j,P),e.display.dragCursor||(e.display.dragCursor=T("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),w(e.display.dragCursor,P)}function Hs(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Ws(e){if(!document.getElementsByClassName)return;for(var u=document.getElementsByClassName("CodeMirror"),j=[],P=0;P<u.length;P++){var W=u[P].CodeMirror;W&&j.push(W)}j.length&&j[0].operation(function(){for(var Q=0;Q<j.length;Q++)e(j[Q])})}var zs=!1;function Il(){if(zs)return;Dl(),zs=!0}function Dl(){var e;Ie(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Ws(Ll)},100))}),Ie(window,"blur",function(){return Ws(la)})}function Ll(e){var u=e.display;u.cachedCharWidth=u.cachedTextHeight=u.cachedPaddingH=null,u.scrollbarsClipped=!1,e.setSize()}for(var Fa={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"},wo=0;wo<10;wo++)Fa[wo+48]=Fa[wo+96]=String(wo);for(var zo=65;zo<=90;zo++)Fa[zo]=String.fromCharCode(zo);for(var To=1;To<=12;To++)Fa[To+111]=Fa[To+63235]="F"+To;var Ia={};Ia.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"},Ia.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"},Ia.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"},Ia.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"]},Ia.default=o?Ia.macDefault:Ia.pcDefault;function Pl(e){var u=e.split(/-(?!$)/);e=u[u.length-1];for(var j,P,W,Q,ae=0;ae<u.length-1;ae++){var pe=u[ae];if(/^(cmd|meta|m)$/i.test(pe))Q=!0;else if(/^a(lt)?$/i.test(pe))j=!0;else if(/^(c|ctrl|control)$/i.test(pe))P=!0;else if(/^s(hift)?$/i.test(pe))W=!0;else throw new Error("Unrecognized modifier name: "+pe)}return j&&(e="Alt-"+e),P&&(e="Ctrl-"+e),Q&&(e="Cmd-"+e),W&&(e="Shift-"+e),e}function kl(e){var u={};for(var j in e)if(e.hasOwnProperty(j)){var P=e[j];if(/^(name|fallthrough|(de|at)tach)$/.test(j))continue;if(P=="..."){delete e[j];continue}for(var W=ge(j.split(" "),Pl),Q=0;Q<W.length;Q++){var ae=void 0,pe=void 0;Q==W.length-1?(pe=W.join(" "),ae=P):(pe=W.slice(0,Q+1).join(" "),ae="...");var ve=u[pe];if(!ve)u[pe]=ae;else if(ve!=ae)throw new Error("Inconsistent bindings for "+pe)}delete e[j]}for(var we in u)e[we]=u[we];return e}function io(e,u,j,P){u=Ko(u);var W=u.call?u.call(e,P):u[e];if(W===!1)return"nothing";if(W==="...")return"multi";if(W!=null&&j(W))return"handled";if(u.fallthrough){if(Object.prototype.toString.call(u.fallthrough)!="[object Array]")return io(e,u.fallthrough,j,P);for(var Q=0;Q<u.fallthrough.length;Q++){var ae=io(e,u.fallthrough[Q],j,P);if(ae)return ae}}}function Ks(e){var u=typeof e=="string"?e:Fa[e.keyCode];return u=="Ctrl"||u=="Alt"||u=="Shift"||u=="Mod"}function Gs(e,u,j){var P=e;return u.altKey&&P!="Alt"&&(e="Alt-"+e),(p?u.metaKey:u.ctrlKey)&&P!="Ctrl"&&(e="Ctrl-"+e),(p?u.ctrlKey:u.metaKey)&&P!="Mod"&&(e="Cmd-"+e),!j&&u.shiftKey&&P!="Shift"&&(e="Shift-"+e),e}function Vs(e,u){if(c&&e.keyCode==34&&e.char)return!1;var j=Fa[e.keyCode];return j==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(j=e.code),Gs(j,e,u))}function Ko(e){return typeof e=="string"?Ia[e]:e}function ao(e,u){for(var j=e.doc.sel.ranges,P=[],W=0;W<j.length;W++){for(var Q=u(j[W]);P.length&&_r(Q.from,ne(P).to)<=0;){var ae=P.pop();if(_r(ae.from,Q.from)<0){Q.from=ae.from;break}}P.push(Q)}Bi(e,function(){for(var pe=P.length-1;pe>=0;pe--)ro(e.doc,"",P[pe].from,P[pe].to,"+delete");ba(e)})}function as(e,u,j){var P=Ee(e.text,u+j,j);return P<0||P>e.text.length?null:P}function os(e,u,j){var P=as(e,u.ch,j);return P==null?null:new Nt(u.line,P,j<0?"after":"before")}function ss(e,u,j,P,W){if(e){u.doc.direction=="rtl"&&(W=-W);var Q=dt(j,u.doc.direction);if(Q){var ae=W<0?ne(Q):Q[0],pe=W<0==(ae.level==1),ve=pe?"after":"before",we;if(ae.level>0||u.doc.direction=="rtl"){var ze=Ke(u,j);we=W<0?j.text.length-1:0;var Ye=qe(u,ze,we).top;we=He(function(ct){return qe(u,ze,ct).top==Ye},W<0==(ae.level==1)?ae.from:ae.to-1,we),ve=="before"&&(we=as(j,we,1))}else we=W<0?ae.to:ae.from;return new Nt(P,we,ve)}}return new Nt(P,W<0?j.text.length:0,W<0?"before":"after")}function Ml(e,u,j,P){var W=dt(u,e.doc.direction);if(!W)return os(u,j,P);j.ch>=u.text.length?(j.ch=u.text.length,j.sticky="before"):j.ch<=0&&(j.ch=0,j.sticky="after");var Q=it(W,j.ch,j.sticky),ae=W[Q];if(e.doc.direction=="ltr"&&ae.level%2==0&&(P>0?ae.to>j.ch:ae.from<j.ch))return os(u,j,P);var pe=function(nr,vr){return as(u,nr instanceof Nt?nr.ch:nr,vr)},ve,we=function(nr){return e.options.lineWrapping?(ve=ve||Ke(e,u),Tr(e,u,ve,nr)):{begin:0,end:u.text.length}},ze=we(j.sticky=="before"?pe(j,-1):j.ch);if(e.doc.direction=="rtl"||ae.level==1){var Ye=ae.level==1==P<0,ct=pe(j,Ye?1:-1);if(ct!=null&&(Ye?ct<=ae.to&&ct<=ze.end:ct>=ae.from&&ct>=ze.begin)){var at=Ye?"before":"after";return new Nt(j.line,ct,at)}}var Ct=function(nr,vr,ir){for(var Cr=function($n,Ci){return Ci?new Nt(j.line,pe($n,1),"before"):new Nt(j.line,$n,"after")};nr>=0&&nr<W.length;nr+=vr){var Zr=W[nr],Kr=vr>0==(Zr.level!=1),_n=Kr?ir.begin:pe(ir.end,-1);if(Zr.from<=_n&&_n<Zr.to)return Cr(_n,Kr);if(_n=Kr?Zr.from:pe(Zr.to,-1),ir.begin<=_n&&_n<ir.end)return Cr(_n,Kr)}},Ut=Ct(Q+P,P,ze);if(Ut)return Ut;var Jt=P>0?ze.end:pe(ze.begin,-1);return Jt!=null&&!(P>0&&Jt==u.text.length)&&(Ut=Ct(P>0?0:W.length-1,P,we(Jt)),Ut)?Ut:null}var So={selectAll:Is,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Re)},killLine:function(e){return ao(e,function(u){if(u.empty()){var j=sr(e.doc,u.head.line).text.length;return u.head.ch==j&&u.head.line<e.lastLine()?{from:u.head,to:Nt(u.head.line+1,0)}:{from:u.head,to:Nt(u.head.line,j)}}else return{from:u.from(),to:u.to()}})},deleteLine:function(e){return ao(e,function(u){return{from:Nt(u.from().line,0),to:V(e.doc,Nt(u.to().line+1,0))}})},delLineLeft:function(e){return ao(e,function(u){return{from:Nt(u.from().line,0),to:u.from()}})},delWrappedLineLeft:function(e){return ao(e,function(u){var j=e.charCoords(u.head,"div").top+5,P=e.coordsChar({left:0,top:j},"div");return{from:P,to:u.from()}})},delWrappedLineRight:function(e){return ao(e,function(u){var j=e.charCoords(u.head,"div").top+5,P=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:j},"div");return{from:u.from(),to:P}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(Nt(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(Nt(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(u){return Xs(e,u.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(u){return Ys(e,u.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(u){return Nl(e,u.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(u){var j=e.cursorCoords(u.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:j},"div")},Oe)},goLineLeft:function(e){return e.extendSelectionsBy(function(u){var j=e.cursorCoords(u.head,"div").top+5;return e.coordsChar({left:0,top:j},"div")},Oe)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(u){var j=e.cursorCoords(u.head,"div").top+5,P=e.coordsChar({left:0,top:j},"div");return P.ch<e.getLine(P.line).search(/\S/)?Ys(e,u.head):P},Oe)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var u=[],j=e.listSelections(),P=e.options.tabSize,W=0;W<j.length;W++){var Q=j[W].from(),ae=K(e.getLine(Q.line),Q.ch,P);u.push(se(P-ae%P))}e.replaceSelections(u)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Bi(e,function(){for(var u=e.listSelections(),j=[],P=0;P<u.length;P++){if(!u[P].empty())continue;var W=u[P].head,Q=sr(e.doc,W.line).text;if(Q){if(W.ch==Q.length&&(W=new Nt(W.line,W.ch-1)),W.ch>0)W=new Nt(W.line,W.ch+1),e.replaceRange(Q.charAt(W.ch-1)+Q.charAt(W.ch-2),Nt(W.line,W.ch-2),W,"+transpose");else if(W.line>e.doc.first){var ae=sr(e.doc,W.line-1).text;ae&&(W=new Nt(W.line,1),e.replaceRange(Q.charAt(0)+e.doc.lineSeparator()+ae.charAt(ae.length-1),Nt(W.line-1,ae.length-1),W,"+transpose"))}}j.push(new Ln(W,W))}e.setSelections(j)})},newlineAndIndent:function(e){return Bi(e,function(){for(var u=e.listSelections(),j=u.length-1;j>=0;j--)e.replaceRange(e.doc.lineSeparator(),u[j].anchor,u[j].head,"+input");u=e.listSelections();for(var P=0;P<u.length;P++)e.indentLine(u[P].from().line,null,!0);ba(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Xs(e,u){var j=sr(e.doc,u),P=St(j);return P!=j&&(u=Jr(P)),ss(!0,e,P,u,1)}function Nl(e,u){var j=sr(e.doc,u),P=At(j);return P!=j&&(u=Jr(P)),ss(!0,e,j,u,-1)}function Ys(e,u){var j=Xs(e,u.line),P=sr(e.doc,j.line),W=dt(P,e.doc.direction);if(!W||W[0].level==0){var Q=Math.max(j.ch,P.text.search(/\S/)),ae=u.line==j.line&&u.ch<=Q&&u.ch;return Nt(j.line,ae?0:Q,j.sticky)}return j}function Go(e,u,j){if(typeof u=="string"&&(u=So[u],!u))return!1;e.display.input.ensurePolled();var P=e.display.shift,W=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),j&&(e.display.shift=!1),W=u(e)!=Ce}finally{e.display.shift=P,e.state.suppressEdits=!1}return W}function jl(e,u,j){for(var P=0;P<e.state.keyMaps.length;P++){var W=io(u,e.state.keyMaps[P],j,e);if(W)return W}return e.options.extraKeys&&io(u,e.options.extraKeys,j,e)||io(u,e.options.keyMap,j,e)}var Fl=new Z;function Co(e,u,j,P){var W=e.state.keySeq;if(W){if(Ks(u))return"handled";if(/\'$/.test(u)?e.state.keySeq=null:Fl.set(50,function(){e.state.keySeq==W&&(e.state.keySeq=null,e.display.input.reset())}),$s(e,W+" "+u,j,P))return!0}return $s(e,u,j,P)}function $s(e,u,j,P){var W=jl(e,u,P);return W=="multi"&&(e.state.keySeq=u),W=="handled"&&Qt(e,"keyHandled",e,u,j),(W=="handled"||W=="multi")&&(xe(j),oi(e)),!!W}function Js(e,u){var j=Vs(u,!0);return j?u.shiftKey&&!e.state.keySeq?Co(e,"Shift-"+j,u,function(P){return Go(e,P,!0)})||Co(e,j,u,function(P){if(typeof P=="string"?/^go[A-Z]/.test(P):P.motion)return Go(e,P)}):Co(e,j,u,function(P){return Go(e,P)}):!1}function Ul(e,u,j){return Co(e,"'"+j+"'",u,function(P){return Go(e,P,!0)})}var ls=null;function Qs(e){var u=this;if(e.target&&e.target!=u.display.input.getField())return;if(u.curOp.focus=G(),tt(u,e))return;S&&_<11&&e.keyCode==27&&(e.returnValue=!1);var j=e.keyCode;u.display.shift=j==16||e.shiftKey;var P=Js(u,e);c&&(ls=P?j:null,!P&&j==88&&!Vr&&(o?e.metaKey:e.ctrlKey)&&u.replaceSelection("",null,"cut")),C&&!o&&!P&&j==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),j==18&&!/\bCodeMirror-crosshair\b/.test(u.display.lineDiv.className)&&Bl(u)}function Bl(e){var u=e.display.lineDiv;z(u,"CodeMirror-crosshair");function j(P){(P.keyCode==18||!P.altKey)&&(b(u,"CodeMirror-crosshair"),ft(document,"keyup",j),ft(document,"mouseover",j))}Ie(document,"keyup",j),Ie(document,"mouseover",j)}function Zs(e){e.keyCode==16&&(this.doc.sel.shift=!1),tt(this,e)}function el(e){var u=this;if(e.target&&e.target!=u.display.input.getField())return;if(mn(u.display,e)||tt(u,e)||e.ctrlKey&&!e.altKey||o&&e.metaKey)return;var j=e.keyCode,P=e.charCode;if(c&&j==ls){ls=null,xe(e);return}if(c&&(!e.which||e.which<10)&&Js(u,e))return;var W=String.fromCharCode(P==null?j:P);if(W=="\b")return;if(Ul(u,e,W))return;u.display.input.onKeyPress(e)}var Hl=400,us=function(e,u,j){this.time=e,this.pos=u,this.button=j};us.prototype.compare=function(e,u,j){return this.time+Hl>e&&_r(u,this.pos)==0&&j==this.button};var Oo,Ao;function Wl(e,u){var j=+new Date;return Ao&&Ao.compare(j,e,u)?(Oo=Ao=null,"triple"):Oo&&Oo.compare(j,e,u)?(Ao=new us(j,e,u),Oo=null,"double"):(Oo=new us(j,e,u),Ao=null,"single")}function tl(e){var u=this,j=u.display;if(tt(u,e)||j.activeTouch&&j.input.supportsTouch())return;if(j.input.ensurePolled(),j.shift=e.shiftKey,mn(j,e)){t||(j.scroller.draggable=!1,setTimeout(function(){return j.scroller.draggable=!0},100));return}if(cs(u,e))return;var P=ci(u,e),W=nt(e),Q=P?Wl(P,W):"single";if(window.focus(),W==1&&u.state.selectingText&&u.state.selectingText(e),P&&zl(u,W,P,Q,e))return;W==1?P?Gl(u,P,Q,e):We(e)==j.scroller&&xe(e):W==2?(P&&Uo(u.doc,P),setTimeout(function(){return j.input.focus()},20)):W==3&&(R?u.display.input.onContextMenu(e):wa(u))}function zl(e,u,j,P,W){var Q="Click";return P=="double"?Q="Double"+Q:P=="triple"&&(Q="Triple"+Q),Q=(u==1?"Left":u==2?"Middle":"Right")+Q,Co(e,Gs(Q,W),W,function(ae){if(typeof ae=="string"&&(ae=So[ae]),!ae)return!1;var pe=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),pe=ae(e,j)!=Ce}finally{e.state.suppressEdits=!1}return pe})}function Kl(e,u,j){var P=e.getOption("configureMouse"),W=P?P(e,u,j):{};if(W.unit==null){var Q=r?j.shiftKey&&j.metaKey:j.altKey;W.unit=Q?"rectangle":u=="single"?"char":u=="double"?"word":"line"}return(W.extend==null||e.doc.extend)&&(W.extend=e.doc.extend||j.shiftKey),W.addNew==null&&(W.addNew=o?j.metaKey:j.ctrlKey),W.moveOnDrag==null&&(W.moveOnDrag=!(o?j.altKey:j.ctrlKey)),W}function Gl(e,u,j,P){S?setTimeout(U(Ba,e),0):e.curOp.focus=G();var W=Kl(e,j,P),Q=e.doc.sel,ae;e.options.dragDrop&&vt&&!e.isReadOnly()&&j=="single"&&(ae=Q.contains(u))>-1&&(_r((ae=Q.ranges[ae]).from(),u)<0||u.xRel>0)&&(_r(ae.to(),u)>0||u.xRel<0)?Vl(e,P,u,W):Xl(e,P,u,W)}function Vl(e,u,j,P){var W=e.display,Q=!1,ae=hi(e,function(we){t&&(W.scroller.draggable=!1),e.state.draggingText=!1,ft(W.wrapper.ownerDocument,"mouseup",ae),ft(W.wrapper.ownerDocument,"mousemove",pe),ft(W.scroller,"dragstart",ve),ft(W.scroller,"drop",ae),Q||(xe(we),P.addNew||Uo(e.doc,j,null,null,P.extend),t&&!a||S&&_==9?setTimeout(function(){W.wrapper.ownerDocument.body.focus({preventScroll:!0}),W.input.focus()},20):W.input.focus())}),pe=function(we){Q=Q||Math.abs(u.clientX-we.clientX)+Math.abs(u.clientY-we.clientY)>=10},ve=function(){return Q=!0};t&&(W.scroller.draggable=!0),e.state.draggingText=ae,ae.copy=!P.moveOnDrag,W.scroller.dragDrop&&W.scroller.dragDrop(),Ie(W.wrapper.ownerDocument,"mouseup",ae),Ie(W.wrapper.ownerDocument,"mousemove",pe),Ie(W.scroller,"dragstart",ve),Ie(W.scroller,"drop",ae),wa(e),setTimeout(function(){return W.input.focus()},20)}function rl(e,u,j){if(j=="char")return new Ln(u,u);if(j=="word")return e.findWordAt(u);if(j=="line")return new Ln(Nt(u.line,0),V(e.doc,Nt(u.line+1,0)));var P=j(e,u);return new Ln(P.from,P.to)}function Xl(e,u,j,P){var W=e.display,Q=e.doc;xe(u);var ae,pe,ve=Q.sel,we=ve.ranges;if(P.addNew&&!P.extend?(pe=Q.sel.contains(j),pe>-1?ae=we[pe]:ae=new Ln(j,j)):(ae=Q.sel.primary(),pe=Q.sel.primIndex),P.unit=="rectangle")P.addNew||(ae=new Ln(j,j)),j=ci(e,u,!0,!0),pe=-1;else{var ze=rl(e,j,P.unit);P.extend?ae=ns(ae,ze.anchor,ze.head,P.extend):ae=ze}P.addNew?pe==-1?(pe=we.length,ki(Q,aa(e,we.concat([ae]),pe),{scroll:!1,origin:"*mouse"})):we.length>1&&we[pe].empty()&&P.unit=="char"&&!P.extend?(ki(Q,aa(e,we.slice(0,pe).concat(we.slice(pe+1)),0),{scroll:!1,origin:"*mouse"}),ve=Q.sel):is(Q,pe,ae,me):(pe=0,ki(Q,new Wi([ae],0),me),ve=Q.sel);var Ye=j;function ct(ir){if(_r(Ye,ir)==0)return;if(Ye=ir,P.unit=="rectangle"){for(var Cr=[],Zr=e.options.tabSize,Kr=K(sr(Q,j.line).text,j.ch,Zr),_n=K(sr(Q,ir.line).text,ir.ch,Zr),$n=Math.min(Kr,_n),Ci=Math.max(Kr,_n),si=Math.min(j.line,ir.line),qi=Math.min(e.lastLine(),Math.max(j.line,ir.line));si<=qi;si++){var Ji=sr(Q,si).text,vi=be(Ji,$n,Zr);$n==Ci?Cr.push(new Ln(Nt(si,vi),Nt(si,vi))):Ji.length>vi&&Cr.push(new Ln(Nt(si,vi),Nt(si,be(Ji,Ci,Zr))))}Cr.length||Cr.push(new Ln(j,j)),ki(Q,aa(e,ve.ranges.slice(0,pe).concat(Cr),pe),{origin:"*mouse",scroll:!1}),e.scrollIntoView(ir)}else{var Qi=ae,Ii=rl(e,ir,P.unit),Ei=Qi.anchor,yi;_r(Ii.anchor,Ei)>0?(yi=Ii.head,Ei=wi(Qi.from(),Ii.anchor)):(yi=Ii.anchor,Ei=Di(Qi.to(),Ii.head));var di=ve.ranges.slice(0);di[pe]=Yl(e,new Ln(V(Q,Ei),yi)),ki(Q,aa(e,di,pe),me)}}var at=W.wrapper.getBoundingClientRect(),Ct=0;function Ut(ir){var Cr=++Ct,Zr=ci(e,ir,!0,P.unit=="rectangle");if(!Zr)return;if(_r(Zr,Ye)!=0){e.curOp.focus=G(),ct(Zr);var Kr=Pa(W,Q);(Zr.line>=Kr.to||Zr.line<Kr.from)&&setTimeout(hi(e,function(){Ct==Cr&&Ut(ir)}),150)}else{var _n=ir.clientY<at.top?-20:ir.clientY>at.bottom?20:0;_n&&setTimeout(hi(e,function(){if(Ct!=Cr)return;W.scroller.scrollTop+=_n,Ut(ir)}),50)}}function Jt(ir){e.state.selectingText=!1,Ct=Infinity,ir&&(xe(ir),W.input.focus()),ft(W.wrapper.ownerDocument,"mousemove",nr),ft(W.wrapper.ownerDocument,"mouseup",vr),Q.history.lastSelOrigin=null}var nr=hi(e,function(ir){ir.buttons===0||!nt(ir)?Jt(ir):Ut(ir)}),vr=hi(e,Jt);e.state.selectingText=vr,Ie(W.wrapper.ownerDocument,"mousemove",nr),Ie(W.wrapper.ownerDocument,"mouseup",vr)}function Yl(e,u){var j=u.anchor,P=u.head,W=sr(e.doc,j.line);if(_r(j,P)==0&&j.sticky==P.sticky)return u;var Q=dt(W);if(!Q)return u;var ae=it(Q,j.ch,j.sticky),pe=Q[ae];if(pe.from!=j.ch&&pe.to!=j.ch)return u;var ve=ae+(pe.from==j.ch==(pe.level!=1)?0:1);if(ve==0||ve==Q.length)return u;var we;if(P.line!=j.line)we=(P.line-j.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var ze=it(Q,P.ch,P.sticky),Ye=ze-ae||(P.ch-j.ch)*(pe.level==1?-1:1);ze==ve-1||ze==ve?we=Ye<0:we=Ye>0}var ct=Q[ve+(we?-1:0)],at=we==(ct.level==1),Ct=at?ct.from:ct.to,Ut=at?"after":"before";return j.ch==Ct&&j.sticky==Ut?u:new Ln(new Nt(j.line,Ct,Ut),P)}function nl(e,u,j,P){var W,Q;if(u.touches)W=u.touches[0].clientX,Q=u.touches[0].clientY;else try{W=u.clientX,Q=u.clientY}catch(ct){return!1}if(W>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;P&&xe(u);var ae=e.display,pe=ae.lineDiv.getBoundingClientRect();if(Q>pe.bottom||!Pe(e,j))return Le(u);Q-=pe.top-ae.viewOffset;for(var ve=0;ve<e.display.gutterSpecs.length;++ve){var we=ae.gutters.childNodes[ve];if(we&&we.getBoundingClientRect().right>=W){var ze=An(e.doc,Q),Ye=e.display.gutterSpecs[ve];return Ze(e,j,e,ze,Ye.className,u),Le(u)}}}function cs(e,u){return nl(e,u,"gutterClick",!0)}function il(e,u){if(mn(e.display,u)||$l(e,u))return;if(tt(e,u,"contextmenu"))return;R||e.display.input.onContextMenu(u)}function $l(e,u){return Pe(e,"gutterContextMenu")?nl(e,u,"gutterContextMenu",!1):!1}function al(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),qr(e)}var oo={toString:function(){return"CodeMirror.Init"}},ol={},Vo={};function Jl(e){var u=e.optionHandlers;function j(P,W,Q,ae){e.defaults[P]=W,Q&&(u[P]=ae?function(pe,ve,we){we!=oo&&Q(pe,ve,we)}:Q)}e.defineOption=j,e.Init=oo,j("value","",function(P,W){return P.setValue(W)},!0),j("mode",null,function(P,W){P.doc.modeOption=W,Ra(P)},!0),j("indentUnit",2,Ra,!0),j("indentWithTabs",!1),j("smartIndent",!0),j("tabSize",4,function(P){go(P),qr(P),Un(P)},!0),j("lineSeparator",null,function(P,W){if(P.doc.lineSep=W,!W)return;var Q=[],ae=P.doc.first;P.doc.iter(function(ve){for(var we=0;;){var ze=ve.text.indexOf(W,we);if(ze==-1)break;we=ze+W.length,Q.push(Nt(ae,ze))}ae++});for(var pe=Q.length-1;pe>=0;pe--)ro(P.doc,W,Q[pe],Nt(Q[pe].line,Q[pe].ch+W.length))}),j("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(P,W,Q){P.state.specialChars=new RegExp(W.source+(W.test(" ")?"":"| "),"g"),Q!=oo&&P.refresh()}),j("specialCharPlaceholder",pr,function(P){return P.refresh()},!0),j("electricChars",!0),j("inputStyle",l?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),j("spellcheck",!1,function(P,W){return P.getInputField().spellcheck=W},!0),j("autocorrect",!1,function(P,W){return P.getInputField().autocorrect=W},!0),j("autocapitalize",!1,function(P,W){return P.getInputField().autocapitalize=W},!0),j("rtlMoveVisually",!x),j("wholeLineUpdateBefore",!0),j("theme","default",function(P){al(P),ma(P)},!0),j("keyMap","default",function(P,W,Q){var ae=Ko(W),pe=Q!=oo&&Ko(Q);pe&&pe.detach&&pe.detach(P,ae),ae.attach&&ae.attach(P,pe||null)}),j("extraKeys",null),j("configureMouse",null),j("lineWrapping",!1,Zl,!0),j("gutters",[],function(P,W){P.display.gutterSpecs=Hi(W,P.options.lineNumbers),ma(P)},!0),j("fixedGutter",!0,function(P,W){P.display.gutters.style.left=W?gi(P.display)+"px":"0",P.refresh()},!0),j("coverGutterNextToScrollbar",!1,function(P){return or(P)},!0),j("scrollbarStyle","native",function(P){pa(P),or(P),P.display.scrollbars.setScrollTop(P.doc.scrollTop),P.display.scrollbars.setScrollLeft(P.doc.scrollLeft)},!0),j("lineNumbers",!1,function(P,W){P.display.gutterSpecs=Hi(P.options.gutters,W),ma(P)},!0),j("firstLineNumber",1,ma,!0),j("lineNumberFormatter",function(P){return P},ma,!0),j("showCursorWhenSelecting",!1,Dn,!0),j("resetSelectionOnContextMenu",!0),j("lineWiseCopyCut",!0),j("pasteLinesPerSelection",!0),j("selectionsMayTouch",!1),j("readOnly",!1,function(P,W){W=="nocursor"&&(la(P),P.display.input.blur()),P.display.input.readOnlyChanged(W)}),j("screenReaderLabel",null,function(P,W){W=W===""?null:W,P.display.input.screenReaderLabelChanged(W)}),j("disableInput",!1,function(P,W){W||P.display.input.reset()},!0),j("dragDrop",!0,Ql),j("allowDropFileTypes",null),j("cursorBlinkRate",530),j("cursorScrollMargin",0),j("cursorHeight",1,Dn,!0),j("singleCursorHeightPerLine",!0,Dn,!0),j("workTime",100),j("workDelay",100),j("flattenSpans",!0,go,!0),j("addModeClass",!1,go,!0),j("pollInterval",100),j("undoDepth",200,function(P,W){return P.doc.history.undoDepth=W}),j("historyEventDelay",1250),j("viewportMargin",10,function(P){return P.refresh()},!0),j("maxHighlightLength",1e4,go,!0),j("moveInputWithCursor",!0,function(P,W){W||P.display.input.resetPosition()}),j("tabindex",null,function(P,W){return P.display.input.getField().tabIndex=W||""}),j("autofocus",null),j("direction","ltr",function(P,W){return P.doc.setDirection(W)},!0),j("phrases",null)}function Ql(e,u,j){var P=j&&j!=oo;if(!u!=!P){var W=e.display.dragFunctions,Q=u?Ie:ft;Q(e.display.scroller,"dragstart",W.start),Q(e.display.scroller,"dragenter",W.enter),Q(e.display.scroller,"dragover",W.over),Q(e.display.scroller,"dragleave",W.leave),Q(e.display.scroller,"drop",W.drop)}}function Zl(e){e.options.lineWrapping?(z(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(b(e.display.wrapper,"CodeMirror-wrap"),Rr(e)),Si(e),Un(e),qr(e),setTimeout(function(){return or(e)},100)}function ti(e,u){var j=this;if(!(this instanceof ti))return new ti(e,u);this.options=u=u?I(u):{},I(ol,u,!1);var P=u.value;typeof P=="string"?P=new $i(P,u.mode,null,u.lineSeparator,u.direction):u.mode&&(P.modeOption=u.mode),this.doc=P;var W=new ti.inputStyles[u.inputStyle](this),Q=this.display=new Ka(e,P,W,u);Q.wrapper.CodeMirror=this,al(this),u.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),pa(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 Z,keySeq:null,specialChars:null},u.autofocus&&!l&&Q.input.focus(),S&&_<11&&setTimeout(function(){return j.display.input.reset(!0)},20),ql(this),Il(),Hn(this),this.curOp.forceUpdate=!0,vs(this,P),u.autofocus&&!l||this.hasFocus()?setTimeout(function(){j.hasFocus()&&!j.state.focused&&sa(j)},20):la(this);for(var ae in Vo)Vo.hasOwnProperty(ae)&&Vo[ae](this,u[ae],oo);bi(this),u.finishInit&&u.finishInit(this);for(var pe=0;pe<ds.length;++pe)ds[pe](this);Oa(this),t&&u.lineWrapping&&getComputedStyle(Q.lineDiv).textRendering=="optimizelegibility"&&(Q.lineDiv.style.textRendering="auto")}ti.defaults=ol,ti.optionHandlers=Vo;function ql(e){var u=e.display;Ie(u.scroller,"mousedown",hi(e,tl)),S&&_<11?Ie(u.scroller,"dblclick",hi(e,function(ve){if(tt(e,ve))return;var we=ci(e,ve);if(!we||cs(e,ve)||mn(e.display,ve))return;xe(ve);var ze=e.findWordAt(we);Uo(e.doc,ze.anchor,ze.head)})):Ie(u.scroller,"dblclick",function(ve){return tt(e,ve)||xe(ve)}),Ie(u.scroller,"contextmenu",function(ve){return il(e,ve)}),Ie(u.input.getField(),"contextmenu",function(ve){u.scroller.contains(ve.target)||il(e,ve)});var j,P={end:0};function W(){u.activeTouch&&(j=setTimeout(function(){return u.activeTouch=null},1e3),P=u.activeTouch,P.end=+new Date)}function Q(ve){if(ve.touches.length!=1)return!1;var we=ve.touches[0];return we.radiusX<=1&&we.radiusY<=1}function ae(ve,we){if(we.left==null)return!0;var ze=we.left-ve.left,Ye=we.top-ve.top;return ze*ze+Ye*Ye>20*20}Ie(u.scroller,"touchstart",function(ve){if(!tt(e,ve)&&!Q(ve)&&!cs(e,ve)){u.input.ensurePolled(),clearTimeout(j);var we=+new Date;u.activeTouch={start:we,moved:!1,prev:we-P.end<=300?P:null},ve.touches.length==1&&(u.activeTouch.left=ve.touches[0].pageX,u.activeTouch.top=ve.touches[0].pageY)}}),Ie(u.scroller,"touchmove",function(){u.activeTouch&&(u.activeTouch.moved=!0)}),Ie(u.scroller,"touchend",function(ve){var we=u.activeTouch;if(we&&!mn(u,ve)&&we.left!=null&&!we.moved&&new Date-we.start<300){var ze=e.coordsChar(u.activeTouch,"page"),Ye;!we.prev||ae(we,we.prev)?Ye=new Ln(ze,ze):!we.prev.prev||ae(we,we.prev.prev)?Ye=e.findWordAt(ze):Ye=new Ln(Nt(ze.line,0),V(e.doc,Nt(ze.line+1,0))),e.setSelection(Ye.anchor,Ye.head),e.focus(),xe(ve)}W()}),Ie(u.scroller,"touchcancel",W),Ie(u.scroller,"scroll",function(){u.scroller.clientHeight&&(da(e,u.scroller.scrollTop),Yi(e,u.scroller.scrollLeft,!0),Ze(e,"scroll",e))}),Ie(u.scroller,"mousewheel",function(ve){return po(e,ve)}),Ie(u.scroller,"DOMMouseScroll",function(ve){return po(e,ve)}),Ie(u.wrapper,"scroll",function(){return u.wrapper.scrollTop=u.wrapper.scrollLeft=0}),u.dragFunctions={enter:function(ve){tt(e,ve)||Me(ve)},over:function(ve){tt(e,ve)||(Rl(e,ve),Me(ve))},start:function(ve){return Al(e,ve)},drop:hi(e,Ol),leave:function(ve){tt(e,ve)||Hs(e)}};var pe=u.input.getField();Ie(pe,"keyup",function(ve){return Zs.call(e,ve)}),Ie(pe,"keydown",hi(e,Qs)),Ie(pe,"keypress",hi(e,el)),Ie(pe,"focus",function(ve){return sa(e,ve)}),Ie(pe,"blur",function(ve){return la(e,ve)})}var ds=[];ti.defineInitHook=function(e){return ds.push(e)};function Ro(e,u,j,P){var W=e.doc,Q;j==null&&(j="add"),j=="smart"&&(W.mode.indent?Q=Xt(e,u).state:j="prev");var ae=e.options.tabSize,pe=sr(W,u),ve=K(pe.text,null,ae);pe.stateAfter&&(pe.stateAfter=null);var we=pe.text.match(/^\s*/)[0],ze;if(!P&&!/\S/.test(pe.text))ze=0,j="not";else if(j=="smart"&&(ze=W.mode.indent(Q,pe.text.slice(we.length),pe.text),ze==Ce||ze>150)){if(!P)return;j="prev"}j=="prev"?u>W.first?ze=K(sr(W,u-1).text,null,ae):ze=0:j=="add"?ze=ve+e.options.indentUnit:j=="subtract"?ze=ve-e.options.indentUnit:typeof j=="number"&&(ze=ve+j),ze=Math.max(0,ze);var Ye="",ct=0;if(e.options.indentWithTabs)for(var at=Math.floor(ze/ae);at;--at)ct+=ae,Ye+=" ";if(ct<ze&&(Ye+=se(ze-ct)),Ye!=we)return ro(W,Ye,Nt(u,0),Nt(u,we.length),"+input"),pe.stateAfter=null,!0;for(var Ct=0;Ct<W.sel.ranges.length;Ct++){var Ut=W.sel.ranges[Ct];if(Ut.head.line==u&&Ut.head.ch<we.length){var Jt=Nt(u,we.length);is(W,Ct,new Ln(Jt,Jt));break}}}var ya=null;function Xo(e){ya=e}function hs(e,u,j,P,W){var Q=e.doc;e.display.shift=!1,P||(P=Q.sel);var ae=+new Date-200,pe=W=="paste"||e.state.pasteIncoming>ae,ve=dr(u),we=null;if(pe&&P.ranges.length>1)if(ya&&ya.text.join(`
`)==u){if(P.ranges.length%ya.text.length==0){we=[];for(var ze=0;ze<ya.text.length;ze++)we.push(Q.splitLines(ya.text[ze]))}}else ve.length==P.ranges.length&&e.options.pasteLinesPerSelection&&(we=ge(ve,function(nr){return[nr]}));for(var Ye=e.curOp.updateInput,ct=P.ranges.length-1;ct>=0;ct--){var at=P.ranges[ct],Ct=at.from(),Ut=at.to();at.empty()&&(j&&j>0?Ct=Nt(Ct.line,Ct.ch-j):e.state.overwrite&&!pe?Ut=Nt(Ut.line,Math.min(sr(Q,Ut.line).text.length,Ut.ch+ne(ve).length)):pe&&ya&&ya.lineWise&&ya.text.join(`
`)==ve.join(`
`)&&(Ct=Ut=Nt(Ct.line,0)));var Jt={from:Ct,to:Ut,text:we?we[ct%we.length]:ve,origin:W||(pe?"paste":e.state.cutIncoming>ae?"cut":"+input")};to(e.doc,Jt),Qt(e,"inputRead",e,Jt)}u&&!pe&&ll(e,u),ba(e),e.curOp.updateInput<2&&(e.curOp.updateInput=Ye),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function sl(e,u){var j=e.clipboardData&&e.clipboardData.getData("Text");if(j)return e.preventDefault(),!u.isReadOnly()&&!u.options.disableInput&&Bi(u,function(){return hs(u,j,0,null,"paste")}),!0}function ll(e,u){if(!e.options.electricChars||!e.options.smartIndent)return;for(var j=e.doc.sel,P=j.ranges.length-1;P>=0;P--){var W=j.ranges[P];if(W.head.ch>100||P&&j.ranges[P-1].head.line==W.head.line)continue;var Q=e.getModeAt(W.head),ae=!1;if(Q.electricChars){for(var pe=0;pe<Q.electricChars.length;pe++)if(u.indexOf(Q.electricChars.charAt(pe))>-1){ae=Ro(e,W.head.line,"smart");break}}else Q.electricInput&&(Q.electricInput.test(sr(e.doc,W.head.line).text.slice(0,W.head.ch))&&(ae=Ro(e,W.head.line,"smart")));ae&&Qt(e,"electricInput",e,W.head.line)}}function ul(e){for(var u=[],j=[],P=0;P<e.doc.sel.ranges.length;P++){var W=e.doc.sel.ranges[P].head.line,Q={anchor:Nt(W,0),head:Nt(W+1,0)};j.push(Q),u.push(e.getRange(Q.anchor,Q.head))}return{text:u,ranges:j}}function cl(e,u,j,P){e.setAttribute("autocorrect",j?"":"off"),e.setAttribute("autocapitalize",P?"":"off"),e.setAttribute("spellcheck",!!u)}function dl(){var e=T("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),u=T("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return t?e.style.width="1000px":e.setAttribute("wrap","off"),d&&(e.style.border="1px solid black"),cl(e),u}function eu(e){var u=e.optionHandlers,j=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(P,W){var Q=this.options,ae=Q[P];if(Q[P]==W&&P!="mode")return;Q[P]=W,u.hasOwnProperty(P)&&hi(this,u[P])(this,W,ae),Ze(this,"optionChange",this,P)},getOption:function(P){return this.options[P]},getDoc:function(){return this.doc},addKeyMap:function(P,W){this.state.keyMaps[W?"push":"unshift"](Ko(P))},removeKeyMap:function(P){for(var W=this.state.keyMaps,Q=0;Q<W.length;++Q)if(W[Q]==P||W[Q].name==P)return W.splice(Q,1),!0},addOverlay:Ri(function(P,W){var Q=P.token?P:e.getMode(this.options,P);if(Q.startState)throw new Error("Overlays may not be stateful.");ee(this.state.overlays,{mode:Q,modeSpec:P,opaque:W&&W.opaque,priority:W&&W.priority||0},function(ae){return ae.priority}),this.state.modeGen++,Un(this)}),removeOverlay:Ri(function(P){for(var W=this.state.overlays,Q=0;Q<W.length;++Q){var ae=W[Q].modeSpec;if(ae==P||typeof P=="string"&&ae.name==P){W.splice(Q,1),this.state.modeGen++,Un(this);return}}}),indentLine:Ri(function(P,W,Q){typeof W!="string"&&typeof W!="number"&&(W==null?W=this.options.smartIndent?"smart":"prev":W=W?"add":"subtract"),Zn(this.doc,P)&&Ro(this,P,W,Q)}),indentSelection:Ri(function(P){for(var W=this.doc.sel.ranges,Q=-1,ae=0;ae<W.length;ae++){var pe=W[ae];if(pe.empty())pe.head.line>Q&&(Ro(this,pe.head.line,P,!0),Q=pe.head.line,ae==this.doc.sel.primIndex&&ba(this));else{var ve=pe.from(),we=pe.to(),ze=Math.max(Q,ve.line);Q=Math.min(this.lastLine(),we.line-(we.ch?0:1))+1;for(var Ye=ze;Ye<Q;++Ye)Ro(this,Ye,P);var ct=this.doc.sel.ranges;ve.ch==0&&W.length==ct.length&&ct[ae].from().ch>0&&is(this.doc,ae,new Ln(ve,ct[ae].to()),Re)}}}),getTokenAt:function(P,W){return yn(this,P,W)},getLineTokens:function(P,W){return yn(this,Nt(P),W,!0)},getTokenTypeAt:function(P){P=V(this.doc,P);var W=Tt(this,sr(this.doc,P.line)),Q=0,ae=(W.length-1)/2,pe=P.ch,ve;if(pe==0)ve=W[2];else for(;;){var we=Q+ae>>1;if((we?W[we*2-1]:0)>=pe)ae=we;else if(W[we*2+1]<pe)Q=we+1;else{ve=W[we*2+2];break}}var ze=ve?ve.indexOf("overlay "):-1;return ze<0?ve:ze==0?null:ve.slice(0,ze-1)},getModeAt:function(P){var W=this.doc.mode;return W.innerMode?e.innerMode(W,this.getTokenAt(P).state).mode:W},getHelper:function(P,W){return this.getHelpers(P,W)[0]},getHelpers:function(P,W){var Q=[];if(!j.hasOwnProperty(W))return Q;var ae=j[W],pe=this.getModeAt(P);if(typeof pe[W]=="string")ae[pe[W]]&&Q.push(ae[pe[W]]);else if(pe[W])for(var ve=0;ve<pe[W].length;ve++){var we=ae[pe[W][ve]];we&&Q.push(we)}else pe.helperType&&ae[pe.helperType]?Q.push(ae[pe.helperType]):ae[pe.name]&&Q.push(ae[pe.name]);for(var ze=0;ze<ae._global.length;ze++){var Ye=ae._global[ze];Ye.pred(pe,this)&&ue(Q,Ye.val)==-1&&Q.push(Ye.val)}return Q},getStateAfter:function(P,W){var Q=this.doc;return P=le(Q,P==null?Q.first+Q.size-1:P),Xt(this,P+1,W).state},cursorCoords:function(P,W){var Q,ae=this.doc.sel.primary();return P==null?Q=ae.head:typeof P=="object"?Q=V(this.doc,P):Q=P?ae.from():ae.to(),hn(this,Q,W||"page")},charCoords:function(P,W){return kn(this,V(this.doc,P),W||"page")},coordsChar:function(P,W){return P=un(this,P,W||"page"),on(this,P.left,P.top)},lineAtHeight:function(P,W){return P=un(this,{top:P,left:0},W||"page").top,An(this.doc,P+this.display.viewOffset)},heightAtLine:function(P,W,Q){var ae=!1,pe;if(typeof P=="number"){var ve=this.doc.first+this.doc.size-1;P<this.doc.first?P=this.doc.first:P>ve&&(P=ve,ae=!0),pe=sr(this.doc,P)}else pe=P;return vn(this,pe,{top:0,left:0},W||"page",Q||ae).top+(ae?this.doc.height-cr(pe):0)},defaultTextHeight:function(){return ei(this.display)},defaultCharWidth:function(){return ui(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(P,W,Q,ae,pe){var ve=this.display;P=hn(this,V(this.doc,P));var we=P.bottom,ze=P.left;if(W.style.position="absolute",W.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(W),ve.sizer.appendChild(W),ae=="over")we=P.top;else if(ae=="above"||ae=="near"){var Ye=Math.max(ve.wrapper.clientHeight,this.doc.height),ct=Math.max(ve.sizer.clientWidth,ve.lineSpace.clientWidth);(ae=="above"||P.bottom+W.offsetHeight>Ye)&&P.top>W.offsetHeight?we=P.top-W.offsetHeight:P.bottom+W.offsetHeight<=Ye&&(we=P.bottom),ze+W.offsetWidth>ct&&(ze=ct-W.offsetWidth)}W.style.top=we+"px",W.style.left=W.style.right="",pe=="right"?(ze=ve.sizer.clientWidth-W.offsetWidth,W.style.right="0px"):(pe=="left"?ze=0:pe=="middle"&&(ze=(ve.sizer.clientWidth-W.offsetWidth)/2),W.style.left=ze+"px"),Q&&ka(this,{left:ze,top:we,right:ze+W.offsetWidth,bottom:we+W.offsetHeight})},triggerOnKeyDown:Ri(Qs),triggerOnKeyPress:Ri(el),triggerOnKeyUp:Zs,triggerOnMouseDown:Ri(tl),execCommand:function(P){if(So.hasOwnProperty(P))return So[P].call(null,this)},triggerElectric:Ri(function(P){ll(this,P)}),findPosH:function(P,W,Q,ae){var pe=1;W<0&&(pe=-1,W=-W);for(var ve=V(this.doc,P),we=0;we<W&&!(ve=fs(this.doc,ve,pe,Q,ae),ve.hitSide);++we);return ve},moveH:Ri(function(P,W){var Q=this;this.extendSelectionsBy(function(ae){return Q.display.shift||Q.doc.extend||ae.empty()?fs(Q.doc,ae.head,P,W,Q.options.rtlMoveVisually):P<0?ae.from():ae.to()},Oe)}),deleteH:Ri(function(P,W){var Q=this.doc.sel,ae=this.doc;Q.somethingSelected()?ae.replaceSelection("",null,"+delete"):ao(this,function(pe){var ve=fs(ae,pe.head,P,W,!1);return P<0?{from:ve,to:pe.head}:{from:pe.head,to:ve}})}),findPosV:function(P,W,Q,ae){var pe=1,ve=ae;W<0&&(pe=-1,W=-W);for(var we=V(this.doc,P),ze=0;ze<W;++ze){var Ye=hn(this,we,"div");if(ve==null?ve=Ye.left:Ye.left=ve,we=hl(this,Ye,pe,Q),we.hitSide)break}return we},moveV:Ri(function(P,W){var Q=this,ae=this.doc,pe=[],ve=!this.display.shift&&!ae.extend&&ae.sel.somethingSelected();if(ae.extendSelectionsBy(function(ze){if(ve)return P<0?ze.from():ze.to();var Ye=hn(Q,ze.head,"div");ze.goalColumn!=null&&(Ye.left=ze.goalColumn),pe.push(Ye.left);var ct=hl(Q,Ye,P,W);return W=="page"&&ze==ae.sel.primary()&&Sa(Q,kn(Q,ct,"div").top-Ye.top),ct},Oe),pe.length)for(var we=0;we<ae.sel.ranges.length;we++)ae.sel.ranges[we].goalColumn=pe[we]}),findWordAt:function(P){var W=this.doc,Q=sr(W,P.line).text,ae=P.ch,pe=P.ch;if(Q){var ve=this.getHelper(P,"wordChars");(P.sticky=="before"||pe==Q.length)&&ae?--ae:++pe;for(var we=Q.charAt(ae),ze=Y(we,ve)?function(Ye){return Y(Ye,ve)}:/\s/.test(we)?function(Ye){return/\s/.test(Ye)}:function(Ye){return!/\s/.test(Ye)&&!Y(Ye)};ae>0&&ze(Q.charAt(ae-1));)--ae;for(;pe<Q.length&&ze(Q.charAt(pe));)++pe}return new Ln(Nt(P.line,ae),Nt(P.line,pe))},toggleOverwrite:function(P){if(P!=null&&P==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?z(this.display.cursorDiv,"CodeMirror-overwrite"):b(this.display.cursorDiv,"CodeMirror-overwrite"),Ze(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==G()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Ri(function(P,W){ca(this,P,W)}),getScrollInfo:function(){var P=this.display.scroller;return{left:P.scrollLeft,top:P.scrollTop,height:P.scrollHeight-Je(this)-this.display.barHeight,width:P.scrollWidth-Je(this)-this.display.barWidth,clientHeight:_e(this),clientWidth:Ue(this)}},scrollIntoView:Ri(function(P,W){P==null?(P={from:this.doc.sel.primary().head,to:null},W==null&&(W=this.options.cursorScrollMargin)):typeof P=="number"?P={from:Nt(P,0),to:null}:P.from==null&&(P={from:P,to:null}),P.to||(P.to=P.from),P.margin=W||0,P.from.line!=null?co(this,P):Ca(this,P.from,P.to,P.margin)}),setSize:Ri(function(P,W){var Q=this,ae=function(ve){return typeof ve=="number"||/^\d+$/.test(String(ve))?ve+"px":ve};P!=null&&(this.display.wrapper.style.width=ae(P)),W!=null&&(this.display.wrapper.style.height=ae(W)),this.options.lineWrapping&&$r(this);var pe=this.display.viewFrom;this.doc.iter(pe,this.display.viewTo,function(ve){if(ve.widgets){for(var we=0;we<ve.widgets.length;we++)if(ve.widgets[we].noHScroll){Yn(Q,pe,"widget");break}}++pe}),this.curOp.forceUpdate=!0,Ze(this,"refresh",this)}),operation:function(P){return Bi(this,P)},startOperation:function(){return Hn(this)},endOperation:function(){return Oa(this)},refresh:Ri(function(){var P=this.display.cachedTextHeight;Un(this),this.curOp.forceUpdate=!0,qr(this),ca(this,this.doc.scrollLeft,this.doc.scrollTop),Ja(this.display),(P==null||Math.abs(P-ei(this.display))>.5||this.options.lineWrapping)&&Si(this),Ze(this,"refresh",this)}),swapDoc:Ri(function(P){var W=this.doc;return W.cm=null,this.state.selectingText&&this.state.selectingText(),vs(this,P),qr(this),this.display.input.reset(),ca(this,P.scrollLeft,P.scrollTop),this.curOp.forceScroll=!0,Qt(this,"swapDoc",this,W),W}),phrase:function(P){var W=this.options.phrases;return W&&Object.prototype.hasOwnProperty.call(W,P)?W[P]:P},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}},Ne(e),e.registerHelper=function(P,W,Q){j.hasOwnProperty(P)||(j[P]=e[P]={_global:[]}),j[P][W]=Q},e.registerGlobalHelper=function(P,W,Q,ae){e.registerHelper(P,W,ae),j[P]._global.push({pred:Q,val:ae})}}function fs(e,u,j,P,W){var Q=u,ae=j,pe=sr(e,u.line),ve=W&&e.direction=="rtl"?-j:j;function we(){var vr=u.line+ve;return vr<e.first||vr>=e.first+e.size?!1:(u=new Nt(vr,u.ch,u.sticky),pe=sr(e,vr))}function ze(vr){var ir;if(P=="codepoint"){var Cr=pe.text.charCodeAt(u.ch+(P>0?0:-1));isNaN(Cr)?ir=null:ir=new Nt(u.line,Math.max(0,Math.min(pe.text.length,u.ch+j*(Cr>=55296&&Cr<56320?2:1))),-j)}else W?ir=Ml(e.cm,pe,u,j):ir=os(pe,u,j);if(ir==null)if(!vr&&we())u=ss(W,e.cm,pe,u.line,ve);else return!1;else u=ir;return!0}if(P=="char"||P=="codepoint")ze();else if(P=="column")ze(!0);else if(P=="word"||P=="group")for(var Ye=null,ct=P=="group",at=e.cm&&e.cm.getHelper(u,"wordChars"),Ct=!0;!(j<0&&!ze(!Ct));Ct=!1){var Ut=pe.text.charAt(u.ch)||`
`,Jt=Y(Ut,at)?"w":ct&&Ut==`
`?"n":!ct||/\s/.test(Ut)?null:"p";if(ct&&!Ct&&!Jt&&(Jt="s"),Ye&&Ye!=Jt){j<0&&(j=1,ze(),u.sticky="after");break}if(Jt&&(Ye=Jt),j>0&&!ze(!Ct))break}var nr=Ho(e,u,Q,ae,!0);return mi(Q,nr)&&(nr.hitSide=!0),nr}function hl(e,u,j,P){var W=e.doc,Q=u.left,ae;if(P=="page"){var pe=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ve=Math.max(pe-.5*ei(e.display),3);ae=(j>0?u.bottom:u.top)+j*ve}else P=="line"&&(ae=j>0?u.bottom+3:u.top-3);for(var we;!(we=on(e,Q,ae),!we.outside);){if(j<0?ae<=0:ae>=W.height){we.hitSide=!0;break}ae+=j*5}return we}var Wn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Z,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Wn.prototype.init=function(e){var u=this,j=this,P=j.cm,W=j.div=e.lineDiv;cl(W,P.options.spellcheck,P.options.autocorrect,P.options.autocapitalize);function Q(pe){for(var ve=pe.target;ve;ve=ve.parentNode){if(ve==W)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ve.className))break}return!1}Ie(W,"paste",function(pe){if(!Q(pe)||tt(P,pe)||sl(pe,P))return;_<=11&&setTimeout(hi(P,function(){return u.updateFromDOM()}),20)}),Ie(W,"compositionstart",function(pe){u.composing={data:pe.data,done:!1}}),Ie(W,"compositionupdate",function(pe){u.composing||(u.composing={data:pe.data,done:!1})}),Ie(W,"compositionend",function(pe){u.composing&&(pe.data!=u.composing.data&&u.readFromDOMSoon(),u.composing.done=!0)}),Ie(W,"touchstart",function(){return j.forceCompositionEnd()}),Ie(W,"input",function(){u.composing||u.readFromDOMSoon()});function ae(pe){if(!Q(pe)||tt(P,pe))return;if(P.somethingSelected())Xo({lineWise:!1,text:P.getSelections()}),pe.type=="cut"&&P.replaceSelection("",null,"cut");else if(P.options.lineWiseCopyCut){var ve=ul(P);Xo({lineWise:!0,text:ve.text}),pe.type=="cut"&&P.operation(function(){P.setSelections(ve.ranges,0,Re),P.replaceSelection("",null,"cut")})}else return;if(pe.clipboardData){pe.clipboardData.clearData();var we=ya.text.join(`
`);if(pe.clipboardData.setData("Text",we),pe.clipboardData.getData("Text")==we){pe.preventDefault();return}}var ze=dl(),Ye=ze.firstChild;P.display.lineSpace.insertBefore(ze,P.display.lineSpace.firstChild),Ye.value=ya.text.join(`
`);var ct=document.activeElement;B(Ye),setTimeout(function(){P.display.lineSpace.removeChild(ze),ct.focus(),ct==W&&j.showPrimarySelection()},50)}Ie(W,"copy",ae),Ie(W,"cut",ae)},Wn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Wn.prototype.prepareSelection=function(){var e=Fi(this.cm,!1);return e.focus=document.activeElement==this.div,e},Wn.prototype.showSelection=function(e,u){if(!e||!this.cm.display.view.length)return;(e.focus||u)&&this.showPrimarySelection(),this.showMultipleSelections(e)},Wn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Wn.prototype.showPrimarySelection=function(){var e=this.getSelection(),u=this.cm,j=u.doc.sel.primary(),P=j.from(),W=j.to();if(u.display.viewTo==u.display.viewFrom||P.line>=u.display.viewTo||W.line<u.display.viewFrom){e.removeAllRanges();return}var Q=Yo(u,e.anchorNode,e.anchorOffset),ae=Yo(u,e.focusNode,e.focusOffset);if(Q&&!Q.bad&&ae&&!ae.bad&&_r(wi(Q,ae),P)==0&&_r(Di(Q,ae),W)==0)return;var pe=u.display.view,ve=P.line>=u.display.viewFrom&&fl(u,P)||{node:pe[0].measure.map[2],offset:0},we=W.line<u.display.viewTo&&fl(u,W);if(!we){var ze=pe[pe.length-1].measure,Ye=ze.maps?ze.maps[ze.maps.length-1]:ze.map;we={node:Ye[Ye.length-1],offset:Ye[Ye.length-2]-Ye[Ye.length-3]}}if(!ve||!we){e.removeAllRanges();return}var ct=e.rangeCount&&e.getRangeAt(0),at;try{at=N(ve.node,ve.offset,we.offset,we.node)}catch(Ct){}at&&(!C&&u.state.focused?(e.collapse(ve.node,ve.offset),at.collapsed||(e.removeAllRanges(),e.addRange(at))):(e.removeAllRanges(),e.addRange(at)),ct&&e.anchorNode==null?e.addRange(ct):C&&this.startGracePeriod()),this.rememberSelection()},Wn.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},Wn.prototype.showMultipleSelections=function(e){w(this.cm.display.cursorDiv,e.cursors),w(this.cm.display.selectionDiv,e.selection)},Wn.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Wn.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var u=e.getRangeAt(0).commonAncestorContainer;return L(this.div,u)},Wn.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Wn.prototype.blur=function(){this.div.blur()},Wn.prototype.getField=function(){return this.div},Wn.prototype.supportsTouch=function(){return!0},Wn.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Bi(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function u(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,u))}this.polling.set(this.cm.options.pollInterval,u)},Wn.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Wn.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),u=this.cm;if(f&&n&&this.cm.display.gutterSpecs.length&&tu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var j=Yo(u,e.anchorNode,e.anchorOffset),P=Yo(u,e.focusNode,e.focusOffset);j&&P&&Bi(u,function(){ki(u.doc,ga(j,P),Re),(j.bad||P.bad)&&(u.curOp.selectionChanged=!0)})},Wn.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,u=e.display,j=e.doc.sel.primary(),P=j.from(),W=j.to();if(P.ch==0&&P.line>e.firstLine()&&(P=Nt(P.line-1,sr(e.doc,P.line-1).length)),W.ch==sr(e.doc,W.line).text.length&&W.line<e.lastLine()&&(W=Nt(W.line+1,0)),P.line<u.viewFrom||W.line>u.viewTo-1)return!1;var Q,ae,pe;P.line==u.viewFrom||(Q=Fn(e,P.line))==0?(ae=Jr(u.view[0].line),pe=u.view[0].node):(ae=Jr(u.view[Q].line),pe=u.view[Q-1].node.nextSibling);var ve=Fn(e,W.line),we,ze;if(ve==u.view.length-1?(we=u.viewTo-1,ze=u.lineDiv.lastChild):(we=Jr(u.view[ve+1].line)-1,ze=u.view[ve+1].node.previousSibling),!pe)return!1;for(var Ye=e.doc.splitLines(ru(e,pe,ze,ae,we)),ct=Jn(e.doc,Nt(ae,0),Nt(we,sr(e.doc,we).text.length));Ye.length>1&&ct.length>1;)if(ne(Ye)==ne(ct))Ye.pop(),ct.pop(),we--;else if(Ye[0]==ct[0])Ye.shift(),ct.shift(),ae++;else break;for(var at=0,Ct=0,Ut=Ye[0],Jt=ct[0],nr=Math.min(Ut.length,Jt.length);at<nr&&Ut.charCodeAt(at)==Jt.charCodeAt(at);)++at;for(var vr=ne(Ye),ir=ne(ct),Cr=Math.min(vr.length-(Ye.length==1?at:0),ir.length-(ct.length==1?at:0));Ct<Cr&&vr.charCodeAt(vr.length-Ct-1)==ir.charCodeAt(ir.length-Ct-1);)++Ct;if(Ye.length==1&&ct.length==1&&ae==P.line)for(;at&&at>P.ch&&vr.charCodeAt(vr.length-Ct-1)==ir.charCodeAt(ir.length-Ct-1);)at--,Ct++;Ye[Ye.length-1]=vr.slice(0,vr.length-Ct).replace(/^\u200b+/,""),Ye[0]=Ye[0].slice(at).replace(/\u200b+$/,"");var Zr=Nt(ae,at),Kr=Nt(we,ct.length?ne(ct).length-Ct:0);if(Ye.length>1||Ye[0]||_r(Zr,Kr))return ro(e.doc,Ye,Zr,Kr,"+input"),!0},Wn.prototype.ensurePolled=function(){this.forceCompositionEnd()},Wn.prototype.reset=function(){this.forceCompositionEnd()},Wn.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},Wn.prototype.readFromDOMSoon=function(){var e=this;if(this.readDOMTimeout!=null)return;this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80)},Wn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Bi(this.cm,function(){return Un(e.cm)})},Wn.prototype.setUneditable=function(e){e.contentEditable="false"},Wn.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||hi(this.cm,hs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},Wn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Wn.prototype.onContextMenu=function(){},Wn.prototype.resetPosition=function(){},Wn.prototype.needsContentAttribute=!0;function fl(e,u){var j=$e(e,u.line);if(!j||j.hidden)return null;var P=sr(e.doc,u.line),W=Se(j,P,u.line),Q=dt(P,e.doc.direction),ae="left";if(Q){var pe=it(Q,u.ch);ae=pe%2?"right":"left"}var ve=Dt(W.map,u.ch,ae);return ve.offset=ve.collapse=="right"?ve.end:ve.start,ve}function tu(e){for(var u=e;u;u=u.parentNode)if(/CodeMirror-gutter-wrapper/.test(u.className))return!0;return!1}function so(e,u){return u&&(e.bad=!0),e}function ru(e,u,j,P,W){var Q="",ae=!1,pe=e.doc.lineSeparator(),ve=!1;function we(at){return function(Ct){return Ct.id==at}}function ze(){ae&&(Q+=pe,ve&&(Q+=pe),ae=ve=!1)}function Ye(at){at&&(ze(),Q+=at)}function ct(at){if(at.nodeType==1){var Ct=at.getAttribute("cm-text");if(Ct){Ye(Ct);return}var Ut=at.getAttribute("cm-marker"),Jt;if(Ut){var nr=e.findMarks(Nt(P,0),Nt(W+1,0),we(+Ut));nr.length&&(Jt=nr[0].find(0))&&Ye(Jn(e.doc,Jt.from,Jt.to).join(pe));return}if(at.getAttribute("contenteditable")=="false")return;var vr=/^(pre|div|p|li|table|br)$/i.test(at.nodeName);if(!/^br$/i.test(at.nodeName)&&at.textContent.length==0)return;vr&&ze();for(var ir=0;ir<at.childNodes.length;ir++)ct(at.childNodes[ir]);/^(pre|p)$/i.test(at.nodeName)&&(ve=!0),vr&&(ae=!0)}else at.nodeType==3&&Ye(at.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(ct(u),u==j);)u=u.nextSibling,ve=!1;return Q}function Yo(e,u,j){var P;if(u==e.display.lineDiv){if(P=e.display.lineDiv.childNodes[j],!P)return so(e.clipPos(Nt(e.display.viewTo-1)),!0);u=null,j=0}else for(P=u;;P=P.parentNode){if(!P||P==e.display.lineDiv)return null;if(P.parentNode&&P.parentNode==e.display.lineDiv)break}for(var W=0;W<e.display.view.length;W++){var Q=e.display.view[W];if(Q.node==P)return nu(Q,u,j)}}function nu(e,u,j){var P=e.text.firstChild,W=!1;if(!u||!L(P,u))return so(Nt(Jr(e.line),0),!0);if(u==P&&(W=!0,u=P.childNodes[j],j=0,!u)){var Q=e.rest?ne(e.rest):e.line;return so(Nt(Jr(Q),Q.text.length),W)}var ae=u.nodeType==3?u:null,pe=u;for(!ae&&u.childNodes.length==1&&u.firstChild.nodeType==3&&(ae=u.firstChild,j&&(j=ae.nodeValue.length));pe.parentNode!=P;)pe=pe.parentNode;var ve=e.measure,we=ve.maps;function ze(Jt,nr,vr){for(var ir=-1;ir<(we?we.length:0);ir++)for(var Cr=ir<0?ve.map:we[ir],Zr=0;Zr<Cr.length;Zr+=3){var Kr=Cr[Zr+2];if(Kr==Jt||Kr==nr){var _n=Jr(ir<0?e.line:e.rest[ir]),$n=Cr[Zr]+vr;return(vr<0||Kr!=Jt)&&($n=Cr[Zr+(vr?1:0)]),Nt(_n,$n)}}}var Ye=ze(ae,pe,j);if(Ye)return so(Ye,W);for(var ct=pe.nextSibling,at=ae?ae.nodeValue.length-j:0;ct;ct=ct.nextSibling){if(Ye=ze(ct,ct.firstChild,0),Ye)return so(Nt(Ye.line,Ye.ch-at),W);at+=ct.textContent.length}for(var Ct=pe.previousSibling,Ut=j;Ct;Ct=Ct.previousSibling){if(Ye=ze(Ct,Ct.firstChild,-1),Ye)return so(Nt(Ye.line,Ye.ch+Ut),W);Ut+=Ct.textContent.length}}var pi=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Z,this.hasSelection=!1,this.composing=null};pi.prototype.init=function(e){var u=this,j=this,P=this.cm;this.createField(e);var W=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),d&&(W.style.width="0px"),Ie(W,"input",function(){S&&_>=9&&u.hasSelection&&(u.hasSelection=null),j.poll()}),Ie(W,"paste",function(ae){if(tt(P,ae)||sl(ae,P))return;P.state.pasteIncoming=+new Date,j.fastPoll()});function Q(ae){if(tt(P,ae))return;if(P.somethingSelected())Xo({lineWise:!1,text:P.getSelections()});else if(P.options.lineWiseCopyCut){var pe=ul(P);Xo({lineWise:!0,text:pe.text}),ae.type=="cut"?P.setSelections(pe.ranges,null,Re):(j.prevInput="",W.value=pe.text.join(`
`),B(W))}else return;ae.type=="cut"&&(P.state.cutIncoming=+new Date)}Ie(W,"cut",Q),Ie(W,"copy",Q),Ie(e.scroller,"paste",function(ae){if(mn(e,ae)||tt(P,ae))return;if(!W.dispatchEvent){P.state.pasteIncoming=+new Date,j.focus();return}var pe=new Event("paste");pe.clipboardData=ae.clipboardData,W.dispatchEvent(pe)}),Ie(e.lineSpace,"selectstart",function(ae){mn(e,ae)||xe(ae)}),Ie(W,"compositionstart",function(){var ae=P.getCursor("from");j.composing&&j.composing.range.clear(),j.composing={start:ae,range:P.markText(ae,P.getCursor("to"),{className:"CodeMirror-composing"})}}),Ie(W,"compositionend",function(){j.composing&&(j.poll(),j.composing.range.clear(),j.composing=null)})},pi.prototype.createField=function(e){this.wrapper=dl(),this.textarea=this.wrapper.firstChild},pi.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},pi.prototype.prepareSelection=function(){var e=this.cm,u=e.display,j=e.doc,P=Fi(e);if(e.options.moveInputWithCursor){var W=hn(e,j.sel.primary().head,"div"),Q=u.wrapper.getBoundingClientRect(),ae=u.lineDiv.getBoundingClientRect();P.teTop=Math.max(0,Math.min(u.wrapper.clientHeight-10,W.top+ae.top-Q.top)),P.teLeft=Math.max(0,Math.min(u.wrapper.clientWidth-10,W.left+ae.left-Q.left))}return P},pi.prototype.showSelection=function(e){var u=this.cm,j=u.display;w(j.cursorDiv,e.cursors),w(j.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},pi.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var u=this.cm;if(u.somethingSelected()){this.prevInput="";var j=u.getSelection();this.textarea.value=j,u.state.focused&&B(this.textarea),S&&_>=9&&(this.hasSelection=j)}else e||(this.prevInput=this.textarea.value="",S&&_>=9&&(this.hasSelection=null))},pi.prototype.getField=function(){return this.textarea},pi.prototype.supportsTouch=function(){return!1},pi.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!l||G()!=this.textarea))try{this.textarea.focus()}catch(e){}},pi.prototype.blur=function(){this.textarea.blur()},pi.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},pi.prototype.receivedFocus=function(){this.slowPoll()},pi.prototype.slowPoll=function(){var e=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},pi.prototype.fastPoll=function(){var e=!1,u=this;u.pollingFast=!0;function j(){var P=u.poll();!P&&!e?(e=!0,u.polling.set(60,j)):(u.pollingFast=!1,u.slowPoll())}u.polling.set(20,j)},pi.prototype.poll=function(){var e=this,u=this.cm,j=this.textarea,P=this.prevInput;if(this.contextMenuPending||!u.state.focused||Ot(j)&&!P&&!this.composing||u.isReadOnly()||u.options.disableInput||u.state.keySeq)return!1;var W=j.value;if(W==P&&!u.somethingSelected())return!1;if(S&&_>=9&&this.hasSelection===W||o&&/[\uf700-\uf7ff]/.test(W))return u.display.input.reset(),!1;if(u.doc.sel==u.display.selForContextMenu){var Q=W.charCodeAt(0);if(Q==8203&&!P&&(P="\u200B"),Q==8666)return this.reset(),this.cm.execCommand("undo")}for(var ae=0,pe=Math.min(P.length,W.length);ae<pe&&P.charCodeAt(ae)==W.charCodeAt(ae);)++ae;return Bi(u,function(){hs(u,W.slice(ae),P.length-ae,null,e.composing?"*compose":null),W.length>1e3||W.indexOf(`
`)>-1?j.value=e.prevInput="":e.prevInput=W,e.composing&&(e.composing.range.clear(),e.composing.range=u.markText(e.composing.start,u.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},pi.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},pi.prototype.onKeyPress=function(){S&&_>=9&&(this.hasSelection=null),this.fastPoll()},pi.prototype.onContextMenu=function(e){var u=this,j=u.cm,P=j.display,W=u.textarea;u.contextMenuPending&&u.contextMenuPending();var Q=ci(j,e),ae=P.scroller.scrollTop;if(!Q||c)return;var pe=j.options.resetSelectionOnContextMenu;pe&&j.doc.sel.contains(Q)==-1&&hi(j,ki)(j.doc,ga(Q),Re);var ve=W.style.cssText,we=u.wrapper.style.cssText,ze=u.wrapper.offsetParent.getBoundingClientRect();u.wrapper.style.cssText="position: static",W.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-ze.top-5)+"px; left: "+(e.clientX-ze.left-5)+`px;
z-index: 1000; background: `+(S?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Ye;t&&(Ye=window.scrollY),P.input.focus(),t&&window.scrollTo(null,Ye),P.input.reset(),j.somethingSelected()||(W.value=u.prevInput=" "),u.contextMenuPending=at,P.selForContextMenu=j.doc.sel,clearTimeout(P.detectingSelectAll);function ct(){if(W.selectionStart!=null){var Ut=j.somethingSelected(),Jt="\u200B"+(Ut?W.value:"");W.value="\u21DA",W.value=Jt,u.prevInput=Ut?"":"\u200B",W.selectionStart=1,W.selectionEnd=Jt.length,P.selForContextMenu=j.doc.sel}}function at(){if(u.contextMenuPending!=at)return;if(u.contextMenuPending=!1,u.wrapper.style.cssText=we,W.style.cssText=ve,S&&_<9&&P.scrollbars.setScrollTop(P.scroller.scrollTop=ae),W.selectionStart!=null){(!S||S&&_<9)&&ct();var Ut=0,Jt=function(){P.selForContextMenu==j.doc.sel&&W.selectionStart==0&&W.selectionEnd>0&&u.prevInput=="\u200B"?hi(j,Is)(j):Ut++<10?P.detectingSelectAll=setTimeout(Jt,500):(P.selForContextMenu=null,P.input.reset())};P.detectingSelectAll=setTimeout(Jt,200)}}if(S&&_>=9&&ct(),R){Me(e);var Ct=function(){ft(window,"mouseup",Ct),setTimeout(at,20)};Ie(window,"mouseup",Ct)}else setTimeout(at,50)},pi.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},pi.prototype.setUneditable=function(){},pi.prototype.needsContentAttribute=!1;function iu(e,u){if(u=u?I(u):{},u.value=e.value,!u.tabindex&&e.tabIndex&&(u.tabindex=e.tabIndex),!u.placeholder&&e.placeholder&&(u.placeholder=e.placeholder),u.autofocus==null){var j=G();u.autofocus=j==e||e.getAttribute("autofocus")!=null&&j==document.body}function P(){e.value=pe.getValue()}var W;if(e.form&&(Ie(e.form,"submit",P),!u.leaveSubmitMethodAlone)){var Q=e.form;W=Q.submit;try{var ae=Q.submit=function(){P(),Q.submit=W,Q.submit(),Q.submit=ae}}catch(ve){}}u.finishInit=function(ve){ve.save=P,ve.getTextArea=function(){return e},ve.toTextArea=function(){ve.toTextArea=isNaN,P(),e.parentNode.removeChild(ve.getWrapperElement()),e.style.display="",e.form&&(ft(e.form,"submit",P),!u.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=W))}},e.style.display="none";var pe=ti(function(ve){return e.parentNode.insertBefore(ve,e.nextSibling)},u);return pe}function au(e){e.off=ft,e.on=Ie,e.wheelEventPixels=fo,e.Doc=$i,e.splitLines=dr,e.countColumn=K,e.findColumn=be,e.isWordChar=q,e.Pass=Ce,e.signal=Ze,e.Line=jr,e.changeEnd=va,e.scrollbarModel=hr,e.Pos=Nt,e.cmpPos=_r,e.modes=bn,e.mimeModes=Ar,e.resolveMode=Vt,e.getMode=En,e.modeExtensions=fr,e.extendMode=br,e.copyState=Br,e.startState=Kn,e.innerMode=Pn,e.commands=So,e.keyMap=Ia,e.keyName=Vs,e.isModifierKey=Ks,e.lookupKey=io,e.normalizeKeyMap=kl,e.StringStream=dn,e.SharedTextMarker=xo,e.TextMarker=ja,e.LineWidget=Eo,e.e_preventDefault=xe,e.e_stopPropagation=Ae,e.e_stop=Me,e.addClass=z,e.contains=L,e.rmClass=b,e.keyNames=Fa}Jl(ti),eu(ti);var ou="iter insert remove copy getEditor constructor".split(" ");for(var $o in $i.prototype)$i.prototype.hasOwnProperty($o)&&ue(ou,$o)<0&&(ti.prototype[$o]=function(e){return function(){return e.apply(this.doc,arguments)}}($i.prototype[$o]));return Ne($i),ti.inputStyles={textarea:pi,contenteditable:Wn},ti.defineMode=function(e){!ti.defaults.mode&&e!="null"&&(ti.defaults.mode=e),fn.apply(this,arguments)},ti.defineMIME=cn,ti.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),ti.defineMIME("text/plain","null"),ti.defineExtension=function(e,u){ti.prototype[e]=u},ti.defineDocExtension=function(e,u){$i.prototype[e]=u},ti.fromTextArea=iu,au(ti),ti.version="5.58.2",ti})},WYAk:function(H,J,D){(function(k,g){H.exports=J=g(D("Ib8C"))})(this,function(k){(function(){var g=k,C=g.lib,M=C.Base,m=g.enc,y=m.Utf8,S=g.algo,_=S.HMAC=M.extend({init:function(t,h){t=this._hasher=new t.init,typeof h=="string"&&(h=y.parse(h));var n=t.blockSize,c=n*4;h.sigBytes>c&&(h=t.finalize(h)),h.clamp();for(var a=this._oKey=h.clone(),i=this._iKey=h.clone(),s=a.words,d=i.words,f=0;f<n;f++)s[f]^=1549556828,d[f]^=909522486;a.sigBytes=i.sigBytes=c,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var h=this._hasher,n=h.finalize(t);h.reset();var c=h.finalize(this._oKey.clone().concat(n));return c}})})()})},WaYH:function(H,J,D){"use strict";var k=D("rePB"),g=D("Ff2n"),C=D("VTBJ"),M=D("1OyB"),m=D("vuIU"),y=D("JX7q"),S=D("Ji7U"),_=D("LK+K"),t=D("q1tI"),h=D("TSYQ"),n=D.n(h),c=D("sboe"),a=D("OZM5"),i=function(R){var O=R.prefixCls,b=R.level,E=R.isStart,w=R.isEnd;if(!b)return null;for(var T="".concat(O,"-indent-unit"),F=[],N=0;N<b;N+=1){var L;F.push(t.createElement("span",{key:N,className:n()(T,(L={},Object(k.a)(L,"".concat(T,"-start"),E[N+1]),Object(k.a)(L,"".concat(T,"-end"),w[N+1]),Object(k.a)(L,"".concat(T,"-end-first-level"),!N&&w[0]),L))}))}return t.createElement("span",{"aria-hidden":"true",className:"".concat(O,"-indent")},F)},s=i,d=D("815F"),f="open",l="close",o="---",r=function(p){Object(S.a)(O,p);var R=Object(_.a)(O);function O(){var b;return Object(M.a)(this,O),b=R.apply(this,arguments),b.state={dragNodeHighlight:!1},b.onSelectorClick=function(E){var w=b.props.context.onNodeClick;w(E,Object(d.b)(b.props)),b.isSelectable()?b.onSelect(E):b.onCheck(E)},b.onSelectorDoubleClick=function(E){var w=b.props.context.onNodeDoubleClick;w(E,Object(d.b)(b.props))},b.onSelect=function(E){if(b.isDisabled())return;var w=b.props.context.onNodeSelect;E.preventDefault(),w(E,Object(d.b)(b.props))},b.onCheck=function(E){if(b.isDisabled())return;var w=b.props,T=w.disableCheckbox,F=w.checked,N=b.props.context.onNodeCheck;if(!b.isCheckable()||T)return;E.preventDefault();var L=!F;N(E,Object(d.b)(b.props),L)},b.onMouseEnter=function(E){var w=b.props.context.onNodeMouseEnter;w(E,Object(d.b)(b.props))},b.onMouseLeave=function(E){var w=b.props.context.onNodeMouseLeave;w(E,Object(d.b)(b.props))},b.onContextMenu=function(E){var w=b.props.context.onNodeContextMenu;w(E,Object(d.b)(b.props))},b.onDragStart=function(E){var w=b.props.context.onNodeDragStart;E.stopPropagation(),b.setState({dragNodeHighlight:!0}),w(E,Object(y.a)(b));try{E.dataTransfer.setData("text/plain","")}catch(T){}},b.onDragEnter=function(E){var w=b.props.context.onNodeDragEnter;E.preventDefault(),E.stopPropagation(),w(E,Object(y.a)(b))},b.onDragOver=function(E){var w=b.props.context.onNodeDragOver;E.preventDefault(),E.stopPropagation(),w(E,Object(y.a)(b))},b.onDragLeave=function(E){var w=b.props.context.onNodeDragLeave;E.stopPropagation(),w(E,Object(y.a)(b))},b.onDragEnd=function(E){var w=b.props.context.onNodeDragEnd;E.stopPropagation(),b.setState({dragNodeHighlight:!1}),w(E,Object(y.a)(b))},b.onDrop=function(E){var w=b.props.context.onNodeDrop;E.preventDefault(),E.stopPropagation(),b.setState({dragNodeHighlight:!1}),w(E,Object(y.a)(b))},b.onExpand=function(E){var w=b.props.context.onNodeExpand;w(E,Object(d.b)(b.props))},b.setSelectHandle=function(E){b.selectHandle=E},b.getNodeState=function(){var E=b.props.expanded;return b.isLeaf()?null:E?f:l},b.hasChildren=function(){var E=b.props.eventKey,w=b.props.context.keyEntities,T=w[E]||{},F=T.children;return!!(F||[]).length},b.isLeaf=function(){var E=b.props,w=E.isLeaf,T=E.loaded,F=b.props.context.loadData,N=b.hasChildren();return w===!1?!1:w||!F&&!N||F&&T&&!N},b.isDisabled=function(){var E=b.props.disabled,w=b.props.context.disabled;return!!(w||E)},b.isCheckable=function(){var E=b.props.checkable,w=b.props.context.checkable;return!w||E===!1?!1:w},b.syncLoadData=function(E){var w=E.expanded,T=E.loading,F=E.loaded,N=b.props.context,L=N.loadData,G=N.onNodeLoad;if(T)return;L&&w&&!b.isLeaf()&&(!b.hasChildren()&&!F&&G(Object(d.b)(b.props)))},b.renderSwitcher=function(){var E=b.props,w=E.expanded,T=E.switcherIcon,F=b.props.context,N=F.prefixCls,L=F.switcherIcon,G=T||L;if(b.isLeaf())return t.createElement("span",{className:n()("".concat(N,"-switcher"),"".concat(N,"-switcher-noop"))},typeof G=="function"?G(Object(C.a)(Object(C.a)({},b.props),{},{isLeaf:!0})):G);var z=n()("".concat(N,"-switcher"),"".concat(N,"-switcher_").concat(w?f:l));return t.createElement("span",{onClick:b.onExpand,className:z},typeof G=="function"?G(Object(C.a)(Object(C.a)({},b.props),{},{isLeaf:!1})):G)},b.renderCheckbox=function(){var E=b.props,w=E.checked,T=E.halfChecked,F=E.disableCheckbox,N=b.props.context.prefixCls,L=b.isDisabled(),G=b.isCheckable();if(!G)return null;var z=typeof G!="boolean"?G:null;return t.createElement("span",{className:n()("".concat(N,"-checkbox"),w&&"".concat(N,"-checkbox-checked"),!w&&T&&"".concat(N,"-checkbox-indeterminate"),(L||F)&&"".concat(N,"-checkbox-disabled")),onClick:b.onCheck},z)},b.renderIcon=function(){var E=b.props.loading,w=b.props.context.prefixCls;return t.createElement("span",{className:n()("".concat(w,"-iconEle"),"".concat(w,"-icon__").concat(b.getNodeState()||"docu"),E&&"".concat(w,"-icon_loading"))})},b.renderSelector=function(){var E=b.state.dragNodeHighlight,w=b.props,T=w.title,F=w.selected,N=w.icon,L=w.loading,G=w.data,z=b.props.context,A=z.prefixCls,B=z.showIcon,U=z.icon,I=z.draggable,K=z.loadData,Z=z.titleRender,ue=b.isDisabled(),de="".concat(A,"-node-content-wrapper"),Ce;if(B){var Re=N||U;Ce=Re?t.createElement("span",{className:n()("".concat(A,"-iconEle"),"".concat(A,"-icon__customize"))},typeof Re=="function"?Re(b.props):Re):b.renderIcon()}else K&&L&&(Ce=b.renderIcon());var me;typeof T=="function"?me=T(G):Z?me=Z(G):me=T;var Oe=t.createElement("span",{className:"".concat(A,"-title")},me);return t.createElement("span",{ref:b.setSelectHandle,title:typeof T=="string"?T:"",className:n()("".concat(de),"".concat(de,"-").concat(b.getNodeState()||"normal"),!ue&&(F||E)&&"".concat(A,"-node-selected"),!ue&&I&&"draggable"),draggable:!ue&&I||void 0,"aria-grabbed":!ue&&I||void 0,onMouseEnter:b.onMouseEnter,onMouseLeave:b.onMouseLeave,onContextMenu:b.onContextMenu,onClick:b.onSelectorClick,onDoubleClick:b.onSelectorDoubleClick,onDragStart:I?b.onDragStart:void 0},Ce,Oe)},b}return Object(m.a)(O,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var E=this.props.selectable,w=this.props.context.selectable;return typeof E=="boolean"?E:w}},{key:"render",value:function(){var E,w=this.props,T=w.eventKey,F=w.className,N=w.style,L=w.dragOver,G=w.dragOverGapTop,z=w.dragOverGapBottom,A=w.isLeaf,B=w.isStart,U=w.isEnd,I=w.expanded,K=w.selected,Z=w.checked,ue=w.halfChecked,de=w.loading,Ce=w.domRef,Re=w.active,me=w.onMouseMove,Oe=Object(g.a)(w,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),be=this.props.context,ce=be.prefixCls,se=be.filterTreeNode,ne=be.draggable,ge=be.keyEntities,ee=this.isDisabled(),re=Object(a.f)(Oe),Te=ge[T]||{},ie=Te.level,q=U[U.length-1];return t.createElement("div",Object.assign({ref:Ce,className:n()(F,"".concat(ce,"-treenode"),(E={},Object(k.a)(E,"".concat(ce,"-treenode-disabled"),ee),Object(k.a)(E,"".concat(ce,"-treenode-switcher-").concat(I?"open":"close"),!A),Object(k.a)(E,"".concat(ce,"-treenode-checkbox-checked"),Z),Object(k.a)(E,"".concat(ce,"-treenode-checkbox-indeterminate"),ue),Object(k.a)(E,"".concat(ce,"-treenode-selected"),K),Object(k.a)(E,"".concat(ce,"-treenode-loading"),de),Object(k.a)(E,"".concat(ce,"-treenode-active"),Re),Object(k.a)(E,"".concat(ce,"-treenode-leaf-last"),q),Object(k.a)(E,"drag-over",!ee&&L),Object(k.a)(E,"drag-over-gap-top",!ee&&G),Object(k.a)(E,"drag-over-gap-bottom",!ee&&z),Object(k.a)(E,"filter-node",se&&se(Object(d.b)(this.props))),E)),style:N,onDragEnter:ne?this.onDragEnter:void 0,onDragOver:ne?this.onDragOver:void 0,onDragLeave:ne?this.onDragLeave:void 0,onDrop:ne?this.onDrop:void 0,onDragEnd:ne?this.onDragEnd:void 0,onMouseMove:me},re),t.createElement(s,{prefixCls:ce,level:ie,isStart:B,isEnd:U}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),O}(t.Component),x=function(R){return t.createElement(c.a.Consumer,null,function(O){return t.createElement(r,Object.assign({},R,{context:O}))})};x.displayName="TreeNode",x.defaultProps={title:o},x.isTreeNode=1;var v=J.a=x},Y1PL:function(H,J,D){"use strict";D.r(J),D.d(J,"ResizableTextArea",function(){return ue});var k=D("wx14"),g=D("1OyB"),C=D("vuIU"),M=D("Ji7U"),m=D("LK+K"),y=D("q1tI"),S=D("VTBJ"),_=D("rePB"),t=D("Zm9Q"),h=D("Kwbf"),n=D("c+Xe"),c=D("m+aA"),a=D("bdgK"),i=new Map;function s(Re){Re.forEach(function(me){var Oe,be=me.target;(Oe=i.get(be))===null||Oe===void 0||Oe.forEach(function(ce){return ce(be)})})}var d=new a.default(s),f=null,l=null;function o(Re,me){i.has(Re)||(i.set(Re,new Set),d.observe(Re)),i.get(Re).add(me)}function r(Re,me){i.has(Re)&&(i.get(Re).delete(me),i.get(Re).size||(d.unobserve(Re),i.delete(Re)))}var x=function(Re){Object(M.a)(Oe,Re);var me=Object(m.a)(Oe);function Oe(){return Object(g.a)(this,Oe),me.apply(this,arguments)}return Object(C.a)(Oe,[{key:"render",value:function(){return this.props.children}}]),Oe}(y.Component),v=y.createContext(null);function p(Re){var me=Re.children,Oe=Re.onBatchResize,be=y.useRef(0),ce=y.useRef([]),se=y.useContext(v),ne=y.useCallback(function(ge,ee,re){be.current+=1;var Te=be.current;ce.current.push({size:ge,element:ee,data:re}),Promise.resolve().then(function(){Te===be.current&&(Oe==null||Oe(ce.current),ce.current=[])}),se==null||se(ge,ee,re)},[Oe,se]);return y.createElement(v.Provider,{value:ne},me)}function R(Re){var me=Re.children,Oe=Re.disabled,be=y.useRef(null),ce=y.useRef(null),se=y.useContext(v),ne=y.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),ge=y.isValidElement(me)&&Object(n.c)(me),ee=ge?me.ref:null,re=y.useMemo(function(){return Object(n.a)(ee,be)},[ee,be]),Te=y.useRef(Re);Te.current=Re;var ie=y.useCallback(function(q){var Y=Te.current,X=Y.onResize,he=Y.data,fe=q.getBoundingClientRect(),Ee=fe.width,He=fe.height,Qe=q.offsetWidth,et=q.offsetHeight,it=Math.floor(Ee),ut=Math.floor(He);if(ne.current.width!==it||ne.current.height!==ut||ne.current.offsetWidth!==Qe||ne.current.offsetHeight!==et){var dt={width:it,height:ut,offsetWidth:Qe,offsetHeight:et};ne.current=dt;var Fe=Qe===Math.round(Ee)?Ee:Qe,Ie=et===Math.round(He)?He:et,st=Object(S.a)(Object(S.a)({},dt),{},{offsetWidth:Fe,offsetHeight:Ie});se==null||se(st,q,he),X&&Promise.resolve().then(function(){X(st,q)})}},[]);return y.useEffect(function(){var q=Object(c.a)(be.current)||Object(c.a)(ce.current);return q&&!Oe&&o(q,ie),function(){return r(q,ie)}},[be.current,Oe]),y.createElement(x,{ref:ce},ge?y.cloneElement(me,{ref:re}):me)}var O="rc-observer-key";function b(Re){var me=Re.children,Oe=Object(t.a)(me);return Oe.map(function(be,ce){var se=(be==null?void 0:be.key)||"".concat(O,"-").concat(ce);return y.createElement(R,Object(k.a)({},Re,{key:se}),be)})}b.Collection=p;var E=b,w=D("bT9E"),T=D("TSYQ"),F=D.n(T),N=`
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
`,L=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],G={},z;function A(Re){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Oe=Re.getAttribute("id")||Re.getAttribute("data-reactid")||Re.getAttribute("name");if(me&&G[Oe])return G[Oe];var be=window.getComputedStyle(Re),ce=be.getPropertyValue("box-sizing")||be.getPropertyValue("-moz-box-sizing")||be.getPropertyValue("-webkit-box-sizing"),se=parseFloat(be.getPropertyValue("padding-bottom"))+parseFloat(be.getPropertyValue("padding-top")),ne=parseFloat(be.getPropertyValue("border-bottom-width"))+parseFloat(be.getPropertyValue("border-top-width")),ge=L.map(function(re){return"".concat(re,":").concat(be.getPropertyValue(re))}).join(";"),ee={sizingStyle:ge,paddingSize:se,borderSize:ne,boxSizing:ce};return me&&Oe&&(G[Oe]=ee),ee}function B(Re){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,be=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;z||(z=document.createElement("textarea"),z.setAttribute("tab-index","-1"),z.setAttribute("aria-hidden","true"),document.body.appendChild(z)),Re.getAttribute("wrap")?z.setAttribute("wrap",Re.getAttribute("wrap")):z.removeAttribute("wrap");var ce=A(Re,me),se=ce.paddingSize,ne=ce.borderSize,ge=ce.boxSizing,ee=ce.sizingStyle;z.setAttribute("style","".concat(ee,";").concat(N)),z.value=Re.value||Re.placeholder||"";var re=Number.MIN_SAFE_INTEGER,Te=Number.MAX_SAFE_INTEGER,ie=z.scrollHeight,q;if(ge==="border-box"?ie+=ne:ge==="content-box"&&(ie-=se),Oe!==null||be!==null){z.value=" ";var Y=z.scrollHeight-se;Oe!==null&&(re=Y*Oe,ge==="border-box"&&(re=re+se+ne),ie=Math.max(re,ie)),be!==null&&(Te=Y*be,ge==="border-box"&&(Te=Te+se+ne),q=ie>Te?"":"hidden",ie=Math.min(Te,ie))}return{height:ie,minHeight:re,maxHeight:Te,overflowY:q,resize:"none"}}var U=D("Gytx"),I=D.n(U),K;(function(Re){Re[Re.NONE=0]="NONE",Re[Re.RESIZING=1]="RESIZING",Re[Re.RESIZED=2]="RESIZED"})(K||(K={}));var Z=function(Re){Object(M.a)(Oe,Re);var me=Object(m.a)(Oe);function Oe(be){var ce;return Object(g.a)(this,Oe),ce=me.call(this,be),ce.nextFrameActionId=void 0,ce.resizeFrameId=void 0,ce.textArea=void 0,ce.saveTextArea=function(se){ce.textArea=se},ce.handleResize=function(se){var ne=ce.state.resizeStatus,ge=ce.props,ee=ge.autoSize,re=ge.onResize;if(ne!==K.NONE)return;typeof re=="function"&&re(se),ee&&ce.resizeOnNextFrame()},ce.resizeOnNextFrame=function(){cancelAnimationFrame(ce.nextFrameActionId),ce.nextFrameActionId=requestAnimationFrame(ce.resizeTextarea)},ce.resizeTextarea=function(){var se=ce.props.autoSize;if(!se||!ce.textArea)return;var ne=se.minRows,ge=se.maxRows,ee=B(ce.textArea,!1,ne,ge);ce.setState({textareaStyles:ee,resizeStatus:K.RESIZING},function(){cancelAnimationFrame(ce.resizeFrameId),ce.resizeFrameId=requestAnimationFrame(function(){ce.setState({resizeStatus:K.RESIZED},function(){ce.resizeFrameId=requestAnimationFrame(function(){ce.setState({resizeStatus:K.NONE}),ce.fixFirefoxAutoScroll()})})})})},ce.renderTextArea=function(){var se=ce.props,ne=se.prefixCls,ge=ne===void 0?"rc-textarea":ne,ee=se.autoSize,re=se.onResize,Te=se.className,ie=se.disabled,q=ce.state,Y=q.textareaStyles,X=q.resizeStatus,he=Object(w.a)(ce.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),fe=F()(ge,Te,Object(_.a)({},"".concat(ge,"-disabled"),ie));"value"in he&&(he.value=he.value||"");var Ee=Object(S.a)(Object(S.a)(Object(S.a)({},ce.props.style),Y),X===K.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return y.createElement(E,{onResize:ce.handleResize,disabled:!(ee||re)},y.createElement("textarea",Object(k.a)({},he,{className:fe,style:Ee,ref:ce.saveTextArea})))},ce.state={textareaStyles:{},resizeStatus:K.NONE},ce}return Object(C.a)(Oe,[{key:"componentDidUpdate",value:function(ce){(ce.value!==this.props.value||!I()(ce.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 ce=this.textArea.selectionStart,se=this.textArea.selectionEnd;this.textArea.setSelectionRange(ce,se)}}catch(ne){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Oe}(y.Component),ue=Z,de=function(Re){Object(M.a)(Oe,Re);var me=Object(m.a)(Oe);function Oe(be){var ce;Object(g.a)(this,Oe),ce=me.call(this,be),ce.resizableTextArea=void 0,ce.focus=function(){ce.resizableTextArea.textArea.focus()},ce.saveTextArea=function(ne){ce.resizableTextArea=ne},ce.handleChange=function(ne){var ge=ce.props.onChange;ce.setValue(ne.target.value,function(){ce.resizableTextArea.resizeTextarea()}),ge&&ge(ne)},ce.handleKeyDown=function(ne){var ge=ce.props,ee=ge.onPressEnter,re=ge.onKeyDown;ne.keyCode===13&&ee&&ee(ne),re&&re(ne)};var se=typeof be.value=="undefined"||be.value===null?be.defaultValue:be.value;return ce.state={value:se},ce}return Object(C.a)(Oe,[{key:"setValue",value:function(ce,se){"value"in this.props||this.setState({value:ce},se)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return y.createElement(ue,Object(k.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(ce){return"value"in ce?{value:ce.value}:null}}]),Oe}(y.Component),Ce=J.default=de},ZW9T:function(H,J,D){"use strict";D.d(J,"a",function(){return U});var k=D("k1fw"),g=D("oBTY"),C=D("miYZ"),M=D("tsqr"),m=D("rAM+"),y=D("tJVT"),S=D("PpiC"),_=D("q1tI"),t=D.n(_),h=D("bdgK"),n=D("9og8"),c=D("WmNS"),a=D.n(c),i={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},s={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"]},d={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(`
`)}]},f={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(`
`)}]},l=D("5VLF"),o=D.n(l),r={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"]}},x=function(K,Z){return Z.map(function(ue){return{label:ue,kind:K.languages.CompletionItemKind.Keyword,insertText:ue}})},v=function(K){return Object.keys(r.tables).map(function(Z){return{label:Z,kind:K.languages.CompletionItemKind.Variable,insertText:Z}})},p=function(K,Z){var ue=r.tables[K];return ue?ue.map(function(de){return{label:de,kind:Z.languages.CompletionItemKind.Field,insertText:de}}):[]};function R(I,K,Z,ue,de){var Ce=K.getWordUntilPosition(Z),Re={startLineNumber:Z.lineNumber,endLineNumber:Z.lineNumber,startColumn:Ce.startColumn,endColumn:Ce.endColumn},me=ue.map(function(Oe){return{label:Oe,kind:I.languages.CompletionItemKind.Keyword,insertText:Oe,insertTextRules:I.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}});return de.map(function(Oe){me.push(Object(k.a)(Object(k.a)({},Oe),{},{range:Re}))}),me}var O=function(I){r.languages.map(function(de){return I.languages.registerDocumentFormattingEditProvider(de,{provideDocumentFormattingEdits:function(Re,me,Oe){return Object(n.a)(a.a.mark(function be(){var ce;return a.a.wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:return ce=o()(Re.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}),ne.abrupt("return",[{range:Re.getFullModelRange(),text:ce}]);case 2:case"end":return ne.stop()}},be)}))()}}),de});var K=d.quickKey.map(function(de){return{label:de.label,kind:I.languages.CompletionItemKind.Method,insertText:de.content,insertTextRules:I.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),Z=f.quickKey.map(function(de){return{label:de.label,kind:I.languages.CompletionItemKind.Method,insertText:de.content,insertTextRules:I.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),ue=s.quickKey.map(function(de){return{label:de.label,kind:I.languages.CompletionItemKind.Method,insertText:de.content,insertTextRules:I.languages.CompletionItemInsertTextRule.InsertAsSnippet}});I.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Ce,Re){var me=Ce.getWordUntilPosition(Re),Oe={startLineNumber:Re.lineNumber,endLineNumber:Re.lineNumber,startColumn:me.startColumn,endColumn:me.endColumn},be=Ce.getLineContent(Re.lineNumber).substring(me.startColumn-2,me.endColumn);return{suggestions:[].concat(Object(g.a)(d.keywords.map(function(ce){return{label:ce,kind:I.languages.CompletionItemKind.Function,documentation:ce,insertText:ce,insertTextRules:I.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Oe}})),Object(g.a)(d.quickKey.map(function(ce){return{label:ce.label,kind:I.languages.CompletionItemKind.Function,documentation:ce.content,insertText:be.startsWith("#")?ce.content.replace(/#/,""):ce.content,insertTextRules:I.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Oe}})))}}}),I.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Ce,Re){var me=Ce.getWordUntilPosition(Re),Oe={startLineNumber:Re.lineNumber,endLineNumber:Re.lineNumber,startColumn:me.startColumn,endColumn:me.endColumn};return{suggestions:Object(g.a)(i.keywords.map(function(be){return{label:be,kind:I.languages.CompletionItemKind.Function,documentation:be,insertText:be,insertTextRules:I.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Oe}}))}}}),I.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Ce,Re){var me=Ce.getWordUntilPosition(Re),Oe={startLineNumber:Re.lineNumber,endLineNumber:Re.lineNumber,startColumn:me.startColumn,endColumn:me.endColumn},be=Ce.getLineContent(Re.lineNumber).substring(me.startColumn-2,me.endColumn);return{suggestions:[].concat(Object(g.a)(s.keywords.map(function(ce){return{label:ce,kind:I.languages.CompletionItemKind.Function,documentation:ce,insertText:ce,insertTextRules:I.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Oe}})),Object(g.a)(s.quickKey.map(function(ce){return{label:ce.label,kind:I.languages.CompletionItemKind.Function,documentation:ce.content,insertText:be.startsWith("#")?ce.content.replace(/#/,""):ce.content,insertTextRules:I.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Oe}})))}}}),I.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Ce,Re){var me=Ce.getWordUntilPosition(Re),Oe={startLineNumber:Re.lineNumber,endLineNumber:Re.lineNumber,startColumn:me.startColumn,endColumn:me.endColumn},be=Ce.getLineContent(Re.lineNumber).substring(me.startColumn-2,me.endColumn);return{suggestions:[].concat(Object(g.a)(f.keywords.map(function(ce){return{label:ce,kind:I.languages.CompletionItemKind.Function,documentation:ce,insertText:ce,insertTextRules:I.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Oe}})),Object(g.a)(f.quickKey.map(function(ce){return{label:ce.label,kind:I.languages.CompletionItemKind.Function,documentation:ce.content,insertText:be.startsWith("#")?ce.content.replace(/#/,""):ce.content,insertTextRules:I.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Oe}})))}}})},b="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",E=D("fjLI"),w=D("LvDl"),T=D("+ua5");function F(I){return/^\d+$/.test(I)?"".concat(I,"px"):I}function N(){}var L=!1,G={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function z(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],K=I;if(Array.isArray(I)){for(var Z=0;Z<I.length;Z++){var ue=G[I[Z]];if(ue)return ue}return K[0]}return G[K]||K}var A=null,B=J.b=function(I){var K=I.width,Z=K===void 0?"100%":K,ue=I.height,de=ue===void 0?"100%":ue,Ce=I.value,Re=I.language,me=Re===void 0?"javascript":Re,Oe=I.style,be=Oe===void 0?{}:Oe,ce=I.options,se=ce===void 0?{}:ce,ne=I.overrideServices,ge=ne===void 0?{}:ne,ee=I.theme,re=ee===void 0?"vs-dark":ee,Te=I.onEditBlur,ie=I.onSave,q=I.autoHeight,Y=q===void 0?!1:q,X=I.forbidCopy,he=X===void 0?!1:X,fe=I.onChange,Ee=fe===void 0?N:fe,He=I.editorDidMount,Qe=He===void 0?N:He,et=I.onFocus,it=et===void 0?N:et,ut=I.filename,dt=ut===void 0?"educoder.txt":ut,Fe=I.errorLine,Ie=I.errorContent,st=Ie===void 0?"":Ie,ft=Object(S.a)(I,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),Ze=Object(_.useRef)(),tt=Object(_.useRef)({}),Be=Object(_.useRef)(),Pe=Object(_.useRef)(),Ne=Object(_.useRef)(!1),xe=Object(_.useRef)(),Ae=Object(_.useState)(!1),Le=Object(y.a)(Ae,2),Me=Le[0],We=Le[1];function nt(){var fr;return Ze.current&&(fr=new h.default(function(br){var Br=Object(m.a)(br),Pn;try{for(Br.s();!(Pn=Br.n()).done;){var Kn=Pn.value;(Kn.target.offsetHeight>0||Kn.target.offsetWidth>0)&&tt.current.instance.layout()}}catch(dn){Br.e(dn)}finally{Br.f()}}),fr.observe(Ze.current)),fr}function vt(){M.b.warn(decodeURIComponent(b))}var bt=function(){var br=tt.current.instance;if(Ce!=null&&br&&Me){var Br=br.getModel();Br&&Ce!==Br.getValue()&&(L=!0,Br.setValue(Ce),br.layout(),L=!1)}};Object(_.useEffect)(function(){Pe.current&&clearTimeout(Pe.current),Pe.current=setTimeout(function(){bt()},500)},[Ce,Me,tt.current]),Object(_.useEffect)(function(){if(Fe&&tt.current&&tt.current.instance){var fr=tt.current.instance;fr.changeViewZones(function(Br){var Pn=document.createElement("div");Pn.style.padding="10px 20px",Pn.style.width="calc(100% - 20px)",Pn.className="my-error-line-wrp",Pn.innerHTML=st,Br.addZone({afterLineNumber:Fe||11,heightInLines:3,domNode:Pn})});var br={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}};fr.addOverlayWidget(br),fr.revealPositionInCenter({lineNumber:20,column:1})}},[Fe,tt.current,Me]);function Wt(){var fr=tt.current.instance;if(fr){var br=fr.getSelection(),Br=tt.current.pastePos||{},Pn=new A.Range(Br.startLineNumber||br.endLineNumber,Br.startColumn||br.endColumn,Br.endLineNumber||br.endLineNumber,Br.endColumn||br.endColumn);setTimeout(function(){fr.executeEdits("",[{range:Pn,text:""}])},300)}}function Bt(fr){(window.navigator.platform.match("Mac")?fr.metaKey:fr.ctrlKey)&&fr.keyCode==83&&(fr.preventDefault(),ie())}var lr=function(){if(Y&&tt.current.instance){var br=tt.current.instance.getContentHeight();Vt(br<de?de:br)}else Vt(de)};function dr(fr){var br=document.createEvent("MouseEvents");br.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),fr.dispatchEvent(br)}function Ot(fr,br){var Br=window.URL||window.webkitURL||window,Pn=new Blob([br]),Kn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Kn.href=Br.createObjectURL(Pn),Kn.download=fr,dr(Kn)}Object(_.useEffect)(function(){lr()},[lr]),Object(_.useEffect)(function(){Ze.current&&!Me&&Promise.all([D.e(16),D.e(28)]).then(D.t.bind(null,"M/lh",7)).then(function(fr){try{A=fr,tt.current.instance=A.editor.create(Ze.current,{value:Ce,language:z(me),theme:re,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},ge);var br=tt.current.instance,Br=E.d._menuItems,Pn=Object(g.a)(Br).find(function(Tn){return Tn[0]._debugName=="EditorContext"}),Kn=Pn[1],dn=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],sr=function(On,Jr){var An=On._first;do{var Zn,ri,Nt=Jr.includes((Zn=An.element)===null||Zn===void 0||((ri=Zn.command)===null||ri===void 0)?void 0:ri.id);Nt&&On._remove(An)}while(An=An.next)};if(Qe(br,A),setTimeout(function(){lr(),tt.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){Ot(dt||"educoder.txt",br.getValue())}}),br.getDomNode().addEventListener("input",function(){Be.current.autoFormat&&br.getAction("editor.action.formatDocument").run()})},500),tt.current.subscription=br.onDidChangeModelContent(function(Tn){Ne.current?clearTimeout(xe.current):(lr(),Ee(br.getValue(),Tn)),xe.current=setTimeout(function(){Ne.current=!1},500)}),window.Monaco||O(A,z(me)),he&&(sr(Kn,dn),Ze.current.classList.add("noCopyPaste"),br.onKeyDown(function(Tn){var On=Tn.keyCode,Jr=Tn.ctrlKey,An=Tn.metaKey;(On===33||On===52)&&(An||Jr)&&(vt(),Tn.preventDefault())})),window.Monaco=A,Te&&br.onDidBlurEditorWidget(function(){Te(br.getValue())}),it&&br.onDidFocusEditorText(function(){it(br.getValue())}),he){br.addCommand(A.KeyMod.CtrlCmd|A.KeyCode.KEY_V,function(){return vt(),null}),br.onDidPaste(function(Tn){tt.current.pastePos=Tn});try{window.addEventListener("paste",Wt)}catch(Tn){}}var Jn=nt();return We(!0),function(){var Tn=tt.current.instance;Tn.dispose();var On=Tn.getModel();On&&On.dispose(),tt.current.subscription&&tt.current.subscription.dispose(),he&&window.removeEventListener("paste",Wt),Jn.unobserve(Ze.current)}}catch(Tn){}})},[]),Object(_.useEffect)(function(){var fr=tt.current.instance;if(fr&&Me)return document.addEventListener("keydown",Bt,!1),function(){document.removeEventListener("keydown",Bt)}},[ie,Me]),Object(_.useEffect)(function(){var fr=tt.current.instance;if(fr&&Me){var br=z(me);A.editor.setModelLanguage(fr.getModel(),br),console.log("language:",me,fr.getModel(),br)}},[me,Me]),Object(_.useEffect)(function(){var fr=tt.current.instance;fr&&Me&&A.editor.setTheme(re)},[re,Me]),Object(_.useEffect)(function(){var fr=tt.current.instance;Be.current=se,fr&&Me&&(fr.updateOptions(Object(k.a)({},se)),setTimeout(function(){fr.getModel().updateOptions(Object(k.a)({},se))},200))},[JSON.stringify(se),Me]),Object(_.useEffect)(function(){var fr=tt.current.instance;fr&&Me&&fr.layout()},[Z,de,Me]);var Vr=Object(_.useState)(F(Z)),Wr=Object(y.a)(Vr,2),Yr=Wr[0],bn=Wr[1],Ar=Object(_.useState)(F(de)),fn=Object(y.a)(Ar,2),cn=fn[0],Vt=fn[1],En=Object(k.a)(Object(k.a)({},be),{},{width:Yr,height:cn});return t.a.createElement("div",{className:"my-monaco-editor",ref:Ze,style:En})};function U(I){var K=I.width,Z=K===void 0?"100%":K,ue=I.height,de=ue===void 0?"100%":ue,Ce=I.original,Re=I.modified,me=I.language,Oe=I.options,be=Oe===void 0?{}:Oe,ce=Object(_.useRef)(),se=Object(_.useState)(null),ne=Object(y.a)(se,2),ge=ne[0],ee=ne[1];function re(Y){var X;return ce.current&&(X=new h.default(function(he){var fe=Object(m.a)(he),Ee;try{for(fe.s();!(Ee=fe.n()).done;){var He=Ee.value;(He.target.offsetHeight>0||He.target.offsetWidth>0)&&Y.layout()}}catch(Qe){fe.e(Qe)}finally{fe.f()}}),X.observe(ce.current)),X}Object(_.useEffect)(function(){ce.current&&Promise.all([D.e(16),D.e(28)]).then(D.t.bind(null,"M/lh",7)).then(function(Y){A=Y;var X=A.editor.createDiffEditor(ce.current,Object(k.a)(Object(k.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},be),{},{wordWrap:!0}));ee(X);var he=re(X);return function(){X.dispose();var fe=X.getModel();fe&&fe.dispose(),he.unobserve(ce.current)}})},[]),Object(_.useEffect)(function(){ge&&ge.setModel({original:A.editor.createModel(Ce,me),modified:A.editor.createModel(Re,me)})},[Ce,Re,me,ge]);var Te=F(Z),ie=F(de),q={width:Te,height:ie};return t.a.createElement("div",{className:"my-diff-editor",ref:ce,style:q})}},ZpRC:function(H,J,D){"use strict";function k(n){return typeof n=="object"&&n!=null&&n.nodeType===1}function g(n,c){return(!c||n!=="hidden")&&n!=="visible"&&n!=="clip"}function C(n,c){if(n.clientHeight<n.scrollHeight||n.clientWidth<n.scrollWidth){var a=getComputedStyle(n,null);return g(a.overflowY,c)||g(a.overflowX,c)||function(i){var s=function(d){if(!d.ownerDocument||!d.ownerDocument.defaultView)return null;try{return d.ownerDocument.defaultView.frameElement}catch(f){return null}}(i);return!!s&&(s.clientHeight<i.scrollHeight||s.clientWidth<i.scrollWidth)}(n)}return!1}function M(n,c,a,i,s,d,f,l){return d<n&&f>c||d>n&&f<c?0:d<=n&&l<=a||f>=c&&l>=a?d-n-i:f>c&&l<a||d<n&&l>a?f-c+s:0}var m=function(n,c){var a=window,i=c.scrollMode,s=c.block,d=c.inline,f=c.boundary,l=c.skipOverflowHiddenElements,o=typeof f=="function"?f:function(Y){return Y!==f};if(!k(n))throw new TypeError("Invalid target");for(var r=document.scrollingElement||document.documentElement,x=[],v=n;k(v)&&o(v);){if((v=v.parentElement)===r){x.push(v);break}v!=null&&v===document.body&&C(v)&&!C(document.documentElement)||v!=null&&C(v,l)&&x.push(v)}for(var p=a.visualViewport?a.visualViewport.width:innerWidth,R=a.visualViewport?a.visualViewport.height:innerHeight,O=window.scrollX||pageXOffset,b=window.scrollY||pageYOffset,E=n.getBoundingClientRect(),w=E.height,T=E.width,F=E.top,N=E.right,L=E.bottom,G=E.left,z=s==="start"||s==="nearest"?F:s==="end"?L:F+w/2,A=d==="center"?G+T/2:d==="end"?N:G,B=[],U=0;U<x.length;U++){var I=x[U],K=I.getBoundingClientRect(),Z=K.height,ue=K.width,de=K.top,Ce=K.right,Re=K.bottom,me=K.left;if(i==="if-needed"&&F>=0&&G>=0&&L<=R&&N<=p&&F>=de&&L<=Re&&G>=me&&N<=Ce)return B;var Oe=getComputedStyle(I),be=parseInt(Oe.borderLeftWidth,10),ce=parseInt(Oe.borderTopWidth,10),se=parseInt(Oe.borderRightWidth,10),ne=parseInt(Oe.borderBottomWidth,10),ge=0,ee=0,re="offsetWidth"in I?I.offsetWidth-I.clientWidth-be-se:0,Te="offsetHeight"in I?I.offsetHeight-I.clientHeight-ce-ne:0;if(r===I)ge=s==="start"?z:s==="end"?z-R:s==="nearest"?M(b,b+R,R,ce,ne,b+z,b+z+w,w):z-R/2,ee=d==="start"?A:d==="center"?A-p/2:d==="end"?A-p:M(O,O+p,p,be,se,O+A,O+A+T,T),ge=Math.max(0,ge+b),ee=Math.max(0,ee+O);else{ge=s==="start"?z-de-ce:s==="end"?z-Re+ne+Te:s==="nearest"?M(de,Re,Z,ce,ne+Te,z,z+w,w):z-(de+Z/2)+Te/2,ee=d==="start"?A-me-be:d==="center"?A-(me+ue/2)+re/2:d==="end"?A-Ce+se+re:M(me,Ce,ue,be,se+re,A,A+T,T);var ie=I.scrollLeft,q=I.scrollTop;z+=q-(ge=Math.max(0,Math.min(q+ge,I.scrollHeight-Z+Te))),A+=ie-(ee=Math.max(0,Math.min(ie+ee,I.scrollWidth-ue+re)))}B.push({el:I,top:ge,left:ee})}return B};function y(n){return n===Object(n)&&Object.keys(n).length!==0}function S(n,c){c===void 0&&(c="auto");var a="scrollBehavior"in document.body.style;n.forEach(function(i){var s=i.el,d=i.top,f=i.left;s.scroll&&a?s.scroll({top:d,left:f,behavior:c}):(s.scrollTop=d,s.scrollLeft=f)})}function _(n){return n===!1?{block:"end",inline:"nearest"}:y(n)?n:{block:"start",inline:"nearest"}}function t(n,c){var a=!n.ownerDocument.documentElement.contains(n);if(y(c)&&typeof c.behavior=="function")return c.behavior(a?[]:m(n,c));if(a)return;var i=_(c);return S(m(n,i),i.behavior)}var h=J.a=t},Zss7:function(H,J,D){var k;(function(g){var C=/^\s+/,M=/\s+$/,m=0,y=g.round,S=g.min,_=g.max,t=g.random;function h(ne,ge){if(ne=ne||"",ge=ge||{},ne instanceof h)return ne;if(!(this instanceof h))return new h(ne,ge);var ee=n(ne);this._originalInput=ne,this._r=ee.r,this._g=ee.g,this._b=ee.b,this._a=ee.a,this._roundA=y(100*this._a)/100,this._format=ge.format||ee.format,this._gradientType=ge.gradientType,this._r<1&&(this._r=y(this._r)),this._g<1&&(this._g=y(this._g)),this._b<1&&(this._b=y(this._b)),this._ok=ee.ok,this._tc_id=m++}h.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var ne=this.toRgb();return(ne.r*299+ne.g*587+ne.b*114)/1e3},getLuminance:function(){var ne=this.toRgb(),ge,ee,re,Te,ie,q;return ge=ne.r/255,ee=ne.g/255,re=ne.b/255,ge<=.03928?Te=ge/12.92:Te=g.pow((ge+.055)/1.055,2.4),ee<=.03928?ie=ee/12.92:ie=g.pow((ee+.055)/1.055,2.4),re<=.03928?q=re/12.92:q=g.pow((re+.055)/1.055,2.4),.2126*Te+.7152*ie+.0722*q},setAlpha:function(ne){return this._a=B(ne),this._roundA=y(100*this._a)/100,this},toHsv:function(){var ne=s(this._r,this._g,this._b);return{h:ne.h*360,s:ne.s,v:ne.v,a:this._a}},toHsvString:function(){var ne=s(this._r,this._g,this._b),ge=y(ne.h*360),ee=y(ne.s*100),re=y(ne.v*100);return this._a==1?"hsv("+ge+", "+ee+"%, "+re+"%)":"hsva("+ge+", "+ee+"%, "+re+"%, "+this._roundA+")"},toHsl:function(){var ne=a(this._r,this._g,this._b);return{h:ne.h*360,s:ne.s,l:ne.l,a:this._a}},toHslString:function(){var ne=a(this._r,this._g,this._b),ge=y(ne.h*360),ee=y(ne.s*100),re=y(ne.l*100);return this._a==1?"hsl("+ge+", "+ee+"%, "+re+"%)":"hsla("+ge+", "+ee+"%, "+re+"%, "+this._roundA+")"},toHex:function(ne){return f(this._r,this._g,this._b,ne)},toHexString:function(ne){return"#"+this.toHex(ne)},toHex8:function(ne){return l(this._r,this._g,this._b,this._a,ne)},toHex8String:function(ne){return"#"+this.toHex8(ne)},toRgb:function(){return{r:y(this._r),g:y(this._g),b:y(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+y(this._r)+", "+y(this._g)+", "+y(this._b)+")":"rgba("+y(this._r)+", "+y(this._g)+", "+y(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:y(U(this._r,255)*100)+"%",g:y(U(this._g,255)*100)+"%",b:y(U(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+y(U(this._r,255)*100)+"%, "+y(U(this._g,255)*100)+"%, "+y(U(this._b,255)*100)+"%)":"rgba("+y(U(this._r,255)*100)+"%, "+y(U(this._g,255)*100)+"%, "+y(U(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:z[f(this._r,this._g,this._b,!0)]||!1},toFilter:function(ne){var ge="#"+o(this._r,this._g,this._b,this._a),ee=ge,re=this._gradientType?"GradientType = 1, ":"";if(ne){var Te=h(ne);ee="#"+o(Te._r,Te._g,Te._b,Te._a)}return"progid:DXImageTransform.Microsoft.gradient("+re+"startColorstr="+ge+",endColorstr="+ee+")"},toString:function(ne){var ge=!!ne;ne=ne||this._format;var ee=!1,re=this._a<1&&this._a>=0,Te=!ge&&re&&(ne==="hex"||ne==="hex6"||ne==="hex3"||ne==="hex4"||ne==="hex8"||ne==="name");return Te?ne==="name"&&this._a===0?this.toName():this.toRgbString():(ne==="rgb"&&(ee=this.toRgbString()),ne==="prgb"&&(ee=this.toPercentageRgbString()),(ne==="hex"||ne==="hex6")&&(ee=this.toHexString()),ne==="hex3"&&(ee=this.toHexString(!0)),ne==="hex4"&&(ee=this.toHex8String(!0)),ne==="hex8"&&(ee=this.toHex8String()),ne==="name"&&(ee=this.toName()),ne==="hsl"&&(ee=this.toHslString()),ne==="hsv"&&(ee=this.toHsvString()),ee||this.toHexString())},clone:function(){return h(this.toString())},_applyModification:function(ne,ge){var ee=ne.apply(null,[this].concat([].slice.call(ge)));return this._r=ee._r,this._g=ee._g,this._b=ee._b,this.setAlpha(ee._a),this},lighten:function(){return this._applyModification(p,arguments)},brighten:function(){return this._applyModification(R,arguments)},darken:function(){return this._applyModification(O,arguments)},desaturate:function(){return this._applyModification(r,arguments)},saturate:function(){return this._applyModification(x,arguments)},greyscale:function(){return this._applyModification(v,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(ne,ge){return ne.apply(null,[this].concat([].slice.call(ge)))},analogous:function(){return this._applyCombination(N,arguments)},complement:function(){return this._applyCombination(E,arguments)},monochromatic:function(){return this._applyCombination(L,arguments)},splitcomplement:function(){return this._applyCombination(F,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(T,arguments)}},h.fromRatio=function(ne,ge){if(typeof ne=="object"){var ee={};for(var re in ne)ne.hasOwnProperty(re)&&(re==="a"?ee[re]=ne[re]:ee[re]=Ce(ne[re]));ne=ee}return h(ne,ge)};function n(ne){var ge={r:0,g:0,b:0},ee=1,re=null,Te=null,ie=null,q=!1,Y=!1;return typeof ne=="string"&&(ne=ce(ne)),typeof ne=="object"&&(be(ne.r)&&be(ne.g)&&be(ne.b)?(ge=c(ne.r,ne.g,ne.b),q=!0,Y=String(ne.r).substr(-1)==="%"?"prgb":"rgb"):be(ne.h)&&be(ne.s)&&be(ne.v)?(re=Ce(ne.s),Te=Ce(ne.v),ge=d(ne.h,re,Te),q=!0,Y="hsv"):be(ne.h)&&be(ne.s)&&be(ne.l)&&(re=Ce(ne.s),ie=Ce(ne.l),ge=i(ne.h,re,ie),q=!0,Y="hsl"),ne.hasOwnProperty("a")&&(ee=ne.a)),ee=B(ee),{ok:q,format:ne.format||Y,r:S(255,_(ge.r,0)),g:S(255,_(ge.g,0)),b:S(255,_(ge.b,0)),a:ee}}function c(ne,ge,ee){return{r:U(ne,255)*255,g:U(ge,255)*255,b:U(ee,255)*255}}function a(ne,ge,ee){ne=U(ne,255),ge=U(ge,255),ee=U(ee,255);var re=_(ne,ge,ee),Te=S(ne,ge,ee),ie,q,Y=(re+Te)/2;if(re==Te)ie=q=0;else{var X=re-Te;q=Y>.5?X/(2-re-Te):X/(re+Te);switch(re){case ne:ie=(ge-ee)/X+(ge<ee?6:0);break;case ge:ie=(ee-ne)/X+2;break;case ee:ie=(ne-ge)/X+4;break}ie/=6}return{h:ie,s:q,l:Y}}function i(ne,ge,ee){var re,Te,ie;ne=U(ne,360),ge=U(ge,100),ee=U(ee,100);function q(he,fe,Ee){return Ee<0&&(Ee+=1),Ee>1&&(Ee-=1),Ee<1/6?he+(fe-he)*6*Ee:Ee<1/2?fe:Ee<2/3?he+(fe-he)*(2/3-Ee)*6:he}if(ge===0)re=Te=ie=ee;else{var Y=ee<.5?ee*(1+ge):ee+ge-ee*ge,X=2*ee-Y;re=q(X,Y,ne+1/3),Te=q(X,Y,ne),ie=q(X,Y,ne-1/3)}return{r:re*255,g:Te*255,b:ie*255}}function s(ne,ge,ee){ne=U(ne,255),ge=U(ge,255),ee=U(ee,255);var re=_(ne,ge,ee),Te=S(ne,ge,ee),ie,q,Y=re,X=re-Te;if(q=re===0?0:X/re,re==Te)ie=0;else{switch(re){case ne:ie=(ge-ee)/X+(ge<ee?6:0);break;case ge:ie=(ee-ne)/X+2;break;case ee:ie=(ne-ge)/X+4;break}ie/=6}return{h:ie,s:q,v:Y}}function d(ne,ge,ee){ne=U(ne,360)*6,ge=U(ge,100),ee=U(ee,100);var re=g.floor(ne),Te=ne-re,ie=ee*(1-ge),q=ee*(1-Te*ge),Y=ee*(1-(1-Te)*ge),X=re%6,he=[ee,q,ie,ie,Y,ee][X],fe=[Y,ee,ee,q,ie,ie][X],Ee=[ie,ie,Y,ee,ee,q][X];return{r:he*255,g:fe*255,b:Ee*255}}function f(ne,ge,ee,re){var Te=[de(y(ne).toString(16)),de(y(ge).toString(16)),de(y(ee).toString(16))];return re&&Te[0].charAt(0)==Te[0].charAt(1)&&Te[1].charAt(0)==Te[1].charAt(1)&&Te[2].charAt(0)==Te[2].charAt(1)?Te[0].charAt(0)+Te[1].charAt(0)+Te[2].charAt(0):Te.join("")}function l(ne,ge,ee,re,Te){var ie=[de(y(ne).toString(16)),de(y(ge).toString(16)),de(y(ee).toString(16)),de(Re(re))];return Te&&ie[0].charAt(0)==ie[0].charAt(1)&&ie[1].charAt(0)==ie[1].charAt(1)&&ie[2].charAt(0)==ie[2].charAt(1)&&ie[3].charAt(0)==ie[3].charAt(1)?ie[0].charAt(0)+ie[1].charAt(0)+ie[2].charAt(0)+ie[3].charAt(0):ie.join("")}function o(ne,ge,ee,re){var Te=[de(Re(re)),de(y(ne).toString(16)),de(y(ge).toString(16)),de(y(ee).toString(16))];return Te.join("")}h.equals=function(ne,ge){return!ne||!ge?!1:h(ne).toRgbString()==h(ge).toRgbString()},h.random=function(){return h.fromRatio({r:t(),g:t(),b:t()})};function r(ne,ge){ge=ge===0?0:ge||10;var ee=h(ne).toHsl();return ee.s-=ge/100,ee.s=I(ee.s),h(ee)}function x(ne,ge){ge=ge===0?0:ge||10;var ee=h(ne).toHsl();return ee.s+=ge/100,ee.s=I(ee.s),h(ee)}function v(ne){return h(ne).desaturate(100)}function p(ne,ge){ge=ge===0?0:ge||10;var ee=h(ne).toHsl();return ee.l+=ge/100,ee.l=I(ee.l),h(ee)}function R(ne,ge){ge=ge===0?0:ge||10;var ee=h(ne).toRgb();return ee.r=_(0,S(255,ee.r-y(255*-(ge/100)))),ee.g=_(0,S(255,ee.g-y(255*-(ge/100)))),ee.b=_(0,S(255,ee.b-y(255*-(ge/100)))),h(ee)}function O(ne,ge){ge=ge===0?0:ge||10;var ee=h(ne).toHsl();return ee.l-=ge/100,ee.l=I(ee.l),h(ee)}function b(ne,ge){var ee=h(ne).toHsl(),re=(ee.h+ge)%360;return ee.h=re<0?360+re:re,h(ee)}function E(ne){var ge=h(ne).toHsl();return ge.h=(ge.h+180)%360,h(ge)}function w(ne){var ge=h(ne).toHsl(),ee=ge.h;return[h(ne),h({h:(ee+120)%360,s:ge.s,l:ge.l}),h({h:(ee+240)%360,s:ge.s,l:ge.l})]}function T(ne){var ge=h(ne).toHsl(),ee=ge.h;return[h(ne),h({h:(ee+90)%360,s:ge.s,l:ge.l}),h({h:(ee+180)%360,s:ge.s,l:ge.l}),h({h:(ee+270)%360,s:ge.s,l:ge.l})]}function F(ne){var ge=h(ne).toHsl(),ee=ge.h;return[h(ne),h({h:(ee+72)%360,s:ge.s,l:ge.l}),h({h:(ee+216)%360,s:ge.s,l:ge.l})]}function N(ne,ge,ee){ge=ge||6,ee=ee||30;var re=h(ne).toHsl(),Te=360/ee,ie=[h(ne)];for(re.h=(re.h-(Te*ge>>1)+720)%360;--ge;)re.h=(re.h+Te)%360,ie.push(h(re));return ie}function L(ne,ge){ge=ge||6;for(var ee=h(ne).toHsv(),re=ee.h,Te=ee.s,ie=ee.v,q=[],Y=1/ge;ge--;)q.push(h({h:re,s:Te,v:ie})),ie=(ie+Y)%1;return q}h.mix=function(ne,ge,ee){ee=ee===0?0:ee||50;var re=h(ne).toRgb(),Te=h(ge).toRgb(),ie=ee/100,q={r:(Te.r-re.r)*ie+re.r,g:(Te.g-re.g)*ie+re.g,b:(Te.b-re.b)*ie+re.b,a:(Te.a-re.a)*ie+re.a};return h(q)},h.readability=function(ne,ge){var ee=h(ne),re=h(ge);return(g.max(ee.getLuminance(),re.getLuminance())+.05)/(g.min(ee.getLuminance(),re.getLuminance())+.05)},h.isReadable=function(ne,ge,ee){var re=h.readability(ne,ge),Te,ie;ie=!1,Te=se(ee);switch(Te.level+Te.size){case"AAsmall":case"AAAlarge":ie=re>=4.5;break;case"AAlarge":ie=re>=3;break;case"AAAsmall":ie=re>=7;break}return ie},h.mostReadable=function(ne,ge,ee){var re=null,Te=0,ie,q,Y,X;ee=ee||{},q=ee.includeFallbackColors,Y=ee.level,X=ee.size;for(var he=0;he<ge.length;he++)ie=h.readability(ne,ge[he]),ie>Te&&(Te=ie,re=h(ge[he]));return h.isReadable(ne,re,{level:Y,size:X})||!q?re:(ee.includeFallbackColors=!1,h.mostReadable(ne,["#fff","#000"],ee))};var G=h.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},z=h.hexNames=A(G);function A(ne){var ge={};for(var ee in ne)ne.hasOwnProperty(ee)&&(ge[ne[ee]]=ee);return ge}function B(ne){return ne=parseFloat(ne),(isNaN(ne)||ne<0||ne>1)&&(ne=1),ne}function U(ne,ge){Z(ne)&&(ne="100%");var ee=ue(ne);return ne=S(ge,_(0,parseFloat(ne))),ee&&(ne=parseInt(ne*ge,10)/100),g.abs(ne-ge)<1e-6?1:ne%ge/parseFloat(ge)}function I(ne){return S(1,_(0,ne))}function K(ne){return parseInt(ne,16)}function Z(ne){return typeof ne=="string"&&ne.indexOf(".")!=-1&&parseFloat(ne)===1}function ue(ne){return typeof ne=="string"&&ne.indexOf("%")!=-1}function de(ne){return ne.length==1?"0"+ne:""+ne}function Ce(ne){return ne<=1&&(ne=ne*100+"%"),ne}function Re(ne){return g.round(parseFloat(ne)*255).toString(16)}function me(ne){return K(ne)/255}var Oe=function(){var ne="[-\\+]?\\d+%?",ge="[-\\+]?\\d*\\.\\d+%?",ee="(?:"+ge+")|(?:"+ne+")",re="[\\s|\\(]+("+ee+")[,|\\s]+("+ee+")[,|\\s]+("+ee+")\\s*\\)?",Te="[\\s|\\(]+("+ee+")[,|\\s]+("+ee+")[,|\\s]+("+ee+")[,|\\s]+("+ee+")\\s*\\)?";return{CSS_UNIT:new RegExp(ee),rgb:new RegExp("rgb"+re),rgba:new RegExp("rgba"+Te),hsl:new RegExp("hsl"+re),hsla:new RegExp("hsla"+Te),hsv:new RegExp("hsv"+re),hsva:new RegExp("hsva"+Te),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 be(ne){return!!Oe.CSS_UNIT.exec(ne)}function ce(ne){ne=ne.replace(C,"").replace(M,"").toLowerCase();var ge=!1;if(G[ne])ne=G[ne],ge=!0;else if(ne=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ee;return(ee=Oe.rgb.exec(ne))?{r:ee[1],g:ee[2],b:ee[3]}:(ee=Oe.rgba.exec(ne))?{r:ee[1],g:ee[2],b:ee[3],a:ee[4]}:(ee=Oe.hsl.exec(ne))?{h:ee[1],s:ee[2],l:ee[3]}:(ee=Oe.hsla.exec(ne))?{h:ee[1],s:ee[2],l:ee[3],a:ee[4]}:(ee=Oe.hsv.exec(ne))?{h:ee[1],s:ee[2],v:ee[3]}:(ee=Oe.hsva.exec(ne))?{h:ee[1],s:ee[2],v:ee[3],a:ee[4]}:(ee=Oe.hex8.exec(ne))?{r:K(ee[1]),g:K(ee[2]),b:K(ee[3]),a:me(ee[4]),format:ge?"name":"hex8"}:(ee=Oe.hex6.exec(ne))?{r:K(ee[1]),g:K(ee[2]),b:K(ee[3]),format:ge?"name":"hex"}:(ee=Oe.hex4.exec(ne))?{r:K(ee[1]+""+ee[1]),g:K(ee[2]+""+ee[2]),b:K(ee[3]+""+ee[3]),a:me(ee[4]+""+ee[4]),format:ge?"name":"hex8"}:(ee=Oe.hex3.exec(ne))?{r:K(ee[1]+""+ee[1]),g:K(ee[2]+""+ee[2]),b:K(ee[3]+""+ee[3]),format:ge?"name":"hex"}:!1}function se(ne){var ge,ee;return ne=ne||{level:"AA",size:"small"},ge=(ne.level||"AA").toUpperCase(),ee=(ne.size||"small").toLowerCase(),ge!=="AA"&&ge!=="AAA"&&(ge="AA"),ee!=="small"&&ee!=="large"&&(ee="small"),{level:ge,size:ee}}H.exports?H.exports=h:!(k=function(){return h}.call(J,D,J,H),k!==void 0&&(H.exports=k))})(Math)},bQjk:function(H,J,D){(function(k,g,C){H.exports=J=g(D("Ib8C"),D("OLod"))})(this,function(k){return function(g){var C=k,M=C.lib,m=M.CipherParams,y=C.enc,S=y.Hex,_=C.format,t=_.Hex={stringify:function(h){return h.ciphertext.toString(S)},parse:function(h){var n=S.parse(h);return m.create({ciphertext:n})}}}(),k.format.Hex})},bT9E:function(H,J,D){"use strict";D.d(J,"a",function(){return g});var k=D("VTBJ");function g(C,M){var m=Object(k.a)({},C);return Array.isArray(M)&&M.forEach(function(y){delete m[y]}),m}},biw7:function(H,J,D){"use strict";var k=D("q1tI"),g=D.n(k),C=k.createContext(null);J.a=C},c5Ni:function(H,J,D){},cv67:function(H,J,D){(function(k,g){H.exports=J=g(D("Ib8C"))})(this,function(k){return function(g){var C=k,M=C.lib,m=M.WordArray,y=M.Hasher,S=C.algo,_=[];(function(){for(var i=0;i<64;i++)_[i]=g.abs(g.sin(i+1))*4294967296|0})();var t=S.MD5=y.extend({_doReset:function(){this._hash=new m.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(i,s){for(var d=0;d<16;d++){var f=s+d,l=i[f];i[f]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360}var o=this._hash.words,r=i[s+0],x=i[s+1],v=i[s+2],p=i[s+3],R=i[s+4],O=i[s+5],b=i[s+6],E=i[s+7],w=i[s+8],T=i[s+9],F=i[s+10],N=i[s+11],L=i[s+12],G=i[s+13],z=i[s+14],A=i[s+15],B=o[0],U=o[1],I=o[2],K=o[3];B=h(B,U,I,K,r,7,_[0]),K=h(K,B,U,I,x,12,_[1]),I=h(I,K,B,U,v,17,_[2]),U=h(U,I,K,B,p,22,_[3]),B=h(B,U,I,K,R,7,_[4]),K=h(K,B,U,I,O,12,_[5]),I=h(I,K,B,U,b,17,_[6]),U=h(U,I,K,B,E,22,_[7]),B=h(B,U,I,K,w,7,_[8]),K=h(K,B,U,I,T,12,_[9]),I=h(I,K,B,U,F,17,_[10]),U=h(U,I,K,B,N,22,_[11]),B=h(B,U,I,K,L,7,_[12]),K=h(K,B,U,I,G,12,_[13]),I=h(I,K,B,U,z,17,_[14]),U=h(U,I,K,B,A,22,_[15]),B=n(B,U,I,K,x,5,_[16]),K=n(K,B,U,I,b,9,_[17]),I=n(I,K,B,U,N,14,_[18]),U=n(U,I,K,B,r,20,_[19]),B=n(B,U,I,K,O,5,_[20]),K=n(K,B,U,I,F,9,_[21]),I=n(I,K,B,U,A,14,_[22]),U=n(U,I,K,B,R,20,_[23]),B=n(B,U,I,K,T,5,_[24]),K=n(K,B,U,I,z,9,_[25]),I=n(I,K,B,U,p,14,_[26]),U=n(U,I,K,B,w,20,_[27]),B=n(B,U,I,K,G,5,_[28]),K=n(K,B,U,I,v,9,_[29]),I=n(I,K,B,U,E,14,_[30]),U=n(U,I,K,B,L,20,_[31]),B=c(B,U,I,K,O,4,_[32]),K=c(K,B,U,I,w,11,_[33]),I=c(I,K,B,U,N,16,_[34]),U=c(U,I,K,B,z,23,_[35]),B=c(B,U,I,K,x,4,_[36]),K=c(K,B,U,I,R,11,_[37]),I=c(I,K,B,U,E,16,_[38]),U=c(U,I,K,B,F,23,_[39]),B=c(B,U,I,K,G,4,_[40]),K=c(K,B,U,I,r,11,_[41]),I=c(I,K,B,U,p,16,_[42]),U=c(U,I,K,B,b,23,_[43]),B=c(B,U,I,K,T,4,_[44]),K=c(K,B,U,I,L,11,_[45]),I=c(I,K,B,U,A,16,_[46]),U=c(U,I,K,B,v,23,_[47]),B=a(B,U,I,K,r,6,_[48]),K=a(K,B,U,I,E,10,_[49]),I=a(I,K,B,U,z,15,_[50]),U=a(U,I,K,B,O,21,_[51]),B=a(B,U,I,K,L,6,_[52]),K=a(K,B,U,I,p,10,_[53]),I=a(I,K,B,U,F,15,_[54]),U=a(U,I,K,B,x,21,_[55]),B=a(B,U,I,K,w,6,_[56]),K=a(K,B,U,I,A,10,_[57]),I=a(I,K,B,U,b,15,_[58]),U=a(U,I,K,B,G,21,_[59]),B=a(B,U,I,K,R,6,_[60]),K=a(K,B,U,I,N,10,_[61]),I=a(I,K,B,U,v,15,_[62]),U=a(U,I,K,B,T,21,_[63]),o[0]=o[0]+B|0,o[1]=o[1]+U|0,o[2]=o[2]+I|0,o[3]=o[3]+K|0},_doFinalize:function(){var i=this._data,s=i.words,d=this._nDataBytes*8,f=i.sigBytes*8;s[f>>>5]|=128<<24-f%32;var l=g.floor(d/4294967296),o=d;s[(f+64>>>9<<4)+15]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,s[(f+64>>>9<<4)+14]=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360,i.sigBytes=(s.length+1)*4,this._process();for(var r=this._hash,x=r.words,v=0;v<4;v++){var p=x[v];x[v]=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360}return r},clone:function(){var i=y.clone.call(this);return i._hash=this._hash.clone(),i}});function h(i,s,d,f,l,o,r){var x=i+(s&d|~s&f)+l+r;return(x<<o|x>>>32-o)+s}function n(i,s,d,f,l,o,r){var x=i+(s&f|d&~f)+l+r;return(x<<o|x>>>32-o)+s}function c(i,s,d,f,l,o,r){var x=i+(s^d^f)+l+r;return(x<<o|x>>>32-o)+s}function a(i,s,d,f,l,o,r){var x=i+(d^(s|~f))+l+r;return(x<<o|x>>>32-o)+s}C.MD5=y._createHelper(t),C.HmacMD5=y._createHmacHelper(t)}(Math),k.MD5})},dejd:function(H,J,D){},dmUQ:function(H,J,D){"use strict";var k=D("Ff2n"),g=D("rePB"),C=D("1OyB"),M=D("vuIU"),m=D("Ji7U"),y=D("md7G"),S=D("foSv"),_=D("q1tI"),t=D.n(_),h=D("TSYQ"),n=D.n(h),c=D("4IlW");function a(w,T){var F=Object.keys(w);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(w);T&&(N=N.filter(function(L){return Object.getOwnPropertyDescriptor(w,L).enumerable})),F.push.apply(F,N)}return F}function i(w){for(var T=1;T<arguments.length;T++){var F=arguments[T]!=null?arguments[T]:{};T%2?a(Object(F),!0).forEach(function(N){Object(g.a)(w,N,F[N])}):Object.getOwnPropertyDescriptors?Object.defineProperties(w,Object.getOwnPropertyDescriptors(F)):a(Object(F)).forEach(function(N){Object.defineProperty(w,N,Object.getOwnPropertyDescriptor(F,N))})}return w}function s(w){var T=d();return function(){var N=Object(S.a)(w),L;if(T){var G=Object(S.a)(this).constructor;L=Reflect.construct(N,arguments,G)}else L=N.apply(this,arguments);return Object(y.a)(this,L)}}function d(){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 f(){}function l(w){w.preventDefault()}var o=function(T){return T.replace(/[^\w.-]+/g,"")},r=200,x=600,v=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,p=function(T){return T!=null},R=function(T,F){return F===T||typeof F=="number"&&typeof T=="number"&&isNaN(F)&&isNaN(T)},O=function(w){Object(m.a)(F,w);var T=s(F);function F(N){var L;Object(C.a)(this,F),L=T.call(this,N),L.onKeyDown=function(A){var B=L.props,U=B.onKeyDown,I=B.onPressEnter;if(A.keyCode===c.a.UP){var K=L.getRatio(A);L.up(A,K,null),L.stop()}else if(A.keyCode===c.a.DOWN){var Z=L.getRatio(A);L.down(A,Z,null),L.stop()}else A.keyCode===c.a.ENTER&&I&&I(A);if(L.recordCursorPosition(),L.lastKeyCode=A.keyCode,U){for(var ue=arguments.length,de=new Array(ue>1?ue-1:0),Ce=1;Ce<ue;Ce++)de[Ce-1]=arguments[Ce];U.apply(void 0,[A].concat(de))}},L.onKeyUp=function(A){var B=L.props.onKeyUp;if(L.stop(),L.recordCursorPosition(),B){for(var U=arguments.length,I=new Array(U>1?U-1:0),K=1;K<U;K++)I[K-1]=arguments[K];B.apply(void 0,[A].concat(I))}},L.onChange=function(A){var B=L.props.onChange;L.state.focused&&(L.inputting=!0),L.rawInput=L.props.parser(L.getValueFromEvent(A)),L.setState({inputValue:L.rawInput}),B(L.toNumber(L.rawInput))},L.onMouseUp=function(){var A=L.props.onMouseUp;L.recordCursorPosition(),A&&A.apply(void 0,arguments)},L.onFocus=function(){var A;L.setState({focused:!0}),(A=L.props).onFocus.apply(A,arguments)},L.onBlur=function(){var A=L.props.onBlur;L.inputting=!1,L.setState({focused:!1});var B=L.getCurrentValidValue(L.state.inputValue),U=L.setValue(B,f);if(A){var I=L.input.value,K=L.getInputDisplayValue({focus:!1,value:U});L.input.value=K&&Number(K),A.apply(void 0,arguments),L.input.value=I}},L.getRatio=function(A){var B=1;return A.metaKey||A.ctrlKey?B=.1:A.shiftKey&&(B=10),B},L.getFullNum=function(A){return isNaN(A)?A:/e/i.test(String(A))?Number(A).toFixed(18).replace(/\.?0+$/,""):A},L.getPrecision=function(A){if(p(L.props.precision))return L.props.precision;var B=String(A);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},L.getInputDisplayValue=function(A){var B=A||L.state,U=B.focused,I=B.inputValue,K=B.value,Z;U?Z=I:Z=L.toPrecisionAsStep(K),Z==null&&(Z="");var ue=L.formatWrapper(Z);return p(L.props.decimalSeparator)&&(ue=ue.toString().replace(".",L.props.decimalSeparator)),ue},L.recordCursorPosition=function(){try{L.cursorStart=L.input.selectionStart,L.cursorEnd=L.input.selectionEnd,L.currentValue=L.input.value,L.cursorBefore=L.input.value.substring(0,L.cursorStart),L.cursorAfter=L.input.value.substring(L.cursorEnd)}catch(A){}},L.restoreByAfter=function(A){if(A===void 0)return!1;var B=L.input.value,U=B.lastIndexOf(A);if(U===-1)return!1;var I=L.cursorBefore.length;return L.lastKeyCode===c.a.DELETE&&L.cursorBefore.charAt(I-1)===A[0]?(L.fixCaret(I,I),!0):U+A.length===B.length?(L.fixCaret(U,U),!0):!1},L.partRestoreByAfter=function(A){return A===void 0?!1:Array.prototype.some.call(A,function(B,U){var I=A.substring(U);return L.restoreByAfter(I)})},L.isNotCompleteNumber=function(A){return isNaN(A)||A===""||A===null||A&&A.toString().indexOf(".")===A.toString().length-1},L.stop=function(){L.autoStepTimer&&clearTimeout(L.autoStepTimer)},L.down=function(A,B,U){L.pressingUpOrDown=!0,L.step("down",A,B,U)},L.up=function(A,B,U){L.pressingUpOrDown=!0,L.step("up",A,B,U)},L.saveInput=function(A){L.input=A};var G=N.value;G===void 0&&(G=N.defaultValue),L.state={focused:N.autoFocus};var z=L.getValidValue(L.toNumber(G));return L.state=i(i({},L.state),{},{inputValue:L.toPrecisionAsStep(z),value:z}),L}return Object(M.a)(F,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(L){var G=this.props,z=G.value,A=G.onChange,B=G.max,U=G.min,I=this.state.focused;if(L){if(!R(L.value,z)||!R(L.max,B)||!R(L.min,U)){var K=I?z:this.getValidValue(z),Z;this.pressingUpOrDown?Z=K:this.inputting?Z=this.rawInput:Z=this.toPrecisionAsStep(K),this.setState({value:K,inputValue:Z})}var ue="value"in this.props?z:this.state.value;"max"in this.props&&L.max!==B&&typeof ue=="number"&&ue>B&&A&&A(B),"min"in this.props&&L.min!==U&&typeof ue=="number"&&ue<U&&A&&A(U)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var de=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===c.a.BACKSPACE?de=this.cursorStart-1:this.lastKeyCode===c.a.DELETE&&(de=this.cursorStart):de=this.input.value.length,this.fixCaret(de,de)}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(Ce){}if(this.lastKeyCode=null,!this.pressingUpOrDown)return;this.props.focusOnUpDown&&this.state.focused&&(document.activeElement!==this.input&&this.focus())}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"getCurrentValidValue",value:function(L){var G=L;return G===""?G="":this.isNotCompleteNumber(parseFloat(G))?G=this.state.value:G=this.getValidValue(G),this.toNumber(G)}},{key:"getValueFromEvent",value:function(L){var G=L.target.value.trim().replace(/。/g,".");return p(this.props.decimalSeparator)&&(G=G.replace(this.props.decimalSeparator,".")),G}},{key:"getValidValue",value:function(L){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,A=parseFloat(L);return isNaN(A)?L:(A<G&&(A=G),A>z&&(A=z),A)}},{key:"setValue",value:function(L,G){var z=this.props.precision,A=this.isNotCompleteNumber(parseFloat(L))?null:parseFloat(L),B=this.state.value,U=B===void 0?null:B,I=this.state.inputValue,K=I===void 0?null:I,Z=typeof A=="number"?A.toFixed(z):"".concat(A),ue=A!==U||Z!=="".concat(K);return"value"in this.props?(K=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:K},G)):this.setState({value:A,inputValue:this.toPrecisionAsStep(L)},G),ue&&this.props.onChange(A),A}},{key:"getMaxPrecision",value:function(L){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,z=this.props,A=z.precision,B=z.step;if(p(A))return A;var U=this.getPrecision(G),I=this.getPrecision(B),K=this.getPrecision(L);return L?Math.max(K,U+I):U+I}},{key:"getPrecisionFactor",value:function(L){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,z=this.getMaxPrecision(L,G);return Math.pow(10,z)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(L){return this.props.formatter?this.props.formatter(L):L}},{key:"toPrecisionAsStep",value:function(L){if(this.isNotCompleteNumber(L)||L==="")return L;var G=Math.abs(this.getMaxPrecision(L));return isNaN(G)?L.toString():Number(L).toFixed(G)}},{key:"toNumber",value:function(L){var G=this.props.precision,z=this.state.focused,A=L&&L.length>16&&z;return this.isNotCompleteNumber(L)||A?L:p(G)?Math.round(L*Math.pow(10,G))/Math.pow(10,G):Number(L)}},{key:"upStep",value:function(L,G){var z=this.props.step,A=this.getPrecisionFactor(L,G),B=Math.abs(this.getMaxPrecision(L,G)),U=((A*L+A*z*G)/A).toFixed(B);return this.toNumber(U)}},{key:"downStep",value:function(L,G){var z=this.props.step,A=this.getPrecisionFactor(L,G),B=Math.abs(this.getMaxPrecision(L,G)),U=((A*L-A*z*G)/A).toFixed(B);return this.toNumber(U)}},{key:"step",value:function(L,G){var z=this,A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,B=arguments.length>3?arguments[3]:void 0;this.stop(),G&&(G.persist(),G.preventDefault());var U=this.props;if(U.disabled)return;var I=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(I))return;var K=this["".concat(L,"Step")](I,A),Z=K>U.max||K<U.min;if(K>U.max?K=U.max:K<U.min&&(K=U.min),this.setValue(K,null),this.setState({focused:!0},function(){z.pressingUpOrDown=!1}),Z)return;this.autoStepTimer=setTimeout(function(){z[L](G,A,!0)},B?r:x)}},{key:"fixCaret",value:function(L,G){if(L===void 0||G===void 0||!this.input||!this.input.value)return;try{var z=this.input.selectionStart,A=this.input.selectionEnd;(L!==z||G!==A)&&this.input.setSelectionRange(L,G)}catch(B){}}},{key:"render",value:function(){var L,G=this.props,z=G.prefixCls,A=G.disabled,B=G.readOnly,U=G.useTouch,I=G.autoComplete,K=G.upHandler,Z=G.downHandler,ue=G.className,de=G.max,Ce=G.min,Re=G.style,me=G.title,Oe=G.onMouseEnter,be=G.onMouseLeave,ce=G.onMouseOver,se=G.onMouseOut,ne=G.required,ge=G.onClick,ee=G.tabIndex,re=G.type,Te=G.placeholder,ie=G.id,q=G.inputMode,Y=G.pattern,X=G.step,he=G.maxLength,fe=G.autoFocus,Ee=G.name,He=G.onPaste,Qe=G.onInput,et=Object(k.a)(G,["prefixCls","disabled","readOnly","useTouch","autoComplete","upHandler","downHandler","className","max","min","style","title","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","required","onClick","tabIndex","type","placeholder","id","inputMode","pattern","step","maxLength","autoFocus","name","onPaste","onInput"]),it=this.state,ut=it.value,dt=it.focused,Fe=n()(z,(L={},Object(g.a)(L,ue,!!ue),Object(g.a)(L,"".concat(z,"-disabled"),A),Object(g.a)(L,"".concat(z,"-focused"),dt),L)),Ie={};Object.keys(et).forEach(function(Me){(Me.substr(0,5)==="data-"||Me.substr(0,5)==="aria-"||Me==="role")&&(Ie[Me]=et[Me])});var st=!B&&!A,ft=this.getInputDisplayValue(null),Ze=(ut||ut===0)&&(isNaN(ut)||Number(ut)>=de),tt=(ut||ut===0)&&(isNaN(ut)||Number(ut)<=Ce),Be=Ze||A||B,Pe=tt||A||B,Ne=n()("".concat(z,"-handler"),"".concat(z,"-handler-up"),Object(g.a)({},"".concat(z,"-handler-up-disabled"),Be)),xe=n()("".concat(z,"-handler"),"".concat(z,"-handler-down"),Object(g.a)({},"".concat(z,"-handler-down-disabled"),Pe)),Ae=U?{onTouchStart:Be?f:this.up,onTouchEnd:this.stop}:{onMouseDown:Be?f:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Le=U?{onTouchStart:Pe?f:this.down,onTouchEnd:this.stop}:{onMouseDown:Pe?f:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return t.a.createElement("div",{className:Fe,style:Re,title:me,onMouseEnter:Oe,onMouseLeave:be,onMouseOver:ce,onMouseOut:se,onFocus:function(){return null},onBlur:function(){return null}},t.a.createElement("div",{className:"".concat(z,"-handler-wrap")},t.a.createElement("span",Object.assign({unselectable:"on"},Ae,{role:"button","aria-label":"Increase Value","aria-disabled":Be,className:Ne}),K||t.a.createElement("span",{unselectable:"on",className:"".concat(z,"-handler-up-inner"),onClick:l})),t.a.createElement("span",Object.assign({unselectable:"on"},Le,{role:"button","aria-label":"Decrease Value","aria-disabled":Pe,className:xe}),Z||t.a.createElement("span",{unselectable:"on",className:"".concat(z,"-handler-down-inner"),onClick:l}))),t.a.createElement("div",{className:"".concat(z,"-input-wrap")},t.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Ce,"aria-valuemax":de,"aria-valuenow":ut,required:ne,type:re,placeholder:Te,onPaste:He,onClick:ge,onMouseUp:this.onMouseUp,className:"".concat(z,"-input"),tabIndex:ee,autoComplete:I,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:st?this.onKeyDown:f,onKeyUp:st?this.onKeyUp:f,autoFocus:fe,maxLength:he,readOnly:B,disabled:A,max:de,min:Ce,step:X,name:Ee,title:me,id:ie,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(ft),pattern:Y,inputMode:q,onInput:Qe},Ie))))}}]),F}(t.a.Component);O.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:v,min:-v,step:1,style:{},onChange:f,onKeyDown:f,onPressEnter:f,onFocus:f,onBlur:f,parser:o,required:!1,autoComplete:"off"};var b=O,E=J.a=b},e7zE:function(H,J,D){(function(k,g,C){H.exports=J=g(D("Ib8C"),D("3y9D"),D("WYAk"))})(this,function(k){return function(){var g=k,C=g.lib,M=C.Base,m=C.WordArray,y=g.algo,S=y.SHA1,_=y.HMAC,t=y.PBKDF2=M.extend({cfg:M.extend({keySize:128/32,hasher:S,iterations:1}),init:function(h){this.cfg=this.cfg.extend(h)},compute:function(h,n){for(var c=this.cfg,a=_.create(c.hasher,h),i=m.create(),s=m.create([1]),d=i.words,f=s.words,l=c.keySize,o=c.iterations;d.length<l;){var r=a.update(n).finalize(s);a.reset();for(var x=r.words,v=x.length,p=r,R=1;R<o;R++){p=a.finalize(p),a.reset();for(var O=p.words,b=0;b<v;b++)x[b]^=O[b]}i.concat(r),f[0]++}return i.sigBytes=l*4,i}});g.PBKDF2=function(h,n,c){return t.create(c).compute(h,n)}}(),k.PBKDF2})},fjLI:function(H,J,D){"use strict";D.d(J,"f",function(){return a}),D.d(J,"b",function(){return i}),D.d(J,"a",function(){return s}),D.d(J,"d",function(){return d}),D.d(J,"e",function(){return f}),D.d(J,"c",function(){return l});var k=D("8HAY"),g=D("Vhoy"),C=D("MI8n"),M=D("JYp7"),m=D("pmY6"),y=D("24hK"),S=D("nnTU"),_=D("T8No"),t=D("Cg/j"),h=D("t9D7"),n=function(o,r,x,v){var p=arguments.length,R=p<3?r:v===null?v=Object.getOwnPropertyDescriptor(r,x):v,O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(o,r,x,v);else for(var b=o.length-1;b>=0;b--)(O=o[b])&&(R=(p<3?O(R):p>3?O(r,x,R):O(r,x))||R);return p>3&&R&&Object.defineProperty(r,x,R),R},c=function(o,r){return function(x,v){r(x,v,o)}};function a(o){return o.command!==void 0}class i{constructor(o){this.id=i._idPool++,this._debugName=o}}i._idPool=0,i.CommandPalette=new i("CommandPalette"),i.EditorContext=new i("EditorContext"),i.SimpleEditorContext=new i("SimpleEditorContext"),i.EditorContextCopy=new i("EditorContextCopy"),i.EditorContextPeek=new i("EditorContextPeek"),i.MenubarEditMenu=new i("MenubarEditMenu"),i.MenubarCopy=new i("MenubarCopy"),i.MenubarGoMenu=new i("MenubarGoMenu"),i.MenubarSelectionMenu=new i("MenubarSelectionMenu"),i.InlineCompletionsActions=new i("InlineCompletionsActions");const s=Object(t.c)("menuService"),d=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new C.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:o=>o===i.CommandPalette}}addCommand(o){return this.addCommands(M.a.single(o))}addCommands(o){for(const r of o)this._commands.set(r.id,r);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(m.i)(()=>{let r=!1;for(const x of o)r=this._commands.delete(x.id)||r;r&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(o){return this._commands.get(o)}getCommands(){const o=new Map;return this._commands.forEach((r,x)=>o.set(x,r)),o}appendMenuItem(o,r){return this.appendMenuItems(M.a.single({id:o,item:r}))}appendMenuItems(o){const r=new Set,x=new y.a;for(const{id:v,item:p}of o){let R=this._menuItems.get(v);R||(R=new y.a,this._menuItems.set(v,R)),x.push(R.push(p)),r.add(v)}return this._onDidChangeMenu.fire(r),Object(m.i)(()=>{if(x.size>0){for(let v of x)v();this._onDidChangeMenu.fire(r),x.clear()}})}getMenuItems(o){let r;return this._menuItems.has(o)?r=[...this._menuItems.get(o)]:r=[],o===i.CommandPalette&&this._appendImplicitItems(r),r}_appendImplicitItems(o){const r=new Set;for(const x of o)a(x)&&(r.add(x.command.id),x.alt&&r.add(x.alt.id));this._commands.forEach((x,v)=>{r.has(v)||o.push({command:x})})}};class f extends k.e{constructor(o,r,x,v){super(`submenuitem.${o.submenu.id}`,typeof o.title=="string"?o.title:o.title.value,[],"submenu");this.item=o,this._menuService=r,this._contextKeyService=x,this._options=v}get actions(){const o=[],r=this._menuService.createMenu(this.item.submenu,this._contextKeyService),x=r.getActions(this._options);r.dispose();for(const[,v]of x)v.length>0&&(o.push(...v),o.push(new k.d));return o.length&&o.pop(),o}}let l=class o{constructor(r,x,v,p,R){var O,b;if(this._commandService=R,this.id=r.id,this.label=(v==null?void 0:v.renderShortTitle)&&r.shortTitle?typeof r.shortTitle=="string"?r.shortTitle:r.shortTitle.value:typeof r.title=="string"?r.title:r.title.value,this.tooltip=(b=typeof r.tooltip=="string"?r.tooltip:(O=r.tooltip)===null||O===void 0?void 0:O.value)!==null&&b!==void 0?b:"",this.enabled=!r.precondition||p.contextMatchesRules(r.precondition),this.checked=void 0,r.toggled){const E=r.toggled.condition?r.toggled:{condition:r.toggled};this.checked=p.contextMatchesRules(E.condition),this.checked&&E.tooltip&&(this.tooltip=typeof E.tooltip=="string"?E.tooltip:E.tooltip.value),E.title&&(this.label=typeof E.title=="string"?E.title:E.title.value)}this.item=r,this.alt=x?new o(x,void 0,v,p,R):void 0,this._options=v,h.d.isThemeIcon(r.icon)&&(this.class=g.a.asClassName(r.icon))}dispose(){}run(...r){var x,v;let p=[];return((x=this._options)===null||x===void 0?void 0:x.arg)&&(p=[...p,this._options.arg]),((v=this._options)===null||v===void 0?void 0:v.shouldForwardArgs)&&(p=[...p,...r]),this._commandService.executeCommand(this.id,...p)}};l=n([c(3,_.b),c(4,S.b)],l)},fyJ8:function(H,J,D){"use strict";var k=D("rePB"),g=D("VTBJ"),C=D("Ff2n"),M=D("U8pU"),m=D("q1tI"),y=D.n(m),S=D("TSYQ"),_=D.n(S),t=D("c+Xe"),h=D("sR1s");function n(d){return d&&Object(M.a)(d)==="object"&&!Array.isArray(d)&&!m.isValidElement(d)}function c(d){return typeof d=="string"?!0:Object(t.c)(d)}function a(d,f){var l,o=d.prefixCls,r=d.className,x=d.record,v=d.index,p=d.dataIndex,R=d.render,O=d.children,b=d.component,E=b===void 0?"td":b,w=d.colSpan,T=d.rowSpan,F=d.fixLeft,N=d.fixRight,L=d.firstFixLeft,G=d.lastFixLeft,z=d.firstFixRight,A=d.lastFixRight,B=d.appendNode,U=d.additionalProps,I=U===void 0?{}:U,K=d.ellipsis,Z=d.align,ue=d.rowType,de=d.isSticky,Ce="".concat(o,"-cell"),Re,me;if(O)me=O;else{var Oe=Object(h.b)(x,p);if(me=Oe,R){var be=R(Oe,x,v);n(be)?(me=be.children,Re=be.props):me=be}}Object(M.a)(me)==="object"&&!Array.isArray(me)&&!m.isValidElement(me)&&(me=null),K&&(G||z)&&(me=m.createElement("span",{className:"".concat(Ce,"-content")},me));var ce=Re||{},se=ce.colSpan,ne=ce.rowSpan,ge=ce.style,ee=ce.className,re=Object(C.a)(ce,["colSpan","rowSpan","style","className"]),Te=se!==void 0?se:w,ie=ne!==void 0?ne:T;if(Te===0||ie===0)return null;var q={},Y=typeof F=="number",X=typeof N=="number";Y&&(q.position="sticky",q.left=F),X&&(q.position="sticky",q.right=N);var he={};Z&&(he.textAlign=Z);var fe,Ee=K===!0?{showTitle:!0}:K;Ee&&(Ee.showTitle||ue==="header")&&(typeof me=="string"||typeof me=="number"?fe=me.toString():m.isValidElement(me)&&typeof me.props.children=="string"&&(fe=me.props.children));var He=Object(g.a)(Object(g.a)(Object(g.a)({title:fe},re),I),{},{colSpan:Te&&Te!==1?Te:null,rowSpan:ie&&ie!==1?ie:null,className:_()(Ce,r,(l={},Object(k.a)(l,"".concat(Ce,"-fix-left"),Y),Object(k.a)(l,"".concat(Ce,"-fix-left-first"),L),Object(k.a)(l,"".concat(Ce,"-fix-left-last"),G),Object(k.a)(l,"".concat(Ce,"-fix-right"),X),Object(k.a)(l,"".concat(Ce,"-fix-right-first"),z),Object(k.a)(l,"".concat(Ce,"-fix-right-last"),A),Object(k.a)(l,"".concat(Ce,"-ellipsis"),K),Object(k.a)(l,"".concat(Ce,"-with-append"),B),Object(k.a)(l,"".concat(Ce,"-fix-sticky"),(Y||X)&&de),l),I.className,ee),style:Object(g.a)(Object(g.a)(Object(g.a)(Object(g.a)({},I.style),he),q),ge),ref:c(E)?f:null});return m.createElement(E,Object.assign({},He),B,me)}var i=m.forwardRef(a);i.displayName="Cell";var s=m.memo(i,function(d,f){return f.shouldCellUpdate?!f.shouldCellUpdate(f.record,d.record):!1});J.a=s},gJ3r:function(H,J,D){"use strict";D.d(J,"a",function(){return k});var k=[{value:"\u5317\u4EAC",label:"\u5317\u4EAC",children:[{value:"\u4E1C\u57CE",label:"\u4E1C\u57CE"},{value:"\u897F\u57CE",label:"\u897F\u57CE"},{value:"\u671D\u9633",label:"\u671D\u9633"},{value:"\u4E30\u53F0",label:"\u4E30\u53F0"},{value:"\u77F3\u666F\u5C71",label:"\u77F3\u666F\u5C71"},{value:"\u6D77\u6DC0",label:"\u6D77\u6DC0"},{value:"\u95E8\u5934\u6C9F",label:"\u95E8\u5934\u6C9F"},{value:"\u623F\u5C71",label:"\u623F\u5C71"},{value:"\u901A\u5DDE",label:"\u901A\u5DDE"},{value:"\u987A\u4E49",label:"\u987A\u4E49"},{value:"\u660C\u5E73",label:"\u660C\u5E73"},{value:"\u5927\u5174",label:"\u5927\u5174"},{value:"\u5E73\u8C37",label:"\u5E73\u8C37"},{value:"\u6000\u67D4",label:"\u6000\u67D4"},{value:"\u5BC6\u4E91",label:"\u5BC6\u4E91"},{value:"\u5EF6\u5E86",label:"\u5EF6\u5E86"}]},{value:"\u4E0A\u6D77",label:"\u4E0A\u6D77",children:[{value:"\u5D07\u660E",label:"\u5D07\u660E"},{value:"\u9EC4\u6D66",label:"\u9EC4\u6D66"},{value:"\u5362\u6E7E",label:"\u5362\u6E7E"},{value:"\u5F90\u6C47",label:"\u5F90\u6C47"},{value:"\u957F\u5B81",label:"\u957F\u5B81"},{value:"\u9759\u5B89",label:"\u9759\u5B89"},{value:"\u666E\u9640",label:"\u666E\u9640"},{value:"\u95F8\u5317",label:"\u95F8\u5317"},{value:"\u8679\u53E3",label:"\u8679\u53E3"},{value:"\u6768\u6D66",label:"\u6768\u6D66"},{value:"\u95F5\u884C",label:"\u95F5\u884C"},{value:"\u5B9D\u5C71",label:"\u5B9D\u5C71"},{value:"\u5609\u5B9A",label:"\u5609\u5B9A"},{value:"\u6D66\u4E1C",label:"\u6D66\u4E1C"},{value:"\u91D1\u5C71",label:"\u91D1\u5C71"},{value:"\u677E\u6C5F",label:"\u677E\u6C5F"},{value:"\u9752\u6D66",label:"\u9752\u6D66"},{value:"\u5357\u6C47",label:"\u5357\u6C47"},{value:"\u5949\u8D24",label:"\u5949\u8D24"}]},{value:"\u5E7F\u4E1C",label:"\u5E7F\u4E1C",children:[{value:"\u5E7F\u5DDE",label:"\u5E7F\u5DDE"},{value:"\u6DF1\u5733",label:"\u6DF1\u5733"},{value:"\u73E0\u6D77",label:"\u73E0\u6D77"},{value:"\u4E1C\u839E",label:"\u4E1C\u839E"},{value:"\u4E2D\u5C71",label:"\u4E2D\u5C71"},{value:"\u4F5B\u5C71",label:"\u4F5B\u5C71"},{value:"\u60E0\u5DDE",label:"\u60E0\u5DDE"},{value:"\u6CB3\u6E90",label:"\u6CB3\u6E90"},{value:"\u6F6E\u5DDE",label:"\u6F6E\u5DDE"},{value:"\u6C5F\u95E8",label:"\u6C5F\u95E8"},{value:"\u63ED\u9633",label:"\u63ED\u9633"},{value:"\u8302\u540D",label:"\u8302\u540D"},{value:"\u6885\u5DDE",label:"\u6885\u5DDE"},{value:"\u6E05\u8FDC",label:"\u6E05\u8FDC"},{value:"\u6C55\u5934",label:"\u6C55\u5934"},{value:"\u6C55\u5C3E",label:"\u6C55\u5C3E"},{value:"\u97F6\u5173",label:"\u97F6\u5173"},{value:"\u987A\u5FB7",label:"\u987A\u5FB7"},{value:"\u9633\u6C5F",label:"\u9633\u6C5F"},{value:"\u4E91\u6D6E",label:"\u4E91\u6D6E"},{value:"\u6E5B\u6C5F",label:"\u6E5B\u6C5F"},{value:"\u8087\u5E86",label:"\u8087\u5E86"}]},{value:"\u6C5F\u82CF",label:"\u6C5F\u82CF",children:[{value:"\u5357\u4EAC",label:"\u5357\u4EAC"},{value:"\u5E38\u719F",label:"\u5E38\u719F"},{value:"\u5E38\u5DDE",label:"\u5E38\u5DDE"},{value:"\u6D77\u95E8",label:"\u6D77\u95E8"},{value:"\u6DEE\u5B89",label:"\u6DEE\u5B89"},{value:"\u6C5F\u90FD",label:"\u6C5F\u90FD"},{value:"\u6C5F\u9634",label:"\u6C5F\u9634"},{value:"\u6606\u5C71",label:"\u6606\u5C71"},{value:"\u8FDE\u4E91\u6E2F",label:"\u8FDE\u4E91\u6E2F"},{value:"\u5357\u901A",label:"\u5357\u901A"},{value:"\u542F\u4E1C",label:"\u542F\u4E1C"},{value:"\u6CAD\u9633",label:"\u6CAD\u9633"},{value:"\u5BBF\u8FC1",label:"\u5BBF\u8FC1"},{value:"\u82CF\u5DDE",label:"\u82CF\u5DDE"},{value:"\u592A\u4ED3",label:"\u592A\u4ED3"},{value:"\u6CF0\u5DDE",label:"\u6CF0\u5DDE"},{value:"\u540C\u91CC",label:"\u540C\u91CC"},{value:"\u65E0\u9521",label:"\u65E0\u9521"},{value:"\u5F90\u5DDE",label:"\u5F90\u5DDE"},{value:"\u76D0\u57CE",label:"\u76D0\u57CE"},{value:"\u626C\u5DDE",label:"\u626C\u5DDE"},{value:"\u5B9C\u5174",label:"\u5B9C\u5174"},{value:"\u4EEA\u5F81",label:"\u4EEA\u5F81"},{value:"\u5F20\u5BB6\u6E2F",label:"\u5F20\u5BB6\u6E2F"},{value:"\u9547\u6C5F",label:"\u9547\u6C5F"}]},{value:"\u91CD\u5E86",label:"\u91CD\u5E86",children:[{value:"\u4E07\u5DDE",label:"\u4E07\u5DDE"},{value:"\u6DAA\u9675",label:"\u6DAA\u9675"},{value:"\u6E1D\u4E2D",label:"\u6E1D\u4E2D"},{value:"\u5927\u6E21\u53E3",label:"\u5927\u6E21\u53E3"},{value:"\u6C5F\u5317",label:"\u6C5F\u5317"},{value:"\u6C99\u576A\u575D",label:"\u6C99\u576A\u575D"},{value:"\u4E5D\u9F99\u5761",label:"\u4E5D\u9F99\u5761"},{value:"\u5357\u5CB8",label:"\u5357\u5CB8"},{value:"\u5317\u789A",label:"\u5317\u789A"},{value:"\u4E07\u76DB",label:"\u4E07\u76DB"},{value:"\u53CC\u6322",label:"\u53CC\u6322"},{value:"\u6E1D\u5317",label:"\u6E1D\u5317"},{value:"\u5DF4\u5357",label:"\u5DF4\u5357"},{value:"\u9ED4\u6C5F",label:"\u9ED4\u6C5F"},{value:"\u957F\u5BFF",label:"\u957F\u5BFF"},{value:"\u7DA6\u6C5F",label:"\u7DA6\u6C5F"},{value:"\u6F7C\u5357",label:"\u6F7C\u5357"},{value:"\u94DC\u6881",label:"\u94DC\u6881"},{value:"\u5927\u8DB3",label:"\u5927\u8DB3"},{value:"\u8363\u660C",label:"\u8363\u660C"},{value:"\u58C1\u5C71",label:"\u58C1\u5C71"},{value:"\u6881\u5E73",label:"\u6881\u5E73"},{value:"\u57CE\u53E3",label:"\u57CE\u53E3"},{value:"\u4E30\u90FD",label:"\u4E30\u90FD"},{value:"\u57AB\u6C5F",label:"\u57AB\u6C5F"},{value:"\u6B66\u9686",label:"\u6B66\u9686"},{value:"\u5FE0\u53BF",label:"\u5FE0\u53BF"},{value:"\u5F00\u53BF",label:"\u5F00\u53BF"},{value:"\u4E91\u9633",label:"\u4E91\u9633"},{value:"\u5949\u8282",label:"\u5949\u8282"},{value:"\u5DEB\u5C71",label:"\u5DEB\u5C71"},{value:"\u5DEB\u6EAA",label:"\u5DEB\u6EAA"},{value:"\u77F3\u67F1",label:"\u77F3\u67F1"},{value:"\u79C0\u5C71",label:"\u79C0\u5C71"},{value:"\u9149\u9633",label:"\u9149\u9633"},{value:"\u5F6D\u6C34",label:"\u5F6D\u6C34"},{value:"\u6C5F\u6D25",label:"\u6C5F\u6D25"},{value:"\u5408\u5DDD",label:"\u5408\u5DDD"},{value:"\u6C38\u5DDD",label:"\u6C38\u5DDD"},{value:"\u5357\u5DDD",label:"\u5357\u5DDD"}]},{value:"\u5B89\u5FBD",label:"\u5B89\u5FBD",children:[{value:"\u5408\u80A5",label:"\u5408\u80A5"},{value:"\u5B89\u5E86",label:"\u5B89\u5E86"},{value:"\u868C\u57E0",label:"\u868C\u57E0"},{value:"\u4EB3\u5DDE",label:"\u4EB3\u5DDE"},{value:"\u5DE2\u6E56",label:"\u5DE2\u6E56"},{value:"\u6EC1\u5DDE",label:"\u6EC1\u5DDE"},{value:"\u961C\u9633",label:"\u961C\u9633"},{value:"\u8D35\u6C60",label:"\u8D35\u6C60"},{value:"\u6DEE\u5317",label:"\u6DEE\u5317"},{value:"\u6DEE\u5316",label:"\u6DEE\u5316"},{value:"\u6DEE\u5357",label:"\u6DEE\u5357"},{value:"\u9EC4\u5C71",label:"\u9EC4\u5C71"},{value:"\u4E5D\u534E\u5C71",label:"\u4E5D\u534E\u5C71"},{value:"\u516D\u5B89",label:"\u516D\u5B89"},{value:"\u9A6C\u978D\u5C71",label:"\u9A6C\u978D\u5C71"},{value:"\u5BBF\u5DDE",label:"\u5BBF\u5DDE"},{value:"\u94DC\u9675",label:"\u94DC\u9675"},{value:"\u5C6F\u6EAA",label:"\u5C6F\u6EAA"},{value:"\u829C\u6E56",label:"\u829C\u6E56"},{value:"\u5BA3\u57CE",label:"\u5BA3\u57CE"}]},{value:"\u798F\u5EFA",label:"\u798F\u5EFA",children:[{value:"\u798F\u5DDE",label:"\u798F\u5DDE"},{value:"\u53A6\u95E8",label:"\u53A6\u95E8"},{value:"\u6CC9\u5DDE",label:"\u6CC9\u5DDE"},{value:"\u6F33\u5DDE",label:"\u6F33\u5DDE"},{value:"\u9F99\u5CA9",label:"\u9F99\u5CA9"},{value:"\u5357\u5E73",label:"\u5357\u5E73"},{value:"\u5B81\u5FB7",label:"\u5B81\u5FB7"},{value:"\u8386\u7530",label:"\u8386\u7530"},{value:"\u4E09\u660E",label:"\u4E09\u660E"}]},{value:"\u7518\u8083",label:"\u7518\u8083",children:[{value:"\u5170\u5DDE",label:"\u5170\u5DDE"},{value:"\u5609\u5CEA\u5173",label:"\u5609\u5CEA\u5173"},{value:"\u767D\u94F6",label:"\u767D\u94F6"},{value:"\u5B9A\u897F",label:"\u5B9A\u897F"},{value:"\u6566\u714C",label:"\u6566\u714C"},{value:"\u7518\u5357",label:"\u7518\u5357"},{value:"\u91D1\u660C",label:"\u91D1\u660C"},{value:"\u9152\u6CC9",label:"\u9152\u6CC9"},{value:"\u4E34\u590F",label:"\u4E34\u590F"},{value:"\u5E73\u51C9",label:"\u5E73\u51C9"},{value:"\u5929\u6C34",label:"\u5929\u6C34"},{value:"\u9647\u5357",label:"\u9647\u5357"},{value:"\u6B66\u5A01",label:"\u6B66\u5A01"},{value:"\u897F\u5CF0",label:"\u897F\u5CF0"},{value:"\u5F20\u6396",label:"\u5F20\u6396"}]},{value:"\u5E7F\u897F",label:"\u5E7F\u897F",children:[{value:"\u5357\u5B81",label:"\u5357\u5B81"},{value:"\u6765\u5BBE",label:"\u6765\u5BBE"},{value:"\u767E\u8272",label:"\u767E\u8272"},{value:"\u5317\u6D77",label:"\u5317\u6D77"},{value:"\u6842\u6797",label:"\u6842\u6797"},{value:"\u9632\u57CE\u6E2F",label:"\u9632\u57CE\u6E2F"},{value:"\u8D35\u6E2F",label:"\u8D35\u6E2F"},{value:"\u6CB3\u6C60",label:"\u6CB3\u6C60"},{value:"\u8D3A\u5DDE",label:"\u8D3A\u5DDE"},{value:"\u67F3\u5DDE",label:"\u67F3\u5DDE"},{value:"\u94A6\u5DDE",label:"\u94A6\u5DDE"},{value:"\u68A7\u5DDE",label:"\u68A7\u5DDE"},{value:"\u7389\u6797",label:"\u7389\u6797"}]},{value:"\u8D35\u5DDE",label:"\u8D35\u5DDE",children:[{value:"\u8D35\u9633",label:"\u8D35\u9633"},{value:"\u5B89\u987A",label:"\u5B89\u987A"},{value:"\u6BD5\u8282",label:"\u6BD5\u8282"},{value:"\u90FD\u5300",label:"\u90FD\u5300"},{value:"\u51EF\u91CC",label:"\u51EF\u91CC"},{value:"\u516D\u76D8\u6C34",label:"\u516D\u76D8\u6C34"},{value:"\u94DC\u4EC1",label:"\u94DC\u4EC1"},{value:"\u5174\u4E49",label:"\u5174\u4E49"},{value:"\u7389\u5C4F",label:"\u7389\u5C4F"},{value:"\u9075\u4E49",label:"\u9075\u4E49"}]},{value:"\u6D77\u5357",label:"\u6D77\u5357",children:[{value:"\u6D77\u53E3",label:"\u6D77\u53E3"},{value:"\u510B\u53BF",label:"\u510B\u53BF"},{value:"\u9675\u6C34",label:"\u9675\u6C34"},{value:"\u743C\u6D77",label:"\u743C\u6D77"},{value:"\u4E09\u4E9A",label:"\u4E09\u4E9A"},{value:"\u901A\u4EC0",label:"\u901A\u4EC0"},{value:"\u4E07\u5B81",label:"\u4E07\u5B81"}]},{value:"\u6CB3\u5317",label:"\u6CB3\u5317",children:[{value:"\u77F3\u5BB6\u5E84",label:"\u77F3\u5BB6\u5E84"},{value:"\u4FDD\u5B9A",label:"\u4FDD\u5B9A"},{value:"\u5317\u6234\u6CB3",label:"\u5317\u6234\u6CB3"},{value:"\u6CA7\u5DDE",label:"\u6CA7\u5DDE"},{value:"\u627F\u5FB7",label:"\u627F\u5FB7"},{value:"\u4E30\u6DA6",label:"\u4E30\u6DA6"},{value:"\u90AF\u90F8",label:"\u90AF\u90F8"},{value:"\u8861\u6C34",label:"\u8861\u6C34"},{value:"\u5ECA\u574A",label:"\u5ECA\u574A"},{value:"\u5357\u6234\u6CB3",label:"\u5357\u6234\u6CB3"},{value:"\u79E6\u7687\u5C9B",label:"\u79E6\u7687\u5C9B"},{value:"\u5510\u5C71",label:"\u5510\u5C71"},{value:"\u65B0\u57CE",label:"\u65B0\u57CE"},{value:"\u90A2\u53F0",label:"\u90A2\u53F0"},{value:"\u5F20\u5BB6\u53E3",label:"\u5F20\u5BB6\u53E3"}]},{value:"\u9ED1\u9F99\u6C5F",label:"\u9ED1\u9F99\u6C5F",children:[{value:"\u54C8\u5C14\u6EE8",label:"\u54C8\u5C14\u6EE8"},{value:"\u5317\u5B89",label:"\u5317\u5B89"},{value:"\u5927\u5E86",label:"\u5927\u5E86"},{value:"\u5927\u5174\u5B89\u5CAD",label:"\u5927\u5174\u5B89\u5CAD"},{value:"\u9E64\u5C97",label:"\u9E64\u5C97"},{value:"\u9ED1\u6CB3",label:"\u9ED1\u6CB3"},{value:"\u4F73\u6728\u65AF",label:"\u4F73\u6728\u65AF"},{value:"\u9E21\u897F",label:"\u9E21\u897F"},{value:"\u7261\u4E39\u6C5F",label:"\u7261\u4E39\u6C5F"},{value:"\u9F50\u9F50\u54C8\u5C14",label:"\u9F50\u9F50\u54C8\u5C14"},{value:"\u4E03\u53F0\u6CB3",label:"\u4E03\u53F0\u6CB3"},{value:"\u53CC\u9E2D\u5C71",label:"\u53CC\u9E2D\u5C71"},{value:"\u7EE5\u5316",label:"\u7EE5\u5316"},{value:"\u4F0A\u6625",label:"\u4F0A\u6625"}]},{value:"\u6CB3\u5357",label:"\u6CB3\u5357",children:[{value:"\u90D1\u5DDE",label:"\u90D1\u5DDE"},{value:"\u5B89\u9633",label:"\u5B89\u9633"},{value:"\u9E64\u58C1",label:"\u9E64\u58C1"},{value:"\u6F62\u5DDD",label:"\u6F62\u5DDD"},{value:"\u7126\u4F5C",label:"\u7126\u4F5C"},{value:"\u6D4E\u6E90",label:"\u6D4E\u6E90"},{value:"\u5F00\u5C01",label:"\u5F00\u5C01"},{value:"\u6F2F\u6CB3",label:"\u6F2F\u6CB3"},{value:"\u6D1B\u9633",label:"\u6D1B\u9633"},{value:"\u5357\u9633",label:"\u5357\u9633"},{value:"\u5E73\u9876\u5C71",label:"\u5E73\u9876\u5C71"},{value:"\u6FEE\u9633",label:"\u6FEE\u9633"},{value:"\u4E09\u95E8\u5CE1",label:"\u4E09\u95E8\u5CE1"},{value:"\u5546\u4E18",label:"\u5546\u4E18"},{value:"\u65B0\u4E61",label:"\u65B0\u4E61"},{value:"\u4FE1\u9633",label:"\u4FE1\u9633"},{value:"\u8BB8\u660C",label:"\u8BB8\u660C"},{value:"\u5468\u53E3",label:"\u5468\u53E3"},{value:"\u9A7B\u9A6C\u5E97",label:"\u9A7B\u9A6C\u5E97"}]},{value:"\u9999\u6E2F",label:"\u9999\u6E2F",children:[{value:"\u9999\u6E2F",label:"\u9999\u6E2F"},{value:"\u4E5D\u9F99",label:"\u4E5D\u9F99"},{value:"\u65B0\u754C",label:"\u65B0\u754C"}]},{value:"\u6E56\u5317",label:"\u6E56\u5317",children:[{value:"\u6B66\u6C49",label:"\u6B66\u6C49"},{value:"\u5929\u95E8",label:"\u5929\u95E8"},{value:"\u6069\u65BD",label:"\u6069\u65BD"},{value:"\u9102\u5DDE",label:"\u9102\u5DDE"},{value:"\u9EC4\u5188",label:"\u9EC4\u5188"},{value:"\u9EC4\u77F3",label:"\u9EC4\u77F3"},{value:"\u8346\u95E8",label:"\u8346\u95E8"},{value:"\u8346\u5DDE",label:"\u8346\u5DDE"},{value:"\u6F5C\u6C5F",label:"\u6F5C\u6C5F"},{value:"\u5341\u5830",label:"\u5341\u5830"},{value:"\u968F\u5DDE",label:"\u968F\u5DDE"},{value:"\u6B66\u7A74",label:"\u6B66\u7A74"},{value:"\u4ED9\u6843",label:"\u4ED9\u6843"},{value:"\u54B8\u5B81",label:"\u54B8\u5B81"},{value:"\u8944\u9633",label:"\u8944\u9633"},{value:"\u8944\u6A0A",label:"\u8944\u6A0A"},{value:"\u5B5D\u611F",label:"\u5B5D\u611F"},{value:"\u5B9C\u660C",label:"\u5B9C\u660C"}]},{value:"\u6E56\u5357",label:"\u6E56\u5357",children:[{value:"\u957F\u6C99",label:"\u957F\u6C99"},{value:"\u5E38\u5FB7",label:"\u5E38\u5FB7"},{value:"\u90F4\u5DDE",label:"\u90F4\u5DDE"},{value:"\u8861\u9633",label:"\u8861\u9633"},{value:"\u6000\u5316",label:"\u6000\u5316"},{value:"\u5409\u9996",label:"\u5409\u9996"},{value:"\u5A04\u5E95",label:"\u5A04\u5E95"},{value:"\u90B5\u9633",label:"\u90B5\u9633"},{value:"\u6E58\u6F6D",label:"\u6E58\u6F6D"},{value:"\u76CA\u9633",label:"\u76CA\u9633"},{value:"\u5CB3\u9633",label:"\u5CB3\u9633"},{value:"\u6C38\u5DDE",label:"\u6C38\u5DDE"},{value:"\u5F20\u5BB6\u754C",label:"\u5F20\u5BB6\u754C"},{value:"\u682A\u6D32",label:"\u682A\u6D32"}]},{value:"\u6C5F\u897F",label:"\u6C5F\u897F",children:[{value:"\u5357\u660C",label:"\u5357\u660C"},{value:"\u629A\u5DDE",label:"\u629A\u5DDE"},{value:"\u8D63\u5DDE",label:"\u8D63\u5DDE"},{value:"\u5409\u5B89",label:"\u5409\u5B89"},{value:"\u666F\u5FB7\u9547",label:"\u666F\u5FB7\u9547"},{value:"\u4E95\u5188\u5C71",label:"\u4E95\u5188\u5C71"},{value:"\u4E5D\u6C5F",label:"\u4E5D\u6C5F"},{value:"\u5E90\u5C71",label:"\u5E90\u5C71"},{value:"\u840D\u4E61",label:"\u840D\u4E61"},{value:"\u4E0A\u9976",label:"\u4E0A\u9976"},{value:"\u65B0\u4F59",label:"\u65B0\u4F59"},{value:"\u5B9C\u6625",label:"\u5B9C\u6625"},{value:"\u9E70\u6F6D",label:"\u9E70\u6F6D"}]},{value:"\u5409\u6797",label:"\u5409\u6797",children:[{value:"\u957F\u6625",label:"\u957F\u6625"},{value:"\u5409\u6797",label:"\u5409\u6797"},{value:"\u767D\u57CE",label:"\u767D\u57CE"},{value:"\u767D\u5C71",label:"\u767D\u5C71"},{value:"\u73F2\u6625",label:"\u73F2\u6625"},{value:"\u8FBD\u6E90",label:"\u8FBD\u6E90"},{value:"\u6885\u6CB3",label:"\u6885\u6CB3"},{value:"\u56DB\u5E73",label:"\u56DB\u5E73"},{value:"\u677E\u539F",label:"\u677E\u539F"},{value:"\u901A\u5316",label:"\u901A\u5316"},{value:"\u5EF6\u5409",label:"\u5EF6\u5409"}]},{value:"\u8FBD\u5B81",label:"\u8FBD\u5B81",children:[{value:"\u6C88\u9633",label:"\u6C88\u9633"},{value:"\u978D\u5C71",label:"\u978D\u5C71"},{value:"\u672C\u6EAA",label:"\u672C\u6EAA"},{value:"\u671D\u9633",label:"\u671D\u9633"},{value:"\u5927\u8FDE",label:"\u5927\u8FDE"},{value:"\u4E39\u4E1C",label:"\u4E39\u4E1C"},{value:"\u629A\u987A",label:"\u629A\u987A"},{value:"\u961C\u65B0",label:"\u961C\u65B0"},{value:"\u846B\u82A6\u5C9B",label:"\u846B\u82A6\u5C9B"},{value:"\u9526\u5DDE",label:"\u9526\u5DDE"},{value:"\u8FBD\u9633",label:"\u8FBD\u9633"},{value:"\u76D8\u9526",label:"\u76D8\u9526"},{value:"\u94C1\u5CAD",label:"\u94C1\u5CAD"},{value:"\u8425\u53E3",label:"\u8425\u53E3"}]},{value:"\u6FB3\u95E8",label:"\u6FB3\u95E8",children:[{value:"\u6FB3\u95E8",label:"\u6FB3\u95E8"}]},{value:"\u5185\u8499\u53E4",label:"\u5185\u8499\u53E4",children:[{value:"\u547C\u548C\u6D69\u7279",label:"\u547C\u548C\u6D69\u7279"},{value:"\u963F\u62C9\u5584\u76DF",label:"\u963F\u62C9\u5584\u76DF"},{value:"\u5305\u5934",label:"\u5305\u5934"},{value:"\u8D64\u5CF0",label:"\u8D64\u5CF0"},{value:"\u4E1C\u80DC",label:"\u4E1C\u80DC"},{value:"\u6D77\u62C9\u5C14",label:"\u6D77\u62C9\u5C14"},{value:"\u96C6\u5B81",label:"\u96C6\u5B81"},{value:"\u4E34\u6CB3",label:"\u4E34\u6CB3"},{value:"\u901A\u8FBD",label:"\u901A\u8FBD"},{value:"\u4E4C\u6D77",label:"\u4E4C\u6D77"},{value:"\u4E4C\u5170\u6D69\u7279",label:"\u4E4C\u5170\u6D69\u7279"},{value:"\u9521\u6797\u6D69\u7279",label:"\u9521\u6797\u6D69\u7279"}]},{value:"\u5B81\u590F",label:"\u5B81\u590F",children:[{value:"\u94F6\u5DDD",label:"\u94F6\u5DDD"},{value:"\u56FA\u6E90",label:"\u56FA\u6E90"},{value:"\u77F3\u5634\u5C71",label:"\u77F3\u5634\u5C71"},{value:"\u5434\u5FE0",label:"\u5434\u5FE0"}]},{value:"\u9752\u6D77",label:"\u9752\u6D77",children:[{value:"\u897F\u5B81",label:"\u897F\u5B81"},{value:"\u5FB7\u4EE4\u54C8",label:"\u5FB7\u4EE4\u54C8"},{value:"\u683C\u5C14\u6728",label:"\u683C\u5C14\u6728"},{value:"\u5171\u548C",label:"\u5171\u548C"},{value:"\u6D77\u4E1C",label:"\u6D77\u4E1C"},{value:"\u6D77\u664F",label:"\u6D77\u664F"},{value:"\u739B\u6C81",label:"\u739B\u6C81"},{value:"\u540C\u4EC1",label:"\u540C\u4EC1"},{value:"\u7389\u6811",label:"\u7389\u6811"}]},{value:"\u5C71\u4E1C",label:"\u5C71\u4E1C",children:[{value:"\u6D4E\u5357",label:"\u6D4E\u5357"},{value:"\u6EE8\u5DDE",label:"\u6EE8\u5DDE"},{value:"\u5156\u5DDE",label:"\u5156\u5DDE"},{value:"\u5FB7\u5DDE",label:"\u5FB7\u5DDE"},{value:"\u4E1C\u8425",label:"\u4E1C\u8425"},{value:"\u83CF\u6CFD",label:"\u83CF\u6CFD"},{value:"\u6D4E\u5B81",label:"\u6D4E\u5B81"},{value:"\u83B1\u829C",label:"\u83B1\u829C"},{value:"\u804A\u57CE",label:"\u804A\u57CE"},{value:"\u4E34\u6C82",label:"\u4E34\u6C82"},{value:"\u84EC\u83B1",label:"\u84EC\u83B1"},{value:"\u9752\u5C9B",label:"\u9752\u5C9B"},{value:"\u66F2\u961C",label:"\u66F2\u961C"},{value:"\u65E5\u7167",label:"\u65E5\u7167"},{value:"\u6CF0\u5B89",label:"\u6CF0\u5B89"},{value:"\u6F4D\u574A",label:"\u6F4D\u574A"},{value:"\u5A01\u6D77",label:"\u5A01\u6D77"},{value:"\u70DF\u53F0",label:"\u70DF\u53F0"},{value:"\u67A3\u5E84",label:"\u67A3\u5E84"},{value:"\u6DC4\u535A",label:"\u6DC4\u535A"}]},{value:"\u5C71\u897F",label:"\u5C71\u897F",children:[{value:"\u592A\u539F",label:"\u592A\u539F"},{value:"\u5415\u6881",label:"\u5415\u6881"},{value:"\u957F\u6CBB",label:"\u957F\u6CBB"},{value:"\u5927\u540C",label:"\u5927\u540C"},{value:"\u5019\u9A6C",label:"\u5019\u9A6C"},{value:"\u664B\u57CE",label:"\u664B\u57CE"},{value:"\u79BB\u77F3",label:"\u79BB\u77F3"},{value:"\u4E34\u6C7E",label:"\u4E34\u6C7E"},{value:"\u5B81\u6B66",label:"\u5B81\u6B66"},{value:"\u6714\u5DDE",label:"\u6714\u5DDE"},{value:"\u5FFB\u5DDE",label:"\u5FFB\u5DDE"},{value:"\u9633\u6CC9",label:"\u9633\u6CC9"},{value:"\u6986\u6B21",label:"\u6986\u6B21"},{value:"\u664B\u4E2D",label:"\u664B\u4E2D"},{value:"\u8FD0\u57CE",label:"\u8FD0\u57CE"}]},{value:"\u9655\u897F",label:"\u9655\u897F",children:[{value:"\u897F\u5B89",label:"\u897F\u5B89"},{value:"\u5B89\u5EB7",label:"\u5B89\u5EB7"},{value:"\u5B9D\u9E21",label:"\u5B9D\u9E21"},{value:"\u6C49\u4E2D",label:"\u6C49\u4E2D"},{value:"\u6E2D\u5357",label:"\u6E2D\u5357"},{value:"\u5546\u5DDE",label:"\u5546\u5DDE"},{value:"\u7EE5\u5FB7",label:"\u7EE5\u5FB7"},{value:"\u94DC\u5DDD",label:"\u94DC\u5DDD"},{value:"\u54B8\u9633",label:"\u54B8\u9633"},{value:"\u5EF6\u5B89",label:"\u5EF6\u5B89"},{value:"\u6986\u6797",label:"\u6986\u6797"}]},{value:"\u56DB\u5DDD",label:"\u56DB\u5DDD",children:[{value:"\u6210\u90FD",label:"\u6210\u90FD"},{value:"\u5DF4\u4E2D",label:"\u5DF4\u4E2D"},{value:"\u8FBE\u5DDD",label:"\u8FBE\u5DDD"},{value:"\u5FB7\u9633",label:"\u5FB7\u9633"},{value:"\u90FD\u6C5F\u5830",label:"\u90FD\u6C5F\u5830"},{value:"\u5CE8\u7709\u5C71",label:"\u5CE8\u7709\u5C71"},{value:"\u6DAA\u9675",label:"\u6DAA\u9675"},{value:"\u5E7F\u5B89",label:"\u5E7F\u5B89"},{value:"\u5E7F\u5143",label:"\u5E7F\u5143"},{value:"\u4E5D\u5BE8\u6C9F",label:"\u4E5D\u5BE8\u6C9F"},{value:"\u5EB7\u5B9A",label:"\u5EB7\u5B9A"},{value:"\u4E50\u5C71",label:"\u4E50\u5C71"},{value:"\u6CF8\u5DDE",label:"\u6CF8\u5DDE"},{value:"\u9A6C\u5C14\u5EB7",label:"\u9A6C\u5C14\u5EB7"},{value:"\u7EF5\u9633",label:"\u7EF5\u9633"},{value:"\u7709\u5C71",label:"\u7709\u5C71"},{value:"\u5357\u5145",label:"\u5357\u5145"},{value:"\u5185\u6C5F",label:"\u5185\u6C5F"},{value:"\u6500\u679D\u82B1",label:"\u6500\u679D\u82B1"},{value:"\u9042\u5B81",label:"\u9042\u5B81"},{value:"\u6C76\u5DDD",label:"\u6C76\u5DDD"},{value:"\u897F\u660C",label:"\u897F\u660C"},{value:"\u96C5\u5B89",label:"\u96C5\u5B89"},{value:"\u5B9C\u5BBE",label:"\u5B9C\u5BBE"},{value:"\u81EA\u8D21",label:"\u81EA\u8D21"},{value:"\u8D44\u9633",label:"\u8D44\u9633"}]},{value:"\u53F0\u6E7E",label:"\u53F0\u6E7E",children:[{value:"\u53F0\u5317",label:"\u53F0\u5317"},{value:"\u57FA\u9686",label:"\u57FA\u9686"},{value:"\u53F0\u5357",label:"\u53F0\u5357"},{value:"\u53F0\u4E2D",label:"\u53F0\u4E2D"},{value:"\u9AD8\u96C4",label:"\u9AD8\u96C4"},{value:"\u5C4F\u4E1C",label:"\u5C4F\u4E1C"},{value:"\u5357\u6295",label:"\u5357\u6295"},{value:"\u4E91\u6797",label:"\u4E91\u6797"},{value:"\u65B0\u7AF9",label:"\u65B0\u7AF9"},{value:"\u5F70\u5316",label:"\u5F70\u5316"},{value:"\u82D7\u6817",label:"\u82D7\u6817"},{value:"\u5609\u4E49",label:"\u5609\u4E49"},{value:"\u6843\u56ED",label:"\u6843\u56ED"},{value:"\u5B9C\u5170",label:"\u5B9C\u5170"},{value:"\u53F0\u4E1C",label:"\u53F0\u4E1C"},{value:"\u91D1\u95E8",label:"\u91D1\u95E8"},{value:"\u9A6C\u7956",label:"\u9A6C\u7956"},{value:"\u6F8E\u6E56",label:"\u6F8E\u6E56"}]},{value:"\u5929\u6D25",label:"\u5929\u6D25",children:[{value:"\u5929\u6D25",label:"\u5929\u6D25"},{value:"\u548C\u5E73",label:"\u548C\u5E73"},{value:"\u4E1C\u4E3D",label:"\u4E1C\u4E3D"},{value:"\u6CB3\u4E1C",label:"\u6CB3\u4E1C"},{value:"\u897F\u9752",label:"\u897F\u9752"},{value:"\u6CB3\u897F",label:"\u6CB3\u897F"},{value:"\u6D25\u5357",label:"\u6D25\u5357"},{value:"\u5357\u5F00",label:"\u5357\u5F00"},{value:"\u5317\u8FB0",label:"\u5317\u8FB0"},{value:"\u6CB3\u5317",label:"\u6CB3\u5317"},{value:"\u6B66\u6E05",label:"\u6B66\u6E05"},{value:"\u7EA2\u6322",label:"\u7EA2\u6322"},{value:"\u5858\u6CBD",label:"\u5858\u6CBD"},{value:"\u6C49\u6CBD",label:"\u6C49\u6CBD"},{value:"\u5927\u6E2F",label:"\u5927\u6E2F"},{value:"\u5B81\u6CB3",label:"\u5B81\u6CB3"},{value:"\u9759\u6D77",label:"\u9759\u6D77"},{value:"\u5B9D\u577B",label:"\u5B9D\u577B"},{value:"\u84DF\u53BF",label:"\u84DF\u53BF"}]},{value:"\u65B0\u7586",label:"\u65B0\u7586",children:[{value:"\u4E4C\u9C81\u6728\u9F50",label:"\u4E4C\u9C81\u6728\u9F50"},{value:"\u963F\u514B\u82CF",label:"\u963F\u514B\u82CF"},{value:"\u963F\u52D2\u6CF0",label:"\u963F\u52D2\u6CF0"},{value:"\u963F\u56FE\u4EC0",label:"\u963F\u56FE\u4EC0"},{value:"\u535A\u4E50",label:"\u535A\u4E50"},{value:"\u660C\u5409",label:"\u660C\u5409"},{value:"\u4E1C\u5C71",label:"\u4E1C\u5C71"},{value:"\u54C8\u5BC6",label:"\u54C8\u5BC6"},{value:"\u548C\u7530",label:"\u548C\u7530"},{value:"\u5580\u4EC0",label:"\u5580\u4EC0"},{value:"\u514B\u62C9\u739B\u4F9D",label:"\u514B\u62C9\u739B\u4F9D"},{value:"\u5E93\u8F66",label:"\u5E93\u8F66"},{value:"\u5E93\u5C14\u52D2",label:"\u5E93\u5C14\u52D2"},{value:"\u594E\u5C6F",label:"\u594E\u5C6F"},{value:"\u77F3\u6CB3\u5B50",label:"\u77F3\u6CB3\u5B50"},{value:"\u5854\u57CE",label:"\u5854\u57CE"},{value:"\u5410\u9C81\u756A",label:"\u5410\u9C81\u756A"},{value:"\u4F0A\u5B81",label:"\u4F0A\u5B81"}]},{value:"\u897F\u85CF",label:"\u897F\u85CF",children:[{value:"\u62C9\u8428",label:"\u62C9\u8428"},{value:"\u963F\u91CC",label:"\u963F\u91CC"},{value:"\u660C\u90FD",label:"\u660C\u90FD"},{value:"\u6797\u829D",label:"\u6797\u829D"},{value:"\u90A3\u66F2",label:"\u90A3\u66F2"},{value:"\u65E5\u5580\u5219",label:"\u65E5\u5580\u5219"},{value:"\u5C71\u5357",label:"\u5C71\u5357"}]},{value:"\u4E91\u5357",label:"\u4E91\u5357",children:[{value:"\u6606\u660E",label:"\u6606\u660E"},{value:"\u5927\u7406",label:"\u5927\u7406"},{value:"\u4FDD\u5C71",label:"\u4FDD\u5C71"},{value:"\u695A\u96C4",label:"\u695A\u96C4"},{value:"\u5927\u7406",label:"\u5927\u7406"},{value:"\u4E1C\u5DDD",label:"\u4E1C\u5DDD"},{value:"\u4E2A\u65E7",label:"\u4E2A\u65E7"},{value:"\u666F\u6D2A",label:"\u666F\u6D2A"},{value:"\u5F00\u8FDC",label:"\u5F00\u8FDC"},{value:"\u4E34\u6CA7",label:"\u4E34\u6CA7"},{value:"\u4E3D\u6C5F",label:"\u4E3D\u6C5F"},{value:"\u516D\u5E93",label:"\u516D\u5E93"},{value:"\u6F5E\u897F",label:"\u6F5E\u897F"},{value:"\u66F2\u9756",label:"\u66F2\u9756"},{value:"\u601D\u8305",label:"\u601D\u8305"},{value:"\u6587\u5C71",label:"\u6587\u5C71"},{value:"\u897F\u53CC\u7248\u7EB3",label:"\u897F\u53CC\u7248\u7EB3"},{value:"\u7389\u6EAA",label:"\u7389\u6EAA"},{value:"\u4E2D\u7538",label:"\u4E2D\u7538"},{value:"\u662D\u901A",label:"\u662D\u901A"}]},{value:"\u6D59\u6C5F",label:"\u6D59\u6C5F",children:[{value:"\u676D\u5DDE",label:"\u676D\u5DDE"},{value:"\u6E29\u5DDE",label:"\u6E29\u5DDE"},{value:"\u5B89\u5409",label:"\u5B89\u5409"},{value:"\u6148\u6EAA",label:"\u6148\u6EAA"},{value:"\u5B9A\u6D77",label:"\u5B9A\u6D77"},{value:"\u5949\u5316",label:"\u5949\u5316"},{value:"\u6D77\u76D0",label:"\u6D77\u76D0"},{value:"\u9EC4\u5CA9",label:"\u9EC4\u5CA9"},{value:"\u6E56\u5DDE",label:"\u6E56\u5DDE"},{value:"\u5609\u5174",label:"\u5609\u5174"},{value:"\u91D1\u534E",label:"\u91D1\u534E"},{value:"\u4E34\u5B89",label:"\u4E34\u5B89"},{value:"\u4E34\u6D77",label:"\u4E34\u6D77"},{value:"\u4E3D\u6C34",label:"\u4E3D\u6C34"},{value:"\u5B81\u6CE2",label:"\u5B81\u6CE2"},{value:"\u74EF\u6D77",label:"\u74EF\u6D77"},{value:"\u5E73\u6E56",label:"\u5E73\u6E56"},{value:"\u5343\u5C9B\u6E56",label:"\u5343\u5C9B\u6E56"},{value:"\u8862\u5DDE",label:"\u8862\u5DDE"},{value:"\u6C5F\u5C71",label:"\u6C5F\u5C71"},{value:"\u745E\u5B89",label:"\u745E\u5B89"},{value:"\u7ECD\u5174",label:"\u7ECD\u5174"},{value:"\u5D4A\u5DDE",label:"\u5D4A\u5DDE"},{value:"\u53F0\u5DDE",label:"\u53F0\u5DDE"},{value:"\u6E29\u5CAD",label:"\u6E29\u5CAD"},{value:"\u4F59\u59DA",label:"\u4F59\u59DA"},{value:"\u821F\u5C71",label:"\u821F\u5C71"}]},{value:"\u6D77\u5916",label:"\u6D77\u5916",children:[{value:"\u7F8E\u56FD",label:"\u7F8E\u56FD"},{value:"\u65E5\u672C",label:"\u65E5\u672C"},{value:"\u82F1\u56FD",label:"\u82F1\u56FD"},{value:"\u6CD5\u56FD",label:"\u6CD5\u56FD"},{value:"\u5FB7\u56FD",label:"\u5FB7\u56FD"},{value:"\u5176\u4ED6",label:"\u5176\u4ED6"}]}]},"gb/T":function(H,J,D){(function(k,g,C){H.exports=J=g(D("Ib8C"),D("OLod"))})(this,function(k){return k.mode.ECB=function(){var g=k.lib.BlockCipherMode.extend();return g.Encryptor=g.extend({processBlock:function(C,M){this._cipher.encryptBlock(C,M)}}),g.Decryptor=g.extend({processBlock:function(C,M){this._cipher.decryptBlock(C,M)}}),g}(),k.mode.ECB})},h78n:function(H,J,D){"use strict";D.d(J,"a",function(){return L});var k=D("q1tI"),g=D.n(k),C=D("TSYQ"),M=D.n(C),m={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},y=function(A){var B=A.map(function(){return Object(k.useRef)()}),U=Object(k.useRef)();return Object(k.useEffect)(function(){var I=Date.now(),K=!1;Object.keys(B).forEach(function(Z){var ue=B[Z].current;if(!ue)return;K=!0;var de=ue.style;de.transitionDuration=".3s, .3s, .3s, .06s",U.current&&I-U.current<100&&(de.transitionDuration="0s, 0s")}),K&&(U.current=Date.now())}),[B]};function S(){return S=Object.assign||function(z){for(var A=1;A<arguments.length;A++){var B=arguments[A];for(var U in B)Object.prototype.hasOwnProperty.call(B,U)&&(z[U]=B[U])}return z},S.apply(this,arguments)}function _(z,A){return a(z)||c(z,A)||h(z,A)||t()}function t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function h(z,A){if(!z)return;if(typeof z=="string")return n(z,A);var B=Object.prototype.toString.call(z).slice(8,-1);if(B==="Object"&&z.constructor&&(B=z.constructor.name),B==="Map"||B==="Set")return Array.from(z);if(B==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(B))return n(z,A)}function n(z,A){(A==null||A>z.length)&&(A=z.length);for(var B=0,U=new Array(A);B<A;B++)U[B]=z[B];return U}function c(z,A){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(z)))return;var B=[],U=!0,I=!1,K=void 0;try{for(var Z=z[Symbol.iterator](),ue;!(U=(ue=Z.next()).done)&&!(B.push(ue.value),A&&B.length===A);U=!0);}catch(de){I=!0,K=de}finally{try{!U&&Z.return!=null&&Z.return()}finally{if(I)throw K}}return B}function a(z){if(Array.isArray(z))return z}function i(z,A){if(z==null)return{};var B=s(z,A),U,I;if(Object.getOwnPropertySymbols){var K=Object.getOwnPropertySymbols(z);for(I=0;I<K.length;I++){if(U=K[I],A.indexOf(U)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(z,U))continue;B[U]=z[U]}}return B}function s(z,A){if(z==null)return{};var B={},U=Object.keys(z),I,K;for(K=0;K<U.length;K++){if(I=U[K],A.indexOf(I)>=0)continue;B[I]=z[I]}return B}var d=function(A){var B=A.className,U=A.percent,I=A.prefixCls,K=A.strokeColor,Z=A.strokeLinecap,ue=A.strokeWidth,de=A.style,Ce=A.trailColor,Re=A.trailWidth,me=A.transition,Oe=i(A,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete Oe.gapPosition;var be=Array.isArray(U)?U:[U],ce=Array.isArray(K)?K:[K],se=y(be),ne=_(se,1),ge=ne[0],ee=ue/2,re=100-ue/2,Te="M ".concat(Z==="round"?ee:0,",").concat(ee,`
L `).concat(Z==="round"?re:100,",").concat(ee),ie="0 0 100 ".concat(ue),q=0;return g.a.createElement("svg",S({className:M()("".concat(I,"-line"),B),viewBox:ie,preserveAspectRatio:"none",style:de},Oe),g.a.createElement("path",{className:"".concat(I,"-line-trail"),d:Te,strokeLinecap:Z,stroke:Ce,strokeWidth:Re||ue,fillOpacity:"0"}),be.map(function(Y,X){var he={strokeDasharray:"".concat(Y,"px, 100px"),strokeDashoffset:"-".concat(q,"px"),transition:me||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},fe=ce[X]||ce[ce.length-1];return q+=Y,g.a.createElement("path",{key:X,className:"".concat(I,"-line-path"),d:Te,strokeLinecap:Z,stroke:fe,strokeWidth:ue,fillOpacity:"0",ref:ge[X],style:he})}))};d.defaultProps=m;var f=d;function l(){return l=Object.assign||function(z){for(var A=1;A<arguments.length;A++){var B=arguments[A];for(var U in B)Object.prototype.hasOwnProperty.call(B,U)&&(z[U]=B[U])}return z},l.apply(this,arguments)}function o(z,A){return R(z)||p(z,A)||x(z,A)||r()}function r(){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 x(z,A){if(!z)return;if(typeof z=="string")return v(z,A);var B=Object.prototype.toString.call(z).slice(8,-1);if(B==="Object"&&z.constructor&&(B=z.constructor.name),B==="Map"||B==="Set")return Array.from(z);if(B==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(B))return v(z,A)}function v(z,A){(A==null||A>z.length)&&(A=z.length);for(var B=0,U=new Array(A);B<A;B++)U[B]=z[B];return U}function p(z,A){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(z)))return;var B=[],U=!0,I=!1,K=void 0;try{for(var Z=z[Symbol.iterator](),ue;!(U=(ue=Z.next()).done)&&!(B.push(ue.value),A&&B.length===A);U=!0);}catch(de){I=!0,K=de}finally{try{!U&&Z.return!=null&&Z.return()}finally{if(I)throw K}}return B}function R(z){if(Array.isArray(z))return z}function O(z,A){if(z==null)return{};var B=b(z,A),U,I;if(Object.getOwnPropertySymbols){var K=Object.getOwnPropertySymbols(z);for(I=0;I<K.length;I++){if(U=K[I],A.indexOf(U)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(z,U))continue;B[U]=z[U]}}return B}function b(z,A){if(z==null)return{};var B={},U=Object.keys(z),I,K;for(K=0;K<U.length;K++){if(I=U[K],A.indexOf(I)>=0)continue;B[I]=z[I]}return B}var E=0;function w(z){return+z.replace("%","")}function T(z){return Array.isArray(z)?z:[z]}function F(z,A,B,U){var I=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,K=arguments.length>5?arguments[5]:void 0,Z=50-U/2,ue=0,de=-Z,Ce=0,Re=-2*Z;switch(K){case"left":ue=-Z,de=0,Ce=2*Z,Re=0;break;case"right":ue=Z,de=0,Ce=-2*Z,Re=0;break;case"bottom":de=Z,Re=2*Z;break;default:}var me="M 50,50 m ".concat(ue,",").concat(de,`
a `).concat(Z,",").concat(Z," 0 1 1 ").concat(Ce,",").concat(-Re,`
a `).concat(Z,",").concat(Z," 0 1 1 ").concat(-Ce,",").concat(Re),Oe=Math.PI*2*Z,be={stroke:B,strokeDasharray:"".concat(A/100*(Oe-I),"px ").concat(Oe,"px"),strokeDashoffset:"-".concat(I/2+z/100*(Oe-I),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:me,pathStyle:be}}var N=function(A){var B=A.prefixCls,U=A.strokeWidth,I=A.trailWidth,K=A.gapDegree,Z=A.gapPosition,ue=A.trailColor,de=A.strokeLinecap,Ce=A.style,Re=A.className,me=A.strokeColor,Oe=A.percent,be=O(A,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),ce=Object(k.useMemo)(function(){return E+=1,E},[]),se=F(0,100,ue,U,K,Z),ne=se.pathString,ge=se.pathStyle,ee=T(Oe),re=T(me),Te=re.find(function(he){return Object.prototype.toString.call(he)==="[object Object]"}),ie=y(ee),q=o(ie,1),Y=q[0],X=function(){var fe=0;return ee.map(function(Ee,He){var Qe=re[He]||re[re.length-1],et=Object.prototype.toString.call(Qe)==="[object Object]"?"url(#".concat(B,"-gradient-").concat(ce,")"):"",it=F(fe,Ee,Qe,U,K,Z);return fe+=Ee,g.a.createElement("path",{key:He,className:"".concat(B,"-circle-path"),d:it.pathString,stroke:et,strokeLinecap:de,strokeWidth:U,opacity:Ee===0?0:1,fillOpacity:"0",style:it.pathStyle,ref:Y[He]})})};return g.a.createElement("svg",l({className:M()("".concat(B,"-circle"),Re),viewBox:"0 0 100 100",style:Ce},be),Te&&g.a.createElement("defs",null,g.a.createElement("linearGradient",{id:"".concat(B,"-gradient-").concat(ce),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(Te).sort(function(he,fe){return w(he)-w(fe)}).map(function(he,fe){return g.a.createElement("stop",{key:fe,offset:he,stopColor:Te[he]})}))),g.a.createElement("path",{className:"".concat(B,"-circle-trail"),d:ne,stroke:ue,strokeLinecap:de,strokeWidth:I||U,fillOpacity:"0",style:ge}),X().reverse())};N.defaultProps=m;var L=N,G={Line:f,Circle:L}},hW8S:function(H,J,D){"use strict";D.d(J,"a",function(){return M}),D.d(J,"c",function(){return m}),D.d(J,"b",function(){return y});var k=D("VTBJ"),g=D("Ff2n"),C=D("Kwbf"),M="RC_TABLE_INTERNAL_COL_DEFINE";function m(S){var _=S.expandable,t=Object(g.a)(S,["expandable"]);return"expandable"in S?Object(k.a)(Object(k.a)({},t),_):t}function y(S){return Object.keys(S).reduce(function(_,t){return(t.substr(0,5)==="data-"||t.substr(0,5)==="aria-")&&(_[t]=S[t]),_},{})}},ic2d:function(H,J,D){"use strict";D.d(J,"a",function(){return M});var k=D("FWmy"),g=D("746U");class C{constructor(){this.data=new Map}add(m,y){k.a(g.l(m)),k.a(g.k(y)),k.a(!this.data.has(m),"There is already an extension with this id"),this.data.set(m,y)}as(m){return this.data.get(m)||null}}const M=new C},jO9C:function(H,J,D){(function(k,g,C){H.exports=J=g(D("Ib8C"),D("OLod"))})(this,function(k){return k.pad.Iso97971={pad:function(g,C){g.concat(k.lib.WordArray.create([2147483648],1)),k.pad.ZeroPadding.pad(g,C)},unpad:function(g){k.pad.ZeroPadding.unpad(g),g.sigBytes--}},k.pad.Iso97971})},jwmR:function(H,J,D){H.exports={flexRow:"flexRow___3nMh-",flexColumn:"flexColumn___Xpn5L",formWrap:"formWrap___3t9mN",example:"example___5c8Eu",footerWrap:"footerWrap___20Wal"}},k3GJ:function(H,J,D){"use strict";D.d(J,"a",function(){return Or});var k=D("rePB"),g=D("ODXe"),C=D("Ff2n"),M=D("VTBJ"),m=D("q1tI"),y=D("TSYQ"),S=D.n(y),_=D("Zm9Q"),t=D("6cGi"),h=D("KQm4"),n=D("xEkU"),c=D.n(n),a=D("t23M");function i(ke){var Xe=Object(m.useRef)(),Je=Object(m.useRef)(!1);function Ue(){for(var _e=arguments.length,De=new Array(_e),Se=0;Se<_e;Se++)De[Se]=arguments[Se];Je.current||(c.a.cancel(Xe.current),Xe.current=c()(function(){ke.apply(void 0,De)}))}return Object(m.useEffect)(function(){return function(){Je.current=!0,c.a.cancel(Xe.current)}},[]),Ue}function s(ke){var Xe=Object(m.useRef)([]),Je=Object(m.useState)({}),Ue=Object(g.a)(Je,2),_e=Ue[1],De=Object(m.useRef)(typeof ke=="function"?ke():ke),Se=i(function(){var Ge=De.current;Xe.current.forEach(function($e){Ge=$e(Ge)}),Xe.current=[],De.current=Ge,_e({})});function je(Ge){Xe.current.push(Ge),Se()}return[De.current,je]}var d=D("4IlW");function f(ke,Xe){var Je,Ue=ke.prefixCls,_e=ke.id,De=ke.active,Se=ke.rtl,je=ke.tab,Ge=je.key,$e=je.tab,Ke=je.disabled,qe=je.closeIcon,pt=ke.tabBarGutter,Dt=ke.tabPosition,jt=ke.closable,Yt=ke.renderWrapper,Pr=ke.removeAriaLabel,Qr=ke.editable,$r=ke.onClick,qr=ke.onRemove,zr=ke.onFocus,rn="".concat(Ue,"-tab");m.useEffect(function(){return qr},[]);var nn={};Dt==="top"||Dt==="bottom"?nn[Se?"marginLeft":"marginRight"]=pt:nn.marginBottom=pt;var vn=Qr&&jt!==!1&&!Ke;function un(Nr){if(Ke)return;$r(Nr)}function kn(Nr){Nr.preventDefault(),Nr.stopPropagation(),Qr.onEdit("remove",{key:Ge,event:Nr})}var hn=m.createElement("div",{key:Ge,ref:Xe,className:S()(rn,(Je={},Object(k.a)(Je,"".concat(rn,"-with-remove"),vn),Object(k.a)(Je,"".concat(rn,"-active"),De),Object(k.a)(Je,"".concat(rn,"-disabled"),Ke),Je)),style:nn,onClick:un},m.createElement("div",{role:"tab","aria-selected":De,id:_e&&"".concat(_e,"-tab-").concat(Ge),className:"".concat(rn,"-btn"),"aria-controls":_e&&"".concat(_e,"-panel-").concat(Ge),"aria-disabled":Ke,tabIndex:Ke?null:0,onClick:function(Ur){Ur.stopPropagation(),un(Ur)},onKeyDown:function(Ur){[d.a.SPACE,d.a.ENTER].includes(Ur.which)&&(Ur.preventDefault(),un(Ur))},onFocus:zr},$e),vn&&m.createElement("button",{type:"button","aria-label":Pr||"remove",tabIndex:0,className:"".concat(rn,"-remove"),onClick:function(Ur){Ur.stopPropagation(),kn(Ur)}},qe||Qr.removeIcon||"\xD7"));return Yt&&(hn=Yt(hn)),hn}var l=m.forwardRef(f),o={width:0,height:0,left:0,top:0};function r(ke,Xe,Je){return Object(m.useMemo)(function(){for(var Ue,_e=new Map,De=Xe.get((Ue=ke[0])===null||Ue===void 0?void 0:Ue.key)||o,Se=De.left+De.width,je=0;je<ke.length;je+=1){var Ge=ke[je].key,$e=Xe.get(Ge);if(!$e){var Ke;$e=Xe.get((Ke=ke[je-1])===null||Ke===void 0?void 0:Ke.key)||o}var qe=_e.get(Ge)||Object(M.a)({},$e);qe.right=Se-qe.left-qe.width,_e.set(Ge,qe)}return _e},[ke.map(function(Ue){return Ue.key}).join("_"),Xe,Je])}var x={width:0,height:0,left:0,top:0,right:0};function v(ke,Xe,Je,Ue,_e){var De=_e.tabs,Se=_e.tabPosition,je=_e.rtl,Ge,$e,Ke;["top","bottom"].includes(Se)?(Ge="width",$e=je?"right":"left",Ke=Math.abs(Xe.left)):(Ge="height",$e="top",Ke=-Xe.top);var qe=Xe[Ge],pt=Je[Ge],Dt=Ue[Ge],jt=qe;return pt+Dt>qe&&(jt=qe-Dt),Object(m.useMemo)(function(){if(!De.length)return[0,0];for(var Yt=De.length,Pr=Yt,Qr=0;Qr<Yt;Qr+=1){var $r=ke.get(De[Qr].key)||x;if($r[$e]+$r[Ge]>Ke+jt){Pr=Qr-1;break}}for(var qr=0,zr=Yt-1;zr>=0;zr-=1){var rn=ke.get(De[zr].key)||x;if(rn[$e]<Ke){qr=zr+1;break}}return[qr,Pr]},[ke,Ke,jt,Se,De.map(function(Yt){return Yt.key}).join("_"),je])}var p=D("wx14"),R=D("1OyB"),O=D("vuIU"),b=D("JX7q"),E=D("Ji7U"),w=D("LK+K"),T=D("I8Z2"),F=D("bT9E"),N=D("2GS6"),L=D("Gytx"),G=D.n(L),z=D("U8pU"),A=/iPhone/i,B=/iPod/i,U=/iPad/i,I=/\bAndroid(?:.+)Mobile\b/i,K=/Android/i,Z=/\bAndroid(?:.+)SD4930UR\b/i,ue=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,de=/Windows Phone/i,Ce=/\bWindows(?:.+)ARM\b/i,Re=/BlackBerry/i,me=/BB10/i,Oe=/Opera Mini/i,be=/\b(CriOS|Chrome)(?:.+)Mobile/i,ce=/Mobile(?:.+)Firefox\b/i;function se(ke,Xe){return ke.test(Xe)}function ne(ke){var Xe=ke||(typeof navigator!="undefined"?navigator.userAgent:""),Je=(Xe||"").split("[FBAN");if(typeof Je[1]!="undefined"){var Ue=Je,_e=Object(g.a)(Ue,1);Xe=_e[0]}if(Je=Xe.split("Twitter"),typeof Je[1]!="undefined"){var De=Je,Se=Object(g.a)(De,1);Xe=Se[0]}var je={apple:{phone:se(A,Xe)&&!se(de,Xe),ipod:se(B,Xe),tablet:!se(A,Xe)&&se(U,Xe)&&!se(de,Xe),device:(se(A,Xe)||se(B,Xe)||se(U,Xe))&&!se(de,Xe)},amazon:{phone:se(Z,Xe),tablet:!se(Z,Xe)&&se(ue,Xe),device:se(Z,Xe)||se(ue,Xe)},android:{phone:!se(de,Xe)&&se(Z,Xe)||!se(de,Xe)&&se(I,Xe),tablet:!se(de,Xe)&&!se(Z,Xe)&&!se(I,Xe)&&(se(ue,Xe)||se(K,Xe)),device:!se(de,Xe)&&(se(Z,Xe)||se(ue,Xe)||se(I,Xe)||se(K,Xe))||se(/\bokhttp\b/i,Xe)},windows:{phone:se(de,Xe),tablet:se(Ce,Xe),device:se(de,Xe)||se(Ce,Xe)},other:{blackberry:se(Re,Xe),blackberry10:se(me,Xe),opera:se(Oe,Xe),firefox:se(ce,Xe),chrome:se(be,Xe),device:se(Re,Xe)||se(me,Xe)||se(Oe,Xe)||se(ce,Xe)||se(be,Xe)},any:null,phone:null,tablet:null};return je.any=je.apple.device||je.android.device||je.windows.device||je.other.device,je.phone=je.apple.phone||je.android.phone||je.windows.phone,je.tablet=je.apple.tablet||je.android.tablet||je.windows.tablet,je}var ge=Object(M.a)(Object(M.a)({},ne()),{},{isMobile:ne}),ee=ge;function re(){}function Te(ke,Xe,Je){var Ue=Xe||"";return ke.key||"".concat(Ue,"item_").concat(Je)}function ie(ke){return"".concat(ke,"-menu-")}function q(ke,Xe){var Je=-1;m.Children.forEach(ke,function(Ue){Je+=1,Ue&&Ue.type&&Ue.type.isMenuItemGroup?m.Children.forEach(Ue.props.children,function(_e){Je+=1,Xe(_e,Je)}):Xe(Ue,Je)})}function Y(ke,Xe,Je){if(!ke||Je.find)return;m.Children.forEach(ke,function(Ue){if(Ue){var _e=Ue.type;if(!_e||!(_e.isSubMenu||_e.isMenuItem||_e.isMenuItemGroup))return;Xe.indexOf(Ue.key)!==-1?Je.find=!0:Ue.props.children&&Y(Ue.props.children,Xe,Je)}})}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"],he=function(Xe){var Je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ue=Xe&&typeof Xe.getBoundingClientRect=="function"&&Xe.getBoundingClientRect().width;if(Ue){if(Je){var _e=getComputedStyle(Xe),De=_e.marginLeft,Se=_e.marginRight;Ue+=+De.replace("px","")+ +Se.replace("px","")}Ue=+Ue.toFixed(6)}return Ue||0},fe=function(Xe,Je,Ue){Xe&&Object(z.a)(Xe.style)==="object"&&(Xe.style[Je]=Ue)},Ee=function(){return ee.any},He=D("bdgK"),Qe=D("i8i4"),et=D.n(Qe),it=D("wgJM"),ut=D("l4aY"),dt=D("m+aA"),Fe=D("c+Xe"),Ie=D("zT1h"),st=D("QC+M");function ft(ke,Xe,Je){return Je?ke[0]===Xe[0]:ke[0]===Xe[0]&&ke[1]===Xe[1]}function Ze(ke,Xe,Je){var Ue=ke[Xe]||{};return Object(M.a)(Object(M.a)({},Ue),Je)}function tt(ke,Xe,Je,Ue){for(var _e=Je.points,De=Object.keys(ke),Se=0;Se<De.length;Se+=1){var je=De[Se];if(ft(ke[je].points,_e,Ue))return"".concat(Xe,"-placement-").concat(je)}return""}var Be=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var ke=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(ke)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(ke==null?void 0:ke.substr(0,4)))},Pe=D("MNnm");function Ne(ke,Xe){var Je={};return Je[ke.toLowerCase()]=Xe.toLowerCase(),Je["Webkit".concat(ke)]="webkit".concat(Xe),Je["Moz".concat(ke)]="moz".concat(Xe),Je["ms".concat(ke)]="MS".concat(Xe),Je["O".concat(ke)]="o".concat(Xe.toLowerCase()),Je}function xe(ke,Xe){var Je={animationend:Ne("Animation","AnimationEnd"),transitionend:Ne("Transition","TransitionEnd")};return ke&&("AnimationEvent"in Xe||delete Je.animationend.animation,"TransitionEvent"in Xe||delete Je.transitionend.transition),Je}var Ae=xe(Object(Pe.a)(),typeof window!="undefined"?window:{}),Le={};if(Object(Pe.a)()){var Me=document.createElement("div");Le=Me.style}var We={};function nt(ke){if(We[ke])return We[ke];var Xe=Ae[ke];if(Xe)for(var Je=Object.keys(Xe),Ue=Je.length,_e=0;_e<Ue;_e+=1){var De=Je[_e];if(Object.prototype.hasOwnProperty.call(Xe,De)&&De in Le)return We[ke]=Xe[De],We[ke]}return""}var vt=nt("animationend"),bt=nt("transitionend"),Wt=!!(vt&&bt),Bt=vt||"animationend",lr=bt||"transitionend";function dr(ke,Xe){if(!ke)return null;if(Object(z.a)(ke)==="object"){var Je=Xe.replace(/-\w/g,function(Ue){return Ue[1].toUpperCase()});return ke[Je]}return"".concat(ke,"-").concat(Xe)}var Ot="none",Vr="appear",Wr="enter",Yr="leave",bn="none",Ar="prepare",fn="start",cn="active",Vt="end";function En(ke){var Xe=Object(m.useRef)(!1),Je=Object(m.useState)(ke),Ue=Object(g.a)(Je,2),_e=Ue[0],De=Ue[1];function Se(je){Xe.current||De(je)}return Object(m.useEffect)(function(){return function(){Xe.current=!0}},[]),[_e,Se]}var fr=Object(Pe.a)()?m.useLayoutEffect:m.useEffect,br=fr,Br=function(){var ke=m.useRef(null);function Xe(){it.a.cancel(ke.current)}function Je(Ue){var _e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;Xe();var De=Object(it.a)(function(){_e<=1?Ue({isCanceled:function(){return De!==ke.current}}):Je(Ue,_e-1)});ke.current=De}return m.useEffect(function(){return function(){Xe()}},[]),[Je,Xe]},Pn=[Ar,fn,cn,Vt],Kn=!1,dn=!0;function sr(ke){return ke===cn||ke===Vt}var Jn=function(ke,Xe){var Je=m.useState(bn),Ue=Object(g.a)(Je,2),_e=Ue[0],De=Ue[1],Se=Br(),je=Object(g.a)(Se,2),Ge=je[0],$e=je[1];function Ke(){De(Ar)}return br(function(){if(_e!==bn&&_e!==Vt){var qe=Pn.indexOf(_e),pt=Pn[qe+1],Dt=Xe(_e);Dt===Kn?De(pt):Ge(function(jt){function Yt(){if(jt.isCanceled())return;De(pt)}Dt===!0?Yt():Promise.resolve(Dt).then(Yt)})}},[ke,_e]),m.useEffect(function(){return function(){$e()}},[]),[Ke,_e]},Tn=function(ke){var Xe=Object(m.useRef)(),Je=Object(m.useRef)(ke);Je.current=ke;var Ue=m.useCallback(function(Se){Je.current(Se)},[]);function _e(Se){Se&&(Se.removeEventListener(lr,Ue),Se.removeEventListener(Bt,Ue))}function De(Se){Xe.current&&Xe.current!==Se&&_e(Xe.current),Se&&Se!==Xe.current&&(Se.addEventListener(lr,Ue),Se.addEventListener(Bt,Ue),Xe.current=Se)}return m.useEffect(function(){return function(){_e(Xe.current)}},[]),[De,_e]};function On(ke,Xe,Je,Ue){var _e=Ue.motionEnter,De=_e===void 0?!0:_e,Se=Ue.motionAppear,je=Se===void 0?!0:Se,Ge=Ue.motionLeave,$e=Ge===void 0?!0:Ge,Ke=Ue.motionDeadline,qe=Ue.motionLeaveImmediately,pt=Ue.onAppearPrepare,Dt=Ue.onEnterPrepare,jt=Ue.onLeavePrepare,Yt=Ue.onAppearStart,Pr=Ue.onEnterStart,Qr=Ue.onLeaveStart,$r=Ue.onAppearActive,qr=Ue.onEnterActive,zr=Ue.onLeaveActive,rn=Ue.onAppearEnd,nn=Ue.onEnterEnd,vn=Ue.onLeaveEnd,un=Ue.onVisibleChanged,kn=En(),hn=Object(g.a)(kn,2),Nr=hn[0],Ur=hn[1],on=En(Ot),gn=Object(g.a)(on,2),Tr=gn[0],xn=gn[1],Vn=En(null),Cn=Object(g.a)(Vn,2),jn=Cn[0],Rn=Cn[1],ei=Object(m.useRef)(!1),ui=Object(m.useRef)(null),Xn=Object(m.useRef)(!1),gi=Object(m.useRef)(null);function Xi(){var Mn=Je();return Mn||gi.current}var Si=Object(m.useRef)(!1);function ci(Mn){var In=Xi();if(Mn&&!Mn.deadline&&Mn.target!==In)return;var oi;Tr===Vr&&Si.current?oi=rn==null?void 0:rn(In,Mn):Tr===Wr&&Si.current?oi=nn==null?void 0:nn(In,Mn):Tr===Yr&&Si.current&&(oi=vn==null?void 0:vn(In,Mn)),oi!==!1&&!Xn.current&&(xn(Ot),Rn(null))}var Fn=Tn(ci),Un=Object(g.a)(Fn,1),Yn=Un[0],zn=m.useMemo(function(){var Mn,In,oi;switch(Tr){case"appear":return Mn={},Object(k.a)(Mn,Ar,pt),Object(k.a)(Mn,fn,Yt),Object(k.a)(Mn,cn,$r),Mn;case"enter":return In={},Object(k.a)(In,Ar,Dt),Object(k.a)(In,fn,Pr),Object(k.a)(In,cn,qr),In;case"leave":return oi={},Object(k.a)(oi,Ar,jt),Object(k.a)(oi,fn,Qr),Object(k.a)(oi,cn,zr),oi;default:return{}}},[Tr]),ai=Jn(Tr,function(Mn){if(Mn===Ar){var In=zn[Ar];return In?In(Xi()):Kn}if(Dn in zn){var oi;Rn(((oi=zn[Dn])===null||oi===void 0?void 0:oi.call(zn,Xi(),null))||null)}return Dn===cn&&(Yn(Xi()),Ke>0&&(clearTimeout(ui.current),ui.current=setTimeout(function(){ci({deadline:!0})},Ke))),dn}),Ai=Object(g.a)(ai,2),ra=Ai[0],Dn=Ai[1],Fi=sr(Dn);Si.current=Fi,br(function(){Ur(Xe);var Mn=ei.current;if(ei.current=!0,!ke)return;var In;!Mn&&Xe&&je&&(In=Vr),Mn&&Xe&&De&&(In=Wr),(Mn&&!Xe&&$e||!Mn&&qe&&!Xe&&$e)&&(In=Yr),In&&(xn(In),ra())},[Xe]),Object(m.useEffect)(function(){(Tr===Vr&&!je||Tr===Wr&&!De||Tr===Yr&&!$e)&&xn(Ot)},[je,De,$e]),Object(m.useEffect)(function(){return function(){clearTimeout(ui.current),Xn.current=!0}},[]),Object(m.useEffect)(function(){Nr!==void 0&&Tr===Ot&&(un==null||un(Nr))},[Nr,Tr]);var Ui=jn;return zn[Ar]&&Dn===fn&&(Ui=Object(M.a)({transition:"none"},Ui)),[Tr,Dn,Ui,Nr!=null?Nr:Xe]}var Jr=function(ke){Object(E.a)(Je,ke);var Xe=Object(w.a)(Je);function Je(){return Object(R.a)(this,Je),Xe.apply(this,arguments)}return Object(O.a)(Je,[{key:"render",value:function(){return this.props.children}}]),Je}(m.Component),An=Jr;function Zn(ke){var Xe=ke;Object(z.a)(ke)==="object"&&(Xe=ke.transitionSupport);function Je(_e){return!!(_e.motionName&&Xe)}var Ue=m.forwardRef(function(_e,De){var Se=_e.visible,je=Se===void 0?!0:Se,Ge=_e.removeOnLeave,$e=Ge===void 0?!0:Ge,Ke=_e.forceRender,qe=_e.children,pt=_e.motionName,Dt=_e.leavedClassName,jt=_e.eventProps,Yt=Je(_e),Pr=Object(m.useRef)(),Qr=Object(m.useRef)();function $r(){try{return Object(dt.a)(Pr.current||Qr.current)}catch(xn){return null}}var qr=On(Yt,je,$r,_e),zr=Object(g.a)(qr,4),rn=zr[0],nn=zr[1],vn=zr[2],un=zr[3],kn=m.useRef(un);un&&(kn.current=!0);var hn=Object(m.useRef)(De);hn.current=De;var Nr=m.useCallback(function(xn){Pr.current=xn,Object(Fe.b)(hn.current,xn)},[]),Ur,on=Object(M.a)(Object(M.a)({},jt),{},{visible:je});if(!qe)Ur=null;else if(rn===Ot||!Je(_e))un?Ur=qe(Object(M.a)({},on),Nr):!$e&&kn.current?Ur=qe(Object(M.a)(Object(M.a)({},on),{},{className:Dt}),Nr):Ke?Ur=qe(Object(M.a)(Object(M.a)({},on),{},{style:{display:"none"}}),Nr):Ur=null;else{var gn,Tr;nn===Ar?Tr="prepare":sr(nn)?Tr="active":nn===fn&&(Tr="start"),Ur=qe(Object(M.a)(Object(M.a)({},on),{},{className:S()(dr(pt,rn),(gn={},Object(k.a)(gn,dr(pt,"".concat(rn,"-").concat(Tr)),Tr),Object(k.a)(gn,pt,typeof pt=="string"),gn)),style:vn}),Nr)}return m.createElement(An,{ref:Qr},Ur)});return Ue.displayName="CSSMotion",Ue}var ri=Zn(Wt),Nt="add",_r="keep",mi="remove",xi="removed";function Di(ke){var Xe;return ke&&Object(z.a)(ke)==="object"&&"key"in ke?Xe=ke:Xe={key:ke},Object(M.a)(Object(M.a)({},Xe),{},{key:String(Xe.key)})}function wi(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return ke.map(Di)}function le(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Je=[],Ue=0,_e=Xe.length,De=wi(ke),Se=wi(Xe);De.forEach(function($e){for(var Ke=!1,qe=Ue;qe<_e;qe+=1){var pt=Se[qe];if(pt.key===$e.key){Ue<qe&&(Je=Je.concat(Se.slice(Ue,qe).map(function(Dt){return Object(M.a)(Object(M.a)({},Dt),{},{status:Nt})})),Ue=qe),Je.push(Object(M.a)(Object(M.a)({},pt),{},{status:_r})),Ue+=1,Ke=!0;break}}Ke||Je.push(Object(M.a)(Object(M.a)({},$e),{},{status:mi}))}),Ue<_e&&(Je=Je.concat(Se.slice(Ue).map(function($e){return Object(M.a)(Object(M.a)({},$e),{},{status:Nt})})));var je={};Je.forEach(function($e){var Ke=$e.key;je[Ke]=(je[Ke]||0)+1});var Ge=Object.keys(je).filter(function($e){return je[$e]>1});return Ge.forEach(function($e){Je=Je.filter(function(Ke){var qe=Ke.key,pt=Ke.status;return qe!==$e||pt!==mi}),Je.forEach(function(Ke){Ke.key===$e&&(Ke.status=_r)})}),Je}var V=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function $(ke){var Xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ri,Je=function(Ue){Object(E.a)(De,Ue);var _e=Object(w.a)(De);function De(){var Se;return Object(R.a)(this,De),Se=_e.apply(this,arguments),Se.state={keyEntities:[]},Se.removeKey=function(je){Se.setState(function(Ge){var $e=Ge.keyEntities;return{keyEntities:$e.map(function(Ke){return Ke.key!==je?Ke:Object(M.a)(Object(M.a)({},Ke),{},{status:xi})})}})},Se}return Object(O.a)(De,[{key:"render",value:function(){var je=this,Ge=this.state.keyEntities,$e=this.props,Ke=$e.component,qe=$e.children,pt=$e.onVisibleChanged,Dt=Object(C.a)($e,["component","children","onVisibleChanged"]),jt=Ke||m.Fragment,Yt={};return V.forEach(function(Pr){Yt[Pr]=Dt[Pr],delete Dt[Pr]}),delete Dt.keys,m.createElement(jt,Dt,Ge.map(function(Pr){var Qr=Pr.status,$r=Object(C.a)(Pr,["status"]),qr=Qr===Nt||Qr===_r;return m.createElement(Xe,Object(p.a)({},Yt,{key:$r.key,visible:qr,eventProps:$r,onVisibleChanged:function(rn){pt==null||pt(rn,{key:$r.key}),rn||je.removeKey($r.key)}}),qe)}))}}],[{key:"getDerivedStateFromProps",value:function(je,Ge){var $e=je.keys,Ke=Ge.keyEntities,qe=wi($e),pt=le(Ke,qe);return{keyEntities:pt.filter(function(Dt){var jt=Ke.find(function(Yt){var Pr=Yt.key;return Dt.key===Pr});return!(jt&&jt.status===xi&&Dt.status===mi)})}}}]),De}(m.Component);return Je.defaultProps={component:"div"},Je}var te=$(Wt),ye=ri;function oe(ke){var Xe=ke.prefixCls,Je=ke.motion,Ue=ke.animation,_e=ke.transitionName;return Je||(Ue?{motionName:"".concat(Xe,"-").concat(Ue)}:_e?{motionName:_e}:null)}function Ve(ke){var Xe=ke.prefixCls,Je=ke.visible,Ue=ke.zIndex,_e=ke.mask,De=ke.maskMotion,Se=ke.maskAnimation,je=ke.maskTransitionName;if(!_e)return null;var Ge={};return(De||je||Se)&&(Ge=Object(M.a)({motionAppear:!0},oe({motion:De,prefixCls:Xe,transitionName:je,animation:Se}))),m.createElement(ye,Object(p.a)({},Ge,{visible:Je,removeOnLeave:!0}),function($e){var Ke=$e.className;return m.createElement("div",{style:{zIndex:Ue},className:S()("".concat(Xe,"-mask"),Ke)})})}var Tt=D("9mu1"),Xt=D("o0o1"),Er=D.n(Xt),Pt=D("HaE+"),kr=["measure","align",null,"motion"],Gr=function(ke,Xe){var Je=Object(m.useState)(null),Ue=Object(g.a)(Je,2),_e=Ue[0],De=Ue[1],Se=Object(m.useRef)(),je=Object(m.useRef)(!1);function Ge(qe){je.current||De(qe)}function $e(){it.a.cancel(Se.current)}function Ke(qe){$e(),Se.current=Object(it.a)(function(){Ge(function(pt){switch(_e){case"align":return"motion";case"motion":return"stable";default:}return pt}),qe==null||qe()})}return Object(m.useEffect)(function(){Ge("measure")},[ke]),Object(m.useEffect)(function(){switch(_e){case"measure":Xe();break;default:}_e&&(Se.current=Object(it.a)(Object(Pt.a)(Er.a.mark(function qe(){var pt,Dt;return Er.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:pt=kr.indexOf(_e),Dt=kr[pt+1],Dt&&pt!==-1&&Ge(Dt);case 3:case"end":return Yt.stop()}},qe)}))))},[_e]),Object(m.useEffect)(function(){return function(){je.current=!0,$e()}},[]),[_e,Ke]},yn=function(ke){var Xe=m.useState({width:0,height:0}),Je=Object(g.a)(Xe,2),Ue=Je[0],_e=Je[1];function De(je){_e({width:je.offsetWidth,height:je.offsetHeight})}var Se=m.useMemo(function(){var je={};if(ke){var Ge=Ue.width,$e=Ue.height;ke.indexOf("height")!==-1&&$e?je.height=$e:ke.indexOf("minHeight")!==-1&&$e&&(je.minHeight=$e),ke.indexOf("width")!==-1&&Ge?je.width=Ge:ke.indexOf("minWidth")!==-1&&Ge&&(je.minWidth=Ge)}return je},[ke,Ue]);return[Se,De]},ni=m.forwardRef(function(ke,Xe){var Je=ke.visible,Ue=ke.prefixCls,_e=ke.className,De=ke.style,Se=ke.children,je=ke.zIndex,Ge=ke.stretch,$e=ke.destroyPopupOnHide,Ke=ke.forceRender,qe=ke.align,pt=ke.point,Dt=ke.getRootDomNode,jt=ke.getClassNameFromAlign,Yt=ke.onAlign,Pr=ke.onMouseEnter,Qr=ke.onMouseLeave,$r=ke.onMouseDown,qr=ke.onTouchStart,zr=Object(m.useRef)(),rn=Object(m.useRef)(),nn=Object(m.useState)(),vn=Object(g.a)(nn,2),un=vn[0],kn=vn[1],hn=yn(Ge),Nr=Object(g.a)(hn,2),Ur=Nr[0],on=Nr[1];function gn(){Ge&&on(Dt())}var Tr=Gr(Je,gn),xn=Object(g.a)(Tr,2),Vn=xn[0],Cn=xn[1],jn=Object(m.useRef)();function Rn(){return pt||Dt}function ei(){var Fn;(Fn=zr.current)===null||Fn===void 0||Fn.forceAlign()}function ui(Fn,Un){var Yn=jt(Un);un!==Yn&&kn(Yn),Vn==="align"&&(un!==Yn?Promise.resolve().then(function(){ei()}):Cn(function(){var zn;(zn=jn.current)===null||zn===void 0||zn.call(jn)}),Yt==null||Yt(Fn,Un))}var Xn=Object(M.a)({},oe(ke));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(Fn){var Un=Xn[Fn];Xn[Fn]=function(Yn,zn){return Cn(),Un==null?void 0:Un(Yn,zn)}});function gi(){return new Promise(function(Fn){jn.current=Fn})}m.useEffect(function(){!Xn.motionName&&Vn==="motion"&&Cn()},[Xn.motionName,Vn]),m.useImperativeHandle(Xe,function(){return{forceAlign:ei,getElement:function(){return rn.current}}});var Xi=Object(M.a)(Object(M.a)({},Ur),{},{zIndex:je,opacity:Vn==="motion"||Vn==="stable"||!Je?void 0:0,pointerEvents:Vn==="stable"?void 0:"none"},De),Si=!0;(qe==null?void 0:qe.points)&&(Vn==="align"||Vn==="stable")&&(Si=!1);var ci=Se;return m.Children.count(Se)>1&&(ci=m.createElement("div",{className:"".concat(Ue,"-content")},Se)),m.createElement(ye,Object(p.a)({visible:Je,ref:rn,leavedClassName:"".concat(Ue,"-hidden")},Xn,{onAppearPrepare:gi,onEnterPrepare:gi,removeOnLeave:$e,forceRender:Ke}),function(Fn,Un){var Yn=Fn.className,zn=Fn.style,ai=S()(Ue,_e,un,Yn);return m.createElement(Tt.a,{target:Rn(),key:"popup",ref:zr,monitorWindowResize:!0,disabled:Si,align:qe,onAlign:ui},m.createElement("div",{ref:Un,className:ai,onMouseEnter:Pr,onMouseLeave:Qr,onMouseDownCapture:$r,onTouchStartCapture:qr,style:Object(M.a)(Object(M.a)({},zn),Xi)},ci))})});ni.displayName="PopupInner";var ii=ni,Bn=m.forwardRef(function(ke,Xe){var Je=ke.prefixCls,Ue=ke.visible,_e=ke.zIndex,De=ke.children,Se=ke.mobile;Se=Se===void 0?{}:Se;var je=Se.popupClassName,Ge=Se.popupStyle,$e=Se.popupMotion,Ke=$e===void 0?{}:$e,qe=Se.popupRender,pt=m.useRef();m.useImperativeHandle(Xe,function(){return{forceAlign:function(){},getElement:function(){return pt.current}}});var Dt=Object(M.a)({zIndex:_e},Ge),jt=De;return m.Children.count(De)>1&&(jt=m.createElement("div",{className:"".concat(Je,"-content")},De)),qe&&(jt=qe(jt)),m.createElement(ye,Object(p.a)({visible:Ue,ref:pt,removeOnLeave:!0},Ke),function(Yt,Pr){var Qr=Yt.className,$r=Yt.style,qr=S()(Je,je,Qr);return m.createElement("div",{ref:Pr,className:qr,style:Object(M.a)(Object(M.a)({},$r),Dt)},jt)})});Bn.displayName="MobilePopupInner";var Ni=Bn,Ki=["visible","mobile"],Gn=m.forwardRef(function(ke,Xe){var Je=ke.visible,Ue=ke.mobile,_e=Object(C.a)(ke,Ki),De=Object(m.useState)(Je),Se=Object(g.a)(De,2),je=Se[0],Ge=Se[1],$e=Object(m.useState)(!1),Ke=Object(g.a)($e,2),qe=Ke[0],pt=Ke[1],Dt=Object(M.a)(Object(M.a)({},_e),{},{visible:je});Object(m.useEffect)(function(){Ge(Je),Je&&Ue&&pt(Be())},[Je,Ue]);var jt=qe?m.createElement(Ni,Object(p.a)({},Dt,{mobile:Ue,ref:Xe})):m.createElement(ii,Object(p.a)({},Dt,{ref:Xe}));return m.createElement("div",null,m.createElement(Ve,Dt),jt)});Gn.displayName="Popup";var Ti=Gn,Gi=m.createContext(null),Li=Gi;function li(){}function ea(){return""}function Vi(ke){return ke?ke.ownerDocument:window.document}var ta=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function oa(ke){var Xe=function(Je){Object(E.a)(_e,Je);var Ue=Object(w.a)(_e);function _e(De){var Se;Object(R.a)(this,_e),Se=Ue.call(this,De),Se.popupRef=m.createRef(),Se.triggerRef=m.createRef(),Se.attachId=void 0,Se.clickOutsideHandler=void 0,Se.touchOutsideHandler=void 0,Se.contextMenuOutsideHandler1=void 0,Se.contextMenuOutsideHandler2=void 0,Se.mouseDownTimeout=void 0,Se.focusTime=void 0,Se.preClickTime=void 0,Se.preTouchTime=void 0,Se.delayTimer=void 0,Se.hasPopupMouseDown=void 0,Se.onMouseEnter=function(Ge){var $e=Se.props.mouseEnterDelay;Se.fireEvents("onMouseEnter",Ge),Se.delaySetPopupVisible(!0,$e,$e?null:Ge)},Se.onMouseMove=function(Ge){Se.fireEvents("onMouseMove",Ge),Se.setPoint(Ge)},Se.onMouseLeave=function(Ge){Se.fireEvents("onMouseLeave",Ge),Se.delaySetPopupVisible(!1,Se.props.mouseLeaveDelay)},Se.onPopupMouseEnter=function(){Se.clearDelayTimer()},Se.onPopupMouseLeave=function(Ge){var $e;if(Ge.relatedTarget&&!Ge.relatedTarget.setTimeout&&Object(ut.a)(($e=Se.popupRef.current)===null||$e===void 0?void 0:$e.getElement(),Ge.relatedTarget))return;Se.delaySetPopupVisible(!1,Se.props.mouseLeaveDelay)},Se.onFocus=function(Ge){Se.fireEvents("onFocus",Ge),Se.clearDelayTimer(),Se.isFocusToShow()&&(Se.focusTime=Date.now(),Se.delaySetPopupVisible(!0,Se.props.focusDelay))},Se.onMouseDown=function(Ge){Se.fireEvents("onMouseDown",Ge),Se.preClickTime=Date.now()},Se.onTouchStart=function(Ge){Se.fireEvents("onTouchStart",Ge),Se.preTouchTime=Date.now()},Se.onBlur=function(Ge){Se.fireEvents("onBlur",Ge),Se.clearDelayTimer(),Se.isBlurToHide()&&Se.delaySetPopupVisible(!1,Se.props.blurDelay)},Se.onContextMenu=function(Ge){Ge.preventDefault(),Se.fireEvents("onContextMenu",Ge),Se.setPopupVisible(!0,Ge)},Se.onContextMenuClose=function(){Se.isContextMenuToShow()&&Se.close()},Se.onClick=function(Ge){if(Se.fireEvents("onClick",Ge),Se.focusTime){var $e;if(Se.preClickTime&&Se.preTouchTime?$e=Math.min(Se.preClickTime,Se.preTouchTime):Se.preClickTime?$e=Se.preClickTime:Se.preTouchTime&&($e=Se.preTouchTime),Math.abs($e-Se.focusTime)<20)return;Se.focusTime=0}Se.preClickTime=0,Se.preTouchTime=0,Se.isClickToShow()&&(Se.isClickToHide()||Se.isBlurToHide())&&Ge&&Ge.preventDefault&&Ge.preventDefault();var Ke=!Se.state.popupVisible;(Se.isClickToHide()&&!Ke||Ke&&Se.isClickToShow())&&Se.setPopupVisible(!Se.state.popupVisible,Ge)},Se.onPopupMouseDown=function(){if(Se.hasPopupMouseDown=!0,clearTimeout(Se.mouseDownTimeout),Se.mouseDownTimeout=window.setTimeout(function(){Se.hasPopupMouseDown=!1},0),Se.context){var Ge;(Ge=Se.context).onPopupMouseDown.apply(Ge,arguments)}},Se.onDocumentClick=function(Ge){if(Se.props.mask&&!Se.props.maskClosable)return;var $e=Ge.target,Ke=Se.getRootDomNode(),qe=Se.getPopupDomNode();(!Object(ut.a)(Ke,$e)||Se.isContextMenuOnly())&&!Object(ut.a)(qe,$e)&&!Se.hasPopupMouseDown&&Se.close()},Se.getRootDomNode=function(){var Ge=Se.props.getTriggerDOMNode;if(Ge)return Ge(Se.triggerRef.current);try{var $e=Object(dt.a)(Se.triggerRef.current);if($e)return $e}catch(Ke){}return et.a.findDOMNode(Object(b.a)(Se))},Se.getPopupClassNameFromAlign=function(Ge){var $e=[],Ke=Se.props,qe=Ke.popupPlacement,pt=Ke.builtinPlacements,Dt=Ke.prefixCls,jt=Ke.alignPoint,Yt=Ke.getPopupClassNameFromAlign;return qe&&pt&&$e.push(tt(pt,Dt,Ge,jt)),Yt&&$e.push(Yt(Ge)),$e.join(" ")},Se.getComponent=function(){var Ge=Se.props,$e=Ge.prefixCls,Ke=Ge.destroyPopupOnHide,qe=Ge.popupClassName,pt=Ge.onPopupAlign,Dt=Ge.popupMotion,jt=Ge.popupAnimation,Yt=Ge.popupTransitionName,Pr=Ge.popupStyle,Qr=Ge.mask,$r=Ge.maskAnimation,qr=Ge.maskTransitionName,zr=Ge.maskMotion,rn=Ge.zIndex,nn=Ge.popup,vn=Ge.stretch,un=Ge.alignPoint,kn=Ge.mobile,hn=Ge.forceRender,Nr=Se.state,Ur=Nr.popupVisible,on=Nr.point,gn=Se.getPopupAlign(),Tr={};return Se.isMouseEnterToShow()&&(Tr.onMouseEnter=Se.onPopupMouseEnter),Se.isMouseLeaveToHide()&&(Tr.onMouseLeave=Se.onPopupMouseLeave),Tr.onMouseDown=Se.onPopupMouseDown,Tr.onTouchStart=Se.onPopupMouseDown,m.createElement(Ti,Object(p.a)({prefixCls:$e,destroyPopupOnHide:Ke,visible:Ur,point:un&&on,className:qe,align:gn,onAlign:pt,animation:jt,getClassNameFromAlign:Se.getPopupClassNameFromAlign},Tr,{stretch:vn,getRootDomNode:Se.getRootDomNode,style:Pr,mask:Qr,zIndex:rn,transitionName:Yt,maskAnimation:$r,maskTransitionName:qr,maskMotion:zr,ref:Se.popupRef,motion:Dt,mobile:kn,forceRender:hn}),typeof nn=="function"?nn():nn)},Se.attachParent=function(Ge){it.a.cancel(Se.attachId);var $e=Se.props,Ke=$e.getPopupContainer,qe=$e.getDocument,pt=Se.getRootDomNode(),Dt;Ke?(pt||Ke.length===0)&&(Dt=Ke(pt)):Dt=qe(Se.getRootDomNode()).body,Dt?Dt.appendChild(Ge):Se.attachId=Object(it.a)(function(){Se.attachParent(Ge)})},Se.getContainer=function(){var Ge=Se.props.getDocument,$e=Ge(Se.getRootDomNode()).createElement("div");return $e.style.position="absolute",$e.style.top="0",$e.style.left="0",$e.style.width="100%",Se.attachParent($e),$e},Se.setPoint=function(Ge){var $e=Se.props.alignPoint;if(!$e||!Ge)return;Se.setState({point:{pageX:Ge.pageX,pageY:Ge.pageY}})},Se.handlePortalUpdate=function(){Se.state.prevPopupVisible!==Se.state.popupVisible&&Se.props.afterPopupVisibleChange(Se.state.popupVisible)},Se.triggerContextValue={onPopupMouseDown:Se.onPopupMouseDown};var je;return"popupVisible"in De?je=!!De.popupVisible:je=!!De.defaultPopupVisible,Se.state={prevPopupVisible:je,popupVisible:je},ta.forEach(function(Ge){Se["fire".concat(Ge)]=function($e){Se.fireEvents(Ge,$e)}}),Se}return Object(O.a)(_e,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Se=this.props,je=this.state;if(je.popupVisible){var Ge;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(Ge=Se.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Ie.a)(Ge,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(Ge=Ge||Se.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Ie.a)(Ge,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(Ge=Ge||Se.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Ie.a)(Ge,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(Ie.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),it.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var Se;return((Se=this.popupRef.current)===null||Se===void 0?void 0:Se.getElement())||null}},{key:"getPopupAlign",value:function(){var Se=this.props,je=Se.popupPlacement,Ge=Se.popupAlign,$e=Se.builtinPlacements;return je&&$e?Ze($e,je,Ge):Ge}},{key:"setPopupVisible",value:function(Se,je){var Ge=this.props.alignPoint,$e=this.state.popupVisible;this.clearDelayTimer(),$e!==Se&&("popupVisible"in this.props||this.setState({popupVisible:Se,prevPopupVisible:$e}),this.props.onPopupVisibleChange(Se)),Ge&&je&&Se&&this.setPoint(je)}},{key:"delaySetPopupVisible",value:function(Se,je,Ge){var $e=this,Ke=je*1e3;if(this.clearDelayTimer(),Ke){var qe=Ge?{pageX:Ge.pageX,pageY:Ge.pageY}:null;this.delayTimer=window.setTimeout(function(){$e.setPopupVisible(Se,qe),$e.clearDelayTimer()},Ke)}else this.setPopupVisible(Se,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(Se){var je=this.props.children.props,Ge=this.props;return je[Se]&&Ge[Se]?this["fire".concat(Se)]:je[Se]||Ge[Se]}},{key:"isClickToShow",value:function(){var Se=this.props,je=Se.action,Ge=Se.showAction;return je.indexOf("click")!==-1||Ge.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var Se=this.props.action;return Se==="contextMenu"||Se.length===1&&Se[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var Se=this.props,je=Se.action,Ge=Se.showAction;return je.indexOf("contextMenu")!==-1||Ge.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var Se=this.props,je=Se.action,Ge=Se.hideAction;return je.indexOf("click")!==-1||Ge.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var Se=this.props,je=Se.action,Ge=Se.showAction;return je.indexOf("hover")!==-1||Ge.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var Se=this.props,je=Se.action,Ge=Se.hideAction;return je.indexOf("hover")!==-1||Ge.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var Se=this.props,je=Se.action,Ge=Se.showAction;return je.indexOf("focus")!==-1||Ge.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var Se=this.props,je=Se.action,Ge=Se.hideAction;return je.indexOf("focus")!==-1||Ge.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var Se;(Se=this.popupRef.current)===null||Se===void 0||Se.forceAlign()}}},{key:"fireEvents",value:function(Se,je){var Ge=this.props.children.props[Se];Ge&&Ge(je);var $e=this.props[Se];$e&&$e(je)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var Se=this.state.popupVisible,je=this.props,Ge=je.children,$e=je.forceRender,Ke=je.alignPoint,qe=je.className,pt=je.autoDestroy,Dt=m.Children.only(Ge),jt={key:"trigger"};this.isContextMenuToShow()?jt.onContextMenu=this.onContextMenu:jt.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(jt.onClick=this.onClick,jt.onMouseDown=this.onMouseDown,jt.onTouchStart=this.onTouchStart):(jt.onClick=this.createTwoChains("onClick"),jt.onMouseDown=this.createTwoChains("onMouseDown"),jt.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(jt.onMouseEnter=this.onMouseEnter,Ke&&(jt.onMouseMove=this.onMouseMove)):jt.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?jt.onMouseLeave=this.onMouseLeave:jt.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(jt.onFocus=this.onFocus,jt.onBlur=this.onBlur):(jt.onFocus=this.createTwoChains("onFocus"),jt.onBlur=this.createTwoChains("onBlur"));var Yt=S()(Dt&&Dt.props&&Dt.props.className,qe);Yt&&(jt.className=Yt);var Pr=Object(M.a)({},jt);Object(Fe.c)(Dt)&&(Pr.ref=Object(Fe.a)(this.triggerRef,Dt.ref));var Qr=m.cloneElement(Dt,Pr),$r;return(Se||this.popupRef.current||$e)&&($r=m.createElement(ke,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!Se&&pt&&($r=null),m.createElement(Li.Provider,{value:this.triggerContextValue},Qr,$r)}}],[{key:"getDerivedStateFromProps",value:function(Se,je){var Ge=Se.popupVisible,$e={};return Ge!==void 0&&je.popupVisible!==Ge&&($e.popupVisible=Ge,$e.prevPopupVisible=je.popupVisible),$e}}]),_e}(m.Component);return Xe.contextType=Li,Xe.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:ea,getDocument:Vi,onPopupVisibleChange:li,afterPopupVisibleChange:li,onPopupAlign:li,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},Xe}var Pi=oa(st.a),qn={adjustX:1,adjustY:1},ji={topLeft:{points:["bl","tl"],overflow:qn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:qn,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:qn,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:qn,offset:[4,0]}},ha={topLeft:{points:["bl","tl"],overflow:qn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:qn,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:qn,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:qn,offset:[4,0]}},xt=ji,rt=0,mt={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},wt=function(Xe,Je,Ue){var _e=ie(Je),De=Xe.getState();Xe.setState({defaultActiveFirst:Object(M.a)(Object(M.a)({},De.defaultActiveFirst),{},Object(k.a)({},_e,Ue))})},Lt=function(ke){Object(E.a)(Je,ke);var Xe=Object(w.a)(Je);function Je(Ue){var _e;Object(R.a)(this,Je),_e=Xe.call(this,Ue),_e.onDestroy=function(Ke){_e.props.onDestroy(Ke)},_e.onKeyDown=function(Ke){var qe=Ke.keyCode,pt=_e.menuInstance,Dt=_e.props.store,jt=_e.getVisible();if(qe===d.a.ENTER)return _e.onTitleClick(Ke),wt(Dt,_e.props.eventKey,!0),!0;if(qe===d.a.RIGHT)return jt?pt.onKeyDown(Ke):(_e.triggerOpenChange(!0),wt(Dt,_e.props.eventKey,!0)),!0;if(qe===d.a.LEFT){var Yt;if(jt)Yt=pt.onKeyDown(Ke);else return;return Yt||(_e.triggerOpenChange(!1),Yt=!0),Yt}return jt&&(qe===d.a.UP||qe===d.a.DOWN)?pt.onKeyDown(Ke):void 0},_e.onOpenChange=function(Ke){_e.props.onOpenChange(Ke)},_e.onPopupVisibleChange=function(Ke){_e.triggerOpenChange(Ke,Ke?"mouseenter":"mouseleave")},_e.onMouseEnter=function(Ke){var qe=_e.props,pt=qe.eventKey,Dt=qe.onMouseEnter,jt=qe.store;wt(jt,_e.props.eventKey,!1),Dt({key:pt,domEvent:Ke})},_e.onMouseLeave=function(Ke){var qe=_e.props,pt=qe.parentMenu,Dt=qe.eventKey,jt=qe.onMouseLeave;pt.subMenuInstance=Object(b.a)(_e),jt({key:Dt,domEvent:Ke})},_e.onTitleMouseEnter=function(Ke){var qe=_e.props,pt=qe.eventKey,Dt=qe.onItemHover,jt=qe.onTitleMouseEnter;Dt({key:pt,hover:!0}),jt({key:pt,domEvent:Ke})},_e.onTitleMouseLeave=function(Ke){var qe=_e.props,pt=qe.parentMenu,Dt=qe.eventKey,jt=qe.onItemHover,Yt=qe.onTitleMouseLeave;pt.subMenuInstance=Object(b.a)(_e),jt({key:Dt,hover:!1}),Yt({key:Dt,domEvent:Ke})},_e.onTitleClick=function(Ke){var qe=Object(b.a)(_e),pt=qe.props;if(pt.onTitleClick({key:pt.eventKey,domEvent:Ke}),pt.triggerSubMenuAction==="hover")return;_e.triggerOpenChange(!_e.getVisible(),"click"),wt(pt.store,_e.props.eventKey,!1)},_e.onSubMenuClick=function(Ke){typeof _e.props.onClick=="function"&&_e.props.onClick(_e.addKeyPath(Ke))},_e.onSelect=function(Ke){_e.props.onSelect(Ke)},_e.onDeselect=function(Ke){_e.props.onDeselect(Ke)},_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(Ke){_e.menuInstance=Ke},_e.addKeyPath=function(Ke){return Object(M.a)(Object(M.a)({},Ke),{},{keyPath:(Ke.keyPath||[]).concat(_e.props.eventKey)})},_e.triggerOpenChange=function(Ke,qe){var pt=_e.props.eventKey,Dt=function(){_e.onOpenChange({key:pt,item:Object(b.a)(_e),trigger:qe,open:Ke})};qe==="mouseenter"?_e.mouseenterTimeout=setTimeout(function(){Dt()},0):Dt()},_e.isChildrenSelected=function(){var Ke={find:!1};return Y(_e.props.children,_e.props.selectedKeys,Ke),Ke.find},_e.isInlineMode=function(){return _e.getMode()==="inline"},_e.adjustWidth=function(){if(!_e.subMenuTitle||!_e.menuInstance)return;var Ke=Qe.findDOMNode(_e.menuInstance);if(Ke.offsetWidth>=_e.subMenuTitle.offsetWidth)return;Ke.style.minWidth="".concat(_e.subMenuTitle.offsetWidth,"px")},_e.saveSubMenuTitle=function(Ke){_e.subMenuTitle=Ke},_e.getBaseProps=function(){var Ke=Object(b.a)(_e),qe=Ke.props,pt=_e.getMode();return{mode:pt==="horizontal"?"vertical":pt,visible:_e.getVisible(),level:qe.level+1,inlineIndent:qe.inlineIndent,focusable:!1,onClick:_e.onSubMenuClick,onSelect:_e.onSelect,onDeselect:_e.onDeselect,onDestroy:_e.onDestroy,selectedKeys:qe.selectedKeys,eventKey:"".concat(qe.eventKey,"-menu-"),openKeys:qe.openKeys,motion:qe.motion,onOpenChange:_e.onOpenChange,subMenuOpenDelay:qe.subMenuOpenDelay,parentMenu:Object(b.a)(_e),subMenuCloseDelay:qe.subMenuCloseDelay,forceSubMenuRender:qe.forceSubMenuRender,triggerSubMenuAction:qe.triggerSubMenuAction,builtinPlacements:qe.builtinPlacements,defaultActiveFirst:qe.store.getState().defaultActiveFirst[ie(qe.eventKey)],multiple:qe.multiple,prefixCls:qe.rootPrefixCls,id:_e.internalMenuId,manualRef:_e.saveMenuInstance,itemIcon:qe.itemIcon,expandIcon:qe.expandIcon,direction:qe.direction}},_e.getMotion=function(Ke,qe){var pt=Object(b.a)(_e),Dt=pt.haveRendered,jt=_e.props,Yt=jt.motion,Pr=jt.rootPrefixCls,Qr=Object(M.a)(Object(M.a)({},Yt),{},{leavedClassName:"".concat(Pr,"-hidden"),removeOnLeave:!1,motionAppear:Dt||!qe||Ke!=="inline"});return Qr};var De=Ue.store,Se=Ue.eventKey,je=De.getState(),Ge=je.defaultActiveFirst;_e.isRootMenu=!1;var $e=!1;return Ge&&($e=Ge[Se]),wt(De,Se,$e),_e.state={mode:Ue.mode,isOpen:Ue.isOpen},_e}return Object(O.a)(Je,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var _e=this,De=this.props,Se=De.mode,je=De.parentMenu,Ge=De.manualRef,$e=De.isOpen,Ke=function(){_e.setState({mode:Se,isOpen:$e})},qe=$e!==this.state.isOpen,pt=Se!==this.state.mode;if((pt||qe)&&(it.a.cancel(this.updateStateRaf),pt?this.updateStateRaf=Object(it.a)(Ke):Ke()),Ge&&Ge(this),Se!=="horizontal"||!(je==null?void 0:je.isRootMenu)||!$e)return;this.minWidthTimeout=setTimeout(function(){return _e.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var _e=this.props,De=_e.onDestroy,Se=_e.eventKey;De&&De(Se),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),it.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(_e,De){var Se=this.getBaseProps();return m.createElement(Rr,Object(p.a)({},Se,{id:this.internalMenuId,className:_e,style:De}),this.props.children)}},{key:"renderChildren",value:function(){var _e=this,De=this.getBaseProps(),Se=De.mode,je=De.visible,Ge=De.forceSubMenuRender,$e=De.direction,Ke=this.getMotion(Se,je);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||je||Ge,!this.haveOpened)return m.createElement("div",null);var qe=S()("".concat(De.prefixCls,"-sub"),Object(k.a)({},"".concat(De.prefixCls,"-rtl"),$e==="rtl"));return this.isInlineMode()?m.createElement(ye,Object(p.a)({visible:De.visible,forceRender:Ge},Ke),function(pt){var Dt=pt.className,jt=pt.style,Yt=S()(qe,Dt);return _e.renderPopupMenu(Yt,jt)}):this.renderPopupMenu(qe)}},{key:"render",value:function(){var _e,De,Se,je=Object(M.a)({},this.props),Ge=this.getVisible(),$e=this.getPrefixCls(),Ke=this.isInlineMode(),qe=this.getMode(),pt=S()($e,"".concat($e,"-").concat(qe),(_e={},Object(k.a)(_e,je.className,!!je.className),Object(k.a)(_e,this.getOpenClassName(),Ge),Object(k.a)(_e,this.getActiveClassName(),je.active||Ge&&!Ke),Object(k.a)(_e,this.getDisabledClassName(),je.disabled),Object(k.a)(_e,this.getSelectedClassName(),this.isChildrenSelected()),_e));this.internalMenuId||(je.eventKey?this.internalMenuId="".concat(je.eventKey,"$Menu"):(rt+=1,this.internalMenuId="$__$".concat(rt,"$Menu")));var Dt={},jt={},Yt={};je.disabled||(Dt={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},jt={onClick:this.onTitleClick},Yt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Pr={},Qr=je.direction,$r=Qr==="rtl";Ke&&($r?Pr.paddingRight=je.inlineIndent*je.level:Pr.paddingLeft=je.inlineIndent*je.level);var qr={};this.getVisible()&&(qr={"aria-owns":this.internalMenuId});var zr=null;qe!=="horizontal"&&(zr=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(zr=m.createElement(this.props.expandIcon,Object(M.a)({},this.props))));var rn=m.createElement("div",Object(p.a)({ref:this.saveSubMenuTitle,style:Pr,className:"".concat($e,"-title"),role:"button"},Yt,jt,{"aria-expanded":Ge},qr,{"aria-haspopup":"true",title:typeof je.title=="string"?je.title:void 0}),je.title,zr||m.createElement("i",{className:"".concat($e,"-arrow")})),nn=this.renderChildren(),vn=((De=je.parentMenu)===null||De===void 0?void 0:De.isRootMenu)?je.parentMenu.props.getPopupContainer:function(Rn){return Rn.parentNode},un=mt[qe],kn=je.popupOffset?{offset:je.popupOffset}:{},hn=S()((Se={},Object(k.a)(Se,je.popupClassName,je.popupClassName&&!Ke),Object(k.a)(Se,"".concat($e,"-rtl"),$r),Se)),Nr=je.disabled,Ur=je.triggerSubMenuAction,on=je.subMenuOpenDelay,gn=je.forceSubMenuRender,Tr=je.subMenuCloseDelay,xn=je.builtinPlacements;X.forEach(function(Rn){return delete je[Rn]}),delete je.onClick;var Vn=$r?Object(M.a)(Object(M.a)({},ha),xn):Object(M.a)(Object(M.a)({},ji),xn);delete je.direction;var Cn=this.getBaseProps(),jn=Ke?null:this.getMotion(Cn.mode,Cn.visible);return m.createElement("li",Object(p.a)({},je,Dt,{className:pt,role:"menuitem"}),m.createElement(Pi,{prefixCls:$e,popupClassName:S()("".concat($e,"-popup"),hn),getPopupContainer:vn,builtinPlacements:Vn,popupPlacement:un,popupVisible:Ke?!1:Ge,popupAlign:kn,popup:Ke?null:nn,action:Nr||Ke?[]:[Ur],mouseEnterDelay:on,mouseLeaveDelay:Tr,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:gn,popupMotion:jn},rn),Ke?nn:null)}}]),Je}(m.Component);Lt.defaultProps={onMouseEnter:re,onMouseLeave:re,onTitleMouseEnter:re,onTitleMouseLeave:re,onTitleClick:re,manualRef:re,mode:"vertical",title:""};var It=Object(T.b)(function(ke,Xe){var Je=ke.openKeys,Ue=ke.activeKey,_e=ke.selectedKeys,De=Xe.eventKey,Se=Xe.subMenuKey;return{isOpen:Je.indexOf(De)>-1,active:Ue[Se]===De,selectedKeys:_e}})(Lt);It.isSubMenu=!0;var Kt=It,Ht="menuitem-overflowed",ht=.5,St=function(ke){Object(E.a)(Je,ke);var Xe=Object(w.a)(Je);function Je(){var Ue;return Object(R.a)(this,Je),Ue=Xe.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=m.createRef(),Ue.getMenuItemNodes=function(){var _e=Ue.props.prefixCls,De=Ue.childRef.current;return De?[].slice.call(De.children).filter(function(Se){return Se.className.split(" ").indexOf("".concat(_e,"-overflowed-submenu"))<0}):[]},Ue.getOverflowedSubMenuItem=function(_e,De,Se){var je=Ue.props,Ge=je.overflowedIndicator,$e=je.level,Ke=je.mode,qe=je.prefixCls,pt=je.theme;if($e!==1||Ke!=="horizontal")return null;var Dt=Ue.props.children[0],jt=Dt.props,Yt=jt.children,Pr=jt.title,Qr=jt.style,$r=Object(C.a)(jt,["children","title","style"]),qr=Object(M.a)({},Qr),zr="".concat(_e,"-overflowed-indicator"),rn="".concat(_e,"-overflowed-indicator");De.length===0&&Se!==!0?qr=Object(M.a)(Object(M.a)({},qr),{},{display:"none"}):Se&&(qr=Object(M.a)(Object(M.a)({},qr),{},{visibility:"hidden",position:"absolute"}),zr="".concat(zr,"-placeholder"),rn="".concat(rn,"-placeholder"));var nn=pt?"".concat(qe,"-").concat(pt):"",vn={};return X.forEach(function(un){$r[un]!==void 0&&(vn[un]=$r[un])}),m.createElement(Kt,Object(p.a)({title:Ge,className:"".concat(qe,"-overflowed-submenu"),popupClassName:nn},vn,{key:zr,eventKey:rn,disabled:!1,style:qr}),De)},Ue.setChildrenWidthAndResize=function(){if(Ue.props.mode!=="horizontal")return;var _e=Ue.childRef.current;if(!_e)return;var De=_e.children;if(!De||De.length===0)return;var Se=_e.children[De.length-1];fe(Se,"display","inline-block");var je=Ue.getMenuItemNodes(),Ge=je.filter(function($e){return $e.className.split(" ").indexOf(Ht)>=0});Ge.forEach(function($e){fe($e,"display","inline-block")}),Ue.menuItemSizes=je.map(function($e){return he($e,!0)}),Ge.forEach(function($e){fe($e,"display","none")}),Ue.overflowedIndicatorWidth=he(_e.children[_e.children.length-1],!0),Ue.originalTotalWidth=Ue.menuItemSizes.reduce(function($e,Ke){return $e+Ke},0),Ue.handleResize(),fe(Se,"display","none")},Ue.handleResize=function(){if(Ue.props.mode!=="horizontal")return;var _e=Ue.childRef.current;if(!_e)return;var De=he(_e);Ue.overflowedItems=[];var Se=0,je;Ue.originalTotalWidth>De+ht&&(je=-1,Ue.menuItemSizes.forEach(function(Ge){Se+=Ge,Se+Ue.overflowedIndicatorWidth<=De&&(je+=1)})),Ue.setState({lastVisibleIndex:je})},Ue}return Object(O.a)(Je,[{key:"componentDidMount",value:function(){var _e=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var De=this.childRef.current;if(!De)return;this.resizeObserver=new He.default(function(Se){Se.forEach(function(){var je=_e.cancelFrameId;cancelAnimationFrame(je),_e.cancelFrameId=requestAnimationFrame(_e.setChildrenWidthAndResize)})}),[].slice.call(De.children).concat(De).forEach(function(Se){_e.resizeObserver.observe(Se)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){_e.resizeObserver.disconnect(),[].slice.call(De.children).concat(De).forEach(function(Se){_e.resizeObserver.observe(Se)}),_e.setChildrenWidthAndResize()}),this.mutationObserver.observe(De,{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 De=this,Se=this.state.lastVisibleIndex;return(_e||[]).reduce(function(je,Ge,$e){var Ke=Ge;if(De.props.mode==="horizontal"){var qe=De.getOverflowedSubMenuItem(Ge.props.eventKey,[]);Se!==void 0&&De.props.className.indexOf("".concat(De.props.prefixCls,"-root"))!==-1&&($e>Se&&(Ke=m.cloneElement(Ge,{style:{display:"none"},eventKey:"".concat(Ge.props.eventKey,"-hidden"),className:"".concat(Ht)})),$e===Se+1&&(De.overflowedItems=_e.slice(Se+1).map(function(Dt){return m.cloneElement(Dt,{key:Dt.props.eventKey,mode:"vertical-left"})}),qe=De.getOverflowedSubMenuItem(Ge.props.eventKey,De.overflowedItems)));var pt=[].concat(Object(h.a)(je),[qe,Ke]);return $e===_e.length-1&&pt.push(De.getOverflowedSubMenuItem(Ge.props.eventKey,[],!0)),pt}return[].concat(Object(h.a)(je),[Ke])},[])}},{key:"render",value:function(){var _e=this.props,De=_e.visible,Se=_e.prefixCls,je=_e.overflowedIndicator,Ge=_e.mode,$e=_e.level,Ke=_e.tag,qe=_e.children,pt=_e.theme,Dt=Object(C.a)(_e,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),jt=Ke;return m.createElement(jt,Object(p.a)({ref:this.childRef},Dt),this.renderChildren(qe))}}]),Je}(m.Component);St.defaultProps={tag:"div",className:""};var At=St;function ur(ke){return ke.length?ke.every(function(Xe){return!!Xe.props.disabled}):!0}function ar(ke,Xe,Je){var Ue=ke.getState();ke.setState({activeKey:Object(M.a)(Object(M.a)({},Ue.activeKey),{},Object(k.a)({},Xe,Je))})}function Zt(ke){return ke.eventKey||"0-menu-"}function $t(ke,Xe){var Je=Xe,Ue=ke.children,_e=ke.eventKey;if(Je){var De;if(q(Ue,function(Se,je){Se&&Se.props&&!Se.props.disabled&&Je===Te(Se,_e,je)&&(De=!0)}),De)return Je}return Je=null,ke.defaultActiveFirst&&q(Ue,function(Se,je){!Je&&Se&&!Se.props.disabled&&(Je=Te(Se,_e,je))}),Je}function rr(ke){if(!ke)return;var Xe=this.instanceArray.indexOf(ke);Xe!==-1?this.instanceArray[Xe]=ke:this.instanceArray.push(ke)}var cr=function(ke){Object(E.a)(Je,ke);var Xe=Object(w.a)(Je);function Je(Ue){var _e;return Object(R.a)(this,Je),_e=Xe.call(this,Ue),_e.onKeyDown=function(De,Se){var je=De.keyCode,Ge;if(_e.getFlatInstanceArray().forEach(function(Ke){Ke&&Ke.props.active&&Ke.onKeyDown&&(Ge=Ke.onKeyDown(De))}),Ge)return 1;var $e=null;return(je===d.a.UP||je===d.a.DOWN)&&($e=_e.step(je===d.a.UP?-1:1)),$e?(De.preventDefault(),ar(_e.props.store,Zt(_e.props),$e.props.eventKey),typeof Se=="function"&&Se($e),1):void 0},_e.onItemHover=function(De){var Se=De.key,je=De.hover;ar(_e.props.store,Zt(_e.props),je?Se:null)},_e.onDeselect=function(De){_e.props.onDeselect(De)},_e.onSelect=function(De){_e.props.onSelect(De)},_e.onClick=function(De){_e.props.onClick(De)},_e.onOpenChange=function(De){_e.props.onOpenChange(De)},_e.onDestroy=function(De){_e.props.onDestroy(De)},_e.getFlatInstanceArray=function(){return _e.instanceArray},_e.step=function(De){var Se=_e.getFlatInstanceArray(),je=_e.props.store.getState().activeKey[Zt(_e.props)],Ge=Se.length;if(!Ge)return null;De<0&&(Se=Se.concat().reverse());var $e=-1;if(Se.every(function(Dt,jt){return Dt&&Dt.props.eventKey===je?($e=jt,!1):!0}),!_e.props.defaultActiveFirst&&$e!==-1&&ur(Se.slice($e,Ge-1)))return;var Ke=($e+1)%Ge,qe=Ke;do{var pt=Se[qe];if(!pt||pt.props.disabled)qe=(qe+1)%Ge;else return pt}while(qe!==Ke);return null},_e.renderCommonMenuItem=function(De,Se,je){var Ge=_e.props.store.getState(),$e=Object(b.a)(_e),Ke=$e.props,qe=Te(De,Ke.eventKey,Se),pt=De.props;if(!pt||typeof De.type=="string")return De;var Dt=qe===Ge.activeKey,jt=Object(M.a)(Object(M.a)({mode:pt.mode||Ke.mode,level:Ke.level,inlineIndent:Ke.inlineIndent,renderMenuItem:_e.renderMenuItem,rootPrefixCls:Ke.prefixCls,index:Se,parentMenu:Ke.parentMenu,manualRef:pt.disabled?void 0:Object(N.a)(De.ref,rr.bind(Object(b.a)(_e))),eventKey:qe,active:!pt.disabled&&Dt,multiple:Ke.multiple,onClick:function(Pr){(pt.onClick||re)(Pr),_e.onClick(Pr)},onItemHover:_e.onItemHover,motion:Ke.motion,subMenuOpenDelay:Ke.subMenuOpenDelay,subMenuCloseDelay:Ke.subMenuCloseDelay,forceSubMenuRender:Ke.forceSubMenuRender,onOpenChange:_e.onOpenChange,onDeselect:_e.onDeselect,onSelect:_e.onSelect,builtinPlacements:Ke.builtinPlacements,itemIcon:pt.itemIcon||_e.props.itemIcon,expandIcon:pt.expandIcon||_e.props.expandIcon},je),{},{direction:Ke.direction});return(Ke.mode==="inline"||Ee())&&(jt.triggerSubMenuAction="click"),m.cloneElement(De,Object(M.a)(Object(M.a)({},jt),{},{key:qe||Se}))},_e.renderMenuItem=function(De,Se,je){if(!De)return null;var Ge=_e.props.store.getState(),$e={openKeys:Ge.openKeys,selectedKeys:Ge.selectedKeys,triggerSubMenuAction:_e.props.triggerSubMenuAction,subMenuKey:je};return _e.renderCommonMenuItem(De,Se,$e)},Ue.store.setState({activeKey:Object(M.a)(Object(M.a)({},Ue.store.getState().activeKey),{},Object(k.a)({},Ue.eventKey,$t(Ue,Ue.activeKey)))}),_e.instanceArray=[],_e}return Object(O.a)(Je,[{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||!G()(this.props.style,_e.style)}},{key:"componentDidUpdate",value:function(_e){var De=this.props,Se="activeKey"in De?De.activeKey:De.store.getState().activeKey[Zt(De)],je=$t(De,Se);if(je!==Se)ar(De.store,Zt(De),je);else if("activeKey"in _e){var Ge=$t(_e,_e.activeKey);je!==Ge&&ar(De.store,Zt(De),je)}}},{key:"render",value:function(){var _e=this,De=Object(p.a)({},this.props);this.instanceArray=[];var Se=S()(De.prefixCls,De.className,"".concat(De.prefixCls,"-").concat(De.mode)),je={className:Se,role:De.role||"menu"};De.id&&(je.id=De.id),De.focusable&&(je.tabIndex=0,je.onKeyDown=this.onKeyDown);var Ge=De.prefixCls,$e=De.eventKey,Ke=De.visible,qe=De.level,pt=De.mode,Dt=De.overflowedIndicator,jt=De.theme;return X.forEach(function(Yt){return delete De[Yt]}),delete De.onClick,m.createElement(At,Object(p.a)({},De,{prefixCls:Ge,mode:pt,tag:"ul",level:qe,theme:jt,visible:Ke,overflowedIndicator:Dt},je),Object(_.a)(De.children).map(function(Yt,Pr){return _e.renderMenuItem(Yt,Pr,$e||"0-menu-")}))}}]),Je}(m.Component);cr.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:re};var lt=Object(T.b)()(cr),Rr=lt,jr=D("Kwbf");function xr(ke,Xe,Je){var Ue=ke.prefixCls,_e=ke.motion,De=ke.defaultMotions,Se=De===void 0?{}:De,je=ke.openAnimation,Ge=ke.openTransitionName,$e=Xe.switchingModeFromInline;if(_e)return _e;if(Object(z.a)(je)==="object"&&je)Object(jr.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof je=="string")return{motionName:"".concat(Ue,"-open-").concat(je)};if(Ge)return{motionName:Ge};var Ke=Se[Je];return Ke||($e?null:Se.other)}var _t=function(ke){Object(E.a)(Je,ke);var Xe=Object(w.a)(Je);function Je(Ue){var _e;Object(R.a)(this,Je),_e=Xe.call(this,Ue),_e.onSelect=function(je){var Ge=Object(b.a)(_e),$e=Ge.props;if($e.selectable){var Ke=_e.store.getState(),qe=Ke.selectedKeys,pt=je.key;$e.multiple?qe=qe.concat([pt]):qe=[pt],"selectedKeys"in $e||_e.store.setState({selectedKeys:qe}),$e.onSelect(Object(M.a)(Object(M.a)({},je),{},{selectedKeys:qe}))}},_e.onClick=function(je){var Ge=_e.getRealMenuMode(),$e=Object(b.a)(_e),Ke=$e.store,qe=$e.props.onOpenChange;Ge!=="inline"&&!("openKeys"in _e.props)&&(Ke.setState({openKeys:[]}),qe([])),_e.props.onClick(je)},_e.onKeyDown=function(je,Ge){_e.innerMenu.getWrappedInstance().onKeyDown(je,Ge)},_e.onOpenChange=function(je){var Ge=Object(b.a)(_e),$e=Ge.props,Ke=_e.store.getState().openKeys.concat(),qe=!1,pt=function(jt){var Yt=!1;if(jt.open)Yt=Ke.indexOf(jt.key)===-1,Yt&&Ke.push(jt.key);else{var Pr=Ke.indexOf(jt.key);Yt=Pr!==-1,Yt&&Ke.splice(Pr,1)}qe=qe||Yt};Array.isArray(je)?je.forEach(pt):pt(je),qe&&("openKeys"in _e.props||_e.store.setState({openKeys:Ke}),$e.onOpenChange(Ke))},_e.onDeselect=function(je){var Ge=Object(b.a)(_e),$e=Ge.props;if($e.selectable){var Ke=_e.store.getState().selectedKeys.concat(),qe=je.key,pt=Ke.indexOf(qe);pt!==-1&&Ke.splice(pt,1),"selectedKeys"in $e||_e.store.setState({selectedKeys:Ke}),$e.onDeselect(Object(M.a)(Object(M.a)({},je),{},{selectedKeys:Ke}))}},_e.onMouseEnter=function(je){_e.restoreModeVerticalFromInline();var Ge=_e.props.onMouseEnter;Ge&&Ge(je)},_e.onTransitionEnd=function(je){var Ge=je.propertyName==="width"&&je.target===je.currentTarget,$e=je.target.className,Ke=Object.prototype.toString.call($e)==="[object SVGAnimatedString]"?$e.animVal:$e,qe=je.propertyName==="font-size"&&Ke.indexOf("anticon")>=0;(Ge||qe)&&_e.restoreModeVerticalFromInline()},_e.setInnerMenu=function(je){_e.innerMenu=je},_e.isRootMenu=!0;var De=Ue.defaultSelectedKeys,Se=Ue.defaultOpenKeys;return"selectedKeys"in Ue&&(De=Ue.selectedKeys||[]),"openKeys"in Ue&&(Se=Ue.openKeys||[]),_e.store=Object(T.c)({selectedKeys:De,openKeys:Se,activeKey:{"0-menu-":$t(Ue,Ue.activeKey)}}),_e.state={switchingModeFromInline:!1,prevProps:Ue,inlineOpenKeys:[],store:_e.store},_e}return Object(O.a)(Je,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(_e){var De=this.props,Se=De.siderCollapsed,je=De.inlineCollapsed,Ge=De.onOpenChange;(!_e.inlineCollapsed&&je||!_e.siderCollapsed&&Se)&&Ge([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var _e=this.props.collapsedWidth,De=this.store,Se=this.prevOpenKeys,je=this.getInlineCollapsed()&&(_e===0||_e==="0"||_e==="0px");je?(this.prevOpenKeys=De.getState().openKeys.concat(),this.store.setState({openKeys:[]})):Se&&(this.store.setState({openKeys:Se}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var _e=this.props.mode,De=this.state.switchingModeFromInline,Se=this.getInlineCollapsed();return De&&Se?"inline":Se?"vertical":_e}},{key:"getInlineCollapsed",value:function(){var _e=this.props,De=_e.inlineCollapsed,Se=_e.siderCollapsed;return Se!==void 0?Se:De}},{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(M.a)({},Object(F.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),De=this.getRealMenuMode();return _e.className+=" ".concat(_e.prefixCls,"-root"),_e.direction==="rtl"&&(_e.className+=" ".concat(_e.prefixCls,"-rtl")),_e=Object(M.a)(Object(M.a)({},_e),{},{mode:De,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:xr(this.props,this.state,De)}),delete _e.openAnimation,delete _e.openTransitionName,m.createElement(T.a,{store:this.store},m.createElement(Rr,Object(p.a)({},_e,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(_e,De){var Se=De.prevProps,je=De.store,Ge=je.getState(),$e={},Ke={prevProps:_e};return Se.mode==="inline"&&_e.mode!=="inline"&&(Ke.switchingModeFromInline=!0),"openKeys"in _e?$e.openKeys=_e.openKeys||[]:((_e.inlineCollapsed&&!Se.inlineCollapsed||_e.siderCollapsed&&!Se.siderCollapsed)&&(Ke.switchingModeFromInline=!0,Ke.inlineOpenKeys=Ge.openKeys,$e.openKeys=[]),(!_e.inlineCollapsed&&Se.inlineCollapsed||!_e.siderCollapsed&&Se.siderCollapsed)&&($e.openKeys=De.inlineOpenKeys,Ke.inlineOpenKeys=[])),Object.keys($e).length&&je.setState($e),Ke}}]),Je}(m.Component);_t.defaultProps={selectable:!0,onClick:re,onSelect:re,onOpenChange:re,onDeselect:re,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:m.createElement("span",null,"\xB7\xB7\xB7")};var Rt=_t,Et=function(ke){Object(E.a)(Je,ke);var Xe=Object(w.a)(Je);function Je(){var Ue;return Object(R.a)(this,Je),Ue=Xe.apply(this,arguments),Ue.onKeyDown=function(_e){var De=_e.keyCode;return De===d.a.ENTER?(Ue.onClick(_e),!0):void 0},Ue.onMouseLeave=function(_e){var De=Ue.props,Se=De.eventKey,je=De.onItemHover,Ge=De.onMouseLeave;je({key:Se,hover:!1}),Ge({key:Se,domEvent:_e})},Ue.onMouseEnter=function(_e){var De=Ue.props,Se=De.eventKey,je=De.onItemHover,Ge=De.onMouseEnter;je({key:Se,hover:!0}),Ge({key:Se,domEvent:_e})},Ue.onClick=function(_e){var De=Ue.props,Se=De.eventKey,je=De.multiple,Ge=De.onClick,$e=De.onSelect,Ke=De.onDeselect,qe=De.isSelected,pt={key:Se,keyPath:[Se],item:Object(b.a)(Ue),domEvent:_e};Ge(pt),je?qe?Ke(pt):$e(pt):qe||$e(pt)},Ue.saveNode=function(_e){Ue.node=_e},Ue}return Object(O.a)(Je,[{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,De=Object(M.a)({},this.props),Se=S()(this.getPrefixCls(),De.className,(_e={},Object(k.a)(_e,this.getActiveClassName(),!De.disabled&&De.active),Object(k.a)(_e,this.getSelectedClassName(),De.isSelected),Object(k.a)(_e,this.getDisabledClassName(),De.disabled),_e)),je=Object(M.a)(Object(M.a)({},De.attribute),{},{title:typeof De.title=="string"?De.title:void 0,className:Se,role:De.role||"menuitem","aria-disabled":De.disabled});De.role==="option"?je=Object(M.a)(Object(M.a)({},je),{},{role:"option","aria-selected":De.isSelected}):(De.role===null||De.role==="none")&&(je.role="none");var Ge={onClick:De.disabled?null:this.onClick,onMouseLeave:De.disabled?null:this.onMouseLeave,onMouseEnter:De.disabled?null:this.onMouseEnter},$e=Object(M.a)({},De.style);De.mode==="inline"&&(De.direction==="rtl"?$e.paddingRight=De.inlineIndent*De.level:$e.paddingLeft=De.inlineIndent*De.level),X.forEach(function(qe){return delete De[qe]}),delete De.direction;var Ke=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(Ke=m.createElement(this.props.itemIcon,this.props)),m.createElement("li",Object(p.a)({},Object(F.a)(De,["onClick","onMouseEnter","onMouseLeave","onSelect"]),je,Ge,{style:$e,ref:this.saveNode}),De.children,Ke)}}]),Je}(m.Component);Et.isMenuItem=!0,Et.defaultProps={onSelect:re,onMouseEnter:re,onMouseLeave:re,manualRef:re};var Mt=Object(T.b)(function(ke,Xe){var Je=ke.activeKey,Ue=ke.selectedKeys,_e=Xe.eventKey,De=Xe.subMenuKey;return{active:Je[De]===_e,isSelected:Array.isArray(Ue)?Ue.indexOf(_e)!==-1:Ue===_e}})(Et),qt=Mt,pr=function(ke){Object(E.a)(Je,ke);var Xe=Object(w.a)(Je);function Je(){var Ue;return Object(R.a)(this,Je),Ue=Xe.apply(this,arguments),Ue.renderInnerMenuItem=function(_e){var De=Ue.props,Se=De.renderMenuItem,je=De.index;return Se(_e,je,Ue.props.subMenuKey)},Ue}return Object(O.a)(Je,[{key:"render",value:function(){var _e=Object(p.a)({},this.props),De=_e.className,Se=De===void 0?"":De,je=_e.rootPrefixCls,Ge="".concat(je,"-item-group-title"),$e="".concat(je,"-item-group-list"),Ke=_e.title,qe=_e.children;return X.forEach(function(pt){return delete _e[pt]}),delete _e.direction,m.createElement("li",Object(p.a)({},_e,{onClick:function(Dt){return Dt.stopPropagation()},className:"".concat(Se," ").concat(je,"-item-group")}),m.createElement("div",{className:Ge,title:typeof Ke=="string"?Ke:void 0},Ke),m.createElement("ul",{className:$e},m.Children.map(qe,this.renderInnerMenuItem)))}}]),Je}(m.Component);pr.isMenuItemGroup=!0,pr.defaultProps={disabled:!0};var er=pr,Ir=function(Xe){var Je=Xe.className,Ue=Xe.rootPrefixCls,_e=Xe.style;return m.createElement("li",{className:"".concat(Je," ").concat(Ue,"-item-divider"),style:_e})};Ir.defaultProps={disabled:!0,className:"",style:{}};var Hr=Ir,yr=Rt,ot=D("eDIo");function zt(ke,Xe){var Je=ke.prefixCls,Ue=ke.editable,_e=ke.locale,De=ke.style;return!Ue||Ue.showAdd===!1?null:m.createElement("button",{ref:Xe,type:"button",className:"".concat(Je,"-nav-add"),style:De,"aria-label":(_e==null?void 0:_e.addAriaLabel)||"Add tab",onClick:function(je){Ue.onEdit("add",{event:je})}},Ue.addIcon||"+")}var sn=m.forwardRef(zt);function en(ke,Xe){var Je=ke.prefixCls,Ue=ke.id,_e=ke.tabs,De=ke.locale,Se=ke.mobile,je=ke.moreIcon,Ge=je===void 0?"More":je,$e=ke.moreTransitionName,Ke=ke.style,qe=ke.className,pt=ke.editable,Dt=ke.tabBarGutter,jt=ke.rtl,Yt=ke.onTabClick,Pr=Object(m.useState)(!1),Qr=Object(g.a)(Pr,2),$r=Qr[0],qr=Qr[1],zr=Object(m.useState)(null),rn=Object(g.a)(zr,2),nn=rn[0],vn=rn[1],un="".concat(Ue,"-more-popup"),kn="".concat(Je,"-dropdown"),hn=nn!==null?"".concat(un,"-").concat(nn):null,Nr=De==null?void 0:De.dropdownAriaLabel,Ur=m.createElement(yr,{onClick:function(jn){var Rn=jn.key,ei=jn.domEvent;Yt(Rn,ei),qr(!1)},id:un,tabIndex:-1,role:"listbox","aria-activedescendant":hn,selectedKeys:[nn],"aria-label":Nr!==void 0?Nr:"expanded dropdown"},_e.map(function(Cn){return m.createElement(qt,{key:Cn.key,id:"".concat(un,"-").concat(Cn.key),role:"option","aria-controls":Ue&&"".concat(Ue,"-panel-").concat(Cn.key),disabled:Cn.disabled},Cn.tab)}));function on(Cn){for(var jn=_e.filter(function(gi){return!gi.disabled}),Rn=jn.findIndex(function(gi){return gi.key===nn})||0,ei=jn.length,ui=0;ui<ei;ui+=1){Rn=(Rn+Cn+ei)%ei;var Xn=jn[Rn];if(!Xn.disabled){vn(Xn.key);return}}}function gn(Cn){var jn=Cn.which;if(!$r){[d.a.DOWN,d.a.SPACE,d.a.ENTER].includes(jn)&&(qr(!0),Cn.preventDefault());return}switch(jn){case d.a.UP:on(-1),Cn.preventDefault();break;case d.a.DOWN:on(1),Cn.preventDefault();break;case d.a.ESC:qr(!1);break;case d.a.SPACE:case d.a.ENTER:nn!==null&&Yt(nn,Cn);break}}Object(m.useEffect)(function(){var Cn=document.getElementById(hn);Cn&&Cn.scrollIntoView&&Cn.scrollIntoView(!1)},[nn]),Object(m.useEffect)(function(){$r||vn(null)},[$r]);var Tr=Object(k.a)({},jt?"marginLeft":"marginRight",Dt);_e.length||(Tr.visibility="hidden",Tr.order=1);var xn=S()(Object(k.a)({},"".concat(kn,"-rtl"),jt)),Vn=Se?null:m.createElement(ot.a,{prefixCls:kn,overlay:Ur,trigger:["hover"],visible:$r,transitionName:$e,onVisibleChange:qr,overlayClassName:xn,mouseEnterDelay:.1,mouseLeaveDelay:.1},m.createElement("button",{type:"button",className:"".concat(Je,"-nav-more"),style:Tr,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":un,id:"".concat(Ue,"-more"),"aria-expanded":$r,onKeyDown:gn},Ge));return m.createElement("div",{className:S()("".concat(Je,"-nav-operations"),qe),style:Ke,ref:Xe},Vn,m.createElement(sn,{prefixCls:Je,locale:De,editable:pt}))}var mr=m.forwardRef(en),Dr=Object(m.createContext)(null),Mr=.1,Ft=.01,Qt=20,gr=Math.pow(.995,Qt);function tr(){var ke=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(ke)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(ke.substr(0,4)))}function gt(ke,Xe){var Je=Object(m.useState)(),Ue=Object(g.a)(Je,2),_e=Ue[0],De=Ue[1],Se=Object(m.useState)(0),je=Object(g.a)(Se,2),Ge=je[0],$e=je[1],Ke=Object(m.useState)(0),qe=Object(g.a)(Ke,2),pt=qe[0],Dt=qe[1],jt=Object(m.useState)(),Yt=Object(g.a)(jt,2),Pr=Yt[0],Qr=Yt[1],$r=Object(m.useRef)();function qr(Nr){var Ur=Nr.touches[0],on=Ur.screenX,gn=Ur.screenY;De({x:on,y:gn}),window.clearInterval($r.current)}function zr(Nr){if(!_e)return;Nr.preventDefault();var Ur=Nr.touches[0],on=Ur.screenX,gn=Ur.screenY;De({x:on,y:gn});var Tr=on-_e.x,xn=gn-_e.y;Xe(Tr,xn);var Vn=Date.now();$e(Vn),Dt(Vn-Ge),Qr({x:Tr,y:xn})}function rn(){if(!_e)return;if(De(null),Qr(null),Pr){var Nr=Pr.x/pt,Ur=Pr.y/pt,on=Math.abs(Nr),gn=Math.abs(Ur);if(Math.max(on,gn)<Mr)return;var Tr=Nr,xn=Ur;$r.current=window.setInterval(function(){if(Math.abs(Tr)<Ft&&Math.abs(xn)<Ft){window.clearInterval($r.current);return}Tr*=gr,xn*=gr,Xe(Tr*Qt,xn*Qt)},Qt)}}var nn=Object(m.useRef)(0),vn=Object(m.useRef)(!1),un=Object(m.useRef)();function kn(Nr){var Ur=Nr.deltaX,on=Nr.deltaY,gn=0,Tr=Math.abs(Ur),xn=Math.abs(on);Tr===xn?gn=un.current==="x"?Ur:on:Tr>xn?(gn=Ur,un.current="x"):(gn=on,un.current="y");var Vn=Date.now();Vn-nn.current>100&&(vn.current=!1),(Xe(-gn,-gn)||vn.current)&&(Nr.preventDefault(),vn.current=!0),nn.current=Vn}var hn=Object(m.useRef)(null);hn.current={onTouchStart:qr,onTouchMove:zr,onTouchEnd:rn,onWheel:kn},m.useEffect(function(){function Nr(Tr){hn.current.onTouchStart(Tr)}function Ur(Tr){hn.current.onTouchMove(Tr)}function on(Tr){hn.current.onTouchEnd(Tr)}function gn(Tr){hn.current.onWheel(Tr)}return document.addEventListener("touchmove",Ur,{passive:!1}),document.addEventListener("touchend",on,{passive:!1}),ke.current.addEventListener("touchstart",Nr,{passive:!1}),ke.current.addEventListener("wheel",gn),function(){document.removeEventListener("touchmove",Ur),document.removeEventListener("touchend",on)}},[])}function yt(){var ke=Object(m.useRef)(new Map);function Xe(Ue){return ke.current.has(Ue)||ke.current.set(Ue,m.createRef()),ke.current.get(Ue)}function Je(Ue){ke.current.delete(Ue)}return[Xe,Je]}function Gt(ke,Xe){var Je=m.useRef(ke),Ue=m.useState({}),_e=Object(g.a)(Ue,2),De=_e[1];function Se(je){var Ge=typeof je=="function"?je(Je.current):je;Ge!==Je.current&&Xe(Ge,Je.current),Je.current=Ge,De({})}return[Je.current,Se]}var kt=function(Xe){var Je=Xe.position,Ue=Xe.prefixCls,_e=Xe.extra;if(!_e)return null;var De,Se=_e;return Je==="right"&&(De=Se.right||!Se.left&&Se||null),Je==="left"&&(De=Se.left||null),De?m.createElement("div",{className:"".concat(Ue,"-extra-content")},De):null};function Lr(ke,Xe){var Je,Ue=m.useContext(Dr),_e=Ue.prefixCls,De=Ue.tabs,Se=ke.className,je=ke.style,Ge=ke.id,$e=ke.animated,Ke=ke.activeKey,qe=ke.rtl,pt=ke.extra,Dt=ke.editable,jt=ke.locale,Yt=ke.tabPosition,Pr=ke.tabBarGutter,Qr=ke.children,$r=ke.onTabClick,qr=ke.onTabScroll,zr=Object(m.useRef)(),rn=Object(m.useRef)(),nn=Object(m.useRef)(),vn=Object(m.useRef)(),un=yt(),kn=Object(g.a)(un,2),hn=kn[0],Nr=kn[1],Ur=Yt==="top"||Yt==="bottom",on=Gt(0,function(Nn,Sn){Ur&&qr&&qr({direction:Nn>Sn?"left":"right"})}),gn=Object(g.a)(on,2),Tr=gn[0],xn=gn[1],Vn=Gt(0,function(Nn,Sn){!Ur&&qr&&qr({direction:Nn>Sn?"top":"bottom"})}),Cn=Object(g.a)(Vn,2),jn=Cn[0],Rn=Cn[1],ei=Object(m.useState)(0),ui=Object(g.a)(ei,2),Xn=ui[0],gi=ui[1],Xi=Object(m.useState)(0),Si=Object(g.a)(Xi,2),ci=Si[0],Fn=Si[1],Un=Object(m.useState)(0),Yn=Object(g.a)(Un,2),zn=Yn[0],ai=Yn[1],Ai=Object(m.useState)(0),ra=Object(g.a)(Ai,2),Dn=ra[0],Fi=ra[1],Ui=Object(m.useState)(null),Mn=Object(g.a)(Ui,2),In=Mn[0],oi=Mn[1],Ba=Object(m.useState)(null),wa=Object(g.a)(Ba,2),sa=wa[0],la=wa[1],La=Object(m.useState)(0),Ta=Object(g.a)(La,2),Pa=Ta[0],Ha=Ta[1],Xa=Object(m.useState)(0),ka=Object(g.a)(Xa,2),ua=ka[0],Sa=ka[1],ba=s(new Map),ca=Object(g.a)(ba,2),co=ca[0],_a=ca[1],Ca=r(De,co,Xn),da="".concat(_e,"-nav-operations-hidden"),fa=0,Yi=0;Ur?qe?(fa=0,Yi=Math.max(0,Xn-In)):(fa=Math.min(0,In-Xn),Yi=0):(fa=Math.min(0,sa-ci),Yi=0);function na(Nn){return Nn<fa?[fa,!1]:Nn>Yi?[Yi,!1]:[Nn,!0]}var wr=Object(m.useRef)(),Sr=Object(m.useState)(),or=Object(g.a)(Sr,2),wn=or[0],hr=or[1];function pa(){hr(Date.now())}function Ya(){window.clearTimeout(wr.current)}gt(zr,function(Nn,Sn){var bi=!1;function Hi(Ma,ma){Ma(function(Ka){var Ea=na(Ka+ma),_i=Object(g.a)(Ea,2),Qa=_i[0],fo=_i[1];return bi=fo,Qa})}if(Ur){if(In>=Xn)return bi;Hi(xn,Nn)}else{if(sa>=ci)return bi;Hi(Rn,Sn)}return Ya(),pa(),bi}),Object(m.useEffect)(function(){return Ya(),wn&&(wr.current=window.setTimeout(function(){hr(0)},100)),Ya},[wn]);function Hn(){var Nn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ke,Sn=Ca.get(Nn);if(!Sn)return;if(Ur){var bi=Tr;qe?Sn.right<Tr?bi=Sn.right:Sn.right+Sn.width>Tr+In&&(bi=Sn.right+Sn.width-In):Sn.left<-Tr?bi=-Sn.left:Sn.left+Sn.width>-Tr+In&&(bi=-(Sn.left+Sn.width-In)),Rn(0),xn(na(bi)[0])}else{var Hi=jn;Sn.top<-jn?Hi=-Sn.top:Sn.top+Sn.height>-jn+sa&&(Hi=-(Sn.top+Sn.height-sa)),xn(0),Rn(na(Hi)[0])}}var Oa=v(Ca,{width:In,height:sa,left:Tr,top:jn},{width:zn,height:Dn},{width:Pa,height:ua},Object(M.a)(Object(M.a)({},ke),{},{tabs:De})),Io=Object(g.a)(Oa,2),Jo=Io[0],Qo=Io[1],Zo=De.map(function(Nn){var Sn=Nn.key;return m.createElement(l,{id:Ge,prefixCls:_e,key:Sn,rtl:qe,tab:Nn,closable:Nn.closable,editable:Dt,active:Sn===Ke,tabPosition:Yt,tabBarGutter:Pr,renderWrapper:Qr,removeAriaLabel:jt==null?void 0:jt.removeAriaLabel,ref:hn(Sn),onClick:function(Hi){$r(Sn,Hi)},onRemove:function(){Nr(Sn)},onFocus:function(){Hn(Sn),pa(),qe||(zr.current.scrollLeft=0),zr.current.scrollTop=0}})}),ho=i(function(){var Nn,Sn,bi,Hi,Ma,ma,Ka,Ea,_i,Qa=((Nn=zr.current)===null||Nn===void 0?void 0:Nn.offsetWidth)||0,fo=((Sn=zr.current)===null||Sn===void 0?void 0:Sn.offsetHeight)||0,po=((bi=vn.current)===null||bi===void 0?void 0:bi.offsetWidth)||0,Wi=((Hi=vn.current)===null||Hi===void 0?void 0:Hi.offsetHeight)||0,Ln=((Ma=nn.current)===null||Ma===void 0?void 0:Ma.offsetWidth)||0,aa=((ma=nn.current)===null||ma===void 0?void 0:ma.offsetHeight)||0;oi(Qa),la(fo),Ha(po),Sa(Wi);var ga=(((Ka=rn.current)===null||Ka===void 0?void 0:Ka.offsetWidth)||0)-po,va=(((Ea=rn.current)===null||Ea===void 0?void 0:Ea.offsetHeight)||0)-Wi;gi(ga),Fn(va);var mo=(_i=nn.current)===null||_i===void 0?void 0:_i.className.includes(da);ai(ga-(mo?0:Ln)),Fi(va-(mo?0:aa)),_a(function(){var Za=new Map;return De.forEach(function(Mo){var No=Mo.key,Ra=hn(No).current;Ra&&Za.set(No,{width:Ra.offsetWidth,height:Ra.offsetHeight,left:Ra.offsetLeft,top:Ra.offsetTop})}),Za})}),qo=De.slice(0,Jo),Bi=De.slice(Qo+1),hi=[].concat(Object(h.a)(qo),Object(h.a)(Bi)),Ri=Object(m.useState)(),fi=Object(g.a)(Ri,2),Wa=fi[0],es=fi[1],ia=Ca.get(Ke),Do=Object(m.useRef)();function Lo(){c.a.cancel(Do.current)}Object(m.useEffect)(function(){var Nn={};return ia&&(Ur?(qe?Nn.right=ia.right:Nn.left=ia.left,Nn.width=ia.width):(Nn.top=ia.top,Nn.height=ia.height)),Lo(),Do.current=c()(function(){es(Nn)}),Lo},[ia,Ur,qe]),Object(m.useEffect)(function(){Hn()},[Ke,ia,Ca,Ur]),Object(m.useEffect)(function(){ho()},[qe,Pr,Ke,De.map(function(Nn){return Nn.key}).join("_")]);var Po=!!hi.length,Aa="".concat(_e,"-nav-wrap"),$a,za,ko,Ja;return Ur?qe?(za=Tr>0,$a=Tr+In<Xn):($a=Tr<0,za=-Tr+In<Xn):(ko=jn<0,Ja=-jn+sa<ci),m.createElement("div",{ref:Xe,role:"tablist",className:S()("".concat(_e,"-nav"),Se),style:je,onKeyDown:function(){pa()}},m.createElement(kt,{position:"left",extra:pt,prefixCls:_e}),m.createElement(a.a,{onResize:ho},m.createElement("div",{className:S()(Aa,(Je={},Object(k.a)(Je,"".concat(Aa,"-ping-left"),$a),Object(k.a)(Je,"".concat(Aa,"-ping-right"),za),Object(k.a)(Je,"".concat(Aa,"-ping-top"),ko),Object(k.a)(Je,"".concat(Aa,"-ping-bottom"),Ja),Je)),ref:zr},m.createElement(a.a,{onResize:ho},m.createElement("div",{ref:rn,className:"".concat(_e,"-nav-list"),style:{transform:"translate(".concat(Tr,"px, ").concat(jn,"px)"),transition:wn?"none":void 0}},Zo,m.createElement(sn,{ref:vn,prefixCls:_e,locale:jt,editable:Dt,style:{visibility:Po?"hidden":null}}),m.createElement("div",{className:S()("".concat(_e,"-ink-bar"),Object(k.a)({},"".concat(_e,"-ink-bar-animated"),$e.inkBar)),style:Wa}))))),m.createElement(mr,Object.assign({},ke,{ref:nn,prefixCls:_e,tabs:hi,className:!Po&&da})),m.createElement(kt,{position:"right",extra:pt,prefixCls:_e}))}var an=m.forwardRef(Lr);function ln(ke){var Xe=ke.id,Je=ke.activeKey,Ue=ke.animated,_e=ke.tabPosition,De=ke.rtl,Se=ke.destroyInactiveTabPane,je=m.useContext(Dr),Ge=je.prefixCls,$e=je.tabs,Ke=Ue.tabPane,qe=$e.findIndex(function(pt){return pt.key===Je});return m.createElement("div",{className:S()("".concat(Ge,"-content-holder"))},m.createElement("div",{className:S()("".concat(Ge,"-content"),"".concat(Ge,"-content-").concat(_e),Object(k.a)({},"".concat(Ge,"-content-animated"),Ke)),style:qe&&Ke?Object(k.a)({},De?"marginRight":"marginLeft","-".concat(qe,"00%")):null},$e.map(function(pt){return m.cloneElement(pt.node,{key:pt.key,prefixCls:Ge,tabKey:pt.key,id:Xe,animated:Ke,active:pt.key===Je,destroyInactiveTabPane:Se})})))}function Or(ke){var Xe=ke.prefixCls,Je=ke.forceRender,Ue=ke.className,_e=ke.style,De=ke.id,Se=ke.active,je=ke.animated,Ge=ke.destroyInactiveTabPane,$e=ke.tabKey,Ke=ke.children,qe=m.useState(Je),pt=Object(g.a)(qe,2),Dt=pt[0],jt=pt[1];m.useEffect(function(){Se?jt(!0):Ge&&jt(!1)},[Se,Ge]);var Yt={};return Se||(je?(Yt.visibility="hidden",Yt.height=0,Yt.overflowY="hidden"):Yt.display="none"),m.createElement("div",{id:De&&"".concat(De,"-panel-").concat($e),role:"tabpanel",tabIndex:Se?0:-1,"aria-labelledby":De&&"".concat(De,"-tab-").concat($e),"aria-hidden":!Se,style:Object(M.a)(Object(M.a)({},Yt),_e),className:S()("".concat(Xe,"-tabpane"),Se&&"".concat(Xe,"-tabpane-active"),Ue)},(Se||Dt||Je)&&Ke)}var tn=0;function Fr(ke){return Object(_.a)(ke).map(function(Xe){if(m.isValidElement(Xe)){var Je=Xe.key!==void 0?String(Xe.key):void 0;return Object(M.a)(Object(M.a)({key:Je},Xe.props),{},{node:Xe})}return null}).filter(function(Xe){return Xe})}function pn(ke,Xe){var Je,Ue=ke.id,_e=ke.prefixCls,De=_e===void 0?"rc-tabs":_e,Se=ke.className,je=ke.children,Ge=ke.direction,$e=ke.activeKey,Ke=ke.defaultActiveKey,qe=ke.editable,pt=ke.animated,Dt=ke.tabPosition,jt=Dt===void 0?"top":Dt,Yt=ke.tabBarGutter,Pr=ke.tabBarStyle,Qr=ke.tabBarExtraContent,$r=ke.locale,qr=ke.moreIcon,zr=ke.moreTransitionName,rn=ke.destroyInactiveTabPane,nn=ke.renderTabBar,vn=ke.onChange,un=ke.onTabClick,kn=ke.onTabScroll,hn=Object(C.a)(ke,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),Nr=Fr(je),Ur=Ge==="rtl",on;pt===!1?on={inkBar:!1,tabPane:!1}:on=Object(M.a)({inkBar:!0,tabPane:!1},pt!==!0?pt:null);var gn=Object(m.useState)(!1),Tr=Object(g.a)(gn,2),xn=Tr[0],Vn=Tr[1];Object(m.useEffect)(function(){Vn(tr())},[]);var Cn=Object(t.a)(function(){var Dn;return(Dn=Nr[0])===null||Dn===void 0?void 0:Dn.key},{value:$e,defaultValue:Ke}),jn=Object(g.a)(Cn,2),Rn=jn[0],ei=jn[1],ui=Object(m.useState)(function(){return Nr.findIndex(function(Dn){return Dn.key===Rn})}),Xn=Object(g.a)(ui,2),gi=Xn[0],Xi=Xn[1];Object(m.useEffect)(function(){var Dn=Nr.findIndex(function(Ui){return Ui.key===Rn});if(Dn===-1){var Fi;Dn=Math.max(0,Math.min(gi,Nr.length-1)),ei((Fi=Nr[Dn])===null||Fi===void 0?void 0:Fi.key)}Xi(Dn)},[Nr.map(function(Dn){return Dn.key}).join("_"),Rn,gi]);var Si=Object(t.a)(null,{value:Ue}),ci=Object(g.a)(Si,2),Fn=ci[0],Un=ci[1],Yn=jt;xn&&!["left","right"].includes(jt)&&(Yn="top"),Object(m.useEffect)(function(){Ue||(Un("rc-tabs-".concat(tn)),tn+=1)},[]);function zn(Dn,Fi){un==null||un(Dn,Fi),ei(Dn),vn==null||vn(Dn)}var ai={id:Fn,activeKey:Rn,animated:on,tabPosition:Yn,rtl:Ur,mobile:xn},Ai,ra=Object(M.a)(Object(M.a)({},ai),{},{editable:qe,locale:$r,moreIcon:qr,moreTransitionName:zr,tabBarGutter:Yt,onTabClick:zn,onTabScroll:kn,extra:Qr,style:Pr,panes:je});return nn?Ai=nn(ra,an):Ai=m.createElement(an,Object.assign({},ra)),m.createElement(Dr.Provider,{value:{tabs:Nr,prefixCls:De}},m.createElement("div",Object.assign({ref:Xe,id:Ue,className:S()(De,"".concat(De,"-").concat(Yn),(Je={},Object(k.a)(Je,"".concat(De,"-mobile"),xn),Object(k.a)(Je,"".concat(De,"-editable"),qe),Object(k.a)(Je,"".concat(De,"-rtl"),Ur),Je),Se)},hn),Ai,m.createElement(ln,Object.assign({destroyInactiveTabPane:rn},ai,{animated:on}))))}var Xr=m.forwardRef(pn);Xr.TabPane=Or;var mn=Xr,Qn=J.b=mn},kSUc:function(H,J,D){},lPiR:function(H,J,D){(function(k,g){H.exports=J=g(D("Ib8C"))})(this,function(k){return function(g){var C=k,M=C.lib,m=M.WordArray,y=M.Hasher,S=C.algo,_=[],t=[];(function(){function c(d){for(var f=g.sqrt(d),l=2;l<=f;l++)if(!(d%l))return!1;return!0}function a(d){return(d-(d|0))*4294967296|0}for(var i=2,s=0;s<64;)c(i)&&(s<8&&(_[s]=a(g.pow(i,1/2))),t[s]=a(g.pow(i,1/3)),s++),i++})();var h=[],n=S.SHA256=y.extend({_doReset:function(){this._hash=new m.init(_.slice(0))},_doProcessBlock:function(c,a){for(var i=this._hash.words,s=i[0],d=i[1],f=i[2],l=i[3],o=i[4],r=i[5],x=i[6],v=i[7],p=0;p<64;p++){if(p<16)h[p]=c[a+p]|0;else{var R=h[p-15],O=(R<<25|R>>>7)^(R<<14|R>>>18)^R>>>3,b=h[p-2],E=(b<<15|b>>>17)^(b<<13|b>>>19)^b>>>10;h[p]=O+h[p-7]+E+h[p-16]}var w=o&r^~o&x,T=s&d^s&f^d&f,F=(s<<30|s>>>2)^(s<<19|s>>>13)^(s<<10|s>>>22),N=(o<<26|o>>>6)^(o<<21|o>>>11)^(o<<7|o>>>25),L=v+N+w+t[p]+h[p],G=F+T;v=x,x=r,r=o,o=l+L|0,l=f,f=d,d=s,s=L+G|0}i[0]=i[0]+s|0,i[1]=i[1]+d|0,i[2]=i[2]+f|0,i[3]=i[3]+l|0,i[4]=i[4]+o|0,i[5]=i[5]+r|0,i[6]=i[6]+x|0,i[7]=i[7]+v|0},_doFinalize:function(){var c=this._data,a=c.words,i=this._nDataBytes*8,s=c.sigBytes*8;return a[s>>>5]|=128<<24-s%32,a[(s+64>>>9<<4)+14]=g.floor(i/4294967296),a[(s+64>>>9<<4)+15]=i,c.sigBytes=a.length*4,this._process(),this._hash},clone:function(){var c=y.clone.call(this);return c._hash=this._hash.clone(),c}});C.SHA256=y._createHelper(n),C.HmacSHA256=y._createHmacHelper(n)}(Math),k.SHA256})},lZu9:function(H,J,D){(function(k){k(D("VrN/"),D("1eCo"),D("8EBN"))})(function(k){"use strict";k.defineMode("markdown",function(g,C){var M=k.getMode(g,"text/html"),m=M.name=="null";function y(U){if(k.findModeByName){var I=k.findModeByName(U);I&&(U=I.mime||I.mimes[0])}var K=k.getMode(g,U);return K.name=="null"?null:K}C.highlightFormatting===void 0&&(C.highlightFormatting=!1),C.maxBlockquoteDepth===void 0&&(C.maxBlockquoteDepth=0),C.taskLists===void 0&&(C.taskLists=!1),C.strikethrough===void 0&&(C.strikethrough=!1),C.emoji===void 0&&(C.emoji=!1),C.fencedCodeBlockHighlighting===void 0&&(C.fencedCodeBlockHighlighting=!0),C.fencedCodeBlockDefaultMode===void 0&&(C.fencedCodeBlockDefaultMode="text/plain"),C.xml===void 0&&(C.xml=!0),C.tokenTypeOverrides===void 0&&(C.tokenTypeOverrides={});var S={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var _ in S)S.hasOwnProperty(_)&&C.tokenTypeOverrides[_]&&(S[_]=C.tokenTypeOverrides[_]);var t=/^([*\-_])(?:\s*\1){2,}\s*$/,h=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,n=/^\[(x| )\](?=\s)/i,c=C.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,a=/^ {0,3}(?:\={1,}|-{2,})\s*$/,i=/^[^#!\[\]*_\\<>` "'(~:]+/,s=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,d=/^\s*\[[^\]]+?\]:.*$/,f=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,l=" ";function o(U,I,K){return I.f=I.inline=K,K(U,I)}function r(U,I,K){return I.f=I.block=K,K(U,I)}function x(U){return!U||!/\S/.test(U.string)}function v(U){if(U.linkTitle=!1,U.linkHref=!1,U.linkText=!1,U.em=!1,U.strong=!1,U.strikethrough=!1,U.quote=0,U.indentedCode=!1,U.f==R){var I=m;if(!I){var K=k.innerMode(M,U.htmlState);I=K.mode.name=="xml"&&K.state.tagStart===null&&!K.state.context&&K.state.tokenize.isInText}I&&(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,I){var K=U.column()===I.indentation,Z=x(I.prevLine.stream),ue=I.indentedCode,de=I.prevLine.hr,Ce=I.list!==!1,Re=(I.listStack[I.listStack.length-1]||0)+3;I.indentedCode=!1;var me=I.indentation;if(I.indentationDiff===null&&(I.indentationDiff=I.indentation,Ce)){for(I.list=null;me<I.listStack[I.listStack.length-1];)I.listStack.pop(),I.listStack.length?I.indentation=I.listStack[I.listStack.length-1]:I.list=!1;I.list!==!1&&(I.indentationDiff=me-I.listStack[I.listStack.length-1])}var Oe=!Z&&!de&&!I.prevLine.header&&(!Ce||!ue)&&!I.prevLine.fencedCodeEnd,be=(I.list===!1||de||Z)&&I.indentation<=Re&&U.match(t),ce=null;if(I.indentationDiff>=4&&(ue||I.prevLine.fencedCodeEnd||I.prevLine.header||Z))return U.skipToEnd(),I.indentedCode=!0,S.code;if(U.eatSpace())return null;if(K&&I.indentation<=Re&&(ce=U.match(c))&&ce[1].length<=6)return I.quote=0,I.header=ce[1].length,I.thisLine.header=!0,C.highlightFormatting&&(I.formatting="header"),I.f=I.inline,b(I);if(I.indentation<=Re&&U.eat(">"))return I.quote=K?1:I.quote+1,C.highlightFormatting&&(I.formatting="quote"),U.eatSpace(),b(I);if(!be&&!I.setext&&K&&I.indentation<=Re&&(ce=U.match(h))){var se=ce[1]?"ol":"ul";return I.indentation=me+U.current().length,I.list=!0,I.quote=0,I.listStack.push(I.indentation),I.em=!1,I.strong=!1,I.code=!1,I.strikethrough=!1,C.taskLists&&U.match(n,!1)&&(I.taskList=!0),I.f=I.inline,C.highlightFormatting&&(I.formatting=["list","list-"+se]),b(I)}else{if(K&&I.indentation<=Re&&(ce=U.match(s,!0)))return I.quote=0,I.fencedEndRE=new RegExp(ce[1]+"+ *$"),I.localMode=C.fencedCodeBlockHighlighting&&y(ce[2]||C.fencedCodeBlockDefaultMode),I.localMode&&(I.localState=k.startState(I.localMode)),I.f=I.block=O,C.highlightFormatting&&(I.formatting="code-block"),I.code=-1,b(I);if(I.setext||(!Oe||!Ce)&&!I.quote&&I.list===!1&&!I.code&&!be&&!d.test(U.string)&&(ce=U.lookAhead(1))&&(ce=ce.match(a)))return I.setext?(I.header=I.setext,I.setext=0,U.skipToEnd(),C.highlightFormatting&&(I.formatting="header")):(I.header=ce[0].charAt(0)=="="?1:2,I.setext=I.header),I.thisLine.header=!0,I.f=I.inline,b(I);if(be)return U.skipToEnd(),I.hr=!0,I.thisLine.hr=!0,S.hr;if(U.peek()==="[")return o(U,I,G)}return o(U,I,I.inline)}function R(U,I){var K=M.token(U,I.htmlState);if(!m){var Z=k.innerMode(M,I.htmlState);(Z.mode.name=="xml"&&Z.state.tagStart===null&&!Z.state.context&&Z.state.tokenize.isInText||I.md_inside&&U.current().indexOf(">")>-1)&&(I.f=w,I.block=p,I.htmlState=null)}return K}function O(U,I){var K=I.listStack[I.listStack.length-1]||0,Z=I.indentation<K,ue=K+3;if(I.fencedEndRE&&I.indentation<=ue&&(Z||U.match(I.fencedEndRE))){C.highlightFormatting&&(I.formatting="code-block");var de;return Z||(de=b(I)),I.localMode=I.localState=null,I.block=p,I.f=w,I.fencedEndRE=null,I.code=0,I.thisLine.fencedCodeEnd=!0,Z?r(U,I,I.block):de}else return I.localMode?I.localMode.token(U,I.localState):(U.skipToEnd(),S.code)}function b(U){var I=[];if(U.formatting){I.push(S.formatting),typeof U.formatting=="string"&&(U.formatting=[U.formatting]);for(var K=0;K<U.formatting.length;K++)I.push(S.formatting+"-"+U.formatting[K]),U.formatting[K]==="header"&&I.push(S.formatting+"-"+U.formatting[K]+"-"+U.header),U.formatting[K]==="quote"&&(!C.maxBlockquoteDepth||C.maxBlockquoteDepth>=U.quote?I.push(S.formatting+"-"+U.formatting[K]+"-"+U.quote):I.push("error"))}if(U.taskOpen)return I.push("meta"),I.length?I.join(" "):null;if(U.taskClosed)return I.push("property"),I.length?I.join(" "):null;if(U.linkHref?I.push(S.linkHref,"url"):(U.strong&&I.push(S.strong),U.em&&I.push(S.em),U.strikethrough&&I.push(S.strikethrough),U.emoji&&I.push(S.emoji),U.linkText&&I.push(S.linkText),U.code&&I.push(S.code),U.image&&I.push(S.image),U.imageAltText&&I.push(S.imageAltText,"link"),U.imageMarker&&I.push(S.imageMarker)),U.header&&I.push(S.header,S.header+"-"+U.header),U.quote&&(I.push(S.quote),!C.maxBlockquoteDepth||C.maxBlockquoteDepth>=U.quote?I.push(S.quote+"-"+U.quote):I.push(S.quote+"-"+C.maxBlockquoteDepth)),U.list!==!1){var Z=(U.listStack.length-1)%3;Z?Z===1?I.push(S.list2):I.push(S.list3):I.push(S.list1)}return U.trailingSpaceNewLine?I.push("trailing-space-new-line"):U.trailingSpace&&I.push("trailing-space-"+(U.trailingSpace%2?"a":"b")),I.length?I.join(" "):null}function E(U,I){return U.match(i,!0)?b(I):void 0}function w(U,I){var K=I.text(U,I);if(typeof K!="undefined")return K;if(I.list)return I.list=null,b(I);if(I.taskList){var Z=U.match(n,!0)[1]===" ";return Z?I.taskOpen=!0:I.taskClosed=!0,C.highlightFormatting&&(I.formatting="task"),I.taskList=!1,b(I)}if(I.taskOpen=!1,I.taskClosed=!1,I.header&&U.match(/^#+$/,!0))return C.highlightFormatting&&(I.formatting="header"),b(I);var ue=U.next();if(I.linkTitle){I.linkTitle=!1;var de=ue;ue==="("&&(de=")"),de=(de+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Ce="^\\s*(?:[^"+de+"\\\\]+|\\\\\\\\|\\\\.)"+de;if(U.match(new RegExp(Ce),!0))return S.linkHref}if(ue==="`"){var Re=I.formatting;C.highlightFormatting&&(I.formatting="code"),U.eatWhile("`");var me=U.current().length;if(I.code==0&&(!I.quote||me==1))return I.code=me,b(I);if(me==I.code){var Oe=b(I);return I.code=0,Oe}else return I.formatting=Re,b(I)}else if(I.code)return b(I);if(ue==="\\"&&(U.next(),C.highlightFormatting)){var be=b(I),ce=S.formatting+"-escape";return be?be+" "+ce:ce}if(ue==="!"&&U.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return I.imageMarker=!0,I.image=!0,C.highlightFormatting&&(I.formatting="image"),b(I);if(ue==="["&&I.imageMarker&&U.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return I.imageMarker=!1,I.imageAltText=!0,C.highlightFormatting&&(I.formatting="image"),b(I);if(ue==="]"&&I.imageAltText){C.highlightFormatting&&(I.formatting="image");var be=b(I);return I.imageAltText=!1,I.image=!1,I.inline=I.f=F,be}if(ue==="["&&!I.image)return I.linkText&&U.match(/^.*?\]/)||(I.linkText=!0,C.highlightFormatting&&(I.formatting="link")),b(I);if(ue==="]"&&I.linkText){C.highlightFormatting&&(I.formatting="link");var be=b(I);return I.linkText=!1,I.inline=I.f=U.match(/\(.*?\)| ?\[.*?\]/,!1)?F:w,be}if(ue==="<"&&U.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){I.f=I.inline=T,C.highlightFormatting&&(I.formatting="link");var be=b(I);return be?be+=" ":be="",be+S.linkInline}if(ue==="<"&&U.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){I.f=I.inline=T,C.highlightFormatting&&(I.formatting="link");var be=b(I);return be?be+=" ":be="",be+S.linkEmail}if(C.xml&&ue==="<"&&U.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var se=U.string.indexOf(">",U.pos);if(se!=-1){var ne=U.string.substring(U.start,se);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(ne)&&(I.md_inside=!0)}return U.backUp(1),I.htmlState=k.startState(M),r(U,I,R)}if(C.xml&&ue==="<"&&U.match(/^\/\w*?>/))return I.md_inside=!1,"tag";if(ue==="*"||ue==="_"){for(var ge=1,ee=U.pos==1?" ":U.string.charAt(U.pos-2);ge<3&&U.eat(ue);)ge++;var re=U.peek()||" ",Te=!/\s/.test(re)&&(!f.test(re)||/\s/.test(ee)||f.test(ee)),ie=!/\s/.test(ee)&&(!f.test(ee)||/\s/.test(re)||f.test(re)),q=null,Y=null;if(ge%2&&(!I.em&&Te&&(ue==="*"||!ie||f.test(ee))?q=!0:I.em==ue&&ie&&(ue==="*"||!Te||f.test(re))&&(q=!1)),ge>1&&(!I.strong&&Te&&(ue==="*"||!ie||f.test(ee))?Y=!0:I.strong==ue&&ie&&(ue==="*"||!Te||f.test(re))&&(Y=!1)),Y!=null||q!=null){C.highlightFormatting&&(I.formatting=q==null?"strong":Y==null?"em":"strong em"),q===!0&&(I.em=ue),Y===!0&&(I.strong=ue);var Oe=b(I);return q===!1&&(I.em=!1),Y===!1&&(I.strong=!1),Oe}}else if(ue===" "&&(U.eat("*")||U.eat("_"))){if(U.peek()===" ")return b(I);U.backUp(1)}if(C.strikethrough){if(ue==="~"&&U.eatWhile(ue)){if(I.strikethrough){C.highlightFormatting&&(I.formatting="strikethrough");var Oe=b(I);return I.strikethrough=!1,Oe}else if(U.match(/^[^\s]/,!1))return I.strikethrough=!0,C.highlightFormatting&&(I.formatting="strikethrough"),b(I)}else if(ue===" "&&U.match(/^~~/,!0)){if(U.peek()===" ")return b(I);U.backUp(2)}}if(C.emoji&&ue===":"&&U.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){I.emoji=!0,C.highlightFormatting&&(I.formatting="emoji");var X=b(I);return I.emoji=!1,X}return ue===" "&&(U.match(/^ +$/,!1)?I.trailingSpace++:I.trailingSpace&&(I.trailingSpaceNewLine=!0)),b(I)}function T(U,I){var K=U.next();if(K===">"){I.f=I.inline=w,C.highlightFormatting&&(I.formatting="link");var Z=b(I);return Z?Z+=" ":Z="",Z+S.linkInline}return U.match(/^[^>]+/,!0),S.linkInline}function F(U,I){if(U.eatSpace())return null;var K=U.next();return K==="("||K==="["?(I.f=I.inline=L(K==="("?")":"]"),C.highlightFormatting&&(I.formatting="link-string"),I.linkHref=!0,b(I)):"error"}var N={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function L(U){return function(I,K){var Z=I.next();if(Z===U){K.f=K.inline=w,C.highlightFormatting&&(K.formatting="link-string");var ue=b(K);return K.linkHref=!1,ue}return I.match(N[U]),K.linkHref=!0,b(K)}}function G(U,I){return U.match(/^([^\]\\]|\\.)*\]:/,!1)?(I.f=z,U.next(),C.highlightFormatting&&(I.formatting="link"),I.linkText=!0,b(I)):o(U,I,w)}function z(U,I){if(U.match(/^\]:/,!0)){I.f=I.inline=A,C.highlightFormatting&&(I.formatting="link");var K=b(I);return I.linkText=!1,K}return U.match(/^([^\]\\]|\\.)+/,!0),S.linkText}function A(U,I){return U.eatSpace()?null:(U.match(/^[^\s]+/,!0),U.peek()===void 0?I.linkTitle=!0:U.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),I.f=I.inline=w,S.linkHref+" url")}var B={startState:function(){return{f:p,prevLine:{stream:null},thisLine:{stream:null},block:p,htmlState:null,indentation:0,inline:w,text:E,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&&k.copyState(M,U.htmlState),indentation:U.indentation,localMode:U.localMode,localState:U.localMode?k.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,I){if(I.formatting=!1,U!=I.thisLine.stream){if(I.header=0,I.hr=!1,U.match(/^\s*$/,!0))return v(I),null;if(I.prevLine=I.thisLine,I.thisLine={stream:U},I.taskList=!1,I.trailingSpace=0,I.trailingSpaceNewLine=!1,!I.localState&&(I.f=I.block,I.f!=R)){var K=U.match(/^\s*/,!0)[0].replace(/\t/g,l).length;if(I.indentation=K,I.indentationDiff=null,K>0)return null}}return I.f(U,I)},innerMode:function(U){return U.block==R?{state:U.htmlState,mode:M}:U.localState?{state:U.localState,mode:U.localMode}:{state:U,mode:B}},indent:function(U,I,K){return U.block==R&&M.indent?M.indent(U.htmlState,I,K):U.localState&&U.localMode.indent?U.localMode.indent(U.localState,I,K):k.Pass},blankLine:v,getType:b,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return B},"xml"),k.defineMIME("text/markdown","markdown"),k.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,D,k){function g(m,y){if(!D[m]){if(!J[m]){var S=typeof require=="function"&&require;if(!y&&S)return require(m,!0);if(C)return C(m,!0);var _=new Error("Cannot find module '"+m+"'");throw _.code="MODULE_NOT_FOUND",_}var t=D[m]={exports:{}};J[m][0].call(t.exports,function(h){var n=J[m][1][h];return g(n||h)},t,t.exports,H,J,D,k)}return D[m].exports}for(var C=typeof require=="function"&&require,M=0;M<k.length;M++)g(k[M]);return g}return H}()({1:[function(H,J,D){"use strict";var k=H("./browser/client");k.Buffer=H("buffer").Buffer,k.urllib=H("../shims/xhr"),k.version=H("./browser/version").version,J.exports=k},{"../shims/xhr":291,"./browser/client":2,"./browser/version":5,buffer:73}],2:[function(H,J,D){(function(k,g){"use strict";var C=H("babel-runtime/core-js/promise"),M=t(C),m=H("babel-runtime/regenerator"),y=t(m),S=H("babel-runtime/core-js/object/assign"),_=t(S);function t(G){return G&&G.__esModule?G:{default:G}}var h=H("debug")("ali-oss"),n=H("copy-to"),c=H("xml2js"),a=H("agentkeepalive"),i=H("merge-descriptors"),s=H("url"),d=H("is-type-of"),f=H("platform"),l=H("utility"),o=H("urllib"),r=H("./version"),x=H("bowser"),v=H("../common/signUtils"),p=H("../common/utils/isIP"),R=p.isIP,O=H("../common/client/initOptions"),b=H("../common/utils/createRequest"),E=b.createRequest,w=new a;function T(){var G=f.name,z=f.version;G&&G.toLowerCase&&G.toLowerCase()==="ie"&&z.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function F(){return location&&location.protocol==="https:"}function N(G,z){if(T(),!(this instanceof N))return new N(G,z);G&&G.inited?this.options=G:this.options=N.initOptions(G),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=o,this.agent=this.options.agent||w),this.ctx=z,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}J.exports=N,N.initOptions=function(z){z.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var A=(0,_.default)({secure:F(),useFetch:!1},z);return O(A)};var L=N.prototype;L.debug=h,i(L,H("./object")),i(L,H("../common/bucket/getBucketWebsite")),i(L,H("../common/bucket/putBucketWebsite")),i(L,H("../common/bucket/deleteBucketWebsite")),i(L,H("../common/bucket/getBucketLifecycle")),i(L,H("../common/bucket/putBucketLifecycle")),i(L,H("../common/bucket/deleteBucketLifecycle")),i(L,H("../common/bucket/putBucketVersioning")),i(L,H("../common/bucket/getBucketVersioning")),i(L,H("./managed-upload")),i(L,H("../common/multipart")),i(L,H("../common/parallel")),L.signature=function(z){return this.debug("authorization stringToSign: %s",z,"info"),v.computeSignature(this.options.accessKeySecret,z)},L.authorization=function(z,A,B,U){var I=v.buildCanonicalString(z.toUpperCase(),A,{headers:U,parameters:B});return v.authorization(this.options.accessKeyId,this.options.accessKeySecret,I)},L.request=function(z){var A,B,U,I,K,Z;return y.default.async(function(de){for(;;)switch(de.prev=de.next){case 0:return A=E.call(this,z),this.options.useFetch||(A.params.mode="disable-fetch"),B=void 0,U=void 0,I=!!z.stream,de.prev=5,de.next=8,y.default.awrap(this.urllib.request(A.url,A.params));case 8:B=de.sent,this.debug("response %s %s, got %s, headers: %j",z.method,A.url,B.status,B.headers,"info"),de.next=15;break;case 12:de.prev=12,de.t0=de.catch(5),U=de.t0;case 15:if(K=void 0,!(B&&z.successStatuses&&z.successStatuses.indexOf(B.status)===-1)){de.next=28;break}return de.next=19,y.default.awrap(this.requestError(B));case 19:if(K=de.sent,!(K.code==="RequestTimeTooSkewed"&&!I)){de.next=25;break}return this.options.amendTimeSkewed=+new Date(K.serverTime)-new Date,de.next=24,y.default.awrap(this.request(z));case 24:return de.abrupt("return",de.sent);case 25:K.params=z,de.next=32;break;case 28:if(!U){de.next=32;break}return de.next=31,y.default.awrap(this.requestError(U));case 31:K=de.sent;case 32:if(!K){de.next=34;break}throw K;case 34:if(!z.xmlResponse){de.next=39;break}return de.next=37,y.default.awrap(this.parseXML(B.data));case 37:Z=de.sent,B.data=Z;case 39:return de.abrupt("return",B);case 40:case"end":return de.stop()}},null,this,[[5,12]])},L._getResource=function(z){var A="/";return z.bucket&&(A+=z.bucket+"/"),z.object&&(A+=z.object),A},L._isIP=R,L._escape=function(z){return l.encodeURIComponent(z).replace(/%2F/g,"/")},L._getReqUrl=function(z){var A={};n(this.options.endpoint).to(A);var B=this._isIP(A.hostname),U=this.options.cname;z.bucket&&!U&&!B&&(A.host=z.bucket+"."+A.host);var I="/";z.bucket&&B&&(I+=z.bucket+"/"),z.object&&(I+=this._escape(z.object).replace(/\+/g,"%2B")),A.pathname=I;var K={};if(z.query&&i(K,z.query),z.subres){var Z={};d.string(z.subres)?Z[z.subres]="":d.array(z.subres)?z.subres.forEach(function(ue){Z[ue]=""}):Z=z.subres,i(K,Z)}return A.query=K,s.format(A)},L._getUserAgent=function(){var z=g&&g.browser?"js":"nodejs",A="aliyun-sdk-"+z+"/"+r.version,B=f.description;return!B&&g&&(B="Node.js "+g.version.slice(1)+" on "+g.platform+" "+g.arch),this._checkUserAgent(A+" "+B)},L._checkUserAgent=function(z){var A=z.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return A},L.checkBrowserAndVersion=function(z,A){return x.name===z&&x.version.split(".")[0]===A},L.parseXML=function(z){return new M.default(function(A,B){k.isBuffer(z)&&(z=z.toString()),c.parseString(z,{explicitRoot:!1,explicitArray:!1},function(U,I){U?B(U):A(I)})})},L.requestError=function(z){var A,B,U,I;return y.default.async(function(Z){for(;;)switch(Z.prev=Z.next){case 0:if(A=null,!(!z.data||!z.data.length)){Z.next=5;break}z.status===-1||z.status===-2?(A=new Error(z.message),A.name=z.name,A.status=z.status,A.code=z.name):(z.status===404?(A=new Error("Object not exists"),A.name="NoSuchKeyError",A.status=404,A.code="NoSuchKey"):z.status===412?(A=new Error("Pre condition failed"),A.name="PreconditionFailedError",A.status=412,A.code="PreconditionFailed"):(A=new Error("Unknow error, status: "+z.status),A.name="UnknowError",A.status=z.status),A.requestId=z.headers["x-oss-request-id"],A.host=""),Z.next=33;break;case 5:return B=String(z.data),this.debug("request response error data: %s",B,"error"),U=void 0,Z.prev=8,Z.next=11,y.default.awrap(this.parseXML(B));case 11:if(Z.t0=Z.sent,Z.t0){Z.next=14;break}Z.t0={};case 14:U=Z.t0,Z.next=24;break;case 17:return Z.prev=17,Z.t1=Z.catch(8),this.debug(B,"error"),Z.t1.message+=`
raw xml: `+B,Z.t1.status=z.status,Z.t1.requestId=z.headers["x-oss-request-id"],Z.abrupt("return",Z.t1);case 24:I=U.Message||"unknow request error, status: "+z.status,U.Condition&&(I+=" (condition: "+U.Condition+")"),A=new Error(I),A.name=U.Code?U.Code+"Error":"UnknowError",A.status=z.status,A.code=U.Code,A.requestId=U.RequestId,A.hostId=U.HostId,A.serverTime=U.ServerTime;case 33:return this.debug("generate error %j",A,"error"),Z.abrupt("return",A);case 35:case"end":return Z.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,D){(function(k){"use strict";var g=H("babel-runtime/core-js/array/from"),C=_(g),M=H("babel-runtime/core-js/promise"),m=_(M),y=H("babel-runtime/regenerator"),S=_(y);function _(v){return v&&v.__esModule?v:{default:v}}var t=H("is-type-of"),h=H("util"),n=H("path"),c=H("mime"),a=H("copy-to"),i=H("../common/utils/isBlob"),s=i.isBlob,d=H("../common/utils/isFile"),f=d.isFile,l=D;l.multipartUpload=function(p,R,O){var b,E,w,T,F,N,L,G,z;return S.default.async(function(B){for(;;)switch(B.prev=B.next){case 0:if(this.resetCancelFlag(),O=O||{},!(O.checkpoint&&O.checkpoint.uploadId)){B.next=6;break}return B.next=5,S.default.awrap(this._resumeMultipart(O.checkpoint,O));case 5:return B.abrupt("return",B.sent);case 6:return b=100*1024,O.mime||(f(R)?O.mime=c.getType(n.extname(R.name)):s(R)?O.mime=R.type:O.mime=c.getType(n.extname(R))),O.headers=O.headers||{},this._convertMetaToHeaders(O.meta,O.headers),B.next=12,S.default.awrap(this._getFileSize(R));case 12:if(E=B.sent,!(E<b)){B.next=25;break}return w=this._createStream(R,0,E),O.contentLength=E,B.next=18,S.default.awrap(this.putStream(p,w,O));case 18:if(T=B.sent,!(O&&O.progress)){B.next=22;break}return B.next=22,S.default.awrap(O.progress(1));case 22:return F={res:T.res,bucket:this.options.bucket,name:p,etag:T.res.headers.etag},(O.headers&&O.headers["x-oss-callback"]||O.callback)&&(F.data=T.data),B.abrupt("return",F);case 25:if(!(O.partSize&&!(parseInt(O.partSize,10)===O.partSize))){B.next=27;break}throw new Error("partSize must be int number");case 27:if(!(O.partSize&&O.partSize<b)){B.next=29;break}throw new Error("partSize must not be smaller than "+b);case 29:return B.next=31,S.default.awrap(this.initMultipartUpload(p,O));case 31:if(N=B.sent,L=N.uploadId,G=this._getPartSize(E,O.partSize),z={file:R,name:p,fileSize:E,partSize:G,uploadId:L,doneParts:[]},!(O&&O.progress)){B.next=38;break}return B.next=38,S.default.awrap(O.progress(0,z,N.res));case 38:return B.next=40,S.default.awrap(this._resumeMultipart(z,O));case 40:return B.abrupt("return",B.sent);case 41:case"end":return B.stop()}},null,this)},l._resumeMultipart=function(p,R){var O,b,E,w,T,F,N,L,G,z,A,B,U,I,K,Z,ue,de;return S.default.async(function(Re){for(;;)switch(Re.prev=Re.next){case 0:if(O=this,!this.isCancel()){Re.next=3;break}throw this._makeCancelEvent();case 3:return b=p.file,E=p.fileSize,w=p.partSize,T=p.uploadId,F=p.doneParts,N=p.name,L=[],F.length>0&&a(F).to(L),G=this._divideParts(E,w),z=G.length,A=!1,B=function(Oe,be){var ce=this;return new m.default(function(ne,ge){var ee,re,Te,ie;return S.default.async(function(Y){for(;;)switch(Y.prev=Y.next){case 0:if(Y.prev=0,Oe.isCancel()){Y.next=18;break}return ee=G[be-1],re={stream:Oe._createStream(b,ee.start,ee.end),size:ee.end-ee.start},Y.next=6,S.default.awrap(Oe._uploadPart(N,T,be,re));case 6:if(Te=Y.sent,!(!Oe.isCancel()&&!A)){Y.next=15;break}if(p.doneParts.push({number:be,etag:Te.res.headers.etag}),!R.progress){Y.next=12;break}return Y.next=12,S.default.awrap(R.progress(F.length/z,p,Te.res));case 12:ne({number:be,etag:Te.res.headers.etag}),Y.next=16;break;case 15:ne();case 16:Y.next=19;break;case 18:ne();case 19:Y.next=30;break;case 21:Y.prev=21,Y.t0=Y.catch(0),ie=new Error,ie.name=Y.t0.name,ie.message=Y.t0.message,ie.stack=Y.t0.stack,ie.partNum=be,a(Y.t0).to(ie),ge(ie);case 30:case"end":return Y.stop()}},null,ce,[[0,21]])})},U=(0,C.default)(new Array(z),function(me,Oe){return Oe+1}),I=L.map(function(me){return me.number}),K=U.filter(function(me){return I.indexOf(me)<0}),Z=5,ue=R.parallel||Z,Re.next=17,S.default.awrap(this._parallel(K,ue,function(me){return new m.default(function(Oe,be){B(O,me).then(function(ce){ce&&L.push(ce),Oe()}).catch(function(ce){be(ce)})})}));case 17:if(de=Re.sent,A=!0,!this.isCancel()){Re.next=22;break}throw B=null,this._makeCancelEvent();case 22:if(!(de&&de.length>0)){Re.next=25;break}throw de[0].message="Failed to upload some parts with error: "+de[0].toString()+" part_num: "+de[0].partNum,de[0];case 25:return Re.next=27,S.default.awrap(this.completeMultipartUpload(N,T,L,R));case 27:return Re.abrupt("return",Re.sent);case 28:case"end":return Re.stop()}},null,this)},l._getFileSize=function(p){return S.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:if(!t.buffer(p)){O.next=4;break}return O.abrupt("return",p.length);case 4:if(!(s(p)||f(p))){O.next=6;break}return O.abrupt("return",p.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return O.stop()}},null,this)};var o=H("stream"),r=o.Readable;function x(v,p){if(!(this instanceof x))return new x(v,p);r.call(this,p),this.file=v,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}h.inherits(x,r),x.prototype.readFileAndPush=function(p){if(this.fileBuffer)for(var R=!0;R&&this.fileBuffer&&this.start<this.fileBuffer.length;){var O=this.start,b=O+p;b=b>this.fileBuffer.length?this.fileBuffer.length:b,this.start=b,R=this.push(this.fileBuffer.slice(O,b))}},x.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 R=16*1024;p=p||R;var O=this;this.reader.onload=function(E){O.fileBuffer=k.from(new Uint8Array(E.target.result)),O.file=null,O.readFileAndPush(p)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(p)},l._createStream=function(p,R,O){if(s(p)||f(p))return new x(p.slice(R,O));throw new Error("_createStream requires File/Blob.")},l._getPartSize=function(p,R){var O=10*1e3,b=1024*1024;return R?Math.max(Math.ceil(p/O),R):b},l._divideParts=function(p,R){for(var O=Math.ceil(p/R),b=[],E=0;E<O;E++){var w=R*E,T=Math.min(w+R,p);b.push({start:w,end:T})}return b}}).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,D){"use strict";var k=H("babel-runtime/core-js/promise"),g=t(k),C=H("babel-runtime/core-js/object/keys"),M=t(C),m=H("babel-runtime/core-js/object/assign"),y=t(m),S=H("babel-runtime/regenerator"),_=t(S);function t(O){return O&&O.__esModule?O:{default:O}}var h=H("utility"),n=H("fs"),c=H("is-type-of"),a=H("url"),i=H("copy-to"),s=H("path"),d=H("mime"),f=H("../common/callback"),l=H("../common/signUtils"),o=H("merge-descriptors"),r=H("../common/utils/isBlob"),x=r.isBlob,v=H("../common/utils/isFile"),p=v.isFile,R=D;R.append=function(b,E,w){var T;return _.default.async(function(N){for(;;)switch(N.prev=N.next){case 0:return w=w||{},w.position===void 0&&(w.position="0"),w.subres={append:"",position:w.position},w.method="POST",N.next=6,_.default.awrap(this.put(b,E,w));case 6:return T=N.sent,T.nextAppendPosition=T.res.headers["x-oss-next-append-position"],N.abrupt("return",T);case 9:case"end":return N.stop()}},null,this)},R.put=function(b,E,w){var T,F,N,L,G,z,A;return _.default.async(function(U){for(;;)switch(U.prev=U.next){case 0:if(T=void 0,w=w||{},b=this._objectName(b),!c.buffer(E)){U.next=7;break}T=E,U.next=33;break;case 7:if(!(x(E)||p(E))){U.next=32;break}return w.mime||(p(E)?w.mime=d.getType(s.extname(E.name)):w.mime=E.type),F=this._createStream(E,0,E.size),U.next=12,_.default.awrap(this._getFileSize(E));case 12:return w.contentLength=U.sent,U.prev=13,U.next=16,_.default.awrap(this.putStream(b,F,w));case 16:return N=U.sent,U.abrupt("return",N);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(b,E,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),L=w.method||"PUT",G=this._objectRequestParams(L,b,w),f.encodeCallback(G,w),G.mime=w.mime,G.content=T,G.successStatuses=[200],U.next=43,_.default.awrap(this.request(G));case 43:return z=U.sent,A={name:b,url:this._objectUrl(b),res:z.res},G.headers&&G.headers["x-oss-callback"]&&(A.data=JSON.parse(z.data.toString())),U.abrupt("return",A);case 47:case"end":return U.stop()}},null,this,[[13,20]])},R.putStream=function(b,E,w){var T,F,N,L;return _.default.async(function(z){for(;;)switch(z.prev=z.next){case 0:return w=w||{},w.headers=w.headers||{},b=this._objectName(b),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,b,w),f.encodeCallback(F,w),F.mime=w.mime,F.stream=E,F.successStatuses=[200],z.next=13,_.default.awrap(this.request(F));case 13:return N=z.sent,L={name:b,url:this._objectUrl(b),res:N.res},F.headers&&F.headers["x-oss-callback"]&&(L.data=JSON.parse(N.data.toString())),z.abrupt("return",L);case 17:case"end":return z.stop()}},null,this)},o(R,H("../common/object/copyObject")),o(R,H("../common/object/getObjectTagging")),o(R,H("../common/object/putObjectTagging")),o(R,H("../common/object/deleteObjectTagging")),o(R,H("../common/image")),o(R,H("../common/object/getBucketVersions")),o(R,H("../common/object/getACL")),o(R,H("../common/object/putACL")),o(R,H("../common/object/head")),o(R,H("../common/object/delete")),o(R,H("../common/object/get")),o(R,H("../common/object/putSymlink")),o(R,H("../common/object/getSymlink")),o(R,H("../common/object/deleteMulti")),o(R,H("../common/object/getObjectMeta")),R.putMeta=function(b,E,w){var T;return _.default.async(function(N){for(;;)switch(N.prev=N.next){case 0:return N.next=2,_.default.awrap(this.copy(b,b,{meta:E||{},timeout:w&&w.timeout,ctx:w&&w.ctx}));case 2:return T=N.sent,N.abrupt("return",T);case 4:case"end":return N.stop()}},null,this)},R.list=function(b,E){var w,T,F,N,L;return _.default.async(function(z){for(;;)switch(z.prev=z.next){case 0:return w=this._objectRequestParams("GET","",E),w.query=b,w.xmlResponse=!0,w.successStatuses=[200],z.next=6,_.default.awrap(this.request(w));case 6:return T=z.sent,F=T.data.Contents,N=this,F&&(Array.isArray(F)||(F=[F]),F=F.map(function(A){return{name:A.Key,url:N._objectUrl(A.Key),lastModified:A.LastModified,etag:A.ETag,type:A.Type,size:Number(A.Size),storageClass:A.StorageClass,owner:{id:A.Owner.ID,displayName:A.Owner.DisplayName}}})),L=T.data.CommonPrefixes||null,L&&(Array.isArray(L)||(L=[L]),L=L.map(function(A){return A.Prefix})),z.abrupt("return",{res:T.res,objects:F,prefixes:L,nextMarker:T.data.NextMarker||null,isTruncated:T.data.IsTruncated==="true"});case 13:case"end":return z.stop()}},null,this)},R.restore=function(b,E){var w,T;return _.default.async(function(N){for(;;)switch(N.prev=N.next){case 0:return E=E||{},E.subres=(0,y.default)({restore:""},E.subres),E.versionId&&(E.subres.versionId=E.versionId),w=this._objectRequestParams("POST",b,E),w.successStatuses=[202],N.next=7,_.default.awrap(this.request(w));case 7:return T=N.sent,N.abrupt("return",{res:T.res});case 9:case"end":return N.stop()}},null,this)},R.signatureUrl=function(b,E){E=E||{},b=this._objectName(b),E.method=E.method||"GET";var w=h.timestamp()+(E.expires||1800),T={bucket:this.options.bucket,object:b},F=this._getResource(T);this.options.stsToken&&(E["security-token"]=this.options.stsToken);var N=l._signatureForURL(this.options.accessKeySecret,E,F,w),L=a.parse(this._getReqUrl(T));return L.query={OSSAccessKeyId:this.options.accessKeyId,Expires:w,Signature:N.Signature},i(N.subResource).to(L.query),L.format()},R.getObjectUrl=function(b,E){return E?E[E.length-1]!=="/"&&(E+="/"):E=this.options.endpoint.format(),E+this._escape(this._objectName(b))},R._objectUrl=function(b){return this._getReqUrl({bucket:this.options.bucket,object:b})},R.generateObjectUrl=function(O,b){if(b)b[b.length-1]!=="/"&&(b+="/");else{b=this.options.endpoint.format();var E=a.parse(b),w=this.options.bucket;E.hostname=w+"."+E.hostname,E.host=w+"."+E.host,b=E.format()}return b+this._escape(this._objectName(O))},R._objectRequestParams=function(b,E,w){if(!this.options.bucket)throw new Error("Please create a bucket first");w=w||{},E=this._objectName(E);var T={object:E,bucket:this.options.bucket,method:b,subres:w&&w.subres,timeout:w&&w.timeout,ctx:w&&w.ctx};return w.headers&&(T.headers={},i(w.headers).to(T.headers)),T},R._objectName=function(b){return b.replace(/^\/+/,"")},R._convertMetaToHeaders=function(b,E){if(!b)return;(0,M.default)(b).forEach(function(w){E["x-oss-meta-"+w]=b[w]})},R._deleteFileSafe=function(b){var E=this;return new g.default(function(w){n.exists(b,function(T){T?n.unlink(b,function(F){F&&E.debug("unlink %j error: %s",b,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,D){"use strict";D.version="6.10.0"},{}],6:[function(H,J,D){"use strict";var k=H("babel-runtime/regenerator"),g=C(k);function C(S){return S&&S.__esModule?S:{default:S}}var M=H("../utils/checkBucketName"),m=M.checkBucketName,y=D;y.deleteBucketLifecycle=function(_,t){var h,n;return g.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return m(_),h=this._bucketRequestParams("DELETE",_,"lifecycle",t),h.successStatuses=[204],a.next=5,g.default.awrap(this.request(h));case 5:return n=a.sent,a.abrupt("return",{res:n.res});case 7:case"end":return a.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],7:[function(H,J,D){"use strict";var k=H("babel-runtime/regenerator"),g=C(k);function C(S){return S&&S.__esModule?S:{default:S}}var M=H("../utils/checkBucketName"),m=M.checkBucketName,y=D;y.deleteBucketWebsite=function(_,t){var h,n;return g.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return m(_),h=this._bucketRequestParams("DELETE",_,"website",t),h.successStatuses=[204],a.next=5,g.default.awrap(this.request(h));case 5:return n=a.sent,a.abrupt("return",{res:n.res});case 7:case"end":return a.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],8:[function(H,J,D){"use strict";var k=H("babel-runtime/regenerator"),g=C(k);function C(n){return n&&n.__esModule?n:{default:n}}var M=H("../utils/checkBucketName"),m=M.checkBucketName,y=H("../utils/isArray"),S=y.isArray,_=H("../utils/formatObjKey"),t=_.formatObjKey,h=D;h.getBucketLifecycle=function(c,a){var i,s,d;return g.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:return m(c),i=this._bucketRequestParams("GET",c,"lifecycle",a),i.successStatuses=[200],i.xmlResponse=!0,l.next=6,g.default.awrap(this.request(i));case 6:return s=l.sent,d=s.data.Rule||null,d&&(S(d)||(d=[d]),d=d.map(function(o){return o.ID&&(o.id=o.ID,delete o.ID),o.Tag&&!S(o.Tag)&&(o.Tag=[o.Tag]),t(o,"firstLowerCase")})),l.abrupt("return",{rules:d,res:s.res});case 10:case"end":return l.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/formatObjKey":40,"../utils/isArray":42,"babel-runtime/regenerator":68}],9:[function(H,J,D){"use strict";var k=H("babel-runtime/regenerator"),g=C(k);function C(S){return S&&S.__esModule?S:{default:S}}var M=H("../utils/checkBucketName"),m=M.checkBucketName,y=D;y.getBucketVersioning=function(_,t){var h,n,c;return g.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return m(_),h=this._bucketRequestParams("GET",_,"versioning",t),h.xmlResponse=!0,h.successStatuses=[200],i.next=6,g.default.awrap(this.request(h));case 6:return n=i.sent,c=n.data.Status,i.abrupt("return",{status:n.status,versionStatus:c,res:n.res});case 9:case"end":return i.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],10:[function(H,J,D){"use strict";var k=H("babel-runtime/regenerator"),g=C(k);function C(t){return t&&t.__esModule?t:{default:t}}var M=H("../utils/checkBucketName"),m=M.checkBucketName,y=H("../utils/isObject"),S=y.isObject,_=D;_.getBucketWebsite=function(h,n){var c,a,i;return g.default.async(function(d){for(;;)switch(d.prev=d.next){case 0:return m(h),c=this._bucketRequestParams("GET",h,"website",n),c.successStatuses=[200],c.xmlResponse=!0,d.next=6,g.default.awrap(this.request(c));case 6:return a=d.sent,i=[],a.data.RoutingRules&&a.data.RoutingRules.RoutingRule&&(S(a.data.RoutingRules.RoutingRule)?i=[a.data.RoutingRules.RoutingRule]:i=a.data.RoutingRules.RoutingRule),d.abrupt("return",{index:a.data.IndexDocument&&a.data.IndexDocument.Suffix||"",supportSubDir:a.data.IndexDocument&&a.data.IndexDocument.SupportSubDir||"false",type:a.data.IndexDocument&&a.data.IndexDocument.Type,routingRules:i,error:a.data.ErrorDocument&&a.data.ErrorDocument.Key||null,res:a.res});case 10:case"end":return d.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isObject":46,"babel-runtime/regenerator":68}],11:[function(H,J,D){"use strict";var k=H("babel-runtime/regenerator"),g=C(k);function C(p){return p&&p.__esModule?p:{default:p}}var M=H("../utils/checkBucketName"),m=M.checkBucketName,y=H("../utils/isArray"),S=y.isArray,_=H("../utils/deepCopy"),t=_.deepCopy,h=H("../utils/isObject"),n=h.isObject,c=H("../utils/obj2xml"),a=c.obj2xml,i=H("../utils/checkObjectTag"),s=i.checkObjectTag,d=H("../utils/getStrBytesCount"),f=d.getStrBytesCount,l=D;l.putBucketLifecycle=function(R,O,b){var E,w,T,F,N;return g.default.async(function(G){for(;;)switch(G.prev=G.next){case 0:if(m(R),S(O)){G.next=3;break}throw new Error("rules must be Array");case 3:return E=this._bucketRequestParams("PUT",R,"lifecycle",b),w=[],T={LifecycleConfiguration:{Rule:w}},O.forEach(function(z){o(z),v(z),z.id&&(z.ID=z.id,delete z.id),w.push(z)}),F=a(T,{headers:!0,firstUpperCase:!0}),E.content=F,E.mime="xml",E.successStatuses=[200],G.next=13,g.default.awrap(this.request(E));case 13:return N=G.sent,G.abrupt("return",{res:N.res});case 15:case"end":return G.stop()}},null,this)};function o(p){p.days&&(p.expiration={days:p.days}),p.date&&(p.expiration={createdBeforeDate:p.date})}function r(p,R){var O=p.days,b=p.createdBeforeDate;if(!O&&!b)throw new Error(R+" must includes days or createdBeforeDate");if(O&&!/^[1-9][0-9]*$/.test(O))throw new Error("days must be a positive integer");if(b&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(b))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function x(p){if(!S(p)&&!n(p))throw new Error("tag must be Object or Array");p=n(p)?[p]:p;var R={},O=t(p);O.forEach(function(b){R[b.key]=b.value}),s(R)}function v(p){if(p.id&&f(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");r(p.transition,"Transition")}if(p.expiration){if(!p.expiration.expiredObjectDeleteMarker)r(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&&r(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");x(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,D){"use strict";var k=H("babel-runtime/regenerator"),g=C(k);function C(t){return t&&t.__esModule?t:{default:t}}var M=H("../utils/checkBucketName"),m=M.checkBucketName,y=H("../utils/obj2xml"),S=y.obj2xml,_=D;_.putBucketVersioning=function(h,n){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,i,s;return g.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:if(m(h),["Enabled","Suspended"].includes(n)){f.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return a=this._bucketRequestParams("PUT",h,"versioning",c),i={VersioningConfiguration:{Status:n}},a.mime="xml",a.content=S(i,{headers:!0}),f.next=9,g.default.awrap(this.request(a));case 9:return s=f.sent,f.abrupt("return",{res:s.res,status:s.status});case 11:case"end":return f.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(H,J,D){"use strict";var k=H("babel-runtime/regenerator"),g=C(k);function C(n){return n&&n.__esModule?n:{default:n}}var M=H("../utils/checkBucketName"),m=M.checkBucketName,y=H("../utils/obj2xml"),S=y.obj2xml,_=H("../utils/isArray"),t=_.isArray,h=D;h.putBucketWebsite=function(c){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments[2],s,d,f,l,o;return g.default.async(function(x){for(;;)switch(x.prev=x.next){case 0:if(m(c),s=this._bucketRequestParams("PUT",c,"website",i),d={Suffix:a.index||"index.html"},f={IndexDocument:d},l={WebsiteConfiguration:f},a.supportSubDir&&(d.SupportSubDir=a.supportSubDir),a.type&&(d.Type=a.type),a.error&&(f.ErrorDocument={Key:a.error}),!(a.routingRules!==void 0)){x.next=12;break}if(t(a.routingRules)){x.next=11;break}throw new Error("RoutingRules must be Array");case 11:f.RoutingRules={RoutingRule:a.routingRules};case 12:return l=S(l),s.content=l,s.mime="xml",s.successStatuses=[200],x.next=18,g.default.awrap(this.request(s));case 18:return o=x.sent,x.abrupt("return",{res:o.res});case 20:case"end":return x.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isArray":42,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],14:[function(H,J,D){(function(k){"use strict";var g=H("babel-runtime/core-js/object/keys"),C=y(g),M=H("babel-runtime/core-js/json/stringify"),m=y(M);function y(S){return S&&S.__esModule?S:{default:S}}D.encodeCallback=function(_,t){if(_.headers=_.headers||{},!Object.prototype.hasOwnProperty.call(_.headers,"x-oss-callback")&&t.callback){var h={callbackUrl:encodeURI(t.callback.url),callbackBody:t.callback.body};t.callback.host&&(h.callbackHost=t.callback.host),t.callback.contentType&&(h.callbackBodyType=t.callback.contentType);var n=k.from((0,m.default)(h)).toString("base64");if(_.headers["x-oss-callback"]=n,t.callback.customValue){var c={};(0,C.default)(t.callback.customValue).forEach(function(a){c["x:"+a]=t.callback.customValue[a]}),_.headers["x-oss-callback-var"]=k.from((0,m.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,D){"use strict";var k=H("babel-runtime/core-js/object/assign"),g=C(k);function C(h){return h&&h.__esModule?h:{default:h}}var M=H("humanize-ms"),m=H("url"),y=H("../utils/checkBucketName"),S=y.checkBucketName;function _(h,n){var c=m.parse(h);if(c.protocol||(c=m.parse("http"+(n?"s":"")+"://"+h)),c.protocol!=="http:"&&c.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return c}function t(h,n,c){var a=c?"https://":"http://",i=n?"-internal.aliyuncs.com":".aliyuncs.com",s="vpc100-oss-cn-";return h.substr(0,s.length)===s&&(i=".aliyuncs.com"),m.parse(a+h+i)}J.exports=function(h){if(!h||!h.accessKeyId||!h.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");h.bucket&&S(h.bucket);var n=(0,g.default)({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1},h);if(n.accessKeyId=n.accessKeyId.trim(),n.accessKeySecret=n.accessKeySecret.trim(),n.timeout&&(n.timeout=M(n.timeout)),n.endpoint)n.endpoint=_(n.endpoint,n.secure);else if(n.region)n.endpoint=t(n.region,n.internal,n.secure);else throw new Error("require options.endpoint or options.region");return n.inited=!0,n}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/assign":54,"humanize-ms":194,url:238}],16:[function(H,J,D){"use strict";var k=H("merge-descriptors"),g=D;k(g,H("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(H,J,D){"use strict";var k=H("babel-runtime/regenerator"),g=C(k);function C(n){return n&&n.__esModule?n:{default:n}}var M=H("../utils/checkBucketName"),m=M.checkBucketName,y=H("querystring"),S=H("js-base64"),_=S.Base64.encode,t=D;t.processObjectSave=function(c,a,i,s){var d,f,l,o;return g.default.async(function(x){for(;;)switch(x.prev=x.next){case 0:return h(c,"sourceObject"),h(a,"targetObject"),h(i,"process"),a=this._objectName(a),s&&m(s),d=this._objectRequestParams("POST",c,{subres:"x-oss-process"}),f=s?",b_"+_(s):"",a=_(a),l={"x-oss-process":i+"|sys/saveas,o_"+a+f},d.content=y.stringify(l),x.next=12,g.default.awrap(this.request(d));case 12:return o=x.sent,x.abrupt("return",{res:o.res,status:o.res.status});case 14:case"end":return x.stop()}},null,this)};function h(n,c){if(!n)throw new Error(c+" is required");if(typeof n!="string")throw new Error(c+" must be String")}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(H,J,D){"use strict";var k=H("babel-runtime/regenerator"),g=C(k);function C(t){return t&&t.__esModule?t:{default:t}}var M=H("copy-to"),m=H("./callback"),y=H("./utils/deepCopy"),S=y.deepCopy,_=D;_.listUploads=function(h,n){var c,a,i,s;return g.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return n=n||{},c={},M(n).to(c),c.subres="uploads",a=this._objectRequestParams("GET","",c),a.query=h,a.xmlResponse=!0,a.successStatuses=[200],f.next=10,g.default.awrap(this.request(a));case 10:return i=f.sent,s=i.data.Upload||[],Array.isArray(s)||(s=[s]),s=s.map(function(l){return{name:l.Key,uploadId:l.UploadId,initiated:l.Initiated}}),f.abrupt("return",{res:i.res,uploads:s,bucket:i.data.Bucket,nextKeyMarker:i.data.NextKeyMarker,nextUploadIdMarker:i.data.NextUploadIdMarker,isTruncated:i.data.IsTruncated==="true"});case 15:case"end":return f.stop()}},null,this)},_.listParts=function(h,n,c,a){var i,s,d;return g.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:return a=a||{},i={},M(a).to(i),i.subres={uploadId:n},s=this._objectRequestParams("GET",h,i),s.query=c,s.xmlResponse=!0,s.successStatuses=[200],l.next=10,g.default.awrap(this.request(s));case 10:return d=l.sent,l.abrupt("return",{res:d.res,uploadId:d.data.UploadId,bucket:d.data.Bucket,name:d.data.Key,partNumberMarker:d.data.PartNumberMarker,nextPartNumberMarker:d.data.NextPartNumberMarker,maxParts:d.data.MaxParts,isTruncated:d.data.IsTruncated,parts:d.data.Part||[]});case 12:case"end":return l.stop()}},null,this)},_.abortMultipartUpload=function(h,n,c){var a,i,s;return g.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return this._stop(),c=c||{},a={},M(c).to(a),a.subres={uploadId:n},i=this._objectRequestParams("DELETE",h,a),i.successStatuses=[204],f.next=9,g.default.awrap(this.request(i));case 9:return s=f.sent,f.abrupt("return",{res:s.res});case 11:case"end":return f.stop()}},null,this)},_.initMultipartUpload=function(h,n){var c,a,i;return g.default.async(function(d){for(;;)switch(d.prev=d.next){case 0:return n=n||{},c={},M(n).to(c),c.headers=c.headers||{},this._convertMetaToHeaders(n.meta,c.headers),c.subres="uploads",a=this._objectRequestParams("POST",h,c),a.mime=n.mime,a.xmlResponse=!0,a.successStatuses=[200],d.next=12,g.default.awrap(this.request(a));case 12:return i=d.sent,d.abrupt("return",{res:i.res,bucket:i.data.Bucket,name:i.data.Key,uploadId:i.data.UploadId});case 14:case"end":return d.stop()}},null,this)},_.uploadPart=function(h,n,c,a,i,s,d){var f;return g.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return f={stream:this._createStream(a,i,s),size:s-i},o.next=3,g.default.awrap(this._uploadPart(h,n,c,f,d));case 3:return o.abrupt("return",o.sent);case 4:case"end":return o.stop()}},null,this)},_.completeMultipartUpload=function(h,n,c,a){var i,s,d,f,l,o,r,x;return g.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:for(i=c.concat().sort(function(R,O){return R.number-O.number}).filter(function(R,O,b){return!O||R.number!==b[O-1].number}),s=`<?xml version="1.0" encoding="UTF-8"?>
<CompleteMultipartUpload>
`,d=0;d<i.length;d++)f=i[d],s+=`<Part>
`,s+="<PartNumber>"+f.number+`</PartNumber>
`,s+="<ETag>"+f.etag+`</ETag>
`,s+=`</Part>
`;return s+="</CompleteMultipartUpload>",a=a||{},l={},l=S(a),l.headers&&delete l.headers["x-oss-server-side-encryption"],l.subres={uploadId:n},o=this._objectRequestParams("POST",h,l),m.encodeCallback(o,l),o.mime="xml",o.content=s,o.headers&&o.headers["x-oss-callback"]||(o.xmlResponse=!0),o.successStatuses=[200],p.next=17,g.default.awrap(this.request(o));case 17:return r=p.sent,x={res:r.res,bucket:o.bucket,name:h,etag:r.res.headers.etag},o.headers&&o.headers["x-oss-callback"]&&(x.data=JSON.parse(r.data.toString())),p.abrupt("return",x);case 21:case"end":return p.stop()}},null,this)},_._uploadPart=function(h,n,c,a,i){var s,d,f;return g.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return i=i||{},s={},M(i).to(s),s.headers={"Content-Length":a.size},s.subres={partNumber:c,uploadId:n},d=this._objectRequestParams("PUT",h,s),d.mime=s.mime,d.stream=a.stream,d.successStatuses=[200],o.next=11,g.default.awrap(this.request(d));case 11:if(f=o.sent,f.res.headers.etag){o.next=14;break}throw new Error(`Please set the etag of expose-headers in OSS
https://help.aliyun.com/document_detail/32069.html`);case 14:return a.stream=null,d.stream=null,o.abrupt("return",{name:h,etag:f.res.headers.etag,res:f.res});case 17:case"end":return o.stop()}},null,this)}},{"./callback":14,"./utils/deepCopy":39,"babel-runtime/regenerator":68,"copy-to":76}],19:[function(H,J,D){"use strict";var k=H("babel-runtime/regenerator"),g=S(k),C=H("babel-runtime/core-js/object/keys"),M=S(C),m=H("babel-runtime/helpers/typeof"),y=S(m);function S(n){return n&&n.__esModule?n:{default:n}}var _=H("../utils/checkBucketName"),t=_.checkBucketName,h=D;h.copy=function(c,a,i,s){var d,f,l;return g.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return(typeof i=="undefined"?"undefined":(0,y.default)(i))==="object"&&(s=i),s=s||{},s.headers=s.headers||{},(0,M.default)(s.headers).forEach(function(x){s.headers["x-oss-copy-source-"+x.toLowerCase()]=s.headers[x]}),s.meta&&(s.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(s.meta,s.headers),a=this._getSourceName(a,i),s.versionId&&(a=a+"?versionId="+s.versionId),s.headers["x-oss-copy-source"]=a,d=this._objectRequestParams("PUT",c,s),d.xmlResponse=!0,d.successStatuses=[200,304],r.next=14,g.default.awrap(this.request(d));case 14:return f=r.sent,l=f.data,l&&(l={etag:l.ETag,lastModified:l.LastModified}),r.abrupt("return",{data:l,res:f.res});case 18:case"end":return r.stop()}},null,this)},h._getSourceName=function(c,a){return typeof a=="string"?c=this._objectName(c):c[0]!=="/"?a=this.options.bucket:(a=c.replace(/\/(.+?)(\/.*)/,"$1"),c=c.replace(/(\/.+?\/)(.*)/,"$2")),t(a),c=encodeURI(c),c="/"+a+"/"+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,D){"use strict";var k=H("babel-runtime/regenerator"),g=m(k),C=H("babel-runtime/core-js/object/assign"),M=m(C);function m(S){return S&&S.__esModule?S:{default:S}}var y=D;y.delete=function(_){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h,n;return g.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return t.subres=(0,M.default)({},t.subres),t.versionId&&(t.subres.versionId=t.versionId),h=this._objectRequestParams("DELETE",_,t),h.successStatuses=[204],a.next=6,g.default.awrap(this.request(h));case 6:return n=a.sent,a.abrupt("return",{res:n.res});case 8:case"end":return a.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],21:[function(H,J,D){"use strict";var k=H("babel-runtime/regenerator"),g=m(k),C=H("babel-runtime/core-js/object/assign"),M=m(C);function m(h){return h&&h.__esModule?h:{default:h}}var y=H("utility"),S=H("../utils/obj2xml"),_=S.obj2xml,t=D;t.deleteMulti=function(n){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a,i,s,d,f,l,o,r,x,v,p,R;return g.default.async(function(b){for(;;)switch(b.prev=b.next){case 0:if(a=[],!(!n||!n.length)){b.next=3;break}throw new Error("names is required");case 3:for(i=0;i<n.length;i++)s={},typeof n[i]=="string"?s.Key=y.escape(this._objectName(n[i])):(d=n[i],f=d.key,l=d.versionId,s.Key=y.escape(this._objectName(f)),s.VersionId=l),a.push(s);return o={Delete:{Quiet:!!c.quiet,Object:a}},r=_(o,{headers:!0}),c.subres=(0,M.default)({delete:""},c.subres),c.versionId&&(c.subres.versionId=c.versionId),x=this._objectRequestParams("POST","",c),x.mime="xml",x.content=r,x.xmlResponse=!0,x.successStatuses=[200],b.next=15,g.default.awrap(this.request(x));case 15:return v=b.sent,p=v.data,R=p&&p.Deleted||null,R&&(Array.isArray(R)||(R=[R])),b.abrupt("return",{res:v.res,deleted:R||[]});case 20:case"end":return b.stop()}},null,this)}},{"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,utility:290}],22:[function(H,J,D){"use strict";var k=H("babel-runtime/regenerator"),g=m(k),C=H("babel-runtime/core-js/object/assign"),M=m(C);function m(S){return S&&S.__esModule?S:{default:S}}var y=D;y.deleteObjectTagging=function(_){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h,n;return g.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return t.subres=(0,M.default)({tagging:""},t.subres),t.versionId&&(t.subres.versionId=t.versionId),_=this._objectName(_),h=this._objectRequestParams("DELETE",_,t),h.successStatuses=[204],a.next=7,g.default.awrap(this.request(h));case 7:return n=a.sent,a.abrupt("return",{status:n.status,res:n.res});case 9:case"end":return a.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],23:[function(H,J,D){"use strict";var k=H("babel-runtime/regenerator"),g=m(k),C=H("babel-runtime/core-js/object/assign"),M=m(C);function m(t){return t&&t.__esModule?t:{default:t}}var y=H("fs"),S=H("is-type-of"),_=D;_.get=function(h,n){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,i,s,d;return g.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:return a=null,i=!1,S.writableStream(n)?a=n:S.string(n)?(a=y.createWriteStream(n),i=!0):c=n,c=c||{},c.subres=(0,M.default)({},c.subres),c.versionId&&(c.subres.versionId=c.versionId),c.process&&(c.subres["x-oss-process"]=c.process),s=void 0,l.prev=8,d=this._objectRequestParams("GET",h,c),d.writeStream=a,d.successStatuses=[200,206,304],l.next=14,g.default.awrap(this.request(d));case 14:s=l.sent,i&&a.destroy(),l.next=25;break;case 18:if(l.prev=18,l.t0=l.catch(8),!i){l.next=24;break}return a.destroy(),l.next=24,g.default.awrap(this._deleteFileSafe(n));case 24:throw l.t0;case 25:return l.abrupt("return",{res:s.res,content:s.data});case 26:case"end":return l.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,D){"use strict";var k=H("babel-runtime/regenerator"),g=m(k),C=H("babel-runtime/core-js/object/assign"),M=m(C);function m(S){return S&&S.__esModule?S:{default:S}}var y=D;y.getACL=function(_){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h,n;return g.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return t.subres=(0,M.default)({acl:""},t.subres),t.versionId&&(t.subres.versionId=t.versionId),_=this._objectName(_),h=this._objectRequestParams("GET",_,t),h.successStatuses=[200],h.xmlResponse=!0,a.next=8,g.default.awrap(this.request(h));case 8:return n=a.sent,a.abrupt("return",{acl:n.data.AccessControlList.Grant,owner:{id:n.data.Owner.ID,displayName:n.data.Owner.DisplayName},res:n.res});case 10:case"end":return a.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],25:[function(H,J,D){"use strict";var k=H("babel-runtime/core-js/object/keys"),g=S(k),C=H("babel-runtime/regenerator"),M=S(C),m=H("babel-runtime/core-js/object/assign"),y=S(m);function S(d){return d&&d.__esModule?d:{default:d}}var _=D,t=H("../utils/isObject"),h=t.isObject,n=H("../utils/isArray"),c=n.isArray;_.getBucketVersions=a,_.listObjectVersions=a;function a(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,o,r,x,v,p;return M.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:if(!(d.versionIdMarker&&d.keyMarker===void 0)){O.next=2;break}throw new Error("A version-id marker cannot be specified without a key marker");case 2:return f.subres=(0,y.default)({versions:""},f.subres),f.versionId&&(f.subres.versionId=f.versionId),l=this._objectRequestParams("GET","",f),l.xmlResponse=!0,l.successStatuses=[200],l.query=s(d),O.next=10,M.default.awrap(this.request(l));case 10:return o=O.sent,r=o.data.Version||[],x=o.data.DeleteMarker||[],v=this,r&&(Array.isArray(r)||(r=[r]),r=r.map(function(b){return{name:b.Key,url:v._objectUrl(b.Key),lastModified:b.LastModified,isLatest:b.IsLatest==="true",versionId:b.VersionId,etag:b.ETag,type:b.Type,size:Number(b.Size),storageClass:b.StorageClass,owner:{id:b.Owner.ID,displayName:b.Owner.DisplayName}}})),x&&(c(x)||(x=[x]),x=x.map(function(b){return{name:b.Key,lastModified:b.LastModified,versionId:b.VersionId,owner:{id:b.Owner.ID,displayName:b.Owner.DisplayName}}})),p=o.data.CommonPrefixes||null,p&&(c(p)||(p=[p]),p=p.map(function(b){return b.Prefix})),O.abrupt("return",{res:o.res,objects:r,deleteMarker:x,prefixes:p,nextMarker:o.data.NextMarker||null,NextVersionIdMarker:o.data.NextVersionIdMarker||null,isTruncated:o.data.IsTruncated==="true"});case 19:case"end":return O.stop()}},null,this)}function i(d){return d.replace(/([A-Z])/g,"-$1").toLowerCase()}function s(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f={};return h(d)&&(0,g.default)(d).forEach(function(l){f[i(l)]=d[l]}),f}},{"../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,D){"use strict";var k=H("babel-runtime/regenerator"),g=m(k),C=H("babel-runtime/core-js/object/assign"),M=m(C);function m(S){return S&&S.__esModule?S:{default:S}}var y=D;y.getObjectMeta=function(_,t){var h,n;return g.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return t=t||{},_=this._objectName(_),t.subres=(0,M.default)({objectMeta:""},t.subres),t.versionId&&(t.subres.versionId=t.versionId),h=this._objectRequestParams("HEAD",_,t),h.successStatuses=[200],a.next=8,g.default.awrap(this.request(h));case 8:return n=a.sent,a.abrupt("return",{status:n.status,res:n.res});case 10:case"end":return a.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],27:[function(H,J,D){"use strict";var k=H("babel-runtime/regenerator"),g=m(k),C=H("babel-runtime/core-js/object/assign"),M=m(C);function m(t){return t&&t.__esModule?t:{default:t}}var y=D,S=H("../utils/isObject"),_=S.isObject;y.getObjectTagging=function(h){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c,a,i,s,d;return g.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:return n.subres=(0,M.default)({tagging:""},n.subres),n.versionId&&(n.subres.versionId=n.versionId),h=this._objectName(h),c=this._objectRequestParams("GET",h,n),c.successStatuses=[200],l.next=7,g.default.awrap(this.request(c));case 7:return a=l.sent,l.next=10,g.default.awrap(this.parseXML(a.data));case 10:return i=l.sent,s=i.TagSet.Tag,s=s&&_(s)?[s]:s||[],d={},s.forEach(function(o){d[o.Key]=o.Value}),l.abrupt("return",{status:a.status,res:a.res,tag:d});case 16:case"end":return l.stop()}},null,this)}},{"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],28:[function(H,J,D){"use strict";var k=H("babel-runtime/regenerator"),g=m(k),C=H("babel-runtime/core-js/object/assign"),M=m(C);function m(S){return S&&S.__esModule?S:{default:S}}var y=D;y.getSymlink=function(_){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h,n,c;return g.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return t.subres=(0,M.default)({symlink:""},t.subres),t.versionId&&(t.subres.versionId=t.versionId),_=this._objectName(_),h=this._objectRequestParams("GET",_,t),h.successStatuses=[200],i.next=7,g.default.awrap(this.request(h));case 7:return n=i.sent,c=n.res.headers["x-oss-symlink-target"],i.abrupt("return",{targetName:decodeURIComponent(c),res:n.res});case 10:case"end":return i.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],29:[function(H,J,D){"use strict";var k=H("babel-runtime/regenerator"),g=S(k),C=H("babel-runtime/core-js/object/keys"),M=S(C),m=H("babel-runtime/core-js/object/assign"),y=S(m);function S(t){return t&&t.__esModule?t:{default:t}}var _=D;_.head=function(h){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c,a,i;return g.default.async(function(d){for(;;)switch(d.prev=d.next){case 0:return n.subres=(0,y.default)({},n.subres),n.versionId&&(n.subres.versionId=n.versionId),c=this._objectRequestParams("HEAD",h,n),c.successStatuses=[200,304],d.next=6,g.default.awrap(this.request(c));case 6:return a=d.sent,i={meta:null,res:a.res,status:a.status},a.status===200&&(0,M.default)(a.headers).forEach(function(f){f.indexOf("x-oss-meta-")===0&&(i.meta||(i.meta={}),i.meta[f.substring(11)]=a.headers[f])}),d.abrupt("return",i);case 10:case"end":return d.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,D){"use strict";var k=H("babel-runtime/regenerator"),g=m(k),C=H("babel-runtime/core-js/object/assign"),M=m(C);function m(S){return S&&S.__esModule?S:{default:S}}var y=D;y.putACL=function(_,t,h){var n,c;return g.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return h=h||{},h.subres=(0,M.default)({acl:""},h.subres),h.versionId&&(h.subres.versionId=h.versionId),h.headers=h.headers||{},h.headers["x-oss-object-acl"]=t,_=this._objectName(_),n=this._objectRequestParams("PUT",_,h),n.successStatuses=[200],i.next=10,g.default.awrap(this.request(n));case 10:return c=i.sent,i.abrupt("return",{res:c.res});case 12:case"end":return i.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],31:[function(H,J,D){"use strict";var k=H("babel-runtime/regenerator"),g=S(k),C=H("babel-runtime/core-js/object/keys"),M=S(C),m=H("babel-runtime/core-js/object/assign"),y=S(m);function S(a){return a&&a.__esModule?a:{default:a}}var _=H("../utils/obj2xml"),t=_.obj2xml,h=H("../utils/checkObjectTag"),n=h.checkObjectTag,c=D;c.putObjectTagging=function(i,s){var d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},f,l,o;return g.default.async(function(x){for(;;)switch(x.prev=x.next){case 0:return n(s),d.subres=(0,y.default)({tagging:""},d.subres),d.versionId&&(d.subres.versionId=d.versionId),i=this._objectName(i),f=this._objectRequestParams("PUT",i,d),f.successStatuses=[200],s=(0,M.default)(s).map(function(v){return{Key:v,Value:s[v]}}),l={Tagging:{TagSet:{Tag:s}}},f.mime="xml",f.content=t(l),x.next=12,g.default.awrap(this.request(f));case 12:return o=x.sent,x.abrupt("return",{res:o.res,status:o.status});case 14:case"end":return x.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,D){"use strict";var k=H("babel-runtime/regenerator"),g=m(k),C=H("babel-runtime/core-js/object/assign"),M=m(C);function m(S){return S&&S.__esModule?S:{default:S}}var y=D;y.putSymlink=function(_,t,h){var n,c;return g.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return h=h||{},h.headers=h.headers||{},t=this._escape(this._objectName(t)),this._convertMetaToHeaders(h.meta,h.headers),h.headers["x-oss-symlink-target"]=t,h.subres=(0,M.default)({symlink:""},h.subres),h.versionId&&(h.subres.versionId=h.versionId),h.storageClass&&(h.headers["x-oss-storage-class"]=h.storageClass),_=this._objectName(_),n=this._objectRequestParams("PUT",_,h),n.successStatuses=[200],i.next=13,g.default.awrap(this.request(n));case 13:return c=i.sent,i.abrupt("return",{res:c.res});case 15:case"end":return i.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],33:[function(H,J,D){"use strict";var k=H("babel-runtime/regenerator"),g=m(k),C=H("babel-runtime/core-js/promise"),M=m(C);function m(S){return S&&S.__esModule?S:{default:S}}var y=D;y._parallelNode=function(_,t,h,n){var c,a,i,s,d,f,l,o;return g.default.async(function(x){for(;;)switch(x.prev=x.next){case 0:c=this,a=[],i=[],s=_.length/t,d=_.length%t,f=d===0?s:(_.length-d)/t+1,l=1,o=0;case 8:if(!(o<_.length)){x.next=26;break}if(!c.isCancel()){x.next=11;break}return x.abrupt("break",26);case 11:if(n?i.push(h(c,_[o],n)):i.push(h(c,_[o])),!(i.length===t||l===f&&o===_.length-1)){x.next=23;break}return x.prev=13,l+=1,x.next=17,g.default.awrap(M.default.all(i));case 17:x.next=22;break;case 19:x.prev=19,x.t0=x.catch(13),a.push(x.t0);case 22:i=[];case 23:o++,x.next=8;break;case 26:return x.abrupt("return",a);case 27:case"end":return x.stop()}},null,this,[[13,19]])},y._parallel=function(_,t,h){var n=this;return new M.default(function(c){var a=[];if(t<=0||!_){c(a);return}function i(p){return function(){if(p===null)throw new Error("Callback was already called.");var R=p;p=null;for(var O=arguments.length,b=Array(O),E=0;E<O;E++)b[E]=arguments[E];R.apply(this,b)}}function s(p){var R=-1,O=p.length;return function(){return++R<O&&!n.isCancel()?{value:p[R],key:R}:null}}var d=s(_),f=!1,l=0,o=!1;function r(p,R){l-=1,p?(f=!0,a.push(p),c(a)):R==={}||f&&l<=0?(f=!0,c(a)):o||(n.isCancel()?c(a):v())}function x(p,R){h(p).then(function(O){R(null,O)}).catch(function(O){R(O)})}function v(){for(o=!0;l<t&&!f&&!n.isCancel();){var p=d();if(p===null||a.length>0){f=!0,l<=0&&c(a);return}l+=1,x(p.value,i(r))}o=!1}v()})},y.cancel=function(_){this.options.cancelFlag=!0,_&&this.abortMultipartUpload(_.name,_.uploadId,_.options)},y.isCancel=function(){return this.options.cancelFlag},y.resetCancelFlag=function(){this.options.cancelFlag=!1},y._stop=function(){this.options.cancelFlag=!0},y._makeCancelEvent=function(){var _={status:0,name:"cancel"};return _}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(H,J,D){(function(k){"use strict";var g=H("babel-runtime/core-js/json/stringify"),C=y(g),M=H("babel-runtime/core-js/object/keys"),m=y(M);function y(t){return t&&t.__esModule?t:{default:t}}var S=H("./../../shims/crypto/crypto.js"),_=H("is-type-of");D.buildCanonicalizedResource=function(h,n){var c=""+h,a="?";if(_.string(n)&&n.trim()!=="")c+=a+n;else if(_.array(n))n.sort(),c+=a+n.join("&");else if(n){var i=function(f,l){return f[0]>l[0]?1:f[0]<l[0]?-1:0},s=function(f){c+=a+f,n[f]&&(c+="="+n[f]),a="&"};(0,m.default)(n).sort(i).forEach(s)}return c},D.buildCanonicalString=function(h,n,c,a){c=c||{};var i=c.headers||{},s="x-oss-",d=[],f={},l=[h.toUpperCase(),i["Content-Md5"]||"",i["Content-Type"]||i["Content-Type".toLowerCase()],a||i["x-oss-date"]];return(0,m.default)(i).forEach(function(o){var r=o.toLowerCase();r.indexOf(s)===0&&(f[r]=String(i[o]).trim())}),(0,m.default)(f).sort().forEach(function(o){d.push(o+":"+f[o])}),l=l.concat(d),l.push(this.buildCanonicalizedResource(n,c.parameters)),l.join(`
`)},D.computeSignature=function(h,n){var c=S.createHmac("sha1",h);return c.update(k.from(n,"utf8")).digest("base64")},D.authorization=function(h,n,c){return"OSS "+h+":"+this.computeSignature(n,c)},D._signatureForURL=function(h){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=arguments[2],a=arguments[3],i={},s=n.subResource,d=s===void 0?{}:s;if(n.process){var f="x-oss-process";d[f]=n.process}if(n.trafficLimit){var l="x-oss-traffic-limit";d[l]=n.trafficLimit}if(n.response&&(0,m.default)(n.response).forEach(function(v){var p="response-"+v.toLowerCase();d[p]=n.response[v]}),(0,m.default)(n).forEach(function(v){var p=v.toLowerCase(),R=n[v];p.indexOf("x-oss-")===0?i[p]=R:(p.indexOf("content-md5")===0||p.indexOf("content-type")===0)&&(i[v]=R)}),Object.prototype.hasOwnProperty.call(n,"security-token")&&(d["security-token"]=n["security-token"]),Object.prototype.hasOwnProperty.call(n,"callback")){var o={callbackUrl:encodeURI(n.callback.url),callbackBody:n.callback.body};if(n.callback.host&&(o.callbackHost=n.callback.host),n.callback.contentType&&(o.callbackBodyType=n.callback.contentType),d.callback=k.from((0,C.default)(o)).toString("base64"),n.callback.customValue){var r={};(0,m.default)(n.callback.customValue).forEach(function(v){r["x:"+v]=n.callback.customValue[v]}),d["callback-var"]=k.from((0,C.default)(r)).toString("base64")}}var x=this.buildCanonicalString(n.method,c,{headers:i,parameters:d},a.toString());return{Signature:this.computeSignature(h,x),subResource:d}}}).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,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.checkBucketName=void 0,D.checkBucketName=function(k,g){var C=g?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!C.test(k))throw new Error("The bucket must be conform to the specifications")}},{}],36:[function(H,J,D){"use strict";var k=H("babel-runtime/core-js/object/entries"),g=C(k);function C(n){return n&&n.__esModule?n:{default:n}}Object.defineProperty(D,"__esModule",{value:!0}),D.checkObjectTag=void 0;var M=H("./checkValid"),m=M.checkValid,y=H("./isObject"),S=y.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 (/)"}],t={key:[].concat(_,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(_,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function h(n){if(!S(n))throw new Error("tag must be Object");var c=(0,g.default)(n);if(c.length>10)throw new Error("maximum of 10 tags for a object");var a=["key","value"];c.forEach(function(i){i.forEach(function(s,d){m(s,t[a[d]])})})}D.checkObjectTag=h},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(H,J,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.checkValid=void 0;function k(g,C){C.forEach(function(M){if(M.validator)M.validator(g);else if(M.pattern&&!M.pattern.test(g))throw new Error(M.msg)})}D.checkValid=k},{}],38:[function(H,J,D){(function(k){"use strict";var g=H("babel-runtime/core-js/object/assign"),C=M(g);function M(i){return i&&i.__esModule?i:{default:i}}Object.defineProperty(D,"__esModule",{value:!0}),D.createRequest=void 0;var m=H("./../../../shims/crypto/crypto.js"),y=H("debug")("ali-oss"),S=H("mime"),_=H("dateformat"),t=H("copy-to"),h=H("path");function n(i,s){return i[s]||i[s.toLowerCase()]}function c(i,s){delete i[s],delete i[s.toLowerCase()]}function a(i){var s=new Date;this.options.amendTimeSkewed&&(s=+new Date+this.options.amendTimeSkewed);var d={"x-oss-date":_(s,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(d["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,C.default)(d,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(d["x-oss-security-token"]=this.options.stsToken),t(i.headers).to(d),n(d,"Content-Type")||(i.mime&&i.mime.indexOf("/")>0?d["Content-Type"]=i.mime:d["Content-Type"]=S.getType(i.mime||h.extname(i.object||""))),n(d,"Content-Type")||c(d,"Content-Type"),i.content&&(d["Content-Md5"]=m.createHash("md5").update(k.from(i.content,"utf8")).digest("base64"),d["Content-Length"]||(d["Content-Length"]=i.content.length));var f=this._getResource(i);d.authorization=this.authorization(i.method,f,i.subres,d);var l=this._getReqUrl(i);y("request %s %s, with headers %j, !!stream: %s",i.method,l,d,!!i.stream);var o=i.timeout||this.options.timeout,r={method:i.method,content:i.content,stream:i.stream,headers:d,timeout:o,writeStream:i.writeStream,customResponse:i.customResponse,ctx:i.ctx||this.ctx};return this.agent&&(r.agent=this.agent),this.httpsAgent&&(r.httpsAgent=this.httpsAgent),{url:l,params:r}}D.createRequest=a}).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,D){"use strict";var k=H("babel-runtime/core-js/object/keys"),g=m(k),C=H("babel-runtime/helpers/typeof"),M=m(C);function m(y){return y&&y.__esModule?y:{default:y}}Object.defineProperty(D,"__esModule",{value:!0}),D.deepCopy=void 0,D.deepCopy=function(y){if(y===null||(typeof y=="undefined"?"undefined":(0,M.default)(y))!=="object")return y;var S=Array.isArray(y)?[]:{};return(0,g.default)(y).forEach(function(_){S[_]=D.deepCopy(y[_])}),S}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(H,J,D){"use strict";var k=H("babel-runtime/core-js/object/keys"),g=m(k),C=H("babel-runtime/helpers/typeof"),M=m(C);function m(_){return _&&_.__esModule?_:{default:_}}Object.defineProperty(D,"__esModule",{value:!0}),D.formatObjKey=void 0;function y(_,t){if(_===null||(typeof _=="undefined"?"undefined":(0,M.default)(_))!=="object")return _;var h=void 0;if(Array.isArray(_)){h=[];for(var n=0;n<_.length;n++)h.push(y(_[n],t))}else h={},(0,g.default)(_).forEach(function(c){h[S(c,t)]=y(_[c],t)});return h}D.formatObjKey=y;function S(_,t){return t==="firstUpperCase"?_=_.replace(/^./,function(h){return h.toUpperCase()}):t==="firstLowerCase"&&(_=_.replace(/^./,function(h){return h.toLowerCase()})),_}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],41:[function(H,J,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.getStrBytesCount=void 0;function k(g){for(var C=0,M=0;M<g.length;M++){var m=g.charAt(M);/^[\u00-\uff]$/.test(m)?C+=1:C+=2}return C}D.getStrBytesCount=k},{}],42:[function(H,J,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.isArray=void 0,D.isArray=function(k){return Object.prototype.toString.call(k)==="[object Array]"}},{}],43:[function(H,J,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.isBlob=void 0;function k(g){return typeof Blob!="undefined"&&g instanceof Blob}D.isBlob=k},{}],44:[function(H,J,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.isFile=void 0,D.isFile=function(k){return typeof File!="undefined"&&k instanceof File}},{}],45:[function(H,J,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.isIP=void 0,D.isIP=function(k){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}$/,C=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;return g.test(k)||C.test(k)}},{}],46:[function(H,J,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.isObject=void 0,D.isObject=function(k){return Object.prototype.toString.call(k)==="[object Object]"}},{}],47:[function(H,J,D){"use strict";var k=H("babel-runtime/core-js/object/keys"),g=C(k);function C(S){return S&&S.__esModule?S:{default:S}}Object.defineProperty(D,"__esModule",{value:!0}),D.obj2xml=void 0;var M=H("./formatObjKey");function m(S){return Object.prototype.toString.call(S).replace(/(.*? |])/g,"").toLowerCase()}function y(S,_){var t="";return _&&_.headers&&(t=`<?xml version="1.0" encoding="UTF-8"?>
`),_&&_.firstUpperCase&&(S=M.formatObjKey(S,"firstUpperCase")),m(S)==="object"?(0,g.default)(S).forEach(function(h){m(S[h])==="string"||m(S[h])==="number"?t+="<"+h+">"+S[h]+"</"+h+">":m(S[h])==="object"?t+="<"+h+">"+y(S[h])+"</"+h+">":m(S[h])==="array"?t+=S[h].map(function(n){return"<"+h+">"+y(n)+"</"+h+">"}).join(""):t+="<"+h+">"+S[h].toString()+"</"+h+">"}):t+=S.toString(),t}D.obj2xml=y},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(H,J,D){J.exports=k,J.exports.HttpsAgent=k;function k(){}},{}],49:[function(H,J,D){J.exports=H("./register")().Promise},{"./register":51}],50:[function(H,J,D){"use strict";var k="@@any-promise/REGISTRATION",g=null;J.exports=function(C,M){return function(y,S){y=y||null,S=S||{};var _=S.global!==!1;if(g===null&&_&&(g=C[k]||null),g!==null&&y!==null&&g.implementation!==y)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&&(y!==null&&typeof S.Promise!="undefined"?g={Promise:S.Promise,implementation:y}:g=M(y),_&&(C[k]=g)),g}}},{}],51:[function(H,J,D){"use strict";J.exports=H("./loader")(window,k);function k(){if(typeof window.Promise=="undefined")throw new Error("any-promise browser requires a polyfill or explicit registration e.g: require('any-promise/register/bluebird')");return{Promise:window.Promise,implementation:"window.Promise"}}},{"./loader":50}],52:[function(H,J,D){J.exports={default:H("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(H,J,D){J.exports={default:H("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(H,J,D){J.exports={default:H("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(H,J,D){J.exports={default:H("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(H,J,D){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,D){J.exports={default:H("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(H,J,D){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,D){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,D){J.exports={default:H("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(H,J,D){J.exports={default:H("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(H,J,D){J.exports={default:H("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(H,J,D){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,D){J.exports={default:H("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(H,J,D){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,D){J.exports={default:H("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(H,J,D){"use strict";D.__esModule=!0;var k=H("../core-js/symbol/iterator"),g=y(k),C=H("../core-js/symbol"),M=y(C),m=typeof M.default=="function"&&typeof g.default=="symbol"?function(S){return typeof S}:function(S){return S&&typeof M.default=="function"&&S.constructor===M.default&&S!==M.default.prototype?"symbol":typeof S};function y(S){return S&&S.__esModule?S:{default:S}}D.default=typeof M.default=="function"&&m(g.default)==="symbol"?function(S){return typeof S=="undefined"?"undefined":m(S)}:function(S){return S&&typeof M.default=="function"&&S.constructor===M.default&&S!==M.default.prototype?"symbol":typeof S=="undefined"?"undefined":m(S)}},{"../core-js/symbol":64,"../core-js/symbol/iterator":66}],68:[function(H,J,D){J.exports=H("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(H,J,D){"use strict";D.byteLength=_,D.toByteArray=h,D.fromByteArray=a;for(var k=[],g=[],C=typeof Uint8Array!="undefined"?Uint8Array:Array,M="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",m=0,y=M.length;m<y;++m)k[m]=M[m],g[M.charCodeAt(m)]=m;g["-".charCodeAt(0)]=62,g["_".charCodeAt(0)]=63;function S(i){var s=i.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var d=i.indexOf("=");d===-1&&(d=s);var f=d===s?0:4-d%4;return[d,f]}function _(i){var s=S(i),d=s[0],f=s[1];return(d+f)*3/4-f}function t(i,s,d){return(s+d)*3/4-d}function h(i){var s,d=S(i),f=d[0],l=d[1],o=new C(t(i,f,l)),r=0,x=l>0?f-4:f,v;for(v=0;v<x;v+=4)s=g[i.charCodeAt(v)]<<18|g[i.charCodeAt(v+1)]<<12|g[i.charCodeAt(v+2)]<<6|g[i.charCodeAt(v+3)],o[r++]=s>>16&255,o[r++]=s>>8&255,o[r++]=s&255;return l===2&&(s=g[i.charCodeAt(v)]<<2|g[i.charCodeAt(v+1)]>>4,o[r++]=s&255),l===1&&(s=g[i.charCodeAt(v)]<<10|g[i.charCodeAt(v+1)]<<4|g[i.charCodeAt(v+2)]>>2,o[r++]=s>>8&255,o[r++]=s&255),o}function n(i){return k[i>>18&63]+k[i>>12&63]+k[i>>6&63]+k[i&63]}function c(i,s,d){for(var f,l=[],o=s;o<d;o+=3)f=(i[o]<<16&16711680)+(i[o+1]<<8&65280)+(i[o+2]&255),l.push(n(f));return l.join("")}function a(i){for(var s,d=i.length,f=d%3,l=[],o=16383,r=0,x=d-f;r<x;r+=o)l.push(c(i,r,r+o>x?x:r+o));return f===1?(s=i[d-1],l.push(k[s>>2]+k[s<<4&63]+"==")):f===2&&(s=(i[d-2]<<8)+i[d-1],l.push(k[s>>10]+k[s>>4&63]+k[s<<2&63]+"=")),l.join("")}},{}],70:[function(H,J,D){/*!
* Bowser - a browser detector
* https://github.com/ded/bowser
* MIT License | (c) Dustin Diaz 2015
*/!function(k,g,C){typeof J!="undefined"&&J.exports?J.exports=C():typeof define=="function"&&define.amd?define(g,C):k[g]=C()}(this,"bowser",function(){var k=!0;function g(t){function h(B){var U=t.match(B);return U&&U.length>1&&U[1]||""}function n(B){var U=t.match(B);return U&&U.length>1&&U[2]||""}var c=h(/(ipod|iphone|ipad)/i).toLowerCase(),a=/like android/i.test(t),i=!a&&/android/i.test(t),s=/nexus\s*[0-6]\s*/i.test(t),d=!s&&/nexus\s*[0-9]+/i.test(t),f=/CrOS/.test(t),l=/silk/i.test(t),o=/sailfish/i.test(t),r=/tizen/i.test(t),x=/(web|hpw)(o|0)s/i.test(t),v=/windows phone/i.test(t),p=/SamsungBrowser/i.test(t),R=!v&&/windows/i.test(t),O=!c&&!l&&/macintosh/i.test(t),b=!i&&!o&&!r&&!x&&/linux/i.test(t),E=n(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),w=h(/version\/(\d+(\.\d+)?)/i),T=/tablet/i.test(t)&&!/tablet pc/i.test(t),F=!T&&/[^-]mobi/i.test(t),N=/xbox/i.test(t),L;/opera/i.test(t)?L={name:"Opera",opera:k,version:w||h(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(t)?L={name:"Opera",opera:k,version:h(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||w}:/SamsungBrowser/i.test(t)?L={name:"Samsung Internet for Android",samsungBrowser:k,version:w||h(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(t)?L={name:"NAVER Whale browser",whale:k,version:h(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(t)?L={name:"MZ Browser",mzbrowser:k,version:h(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(t)?L={name:"Opera Coast",coast:k,version:w||h(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(t)?L={name:"Focus",focus:k,version:h(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(t)?L={name:"Yandex Browser",yandexbrowser:k,version:w||h(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(t)?L={name:"UC Browser",ucbrowser:k,version:h(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(t)?L={name:"Maxthon",maxthon:k,version:h(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(t)?L={name:"Epiphany",epiphany:k,version:h(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(t)?L={name:"Puffin",puffin:k,version:h(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(t)?L={name:"Sleipnir",sleipnir:k,version:h(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(t)?L={name:"K-Meleon",kMeleon:k,version:h(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:v?(L={name:"Windows Phone",osname:"Windows Phone",windowsphone:k},E?(L.msedge=k,L.version=E):(L.msie=k,L.version=h(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(t)?L={name:"Internet Explorer",msie:k,version:h(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:f?L={name:"Chrome",osname:"Chrome OS",chromeos:k,chromeBook:k,chrome:k,version:h(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(t)?L={name:"Microsoft Edge",msedge:k,version:E}:/vivaldi/i.test(t)?L={name:"Vivaldi",vivaldi:k,version:h(/vivaldi\/(\d+(\.\d+)?)/i)||w}:o?L={name:"Sailfish",osname:"Sailfish OS",sailfish:k,version:h(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(t)?L={name:"SeaMonkey",seamonkey:k,version:h(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(t)?(L={name:"Firefox",firefox:k,version:h(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(t)&&(L.firefoxos=k,L.osname="Firefox OS")):l?L={name:"Amazon Silk",silk:k,version:h(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(t)?L={name:"PhantomJS",phantom:k,version:h(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(t)?L={name:"SlimerJS",slimer:k,version:h(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(t)||/rim\stablet/i.test(t)?L={name:"BlackBerry",osname:"BlackBerry OS",blackberry:k,version:w||h(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:x?(L={name:"WebOS",osname:"WebOS",webos:k,version:w||h(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(t)&&(L.touchpad=k)):/bada/i.test(t)?L={name:"Bada",osname:"Bada",bada:k,version:h(/dolfin\/(\d+(\.\d+)?)/i)}:r?L={name:"Tizen",osname:"Tizen",tizen:k,version:h(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||w}:/qupzilla/i.test(t)?L={name:"QupZilla",qupzilla:k,version:h(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||w}:/chromium/i.test(t)?L={name:"Chromium",chromium:k,version:h(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||w}:/chrome|crios|crmo/i.test(t)?L={name:"Chrome",chrome:k,version:h(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:i?L={name:"Android",version:w}:/safari|applewebkit/i.test(t)?(L={name:"Safari",safari:k},w&&(L.version=w)):c?(L={name:c=="iphone"?"iPhone":c=="ipad"?"iPad":"iPod"},w&&(L.version=w)):/googlebot/i.test(t)?L={name:"Googlebot",googlebot:k,version:h(/googlebot\/(\d+(\.\d+))/i)||w}:L={name:h(/^(.*)\/(.*) /),version:n(/^(.*)\/(.*) /)},!L.msedge&&/(apple)?webkit/i.test(t)?(/(apple)?webkit\/537\.36/i.test(t)?(L.name=L.name||"Blink",L.blink=k):(L.name=L.name||"Webkit",L.webkit=k),!L.version&&w&&(L.version=w)):!L.opera&&/gecko\//i.test(t)&&(L.name=L.name||"Gecko",L.gecko=k,L.version=L.version||h(/gecko\/(\d+(\.\d+)?)/i)),!L.windowsphone&&(i||L.silk)?(L.android=k,L.osname="Android"):!L.windowsphone&&c?(L[c]=k,L.ios=k,L.osname="iOS"):O?(L.mac=k,L.osname="macOS"):N?(L.xbox=k,L.osname="Xbox"):R?(L.windows=k,L.osname="Windows"):b&&(L.linux=k,L.osname="Linux");function G(B){switch(B){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}var z="";L.windows?z=G(h(/Windows ((NT|XP)( \d\d?.\d)?)/i)):L.windowsphone?z=h(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):L.mac?(z=h(/Mac OS X (\d+([_\.\s]\d+)*)/i),z=z.replace(/[_\s]/g,".")):c?(z=h(/os (\d+([_\s]\d+)*) like mac os x/i),z=z.replace(/[_\s]/g,".")):i?z=h(/android[ \/-](\d+(\.\d+)*)/i):L.webos?z=h(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):L.blackberry?z=h(/rim\stablet\sos\s(\d+(\.\d+)*)/i):L.bada?z=h(/bada\/(\d+(\.\d+)*)/i):L.tizen&&(z=h(/tizen[\/\s](\d+(\.\d+)*)/i)),z&&(L.osversion=z);var A=!L.windows&&z.split(".")[0];return T||d||c=="ipad"||i&&(A==3||A>=4&&!F)||L.silk?L.tablet=k:(F||c=="iphone"||c=="ipod"||i||s||L.blackberry||L.webos||L.bada)&&(L.mobile=k),L.msedge||L.msie&&L.version>=10||L.yandexbrowser&&L.version>=15||L.vivaldi&&L.version>=1||L.chrome&&L.version>=20||L.samsungBrowser&&L.version>=4||L.whale&&y([L.version,"1.0"])===1||L.mzbrowser&&y([L.version,"6.0"])===1||L.focus&&y([L.version,"1.0"])===1||L.firefox&&L.version>=20||L.safari&&L.version>=6||L.opera&&L.version>=10||L.ios&&L.osversion&&L.osversion.split(".")[0]>=6||L.blackberry&&L.version>=10.1||L.chromium&&L.version>=20?L.a=k:L.msie&&L.version<10||L.chrome&&L.version<20||L.firefox&&L.version<20||L.safari&&L.version<6||L.opera&&L.version<10||L.ios&&L.osversion&&L.osversion.split(".")[0]<6||L.chromium&&L.version<20?L.c=k:L.x=k,L}var C=g(typeof navigator!="undefined"&&navigator.userAgent||"");C.test=function(t){for(var h=0;h<t.length;++h){var n=t[h];if(typeof n=="string"&&n in C)return!0}return!1};function M(t){return t.split(".").length}function m(t,h){var n=[],c;if(Array.prototype.map)return Array.prototype.map.call(t,h);for(c=0;c<t.length;c++)n.push(h(t[c]));return n}function y(t){for(var h=Math.max(M(t[0]),M(t[1])),n=m(t,function(c){var a=h-M(c);return c=c+new Array(a+1).join(".0"),m(c.split("."),function(i){return new Array(20-i.length).join("0")+i}).reverse()});--h>=0;){if(n[0][h]>n[1][h])return 1;if(n[0][h]===n[1][h]){if(h===0)return 0}else return-1}}function S(t,h,n){var c=C;typeof h=="string"&&(n=h,h=void 0),h===void 0&&(h=!1),n&&(c=g(n));var a=""+c.version;for(var i in t)if(t.hasOwnProperty(i)&&c[i]){if(typeof t[i]!="string")throw new Error("Browser version in the minVersion map should be a string: "+i+": "+String(t));return y([a,t[i]])<0}return h}function _(t,h,n){return!S(t,h,n)}return C.isUnsupportedBrowser=S,C.compareVersions=y,C.check=_,C._detect=g,C.detect=g,C})},{}],71:[function(H,J,D){},{}],72:[function(H,J,D){var k=H("buffer").Buffer,g=k.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 C(_){if(_&&!g(_))throw new Error("Unknown encoding: "+_)}var M=D.StringDecoder=function(_){this.encoding=(_||"utf8").toLowerCase().replace(/[-_]/,""),C(_);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=y;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=S;break;default:this.write=m;return}this.charBuffer=new k(6),this.charReceived=0,this.charLength=0};M.prototype.write=function(_){for(var t="";this.charLength;){var h=_.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:_.length;if(_.copy(this.charBuffer,this.charReceived,0,h),this.charReceived+=h,this.charReceived<this.charLength)return"";_=_.slice(h,_.length),t=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var c=t.charCodeAt(t.length-1);if(c>=55296&&c<=56319){this.charLength+=this.surrogateSize,t="";continue}if(this.charReceived=this.charLength=0,_.length===0)return t;break}this.detectIncompleteChar(_);var n=_.length;this.charLength&&(_.copy(this.charBuffer,0,_.length-this.charReceived,n),n-=this.charReceived),t+=_.toString(this.encoding,0,n);var n=t.length-1,c=t.charCodeAt(n);if(c>=55296&&c<=56319){var a=this.surrogateSize;return this.charLength+=a,this.charReceived+=a,this.charBuffer.copy(this.charBuffer,a,0,a),_.copy(this.charBuffer,0,0,a),t.substring(0,n)}return t},M.prototype.detectIncompleteChar=function(_){for(var t=_.length>=3?3:_.length;t>0;t--){var h=_[_.length-t];if(t==1&&h>>5==6){this.charLength=2;break}if(t<=2&&h>>4==14){this.charLength=3;break}if(t<=3&&h>>3==30){this.charLength=4;break}}this.charReceived=t},M.prototype.end=function(_){var t="";if(_&&_.length&&(t=this.write(_)),this.charReceived){var h=this.charReceived,n=this.charBuffer,c=this.encoding;t+=n.slice(0,h).toString(c)}return t};function m(_){return _.toString(this.encoding)}function y(_){this.charReceived=_.length%2,this.charLength=this.charReceived?2:0}function S(_){this.charReceived=_.length%3,this.charLength=this.charReceived?3:0}},{buffer:73}],73:[function(H,J,D){(function(k,g){/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/"use strict";var C=H("base64-js"),M=H("ieee754"),m=H("isarray");D.Buffer=g,D.SlowBuffer=l,D.INSPECT_MAX_BYTES=50,g.TYPED_ARRAY_SUPPORT=k.TYPED_ARRAY_SUPPORT!==void 0?k.TYPED_ARRAY_SUPPORT:y(),D.kMaxLength=S();function y(){try{var ie=new Uint8Array(1);return ie.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},ie.foo()===42&&typeof ie.subarray=="function"&&ie.subarray(1,1).byteLength===0}catch(q){return!1}}function S(){return g.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function _(ie,q){if(S()<q)throw new RangeError("Invalid typed array length");return g.TYPED_ARRAY_SUPPORT?(ie=new Uint8Array(q),ie.__proto__=g.prototype):(ie===null&&(ie=new g(q)),ie.length=q),ie}function g(ie,q,Y){if(!g.TYPED_ARRAY_SUPPORT&&!(this instanceof g))return new g(ie,q,Y);if(typeof ie=="number"){if(typeof q=="string")throw new Error("If encoding is specified then the first argument must be a string");return c(this,ie)}return t(this,ie,q,Y)}g.poolSize=8192,g._augment=function(ie){return ie.__proto__=g.prototype,ie};function t(ie,q,Y,X){if(typeof q=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&q instanceof ArrayBuffer?s(ie,q,Y,X):typeof q=="string"?a(ie,q,Y):d(ie,q)}g.from=function(ie,q,Y){return t(null,ie,q,Y)},g.TYPED_ARRAY_SUPPORT&&(g.prototype.__proto__=Uint8Array.prototype,g.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&g[Symbol.species]===g&&Object.defineProperty(g,Symbol.species,{value:null,configurable:!0}));function h(ie){if(typeof ie!="number")throw new TypeError('"size" argument must be a number');if(ie<0)throw new RangeError('"size" argument must not be negative')}function n(ie,q,Y,X){return h(q),q<=0?_(ie,q):Y!==void 0?typeof X=="string"?_(ie,q).fill(Y,X):_(ie,q).fill(Y):_(ie,q)}g.alloc=function(ie,q,Y){return n(null,ie,q,Y)};function c(ie,q){if(h(q),ie=_(ie,q<0?0:f(q)|0),!g.TYPED_ARRAY_SUPPORT)for(var Y=0;Y<q;++Y)ie[Y]=0;return ie}g.allocUnsafe=function(ie){return c(null,ie)},g.allocUnsafeSlow=function(ie){return c(null,ie)};function a(ie,q,Y){if((typeof Y!="string"||Y==="")&&(Y="utf8"),!g.isEncoding(Y))throw new TypeError('"encoding" must be a valid string encoding');var X=o(q,Y)|0;ie=_(ie,X);var he=ie.write(q,Y);return he!==X&&(ie=ie.slice(0,he)),ie}function i(ie,q){var Y=q.length<0?0:f(q.length)|0;ie=_(ie,Y);for(var X=0;X<Y;X+=1)ie[X]=q[X]&255;return ie}function s(ie,q,Y,X){if(q.byteLength,Y<0||q.byteLength<Y)throw new RangeError("'offset' is out of bounds");if(q.byteLength<Y+(X||0))throw new RangeError("'length' is out of bounds");return Y===void 0&&X===void 0?q=new Uint8Array(q):X===void 0?q=new Uint8Array(q,Y):q=new Uint8Array(q,Y,X),g.TYPED_ARRAY_SUPPORT?(ie=q,ie.__proto__=g.prototype):ie=i(ie,q),ie}function d(ie,q){if(g.isBuffer(q)){var Y=f(q.length)|0;return ie=_(ie,Y),ie.length===0||q.copy(ie,0,0,Y),ie}if(q){if(typeof ArrayBuffer!="undefined"&&q.buffer instanceof ArrayBuffer||"length"in q)return typeof q.length!="number"||Te(q.length)?_(ie,0):i(ie,q);if(q.type==="Buffer"&&m(q.data))return i(ie,q.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function f(ie){if(ie>=S())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+S().toString(16)+" bytes");return ie|0}function l(ie){return+ie!=ie&&(ie=0),g.alloc(+ie)}g.isBuffer=function(q){return!!(q!=null&&q._isBuffer)},g.compare=function(q,Y){if(!g.isBuffer(q)||!g.isBuffer(Y))throw new TypeError("Arguments must be Buffers");if(q===Y)return 0;for(var X=q.length,he=Y.length,fe=0,Ee=Math.min(X,he);fe<Ee;++fe)if(q[fe]!==Y[fe]){X=q[fe],he=Y[fe];break}return X<he?-1:he<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,Y){if(!m(q))throw new TypeError('"list" argument must be an Array of Buffers');if(q.length===0)return g.alloc(0);var X;if(Y===void 0)for(Y=0,X=0;X<q.length;++X)Y+=q[X].length;var he=g.allocUnsafe(Y),fe=0;for(X=0;X<q.length;++X){var Ee=q[X];if(!g.isBuffer(Ee))throw new TypeError('"list" argument must be an Array of Buffers');Ee.copy(he,fe),fe+=Ee.length}return he};function o(ie,q){if(g.isBuffer(ie))return ie.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(ie)||ie instanceof ArrayBuffer))return ie.byteLength;typeof ie!="string"&&(ie=""+ie);var Y=ie.length;if(Y===0)return 0;for(var X=!1;;)switch(q){case"ascii":case"latin1":case"binary":return Y;case"utf8":case"utf-8":case void 0:return se(ie).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Y*2;case"hex":return Y>>>1;case"base64":return ee(ie).length;default:if(X)return se(ie).length;q=(""+q).toLowerCase(),X=!0}}g.byteLength=o;function r(ie,q,Y){var X=!1;if((q===void 0||q<0)&&(q=0),q>this.length)return"";if((Y===void 0||Y>this.length)&&(Y=this.length),Y<=0)return"";if(Y>>>=0,q>>>=0,Y<=q)return"";for(ie||(ie="utf8");;)switch(ie){case"hex":return B(this,q,Y);case"utf8":case"utf-8":return N(this,q,Y);case"ascii":return z(this,q,Y);case"latin1":case"binary":return A(this,q,Y);case"base64":return F(this,q,Y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,q,Y);default:if(X)throw new TypeError("Unknown encoding: "+ie);ie=(ie+"").toLowerCase(),X=!0}}g.prototype._isBuffer=!0;function x(ie,q,Y){var X=ie[q];ie[q]=ie[Y],ie[Y]=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 Y=0;Y<q;Y+=2)x(this,Y,Y+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 Y=0;Y<q;Y+=4)x(this,Y,Y+3),x(this,Y+1,Y+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 Y=0;Y<q;Y+=8)x(this,Y,Y+7),x(this,Y+1,Y+6),x(this,Y+2,Y+5),x(this,Y+3,Y+4);return this},g.prototype.toString=function(){var q=this.length|0;return q===0?"":arguments.length===0?N(this,0,q):r.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="",Y=D.INSPECT_MAX_BYTES;return this.length>0&&(q=this.toString("hex",0,Y).match(/.{2}/g).join(" "),this.length>Y&&(q+=" ... ")),"<Buffer "+q+">"},g.prototype.compare=function(q,Y,X,he,fe){if(!g.isBuffer(q))throw new TypeError("Argument must be a Buffer");if(Y===void 0&&(Y=0),X===void 0&&(X=q?q.length:0),he===void 0&&(he=0),fe===void 0&&(fe=this.length),Y<0||X>q.length||he<0||fe>this.length)throw new RangeError("out of range index");if(he>=fe&&Y>=X)return 0;if(he>=fe)return-1;if(Y>=X)return 1;if(Y>>>=0,X>>>=0,he>>>=0,fe>>>=0,this===q)return 0;for(var Ee=fe-he,He=X-Y,Qe=Math.min(Ee,He),et=this.slice(he,fe),it=q.slice(Y,X),ut=0;ut<Qe;++ut)if(et[ut]!==it[ut]){Ee=et[ut],He=it[ut];break}return Ee<He?-1:He<Ee?1:0};function v(ie,q,Y,X,he){if(ie.length===0)return-1;if(typeof Y=="string"?(X=Y,Y=0):Y>2147483647?Y=2147483647:Y<-2147483648&&(Y=-2147483648),Y=+Y,isNaN(Y)&&(Y=he?0:ie.length-1),Y<0&&(Y=ie.length+Y),Y>=ie.length){if(he)return-1;Y=ie.length-1}else if(Y<0)if(he)Y=0;else return-1;if(typeof q=="string"&&(q=g.from(q,X)),g.isBuffer(q))return q.length===0?-1:p(ie,q,Y,X,he);if(typeof q=="number")return q=q&255,g.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?he?Uint8Array.prototype.indexOf.call(ie,q,Y):Uint8Array.prototype.lastIndexOf.call(ie,q,Y):p(ie,[q],Y,X,he);throw new TypeError("val must be string, number or Buffer")}function p(ie,q,Y,X,he){var fe=1,Ee=ie.length,He=q.length;if(X!==void 0&&(X=String(X).toLowerCase(),X==="ucs2"||X==="ucs-2"||X==="utf16le"||X==="utf-16le")){if(ie.length<2||q.length<2)return-1;fe=2,Ee/=2,He/=2,Y/=2}function Qe(Fe,Ie){return fe===1?Fe[Ie]:Fe.readUInt16BE(Ie*fe)}var et;if(he){var it=-1;for(et=Y;et<Ee;et++)if(Qe(ie,et)===Qe(q,it===-1?0:et-it)){if(it===-1&&(it=et),et-it+1===He)return it*fe}else it!==-1&&(et-=et-it),it=-1}else for(Y+He>Ee&&(Y=Ee-He),et=Y;et>=0;et--){for(var ut=!0,dt=0;dt<He;dt++)if(Qe(ie,et+dt)!==Qe(q,dt)){ut=!1;break}if(ut)return et}return-1}g.prototype.includes=function(q,Y,X){return this.indexOf(q,Y,X)!==-1},g.prototype.indexOf=function(q,Y,X){return v(this,q,Y,X,!0)},g.prototype.lastIndexOf=function(q,Y,X){return v(this,q,Y,X,!1)};function R(ie,q,Y,X){Y=Number(Y)||0;var he=ie.length-Y;X?(X=Number(X),X>he&&(X=he)):X=he;var fe=q.length;if(fe%2!==0)throw new TypeError("Invalid hex string");X>fe/2&&(X=fe/2);for(var Ee=0;Ee<X;++Ee){var He=parseInt(q.substr(Ee*2,2),16);if(isNaN(He))return Ee;ie[Y+Ee]=He}return Ee}function O(ie,q,Y,X){return re(se(q,ie.length-Y),ie,Y,X)}function b(ie,q,Y,X){return re(ne(q),ie,Y,X)}function E(ie,q,Y,X){return b(ie,q,Y,X)}function w(ie,q,Y,X){return re(ee(q),ie,Y,X)}function T(ie,q,Y,X){return re(ge(q,ie.length-Y),ie,Y,X)}g.prototype.write=function(q,Y,X,he){if(Y===void 0)he="utf8",X=this.length,Y=0;else if(X===void 0&&typeof Y=="string")he=Y,X=this.length,Y=0;else if(isFinite(Y))Y=Y|0,isFinite(X)?(X=X|0,he===void 0&&(he="utf8")):(he=X,X=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var fe=this.length-Y;if((X===void 0||X>fe)&&(X=fe),q.length>0&&(X<0||Y<0)||Y>this.length)throw new RangeError("Attempt to write outside buffer bounds");he||(he="utf8");for(var Ee=!1;;)switch(he){case"hex":return R(this,q,Y,X);case"utf8":case"utf-8":return O(this,q,Y,X);case"ascii":return b(this,q,Y,X);case"latin1":case"binary":return E(this,q,Y,X);case"base64":return w(this,q,Y,X);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,q,Y,X);default:if(Ee)throw new TypeError("Unknown encoding: "+he);he=(""+he).toLowerCase(),Ee=!0}},g.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function F(ie,q,Y){return q===0&&Y===ie.length?C.fromByteArray(ie):C.fromByteArray(ie.slice(q,Y))}function N(ie,q,Y){Y=Math.min(ie.length,Y);for(var X=[],he=q;he<Y;){var fe=ie[he],Ee=null,He=fe>239?4:fe>223?3:fe>191?2:1;if(he+He<=Y){var Qe,et,it,ut;switch(He){case 1:fe<128&&(Ee=fe);break;case 2:Qe=ie[he+1],(Qe&192)===128&&(ut=(fe&31)<<6|Qe&63,ut>127&&(Ee=ut));break;case 3:Qe=ie[he+1],et=ie[he+2],(Qe&192)===128&&(et&192)===128&&(ut=(fe&15)<<12|(Qe&63)<<6|et&63,ut>2047&&(ut<55296||ut>57343)&&(Ee=ut));break;case 4:Qe=ie[he+1],et=ie[he+2],it=ie[he+3],(Qe&192)===128&&(et&192)===128&&(it&192)===128&&(ut=(fe&15)<<18|(Qe&63)<<12|(et&63)<<6|it&63,ut>65535&&ut<1114112&&(Ee=ut))}}Ee===null?(Ee=65533,He=1):Ee>65535&&(Ee-=65536,X.push(Ee>>>10&1023|55296),Ee=56320|Ee&1023),X.push(Ee),he+=He}return G(X)}var L=4096;function G(ie){var q=ie.length;if(q<=L)return String.fromCharCode.apply(String,ie);for(var Y="",X=0;X<q;)Y+=String.fromCharCode.apply(String,ie.slice(X,X+=L));return Y}function z(ie,q,Y){var X="";Y=Math.min(ie.length,Y);for(var he=q;he<Y;++he)X+=String.fromCharCode(ie[he]&127);return X}function A(ie,q,Y){var X="";Y=Math.min(ie.length,Y);for(var he=q;he<Y;++he)X+=String.fromCharCode(ie[he]);return X}function B(ie,q,Y){var X=ie.length;(!q||q<0)&&(q=0),(!Y||Y<0||Y>X)&&(Y=X);for(var he="",fe=q;fe<Y;++fe)he+=ce(ie[fe]);return he}function U(ie,q,Y){for(var X=ie.slice(q,Y),he="",fe=0;fe<X.length;fe+=2)he+=String.fromCharCode(X[fe]+X[fe+1]*256);return he}g.prototype.slice=function(q,Y){var X=this.length;q=~~q,Y=Y===void 0?X:~~Y,q<0?(q+=X,q<0&&(q=0)):q>X&&(q=X),Y<0?(Y+=X,Y<0&&(Y=0)):Y>X&&(Y=X),Y<q&&(Y=q);var he;if(g.TYPED_ARRAY_SUPPORT)he=this.subarray(q,Y),he.__proto__=g.prototype;else{var fe=Y-q;he=new g(fe,void 0);for(var Ee=0;Ee<fe;++Ee)he[Ee]=this[Ee+q]}return he};function I(ie,q,Y){if(ie%1!==0||ie<0)throw new RangeError("offset is not uint");if(ie+q>Y)throw new RangeError("Trying to access beyond buffer length")}g.prototype.readUIntLE=function(q,Y,X){q=q|0,Y=Y|0,X||I(q,Y,this.length);for(var he=this[q],fe=1,Ee=0;++Ee<Y&&(fe*=256);)he+=this[q+Ee]*fe;return he},g.prototype.readUIntBE=function(q,Y,X){q=q|0,Y=Y|0,X||I(q,Y,this.length);for(var he=this[q+--Y],fe=1;Y>0&&(fe*=256);)he+=this[q+--Y]*fe;return he},g.prototype.readUInt8=function(q,Y){return Y||I(q,1,this.length),this[q]},g.prototype.readUInt16LE=function(q,Y){return Y||I(q,2,this.length),this[q]|this[q+1]<<8},g.prototype.readUInt16BE=function(q,Y){return Y||I(q,2,this.length),this[q]<<8|this[q+1]},g.prototype.readUInt32LE=function(q,Y){return Y||I(q,4,this.length),(this[q]|this[q+1]<<8|this[q+2]<<16)+this[q+3]*16777216},g.prototype.readUInt32BE=function(q,Y){return Y||I(q,4,this.length),this[q]*16777216+(this[q+1]<<16|this[q+2]<<8|this[q+3])},g.prototype.readIntLE=function(q,Y,X){q=q|0,Y=Y|0,X||I(q,Y,this.length);for(var he=this[q],fe=1,Ee=0;++Ee<Y&&(fe*=256);)he+=this[q+Ee]*fe;return fe*=128,he>=fe&&(he-=Math.pow(2,8*Y)),he},g.prototype.readIntBE=function(q,Y,X){q=q|0,Y=Y|0,X||I(q,Y,this.length);for(var he=Y,fe=1,Ee=this[q+--he];he>0&&(fe*=256);)Ee+=this[q+--he]*fe;return fe*=128,Ee>=fe&&(Ee-=Math.pow(2,8*Y)),Ee},g.prototype.readInt8=function(q,Y){return Y||I(q,1,this.length),this[q]&128?(255-this[q]+1)*-1:this[q]},g.prototype.readInt16LE=function(q,Y){Y||I(q,2,this.length);var X=this[q]|this[q+1]<<8;return X&32768?X|4294901760:X},g.prototype.readInt16BE=function(q,Y){Y||I(q,2,this.length);var X=this[q+1]|this[q]<<8;return X&32768?X|4294901760:X},g.prototype.readInt32LE=function(q,Y){return Y||I(q,4,this.length),this[q]|this[q+1]<<8|this[q+2]<<16|this[q+3]<<24},g.prototype.readInt32BE=function(q,Y){return Y||I(q,4,this.length),this[q]<<24|this[q+1]<<16|this[q+2]<<8|this[q+3]},g.prototype.readFloatLE=function(q,Y){return Y||I(q,4,this.length),M.read(this,q,!0,23,4)},g.prototype.readFloatBE=function(q,Y){return Y||I(q,4,this.length),M.read(this,q,!1,23,4)},g.prototype.readDoubleLE=function(q,Y){return Y||I(q,8,this.length),M.read(this,q,!0,52,8)},g.prototype.readDoubleBE=function(q,Y){return Y||I(q,8,this.length),M.read(this,q,!1,52,8)};function K(ie,q,Y,X,he,fe){if(!g.isBuffer(ie))throw new TypeError('"buffer" argument must be a Buffer instance');if(q>he||q<fe)throw new RangeError('"value" argument is out of bounds');if(Y+X>ie.length)throw new RangeError("Index out of range")}g.prototype.writeUIntLE=function(q,Y,X,he){if(q=+q,Y=Y|0,X=X|0,!he){var fe=Math.pow(2,8*X)-1;K(this,q,Y,X,fe,0)}var Ee=1,He=0;for(this[Y]=q&255;++He<X&&(Ee*=256);)this[Y+He]=q/Ee&255;return Y+X},g.prototype.writeUIntBE=function(q,Y,X,he){if(q=+q,Y=Y|0,X=X|0,!he){var fe=Math.pow(2,8*X)-1;K(this,q,Y,X,fe,0)}var Ee=X-1,He=1;for(this[Y+Ee]=q&255;--Ee>=0&&(He*=256);)this[Y+Ee]=q/He&255;return Y+X},g.prototype.writeUInt8=function(q,Y,X){return q=+q,Y=Y|0,X||K(this,q,Y,1,255,0),g.TYPED_ARRAY_SUPPORT||(q=Math.floor(q)),this[Y]=q&255,Y+1};function Z(ie,q,Y,X){q<0&&(q=65535+q+1);for(var he=0,fe=Math.min(ie.length-Y,2);he<fe;++he)ie[Y+he]=(q&255<<8*(X?he:1-he))>>>(X?he:1-he)*8}g.prototype.writeUInt16LE=function(q,Y,X){return q=+q,Y=Y|0,X||K(this,q,Y,2,65535,0),g.TYPED_ARRAY_SUPPORT?(this[Y]=q&255,this[Y+1]=q>>>8):Z(this,q,Y,!0),Y+2},g.prototype.writeUInt16BE=function(q,Y,X){return q=+q,Y=Y|0,X||K(this,q,Y,2,65535,0),g.TYPED_ARRAY_SUPPORT?(this[Y]=q>>>8,this[Y+1]=q&255):Z(this,q,Y,!1),Y+2};function ue(ie,q,Y,X){q<0&&(q=4294967295+q+1);for(var he=0,fe=Math.min(ie.length-Y,4);he<fe;++he)ie[Y+he]=q>>>(X?he:3-he)*8&255}g.prototype.writeUInt32LE=function(q,Y,X){return q=+q,Y=Y|0,X||K(this,q,Y,4,4294967295,0),g.TYPED_ARRAY_SUPPORT?(this[Y+3]=q>>>24,this[Y+2]=q>>>16,this[Y+1]=q>>>8,this[Y]=q&255):ue(this,q,Y,!0),Y+4},g.prototype.writeUInt32BE=function(q,Y,X){return q=+q,Y=Y|0,X||K(this,q,Y,4,4294967295,0),g.TYPED_ARRAY_SUPPORT?(this[Y]=q>>>24,this[Y+1]=q>>>16,this[Y+2]=q>>>8,this[Y+3]=q&255):ue(this,q,Y,!1),Y+4},g.prototype.writeIntLE=function(q,Y,X,he){if(q=+q,Y=Y|0,!he){var fe=Math.pow(2,8*X-1);K(this,q,Y,X,fe-1,-fe)}var Ee=0,He=1,Qe=0;for(this[Y]=q&255;++Ee<X&&(He*=256);)q<0&&Qe===0&&this[Y+Ee-1]!==0&&(Qe=1),this[Y+Ee]=(q/He>>0)-Qe&255;return Y+X},g.prototype.writeIntBE=function(q,Y,X,he){if(q=+q,Y=Y|0,!he){var fe=Math.pow(2,8*X-1);K(this,q,Y,X,fe-1,-fe)}var Ee=X-1,He=1,Qe=0;for(this[Y+Ee]=q&255;--Ee>=0&&(He*=256);)q<0&&Qe===0&&this[Y+Ee+1]!==0&&(Qe=1),this[Y+Ee]=(q/He>>0)-Qe&255;return Y+X},g.prototype.writeInt8=function(q,Y,X){return q=+q,Y=Y|0,X||K(this,q,Y,1,127,-128),g.TYPED_ARRAY_SUPPORT||(q=Math.floor(q)),q<0&&(q=255+q+1),this[Y]=q&255,Y+1},g.prototype.writeInt16LE=function(q,Y,X){return q=+q,Y=Y|0,X||K(this,q,Y,2,32767,-32768),g.TYPED_ARRAY_SUPPORT?(this[Y]=q&255,this[Y+1]=q>>>8):Z(this,q,Y,!0),Y+2},g.prototype.writeInt16BE=function(q,Y,X){return q=+q,Y=Y|0,X||K(this,q,Y,2,32767,-32768),g.TYPED_ARRAY_SUPPORT?(this[Y]=q>>>8,this[Y+1]=q&255):Z(this,q,Y,!1),Y+2},g.prototype.writeInt32LE=function(q,Y,X){return q=+q,Y=Y|0,X||K(this,q,Y,4,2147483647,-2147483648),g.TYPED_ARRAY_SUPPORT?(this[Y]=q&255,this[Y+1]=q>>>8,this[Y+2]=q>>>16,this[Y+3]=q>>>24):ue(this,q,Y,!0),Y+4},g.prototype.writeInt32BE=function(q,Y,X){return q=+q,Y=Y|0,X||K(this,q,Y,4,2147483647,-2147483648),q<0&&(q=4294967295+q+1),g.TYPED_ARRAY_SUPPORT?(this[Y]=q>>>24,this[Y+1]=q>>>16,this[Y+2]=q>>>8,this[Y+3]=q&255):ue(this,q,Y,!1),Y+4};function de(ie,q,Y,X,he,fe){if(Y+X>ie.length)throw new RangeError("Index out of range");if(Y<0)throw new RangeError("Index out of range")}function Ce(ie,q,Y,X,he){return he||de(ie,q,Y,4,34028234663852886e22,-34028234663852886e22),M.write(ie,q,Y,X,23,4),Y+4}g.prototype.writeFloatLE=function(q,Y,X){return Ce(this,q,Y,!0,X)},g.prototype.writeFloatBE=function(q,Y,X){return Ce(this,q,Y,!1,X)};function Re(ie,q,Y,X,he){return he||de(ie,q,Y,8,17976931348623157e292,-17976931348623157e292),M.write(ie,q,Y,X,52,8),Y+8}g.prototype.writeDoubleLE=function(q,Y,X){return Re(this,q,Y,!0,X)},g.prototype.writeDoubleBE=function(q,Y,X){return Re(this,q,Y,!1,X)},g.prototype.copy=function(q,Y,X,he){if(X||(X=0),!he&&he!==0&&(he=this.length),Y>=q.length&&(Y=q.length),Y||(Y=0),he>0&&he<X&&(he=X),he===X)return 0;if(q.length===0||this.length===0)return 0;if(Y<0)throw new RangeError("targetStart out of bounds");if(X<0||X>=this.length)throw new RangeError("sourceStart out of bounds");if(he<0)throw new RangeError("sourceEnd out of bounds");he>this.length&&(he=this.length),q.length-Y<he-X&&(he=q.length-Y+X);var fe=he-X,Ee;if(this===q&&X<Y&&Y<he)for(Ee=fe-1;Ee>=0;--Ee)q[Ee+Y]=this[Ee+X];else if(fe<1e3||!g.TYPED_ARRAY_SUPPORT)for(Ee=0;Ee<fe;++Ee)q[Ee+Y]=this[Ee+X];else Uint8Array.prototype.set.call(q,this.subarray(X,X+fe),Y);return fe},g.prototype.fill=function(q,Y,X,he){if(typeof q=="string"){if(typeof Y=="string"?(he=Y,Y=0,X=this.length):typeof X=="string"&&(he=X,X=this.length),q.length===1){var fe=q.charCodeAt(0);fe<256&&(q=fe)}if(he!==void 0&&typeof he!="string")throw new TypeError("encoding must be a string");if(typeof he=="string"&&!g.isEncoding(he))throw new TypeError("Unknown encoding: "+he)}else typeof q=="number"&&(q=q&255);if(Y<0||this.length<Y||this.length<X)throw new RangeError("Out of range index");if(X<=Y)return this;Y=Y>>>0,X=X===void 0?this.length:X>>>0,q||(q=0);var Ee;if(typeof q=="number")for(Ee=Y;Ee<X;++Ee)this[Ee]=q;else{var He=g.isBuffer(q)?q:se(new g(q,he).toString()),Qe=He.length;for(Ee=0;Ee<X-Y;++Ee)this[Ee+Y]=He[Ee%Qe]}return this};var me=/[^+\/0-9A-Za-z-_]/g;function Oe(ie){if(ie=be(ie).replace(me,""),ie.length<2)return"";for(;ie.length%4!==0;)ie=ie+"=";return ie}function be(ie){return ie.trim?ie.trim():ie.replace(/^\s+|\s+$/g,"")}function ce(ie){return ie<16?"0"+ie.toString(16):ie.toString(16)}function se(ie,q){q=q||Infinity;for(var Y,X=ie.length,he=null,fe=[],Ee=0;Ee<X;++Ee){if(Y=ie.charCodeAt(Ee),Y>55295&&Y<57344){if(!he){if(Y>56319){(q-=3)>-1&&fe.push(239,191,189);continue}else if(Ee+1===X){(q-=3)>-1&&fe.push(239,191,189);continue}he=Y;continue}if(Y<56320){(q-=3)>-1&&fe.push(239,191,189),he=Y;continue}Y=(he-55296<<10|Y-56320)+65536}else he&&((q-=3)>-1&&fe.push(239,191,189));if(he=null,Y<128){if((q-=1)<0)break;fe.push(Y)}else if(Y<2048){if((q-=2)<0)break;fe.push(Y>>6|192,Y&63|128)}else if(Y<65536){if((q-=3)<0)break;fe.push(Y>>12|224,Y>>6&63|128,Y&63|128)}else if(Y<1114112){if((q-=4)<0)break;fe.push(Y>>18|240,Y>>12&63|128,Y>>6&63|128,Y&63|128)}else throw new Error("Invalid code point")}return fe}function ne(ie){for(var q=[],Y=0;Y<ie.length;++Y)q.push(ie.charCodeAt(Y)&255);return q}function ge(ie,q){for(var Y,X,he,fe=[],Ee=0;Ee<ie.length&&!((q-=2)<0);++Ee)Y=ie.charCodeAt(Ee),X=Y>>8,he=Y%256,fe.push(he),fe.push(X);return fe}function ee(ie){return C.toByteArray(Oe(ie))}function re(ie,q,Y,X){for(var he=0;he<X&&!(he+Y>=q.length||he>=ie.length);++he)q[he+Y]=ie[he];return he}function Te(ie){return ie!==ie}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},H("buffer").Buffer)},{"base64-js":69,buffer:73,ieee754:195,isarray:198}],74:[function(H,J,D){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,D){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,D){/*!
* copy-to - index.js
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
* MIT Licensed
*/"use strict";var k=Array.prototype.slice;J.exports=g;function g(M,m){if(!(this instanceof g))return new g(M,m);this.src=M,this._withAccess=m}g.prototype.withAccess=function(M){return this._withAccess=M!==!1,this},g.prototype.pick=function(M){return Array.isArray(M)||(M=k.call(arguments)),M.length&&(this.keys=M),this},g.prototype.to=function(M){if(M=M||{},!this.src)return M;var m=this.keys||Object.keys(this.src);if(!this._withAccess){for(var y=0;y<m.length;y++){if(S=m[y],M[S]!==void 0)continue;M[S]=this.src[S]}return M}for(var y=0;y<m.length;y++){var S=m[y];if(!C(M,S))continue;var _=this.src.__lookupGetter__(S),t=this.src.__lookupSetter__(S);_&&M.__defineGetter__(S,_),t&&M.__defineSetter__(S,t),!_&&!t&&(M[S]=this.src[S])}return M},g.prototype.toCover=function(M){for(var m=this.keys||Object.keys(this.src),y=0;y<m.length;y++){var S=m[y];delete M[S];var _=this.src.__lookupGetter__(S),t=this.src.__lookupSetter__(S);_&&M.__defineGetter__(S,_),t&&M.__defineSetter__(S,t),!_&&!t&&(M[S]=this.src[S])}},g.prototype.override=g.prototype.toCover,g.prototype.and=function(M){var m={};return this.to(m),this.src=M,this.to(m),this.src=m,this};function C(M,m){return M[m]===void 0&&M.__lookupGetter__(m)===void 0&&M.__lookupSetter__(m)===void 0}},{}],77:[function(H,J,D){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,D){var k=H("../../modules/_core"),g=k.JSON||(k.JSON={stringify:JSON.stringify});J.exports=function(M){return g.stringify.apply(g,arguments)}},{"../../modules/_core":99}],79:[function(H,J,D){H("../../modules/es6.object.assign"),J.exports=H("../../modules/_core").Object.assign},{"../../modules/_core":99,"../../modules/es6.object.assign":171}],80:[function(H,J,D){H("../../modules/es6.object.create");var k=H("../../modules/_core").Object;J.exports=function(C,M){return k.create(C,M)}},{"../../modules/_core":99,"../../modules/es6.object.create":172}],81:[function(H,J,D){H("../../modules/es6.object.define-property");var k=H("../../modules/_core").Object;J.exports=function(C,M,m){return k.defineProperty(C,M,m)}},{"../../modules/_core":99,"../../modules/es6.object.define-property":173}],82:[function(H,J,D){H("../../modules/es7.object.entries"),J.exports=H("../../modules/_core").Object.entries},{"../../modules/_core":99,"../../modules/es7.object.entries":182}],83:[function(H,J,D){H("../../modules/es6.object.get-own-property-names");var k=H("../../modules/_core").Object;J.exports=function(C){return k.getOwnPropertyNames(C)}},{"../../modules/_core":99,"../../modules/es6.object.get-own-property-names":174}],84:[function(H,J,D){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,D){H("../../modules/es6.object.keys"),J.exports=H("../../modules/_core").Object.keys},{"../../modules/_core":99,"../../modules/es6.object.keys":176}],86:[function(H,J,D){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,D){H("../modules/web.immediate"),J.exports=H("../modules/_core").setImmediate},{"../modules/_core":99,"../modules/web.immediate":188}],88:[function(H,J,D){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,D){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,D){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,D){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,D){J.exports=function(k){if(typeof k!="function")throw TypeError(k+" is not a function!");return k}},{}],93:[function(H,J,D){J.exports=function(){}},{}],94:[function(H,J,D){J.exports=function(k,g,C,M){if(!(k instanceof g)||M!==void 0&&M in k)throw TypeError(C+": incorrect invocation!");return k}},{}],95:[function(H,J,D){var k=H("./_is-object");J.exports=function(g){if(!k(g))throw TypeError(g+" is not an object!");return g}},{"./_is-object":119}],96:[function(H,J,D){var k=H("./_to-iobject"),g=H("./_to-length"),C=H("./_to-absolute-index");J.exports=function(M){return function(m,y,S){var _=k(m),t=g(_.length),h=C(S,t),n;if(M&&y!=y){for(;t>h;)if(n=_[h++],n!=n)return!0}else for(;t>h;h++)if((M||h in _)&&_[h]===y)return M||h||0;return!M&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(H,J,D){var k=H("./_cof"),g=H("./_wks")("toStringTag"),C=k(function(){return arguments}())=="Arguments",M=function(m,y){try{return m[y]}catch(S){}};J.exports=function(m){var y,S,_;return m===void 0?"Undefined":m===null?"Null":typeof(S=M(y=Object(m),g))=="string"?S:C?k(y):(_=k(y))=="Object"&&typeof y.callee=="function"?"Arguments":_}},{"./_cof":98,"./_wks":166}],98:[function(H,J,D){var k={}.toString;J.exports=function(g){return k.call(g).slice(8,-1)}},{}],99:[function(H,J,D){var k=J.exports={version:"2.6.11"};typeof __e=="number"&&(__e=k)},{}],100:[function(H,J,D){"use strict";var k=H("./_object-dp"),g=H("./_property-desc");J.exports=function(C,M,m){M in C?k.f(C,M,g(0,m)):C[M]=m}},{"./_object-dp":132,"./_property-desc":146}],101:[function(H,J,D){var k=H("./_a-function");J.exports=function(g,C,M){if(k(g),C===void 0)return g;switch(M){case 1:return function(m){return g.call(C,m)};case 2:return function(m,y){return g.call(C,m,y)};case 3:return function(m,y,S){return g.call(C,m,y,S)}}return function(){return g.apply(C,arguments)}}},{"./_a-function":92}],102:[function(H,J,D){J.exports=function(k){if(k==null)throw TypeError("Can't call method on "+k);return k}},{}],103:[function(H,J,D){J.exports=!H("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":108}],104:[function(H,J,D){var k=H("./_is-object"),g=H("./_global").document,C=k(g)&&k(g.createElement);J.exports=function(M){return C?g.createElement(M):{}}},{"./_global":110,"./_is-object":119}],105:[function(H,J,D){J.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(H,J,D){var k=H("./_object-keys"),g=H("./_object-gops"),C=H("./_object-pie");J.exports=function(M){var m=k(M),y=g.f;if(y)for(var S=y(M),_=C.f,t=0,h;S.length>t;)_.call(M,h=S[t++])&&m.push(h);return m}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(H,J,D){var k=H("./_global"),g=H("./_core"),C=H("./_ctx"),M=H("./_hide"),m=H("./_has"),y="prototype",S=function(_,t,h){var n=_&S.F,c=_&S.G,a=_&S.S,i=_&S.P,s=_&S.B,d=_&S.W,f=c?g:g[t]||(g[t]={}),l=f[y],o=c?k:a?k[t]:(k[t]||{})[y],r,x,v;c&&(h=t);for(r in h){if(x=!n&&o&&o[r]!==void 0,x&&m(f,r))continue;v=x?o[r]:h[r],f[r]=c&&typeof o[r]!="function"?h[r]:s&&x?C(v,k):d&&o[r]==v?function(p){var R=function(O,b,E){if(this instanceof p){switch(arguments.length){case 0:return new p;case 1:return new p(O);case 2:return new p(O,b)}return new p(O,b,E)}return p.apply(this,arguments)};return R[y]=p[y],R}(v):i&&typeof v=="function"?C(Function.call,v):v,i&&((f.virtual||(f.virtual={}))[r]=v,_&S.R&&l&&!l[r]&&M(l,r,v))}};S.F=1,S.G=2,S.S=4,S.P=8,S.B=16,S.W=32,S.U=64,S.R=128,J.exports=S},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(H,J,D){J.exports=function(k){try{return!!k()}catch(g){return!0}}},{}],109:[function(H,J,D){var k=H("./_ctx"),g=H("./_iter-call"),C=H("./_is-array-iter"),M=H("./_an-object"),m=H("./_to-length"),y=H("./core.get-iterator-method"),S={},_={},D=J.exports=function(t,h,n,c,a){var i=a?function(){return t}:y(t),s=k(n,c,h?2:1),d=0,f,l,o,r;if(typeof i!="function")throw TypeError(t+" is not iterable!");if(C(i)){for(f=m(t.length);f>d;d++)if(r=h?s(M(l=t[d])[0],l[1]):s(t[d]),r===S||r===_)return r}else for(o=i.call(t);!(l=o.next()).done;)if(r=g(o,s,l.value,h),r===S||r===_)return r};D.BREAK=S,D.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,D){var k=J.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=k)},{}],111:[function(H,J,D){var k={}.hasOwnProperty;J.exports=function(g,C){return k.call(g,C)}},{}],112:[function(H,J,D){var k=H("./_object-dp"),g=H("./_property-desc");J.exports=H("./_descriptors")?function(C,M,m){return k.f(C,M,g(1,m))}:function(C,M,m){return C[M]=m,C}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(H,J,D){var k=H("./_global").document;J.exports=k&&k.documentElement},{"./_global":110}],114:[function(H,J,D){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,D){J.exports=function(k,g,C){var M=C===void 0;switch(g.length){case 0:return M?k():k.call(C);case 1:return M?k(g[0]):k.call(C,g[0]);case 2:return M?k(g[0],g[1]):k.call(C,g[0],g[1]);case 3:return M?k(g[0],g[1],g[2]):k.call(C,g[0],g[1],g[2]);case 4:return M?k(g[0],g[1],g[2],g[3]):k.call(C,g[0],g[1],g[2],g[3])}return k.apply(C,g)}},{}],116:[function(H,J,D){var k=H("./_cof");J.exports=Object("z").propertyIsEnumerable(0)?Object:function(g){return k(g)=="String"?g.split(""):Object(g)}},{"./_cof":98}],117:[function(H,J,D){var k=H("./_iterators"),g=H("./_wks")("iterator"),C=Array.prototype;J.exports=function(M){return M!==void 0&&(k.Array===M||C[g]===M)}},{"./_iterators":125,"./_wks":166}],118:[function(H,J,D){var k=H("./_cof");J.exports=Array.isArray||function(C){return k(C)=="Array"}},{"./_cof":98}],119:[function(H,J,D){J.exports=function(k){return typeof k=="object"?k!==null:typeof k=="function"}},{}],120:[function(H,J,D){var k=H("./_an-object");J.exports=function(g,C,M,m){try{return m?C(k(M)[0],M[1]):C(M)}catch(S){var y=g.return;throw y!==void 0&&k(y.call(g)),S}}},{"./_an-object":95}],121:[function(H,J,D){"use strict";var k=H("./_object-create"),g=H("./_property-desc"),C=H("./_set-to-string-tag"),M={};H("./_hide")(M,H("./_wks")("iterator"),function(){return this}),J.exports=function(m,y,S){m.prototype=k(M,{next:g(1,S)}),C(m,y+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(H,J,D){"use strict";var k=H("./_library"),g=H("./_export"),C=H("./_redefine"),M=H("./_hide"),m=H("./_iterators"),y=H("./_iter-create"),S=H("./_set-to-string-tag"),_=H("./_object-gpo"),t=H("./_wks")("iterator"),h=!([].keys&&"next"in[].keys()),n="@@iterator",c="keys",a="values",i=function(){return this};J.exports=function(s,d,f,l,o,r,x){y(f,d,l);var v=function(z){if(!h&&z in b)return b[z];switch(z){case c:return function(){return new f(this,z)};case a:return function(){return new f(this,z)}}return function(){return new f(this,z)}},p=d+" Iterator",R=o==a,O=!1,b=s.prototype,E=b[t]||b[n]||o&&b[o],w=E||v(o),T=o?R?v("entries"):w:void 0,F=d=="Array"&&b.entries||E,N,L,G;if(F&&(G=_(F.call(new s)),G!==Object.prototype&&G.next&&(S(G,p,!0),!k&&typeof G[t]!="function"&&M(G,t,i))),R&&E&&E.name!==a&&(O=!0,w=function(){return E.call(this)}),(!k||x)&&(h||O||!b[t])&&M(b,t,w),m[d]=w,m[p]=i,o)if(N={values:R?w:v(a),keys:r?w:v(c),entries:T},x)for(L in N)L in b||C(b,L,N[L]);else g(g.P+g.F*(h||O),d,N);return N}},{"./_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,D){var k=H("./_wks")("iterator"),g=!1;try{var C=[7][k]();C.return=function(){g=!0},Array.from(C,function(){throw 2})}catch(M){}J.exports=function(M,m){if(!m&&!g)return!1;var y=!1;try{var S=[7],_=S[k]();_.next=function(){return{done:y=!0}},S[k]=function(){return _},M(S)}catch(t){}return y}},{"./_wks":166}],124:[function(H,J,D){J.exports=function(k,g){return{value:g,done:!!k}}},{}],125:[function(H,J,D){J.exports={}},{}],126:[function(H,J,D){J.exports=!0},{}],127:[function(H,J,D){var k=H("./_uid")("meta"),g=H("./_is-object"),C=H("./_has"),M=H("./_object-dp").f,m=0,y=Object.isExtensible||function(){return!0},S=!H("./_fails")(function(){return y(Object.preventExtensions({}))}),_=function(a){M(a,k,{value:{i:"O"+ ++m,w:{}}})},t=function(a,i){if(!g(a))return typeof a=="symbol"?a:(typeof a=="string"?"S":"P")+a;if(!C(a,k)){if(!y(a))return"F";if(!i)return"E";_(a)}return a[k].i},h=function(a,i){if(!C(a,k)){if(!y(a))return!0;if(!i)return!1;_(a)}return a[k].w},n=function(a){return S&&c.NEED&&y(a)&&!C(a,k)&&_(a),a},c=J.exports={KEY:k,NEED:!1,fastKey:t,getWeak:h,onFreeze:n}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(H,J,D){var k=H("./_global"),g=H("./_task").set,C=k.MutationObserver||k.WebKitMutationObserver,M=k.process,m=k.Promise,y=H("./_cof")(M)=="process";J.exports=function(){var S,_,t,h=function(){var i,s;for(y&&(i=M.domain)&&i.exit();S;){s=S.fn,S=S.next;try{s()}catch(d){throw S?t():_=void 0,d}}_=void 0,i&&i.enter()};if(y)t=function(){M.nextTick(h)};else if(C&&!(k.navigator&&k.navigator.standalone)){var n=!0,c=document.createTextNode("");new C(h).observe(c,{characterData:!0}),t=function(){c.data=n=!n}}else if(m&&m.resolve){var a=m.resolve(void 0);t=function(){a.then(h)}}else t=function(){g.call(k,h)};return function(i){var s={fn:i,next:void 0};_&&(_.next=s),S||(S=s,t()),_=s}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(H,J,D){"use strict";var k=H("./_a-function");function g(C){var M,m;this.promise=new C(function(y,S){if(M!==void 0||m!==void 0)throw TypeError("Bad Promise constructor");M=y,m=S}),this.resolve=k(M),this.reject=k(m)}J.exports.f=function(C){return new g(C)}},{"./_a-function":92}],130:[function(H,J,D){"use strict";var k=H("./_descriptors"),g=H("./_object-keys"),C=H("./_object-gops"),M=H("./_object-pie"),m=H("./_to-object"),y=H("./_iobject"),S=Object.assign;J.exports=!S||H("./_fails")(function(){var _={},t={},h=Symbol(),n="abcdefghijklmnopqrst";return _[h]=7,n.split("").forEach(function(c){t[c]=c}),S({},_)[h]!=7||Object.keys(S({},t)).join("")!=n})?function(t,h){for(var n=m(t),c=arguments.length,a=1,i=C.f,s=M.f;c>a;)for(var d=y(arguments[a++]),f=i?g(d).concat(i(d)):g(d),l=f.length,o=0,r;l>o;)r=f[o++],(!k||s.call(d,r))&&(n[r]=d[r]);return n}:S},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(H,J,D){var k=H("./_an-object"),g=H("./_object-dps"),C=H("./_enum-bug-keys"),M=H("./_shared-key")("IE_PROTO"),m=function(){},y="prototype",S=function(){var _=H("./_dom-create")("iframe"),t=C.length,h="<",n=">",c;for(_.style.display="none",H("./_html").appendChild(_),_.src="javascript:",c=_.contentWindow.document,c.open(),c.write(h+"script"+n+"document.F=Object"+h+"/script"+n),c.close(),S=c.F;t--;)delete S[y][C[t]];return S()};J.exports=Object.create||function(t,h){var n;return t!==null?(m[y]=k(t),n=new m,m[y]=null,n[M]=t):n=S(),h===void 0?n:g(n,h)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(H,J,D){var k=H("./_an-object"),g=H("./_ie8-dom-define"),C=H("./_to-primitive"),M=Object.defineProperty;D.f=H("./_descriptors")?Object.defineProperty:function(y,S,_){if(k(y),S=C(S,!0),k(_),g)try{return M(y,S,_)}catch(t){}if("get"in _||"set"in _)throw TypeError("Accessors not supported!");return"value"in _&&(y[S]=_.value),y}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(H,J,D){var k=H("./_object-dp"),g=H("./_an-object"),C=H("./_object-keys");J.exports=H("./_descriptors")?Object.defineProperties:function(m,y){g(m);for(var S=C(y),_=S.length,t=0,h;_>t;)k.f(m,h=S[t++],y[h]);return m}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(H,J,D){var k=H("./_object-pie"),g=H("./_property-desc"),C=H("./_to-iobject"),M=H("./_to-primitive"),m=H("./_has"),y=H("./_ie8-dom-define"),S=Object.getOwnPropertyDescriptor;D.f=H("./_descriptors")?S:function(t,h){if(t=C(t),h=M(h,!0),y)try{return S(t,h)}catch(n){}if(m(t,h))return g(!k.f.call(t,h),t[h])}},{"./_descriptors":103,"./_has":111,"./_ie8-dom-define":114,"./_object-pie":141,"./_property-desc":146,"./_to-iobject":158,"./_to-primitive":161}],135:[function(H,J,D){var k=H("./_to-iobject"),g=H("./_object-gopn").f,C={}.toString,M=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],m=function(y){try{return g(y)}catch(S){return M.slice()}};J.exports.f=function(S){return M&&C.call(S)=="[object Window]"?m(S):g(k(S))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(H,J,D){var k=H("./_object-keys-internal"),g=H("./_enum-bug-keys").concat("length","prototype");D.f=Object.getOwnPropertyNames||function(M){return k(M,g)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(H,J,D){D.f=Object.getOwnPropertySymbols},{}],138:[function(H,J,D){var k=H("./_has"),g=H("./_to-object"),C=H("./_shared-key")("IE_PROTO"),M=Object.prototype;J.exports=Object.getPrototypeOf||function(m){return m=g(m),k(m,C)?m[C]:typeof m.constructor=="function"&&m instanceof m.constructor?m.constructor.prototype:m instanceof Object?M:null}},{"./_has":111,"./_shared-key":151,"./_to-object":160}],139:[function(H,J,D){var k=H("./_has"),g=H("./_to-iobject"),C=H("./_array-includes")(!1),M=H("./_shared-key")("IE_PROTO");J.exports=function(m,y){var S=g(m),_=0,t=[],h;for(h in S)h!=M&&(k(S,h)&&t.push(h));for(;y.length>_;)k(S,h=y[_++])&&(~C(t,h)||t.push(h));return t}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(H,J,D){var k=H("./_object-keys-internal"),g=H("./_enum-bug-keys");J.exports=Object.keys||function(M){return k(M,g)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(H,J,D){D.f={}.propertyIsEnumerable},{}],142:[function(H,J,D){var k=H("./_export"),g=H("./_core"),C=H("./_fails");J.exports=function(M,m){var y=(g.Object||{})[M]||Object[M],S={};S[M]=m(y),k(k.S+k.F*C(function(){y(1)}),"Object",S)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(H,J,D){var k=H("./_descriptors"),g=H("./_object-keys"),C=H("./_to-iobject"),M=H("./_object-pie").f;J.exports=function(m){return function(y){for(var S=C(y),_=g(S),t=_.length,h=0,n=[],c;t>h;)c=_[h++],(!k||M.call(S,c))&&n.push(m?[c,S[c]]:S[c]);return n}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(H,J,D){J.exports=function(k){try{return{e:!1,v:k()}}catch(g){return{e:!0,v:g}}}},{}],145:[function(H,J,D){var k=H("./_an-object"),g=H("./_is-object"),C=H("./_new-promise-capability");J.exports=function(M,m){if(k(M),g(m)&&m.constructor===M)return m;var y=C.f(M),S=y.resolve;return S(m),y.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(H,J,D){J.exports=function(k,g){return{enumerable:!(k&1),configurable:!(k&2),writable:!(k&4),value:g}}},{}],147:[function(H,J,D){var k=H("./_hide");J.exports=function(g,C,M){for(var m in C)M&&g[m]?g[m]=C[m]:k(g,m,C[m]);return g}},{"./_hide":112}],148:[function(H,J,D){J.exports=H("./_hide")},{"./_hide":112}],149:[function(H,J,D){"use strict";var k=H("./_global"),g=H("./_core"),C=H("./_object-dp"),M=H("./_descriptors"),m=H("./_wks")("species");J.exports=function(y){var S=typeof g[y]=="function"?g[y]:k[y];M&&S&&!S[m]&&C.f(S,m,{configurable:!0,get:function(){return this}})}},{"./_core":99,"./_descriptors":103,"./_global":110,"./_object-dp":132,"./_wks":166}],150:[function(H,J,D){var k=H("./_object-dp").f,g=H("./_has"),C=H("./_wks")("toStringTag");J.exports=function(M,m,y){M&&!g(M=y?M:M.prototype,C)&&k(M,C,{configurable:!0,value:m})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(H,J,D){var k=H("./_shared")("keys"),g=H("./_uid");J.exports=function(C){return k[C]||(k[C]=g(C))}},{"./_shared":152,"./_uid":162}],152:[function(H,J,D){var k=H("./_core"),g=H("./_global"),C="__core-js_shared__",M=g[C]||(g[C]={});(J.exports=function(m,y){return M[m]||(M[m]=y!==void 0?y:{})})("versions",[]).push({version:k.version,mode:H("./_library")?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},{"./_core":99,"./_global":110,"./_library":126}],153:[function(H,J,D){var k=H("./_an-object"),g=H("./_a-function"),C=H("./_wks")("species");J.exports=function(M,m){var y=k(M).constructor,S;return y===void 0||(S=k(y)[C])==null?m:g(S)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(H,J,D){var k=H("./_to-integer"),g=H("./_defined");J.exports=function(C){return function(M,m){var y=String(g(M)),S=k(m),_=y.length,t,h;return S<0||S>=_?C?"":void 0:(t=y.charCodeAt(S),t<55296||t>56319||S+1===_||(h=y.charCodeAt(S+1))<56320||h>57343?C?y.charAt(S):t:C?y.slice(S,S+2):(t-55296<<10)+(h-56320)+65536)}}},{"./_defined":102,"./_to-integer":157}],155:[function(H,J,D){var k=H("./_ctx"),g=H("./_invoke"),C=H("./_html"),M=H("./_dom-create"),m=H("./_global"),y=m.process,S=m.setImmediate,_=m.clearImmediate,t=m.MessageChannel,h=m.Dispatch,n=0,c={},a="onreadystatechange",i,s,d,f=function(){var o=+this;if(c.hasOwnProperty(o)){var r=c[o];delete c[o],r()}},l=function(o){f.call(o.data)};(!S||!_)&&(S=function(r){for(var x=[],v=1;arguments.length>v;)x.push(arguments[v++]);return c[++n]=function(){g(typeof r=="function"?r:Function(r),x)},i(n),n},_=function(r){delete c[r]},H("./_cof")(y)=="process"?i=function(o){y.nextTick(k(f,o,1))}:h&&h.now?i=function(o){h.now(k(f,o,1))}:t?(s=new t,d=s.port2,s.port1.onmessage=l,i=k(d.postMessage,d,1)):m.addEventListener&&typeof postMessage=="function"&&!m.importScripts?(i=function(o){m.postMessage(o+"","*")},m.addEventListener("message",l,!1)):a in M("script")?i=function(o){C.appendChild(M("script"))[a]=function(){C.removeChild(this),f.call(o)}}:i=function(o){setTimeout(k(f,o,1),0)}),J.exports={set:S,clear:_}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(H,J,D){var k=H("./_to-integer"),g=Math.max,C=Math.min;J.exports=function(M,m){return M=k(M),M<0?g(M+m,0):C(M,m)}},{"./_to-integer":157}],157:[function(H,J,D){var k=Math.ceil,g=Math.floor;J.exports=function(C){return isNaN(C=+C)?0:(C>0?g:k)(C)}},{}],158:[function(H,J,D){var k=H("./_iobject"),g=H("./_defined");J.exports=function(C){return k(g(C))}},{"./_defined":102,"./_iobject":116}],159:[function(H,J,D){var k=H("./_to-integer"),g=Math.min;J.exports=function(C){return C>0?g(k(C),9007199254740991):0}},{"./_to-integer":157}],160:[function(H,J,D){var k=H("./_defined");J.exports=function(g){return Object(k(g))}},{"./_defined":102}],161:[function(H,J,D){var k=H("./_is-object");J.exports=function(g,C){if(!k(g))return g;var M,m;if(C&&typeof(M=g.toString)=="function"&&!k(m=M.call(g)))return m;if(typeof(M=g.valueOf)=="function"&&!k(m=M.call(g)))return m;if(!C&&typeof(M=g.toString)=="function"&&!k(m=M.call(g)))return m;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(H,J,D){var k=0,g=Math.random();J.exports=function(C){return"Symbol(".concat(C===void 0?"":C,")_",(++k+g).toString(36))}},{}],163:[function(H,J,D){var k=H("./_global"),g=k.navigator;J.exports=g&&g.userAgent||""},{"./_global":110}],164:[function(H,J,D){var k=H("./_global"),g=H("./_core"),C=H("./_library"),M=H("./_wks-ext"),m=H("./_object-dp").f;J.exports=function(y){var S=g.Symbol||(g.Symbol=C?{}:k.Symbol||{});y.charAt(0)!="_"&&!(y in S)&&m(S,y,{value:M.f(y)})}},{"./_core":99,"./_global":110,"./_library":126,"./_object-dp":132,"./_wks-ext":165}],165:[function(H,J,D){D.f=H("./_wks")},{"./_wks":166}],166:[function(H,J,D){var k=H("./_shared")("wks"),g=H("./_uid"),C=H("./_global").Symbol,M=typeof C=="function",m=J.exports=function(y){return k[y]||(k[y]=M&&C[y]||(M?C:g)("Symbol."+y))};m.store=k},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(H,J,D){var k=H("./_classof"),g=H("./_wks")("iterator"),C=H("./_iterators");J.exports=H("./_core").getIteratorMethod=function(M){if(M!=null)return M[g]||M["@@iterator"]||C[k(M)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(H,J,D){"use strict";var k=H("./_ctx"),g=H("./_export"),C=H("./_to-object"),M=H("./_iter-call"),m=H("./_is-array-iter"),y=H("./_to-length"),S=H("./_create-property"),_=H("./core.get-iterator-method");g(g.S+g.F*!H("./_iter-detect")(function(t){Array.from(t)}),"Array",{from:function(h){var n=C(h),c=typeof this=="function"?this:Array,a=arguments.length,i=a>1?arguments[1]:void 0,s=i!==void 0,d=0,f=_(n),l,o,r,x;if(s&&(i=k(i,a>2?arguments[2]:void 0,2)),f!=null&&!(c==Array&&m(f)))for(x=f.call(n),o=new c;!(r=x.next()).done;d++)S(o,d,s?M(x,i,[r.value,d],!0):r.value);else for(l=y(n.length),o=new c(l);l>d;d++)S(o,d,s?i(n[d],d):n[d]);return o.length=d,o}})},{"./_create-property":100,"./_ctx":101,"./_export":107,"./_is-array-iter":117,"./_iter-call":120,"./_iter-detect":123,"./_to-length":159,"./_to-object":160,"./core.get-iterator-method":167}],169:[function(H,J,D){"use strict";var k=H("./_add-to-unscopables"),g=H("./_iter-step"),C=H("./_iterators"),M=H("./_to-iobject");J.exports=H("./_iter-define")(Array,"Array",function(m,y){this._t=M(m),this._i=0,this._k=y},function(){var m=this._t,y=this._k,S=this._i++;return!m||S>=m.length?(this._t=void 0,g(1)):y=="keys"?g(0,S):y=="values"?g(0,m[S]):g(0,[S,m[S]])},"values"),C.Arguments=C.Array,k("keys"),k("values"),k("entries")},{"./_add-to-unscopables":93,"./_iter-define":122,"./_iter-step":124,"./_iterators":125,"./_to-iobject":158}],170:[function(H,J,D){"use strict";var k=H("./_is-object"),g=H("./_object-gpo"),C=H("./_wks")("hasInstance"),M=Function.prototype;C in M||H("./_object-dp").f(M,C,{value:function(m){if(typeof this!="function"||!k(m))return!1;if(!k(this.prototype))return m instanceof this;for(;m=g(m);)if(this.prototype===m)return!0;return!1}})},{"./_is-object":119,"./_object-dp":132,"./_object-gpo":138,"./_wks":166}],171:[function(H,J,D){var k=H("./_export");k(k.S+k.F,"Object",{assign:H("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(H,J,D){var k=H("./_export");k(k.S,"Object",{create:H("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(H,J,D){var k=H("./_export");k(k.S+k.F*!H("./_descriptors"),"Object",{defineProperty:H("./_object-dp").f})},{"./_descriptors":103,"./_export":107,"./_object-dp":132}],174:[function(H,J,D){H("./_object-sap")("getOwnPropertyNames",function(){return H("./_object-gopn-ext").f})},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(H,J,D){var k=H("./_to-object"),g=H("./_object-gpo");H("./_object-sap")("getPrototypeOf",function(){return function(M){return g(k(M))}})},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(H,J,D){var k=H("./_to-object"),g=H("./_object-keys");H("./_object-sap")("keys",function(){return function(M){return g(k(M))}})},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(H,J,D){arguments[4][71][0].apply(D,arguments)},{dup:71}],178:[function(H,J,D){"use strict";var k=H("./_library"),g=H("./_global"),C=H("./_ctx"),M=H("./_classof"),m=H("./_export"),y=H("./_is-object"),S=H("./_a-function"),_=H("./_an-instance"),t=H("./_for-of"),h=H("./_species-constructor"),n=H("./_task").set,c=H("./_microtask")(),a=H("./_new-promise-capability"),i=H("./_perform"),s=H("./_user-agent"),d=H("./_promise-resolve"),f="Promise",l=g.TypeError,o=g.process,r=o&&o.versions,x=r&&r.v8||"",v=g[f],p=M(o)=="process",R=function(){},O,b,E,w,T=b=a.f,F=!!function(){try{var I=v.resolve(1),K=(I.constructor={})[H("./_wks")("species")]=function(Z){Z(R,R)};return(p||typeof PromiseRejectionEvent=="function")&&I.then(R)instanceof K&&x.indexOf("6.6")!==0&&s.indexOf("Chrome/66")===-1}catch(Z){}}(),N=function(I){var K;return y(I)&&typeof(K=I.then)=="function"?K:!1},L=function(I,K){if(I._n)return;I._n=!0;var Z=I._c;c(function(){for(var ue=I._v,de=I._s==1,Ce=0,Re=function(me){var Oe=de?me.ok:me.fail,be=me.resolve,ce=me.reject,se=me.domain,ne,ge,ee;try{Oe?(de||(I._h==2&&A(I),I._h=1),Oe===!0?ne=ue:(se&&se.enter(),ne=Oe(ue),se&&(se.exit(),ee=!0)),ne===me.promise?ce(l("Promise-chain cycle")):(ge=N(ne))?ge.call(ne,be,ce):be(ne)):ce(ue)}catch(re){se&&!ee&&se.exit(),ce(re)}};Z.length>Ce;)Re(Z[Ce++]);I._c=[],I._n=!1,K&&!I._h&&G(I)})},G=function(I){n.call(g,function(){var K=I._v,Z=z(I),ue,de,Ce;if(Z&&(ue=i(function(){p?o.emit("unhandledRejection",K,I):(de=g.onunhandledrejection)?de({promise:I,reason:K}):(Ce=g.console)&&Ce.error&&Ce.error("Unhandled promise rejection",K)}),I._h=p||z(I)?2:1),I._a=void 0,Z&&ue.e)throw ue.v})},z=function(I){return I._h!==1&&(I._a||I._c).length===0},A=function(I){n.call(g,function(){var K;p?o.emit("rejectionHandled",I):(K=g.onrejectionhandled)&&K({promise:I,reason:I._v})})},B=function(I){var K=this;if(K._d)return;K._d=!0,K=K._w||K,K._v=I,K._s=2,K._a||(K._a=K._c.slice()),L(K,!0)},U=function(I){var K=this,Z;if(K._d)return;K._d=!0,K=K._w||K;try{if(K===I)throw l("Promise can't be resolved itself");(Z=N(I))?c(function(){var ue={_w:K,_d:!1};try{Z.call(I,C(U,ue,1),C(B,ue,1))}catch(de){B.call(ue,de)}}):(K._v=I,K._s=1,L(K,!1))}catch(ue){B.call({_w:K,_d:!1},ue)}};F||(v=function(K){_(this,v,f,"_h"),S(K),O.call(this);try{K(C(U,this,1),C(B,this,1))}catch(Z){B.call(this,Z)}},O=function(K){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},O.prototype=H("./_redefine-all")(v.prototype,{then:function(K,Z){var ue=T(h(this,v));return ue.ok=typeof K=="function"?K:!0,ue.fail=typeof Z=="function"&&Z,ue.domain=p?o.domain:void 0,this._c.push(ue),this._a&&this._a.push(ue),this._s&&L(this,!1),ue.promise},catch:function(I){return this.then(void 0,I)}}),E=function(){var I=new O;this.promise=I,this.resolve=C(U,I,1),this.reject=C(B,I,1)},a.f=T=function(I){return I===v||I===w?new E(I):b(I)}),m(m.G+m.W+m.F*!F,{Promise:v}),H("./_set-to-string-tag")(v,f),H("./_set-species")(f),w=H("./_core")[f],m(m.S+m.F*!F,f,{reject:function(K){var Z=T(this),ue=Z.reject;return ue(K),Z.promise}}),m(m.S+m.F*(k||!F),f,{resolve:function(K){return d(k&&this===w?v:this,K)}}),m(m.S+m.F*!(F&&H("./_iter-detect")(function(I){v.all(I).catch(R)})),f,{all:function(K){var Z=this,ue=T(Z),de=ue.resolve,Ce=ue.reject,Re=i(function(){var me=[],Oe=0,be=1;t(K,!1,function(ce){var se=Oe++,ne=!1;me.push(void 0),be++,Z.resolve(ce).then(function(ge){if(ne)return;ne=!0,me[se]=ge,--be||de(me)},Ce)}),--be||de(me)});return Re.e&&Ce(Re.v),ue.promise},race:function(K){var Z=this,ue=T(Z),de=ue.reject,Ce=i(function(){t(K,!1,function(Re){Z.resolve(Re).then(ue.resolve,de)})});return Ce.e&&de(Ce.v),ue.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,D){var k=H("./_export"),g=H("./_to-absolute-index"),C=String.fromCharCode,M=String.fromCodePoint;k(k.S+k.F*(!!M&&M.length!=1),"String",{fromCodePoint:function(y){for(var S=[],_=arguments.length,t=0,h;_>t;){if(h=+arguments[t++],g(h,1114111)!==h)throw RangeError(h+" is not a valid code point");S.push(h<65536?C(h):C(((h-=65536)>>10)+55296,h%1024+56320))}return S.join("")}})},{"./_export":107,"./_to-absolute-index":156}],180:[function(H,J,D){"use strict";var k=H("./_string-at")(!0);H("./_iter-define")(String,"String",function(g){this._t=String(g),this._i=0},function(){var g=this._t,C=this._i,M;return C>=g.length?{value:void 0,done:!0}:(M=k(g,C),this._i+=M.length,{value:M,done:!1})})},{"./_iter-define":122,"./_string-at":154}],181:[function(H,J,D){"use strict";var k=H("./_global"),g=H("./_has"),C=H("./_descriptors"),M=H("./_export"),m=H("./_redefine"),y=H("./_meta").KEY,S=H("./_fails"),_=H("./_shared"),t=H("./_set-to-string-tag"),h=H("./_uid"),n=H("./_wks"),c=H("./_wks-ext"),a=H("./_wks-define"),i=H("./_enum-keys"),s=H("./_is-array"),d=H("./_an-object"),f=H("./_is-object"),l=H("./_to-object"),o=H("./_to-iobject"),r=H("./_to-primitive"),x=H("./_property-desc"),v=H("./_object-create"),p=H("./_object-gopn-ext"),R=H("./_object-gopd"),O=H("./_object-gops"),b=H("./_object-dp"),E=H("./_object-keys"),w=R.f,T=b.f,F=p.f,N=k.Symbol,L=k.JSON,G=L&&L.stringify,z="prototype",A=n("_hidden"),B=n("toPrimitive"),U={}.propertyIsEnumerable,I=_("symbol-registry"),K=_("symbols"),Z=_("op-symbols"),ue=Object[z],de=typeof N=="function"&&!!O.f,Ce=k.QObject,Re=!Ce||!Ce[z]||!Ce[z].findChild,me=C&&S(function(){return v(T({},"a",{get:function(){return T(this,"a",{value:7}).a}})).a!=7})?function(fe,Ee,He){var Qe=w(ue,Ee);Qe&&delete ue[Ee],T(fe,Ee,He),Qe&&fe!==ue&&T(ue,Ee,Qe)}:T,Oe=function(fe){var Ee=K[fe]=v(N[z]);return Ee._k=fe,Ee},be=de&&typeof N.iterator=="symbol"?function(fe){return typeof fe=="symbol"}:function(fe){return fe instanceof N},ce=function(Ee,He,Qe){return Ee===ue&&ce(Z,He,Qe),d(Ee),He=r(He,!0),d(Qe),g(K,He)?(Qe.enumerable?(g(Ee,A)&&Ee[A][He]&&(Ee[A][He]=!1),Qe=v(Qe,{enumerable:x(0,!1)})):(g(Ee,A)||T(Ee,A,x(1,{})),Ee[A][He]=!0),me(Ee,He,Qe)):T(Ee,He,Qe)},se=function(Ee,He){d(Ee);for(var Qe=i(He=o(He)),et=0,it=Qe.length,ut;it>et;)ce(Ee,ut=Qe[et++],He[ut]);return Ee},ne=function(Ee,He){return He===void 0?v(Ee):se(v(Ee),He)},ge=function(Ee){var He=U.call(this,Ee=r(Ee,!0));return this===ue&&g(K,Ee)&&!g(Z,Ee)?!1:He||!g(this,Ee)||!g(K,Ee)||g(this,A)&&this[A][Ee]?He:!0},ee=function(Ee,He){if(Ee=o(Ee),He=r(He,!0),Ee===ue&&g(K,He)&&!g(Z,He))return;var Qe=w(Ee,He);return Qe&&g(K,He)&&!(g(Ee,A)&&Ee[A][He])&&(Qe.enumerable=!0),Qe},re=function(Ee){for(var He=F(o(Ee)),Qe=[],et=0,it;He.length>et;)!g(K,it=He[et++])&&it!=A&&it!=y&&Qe.push(it);return Qe},Te=function(Ee){for(var He=Ee===ue,Qe=F(He?Z:o(Ee)),et=[],it=0,ut;Qe.length>it;)g(K,ut=Qe[it++])&&(He?g(ue,ut):!0)&&et.push(K[ut]);return et};de||(N=function(){if(this instanceof N)throw TypeError("Symbol is not a constructor!");var Ee=h(arguments.length>0?arguments[0]:void 0),He=function(Qe){this===ue&&He.call(Z,Qe),g(this,A)&&g(this[A],Ee)&&(this[A][Ee]=!1),me(this,Ee,x(1,Qe))};return C&&Re&&me(ue,Ee,{configurable:!0,set:He}),Oe(Ee)},m(N[z],"toString",function(){return this._k}),R.f=ee,b.f=ce,H("./_object-gopn").f=p.f=re,H("./_object-pie").f=ge,O.f=Te,C&&!H("./_library")&&m(ue,"propertyIsEnumerable",ge,!0),c.f=function(fe){return Oe(n(fe))}),M(M.G+M.W+M.F*!de,{Symbol:N});for(var ie="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),q=0;ie.length>q;)n(ie[q++]);for(var Y=E(n.store),X=0;Y.length>X;)a(Y[X++]);M(M.S+M.F*!de,"Symbol",{for:function(fe){return g(I,fe+="")?I[fe]:I[fe]=N(fe)},keyFor:function(Ee){if(!be(Ee))throw TypeError(Ee+" is not a symbol!");for(var He in I)if(I[He]===Ee)return He},useSetter:function(){Re=!0},useSimple:function(){Re=!1}}),M(M.S+M.F*!de,"Object",{create:ne,defineProperty:ce,defineProperties:se,getOwnPropertyDescriptor:ee,getOwnPropertyNames:re,getOwnPropertySymbols:Te});var he=S(function(){O.f(1)});M(M.S+M.F*he,"Object",{getOwnPropertySymbols:function(Ee){return O.f(l(Ee))}}),L&&M(M.S+M.F*(!de||S(function(){var fe=N();return G([fe])!="[null]"||G({a:fe})!="{}"||G(Object(fe))!="{}"})),"JSON",{stringify:function(Ee){for(var He=[Ee],Qe=1,et,it;arguments.length>Qe;)He.push(arguments[Qe++]);return it=et=He[1],!f(et)&&Ee===void 0||be(Ee)?void 0:(s(et)||(et=function(ut,dt){if(typeof it=="function"&&(dt=it.call(this,ut,dt)),!be(dt))return dt}),He[1]=et,G.apply(L,He))}}),N[z][B]||H("./_hide")(N[z],B,N[z].valueOf),t(N,"Symbol"),t(Math,"Math",!0),t(k.JSON,"JSON",!0)},{"./_an-object":95,"./_descriptors":103,"./_enum-keys":106,"./_export":107,"./_fails":108,"./_global":110,"./_has":111,"./_hide":112,"./_is-array":118,"./_is-object":119,"./_library":126,"./_meta":127,"./_object-create":131,"./_object-dp":132,"./_object-gopd":134,"./_object-gopn":136,"./_object-gopn-ext":135,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_property-desc":146,"./_redefine":148,"./_set-to-string-tag":150,"./_shared":152,"./_to-iobject":158,"./_to-object":160,"./_to-primitive":161,"./_uid":162,"./_wks":166,"./_wks-define":164,"./_wks-ext":165}],182:[function(H,J,D){var k=H("./_export"),g=H("./_object-to-array")(!0);k(k.S,"Object",{entries:function(M){return g(M)}})},{"./_export":107,"./_object-to-array":143}],183:[function(H,J,D){"use strict";var k=H("./_export"),g=H("./_core"),C=H("./_global"),M=H("./_species-constructor"),m=H("./_promise-resolve");k(k.P+k.R,"Promise",{finally:function(y){var S=M(this,g.Promise||C.Promise),_=typeof y=="function";return this.then(_?function(t){return m(S,y()).then(function(){return t})}:y,_?function(t){return m(S,y()).then(function(){throw t})}:y)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(H,J,D){"use strict";var k=H("./_export"),g=H("./_new-promise-capability"),C=H("./_perform");k(k.S,"Promise",{try:function(M){var m=g.f(this),y=C(M);return(y.e?m.reject:m.resolve)(y.v),m.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(H,J,D){H("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(H,J,D){H("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(H,J,D){H("./es6.array.iterator");for(var k=H("./_global"),g=H("./_hide"),C=H("./_iterators"),M=H("./_wks")("toStringTag"),m="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(","),y=0;y<m.length;y++){var S=m[y],_=k[S],t=_&&_.prototype;t&&!t[M]&&g(t,M,S),C[S]=C.Array}},{"./_global":110,"./_hide":112,"./_iterators":125,"./_wks":166,"./es6.array.iterator":169}],188:[function(H,J,D){var k=H("./_export"),g=H("./_task");k(k.G+k.B,{setImmediate:g.set,clearImmediate:g.clear})},{"./_export":107,"./_task":155}],189:[function(H,J,D){(function(k){"use strict";var g=H("babel-runtime/helpers/typeof"),C=M(g);function M(r){return r&&r.__esModule?r:{default:r}}function m(r){return Array.isArray?Array.isArray(r):o(r)==="[object Array]"}D.isArray=m;function y(r){return typeof r=="boolean"}D.isBoolean=y;function S(r){return r===null}D.isNull=S;function _(r){return r==null}D.isNullOrUndefined=_;function t(r){return typeof r=="number"}D.isNumber=t;function h(r){return typeof r=="string"}D.isString=h;function n(r){return(typeof r=="undefined"?"undefined":(0,C.default)(r))==="symbol"}D.isSymbol=n;function c(r){return r===void 0}D.isUndefined=c;function a(r){return o(r)==="[object RegExp]"}D.isRegExp=a;function i(r){return(typeof r=="undefined"?"undefined":(0,C.default)(r))==="object"&&r!==null}D.isObject=i;function s(r){return o(r)==="[object Date]"}D.isDate=s;function d(r){return o(r)==="[object Error]"||r instanceof Error}D.isError=d;function f(r){return typeof r=="function"}D.isFunction=f;function l(r){return r===null||typeof r=="boolean"||typeof r=="number"||typeof r=="string"||(typeof r=="undefined"?"undefined":(0,C.default)(r))==="symbol"||typeof r=="undefined"}D.isPrimitive=l,D.isBuffer=k.isBuffer;function o(r){return Object.prototype.toString.call(r)}}).call(this,{isBuffer:H("../../is-buffer/index.js")})},{"../../is-buffer/index.js":197,"babel-runtime/helpers/typeof":67}],190:[function(H,J,D){"use strict";var k=H("babel-runtime/helpers/typeof"),g=C(k);function C(M){return M&&M.__esModule?M:{default:M}}(function(M){"use strict";var m=function(){var h=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,n=/\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(a,i,s,d){if(arguments.length===1&&t(a)==="string"&&!/\d/.test(a)&&(i=a,a=void 0),a=a||new Date,a instanceof Date||(a=new Date(a)),isNaN(a))throw TypeError("Invalid date");i=String(m.masks[i]||i||m.masks.default);var f=i.slice(0,4);(f==="UTC:"||f==="GMT:")&&(i=i.slice(4),s=!0,f==="GMT:"&&(d=!0));var l=s?"getUTC":"get",o=a[l+"Date"](),r=a[l+"Day"](),x=a[l+"Month"](),v=a[l+"FullYear"](),p=a[l+"Hours"](),R=a[l+"Minutes"](),O=a[l+"Seconds"](),b=a[l+"Milliseconds"](),E=s?0:a.getTimezoneOffset(),w=S(a),T=_(a),F={d:o,dd:y(o),ddd:m.i18n.dayNames[r],dddd:m.i18n.dayNames[r+7],m:x+1,mm:y(x+1),mmm:m.i18n.monthNames[x],mmmm:m.i18n.monthNames[x+12],yy:String(v).slice(2),yyyy:v,h:p%12||12,hh:y(p%12||12),H:p,HH:y(p),M:R,MM:y(R),s:O,ss:y(O),l:y(b,3),L:y(Math.round(b/10)),t:p<12?"a":"p",tt:p<12?"am":"pm",T:p<12?"A":"P",TT:p<12?"AM":"PM",Z:d?"GMT":s?"UTC":(String(a).match(n)||[""]).pop().replace(c,""),o:(E>0?"-":"+")+y(Math.floor(Math.abs(E)/60)*100+Math.abs(E)%60,4),S:["th","st","nd","rd"][o%10>3?0:(o%100-o%10!=10)*o%10],W:w,N:T};return i.replace(h,function(N){return N in F?F[N]:N.slice(1,N.length-1)})}}();m.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"},m.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 y(h,n){for(h=String(h),n=n||2;h.length<n;)h="0"+h;return h}function S(h){var n=new Date(h.getFullYear(),h.getMonth(),h.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var c=new Date(n.getFullYear(),0,4);c.setDate(c.getDate()-(c.getDay()+6)%7+3);var a=n.getTimezoneOffset()-c.getTimezoneOffset();n.setHours(n.getHours()-a);var i=(n-c)/(864e5*7);return 1+Math.floor(i)}function _(h){var n=h.getDay();return n===0&&(n=7),n}function t(h){return h===null?"null":h===void 0?"undefined":(typeof h=="undefined"?"undefined":(0,g.default)(h))!=="object"?typeof h=="undefined"?"undefined":(0,g.default)(h):Array.isArray(h)?"array":{}.toString.call(h).slice(8,-1).toLowerCase()}typeof define=="function"&&define.amd?define(function(){return m}):(typeof D=="undefined"?"undefined":(0,g.default)(D))==="object"?J.exports=m:M.dateFormat=m})(void 0)},{"babel-runtime/helpers/typeof":67}],191:[function(H,J,D){/*!
* escape-html
* Copyright(c) 2012-2013 TJ Holowaychuk
* Copyright(c) 2015 Andreas Lubbe
* Copyright(c) 2015 Tiancheng "Timothy" Gu
* MIT Licensed
*/"use strict";var k=/["'&<>]/;J.exports=g;function g(C){var M=""+C,m=k.exec(M);if(!m)return M;var y,S="",_=0,t=0;for(_=m.index;_<M.length;_++){switch(M.charCodeAt(_)){case 34:y="&quot;";break;case 38:y="&amp;";break;case 39:y="&#39;";break;case 60:y="&lt;";break;case 62:y="&gt;";break;default:continue}t!==_&&(S+=M.substring(t,_)),t=_+1,S+=y}return t!==_?S+M.substring(t,_):S}},{}],192:[function(H,J,D){function k(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}J.exports=k,k.EventEmitter=k,k.prototype._events=void 0,k.prototype._maxListeners=void 0,k.defaultMaxListeners=10,k.prototype.setMaxListeners=function(y){if(!C(y)||y<0||isNaN(y))throw TypeError("n must be a positive number");return this._maxListeners=y,this},k.prototype.emit=function(y){var S,_,t,h,n,c;if(this._events||(this._events={}),y==="error"&&(!this._events.error||M(this._events.error)&&!this._events.error.length)){if(S=arguments[1],S instanceof Error)throw S;var a=new Error('Uncaught, unspecified "error" event. ('+S+")");throw a.context=S,a}if(_=this._events[y],m(_))return!1;if(g(_))switch(arguments.length){case 1:_.call(this);break;case 2:_.call(this,arguments[1]);break;case 3:_.call(this,arguments[1],arguments[2]);break;default:h=Array.prototype.slice.call(arguments,1),_.apply(this,h)}else if(M(_))for(h=Array.prototype.slice.call(arguments,1),c=_.slice(),t=c.length,n=0;n<t;n++)c[n].apply(this,h);return!0},k.prototype.addListener=function(y,S){var _;if(!g(S))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",y,g(S.listener)?S.listener:S),this._events[y]?M(this._events[y])?this._events[y].push(S):this._events[y]=[this._events[y],S]:this._events[y]=S,M(this._events[y])&&!this._events[y].warned&&(m(this._maxListeners)?_=k.defaultMaxListeners:_=this._maxListeners,_&&_>0&&this._events[y].length>_&&(this._events[y].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[y].length),typeof console.trace=="function"&&console.trace())),this},k.prototype.on=k.prototype.addListener,k.prototype.once=function(y,S){if(!g(S))throw TypeError("listener must be a function");var _=!1;function t(){this.removeListener(y,t),_||(_=!0,S.apply(this,arguments))}return t.listener=S,this.on(y,t),this},k.prototype.removeListener=function(y,S){var _,t,h,n;if(!g(S))throw TypeError("listener must be a function");if(!this._events||!this._events[y])return this;if(_=this._events[y],h=_.length,t=-1,_===S||g(_.listener)&&_.listener===S)delete this._events[y],this._events.removeListener&&this.emit("removeListener",y,S);else if(M(_)){for(n=h;n-- >0;)if(_[n]===S||_[n].listener&&_[n].listener===S){t=n;break}if(t<0)return this;_.length===1?(_.length=0,delete this._events[y]):_.splice(t,1),this._events.removeListener&&this.emit("removeListener",y,S)}return this},k.prototype.removeAllListeners=function(y){var S,_;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[y]&&delete this._events[y],this;if(arguments.length===0){for(S in this._events){if(S==="removeListener")continue;this.removeAllListeners(S)}return this.removeAllListeners("removeListener"),this._events={},this}if(_=this._events[y],g(_))this.removeListener(y,_);else if(_)for(;_.length;)this.removeListener(y,_[_.length-1]);return delete this._events[y],this},k.prototype.listeners=function(y){var S;return!this._events||!this._events[y]?S=[]:g(this._events[y])?S=[this._events[y]]:S=this._events[y].slice(),S},k.prototype.listenerCount=function(y){if(this._events){var S=this._events[y];if(g(S))return 1;if(S)return S.length}return 0},k.listenerCount=function(y,S){return y.listenerCount(S)};function g(y){return typeof y=="function"}function C(y){return typeof y=="number"}function M(y){return typeof y=="object"&&y!==null}function m(y){return y===void 0}},{}],193:[function(H,J,D){var k=H("http"),g=J.exports;for(var C in k)k.hasOwnProperty(C)&&(g[C]=k[C]);g.request=function(M,m){return M||(M={}),M.scheme="https",M.protocol="https:",k.request.call(this,M,m)}},{http:231}],194:[function(H,J,D){/*!
* humanize-ms - index.js
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
* MIT Licensed
*/"use strict";var k=H("util"),g=H("ms");J.exports=function(C){if(typeof C=="number")return C;var M=g(C);if(M===void 0){var m=new Error(k.format("humanize-ms(%j) result undefined",C));console.warn(m.stack)}return M}},{ms:204,util:243}],195:[function(H,J,D){D.read=function(k,g,C,M,m){var y,S,_=m*8-M-1,t=(1<<_)-1,h=t>>1,n=-7,c=C?m-1:0,a=C?-1:1,i=k[g+c];for(c+=a,y=i&(1<<-n)-1,i>>=-n,n+=_;n>0;y=y*256+k[g+c],c+=a,n-=8);for(S=y&(1<<-n)-1,y>>=-n,n+=M;n>0;S=S*256+k[g+c],c+=a,n-=8);if(y===0)y=1-h;else{if(y===t)return S?NaN:(i?-1:1)*Infinity;S=S+Math.pow(2,M),y=y-h}return(i?-1:1)*S*Math.pow(2,y-M)},D.write=function(k,g,C,M,m,y){var S,_,t,h=y*8-m-1,n=(1<<h)-1,c=n>>1,a=m===23?Math.pow(2,-24)-Math.pow(2,-77):0,i=M?0:y-1,s=M?1:-1,d=g<0||g===0&&1/g<0?1:0;for(g=Math.abs(g),isNaN(g)||g===Infinity?(_=isNaN(g)?1:0,S=n):(S=Math.floor(Math.log(g)/Math.LN2),g*(t=Math.pow(2,-S))<1&&(S--,t*=2),S+c>=1?g+=a/t:g+=a*Math.pow(2,1-c),g*t>=2&&(S++,t/=2),S+c>=n?(_=0,S=n):S+c>=1?(_=(g*t-1)*Math.pow(2,m),S=S+c):(_=g*Math.pow(2,c-1)*Math.pow(2,m),S=0));m>=8;k[C+i]=_&255,i+=s,_/=256,m-=8);for(S=S<<m|_,h+=m;h>0;k[C+i]=S&255,i+=s,S/=256,h-=8);k[C+i-s]|=d*128}},{}],196:[function(H,J,D){typeof Object.create=="function"?J.exports=function(g,C){C&&(g.super_=C,g.prototype=Object.create(C.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}))}:J.exports=function(g,C){if(C){g.super_=C;var M=function(){};M.prototype=C.prototype,g.prototype=new M,g.prototype.constructor=g}}},{}],197:[function(H,J,D){/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/J.exports=function(C){return C!=null&&(k(C)||g(C)||!!C._isBuffer)};function k(C){return!!C.constructor&&typeof C.constructor.isBuffer=="function"&&C.constructor.isBuffer(C)}function g(C){return typeof C.readFloatLE=="function"&&typeof C.slice=="function"&&k(C.slice(0,0))}},{}],198:[function(H,J,D){var k={}.toString;J.exports=Array.isArray||function(g){return k.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={},D=0,k=H.length;D<k;D++)J[H.charAt(D)]=D;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],D=H.charCodeAt(0)<<16|(H.length>1?H.charCodeAt(1):0)<<8|(H.length>2?H.charCodeAt(2):0),k=[b64chars.charAt(D>>>18),b64chars.charAt(D>>>12&63),J>=2?"=":b64chars.charAt(D>>>6&63),J>=1?"=":b64chars.charAt(D&63)];return k.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(D){return D=="+"?"-":"_"}).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),D=J-65536;return fromCharCode((D>>>10)+55296)+fromCharCode((D&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,D=J%4,k=(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(k>>>16),fromCharCode(k>>>8&255),fromCharCode(k&255)];return g.length-=[0,0,2,1][D],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,D){/*!
* merge-descriptors
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/"use strict";J.exports=g;var k=Object.prototype.hasOwnProperty;function g(C,M,m){if(!C)throw new TypeError("argument dest is required");if(!M)throw new TypeError("argument src is required");return m===void 0&&(m=!0),Object.getOwnPropertyNames(M).forEach(function(S){if(!m&&k.call(C,S))return;var _=Object.getOwnPropertyDescriptor(M,S);Object.defineProperty(C,S,_)}),C}},{}],201:[function(H,J,D){"use strict";function k(){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)}k.prototype.define=function(g,C){for(var M in g){var m=g[M].map(function(_){return _.toLowerCase()});M=M.toLowerCase();for(var y=0;y<m.length;y++){var S=m[y];if(S[0]=="*")continue;if(!C&&S in this._types)throw new Error('Attempt to change mapping for "'+S+'" extension from "'+this._types[S]+'" to "'+M+'". Pass `force=true` to allow this, otherwise remove "'+S+'" from the list of extensions for "'+M+'".');this._types[S]=M}if(C||!this._extensions[M]){var S=m[0];this._extensions[M]=S[0]!="*"?S:S.substr(1)}}},k.prototype.getType=function(g){g=String(g);var C=g.replace(/^.*[/\\]/,"").toLowerCase(),M=C.replace(/^.*\./,"").toLowerCase(),m=C.length<g.length,y=M.length<C.length-1;return(y||!m)&&this._types[M]||null},k.prototype.getExtension=function(g){return g=/^\s*([^;\s]*)/.test(g)&&RegExp.$1,g&&this._extensions[g.toLowerCase()]||null},J.exports=k},{}],202:[function(H,J,D){"use strict";var k=H("./Mime");J.exports=new k(H("./types/standard"))},{"./Mime":201,"./types/standard":203}],203:[function(H,J,D){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,D){var k=1e3,g=k*60,C=g*60,M=C*24,m=M*7,y=M*365.25;J.exports=function(n,c){c=c||{};var a=typeof n;if(a==="string"&&n.length>0)return S(n);if(a==="number"&&isFinite(n))return c.long?t(n):_(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function S(n){if(n=String(n),n.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(n);if(!c)return;var a=parseFloat(c[1]),i=(c[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return a*y;case"weeks":case"week":case"w":return a*m;case"days":case"day":case"d":return a*M;case"hours":case"hour":case"hrs":case"hr":case"h":return a*C;case"minutes":case"minute":case"mins":case"min":case"m":return a*g;case"seconds":case"second":case"secs":case"sec":case"s":return a*k;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}function _(n){var c=Math.abs(n);return c>=M?Math.round(n/M)+"d":c>=C?Math.round(n/C)+"h":c>=g?Math.round(n/g)+"m":c>=k?Math.round(n/k)+"s":n+"ms"}function t(n){var c=Math.abs(n);return c>=M?h(n,c,M,"day"):c>=C?h(n,c,C,"hour"):c>=g?h(n,c,g,"minute"):c>=k?h(n,c,k,"second"):n+" ms"}function h(n,c,a,i){var s=c>=a*1.5;return Math.round(n/a)+" "+i+(s?"s":"")}},{}],205:[function(H,J,D){(function(k){function g(y,S){for(var _=0,t=y.length-1;t>=0;t--){var h=y[t];h==="."?y.splice(t,1):h===".."?(y.splice(t,1),_++):_&&(y.splice(t,1),_--)}if(S)for(;_--;_)y.unshift("..");return y}D.resolve=function(){for(var y="",S=!1,_=arguments.length-1;_>=-1&&!S;_--){var t=_>=0?arguments[_]:k.cwd();if(typeof t!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!t)continue;y=t+"/"+y,S=t.charAt(0)==="/"}return y=g(M(y.split("/"),function(h){return!!h}),!S).join("/"),(S?"/":"")+y||"."},D.normalize=function(y){var S=D.isAbsolute(y),_=m(y,-1)==="/";return y=g(M(y.split("/"),function(t){return!!t}),!S).join("/"),!y&&!S&&(y="."),y&&_&&(y+="/"),(S?"/":"")+y},D.isAbsolute=function(y){return y.charAt(0)==="/"},D.join=function(){var y=Array.prototype.slice.call(arguments,0);return D.normalize(M(y,function(S,_){if(typeof S!="string")throw new TypeError("Arguments to path.join must be strings");return S}).join("/"))},D.relative=function(y,S){y=D.resolve(y).substr(1),S=D.resolve(S).substr(1);function _(s){for(var d=0;d<s.length&&!(s[d]!=="");d++);for(var f=s.length-1;f>=0&&!(s[f]!=="");f--);return d>f?[]:s.slice(d,f-d+1)}for(var t=_(y.split("/")),h=_(S.split("/")),n=Math.min(t.length,h.length),c=n,a=0;a<n;a++)if(t[a]!==h[a]){c=a;break}for(var i=[],a=c;a<t.length;a++)i.push("..");return i=i.concat(h.slice(c)),i.join("/")},D.sep="/",D.delimiter=":",D.dirname=function(y){if(typeof y!="string"&&(y=y+""),y.length===0)return".";for(var S=y.charCodeAt(0),_=S===47,t=-1,h=!0,n=y.length-1;n>=1;--n)if(S=y.charCodeAt(n),S===47){if(!h){t=n;break}}else h=!1;return t===-1?_?"/":".":_&&t===1?"/":y.slice(0,t)};function C(y){typeof y!="string"&&(y=y+"");var S=0,_=-1,t=!0,h;for(h=y.length-1;h>=0;--h)if(y.charCodeAt(h)===47){if(!t){S=h+1;break}}else _===-1&&(t=!1,_=h+1);return _===-1?"":y.slice(S,_)}D.basename=function(y,S){var _=C(y);return S&&_.substr(-1*S.length)===S&&(_=_.substr(0,_.length-S.length)),_},D.extname=function(y){typeof y!="string"&&(y=y+"");for(var S=-1,_=0,t=-1,h=!0,n=0,c=y.length-1;c>=0;--c){var a=y.charCodeAt(c);if(a===47){if(!h){_=c+1;break}continue}t===-1&&(h=!1,t=c+1),a===46?S===-1?S=c:n!==1&&(n=1):S!==-1&&(n=-1)}return S===-1||t===-1||n===0||n===1&&S===t-1&&S===_+1?"":y.slice(S,t)};function M(y,S){if(y.filter)return y.filter(S);for(var _=[],t=0;t<y.length;t++)S(y[t],t,y)&&_.push(y[t]);return _}var m="ab".substr(-1)==="b"?function(y,S,_){return y.substr(S,_)}:function(y,S,_){return S<0&&(S=y.length+S),y.substr(S,_)}}).call(this,H("_process"))},{_process:208}],206:[function(H,J,D){(function(k){/*!
* Platform.js <https://mths.be/platform>
* Copyright 2014-2018 Benjamin Tan <https://bnjmnt4n.now.sh/>
* Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/>
* Available under MIT license <https://mths.be/mit>
*/(function(){"use strict";var g={function:!0,object:!0},C=g[typeof window]&&window||this,M=C,m=g[typeof D]&&D,y=g[typeof J]&&J&&!J.nodeType&&J,S=m&&y&&typeof k=="object"&&k;S&&(S.global===S||S.window===S||S.self===S)&&(C=S);var _=Math.pow(2,53)-1,t=/\bOpera/,h=this,n=Object.prototype,c=n.hasOwnProperty,a=n.toString;function i(b){return b=String(b),b.charAt(0).toUpperCase()+b.slice(1)}function s(b,E,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 E&&w&&/^Win/i.test(b)&&!/^Windows Phone /i.test(b)&&(T=T[/[\d.]+$/.exec(b)])&&(b="Windows "+T),b=String(b),E&&w&&(b=b.replace(RegExp(E,"i"),w)),b=f(b.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0]),b}function d(b,E){var w=-1,T=b?b.length:0;if(typeof T=="number"&&T>-1&&T<=_)for(;++w<T;)E(b[w],w,b);else l(b,E)}function f(b){return b=p(b),/^(?:webOS|i(?:OS|P))/.test(b)?b:i(b)}function l(b,E){for(var w in b)c.call(b,w)&&E(b[w],w,b)}function o(b){return b==null?i(b):a.call(b).slice(8,-1)}function r(b,E){var w=b!=null?typeof b[E]:"number";return!/^(?:boolean|number|string|undefined)$/.test(w)&&(w=="object"?!!b[E]:!0)}function x(b){return String(b).replace(/([ -])(?!$)/g,"$1?")}function v(b,E){var w=null;return d(b,function(T,F){w=E(w,T,F,b)}),w}function p(b){return String(b).replace(/^ +| +$/g,"")}function R(b){var E=C,w=b&&typeof b=="object"&&o(b)!="String";w&&(E=b,b=null);var T=E.navigator||{},F=T.userAgent||"";b||(b=F);var N=w||h==M,L=w?!!T.likeChrome:/\bChrome\b/.test(b)&&!/internal|\n/i.test(a.toString()),G="Object",z=w?G:"ScriptBridgingProxyObject",A=w?G:"Environment",B=w&&E.java?"JavaPackage":o(E.java),U=w?G:"RuntimeObject",I=/\bJava/.test(B)&&E.java,K=I&&o(E.environment)==A,Z=I?"a":"\u03B1",ue=I?"b":"\u03B2",de=E.document||{},Ce=E.operamini||E.opera,Re=t.test(Re=w&&Ce?Ce["[[Class]]"]:o(Ce))?Re:Ce=null,me,Oe=b,be=[],ce=null,se=b==F,ne=se&&Ce&&typeof Ce.version=="function"&&Ce.version(),ge,ee=Y([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),re=he(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"Edge"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Waterfox","WebPositive","Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chrome",{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),Te=Ee([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),ie=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=fe(["Windows Phone","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian","Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);function Y(it){return v(it,function(ut,dt){return ut||RegExp("\\b"+(dt.pattern||x(dt))+"\\b","i").exec(b)&&(dt.label||dt)})}function X(it){return v(it,function(ut,dt,Fe){return ut||(dt[Te]||dt[/^[a-z]+(?: +[a-z]+\b)*/i.exec(Te)]||RegExp("\\b"+x(Fe)+"(?:\\b|\\w*\\d)","i").exec(b))&&Fe})}function he(it){return v(it,function(ut,dt){return ut||RegExp("\\b"+(dt.pattern||x(dt))+"\\b","i").exec(b)&&(dt.label||dt)})}function fe(it){return v(it,function(ut,dt){var Fe=dt.pattern||x(dt);return!ut&&(ut=RegExp("\\b"+Fe+"(?:/[\\d.]+|[ \\w.]*)","i").exec(b))&&(ut=s(ut,Fe,dt.label||dt)),ut})}function Ee(it){return v(it,function(ut,dt){var Fe=dt.pattern||x(dt);return!ut&&(ut=RegExp("\\b"+Fe+" *\\d+[.\\w_]*","i").exec(b)||RegExp("\\b"+Fe+" *\\w+-[\\w]*","i").exec(b)||RegExp("\\b"+Fe+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(b))&&((ut=String(dt.label&&!RegExp(Fe,"i").test(dt.label)?dt.label:ut).split("/"))[1]&&!/[\d.]+/.test(ut[0])&&(ut[0]+=" "+ut[1]),dt=dt.label||dt,ut=f(ut[0].replace(RegExp(Fe,"i"),dt).replace(RegExp("; *(?:"+dt+"[_-])?","i")," ").replace(RegExp("("+dt+")[-_.]?(\\w)","i"),"$1 $2"))),ut})}function He(it){return v(it,function(ut,dt){return ut||(RegExp(dt+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(b)||0)[1]||null})}function Qe(){return this.description||""}if(ee&&(ee=[ee]),ie&&!Te&&(Te=Ee([ie])),(me=/\bGoogle TV\b/.exec(Te))&&(Te=me[0]),/\bSimulator\b/i.test(b)&&(Te=(Te?Te+" ":"")+"Simulator"),re=="Opera Mini"&&/\bOPiOS\b/.test(b)&&be.push("running in Turbo/Uncompressed mode"),re=="IE"&&/\blike iPhone OS\b/.test(b)?(me=R(b.replace(/like iPhone OS/,"")),ie=me.manufacturer,Te=me.product):/^iP/.test(Te)?(re||(re="Safari"),q="iOS"+((me=/ OS ([\d_]+)/i.exec(b))?" "+me[1].replace(/_/g,"."):"")):re=="Konqueror"&&!/buntu/i.test(q)?q="Kubuntu":ie&&ie!="Google"&&(/Chrome/.test(re)&&!/\bMobile Safari\b/i.test(b)||/\bVita\b/.test(Te))||/\bAndroid\b/.test(q)&&/^Chrome/.test(re)&&/\bVersion\//i.test(b)?(re="Android Browser",q=/\bAndroid\b/.test(q)?q:"Android"):re=="Silk"?(/\bMobi/i.test(b)||(q="Android",be.unshift("desktop mode")),/Accelerated *= *true/i.test(b)&&be.unshift("accelerated")):re=="PaleMoon"&&(me=/\bFirefox\/([\d.]+)\b/.exec(b))?be.push("identifying as Firefox "+me[1]):re=="Firefox"&&(me=/\b(Mobile|Tablet|TV)\b/i.exec(b))?(q||(q="Firefox OS"),Te||(Te=me[1])):!re||(me=!/\bMinefield\b/i.test(b)&&/\b(?:Firefox|Safari)\b/.exec(re))?(re&&!Te&&/[\/,]|^[^(]+?\)/.test(b.slice(b.indexOf(me+"/")+8))&&(re=null),(me=Te||ie||q)&&(Te||ie||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(q))&&(re=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(q)?q:me)+" Browser")):re=="Electron"&&(me=(/\bChrome\/([\d.]+)\b/.exec(b)||0)[1])&&be.push("Chromium "+me),ne||(ne=He(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",x(re),"(?:Firefox|Minefield|NetFront)"])),(me=ee=="iCab"&&parseFloat(ne)>3&&"WebKit"||/\bOpera\b/.test(re)&&(/\bOPR\b/.test(b)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(b)&&!/^(?:Trident|EdgeHTML)$/.test(ee)&&"WebKit"||!ee&&/\bMSIE\b/i.test(b)&&(q=="Mac OS"?"Tasman":"Trident")||ee=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(re)&&"NetFront")&&(ee=[me]),re=="IE"&&(me=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(b)||0)[1])?(re+=" Mobile",q="Windows Phone "+(/\+$/.test(me)?me:me+".x"),be.unshift("desktop mode")):/\bWPDesktop\b/i.test(b)?(re="IE Mobile",q="Windows Phone 8.x",be.unshift("desktop mode"),ne||(ne=(/\brv:([\d.]+)/.exec(b)||0)[1])):re!="IE"&&ee=="Trident"&&(me=/\brv:([\d.]+)/.exec(b))&&(re&&be.push("identifying as "+re+(ne?" "+ne:"")),re="IE",ne=me[1]),se){if(r(E,"global"))if(I&&(me=I.lang.System,Oe=me.getProperty("os.arch"),q=q||me.getProperty("os.name")+" "+me.getProperty("os.version")),K){try{ne=E.require("ringo/engine").version.join("."),re="RingoJS"}catch(it){(me=E.system)&&me.global.system==E.system&&(re="Narwhal",q||(q=me[0].os||null))}re||(re="Rhino")}else typeof E.process=="object"&&!E.process.browser&&(me=E.process)&&(typeof me.versions=="object"&&(typeof me.versions.electron=="string"?(be.push("Node "+me.versions.node),re="Electron",ne=me.versions.electron):typeof me.versions.nw=="string"&&(be.push("Chromium "+ne,"Node "+me.versions.node),re="NW.js",ne=me.versions.nw)),re||(re="Node.js",Oe=me.arch,q=me.platform,ne=/[\d.]+/.exec(me.version),ne=ne?ne[0]:null));else o(me=E.runtime)==z?(re="Adobe AIR",q=me.flash.system.Capabilities.os):o(me=E.phantom)==U?(re="PhantomJS",ne=(me=me.version||null)&&me.major+"."+me.minor+"."+me.patch):typeof de.documentMode=="number"&&(me=/\bTrident\/(\d+)/i.exec(b))?(ne=[ne,de.documentMode],(me=+me[1]+4)!=ne[1]&&(be.push("IE "+ne[1]+" mode"),ee&&(ee[1]=""),ne[1]=me),ne=re=="IE"?String(ne[1].toFixed(1)):ne[0]):typeof de.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(re)&&(be.push("masking as "+re+" "+ne),re="IE",ne="11.0",ee=["Trident"],q="Windows");q=q&&f(q)}if(ne&&(me=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(ne)||/(?:alpha|beta)(?: ?\d)?/i.exec(b+";"+(se&&T.appMinorVersion))||/\bMinefield\b/i.test(b)&&"a")&&(ce=/b/i.test(me)?"beta":"alpha",ne=ne.replace(RegExp(me+"\\+?$"),"")+(ce=="beta"?ue:Z)+(/\d+\+?/.exec(me)||"")),re=="Fennec"||re=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(q))re="Firefox Mobile";else if(re=="Maxthon"&&ne)ne=ne.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Te))Te=="Xbox 360"&&(q=null),Te=="Xbox 360"&&/\bIEMobile\b/.test(b)&&be.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(re)||re&&!Te&&!/Browser|Mobi/.test(re))&&(q=="Windows CE"||/Mobi/i.test(b)))re+=" Mobile";else if(re=="IE"&&se)try{E.external===null&&be.unshift("platform preview")}catch(it){be.unshift("embedded")}else(/\bBlackBerry\b/.test(Te)||/\bBB10\b/.test(b))&&(me=(RegExp(Te.replace(/ +/g," *")+"/([.\\d]+)","i").exec(b)||0)[1]||ne)?(me=[me,/BB10/.test(b)],q=(me[1]?(Te=null,ie="BlackBerry"):"Device Software")+" "+me[0],ne=null):this!=l&&Te!="Wii"&&(se&&Ce||/Opera/.test(re)&&/\b(?:MSIE|Firefox)\b/i.test(b)||re=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(q)||re=="IE"&&(q&&!/^Win/.test(q)&&ne>5.5||/\bWindows XP\b/.test(q)&&ne>8||ne==8&&!/\bTrident\b/.test(b)))&&!t.test(me=R.call(l,b.replace(t,"")+";"))&&me.name&&(me="ing as "+me.name+((me=me.version)?" "+me:""),t.test(re)?(/\bIE\b/.test(me)&&q=="Mac OS"&&(q=null),me="identify"+me):(me="mask"+me,Re?re=f(Re.replace(/([a-z])([A-Z])/g,"$1 $2")):re="Opera",/\bIE\b/.test(me)&&(q=null),se||(ne=null)),ee=["Presto"],be.push(me));(me=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(b)||0)[1])&&(me=[parseFloat(me.replace(/\.(\d)$/,".0$1")),me],re=="Safari"&&me[1].slice(-1)=="+"?(re="WebKit Nightly",ce="alpha",ne=me[1].slice(0,-1)):(ne==me[1]||ne==(me[2]=(/\bSafari\/([\d.]+\+?)/i.exec(b)||0)[1]))&&(ne=null),me[1]=(/\bChrome\/([\d.]+)/i.exec(b)||0)[1],me[0]==537.36&&me[2]==537.36&&parseFloat(me[1])>=28&&ee=="WebKit"&&(ee=["Blink"]),!se||!L&&!me[1]?(ee&&(ee[1]="like Safari"),me=(me=me[0],me<400?1:me<500?2:me<526?3:me<533?4:me<534?"4+":me<535?5:me<537?6:me<538?7:me<601?8:"8")):(ee&&(ee[1]="like Chrome"),me=me[1]||(me=me[0],me<530?1:me<532?2:me<532.05?3:me<533?4:me<534.03?5:me<534.07?6:me<534.1?7:me<534.13?8:me<534.16?9:me<534.24?10:me<534.3?11:me<535.01?12:me<535.02?"13+":me<535.07?15:me<535.11?16:me<535.19?17:me<536.05?18:me<536.1?19:me<537.01?20:me<537.11?"21+":me<537.13?23:me<537.18?24:me<537.24?25:me<537.36?26:ee!="Blink"?"27":"28")),ee&&(ee[1]+=" "+(me+=typeof me=="number"?".x":/[.+]/.test(me)?"":"+")),re=="Safari"&&(!ne||parseInt(ne)>45)&&(ne=me)),re=="Opera"&&(me=/\bzbov|zvav$/.exec(q))?(re+=" ",be.unshift("desktop mode"),me=="zvav"?(re+="Mini",ne=null):re+="Mobile",q=q.replace(RegExp(" *"+me+"$"),"")):re=="Safari"&&/\bChrome\b/.exec(ee&&ee[1])&&(be.unshift("desktop mode"),re="Chrome Mobile",ne=null,/\bOS X\b/.test(q)?(ie="Apple",q="iOS 4.3+"):q=null),ne&&ne.indexOf(me=/[\d.]+$/.exec(q))==0&&b.indexOf("/"+me+"-")>-1&&(q=p(q.replace(me,""))),ee&&!/\b(?:Avant|Nook)\b/.test(re)&&(/Browser|Lunascape|Maxthon/.test(re)||re!="Safari"&&/^iOS/.test(q)&&/\bSafari\b/.test(ee[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(re)&&ee[1])&&((me=ee[ee.length-1])&&be.push(me)),be.length&&(be=["("+be.join("; ")+")"]),ie&&Te&&Te.indexOf(ie)<0&&be.push("on "+ie),Te&&be.push((/^on /.test(be[be.length-1])?"":"on ")+Te),q&&(me=/ ([\d.+]+)$/.exec(q),ge=me&&q.charAt(q.length-me[0].length-1)=="/",q={architecture:32,family:me&&!ge?q.replace(me[0],""):q,version:me?me[1]:null,toString:function(){var it=this.version;return this.family+(it&&!ge?" "+it:"")+(this.architecture==64?" 64-bit":"")}}),(me=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Oe))&&!/\bi686\b/i.test(Oe)?(q&&(q.architecture=64,q.family=q.family.replace(RegExp(" *"+me),"")),re&&(/\bWOW64\b/i.test(b)||se&&/\w(?:86|32)$/.test(T.cpuClass||T.platform)&&!/\bWin64; x64\b/i.test(b))&&be.unshift("32-bit")):q&&/^OS X/.test(q.family)&&re=="Chrome"&&parseFloat(ne)>=39&&(q.architecture=64),b||(b=null);var et={};return et.description=b,et.layout=ee&&ee[0],et.manufacturer=ie,et.name=re,et.prerelease=ce,et.product=Te,et.ua=b,et.version=re&&ne,et.os=q||{architecture:null,family:null,version:null,toString:function(){return"null"}},et.parse=R,et.toString=Qe,et.version&&be.unshift(ne),et.name&&be.unshift(re),q&&re&&!(q==String(q).split(" ")[0]&&(q==re.split(" ")[0]||Te))&&be.push(Te?"("+q+")":"on "+q),be.length&&(et.description=be.join(" ")),et}var O=R();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(C.platform=O,define(function(){return O})):m&&y?l(O,function(b,E){m[E]=b}):C.platform=O}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(H,J,D){(function(k){"use strict";typeof k=="undefined"||!k.version||k.version.indexOf("v0.")===0||k.version.indexOf("v1.")===0&&k.version.indexOf("v1.8.")!==0?J.exports={nextTick:g}:J.exports=k;function g(C,M,m,y){if(typeof C!="function")throw new TypeError('"callback" argument must be a function');var S=arguments.length,_,t;switch(S){case 0:case 1:return k.nextTick(C);case 2:return k.nextTick(function(){C.call(null,M)});case 3:return k.nextTick(function(){C.call(null,M,m)});case 4:return k.nextTick(function(){C.call(null,M,m,y)});default:for(_=new Array(S-1),t=0;t<_.length;)_[t++]=arguments[t];return k.nextTick(function(){C.apply(null,_)})}}}).call(this,H("_process"))},{_process:208}],208:[function(H,J,D){var k=J.exports={},g,C;function M(){throw new Error("setTimeout has not been defined")}function m(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?g=setTimeout:g=M}catch(d){g=M}try{typeof clearTimeout=="function"?C=clearTimeout:C=m}catch(d){C=m}})();function y(d){if(g===setTimeout)return setTimeout(d,0);if((g===M||!g)&&setTimeout)return g=setTimeout,setTimeout(d,0);try{return g(d,0)}catch(f){try{return g.call(null,d,0)}catch(l){return g.call(this,d,0)}}}function S(d){if(C===clearTimeout)return clearTimeout(d);if((C===m||!C)&&clearTimeout)return C=clearTimeout,clearTimeout(d);try{return C(d)}catch(f){try{return C.call(null,d)}catch(l){return C.call(this,d)}}}var _=[],t=!1,h,n=-1;function c(){if(!t||!h)return;t=!1,h.length?_=h.concat(_):n=-1,_.length&&a()}function a(){if(t)return;var d=y(c);t=!0;for(var f=_.length;f;){for(h=_,_=[];++n<f;)h&&h[n].run();n=-1,f=_.length}h=null,t=!1,S(d)}k.nextTick=function(d){var f=new Array(arguments.length-1);if(arguments.length>1)for(var l=1;l<arguments.length;l++)f[l-1]=arguments[l];_.push(new i(d,f)),_.length===1&&!t&&y(a)};function i(d,f){this.fun=d,this.array=f}i.prototype.run=function(){this.fun.apply(null,this.array)},k.title="browser",k.browser=!0,k.env={},k.argv=[],k.version="",k.versions={};function s(){}k.on=s,k.addListener=s,k.once=s,k.off=s,k.removeListener=s,k.removeAllListeners=s,k.emit=s,k.prependListener=s,k.prependOnceListener=s,k.listeners=function(d){return[]},k.binding=function(d){throw new Error("process.binding is not supported")},k.cwd=function(){return"/"},k.chdir=function(d){throw new Error("process.chdir is not supported")},k.umask=function(){return 0}},{}],209:[function(H,J,D){(function(k){/*! https://mths.be/punycode v1.4.1 by @mathias */(function(g){var C=typeof D=="object"&&D&&!D.nodeType&&D,M=typeof J=="object"&&J&&!J.nodeType&&J,m=typeof k=="object"&&k;(m.global===m||m.window===m||m.self===m)&&(g=m);var y,S=2147483647,_=36,t=1,h=26,n=38,c=700,a=72,i=128,s="-",d=/^xn--/,f=/[^\x20-\x7E]/,l=/[\x2E\u3002\uFF0E\uFF61]/g,o={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},r=_-t,x=Math.floor,v=String.fromCharCode,p;function R(B){throw new RangeError(o[B])}function O(B,U){for(var I=B.length,K=[];I--;)K[I]=U(B[I]);return K}function b(B,U){var I=B.split("@"),K="";I.length>1&&(K=I[0]+"@",B=I[1]),B=B.replace(l,".");var Z=B.split("."),ue=O(Z,U).join(".");return K+ue}function E(B){for(var U=[],I=0,K=B.length,Z,ue;I<K;)Z=B.charCodeAt(I++),Z>=55296&&Z<=56319&&I<K?(ue=B.charCodeAt(I++),(ue&64512)==56320?U.push(((Z&1023)<<10)+(ue&1023)+65536):(U.push(Z),I--)):U.push(Z);return U}function w(B){return O(B,function(U){var I="";return U>65535&&(U-=65536,I+=v(U>>>10&1023|55296),U=56320|U&1023),I+=v(U),I}).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 N(B,U,I){var K=0;for(B=I?x(B/c):B>>1,B+=x(B/U);B>r*h>>1;K+=_)B=x(B/r);return x(K+(r+1)*B/(B+n))}function L(B){var U=[],I=B.length,K,Z=0,ue=i,de=a,Ce,Re,me,Oe,be,ce,se,ne,ge;for(Ce=B.lastIndexOf(s),Ce<0&&(Ce=0),Re=0;Re<Ce;++Re)B.charCodeAt(Re)>=128&&R("not-basic"),U.push(B.charCodeAt(Re));for(me=Ce>0?Ce+1:0;me<I;){for(Oe=Z,be=1,ce=_;!(me>=I&&R("invalid-input"),se=T(B.charCodeAt(me++)),(se>=_||se>x((S-Z)/be))&&R("overflow"),Z+=se*be,ne=ce<=de?t:ce>=de+h?h:ce-de,se<ne);ce+=_)ge=_-ne,be>x(S/ge)&&R("overflow"),be*=ge;K=U.length+1,de=N(Z-Oe,K,Oe==0),x(Z/K)>S-ue&&R("overflow"),ue+=x(Z/K),Z%=K,U.splice(Z++,0,ue)}return w(U)}function G(B){var U,I,K,Z,ue,de,Ce,Re,me,Oe,be,ce=[],se,ne,ge,ee;for(B=E(B),se=B.length,U=i,I=0,ue=a,de=0;de<se;++de)be=B[de],be<128&&ce.push(v(be));for(K=Z=ce.length,Z&&ce.push(s);K<se;){for(Ce=S,de=0;de<se;++de)be=B[de],be>=U&&be<Ce&&(Ce=be);for(ne=K+1,Ce-U>x((S-I)/ne)&&R("overflow"),I+=(Ce-U)*ne,U=Ce,de=0;de<se;++de)if(be=B[de],be<U&&++I>S&&R("overflow"),be==U){for(Re=I,me=_;!(Oe=me<=ue?t:me>=ue+h?h:me-ue,Re<Oe);me+=_)ee=Re-Oe,ge=_-Oe,ce.push(v(F(Oe+ee%ge,0))),Re=x(ee/ge);ce.push(v(F(Re,0))),ue=N(I,ne,K==Z),I=0,++K}++I,++U}return ce.join("")}function z(B){return b(B,function(U){return d.test(U)?L(U.slice(4).toLowerCase()):U})}function A(B){return b(B,function(U){return f.test(U)?"xn--"+G(U):U})}if(y={version:"1.4.1",ucs2:{decode:E,encode:w},decode:L,encode:G,toASCII:A,toUnicode:z},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return y});else if(C&&M)if(J.exports==C)M.exports=y;else for(p in y)y.hasOwnProperty(p)&&(C[p]=y[p]);else g.punycode=y})(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],210:[function(H,J,D){"use strict";function k(C,M){return Object.prototype.hasOwnProperty.call(C,M)}J.exports=function(C,M,m,y){M=M||"&",m=m||"=";var S={};if(typeof C!="string"||C.length===0)return S;var _=/\+/g;C=C.split(M);var t=1e3;y&&typeof y.maxKeys=="number"&&(t=y.maxKeys);var h=C.length;t>0&&h>t&&(h=t);for(var n=0;n<h;++n){var c=C[n].replace(_,"%20"),a=c.indexOf(m),i,s,d,f;a>=0?(i=c.substr(0,a),s=c.substr(a+1)):(i=c,s=""),d=decodeURIComponent(i),f=decodeURIComponent(s),k(S,d)?g(S[d])?S[d].push(f):S[d]=[S[d],f]:S[d]=f}return S};var g=Array.isArray||function(C){return Object.prototype.toString.call(C)==="[object Array]"}},{}],211:[function(H,J,D){"use strict";var k=function(m){switch(typeof m){case"string":return m;case"boolean":return m?"true":"false";case"number":return isFinite(m)?m:"";default:return""}};J.exports=function(m,y,S,_){return y=y||"&",S=S||"=",m===null&&(m=void 0),typeof m=="object"?C(M(m),function(t){var h=encodeURIComponent(k(t))+S;return g(m[t])?C(m[t],function(n){return h+encodeURIComponent(k(n))}).join(y):h+encodeURIComponent(k(m[t]))}).join(y):_?encodeURIComponent(k(_))+S+encodeURIComponent(k(m)):""};var g=Array.isArray||function(m){return Object.prototype.toString.call(m)==="[object Array]"};function C(m,y){if(m.map)return m.map(y);for(var S=[],_=0;_<m.length;_++)S.push(y(m[_],_));return S}var M=Object.keys||function(m){var y=[];for(var S in m)Object.prototype.hasOwnProperty.call(m,S)&&y.push(S);return y}},{}],212:[function(H,J,D){"use strict";D.decode=D.parse=H("./decode"),D.encode=D.stringify=H("./encode")},{"./decode":210,"./encode":211}],213:[function(H,J,D){J.exports=H("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":214}],214:[function(H,J,D){"use strict";var k=H("babel-runtime/core-js/object/create"),g=m(k),C=H("babel-runtime/core-js/object/keys"),M=m(C);function m(f){return f&&f.__esModule?f:{default:f}}var y=H("process-nextick-args"),S=M.default||function(f){var l=[];for(var o in f)l.push(o);return l};J.exports=i;var _=(0,g.default)(H("core-util-is"));_.inherits=H("inherits");var t=H("./_stream_readable"),h=H("./_stream_writable");_.inherits(i,t);for(var n=S(h.prototype),c=0;c<n.length;c++){var a=n[c];i.prototype[a]||(i.prototype[a]=h.prototype[a])}function i(f){if(!(this instanceof i))return new i(f);t.call(this,f),h.call(this,f),f&&f.readable===!1&&(this.readable=!1),f&&f.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,f&&f.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",s)}Object.defineProperty(i.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function s(){if(this.allowHalfOpen||this._writableState.ended)return;y.nextTick(d,this)}function d(f){f.end()}Object.defineProperty(i.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(l){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=l,this._writableState.destroyed=l}}),i.prototype._destroy=function(f,l){this.push(null),this.end(),y.nextTick(l,f)}},{"./_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,D){"use strict";var k=H("babel-runtime/core-js/object/create"),g=C(k);function C(S){return S&&S.__esModule?S:{default:S}}J.exports=y;var M=H("./_stream_transform"),m=(0,g.default)(H("core-util-is"));m.inherits=H("inherits"),m.inherits(y,M);function y(S){if(!(this instanceof y))return new y(S);M.call(this,S)}y.prototype._transform=function(S,_,t){t(null,S)}},{"./_stream_transform":217,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],216:[function(H,J,D){(function(k,g){"use strict";var C=H("babel-runtime/core-js/object/get-prototype-of"),M=S(C),m=H("babel-runtime/core-js/object/create"),y=S(m);function S(ee){return ee&&ee.__esModule?ee:{default:ee}}var _=H("process-nextick-args");J.exports=E;var t=H("isarray"),h;E.ReadableState=b;var n=H("events").EventEmitter,c=function(re,Te){return re.listeners(Te).length},a=H("./internal/streams/stream"),i=H("safe-buffer").Buffer,s=g.Uint8Array||function(){};function d(ee){return i.from(ee)}function f(ee){return i.isBuffer(ee)||ee instanceof s}var l=(0,y.default)(H("core-util-is"));l.inherits=H("inherits");var o=H("util"),r=void 0;o&&o.debuglog?r=o.debuglog("stream"):r=function(){};var x=H("./internal/streams/BufferList"),v=H("./internal/streams/destroy"),p;l.inherits(E,a);var R=["error","close","destroy","pause","resume"];function O(ee,re,Te){if(typeof ee.prependListener=="function")return ee.prependListener(re,Te);!ee._events||!ee._events[re]?ee.on(re,Te):t(ee._events[re])?ee._events[re].unshift(Te):ee._events[re]=[Te,ee._events[re]]}function b(ee,re){h=h||H("./_stream_duplex"),ee=ee||{};var Te=re instanceof h;this.objectMode=!!ee.objectMode,Te&&(this.objectMode=this.objectMode||!!ee.readableObjectMode);var ie=ee.highWaterMark,q=ee.readableHighWaterMark,Y=this.objectMode?16:16*1024;ie||ie===0?this.highWaterMark=ie:Te&&(q||q===0)?this.highWaterMark=q:this.highWaterMark=Y,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new x,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=ee.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,ee.encoding&&(p||(p=H("string_decoder/").StringDecoder),this.decoder=new p(ee.encoding),this.encoding=ee.encoding)}function E(ee){if(h=h||H("./_stream_duplex"),!(this instanceof E))return new E(ee);this._readableState=new b(ee,this),this.readable=!0,ee&&(typeof ee.read=="function"&&(this._read=ee.read),typeof ee.destroy=="function"&&(this._destroy=ee.destroy)),a.call(this)}Object.defineProperty(E.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(re){if(!this._readableState)return;this._readableState.destroyed=re}}),E.prototype.destroy=v.destroy,E.prototype._undestroy=v.undestroy,E.prototype._destroy=function(ee,re){this.push(null),re(ee)},E.prototype.push=function(ee,re){var Te=this._readableState,ie;return Te.objectMode?ie=!0:typeof ee=="string"&&(re=re||Te.defaultEncoding,re!==Te.encoding&&(ee=i.from(ee,re),re=""),ie=!0),w(this,ee,re,!1,ie)},E.prototype.unshift=function(ee){return w(this,ee,null,!0,!1)};function w(ee,re,Te,ie,q){var Y=ee._readableState;if(re===null)Y.reading=!1,A(ee,Y);else{var X;q||(X=F(Y,re)),X?ee.emit("error",X):Y.objectMode||re&&re.length>0?(typeof re!="string"&&!Y.objectMode&&(0,M.default)(re)!==i.prototype&&(re=d(re)),ie?Y.endEmitted?ee.emit("error",new Error("stream.unshift() after end event")):T(ee,Y,re,!0):Y.ended?ee.emit("error",new Error("stream.push() after EOF")):(Y.reading=!1,Y.decoder&&!Te?(re=Y.decoder.write(re),Y.objectMode||re.length!==0?T(ee,Y,re,!1):I(ee,Y)):T(ee,Y,re,!1))):ie||(Y.reading=!1)}return N(Y)}function T(ee,re,Te,ie){re.flowing&&re.length===0&&!re.sync?(ee.emit("data",Te),ee.read(0)):(re.length+=re.objectMode?1:Te.length,ie?re.buffer.unshift(Te):re.buffer.push(Te),re.needReadable&&B(ee)),I(ee,re)}function F(ee,re){var Te;return!f(re)&&typeof re!="string"&&re!==void 0&&!ee.objectMode&&(Te=new TypeError("Invalid non-string/buffer chunk")),Te}function N(ee){return!ee.ended&&(ee.needReadable||ee.length<ee.highWaterMark||ee.length===0)}E.prototype.isPaused=function(){return this._readableState.flowing===!1},E.prototype.setEncoding=function(ee){return p||(p=H("string_decoder/").StringDecoder),this._readableState.decoder=new p(ee),this._readableState.encoding=ee,this};var L=8388608;function G(ee){return ee>=L?ee=L:(ee--,ee|=ee>>>1,ee|=ee>>>2,ee|=ee>>>4,ee|=ee>>>8,ee|=ee>>>16,ee++),ee}function z(ee,re){return ee<=0||re.length===0&&re.ended?0:re.objectMode?1:ee!==ee?re.flowing&&re.length?re.buffer.head.data.length:re.length:(ee>re.highWaterMark&&(re.highWaterMark=G(ee)),ee<=re.length?ee:re.ended?re.length:(re.needReadable=!0,0))}E.prototype.read=function(ee){r("read",ee),ee=parseInt(ee,10);var re=this._readableState,Te=ee;if(ee!==0&&(re.emittedReadable=!1),ee===0&&re.needReadable&&(re.length>=re.highWaterMark||re.ended))return r("read: emitReadable",re.length,re.ended),re.length===0&&re.ended?se(this):B(this),null;if(ee=z(ee,re),ee===0&&re.ended)return re.length===0&&se(this),null;var ie=re.needReadable;r("need readable",ie),(re.length===0||re.length-ee<re.highWaterMark)&&(ie=!0,r("length less than watermark",ie)),re.ended||re.reading?(ie=!1,r("reading or ended",ie)):ie&&(r("do read"),re.reading=!0,re.sync=!0,re.length===0&&(re.needReadable=!0),this._read(re.highWaterMark),re.sync=!1,re.reading||(ee=z(Te,re)));var q;return ee>0?q=me(ee,re):q=null,q===null?(re.needReadable=!0,ee=0):re.length-=ee,re.length===0&&(re.ended||(re.needReadable=!0),Te!==ee&&re.ended&&se(this)),q!==null&&this.emit("data",q),q};function A(ee,re){if(re.ended)return;if(re.decoder){var Te=re.decoder.end();Te&&Te.length&&(re.buffer.push(Te),re.length+=re.objectMode?1:Te.length)}re.ended=!0,B(ee)}function B(ee){var re=ee._readableState;re.needReadable=!1,re.emittedReadable||(r("emitReadable",re.flowing),re.emittedReadable=!0,re.sync?_.nextTick(U,ee):U(ee))}function U(ee){r("emit readable"),ee.emit("readable"),Re(ee)}function I(ee,re){re.readingMore||(re.readingMore=!0,_.nextTick(K,ee,re))}function K(ee,re){for(var Te=re.length;!re.reading&&!re.flowing&&!re.ended&&re.length<re.highWaterMark&&!(r("maybeReadMore read 0"),ee.read(0),Te===re.length);)Te=re.length;re.readingMore=!1}E.prototype._read=function(ee){this.emit("error",new Error("_read() is not implemented"))},E.prototype.pipe=function(ee,re){var Te=this,ie=this._readableState;switch(ie.pipesCount){case 0:ie.pipes=ee;break;case 1:ie.pipes=[ie.pipes,ee];break;default:ie.pipes.push(ee);break}ie.pipesCount+=1,r("pipe count=%d opts=%j",ie.pipesCount,re);var q=(!re||re.end!==!1)&&ee!==k.stdout&&ee!==k.stderr,Y=q?he:Fe;ie.endEmitted?_.nextTick(Y):Te.once("end",Y),ee.on("unpipe",X);function X(Ie,st){r("onunpipe"),Ie===Te&&(st&&st.hasUnpiped===!1&&(st.hasUnpiped=!0,He()))}function he(){r("onend"),ee.end()}var fe=Z(Te);ee.on("drain",fe);var Ee=!1;function He(){r("cleanup"),ee.removeListener("close",ut),ee.removeListener("finish",dt),ee.removeListener("drain",fe),ee.removeListener("error",it),ee.removeListener("unpipe",X),Te.removeListener("end",he),Te.removeListener("end",Fe),Te.removeListener("data",et),Ee=!0,ie.awaitDrain&&(!ee._writableState||ee._writableState.needDrain)&&fe()}var Qe=!1;Te.on("data",et);function et(Ie){r("ondata"),Qe=!1;var st=ee.write(Ie);st===!1&&!Qe&&((ie.pipesCount===1&&ie.pipes===ee||ie.pipesCount>1&&ge(ie.pipes,ee)!==-1)&&!Ee&&(r("false write response, pause",Te._readableState.awaitDrain),Te._readableState.awaitDrain++,Qe=!0),Te.pause())}function it(Ie){r("onerror",Ie),Fe(),ee.removeListener("error",it),c(ee,"error")===0&&ee.emit("error",Ie)}O(ee,"error",it);function ut(){ee.removeListener("finish",dt),Fe()}ee.once("close",ut);function dt(){r("onfinish"),ee.removeListener("close",ut),Fe()}ee.once("finish",dt);function Fe(){r("unpipe"),Te.unpipe(ee)}return ee.emit("pipe",Te),ie.flowing||(r("pipe resume"),Te.resume()),ee};function Z(ee){return function(){var re=ee._readableState;r("pipeOnDrain",re.awaitDrain),re.awaitDrain&&re.awaitDrain--,re.awaitDrain===0&&c(ee,"data")&&(re.flowing=!0,Re(ee))}}E.prototype.unpipe=function(ee){var re=this._readableState,Te={hasUnpiped:!1};if(re.pipesCount===0)return this;if(re.pipesCount===1)return ee&&ee!==re.pipes?this:(ee||(ee=re.pipes),re.pipes=null,re.pipesCount=0,re.flowing=!1,ee&&ee.emit("unpipe",this,Te),this);if(!ee){var ie=re.pipes,q=re.pipesCount;re.pipes=null,re.pipesCount=0,re.flowing=!1;for(var Y=0;Y<q;Y++)ie[Y].emit("unpipe",this,Te);return this}var X=ge(re.pipes,ee);return X===-1?this:(re.pipes.splice(X,1),re.pipesCount-=1,re.pipesCount===1&&(re.pipes=re.pipes[0]),ee.emit("unpipe",this,Te),this)},E.prototype.on=function(ee,re){var Te=a.prototype.on.call(this,ee,re);if(ee==="data")this._readableState.flowing!==!1&&this.resume();else if(ee==="readable"){var ie=this._readableState;!ie.endEmitted&&!ie.readableListening&&(ie.readableListening=ie.needReadable=!0,ie.emittedReadable=!1,ie.reading?ie.length&&B(this):_.nextTick(ue,this))}return Te},E.prototype.addListener=E.prototype.on;function ue(ee){r("readable nexttick read 0"),ee.read(0)}E.prototype.resume=function(){var ee=this._readableState;return ee.flowing||(r("resume"),ee.flowing=!0,de(this,ee)),this};function de(ee,re){re.resumeScheduled||(re.resumeScheduled=!0,_.nextTick(Ce,ee,re))}function Ce(ee,re){re.reading||(r("resume read 0"),ee.read(0)),re.resumeScheduled=!1,re.awaitDrain=0,ee.emit("resume"),Re(ee),re.flowing&&!re.reading&&ee.read(0)}E.prototype.pause=function(){return r("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(r("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function Re(ee){var re=ee._readableState;for(r("flow",re.flowing);re.flowing&&ee.read()!==null;);}E.prototype.wrap=function(ee){var re=this,Te=this._readableState,ie=!1;ee.on("end",function(){if(r("wrapped end"),Te.decoder&&!Te.ended){var X=Te.decoder.end();X&&X.length&&re.push(X)}re.push(null)}),ee.on("data",function(X){if(r("wrapped data"),Te.decoder&&(X=Te.decoder.write(X)),Te.objectMode&&X==null)return;if(!Te.objectMode&&(!X||!X.length))return;var he=re.push(X);he||(ie=!0,ee.pause())});for(var q in ee)this[q]===void 0&&typeof ee[q]=="function"&&(this[q]=function(X){return function(){return ee[X].apply(ee,arguments)}}(q));for(var Y=0;Y<R.length;Y++)ee.on(R[Y],this.emit.bind(this,R[Y]));return this._read=function(X){r("wrapped _read",X),ie&&(ie=!1,ee.resume())},this},Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),E._fromList=me;function me(ee,re){if(re.length===0)return null;var Te;return re.objectMode?Te=re.buffer.shift():!ee||ee>=re.length?(re.decoder?Te=re.buffer.join(""):re.buffer.length===1?Te=re.buffer.head.data:Te=re.buffer.concat(re.length),re.buffer.clear()):Te=Oe(ee,re.buffer,re.decoder),Te}function Oe(ee,re,Te){var ie;return ee<re.head.data.length?(ie=re.head.data.slice(0,ee),re.head.data=re.head.data.slice(ee)):ee===re.head.data.length?ie=re.shift():ie=Te?be(ee,re):ce(ee,re),ie}function be(ee,re){var Te=re.head,ie=1,q=Te.data;for(ee-=q.length;Te=Te.next;){var Y=Te.data,X=ee>Y.length?Y.length:ee;if(X===Y.length?q+=Y:q+=Y.slice(0,ee),ee-=X,ee===0){X===Y.length?(++ie,Te.next?re.head=Te.next:re.head=re.tail=null):(re.head=Te,Te.data=Y.slice(X));break}++ie}return re.length-=ie,q}function ce(ee,re){var Te=i.allocUnsafe(ee),ie=re.head,q=1;for(ie.data.copy(Te),ee-=ie.data.length;ie=ie.next;){var Y=ie.data,X=ee>Y.length?Y.length:ee;if(Y.copy(Te,Te.length-ee,0,X),ee-=X,ee===0){X===Y.length?(++q,ie.next?re.head=ie.next:re.head=re.tail=null):(re.head=ie,ie.data=Y.slice(X));break}++q}return re.length-=q,Te}function se(ee){var re=ee._readableState;if(re.length>0)throw new Error('"endReadable()" called on non-empty stream');re.endEmitted||(re.ended=!0,_.nextTick(ne,re,ee))}function ne(ee,re){!ee.endEmitted&&ee.length===0&&(ee.endEmitted=!0,re.readable=!1,re.emit("end"))}function ge(ee,re){for(var Te=0,ie=ee.length;Te<ie;Te++)if(ee[Te]===re)return Te;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,D){"use strict";var k=H("babel-runtime/core-js/object/create"),g=C(k);function C(h){return h&&h.__esModule?h:{default:h}}J.exports=S;var M=H("./_stream_duplex"),m=(0,g.default)(H("core-util-is"));m.inherits=H("inherits"),m.inherits(S,M);function y(h,n){var c=this._transformState;c.transforming=!1;var a=c.writecb;if(!a)return this.emit("error",new Error("write callback called multiple times"));c.writechunk=null,c.writecb=null,n!=null&&this.push(n),a(h);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function S(h){if(!(this instanceof S))return new S(h);M.call(this,h),this._transformState={afterTransform:y.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,h&&(typeof h.transform=="function"&&(this._transform=h.transform),typeof h.flush=="function"&&(this._flush=h.flush)),this.on("prefinish",_)}function _(){var h=this;typeof this._flush=="function"?this._flush(function(n,c){t(h,n,c)}):t(this,null,null)}S.prototype.push=function(h,n){return this._transformState.needTransform=!1,M.prototype.push.call(this,h,n)},S.prototype._transform=function(h,n,c){throw new Error("_transform() is not implemented")},S.prototype._write=function(h,n,c){var a=this._transformState;if(a.writecb=c,a.writechunk=h,a.writeencoding=n,!a.transforming){var i=this._readableState;(a.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},S.prototype._read=function(h){var n=this._transformState;n.writechunk!==null&&n.writecb&&!n.transforming?(n.transforming=!0,this._transform(n.writechunk,n.writeencoding,n.afterTransform)):n.needTransform=!0},S.prototype._destroy=function(h,n){var c=this;M.prototype._destroy.call(this,h,function(a){n(a),c.emit("close")})};function t(h,n,c){if(n)return h.emit("error",n);if(c!=null&&h.push(c),h._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(h._transformState.transforming)throw new Error("Calling transform done when still transforming");return h.push(null)}},{"./_stream_duplex":214,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],218:[function(H,J,D){(function(k,g){"use strict";var C=H("babel-runtime/core-js/object/define-property"),M=a(C),m=H("babel-runtime/core-js/symbol/has-instance"),y=a(m),S=H("babel-runtime/core-js/symbol"),_=a(S),t=H("babel-runtime/core-js/object/create"),h=a(t),n=H("babel-runtime/core-js/set-immediate"),c=a(n);function a(ce){return ce&&ce.__esModule?ce:{default:ce}}var i=H("process-nextick-args");J.exports=F;function s(ce,se,ne){this.chunk=ce,this.encoding=se,this.callback=ne,this.next=null}function d(ce){var se=this;this.next=null,this.entry=null,this.finish=function(){be(se,ce)}}var f=!k.browser&&["v0.10","v0.9."].indexOf(k.version.slice(0,5))>-1?c.default:i.nextTick,l;F.WritableState=w;var o=(0,h.default)(H("core-util-is"));o.inherits=H("inherits");var r={deprecate:H("util-deprecate")},x=H("./internal/streams/stream"),v=H("safe-buffer").Buffer,p=g.Uint8Array||function(){};function R(ce){return v.from(ce)}function O(ce){return v.isBuffer(ce)||ce instanceof p}var b=H("./internal/streams/destroy");o.inherits(F,x);function E(){}function w(ce,se){l=l||H("./_stream_duplex"),ce=ce||{};var ne=se instanceof l;this.objectMode=!!ce.objectMode,ne&&(this.objectMode=this.objectMode||!!ce.writableObjectMode);var ge=ce.highWaterMark,ee=ce.writableHighWaterMark,re=this.objectMode?16:16*1024;ge||ge===0?this.highWaterMark=ge:ne&&(ee||ee===0)?this.highWaterMark=ee:this.highWaterMark=re,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 Te=ce.decodeStrings===!1;this.decodeStrings=!Te,this.defaultEncoding=ce.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ie){I(se,ie)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new d(this)}w.prototype.getBuffer=function(){for(var se=this.bufferedRequest,ne=[];se;)ne.push(se),se=se.next;return ne},function(){try{Object.defineProperty(w.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(ce){}}();var T;typeof _.default=="function"&&y.default&&typeof Function.prototype[y.default]=="function"?(T=Function.prototype[y.default],(0,M.default)(F,y.default,{value:function(se){return T.call(this,se)?!0:this!==F?!1:se&&se._writableState instanceof w}})):T=function(se){return se instanceof this};function F(ce){if(l=l||H("./_stream_duplex"),!T.call(F,this)&&!(this instanceof l))return new F(ce);this._writableState=new w(ce,this),this.writable=!0,ce&&(typeof ce.write=="function"&&(this._write=ce.write),typeof ce.writev=="function"&&(this._writev=ce.writev),typeof ce.destroy=="function"&&(this._destroy=ce.destroy),typeof ce.final=="function"&&(this._final=ce.final)),x.call(this)}F.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function N(ce,se){var ne=new Error("write after end");ce.emit("error",ne),i.nextTick(se,ne)}function L(ce,se,ne,ge){var ee=!0,re=!1;return ne===null?re=new TypeError("May not write null values to stream"):typeof ne!="string"&&ne!==void 0&&!se.objectMode&&(re=new TypeError("Invalid non-string/buffer chunk")),re&&(ce.emit("error",re),i.nextTick(ge,re),ee=!1),ee}F.prototype.write=function(ce,se,ne){var ge=this._writableState,ee=!1,re=!ge.objectMode&&O(ce);return re&&!v.isBuffer(ce)&&(ce=R(ce)),typeof se=="function"&&(ne=se,se=null),re?se="buffer":se||(se=ge.defaultEncoding),typeof ne!="function"&&(ne=E),ge.ended?N(this,ne):(re||L(this,ge,ce,ne))&&(ge.pendingcb++,ee=z(this,ge,re,ce,se,ne)),ee},F.prototype.cork=function(){var ce=this._writableState;ce.corked++},F.prototype.uncork=function(){var ce=this._writableState;ce.corked&&(ce.corked--,!ce.writing&&!ce.corked&&!ce.finished&&!ce.bufferProcessing&&ce.bufferedRequest&&ue(this,ce))},F.prototype.setDefaultEncoding=function(se){if(typeof se=="string"&&(se=se.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((se+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+se);return this._writableState.defaultEncoding=se,this};function G(ce,se,ne){return!ce.objectMode&&ce.decodeStrings!==!1&&typeof se=="string"&&(se=v.from(se,ne)),se}Object.defineProperty(F.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function z(ce,se,ne,ge,ee,re){if(!ne){var Te=G(se,ge,ee);ge!==Te&&(ne=!0,ee="buffer",ge=Te)}var ie=se.objectMode?1:ge.length;se.length+=ie;var q=se.length<se.highWaterMark;if(q||(se.needDrain=!0),se.writing||se.corked){var Y=se.lastBufferedRequest;se.lastBufferedRequest={chunk:ge,encoding:ee,isBuf:ne,callback:re,next:null},Y?Y.next=se.lastBufferedRequest:se.bufferedRequest=se.lastBufferedRequest,se.bufferedRequestCount+=1}else A(ce,se,!1,ie,ge,ee,re);return q}function A(ce,se,ne,ge,ee,re,Te){se.writelen=ge,se.writecb=Te,se.writing=!0,se.sync=!0,ne?ce._writev(ee,se.onwrite):ce._write(ee,re,se.onwrite),se.sync=!1}function B(ce,se,ne,ge,ee){--se.pendingcb,ne?(i.nextTick(ee,ge),i.nextTick(me,ce,se),ce._writableState.errorEmitted=!0,ce.emit("error",ge)):(ee(ge),ce._writableState.errorEmitted=!0,ce.emit("error",ge),me(ce,se))}function U(ce){ce.writing=!1,ce.writecb=null,ce.length-=ce.writelen,ce.writelen=0}function I(ce,se){var ne=ce._writableState,ge=ne.sync,ee=ne.writecb;if(U(ne),se)B(ce,ne,ge,se,ee);else{var re=de(ne);!re&&!ne.corked&&!ne.bufferProcessing&&ne.bufferedRequest&&ue(ce,ne),ge?f(K,ce,ne,re,ee):K(ce,ne,re,ee)}}function K(ce,se,ne,ge){ne||Z(ce,se),se.pendingcb--,ge(),me(ce,se)}function Z(ce,se){se.length===0&&se.needDrain&&(se.needDrain=!1,ce.emit("drain"))}function ue(ce,se){se.bufferProcessing=!0;var ne=se.bufferedRequest;if(ce._writev&&ne&&ne.next){var ge=se.bufferedRequestCount,ee=new Array(ge),re=se.corkedRequestsFree;re.entry=ne;for(var Te=0,ie=!0;ne;)ee[Te]=ne,ne.isBuf||(ie=!1),ne=ne.next,Te+=1;ee.allBuffers=ie,A(ce,se,!0,se.length,ee,"",re.finish),se.pendingcb++,se.lastBufferedRequest=null,re.next?(se.corkedRequestsFree=re.next,re.next=null):se.corkedRequestsFree=new d(se),se.bufferedRequestCount=0}else{for(;ne;){var q=ne.chunk,Y=ne.encoding,X=ne.callback,he=se.objectMode?1:q.length;if(A(ce,se,!1,he,q,Y,X),ne=ne.next,se.bufferedRequestCount--,se.writing)break}ne===null&&(se.lastBufferedRequest=null)}se.bufferedRequest=ne,se.bufferProcessing=!1}F.prototype._write=function(ce,se,ne){ne(new Error("_write() is not implemented"))},F.prototype._writev=null,F.prototype.end=function(ce,se,ne){var ge=this._writableState;typeof ce=="function"?(ne=ce,ce=null,se=null):typeof se=="function"&&(ne=se,se=null),ce!=null&&this.write(ce,se),ge.corked&&(ge.corked=1,this.uncork()),!ge.ending&&!ge.finished&&Oe(this,ge,ne)};function de(ce){return ce.ending&&ce.length===0&&ce.bufferedRequest===null&&!ce.finished&&!ce.writing}function Ce(ce,se){ce._final(function(ne){se.pendingcb--,ne&&ce.emit("error",ne),se.prefinished=!0,ce.emit("prefinish"),me(ce,se)})}function Re(ce,se){!se.prefinished&&!se.finalCalled&&(typeof ce._final=="function"?(se.pendingcb++,se.finalCalled=!0,i.nextTick(Ce,ce,se)):(se.prefinished=!0,ce.emit("prefinish")))}function me(ce,se){var ne=de(se);return ne&&(Re(ce,se),se.pendingcb===0&&(se.finished=!0,ce.emit("finish"))),ne}function Oe(ce,se,ne){se.ending=!0,me(ce,se),ne&&(se.finished?i.nextTick(ne):ce.once("finish",ne)),se.ended=!0,ce.writable=!1}function be(ce,se,ne){var ge=ce.entry;for(ce.entry=null;ge;){var ee=ge.callback;se.pendingcb--,ee(ne),ge=ge.next}se.corkedRequestsFree?se.corkedRequestsFree.next=ce:se.corkedRequestsFree=ce}Object.defineProperty(F.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(se){if(!this._writableState)return;this._writableState.destroyed=se}}),F.prototype.destroy=b.destroy,F.prototype._undestroy=b.undestroy,F.prototype._destroy=function(ce,se){this.end(),se(ce)}}).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,D){"use strict";function k(m,y){if(!(m instanceof y))throw new TypeError("Cannot call a class as a function")}var g=H("safe-buffer").Buffer,C=H("util");function M(m,y,S){m.copy(y,S)}J.exports=function(){function m(){k(this,m),this.head=null,this.tail=null,this.length=0}return m.prototype.push=function(S){var _={data:S,next:null};this.length>0?this.tail.next=_:this.head=_,this.tail=_,++this.length},m.prototype.unshift=function(S){var _={data:S,next:this.head};this.length===0&&(this.tail=_),this.head=_,++this.length},m.prototype.shift=function(){if(this.length===0)return;var S=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,S},m.prototype.clear=function(){this.head=this.tail=null,this.length=0},m.prototype.join=function(S){if(this.length===0)return"";for(var _=this.head,t=""+_.data;_=_.next;)t+=S+_.data;return t},m.prototype.concat=function(S){if(this.length===0)return g.alloc(0);if(this.length===1)return this.head.data;for(var _=g.allocUnsafe(S>>>0),t=this.head,h=0;t;)M(t.data,_,h),h+=t.data.length,t=t.next;return _},m}(),C&&C.inspect&&C.inspect.custom&&(J.exports.prototype[C.inspect.custom]=function(){var m=C.inspect({length:this.length});return this.constructor.name+" "+m})},{"safe-buffer":228,util:71}],220:[function(H,J,D){"use strict";var k=H("process-nextick-args");function g(m,y){var S=this,_=this._readableState&&this._readableState.destroyed,t=this._writableState&&this._writableState.destroyed;return _||t?(y?y(m):m&&(!this._writableState||!this._writableState.errorEmitted)&&k.nextTick(M,this,m),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(m||null,function(h){!y&&h?(k.nextTick(M,S,h),S._writableState&&(S._writableState.errorEmitted=!0)):y&&y(h)}),this)}function C(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function M(m,y){m.emit("error",y)}J.exports={destroy:g,undestroy:C}},{"process-nextick-args":207}],221:[function(H,J,D){"use strict";J.exports=H("events").EventEmitter},{events:192}],222:[function(H,J,D){J.exports=H("./readable").PassThrough},{"./readable":223}],223:[function(H,J,D){D=J.exports=H("./lib/_stream_readable.js"),D.Stream=D,D.Readable=D,D.Writable=H("./lib/_stream_writable.js"),D.Duplex=H("./lib/_stream_duplex.js"),D.Transform=H("./lib/_stream_transform.js"),D.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,D){J.exports=H("./readable").Transform},{"./readable":223}],225:[function(H,J,D){J.exports=H("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(H,J,D){var k=function(){return this}()||Function("return this")(),g=k.regeneratorRuntime&&Object.getOwnPropertyNames(k).indexOf("regeneratorRuntime")>=0,C=g&&k.regeneratorRuntime;if(k.regeneratorRuntime=void 0,J.exports=H("./runtime"),g)k.regeneratorRuntime=C;else try{delete k.regeneratorRuntime}catch(M){k.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(H,J,D){!function(k){"use strict";var g=Object.prototype,C=g.hasOwnProperty,M,m=typeof Symbol=="function"?Symbol:{},y=m.iterator||"@@iterator",S=m.asyncIterator||"@@asyncIterator",_=m.toStringTag||"@@toStringTag",t=typeof J=="object",h=k.regeneratorRuntime;if(h){t&&(J.exports=h);return}h=k.regeneratorRuntime=t?J.exports:{};function n(z,A,B,U){var I=A&&A.prototype instanceof l?A:l,K=Object.create(I.prototype),Z=new N(U||[]);return K._invoke=E(z,B,Z),K}h.wrap=n;function c(z,A,B){try{return{type:"normal",arg:z.call(A,B)}}catch(U){return{type:"throw",arg:U}}}var a="suspendedStart",i="suspendedYield",s="executing",d="completed",f={};function l(){}function o(){}function r(){}var x={};x[y]=function(){return this};var v=Object.getPrototypeOf,p=v&&v(v(L([])));p&&p!==g&&C.call(p,y)&&(x=p);var R=r.prototype=l.prototype=Object.create(x);o.prototype=R.constructor=r,r.constructor=o,r[_]=o.displayName="GeneratorFunction";function O(z){["next","throw","return"].forEach(function(A){z[A]=function(B){return this._invoke(A,B)}})}h.isGeneratorFunction=function(z){var A=typeof z=="function"&&z.constructor;return A?A===o||(A.displayName||A.name)==="GeneratorFunction":!1},h.mark=function(z){return Object.setPrototypeOf?Object.setPrototypeOf(z,r):(z.__proto__=r,_ in z||(z[_]="GeneratorFunction")),z.prototype=Object.create(R),z},h.awrap=function(z){return{__await:z}};function b(z){function A(I,K,Z,ue){var de=c(z[I],z,K);if(de.type==="throw")ue(de.arg);else{var Ce=de.arg,Re=Ce.value;return Re&&typeof Re=="object"&&C.call(Re,"__await")?Promise.resolve(Re.__await).then(function(me){A("next",me,Z,ue)},function(me){A("throw",me,Z,ue)}):Promise.resolve(Re).then(function(me){Ce.value=me,Z(Ce)},ue)}}var B;function U(I,K){function Z(){return new Promise(function(ue,de){A(I,K,ue,de)})}return B=B?B.then(Z,Z):Z()}this._invoke=U}O(b.prototype),b.prototype[S]=function(){return this},h.AsyncIterator=b,h.async=function(z,A,B,U){var I=new b(n(z,A,B,U));return h.isGeneratorFunction(A)?I:I.next().then(function(K){return K.done?K.value:I.next()})};function E(z,A,B){var U=a;return function(K,Z){if(U===s)throw new Error("Generator is already running");if(U===d){if(K==="throw")throw Z;return G()}for(B.method=K,B.arg=Z;;){var ue=B.delegate;if(ue){var de=w(ue,B);if(de){if(de===f)continue;return de}}if(B.method==="next")B.sent=B._sent=B.arg;else if(B.method==="throw"){if(U===a)throw U=d,B.arg;B.dispatchException(B.arg)}else B.method==="return"&&B.abrupt("return",B.arg);U=s;var Ce=c(z,A,B);if(Ce.type==="normal"){if(U=B.done?d:i,Ce.arg===f)continue;return{value:Ce.arg,done:B.done}}else Ce.type==="throw"&&(U=d,B.method="throw",B.arg=Ce.arg)}}}function w(z,A){var B=z.iterator[A.method];if(B===M){if(A.delegate=null,A.method==="throw"){if(z.iterator.return&&(A.method="return",A.arg=M,w(z,A),A.method==="throw"))return f;A.method="throw",A.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var U=c(B,z.iterator,A.arg);if(U.type==="throw")return A.method="throw",A.arg=U.arg,A.delegate=null,f;var I=U.arg;if(!I)return A.method="throw",A.arg=new TypeError("iterator result is not an object"),A.delegate=null,f;if(I.done)A[z.resultName]=I.value,A.next=z.nextLoc,A.method!=="return"&&(A.method="next",A.arg=M);else return I;return A.delegate=null,f}O(R),R[_]="Generator",R[y]=function(){return this},R.toString=function(){return"[object Generator]"};function T(z){var A={tryLoc:z[0]};1 in z&&(A.catchLoc=z[1]),2 in z&&(A.finallyLoc=z[2],A.afterLoc=z[3]),this.tryEntries.push(A)}function F(z){var A=z.completion||{};A.type="normal",delete A.arg,z.completion=A}function N(z){this.tryEntries=[{tryLoc:"root"}],z.forEach(T,this),this.reset(!0)}h.keys=function(z){var A=[];for(var B in z)A.push(B);return A.reverse(),function U(){for(;A.length;){var I=A.pop();if(I in z)return U.value=I,U.done=!1,U}return U.done=!0,U}};function L(z){if(z){var A=z[y];if(A)return A.call(z);if(typeof z.next=="function")return z;if(!isNaN(z.length)){var B=-1,U=function I(){for(;++B<z.length;)if(C.call(z,B))return I.value=z[B],I.done=!1,I;return I.value=M,I.done=!0,I};return U.next=U}}return{next:G}}h.values=L;function G(){return{value:M,done:!0}}N.prototype={constructor:N,reset:function(z){if(this.prev=0,this.next=0,this.sent=this._sent=M,this.done=!1,this.delegate=null,this.method="next",this.arg=M,this.tryEntries.forEach(F),!z)for(var A in this)A.charAt(0)==="t"&&C.call(this,A)&&!isNaN(+A.slice(1))&&(this[A]=M)},stop:function(){this.done=!0;var z=this.tryEntries[0],A=z.completion;if(A.type==="throw")throw A.arg;return this.rval},dispatchException:function(z){if(this.done)throw z;var A=this;function B(de,Ce){return K.type="throw",K.arg=z,A.next=de,Ce&&(A.method="next",A.arg=M),!!Ce}for(var U=this.tryEntries.length-1;U>=0;--U){var I=this.tryEntries[U],K=I.completion;if(I.tryLoc==="root")return B("end");if(I.tryLoc<=this.prev){var Z=C.call(I,"catchLoc"),ue=C.call(I,"finallyLoc");if(Z&&ue){if(this.prev<I.catchLoc)return B(I.catchLoc,!0);if(this.prev<I.finallyLoc)return B(I.finallyLoc)}else if(Z){if(this.prev<I.catchLoc)return B(I.catchLoc,!0)}else if(ue){if(this.prev<I.finallyLoc)return B(I.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(z,A){for(var B=this.tryEntries.length-1;B>=0;--B){var U=this.tryEntries[B];if(U.tryLoc<=this.prev&&C.call(U,"finallyLoc")&&this.prev<U.finallyLoc){var I=U;break}}I&&(z==="break"||z==="continue")&&I.tryLoc<=A&&A<=I.finallyLoc&&(I=null);var K=I?I.completion:{};return K.type=z,K.arg=A,I?(this.method="next",this.next=I.finallyLoc,f):this.complete(K)},complete:function(z,A){if(z.type==="throw")throw z.arg;return z.type==="break"||z.type==="continue"?this.next=z.arg:z.type==="return"?(this.rval=this.arg=z.arg,this.method="return",this.next="end"):z.type==="normal"&&A&&(this.next=A),f},finish:function(z){for(var A=this.tryEntries.length-1;A>=0;--A){var B=this.tryEntries[A];if(B.finallyLoc===z)return this.complete(B.completion,B.afterLoc),F(B),f}},catch:function(z){for(var A=this.tryEntries.length-1;A>=0;--A){var B=this.tryEntries[A];if(B.tryLoc===z){var U=B.completion;if(U.type==="throw"){var I=U.arg;F(B)}return I}}throw new Error("illegal catch attempt")},delegateYield:function(z,A,B){return this.delegate={iterator:L(z),resultName:A,nextLoc:B},this.method==="next"&&(this.arg=M),f}}}(function(){return this}()||Function("return this")())},{}],228:[function(H,J,D){var k=H("buffer"),g=k.Buffer;function C(m,y){for(var S in m)y[S]=m[S]}g.from&&g.alloc&&g.allocUnsafe&&g.allocUnsafeSlow?J.exports=k:(C(k,D),D.Buffer=M);function M(m,y,S){return g(m,y,S)}C(g,M),M.from=function(m,y,S){if(typeof m=="number")throw new TypeError("Argument must not be a number");return g(m,y,S)},M.alloc=function(m,y,S){if(typeof m!="number")throw new TypeError("Argument must be a number");var _=g(m);return y!==void 0?typeof S=="string"?_.fill(y,S):_.fill(y):_.fill(0),_},M.allocUnsafe=function(m){if(typeof m!="number")throw new TypeError("Argument must be a number");return g(m)},M.allocUnsafeSlow=function(m){if(typeof m!="number")throw new TypeError("Argument must be a number");return k.SlowBuffer(m)}},{buffer:73}],229:[function(H,J,D){(function(k){"use strict";var g=H("babel-runtime/core-js/string/from-code-point"),C=i(g),M=H("babel-runtime/core-js/json/stringify"),m=i(M),y=H("babel-runtime/helpers/typeof"),S=i(y),_=H("babel-runtime/core-js/object/define-property"),t=i(_),h=H("babel-runtime/core-js/object/keys"),n=i(h),c=H("babel-runtime/core-js/object/create"),a=i(c);function i(s){return s&&s.__esModule?s:{default:s}}(function(s){s.parser=function(Y,X){return new f(Y,X)},s.SAXParser=f,s.SAXStream=R,s.createStream=p,s.MAX_BUFFER_LENGTH=64*1024;var d=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];s.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function f(Y,X){if(!(this instanceof f))return new f(Y,X);var he=this;o(he),he.q=he.c="",he.bufferCheckPosition=s.MAX_BUFFER_LENGTH,he.opt=X||{},he.opt.lowercase=he.opt.lowercase||he.opt.lowercasetags,he.looseCase=he.opt.lowercase?"toLowerCase":"toUpperCase",he.tags=[],he.closed=he.closedRoot=he.sawRoot=!1,he.tag=he.error=null,he.strict=!!Y,he.noscript=!!(Y||he.opt.noscript),he.state=K.BEGIN,he.strictEntities=he.opt.strictEntities,he.ENTITIES=he.strictEntities?(0,a.default)(s.XML_ENTITIES):(0,a.default)(s.ENTITIES),he.attribList=[],he.opt.xmlns&&(he.ns=(0,a.default)(T)),he.trackPosition=he.opt.position!==!1,he.trackPosition&&(he.position=he.line=he.column=0),ue(he,"onready")}a.default||(Object.create=function(Y){function X(){}X.prototype=Y;var he=new X;return he}),n.default||(Object.keys=function(Y){var X=[];for(var he in Y)Y.hasOwnProperty(he)&&X.push(he);return X});function l(Y){for(var X=Math.max(s.MAX_BUFFER_LENGTH,10),he=0,fe=0,Ee=d.length;fe<Ee;fe++){var He=Y[d[fe]].length;if(He>X)switch(d[fe]){case"textNode":Ce(Y);break;case"cdata":de(Y,"oncdata",Y.cdata),Y.cdata="";break;case"script":de(Y,"onscript",Y.script),Y.script="";break;default:me(Y,"Max buffer length exceeded: "+d[fe])}he=Math.max(he,He)}var Qe=s.MAX_BUFFER_LENGTH-he;Y.bufferCheckPosition=Qe+Y.position}function o(Y){for(var X=0,he=d.length;X<he;X++)Y[d[X]]=""}function r(Y){Ce(Y),Y.cdata!==""&&(de(Y,"oncdata",Y.cdata),Y.cdata=""),Y.script!==""&&(de(Y,"onscript",Y.script),Y.script="")}f.prototype={end:function(){Oe(this)},write:q,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){r(this)}};var x;try{x=H("stream").Stream}catch(Y){x=function(){}}var v=s.EVENTS.filter(function(Y){return Y!=="error"&&Y!=="end"});function p(Y,X){return new R(Y,X)}function R(Y,X){if(!(this instanceof R))return new R(Y,X);x.apply(this),this._parser=new f(Y,X),this.writable=!0,this.readable=!0;var he=this;this._parser.onend=function(){he.emit("end")},this._parser.onerror=function(fe){he.emit("error",fe),he._parser.error=null},this._decoder=null,v.forEach(function(fe){(0,t.default)(he,"on"+fe,{get:function(){return he._parser["on"+fe]},set:function(He){if(!He)return he.removeAllListeners(fe),he._parser["on"+fe]=He,He;he.on(fe,He)},enumerable:!0,configurable:!1})})}R.prototype=(0,a.default)(x.prototype,{constructor:{value:R}}),R.prototype.write=function(Y){if(typeof k=="function"&&typeof k.isBuffer=="function"&&k.isBuffer(Y)){if(!this._decoder){var X=H("string_decoder").StringDecoder;this._decoder=new X("utf8")}Y=this._decoder.write(Y)}return this._parser.write(Y.toString()),this.emit("data",Y),!0},R.prototype.end=function(Y){return Y&&Y.length&&this.write(Y),this._parser.end(),!0},R.prototype.on=function(Y,X){var he=this;return!he._parser["on"+Y]&&v.indexOf(Y)!==-1&&(he._parser["on"+Y]=function(){var fe=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);fe.splice(0,0,Y),he.emit.apply(he,fe)}),x.prototype.on.call(he,Y,X)};var O="[CDATA[",b="DOCTYPE",E="http://www.w3.org/XML/1998/namespace",w="http://www.w3.org/2000/xmlns/",T={xml:E,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]/,N=/[:_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-]/,L=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,G=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function z(Y){return Y===" "||Y===`
`||Y==="\r"||Y===" "}function A(Y){return Y==='"'||Y==="'"}function B(Y){return Y===">"||z(Y)}function U(Y,X){return Y.test(X)}function I(Y,X){return!U(Y,X)}var K=0;s.STATE={BEGIN:K++,BEGIN_WHITESPACE:K++,TEXT:K++,TEXT_ENTITY:K++,OPEN_WAKA:K++,SGML_DECL:K++,SGML_DECL_QUOTED:K++,DOCTYPE:K++,DOCTYPE_QUOTED:K++,DOCTYPE_DTD:K++,DOCTYPE_DTD_QUOTED:K++,COMMENT_STARTING:K++,COMMENT:K++,COMMENT_ENDING:K++,COMMENT_ENDED:K++,CDATA:K++,CDATA_ENDING:K++,CDATA_ENDING_2:K++,PROC_INST:K++,PROC_INST_BODY:K++,PROC_INST_ENDING:K++,OPEN_TAG:K++,OPEN_TAG_SLASH:K++,ATTRIB:K++,ATTRIB_NAME:K++,ATTRIB_NAME_SAW_WHITE:K++,ATTRIB_VALUE:K++,ATTRIB_VALUE_QUOTED:K++,ATTRIB_VALUE_CLOSED:K++,ATTRIB_VALUE_UNQUOTED:K++,ATTRIB_VALUE_ENTITY_Q:K++,ATTRIB_VALUE_ENTITY_U:K++,CLOSE_TAG:K++,CLOSE_TAG_SAW_WHITE:K++,SCRIPT:K++,SCRIPT_ENDING:K++},s.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},s.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,n.default)(s.ENTITIES).forEach(function(Y){var X=s.ENTITIES[Y],he=typeof X=="number"?String.fromCharCode(X):X;s.ENTITIES[Y]=he});for(var Z in s.STATE)s.STATE[s.STATE[Z]]=Z;K=s.STATE;function ue(Y,X,he){Y[X]&&Y[X](he)}function de(Y,X,he){Y.textNode&&Ce(Y),ue(Y,X,he)}function Ce(Y){Y.textNode=Re(Y.opt,Y.textNode),Y.textNode&&ue(Y,"ontext",Y.textNode),Y.textNode=""}function Re(Y,X){return Y.trim&&(X=X.trim()),Y.normalize&&(X=X.replace(/\s+/g," ")),X}function me(Y,X){return Ce(Y),Y.trackPosition&&(X+=`
Line: `+Y.line+`
Column: `+Y.column+`
Char: `+Y.c),X=new Error(X),Y.error=X,ue(Y,"onerror",X),Y}function Oe(Y){return Y.sawRoot&&!Y.closedRoot&&be(Y,"Unclosed root tag"),Y.state!==K.BEGIN&&Y.state!==K.BEGIN_WHITESPACE&&Y.state!==K.TEXT&&me(Y,"Unexpected end"),Ce(Y),Y.c="",Y.closed=!0,ue(Y,"onend"),f.call(Y,Y.strict,Y.opt),Y}function be(Y,X){if((typeof Y=="undefined"?"undefined":(0,S.default)(Y))!=="object"||!(Y instanceof f))throw new Error("bad call to strictFail");Y.strict&&me(Y,X)}function ce(Y){Y.strict||(Y.tagName=Y.tagName[Y.looseCase]());var X=Y.tags[Y.tags.length-1]||Y,he=Y.tag={name:Y.tagName,attributes:{}};Y.opt.xmlns&&(he.ns=X.ns),Y.attribList.length=0,de(Y,"onopentagstart",he)}function se(Y,X){var he=Y.indexOf(":"),fe=he<0?["",Y]:Y.split(":"),Ee=fe[0],He=fe[1];return X&&Y==="xmlns"&&(Ee="xmlns",He=""),{prefix:Ee,local:He}}function ne(Y){if(Y.strict||(Y.attribName=Y.attribName[Y.looseCase]()),Y.attribList.indexOf(Y.attribName)!==-1||Y.tag.attributes.hasOwnProperty(Y.attribName)){Y.attribName=Y.attribValue="";return}if(Y.opt.xmlns){var X=se(Y.attribName,!0),he=X.prefix,fe=X.local;if(he==="xmlns")if(fe==="xml"&&Y.attribValue!==E)be(Y,"xml: prefix must be bound to "+E+`
Actual: `+Y.attribValue);else if(fe==="xmlns"&&Y.attribValue!==w)be(Y,"xmlns: prefix must be bound to "+w+`
Actual: `+Y.attribValue);else{var Ee=Y.tag,He=Y.tags[Y.tags.length-1]||Y;Ee.ns===He.ns&&(Ee.ns=(0,a.default)(He.ns)),Ee.ns[fe]=Y.attribValue}Y.attribList.push([Y.attribName,Y.attribValue])}else Y.tag.attributes[Y.attribName]=Y.attribValue,de(Y,"onattribute",{name:Y.attribName,value:Y.attribValue});Y.attribName=Y.attribValue=""}function ge(Y,X){if(Y.opt.xmlns){var he=Y.tag,fe=se(Y.tagName);he.prefix=fe.prefix,he.local=fe.local,he.uri=he.ns[fe.prefix]||"",he.prefix&&!he.uri&&(be(Y,"Unbound namespace prefix: "+(0,m.default)(Y.tagName)),he.uri=fe.prefix);var Ee=Y.tags[Y.tags.length-1]||Y;he.ns&&Ee.ns!==he.ns&&(0,n.default)(he.ns).forEach(function(Ze){de(Y,"onopennamespace",{prefix:Ze,uri:he.ns[Ze]})});for(var He=0,Qe=Y.attribList.length;He<Qe;He++){var et=Y.attribList[He],it=et[0],ut=et[1],dt=se(it,!0),Fe=dt.prefix,Ie=dt.local,st=Fe===""?"":he.ns[Fe]||"",ft={name:it,value:ut,prefix:Fe,local:Ie,uri:st};Fe&&Fe!=="xmlns"&&!st&&(be(Y,"Unbound namespace prefix: "+(0,m.default)(Fe)),ft.uri=Fe),Y.tag.attributes[it]=ft,de(Y,"onattribute",ft)}Y.attribList.length=0}Y.tag.isSelfClosing=!!X,Y.sawRoot=!0,Y.tags.push(Y.tag),de(Y,"onopentag",Y.tag),X||(!Y.noscript&&Y.tagName.toLowerCase()==="script"?Y.state=K.SCRIPT:Y.state=K.TEXT,Y.tag=null,Y.tagName=""),Y.attribName=Y.attribValue="",Y.attribList.length=0}function ee(Y){if(!Y.tagName){be(Y,"Weird empty close tag."),Y.textNode+="</>",Y.state=K.TEXT;return}if(Y.script){if(Y.tagName!=="script"){Y.script+="</"+Y.tagName+">",Y.tagName="",Y.state=K.SCRIPT;return}de(Y,"onscript",Y.script),Y.script=""}var X=Y.tags.length,he=Y.tagName;Y.strict||(he=he[Y.looseCase]());for(var fe=he;X--;){var Ee=Y.tags[X];if(Ee.name!==fe)be(Y,"Unexpected close tag");else break}if(X<0){be(Y,"Unmatched closing tag: "+Y.tagName),Y.textNode+="</"+Y.tagName+">",Y.state=K.TEXT;return}Y.tagName=he;for(var He=Y.tags.length;He-- >X;){var Qe=Y.tag=Y.tags.pop();Y.tagName=Y.tag.name,de(Y,"onclosetag",Y.tagName);var et={};for(var it in Qe.ns)et[it]=Qe.ns[it];var ut=Y.tags[Y.tags.length-1]||Y;Y.opt.xmlns&&Qe.ns!==ut.ns&&(0,n.default)(Qe.ns).forEach(function(dt){var Fe=Qe.ns[dt];de(Y,"onclosenamespace",{prefix:dt,uri:Fe})})}X===0&&(Y.closedRoot=!0),Y.tagName=Y.attribValue=Y.attribName="",Y.attribList.length=0,Y.state=K.TEXT}function re(Y){var X=Y.entity,he=X.toLowerCase(),fe,Ee="";return Y.ENTITIES[X]?Y.ENTITIES[X]:Y.ENTITIES[he]?Y.ENTITIES[he]:(X=he,X.charAt(0)==="#"&&(X.charAt(1)==="x"?(X=X.slice(2),fe=parseInt(X,16),Ee=fe.toString(16)):(X=X.slice(1),fe=parseInt(X,10),Ee=fe.toString(10))),X=X.replace(/^0+/,""),isNaN(fe)||Ee.toLowerCase()!==X?(be(Y,"Invalid character entity"),"&"+Y.entity+";"):(0,C.default)(fe))}function Te(Y,X){X==="<"?(Y.state=K.OPEN_WAKA,Y.startTagPosition=Y.position):z(X)||(be(Y,"Non-whitespace before first tag."),Y.textNode=X,Y.state=K.TEXT)}function ie(Y,X){var he="";return X<Y.length&&(he=Y.charAt(X)),he}function q(Y){var X=this;if(this.error)throw this.error;if(X.closed)return me(X,"Cannot write after close. Assign an onready handler.");if(Y===null)return Oe(X);(typeof Y=="undefined"?"undefined":(0,S.default)(Y))==="object"&&(Y=Y.toString());for(var he=0,fe="";!(fe=ie(Y,he++),X.c=fe,!fe);){X.trackPosition&&(X.position++,fe===`
`?(X.line++,X.column=0):X.column++);switch(X.state){case K.BEGIN:if(X.state=K.BEGIN_WHITESPACE,fe==="\uFEFF")continue;Te(X,fe);continue;case K.BEGIN_WHITESPACE:Te(X,fe);continue;case K.TEXT:if(X.sawRoot&&!X.closedRoot){for(var Ee=he-1;fe&&fe!=="<"&&fe!=="&";)fe=ie(Y,he++),fe&&X.trackPosition&&(X.position++,fe===`
`?(X.line++,X.column=0):X.column++);X.textNode+=Y.substring(Ee,he-1)}fe==="<"&&!(X.sawRoot&&X.closedRoot&&!X.strict)?(X.state=K.OPEN_WAKA,X.startTagPosition=X.position):(!z(fe)&&(!X.sawRoot||X.closedRoot)&&be(X,"Text data outside of root node."),fe==="&"?X.state=K.TEXT_ENTITY:X.textNode+=fe);continue;case K.SCRIPT:fe==="<"?X.state=K.SCRIPT_ENDING:X.script+=fe;continue;case K.SCRIPT_ENDING:fe==="/"?X.state=K.CLOSE_TAG:(X.script+="<"+fe,X.state=K.SCRIPT);continue;case K.OPEN_WAKA:if(fe==="!")X.state=K.SGML_DECL,X.sgmlDecl="";else if(!z(fe))if(U(F,fe))X.state=K.OPEN_TAG,X.tagName=fe;else if(fe==="/")X.state=K.CLOSE_TAG,X.tagName="";else if(fe==="?")X.state=K.PROC_INST,X.procInstName=X.procInstBody="";else{if(be(X,"Unencoded <"),X.startTagPosition+1<X.position){var He=X.position-X.startTagPosition;fe=new Array(He).join(" ")+fe}X.textNode+="<"+fe,X.state=K.TEXT}continue;case K.SGML_DECL:(X.sgmlDecl+fe).toUpperCase()===O?(de(X,"onopencdata"),X.state=K.CDATA,X.sgmlDecl="",X.cdata=""):X.sgmlDecl+fe==="--"?(X.state=K.COMMENT,X.comment="",X.sgmlDecl=""):(X.sgmlDecl+fe).toUpperCase()===b?(X.state=K.DOCTYPE,(X.doctype||X.sawRoot)&&be(X,"Inappropriately located doctype declaration"),X.doctype="",X.sgmlDecl=""):fe===">"?(de(X,"onsgmldeclaration",X.sgmlDecl),X.sgmlDecl="",X.state=K.TEXT):(A(fe)&&(X.state=K.SGML_DECL_QUOTED),X.sgmlDecl+=fe);continue;case K.SGML_DECL_QUOTED:fe===X.q&&(X.state=K.SGML_DECL,X.q=""),X.sgmlDecl+=fe;continue;case K.DOCTYPE:fe===">"?(X.state=K.TEXT,de(X,"ondoctype",X.doctype),X.doctype=!0):(X.doctype+=fe,fe==="["?X.state=K.DOCTYPE_DTD:A(fe)&&(X.state=K.DOCTYPE_QUOTED,X.q=fe));continue;case K.DOCTYPE_QUOTED:X.doctype+=fe,fe===X.q&&(X.q="",X.state=K.DOCTYPE);continue;case K.DOCTYPE_DTD:X.doctype+=fe,fe==="]"?X.state=K.DOCTYPE:A(fe)&&(X.state=K.DOCTYPE_DTD_QUOTED,X.q=fe);continue;case K.DOCTYPE_DTD_QUOTED:X.doctype+=fe,fe===X.q&&(X.state=K.DOCTYPE_DTD,X.q="");continue;case K.COMMENT:fe==="-"?X.state=K.COMMENT_ENDING:X.comment+=fe;continue;case K.COMMENT_ENDING:fe==="-"?(X.state=K.COMMENT_ENDED,X.comment=Re(X.opt,X.comment),X.comment&&de(X,"oncomment",X.comment),X.comment=""):(X.comment+="-"+fe,X.state=K.COMMENT);continue;case K.COMMENT_ENDED:fe!==">"?(be(X,"Malformed comment"),X.comment+="--"+fe,X.state=K.COMMENT):X.state=K.TEXT;continue;case K.CDATA:fe==="]"?X.state=K.CDATA_ENDING:X.cdata+=fe;continue;case K.CDATA_ENDING:fe==="]"?X.state=K.CDATA_ENDING_2:(X.cdata+="]"+fe,X.state=K.CDATA);continue;case K.CDATA_ENDING_2:fe===">"?(X.cdata&&de(X,"oncdata",X.cdata),de(X,"onclosecdata"),X.cdata="",X.state=K.TEXT):fe==="]"?X.cdata+="]":(X.cdata+="]]"+fe,X.state=K.CDATA);continue;case K.PROC_INST:fe==="?"?X.state=K.PROC_INST_ENDING:z(fe)?X.state=K.PROC_INST_BODY:X.procInstName+=fe;continue;case K.PROC_INST_BODY:if(!X.procInstBody&&z(fe))continue;fe==="?"?X.state=K.PROC_INST_ENDING:X.procInstBody+=fe;continue;case K.PROC_INST_ENDING:fe===">"?(de(X,"onprocessinginstruction",{name:X.procInstName,body:X.procInstBody}),X.procInstName=X.procInstBody="",X.state=K.TEXT):(X.procInstBody+="?"+fe,X.state=K.PROC_INST_BODY);continue;case K.OPEN_TAG:U(N,fe)?X.tagName+=fe:(ce(X),fe===">"?ge(X):fe==="/"?X.state=K.OPEN_TAG_SLASH:(z(fe)||be(X,"Invalid character in tag name"),X.state=K.ATTRIB));continue;case K.OPEN_TAG_SLASH:fe===">"?(ge(X,!0),ee(X)):(be(X,"Forward-slash in opening tag not followed by >"),X.state=K.ATTRIB);continue;case K.ATTRIB:if(z(fe))continue;fe===">"?ge(X):fe==="/"?X.state=K.OPEN_TAG_SLASH:U(F,fe)?(X.attribName=fe,X.attribValue="",X.state=K.ATTRIB_NAME):be(X,"Invalid attribute name");continue;case K.ATTRIB_NAME:fe==="="?X.state=K.ATTRIB_VALUE:fe===">"?(be(X,"Attribute without value"),X.attribValue=X.attribName,ne(X),ge(X)):z(fe)?X.state=K.ATTRIB_NAME_SAW_WHITE:U(N,fe)?X.attribName+=fe:be(X,"Invalid attribute name");continue;case K.ATTRIB_NAME_SAW_WHITE:if(fe==="=")X.state=K.ATTRIB_VALUE;else{if(z(fe))continue;be(X,"Attribute without value"),X.tag.attributes[X.attribName]="",X.attribValue="",de(X,"onattribute",{name:X.attribName,value:""}),X.attribName="",fe===">"?ge(X):U(F,fe)?(X.attribName=fe,X.state=K.ATTRIB_NAME):(be(X,"Invalid attribute name"),X.state=K.ATTRIB)}continue;case K.ATTRIB_VALUE:if(z(fe))continue;A(fe)?(X.q=fe,X.state=K.ATTRIB_VALUE_QUOTED):(be(X,"Unquoted attribute value"),X.state=K.ATTRIB_VALUE_UNQUOTED,X.attribValue=fe);continue;case K.ATTRIB_VALUE_QUOTED:if(fe!==X.q){fe==="&"?X.state=K.ATTRIB_VALUE_ENTITY_Q:X.attribValue+=fe;continue}ne(X),X.q="",X.state=K.ATTRIB_VALUE_CLOSED;continue;case K.ATTRIB_VALUE_CLOSED:z(fe)?X.state=K.ATTRIB:fe===">"?ge(X):fe==="/"?X.state=K.OPEN_TAG_SLASH:U(F,fe)?(be(X,"No whitespace between attributes"),X.attribName=fe,X.attribValue="",X.state=K.ATTRIB_NAME):be(X,"Invalid attribute name");continue;case K.ATTRIB_VALUE_UNQUOTED:if(!B(fe)){fe==="&"?X.state=K.ATTRIB_VALUE_ENTITY_U:X.attribValue+=fe;continue}ne(X),fe===">"?ge(X):X.state=K.ATTRIB;continue;case K.CLOSE_TAG:if(X.tagName)fe===">"?ee(X):U(N,fe)?X.tagName+=fe:X.script?(X.script+="</"+X.tagName,X.tagName="",X.state=K.SCRIPT):(z(fe)||be(X,"Invalid tagname in closing tag"),X.state=K.CLOSE_TAG_SAW_WHITE);else{if(z(fe))continue;I(F,fe)?X.script?(X.script+="</"+fe,X.state=K.SCRIPT):be(X,"Invalid tagname in closing tag."):X.tagName=fe}continue;case K.CLOSE_TAG_SAW_WHITE:if(z(fe))continue;fe===">"?ee(X):be(X,"Invalid characters in closing tag");continue;case K.TEXT_ENTITY:case K.ATTRIB_VALUE_ENTITY_Q:case K.ATTRIB_VALUE_ENTITY_U:var Qe,et;switch(X.state){case K.TEXT_ENTITY:Qe=K.TEXT,et="textNode";break;case K.ATTRIB_VALUE_ENTITY_Q:Qe=K.ATTRIB_VALUE_QUOTED,et="attribValue";break;case K.ATTRIB_VALUE_ENTITY_U:Qe=K.ATTRIB_VALUE_UNQUOTED,et="attribValue";break}fe===";"?(X[et]+=re(X),X.entity="",X.state=Qe):U(X.entity.length?G:L,fe)?X.entity+=fe:(be(X,"Invalid character in entity name"),X[et]+="&"+X.entity+fe,X.entity="",X.state=Qe);continue;default:throw new Error(X,"Unknown state: "+X.state)}}return X.position>=X.bufferCheckPosition&&l(X),X}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */C.default||function(){var Y=String.fromCharCode,X=Math.floor,he=function(){var Ee=16384,He=[],Qe,et,it=-1,ut=arguments.length;if(!ut)return"";for(var dt="";++it<ut;){var Fe=Number(arguments[it]);if(!isFinite(Fe)||Fe<0||Fe>1114111||X(Fe)!==Fe)throw RangeError("Invalid code point: "+Fe);Fe<=65535?He.push(Fe):(Fe-=65536,Qe=(Fe>>10)+55296,et=Fe%1024+56320,He.push(Qe,et)),(it+1===ut||He.length>Ee)&&(dt+=Y.apply(null,He),He.length=0)}return dt};t.default?Object.defineProperty(String,"fromCodePoint",{value:he,configurable:!0,writable:!0}):String.fromCodePoint=he}()})(typeof D=="undefined"?(void 0).sax={}:D)}).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,D){J.exports=C;var k=H("events").EventEmitter,g=H("inherits");g(C,k),C.Readable=H("readable-stream/readable.js"),C.Writable=H("readable-stream/writable.js"),C.Duplex=H("readable-stream/duplex.js"),C.Transform=H("readable-stream/transform.js"),C.PassThrough=H("readable-stream/passthrough.js"),C.Stream=C;function C(){k.call(this)}C.prototype.pipe=function(M,m){var y=this;function S(i){M.writable&&(M.write(i)===!1&&y.pause&&y.pause())}y.on("data",S);function _(){y.readable&&y.resume&&y.resume()}M.on("drain",_),!M._isStdio&&(!m||m.end!==!1)&&(y.on("end",h),y.on("close",n));var t=!1;function h(){if(t)return;t=!0,M.end()}function n(){if(t)return;t=!0,typeof M.destroy=="function"&&M.destroy()}function c(i){if(a(),k.listenerCount(this,"error")===0)throw i}y.on("error",c),M.on("error",c);function a(){y.removeListener("data",S),M.removeListener("drain",_),y.removeListener("end",h),y.removeListener("close",n),y.removeListener("error",c),M.removeListener("error",c),y.removeListener("end",a),y.removeListener("close",a),M.removeListener("close",a)}return y.on("end",a),y.on("close",a),M.on("close",a),M.emit("pipe",y),M}},{events:192,inherits:196,"readable-stream/duplex.js":213,"readable-stream/passthrough.js":222,"readable-stream/readable.js":223,"readable-stream/transform.js":224,"readable-stream/writable.js":225}],231:[function(H,J,D){(function(k){var g=H("./lib/request"),C=H("./lib/response"),M=H("xtend"),m=H("builtin-status-codes"),y=H("url"),S=D;S.request=function(_,t){typeof _=="string"?_=y.parse(_):_=M(_);var h=k.location.protocol.search(/^https?:$/)===-1?"http:":"",n=_.protocol||h,c=_.hostname||_.host,a=_.port,i=_.path||"/";c&&c.indexOf(":")!==-1&&(c="["+c+"]"),_.url=(c?n+"//"+c:"")+(a?":"+a:"")+i,_.method=(_.method||"GET").toUpperCase(),_.headers=_.headers||{};var s=new g(_);return t&&s.on("response",t),s},S.get=function(t,h){var n=S.request(t,h);return n.end(),n},S.ClientRequest=g,S.IncomingMessage=C.IncomingMessage,S.Agent=function(){},S.Agent.defaultMaxSockets=4,S.globalAgent=new S.Agent,S.STATUS_CODES=m,S.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":233,"./lib/response":234,"builtin-status-codes":74,url:238,xtend:283}],232:[function(H,J,D){(function(k){"use strict";D.fetch=S(k.fetch)&&S(k.ReadableStream),D.writableStream=S(k.WritableStream),D.abortController=S(k.AbortController),D.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),D.blobConstructor=!0}catch(_){}var g;function C(){if(g!==void 0)return g;if(k.XMLHttpRequest){g=new k.XMLHttpRequest;try{g.open("GET",k.XDomainRequest?"/":"https://example.com")}catch(_){g=null}}else g=null;return g}function M(_){var t=C();if(!t)return!1;try{return t.responseType=_,t.responseType===_}catch(h){}return!1}var m=typeof k.ArrayBuffer!="undefined",y=m&&S(k.ArrayBuffer.prototype.slice);D.arraybuffer=D.fetch||m&&M("arraybuffer"),D.msstream=!D.fetch&&y&&M("ms-stream"),D.mozchunkedarraybuffer=!D.fetch&&m&&M("moz-chunked-arraybuffer"),D.overrideMimeType=D.fetch||(C()?S(C().overrideMimeType):!1),D.vbArray=S(k.VBArray);function S(_){return typeof _=="function"}g=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(H,J,D){(function(k,g,C){"use strict";var M=H("babel-runtime/core-js/object/keys"),m=y(M);function y(l){return l&&l.__esModule?l:{default:l}}var S=H("./capability"),_=H("inherits"),t=H("./response"),h=H("readable-stream"),n=H("to-arraybuffer"),c=t.IncomingMessage,a=t.readyStates;function i(l,o){return S.fetch&&o?"fetch":S.mozchunkedarraybuffer?"moz-chunked-arraybuffer":S.msstream?"ms-stream":S.arraybuffer&&l?"arraybuffer":S.vbArray&&l?"text:vbarray":"text"}var s=J.exports=function(l){var o=this;h.Writable.call(o),o._opts=l,o._body=[],o._headers={},l.auth&&o.setHeader("Authorization","Basic "+new C(l.auth).toString("base64")),(0,m.default)(l.headers).forEach(function(v){o.setHeader(v,l.headers[v])});var r,x=!0;if(l.mode==="disable-fetch"||"requestTimeout"in l&&!S.abortController)x=!1,r=!0;else if(l.mode==="prefer-streaming")r=!1;else if(l.mode==="allow-wrong-content-type")r=!S.overrideMimeType;else if(!l.mode||l.mode==="default"||l.mode==="prefer-fast")r=!0;else throw new Error("Invalid value for opts.mode");o._mode=i(r,x),o._fetchTimer=null,o.on("finish",function(){o._onFinish()})};_(s,h.Writable),s.prototype.setHeader=function(l,o){var r=this,x=l.toLowerCase();if(f.indexOf(x)!==-1)return;r._headers[x]={name:l,value:o}},s.prototype.getHeader=function(l){var o=this._headers[l.toLowerCase()];return o?o.value:null},s.prototype.removeHeader=function(l){var o=this;delete o._headers[l.toLowerCase()]},s.prototype._onFinish=function(){var l=this;if(l._destroyed)return;var o=l._opts,r=l._headers,x=null;o.method!=="GET"&&o.method!=="HEAD"&&(S.arraybuffer?x=n(C.concat(l._body)):S.blobConstructor?x=new g.Blob(l._body.map(function(E){return n(E)}),{type:(r["content-type"]||{}).value||""}):x=C.concat(l._body).toString());var v=[];if((0,m.default)(r).forEach(function(E){var w=r[E].name,T=r[E].value;Array.isArray(T)?T.forEach(function(F){v.push([w,F])}):v.push([w,T])}),l._mode==="fetch"){var p=null,R=null;if(S.abortController){var O=new AbortController;p=O.signal,l._fetchAbortController=O,"requestTimeout"in o&&o.requestTimeout!==0&&(l._fetchTimer=g.setTimeout(function(){l.emit("requestTimeout"),l._fetchAbortController&&l._fetchAbortController.abort()},o.requestTimeout))}g.fetch(l._opts.url,{method:l._opts.method,headers:v,body:x||void 0,mode:"cors",credentials:o.withCredentials?"include":"same-origin",signal:p}).then(function(E){l._fetchResponse=E,l._connect()},function(E){g.clearTimeout(l._fetchTimer),l._destroyed||l.emit("error",E)})}else{var b=l._xhr=new g.XMLHttpRequest;try{b.open(l._opts.method,l._opts.url,!0)}catch(E){k.nextTick(function(){l.emit("error",E)});return}"responseType"in b&&(b.responseType=l._mode.split(":")[0]),"withCredentials"in b&&(b.withCredentials=!!o.withCredentials),l._mode==="text"&&"overrideMimeType"in b&&b.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in o&&(b.timeout=o.requestTimeout,b.ontimeout=function(){l.emit("requestTimeout")}),v.forEach(function(E){b.setRequestHeader(E[0],E[1])}),l._response=null,b.onreadystatechange=function(){switch(b.readyState){case a.LOADING:case a.DONE:l._onXHRProgress();break}},l._mode==="moz-chunked-arraybuffer"&&(b.onprogress=function(){l._onXHRProgress()}),b.onerror=function(){if(l._destroyed)return;l.emit("error",new Error("XHR error"))};try{b.send(x)}catch(E){k.nextTick(function(){l.emit("error",E)});return}}};function d(l){try{var o=l.status;return o!==null&&o!==0}catch(r){return!1}}s.prototype._onXHRProgress=function(){var l=this;if(!d(l._xhr)||l._destroyed)return;l._response||l._connect(),l._response._onXHRProgress()},s.prototype._connect=function(){var l=this;if(l._destroyed)return;l._response=new c(l._xhr,l._fetchResponse,l._mode,l._fetchTimer),l._response.on("error",function(o){l.emit("error",o)}),l.emit("response",l._response)},s.prototype._write=function(l,o,r){var x=this;x._body.push(l),r()},s.prototype.abort=s.prototype.destroy=function(){var l=this;l._destroyed=!0,g.clearTimeout(l._fetchTimer),l._response&&(l._response._destroyed=!0),l._xhr?l._xhr.abort():l._fetchAbortController&&l._fetchAbortController.abort()},s.prototype.end=function(l,o,r){var x=this;typeof l=="function"&&(r=l,l=void 0),h.Writable.prototype.end.call(x,l,o,r)},s.prototype.flushHeaders=function(){},s.prototype.setTimeout=function(){},s.prototype.setNoDelay=function(){},s.prototype.setSocketKeepAlive=function(){};var f=["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,D){(function(k,g,C){"use strict";var M=H("babel-runtime/core-js/promise"),m=y(M);function y(c){return c&&c.__esModule?c:{default:c}}var S=H("./capability"),_=H("inherits"),t=H("readable-stream"),h=D.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},n=D.IncomingMessage=function(c,a,i,s){var d=this;if(t.Readable.call(d),d._mode=i,d.headers={},d.rawHeaders=[],d.trailers={},d.rawTrailers=[],d.on("end",function(){k.nextTick(function(){d.emit("close")})}),i==="fetch"){var f=function p(){o.read().then(function(R){if(d._destroyed)return;if(R.done){g.clearTimeout(s),d.push(null);return}d.push(new C(R.value)),p()}).catch(function(R){g.clearTimeout(s),d._destroyed||d.emit("error",R)})};if(d._fetchResponse=a,d.url=a.url,d.statusCode=a.status,d.statusMessage=a.statusText,a.headers.forEach(function(p,R){d.headers[R.toLowerCase()]=p,d.rawHeaders.push(R,p)}),S.writableStream){var l=new WritableStream({write:function(R){return new m.default(function(O,b){d._destroyed?b():d.push(new C(R))?O():d._resumeFetch=O})},close:function(){g.clearTimeout(s),d._destroyed||d.push(null)},abort:function(R){d._destroyed||d.emit("error",R)}});try{a.body.pipeTo(l).catch(function(p){g.clearTimeout(s),d._destroyed||d.emit("error",p)});return}catch(p){}}var o=a.body.getReader();f()}else{d._xhr=c,d._pos=0,d.url=c.responseURL,d.statusCode=c.status,d.statusMessage=c.statusText;var r=c.getAllResponseHeaders().split(/\r?\n/);if(r.forEach(function(p){var R=p.match(/^([^:]+):\s*(.*)/);if(R){var O=R[1].toLowerCase();O==="set-cookie"?(d.headers[O]===void 0&&(d.headers[O]=[]),d.headers[O].push(R[2])):d.headers[O]!==void 0?d.headers[O]+=", "+R[2]:d.headers[O]=R[2],d.rawHeaders.push(R[1],R[2])}}),d._charset="x-user-defined",!S.overrideMimeType){var x=d.rawHeaders["mime-type"];if(x){var v=x.match(/;\s*charset=([^;])(;|$)/);v&&(d._charset=v[1].toLowerCase())}d._charset||(d._charset="utf-8")}}};_(n,t.Readable),n.prototype._read=function(){var c=this,a=c._resumeFetch;a&&(c._resumeFetch=null,a())},n.prototype._onXHRProgress=function(){var c=this,a=c._xhr,i=null;switch(c._mode){case"text:vbarray":if(a.readyState!==h.DONE)break;try{i=new g.VBArray(a.responseBody).toArray()}catch(o){}if(i!==null){c.push(new C(i));break}case"text":try{i=a.responseText}catch(o){c._mode="text:vbarray";break}if(i.length>c._pos){var s=i.substr(c._pos);if(c._charset==="x-user-defined"){for(var d=new C(s.length),f=0;f<s.length;f++)d[f]=s.charCodeAt(f)&255;c.push(d)}else c.push(s,c._charset);c._pos=i.length}break;case"arraybuffer":if(a.readyState!==h.DONE||!a.response)break;i=a.response,c.push(new C(new Uint8Array(i)));break;case"moz-chunked-arraybuffer":if(i=a.response,a.readyState!==h.LOADING||!i)break;c.push(new C(new Uint8Array(i)));break;case"ms-stream":if(i=a.response,a.readyState!==h.LOADING)break;var l=new g.MSStreamReader;l.onprogress=function(){l.result.byteLength>c._pos&&(c.push(new C(new Uint8Array(l.result.slice(c._pos)))),c._pos=l.result.byteLength)},l.onload=function(){c.push(null)},l.readAsArrayBuffer(i);break}c._xhr.readyState===h.DONE&&c._mode!=="ms-stream"&&c.push(null)}}).call(this,H("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},H("buffer").Buffer)},{"./capability":232,_process:208,"babel-runtime/core-js/promise":61,buffer:73,inherits:196,"readable-stream":223}],235:[function(H,J,D){"use strict";var k=H("safe-buffer").Buffer,g=k.isEncoding||function(l){l=""+l;switch(l&&l.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function C(l){if(!l)return"utf8";for(var o;;)switch(l){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 l;default:if(o)return;l=(""+l).toLowerCase(),o=!0}}function M(l){var o=C(l);if(typeof o!="string"&&(k.isEncoding===g||!g(l)))throw new Error("Unknown encoding: "+l);return o||l}D.StringDecoder=m;function m(l){this.encoding=M(l);var o;switch(this.encoding){case"utf16le":this.text=c,this.end=a,o=4;break;case"utf8":this.fillLast=t,o=4;break;case"base64":this.text=i,this.end=s,o=3;break;default:this.write=d,this.end=f;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=k.allocUnsafe(o)}m.prototype.write=function(l){if(l.length===0)return"";var o,r;if(this.lastNeed){if(o=this.fillLast(l),o===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<l.length?o?o+this.text(l,r):this.text(l,r):o||""},m.prototype.end=n,m.prototype.text=h,m.prototype.fillLast=function(l){if(this.lastNeed<=l.length)return l.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);l.copy(this.lastChar,this.lastTotal-this.lastNeed,0,l.length),this.lastNeed-=l.length};function y(l){return l<=127?0:l>>5===6?2:l>>4===14?3:l>>3===30?4:l>>6===2?-1:-2}function S(l,o,r){var x=o.length-1;if(x<r)return 0;var v=y(o[x]);return v>=0?(v>0&&(l.lastNeed=v-1),v):--x<r||v===-2?0:(v=y(o[x]),v>=0?(v>0&&(l.lastNeed=v-2),v):--x<r||v===-2?0:(v=y(o[x]),v>=0?(v>0&&(v===2?v=0:l.lastNeed=v-3),v):0))}function _(l,o,r){if((o[0]&192)!==128)return l.lastNeed=0,"\uFFFD";if(l.lastNeed>1&&o.length>1){if((o[1]&192)!==128)return l.lastNeed=1,"\uFFFD";if(l.lastNeed>2&&o.length>2&&(o[2]&192)!==128)return l.lastNeed=2,"\uFFFD"}}function t(l){var o=this.lastTotal-this.lastNeed,r=_(this,l,o);if(r!==void 0)return r;if(this.lastNeed<=l.length)return l.copy(this.lastChar,o,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);l.copy(this.lastChar,o,0,l.length),this.lastNeed-=l.length}function h(l,o){var r=S(this,l,o);if(!this.lastNeed)return l.toString("utf8",o);this.lastTotal=r;var x=l.length-(r-this.lastNeed);return l.copy(this.lastChar,0,x),l.toString("utf8",o,x)}function n(l){var o=l&&l.length?this.write(l):"";return this.lastNeed?o+"\uFFFD":o}function c(l,o){if((l.length-o)%2===0){var r=l.toString("utf16le",o);if(r){var x=r.charCodeAt(r.length-1);if(x>=55296&&x<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=l[l.length-2],this.lastChar[1]=l[l.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=l[l.length-1],l.toString("utf16le",o,l.length-1)}function a(l){var o=l&&l.length?this.write(l):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return o+this.lastChar.toString("utf16le",0,r)}return o}function i(l,o){var r=(l.length-o)%3;return r===0?l.toString("base64",o):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=l[l.length-1]:(this.lastChar[0]=l[l.length-2],this.lastChar[1]=l[l.length-1]),l.toString("base64",o,l.length-r))}function s(l){var o=l&&l.length?this.write(l):"";return this.lastNeed?o+this.lastChar.toString("base64",0,3-this.lastNeed):o}function d(l){return l.toString(this.encoding)}function f(l){return l&&l.length?this.write(l):""}},{"safe-buffer":228}],236:[function(H,J,D){(function(k,g){var C=H("process/browser.js").nextTick,M=Function.prototype.apply,m=Array.prototype.slice,y={},S=0;D.setTimeout=function(){return new _(M.call(setTimeout,window,arguments),clearTimeout)},D.setInterval=function(){return new _(M.call(setInterval,window,arguments),clearInterval)},D.clearTimeout=D.clearInterval=function(t){t.close()};function _(t,h){this._id=t,this._clearFn=h}_.prototype.unref=_.prototype.ref=function(){},_.prototype.close=function(){this._clearFn.call(window,this._id)},D.enroll=function(t,h){clearTimeout(t._idleTimeoutId),t._idleTimeout=h},D.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},D._unrefActive=D.active=function(t){clearTimeout(t._idleTimeoutId);var h=t._idleTimeout;h>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},h))},D.setImmediate=typeof k=="function"?k:function(t){var h=S++,n=arguments.length<2?!1:m.call(arguments,1);return y[h]=!0,C(function(){y[h]&&(n?t.apply(null,n):t.call(null),D.clearImmediate(h))}),h},D.clearImmediate=typeof g=="function"?g:function(t){delete y[t]}}).call(this,H("timers").setImmediate,H("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(H,J,D){var k=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(k.isBuffer(g)){for(var C=new Uint8Array(g.length),M=g.length,m=0;m<M;m++)C[m]=g[m];return C.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:73}],238:[function(H,J,D){"use strict";var k=H("punycode"),g=H("./util");D.parse=o,D.resolve=x,D.resolveObject=v,D.format=r,D.Url=C;function C(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var M=/^([a-z0-9.+-]+:)/i,m=/:[0-9]*$/,y=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,S=["<",">",'"',"`"," ","\r",`
`," "],_=["{","}","|","\\","^","`"].concat(S),t=["'"].concat(_),h=["%","/","?",";","#"].concat(t),n=["/","?","#"],c=255,a=/^[+a-z0-9A-Z_-]{0,63}$/,i=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,s={javascript:!0,"javascript:":!0},d={javascript:!0,"javascript:":!0},f={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},l=H("querystring");function o(p,R,O){if(p&&g.isObject(p)&&p instanceof C)return p;var b=new C;return b.parse(p,R,O),b}C.prototype.parse=function(p,R,O){if(!g.isString(p))throw new TypeError("Parameter 'url' must be a string, not "+typeof p);var b=p.indexOf("?"),E=b!==-1&&b<p.indexOf("#")?"?":"#",w=p.split(E),T=/\\/g;w[0]=w[0].replace(T,"/"),p=w.join(E);var F=p;if(F=F.trim(),!O&&p.split("#").length===1){var N=y.exec(F);if(N)return this.path=F,this.href=F,this.pathname=N[1],N[2]?(this.search=N[2],R?this.query=l.parse(this.search.substr(1)):this.query=this.search.substr(1)):R&&(this.search="",this.query={}),this}var L=M.exec(F);if(L){L=L[0];var G=L.toLowerCase();this.protocol=G,F=F.substr(L.length)}if(O||L||F.match(/^\/\/[^@\/]+@[^@\/]+/)){var z=F.substr(0,2)==="//";z&&!(L&&d[L])&&(F=F.substr(2),this.slashes=!0)}if(!d[L]&&(z||L&&!f[L])){for(var A=-1,B=0;B<n.length;B++){var U=F.indexOf(n[B]);U!==-1&&(A===-1||U<A)&&(A=U)}var I,K;A===-1?K=F.lastIndexOf("@"):K=F.lastIndexOf("@",A),K!==-1&&(I=F.slice(0,K),F=F.slice(K+1),this.auth=decodeURIComponent(I)),A=-1;for(var B=0;B<h.length;B++){var U=F.indexOf(h[B]);U!==-1&&(A===-1||U<A)&&(A=U)}A===-1&&(A=F.length),this.host=F.slice(0,A),F=F.slice(A),this.parseHost(),this.hostname=this.hostname||"";var Z=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!Z)for(var ue=this.hostname.split(/\./),B=0,de=ue.length;B<de;B++){var Ce=ue[B];if(!Ce)continue;if(!Ce.match(a)){for(var Re="",me=0,Oe=Ce.length;me<Oe;me++)Ce.charCodeAt(me)>127?Re+="x":Re+=Ce[me];if(!Re.match(a)){var be=ue.slice(0,B),ce=ue.slice(B+1),se=Ce.match(i);se&&(be.push(se[1]),ce.unshift(se[2])),ce.length&&(F="/"+ce.join(".")+F),this.hostname=be.join(".");break}}}this.hostname.length>c?this.hostname="":this.hostname=this.hostname.toLowerCase(),Z||(this.hostname=k.toASCII(this.hostname));var ne=this.port?":"+this.port:"",ge=this.hostname||"";this.host=ge+ne,this.href+=this.host,Z&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),F[0]!=="/"&&(F="/"+F))}if(!s[G])for(var B=0,de=t.length;B<de;B++){var ee=t[B];if(F.indexOf(ee)===-1)continue;var re=encodeURIComponent(ee);re===ee&&(re=escape(ee)),F=F.split(ee).join(re)}var Te=F.indexOf("#");Te!==-1&&(this.hash=F.substr(Te),F=F.slice(0,Te));var ie=F.indexOf("?");if(ie!==-1?(this.search=F.substr(ie),this.query=F.substr(ie+1),R&&(this.query=l.parse(this.query)),F=F.slice(0,ie)):R&&(this.search="",this.query={}),F&&(this.pathname=F),f[G]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var ne=this.pathname||"",q=this.search||"";this.path=ne+q}return this.href=this.format(),this};function r(p){return g.isString(p)&&(p=o(p)),p instanceof C?p.format():C.prototype.format.call(p)}C.prototype.format=function(){var p=this.auth||"";p&&(p=encodeURIComponent(p),p=p.replace(/%3A/i,":"),p+="@");var R=this.protocol||"",O=this.pathname||"",b=this.hash||"",E=!1,w="";this.host?E=p+this.host:this.hostname&&(E=p+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(E+=":"+this.port)),this.query&&g.isObject(this.query)&&Object.keys(this.query).length&&(w=l.stringify(this.query));var T=this.search||w&&"?"+w||"";return R&&R.substr(-1)!==":"&&(R+=":"),this.slashes||(!R||f[R])&&E!==!1?(E="//"+(E||""),O&&O.charAt(0)!=="/"&&(O="/"+O)):E||(E=""),b&&b.charAt(0)!=="#"&&(b="#"+b),T&&T.charAt(0)!=="?"&&(T="?"+T),O=O.replace(/[?#]/g,function(F){return encodeURIComponent(F)}),T=T.replace("#","%23"),R+E+O+T+b};function x(p,R){return o(p,!1,!0).resolve(R)}C.prototype.resolve=function(p){return this.resolveObject(o(p,!1,!0)).format()};function v(p,R){return p?o(p,!1,!0).resolveObject(R):R}C.prototype.resolveObject=function(p){if(g.isString(p)){var R=new C;R.parse(p,!1,!0),p=R}for(var O=new C,b=Object.keys(this),E=0;E<b.length;E++){var w=b[E];O[w]=this[w]}if(O.hash=p.hash,p.href==="")return O.href=O.format(),O;if(p.slashes&&!p.protocol){for(var T=Object.keys(p),F=0;F<T.length;F++){var N=T[F];N!=="protocol"&&(O[N]=p[N])}return f[O.protocol]&&O.hostname&&!O.pathname&&(O.path=O.pathname="/"),O.href=O.format(),O}if(p.protocol&&p.protocol!==O.protocol){if(!f[p.protocol]){for(var L=Object.keys(p),G=0;G<L.length;G++){var z=L[G];O[z]=p[z]}return O.href=O.format(),O}if(O.protocol=p.protocol,!p.host&&!d[p.protocol]){for(var de=(p.pathname||"").split("/");de.length&&!(p.host=de.shift()););p.host||(p.host=""),p.hostname||(p.hostname=""),de[0]!==""&&de.unshift(""),de.length<2&&de.unshift(""),O.pathname=de.join("/")}else O.pathname=p.pathname;if(O.search=p.search,O.query=p.query,O.host=p.host||"",O.auth=p.auth,O.hostname=p.hostname||p.host,O.port=p.port,O.pathname||O.search){var A=O.pathname||"",B=O.search||"";O.path=A+B}return O.slashes=O.slashes||p.slashes,O.href=O.format(),O}var U=O.pathname&&O.pathname.charAt(0)==="/",I=p.host||p.pathname&&p.pathname.charAt(0)==="/",K=I||U||O.host&&p.pathname,Z=K,ue=O.pathname&&O.pathname.split("/")||[],de=p.pathname&&p.pathname.split("/")||[],Ce=O.protocol&&!f[O.protocol];if(Ce&&(O.hostname="",O.port=null,O.host&&(ue[0]===""?ue[0]=O.host:ue.unshift(O.host)),O.host="",p.protocol&&(p.hostname=null,p.port=null,p.host&&(de[0]===""?de[0]=p.host:de.unshift(p.host)),p.host=null),K=K&&(de[0]===""||ue[0]==="")),I)O.host=p.host||p.host===""?p.host:O.host,O.hostname=p.hostname||p.hostname===""?p.hostname:O.hostname,O.search=p.search,O.query=p.query,ue=de;else if(de.length)ue||(ue=[]),ue.pop(),ue=ue.concat(de),O.search=p.search,O.query=p.query;else if(!g.isNullOrUndefined(p.search)){if(Ce){O.hostname=O.host=ue.shift();var Re=O.host&&O.host.indexOf("@")>0?O.host.split("@"):!1;Re&&(O.auth=Re.shift(),O.host=O.hostname=Re.shift())}return O.search=p.search,O.query=p.query,(!g.isNull(O.pathname)||!g.isNull(O.search))&&(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.href=O.format(),O}if(!ue.length)return O.pathname=null,O.search?O.path="/"+O.search:O.path=null,O.href=O.format(),O;for(var me=ue.slice(-1)[0],Oe=(O.host||p.host||ue.length>1)&&(me==="."||me==="..")||me==="",be=0,ce=ue.length;ce>=0;ce--)me=ue[ce],me==="."?ue.splice(ce,1):me===".."?(ue.splice(ce,1),be++):be&&(ue.splice(ce,1),be--);if(!K&&!Z)for(;be--;be)ue.unshift("..");K&&ue[0]!==""&&(!ue[0]||ue[0].charAt(0)!=="/")&&ue.unshift(""),Oe&&ue.join("/").substr(-1)!=="/"&&ue.push("");var se=ue[0]===""||ue[0]&&ue[0].charAt(0)==="/";if(Ce){O.hostname=O.host=se?"":ue.length?ue.shift():"";var Re=O.host&&O.host.indexOf("@")>0?O.host.split("@"):!1;Re&&(O.auth=Re.shift(),O.host=O.hostname=Re.shift())}return K=K||O.host&&ue.length,K&&!se&&ue.unshift(""),ue.length?O.pathname=ue.join("/"):(O.pathname=null,O.path=null),(!g.isNull(O.pathname)||!g.isNull(O.search))&&(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.auth=p.auth||O.auth,O.slashes=O.slashes||p.slashes,O.href=O.format(),O},C.prototype.parseHost=function(){var p=this.host,R=m.exec(p);R&&(R=R[0],R!==":"&&(this.port=R.substr(1)),p=p.substr(0,p.length-R.length)),p&&(this.hostname=p)}},{"./util":239,punycode:209,querystring:212}],239:[function(H,J,D){"use strict";J.exports={isString:function(k){return typeof k=="string"},isObject:function(k){return typeof k=="object"&&k!==null},isNull:function(k){return k===null},isNullOrUndefined:function(k){return k==null}}},{}],240:[function(H,J,D){(function(k){J.exports=g;function g(M,m){if(C("noDeprecation"))return M;var y=!1;function S(){if(!y){if(C("throwDeprecation"))throw new Error(m);C("traceDeprecation")?console.trace(m):console.warn(m),y=!0}return M.apply(this,arguments)}return S}function C(M){try{if(!k.localStorage)return!1}catch(y){return!1}var m=k.localStorage[M];return m==null?!1:String(m).toLowerCase()==="true"}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],241:[function(H,J,D){typeof Object.create=="function"?J.exports=function(g,C){g.super_=C,g.prototype=Object.create(C.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}})}:J.exports=function(g,C){g.super_=C;var M=function(){};M.prototype=C.prototype,g.prototype=new M,g.prototype.constructor=g}},{}],242:[function(H,J,D){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,D){(function(k,g){var C=/%[sdj%]/g;D.format=function(A){if(!x(A)){for(var B=[],U=0;U<arguments.length;U++)B.push(y(arguments[U]));return B.join(" ")}for(var U=1,I=arguments,K=I.length,Z=String(A).replace(C,function(de){if(de==="%%")return"%";if(U>=K)return de;switch(de){case"%s":return String(I[U++]);case"%d":return Number(I[U++]);case"%j":try{return JSON.stringify(I[U++])}catch(Ce){return"[Circular]"}default:return de}}),ue=I[U];U<K;ue=I[++U])l(ue)||!O(ue)?Z+=" "+ue:Z+=" "+y(ue);return Z},D.deprecate=function(A,B){if(p(g.process))return function(){return D.deprecate(A,B).apply(this,arguments)};if(k.noDeprecation===!0)return A;var U=!1;function I(){if(!U){if(k.throwDeprecation)throw new Error(B);k.traceDeprecation?console.trace(B):console.error(B),U=!0}return A.apply(this,arguments)}return I};var M={},m;D.debuglog=function(A){if(p(m)&&(m=k.env.NODE_DEBUG||""),A=A.toUpperCase(),!M[A])if(new RegExp("\\b"+A+"\\b","i").test(m)){var B=k.pid;M[A]=function(){var U=D.format.apply(D,arguments);console.error("%s %d: %s",A,B,U)}}else M[A]=function(){};return M[A]};function y(A,B){var U={seen:[],stylize:_};return arguments.length>=3&&(U.depth=arguments[2]),arguments.length>=4&&(U.colors=arguments[3]),f(B)?U.showHidden=B:B&&D._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=S),h(U,A,U.depth)}D.inspect=y,y.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]},y.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function S(A,B){var U=y.styles[B];return U?"["+y.colors[U][0]+"m"+A+"["+y.colors[U][1]+"m":A}function _(A,B){return A}function t(A){var B={};return A.forEach(function(U,I){B[U]=!0}),B}function h(A,B,U){if(A.customInspect&&B&&w(B.inspect)&&B.inspect!==D.inspect&&!(B.constructor&&B.constructor.prototype===B)){var I=B.inspect(U,A);return x(I)||(I=h(A,I,U)),I}var K=n(A,B);if(K)return K;var Z=Object.keys(B),ue=t(Z);if(A.showHidden&&(Z=Object.getOwnPropertyNames(B)),E(B)&&(Z.indexOf("message")>=0||Z.indexOf("description")>=0))return c(B);if(Z.length===0){if(w(B)){var de=B.name?": "+B.name:"";return A.stylize("[Function"+de+"]","special")}if(R(B))return A.stylize(RegExp.prototype.toString.call(B),"regexp");if(b(B))return A.stylize(Date.prototype.toString.call(B),"date");if(E(B))return c(B)}var Ce="",Re=!1,me=["{","}"];if(d(B)&&(Re=!0,me=["[","]"]),w(B)){var Oe=B.name?": "+B.name:"";Ce=" [Function"+Oe+"]"}if(R(B)&&(Ce=" "+RegExp.prototype.toString.call(B)),b(B)&&(Ce=" "+Date.prototype.toUTCString.call(B)),E(B)&&(Ce=" "+c(B)),Z.length===0&&(!Re||B.length==0))return me[0]+Ce+me[1];if(U<0)return R(B)?A.stylize(RegExp.prototype.toString.call(B),"regexp"):A.stylize("[Object]","special");A.seen.push(B);var be;return Re?be=a(A,B,U,ue,Z):be=Z.map(function(ce){return i(A,B,U,ue,ce,Re)}),A.seen.pop(),s(be,Ce,me)}function n(A,B){if(p(B))return A.stylize("undefined","undefined");if(x(B)){var U="'"+JSON.stringify(B).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return A.stylize(U,"string")}if(r(B))return A.stylize(""+B,"number");if(f(B))return A.stylize(""+B,"boolean");if(l(B))return A.stylize("null","null")}function c(A){return"["+Error.prototype.toString.call(A)+"]"}function a(A,B,U,I,K){for(var Z=[],ue=0,de=B.length;ue<de;++ue)z(B,String(ue))?Z.push(i(A,B,U,I,String(ue),!0)):Z.push("");return K.forEach(function(Ce){Ce.match(/^\d+$/)||Z.push(i(A,B,U,I,Ce,!0))}),Z}function i(A,B,U,I,K,Z){var ue,de,Ce;if(Ce=Object.getOwnPropertyDescriptor(B,K)||{value:B[K]},Ce.get?Ce.set?de=A.stylize("[Getter/Setter]","special"):de=A.stylize("[Getter]","special"):Ce.set&&(de=A.stylize("[Setter]","special")),z(I,K)||(ue="["+K+"]"),de||(A.seen.indexOf(Ce.value)<0?(l(U)?de=h(A,Ce.value,null):de=h(A,Ce.value,U-1),de.indexOf(`
`)>-1&&(Z?de=de.split(`
`).map(function(Re){return" "+Re}).join(`
`).substr(2):de=`
`+de.split(`
`).map(function(Re){return" "+Re}).join(`
`))):de=A.stylize("[Circular]","special")),p(ue)){if(Z&&K.match(/^\d+$/))return de;ue=JSON.stringify(""+K),ue.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(ue=ue.substr(1,ue.length-2),ue=A.stylize(ue,"name")):(ue=ue.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),ue=A.stylize(ue,"string"))}return ue+": "+de}function s(A,B,U){var I=0,K=A.reduce(function(Z,ue){return I++,ue.indexOf(`
`)>=0&&I++,Z+ue.replace(/\u001b\[\d\d?m/g,"").length+1},0);return K>60?U[0]+(B===""?"":B+`
`)+" "+A.join(`,
`)+" "+U[1]:U[0]+B+" "+A.join(", ")+" "+U[1]}function d(A){return Array.isArray(A)}D.isArray=d;function f(A){return typeof A=="boolean"}D.isBoolean=f;function l(A){return A===null}D.isNull=l;function o(A){return A==null}D.isNullOrUndefined=o;function r(A){return typeof A=="number"}D.isNumber=r;function x(A){return typeof A=="string"}D.isString=x;function v(A){return typeof A=="symbol"}D.isSymbol=v;function p(A){return A===void 0}D.isUndefined=p;function R(A){return O(A)&&F(A)==="[object RegExp]"}D.isRegExp=R;function O(A){return typeof A=="object"&&A!==null}D.isObject=O;function b(A){return O(A)&&F(A)==="[object Date]"}D.isDate=b;function E(A){return O(A)&&(F(A)==="[object Error]"||A instanceof Error)}D.isError=E;function w(A){return typeof A=="function"}D.isFunction=w;function T(A){return A===null||typeof A=="boolean"||typeof A=="number"||typeof A=="string"||typeof A=="symbol"||typeof A=="undefined"}D.isPrimitive=T,D.isBuffer=H("./support/isBuffer");function F(A){return Object.prototype.toString.call(A)}function N(A){return A<10?"0"+A.toString(10):A.toString(10)}var L=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function G(){var A=new Date,B=[N(A.getHours()),N(A.getMinutes()),N(A.getSeconds())].join(":");return[A.getDate(),L[A.getMonth()],B].join(" ")}D.log=function(){console.log("%s - %s",G(),D.format.apply(D,arguments))},D.inherits=H("inherits"),D._extend=function(A,B){if(!B||!O(B))return A;for(var U=Object.keys(B),I=U.length;I--;)A[U[I]]=B[U[I]];return A};function z(A,B){return Object.prototype.hasOwnProperty.call(A,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,D){"use strict";(function(){"use strict";D.stripBOM=function(k){return k[0]==="\uFEFF"?k.substring(1):k}}).call(void 0)},{}],245:[function(H,J,D){"use strict";var k=H("babel-runtime/helpers/typeof"),g=m(k),C=H("babel-runtime/core-js/object/keys"),M=m(C);function m(y){return y&&y.__esModule?y:{default:y}}(function(){"use strict";var y,S,_,t,h,n={}.hasOwnProperty;y=H("xmlbuilder"),S=H("./defaults").defaults,t=function(a){return typeof a=="string"&&(a.indexOf("&")>=0||a.indexOf(">")>=0||a.indexOf("<")>=0)},h=function(a){return"<![CDATA["+_(a)+"]]>"},_=function(a){return a.replace("]]>","]]]]><![CDATA[>")},D.Builder=function(){function c(a){var i,s,d;this.options={},s=S["0.2"];for(i in s){if(!n.call(s,i))continue;d=s[i],this.options[i]=d}for(i in a){if(!n.call(a,i))continue;d=a[i],this.options[i]=d}}return c.prototype.buildObject=function(a){var i,s,d,f,l;return i=this.options.attrkey,s=this.options.charkey,(0,M.default)(a).length===1&&this.options.rootName===S["0.2"].rootName?(l=(0,M.default)(a)[0],a=a[l]):l=this.options.rootName,d=function(o){return function(r,x){var v,p,R,O,b,E;if((typeof x=="undefined"?"undefined":(0,g.default)(x))!=="object")o.options.cdata&&t(x)?r.raw(h(x)):r.txt(x);else if(Array.isArray(x))for(O in x){if(!n.call(x,O))continue;p=x[O];for(b in p)R=p[b],r=d(r.ele(b),R).up()}else for(b in x){if(!n.call(x,b))continue;if(p=x[b],b===i){if((typeof p=="undefined"?"undefined":(0,g.default)(p))==="object")for(v in p)E=p[v],r=r.att(v,E)}else if(b===s)o.options.cdata&&t(p)?r=r.raw(h(p)):r=r.txt(p);else if(Array.isArray(p))for(O in p){if(!n.call(p,O))continue;R=p[O],typeof R=="string"?o.options.cdata&&t(R)?r=r.ele(b).raw(h(R)).up():r=r.ele(b,R).up():r=d(r.ele(b),R).up()}else(typeof p=="undefined"?"undefined":(0,g.default)(p))==="object"?r=d(r.ele(b),p).up():typeof p=="string"&&o.options.cdata&&t(p)?r=r.ele(b).raw(h(p)).up():(p==null&&(p=""),r=r.ele(b,p.toString()).up())}return r}}(this),f=y.create(l,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),d(f,a).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,D){"use strict";(function(){D.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,D){"use strict";var k=H("babel-runtime/core-js/promise"),g=t(k),C=H("babel-runtime/core-js/object/get-own-property-names"),M=t(C),m=H("babel-runtime/core-js/object/keys"),y=t(m),S=H("babel-runtime/helpers/typeof"),_=t(S);function t(h){return h&&h.__esModule?h:{default:h}}(function(){"use strict";var h,n,c,a,i,s,d,f,l=function(v,p){return function(){return v.apply(p,arguments)}},o=function(v,p){for(var R in p)r.call(p,R)&&(v[R]=p[R]);function O(){this.constructor=v}return O.prototype=p.prototype,v.prototype=new O,v.__super__=p.prototype,v},r={}.hasOwnProperty;d=H("sax"),c=H("events"),h=H("./bom"),s=H("./processors"),f=H("timers").setImmediate,n=H("./defaults").defaults,a=function(v){return(typeof v=="undefined"?"undefined":(0,_.default)(v))==="object"&&v!=null&&(0,y.default)(v).length===0},i=function(v,p,R){var O,b,E;for(O=0,b=v.length;O<b;O++)E=v[O],p=E(p,R);return p},D.Parser=function(x){o(v,x);function v(p){this.parseStringPromise=l(this.parseStringPromise,this),this.parseString=l(this.parseString,this),this.reset=l(this.reset,this),this.assignOrPush=l(this.assignOrPush,this),this.processAsync=l(this.processAsync,this);var R,O,b;if(!(this instanceof D.Parser))return new D.Parser(p);this.options={},O=n["0.2"];for(R in O){if(!r.call(O,R))continue;b=O[R],this.options[R]=b}for(R in p){if(!r.call(p,R))continue;b=p[R],this.options[R]=b}this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(s.normalize)),this.reset()}return v.prototype.processAsync=function(){var p,R;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),f(this.processAsync))}catch(O){if(R=O,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(R)}},v.prototype.assignOrPush=function(p,R,O){return R in p?(p[R]instanceof Array||(p[R]=[p[R]]),p[R].push(O)):this.options.explicitArray?p[R]=[O]:p[R]=O},v.prototype.reset=function(){var p,R,O,b;return this.removeAllListeners(),this.saxParser=d.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(E){return function(w){if(E.saxParser.resume(),!E.saxParser.errThrown)return E.saxParser.errThrown=!0,E.emit("error",w)}}(this),this.saxParser.onend=function(E){return function(){if(!E.saxParser.ended)return E.saxParser.ended=!0,E.emit("end",E.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,b=[],p=this.options.attrkey,R=this.options.charkey,this.saxParser.onopentag=function(E){return function(w){var T,F,N,L,G;if(N={},N[R]="",!E.options.ignoreAttrs){G=w.attributes;for(T in G){if(!r.call(G,T))continue;!(p in N)&&!E.options.mergeAttrs&&(N[p]={}),F=E.options.attrValueProcessors?i(E.options.attrValueProcessors,w.attributes[T],T):w.attributes[T],L=E.options.attrNameProcessors?i(E.options.attrNameProcessors,T):T,E.options.mergeAttrs?E.assignOrPush(N,L,F):N[p][L]=F}}return N["#name"]=E.options.tagNameProcessors?i(E.options.tagNameProcessors,w.name):w.name,E.options.xmlns&&(N[E.options.xmlnskey]={uri:w.uri,local:w.local}),b.push(N)}}(this),this.saxParser.onclosetag=function(E){return function(){var w,T,F,N,L,G,z,A,B,U;if(G=b.pop(),L=G["#name"],(!E.options.explicitChildren||!E.options.preserveChildrenOrder)&&delete G["#name"],G.cdata===!0&&(w=G.cdata,delete G.cdata),B=b[b.length-1],G[R].match(/^\s*$/)&&!w?(T=G[R],delete G[R]):(E.options.trim&&(G[R]=G[R].trim()),E.options.normalize&&(G[R]=G[R].replace(/\s{2,}/g," ").trim()),G[R]=E.options.valueProcessors?i(E.options.valueProcessors,G[R],L):G[R],(0,y.default)(G).length===1&&R in G&&!E.EXPLICIT_CHARKEY&&(G=G[R])),a(G)&&(G=E.options.emptyTag!==""?E.options.emptyTag:T),E.options.validator!=null&&(U="/"+function(){var I,K,Z;for(Z=[],I=0,K=b.length;I<K;I++)N=b[I],Z.push(N["#name"]);return Z}().concat(L).join("/"),function(){var I;try{return G=E.options.validator(U,B&&B[L],G)}catch(K){return I=K,E.emit("error",I)}}()),E.options.explicitChildren&&!E.options.mergeAttrs&&(typeof G=="undefined"?"undefined":(0,_.default)(G))==="object"){if(!E.options.preserveChildrenOrder)N={},E.options.attrkey in G&&(N[E.options.attrkey]=G[E.options.attrkey],delete G[E.options.attrkey]),!E.options.charsAsChildren&&E.options.charkey in G&&(N[E.options.charkey]=G[E.options.charkey],delete G[E.options.charkey]),(0,M.default)(G).length>0&&(N[E.options.childkey]=G),G=N;else if(B){B[E.options.childkey]=B[E.options.childkey]||[],z={};for(F in G){if(!r.call(G,F))continue;z[F]=G[F]}B[E.options.childkey].push(z),delete G["#name"],(0,y.default)(G).length===1&&R in G&&!E.EXPLICIT_CHARKEY&&(G=G[R])}}return b.length>0?E.assignOrPush(B,L,G):(E.options.explicitRoot&&(A=G,G={},G[L]=A),E.resultObject=G,E.saxParser.ended=!0,E.emit("end",E.resultObject))}}(this),O=function(E){return function(w){var T,F;if(F=b[b.length-1],F)return F[R]+=w,E.options.explicitChildren&&E.options.preserveChildrenOrder&&E.options.charsAsChildren&&(E.options.includeWhiteChars||w.replace(/\\n/g,"").trim()!=="")&&(F[E.options.childkey]=F[E.options.childkey]||[],T={"#name":"__text__"},T[R]=w,E.options.normalize&&(T[R]=T[R].replace(/\s{2,}/g," ").trim()),F[E.options.childkey].push(T)),F}}(this),this.saxParser.ontext=O,this.saxParser.oncdata=function(E){return function(w){var T;if(T=O(w),T)return T.cdata=!0}}(this)},v.prototype.parseString=function(p,R){var O;R!=null&&typeof R=="function"&&(this.on("end",function(b){return this.reset(),R(null,b)}),this.on("error",function(b){return this.reset(),R(b)}));try{return p=p.toString(),p.trim()===""?(this.emit("end",null),!0):(p=h.stripBOM(p),this.options.async?(this.remaining=p,f(this.processAsync),this.saxParser):this.saxParser.write(p).close())}catch(b){if(O=b,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw O}else return this.emit("error",O),this.saxParser.errThrown=!0}},v.prototype.parseStringPromise=function(p){return new g.default(function(R){return function(O,b){return R.parseString(p,function(E,w){return E?b(E):O(w)})}}(this))},v}(c),D.parseString=function(x,v,p){var R,O,b;return p!=null?(typeof p=="function"&&(R=p),(typeof v=="undefined"?"undefined":(0,_.default)(v))==="object"&&(O=v)):(typeof v=="function"&&(R=v),O={}),b=new D.Parser(O),b.parseString(x,R)},D.parseStringPromise=function(x,v){var p,R;return(typeof v=="undefined"?"undefined":(0,_.default)(v))==="object"&&(p=v),R=new D.Parser(p),R.parseStringPromise(x)}}).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,D){"use strict";(function(){"use strict";var k;k=new RegExp(/(?!xmlns)^.*:/),D.normalize=function(g){return g.toLowerCase()},D.firstCharLowerCase=function(g){return g.charAt(0).toLowerCase()+g.slice(1)},D.stripPrefix=function(g){return g.replace(k,"")},D.parseNumbers=function(g){return isNaN(g)||(g=g%1===0?parseInt(g,10):parseFloat(g)),g},D.parseBooleans=function(g){return/^(?:true|false)$/i.test(g)&&(g=g.toLowerCase()==="true"),g}}).call(void 0)},{}],249:[function(H,J,D){"use strict";(function(){"use strict";var k,g,C,M,m=function(_,t){for(var h in t)y.call(t,h)&&(_[h]=t[h]);function n(){this.constructor=_}return n.prototype=t.prototype,_.prototype=new n,_.__super__=t.prototype,_},y={}.hasOwnProperty;g=H("./defaults"),k=H("./builder"),C=H("./parser"),M=H("./processors"),D.defaults=g.defaults,D.processors=M,D.ValidationError=function(S){m(_,S);function _(t){this.message=t}return _}(Error),D.Builder=k.Builder,D.Parser=C.Parser,D.parseString=C.parseString,D.parseStringPromise=C.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(H,J,D){"use strict";(function(){J.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(H,J,D){"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,D){"use strict";var k=H("babel-runtime/core-js/object/get-prototype-of"),g=S(k),C=H("babel-runtime/helpers/typeof"),M=S(C),m=H("babel-runtime/core-js/object/assign"),y=S(m);function S(_){return _&&_.__esModule?_:{default:_}}(function(){var _,t,h,n,c,a,i,s=[].slice,d={}.hasOwnProperty;_=function(){var l,o,r,x,v,p;if(p=arguments[0],v=2<=arguments.length?s.call(arguments,1):[],c(y.default))y.default.apply(null,arguments);else for(l=0,r=v.length;l<r;l++)if(x=v[l],x!=null)for(o in x){if(!d.call(x,o))continue;p[o]=x[o]}return p},c=function(l){return!!l&&Object.prototype.toString.call(l)==="[object Function]"},a=function(l){var o;return!!l&&((o=typeof l=="undefined"?"undefined":(0,M.default)(l))==="function"||o==="object")},h=function(l){return c(Array.isArray)?Array.isArray(l):Object.prototype.toString.call(l)==="[object Array]"},n=function(l){var o;if(h(l))return!l.length;for(o in l){if(!d.call(l,o))continue;return!1}return!0},i=function(l){var o,r;return a(l)&&(r=(0,g.default)(l))&&(o=r.constructor)&&typeof o=="function"&&o instanceof o&&Function.prototype.toString.call(o)===Function.prototype.toString.call(Object)},t=function(l){return c(l.valueOf)?l.valueOf():l},J.exports.assign=_,J.exports.isFunction=c,J.exports.isObject=a,J.exports.isArray=h,J.exports.isEmpty=n,J.exports.isPlainObject=i,J.exports.getValue=t}).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,D){"use strict";(function(){J.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(void 0)},{}],254:[function(H,J,D){"use strict";var k=H("babel-runtime/core-js/object/create"),g=C(k);function C(M){return M&&M.__esModule?M:{default:M}}(function(){var M,m,y;M=H("./NodeType"),y=H("./XMLNode"),J.exports=m=function(){function S(_,t,h){if(this.parent=_,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),t==null)throw new Error("Missing attribute name. "+this.debugInfo(t));this.name=this.stringify.name(t),this.value=this.stringify.attValue(h),this.type=M.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(S.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(S.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(S.prototype,"textContent",{get:function(){return this.value},set:function(t){return this.value=t||""}}),Object.defineProperty(S.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(S.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(S.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(S.prototype,"specified",{get:function(){return!0}}),S.prototype.clone=function(){return(0,g.default)(this)},S.prototype.toString=function(_){return this.options.writer.attribute(this,this.options.writer.filterOptions(_))},S.prototype.debugInfo=function(_){return _=_||this.name,_==null?"parent: <"+this.parent.name+">":"attribute: {"+_+"}, parent: <"+this.parent.name+">"},S.prototype.isEqualNode=function(_){return _.namespaceURI!==this.namespaceURI||(_.prefix!==this.prefix||_.localName!==this.localName)?!1:!(_.value!==this.value)},S}()}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],255:[function(H,J,D){"use strict";var k=H("babel-runtime/core-js/object/create"),g=C(k);function C(M){return M&&M.__esModule?M:{default:M}}(function(){var M,m,y,S=function(h,n){for(var c in n)_.call(n,c)&&(h[c]=n[c]);function a(){this.constructor=h}return a.prototype=n.prototype,h.prototype=new a,h.__super__=n.prototype,h},_={}.hasOwnProperty;M=H("./NodeType"),y=H("./XMLCharacterData"),J.exports=m=function(t){S(h,t);function h(n,c){if(h.__super__.constructor.call(this,n),c==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=M.CData,this.value=this.stringify.cdata(c)}return h.prototype.clone=function(){return(0,g.default)(this)},h.prototype.toString=function(n){return this.options.writer.cdata(this,this.options.writer.filterOptions(n))},h}(y)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(H,J,D){"use strict";var k=H("babel-runtime/core-js/object/create"),g=C(k);function C(M){return M&&M.__esModule?M:{default:M}}(function(){var M,m,y=function(t,h){for(var n in h)S.call(h,n)&&(t[n]=h[n]);function c(){this.constructor=t}return c.prototype=h.prototype,t.prototype=new c,t.__super__=h.prototype,t},S={}.hasOwnProperty;m=H("./XMLNode"),J.exports=M=function(_){y(t,_);function t(h){t.__super__.constructor.call(this,h),this.value=""}return Object.defineProperty(t.prototype,"data",{get:function(){return this.value},set:function(n){return this.value=n||""}}),Object.defineProperty(t.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(t.prototype,"textContent",{get:function(){return this.value},set:function(n){return this.value=n||""}}),t.prototype.clone=function(){return(0,g.default)(this)},t.prototype.substringData=function(h,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.appendData=function(h){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.insertData=function(h,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.deleteData=function(h,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.replaceData=function(h,n,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.isEqualNode=function(h){return t.__super__.isEqualNode.apply(this,arguments).isEqualNode(h)?!(h.data!==this.data):!1},t}(m)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(H,J,D){"use strict";var k=H("babel-runtime/core-js/object/create"),g=C(k);function C(M){return M&&M.__esModule?M:{default:M}}(function(){var M,m,y,S=function(h,n){for(var c in n)_.call(n,c)&&(h[c]=n[c]);function a(){this.constructor=h}return a.prototype=n.prototype,h.prototype=new a,h.__super__=n.prototype,h},_={}.hasOwnProperty;M=H("./NodeType"),m=H("./XMLCharacterData"),J.exports=y=function(t){S(h,t);function h(n,c){if(h.__super__.constructor.call(this,n),c==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=M.Comment,this.value=this.stringify.comment(c)}return h.prototype.clone=function(){return(0,g.default)(this)},h.prototype.toString=function(n){return this.options.writer.comment(this,this.options.writer.filterOptions(n))},h}(m)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(H,J,D){"use strict";var k=H("babel-runtime/core-js/object/keys"),g=m(k),C=H("babel-runtime/core-js/object/create"),M=m(C);function m(y){return y&&y.__esModule?y:{default:y}}(function(){var y,S,_;S=H("./XMLDOMErrorHandler"),_=H("./XMLDOMStringList"),J.exports=y=function(){function t(){var h;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new S,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=h=(0,M.default)(this.defaultParams)}return Object.defineProperty(t.prototype,"parameterNames",{get:function(){return new _((0,g.default)(this.defaultParams))}}),t.prototype.getParameter=function(h){return this.params.hasOwnProperty(h)?this.params[h]:null},t.prototype.canSetParameter=function(h,n){return!0},t.prototype.setParameter=function(h,n){return n!=null?this.params[h]=n:delete this.params[h]},t}()}).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,D){"use strict";(function(){var k;J.exports=k=function(){function g(){}return g.prototype.handleError=function(C){throw new Error(C)},g}()}).call(void 0)},{}],260:[function(H,J,D){"use strict";(function(){var k;J.exports=k=function(){function g(){}return g.prototype.hasFeature=function(C,M){return!0},g.prototype.createDocumentType=function(C,M,m){throw new Error("This DOM method is not implemented.")},g.prototype.createDocument=function(C,M,m){throw new Error("This DOM method is not implemented.")},g.prototype.createHTMLDocument=function(C){throw new Error("This DOM method is not implemented.")},g.prototype.getFeature=function(C,M){throw new Error("This DOM method is not implemented.")},g}()}).call(void 0)},{}],261:[function(H,J,D){"use strict";(function(){var k;J.exports=k=function(){function g(C){this.arr=C||[]}return Object.defineProperty(g.prototype,"length",{get:function(){return this.arr.length}}),g.prototype.item=function(C){return this.arr[C]||null},g.prototype.contains=function(C){return this.arr.indexOf(C)!==-1},g}()}).call(void 0)},{}],262:[function(H,J,D){"use strict";(function(){var k,g,C,M=function(S,_){for(var t in _)m.call(_,t)&&(S[t]=_[t]);function h(){this.constructor=S}return h.prototype=_.prototype,S.prototype=new h,S.__super__=_.prototype,S},m={}.hasOwnProperty;C=H("./XMLNode"),k=H("./NodeType"),J.exports=g=function(y){M(S,y);function S(_,t,h,n,c,a){if(S.__super__.constructor.call(this,_),t==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(h==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(t));if(!n)throw new Error("Missing DTD attribute type. "+this.debugInfo(t));if(!c)throw new Error("Missing DTD attribute default. "+this.debugInfo(t));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(t));if(a&&!c.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(t));this.elementName=this.stringify.name(t),this.type=k.AttributeDeclaration,this.attributeName=this.stringify.name(h),this.attributeType=this.stringify.dtdAttType(n),a&&(this.defaultValue=this.stringify.dtdAttDefault(a)),this.defaultValueType=c}return S.prototype.toString=function(_){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(_))},S}(C)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(H,J,D){"use strict";(function(){var k,g,C,M=function(S,_){for(var t in _)m.call(_,t)&&(S[t]=_[t]);function h(){this.constructor=S}return h.prototype=_.prototype,S.prototype=new h,S.__super__=_.prototype,S},m={}.hasOwnProperty;C=H("./XMLNode"),k=H("./NodeType"),J.exports=g=function(y){M(S,y);function S(_,t,h){if(S.__super__.constructor.call(this,_),t==null)throw new Error("Missing DTD element name. "+this.debugInfo());h||(h="(#PCDATA)"),Array.isArray(h)&&(h="("+h.join(",")+")"),this.name=this.stringify.name(t),this.type=k.ElementDeclaration,this.value=this.stringify.dtdElementValue(h)}return S.prototype.toString=function(_){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(_))},S}(C)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(H,J,D){"use strict";(function(){var k,g,C,M,m=function(_,t){for(var h in t)y.call(t,h)&&(_[h]=t[h]);function n(){this.constructor=_}return n.prototype=t.prototype,_.prototype=new n,_.__super__=t.prototype,_},y={}.hasOwnProperty;M=H("./Utility").isObject,C=H("./XMLNode"),k=H("./NodeType"),J.exports=g=function(S){m(_,S);function _(t,h,n,c){if(_.__super__.constructor.call(this,t),n==null)throw new Error("Missing DTD entity name. "+this.debugInfo(n));if(c==null)throw new Error("Missing DTD entity value. "+this.debugInfo(n));if(this.pe=!!h,this.name=this.stringify.name(n),this.type=k.EntityDeclaration,!M(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(n));if(c.pubID&&!c.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(n));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(n))}}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(t){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(t))},_}(C)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(H,J,D){"use strict";(function(){var k,g,C,M=function(S,_){for(var t in _)m.call(_,t)&&(S[t]=_[t]);function h(){this.constructor=S}return h.prototype=_.prototype,S.prototype=new h,S.__super__=_.prototype,S},m={}.hasOwnProperty;C=H("./XMLNode"),k=H("./NodeType"),J.exports=g=function(y){M(S,y);function S(_,t,h){if(S.__super__.constructor.call(this,_),t==null)throw new Error("Missing DTD notation name. "+this.debugInfo(t));if(!h.pubID&&!h.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(t));this.name=this.stringify.name(t),this.type=k.NotationDeclaration,h.pubID!=null&&(this.pubID=this.stringify.dtdPubID(h.pubID)),h.sysID!=null&&(this.sysID=this.stringify.dtdSysID(h.sysID))}return Object.defineProperty(S.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(S.prototype,"systemId",{get:function(){return this.sysID}}),S.prototype.toString=function(_){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(_))},S}(C)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(H,J,D){"use strict";(function(){var k,g,C,M,m=function(_,t){for(var h in t)y.call(t,h)&&(_[h]=t[h]);function n(){this.constructor=_}return n.prototype=t.prototype,_.prototype=new n,_.__super__=t.prototype,_},y={}.hasOwnProperty;M=H("./Utility").isObject,C=H("./XMLNode"),k=H("./NodeType"),J.exports=g=function(S){m(_,S);function _(t,h,n,c){var a;_.__super__.constructor.call(this,t),M(h)&&(a=h,h=a.version,n=a.encoding,c=a.standalone),h||(h="1.0"),this.type=k.Declaration,this.version=this.stringify.xmlVersion(h),n!=null&&(this.encoding=this.stringify.xmlEncoding(n)),c!=null&&(this.standalone=this.stringify.xmlStandalone(c))}return _.prototype.toString=function(t){return this.options.writer.declaration(this,this.options.writer.filterOptions(t))},_}(C)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(H,J,D){"use strict";(function(){var k,g,C,M,m,y,S,_,t,h=function(a,i){for(var s in i)n.call(i,s)&&(a[s]=i[s]);function d(){this.constructor=a}return d.prototype=i.prototype,a.prototype=new d,a.__super__=i.prototype,a},n={}.hasOwnProperty;t=H("./Utility").isObject,_=H("./XMLNode"),k=H("./NodeType"),g=H("./XMLDTDAttList"),M=H("./XMLDTDEntity"),C=H("./XMLDTDElement"),m=H("./XMLDTDNotation"),S=H("./XMLNamedNodeMap"),J.exports=y=function(c){h(a,c);function a(i,s,d){var f,l,o,r,x,v;if(a.__super__.constructor.call(this,i),this.type=k.DocType,i.children){for(r=i.children,l=0,o=r.length;l<o;l++)if(f=r[l],f.type===k.Element){this.name=f.name;break}}this.documentObject=i,t(s)&&(x=s,s=x.pubID,d=x.sysID),d==null&&(v=[s,d],d=v[0],s=v[1]),s!=null&&(this.pubID=this.stringify.dtdPubID(s)),d!=null&&(this.sysID=this.stringify.dtdSysID(d))}return Object.defineProperty(a.prototype,"entities",{get:function(){var s,d,f,l,o;for(l={},o=this.children,d=0,f=o.length;d<f;d++)s=o[d],s.type===k.EntityDeclaration&&!s.pe&&(l[s.name]=s);return new S(l)}}),Object.defineProperty(a.prototype,"notations",{get:function(){var s,d,f,l,o;for(l={},o=this.children,d=0,f=o.length;d<f;d++)s=o[d],s.type===k.NotationDeclaration&&(l[s.name]=s);return new S(l)}}),Object.defineProperty(a.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(a.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(a.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),a.prototype.element=function(i,s){var d;return d=new C(this,i,s),this.children.push(d),this},a.prototype.attList=function(i,s,d,f,l){var o;return o=new g(this,i,s,d,f,l),this.children.push(o),this},a.prototype.entity=function(i,s){var d;return d=new M(this,!1,i,s),this.children.push(d),this},a.prototype.pEntity=function(i,s){var d;return d=new M(this,!0,i,s),this.children.push(d),this},a.prototype.notation=function(i,s){var d;return d=new m(this,i,s),this.children.push(d),this},a.prototype.toString=function(i){return this.options.writer.docType(this,this.options.writer.filterOptions(i))},a.prototype.ele=function(i,s){return this.element(i,s)},a.prototype.att=function(i,s,d,f,l){return this.attList(i,s,d,f,l)},a.prototype.ent=function(i,s){return this.entity(i,s)},a.prototype.pent=function(i,s){return this.pEntity(i,s)},a.prototype.not=function(i,s){return this.notation(i,s)},a.prototype.up=function(){return this.root()||this.documentObject},a.prototype.isEqualNode=function(i){return a.__super__.isEqualNode.apply(this,arguments).isEqualNode(i)?i.name!==this.name||i.publicId!==this.publicId?!1:!(i.systemId!==this.systemId):!1},a}(_)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLNamedNodeMap":272,"./XMLNode":273}],268:[function(H,J,D){"use strict";(function(){var k,g,C,M,m,y,S,_,t=function(c,a){for(var i in a)h.call(a,i)&&(c[i]=a[i]);function s(){this.constructor=c}return s.prototype=a.prototype,c.prototype=new s,c.__super__=a.prototype,c},h={}.hasOwnProperty;_=H("./Utility").isPlainObject,C=H("./XMLDOMImplementation"),g=H("./XMLDOMConfiguration"),m=H("./XMLNode"),k=H("./NodeType"),S=H("./XMLStringifier"),y=H("./XMLStringWriter"),J.exports=M=function(n){t(c,n);function c(a){c.__super__.constructor.call(this,null),this.name="#document",this.type=k.Document,this.documentURI=null,this.domConfig=new g,a||(a={}),a.writer||(a.writer=new y),this.options=a,this.stringify=new S(a)}return Object.defineProperty(c.prototype,"implementation",{value:new C}),Object.defineProperty(c.prototype,"doctype",{get:function(){var i,s,d,f;for(f=this.children,s=0,d=f.length;s<d;s++)if(i=f[s],i.type===k.DocType)return i;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===k.Declaration?this.children[0].encoding:null}}),Object.defineProperty(c.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===k.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(c.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===k.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(a){var i;return i={},a?_(a)&&(i=a,a=this.options.writer):a=this.options.writer,a.document(this,a.filterOptions(i))},c.prototype.toString=function(a){return this.options.writer.document(this,this.options.writer.filterOptions(a))},c.prototype.createElement=function(a){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(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createComment=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createCDATASection=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createProcessingInstruction=function(a,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createAttribute=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createEntityReference=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementsByTagName=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.importNode=function(a,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createElementNS=function(a,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createAttributeNS=function(a,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementsByTagNameNS=function(a,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementById=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.adoptNode=function(a){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(a,i,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementsByClassName=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createEvent=function(a){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(a,i,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createTreeWalker=function(a,i,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},c}(m)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDOMConfiguration":258,"./XMLDOMImplementation":260,"./XMLNode":273,"./XMLStringWriter":278,"./XMLStringifier":279}],269:[function(H,J,D){"use strict";(function(){var k,g,C,M,m,y,S,_,t,h,n,c,a,i,s,d,f,l,o,r,x,v,p,R,O={}.hasOwnProperty;R=H("./Utility"),v=R.isObject,x=R.isFunction,p=R.isPlainObject,r=R.getValue,k=H("./NodeType"),c=H("./XMLDocument"),i=H("./XMLElement"),M=H("./XMLCData"),m=H("./XMLComment"),d=H("./XMLRaw"),o=H("./XMLText"),s=H("./XMLProcessingInstruction"),h=H("./XMLDeclaration"),n=H("./XMLDocType"),y=H("./XMLDTDAttList"),_=H("./XMLDTDEntity"),S=H("./XMLDTDElement"),t=H("./XMLDTDNotation"),C=H("./XMLAttribute"),l=H("./XMLStringifier"),f=H("./XMLStringWriter"),g=H("./WriterState"),J.exports=a=function(){function b(E,w,T){var F;this.name="?xml",this.type=k.Document,E||(E={}),F={},E.writer?p(E.writer)&&(F=E.writer,E.writer=new f):E.writer=new f,this.options=E,this.writer=E.writer,this.writerOptions=this.writer.filterOptions(F),this.stringify=new l(E),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 b.prototype.createChildNode=function(E){var w,T,F,N,L,G,z,A;switch(E.type){case k.CData:this.cdata(E.value);break;case k.Comment:this.comment(E.value);break;case k.Element:F={},z=E.attribs;for(T in z){if(!O.call(z,T))continue;w=z[T],F[T]=w.value}this.node(E.name,F);break;case k.Dummy:this.dummy();break;case k.Raw:this.raw(E.value);break;case k.Text:this.text(E.value);break;case k.ProcessingInstruction:this.instruction(E.target,E.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+E.constructor.name)}for(A=E.children,L=0,G=A.length;L<G;L++)N=A[L],this.createChildNode(N),N.type===k.Element&&this.up();return this},b.prototype.dummy=function(){return this},b.prototype.node=function(E,w,T){var F;if(E==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(E));return this.openCurrent(),E=r(E),w==null&&(w={}),w=r(w),v(w)||(F=[w,T],T=F[0],w=F[1]),this.currentNode=new i(this,E,w),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,T!=null&&this.text(T),this},b.prototype.element=function(E,w,T){var F,N,L,G,z,A;if(this.currentNode&&this.currentNode.type===k.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(E)||v(E)||x(E))for(G=this.options.noValidation,this.options.noValidation=!0,A=new c(this.options).element("TEMP_ROOT"),A.element(E),this.options.noValidation=G,z=A.children,N=0,L=z.length;N<L;N++)F=z[N],this.createChildNode(F),F.type===k.Element&&this.up();else this.node(E,w,T);return this},b.prototype.attribute=function(E,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(E));if(E!=null&&(E=r(E)),v(E))for(T in E){if(!O.call(E,T))continue;F=E[T],this.attribute(T,F)}else x(w)&&(w=w.apply()),this.options.keepNullAttributes&&w==null?this.currentNode.attribs[E]=new C(this,E,""):w!=null&&(this.currentNode.attribs[E]=new C(this,E,w));return this},b.prototype.text=function(E){var w;return this.openCurrent(),w=new o(this,E),this.onData(this.writer.text(w,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.cdata=function(E){var w;return this.openCurrent(),w=new M(this,E),this.onData(this.writer.cdata(w,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.comment=function(E){var w;return this.openCurrent(),w=new m(this,E),this.onData(this.writer.comment(w,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.raw=function(E){var w;return this.openCurrent(),w=new d(this,E),this.onData(this.writer.raw(w,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.instruction=function(E,w){var T,F,N,L,G;if(this.openCurrent(),E!=null&&(E=r(E)),w!=null&&(w=r(w)),Array.isArray(E))for(T=0,L=E.length;T<L;T++)F=E[T],this.instruction(F);else if(v(E))for(F in E){if(!O.call(E,F))continue;N=E[F],this.instruction(F,N)}else x(w)&&(w=w.apply()),G=new s(this,E,w),this.onData(this.writer.processingInstruction(G,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},b.prototype.declaration=function(E,w,T){var F;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return F=new h(this,E,w,T),this.onData(this.writer.declaration(F,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.doctype=function(E,w,T){if(this.openCurrent(),E==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 n(this,w,T),this.currentNode.rootNodeName=E,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},b.prototype.dtdElement=function(E,w){var T;return this.openCurrent(),T=new S(this,E,w),this.onData(this.writer.dtdElement(T,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.attList=function(E,w,T,F,N){var L;return this.openCurrent(),L=new y(this,E,w,T,F,N),this.onData(this.writer.dtdAttList(L,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.entity=function(E,w){var T;return this.openCurrent(),T=new _(this,!1,E,w),this.onData(this.writer.dtdEntity(T,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.pEntity=function(E,w){var T;return this.openCurrent(),T=new _(this,!0,E,w),this.onData(this.writer.dtdEntity(T,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.notation=function(E,w){var T;return this.openCurrent(),T=new t(this,E,w),this.onData(this.writer.dtdNotation(T,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},b.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},b.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},b.prototype.openNode=function(E){var w,T,F,N;if(!E.isOpen){if(!this.root&&this.currentLevel===0&&E.type===k.Element&&(this.root=E),T="",E.type===k.Element){this.writerOptions.state=g.OpenTag,T=this.writer.indent(E,this.writerOptions,this.currentLevel)+"<"+E.name,N=E.attribs;for(F in N){if(!O.call(N,F))continue;w=N[F],T+=this.writer.attribute(w,this.writerOptions,this.currentLevel)}T+=(E.children?">":"/>")+this.writer.endline(E,this.writerOptions,this.currentLevel),this.writerOptions.state=g.InsideTag}else this.writerOptions.state=g.OpenTag,T=this.writer.indent(E,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+E.rootNodeName,E.pubID&&E.sysID?T+=' PUBLIC "'+E.pubID+'" "'+E.sysID+'"':E.sysID&&(T+=' SYSTEM "'+E.sysID+'"'),E.children?(T+=" [",this.writerOptions.state=g.InsideTag):(this.writerOptions.state=g.CloseTag,T+=">"),T+=this.writer.endline(E,this.writerOptions,this.currentLevel);return this.onData(T,this.currentLevel),E.isOpen=!0}},b.prototype.closeNode=function(E){var w;if(!E.isClosed)return w="",this.writerOptions.state=g.CloseTag,E.type===k.Element?w=this.writer.indent(E,this.writerOptions,this.currentLevel)+"</"+E.name+">"+this.writer.endline(E,this.writerOptions,this.currentLevel):w=this.writer.indent(E,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(E,this.writerOptions,this.currentLevel),this.writerOptions.state=g.None,this.onData(w,this.currentLevel),E.isClosed=!0},b.prototype.onData=function(E,w){return this.documentStarted=!0,this.onDataCallback(E,w+1)},b.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},b.prototype.debugInfo=function(E){return E==null?"":"node: <"+E+">"},b.prototype.ele=function(){return this.element.apply(this,arguments)},b.prototype.nod=function(E,w,T){return this.node(E,w,T)},b.prototype.txt=function(E){return this.text(E)},b.prototype.dat=function(E){return this.cdata(E)},b.prototype.com=function(E){return this.comment(E)},b.prototype.ins=function(E,w){return this.instruction(E,w)},b.prototype.dec=function(E,w,T){return this.declaration(E,w,T)},b.prototype.dtd=function(E,w,T){return this.doctype(E,w,T)},b.prototype.e=function(E,w,T){return this.element(E,w,T)},b.prototype.n=function(E,w,T){return this.node(E,w,T)},b.prototype.t=function(E){return this.text(E)},b.prototype.d=function(E){return this.cdata(E)},b.prototype.c=function(E){return this.comment(E)},b.prototype.r=function(E){return this.raw(E)},b.prototype.i=function(E,w){return this.instruction(E,w)},b.prototype.att=function(){return this.currentNode&&this.currentNode.type===k.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},b.prototype.a=function(){return this.currentNode&&this.currentNode.type===k.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},b.prototype.ent=function(E,w){return this.entity(E,w)},b.prototype.pent=function(E,w){return this.pEntity(E,w)},b.prototype.not=function(E,w){return this.notation(E,w)},b}()}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLAttribute":254,"./XMLCData":255,"./XMLComment":257,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDocument":268,"./XMLElement":271,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLStringWriter":278,"./XMLStringifier":279,"./XMLText":280}],270:[function(H,J,D){"use strict";var k=H("babel-runtime/core-js/object/create"),g=C(k);function C(M){return M&&M.__esModule?M:{default:M}}(function(){var M,m,y,S=function(h,n){for(var c in n)_.call(n,c)&&(h[c]=n[c]);function a(){this.constructor=h}return a.prototype=n.prototype,h.prototype=new a,h.__super__=n.prototype,h},_={}.hasOwnProperty;y=H("./XMLNode"),M=H("./NodeType"),J.exports=m=function(t){S(h,t);function h(n){h.__super__.constructor.call(this,n),this.type=M.Dummy}return h.prototype.clone=function(){return(0,g.default)(this)},h.prototype.toString=function(n){return""},h}(y)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(H,J,D){"use strict";var k=H("babel-runtime/core-js/object/create"),g=C(k);function C(M){return M&&M.__esModule?M:{default:M}}(function(){var M,m,y,S,_,t,h,n,c,a=function(d,f){for(var l in f)i.call(f,l)&&(d[l]=f[l]);function o(){this.constructor=d}return o.prototype=f.prototype,d.prototype=new o,d.__super__=f.prototype,d},i={}.hasOwnProperty;c=H("./Utility"),n=c.isObject,h=c.isFunction,t=c.getValue,_=H("./XMLNode"),M=H("./NodeType"),m=H("./XMLAttribute"),S=H("./XMLNamedNodeMap"),J.exports=y=function(s){a(d,s);function d(f,l,o){var r,x,v,p;if(d.__super__.constructor.call(this,f),l==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(l),this.type=M.Element,this.attribs={},this.schemaTypeInfo=null,o!=null&&this.attribute(o),f.type===M.Document&&(this.isRoot=!0,this.documentObject=f,f.rootObject=this,f.children)){for(p=f.children,x=0,v=p.length;x<v;x++)if(r=p[x],r.type===M.DocType){r.name=this.name;break}}}return Object.defineProperty(d.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(d.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(d.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(d.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(d.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(d.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(d.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(d.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new S(this.attribs)),this.attributeMap}}),d.prototype.clone=function(){var f,l,o,r;o=(0,g.default)(this),o.isRoot&&(o.documentObject=null),o.attribs={},r=this.attribs;for(l in r){if(!i.call(r,l))continue;f=r[l],o.attribs[l]=f.clone()}return o.children=[],this.children.forEach(function(x){var v;return v=x.clone(),v.parent=o,o.children.push(v)}),o},d.prototype.attribute=function(f,l){var o,r;if(f!=null&&(f=t(f)),n(f))for(o in f){if(!i.call(f,o))continue;r=f[o],this.attribute(o,r)}else h(l)&&(l=l.apply()),this.options.keepNullAttributes&&l==null?this.attribs[f]=new m(this,f,""):l!=null&&(this.attribs[f]=new m(this,f,l));return this},d.prototype.removeAttribute=function(f){var l,o,r;if(f==null)throw new Error("Missing attribute name. "+this.debugInfo());if(f=t(f),Array.isArray(f))for(o=0,r=f.length;o<r;o++)l=f[o],delete this.attribs[l];else delete this.attribs[f];return this},d.prototype.toString=function(f){return this.options.writer.element(this,this.options.writer.filterOptions(f))},d.prototype.att=function(f,l){return this.attribute(f,l)},d.prototype.a=function(f,l){return this.attribute(f,l)},d.prototype.getAttribute=function(f){return this.attribs.hasOwnProperty(f)?this.attribs[f].value:null},d.prototype.setAttribute=function(f,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.getAttributeNode=function(f){return this.attribs.hasOwnProperty(f)?this.attribs[f]:null},d.prototype.setAttributeNode=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.removeAttributeNode=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.getElementsByTagName=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.getAttributeNS=function(f,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.setAttributeNS=function(f,l,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.removeAttributeNS=function(f,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.getAttributeNodeNS=function(f,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.setAttributeNodeNS=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.getElementsByTagNameNS=function(f,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.hasAttribute=function(f){return this.attribs.hasOwnProperty(f)},d.prototype.hasAttributeNS=function(f,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.setIdAttribute=function(f,l){return this.attribs.hasOwnProperty(f)?this.attribs[f].isId:l},d.prototype.setIdAttributeNS=function(f,l,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.setIdAttributeNode=function(f,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.getElementsByTagName=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.getElementsByTagNameNS=function(f,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.getElementsByClassName=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.isEqualNode=function(f){var l,o,r;if(!d.__super__.isEqualNode.apply(this,arguments).isEqualNode(f))return!1;if(f.namespaceURI!==this.namespaceURI)return!1;if(f.prefix!==this.prefix)return!1;if(f.localName!==this.localName)return!1;if(f.attribs.length!==this.attribs.length)return!1;for(l=o=0,r=this.attribs.length-1;0<=r?o<=r:o>=r;l=0<=r?++o:--o)if(!this.attribs[l].isEqualNode(f.attribs[l]))return!1;return!0},d}(_)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(H,J,D){"use strict";var k=H("babel-runtime/core-js/object/keys"),g=C(k);function C(M){return M&&M.__esModule?M:{default:M}}(function(){var M;J.exports=M=function(){function m(y){this.nodes=y}return Object.defineProperty(m.prototype,"length",{get:function(){return(0,g.default)(this.nodes).length||0}}),m.prototype.clone=function(){return this.nodes=null},m.prototype.getNamedItem=function(y){return this.nodes[y]},m.prototype.setNamedItem=function(y){var S;return S=this.nodes[y.nodeName],this.nodes[y.nodeName]=y,S||null},m.prototype.removeNamedItem=function(y){var S;return S=this.nodes[y],delete this.nodes[y],S||null},m.prototype.item=function(y){return this.nodes[(0,g.default)(this.nodes)[y]]||null},m.prototype.getNamedItemNS=function(y,S){throw new Error("This DOM method is not implemented.")},m.prototype.setNamedItemNS=function(y){throw new Error("This DOM method is not implemented.")},m.prototype.removeNamedItemNS=function(y,S){throw new Error("This DOM method is not implemented.")},m}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(H,J,D){"use strict";(function(){var k,g,C,M,m,y,S,_,t,h,n,c,a,i,s,d,f,l,o,r={}.hasOwnProperty;o=H("./Utility"),l=o.isObject,f=o.isFunction,d=o.isEmpty,s=o.getValue,_=null,C=null,M=null,m=null,y=null,a=null,i=null,c=null,S=null,g=null,n=null,t=null,k=null,J.exports=h=function(){function x(v){this.parent=v,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,_||(_=H("./XMLElement"),C=H("./XMLCData"),M=H("./XMLComment"),m=H("./XMLDeclaration"),y=H("./XMLDocType"),a=H("./XMLRaw"),i=H("./XMLText"),c=H("./XMLProcessingInstruction"),S=H("./XMLDummy"),g=H("./NodeType"),n=H("./XMLNodeList"),t=H("./XMLNamedNodeMap"),k=H("./DocumentPosition"))}return Object.defineProperty(x.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(x.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(x.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(x.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(x.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new n(this.children)),this.childNodeList}}),Object.defineProperty(x.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(x.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(x.prototype,"previousSibling",{get:function(){var p;return p=this.parent.children.indexOf(this),this.parent.children[p-1]||null}}),Object.defineProperty(x.prototype,"nextSibling",{get:function(){var p;return p=this.parent.children.indexOf(this),this.parent.children[p+1]||null}}),Object.defineProperty(x.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(x.prototype,"textContent",{get:function(){var p,R,O,b,E;if(this.nodeType===g.Element||this.nodeType===g.DocumentFragment){for(E="",b=this.children,R=0,O=b.length;R<O;R++)p=b[R],p.textContent&&(E+=p.textContent);return E}else return null},set:function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),x.prototype.setParent=function(v){var p,R,O,b,E;for(this.parent=v,v&&(this.options=v.options,this.stringify=v.stringify),b=this.children,E=[],R=0,O=b.length;R<O;R++)p=b[R],E.push(p.setParent(this));return E},x.prototype.element=function(v,p,R){var O,b,E,w,T,F,N,L,G,z,A;if(F=null,p===null&&R==null&&(G=[{},null],p=G[0],R=G[1]),p==null&&(p={}),p=s(p),l(p)||(z=[p,R],R=z[0],p=z[1]),v!=null&&(v=s(v)),Array.isArray(v))for(E=0,N=v.length;E<N;E++)b=v[E],F=this.element(b);else if(f(v))F=this.element(v.apply());else if(l(v))for(T in v){if(!r.call(v,T))continue;if(A=v[T],f(A)&&(A=A.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&T.indexOf(this.stringify.convertAttKey)===0)F=this.attribute(T.substr(this.stringify.convertAttKey.length),A);else if(!this.options.separateArrayItems&&Array.isArray(A)&&d(A))F=this.dummy();else if(l(A)&&d(A))F=this.element(T);else if(!this.options.keepNullNodes&&A==null)F=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(A))for(w=0,L=A.length;w<L;w++)b=A[w],O={},O[T]=b,F=this.element(O);else l(A)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&T.indexOf(this.stringify.convertTextKey)===0?F=this.element(A):(F=this.element(T),F.element(A)):F=this.element(T,A)}else!this.options.keepNullNodes&&R===null?F=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&v.indexOf(this.stringify.convertTextKey)===0?F=this.text(R):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&v.indexOf(this.stringify.convertCDataKey)===0?F=this.cdata(R):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&v.indexOf(this.stringify.convertCommentKey)===0?F=this.comment(R):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&v.indexOf(this.stringify.convertRawKey)===0?F=this.raw(R):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&v.indexOf(this.stringify.convertPIKey)===0?F=this.instruction(v.substr(this.stringify.convertPIKey.length),R):F=this.node(v,p,R);if(F==null)throw new Error("Could not create any elements with: "+v+". "+this.debugInfo());return F},x.prototype.insertBefore=function(v,p,R){var O,b,E,w,T;if(v!=null?v.type:void 0)return E=v,w=p,E.setParent(this),w?(b=children.indexOf(w),T=children.splice(b),children.push(E),Array.prototype.push.apply(children,T)):children.push(E),E;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(v));return b=this.parent.children.indexOf(this),T=this.parent.children.splice(b),O=this.parent.element(v,p,R),Array.prototype.push.apply(this.parent.children,T),O},x.prototype.insertAfter=function(v,p,R){var O,b,E;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(v));return b=this.parent.children.indexOf(this),E=this.parent.children.splice(b+1),O=this.parent.element(v,p,R),Array.prototype.push.apply(this.parent.children,E),O},x.prototype.remove=function(){var v,p;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return v=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[v,v-v+1].concat(p=[])),this.parent},x.prototype.node=function(v,p,R){var O,b;return v!=null&&(v=s(v)),p||(p={}),p=s(p),l(p)||(b=[p,R],R=b[0],p=b[1]),O=new _(this,v,p),R!=null&&O.text(R),this.children.push(O),O},x.prototype.text=function(v){var p;return l(v)&&this.element(v),p=new i(this,v),this.children.push(p),this},x.prototype.cdata=function(v){var p;return p=new C(this,v),this.children.push(p),this},x.prototype.comment=function(v){var p;return p=new M(this,v),this.children.push(p),this},x.prototype.commentBefore=function(v){var p,R,O;return R=this.parent.children.indexOf(this),O=this.parent.children.splice(R),p=this.parent.comment(v),Array.prototype.push.apply(this.parent.children,O),this},x.prototype.commentAfter=function(v){var p,R,O;return R=this.parent.children.indexOf(this),O=this.parent.children.splice(R+1),p=this.parent.comment(v),Array.prototype.push.apply(this.parent.children,O),this},x.prototype.raw=function(v){var p;return p=new a(this,v),this.children.push(p),this},x.prototype.dummy=function(){var v;return v=new S(this),v},x.prototype.instruction=function(v,p){var R,O,b,E,w;if(v!=null&&(v=s(v)),p!=null&&(p=s(p)),Array.isArray(v))for(E=0,w=v.length;E<w;E++)R=v[E],this.instruction(R);else if(l(v))for(R in v){if(!r.call(v,R))continue;O=v[R],this.instruction(R,O)}else f(p)&&(p=p.apply()),b=new c(this,v,p),this.children.push(b);return this},x.prototype.instructionBefore=function(v,p){var R,O,b;return O=this.parent.children.indexOf(this),b=this.parent.children.splice(O),R=this.parent.instruction(v,p),Array.prototype.push.apply(this.parent.children,b),this},x.prototype.instructionAfter=function(v,p){var R,O,b;return O=this.parent.children.indexOf(this),b=this.parent.children.splice(O+1),R=this.parent.instruction(v,p),Array.prototype.push.apply(this.parent.children,b),this},x.prototype.declaration=function(v,p,R){var O,b;return O=this.document(),b=new m(O,v,p,R),O.children.length===0?O.children.unshift(b):O.children[0].type===g.Declaration?O.children[0]=b:O.children.unshift(b),O.root()||O},x.prototype.dtd=function(v,p){var R,O,b,E,w,T,F,N,L,G;for(O=this.document(),b=new y(O,v,p),L=O.children,E=w=0,F=L.length;w<F;E=++w)if(R=L[E],R.type===g.DocType)return O.children[E]=b,b;for(G=O.children,E=T=0,N=G.length;T<N;E=++T)if(R=G[E],R.isRoot)return O.children.splice(E,0,b),b;return O.children.push(b),b},x.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},x.prototype.root=function(){var v;for(v=this;v;){if(v.type===g.Document)return v.rootObject;if(v.isRoot)return v;v=v.parent}},x.prototype.document=function(){var v;for(v=this;v;){if(v.type===g.Document)return v;v=v.parent}},x.prototype.end=function(v){return this.document().end(v)},x.prototype.prev=function(){var v;if(v=this.parent.children.indexOf(this),v<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[v-1]},x.prototype.next=function(){var v;if(v=this.parent.children.indexOf(this),v===-1||v===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[v+1]},x.prototype.importDocument=function(v){var p;return p=v.root().clone(),p.parent=this,p.isRoot=!1,this.children.push(p),this},x.prototype.debugInfo=function(v){var p,R;return v=v||this.name,v==null&&!((p=this.parent)!=null?p.name:void 0)?"":v==null?"parent: <"+this.parent.name+">":((R=this.parent)!=null?R.name:void 0)?"node: <"+v+">, parent: <"+this.parent.name+">":"node: <"+v+">"},x.prototype.ele=function(v,p,R){return this.element(v,p,R)},x.prototype.nod=function(v,p,R){return this.node(v,p,R)},x.prototype.txt=function(v){return this.text(v)},x.prototype.dat=function(v){return this.cdata(v)},x.prototype.com=function(v){return this.comment(v)},x.prototype.ins=function(v,p){return this.instruction(v,p)},x.prototype.doc=function(){return this.document()},x.prototype.dec=function(v,p,R){return this.declaration(v,p,R)},x.prototype.e=function(v,p,R){return this.element(v,p,R)},x.prototype.n=function(v,p,R){return this.node(v,p,R)},x.prototype.t=function(v){return this.text(v)},x.prototype.d=function(v){return this.cdata(v)},x.prototype.c=function(v){return this.comment(v)},x.prototype.r=function(v){return this.raw(v)},x.prototype.i=function(v,p){return this.instruction(v,p)},x.prototype.u=function(){return this.up()},x.prototype.importXMLBuilder=function(v){return this.importDocument(v)},x.prototype.replaceChild=function(v,p){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.removeChild=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.appendChild=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.hasChildNodes=function(){return this.children.length!==0},x.prototype.cloneNode=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.isSupported=function(v,p){return!0},x.prototype.hasAttributes=function(){return this.attribs.length!==0},x.prototype.compareDocumentPosition=function(v){var p,R;return p=this,p===v?0:this.document()!==v.document()?(R=k.Disconnected|k.ImplementationSpecific,Math.random()<.5?R|=k.Preceding:R|=k.Following,R):p.isAncestor(v)?k.Contains|k.Preceding:p.isDescendant(v)?k.Contains|k.Following:p.isPreceding(v)?k.Preceding:k.Following},x.prototype.isSameNode=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.lookupPrefix=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.isDefaultNamespace=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.lookupNamespaceURI=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.isEqualNode=function(v){var p,R,O;if(v.nodeType!==this.nodeType)return!1;if(v.children.length!==this.children.length)return!1;for(p=R=0,O=this.children.length-1;0<=O?R<=O:R>=O;p=0<=O?++R:--R)if(!this.children[p].isEqualNode(v.children[p]))return!1;return!0},x.prototype.getFeature=function(v,p){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.setUserData=function(v,p,R){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.getUserData=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.contains=function(v){return v?v===this||this.isDescendant(v):!1},x.prototype.isDescendant=function(v){var p,R,O,b,E;for(E=this.children,O=0,b=E.length;O<b;O++){if(p=E[O],v===p)return!0;if(R=p.isDescendant(v),R)return!0}return!1},x.prototype.isAncestor=function(v){return v.isDescendant(this)},x.prototype.isPreceding=function(v){var p,R;return p=this.treePosition(v),R=this.treePosition(this),p===-1||R===-1?!1:p<R},x.prototype.isFollowing=function(v){var p,R;return p=this.treePosition(v),R=this.treePosition(this),p===-1||R===-1?!1:p>R},x.prototype.treePosition=function(v){var p,R;return R=0,p=!1,this.foreachTreeNode(this.document(),function(O){if(R++,!p&&O===v)return p=!0}),p?R:-1},x.prototype.foreachTreeNode=function(v,p){var R,O,b,E,w;for(v||(v=this.document()),E=v.children,O=0,b=E.length;O<b;O++){if(R=E[O],w=p(R))return w;if(w=this.foreachTreeNode(R,p),w)return w}},x}()}).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,D){"use strict";(function(){var k;J.exports=k=function(){function g(C){this.nodes=C}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(C){return this.nodes[C]||null},g}()}).call(void 0)},{}],275:[function(H,J,D){"use strict";var k=H("babel-runtime/core-js/object/create"),g=C(k);function C(M){return M&&M.__esModule?M:{default:M}}(function(){var M,m,y,S=function(h,n){for(var c in n)_.call(n,c)&&(h[c]=n[c]);function a(){this.constructor=h}return a.prototype=n.prototype,h.prototype=new a,h.__super__=n.prototype,h},_={}.hasOwnProperty;M=H("./NodeType"),m=H("./XMLCharacterData"),J.exports=y=function(t){S(h,t);function h(n,c,a){if(h.__super__.constructor.call(this,n),c==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=M.ProcessingInstruction,this.target=this.stringify.insTarget(c),this.name=this.target,a&&(this.value=this.stringify.insValue(a))}return h.prototype.clone=function(){return(0,g.default)(this)},h.prototype.toString=function(n){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(n))},h.prototype.isEqualNode=function(n){return h.__super__.isEqualNode.apply(this,arguments).isEqualNode(n)?!(n.target!==this.target):!1},h}(m)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],276:[function(H,J,D){"use strict";var k=H("babel-runtime/core-js/object/create"),g=C(k);function C(M){return M&&M.__esModule?M:{default:M}}(function(){var M,m,y,S=function(h,n){for(var c in n)_.call(n,c)&&(h[c]=n[c]);function a(){this.constructor=h}return a.prototype=n.prototype,h.prototype=new a,h.__super__=n.prototype,h},_={}.hasOwnProperty;M=H("./NodeType"),m=H("./XMLNode"),J.exports=y=function(t){S(h,t);function h(n,c){if(h.__super__.constructor.call(this,n),c==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=M.Raw,this.value=this.stringify.raw(c)}return h.prototype.clone=function(){return(0,g.default)(this)},h.prototype.toString=function(n){return this.options.writer.raw(this,this.options.writer.filterOptions(n))},h}(m)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],277:[function(H,J,D){"use strict";(function(){var k,g,C,M,m=function(_,t){for(var h in t)y.call(t,h)&&(_[h]=t[h]);function n(){this.constructor=_}return n.prototype=t.prototype,_.prototype=new n,_.__super__=t.prototype,_},y={}.hasOwnProperty;k=H("./NodeType"),M=H("./XMLWriterBase"),g=H("./WriterState"),J.exports=C=function(S){m(_,S);function _(t,h){this.stream=t,_.__super__.constructor.call(this,h)}return _.prototype.endline=function(t,h,n){return t.isLastRootNode&&h.state===g.CloseTag?"":_.__super__.endline.call(this,t,h,n)},_.prototype.document=function(t,h){var n,c,a,i,s,d,f,l,o;for(f=t.children,c=a=0,s=f.length;a<s;c=++a)n=f[c],n.isLastRootNode=c===t.children.length-1;for(h=this.filterOptions(h),l=t.children,o=[],i=0,d=l.length;i<d;i++)n=l[i],o.push(this.writeChildNode(n,h,0));return o},_.prototype.attribute=function(t,h,n){return this.stream.write(_.__super__.attribute.call(this,t,h,n))},_.prototype.cdata=function(t,h,n){return this.stream.write(_.__super__.cdata.call(this,t,h,n))},_.prototype.comment=function(t,h,n){return this.stream.write(_.__super__.comment.call(this,t,h,n))},_.prototype.declaration=function(t,h,n){return this.stream.write(_.__super__.declaration.call(this,t,h,n))},_.prototype.docType=function(t,h,n){var c,a,i,s;if(n||(n=0),this.openNode(t,h,n),h.state=g.OpenTag,this.stream.write(this.indent(t,h,n)),this.stream.write("<!DOCTYPE "+t.root().name),t.pubID&&t.sysID?this.stream.write(' PUBLIC "'+t.pubID+'" "'+t.sysID+'"'):t.sysID&&this.stream.write(' SYSTEM "'+t.sysID+'"'),t.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(t,h,n)),h.state=g.InsideTag,s=t.children,a=0,i=s.length;a<i;a++)c=s[a],this.writeChildNode(c,h,n+1);h.state=g.CloseTag,this.stream.write("]")}return h.state=g.CloseTag,this.stream.write(h.spaceBeforeSlash+">"),this.stream.write(this.endline(t,h,n)),h.state=g.None,this.closeNode(t,h,n)},_.prototype.element=function(t,h,n){var c,a,i,s,d,f,l,o,r,x;n||(n=0),this.openNode(t,h,n),h.state=g.OpenTag,this.stream.write(this.indent(t,h,n)+"<"+t.name),r=t.attribs;for(l in r){if(!y.call(r,l))continue;c=r[l],this.attribute(c,h,n)}if(i=t.children.length,s=i===0?null:t.children[0],i===0||t.children.every(function(v){return(v.type===k.Text||v.type===k.Raw)&&v.value===""}))h.allowEmpty?(this.stream.write(">"),h.state=g.CloseTag,this.stream.write("</"+t.name+">")):(h.state=g.CloseTag,this.stream.write(h.spaceBeforeSlash+"/>"));else if(h.pretty&&i===1&&(s.type===k.Text||s.type===k.Raw)&&s.value!=null)this.stream.write(">"),h.state=g.InsideTag,h.suppressPrettyCount++,o=!0,this.writeChildNode(s,h,n+1),h.suppressPrettyCount--,o=!1,h.state=g.CloseTag,this.stream.write("</"+t.name+">");else{for(this.stream.write(">"+this.endline(t,h,n)),h.state=g.InsideTag,x=t.children,d=0,f=x.length;d<f;d++)a=x[d],this.writeChildNode(a,h,n+1);h.state=g.CloseTag,this.stream.write(this.indent(t,h,n)+"</"+t.name+">")}return this.stream.write(this.endline(t,h,n)),h.state=g.None,this.closeNode(t,h,n)},_.prototype.processingInstruction=function(t,h,n){return this.stream.write(_.__super__.processingInstruction.call(this,t,h,n))},_.prototype.raw=function(t,h,n){return this.stream.write(_.__super__.raw.call(this,t,h,n))},_.prototype.text=function(t,h,n){return this.stream.write(_.__super__.text.call(this,t,h,n))},_.prototype.dtdAttList=function(t,h,n){return this.stream.write(_.__super__.dtdAttList.call(this,t,h,n))},_.prototype.dtdElement=function(t,h,n){return this.stream.write(_.__super__.dtdElement.call(this,t,h,n))},_.prototype.dtdEntity=function(t,h,n){return this.stream.write(_.__super__.dtdEntity.call(this,t,h,n))},_.prototype.dtdNotation=function(t,h,n){return this.stream.write(_.__super__.dtdNotation.call(this,t,h,n))},_}(M)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(H,J,D){"use strict";(function(){var k,g,C=function(y,S){for(var _ in S)M.call(S,_)&&(y[_]=S[_]);function t(){this.constructor=y}return t.prototype=S.prototype,y.prototype=new t,y.__super__=S.prototype,y},M={}.hasOwnProperty;g=H("./XMLWriterBase"),J.exports=k=function(m){C(y,m);function y(S){y.__super__.constructor.call(this,S)}return y.prototype.document=function(S,_){var t,h,n,c,a;for(_=this.filterOptions(_),c="",a=S.children,h=0,n=a.length;h<n;h++)t=a[h],c+=this.writeChildNode(t,_,0);return _.pretty&&c.slice(-_.newline.length)===_.newline&&(c=c.slice(0,-_.newline.length)),c},y}(g)}).call(void 0)},{"./XMLWriterBase":281}],279:[function(H,J,D){"use strict";(function(){var k,g=function(m,y){return function(){return m.apply(y,arguments)}},C={}.hasOwnProperty;J.exports=k=function(){function M(m){this.assertLegalName=g(this.assertLegalName,this),this.assertLegalChar=g(this.assertLegalChar,this);var y,S,_;m||(m={}),this.options=m,this.options.version||(this.options.version="1.0"),S=m.stringify||{};for(y in S){if(!C.call(S,y))continue;_=S[y],this[y]=_}}return M.prototype.name=function(m){return this.options.noValidation?m:this.assertLegalName(""+m||"")},M.prototype.text=function(m){return this.options.noValidation?m:this.assertLegalChar(this.textEscape(""+m||""))},M.prototype.cdata=function(m){return this.options.noValidation?m:(m=""+m||"",m=m.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(m))},M.prototype.comment=function(m){if(this.options.noValidation)return m;if(m=""+m||"",m.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+m);return this.assertLegalChar(m)},M.prototype.raw=function(m){return this.options.noValidation?m:""+m||""},M.prototype.attValue=function(m){return this.options.noValidation?m:this.assertLegalChar(this.attEscape(m=""+m||""))},M.prototype.insTarget=function(m){return this.options.noValidation?m:this.assertLegalChar(""+m||"")},M.prototype.insValue=function(m){if(this.options.noValidation)return m;if(m=""+m||"",m.match(/\?>/))throw new Error("Invalid processing instruction value: "+m);return this.assertLegalChar(m)},M.prototype.xmlVersion=function(m){if(this.options.noValidation)return m;if(m=""+m||"",!m.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+m);return m},M.prototype.xmlEncoding=function(m){if(this.options.noValidation)return m;if(m=""+m||"",!m.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+m);return this.assertLegalChar(m)},M.prototype.xmlStandalone=function(m){return this.options.noValidation?m:m?"yes":"no"},M.prototype.dtdPubID=function(m){return this.options.noValidation?m:this.assertLegalChar(""+m||"")},M.prototype.dtdSysID=function(m){return this.options.noValidation?m:this.assertLegalChar(""+m||"")},M.prototype.dtdElementValue=function(m){return this.options.noValidation?m:this.assertLegalChar(""+m||"")},M.prototype.dtdAttType=function(m){return this.options.noValidation?m:this.assertLegalChar(""+m||"")},M.prototype.dtdAttDefault=function(m){return this.options.noValidation?m:this.assertLegalChar(""+m||"")},M.prototype.dtdEntityValue=function(m){return this.options.noValidation?m:this.assertLegalChar(""+m||"")},M.prototype.dtdNData=function(m){return this.options.noValidation?m:this.assertLegalChar(""+m||"")},M.prototype.convertAttKey="@",M.prototype.convertPIKey="?",M.prototype.convertTextKey="#text",M.prototype.convertCDataKey="#cdata",M.prototype.convertCommentKey="#comment",M.prototype.convertRawKey="#raw",M.prototype.assertLegalChar=function(m){var y,S;if(this.options.noValidation)return m;if(y="",this.options.version==="1.0"){if(y=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,S=m.match(y))throw new Error("Invalid character in string: "+m+" at index "+S.index)}else if(this.options.version==="1.1"&&(y=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,S=m.match(y)))throw new Error("Invalid character in string: "+m+" at index "+S.index);return m},M.prototype.assertLegalName=function(m){var y;if(this.options.noValidation)return m;if(this.assertLegalChar(m),y=/^([: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])*$/,!m.match(y))throw new Error("Invalid character in name");return m},M.prototype.textEscape=function(m){var y;return this.options.noValidation?m:(y=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,m.replace(y,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))},M.prototype.attEscape=function(m){var y;return this.options.noValidation?m:(y=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,m.replace(y,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))},M}()}).call(void 0)},{}],280:[function(H,J,D){"use strict";var k=H("babel-runtime/core-js/object/create"),g=C(k);function C(M){return M&&M.__esModule?M:{default:M}}(function(){var M,m,y,S=function(h,n){for(var c in n)_.call(n,c)&&(h[c]=n[c]);function a(){this.constructor=h}return a.prototype=n.prototype,h.prototype=new a,h.__super__=n.prototype,h},_={}.hasOwnProperty;M=H("./NodeType"),m=H("./XMLCharacterData"),J.exports=y=function(t){S(h,t);function h(n,c){if(h.__super__.constructor.call(this,n),c==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=M.Text,this.value=this.stringify.text(c)}return Object.defineProperty(h.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(h.prototype,"wholeText",{get:function(){var c,a,i;for(i="",a=this.previousSibling;a;)i=a.data+i,a=a.previousSibling;for(i+=this.data,c=this.nextSibling;c;)i=i+c.data,c=c.nextSibling;return i}}),h.prototype.clone=function(){return(0,g.default)(this)},h.prototype.toString=function(n){return this.options.writer.text(this,this.options.writer.filterOptions(n))},h.prototype.splitText=function(n){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.replaceWholeText=function(n){throw new Error("This DOM method is not implemented."+this.debugInfo())},h}(m)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],281:[function(H,J,D){"use strict";(function(){var k,g,C,M,m,y,S,_,t,h,n,c,a,i,s,d,f,l={}.hasOwnProperty;f=H("./Utility").assign,k=H("./NodeType"),t=H("./XMLDeclaration"),h=H("./XMLDocType"),C=H("./XMLCData"),M=H("./XMLComment"),c=H("./XMLElement"),i=H("./XMLRaw"),s=H("./XMLText"),a=H("./XMLProcessingInstruction"),n=H("./XMLDummy"),m=H("./XMLDTDAttList"),y=H("./XMLDTDElement"),S=H("./XMLDTDEntity"),_=H("./XMLDTDNotation"),g=H("./WriterState"),J.exports=d=function(){function o(r){var x,v,p;r||(r={}),this.options=r,v=r.writer||{};for(x in v){if(!l.call(v,x))continue;p=v[x],this["_"+x]=this[x],this[x]=p}}return o.prototype.filterOptions=function(r){var x,v,p,R,O,b,E,w;return r||(r={}),r=f({},this.options,r),x={writer:this},x.pretty=r.pretty||!1,x.allowEmpty=r.allowEmpty||!1,x.indent=(v=r.indent)!=null?v:" ",x.newline=(p=r.newline)!=null?p:`
`,x.offset=(R=r.offset)!=null?R:0,x.dontPrettyTextNodes=(O=(b=r.dontPrettyTextNodes)!=null?b:r.dontprettytextnodes)!=null?O:0,x.spaceBeforeSlash=(E=(w=r.spaceBeforeSlash)!=null?w:r.spacebeforeslash)!=null?E:"",x.spaceBeforeSlash===!0&&(x.spaceBeforeSlash=" "),x.suppressPrettyCount=0,x.user={},x.state=g.None,x},o.prototype.indent=function(r,x,v){var p;return!x.pretty||x.suppressPrettyCount?"":x.pretty&&(p=(v||0)+x.offset+1,p>0)?new Array(p).join(x.indent):""},o.prototype.endline=function(r,x,v){return!x.pretty||x.suppressPrettyCount?"":x.newline},o.prototype.attribute=function(r,x,v){var p;return this.openAttribute(r,x,v),p=" "+r.name+'="'+r.value+'"',this.closeAttribute(r,x,v),p},o.prototype.cdata=function(r,x,v){var p;return this.openNode(r,x,v),x.state=g.OpenTag,p=this.indent(r,x,v)+"<![CDATA[",x.state=g.InsideTag,p+=r.value,x.state=g.CloseTag,p+="]]>"+this.endline(r,x,v),x.state=g.None,this.closeNode(r,x,v),p},o.prototype.comment=function(r,x,v){var p;return this.openNode(r,x,v),x.state=g.OpenTag,p=this.indent(r,x,v)+"<!-- ",x.state=g.InsideTag,p+=r.value,x.state=g.CloseTag,p+=" -->"+this.endline(r,x,v),x.state=g.None,this.closeNode(r,x,v),p},o.prototype.declaration=function(r,x,v){var p;return this.openNode(r,x,v),x.state=g.OpenTag,p=this.indent(r,x,v)+"<?xml",x.state=g.InsideTag,p+=' version="'+r.version+'"',r.encoding!=null&&(p+=' encoding="'+r.encoding+'"'),r.standalone!=null&&(p+=' standalone="'+r.standalone+'"'),x.state=g.CloseTag,p+=x.spaceBeforeSlash+"?>",p+=this.endline(r,x,v),x.state=g.None,this.closeNode(r,x,v),p},o.prototype.docType=function(r,x,v){var p,R,O,b,E;if(v||(v=0),this.openNode(r,x,v),x.state=g.OpenTag,b=this.indent(r,x,v),b+="<!DOCTYPE "+r.root().name,r.pubID&&r.sysID?b+=' PUBLIC "'+r.pubID+'" "'+r.sysID+'"':r.sysID&&(b+=' SYSTEM "'+r.sysID+'"'),r.children.length>0){for(b+=" [",b+=this.endline(r,x,v),x.state=g.InsideTag,E=r.children,R=0,O=E.length;R<O;R++)p=E[R],b+=this.writeChildNode(p,x,v+1);x.state=g.CloseTag,b+="]"}return x.state=g.CloseTag,b+=x.spaceBeforeSlash+">",b+=this.endline(r,x,v),x.state=g.None,this.closeNode(r,x,v),b},o.prototype.element=function(r,x,v){var p,R,O,b,E,w,T,F,N,L,G,z,A,B;v||(v=0),L=!1,G="",this.openNode(r,x,v),x.state=g.OpenTag,G+=this.indent(r,x,v)+"<"+r.name,z=r.attribs;for(N in z){if(!l.call(z,N))continue;p=z[N],G+=this.attribute(p,x,v)}if(O=r.children.length,b=O===0?null:r.children[0],O===0||r.children.every(function(U){return(U.type===k.Text||U.type===k.Raw)&&U.value===""}))x.allowEmpty?(G+=">",x.state=g.CloseTag,G+="</"+r.name+">"+this.endline(r,x,v)):(x.state=g.CloseTag,G+=x.spaceBeforeSlash+"/>"+this.endline(r,x,v));else if(x.pretty&&O===1&&(b.type===k.Text||b.type===k.Raw)&&b.value!=null)G+=">",x.state=g.InsideTag,x.suppressPrettyCount++,L=!0,G+=this.writeChildNode(b,x,v+1),x.suppressPrettyCount--,L=!1,x.state=g.CloseTag,G+="</"+r.name+">"+this.endline(r,x,v);else{if(x.dontPrettyTextNodes){for(A=r.children,E=0,T=A.length;E<T;E++)if(R=A[E],(R.type===k.Text||R.type===k.Raw)&&R.value!=null){x.suppressPrettyCount++,L=!0;break}}for(G+=">"+this.endline(r,x,v),x.state=g.InsideTag,B=r.children,w=0,F=B.length;w<F;w++)R=B[w],G+=this.writeChildNode(R,x,v+1);x.state=g.CloseTag,G+=this.indent(r,x,v)+"</"+r.name+">",L&&x.suppressPrettyCount--,G+=this.endline(r,x,v),x.state=g.None}return this.closeNode(r,x,v),G},o.prototype.writeChildNode=function(r,x,v){switch(r.type){case k.CData:return this.cdata(r,x,v);case k.Comment:return this.comment(r,x,v);case k.Element:return this.element(r,x,v);case k.Raw:return this.raw(r,x,v);case k.Text:return this.text(r,x,v);case k.ProcessingInstruction:return this.processingInstruction(r,x,v);case k.Dummy:return"";case k.Declaration:return this.declaration(r,x,v);case k.DocType:return this.docType(r,x,v);case k.AttributeDeclaration:return this.dtdAttList(r,x,v);case k.ElementDeclaration:return this.dtdElement(r,x,v);case k.EntityDeclaration:return this.dtdEntity(r,x,v);case k.NotationDeclaration:return this.dtdNotation(r,x,v);default:throw new Error("Unknown XML node type: "+r.constructor.name)}},o.prototype.processingInstruction=function(r,x,v){var p;return this.openNode(r,x,v),x.state=g.OpenTag,p=this.indent(r,x,v)+"<?",x.state=g.InsideTag,p+=r.target,r.value&&(p+=" "+r.value),x.state=g.CloseTag,p+=x.spaceBeforeSlash+"?>",p+=this.endline(r,x,v),x.state=g.None,this.closeNode(r,x,v),p},o.prototype.raw=function(r,x,v){var p;return this.openNode(r,x,v),x.state=g.OpenTag,p=this.indent(r,x,v),x.state=g.InsideTag,p+=r.value,x.state=g.CloseTag,p+=this.endline(r,x,v),x.state=g.None,this.closeNode(r,x,v),p},o.prototype.text=function(r,x,v){var p;return this.openNode(r,x,v),x.state=g.OpenTag,p=this.indent(r,x,v),x.state=g.InsideTag,p+=r.value,x.state=g.CloseTag,p+=this.endline(r,x,v),x.state=g.None,this.closeNode(r,x,v),p},o.prototype.dtdAttList=function(r,x,v){var p;return this.openNode(r,x,v),x.state=g.OpenTag,p=this.indent(r,x,v)+"<!ATTLIST",x.state=g.InsideTag,p+=" "+r.elementName+" "+r.attributeName+" "+r.attributeType,r.defaultValueType!=="#DEFAULT"&&(p+=" "+r.defaultValueType),r.defaultValue&&(p+=' "'+r.defaultValue+'"'),x.state=g.CloseTag,p+=x.spaceBeforeSlash+">"+this.endline(r,x,v),x.state=g.None,this.closeNode(r,x,v),p},o.prototype.dtdElement=function(r,x,v){var p;return this.openNode(r,x,v),x.state=g.OpenTag,p=this.indent(r,x,v)+"<!ELEMENT",x.state=g.InsideTag,p+=" "+r.name+" "+r.value,x.state=g.CloseTag,p+=x.spaceBeforeSlash+">"+this.endline(r,x,v),x.state=g.None,this.closeNode(r,x,v),p},o.prototype.dtdEntity=function(r,x,v){var p;return this.openNode(r,x,v),x.state=g.OpenTag,p=this.indent(r,x,v)+"<!ENTITY",x.state=g.InsideTag,r.pe&&(p+=" %"),p+=" "+r.name,r.value?p+=' "'+r.value+'"':(r.pubID&&r.sysID?p+=' PUBLIC "'+r.pubID+'" "'+r.sysID+'"':r.sysID&&(p+=' SYSTEM "'+r.sysID+'"'),r.nData&&(p+=" NDATA "+r.nData)),x.state=g.CloseTag,p+=x.spaceBeforeSlash+">"+this.endline(r,x,v),x.state=g.None,this.closeNode(r,x,v),p},o.prototype.dtdNotation=function(r,x,v){var p;return this.openNode(r,x,v),x.state=g.OpenTag,p=this.indent(r,x,v)+"<!NOTATION",x.state=g.InsideTag,p+=" "+r.name,r.pubID&&r.sysID?p+=' PUBLIC "'+r.pubID+'" "'+r.sysID+'"':r.pubID?p+=' PUBLIC "'+r.pubID+'"':r.sysID&&(p+=' SYSTEM "'+r.sysID+'"'),x.state=g.CloseTag,p+=x.spaceBeforeSlash+">"+this.endline(r,x,v),x.state=g.None,this.closeNode(r,x,v),p},o.prototype.openNode=function(r,x,v){},o.prototype.closeNode=function(r,x,v){},o.prototype.openAttribute=function(r,x,v){},o.prototype.closeAttribute=function(r,x,v){},o}()}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLCData":255,"./XMLComment":257,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDummy":270,"./XMLElement":271,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLText":280}],282:[function(H,J,D){"use strict";(function(){var k,g,C,M,m,y,S,_,t,h;h=H("./Utility"),_=h.assign,t=h.isFunction,C=H("./XMLDOMImplementation"),M=H("./XMLDocument"),m=H("./XMLDocumentCB"),S=H("./XMLStringWriter"),y=H("./XMLStreamWriter"),k=H("./NodeType"),g=H("./WriterState"),J.exports.create=function(n,c,a,i){var s,d;if(n==null)throw new Error("Root element needs a name.");return i=_({},c,a,i),s=new M(i),d=s.element(n),i.headless||(s.declaration(i),(i.pubID!=null||i.sysID!=null)&&s.dtd(i)),d},J.exports.begin=function(n,c,a){var i;return t(n)&&(i=[n,c],c=i[0],a=i[1],n={}),c?new m(n,c,a):new M(n)},J.exports.stringWriter=function(n){return new S(n)},J.exports.streamWriter=function(n,c){return new y(n,c)},J.exports.implementation=new C,J.exports.nodeType=k,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,D){J.exports=g;var k=Object.prototype.hasOwnProperty;function g(){for(var C={},M=0;M<arguments.length;M++){var m=arguments[M];for(var y in m)k.call(m,y)&&(C[y]=m[y])}return C}},{}],284:[function(H,J,D){"use strict";var k=H("buffer").Buffer,g=H("./sha"),C=H("./md5"),M={sha1:g,md5:C},m=64,y=k.alloc(m);y.fill(0);function S(h,n,c){k.isBuffer(n)||(n=k.from(n)),k.isBuffer(c)||(c=k.from(c)),n.length>m?n=h(n):n.length<m&&(n=k.concat([n,y],m));for(var a=k.alloc(m),i=k.alloc(m),s=0;s<m;s++)a[s]=n[s]^54,i[s]=n[s]^92;var d=h(k.concat([a,c]));return h(k.concat([i,d]))}function _(h,n){h=h||"sha1";var c=M[h],a=[],i=0;return c||t("algorithm:",h,"is not yet supported"),{update:function(d){return k.isBuffer(d)||(d=k.from(d)),a.push(d),i+=d.length,this},digest:function(d){var f=k.concat(a),l=n?S(c,n,f):c(f);return a=null,d?l.toString(d):l}}}function t(){var h=[].slice.call(arguments).join(" ");throw new Error([h,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
`))}D.createHash=function(h){return _(h)},D.createHmac=function(h,n){return _(h,n)},D.createCredentials=function(){t("sorry,createCredentials is not implemented yet")},D.createCipher=function(){t("sorry,createCipher is not implemented yet")},D.createCipheriv=function(){t("sorry,createCipheriv is not implemented yet")},D.createDecipher=function(){t("sorry,createDecipher is not implemented yet")},D.createDecipheriv=function(){t("sorry,createDecipheriv is not implemented yet")},D.createSign=function(){t("sorry,createSign is not implemented yet")},D.createVerify=function(){t("sorry,createVerify is not implemented yet")},D.createDiffieHellman=function(){t("sorry,createDiffieHellman is not implemented yet")},D.pbkdf2=function(){t("sorry,pbkdf2 is not implemented yet")}},{"./md5":286,"./sha":287,buffer:73}],285:[function(H,J,D){"use strict";var k=H("buffer").Buffer,g=4,C=k.alloc(g);C.fill(0);var M=8;function m(_,t){if(_.length%g!==0){var h=_.length+(g-_.length%g);_=k.concat([_,C],h)}for(var n=[],c=t?_.readInt32BE:_.readInt32LE,a=0;a<_.length;a+=g)n.push(c.call(_,a));return n}function y(_,t,h){for(var n=k.alloc(t),c=h?n.writeInt32BE:n.writeInt32LE,a=0;a<_.length;a++)c.call(n,_[a],a*4,!0);return n}function S(_,t,h,n){k.isBuffer(_)||(_=k.from(_));var c=t(m(_,n),_.length*M);return y(c,h,n)}J.exports={hash:S}},{buffer:73}],286:[function(H,J,D){"use strict";var k=H("./helpers");function g(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function C(n,c){n[c>>5]|=128<<c%32,n[(c+64>>>9<<4)+14]=c;for(var a=1732584193,i=-271733879,s=-1732584194,d=271733878,f=0;f<n.length;f+=16){var l=a,o=i,r=s,x=d;a=m(a,i,s,d,n[f+0],7,-680876936),d=m(d,a,i,s,n[f+1],12,-389564586),s=m(s,d,a,i,n[f+2],17,606105819),i=m(i,s,d,a,n[f+3],22,-1044525330),a=m(a,i,s,d,n[f+4],7,-176418897),d=m(d,a,i,s,n[f+5],12,1200080426),s=m(s,d,a,i,n[f+6],17,-1473231341),i=m(i,s,d,a,n[f+7],22,-45705983),a=m(a,i,s,d,n[f+8],7,1770035416),d=m(d,a,i,s,n[f+9],12,-1958414417),s=m(s,d,a,i,n[f+10],17,-42063),i=m(i,s,d,a,n[f+11],22,-1990404162),a=m(a,i,s,d,n[f+12],7,1804603682),d=m(d,a,i,s,n[f+13],12,-40341101),s=m(s,d,a,i,n[f+14],17,-1502002290),i=m(i,s,d,a,n[f+15],22,1236535329),a=y(a,i,s,d,n[f+1],5,-165796510),d=y(d,a,i,s,n[f+6],9,-1069501632),s=y(s,d,a,i,n[f+11],14,643717713),i=y(i,s,d,a,n[f+0],20,-373897302),a=y(a,i,s,d,n[f+5],5,-701558691),d=y(d,a,i,s,n[f+10],9,38016083),s=y(s,d,a,i,n[f+15],14,-660478335),i=y(i,s,d,a,n[f+4],20,-405537848),a=y(a,i,s,d,n[f+9],5,568446438),d=y(d,a,i,s,n[f+14],9,-1019803690),s=y(s,d,a,i,n[f+3],14,-187363961),i=y(i,s,d,a,n[f+8],20,1163531501),a=y(a,i,s,d,n[f+13],5,-1444681467),d=y(d,a,i,s,n[f+2],9,-51403784),s=y(s,d,a,i,n[f+7],14,1735328473),i=y(i,s,d,a,n[f+12],20,-1926607734),a=S(a,i,s,d,n[f+5],4,-378558),d=S(d,a,i,s,n[f+8],11,-2022574463),s=S(s,d,a,i,n[f+11],16,1839030562),i=S(i,s,d,a,n[f+14],23,-35309556),a=S(a,i,s,d,n[f+1],4,-1530992060),d=S(d,a,i,s,n[f+4],11,1272893353),s=S(s,d,a,i,n[f+7],16,-155497632),i=S(i,s,d,a,n[f+10],23,-1094730640),a=S(a,i,s,d,n[f+13],4,681279174),d=S(d,a,i,s,n[f+0],11,-358537222),s=S(s,d,a,i,n[f+3],16,-722521979),i=S(i,s,d,a,n[f+6],23,76029189),a=S(a,i,s,d,n[f+9],4,-640364487),d=S(d,a,i,s,n[f+12],11,-421815835),s=S(s,d,a,i,n[f+15],16,530742520),i=S(i,s,d,a,n[f+2],23,-995338651),a=_(a,i,s,d,n[f+0],6,-198630844),d=_(d,a,i,s,n[f+7],10,1126891415),s=_(s,d,a,i,n[f+14],15,-1416354905),i=_(i,s,d,a,n[f+5],21,-57434055),a=_(a,i,s,d,n[f+12],6,1700485571),d=_(d,a,i,s,n[f+3],10,-1894986606),s=_(s,d,a,i,n[f+10],15,-1051523),i=_(i,s,d,a,n[f+1],21,-2054922799),a=_(a,i,s,d,n[f+8],6,1873313359),d=_(d,a,i,s,n[f+15],10,-30611744),s=_(s,d,a,i,n[f+6],15,-1560198380),i=_(i,s,d,a,n[f+13],21,1309151649),a=_(a,i,s,d,n[f+4],6,-145523070),d=_(d,a,i,s,n[f+11],10,-1120210379),s=_(s,d,a,i,n[f+2],15,718787259),i=_(i,s,d,a,n[f+9],21,-343485551),a=t(a,l),i=t(i,o),s=t(s,r),d=t(d,x)}return Array(a,i,s,d)}function M(n,c,a,i,s,d){return t(h(t(t(c,n),t(i,d)),s),a)}function m(n,c,a,i,s,d,f){return M(c&a|~c&i,n,c,s,d,f)}function y(n,c,a,i,s,d,f){return M(c&i|a&~i,n,c,s,d,f)}function S(n,c,a,i,s,d,f){return M(c^a^i,n,c,s,d,f)}function _(n,c,a,i,s,d,f){return M(a^(c|~i),n,c,s,d,f)}function t(n,c){var a=(n&65535)+(c&65535),i=(n>>16)+(c>>16)+(a>>16);return i<<16|a&65535}function h(n,c){return n<<c|n>>>32-c}J.exports=function(c){return k.hash(c,C,16)}},{"./helpers":285}],287:[function(H,J,D){"use strict";var k=H("./helpers");function g(S,_){S[_>>5]|=128<<24-_%32,S[(_+64>>9<<4)+15]=_;for(var t=Array(80),h=1732584193,n=-271733879,c=-1732584194,a=271733878,i=-1009589776,s=0;s<S.length;s+=16){for(var d=h,f=n,l=c,o=a,r=i,x=0;x<80;x++){x<16?t[x]=S[s+x]:t[x]=y(t[x-3]^t[x-8]^t[x-14]^t[x-16],1);var v=m(m(y(h,5),C(x,n,c,a)),m(m(i,t[x]),M(x)));i=a,a=c,c=y(n,30),n=h,h=v}h=m(h,d),n=m(n,f),c=m(c,l),a=m(a,o),i=m(i,r)}return Array(h,n,c,a,i)}function C(S,_,t,h){return S<20?_&t|~_&h:S<40?_^t^h:S<60?_&t|_&h|t&h:_^t^h}function M(S){return S<20?1518500249:S<40?1859775393:S<60?-1894007588:-899497514}function m(S,_){var t=(S&65535)+(_&65535),h=(S>>16)+(_>>16)+(t>>16);return h<<16|t&65535}function y(S,_){return S<<_|S>>>32-_}J.exports=function(_){return k.hash(_,g,20,!0)}},{"./helpers":285}],288:[function(H,J,D){"use strict";J.exports=function(){return function(){}}},{}],289:[function(H,J,D){(function(k){"use strict";var g=H("babel-runtime/helpers/typeof"),C=M(g);function M(h){return h&&h.__esModule?h:{default:h}}var m=H("stream"),y=m.Stream,S=H("../lib/common/utils/isArray"),_=S.isArray;J.exports.string=function(n){return typeof n=="string"},J.exports.array=_,J.exports.buffer=k.isBuffer;function t(h){return h instanceof y}J.exports.writableStream=function(n){return t(n)&&typeof n._write=="function"&&(0,C.default)(n._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,D){"use strict";D.encodeURIComponent=function(k){try{return encodeURIComponent(k)}catch(g){return k}},D.escape=H("escape-html"),D.timestamp=function(g){if(g){var C=g;return typeof C=="string"&&(C=Number(C)),String(g).length===10&&(C*=1e3),new Date(C)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(H,J,D){(function(k,g){"use strict";var C=H("babel-runtime/core-js/json/stringify"),M=S(C),m=H("babel-runtime/helpers/typeof"),y=S(m);function S(x){return x&&x.__esModule?x:{default:x}}var _=H("util"),t=H("url"),h=H("http"),n=H("https"),c=H("debug")("urllib"),a=H("humanize-ms"),i,s=0,d=Math.pow(2,31)-10,f=/^https?:\/\//i;function l(x,v){return x===void 0?v:x}function o(x,v){return function(p,R,O){if(p)return v(p);x({data:R,status:O.statusCode,headers:O.headers,res:O})}}D.TIMEOUTS=[a("300s"),a("300s")];var r=["json","text"];D.request=function(v,p,R){return arguments.length===2&&typeof p=="function"&&(R=p,p=null),typeof R=="function"?D.requestWithCallback(v,p,R):(i||(i=H("any-promise")),new i(function(O,b){D.requestWithCallback(v,p,o(O,b))}))},D.requestWithCallback=function(v,p,R){if(!v||typeof v!="string"&&(typeof v=="undefined"?"undefined":(0,y.default)(v))!=="object"){var O=_.format("expect request url to be a string or a http request options, but got %j",v);throw new Error(O)}arguments.length===2&&typeof p=="function"&&(R=p,p=null),p=p||{},s>=d&&(s=0);var b=++s;p.requestUrls=p.requestUrls||[];var E={requestId:b,url:v,args:p,ctx:p.ctx};p.emitter&&p.emitter.emit("request",E),p.timeout=p.timeout||D.TIMEOUTS,p.maxRedirects=p.maxRedirects||10,p.streaming=p.streaming||p.customResponse;var w=Date.now(),T;typeof v=="string"?(f.test(v)||(v="http://"+v),T=t.parse(v)):T=v;var F=(p.type||p.method||T.method||"GET").toUpperCase(),N=T.port||80,L=h,G=l(p.agent,D.agent),z=p.fixJSONCtlChars;T.protocol==="https:"&&(L=n,G=l(p.httpsAgent,D.httpsAgent),T.port||(N=443));var A={host:T.hostname||T.host||"localhost",path:T.path||"/",method:F,port:N,agent:G,headers:p.headers||{},lookup:p.lookup};Array.isArray(p.timeout)?A.requestTimeout=p.timeout[p.timeout.length-1]:typeof p.timeout!="undefined"&&(A.requestTimeout=p.timeout);for(var B=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],U=0;U<B.length;U++){var I=B[U];p.hasOwnProperty(I)&&(A[I]=p[I])}A.rejectUnauthorized===!1&&!A.hasOwnProperty("secureOptions")&&(A.secureOptions=H("constants").SSL_OP_NO_TLSv1_2);var K=p.auth||T.auth;K&&(A.auth=K);var Z=p.content||p.data,ue=F==="GET"||F==="HEAD"||p.dataAsQueryString;if(!p.content&&(Z&&!(typeof Z=="string"||g.isBuffer(Z))))if(ue)Z=p.nestedQuerystring?qs.stringify(Z):querystring.stringify(Z);else{var de=A.headers["Content-Type"]||A.headers["content-type"];de||(p.contentType==="json"?de="application/json":de="application/x-www-form-urlencoded",A.headers["Content-Type"]=de),parseContentType(de).type==="application/json"?Z=(0,M.default)(Z):Z=p.nestedQuerystring?qs.stringify(Z):querystring.stringify(Z)}ue&&Z&&(A.path+=(T.query?"&":"?")+Z,Z=null);var Ce=0;if(Z){var Re=Z.length;g.isBuffer(Z)||(Re=g.byteLength(Z)),Ce=A.headers["Content-Length"]=Re}p.dataType==="json"&&(A.headers.Accept="application/json"),typeof p.beforeRequest=="function"&&p.beforeRequest(A);var me=null,Oe=null,be=null,ce=!1,se=!1,ne=0,ge=-1,ee=!1,re="",Te="",ie=null;p.timing&&(ie={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function q(){me&&(clearTimeout(me),me=null)}function Y(){Oe&&(clearTimeout(Oe),Oe=null)}function X(Ie,st,ft){if(Y(),!R){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),b,k.pid,A.method,v),Ie&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
stack: %s`,Date(),b,k.pid,Ie.name,Ie.message,Ie.stack);return}var Ze=R;R=null;var tt={};if(ft&&(ge=ft.statusCode,tt=ft.headers),ge===401&&tt["www-authenticate"]&&(!p.headers||!p.headers.Authorization)&&p.digestAuth){var Be=tt["www-authenticate"];if(Be.indexOf("Digest ")>=0)return c("Request#%d %s: got digest auth header WWW-Authenticate: %s",b,v,Be),p.headers=p.headers||{},p.headers.Authorization=digestAuthHeader(A.method,A.path,Be,p.digestAuth),c("Request#%d %s: auth with digest header: %s",b,v,p.headers.Authorization),ft.headers["set-cookie"]&&(p.headers.Cookie=ft.headers["set-cookie"].join(";")),D.requestWithCallback(v,p,Ze)}var Pe=Date.now()-w;ie&&(ie.contentDownload=Pe),c("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Pe,ne,ge,A.method,A.host,A.path,se,ie);var Ne={status:ge,statusCode:ge,headers:tt,size:ne,aborted:ee,rt:Pe,keepAliveSocket:se,data:st,requestUrls:p.requestUrls,timing:ie,remoteAddress:re,remotePort:Te};if(Ie){var xe="";G&&typeof G.getCurrentStatus=="function"&&(xe=", agent status: "+(0,M.default)(G.getCurrentStatus())),Ie.message+=", "+A.method+" "+v+" "+ge+" (connected: "+ce+", keepalive socket: "+se+xe+`)
headers: `+(0,M.default)(tt),Ie.data=st,Ie.path=A.path,Ie.status=ge,Ie.headers=tt,Ie.res=Ne}Ze(Ie,st,p.streaming?ft:Ne),p.emitter&&(E.url=v,E.socket=dt&&dt.connection,E.options=A,E.size=Ce,p.emitter.emit("response",{requestId:b,error:Ie,ctx:p.ctx,req:E,res:Ne}))}function he(Ie){var st=null;if(p.followRedirect&&statuses.redirect[Ie.statusCode]){p._followRedirectCount=(p._followRedirectCount||0)+1;var ft=Ie.headers.location;if(!ft)st=new Error("Got statusCode "+Ie.statusCode+" but cannot resolve next location from headers"),st.name="FollowRedirectError";else if(p._followRedirectCount>p.maxRedirects)st=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+v),st.name="MaxRedirectError";else{var Ze=p.formatRedirectUrl?p.formatRedirectUrl(v,ft):t.resolve(v,ft);c("Request#%d %s: `redirected` from %s to %s",b,A.path,v,Ze),Y(),p.headers&&p.headers.Host&&f.test(ft)&&(p.headers.Host=null);var tt=R;return R=null,D.requestWithCallback(Ze,p,tt),{redirect:!0,error:null}}}return{redirect:!1,error:st}}!A.headers["User-Agent"]&&!A.headers["user-agent"]&&(A.headers["User-Agent"]=navigator.userAgent),p.gzip&&(!A.headers["Accept-Encoding"]&&!A.headers["accept-encoding"]&&(A.headers["Accept-Encoding"]="gzip"));function fe(Ie,st,ft){var Ze=Ie.headers["content-encoding"];return ft(null,st,Ze)}var Ee=p.writeStream;c("Request#%d %s %s with headers %j, options.path: %s",b,F,v,A.headers,A.path),p.requestUrls.push(v);function He(Ie){if(ie&&(ie.waiting=Date.now()-w),c("Request#%d %s `req response` event emit: status %d, headers: %j",b,v,Ie.statusCode,Ie.headers),p.streaming){var st=he(Ie);if(st.redirect){Ie.resume();return}return st.error?(Ie.resume(),X(st.error,null,Ie)):X(null,null,Ie)}if(Ie.on("close",function(){c("Request#%d %s: `res close` event emit, total size %d",b,v,ne)}),Ie.on("error",function(){c("Request#%d %s: `res error` event emit, total size %d",b,v,ne)}),Ie.on("aborted",function(){ee=!0,c("Request#%d %s: `res aborted` event emit, total size %d",b,v,ne)}),Ee){var st=he(Ie);if(st.redirect){Ie.resume();return}return st.error?(Ie.resume(),Ee.end(),X(st.error,null,Ie)):(p.consumeWriteStream===!1?Ie.on("end",X.bind(null,null,null,Ie)):isNode010||isNode012?first([[Ee,"close"],[Ie,"aborted"]],function(tt,Be,Pe){c("Request#%d %s: writeStream or res %s event emitted",b,v,Pe),X(be||null,null,Ie)}):Ee.on("close",function(){c("Request#%d %s: writeStream close event emitted",b,v),X(be||null,null,Ie)}),Ie.pipe(Ee))}var ft=[];Ie.on("data",function(Ze){c("Request#%d %s: `res data` event emit, size %d",b,v,Ze.length),ne+=Ze.length,ft.push(Ze)}),Ie.on("end",function(){var Ze=g.concat(ft,ne);if(c("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",b,v,ne,Ie._dumped),be)return X(be,Ze,Ie);var tt=he(Ie);if(tt.error)return X(tt.error,Ze,Ie);if(tt.redirect)return;fe(Ie,Ze,function(Be,Pe,Ne){if(Be)return X(Be,Ze,Ie);if(!Ne&&r.indexOf(p.dataType)>=0){try{Pe=decodeBodyByCharset(Pe,Ie)}catch(Ae){return c("decodeBodyByCharset error: %s",Ae),X(null,Pe,Ie)}if(p.dataType==="json")if(ne===0)Pe=null;else{var xe=parseJSON(Pe,z);xe.error?Be=xe.error:Pe=xe.data}}ee&&c("Request#%d %s: Remote socket was terminated before `response.end()` was called",b,v),X(Be,Pe,Ie)})})}var Qe,et;Array.isArray(p.timeout)?(Qe=a(p.timeout[0]),et=a(p.timeout[1])):Qe=et=a(p.timeout),c("ConnectTimeout: %d, ResponseTimeout: %d",Qe,et);function it(){c("Connect timer ticking, timeout: %d",Qe),me=setTimeout(function(){me=null,ge===-1&&(ge=-2);var Ie="Connect timeout for "+Qe+"ms",st="ConnectionTimeoutError";dt.socket||(st="SocketAssignTimeoutError",Ie+=", working sockets is full"),be=new Error(Ie),be.name=st,be.requestId=b,c("ConnectTimeout: Request#%d %s %s: %s, connected: %s",b,v,be.name,Ie,ce),Fe()},Qe)}function ut(){c("Response timer ticking, timeout: %d",et),Oe=setTimeout(function(){Oe=null;var Ie="Response timeout for "+et+"ms",st="ResponseTimeoutError";be=new Error(Ie),be.name=st,be.requestId=b,c("ResponseTimeout: Request#%d %s %s: %s, connected: %s",b,v,be.name,Ie,ce),Fe()},et)}var dt;A.mode=p.mode?p.mode:"";try{dt=L.request(A,He)}catch(Ie){return X(Ie)}typeof window=="undefined"?it():dt.on("requestTimeout",function(){ge===-1&&(ge=-2);var Ie="Connect timeout for "+Qe+"ms",st="ConnectionTimeoutError";be=new Error(Ie),be.name=st,be.requestId=b,Fe()});function Fe(){c("Request#%d %s abort, connected: %s",b,v,ce),dt.socket||(be.noSocket=!0,X(be)),dt.abort()}return ie&&dt.on("finish",function(){ie.requestSent=Date.now()-w}),dt.once("socket",function(Ie){ie&&(ie.queuing=Date.now()-w),isNode010&&Ie.socket&&(Ie=Ie.socket);var st=Ie.readyState;if(st==="opening"){Ie.once("lookup",function(ft,Ze,tt){c("Request#%d %s lookup: %s, %s, %s",b,v,ft,Ze,tt),ie&&(ie.dnslookup=Date.now()-w),Ze&&(re=Ze)}),Ie.once("connect",function(){ie&&(ie.connected=Date.now()-w),q(),ut(),c("Request#%d %s new socket connected",b,v),ce=!0,re||(re=Ie.remoteAddress),Te=Ie.remotePort});return}c("Request#%d %s reuse socket connected, readyState: %s",b,v,st),ce=!0,se=!0,re||(re=Ie.remoteAddress),Te=Ie.remotePort,q(),ut()}),dt.on("error",function(Ie){(Ie.name==="Error"||Ie.name==="TypeError")&&(Ie.name=ce?"ResponseError":"RequestError"),Ie.message+=' (req "error")',c("Request#%d %s `req error` event emit, %s: %s",b,v,Ie.name,Ie.message),X(be||Ie)}),Ee&&Ee.once("error",function(Ie){Ie.message+=' (writeStream "error")',be=Ie,c("Request#%d %s `writeStream error` event emit, %s: %s",b,v,Ie.name,Ie.message),Fe()}),p.stream?(p.stream.pipe(dt),p.stream.once("error",function(Ie){Ie.message+=' (stream "error")',be=Ie,c("Request#%d %s `readStream error` event emit, %s: %s",b,v,Ie.name,Ie.message),Fe()})):dt.end(Z),dt.requestId=b,dt}}).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,D){"use strict";D.d(J,"a",function(){return _});var k=D("q1tI"),g=D("biw7"),C=D("fyJ8");function M(t){var h=t.className,n=t.index,c=t.children,a=t.colSpan,i=t.rowSpan,s=k.useContext(g.a),d=s.prefixCls,f=s.fixedInfoList,l=f[n];return k.createElement(C.a,Object.assign({className:h,index:n,component:"td",prefixCls:d,record:null,dataIndex:null,render:function(){return{children:c,props:{colSpan:a,rowSpan:i}}}},l))}function m(t){return k.createElement("tr",Object.assign({},t))}function y(t){var h=t.children,n=k.useContext(g.a),c=n.prefixCls;return k.createElement("tfoot",{className:"".concat(c,"-summary")},h)}var S=J.b=y,_={Cell:M,Row:m}},nEHx:function(H,J,D){"use strict";D.d(J,"a",function(){return k});var k;(function(g){g.DARK="dark",g.LIGHT="light",g.HIGH_CONTRAST="hc"})(k||(k={}))},nnTU:function(H,J,D){"use strict";D.d(J,"b",function(){return S}),D.d(J,"a",function(){return _});var k=D("MI8n"),g=D("JYp7"),C=D("pmY6"),M=D("24hK"),m=D("746U"),y=D("Cg/j");const S=Object(y.c)("commandService"),_=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new k.b,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(t,h){if(!t)throw new Error("invalid command");if(typeof t=="string"){if(!h)throw new Error("invalid command");return this.registerCommand({id:t,handler:h})}if(t.description){const s=[];for(let f of t.description.args)s.push(f.constraint);const d=t.handler;t.handler=function(f,...l){return Object(m.o)(l,s),d(f,...l)}}const{id:n}=t;let c=this._commands.get(n);c||(c=new M.a,this._commands.set(n,c));let a=c.unshift(t),i=Object(C.i)(()=>{a();const s=this._commands.get(n);(s==null?void 0:s.isEmpty())&&this._commands.delete(n)});return this._onDidRegisterCommand.fire(n),i}registerCommandAlias(t,h){return _.registerCommand(t,(n,...c)=>n.get(S).executeCommand(h,...c))}getCommand(t){const h=this._commands.get(t);return!h||h.isEmpty()?void 0:g.a.first(h)}getCommands(){const t=new Map;for(const h of this._commands.keys()){const n=this.getCommand(h);n&&t.set(h,n)}return t}};_.registerCommand("noop",()=>{})},oRuE:function(H,J,D){(function(k,g,C){H.exports=J=g(D("Ib8C"),D("OLod"))})(this,function(k){return k.pad.Iso10126={pad:function(g,C){var M=C*4,m=M-g.sigBytes%M;g.concat(k.lib.WordArray.random(m-1)).concat(k.lib.WordArray.create([m<<24],1))},unpad:function(g){var C=g.words[g.sigBytes-1>>>2]&255;g.sigBytes-=C}},k.pad.Iso10126})},osHv:function(H,J,D){(function(k){k(D("VrN/"))})(function(k){"use strict";var g=k.Pos;function C(f,l){return f.line-l.line||f.ch-l.ch}var M="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",m=M+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",y=new RegExp("<(/?)(["+M+"]["+m+"]*)","g");function S(f,l,o,r){this.line=l,this.ch=o,this.cm=f,this.text=f.getLine(l),this.min=r?Math.max(r.from,f.firstLine()):f.firstLine(),this.max=r?Math.min(r.to-1,f.lastLine()):f.lastLine()}function _(f,l){var o=f.cm.getTokenTypeAt(g(f.line,l));return o&&/\btag\b/.test(o)}function t(f){return f.line>=f.max?void 0:(f.ch=0,f.text=f.cm.getLine(++f.line),!0)}function h(f){return f.line<=f.min?void 0:(f.text=f.cm.getLine(--f.line),f.ch=f.text.length,!0)}function n(f){for(;;){var l=f.text.indexOf(">",f.ch);if(l==-1){if(t(f))continue;return}if(!_(f,l+1)){f.ch=l+1;continue}var o=f.text.lastIndexOf("/",l),r=o>-1&&!/\S/.test(f.text.slice(o+1,l));return f.ch=l+1,r?"selfClose":"regular"}}function c(f){for(;;){var l=f.ch?f.text.lastIndexOf("<",f.ch-1):-1;if(l==-1){if(h(f))continue;return}if(!_(f,l+1)){f.ch=l;continue}y.lastIndex=l,f.ch=l;var o=y.exec(f.text);if(o&&o.index==l)return o}}function a(f){for(;;){y.lastIndex=f.ch;var l=y.exec(f.text);if(!l){if(t(f))continue;return}if(!_(f,l.index+1)){f.ch=l.index+1;continue}return f.ch=l.index+l[0].length,l}}function i(f){for(;;){var l=f.ch?f.text.lastIndexOf(">",f.ch-1):-1;if(l==-1){if(h(f))continue;return}if(!_(f,l+1)){f.ch=l;continue}var o=f.text.lastIndexOf("/",l),r=o>-1&&!/\S/.test(f.text.slice(o+1,l));return f.ch=l+1,r?"selfClose":"regular"}}function s(f,l){for(var o=[];;){var r=a(f),x,v=f.line,p=f.ch-(r?r[0].length:0);if(!r||!(x=n(f)))return;if(x=="selfClose")continue;if(r[1]){for(var R=o.length-1;R>=0;--R)if(o[R]==r[2]){o.length=R;break}if(R<0&&(!l||l==r[2]))return{tag:r[2],from:g(v,p),to:g(f.line,f.ch)}}else o.push(r[2])}}function d(f,l){for(var o=[];;){var r=i(f);if(!r)return;if(r=="selfClose"){c(f);continue}var x=f.line,v=f.ch,p=c(f);if(!p)return;if(p[1])o.push(p[2]);else{for(var R=o.length-1;R>=0;--R)if(o[R]==p[2]){o.length=R;break}if(R<0&&(!l||l==p[2]))return{tag:p[2],from:g(f.line,f.ch),to:g(x,v)}}}}k.registerHelper("fold","xml",function(f,l){for(var o=new S(f,l.line,0);;){var r=a(o);if(!r||o.line!=l.line)return;var x=n(o);if(!x)return;if(!r[1]&&x!="selfClose"){var v=g(o.line,o.ch),p=s(o,r[2]);return p&&C(p.from,v)>0?{from:v,to:p.from}:null}}}),k.findMatchingTag=function(f,l,o){var r=new S(f,l.line,l.ch,o);if(r.text.indexOf(">")==-1&&r.text.indexOf("<")==-1)return;var x=n(r),v=x&&g(r.line,r.ch),p=x&&c(r);if(!x||!p||C(r,l)>0)return;var R={from:g(r.line,r.ch),to:v,tag:p[2]};return x=="selfClose"?{open:R,close:null,at:"open"}:p[1]?{open:d(r,p[2]),close:R,at:"close"}:(r=new S(f,v.line,v.ch,o),{open:R,close:s(r,p[2]),at:"open"})},k.findEnclosingTag=function(f,l,o,r){for(var x=new S(f,l.line,l.ch,o);;){var v=d(x,r);if(!v)break;var p=new S(f,l.line,l.ch,o),R=s(p,v.tag);if(R)return{open:v,close:R}}},k.scanForClosingTag=function(f,l,o,r){var x=new S(f,l.line,l.ch,r?{from:0,to:r}:null);return s(x,o)}})},p5ED:function(H,J,D){"use strict";var k=D("+L6B"),g=D("2/Rp"),C=D("5Dmo"),M=D("3S7+"),m=D("k1fw"),y=D("9og8"),S=D("tJVT"),_=D("WmNS"),t=D.n(_),h=D("q1tI"),n=D.n(h),c=D("vHTk"),a=D.n(c),i=D("yEEn"),s=D("ZW9T"),d=D("1vsH"),f=D("V0Rq"),l=D("m3rI");J.a=function(o){var r,x,v,p,R,O,b,E=o.editOffice,w=E===void 0?"view":E,T=o.data,F=o.theme,N=o.type,L=o.filename,G=o.monacoEditor,z=o.className,A=o.style,B=o.close,U=o.onClose,I=o.hasMask,K=o.disabledDownload,Z=Object(h.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),ue=Object(S.a)(Z,2),de=ue[0],Ce=ue[1],Re=Object(h.useState)(""),me=Object(S.a)(Re,2),Oe=me[0],be=me[1],ce=Object(h.useState)(),se=Object(S.a)(ce,2),ne=se[0],ge=se[1],ee=window.ENV==="build"?"/react/build":"",re=l.a.PROXY_SERVER||location.origin,Te,ie=1024*1024,q=10*ie,Y=Object(h.useRef)();(r=T)!==null&&r!==void 0&&r.startsWith("/api")&&N!=="txt"&&(T=l.a.API_SERVER+T),N==="office"&&(Te=Object(d.T)(T).filesize,Te>q&&(N="other")),L&&G&&(G.filename=L),Object(h.useEffect)(function(){var Ee,He,Qe=(Ee=document.cookie)===null||Ee===void 0||((He=Ee.replace(/\s/g,""))===null||He===void 0)?void 0:He.split(";");Qe==null||Qe.map(function(et){var it=et.split("=");it[0]==="_educoder_session"&&be(it[1])})},[]),Object(h.useEffect)(function(){N==="office"&&X()},[N,T]);var X=function(){var Ee=Object(y.a)(t.a.mark(function He(){var Qe,et,it;return t.a.wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:return console.log("data:",T),Qe=T,T.startsWith("http")||(Qe=location.origin+Qe),et=new URL(Qe).pathname.split("/").pop(),dt.next=6,Object(f.V)({attachment_id:et});case 6:it=dt.sent,ge(it);case 8:case"end":return dt.stop()}},He)}));return function(){return Ee.apply(this,arguments)}}(),he=function(){if(T.startsWith("http")||T.startsWith("blob:")){fe();return}Object(d.z)(L||"educoder",T,L)},fe=function(){Object(d.x)(L||"educoder",decodeURIComponent(T))};return n.a.createElement("div",{style:Object(m.a)({},A||{}),className:"".concat(I&&a.a.bgBlack," ").concat(N?a.a.wrp:"hide")},B&&n.a.createElement("div",{className:a.a.close,ref:Y},!K&&n.a.createElement(M.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return Y.current}},n.a.createElement("span",{onClick:fe},n.a.createElement("i",{className:"icon-quxiaozhiding"}))),n.a.createElement(M.a,{title:"\u5173\u95ED",getPopupContainer:function(){return Y.current}},n.a.createElement("span",{className:"",onClick:U},n.a.createElement("i",{className:"icon-guanbi1"})))),n.a.createElement("div",{className:"".concat(a.a[z]," ").concat(z," ").concat(a.a.monaco," ").concat(N==="txt"?"show":"hide")},N==="txt"&&n.a.createElement(s.b,G)),N==="audio"&&n.a.createElement("audio",{src:"".concat(((x=T)===null||x===void 0?void 0:x.indexOf("http://"))>-1||((v=T)===null||v===void 0?void 0:v.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(T),autoPlay:!0}),N==="video"&&n.a.createElement(n.a.Fragment,null,((p=T)===null||p===void 0?void 0:p.indexOf("http"))>-1?n.a.createElement("video",{controls:!0,src:"".concat(T),autoPlay:!0}):n.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(T),autoPlay:!0})),N==="office"&&ne&&n.a.createElement("iframe",{src:"".concat(ee,"/office.html?key=").concat(ne.key,"&url=").concat(re+ne.url,"&callbackUrl=").concat(re+ne.callbackUrl,"&fileType=").concat(ne.fileType,"&title=").concat(ne.title,"&model=").concat(w,"&officeServer=").concat(l.a.OFFICE_SERVER,"&disabledDownload=").concat(!!K)}),N==="html"&&n.a.createElement("iframe",{src:T+"&disposition=inline"}),N==="pdf"&&n.a.createElement("iframe",{src:"".concat(ee,"/js/pdfview/index.html?url=").concat(T,"&disabledDownload=").concat(!!K)}),N==="image"&&n.a.createElement("img",{src:"".concat(((R=T)===null||R===void 0?void 0:R.indexOf("http://"))>-1||((O=T)===null||O===void 0?void 0:O.indexOf("https://"))>-1||(b=T)!==null&&b!==void 0&&b.startsWith("/api")?"":"data:image/png;base64,").concat(T)}),N==="other"&&n.a.createElement("div",null,n.a.createElement(g.a,{type:"primary",size:"large",onClick:he},n.a.createElement(i.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),N==="download"&&n.a.createElement(g.a,{type:"primary",size:"large",onClick:he},n.a.createElement(i.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(H,J,D){},pA7S:function(H,J,D){(function(k,g,C){H.exports=J=g(D("Ib8C"),D("ETIr"),D("cv67"),D("K3mO"),D("OLod"))})(this,function(k){return function(){var g=k,C=g.lib,M=C.WordArray,m=C.BlockCipher,y=g.algo,S=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],_=[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],t=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],h=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],n=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],c=y.DES=m.extend({_doReset:function(){for(var d=this._key,f=d.words,l=[],o=0;o<56;o++){var r=S[o]-1;l[o]=f[r>>>5]>>>31-r%32&1}for(var x=this._subKeys=[],v=0;v<16;v++){for(var p=x[v]=[],R=t[v],o=0;o<24;o++)p[o/6|0]|=l[(_[o]-1+R)%28]<<31-o%6,p[4+(o/6|0)]|=l[28+(_[o+24]-1+R)%28]<<31-o%6;p[0]=p[0]<<1|p[0]>>>31;for(var o=1;o<7;o++)p[o]=p[o]>>>(o-1)*4+3;p[7]=p[7]<<5|p[7]>>>27}for(var O=this._invSubKeys=[],o=0;o<16;o++)O[o]=x[15-o]},encryptBlock:function(d,f){this._doCryptBlock(d,f,this._subKeys)},decryptBlock:function(d,f){this._doCryptBlock(d,f,this._invSubKeys)},_doCryptBlock:function(d,f,l){this._lBlock=d[f],this._rBlock=d[f+1],a.call(this,4,252645135),a.call(this,16,65535),i.call(this,2,858993459),i.call(this,8,16711935),a.call(this,1,1431655765);for(var o=0;o<16;o++){for(var r=l[o],x=this._lBlock,v=this._rBlock,p=0,R=0;R<8;R++)p|=h[R][((v^r[R])&n[R])>>>0];this._lBlock=v,this._rBlock=x^p}var O=this._lBlock;this._lBlock=this._rBlock,this._rBlock=O,a.call(this,1,1431655765),i.call(this,8,16711935),i.call(this,2,858993459),a.call(this,16,65535),a.call(this,4,252645135),d[f]=this._lBlock,d[f+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function a(d,f){var l=(this._lBlock>>>d^this._rBlock)&f;this._rBlock^=l,this._lBlock^=l<<d}function i(d,f){var l=(this._rBlock>>>d^this._lBlock)&f;this._lBlock^=l,this._rBlock^=l<<d}g.DES=m._createHelper(c);var s=y.TripleDES=m.extend({_doReset:function(){var d=this._key,f=d.words;if(f.length!==2&&f.length!==4&&f.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var l=f.slice(0,2),o=f.length<4?f.slice(0,2):f.slice(2,4),r=f.length<6?f.slice(0,2):f.slice(4,6);this._des1=c.createEncryptor(M.create(l)),this._des2=c.createEncryptor(M.create(o)),this._des3=c.createEncryptor(M.create(r))},encryptBlock:function(d,f){this._des1.encryptBlock(d,f),this._des2.decryptBlock(d,f),this._des3.encryptBlock(d,f)},decryptBlock:function(d,f){this._des3.decryptBlock(d,f),this._des2.encryptBlock(d,f),this._des1.decryptBlock(d,f)},keySize:192/32,ivSize:64/32,blockSize:64/32});g.TripleDES=m._createHelper(s)}(),k.TripleDES})},pIsd:function(H,J,D){var k=D("BJfS"),g=function(m){var y=/[height|width]$/;return y.test(m)},C=function(m){var y="",S=Object.keys(m);return S.forEach(function(_,t){var h=m[_];_=k(_),g(_)&&typeof h=="number"&&(h=h+"px"),h===!0?y+=_:h===!1?y+="not "+_:y+="("+_+": "+h+")",t<S.length-1&&(y+=" and ")}),y},M=function(m){var y="";return typeof m=="string"?m:m instanceof Array?(m.forEach(function(S,_){y+=C(S),_<m.length-1&&(y+=", ")}),y):C(m)};H.exports=M},pmY6:function(H,J,D){"use strict";D.d(J,"h",function(){return h}),D.d(J,"g",function(){return c}),D.d(J,"f",function(){return a}),D.d(J,"e",function(){return i}),D.d(J,"i",function(){return s}),D.d(J,"b",function(){return d}),D.d(J,"a",function(){return f}),D.d(J,"d",function(){return l}),D.d(J,"c",function(){return o});var k=D("C/vA"),g=D("JYp7");const C=!1;let M=null;function m(r){M=r}if(C){const r="__is_disposable_tracked__";m(new class{trackDisposable(x){const v=new Error("Potentially leaked disposable").stack;setTimeout(()=>{x[r]||console.log(v)},3e3)}setParent(x,v){if(x&&x!==f.None)try{x[r]=!0}catch(p){}}markAsDisposed(x){if(x&&x!==f.None)try{x[r]=!0}catch(v){}}markAsSingleton(x){}})}function y(r){return M==null||M.trackDisposable(r),r}function S(r){M==null||M.markAsDisposed(r)}function _(r,x){M==null||M.setParent(r,x)}function t(r,x){if(!M)return;for(const v of r)M.setParent(v,x)}function h(r){return M==null||M.markAsSingleton(r),r}class n extends Error{constructor(r){super(`Encountered errors while disposing of store. Errors: [${r.join(", ")}]`);this.errors=r}}function c(r){return typeof r.dispose=="function"&&r.dispose.length===0}function a(r){if(g.a.is(r)){let x=[];for(const v of r)if(v)try{v.dispose()}catch(p){x.push(p)}if(x.length===1)throw x[0];if(x.length>1)throw new n(x);return Array.isArray(r)?[]:r}else if(r)return r.dispose(),r}function i(...r){const x=s(()=>a(r));return t(r,x),x}function s(r){const x=y({dispose:Object(k.a)(()=>{S(x),r()})});return x}class d{constructor(){this._toDispose=new Set,this._isDisposed=!1,y(this)}dispose(){if(this._isDisposed)return;S(this),this._isDisposed=!0,this.clear()}clear(){try{a(this._toDispose.values())}finally{this._toDispose.clear()}}add(r){if(!r)return r;if(r===this)throw new Error("Cannot register a disposable on itself!");return _(r,this),this._isDisposed?d.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(r),r}}d.DISABLE_DISPOSED_WARNING=!1;class f{constructor(){this._store=new d,y(this),_(this._store,this)}dispose(){S(this),this._store.dispose()}_register(r){if(r===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(r)}}f.None=Object.freeze({dispose(){}});class l{constructor(){this._isDisposed=!1,y(this)}get value(){return this._isDisposed?void 0:this._value}set value(r){var x;if(this._isDisposed||r===this._value)return;(x=this._value)===null||x===void 0||x.dispose(),r&&_(r,this),this._value=r}clear(){this.value=void 0}dispose(){var r;this._isDisposed=!0,S(this),(r=this._value)===null||r===void 0||r.dispose(),this._value=void 0}clearAndLeak(){const r=this._value;return this._value=void 0,r&&_(r,null),r}}class o{constructor(r){this.object=r}dispose(){}}},psGv:function(H,J,D){var k,g;(function(){var C;(function(){"use strict";var S=[,,function(n){function c(s){this.__parent=s,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 s=new c(this.__parent);return s.set_indent(this.__indent_count,this.__alignment_count),s},c.prototype.item=function(s){return s<0?this.__items[this.__items.length+s]:this.__items[s]},c.prototype.has_match=function(s){for(var d=this.__items.length-1;d>=0;d--)if(this.__items[d].match(s))return!0;return!1},c.prototype.set_indent=function(s,d){this.is_empty()&&(this.__indent_count=s||0,this.__alignment_count=d||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 s=this.__parent.current_line;return s.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),s.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),s.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,s.__items[0]===" "&&(s.__items.splice(0,1),s.__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(s){this.__items.push(s);var d=s.lastIndexOf(`
`);d!==-1?this.__character_count=s.length-d:this.__character_count+=s.length},c.prototype.pop=function(){var s=null;return this.is_empty()||(s=this.__items.pop(),this.__character_count-=s.length),s},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 s="";return this.is_empty()?this.__parent.indent_empty_lines&&(s=this.__parent.get_indent_string(this.__indent_count)):(s=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),s+=this.__items.join("")),s};function a(s,d){this.__cache=[""],this.__indent_size=s.indent_size,this.__indent_string=s.indent_char,s.indent_with_tabs||(this.__indent_string=new Array(s.indent_size+1).join(s.indent_char)),d=d||"",s.indent_level>0&&(d=new Array(s.indent_level+1).join(this.__indent_string)),this.__base_string=d,this.__base_string_length=d.length}a.prototype.get_indent_size=function(s,d){var f=this.__base_string_length;return d=d||0,s<0&&(f=0),f+=s*this.__indent_size,f+=d,f},a.prototype.get_indent_string=function(s,d){var f=this.__base_string;return d=d||0,s<0&&(s=0,f=""),d+=s*this.__indent_size,this.__ensure_cache(d),f+=this.__cache[d],f},a.prototype.__ensure_cache=function(s){for(;s>=this.__cache.length;)this.__add_column()},a.prototype.__add_column=function(){var s=this.__cache.length,d=0,f="";this.__indent_size&&s>=this.__indent_size&&(d=Math.floor(s/this.__indent_size),s-=d*this.__indent_size,f=new Array(d+1).join(this.__indent_string)),s&&(f+=new Array(s+1).join(" ")),this.__cache.push(f)};function i(s,d){this.__indent_cache=new a(s,d),this.raw=!1,this._end_with_newline=s.end_with_newline,this.indent_size=s.indent_size,this.wrap_line_length=s.wrap_line_length,this.indent_empty_lines=s.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()}i.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},i.prototype.get_line_number=function(){return this.__lines.length},i.prototype.get_indent_string=function(s,d){return this.__indent_cache.get_indent_string(s,d)},i.prototype.get_indent_size=function(s,d){return this.__indent_cache.get_indent_size(s,d)},i.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},i.prototype.add_new_line=function(s){return this.is_empty()||!s&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},i.prototype.get_code=function(s){this.trim(!0);var d=this.current_line.pop();d&&(d[d.length-1]===`
`&&(d=d.replace(/\n+$/g,"")),this.current_line.push(d)),this._end_with_newline&&this.__add_outputline();var f=this.__lines.join(`
`);return s!==`
`&&(f=f.replace(/[\n]/g,s)),f},i.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},i.prototype.set_indent=function(s,d){return s=s||0,d=d||0,this.next_line.set_indent(s,d),this.__lines.length>1?(this.current_line.set_indent(s,d),!0):(this.current_line.set_indent(),!1)},i.prototype.add_raw_token=function(s){for(var d=0;d<s.newlines;d++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(s.whitespace_before),this.current_line.push(s.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},i.prototype.add_token=function(s){this.__add_space_before_token(),this.current_line.push(s),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},i.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},i.prototype.remove_indent=function(s){for(var d=this.__lines.length;s<d;)this.__lines[s]._remove_indent(),s++;this.current_line._remove_wrap_indent()},i.prototype.trim=function(s){for(s=s===void 0?!1:s,this.current_line.trim();s&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},i.prototype.just_added_newline=function(){return this.current_line.is_empty()},i.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},i.prototype.ensure_empty_line_above=function(s,d){for(var f=this.__lines.length-2;f>=0;){var l=this.__lines[f];if(l.is_empty())break;if(l.item(0).indexOf(s)!==0&&l.item(-1)!==d){this.__lines.splice(f+1,0,new c(this)),this.previous_line=this.__lines[this.__lines.length-2];break}f--}},n.exports.Output=i},function(n){function c(a,i,s,d){this.type=a,this.text=i,this.comments_before=null,this.newlines=s||0,this.whitespace_before=d||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}n.exports.Token=c},,,function(n){function c(s,d){this.raw_options=a(s,d),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(s,d){var f=this.raw_options[s],l=d||[];return typeof f=="object"?f!==null&&typeof f.concat=="function"&&(l=f.concat()):typeof f=="string"&&(l=f.split(/[^a-zA-Z0-9_\/\-]+/)),l},c.prototype._get_boolean=function(s,d){var f=this.raw_options[s],l=f===void 0?!!d:!!f;return l},c.prototype._get_characters=function(s,d){var f=this.raw_options[s],l=d||"";return typeof f=="string"&&(l=f.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),l},c.prototype._get_number=function(s,d){var f=this.raw_options[s];d=parseInt(d,10),isNaN(d)&&(d=0);var l=parseInt(f,10);return isNaN(l)&&(l=d),l},c.prototype._get_selection=function(s,d,f){var l=this._get_selection_list(s,d,f);if(l.length!==1)throw new Error("Invalid Option Value: The option '"+s+`' can only be one of the following values:
`+d+`
You passed in: '`+this.raw_options[s]+"'");return l[0]},c.prototype._get_selection_list=function(s,d,f){if(!d||d.length===0)throw new Error("Selection list cannot be empty.");if(f=f||[d[0]],!this._is_valid_selection(f,d))throw new Error("Invalid Default Value!");var l=this._get_array(s,f);if(!this._is_valid_selection(l,d))throw new Error("Invalid Option Value: The option '"+s+`' can contain only the following values:
`+d+`
You passed in: '`+this.raw_options[s]+"'");return l},c.prototype._is_valid_selection=function(s,d){return s.length&&d.length&&!s.some(function(f){return d.indexOf(f)===-1})};function a(s,d){var f={};s=i(s);var l;for(l in s)l!==d&&(f[l]=s[l]);if(d&&s[d])for(l in s[d])f[l]=s[d][l];return f}function i(s){var d={},f;for(f in s){var l=f.replace(/-/g,"_");d[l]=s[f]}return d}n.exports.Options=c,n.exports.normalizeOpts=i,n.exports.mergeOpts=a},,function(n){var c=RegExp.prototype.hasOwnProperty("sticky");function a(i){this.__input=i||"",this.__input_length=this.__input.length,this.__position=0}a.prototype.restart=function(){this.__position=0},a.prototype.back=function(){this.__position>0&&(this.__position-=1)},a.prototype.hasNext=function(){return this.__position<this.__input_length},a.prototype.next=function(){var i=null;return this.hasNext()&&(i=this.__input.charAt(this.__position),this.__position+=1),i},a.prototype.peek=function(i){var s=null;return i=i||0,i+=this.__position,i>=0&&i<this.__input_length&&(s=this.__input.charAt(i)),s},a.prototype.__match=function(i,s){i.lastIndex=s;var d=i.exec(this.__input);return d&&!(c&&i.sticky)&&(d.index!==s&&(d=null)),d},a.prototype.test=function(i,s){return s=s||0,s+=this.__position,s>=0&&s<this.__input_length?!!this.__match(i,s):!1},a.prototype.testChar=function(i,s){var d=this.peek(s);return i.lastIndex=0,d!==null&&i.test(d)},a.prototype.match=function(i){var s=this.__match(i,this.__position);return s?this.__position+=s[0].length:s=null,s},a.prototype.read=function(i,s,d){var f="",l;return i&&(l=this.match(i),l&&(f+=l[0])),s&&(l||!i)&&(f+=this.readUntil(s,d)),f},a.prototype.readUntil=function(i,s){var d="",f=this.__position;i.lastIndex=this.__position;var l=i.exec(this.__input);return l?(f=l.index,s&&(f+=l[0].length)):f=this.__input_length,d=this.__input.substring(this.__position,f),this.__position=f,d},a.prototype.readUntilAfter=function(i){return this.readUntil(i,!0)},a.prototype.get_regexp=function(i,s){var d=null,f="g";return s&&c&&(f="y"),typeof i=="string"&&i!==""?d=new RegExp(i,f):i&&(d=new RegExp(i.source,f)),d},a.prototype.get_literal_regexp=function(i){return RegExp(i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},a.prototype.peekUntilAfter=function(i){var s=this.__position,d=this.readUntilAfter(i);return this.__position=s,d},a.prototype.lookBack=function(i){var s=this.__position-1;return s>=i.length&&this.__input.substring(s-i.length,s).toLowerCase()===i},n.exports.InputScanner=a},function(n,c,a){var i=a(8).InputScanner,s=a(3).Token,d=a(10).TokenStream,f=a(11).WhitespacePattern,l={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},o=function(r,x){this._input=new i(r),this._options=x||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new f(this._input)};o.prototype.tokenize=function(){this._input.restart(),this.__tokens=new d,this._reset();for(var r,x=new s(l.START,""),v=null,p=[],R=new d;x.type!==l.EOF;){for(r=this._get_next_token(x,v);this._is_comment(r);)R.add(r),r=this._get_next_token(x,v);R.isEmpty()||(r.comments_before=R,R=new d),r.parent=v,this._is_opening(r)?(p.push(v),v=r):v&&this._is_closing(r,v)&&(r.opened=v,v.closed=r,v=p.pop(),r.parent=v),r.previous=x,x.next=r,this.__tokens.add(r),x=r}return this.__tokens},o.prototype._is_first_token=function(){return this.__tokens.isEmpty()},o.prototype._reset=function(){},o.prototype._get_next_token=function(r,x){this._readWhitespace();var v=this._input.read(/.+/g);return v?this._create_token(l.RAW,v):this._create_token(l.EOF,"")},o.prototype._is_comment=function(r){return!1},o.prototype._is_opening=function(r){return!1},o.prototype._is_closing=function(r,x){return!1},o.prototype._create_token=function(r,x){var v=new s(r,x,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return v},o.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},n.exports.Tokenizer=o,n.exports.TOKEN=l},function(n){function c(a){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=a}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 a=null;return this.hasNext()&&(a=this.__tokens[this.__position],this.__position+=1),a},c.prototype.peek=function(a){var i=null;return a=a||0,a+=this.__position,a>=0&&a<this.__tokens_length&&(i=this.__tokens[a]),i},c.prototype.add=function(a){this.__parent_token&&(a.parent=this.__parent_token),this.__tokens.push(a),this.__tokens_length+=1},n.exports.TokenStream=c},function(n,c,a){var i=a(12).Pattern;function s(d,f){i.call(this,d,f),f?this._line_regexp=this._input.get_regexp(f._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}s.prototype=new i,s.prototype.__set_whitespace_patterns=function(d,f){d+="\\t ",f+="\\n\\r",this._match_pattern=this._input.get_regexp("["+d+f+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+f+"]")},s.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var d=this._input.read(this._match_pattern);if(d===" ")this.whitespace_before_token=" ";else if(d){var f=this.__split(this._newline_regexp,d);this.newline_count=f.length-1,this.whitespace_before_token=f[this.newline_count]}return d},s.prototype.matching=function(d,f){var l=this._create();return l.__set_whitespace_patterns(d,f),l._update(),l},s.prototype._create=function(){return new s(this._input,this)},s.prototype.__split=function(d,f){d.lastIndex=0;for(var l=0,o=[],r=d.exec(f);r;)o.push(f.substring(l,r.index)),l=r.index+r[0].length,r=d.exec(f);return l<f.length?o.push(f.substring(l,f.length)):o.push(""),o},n.exports.WhitespacePattern=s},function(n){function c(a,i){this._input=a,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,i&&(this._starting_pattern=this._input.get_regexp(i._starting_pattern,!0),this._match_pattern=this._input.get_regexp(i._match_pattern,!0),this._until_pattern=this._input.get_regexp(i._until_pattern),this._until_after=i._until_after)}c.prototype.read=function(){var a=this._input.read(this._starting_pattern);return(!this._starting_pattern||a)&&(a+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),a},c.prototype.read_match=function(){return this._input.match(this._match_pattern)},c.prototype.until_after=function(a){var i=this._create();return i._until_after=!0,i._until_pattern=this._input.get_regexp(a),i._update(),i},c.prototype.until=function(a){var i=this._create();return i._until_after=!1,i._until_pattern=this._input.get_regexp(a),i._update(),i},c.prototype.starting_with=function(a){var i=this._create();return i._starting_pattern=this._input.get_regexp(a,!0),i._update(),i},c.prototype.matching=function(a){var i=this._create();return i._match_pattern=this._input.get_regexp(a,!0),i._update(),i},c.prototype._create=function(){return new c(this._input,this)},c.prototype._update=function(){},n.exports.Pattern=c},function(n){function c(a,i){a=typeof a=="string"?a:a.source,i=typeof i=="string"?i:i.source,this.__directives_block_pattern=new RegExp(a+/ beautify( \w+[:]\w+)+ /.source+i,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(a+/\sbeautify\signore:end\s/.source+i,"g")}c.prototype.get_directives=function(a){if(!a.match(this.__directives_block_pattern))return null;var i={};this.__directive_pattern.lastIndex=0;for(var s=this.__directive_pattern.exec(a);s;)i[s[1]]=s[2],s=this.__directive_pattern.exec(a);return i},c.prototype.readIgnored=function(a){return a.readUntilAfter(this.__directives_end_ignore_pattern)},n.exports.Directives=c},function(n,c,a){var i=a(12).Pattern,s={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function d(f,l){i.call(this,f,l),this.__template_pattern=null,this._disabled=Object.assign({},s),this._excluded=Object.assign({},s),l&&(this.__template_pattern=this._input.get_regexp(l.__template_pattern),this._excluded=Object.assign(this._excluded,l._excluded),this._disabled=Object.assign(this._disabled,l._disabled));var o=new i(f);this.__patterns={handlebars_comment:o.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:o.starting_with(/{{{/).until_after(/}}}/),handlebars:o.starting_with(/{{/).until_after(/}}/),php:o.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:o.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:o.starting_with(/{%/).until_after(/%}/),django_value:o.starting_with(/{{/).until_after(/}}/),django_comment:o.starting_with(/{#/).until_after(/#}/),smarty:o.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:o.starting_with(/{\*/).until_after(/\*}/),smarty_literal:o.starting_with(/{literal}/).until_after(/{\/literal}/)}}d.prototype=new i,d.prototype._create=function(){return new d(this._input,this)},d.prototype._update=function(){this.__set_templated_pattern()},d.prototype.disable=function(f){var l=this._create();return l._disabled[f]=!0,l._update(),l},d.prototype.read_options=function(f){var l=this._create();for(var o in s)l._disabled[o]=f.templating.indexOf(o)===-1;return l._update(),l},d.prototype.exclude=function(f){var l=this._create();return l._excluded[f]=!0,l._update(),l},d.prototype.read=function(){var f="";this._match_pattern?f=this._input.read(this._starting_pattern):f=this._input.read(this._starting_pattern,this.__template_pattern);for(var l=this._read_template();l;)this._match_pattern?l+=this._input.read(this._match_pattern):l+=this._input.readUntil(this.__template_pattern),f+=l,l=this._read_template();return this._until_after&&(f+=this._input.readUntilAfter(this._until_pattern)),f},d.prototype.__set_templated_pattern=function(){var f=[];this._disabled.php||f.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||f.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||f.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(f.push(this.__patterns.django._starting_pattern.source),f.push(this.__patterns.django_value._starting_pattern.source),f.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||f.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&f.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+f.join("|")+")")},d.prototype._read_template=function(){var f="",l=this._input.peek();if(l==="<"){var o=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&o==="?"&&(f=f||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&o==="%"&&(f=f||this.__patterns.erb.read())}else l==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(f=f||this.__patterns.handlebars_comment.read(),f=f||this.__patterns.handlebars_unescaped.read(),f=f||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(f=f||this.__patterns.django_value.read()),this._excluded.django||(f=f||this.__patterns.django_comment.read(),f=f||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(f=f||this.__patterns.smarty_comment.read(),f=f||this.__patterns.smarty_literal.read(),f=f||this.__patterns.smarty.read()));return f},n.exports.TemplatablePattern=d},,,,function(n,c,a){var i=a(19).Beautifier,s=a(20).Options;function d(f,l,o,r){var x=new i(f,l,o,r);return x.beautify()}n.exports=d,n.exports.defaultOptions=function(){return new s}},function(n,c,a){var i=a(20).Options,s=a(2).Output,d=a(21).Tokenizer,f=a(21).TOKEN,l=/\r\n|[\r\n]/,o=/\r\n|[\r\n]/g,r=function(F,N){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 s(F,N)};r.prototype.current_line_has_match=function(F){return this._output.current_line.has_match(F)},r.prototype.set_space_before_token=function(F,N){this._output.space_before_token=F,this._output.non_breaking_space=N},r.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},r.prototype.add_raw_token=function(F){this._output.add_raw_token(F)},r.prototype.print_preserved_newlines=function(F){var N=0;F.type!==f.TEXT&&F.previous.type!==f.TEXT&&(N=F.newlines?1:0),this.preserve_newlines&&(N=F.newlines<this.max_preserve_newlines+1?F.newlines:this.max_preserve_newlines+1);for(var L=0;L<N;L++)this.print_newline(L>0);return N!==0},r.prototype.traverse_whitespace=function(F){return F.whitespace_before||F.newlines?(this.print_preserved_newlines(F)||(this._output.space_before_token=!0),!0):!1},r.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},r.prototype.print_newline=function(F){this._output.add_new_line(F)},r.prototype.print_token=function(F){F.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(F.text))},r.prototype.indent=function(){this.indent_level++},r.prototype.get_full_indent=function(F){return F=this.indent_level+(F||0),F<1?"":this._output.get_indent_string(F)};var x=function(F){for(var N=null,L=F.next;L.type!==f.EOF&&F.closed!==L;){if(L.type===f.ATTRIBUTE&&L.text==="type"){L.next&&L.next.type===f.EQUALS&&L.next.next&&L.next.next.type===f.VALUE&&(N=L.next.next.text);break}L=L.next}return N},v=function(F,N){var L=null,G=null;return N.closed?(F==="script"?L="text/javascript":F==="style"&&(L="text/css"),L=x(N)||L,L.search("text/css")>-1?G="css":L.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?G="javascript":L.search(/(text|application|dojo)\/(x-)?(html)/)>-1?G="html":L.search(/test\/null/)>-1&&(G="null"),G):null};function p(F,N){return N.indexOf(F)!==-1}function R(F,N,L){this.parent=F||null,this.tag=N?N.tag_name:"",this.indent_level=L||0,this.parser_token=N||null}function O(F){this._printer=F,this._current_frame=null}O.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},O.prototype.record_tag=function(F){var N=new R(this._current_frame,F,this._printer.indent_level);this._current_frame=N},O.prototype._try_pop_frame=function(F){var N=null;return F&&(N=F.parser_token,this._printer.indent_level=F.indent_level,this._current_frame=F.parent),N},O.prototype._get_frame=function(F,N){for(var L=this._current_frame;L&&!(F.indexOf(L.tag)!==-1);){if(N&&N.indexOf(L.tag)!==-1){L=null;break}L=L.parent}return L},O.prototype.try_pop=function(F,N){var L=this._get_frame([F],N);return this._try_pop_frame(L)},O.prototype.indent_to_tag=function(F){var N=this._get_frame(F);N&&(this._printer.indent_level=N.indent_level)};function b(F,N,L,G){this._source_text=F||"",N=N||{},this._js_beautify=L,this._css_beautify=G,this._tag_stack=null;var z=new i(N,"html");this._options=z,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,"force".length)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,"preserve".length)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}b.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var F=this._source_text,N=this._options.eol;this._options.eol==="auto"&&(N=`
`,F&&l.test(F)&&(N=F.match(l)[0])),F=F.replace(o,`
`);var L=F.match(/^[\t ]*/)[0],G={text:"",type:""},z=new E,A=new r(this._options,L),B=new d(F,this._options).tokenize();this._tag_stack=new O(A);for(var U=null,I=B.next();I.type!==f.EOF;)I.type===f.TAG_OPEN||I.type===f.COMMENT?(U=this._handle_tag_open(A,I,z,G),z=U):I.type===f.ATTRIBUTE||I.type===f.EQUALS||I.type===f.VALUE||I.type===f.TEXT&&!z.tag_complete?U=this._handle_inside_tag(A,I,z,B):I.type===f.TAG_CLOSE?U=this._handle_tag_close(A,I,z):I.type===f.TEXT?U=this._handle_text(A,I,z):A.add_raw_token(I),G=U,I=B.next();var K=A._output.get_code(N);return K},b.prototype._handle_tag_close=function(F,N,L){var G={text:N.text,type:N.type};return F.alignment_size=0,L.tag_complete=!0,F.set_space_before_token(N.newlines||N.whitespace_before!=="",!0),L.is_unformatted?F.add_raw_token(N):(L.tag_start_char==="<"&&(F.set_space_before_token(N.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&L.has_wrapped_attrs&&F.print_newline(!1)),F.print_token(N)),L.indent_content&&!(L.is_unformatted||L.is_content_unformatted)&&(F.indent(),L.indent_content=!1),!L.is_inline_element&&!(L.is_unformatted||L.is_content_unformatted)&&F.set_wrap_point(),G},b.prototype._handle_inside_tag=function(F,N,L,G){var z=L.has_wrapped_attrs,A={text:N.text,type:N.type};if(F.set_space_before_token(N.newlines||N.whitespace_before!=="",!0),L.is_unformatted)F.add_raw_token(N);else if(L.tag_start_char==="{"&&N.type===f.TEXT)F.print_preserved_newlines(N)?(N.newlines=0,F.add_raw_token(N)):F.print_token(N);else{if(N.type===f.ATTRIBUTE?(F.set_space_before_token(!0),L.attr_count+=1):(N.type===f.EQUALS||N.type===f.VALUE&&N.previous.type===f.EQUALS)&&F.set_space_before_token(!1),N.type===f.ATTRIBUTE&&L.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(F.traverse_whitespace(N),z=z||N.newlines!==0),this._is_wrap_attributes_force)){var B=L.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&L.attr_count===1){var U=!0,I=0,K;do{if(K=G.peek(I),K.type===f.ATTRIBUTE){U=!1;break}I+=1}while(I<4&&K.type!==f.EOF&&K.type!==f.TAG_CLOSE);B=!U}B&&(F.print_newline(!1),z=!0)}F.print_token(N),z=z||F.previous_token_wrapped(),L.has_wrapped_attrs=z}return A},b.prototype._handle_text=function(F,N,L){var G={text:N.text,type:"TK_CONTENT"};return L.custom_beautifier_name?this._print_custom_beatifier_text(F,N,L):L.is_unformatted||L.is_content_unformatted?F.add_raw_token(N):(F.traverse_whitespace(N),F.print_token(N)),G},b.prototype._print_custom_beatifier_text=function(F,N,L){var G=this;if(N.text!==""){var z=N.text,A,B=1,U="",I="";L.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?A=this._js_beautify:L.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?A=this._css_beautify:L.custom_beautifier_name==="html"&&(A=function(Re,me){var Oe=new b(Re,me,G._js_beautify,G._css_beautify);return Oe.beautify()}),this._options.indent_scripts==="keep"?B=0:this._options.indent_scripts==="separate"&&(B=-F.indent_level);var K=F.get_full_indent(B);if(z=z.replace(/\n[ \t]*$/,""),L.custom_beautifier_name!=="html"&&z[0]==="<"&&z.match(/^(<!--|<!\[CDATA\[)/)){var Z=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(z);if(!Z){F.add_raw_token(N);return}U=K+Z[1]+`
`,z=Z[4],Z[5]&&(I=K+Z[5]),z=z.replace(/\n[ \t]*$/,""),(Z[2]||Z[3].indexOf(`
`)!==-1)&&(Z=Z[3].match(/[ \t]+$/),Z&&(N.whitespace_before=Z[0]))}if(z)if(A){var ue=function(){this.eol=`
`};ue.prototype=this._options.raw_options;var de=new ue;z=A(K+z,de)}else{var Ce=N.whitespace_before;Ce&&(z=z.replace(new RegExp(`
(`+Ce+")?","g"),`
`)),z=K+z.replace(/\n/g,`
`+K)}U&&(z?z=U+z+`
`+I:z=U+I),F.print_newline(!1),z&&(N.text=z,N.whitespace_before="",N.newlines=0,F.add_raw_token(N),F.print_newline(!0))}},b.prototype._handle_tag_open=function(F,N,L,G){var z=this._get_tag_open_token(N);return(L.is_unformatted||L.is_content_unformatted)&&!L.is_empty_element&&N.type===f.TAG_OPEN&&N.text.indexOf("</")===0?(F.add_raw_token(N),z.start_tag_token=this._tag_stack.try_pop(z.tag_name)):(F.traverse_whitespace(N),this._set_tag_position(F,N,z,L,G),z.is_inline_element||F.set_wrap_point(),F.print_token(N)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(z.alignment_size=N.text.length+1),!z.tag_complete&&!z.is_unformatted&&(F.alignment_size=z.alignment_size),z};var E=function(F,N){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="",!N)this.tag_complete=!0;else{var L;this.tag_start_char=N.text[0],this.text=N.text,this.tag_start_char==="<"?(L=N.text.match(/^<([^\s>]*)/),this.tag_check=L?L[1]:""):(L=N.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=L?L[1]:"",(N.text.startsWith("{{#>")||N.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&N.next!==null?this.tag_check=N.next.text.split(" ")[0]:this.tag_check=N.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),N.type===f.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||N.closed&&N.closed.text==="/>";var G=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(G=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(G)))}};b.prototype._get_tag_open_token=function(F){var N=new E(this._tag_stack.get_parser_token(),F);return N.alignment_size=this._options.wrap_attributes_indent_size,N.is_end_tag=N.is_end_tag||p(N.tag_check,this._options.void_elements),N.is_empty_element=N.tag_complete||N.is_start_tag&&N.is_end_tag,N.is_unformatted=!N.tag_complete&&p(N.tag_check,this._options.unformatted),N.is_content_unformatted=!N.is_empty_element&&p(N.tag_check,this._options.content_unformatted),N.is_inline_element=p(N.tag_name,this._options.inline)||N.tag_name.includes("-")||N.tag_start_char==="{",N},b.prototype._set_tag_position=function(F,N,L,G,z){if(L.is_empty_element||(L.is_end_tag?L.start_tag_token=this._tag_stack.try_pop(L.tag_name):(this._do_optional_end_element(L)&&(L.is_inline_element||F.print_newline(!1)),this._tag_stack.record_tag(L),(L.tag_name==="script"||L.tag_name==="style")&&!(L.is_unformatted||L.is_content_unformatted)&&(L.custom_beautifier_name=v(L.tag_check,N)))),p(L.tag_check,this._options.extra_liners)&&(F.print_newline(!1),F._output.just_added_blankline()||F.print_newline(!0)),L.is_empty_element){if(L.tag_start_char==="{"&&L.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),L.indent_content=!0;var A=F.current_line_has_match(/{{#if/);A||F.print_newline(!1)}L.tag_name==="!--"&&z.type===f.TAG_CLOSE&&G.is_end_tag&&L.text.indexOf(`
`)===-1||(L.is_inline_element||L.is_unformatted||F.print_newline(!1),this._calcluate_parent_multiline(F,L))}else if(L.is_end_tag){var B=!1;B=L.start_tag_token&&L.start_tag_token.multiline_content,B=B||!L.is_inline_element&&!(G.is_inline_element||G.is_unformatted)&&!(z.type===f.TAG_CLOSE&&L.start_tag_token===G)&&z.type!=="TK_CONTENT",(L.is_content_unformatted||L.is_unformatted)&&(B=!1),B&&F.print_newline(!1)}else L.indent_content=!L.custom_beautifier_name,L.tag_start_char==="<"&&(L.tag_name==="html"?L.indent_content=this._options.indent_inner_html:L.tag_name==="head"?L.indent_content=this._options.indent_head_inner_html:L.tag_name==="body"&&(L.indent_content=this._options.indent_body_inner_html)),!(L.is_inline_element||L.is_unformatted)&&(z.type!=="TK_CONTENT"||L.is_content_unformatted)&&F.print_newline(!1),this._calcluate_parent_multiline(F,L)},b.prototype._calcluate_parent_multiline=function(F,N){N.parent&&F._output.just_added_newline()&&!((N.is_inline_element||N.is_unformatted)&&N.parent.is_inline_element)&&(N.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"];b.prototype._do_optional_end_element=function(F){var N=null;if(F.is_empty_element||!F.is_start_tag||!F.parent)return;if(F.tag_name==="body")N=N||this._tag_stack.try_pop("head");else if(F.tag_name==="li")N=N||this._tag_stack.try_pop("li",["ol","ul"]);else if(F.tag_name==="dd"||F.tag_name==="dt")N=N||this._tag_stack.try_pop("dt",["dl"]),N=N||this._tag_stack.try_pop("dd",["dl"]);else if(F.parent.tag_name==="p"&&w.indexOf(F.tag_name)!==-1){var L=F.parent.parent;(!L||T.indexOf(L.tag_name)===-1)&&(N=N||this._tag_stack.try_pop("p"))}else F.tag_name==="rp"||F.tag_name==="rt"?(N=N||this._tag_stack.try_pop("rt",["ruby","rtc"]),N=N||this._tag_stack.try_pop("rp",["ruby","rtc"])):F.tag_name==="optgroup"?N=N||this._tag_stack.try_pop("optgroup",["select"]):F.tag_name==="option"?N=N||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):F.tag_name==="colgroup"?N=N||this._tag_stack.try_pop("caption",["table"]):F.tag_name==="thead"?(N=N||this._tag_stack.try_pop("caption",["table"]),N=N||this._tag_stack.try_pop("colgroup",["table"])):F.tag_name==="tbody"||F.tag_name==="tfoot"?(N=N||this._tag_stack.try_pop("caption",["table"]),N=N||this._tag_stack.try_pop("colgroup",["table"]),N=N||this._tag_stack.try_pop("thead",["table"]),N=N||this._tag_stack.try_pop("tbody",["table"])):F.tag_name==="tr"?(N=N||this._tag_stack.try_pop("caption",["table"]),N=N||this._tag_stack.try_pop("colgroup",["table"]),N=N||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(F.tag_name==="th"||F.tag_name==="td")&&(N=N||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),N=N||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return F.parent=this._tag_stack.get_parser_token(),N},n.exports.Beautifier=b},function(n,c,a){var i=a(6).Options;function s(d){i.call(this,d,"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"])}s.prototype=new i,n.exports.Options=s},function(n,c,a){var i=a(9).Tokenizer,s=a(9).TOKEN,d=a(13).Directives,f=a(14).TemplatablePattern,l=a(12).Pattern,o={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:s.START,RAW:s.RAW,EOF:s.EOF},r=new d(/<\!--/,/-->/),x=function(v,p){i.call(this,v,p),this._current_tag_name="";var R=new f(this._input).read_options(this._options),O=new l(this._input);if(this.__patterns={word:R.until(/[\n\r\t <]/),single_quote:R.until_after(/'/),double_quote:R.until_after(/"/),attribute:R.until(/[\n\r\t =>]|\/>/),element_name:R.until(/[\n\r\t >\/]/),handlebars_comment:O.starting_with(/{{!--/).until_after(/--}}/),handlebars:O.starting_with(/{{/).until_after(/}}/),handlebars_open:O.until(/[\n\r\t }]/),handlebars_raw_close:O.until(/}}/),comment:O.starting_with(/<!--/).until_after(/-->/),cdata:O.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:O.starting_with(/<!\[/).until_after(/]>/),processing:O.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 b=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=O.matching(b).until_after(b)}};x.prototype=new i,x.prototype._is_comment=function(v){return!1},x.prototype._is_opening=function(v){return v.type===o.TAG_OPEN},x.prototype._is_closing=function(v,p){return v.type===o.TAG_CLOSE&&p&&((v.text===">"||v.text==="/>")&&p.text[0]==="<"||v.text==="}}"&&p.text[0]==="{"&&p.text[1]==="{")},x.prototype._reset=function(){this._current_tag_name=""},x.prototype._get_next_token=function(v,p){var R=null;this._readWhitespace();var O=this._input.peek();return O===null?this._create_token(o.EOF,""):(R=R||this._read_open_handlebars(O,p),R=R||this._read_attribute(O,v,p),R=R||this._read_close(O,p),R=R||this._read_raw_content(O,v,p),R=R||this._read_content_word(O),R=R||this._read_comment_or_cdata(O),R=R||this._read_processing(O),R=R||this._read_open(O,p),R=R||this._create_token(o.UNKNOWN,this._input.next()),R)},x.prototype._read_comment_or_cdata=function(v){var p=null,R=null,O=null;if(v==="<"){var b=this._input.peek(1);b==="!"&&(R=this.__patterns.comment.read(),R?(O=r.get_directives(R),O&&O.ignore==="start"&&(R+=r.readIgnored(this._input))):R=this.__patterns.cdata.read()),R&&(p=this._create_token(o.COMMENT,R),p.directives=O)}return p},x.prototype._read_processing=function(v){var p=null,R=null,O=null;if(v==="<"){var b=this._input.peek(1);(b==="!"||b==="?")&&(R=this.__patterns.conditional_comment.read(),R=R||this.__patterns.processing.read()),R&&(p=this._create_token(o.COMMENT,R),p.directives=O)}return p},x.prototype._read_open=function(v,p){var R=null,O=null;return p||v==="<"&&(R=this._input.next(),this._input.peek()==="/"&&(R+=this._input.next()),R+=this.__patterns.element_name.read(),O=this._create_token(o.TAG_OPEN,R)),O},x.prototype._read_open_handlebars=function(v,p){var R=null,O=null;return p||this._options.indent_handlebars&&v==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(R=this.__patterns.handlebars_comment.read(),R=R||this.__patterns.handlebars.read(),O=this._create_token(o.COMMENT,R)):(R=this.__patterns.handlebars_open.read(),O=this._create_token(o.TAG_OPEN,R))),O},x.prototype._read_close=function(v,p){var R=null,O=null;return p&&(p.text[0]==="<"&&(v===">"||v==="/"&&this._input.peek(1)===">")?(R=this._input.next(),v==="/"&&(R+=this._input.next()),O=this._create_token(o.TAG_CLOSE,R)):p.text[0]==="{"&&v==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),O=this._create_token(o.TAG_CLOSE,"}}"))),O},x.prototype._read_attribute=function(v,p,R){var O=null,b="";if(R&&R.text[0]==="<")if(v==="=")O=this._create_token(o.EQUALS,this._input.next());else if(v==='"'||v==="'"){var E=this._input.next();v==='"'?E+=this.__patterns.double_quote.read():E+=this.__patterns.single_quote.read(),O=this._create_token(o.VALUE,E)}else b=this.__patterns.attribute.read(),b&&(p.type===o.EQUALS?O=this._create_token(o.VALUE,b):O=this._create_token(o.ATTRIBUTE,b));return O},x.prototype._is_content_unformatted=function(v){return this._options.void_elements.indexOf(v)===-1&&(this._options.content_unformatted.indexOf(v)!==-1||this._options.unformatted.indexOf(v)!==-1)},x.prototype._read_raw_content=function(v,p,R){var O="";if(R&&R.text[0]==="{")O=this.__patterns.handlebars_raw_close.read();else if(p.type===o.TAG_CLOSE&&p.opened.text[0]==="<"&&p.text[0]!=="/"){var b=p.opened.text.substr(1).toLowerCase();if(b==="script"||b==="style"){var E=this._read_comment_or_cdata(v);if(E)return E.type=o.TEXT,E;O=this._input.readUntil(new RegExp("</"+b+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(b)&&(O=this._input.readUntil(new RegExp("</"+b+"[\\n\\r\\t ]*?>","ig")))}return O?this._create_token(o.TEXT,O):null},x.prototype._read_content_word=function(v){var p="";if(this._options.unformatted_content_delimiter&&(v===this._options.unformatted_content_delimiter[0]&&(p=this.__patterns.unformatted_content_delimiter.read())),p||(p=this.__patterns.word.read()),p)return this._create_token(o.TEXT,p)},n.exports.Tokenizer=x,n.exports.TOKEN=o}],_={};function t(n){var c=_[n];if(c!==void 0)return c.exports;var a=_[n]={exports:{}};return S[n](a,a.exports,t),a.exports}var h=t(18);C=h})();var M=C;if(!0)!(k=[D,D("6UM0"),D("TXwP")],g=function(S){var _=D("6UM0"),t=D("TXwP");return{html_beautify:function(h,n){return M(h,n,_.js_beautify,t.css_beautify)}}}.apply(J,k),g!==void 0&&(H.exports=g));else var m,y})()},qBft:function(H,J,D){(function(k,g,C){H.exports=J=g(D("Ib8C"),D("OLod"))})(this,function(k){return k.pad.AnsiX923={pad:function(g,C){var M=g.sigBytes,m=C*4,y=m-M%m,S=M+y-1;g.clamp(),g.words[S>>>2]|=y<<24-S%4*8,g.sigBytes+=y},unpad:function(g){var C=g.words[g.sigBytes-1>>>2]&255;g.sigBytes-=C}},k.pad.Ansix923})},qHvr:function(H,J,D){"use strict";var k=D("2qtc"),g=D("kLXV"),C=D("5NDa"),M=D("5rEg"),m=D("miYZ"),y=D("tsqr"),S=D("tJVT"),_=D("q1tI"),t=D.n(_),h=D("4i/N");function n(c){var a=c.isAddmodle,i=c.setIsAdd,s=c.createTeam,d=Object(_.useState)(""),f=Object(S.a)(d,2),l=f[0],o=f[1];return t.a.createElement(g.a,{centered:!0,title:t.a.createElement("div",{style:{alignItems:"center",display:"flex"}},t.a.createElement("div",{style:{textAlign:"left",flex:"1"}},"\u521B\u5EFA\u6218\u961F"),t.a.createElement(h.a,{onClick:function(){return i(!1)},style:{cursor:"porint"}})),visible:a,closable:!1,destroyOnClose:!0,onOk:function(){if(!l){y.b.info("\u6218\u961F\u540D\u4E0D\u80FD\u4E3A\u7A7A");return}s(l)},onCancel:function(){return i(!1)}},t.a.createElement("div",null,t.a.createElement("span",{style:{fontSize:"14px",color:"#F73737"}},"*"),"\u961F\u540D\uFF1A",t.a.createElement("p",{style:{marginTop:"15px",marginLeft:"15px"}},t.a.createElement(M.a,{placeholder:"\u8BF7\u8F93\u5165\u961F\u540D",value:l,maxLength:60,addonAfter:String(l&&l.length||0)+"/60",onChange:function(x){return o(x.target.value)}}))))}J.a=n},qM6L:function(H,J,D){(function(k,g){H.exports=J=g(D("Ib8C"))})(this,function(k){return function(){var g=k,C=g.lib,M=C.WordArray,m=g.enc,y=m.Utf16=m.Utf16BE={stringify:function(_){for(var t=_.words,h=_.sigBytes,n=[],c=0;c<h;c+=2){var a=t[c>>>2]>>>16-c%4*8&65535;n.push(String.fromCharCode(a))}return n.join("")},parse:function(_){for(var t=_.length,h=[],n=0;n<t;n++)h[n>>>1]|=_.charCodeAt(n)<<16-n%2*16;return M.create(h,t*2)}};m.Utf16LE={stringify:function(_){for(var t=_.words,h=_.sigBytes,n=[],c=0;c<h;c+=2){var a=S(t[c>>>2]>>>16-c%4*8&65535);n.push(String.fromCharCode(a))}return n.join("")},parse:function(_){for(var t=_.length,h=[],n=0;n<t;n++)h[n>>>1]|=S(_.charCodeAt(n)<<16-n%2*16);return M.create(h,t*2)}};function S(_){return _<<8&4278255360|_>>>8&16711935}}(),k.enc.Utf16})},qu8F:function(H,J,D){(function(k,g,C){H.exports=J=g(D("Ib8C"),D("OLod"))})(this,function(k){/** @preserve
* Counter block mode compatible with Dr Brian Gladman fileenc.c
* derived from CryptoJS.mode.CTR
* Jan Hruby jhruby.web@gmail.com
*/return k.mode.CTRGladman=function(){var g=k.lib.BlockCipherMode.extend();function C(y){if((y>>24&255)===255){var S=y>>16&255,_=y>>8&255,t=y&255;S===255?(S=0,_===255?(_=0,t===255?t=0:++t):++_):++S,y=0,y+=S<<16,y+=_<<8,y+=t}else y+=1<<24;return y}function M(y){return(y[0]=C(y[0]))===0&&(y[1]=C(y[1])),y}var m=g.Encryptor=g.extend({processBlock:function(y,S){var _=this._cipher,t=_.blockSize,h=this._iv,n=this._counter;h&&(n=this._counter=h.slice(0),this._iv=void 0),M(n);var c=n.slice(0);_.encryptBlock(c,0);for(var a=0;a<t;a++)y[S+a]^=c[a]}});return g.Decryptor=m,g}(),k.mode.CTRGladman})},"rAM+":function(H,J,D){"use strict";D.d(J,"a",function(){return g});var k=D("Qw5x");function g(C,M){var m;if(typeof Symbol=="undefined"||C[Symbol.iterator]==null){if(Array.isArray(C)||(m=Object(k.a)(C))||M&&C&&typeof C.length=="number"){m&&(C=m);var y=0,S=function(){};return{s:S,n:function(){return y>=C.length?{done:!0}:{done:!1,value:C[y++]}},e:function(c){throw c},f:S}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var _=!0,t=!1,h;return{s:function(){m=C[Symbol.iterator]()},n:function(){var c=m.next();return _=c.done,c},e:function(c){t=!0,h=c},f:function(){try{!_&&m.return!=null&&m.return()}finally{if(t)throw h}}}}},rUJ1:function(H,J){const D=/[&<>"']/,k=/[&<>"']/g,g=/[<>"']|&(?!#?\w+;)/,C=/[<>"']|&(?!#?\w+;)/g,M={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},m=O=>M[O];function y(O,b){if(b){if(D.test(O))return O.replace(k,m)}else if(g.test(O))return O.replace(C,m);return O}const S=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function _(O){return O.replace(S,(b,E)=>(E=E.toLowerCase(),E==="colon"?":":E.charAt(0)==="#"?E.charAt(1)==="x"?String.fromCharCode(parseInt(E.substring(2),16)):String.fromCharCode(+E.substring(1)):""))}const t=/(^|[^\[])\^/g;function h(O,b){O=O.source||O,b=b||"";const E={replace:(w,T)=>(T=T.source||T,T=T.replace(t,"$1"),O=O.replace(w,T),E),getRegex:()=>new RegExp(O,b)};return E}const n=/[^\w:]/g,c=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function a(O,b,E){if(O){let w;try{w=decodeURIComponent(_(E)).replace(n,"").toLowerCase()}catch(T){return null}if(w.indexOf("javascript:")===0||w.indexOf("vbscript:")===0||w.indexOf("data:")===0)return null}b&&!c.test(E)&&(E=l(b,E));try{E=encodeURI(E).replace(/%25/g,"%")}catch(w){return null}return E}const i={},s=/^[^:]+:\/*[^/]*$/,d=/^([^:]+:)[\s\S]*$/,f=/^([^:]+:\/*[^/]*)[\s\S]*$/;function l(O,b){i[" "+O]||(s.test(O)?i[" "+O]=O+"/":i[" "+O]=v(O,"/",!0)),O=i[" "+O];const E=O.indexOf(":")===-1;return b.substring(0,2)==="//"?E?b:O.replace(d,"$1")+b:b.charAt(0)==="/"?E?b:O.replace(f,"$1")+b:O+b}const o={exec:function(){}};function r(O){let b=1,E,w;for(;b<arguments.length;b++){E=arguments[b];for(w in E)Object.prototype.hasOwnProperty.call(E,w)&&(O[w]=E[w])}return O}function x(O,b){const E=O.replace(/\|/g,(F,N,L)=>{let G=!1,z=N;for(;--z>=0&&L[z]==="\\";)G=!G;return G?"|":" |"}),w=E.split(/ \|/);let T=0;if(w.length>b)w.splice(b);else for(;w.length<b;)w.push("");for(;T<w.length;T++)w[T]=w[T].trim().replace(/\\\|/g,"|");return w}function v(O,b,E){const w=O.length;if(w===0)return"";let T=0;for(;T<w;){const F=O.charAt(w-T-1);if(F===b&&!E)T++;else if(F!==b&&E)T++;else break}return O.substr(0,w-T)}function p(O,b){if(O.indexOf(b[1])===-1)return-1;const E=O.length;let w=0,T=0;for(;T<E;T++)if(O[T]==="\\")T++;else if(O[T]===b[0])w++;else if(O[T]===b[1]&&(w--,w<0))return T;return-1}function R(O){O&&O.sanitize&&!O.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:y,unescape:_,edit:h,cleanUrl:a,resolveUrl:l,noopTest:o,merge:r,splitCells:x,rtrim:v,findClosingBracket:p,checkSanitizeDeprecation:R}},sR1s:function(H,J,D){"use strict";D.d(J,"b",function(){return M}),D.d(J,"a",function(){return m}),D.d(J,"c",function(){return y}),D.d(J,"d",function(){return S});var k=D("U8pU"),g="RC_TABLE_KEY";function C(_){return _==null?[]:Array.isArray(_)?_:[_]}function M(_,t){if(!t&&typeof t!="number")return _;for(var h=C(t),n=_,c=0;c<h.length;c+=1){if(!n)return null;var a=h[c];n=n[a]}return n}function m(_){var t=[],h={};return _.forEach(function(n){for(var c=n||{},a=c.key,i=c.dataIndex,s=a||C(i).join("-")||g;h[s];)s="".concat(s,"_next");h[s]=!0,t.push(s)}),t}function y(){var _={};function t(a,i){i&&Object.keys(i).forEach(function(s){var d=i[s];d&&Object(k.a)(d)==="object"?(a[s]=a[s]||{},t(a[s],d)):a[s]=d})}for(var h=arguments.length,n=new Array(h),c=0;c<h;c++)n[c]=arguments[c];return n.forEach(function(a){t(_,a)}),_}function S(_){return _!=null}},sboe:function(H,J,D){"use strict";D.d(J,"a",function(){return C});var k=D("q1tI"),g=D.n(k),C=k.createContext(null)},t23M:function(H,J,D){"use strict";var k=D("VTBJ"),g=D("1OyB"),C=D("vuIU"),M=D("Ji7U"),m=D("LK+K"),y=D("q1tI"),S=D.n(y),_=D("m+aA"),t=D("Zm9Q"),h=D("Kwbf"),n=D("c+Xe"),c=D("bdgK"),a="rc-observer-key",i=function(s){Object(M.a)(f,s);var d=Object(m.a)(f);function f(){var l;return Object(g.a)(this,f),l=d.apply(this,arguments),l.resizeObserver=null,l.childNode=null,l.currentElement=null,l.state={width:0,height:0,offsetHeight:0,offsetWidth:0},l.onResize=function(o){var r=l.props.onResize,x=o[0].target,v=x.getBoundingClientRect(),p=v.width,R=v.height,O=x.offsetWidth,b=x.offsetHeight,E=Math.floor(p),w=Math.floor(R);if(l.state.width!==E||l.state.height!==w||l.state.offsetWidth!==O||l.state.offsetHeight!==b){var T={width:E,height:w,offsetWidth:O,offsetHeight:b};l.setState(T),r&&Promise.resolve().then(function(){r(Object(k.a)(Object(k.a)({},T),{},{offsetWidth:O,offsetHeight:b}))})}},l.setChildNode=function(o){l.childNode=o},l}return Object(C.a)(f,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var o=this.props.disabled;if(o){this.destroyObserver();return}var r=Object(_.a)(this.childNode||this),x=r!==this.currentElement;x&&(this.destroyObserver(),this.currentElement=r),!this.resizeObserver&&r&&(this.resizeObserver=new c.default(this.onResize),this.resizeObserver.observe(r))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var o=this.props.children,r=Object(t.a)(o);if(r.length>1)Object(h.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(r.length===0)return Object(h.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var x=r[0];if(y.isValidElement(x)&&Object(n.c)(x)){var v=x.ref;r[0]=y.cloneElement(x,{ref:Object(n.a)(v,this.setChildNode)})}return r.length===1?r[0]:r.map(function(p,R){return!y.isValidElement(p)||"key"in p&&p.key!==null?p:y.cloneElement(p,{key:"".concat(a,"-").concat(R)})})}}]),f}(y.Component);i.displayName="ResizeObserver",J.a=i},t9D7:function(H,J,D){"use strict";D.d(J,"b",function(){return S}),D.d(J,"g",function(){return t}),D.d(J,"d",function(){return h}),D.d(J,"e",function(){return n}),D.d(J,"a",function(){return c}),D.d(J,"f",function(){return s}),D.d(J,"c",function(){return d});var k=D("Vhoy"),g=D("MI8n"),C=D("pmY6"),M=D("Cg/j"),m=D("ic2d"),y=D("nEHx");const S=Object(M.c)("themeService");var _;(function(f){function l(o){return o&&typeof o=="object"&&typeof o.id=="string"}f.isThemeColor=l})(_||(_={}));function t(f){return{id:f}}var h;(function(f){function l(R){return R&&typeof R=="object"&&typeof R.id=="string"&&(typeof R.color=="undefined"||_.isThemeColor(R.color))}f.isThemeIcon=l;const o=new RegExp(`^\\$\\((${k.a.iconNameExpression}(?:${k.a.iconModifierExpression})?)\\)$`);function r(R){const O=o.exec(R);if(!O)return;let[,b]=O;return{id:b}}f.fromString=r;function x(R,O){let b=R.id;const E=b.lastIndexOf("~");return E!==-1&&(b=b.substring(0,E)),O&&(b=`${b}~${O}`),{id:b}}f.modify=x;function v(R,O){var b,E;return R.id===O.id&&((b=R.color)===null||b===void 0?void 0:b.id)===((E=O.color)===null||E===void 0?void 0:E.id)}f.isEqual=v;function p(R,O){return{id:R.id,color:O?t(O):void 0}}f.asThemeIcon=p,f.asClassNameArray=k.a.asClassNameArray,f.asClassName=k.a.asClassName,f.asCSSSelector=k.a.asCSSSelector})(h||(h={}));function n(f){switch(f){case y.a.DARK:return"vs-dark";case y.a.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const c={ThemingContribution:"base.contributions.theming"};class a{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new g.b}onColorThemeChange(f){return this.themingParticipants.push(f),this.onThemingParticipantAddedEmitter.fire(f),Object(C.i)(()=>{const l=this.themingParticipants.indexOf(f);this.themingParticipants.splice(l,1)})}getThemingParticipants(){return this.themingParticipants}}let i=new a;m.a.add(c.ThemingContribution,i);function s(f){return i.onColorThemeChange(f)}class d extends C.a{constructor(f){super();this.themeService=f,this.theme=f.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(l=>this.onThemeChange(l)))}onThemeChange(f){this.theme=f,this.updateStyles()}updateStyles(){}}},uGsb:function(H,J,D){(function(k,g,C){H.exports=J=g(D("Ib8C"),D("MlIO"),D("1uat"))})(this,function(k){return function(){var g=k,C=g.x64,M=C.Word,m=C.WordArray,y=g.algo,S=y.SHA512,_=y.SHA384=S.extend({_doReset:function(){this._hash=new m.init([new M.init(3418070365,3238371032),new M.init(1654270250,914150663),new M.init(2438529370,812702999),new M.init(355462360,4144912697),new M.init(1731405415,4290775857),new M.init(2394180231,1750603025),new M.init(3675008525,1694076839),new M.init(1203062813,3204075428)])},_doFinalize:function(){var t=S._doFinalize.call(this);return t.sigBytes-=16,t}});g.SHA384=S._createHelper(_),g.HmacSHA384=S._createHmacHelper(_)}(),k.SHA384})},uGxW:function(H,J,D){(function(k,g,C){H.exports=J=g(D("Ib8C"),D("OLod"))})(this,function(k){return k.pad.NoPadding={pad:function(){},unpad:function(){}},k.pad.NoPadding})},uK0f:function(H,J,D){(function(k,g){H.exports=g()})(this,function(){"use strict";function k(g,C,M){M=M||{},M.childrenKeyName=M.childrenKeyName||"children";var m=g||[],y=[],S=0;do{var _=m.filter(function(t){return C(t,S)})[0];if(!_)break;y.push(_),m=_[M.childrenKeyName]||[],S+=1}while(m.length>0);return y}return k})},ulZh:function(H,J,D){typeof window!="undefined"&&function(g,C){H.exports=C()}(this,function(){return function(k){var g={};function C(M){if(g[M])return g[M].exports;var m=g[M]={i:M,l:!1,exports:{}};return k[M].call(m.exports,m,m.exports,C),m.l=!0,m.exports}return C.m=k,C.c=g,C.d=function(M,m,y){C.o(M,m)||Object.defineProperty(M,m,{enumerable:!0,get:y})},C.r=function(M){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(M,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(M,"__esModule",{value:!0})},C.t=function(M,m){if(m&1&&(M=C(M)),m&8)return M;if(m&4&&typeof M=="object"&&M&&M.__esModule)return M;var y=Object.create(null);if(C.r(y),Object.defineProperty(y,"default",{enumerable:!0,value:M}),m&2&&typeof M!="string")for(var S in M)C.d(y,S,function(_){return M[_]}.bind(null,S));return y},C.n=function(M){var m=M&&M.__esModule?function(){return M.default}:function(){return M};return C.d(m,"a",m),m},C.o=function(M,m){return Object.prototype.hasOwnProperty.call(M,m)},C.p="/dist/",C(C.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(k,g,C){"use strict";var M=Object.prototype.hasOwnProperty,m="~";function y(){}Object.create&&(y.prototype=Object.create(null),new y().__proto__||(m=!1));function S(n,c,a){this.fn=n,this.context=c,this.once=a||!1}function _(n,c,a,i,s){if(typeof a!="function")throw new TypeError("The listener must be a function");var d=new S(a,i||n,s),f=m?m+c:c;return n._events[f]?n._events[f].fn?n._events[f]=[n._events[f],d]:n._events[f].push(d):(n._events[f]=d,n._eventsCount++),n}function t(n,c){--n._eventsCount===0?n._events=new y:delete n._events[c]}function h(){this._events=new y,this._eventsCount=0}h.prototype.eventNames=function(){var c=[],a,i;if(this._eventsCount===0)return c;for(i in a=this._events)M.call(a,i)&&c.push(m?i.slice(1):i);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(a)):c},h.prototype.listeners=function(c){var a=m?m+c:c,i=this._events[a];if(!i)return[];if(i.fn)return[i.fn];for(var s=0,d=i.length,f=new Array(d);s<d;s++)f[s]=i[s].fn;return f},h.prototype.listenerCount=function(c){var a=m?m+c:c,i=this._events[a];return i?i.fn?1:i.length:0},h.prototype.emit=function(c,a,i,s,d,f){var l=m?m+c:c;if(!this._events[l])return!1;var o=this._events[l],r=arguments.length,x,v;if(o.fn){o.once&&this.removeListener(c,o.fn,void 0,!0);switch(r){case 1:return o.fn.call(o.context),!0;case 2:return o.fn.call(o.context,a),!0;case 3:return o.fn.call(o.context,a,i),!0;case 4:return o.fn.call(o.context,a,i,s),!0;case 5:return o.fn.call(o.context,a,i,s,d),!0;case 6:return o.fn.call(o.context,a,i,s,d,f),!0}for(v=1,x=new Array(r-1);v<r;v++)x[v-1]=arguments[v];o.fn.apply(o.context,x)}else{var p=o.length,R;for(v=0;v<p;v++){o[v].once&&this.removeListener(c,o[v].fn,void 0,!0);switch(r){case 1:o[v].fn.call(o[v].context);break;case 2:o[v].fn.call(o[v].context,a);break;case 3:o[v].fn.call(o[v].context,a,i);break;case 4:o[v].fn.call(o[v].context,a,i,s);break;default:if(!x)for(R=1,x=new Array(r-1);R<r;R++)x[R-1]=arguments[R];o[v].fn.apply(o[v].context,x)}}}return!0},h.prototype.on=function(c,a,i){return _(this,c,a,i,!1)},h.prototype.once=function(c,a,i){return _(this,c,a,i,!0)},h.prototype.removeListener=function(c,a,i,s){var d=m?m+c:c;if(!this._events[d])return this;if(!a)return t(this,d),this;var f=this._events[d];if(f.fn)f.fn===a&&(!s||f.once)&&(!i||f.context===i)&&t(this,d);else{for(var l=0,o=[],r=f.length;l<r;l++)(f[l].fn!==a||s&&!f[l].once||i&&f[l].context!==i)&&o.push(f[l]);o.length?this._events[d]=o.length===1?o[0]:o:t(this,d)}return this},h.prototype.removeAllListeners=function(c){var a;return c?(a=m?m+c:c,this._events[a]&&t(this,a)):(this._events=new y,this._eventsCount=0),this},h.prototype.off=h.prototype.removeListener,h.prototype.addListener=h.prototype.on,h.prefixed=m,h.EventEmitter=h,k.exports=h},"./node_modules/url-toolkit/src/url-toolkit.js":function(k,g,C){(function(M){var m=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,y=/^([^\/?#]*)([^]*)$/,S=/(?:\/|^)\.(?=\/)/g,_=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,t={buildAbsoluteURL:function(h,n,c){if(c=c||{},h=h.trim(),n=n.trim(),!n){if(!c.alwaysNormalize)return h;var a=t.parseURL(h);if(!a)throw new Error("Error trying to parse base URL.");return a.path=t.normalizePath(a.path),t.buildURLFromParts(a)}var i=t.parseURL(n);if(!i)throw new Error("Error trying to parse relative URL.");if(i.scheme)return c.alwaysNormalize?(i.path=t.normalizePath(i.path),t.buildURLFromParts(i)):n;var s=t.parseURL(h);if(!s)throw new Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&s.path[0]!=="/"){var d=y.exec(s.path);s.netLoc=d[1],s.path=d[2]}s.netLoc&&!s.path&&(s.path="/");var f={scheme:s.scheme,netLoc:i.netLoc,path:null,params:i.params,query:i.query,fragment:i.fragment};if(!i.netLoc&&(f.netLoc=s.netLoc,i.path[0]!=="/"))if(!i.path)f.path=s.path,i.params||(f.params=s.params,i.query||(f.query=s.query));else{var l=s.path,o=l.substring(0,l.lastIndexOf("/")+1)+i.path;f.path=t.normalizePath(o)}return f.path===null&&(f.path=c.alwaysNormalize?t.normalizePath(i.path):i.path),t.buildURLFromParts(f)},parseURL:function(h){var n=m.exec(h);return n?{scheme:n[1]||"",netLoc:n[2]||"",path:n[3]||"",params:n[4]||"",query:n[5]||"",fragment:n[6]||""}:null},normalizePath:function(h){for(h=h.split("").reverse().join("").replace(S,"");h.length!==(h=h.replace(_,"")).length;);return h.split("").reverse().join("")},buildURLFromParts:function(h){return h.scheme+h.netLoc+h.path+h.params+h.query+h.fragment}};k.exports=t})(this)},"./node_modules/webworkify-webpack/index.js":function(k,g,C){function M(c){var a={};function i(d){if(a[d])return a[d].exports;var f=a[d]={i:d,l:!1,exports:{}};return c[d].call(f.exports,f,f.exports,i),f.l=!0,f.exports}i.m=c,i.c=a,i.i=function(d){return d},i.d=function(d,f,l){i.o(d,f)||Object.defineProperty(d,f,{configurable:!1,enumerable:!0,get:l})},i.r=function(d){Object.defineProperty(d,"__esModule",{value:!0})},i.n=function(d){var f=d&&d.__esModule?function(){return d.default}:function(){return d};return i.d(f,"a",f),f},i.o=function(d,f){return Object.prototype.hasOwnProperty.call(d,f)},i.p="/",i.oe=function(d){throw console.error(d),d};var s=i(i.s=ENTRY_MODULE);return s.default||s}var m="[\\.|\\-|\\+|\\w|/|@]+",y="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+m+").*?\\)";function S(c){return(c+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function _(c){return!isNaN(1*c)}function t(c,a,i){var s={};s[i]=[];var d=a.toString(),f=d.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!f)return s;for(var l=f[1],o=new RegExp("(\\\\n|\\W)"+S(l)+y,"g"),r;r=o.exec(d);){if(r[3]==="dll-reference")continue;s[i].push(r[3])}for(o=new RegExp("\\("+S(l)+'\\("(dll-reference\\s('+m+'))"\\)\\)'+y,"g");r=o.exec(d);)c[r[2]]||(s[i].push(r[1]),c[r[2]]=C(r[1]).m),s[r[2]]=s[r[2]]||[],s[r[2]].push(r[4]);for(var x=Object.keys(s),v=0;v<x.length;v++)for(var p=0;p<s[x[v]].length;p++)_(s[x[v]][p])&&(s[x[v]][p]=1*s[x[v]][p]);return s}function h(c){var a=Object.keys(c);return a.reduce(function(i,s){return i||c[s].length>0},!1)}function n(c,a){for(var i={main:[a]},s={main:[]},d={main:{}};h(i);)for(var f=Object.keys(i),l=0;l<f.length;l++){var o=f[l],r=i[o],x=r.pop();if(d[o]=d[o]||{},d[o][x]||!c[o][x])continue;d[o][x]=!0,s[o]=s[o]||[],s[o].push(x);for(var v=t(c,c[o][x],o),p=Object.keys(v),R=0;R<p.length;R++)i[p[R]]=i[p[R]]||[],i[p[R]]=i[p[R]].concat(v[p[R]])}return s}k.exports=function(c,a){a=a||{};var i={main:C.m},s=a.all?{main:Object.keys(i.main)}:n(i,c),d="";Object.keys(s).filter(function(x){return x!=="main"}).forEach(function(x){for(var v=0;s[x][v];)v++;s[x].push(v),i[x][v]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",d=d+"var "+x+" = ("+M.toString().replace("ENTRY_MODULE",JSON.stringify(v))+")({"+s[x].map(function(p){return""+JSON.stringify(p)+": "+i[x][p].toString()}).join(",")+`});
`}),d=d+"new (("+M.toString().replace("ENTRY_MODULE",JSON.stringify(c))+")({"+s.main.map(function(x){return""+JSON.stringify(x)+": "+i.main[x].toString()}).join(",")+"}))(self);";var f=new window.Blob([d],{type:"text/javascript"});if(a.bare)return f;var l=window.URL||window.webkitURL||window.mozURL||window.msURL,o=l.createObjectURL(f),r=new window.Worker(o);return r.objectURL=o,r}},"./src/config.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"hlsDefaultConfig",function(){return R}),C.d(g,"mergeConfig",function(){return b}),C.d(g,"enableStreamingMode",function(){return E});var M=C("./src/controller/abr-controller.ts"),m=C("./src/controller/audio-stream-controller.ts"),y=C("./src/controller/audio-track-controller.ts"),S=C("./src/controller/subtitle-stream-controller.ts"),_=C("./src/controller/subtitle-track-controller.ts"),t=C("./src/controller/buffer-controller.ts"),h=C("./src/controller/timeline-controller.ts"),n=C("./src/controller/cap-level-controller.ts"),c=C("./src/controller/fps-controller.ts"),a=C("./src/controller/eme-controller.ts"),i=C("./src/controller/cmcd-controller.ts"),s=C("./src/utils/xhr-loader.ts"),d=C("./src/utils/fetch-loader.ts"),f=C("./src/utils/cues.ts"),l=C("./src/utils/mediakeys-helper.ts"),o=C("./src/utils/logger.ts");function r(){return r=Object.assign||function(w){for(var T=1;T<arguments.length;T++){var F=arguments[T];for(var N in F)Object.prototype.hasOwnProperty.call(F,N)&&(w[N]=F[N])}return w},r.apply(this,arguments)}function x(w,T){var F=Object.keys(w);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(w);T&&(N=N.filter(function(L){return Object.getOwnPropertyDescriptor(w,L).enumerable})),F.push.apply(F,N)}return F}function v(w){for(var T=1;T<arguments.length;T++){var F=arguments[T]!=null?arguments[T]:{};T%2?x(Object(F),!0).forEach(function(N){p(w,N,F[N])}):Object.getOwnPropertyDescriptors?Object.defineProperties(w,Object.getOwnPropertyDescriptors(F)):x(Object(F)).forEach(function(N){Object.defineProperty(w,N,Object.getOwnPropertyDescriptor(F,N))})}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 R=v(v({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:Infinity,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:Infinity,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:s.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:M.default,bufferController:t.default,capLevelController:n.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:l.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},O()),{},{subtitleStreamController:S.SubtitleStreamController,subtitleTrackController:_.default,timelineController:h.TimelineController,audioStreamController:m.default,audioTrackController:y.default,emeController:a.default,cmcdController:i.default});function O(){return{cueHandler:f.default,enableCEA708Captions:!0,enableWebVTT:!0,enableIMSC1:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function b(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 r({},w,T)}function E(w){var T=w.loader;if(T!==d.default&&T!==s.default)o.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),w.progressive=!1;else{var F=Object(d.fetchSupported)();F&&(w.loader=d.default,w.progressive=!0,w.enableSoftwareAES=!0,o.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(k,g,C){"use strict";C.r(g);var M=C("./src/polyfills/number.ts"),m=C("./src/utils/ewma-bandwidth-estimator.ts"),y=C("./src/events.ts"),S=C("./src/utils/buffer-helper.ts"),_=C("./src/errors.ts"),t=C("./src/types/loader.ts"),h=C("./src/utils/logger.ts");function n(i,s){for(var d=0;d<s.length;d++){var f=s[d];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(i,f.key,f)}}function c(i,s,d){return s&&n(i.prototype,s),d&&n(i,d),i}var a=function(){function i(d){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=d;var f=d.config;this.bwEstimator=new m.default(f.abrEwmaSlowVoD,f.abrEwmaFastVoD,f.abrEwmaDefaultEstimate),this.registerListeners()}var s=i.prototype;return s.registerListeners=function(){var f=this.hls;f.on(y.Events.FRAG_LOADING,this.onFragLoading,this),f.on(y.Events.FRAG_LOADED,this.onFragLoaded,this),f.on(y.Events.FRAG_BUFFERED,this.onFragBuffered,this),f.on(y.Events.LEVEL_LOADED,this.onLevelLoaded,this),f.on(y.Events.ERROR,this.onError,this)},s.unregisterListeners=function(){var f=this.hls;f.off(y.Events.FRAG_LOADING,this.onFragLoading,this),f.off(y.Events.FRAG_LOADED,this.onFragLoaded,this),f.off(y.Events.FRAG_BUFFERED,this.onFragBuffered,this),f.off(y.Events.LEVEL_LOADED,this.onLevelLoaded,this),f.off(y.Events.ERROR,this.onError,this)},s.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},s.onFragLoading=function(f,l){var o=l.frag;if(o.type===t.PlaylistLevelType.MAIN&&!this.timer){var r;this.fragCurrent=o,this.partCurrent=(r=l.part)!=null?r:null,this.timer=self.setInterval(this.onCheck,100)}},s.onLevelLoaded=function(f,l){var o=this.hls.config;l.details.live?this.bwEstimator.update(o.abrEwmaSlowLive,o.abrEwmaFastLive):this.bwEstimator.update(o.abrEwmaSlowVoD,o.abrEwmaFastVoD)},s._abandonRulesCheck=function(){var f=this.fragCurrent,l=this.partCurrent,o=this.hls,r=o.autoLevelEnabled,x=o.config,v=o.media;if(!f||!v)return;var p=l?l.stats:f.stats,R=l?l.duration:f.duration;if(p.aborted){h.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!r||v.paused||!v.playbackRate||!v.readyState)return;var O=performance.now()-p.loading.start,b=Math.abs(v.playbackRate);if(O<=500*R/b)return;var E=o.levels,w=o.minAutoLevel,T=E[f.level],F=p.total||Math.max(p.loaded,Math.round(R*T.maxBitrate/8)),N=Math.max(1,p.bwEstimate?p.bwEstimate/8:p.loaded*1e3/O),L=(F-p.loaded)/N,G=v.currentTime,z=(S.BufferHelper.bufferInfo(v,G,x.maxBufferHole).end-G)/b;if(z>=2*R/b||L<=z)return;var A=Number.POSITIVE_INFINITY,B;for(B=f.level-1;B>w;B--){var U=E[B].maxBitrate;if(A=R*U/(8*.8*N),A<z)break}if(A>=L)return;var I=this.bwEstimator.getEstimate();h.logger.warn("Fragment "+f.sn+(l?" part "+l.index:"")+" of level "+f.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+B+`
Current BW estimate: `+(Object(M.isFiniteNumber)(I)?(I/1024).toFixed(3):"Unknown")+` Kb/s
Estimated load time for current fragment: `+L.toFixed(3)+` s
Estimated load time for the next fragment: `+A.toFixed(3)+` s
Time to underbuffer: `+z.toFixed(3)+" s"),o.nextLoadLevel=B,this.bwEstimator.sample(O,p.loaded),this.clearTimer(),f.loader&&(this.fragCurrent=this.partCurrent=null,f.loader.abort()),o.trigger(y.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:f,part:l,stats:p})},s.onFragLoaded=function(f,l){var o=l.frag,r=l.part;if(o.type===t.PlaylistLevelType.MAIN&&Object(M.isFiniteNumber)(o.sn)){var x=r?r.stats:o.stats,v=r?r.duration:o.duration;if(this.clearTimer(),this.lastLoadedFragLevel=o.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var p=this.hls.levels[o.level],R=(p.loaded?p.loaded.bytes:0)+x.loaded,O=(p.loaded?p.loaded.duration:0)+v;p.loaded={bytes:R,duration:O},p.realBitrate=Math.round(8*R/O)}if(o.bitrateTest){var b={stats:x,frag:o,part:r,id:o.type};this.onFragBuffered(y.Events.FRAG_BUFFERED,b),o.bitrateTest=!1}}},s.onFragBuffered=function(f,l){var o=l.frag,r=l.part,x=r?r.stats:o.stats;if(x.aborted)return;if(o.type!==t.PlaylistLevelType.MAIN||o.sn==="initSegment")return;var v=x.parsing.end-x.loading.start;this.bwEstimator.sample(v,x.loaded),x.bwEstimate=this.bwEstimator.getEstimate(),o.bitrateTest?this.bitrateTestDelay=v/1e3:this.bitrateTestDelay=0},s.onError=function(f,l){switch(l.details){case _.ErrorDetails.FRAG_LOAD_ERROR:case _.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},s.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},s.getNextABRAutoLevel=function(){var f=this.fragCurrent,l=this.partCurrent,o=this.hls,r=o.maxAutoLevel,x=o.config,v=o.minAutoLevel,p=o.media,R=l?l.duration:f?f.duration:0,O=p?p.currentTime:0,b=p&&p.playbackRate!==0?Math.abs(p.playbackRate):1,E=this.bwEstimator?this.bwEstimator.getEstimate():x.abrEwmaDefaultEstimate,w=(S.BufferHelper.bufferInfo(p,O,x.maxBufferHole).end-O)/b,T=this.findBestLevel(E,v,r,w,x.abrBandWidthFactor,x.abrBandWidthUpFactor);if(T>=0)return T;h.logger.trace((w?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var F=R?Math.min(R,x.maxStarvationDelay):x.maxStarvationDelay,N=x.abrBandWidthFactor,L=x.abrBandWidthUpFactor;if(!w){var G=this.bitrateTestDelay;if(G){var z=R?Math.min(R,x.maxLoadingDelay):x.maxLoadingDelay;F=z-G,h.logger.trace("bitrate test took "+Math.round(1e3*G)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*F)+" ms"),N=L=1}}return T=this.findBestLevel(E,v,r,w+F,N,L),Math.max(T,0)},s.findBestLevel=function(f,l,o,r,x,v){for(var p,R=this.fragCurrent,O=this.partCurrent,b=this.lastLoadedFragLevel,E=this.hls.levels,w=E[b],T=!!(w!=null&&(p=w.details)!==null&&p!==void 0&&p.live),F=w==null?void 0:w.codecSet,N=O?O.duration:R?R.duration:0,L=o;L>=l;L--){var G=E[L];if(!G||F&&G.codecSet!==F)continue;var z=G.details,A=(O?z==null?void 0:z.partTarget:z==null?void 0:z.averagetargetduration)||N,B=void 0;L<=b?B=x*f:B=v*f;var U=E[L].maxBitrate,I=U*A/B;if(h.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+L+"/"+Math.round(B)+"/"+U+"/"+A+"/"+r+"/"+I),B>U&&(!I||T&&!this.bitrateTestDelay||I<r))return L}return-1},c(i,[{key:"nextAutoLevel",get:function(){var f=this._nextAutoLevel,l=this.bwEstimator;if(f!==-1&&(!l||!l.canEstimate()))return f;var o=this.getNextABRAutoLevel();return f!==-1&&(o=Math.min(f,o)),o},set:function(f){this._nextAutoLevel=f}}]),i}();g.default=a},"./src/controller/audio-stream-controller.ts":function(k,g,C){"use strict";C.r(g);var M=C("./src/polyfills/number.ts"),m=C("./src/controller/base-stream-controller.ts"),y=C("./src/events.ts"),S=C("./src/utils/buffer-helper.ts"),_=C("./src/controller/fragment-tracker.ts"),t=C("./src/types/level.ts"),h=C("./src/types/loader.ts"),n=C("./src/loader/fragment.ts"),c=C("./src/demux/chunk-cache.ts"),a=C("./src/demux/transmuxer-interface.ts"),i=C("./src/types/transmuxer.ts"),s=C("./src/controller/fragment-finders.ts"),d=C("./src/utils/discontinuities.ts"),f=C("./src/errors.ts"),l=C("./src/utils/logger.ts");function o(){return o=Object.assign||function(R){for(var O=1;O<arguments.length;O++){var b=arguments[O];for(var E in b)Object.prototype.hasOwnProperty.call(b,E)&&(R[E]=b[E])}return R},o.apply(this,arguments)}function r(R,O){R.prototype=Object.create(O.prototype),R.prototype.constructor=R,x(R,O)}function x(R,O){return x=Object.setPrototypeOf||function(E,w){return E.__proto__=w,E},x(R,O)}var v=100,p=function(R){r(O,R);function O(E,w){var T;return T=R.call(this,E,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 b=O.prototype;return b.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},b._registerListeners=function(){var w=this.hls;w.on(y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),w.on(y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),w.on(y.Events.MANIFEST_LOADING,this.onManifestLoading,this),w.on(y.Events.LEVEL_LOADED,this.onLevelLoaded,this),w.on(y.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),w.on(y.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),w.on(y.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),w.on(y.Events.ERROR,this.onError,this),w.on(y.Events.BUFFER_RESET,this.onBufferReset,this),w.on(y.Events.BUFFER_CREATED,this.onBufferCreated,this),w.on(y.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),w.on(y.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),w.on(y.Events.FRAG_BUFFERED,this.onFragBuffered,this)},b._unregisterListeners=function(){var w=this.hls;w.off(y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),w.off(y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),w.off(y.Events.MANIFEST_LOADING,this.onManifestLoading,this),w.off(y.Events.LEVEL_LOADED,this.onLevelLoaded,this),w.off(y.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),w.off(y.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),w.off(y.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),w.off(y.Events.ERROR,this.onError,this),w.off(y.Events.BUFFER_RESET,this.onBufferReset,this),w.off(y.Events.BUFFER_CREATED,this.onBufferCreated,this),w.off(y.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),w.off(y.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),w.off(y.Events.FRAG_BUFFERED,this.onFragBuffered,this)},b.onInitPtsFound=function(w,T){var F=T.frag,N=T.id,L=T.initPTS;if(N==="main"){var G=F.cc;this.initPTS[F.cc]=L,this.log("InitPTS for cc: "+G+" found from main: "+L),this.videoTrackCC=G,this.state===m.State.WAITING_INIT_PTS&&this.tick()}},b.startLoad=function(w){if(!this.levels){this.startPosition=w,this.state=m.State.STOPPED;return}var T=this.lastCurrentTime;this.stopLoad(),this.setInterval(v),this.fragLoadError=0,T>0&&w===-1?(this.log("Override startPosition with lastCurrentTime @"+T.toFixed(3)),this.state=m.State.IDLE):(this.loadedmetadata=!1,this.state=m.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=w,this.tick()},b.doTick=function(){switch(this.state){case m.State.IDLE:this.doTickIdle();break;case m.State.WAITING_TRACK:{var w,T=this.levels,F=this.trackId,N=T==null||((w=T[F])===null||w===void 0)?void 0:w.details;if(N){if(this.waitForCdnTuneIn(N))break;this.state=m.State.WAITING_INIT_PTS}break}case m.State.FRAG_LOADING_WAITING_RETRY:{var L,G=performance.now(),z=this.retryDate;(!z||G>=z||(L=this.media)!==null&&L!==void 0&&L.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=m.State.IDLE);break}case m.State.WAITING_INIT_PTS:{var A=this.waitingData;if(A){var B=A.frag,U=A.part,I=A.cache,K=A.complete;if(this.initPTS[B.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=m.State.FRAG_LOADING;var Z=I.flush(),ue={frag:B,part:U,payload:Z,networkDetails:null};this._handleFragmentLoadProgress(ue),K&&R.prototype._handleFragmentLoadComplete.call(this,ue)}else if(this.videoTrackCC!==this.waitingVideoCC)l.logger.log("Waiting fragment cc ("+B.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var de=this.getLoadPosition(),Ce=S.BufferHelper.bufferInfo(this.mediaBuffer,de,this.config.maxBufferHole),Re=Object(s.fragmentWithinToleranceTest)(Ce.end,this.config.maxFragLookUpTolerance,B);Re<0&&(l.logger.log("Waiting fragment cc ("+B.cc+") @ "+B.start+" cancelled because another fragment at "+Ce.end+" is needed"),this.clearWaitingFragment())}}else this.state=m.State.IDLE}}this.onTickEnd()},b.clearWaitingFragment=function(){var w=this.waitingData;w&&(this.fragmentTracker.removeFragment(w.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=m.State.IDLE)},b.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},b.doTickIdle=function(){var w,T,F=this.hls,N=this.levels,L=this.media,G=this.trackId,z=F.config;if(!N||!N[G])return;if(!L&&(this.startFragRequested||!z.startFragPrefetch))return;var A=N[G],B=A.details;if(!B||B.live&&this.levelLastLoaded!==G||this.waitForCdnTuneIn(B)){this.state=m.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,n.ElementaryStreamTypes.AUDIO,h.PlaylistLevelType.AUDIO));var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,h.PlaylistLevelType.AUDIO);if(U===null)return;var I=U.len,K=this.getMaxBufferLength(),Z=this.audioSwitch;if(I>=K&&!Z)return;if(!Z&&this._streamEnded(U,B)){F.trigger(y.Events.BUFFER_EOS,{type:"audio"}),this.state=m.State.ENDED;return}var ue=B.fragments,de=ue[0].start,Ce=U.end;if(Z){var Re=this.getLoadPosition();Ce=Re,B.PTSKnown&&Re<de&&((U.end>de||U.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),L.currentTime=de+.05))}var me=this.getNextFragment(Ce,B);if(!me){this.bufferFlushed=!0;return}((w=me.decryptdata)===null||w===void 0?void 0:w.keyFormat)==="identity"&&!((T=me.decryptdata)!==null&&T!==void 0&&T.key)?this.loadKey(me,B):this.loadFragment(me,B,Ce)},b.getMaxBufferLength=function(){var w=R.prototype.getMaxBufferLength.call(this),T=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,h.PlaylistLevelType.MAIN);return T===null?w:Math.max(w,T.len)},b.onMediaDetaching=function(){this.videoBuffer=null,R.prototype.onMediaDetaching.call(this)},b.onAudioTracksUpdated=function(w,T){var F=T.audioTracks;this.resetTransmuxer(),this.levels=F.map(function(N){return new t.Level(N)})},b.onAudioTrackSwitching=function(w,T){var F=!!T.url;this.trackId=T.id;var N=this.fragCurrent;N!=null&&N.loader&&N.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),F?this.setInterval(v):this.resetTransmuxer(),F?(this.audioSwitch=!0,this.state=m.State.IDLE):this.state=m.State.STOPPED,this.tick()},b.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},b.onLevelLoaded=function(w,T){this.mainDetails=T.details},b.onAudioTrackLoaded=function(w,T){var F,N=this.levels,L=T.details,G=T.id;if(!N){this.warn("Audio tracks were reset while loading level "+G);return}this.log("Track "+G+" loaded ["+L.startSN+","+L.endSN+"],duration:"+L.totalduration);var z=N[G],A=0;if(L.live||(F=z.details)!==null&&F!==void 0&&F.live){var B=this.mainDetails;if(L.fragments[0]||(L.deltaUpdateFailed=!0),L.deltaUpdateFailed||!B)return;!z.details&&L.hasProgramDateTime&&B.hasProgramDateTime?(Object(d.alignMediaPlaylistByPDT)(L,B),A=L.fragments[0].start):A=this.alignPlaylists(L,z.details)}z.details=L,this.levelLastLoaded=G,!this.startFragRequested&&(this.mainDetails||!L.live)&&this.setStartPosition(z.details,A),this.state===m.State.WAITING_TRACK&&!this.waitForCdnTuneIn(L)&&(this.state=m.State.IDLE),this.tick()},b._handleFragmentLoadProgress=function(w){var T,F=w.frag,N=w.part,L=w.payload,G=this.config,z=this.trackId,A=this.levels;if(!A){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=A[z];console.assert(B,"Audio track is defined on fragment load progress");var U=B.details;console.assert(U,"Audio track details are defined on fragment load progress");var I=G.defaultAudioCodec||B.audioCodec||"mp4a.40.2",K=this.transmuxer;K||(K=this.transmuxer=new a.default(this.hls,h.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var Z=this.initPTS[F.cc],ue=(T=F.initSegment)===null||T===void 0?void 0:T.data;if(Z!==void 0){var de=!1,Ce=N?N.index:-1,Re=Ce!==-1,me=new i.ChunkMetadata(F.level,F.sn,F.stats.chunkCount,L.byteLength,Ce,Re);K.push(L,ue,I,"",F,N,U.totalduration,de,me,Z)}else{l.logger.log("Unknown video PTS for cc "+F.cc+", waiting for video PTS before demuxing audio frag "+F.sn+" of ["+U.startSN+" ,"+U.endSN+"],track "+z);var Oe=this.waitingData=this.waitingData||{frag:F,part:N,cache:new c.default,complete:!1},be=Oe.cache;be.push(new Uint8Array(L)),this.waitingVideoCC=this.videoTrackCC,this.state=m.State.WAITING_INIT_PTS}},b._handleFragmentLoadComplete=function(w){if(this.waitingData){this.waitingData.complete=!0;return}R.prototype._handleFragmentLoadComplete.call(this,w)},b.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},b.onBufferCreated=function(w,T){var F=T.tracks.audio;F&&(this.mediaBuffer=F.buffer),T.tracks.video&&(this.videoBuffer=T.tracks.video.buffer)},b.onFragBuffered=function(w,T){var F=T.frag,N=T.part;if(F.type!==h.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(F)){this.warn("Fragment "+F.sn+(N?" p: "+N.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(y.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(F,N)},b.onError=function(w,T){switch(T.details){case f.ErrorDetails.FRAG_LOAD_ERROR:case f.ErrorDetails.FRAG_LOAD_TIMEOUT:case f.ErrorDetails.KEY_LOAD_ERROR:case f.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(h.PlaylistLevelType.AUDIO,T);break;case f.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case f.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==m.State.ERROR&&this.state!==m.State.STOPPED&&(this.state=T.fatal?m.State.ERROR:m.State.IDLE,this.warn(T.details+" while loading frag, switching to "+this.state+" state"));break;case f.ErrorDetails.BUFFER_FULL_ERROR:if(T.parent==="audio"&&(this.state===m.State.PARSING||this.state===m.State.PARSED)){var F=!0,N=this.getFwdBufferInfo(this.mediaBuffer,h.PlaylistLevelType.AUDIO);N&&N.len>.5&&(F=!this.reduceMaxBufferLength(N.len)),F&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,R.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},b.onBufferFlushed=function(w,T){var F=T.type;F===n.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},b._handleTransmuxComplete=function(w){var T,F="audio",N=this.hls,L=w.remuxResult,G=w.chunkMeta,z=this.getCurrentContext(G);if(!z){this.warn("The loading context changed while buffering fragment "+G.sn+" of level "+G.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(G.level);return}var A=z.frag,B=z.part,U=L.audio,I=L.text,K=L.id3,Z=L.initSegment;if(this.fragContextChanged(A))return;if(this.state=m.State.PARSING,this.audioSwitch&&U&&this.completeAudioSwitch(),Z!=null&&Z.tracks&&(this._bufferInitSegment(Z.tracks,A,G),N.trigger(y.Events.FRAG_PARSING_INIT_SEGMENT,{frag:A,id:F,tracks:Z.tracks})),U){var ue=U.startPTS,de=U.endPTS,Ce=U.startDTS,Re=U.endDTS;B&&(B.elementaryStreams[n.ElementaryStreamTypes.AUDIO]={startPTS:ue,endPTS:de,startDTS:Ce,endDTS:Re}),A.setElementaryStreamInfo(n.ElementaryStreamTypes.AUDIO,ue,de,Ce,Re),this.bufferFragmentData(U,A,B,G)}if(K!=null&&(T=K.samples)!==null&&T!==void 0&&T.length){var me=o({frag:A,id:F},K);N.trigger(y.Events.FRAG_PARSING_METADATA,me)}if(I){var Oe=o({frag:A,id:F},I);N.trigger(y.Events.FRAG_PARSING_USERDATA,Oe)}},b._bufferInitSegment=function(w,T,F){if(this.state!==m.State.PARSING)return;w.video&&delete w.video;var N=w.audio;if(!N)return;N.levelCodec=N.codec,N.id="audio",this.log("Init audio buffer, container:"+N.container+", codecs[parsed]=["+N.codec+"]"),this.hls.trigger(y.Events.BUFFER_CODECS,w);var L=N.initSegment;if(L!=null&&L.byteLength){var G={type:"audio",frag:T,part:null,chunkMeta:F,parent:T.type,data:L};this.hls.trigger(y.Events.BUFFER_APPENDING,G)}this.tick()},b.loadFragment=function(w,T,F){var N=this.fragmentTracker.getState(w);this.fragCurrent=w,(this.audioSwitch||N===_.FragmentState.NOT_LOADED||N===_.FragmentState.PARTIAL)&&(w.sn==="initSegment"?this._loadInitSegment(w):T.live&&!Object(M.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=m.State.WAITING_INIT_PTS):(this.startFragRequested=!0,R.prototype.loadFragment.call(this,w,T,F)))},b.completeAudioSwitch=function(){var w=this.hls,T=this.media,F=this.trackId;T&&(this.log("Switching audio track : flushing all audio"),R.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,w.trigger(y.Events.AUDIO_TRACK_SWITCHED,{id:F})},O}(m.default);g.default=p},"./src/controller/audio-track-controller.ts":function(k,g,C){"use strict";C.r(g);var M=C("./src/events.ts"),m=C("./src/errors.ts"),y=C("./src/controller/base-playlist-controller.ts"),S=C("./src/types/loader.ts");function _(a,i){for(var s=0;s<i.length;s++){var d=i[s];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}function t(a,i,s){return i&&_(a.prototype,i),s&&_(a,s),a}function h(a,i){a.prototype=Object.create(i.prototype),a.prototype.constructor=a,n(a,i)}function n(a,i){return n=Object.setPrototypeOf||function(d,f){return d.__proto__=f,d},n(a,i)}var c=function(a){h(i,a);function i(d){var f;return f=a.call(this,d,"[audio-track-controller]")||this,f.tracks=[],f.groupId=null,f.tracksInGroup=[],f.trackId=-1,f.trackName="",f.selectDefaultTrack=!0,f.registerListeners(),f}var s=i.prototype;return s.registerListeners=function(){var f=this.hls;f.on(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),f.on(M.Events.MANIFEST_PARSED,this.onManifestParsed,this),f.on(M.Events.LEVEL_LOADING,this.onLevelLoading,this),f.on(M.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),f.on(M.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),f.on(M.Events.ERROR,this.onError,this)},s.unregisterListeners=function(){var f=this.hls;f.off(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),f.off(M.Events.MANIFEST_PARSED,this.onManifestParsed,this),f.off(M.Events.LEVEL_LOADING,this.onLevelLoading,this),f.off(M.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),f.off(M.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),f.off(M.Events.ERROR,this.onError,this)},s.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,a.prototype.destroy.call(this)},s.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},s.onManifestParsed=function(f,l){this.tracks=l.audioTracks||[]},s.onAudioTrackLoaded=function(f,l){var o=l.id,r=l.details,x=this.tracksInGroup[o];if(!x){this.warn("Invalid audio track id "+o);return}var v=x.details;x.details=l.details,this.log("audioTrack "+o+" loaded ["+r.startSN+"-"+r.endSN+"]"),o===this.trackId&&(this.retryCount=0,this.playlistLoaded(o,l,v))},s.onLevelLoading=function(f,l){this.switchLevel(l.level)},s.onLevelSwitching=function(f,l){this.switchLevel(l.level)},s.switchLevel=function(f){var l=this.hls.levels[f];if(!(l!=null&&l.audioGroupIds))return;var o=l.audioGroupIds[l.urlId];if(this.groupId!==o){this.groupId=o;var r=this.tracks.filter(function(v){return!o||v.groupId===o});this.selectDefaultTrack&&!r.some(function(v){return v.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=r;var x={audioTracks:r};this.log("Updating audio tracks, "+r.length+' track(s) found in "'+o+'" group-id'),this.hls.trigger(M.Events.AUDIO_TRACKS_UPDATED,x),this.selectInitialTrack()}},s.onError=function(f,l){if(a.prototype.onError.call(this,f,l),l.fatal||!l.context)return;l.context.type===S.PlaylistContextType.AUDIO_TRACK&&l.context.id===this.trackId&&l.context.groupId===this.groupId&&this.retryLoadingOrFail(l)},s.setAudioTrack=function(f){var l=this.tracksInGroup;if(f<0||f>=l.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var o=l[this.trackId];this.log("Now switching to audio-track index "+f);var r=l[f],x=r.id,v=r.groupId,p=v===void 0?"":v,R=r.name,O=r.type,b=r.url;if(this.trackId=f,this.trackName=R,this.selectDefaultTrack=!1,this.hls.trigger(M.Events.AUDIO_TRACK_SWITCHING,{id:x,groupId:p,name:R,type:O,url:b}),r.details&&!r.details.live)return;var E=this.switchParams(r.url,o==null?void 0:o.details);this.loadPlaylist(E)},s.selectInitialTrack=function(){var f=this.tracksInGroup;console.assert(f.length,"Initial audio track should be selected when tracks are known");var l=this.trackName,o=this.findTrackId(l)||this.findTrackId();o!==-1?this.setAudioTrack(o):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(M.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},s.findTrackId=function(f){for(var l=this.tracksInGroup,o=0;o<l.length;o++){var r=l[o];if((!this.selectDefaultTrack||r.default)&&(!f||f===r.name))return r.id}return-1},s.loadPlaylist=function(f){var l=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(l)){var o=l.id,r=l.groupId,x=l.url;if(f)try{x=f.addDirectives(x)}catch(v){this.warn("Could not construct new URL with HLS Delivery Directives: "+v)}this.log("loading audio-track playlist for id: "+o),this.clearTimer(),this.hls.trigger(M.Events.AUDIO_TRACK_LOADING,{url:x,id:o,groupId:r,deliveryDirectives:f||null})}},t(i,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(f){this.selectDefaultTrack=!1,this.setAudioTrack(f)}}]),i}(y.default);g.default=c},"./src/controller/base-playlist-controller.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"default",function(){return t});var M=C("./src/polyfills/number.ts"),m=C("./src/types/level.ts"),y=C("./src/controller/level-helper.ts"),S=C("./src/utils/logger.ts"),_=C("./src/errors.ts"),t=function(){function h(c,a){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=S.logger.log.bind(S.logger,a+":"),this.warn=S.logger.warn.bind(S.logger,a+":"),this.hls=c}var n=h.prototype;return n.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},n.onError=function(a,i){i.fatal&&i.type===_.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},n.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},n.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},n.stopLoad=function(){this.canLoad=!1,this.clearTimer()},n.switchParams=function(a,i){var s=i==null?void 0:i.renditionReports;if(s)for(var d=0;d<s.length;d++){var f=s[d],l=""+f.URI;if(l===a.substr(-l.length)){var o=parseInt(f["LAST-MSN"]),r=parseInt(f["LAST-PART"]);if(i&&this.hls.config.lowLatencyMode){var x=Math.min(i.age-i.partTarget,i.targetduration);r!==void 0&&x>i.partTarget&&(r+=1)}if(Object(M.isFiniteNumber)(o))return new m.HlsUrlParameters(o,Object(M.isFiniteNumber)(r)?r:void 0,m.HlsSkip.No)}}},n.loadPlaylist=function(a){},n.shouldLoadTrack=function(a){return this.canLoad&&a&&!!a.url&&(!a.details||a.details.live)},n.playlistLoaded=function(a,i,s){var d=this,f=i.details,l=i.stats,o=l.loading.end?Math.max(0,self.performance.now()-l.loading.end):0;if(f.advancedDateTime=Date.now()-o,f.live||s!=null&&s.live){if(f.reloaded(s),s&&this.log("live playlist "+a+" "+(f.advanced?"REFRESHED "+f.lastPartSn+"-"+f.lastPartIndex:"MISSED")),s&&f.fragments.length>0&&Object(y.mergeDetails)(s,f),!this.canLoad||!f.live)return;var r,x=void 0,v=void 0;if(f.canBlockReload&&f.endSN&&f.advanced){var p=this.hls.config.lowLatencyMode,R=f.lastPartSn,O=f.endSN,b=f.lastPartIndex,E=b!==-1,w=R===O,T=p?0:b;E?(x=w?O+1:R,v=w?T:b+1):x=O+1;var F=f.age,N=F+f.ageHeader,L=Math.min(N-f.partTarget,f.targetduration*1.5);if(L>0){if(s&&L>s.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+s.tuneInGoal+" to: "+L+" with playlist age: "+f.age),L=0;else{var G=Math.floor(L/f.targetduration);if(x+=G,v!==void 0){var z=Math.round(L%f.targetduration/f.partTarget);v+=z}this.log("CDN Tune-in age: "+f.ageHeader+"s last advanced "+F.toFixed(2)+"s goal: "+L+" skip sn "+G+" to part "+v)}f.tuneInGoal=L}if(r=this.getDeliveryDirectives(f,i.deliveryDirectives,x,v),p||!w){this.loadPlaylist(r);return}}else r=this.getDeliveryDirectives(f,i.deliveryDirectives,x,v);var A=Object(y.computeReloadInterval)(f,l);x!==void 0&&f.canBlockReload&&(A-=f.partTarget||1),this.log("reload live playlist "+a+" in "+Math.round(A)+" ms"),this.timer=self.setTimeout(function(){return d.loadPlaylist(r)},A)}else this.clearTimer()},n.getDeliveryDirectives=function(a,i,s,d){var f=Object(m.getSkipValue)(a,s);return i!=null&&i.skip&&a.deltaUpdateFailed&&(s=i.msn,d=i.part,f=m.HlsSkip.No),new m.HlsUrlParameters(s,d,f)},n.retryLoadingOrFail=function(a){var i=this,s=this.hls.config,d=this.retryCount<s.levelLoadingMaxRetry;if(d){var f;if(this.retryCount++,a.details.indexOf("LoadTimeOut")>-1&&(f=a.context)!==null&&f!==void 0&&f.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+a.details+'"'),this.loadPlaylist();else{var l=Math.min(Math.pow(2,this.retryCount)*s.levelLoadingRetryDelay,s.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return i.loadPlaylist()},l),this.warn("retry playlist loading #"+this.retryCount+" in "+l+' ms after "'+a.details+'"')}}else this.warn('cannot recover from error "'+a.details+'"'),this.clearTimer(),a.fatal=!0;return d},h}()},"./src/controller/base-stream-controller.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"State",function(){return O}),C.d(g,"default",function(){return b});var M=C("./src/polyfills/number.ts"),m=C("./src/task-loop.ts"),y=C("./src/controller/fragment-tracker.ts"),S=C("./src/utils/buffer-helper.ts"),_=C("./src/utils/logger.ts"),t=C("./src/events.ts"),h=C("./src/errors.ts"),n=C("./src/types/transmuxer.ts"),c=C("./src/utils/mp4-tools.ts"),a=C("./src/utils/discontinuities.ts"),i=C("./src/controller/fragment-finders.ts"),s=C("./src/controller/level-helper.ts"),d=C("./src/loader/fragment-loader.ts"),f=C("./src/crypt/decrypter.ts"),l=C("./src/utils/time-ranges.ts"),o=C("./src/types/loader.ts");function r(E,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(E,F.key,F)}}function x(E,w,T){return w&&r(E.prototype,w),T&&r(E,T),E}function v(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}function p(E,w){E.prototype=Object.create(w.prototype),E.prototype.constructor=E,R(E,w)}function R(E,w){return R=Object.setPrototypeOf||function(F,N){return F.__proto__=N,F},R(E,w)}var O={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BACKTRACKING:"BACKTRACKING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},b=function(E){p(w,E);function w(F,N,L){var G;return G=E.call(this)||this,G.hls=void 0,G.fragPrevious=null,G.fragCurrent=null,G.fragmentTracker=void 0,G.transmuxer=null,G._state=O.STOPPED,G.media=void 0,G.mediaBuffer=void 0,G.config=void 0,G.bitrateTest=!1,G.lastCurrentTime=0,G.nextLoadPosition=0,G.startPosition=0,G.loadedmetadata=!1,G.fragLoadError=0,G.retryDate=0,G.levels=null,G.fragmentLoader=void 0,G.levelLastLoaded=null,G.startFragRequested=!1,G.decrypter=void 0,G.initPTS=[],G.onvseeking=null,G.onvended=null,G.logPrefix="",G.log=void 0,G.warn=void 0,G.logPrefix=L,G.log=_.logger.log.bind(_.logger,L+":"),G.warn=_.logger.warn.bind(_.logger,L+":"),G.hls=F,G.fragmentLoader=new d.default(F.config),G.fragmentTracker=N,G.config=F.config,G.decrypter=new f.default(F,F.config),F.on(t.Events.KEY_LOADED,G.onKeyLoaded,v(G)),G}var T=w.prototype;return T.doTick=function(){this.onTickEnd()},T.onTickEnd=function(){},T.startLoad=function(N){},T.stopLoad=function(){this.fragmentLoader.abort();var N=this.fragCurrent;N&&this.fragmentTracker.removeFragment(N),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=O.STOPPED},T._streamEnded=function(N,L){var G=this.fragCurrent,z=this.fragmentTracker;if(!L.live&&G&&G.sn===L.endSN&&!N.nextStart){var A=z.getState(G);return A===y.FragmentState.PARTIAL||A===y.FragmentState.OK}return!1},T.onMediaAttached=function(N,L){var G=this.media=this.mediaBuffer=L.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),G.addEventListener("seeking",this.onvseeking),G.addEventListener("ended",this.onvended);var z=this.config;this.levels&&z.autoStartLoad&&this.state===O.STOPPED&&this.startLoad(z.startPosition)},T.onMediaDetaching=function(){var N=this.media;N!=null&&N.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),N&&(N.removeEventListener("seeking",this.onvseeking),N.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 N=this.config,L=this.fragCurrent,G=this.media,z=this.mediaBuffer,A=this.state,B=G?G.currentTime:0,U=S.BufferHelper.bufferInfo(z||G,B,N.maxBufferHole);if(this.log("media seeking to "+(Object(M.isFiniteNumber)(B)?B.toFixed(3):B)+", state: "+A),A===O.ENDED)this.resetLoadingState();else if(L&&!U.len){var I=N.maxFragLookUpTolerance,K=L.start-I,Z=L.start+L.duration+I,ue=B>Z;(B<K||ue)&&(ue&&L.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),L.loader.abort()),this.resetLoadingState())}G&&(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(N,L){if(this.state!==O.KEY_LOADING||L.frag!==this.fragCurrent||!this.levels)return;this.state=O.IDLE;var G=this.levels[L.frag.level].details;G&&this.loadFragment(L.frag,G,L.frag.start)},T.onHandlerDestroying=function(){this.stopLoad(),E.prototype.onHandlerDestroying.call(this)},T.onHandlerDestroyed=function(){this.state=O.STOPPED,this.hls.off(t.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,E.prototype.onHandlerDestroyed.call(this)},T.loadKey=function(N,L){this.log("Loading key for "+N.sn+" of ["+L.startSN+"-"+L.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+N.level),this.state=O.KEY_LOADING,this.fragCurrent=N,this.hls.trigger(t.Events.KEY_LOADING,{frag:N})},T.loadFragment=function(N,L,G){this._loadFragForPlayback(N,L,G)},T._loadFragForPlayback=function(N,L,G){var z=this,A=function(U){if(z.fragContextChanged(N)){z.warn("Fragment "+N.sn+(U.part?" p: "+U.part.index:"")+" of level "+N.level+" was dropped during download."),z.fragmentTracker.removeFragment(N);return}N.stats.chunkCount++,z._handleFragmentLoadProgress(U)};this._doFragLoad(N,L,G,A).then(function(B){if(!B)return;z.fragLoadError=0;var U=z.state;if(z.fragContextChanged(N)){(U===O.FRAG_LOADING||U===O.BACKTRACKING||!z.fragCurrent&&U===O.PARSING)&&(z.fragmentTracker.removeFragment(N),z.state=O.IDLE);return}if("payload"in B&&(z.log("Loaded fragment "+N.sn+" of level "+N.level),z.hls.trigger(t.Events.FRAG_LOADED,B),z.state===O.BACKTRACKING)){z.fragmentTracker.backtrack(N,B),z.resetFragmentLoading(N);return}z._handleFragmentLoadComplete(B)}).catch(function(B){z.warn(B),z.resetFragmentLoading(N)})},T.flushMainBuffer=function(N,L,G){if(G===void 0&&(G=null),!(N-L))return;var z={startOffset:N,endOffset:L,type:G};this.fragLoadError=0,this.hls.trigger(t.Events.BUFFER_FLUSHING,z)},T._loadInitSegment=function(N){var L=this;this._doFragLoad(N).then(function(G){if(!G||L.fragContextChanged(N)||!L.levels)throw new Error("init load aborted");return G}).then(function(G){var z=L.hls,A=G.payload,B=N.decryptdata;if(A&&A.byteLength>0&&B&&B.key&&B.iv&&B.method==="AES-128"){var U=self.performance.now();return L.decrypter.webCryptoDecrypt(new Uint8Array(A),B.key.buffer,B.iv.buffer).then(function(I){var K=self.performance.now();return z.trigger(t.Events.FRAG_DECRYPTED,{frag:N,payload:I,stats:{tstart:U,tdecrypt:K}}),G.payload=I,G})}return G}).then(function(G){var z=L.fragCurrent,A=L.hls,B=L.levels;if(!B)throw new Error("init load aborted, missing levels");var U=B[N.level].details;console.assert(U,"Level details are defined when init segment is loaded");var I=N.stats;L.state=O.IDLE,L.fragLoadError=0,N.data=new Uint8Array(G.payload),I.parsing.start=I.buffering.start=self.performance.now(),I.parsing.end=I.buffering.end=self.performance.now(),G.frag===z&&A.trigger(t.Events.FRAG_BUFFERED,{stats:I,frag:z,part:null,id:N.type}),L.tick()}).catch(function(G){L.warn(G),L.resetFragmentLoading(N)})},T.fragContextChanged=function(N){var L=this.fragCurrent;return!N||!L||N.level!==L.level||N.sn!==L.sn||N.urlId!==L.urlId},T.fragBufferedComplete=function(N,L){var G=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+N.type+" sn: "+N.sn+(L?" part: "+L.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+N.level+" "+l.default.toString(S.BufferHelper.getBuffered(G))),this.state=O.IDLE,this.tick()},T._handleFragmentLoadComplete=function(N){var L=this.transmuxer;if(!L)return;var G=N.frag,z=N.part,A=N.partsLoaded,B=!A||A.length===0||A.some(function(I){return!I}),U=new n.ChunkMetadata(G.level,G.sn,G.stats.chunkCount+1,0,z?z.index:-1,!B);L.flush(U)},T._handleFragmentLoadProgress=function(N){},T._doFragLoad=function(N,L,G,z){var A=this;if(G===void 0&&(G=null),!this.levels)throw new Error("frag load aborted, missing levels");if(G=Math.max(N.start,G||0),this.config.lowLatencyMode&&L){var B=L.partList;if(B&&z){G>N.end&&L.fragmentHint&&(N=L.fragmentHint);var U=this.getNextPart(B,N,G);if(U>-1){var I=B[U];return this.log("Loading part sn: "+N.sn+" p: "+I.index+" cc: "+N.cc+" of playlist ["+L.startSN+"-"+L.endSN+"] parts [0-"+U+"-"+(B.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+N.level+", target: "+parseFloat(G.toFixed(3))),this.nextLoadPosition=I.start+I.duration,this.state=O.FRAG_LOADING,this.hls.trigger(t.Events.FRAG_LOADING,{frag:N,part:B[U],targetBufferTime:G}),this.doFragPartsLoad(N,B,U,z).catch(function(K){return A.handleFragLoadError(K)})}else if(!N.url||this.loadedEndOfParts(B,G))return Promise.resolve(null)}}return this.log("Loading fragment "+N.sn+" cc: "+N.cc+" "+(L?"of ["+L.startSN+"-"+L.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+N.level+", target: "+parseFloat(G.toFixed(3))),Object(M.isFiniteNumber)(N.sn)&&!this.bitrateTest&&(this.nextLoadPosition=N.start+N.duration),this.state=O.FRAG_LOADING,this.hls.trigger(t.Events.FRAG_LOADING,{frag:N,targetBufferTime:G}),this.fragmentLoader.load(N,z).catch(function(K){return A.handleFragLoadError(K)})},T.doFragPartsLoad=function(N,L,G,z){var A=this;return new Promise(function(B,U){var I=[],K=function Z(ue){var de=L[ue];A.fragmentLoader.loadPart(N,de,z).then(function(Ce){I[de.index]=Ce;var Re=Ce.part;A.hls.trigger(t.Events.FRAG_LOADED,Ce);var me=L[ue+1];if(me&&me.fragment===N)Z(ue+1);else return B({frag:N,part:Re,partsLoaded:I})}).catch(U)};K(G)})},T.handleFragLoadError=function(N){var L=N.data;return L&&L.details===h.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(L.frag,L.part):this.hls.trigger(t.Events.ERROR,L),null},T._handleTransmuxerFlush=function(N){var L=this.getCurrentContext(N);if(!L||this.state!==O.PARSING){this.fragCurrent||(this.state=O.IDLE);return}var G=L.frag,z=L.part,A=L.level,B=self.performance.now();G.stats.parsing.end=B,z&&(z.stats.parsing.end=B),this.updateLevelTiming(G,z,A,N.partial)},T.getCurrentContext=function(N){var L=this.levels,G=N.level,z=N.sn,A=N.part;if(!L||!L[G])return this.warn("Levels object was unset while buffering fragment "+z+" of level "+G+". The current chunk will not be buffered."),null;var B=L[G],U=A>-1?Object(s.getPartWith)(B,z,A):null,I=U?U.fragment:Object(s.getFragmentWithSN)(B,z,this.fragCurrent);return I?{frag:I,part:U,level:B}:null},T.bufferFragmentData=function(N,L,G,z){if(!N||this.state!==O.PARSING)return;var A=N.data1,B=N.data2,U=A;if(A&&B&&(U=Object(c.appendUint8Array)(A,B)),!U||!U.length)return;var I={type:N.type,frag:L,part:G,chunkMeta:z,parent:L.type,data:U};this.hls.trigger(t.Events.BUFFER_APPENDING,I),N.dropped&&N.independent&&!G&&this.flushBufferGap(L)},T.flushBufferGap=function(N){var L=this.media;if(!L)return;if(!S.BufferHelper.isBuffered(L,L.currentTime)){this.flushMainBuffer(0,N.start);return}var G=L.currentTime,z=S.BufferHelper.bufferInfo(L,G,0),A=N.duration,B=Math.min(this.config.maxFragLookUpTolerance*2,A*.25),U=Math.max(Math.min(N.start-B,z.end-B),G+B);N.start-U>B&&this.flushMainBuffer(U,N.start)},T.getFwdBufferInfo=function(N,L){var G=this.config,z=this.getLoadPosition();if(!Object(M.isFiniteNumber)(z))return null;var A=S.BufferHelper.bufferInfo(N,z,G.maxBufferHole);if(A.len===0&&A.nextStart!==void 0){var B=this.fragmentTracker.getBufferedFrag(z,L);if(B&&A.nextStart<B.end)return S.BufferHelper.bufferInfo(N,z,Math.max(A.nextStart,G.maxBufferHole))}return A},T.getMaxBufferLength=function(N){var L=this.config,G;return N?G=Math.max(8*L.maxBufferSize/N,L.maxBufferLength):G=L.maxBufferLength,Math.min(G,L.maxMaxBufferLength)},T.reduceMaxBufferLength=function(N){var L=this.config,G=N||L.maxBufferLength;return L.maxMaxBufferLength>=G?(L.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+L.maxMaxBufferLength+"s"),!0):!1},T.getNextFragment=function(N,L){var G,z,A=L.fragments,B=A.length;if(!B)return null;var U=this.config,I=A[0].start,K;if(L.live){var Z=U.initialLiveManifestSize;if(B<Z)return this.warn("Not enough fragments to start playback (have: "+B+", need: "+Z+")"),null;!L.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(K=this.getInitialLiveFragment(L,A),this.startPosition=K?this.hls.liveSyncPosition||K.start:N)}else N<=I&&(K=A[0]);if(!K){var ue=U.lowLatencyMode?L.partEnd:L.fragmentEnd;K=this.getFragmentAtPosition(N,ue,L)}return(G=K)!==null&&G!==void 0&&G.initSegment&&!((z=K)!==null&&z!==void 0&&z.initSegment.data)&&!this.bitrateTest&&(K=K.initSegment),K},T.getNextPart=function(N,L,G){for(var z=-1,A=!1,B=!0,U=0,I=N.length;U<I;U++){var K=N[U];if(B=B&&!K.independent,z>-1&&G<K.start)break;var Z=K.loaded;!Z&&(A||K.independent||B)&&K.fragment===L&&(z=U),A=Z}return z},T.loadedEndOfParts=function(N,L){var G=N[N.length-1];return G&&L>G.start&&G.loaded},T.getInitialLiveFragment=function(N,L){var G=this.fragPrevious,z=null;if(G){if(N.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+G.programDateTime),z=Object(i.findFragmentByPDT)(L,G.endProgramDateTime,this.config.maxFragLookUpTolerance)),!z){var A=G.sn+1;if(A>=N.startSN&&A<=N.endSN){var B=L[A-N.startSN];G.cc===B.cc&&(z=B,this.log("Live playlist, switching playlist, load frag with next SN: "+z.sn))}z||(z=Object(i.findFragWithCC)(L,G.cc),z&&this.log("Live playlist, switching playlist, load frag with same CC: "+z.sn))}}else{var U=this.hls.liveSyncPosition;U!==null&&(z=this.getFragmentAtPosition(U,this.bitrateTest?N.fragmentEnd:N.edge,N))}return z},T.getFragmentAtPosition=function(N,L,G){var z=this.config,A=this.fragPrevious,B=G.fragments,U=G.endSN,I=G.fragmentHint,K=z.maxFragLookUpTolerance,Z=!!(z.lowLatencyMode&&G.partList&&I);Z&&I&&!this.bitrateTest&&(B=B.concat(I),U=I.sn);var ue;if(N<L){var de=N>L-K?0:K;ue=Object(i.findFragmentByPTS)(A,B,N,de)}else ue=B[B.length-1];if(ue){var Ce=ue.sn-G.startSN,Re=A&&ue.level===A.level,me=B[Ce+1],Oe=this.fragmentTracker.getState(ue);if(Oe===y.FragmentState.BACKTRACKED){ue=null;for(var be=Ce;B[be]&&this.fragmentTracker.getState(B[be])===y.FragmentState.BACKTRACKED;)A?ue=B[be--]:ue=B[--be];ue||(ue=me)}else A&&ue.sn===A.sn&&!Z&&(Re&&(ue.sn<U&&this.fragmentTracker.getState(me)!==y.FragmentState.OK?(this.log("SN "+ue.sn+" just loaded, load next one: "+me.sn),ue=me):ue=null))}return ue},T.synchronizeToLiveEdge=function(N){var L=this.config,G=this.media;if(!G)return;var z=this.hls.liveSyncPosition,A=G.currentTime,B=N.fragments[0].start,U=N.edge,I=A>=B-L.maxFragLookUpTolerance&&A<=U;if(z!==null&&G.duration>z&&(A<z||!I)){var K=L.liveMaxLatencyDuration!==void 0?L.liveMaxLatencyDuration:L.liveMaxLatencyDurationCount*N.targetduration;(!I&&G.readyState<4||A<U-K)&&(this.loadedmetadata||(this.nextLoadPosition=z),G.readyState&&(this.warn("Playback: "+A.toFixed(3)+" is located too far from the end of live sliding playlist: "+U+", reset currentTime to : "+z.toFixed(3)),G.currentTime=z))}},T.alignPlaylists=function(N,L){var G=this.levels,z=this.levelLastLoaded,A=this.fragPrevious,B=z!==null?G[z]:null,U=N.fragments.length;if(!U)return this.warn("No fragments in live playlist"),0;var I=N.fragments[0].start,K=!L,Z=N.alignedSliding&&Object(M.isFiniteNumber)(I);if(K||!Z&&!I){Object(a.alignStream)(A,B,N);var ue=N.fragments[0].start;return this.log("Live playlist sliding: "+ue.toFixed(2)+" start-sn: "+(L?L.startSN:"na")+"->"+N.startSN+" prev-sn: "+(A?A.sn:"na")+" fragments: "+U),ue}return I},T.waitForCdnTuneIn=function(N){var L=3;return N.live&&N.canBlockReload&&N.tuneInGoal>Math.max(N.partHoldBack,N.partTarget*L)},T.setStartPosition=function(N,L){var G=this.startPosition;if(G<L&&(G=-1),G===-1||this.lastCurrentTime===-1){var z=N.startTimeOffset;Object(M.isFiniteNumber)(z)?(G=L+z,z<0&&(G+=N.totalduration),G=Math.min(Math.max(L,G),L+N.totalduration),this.log("Start time offset "+z+" found in playlist, adjust startPosition to "+G),this.startPosition=G):N.live?G=this.hls.liveSyncPosition||L:this.startPosition=G=0,this.lastCurrentTime=G}this.nextLoadPosition=G},T.getLoadPosition=function(){var N=this.media,L=0;return this.loadedmetadata&&N?L=N.currentTime:this.nextLoadPosition&&(L=this.nextLoadPosition),L},T.handleFragLoadAborted=function(N,L){this.transmuxer&&N.sn!=="initSegment"&&N.stats.aborted&&(this.warn("Fragment "+N.sn+(L?" part"+L.index:"")+" of level "+N.level+" was aborted"),this.resetFragmentLoading(N))},T.resetFragmentLoading=function(N){(!this.fragCurrent||!this.fragContextChanged(N))&&(this.state=O.IDLE)},T.onFragmentOrKeyLoadError=function(N,L){if(L.fatal)return;var G=L.frag;if(!G||G.type!==N)return;var z=this.fragCurrent;console.assert(z&&G.sn===z.sn&&G.level===z.level&&G.urlId===z.urlId,"Frag load error must match current frag to retry");var A=this.config;if(this.fragLoadError+1<=A.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(G.level))return;var B=Math.min(Math.pow(2,this.fragLoadError)*A.fragLoadingRetryDelay,A.fragLoadingMaxRetryTimeout);this.warn("Fragment "+G.sn+" of "+N+" "+G.level+" failed to load, retrying in "+B+"ms"),this.retryDate=self.performance.now()+B,this.fragLoadError++,this.state=O.FRAG_LOADING_WAITING_RETRY}else L.levelRetry?(N===o.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=O.IDLE):(_.logger.error(L.details+" reaches max retry, redispatch as fatal ..."),L.fatal=!0,this.hls.stopLoad(),this.state=O.ERROR)},T.afterBufferFlushed=function(N,L,G){if(!N)return;var z=S.BufferHelper.getBuffered(N);this.fragmentTracker.detectEvictedFragments(L,z,G),this.state===O.ENDED&&this.resetLoadingState()},T.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=O.IDLE},T.resetLiveStartWhenNotLoaded=function(N){if(!this.loadedmetadata){this.startFragRequested=!1;var L=this.levels?this.levels[N].details:null;if(L!=null&&L.live)return this.startPosition=-1,this.setStartPosition(L,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},T.updateLevelTiming=function(N,L,G,z){var A=this,B=G.details;console.assert(!!B,"level.details must be defined");var U=Object.keys(N.elementaryStreams).reduce(function(I,K){var Z=N.elementaryStreams[K];if(Z){var ue=Z.endPTS-Z.startPTS;if(ue<=0)return A.warn("Could not parse fragment "+N.sn+" "+K+" duration reliably ("+ue+") resetting transmuxer to fallback to playlist timing"),A.resetTransmuxer(),I||!1;var de=z?0:Object(s.updateFragPTSDTS)(B,N,Z.startPTS,Z.endPTS,Z.startDTS,Z.endDTS);return A.hls.trigger(t.Events.LEVEL_PTS_UPDATED,{details:B,level:G,drift:de,type:K,frag:N,start:Z.startPTS,end:Z.endPTS}),!0}return I},!1);U?(this.state=O.PARSED,this.hls.trigger(t.Events.FRAG_PARSED,{frag:N,part:L})):this.resetLoadingState()},T.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},x(w,[{key:"state",get:function(){return this._state},set:function(N){var L=this._state;L!==N&&(this._state=N,this.log(L+"->"+N))}}]),w}(m.default)},"./src/controller/buffer-controller.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"default",function(){return i});var M=C("./src/polyfills/number.ts"),m=C("./src/events.ts"),y=C("./src/utils/logger.ts"),S=C("./src/errors.ts"),_=C("./src/utils/buffer-helper.ts"),t=C("./src/utils/mediasource-helper.ts"),h=C("./src/loader/fragment.ts"),n=C("./src/controller/buffer-operation-queue.ts"),c=Object(t.getMediaSource)(),a=/([ha]vc.)(?:\.[^.,]+)+/,i=function(){function s(f){var l=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var o=l.hls,r=l.media,x=l.mediaSource;y.logger.log("[buffer-controller]: Media source opened"),r&&(l.updateMediaElementDuration(),o.trigger(m.Events.MEDIA_ATTACHED,{media:r})),x&&x.removeEventListener("sourceopen",l._onMediaSourceOpen),l.checkPendingTracks()},this._onMediaSourceClose=function(){y.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){y.logger.log("[buffer-controller]: Media source ended")},this.hls=f,this._initSourceBuffer(),this.registerListeners()}var d=s.prototype;return d.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},d.destroy=function(){this.unregisterListeners(),this.details=null},d.registerListeners=function(){var l=this.hls;l.on(m.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),l.on(m.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.on(m.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.on(m.Events.BUFFER_RESET,this.onBufferReset,this),l.on(m.Events.BUFFER_APPENDING,this.onBufferAppending,this),l.on(m.Events.BUFFER_CODECS,this.onBufferCodecs,this),l.on(m.Events.BUFFER_EOS,this.onBufferEos,this),l.on(m.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),l.on(m.Events.LEVEL_UPDATED,this.onLevelUpdated,this),l.on(m.Events.FRAG_PARSED,this.onFragParsed,this),l.on(m.Events.FRAG_CHANGED,this.onFragChanged,this)},d.unregisterListeners=function(){var l=this.hls;l.off(m.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),l.off(m.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.off(m.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.off(m.Events.BUFFER_RESET,this.onBufferReset,this),l.off(m.Events.BUFFER_APPENDING,this.onBufferAppending,this),l.off(m.Events.BUFFER_CODECS,this.onBufferCodecs,this),l.off(m.Events.BUFFER_EOS,this.onBufferEos,this),l.off(m.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),l.off(m.Events.LEVEL_UPDATED,this.onLevelUpdated,this),l.off(m.Events.FRAG_PARSED,this.onFragParsed,this),l.off(m.Events.FRAG_CHANGED,this.onFragChanged,this)},d._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new n.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},d.onManifestParsed=function(l,o){var r=2;(o.audio&&!o.video||!o.altAudio)&&(r=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=r,this.details=null,y.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},d.onMediaAttaching=function(l,o){var r=this.media=o.media;if(r&&c){var x=this.mediaSource=new c;x.addEventListener("sourceopen",this._onMediaSourceOpen),x.addEventListener("sourceended",this._onMediaSourceEnded),x.addEventListener("sourceclose",this._onMediaSourceClose),r.src=self.URL.createObjectURL(x),this._objectUrl=r.src}},d.onMediaDetaching=function(){var l=this.media,o=this.mediaSource,r=this._objectUrl;if(o){if(y.logger.log("[buffer-controller]: media source detaching"),o.readyState==="open")try{o.endOfStream()}catch(x){y.logger.warn("[buffer-controller]: onMediaDetaching: "+x.message+" while calling endOfStream")}this.onBufferReset(),o.removeEventListener("sourceopen",this._onMediaSourceOpen),o.removeEventListener("sourceended",this._onMediaSourceEnded),o.removeEventListener("sourceclose",this._onMediaSourceClose),l&&(r&&self.URL.revokeObjectURL(r),l.src===r?(l.removeAttribute("src"),l.load()):y.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(m.Events.MEDIA_DETACHED,void 0)},d.onBufferReset=function(){var l=this;this.getSourceBufferTypes().forEach(function(o){var r=l.sourceBuffer[o];try{r&&(l.removeBufferListeners(o),l.mediaSource&&l.mediaSource.removeSourceBuffer(r),l.sourceBuffer[o]=void 0)}catch(x){y.logger.warn("[buffer-controller]: Failed to reset the "+o+" buffer",x)}}),this._initSourceBuffer()},d.onBufferCodecs=function(l,o){var r=this,x=this.getSourceBufferTypes().length;if(Object.keys(o).forEach(function(v){if(x){var p=r.tracks[v];if(p&&typeof p.buffer.changeType=="function"){var R=o[v],O=R.codec,b=R.levelCodec,E=R.container,w=(p.levelCodec||p.codec).replace(a,"$1"),T=(b||O).replace(a,"$1");if(w!==T){var F=E+";codecs="+(b||O);r.appendChangeType(v,F)}}}else r.pendingTracks[v]=o[v]}),x)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},d.appendChangeType=function(l,o){var r=this,x=this.operationQueue,v={execute:function(){var R=r.sourceBuffer[l];R&&(y.logger.log("[buffer-controller]: changing "+l+" sourceBuffer type to "+o),R.changeType(o)),x.shiftAndExecuteNext(l)},onStart:function(){},onComplete:function(){},onError:function(R){y.logger.warn("[buffer-controller]: Failed to change "+l+" SourceBuffer type",R)}};x.append(v,l)},d.onBufferAppending=function(l,o){var r=this,x=this.hls,v=this.operationQueue,p=this.tracks,R=o.data,O=o.type,b=o.frag,E=o.part,w=o.chunkMeta,T=w.buffering[O],F=self.performance.now();T.start=F;var N=b.stats.buffering,L=E?E.stats.buffering:null;N.start===0&&(N.start=F),L&&L.start===0&&(L.start=F);var G=p.audio,z=O==="audio"&&w.id===1&&(G==null?void 0:G.container)==="audio/mpeg",A={execute:function(){if(T.executeStart=self.performance.now(),z){var U=r.sourceBuffer[O];if(U){var I=b.start-U.timestampOffset;Math.abs(I)>=.1&&(y.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+b.start+" (delta: "+I+") sn: "+b.sn+")"),U.timestampOffset=b.start)}}r.appendExecutor(R,O)},onStart:function(){},onComplete:function(){var U=self.performance.now();T.executeEnd=T.end=U,N.first===0&&(N.first=U),L&&L.first===0&&(L.first=U);var I=r.sourceBuffer,K={};for(var Z in I)K[Z]=_.BufferHelper.getBuffered(I[Z]);r.appendError=0,r.hls.trigger(m.Events.BUFFER_APPENDED,{type:O,frag:b,part:E,chunkMeta:w,parent:b.type,timeRanges:K})},onError:function(U){y.logger.error("[buffer-controller]: Error encountered while trying to append to the "+O+" SourceBuffer",U);var I={type:S.ErrorTypes.MEDIA_ERROR,parent:b.type,details:S.ErrorDetails.BUFFER_APPEND_ERROR,err:U,fatal:!1};U.code===DOMException.QUOTA_EXCEEDED_ERR?I.details=S.ErrorDetails.BUFFER_FULL_ERROR:(r.appendError++,I.details=S.ErrorDetails.BUFFER_APPEND_ERROR,r.appendError>x.config.appendErrorMaxRetry&&(y.logger.error("[buffer-controller]: Failed "+x.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),I.fatal=!0)),x.trigger(m.Events.ERROR,I)}};v.append(A,O)},d.onBufferFlushing=function(l,o){var r=this,x=this.operationQueue,v=function(R){return{execute:r.removeExecutor.bind(r,R,o.startOffset,o.endOffset),onStart:function(){},onComplete:function(){r.hls.trigger(m.Events.BUFFER_FLUSHED,{type:R})},onError:function(b){y.logger.warn("[buffer-controller]: Failed to remove from "+R+" SourceBuffer",b)}}};o.type?x.append(v(o.type),o.type):this.getSourceBufferTypes().forEach(function(p){x.append(v(p),p)})},d.onFragParsed=function(l,o){var r=this,x=o.frag,v=o.part,p=[],R=v?v.elementaryStreams:x.elementaryStreams;R[h.ElementaryStreamTypes.AUDIOVIDEO]?p.push("audiovideo"):(R[h.ElementaryStreamTypes.AUDIO]&&p.push("audio"),R[h.ElementaryStreamTypes.VIDEO]&&p.push("video"));var O=function(){var E=self.performance.now();x.stats.buffering.end=E,v&&(v.stats.buffering.end=E);var w=v?v.stats:x.stats;r.hls.trigger(m.Events.FRAG_BUFFERED,{frag:x,part:v,stats:w,id:x.type})};p.length===0&&y.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+x.type+" level: "+x.level+" sn: "+x.sn),this.blockBuffers(O,p)},d.onFragChanged=function(l,o){this.flushBackBuffer()},d.onBufferEos=function(l,o){var r=this,x=this.getSourceBufferTypes().reduce(function(v,p){var R=r.sourceBuffer[p];return(!o.type||o.type===p)&&(R&&!R.ended&&(R.ended=!0,y.logger.log("[buffer-controller]: "+p+" sourceBuffer now EOS"))),v&&!!(!R||R.ended)},!0);x&&this.blockBuffers(function(){var v=r.mediaSource;if(!v||v.readyState!=="open")return;v.endOfStream()})},d.onLevelUpdated=function(l,o){var r=o.details;if(!r.fragments.length)return;this.details=r,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},d.flushBackBuffer=function(){var l=this.hls,o=this.details,r=this.media,x=this.sourceBuffer;if(!r||o===null)return;var v=this.getSourceBufferTypes();if(!v.length)return;var p=o.live&&l.config.liveBackBufferLength!==null?l.config.liveBackBufferLength:l.config.backBufferLength;if(!Object(M.isFiniteNumber)(p)||p<0)return;var R=r.currentTime,O=o.levelTargetDuration,b=Math.max(p,O),E=Math.floor(R/O)*O-b;v.forEach(function(w){var T=x[w];if(T){var F=_.BufferHelper.getBuffered(T);F.length>0&&E>F.start(0)&&(l.trigger(m.Events.BACK_BUFFER_REACHED,{bufferEnd:E}),o.live&&l.trigger(m.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:E}),l.trigger(m.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:E,type:w}))}})},d.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var l=this.details,o=this.hls,r=this.media,x=this.mediaSource,v=l.fragments[0].start+l.totalduration,p=r.duration,R=Object(M.isFiniteNumber)(x.duration)?x.duration:0;l.live&&o.config.liveDurationInfinity?(y.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),x.duration=Infinity,this.updateSeekableRange(l)):(v>R&&v>p||!Object(M.isFiniteNumber)(p))&&(y.logger.log("[buffer-controller]: Updating Media Source duration to "+v.toFixed(3)),x.duration=v)},d.updateSeekableRange=function(l){var o=this.mediaSource,r=l.fragments,x=r.length;if(x&&l.live&&o!==null&&o!==void 0&&o.setLiveSeekableRange){var v=Math.max(0,r[0].start),p=Math.max(v,v+l.totalduration);o.setLiveSeekableRange(v,p)}},d.checkPendingTracks=function(){var l=this.bufferCodecEventsExpected,o=this.operationQueue,r=this.pendingTracks,x=Object.keys(r).length;if(x&&!l||x===2){this.createSourceBuffers(r),this.pendingTracks={};var v=this.getSourceBufferTypes();if(v.length===0){this.hls.trigger(m.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}v.forEach(function(p){o.executeNext(p)})}},d.createSourceBuffers=function(l){var o=this.sourceBuffer,r=this.mediaSource;if(!r)throw Error("createSourceBuffers called when mediaSource was null");var x=0;for(var v in l)if(!o[v]){var p=l[v];if(!p)throw Error("source buffer exists for track "+v+", however track does not");var R=p.levelCodec||p.codec,O=p.container+";codecs="+R;y.logger.log("[buffer-controller]: creating sourceBuffer("+O+")");try{var b=o[v]=r.addSourceBuffer(O),E=v;this.addBufferListener(E,"updatestart",this._onSBUpdateStart),this.addBufferListener(E,"updateend",this._onSBUpdateEnd),this.addBufferListener(E,"error",this._onSBUpdateError),this.tracks[v]={buffer:b,codec:R,container:p.container,levelCodec:p.levelCodec,id:p.id},x++}catch(w){y.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+w.message),this.hls.trigger(m.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:w,mimeType:O})}}x&&this.hls.trigger(m.Events.BUFFER_CREATED,{tracks:this.tracks})},d._onSBUpdateStart=function(l){var o=this.operationQueue,r=o.current(l);r.onStart()},d._onSBUpdateEnd=function(l){var o=this.operationQueue,r=o.current(l);r.onComplete(),o.shiftAndExecuteNext(l)},d._onSBUpdateError=function(l,o){y.logger.error("[buffer-controller]: "+l+" SourceBuffer error",o),this.hls.trigger(m.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var r=this.operationQueue.current(l);r&&r.onError(o)},d.removeExecutor=function(l,o,r){var x=this.media,v=this.mediaSource,p=this.operationQueue,R=this.sourceBuffer,O=R[l];if(!x||!v||!O){y.logger.warn("[buffer-controller]: Attempting to remove from the "+l+" SourceBuffer, but it does not exist"),p.shiftAndExecuteNext(l);return}var b=Object(M.isFiniteNumber)(x.duration)?x.duration:Infinity,E=Object(M.isFiniteNumber)(v.duration)?v.duration:Infinity,w=Math.max(0,o),T=Math.min(r,b,E);T>w?(y.logger.log("[buffer-controller]: Removing ["+w+","+T+"] from the "+l+" SourceBuffer"),console.assert(!O.updating,l+" sourceBuffer must not be updating"),O.remove(w,T)):p.shiftAndExecuteNext(l)},d.appendExecutor=function(l,o){var r=this.operationQueue,x=this.sourceBuffer,v=x[o];if(!v){y.logger.warn("[buffer-controller]: Attempting to append to the "+o+" SourceBuffer, but it does not exist"),r.shiftAndExecuteNext(o);return}v.ended=!1,console.assert(!v.updating,o+" sourceBuffer must not be updating"),v.appendBuffer(l)},d.blockBuffers=function(l,o){var r=this;if(o===void 0&&(o=this.getSourceBufferTypes()),!o.length){y.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(l);return}var x=this.operationQueue,v=o.map(function(p){return x.appendBlocker(p)});Promise.all(v).then(function(){l(),o.forEach(function(p){var R=r.sourceBuffer[p];(!R||!R.updating)&&x.shiftAndExecuteNext(p)})})},d.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},d.addBufferListener=function(l,o,r){var x=this.sourceBuffer[l];if(!x)return;var v=r.bind(this,l);this.listeners[l].push({event:o,listener:v}),x.addEventListener(o,v)},d.removeBufferListeners=function(l){var o=this.sourceBuffer[l];if(!o)return;this.listeners[l].forEach(function(r){o.removeEventListener(r.event,r.listener)})},s}()},"./src/controller/buffer-operation-queue.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"default",function(){return m});var M=C("./src/utils/logger.ts"),m=function(){function y(_){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=_}var S=y.prototype;return S.append=function(t,h){var n=this.queues[h];n.push(t),n.length===1&&this.buffers[h]&&this.executeNext(h)},S.insertAbort=function(t,h){var n=this.queues[h];n.unshift(t),this.executeNext(h)},S.appendBlocker=function(t){var h,n=new Promise(function(a){h=a}),c={execute:h,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(c,t),n},S.executeNext=function(t){var h=this.buffers,n=this.queues,c=h[t],a=n[t];if(a.length){var i=a[0];try{i.execute()}catch(s){M.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),i.onError(s),(!c||!c.updating)&&(a.shift(),this.executeNext(t))}}},S.shiftAndExecuteNext=function(t){this.queues[t].shift(),this.executeNext(t)},S.current=function(t){return this.queues[t][0]},y}()},"./src/controller/cap-level-controller.ts":function(k,g,C){"use strict";C.r(g);var M=C("./src/events.ts");function m(_,t){for(var h=0;h<t.length;h++){var n=t[h];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(_,n.key,n)}}function y(_,t,h){return t&&m(_.prototype,t),h&&m(_,h),_}var S=function(){function _(h){this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.hls=void 0,this.streamController=void 0,this.clientRect=void 0,this.hls=h,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var t=_.prototype;return t.setStreamController=function(n){this.streamController=n},t.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},t.registerListeners=function(){var n=this.hls;n.on(M.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),n.on(M.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.on(M.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(M.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.on(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},t.unregisterListener=function(){var n=this.hls;n.off(M.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),n.off(M.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.off(M.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(M.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.off(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},t.onFpsDropLevelCapping=function(n,c){_.isLevelAllowed(c.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(c.droppedLevel)},t.onMediaAttaching=function(n,c){this.media=c.media instanceof HTMLVideoElement?c.media:null},t.onManifestParsed=function(n,c){var a=this.hls;this.restrictedLevels=[],this.firstLevel=c.firstLevel,a.config.capLevelToPlayerSize&&c.video&&this.startCapping()},t.onBufferCodecs=function(n,c){var a=this.hls;a.config.capLevelToPlayerSize&&c.video&&this.startCapping()},t.onMediaDetaching=function(){this.stopCapping()},t.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var n=this.hls.levels;if(n.length){var c=this.hls;c.autoLevelCapping=this.getMaxLevel(n.length-1),c.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=c.autoLevelCapping}}},t.getMaxLevel=function(n){var c=this,a=this.hls.levels;if(!a.length)return-1;var i=a.filter(function(s,d){return _.isLevelAllowed(d,c.restrictedLevels)&&d<=n});return this.clientRect=null,_.getMaxLevelByMediaSize(i,this.mediaWidth,this.mediaHeight)},t.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()},t.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},t.getDimensions=function(){if(this.clientRect)return this.clientRect;var n=this.media,c={width:0,height:0};if(n){var a=n.getBoundingClientRect();c.width=a.width,c.height=a.height,!c.width&&!c.height&&(c.width=a.right-a.left||n.width||0,c.height=a.bottom-a.top||n.height||0)}return this.clientRect=c,c},_.isLevelAllowed=function(n,c){return c===void 0&&(c=[]),c.indexOf(n)===-1},_.getMaxLevelByMediaSize=function(n,c,a){if(!n||!n.length)return-1;for(var i=function(o,r){return r?o.width!==r.width||o.height!==r.height:!0},s=n.length-1,d=0;d<n.length;d+=1){var f=n[d];if((f.width>=c||f.height>=a)&&i(f,n[d+1])){s=d;break}}return s},y(_,[{key:"mediaWidth",get:function(){return this.getDimensions().width*_.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*_.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var n=1;try{n=self.devicePixelRatio}catch(c){}return n}}]),_}();g.default=S},"./src/controller/cmcd-controller.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"default",function(){return i});var M=C("./src/events.ts"),m=C("./src/types/cmcd.ts"),y=C("./src/utils/buffer-helper.ts"),S=C("./src/utils/logger.ts");function _(s,d){for(var f=0;f<d.length;f++){var l=d[f];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(s,l.key,l)}}function t(s,d,f){return d&&_(s.prototype,d),f&&_(s,f),s}function h(s,d){var f=typeof Symbol!="undefined"&&s[Symbol.iterator]||s["@@iterator"];if(f)return(f=f.call(s)).next.bind(f);if(Array.isArray(s)||(f=n(s))||d&&s&&typeof s.length=="number"){f&&(s=f);var l=0;return function(){return l>=s.length?{done:!0}:{done:!1,value:s[l++]}}}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 n(s,d){if(!s)return;if(typeof s=="string")return c(s,d);var f=Object.prototype.toString.call(s).slice(8,-1);if(f==="Object"&&s.constructor&&(f=s.constructor.name),f==="Map"||f==="Set")return Array.from(s);if(f==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f))return c(s,d)}function c(s,d){(d==null||d>s.length)&&(d=s.length);for(var f=0,l=new Array(d);f<d;f++)l[f]=s[f];return l}function a(){return a=Object.assign||function(s){for(var d=1;d<arguments.length;d++){var f=arguments[d];for(var l in f)Object.prototype.hasOwnProperty.call(f,l)&&(s[l]=f[l])}return s},a.apply(this,arguments)}var i=function(){function s(f){var l=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(){l.initialized&&(l.starved=!0),l.buffering=!0},this.onPlaying=function(){l.initialized||(l.initialized=!0),l.buffering=!1},this.applyPlaylistData=function(x){try{l.apply(x,{ot:m.CMCDObjectType.MANIFEST,su:!l.initialized})}catch(v){S.logger.warn("Could not generate manifest CMCD data.",v)}},this.applyFragmentData=function(x){try{var v=x.frag,p=l.hls.levels[v.level],R=l.getObjectType(v),O={d:v.duration*1e3,ot:R};(R===m.CMCDObjectType.VIDEO||R===m.CMCDObjectType.AUDIO||R==m.CMCDObjectType.MUXED)&&(O.br=p.bitrate/1e3,O.tb=l.getTopBandwidth(R),O.bl=l.getBufferLength(R)),l.apply(x,O)}catch(b){S.logger.warn("Could not generate segment CMCD data.",b)}},this.hls=f;var o=this.config=f.config,r=o.cmcd;r!=null&&(o.pLoader=this.createPlaylistLoader(),o.fLoader=this.createFragmentLoader(),this.sid=r.sessionId||s.uuid(),this.cid=r.contentId,this.useHeaders=r.useHeaders===!0,this.registerListeners())}var d=s.prototype;return d.registerListeners=function(){var l=this.hls;l.on(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.on(M.Events.MEDIA_DETACHED,this.onMediaDetached,this),l.on(M.Events.BUFFER_CREATED,this.onBufferCreated,this)},d.unregisterListeners=function(){var l=this.hls;l.off(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.off(M.Events.MEDIA_DETACHED,this.onMediaDetached,this),l.off(M.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},d.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},d.onMediaAttached=function(l,o){this.media=o.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},d.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},d.onBufferCreated=function(l,o){var r,x;this.audioBuffer=(r=o.tracks.audio)===null||r===void 0?void 0:r.buffer,this.videoBuffer=(x=o.tracks.video)===null||x===void 0?void 0:x.buffer},d.createData=function(){var l;return{v:m.CMCDVersion,sf:m.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(l=this.media)===null||l===void 0?void 0:l.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},d.apply=function(l,o){o===void 0&&(o={}),a(o,this.createData());var r=o.ot===m.CMCDObjectType.INIT||o.ot===m.CMCDObjectType.VIDEO||o.ot===m.CMCDObjectType.MUXED;if(this.starved&&r&&(o.bs=!0,o.su=!0,this.starved=!1),o.su==null&&(o.su=this.buffering),this.useHeaders){var x=s.toHeaders(o);if(!Object.keys(x).length)return;l.headers||(l.headers={}),a(l.headers,x)}else{var v=s.toQuery(o);if(!v)return;l.url=s.appendQueryToUri(l.url,v)}},d.getObjectType=function(l){var o=l.type;return o==="subtitle"?m.CMCDObjectType.TIMED_TEXT:l.sn==="initSegment"?m.CMCDObjectType.INIT:o==="audio"?m.CMCDObjectType.AUDIO:o==="main"?this.hls.audioTracks.length?m.CMCDObjectType.VIDEO:m.CMCDObjectType.MUXED:void 0},d.getTopBandwidth=function(l){for(var o=0,r=l===m.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,x=h(r),v;!(v=x()).done;){var p=v.value;p.bitrate>o&&(o=p.bitrate)}return o>0?o:NaN},d.getBufferLength=function(l){var o=this.hls.media,r=l===m.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!r||!o)return NaN;var x=y.BufferHelper.bufferInfo(r,o.currentTime,this.config.maxBufferHole);return x.len*1e3},d.createPlaylistLoader=function(){var l=this.config.pLoader,o=this.applyPlaylistData,r=l||this.config.loader;return function(){function x(p){this.loader=void 0,this.loader=new r(p)}var v=x.prototype;return v.destroy=function(){this.loader.destroy()},v.abort=function(){this.loader.abort()},v.load=function(R,O,b){o(R),this.loader.load(R,O,b)},t(x,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),x}()},d.createFragmentLoader=function(){var l=this.config.fLoader,o=this.applyFragmentData,r=l||this.config.loader;return function(){function x(p){this.loader=void 0,this.loader=new r(p)}var v=x.prototype;return v.destroy=function(){this.loader.destroy()},v.abort=function(){this.loader.abort()},v.load=function(R,O,b){o(R),this.loader.load(R,O,b)},t(x,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),x}()},s.uuid=function(){var l=URL.createObjectURL(new Blob),o=l.toString();return URL.revokeObjectURL(l),o.substr(o.lastIndexOf("/")+1)},s.serialize=function(l){for(var o=[],r=function(z){return!Number.isNaN(z)&&z!=null&&z!==""&&z!==!1},x=function(z){return Math.round(z)},v=function(z){return x(z/100)*100},p=function(z){return encodeURIComponent(z)},R={br:x,d:x,bl:v,dl:v,mtp:v,nor:p,rtp:v,tb:x},O=Object.keys(l||{}).sort(),b=h(O),E;!(E=b()).done;){var w=E.value,T=l[w];if(!r(T))continue;if(w==="v"&&T===1)continue;if(w=="pr"&&T===1)continue;var F=R[w];F&&(T=F(T));var N=typeof T,L=void 0;w==="ot"||w==="sf"||w==="st"?L=w+"="+T:N==="boolean"?L=w:N==="number"?L=w+"="+T:L=w+"="+JSON.stringify(T),o.push(L)}return o.join(",")},s.toHeaders=function(l){for(var o=Object.keys(l),r={},x=["Object","Request","Session","Status"],v=[{},{},{},{}],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},R=0,O=o;R<O.length;R++){var b=O[R],E=p[b]!=null?p[b]:1;v[E][b]=l[b]}for(var w=0;w<v.length;w++){var T=s.serialize(v[w]);T&&(r["CMCD-"+x[w]]=T)}return r},s.toQuery=function(l){return"CMCD="+encodeURIComponent(s.serialize(l))},s.appendQueryToUri=function(l,o){if(!o)return l;var r=l.includes("?")?"&":"?";return""+l+r+o},s}()},"./src/controller/eme-controller.ts":function(k,g,C){"use strict";C.r(g);var M=C("./src/events.ts"),m=C("./src/errors.ts"),y=C("./src/utils/logger.ts"),S=C("./src/utils/mediakeys-helper.ts");function _(i,s){for(var d=0;d<s.length;d++){var f=s[d];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(i,f.key,f)}}function t(i,s,d){return s&&_(i.prototype,s),d&&_(i,d),i}var h=3,n=function(s,d,f){var l={audioCapabilities:[],videoCapabilities:[]};return s.forEach(function(o){l.audioCapabilities.push({contentType:'audio/mp4; codecs="'+o+'"',robustness:f.audioRobustness||""})}),d.forEach(function(o){l.videoCapabilities.push({contentType:'video/mp4; codecs="'+o+'"',robustness:f.videoRobustness||""})}),[l]},c=function(s,d,f,l){switch(s){case S.KeySystems.WIDEVINE:return n(d,f,l);default:throw new Error("Unknown key-system: "+s)}},a=function(){function i(d){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=d,this._config=d.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 s=i.prototype;return s.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},s._registerListeners=function(){this.hls.on(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(M.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(M.Events.MANIFEST_PARSED,this.onManifestParsed,this)},s._unregisterListeners=function(){this.hls.off(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(M.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(M.Events.MANIFEST_PARSED,this.onManifestParsed,this)},s.getLicenseServerUrl=function(f){switch(f){case S.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+f+'"')},s._attemptKeySystemAccess=function(f,l,o){var r=this,x=c(f,l,o,this._drmSystemOptions);y.logger.log("Requesting encrypted media key-system access");var v=this.requestMediaKeySystemAccess(f,x);this.mediaKeysPromise=v.then(function(p){return r._onMediaKeySystemAccessObtained(f,p)}),v.catch(function(p){y.logger.error('Failed to obtain key-system "'+f+'" access:',p)})},s._onMediaKeySystemAccessObtained=function(f,l){var o=this;y.logger.log('Access for key-system "'+f+'" obtained');var r={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:l,mediaKeySystemDomain:f};this._mediaKeysList.push(r);var x=Promise.resolve().then(function(){return l.createMediaKeys()}).then(function(v){return r.mediaKeys=v,y.logger.log('Media-keys created for key-system "'+f+'"'),o._onMediaKeysCreated(),v});return x.catch(function(v){y.logger.error("Failed to create media-keys:",v)}),x},s._onMediaKeysCreated=function(){var f=this;this._mediaKeysList.forEach(function(l){l.mediaKeysSession||(l.mediaKeysSession=l.mediaKeys.createSession(),f._onNewMediaKeySession(l.mediaKeysSession))})},s._onNewMediaKeySession=function(f){var l=this;y.logger.log("New key-system session "+f.sessionId),f.addEventListener("message",function(o){l._onKeySessionMessage(f,o.message)},!1)},s._onKeySessionMessage=function(f,l){y.logger.log("Got EME message event, creating license request"),this._requestLicense(l,function(o){y.logger.log("Received license data (length: "+(o&&o.byteLength)+"), updating key-session"),f.update(o)})},s.onMediaEncrypted=function(f){var l=this;if(y.logger.log('Media is encrypted using "'+f.initDataType+'" init data type'),!this.mediaKeysPromise){y.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(M.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var o=function(x){if(!l._media)return;l._attemptSetMediaKeys(x),l._generateRequestWithPreferredKeySession(f.initDataType,f.initData)};this.mediaKeysPromise.then(o).catch(o)},s._attemptSetMediaKeys=function(f){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var l=this._mediaKeysList[0];if(!l||!l.mediaKeys){y.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(M.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}y.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(l.mediaKeys),this._hasSetMediaKeys=!0}},s._generateRequestWithPreferredKeySession=function(f,l){var o=this,r=this._mediaKeysList[0];if(!r){y.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(M.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(r.mediaKeysSessionInitialized){y.logger.warn("Key-Session already initialized but requested again");return}var x=r.mediaKeysSession;if(!x){y.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(M.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!l){y.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(M.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}y.logger.log('Generating key-session request for "'+f+'" init data type'),r.mediaKeysSessionInitialized=!0,x.generateRequest(f,l).then(function(){y.logger.debug("Key-session generation succeeded")}).catch(function(v){y.logger.error("Error generating key-session request:",v),o.hls.trigger(M.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},s._createLicenseXhr=function(f,l,o){var r=new XMLHttpRequest;r.responseType="arraybuffer",r.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,r,f,l,o);var x=this._licenseXhrSetup;if(x)try{x.call(this.hls,r,f),x=void 0}catch(v){y.logger.error(v)}try{r.readyState||r.open("POST",f,!0),x&&x.call(this.hls,r,f)}catch(v){throw new Error("issue setting up KeySystem license XHR "+v)}return r},s._onLicenseRequestReadyStageChange=function(f,l,o,r){switch(f.readyState){case 4:if(f.status===200){this._requestLicenseFailureCount=0,y.logger.log("License request succeeded");var x=f.response,v=this._licenseResponseCallback;if(v)try{x=v.call(this.hls,f,l)}catch(R){y.logger.error(R)}r(x)}else{if(y.logger.error("License Request XHR failed ("+l+"). Status: "+f.status+" ("+f.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>h){this.hls.trigger(M.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var p=h-this._requestLicenseFailureCount+1;y.logger.warn("Retrying license request, "+p+" attempts left"),this._requestLicense(o,r)}break}},s._generateLicenseRequestChallenge=function(f,l){switch(f.mediaKeySystemDomain){case S.KeySystems.WIDEVINE:return l}throw new Error("unsupported key-system: "+f.mediaKeySystemDomain)},s._requestLicense=function(f,l){y.logger.log("Requesting content license for key-system");var o=this._mediaKeysList[0];if(!o){y.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(M.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var r=this.getLicenseServerUrl(o.mediaKeySystemDomain),x=this._createLicenseXhr(r,f,l);y.logger.log("Sending license request to URL: "+r);var v=this._generateLicenseRequestChallenge(o,f);x.send(v)}catch(p){y.logger.error("Failure requesting DRM license: "+p),this.hls.trigger(M.Events.ERROR,{type:m.ErrorTypes.KEY_SYSTEM_ERROR,details:m.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},s.onMediaAttached=function(f,l){if(!this._emeEnabled)return;var o=l.media;this._media=o,o.addEventListener("encrypted",this._onMediaEncrypted)},s.onMediaDetached=function(){var f=this._media,l=this._mediaKeysList;if(!f)return;f.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(l.map(function(o){if(o.mediaKeysSession)return o.mediaKeysSession.close().catch(function(){})})).then(function(){return f.setMediaKeys(null)}).catch(function(){})},s.onManifestParsed=function(f,l){if(!this._emeEnabled)return;var o=l.levels.map(function(x){return x.audioCodec}).filter(function(x){return!!x}),r=l.levels.map(function(x){return x.videoCodec}).filter(function(x){return!!x});this._attemptKeySystemAccess(S.KeySystems.WIDEVINE,o,r)},t(i,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),i}();g.default=a},"./src/controller/fps-controller.ts":function(k,g,C){"use strict";C.r(g);var M=C("./src/events.ts"),m=C("./src/utils/logger.ts"),y=function(){function S(t){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=t,this.registerListeners()}var _=S.prototype;return _.setStreamController=function(h){this.streamController=h},_.registerListeners=function(){this.hls.on(M.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},_.unregisterListeners=function(){this.hls.off(M.Events.MEDIA_ATTACHING,this.onMediaAttaching)},_.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},_.onMediaAttaching=function(h,n){var c=this.hls.config;if(c.capLevelOnFPSDrop){var a=n.media instanceof self.HTMLVideoElement?n.media:null;this.media=a,a&&typeof a.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),c.fpsDroppedMonitoringPeriod)}},_.checkFPS=function(h,n,c){var a=performance.now();if(n){if(this.lastTime){var i=a-this.lastTime,s=c-this.lastDroppedFrames,d=n-this.lastDecodedFrames,f=1e3*s/i,l=this.hls;if(l.trigger(M.Events.FPS_DROP,{currentDropped:s,currentDecoded:d,totalDroppedFrames:c}),f>0&&s>l.config.fpsDroppedMonitoringThreshold*d){var o=l.currentLevel;m.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+o),o>0&&(l.autoLevelCapping===-1||l.autoLevelCapping>=o)&&(o=o-1,l.trigger(M.Events.FPS_DROP_LEVEL_CAPPING,{level:o,droppedLevel:l.currentLevel}),l.autoLevelCapping=o,this.streamController.nextLevelSwitch())}}this.lastTime=a,this.lastDroppedFrames=c,this.lastDecodedFrames=n}},_.checkFPSInterval=function(){var h=this.media;if(h)if(this.isVideoPlaybackQualityAvailable){var n=h.getVideoPlaybackQuality();this.checkFPS(h,n.totalVideoFrames,n.droppedVideoFrames)}else this.checkFPS(h,h.webkitDecodedFrameCount,h.webkitDroppedFrameCount)},S}();g.default=y},"./src/controller/fragment-finders.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"findFragmentByPDT",function(){return y}),C.d(g,"findFragmentByPTS",function(){return S}),C.d(g,"fragmentWithinToleranceTest",function(){return _}),C.d(g,"pdtWithinToleranceTest",function(){return t}),C.d(g,"findFragWithCC",function(){return h});var M=C("./src/polyfills/number.ts"),m=C("./src/utils/binary-search.ts");function y(n,c,a){if(c===null||!Array.isArray(n)||!n.length||!Object(M.isFiniteNumber)(c))return null;var i=n[0].programDateTime;if(c<(i||0))return null;var s=n[n.length-1].endProgramDateTime;if(c>=(s||0))return null;a=a||0;for(var d=0;d<n.length;++d){var f=n[d];if(t(c,a,f))return f}return null}function S(n,c,a,i){a===void 0&&(a=0),i===void 0&&(i=0);var s=null;if(n?s=c[n.sn-c[0].sn+1]||null:a===0&&c[0].start===0&&(s=c[0]),s&&_(a,i,s)===0)return s;var d=m.default.search(c,_.bind(null,a,i));return d||s}function _(n,c,a){n===void 0&&(n=0),c===void 0&&(c=0);var i=Math.min(c,a.duration+(a.deltaPTS?a.deltaPTS:0));return a.start+a.duration-i<=n?1:a.start-i>n&&a.start?-1:0}function t(n,c,a){var i=Math.min(c,a.duration+(a.deltaPTS?a.deltaPTS:0))*1e3,s=a.endProgramDateTime||0;return s-i>n}function h(n,c){return m.default.search(n,function(a){return a.cc<c?1:a.cc>c?-1:0})}},"./src/controller/fragment-tracker.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"FragmentState",function(){return y}),C.d(g,"FragmentTracker",function(){return S});var M=C("./src/events.ts"),m=C("./src/types/loader.ts"),y;(function(h){h.NOT_LOADED="NOT_LOADED",h.BACKTRACKED="BACKTRACKED",h.APPENDING="APPENDING",h.PARTIAL="PARTIAL",h.OK="OK"})(y||(y={}));var S=function(){function h(c){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=c,this._registerListeners()}var n=h.prototype;return n._registerListeners=function(){var a=this.hls;a.on(M.Events.BUFFER_APPENDED,this.onBufferAppended,this),a.on(M.Events.FRAG_BUFFERED,this.onFragBuffered,this),a.on(M.Events.FRAG_LOADED,this.onFragLoaded,this)},n._unregisterListeners=function(){var a=this.hls;a.off(M.Events.BUFFER_APPENDED,this.onBufferAppended,this),a.off(M.Events.FRAG_BUFFERED,this.onFragBuffered,this),a.off(M.Events.FRAG_LOADED,this.onFragLoaded,this)},n.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},n.getAppendedFrag=function(a,i){if(i===m.PlaylistLevelType.MAIN){var s=this.activeFragment,d=this.activeParts;if(!s)return null;if(d)for(var f=d.length;f--;){var l=d[f],o=l?l.end:s.appendedPTS;if(l.start<=a&&o!==void 0&&a<=o)return f>9&&(this.activeParts=d.slice(f-9)),l}else if(s.start<=a&&s.appendedPTS!==void 0&&a<=s.appendedPTS)return s}return this.getBufferedFrag(a,i)},n.getBufferedFrag=function(a,i){for(var s=this.fragments,d=Object.keys(s),f=d.length;f--;){var l=s[d[f]];if((l==null?void 0:l.body.type)===i&&l.buffered){var o=l.body;if(o.start<=a&&a<=o.end)return o}}return null},n.detectEvictedFragments=function(a,i,s){var d=this;Object.keys(this.fragments).forEach(function(f){var l=d.fragments[f];if(!l)return;if(!l.buffered){l.body.type===s&&d.removeFragment(l.body);return}var o=l.range[a];if(!o)return;o.time.some(function(r){var x=!d.isTimeBuffered(r.startPTS,r.endPTS,i);return x&&d.removeFragment(l.body),x})})},n.detectPartialFragments=function(a){var i=this,s=this.timeRanges,d=a.frag,f=a.part;if(!s||d.sn==="initSegment")return;var l=t(d),o=this.fragments[l];if(!o)return;Object.keys(s).forEach(function(r){var x=d.elementaryStreams[r];if(!x)return;var v=s[r],p=f!==null||x.partial===!0;o.range[r]=i.getBufferedTimes(d,f,p,v)}),o.backtrack=o.loaded=null,Object.keys(o.range).length?o.buffered=!0:this.removeFragment(o.body)},n.fragBuffered=function(a){var i=t(a),s=this.fragments[i];s&&(s.backtrack=s.loaded=null,s.buffered=!0)},n.getBufferedTimes=function(a,i,s,d){for(var f={time:[],partial:s},l=i?i.start:a.start,o=i?i.end:a.end,r=a.minEndPTS||o,x=a.maxStartPTS||l,v=0;v<d.length;v++){var p=d.start(v)-this.bufferPadding,R=d.end(v)+this.bufferPadding;if(x>=p&&r<=R){f.time.push({startPTS:Math.max(l,d.start(v)),endPTS:Math.min(o,d.end(v))});break}else if(l<R&&o>p)f.partial=!0,f.time.push({startPTS:Math.max(l,d.start(v)),endPTS:Math.min(o,d.end(v))});else if(o<=p)break}return f},n.getPartialFragment=function(a){var i=null,s,d,f,l=0,o=this.bufferPadding,r=this.fragments;return Object.keys(r).forEach(function(x){var v=r[x];if(!v)return;_(v)&&(d=v.body.start-o,f=v.body.end+o,a>=d&&a<=f&&(s=Math.min(a-d,f-a),l<=s&&(i=v.body,l=s)))}),i},n.getState=function(a){var i=t(a),s=this.fragments[i];return s?s.buffered?_(s)?y.PARTIAL:y.OK:s.backtrack?y.BACKTRACKED:y.APPENDING:y.NOT_LOADED},n.backtrack=function(a,i){var s=t(a),d=this.fragments[s];if(!d||d.backtrack)return null;var f=d.backtrack=i||d.loaded;return d.loaded=null,f},n.getBacktrackData=function(a){var i=t(a),s=this.fragments[i];if(s){var d,f=s.backtrack;if(f!=null&&(d=f.payload)!==null&&d!==void 0&&d.byteLength)return f;this.removeFragment(a)}return null},n.isTimeBuffered=function(a,i,s){for(var d,f,l=0;l<s.length;l++){if(d=s.start(l)-this.bufferPadding,f=s.end(l)+this.bufferPadding,a>=d&&i<=f)return!0;if(i<=d)return!1}return!1},n.onFragLoaded=function(a,i){var s=i.frag,d=i.part;if(s.sn==="initSegment"||s.bitrateTest||d)return;var f=t(s);this.fragments[f]={body:s,loaded:i,backtrack:null,buffered:!1,range:Object.create(null)}},n.onBufferAppended=function(a,i){var s=this,d=i.frag,f=i.part,l=i.timeRanges;if(d.type===m.PlaylistLevelType.MAIN)if(this.activeFragment=d,f){var o=this.activeParts;o||(this.activeParts=o=[]),o.push(f)}else this.activeParts=null;this.timeRanges=l,Object.keys(l).forEach(function(r){var x=l[r];if(s.detectEvictedFragments(r,x),!f)for(var v=0;v<x.length;v++)d.appendedPTS=Math.max(x.end(v),d.appendedPTS||0)})},n.onFragBuffered=function(a,i){this.detectPartialFragments(i)},n.hasFragment=function(a){var i=t(a);return!!this.fragments[i]},n.removeFragmentsInRange=function(a,i,s){var d=this;Object.keys(this.fragments).forEach(function(f){var l=d.fragments[f];if(!l)return;if(l.buffered){var o=l.body;o.type===s&&o.start<i&&o.end>a&&d.removeFragment(o)}})},n.removeFragment=function(a){var i=t(a);a.stats.loaded=0,a.clearElementaryStreamInfo(),delete this.fragments[i]},n.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},h}();function _(h){var n,c;return h.buffered&&(((n=h.range.video)===null||n===void 0?void 0:n.partial)||((c=h.range.audio)===null||c===void 0?void 0:c.partial))}function t(h){return h.type+"_"+h.level+"_"+h.urlId+"_"+h.sn}},"./src/controller/gap-controller.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"STALL_MINIMUM_DURATION_MS",function(){return _}),C.d(g,"MAX_START_GAP_JUMP",function(){return t}),C.d(g,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return h}),C.d(g,"SKIP_BUFFER_RANGE_START",function(){return n}),C.d(g,"default",function(){return c});var M=C("./src/utils/buffer-helper.ts"),m=C("./src/errors.ts"),y=C("./src/events.ts"),S=C("./src/utils/logger.ts"),_=250,t=2,h=.1,n=.05,c=function(){function a(s,d,f,l){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=s,this.media=d,this.fragmentTracker=f,this.hls=l}var i=a.prototype;return i.destroy=function(){this.hls=this.fragmentTracker=this.media=null},i.poll=function(d){var f=this.config,l=this.media,o=this.stalled,r=l.currentTime,x=l.seeking,v=this.seeking&&!x,p=!this.seeking&&x;if(this.seeking=x,r!==d){if(this.moved=!0,o!==null){if(this.stallReported){var R=self.performance.now()-o;S.logger.warn("playback not stuck anymore @"+r+", after "+Math.round(R)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((p||v)&&(this.stalled=null),l.paused||l.ended||l.playbackRate===0||!M.BufferHelper.getBuffered(l).length)return;var O=M.BufferHelper.bufferInfo(l,r,0),b=O.len>0,E=O.nextStart||0;if(!b&&!E)return;if(x){var w=O.len>t,T=!E||E-r>t&&!this.fragmentTracker.getPartialFragment(r);if(w||T)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var F,N=Math.max(E,O.start||0)-r,L=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,G=L==null||((F=L.details)===null||F===void 0)?void 0:F.live,z=G?L.details.targetduration*2:t;if(N>0&&N<=z){this._trySkipBufferHole(null);return}}var A=self.performance.now();if(o===null){this.stalled=A;return}var B=A-o;!x&&B>=_&&this._reportStall(O.len);var U=M.BufferHelper.bufferInfo(l,r,f.maxBufferHole);this._tryFixBufferStall(U,B)},i._tryFixBufferStall=function(d,f){var l=this.config,o=this.fragmentTracker,r=this.media,x=r.currentTime,v=o.getPartialFragment(x);if(v){var p=this._trySkipBufferHole(v);if(p)return}d.len>l.maxBufferHole&&f>l.highBufferWatchdogPeriod*1e3&&(S.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},i._reportStall=function(d){var f=this.hls,l=this.media,o=this.stallReported;o||(this.stallReported=!0,S.logger.warn("Playback stalling at @"+l.currentTime+" due to low buffer (buffer="+d+")"),f.trigger(y.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:d}))},i._trySkipBufferHole=function(d){for(var f=this.config,l=this.hls,o=this.media,r=o.currentTime,x=0,v=M.BufferHelper.getBuffered(o),p=0;p<v.length;p++){var R=v.start(p);if(r+f.maxBufferHole>=x&&r<R){var O=Math.max(R+n,o.currentTime+h);return S.logger.warn("skipping hole, adjusting currentTime from "+r+" to "+O),this.moved=!0,this.stalled=null,o.currentTime=O,d&&l.trigger(y.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+r+" to "+O,frag:d}),O}x=v.end(p)}return 0},i._tryNudgeBuffer=function(){var d=this.config,f=this.hls,l=this.media,o=l.currentTime,r=(this.nudgeRetry||0)+1;if(this.nudgeRetry=r,r<d.nudgeMaxRetry){var x=o+r*d.nudgeOffset;S.logger.warn("Nudging 'currentTime' from "+o+" to "+x),l.currentTime=x,f.trigger(y.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else S.logger.error("Playhead still not moving while enough data buffered @"+o+" after "+d.nudgeMaxRetry+" nudges"),f.trigger(y.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},a}()},"./src/controller/id3-track-controller.ts":function(k,g,C){"use strict";C.r(g);var M=C("./src/events.ts"),m=C("./src/utils/texttrack-utils.ts"),y=C("./src/demux/id3.ts"),S=.25,_=function(){function t(n){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=n,this._registerListeners()}var h=t.prototype;return h.destroy=function(){this._unregisterListeners()},h._registerListeners=function(){var c=this.hls;c.on(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),c.on(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.on(M.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),c.on(M.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},h._unregisterListeners=function(){var c=this.hls;c.off(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),c.off(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.off(M.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),c.off(M.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},h.onMediaAttached=function(c,a){this.media=a.media},h.onMediaDetaching=function(){if(!this.id3Track)return;Object(m.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},h.getID3Track=function(c){if(!this.media)return;for(var a=0;a<c.length;a++){var i=c[a];if(i.kind==="metadata"&&i.label==="id3")return Object(m.sendAddTrackEvent)(i,this.media),i}return this.media.addTextTrack("metadata","id3")},h.onFragParsingMetadata=function(c,a){if(!this.media)return;var i=a.frag,s=a.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var d=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,f=0;f<s.length;f++){var l=y.getID3Frames(s[f].data);if(l){var o=s[f].pts,r=f<s.length-1?s[f+1].pts:i.end,x=r-o;x<=0&&(r=o+S);for(var v=0;v<l.length;v++){var p=l[v];if(!y.isTimeStampFrame(p)){var R=new d(o,r,"");R.value=p,this.id3Track.addCue(R)}}}}},h.onBufferFlushing=function(c,a){var i=a.startOffset,s=a.endOffset,d=a.type;if(!d||d==="audio"){var f=this.id3Track;f&&Object(m.removeCuesInRange)(f,i,s)}},t}();g.default=_},"./src/controller/latency-controller.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"default",function(){return t});var M=C("./src/errors.ts"),m=C("./src/events.ts"),y=C("./src/utils/logger.ts");function S(h,n){for(var c=0;c<n.length;c++){var a=n[c];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(h,a.key,a)}}function _(h,n,c){return n&&S(h.prototype,n),c&&S(h,c),h}var t=function(){function h(c){var a=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 a.timeupdate()},this.hls=c,this.config=c.config,this.registerListeners()}var n=h.prototype;return n.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},n.registerListeners=function(){this.hls.on(m.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(m.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(m.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(m.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(m.Events.ERROR,this.onError,this)},n.unregisterListeners=function(){this.hls.off(m.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(m.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(m.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(m.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(m.Events.ERROR,this.onError)},n.onMediaAttached=function(a,i){this.media=i.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},n.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},n.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},n.onLevelUpdated=function(a,i){var s=i.details;this.levelDetails=s,s.advanced&&this.timeupdate(),!s.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},n.onError=function(a,i){if(i.details!==M.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,y.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},n.timeupdate=function(){var a=this.media,i=this.levelDetails;if(!a||!i)return;this.currentTime=a.currentTime;var s=this.computeLatency();if(s===null)return;this._latency=s;var d=this.config,f=d.lowLatencyMode,l=d.maxLiveSyncPlaybackRate;if(!f||l===1)return;var o=this.targetLatency;if(o===null)return;var r=s-o,x=Math.min(this.maxLatency,o+i.targetduration),v=r<x;if(i.live&&v&&r>.05&&this.forwardBufferLength>1){var p=Math.min(2,Math.max(1,l)),R=Math.round(2/(1+Math.exp(-.75*r-this.edgeStalled))*20)/20;a.playbackRate=Math.min(p,Math.max(1,R))}else a.playbackRate!==1&&a.playbackRate!==0&&(a.playbackRate=1)},n.estimateLiveEdge=function(){var a=this.levelDetails;return a===null?null:a.edge+a.age},n.computeLatency=function(){var a=this.estimateLiveEdge();return a===null?null:a-this.currentTime},_(h,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var a=this.config,i=this.levelDetails;return a.liveMaxLatencyDuration!==void 0?a.liveMaxLatencyDuration:i?a.liveMaxLatencyDurationCount*i.targetduration:0}},{key:"targetLatency",get:function(){var a=this.levelDetails;if(a===null)return null;var i=a.holdBack,s=a.partHoldBack,d=a.targetduration,f=this.config,l=f.liveSyncDuration,o=f.liveSyncDurationCount,r=f.lowLatencyMode,x=this.hls.userConfig,v=r&&s||i;(x.liveSyncDuration||x.liveSyncDurationCount||v===0)&&(v=l!==void 0?l:o*d);var p=d,R=1;return v+Math.min(this.stallCount*R,p)}},{key:"liveSyncPosition",get:function(){var a=this.estimateLiveEdge(),i=this.targetLatency,s=this.levelDetails;if(a===null||i===null||s===null)return null;var d=s.edge,f=a-i-this.edgeStalled,l=d-s.totalduration,o=d-(this.config.lowLatencyMode&&s.partTarget||s.targetduration);return Math.min(Math.max(l,f),o)}},{key:"drift",get:function(){var a=this.levelDetails;return a===null?1:a.drift}},{key:"edgeStalled",get:function(){var a=this.levelDetails;if(a===null)return 0;var i=(this.config.lowLatencyMode&&a.partTarget||a.targetduration)*3;return Math.max(a.age-i,0)}},{key:"forwardBufferLength",get:function(){var a=this.media,i=this.levelDetails;if(!a||!i)return 0;var s=a.buffered.length;return s?a.buffered.end(s-1):i.edge-this.currentTime}}]),h}()},"./src/controller/level-controller.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"default",function(){return f});var M=C("./src/types/level.ts"),m=C("./src/events.ts"),y=C("./src/errors.ts"),S=C("./src/utils/codecs.ts"),_=C("./src/controller/level-helper.ts"),t=C("./src/controller/base-playlist-controller.ts"),h=C("./src/types/loader.ts");function n(){return n=Object.assign||function(l){for(var o=1;o<arguments.length;o++){var r=arguments[o];for(var x in r)Object.prototype.hasOwnProperty.call(r,x)&&(l[x]=r[x])}return l},n.apply(this,arguments)}function c(l,o){for(var r=0;r<o.length;r++){var x=o[r];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(l,x.key,x)}}function a(l,o,r){return o&&c(l.prototype,o),r&&c(l,r),l}function i(l,o){l.prototype=Object.create(o.prototype),l.prototype.constructor=l,s(l,o)}function s(l,o){return s=Object.setPrototypeOf||function(x,v){return x.__proto__=v,x},s(l,o)}var d=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),f=function(l){i(o,l);function o(x){var v;return v=l.call(this,x,"[level-controller]")||this,v._levels=[],v._firstLevel=-1,v._startLevel=void 0,v.currentLevelIndex=-1,v.manualLevelIndex=-1,v.onParsedComplete=void 0,v._registerListeners(),v}var r=o.prototype;return r._registerListeners=function(){var v=this.hls;v.on(m.Events.MANIFEST_LOADED,this.onManifestLoaded,this),v.on(m.Events.LEVEL_LOADED,this.onLevelLoaded,this),v.on(m.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),v.on(m.Events.FRAG_LOADED,this.onFragLoaded,this),v.on(m.Events.ERROR,this.onError,this)},r._unregisterListeners=function(){var v=this.hls;v.off(m.Events.MANIFEST_LOADED,this.onManifestLoaded,this),v.off(m.Events.LEVEL_LOADED,this.onLevelLoaded,this),v.off(m.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),v.off(m.Events.FRAG_LOADED,this.onFragLoaded,this),v.off(m.Events.ERROR,this.onError,this)},r.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,l.prototype.destroy.call(this)},r.startLoad=function(){var v=this._levels;v.forEach(function(p){p.loadError=0}),l.prototype.startLoad.call(this)},r.onManifestLoaded=function(v,p){var R=[],O=[],b=[],E,w={},T,F=!1,N=!1,L=!1;if(p.levels.forEach(function(B){var U=B.attrs;F=F||!!(B.width&&B.height),N=N||!!B.videoCodec,L=L||!!B.audioCodec,d&&B.audioCodec&&B.audioCodec.indexOf("mp4a.40.34")!==-1&&(B.audioCodec=void 0);var I=B.bitrate+"-"+B.attrs.RESOLUTION+"-"+B.attrs.CODECS;T=w[I],T?T.url.push(B.url):(T=new M.Level(B),w[I]=T,R.push(T)),U&&(U.AUDIO&&Object(_.addGroupId)(T,"audio",U.AUDIO),U.SUBTITLES&&Object(_.addGroupId)(T,"text",U.SUBTITLES))}),(F||N)&&L&&(R=R.filter(function(B){var U=B.videoCodec,I=B.width,K=B.height;return!!U||!!(I&&K)})),R=R.filter(function(B){var U=B.audioCodec,I=B.videoCodec;return(!U||Object(S.isCodecSupportedInMp4)(U,"audio"))&&(!I||Object(S.isCodecSupportedInMp4)(I,"video"))}),p.audioTracks&&(O=p.audioTracks.filter(function(B){return!B.audioCodec||Object(S.isCodecSupportedInMp4)(B.audioCodec,"audio")}),Object(_.assignTrackIdsByGroup)(O)),p.subtitles&&(b=p.subtitles,Object(_.assignTrackIdsByGroup)(b)),R.length>0){E=R[0].bitrate,R.sort(function(B,U){return B.bitrate-U.bitrate}),this._levels=R;for(var G=0;G<R.length;G++)if(R[G].bitrate===E){this._firstLevel=G,this.log("manifest loaded, "+R.length+" level(s) found, first bitrate: "+E);break}var z=L&&!N,A={levels:R,audioTracks:O,subtitleTracks:b,firstLevel:this._firstLevel,stats:p.stats,audio:L,video:N,altAudio:!z&&O.some(function(B){return!!B.url})};this.hls.trigger(m.Events.MANIFEST_PARSED,A),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(m.Events.ERROR,{type:y.ErrorTypes.MEDIA_ERROR,details:y.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:p.url,reason:"no level with compatible codecs found in manifest"})},r.onError=function(v,p){if(l.prototype.onError.call(this,v,p),p.fatal)return;var R=p.context,O=this._levels[this.currentLevelIndex];if(R&&(R.type===h.PlaylistContextType.AUDIO_TRACK&&O.audioGroupIds&&R.groupId===O.audioGroupIds[O.urlId]||R.type===h.PlaylistContextType.SUBTITLE_TRACK&&O.textGroupIds&&R.groupId===O.textGroupIds[O.urlId])){this.redundantFailover(this.currentLevelIndex);return}var b=!1,E=!0,w;switch(p.details){case y.ErrorDetails.FRAG_LOAD_ERROR:case y.ErrorDetails.FRAG_LOAD_TIMEOUT:case y.ErrorDetails.KEY_LOAD_ERROR:case y.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 y.ErrorDetails.LEVEL_LOAD_ERROR:case y.ErrorDetails.LEVEL_LOAD_TIMEOUT:R&&(R.deliveryDirectives&&(E=!1),w=R.level),b=!0;break;case y.ErrorDetails.REMUX_ALLOC_ERROR:w=p.level,b=!0;break}w!==void 0&&this.recoverLevel(p,w,b,E)},r.recoverLevel=function(v,p,R,O){var b=v.details,E=this._levels[p];if(E.loadError++,R){var w=this.retryLoadingOrFail(v);if(w)v.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(O){var T=E.url.length;if(T>1&&E.loadError<T)v.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(b+": switch to "+F),v.levelRetry=!0,this.hls.nextAutoLevel=F)}}},r.redundantFailover=function(v){var p=this._levels[v],R=p.url.length;if(R>1){var O=(p.urlId+1)%R;this.warn("Switching to redundant URL-id "+O),this._levels.forEach(function(b){b.urlId=O}),this.level=v}},r.onFragLoaded=function(v,p){var R=p.frag;if(R!==void 0&&R.type===h.PlaylistLevelType.MAIN){var O=this._levels[R.level];O!==void 0&&(O.fragmentError=0,O.loadError=0)}},r.onLevelLoaded=function(v,p){var R,O=p.level,b=p.details,E=this._levels[O];if(!E){var w;this.warn("Invalid level index "+O),(w=p.deliveryDirectives)!==null&&w!==void 0&&w.skip&&(b.deltaUpdateFailed=!0);return}O===this.currentLevelIndex?(E.fragmentError===0&&(E.loadError=0,this.retryCount=0),this.playlistLoaded(O,p,E.details)):(R=p.deliveryDirectives)!==null&&R!==void 0&&R.skip&&(b.deltaUpdateFailed=!0)},r.onAudioTrackSwitched=function(v,p){var R=this.hls.levels[this.currentLevelIndex];if(!R)return;if(R.audioGroupIds){for(var O=-1,b=this.hls.audioTracks[p.id].groupId,E=0;E<R.audioGroupIds.length;E++)if(R.audioGroupIds[E]===b){O=E;break}O!==R.urlId&&(R.urlId=O,this.startLoad())}},r.loadPlaylist=function(v){var p=this.currentLevelIndex,R=this._levels[p];if(this.canLoad&&R&&R.url.length>0){var O=R.urlId,b=R.url[O];if(v)try{b=v.addDirectives(b)}catch(E){this.warn("Could not construct new URL with HLS Delivery Directives: "+E)}this.log("Attempt loading level index "+p+(v?" at sn "+v.msn+" part "+v.part:"")+" with URL-id "+O+" "+b),this.clearTimer(),this.hls.trigger(m.Events.LEVEL_LOADING,{url:b,level:p,id:O,deliveryDirectives:v||null})}},r.removeLevel=function(v,p){var R=function(E,w){return w!==p},O=this._levels.filter(function(b,E){return E!==v?!0:b.url.length>1&&p!==void 0?(b.url=b.url.filter(R),b.audioGroupIds&&(b.audioGroupIds=b.audioGroupIds.filter(R)),b.textGroupIds&&(b.textGroupIds=b.textGroupIds.filter(R)),b.urlId=0,!0):!1}).map(function(b,E){var w=b.details;return w!=null&&w.fragments&&w.fragments.forEach(function(T){T.level=E}),b});this._levels=O,this.hls.trigger(m.Events.LEVELS_UPDATED,{levels:O})},a(o,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(v){var p,R=this._levels;if(R.length===0)return;if(this.currentLevelIndex===v&&(p=R[v])!==null&&p!==void 0&&p.details)return;if(v<0||v>=R.length){var O=v<0;if(this.hls.trigger(m.Events.ERROR,{type:y.ErrorTypes.OTHER_ERROR,details:y.ErrorDetails.LEVEL_SWITCH_ERROR,level:v,fatal:O,reason:"invalid level idx"}),O)return;v=Math.min(v,R.length-1)}this.clearTimer();var b=this.currentLevelIndex,E=R[b],w=R[v];this.log("switching to level "+v+" from "+b),this.currentLevelIndex=v;var T=n({},w,{level:v,maxBitrate:w.maxBitrate,uri:w.uri,urlId:w.urlId});delete T._urlId,this.hls.trigger(m.Events.LEVEL_SWITCHING,T);var F=w.details;if(!F||F.live){var N=this.switchParams(w.uri,E==null?void 0:E.details);this.loadPlaylist(N)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(v){this.manualLevelIndex=v,this._startLevel===void 0&&(this._startLevel=v),v!==-1&&(this.level=v)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(v){this._firstLevel=v}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var v=this.hls.config.startLevel;return v!==void 0?v:this._firstLevel}else return this._startLevel},set:function(v){this._startLevel=v}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(v){this.level=v,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=v)}}]),o}(t.default)},"./src/controller/level-helper.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"addGroupId",function(){return y}),C.d(g,"assignTrackIdsByGroup",function(){return S}),C.d(g,"updatePTS",function(){return _}),C.d(g,"updateFragPTSDTS",function(){return h}),C.d(g,"mergeDetails",function(){return n}),C.d(g,"mapPartIntersection",function(){return c}),C.d(g,"mapFragmentIntersection",function(){return a}),C.d(g,"adjustSliding",function(){return i}),C.d(g,"addSliding",function(){return s}),C.d(g,"computeReloadInterval",function(){return d}),C.d(g,"getFragmentWithSN",function(){return f}),C.d(g,"getPartWith",function(){return l});var M=C("./src/polyfills/number.ts"),m=C("./src/utils/logger.ts");function y(o,r,x){switch(r){case"audio":o.audioGroupIds||(o.audioGroupIds=[]),o.audioGroupIds.push(x);break;case"text":o.textGroupIds||(o.textGroupIds=[]),o.textGroupIds.push(x);break}}function S(o){var r={};o.forEach(function(x){var v=x.groupId||"";x.id=r[v]=r[v]||0,r[v]++})}function _(o,r,x){var v=o[r],p=o[x];t(v,p)}function t(o,r){var x=r.startPTS;if(Object(M.isFiniteNumber)(x)){var v=0,p;r.sn>o.sn?(v=x-o.start,p=o):(v=o.start-x,p=r),p.duration!==v&&(p.duration=v)}else if(r.sn>o.sn){var R=o.cc===r.cc;R&&o.minEndPTS?r.start=o.start+(o.minEndPTS-o.start):r.start=o.start+o.duration}else r.start=Math.max(o.start-r.duration,0)}function h(o,r,x,v,p,R){var O=v-x;O<=0&&(m.logger.warn("Fragment should have a positive duration",r),v=x+r.duration,R=p+r.duration);var b=x,E=v,w=r.startPTS,T=r.endPTS;if(Object(M.isFiniteNumber)(w)){var F=Math.abs(w-x);Object(M.isFiniteNumber)(r.deltaPTS)?r.deltaPTS=Math.max(F,r.deltaPTS):r.deltaPTS=F,b=Math.max(x,w),x=Math.min(x,w),p=Math.min(p,r.startDTS),E=Math.min(v,T),v=Math.max(v,T),R=Math.max(R,r.endDTS)}r.duration=v-x;var N=x-r.start;r.appendedPTS=v,r.start=r.startPTS=x,r.maxStartPTS=b,r.startDTS=p,r.endPTS=v,r.minEndPTS=E,r.endDTS=R;var L=r.sn;if(!o||L<o.startSN||L>o.endSN)return 0;var G,z=L-o.startSN,A=o.fragments;for(A[z]=r,G=z;G>0;G--)t(A[G],A[G-1]);for(G=z;G<A.length-1;G++)t(A[G],A[G+1]);return o.fragmentHint&&t(A[A.length-1],o.fragmentHint),o.PTSKnown=o.alignedSliding=!0,N}function n(o,r){for(var x=null,v=o.fragments,p=v.length-1;p>=0;p--){var R=v[p].initSegment;if(R){x=R;break}}o.fragmentHint&&delete o.fragmentHint.endPTS;var O=0,b;if(a(o,r,function(G,z){G.relurl&&(O=G.cc-z.cc),Object(M.isFiniteNumber)(G.startPTS)&&Object(M.isFiniteNumber)(G.endPTS)&&(z.start=z.startPTS=G.startPTS,z.startDTS=G.startDTS,z.appendedPTS=G.appendedPTS,z.maxStartPTS=G.maxStartPTS,z.endPTS=G.endPTS,z.endDTS=G.endDTS,z.minEndPTS=G.minEndPTS,z.duration=G.endPTS-G.startPTS,z.duration&&(b=z),r.PTSKnown=r.alignedSliding=!0),z.elementaryStreams=G.elementaryStreams,z.loader=G.loader,z.stats=G.stats,z.urlId=G.urlId,G.initSegment&&(z.initSegment=G.initSegment,x=G.initSegment)}),x){var E=r.fragmentHint?r.fragments.concat(r.fragmentHint):r.fragments;E.forEach(function(G){var z;(!G.initSegment||G.initSegment.relurl===((z=x)===null||z===void 0?void 0:z.relurl))&&(G.initSegment=x)})}if(r.skippedSegments&&(r.deltaUpdateFailed=r.fragments.some(function(G){return!G}),r.deltaUpdateFailed)){m.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var w=r.skippedSegments;w--;)r.fragments.shift();r.startSN=r.fragments[0].sn,r.startCC=r.fragments[0].cc}var T=r.fragments;if(O){m.logger.warn("discontinuity sliding from playlist, take drift into account");for(var F=0;F<T.length;F++)T[F].cc+=O}r.skippedSegments&&(r.startCC=r.fragments[0].cc),c(o.partList,r.partList,function(G,z){z.elementaryStreams=G.elementaryStreams,z.stats=G.stats}),b?h(r,b,b.startPTS,b.endPTS,b.startDTS,b.endDTS):i(o,r),T.length&&(r.totalduration=r.edge-T[0].start),r.driftStartTime=o.driftStartTime,r.driftStart=o.driftStart;var N=r.advancedDateTime;if(r.advanced&&N){var L=r.edge;r.driftStart||(r.driftStartTime=N,r.driftStart=L),r.driftEndTime=N,r.driftEnd=L}else r.driftEndTime=o.driftEndTime,r.driftEnd=o.driftEnd,r.advancedDateTime=o.advancedDateTime}function c(o,r,x){if(o&&r)for(var v=0,p=0,R=o.length;p<=R;p++){var O=o[p],b=r[p+v];O&&b&&O.index===b.index&&O.fragment.sn===b.fragment.sn?x(O,b):v--}}function a(o,r,x){for(var v=r.skippedSegments,p=Math.max(o.startSN,r.startSN)-r.startSN,R=(o.fragmentHint?1:0)+(v?r.endSN:Math.min(o.endSN,r.endSN))-r.startSN,O=r.startSN-o.startSN,b=r.fragmentHint?r.fragments.concat(r.fragmentHint):r.fragments,E=o.fragmentHint?o.fragments.concat(o.fragmentHint):o.fragments,w=p;w<=R;w++){var T=E[O+w],F=b[w];v&&!F&&w<v&&(F=r.fragments[w]=T),T&&F&&x(T,F)}}function i(o,r){var x=r.startSN+r.skippedSegments-o.startSN,v=o.fragments;if(x<0||x>=v.length)return;s(r,v[x].start)}function s(o,r){if(r){for(var x=o.fragments,v=o.skippedSegments;v<x.length;v++)x[v].start+=r;o.fragmentHint&&(o.fragmentHint.start+=r)}}function d(o,r){var x=1e3*o.levelTargetDuration,v=x/2,p=o.age,R=p>0&&p<x*3,O=r.loading.end-r.loading.start,b,E=o.availabilityDelay;if(o.updated===!1)if(R){var w=333*o.misses;b=Math.max(Math.min(v,O*2),w),o.availabilityDelay=(o.availabilityDelay||0)+b}else b=v;else R?(E=Math.min(E||x/2,p),o.availabilityDelay=E,b=E+x-p):b=x-O;return Math.round(b)}function f(o,r,x){if(!o||!o.details)return null;var v=o.details,p=v.fragments[r-v.startSN];return p||(p=v.fragmentHint,p&&p.sn===r?p:r<v.startSN&&x&&x.sn===r?x:null)}function l(o,r,x){if(!o||!o.details)return null;var v=o.details.partList;if(v)for(var p=v.length;p--;){var R=v[p];if(R.index===x&&R.fragment.sn===r)return R}return null}},"./src/controller/stream-controller.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"default",function(){return v});var M=C("./src/polyfills/number.ts"),m=C("./src/controller/base-stream-controller.ts"),y=C("./src/is-supported.ts"),S=C("./src/events.ts"),_=C("./src/utils/buffer-helper.ts"),t=C("./src/controller/fragment-tracker.ts"),h=C("./src/types/loader.ts"),n=C("./src/loader/fragment.ts"),c=C("./src/demux/transmuxer-interface.ts"),a=C("./src/types/transmuxer.ts"),i=C("./src/controller/gap-controller.ts"),s=C("./src/errors.ts"),d=C("./src/utils/logger.ts");function f(p,R){for(var O=0;O<R.length;O++){var b=R[O];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(p,b.key,b)}}function l(p,R,O){return R&&f(p.prototype,R),O&&f(p,O),p}function o(p,R){p.prototype=Object.create(R.prototype),p.prototype.constructor=p,r(p,R)}function r(p,R){return r=Object.setPrototypeOf||function(b,E){return b.__proto__=E,b},r(p,R)}var x=100,v=function(p){o(R,p);function R(b,E){var w;return w=p.call(this,b,E,"[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 O=R.prototype;return O._registerListeners=function(){var E=this.hls;E.on(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),E.on(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),E.on(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),E.on(S.Events.MANIFEST_PARSED,this.onManifestParsed,this),E.on(S.Events.LEVEL_LOADING,this.onLevelLoading,this),E.on(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.on(S.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),E.on(S.Events.ERROR,this.onError,this),E.on(S.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),E.on(S.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),E.on(S.Events.BUFFER_CREATED,this.onBufferCreated,this),E.on(S.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),E.on(S.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),E.on(S.Events.FRAG_BUFFERED,this.onFragBuffered,this)},O._unregisterListeners=function(){var E=this.hls;E.off(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),E.off(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),E.off(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),E.off(S.Events.MANIFEST_PARSED,this.onManifestParsed,this),E.off(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.off(S.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),E.off(S.Events.ERROR,this.onError,this),E.off(S.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),E.off(S.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),E.off(S.Events.BUFFER_CREATED,this.onBufferCreated,this),E.off(S.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),E.off(S.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),E.off(S.Events.FRAG_BUFFERED,this.onFragBuffered,this)},O.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},O.startLoad=function(E){if(this.levels){var w=this.lastCurrentTime,T=this.hls;if(this.stopLoad(),this.setInterval(x),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&&E===-1&&(this.log("Override startPosition with lastCurrentTime @"+w.toFixed(3)),E=w),this.state=m.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=E,this.tick()}else this._forceStartLoad=!0,this.state=m.State.STOPPED},O.stopLoad=function(){this._forceStartLoad=!1,p.prototype.stopLoad.call(this)},O.doTick=function(){switch(this.state){case m.State.IDLE:this.doTickIdle();break;case m.State.WAITING_LEVEL:{var E,w=this.levels,T=this.level,F=w==null||((E=w[T])===null||E===void 0)?void 0:E.details;if(F&&(!F.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(F))break;this.state=m.State.IDLE;break}break}case m.State.FRAG_LOADING_WAITING_RETRY:{var N,L=self.performance.now(),G=this.retryDate;(!G||L>=G||(N=this.media)!==null&&N!==void 0&&N.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=m.State.IDLE)}break;default:break}this.onTickEnd()},O.onTickEnd=function(){p.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},O.doTickIdle=function(){var E,w,T=this.hls,F=this.levelLastLoaded,N=this.levels,L=this.media,G=T.config,z=T.nextLoadLevel;if(F===null||!L&&(this.startFragRequested||!G.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!N||!N[z])return;var A=N[z];this.level=T.nextLoadLevel=z;var B=A.details;if(!B||this.state===m.State.WAITING_LEVEL||B.live&&this.levelLastLoaded!==z){this.state=m.State.WAITING_LEVEL;return}var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:L,h.PlaylistLevelType.MAIN);if(U===null)return;var I=U.len,K=this.getMaxBufferLength(A.maxBitrate);if(I>=K)return;if(this._streamEnded(U,B)){var Z={};this.altAudio&&(Z.type="video"),this.hls.trigger(S.Events.BUFFER_EOS,Z),this.state=m.State.ENDED;return}var ue=U.end,de=this.getNextFragment(ue,B);if(this.couldBacktrack&&!this.fragPrevious&&de&&de.sn!=="initSegment"){var Ce=de.sn-B.startSN;Ce>1&&(de=B.fragments[Ce-1],this.fragmentTracker.removeFragment(de))}if(de&&this.fragmentTracker.getState(de)===t.FragmentState.OK&&this.nextLoadPosition>ue){var Re=this.audioOnly&&!this.altAudio?n.ElementaryStreamTypes.AUDIO:n.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(L,Re,h.PlaylistLevelType.MAIN),de=this.getNextFragment(this.nextLoadPosition,B)}if(!de)return;de.initSegment&&!de.initSegment.data&&!this.bitrateTest&&(de=de.initSegment),((E=de.decryptdata)===null||E===void 0?void 0:E.keyFormat)==="identity"&&!((w=de.decryptdata)!==null&&w!==void 0&&w.key)?this.loadKey(de,B):this.loadFragment(de,B,ue)},O.loadFragment=function(E,w,T){var F,N=this.fragmentTracker.getState(E);if(this.fragCurrent=E,N===t.FragmentState.BACKTRACKED){var L=this.fragmentTracker.getBacktrackData(E);if(L){this._handleFragmentLoadProgress(L),this._handleFragmentLoadComplete(L);return}else N=t.FragmentState.NOT_LOADED}N===t.FragmentState.NOT_LOADED||N===t.FragmentState.PARTIAL?E.sn==="initSegment"?this._loadInitSegment(E):this.bitrateTest?(E.bitrateTest=!0,this.log("Fragment "+E.sn+" of level "+E.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(E)):(this.startFragRequested=!0,p.prototype.loadFragment.call(this,E,w,T)):N===t.FragmentState.APPENDING?this.reduceMaxBufferLength(E.duration)&&this.fragmentTracker.removeFragment(E):((F=this.media)===null||F===void 0?void 0:F.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},O.getAppendedFrag=function(E){var w=this.fragmentTracker.getAppendedFrag(E,h.PlaylistLevelType.MAIN);return w&&"fragment"in w?w.fragment:w},O.getBufferedFrag=function(E){return this.fragmentTracker.getBufferedFrag(E,h.PlaylistLevelType.MAIN)},O.followingBufferedFrag=function(E){return E?this.getBufferedFrag(E.end+.5):null},O.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},O.nextLevelSwitch=function(){var E=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&&E){var N=this.hls.nextLoadLevel,L=E[N],G=this.fragLastKbps;G&&this.fragCurrent?T=this.fragCurrent.duration*L.maxBitrate/(1e3*G)+1:T=0}else T=0;var z=this.getBufferedFrag(w.currentTime+T);if(z){var A=this.followingBufferedFrag(z);if(A){this.abortCurrentFrag();var B=A.maxStartPTS?A.maxStartPTS:A.start,U=A.duration,I=Math.max(z.end,B+Math.min(Math.max(U-this.config.maxFragLookUpTolerance,U*.5),U*.75));this.flushMainBuffer(I,Number.POSITIVE_INFINITY)}}}},O.abortCurrentFrag=function(){var E=this.fragCurrent;this.fragCurrent=null,E!=null&&E.loader&&E.loader.abort(),this.state===m.State.KEY_LOADING&&(this.state=m.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},O.flushMainBuffer=function(E,w){p.prototype.flushMainBuffer.call(this,E,w,this.altAudio?"video":null)},O.onMediaAttached=function(E,w){p.prototype.onMediaAttached.call(this,E,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 i.default(this.config,T,this.fragmentTracker,this.hls)},O.onMediaDetaching=function(){var E=this.media;E&&(E.removeEventListener("playing",this.onvplaying),E.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)},O.onMediaPlaying=function(){this.tick()},O.onMediaSeeked=function(){var E=this.media,w=E?E.currentTime:null;Object(M.isFiniteNumber)(w)&&this.log("Media seeked to "+w.toFixed(3)),this.tick()},O.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(S.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},O.onManifestParsed=function(E,w){var T=!1,F=!1,N;w.levels.forEach(function(L){N=L.audioCodec,N&&(N.indexOf("mp4a.40.2")!==-1&&(T=!0),N.indexOf("mp4a.40.5")!==-1&&(F=!0))}),this.audioCodecSwitch=T&&F&&!Object(y.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},O.onLevelLoading=function(E,w){var T=this.levels;if(!T||this.state!==m.State.IDLE)return;var F=T[w.level];(!F.details||F.details.live&&this.levelLastLoaded!==w.level||this.waitForCdnTuneIn(F.details))&&(this.state=m.State.WAITING_LEVEL)},O.onLevelLoaded=function(E,w){var T,F=this.levels,N=w.level,L=w.details,G=L.totalduration;if(!F){this.warn("Levels were reset while loading level "+N);return}this.log("Level "+N+" loaded ["+L.startSN+","+L.endSN+"], cc ["+L.startCC+", "+L.endCC+"] duration:"+G);var z=this.fragCurrent;z&&(this.state===m.State.FRAG_LOADING||this.state===m.State.FRAG_LOADING_WAITING_RETRY)&&(z.level!==w.level&&z.loader&&(this.state=m.State.IDLE,z.loader.abort()));var A=F[N],B=0;if(L.live||(T=A.details)!==null&&T!==void 0&&T.live){if(L.fragments[0]||(L.deltaUpdateFailed=!0),L.deltaUpdateFailed)return;B=this.alignPlaylists(L,A.details)}if(A.details=L,this.levelLastLoaded=N,this.hls.trigger(S.Events.LEVEL_UPDATED,{details:L,level:N}),this.state===m.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(L))return;this.state=m.State.IDLE}this.startFragRequested?L.live&&this.synchronizeToLiveEdge(L):this.setStartPosition(L,B),this.tick()},O._handleFragmentLoadProgress=function(E){var w,T=E.frag,F=E.part,N=E.payload,L=this.levels;if(!L){this.warn("Levels were reset while fragment load was in progress. Fragment "+T.sn+" of level "+T.level+" will not be buffered");return}var G=L[T.level],z=G.details;if(!z){this.warn("Dropping fragment "+T.sn+" of level "+T.level+" after level details were reset");return}var A=G.videoCodec,B=z.PTSKnown||!z.live,U=(w=T.initSegment)===null||w===void 0?void 0:w.data,I=this._getAudioCodec(G),K=this.transmuxer=this.transmuxer||new c.default(this.hls,h.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),Z=F?F.index:-1,ue=Z!==-1,de=new a.ChunkMetadata(T.level,T.sn,T.stats.chunkCount,N.byteLength,Z,ue),Ce=this.initPTS[T.cc];K.push(N,U,I,A,T,F,z.totalduration,B,de,Ce)},O.onAudioTrackSwitching=function(E,w){var T=this.altAudio,F=!!w.url,N=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 L=this.fragCurrent;L!=null&&L.loader&&(this.log("Switching to main audio track, cancel main fragment load"),L.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var G=this.hls;T&&G.trigger(S.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),G.trigger(S.Events.AUDIO_TRACK_SWITCHED,{id:N})}},O.onAudioTrackSwitched=function(E,w){var T=w.id,F=!!this.hls.audioTracks[T].url;if(F){var N=this.videoBuffer;N&&this.mediaBuffer!==N&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=N)}this.altAudio=F,this.tick()},O.onBufferCreated=function(E,w){var T=w.tracks,F,N,L=!1;for(var G in T){var z=T[G];if(z.id==="main"){if(N=G,F=z,G==="video"){var A=T[G];A&&(this.videoBuffer=A.buffer)}}else L=!0}L&&F?(this.log("Alternate track found, use "+N+".buffered to schedule main fragment loading"),this.mediaBuffer=F.buffer):this.mediaBuffer=this.media},O.onFragBuffered=function(E,w){var T=w.frag,F=w.part;if(T&&T.type!==h.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(T)){this.warn("Fragment "+T.sn+(F?" p: "+F.index:"")+" of level "+T.level+" finished buffering, but was aborted. state: "+this.state),this.state===m.State.PARSED&&(this.state=m.State.IDLE);return}var N=F?F.stats:T.stats;this.fragLastKbps=Math.round(8*N.total/(N.buffering.end-N.loading.first)),T.sn!=="initSegment"&&(this.fragPrevious=T),this.fragBufferedComplete(T,F)},O.onError=function(E,w){switch(w.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(h.PlaylistLevelType.MAIN,w);break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==m.State.ERROR&&(w.fatal?(this.warn(""+w.details),this.state=m.State.ERROR):!w.levelRetry&&this.state===m.State.WAITING_LEVEL&&(this.state=m.State.IDLE));break;case s.ErrorDetails.BUFFER_FULL_ERROR:if(w.parent==="main"&&(this.state===m.State.PARSING||this.state===m.State.PARSED)){var T=!0,F=this.getFwdBufferInfo(this.media,h.PlaylistLevelType.MAIN);F&&F.len>.5&&(T=!this.reduceMaxBufferLength(F.len)),T&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},O.checkBuffer=function(){var E=this.media,w=this.gapController;if(!E||!w||!E.readyState)return;var T=_.BufferHelper.getBuffered(E);!this.loadedmetadata&&T.length?(this.loadedmetadata=!0,this.seekToStartPos()):w.poll(this.lastCurrentTime),this.lastCurrentTime=E.currentTime},O.onFragLoadEmergencyAborted=function(){this.state=m.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},O.onBufferFlushed=function(E,w){var T=w.type;if(T!==n.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var F=(T===n.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(F,T,h.PlaylistLevelType.MAIN)}},O.onLevelsUpdated=function(E,w){this.levels=w.levels},O.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},O.seekToStartPos=function(){var E=this.media,w=E.currentTime,T=this.startPosition;if(T>=0&&w<T){if(E.seeking){d.logger.log("could not seek to "+T+", already seeking at "+w);return}var F=_.BufferHelper.getBuffered(E),N=F.length?F.start(0):0,L=N-T;L>0&&(L<this.config.maxBufferHole||L<this.config.maxFragLookUpTolerance)&&(d.logger.log("adjusting start position by "+L+" to match buffer start"),T+=L,this.startPosition=T),this.log("seek to target start position "+T+" from current time "+w),E.currentTime=T}},O._getAudioCodec=function(E){var w=this.config.defaultAudioCodec||E.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},O._loadBitrateTestFrag=function(E){var w=this;this._doFragLoad(E).then(function(T){var F=w.hls;if(!T||F.nextLoadLevel||w.fragContextChanged(E))return;w.fragLoadError=0,w.state=m.State.IDLE,w.startFragRequested=!1,w.bitrateTest=!1;var N=E.stats;N.parsing.start=N.parsing.end=N.buffering.start=N.buffering.end=self.performance.now(),F.trigger(S.Events.FRAG_LOADED,T)})},O._handleTransmuxComplete=function(E){var w,T="main",F=this.hls,N=E.remuxResult,L=E.chunkMeta,G=this.getCurrentContext(L);if(!G){this.warn("The loading context changed while buffering fragment "+L.sn+" of level "+L.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(L.level);return}var z=G.frag,A=G.part,B=G.level,U=N.video,I=N.text,K=N.id3,Z=N.initSegment,ue=this.altAudio?void 0:N.audio;if(this.fragContextChanged(z))return;if(this.state=m.State.PARSING,Z){Z.tracks&&(this._bufferInitSegment(B,Z.tracks,z,L),F.trigger(S.Events.FRAG_PARSING_INIT_SEGMENT,{frag:z,id:T,tracks:Z.tracks}));var de=Z.initPTS,Ce=Z.timescale;Object(M.isFiniteNumber)(de)&&(this.initPTS[z.cc]=de,F.trigger(S.Events.INIT_PTS_FOUND,{frag:z,id:T,initPTS:de,timescale:Ce}))}if(U&&N.independent!==!1){if(B.details){var Re=U.startPTS,me=U.endPTS,Oe=U.startDTS,be=U.endDTS;if(A)A.elementaryStreams[U.type]={startPTS:Re,endPTS:me,startDTS:Oe,endDTS:be};else if(U.firstKeyFrame&&U.independent&&(this.couldBacktrack=!0),U.dropped&&U.independent){var ce=this.getLoadPosition()+this.config.maxBufferHole;if(ce<Re){this.backtrack(z);return}z.setElementaryStreamInfo(U.type,z.start,me,z.start,be,!0)}z.setElementaryStreamInfo(U.type,Re,me,Oe,be),this.bufferFragmentData(U,z,A,L)}}else if(N.independent===!1){this.backtrack(z);return}if(ue){var se=ue.startPTS,ne=ue.endPTS,ge=ue.startDTS,ee=ue.endDTS;A&&(A.elementaryStreams[n.ElementaryStreamTypes.AUDIO]={startPTS:se,endPTS:ne,startDTS:ge,endDTS:ee}),z.setElementaryStreamInfo(n.ElementaryStreamTypes.AUDIO,se,ne,ge,ee),this.bufferFragmentData(ue,z,A,L)}if(K!=null&&(w=K.samples)!==null&&w!==void 0&&w.length){var re={frag:z,id:T,samples:K.samples};F.trigger(S.Events.FRAG_PARSING_METADATA,re)}if(I){var Te={frag:z,id:T,samples:I.samples};F.trigger(S.Events.FRAG_PARSING_USERDATA,Te)}},O._bufferInitSegment=function(E,w,T,F){var N=this;if(this.state!==m.State.PARSING)return;this.audioOnly=!!w.audio&&!w.video,this.altAudio&&!this.audioOnly&&delete w.audio;var L=w.audio,G=w.video,z=w.audiovideo;if(L){var A=E.audioCodec,B=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(A&&(A.indexOf("mp4a.40.5")!==-1?A="mp4a.40.2":A="mp4a.40.5"),L.metadata.channelCount!==1&&B.indexOf("firefox")===-1&&(A="mp4a.40.5")),B.indexOf("android")!==-1&&L.container!=="audio/mpeg"&&(A="mp4a.40.2",this.log("Android: force audio codec to "+A)),E.audioCodec&&E.audioCodec!==A&&this.log('Swapping manifest audio codec "'+E.audioCodec+'" for "'+A+'"'),L.levelCodec=A,L.id="main",this.log("Init audio buffer, container:"+L.container+", codecs[selected/level/parsed]=["+(A||"")+"/"+(E.audioCodec||"")+"/"+L.codec+"]")}G&&(G.levelCodec=E.videoCodec,G.id="main",this.log("Init video buffer, container:"+G.container+", codecs[level/parsed]=["+(E.videoCodec||"")+"/"+G.codec+"]")),z&&this.log("Init audiovideo buffer, container:"+z.container+", codecs[level/parsed]=["+(E.attrs.CODECS||"")+"/"+z.codec+"]"),this.hls.trigger(S.Events.BUFFER_CODECS,w),Object.keys(w).forEach(function(U){var I=w[U],K=I.initSegment;K!=null&&K.byteLength&&N.hls.trigger(S.Events.BUFFER_APPENDING,{type:U,data:K,frag:T,part:null,chunkMeta:F,parent:T.type})}),this.tick()},O.backtrack=function(E){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(E);var w=this.fragmentTracker.backtrack(E);this.fragPrevious=null,this.nextLoadPosition=E.start,w?this.resetFragmentLoading(E):this.state=m.State.BACKTRACKING},O.checkFragmentChanged=function(){var E=this.media,w=null;if(E&&E.readyState>1&&E.seeking===!1){var T=E.currentTime;if(_.BufferHelper.isBuffered(E,T)?w=this.getAppendedFrag(T):_.BufferHelper.isBuffered(E,T+.1)&&(w=this.getAppendedFrag(T+.1)),w){var F=this.fragPlaying,N=w.level;(!F||w.sn!==F.sn||F.level!==N||w.urlId!==F.urlId)&&(this.hls.trigger(S.Events.FRAG_CHANGED,{frag:w}),(!F||F.level!==N)&&this.hls.trigger(S.Events.LEVEL_SWITCHED,{level:N}),this.fragPlaying=w)}}},l(R,[{key:"nextLevel",get:function(){var E=this.nextBufferedFrag;return E?E.level:-1}},{key:"currentLevel",get:function(){var E=this.media;if(E){var w=this.getAppendedFrag(E.currentTime);if(w)return w.level}return-1}},{key:"nextBufferedFrag",get:function(){var E=this.media;if(E){var w=this.getAppendedFrag(E.currentTime);return this.followingBufferedFrag(w)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),R}(m.default)},"./src/controller/subtitle-stream-controller.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"SubtitleStreamController",function(){return o});var M=C("./src/events.ts"),m=C("./src/utils/logger.ts"),y=C("./src/utils/buffer-helper.ts"),S=C("./src/controller/fragment-finders.ts"),_=C("./src/utils/discontinuities.ts"),t=C("./src/controller/level-helper.ts"),h=C("./src/controller/fragment-tracker.ts"),n=C("./src/controller/base-stream-controller.ts"),c=C("./src/types/loader.ts"),a=C("./src/types/level.ts");function i(r,x){for(var v=0;v<x.length;v++){var p=x[v];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(r,p.key,p)}}function s(r,x,v){return x&&i(r.prototype,x),v&&i(r,v),r}function d(r,x){r.prototype=Object.create(x.prototype),r.prototype.constructor=r,f(r,x)}function f(r,x){return f=Object.setPrototypeOf||function(p,R){return p.__proto__=R,p},f(r,x)}var l=500,o=function(r){d(x,r);function x(p,R){var O;return O=r.call(this,p,R,"[subtitle-stream-controller]")||this,O.levels=[],O.currentTrackId=-1,O.tracksBuffered=[],O.mainDetails=null,O._registerListeners(),O}var v=x.prototype;return v.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},v._registerListeners=function(){var R=this.hls;R.on(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),R.on(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),R.on(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),R.on(M.Events.LEVEL_LOADED,this.onLevelLoaded,this),R.on(M.Events.ERROR,this.onError,this),R.on(M.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),R.on(M.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),R.on(M.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),R.on(M.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),R.on(M.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},v._unregisterListeners=function(){var R=this.hls;R.off(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),R.off(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),R.off(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),R.off(M.Events.LEVEL_LOADED,this.onLevelLoaded,this),R.off(M.Events.ERROR,this.onError,this),R.off(M.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),R.off(M.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),R.off(M.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),R.off(M.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),R.off(M.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},v.startLoad=function(){this.stopLoad(),this.state=n.State.IDLE,this.setInterval(l),this.tick()},v.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},v.onLevelLoaded=function(R,O){this.mainDetails=O.details},v.onSubtitleFragProcessed=function(R,O){var b=O.frag,E=O.success;if(this.fragPrevious=b,this.state=n.State.IDLE,!E)return;var w=this.tracksBuffered[this.currentTrackId];if(!w)return;for(var T,F=b.start,N=0;N<w.length;N++)if(F>=w[N].start&&F<=w[N].end){T=w[N];break}var L=b.start+b.duration;T?T.end=L:(T={start:F,end:L},w.push(T)),this.fragmentTracker.fragBuffered(b)},v.onBufferFlushing=function(R,O){var b=O.startOffset,E=O.endOffset;if(b===0&&E!==Number.POSITIVE_INFINITY){var w=this.currentTrackId,T=this.levels;if(!T.length||!T[w]||!T[w].details)return;var F=T[w].details,N=F.targetduration,L=E-N;if(L<=0)return;O.endOffsetSubtitles=Math.max(0,L),this.tracksBuffered.forEach(function(G){for(var z=0;z<G.length;){if(G[z].end<=L){G.shift();continue}else if(G[z].start<L)G[z].start=L;else break;z++}}),this.fragmentTracker.removeFragmentsInRange(b,L,c.PlaylistLevelType.SUBTITLE)}},v.onError=function(R,O){var b,E=O.frag;if(!E||E.type!==c.PlaylistLevelType.SUBTITLE)return;(b=this.fragCurrent)!==null&&b!==void 0&&b.loader&&this.fragCurrent.loader.abort(),this.state=n.State.IDLE},v.onSubtitleTracksUpdated=function(R,O){var b=this,E=O.subtitleTracks;this.tracksBuffered=[],this.levels=E.map(function(w){return new a.Level(w)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(w){b.tracksBuffered[w.id]=[]}),this.mediaBuffer=null},v.onSubtitleTrackSwitch=function(R,O){if(this.currentTrackId=O.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var b=this.levels[this.currentTrackId];b!=null&&b.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,b&&this.setInterval(l)},v.onSubtitleTrackLoaded=function(R,O){var b,E=O.details,w=O.id,T=this.currentTrackId,F=this.levels;if(!F.length)return;var N=F[T];if(w>=F.length||w!==T||!N)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,E.live||(b=N.details)!==null&&b!==void 0&&b.live){var L=this.mainDetails;if(E.deltaUpdateFailed||!L)return;var G=L.fragments[0];if(!N.details)E.hasProgramDateTime&&L.hasProgramDateTime?Object(_.alignMediaPlaylistByPDT)(E,L):G&&Object(t.addSliding)(E,G.start);else{var z=this.alignPlaylists(E,N.details);z===0&&G&&Object(t.addSliding)(E,G.start)}}if(N.details=E,this.levelLastLoaded=w,this.tick(),E.live&&!this.fragCurrent&&this.media&&this.state===n.State.IDLE){var A=Object(S.findFragmentByPTS)(null,E.fragments,this.media.currentTime,0);A||(this.warn("Subtitle playlist not aligned with playback"),N.details=void 0)}},v._handleFragmentLoadComplete=function(R){var O=R.frag,b=R.payload,E=O.decryptdata,w=this.hls;if(this.fragContextChanged(O))return;if(b&&b.byteLength>0&&E&&E.key&&E.iv&&E.method==="AES-128"){var T=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(b),E.key.buffer,E.iv.buffer).then(function(F){var N=performance.now();w.trigger(M.Events.FRAG_DECRYPTED,{frag:O,payload:F,stats:{tstart:T,tdecrypt:N}})})}},v.doTick=function(){if(!this.media){this.state=n.State.IDLE;return}if(this.state===n.State.IDLE){var R,O=this.currentTrackId,b=this.levels;if(!b.length||!b[O]||!b[O].details)return;var E=b[O].details,w=E.targetduration,T=this.config,F=this.media,N=y.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,F.currentTime-w,T.maxBufferHole),L=N.end,G=N.len,z=this.getMaxBufferLength()+w;if(G>z)return;console.assert(E,"Subtitle track details are defined on idle subtitle stream controller tick");var A=E.fragments,B=A.length,U=E.edge,I,K=this.fragPrevious;if(L<U){var Z=T.maxFragLookUpTolerance;K&&E.hasProgramDateTime&&(I=Object(S.findFragmentByPDT)(A,K.endProgramDateTime,Z)),I||(I=Object(S.findFragmentByPTS)(K,A,L,Z),!I&&K&&K.start<A[0].start&&(I=A[0]))}else I=A[B-1];(R=I)!==null&&R!==void 0&&R.encrypted?(m.logger.log("Loading key for "+I.sn),this.state=n.State.KEY_LOADING,this.hls.trigger(M.Events.KEY_LOADING,{frag:I})):I&&this.fragmentTracker.getState(I)===h.FragmentState.NOT_LOADED&&this.loadFragment(I,E,L)}},v.loadFragment=function(R,O,b){this.fragCurrent=R,r.prototype.loadFragment.call(this,R,O,b)},s(x,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),x}(n.default)},"./src/controller/subtitle-track-controller.ts":function(k,g,C){"use strict";C.r(g);var M=C("./src/events.ts"),m=C("./src/utils/texttrack-utils.ts"),y=C("./src/controller/base-playlist-controller.ts"),S=C("./src/types/loader.ts");function _(i,s){for(var d=0;d<s.length;d++){var f=s[d];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(i,f.key,f)}}function t(i,s,d){return s&&_(i.prototype,s),d&&_(i,d),i}function h(i,s){i.prototype=Object.create(s.prototype),i.prototype.constructor=i,n(i,s)}function n(i,s){return n=Object.setPrototypeOf||function(f,l){return f.__proto__=l,f},n(i,s)}var c=function(i){h(s,i);function s(f){var l;return l=i.call(this,f,"[subtitle-track-controller]")||this,l.media=null,l.tracks=[],l.groupId=null,l.tracksInGroup=[],l.trackId=-1,l.selectDefaultTrack=!0,l.queuedDefaultTrack=-1,l.trackChangeListener=function(){return l.onTextTracksChanged()},l.asyncPollTrackChange=function(){return l.pollTrackChange(0)},l.useTextTrackPolling=!1,l.subtitlePollingInterval=-1,l.subtitleDisplay=!0,l.registerListeners(),l}var d=s.prototype;return d.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,i.prototype.destroy.call(this)},d.registerListeners=function(){var l=this.hls;l.on(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.on(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.on(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.on(M.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.on(M.Events.LEVEL_LOADING,this.onLevelLoading,this),l.on(M.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),l.on(M.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),l.on(M.Events.ERROR,this.onError,this)},d.unregisterListeners=function(){var l=this.hls;l.off(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.off(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.off(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.off(M.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.off(M.Events.LEVEL_LOADING,this.onLevelLoading,this),l.off(M.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),l.off(M.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),l.off(M.Events.ERROR,this.onError,this)},d.onMediaAttached=function(l,o){if(this.media=o.media,!this.media)return;this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange)},d.pollTrackChange=function(l){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,l)},d.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 l=a(this.media.textTracks);l.forEach(function(o){Object(m.clearCurrentCues)(o)}),this.subtitleTrack=-1,this.media=null},d.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},d.onManifestParsed=function(l,o){this.tracks=o.subtitleTracks},d.onSubtitleTrackLoaded=function(l,o){var r=o.id,x=o.details,v=this.trackId,p=this.tracksInGroup[v];if(!p){this.warn("Invalid subtitle track id "+r);return}var R=p.details;p.details=o.details,this.log("subtitle track "+r+" loaded ["+x.startSN+"-"+x.endSN+"]"),r===this.trackId&&(this.retryCount=0,this.playlistLoaded(r,o,R))},d.onLevelLoading=function(l,o){this.switchLevel(o.level)},d.onLevelSwitching=function(l,o){this.switchLevel(o.level)},d.switchLevel=function(l){var o=this.hls.levels[l];if(!(o!=null&&o.textGroupIds))return;var r=o.textGroupIds[o.urlId];if(this.groupId!==r){var x=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,v=this.tracks.filter(function(O){return!r||O.groupId===r});this.tracksInGroup=v;var p=this.findTrackId(x==null?void 0:x.name)||this.findTrackId();this.groupId=r;var R={subtitleTracks:v};this.log("Updating subtitle tracks, "+v.length+' track(s) found in "'+r+'" group-id'),this.hls.trigger(M.Events.SUBTITLE_TRACKS_UPDATED,R),p!==-1&&this.setSubtitleTrack(p,x)}},d.findTrackId=function(l){for(var o=this.tracksInGroup,r=0;r<o.length;r++){var x=o[r];if((!this.selectDefaultTrack||x.default)&&(!l||l===x.name))return x.id}return-1},d.onError=function(l,o){if(i.prototype.onError.call(this,l,o),o.fatal||!o.context)return;o.context.type===S.PlaylistContextType.SUBTITLE_TRACK&&o.context.id===this.trackId&&o.context.groupId===this.groupId&&this.retryLoadingOrFail(o)},d.loadPlaylist=function(l){var o=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(o)){var r=o.id,x=o.groupId,v=o.url;if(l)try{v=l.addDirectives(v)}catch(p){this.warn("Could not construct new URL with HLS Delivery Directives: "+p)}this.log("Loading subtitle playlist for id "+r),this.hls.trigger(M.Events.SUBTITLE_TRACK_LOADING,{url:v,id:r,groupId:x,deliveryDirectives:l||null})}},d.toggleTrackModes=function(l){var o=this,r=this.media,x=this.subtitleDisplay,v=this.trackId;if(!r)return;var p=a(r.textTracks),R=p.filter(function(E){return E.groupId===o.groupId});if(l===-1)[].slice.call(p).forEach(function(E){E.mode="disabled"});else{var O=R[v];O&&(O.mode="disabled")}var b=R[l];b&&(b.mode=x?"showing":"hidden")},d.setSubtitleTrack=function(l,o){var r,x=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=l;return}if(this.trackId!==l&&this.toggleTrackModes(l),this.trackId===l&&(l===-1||(r=x[l])!==null&&r!==void 0&&r.details)||l<-1||l>=x.length)return;this.clearTimer();var v=x[l];if(this.log("Switching to subtitle track "+l),this.trackId=l,v){var p=v.id,R=v.groupId,O=R===void 0?"":R,b=v.name,E=v.type,w=v.url;this.hls.trigger(M.Events.SUBTITLE_TRACK_SWITCH,{id:p,groupId:O,name:b,type:E,url:w});var T=this.switchParams(v.url,o==null?void 0:o.details);this.loadPlaylist(T)}else this.hls.trigger(M.Events.SUBTITLE_TRACK_SWITCH,{id:l})},d.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var l=-1,o=a(this.media.textTracks),r=0;r<o.length;r++)if(o[r].mode==="hidden")l=r;else if(o[r].mode==="showing"){l=r;break}this.subtitleTrack!==l&&(this.subtitleTrack=l)},t(s,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(l){this.selectDefaultTrack=!1;var o=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(l,o)}}]),s}(y.default);function a(i){for(var s=[],d=0;d<i.length;d++){var f=i[d];f.kind==="subtitles"&&f.label&&s.push(i[d])}return s}g.default=c},"./src/controller/timeline-controller.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"TimelineController",function(){return a});var M=C("./src/polyfills/number.ts"),m=C("./src/events.ts"),y=C("./src/utils/cea-608-parser.ts"),S=C("./src/utils/output-filter.ts"),_=C("./src/utils/webvtt-parser.ts"),t=C("./src/utils/texttrack-utils.ts"),h=C("./src/utils/imsc1-ttml-parser.ts"),n=C("./src/types/loader.ts"),c=C("./src/utils/logger.ts"),a=function(){function f(o){if(this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.timescale=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=d(),this.captionsProperties=void 0,this.hls=o,this.config=o.config,this.Cues=o.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},this.config.enableCEA708Captions){var r=new S.default(this,"textTrack1"),x=new S.default(this,"textTrack2"),v=new S.default(this,"textTrack3"),p=new S.default(this,"textTrack4");this.cea608Parser1=new y.default(1,r,x),this.cea608Parser2=new y.default(3,v,p)}o.on(m.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),o.on(m.Events.MEDIA_DETACHING,this.onMediaDetaching,this),o.on(m.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.on(m.Events.MANIFEST_LOADED,this.onManifestLoaded,this),o.on(m.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),o.on(m.Events.FRAG_LOADING,this.onFragLoading,this),o.on(m.Events.FRAG_LOADED,this.onFragLoaded,this),o.on(m.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),o.on(m.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),o.on(m.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),o.on(m.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),o.on(m.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var l=f.prototype;return l.destroy=function(){var r=this.hls;r.off(m.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),r.off(m.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.off(m.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.off(m.Events.MANIFEST_LOADED,this.onManifestLoaded,this),r.off(m.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),r.off(m.Events.FRAG_LOADING,this.onFragLoading,this),r.off(m.Events.FRAG_LOADED,this.onFragLoaded,this),r.off(m.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),r.off(m.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),r.off(m.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),r.off(m.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),r.off(m.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},l.addCues=function(r,x,v,p,R){for(var O=!1,b=R.length;b--;){var E=R[b],w=s(E[0],E[1],x,v);if(w>=0&&(E[0]=Math.min(E[0],x),E[1]=Math.max(E[1],v),O=!0,w/(v-x)>.5))return}if(O||R.push([x,v]),this.config.renderTextTracksNatively){var T=this.captionsTracks[r];this.Cues.newCue(T,x,v,p)}else{var F=this.Cues.newCue(null,x,v,p);this.hls.trigger(m.Events.CUES_PARSED,{type:"captions",cues:F,track:r})}},l.onInitPtsFound=function(r,x){var v=this,p=x.frag,R=x.id,O=x.initPTS,b=x.timescale,E=this.unparsedVttFrags;R==="main"&&(this.initPTS[p.cc]=O,this.timescale[p.cc]=b),E.length&&(this.unparsedVttFrags=[],E.forEach(function(w){v.onFragLoaded(m.Events.FRAG_LOADED,w)}))},l.getExistingTrack=function(r){var x=this.media;if(x)for(var v=0;v<x.textTracks.length;v++){var p=x.textTracks[v];if(p[r])return p}return null},l.createCaptionsTrack=function(r){this.config.renderTextTracksNatively?this.createNativeTrack(r):this.createNonNativeTrack(r)},l.createNativeTrack=function(r){if(this.captionsTracks[r])return;var x=this.captionsProperties,v=this.captionsTracks,p=this.media,R=x[r],O=R.label,b=R.languageCode,E=this.getExistingTrack(r);if(E)v[r]=E,Object(t.clearCurrentCues)(v[r]),Object(t.sendAddTrackEvent)(v[r],p);else{var w=this.createTextTrack("captions",O,b);w&&(w[r]=!0,v[r]=w)}},l.createNonNativeTrack=function(r){if(this.nonNativeCaptionsTracks[r])return;var x=this.captionsProperties[r];if(!x)return;var v=x.label,p={_id:r,label:v,kind:"captions",default:x.media?!!x.media.default:!1,closedCaptions:x.media};this.nonNativeCaptionsTracks[r]=p,this.hls.trigger(m.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[p]})},l.createTextTrack=function(r,x,v){var p=this.media;return p?p.addTextTrack(r,x,v):void 0},l.onMediaAttaching=function(r,x){this.media=x.media,this._cleanTracks()},l.onMediaDetaching=function(){var r=this.captionsTracks;Object.keys(r).forEach(function(x){Object(t.clearCurrentCues)(r[x]),delete r[x]}),this.nonNativeCaptionsTracks={}},l.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=d(),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())},l._cleanTracks=function(){var r=this.media;if(!r)return;var x=r.textTracks;if(x)for(var v=0;v<x.length;v++)Object(t.clearCurrentCues)(x[v])},l.onSubtitleTracksUpdated=function(r,x){var v=this;this.textTracks=[];var p=x.subtitleTracks||[],R=p.some(function(w){return w.textCodec===h.IMSC1_CODEC});if(this.config.enableWebVTT||R&&this.config.enableIMSC1){var O=this.tracks&&p&&this.tracks.length===p.length;if(this.tracks=p||[],this.config.renderTextTracksNatively){var b=this.media?this.media.textTracks:[];this.tracks.forEach(function(w,T){var F;if(T<b.length){for(var N=null,L=0;L<b.length;L++)if(i(b[L],w)){N=b[L];break}N&&(F=N)}F?Object(t.clearCurrentCues)(F):(F=v.createTextTrack("subtitles",w.name,w.lang),F&&(F.mode="disabled")),F&&(F.groupId=w.groupId,v.textTracks.push(F))})}else if(!O&&this.tracks&&this.tracks.length){var E=this.tracks.map(function(w){return{label:w.name,kind:w.type.toLowerCase(),default:w.default,subtitleTrack:w}});this.hls.trigger(m.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:E})}}},l.onManifestLoaded=function(r,x){var v=this;this.config.enableCEA708Captions&&x.captions&&x.captions.forEach(function(p){var R=/(?:CC|SERVICE)([1-4])/.exec(p.instreamId);if(!R)return;var O="textTrack"+R[1],b=v.captionsProperties[O];if(!b)return;b.label=p.name,p.lang&&(b.languageCode=p.lang),b.media=p})},l.onFragLoading=function(r,x){var v=this.cea608Parser1,p=this.cea608Parser2,R=this.lastSn,O=this.lastPartIndex;if(!this.enabled||!(v&&p))return;if(x.frag.type===n.PlaylistLevelType.MAIN){var b,E,w=x.frag.sn,T=(b=x==null||((E=x.part)===null||E===void 0)?void 0:E.index)!=null?b:-1;w===R+1||w===R&&T===O+1||(v.reset(),p.reset()),this.lastSn=w,this.lastPartIndex=T}},l.onFragLoaded=function(r,x){var v=x.frag,p=x.payload,R=this.initPTS,O=this.unparsedVttFrags;if(v.type===n.PlaylistLevelType.SUBTITLE)if(p.byteLength){if(!Object(M.isFiniteNumber)(R[v.cc])){O.push(x),R.length&&this.hls.trigger(m.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:v,error:new Error("Missing initial subtitle PTS")});return}var b=v.decryptdata;if(b==null||b.key==null||b.method!=="AES-128"){var E=this.tracks[v.level],w=this.vttCCs;w[v.cc]||(w[v.cc]={start:v.start,prevCC:this.prevCC,new:!0},this.prevCC=v.cc),E&&E.textCodec===h.IMSC1_CODEC?this._parseIMSC1(v,p):this._parseVTTs(v,p,w)}}else this.hls.trigger(m.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:v,error:new Error("Empty subtitle payload")})},l._parseIMSC1=function(r,x){var v=this,p=this.hls;Object(h.parseIMSC1)(x,this.initPTS[r.cc],this.timescale[r.cc],function(R){v._appendCues(R,r.level),p.trigger(m.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:r})},function(R){c.logger.log("Failed to parse IMSC1: "+R),p.trigger(m.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:R})})},l._parseVTTs=function(r,x,v){var p=this,R=this.hls;Object(_.parseWebVTT)(x,this.initPTS[r.cc],this.timescale[r.cc],v,r.cc,r.start,function(O){p._appendCues(O,r.level),R.trigger(m.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:r})},function(O){p._fallbackToIMSC1(r,x),c.logger.log("Failed to parse VTT cue: "+O),R.trigger(m.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:O})})},l._fallbackToIMSC1=function(r,x){var v=this,p=this.tracks[r.level];p.textCodec||Object(h.parseIMSC1)(x,this.initPTS[r.cc],this.timescale[r.cc],function(){p.textCodec=h.IMSC1_CODEC,v._parseIMSC1(r,x)},function(){p.textCodec="wvtt"})},l._appendCues=function(r,x){var v=this.hls;if(this.config.renderTextTracksNatively){var p=this.textTracks[x];if(p.mode==="disabled")return;r.forEach(function(b){return Object(t.addCueToTrack)(p,b)})}else{var R=this.tracks[x],O=R.default?"default":"subtitles"+x;v.trigger(m.Events.CUES_PARSED,{type:"subtitles",cues:r,track:O})}},l.onFragDecrypted=function(r,x){var v=x.frag;if(v.type===n.PlaylistLevelType.SUBTITLE){if(!Object(M.isFiniteNumber)(this.initPTS[v.cc])){this.unparsedVttFrags.push(x);return}this.onFragLoaded(m.Events.FRAG_LOADED,x)}},l.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},l.onFragParsingUserdata=function(r,x){var v=this.cea608Parser1,p=this.cea608Parser2;if(!this.enabled||!(v&&p))return;for(var R=0;R<x.samples.length;R++){var O=x.samples[R].bytes;if(O){var b=this.extractCea608Data(O);v.addData(x.samples[R].pts,b[0]),p.addData(x.samples[R].pts,b[1])}}},l.onBufferFlushing=function(r,x){var v=x.startOffset,p=x.endOffset,R=x.endOffsetSubtitles,O=x.type,b=this.media;if(!b||b.currentTime<p)return;if(!O||O==="video"){var E=this.captionsTracks;Object.keys(E).forEach(function(T){return Object(t.removeCuesInRange)(E[T],v,p)})}if(this.config.renderTextTracksNatively&&(v===0&&R!==void 0)){var w=this.textTracks;Object.keys(w).forEach(function(T){return Object(t.removeCuesInRange)(w[T],v,R)})}},l.extractCea608Data=function(r){for(var x=r[0]&31,v=2,p=[[],[]],R=0;R<x;R++){var O=r[v++],b=127&r[v++],E=127&r[v++],w=(4&O)!==0,T=3&O;if(b===0&&E===0)continue;w&&((T===0||T===1)&&(p[T].push(b),p[T].push(E)))}return p},f}();function i(f,l){return f&&f.label===l.name&&!(f.textTrack1||f.textTrack2)}function s(f,l,o,r){return Math.min(l,r)-Math.max(f,o)}function d(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"default",function(){return M});var M=function(){function m(S,_){this.subtle=void 0,this.aesIV=void 0,this.subtle=S,this.aesIV=_}var y=m.prototype;return y.decrypt=function(_,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,_)},m}()},"./src/crypt/aes-decryptor.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"removePadding",function(){return m}),C.d(g,"default",function(){return y});var M=C("./src/utils/typed-array.ts");function m(S){var _=S.byteLength,t=_&&new DataView(S.buffer).getUint8(_-1);return t?Object(M.sliceUint8)(S,0,_-t):S}var y=function(){function S(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var _=S.prototype;return _.uint8ArrayToUint32Array_=function(h){for(var n=new DataView(h),c=new Uint32Array(4),a=0;a<4;a++)c[a]=n.getUint32(a*4);return c},_.initTable=function(){var h=this.sBox,n=this.invSBox,c=this.subMix,a=c[0],i=c[1],s=c[2],d=c[3],f=this.invSubMix,l=f[0],o=f[1],r=f[2],x=f[3],v=new Uint32Array(256),p=0,R=0,O=0;for(O=0;O<256;O++)O<128?v[O]=O<<1:v[O]=O<<1^283;for(O=0;O<256;O++){var b=R^R<<1^R<<2^R<<3^R<<4;b=b>>>8^b&255^99,h[p]=b,n[b]=p;var E=v[p],w=v[E],T=v[w],F=v[b]*257^b*16843008;a[p]=F<<24|F>>>8,i[p]=F<<16|F>>>16,s[p]=F<<8|F>>>24,d[p]=F,F=T*16843009^w*65537^E*257^p*16843008,l[b]=F<<24|F>>>8,o[b]=F<<16|F>>>16,r[b]=F<<8|F>>>24,x[b]=F,p?(p=E^v[v[v[T^E]]],R^=v[v[R]]):p=R=1}},_.expandKey=function(h){for(var n=this.uint8ArrayToUint32Array_(h),c=!0,a=0;a<n.length&&c;)c=n[a]===this.key[a],a++;if(c)return;this.key=n;var i=this.keySize=n.length;if(i!==4&&i!==6&&i!==8)throw new Error("Invalid aes key size="+i);var s=this.ksRows=(i+6+1)*4,d,f,l=this.keySchedule=new Uint32Array(s),o=this.invKeySchedule=new Uint32Array(s),r=this.sBox,x=this.rcon,v=this.invSubMix,p=v[0],R=v[1],O=v[2],b=v[3],E,w;for(d=0;d<s;d++){if(d<i){E=l[d]=n[d];continue}w=E,d%i===0?(w=w<<8|w>>>24,w=r[w>>>24]<<24|r[w>>>16&255]<<16|r[w>>>8&255]<<8|r[w&255],w^=x[d/i|0]<<24):i>6&&d%i===4&&(w=r[w>>>24]<<24|r[w>>>16&255]<<16|r[w>>>8&255]<<8|r[w&255]),l[d]=E=(l[d-i]^w)>>>0}for(f=0;f<s;f++)d=s-f,f&3?w=l[d]:w=l[d-4],f<4||d<=4?o[f]=w:o[f]=p[r[w>>>24]]^R[r[w>>>16&255]]^O[r[w>>>8&255]]^b[r[w&255]],o[f]=o[f]>>>0},_.networkToHostOrderSwap=function(h){return h<<24|(h&65280)<<8|(h&16711680)>>8|h>>>24},_.decrypt=function(h,n,c){for(var a=this.keySize+6,i=this.invKeySchedule,s=this.invSBox,d=this.invSubMix,f=d[0],l=d[1],o=d[2],r=d[3],x=this.uint8ArrayToUint32Array_(c),v=x[0],p=x[1],R=x[2],O=x[3],b=new Int32Array(h),E=new Int32Array(b.length),w,T,F,N,L,G,z,A,B,U,I,K,Z,ue,de=this.networkToHostOrderSwap;n<b.length;){for(B=de(b[n]),U=de(b[n+1]),I=de(b[n+2]),K=de(b[n+3]),L=B^i[0],G=K^i[1],z=I^i[2],A=U^i[3],Z=4,ue=1;ue<a;ue++)w=f[L>>>24]^l[G>>16&255]^o[z>>8&255]^r[A&255]^i[Z],T=f[G>>>24]^l[z>>16&255]^o[A>>8&255]^r[L&255]^i[Z+1],F=f[z>>>24]^l[A>>16&255]^o[L>>8&255]^r[G&255]^i[Z+2],N=f[A>>>24]^l[L>>16&255]^o[G>>8&255]^r[z&255]^i[Z+3],L=w,G=T,z=F,A=N,Z=Z+4;w=s[L>>>24]<<24^s[G>>16&255]<<16^s[z>>8&255]<<8^s[A&255]^i[Z],T=s[G>>>24]<<24^s[z>>16&255]<<16^s[A>>8&255]<<8^s[L&255]^i[Z+1],F=s[z>>>24]<<24^s[A>>16&255]<<16^s[L>>8&255]<<8^s[G&255]^i[Z+2],N=s[A>>>24]<<24^s[L>>16&255]<<16^s[G>>8&255]<<8^s[z&255]^i[Z+3],E[n]=de(w^v),E[n+1]=de(N^p),E[n+2]=de(F^R),E[n+3]=de(T^O),v=B,p=U,R=I,O=K,n=n+4}return E.buffer},S}()},"./src/crypt/decrypter.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"default",function(){return n});var M=C("./src/crypt/aes-crypto.ts"),m=C("./src/crypt/fast-aes-key.ts"),y=C("./src/crypt/aes-decryptor.ts"),S=C("./src/utils/logger.ts"),_=C("./src/utils/mp4-tools.ts"),t=C("./src/utils/typed-array.ts"),h=16,n=function(){function c(i,s,d){var f=d===void 0?{}:d,l=f.removePKCS7Padding,o=l===void 0?!0:l;if(this.logEnabled=!0,this.observer=void 0,this.config=void 0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.observer=i,this.config=s,this.removePKCS7Padding=o,o)try{var r=self.crypto;r&&(this.subtle=r.subtle||r.webkitSubtle)}catch(x){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var a=c.prototype;return a.destroy=function(){this.observer=null},a.isSync=function(){return this.config.enableSoftwareAES},a.flush=function(){var s=this.currentResult;if(!s){this.reset();return}var d=new Uint8Array(s);return this.reset(),this.removePKCS7Padding?Object(y.removePadding)(d):d},a.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},a.decrypt=function(s,d,f,l){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(s),d,f);var o=this.flush();o&&l(o.buffer)}else this.webCryptoDecrypt(new Uint8Array(s),d,f).then(l)},a.softwareDecrypt=function(s,d,f){var l=this.currentIV,o=this.currentResult,r=this.remainderData;this.logOnce("JS AES decrypt"),r&&(s=Object(_.appendUint8Array)(r,s),this.remainderData=null);var x=this.getValidChunk(s);if(!x.length)return null;l&&(f=l);var v=this.softwareDecrypter;v||(v=this.softwareDecrypter=new y.default),v.expandKey(d);var p=o;return this.currentResult=v.decrypt(x.buffer,0,f),this.currentIV=Object(t.sliceUint8)(x,-16).buffer,p||null},a.webCryptoDecrypt=function(s,d,f){var l=this,o=this.subtle;return(this.key!==d||!this.fastAesKey)&&(this.key=d,this.fastAesKey=new m.default(o,d)),this.fastAesKey.expandKey().then(function(r){if(!o)return Promise.reject(new Error("web crypto not initialized"));var x=new M.default(o,f);return x.decrypt(s.buffer,r)}).catch(function(r){return l.onWebCryptoError(r,s,d,f)})},a.onWebCryptoError=function(s,d,f,l){return S.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",s),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(d,f,l)},a.getValidChunk=function(s){var d=s,f=s.length-s.length%h;return f!==s.length&&(d=Object(t.sliceUint8)(s,0,f),this.remainderData=Object(t.sliceUint8)(s,f)),d},a.logOnce=function(s){if(!this.logEnabled)return;S.logger.log("[decrypter.ts]: "+s),this.logEnabled=!1},c}()},"./src/crypt/fast-aes-key.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"default",function(){return M});var M=function(){function m(S,_){this.subtle=void 0,this.key=void 0,this.subtle=S,this.key=_}var y=m.prototype;return y.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},m}()},"./src/demux/aacdemuxer.ts":function(k,g,C){"use strict";C.r(g);var M=C("./src/demux/base-audio-demuxer.ts"),m=C("./src/demux/adts.ts"),y=C("./src/utils/logger.ts"),S=C("./src/demux/id3.ts");function _(n,c){n.prototype=Object.create(c.prototype),n.prototype.constructor=n,t(n,c)}function t(n,c){return t=Object.setPrototypeOf||function(i,s){return i.__proto__=s,i},t(n,c)}var h=function(n){_(c,n);function c(i,s){var d;return d=n.call(this)||this,d.observer=void 0,d.config=void 0,d.observer=i,d.config=s,d}var a=c.prototype;return a.resetInitSegment=function(s,d,f){n.prototype.resetInitSegment.call(this,s,d,f),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:s,duration:f,inputTimeScale:9e4,dropped:0}},c.probe=function(s){if(!s)return!1;for(var d=S.getID3Data(s,0)||[],f=d.length,l=s.length;f<l;f++)if(m.probe(s,f))return y.logger.log("ADTS sync word found !"),!0;return!1},a.canParse=function(s,d){return m.canParse(s,d)},a.appendFrame=function(s,d,f){m.initTrackConfig(s,this.observer,d,f,s.manifestCodec);var l=m.appendFrame(s,d,f,this.initPTS,this.frameIndex);if(l&&l.missing===0)return l},c}(M.default);h.minProbeByteLength=9,g.default=h},"./src/demux/adts.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"getAudioConfig",function(){return S}),C.d(g,"isHeaderPattern",function(){return _}),C.d(g,"getHeaderLength",function(){return t}),C.d(g,"getFullFrameLength",function(){return h}),C.d(g,"canGetFrameLength",function(){return n}),C.d(g,"isHeader",function(){return c}),C.d(g,"canParse",function(){return a}),C.d(g,"probe",function(){return i}),C.d(g,"initTrackConfig",function(){return s}),C.d(g,"getFrameDuration",function(){return d}),C.d(g,"parseFrameHeader",function(){return f}),C.d(g,"appendFrame",function(){return l});var M=C("./src/utils/logger.ts"),m=C("./src/errors.ts"),y=C("./src/events.ts");function S(o,r,x,v){var p,R,O,b,E=navigator.userAgent.toLowerCase(),w=v,T=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];p=((r[x+2]&192)>>>6)+1;var F=(r[x+2]&60)>>>2;if(F>T.length-1){o.trigger(y.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+F});return}return O=(r[x+2]&1)<<2,O|=(r[x+3]&192)>>>6,M.logger.log("manifest codec:"+v+", ADTS type:"+p+", samplingIndex:"+F),/firefox/i.test(E)?F>=6?(p=5,b=new Array(4),R=F-3):(p=2,b=new Array(2),R=F):E.indexOf("android")!==-1?(p=2,b=new Array(2),R=F):(p=5,b=new Array(4),v&&(v.indexOf("mp4a.40.29")!==-1||v.indexOf("mp4a.40.5")!==-1)||!v&&F>=6?R=F-3:((v&&v.indexOf("mp4a.40.2")!==-1&&(F>=6&&O===1||/vivaldi/i.test(E))||!v&&O===1)&&(p=2,b=new Array(2)),R=F)),b[0]=p<<3,b[0]|=(F&14)>>1,b[1]|=(F&1)<<7,b[1]|=O<<3,p===5&&(b[1]|=(R&14)>>1,b[2]=(R&1)<<7,b[2]|=2<<2,b[3]=0),{config:b,samplerate:T[F],channelCount:O,codec:"mp4a.40."+p,manifestCodec:w}}function _(o,r){return o[r]===255&&(o[r+1]&246)===240}function t(o,r){return o[r+1]&1?7:9}function h(o,r){return(o[r+3]&3)<<11|o[r+4]<<3|(o[r+5]&224)>>>5}function n(o,r){return r+5<o.length}function c(o,r){return r+1<o.length&&_(o,r)}function a(o,r){return n(o,r)&&_(o,r)&&h(o,r)<=o.length-r}function i(o,r){if(c(o,r)){var x=t(o,r);if(r+x>=o.length)return!1;var v=h(o,r);if(v<=x)return!1;var p=r+v;return p===o.length||c(o,p)}return!1}function s(o,r,x,v,p){if(!o.samplerate){var R=S(r,x,v,p);if(!R)return;o.config=R.config,o.samplerate=R.samplerate,o.channelCount=R.channelCount,o.codec=R.codec,o.manifestCodec=R.manifestCodec,M.logger.log("parsed codec:"+o.codec+", rate:"+R.samplerate+", channels:"+R.channelCount)}}function d(o){return 1024*9e4/o}function f(o,r,x,v,p){var R=t(o,r),O=h(o,r);if(O-=R,O>0){var b=x+v*p;return{headerLength:R,frameLength:O,stamp:b}}}function l(o,r,x,v,p){var R=d(o.samplerate),O=f(r,x,v,p,R);if(O){var b=O.frameLength,E=O.headerLength,w=O.stamp,T=E+b,F=Math.max(0,x+T-r.length),N;F?(N=new Uint8Array(T-E),N.set(r.subarray(x+E,r.length),0)):N=r.subarray(x+E,x+T);var L={unit:N,pts:w};return F||o.samples.push(L),{sample:L,length:T,missing:F}}}},"./src/demux/base-audio-demuxer.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"initPTSFn",function(){return h});var M=C("./src/polyfills/number.ts"),m=C("./src/demux/id3.ts"),y=C("./src/demux/dummy-demuxed-track.ts"),S=C("./src/utils/mp4-tools.ts"),_=C("./src/utils/typed-array.ts"),t=function(){function n(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var c=n.prototype;return c.resetInitSegment=function(i,s,d){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},c.resetTimeStamp=function(){},c.resetContiguity=function(){},c.canParse=function(i,s){return!1},c.appendFrame=function(i,s,d){},c.demux=function(i,s){this.cachedData&&(i=Object(S.appendUint8Array)(this.cachedData,i),this.cachedData=null);var d=m.getID3Data(i,0),f=d?d.length:0,l,o,r=this._audioTrack,x=this._id3Track,v=d?m.getTimeStamp(d):void 0,p=i.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=h(v,s)),d&&d.length>0&&x.samples.push({pts:this.initPTS,dts:this.initPTS,data:d}),o=this.initPTS;f<p;){if(this.canParse(i,f)){var R=this.appendFrame(r,i,f);R?(this.frameIndex++,o=R.sample.pts,f+=R.length,l=f):f=p}else m.canParse(i,f)?(d=m.getID3Data(i,f),x.samples.push({pts:o,dts:o,data:d}),f+=d.length,l=f):f++;if(f===p&&l!==p){var O=Object(_.sliceUint8)(i,l);this.cachedData?this.cachedData=Object(S.appendUint8Array)(this.cachedData,O):this.cachedData=O}}return{audioTrack:r,avcTrack:Object(y.dummyTrack)(),id3Track:x,textTrack:Object(y.dummyTrack)()}},c.demuxSampleAes=function(i,s,d){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},c.flush=function(i){var s=this.cachedData;return s&&(this.cachedData=null,this.demux(s,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(y.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(y.dummyTrack)()}},c.destroy=function(){},n}(),h=function(c,a){return Object(M.isFiniteNumber)(c)?c*90:a*9e4};g.default=t},"./src/demux/chunk-cache.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"default",function(){return M});var M=function(){function y(){this.chunks=[],this.dataLength=0}var S=y.prototype;return S.push=function(t){this.chunks.push(t),this.dataLength+=t.length},S.flush=function(){var t=this.chunks,h=this.dataLength,n;if(t.length)t.length===1?n=t[0]:n=m(t,h);else return new Uint8Array(0);return this.reset(),n},S.reset=function(){this.chunks.length=0,this.dataLength=0},y}();function m(y,S){for(var _=new Uint8Array(S),t=0,h=0;h<y.length;h++){var n=y[h];_.set(n,t),t+=n.length}return _}},"./src/demux/dummy-demuxed-track.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"dummyTrack",function(){return M});function M(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(k,g,C){"use strict";C.r(g);var M=C("./src/utils/logger.ts"),m=function(){function y(_){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 S=y.prototype;return S.loadWord=function(){var t=this.data,h=this.bytesAvailable,n=t.byteLength-h,c=new Uint8Array(4),a=Math.min(4,h);if(a===0)throw new Error("no bytes available");c.set(t.subarray(n,n+a)),this.word=new DataView(c.buffer).getUint32(0),this.bitsAvailable=a*8,this.bytesAvailable-=a},S.skipBits=function(t){var h;this.bitsAvailable>t?(this.word<<=t,this.bitsAvailable-=t):(t-=this.bitsAvailable,h=t>>3,t-=h>>3,this.bytesAvailable-=h,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)},S.readBits=function(t){var h=Math.min(this.bitsAvailable,t),n=this.word>>>32-h;return t>32&&M.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=h,this.bitsAvailable>0?this.word<<=h:this.bytesAvailable>0&&this.loadWord(),h=t-h,h>0&&this.bitsAvailable?n<<h|this.readBits(h):n},S.skipLZ=function(){var t;for(t=0;t<this.bitsAvailable;++t)if((this.word&2147483648>>>t)!==0)return this.word<<=t,this.bitsAvailable-=t,t;return this.loadWord(),t+this.skipLZ()},S.skipUEG=function(){this.skipBits(1+this.skipLZ())},S.skipEG=function(){this.skipBits(1+this.skipLZ())},S.readUEG=function(){var t=this.skipLZ();return this.readBits(t+1)-1},S.readEG=function(){var t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>1)},S.readBoolean=function(){return this.readBits(1)===1},S.readUByte=function(){return this.readBits(8)},S.readUShort=function(){return this.readBits(16)},S.readUInt=function(){return this.readBits(32)},S.skipScalingList=function(t){for(var h=8,n=8,c,a=0;a<t;a++)n!==0&&(c=this.readEG(),n=(h+c+256)%256),h=n===0?h:n},S.readSPS=function(){var t=0,h=0,n=0,c=0,a,i,s,d=this.readUByte.bind(this),f=this.readBits.bind(this),l=this.readUEG.bind(this),o=this.readBoolean.bind(this),r=this.skipBits.bind(this),x=this.skipEG.bind(this),v=this.skipUEG.bind(this),p=this.skipScalingList.bind(this);d();var R=d();if(f(5),r(3),d(),v(),R===100||R===110||R===122||R===244||R===44||R===83||R===86||R===118||R===128){var O=l();if(O===3&&r(1),v(),v(),r(1),o())for(i=O!==3?8:12,s=0;s<i;s++)o()&&(s<6?p(16):p(64))}v();var b=l();if(b===0)l();else if(b===1)for(r(1),x(),x(),a=l(),s=0;s<a;s++)x();v(),r(1);var E=l(),w=l(),T=f(1);T===0&&r(1),r(1),o()&&(t=l(),h=l(),n=l(),c=l());var F=[1,1];if(o()&&o()){var N=d();switch(N){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=[d()<<8|d(),d()<<8|d()];break}}}return{width:Math.ceil((E+1)*16-t*2-h*2),height:(2-T)*(w+1)*16-(T?2:4)*(n+c),pixelRatio:F}},S.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},y}();g.default=m},"./src/demux/id3.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"isHeader",function(){return M}),C.d(g,"isFooter",function(){return m}),C.d(g,"getID3Data",function(){return y}),C.d(g,"canParse",function(){return _}),C.d(g,"getTimeStamp",function(){return t}),C.d(g,"isTimeStampFrame",function(){return h}),C.d(g,"getID3Frames",function(){return c}),C.d(g,"decodeFrame",function(){return a}),C.d(g,"utf8ArrayToStr",function(){return l}),C.d(g,"testables",function(){return o});var M=function(p,R){return R+10<=p.length&&(p[R]===73&&p[R+1]===68&&p[R+2]===51&&(p[R+3]<255&&p[R+4]<255&&(p[R+6]<128&&p[R+7]<128&&p[R+8]<128&&p[R+9]<128)))},m=function(p,R){return R+10<=p.length&&(p[R]===51&&p[R+1]===68&&p[R+2]===73&&(p[R+3]<255&&p[R+4]<255&&(p[R+6]<128&&p[R+7]<128&&p[R+8]<128&&p[R+9]<128)))},y=function(p,R){for(var O=R,b=0;M(p,R);){b+=10;var E=S(p,R+6);b+=E,m(p,R+10)&&(b+=10),R+=b}return b>0?p.subarray(O,O+b):void 0},S=function(p,R){var O=0;return O=(p[R]&127)<<21,O|=(p[R+1]&127)<<14,O|=(p[R+2]&127)<<7,O|=p[R+3]&127,O},_=function(p,R){return M(p,R)&&S(p,R+6)+10<=p.length-R},t=function(p){for(var R=c(p),O=0;O<R.length;O++){var b=R[O];if(h(b))return f(b)}return},h=function(p){return p&&p.key==="PRIV"&&p.info==="com.apple.streaming.transportStreamTimestamp"},n=function(p){var R=String.fromCharCode(p[0],p[1],p[2],p[3]),O=S(p,4),b=10;return{type:R,size:O,data:p.subarray(b,b+O)}},c=function(p){for(var R=0,O=[];M(p,R);){var b=S(p,R+6);R+=10;for(var E=R+b;R+8<E;){var w=n(p.subarray(R)),T=a(w);T&&O.push(T),R+=w.size+10}m(p,R)&&(R+=10)}return O},a=function(p){return p.type==="PRIV"?i(p):p.type[0]==="W"?d(p):s(p)},i=function(p){if(p.size<2)return;var R=l(p.data,!0),O=new Uint8Array(p.data.subarray(R.length+1));return{key:p.type,info:R,data:O.buffer}},s=function(p){if(p.size<2)return;if(p.type==="TXXX"){var R=1,O=l(p.data.subarray(R),!0);R+=O.length+1;var b=l(p.data.subarray(R));return{key:p.type,info:O,data:b}}var E=l(p.data.subarray(1));return{key:p.type,data:E}},d=function(p){if(p.type==="WXXX"){if(p.size<2)return;var R=1,O=l(p.data.subarray(R),!0);R+=O.length+1;var b=l(p.data.subarray(R));return{key:p.type,info:O,data:b}}var E=l(p.data);return{key:p.type,data:E}},f=function(p){if(p.data.byteLength===8){var R=new Uint8Array(p.data),O=R[3]&1,b=(R[4]<<23)+(R[5]<<15)+(R[6]<<7)+R[7];return b/=45,O&&(b+=4772185884e-2),Math.round(b)}return},l=function(p,R){R===void 0&&(R=!1);var O=x();if(O){var b=O.decode(p);if(R){var E=b.indexOf("\0");return E!==-1?b.substring(0,E):b}return b.replace(/\0/g,"")}for(var w=p.length,T,F,N,L="",G=0;G<w;){if(T=p[G++],T===0&&R)return L;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:L+=String.fromCharCode(T);break;case 12:case 13:F=p[G++],L+=String.fromCharCode((T&31)<<6|F&63);break;case 14:F=p[G++],N=p[G++],L+=String.fromCharCode((T&15)<<12|(F&63)<<6|(N&63)<<0);break;default:}}return L},o={decodeTextFrame:s},r;function x(){return!r&&typeof self.TextDecoder!="undefined"&&(r=new self.TextDecoder("utf-8")),r}},"./src/demux/mp3demuxer.ts":function(k,g,C){"use strict";C.r(g);var M=C("./src/demux/base-audio-demuxer.ts"),m=C("./src/demux/id3.ts"),y=C("./src/utils/logger.ts"),S=C("./src/demux/mpegaudio.ts");function _(n,c){n.prototype=Object.create(c.prototype),n.prototype.constructor=n,t(n,c)}function t(n,c){return t=Object.setPrototypeOf||function(i,s){return i.__proto__=s,i},t(n,c)}var h=function(n){_(c,n);function c(){return n.apply(this,arguments)||this}var a=c.prototype;return a.resetInitSegment=function(s,d,f){n.prototype.resetInitSegment.call(this,s,d,f),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:s,duration:f,inputTimeScale:9e4,dropped:0}},c.probe=function(s){if(!s)return!1;for(var d=m.getID3Data(s,0)||[],f=d.length,l=s.length;f<l;f++)if(S.probe(s,f))return y.logger.log("MPEG Audio sync word found !"),!0;return!1},a.canParse=function(s,d){return S.canParse(s,d)},a.appendFrame=function(s,d,f){return this.initPTS===null?void 0:S.appendFrame(s,d,f,this.initPTS,this.frameIndex)},c}(M.default);h.minProbeByteLength=4,g.default=h},"./src/demux/mp4demuxer.ts":function(k,g,C){"use strict";C.r(g);var M=C("./src/utils/mp4-tools.ts"),m=C("./src/demux/dummy-demuxed-track.ts"),y=function(){function S(t,h){this.remainderData=null,this.config=void 0,this.config=h}var _=S.prototype;return _.resetTimeStamp=function(){},_.resetInitSegment=function(){},_.resetContiguity=function(){},S.probe=function(h){return Object(M.findBox)({data:h,start:0,end:Math.min(h.length,16384)},["moof"]).length>0},_.demux=function(h){var n=h,c=Object(m.dummyTrack)();if(this.config.progressive){this.remainderData&&(n=Object(M.appendUint8Array)(this.remainderData,h));var a=Object(M.segmentValidRange)(n);this.remainderData=a.remainder,c.samples=a.valid||new Uint8Array}else c.samples=n;return{audioTrack:Object(m.dummyTrack)(),avcTrack:c,id3Track:Object(m.dummyTrack)(),textTrack:Object(m.dummyTrack)()}},_.flush=function(){var h=Object(m.dummyTrack)();return h.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(m.dummyTrack)(),avcTrack:h,id3Track:Object(m.dummyTrack)(),textTrack:Object(m.dummyTrack)()}},_.demuxSampleAes=function(h,n,c){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},_.destroy=function(){},S}();y.minProbeByteLength=1024,g.default=y},"./src/demux/mpegaudio.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"appendFrame",function(){return t}),C.d(g,"parseHeader",function(){return h}),C.d(g,"isHeaderPattern",function(){return n}),C.d(g,"isHeader",function(){return c}),C.d(g,"canParse",function(){return a}),C.d(g,"probe",function(){return i});var M=null,m=[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],y=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],S=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],_=[0,1,1,4];function t(s,d,f,l,o){if(f+24>d.length)return;var r=h(d,f);if(r&&f+r.frameLength<=d.length){var x=r.samplesPerFrame*9e4/r.sampleRate,v=l+o*x,p={unit:d.subarray(f,f+r.frameLength),pts:v,dts:v};return s.config=[],s.channelCount=r.channelCount,s.samplerate=r.sampleRate,s.samples.push(p),{sample:p,length:r.frameLength,missing:0}}}function h(s,d){var f=s[d+1]>>3&3,l=s[d+1]>>1&3,o=s[d+2]>>4&15,r=s[d+2]>>2&3;if(f!==1&&o!==0&&o!==15&&r!==3){var x=s[d+2]>>1&1,v=s[d+3]>>6,p=f===3?3-l:l===3?3:4,R=m[p*14+o-1]*1e3,O=f===3?0:f===2?1:2,b=y[O*3+r],E=v===3?1:2,w=S[f][l],T=_[l],F=w*8*T,N=Math.floor(w*R/b+x)*T;if(M===null){var L=navigator.userAgent||"",G=L.match(/Chrome\/(\d+)/i);M=G?parseInt(G[1]):0}var z=!!M&&M<=87;return z&&l===2&&R>=224e3&&v===0&&(s[d+3]=s[d+3]|128),{sampleRate:b,channelCount:E,frameLength:N,samplesPerFrame:F}}}function n(s,d){return s[d]===255&&(s[d+1]&224)===224&&(s[d+1]&6)!==0}function c(s,d){return d+1<s.length&&n(s,d)}function a(s,d){var f=4;return n(s,d)&&f<=s.length-d}function i(s,d){if(d+1<s.length&&n(s,d)){var f=4,l=h(s,d),o=f;l!=null&&l.frameLength&&(o=l.frameLength);var r=d+o;return r===s.length||c(s,r)}return!1}},"./src/demux/sample-aes.ts":function(k,g,C){"use strict";C.r(g);var M=C("./src/crypt/decrypter.ts"),m=C("./src/demux/tsdemuxer.ts"),y=function(){function S(t,h,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new M.default(t,h,{removePKCS7Padding:!1})}var _=S.prototype;return _.decryptBuffer=function(h,n){this.decrypter.decrypt(h,this.keyData.key.buffer,this.keyData.iv.buffer,n)},_.decryptAacSample=function(h,n,c,a){var i=h[n].unit,s=i.subarray(16,i.length-i.length%16),d=s.buffer.slice(s.byteOffset,s.byteOffset+s.length),f=this;this.decryptBuffer(d,function(l){var o=new Uint8Array(l);i.set(o,16),a||f.decryptAacSamples(h,n+1,c)})},_.decryptAacSamples=function(h,n,c){for(;;n++){if(n>=h.length){c();return}if(h[n].unit.length<32)continue;var a=this.decrypter.isSync();if(this.decryptAacSample(h,n,c,a),!a)return}},_.getAvcEncryptedData=function(h){for(var n=Math.floor((h.length-48)/160)*16+16,c=new Int8Array(n),a=0,i=32;i<=h.length-16;i+=160,a+=16)c.set(h.subarray(i,i+16),a);return c},_.getAvcDecryptedUnit=function(h,n){for(var c=new Uint8Array(n),a=0,i=32;i<=h.length-16;i+=160,a+=16)h.set(c.subarray(a,a+16),i);return h},_.decryptAvcSample=function(h,n,c,a,i,s){var d=Object(m.discardEPB)(i.data),f=this.getAvcEncryptedData(d),l=this;this.decryptBuffer(f.buffer,function(o){i.data=l.getAvcDecryptedUnit(d,o),s||l.decryptAvcSamples(h,n,c+1,a)})},_.decryptAvcSamples=function(h,n,c,a){if(h instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;n++,c=0){if(n>=h.length){a();return}for(var i=h[n].units;!(c>=i.length);c++){var s=i[c];if(s.data.length<=48||s.type!==1&&s.type!==5)continue;var d=this.decrypter.isSync();if(this.decryptAvcSample(h,n,c,a,s,d),!d)return}}},S}();g.default=y},"./src/demux/transmuxer-interface.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"default",function(){return i});var M=C("./node_modules/webworkify-webpack/index.js"),m=C.n(M),y=C("./src/events.ts"),S=C("./src/demux/transmuxer.ts"),_=C("./src/utils/logger.ts"),t=C("./src/errors.ts"),h=C("./src/utils/mediasource-helper.ts"),n=C("./node_modules/eventemitter3/index.js"),c=C.n(n),a=Object(h.getMediaSource)()||{isTypeSupported:function(){return!1}},i=function(){function s(f,l,o,r){var x=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=f,this.id=l,this.onTransmuxComplete=o,this.onFlush=r;var v=f.config,p=function(w,T){T=T||{},T.frag=x.frag,T.id=x.id,f.trigger(w,T)};this.observer=new n.EventEmitter,this.observer.on(y.Events.FRAG_DECRYPTED,p),this.observer.on(y.Events.ERROR,p);var R={mp4:a.isTypeSupported("video/mp4"),mpeg:a.isTypeSupported("audio/mpeg"),mp3:a.isTypeSupported('audio/mp4; codecs="mp3"')},O=navigator.vendor;if(v.enableWorker&&typeof Worker!="undefined"){_.logger.log("demuxing in webworker");var b;try{b=this.worker=M("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),b.addEventListener("message",this.onwmsg),b.onerror=function(E){f.trigger(y.Events.ERROR,{type:t.ErrorTypes.OTHER_ERROR,details:t.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(E.message+" ("+E.filename+":"+E.lineno+")")})},b.postMessage({cmd:"init",typeSupported:R,vendor:O,id:l,config:JSON.stringify(v)})}catch(E){_.logger.warn("Error in worker:",E),_.logger.error("Error while initializing DemuxerWorker, fallback to inline"),b&&self.URL.revokeObjectURL(b.objectURL),this.transmuxer=new S.default(this.observer,R,v,O,l),this.worker=null}}else this.transmuxer=new S.default(this.observer,R,v,O,l)}var d=s.prototype;return d.destroy=function(){var l=this.worker;if(l)l.removeEventListener("message",this.onwmsg),l.terminate(),this.worker=null;else{var o=this.transmuxer;o&&(o.destroy(),this.transmuxer=null)}var r=this.observer;r&&r.removeAllListeners(),this.observer=null},d.push=function(l,o,r,x,v,p,R,O,b,E){var w=this;b.transmuxing.start=self.performance.now();var T=this.transmuxer,F=this.worker,N=p?p.start:v.start,L=v.decryptdata,G=this.frag,z=!(G&&v.cc===G.cc),A=!(G&&b.level===G.level),B=G?b.sn-G.sn:-1,U=this.part?b.part-this.part.index:1,I=!A&&(B===1||B===0&&U===1),K=self.performance.now();(A||B||v.stats.parsing.start===0)&&(v.stats.parsing.start=K),p&&(U||!I)&&(p.stats.parsing.start=K);var Z=new S.TransmuxState(z,I,O,A,N);if(!I||z){_.logger.log("[transmuxer-interface, "+v.type+"]: Starting new transmux session for sn: "+b.sn+" p: "+b.part+" level: "+b.level+" id: "+b.id+`
discontinuity: `+z+`
trackSwitch: `+A+`
contiguous: `+I+`
accurateTimeOffset: `+O+`
timeOffset: `+N);var ue=new S.TransmuxConfig(r,x,o,R,E);this.configureTransmuxer(ue)}if(this.frag=v,this.part=p,F)F.postMessage({cmd:"demux",data:l,decryptdata:L,chunkMeta:b,state:Z},l instanceof ArrayBuffer?[l]:[]);else if(T){var de=T.push(l,L,b,Z);Object(S.isPromise)(de)?de.then(function(Ce){w.handleTransmuxComplete(Ce)}):this.handleTransmuxComplete(de)}},d.flush=function(l){var o=this;l.transmuxing.start=self.performance.now();var r=this.transmuxer,x=this.worker;if(x)x.postMessage({cmd:"flush",chunkMeta:l});else if(r){var v=r.flush(l);Object(S.isPromise)(v)?v.then(function(p){o.handleFlushResult(p,l)}):this.handleFlushResult(v,l)}},d.handleFlushResult=function(l,o){var r=this;l.forEach(function(x){r.handleTransmuxComplete(x)}),this.onFlush(o)},d.onWorkerMessage=function(l){var o=l.data,r=this.hls;switch(o.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(o.data);break}case"flush":{this.onFlush(o.data);break}default:{o.data=o.data||{},o.data.frag=this.frag,o.data.id=this.id,r.trigger(o.event,o.data);break}}},d.configureTransmuxer=function(l){var o=this.worker,r=this.transmuxer;o?o.postMessage({cmd:"configure",config:l}):r&&r.configure(l)},d.handleTransmuxComplete=function(l){l.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(l)},s}()},"./src/demux/transmuxer-worker.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"default",function(){return t});var M=C("./src/demux/transmuxer.ts"),m=C("./src/events.ts"),y=C("./src/utils/logger.ts"),S=C("./node_modules/eventemitter3/index.js"),_=C.n(S);function t(i){var s=new S.EventEmitter,d=function(l,o){i.postMessage({event:l,data:o})};s.on(m.Events.FRAG_DECRYPTED,d),s.on(m.Events.ERROR,d),i.addEventListener("message",function(f){var l=f.data;switch(l.cmd){case"init":{var o=JSON.parse(l.config);i.transmuxer=new M.default(s,l.typeSupported,o,l.vendor,l.id),Object(y.enableLogs)(o.debug),d("init",null);break}case"configure":{i.transmuxer.configure(l.config);break}case"demux":{var r=i.transmuxer.push(l.data,l.decryptdata,l.chunkMeta,l.state);Object(M.isPromise)(r)?r.then(function(p){h(i,p)}):h(i,r);break}case"flush":{var x=l.chunkMeta,v=i.transmuxer.flush(x);Object(M.isPromise)(v)?v.then(function(p){c(i,p,x)}):c(i,v,x);break}default:break}})}function h(i,s){if(a(s.remuxResult))return;var d=[],f=s.remuxResult,l=f.audio,o=f.video;l&&n(d,l),o&&n(d,o),i.postMessage({event:"transmuxComplete",data:s},d)}function n(i,s){s.data1&&i.push(s.data1.buffer),s.data2&&i.push(s.data2.buffer)}function c(i,s,d){s.forEach(function(f){h(i,f)}),i.postMessage({event:"flush",data:d})}function a(i){return!i.audio&&!i.video&&!i.text&&!i.id3&&!i.initSegment}},"./src/demux/transmuxer.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"default",function(){return o}),C.d(g,"isPromise",function(){return v}),C.d(g,"TransmuxConfig",function(){return p}),C.d(g,"TransmuxState",function(){return R});var M=C("./src/events.ts"),m=C("./src/errors.ts"),y=C("./src/crypt/decrypter.ts"),S=C("./src/demux/aacdemuxer.ts"),_=C("./src/demux/mp4demuxer.ts"),t=C("./src/demux/tsdemuxer.ts"),h=C("./src/demux/mp3demuxer.ts"),n=C("./src/remux/mp4-remuxer.ts"),c=C("./src/remux/passthrough-remuxer.ts"),a=C("./src/demux/chunk-cache.ts"),i=C("./src/utils/mp4-tools.ts"),s=C("./src/utils/logger.ts"),d;try{d=self.performance.now.bind(self.performance)}catch(O){s.logger.debug("Unable to use Performance API on this environment"),d=self.Date.now}var f=[{demux:t.default,remux:n.default},{demux:_.default,remux:c.default},{demux:S.default,remux:n.default},{demux:h.default,remux:n.default}],l=1024;f.forEach(function(O){var b=O.demux;l=Math.max(l,b.minProbeByteLength)});var o=function(){function O(E,w,T,F,N){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 a.default,this.observer=E,this.typeSupported=w,this.config=T,this.vendor=F,this.id=N}var b=O.prototype;return b.configure=function(w){this.transmuxConfig=w,this.decrypter&&this.decrypter.reset()},b.push=function(w,T,F,N){var L=this,G=F.transmuxing;G.executeStart=d();var z=new Uint8Array(w),A=this.cache,B=this.config,U=this.currentTransmuxState,I=this.transmuxConfig;N&&(this.currentTransmuxState=N);var K=r(z,T);if(K&&K.method==="AES-128"){var Z=this.getDecrypter();if(B.enableSoftwareAES){var ue=Z.softwareDecrypt(z,K.key.buffer,K.iv.buffer);if(!ue)return G.executeEnd=d(),x(F);z=new Uint8Array(ue)}else return this.decryptionPromise=Z.webCryptoDecrypt(z,K.key.buffer,K.iv.buffer).then(function(q){var Y=L.push(q,null,F);return L.decryptionPromise=null,Y}),this.decryptionPromise}var de=N||U,Ce=de.contiguous,Re=de.discontinuity,me=de.trackSwitch,Oe=de.accurateTimeOffset,be=de.timeOffset,ce=I.audioCodec,se=I.videoCodec,ne=I.defaultInitPts,ge=I.duration,ee=I.initSegmentData;if((Re||me)&&this.resetInitSegment(ee,ce,se,ge),Re&&this.resetInitialTimestamp(ne),Ce||this.resetContiguity(),this.needsProbing(z,Re,me)){if(A.dataLength){var re=A.flush();z=Object(i.appendUint8Array)(re,z)}this.configureTransmuxer(z,I)}var Te=this.transmux(z,K,be,Oe,F),ie=this.currentTransmuxState;return ie.contiguous=!0,ie.discontinuity=!1,ie.trackSwitch=!1,G.executeEnd=d(),Te},b.flush=function(w){var T=this,F=w.transmuxing;F.executeStart=d();var N=this.decrypter,L=this.cache,G=this.currentTransmuxState,z=this.decryptionPromise;if(z)return z.then(function(){return T.flush(w)});var A=[],B=G.timeOffset;if(N){var U=N.flush();U&&A.push(this.push(U,null,w))}var I=L.dataLength;L.reset();var K=this.demuxer,Z=this.remuxer;if(!K||!Z)return I>=l&&this.observer.emit(M.Events.ERROR,M.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),F.executeEnd=d(),[x(w)];var ue=K.flush(B);return v(ue)?ue.then(function(de){return T.flushRemux(A,de,w),A}):(this.flushRemux(A,ue,w),A)},b.flushRemux=function(w,T,F){var N=T.audioTrack,L=T.avcTrack,G=T.id3Track,z=T.textTrack,A=this.currentTransmuxState,B=A.accurateTimeOffset,U=A.timeOffset;s.logger.log("[transmuxer.ts]: Flushed fragment "+F.sn+(F.part>-1?" p: "+F.part:"")+" of level "+F.level);var I=this.remuxer.remux(N,L,G,z,U,B,!0,this.id);w.push({remuxResult:I,chunkMeta:F}),F.transmuxing.executeEnd=d()},b.resetInitialTimestamp=function(w){var T=this.demuxer,F=this.remuxer;if(!T||!F)return;T.resetTimeStamp(w),F.resetTimeStamp(w)},b.resetContiguity=function(){var w=this.demuxer,T=this.remuxer;if(!w||!T)return;w.resetContiguity(),T.resetNextTimestamp()},b.resetInitSegment=function(w,T,F,N){var L=this.demuxer,G=this.remuxer;if(!L||!G)return;L.resetInitSegment(T,F,N),G.resetInitSegment(w,T,F)},b.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},b.transmux=function(w,T,F,N,L){var G;return T&&T.method==="SAMPLE-AES"?G=this.transmuxSampleAes(w,T,F,N,L):G=this.transmuxUnencrypted(w,F,N,L),G},b.transmuxUnencrypted=function(w,T,F,N){var L=this.demuxer.demux(w,T,!1,!this.config.progressive),G=L.audioTrack,z=L.avcTrack,A=L.id3Track,B=L.textTrack,U=this.remuxer.remux(G,z,A,B,T,F,!1,this.id);return{remuxResult:U,chunkMeta:N}},b.transmuxSampleAes=function(w,T,F,N,L){var G=this;return this.demuxer.demuxSampleAes(w,T,F).then(function(z){var A=G.remuxer.remux(z.audioTrack,z.avcTrack,z.id3Track,z.textTrack,F,N,!1,G.id);return{remuxResult:A,chunkMeta:L}})},b.configureTransmuxer=function(w,T){for(var F=this.config,N=this.observer,L=this.typeSupported,G=this.vendor,z=T.audioCodec,A=T.defaultInitPts,B=T.duration,U=T.initSegmentData,I=T.videoCodec,K,Z=0,ue=f.length;Z<ue;Z++)if(f[Z].demux.probe(w)){K=f[Z];break}K||(s.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),K={demux:_.default,remux:c.default});var de=this.demuxer,Ce=this.remuxer,Re=K.remux,me=K.demux;(!Ce||!(Ce instanceof Re))&&(this.remuxer=new Re(N,F,L,G)),(!de||!(de instanceof me))&&(this.demuxer=new me(N,F,L),this.probe=me.probe),this.resetInitSegment(U,z,I,B),this.resetInitialTimestamp(A)},b.needsProbing=function(w,T,F){return!this.demuxer||!this.remuxer||T||F},b.getDecrypter=function(){var w=this.decrypter;return w||(w=this.decrypter=new y.default(this.observer,this.config)),w},O}();function r(O,b){var E=null;return O.byteLength>0&&b!=null&&b.key!=null&&b.iv!==null&&b.method!=null&&(E=b),E}var x=function(b){return{remuxResult:{},chunkMeta:b}};function v(O){return"then"in O&&O.then instanceof Function}var p=function(b,E,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=b,this.videoCodec=E,this.initSegmentData=w,this.duration=T,this.defaultInitPts=F},R=function(b,E,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=b,this.contiguous=E,this.accurateTimeOffset=w,this.trackSwitch=T,this.timeOffset=F}},"./src/demux/tsdemuxer.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"discardEPB",function(){return x});var M=C("./src/demux/adts.ts"),m=C("./src/demux/mpegaudio.ts"),y=C("./src/demux/exp-golomb.ts"),S=C("./src/demux/id3.ts"),_=C("./src/demux/sample-aes.ts"),t=C("./src/events.ts"),h=C("./src/utils/mp4-tools.ts"),n=C("./src/utils/logger.ts"),c=C("./src/errors.ts"),a={video:1,audio:2,id3:3,text:4},i=function(){function v(R,O,b){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=R,this.config=O,this.typeSupported=b}v.probe=function(O){var b=v.syncOffset(O);return b<0?!1:(b&&n.logger.warn("MPEG2-TS detected but first sync word found @ offset "+b+", junk ahead ?"),!0)},v.syncOffset=function(O){for(var b=Math.min(1e3,O.length-3*188),E=0;E<b;){if(O[E]===71&&O[E+188]===71&&O[E+2*188]===71)return E;E++}return-1},v.createTrack=function(O,b){return{container:O==="video"||O==="audio"?"video/mp2t":void 0,type:O,id:a[O],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:O==="audio"?b:void 0}};var p=v.prototype;return p.resetInitSegment=function(O,b,E){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=v.createTrack("video",E),this._audioTrack=v.createTrack("audio",E),this._id3Track=v.createTrack("id3",E),this._txtTrack=v.createTrack("text",E),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=O,this.videoCodec=b,this._duration=E},p.resetTimeStamp=function(){},p.resetContiguity=function(){var O=this._audioTrack,b=this._avcTrack,E=this._id3Track;O&&(O.pesData=null),b&&(b.pesData=null),E&&(E.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},p.demux=function(O,b,E,w){E===void 0&&(E=!1),w===void 0&&(w=!1),E||(this.sampleAes=null);var T,F=this._avcTrack,N=this._audioTrack,L=this._id3Track,G=F.pid,z=F.pesData,A=N.pid,B=L.pid,U=N.pesData,I=L.pesData,K=!1,Z=this.pmtParsed,ue=this._pmtId,de=O.length;if(this.remainderData&&(O=Object(h.appendUint8Array)(this.remainderData,O),de=O.length,this.remainderData=null),de<188&&!w)return this.remainderData=O,{audioTrack:N,avcTrack:F,id3Track:L,textTrack:this._txtTrack};var Ce=Math.max(0,v.syncOffset(O));de-=(de+Ce)%188,de<O.byteLength&&!w&&(this.remainderData=new Uint8Array(O.buffer,de,O.buffer.byteLength-de));for(var Re=Ce;Re<de;Re+=188)if(O[Re]===71){var me=!!(O[Re+1]&64),Oe=((O[Re+1]&31)<<8)+O[Re+2],be=(O[Re+3]&48)>>4,ce=void 0;if(be>1){if(ce=Re+5+O[Re+4],ce===Re+188)continue}else ce=Re+4;switch(Oe){case G:me&&(z&&(T=l(z))&&this.parseAVCPES(T,!1),z={data:[],size:0}),z&&(z.data.push(O.subarray(ce,Re+188)),z.size+=Re+188-ce);break;case A:me&&(U&&(T=l(U))&&(N.isAAC?this.parseAACPES(T):this.parseMPEGPES(T)),U={data:[],size:0}),U&&(U.data.push(O.subarray(ce,Re+188)),U.size+=Re+188-ce);break;case B:me&&(I&&(T=l(I))&&this.parseID3PES(T),I={data:[],size:0}),I&&(I.data.push(O.subarray(ce,Re+188)),I.size+=Re+188-ce);break;case 0:me&&(ce+=O[ce]+1),ue=this._pmtId=d(O,ce);break;case ue:{me&&(ce+=O[ce]+1);var se=f(O,ce,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,E);G=se.avc,G>0&&(F.pid=G),A=se.audio,A>0&&(N.pid=A,N.isAAC=se.isAAC),B=se.id3,B>0&&(L.pid=B),K&&!Z&&(n.logger.log("reparse from beginning"),K=!1,Re=Ce-188),Z=this.pmtParsed=!0;break}case 17:case 8191:break;default:K=!0;break}}else this.observer.emit(t.Events.ERROR,t.Events.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});F.pesData=z,N.pesData=U,L.pesData=I;var ne={audioTrack:N,avcTrack:F,id3Track:L,textTrack:this._txtTrack};return w&&this.extractRemainingSamples(ne),ne},p.flush=function(){var O=this.remainderData;this.remainderData=null;var b;return O?b=this.demux(O,-1,!1,!0):b={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(b),this.sampleAes?this.decrypt(b,this.sampleAes):b},p.extractRemainingSamples=function(O){var b=O.audioTrack,E=O.avcTrack,w=O.id3Track,T=E.pesData,F=b.pesData,N=w.pesData,L;T&&(L=l(T))?(this.parseAVCPES(L,!0),E.pesData=null):E.pesData=T,F&&(L=l(F))?(b.isAAC?this.parseAACPES(L):this.parseMPEGPES(L),b.pesData=null):(F!=null&&F.size&&n.logger.log("last AAC PES packet truncated,might overlap between fragments"),b.pesData=F),N&&(L=l(N))?(this.parseID3PES(L),w.pesData=null):w.pesData=N},p.demuxSampleAes=function(O,b,E){var w=this.demux(O,E,!0,!this.config.progressive),T=this.sampleAes=new _.default(this.observer,this.config,b);return this.decrypt(w,T)},p.decrypt=function(O,b){return new Promise(function(E){var w=O.audioTrack,T=O.avcTrack;w.samples&&w.isAAC?b.decryptAacSamples(w.samples,0,function(){T.samples?b.decryptAvcSamples(T.samples,0,0,function(){E(O)}):E(O)}):T.samples&&b.decryptAvcSamples(T.samples,0,0,function(){E(O)})})},p.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},p.parseAVCPES=function(O,b){var E=this,w=this._avcTrack,T=this.parseAVCNALu(O.data),F=!1,N=this.avcSample,L,G=!1;O.data=null,N&&T.length&&!w.audFound&&(o(N,w),N=this.avcSample=s(!1,O.pts,O.dts,"")),T.forEach(function(z){switch(z.type){case 1:{L=!0,N||(N=E.avcSample=s(!0,O.pts,O.dts,"")),F&&(N.debug+="NDR "),N.frame=!0;var A=z.data;if(G&&A.length>4){var B=new y.default(A).readSliceType();(B===2||B===4||B===7||B===9)&&(N.key=!0)}break}case 5:L=!0,N||(N=E.avcSample=s(!0,O.pts,O.dts,"")),F&&(N.debug+="IDR "),N.key=!0,N.frame=!0;break;case 6:{L=!0,F&&N&&(N.debug+="SEI ");var U=new y.default(x(z.data));U.readUByte();for(var I=0,K=0,Z=!1,ue=0;!Z&&U.bytesAvailable>1;){I=0;do ue=U.readUByte(),I+=ue;while(ue===255);K=0;do ue=U.readUByte(),K+=ue;while(ue===255);if(I===4&&U.bytesAvailable!==0){Z=!0;var de=U.readUByte();if(de===181){var Ce=U.readUShort();if(Ce===49){var Re=U.readUInt();if(Re===1195456820){var me=U.readUByte();if(me===3){for(var Oe=U.readUByte(),be=U.readUByte(),ce=31&Oe,se=[Oe,be],ne=0;ne<ce;ne++)se.push(U.readUByte()),se.push(U.readUByte()),se.push(U.readUByte());r(E._txtTrack.samples,{type:3,pts:O.pts,bytes:se})}}}}}else if(I===5&&U.bytesAvailable!==0){if(Z=!0,K>16){for(var ge=[],ee=0;ee<16;ee++)ge.push(U.readUByte().toString(16)),(ee===3||ee===5||ee===7||ee===9)&&ge.push("-");for(var re=K-16,Te=new Uint8Array(re),ie=0;ie<re;ie++)Te[ie]=U.readUByte();r(E._txtTrack.samples,{pts:O.pts,payloadType:I,uuid:ge.join(""),userData:Object(S.utf8ArrayToStr)(Te),userDataBytes:Te})}}else if(K<U.bytesAvailable)for(var q=0;q<K;q++)U.readUByte()}break}case 7:if(L=!0,G=!0,F&&N&&(N.debug+="SPS "),!w.sps){var Y=new y.default(z.data),X=Y.readSPS();w.width=X.width,w.height=X.height,w.pixelRatio=X.pixelRatio,w.sps=[z.data],w.duration=E._duration;for(var he=z.data.subarray(1,4),fe="avc1.",Ee=0;Ee<3;Ee++){var He=he[Ee].toString(16);He.length<2&&(He="0"+He),fe+=He}w.codec=fe}break;case 8:L=!0,F&&N&&(N.debug+="PPS "),w.pps||(w.pps=[z.data]);break;case 9:L=!1,w.audFound=!0,N&&o(N,w),N=E.avcSample=s(!1,O.pts,O.dts,F?"AUD ":"");break;case 12:L=!1;break;default:L=!1,N&&(N.debug+="unknown NAL "+z.type+" ");break}if(N&&L){var Qe=N.units;Qe.push(z)}}),b&&N&&(o(N,w),this.avcSample=null)},p.getLastNalUnit=function(){var O,b=this.avcSample,E;if(!b||b.units.length===0){var w=this._avcTrack.samples;b=w[w.length-1]}if((O=b)!==null&&O!==void 0&&O.units){var T=b.units;E=T[T.length-1]}return E},p.parseAVCNALu=function(O){var b=O.byteLength,E=this._avcTrack,w=E.naluState||0,T=w,F=[],N=0,L,G,z,A=-1,B=0;for(w===-1&&(A=0,B=O[0]&31,w=0,N=1);N<b;){if(L=O[N++],!w){w=L?0:1;continue}if(w===1){w=L?0:2;continue}if(!L)w=3;else if(L===1){if(A>=0){var U={data:O.subarray(A,N-w-1),type:B};F.push(U)}else{var I=this.getLastNalUnit();if(I&&(T&&N<=4-T&&(I.state&&(I.data=I.data.subarray(0,I.data.byteLength-T))),G=N-w-1,G>0)){var K=new Uint8Array(I.data.byteLength+G);K.set(I.data,0),K.set(O.subarray(0,G),I.data.byteLength),I.data=K,I.state=0}}N<b?(z=O[N]&31,A=N,B=z,w=0):w=-1}else w=0}if(A>=0&&w>=0){var Z={data:O.subarray(A,b),type:B,state:w};F.push(Z)}if(F.length===0){var ue=this.getLastNalUnit();if(ue){var de=new Uint8Array(ue.data.byteLength+O.byteLength);de.set(ue.data,0),de.set(O,ue.data.byteLength),ue.data=de}}return E.naluState=w,F},p.parseAACPES=function(O){var b=0,E=this._audioTrack,w=this.aacOverFlow,T=O.data;if(w){this.aacOverFlow=null;var F=w.sample.unit.byteLength,N=Math.min(w.missing,F),L=F-N;w.sample.unit.set(T.subarray(0,N),L),E.samples.push(w.sample),b=w.missing}var G,z;for(G=b,z=T.length;G<z-1&&!M.isHeader(T,G);G++);if(G!==b){var A,B;if(G<z-1?(A="AAC PES did not start with ADTS header,offset:"+G,B=!1):(A="no ADTS header found in AAC PES",B=!0),n.logger.warn("parsing error:"+A),this.observer.emit(t.Events.ERROR,t.Events.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.FRAG_PARSING_ERROR,fatal:B,reason:A}),B)return}M.initTrackConfig(E,this.observer,T,G,this.audioCodec);var U;if(O.pts!==void 0)U=O.pts;else if(w){var I=M.getFrameDuration(E.samplerate);U=w.sample.pts+I}else{n.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var K=0;G<z;)if(M.isHeader(T,G)){if(G+5<z){var Z=M.appendFrame(E,T,G,U,K);if(Z)if(Z.missing)this.aacOverFlow=Z;else{G+=Z.length,K++;continue}}break}else G++},p.parseMPEGPES=function(O){var b=O.data,E=b.length,w=0,T=0,F=O.pts;if(F===void 0){n.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;T<E;)if(m.isHeader(b,T)){var N=m.appendFrame(this._audioTrack,b,T,F,w);if(N)T+=N.length,w++;else break}else T++},p.parseID3PES=function(O){if(O.pts===void 0){n.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(O)},v}();i.minProbeByteLength=188;function s(v,p,R,O){return{key:v,frame:!1,pts:p,dts:R,units:[],debug:O,length:0}}function d(v,p){return(v[p+10]&31)<<8|v[p+11]}function f(v,p,R,O){var b={audio:-1,avc:-1,id3:-1,isAAC:!0},E=(v[p+1]&15)<<8|v[p+2],w=p+3+E-4,T=(v[p+10]&15)<<8|v[p+11];for(p+=12+T;p<w;){var F=(v[p+1]&31)<<8|v[p+2];switch(v[p]){case 207:if(!O){n.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:b.audio===-1&&(b.audio=F);break;case 21:b.id3===-1&&(b.id3=F);break;case 219:if(!O){n.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:b.avc===-1&&(b.avc=F);break;case 3:case 4:R?b.audio===-1&&(b.audio=F,b.isAAC=!1):n.logger.log("MPEG audio found, not supported in this browser");break;case 36:n.logger.warn("Unsupported HEVC stream type found");break;default:break}p+=((v[p+3]&15)<<8|v[p+4])+5}return b}function l(v){var p=0,R,O,b,E,w,T=v.data;if(!v||v.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)}R=T[0];var N=(R[0]<<16)+(R[1]<<8)+R[2];if(N===1){if(O=(R[4]<<8)+R[5],O&&O>v.size-6)return null;var L=R[7];L&192&&(E=(R[9]&14)*536870912+(R[10]&255)*4194304+(R[11]&254)*16384+(R[12]&255)*128+(R[13]&254)/2,L&64?(w=(R[14]&14)*536870912+(R[15]&255)*4194304+(R[16]&254)*16384+(R[17]&255)*128+(R[18]&254)/2,E-w>60*9e4&&(n.logger.warn(Math.round((E-w)/9e4)+"s delta between PTS and DTS, align them"),E=w)):w=E),b=R[8];var G=b+9;if(v.size<=G)return null;v.size-=G;for(var z=new Uint8Array(v.size),A=0,B=T.length;A<B;A++){R=T[A];var U=R.byteLength;if(G)if(G>U){G-=U;continue}else R=R.subarray(G),U-=G,G=0;z.set(R,p),p+=U}return O&&(O-=b+3),{data:z,pts:E,dts:w,len:O}}return null}function o(v,p){if(v.units.length&&v.frame){if(v.pts===void 0){var R=p.samples,O=R.length;if(O){var b=R[O-1];v.pts=b.pts,v.dts=b.dts}else{p.dropped++;return}}p.samples.push(v)}v.debug.length&&n.logger.log(v.pts+"/"+v.dts+":"+v.debug)}function r(v,p){var R=v.length;if(R>0){if(p.pts>=v[R-1].pts)v.push(p);else for(var O=R-1;O>=0;O--)if(p.pts<v[O].pts){v.splice(O,0,p);break}}else v.push(p)}function x(v){for(var p=v.byteLength,R=[],O=1;O<p-2;)v[O]===0&&v[O+1]===0&&v[O+2]===3?(R.push(O+2),O+=2):O++;if(R.length===0)return v;var b=p-R.length,E=new Uint8Array(b),w=0;for(O=0;O<b;w++,O++)w===R[0]&&(w++,R.shift()),E[O]=v[w];return E}g.default=i},"./src/errors.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"ErrorTypes",function(){return M}),C.d(g,"ErrorDetails",function(){return m});var M;(function(y){y.NETWORK_ERROR="networkError",y.MEDIA_ERROR="mediaError",y.KEY_SYSTEM_ERROR="keySystemError",y.MUX_ERROR="muxError",y.OTHER_ERROR="otherError"})(M||(M={}));var m;(function(y){y.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",y.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",y.KEY_SYSTEM_NO_SESSION="keySystemNoSession",y.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",y.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",y.MANIFEST_LOAD_ERROR="manifestLoadError",y.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",y.MANIFEST_PARSING_ERROR="manifestParsingError",y.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",y.LEVEL_EMPTY_ERROR="levelEmptyError",y.LEVEL_LOAD_ERROR="levelLoadError",y.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",y.LEVEL_SWITCH_ERROR="levelSwitchError",y.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",y.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",y.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",y.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",y.FRAG_LOAD_ERROR="fragLoadError",y.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",y.FRAG_DECRYPT_ERROR="fragDecryptError",y.FRAG_PARSING_ERROR="fragParsingError",y.REMUX_ALLOC_ERROR="remuxAllocError",y.KEY_LOAD_ERROR="keyLoadError",y.KEY_LOAD_TIMEOUT="keyLoadTimeOut",y.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",y.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",y.BUFFER_APPEND_ERROR="bufferAppendError",y.BUFFER_APPENDING_ERROR="bufferAppendingError",y.BUFFER_STALLED_ERROR="bufferStalledError",y.BUFFER_FULL_ERROR="bufferFullError",y.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",y.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",y.INTERNAL_EXCEPTION="internalException",y.INTERNAL_ABORTED="aborted",y.UNKNOWN="unknown"})(m||(m={}))},"./src/events.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"Events",function(){return M});var M;(function(m){m.MEDIA_ATTACHING="hlsMediaAttaching",m.MEDIA_ATTACHED="hlsMediaAttached",m.MEDIA_DETACHING="hlsMediaDetaching",m.MEDIA_DETACHED="hlsMediaDetached",m.BUFFER_RESET="hlsBufferReset",m.BUFFER_CODECS="hlsBufferCodecs",m.BUFFER_CREATED="hlsBufferCreated",m.BUFFER_APPENDING="hlsBufferAppending",m.BUFFER_APPENDED="hlsBufferAppended",m.BUFFER_EOS="hlsBufferEos",m.BUFFER_FLUSHING="hlsBufferFlushing",m.BUFFER_FLUSHED="hlsBufferFlushed",m.MANIFEST_LOADING="hlsManifestLoading",m.MANIFEST_LOADED="hlsManifestLoaded",m.MANIFEST_PARSED="hlsManifestParsed",m.LEVEL_SWITCHING="hlsLevelSwitching",m.LEVEL_SWITCHED="hlsLevelSwitched",m.LEVEL_LOADING="hlsLevelLoading",m.LEVEL_LOADED="hlsLevelLoaded",m.LEVEL_UPDATED="hlsLevelUpdated",m.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",m.LEVELS_UPDATED="hlsLevelsUpdated",m.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",m.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",m.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",m.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",m.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",m.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",m.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",m.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",m.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",m.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",m.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",m.CUES_PARSED="hlsCuesParsed",m.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",m.INIT_PTS_FOUND="hlsInitPtsFound",m.FRAG_LOADING="hlsFragLoading",m.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",m.FRAG_LOADED="hlsFragLoaded",m.FRAG_DECRYPTED="hlsFragDecrypted",m.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",m.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",m.FRAG_PARSING_METADATA="hlsFragParsingMetadata",m.FRAG_PARSED="hlsFragParsed",m.FRAG_BUFFERED="hlsFragBuffered",m.FRAG_CHANGED="hlsFragChanged",m.FPS_DROP="hlsFpsDrop",m.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",m.ERROR="hlsError",m.DESTROYING="hlsDestroying",m.KEY_LOADING="hlsKeyLoading",m.KEY_LOADED="hlsKeyLoaded",m.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",m.BACK_BUFFER_REACHED="hlsBackBufferReached"})(M||(M={}))},"./src/hls.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"default",function(){return v});var M=C("./node_modules/url-toolkit/src/url-toolkit.js"),m=C.n(M),y=C("./src/loader/playlist-loader.ts"),S=C("./src/loader/key-loader.ts"),_=C("./src/controller/id3-track-controller.ts"),t=C("./src/controller/latency-controller.ts"),h=C("./src/controller/level-controller.ts"),n=C("./src/controller/fragment-tracker.ts"),c=C("./src/controller/stream-controller.ts"),a=C("./src/is-supported.ts"),i=C("./src/utils/logger.ts"),s=C("./src/config.ts"),d=C("./node_modules/eventemitter3/index.js"),f=C.n(d),l=C("./src/events.ts"),o=C("./src/errors.ts");function r(p,R){for(var O=0;O<R.length;O++){var b=R[O];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(p,b.key,b)}}function x(p,R,O){return R&&r(p.prototype,R),O&&r(p,O),p}var v=function(){p.isSupported=function(){return Object(a.isSupported)()};function p(O){O===void 0&&(O={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new d.EventEmitter,this._autoLevelCapping=void 0,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var b=this.config=Object(s.mergeConfig)(p.DefaultConfig,O);this.userConfig=O,Object(i.enableLogs)(b.debug),this._autoLevelCapping=-1,b.progressive&&Object(s.enableStreamingMode)(b);var E=b.abrController,w=b.bufferController,T=b.capLevelController,F=b.fpsController,N=this.abrController=new E(this),L=this.bufferController=new w(this),G=this.capLevelController=new T(this),z=new F(this),A=new y.default(this),B=new S.default(this),U=new _.default(this),I=this.levelController=new h.default(this),K=new n.FragmentTracker(this),Z=this.streamController=new c.default(this,K);G.setStreamController(Z),z.setStreamController(Z);var ue=[I,Z];this.networkControllers=ue;var de=[A,B,N,L,G,z,U,K];this.audioTrackController=this.createController(b.audioTrackController,null,ue),this.createController(b.audioStreamController,K,ue),this.subtitleTrackController=this.createController(b.subtitleTrackController,null,ue),this.createController(b.subtitleStreamController,K,ue),this.createController(b.timelineController,null,de),this.emeController=this.createController(b.emeController,null,de),this.cmcdController=this.createController(b.cmcdController,null,de),this.latencyController=this.createController(t.default,null,de),this.coreComponents=de}var R=p.prototype;return R.createController=function(b,E,w){if(b){var T=E?new b(this,E):new b(this);return w&&w.push(T),T}return null},R.on=function(b,E,w){w===void 0&&(w=this),this._emitter.on(b,E,w)},R.once=function(b,E,w){w===void 0&&(w=this),this._emitter.once(b,E,w)},R.removeAllListeners=function(b){this._emitter.removeAllListeners(b)},R.off=function(b,E,w,T){w===void 0&&(w=this),this._emitter.off(b,E,w,T)},R.listeners=function(b){return this._emitter.listeners(b)},R.emit=function(b,E,w){return this._emitter.emit(b,E,w)},R.trigger=function(b,E){if(this.config.debug)return this.emit(b,b,E);try{return this.emit(b,b,E)}catch(w){i.logger.error("An internal error happened while handling event "+b+'. Error message: "'+w.message+'". Here is a stacktrace:',w),this.trigger(l.Events.ERROR,{type:o.ErrorTypes.OTHER_ERROR,details:o.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:b,error:w})}return!1},R.listenerCount=function(b){return this._emitter.listenerCount(b)},R.destroy=function(){i.logger.log("destroy"),this.trigger(l.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(b){return b.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(b){return b.destroy()}),this.coreComponents.length=0},R.attachMedia=function(b){i.logger.log("attachMedia"),this._media=b,this.trigger(l.Events.MEDIA_ATTACHING,{media:b})},R.detachMedia=function(){i.logger.log("detachMedia"),this.trigger(l.Events.MEDIA_DETACHING,void 0),this._media=null},R.loadSource=function(b){this.stopLoad();var E=this.media,w=this.url,T=this.url=M.buildAbsoluteURL(self.location.href,b,{alwaysNormalize:!0});i.logger.log("loadSource:"+T),E&&w&&w!==T&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(E)),this.trigger(l.Events.MANIFEST_LOADING,{url:b})},R.startLoad=function(b){b===void 0&&(b=-1),i.logger.log("startLoad("+b+")"),this.networkControllers.forEach(function(E){E.startLoad(b)})},R.stopLoad=function(){i.logger.log("stopLoad"),this.networkControllers.forEach(function(b){b.stopLoad()})},R.swapAudioCodec=function(){i.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},R.recoverMediaError=function(){i.logger.log("recoverMediaError");var b=this._media;this.detachMedia(),b&&this.attachMedia(b)},R.removeLevel=function(b,E){E===void 0&&(E=0),this.levelController.removeLevel(b,E)},x(p,[{key:"levels",get:function(){var b=this.levelController.levels;return b||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(b){i.logger.log("set currentLevel:"+b),this.loadLevel=b,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(b){i.logger.log("set nextLevel:"+b),this.levelController.manualLevel=b,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(b){i.logger.log("set loadLevel:"+b),this.levelController.manualLevel=b}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(b){this.levelController.nextLoadLevel=b}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(b){i.logger.log("set firstLevel:"+b),this.levelController.firstLevel=b}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(b){i.logger.log("set startLevel:"+b),b!==-1&&(b=Math.max(b,this.minAutoLevel)),this.levelController.startLevel=b}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(b){var E=!!b;E!==this.config.capLevelToPlayerSize&&(E?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=E)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(b){this._autoLevelCapping!==b&&(i.logger.log("set autoLevelCapping:"+b),this._autoLevelCapping=b)}},{key:"bandwidthEstimate",get:function(){var b=this.abrController.bwEstimator;return b?b.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var b=this.levels,E=this.config.minAutoBitrate;if(!b)return 0;for(var w=b.length,T=0;T<w;T++)if(b[T].maxBitrate>E)return T;return 0}},{key:"maxAutoLevel",get:function(){var b=this.levels,E=this.autoLevelCapping,w;return E===-1&&b&&b.length?w=b.length-1:w=E,w}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(b){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,b)}},{key:"audioTracks",get:function(){var b=this.audioTrackController;return b?b.audioTracks:[]}},{key:"audioTrack",get:function(){var b=this.audioTrackController;return b?b.audioTrack:-1},set:function(b){var E=this.audioTrackController;E&&(E.audioTrack=b)}},{key:"subtitleTracks",get:function(){var b=this.subtitleTrackController;return b?b.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var b=this.subtitleTrackController;return b?b.subtitleTrack:-1},set:function(b){var E=this.subtitleTrackController;E&&(E.subtitleTrack=b)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var b=this.subtitleTrackController;return b?b.subtitleDisplay:!1},set:function(b){var E=this.subtitleTrackController;E&&(E.subtitleDisplay=b)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(b){this.config.lowLatencyMode=b}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return l.Events}},{key:"ErrorTypes",get:function(){return o.ErrorTypes}},{key:"ErrorDetails",get:function(){return o.ErrorDetails}},{key:"DefaultConfig",get:function(){return p.defaultConfig?p.defaultConfig:s.hlsDefaultConfig},set:function(b){p.defaultConfig=b}}]),p}();v.defaultConfig=void 0},"./src/is-supported.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"isSupported",function(){return y}),C.d(g,"changeTypeSupported",function(){return S});var M=C("./src/utils/mediasource-helper.ts");function m(){return self.SourceBuffer||self.WebKitSourceBuffer}function y(){var _=Object(M.getMediaSource)();if(!_)return!1;var t=m(),h=_&&typeof _.isTypeSupported=="function"&&_.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),n=!t||t.prototype&&typeof t.prototype.appendBuffer=="function"&&typeof t.prototype.remove=="function";return!!h&&!!n}function S(){var _,t=m();return typeof(t==null||((_=t.prototype)===null||_===void 0)?void 0:_.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"default",function(){return i}),C.d(g,"LoadError",function(){return d});var M=C("./src/polyfills/number.ts"),m=C("./src/errors.ts");function y(f,l){f.prototype=Object.create(l.prototype),f.prototype.constructor=f,n(f,l)}function S(f){var l=typeof Map=="function"?new Map:void 0;return S=function(r){if(r===null||!h(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof l!="undefined"){if(l.has(r))return l.get(r);l.set(r,x)}function x(){return _(r,arguments,c(this).constructor)}return x.prototype=Object.create(r.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),n(x,r)},S(f)}function _(f,l,o){return t()?_=Reflect.construct:_=function(x,v,p){var R=[null];R.push.apply(R,v);var O=Function.bind.apply(x,R),b=new O;return p&&n(b,p.prototype),b},_.apply(null,arguments)}function t(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(f){return!1}}function h(f){return Function.toString.call(f).indexOf("[native code]")!==-1}function n(f,l){return n=Object.setPrototypeOf||function(r,x){return r.__proto__=x,r},n(f,l)}function c(f){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},c(f)}var a=Math.pow(2,17),i=function(){function f(o){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=o}var l=f.prototype;return l.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},l.abort=function(){this.loader&&this.loader.abort()},l.load=function(r,x){var v=this,p=r.url;if(!p)return Promise.reject(new d({type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:r,networkDetails:null},"Fragment does not have a "+(p?"part list":"url")));this.abort();var R=this.config,O=R.fLoader,b=R.loader;return new Promise(function(E,w){v.loader&&v.loader.destroy();var T=v.loader=r.loader=O?new O(R):new b(R),F=s(r),N={timeout:R.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:R.fragLoadingMaxRetryTimeout,highWaterMark:a};r.stats=T.stats,T.load(F,N,{onSuccess:function(G,z,A,B){v.resetLoader(r,T),E({frag:r,part:null,payload:G.data,networkDetails:B})},onError:function(G,z,A){v.resetLoader(r,T),w(new d({type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:r,response:G,networkDetails:A}))},onAbort:function(G,z,A){v.resetLoader(r,T),w(new d({type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:r,networkDetails:A}))},onTimeout:function(G,z,A){v.resetLoader(r,T),w(new d({type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:r,networkDetails:A}))},onProgress:function(G,z,A,B){x&&x({frag:r,part:null,payload:A,networkDetails:B})}})})},l.loadPart=function(r,x,v){var p=this;this.abort();var R=this.config,O=R.fLoader,b=R.loader;return new Promise(function(E,w){p.loader&&p.loader.destroy();var T=p.loader=r.loader=O?new O(R):new b(R),F=s(r,x),N={timeout:R.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:R.fragLoadingMaxRetryTimeout,highWaterMark:a};x.stats=T.stats,T.load(F,N,{onSuccess:function(G,z,A,B){p.resetLoader(r,T),p.updateStatsFromPart(r,x);var U={frag:r,part:x,payload:G.data,networkDetails:B};v(U),E(U)},onError:function(G,z,A){p.resetLoader(r,T),w(new d({type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:r,part:x,response:G,networkDetails:A}))},onAbort:function(G,z,A){r.stats.aborted=x.stats.aborted,p.resetLoader(r,T),w(new d({type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:r,part:x,networkDetails:A}))},onTimeout:function(G,z,A){p.resetLoader(r,T),w(new d({type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:r,part:x,networkDetails:A}))}})})},l.updateStatsFromPart=function(r,x){var v=r.stats,p=x.stats,R=p.total;if(v.loaded+=p.loaded,R){var O=Math.round(r.duration/x.duration),b=Math.min(Math.round(v.loaded/R),O),E=O-b,w=E*Math.round(v.loaded/b);v.total=v.loaded+w}else v.total=Math.max(v.loaded,v.total);var T=v.loading,F=p.loading;T.start?T.first+=F.first-F.start:(T.start=F.start,T.first=F.first),T.end=F.end},l.resetLoader=function(r,x){r.loader=null,this.loader===x&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),x.destroy()},f}();function s(f,l){l===void 0&&(l=null);var o=l||f,r={frag:f,part:l,responseType:"arraybuffer",url:o.url,headers:{},rangeStart:0,rangeEnd:0},x=o.byteRangeStartOffset,v=o.byteRangeEndOffset;return Object(M.isFiniteNumber)(x)&&Object(M.isFiniteNumber)(v)&&(r.rangeStart=x,r.rangeEnd=v),r}var d=function(f){y(l,f);function l(o){for(var r,x=arguments.length,v=new Array(x>1?x-1:0),p=1;p<x;p++)v[p-1]=arguments[p];return r=f.call.apply(f,[this].concat(v))||this,r.data=void 0,r.data=o,r}return l}(S(Error))},"./src/loader/fragment.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"ElementaryStreamTypes",function(){return i}),C.d(g,"BaseSegment",function(){return s}),C.d(g,"Fragment",function(){return d}),C.d(g,"Part",function(){return f});var M=C("./src/polyfills/number.ts"),m=C("./node_modules/url-toolkit/src/url-toolkit.js"),y=C.n(m),S=C("./src/utils/logger.ts"),_=C("./src/loader/level-key.ts"),t=C("./src/loader/load-stats.ts");function h(l,o){l.prototype=Object.create(o.prototype),l.prototype.constructor=l,n(l,o)}function n(l,o){return n=Object.setPrototypeOf||function(x,v){return x.__proto__=v,x},n(l,o)}function c(l,o){for(var r=0;r<o.length;r++){var x=o[r];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(l,x.key,x)}}function a(l,o,r){return o&&c(l.prototype,o),r&&c(l,r),l}var i;(function(l){l.AUDIO="audio",l.VIDEO="video",l.AUDIOVIDEO="audiovideo"})(i||(i={}));var s=function(){function l(r){var x;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(x={},x[i.AUDIO]=null,x[i.VIDEO]=null,x[i.AUDIOVIDEO]=null,x),this.baseurl=r}var o=l.prototype;return o.setByteRange=function(x,v){var p=x.split("@",2),R=[];p.length===1?R[0]=v?v.byteRangeEndOffset:0:R[0]=parseInt(p[1]),R[1]=parseInt(p[0])+R[0],this._byteRange=R},a(l,[{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(m.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(x){this._url=x}}]),l}(),d=function(l){h(o,l);function o(x,v){var p;return p=l.call(this,v)||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 t.LoadStats,p.urlId=0,p.data=void 0,p.bitrateTest=!1,p.title=null,p.initSegment=null,p.type=x,p}var r=o.prototype;return r.createInitializationVector=function(v){for(var p=new Uint8Array(16),R=12;R<16;R++)p[R]=v>>8*(15-R)&255;return p},r.setDecryptDataFromLevelKey=function(v,p){var R=v;return(v==null?void 0:v.method)==="AES-128"&&v.uri&&!v.iv&&(R=_.LevelKey.fromURI(v.uri),R.method=v.method,R.iv=this.createInitializationVector(p),R.keyFormat="identity"),R},r.setElementaryStreamInfo=function(v,p,R,O,b,E){E===void 0&&(E=!1);var w=this.elementaryStreams,T=w[v];if(!T){w[v]={startPTS:p,endPTS:R,startDTS:O,endDTS:b,partial:E};return}T.startPTS=Math.min(T.startPTS,p),T.endPTS=Math.max(T.endPTS,R),T.startDTS=Math.min(T.startDTS,O),T.endDTS=Math.max(T.endDTS,b)},r.clearElementaryStreamInfo=function(){var v=this.elementaryStreams;v[i.AUDIO]=null,v[i.VIDEO]=null,v[i.AUDIOVIDEO]=null},a(o,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var v=this.sn;typeof v!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&S.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),v=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,v)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(M.isFiniteNumber)(this.programDateTime))return null;var v=Object(M.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+v*1e3}},{key:"encrypted",get:function(){var v;return!!((v=this.decryptdata)!==null&&v!==void 0&&v.keyFormat&&this.decryptdata.uri)}}]),o}(s),f=function(l){h(o,l);function o(r,x,v,p,R){var O;O=l.call(this,v)||this,O.fragOffset=0,O.duration=0,O.gap=!1,O.independent=!1,O.relurl=void 0,O.fragment=void 0,O.index=void 0,O.stats=new t.LoadStats,O.duration=r.decimalFloatingPoint("DURATION"),O.gap=r.bool("GAP"),O.independent=r.bool("INDEPENDENT"),O.relurl=r.enumeratedString("URI"),O.fragment=x,O.index=p;var b=r.enumeratedString("BYTERANGE");return b&&O.setByteRange(b,R),R&&(O.fragOffset=R.fragOffset+R.duration),O}return a(o,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var x=this.elementaryStreams;return!!(x.audio||x.video||x.audiovideo)}}]),o}(s)},"./src/loader/key-loader.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"default",function(){return S});var M=C("./src/events.ts"),m=C("./src/errors.ts"),y=C("./src/utils/logger.ts"),S=function(){function _(h){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=h,this._registerListeners()}var t=_.prototype;return t._registerListeners=function(){this.hls.on(M.Events.KEY_LOADING,this.onKeyLoading,this)},t._unregisterListeners=function(){this.hls.off(M.Events.KEY_LOADING,this.onKeyLoading)},t.destroy=function(){this._unregisterListeners();for(var n in this.loaders){var c=this.loaders[n];c&&c.destroy()}this.loaders={}},t.onKeyLoading=function(n,c){var a=c.frag,i=a.type,s=this.loaders[i];if(!a.decryptdata){y.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var d=a.decryptdata.uri;if(d!==this.decrypturl||this.decryptkey===null){var f=this.hls.config;if(s&&(y.logger.warn("abort previous key loader for type:"+i),s.abort()),!d){y.logger.warn("key uri is falsy");return}var l=f.loader,o=a.loader=this.loaders[i]=new l(f);this.decrypturl=d,this.decryptkey=null;var r={url:d,frag:a,responseType:"arraybuffer"},x={timeout:f.fragLoadingTimeOut,maxRetry:0,retryDelay:f.fragLoadingRetryDelay,maxRetryDelay:f.fragLoadingMaxRetryTimeout,highWaterMark:0},v={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};o.load(r,x,v)}else this.decryptkey&&(a.decryptdata.key=this.decryptkey,this.hls.trigger(M.Events.KEY_LOADED,{frag:a}))},t.loadsuccess=function(n,c,a){var i=a.frag;if(!i.decryptdata){y.logger.error("after key load, decryptdata unset");return}this.decryptkey=i.decryptdata.key=new Uint8Array(n.data),i.loader=null,delete this.loaders[i.type],this.hls.trigger(M.Events.KEY_LOADED,{frag:i})},t.loaderror=function(n,c){var a=c.frag,i=a.loader;i&&i.abort(),delete this.loaders[a.type],this.hls.trigger(M.Events.ERROR,{type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:a,response:n})},t.loadtimeout=function(n,c){var a=c.frag,i=a.loader;i&&i.abort(),delete this.loaders[a.type],this.hls.trigger(M.Events.ERROR,{type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:a})},_}()},"./src/loader/level-details.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"LevelDetails",function(){return _});var M=C("./src/polyfills/number.ts");function m(t,h){for(var n=0;n<h.length;n++){var c=h[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(t,c.key,c)}}function y(t,h,n){return h&&m(t.prototype,h),n&&m(t,n),t}var S=10,_=function(){function t(n){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=n}var h=t.prototype;return h.reloaded=function(c){if(!c){this.advanced=!0,this.updated=!0;return}var a=this.lastPartSn-c.lastPartSn,i=this.lastPartIndex-c.lastPartIndex;this.updated=this.endSN!==c.endSN||!!i||!!a,this.advanced=this.endSN>c.endSN||a>0||a===0&&i>0,this.updated||this.advanced?this.misses=Math.floor(c.misses*.6):this.misses=c.misses+1,this.availabilityDelay=c.availabilityDelay},y(t,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(M.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||S}},{key:"drift",get:function(){var c=this.driftEndTime-this.driftStartTime;if(c>0){var a=this.driftEnd-this.driftStart;return a*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}}]),t}()},"./src/loader/level-key.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"LevelKey",function(){return _});var M=C("./node_modules/url-toolkit/src/url-toolkit.js"),m=C.n(M);function y(t,h){for(var n=0;n<h.length;n++){var c=h[n];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(t,c.key,c)}}function S(t,h,n){return h&&y(t.prototype,h),n&&y(t,n),t}var _=function(){t.fromURL=function(n,c){return new t(n,c)},t.fromURI=function(n){return new t(n)};function t(h,n){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,n?this._uri=Object(M.buildAbsoluteURL)(h,n,{alwaysNormalize:!0}):this._uri=h}return S(t,[{key:"uri",get:function(){return this._uri}}]),t}()},"./src/loader/load-stats.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"LoadStats",function(){return M});var M=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}},"./src/loader/m3u8-parser.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"default",function(){return o});var M=C("./src/polyfills/number.ts"),m=C("./node_modules/url-toolkit/src/url-toolkit.js"),y=C.n(m),S=C("./src/loader/fragment.ts"),_=C("./src/loader/level-details.ts"),t=C("./src/loader/level-key.ts"),h=C("./src/utils/attr-list.ts"),n=C("./src/utils/logger.ts"),c=C("./src/utils/codecs.ts"),a=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,i=/#EXT-X-MEDIA:(.*)/g,s=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),d=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("|")),f=/\.(mp4|m4s|m4v|m4a)$/i;function l(R){var O,b;return f.test((O=(b=m.parseURL(R))===null||b===void 0?void 0:b.path)!=null?O:"")}var o=function(){function R(){}return R.findGroup=function(b,E){for(var w=0;w<b.length;w++){var T=b[w];if(T.id===E)return T}},R.convertAVC1ToAVCOTI=function(b){var E=b.split(".");if(E.length>2){var w=E.shift()+".";return w+=parseInt(E.shift()).toString(16),w+=("000"+parseInt(E.shift()).toString(16)).substr(-4),w}return b},R.resolve=function(b,E){return m.buildAbsoluteURL(E,b,{alwaysNormalize:!0})},R.parseMasterPlaylist=function(b,E){var w=[],T={},F=!1;a.lastIndex=0;for(var N;(N=a.exec(b))!=null;)if(N[1]){var L=new h.AttrList(N[1]),G={attrs:L,bitrate:L.decimalInteger("AVERAGE-BANDWIDTH")||L.decimalInteger("BANDWIDTH"),name:L.NAME,url:R.resolve(N[2],E)},z=L.decimalResolution("RESOLUTION");z&&(G.width=z.width,G.height=z.height),r((L.CODECS||"").split(/[ ,]+/).filter(function(B){return B}),G),G.videoCodec&&G.videoCodec.indexOf("avc1")!==-1&&(G.videoCodec=R.convertAVC1ToAVCOTI(G.videoCodec)),w.push(G)}else if(N[3]){var A=new h.AttrList(N[3]);A["DATA-ID"]&&(F=!0,T[A["DATA-ID"]]=A)}return{levels:w,sessionData:F?T:null}},R.parseMasterPlaylistMedia=function(b,E,w,T){T===void 0&&(T=[]);var F,N=[],L=0;for(i.lastIndex=0;(F=i.exec(b))!==null;){var G=new h.AttrList(F[1]);if(G.TYPE===w){var z={attrs:G,bitrate:0,id:L++,groupId:G["GROUP-ID"],instreamId:G["INSTREAM-ID"],name:G.NAME||G.LANGUAGE||"",type:w,default:G.bool("DEFAULT"),autoselect:G.bool("AUTOSELECT"),forced:G.bool("FORCED"),lang:G.LANGUAGE,url:G.URI?R.resolve(G.URI,E):""};if(T.length){var A=R.findGroup(T,z.groupId)||T[0];x(z,A,"audioCodec"),x(z,A,"textCodec")}N.push(z)}}return N},R.parseLevelPlaylist=function(b,E,w,T,F){var N=new _.LevelDetails(E),L=N.fragments,G=null,z=0,A=0,B=0,U=0,I=null,K=new S.Fragment(T,E),Z,ue,de,Ce=-1,Re=!1;for(s.lastIndex=0,N.m3u8=b;(Z=s.exec(b))!==null;){Re&&(Re=!1,K=new S.Fragment(T,E),K.start=B,K.sn=z,K.cc=U,K.level=w,G&&(K.initSegment=G,K.rawProgramDateTime=G.rawProgramDateTime));var me=Z[1];if(me){K.duration=parseFloat(me);var Oe=(" "+Z[2]).slice(1);K.title=Oe||null,K.tagList.push(Oe?["INF",me,Oe]:["INF",me])}else if(Z[3])Object(M.isFiniteNumber)(K.duration)&&(K.start=B,de&&(K.levelkey=de),K.sn=z,K.level=w,K.cc=U,K.urlId=F,L.push(K),K.relurl=(" "+Z[3]).slice(1),p(K,I),I=K,B+=K.duration,z++,A=0,Re=!0);else if(Z[4]){var be=(" "+Z[4]).slice(1);I?K.setByteRange(be,I):K.setByteRange(be)}else if(Z[5])K.rawProgramDateTime=(" "+Z[5]).slice(1),K.tagList.push(["PROGRAM-DATE-TIME",K.rawProgramDateTime]),Ce===-1&&(Ce=L.length);else{if(Z=Z[0].match(d),!Z){n.logger.warn("No matches on slow regex match for level playlist!");continue}for(ue=1;ue<Z.length&&!(typeof Z[ue]!="undefined");ue++);var ce=(" "+Z[ue]).slice(1),se=(" "+Z[ue+1]).slice(1),ne=Z[ue+2]?(" "+Z[ue+2]).slice(1):"";switch(ce){case"PLAYLIST-TYPE":N.type=se.toUpperCase();break;case"MEDIA-SEQUENCE":z=N.startSN=parseInt(se);break;case"SKIP":{var ge=new h.AttrList(se),ee=ge.decimalInteger("SKIPPED-SEGMENTS");if(Object(M.isFiniteNumber)(ee)){N.skippedSegments=ee;for(var re=ee;re--;)L.unshift(null);z+=ee}var Te=ge.enumeratedString("RECENTLY-REMOVED-DATERANGES");Te&&(N.recentlyRemovedDateranges=Te.split(" "));break}case"TARGETDURATION":N.targetduration=parseFloat(se);break;case"VERSION":N.version=parseInt(se);break;case"EXTM3U":break;case"ENDLIST":N.live=!1;break;case"#":(se||ne)&&K.tagList.push(ne?[se,ne]:[se]);break;case"DIS":U++;case"GAP":K.tagList.push([ce]);break;case"BITRATE":K.tagList.push([ce,se]);break;case"DISCONTINUITY-SEQ":U=parseInt(se);break;case"KEY":{var ie,q=new h.AttrList(se),Y=q.enumeratedString("METHOD"),X=q.URI,he=q.hexadecimalInteger("IV"),fe=q.enumeratedString("KEYFORMATVERSIONS"),Ee=q.enumeratedString("KEYID"),He=(ie=q.enumeratedString("KEYFORMAT"))!=null?ie:"identity",Qe=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(Qe.indexOf(He)>-1){n.logger.warn("Keyformat "+He+" is not supported from the manifest");continue}else if(He!=="identity")continue;Y&&(de=t.LevelKey.fromURL(E,X),X&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(Y)>=0&&(de.method=Y,de.keyFormat=He,Ee&&(de.keyID=Ee),fe&&(de.keyFormatVersions=fe),de.iv=he));break}case"START":{var et=new h.AttrList(se),it=et.decimalFloatingPoint("TIME-OFFSET");Object(M.isFiniteNumber)(it)&&(N.startTimeOffset=it);break}case"MAP":{var ut=new h.AttrList(se);K.relurl=ut.URI,ut.BYTERANGE&&K.setByteRange(ut.BYTERANGE),K.level=w,K.sn="initSegment",de&&(K.levelkey=de),K.initSegment=null,G=K,Re=!0;break}case"SERVER-CONTROL":{var dt=new h.AttrList(se);N.canBlockReload=dt.bool("CAN-BLOCK-RELOAD"),N.canSkipUntil=dt.optionalFloat("CAN-SKIP-UNTIL",0),N.canSkipDateRanges=N.canSkipUntil>0&&dt.bool("CAN-SKIP-DATERANGES"),N.partHoldBack=dt.optionalFloat("PART-HOLD-BACK",0),N.holdBack=dt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Fe=new h.AttrList(se);N.partTarget=Fe.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ie=N.partList;Ie||(Ie=N.partList=[]);var st=A>0?Ie[Ie.length-1]:void 0,ft=A++,Ze=new S.Part(new h.AttrList(se),K,E,ft,st);Ie.push(Ze),K.duration+=Ze.duration;break}case"PRELOAD-HINT":{var tt=new h.AttrList(se);N.preloadHint=tt;break}case"RENDITION-REPORT":{var Be=new h.AttrList(se);N.renditionReports=N.renditionReports||[],N.renditionReports.push(Be);break}default:n.logger.warn("line parsed but not handled: "+Z);break}}}I&&!I.relurl?(L.pop(),B-=I.duration,N.partList&&(N.fragmentHint=I)):N.partList&&(p(K,I),K.cc=U,N.fragmentHint=K);var Pe=L.length,Ne=L[0],xe=L[Pe-1];if(B+=N.skippedSegments*N.targetduration,B>0&&Pe&&xe){N.averagetargetduration=B/Pe;var Ae=xe.sn;N.endSN=Ae!=="initSegment"?Ae:0,Ne&&(N.startCC=Ne.cc,Ne.initSegment||N.fragments.every(function(Le){return Le.relurl&&l(Le.relurl)})&&(n.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),K=new S.Fragment(T,E),K.relurl=xe.relurl,K.level=w,K.sn="initSegment",Ne.initSegment=K,N.needSidxRanges=!0))}else N.endSN=0,N.startCC=0;return N.fragmentHint&&(B+=N.fragmentHint.duration),N.totalduration=B,N.endCC=U,Ce>0&&v(L,Ce),N},R}();function r(R,O){["video","audio","text"].forEach(function(b){var E=R.filter(function(T){return Object(c.isCodecType)(T,b)});if(E.length){var w=E.filter(function(T){return T.lastIndexOf("avc1",0)===0||T.lastIndexOf("mp4a",0)===0});O[b+"Codec"]=w.length>0?w[0]:E[0],R=R.filter(function(T){return E.indexOf(T)===-1})}}),O.unknownCodecs=R}function x(R,O,b){var E=O[b];E&&(R[b]=E)}function v(R,O){for(var b=R[O],E=O;E--;){var w=R[E];if(!w)return;w.programDateTime=b.programDateTime-w.duration*1e3,b=w}}function p(R,O){R.rawProgramDateTime?R.programDateTime=Date.parse(R.rawProgramDateTime):O!=null&&O.programDateTime&&(R.programDateTime=O.endProgramDateTime),Object(M.isFiniteNumber)(R.programDateTime)||(R.programDateTime=null,R.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(k,g,C){"use strict";C.r(g);var M=C("./src/polyfills/number.ts"),m=C("./src/events.ts"),y=C("./src/errors.ts"),S=C("./src/utils/logger.ts"),_=C("./src/utils/mp4-tools.ts"),t=C("./src/loader/m3u8-parser.ts"),h=C("./src/types/loader.ts"),n=C("./src/utils/attr-list.ts");function c(s){var d=s.type;switch(d){case h.PlaylistContextType.AUDIO_TRACK:return h.PlaylistLevelType.AUDIO;case h.PlaylistContextType.SUBTITLE_TRACK:return h.PlaylistLevelType.SUBTITLE;default:return h.PlaylistLevelType.MAIN}}function a(s,d){var f=s.url;return(f===void 0||f.indexOf("data:")===0)&&(f=d.url),f}var i=function(){function s(f){this.hls=void 0,this.loaders=Object.create(null),this.hls=f,this.registerListeners()}var d=s.prototype;return d.registerListeners=function(){var l=this.hls;l.on(m.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.on(m.Events.LEVEL_LOADING,this.onLevelLoading,this),l.on(m.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),l.on(m.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},d.unregisterListeners=function(){var l=this.hls;l.off(m.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.off(m.Events.LEVEL_LOADING,this.onLevelLoading,this),l.off(m.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),l.off(m.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},d.createInternalLoader=function(l){var o=this.hls.config,r=o.pLoader,x=o.loader,v=r||x,p=new v(o);return l.loader=p,this.loaders[l.type]=p,p},d.getInternalLoader=function(l){return this.loaders[l.type]},d.resetInternalLoader=function(l){this.loaders[l]&&delete this.loaders[l]},d.destroyInternalLoaders=function(){for(var l in this.loaders){var o=this.loaders[l];o&&o.destroy(),this.resetInternalLoader(l)}},d.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},d.onManifestLoading=function(l,o){var r=o.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:h.PlaylistContextType.MANIFEST,url:r,deliveryDirectives:null})},d.onLevelLoading=function(l,o){var r=o.id,x=o.level,v=o.url,p=o.deliveryDirectives;this.load({id:r,groupId:null,level:x,responseType:"text",type:h.PlaylistContextType.LEVEL,url:v,deliveryDirectives:p})},d.onAudioTrackLoading=function(l,o){var r=o.id,x=o.groupId,v=o.url,p=o.deliveryDirectives;this.load({id:r,groupId:x,level:null,responseType:"text",type:h.PlaylistContextType.AUDIO_TRACK,url:v,deliveryDirectives:p})},d.onSubtitleTrackLoading=function(l,o){var r=o.id,x=o.groupId,v=o.url,p=o.deliveryDirectives;this.load({id:r,groupId:x,level:null,responseType:"text",type:h.PlaylistContextType.SUBTITLE_TRACK,url:v,deliveryDirectives:p})},d.load=function(l){var o,r=this.hls.config,x=this.getInternalLoader(l);if(x){var v=x.context;if(v&&v.url===l.url){S.logger.trace("[playlist-loader]: playlist request ongoing");return}S.logger.log("[playlist-loader]: aborting previous loader for type: "+l.type),x.abort()}var p,R,O,b;switch(l.type){case h.PlaylistContextType.MANIFEST:p=r.manifestLoadingMaxRetry,R=r.manifestLoadingTimeOut,O=r.manifestLoadingRetryDelay,b=r.manifestLoadingMaxRetryTimeout;break;case h.PlaylistContextType.LEVEL:case h.PlaylistContextType.AUDIO_TRACK:case h.PlaylistContextType.SUBTITLE_TRACK:p=0,R=r.levelLoadingTimeOut;break;default:p=r.levelLoadingMaxRetry,R=r.levelLoadingTimeOut,O=r.levelLoadingRetryDelay,b=r.levelLoadingMaxRetryTimeout;break}if(x=this.createInternalLoader(l),(o=l.deliveryDirectives)!==null&&o!==void 0&&o.part){var E;if(l.type===h.PlaylistContextType.LEVEL&&l.level!==null?E=this.hls.levels[l.level].details:l.type===h.PlaylistContextType.AUDIO_TRACK&&l.id!==null?E=this.hls.audioTracks[l.id].details:l.type===h.PlaylistContextType.SUBTITLE_TRACK&&l.id!==null&&(E=this.hls.subtitleTracks[l.id].details),E){var w=E.partTarget,T=E.targetduration;w&&T&&(R=Math.min(Math.max(w*3,T*.8)*1e3,R))}}var F={timeout:R,maxRetry:p,retryDelay:O,maxRetryDelay:b,highWaterMark:0},N={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};x.load(l,F,N)},d.loadsuccess=function(l,o,r,x){if(x===void 0&&(x=null),r.isSidxRequest){this.handleSidxRequest(l,r),this.handlePlaylistLoaded(l,o,r,x);return}this.resetInternalLoader(r.type);var v=l.data;if(v.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(l,r,"no EXTM3U delimiter",x);return}o.parsing.start=performance.now(),v.indexOf("#EXTINF:")>0||v.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(l,o,r,x):this.handleMasterPlaylist(l,o,r,x)},d.loaderror=function(l,o,r){r===void 0&&(r=null),this.handleNetworkError(o,r,!1,l)},d.loadtimeout=function(l,o,r){r===void 0&&(r=null),this.handleNetworkError(o,r,!0)},d.handleMasterPlaylist=function(l,o,r,x){var v=this.hls,p=l.data,R=a(l,r),O=t.default.parseMasterPlaylist(p,R),b=O.levels,E=O.sessionData;if(!b.length){this.handleManifestParsingError(l,r,"no level found in manifest",x);return}var w=b.map(function(z){return{id:z.attrs.AUDIO,audioCodec:z.audioCodec}}),T=b.map(function(z){return{id:z.attrs.SUBTITLES,textCodec:z.textCodec}}),F=t.default.parseMasterPlaylistMedia(p,R,"AUDIO",w),N=t.default.parseMasterPlaylistMedia(p,R,"SUBTITLES",T),L=t.default.parseMasterPlaylistMedia(p,R,"CLOSED-CAPTIONS");if(F.length){var G=F.some(function(z){return!z.url});!G&&b[0].audioCodec&&!b[0].attrs.AUDIO&&(S.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),F.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new n.AttrList({}),bitrate:0,url:""}))}v.trigger(m.Events.MANIFEST_LOADED,{levels:b,audioTracks:F,subtitles:N,captions:L,url:R,stats:o,networkDetails:x,sessionData:E})},d.handleTrackOrLevelPlaylist=function(l,o,r,x){var v=this.hls,p=r.id,R=r.level,O=r.type,b=a(l,r),E=Object(M.isFiniteNumber)(p)?p:0,w=Object(M.isFiniteNumber)(R)?R:E,T=c(r),F=t.default.parseLevelPlaylist(l.data,b,w,T,E);if(!F.fragments.length){v.trigger(m.Events.ERROR,{type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:b,reason:"no fragments found in level",level:typeof r.level=="number"?r.level:void 0});return}if(O===h.PlaylistContextType.MANIFEST){var N={attrs:new n.AttrList({}),bitrate:0,details:F,name:"",url:b};v.trigger(m.Events.MANIFEST_LOADED,{levels:[N],audioTracks:[],url:b,stats:o,networkDetails:x,sessionData:null})}if(o.parsing.end=performance.now(),F.needSidxRanges){var L,G=(L=F.fragments[0].initSegment)===null||L===void 0?void 0:L.url;this.load({url:G,isSidxRequest:!0,type:O,level:R,levelDetails:F,id:p,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}r.levelDetails=F,this.handlePlaylistLoaded(l,o,r,x)},d.handleSidxRequest=function(l,o){var r=Object(_.parseSegmentIndex)(new Uint8Array(l.data));if(!r)return;var x=r.references,v=o.levelDetails;x.forEach(function(p,R){var O=p.info,b=v.fragments[R];b.byteRange.length===0&&b.setByteRange(String(1+O.end-O.start)+"@"+String(O.start)),b.initSegment&&b.initSegment.setByteRange(String(r.moovEndOffset)+"@0")})},d.handleManifestParsingError=function(l,o,r,x){this.hls.trigger(m.Events.ERROR,{type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:o.type===h.PlaylistContextType.MANIFEST,url:l.url,reason:r,response:l,context:o,networkDetails:x})},d.handleNetworkError=function(l,o,r,x){r===void 0&&(r=!1),S.logger.warn("[playlist-loader]: A network "+(r?"timeout":"error")+" occurred while loading "+l.type+" level: "+l.level+" id: "+l.id+' group-id: "'+l.groupId+'"');var v=y.ErrorDetails.UNKNOWN,p=!1,R=this.getInternalLoader(l);switch(l.type){case h.PlaylistContextType.MANIFEST:v=r?y.ErrorDetails.MANIFEST_LOAD_TIMEOUT:y.ErrorDetails.MANIFEST_LOAD_ERROR,p=!0;break;case h.PlaylistContextType.LEVEL:v=r?y.ErrorDetails.LEVEL_LOAD_TIMEOUT:y.ErrorDetails.LEVEL_LOAD_ERROR,p=!1;break;case h.PlaylistContextType.AUDIO_TRACK:v=r?y.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:y.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,p=!1;break;case h.PlaylistContextType.SUBTITLE_TRACK:v=r?y.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:y.ErrorDetails.SUBTITLE_LOAD_ERROR,p=!1;break}R&&this.resetInternalLoader(l.type);var O={type:y.ErrorTypes.NETWORK_ERROR,details:v,fatal:p,url:l.url,loader:R,context:l,networkDetails:o};x&&(O.response=x),this.hls.trigger(m.Events.ERROR,O)},d.handlePlaylistLoaded=function(l,o,r,x){var v=r.type,p=r.level,R=r.id,O=r.groupId,b=r.loader,E=r.levelDetails,w=r.deliveryDirectives;if(!(E!=null&&E.targetduration)){this.handleManifestParsingError(l,r,"invalid target duration",x);return}if(!b)return;E.live&&(b.getCacheAge&&(E.ageHeader=b.getCacheAge()||0),(!b.getCacheAge||isNaN(E.ageHeader))&&(E.ageHeader=0));switch(v){case h.PlaylistContextType.MANIFEST:case h.PlaylistContextType.LEVEL:this.hls.trigger(m.Events.LEVEL_LOADED,{details:E,level:p||0,id:R||0,stats:o,networkDetails:x,deliveryDirectives:w});break;case h.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(m.Events.AUDIO_TRACK_LOADED,{details:E,id:R||0,groupId:O||"",stats:o,networkDetails:x,deliveryDirectives:w});break;case h.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(m.Events.SUBTITLE_TRACK_LOADED,{details:E,id:R||0,groupId:O||"",stats:o,networkDetails:x,deliveryDirectives:w});break}},s}();g.default=i},"./src/polyfills/number.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"isFiniteNumber",function(){return M}),C.d(g,"MAX_SAFE_INTEGER",function(){return m});var M=Number.isFinite||function(y){return typeof y=="number"&&isFinite(y)},m=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(k,g,C){"use strict";C.r(g);var M=function(){function m(){}return m.getSilentFrame=function(S,_){switch(S){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},m}();g.default=M},"./src/remux/mp4-generator.ts":function(k,g,C){"use strict";C.r(g);var M=Math.pow(2,32)-1,m=function(){function y(){}return y.init=function(){y.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 y.types)y.types.hasOwnProperty(_)&&(y.types[_]=[_.charCodeAt(0),_.charCodeAt(1),_.charCodeAt(2),_.charCodeAt(3)]);var t=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),h=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);y.HDLR_TYPES={video:t,audio:h};var n=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]);y.STTS=y.STSC=y.STCO=c,y.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),y.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),y.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),y.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var a=new Uint8Array([105,115,111,109]),i=new Uint8Array([97,118,99,49]),s=new Uint8Array([0,0,0,1]);y.FTYP=y.box(y.types.ftyp,a,s,a,i),y.DINF=y.box(y.types.dinf,y.box(y.types.dref,n))},y.box=function(_){for(var t=8,h=arguments.length,n=new Array(h>1?h-1:0),c=1;c<h;c++)n[c-1]=arguments[c];for(var a=n.length,i=a;a--;)t+=n[a].byteLength;var s=new Uint8Array(t);for(s[0]=t>>24&255,s[1]=t>>16&255,s[2]=t>>8&255,s[3]=t&255,s.set(_,4),a=0,t=8;a<i;a++)s.set(n[a],t),t+=n[a].byteLength;return s},y.hdlr=function(_){return y.box(y.types.hdlr,y.HDLR_TYPES[_])},y.mdat=function(_){return y.box(y.types.mdat,_)},y.mdhd=function(_,t){t*=_;var h=Math.floor(t/(M+1)),n=Math.floor(t%(M+1));return y.box(y.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,_>>24&255,_>>16&255,_>>8&255,_&255,h>>24,h>>16&255,h>>8&255,h&255,n>>24,n>>16&255,n>>8&255,n&255,85,196,0,0]))},y.mdia=function(_){return y.box(y.types.mdia,y.mdhd(_.timescale,_.duration),y.hdlr(_.type),y.minf(_))},y.mfhd=function(_){return y.box(y.types.mfhd,new Uint8Array([0,0,0,0,_>>24,_>>16&255,_>>8&255,_&255]))},y.minf=function(_){return _.type==="audio"?y.box(y.types.minf,y.box(y.types.smhd,y.SMHD),y.DINF,y.stbl(_)):y.box(y.types.minf,y.box(y.types.vmhd,y.VMHD),y.DINF,y.stbl(_))},y.moof=function(_,t,h){return y.box(y.types.moof,y.mfhd(_),y.traf(h,t))},y.moov=function(_){for(var t=_.length,h=[];t--;)h[t]=y.trak(_[t]);return y.box.apply(null,[y.types.moov,y.mvhd(_[0].timescale,_[0].duration)].concat(h).concat(y.mvex(_)))},y.mvex=function(_){for(var t=_.length,h=[];t--;)h[t]=y.trex(_[t]);return y.box.apply(null,[y.types.mvex].concat(h))},y.mvhd=function(_,t){t*=_;var h=Math.floor(t/(M+1)),n=Math.floor(t%(M+1)),c=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,_>>24&255,_>>16&255,_>>8&255,_&255,h>>24,h>>16&255,h>>8&255,h&255,n>>24,n>>16&255,n>>8&255,n&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 y.box(y.types.mvhd,c)},y.sdtp=function(_){var t=_.samples||[],h=new Uint8Array(4+t.length),n,c;for(n=0;n<t.length;n++)c=t[n].flags,h[n+4]=c.dependsOn<<4|c.isDependedOn<<2|c.hasRedundancy;return y.box(y.types.sdtp,h)},y.stbl=function(_){return y.box(y.types.stbl,y.stsd(_),y.box(y.types.stts,y.STTS),y.box(y.types.stsc,y.STSC),y.box(y.types.stsz,y.STSZ),y.box(y.types.stco,y.STCO))},y.avc1=function(_){var t=[],h=[],n,c,a;for(n=0;n<_.sps.length;n++)c=_.sps[n],a=c.byteLength,t.push(a>>>8&255),t.push(a&255),t=t.concat(Array.prototype.slice.call(c));for(n=0;n<_.pps.length;n++)c=_.pps[n],a=c.byteLength,h.push(a>>>8&255),h.push(a&255),h=h.concat(Array.prototype.slice.call(c));var i=y.box(y.types.avcC,new Uint8Array([1,t[3],t[4],t[5],252|3,224|_.sps.length].concat(t).concat([_.pps.length]).concat(h))),s=_.width,d=_.height,f=_.pixelRatio[0],l=_.pixelRatio[1];return y.box(y.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,s>>8&255,s&255,d>>8&255,d&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),i,y.box(y.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),y.box(y.types.pasp,new Uint8Array([f>>24,f>>16&255,f>>8&255,f&255,l>>24,l>>16&255,l>>8&255,l&255])))},y.esds=function(_){var t=_.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(_.config).concat([6,1,2]))},y.mp4a=function(_){var t=_.samplerate;return y.box(y.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,t>>8&255,t&255,0,0]),y.box(y.types.esds,y.esds(_)))},y.mp3=function(_){var t=_.samplerate;return y.box(y.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,t>>8&255,t&255,0,0]))},y.stsd=function(_){return _.type==="audio"?!_.isAAC&&_.codec==="mp3"?y.box(y.types.stsd,y.STSD,y.mp3(_)):y.box(y.types.stsd,y.STSD,y.mp4a(_)):y.box(y.types.stsd,y.STSD,y.avc1(_))},y.tkhd=function(_){var t=_.id,h=_.duration*_.timescale,n=_.width,c=_.height,a=Math.floor(h/(M+1)),i=Math.floor(h%(M+1));return y.box(y.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,t&255,0,0,0,0,a>>24,a>>16&255,a>>8&255,a&255,i>>24,i>>16&255,i>>8&255,i&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,n>>8&255,n&255,0,0,c>>8&255,c&255,0,0]))},y.traf=function(_,t){var h=y.sdtp(_),n=_.id,c=Math.floor(t/(M+1)),a=Math.floor(t%(M+1));return y.box(y.types.traf,y.box(y.types.tfhd,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,n&255])),y.box(y.types.tfdt,new Uint8Array([1,0,0,0,c>>24,c>>16&255,c>>8&255,c&255,a>>24,a>>16&255,a>>8&255,a&255])),y.trun(_,h.length+16+20+8+16+8+8),h)},y.trak=function(_){return _.duration=_.duration||4294967295,y.box(y.types.trak,y.tkhd(_),y.mdia(_))},y.trex=function(_){var t=_.id;return y.box(y.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,t&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},y.trun=function(_,t){var h=_.samples||[],n=h.length,c=12+16*n,a=new Uint8Array(c),i,s,d,f,l,o;for(t+=8+c,a.set([0,0,15,1,n>>>24&255,n>>>16&255,n>>>8&255,n&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255],0),i=0;i<n;i++)s=h[i],d=s.duration,f=s.size,l=s.flags,o=s.cts,a.set([d>>>24&255,d>>>16&255,d>>>8&255,d&255,f>>>24&255,f>>>16&255,f>>>8&255,f&255,l.isLeading<<2|l.dependsOn,l.isDependedOn<<6|l.hasRedundancy<<4|l.paddingValue<<1|l.isNonSync,l.degradPrio&240<<8,l.degradPrio&15,o>>>24&255,o>>>16&255,o>>>8&255,o&255],12+16*i);return y.box(y.types.trun,a)},y.initSegment=function(_){y.types||y.init();var t=y.moov(_),h=new Uint8Array(y.FTYP.byteLength+t.byteLength);return h.set(y.FTYP),h.set(t,y.FTYP.byteLength),h},y}();m.types=void 0,m.HDLR_TYPES=void 0,m.STTS=void 0,m.STSC=void 0,m.STCO=void 0,m.STSZ=void 0,m.VMHD=void 0,m.SMHD=void 0,m.STSD=void 0,m.FTYP=void 0,m.DINF=void 0,g.default=m},"./src/remux/mp4-remuxer.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"default",function(){return o}),C.d(g,"normalizePts",function(){return r});var M=C("./src/polyfills/number.ts"),m=C("./src/remux/aac-helper.ts"),y=C("./src/remux/mp4-generator.ts"),S=C("./src/events.ts"),_=C("./src/errors.ts"),t=C("./src/utils/logger.ts"),h=C("./src/types/loader.ts"),n=C("./src/utils/timescale-conversion.ts");function c(){return c=Object.assign||function(R){for(var O=1;O<arguments.length;O++){var b=arguments[O];for(var E in b)Object.prototype.hasOwnProperty.call(b,E)&&(R[E]=b[E])}return R},c.apply(this,arguments)}var a=10*1e3,i=1024,s=1152,d=null,f=null,l=!1,o=function(){function R(b,E,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=b,this.config=E,this.typeSupported=w,this.ISGenerated=!1,d===null){var F=navigator.userAgent||"",N=F.match(/Chrome\/(\d+)/i);d=N?parseInt(N[1]):0}if(f===null){var L=navigator.userAgent.match(/Safari\/(\d+)/i);f=L?parseInt(L[1]):0}l=!!d&&d<75||!!f&&f<600}var O=R.prototype;return O.destroy=function(){},O.resetTimeStamp=function(E){t.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=E},O.resetNextTimestamp=function(){t.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},O.resetInitSegment=function(){t.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},O.getVideoStartPts=function(E){var w=!1,T=E.reduce(function(F,N){var L=N.pts-F;return L<-4294967296?(w=!0,r(F,N.pts)):L>0?F:N.pts},E[0].pts);return w&&t.logger.debug("PTS rollover detected"),T},O.remux=function(E,w,T,F,N,L,G,z){var A,B,U,I,K,Z,ue=N,de=N,Ce=E.pid>-1,Re=w.pid>-1,me=w.samples.length,Oe=E.samples.length>0,be=me>1,ce=(!Ce||Oe)&&(!Re||be)||this.ISGenerated||G;if(ce){this.ISGenerated||(U=this.generateIS(E,w,N));var se=this.isVideoContiguous,ne=-1;if(be&&(ne=x(w.samples),!se&&this.config.forceKeyFrameOnDiscontinuity))if(Z=!0,ne>0){t.logger.warn("[mp4-remuxer]: Dropped "+ne+" out of "+me+" video samples due to a missing keyframe");var ge=this.getVideoStartPts(w.samples);w.samples=w.samples.slice(ne),w.dropped+=ne,de+=(w.samples[0].pts-ge)/(w.timescale||9e4)}else ne===-1&&(t.logger.warn("[mp4-remuxer]: No keyframe found out of "+me+" video samples"),Z=!1);if(this.ISGenerated){if(Oe&&be){var ee=this.getVideoStartPts(w.samples),re=r(E.samples[0].pts,ee)-ee,Te=re/w.inputTimeScale;ue+=Math.max(0,Te),de+=Math.max(0,-Te)}if(Oe){if(E.samplerate||(t.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),U=this.generateIS(E,w,N)),B=this.remuxAudio(E,ue,this.isAudioContiguous,L,Re||be||z===h.PlaylistLevelType.AUDIO?de:void 0),be){var ie=B?B.endPTS-B.startPTS:0;w.inputTimeScale||(t.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),U=this.generateIS(E,w,N)),A=this.remuxVideo(w,de,se,ie)}}else be&&(A=this.remuxVideo(w,de,se,0));A&&(A.firstKeyFrame=ne,A.independent=ne!==-1)}}return this.ISGenerated&&(T.samples.length&&(K=this.remuxID3(T,N)),F.samples.length&&(I=this.remuxText(F,N))),{audio:B,video:A,initSegment:U,independent:Z,text:I,id3:K}},O.generateIS=function(E,w,T){var F=E.samples,N=w.samples,L=this.typeSupported,G={},z=!Object(M.isFiniteNumber)(this._initPTS),A="audio/mp4",B,U,I;if(z&&(B=U=Infinity),E.config&&F.length&&(E.timescale=E.samplerate,E.isAAC||(L.mpeg?(A="audio/mpeg",E.codec=""):L.mp3&&(E.codec="mp3")),G.audio={id:"audio",container:A,codec:E.codec,initSegment:!E.isAAC&&L.mpeg?new Uint8Array(0):y.default.initSegment([E]),metadata:{channelCount:E.channelCount}},z&&(I=E.inputTimeScale,B=U=F[0].pts-Math.round(I*T))),w.sps&&w.pps&&N.length&&(w.timescale=w.inputTimeScale,G.video={id:"main",container:"video/mp4",codec:w.codec,initSegment:y.default.initSegment([w]),metadata:{width:w.width,height:w.height}},z)){I=w.inputTimeScale;var K=this.getVideoStartPts(N),Z=Math.round(I*T);U=Math.min(U,r(N[0].dts,K)-Z),B=Math.min(B,K-Z)}if(Object.keys(G).length)return this.ISGenerated=!0,z&&(this._initPTS=B,this._initDTS=U),{tracks:G,initPTS:B,timescale:I}},O.remuxVideo=function(E,w,T,F){var N=E.inputTimeScale,L=E.samples,G=[],z=L.length,A=this._initPTS,B=this.nextAvcDts,U=8,I,K,Z,ue=Number.POSITIVE_INFINITY,de=Number.NEGATIVE_INFINITY,Ce=0,Re=!1;if(!T||B===null){var me=w*N,Oe=L[0].pts-r(L[0].dts,L[0].pts);B=me-Oe}for(var be=0;be<z;be++){var ce=L[be];if(ce.pts=r(ce.pts-A,B),ce.dts=r(ce.dts-A,B),ce.dts>ce.pts){var se=9e4*.2;Ce=Math.max(Math.min(Ce,ce.pts-ce.dts),-1*se)}ce.dts<L[be>0?be-1:be].dts&&(Re=!0)}Re&&L.sort(function(lr,dr){var Ot=lr.dts-dr.dts,Vr=lr.pts-dr.pts;return Ot||Vr}),K=L[0].dts,Z=L[L.length-1].dts;var ne=Math.round((Z-K)/(z-1));if(Ce<0){if(Ce<ne*-2){t.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(n.toMsFromMpegTsClock)(-ne,!0)+" ms");for(var ge=Ce,ee=0;ee<z;ee++)L[ee].dts=ge=Math.max(ge,L[ee].pts-ne),L[ee].pts=Math.max(ge,L[ee].pts)}else{t.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(n.toMsFromMpegTsClock)(Ce,!0)+" ms to overcome this issue");for(var re=0;re<z;re++)L[re].dts=L[re].dts+Ce}K=L[0].dts}if(T){var Te=K-B,ie=Te>ne,q=Te<-1;if(ie||q){ie?t.logger.warn("AVC: "+Object(n.toMsFromMpegTsClock)(Te,!0)+" ms ("+Te+"dts) hole between fragments detected, filling it"):t.logger.warn("AVC: "+Object(n.toMsFromMpegTsClock)(-Te,!0)+" ms ("+Te+"dts) overlapping between fragments detected"),K=B;var Y=L[0].pts-Te;L[0].dts=K,L[0].pts=Y,t.logger.log("Video: First PTS/DTS adjusted: "+Object(n.toMsFromMpegTsClock)(Y,!0)+"/"+Object(n.toMsFromMpegTsClock)(K,!0)+", delta: "+Object(n.toMsFromMpegTsClock)(Te,!0)+" ms")}}l&&(K=Math.max(0,K));for(var X=0,he=0,fe=0;fe<z;fe++){for(var Ee=L[fe],He=Ee.units,Qe=He.length,et=0,it=0;it<Qe;it++)et+=He[it].data.length;he+=et,X+=Qe,Ee.length=et,Ee.dts=Math.max(Ee.dts,K),Ee.pts=Math.max(Ee.pts,Ee.dts,0),ue=Math.min(Ee.pts,ue),de=Math.max(Ee.pts,de)}Z=L[z-1].dts;var ut=he+4*X+8,dt;try{dt=new Uint8Array(ut)}catch(lr){this.observer.emit(S.Events.ERROR,S.Events.ERROR,{type:_.ErrorTypes.MUX_ERROR,details:_.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:ut,reason:"fail allocating video mdat "+ut});return}var Fe=new DataView(dt.buffer);Fe.setUint32(0,ut),dt.set(y.default.types.mdat,4);for(var Ie=0;Ie<z;Ie++){for(var st=L[Ie],ft=st.units,Ze=0,tt=0,Be=ft.length;tt<Be;tt++){var Pe=ft[tt],Ne=Pe.data,xe=Pe.data.byteLength;Fe.setUint32(U,xe),U+=4,dt.set(Ne,U),U+=xe,Ze+=4+xe}if(Ie<z-1)I=L[Ie+1].dts-st.dts;else{var Ae=this.config,Le=st.dts-L[Ie>0?Ie-1:Ie].dts;if(Ae.stretchShortVideoTrack&&this.nextAudioPts!==null){var Me=Math.floor(Ae.maxBufferHole*N),We=(F?ue+F*N:this.nextAudioPts)-st.pts;We>Me?(I=We-Le,I<0&&(I=Le),t.logger.log("[mp4-remuxer]: It is approximately "+We/90+" ms to the next segment; using duration "+I/90+" ms for the last video frame.")):I=Le}else I=Le}var nt=Math.round(st.pts-st.dts);G.push(new v(st.key,I,Ze,nt))}if(G.length&&d&&d<70){var vt=G[0].flags;vt.dependsOn=2,vt.isNonSync=0}console.assert(I!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=B=Z+I,this.isVideoContiguous=!0;var bt=y.default.moof(E.sequenceNumber++,K,c({},E,{samples:G})),Wt="video",Bt={data1:bt,data2:dt,startPTS:ue/N,endPTS:(de+I)/N,startDTS:K/N,endDTS:B/N,type:Wt,hasAudio:!1,hasVideo:!0,nb:G.length,dropped:E.dropped};return E.samples=[],E.dropped=0,console.assert(dt.length,"MDAT length must not be zero"),Bt},O.remuxAudio=function(E,w,T,F,N){var L=E.inputTimeScale,G=E.samplerate?E.samplerate:L,z=L/G,A=E.isAAC?i:s,B=A*z,U=this._initPTS,I=!E.isAAC&&this.typeSupported.mpeg,K=[],Z=E.samples,ue=I?0:8,de=this.nextAudioPts||-1,Ce=w*L;if(this.isAudioContiguous=T=T||Z.length&&de>0&&(F&&Math.abs(Ce-de)<9e3||Math.abs(r(Z[0].pts-U,Ce)-de)<20*B),Z.forEach(function(Ne){Ne.pts=r(Ne.pts-U,Ce)}),!T||de<0){if(Z=Z.filter(function(Ne){return Ne.pts>=0}),!Z.length)return;N===0?de=0:F?de=Math.max(0,Ce):de=Z[0].pts}if(E.isAAC)for(var Re=N!==void 0,me=this.config.maxAudioFramesDrift,Oe=0,be=de;Oe<Z.length;Oe++){var ce=Z[Oe],se=ce.pts,ne=se-be,ge=Math.abs(1e3*ne/L);if(ne<=-me*B&&Re)Oe===0&&(t.logger.warn("Audio frame @ "+(se/L).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*ne/L)+" ms."),this.nextAudioPts=de=be=se);else if(ne>=me*B&&ge<a&&Re){var ee=Math.round(ne/B);be=se-ee*B,be<0&&(ee--,be+=B),Oe===0&&(this.nextAudioPts=de=be),t.logger.warn("[mp4-remuxer]: Injecting "+ee+" audio frame @ "+(be/L).toFixed(3)+"s due to "+Math.round(1e3*ne/L)+" ms gap.");for(var re=0;re<ee;re++){var Te=Math.max(be,0),ie=m.default.getSilentFrame(E.manifestCodec||E.codec,E.channelCount);ie||(t.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),ie=ce.unit.subarray()),Z.splice(Oe,0,{unit:ie,pts:Te}),be+=B,Oe++}}ce.pts=be,be+=B}for(var q=null,Y=null,X,he=0,fe=Z.length;fe--;)he+=Z[fe].unit.byteLength;for(var Ee=0,He=Z.length;Ee<He;Ee++){var Qe=Z[Ee],et=Qe.unit,it=Qe.pts;if(Y!==null){var ut=K[Ee-1];ut.duration=Math.round((it-Y)/z)}else if(T&&E.isAAC&&(it=de),q=it,he>0){he+=ue;try{X=new Uint8Array(he)}catch(Ne){this.observer.emit(S.Events.ERROR,S.Events.ERROR,{type:_.ErrorTypes.MUX_ERROR,details:_.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:he,reason:"fail allocating audio mdat "+he});return}if(!I){var dt=new DataView(X.buffer);dt.setUint32(0,he),X.set(y.default.types.mdat,4)}}else return;X.set(et,ue);var Fe=et.byteLength;ue+=Fe,K.push(new v(!0,A,Fe,0)),Y=it}var Ie=K.length;if(!Ie)return;var st=K[K.length-1];this.nextAudioPts=de=Y+z*st.duration;var ft=I?new Uint8Array(0):y.default.moof(E.sequenceNumber++,q/z,c({},E,{samples:K}));E.samples=[];var Ze=q/L,tt=de/L,Be="audio",Pe={data1:ft,data2:X,startPTS:Ze,endPTS:tt,startDTS:Ze,endDTS:tt,type:Be,hasAudio:!0,hasVideo:!1,nb:Ie};return this.isAudioContiguous=!0,console.assert(X.length,"MDAT length must not be zero"),Pe},O.remuxEmptyAudio=function(E,w,T,F){var N=E.inputTimeScale,L=E.samplerate?E.samplerate:N,G=N/L,z=this.nextAudioPts,A=(z!==null?z:F.startDTS*N)+this._initDTS,B=F.endDTS*N+this._initDTS,U=G*i,I=Math.ceil((B-A)/U),K=m.default.getSilentFrame(E.manifestCodec||E.codec,E.channelCount);if(t.logger.warn("[mp4-remuxer]: remux empty Audio"),!K){t.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var Z=[],ue=0;ue<I;ue++){var de=A+ue*U;Z.push({unit:K,pts:de,dts:de})}return E.samples=Z,this.remuxAudio(E,w,T,!1)},O.remuxID3=function(E,w){var T=E.samples.length;if(!T)return;for(var F=E.inputTimeScale,N=this._initPTS,L=this._initDTS,G=0;G<T;G++){var z=E.samples[G];z.pts=r(z.pts-N,w*F)/F,z.dts=r(z.dts-L,w*F)/F}var A=E.samples;return E.samples=[],{samples:A}},O.remuxText=function(E,w){var T=E.samples.length;if(!T)return;for(var F=E.inputTimeScale,N=this._initPTS,L=0;L<T;L++){var G=E.samples[L];G.pts=r(G.pts-N,w*F)/F}E.samples.sort(function(A,B){return A.pts-B.pts});var z=E.samples;return E.samples=[],{samples:z}},R}();function r(R,O){var b;if(O===null)return R;for(O<R?b=-8589934592:b=8589934592;Math.abs(R-O)>4294967296;)R+=b;return R}function x(R){for(var O=0;O<R.length;O++)if(R[O].key)return O;return-1}var v=function(O,b,E,w){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=b,this.size=E,this.cts=w,this.flags=new p(O)},p=function(O){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=O?2:1,this.isNonSync=O?0:1}},"./src/remux/passthrough-remuxer.ts":function(k,g,C){"use strict";C.r(g);var M=C("./src/polyfills/number.ts"),m=C("./src/utils/mp4-tools.ts"),y=C("./src/loader/fragment.ts"),S=C("./src/utils/logger.ts"),_=function(){function n(){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=n.prototype;return c.destroy=function(){},c.resetTimeStamp=function(i){this.initPTS=i,this.lastEndDTS=null},c.resetNextTimestamp=function(){this.lastEndDTS=null},c.resetInitSegment=function(i,s,d){this.audioCodec=s,this.videoCodec=d,this.generateInitSegment(i),this.emitInitSegment=!0},c.generateInitSegment=function(i){var s=this.audioCodec,d=this.videoCodec;if(!i||!i.byteLength){this.initTracks=void 0,this.initData=void 0;return}var f=this.initData=Object(m.parseInitSegment)(i);s||(s=h(f.audio,y.ElementaryStreamTypes.AUDIO)),d||(d=h(f.video,y.ElementaryStreamTypes.VIDEO));var l={};f.audio&&f.video?l.audiovideo={container:"video/mp4",codec:s+","+d,initSegment:i,id:"main"}:f.audio?l.audio={container:"audio/mp4",codec:s,initSegment:i,id:"audio"}:f.video?l.video={container:"video/mp4",codec:d,initSegment:i,id:"main"}:S.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=l},c.remux=function(i,s,d,f,l){var o=this.initPTS,r=this.lastEndDTS,x={audio:void 0,video:void 0,text:f,id3:d,initSegment:void 0};Object(M.isFiniteNumber)(r)||(r=this.lastEndDTS=l||0);var v=s.samples;if(!v||!v.length)return x;var p={initPTS:void 0,timescale:1},R=this.initData;if((!R||!R.length)&&(this.generateInitSegment(v),R=this.initData),!R||!R.length)return S.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),x;this.emitInitSegment&&(p.tracks=this.initTracks,this.emitInitSegment=!1),Object(M.isFiniteNumber)(o)||(this.initPTS=p.initPTS=o=t(R,v,r));var O=Object(m.getDuration)(v,R),b=r,E=O+b;Object(m.offsetStartDTS)(R,v,o),O>0?this.lastEndDTS=E:(S.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var w=!!R.audio,T=!!R.video,F="";w&&(F+="audio"),T&&(F+="video");var N={data1:v,startPTS:b,startDTS:b,endPTS:E,endDTS:E,type:F,hasAudio:w,hasVideo:T,nb:1,dropped:0};return x.audio=N.type==="audio"?N:void 0,x.video=N.type!=="audio"?N:void 0,x.text=f,x.id3=d,x.initSegment=p,x},n}(),t=function(c,a,i){return Object(m.getStartDTS)(c,a)-i};function h(n,c){var a=n==null?void 0:n.codec;return a&&a.length>4?a:a==="hvc1"?"hvc1.1.c.L120.90":a==="av01"?"av01.0.04M.08":a==="avc1"||c===y.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}g.default=_},"./src/task-loop.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"default",function(){return M});var M=function(){function m(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var y=m.prototype;return y.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},y.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},y.onHandlerDestroyed=function(){},y.hasInterval=function(){return!!this._tickInterval},y.hasNextTick=function(){return!!this._tickTimer},y.setInterval=function(_){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,_),!0)},y.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},y.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},y.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},y.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},y.doTick=function(){},m}()},"./src/types/cmcd.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"CMCDVersion",function(){return M}),C.d(g,"CMCDObjectType",function(){return m}),C.d(g,"CMCDStreamingFormat",function(){return y}),C.d(g,"CMCDStreamType",function(){return S});var M=1,m;(function(_){_.MANIFEST="m",_.AUDIO="a",_.VIDEO="v",_.MUXED="av",_.INIT="i",_.CAPTION="c",_.TIMED_TEXT="tt",_.KEY="k",_.OTHER="o"})(m||(m={}));var y;(function(_){_.DASH="d",_.HLS="h",_.SMOOTH="s",_.OTHER="o"})(y||(y={}));var S;(function(_){_.VOD="v",_.LIVE="l"})(S||(S={}))},"./src/types/level.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"HlsSkip",function(){return y}),C.d(g,"getSkipValue",function(){return S}),C.d(g,"HlsUrlParameters",function(){return _}),C.d(g,"Level",function(){return t});function M(h,n){for(var c=0;c<n.length;c++){var a=n[c];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(h,a.key,a)}}function m(h,n,c){return n&&M(h.prototype,n),c&&M(h,c),h}var y;(function(h){h.No="",h.Yes="YES",h.v2="v2"})(y||(y={}));function S(h,n){var c=h.canSkipUntil,a=h.canSkipDateRanges,i=h.endSN,s=n!==void 0?n-i:0;return c&&s<c?a?y.v2:y.Yes:y.No}var _=function(){function h(c,a,i){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=c,this.part=a,this.skip=i}var n=h.prototype;return n.addDirectives=function(a){var i=new self.URL(a);return this.msn!==void 0&&i.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&i.searchParams.set("_HLS_part",this.part.toString()),this.skip&&i.searchParams.set("_HLS_skip",this.skip),i.toString()},h}(),t=function(){function h(n){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=[n.url],this.attrs=n.attrs,this.bitrate=n.bitrate,n.details&&(this.details=n.details),this.id=n.id||0,this.name=n.name,this.width=n.width||0,this.height=n.height||0,this.audioCodec=n.audioCodec,this.videoCodec=n.videoCodec,this.unknownCodecs=n.unknownCodecs,this.codecSet=[n.videoCodec,n.audioCodec].filter(function(c){return c}).join(",").replace(/\.[^.,]+/g,"")}return m(h,[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(c){var a=c%this.url.length;this._urlId!==a&&(this.details=void 0,this._urlId=a)}}]),h}()},"./src/types/loader.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"PlaylistContextType",function(){return M}),C.d(g,"PlaylistLevelType",function(){return m});var M;(function(y){y.MANIFEST="manifest",y.LEVEL="level",y.AUDIO_TRACK="audioTrack",y.SUBTITLE_TRACK="subtitleTrack"})(M||(M={}));var m;(function(y){y.MAIN="main",y.AUDIO="audio",y.SUBTITLE="subtitle"})(m||(m={}))},"./src/types/transmuxer.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"ChunkMetadata",function(){return M});var M=function(S,_,t,h,n,c){h===void 0&&(h=0),n===void 0&&(n=-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=m(),this.buffering={audio:m(),video:m(),audiovideo:m()},this.level=S,this.sn=_,this.id=t,this.size=h,this.part=n,this.partial=c};function m(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"AttrList",function(){return y});var M=/^(\d+)x(\d+)$/,m=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,y=function(){function S(t){typeof t=="string"&&(t=S.parseAttrList(t));for(var h in t)t.hasOwnProperty(h)&&(this[h]=t[h])}var _=S.prototype;return _.decimalInteger=function(h){var n=parseInt(this[h],10);return n>Number.MAX_SAFE_INTEGER?Infinity:n},_.hexadecimalInteger=function(h){if(this[h]){var n=(this[h]||"0x").slice(2);n=(n.length&1?"0":"")+n;for(var c=new Uint8Array(n.length/2),a=0;a<n.length/2;a++)c[a]=parseInt(n.slice(a*2,a*2+2),16);return c}else return null},_.hexadecimalIntegerAsNumber=function(h){var n=parseInt(this[h],16);return n>Number.MAX_SAFE_INTEGER?Infinity:n},_.decimalFloatingPoint=function(h){return parseFloat(this[h])},_.optionalFloat=function(h,n){var c=this[h];return c?parseFloat(c):n},_.enumeratedString=function(h){return this[h]},_.bool=function(h){return this[h]==="YES"},_.decimalResolution=function(h){var n=M.exec(this[h]);return n===null?void 0:{width:parseInt(n[1],10),height:parseInt(n[2],10)}},S.parseAttrList=function(h){var n,c={},a='"';for(m.lastIndex=0;(n=m.exec(h))!==null;){var i=n[2];i.indexOf(a)===0&&i.lastIndexOf(a)===i.length-1&&(i=i.slice(1,-1)),c[n[1]]=i}return c},S}()},"./src/utils/binary-search.ts":function(k,g,C){"use strict";C.r(g);var M={search:function(y,S){for(var _=0,t=y.length-1,h=null,n=null;_<=t;){h=(_+t)/2|0,n=y[h];var c=S(n);if(c>0)_=h+1;else if(c<0)t=h-1;else return n}return null}};g.default=M},"./src/utils/buffer-helper.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"BufferHelper",function(){return y});var M=C("./src/utils/logger.ts"),m={length:0,start:function(){return 0},end:function(){return 0}},y=function(){function S(){}return S.isBuffered=function(t,h){try{if(t){for(var n=S.getBuffered(t),c=0;c<n.length;c++)if(h>=n.start(c)&&h<=n.end(c))return!0}}catch(a){}return!1},S.bufferInfo=function(t,h,n){try{if(t){var c=S.getBuffered(t),a=[],i;for(i=0;i<c.length;i++)a.push({start:c.start(i),end:c.end(i)});return this.bufferedInfo(a,h,n)}}catch(s){}return{len:0,start:h,end:h,nextStart:void 0}},S.bufferedInfo=function(t,h,n){h=Math.max(0,h),t.sort(function(p,R){var O=p.start-R.start;return O||R.end-p.end});var c=[];if(n)for(var a=0;a<t.length;a++){var i=c.length;if(i){var s=c[i-1].end;t[a].start-s<n?t[a].end>s&&(c[i-1].end=t[a].end):c.push(t[a])}else c.push(t[a])}else c=t;for(var d=0,f,l=h,o=h,r=0;r<c.length;r++){var x=c[r].start,v=c[r].end;if(h+n>=x&&h<v)l=x,o=v,d=o-h;else if(h+n<x){f=x;break}}return{len:d,start:l||0,end:o||0,nextStart:f}},S.getBuffered=function(t){try{return t.buffered}catch(h){return M.logger.log("failed to get media.buffered",h),m}},S}()},"./src/utils/cea-608-parser.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"Row",function(){return o}),C.d(g,"CaptionScreen",function(){return r});var M=C("./src/utils/logger.ts"),m={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},y=function(E){var w=E;return m.hasOwnProperty(E)&&(w=m[E]),String.fromCharCode(w)},S=15,_=100,t={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},h={17:2,18:4,21:6,22:8,23:10,19:13,20:15},n={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},a=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],i;(function(b){b[b.ERROR=0]="ERROR",b[b.TEXT=1]="TEXT",b[b.WARNING=2]="WARNING",b[b.INFO=2]="INFO",b[b.DEBUG=3]="DEBUG",b[b.DATA=3]="DATA"})(i||(i={}));var s=function(){function b(){this.time=null,this.verboseLevel=i.ERROR}var E=b.prototype;return E.log=function(T,F){this.verboseLevel>=T&&M.logger.log(this.time+" ["+T+"] "+F)},b}(),d=function(E){for(var w=[],T=0;T<E.length;T++)w.push(E[T].toString(16));return w},f=function(){function b(w,T,F,N,L){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=N||"black",this.flash=L||!1}var E=b.prototype;return E.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},E.setStyles=function(T){for(var F=["foreground","underline","italics","background","flash"],N=0;N<F.length;N++){var L=F[N];T.hasOwnProperty(L)&&(this[L]=T[L])}},E.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},E.equals=function(T){return this.foreground===T.foreground&&this.underline===T.underline&&this.italics===T.italics&&this.background===T.background&&this.flash===T.flash},E.copy=function(T){this.foreground=T.foreground,this.underline=T.underline,this.italics=T.italics,this.background=T.background,this.flash=T.flash},E.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},b}(),l=function(){function b(w,T,F,N,L,G){this.uchar=void 0,this.penState=void 0,this.uchar=w||" ",this.penState=new f(T,F,N,L,G)}var E=b.prototype;return E.reset=function(){this.uchar=" ",this.penState.reset()},E.setChar=function(T,F){this.uchar=T,this.penState.copy(F)},E.setPenState=function(T){this.penState.copy(T)},E.equals=function(T){return this.uchar===T.uchar&&this.penState.equals(T.penState)},E.copy=function(T){this.uchar=T.uchar,this.penState.copy(T.penState)},E.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},b}(),o=function(){function b(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 l);this.logger=w,this.pos=0,this.currPenState=new f}var E=b.prototype;return E.equals=function(T){for(var F=!0,N=0;N<_;N++)if(!this.chars[N].equals(T.chars[N])){F=!1;break}return F},E.copy=function(T){for(var F=0;F<_;F++)this.chars[F].copy(T.chars[F])},E.isEmpty=function(){for(var T=!0,F=0;F<_;F++)if(!this.chars[F].isEmpty()){T=!1;break}return T},E.setCursor=function(T){this.pos!==T&&(this.pos=T),this.pos<0?(this.logger.log(i.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>_&&(this.logger.log(i.DEBUG,"Too large cursor position "+this.pos),this.pos=_)},E.moveCursor=function(T){var F=this.pos+T;if(T>1)for(var N=this.pos+1;N<F+1;N++)this.chars[N].setPenState(this.currPenState);this.setCursor(F)},E.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},E.insertChar=function(T){T>=144&&this.backSpace();var F=y(T);if(this.pos>=_){this.logger.log(i.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)},E.clearFromPos=function(T){var F;for(F=T;F<_;F++)this.chars[F].reset()},E.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},E.clearToEndOfRow=function(){this.clearFromPos(this.pos)},E.getTextString=function(){for(var T=[],F=!0,N=0;N<_;N++){var L=this.chars[N].uchar;L!==" "&&(F=!1),T.push(L)}return F?"":T.join("")},E.setPenStyles=function(T){this.currPenState.setStyles(T);var F=this.chars[this.pos];F.setPenState(this.currPenState)},b}(),r=function(){function b(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<S;T++)this.rows.push(new o(w));this.logger=w,this.currRow=S-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var E=b.prototype;return E.reset=function(){for(var T=0;T<S;T++)this.rows[T].clear();this.currRow=S-1},E.equals=function(T){for(var F=!0,N=0;N<S;N++)if(!this.rows[N].equals(T.rows[N])){F=!1;break}return F},E.copy=function(T){for(var F=0;F<S;F++)this.rows[F].copy(T.rows[F])},E.isEmpty=function(){for(var T=!0,F=0;F<S;F++)if(!this.rows[F].isEmpty()){T=!1;break}return T},E.backSpace=function(){var T=this.rows[this.currRow];T.backSpace()},E.clearToEndOfRow=function(){var T=this.rows[this.currRow];T.clearToEndOfRow()},E.insertChar=function(T){var F=this.rows[this.currRow];F.insertChar(T)},E.setPen=function(T){var F=this.rows[this.currRow];F.setPenStyles(T)},E.moveCursor=function(T){var F=this.rows[this.currRow];F.moveCursor(T)},E.setCursor=function(T){this.logger.log(i.INFO,"setCursor: "+T);var F=this.rows[this.currRow];F.setCursor(T)},E.setPAC=function(T){this.logger.log(i.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 N=0;N<S;N++)this.rows[N].clear();var L=this.currRow+1-this.nrRollUpRows,G=this.lastOutputScreen;if(G){var z=G.rows[L].cueStartTime,A=this.logger.time;if(z&&A!==null&&z<A)for(var B=0;B<this.nrRollUpRows;B++)this.rows[F-this.nrRollUpRows+B+1].copy(G.rows[L+B])}}this.currRow=F;var U=this.rows[this.currRow];if(T.indent!==null){var I=T.indent,K=Math.max(I-1,0);U.setCursor(T.indent),T.color=U.chars[K].penState.foreground}var Z={foreground:T.color,underline:T.underline,italics:T.italics,background:"black",flash:!1};this.setPen(Z)},E.setBkgData=function(T){this.logger.log(i.INFO,"bkgData = "+JSON.stringify(T)),this.backSpace(),this.setPen(T),this.insertChar(32)},E.setRollUpRows=function(T){this.nrRollUpRows=T},E.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(i.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(i.TEXT,this.getDisplayText());var T=this.currRow+1-this.nrRollUpRows,F=this.rows.splice(T,1)[0];F.clear(),this.rows.splice(this.currRow,0,F),this.logger.log(i.INFO,"Rolling up")},E.getDisplayText=function(T){T=T||!1;for(var F=[],N="",L=-1,G=0;G<S;G++){var z=this.rows[G].getTextString();z&&(L=G+1,T?F.push("Row "+L+": '"+z+"'"):F.push(z.trim()))}return F.length>0&&(T?N="["+F.join(" | ")+"]":N=F.join(`
`)),N},E.getTextAndFormat=function(){return this.rows},b}(),x=function(){function b(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 r(F),this.nonDisplayedMemory=new r(F),this.lastOutputScreen=new r(F),this.currRollUpRow=this.displayedMemory.rows[S-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=F}var E=b.prototype;return E.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[S-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},E.getHandler=function(){return this.outputFilter},E.setHandler=function(T){this.outputFilter=T},E.setPAC=function(T){this.writeScreen.setPAC(T)},E.setBkgData=function(T){this.writeScreen.setBkgData(T)},E.setMode=function(T){if(T===this.mode)return;this.mode=T,this.logger.log(i.INFO,"MODE="+T),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=T},E.insertChars=function(T){for(var F=0;F<T.length;F++)this.writeScreen.insertChar(T[F]);var N=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(i.INFO,N+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(i.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},E.ccRCL=function(){this.logger.log(i.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},E.ccBS=function(){if(this.logger.log(i.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},E.ccAOF=function(){},E.ccAON=function(){},E.ccDER=function(){this.logger.log(i.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},E.ccRU=function(T){this.logger.log(i.INFO,"RU("+T+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(T)},E.ccFON=function(){this.logger.log(i.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},E.ccRDC=function(){this.logger.log(i.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},E.ccTR=function(){this.logger.log(i.INFO,"TR"),this.setMode("MODE_TEXT")},E.ccRTD=function(){this.logger.log(i.INFO,"RTD"),this.setMode("MODE_TEXT")},E.ccEDM=function(){this.logger.log(i.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},E.ccCR=function(){this.logger.log(i.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},E.ccENM=function(){this.logger.log(i.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},E.ccEOC=function(){if(this.logger.log(i.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var T=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=T,this.writeScreen=this.nonDisplayedMemory,this.logger.log(i.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},E.ccTO=function(T){this.logger.log(i.INFO,"TO("+T+") - Tab Offset"),this.writeScreen.moveCursor(T)},E.ccMIDROW=function(T){var F={flash:!1};if(F.underline=T%2===1,F.italics=T>=46,F.italics)F.foreground="white";else{var N=Math.floor(T/2)-16,L=["white","green","blue","cyan","red","yellow","magenta"];F.foreground=L[N]}this.logger.log(i.INFO,"MIDROW: "+JSON.stringify(F)),this.writeScreen.setPen(F)},E.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))},E.cueSplitAtTime=function(T){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,T,this.displayedMemory),this.cueStartTime=T))},b}(),v=function(){function b(w,T,F){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var N=new s;this.channels=[null,new x(w,T,N),new x(w+1,F,N)],this.cmdHistory=O(),this.logger=N}var E=b.prototype;return E.getHandler=function(T){return this.channels[T].getHandler()},E.setHandler=function(T,F){this.channels[T].setHandler(F)},E.addData=function(T,F){var N,L,G,z=!1;this.logger.time=T;for(var A=0;A<F.length;A+=2){if(L=F[A]&127,G=F[A+1]&127,L===0&&G===0)continue;if(this.logger.log(i.DATA,"["+d([F[A],F[A+1]])+"] -> ("+d([L,G])+")"),N=this.parseCmd(L,G),N||(N=this.parseMidrow(L,G)),N||(N=this.parsePAC(L,G)),N||(N=this.parseBackgroundAttributes(L,G)),!N&&(z=this.parseChars(L,G),z)){var B=this.currentChannel;if(B&&B>0){var U=this.channels[B];U.insertChars(z)}else this.logger.log(i.WARNING,"No channel found yet. TEXT-MODE?")}!N&&!z&&this.logger.log(i.WARNING,"Couldn't parse cleaned data "+d([L,G])+" orig: "+d([F[A],F[A+1]]))}},E.parseCmd=function(T,F){var N=this.cmdHistory,L=(T===20||T===28||T===21||T===29)&&F>=32&&F<=47,G=(T===23||T===31)&&F>=33&&F<=35;if(!(L||G))return!1;if(R(T,F,N))return p(null,null,N),this.logger.log(i.DEBUG,"Repeated command ("+d([T,F])+") is dropped"),!0;var z=T===20||T===21||T===23?1:2,A=this.channels[z];return T===20||T===21||T===28||T===29?F===32?A.ccRCL():F===33?A.ccBS():F===34?A.ccAOF():F===35?A.ccAON():F===36?A.ccDER():F===37?A.ccRU(2):F===38?A.ccRU(3):F===39?A.ccRU(4):F===40?A.ccFON():F===41?A.ccRDC():F===42?A.ccTR():F===43?A.ccRTD():F===44?A.ccEDM():F===45?A.ccCR():F===46?A.ccENM():F===47&&A.ccEOC():A.ccTO(F-32),p(T,F,N),this.currentChannel=z,!0},E.parseMidrow=function(T,F){var N=0;if((T===17||T===25)&&F>=32&&F<=47){if(T===17?N=1:N=2,N!==this.currentChannel)return this.logger.log(i.ERROR,"Mismatch channel in midrow parsing"),!1;var L=this.channels[N];return L?(L.ccMIDROW(F),this.logger.log(i.DEBUG,"MIDROW ("+d([T,F])+")"),!0):!1}return!1},E.parsePAC=function(T,F){var N,L=this.cmdHistory,G=(T>=17&&T<=23||T>=25&&T<=31)&&F>=64&&F<=127,z=(T===16||T===24)&&F>=64&&F<=95;if(!(G||z))return!1;if(R(T,F,L))return p(null,null,L),!0;var A=T<=23?1:2;F>=64&&F<=95?N=A===1?t[T]:n[T]:N=A===1?h[T]:c[T];var B=this.channels[A];return B?(B.setPAC(this.interpretPAC(N,F)),p(T,F,L),this.currentChannel=A,!0):!1},E.interpretPAC=function(T,F){var N,L={color:null,italics:!1,indent:null,underline:!1,row:T};return F>95?N=F-96:N=F-64,L.underline=(N&1)===1,N<=13?L.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(N/2)]:N<=15?(L.italics=!0,L.color="white"):L.indent=Math.floor((N-16)/2)*4,L},E.parseChars=function(T,F){var N,L=null,G=null;if(T>=25?(N=2,G=T-8):(N=1,G=T),G>=17&&G<=19){var z;G===17?z=F+80:G===18?z=F+112:z=F+144,this.logger.log(i.INFO,"Special char '"+y(z)+"' in channel "+N),L=[z]}else T>=32&&T<=127&&(L=F===0?[T]:[T,F]);if(L){var A=d(L);this.logger.log(i.DEBUG,"Char codes = "+A.join(",")),p(T,F,this.cmdHistory)}return L},E.parseBackgroundAttributes=function(T,F){var N=(T===16||T===24)&&F>=32&&F<=47,L=(T===23||T===31)&&F>=45&&F<=47;if(!(N||L))return!1;var G,z={};T===16||T===24?(G=Math.floor((F-32)/2),z.background=a[G],F%2===1&&(z.background=z.background+"_semi")):F===45?z.background="transparent":(z.foreground="black",F===47&&(z.underline=!0));var A=T<=23?1:2,B=this.channels[A];return B.setBkgData(z),p(T,F,this.cmdHistory),!0},E.reset=function(){for(var T=0;T<Object.keys(this.channels).length;T++){var F=this.channels[T];F&&F.reset()}this.cmdHistory=O()},E.cueSplitAtTime=function(T){for(var F=0;F<this.channels.length;F++){var N=this.channels[F];N&&N.cueSplitAtTime(T)}},b}();function p(b,E,w){w.a=b,w.b=E}function R(b,E,w){return w.a===b&&w.b===E}function O(){return{a:null,b:null}}g.default=v},"./src/utils/codecs.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"isCodecType",function(){return m}),C.d(g,"isCodecSupportedInMp4",function(){return y});var M={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}};function m(S,_){var t=M[_];return!!t&&t[S.slice(0,4)]===!0}function y(S,_){return MediaSource.isTypeSupported((_||"video")+'/mp4;codecs="'+S+'"')}},"./src/utils/cues.ts":function(k,g,C){"use strict";C.r(g);var M=C("./src/utils/vttparser.ts"),m=C("./src/utils/webvtt-parser.ts"),y=C("./src/utils/texttrack-utils.ts"),S=/\s/,_={newCue:function(h,n,c,a){for(var i=[],s,d,f,l,o,r=self.VTTCue||self.TextTrackCue,x=0;x<a.rows.length;x++)if(s=a.rows[x],f=!0,l=0,o="",!s.isEmpty()){for(var v=0;v<s.chars.length;v++)S.test(s.chars[v].uchar)&&f?l++:(o+=s.chars[v].uchar,f=!1);s.cueStartTime=n,n===c&&(c+=1e-4),l>=16?l--:l++;var p=Object(M.fixLineBreaks)(o.trim()),R=Object(m.generateCueId)(n,c,p);(!h||!h.cues||!h.cues.getCueById(R))&&(d=new r(n,c,p),d.id=R,d.line=x+1,d.align="left",d.position=10+Math.min(80,Math.floor(l*8/32)*10),i.push(d))}return h&&i.length&&(i.sort(function(O,b){return O.line==="auto"||b.line==="auto"?0:O.line>8&&b.line>8?b.line-O.line:O.line-b.line}),i.forEach(function(O){return Object(y.addCueToTrack)(h,O)})),i}};g.default=_},"./src/utils/discontinuities.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"findFirstFragWithCC",function(){return S}),C.d(g,"shouldAlignOnDiscontinuities",function(){return _}),C.d(g,"findDiscontinuousReferenceFrag",function(){return t}),C.d(g,"adjustSlidingStart",function(){return n}),C.d(g,"alignStream",function(){return c}),C.d(g,"alignPDT",function(){return i}),C.d(g,"alignFragmentByPDTDelta",function(){return s}),C.d(g,"alignMediaPlaylistByPDT",function(){return d});var M=C("./src/polyfills/number.ts"),m=C("./src/utils/logger.ts"),y=C("./src/controller/level-helper.ts");function S(f,l){for(var o=null,r=0,x=f.length;r<x;r++){var v=f[r];if(v&&v.cc===l){o=v;break}}return o}function _(f,l,o){return!!(l.details&&(o.endCC>o.startCC||f&&f.cc<o.startCC))}function t(f,l){var o=f.fragments,r=l.fragments;if(!r.length||!o.length){m.logger.log("No fragments to align");return}var x=S(o,r[0].cc);if(!x||x&&!x.startPTS){m.logger.log("No frag in previous level to align on");return}return x}function h(f,l){if(f){var o=f.start+l;f.start=f.startPTS=o,f.endPTS=o+f.duration}}function n(f,l){for(var o=l.fragments,r=0,x=o.length;r<x;r++)h(o[r],f);l.fragmentHint&&h(l.fragmentHint,f),l.alignedSliding=!0}function c(f,l,o){if(!l)return;a(f,o,l),!o.alignedSliding&&l.details&&i(o,l.details),!o.alignedSliding&&l.details&&!o.skippedSegments&&Object(y.adjustSliding)(l.details,o)}function a(f,l,o){if(_(f,o,l)){var r=t(o.details,l);r&&Object(M.isFiniteNumber)(r.start)&&(m.logger.log("Adjusting PTS using last level due to CC increase within current level "+l.url),n(r.start,l))}}function i(f,l){if(!l.fragments.length||!f.hasProgramDateTime||!l.hasProgramDateTime)return;var o=l.fragments[0].programDateTime,r=f.fragments[0].programDateTime,x=(r-o)/1e3+l.fragments[0].start;x&&Object(M.isFiniteNumber)(x)&&(m.logger.log("Adjusting PTS using programDateTime delta "+(r-o)+"ms, sliding:"+x.toFixed(3)+" "+f.url+" "),n(x,f))}function s(f,l){var o=f.programDateTime;if(!o)return;var r=(o-l)/1e3;f.start=f.startPTS=r,f.endPTS=r+f.duration}function d(f,l){if(!l.fragments.length||!f.hasProgramDateTime||!l.hasProgramDateTime)return;var o=l.fragments[0].programDateTime,r=l.fragments[0].start,x=o-r*1e3;f.fragments.forEach(function(v){s(v,x)}),f.fragmentHint&&s(f.fragmentHint,x),f.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(k,g,C){"use strict";C.r(g);var M=C("./src/utils/ewma.ts"),m=function(){function y(_,t,h){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=h,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new M.default(_),this.fast_=new M.default(t)}var S=y.prototype;return S.update=function(t,h){var n=this.slow_,c=this.fast_;this.slow_.halfLife!==t&&(this.slow_=new M.default(t,n.getEstimate(),n.getTotalWeight())),this.fast_.halfLife!==h&&(this.fast_=new M.default(h,c.getEstimate(),c.getTotalWeight()))},S.sample=function(t,h){t=Math.max(t,this.minDelayMs_);var n=8*h,c=t/1e3,a=n/c;this.fast_.sample(c,a),this.slow_.sample(c,a)},S.canEstimate=function(){var t=this.fast_;return t&&t.getTotalWeight()>=this.minWeight_},S.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},S.destroy=function(){},y}();g.default=m},"./src/utils/ewma.ts":function(k,g,C){"use strict";C.r(g);var M=function(){function m(S,_,t){_===void 0&&(_=0),t===void 0&&(t=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=S,this.alpha_=S?Math.exp(Math.log(.5)/S):0,this.estimate_=_,this.totalWeight_=t}var y=m.prototype;return y.sample=function(_,t){var h=Math.pow(this.alpha_,_);this.estimate_=t*(1-h)+h*this.estimate_,this.totalWeight_+=_},y.getTotalWeight=function(){return this.totalWeight_},y.getEstimate=function(){if(this.alpha_){var _=1-Math.pow(this.alpha_,this.totalWeight_);if(_)return this.estimate_/_}return this.estimate_},m}();g.default=M},"./src/utils/fetch-loader.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"fetchSupported",function(){return s});var M=C("./src/polyfills/number.ts"),m=C("./src/loader/load-stats.ts"),y=C("./src/demux/chunk-cache.ts");function S(r,x){r.prototype=Object.create(x.prototype),r.prototype.constructor=r,c(r,x)}function _(r){var x=typeof Map=="function"?new Map:void 0;return _=function(p){if(p===null||!n(p))return p;if(typeof p!="function")throw new TypeError("Super expression must either be null or a function");if(typeof x!="undefined"){if(x.has(p))return x.get(p);x.set(p,R)}function R(){return t(p,arguments,a(this).constructor)}return R.prototype=Object.create(p.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),c(R,p)},_(r)}function t(r,x,v){return h()?t=Reflect.construct:t=function(R,O,b){var E=[null];E.push.apply(E,O);var w=Function.bind.apply(R,E),T=new w;return b&&c(T,b.prototype),T},t.apply(null,arguments)}function h(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}function n(r){return Function.toString.call(r).indexOf("[native code]")!==-1}function c(r,x){return c=Object.setPrototypeOf||function(p,R){return p.__proto__=R,p},c(r,x)}function a(r){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(v){return v.__proto__||Object.getPrototypeOf(v)},a(r)}function i(){return i=Object.assign||function(r){for(var x=1;x<arguments.length;x++){var v=arguments[x];for(var p in v)Object.prototype.hasOwnProperty.call(v,p)&&(r[p]=v[p])}return r},i.apply(this,arguments)}function s(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(r){}return!1}var d=function(){function r(v){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=v.fetchSetup||l,this.controller=new self.AbortController,this.stats=new m.LoadStats}var x=r.prototype;return x.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},x.abortInternal=function(){var p=this.response;(!p||!p.ok)&&(this.stats.aborted=!0,this.controller.abort())},x.abort=function(){var p;this.abortInternal(),(p=this.callbacks)!==null&&p!==void 0&&p.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},x.load=function(p,R,O){var b=this,E=this.stats;if(E.loading.start)throw new Error("Loader can only be used once.");E.loading.start=self.performance.now();var w=f(p,this.controller.signal),T=O.onProgress,F=p.responseType==="arraybuffer",N=F?"byteLength":"length";this.context=p,this.config=R,this.callbacks=O,this.request=this.fetchSetup(p,w),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){b.abortInternal(),O.onTimeout(E,p,b.response)},R.timeout),self.fetch(this.request).then(function(L){if(b.response=b.loader=L,!L.ok){var G=L.status,z=L.statusText;throw new o(z||"fetch, bad network response",G,L)}return E.loading.first=Math.max(self.performance.now(),E.loading.start),E.total=parseInt(L.headers.get("Content-Length")||"0"),T&&Object(M.isFiniteNumber)(R.highWaterMark)?b.loadProgressively(L,E,p,R.highWaterMark,T):F?L.arrayBuffer():L.text()}).then(function(L){var G=b.response;self.clearTimeout(b.requestTimeout),E.loading.end=Math.max(self.performance.now(),E.loading.first),E.loaded=E.total=L[N];var z={url:G.url,data:L};T&&!Object(M.isFiniteNumber)(R.highWaterMark)&&T(E,p,L,G),O.onSuccess(z,E,p,G)}).catch(function(L){if(self.clearTimeout(b.requestTimeout),E.aborted)return;var G=L.code||0;O.onError({code:G,text:L.message},p,L.details)})},x.getCacheAge=function(){var p=null;if(this.response){var R=this.response.headers.get("age");p=R?parseFloat(R):null}return p},x.loadProgressively=function(p,R,O,b,E){b===void 0&&(b=0);var w=new y.default,T=p.body.getReader(),F=function N(){return T.read().then(function(L){if(L.done)return w.dataLength&&E(R,O,w.flush(),p),Promise.resolve(new ArrayBuffer(0));var G=L.value,z=G.length;return R.loaded+=z,z<b||w.dataLength?(w.push(G),w.dataLength>=b&&E(R,O,w.flush(),p)):E(R,O,G,p),N()}).catch(function(){return Promise.reject()})};return F()},r}();function f(r,x){var v={method:"GET",mode:"cors",credentials:"same-origin",signal:x,headers:new self.Headers(i({},r.headers))};return r.rangeEnd&&v.headers.set("Range","bytes="+r.rangeStart+"-"+String(r.rangeEnd-1)),v}function l(r,x){return new self.Request(r.url,x)}var o=function(r){S(x,r);function x(v,p,R){var O;return O=r.call(this,v)||this,O.code=void 0,O.details=void 0,O.code=p,O.details=R,O}return x}(_(Error));g.default=d},"./src/utils/imsc1-ttml-parser.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"IMSC1_CODEC",function(){return n}),C.d(g,"parseIMSC1",function(){return s});var M=C("./src/utils/mp4-tools.ts"),m=C("./src/utils/vttparser.ts"),y=C("./src/utils/vttcue.ts"),S=C("./src/demux/id3.ts"),_=C("./src/utils/timescale-conversion.ts"),t=C("./src/utils/webvtt-parser.ts");function h(){return h=Object.assign||function(b){for(var E=1;E<arguments.length;E++){var w=arguments[E];for(var T in w)Object.prototype.hasOwnProperty.call(w,T)&&(b[T]=w[T])}return b},h.apply(this,arguments)}var n="stpp.ttml.im1t",c=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,a=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,i={left:"start",center:"center",right:"end",start:"start",end:"end"};function s(b,E,w,T,F){var N=Object(M.findBox)(new Uint8Array(b),["mdat"]);if(N.length===0){F(new Error("Could not parse IMSC1 mdat"));return}var L=N[0],G=Object(S.utf8ArrayToStr)(new Uint8Array(b,L.start,L.end-L.start)),z=Object(_.toTimescaleFromScale)(E,1,w);try{T(d(G,z))}catch(A){F(A)}}function d(b,E){var w=new DOMParser,T=w.parseFromString(b,"text/xml"),F=T.getElementsByTagName("tt")[0];if(!F)throw new Error("Invalid ttml");var N={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},L=Object.keys(N).reduce(function(U,I){return U[I]=F.getAttribute("ttp:"+I)||N[I],U},{}),G=F.getAttribute("xml:space")!=="preserve",z=l(f(F,"styling","style")),A=l(f(F,"layout","region")),B=f(F,"body","[begin]");return[].map.call(B,function(U){var I=o(U,G);if(!I||!U.hasAttribute("begin"))return null;var K=p(U.getAttribute("begin"),L),Z=p(U.getAttribute("dur"),L),ue=p(U.getAttribute("end"),L);if(K===null)throw v(U);if(ue===null){if(Z===null)throw v(U);ue=K+Z}var de=new y.default(K-E,ue-E,I);de.id=Object(t.generateCueId)(de.startTime,de.endTime,de.text);var Ce=A[U.getAttribute("region")],Re=z[U.getAttribute("style")];de.position=10,de.size=80;var me=r(Ce,Re),Oe=me.textAlign;if(Oe){var be=i[Oe];be&&(de.lineAlign=be),de.align=Oe}return h(de,me),de}).filter(function(U){return U!==null})}function f(b,E,w){var T=b.getElementsByTagName(E)[0];return T?[].slice.call(T.querySelectorAll(w)):[]}function l(b){return b.reduce(function(E,w){var T=w.getAttribute("xml:id");return T&&(E[T]=w),E},{})}function o(b,E){return[].slice.call(b.childNodes).reduce(function(w,T,F){var N;return T.nodeName==="br"&&F?w+`
`:(N=T.childNodes)!==null&&N!==void 0&&N.length?o(T,E):E?w+T.textContent.trim().replace(/\s+/g," "):w+T.textContent},"")}function r(b,E){var w="http://www.w3.org/ns/ttml#styling",T=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return T.reduce(function(F,N){var L=x(E,w,N)||x(b,w,N);return L&&(F[N]=L),F},{})}function x(b,E,w){return b.hasAttributeNS(E,w)?b.getAttributeNS(E,w):null}function v(b){return new Error("Could not parse ttml timestamp "+b)}function p(b,E){if(!b)return null;var w=Object(m.parseTimeStamp)(b);return w===null&&(c.test(b)?w=R(b,E):a.test(b)&&(w=O(b,E))),w}function R(b,E){var w=c.exec(b),T=(w[4]|0)+(w[5]|0)/E.subFrameRate;return(w[1]|0)*3600+(w[2]|0)*60+(w[3]|0)+T/E.frameRate}function O(b,E){var w=a.exec(b),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/E.frameRate;case"t":return T/E.tickRate}return T}},"./src/utils/logger.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"enableLogs",function(){return t}),C.d(g,"logger",function(){return h});var M=function(){},m={trace:M,debug:M,log:M,warn:M,info:M,error:M},y=m;function S(n){var c=self.console[n];return c?c.bind(self.console,"["+n+"] >"):M}function _(n){for(var c=arguments.length,a=new Array(c>1?c-1:0),i=1;i<c;i++)a[i-1]=arguments[i];a.forEach(function(s){y[s]=n[s]?n[s].bind(n):S(s)})}function t(n){if(self.console&&n===!0||typeof n=="object"){_(n,"debug","log","info","warn","error");try{y.log()}catch(c){y=m}}else y=m}var h=y},"./src/utils/mediakeys-helper.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"KeySystems",function(){return M}),C.d(g,"requestMediaKeySystemAccess",function(){return m});var M;(function(y){y.WIDEVINE="com.widevine.alpha",y.PLAYREADY="com.microsoft.playready"})(M||(M={}));var m=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"getMediaSource",function(){return M});function M(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"bin2str",function(){return _}),C.d(g,"readUint16",function(){return t}),C.d(g,"readUint32",function(){return h}),C.d(g,"writeUint32",function(){return n}),C.d(g,"findBox",function(){return c}),C.d(g,"parseSegmentIndex",function(){return a}),C.d(g,"parseInitSegment",function(){return i}),C.d(g,"getStartDTS",function(){return s}),C.d(g,"getDuration",function(){return d}),C.d(g,"computeRawDurationFromSamples",function(){return f}),C.d(g,"offsetStartDTS",function(){return l}),C.d(g,"segmentValidRange",function(){return o}),C.d(g,"appendUint8Array",function(){return r});var M=C("./src/utils/typed-array.ts"),m=C("./src/loader/fragment.ts"),y=Math.pow(2,32)-1,S=[].push;function _(x){return String.fromCharCode.apply(null,x)}function t(x,v){"data"in x&&(v+=x.start,x=x.data);var p=x[v]<<8|x[v+1];return p<0?65536+p:p}function h(x,v){"data"in x&&(v+=x.start,x=x.data);var p=x[v]<<24|x[v+1]<<16|x[v+2]<<8|x[v+3];return p<0?4294967296+p:p}function n(x,v,p){"data"in x&&(v+=x.start,x=x.data),x[v]=p>>24,x[v+1]=p>>16&255,x[v+2]=p>>8&255,x[v+3]=p&255}function c(x,v){var p=[];if(!v.length)return p;var R,O,b;"data"in x?(R=x.data,O=x.start,b=x.end):(R=x,O=0,b=R.byteLength);for(var E=O;E<b;){var w=h(R,E),T=_(R.subarray(E+4,E+8)),F=w>1?E+w:b;if(T===v[0])if(v.length===1)p.push({data:R,start:E+8,end:F});else{var N=c({data:R,start:E+8,end:F},v.slice(1));N.length&&S.apply(p,N)}E=F}return p}function a(x){var v=c(x,["moov"]),p=v[0],R=p?p.end:null,O=c(x,["sidx"]);if(!O||!O[0])return null;var b=[],E=O[0],w=E.data[0],T=w===0?8:16,F=h(E,T);T+=4;var N=0,L=0;w===0?T+=8:T+=16,T+=2;var G=E.end+L,z=t(E,T);T+=2;for(var A=0;A<z;A++){var B=T,U=h(E,B);B+=4;var I=U&2147483647,K=(U&2147483648)>>>31;if(K===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var Z=h(E,B);B+=4,b.push({referenceSize:I,subsegmentDuration:Z,info:{duration:Z/F,start:G,end:G+I-1}}),G+=I,B+=4,T=B}return{earliestPresentationTime:N,timescale:F,version:w,referencesCount:z,references:b,moovEndOffset:R}}function i(x){for(var v=[],p=c(x,["moov","trak"]),R=0;R<p.length;R++){var O=p[R],b=c(O,["tkhd"])[0];if(b){var E=b.data[b.start],w=E===0?12:20,T=h(b,w),F=c(O,["mdia","mdhd"])[0];if(F){E=F.data[F.start],w=E===0?12:20;var N=h(F,w),L=c(O,["mdia","hdlr"])[0];if(L){var G=_(L.data.subarray(L.start+8,L.start+12)),z={soun:m.ElementaryStreamTypes.AUDIO,vide:m.ElementaryStreamTypes.VIDEO}[G];if(z){var A=c(O,["mdia","minf","stbl","stsd"])[0],B=void 0;A&&(B=_(A.data.subarray(A.start+12,A.start+16))),v[T]={timescale:N,type:z},v[z]={timescale:N,id:T,codec:B}}}}}}var U=c(x,["moov","mvex","trex"]);return U.forEach(function(I){var K=h(I,4),Z=v[K];Z&&(Z.default={duration:h(I,12),flags:h(I,20)})}),v}function s(x,v){return c(v,["moof","traf"]).reduce(function(p,R){var O=c(R,["tfdt"])[0],b=O.data[O.start],E=c(R,["tfhd"]).reduce(function(w,T){var F=h(T,4),N=x[F];if(N){var L=h(O,4);b===1&&(L*=Math.pow(2,32),L+=h(O,8));var G=N.timescale||9e4,z=L/G;if(isFinite(z)&&(w===null||z<w))return z}return w},null);return E!==null&&isFinite(E)&&(p===null||E<p)?E:p},null)||0}function d(x,v){for(var p=0,R=0,O=0,b=c(x,["moof","traf"]),E=0;E<b.length;E++){var w=b[E],T=c(w,["tfhd"])[0],F=h(T,4),N=v[F];if(!N)continue;var L=N.default,G=h(T,0)|(L==null?void 0:L.flags),z=L==null?void 0:L.duration;G&8&&(G&2?z=h(T,12):z=h(T,8));for(var A=N.timescale||9e4,B=c(w,["trun"]),U=0;U<B.length;U++){if(z){var I=h(B[U],4);p=z*I}else p=f(B[U]);N.type===m.ElementaryStreamTypes.VIDEO?R+=p/A:N.type===m.ElementaryStreamTypes.AUDIO&&(O+=p/A)}}if(R===0&&O===0){var K=a(x);if(K!=null&&K.references)return K.references.reduce(function(Z,ue){return Z+ue.info.duration||0},0)}return R||O}function f(x){var v=h(x,0),p=8;v&1&&(p+=4),v&4&&(p+=4);for(var R=0,O=h(x,4),b=0;b<O;b++){if(v&256){var E=h(x,p);R+=E,p+=4}v&512&&(p+=4),v&1024&&(p+=4),v&2048&&(p+=4)}return R}function l(x,v,p){c(v,["moof","traf"]).forEach(function(R){c(R,["tfhd"]).forEach(function(O){var b=h(O,4),E=x[b];if(!E)return;var w=E.timescale||9e4;c(R,["tfdt"]).forEach(function(T){var F=T.data[T.start],N=h(T,4);if(F===0)n(T,4,N-p*w);else{N*=Math.pow(2,32),N+=h(T,8),N-=p*w,N=Math.max(N,0);var L=Math.floor(N/(y+1)),G=Math.floor(N%(y+1));n(T,4,L),n(T,8,G)}})})})}function o(x){var v={valid:null,remainder:null},p=c(x,["moof"]);if(p){if(p.length<2)return v.remainder=x,v}else return v;var R=p[p.length-1];return v.valid=Object(M.sliceUint8)(x,0,R.start-8),v.remainder=Object(M.sliceUint8)(x,R.start-8),v}function r(x,v){var p=new Uint8Array(x.length+v.length);return p.set(x),p.set(v,x.length),p}},"./src/utils/output-filter.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"default",function(){return M});var M=function(){function m(S,_){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=S,this.trackName=_}var y=m.prototype;return y.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},y.newCue=function(_,t,h){(this.startTime===null||this.startTime>_)&&(this.startTime=_),this.endTime=t,this.screen=h,this.timelineController.createCaptionsTrack(this.trackName)},y.reset=function(){this.cueRanges=[]},m}()},"./src/utils/texttrack-utils.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"sendAddTrackEvent",function(){return m}),C.d(g,"addCueToTrack",function(){return y}),C.d(g,"clearCurrentCues",function(){return S}),C.d(g,"removeCuesInRange",function(){return _}),C.d(g,"getCuesInRange",function(){return h});var M=C("./src/utils/logger.ts");function m(n,c){var a;try{a=new Event("addtrack")}catch(i){a=document.createEvent("Event"),a.initEvent("addtrack",!1,!1)}a.track=n,c.dispatchEvent(a)}function y(n,c){var a=n.mode;if(a==="disabled"&&(n.mode="hidden"),n.cues&&!n.cues.getCueById(c.id))try{if(n.addCue(c),!n.cues.getCueById(c.id))throw new Error("addCue is failed for: "+c)}catch(s){M.logger.debug("[texttrack-utils]: "+s);var i=new self.TextTrackCue(c.startTime,c.endTime,c.text);i.id=c.id,n.addCue(i)}a==="disabled"&&(n.mode=a)}function S(n){var c=n.mode;if(c==="disabled"&&(n.mode="hidden"),n.cues)for(var a=n.cues.length;a--;)n.removeCue(n.cues[a]);c==="disabled"&&(n.mode=c)}function _(n,c,a){var i=n.mode;if(i==="disabled"&&(n.mode="hidden"),n.cues&&n.cues.length>0)for(var s=h(n.cues,c,a),d=0;d<s.length;d++)n.removeCue(s[d]);i==="disabled"&&(n.mode=i)}function t(n,c){if(c<n[0].startTime)return 0;var a=n.length-1;if(c>n[a].endTime)return-1;for(var i=0,s=a;i<=s;){var d=Math.floor((s+i)/2);if(c<n[d].startTime)s=d-1;else if(c>n[d].startTime&&i<a)i=d+1;else return d}return n[i].startTime-c<c-n[s].startTime?i:s}function h(n,c,a){var i=[],s=t(n,c);if(s>-1)for(var d=s,f=n.length;d<f;d++){var l=n[d];if(l.startTime>=c&&l.endTime<=a)i.push(l);else if(l.startTime>a)return i}return i}},"./src/utils/time-ranges.ts":function(k,g,C){"use strict";C.r(g);var M={toString:function(y){for(var S="",_=y.length,t=0;t<_;t++)S+="["+y.start(t).toFixed(3)+","+y.end(t).toFixed(3)+"]";return S}};g.default=M},"./src/utils/timescale-conversion.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"toTimescaleFromBase",function(){return m}),C.d(g,"toTimescaleFromScale",function(){return y}),C.d(g,"toMsFromMpegTsClock",function(){return S}),C.d(g,"toMpegTsClockFromTimescale",function(){return _});var M=9e4;function m(t,h,n,c){n===void 0&&(n=1),c===void 0&&(c=!1);var a=t*h*n;return c?Math.round(a):a}function y(t,h,n,c){return n===void 0&&(n=1),c===void 0&&(c=!1),m(t,h,1/n,c)}function S(t,h){return h===void 0&&(h=!1),m(t,1e3,1/M,h)}function _(t,h){return h===void 0&&(h=1),m(t,M,1/h)}},"./src/utils/typed-array.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"sliceUint8",function(){return M});function M(m,y,S){return Uint8Array.prototype.slice?m.slice(y,S):new Uint8Array(Array.prototype.slice.call(m,y,S))}},"./src/utils/vttcue.ts":function(k,g,C){"use strict";C.r(g),g.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var M=["","lr","rl"],m=["start","middle","end","left","right"];function y(n,c){if(typeof c!="string")return!1;if(!Array.isArray(n))return!1;var a=c.toLowerCase();return~n.indexOf(a)?a:!1}function S(n){return y(M,n)}function _(n){return y(m,n)}function t(n){for(var c=arguments.length,a=new Array(c>1?c-1:0),i=1;i<c;i++)a[i-1]=arguments[i];for(var s=1;s<arguments.length;s++){var d=arguments[s];for(var f in d)n[f]=d[f]}return n}function h(n,c,a){var i=this,s={enumerable:!0};i.hasBeenReset=!1;var d="",f=!1,l=n,o=c,r=a,x=null,v="",p=!0,R="auto",O="start",b=50,E="middle",w=50,T="middle";Object.defineProperty(i,"id",t({},s,{get:function(){return d},set:function(N){d=""+N}})),Object.defineProperty(i,"pauseOnExit",t({},s,{get:function(){return f},set:function(N){f=!!N}})),Object.defineProperty(i,"startTime",t({},s,{get:function(){return l},set:function(N){if(typeof N!="number")throw new TypeError("Start time must be set to a number.");l=N,this.hasBeenReset=!0}})),Object.defineProperty(i,"endTime",t({},s,{get:function(){return o},set:function(N){if(typeof N!="number")throw new TypeError("End time must be set to a number.");o=N,this.hasBeenReset=!0}})),Object.defineProperty(i,"text",t({},s,{get:function(){return r},set:function(N){r=""+N,this.hasBeenReset=!0}})),Object.defineProperty(i,"region",t({},s,{get:function(){return x},set:function(N){x=N,this.hasBeenReset=!0}})),Object.defineProperty(i,"vertical",t({},s,{get:function(){return v},set:function(N){var L=S(N);if(L===!1)throw new SyntaxError("An invalid or illegal string was specified.");v=L,this.hasBeenReset=!0}})),Object.defineProperty(i,"snapToLines",t({},s,{get:function(){return p},set:function(N){p=!!N,this.hasBeenReset=!0}})),Object.defineProperty(i,"line",t({},s,{get:function(){return R},set:function(N){if(typeof N!="number"&&N!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");R=N,this.hasBeenReset=!0}})),Object.defineProperty(i,"lineAlign",t({},s,{get:function(){return O},set:function(N){var L=_(N);if(!L)throw new SyntaxError("An invalid or illegal string was specified.");O=L,this.hasBeenReset=!0}})),Object.defineProperty(i,"position",t({},s,{get:function(){return b},set:function(N){if(N<0||N>100)throw new Error("Position must be between 0 and 100.");b=N,this.hasBeenReset=!0}})),Object.defineProperty(i,"positionAlign",t({},s,{get:function(){return E},set:function(N){var L=_(N);if(!L)throw new SyntaxError("An invalid or illegal string was specified.");E=L,this.hasBeenReset=!0}})),Object.defineProperty(i,"size",t({},s,{get:function(){return w},set:function(N){if(N<0||N>100)throw new Error("Size must be between 0 and 100.");w=N,this.hasBeenReset=!0}})),Object.defineProperty(i,"align",t({},s,{get:function(){return T},set:function(N){var L=_(N);if(!L)throw new SyntaxError("An invalid or illegal string was specified.");T=L,this.hasBeenReset=!0}})),i.displayState=void 0}return h.prototype.getCueAsHTML=function(){var n=self.WebVTT;return n.convertCueToDOMTree(self,this.text)},h}()},"./src/utils/vttparser.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"parseTimeStamp",function(){return y}),C.d(g,"fixLineBreaks",function(){return c}),C.d(g,"VTTParser",function(){return a});var M=C("./src/utils/vttcue.ts"),m=function(){function i(){}var s=i.prototype;return s.decode=function(f,l){if(!f)return"";if(typeof f!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(f))},i}();function y(i){function s(f,l,o,r){return(f|0)*3600+(l|0)*60+(o|0)+parseFloat(r||0)}var d=i.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return d?parseFloat(d[2])>59?s(d[2],d[3],0,d[4]):s(d[1],d[2],d[3],d[4]):null}var S=function(){function i(){this.values=Object.create(null)}var s=i.prototype;return s.set=function(f,l){!this.get(f)&&l!==""&&(this.values[f]=l)},s.get=function(f,l,o){return o?this.has(f)?this.values[f]:l[o]:this.has(f)?this.values[f]:l},s.has=function(f){return f in this.values},s.alt=function(f,l,o){for(var r=0;r<o.length;++r)if(l===o[r]){this.set(f,l);break}},s.integer=function(f,l){/^-?\d+$/.test(l)&&this.set(f,parseInt(l,10))},s.percent=function(f,l){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(l)){var o=parseFloat(l);if(o>=0&&o<=100)return this.set(f,o),!0}return!1},i}();function _(i,s,d,f){var l=f?i.split(f):[i];for(var o in l){if(typeof l[o]!="string")continue;var r=l[o].split(d);if(r.length!==2)continue;var x=r[0],v=r[1];s(x,v)}}var t=new M.default(0,0,""),h=t.align==="middle"?"middle":"center";function n(i,s,d){var f=i;function l(){var x=y(i);if(x===null)throw new Error("Malformed timestamp: "+f);return i=i.replace(/^[^\sa-zA-Z-]+/,""),x}function o(x,v){var p=new S;_(x,function(b,E){var w;switch(b){case"region":for(var T=d.length-1;T>=0;T--)if(d[T].id===E){p.set(b,d[T].region);break}break;case"vertical":p.alt(b,E,["rl","lr"]);break;case"line":w=E.split(","),p.integer(b,w[0]),p.percent(b,w[0])&&p.set("snapToLines",!1),p.alt(b,w[0],["auto"]),w.length===2&&p.alt("lineAlign",w[1],["start",h,"end"]);break;case"position":w=E.split(","),p.percent(b,w[0]),w.length===2&&p.alt("positionAlign",w[1],["start",h,"end","line-left","line-right","auto"]);break;case"size":p.percent(b,E);break;case"align":p.alt(b,E,["start",h,"end","left","right"]);break}},/:/,/\s/),v.region=p.get("region",null),v.vertical=p.get("vertical","");var R=p.get("line","auto");R==="auto"&&t.line===-1&&(R=-1),v.line=R,v.lineAlign=p.get("lineAlign","start"),v.snapToLines=p.get("snapToLines",!0),v.size=p.get("size",100),v.align=p.get("align",h);var O=p.get("position","auto");O==="auto"&&t.position===50&&(O=v.align==="start"||v.align==="left"?0:v.align==="end"||v.align==="right"?100:50),v.position=O}function r(){i=i.replace(/^\s+/,"")}if(r(),s.startTime=l(),r(),i.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+f);i=i.substr(3),r(),s.endTime=l(),r(),o(i,s)}function c(i){return i.replace(/<br(?: \/)?>/gi,`
`)}var a=function(){function i(){this.state="INITIAL",this.buffer="",this.decoder=new m,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var s=i.prototype;return s.parse=function(f){var l=this;f&&(l.buffer+=l.decoder.decode(f,{stream:!0}));function o(){var O=l.buffer,b=0;for(O=c(O);b<O.length&&O[b]!=="\r"&&O[b]!==`
`;)++b;var E=O.substr(0,b);return O[b]==="\r"&&++b,O[b]===`
`&&++b,l.buffer=O.substr(b),E}function r(O){_(O,function(b,E){},/:/)}try{var x="";if(l.state==="INITIAL"){if(!/\r\n|\n/.test(l.buffer))return this;x=o();var v=x.match(/^()?WEBVTT([ \t].*)?$/);if(!v||!v[0])throw new Error("Malformed WebVTT signature.");l.state="HEADER"}for(var p=!1;l.buffer;){if(!/\r\n|\n/.test(l.buffer))return this;p?p=!1:x=o();switch(l.state){case"HEADER":/:/.test(x)?r(x):x||(l.state="ID");continue;case"NOTE":x||(l.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(x)){l.state="NOTE";break}if(!x)continue;if(l.cue=new M.default(0,0,""),l.state="CUE",x.indexOf("-->")===-1){l.cue.id=x;continue}case"CUE":if(!l.cue){l.state="BADCUE";continue}try{n(x,l.cue,l.regionList)}catch(O){l.cue=null,l.state="BADCUE";continue}l.state="CUETEXT";continue;case"CUETEXT":{var R=x.indexOf("-->")!==-1;if(!x||R&&(p=!0)){l.oncue&&l.cue&&l.oncue(l.cue),l.cue=null,l.state="ID";continue}if(l.cue===null)continue;l.cue.text&&(l.cue.text+=`
`),l.cue.text+=x}continue;case"BADCUE":x||(l.state="ID")}}}catch(O){l.state==="CUETEXT"&&l.cue&&l.oncue&&l.oncue(l.cue),l.cue=null,l.state=l.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},s.flush=function(){var f=this;try{if((f.cue||f.state==="HEADER")&&(f.buffer+=`
`,f.parse()),f.state==="INITIAL"||f.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(l){f.onparsingerror&&f.onparsingerror(l)}return f.onflush&&f.onflush(),this},i}()},"./src/utils/webvtt-parser.ts":function(k,g,C){"use strict";C.r(g),C.d(g,"generateCueId",function(){return a}),C.d(g,"parseWebVTT",function(){return s});var M=C("./src/polyfills/number.ts"),m=C("./src/utils/vttparser.ts"),y=C("./src/demux/id3.ts"),S=C("./src/utils/timescale-conversion.ts"),_=C("./src/remux/mp4-remuxer.ts"),t=/\r\n|\n\r|\n|\r/g,h=function(f,l,o){return o===void 0&&(o=0),f.substr(o,l.length)===l},n=function(f){var l=parseInt(f.substr(-3)),o=parseInt(f.substr(-6,2)),r=parseInt(f.substr(-9,2)),x=f.length>9?parseInt(f.substr(0,f.indexOf(":"))):0;if(!Object(M.isFiniteNumber)(l)||!Object(M.isFiniteNumber)(o)||!Object(M.isFiniteNumber)(r)||!Object(M.isFiniteNumber)(x))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+f);return l+=1e3*o,l+=60*1e3*r,l+=60*60*1e3*x,l},c=function(f){for(var l=5381,o=f.length;o;)l=l*33^f.charCodeAt(--o);return(l>>>0).toString()};function a(d,f,l){return c(d.toString())+c(f.toString())+c(l)}var i=function(f,l,o){var r=f[l],x=f[r.prevCC];if(!x||!x.new&&r.new){f.ccOffset=f.presentationOffset=r.start,r.new=!1;return}for(;(v=x)!==null&&v!==void 0&&v.new;){var v;f.ccOffset+=r.start-x.start,r.new=!1,r=x,x=f[r.prevCC]}f.presentationOffset=o};function s(d,f,l,o,r,x,v,p){var R=new m.VTTParser,O=Object(y.utf8ArrayToStr)(new Uint8Array(d)).trim().replace(t,`
`).split(`
`),b=[],E=Object(S.toMpegTsClockFromTimescale)(f,l),w="00:00.000",T=0,F=0,N,L=!0,G=!1;R.oncue=function(z){var A=o[r],B=o.ccOffset,U=(T-E)/9e4;if(A!=null&&A.new&&(F!==void 0?B=o.ccOffset=A.start:i(o,r,U)),U&&(B=U-o.presentationOffset),G){var I=z.endTime-z.startTime,K=Object(_.normalizePts)((z.startTime+B-F)*9e4,x*9e4)/9e4;z.startTime=K,z.endTime=K+I}var Z=z.text.trim();z.text=decodeURIComponent(encodeURIComponent(Z)),z.id||(z.id=a(z.startTime,z.endTime,Z)),z.endTime>0&&b.push(z)},R.onparsingerror=function(z){N=z},R.onflush=function(){if(N){p(N);return}v(b)},O.forEach(function(z){if(L)if(h(z,"X-TIMESTAMP-MAP=")){L=!1,G=!0,z.substr(16).split(",").forEach(function(A){h(A,"LOCAL:")?w=A.substr(6):h(A,"MPEGTS:")&&(T=parseInt(A.substr(7)))});try{F=n(w)/1e3}catch(A){G=!1,N=A}return}else z===""&&(L=!1);R.parse(z+`
`)}),R.flush()}},"./src/utils/xhr-loader.ts":function(k,g,C){"use strict";C.r(g);var M=C("./src/utils/logger.ts"),m=C("./src/loader/load-stats.ts"),y=/^age:\s*[\d.]+\s*$/m,S=function(){function _(h){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=h?h.xhrSetup:null,this.stats=new m.LoadStats,this.retryDelay=0}var t=_.prototype;return t.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},t.abortInternal=function(){var n=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),n&&(n.onreadystatechange=null,n.onprogress=null,n.readyState!==4&&(this.stats.aborted=!0,n.abort()))},t.abort=function(){var n;this.abortInternal(),(n=this.callbacks)!==null&&n!==void 0&&n.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},t.load=function(n,c,a){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=n,this.config=c,this.callbacks=a,this.retryDelay=c.retryDelay,this.loadInternal()},t.loadInternal=function(){var n=this.config,c=this.context;if(!n)return;var a=this.loader=new self.XMLHttpRequest,i=this.stats;i.loading.first=0,i.loaded=0;var s=this.xhrSetup;try{if(s)try{s(a,c.url)}catch(l){a.open("GET",c.url,!0),s(a,c.url)}a.readyState||a.open("GET",c.url,!0);var d=this.context.headers;if(d)for(var f in d)a.setRequestHeader(f,d[f])}catch(l){this.callbacks.onError({code:a.status,text:l.message},c,a);return}c.rangeEnd&&a.setRequestHeader("Range","bytes="+c.rangeStart+"-"+(c.rangeEnd-1)),a.onreadystatechange=this.readystatechange.bind(this),a.onprogress=this.loadprogress.bind(this),a.responseType=c.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.timeout),a.send()},t.readystatechange=function(){var n=this.context,c=this.loader,a=this.stats;if(!n||!c)return;var i=c.readyState,s=this.config;if(a.aborted)return;if(i>=2)if(self.clearTimeout(this.requestTimeout),a.loading.first===0&&(a.loading.first=Math.max(self.performance.now(),a.loading.start)),i===4){c.onreadystatechange=null,c.onprogress=null;var d=c.status;if(d>=200&&d<300){a.loading.end=Math.max(self.performance.now(),a.loading.first);var f,l;if(n.responseType==="arraybuffer"?(f=c.response,l=f.byteLength):(f=c.responseText,l=f.length),a.loaded=a.total=l,!this.callbacks)return;var o=this.callbacks.onProgress;if(o&&o(a,n,f,c),!this.callbacks)return;var r={url:c.responseURL,data:f};this.callbacks.onSuccess(r,a,n,c)}else a.retry>=s.maxRetry||d>=400&&d<499?(M.logger.error(d+" while loading "+n.url),this.callbacks.onError({code:d,text:c.statusText},n,c)):(M.logger.warn(d+" while loading "+n.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,s.maxRetryDelay),a.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),s.timeout)},t.loadtimeout=function(){M.logger.warn("timeout while loading "+this.context.url);var n=this.callbacks;n&&(this.abortInternal(),n.onTimeout(this.stats,this.context,this.loader))},t.loadprogress=function(n){var c=this.stats;c.loaded=n.loaded,n.lengthComputable&&(c.total=n.total)},t.getCacheAge=function(){var n=null;if(this.loader&&y.test(this.loader.getAllResponseHeaders())){var c=this.loader.getResponseHeader("age");n=c?parseFloat(c):null}return n},_}();g.default=S}}).default})},vHTk:function(H,J,D){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,D){(function(k,g,C){H.exports=J=g(D("Ib8C"),D("ETIr"),D("cv67"),D("K3mO"),D("OLod"))})(this,function(k){return function(){var g=k,C=g.lib,M=C.StreamCipher,m=g.algo,y=m.RC4=M.extend({_doReset:function(){for(var t=this._key,h=t.words,n=t.sigBytes,c=this._S=[],a=0;a<256;a++)c[a]=a;for(var a=0,i=0;a<256;a++){var s=a%n,d=h[s>>>2]>>>24-s%4*8&255;i=(i+c[a]+d)%256;var f=c[a];c[a]=c[i],c[i]=f}this._i=this._j=0},_doProcessBlock:function(t,h){t[h]^=S.call(this)},keySize:256/32,ivSize:0});function S(){for(var t=this._S,h=this._i,n=this._j,c=0,a=0;a<4;a++){h=(h+1)%256,n=(n+t[h])%256;var i=t[h];t[h]=t[n],t[n]=i,c|=t[(t[h]+t[n])%256]<<24-a*8}return this._i=h,this._j=n,c}g.RC4=M._createHelper(y);var _=m.RC4Drop=y.extend({cfg:y.cfg.extend({drop:192}),_doReset:function(){y._doReset.call(this);for(var t=this.cfg.drop;t>0;t--)S.call(this)}});g.RC4Drop=M._createHelper(_)}(),k.RC4})},wCXF:function(H,J,D){"use strict";D.d(J,"a",function(){return et});var k=D("rePB"),g=D("VTBJ"),C=D("KQm4"),M=D("U8pU"),m=D("ODXe"),y=D("q1tI"),S=D("TSYQ"),_=D.n(S),t=D("Gytx"),h=D.n(t),n=D("Kwbf"),c=D("t23M"),a=D("qx4F"),i=D("6eGT"),s=D("IBYe"),d=D("Ff2n"),f=D("c+Xe"),l=D("fyJ8"),o=D("biw7");function r(Fe,Ie,st,ft,Ze){var tt=st[Fe]||{},Be=st[Ie]||{},Pe,Ne;tt.fixed==="left"?Pe=ft.left[Fe]:Be.fixed==="right"&&(Ne=ft.right[Ie]);var xe=!1,Ae=!1,Le=!1,Me=!1,We=st[Ie+1],nt=st[Fe-1];if(Ze==="rtl"){if(Pe!==void 0){var vt=nt&&nt.fixed==="left";Me=!vt}else if(Ne!==void 0){var bt=We&&We.fixed==="right";Le=!bt}}else if(Pe!==void 0){var Wt=We&&We.fixed==="left";xe=!Wt}else if(Ne!==void 0){var Bt=nt&&nt.fixed==="right";Ae=!Bt}return{fixLeft:Pe,fixRight:Ne,lastFixLeft:xe,firstFixRight:Ae,lastFixRight:Le,firstFixLeft:Me,isSticky:ft.isSticky}}var x=D("sR1s");function v(Fe){var Ie=Fe.cells,st=Fe.stickyOffsets,ft=Fe.flattenColumns,Ze=Fe.rowComponent,tt=Fe.cellComponent,Be=Fe.onHeaderRow,Pe=Fe.index,Ne=y.useContext(o.a),xe=Ne.prefixCls,Ae=Ne.direction,Le;Be&&(Le=Be(Ie.map(function(We){return We.column}),Pe));var Me=Object(x.a)(Ie.map(function(We){return We.column}));return y.createElement(Ze,Object.assign({},Le),Ie.map(function(We,nt){var vt=We.column,bt=r(We.colStart,We.colEnd,ft,st,Ae),Wt;return vt&&vt.onHeaderCell&&(Wt=We.column.onHeaderCell(vt)),y.createElement(l.a,Object.assign({},We,{ellipsis:vt.ellipsis,align:vt.align,component:tt,prefixCls:xe,key:Me[nt]},bt,{additionalProps:Wt,rowType:"header"}))}))}v.displayName="HeaderRow";var p=v;function R(Fe){var Ie=[];function st(Be,Pe){var Ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ie[Ne]=Ie[Ne]||[];var xe=Pe,Ae=Be.filter(Boolean).map(function(Le){var Me={key:Le.key,className:Le.className||"",children:Le.title,column:Le,colStart:xe},We=1,nt=Le.children;return nt&&nt.length>0&&(We=st(nt,xe,Ne+1).reduce(function(vt,bt){return vt+bt},0),Me.hasSubColumns=!0),"colSpan"in Le&&(We=Le.colSpan),"rowSpan"in Le&&(Me.rowSpan=Le.rowSpan),Me.colSpan=We,Me.colEnd=Me.colStart+We-1,Ie[Ne].push(Me),xe+=We,We});return Ae}st(Fe,0);for(var ft=Ie.length,Ze=function(Pe){Ie[Pe].forEach(function(Ne){!("rowSpan"in Ne)&&!Ne.hasSubColumns&&(Ne.rowSpan=ft-Pe)})},tt=0;tt<ft;tt+=1)Ze(tt);return Ie}function O(Fe){var Ie=Fe.stickyOffsets,st=Fe.columns,ft=Fe.flattenColumns,Ze=Fe.onHeaderRow,tt=y.useContext(o.a),Be=tt.prefixCls,Pe=tt.getComponent,Ne=y.useMemo(function(){return R(st)},[st]),xe=Pe(["header","wrapper"],"thead"),Ae=Pe(["header","row"],"tr"),Le=Pe(["header","cell"],"th");return y.createElement(xe,{className:"".concat(Be,"-thead")},Ne.map(function(Me,We){var nt=y.createElement(p,{key:We,flattenColumns:ft,cells:Me,stickyOffsets:Ie,rowComponent:Ae,cellComponent:Le,onHeaderRow:Ze,index:We});return nt}))}var b=O,E=D("hW8S");function w(Fe){for(var Ie=Fe.colWidths,st=Fe.columns,ft=Fe.columCount,Ze=[],tt=ft||st.length,Be=!1,Pe=tt-1;Pe>=0;Pe-=1){var Ne=Ie[Pe],xe=st&&st[Pe],Ae=xe&&xe[E.a];(Ne||Ae||Be)&&(Ze.unshift(y.createElement("col",Object.assign({key:Pe,style:{width:Ne,minWidth:Ne}},Ae))),Be=!0)}return y.createElement("colgroup",null,Ze)}var T=w;function F(Fe,Ie){return Object(y.useMemo)(function(){for(var st=[],ft=0;ft<Ie;ft+=1){var Ze=Fe[ft];if(Ze!==void 0)st[ft]=Ze;else return null}return st},[Fe.join("_"),Ie])}var N=y.forwardRef(function(Fe,Ie){var st=Fe.noData,ft=Fe.columns,Ze=Fe.flattenColumns,tt=Fe.colWidths,Be=Fe.columCount,Pe=Fe.stickyOffsets,Ne=Fe.direction,xe=Fe.fixHeader,Ae=Fe.offsetHeader,Le=Fe.stickyClassName,Me=Fe.onScroll,We=Object(d.a)(Fe,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),nt=y.useContext(o.a),vt=nt.prefixCls,bt=nt.scrollbarSize,Wt=nt.isSticky,Bt=Wt&&!xe?0:bt,lr=y.useRef(null),dr=y.useCallback(function(fn){Object(f.b)(Ie,fn),Object(f.b)(lr,fn)},[]);y.useEffect(function(){var fn;function cn(Vt){var En=Vt.currentTarget,fr=Vt.deltaX;fr&&(Me({currentTarget:En,scrollLeft:En.scrollLeft+fr}),Vt.preventDefault())}return(fn=lr.current)===null||fn===void 0||fn.addEventListener("wheel",cn),function(){var Vt;(Vt=lr.current)===null||Vt===void 0||Vt.removeEventListener("wheel",cn)}},[]);var Ot=Ze[Ze.length-1],Vr={fixed:Ot?Ot.fixed:null,onHeaderCell:function(){return{className:"".concat(vt,"-cell-scrollbar")}}},Wr=Object(y.useMemo)(function(){return Bt?[].concat(Object(C.a)(ft),[Vr]):ft},[Bt,ft]),Yr=Object(y.useMemo)(function(){return Bt?[].concat(Object(C.a)(Ze),[Vr]):Ze},[Bt,Ze]),bn=Object(y.useMemo)(function(){var fn=Pe.right,cn=Pe.left;return Object(g.a)(Object(g.a)({},Pe),{},{left:Ne==="rtl"?[].concat(Object(C.a)(cn.map(function(Vt){return Vt+Bt})),[0]):cn,right:Ne==="rtl"?fn:[].concat(Object(C.a)(fn.map(function(Vt){return Vt+Bt})),[0]),isSticky:Wt})},[Bt,Pe,Wt]),Ar=F(tt,Be);return y.createElement("div",{style:Object(g.a)({overflow:"hidden"},Wt?{top:Ae}:{}),ref:dr,className:_()("".concat(vt,"-header"),Object(k.a)({},Le,!!Le))},y.createElement("table",{style:{tableLayout:"fixed",visibility:st||Ar?null:"hidden"}},y.createElement(T,{colWidths:Ar?[].concat(Object(C.a)(Ar),[Bt]):[],columCount:Be+1,columns:Yr}),y.createElement(b,Object.assign({},We,{stickyOffsets:bn,columns:Wr,flattenColumns:Yr}))))});N.displayName="FixedHeader";var L=N,G=y.createContext(null),z=G;function A(Fe){var Ie=Fe.prefixCls,st=Fe.children,ft=Fe.component,Ze=Fe.cellComponent,tt=Fe.fixHeader,Be=Fe.fixColumn,Pe=Fe.horizonScroll,Ne=Fe.className,xe=Fe.expanded,Ae=Fe.componentWidth,Le=Fe.colSpan,Me=y.useContext(o.a),We=Me.scrollbarSize;return y.useMemo(function(){var nt=st;return Be&&(nt=y.createElement("div",{style:{width:Ae-(tt?We:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Ie,"-expanded-row-fixed")},nt)),y.createElement(ft,{className:Ne,style:{display:xe?null:"none"}},y.createElement(l.a,{component:Ze,prefixCls:Ie,colSpan:Le},nt))},[st,ft,tt,Pe,Ne,xe,Ae,Le,We])}var B=A;function U(Fe){var Ie=Fe.className,st=Fe.style,ft=Fe.record,Ze=Fe.index,tt=Fe.rowKey,Be=Fe.getRowKey,Pe=Fe.rowExpandable,Ne=Fe.expandedKeys,xe=Fe.onRow,Ae=Fe.indent,Le=Ae===void 0?0:Ae,Me=Fe.rowComponent,We=Fe.cellComponent,nt=Fe.childrenColumnName,vt=y.useContext(o.a),bt=vt.prefixCls,Wt=vt.fixedInfoList,Bt=y.useContext(z),lr=Bt.fixHeader,dr=Bt.fixColumn,Ot=Bt.horizonScroll,Vr=Bt.componentWidth,Wr=Bt.flattenColumns,Yr=Bt.expandableType,bn=Bt.expandRowByClick,Ar=Bt.onTriggerExpand,fn=Bt.rowClassName,cn=Bt.expandedRowClassName,Vt=Bt.indentSize,En=Bt.expandIcon,fr=Bt.expandedRowRender,br=Bt.expandIconColumnIndex,Br=y.useState(!1),Pn=Object(m.a)(Br,2),Kn=Pn[0],dn=Pn[1],sr=Ne&&Ne.has(Fe.recordKey);y.useEffect(function(){sr&&dn(!0)},[sr]);var Jn=Yr==="row"&&(!Pe||Pe(ft)),Tn=Yr==="nest",On=nt&&ft&&ft[nt],Jr=Jn||Tn,An;xe&&(An=xe(ft,Ze));var Zn=function(V){if(bn&&Jr&&Ar(ft,V),An&&An.onClick){for(var $,te=arguments.length,ye=new Array(te>1?te-1:0),oe=1;oe<te;oe++)ye[oe-1]=arguments[oe];($=An).onClick.apply($,[V].concat(ye))}},ri;typeof fn=="string"?ri=fn:typeof fn=="function"&&(ri=fn(ft,Ze,Le));var Nt=Object(x.a)(Wr),_r=y.createElement(Me,Object.assign({},An,{"data-row-key":tt,className:_()(Ie,"".concat(bt,"-row"),"".concat(bt,"-row-level-").concat(Le),ri,An&&An.className),style:Object(g.a)(Object(g.a)({},st),An?An.style:null),onClick:Zn}),Wr.map(function(le,V){var $=le.render,te=le.dataIndex,ye=le.className,oe=Nt[V],Ve=Wt[V],Tt;V===(br||0)&&Tn&&(Tt=y.createElement(y.Fragment,null,y.createElement("span",{style:{paddingLeft:"".concat(Vt*Le,"px")},className:"".concat(bt,"-row-indent indent-level-").concat(Le)}),En({prefixCls:bt,expanded:sr,expandable:On,record:ft,onExpand:Ar})));var Xt;return le.onCell&&(Xt=le.onCell(ft,Ze)),y.createElement(l.a,Object.assign({className:ye,ellipsis:le.ellipsis,align:le.align,component:We,prefixCls:bt,key:oe,record:ft,index:Ze,dataIndex:te,render:$,shouldCellUpdate:le.shouldCellUpdate},Ve,{appendNode:Tt,additionalProps:Xt}))})),mi;if(Jn&&(Kn||sr)){var xi=fr(ft,Ze,Le+1,sr),Di=cn&&cn(ft,Ze,Le);mi=y.createElement(B,{expanded:sr,className:_()("".concat(bt,"-expanded-row"),"".concat(bt,"-expanded-row-level-").concat(Le+1),Di),prefixCls:bt,fixHeader:lr,fixColumn:dr,horizonScroll:Ot,component:Me,componentWidth:Vr,cellComponent:We,colSpan:Wr.length},xi)}var wi;return On&&sr&&(wi=(ft[nt]||[]).map(function(le,V){var $=Be(le,V);return y.createElement(U,Object.assign({},Fe,{key:$,rowKey:$,record:le,recordKey:$,index:V,indent:Le+1}))})),y.createElement(y.Fragment,null,_r,mi,wi)}U.displayName="BodyRow";var I=U,K=y.createContext(null),Z=K;function ue(Fe){var Ie=Fe.columnKey,st=Fe.onColumnResize,ft=y.useRef();return y.useEffect(function(){ft.current&&st(Ie,ft.current.offsetWidth)},[]),y.createElement(c.a,{onResize:function(tt){var Be=tt.offsetWidth;st(Ie,Be)}},y.createElement("td",{ref:ft,style:{padding:0,border:0,height:0}},y.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function de(Fe){var Ie=Fe.data,st=Fe.getRowKey,ft=Fe.measureColumnWidth,Ze=Fe.expandedKeys,tt=Fe.onRow,Be=Fe.rowExpandable,Pe=Fe.emptyNode,Ne=Fe.childrenColumnName,xe=y.useContext(Z),Ae=xe.onColumnResize,Le=y.useContext(o.a),Me=Le.prefixCls,We=Le.getComponent,nt=y.useContext(z),vt=nt.fixHeader,bt=nt.horizonScroll,Wt=nt.flattenColumns,Bt=nt.componentWidth;return y.useMemo(function(){var lr=We(["body","wrapper"],"tbody"),dr=We(["body","row"],"tr"),Ot=We(["body","cell"],"td"),Vr;Ie.length?Vr=Ie.map(function(Yr,bn){var Ar=st(Yr,bn);return y.createElement(I,{key:Ar,rowKey:Ar,record:Yr,recordKey:Ar,index:bn,rowComponent:dr,cellComponent:Ot,expandedKeys:Ze,onRow:tt,getRowKey:st,rowExpandable:Be,childrenColumnName:Ne})}):Vr=y.createElement(B,{expanded:!0,className:"".concat(Me,"-placeholder"),prefixCls:Me,fixHeader:vt,fixColumn:bt,horizonScroll:bt,component:dr,componentWidth:Bt,cellComponent:Ot,colSpan:Wt.length},Pe);var Wr=Object(x.a)(Wt);return y.createElement(lr,{className:"".concat(Me,"-tbody")},ft&&y.createElement("tr",{"aria-hidden":"true",className:"".concat(Me,"-measure-row"),style:{height:0}},Wr.map(function(Yr){return y.createElement(ue,{key:Yr,columnKey:Yr,onColumnResize:Ae})})),Vr)},[Ie,Me,tt,ft,Ze,st,We,Bt,Pe,Wt])}var Ce=y.memo(de);Ce.displayName="Body";var Re=Ce,me=D("wRmb"),Oe=D("xEkU"),be=D.n(Oe);function ce(Fe){var Ie=Object(y.useRef)(Fe),st=Object(y.useState)({}),ft=Object(m.a)(st,2),Ze=ft[1],tt=Object(y.useRef)(null),Be=Object(y.useRef)([]);function Pe(Ne){tt.current===null&&(Be.current=[],tt.current=be()(function(){Be.current.forEach(function(xe){Ie.current=xe(Ie.current)}),tt.current=null,Ze({})})),Be.current.push(Ne)}return Object(y.useEffect)(function(){return function(){be.a.cancel(tt.current)}},[]),[Ie.current,Pe]}function se(Fe){var Ie=Object(y.useRef)(Fe),st=Object(y.useRef)(null);function ft(){window.clearTimeout(st.current)}function Ze(Be){Ie.current=Be,ft(),st.current=window.setTimeout(function(){Ie.current=null,st.current=null},100)}function tt(){return Ie.current}return Object(y.useEffect)(function(){return ft},[]),[Ze,tt]}function ne(Fe,Ie,st){var ft=Object(y.useMemo)(function(){for(var Ze=[],tt=[],Be=0,Pe=0,Ne=0;Ne<Ie;Ne+=1)if(st==="rtl"){tt[Ne]=Pe,Pe+=Fe[Ne]||0;var xe=Ie-Ne-1;Ze[xe]=Be,Be+=Fe[xe]||0}else{Ze[Ne]=Be,Be+=Fe[Ne]||0;var Ae=Ie-Ne-1;tt[Ae]=Pe,Pe+=Fe[Ae]||0}return{left:Ze,right:tt}},[Fe,Ie,st]);return ft}var ge=ne;function ee(Fe){var Ie=Fe.className,st=Fe.children;return y.createElement("div",{className:Ie},st)}var re=ee,Te=D("n6Qo");function ie(Fe){var Ie,st=Fe.prefixCls,ft=Fe.record,Ze=Fe.onExpand,tt=Fe.expanded,Be=Fe.expandable,Pe="".concat(st,"-row-expand-icon");if(!Be)return y.createElement("span",{className:_()(Pe,"".concat(st,"-row-spaced"))});var Ne=function(Ae){Ze(ft,Ae),Ae.stopPropagation()};return y.createElement("span",{className:_()(Pe,(Ie={},Object(k.a)(Ie,"".concat(st,"-row-expanded"),tt),Object(k.a)(Ie,"".concat(st,"-row-collapsed"),!tt),Ie)),onClick:Ne})}function q(Fe,Ie,st){var ft=[];function Ze(tt){(tt||[]).forEach(function(Be,Pe){ft.push(Ie(Be,Pe)),Ze(Be[st])})}return Ze(Fe),ft}var Y=D("zT1h"),X=D("y0+3"),he=function(Ie,st){var ft,Ze,tt=Ie.scrollBodyRef,Be=Ie.onScroll,Pe=Ie.offsetScroll,Ne=y.useContext(o.a),xe=Ne.prefixCls,Ae=((ft=tt.current)===null||ft===void 0?void 0:ft.scrollWidth)||0,Le=((Ze=tt.current)===null||Ze===void 0?void 0:Ze.clientWidth)||0,Me=Ae&&Le*(Le/Ae),We=y.useRef(),nt=ce({scrollLeft:0,isHiddenScrollBar:!1}),vt=Object(m.a)(nt,2),bt=vt[0],Wt=vt[1],Bt=y.useRef({delta:0,x:0}),lr=y.useState(!1),dr=Object(m.a)(lr,2),Ot=dr[0],Vr=dr[1],Wr=function(){Vr(!1)},Yr=function(Vt){Vt.persist(),Bt.current.delta=Vt.pageX-bt.scrollLeft,Bt.current.x=0,Vr(!0),Vt.preventDefault()},bn=function(Vt){var En,fr=Vt||((En=window)===null||En===void 0?void 0:En.event),br=fr.buttons;if(!Ot||br===0){Ot&&Vr(!1);return}var Br=Bt.current.x+Vt.pageX-Bt.current.x-Bt.current.delta;Br<=0&&(Br=0),Br+Me>=Le&&(Br=Le-Me),Be({scrollLeft:Br/Le*(Ae+2)}),Bt.current.x=Vt.pageX},Ar=function(){var Vt=Object(X.b)(tt.current).top,En=Vt+tt.current.offsetHeight,fr=document.documentElement.scrollTop+window.innerHeight;En-Object(a.a)()<=fr||Vt>=fr-Pe?Wt(function(br){return Object(g.a)(Object(g.a)({},br),{},{isHiddenScrollBar:!0})}):Wt(function(br){return Object(g.a)(Object(g.a)({},br),{},{isHiddenScrollBar:!1})})},fn=function(Vt){Wt(function(En){return Object(g.a)(Object(g.a)({},En),{},{scrollLeft:Vt/Ae*Le||0})})};return y.useImperativeHandle(st,function(){return{setScrollLeft:fn}}),y.useEffect(function(){var cn=Object(Y.a)(document.body,"mouseup",Wr,!1),Vt=Object(Y.a)(document.body,"mousemove",bn,!1);return Ar(),function(){cn.remove(),Vt.remove()}},[Me,Ot]),y.useEffect(function(){var cn=Object(Y.a)(window,"scroll",Ar,!1),Vt=Object(Y.a)(window,"resize",Ar,!1);return function(){cn.remove(),Vt.remove()}},[]),y.useEffect(function(){bt.isHiddenScrollBar||Wt(function(cn){var Vt,En;return Object(g.a)(Object(g.a)({},cn),{},{scrollLeft:tt.current.scrollLeft/((Vt=tt.current)===null||Vt===void 0?void 0:Vt.scrollWidth)*((En=tt.current)===null||En===void 0?void 0:En.clientWidth)})})},[bt.isHiddenScrollBar]),Ae<=Le||!Me||bt.isHiddenScrollBar?null:y.createElement("div",{style:{height:Object(a.a)(),width:Le,bottom:Pe},className:"".concat(xe,"-sticky-scroll")},y.createElement("div",{onMouseDown:Yr,ref:We,className:_()("".concat(xe,"-sticky-scroll-bar"),Object(k.a)({},"".concat(xe,"-sticky-scroll-bar-active"),Ot)),style:{width:"".concat(Me,"px"),transform:"translate3d(".concat(bt.scrollLeft,"px, 0, 0)")}}))},fe=y.forwardRef(he);function Ee(Fe,Ie){return y.useMemo(function(){var st=!!Fe;return{isSticky:st,stickyClassName:st?"".concat(Ie,"-sticky-header"):"",offsetHeader:Object(M.a)(Fe)==="object"&&Fe.offsetHeader||0,offsetScroll:Object(M.a)(Fe)==="object"&&Fe.offsetScroll||0}},[Fe,Ie])}var He=[],Qe={},et="rc-table-internal-hook",it=y.memo(function(Fe){var Ie=Fe.children;return Ie},function(Fe,Ie){return h()(Fe.props,Ie.props)?Fe.pingLeft!==Ie.pingLeft||Fe.pingRight!==Ie.pingRight:!1});function ut(Fe){var Ie,st=Fe.prefixCls,ft=Fe.className,Ze=Fe.rowClassName,tt=Fe.style,Be=Fe.data,Pe=Fe.rowKey,Ne=Fe.scroll,xe=Fe.tableLayout,Ae=Fe.direction,Le=Fe.title,Me=Fe.footer,We=Fe.summary,nt=Fe.id,vt=Fe.showHeader,bt=Fe.components,Wt=Fe.emptyText,Bt=Fe.onRow,lr=Fe.onHeaderRow,dr=Fe.internalHooks,Ot=Fe.transformColumns,Vr=Fe.internalRefs,Wr=Fe.sticky,Yr=Be||He,bn=!!Yr.length,Ar=y.useState(0),fn=Object(m.a)(Ar,2),cn=fn[0],Vt=fn[1];y.useEffect(function(){Vt(Object(a.a)())});var En=y.useMemo(function(){return Object(x.c)(bt,{})},[bt]),fr=y.useCallback(function(Mr,Ft){return Object(x.b)(En,Mr)||Ft},[En]),br=y.useMemo(function(){return typeof Pe=="function"?Pe:function(Mr){var Ft=Mr&&Mr[Pe];return Ft}},[Pe]),Br=Object(E.c)(Fe),Pn=Br.expandIcon,Kn=Br.expandedRowKeys,dn=Br.defaultExpandedRowKeys,sr=Br.defaultExpandAllRows,Jn=Br.expandedRowRender,Tn=Br.onExpand,On=Br.onExpandedRowsChange,Jr=Br.expandRowByClick,An=Br.rowExpandable,Zn=Br.expandIconColumnIndex,ri=Br.expandedRowClassName,Nt=Br.childrenColumnName,_r=Br.indentSize,mi=Pn||ie,xi=Nt||"children",Di=y.useMemo(function(){return Jn?"row":Fe.expandable&&dr===et&&Fe.expandable.__PARENT_RENDER_ICON__||Yr.some(function(Mr){return Mr&&Object(M.a)(Mr)==="object"&&Mr[xi]})?"nest":!1},[!!Jn,Yr]),wi=y.useState(function(){return dn||(sr?q(Yr,br,xi):[])}),le=Object(m.a)(wi,2),V=le[0],$=le[1],te=y.useMemo(function(){return new Set(Kn||V||[])},[Kn,V]),ye=y.useCallback(function(Mr){var Ft=br(Mr,Yr.indexOf(Mr)),Qt,gr=te.has(Ft);gr?(te.delete(Ft),Qt=Object(C.a)(te)):Qt=[].concat(Object(C.a)(te),[Ft]),$(Qt),Tn&&Tn(!gr,Mr),On&&On(Qt)},[br,te,Yr,Tn,On]),oe=y.useState(0),Ve=Object(m.a)(oe,2),Tt=Ve[0],Xt=Ve[1],Er=Object(me.b)(Object(g.a)(Object(g.a)(Object(g.a)({},Fe),Br),{},{expandable:!!Jn,expandedKeys:te,getRowKey:br,onTriggerExpand:ye,expandIcon:mi,expandIconColumnIndex:Zn,direction:Ae}),dr===et?Ot:null),Pt=Object(m.a)(Er,2),kr=Pt[0],Gr=Pt[1],yn=y.useMemo(function(){return{columns:kr,flattenColumns:Gr}},[kr,Gr]),ni=y.useRef(),ii=y.useRef(),Bn=y.useRef(),Ni=y.useState(!1),Ki=Object(m.a)(Ni,2),Gn=Ki[0],Ti=Ki[1],Gi=y.useState(!1),Li=Object(m.a)(Gi,2),li=Li[0],ea=Li[1],Vi=ce(new Map),ta=Object(m.a)(Vi,2),oa=ta[0],Pi=ta[1],qn=Object(x.a)(Gr),ji=qn.map(function(Mr){return oa.get(Mr)}),ha=y.useMemo(function(){return ji},[ji.join("_")]),xt=ge(ha,Gr.length,Ae),rt=Ne&&Object(x.d)(Ne.y),mt=Ne&&Object(x.d)(Ne.x),wt=mt&&Gr.some(function(Mr){var Ft=Mr.fixed;return Ft}),Lt=y.useRef(),It=Ee(Wr,st),Kt=It.isSticky,Ht=It.offsetHeader,ht=It.offsetScroll,St=It.stickyClassName,At,ur,ar;rt&&(ur={overflowY:"scroll",maxHeight:Ne.y}),mt&&(At={overflowX:"auto"},rt||(ur={overflowY:"hidden"}),ar={width:Ne.x===!0?"auto":Ne.x,minWidth:"100%"});var Zt=y.useCallback(function(Mr,Ft){Pi(function(Qt){var gr=new Map(Qt);return gr.set(Mr,Ft),gr})},[]),$t=se(null),rr=Object(m.a)($t,2),cr=rr[0],lt=rr[1];function Rr(Mr,Ft){if(!Ft)return;typeof Ft=="function"?Ft(Mr):Ft.scrollLeft!==Mr&&(Ft.scrollLeft=Mr)}var jr=function(Ft){var Qt=Ft.currentTarget,gr=Ft.scrollLeft,tr=typeof gr=="number"?gr:Qt.scrollLeft,gt=Qt||Qe;if(!lt()||lt()===gt){var yt;cr(gt),Rr(tr,ii.current),Rr(tr,Bn.current),Rr(tr,(yt=Lt.current)===null||yt===void 0?void 0:yt.setScrollLeft)}if(Qt){var Gt=Qt.scrollWidth,kt=Qt.clientWidth;Ti(tr>0),ea(tr<Gt-kt)}},xr=function(){Bn.current&&jr({currentTarget:Bn.current})},_t=function(Ft){var Qt=Ft.width;xr(),Xt(ni.current?ni.current.offsetWidth:Qt)};y.useEffect(function(){return xr},[]),y.useEffect(function(){mt&&xr()},[mt]),y.useEffect(function(){dr===et&&Vr&&(Vr.body.current=Bn.current)});var Rt=fr(["table"],"table"),Et=y.useMemo(function(){return xe||(wt?Ne.x==="max-content"?"auto":"fixed":rt||Gr.some(function(Mr){var Ft=Mr.ellipsis;return Ft})?"fixed":"auto")},[rt,wt,Gr,xe]),Mt,qt={colWidths:ha,columCount:Gr.length,stickyOffsets:xt,onHeaderRow:lr,fixHeader:rt},pr=y.useMemo(function(){return bn?null:typeof Wt=="function"?Wt():Wt},[bn,Wt]),er=y.createElement(Re,{data:Yr,measureColumnWidth:rt||mt||Kt,expandedKeys:te,rowExpandable:An,getRowKey:br,onRow:Bt,emptyNode:pr,childrenColumnName:xi}),Ir=y.createElement(T,{colWidths:Gr.map(function(Mr){var Ft=Mr.width;return Ft}),columns:Gr}),Hr=We&&y.createElement(Te.b,null,We(Yr)),yr=fr(["body"]);if(rt||Kt){var ot;typeof yr=="function"?(ot=yr(Yr,{scrollbarSize:cn,ref:Bn,onScroll:jr}),qt.colWidths=Gr.map(function(Mr,Ft){var Qt=Mr.width,gr=Ft===kr.length-1?Qt-cn:Qt;return typeof gr=="number"&&!Number.isNaN(gr)?gr:(Object(n.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):ot=y.createElement("div",{style:Object(g.a)(Object(g.a)({},At),ur),onScroll:jr,ref:Bn,className:_()("".concat(st,"-body"))},y.createElement(Rt,{style:Object(g.a)(Object(g.a)({},ar),{},{tableLayout:Et})},Ir,er,Hr),Kt&&y.createElement(fe,{ref:Lt,offsetScroll:ht,scrollBodyRef:Bn,onScroll:jr})),Mt=y.createElement(y.Fragment,null,vt!==!1&&y.createElement(L,Object.assign({noData:!Yr.length},qt,yn,{direction:Ae,offsetHeader:Ht,stickyClassName:St,ref:ii,onScroll:jr})),ot)}else Mt=y.createElement("div",{style:Object(g.a)(Object(g.a)({},At),ur),className:_()("".concat(st,"-content")),onScroll:jr,ref:Bn},y.createElement(Rt,{style:Object(g.a)(Object(g.a)({},ar),{},{tableLayout:Et})},Ir,vt!==!1&&y.createElement(b,Object.assign({},qt,yn)),er,Hr));var zt=Object(E.b)(Fe),sn=y.createElement("div",Object.assign({className:_()(st,ft,(Ie={},Object(k.a)(Ie,"".concat(st,"-rtl"),Ae==="rtl"),Object(k.a)(Ie,"".concat(st,"-ping-left"),Gn),Object(k.a)(Ie,"".concat(st,"-ping-right"),li),Object(k.a)(Ie,"".concat(st,"-layout-fixed"),xe==="fixed"),Object(k.a)(Ie,"".concat(st,"-fixed-header"),rt),Object(k.a)(Ie,"".concat(st,"-fixed-column"),wt),Object(k.a)(Ie,"".concat(st,"-scroll-horizontal"),mt),Object(k.a)(Ie,"".concat(st,"-has-fix-left"),Gr[0]&&Gr[0].fixed),Object(k.a)(Ie,"".concat(st,"-has-fix-right"),Gr[Gr.length-1]&&Gr[Gr.length-1].fixed==="right"),Ie)),style:tt,id:nt,ref:ni},zt),y.createElement(it,{pingLeft:Gn,pingRight:li,props:Object(g.a)(Object(g.a)({},Fe),{},{stickyOffsets:xt,mergedExpandedKeys:te})},Le&&y.createElement(re,{className:"".concat(st,"-title")},Le(Yr)),y.createElement("div",{className:"".concat(st,"-container")},Mt),Me&&y.createElement(re,{className:"".concat(st,"-footer")},Me(Yr))));mt&&(sn=y.createElement(c.a,{onResize:_t},sn));var en=y.useMemo(function(){return{prefixCls:st,getComponent:fr,scrollbarSize:cn,direction:Ae,fixedInfoList:Gr.map(function(Mr,Ft){return r(Ft,Ft,Gr,xt,Ae)}),isSticky:Kt}},[st,fr,cn,Ae,Gr,xt,Ae,Kt]),mr=y.useMemo(function(){return Object(g.a)(Object(g.a)({},yn),{},{tableLayout:Et,rowClassName:Ze,expandedRowClassName:ri,componentWidth:Tt,fixHeader:rt,fixColumn:wt,horizonScroll:mt,expandIcon:mi,expandableType:Di,expandRowByClick:Jr,expandedRowRender:Jn,onTriggerExpand:ye,expandIconColumnIndex:Zn,indentSize:_r})},[yn,Et,Ze,ri,Tt,rt,wt,mt,mi,Di,Jr,Jn,ye,Zn,_r]),Dr=y.useMemo(function(){return{onColumnResize:Zt}},[Zt]);return y.createElement(o.a.Provider,{value:en},y.createElement(z.Provider,{value:mr},y.createElement(Z.Provider,{value:Dr},sn)))}ut.Column=s.a,ut.ColumnGroup=i.a,ut.Summary=Te.a,ut.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var dt=J.b=ut},wRmb:function(H,J,D){"use strict";D.d(J,"a",function(){return h});var k=D("rePB"),g=D("KQm4"),C=D("VTBJ"),M=D("Ff2n"),m=D("q1tI"),y=D.n(m),S=D("Kwbf"),_=D("Zm9Q"),t=D("hW8S");function h(s){return Object(_.a)(s).filter(function(d){return m.isValidElement(d)}).map(function(d){var f=d.key,l=d.props,o=l.children,r=Object(M.a)(l,["children"]),x=Object(C.a)({key:f},r);return o&&(x.children=h(o)),x})}function n(s){return s.reduce(function(d,f){var l=f.fixed,o=l===!0?"left":l,r=f.children;return r&&r.length>0?[].concat(Object(g.a)(d),Object(g.a)(n(r).map(function(x){return Object(C.a)({fixed:o},x)}))):[].concat(Object(g.a)(d),[Object(C.a)(Object(C.a)({},f),{},{fixed:o})])},[])}function c(s){for(var d=!0,f=0;f<s.length;f+=1){var l=s[f];if(d&&l.fixed!=="left")d=!1;else if(!d&&l.fixed==="left"){Object(S.a)(!1,"Index ".concat(f-1," of `columns` missing `fixed='left'` prop."));break}}for(var o=!0,r=s.length-1;r>=0;r-=1){var x=s[r];if(o&&x.fixed!=="right")o=!1;else if(!o&&x.fixed==="right"){Object(S.a)(!1,"Index ".concat(r+1," of `columns` missing `fixed='right'` prop."));break}}}function a(s){return s.map(function(d){var f=d.fixed,l=Object(M.a)(d,["fixed"]),o=f;return f==="left"?o="right":f==="right"&&(o="left"),Object(C.a)({fixed:o},l)})}function i(s,d){var f=s.prefixCls,l=s.columns,o=s.children,r=s.expandable,x=s.expandedKeys,v=s.getRowKey,p=s.onTriggerExpand,R=s.expandIcon,O=s.rowExpandable,b=s.expandIconColumnIndex,E=s.direction,w=s.expandRowByClick,T=m.useMemo(function(){return l||h(o)},[l,o]),F=m.useMemo(function(){if(r){var G,z=b||0,A=T[z],B=(G={},Object(k.a)(G,t.a,{className:"".concat(f,"-expand-icon-col")}),Object(k.a)(G,"title",""),Object(k.a)(G,"fixed",A?A.fixed:null),Object(k.a)(G,"className","".concat(f,"-row-expand-icon-cell")),Object(k.a)(G,"render",function(K,Z,ue){var de=v(Z,ue),Ce=x.has(de),Re=O?O(Z):!0,me=R({prefixCls:f,expanded:Ce,expandable:Re,record:Z,onExpand:p});return w?m.createElement("span",{onClick:function(be){return be.stopPropagation()}},me):me}),G),U=T.slice();return z>=0&&U.splice(z,0,B),U}return T},[r,T,v,x,R,E]),N=m.useMemo(function(){var G=F;return d&&(G=d(G)),G.length||(G=[{render:function(){return null}}]),G},[d,F,E]),L=m.useMemo(function(){return E==="rtl"?a(n(N)):n(N)},[N,E]);return[N,L]}J.b=i},wZgz:function(H,J,D){(function(k,g,C){H.exports=J=g(D("Ib8C"),D("ETIr"),D("cv67"),D("K3mO"),D("OLod"))})(this,function(k){return function(){var g=k,C=g.lib,M=C.BlockCipher,m=g.algo,y=[],S=[],_=[],t=[],h=[],n=[],c=[],a=[],i=[],s=[];(function(){for(var l=[],o=0;o<256;o++)o<128?l[o]=o<<1:l[o]=o<<1^283;for(var r=0,x=0,o=0;o<256;o++){var v=x^x<<1^x<<2^x<<3^x<<4;v=v>>>8^v&255^99,y[r]=v,S[v]=r;var p=l[r],R=l[p],O=l[R],b=l[v]*257^v*16843008;_[r]=b<<24|b>>>8,t[r]=b<<16|b>>>16,h[r]=b<<8|b>>>24,n[r]=b;var b=O*16843009^R*65537^p*257^r*16843008;c[v]=b<<24|b>>>8,a[v]=b<<16|b>>>16,i[v]=b<<8|b>>>24,s[v]=b,r?(r=p^l[l[l[O^p]]],x^=l[l[x]]):r=x=1}})();var d=[0,1,2,4,8,16,32,64,128,27,54],f=m.AES=M.extend({_doReset:function(){var l;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var o=this._keyPriorReset=this._key,r=o.words,x=o.sigBytes/4,v=this._nRounds=x+6,p=(v+1)*4,R=this._keySchedule=[],O=0;O<p;O++)O<x?R[O]=r[O]:(l=R[O-1],O%x?x>6&&O%x==4&&(l=y[l>>>24]<<24|y[l>>>16&255]<<16|y[l>>>8&255]<<8|y[l&255]):(l=l<<8|l>>>24,l=y[l>>>24]<<24|y[l>>>16&255]<<16|y[l>>>8&255]<<8|y[l&255],l^=d[O/x|0]<<24),R[O]=R[O-x]^l);for(var b=this._invKeySchedule=[],E=0;E<p;E++){var O=p-E;if(E%4)var l=R[O];else var l=R[O-4];E<4||O<=4?b[E]=l:b[E]=c[y[l>>>24]]^a[y[l>>>16&255]]^i[y[l>>>8&255]]^s[y[l&255]]}},encryptBlock:function(l,o){this._doCryptBlock(l,o,this._keySchedule,_,t,h,n,y)},decryptBlock:function(l,o){var r=l[o+1];l[o+1]=l[o+3],l[o+3]=r,this._doCryptBlock(l,o,this._invKeySchedule,c,a,i,s,S);var r=l[o+1];l[o+1]=l[o+3],l[o+3]=r},_doCryptBlock:function(l,o,r,x,v,p,R,O){for(var b=this._nRounds,E=l[o]^r[0],w=l[o+1]^r[1],T=l[o+2]^r[2],F=l[o+3]^r[3],N=4,L=1;L<b;L++){var G=x[E>>>24]^v[w>>>16&255]^p[T>>>8&255]^R[F&255]^r[N++],z=x[w>>>24]^v[T>>>16&255]^p[F>>>8&255]^R[E&255]^r[N++],A=x[T>>>24]^v[F>>>16&255]^p[E>>>8&255]^R[w&255]^r[N++],B=x[F>>>24]^v[E>>>16&255]^p[w>>>8&255]^R[T&255]^r[N++];E=G,w=z,T=A,F=B}var G=(O[E>>>24]<<24|O[w>>>16&255]<<16|O[T>>>8&255]<<8|O[F&255])^r[N++],z=(O[w>>>24]<<24|O[T>>>16&255]<<16|O[F>>>8&255]<<8|O[E&255])^r[N++],A=(O[T>>>24]<<24|O[F>>>16&255]<<16|O[E>>>8&255]<<8|O[w&255])^r[N++],B=(O[F>>>24]<<24|O[E>>>16&255]<<16|O[w>>>8&255]<<8|O[T&255])^r[N++];l[o]=G,l[o+1]=z,l[o+2]=A,l[o+3]=B},keySize:256/32});g.AES=M._createHelper(f)}(),k.AES})},wbyO:function(H,J,D){(function(k,g){H.exports=J=g(D("Ib8C"))})(this,function(k){return function(){var g=k,C=g.lib,M=C.WordArray,m=g.enc,y=m.Base64url={stringify:function(_,t=!0){var h=_.words,n=_.sigBytes,c=t?this._safe_map:this._map;_.clamp();for(var a=[],i=0;i<n;i+=3)for(var s=h[i>>>2]>>>24-i%4*8&255,d=h[i+1>>>2]>>>24-(i+1)%4*8&255,f=h[i+2>>>2]>>>24-(i+2)%4*8&255,l=s<<16|d<<8|f,o=0;o<4&&i+o*.75<n;o++)a.push(c.charAt(l>>>6*(3-o)&63));var r=c.charAt(64);if(r)for(;a.length%4;)a.push(r);return a.join("")},parse:function(_,t=!0){var h=_.length,n=t?this._safe_map:this._map,c=this._reverseMap;if(!c){c=this._reverseMap=[];for(var a=0;a<n.length;a++)c[n.charCodeAt(a)]=a}var i=n.charAt(64);if(i){var s=_.indexOf(i);s!==-1&&(h=s)}return S(_,h,c)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function S(_,t,h){for(var n=[],c=0,a=0;a<t;a++)if(a%4){var i=h[_.charCodeAt(a-1)]<<a%4*2,s=h[_.charCodeAt(a)]>>>6-a%4*2,d=i|s;n[c>>>2]|=d<<24-c%4*8,c++}return M.create(n,c)}}(),k.enc.Base64url})},"y0+3":function(H,J,D){"use strict";D.d(J,"a",function(){return n}),D.d(J,"b",function(){return a});var k=/margin|padding|width|height|max|min|offset/,g={left:!0,top:!0},C={cssFloat:1,styleFloat:1,float:1};function M(i){return i.nodeType===1?i.ownerDocument.defaultView.getComputedStyle(i,null):{}}function m(i,s,d){if(s=s.toLowerCase(),d==="auto"){if(s==="height")return i.offsetHeight;if(s==="width")return i.offsetWidth}return s in g||(g[s]=k.test(s)),g[s]?parseFloat(d)||0:d}function y(i,s){var d=arguments.length,f=M(i);return s=C[s]?"cssFloat"in i.style?"cssFloat":"styleFloat":s,d===1?f:m(i,s,f[s]||i.style[s])}function S(i,s,d){var f=arguments.length;if(s=C[s]?"cssFloat"in i.style?"cssFloat":"styleFloat":s,f===3)return typeof d=="number"&&k.test(s)&&(d="".concat(d,"px")),i.style[s]=d,d;for(var l in s)s.hasOwnProperty(l)&&S(i,l,s[l]);return M(i)}function _(i){return i===document.body?document.documentElement.clientWidth:i.offsetWidth}function t(i){return i===document.body?window.innerHeight||document.documentElement.clientHeight:i.offsetHeight}function h(){var i=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),s=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:i,height:s}}function n(){var i=document.documentElement.clientWidth,s=window.innerHeight||document.documentElement.clientHeight;return{width:i,height:s}}function c(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function a(i){var s=i.getBoundingClientRect(),d=document.documentElement;return{left:s.left+(window.pageXOffset||d.scrollLeft)-(d.clientLeft||document.body.clientLeft||0),top:s.top+(window.pageYOffset||d.scrollTop)-(d.clientTop||document.body.clientTop||0)}}},"yTi+":function(H,J,D){H.exports=D.p+"static/AssistantCode3.fdd8db3c.jpeg"},zrhs:function(H,J,D){"use strict";var k=D("2qtc"),g=D("kLXV"),C=D("PpiC"),M=D("q1tI"),m=D.n(M),y=D("9kvl"),S=function(t){var h=t.shixunsDetail,n=t.globalSetting,c=t.loading,a=t.dispatch,i=Object(C.a)(t,["shixunsDetail","globalSetting","loading","dispatch"]);return m.a.createElement(g.a,{centered:!0,keyboard:!1,closable:!1,zIndex:6666,title:"\u63D0\u793A",visible:h.actionTabs.key==="Banner-Auth",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:function(){a({type:"shixunsDetail/setActionTabs",payload:{}}),window.location.href="/account/certification"},onCancel:function(){a({type:"shixunsDetail/setActionTabs",payload:{}})}},m.a.createElement("p",{className:"tc font16"},"\u5F53\u524D\u7ADE\u8D5B\u9700\u8981\u5B9E\u540D\u8BA4\u8BC1\uFF0C\u8BF7\u5148\u5B8C\u6210\u5B9E\u540D\u8BA4\u8BC1\u540E\u518D\u62A5\u540D\u53C2\u8D5B",m.a.createElement("br",null),"\u8BF7\u95EE\u662F\u5426\u524D\u5F80\u8FDB\u884C\u8BA4\u8BC1\uFF1F"))};J.a=Object(y.a)(function(_){var t=_.shixunsDetail,h=_.loading,n=_.globalSetting;return{shixunsDetail:t,globalSetting:n,loading:h.models.index}})(S)}}]);