(window.webpackJsonp=window.webpackJsonp||[]).push([[239,5,6,7,8,9,12,16],{"+NIl":function(H,Z,I){(function(N){N(I("VrN/"))})(function(N){"use strict";N.defineMode("stex",function(g,S){"use strict";function k(n,l){n.cmdState.push(l)}function v(n){return n.cmdState.length>0?n.cmdState[n.cmdState.length-1]:null}function m(n){var l=n.cmdState.pop();l&&l.closeBracket()}function C(n){for(var l=n.cmdState,f=l.length-1;f>=0;f--){var d=l[f];if(d.name=="DEFAULT")continue;return d}return{styleIdentifier:function(){return null}}}function _(n,l,f){return function(){this.name=n,this.bracketNo=0,this.style=l,this.styles=f,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var e={};e.importmodule=_("importmodule","tag",["string","builtin"]),e.documentclass=_("documentclass","tag",["","atom"]),e.usepackage=_("usepackage","tag",["atom"]),e.begin=_("begin","tag",["atom"]),e.end=_("end","tag",["atom"]),e.label=_("label","tag",["atom"]),e.ref=_("ref","tag",["atom"]),e.eqref=_("eqref","tag",["atom"]),e.cite=_("cite","tag",["atom"]),e.bibitem=_("bibitem","tag",["atom"]),e.Bibitem=_("Bibitem","tag",["atom"]),e.RBibitem=_("RBibitem","tag",["atom"]),e.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function h(n,l){n.f=l}function r(n,l){var f;if(n.match(/^\\[a-zA-Z@]+/)){var d=n.current().slice(1);return f=e.hasOwnProperty(d)?e[d]:e.DEFAULT,f=new f,k(l,f),h(l,i),f.style}if(n.match(/^\\[$&%#{}_]/))return"tag";if(n.match(/^\\[,;!\/\\]/))return"tag";if(n.match("\\["))return h(l,function(o,s){return c(o,s,"\\]")}),"keyword";if(n.match("\\("))return h(l,function(o,s){return c(o,s,"\\)")}),"keyword";if(n.match("$$"))return h(l,function(o,s){return c(o,s,"$$")}),"keyword";if(n.match("$"))return h(l,function(o,s){return c(o,s,"$")}),"keyword";var u=n.next();if(u=="%")return n.skipToEnd(),"comment";if(u=="}"||u=="]"){if(f=v(l),f)f.closeBracket(u),h(l,i);else return"error";return"bracket"}else return u=="{"||u=="["?(f=e.DEFAULT,f=new f,k(l,f),"bracket"):/\d/.test(u)?(n.eatWhile(/[\w.%]/),"atom"):(n.eatWhile(/[\w\-_]/),f=C(l),f.name=="begin"&&(f.argument=n.current()),f.styleIdentifier())}function c(n,l,f){if(n.eatSpace())return null;if(f&&n.match(f))return h(l,r),"keyword";if(n.match(/^\\[a-zA-Z@]+/))return"tag";if(n.match(/^[a-zA-Z]+/))return"variable-2";if(n.match(/^\\[$&%#{}_]/))return"tag";if(n.match(/^\\[,;!\/]/))return"tag";if(n.match(/^[\^_&]/))return"tag";if(n.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(n.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var d=n.next();return d=="{"||d=="}"||d=="["||d=="]"||d=="("||d==")"?"bracket":d=="%"?(n.skipToEnd(),"comment"):"error"}function i(n,l){var f=n.peek(),d;return f=="{"||f=="["?(d=v(l),d.openBracket(f),n.eat(f),h(l,r),"bracket"):/[ \t\r]/.test(f)?(n.eat(f),null):(h(l,r),m(l),r(n,l))}return{startState:function(){var n=S.inMathMode?function(l,f){return c(l,f)}:r;return{cmdState:[],f:n}},copyState:function(n){return{cmdState:n.cmdState.slice(),f:n.f}},token:function(n,l){return l.f(n,l)},blankLine:function(n){n.f=r,n.cmdState.length=0},lineComment:"%"}}),N.defineMIME("text/x-stex","stex"),N.defineMIME("text/x-latex","stex")})},"+ua5":function(H,Z,I){},"/cxE":function(H,Z,I){"use strict";I.d(Z,"f",function(){return S}),I.d(Z,"g",function(){return k}),I.d(Z,"h",function(){return v}),I.d(Z,"e",function(){return C}),I.d(Z,"b",function(){return _}),I.d(Z,"c",function(){return e}),I.d(Z,"d",function(){return h}),I.d(Z,"a",function(){return r});class N{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(c){setTimeout(()=>{throw c.stack?new Error(c.message+` `+c.stack):c},0)}}emit(c){this.listeners.forEach(i=>{i(c)})}onUnexpectedError(c){this.unexpectedErrorHandler(c),this.emit(c)}onUnexpectedExternalError(c){this.unexpectedErrorHandler(c)}}const g=new N;function S(c){C(c)||g.onUnexpectedError(c);return}function k(c){C(c)||g.onUnexpectedExternalError(c);return}function v(c){if(c instanceof Error){let{name:i,message:n}=c;const l=c.stacktrace||c.stack;return{$isError:!0,name:i,message:n,stack:l}}return c}const m="Canceled";function C(c){return c instanceof Error&&c.name===m&&c.message===m}function _(){const c=new Error(m);return c.name=c.message,c}function e(c){return c?new Error(`Illegal argument: ${c}`):new Error("Illegal argument")}function h(c){return c?new Error(`Illegal state: ${c}`):new Error("Illegal state")}class r extends Error{constructor(c){super("NotSupported");c&&(this.message=c)}}},"19Vz":function(H,Z,I){(function(N){N(I("VrN/"))})(function(N){N.defineOption("placeholder","",function(_,e,h){var r=h&&h!=N.Init;if(e&&!r)_.on("blur",v),_.on("change",m),_.on("swapDoc",m),N.on(_.getInputField(),"compositionupdate",_.state.placeholderCompose=function(){k(_)}),m(_);else if(!e&&r){_.off("blur",v),_.off("change",m),_.off("swapDoc",m),N.off(_.getInputField(),"compositionupdate",_.state.placeholderCompose),g(_);var c=_.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}e&&!_.hasFocus()&&v(_)});function g(_){_.state.placeholder&&(_.state.placeholder.parentNode.removeChild(_.state.placeholder),_.state.placeholder=null)}function S(_){g(_);var e=_.state.placeholder=document.createElement("pre");e.style.cssText="height: 0; overflow: visible",e.style.direction=_.getOption("direction"),e.className="CodeMirror-placeholder CodeMirror-line-like";var h=_.getOption("placeholder");typeof h=="string"&&(h=document.createTextNode(h)),e.appendChild(h),_.display.lineSpace.insertBefore(e,_.display.lineSpace.firstChild)}function k(_){setTimeout(function(){var e=!1,h=_.getInputField();h.nodeName=="TEXTAREA"?e=!h.value:_.lineCount()==1&&(e=!/[^\u200b]/.test(h.querySelector(".CodeMirror-line").textContent)),e?S(_):g(_)},20)}function v(_){C(_)&&S(_)}function m(_){var e=_.getWrapperElement(),h=C(_);e.className=e.className.replace(" CodeMirror-empty","")+(h?" CodeMirror-empty":""),h?S(_):g(_)}function C(_){return _.lineCount()===1&&_.getLine(0)===""}})},"1T2W":function(H,Z,I){H.exports={"code-panel-container":"code-panel-container___1BMQ9","action-oj-bar":"action-oj-bar___1PRBr",active:"active___2710v"}},"1eCo":function(H,Z,I){(function(N){N(I("VrN/"))})(function(N){"use strict";var g={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},S={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};N.defineMode("xml",function(k,v){var m=k.indentUnit,C={},_=v.htmlMode?g:S;for(var e in _)C[e]=_[e];for(var e in v)C[e]=v[e];var h,r;function c(T,F){function P(z){return F.tokenize=z,z(T,F)}var A=T.next();if(A=="<")return T.eat("!")?T.eat("[")?T.match("CDATA[")?P(l("atom","]]>")):null:T.match("--")?P(l("comment","-->")):T.match("DOCTYPE",!0,!0)?(T.eatWhile(/[\w\._\-]/),P(f(1))):null:T.eat("?")?(T.eatWhile(/[\w\._\-]/),F.tokenize=l("meta","?>"),"meta"):(h=T.eat("/")?"closeTag":"openTag",F.tokenize=i,"tag bracket");if(A=="&"){var X;return T.eat("#")?T.eat("x")?X=T.eatWhile(/[a-fA-F\d]/)&&T.eat(";"):X=T.eatWhile(/[\d]/)&&T.eat(";"):X=T.eatWhile(/[\w\.\-:]/)&&T.eat(";"),X?"atom":"error"}else return T.eatWhile(/[^&<]/),null}c.isInText=!0;function i(T,F){var P=T.next();if(P==">"||P=="/"&&T.eat(">"))return F.tokenize=c,h=P==">"?"endTag":"selfcloseTag","tag bracket";if(P=="=")return h="equals",null;if(P=="<"){F.tokenize=c,F.state=s,F.tagName=F.tagStart=null;var A=F.tokenize(T,F);return A?A+" tag error":"tag error"}else return/[\'\"]/.test(P)?(F.tokenize=n(P),F.stringStartCol=T.column(),F.tokenize(T,F)):(T.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function n(T){var F=function(P,A){for(;!P.eol();)if(P.next()==T){A.tokenize=i;break}return"string"};return F.isInAttribute=!0,F}function l(T,F){return function(P,A){for(;!P.eol();){if(P.match(F)){A.tokenize=c;break}P.next()}return T}}function f(T){return function(F,P){for(var A;(A=F.next())!=null;){if(A=="<")return P.tokenize=f(T+1),P.tokenize(F,P);if(A==">")if(T==1){P.tokenize=c;break}else return P.tokenize=f(T-1),P.tokenize(F,P)}return"meta"}}function d(T,F,P){this.prev=T.context,this.tagName=F,this.indent=T.indented,this.startOfLine=P,(C.doNotIndent.hasOwnProperty(F)||T.context&&T.context.noIndent)&&(this.noIndent=!0)}function u(T){T.context&&(T.context=T.context.prev)}function o(T,F){for(var P;;){if(!T.context)return;if(P=T.context.tagName,!C.contextGrabbers.hasOwnProperty(P)||!C.contextGrabbers[P].hasOwnProperty(F))return;u(T)}}function s(T,F,P){return T=="openTag"?(P.tagStart=F.column(),E):T=="closeTag"?b:s}function E(T,F,P){return T=="word"?(P.tagName=F.current(),r="tag",R):C.allowMissingTagName&&T=="endTag"?(r="tag bracket",R(T,F,P)):(r="error",E)}function b(T,F,P){if(T=="word"){var A=F.current();return P.context&&P.context.tagName!=A&&C.implicitlyClosed.hasOwnProperty(P.context.tagName)&&u(P),P.context&&P.context.tagName==A||C.matchClosing===!1?(r="tag",p):(r="tag error",D)}else return C.allowMissingTagName&&T=="endTag"?(r="tag bracket",p(T,F,P)):(r="error",D)}function p(T,F,P){return T!="endTag"?(r="error",p):(u(P),s)}function D(T,F,P){return r="error",p(T,F,P)}function R(T,F,P){if(T=="word")return r="attribute",y;if(T=="endTag"||T=="selfcloseTag"){var A=P.tagName,X=P.tagStart;return P.tagName=P.tagStart=null,T=="selfcloseTag"||C.autoSelfClosers.hasOwnProperty(A)?o(P,A):(o(P,A),P.context=new d(P,A,X==P.indented)),s}return r="error",R}function y(T,F,P){return T=="equals"?x:(C.allowMissing||(r="error"),R(T,F,P))}function x(T,F,P){return T=="string"?w:T=="word"&&C.allowUnquoted?(r="string",R):(r="error",R(T,F,P))}function w(T,F,P){return T=="string"?w:R(T,F,P)}return{startState:function(T){var F={tokenize:c,state:s,indented:T||0,tagName:null,tagStart:null,context:null};return T!=null&&(F.baseIndent=T),F},token:function(T,F){if(!F.tagName&&T.sol()&&(F.indented=T.indentation()),T.eatSpace())return null;h=null;var P=F.tokenize(T,F);return(P||h)&&P!="comment"&&(r=null,F.state=F.state(h||P,T,F),r&&(P=r=="error"?P+" error":r)),P},indent:function(T,F,P){var A=T.context;if(T.tokenize.isInAttribute)return T.tagStart==T.indented?T.stringStartCol+1:T.indented+m;if(A&&A.noIndent)return N.Pass;if(T.tokenize!=i&&T.tokenize!=c)return P?P.match(/^(\s*)/)[0].length:0;if(T.tagName)return C.multilineTagIndentPastTag!==!1?T.tagStart+T.tagName.length+2:T.tagStart+m*(C.multilineTagIndentFactor||1);if(C.alignCDATA&&/$/,blockCommentStart:"",configuration:C.htmlMode?"html":"xml",helperType:C.htmlMode?"html":"xml",skipAttribute:function(T){T.state==x&&(T.state=R)},xmlCurrentTag:function(T){return T.tagName?{name:T.tagName,close:T.type=="closeTag"}:null},xmlCurrentContext:function(T){for(var F=[],P=T.context;P;P=P.prev)P.tagName&&F.push(P.tagName);return F.reverse()}}}),N.defineMIME("text/xml","xml"),N.defineMIME("application/xml","xml"),N.mimeModes.hasOwnProperty("text/html")||N.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1uat":function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("MlIO"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.Hasher,v=g.x64,m=v.Word,C=v.WordArray,_=g.algo;function e(){return m.create.apply(m,arguments)}var h=[e(1116352408,3609767458),e(1899447441,602891725),e(3049323471,3964484399),e(3921009573,2173295548),e(961987163,4081628472),e(1508970993,3053834265),e(2453635748,2937671579),e(2870763221,3664609560),e(3624381080,2734883394),e(310598401,1164996542),e(607225278,1323610764),e(1426881987,3590304994),e(1925078388,4068182383),e(2162078206,991336113),e(2614888103,633803317),e(3248222580,3479774868),e(3835390401,2666613458),e(4022224774,944711139),e(264347078,2341262773),e(604807628,2007800933),e(770255983,1495990901),e(1249150122,1856431235),e(1555081692,3175218132),e(1996064986,2198950837),e(2554220882,3999719339),e(2821834349,766784016),e(2952996808,2566594879),e(3210313671,3203337956),e(3336571891,1034457026),e(3584528711,2466948901),e(113926993,3758326383),e(338241895,168717936),e(666307205,1188179964),e(773529912,1546045734),e(1294757372,1522805485),e(1396182291,2643833823),e(1695183700,2343527390),e(1986661051,1014477480),e(2177026350,1206759142),e(2456956037,344077627),e(2730485921,1290863460),e(2820302411,3158454273),e(3259730800,3505952657),e(3345764771,106217008),e(3516065817,3606008344),e(3600352804,1432725776),e(4094571909,1467031594),e(275423344,851169720),e(430227734,3100823752),e(506948616,1363258195),e(659060556,3750685593),e(883997877,3785050280),e(958139571,3318307427),e(1322822218,3812723403),e(1537002063,2003034995),e(1747873779,3602036899),e(1955562222,1575990012),e(2024104815,1125592928),e(2227730452,2716904306),e(2361852424,442776044),e(2428436474,593698344),e(2756734187,3733110249),e(3204031479,2999351573),e(3329325298,3815920427),e(3391569614,3928383900),e(3515267271,566280711),e(3940187606,3454069534),e(4118630271,4000239992),e(116418474,1914138554),e(174292421,2731055270),e(289380356,3203993006),e(460393269,320620315),e(685471733,587496836),e(852142971,1086792851),e(1017036298,365543100),e(1126000580,2618297676),e(1288033470,3409855158),e(1501505948,4234509866),e(1607167915,987167468),e(1816402316,1246189591)],r=[];(function(){for(var i=0;i<80;i++)r[i]=e()})();var c=_.SHA512=k.extend({_doReset:function(){this._hash=new C.init([new m.init(1779033703,4089235720),new m.init(3144134277,2227873595),new m.init(1013904242,4271175723),new m.init(2773480762,1595750129),new m.init(1359893119,2917565137),new m.init(2600822924,725511199),new m.init(528734635,4215389547),new m.init(1541459225,327033209)])},_doProcessBlock:function(i,n){for(var l=this._hash.words,f=l[0],d=l[1],u=l[2],o=l[3],s=l[4],E=l[5],b=l[6],p=l[7],D=f.high,R=f.low,y=d.high,x=d.low,w=u.high,T=u.low,F=o.high,P=o.low,A=s.high,X=s.low,z=E.high,O=E.low,B=b.high,U=b.low,L=p.high,G=p.low,ee=D,oe=R,ae=y,be=x,_e=w,fe=T,Re=F,Oe=P,de=A,te=X,W=z,Y=O,V=B,Q=U,q=L,ie=G,ne=0;ne<80;ne++){var J,$,le=r[ne];if(ne<16)$=le.high=i[n+ne*2]|0,J=le.low=i[n+ne*2+1]|0;else{var ce=r[ne-15],we=ce.high,Fe=ce.low,Xe=(we>>>1|Fe<<31)^(we>>>8|Fe<<24)^we>>>7,$e=(Fe>>>1|we<<31)^(Fe>>>8|we<<24)^(Fe>>>7|we<<25),Ye=r[ne-2],Ze=Ye.high,qe=Ye.low,Pe=(Ze>>>19|qe<<13)^(Ze<<3|qe>>>29)^Ze>>>6,Ie=(qe>>>19|Ze<<13)^(qe<<3|Ze>>>29)^(qe>>>6|Ze<<26),Je=r[ne-7],rt=Je.high,ye=Je.low,ue=r[ne-16],he=ue.high,me=ue.low;J=$e+ye,$=Xe+rt+(J>>>0<$e>>>0?1:0),J=J+Ie,$=$+Pe+(J>>>0>>0?1:0),J=J+me,$=$+he+(J>>>0>>0?1:0),le.high=$,le.low=J}var Ce=de&W^~de&V,ge=te&Y^~te&Q,Ee=ee&ae^ee&_e^ae&_e,Ae=oe&be^oe&fe^be&fe,De=(ee>>>28|oe<<4)^(ee<<30|oe>>>2)^(ee<<25|oe>>>7),Me=(oe>>>28|ee<<4)^(oe<<30|ee>>>2)^(oe<<25|ee>>>7),He=(de>>>14|te<<18)^(de>>>18|te<<14)^(de<<23|te>>>9),nt=(te>>>14|de<<18)^(te>>>18|de<<14)^(te<<23|de>>>9),at=h[ne],it=at.high,st=at.low,Tt=ie+nt,pt=q+He+(Tt>>>0>>0?1:0),Tt=Tt+ge,pt=pt+Ce+(Tt>>>0>>0?1:0),Tt=Tt+st,pt=pt+it+(Tt>>>0>>0?1:0),Tt=Tt+J,pt=pt+$+(Tt>>>0>>0?1:0),ht=Me+Ae,Ft=De+Ee+(ht>>>0>>0?1:0);q=V,ie=Q,V=W,Q=Y,W=de,Y=te,te=Oe+Tt|0,de=Re+pt+(te>>>0>>0?1:0)|0,Re=_e,Oe=fe,_e=ae,fe=be,ae=ee,be=oe,oe=Tt+ht|0,ee=pt+Ft+(oe>>>0>>0?1:0)|0}R=f.low=R+oe,f.high=D+ee+(R>>>0>>0?1:0),x=d.low=x+be,d.high=y+ae+(x>>>0>>0?1:0),T=u.low=T+fe,u.high=w+_e+(T>>>0>>0?1:0),P=o.low=P+Oe,o.high=F+Re+(P>>>0>>0?1:0),X=s.low=X+te,s.high=A+de+(X>>>0>>0?1:0),O=E.low=O+Y,E.high=z+W+(O>>>0>>0?1:0),U=b.low=U+Q,b.high=B+V+(U>>>0>>0?1:0),G=p.low=G+ie,p.high=L+q+(G>>>0>>0?1:0)},_doFinalize:function(){var i=this._data,n=i.words,l=this._nDataBytes*8,f=i.sigBytes*8;n[f>>>5]|=128<<24-f%32,n[(f+128>>>10<<5)+30]=Math.floor(l/4294967296),n[(f+128>>>10<<5)+31]=l,i.sigBytes=n.length*4,this._process();var d=this._hash.toX32();return d},clone:function(){var i=k.clone.call(this);return i._hash=this._hash.clone(),i},blockSize:1024/32});g.SHA512=k._createHelper(c),g.HmacSHA512=k._createHmacHelper(c)}(),N.SHA512})},"24hK":function(H,Z,I){"use strict";I.d(Z,"a",function(){return g});class N{constructor(S){this.element=S,this.next=N.Undefined,this.prev=N.Undefined}}N.Undefined=new N(void 0);class g{constructor(){this._first=N.Undefined,this._last=N.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===N.Undefined}clear(){let S=this._first;for(;S!==N.Undefined;){const k=S.next;S.prev=N.Undefined,S.next=N.Undefined,S=k}this._first=N.Undefined,this._last=N.Undefined,this._size=0}unshift(S){return this._insert(S,!1)}push(S){return this._insert(S,!0)}_insert(S,k){const v=new N(S);if(this._first===N.Undefined)this._first=v,this._last=v;else if(k){const C=this._last;this._last=v,v.prev=C,C.next=v}else{const C=this._first;this._first=v,v.next=C,C.prev=v}this._size+=1;let m=!1;return()=>{m||(m=!0,this._remove(v))}}shift(){if(this._first===N.Undefined)return;{const S=this._first.element;return this._remove(this._first),S}}pop(){if(this._last===N.Undefined)return;{const S=this._last.element;return this._remove(this._last),S}}_remove(S){if(S.prev!==N.Undefined&&S.next!==N.Undefined){const k=S.prev;k.next=S.next,S.next.prev=k}else S.prev===N.Undefined&&S.next===N.Undefined?(this._first=N.Undefined,this._last=N.Undefined):S.next===N.Undefined?(this._last=this._last.prev,this._last.next=N.Undefined):S.prev===N.Undefined&&(this._first=this._first.next,this._first.prev=N.Undefined);this._size-=1}*[Symbol.iterator](){let S=this._first;for(;S!==N.Undefined;)yield S.element,S=S.next}}},"3/fG":function(H,Z,I){"use strict";I.d(Z,"a",function(){return g});function N(S,k){let v;return k.length===0?v=S:v=S.replace(/\{(\d+)\}/g,function(m,C){const _=C[0];return typeof k[_]!="undefined"?k[_]:m}),v}function g(S,k,...v){return N(k,v)}},"3y9D":function(H,Z,I){(function(N,g){H.exports=Z=g(I("Ib8C"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.WordArray,v=S.Hasher,m=g.algo,C=[],_=m.SHA1=v.extend({_doReset:function(){this._hash=new k.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,h){for(var r=this._hash.words,c=r[0],i=r[1],n=r[2],l=r[3],f=r[4],d=0;d<80;d++){if(d<16)C[d]=e[h+d]|0;else{var u=C[d-3]^C[d-8]^C[d-14]^C[d-16];C[d]=u<<1|u>>>31}var o=(c<<5|c>>>27)+f+C[d];d<20?o+=(i&n|~i&l)+1518500249:d<40?o+=(i^n^l)+1859775393:d<60?o+=(i&n|i&l|n&l)-1894007588:o+=(i^n^l)-899497514,f=l,l=n,n=i<<30|i>>>2,i=c,c=o}r[0]=r[0]+c|0,r[1]=r[1]+i|0,r[2]=r[2]+n|0,r[3]=r[3]+l|0,r[4]=r[4]+f|0},_doFinalize:function(){var e=this._data,h=e.words,r=this._nDataBytes*8,c=e.sigBytes*8;return h[c>>>5]|=128<<24-c%32,h[(c+64>>>9<<4)+14]=Math.floor(r/4294967296),h[(c+64>>>9<<4)+15]=r,e.sigBytes=h.length*4,this._process(),this._hash},clone:function(){var e=v.clone.call(this);return e._hash=this._hash.clone(),e}});g.SHA1=v._createHelper(_),g.HmacSHA1=v._createHmacHelper(_)}(),N.SHA1})},4:function(H,Z){},"5VLF":function(H,Z,I){"use strict";var N,g;function S(k,v,m){var C=function(_,e){return k.js_beautify(_,e)};return C.js=k.js_beautify,C.css=v.css_beautify,C.html=m.html_beautify,C.js_beautify=k.js_beautify,C.css_beautify=v.css_beautify,C.html_beautify=m.html_beautify,C}!(N=[I("6UM0"),I("TXwP"),I("psGv")],g=function(k,v,m){return S(k,v,m)}.apply(Z,N),g!==void 0&&(H.exports=g))},"5Y4S":function(H,Z,I){"use strict";I.d(Z,"a",function(){return S});var N=I("MNsG");const g=N.b.performance&&typeof N.b.performance.now=="function";class S{constructor(k){this._highResolution=g&&k,this._startTime=this._now(),this._stopTime=-1}static create(k=!0){return new S(k)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?N.b.performance.now():Date.now()}}},"5hvy":function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("MlIO"))})(this,function(N){return function(g){var S=N,k=S.lib,v=k.WordArray,m=k.Hasher,C=S.x64,_=C.Word,e=S.algo,h=[],r=[],c=[];(function(){for(var l=1,f=0,d=0;d<24;d++){h[l+5*f]=(d+1)*(d+2)/2%64;var u=f%5,o=(2*l+3*f)%5;l=u,f=o}for(var l=0;l<5;l++)for(var f=0;f<5;f++)r[l+5*f]=f+(2*l+3*f)%5*5;for(var s=1,E=0;E<24;E++){for(var b=0,p=0,D=0;D<7;D++){if(s&1){var R=(1<>>24)&16711935|(s<<24|s>>>8)&4278255360,E=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360;var b=d[o];b.high^=E,b.low^=s}for(var p=0;p<24;p++){for(var D=0;D<5;D++){for(var R=0,y=0,x=0;x<5;x++){var b=d[D+5*x];R^=b.high,y^=b.low}var w=i[D];w.high=R,w.low=y}for(var D=0;D<5;D++)for(var T=i[(D+4)%5],F=i[(D+1)%5],P=F.high,A=F.low,R=T.high^(P<<1|A>>>31),y=T.low^(A<<1|P>>>31),x=0;x<5;x++){var b=d[D+5*x];b.high^=R,b.low^=y}for(var X=1;X<25;X++){var R,y,b=d[X],z=b.high,O=b.low,B=h[X];B<32?(R=z<>>32-B,y=O<>>32-B):(R=O<>>64-B,y=z<>>64-B);var U=i[r[X]];U.high=R,U.low=y}var L=i[0],G=d[0];L.high=G.high,L.low=G.low;for(var D=0;D<5;D++)for(var x=0;x<5;x++){var X=D+5*x,b=d[X],ee=i[X],oe=i[(D+1)%5+5*x],ae=i[(D+2)%5+5*x];b.high=ee.high^~oe.high&ae.high,b.low=ee.low^~oe.low&ae.low}var b=d[0],be=c[p];b.high^=be.high,b.low^=be.low}},_doFinalize:function(){var l=this._data,f=l.words,d=this._nDataBytes*8,u=l.sigBytes*8,o=this.blockSize*32;f[u>>>5]|=1<<24-u%32,f[(g.ceil((u+1)/o)*o>>>5)-1]|=128,l.sigBytes=f.length*4,this._process();for(var s=this._state,E=this.cfg.outputLength/8,b=E/8,p=[],D=0;D>>24)&16711935|(y<<24|y>>>8)&4278255360,x=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,p.push(x),p.push(y)}return new v.init(p,E)},clone:function(){for(var l=m.clone.call(this),f=l._state=this._state.slice(0),d=0;d<25;d++)f[d]=f[d].clone();return l}});S.SHA3=m._createHelper(n),S.HmacSHA3=m._createHmacHelper(n)}(Math),N.SHA3})},"5nXd":function(H,Z,I){var N=I("MFOe"),g=N.slice,S=N.pluck,k=N.each,v=N.bind,m=N.create,C=N.isList,_=N.isFunction,e=N.isObject;H.exports={createStore:c};var h={version:"2.0.12",enabled:!1,get:function(i,n){var l=this.storage.read(this._namespacePrefix+i);return this._deserialize(l,n)},set:function(i,n){return n===void 0?this.remove(i):(this.storage.write(this._namespacePrefix+i,this._serialize(n)),n)},remove:function(i){this.storage.remove(this._namespacePrefix+i)},each:function(i){var n=this;this.storage.each(function(l,f){i.call(n,n._deserialize(l),(f||"").replace(n._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(i){return this._namespacePrefix=="__storejs_"+i+"_"},createStore:function(){return c.apply(this,arguments)},addPlugin:function(i){this._addPlugin(i)},namespace:function(i){return c(this.storage,this.plugins,i)}};function r(){var i=typeof console=="undefined"?null:console;if(!i)return;var n=i.warn?i.warn:i.log;n.apply(i,arguments)}function c(i,n,l){l||(l=""),i&&!C(i)&&(i=[i]),n&&!C(n)&&(n=[n]);var f=l?"__storejs_"+l+"_":"",d=l?new RegExp("^"+f):null,u=/^[a-zA-Z0-9_\-]*$/;if(!u.test(l))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var o={_namespacePrefix:f,_namespaceRegexp:d,_testStorage:function(E){try{var b="__storejs__test__";E.write(b,b);var p=E.read(b)===b;return E.remove(b),p}catch(D){return!1}},_assignPluginFnProp:function(E,b){var p=this[b];this[b]=function(){var R=g(arguments,0),y=this;function x(){return p?(k(arguments,function(T,F){R[F]=T}),p.apply(y,R)):void 0}var w=[x].concat(R);return E.apply(y,w)}},_serialize:function(E){return JSON.stringify(E)},_deserialize:function(E,b){if(!E)return b;var p="";try{p=JSON.parse(E)}catch(D){p=E}return p!==void 0?p:b},_addStorage:function(E){if(this.enabled)return;this._testStorage(E)&&(this.storage=E,this.enabled=!0)},_addPlugin:function(E){var b=this;if(C(E)){k(E,function(R){b._addPlugin(R)});return}var p=S(this.plugins,function(R){return E===R});if(p)return;if(this.plugins.push(E),!_(E))throw new Error("Plugins must be function values that return objects");var D=E.call(this);if(!e(D))throw new Error("Plugins must return an object of function properties");k(D,function(R,y){if(!_(R))throw new Error("Bad plugin property: "+y+" from plugin "+E.name+". Plugins should only return functions.");b._assignPluginFnProp(R,y)})},addStorage:function(E){r("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(E)}},s=m(o,h,{plugins:[]});return s.raw={},k(s,function(E,b){_(E)&&(s.raw[b]=v(s,E))}),k(i,function(E){s._addStorage(E)}),k(n,function(E){s._addPlugin(E)}),s}},"6+eU":function(H,Z,I){"use strict";I.d(Z,"a",function(){return p});var N=I("wx14"),g=I("rePB"),S=I("VTBJ"),k=I("1OyB"),v=I("vuIU"),m=I("Ji7U"),C=I("LK+K"),_=I("q1tI"),e=I.n(_),h=I("TSYQ"),r=I.n(h),c=function(R){var y,x="".concat(R.rootPrefixCls,"-item"),w=r()(x,"".concat(x,"-").concat(R.page),(y={},Object(g.a)(y,"".concat(x,"-active"),R.active),Object(g.a)(y,R.className,!!R.className),Object(g.a)(y,"".concat(x,"-disabled"),!R.page),y)),T=function(){R.onClick(R.page)},F=function(A){R.onKeyPress(A,R.onClick,R.page)};return e.a.createElement("li",{title:R.showTitle?R.page:null,className:w,onClick:T,onKeyPress:F,tabIndex:"0"},R.itemRender(R.page,"page",e.a.createElement("a",{rel:"nofollow"},R.page)))},i=c,n={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},l=function(D){Object(m.a)(y,D);var R=Object(C.a)(y);function y(){var x;Object(k.a)(this,y);for(var w=arguments.length,T=new Array(w),F=0;F=0||P.relatedTarget.className.indexOf("".concat(O,"-next"))>=0))return;x.setState({goInputText:""}),z(x.getValidValue())},x.go=function(P){var A=x.state.goInputText;if(A==="")return;(P.keyCode===n.ENTER||P.type==="click")&&(x.setState({goInputText:""}),x.props.quickGo(x.getValidValue()))},x}return Object(v.a)(y,[{key:"getValidValue",value:function(){var w=this.state,T=w.goInputText,F=w.current;return!T||isNaN(T)?F:Number(T)}},{key:"getPageSizeOptions",value:function(){var w=this.props,T=w.pageSize,F=w.pageSizeOptions;return F.some(function(P){return P.toString()===T.toString()})?F:F.concat([T.toString()]).sort(function(P,A){var X=isNaN(Number(P))?0:Number(P),z=isNaN(Number(A))?0:Number(A);return X-z})}},{key:"render",value:function(){var w=this,T=this.props,F=T.pageSize,P=T.locale,A=T.rootPrefixCls,X=T.changeSize,z=T.quickGo,O=T.goButton,B=T.selectComponentClass,U=T.buildOptionText,L=T.selectPrefixCls,G=T.disabled,ee=this.state.goInputText,oe="".concat(A,"-options"),ae=B,be=null,_e=null,fe=null;if(!X&&!z)return null;var Re=this.getPageSizeOptions();if(X&&ae){var Oe=Re.map(function(de,te){return e.a.createElement(ae.Option,{key:te,value:de.toString()},(U||w.buildOptionText)(de))});be=e.a.createElement(ae,{disabled:G,prefixCls:L,showSearch:!1,className:"".concat(oe,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(F||Re[0]).toString(),onChange:this.changeSize,getPopupContainer:function(te){return te.parentNode}},Oe)}return z&&(O&&(fe=typeof O=="boolean"?e.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:G,className:"".concat(oe,"-quick-jumper-button")},P.jump_to_confirm):e.a.createElement("span",{onClick:this.go,onKeyUp:this.go},O)),_e=e.a.createElement("div",{className:"".concat(oe,"-quick-jumper")},P.jump_to,e.a.createElement("input",{disabled:G,type:"text",value:ee,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),P.page,fe)),e.a.createElement("li",{className:"".concat(oe)},be,_e)}}]),y}(e.a.Component);l.defaultProps={pageSizeOptions:["10","20","50","100"]};var f=l,d=I("N2Kk");function u(){}function o(D){return typeof D=="number"&&isFinite(D)&&Math.floor(D)===D}function s(D,R,y){return y}function E(D,R,y){var x=typeof D=="undefined"?R.pageSize:D;return Math.floor((y.total-1)/x)+1}var b=function(D){Object(m.a)(y,D);var R=Object(C.a)(y);function y(x){var w;Object(k.a)(this,y),w=R.call(this,x),w.getJumpPrevPage=function(){return Math.max(1,w.state.current-(w.props.showLessItems?3:5))},w.getJumpNextPage=function(){return Math.min(E(void 0,w.state,w.props),w.state.current+(w.props.showLessItems?3:5))},w.getItemIcon=function(X,z){var O=w.props.prefixCls,B=X||e.a.createElement("button",{type:"button","aria-label":z,className:"".concat(O,"-item-link")});return typeof X=="function"&&(B=e.a.createElement(X,Object(S.a)({},w.props))),B},w.savePaginationNode=function(X){w.paginationNode=X},w.isValid=function(X){return o(X)&&X!==w.state.current},w.shouldDisplayQuickJumper=function(){var X=w.props,z=X.showQuickJumper,O=X.pageSize,B=X.total;return B<=O?!1:z},w.handleKeyDown=function(X){(X.keyCode===n.ARROW_UP||X.keyCode===n.ARROW_DOWN)&&X.preventDefault()},w.handleKeyUp=function(X){var z=w.getValidValue(X),O=w.state.currentInputValue;z!==O&&w.setState({currentInputValue:z}),X.keyCode===n.ENTER?w.handleChange(z):X.keyCode===n.ARROW_UP?w.handleChange(z-1):X.keyCode===n.ARROW_DOWN&&w.handleChange(z+1)},w.changePageSize=function(X){var z=w.state.current,O=E(X,w.state,w.props);z=z>O?O:z,O===0&&(z=w.state.current),typeof X=="number"&&("pageSize"in w.props||w.setState({pageSize:X}),"current"in w.props||w.setState({current:z,currentInputValue:z})),w.props.onShowSizeChange(z,X),"onChange"in w.props&&w.props.onChange&&w.props.onChange(z,X)},w.handleChange=function(X){var z=w.props.disabled,O=X;if(w.isValid(O)&&!z){var B=E(void 0,w.state,w.props);O>B?O=B:O<1&&(O=1),"current"in w.props||w.setState({current:O,currentInputValue:O});var U=w.state.pageSize;return w.props.onChange(O,U),O}return w.state.current},w.prev=function(){w.hasPrev()&&w.handleChange(w.state.current-1)},w.next=function(){w.hasNext()&&w.handleChange(w.state.current+1)},w.jumpPrev=function(){w.handleChange(w.getJumpPrevPage())},w.jumpNext=function(){w.handleChange(w.getJumpNextPage())},w.hasPrev=function(){return w.state.current>1},w.hasNext=function(){return w.state.current2?O-2:0),U=2;U=F?A=F:A=Number(T),A}},{key:"getShowSizeChanger",value:function(){var w=this.props,T=w.showSizeChanger,F=w.total,P=w.totalBoundaryShowSizeChanger;return typeof T!="undefined"?T:F>P}},{key:"renderPrev",value:function(w){var T=this.props,F=T.prevIcon,P=T.itemRender,A=P(w,"prev",this.getItemIcon(F,"prev page")),X=!this.hasPrev();return Object(_.isValidElement)(A)?Object(_.cloneElement)(A,{disabled:X}):A}},{key:"renderNext",value:function(w){var T=this.props,F=T.nextIcon,P=T.itemRender,A=P(w,"next",this.getItemIcon(F,"next page")),X=!this.hasNext();return Object(_.isValidElement)(A)?Object(_.cloneElement)(A,{disabled:X}):A}},{key:"render",value:function(){var w=this,T=this.props,F=T.prefixCls,P=T.className,A=T.style,X=T.disabled,z=T.hideOnSinglePage,O=T.total,B=T.locale,U=T.showQuickJumper,L=T.showLessItems,G=T.showTitle,ee=T.showTotal,oe=T.simple,ae=T.itemRender,be=T.showPrevNextJumpers,_e=T.jumpPrevIcon,fe=T.jumpNextIcon,Re=T.selectComponentClass,Oe=T.selectPrefixCls,de=T.pageSizeOptions,te=this.state,W=te.current,Y=te.pageSize,V=te.currentInputValue;if(z===!0&&O<=Y)return null;var Q=E(void 0,this.state,this.props),q=[],ie=null,ne=null,J=null,$=null,le=null,ce=U&&U.goButton,we=L?1:2,Fe=W-1>0?W-1:0,Xe=W+1=we*2&&W!==1+2&&(q[0]=Object(_.cloneElement)(q[0],{className:"".concat(F,"-item-after-jump-prev")}),q.unshift(ie)),Q-W>=we*2&&W!==Q-2&&(q[q.length-1]=Object(_.cloneElement)(q[q.length-1],{className:"".concat(F,"-item-before-jump-next")}),q.push(ne)),Je!==1&&q.unshift(J),rt!==Q&&q.push($)}var he=null;ee&&(he=e.a.createElement("li",{className:"".concat(F,"-total-text")},ee(O,[O===0?0:(W-1)*Y+1,W*Y>O?O:W*Y])));var me=!this.hasPrev()||!Q,Ce=!this.hasNext()||!Q;return e.a.createElement("ul",Object(N.a)({className:r()(F,P,Object(g.a)({},"".concat(F,"-disabled"),X)),style:A,unselectable:"unselectable",ref:this.savePaginationNode},$e),he,e.a.createElement("li",{title:G?B.prev_page:null,onClick:this.prev,tabIndex:me?null:0,onKeyPress:this.runIfEnterPrev,className:r()("".concat(F,"-prev"),Object(g.a)({},"".concat(F,"-disabled"),me)),"aria-disabled":me},this.renderPrev(Fe)),q,e.a.createElement("li",{title:G?B.next_page:null,onClick:this.next,tabIndex:Ce?null:0,onKeyPress:this.runIfEnterNext,className:r()("".concat(F,"-next"),Object(g.a)({},"".concat(F,"-disabled"),Ce)),"aria-disabled":Ce},this.renderNext(Xe)),e.a.createElement(f,{disabled:X,locale:B,rootPrefixCls:F,selectComponentClass:Re,selectPrefixCls:Oe,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:W,pageSize:Y,pageSizeOptions:de,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:ce}))}}],[{key:"getDerivedStateFromProps",value:function(w,T){var F={};if("current"in w&&(F.current=w.current,w.current!==T.current&&(F.currentInputValue=F.current)),"pageSize"in w&&w.pageSize!==T.pageSize){var P=T.current,A=E(w.pageSize,T,w);P=P>A?A:P,"current"in w||(F.current=P,F.currentInputValue=P),F.pageSize=w.pageSize}return F}}]),y}(e.a.Component);b.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:u,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:u,locale:d.a,style:{},itemRender:s,totalBoundaryShowSizeChanger:50};var p=b},"6RRn":function(H,Z,I){"use strict";var N=I("wCXF"),g=I("n6Qo");I.d(Z,"b",function(){return g.a});var S=I("IBYe"),k=I("6eGT"),v=I("hW8S");I.d(Z,"a",function(){return v.a}),Z.c=N.b},"6UM0":function(H,Z,I){var N,g;(function(){var S;(function(){"use strict";var v=[function(e,h,r){var c=r(1).Beautifier,i=r(5).Options;function n(l,f){var d=new c(l,f);return d.beautify()}e.exports=n,e.exports.defaultOptions=function(){return new i}},function(e,h,r){var c=r(2).Output,i=r(3).Token,n=r(4),l=r(5).Options,f=r(7).Tokenizer,d=r(7).line_starters,u=r(7).positionable_operators,o=r(7).TOKEN;function s(L,G){return G.indexOf(L)!==-1}function E(L){return L.replace(/^\s+/g,"")}function b(L){for(var G={},ee=0;eeee&&(ee=L.line_indent_level));var oe={mode:G,parent:L,last_token:L?L.last_token:new i(o.START_BLOCK,""),last_word:L?L.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:ee,alignment:0,line_indent_level:L?L.line_indent_level:ee,start_line_index:this._output.get_line_number(),ternary_depth:0};return oe},B.prototype._reset=function(L){var G=L.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new c(this._options,G),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(T.BlockStatement);var ee=new f(L,this._options);return this._tokens=ee.tokenize(),L},B.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var L,G=this._reset(this._source_text),ee=this._options.eol;this._options.eol==="auto"&&(ee=` `,G&&n.lineBreak.test(G||"")&&(ee=G.match(n.lineBreak)[0]));for(var oe=this._tokens.next();oe;)this.handle_token(oe),this._last_last_text=this._flags.last_token.text,this._flags.last_token=oe,oe=this._tokens.next();return L=this._output.get_code(ee),L},B.prototype.handle_token=function(L,G){L.type===o.START_EXPR?this.handle_start_expr(L):L.type===o.END_EXPR?this.handle_end_expr(L):L.type===o.START_BLOCK?this.handle_start_block(L):L.type===o.END_BLOCK?this.handle_end_block(L):L.type===o.WORD?this.handle_word(L):L.type===o.RESERVED?this.handle_word(L):L.type===o.SEMICOLON?this.handle_semicolon(L):L.type===o.STRING?this.handle_string(L):L.type===o.EQUALS?this.handle_equals(L):L.type===o.OPERATOR?this.handle_operator(L):L.type===o.COMMA?this.handle_comma(L):L.type===o.BLOCK_COMMENT?this.handle_block_comment(L,G):L.type===o.COMMENT?this.handle_comment(L,G):L.type===o.DOT?this.handle_dot(L):L.type===o.EOF?this.handle_eof(L):L.type===o.UNKNOWN?this.handle_unknown(L,G):this.handle_unknown(L,G)},B.prototype.handle_whitespace_and_comments=function(L,G){var ee=L.newlines,oe=this._options.keep_array_indentation&&A(this._flags.mode);if(L.comments_before)for(var ae=L.comments_before.next();ae;)this.handle_whitespace_and_comments(ae,G),this.handle_token(ae,G),ae=L.comments_before.next();if(oe)for(var be=0;be0,G);else if(this._options.max_preserve_newlines&&ee>this._options.max_preserve_newlines&&(ee=this._options.max_preserve_newlines),this._options.preserve_newlines&&ee>1){this.print_newline(!1,G);for(var _e=1;_e0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},B.prototype.set_mode=function(L){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,L),this._flags=this.create_flags(this._previous_flags,L),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},B.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===T.Statement&&F(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},B.prototype.start_of_object_property=function(){return this._flags.parent.mode===T.ObjectLiteral&&this._flags.mode===T.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||D(this._flags.last_token,["get","set"]))},B.prototype.start_of_statement=function(L){var G=!1;return G=G||D(this._flags.last_token,["var","let","const"])&&L.type===o.WORD,G=G||p(this._flags.last_token,"do"),G=G||!(this._flags.parent.mode===T.ObjectLiteral&&this._flags.mode===T.Statement)&&D(this._flags.last_token,U)&&!L.newlines,G=G||p(this._flags.last_token,"else")&&!(p(L,"if")&&!L.comments_before),G=G||this._flags.last_token.type===o.END_EXPR&&(this._previous_flags.mode===T.ForInitializer||this._previous_flags.mode===T.Conditional),G=G||this._flags.last_token.type===o.WORD&&this._flags.mode===T.BlockStatement&&!this._flags.in_case&&!(L.text==="--"||L.text==="++")&&this._last_last_text!=="function"&&L.type!==o.WORD&&L.type!==o.RESERVED,G=G||this._flags.mode===T.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||D(this._flags.last_token,["get","set"])),G?(this.set_mode(T.Statement),this.indent(),this.handle_whitespace_and_comments(L,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(L,D(L,["do","for","if","while"])),!0):!1},B.prototype.handle_start_expr=function(L){this.start_of_statement(L)||this.handle_whitespace_and_comments(L);var G=T.Expression;if(L.text==="["){if(this._flags.last_token.type===o.WORD||this._flags.last_token.text===")"){D(this._flags.last_token,d)&&(this._output.space_before_token=!0),this.print_token(L),this.set_mode(G),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}G=T.ArrayLiteral,A(this._flags.mode)&&((this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline())),s(this._flags.last_token.type,[o.START_EXPR,o.END_EXPR,o.WORD,o.OPERATOR,o.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===o.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,G=T.ForInitializer):s(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,G=T.Conditional):s(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&L.whitespace_before===""?this._output.space_before_token=!1:(s(this._flags.last_token.text,d)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===o.EQUALS||this._flags.last_token.type===o.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(L);else if(this._flags.last_token.type===o.WORD){this._output.space_before_token=!1;var ee=this._tokens.peek(-3);if(this._options.space_after_named_function&&ee){var oe=this._tokens.peek(-4);D(ee,["async","function"])||ee.text==="*"&&D(oe,["async","function"])?this._output.space_before_token=!0:this._flags.mode===T.ObjectLiteral?(ee.text==="{"||ee.text===","||ee.text==="*"&&(oe.text==="{"||oe.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(L);(this._flags.last_token.type===o.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(s(this._last_last_text,["function","yield"])||this._flags.mode===T.ObjectLiteral&&s(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===o.START_BLOCK?this.print_newline():(this._flags.last_token.type===o.END_EXPR||this._flags.last_token.type===o.START_EXPR||this._flags.last_token.type===o.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===o.COMMA)&&this.allow_wrap_or_preserved_newline(L,L.newlines),this.print_token(L),this.set_mode(G),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},B.prototype.handle_end_expr=function(L){for(;this._flags.mode===T.Statement;)this.restore_mode();this.handle_whitespace_and_comments(L),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(L,L.text==="]"&&A(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===o.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(L),this.restore_mode(),F(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===T.Conditional&&(this._previous_flags.mode=T.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},B.prototype.handle_start_block=function(L){this.handle_whitespace_and_comments(L);var G=this._tokens.peek(),ee=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===o.END_EXPR?(this.set_mode(T.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(T.BlockStatement):ee&&(s(ee.text,[":",","])&&s(G.type,[o.STRING,o.WORD,o.RESERVED])||s(G.text,["get","set","..."])&&s(ee.type,[o.WORD,o.RESERVED]))?s(this._last_last_text,["class","interface"])&&!s(ee.text,[":",","])?this.set_mode(T.BlockStatement):this.set_mode(T.ObjectLiteral):this._flags.last_token.type===o.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(T.BlockStatement):s(this._flags.last_token.type,[o.EQUALS,o.START_EXPR,o.COMMA,o.OPERATOR])||D(this._flags.last_token,["return","throw","import","default"])?this.set_mode(T.ObjectLiteral):this.set_mode(T.BlockStatement),this._flags.last_token&&(D(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var oe=!G.comments_before&&G.text==="}",ae=oe&&this._flags.last_word==="function"&&this._flags.last_token.type===o.END_EXPR;if(this._options.brace_preserve_inline){var be=0,_e=null;this._flags.inline_frame=!0;do if(be+=1,_e=this._tokens.peek(be-1),_e.newlines){this._flags.inline_frame=!1;break}while(_e.type!==o.EOF&&!(_e.type===o.END_BLOCK&&_e.opened===L))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&L.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==o.OPERATOR&&(ae||this._flags.last_token.type===o.EQUALS||D(this._flags.last_token,R)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(A(this._previous_flags.mode)&&(this._flags.last_token.type===o.START_EXPR||this._flags.last_token.type===o.COMMA)&&((this._flags.last_token.type===o.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===o.COMMA||this._flags.last_token.type===o.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(L),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==o.OPERATOR&&this._flags.last_token.type!==o.START_EXPR&&(this._flags.last_token.type===o.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(L),this.indent(),!oe&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},B.prototype.handle_end_block=function(L){for(this.handle_whitespace_and_comments(L);this._flags.mode===T.Statement;)this.restore_mode();var G=this._flags.last_token.type===o.START_BLOCK;this._flags.inline_frame&&!G?this._output.space_before_token=!0:this._options.brace_style==="expand"?G||this.print_newline():G||(A(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(L)},B.prototype.handle_word=function(L){if(L.type===o.RESERVED){if(s(L.text,["set","get"])&&this._flags.mode!==T.ObjectLiteral)L.type=o.WORD;else if(L.text==="import"&&s(this._tokens.peek().text,["(","."]))L.type=o.WORD;else if(s(L.text,["as","from"])&&!this._flags.import_block)L.type=o.WORD;else if(this._flags.mode===T.ObjectLiteral){var G=this._tokens.peek();G.text===":"&&(L.type=o.WORD)}}if(this.start_of_statement(L)?D(this._flags.last_token,["var","let","const"])&&L.type===o.WORD&&(this._flags.declaration_statement=!0):L.newlines&&!X(this._flags.mode)&&(this._flags.last_token.type!==o.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==o.EQUALS&&(this._options.preserve_newlines||!D(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(L),this.print_newline()):this.handle_whitespace_and_comments(L),this._flags.do_block&&!this._flags.do_while)if(p(L,"while")){this._output.space_before_token=!0,this.print_token(L),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&p(L,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===T.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&D(L,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(L),this._flags.in_case=!0;return}if((this._flags.last_token.type===o.COMMA||this._flags.last_token.type===o.START_EXPR||this._flags.last_token.type===o.EQUALS||this._flags.last_token.type===o.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(L)),p(L,"function")){(s(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(s(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===o.OPERATOR))&&(!this._output.just_added_blankline()&&!L.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===o.RESERVED||this._flags.last_token.type===o.WORD?D(this._flags.last_token,["get","set","new","export"])||D(this._flags.last_token,U)?this._output.space_before_token=!0:p(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===o.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(X(this._flags.mode)||A(this._flags.mode))||this.print_newline(),this.print_token(L),this._flags.last_word=L.text;return}var ee="NONE";if(this._flags.last_token.type===o.END_BLOCK?this._previous_flags.inline_frame?ee="SPACE":D(L,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&L.newlines?ee="NEWLINE":(ee="SPACE",this._output.space_before_token=!0):ee="NEWLINE":this._flags.last_token.type===o.SEMICOLON&&this._flags.mode===T.BlockStatement?ee="NEWLINE":this._flags.last_token.type===o.SEMICOLON&&X(this._flags.mode)?ee="SPACE":this._flags.last_token.type===o.STRING?ee="NEWLINE":this._flags.last_token.type===o.RESERVED||this._flags.last_token.type===o.WORD||this._flags.last_token.text==="*"&&(s(this._last_last_text,["function","yield"])||this._flags.mode===T.ObjectLiteral&&s(this._last_last_text,["{",","]))?ee="SPACE":this._flags.last_token.type===o.START_BLOCK?this._flags.inline_frame?ee="SPACE":ee="NEWLINE":this._flags.last_token.type===o.END_EXPR&&(this._output.space_before_token=!0,ee="NEWLINE"),D(L,d)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?ee="SPACE":ee="NEWLINE"),D(L,["else","catch","finally"]))if((!(this._flags.last_token.type===o.END_BLOCK&&this._previous_flags.mode===T.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&L.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var oe=this._output.current_line;oe.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else ee==="NEWLINE"?D(this._flags.last_token,R)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&D(L,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==o.END_EXPR?(this._flags.last_token.type!==o.START_EXPR||!D(L,["var","let","const"]))&&this._flags.last_token.text!==":"&&(p(L,"if")&&p(L.previous,"else")?this._output.space_before_token=!0:this.print_newline()):D(L,d)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&A(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():ee==="SPACE"&&(this._output.space_before_token=!0);L.previous&&(L.previous.type===o.WORD||L.previous.type===o.RESERVED)&&(this._output.space_before_token=!0),this.print_token(L),this._flags.last_word=L.text,L.type===o.RESERVED&&(L.text==="do"?this._flags.do_block=!0:L.text==="if"?this._flags.if_block=!0:L.text==="import"?this._flags.import_block=!0:this._flags.import_block&&p(L,"from")&&(this._flags.import_block=!1))},B.prototype.handle_semicolon=function(L){this.start_of_statement(L)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(L);for(var G=this._tokens.peek();this._flags.mode===T.Statement&&!(this._flags.if_block&&p(G,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(L)},B.prototype.handle_string=function(L){L.text.startsWith("`")&&L.newlines===0&&L.whitespace_before===""&&(L.previous.text===")"||this._flags.last_token.type===o.WORD)||(this.start_of_statement(L)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(L),this._flags.last_token.type===o.RESERVED||this._flags.last_token.type===o.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===o.COMMA||this._flags.last_token.type===o.START_EXPR||this._flags.last_token.type===o.EQUALS||this._flags.last_token.type===o.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(L):L.text.startsWith("`")&&this._flags.last_token.type===o.END_EXPR&&(L.previous.text==="]"||L.previous.text===")")&&L.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(L)},B.prototype.handle_equals=function(L){this.start_of_statement(L)||this.handle_whitespace_and_comments(L),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(L),this._output.space_before_token=!0},B.prototype.handle_comma=function(L){this.handle_whitespace_and_comments(L,!0),this.print_token(L),this._output.space_before_token=!0,this._flags.declaration_statement?(X(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(L)):this._flags.mode===T.ObjectLiteral||this._flags.mode===T.Statement&&this._flags.parent.mode===T.ObjectLiteral?(this._flags.mode===T.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(L)},B.prototype.handle_operator=function(L){var G=L.text==="*"&&(D(this._flags.last_token,["function","yield"])||s(this._flags.last_token.type,[o.START_BLOCK,o.COMMA,o.END_BLOCK,o.SEMICOLON])),ee=s(L.text,["-","+"])&&(s(this._flags.last_token.type,[o.START_BLOCK,o.START_EXPR,o.EQUALS,o.OPERATOR])||s(this._flags.last_token.text,d)||this._flags.last_token.text===",");if(!this.start_of_statement(L)){var oe=!G;this.handle_whitespace_and_comments(L,oe)}if(L.text==="*"&&this._flags.last_token.type===o.DOT){this.print_token(L);return}if(L.text==="::"){this.print_token(L);return}if(this._flags.last_token.type===o.OPERATOR&&s(this._options.operator_position,w)&&this.allow_wrap_or_preserved_newline(L),L.text===":"&&this._flags.in_case){this.print_token(L),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==o.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var ae=!0,be=!0,_e=!1;if(L.text===":"?this._flags.ternary_depth===0?ae=!1:(this._flags.ternary_depth-=1,_e=!0):L.text==="?"&&(this._flags.ternary_depth+=1),!ee&&!G&&this._options.preserve_newlines&&s(L.text,u)){var fe=L.text===":",Re=fe&&_e,Oe=fe&&!_e;switch(this._options.operator_position){case x.before_newline:this._output.space_before_token=!Oe,this.print_token(L),(!fe||Re)&&this.allow_wrap_or_preserved_newline(L),this._output.space_before_token=!0;return;case x.after_newline:this._output.space_before_token=!0,!fe||Re?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(L):this._output.space_before_token=!1,this.print_token(L),this._output.space_before_token=!0;return;case x.preserve_newline:Oe||this.allow_wrap_or_preserved_newline(L),ae=!(this._output.just_added_newline()||Oe),this._output.space_before_token=ae,this.print_token(L),this._output.space_before_token=!0;return}}if(G){this.allow_wrap_or_preserved_newline(L),ae=!1;var de=this._tokens.peek();be=de&&s(de.type,[o.WORD,o.RESERVED])}else if(L.text==="...")this.allow_wrap_or_preserved_newline(L),ae=this._flags.last_token.type===o.START_BLOCK,be=!1;else if(s(L.text,["--","++","!","~"])||ee){if((this._flags.last_token.type===o.COMMA||this._flags.last_token.type===o.START_EXPR)&&this.allow_wrap_or_preserved_newline(L),ae=!1,be=!1,L.newlines&&(L.text==="--"||L.text==="++"||L.text==="~")){var te=D(this._flags.last_token,R)&&L.newlines;te&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(te,!0)}this._flags.last_token.text===";"&&X(this._flags.mode)&&(ae=!0),this._flags.last_token.type===o.RESERVED?ae=!0:this._flags.last_token.type===o.END_EXPR?ae=!(this._flags.last_token.text==="]"&&(L.text==="--"||L.text==="++")):this._flags.last_token.type===o.OPERATOR&&(ae=s(L.text,["--","-","++","+"])&&s(this._flags.last_token.text,["--","-","++","+"]),s(L.text,["+","-"])&&s(this._flags.last_token.text,["--","++"])&&(be=!0)),(this._flags.mode===T.BlockStatement&&!this._flags.inline_frame||this._flags.mode===T.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||ae,this.print_token(L),this._output.space_before_token=be},B.prototype.handle_block_comment=function(L,G){if(this._output.raw){this._output.add_raw_token(L),L.directives&&L.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(L.directives){this.print_newline(!1,G),this.print_token(L),L.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!n.newline.test(L.text)&&!L.newlines){this._output.space_before_token=!0,this.print_token(L),this._output.space_before_token=!0;return}else this.print_block_commment(L,G)},B.prototype.print_block_commment=function(L,G){var ee=P(L.text),oe,ae=!1,be=!1,_e=L.whitespace_before,fe=_e.length;if(this.print_newline(!1,G),this.print_token_line_indentation(L),this._output.add_token(ee[0]),this.print_newline(!1,G),ee.length>1){for(ee=ee.slice(1),ae=z(ee,"*"),be=O(ee,_e),ae&&(this._flags.alignment=1),oe=0;oe=0;n--)if(this.__items[n].match(i))return!0;return!1},h.prototype.set_indent=function(i,n){this.is_empty()&&(this.__indent_count=i||0,this.__alignment_count=n||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},h.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},h.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},h.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var i=this.__parent.current_line;return i.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),i.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),i.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,i.__items[0]===" "&&(i.__items.splice(0,1),i.__character_count-=1),!0}return!1},h.prototype.is_empty=function(){return this.__items.length===0},h.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},h.prototype.push=function(i){this.__items.push(i);var n=i.lastIndexOf(` `);n!==-1?this.__character_count=i.length-n:this.__character_count+=i.length},h.prototype.pop=function(){var i=null;return this.is_empty()||(i=this.__items.pop(),this.__character_count-=i.length),i},h.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},h.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},h.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},h.prototype.toString=function(){var i="";return this.is_empty()?this.__parent.indent_empty_lines&&(i=this.__parent.get_indent_string(this.__indent_count)):(i=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),i+=this.__items.join("")),i};function r(i,n){this.__cache=[""],this.__indent_size=i.indent_size,this.__indent_string=i.indent_char,i.indent_with_tabs||(this.__indent_string=new Array(i.indent_size+1).join(i.indent_char)),n=n||"",i.indent_level>0&&(n=new Array(i.indent_level+1).join(this.__indent_string)),this.__base_string=n,this.__base_string_length=n.length}r.prototype.get_indent_size=function(i,n){var l=this.__base_string_length;return n=n||0,i<0&&(l=0),l+=i*this.__indent_size,l+=n,l},r.prototype.get_indent_string=function(i,n){var l=this.__base_string;return n=n||0,i<0&&(i=0,l=""),n+=i*this.__indent_size,this.__ensure_cache(n),l+=this.__cache[n],l},r.prototype.__ensure_cache=function(i){for(;i>=this.__cache.length;)this.__add_column()},r.prototype.__add_column=function(){var i=this.__cache.length,n=0,l="";this.__indent_size&&i>=this.__indent_size&&(n=Math.floor(i/this.__indent_size),i-=n*this.__indent_size,l=new Array(n+1).join(this.__indent_string)),i&&(l+=new Array(i+1).join(" ")),this.__cache.push(l)};function c(i,n){this.__indent_cache=new r(i,n),this.raw=!1,this._end_with_newline=i.end_with_newline,this.indent_size=i.indent_size,this.wrap_line_length=i.wrap_line_length,this.indent_empty_lines=i.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new h(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}c.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},c.prototype.get_line_number=function(){return this.__lines.length},c.prototype.get_indent_string=function(i,n){return this.__indent_cache.get_indent_string(i,n)},c.prototype.get_indent_size=function(i,n){return this.__indent_cache.get_indent_size(i,n)},c.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},c.prototype.add_new_line=function(i){return this.is_empty()||!i&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},c.prototype.get_code=function(i){this.trim(!0);var n=this.current_line.pop();n&&(n[n.length-1]===` `&&(n=n.replace(/\n+$/g,"")),this.current_line.push(n)),this._end_with_newline&&this.__add_outputline();var l=this.__lines.join(` `);return i!==` `&&(l=l.replace(/[\n]/g,i)),l},c.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},c.prototype.set_indent=function(i,n){return i=i||0,n=n||0,this.next_line.set_indent(i,n),this.__lines.length>1?(this.current_line.set_indent(i,n),!0):(this.current_line.set_indent(),!1)},c.prototype.add_raw_token=function(i){for(var n=0;n1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},c.prototype.just_added_newline=function(){return this.current_line.is_empty()},c.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},c.prototype.ensure_empty_line_above=function(i,n){for(var l=this.__lines.length-2;l>=0;){var f=this.__lines[l];if(f.is_empty())break;if(f.item(0).indexOf(i)!==0&&f.item(-1)!==n){this.__lines.splice(l+1,0,new h(this)),this.previous_line=this.__lines[this.__lines.length-2];break}l--}},e.exports.Output=c},function(e){function h(r,c,i,n){this.type=r,this.text=c,this.comments_before=null,this.newlines=i||0,this.whitespace_before=n||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}e.exports.Token=h},function(e,h){var r="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",c="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",i="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",n="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",l="(?:\\\\u[0-9a-fA-F]{4}|["+r+i+"])",f="(?:\\\\u[0-9a-fA-F]{4}|["+c+i+n+"])*";h.identifier=new RegExp(l+f,"g"),h.identifierStart=new RegExp(l),h.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+c+i+n+"])+");var d=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;h.newline=/[\n\r\u2028\u2029]/,h.lineBreak=new RegExp(`\r |`+h.newline.source),h.allLineBreaks=new RegExp(h.lineBreak.source,"g")},function(e,h,r){var c=r(6).Options,i=["before-newline","after-newline","preserve-newline"];function n(l){c.call(this,l,"js");var f=this.raw_options.brace_style||null;f==="expand-strict"?this.raw_options.brace_style="expand":f==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var d=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var u=0;u>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),y=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";y=y.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),y="\\?\\.(?!\\d) "+y,y=y.replace(/ /g,"|");var x=new RegExp(y),w="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),T=w.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),F=new RegExp("^(?:"+T.join("|")+")$"),P,A=function(z,O){i.call(this,z,O),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var B=new d(this._input),U=new u(this._input).read_options(this._options);this.__patterns={template:U,identifier:U.starting_with(f.identifier).matching(f.identifierMatch),number:B.matching(b),punct:B.matching(x),comment:B.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:B.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:B.matching(//),include:B.starting_with(/#include/).until_after(f.lineBreak),shebang:B.starting_with(/#!/).until_after(f.lineBreak),xml:B.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:U.until(/['\\\n\r\u2028\u2029]/),double_quote:U.until(/["\\\n\r\u2028\u2029]/),template_text:U.until(/[`\\$]/),template_expression:U.until(/[`}\\]/)}};A.prototype=new i,A.prototype._is_comment=function(z){return z.type===s.COMMENT||z.type===s.BLOCK_COMMENT||z.type===s.UNKNOWN},A.prototype._is_opening=function(z){return z.type===s.START_BLOCK||z.type===s.START_EXPR},A.prototype._is_closing=function(z,O){return(z.type===s.END_BLOCK||z.type===s.END_EXPR)&&O&&(z.text==="]"&&O.text==="["||z.text===")"&&O.text==="("||z.text==="}"&&O.text==="{")},A.prototype._reset=function(){P=!1},A.prototype._get_next_token=function(z,O){var B=null;this._readWhitespace();var U=this._input.peek();return U===null?this._create_token(s.EOF,""):(B=B||this._read_non_javascript(U),B=B||this._read_string(U),B=B||this._read_word(z),B=B||this._read_singles(U),B=B||this._read_comment(U),B=B||this._read_regexp(U,z),B=B||this._read_xml(U,z),B=B||this._read_punctuation(),B=B||this._create_token(s.UNKNOWN,this._input.next()),B)},A.prototype._read_word=function(z){var O;if(O=this.__patterns.identifier.read(),O!=="")return O=O.replace(f.allLineBreaks,` `),!(z.type===s.DOT||z.type===s.RESERVED&&(z.text==="set"||z.text==="get"))&&F.test(O)?(O==="in"||O==="of")&&(z.type===s.WORD||z.type===s.STRING)?this._create_token(s.OPERATOR,O):this._create_token(s.RESERVED,O):this._create_token(s.WORD,O);if(O=this.__patterns.number.read(),O!=="")return this._create_token(s.WORD,O)},A.prototype._read_singles=function(z){var O=null;return z==="("||z==="["?O=this._create_token(s.START_EXPR,z):z===")"||z==="]"?O=this._create_token(s.END_EXPR,z):z==="{"?O=this._create_token(s.START_BLOCK,z):z==="}"?O=this._create_token(s.END_BLOCK,z):z===";"?O=this._create_token(s.SEMICOLON,z):z==="."&&D.test(this._input.peek(1))?O=this._create_token(s.DOT,z):z===","&&(O=this._create_token(s.COMMA,z)),O&&this._input.next(),O},A.prototype._read_punctuation=function(){var z=this.__patterns.punct.read();if(z!=="")return z==="="?this._create_token(s.EQUALS,z):z==="?."?this._create_token(s.DOT,z):this._create_token(s.OPERATOR,z)},A.prototype._read_non_javascript=function(z){var O="";if(z==="#"){if(this._is_first_token()&&(O=this.__patterns.shebang.read(),O))return this._create_token(s.UNKNOWN,O.trim()+` `);if(O=this.__patterns.include.read(),O)return this._create_token(s.UNKNOWN,O.trim()+` `);z=this._input.next();var B="#";if(this._input.hasNext()&&this._input.testChar(p)){do z=this._input.next(),B+=z;while(this._input.hasNext()&&z!=="#"&&z!=="=");return z==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(B+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(B+="{}",this._input.next(),this._input.next())),this._create_token(s.WORD,B)}this._input.back()}else if(z==="<"&&this._is_first_token()){if(O=this.__patterns.html_comment_start.read(),O){for(;this._input.hasNext()&&!this._input.testChar(f.newline);)O+=this._input.next();return P=!0,this._create_token(s.COMMENT,O)}}else if(P&&z==="-"&&(O=this.__patterns.html_comment_end.read(),O))return P=!1,this._create_token(s.COMMENT,O);return null},A.prototype._read_comment=function(z){var O=null;if(z==="/"){var B="";if(this._input.peek(1)==="*"){B=this.__patterns.block_comment.read();var U=E.get_directives(B);U&&U.ignore==="start"&&(B+=E.readIgnored(this._input)),B=B.replace(f.allLineBreaks,` `),O=this._create_token(s.BLOCK_COMMENT,B),O.directives=U}else this._input.peek(1)==="/"&&(B=this.__patterns.comment.read(),O=this._create_token(s.COMMENT,B))}return O},A.prototype._read_string=function(z){if(z==="`"||z==="'"||z==='"'){var O=this._input.next();return this.has_char_escapes=!1,z==="`"?O+=this._read_string_recursive("`",!0,"${"):O+=this._read_string_recursive(z),this.has_char_escapes&&this._options.unescape_strings&&(O=X(O)),this._input.peek()===z&&(O+=this._input.next()),O=O.replace(f.allLineBreaks,` `),this._create_token(s.STRING,O)}return null},A.prototype._allow_regexp_or_xml=function(z){return z.type===s.RESERVED&&o(z.text,["return","case","throw","else","do","typeof","yield"])||z.type===s.END_EXPR&&z.text===")"&&z.opened.previous.type===s.RESERVED&&o(z.opened.previous.text,["if","while","for"])||o(z.type,[s.COMMENT,s.START_EXPR,s.START_BLOCK,s.START,s.END_BLOCK,s.OPERATOR,s.EQUALS,s.EOF,s.SEMICOLON,s.COMMA])},A.prototype._read_regexp=function(z,O){if(z==="/"&&this._allow_regexp_or_xml(O)){for(var B=this._input.next(),U=!1,L=!1;this._input.hasNext()&&(U||L||this._input.peek()!==z)&&!this._input.testChar(f.newline);)B+=this._input.peek(),U?U=!1:(U=this._input.peek()==="\\",this._input.peek()==="["?L=!0:this._input.peek()==="]"&&(L=!1)),this._input.next();return this._input.peek()===z&&(B+=this._input.next(),B+=this._input.read(f.identifier)),this._create_token(s.STRING,B)}return null},A.prototype._read_xml=function(z,O){if(this._options.e4x&&z==="<"&&this._allow_regexp_or_xml(O)){var B="",U=this.__patterns.xml.read_match();if(U){for(var L=U[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),G=L.indexOf("{")===0,ee=0;U;){var oe=!!U[1],ae=U[2],be=!!U[U.length-1]||ae.slice(0,8)==="![CDATA[";if(!be&&(ae===L||G&&ae.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(oe?--ee:++ee),B+=U[0],ee<=0)break;U=this.__patterns.xml.read_match()}return U||(B+=this._input.match(/[\s\S]*/g)[0]),B=B.replace(f.allLineBreaks,` `),this._create_token(s.STRING,B)}}return null};function X(z){for(var O="",B=0,U=new c(z),L=null;U.hasNext();)if(L=U.match(/([\s]|[^\\]|\\\\)+/g),L&&(O+=L[0]),U.peek()==="\\"){if(U.next(),U.peek()==="x")L=U.match(/x([0-9A-Fa-f]{2})/g);else if(U.peek()==="u")L=U.match(/u([0-9A-Fa-f]{4})/g);else{O+="\\",U.hasNext()&&(O+=U.next());continue}if(!L)return z;if(B=parseInt(L[1],16),B>126&&B<=255&&L[0].indexOf("x")===0)return z;if(B>=0&&B<32){O+="\\"+L[0];continue}else B===34||B===39||B===92?O+="\\"+String.fromCharCode(B):O+=String.fromCharCode(B)}return O}A.prototype._read_string_recursive=function(z,O,B){var U,L;z==="'"?L=this.__patterns.single_quote:z==='"'?L=this.__patterns.double_quote:z==="`"?L=this.__patterns.template_text:z==="}"&&(L=this.__patterns.template_expression);for(var G=L.read(),ee="";this._input.hasNext();){if(ee=this._input.next(),ee===z||!O&&f.newline.test(ee)){this._input.back();break}else ee==="\\"&&this._input.hasNext()?(U=this._input.peek(),U==="x"||U==="u"?this.has_char_escapes=!0:U==="\r"&&this._input.peek(1)===` `&&this._input.next(),ee+=this._input.next()):B&&(B==="${"&&ee==="$"&&this._input.peek()==="{"&&(ee+=this._input.next()),B===ee&&(z==="`"?ee+=this._read_string_recursive("}",O,"`"):ee+=this._read_string_recursive("`",O,"${"),this._input.hasNext()&&(ee+=this._input.next())));ee+=L.read(),G+=ee}return G},e.exports.Tokenizer=A,e.exports.TOKEN=s,e.exports.positionable_operators=R.slice(),e.exports.line_starters=w.slice()},function(e){var h=RegExp.prototype.hasOwnProperty("sticky");function r(c){this.__input=c||"",this.__input_length=this.__input.length,this.__position=0}r.prototype.restart=function(){this.__position=0},r.prototype.back=function(){this.__position>0&&(this.__position-=1)},r.prototype.hasNext=function(){return this.__position=0&&c=0&&i=c.length&&this.__input.substring(i-c.length,i).toLowerCase()===c},e.exports.InputScanner=r},function(e,h,r){var c=r(8).InputScanner,i=r(3).Token,n=r(10).TokenStream,l=r(11).WhitespacePattern,f={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},d=function(u,o){this._input=new c(u),this._options=o||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new l(this._input)};d.prototype.tokenize=function(){this._input.restart(),this.__tokens=new n,this._reset();for(var u,o=new i(f.START,""),s=null,E=[],b=new n;o.type!==f.EOF;){for(u=this._get_next_token(o,s);this._is_comment(u);)b.add(u),u=this._get_next_token(o,s);b.isEmpty()||(u.comments_before=b,b=new n),u.parent=s,this._is_opening(u)?(E.push(s),s=u):s&&this._is_closing(u,s)&&(u.opened=s,s.closed=u,s=E.pop(),u.parent=s),u.previous=o,o.next=u,this.__tokens.add(u),o=u}return this.__tokens},d.prototype._is_first_token=function(){return this.__tokens.isEmpty()},d.prototype._reset=function(){},d.prototype._get_next_token=function(u,o){this._readWhitespace();var s=this._input.read(/.+/g);return s?this._create_token(f.RAW,s):this._create_token(f.EOF,"")},d.prototype._is_comment=function(u){return!1},d.prototype._is_opening=function(u){return!1},d.prototype._is_closing=function(u,o){return!1},d.prototype._create_token=function(u,o){var s=new i(u,o,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return s},d.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},e.exports.Tokenizer=d,e.exports.TOKEN=f},function(e){function h(r){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=r}h.prototype.restart=function(){this.__position=0},h.prototype.isEmpty=function(){return this.__tokens_length===0},h.prototype.hasNext=function(){return this.__position=0&&r/),erb:d.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:d.starting_with(/{%/).until_after(/%}/),django_value:d.starting_with(/{{/).until_after(/}}/),django_comment:d.starting_with(/{#/).until_after(/#}/),smarty:d.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:d.starting_with(/{\*/).until_after(/\*}/),smarty_literal:d.starting_with(/{literal}/).until_after(/{\/literal}/)}}n.prototype=new c,n.prototype._create=function(){return new n(this._input,this)},n.prototype._update=function(){this.__set_templated_pattern()},n.prototype.disable=function(l){var f=this._create();return f._disabled[l]=!0,f._update(),f},n.prototype.read_options=function(l){var f=this._create();for(var d in i)f._disabled[d]=l.templating.indexOf(d)===-1;return f._update(),f},n.prototype.exclude=function(l){var f=this._create();return f._excluded[l]=!0,f._update(),f},n.prototype.read=function(){var l="";this._match_pattern?l=this._input.read(this._starting_pattern):l=this._input.read(this._starting_pattern,this.__template_pattern);for(var f=this._read_template();f;)this._match_pattern?f+=this._input.read(this._match_pattern):f+=this._input.readUntil(this.__template_pattern),l+=f,f=this._read_template();return this._until_after&&(l+=this._input.readUntilAfter(this._until_pattern)),l},n.prototype.__set_templated_pattern=function(){var l=[];this._disabled.php||l.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||l.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||l.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(l.push(this.__patterns.django._starting_pattern.source),l.push(this.__patterns.django_value._starting_pattern.source),l.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||l.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&l.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+l.join("|")+")")},n.prototype._read_template=function(){var l="",f=this._input.peek();if(f==="<"){var d=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&d==="?"&&(l=l||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&d==="%"&&(l=l||this.__patterns.erb.read())}else f==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(l=l||this.__patterns.handlebars_comment.read(),l=l||this.__patterns.handlebars_unescaped.read(),l=l||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(l=l||this.__patterns.django_value.read()),this._excluded.django||(l=l||this.__patterns.django_comment.read(),l=l||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(l=l||this.__patterns.smarty_comment.read(),l=l||this.__patterns.smarty_literal.read(),l=l||this.__patterns.smarty.read()));return l},e.exports.TemplatablePattern=n}],m={};function C(e){var h=m[e];if(h!==void 0)return h.exports;var r=m[e]={exports:{}};return v[e](r,r.exports,C),r.exports}var _=C(0);S=_})();var k=S;!(N=[],g=function(){return{js_beautify:k}}.apply(Z,N),g!==void 0&&(H.exports=g))})()},"6eGT":function(H,Z,I){"use strict";function N(g){return null}Z.a=N},"746U":function(H,Z,I){"use strict";I.d(Z,"f",function(){return N}),I.d(Z,"l",function(){return g}),I.d(Z,"k",function(){return S}),I.d(Z,"j",function(){return k}),I.d(Z,"g",function(){return v}),I.d(Z,"m",function(){return m}),I.d(Z,"h",function(){return C}),I.d(Z,"n",function(){return _}),I.d(Z,"c",function(){return e}),I.d(Z,"a",function(){return h}),I.d(Z,"i",function(){return r}),I.d(Z,"o",function(){return c}),I.d(Z,"e",function(){return l}),I.d(Z,"d",function(){return f}),I.d(Z,"p",function(){return d}),I.d(Z,"b",function(){return u});function N(o){return Array.isArray(o)}function g(o){return typeof o=="string"}function S(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)&&!(o instanceof RegExp)&&!(o instanceof Date)}function k(o){return typeof o=="number"&&!isNaN(o)}function v(o){return o===!0||o===!1}function m(o){return typeof o=="undefined"}function C(o){return!_(o)}function _(o){return m(o)||o===null}function e(o,s){if(!o)throw new Error(s?`Unexpected type, expected '${s}'`:"Unexpected type")}function h(o){if(_(o))throw new Error("Assertion Failed: argument is undefined or null");return o}function r(o){return typeof o=="function"}function c(o,s){const E=Math.min(o.length,s.length);for(let b=0;bfunction(){const D=Array.prototype.slice.call(arguments,0);return s(p,D)};let b={};for(const p of o)b[p]=E(p);return b}function d(o){return o===null?void 0:o}function u(o,s="Unreachable"){throw new Error(s)}},"7Cbv":function(H,Z,I){"use strict";var N=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),g=new Uint8Array(16);function S(){if(!N)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return N(g)}var k=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function v(i){return typeof i=="string"&&k.test(i)}for(var m=v,C=[],_=0;_<256;++_)C.push((_+256).toString(16).substr(1));function e(i){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,l=(C[i[n+0]]+C[i[n+1]]+C[i[n+2]]+C[i[n+3]]+"-"+C[i[n+4]]+C[i[n+5]]+"-"+C[i[n+6]]+C[i[n+7]]+"-"+C[i[n+8]]+C[i[n+9]]+"-"+C[i[n+10]]+C[i[n+11]]+C[i[n+12]]+C[i[n+13]]+C[i[n+14]]+C[i[n+15]]).toLowerCase();if(!m(l))throw TypeError("Stringified UUID is invalid");return l}var h=e;function r(i,n,l){i=i||{};var f=i.random||(i.rng||S)();if(f[6]=f[6]&15|64,f[8]=f[8]&63|128,n){l=l||0;for(var d=0;d<16;++d)n[l+d]=f[d];return n}return h(f)}var c=Z.a=r},"7ahc":function(H,Z,I){"use strict";I.d(Z,"a",function(){return E});var N=I("k1fw"),g=I("0Owb"),S=I("+L6B"),k=I("2/Rp"),v=I("y8nQ"),m=I("Vl3Y"),C=I("tJVT"),_=I("OaEy"),e=I("2fM7"),h=I("q1tI"),r=I.n(h),c=I("VrN/"),i=I.n(c),n=I("p77/"),l=I.n(n),f=I("c5Ni"),d=I.n(f),u=e.a.Option,o={labelCol:{span:4},wrapperCol:{span:20}},s={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};Z.b=function(b){var p=b.callback,D=b.onCancel,R=Object(h.useState)("python"),y=Object(C.a)(R,2),x=y[0],w=y[1];function T(P){w(s[P][1])}function F(P){p(P)}return r.a.createElement(m.a,Object(g.a)({},o,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:F}),r.a.createElement(m.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},r.a.createElement(e.a,{onChange:T},Object.keys(s).map(function(P){return r.a.createElement(u,{key:P,value:P},s[P][0])}))),r.a.createElement(m.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},r.a.createElement(E,{mode:x})),r.a.createElement("div",{className:"flex-container flex-end"},r.a.createElement(k.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),r.a.createElement(k.a,{type:"ghost",onClick:D},"\u53D6\u6D88")))};function E(b){var p=b.value,D=b.onChange,R=b.mode,y=b.options,x=y===void 0?{}:y,w=Object(h.useRef)(),T=Object(h.useState)(),F=Object(C.a)(T,2),P=F[0],A=F[1];return Object(h.useEffect)(function(){if(P){function X(z){var O=z.getValue();D&&D(O)}return P.on("change",X),function(){P.off("change",X)}}},[P,D]),Object(h.useEffect)(function(){P&&P.setOption("mode",R)},[P,R]),Object(h.useEffect)(function(){P&&((p!==P.getValue()||p==="")&&setTimeout(function(){P.setValue(p||" ")},300))},[P,p]),Object(h.useEffect)(function(){if(w.current&&!P){var X=i.a.fromTextArea(w.current,Object(N.a)({mode:R,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},x));A(X)}},[w.current,P]),r.a.createElement("div",{className:"my-codemirror-container"},r.a.createElement("textarea",{ref:w}))}},"815F":function(H,Z,I){"use strict";I.d(Z,"e",function(){return C}),I.d(Z,"c",function(){return e}),I.d(Z,"d",function(){return h}),I.d(Z,"a",function(){return c}),I.d(Z,"f",function(){return i}),I.d(Z,"b",function(){return n});var N=I("KQm4"),g=I("VTBJ"),S=I("Ff2n"),k=I("Zm9Q"),v=I("Kwbf"),m=I("OZM5");function C(l,f){return l!=null?l:f}function _(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],f=new Map;function d(u){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(u||[]).forEach(function(s){var E=s.key,b=s.children;Object(v.a)(E!=null,"Tree node must have a certain key: [".concat(o).concat(E,"]"));var p=String(E);Object(v.a)(!f.has(p)||E===null||E===void 0,"Same 'key' exist in the Tree: ".concat(p)),f.set(p,!0),d(b,"".concat(o).concat(p," > "))})}d(l)}function e(l){function f(d){var u=Object(k.a)(d);return u.map(function(o){if(!Object(m.i)(o))return Object(v.a)(!o,"Tree/TreeNode can only accept TreeNode as children."),null;var s=o.key,E=o.props,b=E.children,p=Object(S.a)(E,["children"]),D=Object(g.a)({key:s},p),R=f(b);return R.length&&(D.children=R),D}).filter(function(o){return o})}return f(l)}function h(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],d=new Set(f===!0?[]:f),u=[];function o(s){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return s.map(function(b,p){var D=Object(m.h)(E?E.pos:"0",p),R=C(b.key,D),y=Object(g.a)(Object(g.a)({},b),{},{parent:E,pos:D,children:null,data:b,isStart:[].concat(Object(N.a)(E?E.isStart:[]),[p===0]),isEnd:[].concat(Object(N.a)(E?E.isEnd:[]),[p===s.length-1])});return u.push(y),f===!0||d.has(R)?y.children=o(b.children||[],y):y.children=[],y})}return o(l),u}function r(l,f,d){var u;d?typeof d=="string"?u=function(E){return E[d]}:typeof d=="function"&&(u=function(E){return d(E)}):u=function(E,b){return C(E.key,b)};function o(s,E,b){var p=s?s.children:l,D=s?Object(m.h)(b.pos,E):"0";if(s){var R=u(s,D),y={node:s,index:E,pos:D,key:R,parentPos:b.node?b.pos:null,level:b.level+1};f(y)}p&&p.forEach(function(x,w){o(x,w,{node:s,pos:D,level:b?b.level+1:-1})})}o(null)}function c(l){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d=f.initWrapper,u=f.processEntity,o=f.onProcessFinished,s=arguments.length>2?arguments[2]:void 0,E={},b={},p={posEntities:E,keyEntities:b};return d&&(p=d(p)||p),r(l,function(D){var R=D.node,y=D.index,x=D.pos,w=D.key,T=D.parentPos,F=D.level,P={node:R,index:y,key:w,pos:x,level:F},A=C(w,x);E[x]=P,b[A]=P,P.parent=E[T],P.parent&&(P.parent.children=P.parent.children||[],P.parent.children.push(P)),u&&u(P,p)},s),o&&o(p),p}function i(l,f){var d=f.expandedKeys,u=f.selectedKeys,o=f.loadedKeys,s=f.loadingKeys,E=f.checkedKeys,b=f.halfCheckedKeys,p=f.dragOverNodeKey,D=f.dropPosition,R=f.keyEntities,y=R[l],x={eventKey:l,expanded:d.indexOf(l)!==-1,selected:u.indexOf(l)!==-1,loaded:o.indexOf(l)!==-1,loading:s.indexOf(l)!==-1,checked:E.indexOf(l)!==-1,halfChecked:b.indexOf(l)!==-1,pos:String(y?y.pos:""),dragOver:p===l&&D===0,dragOverGapTop:p===l&&D===-1,dragOverGapBottom:p===l&&D===1};return x}function n(l){var f=l.data,d=l.expanded,u=l.selected,o=l.checked,s=l.loaded,E=l.loading,b=l.halfChecked,p=l.dragOver,D=l.dragOverGapTop,R=l.dragOverGapBottom,y=l.pos,x=l.active,w=Object(g.a)(Object(g.a)({},f),{},{expanded:d,selected:u,checked:o,loaded:s,loading:E,halfChecked:b,dragOver:p,dragOverGapTop:D,dragOverGapBottom:R,pos:y,active:x});return"props"in w||Object.defineProperty(w,"props",{get:function(){return Object(v.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),l}}),w}},"8EBN":function(H,Z,I){(function(N){N(I("VrN/"))})(function(N){"use strict";N.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var g=0;g-1&&k.substring(C+1,k.length);if(_)return N.findModeByExtension(_)},N.findModeByName=function(k){k=k.toLowerCase();for(var v=0;v=me.length?Ce.slice(me.length):Ce}).join(` `)}var d=[],u=["
    "],o=new n.a.Renderer,s=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function E(){d.length=0,u=["
      "]}var b={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function p(ye,ue,he,me){if(ue>=ye.length||ye[ue].level<=he)return ue;var Ce=ye[ue];me.push("
    • "+Ce.text+""),ue++;var ge=[];return ue=p(ye,ue,Ce.level,ge),ge.length>0&&(me.push("
        "),ge.forEach(function(Ee){me.push(Ee)}),me.push("
      ")),me.push("
    • "),ue=p(ye,ue,he,me),ue}function D(){return p(d,0,0,u),u.push("
    "),u.join("")}var R={heading:function(ue){var he=s.exec(ue);if(he)return{type:"heading",raw:he[0],depth:he[1].length,text:he[2]}},fences:function(ue){var he=this.rules.block.fences.exec(ue);if(he){var me=he[0],Ce=f(me,he[3]||""),ge=he[2]?he[2].trim():he[2];if(["latex","katex","math"].indexOf(ge)>=0){var Ee=w(),Ae=Ce;Ce=Ee,T[Ee]={type:"block",expression:Ae}}return{type:"code",raw:me,lang:ge,text:Ce}}}},y=/(?:\${2})([^\n`]+?)(?:\${2})/gi,x=0,w=function(){return"__special_katext_id_".concat(x++,"__")},T={};function F(){return T}function P(){x=0,T={}}function A(ye){return ye=ye.replace(y,function(ue,he){var me=w();return T[me]={type:"inline",expression:he},me}),ye}var X=o.listitem;o.listitem=function(ye){return X(A(ye))};var z=o.paragraph;o.paragraph=function(ye){return z(A(ye))};var O=o.tablecell;o.tablecell=function(ye,ue){return O(A(ye),ue)},o.code=function(ye,ue,he){var me=(ue||"").match(/\S*/)[0];return me?["latex","katex","math"].indexOf(me)>=0?"

    ".concat(ye,"

    "):'
    ').concat(he?ye:Object(l.escape)(ye,!0),`
    `):'
    '+(he?ye:Object(l.escape)(ye,!0))+"
    "},o.heading=function(ye,ue,he){var me=this.options.headerPrefix+he.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return d.push({anchor:me,level:ue,text:ye}),"'+ye+""},n.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),n.a.use({tokenizer:R,renderer:o});var B=n.a,U=I("SJMd"),L=I("ulZh"),G=I.n(L),ee=I("m3rI"),oe=I("Oy/b"),ae=I("p5ED"),be=I("ErOA"),_e=I("STEk");/* ********************************** cropro version 1.2.0 @license SEE LICENSE IN LICENSE copyright Alan Mendelevich see README and LICENSE for details ********************************** *//*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var fe=function(ye,ue){return(fe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(he,me){he.__proto__=me}||function(he,me){for(var Ce in me)Object.prototype.hasOwnProperty.call(me,Ce)&&(he[Ce]=me[Ce])})(ye,ue)};function Re(ye,ue){if(typeof ue!="function"&&ue!==null)throw new TypeError("Class extends value "+String(ue)+" is not a constructor or null");function he(){this.constructor=ye}fe(ye,ue),ye.prototype=ue===null?Object.create(ue):(he.prototype=ue.prototype,new he)}function Oe(ye,ue,he,me){return new(he||(he=Promise))(function(Ce,ge){function Ee(Me){try{De(me.next(Me))}catch(He){ge(He)}}function Ae(Me){try{De(me.throw(Me))}catch(He){ge(He)}}function De(Me){var He;Me.done?Ce(Me.value):(He=Me.value,He instanceof he?He:new he(function(nt){nt(He)})).then(Ee,Ae)}De((me=me.apply(ye,ue||[])).next())})}function de(ye,ue){var he,me,Ce,ge,Ee={label:0,sent:function(){if(1&Ce[0])throw Ce[1];return Ce[1]},trys:[],ops:[]};return ge={next:Ae(0),throw:Ae(1),return:Ae(2)},typeof Symbol=="function"&&(ge[Symbol.iterator]=function(){return this}),ge;function Ae(De){return function(Me){return function(He){if(he)throw new TypeError("Generator is already executing.");for(;Ee;)try{if(he=1,me&&(Ce=2&He[0]?me.return:He[0]?me.throw||((Ce=me.return)&&Ce.call(me),0):me.next)&&!(Ce=Ce.call(me,He[1])).done)return Ce;switch(me=0,Ce&&(He=[2&He[0],Ce.value]),He[0]){case 0:case 1:Ce=He;break;case 4:return Ee.label++,{value:He[1],done:!1};case 5:Ee.label++,me=He[1],He=[0];continue;case 7:He=Ee.ops.pop(),Ee.trys.pop();continue;default:if(!(Ce=Ee.trys,(Ce=Ce.length>0&&Ce[Ce.length-1])||He[0]!==6&&He[0]!==2)){Ee=0;continue}if(He[0]===3&&(!Ce||He[1]>Ce[0]&&He[1]0&&he>0){var me=new le(ue,he),Ce=me.ratio>=1?20:me.getHorizontalLength(20),ge=me.ratio<1?20:me.getVerticalLength(20),Ee=document.createElementNS("http://www.w3.org/2000/svg","svg");Ee.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ee.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(Ee);var Ae=W.createDefs();Ee.appendChild(Ae);var De=W.createElement("clipPath",[["id","text-bg-clip"]]);Ae.appendChild(De);var Me=W.createPath(W.getHollowRectanglePath((24-Ce)/2,(24-ge)/2,Ce,ge,(24-Ce)/2+2,(24-ge)/2+2,Ce-4,ge-4));Ee.appendChild(Me);var He=W.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);He.appendChild(W.createTSpan(ue+":"+he)),Ee.appendChild(He);var nt=He.getBBox();W.setAttributes(He,[["x",((24-nt.width)/2).toString()],["y",((24-nt.height)/2-nt.y).toString()]]);var at=W.createPath(W.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(nt.width))/2,(24-Math.ceil(nt.height))/2,Math.ceil(nt.width),Math.ceil(nt.height)));return De.appendChild(at),W.setAttributes(Me,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Ee),Ee.outerHTML}return''},ye}(),we=function(ye){function ue(he,me,Ce){var ge=ye.call(this,he,me)||this;return ge.isDropdownOpen=!1,ge.onClick=ge.dropdownButtonClicked,ge.dropdownButtons=Ce,ge}return Re(ue,ye),ue.prototype.setupDropdown=function(){var he=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(me){me.className=he.className,me.colorsClassName=he.colorsClassName,he.dropdownBlock.appendChild(me.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},ue.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},ue.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},ue.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},ue.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},ue.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},ue}(J),Fe=function(){function ye(ue,he){this.GRIP_SIZE=10,this.color=ue,this.fillColor=he,this.visual=W.createGroup(),this.visual.appendChild(W.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(W.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ye.prototype.ownsTarget=function(ue){return ue===this.visual||ue===this.visual.childNodes[0]||ue===this.visual.childNodes[1]},ye.prototype.setCenter=function(ue,he){this.visual.childNodes.forEach(function(me){return W.setAttributes(me,[["cx",ue.toString()],["cy",he.toString()]])})},ye}(),Xe=function(){function ye(ue,he,me,Ce){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=ue,this.canvasHeight=he,this.margin=me,this.container=Ce,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(ye.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(ue){this._aspectRatio=ue,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(ue){this._isGridVisible=ue,this.gridContainer&&W.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(ue){this._zoomFactor=ue,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),ye.prototype.open=function(){var ue=this;this.cropShadeElement=W.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=W.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var he=0;hethis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-he.height/2),W.setAttributes(this.cropRectElement,[["x",he.x.toString()],["y",he.y.toString()],["width",he.width.toString()],["height",he.height.toString()]]);var me=he.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(ge,Ee){var Ae=he.y+me*(Ee+1);W.setAttributes(ge,[["x1",""+he.x],["y1",""+Ae],["x2",""+(he.x+he.width)],["y2",""+Ae]])});var Ce=he.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(ge,Ee){var Ae=he.x+Ce*(Ee+1);W.setAttributes(ge,[["x1",""+Ae],["y1",""+he.y],["x2",""+Ae],["y2",""+(he.y+he.height)]])}),W.setAttributes(this.cropShadeElement,[["d",W.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,he.x,he.y,he.width,he.height)]]),this.topLeftGrip.setCenter(he.x,he.y),this.topRightGrip.setCenter(he.x+he.width,he.y),this.bottomLeftGrip.setCenter(he.x,he.y+he.height),this.bottomRightGrip.setCenter(he.x+he.width,he.y+he.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},ye.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},ye.prototype.clientToLocalCoordinates=function(ue,he){var me=this.container.getBoundingClientRect();return{x:ue-me.left+this.margin,y:he-me.top+this.margin}},ye.prototype.onPointerDown=function(ue){this.container.setPointerCapture(ue.pointerId),this.previousPoint=this.clientToLocalCoordinates(ue.clientX,ue.clientY),this.cropRectElement===ue.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(ue.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(ue.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(ue.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(ue.target)&&(this.activeGrip=this.bottomRightGrip)},ye.prototype.onPointerMove=function(ue){if(this.isMoving)this.move(this.clientToLocalCoordinates(ue.clientX,ue.clientY));else if(this.activeGrip){var he=this.clientToLocalCoordinates(ue.clientX,ue.clientY);this.resize(he)}ue.preventDefault()},ye.prototype.onPointerUp=function(ue){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(ue.pointerId)},ye.prototype.move=function(ue){var he=ue.x-this.previousPoint.x,me=ue.y-this.previousPoint.y;this.zoomFactor!==1&&(he=-he/this.zoomFactor,me=-me/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+he),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+me),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=ue},ye.prototype.resize=function(ue){var he=Object.assign({},this.cropRect),me=ue.x-this.previousPoint.x,Ce=ue.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:he.x+methis.canvasWidth*this.zoomFactor&&(me=this.canvasWidth*this.zoomFactor-he.width),he.width+=me}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(he.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(me),he.height=this.aspectRatio.getVerticalLength(he.width)):(he.y+=Ce,he.height=this.cropRect.y+this.cropRect.height-he.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?he.height=this.aspectRatio.getVerticalLength(he.width):he.height+=Ce}he.width<10&&(he.x=this.cropRect.x,he.width=10),he.height<10&&(he.y=this.cropRect.y,he.height=10),this.previousPoint=ue,he.x>=this.margin&&he.y>=this.margin&&he.x-this.margin+he.width<=this.canvasWidth&&he.y-this.margin+he.height<=this.canvasHeight&&(this.cropRect=he,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},ye.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var ue=this.cropRect.x+this.cropRect.width/2,he=this.cropRect.y+this.cropRect.height/2,me=this.aspectRatio.getHorizontalLength(this.cropRect.height),Ce=this.aspectRatio.getVerticalLength(this.cropRect.width);me/this.canvasWidththis.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=ue-this.cropRect.width/2,this.cropRect.y=he-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},ye.prototype.getRescaledRect=function(ue,he,me,Ce,ge,Ee){var Ae=me/ue,De=Ce/he;return{x:(ge.x-Ee)*Ae+Ee,y:(ge.y-Ee)*De+Ee,width:ge.width*Ae,height:ge.height*De}},ye.prototype.scaleCanvas=function(ue,he){var me=this.getRescaledRect(this.canvasWidth,this.canvasHeight,ue,he,this.cropRect,this.margin);this.canvasWidth=ue,this.canvasHeight=he,this.onCropChange&&this.onCropChange(me),this.setCropRectangle(me)},ye}(),$e=function(){function ye(ue){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=ue,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(ye.prototype,"angle",{get:function(){return this._angle},set:function(ue){this._angle=ue,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),ye.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},ye.prototype.onPointerDown=function(ue){this.controlContainer.setPointerCapture(ue.pointerId),this.isDragging=!0,this.previousPoint={x:ue.clientX,y:ue.clientY}},ye.prototype.onPointerMove=function(ue){this.isDragging&&(this.onAngleChange&&this.onAngleChange((ue.clientX-this.previousPoint.x)/5),this.previousPoint.x=ue.clientX)},ye.prototype.onPointerUp=function(ue){this.isDragging&&this.onAngleChange&&this.onAngleChange((ue.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(ue.pointerId)},ye.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var ue=this.angleLabelText.getBBox();W.setAttributes(this.angleLabelElement,[["x",((this.width-ue.width)/2).toString()],["y",(this.height/2).toString()]])}},ye.prototype.positionScaleShape=function(){if(this.scaleShape){var ue=this.scaleShape.transform.baseVal.getItem(0);ue.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(ue,0)}},ye.prototype.getVisual=function(){var ue=document.createElementNS("http://www.w3.org/2000/svg","svg");ue.setAttribute("xmlns","http://www.w3.org/2000/svg"),ue.setAttribute("width",this.width+"px"),ue.setAttribute("height",this.height+"px"),ue.setAttribute("viewBox","0 0 "+this.width+" "+this.height),ue.style.flexShrink="0",document.body.appendChild(ue);for(var he="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,me=1;me<=this.width/5+10;me++){var Ce=me%5==0?this.height/3:this.height/6;he+="h4v"+-Ce+"h1v"+Ce}he+="v1H0Z",this.scaleShape=W.createPath(he);var ge=W.createTransform();this.scaleShape.transform.baseVal.appendItem(ge),ue.appendChild(this.scaleShape),this.angleLabelElement=W.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=W.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Ee=W.createTSpan("");return Ee.innerHTML="°",this.angleLabelElement.appendChild(Ee),ue.appendChild(this.angleLabelElement),document.body.removeChild(ue),ue},ye}(),Ye=function(){function ye(){this.naturalSize=!1,this.imageType="image/png"}return ye.prototype.rasterize=function(ue,he,me,Ce,ge,Ee,Ae){var De=this;return new Promise(function(Me){var He=document.createElement("canvas");He.width=ue.width.baseVal.value-2*Ce,He.height=ue.height.baseVal.value-2*Ce;var nt=1,at=1;De.naturalSize===!0?(nt=he.naturalWidth/(ue.width.baseVal.value-2*Ce)/Ee,at=he.naturalHeight/(ue.height.baseVal.value-2*Ce)/Ae,He.width=he.naturalWidth/Ee,He.height=he.naturalHeight/Ae):De.width!==void 0&&De.height!==void 0&&(nt=De.width/me.width,at=De.height/me.height,He.width*=nt,He.height*=at);var it=He.getContext("2d");it.translate(He.width/2,He.height/2),it.rotate(ge*Math.PI/180),it.scale(Ee,Ae),it.translate(-He.width/2,-He.height/2),it.drawImage(he,0,0,He.width,He.height);var st=document.createElement("canvas");st.width=me.width*nt,st.height=me.height*at,st.getContext("2d").putImageData(it.getImageData((me.x-Ce)*nt,(me.y-Ce)*at,me.width*nt,me.height*at),0,0),Me(st.toDataURL(De.imageType,De.imageQuality))})},ye}(),Ze=function(){function ye(ue){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=ye.instanceCounter++,this.styles=new Y(this.instanceNo),this.target=ue,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(ye.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(ue){this._zoomToCropEnabled=ue,ue?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(ue){this._isGridVisible=ue,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"gridLines",{get:function(){return this._gridLines},set:function(ue){this._gridLines=ue,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(ue){this._rotationAngle=ue,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"aspectRatio",{get:function(){var ue;return(ue=this._aspectRatio)!==null&&ue!==void 0?ue:this.aspectRatios[0]},set:function(ue){this._aspectRatio=ue},enumerable:!1,configurable:!0}),ye.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},ye.prototype.show=function(){this.showUI(),this.open()},ye.prototype.close=function(ue){ue===void 0&&(ue=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),ue||this.closeEventListeners.forEach(function(he){return he()}),this._isOpen=!1)},ye.prototype.addRenderEventListener=function(ue){this.renderEventListeners.push(ue)},ye.prototype.removeRenderEventListener=function(ue){this.renderEventListeners.indexOf(ue)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(ue),1)},ye.prototype.addCloseEventListener=function(ue){this.closeEventListeners.push(ue)},ye.prototype.removeCloseEventListener=function(ue){this.closeEventListeners.indexOf(ue)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(ue),1)},ye.prototype.setupResizeObserver=function(){var ue=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){ue.resize(ue.target.clientWidth,ue.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},ye.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var ue=1*this.target.clientWidth/this.target.clientHeight,he=this.contentDiv.clientWidth/ue>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*ue:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,me=he+2*this.CANVAS_MARGINue+this.CANVAS_MARGIN?this.target.offsetTop-(ue+this.CANVAS_MARGIN):0;this.coverDiv.style.top=he+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},ye.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},ye.prototype.addTopToolbar=function(){var ue=this;this.topToolbar=new q,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var he=new ne;he.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(he);var me=[];this.aspectRatios.forEach(function(at){var it=new J(ce.getIcon(at.horizontal,at.vertical),at.horizontal===0&&at.vertical===0?"FREE":at.horizontal+":"+at.vertical);it.onClick=function(){return ue.ratioButtonClicked(at)},me.push(it)}),this.aspectRatioButton=new we(ce.getIcon(0,0),"Aspect ratio",me),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,he.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var Ce=new J('',"Toggle grid");Ce.isActive=this.isGridVisible,Ce.onClick=function(){ue.isGridVisible=!ue.isGridVisible,Ce.isActive=ue.isGridVisible},he.addButton(Ce);var ge=new J('',"Zoom to selection");if(ge.isActive=this.zoomToCropEnabled,ge.onClick=function(){ue.zoomToCropEnabled=!ue.zoomToCropEnabled,ge.isActive=ue.zoomToCropEnabled},he.addButton(ge),!te.isLicensed){var Ee=new $;this.topToolbar.addElementBlock(Ee);var Ae=document.createElement("div");Ae.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var De=document.createElement("a");De.style.color="currentColor",De.href="https://markerjs.com/products/cropro",De.target="_blank",De.innerHTML='',Ae.appendChild(De),Ee.addElement(Ae)}var Me=new ne;Me.minWidth=3*this.toolbarHeight+"px",Me.contentAlign="end",this.topToolbar.addButtonBlock(Me);var He=new J('',"OK");He.onClick=this.startRenderAndClose,Me.addButton(He),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(He.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var nt=new J('',"Close");nt.onClick=this.close,Me.addButton(nt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(nt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},ye.prototype.addBottomToolbar=function(){var ue=this;this.bottomToolbar=new q,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var he=new ne;he.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(he);var me=new J('',"Rotate left");me.onClick=this.rotateLeftButtonClicked,he.addButton(me);var Ce=new J('',"Rotate right");Ce.onClick=this.rotateRightButtonClicked,he.addButton(Ce);var ge=new $;ge.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(ge),this.straightener=new $e("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(Me){ue.rotateBy(Me),ue.straightener.angle=ue.rotationAngle},ge.addElement(this.straightener.getUI());var Ee=new ne;Ee.minWidth=2*this.toolbarHeight+"px",Ee.contentAlign="end",this.bottomToolbar.addButtonBlock(Ee);var Ae=new J('',"Flip horizontal");Ae.onClick=this.flipHorizontallyButtonClicked,Ee.addButton(Ae);var De=new J('',"Flip vertical");De.onClick=this.flipVerticallyButtonClicked,Ee.addButton(De)},ye.prototype.ratioButtonClicked=function(ue){this.aspectRatio=ue,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},ye.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=ce.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},ye.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new le(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},ye.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ye.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},ye.prototype.restoreState=function(ue){if(ue){var he=this.cropLayer.getRescaledRect(ue.width,ue.height,this.imageWidth,this.imageHeight,ue.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(he),this.cropRectChanged(he),this.flippedHorizontally=ue.flippedHorizontally,this.flippedVertically=ue.flippedVertically,this.applyFlip(),this.rotationAngle=ue.rotationAngle,this.applyRotation()}},ye.prototype.clientToLocalCoordinates=function(ue,he){var me=this.cropImage.getBoundingClientRect();return{x:ue-me.left,y:he-me.top}},ye.prototype.onWindowResize=function(){this.positionUI()},ye.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var ue=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=ue+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},ye.prototype.rotateLeftButtonClicked=function(){var ue=this.rotationAngle-90;this.rotationAngle%90!=0&&(ue+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(ue)},ye.prototype.rotateRightButtonClicked=function(){var ue=this.rotationAngle+90;this.rotationAngle%90!=0&&(ue-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(ue)},ye.prototype.rotateTo=function(ue){ue=(ue=ue>180?ue-360:ue)<=-180?ue+360:ue,this.rotationAngle=ue,this.applyRotation()},ye.prototype.rotateBy=function(ue){this.rotateTo((this.rotationAngle+ue)%360)},ye.prototype.applyRotation=function(){var ue=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var he=this.editingTargetRotationContainer.transform.baseVal.getItem(0);he.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(he,0);var me=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/me.width,this.imageHeight/me.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=ue},ye.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},ye.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},ye.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},ye.prototype.startRenderAndClose=function(){return Oe(this,void 0,void 0,function(){var ue,he;return de(this,function(me){switch(me.label){case 0:return[4,this.render()];case 1:return ue=me.sent(),he=this.getState(),this.renderEventListeners.forEach(function(Ce){return Ce(ue,he)}),this.close(!0),[2]}})})},ye.prototype.render=function(){return Oe(this,void 0,void 0,function(){var ue;return de(this,function(he){switch(he.label){case 0:return(ue=new Ye).naturalSize=this.renderAtNaturalSize,ue.imageType=this.renderImageType,ue.imageQuality=this.renderImageQuality,ue.width=this.renderWidth,ue.height=this.renderHeight,this.unzoomFromCrop(),W.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,ue.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return he.sent(),[4,ue.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,he.sent()]}})})},ye.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Q("toolbar",` width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`; flex-shrink: 0; display: flex; flex-direction: row; justify-content: space-between; height: `+this.toolbarHeight+`px; box-sizing: content-box; overflow: hidden; line-height: 0px; `)),this.toolbarStyleColorsClass=this.styles.addClass(new Q("toolbar_colors",` background-color: `+this.styles.settings.toolbarBackgroundColor+`; `)),this.toolbarBlockStyleClass=this.styles.addClass(new Q("toolbar-block",` display: flex; align-items: center; box-sizing: content-box; `));var ue=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Q("toolbar_button",` display: inline-block; width: `+(this.toolbarHeight-2*ue)+`px; height: `+(this.toolbarHeight-2*ue)+`px; padding: `+ue+`px; cursor: default; user-select: none; box-sizing: content-box; `)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Q("toolbar_button_colors",` color: `+this.styles.settings.toolbarColor+`; fill: currentColor; `)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Q("toolbar_active_button",` color: `+this.styles.settings.toolbarColor+`; fill: currentColor; background-color: `+this.styles.settings.toolbarBackgroundActiveColor+` `)),this.styles.addRule(new V("."+this.toolbarButtonStyleClass.name+" svg",` height: `+this.toolbarHeight/2+`px; `)),this.styles.addRule(new V("."+this.toolbarButtonStyleColorsClass.name+":hover",` background-color: `+this.styles.settings.toolbarBackgroundHoverColor+` `)),this.toolbarDropdownStyleClass=this.styles.addClass(new Q("toolbar_dropdown",` position: absolute; max-width: `+4*this.toolbarHeight+`px; z-index: 20; white-space: normal; box-sizing: content-box; box-shadow: 3px 3px rgba(33, 33, 33, 0.1); margin: `+(this.displayMode==="inline"?"0":this.popupMargin)+`px; line-height: 0px; `)),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new Q("toolbar_dropdown_colors",` background-color: `+this.styles.settings.toolbarBackgroundColor+`; `)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Q("toolbar_straightener_block",` display: flex; overflow: hidden; justify-content: center; -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%); `)),this.toolbarStraightenerStyleClass=this.styles.addClass(new Q("toolbar_straightener",` display: flex; overflow: hidden; justify-content: center; height: `+(this.toolbarHeight-2*ue)+`px; padding: `+ue+`px; cursor: default; user-select: none; box-sizing: content-box; `)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Q("toolbar_straightener_colors",` color: `+this.styles.settings.toolbarColor+`; fill: currentColor; `))},ye.instanceCounter=0,ye}(),qe=I("8hTe"),Pe=I.n(qe),Ie=/]*>/g;function Je(ye){var ue=document.createElement("div");return ue.innerHTML=ye,ue.childNodes.length===0?"":ue.childNodes[0].nodeValue}var rt=Z.a=function(ye){var ue=ye.value,he=ue===void 0?"":ue,me=ye.edit,Ce=me===void 0?!1:me,ge=ye.className,Ee=ye.showTextOnly,Ae=ye.showLines,De=ye.replaces,Me=ye.zoomImg,He=ye.hasMask,nt=ye.style,at=nt===void 0?{}:nt,it=ye.stylesPrev,st=it===void 0?{}:it,Tt=String(he),pt=Object(h.useRef)(),ht=Object(h.useRef)(),Ft=Object(h.useState)(""),Lt=Object(C.a)(Ft,2),Yt=Lt[0],$t=Lt[1],Mt=Object(h.useState)("office"),wt=Object(C.a)(Mt,2),Jt=wt[0],Dt=wt[1],St=function(){var Ht=new Ze(ht.current);Ht.displayMode="popup",Ht.addRenderEventListener(function(){var Gt=Object(m.a)(e.a.mark(function yt(xt){var Kt;return e.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return pt.current.style.display="none",qt.next=3,Object(be.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:xt}});case 3:Kt=qt.sent,Kt!=null&&Kt.id&&De(ht.current.getAttribute("src").replace(ee.a.API_SERVER,""),"/api/attachments/".concat(Kt==null?void 0:Kt.id,"?type=").concat(Kt.content_type));case 5:case"end":return qt.stop()}},yt)}));return function(yt){return Gt.apply(this,arguments)}}()),Ht.show()},_t=function(){var Ht=new _e.a(ht.current);Ht.settings.displayMode="popup",Ht.addEventListener("render",function(){var Gt=Object(m.a)(e.a.mark(function yt(xt){var Kt;return e.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:if(pt.current.style.display="none",!ht.current){qt.next=6;break}return qt.next=4,Object(be.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:xt.dataUrl}});case 4:Kt=qt.sent,Kt!=null&&Kt.id&&De(ht.current.getAttribute("src").replace(ee.a.API_SERVER,""),"/api/attachments/".concat(Kt==null?void 0:Kt.id,"?type=").concat(Kt.content_type));case 6:case"end":return qt.stop()}},yt)}));return function(yt){return Gt.apply(this,arguments)}}()),Ht.show(),window.markerArea=Ht},Et=Object(h.useMemo)(function(){pt.current&&(pt.current.style.zIndex=-1);try{var dt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Ht=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Gt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Tt=Tt.replace(dt,"("+ee.a.API_SERVER+"/api/attachments/").replace(Ht,'"'+ee.a.API_SERVER+"/api/attachments/").replace(Gt,'"'+ee.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,` `)}catch(Ar){}var yt=B(Tt),xt=F();if(Tt.match(/\[TOC\]/)&&(yt=yt.replace("

    [TOC]

    ",D()),E()),yt=yt.replace(/(__special_katext_id_\d+__)/g,function(Ar,qt){var ut=xt[qt],kt=ut.type,Hr=ut.expression;return Object(oe.renderToString)(Je(Hr)||"",{displayMode:kt==="block",throwOnError:!1,output:"html"})}),yt=yt.replace(/▁/g,"\u2581\u2581\u2581"),P(),Ee){var Kt=document.createElement("div");return Kt.innerHTML=yt,Kt.innerText}return setTimeout(function(){return mt()},500),yt},[Tt]),Bt=Object(h.useRef)();b.WebkitLineClamp=Ae,Ae&&(at=Object(v.a)(Object(v.a)({},at),b));function Dr(dt){var Ht=dt.target;if(Ht.tagName.toUpperCase()==="IMG"){if(Me){var Gt=Ht.getAttribute("src");$t(Gt),Dt("image")}}else if(Ht.tagName.toUpperCase()==="A"){var yt=Ht.getAttribute("href");if(yt.indexOf("office")>-1)dt.preventDefault(),$t(yt),Dt("office");else if(yt.indexOf("application/pdf")>-1)dt.preventDefault(),$t(yt),Dt("pdf");else if(yt.indexOf("text/html")>-1)dt.preventDefault(),$t(yt),Dt("html");else if(yt.startsWith("#")){dt.preventDefault();var xt=document.getElementById(yt.replace("#",""));xt&&xt.scrollIntoView(!0)}}}var mt=function(){var Ht,Gt=(Ht=Bt.current)===null||Ht===void 0?void 0:Ht.querySelectorAll("video");Gt==null||Gt.forEach(function(yt){if(yt.oncontextmenu=function(){return!1},yt.src.indexOf(".m3u8")>-1&&!yt.canPlayType("application/vnd.apple.mpegurl")){if(G.a.isSupported()){var xt=new G.a;xt.loadSource(yt.src),xt.attachMedia(yt)}}})};Object(h.useEffect)(function(){if(Bt.current&&Et&&(Et.match(Ie)&&window.PR.prettyPrint()),Bt.current)return Bt.current.addEventListener("click",Dr),function(){Bt.current.removeEventListener("click",Dr),P(),E()}},[Et,Bt.current,Dr]);var Ct=function(Ht){if(!Ce)return;Ht.target.nodeName==="IMG"?(pt.current.style.zIndex=1,pt.current.style.display="flex",pt.current.style.width=Ht.target.clientWidth+"px",pt.current.style.height=Ht.target.clientHeight+"px",pt.current.style.top=Ht.target.offsetTop+"px",pt.current.style.left=Ht.target.offsetLeft+"px",ht.current.src=Ht.target.getAttribute("src")):pt.current.style.display="none"};return r.a.createElement("div",{style:{position:"relative"}},r.a.createElement("div",{ref:Bt,style:Object(v.a)({},at),className:"".concat(ge||""," markdown-body ").concat(Pe.a.mdBody),onMouseOver:Ct,dangerouslySetInnerHTML:{__html:Et}}),r.a.createElement("div",{ref:pt,className:Pe.a.button},r.a.createElement(g.a,null,r.a.createElement(k.a,{onClick:function(){return St()}},"\u88C1\u526A"),r.a.createElement(k.a,{onClick:function(){return _t()}},"\u7F16\u8F91"))),r.a.createElement("img",{ref:ht,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),r.a.createElement(ae.a,{close:!0,data:Yt,type:Yt!=null&&Yt.length?Jt:"",style:Object(v.a)({},st),onClose:function(){return $t("")}}))}},"9OqN":function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("OLod"))})(this,function(N){return N.mode.CTR=function(){var g=N.lib.BlockCipherMode.extend(),S=g.Encryptor=g.extend({processBlock:function(k,v){var m=this._cipher,C=m.blockSize,_=this._iv,e=this._counter;_&&(e=this._counter=_.slice(0),this._iv=void 0);var h=e.slice(0);m.encryptBlock(h,0),e[C-1]=e[C-1]+1|0;for(var r=0;r0&&he.current===ie.length){$e(!1);var Dt=G(Jt);Dt=Dt.filter(function(St){var _t,Et;return!!((_t=St[0])!==null&&_t!==void 0&&_t.name&&(Et=St[1])!==null&&Et!==void 0&&Et.name)}),Dt=Dt.map(function(St){return Object(d.a)(Object(d.a)(Object(d.a)({},St[0]),St[1]),{},{is_file:!1})}),fe(Dt),_e()}}else $e(!1),_e()});return}if(rt){var pt=new FormData;pt.append("file",it.file),pt.append("identifier",de);var ht=Object(z.a)("/api/attachments.json",{method:"post",body:pt},!0);ht.then(function(wt){if(wt.filename){he.current=he.current+1;var Jt=ue.current.map(function(St){if(St.name===(wt==null?void 0:wt.filename)){var _t,Et=Object(d.a)(Object(d.a)({},St),{},{is_oss:!rt});return wt!=null&&(_t=wt.filename)!==null&&_t!==void 0&&_t.includes(".in")?(Et.in_object_key=wt==null?void 0:wt.object,Et.in_object_size=wt==null?void 0:wt.size,Et.input=wt==null?void 0:wt.filename,Et.in_file=it):(Et.out_object_key=wt==null?void 0:wt.object,Et.out_object_size=wt==null?void 0:wt.size,Et.output=wt==null?void 0:wt.filename,Et.out_file=it),Et}return St});if(ue.current=Object(s.a)(Jt),ne(Object(s.a)(Jt)),he.current>0&&he.current===ie.length){$e(!1);var Dt=G(Jt);Dt=Dt.filter(function(St){var _t,Et;return!!((_t=St[0])!==null&&_t!==void 0&&_t.name&&(Et=St[1])!==null&&Et!==void 0&&Et.name)}),Dt=Dt.map(function(St){return Object(d.a)(Object(d.a)(Object(d.a)({},St[0]),St[1]),{},{is_file:!0})}),fe(Dt),_e()}}else $e(!1),_e()});return}var Ft=new A.a({endpoint:le.end_point,region:le.region,accessKeyId:le.access_key_id,accessKeySecret:le.access_key_secret,bucket:le.bucket,stsToken:le.security_token}),Lt=it.name,Yt={container_type:"TestSet",file_name:Lt},$t=Object(O.a)(),Mt="testsets/".concat(de,"/").concat($t).concat(Lt.indexOf(".")>-1?"."+Lt.split(".").pop():"");de===null&&(Mt="testsets/".concat($t).concat(Lt.indexOf(".")>-1?"."+Lt.split(".").pop():"")),Ft.multipartUpload(Mt,new Blob([it.file],{type:it.file.type}),{timeout:3600*1e3,partSize:1002400,callback:{customValue:{id:Lt+""},url:le==null?void 0:le.callback_url,host:le==null?void 0:le.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(z.e)(Yt)}}).then(function(wt){if(wt.data.status===0){he.current=he.current+1;var Jt=ue.current.map(function(St){var _t,Et;if(St.name===((_t=wt.data)===null||_t===void 0||((Et=_t.data)===null||Et===void 0)?void 0:Et.file_name)){var Bt,Dr,mt,Ct=Object(d.a)(Object(d.a)({},St),{},{is_oss:!rt});if((Bt=wt.data)!==null&&Bt!==void 0&&(Dr=Bt.data)!==null&&Dr!==void 0&&(mt=Dr.file_name)!==null&&mt!==void 0&&mt.includes(".in")){var dt,Ht,Gt,yt,xt,Kt;Ct.in_object_key=(dt=wt.data)===null||dt===void 0||((Ht=dt.data)===null||Ht===void 0)?void 0:Ht.object,Ct.in_object_size=(Gt=wt.data)===null||Gt===void 0||((yt=Gt.data)===null||yt===void 0)?void 0:yt.size,Ct.input=(xt=wt.data)===null||xt===void 0||((Kt=xt.data)===null||Kt===void 0)?void 0:Kt.file_name,Ct.in_file=it}else{var Ar,qt,ut,kt,Hr,Yr;Ct.out_object_key=(Ar=wt.data)===null||Ar===void 0||((qt=Ar.data)===null||qt===void 0)?void 0:qt.object,Ct.out_object_size=(ut=wt.data)===null||ut===void 0||((kt=ut.data)===null||kt===void 0)?void 0:kt.size,Ct.output=(Hr=wt.data)===null||Hr===void 0||((Yr=Hr.data)===null||Yr===void 0)?void 0:Yr.file_name,Ct.out_file=it}return Ct}return St});if(ue.current=Object(s.a)(Jt),ne(Object(s.a)(Jt)),he.current>0&&he.current===ie.length){$e(!1);var Dt=G(Jt);Dt=Dt.filter(function(St){var _t,Et;return!!((_t=St[0])!==null&&_t!==void 0&&_t.name&&(Et=St[1])!==null&&Et!==void 0&&Et.name)}),Dt=Dt.map(function(St){return Object(d.a)(Object(d.a)(Object(d.a)({},St[0]),St[1]),{},{is_file:!0})}),fe(Dt),_e()}}})},De=function(it){return new Promise(function(st,Tt){for(var pt=0,ht=[],Ft=function($t){it[$t].file.slice(0,1).arrayBuffer().then(function(){pt++,pt===it.length&&(ht.length?(f.b.warn("".concat(ht.join("\uFF0C"),"\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01")),Tt()):st(it))}).catch(function(Mt){console.log("\u9519\u8BEF\u4FE1\u606F\uFF1A",Mt),pt++,ht.push(it[$t].name),pt===it.length&&(ht.length?(f.b.warn("".concat(ht.join("\uFF0C"),"\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01")),Tt()):st(it))})},Lt=0;Lt100)return f.b.info("\u6587\u4EF6\u8D85\u8FC7100M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;if(!/\.(in|out|IN|OUT)$/.test(it.name))return f.b.warn("\u8F93\u5165\u6587\u4EF6\u53EA\u80FD\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6"),!1;var st={name:it.name,uid:it.uid,file:it,percent:0};return ie.push(st),ue.current=Object(s.a)(ie),ne(Object(s.a)(ie)),!1}},nt=G(ie);return console.log(ie,nt,"fileList"),y.a.createElement(n.a,{visible:Re,wrapClassName:Oe,onOk:Me,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",okButtonProps:{loading:Xe},onCancel:me,width:"1000px",title:"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"},y.a.createElement("div",{className:w.a.wrap},ie.length?y.a.createElement("div",null,y.a.createElement(_.a,{justify:"space-between",align:"middle",className:"mb20"},y.a.createElement("div",{style:{visibility:W?"visible":"hidden"}},"\u6D4B\u8BD5\u7528\u4F8B\u7C7B\u578B\uFF1A",y.a.createElement(h.a.Group,{className:"ml10",value:qe,onChange:function(it){return Pe(it.target.value)}},y.a.createElement(h.a,{value:!1},"\u6587\u672C"),y.a.createElement(h.a,{value:!0},"\u6587\u4EF6"))),y.a.createElement(b.a,He,y.a.createElement(c.a,{className:w.a.btnS},"\u4E0A\u4F20\u6587\u4EF6"))),y.a.createElement(oe,{data:nt,onRemove:Ee})):y.a.createElement("div",{className:w.a.noData},y.a.createElement("img",{src:F.a,alt:""}),y.a.createElement(b.a,He,y.a.createElement(c.a,{className:w.a.btn},"\u4E0A\u4F20\u6587\u4EF6"))),y.a.createElement("div",{className:w.a.text},"\u4E0A\u4F20\u9650\u5236\uFF1A",y.a.createElement("br",null),"1\u3001\u6587\u4EF6\u5FC5\u987B\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6\u3002",y.a.createElement("br",null),"2\u3001\u4E0A\u4F20\u7684\u6587\u4EF6\u7F16\u7801\u4EC5\u652F\u6301UTF-8\uFF0C\u5426\u5219\u53EF\u80FD\u4F1A\u51FA\u73B0\u6587\u672C\u4E71\u7801\u3002",y.a.createElement("br",null),"3\u3001\u8F93\u5165\u8F93\u51FA\u6587\u4EF6\u9700\u6587\u4EF6\u540D\u79F0\u4E00\u4E00\u5BF9\u5E94\uFF0C\u672A\u5BF9\u5E94\u65F6\uFF0C\u5C06\u65E0\u6CD5\u4E0A\u4F20\u3002",y.a.createElement("br",null),"4\u3001\u5355\u4E2A\u4E0A\u4F20\u6587\u4EF6\u4E0D\u80FD\u8D85\u8FC7100MB\uFF0C\u8D85\u8FC7\u65F6\u53EF\u4EE5\u5206\u6279\u6B21\u4E0A\u4F20\u3002",y.a.createElement("br",null))))},oe=function(be){var _e=be.data,fe=_e===void 0?[]:_e,Re=be.onRemove,Oe=be.width,de=Oe===void 0?"auto":Oe,te=be.showScore,W=te===void 0?!1:te,Y=be.disabled,V=Y===void 0?!1:Y,Q=be.inputChange,q=be.onEvaluatingChange,ie=be.showEvaluatingSetting,ne=ie===void 0?!1:ie,J={value:"",filename:"",dataUrl:""},$=Object(R.useState)(Object(d.a)({},J)),le=Object(o.a)($,2),ce=le[0],we=le[1],Fe=function(Ze){var qe=document.createElement("a");document.body.appendChild(qe);var Pe=URL.createObjectURL(Ze.file);qe.href=Pe,qe.download=Ze.name,qe.click(),URL.revokeObjectURL(Pe),document.body.removeChild(qe)},Xe=function(Ze,qe){Object(B.y)(Ze,qe)},$e=function(Ze,qe){n.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:y.a.createElement("div",{className:"tc font16"},"\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u8BE5\u6D4B\u8BD5\u7528\u4F8B?"),onOk:function(){Re(Ze,qe)},onCancel:function(){}})};return fe.length?y.a.createElement("div",{style:{width:de}},y.a.createElement("div",{className:w.a.head},ne&&y.a.createElement("div",{style:{width:"10%"}},"\u9690\u85CF",y.a.createElement(m.a,{title:'\u9690\u85CF\u6D4B\u8BD5\u96C6\u53EF\u4EE5\u9632\u6B62\u5B66\u751F\u901A\u8FC7"print"\u7B49\u624B\u6BB5\u76F4\u63A5\u901A\u5173'},y.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),y.a.createElement("div",{style:{width:"20%"}},"\u7528\u4F8B"),y.a.createElement("div",{style:{width:W?"25%":"35%",padding:"0 12px"}},"\u8F93\u5165"),y.a.createElement("div",{style:{width:W?"25%":"35%",padding:"0 12px"}},"\u8F93\u51FA"),W&&y.a.createElement("div",{style:{width:"20%"}},"\u5F97\u5206\u6BD4\u4F8B"),ne&&y.a.createElement("div",{style:{width:"20%"}},"\u9884\u671F\u8F93\u51FA",y.a.createElement(m.a,{title:"\u52FE\u9009\u540E\uFF0C\u9884\u671F\u8F93\u51FA\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},y.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),ne&&y.a.createElement("div",{style:{width:"20%"}},"\u7279\u6B8A\u5224\u5B9A",y.a.createElement(m.a,{title:"\u52FE\u9009\u540E\uFF0C\u5B9E\u9645\u8F93\u51FA\u4E0E\u9884\u671F\u8F93\u51FA\u6700\u540E\u4E00\u884C\u76F8\u540C\u5373\u53EF\u901A\u5173"},y.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),y.a.createElement("div",{style:{width:"10%"}},"\u64CD\u4F5C")),fe.map(function(Ye,Ze){var qe,Pe,Ie,Je;return y.a.createElement("div",{key:Ze,className:w.a.list},ne&&y.a.createElement("div",{style:{width:"10%"}},y.a.createElement(k.a,{checked:!!Ye.hidden,onChange:function(ye){q(ye.target.checked?1:0,Ze,"hidden")}})),y.a.createElement("div",{style:{width:"20%"}},"\u6D4B\u8BD5\u7528\u4F8B",Ze+1),y.a.createElement("div",{className:w.a.info,style:{width:W?"25%":"35%"}},y.a.createElement("span",{title:Ye.input||((qe=Ye[0])===null||qe===void 0?void 0:qe.name),onClick:Object(u.a)(D.a.mark(function rt(){var ye,ue;return D.a.wrap(function(me){for(;;)switch(me.prev=me.next){case 0:if(Ye.input?Ye.input_file_url?ye=Ye.input_file_url:ye=Ye.in_file:ye=Ye[0],!(typeof ye=="string")){me.next=14;break}return me.next=4,fetch(ye,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 4:return ue=me.sent,me.t0=we,me.next=8,ue.text();case 8:me.t1=me.sent,me.t2=ye,me.t3={value:me.t1,filename:"",dataUrl:me.t2},(0,me.t0)(me.t3),me.next=18;break;case 14:return me.next=16,Object(B.G)(ye.file);case 16:ue=me.sent,we({value:ue.text,filename:ye.name,dataUrl:ue.link});case 18:case"end":return me.stop()}},rt)}))},Ye.input||((Pe=Ye[0])===null||Pe===void 0?void 0:Pe.name))),y.a.createElement("div",{className:w.a.info,style:{width:W?"25%":"35%"}},y.a.createElement("span",{title:Ye.output||((Ie=Ye[1])===null||Ie===void 0?void 0:Ie.name),onClick:Object(u.a)(D.a.mark(function rt(){var ye,ue;return D.a.wrap(function(me){for(;;)switch(me.prev=me.next){case 0:if(Ye.input?Ye.output_file_url?ye=Ye.output_file_url:ye=Ye.out_file:ye=Ye[1],!(typeof ye=="string")){me.next=14;break}return me.next=4,fetch(ye,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 4:return ue=me.sent,me.t0=we,me.next=8,ue.text();case 8:me.t1=me.sent,me.t2=ye,me.t3={value:me.t1,filename:"",dataUrl:me.t2},(0,me.t0)(me.t3),me.next=18;break;case 14:return me.next=16,Object(B.G)(ye.file);case 16:ue=me.sent,we({value:ue.text,filename:ye.name,dataUrl:ue.link});case 18:case"end":return me.stop()}},rt)}))},Ye.output||((Je=Ye[1])===null||Je===void 0?void 0:Je.name))),W&&y.a.createElement("div",{style:{width:"20%"}},y.a.createElement(g.a,{disabled:V,style:{width:"70%"},onChange:function(ye){return Q(ye,Ze)},value:Ye.score}),y.a.createElement("span",null,"\xA0%")),ne&&y.a.createElement("div",{style:{width:"20%"}},y.a.createElement(k.a,{checked:Ye.is_invisible||!1,onChange:function(ye){q(ye.target.checked,Ze,"is_invisible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),ne&&y.a.createElement("div",{style:{width:"20%"}},y.a.createElement(k.a,{checked:Ye.last_match_rule||!1,onChange:function(ye){q(ye.target.checked,Ze,"last_match_rule")},className:"font14"},"\u672B\u5C3E\u5339\u914D")),y.a.createElement("div",{onClick:function(){return $e(Ye,Ze)},style:{width:"10%"}},y.a.createElement("span",{className:w.a.del},"\u5220\u9664")))}),y.a.createElement(U.a,{close:!0,data:ce.dataUrl,filename:ce.filename,type:ce.dataUrl.length?"txt":"",onClose:function(){return we(Object(d.a)({},J))},monacoEditor:{value:ce.value,language:"txt",onChange:function(){},options:{fontSize:14,readOnly:!0,minimap:{enabled:!1}}}})):y.a.createElement(y.a.Fragment,null)};Z.b=ee},BU3w:function(H,Z,I){"use strict";I.d(Z,"a",function(){return m});var N=I("MNnm"),g="rc-util-key";function S(C){if(C.attachTo)return C.attachTo;var _=document.querySelector("head");return _||document.body}function k(C){var _,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(N.a)())return null;var h=document.createElement("style");if((_=e.csp)===null||_===void 0?void 0:_.nonce){var r;h.nonce=(r=e.csp)===null||r===void 0?void 0:r.nonce}h.innerHTML=C;var c=S(e),i=c.firstChild;return e.prepend&&c.prepend?c.prepend(h):e.prepend&&i?c.insertBefore(h,i):c.appendChild(h),h}var v=new Map;function m(C,_){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},h=S(e);if(!v.has(h)){var r=k("",e),c=r.parentNode;v.set(h,c),c.removeChild(r)}var i=Array.from(v.get(h).children).find(function(u){return u.tagName==="STYLE"&&u[g]===_});if(i){var n,l;if(((n=e.csp)===null||n===void 0?void 0:n.nonce)&&i.nonce!==((l=e.csp)===null||l===void 0?void 0:l.nonce)){var f;i.nonce=(f=e.csp)===null||f===void 0?void 0:f.nonce}return i.innerHTML!==C&&(i.innerHTML=C),i}var d=k(C,e);return d[g]=_,d}},Bd2K:function(H,Z,I){(function(N){N(I("VrN/"),I("osHv"))})(function(N){N.defineOption("autoCloseTags",!1,function(e,h,r){if(r!=N.Init&&r&&e.removeKeyMap("autoCloseTags"),!h)return;var c={name:"autoCloseTags"};(typeof h!="object"||h.whenClosing!==!1)&&(c["'/'"]=function(i){return m(i)}),(typeof h!="object"||h.whenOpening!==!1)&&(c["'>'"]=function(i){return k(i)}),e.addKeyMap(c)});var g=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],S=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function k(e){if(e.getOption("disableInput"))return N.Pass;for(var h=e.listSelections(),r=[],c=e.getOption("autoCloseTags"),i=0;in.ch&&(o=o.slice(0,o.length-l.end+n.ch));var p=o.toLowerCase();if(!o||l.type=="string"&&(l.end!=n.ch||!/[\"\']/.test(l.string.charAt(l.string.length-1))||l.string.length==1)||l.type=="tag"&&u.close||l.string.indexOf("/")==n.ch-l.start-1||E&&C(E,p)>-1||_(e,f.mode.xmlCurrentContext&&f.mode.xmlCurrentContext(d)||[],o,n,!0))return N.Pass;var D=typeof c=="object"&&c.emptyTags;if(D&&C(D,o)>-1){r[i]={text:"/>",newPos:N.Pos(n.line,n.ch+2)};continue}var R=b&&C(b,p)>-1;r[i]={indent:R,text:">"+(R?` `:"")+"",newPos:R?N.Pos(n.line+1,0):N.Pos(n.line,n.ch+1)}}for(var y=typeof c=="object"&&c.dontIndentOnAutoClose,i=h.length-1;i>=0;i--){var x=r[i];e.replaceRange(x.text,h[i].head,h[i].anchor,"+insert");var w=e.listSelections().slice(0);w[i]={head:x.newPos,anchor:x.newPos},e.setSelections(w),!y&&x.indent&&(e.indentLine(x.newPos.line,null,!0),e.indentLine(x.newPos.line+1,null,!0))}}function v(e,h){for(var r=e.listSelections(),c=[],i=h?"/":""&&(E+=">"),c[f]=E}if(e.replaceSelections(c),r=e.listSelections(),!l)for(var f=0;f=0&&h[d]==r;d--)++f;c=l.to;for(var d=1;d0){for(var h=0;h<_.length;h++)if(_[h].compile_success==0||!_[h].compile_success){e=!1;break}}else e=!1;return e}function S(_){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",h=[],r=0;r<_.length;r++){var c=_[r],i=e?"".concat(e,"/").concat(c.name):"".concat(c.name);h.push({title:c.name,isLeaf:!(c.type==="tree"),key:i})}return h}function k(_,e,h){for(var r=0;r<_.length;r++){var c=_[r];if(c.key===e){c.children=h;break}c.children&&k(c.children,e,h)}return _}function v(_,e,h){var r;return function(){var c=this,i=arguments,n=function(){r=null,h||_.apply(c,i)},l=h&&!r;clearTimeout(r),r=setTimeout(n,e),l&&_.apply(c,i)}}var m=!0,C=N.a.API_SERVER},Bvq2:function(H,Z,I){H.exports={wrap:"wrap___2zRY4",colorBlue:"colorBlue___XalpT",repeatedName:"repeatedName___2Tfh4",text:"text___1sYHg",noData:"noData___3pdB4",btn:"btn___3WWjB",btnS:"btnS___2M_9t",head:"head____NWmz",list:"list___2fE4M",del:"del___2BO6Y",info:"info___3GJ70"}},"C+DQ":function(H,Z,I){},"C/vA":function(H,Z,I){"use strict";I.d(Z,"a",function(){return N});function N(g){const S=this;let k=!1,v;return function(){return k||(k=!0,v=g.apply(S,arguments)),v}}},"Cg/j":function(H,Z,I){"use strict";I.d(Z,"b",function(){return N}),I.d(Z,"a",function(){return g}),I.d(Z,"c",function(){return k}),I.d(Z,"d",function(){return v});var N;(function(m){m.serviceIds=new Map,m.DI_TARGET="$di$target",m.DI_DEPENDENCIES="$di$dependencies";function C(_){return _[m.DI_DEPENDENCIES]||[]}m.getServiceDependencies=C})(N||(N={}));const g=k("instantiationService");function S(m,C,_,e){C[N.DI_TARGET]===C?C[N.DI_DEPENDENCIES].push({id:m,index:_,optional:e}):(C[N.DI_DEPENDENCIES]=[{id:m,index:_,optional:e}],C[N.DI_TARGET]=C)}function k(m){if(N.serviceIds.has(m))return N.serviceIds.get(m);const C=function(_,e,h){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");S(C,_,h,!1)};return C.toString=()=>m,N.serviceIds.set(m,C),C}function v(m){return function(C,_,e){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");S(m,C,e,!0)}}},CrYA:function(H,Z,I){var N=I("MFOe"),g=N.Global;H.exports={name:"sessionStorage",read:k,write:v,each:m,remove:C,clearAll:_};function S(){return g.sessionStorage}function k(e){return S().getItem(e)}function v(e,h){return S().setItem(e,h)}function m(e){for(var h=S().length-1;h>=0;h--){var r=S().key(h);e(k(r),r)}}function C(e){return S().removeItem(e)}function _(){return S().clear()}},DlQD:function(H,Z,I){(function(N,g){H.exports=g()})(this,function(){"use strict";function N(he,me){for(var Ce=0;Cehe.length)&&(me=he.length);for(var Ce=0,ge=new Array(me);Ce=he.length?{done:!0}:{done:!1,value:he[ge++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return Ce=he[Symbol.iterator](),Ce.next.bind(Ce)}function m(he,me){return me={exports:{}},he(me,me.exports),me.exports}var C=m(function(he){function me(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function Ce(ge){he.exports.defaults=ge}he.exports={defaults:me(),getDefaults:me,changeDefaults:Ce}}),_=C.defaults,e=C.getDefaults,h=C.changeDefaults,r=/[&<>"']/,c=/[&<>"']/g,i=/[<>"']|&(?!#?\w+;)/,n=/[<>"']|&(?!#?\w+;)/g,l={"&":"&","<":"<",">":">",'"':""","'":"'"},f=function(me){return l[me]};function d(he,me){if(me){if(r.test(he))return he.replace(c,f)}else if(i.test(he))return he.replace(n,f);return he}var u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function o(he){return he.replace(u,function(me,Ce){return Ce=Ce.toLowerCase(),Ce==="colon"?":":Ce.charAt(0)==="#"?Ce.charAt(1)==="x"?String.fromCharCode(parseInt(Ce.substring(2),16)):String.fromCharCode(+Ce.substring(1)):""})}var s=/(^|[^\[])\^/g;function E(he,me){he=he.source||he,me=me||"";var Ce={replace:function(Ee,Ae){return Ae=Ae.source||Ae,Ae=Ae.replace(s,"$1"),he=he.replace(Ee,Ae),Ce},getRegex:function(){return new RegExp(he,me)}};return Ce}var b=/[^\w:]/g,p=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function D(he,me,Ce){if(he){var ge;try{ge=decodeURIComponent(o(Ce)).replace(b,"").toLowerCase()}catch(Ee){return null}if(ge.indexOf("javascript:")===0||ge.indexOf("vbscript:")===0||ge.indexOf("data:")===0)return null}me&&!p.test(Ce)&&(Ce=T(me,Ce));try{Ce=encodeURI(Ce).replace(/%25/g,"%")}catch(Ee){return null}return Ce}var R={},y=/^[^:]+:\/*[^/]*$/,x=/^([^:]+:)[\s\S]*$/,w=/^([^:]+:\/*[^/]*)[\s\S]*$/;function T(he,me){R[" "+he]||(y.test(he)?R[" "+he]=he+"/":R[" "+he]=X(he,"/",!0)),he=R[" "+he];var Ce=he.indexOf(":")===-1;return me.substring(0,2)==="//"?Ce?me:he.replace(x,"$1")+me:me.charAt(0)==="/"?Ce?me:he.replace(w,"$1")+me:he+me}var F={exec:function(){}};function P(he){for(var me=1,Ce,ge;me=0&&Me[nt]==="\\";)He=!He;return He?"|":" |"}),ge=Ce.split(/ \|/),Ee=0;if(ge.length>me)ge.splice(me);else for(;ge.length=ge.length?Ee.slice(ge.length):Ee}).join(` `)}var _e=function(){function he(Ce){this.options=Ce||U}var me=he.prototype;return me.space=function(ge){var Ee=this.rules.block.newline.exec(ge);if(Ee)return Ee[0].length>1?{type:"space",raw:Ee[0]}:{raw:` `}},me.code=function(ge,Ee){var Ae=this.rules.block.code.exec(ge);if(Ae){var De=Ee[Ee.length-1];if(De&&De.type==="paragraph")return{raw:Ae[0],text:Ae[0].trimRight()};var Me=Ae[0].replace(/^ {4}/gm,"");return{type:"code",raw:Ae[0],codeBlockStyle:"indented",text:this.options.pedantic?Me:L(Me,` `)}}},me.fences=function(ge){var Ee=this.rules.block.fences.exec(ge);if(Ee){var Ae=Ee[0],De=be(Ae,Ee[3]||"");return{type:"code",raw:Ae,lang:Ee[2]?Ee[2].trim():Ee[2],text:De}}},me.heading=function(ge){var Ee=this.rules.block.heading.exec(ge);if(Ee)return{type:"heading",raw:Ee[0],depth:Ee[1].length,text:Ee[2]}},me.nptable=function(ge){var Ee=this.rules.block.nptable.exec(ge);if(Ee){var Ae={type:"table",header:G(Ee[1].replace(/^ *| *\| *$/g,"")),align:Ee[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Ee[3]?Ee[3].replace(/\n$/,"").split(` `):[],raw:Ee[0]};if(Ae.header.length===Ae.align.length){var De=Ae.align.length,Me;for(Me=0;Me ?/gm,"");return{type:"blockquote",raw:Ee[0],text:Ae}}},me.list=function(ge){var Ee=this.rules.block.list.exec(ge);if(Ee){for(var Ae=Ee[0],De=Ee[2],Me=De.length>1,He=De[De.length-1]===")",nt={type:"list",raw:Ae,ordered:Me,start:Me?+De.slice(0,-1):"",loose:!1,items:[]},at=Ee[0].match(this.rules.block.item),it=!1,st,Tt,pt,ht,Ft,Lt,Yt,$t=at.length,Mt=0;Mt<$t;Mt++)st=at[Mt],Ae=st,Tt=st.length,st=st.replace(/^ *([*+-]|\d+[.)]) */,""),~st.indexOf(` `)&&(Tt-=st.length,st=this.options.pedantic?st.replace(/^ {1,4}/gm,""):st.replace(new RegExp("^ {1,"+Tt+"}","gm"),"")),Mt!==$t-1&&(pt=this.rules.block.bullet.exec(at[Mt+1])[0],(Me?pt.length===1||!He&&pt[pt.length-1]===")":pt.length>1||this.options.smartLists&&pt!==De)&&(ht=at.slice(Mt+1).join(` `),nt.raw=nt.raw.substring(0,nt.raw.length-ht.length),Mt=$t-1)),Ft=it||/\n\n(?!\s*$)/.test(st),Mt!==$t-1&&(it=st.charAt(st.length-1)===` `,Ft||(Ft=it)),Ft&&(nt.loose=!0),Lt=/^\[[ xX]\] /.test(st),Yt=void 0,Lt&&(Yt=st[1]!==" ",st=st.replace(/^\[[ xX]\] +/,"")),nt.items.push({type:"list_item",raw:Ae,task:Lt,checked:Yt,loose:Ft,text:st});return nt}},me.html=function(ge){var Ee=this.rules.block.html.exec(ge);if(Ee)return{type:this.options.sanitize?"paragraph":"html",raw:Ee[0],pre:!this.options.sanitizer&&(Ee[1]==="pre"||Ee[1]==="script"||Ee[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ee[0]):ee(Ee[0]):Ee[0]}},me.def=function(ge){var Ee=this.rules.block.def.exec(ge);if(Ee){Ee[3]&&(Ee[3]=Ee[3].substring(1,Ee[3].length-1));var Ae=Ee[1].toLowerCase().replace(/\s+/g," ");return{tag:Ae,raw:Ee[0],href:Ee[2],title:Ee[3]}}},me.table=function(ge){var Ee=this.rules.block.table.exec(ge);if(Ee){var Ae={type:"table",header:G(Ee[1].replace(/^ *| *\| *$/g,"")),align:Ee[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Ee[3]?Ee[3].replace(/\n$/,"").split(` `):[]};if(Ae.header.length===Ae.align.length){Ae.raw=Ee[0];var De=Ae.align.length,Me;for(Me=0;Me/i.test(De[0])&&(Ee=!1),!Ae&&/^<(pre|code|kbd|script)(\s|>)/i.test(De[0])?Ae=!0:Ae&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(De[0])&&(Ae=!1),{type:this.options.sanitize?"text":"html",raw:De[0],inLink:Ee,inRawBlock:Ae,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(De[0]):ee(De[0]):De[0]}},me.link=function(ge){var Ee=this.rules.inline.link.exec(ge);if(Ee){var Ae=oe(Ee[2],"()");if(Ae>-1){var De=Ee[0].indexOf("!")===0?5:4,Me=De+Ee[1].length+Ae;Ee[2]=Ee[2].substring(0,Ae),Ee[0]=Ee[0].substring(0,Me).trim(),Ee[3]=""}var He=Ee[2],nt="";if(this.options.pedantic){var at=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(He);at?(He=at[1],nt=at[3]):nt=""}else nt=Ee[3]?Ee[3].slice(1,-1):"";He=He.trim().replace(/^<([\s\S]*)>$/,"$1");var it=ae(Ee,{href:He&&He.replace(this.rules.inline._escapes,"$1"),title:nt&&nt.replace(this.rules.inline._escapes,"$1")},Ee[0]);return it}},me.reflink=function(ge,Ee){var Ae;if((Ae=this.rules.inline.reflink.exec(ge))||(Ae=this.rules.inline.nolink.exec(ge))){var De=(Ae[2]||Ae[1]).replace(/\s+/g," ");if(De=Ee[De.toLowerCase()],!De||!De.href){var Me=Ae[0].charAt(0);return{type:"text",raw:Me,text:Me}}var He=ae(Ae,De,Ae[0]);return He}},me.strong=function(ge,Ee,Ae){Ae===void 0&&(Ae="");var De=this.rules.inline.strong.start.exec(ge);if(De&&(!De[1]||De[1]&&(Ae===""||this.rules.inline.punctuation.exec(Ae)))){Ee=Ee.slice(-1*ge.length);var Me=De[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Me.lastIndex=0;for(var He;(De=Me.exec(Ee))!=null;)if(He=this.rules.inline.strong.middle.exec(Ee.slice(0,De.index+3)),He)return{type:"strong",raw:ge.slice(0,He[0].length),text:ge.slice(2,He[0].length-2)}}},me.em=function(ge,Ee,Ae){Ae===void 0&&(Ae="");var De=this.rules.inline.em.start.exec(ge);if(De&&(!De[1]||De[1]&&(Ae===""||this.rules.inline.punctuation.exec(Ae)))){Ee=Ee.slice(-1*ge.length);var Me=De[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Me.lastIndex=0;for(var He;(De=Me.exec(Ee))!=null;)if(He=this.rules.inline.em.middle.exec(Ee.slice(0,De.index+2)),He)return{type:"em",raw:ge.slice(0,He[0].length),text:ge.slice(1,He[0].length-1)}}},me.codespan=function(ge){var Ee=this.rules.inline.code.exec(ge);if(Ee){var Ae=Ee[2].replace(/\n/g," "),De=/[^ ]/.test(Ae),Me=Ae.startsWith(" ")&&Ae.endsWith(" ");return De&&Me&&(Ae=Ae.substring(1,Ae.length-1)),Ae=ee(Ae,!0),{type:"codespan",raw:Ee[0],text:Ae}}},me.br=function(ge){var Ee=this.rules.inline.br.exec(ge);if(Ee)return{type:"br",raw:Ee[0]}},me.del=function(ge){var Ee=this.rules.inline.del.exec(ge);if(Ee)return{type:"del",raw:Ee[0],text:Ee[1]}},me.autolink=function(ge,Ee){var Ae=this.rules.inline.autolink.exec(ge);if(Ae){var De,Me;return Ae[2]==="@"?(De=ee(this.options.mangle?Ee(Ae[1]):Ae[1]),Me="mailto:"+De):(De=ee(Ae[1]),Me=De),{type:"link",raw:Ae[0],text:De,href:Me,tokens:[{type:"text",raw:De,text:De}]}}},me.url=function(ge,Ee){var Ae;if(Ae=this.rules.inline.url.exec(ge)){var De,Me;if(Ae[2]==="@")De=ee(this.options.mangle?Ee(Ae[0]):Ae[0]),Me="mailto:"+De;else{var He;do He=Ae[0],Ae[0]=this.rules.inline._backpedal.exec(Ae[0])[0];while(He!==Ae[0]);De=ee(Ae[0]),Ae[1]==="www."?Me="http://"+De:Me=De}return{type:"link",raw:Ae[0],text:De,href:Me,tokens:[{type:"text",raw:De,text:De}]}}},me.inlineText=function(ge,Ee,Ae){var De=this.rules.inline.text.exec(ge);if(De){var Me;return Ee?Me=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(De[0]):ee(De[0]):De[0]:Me=ee(this.options.smartypants?Ae(De[0]):De[0]),{type:"text",raw:De[0],text:Me}}},he}(),fe=B.noopTest,Re=B.edit,Oe=B.merge,de={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:fe,table:fe,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};de._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,de._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,de.def=Re(de.def).replace("label",de._label).replace("title",de._title).getRegex(),de.bullet=/(?:[*+-]|\d{1,9}[.)])/,de.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,de.item=Re(de.item,"gm").replace(/bull/g,de.bullet).getRegex(),de.list=Re(de.list).replace(/bull/g,de.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+de.def.source+")").getRegex(),de._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",de._comment=//,de.html=Re(de.html,"i").replace("comment",de._comment).replace("tag",de._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),de.paragraph=Re(de._paragraph).replace("hr",de.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",de._tag).getRegex(),de.blockquote=Re(de.blockquote).replace("paragraph",de.paragraph).getRegex(),de.normal=Oe({},de),de.gfm=Oe({},de.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),de.gfm.nptable=Re(de.gfm.nptable).replace("hr",de.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",de._tag).getRegex(),de.gfm.table=Re(de.gfm.table).replace("hr",de.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",de._tag).getRegex(),de.pedantic=Oe({},de.normal,{html:Re(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",de._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:fe,paragraph:Re(de.normal._paragraph).replace("hr",de.hr).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",de.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var te={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:fe,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:fe,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",te.punctuation=Re(te.punctuation).replace(/punctuation/g,te._punctuation).getRegex(),te._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",te._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",te.em.start=Re(te.em.start).replace(/punctuation/g,te._punctuation).getRegex(),te.em.middle=Re(te.em.middle).replace(/punctuation/g,te._punctuation).replace(/overlapSkip/g,te._overlapSkip).getRegex(),te.em.endAst=Re(te.em.endAst,"g").replace(/punctuation/g,te._punctuation).getRegex(),te.em.endUnd=Re(te.em.endUnd,"g").replace(/punctuation/g,te._punctuation).getRegex(),te.strong.start=Re(te.strong.start).replace(/punctuation/g,te._punctuation).getRegex(),te.strong.middle=Re(te.strong.middle).replace(/punctuation/g,te._punctuation).replace(/blockSkip/g,te._blockSkip).getRegex(),te.strong.endAst=Re(te.strong.endAst,"g").replace(/punctuation/g,te._punctuation).getRegex(),te.strong.endUnd=Re(te.strong.endUnd,"g").replace(/punctuation/g,te._punctuation).getRegex(),te.blockSkip=Re(te._blockSkip,"g").getRegex(),te.overlapSkip=Re(te._overlapSkip,"g").getRegex(),te._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,te._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,te._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,te.autolink=Re(te.autolink).replace("scheme",te._scheme).replace("email",te._email).getRegex(),te._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,te.tag=Re(te.tag).replace("comment",de._comment).replace("attribute",te._attribute).getRegex(),te._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,te._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,te._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,te.link=Re(te.link).replace("label",te._label).replace("href",te._href).replace("title",te._title).getRegex(),te.reflink=Re(te.reflink).replace("label",te._label).getRegex(),te.reflinkSearch=Re(te.reflinkSearch,"g").replace("reflink",te.reflink).replace("nolink",te.nolink).getRegex(),te.normal=Oe({},te),te.pedantic=Oe({},te.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Re(/^!?\[(label)\]\((.*?)\)/).replace("label",te._label).getRegex(),reflink:Re(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",te._label).getRegex()}),te.gfm=Oe({},te.normal,{escape:Re(te.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\.5&&(ge="x"+ge.toString(16)),me+="&#"+ge+";";return me}var ne=function(){function he(Ce){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ce||Y,this.options.tokenizer=this.options.tokenizer||new _e,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ge={block:V.normal,inline:Q.normal};this.options.pedantic?(ge.block=V.pedantic,ge.inline=Q.pedantic):this.options.gfm&&(ge.block=V.gfm,this.options.breaks?ge.inline=Q.breaks:ge.inline=Q.gfm),this.tokenizer.rules=ge}he.lex=function(ge,Ee){var Ae=new he(Ee);return Ae.lex(ge)};var me=he.prototype;return me.lex=function(ge){return ge=ge.replace(/\r\n|\r/g,` `).replace(/\t/g," "),this.blockTokens(ge,this.tokens,!0),this.inline(this.tokens),this.tokens},me.blockTokens=function(ge,Ee,Ae){Ee===void 0&&(Ee=[]),Ae===void 0&&(Ae=!0),ge=ge.replace(/^ +$/gm,"");for(var De,Me,He,nt;ge;){if(De=this.tokenizer.space(ge)){ge=ge.substring(De.raw.length),De.type&&Ee.push(De);continue}if(De=this.tokenizer.code(ge,Ee)){ge=ge.substring(De.raw.length),De.type?Ee.push(De):(nt=Ee[Ee.length-1],nt.raw+=` `+De.raw,nt.text+=` `+De.text);continue}if(De=this.tokenizer.fences(ge)){ge=ge.substring(De.raw.length),Ee.push(De);continue}if(De=this.tokenizer.heading(ge)){ge=ge.substring(De.raw.length),Ee.push(De);continue}if(De=this.tokenizer.nptable(ge)){ge=ge.substring(De.raw.length),Ee.push(De);continue}if(De=this.tokenizer.hr(ge)){ge=ge.substring(De.raw.length),Ee.push(De);continue}if(De=this.tokenizer.blockquote(ge)){ge=ge.substring(De.raw.length),De.tokens=this.blockTokens(De.text,[],Ae),Ee.push(De);continue}if(De=this.tokenizer.list(ge)){for(ge=ge.substring(De.raw.length),He=De.items.length,Me=0;Me0)for(;(at=this.tokenizer.rules.inline.reflinkSearch.exec(nt))!=null;)it.includes(at[0].slice(at[0].lastIndexOf("[")+1,-1))&&(nt=nt.slice(0,at.index)+"["+"a".repeat(at[0].length-2)+"]"+nt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(at=this.tokenizer.rules.inline.blockSkip.exec(nt))!=null;)nt=nt.slice(0,at.index)+"["+"a".repeat(at[0].length-2)+"]"+nt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;ge;){if(He=this.tokenizer.escape(ge)){ge=ge.substring(He.raw.length),Ee.push(He);continue}if(He=this.tokenizer.tag(ge,Ae,De)){ge=ge.substring(He.raw.length),Ae=He.inLink,De=He.inRawBlock,Ee.push(He);continue}if(He=this.tokenizer.link(ge)){ge=ge.substring(He.raw.length),He.type==="link"&&(He.tokens=this.inlineTokens(He.text,[],!0,De)),Ee.push(He);continue}if(He=this.tokenizer.reflink(ge,this.tokens.links)){ge=ge.substring(He.raw.length),He.type==="link"&&(He.tokens=this.inlineTokens(He.text,[],!0,De)),Ee.push(He);continue}if(He=this.tokenizer.strong(ge,nt,Me)){ge=ge.substring(He.raw.length),He.tokens=this.inlineTokens(He.text,[],Ae,De),Ee.push(He);continue}if(He=this.tokenizer.em(ge,nt,Me)){ge=ge.substring(He.raw.length),He.tokens=this.inlineTokens(He.text,[],Ae,De),Ee.push(He);continue}if(He=this.tokenizer.codespan(ge)){ge=ge.substring(He.raw.length),Ee.push(He);continue}if(He=this.tokenizer.br(ge)){ge=ge.substring(He.raw.length),Ee.push(He);continue}if(He=this.tokenizer.del(ge)){ge=ge.substring(He.raw.length),He.tokens=this.inlineTokens(He.text,[],Ae,De),Ee.push(He);continue}if(He=this.tokenizer.autolink(ge,ie)){ge=ge.substring(He.raw.length),Ee.push(He);continue}if(!Ae&&(He=this.tokenizer.url(ge,ie))){ge=ge.substring(He.raw.length),Ee.push(He);continue}if(He=this.tokenizer.inlineText(ge,De,q)){ge=ge.substring(He.raw.length),Me=He.raw.slice(-1),Ee.push(He);continue}if(ge){var st="Infinite loop on byte: "+ge.charCodeAt(0);if(this.options.silent){console.error(st);break}else throw new Error(st)}}return Ee},g(he,null,[{key:"rules",get:function(){return{block:V,inline:Q}}}]),he}(),J=C.defaults,$=B.cleanUrl,le=B.escape,ce=function(){function he(Ce){this.options=Ce||J}var me=he.prototype;return me.code=function(ge,Ee,Ae){var De=(Ee||"").match(/\S*/)[0];if(this.options.highlight){var Me=this.options.highlight(ge,De);Me!=null&&Me!==ge&&(Ae=!0,ge=Me)}return De?'
    '+(Ae?ge:le(ge,!0))+`
    `:"
    "+(Ae?ge:le(ge,!0))+`
    `},me.blockquote=function(ge){return`
    `+ge+`
    `},me.html=function(ge){return ge},me.heading=function(ge,Ee,Ae,De){return this.options.headerIds?"'+ge+" `:""+ge+" `},me.hr=function(){return this.options.xhtml?`
    `:`
    `},me.list=function(ge,Ee,Ae){var De=Ee?"ol":"ul",Me=Ee&&Ae!==1?' start="'+Ae+'"':"";return"<"+De+Me+`> `+ge+" `},me.listitem=function(ge){return"
  • "+ge+`
  • `},me.checkbox=function(ge){return" "},me.paragraph=function(ge){return"

    "+ge+`

    `},me.table=function(ge,Ee){return Ee&&(Ee=""+Ee+""),` `+ge+` `+Ee+`
    `},me.tablerow=function(ge){return` `+ge+` `},me.tablecell=function(ge,Ee){var Ae=Ee.header?"th":"td",De=Ee.align?"<"+Ae+' align="'+Ee.align+'">':"<"+Ae+">";return De+ge+" `},me.strong=function(ge){return""+ge+""},me.em=function(ge){return""+ge+""},me.codespan=function(ge){return""+ge+""},me.br=function(){return this.options.xhtml?"
    ":"
    "},me.del=function(ge){return""+ge+""},me.link=function(ge,Ee,Ae){if(ge=$(this.options.sanitize,this.options.baseUrl,ge),ge===null)return Ae;var De='",De},me.image=function(ge,Ee,Ae){if(ge=$(this.options.sanitize,this.options.baseUrl,ge),ge===null)return Ae;var De=''+Ae+'":">",De},me.text=function(ge){return ge},he}(),we=function(){function he(){}var me=he.prototype;return me.strong=function(ge){return ge},me.em=function(ge){return ge},me.codespan=function(ge){return ge},me.del=function(ge){return ge},me.html=function(ge){return ge},me.text=function(ge){return ge},me.link=function(ge,Ee,Ae){return""+Ae},me.image=function(ge,Ee,Ae){return""+Ae},me.br=function(){return""},he}(),Fe=function(){function he(){this.seen={}}var me=he.prototype;return me.slug=function(ge){var Ee=ge.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Ee)){var Ae=Ee;do this.seen[Ae]++,Ee=Ae+"-"+this.seen[Ae];while(this.seen.hasOwnProperty(Ee))}return this.seen[Ee]=0,Ee},he}(),Xe=C.defaults,$e=B.unescape,Ye=function(){function he(Ce){this.options=Ce||Xe,this.options.renderer=this.options.renderer||new ce,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new we,this.slugger=new Fe}he.parse=function(ge,Ee){var Ae=new he(Ee);return Ae.parse(ge)};var me=he.prototype;return me.parse=function(ge,Ee){Ee===void 0&&(Ee=!0);var Ae="",De,Me,He,nt,at,it,st,Tt,pt,ht,Ft,Lt,Yt,$t,Mt,wt,Jt,Dt,St=ge.length;for(De=0;De0&&Mt.tokens[0].type==="text"?(Mt.tokens[0].text=Dt+" "+Mt.tokens[0].text,Mt.tokens[0].tokens&&Mt.tokens[0].tokens.length>0&&Mt.tokens[0].tokens[0].type==="text"&&(Mt.tokens[0].tokens[0].text=Dt+" "+Mt.tokens[0].tokens[0].text)):Mt.tokens.unshift({type:"text",text:Dt}):$t+=Dt),$t+=this.parse(Mt.tokens,Yt),pt+=this.renderer.listitem($t,Jt,wt);Ae+=this.renderer.list(pt,Ft,Lt);continue}case"html":{Ae+=this.renderer.html(ht.text);continue}case"paragraph":{Ae+=this.renderer.paragraph(this.parseInline(ht.tokens));continue}case"text":{for(pt=ht.tokens?this.parseInline(ht.tokens):ht.text;De+1An error occurred:

    "+Pe(He.message+"",!0)+"
    ";throw He}}ye.options=ye.setOptions=function(he){return Ze(ye.defaults,he),Je(ye.defaults),ye},ye.getDefaults=Ie,ye.defaults=rt,ye.use=function(he){var me=Ze({},he);if(he.renderer&&function(){var ge=ye.defaults.renderer||new ce,Ee=function(Me){var He=ge[Me];ge[Me]=function(){for(var nt=arguments.length,at=new Array(nt),it=0;it=0;i--){if(!S(c[i]))continue;var n=c[i].split("="),l=unescape(n[0]),f=unescape(n[1]);r(f,l)}}function C(r,c){if(!r)return;k.cookie=escape(r)+"="+escape(c)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function _(r){if(!r||!h(r))return;k.cookie=escape(r)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function e(){m(function(r,c){_(c)})}function h(r){return new RegExp("(?:^|;\\s*)"+escape(r).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(k.cookie)}},E4JC:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("ETIr"),I("cv67"),I("K3mO"),I("OLod"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.StreamCipher,v=g.algo,m=[],C=[],_=[],e=v.Rabbit=k.extend({_doReset:function(){for(var r=this._key.words,c=this.cfg.iv,i=0;i<4;i++)r[i]=(r[i]<<8|r[i]>>>24)&16711935|(r[i]<<24|r[i]>>>8)&4278255360;var n=this._X=[r[0],r[3]<<16|r[2]>>>16,r[1],r[0]<<16|r[3]>>>16,r[2],r[1]<<16|r[0]>>>16,r[3],r[2]<<16|r[1]>>>16],l=this._C=[r[2]<<16|r[2]>>>16,r[0]&4294901760|r[1]&65535,r[3]<<16|r[3]>>>16,r[1]&4294901760|r[2]&65535,r[0]<<16|r[0]>>>16,r[2]&4294901760|r[3]&65535,r[1]<<16|r[1]>>>16,r[3]&4294901760|r[0]&65535];this._b=0;for(var i=0;i<4;i++)h.call(this);for(var i=0;i<8;i++)l[i]^=n[i+4&7];if(c){var f=c.words,d=f[0],u=f[1],o=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360,s=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,E=o>>>16|s&4294901760,b=s<<16|o&65535;l[0]^=o,l[1]^=E,l[2]^=s,l[3]^=b,l[4]^=o,l[5]^=E,l[6]^=s,l[7]^=b;for(var i=0;i<4;i++)h.call(this)}},_doProcessBlock:function(r,c){var i=this._X;h.call(this),m[0]=i[0]^i[5]>>>16^i[3]<<16,m[1]=i[2]^i[7]>>>16^i[5]<<16,m[2]=i[4]^i[1]>>>16^i[7]<<16,m[3]=i[6]^i[3]>>>16^i[1]<<16;for(var n=0;n<4;n++)m[n]=(m[n]<<8|m[n]>>>24)&16711935|(m[n]<<24|m[n]>>>8)&4278255360,r[c+n]^=m[n]},blockSize:128/32,ivSize:64/32});function h(){for(var r=this._X,c=this._C,i=0;i<8;i++)C[i]=c[i];c[0]=c[0]+1295307597+this._b|0,c[1]=c[1]+3545052371+(c[0]>>>0>>0?1:0)|0,c[2]=c[2]+886263092+(c[1]>>>0>>0?1:0)|0,c[3]=c[3]+1295307597+(c[2]>>>0>>0?1:0)|0,c[4]=c[4]+3545052371+(c[3]>>>0>>0?1:0)|0,c[5]=c[5]+886263092+(c[4]>>>0>>0?1:0)|0,c[6]=c[6]+1295307597+(c[5]>>>0>>0?1:0)|0,c[7]=c[7]+3545052371+(c[6]>>>0>>0?1:0)|0,this._b=c[7]>>>0>>0?1:0;for(var i=0;i<8;i++){var n=r[i]+c[i],l=n&65535,f=n>>>16,d=((l*l>>>17)+l*f>>>15)+f*f,u=((n&4294901760)*n|0)+((n&65535)*n|0);_[i]=d^u}r[0]=_[0]+(_[7]<<16|_[7]>>>16)+(_[6]<<16|_[6]>>>16)|0,r[1]=_[1]+(_[0]<<8|_[0]>>>24)+_[7]|0,r[2]=_[2]+(_[1]<<16|_[1]>>>16)+(_[0]<<16|_[0]>>>16)|0,r[3]=_[3]+(_[2]<<8|_[2]>>>24)+_[1]|0,r[4]=_[4]+(_[3]<<16|_[3]>>>16)+(_[2]<<16|_[2]>>>16)|0,r[5]=_[5]+(_[4]<<8|_[4]>>>24)+_[3]|0,r[6]=_[6]+(_[5]<<16|_[5]>>>16)+(_[4]<<16|_[4]>>>16)|0,r[7]=_[7]+(_[6]<<8|_[6]>>>24)+_[5]|0}g.Rabbit=k._createHelper(e)}(),N.Rabbit})},ELLl:function(H,Z,I){(function(N){N(I("VrN/"))})(function(N){var g={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},S=N.Pos;N.defineOption("autoCloseBrackets",!1,function(l,f,d){d&&d!=N.Init&&(l.removeKeyMap(v),l.state.closeBrackets=null),f&&(m(k(f,"pairs")),l.state.closeBrackets=f,l.addKeyMap(v))});function k(l,f){return f=="pairs"&&typeof l=="string"?l:typeof l=="object"&&l[f]!=null?l[f]:g[f]}var v={Backspace:e,Enter:h};function m(l){for(var f=0;f=0;o--){var E=u[o].head;l.replaceRange("",S(E.line,E.ch-1),S(E.line,E.ch+1),"+delete")}}function h(l){var f=_(l),d=f&&k(f,"explode");if(!d||l.getOption("disableInput"))return N.Pass;for(var u=l.listSelections(),o=0;o0;return{anchor:new S(l.anchor.line,l.anchor.ch+(f?-1:1)),head:new S(l.head.line,l.head.ch+(f?1:-1))}}function c(l,f){var d=_(l);if(!d||l.getOption("disableInput"))return N.Pass;var u=k(d,"pairs"),o=u.indexOf(f);if(o==-1)return N.Pass;for(var s=k(d,"closeBefore"),E=k(d,"triples"),b=u.charAt(o+1)==f,p=l.listSelections(),D=o%2==0,R,y=0;y=0&&l.getRange(w,S(w.line,w.ch+3))==f+f+f?T="skipThree":T="skip";else if(b&&w.ch>1&&E.indexOf(f)>=0&&l.getRange(S(w.line,w.ch-2),w)==f+f){if(w.ch>2&&/\bstring/.test(l.getTokenTypeAt(S(w.line,w.ch-2))))return N.Pass;T="addFour"}else if(b){var P=w.ch==0?" ":l.getRange(S(w.line,w.ch-1),w);if(!N.isWordChar(F)&&P!=f&&!N.isWordChar(P))T="both";else return N.Pass}else if(D&&(F.length===0||/\s/.test(F)||s.indexOf(F)>-1))T="both";else return N.Pass;if(!R)R=T;else if(R!=T)return N.Pass}var A=o%2?u.charAt(o-1):f,X=o%2?f:u.charAt(o+1);l.operation(function(){if(R=="skip")l.execCommand("goCharRight");else if(R=="skipThree")for(var z=0;z<3;z++)l.execCommand("goCharRight");else if(R=="surround"){for(var O=l.getSelections(),z=0;z>>24)&16711935|(R<<24|R>>>8)&4278255360}var y=this._hash.words,x=c.words,w=i.words,T=_.words,F=e.words,P=h.words,A=r.words,X,z,O,B,U,L,G,ee,oe,ae;L=X=y[0],G=z=y[1],ee=O=y[2],oe=B=y[3],ae=U=y[4];for(var be,p=0;p<80;p+=1)be=X+E[b+T[p]]|0,p<16?be+=l(z,O,B)+x[0]:p<32?be+=f(z,O,B)+x[1]:p<48?be+=d(z,O,B)+x[2]:p<64?be+=u(z,O,B)+x[3]:be+=o(z,O,B)+x[4],be=be|0,be=s(be,P[p]),be=be+U|0,X=U,U=B,B=s(O,10),O=z,z=be,be=L+E[b+F[p]]|0,p<16?be+=o(G,ee,oe)+w[0]:p<32?be+=u(G,ee,oe)+w[1]:p<48?be+=d(G,ee,oe)+w[2]:p<64?be+=f(G,ee,oe)+w[3]:be+=l(G,ee,oe)+w[4],be=be|0,be=s(be,A[p]),be=be+ae|0,L=ae,ae=oe,oe=s(ee,10),ee=G,G=be;be=y[1]+O+oe|0,y[1]=y[2]+B+ae|0,y[2]=y[3]+U+L|0,y[3]=y[4]+X+G|0,y[4]=y[0]+z+ee|0,y[0]=be},_doFinalize:function(){var E=this._data,b=E.words,p=this._nDataBytes*8,D=E.sigBytes*8;b[D>>>5]|=128<<24-D%32,b[(D+64>>>9<<4)+14]=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360,E.sigBytes=(b.length+1)*4,this._process();for(var R=this._hash,y=R.words,x=0;x<5;x++){var w=y[x];y[x]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360}return R},clone:function(){var E=m.clone.call(this);return E._hash=this._hash.clone(),E}});function l(E,b,p){return E^b^p}function f(E,b,p){return E&b|~E&p}function d(E,b,p){return(E|~b)^p}function u(E,b,p){return E&p|b&~p}function o(E,b,p){return E^(b|~p)}function s(E,b){return E<>>32-b}S.RIPEMD160=m._createHelper(n),S.HmacRIPEMD160=m._createHmacHelper(n)}(Math),N.RIPEMD160})},ETIr:function(H,Z,I){(function(N,g){H.exports=Z=g(I("Ib8C"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.WordArray,v=g.enc,m=v.Base64={stringify:function(_){var e=_.words,h=_.sigBytes,r=this._map;_.clamp();for(var c=[],i=0;i>>2]>>>24-i%4*8&255,l=e[i+1>>>2]>>>24-(i+1)%4*8&255,f=e[i+2>>>2]>>>24-(i+2)%4*8&255,d=n<<16|l<<8|f,u=0;u<4&&i+u*.75>>6*(3-u)&63));var o=r.charAt(64);if(o)for(;c.length%4;)c.push(o);return c.join("")},parse:function(_){var e=_.length,h=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var c=0;c>>6-i%4*2,f=n|l;r[c>>>2]|=f<<24-c%4*8,c++}return k.create(r,c)}}(),N.enc.Base64})},"F+F2":function(H,Z,I){(function(N,g){H.exports=Z=g(I("Ib8C"))})(this,function(N){return function(){if(typeof ArrayBuffer!="function")return;var g=N,S=g.lib,k=S.WordArray,v=k.init,m=k.init=function(C){if(C instanceof ArrayBuffer&&(C=new Uint8Array(C)),(C instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&C instanceof Uint8ClampedArray||C instanceof Int16Array||C instanceof Uint16Array||C instanceof Int32Array||C instanceof Uint32Array||C instanceof Float32Array||C instanceof Float64Array)&&(C=new Uint8Array(C.buffer,C.byteOffset,C.byteLength)),C instanceof Uint8Array){for(var _=C.byteLength,e=[],h=0;h<_;h++)e[h>>>2]|=C[h]<<24-h%4*8;v.call(this,e,_)}else v.apply(this,arguments)};m.prototype=k}(),N.lib.WordArray})},FWmy:function(H,Z,I){"use strict";I.d(Z,"a",function(){return N});function N(g,S){if(!g)throw new Error(S?`Assertion failed (${S})`:"Assertion Failed")}},GRuw:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("lPiR"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.WordArray,v=g.algo,m=v.SHA256,C=v.SHA224=m.extend({_doReset:function(){this._hash=new k.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var _=m._doFinalize.call(this);return _.sigBytes-=4,_}});g.SHA224=m._createHelper(C),g.HmacSHA224=m._createHmacHelper(C)}(),N.SHA224})},GfqC:function(H,Z,I){"use strict";var N=I("q1tI"),g=I.n(N),S=I("TSYQ"),k=I.n(S);function v(B,U){var L="cannot "+B.method+" "+B.action+" "+U.status+"'",G=new Error(L);return G.status=U.status,G.method=B.method,G.url=B.action,G}function m(B){var U=B.responseText||B.response;if(!U)return U;try{return JSON.parse(U)}catch(L){return U}}function C(B){var U=new XMLHttpRequest;B.onProgress&&U.upload&&(U.upload.onprogress=function(oe){oe.total>0&&(oe.percent=oe.loaded/oe.total*100),B.onProgress(oe)});var L=new FormData;B.data&&Object.keys(B.data).forEach(function(ee){var oe=B.data[ee];if(Array.isArray(oe)){oe.forEach(function(ae){L.append(ee+"[]",ae)});return}L.append(ee,B.data[ee])}),B.file instanceof Blob?L.append(B.filename,B.file,B.file.name):L.append(B.filename,B.file),U.onerror=function(oe){B.onError(oe)},U.onload=function(){return U.status<200||U.status>=300?B.onError(v(B,U),m(U)):B.onSuccess(m(U),U)},U.open(B.method,B.action,!0),B.withCredentials&&"withCredentials"in U&&(U.withCredentials=!0);var G=B.headers||{};return G["X-Requested-With"]!==null&&U.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(G).forEach(function(ee){G[ee]!==null&&U.setRequestHeader(ee,G[ee])}),U.send(L),{abort:function(){U.abort()}}}var _=+new Date,e=0;function h(){return"rc-upload-"+_+"-"+ ++e}function r(B,U){return B.indexOf(U,B.length-U.length)!==-1}var c=function(B,U){if(B&&U){var L=Array.isArray(U)?U:U.split(","),G=B.name||"",ee=B.type||"",oe=ee.replace(/\/.*$/,"");return L.some(function(ae){var be=ae.trim();return be.charAt(0)==="."?r(G.toLowerCase(),be.toLowerCase()):/\/\*$/.test(be)?oe===be.replace(/\/.*$/,""):ee===be})}return!0};function i(B,U){var L=B.createReader(),G=[];function ee(){L.readEntries(function(oe){var ae=Array.prototype.slice.apply(oe);G=G.concat(ae);var be=!ae.length;be?U(G):ee()})}ee()}var n=function(U,L,G){var ee=function oe(ae,be){be=be||"",ae.isFile?ae.file(function(_e){G(_e)&&(ae.fullPath&&!_e.webkitRelativePath&&(Object.defineProperties(_e,{webkitRelativePath:{writable:!0}}),_e.webkitRelativePath=ae.fullPath.replace(/^\//,""),Object.defineProperties(_e,{webkitRelativePath:{writable:!1}})),L([_e]))}):ae.isDirectory&&i(ae,function(_e){_e.forEach(function(fe){oe(fe,""+be+ae.name+"/")})})};U.forEach(function(oe){ee(oe.webkitGetAsEntry())})},l=n,f=Object.assign||function(B){for(var U=1;U=0)continue;if(!Object.prototype.hasOwnProperty.call(B,G))continue;L[G]=B[G]}return L}function E(B,U){if(!(B instanceof U))throw new TypeError("Cannot call a class as a function")}function b(B,U){if(!B)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:B}function p(B,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);B.prototype=Object.create(U&&U.prototype,{constructor:{value:B,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(B,U):B.__proto__=U)}var D=function(U){return Object.keys(U).reduce(function(L,G){return(G.substr(0,5)==="data-"||G.substr(0,5)==="aria-"||G==="role")&&(L[G]=U[G]),L},{})},R=function(B){p(U,B);function U(){var L,G,ee,oe;E(this,U);for(var ae=arguments.length,be=Array(ae),_e=0;_e>>2]>>>24-D%4*8&255;s[b+D>>>2]|=R<<24-(b+D)%4*8}else for(var y=0;y>>2]=E[y>>>2];return this.sigBytes+=p,this},clamp:function(){var o=this.words,s=this.sigBytes;o[s>>>2]&=4294967295<<32-s%4*8,o.length=S.ceil(s/4)},clone:function(){var o=h.clone.call(this);return o.words=this.words.slice(0),o},random:function(o){for(var s=[],E=0;E>>2]>>>24-p%4*8&255;b.push((D>>>4).toString(16)),b.push((D&15).toString(16))}return b.join("")},parse:function(o){for(var s=o.length,E=[],b=0;b>>3]|=parseInt(o.substr(b,2),16)<<24-b%8*4;return new r.init(E,s/2)}},n=c.Latin1={stringify:function(o){for(var s=o.words,E=o.sigBytes,b=[],p=0;p>>2]>>>24-p%4*8&255;b.push(String.fromCharCode(D))}return b.join("")},parse:function(o){for(var s=o.length,E=[],b=0;b>>2]|=(o.charCodeAt(b)&255)<<24-b%4*8;return new r.init(E,s)}},l=c.Utf8={stringify:function(o){try{return decodeURIComponent(escape(n.stringify(o)))}catch(s){throw new Error("Malformed UTF-8 data")}},parse:function(o){return n.parse(unescape(encodeURIComponent(o)))}},f=e.BufferedBlockAlgorithm=h.extend({reset:function(){this._data=new r.init,this._nDataBytes=0},_append:function(o){typeof o=="string"&&(o=l.parse(o)),this._data.concat(o),this._nDataBytes+=o.sigBytes},_process:function(o){var s,E=this._data,b=E.words,p=E.sigBytes,D=this.blockSize,R=D*4,y=p/R;o?y=S.ceil(y):y=S.max((y|0)-this._minBufferSize,0);var x=y*D,w=S.min(x*4,p);if(x){for(var T=0;T>>6)+e(128|X&63):e(224|X>>>12&15)+e(128|X>>>6&63)+e(128|X&63)}else{var X=65536+(A.charCodeAt(0)-55296)*1024+(A.charCodeAt(1)-56320);return e(240|X>>>18&7)+e(128|X>>>12&63)+e(128|X>>>6&63)+e(128|X&63)}},r=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,c=function(A){return A.replace(r,h)},i=function(A){var X=[0,2,1][A.length%3],z=A.charCodeAt(0)<<16|(A.length>1?A.charCodeAt(1):0)<<8|(A.length>2?A.charCodeAt(2):0),O=[C.charAt(z>>>18),C.charAt(z>>>12&63),X>=2?"=":C.charAt(z>>>6&63),X>=1?"=":C.charAt(z&63)];return O.join("")},n=k.btoa&&typeof k.btoa=="function"?function(A){return k.btoa(A)}:function(A){if(A.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return A.replace(/[\s\S]{1,3}/g,i)},l=function(A){return n(c(String(A)))},f=function(A){return A.replace(/[+\/]/g,function(X){return X=="+"?"-":"_"}).replace(/=/g,"")},d=function(A,X){return X?f(l(A)):l(A)},u=function(A){return d(A,!0)},o;k.Uint8Array&&(o=function(A,X){for(var z="",O=0,B=A.length;O>>18)+C.charAt(ee>>>12&63)+(typeof L!="undefined"?C.charAt(ee>>>6&63):"=")+(typeof G!="undefined"?C.charAt(ee&63):"=")}return X?f(z):z});var s=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,E=function(A){switch(A.length){case 4:var X=(7&A.charCodeAt(0))<<18|(63&A.charCodeAt(1))<<12|(63&A.charCodeAt(2))<<6|63&A.charCodeAt(3),z=X-65536;return e((z>>>10)+55296)+e((z&1023)+56320);case 3:return e((15&A.charCodeAt(0))<<12|(63&A.charCodeAt(1))<<6|63&A.charCodeAt(2));default:return e((31&A.charCodeAt(0))<<6|63&A.charCodeAt(1))}},b=function(A){return A.replace(s,E)},p=function(A){var X=A.length,z=X%4,O=(X>0?_[A.charAt(0)]<<18:0)|(X>1?_[A.charAt(1)]<<12:0)|(X>2?_[A.charAt(2)]<<6:0)|(X>3?_[A.charAt(3)]:0),B=[e(O>>>16),e(O>>>8&255),e(O&255)];return B.length-=[0,0,2,1][z],B.join("")},D=k.atob&&typeof k.atob=="function"?function(A){return k.atob(A)}:function(A){return A.replace(/\S{1,4}/g,p)},R=function(A){return D(String(A).replace(/[^A-Za-z0-9\+\/]/g,""))},y=function(A){return b(D(A))},x=function(A){return String(A).replace(/[-_]/g,function(X){return X=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},w=function(A){return y(x(A))},T;k.Uint8Array&&(T=function(A){return Uint8Array.from(R(x(A)),function(X){return X.charCodeAt(0)})});var F=function(){var A=k.Base64;return k.Base64=v,A};if(k.Base64={VERSION:m,atob:R,btoa:n,fromBase64:w,toBase64:d,utob:c,encode:d,encodeURI:u,btou:b,decode:w,noConflict:F,fromUint8Array:o,toUint8Array:T},typeof Object.defineProperty=="function"){var P=function(A){return{value:A,enumerable:!1,writable:!0,configurable:!0}};k.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",P(function(){return w(this)})),Object.defineProperty(String.prototype,"toBase64",P(function(A){return d(this,A)})),Object.defineProperty(String.prototype,"toBase64URI",P(function(){return d(this,!0)}))}}return k.Meteor&&(Base64=k.Base64),H.exports?H.exports.Base64=k.Base64:!(g=[],S=function(){return k.Base64}.apply(Z,g),S!==void 0&&(H.exports=S)),{Base64:k.Base64}})}).call(this,I("IyRk"))},JYp7:function(H,Z,I){"use strict";I.d(Z,"a",function(){return N});var N;(function(g){function S(s){return s&&typeof s=="object"&&typeof s[Symbol.iterator]=="function"}g.is=S;const k=Object.freeze([]);function v(){return k}g.empty=v;function*m(s){yield s}g.single=m;function C(s){return s||k}g.from=C;function _(s){return!s||s[Symbol.iterator]().next().done===!0}g.isEmpty=_;function e(s){return s[Symbol.iterator]().next().value}g.first=e;function h(s,E){for(const b of s)if(E(b))return!0;return!1}g.some=h;function r(s,E){for(const b of s)if(E(b))return b;return}g.find=r;function*c(s,E){for(const b of s)E(b)&&(yield b)}g.filter=c;function*i(s,E){let b=0;for(const p of s)yield E(p,b++)}g.map=i;function*n(...s){for(const E of s)for(const b of E)yield b}g.concat=n;function*l(s){for(const E of s)for(const b of E)yield b}g.concatNested=l;function f(s,E,b){let p=b;for(const D of s)p=E(p,D);return p}g.reduce=f;function*d(s,E,b=s.length){for(E<0&&(E+=s.length),b<0?b+=s.length:b>s.length&&(b=s.length);Ep===D){const p=s[Symbol.iterator](),D=E[Symbol.iterator]();for(;;){const R=p.next(),y=D.next();if(R.done!==y.done)return!1;if(R.done)return!0;if(!b(R.value,y.value))return!1}}g.equals=o})(N||(N={}))},K3mO:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("3y9D"),I("WYAk"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.Base,v=S.WordArray,m=g.algo,C=m.MD5,_=m.EvpKDF=k.extend({cfg:k.extend({keySize:128/32,hasher:C,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,h){for(var r,c=this.cfg,i=c.hasher.create(),n=v.create(),l=n.words,f=c.keySize,d=c.iterations;l.lengthOe)){te.next=7;break}return S.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(Oe/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),te.abrupt("return",!1);case 7:return O.push({name:Re.name,file:Re}),B(Object(k.a)(O)),A.onChange(O),te.abrupt("return",!1);case 11:case"end":return te.stop()}},fe)}));function _e(fe){return be.apply(this,arguments)}return _e}()},ae=function(){var be=Object(_.a)(c.a.mark(function _e(fe,Re){var Oe,de,te,W,Y,V,Q,q,ie,ne;return c.a.wrap(function($){for(;;)switch($.prev=$.next){case 0:return Re.file_name=fe.name,Q=fe.name,$.next=4,Object(l.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if(q=$.sent,q.data=JSON.parse(p(q.data)),!((q==null?void 0:q.status)!==0)){$.next=12;break}return O[O.findIndex(function(le){return le.name===Q})].status="error",O[O.findIndex(function(le){return le.name===Q})].file.status="error",A.onChange(O),S.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),$.abrupt("return");case 12:return G=new E.a({endpoint:q==null||((Oe=q.data)===null||Oe===void 0)?void 0:Oe.end_point,region:q==null||((de=q.data)===null||de===void 0)?void 0:de.region,accessKeyId:q==null||((te=q.data)===null||te===void 0)?void 0:te.access_key_id,accessKeySecret:q==null||((W=q.data)===null||W===void 0)?void 0:W.access_key_secret,bucket:q==null||((Y=q.data)===null||Y===void 0)?void 0:Y.bucket,stsToken:q==null||((V=q.data)===null||V===void 0)?void 0:V.security_token}),console.log(fe,"file"),ee(G),ie=fe.name.split("."),ie.pop(),ne=Re.realFileName?ie:Object(u.a)(),$.abrupt("return",new Promise(function(le,ce){try{var we;G.multipartUpload("".concat(A.identifier,"/").concat(ne).concat(Q.indexOf(".")>-1?"."+Q.split(".").pop():""),new Blob([fe.file],{type:fe.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(Xe,$e,Ye){try{console.log("\u8FDB\u5EA6",Xe,$e,Ye);var Ze=O.findIndex(function(qe){return qe.name===Q});O[Ze].file.percent=Xe*100,O[Ze].tempCheckpoint=$e,B(Object(k.a)(O))}catch(qe){}},checkpoint:O[O.findIndex(function(Fe){return Fe.name===Q})].tempCheckpoint,callback:{customValue:{id:Q+""},url:q==null||((we=q.data)===null||we===void 0)?void 0:we.callback_url,host:q==null?void 0:q.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(l.e)(Re)}}).then(function(Fe){var Xe,$e=O.findIndex(function(Ie){return Ie.name===Q}),Ye="done";if(((Xe=Fe.data)===null||Xe===void 0?void 0:Xe.status)===0){var Ze;fe.response=(Ze=Fe.data)===null||Ze===void 0?void 0:Ze.data;var qe=O.findIndex(function(Ie){return Ie.name===Q});O[qe].status="done",O[qe].file.status="done"}else{var Pe;S.b.warn((Pe=Fe.data)===null||Pe===void 0?void 0:Pe.message),Ye="error"}O[$e].status=Ye,O[$e].file.status=Ye,A.onChange(O),le(Fe==null?void 0:Fe.data)}).catch(function(Fe){O[O.findIndex(function(Xe){return Xe.name===Q})].status="error",O[O.findIndex(function(Xe){return Xe.name===Q})].file.status="error",S.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),B(Object(k.a)(O)),A.onChange(O),ce(Fe),console.log("err:",Fe)})}catch(Fe){}}));case 19:case"end":return $.stop()}},_e)}));return function(fe,Re){return be.apply(this,arguments)}}();return Object(i.useEffect)(function(){O.every(function(be){return be==="done"||be==="error"})&&A.onComplete(O)},[O]),Object(i.useEffect)(function(){if(P){var be;(be=G)===null||be===void 0||be.cancel()}},[P]),Object(i.useEffect)(function(){A.uploading&&O.map(function(){var be=Object(_.a)(c.a.mark(function _e(fe){var Re,Oe;return c.a.wrap(function(te){for(;;)switch(te.prev=te.next){case 0:if(!((!fe.status||fe.status==="error")&&!P)){te.next=6;break}return fe.status="uploading",fe.file.status="uploading",te.next=5,ae(fe,{login:F==null||((Re=F.userInfo)===null||Re===void 0)?void 0:Re.login,container_type:A.container_type,container_id:A.container_id,description:A.description,realFileName:A.realFileName});case 5:Oe=te.sent;case 6:case"end":return te.stop()}},_e)}));return function(_e){return be.apply(this,arguments)}}())},[A.uploading]),n.a.createElement(b,Object(N.a)({},oe,{height:A.height,className:A.className}),n.a.createElement("p",{className:"ant-upload-hint"},A.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};Z.b=Object(o.a)(function(w){var T=w.loading,F=w.globalSetting,P=w.user;return{globalSetting:F,loading:T.models.competitions,user:P}})(x)},KmYQ:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("OLod"))})(this,function(N){return N.pad.ZeroPadding={pad:function(g,S){var k=S*4;g.clamp(),g.sigBytes+=k-(g.sigBytes%k||k)},unpad:function(g){for(var S=g.words,k=g.sigBytes-1,k=g.sigBytes-1;k>=0;k--)if(S[k>>>2]>>>24-k%4*8&255){g.sigBytes=k+1;break}}},N.pad.ZeroPadding})},L9qf:function(H,Z,I){H.exports={flex_box_center:"flex_box_center___3J7Qj",flex_space_between:"flex_space_between___3P3xx",flex_box_vertical_center:"flex_box_vertical_center___3QrMz",flex_box_center_end:"flex_box_center_end___37g4V",flex_box_column:"flex_box_column___2PxMN",wrap:"wrap___1xDeN",in:"in___364z1",btns:"btns___8vHXH",customModal:"customModal___2Vkln"}},LdHM:function(H,Z,I){"use strict";I.d(Z,"b",function(){return s}),I.d(Z,"a",function(){return b});var N=I("1OyB"),g=I("vuIU"),S=I("Ji7U"),k=I("LK+K"),v=I("q1tI"),m=I("rePB"),C=I("Ff2n"),_=I("ODXe"),e=I("4IlW"),h=I("bX4T"),r=I("YrtM"),c=I("TSYQ"),i=I.n(c),n=I("+nKL"),l=I("8OUc"),f=function(G,ee){var oe=G.prefixCls,ae=G.id,be=G.flattenOptions,_e=G.childrenAsData,fe=G.values,Re=G.searchValue,Oe=G.multiple,de=G.defaultActiveFirstOption,te=G.height,W=G.itemHeight,Y=G.notFoundContent,V=G.open,Q=G.menuItemSelectedIcon,q=G.virtual,ie=G.onSelect,ne=G.onToggleOpen,J=G.onActiveValue,$=G.onScroll,le=G.onMouseEnter,ce="".concat(oe,"-item"),we=Object(r.a)(function(){return be},[V,be],function(ue,he){return he[0]&&ue[1]!==he[1]}),Fe=v.useRef(null),Xe=function(he){he.preventDefault()},$e=function(he){Fe.current&&Fe.current.scrollTo({index:he})},Ye=function(he){for(var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Ce=we.length,ge=0;ge1&&arguments[1]!==void 0?arguments[1]:!1;return Object(D.a)(L).map(function(ee,oe){if(!v.isValidElement(ee)||!ee.type)return null;var ae=ee.type.isSelectOptGroup,be=ee.key,_e=ee.props,fe=_e.children,Re=Object(C.a)(_e,["children"]);return G||!ae?R(ee):Object(p.a)(Object(p.a)({key:"__RC_SELECT_GRP__".concat(be===null?oe:be,"__"),label:be},Re),{},{options:y(fe)})}).filter(function(ee){return ee})}var x=I("2Qr1"),w=I("qNPg"),T=I("U8pU"),F=I("Kwbf"),P=I("WKfj");function A(L){var G=L.mode,ee=L.options,oe=L.children,ae=L.backfill,be=L.allowClear,_e=L.placeholder,fe=L.getInputElement,Re=L.showSearch,Oe=L.onSearch,de=L.defaultOpen,te=L.autoFocus,W=L.labelInValue,Y=L.value,V=L.inputValue,Q=L.optionLabelProp,q=G==="multiple"||G==="tags",ie=Re!==void 0?Re:q||G==="combobox",ne=ee||y(oe);if(Object(F.a)(G!=="tags"||ne.every(function(ce){return!ce.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),G==="tags"||G==="combobox"){var J=ne.some(function(ce){return ce.options?ce.options.some(function(we){return typeof("value"in we?we.value:we.key)=="number"}):typeof("value"in ce?ce.value:ce.key)=="number"});Object(F.a)(!J,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(F.a)(G!=="combobox"||!Q,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(F.a)(G==="combobox"||!ae,"`backfill` only works with `combobox` mode."),Object(F.a)(G==="combobox"||!fe,"`getInputElement` only work with `combobox` mode."),Object(F.b)(G!=="combobox"||!fe||!be||!_e,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Oe&&!ie&&G!=="combobox"&&G!=="tags"&&Object(F.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(F.b)(!de||te,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Y!=null){var $=Object(P.d)(Y);Object(F.a)(!W||$.every(function(ce){return Object(T.a)(ce)==="object"&&("key"in ce||"value"in ce)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(F.a)(!q||Array.isArray(Y),"`value` should be array when `mode` is `multiple` or `tags`")}if(oe){var le=null;Object(D.a)(oe).some(function(ce){if(!v.isValidElement(ce)||!ce.type)return!1;var we=ce.type;if(we.isSelectOption)return!1;if(we.isSelectOptGroup){var Fe=Object(D.a)(ce.props.children).every(function(Xe){return!v.isValidElement(Xe)||!ce.type||Xe.type.isSelectOption?!0:(le=Xe.type,!1)});return!Fe}return le=we,!0}),le&&Object(F.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(le.displayName||le.name||le,"`.")),Object(F.a)(V===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var X=A,z=Object(w.a)({prefixCls:"rc-select",components:{optionList:u},convertChildrenToData:y,flattenOptions:x.d,getLabeledValue:x.e,filterOptions:x.b,isValueDisabled:x.g,findValueOption:x.c,warningProps:X,fillOptionsWithMissingValue:x.a}),O=function(L){Object(S.a)(ee,L);var G=Object(k.a)(ee);function ee(){var oe;return Object(N.a)(this,ee),oe=G.apply(this,arguments),oe.selectRef=v.createRef(),oe.focus=function(){oe.selectRef.current.focus()},oe.blur=function(){oe.selectRef.current.blur()},oe}return Object(g.a)(ee,[{key:"render",value:function(){return v.createElement(z,Object.assign({ref:this.selectRef},this.props))}}]),ee}(v.Component);O.Option=s,O.OptGroup=b;var B=O,U=Z.c=B},M8RZ:function(H,Z,I){"use strict";I.d(Z,"a",function(){return e});var N=I("fWQN"),g=I("mtLc"),S=I("yKVA"),k=I("879j"),v=I("q1tI"),m=I.n(v),C=I("i8i4"),_=I.n(C),e=function(h){Object(S.a)(c,h);var r=Object(k.a)(c);function c(i){var n;Object(N.a)(this,c),n=r.call(this,i);var l=window.document;return n.node=l.createElement("div"),l.body.appendChild(n.node),n}return Object(g.a)(c,[{key:"render",value:function(){var n=this.props.children;return Object(C.createPortal)(n,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),c}(m.a.Component)},MFOe:function(H,Z,I){(function(N){var g=m(),S=C(),k=_(),v=typeof window!="undefined"?window:N;H.exports={assign:g,create:S,trim:k,bind:e,slice:h,each:r,map:c,pluck:i,isList:n,isFunction:l,isObject:f,Global:v};function m(){return Object.assign?Object.assign:function(u,o,s,E){for(var b=1;bg.a.None;function l(A){return(X,z=null,O)=>{let B=!1,U;return U=A(L=>B?void 0:(U?U.dispose():B=!0,X.call(z,L)),null,O),B&&U.dispose(),U}}n.once=l;function f(A,X){return b((z,O=null,B)=>A(U=>z.call(O,X(U)),null,B))}n.map=f;function d(A,X){return b((z,O=null,B)=>A(U=>{X(U),z.call(O,U)},null,B))}n.forEach=d;function u(A,X){return b((z,O=null,B)=>A(U=>X(U)&&z.call(O,U),null,B))}n.filter=u;function o(A){return A}n.signal=o;function s(...A){return(X,z=null,O)=>Object(g.e)(...A.map(B=>B(U=>X.call(z,U),null,O)))}n.any=s;function E(A,X,z){let O=z;return f(A,B=>(O=X(O,B),O))}n.reduce=E;function b(A){let X;const z=new e({onFirstListenerAdd(){X=A(z.fire,z)},onLastListenerRemove(){X.dispose()}});return z.event}function p(A,X,z=100,O=!1,B){let U,L,G,ee=0;const oe=new e({leakWarningThreshold:B,onFirstListenerAdd(){U=A(ae=>{ee++,L=X(L,ae),O&&!G&&(oe.fire(L),L=void 0),clearTimeout(G),G=setTimeout(()=>{const be=L;L=void 0,G=void 0,(!O||ee>1)&&oe.fire(be),ee=0},z)})},onLastListenerRemove(){U.dispose()}});return oe.event}n.debounce=p;function D(A,X=(z,O)=>z===O){let z=!0,O;return u(A,B=>{const U=z||!X(B,O);return z=!1,O=B,U})}n.latch=D;function R(A,X){return[n.filter(A,X),n.filter(A,z=>!X(z))]}n.split=R;function y(A,X=!1,z=[]){let O=z.slice(),B=A(G=>{O?O.push(G):L.fire(G)});const U=()=>{O&&O.forEach(G=>L.fire(G)),O=null},L=new e({onFirstListenerAdd(){B||(B=A(G=>L.fire(G)))},onFirstListenerDidAdd(){O&&(X?setTimeout(U):U())},onLastListenerRemove(){B&&B.dispose(),B=null}});return L.event}n.buffer=y;class x{constructor(A){this.event=A}map(A){return new x(f(this.event,A))}forEach(A){return new x(d(this.event,A))}filter(A){return new x(u(this.event,A))}reduce(A,X){return new x(E(this.event,A,X))}latch(){return new x(D(this.event))}debounce(A,X=100,z=!1,O){return new x(p(this.event,A,X,z,O))}on(A,X,z){return this.event(A,X,z)}once(A,X,z){return l(this.event)(A,X,z)}}function w(A){return new x(A)}n.chain=w;function T(A,X,z=O=>O){const O=(...G)=>L.fire(z(...G)),B=()=>A.on(X,O),U=()=>A.removeListener(X,O),L=new e({onFirstListenerAdd:B,onLastListenerRemove:U});return L.event}n.fromNodeEventEmitter=T;function F(A,X,z=O=>O){const O=(...G)=>L.fire(z(...G)),B=()=>A.addEventListener(X,O),U=()=>A.removeEventListener(X,O),L=new e({onFirstListenerAdd:B,onLastListenerRemove:U});return L.event}n.fromDOMEventEmitter=F;function P(A){return new Promise(X=>l(A)(X))}n.toPromise=P})(v||(v={}));class m{constructor(n){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${n}_${m._idPool++}`}start(n){this._stopWatch=new k.a(!0),this._listenerCount=n}stop(){if(this._stopWatch){const n=this._stopWatch.elapsed();this._elapsedOverall+=n,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${n.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}m._idPool=0;let C=-1;class _{constructor(n,l=Math.random().toString(18).slice(2,5)){this.customThreshold=n,this.name=l,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(n){let l=C;if(typeof this.customThreshold=="number"&&(l=this.customThreshold),l<=0||n{const u=this._stacks.get(f)||0;this._stacks.set(f,u-1)}}}class e{constructor(n){var l;this._disposed=!1,this._options=n,this._leakageMon=C>0?new _(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((l=this._options)===null||l===void 0?void 0:l._profName)?new m(this._options._profName):void 0}get event(){return this._event||(this._event=(n,l,f)=>{var d;this._listeners||(this._listeners=new S.a);const u=this._listeners.isEmpty();u&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const o=this._listeners.push(l?[n,l]:n);u&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,n,l);const s=(d=this._leakageMon)===null||d===void 0?void 0:d.check(this._listeners.size),E=Object(g.i)(()=>{if(s&&s(),!this._disposed&&(o(),this._options&&this._options.onLastListenerRemove)){const b=this._listeners&&!this._listeners.isEmpty();b||this._options.onLastListenerRemove(this)}});return f instanceof g.b?f.add(E):Array.isArray(f)&&f.push(E),E}),this._event}fire(n){var l,f;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new S.a);for(let d of this._listeners)this._deliveryQueue.push([d,n]);for((l=this._perfMon)===null||l===void 0||l.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[d,u]=this._deliveryQueue.shift();try{typeof d=="function"?d.call(void 0,u):d[0].call(d[1],u)}catch(o){Object(N.f)(o)}}(f=this._perfMon)===null||f===void 0||f.stop()}}dispose(){var n,l,f,d,u;this._disposed||(this._disposed=!0,(n=this._listeners)===null||n===void 0||n.clear(),(l=this._deliveryQueue)===null||l===void 0||l.clear(),(d=(f=this._options)===null||f===void 0?void 0:f.onLastListenerRemove)===null||d===void 0||d.call(f),(u=this._leakageMon)===null||u===void 0||u.dispose())}}class h extends e{constructor(n){super(n);this._isPaused=0,this._eventQueue=new S.a,this._mergeFn=n==null?void 0:n.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const n=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(n))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(n){this._listeners&&(this._isPaused!==0?this._eventQueue.push(n):super.fire(n))}}class r extends h{constructor(n){var l;super(n);this._delay=(l=n.delay)!==null&&l!==void 0?l:100}fire(n){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(n)}}class c{constructor(){this.buffers=[]}wrapEvent(n){return(l,f,d)=>n(u=>{const o=this.buffers[this.buffers.length-1];o?o.push(()=>l.call(f,u)):l.call(f,u)},void 0,d)}bufferEvents(n){const l=[];this.buffers.push(l);const f=n();return this.buffers.pop(),l.forEach(d=>d()),f}}class i{constructor(){this.listening=!1,this.inputEvent=v.None,this.inputEventListener=g.a.None,this.emitter=new e({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(n){this.inputEvent=n,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=n(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(H,Z,I){"use strict";(function(N,g){I.d(Z,"b",function(){return f}),I.d(Z,"i",function(){return s}),I.d(Z,"f",function(){return E}),I.d(Z,"d",function(){return b}),I.d(Z,"g",function(){return p}),I.d(Z,"h",function(){return D}),I.d(Z,"c",function(){return R}),I.d(Z,"k",function(){return y}),I.d(Z,"j",function(){return x}),I.d(Z,"a",function(){return w}),I.d(Z,"e",function(){return P});var S;const k="en";let v=!1,m=!1,C=!1,_=!1,e=!1,h=!1,r=!1,c,i=k,n,l;const f=typeof self=="object"?self:typeof N=="object"?N:{};let d;typeof f.vscode!="undefined"&&typeof f.vscode.process!="undefined"?d=f.vscode.process:typeof g!="undefined"&&(d=g);const u=typeof((S=d==null?void 0:d.versions)===null||S===void 0?void 0:S.electron)=="string"&&d.type==="renderer";if(typeof navigator=="object"&&!u)l=navigator.userAgent,v=l.indexOf("Windows")>=0,m=l.indexOf("Macintosh")>=0,r=(l.indexOf("Macintosh")>=0||l.indexOf("iPad")>=0||l.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,C=l.indexOf("Linux")>=0,h=!0,c=navigator.language,i=c;else if(typeof d=="object"){v=d.platform==="win32",m=d.platform==="darwin",C=d.platform==="linux",_=C&&!!d.env.SNAP&&!!d.env.SNAP_REVISION,c=k,i=k;const A=d.env.VSCODE_NLS_CONFIG;if(A)try{const X=JSON.parse(A),z=X.availableLanguages["*"];c=X.locale,i=z||k,n=X._translationsConfigFile}catch(X){}e=!0}else console.error("Unable to resolve platform.");let o=0;m?o=1:v?o=3:C&&(o=2);const s=v,E=m,b=C,p=e,D=h,R=r,y=l,x=function(){if(f.setImmediate)return f.setImmediate.bind(f);if(typeof f.postMessage=="function"&&!f.importScripts){let z=[];f.addEventListener("message",B=>{if(B.data&&B.data.vscodeSetImmediateId)for(let U=0,L=z.length;U{const U=++O;z.push({id:U,callback:B}),f.postMessage({vscodeSetImmediateId:U},"*")}}if(typeof(d==null?void 0:d.nextTick)=="function")return d.nextTick.bind(d);const X=Promise.resolve();return z=>X.then(z)}(),w=m||r?2:v?1:3;let T=!0,F=!1;function P(){if(!F){F=!0;const A=new Uint8Array(2);A[0]=1,A[1]=2;const X=new Uint16Array(A.buffer);T=X[0]===(2<<8)+1}return T}}).call(this,I("IyRk"),I("Q2Ig"))},MlIO:function(H,Z,I){(function(N,g){H.exports=Z=g(I("Ib8C"))})(this,function(N){return function(g){var S=N,k=S.lib,v=k.Base,m=k.WordArray,C=S.x64={},_=C.Word=v.extend({init:function(h,r){this.high=h,this.low=r}}),e=C.WordArray=v.extend({init:function(h,r){h=this.words=h||[],r!=g?this.sigBytes=r:this.sigBytes=h.length*8},toX32:function(){for(var h=this.words,r=h.length,c=[],i=0;i=le.length?ce:le[Fe]})}function k($){return $.replace(/[<>&]/g,function(le){switch(le){case"<":return"<";case">":return">";case"&":return"&";default:return le}})}function v($){return $.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function m($,le=" "){const ce=C($,le);return _(ce,le)}function C($,le){if(!$||!le)return $;const ce=le.length;if(ce===0||$.length===0)return $;let we=0;for(;$.indexOf(le,we)===we;)we=we+ce;return $.substring(we)}function _($,le){if(!$||!le)return $;const ce=le.length,we=$.length;if(ce===0||we===0)return $;let Fe=we,Xe=-1;for(;!(Xe=$.lastIndexOf(le,Fe-1),Xe===-1||Xe+ce!==Fe);){if(Xe===0)return"";Fe=Xe}return $.substring(0,Fe)}function e($){return $.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function h($){return $.replace(/\*/g,"")}function r($,le,ce={}){if(!$)throw new Error("Cannot create regex from empty string");le||($=v($)),ce.wholeWord&&(/\B/.test($.charAt(0))||($="\\b"+$),/\B/.test($.charAt($.length-1))||($=$+"\\b"));let we="";return ce.global&&(we+="g"),ce.matchCase||(we+="i"),ce.multiline&&(we+="m"),ce.unicode&&(we+="u"),new RegExp($,we)}function c($){if($.source==="^"||$.source==="^$"||$.source==="$"||$.source==="^\\s*$")return!1;const le=$.exec("");return!!(le&&$.lastIndex===0)}function i($){return($.global?"g":"")+($.ignoreCase?"i":"")+($.multiline?"m":"")+($.unicode?"u":"")}function n($){return $.split(/\r\n|\r|\n/)}function l($){for(let le=0,ce=$.length;le=0;ce--){const we=$.charCodeAt(ce);if(we!==32&&we!==9)return ce}return-1}function u($,le){return $le?1:0}function o($,le,ce=0,we=$.length,Fe=0,Xe=le.length){for(;ceqe)return 1}const $e=we-ce,Ye=Xe-Fe;return $eYe?1:0}function s($,le){return E($,le,0,$.length,0,le.length)}function E($,le,ce=0,we=$.length,Fe=0,Xe=le.length){for(;ce=128||qe>=128)return o($.toLowerCase(),le.toLowerCase(),ce,we,Fe,Xe);b(Ze)&&(Ze-=32),b(qe)&&(qe-=32);const Pe=Ze-qe;if(Pe===0)continue;return Pe}const $e=we-ce,Ye=Xe-Fe;return $eYe?1:0}function b($){return $>=97&&$<=122}function p($){return $>=65&&$<=90}function D($,le){return $.length===le.length&&E($,le)===0}function R($,le){const ce=le.length;return le.length>$.length?!1:E($,le,0,ce)===0}function y($,le){let ce,we=Math.min($.length,le.length);for(ce=0;ce1){const we=$.charCodeAt(le-2);if(w(we))return F(we,ce)}return ce}function X($,le){const ce=V.getInstance(),we=le,Fe=$.length,Xe=P($,Fe,le);le+=Xe>=65536?2:1;let $e=ce.getGraphemeBreakType(Xe);for(;le=65536?2:1,$e=Ze}return le-we}function z($,le){const ce=V.getInstance(),we=le,Fe=A($,le);le-=Fe>=65536?2:1;let Xe=ce.getGraphemeBreakType(Fe);for(;le>0;){const $e=A($,le),Ye=ce.getGraphemeBreakType($e);if(Y(Ye,Xe))break;le-=$e>=65536?2:1,Xe=Ye}return we-le}const O=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function B($){return O.test($)}const U=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function L($){return U.test($)}const G=/^[\t\n\r\x20-\x7E]*$/;function ee($){return G.test($)}const oe=/[\u2028\u2029]/;function ae($){return oe.test($)}function be($){for(let le=0,ce=$.length;le=11904&&$<=55215||$>=63744&&$<=64255||$>=65281&&$<=65374}function fe($){return $>=127462&&$<=127487||$===8986||$===8987||$===9200||$===9203||$>=9728&&$<=10175||$===11088||$===11093||$>=127744&&$<=128591||$>=128640&&$<=128764||$>=128992&&$<=129003||$>=129280&&$<=129535||$>=129648&&$<=129750}const Re=String.fromCharCode(65279);function Oe($){return!!($&&$.length>0&&$.charCodeAt(0)===65279)}function de($,le=!1){return $?(le&&($=$.replace(/\\./g,"")),$.toLowerCase()!==$):!1}function te($){const le=90-65+1;return $=$%(2*le),$le[3*we+1])we=2*we+1;else return le[3*we+2];return 0}}V._INSTANCE=null;function Q(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function q($,le){if($===0)return 0;const ce=ie($,le);if(ce!==void 0)return ce;const we=A(le,$);return $-=ne(we),$}function ie($,le){let ce=A(le,$);for($-=ne(ce);J(ce)||ce===65039||ce===8419;){if($===0)return;ce=A(le,$),$-=ne(ce)}if(!fe(ce))return;if($>=0){const we=A(le,$);we===8205&&($-=ne(we))}return $}function ne($){return $>=65536?2:1}function J($){return 127995<=$&&$<=127999}},NFKh:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("MlIO"),I("F+F2"),I("qM6L"),I("ETIr"),I("wbyO"),I("cv67"),I("3y9D"),I("lPiR"),I("GRuw"),I("1uat"),I("uGsb"),I("5hvy"),I("ELcG"),I("WYAk"),I("e7zE"),I("K3mO"),I("OLod"),I("ALsQ"),I("9OqN"),I("qu8F"),I("S6kV"),I("gb/T"),I("qBft"),I("oRuE"),I("jO9C"),I("KmYQ"),I("uGxW"),I("bQjk"),I("wZgz"),I("pA7S"),I("w7YG"),I("E4JC"),I("PVpz"))})(this,function(N){return N})},NvD2:function(H,Z,I){"use strict";I.d(Z,"a",function(){return m});var N=I("Kwbf");function g(C,_){var e=new Set;return C.forEach(function(h){_.has(h)||e.add(h)}),e}function S(C){var _=C||{},e=_.disabled,h=_.disableCheckbox,r=_.checkable;return!!(e||h)||r===!1}function k(C,_,e,h){for(var r=new Set(C),c=new Set,i=0;i<=e;i+=1){var n=_.get(i)||new Set;n.forEach(function(u){var o=u.key,s=u.node,E=u.children,b=E===void 0?[]:E;r.has(o)&&!h(s)&&b.filter(function(p){return!h(p.node)}).forEach(function(p){r.add(p.key)})})}for(var l=new Set,f=e;f>=0;f-=1){var d=_.get(f)||new Set;d.forEach(function(u){var o=u.parent,s=u.node;if(h(s)||!u.parent||l.has(u.parent.key))return;if(h(u.parent.node)){l.add(o.key);return}var E=!0,b=!1;(o.children||[]).filter(function(p){return!h(p.node)}).forEach(function(p){var D=p.key,R=r.has(D);E&&!R&&(E=!1),!b&&(R||c.has(D))&&(b=!0)}),E&&r.add(o.key),b&&c.add(o.key),l.add(o.key)})}return{checkedKeys:Array.from(r),halfCheckedKeys:Array.from(g(c,r))}}function v(C,_,e,h,r){for(var c=new Set(C),i=new Set(_),n=0;n<=h;n+=1){var l=e.get(n)||new Set;l.forEach(function(o){var s=o.key,E=o.node,b=o.children,p=b===void 0?[]:b;!c.has(s)&&!i.has(s)&&!r(E)&&p.filter(function(D){return!r(D.node)}).forEach(function(D){c.delete(D.key)})})}i=new Set;for(var f=new Set,d=h;d>=0;d-=1){var u=e.get(d)||new Set;u.forEach(function(o){var s=o.parent,E=o.node;if(r(E)||!o.parent||f.has(o.parent.key))return;if(r(o.parent.node)){f.add(s.key);return}var b=!0,p=!1;(s.children||[]).filter(function(D){return!r(D.node)}).forEach(function(D){var R=D.key,y=c.has(R);b&&!y&&(b=!1),!p&&(y||i.has(R))&&(p=!0)}),b||c.delete(s.key),p&&i.add(s.key),f.add(s.key)})}return{checkedKeys:Array.from(c),halfCheckedKeys:Array.from(g(i,c))}}function m(C,_,e,h){var r=[],c;h?c=h:c=S;var i=new Set(C.filter(function(d){var u=!!e[d];return u||r.push(d),u})),n=new Map,l=0;Object.keys(e).forEach(function(d){var u=e[d],o=u.level,s=n.get(o);s||(s=new Set,n.set(o,s)),s.add(u),l=Math.max(l,o)}),Object(N.a)(!r.length,"Tree missing follow keys: ".concat(r.slice(0,100).map(function(d){return"'".concat(d,"'")}).join(", ")));var f;return _===!0?f=k(i,n,l,c):f=v(i,_.halfCheckedKeys,n,l,c),f}},OLod:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("K3mO"))})(this,function(N){N.lib.Cipher||function(g){var S=N,k=S.lib,v=k.Base,m=k.WordArray,C=k.BufferedBlockAlgorithm,_=S.enc,e=_.Utf8,h=_.Base64,r=S.algo,c=r.EvpKDF,i=k.Cipher=C.extend({cfg:v.extend(),createEncryptor:function(w,T){return this.create(this._ENC_XFORM_MODE,w,T)},createDecryptor:function(w,T){return this.create(this._DEC_XFORM_MODE,w,T)},init:function(w,T,F){this.cfg=this.cfg.extend(F),this._xformMode=w,this._key=T,this.reset()},reset:function(){C.reset.call(this),this._doReset()},process:function(w){return this._append(w),this._process()},finalize:function(w){w&&this._append(w);var T=this._doFinalize();return T},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function w(T){return typeof T=="string"?x:D}return function(T){return{encrypt:function(F,P,A){return w(P).encrypt(T,F,P,A)},decrypt:function(F,P,A){return w(P).decrypt(T,F,P,A)}}}}()}),n=k.StreamCipher=i.extend({_doFinalize:function(){var w=this._process(!0);return w},blockSize:1}),l=S.mode={},f=k.BlockCipherMode=v.extend({createEncryptor:function(w,T){return this.Encryptor.create(w,T)},createDecryptor:function(w,T){return this.Decryptor.create(w,T)},init:function(w,T){this._cipher=w,this._iv=T}}),d=l.CBC=function(){var w=f.extend();w.Encryptor=w.extend({processBlock:function(F,P){var A=this._cipher,X=A.blockSize;T.call(this,F,P,X),A.encryptBlock(F,P),this._prevBlock=F.slice(P,P+X)}}),w.Decryptor=w.extend({processBlock:function(F,P){var A=this._cipher,X=A.blockSize,z=F.slice(P,P+X);A.decryptBlock(F,P),T.call(this,F,P,X),this._prevBlock=z}});function T(F,P,A){var X,z=this._iv;z?(X=z,this._iv=g):X=this._prevBlock;for(var O=0;O>>2]&255;w.sigBytes-=T}},s=k.BlockCipher=i.extend({cfg:i.cfg.extend({mode:d,padding:o}),reset:function(){var w;i.reset.call(this);var T=this.cfg,F=T.iv,P=T.mode;this._xformMode==this._ENC_XFORM_MODE?w=P.createEncryptor:(w=P.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==w?this._mode.init(this,F&&F.words):(this._mode=w.call(P,this,F&&F.words),this._mode.__creator=w)},_doProcessBlock:function(w,T){this._mode.processBlock(w,T)},_doFinalize:function(){var w,T=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(T.pad(this._data,this.blockSize),w=this._process(!0)):(w=this._process(!0),T.unpad(w)),w},blockSize:128/32}),E=k.CipherParams=v.extend({init:function(w){this.mixIn(w)},toString:function(w){return(w||this.formatter).stringify(this)}}),b=S.format={},p=b.OpenSSL={stringify:function(w){var T,F=w.ciphertext,P=w.salt;return P?T=m.create([1398893684,1701076831]).concat(P).concat(F):T=F,T.toString(h)},parse:function(w){var T,F=h.parse(w),P=F.words;return P[0]==1398893684&&P[1]==1701076831&&(T=m.create(P.slice(2,4)),P.splice(0,4),F.sigBytes-=16),E.create({ciphertext:F,salt:T})}},D=k.SerializableCipher=v.extend({cfg:v.extend({format:p}),encrypt:function(w,T,F,P){P=this.cfg.extend(P);var A=w.createEncryptor(F,P),X=A.finalize(T),z=A.cfg;return E.create({ciphertext:X,key:F,iv:z.iv,algorithm:w,mode:z.mode,padding:z.padding,blockSize:w.blockSize,formatter:P.format})},decrypt:function(w,T,F,P){P=this.cfg.extend(P),T=this._parse(T,P.format);var A=w.createDecryptor(F,P).finalize(T.ciphertext);return A},_parse:function(w,T){return typeof w=="string"?T.parse(w,this):w}}),R=S.kdf={},y=R.OpenSSL={execute:function(w,T,F,P){P||(P=m.random(64/8));var A=c.create({keySize:T+F}).compute(w,P),X=m.create(A.words.slice(T),F*4);return A.sigBytes=T*4,E.create({key:A,iv:X,salt:P})}},x=k.PasswordBasedCipher=D.extend({cfg:D.cfg.extend({kdf:y}),encrypt:function(w,T,F,P){P=this.cfg.extend(P);var A=P.kdf.execute(F,w.keySize,w.ivSize);P.iv=A.iv;var X=D.encrypt.call(this,w,T,A.key,P);return X.mixIn(A),X},decrypt:function(w,T,F,P){P=this.cfg.extend(P),T=this._parse(T,P.format);var A=P.kdf.execute(F,w.keySize,w.ivSize,T.salt);P.iv=A.iv;var X=D.decrypt.call(this,w,T,A.key,P);return X}})}()})},OZM5:function(H,Z,I){"use strict";I.d(Z,"b",function(){return h}),I.d(Z,"a",function(){return r}),I.d(Z,"k",function(){return c}),I.d(Z,"h",function(){return i}),I.d(Z,"i",function(){return n}),I.d(Z,"g",function(){return l}),I.d(Z,"c",function(){return f}),I.d(Z,"d",function(){return d}),I.d(Z,"j",function(){return s}),I.d(Z,"e",function(){return E}),I.d(Z,"f",function(){return b});var N=I("KQm4"),g=I("U8pU"),S=I("Ff2n"),k=I("q1tI"),v=I.n(k),m=I("Kwbf"),C=I("WaYH"),_=.25,e=2;function h(p,D){var R=p.slice(),y=R.indexOf(D);return y>=0&&R.splice(y,1),R}function r(p,D){var R=p.slice();return R.indexOf(D)===-1&&R.push(D),R}function c(p){return p.split("-")}function i(p,D){return"".concat(p,"-").concat(D)}function n(p){return p&&p.type&&p.type.isTreeNode}function l(p,D){var R=[p],y=D[p];function x(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];w.forEach(function(T){var F=T.key,P=T.children;R.push(F),x(P)})}return x(y.children),R}function f(p,D){var R=p.clientY,y=D.selectHandle.getBoundingClientRect(),x=y.top,w=y.bottom,T=y.height,F=Math.max(T*_,e);return R<=x+F?-1:R>=w-F?1:0}function d(p,D){if(!p)return;var R=D.multiple;return R?p.slice():p.length?[p[0]]:p}var u=function(D){return D};function o(p,D){if(!p)return[];var R=D||{},y=R.processProps,x=y===void 0?u:y,w=Array.isArray(p)?p:[p];return w.map(function(T){var F=T.children,P=Object(S.a)(T,["children"]),A=o(F,D);return v.a.createElement(C.a,Object.assign({},x(P)),A)})}function s(p){if(!p)return null;var D;if(Array.isArray(p))D={checkedKeys:p,halfCheckedKeys:void 0};else if(Object(g.a)(p)==="object")D={checkedKeys:p.checked||void 0,halfCheckedKeys:p.halfChecked||void 0};else return Object(m.a)(!1,"`checkedKeys` is not an array or an object"),null;return D}function E(p,D){var R=new Set;function y(x){if(R.has(x))return;var w=D[x];if(!w)return;R.add(x);var T=w.parent,F=w.node;if(F.disabled)return;T&&y(T.key)}return(p||[]).forEach(function(x){y(x)}),Object(N.a)(R)}function b(p){var D={};return Object.keys(p).forEach(function(R){(R.startsWith("data-")||R.startsWith("aria-"))&&(D[R]=p[R])}),D}},Ot1p:function(H,Z,I){"use strict";var N=I("2qtc"),g=I("kLXV"),S=I("rAM+"),k=I("miYZ"),v=I("tsqr"),m=I("9og8"),C=I("tJVT"),_=I("jrin"),e=I("WmNS"),h=I.n(e),r=I("q1tI"),c=I.n(r),i=I("VrN/"),n=I.n(i),l=I("bdgK"),f=I("p77/"),d=I("Bd2K"),u=I("ELLl"),o=I("19Vz"),s=I("lZu9"),E=I("+NIl"),b=I("kSUc"),p=I("9Bee"),D=function(Me){var He=Me.value,nt=He===void 0?"":He,at=Me.className,it=Me.showTextOnly,st=Me.showLines,Tt=Me.style,pt=Tt===void 0?{}:Tt,ht=Object(r.useMemo)(function(){return""},[nt]);return c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{dangerouslySetInnerHTML:{__html:ht}}))},R=I("0Owb"),y=I("dejd"),x=I("C+DQ"),w=I("1vsH"),T=I("m3rI"),F=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function P(Me){var He=Me.onActionCallback,nt=Me.title,at=Me.icon,it=Me.actionName,st=Me.className,Tt=st===void 0?"":st,pt=Me.children;function ht(){He(it)}return c.a.createElement("a",{title:nt,className:Tt,onClick:ht},c.a.createElement("i",{className:"md-iconfont ".concat(at)}),pt)}var A=function(Me){var He=Me.watch,nt=Me.showNullButton,at=Me.onActionCallback,it=Me.fullScreen,st=Me.insertTemp,Tt=Me.hidetoolBar,pt=Me.uuid,ht=Me.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(w.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(w.F)("_educoder_session"),"&key=").concat(pt,"&api=").concat(encodeURIComponent(T.a.PROXY_SERVER)));var Ft=[].concat(F,[{title:"".concat(He?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(He?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return c.a.createElement("ul",{className:"markdown-toolbar-container"},!Tt&&Ft.map(function(Lt,Yt){return c.a.createElement("li",{key:Yt},Lt.actionName?c.a.createElement(P,Object(R.a)({},Lt,{onActionCallback:at})):c.a.createElement("span",{className:"v-line"}))}),nt?c.a.createElement("li",null,c.a.createElement(P,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:at},c.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,st&&c.a.createElement("li",null,c.a.createElement(P,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(st),onActionCallback:at},c.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),c.a.createElement("li",{className:"btn-full-screen"},c.a.createElement(P,{icon:"".concat(it?"icon-shrink":"icon-enlarge"),title:it?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:at})))},X=I("M8RZ"),z=I("+L6B"),O=I("2/Rp"),B=I("y8nQ"),U=I("Vl3Y"),L=I("5NDa"),G=I("5rEg"),ee={labelCol:{span:4},wrapperCol:{span:20}},oe=function(Me){var He=Me.callback,nt=Me.onCancel;function at(it){He(it)}return c.a.createElement(U.a,Object(R.a)({},ee,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:at}),c.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},c.a.createElement(G.a,null)),c.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},c.a.createElement(G.a,null)),c.a.createElement("div",{className:"flex-container flex-end"},c.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(O.a,{type:"ghost",onClick:nt},"\u53D6\u6D88")))},ae=I("7ahc"),be=I("HmJG"),_e=I("BjJ7"),fe=U.a.useForm,Re={width:280,marginRight:10},Oe={labelCol:{span:5},wrapperCol:{span:19}},de=function(Me){var He=Me.callback,nt=Me.onCancel,at=fe(),it=Object(C.a)(at,1),st=it[0];function Tt(Ft){He(Ft)}function pt(Ft,Lt){if(Ft.status===-1){v.b.error(Ft.message);return}st.setFieldsValue({src:"/api/attachments/".concat(Ft.id),type:Lt.type})}function ht(Ft){var Lt=Ft.target.files[0];W(Lt,pt)}return c.a.createElement(U.a,Object(R.a)({form:st},Oe,{className:"upload-image-panel",onFinish:Tt}),c.a.createElement(U.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},c.a.createElement("div",{className:"flex-container"},c.a.createElement(U.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},c.a.createElement(G.a,{style:Re})),c.a.createElement(te,{onFileChange:ht}))),c.a.createElement(U.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},c.a.createElement(G.a,{style:{width:264}})),c.a.createElement(U.a.Item,{style:{textAlign:"right"}},c.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(O.a,{type:"ghost",onClick:nt},"\u53D6\u6D88")))};function te(Me){var He=Me.onFileChange;return c.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",c.a.createElement("input",{type:"file",onChange:He}))}function W(Me,He){if(!Me)throw new String("\u6CA1\u6709\u6587\u4EF6");var nt=new FormData;nt.append("editormd-image-file",Me),nt.append("file_param_name","editormd-image-file"),nt.append("byxhr","true");var at=new window.XMLHttpRequest;at.withCredentials=!0,at.addEventListener("load",function(it){He(JSON.parse(it.target.responseText),Me)},!1),at.addEventListener("error",function(it){console.error(it)},!1),at.open("POST","".concat(_e.a,"/api/attachments.json")),at.send(nt)}var Y=I("giR+"),V=I("fyUT"),Q=I("7Kak"),q=I("9yH6"),ie=q.a.Group,ne={margin:"0 8px"},J=function(Me){var He=Me.callback,nt=Me.onCancel;function at(it){He(it)}return c.a.createElement(U.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:at},c.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},c.a.createElement("span",{style:ne},"\u5355\u5143\u683C\u6570\uFF1A"),c.a.createElement("span",{style:ne},"\u884C\u6570"),c.a.createElement(U.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},c.a.createElement(V.a,null)),c.a.createElement("span",{style:ne},"\u5217\u6570"),c.a.createElement(U.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},c.a.createElement(V.a,null))),c.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},c.a.createElement("span",{style:ne},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),c.a.createElement(U.a.Item,{name:"align"},c.a.createElement(ie,null,c.a.createElement(q.a,{value:"default"},c.a.createElement("i",{className:"fa fa-align-justify"})),c.a.createElement(q.a,{value:"left"},c.a.createElement("i",{className:"fa fa-align-left"})),c.a.createElement(q.a,{value:"center"},c.a.createElement("i",{className:"fa fa-align-center"})),c.a.createElement(q.a,{value:"right"},c.a.createElement("i",{className:"fa fa-align-right"}))))),c.a.createElement("div",{className:"flex-container flex-end"},c.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(O.a,{type:"ghost",onClick:nt},"\u53D6\u6D88")))},$=I("ErOA"),le=I("7Cbv"),ce="link",we="upload-image",Fe="code-block",Xe="add-table",$e="------------",Ye={default:$e,left:":".concat($e),center:":".concat($e,":"),right:"".concat($e,":")},Ze=I("9VGf"),qe,Pe;function Ie(){}var Je=0,rt=1e4,ye="\u2581",ue=` **\u6A21\u677F\u6807\u9898** \u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`;function he(Me){return/^\d+$/.test(Me)?"".concat(Me,"px"):Me}var me=navigator.platform.toUpperCase().indexOf("MAC")>=0,Ce=me?"Cmd":"Ctrl",ge=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"],Ee=(qe={},Object(_.a)(qe,Ce+"-B","bold"),Object(_.a)(qe,Ce+"-I","italic"),qe),Ae=(Pe={},Object(_.a)(Pe,ce,"\u6DFB\u52A0\u94FE\u63A5"),Object(_.a)(Pe,Fe,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(_.a)(Pe,we,"\u6DFB\u52A0\u6587\u4EF6"),Object(_.a)(Pe,Xe,"\u6DFB\u52A0\u8868\u683C"),Pe),De=Z.a=function(Me){var He=Me.defaultValue,nt=He===void 0?"":He,at=Me.onChange,it=Me.width,st=it===void 0?"100%":it,Tt=Me.height,pt=Tt===void 0?400:Tt,ht=Me.miniToolbar,Ft=ht===void 0?!1:ht,Lt=Me.isFocus,Yt=Lt===void 0?!1:Lt,$t=Me.watch,Mt=Me.insertTemp,wt=Me.mode,Jt=wt===void 0?"markdown":wt,Dt=Me.id,St=Dt===void 0?"markdown-editor-id":Dt,_t=Me.showResizeBar,Et=_t===void 0?!1:_t,Bt=Me.noStorage,Dr=Bt===void 0?!1:Bt,mt=Me.showNullButton,Ct=mt===void 0?!1:mt,dt=Me.hidetoolBar,Ht=dt===void 0?!1:dt,Gt=Me.fullScreen,yt=Gt===void 0?!1:Gt,xt=Me.onBlur,Kt=Me.onCMBeforeChange,Ar=Me.onFullScreen,qt=Me.className,ut=qt===void 0?"":qt,kt=Me.disablePaste,Hr=kt===void 0?!1:kt,Yr=Me.placeholder,On=Yr===void 0?"":Yr,cn=Me.values,zr=cn===void 0?"":cn,Pt=Object(r.useState)(null),dn=Object(C.a)(Pt,2),ct=dn[0],jr=dn[1],xr=Object(r.useState)(nt),Gn=Object(C.a)(xr,2),An=Gn[0],hn=Gn[1],Ei=Object(r.useState)($t),Kn=Object(C.a)(Ei,2),bn=Kn[0],Fr=Kn[1],di=Object(r.useState)(yt),fn=Object(C.a)(di,2),Vr=fn[0],dr=fn[1],nn=Object(r.useState)(""),_n=Object(C.a)(nn,2),jt=_n[0],lr=_n[1],ur=Object(r.useState)(0),Rr=Object(C.a)(ur,2),br=Rr[0],hi=Rr[1],Fn=Object(r.useState)(pt),$i=Object(C.a)(Fn,2),Ji=$i[0],Oi=$i[1],pn=Object(r.useState)(!1),Ki=Object(C.a)(pn,2),Zr=Ki[0],ri=Ki[1],kn=Object(r.useRef)(Object(le.a)()),sn=Object(r.useRef)(!1),Tn=Object(r.useRef)(),fi=Object(r.useRef)(),zn=Object(r.useRef)(),Vn=Object(r.useRef)(),ki=Object(r.useRef)(),Mi=function(){var Ut=Object(m.a)(h.a.mark(function er(){var zt,ar;return h.a.wrap(function(Lr){for(;;)switch(Lr.prev=Lr.next){case 0:return Lr.next=2,Object($.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:kn.current}});case 2:ar=Lr.sent,ar!=null&&(zt=ar.attachments)!==null&&zt!==void 0&&zt.length&&(console.log("cm:",ct,fi),ar.attachments.map(function(mr){mr.content_type.indexOf("image")>-1?ct.replaceSelection("![,](/api/attachments/".concat(mr.id,"?type=").concat(mr.content_type,")")):mr.content_type.indexOf("video")>-1?ct.replaceSelection('')):mr.content_type.indexOf("pdf")>-1?ct.replaceSelection('
    ').concat(mr.name,"")):ct.replaceSelection("[".concat(mr.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(mr.id,"?type=").concat(mr.content_type,")"))}));case 4:case"end":return Lr.stop()}},er)}));return function(){return Ut.apply(this,arguments)}}();Object(r.useEffect)(function(){hn(zr),ct==null||ct.setValue(zr)},[zr]),Object(r.useEffect)(function(){Ar==null||Ar(Vr)},[Vr]),Object(r.useEffect)(function(){if(fi.current){var Ut=n.a.fromTextArea(fi.current,{mode:Jt,lineNumbers:!Ft,lineWrapping:!0,value:nt,autoCloseTags:!0,autoCloseBrackets:!0});Yt&&Ut.focus();function er(zt,ar){if(Hr){ar.preventDefault();return}var _r=ar.clipboardData;if(_r){var Lr=_r.types.toString(),mr=_r.items;if(Lr==="Files"||_r.types.indexOf("Files")>-1){if(ar.preventDefault(),Jt=="stex")return;try{var qr,Un=mr[1];((qr=mr[0])===null||qr===void 0?void 0:qr.kind)==="file"&&(Un=mr[0]);var hr=Un.getAsFile(),vi=hr.name.split(".").pop();W(hr,function(kr){if(kr.id){var Sn,Rn,li;(hr==null||((Sn=hr.type)===null||Sn===void 0)?void 0:Sn.indexOf("image"))>-1?Ut.replaceSelection("![,](/api/attachments/".concat(kr.id,"?type=").concat(kr.content_type,")")):(hr==null||((Rn=hr.type)===null||Rn===void 0)?void 0:Rn.indexOf("video"))>-1?Ut.replaceSelection('')):(hr==null||((li=hr.type)===null||li===void 0)?void 0:li.indexOf("pdf"))>-1?Ut.replaceSelection('').concat(hr.name,"")):ge.includes(vi)?Ut.replaceSelection('').concat(hr.name,"")):Ut.replaceSelection("[".concat(hr.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(kr.id,"?type=").concat(kr.content_type,")"))}else(kr==null?void 0:kr.status)===401&&(document.location.href="/user/login")})}catch(kr){v.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Ut.on("paste",er),Ut.on("dragleave",function(zt,ar){zn.current.classList.remove("mouse-hover-md")}),Ut.on("dragover",function(zt,ar){zn.current.classList.add("mouse-hover-md")}),Ut.on("drop",function(zt,ar){zn.current.classList.add("mouse-hover-md");var _r;if(_r=ar.dataTransfer.files,_r.length>0){ar.preventDefault(),ar.stopPropagation();for(var Lr=function(Un){var hr=_r[Un],vi=hr.name.split(".").pop();W(hr,function(kr){if(kr.id){var Sn,Rn,li;(hr==null||((Sn=hr.type)===null||Sn===void 0)?void 0:Sn.indexOf("image"))>-1?Ut.replaceSelection("![,](/api/attachments/".concat(kr.id,"?type=").concat(kr.content_type,")")):(hr==null||((Rn=hr.type)===null||Rn===void 0)?void 0:Rn.indexOf("video"))>-1?Ut.replaceSelection('')):(hr==null||((li=hr.type)===null||li===void 0)?void 0:li.indexOf("pdf"))>-1?Ut.replaceSelection('').concat(hr.name,"")):ge.includes(vi)?Ut.replaceSelection('').concat(hr.name,"")):Ut.replaceSelection("[".concat(hr.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(kr.id,"?type=").concat(kr.content_type,")"))}else(kr==null?void 0:kr.status)===401&&(document.location.href="/user/login")})},mr=0;mr<_r.length;mr++)Lr(mr)}}),jr(Ut),function(){Ut.off("paste",er)}}},[]);var Xn=Object(r.useCallback)(function(){if(zn.current)try{}catch(Ut){console.log(Ut,"---- to set md editor body height")}},[Ji,zn,Vr]);Object(r.useEffect)(function(){function Ut(){var zt=new l.default(function(ar){var _r=Object(S.a)(ar),Lr;try{for(_r.s();!(Lr=_r.n()).done;){var mr=Lr.value;(mr.target.offsetHeight>0||mr.target.offsetWidth>0)&&(Xn(),ct.setSize("100%","100%"),ct.refresh())}}catch(qr){_r.e(qr)}finally{_r.f()}});return zt.observe(fi.current.parentElement),zt}if(ct){var er=Ut();return function(){er.unobserve(fi.current.parentElement)}}},[ct,Xn]),Object(r.useEffect)(function(){if(ct){for(var Ut=[],er=function(){var mr=ar[zt];_r=Object(C.a)(mr,2);var qr=_r[0],Un=_r[1],hr=Object(_.a)({},qr,function(){ji(Un)});Ut.push(hr),ct.addKeyMap(hr)},zt=0,ar=Object.entries(Ee);zt0){var Ut=new Date().getTime(),er=window.sessionStorage.getItem(St);Ut>=br+rt&&(!er||er!==An)&&(window.sessionStorage.setItem(St,An),ri(!0))}},rt),Object(r.useEffect)(function(){Fr($t)},[ct,$t]),Object(r.useEffect)(function(){ct&&(Yt&&ct.focus())},[ct,Yt]),Object(r.useEffect)(function(){if(bn&&ct){var Ut=ct.getScrollerElement();function er(zt){var ar=zt.target;if(ki.current){var _r=ar.scrollTop/ar.scrollHeight;ki.current.scrollTop=ki.current.scrollHeight*_r}}return Ut.addEventListener("scroll",er),function(){Ut.removeEventListener("scroll",er)}}},[ct,bn]),Object(r.useEffect)(function(){if(ct&&Kt){function Ut(er,zt){Kt(er,zt)}return ct.on("beforeChange",Ut),function(){ct.off("beforeChange",Ut)}}},[ct,Kt]),Object(r.useEffect)(function(){if(ct&&xt){function Ut(){xt(ct.getValue())}return ct.on("blur",Ut),function(){ct.off("blur",Ut)}}},[ct,xt]),Object(r.useEffect)(function(){if(ct){function Ut(er){var zt=er.getValue();hn(zt),hi(new Date().getTime()),er.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),at&&at(zt)}return ct.on("change",Ut),function(){ct.off("change",Ut)}}},[ct,at]),Object(r.useEffect)(function(){ct&&(nt==null?(ct.setValue(""),hn("")):nt!==ct.getValue()&&(ct.setValue(nt),hn(nt),ct.setCursor(ct.lineCount(),0)))},[ct,nt]);var ji=Object(r.useCallback)(function(Ut){var er=ct.getCursor(),zt=ct.getSelection(),ar=zt.split(` `);switch(Ut){case"bold":return ct.replaceSelection("**"+zt+"**"),zt===""&&ct.setCursor(er.line,er.ch+2),ct.focus();case"italic":return ct.replaceSelection("*"+zt+"*"),zt===""&&ct.setCursor(er.line,er.ch+1),ct.focus();case"code":return ct.replaceSelection("`"+zt+"`"),zt===""&&ct.setCursor(er.line,er.ch+1),ct.focus();case"inline-latex":return ct.replaceSelection("`$$"+zt+"$$`"),zt===""&&ct.setCursor(er.line,er.ch+3),ct.focus();case"latex":return ct.replaceSelection("```latex\n"+zt+"\n```"),ct.setCursor(er.line+1,zt.length+1),ct.focus();case"line-break":return ct.replaceSelection(`
    `),ct.focus();case"list-ul":return zt===""?ct.replaceSelection("- "+zt):ct.replaceSelection(ar.map(function(_r){return _r===""?"":"- ".concat(_r)}).join(` `)),ct.focus();case"list-ol":return zt===""?ct.replaceSelection("1. "+zt):ct.replaceSelection(ar.map(function(_r,Lr){return _r===""?"":"".concat(Lr+1,". ").concat(_r)}).join(` `)),ct.focus();case"add-null-ch":return zt===""&&ct.setCursor(er.line,er.ch+1),ct.replaceSelection(ye),ct.focus();case"inster-template-1":return zt===""&&ct.setCursor(er.line,er.ch),ct.replaceSelection(ue),ct.focus();case"eraser":return ct.setValue(""),ct.focus();case"trigger-watch":return Fr(!bn),ct.focus();case"trigger-full-screen":return dr(!Vr),ct.focus();case ce:lr(ce);return;case Fe:lr(Fe);return;case we:lr(we);return;case Xe:lr(Xe);return;default:throw new Error}},[ct,bn,Vr]),pi=Object(r.useCallback)(function(Ut){lr("");switch(jt){case ce:var er=Ut.title,zt=Ut.link;return ct.replaceSelection("[".concat(er,"](").concat(zt,")")),ct.focus();case Fe:var ar=Ut.language,_r=Ut.content;return ct.replaceSelection(["```"+ar,_r,"```"].join(` `)),ct.focus();case we:var Lr=Ut.src,mr=Ut.alt;return mr?ct.replaceSelection("![ ".concat(mr," ]( ").concat(Lr,' "').concat(mr,'" )')):ct.replaceSelection("![,](".concat(Lr,")")),ct.focus();case Xe:for(var qr=Ut.row,Un=Ut.col,hr=Ut.align,vi=` `,kr=0;kr300&&(qr=300);var Un=pt+qr+"px";Oi(Un)}}return Ut.addEventListener("mousedown",ar),document.addEventListener("mousemove",Lr),document.addEventListener("mouseup",_r),function(){Ut.removeEventListener("mousedown",ar),document.removeEventListener("mousemove",Lr),document.removeEventListener("mouseup",_r)}}},[ct,Vn]),Object(r.useEffect)(function(){Oi(pt)},[pt]);var $n=he(st),Pi=he(Ji),ni={width:$n,height:Pi},gi=Object(r.useMemo)(function(){if(br){var Ut=new Date(br),er=Ut.getHours(),zt=Ut.getMinutes(),ar=Ut.getSeconds();return er=er<10?"0"+er:er,zt=zt<10?"0"+zt:zt,ar=ar<10?"0"+ar:ar,"".concat(er,":").concat(zt,":").concat(ar)}return 0},[br]);function Fi(){window.sessionStorage.removeItem(St),ri(!1),hi(0)}function ii(){ri(!1),hi(0),ct.setValue(window.sessionStorage.getItem(St))}function Ur(Ut,er){var zt=ct.getValue();zt=zt.replace(Ut,er),hn(zt),ct==null||ct.setValue(zt)}return c.a.createElement(r.Fragment,null,c.a.createElement("div",{className:"markdown-editor-wrapper",ref:zn},c.a.createElement("div",{className:"markdown-editor-container ".concat(ut," ").concat(bn?"on-preview":""," ").concat(Ft?"mini":""," ").concat(Vr?"full-screen":""),style:ni},c.a.createElement(A,{insertTemp:Mt,watch:bn,fullScreen:Vr,showNullButton:Ct,onActionCallback:ji,hidetoolBar:Ht,uuid:kn.current,setOpenPhones:function(){sn.current=!0}}),c.a.createElement("div",{className:"markdown-editor-body"},c.a.createElement("div",{className:"codemirror-container"},c.a.createElement("textarea",{ref:fi,placeholder:On})),bn?c.a.createElement("div",{ref:ki,className:"preview-container"},Jt==="stex"&&c.a.createElement(D,{value:An}),Jt!=="stex"&&c.a.createElement(p.a,{edit:!0,value:An,replaces:Ur})):null))),Et?c.a.createElement("a",{ref:Vn,className:"editor-resize"}):null,c.a.createElement(X.a,null,Ae[jt]?c.a.createElement(g.a,{centered:!0,title:Ae[jt],visible:!0,onCancel:Yn,footer:null,className:"markdown-popup-form"},mi):null))}},PD8m:function(H,Z){H.exports={name:"memoryStorage",read:N,write:g,each:S,remove:k,clearAll:v};var I={};function N(m){return I[m]}function g(m,C){I[m]=C}function S(m){for(var C in I)I.hasOwnProperty(C)&&m(I[C],C)}function k(m){delete I[m]}function v(m){I={}}},PVpz:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("ETIr"),I("cv67"),I("K3mO"),I("OLod"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.StreamCipher,v=g.algo,m=[],C=[],_=[],e=v.RabbitLegacy=k.extend({_doReset:function(){var r=this._key.words,c=this.cfg.iv,i=this._X=[r[0],r[3]<<16|r[2]>>>16,r[1],r[0]<<16|r[3]>>>16,r[2],r[1]<<16|r[0]>>>16,r[3],r[2]<<16|r[1]>>>16],n=this._C=[r[2]<<16|r[2]>>>16,r[0]&4294901760|r[1]&65535,r[3]<<16|r[3]>>>16,r[1]&4294901760|r[2]&65535,r[0]<<16|r[0]>>>16,r[2]&4294901760|r[3]&65535,r[1]<<16|r[1]>>>16,r[3]&4294901760|r[0]&65535];this._b=0;for(var l=0;l<4;l++)h.call(this);for(var l=0;l<8;l++)n[l]^=i[l+4&7];if(c){var f=c.words,d=f[0],u=f[1],o=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360,s=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,E=o>>>16|s&4294901760,b=s<<16|o&65535;n[0]^=o,n[1]^=E,n[2]^=s,n[3]^=b,n[4]^=o,n[5]^=E,n[6]^=s,n[7]^=b;for(var l=0;l<4;l++)h.call(this)}},_doProcessBlock:function(r,c){var i=this._X;h.call(this),m[0]=i[0]^i[5]>>>16^i[3]<<16,m[1]=i[2]^i[7]>>>16^i[5]<<16,m[2]=i[4]^i[1]>>>16^i[7]<<16,m[3]=i[6]^i[3]>>>16^i[1]<<16;for(var n=0;n<4;n++)m[n]=(m[n]<<8|m[n]>>>24)&16711935|(m[n]<<24|m[n]>>>8)&4278255360,r[c+n]^=m[n]},blockSize:128/32,ivSize:64/32});function h(){for(var r=this._X,c=this._C,i=0;i<8;i++)C[i]=c[i];c[0]=c[0]+1295307597+this._b|0,c[1]=c[1]+3545052371+(c[0]>>>0>>0?1:0)|0,c[2]=c[2]+886263092+(c[1]>>>0>>0?1:0)|0,c[3]=c[3]+1295307597+(c[2]>>>0>>0?1:0)|0,c[4]=c[4]+3545052371+(c[3]>>>0>>0?1:0)|0,c[5]=c[5]+886263092+(c[4]>>>0>>0?1:0)|0,c[6]=c[6]+1295307597+(c[5]>>>0>>0?1:0)|0,c[7]=c[7]+3545052371+(c[6]>>>0>>0?1:0)|0,this._b=c[7]>>>0>>0?1:0;for(var i=0;i<8;i++){var n=r[i]+c[i],l=n&65535,f=n>>>16,d=((l*l>>>17)+l*f>>>15)+f*f,u=((n&4294901760)*n|0)+((n&65535)*n|0);_[i]=d^u}r[0]=_[0]+(_[7]<<16|_[7]>>>16)+(_[6]<<16|_[6]>>>16)|0,r[1]=_[1]+(_[0]<<8|_[0]>>>24)+_[7]|0,r[2]=_[2]+(_[1]<<16|_[1]>>>16)+(_[0]<<16|_[0]>>>16)|0,r[3]=_[3]+(_[2]<<8|_[2]>>>24)+_[1]|0,r[4]=_[4]+(_[3]<<16|_[3]>>>16)+(_[2]<<16|_[2]>>>16)|0,r[5]=_[5]+(_[4]<<8|_[4]>>>24)+_[3]|0,r[6]=_[6]+(_[5]<<16|_[5]>>>16)+(_[4]<<16|_[4]>>>16)|0,r[7]=_[7]+(_[6]<<8|_[6]>>>24)+_[5]|0}g.RabbitLegacy=k._createHelper(e)}(),N.RabbitLegacy})},RELg:function(H,Z,I){var N=I("MFOe"),g=N.Global;H.exports={name:"oldIE-userDataStorage",write:C,read:_,each:e,remove:h,clearAll:r};var S="storejs",k=g.document,v=n(),m=(g.navigator?g.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function C(l,f){if(m)return;var d=i(l);v(function(u){u.setAttribute(d,f),u.save(S)})}function _(l){if(m)return;var f=i(l),d=null;return v(function(u){d=u.getAttribute(f)}),d}function e(l){v(function(f){for(var d=f.XMLDocument.documentElement.attributes,u=d.length-1;u>=0;u--){var o=d[u];l(f.getAttribute(o.name),o.name)}})}function h(l){var f=i(l);v(function(d){d.removeAttribute(f),d.save(S)})}function r(){v(function(l){var f=l.XMLDocument.documentElement.attributes;l.load(S);for(var d=f.length-1;d>=0;d--)l.removeAttribute(f[d].name);l.save(S)})}var c=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function i(l){return l.replace(/^\d/,"___$&").replace(c,"___")}function n(){if(!k||!k.documentElement||!k.documentElement.addBehavior)return null;var l="script",f,d,u;try{d=new ActiveXObject("htmlfile"),d.open(),d.write("<"+l+">document.w=window'),d.close(),f=d.w.frames[0].document,u=f.createElement("div")}catch(o){u=k.createElement("div"),f=k.body}return function(o){var s=[].slice.call(arguments,0);s.unshift(u),f.appendChild(u),u.addBehavior("#default#userData"),u.load(S),o.apply(this,s),f.removeChild(u);return}}},S6kV:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("OLod"))})(this,function(N){return N.mode.OFB=function(){var g=N.lib.BlockCipherMode.extend(),S=g.Encryptor=g.extend({processBlock:function(k,v){var m=this._cipher,C=m.blockSize,_=this._iv,e=this._keystream;_&&(e=this._keystream=_.slice(0),this._iv=void 0),m.encryptBlock(e,0);for(var h=0;h|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function U(ie){for(var ne=0,J=!1,$=!1,le=0,ce=ie.length;le122||(ge<65||Ce>90||Je.push([Math.max(65,Ce)|32,Math.min(ge,90)|32]),ge<97||Ce>122||Je.push([Math.max(97,Ce)&~32,Math.min(ge,122)&~32]))}}Je.sort(function(Me,He){return Me[0]-He[0]||He[1]-Me[1]});for(var Ee=[],Ae=[],ue=0;ueDe[0]&&(De[1]+1>De[0]&&ye.push("-"),ye.push($e(De[1])))}return ye.push("]"),ye.join("")}function Ze(Pe){for(var Ie=Pe.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),Je=Ie.length,rt=[],ye=0,ue=0;ye=2&&Ce==="["?Ie[ye]=Ye(he):Ce!=="\\"&&(Ie[ye]=he.replace(/[a-zA-Z]/g,function(Ae){var De=Ae.charCodeAt(0);return"["+String.fromCharCode(De&~32,De|32)+"]"}))}return Ie.join("")}for(var qe=[],le=0,ce=ie.length;le=0;)J[qe.charAt(Pe)]=Ze;var Ie=Ze[1],Je=""+Ie;Xe.hasOwnProperty(Je)||(Fe.push(Ie),Xe[Je]=null)}Fe.push(/[\0-\uffff]/),$=U(Fe)})();var le=ne.length,ce=function(we){for(var Fe=we.sourceCode,Xe=we.basePos,$e=we.sourceNode,Ye=[Xe,T],Ze=0,qe=Fe.match($)||[],Pe={},Ie=0,Je=qe.length;Ie=5&&ye.substring(0,5)==="lang-",he&&!(ue&&typeof ue[1]=="string")&&(he=!1,ye=A),he||(Pe[rt]=ye)}var ge=Ze;if(Ze+=rt.length,!he)Ye.push(Xe+ge,ye);else{var Ee=ue[1],Ae=rt.indexOf(Ee),De=Ae+Ee.length;ue[2]&&(De=rt.length-ue[2].length,Ae=De-Ee.length);var Me=ye.substring(5);G($e,Xe+ge,rt.substring(0,Ae),ce,Ye),G($e,Xe+ge+Ae,Ee,te(Me,Ee),Ye),G($e,Xe+ge+De,rt.substring(De),ce,Ye)}}we.decorations=Ye};return ce}function be(ie){var ne=[],J=[];ie.tripleQuotedStrings?ne.push([p,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ie.multiLineStrings?ne.push([p,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):ne.push([p,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ie.verbatimStrings&&J.push([p,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var $=ie.hashComments;$&&(ie.cStyleComments?($>1?ne.push([R,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):ne.push([R,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),J.push([p,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):ne.push([R,/^#[^\r\n]*/,null,"#"])),ie.cStyleComments&&(J.push([R,/^\/\/[^\r\n]*/,null]),J.push([R,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var le=ie.regexLiterals;if(le){var ce=le>1?"":` \r`,we=ce?".":"[\\S\\s]",Fe="/(?=[^/*"+ce+"])(?:[^/\\x5B\\x5C"+ce+"]|\\x5C"+we+"|\\x5B(?:[^\\x5C\\x5D"+ce+"]|\\x5C"+we+")*(?:\\x5D|$))+/";J.push(["lang-regex",RegExp("^"+B+"("+Fe+")")])}var Xe=ie.types;Xe&&J.push([y,Xe]);var $e=(""+ie.keywords).replace(/^ | $/g,"");$e.length&&J.push([D,new RegExp("^(?:"+$e.replace(/[\s,]+/g,"|")+")\\b"),null]),ne.push([T,/^\s+/,null,` \r \xA0`]);var Ye="^.[^\\s\\w.$@'\"`/\\\\]*";return ie.regexLiterals&&(Ye+="(?!s*/)"),J.push([x,/^@[a-z_$][a-z_$@0-9]*/i,null],[y,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[T,/^[a-z_$][a-z_$@0-9]*/i,null],[x,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[T,/^\\[\s\S]?/,null],[w,new RegExp(Ye),null]),ae(ne,J)}var _e=be({keywords:E,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function fe(ie,ne,J){for(var $=/(?:^|\s)nocode(?:\s|$)/,le=/\r\n?|\n/,ce=ie.ownerDocument,we=ce.createElement("li");ie.firstChild;)we.appendChild(ie.firstChild);var Fe=[we];function Xe(Ie){var Je=Ie.nodeType;if(Je==1&&!$.test(Ie.className))if(Ie.nodeName==="br")$e(Ie),Ie.parentNode&&Ie.parentNode.removeChild(Ie);else for(var rt=Ie.firstChild;rt;rt=rt.nextSibling)Xe(rt);else if((Je==3||Je==4)&&J){var ye=Ie.nodeValue,ue=ye.match(le);if(ue){var he=ye.substring(0,ue.index);Ie.nodeValue=he;var me=ye.substring(ue.index+ue[0].length);if(me){var Ce=Ie.parentNode;Ce.insertBefore(ce.createTextNode(me),Ie.nextSibling)}$e(Ie),he||Ie.parentNode.removeChild(Ie)}}}function $e(Ie){for(;!Ie.nextSibling;)if(Ie=Ie.parentNode,!Ie)return;function Je(ue,he){var me=he?ue.cloneNode(!1):ue,Ce=ue.parentNode;if(Ce){var ge=Je(Ce,1),Ee=ue.nextSibling;ge.appendChild(me);for(var Ae=Ee;Ae;Ae=Ee)Ee=Ae.nextSibling,ge.appendChild(Ae)}return me}for(var rt=Je(Ie.nextSibling,0),ye;(ye=rt.parentNode)&&ye.nodeType===1;)rt=ye;Fe.push(rt)}for(var Ye=0;Ye=Ce&&(Xe+=2),ce>=ge&&(Ze+=2)}}finally{ye&&(ye.style.display=ue)}}var Oe={};function de(ie,ne){for(var J=ne.length;--J>=0;){var $=ne[J];Oe.hasOwnProperty($)?_.console&&console.warn("cannot override language handler %s",$):Oe[$]=ie}}function te(ie,ne){return ie&&Oe.hasOwnProperty(ie)||(ie=/^\s*]*(?:>|$)/],[R,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[w,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),de(ae([[T,/^[\s]+/,null,` \r `],[z,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[F,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[X,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[w,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),de(ae([],[[z,/^[\s\S]+/]]),["uq.val"]),de(be({keywords:c,hashComments:!0,cStyleComments:!0,types:b}),["c","cc","cpp","cxx","cyc","m"]),de(be({keywords:"null,true,false"}),["json"]),de(be({keywords:n,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:b}),["cs"]),de(be({keywords:i,cStyleComments:!0}),["java"]),de(be({keywords:s,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),de(be({keywords:u,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),de(be({keywords:d,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),de(be({keywords:o,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),de(be({keywords:f,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),de(be({keywords:l,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),de(ae([],[[p,/^[\s\S]+/]]),["regex"]);function W(ie){var ne=ie.langExtension;try{var J=L(ie.sourceNode,ie.pre),$=J.sourceCode;ie.sourceCode=$,ie.spans=J.spans,ie.basePos=0,te(ne,$)(ie),Re(ie)}catch(le){_.console&&console.log(le&&le.stack||le)}}function Y(ie,ne,J){var $=J||!1,le=ne||null,ce=document.createElement("div");ce.innerHTML="
    "+ie+"
    ",ce=ce.firstChild,$&&fe(ce,$,!0);var we={langExtension:le,numberLines:$,sourceNode:ce,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return W(we),ce.innerHTML}function V(ie,ne){var J=ne||document.body,$=J.ownerDocument||document;function le(me){return J.getElementsByTagName(me)}for(var ce=[le("pre"),le("code"),le("xmp")],we=[],Fe=0;Fe0&&Q[Q.length-1])||le[0]!==6&&le[0]!==2)){ie=0;continue}if(le[0]===3&&(!Q||le[1]>Q[0]&&le[1]',"select"),this.addActionButton(V,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(V,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(V,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(V,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(V,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(V,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(V,'',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(q){var ie=document.createElement("div");ie.className=""+Y.toolbarButtonStyleClass.name,ie.setAttribute("data-type-name",q.typeName),ie.innerHTML=q.icon,ie.addEventListener("click",function(){Y.markerToolbarButtonClicked(ie,q)}),Y.buttons.push(ie),Y.markerButtons.push(ie)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var Q=document.createElement("div");Q.className=this.toolbarBlockStyleClass.name,Q.style.whiteSpace="nowrap",Q.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Q),this.addActionButton(Q,'',"render"),this.addActionButton(Q,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},te.prototype.addButtonClickListener=function(W){this.buttonClickListeners.push(W)},te.prototype.removeButtonClickListener=function(W){this.buttonClickListeners.indexOf(W)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(W),1)},te.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},te.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var W=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var Y=0;Y0&&this.buttonClickListeners.forEach(function(V){return V("marker",Y)}),this.markerButtonOverflowBlock.style.display="none"},te.prototype.actionToolbarButtonClicked=function(W,Y){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(V){return V("action",Y)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},te.prototype.setActiveButton=function(W){this.resetButtonStyles(),W.className=W.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),W.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},te.prototype.setActiveMarkerButton=function(W){var Y=this.markerButtons.find(function(V){return V.getAttribute("data-type-name")===W});Y&&this.setActiveButton(Y)},te.prototype.setCurrentMarker=function(W){var Y=this;this.currentMarker=W,this.buttons.filter(function(V){return/delete|notes/.test(V.getAttribute("data-action"))}).forEach(function(V){Y.currentMarker===void 0?(V.style.fillOpacity="0.4",V.style.pointerEvents="none"):(V.style.fillOpacity="1",V.style.pointerEvents="all")})},te}(),n=function(){function te(W,Y,V,Q){this.panels=[],this.panelButtons=[],this.markerjsContainer=W,this.displayMode=Y,this.uiStyleSettings=V,this.styles=Q,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return te.prototype.addStyles=function(){var W;this.toolboxStyleClass=this.styles.addClass(new c("toolbox",` width: 100%; flex-shrink: 0; display: flex; flex-direction: column; font-family: sans-serif; `+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+` box-sizing: content-box; `+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+` `+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+` `+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+` overflow: hidden; `)),this.toolboxStyleColorsClass=this.styles.addClass(new c("toolbox_colors",` color: `+this.uiStyleSettings.toolboxColor+`; `));var Y=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new c("toolbox-button-row",` display: flex; cursor: default; box-sizing: content-box; `)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new c("toolbox-button-row_colors",` background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`; `)),this.toolboxPanelRowStyleClass=this.styles.addClass(new c("toolbox-panel-row",` display: flex; `+(this.displayMode==="inline"?"position: absolute;":"")+` `+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+` cursor: default; height: `+1.5*this.uiStyleSettings.toolbarHeight+`px; `+(this.displayMode==="inline"?"width: 100%;":"")+` box-sizing: content-box; `)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new c("toolbox-panel-row_colors",` background-color: `+((W=this.uiStyleSettings.toolboxBackgroundColor)!==null&&W!==void 0?W:this.uiStyleSettings.toolbarBackgroundHoverColor)+`; `)),this.toolboxButtonStyleClass=this.styles.addClass(new c("toolbox_button",` display: inline-block; width: `+(this.uiStyleSettings.toolbarHeight-2*Y)+`px; height: `+(this.uiStyleSettings.toolbarHeight-2*Y)+`px; padding: `+Y+`px; box-sizing: content-box; `)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new c("toolbox-button_colors",` fill: `+this.uiStyleSettings.toolbarColor+`; `)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new c("toolbox-active-button_colors",` background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`; fill: `+this.uiStyleSettings.toolbarColor+`; `)),this.styles.addRule(new r("."+this.toolboxButtonStyleColorsClass.name+":hover",` background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+` `)),this.styles.addRule(new r("."+this.toolboxButtonStyleClass.name+" svg",` height: `+this.uiStyleSettings.toolbarHeight/2+`px; `))},te.prototype.show=function(W){var Y;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=W,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Y=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Y!==void 0?Y:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},te.prototype.setPanelButtons=function(W){var Y,V,Q=this;this.panels=W,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Y=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Y!==void 0?Y:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((V=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&V!==void 0?V:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(q){var ie;q.uiStyleSettings=Q.uiStyleSettings;var ne=document.createElement("div");ne.className=Q.toolboxButtonStyleClass.name+" "+((ie=Q.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ie!==void 0?ie:Q.toolboxButtonStyleColorsClass.name),ne.innerHTML=q.icon,ne.title=q.title,ne.addEventListener("click",function(){Q.panelButtonClick(q)}),Q.panelButtons.push(ne),Q.buttonRow.appendChild(ne)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},te.prototype.panelButtonClick=function(W){var Y=this,V=-1;if(W!==this.activePanel){V=this.panels.indexOf(W),this.panelRow.innerHTML="";var Q=W.getUi();Q.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Q),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=W}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Y.displayMode==="inline"?Y.panelRow.style.display="none":Y.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(q,ie){var ne,J;q.className=Y.toolboxButtonStyleClass.name+" "+(ie===V?""+((ne=Y.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&ne!==void 0?ne:Y.toolboxActiveButtonStyleColorsClass.name):""+((J=Y.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&J!==void 0?J:Y.toolboxButtonStyleColorsClass.name))})},te}(),l=function(te,W){this.title=te,this.icon=W},f=function(te){function W(Y,V,Q,q){var ie=te.call(this,Y,q||'')||this;return ie.colors=[],ie.addTransparent=!1,ie.colorBoxes=[],ie.colors=V,ie.currentColor=Q,ie.setCurrentColor=ie.setCurrentColor.bind(ie),ie.getColorBox=ie.getColorBox.bind(ie),ie}return g(W,te),W.prototype.getUi=function(){var Y=this,V=document.createElement("div");return V.style.overflow="hidden",V.style.whiteSpace="nowrap",this.colors.forEach(function(Q){var q=Y.getColorBox(Q);V.appendChild(q),Y.colorBoxes.push(q)}),V},W.prototype.getColorBox=function(Y){var V=this,Q=this.uiStyleSettings.toolbarHeight/4,q=this.uiStyleSettings.toolbarHeight-Q,ie=document.createElement("div");ie.style.display="inline-block",ie.style.boxSizing="content-box",ie.style.width=q-2+"px",ie.style.height=q-2+"px",ie.style.padding="1px",ie.style.marginRight="2px",ie.style.marginBottom="2px",ie.style.borderWidth="2px",ie.style.borderStyle="solid",ie.style.borderRadius=(q+2)/2+"px",ie.style.borderColor=Y===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ie.addEventListener("click",function(){V.setCurrentColor(Y,ie)});var ne=document.createElement("div");return ne.style.display="inline-block",ne.style.width=q-2+"px",ne.style.height=q-2+"px",ne.style.backgroundColor=Y,ne.style.borderRadius=q/2+"px",Y==="transparent"&&(ne.style.fill=this.uiStyleSettings.toolboxAccentColor,ne.innerHTML=` `),ie.appendChild(ne),ie},W.prototype.setCurrentColor=function(Y,V){var Q=this;this.currentColor=Y,this.colorBoxes.forEach(function(q){q.style.borderColor=q===V?Q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Y)},W}(l),d=function(){function te(W,Y,V){this._state="new",this._isSelected=!1,this._container=W,this._overlayContainer=Y,this.globalSettings=V,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(te.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),te.prototype.ownsTarget=function(W){return!1},Object.defineProperty(te.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),te.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},te.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},te.prototype.pointerDown=function(W,Y){},te.prototype.dblClick=function(W,Y){},te.prototype.manipulate=function(W){},te.prototype.pointerUp=function(W){this.stateChanged()},te.prototype.dispose=function(){},te.prototype.addMarkerVisualToContainer=function(W){this.container.childNodes.length>0?this.container.insertBefore(W,this.container.childNodes[0]):this.container.appendChild(W)},te.prototype.getState=function(){return{typeName:te.typeName,state:this.state,notes:this.notes}},te.prototype.restoreState=function(W){this._state=W.state,this.notes=W.notes},te.prototype.scale=function(W,Y){},te.prototype.colorChanged=function(W){this.onColorChanged&&this.onColorChanged(W),this.stateChanged()},te.prototype.fillColorChanged=function(W){this.onFillColorChanged&&this.onFillColorChanged(W),this.stateChanged()},te.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var W=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),W.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(W)&&this.onStateChanged(this)}},te.typeName="MarkerBase",te}(),u=function(){function te(){this.findGripByVisual=this.findGripByVisual.bind(this)}return te.prototype.findGripByVisual=function(W){return this.topLeft.ownsTarget(W)?this.topLeft:this.topCenter.ownsTarget(W)?this.topCenter:this.topRight.ownsTarget(W)?this.topRight:this.centerLeft.ownsTarget(W)?this.centerLeft:this.centerRight.ownsTarget(W)?this.centerRight:this.bottomLeft.ownsTarget(W)?this.bottomLeft:this.bottomCenter.ownsTarget(W)?this.bottomCenter:this.bottomRight.ownsTarget(W)?this.bottomRight:void 0},te}(),o=function(){function te(){this.GRIP_SIZE=10,this.visual=m.createGroup(),this.visual.appendChild(m.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(m.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return te.prototype.ownsTarget=function(W){return W===this.visual||W===this.visual.childNodes[0]||W===this.visual.childNodes[1]},te}(),s=function(){function te(){}return te.toITransformMatrix=function(W){return{a:W.a,b:W.b,c:W.c,d:W.d,e:W.e,f:W.f}},te.toSVGMatrix=function(W,Y){return W.a=Y.a,W.b=Y.b,W.c=Y.c,W.d=Y.d,W.e=Y.e,W.f=Y.f,W},te}(),E=function(te){function W(Y,V,Q){var q=te.call(this,Y,V,Q)||this;return q.left=0,q.top=0,q.width=0,q.height=0,q.defaultSize={x:50,y:20},q.offsetX=0,q.offsetY=0,q.rotationAngle=0,q.CB_DISTANCE=10,q._suppressMarkerCreateEvent=!1,q.container.transform.baseVal.appendItem(m.createTransform()),q.setupControlBox(),q}return g(W,te),Object.defineProperty(W.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"visual",{get:function(){return this._visual},set:function(Y){this._visual=Y;var V=m.createTransform();this._visual.transform.baseVal.appendItem(V)},enumerable:!1,configurable:!0}),W.prototype.ownsTarget=function(Y){return!!te.prototype.ownsTarget.call(this,Y)||!!(this.controlGrips.findGripByVisual(Y)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Y))},W.prototype.pointerDown=function(Y,V){te.prototype.pointerDown.call(this,Y,V),this.state==="new"&&(this.left=Y.x,this.top=Y.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Q=this.unrotatePoint(Y);if(this.manipulationStartX=Q.x,this.manipulationStartY=Q.y,this.offsetX=Q.x-this.left,this.offsetY=Q.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(V),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(V)){this.activeGrip=this.rotatorGrip;var q=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=q.x-this.width/2,this.top=q.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ie=this.container.transform.baseVal.getItem(0);ie.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ie,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},W.prototype.pointerUp=function(Y){var V=this.state;te.prototype.pointerUp.call(this,Y),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Y),this._state="select",V==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},W.prototype.moveVisual=function(Y){this.visual.style.transform="translate("+Y.x+"px, "+Y.y+"px)"},W.prototype.manipulate=function(Y){var V=this.unrotatePoint(Y);this.state==="creating"?this.resize(Y):this.state==="move"?(this.left=this.manipulationStartLeft+(V.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(V.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(V):this.state==="rotate"&&this.rotate(Y)},W.prototype.resize=function(Y){var V=this.manipulationStartLeft,Q=this.manipulationStartWidth,q=this.manipulationStartTop,ie=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:V=this.manipulationStartLeft+Y.x-this.manipulationStartX,Q=this.manipulationStartWidth+this.manipulationStartLeft-V;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Q=this.manipulationStartWidth+Y.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:q=this.manipulationStartTop+Y.y-this.manipulationStartY,ie=this.manipulationStartHeight+this.manipulationStartTop-q;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ie=this.manipulationStartHeight+Y.y-this.manipulationStartY}Q>=0?(this.left=V,this.width=Q):(this.left=V+Q,this.width=-Q),ie>=0?(this.top=q,this.height=ie):(this.top=q+ie,this.height=-ie),this.setSize()},W.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},W.prototype.rotate=function(Y){if(Math.abs(Y.x-this.centerX)>.1){var V=Math.sign(Y.x-this.centerX);this.rotationAngle=180*Math.atan((Y.y-this.centerY)/(Y.x-this.centerX))/Math.PI+90*V,this.applyRotation()}},W.prototype.applyRotation=function(){var Y=this.container.transform.baseVal.getItem(0);Y.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Y,0)},W.prototype.rotatePoint=function(Y){if(this.rotationAngle===0)return Y;var V=this.container.getCTM(),Q=m.createPoint(Y.x,Y.y);return{x:(Q=Q.matrixTransform(V)).x,y:Q.y}},W.prototype.unrotatePoint=function(Y){if(this.rotationAngle===0)return Y;var V=this.container.getCTM();V=V.inverse();var Q=m.createPoint(Y.x,Y.y);return{x:(Q=Q.matrixTransform(V)).x,y:Q.y}},W.prototype.select=function(){te.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},W.prototype.deselect=function(){te.prototype.deselect.call(this),this.controlBox.style.display="none"},W.prototype.setupControlBox=function(){this.controlBox=m.createGroup();var Y=m.createTransform();Y.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Y),this.container.appendChild(this.controlBox),this.controlRect=m.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=m.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new u,this.addControlGrips(),this.controlBox.style.display="none"},W.prototype.adjustControlBox=function(){var Y=this.controlBox.transform.baseVal.getItem(0);Y.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Y,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},W.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},W.prototype.createGrip=function(){var Y=new o;return Y.visual.transform.baseVal.appendItem(m.createTransform()),this.controlBox.appendChild(Y.visual),Y},W.prototype.positionGrips=function(){var Y=this.controlGrips.topLeft.GRIP_SIZE,V=-Y/2,Q=V,q=(this.width+this.CB_DISTANCE)/2-Y/2,ie=(this.height+this.CB_DISTANCE)/2-Y/2,ne=this.height+this.CB_DISTANCE-Y/2,J=this.width+this.CB_DISTANCE-Y/2;this.positionGrip(this.controlGrips.topLeft.visual,V,Q),this.positionGrip(this.controlGrips.topCenter.visual,q,Q),this.positionGrip(this.controlGrips.topRight.visual,J,Q),this.positionGrip(this.controlGrips.centerLeft.visual,V,ie),this.positionGrip(this.controlGrips.centerRight.visual,J,ie),this.positionGrip(this.controlGrips.bottomLeft.visual,V,ne),this.positionGrip(this.controlGrips.bottomCenter.visual,q,ne),this.positionGrip(this.controlGrips.bottomRight.visual,J,ne),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,q,Q-3*this.CB_DISTANCE)},W.prototype.positionGrip=function(Y,V,Q){var q=Y.transform.baseVal.getItem(0);q.setTranslate(V,Q),Y.transform.baseVal.replaceItem(q,0)},W.prototype.hideControlBox=function(){this.controlBox.style.display="none"},W.prototype.showControlBox=function(){this.controlBox.style.display=""},W.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:s.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:s.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},te.prototype.getState.call(this))},W.prototype.restoreState=function(Y){te.prototype.restoreState.call(this,Y);var V=Y;this.left=V.left,this.top=V.top,this.width=V.width,this.height=V.height,this.rotationAngle=V.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(s.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,V.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(s.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,V.containerTransformMatrix))},W.prototype.scale=function(Y,V){te.prototype.scale.call(this,Y,V);var Q=this.rotatePoint({x:this.left,y:this.top}),q=this.unrotatePoint({x:Q.x*Y,y:Q.y*V});this.left=q.x,this.top=q.y,this.width=this.width*Y,this.height=this.height*V,this.adjustControlBox()},W}(d),b=function(te){function W(Y,V,Q){var q=te.call(this,Y,V,Q)||this;return q.fillColor="transparent",q.strokeColor="transparent",q.strokeWidth=0,q.strokeDasharray="",q.opacity=1,q.setStrokeColor=q.setStrokeColor.bind(q),q.setFillColor=q.setFillColor.bind(q),q.setStrokeWidth=q.setStrokeWidth.bind(q),q.setStrokeDasharray=q.setStrokeDasharray.bind(q),q.createVisual=q.createVisual.bind(q),q}return g(W,te),W.prototype.ownsTarget=function(Y){return!(!te.prototype.ownsTarget.call(this,Y)&&Y!==this.visual)},W.prototype.createVisual=function(){this.visual=m.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},W.prototype.pointerDown=function(Y,V){te.prototype.pointerDown.call(this,Y,V),this.state==="new"&&(this.createVisual(),this.moveVisual(Y),this._state="creating")},W.prototype.manipulate=function(Y){te.prototype.manipulate.call(this,Y)},W.prototype.resize=function(Y){te.prototype.resize.call(this,Y),this.setSize()},W.prototype.setSize=function(){te.prototype.setSize.call(this),m.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},W.prototype.pointerUp=function(Y){te.prototype.pointerUp.call(this,Y),this.setSize()},W.prototype.setStrokeColor=function(Y){this.strokeColor=Y,this.visual&&m.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Y),this.stateChanged()},W.prototype.setFillColor=function(Y){this.fillColor=Y,this.visual&&m.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},W.prototype.setStrokeWidth=function(Y){this.strokeWidth=Y,this.visual&&m.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},W.prototype.setStrokeDasharray=function(Y){this.strokeDasharray=Y,this.visual&&m.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},W.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},te.prototype.getState.call(this))},W.prototype.restoreState=function(Y){var V=Y;this.fillColor=V.fillColor,this.strokeColor=V.strokeColor,this.strokeWidth=V.strokeWidth,this.strokeDasharray=V.strokeDasharray,this.opacity=V.opacity,this.createVisual(),te.prototype.restoreState.call(this,Y),this.setSize()},W.prototype.scale=function(Y,V){te.prototype.scale.call(this,Y,V),this.setSize()},W.title="Rectangle marker",W}(E),p=function(te){function W(Y,V,Q,q){var ie=te.call(this,Y,q||'')||this;return ie.widths=[],ie.widthBoxes=[],ie.widths=V,ie.currentWidth=Q,ie.setCurrentWidth=ie.setCurrentWidth.bind(ie),ie}return g(W,te),W.prototype.getUi=function(){var Y=this,V=document.createElement("div");return V.style.display="flex",V.style.overflow="hidden",V.style.flexGrow="2",this.widths.forEach(function(Q){var q=document.createElement("div");q.style.display="flex",q.style.flexGrow="2",q.style.alignItems="center",q.style.justifyContent="space-between",q.style.padding="5px",q.style.borderWidth="2px",q.style.borderStyle="solid",q.style.borderColor=Q===Y.currentWidth?Y.uiStyleSettings.toolboxAccentColor:"transparent",q.addEventListener("click",function(){Y.setCurrentWidth(Q,q)}),V.appendChild(q);var ie=document.createElement("div");ie.innerText=Q.toString(),ie.style.marginRight="5px",q.appendChild(ie);var ne=document.createElement("div");ne.style.minHeight="20px",ne.style.flexGrow="2",ne.style.display="flex",ne.style.alignItems="center";var J=document.createElement("hr");J.style.minWidth="20px",J.style.border="0px",J.style.borderTop=Q+"px solid "+Y.uiStyleSettings.toolboxColor,J.style.flexGrow="2",ne.appendChild(J),q.appendChild(ne),Y.widthBoxes.push(q)}),V},W.prototype.setCurrentWidth=function(Y,V){var Q=this;this.currentWidth=Y,this.widthBoxes.forEach(function(q){q.style.borderColor=q===V?Q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},W}(l),D=function(te){function W(Y,V,Q,q){var ie=te.call(this,Y,q||'')||this;return ie.styles=[],ie.styleBoxes=[],ie.styles=V,ie.currentStyle=Q,ie.setCurrentStyle=ie.setCurrentStyle.bind(ie),ie}return g(W,te),W.prototype.getUi=function(){var Y=this,V=document.createElement("div");return V.style.display="flex",V.style.overflow="hidden",V.style.flexGrow="2",this.styles.forEach(function(Q){var q=document.createElement("div");q.style.display="flex",q.style.alignItems="center",q.style.justifyContent="space-between",q.style.padding="5px",q.style.borderWidth="2px",q.style.borderStyle="solid",q.style.overflow="hidden",q.style.maxWidth=100/Y.styles.length-5+"%",q.style.borderColor=Q===Y.currentStyle?Y.uiStyleSettings.toolboxAccentColor:"transparent",q.addEventListener("click",function(){Y.setCurrentStyle(Q,q)}),V.appendChild(q);var ie=document.createElement("div");ie.style.minHeight="20px",ie.style.flexGrow="2",ie.style.overflow="hidden";var ne=` `;ie.innerHTML=ne,q.appendChild(ie),Y.styleBoxes.push(q)}),V},W.prototype.setCurrentStyle=function(Y,V){var Q=this;this.currentStyle=Y,this.styleBoxes.forEach(function(q){q.style.borderColor=q===V?Q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},W}(l),R=function(te){function W(Y,V,Q){var q=te.call(this,Y,V,Q)||this;return q.strokeColor=Q.defaultColor,q.strokeWidth=Q.defaultStrokeWidth,q.strokeDasharray=Q.defaultStrokeDasharray,q.strokePanel=new f("Line color",Q.defaultColorSet,Q.defaultColor),q.strokePanel.onColorChanged=q.setStrokeColor,q.strokeWidthPanel=new p("Line width",Q.defaultStrokeWidths,Q.defaultStrokeWidth),q.strokeWidthPanel.onWidthChanged=q.setStrokeWidth,q.strokeStylePanel=new D("Line style",Q.defaultStrokeDasharrays,Q.defaultStrokeDasharray),q.strokeStylePanel.onStyleChanged=q.setStrokeDasharray,q}return g(W,te),Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var Y=te.prototype.getState.call(this);return Y.typeName=W.typeName,Y},W.typeName="FrameMarker",W.title="Frame marker",W.icon='',W}(b),y=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},x=function(te){function W(Y,V,Q){var q=te.call(this,Y,V,Q)||this;return q.x1=0,q.y1=0,q.x2=0,q.y2=0,q.defaultLength=50,q.manipulationStartX=0,q.manipulationStartY=0,q.manipulationStartX1=0,q.manipulationStartY1=0,q.manipulationStartX2=0,q.manipulationStartY2=0,q.setupControlBox(),q}return g(W,te),W.prototype.ownsTarget=function(Y){return!!te.prototype.ownsTarget.call(this,Y)||!(!this.grip1.ownsTarget(Y)&&!this.grip2.ownsTarget(Y))},W.prototype.pointerDown=function(Y,V){te.prototype.pointerDown.call(this,Y,V),this.manipulationStartX=Y.x,this.manipulationStartY=Y.y,this.state==="new"&&(this.x1=Y.x,this.y1=Y.y,this.x2=Y.x,this.y2=Y.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(V)?this.activeGrip=this.grip1:this.grip2.ownsTarget(V)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},W.prototype.pointerUp=function(Y){var V=this.state;te.prototype.pointerUp.call(this,Y),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(Y),this._state="select",V==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},W.prototype.adjustVisual=function(){},W.prototype.manipulate=function(Y){this.state==="creating"?this.resize(Y):this.state==="move"?(this.x1=this.manipulationStartX1+Y.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Y.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Y.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Y.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Y)},W.prototype.resize=function(Y){switch(this.activeGrip){case this.grip1:this.x1=Y.x,this.y1=Y.y;break;case this.grip2:case void 0:this.x2=Y.x,this.y2=Y.y}this.adjustVisual(),this.adjustControlBox()},W.prototype.select=function(){te.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},W.prototype.deselect=function(){te.prototype.deselect.call(this),this.controlBox.style.display="none"},W.prototype.setupControlBox=function(){this.controlBox=m.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},W.prototype.adjustControlBox=function(){this.positionGrips()},W.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},W.prototype.createGrip=function(){var Y=new o;return Y.visual.transform.baseVal.appendItem(m.createTransform()),this.controlBox.appendChild(Y.visual),Y},W.prototype.positionGrips=function(){var Y=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Y/2,this.y1-Y/2),this.positionGrip(this.grip2.visual,this.x2-Y/2,this.y2-Y/2)},W.prototype.positionGrip=function(Y,V,Q){var q=Y.transform.baseVal.getItem(0);q.setTranslate(V,Q),Y.transform.baseVal.replaceItem(q,0)},W.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},te.prototype.getState.call(this))},W.prototype.restoreState=function(Y){te.prototype.restoreState.call(this,Y);var V=Y;this.x1=V.x1,this.y1=V.y1,this.x2=V.x2,this.y2=V.y2},W.prototype.scale=function(Y,V){te.prototype.scale.call(this,Y,V),this.x1=this.x1*Y,this.y1=this.y1*V,this.x2=this.x2*Y,this.y2=this.y2*V,this.adjustVisual(),this.adjustControlBox()},W}(d),w=function(te){function W(Y,V,Q){var q=te.call(this,Y,V,Q)||this;return q.strokeColor="transparent",q.strokeWidth=0,q.strokeDasharray="",q.setStrokeColor=q.setStrokeColor.bind(q),q.setStrokeWidth=q.setStrokeWidth.bind(q),q.setStrokeDasharray=q.setStrokeDasharray.bind(q),q.strokeColor=Q.defaultColor,q.strokeWidth=Q.defaultStrokeWidth,q.strokeDasharray=Q.defaultStrokeDasharray,q.strokePanel=new f("Line color",Q.defaultColorSet,Q.defaultColor),q.strokePanel.onColorChanged=q.setStrokeColor,q.strokeWidthPanel=new p("Line width",Q.defaultStrokeWidths,Q.defaultStrokeWidth),q.strokeWidthPanel.onWidthChanged=q.setStrokeWidth,q.strokeStylePanel=new D("Line style",Q.defaultStrokeDasharrays,Q.defaultStrokeDasharray),q.strokeStylePanel.onStyleChanged=q.setStrokeDasharray,q}return g(W,te),W.prototype.ownsTarget=function(Y){return!(!te.prototype.ownsTarget.call(this,Y)&&Y!==this.visual&&Y!==this.selectorLine&&Y!==this.visibleLine)},W.prototype.createVisual=function(){this.visual=m.createGroup(),this.selectorLine=m.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=m.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},W.prototype.pointerDown=function(Y,V){te.prototype.pointerDown.call(this,Y,V),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},W.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),m.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),m.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),m.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},W.prototype.setStrokeColor=function(Y){this.strokeColor=Y,this.adjustVisual(),this.colorChanged(Y)},W.prototype.setStrokeWidth=function(Y){this.strokeWidth=Y,this.adjustVisual()},W.prototype.setStrokeDasharray=function(Y){this.strokeDasharray=Y,this.adjustVisual(),this.stateChanged()},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var Y=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},te.prototype.getState.call(this));return Y.typeName=W.typeName,Y},W.prototype.restoreState=function(Y){te.prototype.restoreState.call(this,Y);var V=Y;this.strokeColor=V.strokeColor,this.strokeWidth=V.strokeWidth,this.strokeDasharray=V.strokeDasharray,this.createVisual(),this.adjustVisual()},W.typeName="LineMarker",W.title="Line marker",W.icon='',W}(x),T=function(te){function W(Y,V,Q,q){var ie=te.call(this,Y,q||'')||this;return ie.fonts=[],ie.fontBoxes=[],ie.fonts=V,ie.currentFont=Q,ie.setCurrentFont=ie.setCurrentFont.bind(ie),ie}return g(W,te),W.prototype.getUi=function(){var Y=this,V=document.createElement("div");return V.style.overflow="hidden",V.style.flexGrow="2",this.fonts.forEach(function(Q){var q=document.createElement("div");q.style.display="inline-block",q.style.alignItems="center",q.style.justifyContent="space-between",q.style.padding="5px",q.style.borderWidth="2px",q.style.borderStyle="solid",q.style.overflow="hidden",q.style.maxWidth=100/Y.fonts.length-5+"%",q.style.borderColor=Q===Y.currentFont?Y.uiStyleSettings.toolboxAccentColor:"transparent",q.addEventListener("click",function(){Y.setCurrentFont(Q,q)}),V.appendChild(q);var ie=document.createElement("div");ie.style.display="flex",ie.style.minHeight="20px",ie.style.flexGrow="2",ie.style.fontFamily=Q,ie.style.overflow="hidden";var ne=document.createElement("div");ne.style.whiteSpace="nowrap",ne.style.overflow="hidden",ne.style.textOverflow="ellipsis",ne.innerHTML="The quick brown fox jumps over the lazy dog",ie.appendChild(ne),q.appendChild(ie),Y.fontBoxes.push(q)}),V},W.prototype.setCurrentFont=function(Y,V){var Q=this;this.currentFont=Y,this.fontBoxes.forEach(function(q){q.style.borderColor=q===V?Q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},W}(l),F=function(te){function W(Y,V,Q){var q=te.call(this,Y,V,Q)||this;return q.color="transparent",q.padding=5,q.DEFAULT_TEXT="your text here",q.text=q.DEFAULT_TEXT,q.isMoved=!1,q.color=Q.defaultColor,q.fontFamily=Q.defaultFontFamily,q.defaultSize={x:100,y:30},q.setColor=q.setColor.bind(q),q.setFont=q.setFont.bind(q),q.renderText=q.renderText.bind(q),q.sizeText=q.sizeText.bind(q),q.textEditDivClicked=q.textEditDivClicked.bind(q),q.showTextEditor=q.showTextEditor.bind(q),q.setSize=q.setSize.bind(q),q.positionTextEditor=q.positionTextEditor.bind(q),q.colorPanel=new f("Color",Q.defaultColorSet,Q.defaultColor),q.colorPanel.onColorChanged=q.setColor,q.fontFamilyPanel=new T("Font",Q.defaultFontFamilies,Q.defaultFontFamily),q.fontFamilyPanel.onFontChanged=q.setFont,q}return g(W,te),W.prototype.ownsTarget=function(Y){if(te.prototype.ownsTarget.call(this,Y)||Y===this.visual||Y===this.textElement||Y===this.bgRectangle)return!0;var V=!1;return this.textElement.childNodes.forEach(function(Q){Q===Y&&(V=!0)}),V},W.prototype.createVisual=function(){this.visual=m.createGroup(),this.bgRectangle=m.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=m.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(m.createTransform()),this.textElement.transform.baseVal.appendItem(m.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},W.prototype.pointerDown=function(Y,V){te.prototype.pointerDown.call(this,Y,V),this.isMoved=!1,this.pointerDownPoint=Y,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Y),this._state="creating")},W.prototype.renderText=function(){var Y=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(V){Y.textElement.appendChild(m.createTSpan(V.trim()===""?" ":V.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},W.prototype.getTextScale=function(){var Y=this.textElement.getBBox(),V=1;if(Y.width>0&&Y.height>0){var Q=(1*this.width-this.width*this.padding*2/100)/Y.width,q=(1*this.height-this.height*this.padding*2/100)/Y.height;V=Math.min(Q,q)}return V},W.prototype.getTextPosition=function(Y){var V=this.textElement.getBBox(),Q=0,q=0;return V.width>0&&V.height>0&&(Q=(this.width-V.width*Y)/2,q=this.height/2-V.height*Y/2),{x:Q,y:q}},W.prototype.sizeText=function(){var Y=this.textElement.getBBox(),V=this.getTextScale(),Q=this.getTextPosition(V);Q.y-=Y.y*V,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Q.x+"px, "+Q.y+"px) scale("+V+", "+V+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Q.x,Q.y),this.textElement.transform.baseVal.getItem(1).setScale(V,V))},W.prototype.manipulate=function(Y){te.prototype.manipulate.call(this,Y),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Y.x-this.pointerDownPoint.x)>5||Math.abs(Y.y-this.pointerDownPoint.y)>5)},W.prototype.resize=function(Y){te.prototype.resize.call(this,Y),this.isMoved=!0,this.setSize(),this.sizeText()},W.prototype.setSize=function(){te.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(m.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),m.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},W.prototype.pointerUp=function(Y){var V=this.state;V==="creating"&&(this._suppressMarkerCreateEvent=!0),te.prototype.pointerUp.call(this,Y),this.setSize(),(V==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},W.prototype.showTextEditor=function(){var Y=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(V){V.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var V=Number.parseFloat(Y.textEditor.style.fontSize);Y.textEditor.clientWidth>=Number.parseInt(Y.textEditor.style.maxWidth)&&V>.9;)V-=.1,Y.textEditor.style.fontSize=Math.max(V,.9)+"em"}),this.textEditor.addEventListener("keyup",function(V){V.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(V){if(V.clipboardData){var Q=V.clipboardData.getData("text"),q=window.getSelection();if(!q.rangeCount)return!1;q.deleteFromDocument(),q.getRangeAt(0).insertNode(document.createTextNode(Q)),V.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Y.textEditDivClicked(Y.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},W.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Y=this.getTextScale(),V=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Q=this.textElement.getBBox(),q={x:Q.width*Y,y:Q.height*Y};V.x-=q.x/2,V.y-=q.y/2,this.textEditor.style.top=V.y+"px",this.textEditor.style.left=V.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-V.x+"px",this.textEditor.style.fontSize=Math.max(16*Y,12)+"px",this.textElement.style.display="none"}},W.prototype.textEditDivClicked=function(Y){this.text=Y.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},W.prototype.select=function(){te.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},W.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),te.prototype.deselect.call(this)},W.prototype.dblClick=function(Y,V){te.prototype.dblClick.call(this,Y,V),this.showTextEditor()},W.prototype.setColor=function(Y){this.textElement&&m.setAttributes(this.textElement,[["fill",Y]]),this.color=Y,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Y)},W.prototype.setFont=function(Y){this.textElement&&m.setAttributes(this.textElement,[["font-family",Y]]),this.fontFamily=Y,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},W.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},W.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var Y=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},te.prototype.getState.call(this));return Y.typeName=W.typeName,Y},W.prototype.restoreState=function(Y){var V=Y;this.color=V.color,this.fontFamily=V.fontFamily,this.padding=V.padding,this.text=V.text,this.createVisual(),te.prototype.restoreState.call(this,Y),this.setSize()},W.prototype.scale=function(Y,V){te.prototype.scale.call(this,Y,V),this.setSize(),this.sizeText(),this.positionTextEditor()},W.typeName="TextMarker",W.title="Text marker",W.icon='',W}(E),P=function(te){function W(Y,V,Q){var q=te.call(this,Y,V,Q)||this;return q.color="transparent",q.lineWidth=3,q.drawing=!1,q.pixelRatio=1,q.color=Q.defaultColor,q.lineWidth=Q.defaultStrokeWidth,q.pixelRatio=Q.freehandPixelRatio,q.setColor=q.setColor.bind(q),q.addCanvas=q.addCanvas.bind(q),q.finishCreation=q.finishCreation.bind(q),q.setLineWidth=q.setLineWidth.bind(q),q.colorPanel=new f("Color",Q.defaultColorSet,Q.defaultColor),q.colorPanel.onColorChanged=q.setColor,q.lineWidthPanel=new p("Line width",Q.defaultStrokeWidths,Q.defaultStrokeWidth),q.lineWidthPanel.onWidthChanged=q.setLineWidth,q}return g(W,te),W.prototype.ownsTarget=function(Y){return!(!te.prototype.ownsTarget.call(this,Y)&&Y!==this.visual&&Y!==this.drawingImage)},W.prototype.createVisual=function(){this.visual=m.createGroup(),this.drawingImage=m.createImage(),this.visual.appendChild(this.drawingImage);var Y=m.createTransform();this.visual.transform.baseVal.appendItem(Y),this.addMarkerVisualToContainer(this.visual)},W.prototype.pointerDown=function(Y,V){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(Y.x,Y.y),this.drawing=!0):te.prototype.pointerDown.call(this,Y,V)},W.prototype.manipulate=function(Y){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Y.x,Y.y),this.canvasContext.stroke()):te.prototype.manipulate.call(this,Y)},W.prototype.resize=function(Y){te.prototype.resize.call(this,Y),m.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),m.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},W.prototype.pointerUp=function(Y){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):te.prototype.pointerUp.call(this,Y)},W.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},W.prototype.select=function(){this.state==="creating"&&this.finishCreation(),te.prototype.select.call(this)},W.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),te.prototype.deselect.call(this)},W.prototype.finishCreation=function(){for(var Y=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),V=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Q=V[0],q=V[1],ie=V[2],ne=V[3],J=!1,$=0;$0&&(J=!0,$ne&&(ne=$),le>ie&&(ie=le));if(J){this.left=Q/this.pixelRatio,this.top=q/this.pixelRatio,this.width=(ie-Q)/this.pixelRatio,this.height=(ne-q)/this.pixelRatio;var ce=document.createElement("canvas");ce.width=ie-Q,ce.height=ne-q,ce.getContext("2d").putImageData(this.canvasContext.getImageData(Q,q,ie-Q,ne-q),0,0),this.drawingImgUrl=ce.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},W.prototype.setDrawingImage=function(){m.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),m.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},W.prototype.setColor=function(Y){this.color=Y,this.colorChanged(Y)},W.prototype.setLineWidth=function(Y){this.lineWidth=Y},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var Y=Object.assign({drawingImgUrl:this.drawingImgUrl},te.prototype.getState.call(this));return Y.typeName=W.typeName,Y},W.prototype.restoreState=function(Y){this.createVisual(),te.prototype.restoreState.call(this,Y),this.drawingImgUrl=Y.drawingImgUrl,this.setDrawingImage()},W.prototype.scale=function(Y,V){te.prototype.scale.call(this,Y,V),this.setDrawingImage()},W.typeName="FreehandMarker",W.title="Freehand marker",W.icon='',W}(E),A=function(te){function W(Y,V,Q){var q=te.call(this,Y,Q||'')||this;return q.typeBoxes=[],q.currentType=V,q.setCurrentType=q.setCurrentType.bind(q),q}return g(W,te),W.prototype.getUi=function(){var Y=this,V=document.createElement("div");V.style.display="flex",V.style.overflow="hidden",V.style.flexGrow="2";for(var Q=function(ne){var J="both";switch(ne){case 0:J="both";break;case 1:J="start";break;case 2:J="end";break;case 3:J="none"}var $=document.createElement("div");if($.style.display="flex",$.style.flexGrow="2",$.style.alignItems="center",$.style.justifyContent="space-between",$.style.padding="5px",$.style.borderWidth="2px",$.style.borderStyle="solid",$.style.borderColor=J===q.currentType?q.uiStyleSettings.toolboxAccentColor:"transparent",$.addEventListener("click",function(){Y.setCurrentType(J,$)}),V.appendChild($),J==="both"||J==="start"){var le=document.createElement("div");le.style.display="flex",le.style.alignItems="center",le.style.minHeight="20px",le.innerHTML=` `,le.style.marginLeft="5px",$.appendChild(le)}var ce=document.createElement("div");ce.style.display="flex",ce.style.alignItems="center",ce.style.minHeight="20px",ce.style.flexGrow="2";var we=document.createElement("hr");if(we.style.minWidth="20px",we.style.border="0px",we.style.borderTop="3px solid "+(q.uiStyleSettings!==void 0?q.uiStyleSettings.toolboxColor:"#eeeeee"),we.style.flexGrow="2",ce.appendChild(we),$.appendChild(ce),J==="both"||J==="end"){var Fe=document.createElement("div");Fe.style.display="flex",Fe.style.alignItems="center",Fe.style.minHeight="20px",Fe.innerHTML=` `,Fe.style.marginRight="5px",$.appendChild(Fe)}q.typeBoxes.push($)},q=this,ie=0;ie<4;ie++)Q(ie);return V},W.prototype.setCurrentType=function(Y,V){var Q=this;this.currentType=Y,this.typeBoxes.forEach(function(q){q.style.borderColor=q===V?Q.uiStyleSettings!==void 0?Q.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},W}(l),X=function(te){function W(Y,V,Q){var q=te.call(this,Y,V,Q)||this;return q.arrowType="end",q.arrowBaseHeight=10,q.arrowBaseWidth=10,q.getArrowPoints=q.getArrowPoints.bind(q),q.setArrowType=q.setArrowType.bind(q),q.arrowTypePanel=new A("Arrow type","end"),q.arrowTypePanel.onArrowTypeChanged=q.setArrowType,q}return g(W,te),W.prototype.ownsTarget=function(Y){return!(!te.prototype.ownsTarget.call(this,Y)&&Y!==this.arrow1&&Y!==this.arrow2)},W.prototype.getArrowPoints=function(Y,V){var Q=this.arrowBaseWidth+2*this.strokeWidth,q=this.arrowBaseHeight+2*this.strokeWidth;return Y-Q/2+","+(V+q/2)+" "+Y+","+(V-q/2)+" "+(Y+Q/2)+","+(V+q/2)},W.prototype.createTips=function(){this.arrow1=m.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(m.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=m.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(m.createTransform()),this.visual.appendChild(this.arrow2)},W.prototype.pointerDown=function(Y,V){te.prototype.pointerDown.call(this,Y,V),this.state==="creating"&&this.createTips()},W.prototype.adjustVisual=function(){if(te.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",m.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),m.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var Y=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),V=this.arrow1.transform.baseVal.getItem(0);V.setRotate(Y,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(V,0);var Q=this.arrow2.transform.baseVal.getItem(0);Q.setRotate(Y+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Q,0)}},W.prototype.setArrowType=function(Y){this.arrowType=Y,this.adjustVisual(),this.stateChanged()},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var Y=Object.assign({arrowType:this.arrowType},te.prototype.getState.call(this));return Y.typeName=W.typeName,Y},W.prototype.restoreState=function(Y){te.prototype.restoreState.call(this,Y);var V=Y;this.arrowType=V.arrowType,this.createTips(),this.adjustVisual()},W.typeName="ArrowMarker",W.title="Arrow marker",W.icon='',W}(w),z=function(te){function W(Y,V,Q){var q=te.call(this,Y,V,Q)||this;return q.fillColor=Q.defaultFillColor,q.strokeWidth=0,q.fillPanel=new f("Color",Q.defaultColorSet,Q.defaultFillColor),q.fillPanel.onColorChanged=q.setFillColor,q}return g(W,te),Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var Y=te.prototype.getState.call(this);return Y.typeName=W.typeName,Y},W.typeName="CoverMarker",W.title="Cover marker",W.icon='',W}(b),O=function(te){function W(Y,V,Q,q){var ie=te.call(this,Y,q||'')||this;return ie.opacities=[],ie.opacityBoxes=[],ie.opacities=V,ie.currentOpacity=Q,ie.setCurrentOpacity=ie.setCurrentOpacity.bind(ie),ie}return g(W,te),W.prototype.getUi=function(){var Y=this,V=document.createElement("div");return V.style.display="flex",V.style.overflow="hidden",V.style.flexGrow="2",V.style.justifyContent="space-between",this.opacities.forEach(function(Q){var q=document.createElement("div");q.style.display="flex",q.style.alignItems="center",q.style.justifyContent="center",q.style.padding="5px",q.style.borderWidth="2px",q.style.borderStyle="solid",q.style.borderColor=Q===Y.currentOpacity?Y.uiStyleSettings.toolboxAccentColor:"transparent",q.addEventListener("click",function(){Y.setCurrentOpacity(Q,q)}),V.appendChild(q);var ie=document.createElement("div");ie.innerText=100*Q+"%",q.appendChild(ie),Y.opacityBoxes.push(q)}),V},W.prototype.setCurrentOpacity=function(Y,V){var Q=this;this.currentOpacity=Y,this.opacityBoxes.forEach(function(q){q.style.borderColor=q===V?Q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},W}(l),B=function(te){function W(Y,V,Q){var q=te.call(this,Y,V,Q)||this;return q.setOpacity=q.setOpacity.bind(q),q.fillColor=Q.defaultHighlightColor,q.strokeWidth=0,q.opacity=Q.defaultHighlightOpacity,q.fillPanel=new f("Color",Q.defaultColorSet,q.fillColor),q.fillPanel.onColorChanged=q.setFillColor,q.opacityPanel=new O("Opacity",Q.defaultOpacitySteps,q.opacity),q.opacityPanel.onOpacityChanged=q.setOpacity,q}return g(W,te),W.prototype.setOpacity=function(Y){this.opacity=Y,this.visual&&m.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var Y=te.prototype.getState.call(this);return Y.typeName=W.typeName,Y},W.typeName="HighlightMarker",W.title="Highlight marker",W.icon='',W}(z),U='',L=function(te){function W(Y,V,Q){var q=te.call(this,Y,V,Q)||this;return q.bgColor="transparent",q.tipPosition={x:0,y:0},q.tipBase1Position={x:0,y:0},q.tipBase2Position={x:0,y:0},q.tipMoving=!1,q.color=Q.defaultStrokeColor,q.bgColor=Q.defaultFillColor,q.fontFamily=Q.defaultFontFamily,q.defaultSize={x:100,y:30},q.setBgColor=q.setBgColor.bind(q),q.getTipPoints=q.getTipPoints.bind(q),q.positionTip=q.positionTip.bind(q),q.setTipPoints=q.setTipPoints.bind(q),q.colorPanel=new f("Text color",Q.defaultColorSet,q.color,''),q.colorPanel.onColorChanged=q.setColor,q.bgColorPanel=new f("Fill color",Q.defaultColorSet,q.bgColor,U),q.bgColorPanel.onColorChanged=q.setBgColor,q.fontFamilyPanel=new T("Font",Q.defaultFontFamilies,Q.defaultFontFamily),q.fontFamilyPanel.onFontChanged=q.setFont,q.tipGrip=new o,q.tipGrip.visual.transform.baseVal.appendItem(m.createTransform()),q.controlBox.appendChild(q.tipGrip.visual),q}return g(W,te),W.prototype.ownsTarget=function(Y){return te.prototype.ownsTarget.call(this,Y)||this.tipGrip.ownsTarget(Y)||this.tip===Y},W.prototype.createTip=function(){m.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=m.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},W.prototype.pointerDown=function(Y,V){this.state==="new"&&te.prototype.pointerDown.call(this,Y,V),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(V)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):te.prototype.pointerDown.call(this,Y,V)},W.prototype.pointerUp=function(Y){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,te.prototype.pointerUp.call(this,Y);else{var V=this.state==="creating";te.prototype.pointerUp.call(this,Y),this.setTipPoints(V),this.positionTip()}},W.prototype.manipulate=function(Y){if(this.tipMoving){var V=this.unrotatePoint(Y);this.tipPosition={x:V.x-this.manipulationStartLeft,y:V.y-this.manipulationStartTop},this.positionTip()}else te.prototype.manipulate.call(this,Y)},W.prototype.setBgColor=function(Y){this.bgRectangle&&this.tip&&(m.setAttributes(this.bgRectangle,[["fill",Y]]),m.setAttributes(this.tip,[["fill",Y]])),this.bgColor=Y,this.fillColorChanged(Y)},W.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},W.prototype.setTipPoints=function(Y){Y===void 0&&(Y=!1);var V=Math.min(this.height/2,15),Q=this.height/5;Y&&(this.tipPosition={x:V+Q/2,y:this.height+20});var q=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?q.1)){var Y=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),V=this.tip1.transform.baseVal.getItem(0);V.setRotate(Y,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(V,0);var Q=this.tip2.transform.baseVal.getItem(0);Q.setRotate(Y+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Q,0)}},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var Y=te.prototype.getState.call(this);return Y.typeName=W.typeName,Y},W.prototype.restoreState=function(Y){te.prototype.restoreState.call(this,Y),this.createTips(),this.adjustVisual()},W.typeName="MeasurementMarker",W.title="Measurement marker",W.icon='',W}(w),oe=function(te){function W(Y,V,Q){var q=te.call(this,Y,V,Q)||this;return q.strokePanel.colors=Q.defaultColorSet,q.fillColor="transparent",q}return g(W,te),Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var Y=te.prototype.getState.call(this);return Y.typeName=W.typeName,Y},W.typeName="EllipseFrameMarker",W.title="Ellipse frame marker",W.icon='',W}(G),ae=function(){function te(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(te.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),te.prototype.addUndoStep=function(W){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(W)||(this.undoStack.push(W),JSON.stringify(this.lastRedoStep)!==JSON.stringify(W)&&this.redoStack.splice(0,this.redoStack.length))},te.prototype.replaceLastUndoStep=function(W){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=W)},te.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},te.prototype.undo=function(){if(this.undoStack.length>1){var W=this.undoStack.pop();return W!==void 0&&this.redoStack.push(W),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},te.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},te}(),be=function(te){function W(Y,V,Q){var q=te.call(this,Y,V,Q)||this;return q.strokeColor="transparent",q.strokeWidth=0,q.strokeDasharray="",q.curveX=0,q.curveY=0,q.manipulationStartCurveX=0,q.manipulationStartCurveY=0,q.setStrokeColor=q.setStrokeColor.bind(q),q.setStrokeWidth=q.setStrokeWidth.bind(q),q.setStrokeDasharray=q.setStrokeDasharray.bind(q),q.positionGrips=q.positionGrips.bind(q),q.addControlGrips=q.addControlGrips.bind(q),q.adjustVisual=q.adjustVisual.bind(q),q.setupControlBox=q.setupControlBox.bind(q),q.resize=q.resize.bind(q),q.strokeColor=Q.defaultColor,q.strokeWidth=Q.defaultStrokeWidth,q.strokeDasharray=Q.defaultStrokeDasharray,q.strokePanel=new f("Line color",Q.defaultColorSet,Q.defaultColor),q.strokePanel.onColorChanged=q.setStrokeColor,q.strokeWidthPanel=new p("Line width",Q.defaultStrokeWidths,Q.defaultStrokeWidth),q.strokeWidthPanel.onWidthChanged=q.setStrokeWidth,q.strokeStylePanel=new D("Line style",Q.defaultStrokeDasharrays,Q.defaultStrokeDasharray),q.strokeStylePanel.onStyleChanged=q.setStrokeDasharray,q}return g(W,te),W.prototype.ownsTarget=function(Y){return!(!te.prototype.ownsTarget.call(this,Y)&&Y!==this.visual&&Y!==this.selectorCurve&&Y!==this.visibleCurve&&!this.curveGrip.ownsTarget(Y))},W.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},W.prototype.createVisual=function(){this.visual=m.createGroup(),this.selectorCurve=m.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=m.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},W.prototype.pointerDown=function(Y,V){te.prototype.pointerDown.call(this,Y,V),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Y.x,this.curveY=Y.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(V)&&(this.activeGrip=this.curveGrip,this._state="resize")},W.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),m.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),m.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),m.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},W.prototype.setupControlBox=function(){te.prototype.setupControlBox.call(this),this.curveControlLine1=m.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=m.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},W.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,te.prototype.addControlGrips.call(this)},W.prototype.positionGrips=function(){te.prototype.positionGrips.call(this);var Y=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Y/2,this.curveY-Y/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},W.prototype.manipulate=function(Y){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Y.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Y.y-this.manipulationStartY),te.prototype.manipulate.call(this,Y)},W.prototype.resize=function(Y){this.activeGrip===this.curveGrip&&(this.curveX=Y.x,this.curveY=Y.y),te.prototype.resize.call(this,Y),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},W.prototype.setStrokeColor=function(Y){this.strokeColor=Y,this.adjustVisual(),this.colorChanged(Y)},W.prototype.setStrokeWidth=function(Y){this.strokeWidth=Y,this.adjustVisual()},W.prototype.setStrokeDasharray=function(Y){this.strokeDasharray=Y,this.adjustVisual()},W.prototype.scale=function(Y,V){this.curveX=this.curveX*Y,this.curveY=this.curveY*V,te.prototype.scale.call(this,Y,V)},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var Y=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},te.prototype.getState.call(this));return Y.typeName=W.typeName,Y},W.prototype.restoreState=function(Y){te.prototype.restoreState.call(this,Y);var V=Y;this.strokeColor=V.strokeColor,this.strokeWidth=V.strokeWidth,this.strokeDasharray=V.strokeDasharray,this.curveX=V.curveX,this.curveY=V.curveY,this.createVisual(),this.adjustVisual()},W.typeName="CurveMarker",W.title="Curve marker",W.icon='',W}(x),_e=function(){function te(W,Y){Y===void 0&&(Y=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=W,this.cancelable=Y}return Object.defineProperty(te.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),te.prototype.preventDefault=function(){this._defaultPrevented=!0},te}(),fe=function(te){function W(Y,V,Q){var q=te.call(this,Y,!1)||this;return q.dataUrl=V,q.state=Q,q}return g(W,te),W}(_e),Re=function(te){function W(Y,V,Q){Q===void 0&&(Q=!1);var q=te.call(this,Y,Q)||this;return q.marker=V,q}return g(W,te),W}(_e),Oe=function(){function te(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return te.prototype.addEventListener=function(W,Y){this[W].push(Y)},te.prototype.removeEventListener=function(W,Y){var V=this[W].indexOf(Y);V>-1&&this[W].splice(V,1)},te}(),de=function(){function te(W){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new y,this._isOpen=!1,this.undoRedoManager=new ae,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new Oe,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=te.instanceCounter++,this.styles=new h(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=W,this.targetRoot=document.body,this.width=W.clientWidth,this.height=W.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(te.prototype,"ALL_MARKER_TYPES",{get:function(){return[R,P,X,F,oe,G,B,L,ee,z,w,be]},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[R,P,X,F,G,B,L]},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"BASIC_MARKER_TYPES",{get:function(){return[R,P,X,F,B]},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(W){var Y=this;this._availableMarkerTypes.splice(0),W.forEach(function(V){if(typeof V=="string"){var Q=Y.ALL_MARKER_TYPES.find(function(q){return q.typeName===V});Q!==void 0&&Y._availableMarkerTypes.push(Q)}else Y._availableMarkerTypes.push(V)})},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(W){this._zoomLevel=W,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),te.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),C.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},te.prototype.show=function(){var W=this;this.styles.styleSheetRoot===void 0&&e.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=e.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Y){return Y(new _e(W))})},te.prototype.render=function(){return S(this,void 0,void 0,function(){var W;return k(this,function(Y){switch(Y.label){case 0:return this.setCurrentMarker(),(W=new _).naturalSize=this.renderAtNaturalSize,W.imageType=this.renderImageType,W.imageQuality=this.renderImageQuality,W.markersOnly=this.renderMarkersOnly,W.width=this.renderWidth,W.height=this.renderHeight,[4,W.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Y.sent(),[4,W.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Y.sent()]}})})},te.prototype.close=function(W){var Y=this;if(W===void 0&&(W=!1),this.isOpen){var V=!1;W||this.eventListeners.beforeclose.forEach(function(Q){var q=new _e(Y,!0);Q(q),q.defaultPrevented&&(V=!0)}),V||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(Q){return Q(new _e(Y))}),this.detachEvents(),this._isOpen=!1)}},te.prototype.addMarkersToToolbar=function(){for(var W,Y=[],V=0;Vthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*W:this.editorCanvas.clientWidth,V=Y',W.title="Powered by marker.js",W.style.display="grid",W.style.alignItems="center",W.style.justifyItems="center",W.style.padding="3px",W.style.width="20px",W.style.height="20px",this.logoUI.appendChild(W),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},te.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},te.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},te.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},te.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var W=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=W+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new i(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y-1&&this.markers.splice(this.markers.indexOf(W),1),W.dispose()},te.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},te.prototype.toolbarButtonClicked=function(W,Y){if(W==="marker"&&Y!==void 0)this.createNewMarker(Y);else if(W==="action")switch(Y){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},te.prototype.deleteSelectedMarker=function(){var W=this;if(this._currentMarker!==void 0){var Y=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Q){var q=new Re(W,W._currentMarker,!0);Q(q),q.defaultPrevented&&(Y=!0)}),!Y){var V=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(Q){return Q(new Re(W,V))})}}},te.prototype.clear=function(){var W=this,Y=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ie){var ne=new Re(W,void 0,!0);ie(ne),ne.defaultPrevented&&(Y=!0)}),!Y)){this.setCurrentMarker();for(var V=function(ie){var ne=Q.markers[ie];Q.setCurrentMarker(Q.markers[ie]),Q._currentMarker.dispose(),Q.markerImage.removeChild(Q._currentMarker.container),Q.markers.splice(Q.markers.indexOf(Q._currentMarker),1),Q.eventListeners.markerdelete.forEach(function(J){return J(new Re(W,ne))})},Q=this,q=this.markers.length-1;q>=0;q--)V(q);this.addUndoStep()}},Object.defineProperty(te.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),te.prototype.showNotesEditor=function(){var W;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(W=this._currentMarker.notes)!==null&&W!==void 0?W:"",this.overlayContainer.appendChild(this.notesArea))},te.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},te.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},te.prototype.addUndoStep=function(){var W=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Y=this.getState(),V=this.undoRedoManager.getLastUndoStep();if(!V||V.width===Y.width&&V.height===Y.height){var Q=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Y),Q1&&this.panTo({x:W.clientX,y:W.clientY}))},te.prototype.onPointerUp=function(W){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(W.clientX,W.clientY)),this.isDragging=!1,this.addUndoStep()},te.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},te.prototype.onKeyUp=function(W){this._currentMarker===void 0||this.notesArea!==void 0||W.key!=="Delete"&&W.key!=="Backspace"||this.deleteSelectedMarker()},te.prototype.clientToLocalCoordinates=function(W,Y){var V=this.markerImage.getBoundingClientRect();return{x:(W-V.left)/this.zoomLevel,y:(Y-V.top)/this.zoomLevel}},te.prototype.onWindowResize=function(){this.positionUI()},te.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var W=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=W+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},te.prototype.addLicenseKey=function(W){C.addKey(W)},te.prototype.addEventListener=function(W,Y){this.eventListeners.addEventListener(W,Y)},te.prototype.removeEventListener=function(W,Y){this.eventListeners.removeEventListener(W,Y)},te.prototype.renderState=function(W){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(W),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(te.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),te.prototype.focus=function(){var W=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(Y){return Y(new _e(W))}))},te.prototype.blur=function(){var W=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Y){return Y(new _e(W))}))},te.instanceCounter=0,te}()},T8No:function(H,Z,I){"use strict";I.d(Z,"a",function(){return C}),I.d(Z,"e",function(){return _}),I.d(Z,"c",function(){return w}),I.d(Z,"b",function(){return T}),I.d(Z,"d",function(){return F}),I.d(Z,"f",function(){return X});var N=I("MNsG"),g=I("N0LK"),S=I("Cg/j");let k=N.k||"";const v=new Map;v.set("false",!1),v.set("true",!0),v.set("isMac",N.f),v.set("isLinux",N.d),v.set("isWindows",N.i),v.set("isWeb",N.h),v.set("isMacNative",N.f&&!N.h),v.set("isEdge",k.indexOf("Edg/")>=0),v.set("isFirefox",k.indexOf("Firefox")>=0),v.set("isChrome",k.indexOf("Chrome")>=0),v.set("isSafari",k.indexOf("Safari")>=0);const m=Object.prototype.hasOwnProperty;class C{static has(O){return c.create(O)}static equals(O,B){return i.create(O,B)}static regex(O,B){return p.create(O,B)}static not(O){return d.create(O)}static and(...O){return y.create(O,null)}static or(...O){return x.create(O,null,!0)}static deserialize(O,B=!1){return O?this._deserializeOrExpression(O,B):void 0}static _deserializeOrExpression(O,B){let U=O.split("||");return x.create(U.map(L=>this._deserializeAndExpression(L,B)),null,!0)}static _deserializeAndExpression(O,B){let U=O.split("&&");return y.create(U.map(L=>this._deserializeOne(L,B)),null)}static _deserializeOne(O,B){if(O=O.trim(),O.indexOf("!=")>=0){let U=O.split("!=");return f.create(U[0].trim(),this._deserializeValue(U[1],B))}if(O.indexOf("==")>=0){let U=O.split("==");return i.create(U[0].trim(),this._deserializeValue(U[1],B))}if(O.indexOf("=~")>=0){let U=O.split("=~");return p.create(U[0].trim(),this._deserializeRegexValue(U[1],B))}if(O.indexOf(" in ")>=0){let U=O.split(" in ");return n.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(O)){const U=O.split(">=");return s.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(O)){const U=O.split(">");return o.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(O)){const U=O.split("<=");return b.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(O)){const U=O.split("<");return E.create(U[0].trim(),U[1].trim())}return/^\!\s*/.test(O)?d.create(O.substr(1).trim()):c.create(O)}static _deserializeValue(O,B){if(O=O.trim(),O==="true")return!0;if(O==="false")return!1;let U=/^'([^']*)'$/.exec(O);return U?U[1].trim():O}static _deserializeRegexValue(O,B){if(Object(g.C)(O)){if(B)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let U=O.indexOf("/"),L=O.lastIndexOf("/");if(U===L||U<0){if(B)throw new Error(`bad regexp-value '${O}', missing /-enclosure`);return console.warn(`bad regexp-value '${O}', missing /-enclosure`),null}let G=O.slice(U+1,L),ee=O[L+1]==="i"?"i":"";try{return new RegExp(G,ee)}catch(oe){if(B)throw new Error(`bad regexp-value '${O}', parse error: ${oe}`);return console.warn(`bad regexp-value '${O}', parse error: ${oe}`),null}}}function _(O,B){const U=O?O.substituteConstants():void 0,L=B?B.substituteConstants():void 0;return!U&&!L?!0:!U||!L?!1:U.equals(L)}function e(O,B){return O.cmp(B)}class h{constructor(){this.type=0}cmp(O){return this.type-O.type}equals(O){return O.type===this.type}substituteConstants(){return this}evaluate(O){return!1}serialize(){return"false"}keys(){return[]}negate(){return r.INSTANCE}}h.INSTANCE=new h;class r{constructor(){this.type=1}cmp(O){return this.type-O.type}equals(O){return O.type===this.type}substituteConstants(){return this}evaluate(O){return!0}serialize(){return"true"}keys(){return[]}negate(){return h.INSTANCE}}r.INSTANCE=new r;class c{constructor(O,B){this.key=O,this.negated=B,this.type=2}static create(O,B=null){const U=v.get(O);return typeof U=="boolean"?U?r.INSTANCE:h.INSTANCE:new c(O,B)}cmp(O){return O.type!==this.type?this.type-O.type:P(this.key,O.key)}equals(O){return O.type===this.type?this.key===O.key:!1}substituteConstants(){const O=v.get(this.key);return typeof O=="boolean"?O?r.INSTANCE:h.INSTANCE:this}evaluate(O){return!!O.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=d.create(this.key,this)),this.negated}}class i{constructor(O,B,U){this.key=O,this.value=B,this.negated=U,this.type=4}static create(O,B,U=null){if(typeof B=="boolean")return B?c.create(O,U):d.create(O,U);const L=v.get(O);if(typeof L=="boolean"){const G=L?"true":"false";return B===G?r.INSTANCE:h.INSTANCE}return new i(O,B,U)}cmp(O){return O.type!==this.type?this.type-O.type:A(this.key,this.value,O.key,O.value)}equals(O){return O.type===this.type?this.key===O.key&&this.value===O.value:!1}substituteConstants(){const O=v.get(this.key);if(typeof O=="boolean"){const B=O?"true":"false";return this.value===B?r.INSTANCE:h.INSTANCE}return this}evaluate(O){return O.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=f.create(this.key,this.value,this)),this.negated}}class n{constructor(O,B){this.key=O,this.valueKey=B,this.type=10,this.negated=null}static create(O,B){return new n(O,B)}cmp(O){return O.type!==this.type?this.type-O.type:A(this.key,this.valueKey,O.key,O.valueKey)}equals(O){return O.type===this.type?this.key===O.key&&this.valueKey===O.valueKey:!1}substituteConstants(){return this}evaluate(O){const B=O.getValue(this.valueKey),U=O.getValue(this.key);return Array.isArray(B)?B.indexOf(U)>=0:typeof U=="string"&&typeof B=="object"&&B!==null?m.call(B,U):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=l.create(this)),this.negated}}class l{constructor(O){this._actual=O,this.type=11}static create(O){return new l(O)}cmp(O){return O.type!==this.type?this.type-O.type:this._actual.cmp(O._actual)}equals(O){return O.type===this.type?this._actual.equals(O._actual):!1}substituteConstants(){return this}evaluate(O){return!this._actual.evaluate(O)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class f{constructor(O,B,U){this.key=O,this.value=B,this.negated=U,this.type=5}static create(O,B,U=null){if(typeof B=="boolean")return B?d.create(O,U):c.create(O,U);const L=v.get(O);if(typeof L=="boolean"){const G=L?"true":"false";return B===G?h.INSTANCE:r.INSTANCE}return new f(O,B,U)}cmp(O){return O.type!==this.type?this.type-O.type:A(this.key,this.value,O.key,O.value)}equals(O){return O.type===this.type?this.key===O.key&&this.value===O.value:!1}substituteConstants(){const O=v.get(this.key);if(typeof O=="boolean"){const B=O?"true":"false";return this.value===B?h.INSTANCE:r.INSTANCE}return this}evaluate(O){return O.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=i.create(this.key,this.value,this)),this.negated}}class d{constructor(O,B){this.key=O,this.negated=B,this.type=3}static create(O,B=null){const U=v.get(O);return typeof U=="boolean"?U?h.INSTANCE:r.INSTANCE:new d(O,B)}cmp(O){return O.type!==this.type?this.type-O.type:P(this.key,O.key)}equals(O){return O.type===this.type?this.key===O.key:!1}substituteConstants(){const O=v.get(this.key);return typeof O=="boolean"?O?h.INSTANCE:r.INSTANCE:this}evaluate(O){return!O.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=c.create(this.key,this)),this.negated}}function u(O,B){if(typeof O=="string"){const U=parseFloat(O);isNaN(U)||(O=U)}return typeof O=="string"||typeof O=="number"?B(O):h.INSTANCE}class o{constructor(O,B,U){this.key=O,this.value=B,this.negated=U,this.type=12}static create(O,B,U=null){return u(B,L=>new o(O,L,U))}cmp(O){return O.type!==this.type?this.type-O.type:A(this.key,this.value,O.key,O.value)}equals(O){return O.type===this.type?this.key===O.key&&this.value===O.value:!1}substituteConstants(){return this}evaluate(O){return typeof this.value=="string"?!1:parseFloat(O.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=b.create(this.key,this.value,this)),this.negated}}class s{constructor(O,B,U){this.key=O,this.value=B,this.negated=U,this.type=13}static create(O,B,U=null){return u(B,L=>new s(O,L,U))}cmp(O){return O.type!==this.type?this.type-O.type:A(this.key,this.value,O.key,O.value)}equals(O){return O.type===this.type?this.key===O.key&&this.value===O.value:!1}substituteConstants(){return this}evaluate(O){return typeof this.value=="string"?!1:parseFloat(O.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=E.create(this.key,this.value,this)),this.negated}}class E{constructor(O,B,U){this.key=O,this.value=B,this.negated=U,this.type=14}static create(O,B,U=null){return u(B,L=>new E(O,L,U))}cmp(O){return O.type!==this.type?this.type-O.type:A(this.key,this.value,O.key,O.value)}equals(O){return O.type===this.type?this.key===O.key&&this.value===O.value:!1}substituteConstants(){return this}evaluate(O){return typeof this.value=="string"?!1:parseFloat(O.getValue(this.key))new b(O,L,U))}cmp(O){return O.type!==this.type?this.type-O.type:A(this.key,this.value,O.key,O.value)}equals(O){return O.type===this.type?this.key===O.key&&this.value===O.value:!1}substituteConstants(){return this}evaluate(O){return typeof this.value=="string"?!1:parseFloat(O.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=o.create(this.key,this.value,this)),this.negated}}class p{constructor(O,B){this.key=O,this.regexp=B,this.type=7,this.negated=null}static create(O,B){return new p(O,B)}cmp(O){if(O.type!==this.type)return this.type-O.type;if(this.keyO.key)return 1;const B=this.regexp?this.regexp.source:"",U=O.regexp?O.regexp.source:"";return BU?1:0}equals(O){if(O.type===this.type){const B=this.regexp?this.regexp.source:"",U=O.regexp?O.regexp.source:"";return this.key===O.key&&B===U}return!1}substituteConstants(){return this}evaluate(O){let B=O.getValue(this.key);return this.regexp?this.regexp.test(B):!1}serialize(){const O=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${O}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=D.create(this)),this.negated}}class D{constructor(O){this._actual=O,this.type=8}static create(O){return new D(O)}cmp(O){return O.type!==this.type?this.type-O.type:this._actual.cmp(O._actual)}equals(O){return O.type===this.type?this._actual.equals(O._actual):!1}substituteConstants(){return this}evaluate(O){return!this._actual.evaluate(O)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function R(O){let B=null;for(let U=0,L=O.length;UO.expr.length)return 1;for(let B=0,U=this.expr.length;B1;){const G=U[U.length-1];if(G.type!==9)break;U.pop();const ee=U.pop(),oe=U.length===0,ae=x.create(G.expr.map(be=>y.create([be,ee],null)),null,oe);ae&&(U.push(ae),U.sort(e))}return U.length===1?U[0]:new y(U,B)}serialize(){return this.expr.map(O=>O.serialize()).join(" && ")}keys(){const O=[];for(let B of this.expr)O.push(...B.keys());return O}negate(){if(!this.negated){const O=[];for(let B of this.expr)O.push(B.negate());this.negated=x.create(O,this,!0)}return this.negated}}class x{constructor(O,B){this.expr=O,this.negated=B,this.type=9}static create(O,B,U){return x._normalizeArr(O,B,U)}cmp(O){if(O.type!==this.type)return this.type-O.type;if(this.expr.lengthO.expr.length)return 1;for(let B=0,U=this.expr.length;BO.serialize()).join(" || ")}keys(){const O=[];for(let B of this.expr)O.push(...B.keys());return O}negate(){if(!this.negated){let O=[];for(let B of this.expr)O.push(B.negate());for(;O.length>1;){const B=O.shift(),U=O.shift(),L=[];for(const ee of z(B))for(const oe of z(U))L.push(y.create([ee,oe],null));const G=O.length===0;O.unshift(x.create(L,null,G))}this.negated=O[0]}return this.negated}}class w extends c{constructor(O,B,U){super(O,null);this._defaultValue=B,typeof U=="object"?w._info.push(Object.assign(Object.assign({},U),{key:O})):U!==!0&&w._info.push({key:O,description:U,type:B!=null?typeof B:void 0})}static all(){return w._info.values()}bindTo(O){return O.createKey(this.key,this._defaultValue)}getValue(O){return O.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(O){return i.create(this.key,O)}}w._info=[];const T=Object(S.c)("contextKeyService"),F="setContext";function P(O,B){return OB?1:0}function A(O,B,U,L){return OU?1:BL?1:0}function X(O,B){if(B.type===6&&O.type!==9&&O.type!==6){for(const G of B.expr)if(O.equals(G))return!0}const U=O.negate(),L=z(U).concat(z(B));L.sort(e);for(let G=0;G=0;n--)if(this.__items[n].match(i))return!0;return!1},h.prototype.set_indent=function(i,n){this.is_empty()&&(this.__indent_count=i||0,this.__alignment_count=n||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},h.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},h.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},h.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var i=this.__parent.current_line;return i.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),i.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),i.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,i.__items[0]===" "&&(i.__items.splice(0,1),i.__character_count-=1),!0}return!1},h.prototype.is_empty=function(){return this.__items.length===0},h.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},h.prototype.push=function(i){this.__items.push(i);var n=i.lastIndexOf(` `);n!==-1?this.__character_count=i.length-n:this.__character_count+=i.length},h.prototype.pop=function(){var i=null;return this.is_empty()||(i=this.__items.pop(),this.__character_count-=i.length),i},h.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},h.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},h.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},h.prototype.toString=function(){var i="";return this.is_empty()?this.__parent.indent_empty_lines&&(i=this.__parent.get_indent_string(this.__indent_count)):(i=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),i+=this.__items.join("")),i};function r(i,n){this.__cache=[""],this.__indent_size=i.indent_size,this.__indent_string=i.indent_char,i.indent_with_tabs||(this.__indent_string=new Array(i.indent_size+1).join(i.indent_char)),n=n||"",i.indent_level>0&&(n=new Array(i.indent_level+1).join(this.__indent_string)),this.__base_string=n,this.__base_string_length=n.length}r.prototype.get_indent_size=function(i,n){var l=this.__base_string_length;return n=n||0,i<0&&(l=0),l+=i*this.__indent_size,l+=n,l},r.prototype.get_indent_string=function(i,n){var l=this.__base_string;return n=n||0,i<0&&(i=0,l=""),n+=i*this.__indent_size,this.__ensure_cache(n),l+=this.__cache[n],l},r.prototype.__ensure_cache=function(i){for(;i>=this.__cache.length;)this.__add_column()},r.prototype.__add_column=function(){var i=this.__cache.length,n=0,l="";this.__indent_size&&i>=this.__indent_size&&(n=Math.floor(i/this.__indent_size),i-=n*this.__indent_size,l=new Array(n+1).join(this.__indent_string)),i&&(l+=new Array(i+1).join(" ")),this.__cache.push(l)};function c(i,n){this.__indent_cache=new r(i,n),this.raw=!1,this._end_with_newline=i.end_with_newline,this.indent_size=i.indent_size,this.wrap_line_length=i.wrap_line_length,this.indent_empty_lines=i.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new h(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}c.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},c.prototype.get_line_number=function(){return this.__lines.length},c.prototype.get_indent_string=function(i,n){return this.__indent_cache.get_indent_string(i,n)},c.prototype.get_indent_size=function(i,n){return this.__indent_cache.get_indent_size(i,n)},c.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},c.prototype.add_new_line=function(i){return this.is_empty()||!i&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},c.prototype.get_code=function(i){this.trim(!0);var n=this.current_line.pop();n&&(n[n.length-1]===` `&&(n=n.replace(/\n+$/g,"")),this.current_line.push(n)),this._end_with_newline&&this.__add_outputline();var l=this.__lines.join(` `);return i!==` `&&(l=l.replace(/[\n]/g,i)),l},c.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},c.prototype.set_indent=function(i,n){return i=i||0,n=n||0,this.next_line.set_indent(i,n),this.__lines.length>1?(this.current_line.set_indent(i,n),!0):(this.current_line.set_indent(),!1)},c.prototype.add_raw_token=function(i){for(var n=0;n1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},c.prototype.just_added_newline=function(){return this.current_line.is_empty()},c.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},c.prototype.ensure_empty_line_above=function(i,n){for(var l=this.__lines.length-2;l>=0;){var f=this.__lines[l];if(f.is_empty())break;if(f.item(0).indexOf(i)!==0&&f.item(-1)!==n){this.__lines.splice(l+1,0,new h(this)),this.previous_line=this.__lines[this.__lines.length-2];break}l--}},e.exports.Output=c},,,,function(e){function h(i,n){this.raw_options=r(i,n),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}h.prototype._get_array=function(i,n){var l=this.raw_options[i],f=n||[];return typeof l=="object"?l!==null&&typeof l.concat=="function"&&(f=l.concat()):typeof l=="string"&&(f=l.split(/[^a-zA-Z0-9_\/\-]+/)),f},h.prototype._get_boolean=function(i,n){var l=this.raw_options[i],f=l===void 0?!!n:!!l;return f},h.prototype._get_characters=function(i,n){var l=this.raw_options[i],f=n||"";return typeof l=="string"&&(f=l.replace(/\\r/,"\r").replace(/\\n/,` `).replace(/\\t/," ")),f},h.prototype._get_number=function(i,n){var l=this.raw_options[i];n=parseInt(n,10),isNaN(n)&&(n=0);var f=parseInt(l,10);return isNaN(f)&&(f=n),f},h.prototype._get_selection=function(i,n,l){var f=this._get_selection_list(i,n,l);if(f.length!==1)throw new Error("Invalid Option Value: The option '"+i+`' can only be one of the following values: `+n+` You passed in: '`+this.raw_options[i]+"'");return f[0]},h.prototype._get_selection_list=function(i,n,l){if(!n||n.length===0)throw new Error("Selection list cannot be empty.");if(l=l||[n[0]],!this._is_valid_selection(l,n))throw new Error("Invalid Default Value!");var f=this._get_array(i,l);if(!this._is_valid_selection(f,n))throw new Error("Invalid Option Value: The option '"+i+`' can contain only the following values: `+n+` You passed in: '`+this.raw_options[i]+"'");return f},h.prototype._is_valid_selection=function(i,n){return i.length&&n.length&&!i.some(function(l){return n.indexOf(l)===-1})};function r(i,n){var l={};i=c(i);var f;for(f in i)f!==n&&(l[f]=i[f]);if(n&&i[n])for(f in i[n])l[f]=i[n][f];return l}function c(i){var n={},l;for(l in i){var f=l.replace(/-/g,"_");n[f]=i[l]}return n}e.exports.Options=h,e.exports.normalizeOpts=c,e.exports.mergeOpts=r},,function(e){var h=RegExp.prototype.hasOwnProperty("sticky");function r(c){this.__input=c||"",this.__input_length=this.__input.length,this.__position=0}r.prototype.restart=function(){this.__position=0},r.prototype.back=function(){this.__position>0&&(this.__position-=1)},r.prototype.hasNext=function(){return this.__position=0&&c=0&&i=c.length&&this.__input.substring(i-c.length,i).toLowerCase()===c},e.exports.InputScanner=r},,,,,function(e){function h(r,c){r=typeof r=="string"?r:r.source,c=typeof c=="string"?c:c.source,this.__directives_block_pattern=new RegExp(r+/ beautify( \w+[:]\w+)+ /.source+c,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(r+/\sbeautify\signore:end\s/.source+c,"g")}h.prototype.get_directives=function(r){if(!r.match(this.__directives_block_pattern))return null;var c={};this.__directive_pattern.lastIndex=0;for(var i=this.__directive_pattern.exec(r);i;)c[i[1]]=i[2],i=this.__directive_pattern.exec(r);return c},h.prototype.readIgnored=function(r){return r.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=h},,function(e,h,r){var c=r(16).Beautifier,i=r(17).Options;function n(l,f){var d=new c(l,f);return d.beautify()}e.exports=n,e.exports.defaultOptions=function(){return new i}},function(e,h,r){var c=r(17).Options,i=r(2).Output,n=r(8).InputScanner,l=r(13).Directives,f=new l(/\/\*/,/\*\//),d=/\r\n|[\r\n]/,u=/\r\n|[\r\n]/g,o=/\s/,s=/(?:\s|\n)+/g,E=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,b=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function p(D,R){this._source_text=D||"",this._options=new c(R),this._ch=null,this._input=null,this.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},this.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}p.prototype.eatString=function(D){var R="";for(this._ch=this._input.next();this._ch;){if(R+=this._ch,this._ch==="\\")R+=this._input.next();else if(D.indexOf(this._ch)!==-1||this._ch===` `)break;this._ch=this._input.next()}return R},p.prototype.eatWhitespace=function(D){for(var R=o.test(this._input.peek()),y=0;o.test(this._input.peek());)this._ch=this._input.next(),D&&this._ch===` `&&((y===0||y0&&this._indentLevel--},p.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var D=this._source_text,R=this._options.eol;R==="auto"&&(R=` `,D&&d.test(D||"")&&(R=D.match(d)[0])),D=D.replace(u,` `);var y=D.match(/^[\t ]*/)[0];this._output=new i(this._options,y),this._input=new n(D),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var x=0,w=!1,T=!1,F=!1,P=!1,A=!1,X=!1,z=this._ch,O=!1,B,U,L;B=this._input.read(s),U=B!=="",L=z,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),z=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var G=this._input.read(E),ee=f.get_directives(G);ee&&ee.ignore==="start"&&(G+=f.readIgnored(this._input)),this.print_string(G),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(b)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(U),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var oe=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);oe.match(/[ :]$/)&&(oe=this.eatString(": ").replace(/\s$/,""),this.print_string(oe),this._output.space_before_token=!0),oe=oe.replace(/\s$/,""),oe==="extend"?P=!0:oe==="import"&&(A=!0),oe in this.NESTED_AT_RULE?(this._nestedLevel+=1,oe in this.CONDITIONAL_GROUP_RULE&&(F=!0)):!w&&x===0&&oe.indexOf(":")!==-1&&(T=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(U),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")T&&(T=!1,this.outdent()),F?(F=!1,w=this._indentLevel>=this._nestedLevel):w=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&w&&(this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",",")),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(L==="("?this._output.space_before_token=!1:L!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),L==="{"&&this._output.trim(!0),A=!1,P=!1,T&&(this.outdent(),T=!1),this.print_string(this._ch),w=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&(this._input.peek()!=="}"&&this._output.add_new_line(!0)),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var ae=0;ae"||this._ch==="+"||this._ch==="~")&&!T&&x===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&o.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(U),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),o.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var fe=L==='"'||L==="'";this.preserveSingleSpace(fe||U),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===` `&&O&&this._output.add_new_line()}var Re=this._output.get_code(R);return Re},e.exports.Beautifier=p},function(e,h,r){var c=r(6).Options;function i(n){c.call(this,n,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var l=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||l;var f=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var d=0;d` ${r} `).trim():""}class C{constructor(e,h,r){this.id=e,this.definition=h,this.description=r,S.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var _;(function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9\\-]+",e.iconModifierExpression="~[A-Za-z]+";const h=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function r(n){if(n instanceof C)return["codicon","codicon-"+n.id];const l=h.exec(n.id);if(!l)return r(C.error);let[,f,d]=l;const u=["codicon","codicon-"+f];return d&&u.push("codicon-modifier-"+d.substr(1)),u}e.asClassNameArray=r;function c(n){return r(n).join(" ")}e.asClassName=c;function i(n){return"."+r(n).join(".")}e.asCSSSelector=i})(_||(_={})),function(e){e.add=new e("add",{fontCharacter:"\\ea60"}),e.plus=new e("plus",e.add.definition),e.gistNew=new e("gist-new",e.add.definition),e.repoCreate=new e("repo-create",e.add.definition),e.lightbulb=new e("lightbulb",{fontCharacter:"\\ea61"}),e.lightBulb=new e("light-bulb",{fontCharacter:"\\ea61"}),e.repo=new e("repo",{fontCharacter:"\\ea62"}),e.repoDelete=new e("repo-delete",{fontCharacter:"\\ea62"}),e.gistFork=new e("gist-fork",{fontCharacter:"\\ea63"}),e.repoForked=new e("repo-forked",{fontCharacter:"\\ea63"}),e.gitPullRequest=new e("git-pull-request",{fontCharacter:"\\ea64"}),e.gitPullRequestAbandoned=new e("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),e.recordKeys=new e("record-keys",{fontCharacter:"\\ea65"}),e.keyboard=new e("keyboard",{fontCharacter:"\\ea65"}),e.tag=new e("tag",{fontCharacter:"\\ea66"}),e.tagAdd=new e("tag-add",{fontCharacter:"\\ea66"}),e.tagRemove=new e("tag-remove",{fontCharacter:"\\ea66"}),e.person=new e("person",{fontCharacter:"\\ea67"}),e.personFollow=new e("person-follow",{fontCharacter:"\\ea67"}),e.personOutline=new e("person-outline",{fontCharacter:"\\ea67"}),e.personFilled=new e("person-filled",{fontCharacter:"\\ea67"}),e.gitBranch=new e("git-branch",{fontCharacter:"\\ea68"}),e.gitBranchCreate=new e("git-branch-create",{fontCharacter:"\\ea68"}),e.gitBranchDelete=new e("git-branch-delete",{fontCharacter:"\\ea68"}),e.sourceControl=new e("source-control",{fontCharacter:"\\ea68"}),e.mirror=new e("mirror",{fontCharacter:"\\ea69"}),e.mirrorPublic=new e("mirror-public",{fontCharacter:"\\ea69"}),e.star=new e("star",{fontCharacter:"\\ea6a"}),e.starAdd=new e("star-add",{fontCharacter:"\\ea6a"}),e.starDelete=new e("star-delete",{fontCharacter:"\\ea6a"}),e.starEmpty=new e("star-empty",{fontCharacter:"\\ea6a"}),e.comment=new e("comment",{fontCharacter:"\\ea6b"}),e.commentAdd=new e("comment-add",{fontCharacter:"\\ea6b"}),e.alert=new e("alert",{fontCharacter:"\\ea6c"}),e.warning=new e("warning",{fontCharacter:"\\ea6c"}),e.search=new e("search",{fontCharacter:"\\ea6d"}),e.searchSave=new e("search-save",{fontCharacter:"\\ea6d"}),e.logOut=new e("log-out",{fontCharacter:"\\ea6e"}),e.signOut=new e("sign-out",{fontCharacter:"\\ea6e"}),e.logIn=new e("log-in",{fontCharacter:"\\ea6f"}),e.signIn=new e("sign-in",{fontCharacter:"\\ea6f"}),e.eye=new e("eye",{fontCharacter:"\\ea70"}),e.eyeUnwatch=new e("eye-unwatch",{fontCharacter:"\\ea70"}),e.eyeWatch=new e("eye-watch",{fontCharacter:"\\ea70"}),e.circleFilled=new e("circle-filled",{fontCharacter:"\\ea71"}),e.primitiveDot=new e("primitive-dot",{fontCharacter:"\\ea71"}),e.closeDirty=new e("close-dirty",{fontCharacter:"\\ea71"}),e.debugBreakpoint=new e("debug-breakpoint",{fontCharacter:"\\ea71"}),e.debugBreakpointDisabled=new e("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),e.debugHint=new e("debug-hint",{fontCharacter:"\\ea71"}),e.primitiveSquare=new e("primitive-square",{fontCharacter:"\\ea72"}),e.edit=new e("edit",{fontCharacter:"\\ea73"}),e.pencil=new e("pencil",{fontCharacter:"\\ea73"}),e.info=new e("info",{fontCharacter:"\\ea74"}),e.issueOpened=new e("issue-opened",{fontCharacter:"\\ea74"}),e.gistPrivate=new e("gist-private",{fontCharacter:"\\ea75"}),e.gitForkPrivate=new e("git-fork-private",{fontCharacter:"\\ea75"}),e.lock=new e("lock",{fontCharacter:"\\ea75"}),e.mirrorPrivate=new e("mirror-private",{fontCharacter:"\\ea75"}),e.close=new e("close",{fontCharacter:"\\ea76"}),e.removeClose=new e("remove-close",{fontCharacter:"\\ea76"}),e.x=new e("x",{fontCharacter:"\\ea76"}),e.repoSync=new e("repo-sync",{fontCharacter:"\\ea77"}),e.sync=new e("sync",{fontCharacter:"\\ea77"}),e.clone=new e("clone",{fontCharacter:"\\ea78"}),e.desktopDownload=new e("desktop-download",{fontCharacter:"\\ea78"}),e.beaker=new e("beaker",{fontCharacter:"\\ea79"}),e.microscope=new e("microscope",{fontCharacter:"\\ea79"}),e.vm=new e("vm",{fontCharacter:"\\ea7a"}),e.deviceDesktop=new e("device-desktop",{fontCharacter:"\\ea7a"}),e.file=new e("file",{fontCharacter:"\\ea7b"}),e.fileText=new e("file-text",{fontCharacter:"\\ea7b"}),e.more=new e("more",{fontCharacter:"\\ea7c"}),e.ellipsis=new e("ellipsis",{fontCharacter:"\\ea7c"}),e.kebabHorizontal=new e("kebab-horizontal",{fontCharacter:"\\ea7c"}),e.mailReply=new e("mail-reply",{fontCharacter:"\\ea7d"}),e.reply=new e("reply",{fontCharacter:"\\ea7d"}),e.organization=new e("organization",{fontCharacter:"\\ea7e"}),e.organizationFilled=new e("organization-filled",{fontCharacter:"\\ea7e"}),e.organizationOutline=new e("organization-outline",{fontCharacter:"\\ea7e"}),e.newFile=new e("new-file",{fontCharacter:"\\ea7f"}),e.fileAdd=new e("file-add",{fontCharacter:"\\ea7f"}),e.newFolder=new e("new-folder",{fontCharacter:"\\ea80"}),e.fileDirectoryCreate=new e("file-directory-create",{fontCharacter:"\\ea80"}),e.trash=new e("trash",{fontCharacter:"\\ea81"}),e.trashcan=new e("trashcan",{fontCharacter:"\\ea81"}),e.history=new e("history",{fontCharacter:"\\ea82"}),e.clock=new e("clock",{fontCharacter:"\\ea82"}),e.folder=new e("folder",{fontCharacter:"\\ea83"}),e.fileDirectory=new e("file-directory",{fontCharacter:"\\ea83"}),e.symbolFolder=new e("symbol-folder",{fontCharacter:"\\ea83"}),e.logoGithub=new e("logo-github",{fontCharacter:"\\ea84"}),e.markGithub=new e("mark-github",{fontCharacter:"\\ea84"}),e.github=new e("github",{fontCharacter:"\\ea84"}),e.terminal=new e("terminal",{fontCharacter:"\\ea85"}),e.console=new e("console",{fontCharacter:"\\ea85"}),e.repl=new e("repl",{fontCharacter:"\\ea85"}),e.zap=new e("zap",{fontCharacter:"\\ea86"}),e.symbolEvent=new e("symbol-event",{fontCharacter:"\\ea86"}),e.error=new e("error",{fontCharacter:"\\ea87"}),e.stop=new e("stop",{fontCharacter:"\\ea87"}),e.variable=new e("variable",{fontCharacter:"\\ea88"}),e.symbolVariable=new e("symbol-variable",{fontCharacter:"\\ea88"}),e.array=new e("array",{fontCharacter:"\\ea8a"}),e.symbolArray=new e("symbol-array",{fontCharacter:"\\ea8a"}),e.symbolModule=new e("symbol-module",{fontCharacter:"\\ea8b"}),e.symbolPackage=new e("symbol-package",{fontCharacter:"\\ea8b"}),e.symbolNamespace=new e("symbol-namespace",{fontCharacter:"\\ea8b"}),e.symbolObject=new e("symbol-object",{fontCharacter:"\\ea8b"}),e.symbolMethod=new e("symbol-method",{fontCharacter:"\\ea8c"}),e.symbolFunction=new e("symbol-function",{fontCharacter:"\\ea8c"}),e.symbolConstructor=new e("symbol-constructor",{fontCharacter:"\\ea8c"}),e.symbolBoolean=new e("symbol-boolean",{fontCharacter:"\\ea8f"}),e.symbolNull=new e("symbol-null",{fontCharacter:"\\ea8f"}),e.symbolNumeric=new e("symbol-numeric",{fontCharacter:"\\ea90"}),e.symbolNumber=new e("symbol-number",{fontCharacter:"\\ea90"}),e.symbolStructure=new e("symbol-structure",{fontCharacter:"\\ea91"}),e.symbolStruct=new e("symbol-struct",{fontCharacter:"\\ea91"}),e.symbolParameter=new e("symbol-parameter",{fontCharacter:"\\ea92"}),e.symbolTypeParameter=new e("symbol-type-parameter",{fontCharacter:"\\ea92"}),e.symbolKey=new e("symbol-key",{fontCharacter:"\\ea93"}),e.symbolText=new e("symbol-text",{fontCharacter:"\\ea93"}),e.symbolReference=new e("symbol-reference",{fontCharacter:"\\ea94"}),e.goToFile=new e("go-to-file",{fontCharacter:"\\ea94"}),e.symbolEnum=new e("symbol-enum",{fontCharacter:"\\ea95"}),e.symbolValue=new e("symbol-value",{fontCharacter:"\\ea95"}),e.symbolRuler=new e("symbol-ruler",{fontCharacter:"\\ea96"}),e.symbolUnit=new e("symbol-unit",{fontCharacter:"\\ea96"}),e.activateBreakpoints=new e("activate-breakpoints",{fontCharacter:"\\ea97"}),e.archive=new e("archive",{fontCharacter:"\\ea98"}),e.arrowBoth=new e("arrow-both",{fontCharacter:"\\ea99"}),e.arrowDown=new e("arrow-down",{fontCharacter:"\\ea9a"}),e.arrowLeft=new e("arrow-left",{fontCharacter:"\\ea9b"}),e.arrowRight=new e("arrow-right",{fontCharacter:"\\ea9c"}),e.arrowSmallDown=new e("arrow-small-down",{fontCharacter:"\\ea9d"}),e.arrowSmallLeft=new e("arrow-small-left",{fontCharacter:"\\ea9e"}),e.arrowSmallRight=new e("arrow-small-right",{fontCharacter:"\\ea9f"}),e.arrowSmallUp=new e("arrow-small-up",{fontCharacter:"\\eaa0"}),e.arrowUp=new e("arrow-up",{fontCharacter:"\\eaa1"}),e.bell=new e("bell",{fontCharacter:"\\eaa2"}),e.bold=new e("bold",{fontCharacter:"\\eaa3"}),e.book=new e("book",{fontCharacter:"\\eaa4"}),e.bookmark=new e("bookmark",{fontCharacter:"\\eaa5"}),e.debugBreakpointConditionalUnverified=new e("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),e.debugBreakpointConditional=new e("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),e.debugBreakpointConditionalDisabled=new e("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),e.debugBreakpointDataUnverified=new e("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),e.debugBreakpointData=new e("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),e.debugBreakpointDataDisabled=new e("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),e.debugBreakpointLogUnverified=new e("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),e.debugBreakpointLog=new e("debug-breakpoint-log",{fontCharacter:"\\eaab"}),e.debugBreakpointLogDisabled=new e("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),e.briefcase=new e("briefcase",{fontCharacter:"\\eaac"}),e.broadcast=new e("broadcast",{fontCharacter:"\\eaad"}),e.browser=new e("browser",{fontCharacter:"\\eaae"}),e.bug=new e("bug",{fontCharacter:"\\eaaf"}),e.calendar=new e("calendar",{fontCharacter:"\\eab0"}),e.caseSensitive=new e("case-sensitive",{fontCharacter:"\\eab1"}),e.check=new e("check",{fontCharacter:"\\eab2"}),e.checklist=new e("checklist",{fontCharacter:"\\eab3"}),e.chevronDown=new e("chevron-down",{fontCharacter:"\\eab4"}),e.dropDownButton=new e("drop-down-button",e.chevronDown.definition),e.chevronLeft=new e("chevron-left",{fontCharacter:"\\eab5"}),e.chevronRight=new e("chevron-right",{fontCharacter:"\\eab6"}),e.chevronUp=new e("chevron-up",{fontCharacter:"\\eab7"}),e.chromeClose=new e("chrome-close",{fontCharacter:"\\eab8"}),e.chromeMaximize=new e("chrome-maximize",{fontCharacter:"\\eab9"}),e.chromeMinimize=new e("chrome-minimize",{fontCharacter:"\\eaba"}),e.chromeRestore=new e("chrome-restore",{fontCharacter:"\\eabb"}),e.circleOutline=new e("circle-outline",{fontCharacter:"\\eabc"}),e.debugBreakpointUnverified=new e("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),e.circleSlash=new e("circle-slash",{fontCharacter:"\\eabd"}),e.circuitBoard=new e("circuit-board",{fontCharacter:"\\eabe"}),e.clearAll=new e("clear-all",{fontCharacter:"\\eabf"}),e.clippy=new e("clippy",{fontCharacter:"\\eac0"}),e.closeAll=new e("close-all",{fontCharacter:"\\eac1"}),e.cloudDownload=new e("cloud-download",{fontCharacter:"\\eac2"}),e.cloudUpload=new e("cloud-upload",{fontCharacter:"\\eac3"}),e.code=new e("code",{fontCharacter:"\\eac4"}),e.collapseAll=new e("collapse-all",{fontCharacter:"\\eac5"}),e.colorMode=new e("color-mode",{fontCharacter:"\\eac6"}),e.commentDiscussion=new e("comment-discussion",{fontCharacter:"\\eac7"}),e.compareChanges=new e("compare-changes",{fontCharacter:"\\eafd"}),e.creditCard=new e("credit-card",{fontCharacter:"\\eac9"}),e.dash=new e("dash",{fontCharacter:"\\eacc"}),e.dashboard=new e("dashboard",{fontCharacter:"\\eacd"}),e.database=new e("database",{fontCharacter:"\\eace"}),e.debugContinue=new e("debug-continue",{fontCharacter:"\\eacf"}),e.debugDisconnect=new e("debug-disconnect",{fontCharacter:"\\ead0"}),e.debugPause=new e("debug-pause",{fontCharacter:"\\ead1"}),e.debugRestart=new e("debug-restart",{fontCharacter:"\\ead2"}),e.debugStart=new e("debug-start",{fontCharacter:"\\ead3"}),e.debugStepInto=new e("debug-step-into",{fontCharacter:"\\ead4"}),e.debugStepOut=new e("debug-step-out",{fontCharacter:"\\ead5"}),e.debugStepOver=new e("debug-step-over",{fontCharacter:"\\ead6"}),e.debugStop=new e("debug-stop",{fontCharacter:"\\ead7"}),e.debug=new e("debug",{fontCharacter:"\\ead8"}),e.deviceCameraVideo=new e("device-camera-video",{fontCharacter:"\\ead9"}),e.deviceCamera=new e("device-camera",{fontCharacter:"\\eada"}),e.deviceMobile=new e("device-mobile",{fontCharacter:"\\eadb"}),e.diffAdded=new e("diff-added",{fontCharacter:"\\eadc"}),e.diffIgnored=new e("diff-ignored",{fontCharacter:"\\eadd"}),e.diffModified=new e("diff-modified",{fontCharacter:"\\eade"}),e.diffRemoved=new e("diff-removed",{fontCharacter:"\\eadf"}),e.diffRenamed=new e("diff-renamed",{fontCharacter:"\\eae0"}),e.diff=new e("diff",{fontCharacter:"\\eae1"}),e.discard=new e("discard",{fontCharacter:"\\eae2"}),e.editorLayout=new e("editor-layout",{fontCharacter:"\\eae3"}),e.emptyWindow=new e("empty-window",{fontCharacter:"\\eae4"}),e.exclude=new e("exclude",{fontCharacter:"\\eae5"}),e.extensions=new e("extensions",{fontCharacter:"\\eae6"}),e.eyeClosed=new e("eye-closed",{fontCharacter:"\\eae7"}),e.fileBinary=new e("file-binary",{fontCharacter:"\\eae8"}),e.fileCode=new e("file-code",{fontCharacter:"\\eae9"}),e.fileMedia=new e("file-media",{fontCharacter:"\\eaea"}),e.filePdf=new e("file-pdf",{fontCharacter:"\\eaeb"}),e.fileSubmodule=new e("file-submodule",{fontCharacter:"\\eaec"}),e.fileSymlinkDirectory=new e("file-symlink-directory",{fontCharacter:"\\eaed"}),e.fileSymlinkFile=new e("file-symlink-file",{fontCharacter:"\\eaee"}),e.fileZip=new e("file-zip",{fontCharacter:"\\eaef"}),e.files=new e("files",{fontCharacter:"\\eaf0"}),e.filter=new e("filter",{fontCharacter:"\\eaf1"}),e.flame=new e("flame",{fontCharacter:"\\eaf2"}),e.foldDown=new e("fold-down",{fontCharacter:"\\eaf3"}),e.foldUp=new e("fold-up",{fontCharacter:"\\eaf4"}),e.fold=new e("fold",{fontCharacter:"\\eaf5"}),e.folderActive=new e("folder-active",{fontCharacter:"\\eaf6"}),e.folderOpened=new e("folder-opened",{fontCharacter:"\\eaf7"}),e.gear=new e("gear",{fontCharacter:"\\eaf8"}),e.gift=new e("gift",{fontCharacter:"\\eaf9"}),e.gistSecret=new e("gist-secret",{fontCharacter:"\\eafa"}),e.gist=new e("gist",{fontCharacter:"\\eafb"}),e.gitCommit=new e("git-commit",{fontCharacter:"\\eafc"}),e.gitCompare=new e("git-compare",{fontCharacter:"\\eafd"}),e.gitMerge=new e("git-merge",{fontCharacter:"\\eafe"}),e.githubAction=new e("github-action",{fontCharacter:"\\eaff"}),e.githubAlt=new e("github-alt",{fontCharacter:"\\eb00"}),e.globe=new e("globe",{fontCharacter:"\\eb01"}),e.grabber=new e("grabber",{fontCharacter:"\\eb02"}),e.graph=new e("graph",{fontCharacter:"\\eb03"}),e.gripper=new e("gripper",{fontCharacter:"\\eb04"}),e.heart=new e("heart",{fontCharacter:"\\eb05"}),e.home=new e("home",{fontCharacter:"\\eb06"}),e.horizontalRule=new e("horizontal-rule",{fontCharacter:"\\eb07"}),e.hubot=new e("hubot",{fontCharacter:"\\eb08"}),e.inbox=new e("inbox",{fontCharacter:"\\eb09"}),e.issueClosed=new e("issue-closed",{fontCharacter:"\\eba4"}),e.issueReopened=new e("issue-reopened",{fontCharacter:"\\eb0b"}),e.issues=new e("issues",{fontCharacter:"\\eb0c"}),e.italic=new e("italic",{fontCharacter:"\\eb0d"}),e.jersey=new e("jersey",{fontCharacter:"\\eb0e"}),e.json=new e("json",{fontCharacter:"\\eb0f"}),e.kebabVertical=new e("kebab-vertical",{fontCharacter:"\\eb10"}),e.key=new e("key",{fontCharacter:"\\eb11"}),e.law=new e("law",{fontCharacter:"\\eb12"}),e.lightbulbAutofix=new e("lightbulb-autofix",{fontCharacter:"\\eb13"}),e.linkExternal=new e("link-external",{fontCharacter:"\\eb14"}),e.link=new e("link",{fontCharacter:"\\eb15"}),e.listOrdered=new e("list-ordered",{fontCharacter:"\\eb16"}),e.listUnordered=new e("list-unordered",{fontCharacter:"\\eb17"}),e.liveShare=new e("live-share",{fontCharacter:"\\eb18"}),e.loading=new e("loading",{fontCharacter:"\\eb19"}),e.location=new e("location",{fontCharacter:"\\eb1a"}),e.mailRead=new e("mail-read",{fontCharacter:"\\eb1b"}),e.mail=new e("mail",{fontCharacter:"\\eb1c"}),e.markdown=new e("markdown",{fontCharacter:"\\eb1d"}),e.megaphone=new e("megaphone",{fontCharacter:"\\eb1e"}),e.mention=new e("mention",{fontCharacter:"\\eb1f"}),e.milestone=new e("milestone",{fontCharacter:"\\eb20"}),e.mortarBoard=new e("mortar-board",{fontCharacter:"\\eb21"}),e.move=new e("move",{fontCharacter:"\\eb22"}),e.multipleWindows=new e("multiple-windows",{fontCharacter:"\\eb23"}),e.mute=new e("mute",{fontCharacter:"\\eb24"}),e.noNewline=new e("no-newline",{fontCharacter:"\\eb25"}),e.note=new e("note",{fontCharacter:"\\eb26"}),e.octoface=new e("octoface",{fontCharacter:"\\eb27"}),e.openPreview=new e("open-preview",{fontCharacter:"\\eb28"}),e.package_=new e("package",{fontCharacter:"\\eb29"}),e.paintcan=new e("paintcan",{fontCharacter:"\\eb2a"}),e.pin=new e("pin",{fontCharacter:"\\eb2b"}),e.play=new e("play",{fontCharacter:"\\eb2c"}),e.run=new e("run",{fontCharacter:"\\eb2c"}),e.plug=new e("plug",{fontCharacter:"\\eb2d"}),e.preserveCase=new e("preserve-case",{fontCharacter:"\\eb2e"}),e.preview=new e("preview",{fontCharacter:"\\eb2f"}),e.project=new e("project",{fontCharacter:"\\eb30"}),e.pulse=new e("pulse",{fontCharacter:"\\eb31"}),e.question=new e("question",{fontCharacter:"\\eb32"}),e.quote=new e("quote",{fontCharacter:"\\eb33"}),e.radioTower=new e("radio-tower",{fontCharacter:"\\eb34"}),e.reactions=new e("reactions",{fontCharacter:"\\eb35"}),e.references=new e("references",{fontCharacter:"\\eb36"}),e.refresh=new e("refresh",{fontCharacter:"\\eb37"}),e.regex=new e("regex",{fontCharacter:"\\eb38"}),e.remoteExplorer=new e("remote-explorer",{fontCharacter:"\\eb39"}),e.remote=new e("remote",{fontCharacter:"\\eb3a"}),e.remove=new e("remove",{fontCharacter:"\\eb3b"}),e.replaceAll=new e("replace-all",{fontCharacter:"\\eb3c"}),e.replace=new e("replace",{fontCharacter:"\\eb3d"}),e.repoClone=new e("repo-clone",{fontCharacter:"\\eb3e"}),e.repoForcePush=new e("repo-force-push",{fontCharacter:"\\eb3f"}),e.repoPull=new e("repo-pull",{fontCharacter:"\\eb40"}),e.repoPush=new e("repo-push",{fontCharacter:"\\eb41"}),e.report=new e("report",{fontCharacter:"\\eb42"}),e.requestChanges=new e("request-changes",{fontCharacter:"\\eb43"}),e.rocket=new e("rocket",{fontCharacter:"\\eb44"}),e.rootFolderOpened=new e("root-folder-opened",{fontCharacter:"\\eb45"}),e.rootFolder=new e("root-folder",{fontCharacter:"\\eb46"}),e.rss=new e("rss",{fontCharacter:"\\eb47"}),e.ruby=new e("ruby",{fontCharacter:"\\eb48"}),e.saveAll=new e("save-all",{fontCharacter:"\\eb49"}),e.saveAs=new e("save-as",{fontCharacter:"\\eb4a"}),e.save=new e("save",{fontCharacter:"\\eb4b"}),e.screenFull=new e("screen-full",{fontCharacter:"\\eb4c"}),e.screenNormal=new e("screen-normal",{fontCharacter:"\\eb4d"}),e.searchStop=new e("search-stop",{fontCharacter:"\\eb4e"}),e.server=new e("server",{fontCharacter:"\\eb50"}),e.settingsGear=new e("settings-gear",{fontCharacter:"\\eb51"}),e.settings=new e("settings",{fontCharacter:"\\eb52"}),e.shield=new e("shield",{fontCharacter:"\\eb53"}),e.smiley=new e("smiley",{fontCharacter:"\\eb54"}),e.sortPrecedence=new e("sort-precedence",{fontCharacter:"\\eb55"}),e.splitHorizontal=new e("split-horizontal",{fontCharacter:"\\eb56"}),e.splitVertical=new e("split-vertical",{fontCharacter:"\\eb57"}),e.squirrel=new e("squirrel",{fontCharacter:"\\eb58"}),e.starFull=new e("star-full",{fontCharacter:"\\eb59"}),e.starHalf=new e("star-half",{fontCharacter:"\\eb5a"}),e.symbolClass=new e("symbol-class",{fontCharacter:"\\eb5b"}),e.symbolColor=new e("symbol-color",{fontCharacter:"\\eb5c"}),e.symbolConstant=new e("symbol-constant",{fontCharacter:"\\eb5d"}),e.symbolEnumMember=new e("symbol-enum-member",{fontCharacter:"\\eb5e"}),e.symbolField=new e("symbol-field",{fontCharacter:"\\eb5f"}),e.symbolFile=new e("symbol-file",{fontCharacter:"\\eb60"}),e.symbolInterface=new e("symbol-interface",{fontCharacter:"\\eb61"}),e.symbolKeyword=new e("symbol-keyword",{fontCharacter:"\\eb62"}),e.symbolMisc=new e("symbol-misc",{fontCharacter:"\\eb63"}),e.symbolOperator=new e("symbol-operator",{fontCharacter:"\\eb64"}),e.symbolProperty=new e("symbol-property",{fontCharacter:"\\eb65"}),e.wrench=new e("wrench",{fontCharacter:"\\eb65"}),e.wrenchSubaction=new e("wrench-subaction",{fontCharacter:"\\eb65"}),e.symbolSnippet=new e("symbol-snippet",{fontCharacter:"\\eb66"}),e.tasklist=new e("tasklist",{fontCharacter:"\\eb67"}),e.telescope=new e("telescope",{fontCharacter:"\\eb68"}),e.textSize=new e("text-size",{fontCharacter:"\\eb69"}),e.threeBars=new e("three-bars",{fontCharacter:"\\eb6a"}),e.thumbsdown=new e("thumbsdown",{fontCharacter:"\\eb6b"}),e.thumbsup=new e("thumbsup",{fontCharacter:"\\eb6c"}),e.tools=new e("tools",{fontCharacter:"\\eb6d"}),e.triangleDown=new e("triangle-down",{fontCharacter:"\\eb6e"}),e.triangleLeft=new e("triangle-left",{fontCharacter:"\\eb6f"}),e.triangleRight=new e("triangle-right",{fontCharacter:"\\eb70"}),e.triangleUp=new e("triangle-up",{fontCharacter:"\\eb71"}),e.twitter=new e("twitter",{fontCharacter:"\\eb72"}),e.unfold=new e("unfold",{fontCharacter:"\\eb73"}),e.unlock=new e("unlock",{fontCharacter:"\\eb74"}),e.unmute=new e("unmute",{fontCharacter:"\\eb75"}),e.unverified=new e("unverified",{fontCharacter:"\\eb76"}),e.verified=new e("verified",{fontCharacter:"\\eb77"}),e.versions=new e("versions",{fontCharacter:"\\eb78"}),e.vmActive=new e("vm-active",{fontCharacter:"\\eb79"}),e.vmOutline=new e("vm-outline",{fontCharacter:"\\eb7a"}),e.vmRunning=new e("vm-running",{fontCharacter:"\\eb7b"}),e.watch=new e("watch",{fontCharacter:"\\eb7c"}),e.whitespace=new e("whitespace",{fontCharacter:"\\eb7d"}),e.wholeWord=new e("whole-word",{fontCharacter:"\\eb7e"}),e.window=new e("window",{fontCharacter:"\\eb7f"}),e.wordWrap=new e("word-wrap",{fontCharacter:"\\eb80"}),e.zoomIn=new e("zoom-in",{fontCharacter:"\\eb81"}),e.zoomOut=new e("zoom-out",{fontCharacter:"\\eb82"}),e.listFilter=new e("list-filter",{fontCharacter:"\\eb83"}),e.listFlat=new e("list-flat",{fontCharacter:"\\eb84"}),e.listSelection=new e("list-selection",{fontCharacter:"\\eb85"}),e.selection=new e("selection",{fontCharacter:"\\eb85"}),e.listTree=new e("list-tree",{fontCharacter:"\\eb86"}),e.debugBreakpointFunctionUnverified=new e("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),e.debugBreakpointFunction=new e("debug-breakpoint-function",{fontCharacter:"\\eb88"}),e.debugBreakpointFunctionDisabled=new e("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),e.debugStackframeActive=new e("debug-stackframe-active",{fontCharacter:"\\eb89"}),e.debugStackframeDot=new e("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),e.debugStackframe=new e("debug-stackframe",{fontCharacter:"\\eb8b"}),e.debugStackframeFocused=new e("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),e.debugBreakpointUnsupported=new e("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),e.symbolString=new e("symbol-string",{fontCharacter:"\\eb8d"}),e.debugReverseContinue=new e("debug-reverse-continue",{fontCharacter:"\\eb8e"}),e.debugStepBack=new e("debug-step-back",{fontCharacter:"\\eb8f"}),e.debugRestartFrame=new e("debug-restart-frame",{fontCharacter:"\\eb90"}),e.callIncoming=new e("call-incoming",{fontCharacter:"\\eb92"}),e.callOutgoing=new e("call-outgoing",{fontCharacter:"\\eb93"}),e.menu=new e("menu",{fontCharacter:"\\eb94"}),e.expandAll=new e("expand-all",{fontCharacter:"\\eb95"}),e.feedback=new e("feedback",{fontCharacter:"\\eb96"}),e.groupByRefType=new e("group-by-ref-type",{fontCharacter:"\\eb97"}),e.ungroupByRefType=new e("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),e.account=new e("account",{fontCharacter:"\\eb99"}),e.bellDot=new e("bell-dot",{fontCharacter:"\\eb9a"}),e.debugConsole=new e("debug-console",{fontCharacter:"\\eb9b"}),e.library=new e("library",{fontCharacter:"\\eb9c"}),e.output=new e("output",{fontCharacter:"\\eb9d"}),e.runAll=new e("run-all",{fontCharacter:"\\eb9e"}),e.syncIgnored=new e("sync-ignored",{fontCharacter:"\\eb9f"}),e.pinned=new e("pinned",{fontCharacter:"\\eba0"}),e.githubInverted=new e("github-inverted",{fontCharacter:"\\eba1"}),e.debugAlt=new e("debug-alt",{fontCharacter:"\\eb91"}),e.serverProcess=new e("server-process",{fontCharacter:"\\eba2"}),e.serverEnvironment=new e("server-environment",{fontCharacter:"\\eba3"}),e.pass=new e("pass",{fontCharacter:"\\eba4"}),e.stopCircle=new e("stop-circle",{fontCharacter:"\\eba5"}),e.playCircle=new e("play-circle",{fontCharacter:"\\eba6"}),e.record=new e("record",{fontCharacter:"\\eba7"}),e.debugAltSmall=new e("debug-alt-small",{fontCharacter:"\\eba8"}),e.vmConnect=new e("vm-connect",{fontCharacter:"\\eba9"}),e.cloud=new e("cloud",{fontCharacter:"\\ebaa"}),e.merge=new e("merge",{fontCharacter:"\\ebab"}),e.exportIcon=new e("export",{fontCharacter:"\\ebac"}),e.graphLeft=new e("graph-left",{fontCharacter:"\\ebad"}),e.magnet=new e("magnet",{fontCharacter:"\\ebae"}),e.notebook=new e("notebook",{fontCharacter:"\\ebaf"}),e.redo=new e("redo",{fontCharacter:"\\ebb0"}),e.checkAll=new e("check-all",{fontCharacter:"\\ebb1"}),e.pinnedDirty=new e("pinned-dirty",{fontCharacter:"\\ebb2"}),e.passFilled=new e("pass-filled",{fontCharacter:"\\ebb3"}),e.circleLargeFilled=new e("circle-large-filled",{fontCharacter:"\\ebb4"}),e.circleLargeOutline=new e("circle-large-outline",{fontCharacter:"\\ebb5"}),e.combine=new e("combine",{fontCharacter:"\\ebb6"}),e.gather=new e("gather",{fontCharacter:"\\ebb6"}),e.table=new e("table",{fontCharacter:"\\ebb7"}),e.variableGroup=new e("variable-group",{fontCharacter:"\\ebb8"}),e.typeHierarchy=new e("type-hierarchy",{fontCharacter:"\\ebb9"}),e.typeHierarchySub=new e("type-hierarchy-sub",{fontCharacter:"\\ebba"}),e.typeHierarchySuper=new e("type-hierarchy-super",{fontCharacter:"\\ebbb"}),e.gitPullRequestCreate=new e("git-pull-request-create",{fontCharacter:"\\ebbc"}),e.runAbove=new e("run-above",{fontCharacter:"\\ebbd"}),e.runBelow=new e("run-below",{fontCharacter:"\\ebbe"}),e.notebookTemplate=new e("notebook-template",{fontCharacter:"\\ebbf"}),e.debugRerun=new e("debug-rerun",{fontCharacter:"\\ebc0"}),e.workspaceTrusted=new e("workspace-trusted",{fontCharacter:"\\ebc1"}),e.workspaceUntrusted=new e("workspace-untrusted",{fontCharacter:"\\ebc2"}),e.workspaceUnspecified=new e("workspace-unspecified",{fontCharacter:"\\ebc3"}),e.terminalCmd=new e("terminal-cmd",{fontCharacter:"\\ebc4"}),e.terminalDebian=new e("terminal-debian",{fontCharacter:"\\ebc5"}),e.terminalLinux=new e("terminal-linux",{fontCharacter:"\\ebc6"}),e.terminalPowershell=new e("terminal-powershell",{fontCharacter:"\\ebc7"}),e.terminalTmux=new e("terminal-tmux",{fontCharacter:"\\ebc8"}),e.terminalUbuntu=new e("terminal-ubuntu",{fontCharacter:"\\ebc9"}),e.terminalBash=new e("terminal-bash",{fontCharacter:"\\ebca"}),e.arrowSwap=new e("arrow-swap",{fontCharacter:"\\ebcb"}),e.copy=new e("copy",{fontCharacter:"\\ebcc"}),e.personAdd=new e("person-add",{fontCharacter:"\\ebcd"}),e.filterFilled=new e("filter-filled",{fontCharacter:"\\ebce"}),e.wand=new e("wand",{fontCharacter:"\\ebcf"}),e.debugLineByLine=new e("debug-line-by-line",{fontCharacter:"\\ebd0"}),e.inspect=new e("inspect",{fontCharacter:"\\ebd1"}),e.layers=new e("layers",{fontCharacter:"\\ebd2"}),e.layersDot=new e("layers-dot",{fontCharacter:"\\ebd3"}),e.layersActive=new e("layers-active",{fontCharacter:"\\ebd4"}),e.compass=new e("compass",{fontCharacter:"\\ebd5"}),e.compassDot=new e("compass-dot",{fontCharacter:"\\ebd6"}),e.compassActive=new e("compass-active",{fontCharacter:"\\ebd7"}),e.azure=new e("azure",{fontCharacter:"\\ebd8"}),e.issueDraft=new e("issue-draft",{fontCharacter:"\\ebd9"}),e.gitPullRequestClosed=new e("git-pull-request-closed",{fontCharacter:"\\ebda"}),e.gitPullRequestDraft=new e("git-pull-request-draft",{fontCharacter:"\\ebdb"}),e.debugAll=new e("debug-all",{fontCharacter:"\\ebdc"}),e.debugCoverage=new e("debug-coverage",{fontCharacter:"\\ebdd"}),e.runErrors=new e("run-errors",{fontCharacter:"\\ebde"}),e.folderLibrary=new e("folder-library",{fontCharacter:"\\ebdf"}),e.debugContinueSmall=new e("debug-continue-small",{fontCharacter:"\\ebe0"}),e.beakerStop=new e("beaker-stop",{fontCharacter:"\\ebe1"}),e.graphLine=new e("graph-line",{fontCharacter:"\\ebe2"}),e.graphScatter=new e("graph-scatter",{fontCharacter:"\\ebe3"}),e.pieChart=new e("pie-chart",{fontCharacter:"\\ebe4"}),e.bracket=new e("bracket",e.json.definition),e.bracketDot=new e("bracket-dot",{fontCharacter:"\\ebe5"}),e.bracketError=new e("bracket-error",{fontCharacter:"\\ebe6"}),e.lockSmall=new e("lock-small",{fontCharacter:"\\ebe7"}),e.azureDevops=new e("azure-devops",{fontCharacter:"\\ebe8"}),e.verifiedFilled=new e("verified-filled",{fontCharacter:"\\ebe9"})}(C||(C={}))},"VrN/":function(H,Z,I){(function(N,g){H.exports=g()})(this,function(){"use strict";var N=navigator.userAgent,g=navigator.platform,S=/gecko\/\d/i.test(N),k=/MSIE \d/.test(N),v=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(N),m=/Edge\/(\d+)/.exec(N),C=k||v||m,_=C&&(k?document.documentMode||6:+(m||v)[1]),e=!m&&/WebKit\//.test(N),h=e&&/Qt\/\d+\.\d+/.test(N),r=!m&&/Chrome\//.test(N),c=/Opera\//.test(N),i=/Apple Computer/.test(navigator.vendor),n=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(N),l=/PhantomJS/.test(N),f=!m&&/AppleWebKit/.test(N)&&/Mobile\/\w+/.test(N),d=/Android/.test(N),u=f||d||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(N),o=f||/Mac/.test(g),s=/\bCrOS\b/.test(N),E=/win/i.test(g),b=c&&N.match(/Version\/(\d*\.\d*)/);b&&(b=Number(b[1])),b&&b>=15&&(c=!1,e=!0);var p=o&&(h||c&&(b==null||b<12.11)),D=S||C&&_>=9;function R(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var y=function(t,a){var j=t.className,M=R(a).exec(j);if(M){var K=j.slice(M.index+M[0].length);t.className=j.slice(0,M.index)+(K?M[1]+K:"")}};function x(t){for(var a=t.childNodes.length;a>0;--a)t.removeChild(t.firstChild);return t}function w(t,a){return x(t).appendChild(a)}function T(t,a,j,M){var K=document.createElement(t);if(j&&(K.className=j),M&&(K.style.cssText=M),typeof a=="string")K.appendChild(document.createTextNode(a));else if(a)for(var re=0;re=a)return se+(a-re);se+=pe-re,se+=j-se%j,re=pe+1}}var ee=function(){this.id=null,this.f=null,this.time=0,this.handler=U(this.onTimeout,this)};ee.prototype.onTimeout=function(t){t.id=0,t.time<=+new Date?t.f():setTimeout(t.handler,t.time-+new Date)},ee.prototype.set=function(t,a){this.f=a;var j=+new Date+t;(!this.id||j=a)return M+Math.min(se,a-K);if(K+=re-M,K+=j-K%j,M=re+1,K>=a)return M}}var de=[""];function te(t){for(;de.length<=t;)de.push(W(de)+" ");return de[t]}function W(t){return t[t.length-1]}function Y(t,a){for(var j=[],M=0;M"\x80"&&(t.toUpperCase()!=t.toLowerCase()||ie.test(t))}function J(t,a){return a?a.source.indexOf("\\w")>-1&&ne(t)?!0:a.test(t):ne(t)}function $(t){for(var a in t)if(t.hasOwnProperty(a)&&t[a])return!1;return!0}var le=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ce(t){return t.charCodeAt(0)>=768&&le.test(t)}function we(t,a,j){for(;(j<0?a>0:aj?-1:1;;){if(a==j)return a;var K=(a+j)/2,re=M<0?Math.ceil(K):Math.floor(K);if(re==a)return t(re)?a:j;t(re)?j=re:a=re+M}}function Xe(t,a,j,M){if(!t)return M(a,j,"ltr",0);for(var K=!1,re=0;rea||a==j&&se.to==a)&&(M(Math.max(se.from,a),Math.min(se.to,j),se.level==1?"rtl":"ltr",re),K=!0)}K||M(a,j,"ltr")}var $e=null;function Ye(t,a,j){var M;$e=null;for(var K=0;Ka)return K;re.to==a&&(re.from!=re.to&&j=="before"?M=K:$e=K),re.from==a&&(re.from!=re.to&&j!="before"?M=K:$e=K)}return M!=null?M:$e}var Ze=function(){var t="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",a="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function j(Te){return Te<=247?t.charAt(Te):1424<=Te&&Te<=1524?"R":1536<=Te&&Te<=1785?a.charAt(Te-1536):1774<=Te&&Te<=2220?"r":8192<=Te&&Te<=8203?"w":Te==8204?"b":"L"}var M=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,K=/[stwN]/,re=/[LRr]/,se=/[Lb1n]/,pe=/[1n]/;function ve(Te,Ue,We){this.level=Te,this.from=Ue,this.to=We}return function(Te,Ue){var We=Ue=="ltr"?"L":"R";if(Te.length==0||Ue=="ltr"&&!M.test(Te))return!1;for(var tt=Te.length,et=[],lt=0;lt-1&&(M[a]=K.slice(0,re).concat(K.slice(re+1)))}}}function ye(t,a){var j=Je(t,a);if(!j.length)return;for(var M=Array.prototype.slice.call(arguments,2),K=0;K0}function Ce(t){t.prototype.on=function(a,j){Ie(this,a,j)},t.prototype.off=function(a,j){rt(this,a,j)}}function ge(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function Ee(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Ae(t){return t.defaultPrevented!=null?t.defaultPrevented:t.returnValue==!1}function De(t){ge(t),Ee(t)}function Me(t){return t.target||t.srcElement}function He(t){var a=t.which;return a==null&&(t.button&1?a=1:t.button&2?a=3:t.button&4&&(a=2)),o&&t.ctrlKey&&a==1&&(a=3),a}var nt=function(){if(C&&_<9)return!1;var t=T("div");return"draggable"in t||"dragDrop"in t}(),at;function it(t){if(at==null){var a=T("span","\u200B");w(t,T("span",[a,document.createTextNode("x")])),t.firstChild.offsetHeight!=0&&(at=a.offsetWidth<=1&&a.offsetHeight>2&&!(C&&_<8))}var j=at?T("span","\u200B"):T("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return j.setAttribute("cm-text",""),j}var st;function Tt(t){if(st!=null)return st;var a=w(t,document.createTextNode("A\u062EA")),j=P(a,0,1).getBoundingClientRect(),M=P(a,1,2).getBoundingClientRect();return x(t),!j||j.left==j.right?!1:st=M.right-j.right<3}var pt=` b`.split(/\n/).length!=3?function(t){for(var a=0,j=[],M=t.length;a<=M;){var K=t.indexOf(` `,a);K==-1&&(K=t.length);var re=t.slice(a,t.charAt(K-1)=="\r"?K-1:K),se=re.indexOf("\r");se!=-1?(j.push(re.slice(0,se)),a+=se+1):(j.push(re),a=K+1)}return j}:function(t){return t.split(/\r\n?|\n/)},ht=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(a){return!1}}:function(t){var a;try{a=t.ownerDocument.selection.createRange()}catch(j){}return!a||a.parentElement()!=t?!1:a.compareEndPoints("StartToEnd",a)!=0},Ft=function(){var t=T("div");return"oncopy"in t?!0:(t.setAttribute("oncopy","return;"),typeof t.oncopy=="function")}(),Lt=null;function Yt(t){if(Lt!=null)return Lt;var a=w(t,T("span","x")),j=a.getBoundingClientRect(),M=P(a,0,1).getBoundingClientRect();return Lt=Math.abs(j.left-M.left)>1}var $t={},Mt={};function wt(t,a){arguments.length>2&&(a.dependencies=Array.prototype.slice.call(arguments,2)),$t[t]=a}function Jt(t,a){Mt[t]=a}function Dt(t){if(typeof t=="string"&&Mt.hasOwnProperty(t))t=Mt[t];else if(t&&typeof t.name=="string"&&Mt.hasOwnProperty(t.name)){var a=Mt[t.name];typeof a=="string"&&(a={name:a}),t=q(a,t),t.name=a.name}else{if(typeof t=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Dt("application/xml");if(typeof t=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Dt("application/json")}return typeof t=="string"?{name:t}:t||{name:"null"}}function St(t,a){a=Dt(a);var j=$t[a.name];if(!j)return St(t,"text/plain");var M=j(t,a);if(_t.hasOwnProperty(a.name)){var K=_t[a.name];for(var re in K){if(!K.hasOwnProperty(re))continue;M.hasOwnProperty(re)&&(M["_"+re]=M[re]),M[re]=K[re]}}if(M.name=a.name,a.helperType&&(M.helperType=a.helperType),a.modeProps)for(var se in a.modeProps)M[se]=a.modeProps[se];return M}var _t={};function Et(t,a){var j=_t.hasOwnProperty(t)?_t[t]:_t[t]={};L(a,j)}function Bt(t,a){if(a===!0)return a;if(t.copyState)return t.copyState(a);var j={};for(var M in a){var K=a[M];K instanceof Array&&(K=K.concat([])),j[M]=K}return j}function Dr(t,a){for(var j;t.innerMode&&!(j=t.innerMode(a),!j||j.mode==t);)a=j.state,t=j.mode;return j||{mode:t,state:a}}function mt(t,a,j){return t.startState?t.startState(a,j):!0}var Ct=function(t,a,j){this.pos=this.start=0,this.string=t,this.tabSize=a||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=j};Ct.prototype.eol=function(){return this.pos>=this.string.length},Ct.prototype.sol=function(){return this.pos==this.lineStart},Ct.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ct.prototype.next=function(){if(this.posa},Ct.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},Ct.prototype.skipToEnd=function(){this.pos=this.string.length},Ct.prototype.skipTo=function(t){var a=this.string.indexOf(t,this.pos);if(a>-1)return this.pos=a,!0},Ct.prototype.backUp=function(t){this.pos-=t},Ct.prototype.column=function(){return this.lastColumnPos0?null:(re&&a!==!1&&(this.pos+=re[0].length),re)}},Ct.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ct.prototype.hideFirstChars=function(t,a){this.lineStart+=t;try{return a()}finally{this.lineStart-=t}},Ct.prototype.lookAhead=function(t){var a=this.lineOracle;return a&&a.lookAhead(t)},Ct.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};function dt(t,a){if(a-=t.first,a<0||a>=t.size)throw new Error("There is no line "+(a+t.first)+" in the document.");for(var j=t;!j.lines;)for(var M=0;;++M){var K=j.children[M],re=K.chunkSize();if(a=t.first&&aj?ut(j,dt(t,j).text.length):dn(a,dt(t,a.line).text.length)}function dn(t,a){var j=t.ch;return j==null||j>a?ut(t.line,a):j<0?ut(t.line,0):t}function ct(t,a){for(var j=[],M=0;Mthis.maxLookAhead&&(this.maxLookAhead=t),a},xr.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var a=this.baseTokens[this.baseTokenPos+1];return{type:a&&a.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},xr.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},xr.fromSaved=function(t,a,j){return a instanceof jr?new xr(t,Bt(t.mode,a.state),j,a.lookAhead):new xr(t,Bt(t.mode,a),j)},xr.prototype.save=function(t){var a=t!==!1?Bt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new jr(a,this.maxLookAhead):a};function Gn(t,a,j,M){var K=[t.state.modeGen],re={};Vr(t,a.text,t.doc.mode,j,function(Te,Ue){return K.push(Te,Ue)},re,M);for(var se=j.state,pe=function(Te){j.baseTokens=K;var Ue=t.state.overlays[Te],We=1,tt=0;j.state=!0,Vr(t,a.text,Ue.mode,j,function(et,lt){for(var ft=We;ttet&&K.splice(We,1,et,K[We+1],bt),We+=2,tt=Math.min(et,bt)}if(!lt)return;if(Ue.opaque)K.splice(ft,We-ft,et,"overlay "+lt),We=ft+2;else for(;ftt.options.maxHighlightLength&&Bt(t.doc.mode,M.state),re=Gn(t,a,M);K&&(M.state=K),a.stateAfter=M.save(!K),a.styles=re.styles,re.classes?a.styleClasses=re.classes:a.styleClasses&&(a.styleClasses=null),j===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return a.styles}function hn(t,a,j){var M=t.doc,K=t.display;if(!M.mode.startState)return new xr(M,!0,a);var re=dr(t,a,j),se=re>M.first&&dt(M,re-1).stateAfter,pe=se?xr.fromSaved(M,se,re):new xr(M,mt(M.mode),re);return M.iter(re,a,function(ve){Ei(t,ve.text,pe);var Te=pe.line;ve.stateAfter=Te==a-1||Te%5==0||Te>=K.viewFrom&&Tea.start)return re}throw new Error("Mode "+t.name+" failed to advance stream.")}var Fr=function(t,a,j){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=a||null,this.state=j};function di(t,a,j,M){var K=t.doc,re=K.mode,se;a=Pt(K,a);var pe=dt(K,a.line),ve=hn(t,a.line,j),Te=new Ct(pe.text,t.options.tabSize,ve),Ue;for(M&&(Ue=[]);(M||Te.post.options.maxHighlightLength?(pe=!1,se&&Ei(t,a,M,Ue.pos),Ue.pos=a.length,We=null):We=fn(bn(j,Ue,M.state,tt),re),tt){var et=tt[0].name;et&&(We="m-"+(We?et+" "+We:et))}if(!pe||Te!=We){for(;vese;--pe){if(pe<=re.first)return re.first;var ve=dt(re,pe-1),Te=ve.stateAfter;if(Te&&(!j||pe+(Te instanceof jr?Te.lookAhead:0)<=re.modeFrontier))return pe;var Ue=G(ve.text,null,t.options.tabSize);(K==null||M>Ue)&&(K=pe-1,M=Ue)}return K}function nn(t,a){if(t.modeFrontier=Math.min(t.modeFrontier,a),t.highlightFrontierj;M--){var K=dt(t,M).stateAfter;if(K&&(!(K instanceof jr)||M+K.lookAhead=a:re.to>a);(M||(M=[])).push(new Rr(se,re.from,ve?null:re.to))}}return M}function Ji(t,a,j){var M;if(t)for(var K=0;K=a:re.to>a);if(pe||re.from==a&&se.type=="bookmark"&&(!j||re.marker.insertLeft)){var ve=re.from==null||(se.inclusiveLeft?re.from<=a:re.from0&&pe)for(var Wt=0;Wt0)continue;var Ue=[ve,1],We=kt(Te.from,pe.from),tt=kt(Te.to,pe.to);(We<0||!se.inclusiveLeft&&!We)&&Ue.push({from:Te.from,to:pe.from}),(tt>0||!se.inclusiveRight&&!tt)&&Ue.push({from:pe.to,to:Te.to}),K.splice.apply(K,Ue),ve+=Ue.length-3}return K}function Zr(t){var a=t.markedSpans;if(!a)return;for(var j=0;ja)&&(!M||Tn(M,re.marker)<0)&&(M=re.marker)}return M}function Mi(t,a,j,M,K){var re=dt(t,a),se=jt&&re.markedSpans;if(se)for(var pe=0;pe=0&&We<=0||Ue<=0&&We>=0)continue;if(Ue<=0&&(ve.marker.inclusiveRight&&K.inclusiveLeft?kt(Te.to,j)>=0:kt(Te.to,j)>0)||Ue>=0&&(ve.marker.inclusiveRight&&K.inclusiveLeft?kt(Te.from,M)<=0:kt(Te.from,M)<0))return!0}}function Xn(t){for(var a;a=zn(t);)t=a.find(-1,!0).line;return t}function ji(t){for(var a;a=Vn(t);)t=a.find(1,!0).line;return t}function pi(t){for(var a,j;a=Vn(t);)t=a.find(1,!0).line,(j||(j=[])).push(t);return j}function mi(t,a){var j=dt(t,a),M=Xn(j);return j==M?a:xt(M)}function Yn(t,a){if(a>t.lastLine())return a;var j=dt(t,a),M;if(!$n(t,j))return a;for(;M=Vn(j);)j=M.find(1,!0).line;return xt(j)+1}function $n(t,a){var j=jt&&a.markedSpans;if(j)for(var M=void 0,K=0;Ka.maxLineLength&&(a.maxLineLength=K,a.maxLine=M)})}var ii=function(t,a,j){this.text=t,ri(this,a),this.height=j?j(this):1};ii.prototype.lineNo=function(){return xt(this)},Ce(ii);function Ur(t,a,j,M){t.text=a,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),t.order!=null&&(t.order=null),Zr(t),ri(t,j);var K=M?M(t):1;K!=t.height&&yt(t,K)}function Ut(t){t.parent=null,Zr(t)}var er={},zt={};function ar(t,a){if(!t||/^\s*$/.test(t))return null;var j=a.addModeClass?zt:er;return j[t]||(j[t]=t.replace(/\S+/g,"cm-$&"))}function _r(t,a){var j=F("span",null,null,e?"padding-right: .1px":null),M={pre:F("pre",[j],"CodeMirror-line"),content:j,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};a.measure={};for(var K=0;K<=(a.rest?a.rest.length:0);K++){var re=K?a.rest[K-1]:a.line,se=void 0;M.pos=0,M.addToken=mr,Tt(t.display.measure)&&(se=qe(re,t.doc.direction))&&(M.addToken=Un(M.addToken,se)),M.map=[];var pe=a!=t.display.externalMeasured&&xt(re);vi(re,M,An(t,re,pe)),re.styleClasses&&(re.styleClasses.bgClass&&(M.bgClass=O(re.styleClasses.bgClass,M.bgClass||"")),re.styleClasses.textClass&&(M.textClass=O(re.styleClasses.textClass,M.textClass||""))),M.map.length==0&&M.map.push(0,0,M.content.appendChild(it(t.display.measure))),K==0?(a.measure.map=M.map,a.measure.cache={}):((a.measure.maps||(a.measure.maps=[])).push(M.map),(a.measure.caches||(a.measure.caches=[])).push({}))}if(e){var ve=M.content.lastChild;(/\bcm-tab\b/.test(ve.className)||ve.querySelector&&ve.querySelector(".cm-tab"))&&(M.content.className="cm-tab-wrap-hack")}return ye(t,"renderLine",t,a.line,M.pre),M.pre.className&&(M.textClass=O(M.pre.className,M.textClass||"")),M}function Lr(t){var a=T("span","\u2022","cm-invalidchar");return a.title="\\u"+t.charCodeAt(0).toString(16),a.setAttribute("aria-label",a.title),a}function mr(t,a,j,M,K,re,se){if(!a)return;var pe=t.splitSpaces?qr(a,t.trailingSpace):a,ve=t.cm.state.specialChars,Te=!1,Ue;if(!ve.test(a))t.col+=a.length,Ue=document.createTextNode(pe),t.map.push(t.pos,t.pos+a.length,Ue),C&&_<9&&(Te=!0),t.pos+=a.length;else{Ue=document.createDocumentFragment();for(var We=0;;){ve.lastIndex=We;var tt=ve.exec(a),et=tt?tt.index-We:a.length-We;if(et){var lt=document.createTextNode(pe.slice(We,We+et));C&&_<9?Ue.appendChild(T("span",[lt])):Ue.appendChild(lt),t.map.push(t.pos,t.pos+et,lt),t.col+=et,t.pos+=et}if(!tt)break;We+=et+1;var ft=void 0;if(tt[0]==" "){var bt=t.cm.options.tabSize,At=bt-t.col%bt;ft=Ue.appendChild(T("span",te(At),"cm-tab")),ft.setAttribute("role","presentation"),ft.setAttribute("cm-text"," "),t.col+=At}else tt[0]=="\r"||tt[0]==` `?(ft=Ue.appendChild(T("span",tt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),ft.setAttribute("cm-text",tt[0]),t.col+=1):(ft=t.cm.options.specialCharPlaceholder(tt[0]),ft.setAttribute("cm-text",tt[0]),C&&_<9?Ue.appendChild(T("span",[ft])):Ue.appendChild(ft),t.col+=1);t.map.push(t.pos,t.pos+1,ft),t.pos++}}if(t.trailingSpace=pe.charCodeAt(a.length-1)==32,j||M||K||Te||re||se){var Nt=j||"";M&&(Nt+=M),K&&(Nt+=K);var Rt=T("span",[Ue],Nt,re);if(se)for(var Wt in se)se.hasOwnProperty(Wt)&&Wt!="style"&&Wt!="class"&&Rt.setAttribute(Wt,se[Wt]);return t.content.appendChild(Rt)}t.content.appendChild(Ue)}function qr(t,a){if(t.length>1&&!/ /.test(t))return t;for(var j=a,M="",K=0;KTe&&We.from<=Te);tt++);if(We.to>=Ue)return t(j,M,K,re,se,pe,ve);t(j,M.slice(0,We.to-Te),K,re,null,pe,ve),re=null,M=M.slice(We.to-Te),Te=We.to}}}function hr(t,a,j,M){var K=!M&&j.widgetNode;K&&t.map.push(t.pos,t.pos+a,K),!M&&t.cm.display.input.needsContentAttribute&&(K||(K=t.content.appendChild(document.createElement("span"))),K.setAttribute("cm-marker",j.id)),K&&(t.cm.display.input.setUneditable(K),t.content.appendChild(K)),t.pos+=a,t.trailingSpace=!1}function vi(t,a,j){var M=t.markedSpans,K=t.text,re=0;if(!M){for(var se=1;seve||Tr.collapsed&&Zt.to==ve&&Zt.from==ve)){if(Zt.to!=null&&Zt.to!=ve&&et>Zt.to&&(et=Zt.to,ft=""),Tr.className&&(lt+=" "+Tr.className),Tr.css&&(tt=(tt?tt+";":"")+Tr.css),Tr.startStyle&&Zt.from==ve&&(bt+=" "+Tr.startStyle),Tr.endStyle&&Zt.to==et&&(Wt||(Wt=[])).push(Tr.endStyle,Zt.to),Tr.title&&((Nt||(Nt={})).title=Tr.title),Tr.attributes)for(var un in Tr.attributes)(Nt||(Nt={}))[un]=Tr.attributes[un];Tr.collapsed&&(!At||Tn(At.marker,Tr)<0)&&(At=Zt)}else Zt.from>ve&&et>Zt.from&&(et=Zt.from)}if(Wt)for(var oi=0;oi=pe)break;for(var Ni=Math.min(pe,et);;){if(Ue){var Ii=ve+Ue.length;if(!At){var Hn=Ii>Ni?Ue.slice(0,Ni-ve):Ue;a.addToken(a,Hn,We?We+lt:lt,bt,ve+Hn.length==et?ft:"",tt,Nt)}if(Ii>=Ni){Ue=Ue.slice(Ni-ve),ve=Ni;break}ve=Ii,bt=""}Ue=K.slice(re,re=j[Te++]),We=ar(j[Te++],a.cm.options)}}}function kr(t,a,j){this.line=a,this.rest=pi(a),this.size=this.rest?xt(W(this.rest))-j+1:1,this.node=this.text=null,this.hidden=$n(t,a)}function Sn(t,a,j){for(var M=[],K,re=a;re2&&re.push((ve.bottom+Te.top)/2-j.top)}}re.push(j.bottom-j.top)}}function Se(t,a,j){if(t.line==a)return{map:t.measure.map,cache:t.measure.cache};for(var M=0;Mj)return{map:t.measure.maps[K],cache:t.measure.caches[K],before:!0}}function je(t,a){a=Xn(a);var j=xt(a),M=t.display.externalMeasured=new kr(t.doc,a,j);M.lineN=j;var K=M.built=_r(t,M);return M.text=K.pre,w(t.display.lineMeasure,K.pre),M}function Be(t,a,j,M){return Qe(t,Ke(t,a),j,M)}function ze(t,a){if(a>=t.display.viewFrom&&a=j.lineN&&aa)&&(re=ve-pe,K=re-1,a>=ve&&(se="right")),K!=null){if(M=t[Te+2],pe==ve&&j==(M.insertLeft?"left":"right")&&(se=j),j=="left"&&K==0)for(;Te&&t[Te-2]==t[Te-3]&&t[Te-1].insertLeft;)M=t[(Te-=3)+2],se="left";if(j=="right"&&K==ve-pe)for(;Te=0&&!((j=t[K]).left!=j.right);K--);return j}function Ot(t,a,j,M){var K=vt(a.map,j,M),re=K.node,se=K.start,pe=K.end,ve=K.collapse,Te;if(re.nodeType==3){for(var Ue=0;Ue<4;Ue++){for(;se&&ce(a.line.text.charAt(K.coverStart+se));)--se;for(;K.coverStart+pe0&&(ve=M="right");var We;t.options.lineWrapping&&(We=re.getClientRects()).length>1?Te=We[M=="right"?We.length-1:0]:Te=re.getBoundingClientRect()}if(C&&_<9&&!se&&(!Te||!Te.left&&!Te.right)){var tt=re.parentNode.getClientRects()[0];tt?Te={left:tt.left,right:tt.left+Jn(t.display),top:tt.top,bottom:tt.bottom}:Te=ot}for(var et=Te.top-a.rect.top,lt=Te.bottom-a.rect.top,ft=(et+lt)/2,bt=a.view.measure.heights,At=0;At=M.text.length?(ve=M.text.length,Te="before"):ve<=0&&(ve=0,Te="after"),!pe)return se(Te=="before"?ve-1:ve,Te=="before");function Ue(lt,ft,bt){var At=pe[ft],Nt=At.level==1;return se(bt?lt-1:lt,Nt!=bt)}var We=Ye(pe,ve,Te),tt=$e,et=Ue(ve,We,Te=="before");return tt!=null&&(et.other=Ue(ve,tt,Te!="before")),et}function rr(t,a){var j=0;a=Pt(t.doc,a),t.options.lineWrapping||(j=Jn(t.display)*a.ch);var M=dt(t.doc,a.line),K=ni(M)+Xi(t.display);return{left:j,right:j,top:K,bottom:K+M.height}}function Qt(t,a,j,M,K){var re=ut(t,a,j);return re.xRel=K,M&&(re.outside=M),re}function Or(t,a,j){var M=t.doc;if(j+=t.display.viewOffset,j<0)return Qt(M.first,0,null,-1,-1);var K=Kt(M,j),re=M.first+M.size-1;if(K>re)return Qt(M.first+M.size-1,dt(M,re).text.length,null,1,1);a<0&&(a=0);for(var se=dt(M,K);;){var pe=vn(t,se,K,a,j),ve=ki(se,pe.ch+(pe.xRel>0||pe.outside>0?1:0));if(!ve)return pe;var Te=ve.find(1);if(Te.line==K)return Te;se=dt(M,K=Te.line)}}function Nr(t,a,j,M){M-=pr(a);var K=a.text.length,re=Fe(function(se){return Qe(t,j,se-1).bottom<=M},K,0);return K=Fe(function(se){return Qe(t,j,se).top>M},re,K),{begin:re,end:K}}function Vt(t,a,j,M){j||(j=Ke(t,a));var K=Pr(t,a,Qe(t,j,M),"line").top;return Nr(t,a,j,K)}function Br(t,a,j,M){return t.bottom<=j?!1:t.top>j?!0:(M?t.left:t.right)>a}function vn(t,a,j,M,K){K-=ni(a);var re=Ke(t,a),se=pr(a),pe=0,ve=a.text.length,Te=!0,Ue=qe(a,t.doc.direction);if(Ue){var We=(t.options.lineWrapping?en:Gr)(t,a,j,re,Ue,M,K);Te=We.level!=1,pe=Te?We.from:We.to-1,ve=Te?We.to:We.from-1}var tt=null,et=null,lt=Fe(function(nr){var Zt=Qe(t,re,nr);return Zt.top+=se,Zt.bottom+=se,Br(Zt,M,K,!1)?(Zt.top<=K&&Zt.left<=M&&(tt=nr,et=Zt),!0):!1},pe,ve),ft,bt,At=!1;if(et){var Nt=M-et.left=Wt.bottom?1:0}return lt=we(a.text,lt,1),Qt(j,lt,bt,At,M-ft)}function Gr(t,a,j,M,K,re,se){var pe=Fe(function(We){var tt=K[We],et=tt.level!=1;return Br(Cr(t,ut(j,et?tt.to:tt.from,et?"before":"after"),"line",a,M),re,se,!0)},0,K.length-1),ve=K[pe];if(pe>0){var Te=ve.level!=1,Ue=Cr(t,ut(j,Te?ve.from:ve.to,Te?"after":"before"),"line",a,M);Br(Ue,re,se,!0)&&Ue.top>se&&(ve=K[pe-1])}return ve}function en(t,a,j,M,K,re,se){var pe=Nr(t,a,M,se),ve=pe.begin,Te=pe.end;/\s/.test(a.text.charAt(Te-1))&&Te--;for(var Ue=null,We=null,tt=0;tt=Te||et.to<=ve)continue;var lt=et.level!=1,ft=Qe(t,M,lt?Math.min(Te,et.to)-1:Math.max(ve,et.from)).right,bt=ftbt)&&(Ue=et,We=bt)}return Ue||(Ue=K[K.length-1]),Ue.fromTe&&(Ue={from:Ue.from,to:Te,level:Ue.level}),Ue}var Jr;function Dn(t){if(t.cachedTextHeight!=null)return t.cachedTextHeight;if(Jr==null){Jr=T("pre",null,"CodeMirror-line-like");for(var a=0;a<49;++a)Jr.appendChild(document.createTextNode("x")),Jr.appendChild(T("br"));Jr.appendChild(document.createTextNode("x"))}w(t.measure,Jr);var j=Jr.offsetHeight/50;return j>3&&(t.cachedTextHeight=j),x(t.measure),j||1}function Jn(t){if(t.cachedCharWidth!=null)return t.cachedCharWidth;var a=T("span","xxxxxxxxxx"),j=T("pre",[a],"CodeMirror-line-like");w(t.measure,j);var M=a.getBoundingClientRect(),K=(M.right-M.left)/10;return K>2&&(t.cachedCharWidth=K),K||10}function En(t){for(var a=t.display,j={},M={},K=a.gutters.clientLeft,re=a.gutters.firstChild,se=0;re;re=re.nextSibling,++se){var pe=t.display.gutterSpecs[se].className;j[pe]=re.offsetLeft+re.clientLeft+K,M[pe]=re.clientWidth}return{fixedPos:yi(a),gutterTotalWidth:a.gutters.offsetWidth,gutterLeft:j,gutterWidth:M,wrapperWidth:a.wrapper.clientWidth}}function yi(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function Ui(t){var a=Dn(t.display),j=t.options.lineWrapping,M=j&&Math.max(5,t.display.scroller.clientWidth/Jn(t.display)-3);return function(K){if($n(t.doc,K))return 0;var re=0;if(K.widgets)for(var se=0;se0&&(Te=dt(t.doc,ve.line).text).length==ve.ch){var Ue=G(Te,Te.length,t.options.tabSize)-Te.length;ve=ut(ve.line,Math.max(0,Math.round((re-Ge(t.display).left)/Jn(t.display))-Ue))}return ve}function ln(t,a){if(a>=t.display.viewTo)return null;if(a-=t.display.viewFrom,a<0)return null;for(var j=t.display.view,M=0;Ma)&&(K.updateLineNumbers=a),t.curOp.viewChanged=!0,a>=K.viewTo)jt&&mi(t.doc,a)K.viewFrom?yn(t):(K.viewFrom+=M,K.viewTo+=M);else if(a<=K.viewFrom&&j>=K.viewTo)yn(t);else if(a<=K.viewFrom){var re=Bi(t,j,j+M,1);re?(K.view=K.view.slice(re.index),K.viewFrom=re.lineN,K.viewTo+=M):yn(t)}else if(j>=K.viewTo){var se=Bi(t,a,a,-1);se?(K.view=K.view.slice(0,se.index),K.viewTo=se.lineN):yn(t)}else{var pe=Bi(t,a,a,-1),ve=Bi(t,j,j+M,1);pe&&ve?(K.view=K.view.slice(0,pe.index).concat(Sn(t,pe.lineN,ve.lineN)).concat(K.view.slice(ve.index)),K.viewTo+=M):yn(t)}var Te=K.externalMeasured;Te&&(j=K.lineN&&a=M.viewTo)return;var re=M.view[ln(t,a)];if(re.node==null)return;var se=re.changes||(re.changes=[]);oe(se,j)==-1&&se.push(j)}function yn(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function Bi(t,a,j,M){var K=ln(t,a),re,se=t.display.view;if(!jt||j==t.doc.first+t.doc.size)return{index:K,lineN:j};for(var pe=t.display.viewFrom,ve=0;ve0){if(K==se.length-1)return null;re=pe+se[K].size-a,K++}else re=pe-a;a+=re,j+=re}for(;mi(t.doc,j)!=j;){if(K==(M<0?0:se.length-1))return null;j+=M*se[K-(M<0?1:0)].size,K+=M}return{index:K,lineN:j}}function ta(t,a,j){var M=t.display,K=M.view;K.length==0||a>=M.viewTo||j<=M.viewFrom?(M.view=Sn(t,a,j),M.viewFrom=a):(M.viewFrom>a?M.view=Sn(t,a,M.viewFrom).concat(M.view):M.viewFromj&&(M.view=M.view.slice(0,ln(t,j)))),M.viewTo=j}function ra(t){for(var a=t.display.view,j=0,M=0;M=t.display.viewTo||pe.to().line0?a.blinker=setInterval(function(){t.hasFocus()||va(t),a.cursorDiv.style.visibility=(j=!j)?"":"hidden"},t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(a.cursorDiv.style.visibility="hidden")}function So(t){t.state.focused||(t.display.input.focus(),ia(t))}function eo(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,va(t))},100)}function ia(t,a){if(t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),t.options.readOnly=="nocursor")return;t.state.focused||(ye(t,"focus",t,a),t.state.focused=!0,z(t.display.wrapper,"CodeMirror-focused"),!t.curOp&&t.display.selForContextMenu!=t.doc.sel&&(t.display.input.reset(),e&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),Zn(t)}function va(t,a){if(t.state.delayingBlurEvent)return;t.state.focused&&(ye(t,"blur",t,a),t.state.focused=!1,y(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150)}function Ma(t){for(var a=t.display,j=a.lineDiv.offsetTop,M=0;M.005||Ue<-.005)&&(yt(K.line,se),to(K.line),K.rest))for(var We=0;Wet.display.sizerWidth){var tt=Math.ceil(pe/Jn(t.display));tt>t.display.maxLineLength&&(t.display.maxLineLength=tt,t.display.maxLine=K.line,t.display.maxLineChanged=!0)}}}function to(t){if(t.widgets)for(var a=0;a=se&&(re=Kt(a,ni(dt(a,ve))-t.wrapper.clientHeight),se=ve)}return{from:re,to:Math.max(se,re+1)}}function Xo(t,a){if(ue(t,"scrollCursorIntoView"))return;var j=t.display,M=j.sizer.getBoundingClientRect(),K=null;if(a.top+M.top<0?K=!0:a.bottom+M.top>(window.innerHeight||document.documentElement.clientHeight)&&(K=!1),K!=null&&!l){var re=T("div","\u200B",null,`position: absolute; top: `+(a.top-j.viewOffset-Xi(t.display))+`px; height: `+(a.bottom-a.top+Ve(t)+j.barHeight)+`px; left: `+a.left+"px; width: "+Math.max(2,a.right-a.left)+"px;");t.display.lineSpace.appendChild(re),re.scrollIntoView(K),t.display.lineSpace.removeChild(re)}}function Yo(t,a,j,M){M==null&&(M=0);var K;!t.options.lineWrapping&&a==j&&(a=a.ch?ut(a.line,a.sticky=="before"?a.ch-1:a.ch,"after"):a,j=a.sticky=="before"?ut(a.line,a.ch+1,"before"):a);for(var re=0;re<5;re++){var se=!1,pe=Cr(t,a),ve=!j||j==a?pe:Cr(t,j);K={left:Math.min(pe.left,ve.left),top:Math.min(pe.top,ve.top)-M,right:Math.max(pe.left,ve.left),bottom:Math.max(pe.bottom,ve.bottom)+M};var Te=ro(t,K),Ue=t.doc.scrollTop,We=t.doc.scrollLeft;if(Te.scrollTop!=null&&(_a(t,Te.scrollTop),Math.abs(t.doc.scrollTop-Ue)>1&&(se=!0)),Te.scrollLeft!=null&&(Hi(t,Te.scrollLeft),Math.abs(t.doc.scrollLeft-We)>1&&(se=!0)),!se)break}return K}function Co(t,a){var j=ro(t,a);j.scrollTop!=null&&_a(t,j.scrollTop),j.scrollLeft!=null&&Hi(t,j.scrollLeft)}function ro(t,a){var j=t.display,M=Dn(t.display);a.top<0&&(a.top=0);var K=t.curOp&&t.curOp.scrollTop!=null?t.curOp.scrollTop:j.scroller.scrollTop,re=xe(t),se={};a.bottom-a.top>re&&(a.bottom=a.top+re);var pe=t.doc.height+ke(j),ve=a.toppe-M;if(a.topK+re){var Ue=Math.min(a.top,(Te?pe:a.bottom)-re);Ue!=K&&(se.scrollTop=Ue)}var We=t.options.fixedGutter?0:j.gutters.offsetWidth,tt=t.curOp&&t.curOp.scrollLeft!=null?t.curOp.scrollLeft:j.scroller.scrollLeft-We,et=Ne(t)-j.gutters.offsetWidth,lt=a.right-a.left>et;return lt&&(a.right=a.left+et),a.left<10?se.scrollLeft=0:a.leftet+tt-3&&(se.scrollLeft=a.right+(lt?0:10)-et),se}function no(t,a){if(a==null)return;Na(t),t.curOp.scrollTop=(t.curOp.scrollTop==null?t.doc.scrollTop:t.curOp.scrollTop)+a}function ya(t){Na(t);var a=t.getCursor();t.curOp.scrollToPos={from:a,to:a,margin:t.options.cursorScrollMargin}}function ba(t,a,j){(a!=null||j!=null)&&Na(t),a!=null&&(t.curOp.scrollLeft=a),j!=null&&(t.curOp.scrollTop=j)}function $o(t,a){Na(t),t.curOp.scrollToPos=a}function Na(t){var a=t.curOp.scrollToPos;if(a){t.curOp.scrollToPos=null;var j=rr(t,a.from),M=rr(t,a.to);Oa(t,j,M,a.margin)}}function Oa(t,a,j,M){var K=ro(t,{left:Math.min(a.left,j.left),top:Math.min(a.top,j.top)-M,right:Math.max(a.right,j.right),bottom:Math.max(a.bottom,j.bottom)+M});ba(t,K.scrollLeft,K.scrollTop)}function _a(t,a){if(Math.abs(t.doc.scrollTop-a)<2)return;S||Ia(t,{top:a}),Ea(t,a,!0),S&&Ia(t),Ra(t,100)}function Ea(t,a,j){if(a=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,a)),t.display.scroller.scrollTop==a&&!j)return;t.doc.scrollTop=a,t.display.scrollbars.setScrollTop(a),t.display.scroller.scrollTop!=a&&(t.display.scroller.scrollTop=a)}function Hi(t,a,j,M){if(a=Math.max(0,Math.min(a,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),(j?a==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-a)<2)&&!M)return;t.doc.scrollLeft=a,Ir(t),t.display.scroller.scrollLeft!=a&&(t.display.scroller.scrollLeft=a),t.display.scrollbars.setScrollLeft(a)}function ca(t){var a=t.display,j=a.gutters.offsetWidth,M=Math.round(t.doc.height+ke(t.display));return{clientHeight:a.scroller.clientHeight,viewHeight:a.wrapper.clientHeight,scrollWidth:a.scroller.scrollWidth,clientWidth:a.scroller.clientWidth,viewWidth:a.wrapper.clientWidth,barLeft:t.options.fixedGutter?j:0,docHeight:M,scrollHeight:M+Ve(t)+a.barHeight,nativeBarWidth:a.nativeBarWidth,gutterWidth:j}}var aa=function(t,a,j){this.cm=j;var M=this.vert=T("div",[T("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),K=this.horiz=T("div",[T("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");M.tabIndex=K.tabIndex=-1,t(M),t(K),Ie(M,"scroll",function(){M.clientHeight&&a(M.scrollTop,"vertical")}),Ie(K,"scroll",function(){K.clientWidth&&a(K.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,C&&_<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};aa.prototype.update=function(t){var a=t.scrollWidth>t.clientWidth+1,j=t.scrollHeight>t.clientHeight+1,M=t.nativeBarWidth;if(j){this.vert.style.display="block",this.vert.style.bottom=a?M+"px":"0";var K=t.viewHeight-(a?M:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+K)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(a){this.horiz.style.display="block",this.horiz.style.right=j?M+"px":"0",this.horiz.style.left=t.barLeft+"px";var re=t.viewWidth-t.barLeft-(j?M:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+re)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(M==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:j?M:0,bottom:a?M:0}},aa.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},aa.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},aa.prototype.zeroWidthHack=function(){var t=o&&!n?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ee,this.disableVert=new ee},aa.prototype.enableZeroWidthBar=function(t,a,j){t.style.pointerEvents="auto";function M(){var K=t.getBoundingClientRect(),re=j=="vert"?document.elementFromPoint(K.right-1,(K.top+K.bottom)/2):document.elementFromPoint((K.right+K.left)/2,K.bottom-1);re!=t?t.style.pointerEvents="none":a.set(1e3,M)}a.set(1e3,M)},aa.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var Aa=function(){};Aa.prototype.update=function(){return{bottom:0,right:0}},Aa.prototype.setScrollLeft=function(){},Aa.prototype.setScrollTop=function(){},Aa.prototype.clear=function(){};function da(t,a){a||(a=ca(t));var j=t.display.barWidth,M=t.display.barHeight;ja(t,a);for(var K=0;K<4&&j!=t.display.barWidth||M!=t.display.barHeight;K++)j!=t.display.barWidth&&t.options.lineWrapping&&Ma(t),ja(t,ca(t)),j=t.display.barWidth,M=t.display.barHeight}function ja(t,a){var j=t.display,M=j.scrollbars.update(a);j.sizer.style.paddingRight=(j.barWidth=M.right)+"px",j.sizer.style.paddingBottom=(j.barHeight=M.bottom)+"px",j.heightForcer.style.borderBottom=M.bottom+"px solid transparent",M.right&&M.bottom?(j.scrollbarFiller.style.display="block",j.scrollbarFiller.style.height=M.bottom+"px",j.scrollbarFiller.style.width=M.right+"px"):j.scrollbarFiller.style.display="",M.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(j.gutterFiller.style.display="block",j.gutterFiller.style.height=M.bottom+"px",j.gutterFiller.style.width=a.gutterWidth+"px"):j.gutterFiller.style.display=""}var io={native:aa,null:Aa};function Fa(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&y(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new io[t.options.scrollbarStyle](function(a){t.display.wrapper.insertBefore(a,t.display.scrollbarFiller),Ie(a,"mousedown",function(){t.state.focused&&setTimeout(function(){return t.display.input.focus()},0)}),a.setAttribute("cm-not-content","true")},function(a,j){j=="horizontal"?Hi(t,a):_a(t,a)},t),t.display.scrollbars.addClass&&z(t.display.wrapper,t.display.scrollbars.addClass)}var ao=0;function oa(t){t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++ao},li(t.curOp)}function ha(t){var a=t.curOp;a&&Mr(a,function(j){for(var M=0;M=j.viewTo)||j.maxLineChanged&&a.options.lineWrapping,t.update=t.mustUpdate&&new Wi(a,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Qo(t){t.updatedDisplay=t.mustUpdate&&fa(t.cm,t.update)}function Zo(t){var a=t.cm,j=a.display;t.updatedDisplay&&Ma(a),t.barMeasure=ca(a),j.maxLineChanged&&!a.options.lineWrapping&&(t.adjustWidthTo=Be(a,j.maxLine,j.maxLine.text.length).left+3,a.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(j.scroller.clientWidth,j.sizer.offsetLeft+t.adjustWidthTo+Ve(a)+a.display.barWidth),t.maxScrollLeft=Math.max(0,j.sizer.offsetLeft+t.adjustWidthTo-Ne(a))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=j.input.prepareSelection())}function oo(t){var a=t.cm;t.adjustWidthTo!=null&&(a.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft=t.display.viewTo)return;var j=+new Date+t.options.workTime,M=hn(t,a.highlightFrontier),K=[];a.iter(M.line,Math.min(a.first+a.size,t.display.viewTo+500),function(re){if(M.line>=t.display.viewFrom){var se=re.styles,pe=re.text.length>t.options.maxHighlightLength?Bt(a.mode,M.state):null,ve=Gn(t,re,M,!0);pe&&(M.state=pe),re.styles=ve.styles;var Te=re.styleClasses,Ue=ve.classes;Ue?re.styleClasses=Ue:Te&&(re.styleClasses=null);for(var We=!se||se.length!=re.styles.length||Te!=Ue&&(!Te||!Ue||Te.bgClass!=Ue.bgClass||Te.textClass!=Ue.textClass),tt=0;!We&&ttj)return Ra(t,t.options.workDelay),!0}),a.highlightFrontier=M.line,a.modeFrontier=Math.max(a.modeFrontier,M.line),K.length&&wi(t,function(){for(var re=0;re=j.viewFrom&&a.visible.to<=j.viewTo&&(j.updateLineNumbers==null||j.updateLineNumbers>=j.viewTo)&&j.renderedView==j.view&&ra(t)==0)return!1;qn(t)&&(yn(t),a.dims=En(t));var K=M.first+M.size,re=Math.max(a.visible.from-t.options.viewportMargin,M.first),se=Math.min(K,a.visible.to+t.options.viewportMargin);j.viewFromse&&j.viewTo-se<20&&(se=Math.min(K,j.viewTo)),jt&&(re=mi(t.doc,re),se=Yn(t.doc,se));var pe=re!=j.viewFrom||se!=j.viewTo||j.lastWrapHeight!=a.wrapperHeight||j.lastWrapWidth!=a.wrapperWidth;ta(t,re,se),j.viewOffset=ni(dt(t.doc,j.viewFrom)),t.display.mover.style.top=j.viewOffset+"px";var ve=ra(t);if(!pe&&ve==0&&!a.force&&j.renderedView==j.view&&(j.updateLineNumbers==null||j.updateLineNumbers>=j.viewTo))return!1;var Te=Ro(t);return ve>4&&(j.lineDiv.style.display="none"),Do(t,j.updateLineNumbers,a.dims),ve>4&&(j.lineDiv.style.display=""),j.renderedView=j.view,Io(Te),x(j.cursorDiv),x(j.selectionDiv),j.gutters.style.height=j.sizer.style.minHeight=0,pe&&(j.lastWrapHeight=a.wrapperHeight,j.lastWrapWidth=a.wrapperWidth,Ra(t,400)),j.updateLineNumbers=null,!0}function Ua(t,a){for(var j=a.viewport,M=!0;;M=!1){if(!M||!t.options.lineWrapping||a.oldDisplayWidth==Ne(t)){if(j&&j.top!=null&&(j={top:Math.min(t.doc.height+ke(t.display)-xe(t),j.top)}),a.visible=Pa(t.display,t.doc,j),a.visible.from>=t.display.viewFrom&&a.visible.to<=t.display.viewTo)break}else M&&(a.visible=Pa(t.display,t.doc,j));if(!fa(t,a))break;Ma(t);var K=ca(t);Qr(t),da(t,K),Xr(t,K),a.force=!1}a.signal(t,"update",t),(t.display.viewFrom!=t.display.reportedViewFrom||t.display.viewTo!=t.display.reportedViewTo)&&(a.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function Ia(t,a){var j=new Wi(t,a);if(fa(t,j)){Ma(t),Ua(t,j);var M=ca(t);Qr(t),da(t,M),Xr(t,M),j.finish()}}function Do(t,a,j){var M=t.display,K=t.options.lineNumbers,re=M.lineDiv,se=re.firstChild;function pe(lt){var ft=lt.nextSibling;return e&&o&&t.display.currentWheelTarget==lt?lt.style.display="none":lt.parentNode.removeChild(lt),ft}for(var ve=M.view,Te=M.viewFrom,Ue=0;Ue-1&&(et=!1),zi(t,We,Te,j)),et&&(x(We.lineNumber),We.lineNumber.appendChild(document.createTextNode(qt(t.options,Te)))),se=We.node.nextSibling}Te+=We.size}for(;se;)se=pe(se)}function Ba(t){var a=t.gutters.offsetWidth;t.sizer.style.marginLeft=a+"px"}function Xr(t,a){t.display.sizer.style.minHeight=a.docHeight+"px",t.display.heightForcer.style.top=a.docHeight+"px",t.display.gutters.style.height=a.docHeight+t.display.barHeight+Ve(t)+"px"}function Ir(t){var a=t.display,j=a.view;if(!a.alignWidgets&&(!a.gutters.firstChild||!t.options.fixedGutter))return;for(var M=yi(a)-a.scroller.scrollLeft+t.doc.scrollLeft,K=a.gutters.offsetWidth,re=M+"px",se=0;sese.clientWidth,ve=se.scrollHeight>se.clientHeight;if(!(M&&pe||K&&ve))return;if(K&&o&&e){e:for(var Te=a.target,Ue=re.view;Te!=se;Te=Te.parentNode)for(var We=0;We=0&&kt(t,M.to())<=0)return j}return-1};var Kr=function(t,a){this.anchor=t,this.head=a};Kr.prototype.from=function(){return cn(this.anchor,this.head)},Kr.prototype.to=function(){return On(this.anchor,this.head)},Kr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Gi(t,a,j){var M=t&&t.options.selectionsMayTouch,K=a[j];a.sort(function(tt,et){return kt(tt.from(),et.from())}),j=oe(a,K);for(var re=1;re0:ve>=0){var Te=cn(pe.from(),se.from()),Ue=On(pe.to(),se.to()),We=pe.empty()?se.from()==se.head:pe.from()==pe.head;re<=j&&--j,a.splice(--re,2,new Kr(We?Ue:Te,We?Te:Ue))}}return new Si(a,j)}function Zi(t,a){return new Si([new Kr(t,a||t)],0)}function qi(t){return t.text?ut(t.from.line+t.text.length-1,W(t.text).length+(t.text.length==1?t.from.ch:0)):t.to}function uo(t,a){if(kt(t,a.from)<0)return t;if(kt(t,a.to)<=0)return qi(a);var j=t.line+a.text.length-(a.to.line-a.from.line)-1,M=t.ch;return t.line==a.to.line&&(M+=qi(a).ch-a.to.ch),ut(j,M)}function Wa(t,a){for(var j=[],M=0;M1&&t.remove(pe.line+1,lt-1),t.insert(pe.line+1,At)}gr(t,"change",t,a)}function wa(t,a,j){function M(K,re,se){if(K.linked)for(var pe=0;pe1&&!t.done[t.done.length-2].ranges)return t.done.pop(),W(t.done)}function _s(t,a,j,M){var K=t.history;K.undone.length=0;var re=+new Date,se,pe;if((K.lastOp==M||K.lastOrigin==a.origin&&a.origin&&(a.origin.charAt(0)=="+"&&K.lastModTime>re-(t.cm?t.cm.options.historyEventDelay:500)||a.origin.charAt(0)=="*"))&&(se=ml(K,K.lastOp==M)))pe=W(se.changes),kt(a.from,a.to)==0&&kt(a.from,pe.to)==0?pe.to=qi(a):se.changes.push(rs(t,a));else{var ve=W(K.done);for((!ve||!ve.ranges)&&Po(t.sel,K.done),se={changes:[rs(t,a)],generation:K.generation},K.done.push(se);K.done.length>K.undoDepth;)K.done.shift(),K.done[0].ranges||K.done.shift()}K.done.push(j),K.generation=++K.maxGeneration,K.lastModTime=K.lastSelTime=re,K.lastOp=K.lastSelOp=M,K.lastOrigin=K.lastSelOrigin=a.origin,pe||ye(t,"historyAdded")}function gl(t,a,j,M){var K=a.charAt(0);return K=="*"||K=="+"&&j.ranges.length==M.ranges.length&&j.somethingSelected()==M.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}function vl(t,a,j,M){var K=t.history,re=M&&M.origin;j==K.lastSelOp||re&&K.lastSelOrigin==re&&(K.lastModTime==K.lastSelTime&&K.lastOrigin==re||gl(t,re,W(K.done),a))?K.done[K.done.length-1]=a:Po(a,K.done),K.lastSelTime=+new Date,K.lastSelOrigin=re,K.lastSelOp=j,M&&M.clearRedo!==!1&&bs(K.undone)}function Po(t,a){var j=W(a);j&&j.ranges&&j.equals(t)||a.push(t)}function Es(t,a,j,M){var K=a["spans_"+t.id],re=0;t.iter(Math.max(t.first,j),Math.min(t.first+t.size,M),function(se){se.markedSpans&&((K||(K=a["spans_"+t.id]={}))[re]=se.markedSpans),++re})}function yl(t){if(!t)return null;for(var a,j=0;j-1&&(W(pe)[We]=Te[We],delete Te[We]))}}return M}function ns(t,a,j,M){if(M){var K=t.anchor;if(j){var re=kt(a,K)<0;re!=kt(j,K)<0?(K=a,a=j):re!=kt(a,j)<0&&(a=j)}return new Kr(K,a)}else return new Kr(j||a,a)}function No(t,a,j,M,K){K==null&&(K=t.cm&&(t.cm.display.shift||t.extend)),bi(t,new Si([ns(t.sel.primary(),a,j,K)],0),M)}function ws(t,a,j){for(var M=[],K=t.cm&&(t.cm.display.shift||t.extend),re=0;re=a.ch:pe.to>a.ch))){if(K&&(ye(ve,"beforeCursorEnter"),ve.explicitlyCleared))if(re.markedSpans){--se;continue}else break;if(!ve.atomic)continue;if(j){var We=ve.find(M<0?1:-1),tt=void 0;if((M<0?Ue:Te)&&(We=Rs(t,We,-M,We&&We.line==a.line?re:null)),We&&We.line==a.line&&(tt=kt(We,j))&&(M<0?tt<0:tt>0))return Ka(t,We,a,M,K)}var et=ve.find(M<0?-1:1);return(M<0?Te:Ue)&&(et=Rs(t,et,M,et.line==a.line?re:null)),et?Ka(t,et,a,M,K):null}}return a}function Fo(t,a,j,M,K){var re=M||1,se=Ka(t,a,j,re,K)||!K&&Ka(t,a,j,re,!0)||Ka(t,a,j,-re,K)||!K&&Ka(t,a,j,-re,!0);return se||(t.cantEdit=!0,ut(t.first,0))}function Rs(t,a,j,M){return j<0&&a.ch==0?a.line>t.first?Pt(t,ut(a.line-1)):null:j>0&&a.ch==(M||dt(t,a.line)).text.length?a.line=0;--K)Ls(t,{from:M[K].from,to:M[K].to,text:K?[""]:a.text,origin:a.origin});else Ls(t,a)}function Ls(t,a){if(a.text.length==1&&a.text[0]==""&&kt(a.from,a.to)==0)return;var j=Wa(t,a);_s(t,a,j,t.cm?t.cm.curOp.id:NaN),ho(t,a,j,Oi(t,a));var M=[];wa(t,function(K,re){!re&&oe(M,K.history)==-1&&(Ns(K.history,a),M.push(K.history)),ho(K,a,null,Oi(K,a))})}function Uo(t,a,j){var M=t.cm&&t.cm.state.suppressEdits;if(M&&!j)return;for(var K=t.history,re,se=t.sel,pe=a=="undo"?K.done:K.undone,ve=a=="undo"?K.undone:K.done,Te=0;Te=0;--et){var lt=tt(et);if(lt)return lt.v}}function ks(t,a){if(a==0)return;if(t.first+=a,t.sel=new Si(Y(t.sel.ranges,function(K){return new Kr(ut(K.anchor.line+a,K.anchor.ch),ut(K.head.line+a,K.head.ch))}),t.sel.primIndex),t.cm){tn(t.cm,t.first,t.first-a,a);for(var j=t.cm.display,M=j.viewFrom;Mt.lastLine())return;if(a.from.linere&&(a={from:a.from,to:ut(re,dt(t,re).text.length),text:[a.text[0]],origin:a.origin}),a.removed=Ht(t,a.from,a.to),j||(j=Wa(t,a)),t.cm?El(t.cm,a,M):ts(t,a,M),jo(t,j,_e),t.cantEdit&&Fo(t,ut(t.firstLine(),0))&&(t.cantEdit=!1)}function El(t,a,j){var M=t.doc,K=t.display,re=a.from,se=a.to,pe=!1,ve=re.line;t.options.lineWrapping||(ve=xt(Xn(dt(M,re.line))),M.iter(ve,se.line+1,function(et){if(et==K.maxLine)return pe=!0,!0})),M.sel.contains(a.from,a.to)>-1&&he(t),ts(M,a,j,Ui(t)),t.options.lineWrapping||(M.iter(ve,re.line+a.text.length,function(et){var lt=gi(et);lt>K.maxLineLength&&(K.maxLine=et,K.maxLineLength=lt,K.maxLineChanged=!0,pe=!1)}),pe&&(t.curOp.updateMaxLine=!0)),nn(M,re.line),Ra(t,400);var Te=a.text.length-(se.line-re.line)-1;a.full?tn(t):re.line==se.line&&a.text.length==1&&!gs(t.doc,a)?xn(t,re.line,"text"):tn(t,re.line,se.line+1,Te);var Ue=me(t,"changes"),We=me(t,"change");if(We||Ue){var tt={from:re,to:se,text:a.text,removed:a.removed,origin:a.origin};We&&gr(t,"change",t,tt),Ue&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(tt)}t.display.selForContextMenu=null}function Va(t,a,j,M,K){var re;M||(M=j),kt(M,j)<0&&(re=[M,j],j=re[0],M=re[1]),typeof a=="string"&&(a=t.splitLines(a)),za(t,{from:j,to:M,text:a,origin:K})}function Ms(t,a,j,M){j1||!(this.children[0]instanceof po))){var pe=[];this.collapse(pe),this.children=[new po(pe)],this.children[0].parent=this}},collapse:function(t){for(var a=0;a50){for(var se=K.lines.length%25+25,pe=se;pe10);t.parent.maybeSpill()},iterN:function(t,a,j){for(var M=0;Mt.display.maxLineLength&&(t.display.maxLine=Te,t.display.maxLineLength=Ue,t.display.maxLineChanged=!0)}M!=null&&t&&this.collapsed&&tn(t,M,K+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&Os(t.doc)),t&&gr(t,"markerCleared",t,this,M,K),a&&ha(t),this.parent&&this.parent.clear()},Ta.prototype.find=function(t,a){t==null&&this.type=="bookmark"&&(t=1);for(var j,M,K=0;K0||se==0&&re.clearWhenEmpty!==!1)return re;if(re.replacedWith&&(re.collapsed=!0,re.widgetNode=F("span",[re.replacedWith],"CodeMirror-widget"),M.handleMouseEvents||re.widgetNode.setAttribute("cm-ignore-events","true"),M.insertLeft&&(re.widgetNode.insertLeft=!0)),re.collapsed){if(Mi(t,a.line,a,j,re)||a.line!=j.line&&Mi(t,j.line,a,j,re))throw new Error("Inserting collapsed marker partially overlapping an existing one");ur()}re.addToHistory&&_s(t,{from:a,to:j,origin:"markText"},t.sel,NaN);var pe=a.line,ve=t.cm,Te;if(t.iter(pe,j.line+1,function(We){ve&&re.collapsed&&!ve.options.lineWrapping&&Xn(We)==ve.display.maxLine&&(Te=!0),re.collapsed&&pe!=a.line&&yt(We,0),Fn(We,new Rr(re,pe==a.line?a.ch:null,pe==j.line?j.ch:null)),++pe}),re.collapsed&&t.iter(a.line,j.line+1,function(We){$n(t,We)&&yt(We,0)}),re.clearOnEnter&&Ie(re,"beforeCursorEnter",function(){return re.clear()}),re.readOnly&&(lr(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),re.collapsed&&(re.id=++Fs,re.atomic=!0),ve){if(Te&&(ve.curOp.updateMaxLine=!0),re.collapsed)tn(ve,a.line,j.line+1);else if(re.className||re.startStyle||re.endStyle||re.css||re.attributes||re.title)for(var Ue=a.line;Ue<=j.line;Ue++)xn(ve,Ue,"text");re.atomic&&Os(ve.doc),gr(ve,"markerAdded",ve,re)}return re}var vo=function(t,a){this.markers=t,this.primary=a;for(var j=0;j=0;ve--)za(this,M[ve]);pe?Ss(this,pe):this.cm&&ya(this.cm)}),undo:Nn(function(){Uo(this,"undo")}),redo:Nn(function(){Uo(this,"redo")}),undoSelection:Nn(function(){Uo(this,"undo",!0)}),redoSelection:Nn(function(){Uo(this,"redo",!0)}),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,a=0,j=0,M=0;M=t.ch)&&a.push(K.marker.parent||K.marker)}return a},findMarks:function(t,a,j){t=Pt(this,t),a=Pt(this,a);var M=[],K=t.line;return this.iter(t.line,a.line+1,function(re){var se=re.markedSpans;if(se)for(var pe=0;pe=ve.to||ve.from==null&&K!=t.line||ve.from!=null&&K==a.line&&ve.from>=a.ch)&&(!j||j(ve.marker))&&M.push(ve.marker.parent||ve.marker)}++K}),M},getAllMarks:function(){var t=[];return this.iter(function(a){var j=a.markedSpans;if(j)for(var M=0;Mt)return a=t,!0;t-=re,++j}),Pt(this,ut(j,a))},indexFromPos:function(t){t=Pt(this,t);var a=t.ch;if(t.linea&&(a=t.from),t.to!=null&&t.to-1){a.state.draggingText(t),setTimeout(function(){return a.display.input.focus()},20);return}try{var Ue=t.dataTransfer.getData("Text");if(Ue){var We;if(a.state.draggingText&&!a.state.draggingText.copy&&(We=a.listSelections()),jo(a.doc,Zi(j,j)),We)for(var tt=0;tt=0;pe--)Va(t.doc,"",M[pe].from,M[pe].to,"+delete");ya(t)})}function as(t,a,j){var M=we(t.text,a+j,j);return M<0||M>t.text.length?null:M}function os(t,a,j){var M=as(t,a.ch,j);return M==null?null:new ut(a.line,M,j<0?"after":"before")}function ss(t,a,j,M,K){if(t){a.doc.direction=="rtl"&&(K=-K);var re=qe(j,a.doc.direction);if(re){var se=K<0?W(re):re[0],pe=K<0==(se.level==1),ve=pe?"after":"before",Te;if(se.level>0||a.doc.direction=="rtl"){var Ue=Ke(a,j);Te=K<0?j.text.length-1:0;var We=Qe(a,Ue,Te).top;Te=Fe(function(tt){return Qe(a,Ue,tt).top==We},K<0==(se.level==1)?se.from:se.to-1,Te),ve=="before"&&(Te=as(j,Te,1))}else Te=K<0?se.to:se.from;return new ut(M,Te,ve)}}return new ut(M,K<0?j.text.length:0,K<0?"before":"after")}function Pl(t,a,j,M){var K=qe(a,t.doc.direction);if(!K)return os(a,j,M);j.ch>=a.text.length?(j.ch=a.text.length,j.sticky="before"):j.ch<=0&&(j.ch=0,j.sticky="after");var re=Ye(K,j.ch,j.sticky),se=K[re];if(t.doc.direction=="ltr"&&se.level%2==0&&(M>0?se.to>j.ch:se.from=se.from&&tt>=Ue.begin)){var et=We?"before":"after";return new ut(j.line,tt,et)}}var lt=function(At,Nt,Rt){for(var Wt=function(un,oi){return oi?new ut(j.line,pe(un,1),"before"):new ut(j.line,un,"after")};At>=0&&At0==(nr.level!=1),Tr=Zt?Rt.begin:pe(Rt.end,-1);if(nr.from<=Tr&&Tr0?Ue.end:pe(Ue.begin,-1);return bt!=null&&!(M>0&&bt==a.text.length)&&(ft=lt(M>0?0:K.length-1,M,Te(bt)),ft)?ft:null}var _o={selectAll:Is,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),_e)},killLine:function(t){return $a(t,function(a){if(a.empty()){var j=dt(t.doc,a.head.line).text.length;return a.head.ch==j&&a.head.line0)K=new ut(K.line,K.ch+1),t.replaceRange(re.charAt(K.ch-1)+re.charAt(K.ch-2),ut(K.line,K.ch-2),K,"+transpose");else if(K.line>t.doc.first){var se=dt(t.doc,K.line-1).text;se&&(K=new ut(K.line,1),t.replaceRange(re.charAt(0)+t.doc.lineSeparator()+se.charAt(se.length-1),ut(K.line-1,se.length-1),K,"+transpose"))}}j.push(new Kr(K,K))}t.setSelections(j)})},newlineAndIndent:function(t){return wi(t,function(){for(var a=t.listSelections(),j=a.length-1;j>=0;j--)t.replaceRange(t.doc.lineSeparator(),a[j].anchor,a[j].head,"+input");a=t.listSelections();for(var M=0;Mt&&kt(a,this.pos)==0&&j==this.button};var xo,wo;function Wl(t,a){var j=+new Date;return wo&&wo.compare(j,t,a)?(xo=wo=null,"triple"):xo&&xo.compare(j,t,a)?(wo=new us(j,t,a),xo=null,"double"):(xo=new us(j,t,a),wo=null,"single")}function tl(t){var a=this,j=a.display;if(ue(a,t)||j.activeTouch&&j.input.supportsTouch())return;if(j.input.ensurePolled(),j.shift=t.shiftKey,Bn(j,t)){e||(j.scroller.draggable=!1,setTimeout(function(){return j.scroller.draggable=!0},100));return}if(cs(a,t))return;var M=Qn(a,t),K=He(t),re=M?Wl(M,K):"single";if(window.focus(),K==1&&a.state.selectingText&&a.state.selectingText(t),M&&Gl(a,K,M,re,t))return;K==1?M?zl(a,M,re,t):Me(t)==j.scroller&&ge(t):K==2?(M&&No(a.doc,M),setTimeout(function(){return j.input.focus()},20)):K==3&&(D?a.display.input.onContextMenu(t):eo(a))}function Gl(t,a,j,M,K){var re="Click";return M=="double"?re="Double"+re:M=="triple"&&(re="Triple"+re),re=(a==1?"Left":a==2?"Middle":"Right")+re,Eo(t,zs(re,K),K,function(se){if(typeof se=="string"&&(se=_o[se]),!se)return!1;var pe=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),pe=se(t,j)!=be}finally{t.state.suppressEdits=!1}return pe})}function Kl(t,a,j){var M=t.getOption("configureMouse"),K=M?M(t,a,j):{};if(K.unit==null){var re=s?j.shiftKey&&j.metaKey:j.altKey;K.unit=re?"rectangle":a=="single"?"char":a=="double"?"word":"line"}return(K.extend==null||t.doc.extend)&&(K.extend=t.doc.extend||j.shiftKey),K.addNew==null&&(K.addNew=o?j.metaKey:j.ctrlKey),K.moveOnDrag==null&&(K.moveOnDrag=!(o?j.altKey:j.ctrlKey)),K}function zl(t,a,j,M){C?setTimeout(U(So,t),0):t.curOp.focus=X();var K=Kl(t,j,M),re=t.doc.sel,se;t.options.dragDrop&&nt&&!t.isReadOnly()&&j=="single"&&(se=re.contains(a))>-1&&(kt((se=re.ranges[se]).from(),a)<0||a.xRel>0)&&(kt(se.to(),a)>0||a.xRel<0)?Vl(t,M,a,K):Xl(t,M,a,K)}function Vl(t,a,j,M){var K=t.display,re=!1,se=Pn(t,function(Te){e&&(K.scroller.draggable=!1),t.state.draggingText=!1,rt(K.wrapper.ownerDocument,"mouseup",se),rt(K.wrapper.ownerDocument,"mousemove",pe),rt(K.scroller,"dragstart",ve),rt(K.scroller,"drop",se),re||(ge(Te),M.addNew||No(t.doc,j,null,null,M.extend),e&&!i||C&&_==9?setTimeout(function(){K.wrapper.ownerDocument.body.focus({preventScroll:!0}),K.input.focus()},20):K.input.focus())}),pe=function(Te){re=re||Math.abs(a.clientX-Te.clientX)+Math.abs(a.clientY-Te.clientY)>=10},ve=function(){return re=!0};e&&(K.scroller.draggable=!0),t.state.draggingText=se,se.copy=!M.moveOnDrag,K.scroller.dragDrop&&K.scroller.dragDrop(),Ie(K.wrapper.ownerDocument,"mouseup",se),Ie(K.wrapper.ownerDocument,"mousemove",pe),Ie(K.scroller,"dragstart",ve),Ie(K.scroller,"drop",se),eo(t),setTimeout(function(){return K.input.focus()},20)}function rl(t,a,j){if(j=="char")return new Kr(a,a);if(j=="word")return t.findWordAt(a);if(j=="line")return new Kr(ut(a.line,0),Pt(t.doc,ut(a.line+1,0)));var M=j(t,a);return new Kr(M.from,M.to)}function Xl(t,a,j,M){var K=t.display,re=t.doc;ge(a);var se,pe,ve=re.sel,Te=ve.ranges;if(M.addNew&&!M.extend?(pe=re.sel.contains(j),pe>-1?se=Te[pe]:se=new Kr(j,j)):(se=re.sel.primary(),pe=re.sel.primIndex),M.unit=="rectangle")M.addNew||(se=new Kr(j,j)),j=Qn(t,a,!0,!0),pe=-1;else{var Ue=rl(t,j,M.unit);M.extend?se=ns(se,Ue.anchor,Ue.head,M.extend):se=Ue}M.addNew?pe==-1?(pe=Te.length,bi(re,Gi(t,Te.concat([se]),pe),{scroll:!1,origin:"*mouse"})):Te.length>1&&Te[pe].empty()&&M.unit=="char"&&!M.extend?(bi(re,Gi(t,Te.slice(0,pe).concat(Te.slice(pe+1)),0),{scroll:!1,origin:"*mouse"}),ve=re.sel):is(re,pe,se,fe):(pe=0,bi(re,new Si([se],0),fe),ve=re.sel);var We=j;function tt(Rt){if(kt(We,Rt)==0)return;if(We=Rt,M.unit=="rectangle"){for(var Wt=[],nr=t.options.tabSize,Zt=G(dt(re,j.line).text,j.ch,nr),Tr=G(dt(re,Rt.line).text,Rt.ch,nr),un=Math.min(Zt,Tr),oi=Math.max(Zt,Tr),Cn=Math.min(j.line,Rt.line),Ni=Math.min(t.lastLine(),Math.max(j.line,Rt.line));Cn<=Ni;Cn++){var Ii=dt(re,Cn).text,Hn=Oe(Ii,un,nr);un==oi?Wt.push(new Kr(ut(Cn,Hn),ut(Cn,Hn))):Ii.length>Hn&&Wt.push(new Kr(ut(Cn,Hn),ut(Cn,Oe(Ii,oi,nr))))}Wt.length||Wt.push(new Kr(j,j)),bi(re,Gi(t,ve.ranges.slice(0,pe).concat(Wt),pe),{origin:"*mouse",scroll:!1}),t.scrollIntoView(Rt)}else{var Di=se,ci=rl(t,Rt,M.unit),ti=Di.anchor,Wn;kt(ci.anchor,ti)>0?(Wn=ci.head,ti=cn(Di.from(),ci.anchor)):(Wn=ci.anchor,ti=On(Di.to(),ci.head));var Ln=ve.ranges.slice(0);Ln[pe]=Yl(t,new Kr(Pt(re,ti),Wn)),bi(re,Gi(t,Ln,pe),fe)}}var et=K.wrapper.getBoundingClientRect(),lt=0;function ft(Rt){var Wt=++lt,nr=Qn(t,Rt,!0,M.unit=="rectangle");if(!nr)return;if(kt(nr,We)!=0){t.curOp.focus=X(),tt(nr);var Zt=Pa(K,re);(nr.line>=Zt.to||nr.lineet.bottom?20:0;Tr&&setTimeout(Pn(t,function(){if(lt!=Wt)return;K.scroller.scrollTop+=Tr,ft(Rt)}),50)}}function bt(Rt){t.state.selectingText=!1,lt=Infinity,Rt&&(ge(Rt),K.input.focus()),rt(K.wrapper.ownerDocument,"mousemove",At),rt(K.wrapper.ownerDocument,"mouseup",Nt),re.history.lastSelOrigin=null}var At=Pn(t,function(Rt){Rt.buttons===0||!He(Rt)?bt(Rt):ft(Rt)}),Nt=Pn(t,bt);t.state.selectingText=Nt,Ie(K.wrapper.ownerDocument,"mousemove",At),Ie(K.wrapper.ownerDocument,"mouseup",Nt)}function Yl(t,a){var j=a.anchor,M=a.head,K=dt(t.doc,j.line);if(kt(j,M)==0&&j.sticky==M.sticky)return a;var re=qe(K);if(!re)return a;var se=Ye(re,j.ch,j.sticky),pe=re[se];if(pe.from!=j.ch&&pe.to!=j.ch)return a;var ve=se+(pe.from==j.ch==(pe.level!=1)?0:1);if(ve==0||ve==re.length)return a;var Te;if(M.line!=j.line)Te=(M.line-j.line)*(t.doc.direction=="ltr"?1:-1)>0;else{var Ue=Ye(re,M.ch,M.sticky),We=Ue-se||(M.ch-j.ch)*(pe.level==1?-1:1);Ue==ve-1||Ue==ve?Te=We<0:Te=We>0}var tt=re[ve+(Te?-1:0)],et=Te==(tt.level==1),lt=et?tt.from:tt.to,ft=et?"after":"before";return j.ch==lt&&j.sticky==ft?a:new Kr(new ut(j.line,lt,ft),M)}function nl(t,a,j,M){var K,re;if(a.touches)K=a.touches[0].clientX,re=a.touches[0].clientY;else try{K=a.clientX,re=a.clientY}catch(tt){return!1}if(K>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;M&&ge(a);var se=t.display,pe=se.lineDiv.getBoundingClientRect();if(re>pe.bottom||!me(t,j))return Ae(a);re-=pe.top-se.viewOffset;for(var ve=0;ve=K){var Ue=Kt(t.doc,re),We=t.display.gutterSpecs[ve];return ye(t,j,t,Ue,We.className,a),Ae(a)}}}function cs(t,a){return nl(t,a,"gutterClick",!0)}function il(t,a){if(Bn(t.display,a)||$l(t,a))return;if(ue(t,a,"contextmenu"))return;D||t.display.input.onContextMenu(a)}function $l(t,a){return me(t,"gutterContextMenu")?nl(t,a,"gutterContextMenu",!1):!1}function al(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),fr(t)}var Ja={toString:function(){return"CodeMirror.Init"}},ol={},Go={};function Jl(t){var a=t.optionHandlers;function j(M,K,re,se){t.defaults[M]=K,re&&(a[M]=se?function(pe,ve,Te){Te!=Ja&&re(pe,ve,Te)}:re)}t.defineOption=j,t.Init=Ja,j("value","",function(M,K){return M.setValue(K)},!0),j("mode",null,function(M,K){M.doc.modeOption=K,pa(M)},!0),j("indentUnit",2,pa,!0),j("indentWithTabs",!1),j("smartIndent",!0),j("tabSize",4,function(M){co(M),fr(M),tn(M)},!0),j("lineSeparator",null,function(M,K){if(M.doc.lineSep=K,!K)return;var re=[],se=M.doc.first;M.doc.iter(function(ve){for(var Te=0;;){var Ue=ve.text.indexOf(K,Te);if(Ue==-1)break;Te=Ue+K.length,re.push(ut(se,Ue))}se++});for(var pe=re.length-1;pe>=0;pe--)Va(M.doc,K,re[pe],ut(re[pe].line,re[pe].ch+K.length))}),j("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(M,K,re){M.state.specialChars=new RegExp(K.source+(K.test(" ")?"":"| "),"g"),re!=Ja&&M.refresh()}),j("specialCharPlaceholder",Lr,function(M){return M.refresh()},!0),j("electricChars",!0),j("inputStyle",u?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),j("spellcheck",!1,function(M,K){return M.getInputField().spellcheck=K},!0),j("autocorrect",!1,function(M,K){return M.getInputField().autocorrect=K},!0),j("autocapitalize",!1,function(M,K){return M.getInputField().autocapitalize=K},!0),j("rtlMoveVisually",!E),j("wholeLineUpdateBefore",!0),j("theme","default",function(M){al(M),Qi(M)},!0),j("keyMap","default",function(M,K,re){var se=Ho(K),pe=re!=Ja&&Ho(re);pe&&pe.detach&&pe.detach(M,se),se.attach&&se.attach(M,pe||null)}),j("extraKeys",null),j("configureMouse",null),j("lineWrapping",!1,Zl,!0),j("gutters",[],function(M,K){M.display.gutterSpecs=Ti(K,M.options.lineNumbers),Qi(M)},!0),j("fixedGutter",!0,function(M,K){M.display.gutters.style.left=K?yi(M.display)+"px":"0",M.refresh()},!0),j("coverGutterNextToScrollbar",!1,function(M){return da(M)},!0),j("scrollbarStyle","native",function(M){Fa(M),da(M),M.display.scrollbars.setScrollTop(M.doc.scrollTop),M.display.scrollbars.setScrollLeft(M.doc.scrollLeft)},!0),j("lineNumbers",!1,function(M,K){M.display.gutterSpecs=Ti(M.options.gutters,K),Qi(M)},!0),j("firstLineNumber",1,Qi,!0),j("lineNumberFormatter",function(M){return M},Qi,!0),j("showCursorWhenSelecting",!1,Qr,!0),j("resetSelectionOnContextMenu",!0),j("lineWiseCopyCut",!0),j("pasteLinesPerSelection",!0),j("selectionsMayTouch",!1),j("readOnly",!1,function(M,K){K=="nocursor"&&(va(M),M.display.input.blur()),M.display.input.readOnlyChanged(K)}),j("screenReaderLabel",null,function(M,K){K=K===""?null:K,M.display.input.screenReaderLabelChanged(K)}),j("disableInput",!1,function(M,K){K||M.display.input.reset()},!0),j("dragDrop",!0,Ql),j("allowDropFileTypes",null),j("cursorBlinkRate",530),j("cursorScrollMargin",0),j("cursorHeight",1,Qr,!0),j("singleCursorHeightPerLine",!0,Qr,!0),j("workTime",100),j("workDelay",100),j("flattenSpans",!0,co,!0),j("addModeClass",!1,co,!0),j("pollInterval",100),j("undoDepth",200,function(M,K){return M.doc.history.undoDepth=K}),j("historyEventDelay",1250),j("viewportMargin",10,function(M){return M.refresh()},!0),j("maxHighlightLength",1e4,co,!0),j("moveInputWithCursor",!0,function(M,K){K||M.display.input.resetPosition()}),j("tabindex",null,function(M,K){return M.display.input.getField().tabIndex=K||""}),j("autofocus",null),j("direction","ltr",function(M,K){return M.doc.setDirection(K)},!0),j("phrases",null)}function Ql(t,a,j){var M=j&&j!=Ja;if(!a!=!M){var K=t.display.dragFunctions,re=a?Ie:rt;re(t.display.scroller,"dragstart",K.start),re(t.display.scroller,"dragenter",K.enter),re(t.display.scroller,"dragover",K.over),re(t.display.scroller,"dragleave",K.leave),re(t.display.scroller,"drop",K.drop)}}function Zl(t){t.options.lineWrapping?(z(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(y(t.display.wrapper,"CodeMirror-wrap"),Fi(t)),xi(t),tn(t),fr(t),setTimeout(function(){return da(t)},100)}function wn(t,a){var j=this;if(!(this instanceof wn))return new wn(t,a);this.options=a=a?L(a):{},L(ol,a,!1);var M=a.value;typeof M=="string"?M=new Ri(M,a.mode,null,a.lineSeparator,a.direction):a.mode&&(M.modeOption=a.mode),this.doc=M;var K=new wn.inputStyles[a.inputStyle](this),re=this.display=new Da(t,M,K,a);re.wrapper.CodeMirror=this,al(this),a.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Fa(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new ee,keySeq:null,specialChars:null},a.autofocus&&!u&&re.input.focus(),C&&_<11&&setTimeout(function(){return j.display.input.reset(!0)},20),ql(this),Il(),oa(this),this.curOp.forceUpdate=!0,vs(this,M),a.autofocus&&!u||this.hasFocus()?setTimeout(function(){j.hasFocus()&&!j.state.focused&&ia(j)},20):va(this);for(var se in Go)Go.hasOwnProperty(se)&&Go[se](this,a[se],Ja);qn(this),a.finishInit&&a.finishInit(this);for(var pe=0;pe20*20}Ie(a.scroller,"touchstart",function(ve){if(!ue(t,ve)&&!re(ve)&&!cs(t,ve)){a.input.ensurePolled(),clearTimeout(j);var Te=+new Date;a.activeTouch={start:Te,moved:!1,prev:Te-M.end<=300?M:null},ve.touches.length==1&&(a.activeTouch.left=ve.touches[0].pageX,a.activeTouch.top=ve.touches[0].pageY)}}),Ie(a.scroller,"touchmove",function(){a.activeTouch&&(a.activeTouch.moved=!0)}),Ie(a.scroller,"touchend",function(ve){var Te=a.activeTouch;if(Te&&!Bn(a,ve)&&Te.left!=null&&!Te.moved&&new Date-Te.start<300){var Ue=t.coordsChar(a.activeTouch,"page"),We;!Te.prev||se(Te,Te.prev)?We=new Kr(Ue,Ue):!Te.prev.prev||se(Te,Te.prev.prev)?We=t.findWordAt(Ue):We=new Kr(ut(Ue.line,0),Pt(t.doc,ut(Ue.line+1,0))),t.setSelection(We.anchor,We.head),t.focus(),ge(ve)}K()}),Ie(a.scroller,"touchcancel",K),Ie(a.scroller,"scroll",function(){a.scroller.clientHeight&&(_a(t,a.scroller.scrollTop),Hi(t,a.scroller.scrollLeft,!0),ye(t,"scroll",t))}),Ie(a.scroller,"mousewheel",function(ve){return lo(t,ve)}),Ie(a.scroller,"DOMMouseScroll",function(ve){return lo(t,ve)}),Ie(a.wrapper,"scroll",function(){return a.wrapper.scrollTop=a.wrapper.scrollLeft=0}),a.dragFunctions={enter:function(ve){ue(t,ve)||De(ve)},over:function(ve){ue(t,ve)||(Rl(t,ve),De(ve))},start:function(ve){return Al(t,ve)},drop:Pn(t,Ol),leave:function(ve){ue(t,ve)||Hs(t)}};var pe=a.input.getField();Ie(pe,"keyup",function(ve){return Zs.call(t,ve)}),Ie(pe,"keydown",Pn(t,Qs)),Ie(pe,"keypress",Pn(t,el)),Ie(pe,"focus",function(ve){return ia(t,ve)}),Ie(pe,"blur",function(ve){return va(t,ve)})}var ds=[];wn.defineInitHook=function(t){return ds.push(t)};function To(t,a,j,M){var K=t.doc,re;j==null&&(j="add"),j=="smart"&&(K.mode.indent?re=hn(t,a).state:j="prev");var se=t.options.tabSize,pe=dt(K,a),ve=G(pe.text,null,se);pe.stateAfter&&(pe.stateAfter=null);var Te=pe.text.match(/^\s*/)[0],Ue;if(!M&&!/\S/.test(pe.text))Ue=0,j="not";else if(j=="smart"&&(Ue=K.mode.indent(re,pe.text.slice(Te.length),pe.text),Ue==be||Ue>150)){if(!M)return;j="prev"}j=="prev"?a>K.first?Ue=G(dt(K,a-1).text,null,se):Ue=0:j=="add"?Ue=ve+t.options.indentUnit:j=="subtract"?Ue=ve-t.options.indentUnit:typeof j=="number"&&(Ue=ve+j),Ue=Math.max(0,Ue);var We="",tt=0;if(t.options.indentWithTabs)for(var et=Math.floor(Ue/se);et;--et)tt+=se,We+=" ";if(ttse,ve=pt(a),Te=null;if(pe&&M.ranges.length>1)if(ea&&ea.text.join(` `)==a){if(M.ranges.length%ea.text.length==0){Te=[];for(var Ue=0;Ue=0;tt--){var et=M.ranges[tt],lt=et.from(),ft=et.to();et.empty()&&(j&&j>0?lt=ut(lt.line,lt.ch-j):t.state.overwrite&&!pe?ft=ut(ft.line,Math.min(dt(re,ft.line).text.length,ft.ch+W(ve).length)):pe&&ea&&ea.lineWise&&ea.text.join(` `)==ve.join(` `)&&(lt=ft=ut(lt.line,0)));var bt={from:lt,to:ft,text:Te?Te[tt%Te.length]:ve,origin:K||(pe?"paste":t.state.cutIncoming>se?"cut":"+input")};za(t.doc,bt),gr(t,"inputRead",t,bt)}a&&!pe&&ll(t,a),ya(t),t.curOp.updateInput<2&&(t.curOp.updateInput=We),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function sl(t,a){var j=t.clipboardData&&t.clipboardData.getData("Text");if(j)return t.preventDefault(),!a.isReadOnly()&&!a.options.disableInput&&wi(a,function(){return hs(a,j,0,null,"paste")}),!0}function ll(t,a){if(!t.options.electricChars||!t.options.smartIndent)return;for(var j=t.doc.sel,M=j.ranges.length-1;M>=0;M--){var K=j.ranges[M];if(K.head.ch>100||M&&j.ranges[M-1].head.line==K.head.line)continue;var re=t.getModeAt(K.head),se=!1;if(re.electricChars){for(var pe=0;pe-1){se=To(t,K.head.line,"smart");break}}else re.electricInput&&(re.electricInput.test(dt(t.doc,K.head.line).text.slice(0,K.head.ch))&&(se=To(t,K.head.line,"smart")));se&&gr(t,"electricInput",t,K.head.line)}}function ul(t){for(var a=[],j=[],M=0;Mre&&(To(this,pe.head.line,M,!0),re=pe.head.line,se==this.doc.sel.primIndex&&ya(this));else{var ve=pe.from(),Te=pe.to(),Ue=Math.max(re,ve.line);re=Math.min(this.lastLine(),Te.line-(Te.ch?0:1))+1;for(var We=Ue;We0&&is(this.doc,se,new Kr(ve,tt[se].to()),_e)}}}),getTokenAt:function(M,K){return di(this,M,K)},getLineTokens:function(M,K){return di(this,ut(M),K,!0)},getTokenTypeAt:function(M){M=Pt(this.doc,M);var K=An(this,dt(this.doc,M.line)),re=0,se=(K.length-1)/2,pe=M.ch,ve;if(pe==0)ve=K[2];else for(;;){var Te=re+se>>1;if((Te?K[Te*2-1]:0)>=pe)se=Te;else if(K[Te*2+1]ve&&(M=ve,se=!0),pe=dt(this.doc,M)}else pe=M;return Pr(this,pe,{top:0,left:0},K||"page",re||se).top+(se?this.doc.height-ni(pe):0)},defaultTextHeight:function(){return Dn(this.display)},defaultCharWidth:function(){return Jn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(M,K,re,se,pe){var ve=this.display;M=Cr(this,Pt(this.doc,M));var Te=M.bottom,Ue=M.left;if(K.style.position="absolute",K.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(K),ve.sizer.appendChild(K),se=="over")Te=M.top;else if(se=="above"||se=="near"){var We=Math.max(ve.wrapper.clientHeight,this.doc.height),tt=Math.max(ve.sizer.clientWidth,ve.lineSpace.clientWidth);(se=="above"||M.bottom+K.offsetHeight>We)&&M.top>K.offsetHeight?Te=M.top-K.offsetHeight:M.bottom+K.offsetHeight<=We&&(Te=M.bottom),Ue+K.offsetWidth>tt&&(Ue=tt-K.offsetWidth)}K.style.top=Te+"px",K.style.left=K.style.right="",pe=="right"?(Ue=ve.sizer.clientWidth-K.offsetWidth,K.style.right="0px"):(pe=="left"?Ue=0:pe=="middle"&&(Ue=(ve.sizer.clientWidth-K.offsetWidth)/2),K.style.left=Ue+"px"),re&&Co(this,{left:Ue,top:Te,right:Ue+K.offsetWidth,bottom:Te+K.offsetHeight})},triggerOnKeyDown:ui(Qs),triggerOnKeyPress:ui(el),triggerOnKeyUp:Zs,triggerOnMouseDown:ui(tl),execCommand:function(M){if(_o.hasOwnProperty(M))return _o[M].call(null,this)},triggerElectric:ui(function(M){ll(this,M)}),findPosH:function(M,K,re,se){var pe=1;K<0&&(pe=-1,K=-K);for(var ve=Pt(this.doc,M),Te=0;Te0&&Ue(re.charAt(se-1));)--se;for(;pe.5||this.options.lineWrapping)&&xi(this),ye(this,"refresh",this)}),swapDoc:ui(function(M){var K=this.doc;return K.cm=null,this.state.selectingText&&this.state.selectingText(),vs(this,M),fr(this),this.display.input.reset(),ba(this,M.scrollLeft,M.scrollTop),this.curOp.forceScroll=!0,gr(this,"swapDoc",this,K),K}),phrase:function(M){var K=this.options.phrases;return K&&Object.prototype.hasOwnProperty.call(K,M)?K[M]:M},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ce(t),t.registerHelper=function(M,K,re){j.hasOwnProperty(M)||(j[M]=t[M]={_global:[]}),j[M][K]=re},t.registerGlobalHelper=function(M,K,re,se){t.registerHelper(M,K,se),j[M]._global.push({pred:re,val:se})}}function fs(t,a,j,M,K){var re=a,se=j,pe=dt(t,a.line),ve=K&&t.direction=="rtl"?-j:j;function Te(){var Nt=a.line+ve;return Nt=t.first+t.size?!1:(a=new ut(Nt,a.ch,a.sticky),pe=dt(t,Nt))}function Ue(Nt){var Rt;if(M=="codepoint"){var Wt=pe.text.charCodeAt(a.ch+(M>0?0:-1));isNaN(Wt)?Rt=null:Rt=new ut(a.line,Math.max(0,Math.min(pe.text.length,a.ch+j*(Wt>=55296&&Wt<56320?2:1))),-j)}else K?Rt=Pl(t.cm,pe,a,j):Rt=os(pe,a,j);if(Rt==null)if(!Nt&&Te())a=ss(K,t.cm,pe,a.line,ve);else return!1;else a=Rt;return!0}if(M=="char"||M=="codepoint")Ue();else if(M=="column")Ue(!0);else if(M=="word"||M=="group")for(var We=null,tt=M=="group",et=t.cm&&t.cm.getHelper(a,"wordChars"),lt=!0;!(j<0&&!Ue(!lt));lt=!1){var ft=pe.text.charAt(a.ch)||` `,bt=J(ft,et)?"w":tt&&ft==` `?"n":!tt||/\s/.test(ft)?null:"p";if(tt&&!lt&&!bt&&(bt="s"),We&&We!=bt){j<0&&(j=1,Ue(),a.sticky="after");break}if(bt&&(We=bt),j>0&&!Ue(!lt))break}var At=Fo(t,a,re,se,!0);return Hr(re,At)&&(At.hitSide=!0),At}function hl(t,a,j,M){var K=t.doc,re=a.left,se;if(M=="page"){var pe=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ve=Math.max(pe-.5*Dn(t.display),3);se=(j>0?a.bottom:a.top)+j*ve}else M=="line"&&(se=j>0?a.bottom+3:a.top-3);for(var Te;!(Te=Or(t,re,se),!Te.outside);){if(j<0?se<=0:se>=K.height){Te.hitSide=!0;break}se+=j*5}return Te}var rn=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ee,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};rn.prototype.init=function(t){var a=this,j=this,M=j.cm,K=j.div=t.lineDiv;cl(K,M.options.spellcheck,M.options.autocorrect,M.options.autocapitalize);function re(pe){for(var ve=pe.target;ve;ve=ve.parentNode){if(ve==K)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ve.className))break}return!1}Ie(K,"paste",function(pe){if(!re(pe)||ue(M,pe)||sl(pe,M))return;_<=11&&setTimeout(Pn(M,function(){return a.updateFromDOM()}),20)}),Ie(K,"compositionstart",function(pe){a.composing={data:pe.data,done:!1}}),Ie(K,"compositionupdate",function(pe){a.composing||(a.composing={data:pe.data,done:!1})}),Ie(K,"compositionend",function(pe){a.composing&&(pe.data!=a.composing.data&&a.readFromDOMSoon(),a.composing.done=!0)}),Ie(K,"touchstart",function(){return j.forceCompositionEnd()}),Ie(K,"input",function(){a.composing||a.readFromDOMSoon()});function se(pe){if(!re(pe)||ue(M,pe))return;if(M.somethingSelected())Ko({lineWise:!1,text:M.getSelections()}),pe.type=="cut"&&M.replaceSelection("",null,"cut");else if(M.options.lineWiseCopyCut){var ve=ul(M);Ko({lineWise:!0,text:ve.text}),pe.type=="cut"&&M.operation(function(){M.setSelections(ve.ranges,0,_e),M.replaceSelection("",null,"cut")})}else return;if(pe.clipboardData){pe.clipboardData.clearData();var Te=ea.text.join(` `);if(pe.clipboardData.setData("Text",Te),pe.clipboardData.getData("Text")==Te){pe.preventDefault();return}}var Ue=dl(),We=Ue.firstChild;M.display.lineSpace.insertBefore(Ue,M.display.lineSpace.firstChild),We.value=ea.text.join(` `);var tt=document.activeElement;B(We),setTimeout(function(){M.display.lineSpace.removeChild(Ue),tt.focus(),tt==K&&j.showPrimarySelection()},50)}Ie(K,"copy",se),Ie(K,"cut",se)},rn.prototype.screenReaderLabelChanged=function(t){t?this.div.setAttribute("aria-label",t):this.div.removeAttribute("aria-label")},rn.prototype.prepareSelection=function(){var t=Yi(this.cm,!1);return t.focus=document.activeElement==this.div,t},rn.prototype.showSelection=function(t,a){if(!t||!this.cm.display.view.length)return;(t.focus||a)&&this.showPrimarySelection(),this.showMultipleSelections(t)},rn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},rn.prototype.showPrimarySelection=function(){var t=this.getSelection(),a=this.cm,j=a.doc.sel.primary(),M=j.from(),K=j.to();if(a.display.viewTo==a.display.viewFrom||M.line>=a.display.viewTo||K.line=a.display.viewFrom&&fl(a,M)||{node:pe[0].measure.map[2],offset:0},Te=K.linet.firstLine()&&(M=ut(M.line-1,dt(t.doc,M.line-1).length)),K.ch==dt(t.doc,K.line).text.length&&K.linea.viewTo-1)return!1;var re,se,pe;M.line==a.viewFrom||(re=ln(t,M.line))==0?(se=xt(a.view[0].line),pe=a.view[0].node):(se=xt(a.view[re].line),pe=a.view[re-1].node.nextSibling);var ve=ln(t,K.line),Te,Ue;if(ve==a.view.length-1?(Te=a.viewTo-1,Ue=a.lineDiv.lastChild):(Te=xt(a.view[ve+1].line)-1,Ue=a.view[ve+1].node.previousSibling),!pe)return!1;for(var We=t.doc.splitLines(ru(t,pe,Ue,se,Te)),tt=Ht(t.doc,ut(se,0),ut(Te,dt(t.doc,Te).text.length));We.length>1&&tt.length>1;)if(W(We)==W(tt))We.pop(),tt.pop(),Te--;else if(We[0]==tt[0])We.shift(),tt.shift(),se++;else break;for(var et=0,lt=0,ft=We[0],bt=tt[0],At=Math.min(ft.length,bt.length);etM.ch&&Nt.charCodeAt(Nt.length-lt-1)==Rt.charCodeAt(Rt.length-lt-1);)et--,lt++;We[We.length-1]=Nt.slice(0,Nt.length-lt).replace(/^\u200b+/,""),We[0]=We[0].slice(et).replace(/\u200b+$/,"");var nr=ut(se,et),Zt=ut(Te,tt.length?W(tt).length-lt:0);if(We.length>1||We[0]||kt(nr,Zt))return Va(t.doc,We,nr,Zt,"+input"),!0},rn.prototype.ensurePolled=function(){this.forceCompositionEnd()},rn.prototype.reset=function(){this.forceCompositionEnd()},rn.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},rn.prototype.readFromDOMSoon=function(){var t=this;if(this.readDOMTimeout!=null)return;this.readDOMTimeout=setTimeout(function(){if(t.readDOMTimeout=null,t.composing)if(t.composing.done)t.composing=null;else return;t.updateFromDOM()},80)},rn.prototype.updateFromDOM=function(){var t=this;(this.cm.isReadOnly()||!this.pollContent())&&wi(this.cm,function(){return tn(t.cm)})},rn.prototype.setUneditable=function(t){t.contentEditable="false"},rn.prototype.onKeyPress=function(t){if(t.charCode==0||this.composing)return;t.preventDefault(),this.cm.isReadOnly()||Pn(this.cm,hs)(this.cm,String.fromCharCode(t.charCode==null?t.keyCode:t.charCode),0)},rn.prototype.readOnlyChanged=function(t){this.div.contentEditable=String(t!="nocursor")},rn.prototype.onContextMenu=function(){},rn.prototype.resetPosition=function(){},rn.prototype.needsContentAttribute=!0;function fl(t,a){var j=ze(t,a.line);if(!j||j.hidden)return null;var M=dt(t.doc,a.line),K=Se(j,M,a.line),re=qe(M,t.doc.direction),se="left";if(re){var pe=Ye(re,a.ch);se=pe%2?"right":"left"}var ve=vt(K.map,a.ch,se);return ve.offset=ve.collapse=="right"?ve.end:ve.start,ve}function tu(t){for(var a=t;a;a=a.parentNode)if(/CodeMirror-gutter-wrapper/.test(a.className))return!0;return!1}function Qa(t,a){return a&&(t.bad=!0),t}function ru(t,a,j,M,K){var re="",se=!1,pe=t.doc.lineSeparator(),ve=!1;function Te(et){return function(lt){return lt.id==et}}function Ue(){se&&(re+=pe,ve&&(re+=pe),se=ve=!1)}function We(et){et&&(Ue(),re+=et)}function tt(et){if(et.nodeType==1){var lt=et.getAttribute("cm-text");if(lt){We(lt);return}var ft=et.getAttribute("cm-marker"),bt;if(ft){var At=t.findMarks(ut(M,0),ut(K+1,0),Te(+ft));At.length&&(bt=At[0].find(0))&&We(Ht(t.doc,bt.from,bt.to).join(pe));return}if(et.getAttribute("contenteditable")=="false")return;var Nt=/^(pre|div|p|li|table|br)$/i.test(et.nodeName);if(!/^br$/i.test(et.nodeName)&&et.textContent.length==0)return;Nt&&Ue();for(var Rt=0;Rt=9&&a.hasSelection&&(a.hasSelection=null),j.poll()}),Ie(K,"paste",function(se){if(ue(M,se)||sl(se,M))return;M.state.pasteIncoming=+new Date,j.fastPoll()});function re(se){if(ue(M,se))return;if(M.somethingSelected())Ko({lineWise:!1,text:M.getSelections()});else if(M.options.lineWiseCopyCut){var pe=ul(M);Ko({lineWise:!0,text:pe.text}),se.type=="cut"?M.setSelections(pe.ranges,null,_e):(j.prevInput="",K.value=pe.text.join(` `),B(K))}else return;se.type=="cut"&&(M.state.cutIncoming=+new Date)}Ie(K,"cut",re),Ie(K,"copy",re),Ie(t.scroller,"paste",function(se){if(Bn(t,se)||ue(M,se))return;if(!K.dispatchEvent){M.state.pasteIncoming=+new Date,j.focus();return}var pe=new Event("paste");pe.clipboardData=se.clipboardData,K.dispatchEvent(pe)}),Ie(t.lineSpace,"selectstart",function(se){Bn(t,se)||ge(se)}),Ie(K,"compositionstart",function(){var se=M.getCursor("from");j.composing&&j.composing.range.clear(),j.composing={start:se,range:M.markText(se,M.getCursor("to"),{className:"CodeMirror-composing"})}}),Ie(K,"compositionend",function(){j.composing&&(j.poll(),j.composing.range.clear(),j.composing=null)})},jn.prototype.createField=function(t){this.wrapper=dl(),this.textarea=this.wrapper.firstChild},jn.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},jn.prototype.prepareSelection=function(){var t=this.cm,a=t.display,j=t.doc,M=Yi(t);if(t.options.moveInputWithCursor){var K=Cr(t,j.sel.primary().head,"div"),re=a.wrapper.getBoundingClientRect(),se=a.lineDiv.getBoundingClientRect();M.teTop=Math.max(0,Math.min(a.wrapper.clientHeight-10,K.top+se.top-re.top)),M.teLeft=Math.max(0,Math.min(a.wrapper.clientWidth-10,K.left+se.left-re.left))}return M},jn.prototype.showSelection=function(t){var a=this.cm,j=a.display;w(j.cursorDiv,t.cursors),w(j.selectionDiv,t.selection),t.teTop!=null&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},jn.prototype.reset=function(t){if(this.contextMenuPending||this.composing)return;var a=this.cm;if(a.somethingSelected()){this.prevInput="";var j=a.getSelection();this.textarea.value=j,a.state.focused&&B(this.textarea),C&&_>=9&&(this.hasSelection=j)}else t||(this.prevInput=this.textarea.value="",C&&_>=9&&(this.hasSelection=null))},jn.prototype.getField=function(){return this.textarea},jn.prototype.supportsTouch=function(){return!1},jn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!u||X()!=this.textarea))try{this.textarea.focus()}catch(t){}},jn.prototype.blur=function(){this.textarea.blur()},jn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},jn.prototype.receivedFocus=function(){this.slowPoll()},jn.prototype.slowPoll=function(){var t=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},jn.prototype.fastPoll=function(){var t=!1,a=this;a.pollingFast=!0;function j(){var M=a.poll();!M&&!t?(t=!0,a.polling.set(60,j)):(a.pollingFast=!1,a.slowPoll())}a.polling.set(20,j)},jn.prototype.poll=function(){var t=this,a=this.cm,j=this.textarea,M=this.prevInput;if(this.contextMenuPending||!a.state.focused||ht(j)&&!M&&!this.composing||a.isReadOnly()||a.options.disableInput||a.state.keySeq)return!1;var K=j.value;if(K==M&&!a.somethingSelected())return!1;if(C&&_>=9&&this.hasSelection===K||o&&/[\uf700-\uf7ff]/.test(K))return a.display.input.reset(),!1;if(a.doc.sel==a.display.selForContextMenu){var re=K.charCodeAt(0);if(re==8203&&!M&&(M="\u200B"),re==8666)return this.reset(),this.cm.execCommand("undo")}for(var se=0,pe=Math.min(M.length,K.length);se1e3||K.indexOf(` `)>-1?j.value=t.prevInput="":t.prevInput=K,t.composing&&(t.composing.range.clear(),t.composing.range=a.markText(t.composing.start,a.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},jn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},jn.prototype.onKeyPress=function(){C&&_>=9&&(this.hasSelection=null),this.fastPoll()},jn.prototype.onContextMenu=function(t){var a=this,j=a.cm,M=j.display,K=a.textarea;a.contextMenuPending&&a.contextMenuPending();var re=Qn(j,t),se=M.scroller.scrollTop;if(!re||c)return;var pe=j.options.resetSelectionOnContextMenu;pe&&j.doc.sel.contains(re)==-1&&Pn(j,bi)(j.doc,Zi(re),_e);var ve=K.style.cssText,Te=a.wrapper.style.cssText,Ue=a.wrapper.offsetParent.getBoundingClientRect();a.wrapper.style.cssText="position: static",K.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(t.clientY-Ue.top-5)+"px; left: "+(t.clientX-Ue.left-5)+`px; z-index: 1000; background: `+(C?"rgba(255, 255, 255, .05)":"transparent")+`; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var We;e&&(We=window.scrollY),M.input.focus(),e&&window.scrollTo(null,We),M.input.reset(),j.somethingSelected()||(K.value=a.prevInput=" "),a.contextMenuPending=et,M.selForContextMenu=j.doc.sel,clearTimeout(M.detectingSelectAll);function tt(){if(K.selectionStart!=null){var ft=j.somethingSelected(),bt="\u200B"+(ft?K.value:"");K.value="\u21DA",K.value=bt,a.prevInput=ft?"":"\u200B",K.selectionStart=1,K.selectionEnd=bt.length,M.selForContextMenu=j.doc.sel}}function et(){if(a.contextMenuPending!=et)return;if(a.contextMenuPending=!1,a.wrapper.style.cssText=Te,K.style.cssText=ve,C&&_<9&&M.scrollbars.setScrollTop(M.scroller.scrollTop=se),K.selectionStart!=null){(!C||C&&_<9)&&tt();var ft=0,bt=function(){M.selForContextMenu==j.doc.sel&&K.selectionStart==0&&K.selectionEnd>0&&a.prevInput=="\u200B"?Pn(j,Is)(j):ft++<10?M.detectingSelectAll=setTimeout(bt,500):(M.selForContextMenu=null,M.input.reset())};M.detectingSelectAll=setTimeout(bt,200)}}if(C&&_>=9&&tt(),D){De(t);var lt=function(){rt(window,"mouseup",lt),setTimeout(et,20)};Ie(window,"mouseup",lt)}else setTimeout(et,50)},jn.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled=t=="nocursor",this.textarea.readOnly=!!t},jn.prototype.setUneditable=function(){},jn.prototype.needsContentAttribute=!1;function iu(t,a){if(a=a?L(a):{},a.value=t.value,!a.tabindex&&t.tabIndex&&(a.tabindex=t.tabIndex),!a.placeholder&&t.placeholder&&(a.placeholder=t.placeholder),a.autofocus==null){var j=X();a.autofocus=j==t||t.getAttribute("autofocus")!=null&&j==document.body}function M(){t.value=pe.getValue()}var K;if(t.form&&(Ie(t.form,"submit",M),!a.leaveSubmitMethodAlone)){var re=t.form;K=re.submit;try{var se=re.submit=function(){M(),re.submit=K,re.submit(),re.submit=se}}catch(ve){}}a.finishInit=function(ve){ve.save=M,ve.getTextArea=function(){return t},ve.toTextArea=function(){ve.toTextArea=isNaN,M(),t.parentNode.removeChild(ve.getWrapperElement()),t.style.display="",t.form&&(rt(t.form,"submit",M),!a.leaveSubmitMethodAlone&&typeof t.form.submit=="function"&&(t.form.submit=K))}},t.style.display="none";var pe=wn(function(ve){return t.parentNode.insertBefore(ve,t.nextSibling)},a);return pe}function au(t){t.off=rt,t.on=Ie,t.wheelEventPixels=so,t.Doc=Ri,t.splitLines=pt,t.countColumn=G,t.findColumn=Oe,t.isWordChar=ne,t.Pass=be,t.signal=ye,t.Line=ii,t.changeEnd=qi,t.scrollbarModel=io,t.Pos=ut,t.cmpPos=kt,t.modes=$t,t.mimeModes=Mt,t.resolveMode=Dt,t.getMode=St,t.modeExtensions=_t,t.extendMode=Et,t.copyState=Bt,t.startState=mt,t.innerMode=Dr,t.commands=_o,t.keyMap=ma,t.keyName=Vs,t.isModifierKey=Ks,t.lookupKey=Ya,t.normalizeKeyMap=Ml,t.StringStream=Ct,t.SharedTextMarker=vo,t.TextMarker=Ta,t.LineWidget=go,t.e_preventDefault=ge,t.e_stopPropagation=Ee,t.e_stop=De,t.addClass=z,t.contains=A,t.rmClass=y,t.keyNames=Sa}Jl(wn),eu(wn);var ou="iter insert remove copy getEditor constructor".split(" ");for(var Vo in Ri.prototype)Ri.prototype.hasOwnProperty(Vo)&&oe(ou,Vo)<0&&(wn.prototype[Vo]=function(t){return function(){return t.apply(this.doc,arguments)}}(Ri.prototype[Vo]));return Ce(Ri),wn.inputStyles={textarea:jn,contenteditable:rn},wn.defineMode=function(t){!wn.defaults.mode&&t!="null"&&(wn.defaults.mode=t),wt.apply(this,arguments)},wn.defineMIME=Jt,wn.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),wn.defineMIME("text/plain","null"),wn.defineExtension=function(t,a){wn.prototype[t]=a},wn.defineDocExtension=function(t,a){Ri.prototype[t]=a},wn.fromTextArea=iu,au(wn),wn.version="5.58.2",wn})},WYAk:function(H,Z,I){(function(N,g){H.exports=Z=g(I("Ib8C"))})(this,function(N){(function(){var g=N,S=g.lib,k=S.Base,v=g.enc,m=v.Utf8,C=g.algo,_=C.HMAC=k.extend({init:function(e,h){e=this._hasher=new e.init,typeof h=="string"&&(h=m.parse(h));var r=e.blockSize,c=r*4;h.sigBytes>c&&(h=e.finalize(h)),h.clamp();for(var i=this._oKey=h.clone(),n=this._iKey=h.clone(),l=i.words,f=n.words,d=0;d1&&arguments[1]!==void 0?arguments[1]:!1,Re=_e.getAttribute("id")||_e.getAttribute("data-reactid")||_e.getAttribute("name");if(fe&&X[Re])return X[Re];var Oe=window.getComputedStyle(_e),de=Oe.getPropertyValue("box-sizing")||Oe.getPropertyValue("-moz-box-sizing")||Oe.getPropertyValue("-webkit-box-sizing"),te=parseFloat(Oe.getPropertyValue("padding-bottom"))+parseFloat(Oe.getPropertyValue("padding-top")),W=parseFloat(Oe.getPropertyValue("border-bottom-width"))+parseFloat(Oe.getPropertyValue("border-top-width")),Y=A.map(function(Q){return"".concat(Q,":").concat(Oe.getPropertyValue(Q))}).join(";"),V={sizingStyle:Y,paddingSize:te,borderSize:W,boxSizing:de};return fe&&Re&&(X[Re]=V),V}function B(_e){var fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Re=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Oe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;z||(z=document.createElement("textarea"),z.setAttribute("tab-index","-1"),z.setAttribute("aria-hidden","true"),document.body.appendChild(z)),_e.getAttribute("wrap")?z.setAttribute("wrap",_e.getAttribute("wrap")):z.removeAttribute("wrap");var de=O(_e,fe),te=de.paddingSize,W=de.borderSize,Y=de.boxSizing,V=de.sizingStyle;z.setAttribute("style","".concat(V,";").concat(P)),z.value=_e.value||_e.placeholder||"";var Q=Number.MIN_SAFE_INTEGER,q=Number.MAX_SAFE_INTEGER,ie=z.scrollHeight,ne;if(Y==="border-box"?ie+=W:Y==="content-box"&&(ie-=te),Re!==null||Oe!==null){z.value=" ";var J=z.scrollHeight-te;Re!==null&&(Q=J*Re,Y==="border-box"&&(Q=Q+te+W),ie=Math.max(Q,ie)),Oe!==null&&(q=J*Oe,Y==="border-box"&&(q=q+te+W),ne=ie>q?"":"hidden",ie=Math.min(q,ie))}return{height:ie,minHeight:Q,maxHeight:q,overflowY:ne,resize:"none"}}var U=I("Gytx"),L=I.n(U),G;(function(_e){_e[_e.NONE=0]="NONE",_e[_e.RESIZING=1]="RESIZING",_e[_e.RESIZED=2]="RESIZED"})(G||(G={}));var ee=function(_e){Object(k.a)(Re,_e);var fe=Object(v.a)(Re);function Re(Oe){var de;return Object(g.a)(this,Re),de=fe.call(this,Oe),de.nextFrameActionId=void 0,de.resizeFrameId=void 0,de.textArea=void 0,de.saveTextArea=function(te){de.textArea=te},de.handleResize=function(te){var W=de.state.resizeStatus,Y=de.props,V=Y.autoSize,Q=Y.onResize;if(W!==G.NONE)return;typeof Q=="function"&&Q(te),V&&de.resizeOnNextFrame()},de.resizeOnNextFrame=function(){cancelAnimationFrame(de.nextFrameActionId),de.nextFrameActionId=requestAnimationFrame(de.resizeTextarea)},de.resizeTextarea=function(){var te=de.props.autoSize;if(!te||!de.textArea)return;var W=te.minRows,Y=te.maxRows,V=B(de.textArea,!1,W,Y);de.setState({textareaStyles:V,resizeStatus:G.RESIZING},function(){cancelAnimationFrame(de.resizeFrameId),de.resizeFrameId=requestAnimationFrame(function(){de.setState({resizeStatus:G.RESIZED},function(){de.resizeFrameId=requestAnimationFrame(function(){de.setState({resizeStatus:G.NONE}),de.fixFirefoxAutoScroll()})})})})},de.renderTextArea=function(){var te=de.props,W=te.prefixCls,Y=W===void 0?"rc-textarea":W,V=te.autoSize,Q=te.onResize,q=te.className,ie=te.disabled,ne=de.state,J=ne.textareaStyles,$=ne.resizeStatus,le=Object(w.a)(de.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),ce=F()(Y,q,Object(_.a)({},"".concat(Y,"-disabled"),ie));"value"in le&&(le.value=le.value||"");var we=Object(C.a)(Object(C.a)(Object(C.a)({},de.props.style),J),$===G.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return m.createElement(x,{onResize:de.handleResize,disabled:!(V||Q)},m.createElement("textarea",Object(N.a)({},le,{className:ce,style:we,ref:de.saveTextArea})))},de.state={textareaStyles:{},resizeStatus:G.NONE},de}return Object(S.a)(Re,[{key:"componentDidUpdate",value:function(de){(de.value!==this.props.value||!L()(de.autoSize,this.props.autoSize))&&this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var de=this.textArea.selectionStart,te=this.textArea.selectionEnd;this.textArea.setSelectionRange(de,te)}}catch(W){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Re}(m.Component),oe=ee,ae=function(_e){Object(k.a)(Re,_e);var fe=Object(v.a)(Re);function Re(Oe){var de;Object(g.a)(this,Re),de=fe.call(this,Oe),de.resizableTextArea=void 0,de.focus=function(){de.resizableTextArea.textArea.focus()},de.saveTextArea=function(W){de.resizableTextArea=W},de.handleChange=function(W){var Y=de.props.onChange;de.setValue(W.target.value,function(){de.resizableTextArea.resizeTextarea()}),Y&&Y(W)},de.handleKeyDown=function(W){var Y=de.props,V=Y.onPressEnter,Q=Y.onKeyDown;W.keyCode===13&&V&&V(W),Q&&Q(W)};var te=typeof Oe.value=="undefined"||Oe.value===null?Oe.defaultValue:Oe.value;return de.state={value:te},de}return Object(S.a)(Re,[{key:"setValue",value:function(de,te){"value"in this.props||this.setState({value:de},te)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return m.createElement(oe,Object(N.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(de){return"value"in de?{value:de.value}:null}}]),Re}(m.Component),be=Z.default=ae},ZD9Y:function(H,Z,I){"use strict";var N=I("BoS7"),g=I("Sdc0"),S=I("OaEy"),k=I("2fM7"),v=I("q1tI"),m=I.n(v),C=I("lOMy"),_=I.n(C),e=k.a.Option;Z.a=function(h){var r=h.onFontSizeChange,c=h.cmFontSize,i=h.cmCodeMode,n=h.onCodeModeChange,l=h.onTabToSpace,f=h.className,d=f===void 0?"":f,u=h.tabToSpace,o=h.children;return m.a.createElement("div",{className:"tpi-code-setting ".concat(d)},m.a.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),m.a.createElement("section",null,m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),m.a.createElement(k.a,{bordered:!1,size:"small",value:i,onChange:n},m.a.createElement(e,{value:"vs"},"\u767D\u8272\u80CC\u666F"),m.a.createElement(e,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),m.a.createElement(k.a,{bordered:!1,size:"small",value:c,onChange:r},m.a.createElement(e,{value:12},"12px"),m.a.createElement(e,{value:14},"14px"),m.a.createElement(e,{value:16},"16px"),m.a.createElement(e,{value:18},"18px"),m.a.createElement(e,{value:20},"20px"),m.a.createElement(e,{value:22},"22px"))),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"Tab\u8F6C\u6362"),m.a.createElement(g.a,{checked:u,onChange:l}))),m.a.createElement("h3",null,"\u5FEB\u6377\u952E"),m.a.createElement("section",null,m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),m.a.createElement("span",null,"Ctrl + S")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),m.a.createElement("span",null,"F1 / Alt + F1")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),m.a.createElement("span",null,"Ctrl + ]/[")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),m.a.createElement("span",null,"Ctrl + Shift + \\")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),m.a.createElement("span",null,"Home")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),m.a.createElement("span",null,"End"))),o)}},ZW9T:function(H,Z,I){"use strict";I.d(Z,"a",function(){return U});var N=I("k1fw"),g=I("oBTY"),S=I("miYZ"),k=I("tsqr"),v=I("rAM+"),m=I("tJVT"),C=I("PpiC"),_=I("q1tI"),e=I.n(_),h=I("bdgK"),r=I("9og8"),c=I("WmNS"),i=I.n(c),n={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},l={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(` `)},{label:"System.out.println",content:["System.out.println($0)"].join(` `)},{label:"System.out.print",content:["System.out.print($0)"].join(` `)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},f={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(` `)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(` `)},{label:"if",content:["if () {"," $0","}"].join(` `)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(` `)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(` `)},{label:"using namespace std;",content:["using namespace std;"].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)}]},d={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(` `)}]},u=I("5VLF"),o=I.n(u),s={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},E=function(G,ee){return ee.map(function(oe){return{label:oe,kind:G.languages.CompletionItemKind.Keyword,insertText:oe}})},b=function(G){return Object.keys(s.tables).map(function(ee){return{label:ee,kind:G.languages.CompletionItemKind.Variable,insertText:ee}})},p=function(G,ee){var oe=s.tables[G];return oe?oe.map(function(ae){return{label:ae,kind:ee.languages.CompletionItemKind.Field,insertText:ae}}):[]};function D(L,G,ee,oe,ae){var be=G.getWordUntilPosition(ee),_e={startLineNumber:ee.lineNumber,endLineNumber:ee.lineNumber,startColumn:be.startColumn,endColumn:be.endColumn},fe=oe.map(function(Re){return{label:Re,kind:L.languages.CompletionItemKind.Keyword,insertText:Re,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:_e}});return ae.map(function(Re){fe.push(Object(N.a)(Object(N.a)({},Re),{},{range:_e}))}),fe}var R=function(L){s.languages.map(function(ae){return L.languages.registerDocumentFormattingEditProvider(ae,{provideDocumentFormattingEdits:function(_e,fe,Re){return Object(r.a)(i.a.mark(function Oe(){var de;return i.a.wrap(function(W){for(;;)switch(W.prev=W.next){case 0:return de=o()(_e.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1}),W.abrupt("return",[{range:_e.getFullModelRange(),text:de}]);case 2:case"end":return W.stop()}},Oe)}))()}}),ae});var G=f.quickKey.map(function(ae){return{label:ae.label,kind:L.languages.CompletionItemKind.Method,insertText:ae.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),ee=d.quickKey.map(function(ae){return{label:ae.label,kind:L.languages.CompletionItemKind.Method,insertText:ae.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),oe=l.quickKey.map(function(ae){return{label:ae.label,kind:L.languages.CompletionItemKind.Method,insertText:ae.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet}});L.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(be,_e){var fe=be.getWordUntilPosition(_e),Re={startLineNumber:_e.lineNumber,endLineNumber:_e.lineNumber,startColumn:fe.startColumn,endColumn:fe.endColumn},Oe=be.getLineContent(_e.lineNumber).substring(fe.startColumn-2,fe.endColumn);return{suggestions:[].concat(Object(g.a)(f.keywords.map(function(de){return{label:de,kind:L.languages.CompletionItemKind.Function,documentation:de,insertText:de,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})),Object(g.a)(f.quickKey.map(function(de){return{label:de.label,kind:L.languages.CompletionItemKind.Function,documentation:de.content,insertText:Oe.startsWith("#")?de.content.replace(/#/,""):de.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})))}}}),L.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(be,_e){var fe=be.getWordUntilPosition(_e),Re={startLineNumber:_e.lineNumber,endLineNumber:_e.lineNumber,startColumn:fe.startColumn,endColumn:fe.endColumn};return{suggestions:Object(g.a)(n.keywords.map(function(Oe){return{label:Oe,kind:L.languages.CompletionItemKind.Function,documentation:Oe,insertText:Oe,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}}))}}}),L.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(be,_e){var fe=be.getWordUntilPosition(_e),Re={startLineNumber:_e.lineNumber,endLineNumber:_e.lineNumber,startColumn:fe.startColumn,endColumn:fe.endColumn},Oe=be.getLineContent(_e.lineNumber).substring(fe.startColumn-2,fe.endColumn);return{suggestions:[].concat(Object(g.a)(l.keywords.map(function(de){return{label:de,kind:L.languages.CompletionItemKind.Function,documentation:de,insertText:de,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})),Object(g.a)(l.quickKey.map(function(de){return{label:de.label,kind:L.languages.CompletionItemKind.Function,documentation:de.content,insertText:Oe.startsWith("#")?de.content.replace(/#/,""):de.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})))}}}),L.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(be,_e){var fe=be.getWordUntilPosition(_e),Re={startLineNumber:_e.lineNumber,endLineNumber:_e.lineNumber,startColumn:fe.startColumn,endColumn:fe.endColumn},Oe=be.getLineContent(_e.lineNumber).substring(fe.startColumn-2,fe.endColumn);return{suggestions:[].concat(Object(g.a)(d.keywords.map(function(de){return{label:de,kind:L.languages.CompletionItemKind.Function,documentation:de,insertText:de,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})),Object(g.a)(d.quickKey.map(function(de){return{label:de.label,kind:L.languages.CompletionItemKind.Function,documentation:de.content,insertText:Oe.startsWith("#")?de.content.replace(/#/,""):de.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})))}}})},y="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",x=I("fjLI"),w=I("LvDl"),T=I("+ua5");function F(L){return/^\d+$/.test(L)?"".concat(L,"px"):L}function P(){}var A=!1,X={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function z(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],G=L;if(Array.isArray(L)){for(var ee=0;ee0||mt.target.offsetWidth>0)&&ue.current.instance.layout()}}catch(Ct){Bt.e(Ct)}finally{Bt.f()}}),_t.observe(ye.current)),_t}function nt(){k.b.warn(decodeURIComponent(y))}var at=function(){var Et=ue.current.instance;if(be!=null&&Et&&De){var Bt=Et.getModel();Bt&&be!==Bt.getValue()&&(A=!0,Bt.setValue(be),Et.layout(),A=!1)}};Object(_.useEffect)(function(){me.current&&clearTimeout(me.current),me.current=setTimeout(function(){at()},500)},[be,De,ue.current]),Object(_.useEffect)(function(){if(Pe&&ue.current&&ue.current.instance){var _t=ue.current.instance;_t.changeViewZones(function(Bt){var Dr=document.createElement("div");Dr.style.padding="10px 20px",Dr.style.width="calc(100% - 20px)",Dr.className="my-error-line-wrp",Dr.innerHTML=Je,Bt.addZone({afterLineNumber:Pe||11,heightInLines:3,domNode:Dr})});var Et={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};_t.addOverlayWidget(Et),_t.revealPositionInCenter({lineNumber:20,column:1})}},[Pe,ue.current,De]);function it(){var _t=ue.current.instance;if(_t){var Et=_t.getSelection(),Bt=ue.current.pastePos||{},Dr=new O.Range(Bt.startLineNumber||Et.endLineNumber,Bt.startColumn||Et.endColumn,Bt.endLineNumber||Et.endLineNumber,Bt.endColumn||Et.endColumn);setTimeout(function(){_t.executeEdits("",[{range:Dr,text:""}])},300)}}function st(_t){(window.navigator.platform.match("Mac")?_t.metaKey:_t.ctrlKey)&&_t.keyCode==83&&(_t.preventDefault(),ie())}var Tt=function(){if(J&&ue.current.instance){var Et=ue.current.instance.getContentHeight();Dt(Et0||Fe.target.offsetWidth>0)&&J.layout()}}catch(Xe){ce.e(Xe)}finally{ce.f()}}),$.observe(de.current)),$}Object(_.useEffect)(function(){de.current&&Promise.all([I.e(18),I.e(29)]).then(I.t.bind(null,"M/lh",7)).then(function(J){O=J;var $=O.editor.createDiffEditor(de.current,Object(N.a)(Object(N.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},Oe),{},{wordWrap:!0}));V($);var le=Q($);return function(){$.dispose();var ce=$.getModel();ce&&ce.dispose(),le.unobserve(de.current)}})},[]),Object(_.useEffect)(function(){Y&&Y.setModel({original:O.editor.createModel(be,fe),modified:O.editor.createModel(_e,fe)})},[be,_e,fe,Y]);var q=F(ee),ie=F(ae),ne={width:q,height:ie};return e.a.createElement("div",{className:"my-diff-editor",ref:de,style:ne})}},Zss7:function(H,Z,I){var N;(function(g){var S=/^\s+/,k=/\s+$/,v=0,m=g.round,C=g.min,_=g.max,e=g.random;function h(W,Y){if(W=W||"",Y=Y||{},W instanceof h)return W;if(!(this instanceof h))return new h(W,Y);var V=r(W);this._originalInput=W,this._r=V.r,this._g=V.g,this._b=V.b,this._a=V.a,this._roundA=m(100*this._a)/100,this._format=Y.format||V.format,this._gradientType=Y.gradientType,this._r<1&&(this._r=m(this._r)),this._g<1&&(this._g=m(this._g)),this._b<1&&(this._b=m(this._b)),this._ok=V.ok,this._tc_id=v++}h.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var W=this.toRgb();return(W.r*299+W.g*587+W.b*114)/1e3},getLuminance:function(){var W=this.toRgb(),Y,V,Q,q,ie,ne;return Y=W.r/255,V=W.g/255,Q=W.b/255,Y<=.03928?q=Y/12.92:q=g.pow((Y+.055)/1.055,2.4),V<=.03928?ie=V/12.92:ie=g.pow((V+.055)/1.055,2.4),Q<=.03928?ne=Q/12.92:ne=g.pow((Q+.055)/1.055,2.4),.2126*q+.7152*ie+.0722*ne},setAlpha:function(W){return this._a=B(W),this._roundA=m(100*this._a)/100,this},toHsv:function(){var W=l(this._r,this._g,this._b);return{h:W.h*360,s:W.s,v:W.v,a:this._a}},toHsvString:function(){var W=l(this._r,this._g,this._b),Y=m(W.h*360),V=m(W.s*100),Q=m(W.v*100);return this._a==1?"hsv("+Y+", "+V+"%, "+Q+"%)":"hsva("+Y+", "+V+"%, "+Q+"%, "+this._roundA+")"},toHsl:function(){var W=i(this._r,this._g,this._b);return{h:W.h*360,s:W.s,l:W.l,a:this._a}},toHslString:function(){var W=i(this._r,this._g,this._b),Y=m(W.h*360),V=m(W.s*100),Q=m(W.l*100);return this._a==1?"hsl("+Y+", "+V+"%, "+Q+"%)":"hsla("+Y+", "+V+"%, "+Q+"%, "+this._roundA+")"},toHex:function(W){return d(this._r,this._g,this._b,W)},toHexString:function(W){return"#"+this.toHex(W)},toHex8:function(W){return u(this._r,this._g,this._b,this._a,W)},toHex8String:function(W){return"#"+this.toHex8(W)},toRgb:function(){return{r:m(this._r),g:m(this._g),b:m(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+m(this._r)+", "+m(this._g)+", "+m(this._b)+")":"rgba("+m(this._r)+", "+m(this._g)+", "+m(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:m(U(this._r,255)*100)+"%",g:m(U(this._g,255)*100)+"%",b:m(U(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+m(U(this._r,255)*100)+"%, "+m(U(this._g,255)*100)+"%, "+m(U(this._b,255)*100)+"%)":"rgba("+m(U(this._r,255)*100)+"%, "+m(U(this._g,255)*100)+"%, "+m(U(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:z[d(this._r,this._g,this._b,!0)]||!1},toFilter:function(W){var Y="#"+o(this._r,this._g,this._b,this._a),V=Y,Q=this._gradientType?"GradientType = 1, ":"";if(W){var q=h(W);V="#"+o(q._r,q._g,q._b,q._a)}return"progid:DXImageTransform.Microsoft.gradient("+Q+"startColorstr="+Y+",endColorstr="+V+")"},toString:function(W){var Y=!!W;W=W||this._format;var V=!1,Q=this._a<1&&this._a>=0,q=!Y&&Q&&(W==="hex"||W==="hex6"||W==="hex3"||W==="hex4"||W==="hex8"||W==="name");return q?W==="name"&&this._a===0?this.toName():this.toRgbString():(W==="rgb"&&(V=this.toRgbString()),W==="prgb"&&(V=this.toPercentageRgbString()),(W==="hex"||W==="hex6")&&(V=this.toHexString()),W==="hex3"&&(V=this.toHexString(!0)),W==="hex4"&&(V=this.toHex8String(!0)),W==="hex8"&&(V=this.toHex8String()),W==="name"&&(V=this.toName()),W==="hsl"&&(V=this.toHslString()),W==="hsv"&&(V=this.toHsvString()),V||this.toHexString())},clone:function(){return h(this.toString())},_applyModification:function(W,Y){var V=W.apply(null,[this].concat([].slice.call(Y)));return this._r=V._r,this._g=V._g,this._b=V._b,this.setAlpha(V._a),this},lighten:function(){return this._applyModification(p,arguments)},brighten:function(){return this._applyModification(D,arguments)},darken:function(){return this._applyModification(R,arguments)},desaturate:function(){return this._applyModification(s,arguments)},saturate:function(){return this._applyModification(E,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(y,arguments)},_applyCombination:function(W,Y){return W.apply(null,[this].concat([].slice.call(Y)))},analogous:function(){return this._applyCombination(P,arguments)},complement:function(){return this._applyCombination(x,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(F,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(T,arguments)}},h.fromRatio=function(W,Y){if(typeof W=="object"){var V={};for(var Q in W)W.hasOwnProperty(Q)&&(Q==="a"?V[Q]=W[Q]:V[Q]=be(W[Q]));W=V}return h(W,Y)};function r(W){var Y={r:0,g:0,b:0},V=1,Q=null,q=null,ie=null,ne=!1,J=!1;return typeof W=="string"&&(W=de(W)),typeof W=="object"&&(Oe(W.r)&&Oe(W.g)&&Oe(W.b)?(Y=c(W.r,W.g,W.b),ne=!0,J=String(W.r).substr(-1)==="%"?"prgb":"rgb"):Oe(W.h)&&Oe(W.s)&&Oe(W.v)?(Q=be(W.s),q=be(W.v),Y=f(W.h,Q,q),ne=!0,J="hsv"):Oe(W.h)&&Oe(W.s)&&Oe(W.l)&&(Q=be(W.s),ie=be(W.l),Y=n(W.h,Q,ie),ne=!0,J="hsl"),W.hasOwnProperty("a")&&(V=W.a)),V=B(V),{ok:ne,format:W.format||J,r:C(255,_(Y.r,0)),g:C(255,_(Y.g,0)),b:C(255,_(Y.b,0)),a:V}}function c(W,Y,V){return{r:U(W,255)*255,g:U(Y,255)*255,b:U(V,255)*255}}function i(W,Y,V){W=U(W,255),Y=U(Y,255),V=U(V,255);var Q=_(W,Y,V),q=C(W,Y,V),ie,ne,J=(Q+q)/2;if(Q==q)ie=ne=0;else{var $=Q-q;ne=J>.5?$/(2-Q-q):$/(Q+q);switch(Q){case W:ie=(Y-V)/$+(Y1&&(we-=1),we<1/6?le+(ce-le)*6*we:we<1/2?ce:we<2/3?le+(ce-le)*(2/3-we)*6:le}if(Y===0)Q=q=ie=V;else{var J=V<.5?V*(1+Y):V+Y-V*Y,$=2*V-J;Q=ne($,J,W+1/3),q=ne($,J,W),ie=ne($,J,W-1/3)}return{r:Q*255,g:q*255,b:ie*255}}function l(W,Y,V){W=U(W,255),Y=U(Y,255),V=U(V,255);var Q=_(W,Y,V),q=C(W,Y,V),ie,ne,J=Q,$=Q-q;if(ne=Q===0?0:$/Q,Q==q)ie=0;else{switch(Q){case W:ie=(Y-V)/$+(Y>1)+720)%360;--Y;)Q.h=(Q.h+q)%360,ie.push(h(Q));return ie}function A(W,Y){Y=Y||6;for(var V=h(W).toHsv(),Q=V.h,q=V.s,ie=V.v,ne=[],J=1/Y;Y--;)ne.push(h({h:Q,s:q,v:ie})),ie=(ie+J)%1;return ne}h.mix=function(W,Y,V){V=V===0?0:V||50;var Q=h(W).toRgb(),q=h(Y).toRgb(),ie=V/100,ne={r:(q.r-Q.r)*ie+Q.r,g:(q.g-Q.g)*ie+Q.g,b:(q.b-Q.b)*ie+Q.b,a:(q.a-Q.a)*ie+Q.a};return h(ne)},h.readability=function(W,Y){var V=h(W),Q=h(Y);return(g.max(V.getLuminance(),Q.getLuminance())+.05)/(g.min(V.getLuminance(),Q.getLuminance())+.05)},h.isReadable=function(W,Y,V){var Q=h.readability(W,Y),q,ie;ie=!1,q=te(V);switch(q.level+q.size){case"AAsmall":case"AAAlarge":ie=Q>=4.5;break;case"AAlarge":ie=Q>=3;break;case"AAAsmall":ie=Q>=7;break}return ie},h.mostReadable=function(W,Y,V){var Q=null,q=0,ie,ne,J,$;V=V||{},ne=V.includeFallbackColors,J=V.level,$=V.size;for(var le=0;leq&&(q=ie,Q=h(Y[le]));return h.isReadable(W,Q,{level:J,size:$})||!ne?Q:(V.includeFallbackColors=!1,h.mostReadable(W,["#fff","#000"],V))};var X=h.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},z=h.hexNames=O(X);function O(W){var Y={};for(var V in W)W.hasOwnProperty(V)&&(Y[W[V]]=V);return Y}function B(W){return W=parseFloat(W),(isNaN(W)||W<0||W>1)&&(W=1),W}function U(W,Y){ee(W)&&(W="100%");var V=oe(W);return W=C(Y,_(0,parseFloat(W))),V&&(W=parseInt(W*Y,10)/100),g.abs(W-Y)<1e-6?1:W%Y/parseFloat(Y)}function L(W){return C(1,_(0,W))}function G(W){return parseInt(W,16)}function ee(W){return typeof W=="string"&&W.indexOf(".")!=-1&&parseFloat(W)===1}function oe(W){return typeof W=="string"&&W.indexOf("%")!=-1}function ae(W){return W.length==1?"0"+W:""+W}function be(W){return W<=1&&(W=W*100+"%"),W}function _e(W){return g.round(parseFloat(W)*255).toString(16)}function fe(W){return G(W)/255}var Re=function(){var W="[-\\+]?\\d+%?",Y="[-\\+]?\\d*\\.\\d+%?",V="(?:"+Y+")|(?:"+W+")",Q="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",q="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?";return{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+Q),rgba:new RegExp("rgba"+q),hsl:new RegExp("hsl"+Q),hsla:new RegExp("hsla"+q),hsv:new RegExp("hsv"+Q),hsva:new RegExp("hsva"+q),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Oe(W){return!!Re.CSS_UNIT.exec(W)}function de(W){W=W.replace(S,"").replace(k,"").toLowerCase();var Y=!1;if(X[W])W=X[W],Y=!0;else if(W=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var V;return(V=Re.rgb.exec(W))?{r:V[1],g:V[2],b:V[3]}:(V=Re.rgba.exec(W))?{r:V[1],g:V[2],b:V[3],a:V[4]}:(V=Re.hsl.exec(W))?{h:V[1],s:V[2],l:V[3]}:(V=Re.hsla.exec(W))?{h:V[1],s:V[2],l:V[3],a:V[4]}:(V=Re.hsv.exec(W))?{h:V[1],s:V[2],v:V[3]}:(V=Re.hsva.exec(W))?{h:V[1],s:V[2],v:V[3],a:V[4]}:(V=Re.hex8.exec(W))?{r:G(V[1]),g:G(V[2]),b:G(V[3]),a:fe(V[4]),format:Y?"name":"hex8"}:(V=Re.hex6.exec(W))?{r:G(V[1]),g:G(V[2]),b:G(V[3]),format:Y?"name":"hex"}:(V=Re.hex4.exec(W))?{r:G(V[1]+""+V[1]),g:G(V[2]+""+V[2]),b:G(V[3]+""+V[3]),a:fe(V[4]+""+V[4]),format:Y?"name":"hex8"}:(V=Re.hex3.exec(W))?{r:G(V[1]+""+V[1]),g:G(V[2]+""+V[2]),b:G(V[3]+""+V[3]),format:Y?"name":"hex"}:!1}function te(W){var Y,V;return W=W||{level:"AA",size:"small"},Y=(W.level||"AA").toUpperCase(),V=(W.size||"small").toLowerCase(),Y!=="AA"&&Y!=="AAA"&&(Y="AA"),V!=="small"&&V!=="large"&&(V="small"),{level:Y,size:V}}H.exports?H.exports=h:!(N=function(){return h}.call(Z,I,Z,H),N!==void 0&&(H.exports=N))})(Math)},bCnd:function(H,Z,I){"use strict";I.d(Z,"b",function(){return k}),I.d(Z,"a",function(){return v});var N=I("je13"),g=I.n(N),S=!1;function k(m,C){var _=g.a.get("__ec");_||(_={}),_[m]=C,g.a.set("__ec",_)}function v(m,C){var _=g.a.get("__ec");return _?_[m]===void 0?C:_[m]:C}},bQjk:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("OLod"))})(this,function(N){return function(g){var S=N,k=S.lib,v=k.CipherParams,m=S.enc,C=m.Hex,_=S.format,e=_.Hex={stringify:function(h){return h.ciphertext.toString(C)},parse:function(h){var r=C.parse(h);return v.create({ciphertext:r})}}}(),N.format.Hex})},bT9E:function(H,Z,I){"use strict";I.d(Z,"a",function(){return g});var N=I("VTBJ");function g(S,k){var v=Object(N.a)({},S);return Array.isArray(k)&&k.forEach(function(m){delete v[m]}),v}},biw7:function(H,Z,I){"use strict";var N=I("q1tI"),g=I.n(N),S=N.createContext(null);Z.a=S},c5Ni:function(H,Z,I){},cDPC:function(H,Z,I){"use strict";var N=I("tJVT"),g=I("q1tI"),S=I.n(g),k=I("i3hx"),v=I.n(k);Z.a=function(m){var C=m.defaultX,_=C===void 0?"40%":C,e=m.leftChild,h=m.rightChild,r=m.className,c=m.hideResize,i=c===void 0?!1:c,n=Object(g.useState)(_),l=Object(N.a)(n,2),f=l[0],d=l[1],u=Object(g.useRef)();function o(){u.current=!0}Object(g.useEffect)(function(){function b(D){u.current&&d(D.pageX)}function p(){u.current=!1}return window.addEventListener("mousemove",b),window.addEventListener("mouseup",p),function(){window.removeEventListener("mousemove",b),window.removeEventListener("mouseup",p)}},[]);var s=typeof f=="number"&&f!==.01?"".concat(f,"px"):_,E="calc(100% - ".concat(i?"0px":"4px"," - ").concat(s,")");return S.a.createElement("div",{className:"split-panel-container ".concat(r)},S.a.createElement("section",{style:{width:s,display:f===.01?"none":""}},e),S.a.createElement("section",{className:"resize-x-bar",onMouseDown:o},S.a.createElement("a",{className:"btn-resize"},S.a.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},S.a.createElement("path",{d:"M12.245 7.53H5.647v1.882h6.598v2.823L16 8.471l-3.755-3.765V7.53zM10.353 4.706H3.755v2.823L0 3.765 3.755 0v2.824h6.598v1.882z"})))),S.a.createElement("section",{style:{width:E}},h))}},cv67:function(H,Z,I){(function(N,g){H.exports=Z=g(I("Ib8C"))})(this,function(N){return function(g){var S=N,k=S.lib,v=k.WordArray,m=k.Hasher,C=S.algo,_=[];(function(){for(var n=0;n<64;n++)_[n]=g.abs(g.sin(n+1))*4294967296|0})();var e=C.MD5=m.extend({_doReset:function(){this._hash=new v.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(n,l){for(var f=0;f<16;f++){var d=l+f,u=n[d];n[d]=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360}var o=this._hash.words,s=n[l+0],E=n[l+1],b=n[l+2],p=n[l+3],D=n[l+4],R=n[l+5],y=n[l+6],x=n[l+7],w=n[l+8],T=n[l+9],F=n[l+10],P=n[l+11],A=n[l+12],X=n[l+13],z=n[l+14],O=n[l+15],B=o[0],U=o[1],L=o[2],G=o[3];B=h(B,U,L,G,s,7,_[0]),G=h(G,B,U,L,E,12,_[1]),L=h(L,G,B,U,b,17,_[2]),U=h(U,L,G,B,p,22,_[3]),B=h(B,U,L,G,D,7,_[4]),G=h(G,B,U,L,R,12,_[5]),L=h(L,G,B,U,y,17,_[6]),U=h(U,L,G,B,x,22,_[7]),B=h(B,U,L,G,w,7,_[8]),G=h(G,B,U,L,T,12,_[9]),L=h(L,G,B,U,F,17,_[10]),U=h(U,L,G,B,P,22,_[11]),B=h(B,U,L,G,A,7,_[12]),G=h(G,B,U,L,X,12,_[13]),L=h(L,G,B,U,z,17,_[14]),U=h(U,L,G,B,O,22,_[15]),B=r(B,U,L,G,E,5,_[16]),G=r(G,B,U,L,y,9,_[17]),L=r(L,G,B,U,P,14,_[18]),U=r(U,L,G,B,s,20,_[19]),B=r(B,U,L,G,R,5,_[20]),G=r(G,B,U,L,F,9,_[21]),L=r(L,G,B,U,O,14,_[22]),U=r(U,L,G,B,D,20,_[23]),B=r(B,U,L,G,T,5,_[24]),G=r(G,B,U,L,z,9,_[25]),L=r(L,G,B,U,p,14,_[26]),U=r(U,L,G,B,w,20,_[27]),B=r(B,U,L,G,X,5,_[28]),G=r(G,B,U,L,b,9,_[29]),L=r(L,G,B,U,x,14,_[30]),U=r(U,L,G,B,A,20,_[31]),B=c(B,U,L,G,R,4,_[32]),G=c(G,B,U,L,w,11,_[33]),L=c(L,G,B,U,P,16,_[34]),U=c(U,L,G,B,z,23,_[35]),B=c(B,U,L,G,E,4,_[36]),G=c(G,B,U,L,D,11,_[37]),L=c(L,G,B,U,x,16,_[38]),U=c(U,L,G,B,F,23,_[39]),B=c(B,U,L,G,X,4,_[40]),G=c(G,B,U,L,s,11,_[41]),L=c(L,G,B,U,p,16,_[42]),U=c(U,L,G,B,y,23,_[43]),B=c(B,U,L,G,T,4,_[44]),G=c(G,B,U,L,A,11,_[45]),L=c(L,G,B,U,O,16,_[46]),U=c(U,L,G,B,b,23,_[47]),B=i(B,U,L,G,s,6,_[48]),G=i(G,B,U,L,x,10,_[49]),L=i(L,G,B,U,z,15,_[50]),U=i(U,L,G,B,R,21,_[51]),B=i(B,U,L,G,A,6,_[52]),G=i(G,B,U,L,p,10,_[53]),L=i(L,G,B,U,F,15,_[54]),U=i(U,L,G,B,E,21,_[55]),B=i(B,U,L,G,w,6,_[56]),G=i(G,B,U,L,O,10,_[57]),L=i(L,G,B,U,y,15,_[58]),U=i(U,L,G,B,X,21,_[59]),B=i(B,U,L,G,D,6,_[60]),G=i(G,B,U,L,P,10,_[61]),L=i(L,G,B,U,b,15,_[62]),U=i(U,L,G,B,T,21,_[63]),o[0]=o[0]+B|0,o[1]=o[1]+U|0,o[2]=o[2]+L|0,o[3]=o[3]+G|0},_doFinalize:function(){var n=this._data,l=n.words,f=this._nDataBytes*8,d=n.sigBytes*8;l[d>>>5]|=128<<24-d%32;var u=g.floor(f/4294967296),o=f;l[(d+64>>>9<<4)+15]=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,l[(d+64>>>9<<4)+14]=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360,n.sigBytes=(l.length+1)*4,this._process();for(var s=this._hash,E=s.words,b=0;b<4;b++){var p=E[b];E[b]=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360}return s},clone:function(){var n=m.clone.call(this);return n._hash=this._hash.clone(),n}});function h(n,l,f,d,u,o,s){var E=n+(l&f|~l&d)+u+s;return(E<>>32-o)+l}function r(n,l,f,d,u,o,s){var E=n+(l&d|f&~d)+u+s;return(E<>>32-o)+l}function c(n,l,f,d,u,o,s){var E=n+(l^f^d)+u+s;return(E<>>32-o)+l}function i(n,l,f,d,u,o,s){var E=n+(f^(l|~d))+u+s;return(E<>>32-o)+l}S.MD5=m._createHelper(e),S.HmacMD5=m._createHmacHelper(e)}(Math),N.MD5})},dejd:function(H,Z,I){},dmUQ:function(H,Z,I){"use strict";var N=I("Ff2n"),g=I("rePB"),S=I("1OyB"),k=I("vuIU"),v=I("Ji7U"),m=I("md7G"),C=I("foSv"),_=I("q1tI"),e=I.n(_),h=I("TSYQ"),r=I.n(h),c=I("4IlW");function i(w,T){var F=Object.keys(w);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(w);T&&(P=P.filter(function(A){return Object.getOwnPropertyDescriptor(w,A).enumerable})),F.push.apply(F,P)}return F}function n(w){for(var T=1;T1?oe-1:0),be=1;be1?U-1:0),G=1;G=0)return parseInt(B.slice(B.indexOf("e-")+2),10);var U=0;return B.indexOf(".")>=0&&(U=B.length-B.indexOf(".")-1),U},A.getInputDisplayValue=function(O){var B=O||A.state,U=B.focused,L=B.inputValue,G=B.value,ee;U?ee=L:ee=A.toPrecisionAsStep(G),ee==null&&(ee="");var oe=A.formatWrapper(ee);return p(A.props.decimalSeparator)&&(oe=oe.toString().replace(".",A.props.decimalSeparator)),oe},A.recordCursorPosition=function(){try{A.cursorStart=A.input.selectionStart,A.cursorEnd=A.input.selectionEnd,A.currentValue=A.input.value,A.cursorBefore=A.input.value.substring(0,A.cursorStart),A.cursorAfter=A.input.value.substring(A.cursorEnd)}catch(O){}},A.restoreByAfter=function(O){if(O===void 0)return!1;var B=A.input.value,U=B.lastIndexOf(O);if(U===-1)return!1;var L=A.cursorBefore.length;return A.lastKeyCode===c.a.DELETE&&A.cursorBefore.charAt(L-1)===O[0]?(A.fixCaret(L,L),!0):U+O.length===B.length?(A.fixCaret(U,U),!0):!1},A.partRestoreByAfter=function(O){return O===void 0?!1:Array.prototype.some.call(O,function(B,U){var L=O.substring(U);return A.restoreByAfter(L)})},A.isNotCompleteNumber=function(O){return isNaN(O)||O===""||O===null||O&&O.toString().indexOf(".")===O.toString().length-1},A.stop=function(){A.autoStepTimer&&clearTimeout(A.autoStepTimer)},A.down=function(O,B,U){A.pressingUpOrDown=!0,A.step("down",O,B,U)},A.up=function(O,B,U){A.pressingUpOrDown=!0,A.step("up",O,B,U)},A.saveInput=function(O){A.input=O};var X=P.value;X===void 0&&(X=P.defaultValue),A.state={focused:P.autoFocus};var z=A.getValidValue(A.toNumber(X));return A.state=n(n({},A.state),{},{inputValue:A.toPrecisionAsStep(z),value:z}),A}return Object(k.a)(F,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(A){var X=this.props,z=X.value,O=X.onChange,B=X.max,U=X.min,L=this.state.focused;if(A){if(!D(A.value,z)||!D(A.max,B)||!D(A.min,U)){var G=L?z:this.getValidValue(z),ee;this.pressingUpOrDown?ee=G:this.inputting?ee=this.rawInput:ee=this.toPrecisionAsStep(G),this.setState({value:G,inputValue:ee})}var oe="value"in this.props?z:this.state.value;"max"in this.props&&A.max!==B&&typeof oe=="number"&&oe>B&&O&&O(B),"min"in this.props&&A.min!==U&&typeof oe=="number"&&oe1&&arguments[1]!==void 0?arguments[1]:this.props.min,z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,O=parseFloat(A);return isNaN(O)?A:(Oz&&(O=z),O)}},{key:"setValue",value:function(A,X){var z=this.props.precision,O=this.isNotCompleteNumber(parseFloat(A))?null:parseFloat(A),B=this.state.value,U=B===void 0?null:B,L=this.state.inputValue,G=L===void 0?null:L,ee=typeof O=="number"?O.toFixed(z):"".concat(O),oe=O!==U||ee!=="".concat(G);return"value"in this.props?(G=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:G},X)):this.setState({value:O,inputValue:this.toPrecisionAsStep(A)},X),oe&&this.props.onChange(O),O}},{key:"getMaxPrecision",value:function(A){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,z=this.props,O=z.precision,B=z.step;if(p(O))return O;var U=this.getPrecision(X),L=this.getPrecision(B),G=this.getPrecision(A);return A?Math.max(G,U+L):U+L}},{key:"getPrecisionFactor",value:function(A){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,z=this.getMaxPrecision(A,X);return Math.pow(10,z)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(A){return this.props.formatter?this.props.formatter(A):A}},{key:"toPrecisionAsStep",value:function(A){if(this.isNotCompleteNumber(A)||A==="")return A;var X=Math.abs(this.getMaxPrecision(A));return isNaN(X)?A.toString():Number(A).toFixed(X)}},{key:"toNumber",value:function(A){var X=this.props.precision,z=this.state.focused,O=A&&A.length>16&&z;return this.isNotCompleteNumber(A)||O?A:p(X)?Math.round(A*Math.pow(10,X))/Math.pow(10,X):Number(A)}},{key:"upStep",value:function(A,X){var z=this.props.step,O=this.getPrecisionFactor(A,X),B=Math.abs(this.getMaxPrecision(A,X)),U=((O*A+O*z*X)/O).toFixed(B);return this.toNumber(U)}},{key:"downStep",value:function(A,X){var z=this.props.step,O=this.getPrecisionFactor(A,X),B=Math.abs(this.getMaxPrecision(A,X)),U=((O*A-O*z*X)/O).toFixed(B);return this.toNumber(U)}},{key:"step",value:function(A,X){var z=this,O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,B=arguments.length>3?arguments[3]:void 0;this.stop(),X&&(X.persist(),X.preventDefault());var U=this.props;if(U.disabled)return;var L=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(L))return;var G=this["".concat(A,"Step")](L,O),ee=G>U.max||GU.max?G=U.max:G=ae),ue=(Ze||Ze===0)&&(isNaN(Ze)||Number(Ze)<=be),he=ye||O||B,me=ue||O||B,Ce=r()("".concat(z,"-handler"),"".concat(z,"-handler-up"),Object(g.a)({},"".concat(z,"-handler-up-disabled"),he)),ge=r()("".concat(z,"-handler"),"".concat(z,"-handler-down"),Object(g.a)({},"".concat(z,"-handler-down-disabled"),me)),Ee=U?{onTouchStart:he?d:this.up,onTouchEnd:this.stop}:{onMouseDown:he?d:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Ae=U?{onTouchStart:me?d:this.down,onTouchEnd:this.stop}:{onMouseDown:me?d:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return e.a.createElement("div",{className:Pe,style:_e,title:fe,onMouseEnter:Re,onMouseLeave:Oe,onMouseOver:de,onMouseOut:te,onFocus:function(){return null},onBlur:function(){return null}},e.a.createElement("div",{className:"".concat(z,"-handler-wrap")},e.a.createElement("span",Object.assign({unselectable:"on"},Ee,{role:"button","aria-label":"Increase Value","aria-disabled":he,className:Ce}),G||e.a.createElement("span",{unselectable:"on",className:"".concat(z,"-handler-up-inner"),onClick:u})),e.a.createElement("span",Object.assign({unselectable:"on"},Ae,{role:"button","aria-label":"Decrease Value","aria-disabled":me,className:ge}),ee||e.a.createElement("span",{unselectable:"on",className:"".concat(z,"-handler-down-inner"),onClick:u}))),e.a.createElement("div",{className:"".concat(z,"-input-wrap")},e.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":be,"aria-valuemax":ae,"aria-valuenow":Ze,required:W,type:Q,placeholder:q,onPaste:Fe,onClick:Y,onMouseUp:this.onMouseUp,className:"".concat(z,"-input"),tabIndex:V,autoComplete:L,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Je?this.onKeyDown:d,onKeyUp:Je?this.onKeyUp:d,autoFocus:ce,maxLength:le,readOnly:B,disabled:O,max:ae,min:be,step:$,name:we,title:fe,id:ie,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(rt),pattern:J,inputMode:ne,onInput:Xe},Ie))))}}]),F}(e.a.Component);R.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:b,min:-b,step:1,style:{},onChange:d,onKeyDown:d,onPressEnter:d,onFocus:d,onBlur:d,parser:o,required:!1,autoComplete:"off"};var y=R,x=Z.a=y},e7zE:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("3y9D"),I("WYAk"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.Base,v=S.WordArray,m=g.algo,C=m.SHA1,_=m.HMAC,e=m.PBKDF2=k.extend({cfg:k.extend({keySize:128/32,hasher:C,iterations:1}),init:function(h){this.cfg=this.cfg.extend(h)},compute:function(h,r){for(var c=this.cfg,i=_.create(c.hasher,h),n=v.create(),l=v.create([1]),f=n.words,d=l.words,u=c.keySize,o=c.iterations;f.length=ae&&G<0||U.scrollTop<=0&&G>0))||oe&&(!de||de&&(U.scrollLeft>=be&&L<0||U.scrollLeft<=0&&L>0))?O(B,U.parentNode,L,G):!1};function R(O){var B=y();return function(){var L=Object(m.a)(O),G;if(B){var ee=Object(m.a)(this).constructor;G=Reflect.construct(L,arguments,ee)}else G=L.apply(this,arguments);return Object(v.a)(this,G)}}function y(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(O){return!1}}var x={},w=function(O){Object(k.a)(U,O);var B=R(U);function U(L){var G;return Object(g.a)(this,U),G=B.call(this,L),G.domFocus=function(){G.dom&&G.dom.focus()},G.removeStartHandler=function(ee){if(ee.touches.length>1)return;G.startPos={x:ee.touches[0].clientX,y:ee.touches[0].clientY}},G.removeMoveHandler=function(ee){if(ee.changedTouches.length>1)return;var oe=ee.currentTarget,ae=ee.changedTouches[0].clientX-G.startPos.x,be=ee.changedTouches[0].clientY-G.startPos.y;(oe===G.maskDom||oe===G.handlerDom||oe===G.contentDom&&D(oe,ee.target,ae,be))&&ee.cancelable&&ee.preventDefault()},G.transitionEnd=function(ee){var oe=ee.target;s(oe,u,G.transitionEnd),oe.style.transition=""},G.onKeyDown=function(ee){if(ee.keyCode===n.a.ESC){var oe=G.props.onClose;ee.stopPropagation(),oe&&oe(ee)}},G.onWrapperTransitionEnd=function(ee){var oe=G.props,ae=oe.open,be=oe.afterVisibleChange;ee.target===G.contentWrapper&&ee.propertyName.match(/transform$/)&&(G.dom.style.transition="",!ae&&G.getCurrentDrawerSome()&&(document.body.style.overflowX="",G.maskDom&&(G.maskDom.style.left="",G.maskDom.style.width="")),be&&be(!!ae))},G.openLevelTransition=function(){var ee=G.props,oe=ee.open,ae=ee.width,be=ee.height,_e=G.getHorizontalBoolAndPlacementName(),fe=_e.isHorizontal,Re=_e.placementName,Oe=G.contentDom?G.contentDom.getBoundingClientRect()[fe?"width":"height"]:0,de=(fe?ae:be)||Oe;G.setLevelAndScrolling(oe,Re,de)},G.setLevelTransform=function(ee,oe,ae,be){var _e=G.props,fe=_e.placement,Re=_e.levelMove,Oe=_e.duration,de=_e.ease,te=_e.showMask;G.levelDom.forEach(function(W){W.style.transition="transform ".concat(Oe," ").concat(de),o(W,u,G.transitionEnd);var Y=ee?ae:0;if(Re){var V=E(Re,{target:W,open:ee});Y=ee?V[0]:V[1]||0}var Q=typeof Y=="number"?"".concat(Y,"px"):Y,q=fe==="left"||fe==="top"?Q:"-".concat(Q);q=te&&fe==="right"&&be?"calc(".concat(q," + ").concat(be,"px)"):q,W.style.transform=Y?"".concat(oe,"(").concat(q,")"):""})},G.setLevelAndScrolling=function(ee,oe,ae){var be=G.props.onChange;if(!p){var _e=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?Object(i.a)(!0):0;G.setLevelTransform(ee,oe,ae,_e),G.toggleScrollingToDrawerAndBody(_e)}be&&be(ee)},G.toggleScrollingToDrawerAndBody=function(ee){var oe=G.props,ae=oe.getOpenCount,be=oe.getContainer,_e=oe.showMask,fe=oe.open,Re=be&&be(),Oe=ae&&ae();if(Re&&Re.parentNode===document.body&&_e){var de=["touchstart"],te=[document.body,G.maskDom,G.handlerDom,G.contentDom];fe&&document.body.style.overflow!=="hidden"?(ee&&G.addScrollingEffect(ee),Oe===1&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",te.forEach(function(W,Y){if(!W)return;o(W,de[Y]||"touchmove",Y?G.removeMoveHandler:G.removeStartHandler,G.passive)})):G.getCurrentDrawerSome()&&(Oe||(document.body.style.overflow=""),document.body.style.touchAction="",ee&&G.remScrollingEffect(ee),te.forEach(function(W,Y){if(!W)return;s(W,de[Y]||"touchmove",Y?G.removeMoveHandler:G.removeStartHandler,G.passive)}))}},G.addScrollingEffect=function(ee){var oe=G.props,ae=oe.placement,be=oe.duration,_e=oe.ease,fe=oe.getOpenCount,Re=oe.switchScrollingEffect,Oe=fe&&fe();Oe===1&&Re();var de="width ".concat(be," ").concat(_e),te="transform ".concat(be," ").concat(_e);G.dom.style.transition="none";switch(ae){case"right":G.dom.style.transform="translateX(-".concat(ee,"px)");break;case"top":case"bottom":G.dom.style.width="calc(100% - ".concat(ee,"px)"),G.dom.style.transform="translateZ(0)";break;default:break}clearTimeout(G.timeout),G.timeout=setTimeout(function(){G.dom&&(G.dom.style.transition="".concat(te,",").concat(de),G.dom.style.width="",G.dom.style.transform="")})},G.remScrollingEffect=function(ee){var oe=G.props,ae=oe.placement,be=oe.duration,_e=oe.ease,fe=oe.getOpenCount,Re=oe.switchScrollingEffect,Oe=fe&&fe();Oe||Re(!0),d&&(document.body.style.overflowX="hidden"),G.dom.style.transition="none";var de,te="width ".concat(be," ").concat(_e),W="transform ".concat(be," ").concat(_e);switch(ae){case"left":{G.dom.style.width="100%",te="width 0s ".concat(_e," ").concat(be);break}case"right":{G.dom.style.transform="translateX(".concat(ee,"px)"),G.dom.style.width="100%",te="width 0s ".concat(_e," ").concat(be),G.maskDom&&(G.maskDom.style.left="-".concat(ee,"px"),G.maskDom.style.width="calc(100% + ".concat(ee,"px)"));break}case"top":case"bottom":{G.dom.style.width="calc(100% + ".concat(ee,"px)"),G.dom.style.height="100%",G.dom.style.transform="translateZ(0)",de="height 0s ".concat(_e," ").concat(be);break}default:break}clearTimeout(G.timeout),G.timeout=setTimeout(function(){G.dom&&(G.dom.style.transition="".concat(W,",").concat(de?"".concat(de,","):"").concat(te),G.dom.style.transform="",G.dom.style.width="",G.dom.style.height="")})},G.getCurrentDrawerSome=function(){return!Object.keys(x).some(function(ee){return x[ee]})},G.getLevelDom=function(ee){var oe=ee.level,ae=ee.getContainer;if(p)return;var be=ae&&ae(),_e=be?be.parentNode:null;if(G.levelDom=[],oe==="all"){var fe=_e?Array.prototype.slice.call(_e.children):[];fe.forEach(function(Re){Re.nodeName!=="SCRIPT"&&Re.nodeName!=="STYLE"&&Re.nodeName!=="LINK"&&Re!==be&&G.levelDom.push(Re)})}else oe&&l(oe).forEach(function(Re){document.querySelectorAll(Re).forEach(function(Oe){G.levelDom.push(Oe)})})},G.getHorizontalBoolAndPlacementName=function(){var ee=G.props.placement,oe=ee==="left"||ee==="right",ae="translate".concat(oe?"X":"Y");return{isHorizontal:oe,placementName:ae}},G.state={_self:Object(h.a)(G)},G}return Object(S.a)(U,[{key:"componentDidMount",value:function(){var G=this;if(!p){var ee=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return ee=!0,null}}))}catch(fe){}this.passive=ee?{passive:!1}:!1}var oe=this.props,ae=oe.open,be=oe.getContainer,_e=be&&be();this.drawerId="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(Math.random()*9).toString())).toString(16)),this.getLevelDom(this.props),ae&&(_e&&_e.parentNode===document.body&&(x[this.drawerId]=ae),this.openLevelTransition(),this.forceUpdate(function(){G.domFocus()}))}},{key:"componentDidUpdate",value:function(G){var ee=this.props,oe=ee.open,ae=ee.getContainer,be=ae&&ae();oe!==G.open&&(oe&&this.domFocus(),be&&be.parentNode===document.body&&(x[this.drawerId]=!!oe),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var G=this.props,ee=G.getOpenCount,oe=G.open,ae=G.switchScrollingEffect,be=typeof ee=="function"&&ee();delete x[this.drawerId],oe&&(this.setLevelTransform(!1),document.body.style.touchAction=""),be||(document.body.style.overflow="",ae(!0))}},{key:"render",value:function(){var G,ee=this,oe=this.props,ae=oe.className,be=oe.children,_e=oe.style,fe=oe.width,Re=oe.height,Oe=oe.defaultOpen,de=oe.open,te=oe.prefixCls,W=oe.placement,Y=oe.level,V=oe.levelMove,Q=oe.ease,q=oe.duration,ie=oe.getContainer,ne=oe.handler,J=oe.onChange,$=oe.afterVisibleChange,le=oe.showMask,ce=oe.maskClosable,we=oe.maskStyle,Fe=oe.onClose,Xe=oe.onHandleClick,$e=oe.keyboard,Ye=oe.getOpenCount,Ze=oe.switchScrollingEffect,qe=Object(N.a)(oe,["className","children","style","width","height","defaultOpen","open","prefixCls","placement","level","levelMove","ease","duration","getContainer","handler","onChange","afterVisibleChange","showMask","maskClosable","maskStyle","onClose","onHandleClick","keyboard","getOpenCount","switchScrollingEffect"]),Pe=this.dom?de:!1,Ie=c()(te,(G={},Object(e.a)(G,"".concat(te,"-").concat(W),!0),Object(e.a)(G,"".concat(te,"-open"),Pe),Object(e.a)(G,ae||"",!!ae),Object(e.a)(G,"no-mask",!le),G)),Je=this.getHorizontalBoolAndPlacementName(),rt=Je.placementName,ye=W==="left"||W==="top"?"-100%":"100%",ue=Pe?"":"".concat(rt,"(").concat(ye,")"),he=ne&&_.cloneElement(ne,{onClick:function(Ce){ne.props.onClick&&ne.props.onClick(),Xe&&Xe(Ce)},ref:function(Ce){ee.handlerDom=Ce}});return _.createElement("div",Object.assign({},qe,{tabIndex:-1,className:Ie,style:_e,ref:function(Ce){ee.dom=Ce},onKeyDown:Pe&&$e?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),le&&_.createElement("div",{className:"".concat(te,"-mask"),onClick:ce?Fe:void 0,style:we,ref:function(Ce){ee.maskDom=Ce}}),_.createElement("div",{className:"".concat(te,"-content-wrapper"),style:{transform:ue,msTransform:ue,width:b(fe)?"".concat(fe,"px"):fe,height:b(Re)?"".concat(Re,"px"):Re},ref:function(Ce){ee.contentWrapper=Ce}},_.createElement("div",{className:"".concat(te,"-content"),ref:function(Ce){ee.contentDom=Ce},onTouchStart:Pe&&le?this.removeStartHandler:void 0,onTouchMove:Pe&&le?this.removeMoveHandler:void 0},be),he))}}],[{key:"getDerivedStateFromProps",value:function(G,ee){var oe=ee.prevProps,ae=ee._self,be={prevProps:G};if(oe!==void 0){var _e=G.placement,fe=G.level;_e!==oe.placement&&(ae.contentDom=null),fe!==oe.level&&ae.getLevelDom(G)}return be}}]),U}(_.Component);w.defaultProps={switchScrollingEffect:function(){}};var T=w;function F(O){var B=P();return function(){var L=Object(m.a)(O),G;if(B){var ee=Object(m.a)(this).constructor;G=Reflect.construct(L,arguments,ee)}else G=L.apply(this,arguments);return Object(v.a)(this,G)}}function P(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(O){return!1}}var A=function(O){Object(k.a)(U,O);var B=F(U);function U(L){var G;Object(g.a)(this,U),G=B.call(this,L),G.onHandleClick=function(oe){var ae=G.props,be=ae.onHandleClick,_e=ae.open;if(be&&be(oe),typeof _e=="undefined"){var fe=G.state.open;G.setState({open:!fe})}},G.onClose=function(oe){var ae=G.props,be=ae.onClose,_e=ae.open;be&&be(oe),typeof _e=="undefined"&&G.setState({open:!1})};var ee=typeof L.open!="undefined"?L.open:!!L.defaultOpen;return G.state={open:ee},"onMaskClick"in L&&console.warn("`onMaskClick` are removed, please use `onClose` instead."),G}return Object(S.a)(U,[{key:"render",value:function(){var G=this,ee=this.props,oe=ee.defaultOpen,ae=ee.getContainer,be=ee.wrapperClassName,_e=ee.forceRender,fe=ee.handler,Re=Object(N.a)(ee,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),Oe=this.state.open;if(!ae)return _.createElement("div",{className:be,ref:function(W){G.dom=W}},_.createElement(T,Object.assign({},Re,{open:Oe,handler:fe,getContainer:function(){return G.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var de=!!fe||_e;return _.createElement(C.a,{visible:Oe,forceRender:de,getContainer:ae,wrapperClassName:be},function(te){var W=te.visible,Y=te.afterClose,V=Object(N.a)(te,["visible","afterClose"]);return _.createElement(T,Object.assign({},Re,V,{open:W!==void 0?W:Oe,afterVisibleChange:Y!==void 0?Y:Re.afterVisibleChange,handler:fe,onClose:G.onClose,onHandleClick:G.onHandleClick}))})}}],[{key:"getDerivedStateFromProps",value:function(G,ee){var oe=ee.prevProps,ae={prevProps:G};return typeof oe!="undefined"&&G.open!==oe.open&&(ae.open=G.open),ae}}]),U}(_.Component);A.defaultProps={prefixCls:"drawer",placement:"left",getContainer:"body",defaultOpen:!1,level:"all",duration:".3s",ease:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",onChange:function(){},afterVisibleChange:function(){},handler:_.createElement("div",{className:"drawer-handle"},_.createElement("i",{className:"drawer-handle-icon"})),showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",className:"",keyboard:!0,forceRender:!1};var X=A,z=Z.a=X},fjLI:function(H,Z,I){"use strict";I.d(Z,"f",function(){return i}),I.d(Z,"b",function(){return n}),I.d(Z,"a",function(){return l}),I.d(Z,"d",function(){return f}),I.d(Z,"e",function(){return d}),I.d(Z,"c",function(){return u});var N=I("8HAY"),g=I("Vhoy"),S=I("MI8n"),k=I("JYp7"),v=I("pmY6"),m=I("24hK"),C=I("nnTU"),_=I("T8No"),e=I("Cg/j"),h=I("t9D7"),r=function(o,s,E,b){var p=arguments.length,D=p<3?s:b===null?b=Object.getOwnPropertyDescriptor(s,E):b,R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(o,s,E,b);else for(var y=o.length-1;y>=0;y--)(R=o[y])&&(D=(p<3?R(D):p>3?R(s,E,D):R(s,E))||D);return p>3&&D&&Object.defineProperty(s,E,D),D},c=function(o,s){return function(E,b){s(E,b,o)}};function i(o){return o.command!==void 0}class n{constructor(o){this.id=n._idPool++,this._debugName=o}}n._idPool=0,n.CommandPalette=new n("CommandPalette"),n.EditorContext=new n("EditorContext"),n.SimpleEditorContext=new n("SimpleEditorContext"),n.EditorContextCopy=new n("EditorContextCopy"),n.EditorContextPeek=new n("EditorContextPeek"),n.MenubarEditMenu=new n("MenubarEditMenu"),n.MenubarCopy=new n("MenubarCopy"),n.MenubarGoMenu=new n("MenubarGoMenu"),n.MenubarSelectionMenu=new n("MenubarSelectionMenu"),n.InlineCompletionsActions=new n("InlineCompletionsActions");const l=Object(e.c)("menuService"),f=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new S.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:o=>o===n.CommandPalette}}addCommand(o){return this.addCommands(k.a.single(o))}addCommands(o){for(const s of o)this._commands.set(s.id,s);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(v.i)(()=>{let s=!1;for(const E of o)s=this._commands.delete(E.id)||s;s&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(o){return this._commands.get(o)}getCommands(){const o=new Map;return this._commands.forEach((s,E)=>o.set(E,s)),o}appendMenuItem(o,s){return this.appendMenuItems(k.a.single({id:o,item:s}))}appendMenuItems(o){const s=new Set,E=new m.a;for(const{id:b,item:p}of o){let D=this._menuItems.get(b);D||(D=new m.a,this._menuItems.set(b,D)),E.push(D.push(p)),s.add(b)}return this._onDidChangeMenu.fire(s),Object(v.i)(()=>{if(E.size>0){for(let b of E)b();this._onDidChangeMenu.fire(s),E.clear()}})}getMenuItems(o){let s;return this._menuItems.has(o)?s=[...this._menuItems.get(o)]:s=[],o===n.CommandPalette&&this._appendImplicitItems(s),s}_appendImplicitItems(o){const s=new Set;for(const E of o)i(E)&&(s.add(E.command.id),E.alt&&s.add(E.alt.id));this._commands.forEach((E,b)=>{s.has(b)||o.push({command:E})})}};class d extends N.e{constructor(o,s,E,b){super(`submenuitem.${o.submenu.id}`,typeof o.title=="string"?o.title:o.title.value,[],"submenu");this.item=o,this._menuService=s,this._contextKeyService=E,this._options=b}get actions(){const o=[],s=this._menuService.createMenu(this.item.submenu,this._contextKeyService),E=s.getActions(this._options);s.dispose();for(const[,b]of E)b.length>0&&(o.push(...b),o.push(new N.d));return o.length&&o.pop(),o}}let u=class o{constructor(s,E,b,p,D){var R,y;if(this._commandService=D,this.id=s.id,this.label=(b==null?void 0:b.renderShortTitle)&&s.shortTitle?typeof s.shortTitle=="string"?s.shortTitle:s.shortTitle.value:typeof s.title=="string"?s.title:s.title.value,this.tooltip=(y=typeof s.tooltip=="string"?s.tooltip:(R=s.tooltip)===null||R===void 0?void 0:R.value)!==null&&y!==void 0?y:"",this.enabled=!s.precondition||p.contextMatchesRules(s.precondition),this.checked=void 0,s.toggled){const x=s.toggled.condition?s.toggled:{condition:s.toggled};this.checked=p.contextMatchesRules(x.condition),this.checked&&x.tooltip&&(this.tooltip=typeof x.tooltip=="string"?x.tooltip:x.tooltip.value),x.title&&(this.label=typeof x.title=="string"?x.title:x.title.value)}this.item=s,this.alt=E?new o(E,void 0,b,p,D):void 0,this._options=b,h.d.isThemeIcon(s.icon)&&(this.class=g.a.asClassName(s.icon))}dispose(){}run(...s){var E,b;let p=[];return((E=this._options)===null||E===void 0?void 0:E.arg)&&(p=[...p,this._options.arg]),((b=this._options)===null||b===void 0?void 0:b.shouldForwardArgs)&&(p=[...p,...s]),this._commandService.executeCommand(this.id,...p)}};u=r([c(3,_.b),c(4,C.b)],u)},fyJ8:function(H,Z,I){"use strict";var N=I("rePB"),g=I("VTBJ"),S=I("Ff2n"),k=I("U8pU"),v=I("q1tI"),m=I.n(v),C=I("TSYQ"),_=I.n(C),e=I("c+Xe"),h=I("sR1s");function r(f){return f&&Object(k.a)(f)==="object"&&!Array.isArray(f)&&!v.isValidElement(f)}function c(f){return typeof f=="string"?!0:Object(e.c)(f)}function i(f,d){var u,o=f.prefixCls,s=f.className,E=f.record,b=f.index,p=f.dataIndex,D=f.render,R=f.children,y=f.component,x=y===void 0?"td":y,w=f.colSpan,T=f.rowSpan,F=f.fixLeft,P=f.fixRight,A=f.firstFixLeft,X=f.lastFixLeft,z=f.firstFixRight,O=f.lastFixRight,B=f.appendNode,U=f.additionalProps,L=U===void 0?{}:U,G=f.ellipsis,ee=f.align,oe=f.rowType,ae=f.isSticky,be="".concat(o,"-cell"),_e,fe;if(R)fe=R;else{var Re=Object(h.b)(E,p);if(fe=Re,D){var Oe=D(Re,E,b);r(Oe)?(fe=Oe.children,_e=Oe.props):fe=Oe}}Object(k.a)(fe)==="object"&&!Array.isArray(fe)&&!v.isValidElement(fe)&&(fe=null),G&&(X||z)&&(fe=v.createElement("span",{className:"".concat(be,"-content")},fe));var de=_e||{},te=de.colSpan,W=de.rowSpan,Y=de.style,V=de.className,Q=Object(S.a)(de,["colSpan","rowSpan","style","className"]),q=te!==void 0?te:w,ie=W!==void 0?W:T;if(q===0||ie===0)return null;var ne={},J=typeof F=="number",$=typeof P=="number";J&&(ne.position="sticky",ne.left=F),$&&(ne.position="sticky",ne.right=P);var le={};ee&&(le.textAlign=ee);var ce,we=G===!0?{showTitle:!0}:G;we&&(we.showTitle||oe==="header")&&(typeof fe=="string"||typeof fe=="number"?ce=fe.toString():v.isValidElement(fe)&&typeof fe.props.children=="string"&&(ce=fe.props.children));var Fe=Object(g.a)(Object(g.a)(Object(g.a)({title:ce},Q),L),{},{colSpan:q&&q!==1?q:null,rowSpan:ie&&ie!==1?ie:null,className:_()(be,s,(u={},Object(N.a)(u,"".concat(be,"-fix-left"),J),Object(N.a)(u,"".concat(be,"-fix-left-first"),A),Object(N.a)(u,"".concat(be,"-fix-left-last"),X),Object(N.a)(u,"".concat(be,"-fix-right"),$),Object(N.a)(u,"".concat(be,"-fix-right-first"),z),Object(N.a)(u,"".concat(be,"-fix-right-last"),O),Object(N.a)(u,"".concat(be,"-ellipsis"),G),Object(N.a)(u,"".concat(be,"-with-append"),B),Object(N.a)(u,"".concat(be,"-fix-sticky"),(J||$)&&ae),u),L.className,V),style:Object(g.a)(Object(g.a)(Object(g.a)(Object(g.a)({},L.style),le),ne),Y),ref:c(x)?d:null});return v.createElement(x,Object.assign({},Fe),B,fe)}var n=v.forwardRef(i);n.displayName="Cell";var l=v.memo(n,function(f,d){return d.shouldCellUpdate?!d.shouldCellUpdate(d.record,f.record):!1});Z.a=l},gRFJ:function(H,Z,I){H.exports=[I("rdUC"),I("ynwM"),I("RELg"),I("DlR+"),I("CrYA"),I("PD8m")]},gaXo:function(module,exports){typeof JSON!="object"&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f(H){return H<10?"0"+H:H}function this_value(){return this.valueOf()}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;function quote(H){return rx_escapable.lastIndex=0,rx_escapable.test(H)?'"'+H.replace(rx_escapable,function(Z){var I=meta[Z];return typeof I=="string"?I:"\\u"+("0000"+Z.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+H+'"'}function str(H,Z){var I,N,g,S,k=gap,v,m=Z[H];m&&typeof m=="object"&&typeof m.toJSON=="function"&&(m=m.toJSON(H)),typeof rep=="function"&&(m=rep.call(Z,H,m));switch(typeof m){case"string":return quote(m);case"number":return isFinite(m)?String(m):"null";case"boolean":case"null":return String(m);case"object":if(!m)return"null";if(gap+=indent,v=[],Object.prototype.toString.apply(m)==="[object Array]"){for(S=m.length,I=0;Iz.length)&&(O=z.length);for(var B=0,U=new Array(O);B=0)continue;if(!Object.prototype.propertyIsEnumerable.call(z,U))continue;B[U]=z[U]}}return B}function l(z,O){if(z==null)return{};var B={},U=Object.keys(z),L,G;for(G=0;G=0)continue;B[L]=z[L]}return B}var f=function(O){var B=O.className,U=O.percent,L=O.prefixCls,G=O.strokeColor,ee=O.strokeLinecap,oe=O.strokeWidth,ae=O.style,be=O.trailColor,_e=O.trailWidth,fe=O.transition,Re=n(O,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete Re.gapPosition;var Oe=Array.isArray(U)?U:[U],de=Array.isArray(G)?G:[G],te=m(Oe),W=_(te,1),Y=W[0],V=oe/2,Q=100-oe/2,q="M ".concat(ee==="round"?V:0,",").concat(V,` L `).concat(ee==="round"?Q:100,",").concat(V),ie="0 0 100 ".concat(oe),ne=0;return g.a.createElement("svg",C({className:k()("".concat(L,"-line"),B),viewBox:ie,preserveAspectRatio:"none",style:ae},Re),g.a.createElement("path",{className:"".concat(L,"-line-trail"),d:q,strokeLinecap:ee,stroke:be,strokeWidth:_e||oe,fillOpacity:"0"}),Oe.map(function(J,$){var le={strokeDasharray:"".concat(J,"px, 100px"),strokeDashoffset:"-".concat(ne,"px"),transition:fe||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},ce=de[$]||de[de.length-1];return ne+=J,g.a.createElement("path",{key:$,className:"".concat(L,"-line-path"),d:q,strokeLinecap:ee,stroke:ce,strokeWidth:oe,fillOpacity:"0",ref:Y[$],style:le})}))};f.defaultProps=v;var d=f;function u(){return u=Object.assign||function(z){for(var O=1;Oz.length)&&(O=z.length);for(var B=0,U=new Array(O);B=0)continue;if(!Object.prototype.propertyIsEnumerable.call(z,U))continue;B[U]=z[U]}}return B}function y(z,O){if(z==null)return{};var B={},U=Object.keys(z),L,G;for(G=0;G=0)continue;B[L]=z[L]}return B}var x=0;function w(z){return+z.replace("%","")}function T(z){return Array.isArray(z)?z:[z]}function F(z,O,B,U){var L=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,G=arguments.length>5?arguments[5]:void 0,ee=50-U/2,oe=0,ae=-ee,be=0,_e=-2*ee;switch(G){case"left":oe=-ee,ae=0,be=2*ee,_e=0;break;case"right":oe=ee,ae=0,be=-2*ee,_e=0;break;case"bottom":ae=ee,_e=2*ee;break;default:}var fe="M 50,50 m ".concat(oe,",").concat(ae,` a `).concat(ee,",").concat(ee," 0 1 1 ").concat(be,",").concat(-_e,` a `).concat(ee,",").concat(ee," 0 1 1 ").concat(-be,",").concat(_e),Re=Math.PI*2*ee,Oe={stroke:B,strokeDasharray:"".concat(O/100*(Re-L),"px ").concat(Re,"px"),strokeDashoffset:"-".concat(L/2+z/100*(Re-L),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:fe,pathStyle:Oe}}var P=function(O){var B=O.prefixCls,U=O.strokeWidth,L=O.trailWidth,G=O.gapDegree,ee=O.gapPosition,oe=O.trailColor,ae=O.strokeLinecap,be=O.style,_e=O.className,fe=O.strokeColor,Re=O.percent,Oe=R(O,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),de=Object(N.useMemo)(function(){return x+=1,x},[]),te=F(0,100,oe,U,G,ee),W=te.pathString,Y=te.pathStyle,V=T(Re),Q=T(fe),q=Q.find(function(le){return Object.prototype.toString.call(le)==="[object Object]"}),ie=m(V),ne=o(ie,1),J=ne[0],$=function(){var ce=0;return V.map(function(we,Fe){var Xe=Q[Fe]||Q[Q.length-1],$e=Object.prototype.toString.call(Xe)==="[object Object]"?"url(#".concat(B,"-gradient-").concat(de,")"):"",Ye=F(ce,we,Xe,U,G,ee);return ce+=we,g.a.createElement("path",{key:Fe,className:"".concat(B,"-circle-path"),d:Ye.pathString,stroke:$e,strokeLinecap:ae,strokeWidth:U,opacity:we===0?0:1,fillOpacity:"0",style:Ye.pathStyle,ref:J[Fe]})})};return g.a.createElement("svg",u({className:k()("".concat(B,"-circle"),_e),viewBox:"0 0 100 100",style:be},Oe),q&&g.a.createElement("defs",null,g.a.createElement("linearGradient",{id:"".concat(B,"-gradient-").concat(de),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(q).sort(function(le,ce){return w(le)-w(ce)}).map(function(le,ce){return g.a.createElement("stop",{key:ce,offset:le,stopColor:q[le]})}))),g.a.createElement("path",{className:"".concat(B,"-circle-trail"),d:W,stroke:oe,strokeLinecap:ae,strokeWidth:L||U,fillOpacity:"0",style:Y}),$().reverse())};P.defaultProps=v;var A=P,X={Line:d,Circle:A}},hW8S:function(H,Z,I){"use strict";I.d(Z,"a",function(){return k}),I.d(Z,"c",function(){return v}),I.d(Z,"b",function(){return m});var N=I("VTBJ"),g=I("Ff2n"),S=I("Kwbf"),k="RC_TABLE_INTERNAL_COL_DEFINE";function v(C){var _=C.expandable,e=Object(g.a)(C,["expandable"]);return"expandable"in C?Object(N.a)(Object(N.a)({},e),_):e}function m(C){return Object.keys(C).reduce(function(_,e){return(e.substr(0,5)==="data-"||e.substr(0,5)==="aria-")&&(_[e]=C[e]),_},{})}},i3hx:function(H,Z,I){},ic2d:function(H,Z,I){"use strict";I.d(Z,"a",function(){return k});var N=I("FWmy"),g=I("746U");class S{constructor(){this.data=new Map}add(v,m){N.a(g.l(v)),N.a(g.k(m)),N.a(!this.data.has(v),"There is already an extension with this id"),this.data.set(v,m)}as(v){return this.data.get(v)||null}}const k=new S},jO9C:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("OLod"))})(this,function(N){return N.pad.Iso97971={pad:function(g,S){g.concat(N.lib.WordArray.create([2147483648],1)),N.pad.ZeroPadding.pad(g,S)},unpad:function(g){N.pad.ZeroPadding.unpad(g),g.sigBytes--}},N.pad.Iso97971})},je13:function(H,Z,I){var N=I("5nXd"),g=I("gRFJ"),S=[I("uQRt")];H.exports=N.createStore(g,S)},k3GJ:function(H,Z,I){"use strict";I.d(Z,"a",function(){return mn});var N=I("rePB"),g=I("ODXe"),S=I("Ff2n"),k=I("VTBJ"),v=I("q1tI"),m=I("TSYQ"),C=I.n(m),_=I("Zm9Q"),e=I("6cGi"),h=I("KQm4"),r=I("xEkU"),c=I.n(r),i=I("t23M");function n(ke){var Ge=Object(v.useRef)(),Ve=Object(v.useRef)(!1);function Ne(){for(var xe=arguments.length,Le=new Array(xe),Se=0;SeQe&&(gt=Qe-vt),Object(v.useMemo)(function(){if(!Le.length)return[0,0];for(var Ot=Le.length,Xt=Ot,sr=0;srKe+gt){Xt=sr-1;break}}for(var fr=0,Er=Ot-1;Er>=0;Er-=1){var yr=ke.get(Le[Er].key)||E;if(yr[ze]1&&arguments[1]!==void 0?arguments[1]:!1,Ne=Ge&&typeof Ge.getBoundingClientRect=="function"&&Ge.getBoundingClientRect().width;if(Ne){if(Ve){var xe=getComputedStyle(Ge),Le=xe.marginLeft,Se=xe.marginRight;Ne+=+Le.replace("px","")+ +Se.replace("px","")}Ne=+Ne.toFixed(6)}return Ne||0},ce=function(Ge,Ve,Ne){Ge&&Object(z.a)(Ge.style)==="object"&&(Ge.style[Ve]=Ne)},we=function(){return V.any},Fe=I("bdgK"),Xe=I("i8i4"),$e=I.n(Xe),Ye=I("wgJM"),Ze=I("l4aY"),qe=I("m+aA"),Pe=I("c+Xe"),Ie=I("zT1h"),Je=I("QC+M");function rt(ke,Ge,Ve){return Ve?ke[0]===Ge[0]:ke[0]===Ge[0]&&ke[1]===Ge[1]}function ye(ke,Ge,Ve){var Ne=ke[Ge]||{};return Object(k.a)(Object(k.a)({},Ne),Ve)}function ue(ke,Ge,Ve,Ne){for(var xe=Ve.points,Le=Object.keys(ke),Se=0;Se1&&arguments[1]!==void 0?arguments[1]:2;Ge();var Le=Object(Ye.a)(function(){xe<=1?Ne({isCanceled:function(){return Le!==ke.current}}):Ve(Ne,xe-1)});ke.current=Le}return v.useEffect(function(){return function(){Ge()}},[]),[Ve,Ge]},Dr=[Mt,wt,Jt,Dt],mt=!1,Ct=!0;function dt(ke){return ke===Jt||ke===Dt}var Ht=function(ke,Ge){var Ve=v.useState($t),Ne=Object(g.a)(Ve,2),xe=Ne[0],Le=Ne[1],Se=Bt(),je=Object(g.a)(Se,2),Be=je[0],ze=je[1];function Ke(){Le(Mt)}return Et(function(){if(xe!==$t&&xe!==Dt){var Qe=Dr.indexOf(xe),ot=Dr[Qe+1],vt=Ge(xe);vt===mt?Le(ot):Be(function(gt){function Ot(){if(gt.isCanceled())return;Le(ot)}vt===!0?Ot():Promise.resolve(vt).then(Ot)})}},[ke,xe]),v.useEffect(function(){return function(){ze()}},[]),[Ke,xe]},Gt=function(ke){var Ge=Object(v.useRef)(),Ve=Object(v.useRef)(ke);Ve.current=ke;var Ne=v.useCallback(function(Se){Ve.current(Se)},[]);function xe(Se){Se&&(Se.removeEventListener(Tt,Ne),Se.removeEventListener(st,Ne))}function Le(Se){Ge.current&&Ge.current!==Se&&xe(Ge.current),Se&&Se!==Ge.current&&(Se.addEventListener(Tt,Ne),Se.addEventListener(st,Ne),Ge.current=Se)}return v.useEffect(function(){return function(){xe(Ge.current)}},[]),[Le,xe]};function yt(ke,Ge,Ve,Ne){var xe=Ne.motionEnter,Le=xe===void 0?!0:xe,Se=Ne.motionAppear,je=Se===void 0?!0:Se,Be=Ne.motionLeave,ze=Be===void 0?!0:Be,Ke=Ne.motionDeadline,Qe=Ne.motionLeaveImmediately,ot=Ne.onAppearPrepare,vt=Ne.onEnterPrepare,gt=Ne.onLeavePrepare,Ot=Ne.onAppearStart,Xt=Ne.onEnterStart,sr=Ne.onLeaveStart,cr=Ne.onAppearActive,fr=Ne.onEnterActive,Er=Ne.onLeaveActive,yr=Ne.onAppearEnd,pr=Ne.onEnterEnd,Pr=Ne.onLeaveEnd,Sr=Ne.onVisibleChanged,gn=St(),Cr=Object(g.a)(gn,2),rr=Cr[0],Qt=Cr[1],Or=St(ht),Nr=Object(g.a)(Or,2),Vt=Nr[0],Br=Nr[1],vn=St(null),Gr=Object(g.a)(vn,2),en=Gr[0],Jr=Gr[1],Dn=Object(v.useRef)(!1),Jn=Object(v.useRef)(null),En=Object(v.useRef)(!1),yi=Object(v.useRef)(null);function Ui(){var on=Ve();return on||yi.current}var xi=Object(v.useRef)(!1);function Qn(on){var $r=Ui();if(on&&!on.deadline&&on.target!==$r)return;var Zn;Vt===Ft&&xi.current?Zn=yr==null?void 0:yr($r,on):Vt===Lt&&xi.current?Zn=pr==null?void 0:pr($r,on):Vt===Yt&&xi.current&&(Zn=Pr==null?void 0:Pr($r,on)),Zn!==!1&&!En.current&&(Br(ht),Jr(null))}var ln=Gt(Qn),tn=Object(g.a)(ln,1),xn=tn[0],yn=v.useMemo(function(){var on,$r,Zn;switch(Vt){case"appear":return on={},Object(N.a)(on,Mt,ot),Object(N.a)(on,wt,Ot),Object(N.a)(on,Jt,cr),on;case"enter":return $r={},Object(N.a)($r,Mt,vt),Object(N.a)($r,wt,Xt),Object(N.a)($r,Jt,fr),$r;case"leave":return Zn={},Object(N.a)(Zn,Mt,gt),Object(N.a)(Zn,wt,sr),Object(N.a)(Zn,Jt,Er),Zn;default:return{}}},[Vt]),Bi=Ht(Vt,function(on){if(on===Mt){var $r=yn[Mt];return $r?$r(Ui()):mt}if(Qr in yn){var Zn;Jr(((Zn=yn[Qr])===null||Zn===void 0?void 0:Zn.call(yn,Ui(),null))||null)}return Qr===Jt&&(xn(Ui()),Ke>0&&(clearTimeout(Jn.current),Jn.current=setTimeout(function(){Qn({deadline:!0})},Ke))),Ct}),ta=Object(g.a)(Bi,2),ra=ta[0],Qr=ta[1],Yi=dt(Qr);xi.current=Yi,Et(function(){Qt(Ge);var on=Dn.current;if(Dn.current=!0,!ke)return;var $r;!on&&Ge&&je&&($r=Ft),on&&Ge&&Le&&($r=Lt),(on&&!Ge&&ze||!on&&Qe&&!Ge&&ze)&&($r=Yt),$r&&(Br($r),ra())},[Ge]),Object(v.useEffect)(function(){(Vt===Ft&&!je||Vt===Lt&&!Le||Vt===Yt&&!ze)&&Br(ht)},[je,Le,ze]),Object(v.useEffect)(function(){return function(){clearTimeout(Jn.current),En.current=!0}},[]),Object(v.useEffect)(function(){rr!==void 0&&Vt===ht&&(Sr==null||Sr(rr))},[rr,Vt]);var na=en;return yn[Mt]&&Qr===wt&&(na=Object(k.a)({transition:"none"},na)),[Vt,Qr,na,rr!=null?rr:Ge]}var xt=function(ke){Object(x.a)(Ve,ke);var Ge=Object(w.a)(Ve);function Ve(){return Object(D.a)(this,Ve),Ge.apply(this,arguments)}return Object(R.a)(Ve,[{key:"render",value:function(){return this.props.children}}]),Ve}(v.Component),Kt=xt;function Ar(ke){var Ge=ke;Object(z.a)(ke)==="object"&&(Ge=ke.transitionSupport);function Ve(xe){return!!(xe.motionName&&Ge)}var Ne=v.forwardRef(function(xe,Le){var Se=xe.visible,je=Se===void 0?!0:Se,Be=xe.removeOnLeave,ze=Be===void 0?!0:Be,Ke=xe.forceRender,Qe=xe.children,ot=xe.motionName,vt=xe.leavedClassName,gt=xe.eventProps,Ot=Ve(xe),Xt=Object(v.useRef)(),sr=Object(v.useRef)();function cr(){try{return Object(qe.a)(Xt.current||sr.current)}catch(Br){return null}}var fr=yt(Ot,je,cr,xe),Er=Object(g.a)(fr,4),yr=Er[0],pr=Er[1],Pr=Er[2],Sr=Er[3],gn=v.useRef(Sr);Sr&&(gn.current=!0);var Cr=Object(v.useRef)(Le);Cr.current=Le;var rr=v.useCallback(function(Br){Xt.current=Br,Object(Pe.b)(Cr.current,Br)},[]),Qt,Or=Object(k.a)(Object(k.a)({},gt),{},{visible:je});if(!Qe)Qt=null;else if(yr===ht||!Ve(xe))Sr?Qt=Qe(Object(k.a)({},Or),rr):!ze&&gn.current?Qt=Qe(Object(k.a)(Object(k.a)({},Or),{},{className:vt}),rr):Ke?Qt=Qe(Object(k.a)(Object(k.a)({},Or),{},{style:{display:"none"}}),rr):Qt=null;else{var Nr,Vt;pr===Mt?Vt="prepare":dt(pr)?Vt="active":pr===wt&&(Vt="start"),Qt=Qe(Object(k.a)(Object(k.a)({},Or),{},{className:C()(pt(ot,yr),(Nr={},Object(N.a)(Nr,pt(ot,"".concat(yr,"-").concat(Vt)),Vt),Object(N.a)(Nr,ot,typeof ot=="string"),Nr)),style:Pr}),rr)}return v.createElement(Kt,{ref:sr},Qt)});return Ne.displayName="CSSMotion",Ne}var qt=Ar(it),ut="add",kt="keep",Hr="remove",Yr="removed";function On(ke){var Ge;return ke&&Object(z.a)(ke)==="object"&&"key"in ke?Ge=ke:Ge={key:ke},Object(k.a)(Object(k.a)({},Ge),{},{key:String(Ge.key)})}function cn(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return ke.map(On)}function zr(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ve=[],Ne=0,xe=Ge.length,Le=cn(ke),Se=cn(Ge);Le.forEach(function(ze){for(var Ke=!1,Qe=Ne;Qe1});return Be.forEach(function(ze){Ve=Ve.filter(function(Ke){var Qe=Ke.key,ot=Ke.status;return Qe!==ze||ot!==Hr}),Ve.forEach(function(Ke){Ke.key===ze&&(Ke.status=kt)})}),Ve}var Pt=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function dn(ke){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qt,Ve=function(Ne){Object(x.a)(Le,Ne);var xe=Object(w.a)(Le);function Le(){var Se;return Object(D.a)(this,Le),Se=xe.apply(this,arguments),Se.state={keyEntities:[]},Se.removeKey=function(je){Se.setState(function(Be){var ze=Be.keyEntities;return{keyEntities:ze.map(function(Ke){return Ke.key!==je?Ke:Object(k.a)(Object(k.a)({},Ke),{},{status:Yr})})}})},Se}return Object(R.a)(Le,[{key:"render",value:function(){var je=this,Be=this.state.keyEntities,ze=this.props,Ke=ze.component,Qe=ze.children,ot=ze.onVisibleChanged,vt=Object(S.a)(ze,["component","children","onVisibleChanged"]),gt=Ke||v.Fragment,Ot={};return Pt.forEach(function(Xt){Ot[Xt]=vt[Xt],delete vt[Xt]}),delete vt.keys,v.createElement(gt,vt,Be.map(function(Xt){var sr=Xt.status,cr=Object(S.a)(Xt,["status"]),fr=sr===ut||sr===kt;return v.createElement(Ge,Object(p.a)({},Ot,{key:cr.key,visible:fr,eventProps:cr,onVisibleChanged:function(yr){ot==null||ot(yr,{key:cr.key}),yr||je.removeKey(cr.key)}}),Qe)}))}}],[{key:"getDerivedStateFromProps",value:function(je,Be){var ze=je.keys,Ke=Be.keyEntities,Qe=cn(ze),ot=zr(Ke,Qe);return{keyEntities:ot.filter(function(vt){var gt=Ke.find(function(Ot){var Xt=Ot.key;return vt.key===Xt});return!(gt&>.status===Yr&&vt.status===Hr)})}}}]),Le}(v.Component);return Ve.defaultProps={component:"div"},Ve}var ct=dn(it),jr=qt;function xr(ke){var Ge=ke.prefixCls,Ve=ke.motion,Ne=ke.animation,xe=ke.transitionName;return Ve||(Ne?{motionName:"".concat(Ge,"-").concat(Ne)}:xe?{motionName:xe}:null)}function Gn(ke){var Ge=ke.prefixCls,Ve=ke.visible,Ne=ke.zIndex,xe=ke.mask,Le=ke.maskMotion,Se=ke.maskAnimation,je=ke.maskTransitionName;if(!xe)return null;var Be={};return(Le||je||Se)&&(Be=Object(k.a)({motionAppear:!0},xr({motion:Le,prefixCls:Ge,transitionName:je,animation:Se}))),v.createElement(jr,Object(p.a)({},Be,{visible:Ve,removeOnLeave:!0}),function(ze){var Ke=ze.className;return v.createElement("div",{style:{zIndex:Ne},className:C()("".concat(Ge,"-mask"),Ke)})})}var An=I("9mu1"),hn=I("o0o1"),Ei=I.n(hn),Kn=I("HaE+"),bn=["measure","align",null,"motion"],Fr=function(ke,Ge){var Ve=Object(v.useState)(null),Ne=Object(g.a)(Ve,2),xe=Ne[0],Le=Ne[1],Se=Object(v.useRef)(),je=Object(v.useRef)(!1);function Be(Qe){je.current||Le(Qe)}function ze(){Ye.a.cancel(Se.current)}function Ke(Qe){ze(),Se.current=Object(Ye.a)(function(){Be(function(ot){switch(xe){case"align":return"motion";case"motion":return"stable";default:}return ot}),Qe==null||Qe()})}return Object(v.useEffect)(function(){Be("measure")},[ke]),Object(v.useEffect)(function(){switch(xe){case"measure":Ge();break;default:}xe&&(Se.current=Object(Ye.a)(Object(Kn.a)(Ei.a.mark(function Qe(){var ot,vt;return Ei.a.wrap(function(Ot){for(;;)switch(Ot.prev=Ot.next){case 0:ot=bn.indexOf(xe),vt=bn[ot+1],vt&&ot!==-1&&Be(vt);case 3:case"end":return Ot.stop()}},Qe)}))))},[xe]),Object(v.useEffect)(function(){return function(){je.current=!0,ze()}},[]),[xe,Ke]},di=function(ke){var Ge=v.useState({width:0,height:0}),Ve=Object(g.a)(Ge,2),Ne=Ve[0],xe=Ve[1];function Le(je){xe({width:je.offsetWidth,height:je.offsetHeight})}var Se=v.useMemo(function(){var je={};if(ke){var Be=Ne.width,ze=Ne.height;ke.indexOf("height")!==-1&&ze?je.height=ze:ke.indexOf("minHeight")!==-1&&ze&&(je.minHeight=ze),ke.indexOf("width")!==-1&&Be?je.width=Be:ke.indexOf("minWidth")!==-1&&Be&&(je.minWidth=Be)}return je},[ke,Ne]);return[Se,Le]},fn=v.forwardRef(function(ke,Ge){var Ve=ke.visible,Ne=ke.prefixCls,xe=ke.className,Le=ke.style,Se=ke.children,je=ke.zIndex,Be=ke.stretch,ze=ke.destroyPopupOnHide,Ke=ke.forceRender,Qe=ke.align,ot=ke.point,vt=ke.getRootDomNode,gt=ke.getClassNameFromAlign,Ot=ke.onAlign,Xt=ke.onMouseEnter,sr=ke.onMouseLeave,cr=ke.onMouseDown,fr=ke.onTouchStart,Er=Object(v.useRef)(),yr=Object(v.useRef)(),pr=Object(v.useState)(),Pr=Object(g.a)(pr,2),Sr=Pr[0],gn=Pr[1],Cr=di(Be),rr=Object(g.a)(Cr,2),Qt=rr[0],Or=rr[1];function Nr(){Be&&Or(vt())}var Vt=Fr(Ve,Nr),Br=Object(g.a)(Vt,2),vn=Br[0],Gr=Br[1],en=Object(v.useRef)();function Jr(){return ot||vt}function Dn(){var ln;(ln=Er.current)===null||ln===void 0||ln.forceAlign()}function Jn(ln,tn){var xn=gt(tn);Sr!==xn&&gn(xn),vn==="align"&&(Sr!==xn?Promise.resolve().then(function(){Dn()}):Gr(function(){var yn;(yn=en.current)===null||yn===void 0||yn.call(en)}),Ot==null||Ot(ln,tn))}var En=Object(k.a)({},xr(ke));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(ln){var tn=En[ln];En[ln]=function(xn,yn){return Gr(),tn==null?void 0:tn(xn,yn)}});function yi(){return new Promise(function(ln){en.current=ln})}v.useEffect(function(){!En.motionName&&vn==="motion"&&Gr()},[En.motionName,vn]),v.useImperativeHandle(Ge,function(){return{forceAlign:Dn,getElement:function(){return yr.current}}});var Ui=Object(k.a)(Object(k.a)({},Qt),{},{zIndex:je,opacity:vn==="motion"||vn==="stable"||!Ve?void 0:0,pointerEvents:vn==="stable"?void 0:"none"},Le),xi=!0;(Qe==null?void 0:Qe.points)&&(vn==="align"||vn==="stable")&&(xi=!1);var Qn=Se;return v.Children.count(Se)>1&&(Qn=v.createElement("div",{className:"".concat(Ne,"-content")},Se)),v.createElement(jr,Object(p.a)({visible:Ve,ref:yr,leavedClassName:"".concat(Ne,"-hidden")},En,{onAppearPrepare:yi,onEnterPrepare:yi,removeOnLeave:ze,forceRender:Ke}),function(ln,tn){var xn=ln.className,yn=ln.style,Bi=C()(Ne,xe,Sr,xn);return v.createElement(An.a,{target:Jr(),key:"popup",ref:Er,monitorWindowResize:!0,disabled:xi,align:Qe,onAlign:Jn},v.createElement("div",{ref:tn,className:Bi,onMouseEnter:Xt,onMouseLeave:sr,onMouseDownCapture:cr,onTouchStartCapture:fr,style:Object(k.a)(Object(k.a)({},yn),Ui)},Qn))})});fn.displayName="PopupInner";var Vr=fn,dr=v.forwardRef(function(ke,Ge){var Ve=ke.prefixCls,Ne=ke.visible,xe=ke.zIndex,Le=ke.children,Se=ke.mobile;Se=Se===void 0?{}:Se;var je=Se.popupClassName,Be=Se.popupStyle,ze=Se.popupMotion,Ke=ze===void 0?{}:ze,Qe=Se.popupRender,ot=v.useRef();v.useImperativeHandle(Ge,function(){return{forceAlign:function(){},getElement:function(){return ot.current}}});var vt=Object(k.a)({zIndex:xe},Be),gt=Le;return v.Children.count(Le)>1&&(gt=v.createElement("div",{className:"".concat(Ve,"-content")},Le)),Qe&&(gt=Qe(gt)),v.createElement(jr,Object(p.a)({visible:Ne,ref:ot,removeOnLeave:!0},Ke),function(Ot,Xt){var sr=Ot.className,cr=Ot.style,fr=C()(Ve,je,sr);return v.createElement("div",{ref:Xt,className:fr,style:Object(k.a)(Object(k.a)({},cr),vt)},gt)})});dr.displayName="MobilePopupInner";var nn=dr,_n=["visible","mobile"],jt=v.forwardRef(function(ke,Ge){var Ve=ke.visible,Ne=ke.mobile,xe=Object(S.a)(ke,_n),Le=Object(v.useState)(Ve),Se=Object(g.a)(Le,2),je=Se[0],Be=Se[1],ze=Object(v.useState)(!1),Ke=Object(g.a)(ze,2),Qe=Ke[0],ot=Ke[1],vt=Object(k.a)(Object(k.a)({},xe),{},{visible:je});Object(v.useEffect)(function(){Be(Ve),Ve&&Ne&&ot(he())},[Ve,Ne]);var gt=Qe?v.createElement(nn,Object(p.a)({},vt,{mobile:Ne,ref:Ge})):v.createElement(Vr,Object(p.a)({},vt,{ref:Ge}));return v.createElement("div",null,v.createElement(Gn,vt),gt)});jt.displayName="Popup";var lr=jt,ur=v.createContext(null),Rr=ur;function br(){}function hi(){return""}function Fn(ke){return ke?ke.ownerDocument:window.document}var $i=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function Ji(ke){var Ge=function(Ve){Object(x.a)(xe,Ve);var Ne=Object(w.a)(xe);function xe(Le){var Se;Object(D.a)(this,xe),Se=Ne.call(this,Le),Se.popupRef=v.createRef(),Se.triggerRef=v.createRef(),Se.attachId=void 0,Se.clickOutsideHandler=void 0,Se.touchOutsideHandler=void 0,Se.contextMenuOutsideHandler1=void 0,Se.contextMenuOutsideHandler2=void 0,Se.mouseDownTimeout=void 0,Se.focusTime=void 0,Se.preClickTime=void 0,Se.preTouchTime=void 0,Se.delayTimer=void 0,Se.hasPopupMouseDown=void 0,Se.onMouseEnter=function(Be){var ze=Se.props.mouseEnterDelay;Se.fireEvents("onMouseEnter",Be),Se.delaySetPopupVisible(!0,ze,ze?null:Be)},Se.onMouseMove=function(Be){Se.fireEvents("onMouseMove",Be),Se.setPoint(Be)},Se.onMouseLeave=function(Be){Se.fireEvents("onMouseLeave",Be),Se.delaySetPopupVisible(!1,Se.props.mouseLeaveDelay)},Se.onPopupMouseEnter=function(){Se.clearDelayTimer()},Se.onPopupMouseLeave=function(Be){var ze;if(Be.relatedTarget&&!Be.relatedTarget.setTimeout&&Object(Ze.a)((ze=Se.popupRef.current)===null||ze===void 0?void 0:ze.getElement(),Be.relatedTarget))return;Se.delaySetPopupVisible(!1,Se.props.mouseLeaveDelay)},Se.onFocus=function(Be){Se.fireEvents("onFocus",Be),Se.clearDelayTimer(),Se.isFocusToShow()&&(Se.focusTime=Date.now(),Se.delaySetPopupVisible(!0,Se.props.focusDelay))},Se.onMouseDown=function(Be){Se.fireEvents("onMouseDown",Be),Se.preClickTime=Date.now()},Se.onTouchStart=function(Be){Se.fireEvents("onTouchStart",Be),Se.preTouchTime=Date.now()},Se.onBlur=function(Be){Se.fireEvents("onBlur",Be),Se.clearDelayTimer(),Se.isBlurToHide()&&Se.delaySetPopupVisible(!1,Se.props.blurDelay)},Se.onContextMenu=function(Be){Be.preventDefault(),Se.fireEvents("onContextMenu",Be),Se.setPopupVisible(!0,Be)},Se.onContextMenuClose=function(){Se.isContextMenuToShow()&&Se.close()},Se.onClick=function(Be){if(Se.fireEvents("onClick",Be),Se.focusTime){var ze;if(Se.preClickTime&&Se.preTouchTime?ze=Math.min(Se.preClickTime,Se.preTouchTime):Se.preClickTime?ze=Se.preClickTime:Se.preTouchTime&&(ze=Se.preTouchTime),Math.abs(ze-Se.focusTime)<20)return;Se.focusTime=0}Se.preClickTime=0,Se.preTouchTime=0,Se.isClickToShow()&&(Se.isClickToHide()||Se.isBlurToHide())&&Be&&Be.preventDefault&&Be.preventDefault();var Ke=!Se.state.popupVisible;(Se.isClickToHide()&&!Ke||Ke&&Se.isClickToShow())&&Se.setPopupVisible(!Se.state.popupVisible,Be)},Se.onPopupMouseDown=function(){if(Se.hasPopupMouseDown=!0,clearTimeout(Se.mouseDownTimeout),Se.mouseDownTimeout=window.setTimeout(function(){Se.hasPopupMouseDown=!1},0),Se.context){var Be;(Be=Se.context).onPopupMouseDown.apply(Be,arguments)}},Se.onDocumentClick=function(Be){if(Se.props.mask&&!Se.props.maskClosable)return;var ze=Be.target,Ke=Se.getRootDomNode(),Qe=Se.getPopupDomNode();(!Object(Ze.a)(Ke,ze)||Se.isContextMenuOnly())&&!Object(Ze.a)(Qe,ze)&&!Se.hasPopupMouseDown&&Se.close()},Se.getRootDomNode=function(){var Be=Se.props.getTriggerDOMNode;if(Be)return Be(Se.triggerRef.current);try{var ze=Object(qe.a)(Se.triggerRef.current);if(ze)return ze}catch(Ke){}return $e.a.findDOMNode(Object(y.a)(Se))},Se.getPopupClassNameFromAlign=function(Be){var ze=[],Ke=Se.props,Qe=Ke.popupPlacement,ot=Ke.builtinPlacements,vt=Ke.prefixCls,gt=Ke.alignPoint,Ot=Ke.getPopupClassNameFromAlign;return Qe&&ot&&ze.push(ue(ot,vt,Be,gt)),Ot&&ze.push(Ot(Be)),ze.join(" ")},Se.getComponent=function(){var Be=Se.props,ze=Be.prefixCls,Ke=Be.destroyPopupOnHide,Qe=Be.popupClassName,ot=Be.onPopupAlign,vt=Be.popupMotion,gt=Be.popupAnimation,Ot=Be.popupTransitionName,Xt=Be.popupStyle,sr=Be.mask,cr=Be.maskAnimation,fr=Be.maskTransitionName,Er=Be.maskMotion,yr=Be.zIndex,pr=Be.popup,Pr=Be.stretch,Sr=Be.alignPoint,gn=Be.mobile,Cr=Be.forceRender,rr=Se.state,Qt=rr.popupVisible,Or=rr.point,Nr=Se.getPopupAlign(),Vt={};return Se.isMouseEnterToShow()&&(Vt.onMouseEnter=Se.onPopupMouseEnter),Se.isMouseLeaveToHide()&&(Vt.onMouseLeave=Se.onPopupMouseLeave),Vt.onMouseDown=Se.onPopupMouseDown,Vt.onTouchStart=Se.onPopupMouseDown,v.createElement(lr,Object(p.a)({prefixCls:ze,destroyPopupOnHide:Ke,visible:Qt,point:Sr&&Or,className:Qe,align:Nr,onAlign:ot,animation:gt,getClassNameFromAlign:Se.getPopupClassNameFromAlign},Vt,{stretch:Pr,getRootDomNode:Se.getRootDomNode,style:Xt,mask:sr,zIndex:yr,transitionName:Ot,maskAnimation:cr,maskTransitionName:fr,maskMotion:Er,ref:Se.popupRef,motion:vt,mobile:gn,forceRender:Cr}),typeof pr=="function"?pr():pr)},Se.attachParent=function(Be){Ye.a.cancel(Se.attachId);var ze=Se.props,Ke=ze.getPopupContainer,Qe=ze.getDocument,ot=Se.getRootDomNode(),vt;Ke?(ot||Ke.length===0)&&(vt=Ke(ot)):vt=Qe(Se.getRootDomNode()).body,vt?vt.appendChild(Be):Se.attachId=Object(Ye.a)(function(){Se.attachParent(Be)})},Se.getContainer=function(){var Be=Se.props.getDocument,ze=Be(Se.getRootDomNode()).createElement("div");return ze.style.position="absolute",ze.style.top="0",ze.style.left="0",ze.style.width="100%",Se.attachParent(ze),ze},Se.setPoint=function(Be){var ze=Se.props.alignPoint;if(!ze||!Be)return;Se.setState({point:{pageX:Be.pageX,pageY:Be.pageY}})},Se.handlePortalUpdate=function(){Se.state.prevPopupVisible!==Se.state.popupVisible&&Se.props.afterPopupVisibleChange(Se.state.popupVisible)},Se.triggerContextValue={onPopupMouseDown:Se.onPopupMouseDown};var je;return"popupVisible"in Le?je=!!Le.popupVisible:je=!!Le.defaultPopupVisible,Se.state={prevPopupVisible:je,popupVisible:je},$i.forEach(function(Be){Se["fire".concat(Be)]=function(ze){Se.fireEvents(Be,ze)}}),Se}return Object(R.a)(xe,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Se=this.props,je=this.state;if(je.popupVisible){var Be;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(Be=Se.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Ie.a)(Be,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(Be=Be||Se.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Ie.a)(Be,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(Be=Be||Se.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Ie.a)(Be,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(Ie.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),Ye.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var Se;return((Se=this.popupRef.current)===null||Se===void 0?void 0:Se.getElement())||null}},{key:"getPopupAlign",value:function(){var Se=this.props,je=Se.popupPlacement,Be=Se.popupAlign,ze=Se.builtinPlacements;return je&&ze?ye(ze,je,Be):Be}},{key:"setPopupVisible",value:function(Se,je){var Be=this.props.alignPoint,ze=this.state.popupVisible;this.clearDelayTimer(),ze!==Se&&("popupVisible"in this.props||this.setState({popupVisible:Se,prevPopupVisible:ze}),this.props.onPopupVisibleChange(Se)),Be&&je&&Se&&this.setPoint(je)}},{key:"delaySetPopupVisible",value:function(Se,je,Be){var ze=this,Ke=je*1e3;if(this.clearDelayTimer(),Ke){var Qe=Be?{pageX:Be.pageX,pageY:Be.pageY}:null;this.delayTimer=window.setTimeout(function(){ze.setPopupVisible(Se,Qe),ze.clearDelayTimer()},Ke)}else this.setPopupVisible(Se,Be)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(Se){var je=this.props.children.props,Be=this.props;return je[Se]&&Be[Se]?this["fire".concat(Se)]:je[Se]||Be[Se]}},{key:"isClickToShow",value:function(){var Se=this.props,je=Se.action,Be=Se.showAction;return je.indexOf("click")!==-1||Be.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var Se=this.props.action;return Se==="contextMenu"||Se.length===1&&Se[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var Se=this.props,je=Se.action,Be=Se.showAction;return je.indexOf("contextMenu")!==-1||Be.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var Se=this.props,je=Se.action,Be=Se.hideAction;return je.indexOf("click")!==-1||Be.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var Se=this.props,je=Se.action,Be=Se.showAction;return je.indexOf("hover")!==-1||Be.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var Se=this.props,je=Se.action,Be=Se.hideAction;return je.indexOf("hover")!==-1||Be.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var Se=this.props,je=Se.action,Be=Se.showAction;return je.indexOf("focus")!==-1||Be.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var Se=this.props,je=Se.action,Be=Se.hideAction;return je.indexOf("focus")!==-1||Be.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var Se;(Se=this.popupRef.current)===null||Se===void 0||Se.forceAlign()}}},{key:"fireEvents",value:function(Se,je){var Be=this.props.children.props[Se];Be&&Be(je);var ze=this.props[Se];ze&&ze(je)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var Se=this.state.popupVisible,je=this.props,Be=je.children,ze=je.forceRender,Ke=je.alignPoint,Qe=je.className,ot=je.autoDestroy,vt=v.Children.only(Be),gt={key:"trigger"};this.isContextMenuToShow()?gt.onContextMenu=this.onContextMenu:gt.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(gt.onClick=this.onClick,gt.onMouseDown=this.onMouseDown,gt.onTouchStart=this.onTouchStart):(gt.onClick=this.createTwoChains("onClick"),gt.onMouseDown=this.createTwoChains("onMouseDown"),gt.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(gt.onMouseEnter=this.onMouseEnter,Ke&&(gt.onMouseMove=this.onMouseMove)):gt.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?gt.onMouseLeave=this.onMouseLeave:gt.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(gt.onFocus=this.onFocus,gt.onBlur=this.onBlur):(gt.onFocus=this.createTwoChains("onFocus"),gt.onBlur=this.createTwoChains("onBlur"));var Ot=C()(vt&&vt.props&&vt.props.className,Qe);Ot&&(gt.className=Ot);var Xt=Object(k.a)({},gt);Object(Pe.c)(vt)&&(Xt.ref=Object(Pe.a)(this.triggerRef,vt.ref));var sr=v.cloneElement(vt,Xt),cr;return(Se||this.popupRef.current||ze)&&(cr=v.createElement(ke,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!Se&&ot&&(cr=null),v.createElement(Rr.Provider,{value:this.triggerContextValue},sr,cr)}}],[{key:"getDerivedStateFromProps",value:function(Se,je){var Be=Se.popupVisible,ze={};return Be!==void 0&&je.popupVisible!==Be&&(ze.popupVisible=Be,ze.prevPopupVisible=je.popupVisible),ze}}]),xe}(v.Component);return Ge.contextType=Rr,Ge.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:hi,getDocument:Fn,onPopupVisibleChange:br,afterPopupVisibleChange:br,onPopupAlign:br,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},Ge}var Oi=Ji(Je.a),pn={adjustX:1,adjustY:1},Ki={topLeft:{points:["bl","tl"],overflow:pn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:pn,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:pn,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:pn,offset:[4,0]}},Zr={topLeft:{points:["bl","tl"],overflow:pn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:pn,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:pn,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:pn,offset:[4,0]}},ri=Ki,kn=0,sn={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},Tn=function(Ge,Ve,Ne){var xe=ie(Ve),Le=Ge.getState();Ge.setState({defaultActiveFirst:Object(k.a)(Object(k.a)({},Le.defaultActiveFirst),{},Object(N.a)({},xe,Ne))})},fi=function(ke){Object(x.a)(Ve,ke);var Ge=Object(w.a)(Ve);function Ve(Ne){var xe;Object(D.a)(this,Ve),xe=Ge.call(this,Ne),xe.onDestroy=function(Ke){xe.props.onDestroy(Ke)},xe.onKeyDown=function(Ke){var Qe=Ke.keyCode,ot=xe.menuInstance,vt=xe.props.store,gt=xe.getVisible();if(Qe===f.a.ENTER)return xe.onTitleClick(Ke),Tn(vt,xe.props.eventKey,!0),!0;if(Qe===f.a.RIGHT)return gt?ot.onKeyDown(Ke):(xe.triggerOpenChange(!0),Tn(vt,xe.props.eventKey,!0)),!0;if(Qe===f.a.LEFT){var Ot;if(gt)Ot=ot.onKeyDown(Ke);else return;return Ot||(xe.triggerOpenChange(!1),Ot=!0),Ot}return gt&&(Qe===f.a.UP||Qe===f.a.DOWN)?ot.onKeyDown(Ke):void 0},xe.onOpenChange=function(Ke){xe.props.onOpenChange(Ke)},xe.onPopupVisibleChange=function(Ke){xe.triggerOpenChange(Ke,Ke?"mouseenter":"mouseleave")},xe.onMouseEnter=function(Ke){var Qe=xe.props,ot=Qe.eventKey,vt=Qe.onMouseEnter,gt=Qe.store;Tn(gt,xe.props.eventKey,!1),vt({key:ot,domEvent:Ke})},xe.onMouseLeave=function(Ke){var Qe=xe.props,ot=Qe.parentMenu,vt=Qe.eventKey,gt=Qe.onMouseLeave;ot.subMenuInstance=Object(y.a)(xe),gt({key:vt,domEvent:Ke})},xe.onTitleMouseEnter=function(Ke){var Qe=xe.props,ot=Qe.eventKey,vt=Qe.onItemHover,gt=Qe.onTitleMouseEnter;vt({key:ot,hover:!0}),gt({key:ot,domEvent:Ke})},xe.onTitleMouseLeave=function(Ke){var Qe=xe.props,ot=Qe.parentMenu,vt=Qe.eventKey,gt=Qe.onItemHover,Ot=Qe.onTitleMouseLeave;ot.subMenuInstance=Object(y.a)(xe),gt({key:vt,hover:!1}),Ot({key:vt,domEvent:Ke})},xe.onTitleClick=function(Ke){var Qe=Object(y.a)(xe),ot=Qe.props;if(ot.onTitleClick({key:ot.eventKey,domEvent:Ke}),ot.triggerSubMenuAction==="hover")return;xe.triggerOpenChange(!xe.getVisible(),"click"),Tn(ot.store,xe.props.eventKey,!1)},xe.onSubMenuClick=function(Ke){typeof xe.props.onClick=="function"&&xe.props.onClick(xe.addKeyPath(Ke))},xe.onSelect=function(Ke){xe.props.onSelect(Ke)},xe.onDeselect=function(Ke){xe.props.onDeselect(Ke)},xe.getPrefixCls=function(){return"".concat(xe.props.rootPrefixCls,"-submenu")},xe.getActiveClassName=function(){return"".concat(xe.getPrefixCls(),"-active")},xe.getDisabledClassName=function(){return"".concat(xe.getPrefixCls(),"-disabled")},xe.getSelectedClassName=function(){return"".concat(xe.getPrefixCls(),"-selected")},xe.getOpenClassName=function(){return"".concat(xe.props.rootPrefixCls,"-submenu-open")},xe.getVisible=function(){return xe.state.isOpen},xe.getMode=function(){return xe.state.mode},xe.saveMenuInstance=function(Ke){xe.menuInstance=Ke},xe.addKeyPath=function(Ke){return Object(k.a)(Object(k.a)({},Ke),{},{keyPath:(Ke.keyPath||[]).concat(xe.props.eventKey)})},xe.triggerOpenChange=function(Ke,Qe){var ot=xe.props.eventKey,vt=function(){xe.onOpenChange({key:ot,item:Object(y.a)(xe),trigger:Qe,open:Ke})};Qe==="mouseenter"?xe.mouseenterTimeout=setTimeout(function(){vt()},0):vt()},xe.isChildrenSelected=function(){var Ke={find:!1};return J(xe.props.children,xe.props.selectedKeys,Ke),Ke.find},xe.isInlineMode=function(){return xe.getMode()==="inline"},xe.adjustWidth=function(){if(!xe.subMenuTitle||!xe.menuInstance)return;var Ke=Xe.findDOMNode(xe.menuInstance);if(Ke.offsetWidth>=xe.subMenuTitle.offsetWidth)return;Ke.style.minWidth="".concat(xe.subMenuTitle.offsetWidth,"px")},xe.saveSubMenuTitle=function(Ke){xe.subMenuTitle=Ke},xe.getBaseProps=function(){var Ke=Object(y.a)(xe),Qe=Ke.props,ot=xe.getMode();return{mode:ot==="horizontal"?"vertical":ot,visible:xe.getVisible(),level:Qe.level+1,inlineIndent:Qe.inlineIndent,focusable:!1,onClick:xe.onSubMenuClick,onSelect:xe.onSelect,onDeselect:xe.onDeselect,onDestroy:xe.onDestroy,selectedKeys:Qe.selectedKeys,eventKey:"".concat(Qe.eventKey,"-menu-"),openKeys:Qe.openKeys,motion:Qe.motion,onOpenChange:xe.onOpenChange,subMenuOpenDelay:Qe.subMenuOpenDelay,parentMenu:Object(y.a)(xe),subMenuCloseDelay:Qe.subMenuCloseDelay,forceSubMenuRender:Qe.forceSubMenuRender,triggerSubMenuAction:Qe.triggerSubMenuAction,builtinPlacements:Qe.builtinPlacements,defaultActiveFirst:Qe.store.getState().defaultActiveFirst[ie(Qe.eventKey)],multiple:Qe.multiple,prefixCls:Qe.rootPrefixCls,id:xe.internalMenuId,manualRef:xe.saveMenuInstance,itemIcon:Qe.itemIcon,expandIcon:Qe.expandIcon,direction:Qe.direction}},xe.getMotion=function(Ke,Qe){var ot=Object(y.a)(xe),vt=ot.haveRendered,gt=xe.props,Ot=gt.motion,Xt=gt.rootPrefixCls,sr=Object(k.a)(Object(k.a)({},Ot),{},{leavedClassName:"".concat(Xt,"-hidden"),removeOnLeave:!1,motionAppear:vt||!Qe||Ke!=="inline"});return sr};var Le=Ne.store,Se=Ne.eventKey,je=Le.getState(),Be=je.defaultActiveFirst;xe.isRootMenu=!1;var ze=!1;return Be&&(ze=Be[Se]),Tn(Le,Se,ze),xe.state={mode:Ne.mode,isOpen:Ne.isOpen},xe}return Object(R.a)(Ve,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var xe=this,Le=this.props,Se=Le.mode,je=Le.parentMenu,Be=Le.manualRef,ze=Le.isOpen,Ke=function(){xe.setState({mode:Se,isOpen:ze})},Qe=ze!==this.state.isOpen,ot=Se!==this.state.mode;if((ot||Qe)&&(Ye.a.cancel(this.updateStateRaf),ot?this.updateStateRaf=Object(Ye.a)(Ke):Ke()),Be&&Be(this),Se!=="horizontal"||!(je==null?void 0:je.isRootMenu)||!ze)return;this.minWidthTimeout=setTimeout(function(){return xe.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var xe=this.props,Le=xe.onDestroy,Se=xe.eventKey;Le&&Le(Se),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),Ye.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(xe,Le){var Se=this.getBaseProps();return v.createElement(Fi,Object(p.a)({},Se,{id:this.internalMenuId,className:xe,style:Le}),this.props.children)}},{key:"renderChildren",value:function(){var xe=this,Le=this.getBaseProps(),Se=Le.mode,je=Le.visible,Be=Le.forceSubMenuRender,ze=Le.direction,Ke=this.getMotion(Se,je);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||je||Be,!this.haveOpened)return v.createElement("div",null);var Qe=C()("".concat(Le.prefixCls,"-sub"),Object(N.a)({},"".concat(Le.prefixCls,"-rtl"),ze==="rtl"));return this.isInlineMode()?v.createElement(jr,Object(p.a)({visible:Le.visible,forceRender:Be},Ke),function(ot){var vt=ot.className,gt=ot.style,Ot=C()(Qe,vt);return xe.renderPopupMenu(Ot,gt)}):this.renderPopupMenu(Qe)}},{key:"render",value:function(){var xe,Le,Se,je=Object(k.a)({},this.props),Be=this.getVisible(),ze=this.getPrefixCls(),Ke=this.isInlineMode(),Qe=this.getMode(),ot=C()(ze,"".concat(ze,"-").concat(Qe),(xe={},Object(N.a)(xe,je.className,!!je.className),Object(N.a)(xe,this.getOpenClassName(),Be),Object(N.a)(xe,this.getActiveClassName(),je.active||Be&&!Ke),Object(N.a)(xe,this.getDisabledClassName(),je.disabled),Object(N.a)(xe,this.getSelectedClassName(),this.isChildrenSelected()),xe));this.internalMenuId||(je.eventKey?this.internalMenuId="".concat(je.eventKey,"$Menu"):(kn+=1,this.internalMenuId="$__$".concat(kn,"$Menu")));var vt={},gt={},Ot={};je.disabled||(vt={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},gt={onClick:this.onTitleClick},Ot={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Xt={},sr=je.direction,cr=sr==="rtl";Ke&&(cr?Xt.paddingRight=je.inlineIndent*je.level:Xt.paddingLeft=je.inlineIndent*je.level);var fr={};this.getVisible()&&(fr={"aria-owns":this.internalMenuId});var Er=null;Qe!=="horizontal"&&(Er=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Er=v.createElement(this.props.expandIcon,Object(k.a)({},this.props))));var yr=v.createElement("div",Object(p.a)({ref:this.saveSubMenuTitle,style:Xt,className:"".concat(ze,"-title"),role:"button"},Ot,gt,{"aria-expanded":Be},fr,{"aria-haspopup":"true",title:typeof je.title=="string"?je.title:void 0}),je.title,Er||v.createElement("i",{className:"".concat(ze,"-arrow")})),pr=this.renderChildren(),Pr=((Le=je.parentMenu)===null||Le===void 0?void 0:Le.isRootMenu)?je.parentMenu.props.getPopupContainer:function(Jr){return Jr.parentNode},Sr=sn[Qe],gn=je.popupOffset?{offset:je.popupOffset}:{},Cr=C()((Se={},Object(N.a)(Se,je.popupClassName,je.popupClassName&&!Ke),Object(N.a)(Se,"".concat(ze,"-rtl"),cr),Se)),rr=je.disabled,Qt=je.triggerSubMenuAction,Or=je.subMenuOpenDelay,Nr=je.forceSubMenuRender,Vt=je.subMenuCloseDelay,Br=je.builtinPlacements;$.forEach(function(Jr){return delete je[Jr]}),delete je.onClick;var vn=cr?Object(k.a)(Object(k.a)({},Zr),Br):Object(k.a)(Object(k.a)({},Ki),Br);delete je.direction;var Gr=this.getBaseProps(),en=Ke?null:this.getMotion(Gr.mode,Gr.visible);return v.createElement("li",Object(p.a)({},je,vt,{className:ot,role:"menuitem"}),v.createElement(Oi,{prefixCls:ze,popupClassName:C()("".concat(ze,"-popup"),Cr),getPopupContainer:Pr,builtinPlacements:vn,popupPlacement:Sr,popupVisible:Ke?!1:Be,popupAlign:gn,popup:Ke?null:pr,action:rr||Ke?[]:[Qt],mouseEnterDelay:Or,mouseLeaveDelay:Vt,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:Nr,popupMotion:en},yr),Ke?pr:null)}}]),Ve}(v.Component);fi.defaultProps={onMouseEnter:Q,onMouseLeave:Q,onTitleMouseEnter:Q,onTitleMouseLeave:Q,onTitleClick:Q,manualRef:Q,mode:"vertical",title:""};var zn=Object(T.b)(function(ke,Ge){var Ve=ke.openKeys,Ne=ke.activeKey,xe=ke.selectedKeys,Le=Ge.eventKey,Se=Ge.subMenuKey;return{isOpen:Ve.indexOf(Le)>-1,active:Ne[Se]===Le,selectedKeys:xe}})(fi);zn.isSubMenu=!0;var Vn=zn,ki="menuitem-overflowed",Mi=.5,Xn=function(ke){Object(x.a)(Ve,ke);var Ge=Object(w.a)(Ve);function Ve(){var Ne;return Object(D.a)(this,Ve),Ne=Ge.apply(this,arguments),Ne.resizeObserver=null,Ne.mutationObserver=null,Ne.originalTotalWidth=0,Ne.overflowedItems=[],Ne.menuItemSizes=[],Ne.cancelFrameId=null,Ne.state={lastVisibleIndex:void 0},Ne.childRef=v.createRef(),Ne.getMenuItemNodes=function(){var xe=Ne.props.prefixCls,Le=Ne.childRef.current;return Le?[].slice.call(Le.children).filter(function(Se){return Se.className.split(" ").indexOf("".concat(xe,"-overflowed-submenu"))<0}):[]},Ne.getOverflowedSubMenuItem=function(xe,Le,Se){var je=Ne.props,Be=je.overflowedIndicator,ze=je.level,Ke=je.mode,Qe=je.prefixCls,ot=je.theme;if(ze!==1||Ke!=="horizontal")return null;var vt=Ne.props.children[0],gt=vt.props,Ot=gt.children,Xt=gt.title,sr=gt.style,cr=Object(S.a)(gt,["children","title","style"]),fr=Object(k.a)({},sr),Er="".concat(xe,"-overflowed-indicator"),yr="".concat(xe,"-overflowed-indicator");Le.length===0&&Se!==!0?fr=Object(k.a)(Object(k.a)({},fr),{},{display:"none"}):Se&&(fr=Object(k.a)(Object(k.a)({},fr),{},{visibility:"hidden",position:"absolute"}),Er="".concat(Er,"-placeholder"),yr="".concat(yr,"-placeholder"));var pr=ot?"".concat(Qe,"-").concat(ot):"",Pr={};return $.forEach(function(Sr){cr[Sr]!==void 0&&(Pr[Sr]=cr[Sr])}),v.createElement(Vn,Object(p.a)({title:Be,className:"".concat(Qe,"-overflowed-submenu"),popupClassName:pr},Pr,{key:Er,eventKey:yr,disabled:!1,style:fr}),Le)},Ne.setChildrenWidthAndResize=function(){if(Ne.props.mode!=="horizontal")return;var xe=Ne.childRef.current;if(!xe)return;var Le=xe.children;if(!Le||Le.length===0)return;var Se=xe.children[Le.length-1];ce(Se,"display","inline-block");var je=Ne.getMenuItemNodes(),Be=je.filter(function(ze){return ze.className.split(" ").indexOf(ki)>=0});Be.forEach(function(ze){ce(ze,"display","inline-block")}),Ne.menuItemSizes=je.map(function(ze){return le(ze,!0)}),Be.forEach(function(ze){ce(ze,"display","none")}),Ne.overflowedIndicatorWidth=le(xe.children[xe.children.length-1],!0),Ne.originalTotalWidth=Ne.menuItemSizes.reduce(function(ze,Ke){return ze+Ke},0),Ne.handleResize(),ce(Se,"display","none")},Ne.handleResize=function(){if(Ne.props.mode!=="horizontal")return;var xe=Ne.childRef.current;if(!xe)return;var Le=le(xe);Ne.overflowedItems=[];var Se=0,je;Ne.originalTotalWidth>Le+Mi&&(je=-1,Ne.menuItemSizes.forEach(function(Be){Se+=Be,Se+Ne.overflowedIndicatorWidth<=Le&&(je+=1)})),Ne.setState({lastVisibleIndex:je})},Ne}return Object(R.a)(Ve,[{key:"componentDidMount",value:function(){var xe=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Le=this.childRef.current;if(!Le)return;this.resizeObserver=new Fe.default(function(Se){Se.forEach(function(){var je=xe.cancelFrameId;cancelAnimationFrame(je),xe.cancelFrameId=requestAnimationFrame(xe.setChildrenWidthAndResize)})}),[].slice.call(Le.children).concat(Le).forEach(function(Se){xe.resizeObserver.observe(Se)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){xe.resizeObserver.disconnect(),[].slice.call(Le.children).concat(Le).forEach(function(Se){xe.resizeObserver.observe(Se)}),xe.setChildrenWidthAndResize()}),this.mutationObserver.observe(Le,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(xe){var Le=this,Se=this.state.lastVisibleIndex;return(xe||[]).reduce(function(je,Be,ze){var Ke=Be;if(Le.props.mode==="horizontal"){var Qe=Le.getOverflowedSubMenuItem(Be.props.eventKey,[]);Se!==void 0&&Le.props.className.indexOf("".concat(Le.props.prefixCls,"-root"))!==-1&&(ze>Se&&(Ke=v.cloneElement(Be,{style:{display:"none"},eventKey:"".concat(Be.props.eventKey,"-hidden"),className:"".concat(ki)})),ze===Se+1&&(Le.overflowedItems=xe.slice(Se+1).map(function(vt){return v.cloneElement(vt,{key:vt.props.eventKey,mode:"vertical-left"})}),Qe=Le.getOverflowedSubMenuItem(Be.props.eventKey,Le.overflowedItems)));var ot=[].concat(Object(h.a)(je),[Qe,Ke]);return ze===xe.length-1&&ot.push(Le.getOverflowedSubMenuItem(Be.props.eventKey,[],!0)),ot}return[].concat(Object(h.a)(je),[Ke])},[])}},{key:"render",value:function(){var xe=this.props,Le=xe.visible,Se=xe.prefixCls,je=xe.overflowedIndicator,Be=xe.mode,ze=xe.level,Ke=xe.tag,Qe=xe.children,ot=xe.theme,vt=Object(S.a)(xe,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),gt=Ke;return v.createElement(gt,Object(p.a)({ref:this.childRef},vt),this.renderChildren(Qe))}}]),Ve}(v.Component);Xn.defaultProps={tag:"div",className:""};var ji=Xn;function pi(ke){return ke.length?ke.every(function(Ge){return!!Ge.props.disabled}):!0}function mi(ke,Ge,Ve){var Ne=ke.getState();ke.setState({activeKey:Object(k.a)(Object(k.a)({},Ne.activeKey),{},Object(N.a)({},Ge,Ve))})}function Yn(ke){return ke.eventKey||"0-menu-"}function $n(ke,Ge){var Ve=Ge,Ne=ke.children,xe=ke.eventKey;if(Ve){var Le;if(ne(Ne,function(Se,je){Se&&Se.props&&!Se.props.disabled&&Ve===q(Se,xe,je)&&(Le=!0)}),Le)return Ve}return Ve=null,ke.defaultActiveFirst&&ne(Ne,function(Se,je){!Ve&&Se&&!Se.props.disabled&&(Ve=q(Se,xe,je))}),Ve}function Pi(ke){if(!ke)return;var Ge=this.instanceArray.indexOf(ke);Ge!==-1?this.instanceArray[Ge]=ke:this.instanceArray.push(ke)}var ni=function(ke){Object(x.a)(Ve,ke);var Ge=Object(w.a)(Ve);function Ve(Ne){var xe;return Object(D.a)(this,Ve),xe=Ge.call(this,Ne),xe.onKeyDown=function(Le,Se){var je=Le.keyCode,Be;if(xe.getFlatInstanceArray().forEach(function(Ke){Ke&&Ke.props.active&&Ke.onKeyDown&&(Be=Ke.onKeyDown(Le))}),Be)return 1;var ze=null;return(je===f.a.UP||je===f.a.DOWN)&&(ze=xe.step(je===f.a.UP?-1:1)),ze?(Le.preventDefault(),mi(xe.props.store,Yn(xe.props),ze.props.eventKey),typeof Se=="function"&&Se(ze),1):void 0},xe.onItemHover=function(Le){var Se=Le.key,je=Le.hover;mi(xe.props.store,Yn(xe.props),je?Se:null)},xe.onDeselect=function(Le){xe.props.onDeselect(Le)},xe.onSelect=function(Le){xe.props.onSelect(Le)},xe.onClick=function(Le){xe.props.onClick(Le)},xe.onOpenChange=function(Le){xe.props.onOpenChange(Le)},xe.onDestroy=function(Le){xe.props.onDestroy(Le)},xe.getFlatInstanceArray=function(){return xe.instanceArray},xe.step=function(Le){var Se=xe.getFlatInstanceArray(),je=xe.props.store.getState().activeKey[Yn(xe.props)],Be=Se.length;if(!Be)return null;Le<0&&(Se=Se.concat().reverse());var ze=-1;if(Se.every(function(vt,gt){return vt&&vt.props.eventKey===je?(ze=gt,!1):!0}),!xe.props.defaultActiveFirst&&ze!==-1&&pi(Se.slice(ze,Be-1)))return;var Ke=(ze+1)%Be,Qe=Ke;do{var ot=Se[Qe];if(!ot||ot.props.disabled)Qe=(Qe+1)%Be;else return ot}while(Qe!==Ke);return null},xe.renderCommonMenuItem=function(Le,Se,je){var Be=xe.props.store.getState(),ze=Object(y.a)(xe),Ke=ze.props,Qe=q(Le,Ke.eventKey,Se),ot=Le.props;if(!ot||typeof Le.type=="string")return Le;var vt=Qe===Be.activeKey,gt=Object(k.a)(Object(k.a)({mode:ot.mode||Ke.mode,level:Ke.level,inlineIndent:Ke.inlineIndent,renderMenuItem:xe.renderMenuItem,rootPrefixCls:Ke.prefixCls,index:Se,parentMenu:Ke.parentMenu,manualRef:ot.disabled?void 0:Object(P.a)(Le.ref,Pi.bind(Object(y.a)(xe))),eventKey:Qe,active:!ot.disabled&&vt,multiple:Ke.multiple,onClick:function(Xt){(ot.onClick||Q)(Xt),xe.onClick(Xt)},onItemHover:xe.onItemHover,motion:Ke.motion,subMenuOpenDelay:Ke.subMenuOpenDelay,subMenuCloseDelay:Ke.subMenuCloseDelay,forceSubMenuRender:Ke.forceSubMenuRender,onOpenChange:xe.onOpenChange,onDeselect:xe.onDeselect,onSelect:xe.onSelect,builtinPlacements:Ke.builtinPlacements,itemIcon:ot.itemIcon||xe.props.itemIcon,expandIcon:ot.expandIcon||xe.props.expandIcon},je),{},{direction:Ke.direction});return(Ke.mode==="inline"||we())&&(gt.triggerSubMenuAction="click"),v.cloneElement(Le,Object(k.a)(Object(k.a)({},gt),{},{key:Qe||Se}))},xe.renderMenuItem=function(Le,Se,je){if(!Le)return null;var Be=xe.props.store.getState(),ze={openKeys:Be.openKeys,selectedKeys:Be.selectedKeys,triggerSubMenuAction:xe.props.triggerSubMenuAction,subMenuKey:je};return xe.renderCommonMenuItem(Le,Se,ze)},Ne.store.setState({activeKey:Object(k.a)(Object(k.a)({},Ne.store.getState().activeKey),{},Object(N.a)({},Ne.eventKey,$n(Ne,Ne.activeKey)))}),xe.instanceArray=[],xe}return Object(R.a)(Ve,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(xe){return this.props.visible||xe.visible||this.props.className!==xe.className||!X()(this.props.style,xe.style)}},{key:"componentDidUpdate",value:function(xe){var Le=this.props,Se="activeKey"in Le?Le.activeKey:Le.store.getState().activeKey[Yn(Le)],je=$n(Le,Se);if(je!==Se)mi(Le.store,Yn(Le),je);else if("activeKey"in xe){var Be=$n(xe,xe.activeKey);je!==Be&&mi(Le.store,Yn(Le),je)}}},{key:"render",value:function(){var xe=this,Le=Object(p.a)({},this.props);this.instanceArray=[];var Se=C()(Le.prefixCls,Le.className,"".concat(Le.prefixCls,"-").concat(Le.mode)),je={className:Se,role:Le.role||"menu"};Le.id&&(je.id=Le.id),Le.focusable&&(je.tabIndex=0,je.onKeyDown=this.onKeyDown);var Be=Le.prefixCls,ze=Le.eventKey,Ke=Le.visible,Qe=Le.level,ot=Le.mode,vt=Le.overflowedIndicator,gt=Le.theme;return $.forEach(function(Ot){return delete Le[Ot]}),delete Le.onClick,v.createElement(ji,Object(p.a)({},Le,{prefixCls:Be,mode:ot,tag:"ul",level:Qe,theme:gt,visible:Ke,overflowedIndicator:vt},je),Object(_.a)(Le.children).map(function(Ot,Xt){return xe.renderMenuItem(Ot,Xt,ze||"0-menu-")}))}}]),Ve}(v.Component);ni.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:Q};var gi=Object(T.b)()(ni),Fi=gi,ii=I("Kwbf");function Ur(ke,Ge,Ve){var Ne=ke.prefixCls,xe=ke.motion,Le=ke.defaultMotions,Se=Le===void 0?{}:Le,je=ke.openAnimation,Be=ke.openTransitionName,ze=Ge.switchingModeFromInline;if(xe)return xe;if(Object(z.a)(je)==="object"&&je)Object(ii.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof je=="string")return{motionName:"".concat(Ne,"-open-").concat(je)};if(Be)return{motionName:Be};var Ke=Se[Ve];return Ke||(ze?null:Se.other)}var Ut=function(ke){Object(x.a)(Ve,ke);var Ge=Object(w.a)(Ve);function Ve(Ne){var xe;Object(D.a)(this,Ve),xe=Ge.call(this,Ne),xe.onSelect=function(je){var Be=Object(y.a)(xe),ze=Be.props;if(ze.selectable){var Ke=xe.store.getState(),Qe=Ke.selectedKeys,ot=je.key;ze.multiple?Qe=Qe.concat([ot]):Qe=[ot],"selectedKeys"in ze||xe.store.setState({selectedKeys:Qe}),ze.onSelect(Object(k.a)(Object(k.a)({},je),{},{selectedKeys:Qe}))}},xe.onClick=function(je){var Be=xe.getRealMenuMode(),ze=Object(y.a)(xe),Ke=ze.store,Qe=ze.props.onOpenChange;Be!=="inline"&&!("openKeys"in xe.props)&&(Ke.setState({openKeys:[]}),Qe([])),xe.props.onClick(je)},xe.onKeyDown=function(je,Be){xe.innerMenu.getWrappedInstance().onKeyDown(je,Be)},xe.onOpenChange=function(je){var Be=Object(y.a)(xe),ze=Be.props,Ke=xe.store.getState().openKeys.concat(),Qe=!1,ot=function(gt){var Ot=!1;if(gt.open)Ot=Ke.indexOf(gt.key)===-1,Ot&&Ke.push(gt.key);else{var Xt=Ke.indexOf(gt.key);Ot=Xt!==-1,Ot&&Ke.splice(Xt,1)}Qe=Qe||Ot};Array.isArray(je)?je.forEach(ot):ot(je),Qe&&("openKeys"in xe.props||xe.store.setState({openKeys:Ke}),ze.onOpenChange(Ke))},xe.onDeselect=function(je){var Be=Object(y.a)(xe),ze=Be.props;if(ze.selectable){var Ke=xe.store.getState().selectedKeys.concat(),Qe=je.key,ot=Ke.indexOf(Qe);ot!==-1&&Ke.splice(ot,1),"selectedKeys"in ze||xe.store.setState({selectedKeys:Ke}),ze.onDeselect(Object(k.a)(Object(k.a)({},je),{},{selectedKeys:Ke}))}},xe.onMouseEnter=function(je){xe.restoreModeVerticalFromInline();var Be=xe.props.onMouseEnter;Be&&Be(je)},xe.onTransitionEnd=function(je){var Be=je.propertyName==="width"&&je.target===je.currentTarget,ze=je.target.className,Ke=Object.prototype.toString.call(ze)==="[object SVGAnimatedString]"?ze.animVal:ze,Qe=je.propertyName==="font-size"&&Ke.indexOf("anticon")>=0;(Be||Qe)&&xe.restoreModeVerticalFromInline()},xe.setInnerMenu=function(je){xe.innerMenu=je},xe.isRootMenu=!0;var Le=Ne.defaultSelectedKeys,Se=Ne.defaultOpenKeys;return"selectedKeys"in Ne&&(Le=Ne.selectedKeys||[]),"openKeys"in Ne&&(Se=Ne.openKeys||[]),xe.store=Object(T.c)({selectedKeys:Le,openKeys:Se,activeKey:{"0-menu-":$n(Ne,Ne.activeKey)}}),xe.state={switchingModeFromInline:!1,prevProps:Ne,inlineOpenKeys:[],store:xe.store},xe}return Object(R.a)(Ve,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(xe){var Le=this.props,Se=Le.siderCollapsed,je=Le.inlineCollapsed,Be=Le.onOpenChange;(!xe.inlineCollapsed&&je||!xe.siderCollapsed&&Se)&&Be([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var xe=this.props.collapsedWidth,Le=this.store,Se=this.prevOpenKeys,je=this.getInlineCollapsed()&&(xe===0||xe==="0"||xe==="0px");je?(this.prevOpenKeys=Le.getState().openKeys.concat(),this.store.setState({openKeys:[]})):Se&&(this.store.setState({openKeys:Se}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var xe=this.props.mode,Le=this.state.switchingModeFromInline,Se=this.getInlineCollapsed();return Le&&Se?"inline":Se?"vertical":xe}},{key:"getInlineCollapsed",value:function(){var xe=this.props,Le=xe.inlineCollapsed,Se=xe.siderCollapsed;return Se!==void 0?Se:Le}},{key:"restoreModeVerticalFromInline",value:function(){var xe=this.state.switchingModeFromInline;xe&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var xe=Object(k.a)({},Object(F.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Le=this.getRealMenuMode();return xe.className+=" ".concat(xe.prefixCls,"-root"),xe.direction==="rtl"&&(xe.className+=" ".concat(xe.prefixCls,"-rtl")),xe=Object(k.a)(Object(k.a)({},xe),{},{mode:Le,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Ur(this.props,this.state,Le)}),delete xe.openAnimation,delete xe.openTransitionName,v.createElement(T.a,{store:this.store},v.createElement(Fi,Object(p.a)({},xe,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(xe,Le){var Se=Le.prevProps,je=Le.store,Be=je.getState(),ze={},Ke={prevProps:xe};return Se.mode==="inline"&&xe.mode!=="inline"&&(Ke.switchingModeFromInline=!0),"openKeys"in xe?ze.openKeys=xe.openKeys||[]:((xe.inlineCollapsed&&!Se.inlineCollapsed||xe.siderCollapsed&&!Se.siderCollapsed)&&(Ke.switchingModeFromInline=!0,Ke.inlineOpenKeys=Be.openKeys,ze.openKeys=[]),(!xe.inlineCollapsed&&Se.inlineCollapsed||!xe.siderCollapsed&&Se.siderCollapsed)&&(ze.openKeys=Le.inlineOpenKeys,Ke.inlineOpenKeys=[])),Object.keys(ze).length&&je.setState(ze),Ke}}]),Ve}(v.Component);Ut.defaultProps={selectable:!0,onClick:Q,onSelect:Q,onOpenChange:Q,onDeselect:Q,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:v.createElement("span",null,"\xB7\xB7\xB7")};var er=Ut,zt=function(ke){Object(x.a)(Ve,ke);var Ge=Object(w.a)(Ve);function Ve(){var Ne;return Object(D.a)(this,Ve),Ne=Ge.apply(this,arguments),Ne.onKeyDown=function(xe){var Le=xe.keyCode;return Le===f.a.ENTER?(Ne.onClick(xe),!0):void 0},Ne.onMouseLeave=function(xe){var Le=Ne.props,Se=Le.eventKey,je=Le.onItemHover,Be=Le.onMouseLeave;je({key:Se,hover:!1}),Be({key:Se,domEvent:xe})},Ne.onMouseEnter=function(xe){var Le=Ne.props,Se=Le.eventKey,je=Le.onItemHover,Be=Le.onMouseEnter;je({key:Se,hover:!0}),Be({key:Se,domEvent:xe})},Ne.onClick=function(xe){var Le=Ne.props,Se=Le.eventKey,je=Le.multiple,Be=Le.onClick,ze=Le.onSelect,Ke=Le.onDeselect,Qe=Le.isSelected,ot={key:Se,keyPath:[Se],item:Object(y.a)(Ne),domEvent:xe};Be(ot),je?Qe?Ke(ot):ze(ot):Qe||ze(ot)},Ne.saveNode=function(xe){Ne.node=xe},Ne}return Object(R.a)(Ve,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var xe=this.props;xe.onDestroy&&xe.onDestroy(xe.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var xe,Le=Object(k.a)({},this.props),Se=C()(this.getPrefixCls(),Le.className,(xe={},Object(N.a)(xe,this.getActiveClassName(),!Le.disabled&&Le.active),Object(N.a)(xe,this.getSelectedClassName(),Le.isSelected),Object(N.a)(xe,this.getDisabledClassName(),Le.disabled),xe)),je=Object(k.a)(Object(k.a)({},Le.attribute),{},{title:typeof Le.title=="string"?Le.title:void 0,className:Se,role:Le.role||"menuitem","aria-disabled":Le.disabled});Le.role==="option"?je=Object(k.a)(Object(k.a)({},je),{},{role:"option","aria-selected":Le.isSelected}):(Le.role===null||Le.role==="none")&&(je.role="none");var Be={onClick:Le.disabled?null:this.onClick,onMouseLeave:Le.disabled?null:this.onMouseLeave,onMouseEnter:Le.disabled?null:this.onMouseEnter},ze=Object(k.a)({},Le.style);Le.mode==="inline"&&(Le.direction==="rtl"?ze.paddingRight=Le.inlineIndent*Le.level:ze.paddingLeft=Le.inlineIndent*Le.level),$.forEach(function(Qe){return delete Le[Qe]}),delete Le.direction;var Ke=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(Ke=v.createElement(this.props.itemIcon,this.props)),v.createElement("li",Object(p.a)({},Object(F.a)(Le,["onClick","onMouseEnter","onMouseLeave","onSelect"]),je,Be,{style:ze,ref:this.saveNode}),Le.children,Ke)}}]),Ve}(v.Component);zt.isMenuItem=!0,zt.defaultProps={onSelect:Q,onMouseEnter:Q,onMouseLeave:Q,manualRef:Q};var ar=Object(T.b)(function(ke,Ge){var Ve=ke.activeKey,Ne=ke.selectedKeys,xe=Ge.eventKey,Le=Ge.subMenuKey;return{active:Ve[Le]===xe,isSelected:Array.isArray(Ne)?Ne.indexOf(xe)!==-1:Ne===xe}})(zt),_r=ar,Lr=function(ke){Object(x.a)(Ve,ke);var Ge=Object(w.a)(Ve);function Ve(){var Ne;return Object(D.a)(this,Ve),Ne=Ge.apply(this,arguments),Ne.renderInnerMenuItem=function(xe){var Le=Ne.props,Se=Le.renderMenuItem,je=Le.index;return Se(xe,je,Ne.props.subMenuKey)},Ne}return Object(R.a)(Ve,[{key:"render",value:function(){var xe=Object(p.a)({},this.props),Le=xe.className,Se=Le===void 0?"":Le,je=xe.rootPrefixCls,Be="".concat(je,"-item-group-title"),ze="".concat(je,"-item-group-list"),Ke=xe.title,Qe=xe.children;return $.forEach(function(ot){return delete xe[ot]}),delete xe.direction,v.createElement("li",Object(p.a)({},xe,{onClick:function(vt){return vt.stopPropagation()},className:"".concat(Se," ").concat(je,"-item-group")}),v.createElement("div",{className:Be,title:typeof Ke=="string"?Ke:void 0},Ke),v.createElement("ul",{className:ze},v.Children.map(Qe,this.renderInnerMenuItem)))}}]),Ve}(v.Component);Lr.isMenuItemGroup=!0,Lr.defaultProps={disabled:!0};var mr=Lr,qr=function(Ge){var Ve=Ge.className,Ne=Ge.rootPrefixCls,xe=Ge.style;return v.createElement("li",{className:"".concat(Ve," ").concat(Ne,"-item-divider"),style:xe})};qr.defaultProps={disabled:!0,className:"",style:{}};var Un=qr,hr=er,vi=I("eDIo");function kr(ke,Ge){var Ve=ke.prefixCls,Ne=ke.editable,xe=ke.locale,Le=ke.style;return!Ne||Ne.showAdd===!1?null:v.createElement("button",{ref:Ge,type:"button",className:"".concat(Ve,"-nav-add"),style:Le,"aria-label":(xe==null?void 0:xe.addAriaLabel)||"Add tab",onClick:function(je){Ne.onEdit("add",{event:je})}},Ne.addIcon||"+")}var Sn=v.forwardRef(kr);function Rn(ke,Ge){var Ve=ke.prefixCls,Ne=ke.id,xe=ke.tabs,Le=ke.locale,Se=ke.mobile,je=ke.moreIcon,Be=je===void 0?"More":je,ze=ke.moreTransitionName,Ke=ke.style,Qe=ke.className,ot=ke.editable,vt=ke.tabBarGutter,gt=ke.rtl,Ot=ke.onTabClick,Xt=Object(v.useState)(!1),sr=Object(g.a)(Xt,2),cr=sr[0],fr=sr[1],Er=Object(v.useState)(null),yr=Object(g.a)(Er,2),pr=yr[0],Pr=yr[1],Sr="".concat(Ne,"-more-popup"),gn="".concat(Ve,"-dropdown"),Cr=pr!==null?"".concat(Sr,"-").concat(pr):null,rr=Le==null?void 0:Le.dropdownAriaLabel,Qt=v.createElement(hr,{onClick:function(en){var Jr=en.key,Dn=en.domEvent;Ot(Jr,Dn),fr(!1)},id:Sr,tabIndex:-1,role:"listbox","aria-activedescendant":Cr,selectedKeys:[pr],"aria-label":rr!==void 0?rr:"expanded dropdown"},xe.map(function(Gr){return v.createElement(_r,{key:Gr.key,id:"".concat(Sr,"-").concat(Gr.key),role:"option","aria-controls":Ne&&"".concat(Ne,"-panel-").concat(Gr.key),disabled:Gr.disabled},Gr.tab)}));function Or(Gr){for(var en=xe.filter(function(yi){return!yi.disabled}),Jr=en.findIndex(function(yi){return yi.key===pr})||0,Dn=en.length,Jn=0;JnBr?(Nr=Qt,Sr.current="x"):(Nr=Or,Sr.current="y");var vn=Date.now();vn-pr.current>100&&(Pr.current=!1),(Ge(-Nr,-Nr)||Pr.current)&&(rr.preventDefault(),Pr.current=!0),pr.current=vn}var Cr=Object(v.useRef)(null);Cr.current={onTouchStart:fr,onTouchMove:Er,onTouchEnd:yr,onWheel:gn},v.useEffect(function(){function rr(Vt){Cr.current.onTouchStart(Vt)}function Qt(Vt){Cr.current.onTouchMove(Vt)}function Or(Vt){Cr.current.onTouchEnd(Vt)}function Nr(Vt){Cr.current.onWheel(Vt)}return document.addEventListener("touchmove",Qt,{passive:!1}),document.addEventListener("touchend",Or,{passive:!1}),ke.current.addEventListener("touchstart",rr,{passive:!1}),ke.current.addEventListener("wheel",Nr),function(){document.removeEventListener("touchmove",Qt),document.removeEventListener("touchend",Or)}},[])}function tr(){var ke=Object(v.useRef)(new Map);function Ge(Ne){return ke.current.has(Ne)||ke.current.set(Ne,v.createRef()),ke.current.get(Ne)}function Ve(Ne){ke.current.delete(Ne)}return[Ge,Ve]}function It(ke,Ge){var Ve=v.useRef(ke),Ne=v.useState({}),xe=Object(g.a)(Ne,2),Le=xe[1];function Se(je){var Be=typeof je=="function"?je(Ve.current):je;Be!==Ve.current&&Ge(Be,Ve.current),Ve.current=Be,Le({})}return[Ve.current,Se]}var ir=function(Ge){var Ve=Ge.position,Ne=Ge.prefixCls,xe=Ge.extra;if(!xe)return null;var Le,Se=xe;return Ve==="right"&&(Le=Se.right||!Se.left&&Se||null),Ve==="left"&&(Le=Se.left||null),Le?v.createElement("div",{className:"".concat(Ne,"-extra-content")},Le):null};function or(ke,Ge){var Ve,Ne=v.useContext(ua),xe=Ne.prefixCls,Le=Ne.tabs,Se=ke.className,je=ke.style,Be=ke.id,ze=ke.animated,Ke=ke.activeKey,Qe=ke.rtl,ot=ke.extra,vt=ke.editable,gt=ke.locale,Ot=ke.tabPosition,Xt=ke.tabBarGutter,sr=ke.children,cr=ke.onTabClick,fr=ke.onTabScroll,Er=Object(v.useRef)(),yr=Object(v.useRef)(),pr=Object(v.useRef)(),Pr=Object(v.useRef)(),Sr=tr(),gn=Object(g.a)(Sr,2),Cr=gn[0],rr=gn[1],Qt=Ot==="top"||Ot==="bottom",Or=It(0,function(Xr,Ir){Qt&&fr&&fr({direction:Xr>Ir?"left":"right"})}),Nr=Object(g.a)(Or,2),Vt=Nr[0],Br=Nr[1],vn=It(0,function(Xr,Ir){!Qt&&fr&&fr({direction:Xr>Ir?"top":"bottom"})}),Gr=Object(g.a)(vn,2),en=Gr[0],Jr=Gr[1],Dn=Object(v.useState)(0),Jn=Object(g.a)(Dn,2),En=Jn[0],yi=Jn[1],Ui=Object(v.useState)(0),xi=Object(g.a)(Ui,2),Qn=xi[0],ln=xi[1],tn=Object(v.useState)(0),xn=Object(g.a)(tn,2),yn=xn[0],Bi=xn[1],ta=Object(v.useState)(0),ra=Object(g.a)(ta,2),Qr=ra[0],Yi=ra[1],na=Object(v.useState)(null),on=Object(g.a)(na,2),$r=on[0],Zn=on[1],So=Object(v.useState)(null),eo=Object(g.a)(So,2),ia=eo[0],va=eo[1],Ma=Object(v.useState)(0),to=Object(g.a)(Ma,2),Pa=to[0],Xo=to[1],Yo=Object(v.useState)(0),Co=Object(g.a)(Yo,2),ro=Co[0],no=Co[1],ya=l(new Map),ba=Object(g.a)(ya,2),$o=ba[0],Na=ba[1],Oa=s(Le,$o,En),_a="".concat(xe,"-nav-operations-hidden"),Ea=0,Hi=0;Qt?Qe?(Ea=0,Hi=Math.max(0,En-$r)):(Ea=Math.min(0,$r-En),Hi=0):(Ea=Math.min(0,ia-Qn),Hi=0);function ca(Xr){return XrHi?[Hi,!1]:[Xr,!0]}var aa=Object(v.useRef)(),Aa=Object(v.useState)(),da=Object(g.a)(Aa,2),ja=da[0],io=da[1];function Fa(){io(Date.now())}function ao(){window.clearTimeout(aa.current)}Vi(Er,function(Xr,Ir){var qn=!1;function Ti(xa,Qi){xa(function(Da){var sa=ca(Da+Qi),ei=Object(g.a)(sa,2),Ha=ei[0],so=ei[1];return qn=so,Ha})}if(Qt){if($r>=En)return qn;Ti(Br,Xr)}else{if(ia>=Qn)return qn;Ti(Jr,Ir)}return ao(),Fa(),qn}),Object(v.useEffect)(function(){return ao(),ja&&(aa.current=window.setTimeout(function(){io(0)},100)),ao},[ja]);function oa(){var Xr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ke,Ir=Oa.get(Xr);if(!Ir)return;if(Qt){var qn=Vt;Qe?Ir.rightVt+$r&&(qn=Ir.right+Ir.width-$r):Ir.left<-Vt?qn=-Ir.left:Ir.left+Ir.width>-Vt+$r&&(qn=-(Ir.left+Ir.width-$r)),Jr(0),Br(ca(qn)[0])}else{var Ti=en;Ir.top<-en?Ti=-Ir.top:Ir.top+Ir.height>-en+ia&&(Ti=-(Ir.top+Ir.height-ia)),Br(0),Jr(ca(Ti)[0])}}var ha=b(Oa,{width:$r,height:ia,left:Vt,top:en},{width:yn,height:Qr},{width:Pa,height:ro},Object(k.a)(Object(k.a)({},ke),{},{tabs:Le})),Oo=Object(g.a)(ha,2),Jo=Oo[0],Qo=Oo[1],Zo=Le.map(function(Xr){var Ir=Xr.key;return v.createElement(u,{id:Be,prefixCls:xe,key:Ir,rtl:Qe,tab:Xr,closable:Xr.closable,editable:vt,active:Ir===Ke,tabPosition:Ot,tabBarGutter:Xt,renderWrapper:sr,removeAriaLabel:gt==null?void 0:gt.removeAriaLabel,ref:Cr(Ir),onClick:function(Ti){cr(Ir,Ti)},onRemove:function(){rr(Ir)},onFocus:function(){oa(Ir),Fa(),Qe||(Er.current.scrollLeft=0),Er.current.scrollTop=0}})}),oo=n(function(){var Xr,Ir,qn,Ti,xa,Qi,Da,sa,ei,Ha=((Xr=Er.current)===null||Xr===void 0?void 0:Xr.offsetWidth)||0,so=((Ir=Er.current)===null||Ir===void 0?void 0:Ir.offsetHeight)||0,lo=((qn=Pr.current)===null||qn===void 0?void 0:qn.offsetWidth)||0,Si=((Ti=Pr.current)===null||Ti===void 0?void 0:Ti.offsetHeight)||0,Kr=((xa=pr.current)===null||xa===void 0?void 0:xa.offsetWidth)||0,Gi=((Qi=pr.current)===null||Qi===void 0?void 0:Qi.offsetHeight)||0;Zn(Ha),va(so),Xo(lo),no(Si);var Zi=(((Da=yr.current)===null||Da===void 0?void 0:Da.offsetWidth)||0)-lo,qi=(((sa=yr.current)===null||sa===void 0?void 0:sa.offsetHeight)||0)-Si;yi(Zi),ln(qi);var uo=(ei=pr.current)===null||ei===void 0?void 0:ei.className.includes(_a);Bi(Zi-(uo?0:Kr)),Yi(qi-(uo?0:Gi)),Na(function(){var Wa=new Map;return Le.forEach(function(Lo){var ko=Lo.key,pa=Cr(ko).current;pa&&Wa.set(ko,{width:pa.offsetWidth,height:pa.offsetHeight,left:pa.offsetLeft,top:pa.offsetTop})}),Wa})}),qo=Le.slice(0,Jo),wi=Le.slice(Qo+1),Pn=[].concat(Object(h.a)(qo),Object(h.a)(wi)),ui=Object(v.useState)(),Nn=Object(g.a)(ui,2),Ra=Nn[0],es=Nn[1],Wi=Oa.get(Ke),Ao=Object(v.useRef)();function Ro(){c.a.cancel(Ao.current)}Object(v.useEffect)(function(){var Xr={};return Wi&&(Qt?(Qe?Xr.right=Wi.right:Xr.left=Wi.left,Xr.width=Wi.width):(Xr.top=Wi.top,Xr.height=Wi.height)),Ro(),Ao.current=c()(function(){es(Xr)}),Ro},[Wi,Qt,Qe]),Object(v.useEffect)(function(){oa()},[Ke,Wi,Oa,Qt]),Object(v.useEffect)(function(){oo()},[Qe,Xt,Ke,Le.map(function(Xr){return Xr.key}).join("_")]);var Io=!!Pn.length,fa="".concat(xe,"-nav-wrap"),Ua,Ia,Do,Ba;return Qt?Qe?(Ia=Vt>0,Ua=Vt+$r>>7)^(D<<14|D>>>18)^D>>>3,y=h[p-2],x=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;h[p]=R+h[p-7]+x+h[p-16]}var w=o&s^~o&E,T=l&f^l&d^f&d,F=(l<<30|l>>>2)^(l<<19|l>>>13)^(l<<10|l>>>22),P=(o<<26|o>>>6)^(o<<21|o>>>11)^(o<<7|o>>>25),A=b+P+w+e[p]+h[p],X=F+T;b=E,E=s,s=o,o=u+A|0,u=d,d=f,f=l,l=A+X|0}n[0]=n[0]+l|0,n[1]=n[1]+f|0,n[2]=n[2]+d|0,n[3]=n[3]+u|0,n[4]=n[4]+o|0,n[5]=n[5]+s|0,n[6]=n[6]+E|0,n[7]=n[7]+b|0},_doFinalize:function(){var c=this._data,i=c.words,n=this._nDataBytes*8,l=c.sigBytes*8;return i[l>>>5]|=128<<24-l%32,i[(l+64>>>9<<4)+14]=g.floor(n/4294967296),i[(l+64>>>9<<4)+15]=n,c.sigBytes=i.length*4,this._process(),this._hash},clone:function(){var c=m.clone.call(this);return c._hash=this._hash.clone(),c}});S.SHA256=m._createHelper(r),S.HmacSHA256=m._createHmacHelper(r)}(Math),N.SHA256})},lZu9:function(H,Z,I){(function(N){N(I("VrN/"),I("1eCo"),I("8EBN"))})(function(N){"use strict";N.defineMode("markdown",function(g,S){var k=N.getMode(g,"text/html"),v=k.name=="null";function m(U){if(N.findModeByName){var L=N.findModeByName(U);L&&(U=L.mime||L.mimes[0])}var G=N.getMode(g,U);return G.name=="null"?null:G}S.highlightFormatting===void 0&&(S.highlightFormatting=!1),S.maxBlockquoteDepth===void 0&&(S.maxBlockquoteDepth=0),S.taskLists===void 0&&(S.taskLists=!1),S.strikethrough===void 0&&(S.strikethrough=!1),S.emoji===void 0&&(S.emoji=!1),S.fencedCodeBlockHighlighting===void 0&&(S.fencedCodeBlockHighlighting=!0),S.fencedCodeBlockDefaultMode===void 0&&(S.fencedCodeBlockDefaultMode="text/plain"),S.xml===void 0&&(S.xml=!0),S.tokenTypeOverrides===void 0&&(S.tokenTypeOverrides={});var C={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var _ in C)C.hasOwnProperty(_)&&S.tokenTypeOverrides[_]&&(C[_]=S.tokenTypeOverrides[_]);var e=/^([*\-_])(?:\s*\1){2,}\s*$/,h=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,r=/^\[(x| )\](?=\s)/i,c=S.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,i=/^ {0,3}(?:\={1,}|-{2,})\s*$/,n=/^[^#!\[\]*_\\<>` "'(~:]+/,l=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,f=/^\s*\[[^\]]+?\]:.*$/,d=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,u=" ";function o(U,L,G){return L.f=L.inline=G,G(U,L)}function s(U,L,G){return L.f=L.block=G,G(U,L)}function E(U){return!U||!/\S/.test(U.string)}function b(U){if(U.linkTitle=!1,U.linkHref=!1,U.linkText=!1,U.em=!1,U.strong=!1,U.strikethrough=!1,U.quote=0,U.indentedCode=!1,U.f==D){var L=v;if(!L){var G=N.innerMode(k,U.htmlState);L=G.mode.name=="xml"&&G.state.tagStart===null&&!G.state.context&&G.state.tokenize.isInText}L&&(U.f=w,U.block=p,U.htmlState=null)}return U.trailingSpace=0,U.trailingSpaceNewLine=!1,U.prevLine=U.thisLine,U.thisLine={stream:null},null}function p(U,L){var G=U.column()===L.indentation,ee=E(L.prevLine.stream),oe=L.indentedCode,ae=L.prevLine.hr,be=L.list!==!1,_e=(L.listStack[L.listStack.length-1]||0)+3;L.indentedCode=!1;var fe=L.indentation;if(L.indentationDiff===null&&(L.indentationDiff=L.indentation,be)){for(L.list=null;fe=4&&(oe||L.prevLine.fencedCodeEnd||L.prevLine.header||ee))return U.skipToEnd(),L.indentedCode=!0,C.code;if(U.eatSpace())return null;if(G&&L.indentation<=_e&&(de=U.match(c))&&de[1].length<=6)return L.quote=0,L.header=de[1].length,L.thisLine.header=!0,S.highlightFormatting&&(L.formatting="header"),L.f=L.inline,y(L);if(L.indentation<=_e&&U.eat(">"))return L.quote=G?1:L.quote+1,S.highlightFormatting&&(L.formatting="quote"),U.eatSpace(),y(L);if(!Oe&&!L.setext&&G&&L.indentation<=_e&&(de=U.match(h))){var te=de[1]?"ol":"ul";return L.indentation=fe+U.current().length,L.list=!0,L.quote=0,L.listStack.push(L.indentation),L.em=!1,L.strong=!1,L.code=!1,L.strikethrough=!1,S.taskLists&&U.match(r,!1)&&(L.taskList=!0),L.f=L.inline,S.highlightFormatting&&(L.formatting=["list","list-"+te]),y(L)}else{if(G&&L.indentation<=_e&&(de=U.match(l,!0)))return L.quote=0,L.fencedEndRE=new RegExp(de[1]+"+ *$"),L.localMode=S.fencedCodeBlockHighlighting&&m(de[2]||S.fencedCodeBlockDefaultMode),L.localMode&&(L.localState=N.startState(L.localMode)),L.f=L.block=R,S.highlightFormatting&&(L.formatting="code-block"),L.code=-1,y(L);if(L.setext||(!Re||!be)&&!L.quote&&L.list===!1&&!L.code&&!Oe&&!f.test(U.string)&&(de=U.lookAhead(1))&&(de=de.match(i)))return L.setext?(L.header=L.setext,L.setext=0,U.skipToEnd(),S.highlightFormatting&&(L.formatting="header")):(L.header=de[0].charAt(0)=="="?1:2,L.setext=L.header),L.thisLine.header=!0,L.f=L.inline,y(L);if(Oe)return U.skipToEnd(),L.hr=!0,L.thisLine.hr=!0,C.hr;if(U.peek()==="[")return o(U,L,X)}return o(U,L,L.inline)}function D(U,L){var G=k.token(U,L.htmlState);if(!v){var ee=N.innerMode(k,L.htmlState);(ee.mode.name=="xml"&&ee.state.tagStart===null&&!ee.state.context&&ee.state.tokenize.isInText||L.md_inside&&U.current().indexOf(">")>-1)&&(L.f=w,L.block=p,L.htmlState=null)}return G}function R(U,L){var G=L.listStack[L.listStack.length-1]||0,ee=L.indentation=U.quote?L.push(C.formatting+"-"+U.formatting[G]+"-"+U.quote):L.push("error"))}if(U.taskOpen)return L.push("meta"),L.length?L.join(" "):null;if(U.taskClosed)return L.push("property"),L.length?L.join(" "):null;if(U.linkHref?L.push(C.linkHref,"url"):(U.strong&&L.push(C.strong),U.em&&L.push(C.em),U.strikethrough&&L.push(C.strikethrough),U.emoji&&L.push(C.emoji),U.linkText&&L.push(C.linkText),U.code&&L.push(C.code),U.image&&L.push(C.image),U.imageAltText&&L.push(C.imageAltText,"link"),U.imageMarker&&L.push(C.imageMarker)),U.header&&L.push(C.header,C.header+"-"+U.header),U.quote&&(L.push(C.quote),!S.maxBlockquoteDepth||S.maxBlockquoteDepth>=U.quote?L.push(C.quote+"-"+U.quote):L.push(C.quote+"-"+S.maxBlockquoteDepth)),U.list!==!1){var ee=(U.listStack.length-1)%3;ee?ee===1?L.push(C.list2):L.push(C.list3):L.push(C.list1)}return U.trailingSpaceNewLine?L.push("trailing-space-new-line"):U.trailingSpace&&L.push("trailing-space-"+(U.trailingSpace%2?"a":"b")),L.length?L.join(" "):null}function x(U,L){return U.match(n,!0)?y(L):void 0}function w(U,L){var G=L.text(U,L);if(typeof G!="undefined")return G;if(L.list)return L.list=null,y(L);if(L.taskList){var ee=U.match(r,!0)[1]===" ";return ee?L.taskOpen=!0:L.taskClosed=!0,S.highlightFormatting&&(L.formatting="task"),L.taskList=!1,y(L)}if(L.taskOpen=!1,L.taskClosed=!1,L.header&&U.match(/^#+$/,!0))return S.highlightFormatting&&(L.formatting="header"),y(L);var oe=U.next();if(L.linkTitle){L.linkTitle=!1;var ae=oe;oe==="("&&(ae=")"),ae=(ae+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var be="^\\s*(?:[^"+ae+"\\\\]+|\\\\\\\\|\\\\.)"+ae;if(U.match(new RegExp(be),!0))return C.linkHref}if(oe==="`"){var _e=L.formatting;S.highlightFormatting&&(L.formatting="code"),U.eatWhile("`");var fe=U.current().length;if(L.code==0&&(!L.quote||fe==1))return L.code=fe,y(L);if(fe==L.code){var Re=y(L);return L.code=0,Re}else return L.formatting=_e,y(L)}else if(L.code)return y(L);if(oe==="\\"&&(U.next(),S.highlightFormatting)){var Oe=y(L),de=C.formatting+"-escape";return Oe?Oe+" "+de:de}if(oe==="!"&&U.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return L.imageMarker=!0,L.image=!0,S.highlightFormatting&&(L.formatting="image"),y(L);if(oe==="["&&L.imageMarker&&U.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return L.imageMarker=!1,L.imageAltText=!0,S.highlightFormatting&&(L.formatting="image"),y(L);if(oe==="]"&&L.imageAltText){S.highlightFormatting&&(L.formatting="image");var Oe=y(L);return L.imageAltText=!1,L.image=!1,L.inline=L.f=F,Oe}if(oe==="["&&!L.image)return L.linkText&&U.match(/^.*?\]/)||(L.linkText=!0,S.highlightFormatting&&(L.formatting="link")),y(L);if(oe==="]"&&L.linkText){S.highlightFormatting&&(L.formatting="link");var Oe=y(L);return L.linkText=!1,L.inline=L.f=U.match(/\(.*?\)| ?\[.*?\]/,!1)?F:w,Oe}if(oe==="<"&&U.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){L.f=L.inline=T,S.highlightFormatting&&(L.formatting="link");var Oe=y(L);return Oe?Oe+=" ":Oe="",Oe+C.linkInline}if(oe==="<"&&U.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){L.f=L.inline=T,S.highlightFormatting&&(L.formatting="link");var Oe=y(L);return Oe?Oe+=" ":Oe="",Oe+C.linkEmail}if(S.xml&&oe==="<"&&U.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var te=U.string.indexOf(">",U.pos);if(te!=-1){var W=U.string.substring(U.start,te);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(W)&&(L.md_inside=!0)}return U.backUp(1),L.htmlState=N.startState(k),s(U,L,D)}if(S.xml&&oe==="<"&&U.match(/^\/\w*?>/))return L.md_inside=!1,"tag";if(oe==="*"||oe==="_"){for(var Y=1,V=U.pos==1?" ":U.string.charAt(U.pos-2);Y<3&&U.eat(oe);)Y++;var Q=U.peek()||" ",q=!/\s/.test(Q)&&(!d.test(Q)||/\s/.test(V)||d.test(V)),ie=!/\s/.test(V)&&(!d.test(V)||/\s/.test(Q)||d.test(Q)),ne=null,J=null;if(Y%2&&(!L.em&&q&&(oe==="*"||!ie||d.test(V))?ne=!0:L.em==oe&&ie&&(oe==="*"||!q||d.test(Q))&&(ne=!1)),Y>1&&(!L.strong&&q&&(oe==="*"||!ie||d.test(V))?J=!0:L.strong==oe&&ie&&(oe==="*"||!q||d.test(Q))&&(J=!1)),J!=null||ne!=null){S.highlightFormatting&&(L.formatting=ne==null?"strong":J==null?"em":"strong em"),ne===!0&&(L.em=oe),J===!0&&(L.strong=oe);var Re=y(L);return ne===!1&&(L.em=!1),J===!1&&(L.strong=!1),Re}}else if(oe===" "&&(U.eat("*")||U.eat("_"))){if(U.peek()===" ")return y(L);U.backUp(1)}if(S.strikethrough){if(oe==="~"&&U.eatWhile(oe)){if(L.strikethrough){S.highlightFormatting&&(L.formatting="strikethrough");var Re=y(L);return L.strikethrough=!1,Re}else if(U.match(/^[^\s]/,!1))return L.strikethrough=!0,S.highlightFormatting&&(L.formatting="strikethrough"),y(L)}else if(oe===" "&&U.match(/^~~/,!0)){if(U.peek()===" ")return y(L);U.backUp(2)}}if(S.emoji&&oe===":"&&U.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){L.emoji=!0,S.highlightFormatting&&(L.formatting="emoji");var $=y(L);return L.emoji=!1,$}return oe===" "&&(U.match(/^ +$/,!1)?L.trailingSpace++:L.trailingSpace&&(L.trailingSpaceNewLine=!0)),y(L)}function T(U,L){var G=U.next();if(G===">"){L.f=L.inline=w,S.highlightFormatting&&(L.formatting="link");var ee=y(L);return ee?ee+=" ":ee="",ee+C.linkInline}return U.match(/^[^>]+/,!0),C.linkInline}function F(U,L){if(U.eatSpace())return null;var G=U.next();return G==="("||G==="["?(L.f=L.inline=A(G==="("?")":"]"),S.highlightFormatting&&(L.formatting="link-string"),L.linkHref=!0,y(L)):"error"}var P={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function A(U){return function(L,G){var ee=L.next();if(ee===U){G.f=G.inline=w,S.highlightFormatting&&(G.formatting="link-string");var oe=y(G);return G.linkHref=!1,oe}return L.match(P[U]),G.linkHref=!0,y(G)}}function X(U,L){return U.match(/^([^\]\\]|\\.)*\]:/,!1)?(L.f=z,U.next(),S.highlightFormatting&&(L.formatting="link"),L.linkText=!0,y(L)):o(U,L,w)}function z(U,L){if(U.match(/^\]:/,!0)){L.f=L.inline=O,S.highlightFormatting&&(L.formatting="link");var G=y(L);return L.linkText=!1,G}return U.match(/^([^\]\\]|\\.)+/,!0),C.linkText}function O(U,L){return U.eatSpace()?null:(U.match(/^[^\s]+/,!0),U.peek()===void 0?L.linkTitle=!0:U.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),L.f=L.inline=w,C.linkHref+" url")}var B={startState:function(){return{f:p,prevLine:{stream:null},thisLine:{stream:null},block:p,htmlState:null,indentation:0,inline:w,text:x,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(U){return{f:U.f,prevLine:U.prevLine,thisLine:U.thisLine,block:U.block,htmlState:U.htmlState&&N.copyState(k,U.htmlState),indentation:U.indentation,localMode:U.localMode,localState:U.localMode?N.copyState(U.localMode,U.localState):null,inline:U.inline,text:U.text,formatting:!1,linkText:U.linkText,linkTitle:U.linkTitle,linkHref:U.linkHref,code:U.code,em:U.em,strong:U.strong,strikethrough:U.strikethrough,emoji:U.emoji,header:U.header,setext:U.setext,hr:U.hr,taskList:U.taskList,list:U.list,listStack:U.listStack.slice(0),quote:U.quote,indentedCode:U.indentedCode,trailingSpace:U.trailingSpace,trailingSpaceNewLine:U.trailingSpaceNewLine,md_inside:U.md_inside,fencedEndRE:U.fencedEndRE}},token:function(U,L){if(L.formatting=!1,U!=L.thisLine.stream){if(L.header=0,L.hr=!1,U.match(/^\s*$/,!0))return b(L),null;if(L.prevLine=L.thisLine,L.thisLine={stream:U},L.taskList=!1,L.trailingSpace=0,L.trailingSpaceNewLine=!1,!L.localState&&(L.f=L.block,L.f!=D)){var G=U.match(/^\s*/,!0)[0].replace(/\t/g,u).length;if(L.indentation=G,L.indentationDiff=null,G>0)return null}}return L.f(U,L)},innerMode:function(U){return U.block==D?{state:U.htmlState,mode:k}:U.localState?{state:U.localState,mode:U.localMode}:{state:U,mode:B}},indent:function(U,L,G){return U.block==D&&k.indent?k.indent(U.htmlState,L,G):U.localState&&U.localMode.indent?U.localMode.indent(U.localState,L,G):N.Pass},blankLine:b,getType:y,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return B},"xml"),N.defineMIME("text/markdown","markdown"),N.defineMIME("text/x-markdown","markdown")})},mxV5:function(module,exports,__webpack_require__){(function(global){var require,require;(function(H){if(!0)module.exports=H();else var Z})(function(){var define,module,exports;return function(){function H(Z,I,N){function g(v,m){if(!I[v]){if(!Z[v]){var C=typeof require=="function"&&require;if(!m&&C)return require(v,!0);if(S)return S(v,!0);var _=new Error("Cannot find module '"+v+"'");throw _.code="MODULE_NOT_FOUND",_}var e=I[v]={exports:{}};Z[v][0].call(e.exports,function(h){var r=Z[v][1][h];return g(r||h)},e,e.exports,H,Z,I,N)}return I[v].exports}for(var S=typeof require=="function"&&require,k=0;k0&&i(F).to(A),X=this._divideParts(x,w),z=X.length,O=!1,B=function(Re,Oe){var de=this;return new v.default(function(W,Y){var V,Q,q,ie;return C.default.async(function(J){for(;;)switch(J.prev=J.next){case 0:if(J.prev=0,Re.isCancel()){J.next=18;break}return V=X[Oe-1],Q={stream:Re._createStream(y,V.start,V.end),size:V.end-V.start},J.next=6,C.default.awrap(Re._uploadPart(P,T,Oe,Q));case 6:if(q=J.sent,!(!Re.isCancel()&&!O)){J.next=15;break}if(p.doneParts.push({number:Oe,etag:q.res.headers.etag}),!D.progress){J.next=12;break}return J.next=12,C.default.awrap(D.progress(F.length/z,p,q.res));case 12:W({number:Oe,etag:q.res.headers.etag}),J.next=16;break;case 15:W();case 16:J.next=19;break;case 18:W();case 19:J.next=30;break;case 21:J.prev=21,J.t0=J.catch(0),ie=new Error,ie.name=J.t0.name,ie.message=J.t0.message,ie.stack=J.t0.stack,ie.partNum=Oe,i(J.t0).to(ie),Y(ie);case 30:case"end":return J.stop()}},null,de,[[0,21]])})},U=(0,S.default)(new Array(z),function(fe,Re){return Re+1}),L=A.map(function(fe){return fe.number}),G=U.filter(function(fe){return L.indexOf(fe)<0}),ee=5,oe=D.parallel||ee,_e.next=17,C.default.awrap(this._parallel(G,oe,function(fe){return new v.default(function(Re,Oe){B(R,fe).then(function(de){de&&A.push(de),Re()}).catch(function(de){Oe(de)})})}));case 17:if(ae=_e.sent,O=!0,!this.isCancel()){_e.next=22;break}throw B=null,this._makeCancelEvent();case 22:if(!(ae&&ae.length>0)){_e.next=25;break}throw ae[0].message="Failed to upload some parts with error: "+ae[0].toString()+" part_num: "+ae[0].partNum,ae[0];case 25:return _e.next=27,C.default.awrap(this.completeMultipartUpload(P,T,A,D));case 27:return _e.abrupt("return",_e.sent);case 28:case"end":return _e.stop()}},null,this)},u._getFileSize=function(p){return C.default.async(function(R){for(;;)switch(R.prev=R.next){case 0:if(!e.buffer(p)){R.next=4;break}return R.abrupt("return",p.length);case 4:if(!(l(p)||d(p))){R.next=6;break}return R.abrupt("return",p.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return R.stop()}},null,this)};var o=H("stream"),s=o.Readable;function E(b,p){if(!(this instanceof E))return new E(b,p);s.call(this,p),this.file=b,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}h.inherits(E,s),E.prototype.readFileAndPush=function(p){if(this.fileBuffer)for(var D=!0;D&&this.fileBuffer&&this.startthis.fileBuffer.length?this.fileBuffer.length:y,this.start=y,D=this.push(this.fileBuffer.slice(R,y))}},E.prototype._read=function(p){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file){this.finish||(this.fileBuffer=null,this.finish=!0),this.push(null);return}var D=16*1024;p=p||D;var R=this;this.reader.onload=function(x){R.fileBuffer=N.from(new Uint8Array(x.target.result)),R.file=null,R.readFileAndPush(p)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(p)},u._createStream=function(p,D,R){if(l(p)||d(p))return new E(p.slice(D,R));throw new Error("_createStream requires File/Blob.")},u._getPartSize=function(p,D){var R=10*1e3,y=1024*1024;return D?Math.max(Math.ceil(p/R),D):y},u._divideParts=function(p,D){for(var R=Math.ceil(p/D),y=[],x=0;x255)throw new Error("ID is composed of 255 bytes at most");if(p.prefix===""||p.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(p.status))throw new Error("Status must be Enabled or Disabled");if(p.transition){if(!["IA","Archive"].includes(p.transition.storageClass))throw new Error("StorageClass must be IA or Archive");s(p.transition,"Transition")}if(p.expiration){if(!p.expiration.expiredObjectDeleteMarker)s(p.expiration,"Expiration");else if(p.expiration.days||p.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(p.abortMultipartUpload&&s(p.abortMultipartUpload,"AbortMultipartUpload"),!p.expiration&&!p.abortMultipartUpload&&!p.transition&&!p.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(p.tag){if(p.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");E(p.tag)}}},{"../utils/checkBucketName":35,"../utils/checkObjectTag":36,"../utils/deepCopy":39,"../utils/getStrBytesCount":41,"../utils/isArray":42,"../utils/isObject":46,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],12:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=S(N);function S(e){return e&&e.__esModule?e:{default:e}}var k=H("../utils/checkBucketName"),v=k.checkBucketName,m=H("../utils/obj2xml"),C=m.obj2xml,_=I;_.putBucketVersioning=function(h,r){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,n,l;return g.default.async(function(d){for(;;)switch(d.prev=d.next){case 0:if(v(h),["Enabled","Suspended"].includes(r)){d.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return i=this._bucketRequestParams("PUT",h,"versioning",c),n={VersioningConfiguration:{Status:r}},i.mime="xml",i.content=C(n,{headers:!0}),d.next=9,g.default.awrap(this.request(i));case 9:return l=d.sent,d.abrupt("return",{res:l.res,status:l.status});case 11:case"end":return d.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=S(N);function S(r){return r&&r.__esModule?r:{default:r}}var k=H("../utils/checkBucketName"),v=k.checkBucketName,m=H("../utils/obj2xml"),C=m.obj2xml,_=H("../utils/isArray"),e=_.isArray,h=I;h.putBucketWebsite=function(c){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments[2],l,f,d,u,o;return g.default.async(function(E){for(;;)switch(E.prev=E.next){case 0:if(v(c),l=this._bucketRequestParams("PUT",c,"website",n),f={Suffix:i.index||"index.html"},d={IndexDocument:f},u={WebsiteConfiguration:d},i.supportSubDir&&(f.SupportSubDir=i.supportSubDir),i.type&&(f.Type=i.type),i.error&&(d.ErrorDocument={Key:i.error}),!(i.routingRules!==void 0)){E.next=12;break}if(e(i.routingRules)){E.next=11;break}throw new Error("RoutingRules must be Array");case 11:d.RoutingRules={RoutingRule:i.routingRules};case 12:return u=C(u),l.content=u,l.mime="xml",l.successStatuses=[200],E.next=18,g.default.awrap(this.request(l));case 18:return o=E.sent,E.abrupt("return",{res:o.res});case 20:case"end":return E.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isArray":42,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],14:[function(H,Z,I){(function(N){"use strict";var g=H("babel-runtime/core-js/object/keys"),S=m(g),k=H("babel-runtime/core-js/json/stringify"),v=m(k);function m(C){return C&&C.__esModule?C:{default:C}}I.encodeCallback=function(_,e){if(_.headers=_.headers||{},!Object.prototype.hasOwnProperty.call(_.headers,"x-oss-callback")&&e.callback){var h={callbackUrl:encodeURI(e.callback.url),callbackBody:e.callback.body};e.callback.host&&(h.callbackHost=e.callback.host),e.callback.contentType&&(h.callbackBodyType=e.callback.contentType);var r=N.from((0,v.default)(h)).toString("base64");if(_.headers["x-oss-callback"]=r,e.callback.customValue){var c={};(0,S.default)(e.callback.customValue).forEach(function(i){c["x:"+i]=e.callback.customValue[i]}),_.headers["x-oss-callback-var"]=N.from((0,v.default)(c)).toString("base64")}}}}).call(this,H("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73}],15:[function(H,Z,I){"use strict";var N=H("babel-runtime/core-js/object/assign"),g=S(N);function S(h){return h&&h.__esModule?h:{default:h}}var k=H("humanize-ms"),v=H("url"),m=H("../utils/checkBucketName"),C=m.checkBucketName;function _(h,r){var c=v.parse(h);if(c.protocol||(c=v.parse("http"+(r?"s":"")+"://"+h)),c.protocol!=="http:"&&c.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return c}function e(h,r,c){var i=c?"https://":"http://",n=r?"-internal.aliyuncs.com":".aliyuncs.com",l="vpc100-oss-cn-";return h.substr(0,l.length)===l&&(n=".aliyuncs.com"),v.parse(i+h+n)}Z.exports=function(h){if(!h||!h.accessKeyId||!h.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");h.bucket&&C(h.bucket);var r=(0,g.default)({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1},h);if(r.accessKeyId=r.accessKeyId.trim(),r.accessKeySecret=r.accessKeySecret.trim(),r.timeout&&(r.timeout=k(r.timeout)),r.endpoint)r.endpoint=_(r.endpoint,r.secure);else if(r.region)r.endpoint=e(r.region,r.internal,r.secure);else throw new Error("require options.endpoint or options.region");return r.inited=!0,r}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/assign":54,"humanize-ms":194,url:238}],16:[function(H,Z,I){"use strict";var N=H("merge-descriptors"),g=I;N(g,H("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=S(N);function S(r){return r&&r.__esModule?r:{default:r}}var k=H("../utils/checkBucketName"),v=k.checkBucketName,m=H("querystring"),C=H("js-base64"),_=C.Base64.encode,e=I;e.processObjectSave=function(c,i,n,l){var f,d,u,o;return g.default.async(function(E){for(;;)switch(E.prev=E.next){case 0:return h(c,"sourceObject"),h(i,"targetObject"),h(n,"process"),i=this._objectName(i),l&&v(l),f=this._objectRequestParams("POST",c,{subres:"x-oss-process"}),d=l?",b_"+_(l):"",i=_(i),u={"x-oss-process":n+"|sys/saveas,o_"+i+d},f.content=m.stringify(u),E.next=12,g.default.awrap(this.request(f));case 12:return o=E.sent,E.abrupt("return",{res:o.res,status:o.res.status});case 14:case"end":return E.stop()}},null,this)};function h(r,c){if(!r)throw new Error(c+" is required");if(typeof r!="string")throw new Error(c+" must be String")}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=S(N);function S(e){return e&&e.__esModule?e:{default:e}}var k=H("copy-to"),v=H("./callback"),m=H("./utils/deepCopy"),C=m.deepCopy,_=I;_.listUploads=function(h,r){var c,i,n,l;return g.default.async(function(d){for(;;)switch(d.prev=d.next){case 0:return r=r||{},c={},k(r).to(c),c.subres="uploads",i=this._objectRequestParams("GET","",c),i.query=h,i.xmlResponse=!0,i.successStatuses=[200],d.next=10,g.default.awrap(this.request(i));case 10:return n=d.sent,l=n.data.Upload||[],Array.isArray(l)||(l=[l]),l=l.map(function(u){return{name:u.Key,uploadId:u.UploadId,initiated:u.Initiated}}),d.abrupt("return",{res:n.res,uploads:l,bucket:n.data.Bucket,nextKeyMarker:n.data.NextKeyMarker,nextUploadIdMarker:n.data.NextUploadIdMarker,isTruncated:n.data.IsTruncated==="true"});case 15:case"end":return d.stop()}},null,this)},_.listParts=function(h,r,c,i){var n,l,f;return g.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return i=i||{},n={},k(i).to(n),n.subres={uploadId:r},l=this._objectRequestParams("GET",h,n),l.query=c,l.xmlResponse=!0,l.successStatuses=[200],u.next=10,g.default.awrap(this.request(l));case 10:return f=u.sent,u.abrupt("return",{res:f.res,uploadId:f.data.UploadId,bucket:f.data.Bucket,name:f.data.Key,partNumberMarker:f.data.PartNumberMarker,nextPartNumberMarker:f.data.NextPartNumberMarker,maxParts:f.data.MaxParts,isTruncated:f.data.IsTruncated,parts:f.data.Part||[]});case 12:case"end":return u.stop()}},null,this)},_.abortMultipartUpload=function(h,r,c){var i,n,l;return g.default.async(function(d){for(;;)switch(d.prev=d.next){case 0:return this._stop(),c=c||{},i={},k(c).to(i),i.subres={uploadId:r},n=this._objectRequestParams("DELETE",h,i),n.successStatuses=[204],d.next=9,g.default.awrap(this.request(n));case 9:return l=d.sent,d.abrupt("return",{res:l.res});case 11:case"end":return d.stop()}},null,this)},_.initMultipartUpload=function(h,r){var c,i,n;return g.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return r=r||{},c={},k(r).to(c),c.headers=c.headers||{},this._convertMetaToHeaders(r.meta,c.headers),c.subres="uploads",i=this._objectRequestParams("POST",h,c),i.mime=r.mime,i.xmlResponse=!0,i.successStatuses=[200],f.next=12,g.default.awrap(this.request(i));case 12:return n=f.sent,f.abrupt("return",{res:n.res,bucket:n.data.Bucket,name:n.data.Key,uploadId:n.data.UploadId});case 14:case"end":return f.stop()}},null,this)},_.uploadPart=function(h,r,c,i,n,l,f){var d;return g.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return d={stream:this._createStream(i,n,l),size:l-n},o.next=3,g.default.awrap(this._uploadPart(h,r,c,d,f));case 3:return o.abrupt("return",o.sent);case 4:case"end":return o.stop()}},null,this)},_.completeMultipartUpload=function(h,r,c,i){var n,l,f,d,u,o,s,E;return g.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:for(n=c.concat().sort(function(D,R){return D.number-R.number}).filter(function(D,R,y){return!R||D.number!==y[R-1].number}),l=` `,f=0;f `,l+=""+d.number+` `,l+=""+d.etag+` `,l+=` `;return l+="",i=i||{},u={},u=C(i),u.headers&&delete u.headers["x-oss-server-side-encryption"],u.subres={uploadId:r},o=this._objectRequestParams("POST",h,u),v.encodeCallback(o,u),o.mime="xml",o.content=l,o.headers&&o.headers["x-oss-callback"]||(o.xmlResponse=!0),o.successStatuses=[200],p.next=17,g.default.awrap(this.request(o));case 17:return s=p.sent,E={res:s.res,bucket:o.bucket,name:h,etag:s.res.headers.etag},o.headers&&o.headers["x-oss-callback"]&&(E.data=JSON.parse(s.data.toString())),p.abrupt("return",E);case 21:case"end":return p.stop()}},null,this)},_._uploadPart=function(h,r,c,i,n){var l,f,d;return g.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return n=n||{},l={},k(n).to(l),l.headers={"Content-Length":i.size},l.subres={partNumber:c,uploadId:r},f=this._objectRequestParams("PUT",h,l),f.mime=l.mime,f.stream=i.stream,f.successStatuses=[200],o.next=11,g.default.awrap(this.request(f));case 11:if(d=o.sent,d.res.headers.etag){o.next=14;break}throw new Error(`Please set the etag of expose-headers in OSS https://help.aliyun.com/document_detail/32069.html`);case 14:return i.stream=null,f.stream=null,o.abrupt("return",{name:h,etag:d.res.headers.etag,res:d.res});case 17:case"end":return o.stop()}},null,this)}},{"./callback":14,"./utils/deepCopy":39,"babel-runtime/regenerator":68,"copy-to":76}],19:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=C(N),S=H("babel-runtime/core-js/object/keys"),k=C(S),v=H("babel-runtime/helpers/typeof"),m=C(v);function C(r){return r&&r.__esModule?r:{default:r}}var _=H("../utils/checkBucketName"),e=_.checkBucketName,h=I;h.copy=function(c,i,n,l){var f,d,u;return g.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return(typeof n=="undefined"?"undefined":(0,m.default)(n))==="object"&&(l=n),l=l||{},l.headers=l.headers||{},(0,k.default)(l.headers).forEach(function(E){l.headers["x-oss-copy-source-"+E.toLowerCase()]=l.headers[E]}),l.meta&&(l.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(l.meta,l.headers),i=this._getSourceName(i,n),l.versionId&&(i=i+"?versionId="+l.versionId),l.headers["x-oss-copy-source"]=i,f=this._objectRequestParams("PUT",c,l),f.xmlResponse=!0,f.successStatuses=[200,304],s.next=14,g.default.awrap(this.request(f));case 14:return d=s.sent,u=d.data,u&&(u={etag:u.ETag,lastModified:u.LastModified}),s.abrupt("return",{data:u,res:d.res});case 18:case"end":return s.stop()}},null,this)},h._getSourceName=function(c,i){return typeof i=="string"?c=this._objectName(c):c[0]!=="/"?i=this.options.bucket:(i=c.replace(/\/(.+?)(\/.*)/,"$1"),c=c.replace(/(\/.+?\/)(.*)/,"$2")),e(i),c=encodeURI(c),c="/"+i+"/"+c,c}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,"babel-runtime/regenerator":68}],20:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=v(N),S=H("babel-runtime/core-js/object/assign"),k=v(S);function v(C){return C&&C.__esModule?C:{default:C}}var m=I;m.delete=function(_){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h,r;return g.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return e.subres=(0,k.default)({},e.subres),e.versionId&&(e.subres.versionId=e.versionId),h=this._objectRequestParams("DELETE",_,e),h.successStatuses=[204],i.next=6,g.default.awrap(this.request(h));case 6:return r=i.sent,i.abrupt("return",{res:r.res});case 8:case"end":return i.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],21:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=v(N),S=H("babel-runtime/core-js/object/assign"),k=v(S);function v(h){return h&&h.__esModule?h:{default:h}}var m=H("utility"),C=H("../utils/obj2xml"),_=C.obj2xml,e=I;e.deleteMulti=function(r){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,n,l,f,d,u,o,s,E,b,p,D;return g.default.async(function(y){for(;;)switch(y.prev=y.next){case 0:if(i=[],!(!r||!r.length)){y.next=3;break}throw new Error("names is required");case 3:for(n=0;n1&&arguments[1]!==void 0?arguments[1]:{},h,r;return g.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return e.subres=(0,k.default)({tagging:""},e.subres),e.versionId&&(e.subres.versionId=e.versionId),_=this._objectName(_),h=this._objectRequestParams("DELETE",_,e),h.successStatuses=[204],i.next=7,g.default.awrap(this.request(h));case 7:return r=i.sent,i.abrupt("return",{status:r.status,res:r.res});case 9:case"end":return i.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],23:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=v(N),S=H("babel-runtime/core-js/object/assign"),k=v(S);function v(e){return e&&e.__esModule?e:{default:e}}var m=H("fs"),C=H("is-type-of"),_=I;_.get=function(h,r){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,n,l,f;return g.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return i=null,n=!1,C.writableStream(r)?i=r:C.string(r)?(i=m.createWriteStream(r),n=!0):c=r,c=c||{},c.subres=(0,k.default)({},c.subres),c.versionId&&(c.subres.versionId=c.versionId),c.process&&(c.subres["x-oss-process"]=c.process),l=void 0,u.prev=8,f=this._objectRequestParams("GET",h,c),f.writeStream=i,f.successStatuses=[200,206,304],u.next=14,g.default.awrap(this.request(f));case 14:l=u.sent,n&&i.destroy(),u.next=25;break;case 18:if(u.prev=18,u.t0=u.catch(8),!n){u.next=24;break}return i.destroy(),u.next=24,g.default.awrap(this._deleteFileSafe(r));case 24:throw u.t0;case 25:return u.abrupt("return",{res:l.res,content:l.data});case 26:case"end":return u.stop()}},null,this,[[8,18]])}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,fs:71,"is-type-of":289}],24:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=v(N),S=H("babel-runtime/core-js/object/assign"),k=v(S);function v(C){return C&&C.__esModule?C:{default:C}}var m=I;m.getACL=function(_){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h,r;return g.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return e.subres=(0,k.default)({acl:""},e.subres),e.versionId&&(e.subres.versionId=e.versionId),_=this._objectName(_),h=this._objectRequestParams("GET",_,e),h.successStatuses=[200],h.xmlResponse=!0,i.next=8,g.default.awrap(this.request(h));case 8:return r=i.sent,i.abrupt("return",{acl:r.data.AccessControlList.Grant,owner:{id:r.data.Owner.ID,displayName:r.data.Owner.DisplayName},res:r.res});case 10:case"end":return i.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],25:[function(H,Z,I){"use strict";var N=H("babel-runtime/core-js/object/keys"),g=C(N),S=H("babel-runtime/regenerator"),k=C(S),v=H("babel-runtime/core-js/object/assign"),m=C(v);function C(f){return f&&f.__esModule?f:{default:f}}var _=I,e=H("../utils/isObject"),h=e.isObject,r=H("../utils/isArray"),c=r.isArray;_.getBucketVersions=i,_.listObjectVersions=i;function i(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u,o,s,E,b,p;return k.default.async(function(R){for(;;)switch(R.prev=R.next){case 0:if(!(f.versionIdMarker&&f.keyMarker===void 0)){R.next=2;break}throw new Error("A version-id marker cannot be specified without a key marker");case 2:return d.subres=(0,m.default)({versions:""},d.subres),d.versionId&&(d.subres.versionId=d.versionId),u=this._objectRequestParams("GET","",d),u.xmlResponse=!0,u.successStatuses=[200],u.query=l(f),R.next=10,k.default.awrap(this.request(u));case 10:return o=R.sent,s=o.data.Version||[],E=o.data.DeleteMarker||[],b=this,s&&(Array.isArray(s)||(s=[s]),s=s.map(function(y){return{name:y.Key,url:b._objectUrl(y.Key),lastModified:y.LastModified,isLatest:y.IsLatest==="true",versionId:y.VersionId,etag:y.ETag,type:y.Type,size:Number(y.Size),storageClass:y.StorageClass,owner:{id:y.Owner.ID,displayName:y.Owner.DisplayName}}})),E&&(c(E)||(E=[E]),E=E.map(function(y){return{name:y.Key,lastModified:y.LastModified,versionId:y.VersionId,owner:{id:y.Owner.ID,displayName:y.Owner.DisplayName}}})),p=o.data.CommonPrefixes||null,p&&(c(p)||(p=[p]),p=p.map(function(y){return y.Prefix})),R.abrupt("return",{res:o.res,objects:s,deleteMarker:E,prefixes:p,nextMarker:o.data.NextMarker||null,NextVersionIdMarker:o.data.NextVersionIdMarker||null,isTruncated:o.data.IsTruncated==="true"});case 19:case"end":return R.stop()}},null,this)}function n(f){return f.replace(/([A-Z])/g,"-$1").toLowerCase()}function l(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d={};return h(f)&&(0,g.default)(f).forEach(function(u){d[n(u)]=f[u]}),d}},{"../utils/isArray":42,"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],26:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=v(N),S=H("babel-runtime/core-js/object/assign"),k=v(S);function v(C){return C&&C.__esModule?C:{default:C}}var m=I;m.getObjectMeta=function(_,e){var h,r;return g.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return e=e||{},_=this._objectName(_),e.subres=(0,k.default)({objectMeta:""},e.subres),e.versionId&&(e.subres.versionId=e.versionId),h=this._objectRequestParams("HEAD",_,e),h.successStatuses=[200],i.next=8,g.default.awrap(this.request(h));case 8:return r=i.sent,i.abrupt("return",{status:r.status,res:r.res});case 10:case"end":return i.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],27:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=v(N),S=H("babel-runtime/core-js/object/assign"),k=v(S);function v(e){return e&&e.__esModule?e:{default:e}}var m=I,C=H("../utils/isObject"),_=C.isObject;m.getObjectTagging=function(h){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c,i,n,l,f;return g.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return r.subres=(0,k.default)({tagging:""},r.subres),r.versionId&&(r.subres.versionId=r.versionId),h=this._objectName(h),c=this._objectRequestParams("GET",h,r),c.successStatuses=[200],u.next=7,g.default.awrap(this.request(c));case 7:return i=u.sent,u.next=10,g.default.awrap(this.parseXML(i.data));case 10:return n=u.sent,l=n.TagSet.Tag,l=l&&_(l)?[l]:l||[],f={},l.forEach(function(o){f[o.Key]=o.Value}),u.abrupt("return",{status:i.status,res:i.res,tag:f});case 16:case"end":return u.stop()}},null,this)}},{"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],28:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=v(N),S=H("babel-runtime/core-js/object/assign"),k=v(S);function v(C){return C&&C.__esModule?C:{default:C}}var m=I;m.getSymlink=function(_){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h,r,c;return g.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return e.subres=(0,k.default)({symlink:""},e.subres),e.versionId&&(e.subres.versionId=e.versionId),_=this._objectName(_),h=this._objectRequestParams("GET",_,e),h.successStatuses=[200],n.next=7,g.default.awrap(this.request(h));case 7:return r=n.sent,c=r.res.headers["x-oss-symlink-target"],n.abrupt("return",{targetName:decodeURIComponent(c),res:r.res});case 10:case"end":return n.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],29:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=C(N),S=H("babel-runtime/core-js/object/keys"),k=C(S),v=H("babel-runtime/core-js/object/assign"),m=C(v);function C(e){return e&&e.__esModule?e:{default:e}}var _=I;_.head=function(h){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c,i,n;return g.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return r.subres=(0,m.default)({},r.subres),r.versionId&&(r.subres.versionId=r.versionId),c=this._objectRequestParams("HEAD",h,r),c.successStatuses=[200,304],f.next=6,g.default.awrap(this.request(c));case 6:return i=f.sent,n={meta:null,res:i.res,status:i.status},i.status===200&&(0,k.default)(i.headers).forEach(function(d){d.indexOf("x-oss-meta-")===0&&(n.meta||(n.meta={}),n.meta[d.substring(11)]=i.headers[d])}),f.abrupt("return",n);case 10:case"end":return f.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],30:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=v(N),S=H("babel-runtime/core-js/object/assign"),k=v(S);function v(C){return C&&C.__esModule?C:{default:C}}var m=I;m.putACL=function(_,e,h){var r,c;return g.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return h=h||{},h.subres=(0,k.default)({acl:""},h.subres),h.versionId&&(h.subres.versionId=h.versionId),h.headers=h.headers||{},h.headers["x-oss-object-acl"]=e,_=this._objectName(_),r=this._objectRequestParams("PUT",_,h),r.successStatuses=[200],n.next=10,g.default.awrap(this.request(r));case 10:return c=n.sent,n.abrupt("return",{res:c.res});case 12:case"end":return n.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],31:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=C(N),S=H("babel-runtime/core-js/object/keys"),k=C(S),v=H("babel-runtime/core-js/object/assign"),m=C(v);function C(i){return i&&i.__esModule?i:{default:i}}var _=H("../utils/obj2xml"),e=_.obj2xml,h=H("../utils/checkObjectTag"),r=h.checkObjectTag,c=I;c.putObjectTagging=function(n,l){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},d,u,o;return g.default.async(function(E){for(;;)switch(E.prev=E.next){case 0:return r(l),f.subres=(0,m.default)({tagging:""},f.subres),f.versionId&&(f.subres.versionId=f.versionId),n=this._objectName(n),d=this._objectRequestParams("PUT",n,f),d.successStatuses=[200],l=(0,k.default)(l).map(function(b){return{Key:b,Value:l[b]}}),u={Tagging:{TagSet:{Tag:l}}},d.mime="xml",d.content=e(u),E.next=12,g.default.awrap(this.request(d));case 12:return o=E.sent,E.abrupt("return",{res:o.res,status:o.status});case 14:case"end":return E.stop()}},null,this)}},{"../utils/checkObjectTag":36,"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],32:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=v(N),S=H("babel-runtime/core-js/object/assign"),k=v(S);function v(C){return C&&C.__esModule?C:{default:C}}var m=I;m.putSymlink=function(_,e,h){var r,c;return g.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return h=h||{},h.headers=h.headers||{},e=this._escape(this._objectName(e)),this._convertMetaToHeaders(h.meta,h.headers),h.headers["x-oss-symlink-target"]=e,h.subres=(0,k.default)({symlink:""},h.subres),h.versionId&&(h.subres.versionId=h.versionId),h.storageClass&&(h.headers["x-oss-storage-class"]=h.storageClass),_=this._objectName(_),r=this._objectRequestParams("PUT",_,h),r.successStatuses=[200],n.next=13,g.default.awrap(this.request(r));case 13:return c=n.sent,n.abrupt("return",{res:c.res});case 15:case"end":return n.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],33:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=v(N),S=H("babel-runtime/core-js/promise"),k=v(S);function v(C){return C&&C.__esModule?C:{default:C}}var m=I;m._parallelNode=function(_,e,h,r){var c,i,n,l,f,d,u,o;return g.default.async(function(E){for(;;)switch(E.prev=E.next){case 0:c=this,i=[],n=[],l=_.length/e,f=_.length%e,d=f===0?l:(_.length-f)/e+1,u=1,o=0;case 8:if(!(o<_.length)){E.next=26;break}if(!c.isCancel()){E.next=11;break}return E.abrupt("break",26);case 11:if(r?n.push(h(c,_[o],r)):n.push(h(c,_[o])),!(n.length===e||u===d&&o===_.length-1)){E.next=23;break}return E.prev=13,u+=1,E.next=17,g.default.awrap(k.default.all(n));case 17:E.next=22;break;case 19:E.prev=19,E.t0=E.catch(13),i.push(E.t0);case 22:n=[];case 23:o++,E.next=8;break;case 26:return E.abrupt("return",i);case 27:case"end":return E.stop()}},null,this,[[13,19]])},m._parallel=function(_,e,h){var r=this;return new k.default(function(c){var i=[];if(e<=0||!_){c(i);return}function n(p){return function(){if(p===null)throw new Error("Callback was already called.");var D=p;p=null;for(var R=arguments.length,y=Array(R),x=0;x0){d=!0,u<=0&&c(i);return}u+=1,E(p.value,n(s))}o=!1}b()})},m.cancel=function(_){this.options.cancelFlag=!0,_&&this.abortMultipartUpload(_.name,_.uploadId,_.options)},m.isCancel=function(){return this.options.cancelFlag},m.resetCancelFlag=function(){this.options.cancelFlag=!1},m._stop=function(){this.options.cancelFlag=!0},m._makeCancelEvent=function(){var _={status:0,name:"cancel"};return _}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(H,Z,I){(function(N){"use strict";var g=H("babel-runtime/core-js/json/stringify"),S=m(g),k=H("babel-runtime/core-js/object/keys"),v=m(k);function m(e){return e&&e.__esModule?e:{default:e}}var C=H("./../../shims/crypto/crypto.js"),_=H("is-type-of");I.buildCanonicalizedResource=function(h,r){var c=""+h,i="?";if(_.string(r)&&r.trim()!=="")c+=i+r;else if(_.array(r))r.sort(),c+=i+r.join("&");else if(r){var n=function(d,u){return d[0]>u[0]?1:d[0]1&&arguments[1]!==void 0?arguments[1]:{},c=arguments[2],i=arguments[3],n={},l=r.subResource,f=l===void 0?{}:l;if(r.process){var d="x-oss-process";f[d]=r.process}if(r.trafficLimit){var u="x-oss-traffic-limit";f[u]=r.trafficLimit}if(r.response&&(0,v.default)(r.response).forEach(function(b){var p="response-"+b.toLowerCase();f[p]=r.response[b]}),(0,v.default)(r).forEach(function(b){var p=b.toLowerCase(),D=r[b];p.indexOf("x-oss-")===0?n[p]=D:(p.indexOf("content-md5")===0||p.indexOf("content-type")===0)&&(n[b]=D)}),Object.prototype.hasOwnProperty.call(r,"security-token")&&(f["security-token"]=r["security-token"]),Object.prototype.hasOwnProperty.call(r,"callback")){var o={callbackUrl:encodeURI(r.callback.url),callbackBody:r.callback.body};if(r.callback.host&&(o.callbackHost=r.callback.host),r.callback.contentType&&(o.callbackBodyType=r.callback.contentType),f.callback=N.from((0,S.default)(o)).toString("base64"),r.callback.customValue){var s={};(0,v.default)(r.callback.customValue).forEach(function(b){s["x:"+b]=r.callback.customValue[b]}),f["callback-var"]=N.from((0,S.default)(s)).toString("base64")}}var E=this.buildCanonicalString(r.method,c,{headers:n,parameters:f},i.toString());return{Signature:this.computeSignature(h,E),subResource:f}}}).call(this,H("buffer").Buffer)},{"./../../shims/crypto/crypto.js":284,"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73,"is-type-of":289}],35:[function(H,Z,I){"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.checkBucketName=void 0,I.checkBucketName=function(N,g){var S=g?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!S.test(N))throw new Error("The bucket must be conform to the specifications")}},{}],36:[function(H,Z,I){"use strict";var N=H("babel-runtime/core-js/object/entries"),g=S(N);function S(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(I,"__esModule",{value:!0}),I.checkObjectTag=void 0;var k=H("./checkValid"),v=k.checkValid,m=H("./isObject"),C=m.isObject,_=[{validator:function(c){if(typeof c!="string")throw new Error("the key and value of the tag must be String")}},{pattern:/^[a-zA-Z0-9 +-=._:/]+$/,msg:"tag can contain letters, numbers, spaces, and the following symbols: plus sign (+), hyphen (-), equal sign (=), period (.), underscore (_), colon (:), and forward slash (/)"}],e={key:[].concat(_,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(_,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function h(r){if(!C(r))throw new Error("tag must be Object");var c=(0,g.default)(r);if(c.length>10)throw new Error("maximum of 10 tags for a object");var i=["key","value"];c.forEach(function(n){n.forEach(function(l,f){v(l,e[i[f]])})})}I.checkObjectTag=h},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(H,Z,I){"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.checkValid=void 0;function N(g,S){S.forEach(function(k){if(k.validator)k.validator(g);else if(k.pattern&&!k.pattern.test(g))throw new Error(k.msg)})}I.checkValid=N},{}],38:[function(H,Z,I){(function(N){"use strict";var g=H("babel-runtime/core-js/object/assign"),S=k(g);function k(n){return n&&n.__esModule?n:{default:n}}Object.defineProperty(I,"__esModule",{value:!0}),I.createRequest=void 0;var v=H("./../../../shims/crypto/crypto.js"),m=H("debug")("ali-oss"),C=H("mime"),_=H("dateformat"),e=H("copy-to"),h=H("path");function r(n,l){return n[l]||n[l.toLowerCase()]}function c(n,l){delete n[l],delete n[l.toLowerCase()]}function i(n){var l=new Date;this.options.amendTimeSkewed&&(l=+new Date+this.options.amendTimeSkewed);var f={"x-oss-date":_(l,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(f["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,S.default)(f,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(f["x-oss-security-token"]=this.options.stsToken),e(n.headers).to(f),r(f,"Content-Type")||(n.mime&&n.mime.indexOf("/")>0?f["Content-Type"]=n.mime:f["Content-Type"]=C.getType(n.mime||h.extname(n.object||""))),r(f,"Content-Type")||c(f,"Content-Type"),n.content&&(f["Content-Md5"]=v.createHash("md5").update(N.from(n.content,"utf8")).digest("base64"),f["Content-Length"]||(f["Content-Length"]=n.content.length));var d=this._getResource(n);f.authorization=this.authorization(n.method,d,n.subres,f);var u=this._getReqUrl(n);m("request %s %s, with headers %j, !!stream: %s",n.method,u,f,!!n.stream);var o=n.timeout||this.options.timeout,s={method:n.method,content:n.content,stream:n.stream,headers:f,timeout:o,writeStream:n.writeStream,customResponse:n.customResponse,ctx:n.ctx||this.ctx};return this.agent&&(s.agent=this.agent),this.httpsAgent&&(s.httpsAgent=this.httpsAgent),{url:u,params:s}}I.createRequest=i}).call(this,H("buffer").Buffer)},{"./../../../shims/crypto/crypto.js":284,"babel-runtime/core-js/object/assign":54,buffer:73,"copy-to":76,dateformat:190,debug:288,mime:202,path:205}],39:[function(H,Z,I){"use strict";var N=H("babel-runtime/core-js/object/keys"),g=v(N),S=H("babel-runtime/helpers/typeof"),k=v(S);function v(m){return m&&m.__esModule?m:{default:m}}Object.defineProperty(I,"__esModule",{value:!0}),I.deepCopy=void 0,I.deepCopy=function(m){if(m===null||(typeof m=="undefined"?"undefined":(0,k.default)(m))!=="object")return m;var C=Array.isArray(m)?[]:{};return(0,g.default)(m).forEach(function(_){C[_]=I.deepCopy(m[_])}),C}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(H,Z,I){"use strict";var N=H("babel-runtime/core-js/object/keys"),g=v(N),S=H("babel-runtime/helpers/typeof"),k=v(S);function v(_){return _&&_.__esModule?_:{default:_}}Object.defineProperty(I,"__esModule",{value:!0}),I.formatObjKey=void 0;function m(_,e){if(_===null||(typeof _=="undefined"?"undefined":(0,k.default)(_))!=="object")return _;var h=void 0;if(Array.isArray(_)){h=[];for(var r=0;r<_.length;r++)h.push(m(_[r],e))}else h={},(0,g.default)(_).forEach(function(c){h[C(c,e)]=m(_[c],e)});return h}I.formatObjKey=m;function C(_,e){return e==="firstUpperCase"?_=_.replace(/^./,function(h){return h.toUpperCase()}):e==="firstLowerCase"&&(_=_.replace(/^./,function(h){return h.toLowerCase()})),_}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],41:[function(H,Z,I){"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.getStrBytesCount=void 0;function N(g){for(var S=0,k=0;k `),_&&_.firstUpperCase&&(C=k.formatObjKey(C,"firstUpperCase")),v(C)==="object"?(0,g.default)(C).forEach(function(h){v(C[h])==="string"||v(C[h])==="number"?e+="<"+h+">"+C[h]+"":v(C[h])==="object"?e+="<"+h+">"+m(C[h])+"":v(C[h])==="array"?e+=C[h].map(function(r){return"<"+h+">"+m(r)+""}).join(""):e+="<"+h+">"+C[h].toString()+""}):e+=C.toString(),e}I.obj2xml=m},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(H,Z,I){Z.exports=N,Z.exports.HttpsAgent=N;function N(){}},{}],49:[function(H,Z,I){Z.exports=H("./register")().Promise},{"./register":51}],50:[function(H,Z,I){"use strict";var N="@@any-promise/REGISTRATION",g=null;Z.exports=function(S,k){return function(m,C){m=m||null,C=C||{};var _=C.global!==!1;if(g===null&&_&&(g=S[N]||null),g!==null&&m!==null&&g.implementation!==m)throw new Error('any-promise already defined as "'+g.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return g===null&&(m!==null&&typeof C.Promise!="undefined"?g={Promise:C.Promise,implementation:m}:g=k(m),_&&(S[N]=g)),g}}},{}],51:[function(H,Z,I){"use strict";Z.exports=H("./loader")(window,N);function N(){if(typeof window.Promise=="undefined")throw new Error("any-promise browser requires a polyfill or explicit registration e.g: require('any-promise/register/bluebird')");return{Promise:window.Promise,implementation:"window.Promise"}}},{"./loader":50}],52:[function(H,Z,I){Z.exports={default:H("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(H,Z,I){Z.exports={default:H("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(H,Z,I){Z.exports={default:H("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(H,Z,I){Z.exports={default:H("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(H,Z,I){Z.exports={default:H("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(H,Z,I){Z.exports={default:H("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(H,Z,I){Z.exports={default:H("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":83}],59:[function(H,Z,I){Z.exports={default:H("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":84}],60:[function(H,Z,I){Z.exports={default:H("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(H,Z,I){Z.exports={default:H("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(H,Z,I){Z.exports={default:H("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(H,Z,I){Z.exports={default:H("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":88}],64:[function(H,Z,I){Z.exports={default:H("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(H,Z,I){Z.exports={default:H("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(H,Z,I){Z.exports={default:H("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(H,Z,I){"use strict";I.__esModule=!0;var N=H("../core-js/symbol/iterator"),g=m(N),S=H("../core-js/symbol"),k=m(S),v=typeof k.default=="function"&&typeof g.default=="symbol"?function(C){return typeof C}:function(C){return C&&typeof k.default=="function"&&C.constructor===k.default&&C!==k.default.prototype?"symbol":typeof C};function m(C){return C&&C.__esModule?C:{default:C}}I.default=typeof k.default=="function"&&v(g.default)==="symbol"?function(C){return typeof C=="undefined"?"undefined":v(C)}:function(C){return C&&typeof k.default=="function"&&C.constructor===k.default&&C!==k.default.prototype?"symbol":typeof C=="undefined"?"undefined":v(C)}},{"../core-js/symbol":64,"../core-js/symbol/iterator":66}],68:[function(H,Z,I){Z.exports=H("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(H,Z,I){"use strict";I.byteLength=_,I.toByteArray=h,I.fromByteArray=i;for(var N=[],g=[],S=typeof Uint8Array!="undefined"?Uint8Array:Array,k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",v=0,m=k.length;v0)throw new Error("Invalid string. Length must be a multiple of 4");var f=n.indexOf("=");f===-1&&(f=l);var d=f===l?0:4-f%4;return[f,d]}function _(n){var l=C(n),f=l[0],d=l[1];return(f+d)*3/4-d}function e(n,l,f){return(l+f)*3/4-f}function h(n){var l,f=C(n),d=f[0],u=f[1],o=new S(e(n,d,u)),s=0,E=u>0?d-4:d,b;for(b=0;b>16&255,o[s++]=l>>8&255,o[s++]=l&255;return u===2&&(l=g[n.charCodeAt(b)]<<2|g[n.charCodeAt(b+1)]>>4,o[s++]=l&255),u===1&&(l=g[n.charCodeAt(b)]<<10|g[n.charCodeAt(b+1)]<<4|g[n.charCodeAt(b+2)]>>2,o[s++]=l>>8&255,o[s++]=l&255),o}function r(n){return N[n>>18&63]+N[n>>12&63]+N[n>>6&63]+N[n&63]}function c(n,l,f){for(var d,u=[],o=l;oE?E:s+o));return d===1?(l=n[f-1],u.push(N[l>>2]+N[l<<4&63]+"==")):d===2&&(l=(n[f-2]<<8)+n[f-1],u.push(N[l>>10]+N[l>>4&63]+N[l<<2&63]+"=")),u.join("")}},{}],70:[function(H,Z,I){/*! * Bowser - a browser detector * https://github.com/ded/bowser * MIT License | (c) Dustin Diaz 2015 */!function(N,g,S){typeof Z!="undefined"&&Z.exports?Z.exports=S():typeof define=="function"&&define.amd?define(g,S):N[g]=S()}(this,"bowser",function(){var N=!0;function g(e){function h(B){var U=e.match(B);return U&&U.length>1&&U[1]||""}function r(B){var U=e.match(B);return U&&U.length>1&&U[2]||""}var c=h(/(ipod|iphone|ipad)/i).toLowerCase(),i=/like android/i.test(e),n=!i&&/android/i.test(e),l=/nexus\s*[0-6]\s*/i.test(e),f=!l&&/nexus\s*[0-9]+/i.test(e),d=/CrOS/.test(e),u=/silk/i.test(e),o=/sailfish/i.test(e),s=/tizen/i.test(e),E=/(web|hpw)(o|0)s/i.test(e),b=/windows phone/i.test(e),p=/SamsungBrowser/i.test(e),D=!b&&/windows/i.test(e),R=!c&&!u&&/macintosh/i.test(e),y=!n&&!o&&!s&&!E&&/linux/i.test(e),x=r(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),w=h(/version\/(\d+(\.\d+)?)/i),T=/tablet/i.test(e)&&!/tablet pc/i.test(e),F=!T&&/[^-]mobi/i.test(e),P=/xbox/i.test(e),A;/opera/i.test(e)?A={name:"Opera",opera:N,version:w||h(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(e)?A={name:"Opera",opera:N,version:h(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||w}:/SamsungBrowser/i.test(e)?A={name:"Samsung Internet for Android",samsungBrowser:N,version:w||h(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(e)?A={name:"NAVER Whale browser",whale:N,version:h(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(e)?A={name:"MZ Browser",mzbrowser:N,version:h(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(e)?A={name:"Opera Coast",coast:N,version:w||h(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(e)?A={name:"Focus",focus:N,version:h(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(e)?A={name:"Yandex Browser",yandexbrowser:N,version:w||h(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(e)?A={name:"UC Browser",ucbrowser:N,version:h(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(e)?A={name:"Maxthon",maxthon:N,version:h(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(e)?A={name:"Epiphany",epiphany:N,version:h(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(e)?A={name:"Puffin",puffin:N,version:h(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(e)?A={name:"Sleipnir",sleipnir:N,version:h(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(e)?A={name:"K-Meleon",kMeleon:N,version:h(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:b?(A={name:"Windows Phone",osname:"Windows Phone",windowsphone:N},x?(A.msedge=N,A.version=x):(A.msie=N,A.version=h(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(e)?A={name:"Internet Explorer",msie:N,version:h(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:d?A={name:"Chrome",osname:"Chrome OS",chromeos:N,chromeBook:N,chrome:N,version:h(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(e)?A={name:"Microsoft Edge",msedge:N,version:x}:/vivaldi/i.test(e)?A={name:"Vivaldi",vivaldi:N,version:h(/vivaldi\/(\d+(\.\d+)?)/i)||w}:o?A={name:"Sailfish",osname:"Sailfish OS",sailfish:N,version:h(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(e)?A={name:"SeaMonkey",seamonkey:N,version:h(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(e)?(A={name:"Firefox",firefox:N,version:h(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(e)&&(A.firefoxos=N,A.osname="Firefox OS")):u?A={name:"Amazon Silk",silk:N,version:h(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(e)?A={name:"PhantomJS",phantom:N,version:h(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(e)?A={name:"SlimerJS",slimer:N,version:h(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(e)||/rim\stablet/i.test(e)?A={name:"BlackBerry",osname:"BlackBerry OS",blackberry:N,version:w||h(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:E?(A={name:"WebOS",osname:"WebOS",webos:N,version:w||h(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(e)&&(A.touchpad=N)):/bada/i.test(e)?A={name:"Bada",osname:"Bada",bada:N,version:h(/dolfin\/(\d+(\.\d+)?)/i)}:s?A={name:"Tizen",osname:"Tizen",tizen:N,version:h(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||w}:/qupzilla/i.test(e)?A={name:"QupZilla",qupzilla:N,version:h(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||w}:/chromium/i.test(e)?A={name:"Chromium",chromium:N,version:h(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||w}:/chrome|crios|crmo/i.test(e)?A={name:"Chrome",chrome:N,version:h(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:n?A={name:"Android",version:w}:/safari|applewebkit/i.test(e)?(A={name:"Safari",safari:N},w&&(A.version=w)):c?(A={name:c=="iphone"?"iPhone":c=="ipad"?"iPad":"iPod"},w&&(A.version=w)):/googlebot/i.test(e)?A={name:"Googlebot",googlebot:N,version:h(/googlebot\/(\d+(\.\d+))/i)||w}:A={name:h(/^(.*)\/(.*) /),version:r(/^(.*)\/(.*) /)},!A.msedge&&/(apple)?webkit/i.test(e)?(/(apple)?webkit\/537\.36/i.test(e)?(A.name=A.name||"Blink",A.blink=N):(A.name=A.name||"Webkit",A.webkit=N),!A.version&&w&&(A.version=w)):!A.opera&&/gecko\//i.test(e)&&(A.name=A.name||"Gecko",A.gecko=N,A.version=A.version||h(/gecko\/(\d+(\.\d+)?)/i)),!A.windowsphone&&(n||A.silk)?(A.android=N,A.osname="Android"):!A.windowsphone&&c?(A[c]=N,A.ios=N,A.osname="iOS"):R?(A.mac=N,A.osname="macOS"):P?(A.xbox=N,A.osname="Xbox"):D?(A.windows=N,A.osname="Windows"):y&&(A.linux=N,A.osname="Linux");function X(B){switch(B){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}var z="";A.windows?z=X(h(/Windows ((NT|XP)( \d\d?.\d)?)/i)):A.windowsphone?z=h(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):A.mac?(z=h(/Mac OS X (\d+([_\.\s]\d+)*)/i),z=z.replace(/[_\s]/g,".")):c?(z=h(/os (\d+([_\s]\d+)*) like mac os x/i),z=z.replace(/[_\s]/g,".")):n?z=h(/android[ \/-](\d+(\.\d+)*)/i):A.webos?z=h(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):A.blackberry?z=h(/rim\stablet\sos\s(\d+(\.\d+)*)/i):A.bada?z=h(/bada\/(\d+(\.\d+)*)/i):A.tizen&&(z=h(/tizen[\/\s](\d+(\.\d+)*)/i)),z&&(A.osversion=z);var O=!A.windows&&z.split(".")[0];return T||f||c=="ipad"||n&&(O==3||O>=4&&!F)||A.silk?A.tablet=N:(F||c=="iphone"||c=="ipod"||n||l||A.blackberry||A.webos||A.bada)&&(A.mobile=N),A.msedge||A.msie&&A.version>=10||A.yandexbrowser&&A.version>=15||A.vivaldi&&A.version>=1||A.chrome&&A.version>=20||A.samsungBrowser&&A.version>=4||A.whale&&m([A.version,"1.0"])===1||A.mzbrowser&&m([A.version,"6.0"])===1||A.focus&&m([A.version,"1.0"])===1||A.firefox&&A.version>=20||A.safari&&A.version>=6||A.opera&&A.version>=10||A.ios&&A.osversion&&A.osversion.split(".")[0]>=6||A.blackberry&&A.version>=10.1||A.chromium&&A.version>=20?A.a=N:A.msie&&A.version<10||A.chrome&&A.version<20||A.firefox&&A.version<20||A.safari&&A.version<6||A.opera&&A.version<10||A.ios&&A.osversion&&A.osversion.split(".")[0]<6||A.chromium&&A.version<20?A.c=N:A.x=N,A}var S=g(typeof navigator!="undefined"&&navigator.userAgent||"");S.test=function(e){for(var h=0;h=0;){if(r[0][h]>r[1][h])return 1;if(r[0][h]===r[1][h]){if(h===0)return 0}else return-1}}function C(e,h,r){var c=S;typeof h=="string"&&(r=h,h=void 0),h===void 0&&(h=!1),r&&(c=g(r));var i=""+c.version;for(var n in e)if(e.hasOwnProperty(n)&&c[n]){if(typeof e[n]!="string")throw new Error("Browser version in the minVersion map should be a string: "+n+": "+String(e));return m([i,e[n]])<0}return h}function _(e,h,r){return!C(e,h,r)}return S.isUnsupportedBrowser=C,S.compareVersions=m,S.check=_,S._detect=g,S.detect=g,S})},{}],71:[function(H,Z,I){},{}],72:[function(H,Z,I){var N=H("buffer").Buffer,g=N.isEncoding||function(_){switch(_&&_.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function S(_){if(_&&!g(_))throw new Error("Unknown encoding: "+_)}var k=I.StringDecoder=function(_){this.encoding=(_||"utf8").toLowerCase().replace(/[-_]/,""),S(_);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=m;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=C;break;default:this.write=v;return}this.charBuffer=new N(6),this.charReceived=0,this.charLength=0};k.prototype.write=function(_){for(var e="";this.charLength;){var h=_.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:_.length;if(_.copy(this.charBuffer,this.charReceived,0,h),this.charReceived+=h,this.charReceived=55296&&c<=56319){this.charLength+=this.surrogateSize,e="";continue}if(this.charReceived=this.charLength=0,_.length===0)return e;break}this.detectIncompleteChar(_);var r=_.length;this.charLength&&(_.copy(this.charBuffer,0,_.length-this.charReceived,r),r-=this.charReceived),e+=_.toString(this.encoding,0,r);var r=e.length-1,c=e.charCodeAt(r);if(c>=55296&&c<=56319){var i=this.surrogateSize;return this.charLength+=i,this.charReceived+=i,this.charBuffer.copy(this.charBuffer,i,0,i),_.copy(this.charBuffer,0,0,i),e.substring(0,r)}return e},k.prototype.detectIncompleteChar=function(_){for(var e=_.length>=3?3:_.length;e>0;e--){var h=_[_.length-e];if(e==1&&h>>5==6){this.charLength=2;break}if(e<=2&&h>>4==14){this.charLength=3;break}if(e<=3&&h>>3==30){this.charLength=4;break}}this.charReceived=e},k.prototype.end=function(_){var e="";if(_&&_.length&&(e=this.write(_)),this.charReceived){var h=this.charReceived,r=this.charBuffer,c=this.encoding;e+=r.slice(0,h).toString(c)}return e};function v(_){return _.toString(this.encoding)}function m(_){this.charReceived=_.length%2,this.charLength=this.charReceived?2:0}function C(_){this.charReceived=_.length%3,this.charLength=this.charReceived?3:0}},{buffer:73}],73:[function(H,Z,I){(function(N,g){/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */"use strict";var S=H("base64-js"),k=H("ieee754"),v=H("isarray");I.Buffer=g,I.SlowBuffer=u,I.INSPECT_MAX_BYTES=50,g.TYPED_ARRAY_SUPPORT=N.TYPED_ARRAY_SUPPORT!==void 0?N.TYPED_ARRAY_SUPPORT:m(),I.kMaxLength=C();function m(){try{var ie=new Uint8Array(1);return ie.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},ie.foo()===42&&typeof ie.subarray=="function"&&ie.subarray(1,1).byteLength===0}catch(ne){return!1}}function C(){return g.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function _(ie,ne){if(C()=C())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+C().toString(16)+" bytes");return ie|0}function u(ie){return+ie!=ie&&(ie=0),g.alloc(+ie)}g.isBuffer=function(ne){return!!(ne!=null&&ne._isBuffer)},g.compare=function(ne,J){if(!g.isBuffer(ne)||!g.isBuffer(J))throw new TypeError("Arguments must be Buffers");if(ne===J)return 0;for(var $=ne.length,le=J.length,ce=0,we=Math.min($,le);ce>>1;case"base64":return V(ie).length;default:if($)return te(ie).length;ne=(""+ne).toLowerCase(),$=!0}}g.byteLength=o;function s(ie,ne,J){var $=!1;if((ne===void 0||ne<0)&&(ne=0),ne>this.length)return"";if((J===void 0||J>this.length)&&(J=this.length),J<=0)return"";if(J>>>=0,ne>>>=0,J<=ne)return"";for(ie||(ie="utf8");;)switch(ie){case"hex":return B(this,ne,J);case"utf8":case"utf-8":return P(this,ne,J);case"ascii":return z(this,ne,J);case"latin1":case"binary":return O(this,ne,J);case"base64":return F(this,ne,J);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,ne,J);default:if($)throw new TypeError("Unknown encoding: "+ie);ie=(ie+"").toLowerCase(),$=!0}}g.prototype._isBuffer=!0;function E(ie,ne,J){var $=ie[ne];ie[ne]=ie[J],ie[J]=$}g.prototype.swap16=function(){var ne=this.length;if(ne%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var J=0;J0&&(ne=this.toString("hex",0,J).match(/.{2}/g).join(" "),this.length>J&&(ne+=" ... ")),""},g.prototype.compare=function(ne,J,$,le,ce){if(!g.isBuffer(ne))throw new TypeError("Argument must be a Buffer");if(J===void 0&&(J=0),$===void 0&&($=ne?ne.length:0),le===void 0&&(le=0),ce===void 0&&(ce=this.length),J<0||$>ne.length||le<0||ce>this.length)throw new RangeError("out of range index");if(le>=ce&&J>=$)return 0;if(le>=ce)return-1;if(J>=$)return 1;if(J>>>=0,$>>>=0,le>>>=0,ce>>>=0,this===ne)return 0;for(var we=ce-le,Fe=$-J,Xe=Math.min(we,Fe),$e=this.slice(le,ce),Ye=ne.slice(J,$),Ze=0;Ze2147483647?J=2147483647:J<-2147483648&&(J=-2147483648),J=+J,isNaN(J)&&(J=le?0:ie.length-1),J<0&&(J=ie.length+J),J>=ie.length){if(le)return-1;J=ie.length-1}else if(J<0)if(le)J=0;else return-1;if(typeof ne=="string"&&(ne=g.from(ne,$)),g.isBuffer(ne))return ne.length===0?-1:p(ie,ne,J,$,le);if(typeof ne=="number")return ne=ne&255,g.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?le?Uint8Array.prototype.indexOf.call(ie,ne,J):Uint8Array.prototype.lastIndexOf.call(ie,ne,J):p(ie,[ne],J,$,le);throw new TypeError("val must be string, number or Buffer")}function p(ie,ne,J,$,le){var ce=1,we=ie.length,Fe=ne.length;if($!==void 0&&($=String($).toLowerCase(),$==="ucs2"||$==="ucs-2"||$==="utf16le"||$==="utf-16le")){if(ie.length<2||ne.length<2)return-1;ce=2,we/=2,Fe/=2,J/=2}function Xe(Pe,Ie){return ce===1?Pe[Ie]:Pe.readUInt16BE(Ie*ce)}var $e;if(le){var Ye=-1;for($e=J;$ewe&&(J=we-Fe),$e=J;$e>=0;$e--){for(var Ze=!0,qe=0;qele&&($=le)):$=le;var ce=ne.length;if(ce%2!==0)throw new TypeError("Invalid hex string");$>ce/2&&($=ce/2);for(var we=0;we<$;++we){var Fe=parseInt(ne.substr(we*2,2),16);if(isNaN(Fe))return we;ie[J+we]=Fe}return we}function R(ie,ne,J,$){return Q(te(ne,ie.length-J),ie,J,$)}function y(ie,ne,J,$){return Q(W(ne),ie,J,$)}function x(ie,ne,J,$){return y(ie,ne,J,$)}function w(ie,ne,J,$){return Q(V(ne),ie,J,$)}function T(ie,ne,J,$){return Q(Y(ne,ie.length-J),ie,J,$)}g.prototype.write=function(ne,J,$,le){if(J===void 0)le="utf8",$=this.length,J=0;else if($===void 0&&typeof J=="string")le=J,$=this.length,J=0;else if(isFinite(J))J=J|0,isFinite($)?($=$|0,le===void 0&&(le="utf8")):(le=$,$=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var ce=this.length-J;if(($===void 0||$>ce)&&($=ce),ne.length>0&&($<0||J<0)||J>this.length)throw new RangeError("Attempt to write outside buffer bounds");le||(le="utf8");for(var we=!1;;)switch(le){case"hex":return D(this,ne,J,$);case"utf8":case"utf-8":return R(this,ne,J,$);case"ascii":return y(this,ne,J,$);case"latin1":case"binary":return x(this,ne,J,$);case"base64":return w(this,ne,J,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,ne,J,$);default:if(we)throw new TypeError("Unknown encoding: "+le);le=(""+le).toLowerCase(),we=!0}},g.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function F(ie,ne,J){return ne===0&&J===ie.length?S.fromByteArray(ie):S.fromByteArray(ie.slice(ne,J))}function P(ie,ne,J){J=Math.min(ie.length,J);for(var $=[],le=ne;le239?4:ce>223?3:ce>191?2:1;if(le+Fe<=J){var Xe,$e,Ye,Ze;switch(Fe){case 1:ce<128&&(we=ce);break;case 2:Xe=ie[le+1],(Xe&192)===128&&(Ze=(ce&31)<<6|Xe&63,Ze>127&&(we=Ze));break;case 3:Xe=ie[le+1],$e=ie[le+2],(Xe&192)===128&&($e&192)===128&&(Ze=(ce&15)<<12|(Xe&63)<<6|$e&63,Ze>2047&&(Ze<55296||Ze>57343)&&(we=Ze));break;case 4:Xe=ie[le+1],$e=ie[le+2],Ye=ie[le+3],(Xe&192)===128&&($e&192)===128&&(Ye&192)===128&&(Ze=(ce&15)<<18|(Xe&63)<<12|($e&63)<<6|Ye&63,Ze>65535&&Ze<1114112&&(we=Ze))}}we===null?(we=65533,Fe=1):we>65535&&(we-=65536,$.push(we>>>10&1023|55296),we=56320|we&1023),$.push(we),le+=Fe}return X($)}var A=4096;function X(ie){var ne=ie.length;if(ne<=A)return String.fromCharCode.apply(String,ie);for(var J="",$=0;$$)&&(J=$);for(var le="",ce=ne;ce$&&(ne=$),J<0?(J+=$,J<0&&(J=0)):J>$&&(J=$),JJ)throw new RangeError("Trying to access beyond buffer length")}g.prototype.readUIntLE=function(ne,J,$){ne=ne|0,J=J|0,$||L(ne,J,this.length);for(var le=this[ne],ce=1,we=0;++we0&&(ce*=256);)le+=this[ne+--J]*ce;return le},g.prototype.readUInt8=function(ne,J){return J||L(ne,1,this.length),this[ne]},g.prototype.readUInt16LE=function(ne,J){return J||L(ne,2,this.length),this[ne]|this[ne+1]<<8},g.prototype.readUInt16BE=function(ne,J){return J||L(ne,2,this.length),this[ne]<<8|this[ne+1]},g.prototype.readUInt32LE=function(ne,J){return J||L(ne,4,this.length),(this[ne]|this[ne+1]<<8|this[ne+2]<<16)+this[ne+3]*16777216},g.prototype.readUInt32BE=function(ne,J){return J||L(ne,4,this.length),this[ne]*16777216+(this[ne+1]<<16|this[ne+2]<<8|this[ne+3])},g.prototype.readIntLE=function(ne,J,$){ne=ne|0,J=J|0,$||L(ne,J,this.length);for(var le=this[ne],ce=1,we=0;++we=ce&&(le-=Math.pow(2,8*J)),le},g.prototype.readIntBE=function(ne,J,$){ne=ne|0,J=J|0,$||L(ne,J,this.length);for(var le=J,ce=1,we=this[ne+--le];le>0&&(ce*=256);)we+=this[ne+--le]*ce;return ce*=128,we>=ce&&(we-=Math.pow(2,8*J)),we},g.prototype.readInt8=function(ne,J){return J||L(ne,1,this.length),this[ne]&128?(255-this[ne]+1)*-1:this[ne]},g.prototype.readInt16LE=function(ne,J){J||L(ne,2,this.length);var $=this[ne]|this[ne+1]<<8;return $&32768?$|4294901760:$},g.prototype.readInt16BE=function(ne,J){J||L(ne,2,this.length);var $=this[ne+1]|this[ne]<<8;return $&32768?$|4294901760:$},g.prototype.readInt32LE=function(ne,J){return J||L(ne,4,this.length),this[ne]|this[ne+1]<<8|this[ne+2]<<16|this[ne+3]<<24},g.prototype.readInt32BE=function(ne,J){return J||L(ne,4,this.length),this[ne]<<24|this[ne+1]<<16|this[ne+2]<<8|this[ne+3]},g.prototype.readFloatLE=function(ne,J){return J||L(ne,4,this.length),k.read(this,ne,!0,23,4)},g.prototype.readFloatBE=function(ne,J){return J||L(ne,4,this.length),k.read(this,ne,!1,23,4)},g.prototype.readDoubleLE=function(ne,J){return J||L(ne,8,this.length),k.read(this,ne,!0,52,8)},g.prototype.readDoubleBE=function(ne,J){return J||L(ne,8,this.length),k.read(this,ne,!1,52,8)};function G(ie,ne,J,$,le,ce){if(!g.isBuffer(ie))throw new TypeError('"buffer" argument must be a Buffer instance');if(ne>le||neie.length)throw new RangeError("Index out of range")}g.prototype.writeUIntLE=function(ne,J,$,le){if(ne=+ne,J=J|0,$=$|0,!le){var ce=Math.pow(2,8*$)-1;G(this,ne,J,$,ce,0)}var we=1,Fe=0;for(this[J]=ne&255;++Fe<$&&(we*=256);)this[J+Fe]=ne/we&255;return J+$},g.prototype.writeUIntBE=function(ne,J,$,le){if(ne=+ne,J=J|0,$=$|0,!le){var ce=Math.pow(2,8*$)-1;G(this,ne,J,$,ce,0)}var we=$-1,Fe=1;for(this[J+we]=ne&255;--we>=0&&(Fe*=256);)this[J+we]=ne/Fe&255;return J+$},g.prototype.writeUInt8=function(ne,J,$){return ne=+ne,J=J|0,$||G(this,ne,J,1,255,0),g.TYPED_ARRAY_SUPPORT||(ne=Math.floor(ne)),this[J]=ne&255,J+1};function ee(ie,ne,J,$){ne<0&&(ne=65535+ne+1);for(var le=0,ce=Math.min(ie.length-J,2);le>>($?le:1-le)*8}g.prototype.writeUInt16LE=function(ne,J,$){return ne=+ne,J=J|0,$||G(this,ne,J,2,65535,0),g.TYPED_ARRAY_SUPPORT?(this[J]=ne&255,this[J+1]=ne>>>8):ee(this,ne,J,!0),J+2},g.prototype.writeUInt16BE=function(ne,J,$){return ne=+ne,J=J|0,$||G(this,ne,J,2,65535,0),g.TYPED_ARRAY_SUPPORT?(this[J]=ne>>>8,this[J+1]=ne&255):ee(this,ne,J,!1),J+2};function oe(ie,ne,J,$){ne<0&&(ne=4294967295+ne+1);for(var le=0,ce=Math.min(ie.length-J,4);le>>($?le:3-le)*8&255}g.prototype.writeUInt32LE=function(ne,J,$){return ne=+ne,J=J|0,$||G(this,ne,J,4,4294967295,0),g.TYPED_ARRAY_SUPPORT?(this[J+3]=ne>>>24,this[J+2]=ne>>>16,this[J+1]=ne>>>8,this[J]=ne&255):oe(this,ne,J,!0),J+4},g.prototype.writeUInt32BE=function(ne,J,$){return ne=+ne,J=J|0,$||G(this,ne,J,4,4294967295,0),g.TYPED_ARRAY_SUPPORT?(this[J]=ne>>>24,this[J+1]=ne>>>16,this[J+2]=ne>>>8,this[J+3]=ne&255):oe(this,ne,J,!1),J+4},g.prototype.writeIntLE=function(ne,J,$,le){if(ne=+ne,J=J|0,!le){var ce=Math.pow(2,8*$-1);G(this,ne,J,$,ce-1,-ce)}var we=0,Fe=1,Xe=0;for(this[J]=ne&255;++we<$&&(Fe*=256);)ne<0&&Xe===0&&this[J+we-1]!==0&&(Xe=1),this[J+we]=(ne/Fe>>0)-Xe&255;return J+$},g.prototype.writeIntBE=function(ne,J,$,le){if(ne=+ne,J=J|0,!le){var ce=Math.pow(2,8*$-1);G(this,ne,J,$,ce-1,-ce)}var we=$-1,Fe=1,Xe=0;for(this[J+we]=ne&255;--we>=0&&(Fe*=256);)ne<0&&Xe===0&&this[J+we+1]!==0&&(Xe=1),this[J+we]=(ne/Fe>>0)-Xe&255;return J+$},g.prototype.writeInt8=function(ne,J,$){return ne=+ne,J=J|0,$||G(this,ne,J,1,127,-128),g.TYPED_ARRAY_SUPPORT||(ne=Math.floor(ne)),ne<0&&(ne=255+ne+1),this[J]=ne&255,J+1},g.prototype.writeInt16LE=function(ne,J,$){return ne=+ne,J=J|0,$||G(this,ne,J,2,32767,-32768),g.TYPED_ARRAY_SUPPORT?(this[J]=ne&255,this[J+1]=ne>>>8):ee(this,ne,J,!0),J+2},g.prototype.writeInt16BE=function(ne,J,$){return ne=+ne,J=J|0,$||G(this,ne,J,2,32767,-32768),g.TYPED_ARRAY_SUPPORT?(this[J]=ne>>>8,this[J+1]=ne&255):ee(this,ne,J,!1),J+2},g.prototype.writeInt32LE=function(ne,J,$){return ne=+ne,J=J|0,$||G(this,ne,J,4,2147483647,-2147483648),g.TYPED_ARRAY_SUPPORT?(this[J]=ne&255,this[J+1]=ne>>>8,this[J+2]=ne>>>16,this[J+3]=ne>>>24):oe(this,ne,J,!0),J+4},g.prototype.writeInt32BE=function(ne,J,$){return ne=+ne,J=J|0,$||G(this,ne,J,4,2147483647,-2147483648),ne<0&&(ne=4294967295+ne+1),g.TYPED_ARRAY_SUPPORT?(this[J]=ne>>>24,this[J+1]=ne>>>16,this[J+2]=ne>>>8,this[J+3]=ne&255):oe(this,ne,J,!1),J+4};function ae(ie,ne,J,$,le,ce){if(J+$>ie.length)throw new RangeError("Index out of range");if(J<0)throw new RangeError("Index out of range")}function be(ie,ne,J,$,le){return le||ae(ie,ne,J,4,34028234663852886e22,-34028234663852886e22),k.write(ie,ne,J,$,23,4),J+4}g.prototype.writeFloatLE=function(ne,J,$){return be(this,ne,J,!0,$)},g.prototype.writeFloatBE=function(ne,J,$){return be(this,ne,J,!1,$)};function _e(ie,ne,J,$,le){return le||ae(ie,ne,J,8,17976931348623157e292,-17976931348623157e292),k.write(ie,ne,J,$,52,8),J+8}g.prototype.writeDoubleLE=function(ne,J,$){return _e(this,ne,J,!0,$)},g.prototype.writeDoubleBE=function(ne,J,$){return _e(this,ne,J,!1,$)},g.prototype.copy=function(ne,J,$,le){if($||($=0),!le&&le!==0&&(le=this.length),J>=ne.length&&(J=ne.length),J||(J=0),le>0&&le<$&&(le=$),le===$)return 0;if(ne.length===0||this.length===0)return 0;if(J<0)throw new RangeError("targetStart out of bounds");if($<0||$>=this.length)throw new RangeError("sourceStart out of bounds");if(le<0)throw new RangeError("sourceEnd out of bounds");le>this.length&&(le=this.length),ne.length-J=0;--we)ne[we+J]=this[we+$];else if(ce<1e3||!g.TYPED_ARRAY_SUPPORT)for(we=0;we>>0,$=$===void 0?this.length:$>>>0,ne||(ne=0);var we;if(typeof ne=="number")for(we=J;we<$;++we)this[we]=ne;else{var Fe=g.isBuffer(ne)?ne:te(new g(ne,le).toString()),Xe=Fe.length;for(we=0;we<$-J;++we)this[we+J]=Fe[we%Xe]}return this};var fe=/[^+\/0-9A-Za-z-_]/g;function Re(ie){if(ie=Oe(ie).replace(fe,""),ie.length<2)return"";for(;ie.length%4!==0;)ie=ie+"=";return ie}function Oe(ie){return ie.trim?ie.trim():ie.replace(/^\s+|\s+$/g,"")}function de(ie){return ie<16?"0"+ie.toString(16):ie.toString(16)}function te(ie,ne){ne=ne||Infinity;for(var J,$=ie.length,le=null,ce=[],we=0;we<$;++we){if(J=ie.charCodeAt(we),J>55295&&J<57344){if(!le){if(J>56319){(ne-=3)>-1&&ce.push(239,191,189);continue}else if(we+1===$){(ne-=3)>-1&&ce.push(239,191,189);continue}le=J;continue}if(J<56320){(ne-=3)>-1&&ce.push(239,191,189),le=J;continue}J=(le-55296<<10|J-56320)+65536}else le&&((ne-=3)>-1&&ce.push(239,191,189));if(le=null,J<128){if((ne-=1)<0)break;ce.push(J)}else if(J<2048){if((ne-=2)<0)break;ce.push(J>>6|192,J&63|128)}else if(J<65536){if((ne-=3)<0)break;ce.push(J>>12|224,J>>6&63|128,J&63|128)}else if(J<1114112){if((ne-=4)<0)break;ce.push(J>>18|240,J>>12&63|128,J>>6&63|128,J&63|128)}else throw new Error("Invalid code point")}return ce}function W(ie){for(var ne=[],J=0;J>8,le=J%256,ce.push(le),ce.push($);return ce}function V(ie){return S.toByteArray(Re(ie))}function Q(ie,ne,J,$){for(var le=0;le<$&&!(le+J>=ne.length||le>=ie.length);++le)ne[le+J]=ie[le];return le}function q(ie){return ie!==ie}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},H("buffer").Buffer)},{"base64-js":69,buffer:73,ieee754:195,isarray:198}],74:[function(H,Z,I){Z.exports={"100":"Continue","101":"Switching Protocols","102":"Processing","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I'm a teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Unordered Collection","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}},{}],75:[function(H,Z,I){Z.exports={O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,O_NOCTTY:131072,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:1048576,O_NOFOLLOW:256,O_SYNC:128,O_SYMLINK:2097152,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,SIGHUP:1,SIGINT:2,SIGQUIT:3,SIGILL:4,SIGTRAP:5,SIGABRT:6,SIGIOT:6,SIGBUS:10,SIGFPE:8,SIGKILL:9,SIGUSR1:30,SIGSEGV:11,SIGUSR2:31,SIGPIPE:13,SIGALRM:14,SIGTERM:15,SIGCHLD:20,SIGCONT:19,SIGSTOP:17,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGXCPU:24,SIGXFSZ:25,SIGVTALRM:26,SIGPROF:27,SIGWINCH:28,SIGIO:23,SIGSYS:12,SSL_OP_ALL:2147486719,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:262144,SSL_OP_CIPHER_SERVER_PREFERENCE:4194304,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:2147483648,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:32,SSL_OP_MICROSOFT_SESS_ID_BUG:1,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:536870912,SSL_OP_NETSCAPE_CHALLENGE_BUG:2,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:1073741824,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:8,SSL_OP_NO_COMPRESSION:131072,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:16777216,SSL_OP_NO_SSLv3:33554432,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:67108864,SSL_OP_NO_TLSv1_1:268435456,SSL_OP_NO_TLSv1_2:134217728,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:1048576,SSL_OP_SINGLE_ECDH_USE:524288,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:128,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:512,SSL_OP_TLS_D5_BUG:256,SSL_OP_TLS_ROLLBACK_BUG:8388608,ENGINE_METHOD_DSA:2,ENGINE_METHOD_DH:4,ENGINE_METHOD_RAND:8,ENGINE_METHOD_ECDH:16,ENGINE_METHOD_ECDSA:32,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_STORE:256,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_NONE:0,DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_UDP_REUSEADDR:4}},{}],76:[function(H,Z,I){/*! * copy-to - index.js * Copyright(c) 2014 dead_horse * MIT Licensed */"use strict";var N=Array.prototype.slice;Z.exports=g;function g(k,v){if(!(this instanceof g))return new g(k,v);this.src=k,this._withAccess=v}g.prototype.withAccess=function(k){return this._withAccess=k!==!1,this},g.prototype.pick=function(k){return Array.isArray(k)||(k=N.call(arguments)),k.length&&(this.keys=k),this},g.prototype.to=function(k){if(k=k||{},!this.src)return k;var v=this.keys||Object.keys(this.src);if(!this._withAccess){for(var m=0;mh;)if(r=_[h++],r!=r)return!0}else for(;e>h;h++)if((k||h in _)&&_[h]===m)return k||h||0;return!k&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(H,Z,I){var N=H("./_cof"),g=H("./_wks")("toStringTag"),S=N(function(){return arguments}())=="Arguments",k=function(v,m){try{return v[m]}catch(C){}};Z.exports=function(v){var m,C,_;return v===void 0?"Undefined":v===null?"Null":typeof(C=k(m=Object(v),g))=="string"?C:S?N(m):(_=N(m))=="Object"&&typeof m.callee=="function"?"Arguments":_}},{"./_cof":98,"./_wks":166}],98:[function(H,Z,I){var N={}.toString;Z.exports=function(g){return N.call(g).slice(8,-1)}},{}],99:[function(H,Z,I){var N=Z.exports={version:"2.6.11"};typeof __e=="number"&&(__e=N)},{}],100:[function(H,Z,I){"use strict";var N=H("./_object-dp"),g=H("./_property-desc");Z.exports=function(S,k,v){k in S?N.f(S,k,g(0,v)):S[k]=v}},{"./_object-dp":132,"./_property-desc":146}],101:[function(H,Z,I){var N=H("./_a-function");Z.exports=function(g,S,k){if(N(g),S===void 0)return g;switch(k){case 1:return function(v){return g.call(S,v)};case 2:return function(v,m){return g.call(S,v,m)};case 3:return function(v,m,C){return g.call(S,v,m,C)}}return function(){return g.apply(S,arguments)}}},{"./_a-function":92}],102:[function(H,Z,I){Z.exports=function(N){if(N==null)throw TypeError("Can't call method on "+N);return N}},{}],103:[function(H,Z,I){Z.exports=!H("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":108}],104:[function(H,Z,I){var N=H("./_is-object"),g=H("./_global").document,S=N(g)&&N(g.createElement);Z.exports=function(k){return S?g.createElement(k):{}}},{"./_global":110,"./_is-object":119}],105:[function(H,Z,I){Z.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(H,Z,I){var N=H("./_object-keys"),g=H("./_object-gops"),S=H("./_object-pie");Z.exports=function(k){var v=N(k),m=g.f;if(m)for(var C=m(k),_=S.f,e=0,h;C.length>e;)_.call(k,h=C[e++])&&v.push(h);return v}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(H,Z,I){var N=H("./_global"),g=H("./_core"),S=H("./_ctx"),k=H("./_hide"),v=H("./_has"),m="prototype",C=function(_,e,h){var r=_&C.F,c=_&C.G,i=_&C.S,n=_&C.P,l=_&C.B,f=_&C.W,d=c?g:g[e]||(g[e]={}),u=d[m],o=c?N:i?N[e]:(N[e]||{})[m],s,E,b;c&&(h=e);for(s in h){if(E=!r&&o&&o[s]!==void 0,E&&v(d,s))continue;b=E?o[s]:h[s],d[s]=c&&typeof o[s]!="function"?h[s]:l&&E?S(b,N):f&&o[s]==b?function(p){var D=function(R,y,x){if(this instanceof p){switch(arguments.length){case 0:return new p;case 1:return new p(R);case 2:return new p(R,y)}return new p(R,y,x)}return p.apply(this,arguments)};return D[m]=p[m],D}(b):n&&typeof b=="function"?S(Function.call,b):b,n&&((d.virtual||(d.virtual={}))[s]=b,_&C.R&&u&&!u[s]&&k(u,s,b))}};C.F=1,C.G=2,C.S=4,C.P=8,C.B=16,C.W=32,C.U=64,C.R=128,Z.exports=C},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(H,Z,I){Z.exports=function(N){try{return!!N()}catch(g){return!0}}},{}],109:[function(H,Z,I){var N=H("./_ctx"),g=H("./_iter-call"),S=H("./_is-array-iter"),k=H("./_an-object"),v=H("./_to-length"),m=H("./core.get-iterator-method"),C={},_={},I=Z.exports=function(e,h,r,c,i){var n=i?function(){return e}:m(e),l=N(r,c,h?2:1),f=0,d,u,o,s;if(typeof n!="function")throw TypeError(e+" is not iterable!");if(S(n)){for(d=v(e.length);d>f;f++)if(s=h?l(k(u=e[f])[0],u[1]):l(e[f]),s===C||s===_)return s}else for(o=n.call(e);!(u=o.next()).done;)if(s=g(o,l,u.value,h),s===C||s===_)return s};I.BREAK=C,I.RETURN=_},{"./_an-object":95,"./_ctx":101,"./_is-array-iter":117,"./_iter-call":120,"./_to-length":159,"./core.get-iterator-method":167}],110:[function(H,Z,I){var N=Z.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=N)},{}],111:[function(H,Z,I){var N={}.hasOwnProperty;Z.exports=function(g,S){return N.call(g,S)}},{}],112:[function(H,Z,I){var N=H("./_object-dp"),g=H("./_property-desc");Z.exports=H("./_descriptors")?function(S,k,v){return N.f(S,k,g(1,v))}:function(S,k,v){return S[k]=v,S}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(H,Z,I){var N=H("./_global").document;Z.exports=N&&N.documentElement},{"./_global":110}],114:[function(H,Z,I){Z.exports=!H("./_descriptors")&&!H("./_fails")(function(){return Object.defineProperty(H("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":103,"./_dom-create":104,"./_fails":108}],115:[function(H,Z,I){Z.exports=function(N,g,S){var k=S===void 0;switch(g.length){case 0:return k?N():N.call(S);case 1:return k?N(g[0]):N.call(S,g[0]);case 2:return k?N(g[0],g[1]):N.call(S,g[0],g[1]);case 3:return k?N(g[0],g[1],g[2]):N.call(S,g[0],g[1],g[2]);case 4:return k?N(g[0],g[1],g[2],g[3]):N.call(S,g[0],g[1],g[2],g[3])}return N.apply(S,g)}},{}],116:[function(H,Z,I){var N=H("./_cof");Z.exports=Object("z").propertyIsEnumerable(0)?Object:function(g){return N(g)=="String"?g.split(""):Object(g)}},{"./_cof":98}],117:[function(H,Z,I){var N=H("./_iterators"),g=H("./_wks")("iterator"),S=Array.prototype;Z.exports=function(k){return k!==void 0&&(N.Array===k||S[g]===k)}},{"./_iterators":125,"./_wks":166}],118:[function(H,Z,I){var N=H("./_cof");Z.exports=Array.isArray||function(S){return N(S)=="Array"}},{"./_cof":98}],119:[function(H,Z,I){Z.exports=function(N){return typeof N=="object"?N!==null:typeof N=="function"}},{}],120:[function(H,Z,I){var N=H("./_an-object");Z.exports=function(g,S,k,v){try{return v?S(N(k)[0],k[1]):S(k)}catch(C){var m=g.return;throw m!==void 0&&N(m.call(g)),C}}},{"./_an-object":95}],121:[function(H,Z,I){"use strict";var N=H("./_object-create"),g=H("./_property-desc"),S=H("./_set-to-string-tag"),k={};H("./_hide")(k,H("./_wks")("iterator"),function(){return this}),Z.exports=function(v,m,C){v.prototype=N(k,{next:g(1,C)}),S(v,m+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(H,Z,I){"use strict";var N=H("./_library"),g=H("./_export"),S=H("./_redefine"),k=H("./_hide"),v=H("./_iterators"),m=H("./_iter-create"),C=H("./_set-to-string-tag"),_=H("./_object-gpo"),e=H("./_wks")("iterator"),h=!([].keys&&"next"in[].keys()),r="@@iterator",c="keys",i="values",n=function(){return this};Z.exports=function(l,f,d,u,o,s,E){m(d,f,u);var b=function(z){if(!h&&z in y)return y[z];switch(z){case c:return function(){return new d(this,z)};case i:return function(){return new d(this,z)}}return function(){return new d(this,z)}},p=f+" Iterator",D=o==i,R=!1,y=l.prototype,x=y[e]||y[r]||o&&y[o],w=x||b(o),T=o?D?b("entries"):w:void 0,F=f=="Array"&&y.entries||x,P,A,X;if(F&&(X=_(F.call(new l)),X!==Object.prototype&&X.next&&(C(X,p,!0),!N&&typeof X[e]!="function"&&k(X,e,n))),D&&x&&x.name!==i&&(R=!0,w=function(){return x.call(this)}),(!N||E)&&(h||R||!y[e])&&k(y,e,w),v[f]=w,v[p]=n,o)if(P={values:D?w:b(i),keys:s?w:b(c),entries:T},E)for(A in P)A in y||S(y,A,P[A]);else g(g.P+g.F*(h||R),f,P);return P}},{"./_export":107,"./_hide":112,"./_iter-create":121,"./_iterators":125,"./_library":126,"./_object-gpo":138,"./_redefine":148,"./_set-to-string-tag":150,"./_wks":166}],123:[function(H,Z,I){var N=H("./_wks")("iterator"),g=!1;try{var S=[7][N]();S.return=function(){g=!0},Array.from(S,function(){throw 2})}catch(k){}Z.exports=function(k,v){if(!v&&!g)return!1;var m=!1;try{var C=[7],_=C[N]();_.next=function(){return{done:m=!0}},C[N]=function(){return _},k(C)}catch(e){}return m}},{"./_wks":166}],124:[function(H,Z,I){Z.exports=function(N,g){return{value:g,done:!!N}}},{}],125:[function(H,Z,I){Z.exports={}},{}],126:[function(H,Z,I){Z.exports=!0},{}],127:[function(H,Z,I){var N=H("./_uid")("meta"),g=H("./_is-object"),S=H("./_has"),k=H("./_object-dp").f,v=0,m=Object.isExtensible||function(){return!0},C=!H("./_fails")(function(){return m(Object.preventExtensions({}))}),_=function(i){k(i,N,{value:{i:"O"+ ++v,w:{}}})},e=function(i,n){if(!g(i))return typeof i=="symbol"?i:(typeof i=="string"?"S":"P")+i;if(!S(i,N)){if(!m(i))return"F";if(!n)return"E";_(i)}return i[N].i},h=function(i,n){if(!S(i,N)){if(!m(i))return!0;if(!n)return!1;_(i)}return i[N].w},r=function(i){return C&&c.NEED&&m(i)&&!S(i,N)&&_(i),i},c=Z.exports={KEY:N,NEED:!1,fastKey:e,getWeak:h,onFreeze:r}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(H,Z,I){var N=H("./_global"),g=H("./_task").set,S=N.MutationObserver||N.WebKitMutationObserver,k=N.process,v=N.Promise,m=H("./_cof")(k)=="process";Z.exports=function(){var C,_,e,h=function(){var n,l;for(m&&(n=k.domain)&&n.exit();C;){l=C.fn,C=C.next;try{l()}catch(f){throw C?e():_=void 0,f}}_=void 0,n&&n.enter()};if(m)e=function(){k.nextTick(h)};else if(S&&!(N.navigator&&N.navigator.standalone)){var r=!0,c=document.createTextNode("");new S(h).observe(c,{characterData:!0}),e=function(){c.data=r=!r}}else if(v&&v.resolve){var i=v.resolve(void 0);e=function(){i.then(h)}}else e=function(){g.call(N,h)};return function(n){var l={fn:n,next:void 0};_&&(_.next=l),C||(C=l,e()),_=l}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(H,Z,I){"use strict";var N=H("./_a-function");function g(S){var k,v;this.promise=new S(function(m,C){if(k!==void 0||v!==void 0)throw TypeError("Bad Promise constructor");k=m,v=C}),this.resolve=N(k),this.reject=N(v)}Z.exports.f=function(S){return new g(S)}},{"./_a-function":92}],130:[function(H,Z,I){"use strict";var N=H("./_descriptors"),g=H("./_object-keys"),S=H("./_object-gops"),k=H("./_object-pie"),v=H("./_to-object"),m=H("./_iobject"),C=Object.assign;Z.exports=!C||H("./_fails")(function(){var _={},e={},h=Symbol(),r="abcdefghijklmnopqrst";return _[h]=7,r.split("").forEach(function(c){e[c]=c}),C({},_)[h]!=7||Object.keys(C({},e)).join("")!=r})?function(e,h){for(var r=v(e),c=arguments.length,i=1,n=S.f,l=k.f;c>i;)for(var f=m(arguments[i++]),d=n?g(f).concat(n(f)):g(f),u=d.length,o=0,s;u>o;)s=d[o++],(!N||l.call(f,s))&&(r[s]=f[s]);return r}:C},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(H,Z,I){var N=H("./_an-object"),g=H("./_object-dps"),S=H("./_enum-bug-keys"),k=H("./_shared-key")("IE_PROTO"),v=function(){},m="prototype",C=function(){var _=H("./_dom-create")("iframe"),e=S.length,h="<",r=">",c;for(_.style.display="none",H("./_html").appendChild(_),_.src="javascript:",c=_.contentWindow.document,c.open(),c.write(h+"script"+r+"document.F=Object"+h+"/script"+r),c.close(),C=c.F;e--;)delete C[m][S[e]];return C()};Z.exports=Object.create||function(e,h){var r;return e!==null?(v[m]=N(e),r=new v,v[m]=null,r[k]=e):r=C(),h===void 0?r:g(r,h)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(H,Z,I){var N=H("./_an-object"),g=H("./_ie8-dom-define"),S=H("./_to-primitive"),k=Object.defineProperty;I.f=H("./_descriptors")?Object.defineProperty:function(m,C,_){if(N(m),C=S(C,!0),N(_),g)try{return k(m,C,_)}catch(e){}if("get"in _||"set"in _)throw TypeError("Accessors not supported!");return"value"in _&&(m[C]=_.value),m}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(H,Z,I){var N=H("./_object-dp"),g=H("./_an-object"),S=H("./_object-keys");Z.exports=H("./_descriptors")?Object.defineProperties:function(v,m){g(v);for(var C=S(m),_=C.length,e=0,h;_>e;)N.f(v,h=C[e++],m[h]);return v}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(H,Z,I){var N=H("./_object-pie"),g=H("./_property-desc"),S=H("./_to-iobject"),k=H("./_to-primitive"),v=H("./_has"),m=H("./_ie8-dom-define"),C=Object.getOwnPropertyDescriptor;I.f=H("./_descriptors")?C:function(e,h){if(e=S(e),h=k(h,!0),m)try{return C(e,h)}catch(r){}if(v(e,h))return g(!N.f.call(e,h),e[h])}},{"./_descriptors":103,"./_has":111,"./_ie8-dom-define":114,"./_object-pie":141,"./_property-desc":146,"./_to-iobject":158,"./_to-primitive":161}],135:[function(H,Z,I){var N=H("./_to-iobject"),g=H("./_object-gopn").f,S={}.toString,k=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],v=function(m){try{return g(m)}catch(C){return k.slice()}};Z.exports.f=function(C){return k&&S.call(C)=="[object Window]"?v(C):g(N(C))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(H,Z,I){var N=H("./_object-keys-internal"),g=H("./_enum-bug-keys").concat("length","prototype");I.f=Object.getOwnPropertyNames||function(k){return N(k,g)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(H,Z,I){I.f=Object.getOwnPropertySymbols},{}],138:[function(H,Z,I){var N=H("./_has"),g=H("./_to-object"),S=H("./_shared-key")("IE_PROTO"),k=Object.prototype;Z.exports=Object.getPrototypeOf||function(v){return v=g(v),N(v,S)?v[S]:typeof v.constructor=="function"&&v instanceof v.constructor?v.constructor.prototype:v instanceof Object?k:null}},{"./_has":111,"./_shared-key":151,"./_to-object":160}],139:[function(H,Z,I){var N=H("./_has"),g=H("./_to-iobject"),S=H("./_array-includes")(!1),k=H("./_shared-key")("IE_PROTO");Z.exports=function(v,m){var C=g(v),_=0,e=[],h;for(h in C)h!=k&&(N(C,h)&&e.push(h));for(;m.length>_;)N(C,h=m[_++])&&(~S(e,h)||e.push(h));return e}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(H,Z,I){var N=H("./_object-keys-internal"),g=H("./_enum-bug-keys");Z.exports=Object.keys||function(k){return N(k,g)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(H,Z,I){I.f={}.propertyIsEnumerable},{}],142:[function(H,Z,I){var N=H("./_export"),g=H("./_core"),S=H("./_fails");Z.exports=function(k,v){var m=(g.Object||{})[k]||Object[k],C={};C[k]=v(m),N(N.S+N.F*S(function(){m(1)}),"Object",C)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(H,Z,I){var N=H("./_descriptors"),g=H("./_object-keys"),S=H("./_to-iobject"),k=H("./_object-pie").f;Z.exports=function(v){return function(m){for(var C=S(m),_=g(C),e=_.length,h=0,r=[],c;e>h;)c=_[h++],(!N||k.call(C,c))&&r.push(v?[c,C[c]]:C[c]);return r}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(H,Z,I){Z.exports=function(N){try{return{e:!1,v:N()}}catch(g){return{e:!0,v:g}}}},{}],145:[function(H,Z,I){var N=H("./_an-object"),g=H("./_is-object"),S=H("./_new-promise-capability");Z.exports=function(k,v){if(N(k),g(v)&&v.constructor===k)return v;var m=S.f(k),C=m.resolve;return C(v),m.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(H,Z,I){Z.exports=function(N,g){return{enumerable:!(N&1),configurable:!(N&2),writable:!(N&4),value:g}}},{}],147:[function(H,Z,I){var N=H("./_hide");Z.exports=function(g,S,k){for(var v in S)k&&g[v]?g[v]=S[v]:N(g,v,S[v]);return g}},{"./_hide":112}],148:[function(H,Z,I){Z.exports=H("./_hide")},{"./_hide":112}],149:[function(H,Z,I){"use strict";var N=H("./_global"),g=H("./_core"),S=H("./_object-dp"),k=H("./_descriptors"),v=H("./_wks")("species");Z.exports=function(m){var C=typeof g[m]=="function"?g[m]:N[m];k&&C&&!C[v]&&S.f(C,v,{configurable:!0,get:function(){return this}})}},{"./_core":99,"./_descriptors":103,"./_global":110,"./_object-dp":132,"./_wks":166}],150:[function(H,Z,I){var N=H("./_object-dp").f,g=H("./_has"),S=H("./_wks")("toStringTag");Z.exports=function(k,v,m){k&&!g(k=m?k:k.prototype,S)&&N(k,S,{configurable:!0,value:v})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(H,Z,I){var N=H("./_shared")("keys"),g=H("./_uid");Z.exports=function(S){return N[S]||(N[S]=g(S))}},{"./_shared":152,"./_uid":162}],152:[function(H,Z,I){var N=H("./_core"),g=H("./_global"),S="__core-js_shared__",k=g[S]||(g[S]={});(Z.exports=function(v,m){return k[v]||(k[v]=m!==void 0?m:{})})("versions",[]).push({version:N.version,mode:H("./_library")?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},{"./_core":99,"./_global":110,"./_library":126}],153:[function(H,Z,I){var N=H("./_an-object"),g=H("./_a-function"),S=H("./_wks")("species");Z.exports=function(k,v){var m=N(k).constructor,C;return m===void 0||(C=N(m)[S])==null?v:g(C)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(H,Z,I){var N=H("./_to-integer"),g=H("./_defined");Z.exports=function(S){return function(k,v){var m=String(g(k)),C=N(v),_=m.length,e,h;return C<0||C>=_?S?"":void 0:(e=m.charCodeAt(C),e<55296||e>56319||C+1===_||(h=m.charCodeAt(C+1))<56320||h>57343?S?m.charAt(C):e:S?m.slice(C,C+2):(e-55296<<10)+(h-56320)+65536)}}},{"./_defined":102,"./_to-integer":157}],155:[function(H,Z,I){var N=H("./_ctx"),g=H("./_invoke"),S=H("./_html"),k=H("./_dom-create"),v=H("./_global"),m=v.process,C=v.setImmediate,_=v.clearImmediate,e=v.MessageChannel,h=v.Dispatch,r=0,c={},i="onreadystatechange",n,l,f,d=function(){var o=+this;if(c.hasOwnProperty(o)){var s=c[o];delete c[o],s()}},u=function(o){d.call(o.data)};(!C||!_)&&(C=function(s){for(var E=[],b=1;arguments.length>b;)E.push(arguments[b++]);return c[++r]=function(){g(typeof s=="function"?s:Function(s),E)},n(r),r},_=function(s){delete c[s]},H("./_cof")(m)=="process"?n=function(o){m.nextTick(N(d,o,1))}:h&&h.now?n=function(o){h.now(N(d,o,1))}:e?(l=new e,f=l.port2,l.port1.onmessage=u,n=N(f.postMessage,f,1)):v.addEventListener&&typeof postMessage=="function"&&!v.importScripts?(n=function(o){v.postMessage(o+"","*")},v.addEventListener("message",u,!1)):i in k("script")?n=function(o){S.appendChild(k("script"))[i]=function(){S.removeChild(this),d.call(o)}}:n=function(o){setTimeout(N(d,o,1),0)}),Z.exports={set:C,clear:_}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(H,Z,I){var N=H("./_to-integer"),g=Math.max,S=Math.min;Z.exports=function(k,v){return k=N(k),k<0?g(k+v,0):S(k,v)}},{"./_to-integer":157}],157:[function(H,Z,I){var N=Math.ceil,g=Math.floor;Z.exports=function(S){return isNaN(S=+S)?0:(S>0?g:N)(S)}},{}],158:[function(H,Z,I){var N=H("./_iobject"),g=H("./_defined");Z.exports=function(S){return N(g(S))}},{"./_defined":102,"./_iobject":116}],159:[function(H,Z,I){var N=H("./_to-integer"),g=Math.min;Z.exports=function(S){return S>0?g(N(S),9007199254740991):0}},{"./_to-integer":157}],160:[function(H,Z,I){var N=H("./_defined");Z.exports=function(g){return Object(N(g))}},{"./_defined":102}],161:[function(H,Z,I){var N=H("./_is-object");Z.exports=function(g,S){if(!N(g))return g;var k,v;if(S&&typeof(k=g.toString)=="function"&&!N(v=k.call(g)))return v;if(typeof(k=g.valueOf)=="function"&&!N(v=k.call(g)))return v;if(!S&&typeof(k=g.toString)=="function"&&!N(v=k.call(g)))return v;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(H,Z,I){var N=0,g=Math.random();Z.exports=function(S){return"Symbol(".concat(S===void 0?"":S,")_",(++N+g).toString(36))}},{}],163:[function(H,Z,I){var N=H("./_global"),g=N.navigator;Z.exports=g&&g.userAgent||""},{"./_global":110}],164:[function(H,Z,I){var N=H("./_global"),g=H("./_core"),S=H("./_library"),k=H("./_wks-ext"),v=H("./_object-dp").f;Z.exports=function(m){var C=g.Symbol||(g.Symbol=S?{}:N.Symbol||{});m.charAt(0)!="_"&&!(m in C)&&v(C,m,{value:k.f(m)})}},{"./_core":99,"./_global":110,"./_library":126,"./_object-dp":132,"./_wks-ext":165}],165:[function(H,Z,I){I.f=H("./_wks")},{"./_wks":166}],166:[function(H,Z,I){var N=H("./_shared")("wks"),g=H("./_uid"),S=H("./_global").Symbol,k=typeof S=="function",v=Z.exports=function(m){return N[m]||(N[m]=k&&S[m]||(k?S:g)("Symbol."+m))};v.store=N},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(H,Z,I){var N=H("./_classof"),g=H("./_wks")("iterator"),S=H("./_iterators");Z.exports=H("./_core").getIteratorMethod=function(k){if(k!=null)return k[g]||k["@@iterator"]||S[N(k)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(H,Z,I){"use strict";var N=H("./_ctx"),g=H("./_export"),S=H("./_to-object"),k=H("./_iter-call"),v=H("./_is-array-iter"),m=H("./_to-length"),C=H("./_create-property"),_=H("./core.get-iterator-method");g(g.S+g.F*!H("./_iter-detect")(function(e){Array.from(e)}),"Array",{from:function(h){var r=S(h),c=typeof this=="function"?this:Array,i=arguments.length,n=i>1?arguments[1]:void 0,l=n!==void 0,f=0,d=_(r),u,o,s,E;if(l&&(n=N(n,i>2?arguments[2]:void 0,2)),d!=null&&!(c==Array&&v(d)))for(E=d.call(r),o=new c;!(s=E.next()).done;f++)C(o,f,l?k(E,n,[s.value,f],!0):s.value);else for(u=m(r.length),o=new c(u);u>f;f++)C(o,f,l?n(r[f],f):r[f]);return o.length=f,o}})},{"./_create-property":100,"./_ctx":101,"./_export":107,"./_is-array-iter":117,"./_iter-call":120,"./_iter-detect":123,"./_to-length":159,"./_to-object":160,"./core.get-iterator-method":167}],169:[function(H,Z,I){"use strict";var N=H("./_add-to-unscopables"),g=H("./_iter-step"),S=H("./_iterators"),k=H("./_to-iobject");Z.exports=H("./_iter-define")(Array,"Array",function(v,m){this._t=k(v),this._i=0,this._k=m},function(){var v=this._t,m=this._k,C=this._i++;return!v||C>=v.length?(this._t=void 0,g(1)):m=="keys"?g(0,C):m=="values"?g(0,v[C]):g(0,[C,v[C]])},"values"),S.Arguments=S.Array,N("keys"),N("values"),N("entries")},{"./_add-to-unscopables":93,"./_iter-define":122,"./_iter-step":124,"./_iterators":125,"./_to-iobject":158}],170:[function(H,Z,I){"use strict";var N=H("./_is-object"),g=H("./_object-gpo"),S=H("./_wks")("hasInstance"),k=Function.prototype;S in k||H("./_object-dp").f(k,S,{value:function(v){if(typeof this!="function"||!N(v))return!1;if(!N(this.prototype))return v instanceof this;for(;v=g(v);)if(this.prototype===v)return!0;return!1}})},{"./_is-object":119,"./_object-dp":132,"./_object-gpo":138,"./_wks":166}],171:[function(H,Z,I){var N=H("./_export");N(N.S+N.F,"Object",{assign:H("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(H,Z,I){var N=H("./_export");N(N.S,"Object",{create:H("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(H,Z,I){var N=H("./_export");N(N.S+N.F*!H("./_descriptors"),"Object",{defineProperty:H("./_object-dp").f})},{"./_descriptors":103,"./_export":107,"./_object-dp":132}],174:[function(H,Z,I){H("./_object-sap")("getOwnPropertyNames",function(){return H("./_object-gopn-ext").f})},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(H,Z,I){var N=H("./_to-object"),g=H("./_object-gpo");H("./_object-sap")("getPrototypeOf",function(){return function(k){return g(N(k))}})},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(H,Z,I){var N=H("./_to-object"),g=H("./_object-keys");H("./_object-sap")("keys",function(){return function(k){return g(N(k))}})},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(H,Z,I){arguments[4][71][0].apply(I,arguments)},{dup:71}],178:[function(H,Z,I){"use strict";var N=H("./_library"),g=H("./_global"),S=H("./_ctx"),k=H("./_classof"),v=H("./_export"),m=H("./_is-object"),C=H("./_a-function"),_=H("./_an-instance"),e=H("./_for-of"),h=H("./_species-constructor"),r=H("./_task").set,c=H("./_microtask")(),i=H("./_new-promise-capability"),n=H("./_perform"),l=H("./_user-agent"),f=H("./_promise-resolve"),d="Promise",u=g.TypeError,o=g.process,s=o&&o.versions,E=s&&s.v8||"",b=g[d],p=k(o)=="process",D=function(){},R,y,x,w,T=y=i.f,F=!!function(){try{var L=b.resolve(1),G=(L.constructor={})[H("./_wks")("species")]=function(ee){ee(D,D)};return(p||typeof PromiseRejectionEvent=="function")&&L.then(D)instanceof G&&E.indexOf("6.6")!==0&&l.indexOf("Chrome/66")===-1}catch(ee){}}(),P=function(L){var G;return m(L)&&typeof(G=L.then)=="function"?G:!1},A=function(L,G){if(L._n)return;L._n=!0;var ee=L._c;c(function(){for(var oe=L._v,ae=L._s==1,be=0,_e=function(fe){var Re=ae?fe.ok:fe.fail,Oe=fe.resolve,de=fe.reject,te=fe.domain,W,Y,V;try{Re?(ae||(L._h==2&&O(L),L._h=1),Re===!0?W=oe:(te&&te.enter(),W=Re(oe),te&&(te.exit(),V=!0)),W===fe.promise?de(u("Promise-chain cycle")):(Y=P(W))?Y.call(W,Oe,de):Oe(W)):de(oe)}catch(Q){te&&!V&&te.exit(),de(Q)}};ee.length>be;)_e(ee[be++]);L._c=[],L._n=!1,G&&!L._h&&X(L)})},X=function(L){r.call(g,function(){var G=L._v,ee=z(L),oe,ae,be;if(ee&&(oe=n(function(){p?o.emit("unhandledRejection",G,L):(ae=g.onunhandledrejection)?ae({promise:L,reason:G}):(be=g.console)&&be.error&&be.error("Unhandled promise rejection",G)}),L._h=p||z(L)?2:1),L._a=void 0,ee&&oe.e)throw oe.v})},z=function(L){return L._h!==1&&(L._a||L._c).length===0},O=function(L){r.call(g,function(){var G;p?o.emit("rejectionHandled",L):(G=g.onrejectionhandled)&&G({promise:L,reason:L._v})})},B=function(L){var G=this;if(G._d)return;G._d=!0,G=G._w||G,G._v=L,G._s=2,G._a||(G._a=G._c.slice()),A(G,!0)},U=function(L){var G=this,ee;if(G._d)return;G._d=!0,G=G._w||G;try{if(G===L)throw u("Promise can't be resolved itself");(ee=P(L))?c(function(){var oe={_w:G,_d:!1};try{ee.call(L,S(U,oe,1),S(B,oe,1))}catch(ae){B.call(oe,ae)}}):(G._v=L,G._s=1,A(G,!1))}catch(oe){B.call({_w:G,_d:!1},oe)}};F||(b=function(G){_(this,b,d,"_h"),C(G),R.call(this);try{G(S(U,this,1),S(B,this,1))}catch(ee){B.call(this,ee)}},R=function(G){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},R.prototype=H("./_redefine-all")(b.prototype,{then:function(G,ee){var oe=T(h(this,b));return oe.ok=typeof G=="function"?G:!0,oe.fail=typeof ee=="function"&&ee,oe.domain=p?o.domain:void 0,this._c.push(oe),this._a&&this._a.push(oe),this._s&&A(this,!1),oe.promise},catch:function(L){return this.then(void 0,L)}}),x=function(){var L=new R;this.promise=L,this.resolve=S(U,L,1),this.reject=S(B,L,1)},i.f=T=function(L){return L===b||L===w?new x(L):y(L)}),v(v.G+v.W+v.F*!F,{Promise:b}),H("./_set-to-string-tag")(b,d),H("./_set-species")(d),w=H("./_core")[d],v(v.S+v.F*!F,d,{reject:function(G){var ee=T(this),oe=ee.reject;return oe(G),ee.promise}}),v(v.S+v.F*(N||!F),d,{resolve:function(G){return f(N&&this===w?b:this,G)}}),v(v.S+v.F*!(F&&H("./_iter-detect")(function(L){b.all(L).catch(D)})),d,{all:function(G){var ee=this,oe=T(ee),ae=oe.resolve,be=oe.reject,_e=n(function(){var fe=[],Re=0,Oe=1;e(G,!1,function(de){var te=Re++,W=!1;fe.push(void 0),Oe++,ee.resolve(de).then(function(Y){if(W)return;W=!0,fe[te]=Y,--Oe||ae(fe)},be)}),--Oe||ae(fe)});return _e.e&&be(_e.v),oe.promise},race:function(G){var ee=this,oe=T(ee),ae=oe.reject,be=n(function(){e(G,!1,function(_e){ee.resolve(_e).then(oe.resolve,ae)})});return be.e&&ae(be.v),oe.promise}})},{"./_a-function":92,"./_an-instance":94,"./_classof":97,"./_core":99,"./_ctx":101,"./_export":107,"./_for-of":109,"./_global":110,"./_is-object":119,"./_iter-detect":123,"./_library":126,"./_microtask":128,"./_new-promise-capability":129,"./_perform":144,"./_promise-resolve":145,"./_redefine-all":147,"./_set-species":149,"./_set-to-string-tag":150,"./_species-constructor":153,"./_task":155,"./_user-agent":163,"./_wks":166}],179:[function(H,Z,I){var N=H("./_export"),g=H("./_to-absolute-index"),S=String.fromCharCode,k=String.fromCodePoint;N(N.S+N.F*(!!k&&k.length!=1),"String",{fromCodePoint:function(m){for(var C=[],_=arguments.length,e=0,h;_>e;){if(h=+arguments[e++],g(h,1114111)!==h)throw RangeError(h+" is not a valid code point");C.push(h<65536?S(h):S(((h-=65536)>>10)+55296,h%1024+56320))}return C.join("")}})},{"./_export":107,"./_to-absolute-index":156}],180:[function(H,Z,I){"use strict";var N=H("./_string-at")(!0);H("./_iter-define")(String,"String",function(g){this._t=String(g),this._i=0},function(){var g=this._t,S=this._i,k;return S>=g.length?{value:void 0,done:!0}:(k=N(g,S),this._i+=k.length,{value:k,done:!1})})},{"./_iter-define":122,"./_string-at":154}],181:[function(H,Z,I){"use strict";var N=H("./_global"),g=H("./_has"),S=H("./_descriptors"),k=H("./_export"),v=H("./_redefine"),m=H("./_meta").KEY,C=H("./_fails"),_=H("./_shared"),e=H("./_set-to-string-tag"),h=H("./_uid"),r=H("./_wks"),c=H("./_wks-ext"),i=H("./_wks-define"),n=H("./_enum-keys"),l=H("./_is-array"),f=H("./_an-object"),d=H("./_is-object"),u=H("./_to-object"),o=H("./_to-iobject"),s=H("./_to-primitive"),E=H("./_property-desc"),b=H("./_object-create"),p=H("./_object-gopn-ext"),D=H("./_object-gopd"),R=H("./_object-gops"),y=H("./_object-dp"),x=H("./_object-keys"),w=D.f,T=y.f,F=p.f,P=N.Symbol,A=N.JSON,X=A&&A.stringify,z="prototype",O=r("_hidden"),B=r("toPrimitive"),U={}.propertyIsEnumerable,L=_("symbol-registry"),G=_("symbols"),ee=_("op-symbols"),oe=Object[z],ae=typeof P=="function"&&!!R.f,be=N.QObject,_e=!be||!be[z]||!be[z].findChild,fe=S&&C(function(){return b(T({},"a",{get:function(){return T(this,"a",{value:7}).a}})).a!=7})?function(ce,we,Fe){var Xe=w(oe,we);Xe&&delete oe[we],T(ce,we,Fe),Xe&&ce!==oe&&T(oe,we,Xe)}:T,Re=function(ce){var we=G[ce]=b(P[z]);return we._k=ce,we},Oe=ae&&typeof P.iterator=="symbol"?function(ce){return typeof ce=="symbol"}:function(ce){return ce instanceof P},de=function(we,Fe,Xe){return we===oe&&de(ee,Fe,Xe),f(we),Fe=s(Fe,!0),f(Xe),g(G,Fe)?(Xe.enumerable?(g(we,O)&&we[O][Fe]&&(we[O][Fe]=!1),Xe=b(Xe,{enumerable:E(0,!1)})):(g(we,O)||T(we,O,E(1,{})),we[O][Fe]=!0),fe(we,Fe,Xe)):T(we,Fe,Xe)},te=function(we,Fe){f(we);for(var Xe=n(Fe=o(Fe)),$e=0,Ye=Xe.length,Ze;Ye>$e;)de(we,Ze=Xe[$e++],Fe[Ze]);return we},W=function(we,Fe){return Fe===void 0?b(we):te(b(we),Fe)},Y=function(we){var Fe=U.call(this,we=s(we,!0));return this===oe&&g(G,we)&&!g(ee,we)?!1:Fe||!g(this,we)||!g(G,we)||g(this,O)&&this[O][we]?Fe:!0},V=function(we,Fe){if(we=o(we),Fe=s(Fe,!0),we===oe&&g(G,Fe)&&!g(ee,Fe))return;var Xe=w(we,Fe);return Xe&&g(G,Fe)&&!(g(we,O)&&we[O][Fe])&&(Xe.enumerable=!0),Xe},Q=function(we){for(var Fe=F(o(we)),Xe=[],$e=0,Ye;Fe.length>$e;)!g(G,Ye=Fe[$e++])&&Ye!=O&&Ye!=m&&Xe.push(Ye);return Xe},q=function(we){for(var Fe=we===oe,Xe=F(Fe?ee:o(we)),$e=[],Ye=0,Ze;Xe.length>Ye;)g(G,Ze=Xe[Ye++])&&(Fe?g(oe,Ze):!0)&&$e.push(G[Ze]);return $e};ae||(P=function(){if(this instanceof P)throw TypeError("Symbol is not a constructor!");var we=h(arguments.length>0?arguments[0]:void 0),Fe=function(Xe){this===oe&&Fe.call(ee,Xe),g(this,O)&&g(this[O],we)&&(this[O][we]=!1),fe(this,we,E(1,Xe))};return S&&_e&&fe(oe,we,{configurable:!0,set:Fe}),Re(we)},v(P[z],"toString",function(){return this._k}),D.f=V,y.f=de,H("./_object-gopn").f=p.f=Q,H("./_object-pie").f=Y,R.f=q,S&&!H("./_library")&&v(oe,"propertyIsEnumerable",Y,!0),c.f=function(ce){return Re(r(ce))}),k(k.G+k.W+k.F*!ae,{Symbol:P});for(var ie="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;ie.length>ne;)r(ie[ne++]);for(var J=x(r.store),$=0;J.length>$;)i(J[$++]);k(k.S+k.F*!ae,"Symbol",{for:function(ce){return g(L,ce+="")?L[ce]:L[ce]=P(ce)},keyFor:function(we){if(!Oe(we))throw TypeError(we+" is not a symbol!");for(var Fe in L)if(L[Fe]===we)return Fe},useSetter:function(){_e=!0},useSimple:function(){_e=!1}}),k(k.S+k.F*!ae,"Object",{create:W,defineProperty:de,defineProperties:te,getOwnPropertyDescriptor:V,getOwnPropertyNames:Q,getOwnPropertySymbols:q});var le=C(function(){R.f(1)});k(k.S+k.F*le,"Object",{getOwnPropertySymbols:function(we){return R.f(u(we))}}),A&&k(k.S+k.F*(!ae||C(function(){var ce=P();return X([ce])!="[null]"||X({a:ce})!="{}"||X(Object(ce))!="{}"})),"JSON",{stringify:function(we){for(var Fe=[we],Xe=1,$e,Ye;arguments.length>Xe;)Fe.push(arguments[Xe++]);return Ye=$e=Fe[1],!d($e)&&we===void 0||Oe(we)?void 0:(l($e)||($e=function(Ze,qe){if(typeof Ye=="function"&&(qe=Ye.call(this,Ze,qe)),!Oe(qe))return qe}),Fe[1]=$e,X.apply(A,Fe))}}),P[z][B]||H("./_hide")(P[z],B,P[z].valueOf),e(P,"Symbol"),e(Math,"Math",!0),e(N.JSON,"JSON",!0)},{"./_an-object":95,"./_descriptors":103,"./_enum-keys":106,"./_export":107,"./_fails":108,"./_global":110,"./_has":111,"./_hide":112,"./_is-array":118,"./_is-object":119,"./_library":126,"./_meta":127,"./_object-create":131,"./_object-dp":132,"./_object-gopd":134,"./_object-gopn":136,"./_object-gopn-ext":135,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_property-desc":146,"./_redefine":148,"./_set-to-string-tag":150,"./_shared":152,"./_to-iobject":158,"./_to-object":160,"./_to-primitive":161,"./_uid":162,"./_wks":166,"./_wks-define":164,"./_wks-ext":165}],182:[function(H,Z,I){var N=H("./_export"),g=H("./_object-to-array")(!0);N(N.S,"Object",{entries:function(k){return g(k)}})},{"./_export":107,"./_object-to-array":143}],183:[function(H,Z,I){"use strict";var N=H("./_export"),g=H("./_core"),S=H("./_global"),k=H("./_species-constructor"),v=H("./_promise-resolve");N(N.P+N.R,"Promise",{finally:function(m){var C=k(this,g.Promise||S.Promise),_=typeof m=="function";return this.then(_?function(e){return v(C,m()).then(function(){return e})}:m,_?function(e){return v(C,m()).then(function(){throw e})}:m)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(H,Z,I){"use strict";var N=H("./_export"),g=H("./_new-promise-capability"),S=H("./_perform");N(N.S,"Promise",{try:function(k){var v=g.f(this),m=S(k);return(m.e?v.reject:v.resolve)(m.v),v.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(H,Z,I){H("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(H,Z,I){H("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(H,Z,I){H("./es6.array.iterator");for(var N=H("./_global"),g=H("./_hide"),S=H("./_iterators"),k=H("./_wks")("toStringTag"),v="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),m=0;m0?"-":"+")+m(Math.floor(Math.abs(x)/60)*100+Math.abs(x)%60,4),S:["th","st","nd","rd"][o%10>3?0:(o%100-o%10!=10)*o%10],W:w,N:T};return n.replace(h,function(P){return P in F?F[P]:P.slice(1,P.length-1)})}}();v.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},v.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]};function m(h,r){for(h=String(h),r=r||2;h.length]/;Z.exports=g;function g(S){var k=""+S,v=N.exec(k);if(!v)return k;var m,C="",_=0,e=0;for(_=v.index;_0&&this._events[m].length>_&&(this._events[m].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[m].length),typeof console.trace=="function"&&console.trace())),this},N.prototype.on=N.prototype.addListener,N.prototype.once=function(m,C){if(!g(C))throw TypeError("listener must be a function");var _=!1;function e(){this.removeListener(m,e),_||(_=!0,C.apply(this,arguments))}return e.listener=C,this.on(m,e),this},N.prototype.removeListener=function(m,C){var _,e,h,r;if(!g(C))throw TypeError("listener must be a function");if(!this._events||!this._events[m])return this;if(_=this._events[m],h=_.length,e=-1,_===C||g(_.listener)&&_.listener===C)delete this._events[m],this._events.removeListener&&this.emit("removeListener",m,C);else if(k(_)){for(r=h;r-- >0;)if(_[r]===C||_[r].listener&&_[r].listener===C){e=r;break}if(e<0)return this;_.length===1?(_.length=0,delete this._events[m]):_.splice(e,1),this._events.removeListener&&this.emit("removeListener",m,C)}return this},N.prototype.removeAllListeners=function(m){var C,_;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[m]&&delete this._events[m],this;if(arguments.length===0){for(C in this._events){if(C==="removeListener")continue;this.removeAllListeners(C)}return this.removeAllListeners("removeListener"),this._events={},this}if(_=this._events[m],g(_))this.removeListener(m,_);else if(_)for(;_.length;)this.removeListener(m,_[_.length-1]);return delete this._events[m],this},N.prototype.listeners=function(m){var C;return!this._events||!this._events[m]?C=[]:g(this._events[m])?C=[this._events[m]]:C=this._events[m].slice(),C},N.prototype.listenerCount=function(m){if(this._events){var C=this._events[m];if(g(C))return 1;if(C)return C.length}return 0},N.listenerCount=function(m,C){return m.listenerCount(C)};function g(m){return typeof m=="function"}function S(m){return typeof m=="number"}function k(m){return typeof m=="object"&&m!==null}function v(m){return m===void 0}},{}],193:[function(H,Z,I){var N=H("http"),g=Z.exports;for(var S in N)N.hasOwnProperty(S)&&(g[S]=N[S]);g.request=function(k,v){return k||(k={}),k.scheme="https",k.protocol="https:",N.request.call(this,k,v)}},{http:231}],194:[function(H,Z,I){/*! * humanize-ms - index.js * Copyright(c) 2014 dead_horse * MIT Licensed */"use strict";var N=H("util"),g=H("ms");Z.exports=function(S){if(typeof S=="number")return S;var k=g(S);if(k===void 0){var v=new Error(N.format("humanize-ms(%j) result undefined",S));console.warn(v.stack)}return k}},{ms:204,util:243}],195:[function(H,Z,I){I.read=function(N,g,S,k,v){var m,C,_=v*8-k-1,e=(1<<_)-1,h=e>>1,r=-7,c=S?v-1:0,i=S?-1:1,n=N[g+c];for(c+=i,m=n&(1<<-r)-1,n>>=-r,r+=_;r>0;m=m*256+N[g+c],c+=i,r-=8);for(C=m&(1<<-r)-1,m>>=-r,r+=k;r>0;C=C*256+N[g+c],c+=i,r-=8);if(m===0)m=1-h;else{if(m===e)return C?NaN:(n?-1:1)*Infinity;C=C+Math.pow(2,k),m=m-h}return(n?-1:1)*C*Math.pow(2,m-k)},I.write=function(N,g,S,k,v,m){var C,_,e,h=m*8-v-1,r=(1<>1,i=v===23?Math.pow(2,-24)-Math.pow(2,-77):0,n=k?0:m-1,l=k?1:-1,f=g<0||g===0&&1/g<0?1:0;for(g=Math.abs(g),isNaN(g)||g===Infinity?(_=isNaN(g)?1:0,C=r):(C=Math.floor(Math.log(g)/Math.LN2),g*(e=Math.pow(2,-C))<1&&(C--,e*=2),C+c>=1?g+=i/e:g+=i*Math.pow(2,1-c),g*e>=2&&(C++,e/=2),C+c>=r?(_=0,C=r):C+c>=1?(_=(g*e-1)*Math.pow(2,v),C=C+c):(_=g*Math.pow(2,c-1)*Math.pow(2,v),C=0));v>=8;N[S+n]=_&255,n+=l,_/=256,v-=8);for(C=C<0;N[S+n]=C&255,n+=l,C/=256,h-=8);N[S+n-l]|=f*128}},{}],196:[function(H,Z,I){typeof Object.create=="function"?Z.exports=function(g,S){S&&(g.super_=S,g.prototype=Object.create(S.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}))}:Z.exports=function(g,S){if(S){g.super_=S;var k=function(){};k.prototype=S.prototype,g.prototype=new k,g.prototype.constructor=g}}},{}],197:[function(H,Z,I){/*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh * @license MIT */Z.exports=function(S){return S!=null&&(N(S)||g(S)||!!S._isBuffer)};function N(S){return!!S.constructor&&typeof S.constructor.isBuffer=="function"&&S.constructor.isBuffer(S)}function g(S){return typeof S.readFloatLE=="function"&&typeof S.slice=="function"&&N(S.slice(0,0))}},{}],198:[function(H,Z,I){var N={}.toString;Z.exports=Array.isArray||function(g){return N.call(g)=="[object Array]"}},{}],199:[function(require,module,exports){(function(global){(function(H,Z){typeof exports=="object"&&typeof module!="undefined"?module.exports=Z(H):typeof define=="function"&&define.amd?define(Z):Z(H)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:this,function(global){"use strict";global=global||{};var _Base64=global.Base64,version="2.5.2",buffer;if(typeof module!="undefined"&&module.exports)try{buffer=eval("require('buffer').Buffer")}catch(H){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(H){for(var Z={},I=0,N=H.length;I>>6)+fromCharCode(128|Z&63):fromCharCode(224|Z>>>12&15)+fromCharCode(128|Z>>>6&63)+fromCharCode(128|Z&63)}else{var Z=65536+(H.charCodeAt(0)-55296)*1024+(H.charCodeAt(1)-56320);return fromCharCode(240|Z>>>18&7)+fromCharCode(128|Z>>>12&63)+fromCharCode(128|Z>>>6&63)+fromCharCode(128|Z&63)}},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(H){return H.replace(re_utob,cb_utob)},cb_encode=function(H){var Z=[0,2,1][H.length%3],I=H.charCodeAt(0)<<16|(H.length>1?H.charCodeAt(1):0)<<8|(H.length>2?H.charCodeAt(2):0),N=[b64chars.charAt(I>>>18),b64chars.charAt(I>>>12&63),Z>=2?"=":b64chars.charAt(I>>>6&63),Z>=1?"=":b64chars.charAt(I&63)];return N.join("")},btoa=global.btoa?function(H){return global.btoa(H)}:function(H){return H.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=function(H){var Z=Object.prototype.toString.call(H)==="[object Uint8Array]";return Z?H.toString("base64"):btoa(utob(String(H)))},encode=function(H,Z){return Z?_encode(String(H)).replace(/[+\/]/g,function(I){return I=="+"?"-":"_"}).replace(/=/g,""):_encode(H)},encodeURI=function(H){return encode(H,!0)},re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=function(H){switch(H.length){case 4:var Z=(7&H.charCodeAt(0))<<18|(63&H.charCodeAt(1))<<12|(63&H.charCodeAt(2))<<6|63&H.charCodeAt(3),I=Z-65536;return fromCharCode((I>>>10)+55296)+fromCharCode((I&1023)+56320);case 3:return fromCharCode((15&H.charCodeAt(0))<<12|(63&H.charCodeAt(1))<<6|63&H.charCodeAt(2));default:return fromCharCode((31&H.charCodeAt(0))<<6|63&H.charCodeAt(1))}},btou=function(H){return H.replace(re_btou,cb_btou)},cb_decode=function(H){var Z=H.length,I=Z%4,N=(Z>0?b64tab[H.charAt(0)]<<18:0)|(Z>1?b64tab[H.charAt(1)]<<12:0)|(Z>2?b64tab[H.charAt(2)]<<6:0)|(Z>3?b64tab[H.charAt(3)]:0),g=[fromCharCode(N>>>16),fromCharCode(N>>>8&255),fromCharCode(N&255)];return g.length-=[0,0,2,1][I],g.join("")},_atob=global.atob?function(H){return global.atob(H)}:function(H){return H.replace(/\S{1,4}/g,cb_decode)},atob=function(H){return _atob(String(H).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(H){return(H.constructor===buffer.constructor?H:buffer.from(H,"base64")).toString()}:function(H){return(H.constructor===buffer.constructor?H:new buffer(H,"base64")).toString()}:function(H){return btou(_atob(H))},decode=function(H){return _decode(String(H).replace(/[-_]/g,function(Z){return Z=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var H=global.Base64;return global.Base64=_Base64,H};if(global.Base64={VERSION:version,atob,btoa,fromBase64:decode,toBase64:encode,utob,encode,encodeURI,btou,decode,noConflict,__buffer__:buffer},typeof Object.defineProperty=="function"){var noEnum=function(H){return{value:H,enumerable:!1,writable:!0,configurable:!0}};global.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",noEnum(function(){return decode(this)})),Object.defineProperty(String.prototype,"toBase64",noEnum(function(H){return encode(this,H)})),Object.defineProperty(String.prototype,"toBase64URI",noEnum(function(){return encode(this,!0)}))}}return global.Meteor&&(Base64=global.Base64),typeof module!="undefined"&&module.exports?module.exports.Base64=global.Base64:typeof define=="function"&&define.amd&&define([],function(){return global.Base64}),{Base64:global.Base64}})}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],200:[function(H,Z,I){/*! * merge-descriptors * Copyright(c) 2014 Jonathan Ong * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed */"use strict";Z.exports=g;var N=Object.prototype.hasOwnProperty;function g(S,k,v){if(!S)throw new TypeError("argument dest is required");if(!k)throw new TypeError("argument src is required");return v===void 0&&(v=!0),Object.getOwnPropertyNames(k).forEach(function(C){if(!v&&N.call(S,C))return;var _=Object.getOwnPropertyDescriptor(k,C);Object.defineProperty(S,C,_)}),S}},{}],201:[function(H,Z,I){"use strict";function N(){this._types=Object.create(null),this._extensions=Object.create(null);for(var g=0;g0)return C(r);if(i==="number"&&isFinite(r))return c.long?e(r):_(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function C(r){if(r=String(r),r.length>100)return;var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(r);if(!c)return;var i=parseFloat(c[1]),n=(c[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return i*m;case"weeks":case"week":case"w":return i*v;case"days":case"day":case"d":return i*k;case"hours":case"hour":case"hrs":case"hr":case"h":return i*S;case"minutes":case"minute":case"mins":case"min":case"m":return i*g;case"seconds":case"second":case"secs":case"sec":case"s":return i*N;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}function _(r){var c=Math.abs(r);return c>=k?Math.round(r/k)+"d":c>=S?Math.round(r/S)+"h":c>=g?Math.round(r/g)+"m":c>=N?Math.round(r/N)+"s":r+"ms"}function e(r){var c=Math.abs(r);return c>=k?h(r,c,k,"day"):c>=S?h(r,c,S,"hour"):c>=g?h(r,c,g,"minute"):c>=N?h(r,c,N,"second"):r+" ms"}function h(r,c,i,n){var l=c>=i*1.5;return Math.round(r/i)+" "+n+(l?"s":"")}},{}],205:[function(H,Z,I){(function(N){function g(m,C){for(var _=0,e=m.length-1;e>=0;e--){var h=m[e];h==="."?m.splice(e,1):h===".."?(m.splice(e,1),_++):_&&(m.splice(e,1),_--)}if(C)for(;_--;_)m.unshift("..");return m}I.resolve=function(){for(var m="",C=!1,_=arguments.length-1;_>=-1&&!C;_--){var e=_>=0?arguments[_]:N.cwd();if(typeof e!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!e)continue;m=e+"/"+m,C=e.charAt(0)==="/"}return m=g(k(m.split("/"),function(h){return!!h}),!C).join("/"),(C?"/":"")+m||"."},I.normalize=function(m){var C=I.isAbsolute(m),_=v(m,-1)==="/";return m=g(k(m.split("/"),function(e){return!!e}),!C).join("/"),!m&&!C&&(m="."),m&&_&&(m+="/"),(C?"/":"")+m},I.isAbsolute=function(m){return m.charAt(0)==="/"},I.join=function(){var m=Array.prototype.slice.call(arguments,0);return I.normalize(k(m,function(C,_){if(typeof C!="string")throw new TypeError("Arguments to path.join must be strings");return C}).join("/"))},I.relative=function(m,C){m=I.resolve(m).substr(1),C=I.resolve(C).substr(1);function _(l){for(var f=0;f=0&&!(l[d]!=="");d--);return f>d?[]:l.slice(f,d-f+1)}for(var e=_(m.split("/")),h=_(C.split("/")),r=Math.min(e.length,h.length),c=r,i=0;i=1;--r)if(C=m.charCodeAt(r),C===47){if(!h){e=r;break}}else h=!1;return e===-1?_?"/":".":_&&e===1?"/":m.slice(0,e)};function S(m){typeof m!="string"&&(m=m+"");var C=0,_=-1,e=!0,h;for(h=m.length-1;h>=0;--h)if(m.charCodeAt(h)===47){if(!e){C=h+1;break}}else _===-1&&(e=!1,_=h+1);return _===-1?"":m.slice(C,_)}I.basename=function(m,C){var _=S(m);return C&&_.substr(-1*C.length)===C&&(_=_.substr(0,_.length-C.length)),_},I.extname=function(m){typeof m!="string"&&(m=m+"");for(var C=-1,_=0,e=-1,h=!0,r=0,c=m.length-1;c>=0;--c){var i=m.charCodeAt(c);if(i===47){if(!h){_=c+1;break}continue}e===-1&&(h=!1,e=c+1),i===46?C===-1?C=c:r!==1&&(r=1):C!==-1&&(r=-1)}return C===-1||e===-1||r===0||r===1&&C===e-1&&C===_+1?"":m.slice(C,e)};function k(m,C){if(m.filter)return m.filter(C);for(var _=[],e=0;e * Copyright 2014-2018 Benjamin Tan * Copyright 2011-2013 John-David Dalton * Available under MIT license */(function(){"use strict";var g={function:!0,object:!0},S=g[typeof window]&&window||this,k=S,v=g[typeof I]&&I,m=g[typeof Z]&&Z&&!Z.nodeType&&Z,C=v&&m&&typeof N=="object"&&N;C&&(C.global===C||C.window===C||C.self===C)&&(S=C);var _=Math.pow(2,53)-1,e=/\bOpera/,h=this,r=Object.prototype,c=r.hasOwnProperty,i=r.toString;function n(y){return y=String(y),y.charAt(0).toUpperCase()+y.slice(1)}function l(y,x,w){var T={"10.0":"10","6.4":"10 Technical Preview","6.3":"8.1","6.2":"8","6.1":"Server 2008 R2 / 7","6.0":"Server 2008 / Vista","5.2":"Server 2003 / XP 64-bit","5.1":"XP","5.01":"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return x&&w&&/^Win/i.test(y)&&!/^Windows Phone /i.test(y)&&(T=T[/[\d.]+$/.exec(y)])&&(y="Windows "+T),y=String(y),x&&w&&(y=y.replace(RegExp(x,"i"),w)),y=d(y.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0]),y}function f(y,x){var w=-1,T=y?y.length:0;if(typeof T=="number"&&T>-1&&T<=_)for(;++w3&&"WebKit"||/\bOpera\b/.test(Q)&&(/\bOPR\b/.test(y)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(y)&&!/^(?:Trident|EdgeHTML)$/.test(V)&&"WebKit"||!V&&/\bMSIE\b/i.test(y)&&(ne=="Mac OS"?"Tasman":"Trident")||V=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(Q)&&"NetFront")&&(V=[fe]),Q=="IE"&&(fe=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(y)||0)[1])?(Q+=" Mobile",ne="Windows Phone "+(/\+$/.test(fe)?fe:fe+".x"),Oe.unshift("desktop mode")):/\bWPDesktop\b/i.test(y)?(Q="IE Mobile",ne="Windows Phone 8.x",Oe.unshift("desktop mode"),W||(W=(/\brv:([\d.]+)/.exec(y)||0)[1])):Q!="IE"&&V=="Trident"&&(fe=/\brv:([\d.]+)/.exec(y))&&(Q&&Oe.push("identifying as "+Q+(W?" "+W:"")),Q="IE",W=fe[1]),te){if(s(x,"global"))if(L&&(fe=L.lang.System,Re=fe.getProperty("os.arch"),ne=ne||fe.getProperty("os.name")+" "+fe.getProperty("os.version")),G){try{W=x.require("ringo/engine").version.join("."),Q="RingoJS"}catch(Ye){(fe=x.system)&&fe.global.system==x.system&&(Q="Narwhal",ne||(ne=fe[0].os||null))}Q||(Q="Rhino")}else typeof x.process=="object"&&!x.process.browser&&(fe=x.process)&&(typeof fe.versions=="object"&&(typeof fe.versions.electron=="string"?(Oe.push("Node "+fe.versions.node),Q="Electron",W=fe.versions.electron):typeof fe.versions.nw=="string"&&(Oe.push("Chromium "+W,"Node "+fe.versions.node),Q="NW.js",W=fe.versions.nw)),Q||(Q="Node.js",Re=fe.arch,ne=fe.platform,W=/[\d.]+/.exec(fe.version),W=W?W[0]:null));else o(fe=x.runtime)==z?(Q="Adobe AIR",ne=fe.flash.system.Capabilities.os):o(fe=x.phantom)==U?(Q="PhantomJS",W=(fe=fe.version||null)&&fe.major+"."+fe.minor+"."+fe.patch):typeof ae.documentMode=="number"&&(fe=/\bTrident\/(\d+)/i.exec(y))?(W=[W,ae.documentMode],(fe=+fe[1]+4)!=W[1]&&(Oe.push("IE "+W[1]+" mode"),V&&(V[1]=""),W[1]=fe),W=Q=="IE"?String(W[1].toFixed(1)):W[0]):typeof ae.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(Q)&&(Oe.push("masking as "+Q+" "+W),Q="IE",W="11.0",V=["Trident"],ne="Windows");ne=ne&&d(ne)}if(W&&(fe=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(W)||/(?:alpha|beta)(?: ?\d)?/i.exec(y+";"+(te&&T.appMinorVersion))||/\bMinefield\b/i.test(y)&&"a")&&(de=/b/i.test(fe)?"beta":"alpha",W=W.replace(RegExp(fe+"\\+?$"),"")+(de=="beta"?oe:ee)+(/\d+\+?/.exec(fe)||"")),Q=="Fennec"||Q=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(ne))Q="Firefox Mobile";else if(Q=="Maxthon"&&W)W=W.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(q))q=="Xbox 360"&&(ne=null),q=="Xbox 360"&&/\bIEMobile\b/.test(y)&&Oe.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(Q)||Q&&!q&&!/Browser|Mobi/.test(Q))&&(ne=="Windows CE"||/Mobi/i.test(y)))Q+=" Mobile";else if(Q=="IE"&&te)try{x.external===null&&Oe.unshift("platform preview")}catch(Ye){Oe.unshift("embedded")}else(/\bBlackBerry\b/.test(q)||/\bBB10\b/.test(y))&&(fe=(RegExp(q.replace(/ +/g," *")+"/([.\\d]+)","i").exec(y)||0)[1]||W)?(fe=[fe,/BB10/.test(y)],ne=(fe[1]?(q=null,ie="BlackBerry"):"Device Software")+" "+fe[0],W=null):this!=u&&q!="Wii"&&(te&&be||/Opera/.test(Q)&&/\b(?:MSIE|Firefox)\b/i.test(y)||Q=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(ne)||Q=="IE"&&(ne&&!/^Win/.test(ne)&&W>5.5||/\bWindows XP\b/.test(ne)&&W>8||W==8&&!/\bTrident\b/.test(y)))&&!e.test(fe=D.call(u,y.replace(e,"")+";"))&&fe.name&&(fe="ing as "+fe.name+((fe=fe.version)?" "+fe:""),e.test(Q)?(/\bIE\b/.test(fe)&&ne=="Mac OS"&&(ne=null),fe="identify"+fe):(fe="mask"+fe,_e?Q=d(_e.replace(/([a-z])([A-Z])/g,"$1 $2")):Q="Opera",/\bIE\b/.test(fe)&&(ne=null),te||(W=null)),V=["Presto"],Oe.push(fe));(fe=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(y)||0)[1])&&(fe=[parseFloat(fe.replace(/\.(\d)$/,".0$1")),fe],Q=="Safari"&&fe[1].slice(-1)=="+"?(Q="WebKit Nightly",de="alpha",W=fe[1].slice(0,-1)):(W==fe[1]||W==(fe[2]=(/\bSafari\/([\d.]+\+?)/i.exec(y)||0)[1]))&&(W=null),fe[1]=(/\bChrome\/([\d.]+)/i.exec(y)||0)[1],fe[0]==537.36&&fe[2]==537.36&&parseFloat(fe[1])>=28&&V=="WebKit"&&(V=["Blink"]),!te||!A&&!fe[1]?(V&&(V[1]="like Safari"),fe=(fe=fe[0],fe<400?1:fe<500?2:fe<526?3:fe<533?4:fe<534?"4+":fe<535?5:fe<537?6:fe<538?7:fe<601?8:"8")):(V&&(V[1]="like Chrome"),fe=fe[1]||(fe=fe[0],fe<530?1:fe<532?2:fe<532.05?3:fe<533?4:fe<534.03?5:fe<534.07?6:fe<534.1?7:fe<534.13?8:fe<534.16?9:fe<534.24?10:fe<534.3?11:fe<535.01?12:fe<535.02?"13+":fe<535.07?15:fe<535.11?16:fe<535.19?17:fe<536.05?18:fe<536.1?19:fe<537.01?20:fe<537.11?"21+":fe<537.13?23:fe<537.18?24:fe<537.24?25:fe<537.36?26:V!="Blink"?"27":"28")),V&&(V[1]+=" "+(fe+=typeof fe=="number"?".x":/[.+]/.test(fe)?"":"+")),Q=="Safari"&&(!W||parseInt(W)>45)&&(W=fe)),Q=="Opera"&&(fe=/\bzbov|zvav$/.exec(ne))?(Q+=" ",Oe.unshift("desktop mode"),fe=="zvav"?(Q+="Mini",W=null):Q+="Mobile",ne=ne.replace(RegExp(" *"+fe+"$"),"")):Q=="Safari"&&/\bChrome\b/.exec(V&&V[1])&&(Oe.unshift("desktop mode"),Q="Chrome Mobile",W=null,/\bOS X\b/.test(ne)?(ie="Apple",ne="iOS 4.3+"):ne=null),W&&W.indexOf(fe=/[\d.]+$/.exec(ne))==0&&y.indexOf("/"+fe+"-")>-1&&(ne=p(ne.replace(fe,""))),V&&!/\b(?:Avant|Nook)\b/.test(Q)&&(/Browser|Lunascape|Maxthon/.test(Q)||Q!="Safari"&&/^iOS/.test(ne)&&/\bSafari\b/.test(V[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(Q)&&V[1])&&((fe=V[V.length-1])&&Oe.push(fe)),Oe.length&&(Oe=["("+Oe.join("; ")+")"]),ie&&q&&q.indexOf(ie)<0&&Oe.push("on "+ie),q&&Oe.push((/^on /.test(Oe[Oe.length-1])?"":"on ")+q),ne&&(fe=/ ([\d.+]+)$/.exec(ne),Y=fe&&ne.charAt(ne.length-fe[0].length-1)=="/",ne={architecture:32,family:fe&&!Y?ne.replace(fe[0],""):ne,version:fe?fe[1]:null,toString:function(){var Ye=this.version;return this.family+(Ye&&!Y?" "+Ye:"")+(this.architecture==64?" 64-bit":"")}}),(fe=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Re))&&!/\bi686\b/i.test(Re)?(ne&&(ne.architecture=64,ne.family=ne.family.replace(RegExp(" *"+fe),"")),Q&&(/\bWOW64\b/i.test(y)||te&&/\w(?:86|32)$/.test(T.cpuClass||T.platform)&&!/\bWin64; x64\b/i.test(y))&&Oe.unshift("32-bit")):ne&&/^OS X/.test(ne.family)&&Q=="Chrome"&&parseFloat(W)>=39&&(ne.architecture=64),y||(y=null);var $e={};return $e.description=y,$e.layout=V&&V[0],$e.manufacturer=ie,$e.name=Q,$e.prerelease=de,$e.product=q,$e.ua=y,$e.version=Q&&W,$e.os=ne||{architecture:null,family:null,version:null,toString:function(){return"null"}},$e.parse=D,$e.toString=Xe,$e.version&&Oe.unshift(W),$e.name&&Oe.unshift(Q),ne&&Q&&!(ne==String(ne).split(" ")[0]&&(ne==Q.split(" ")[0]||q))&&Oe.push(q?"("+ne+")":"on "+ne),Oe.length&&($e.description=Oe.join(" ")),$e}var R=D();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(S.platform=R,define(function(){return R})):v&&m?u(R,function(y,x){v[x]=y}):S.platform=R}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(H,Z,I){(function(N){"use strict";typeof N=="undefined"||!N.version||N.version.indexOf("v0.")===0||N.version.indexOf("v1.")===0&&N.version.indexOf("v1.8.")!==0?Z.exports={nextTick:g}:Z.exports=N;function g(S,k,v,m){if(typeof S!="function")throw new TypeError('"callback" argument must be a function');var C=arguments.length,_,e;switch(C){case 0:case 1:return N.nextTick(S);case 2:return N.nextTick(function(){S.call(null,k)});case 3:return N.nextTick(function(){S.call(null,k,v)});case 4:return N.nextTick(function(){S.call(null,k,v,m)});default:for(_=new Array(C-1),e=0;e<_.length;)_[e++]=arguments[e];return N.nextTick(function(){S.apply(null,_)})}}}).call(this,H("_process"))},{_process:208}],208:[function(H,Z,I){var N=Z.exports={},g,S;function k(){throw new Error("setTimeout has not been defined")}function v(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?g=setTimeout:g=k}catch(f){g=k}try{typeof clearTimeout=="function"?S=clearTimeout:S=v}catch(f){S=v}})();function m(f){if(g===setTimeout)return setTimeout(f,0);if((g===k||!g)&&setTimeout)return g=setTimeout,setTimeout(f,0);try{return g(f,0)}catch(d){try{return g.call(null,f,0)}catch(u){return g.call(this,f,0)}}}function C(f){if(S===clearTimeout)return clearTimeout(f);if((S===v||!S)&&clearTimeout)return S=clearTimeout,clearTimeout(f);try{return S(f)}catch(d){try{return S.call(null,f)}catch(u){return S.call(this,f)}}}var _=[],e=!1,h,r=-1;function c(){if(!e||!h)return;e=!1,h.length?_=h.concat(_):r=-1,_.length&&i()}function i(){if(e)return;var f=m(c);e=!0;for(var d=_.length;d;){for(h=_,_=[];++r1)for(var u=1;u= 0x80 (not a basic code point)","invalid-input":"Invalid input"},s=_-e,E=Math.floor,b=String.fromCharCode,p;function D(B){throw new RangeError(o[B])}function R(B,U){for(var L=B.length,G=[];L--;)G[L]=U(B[L]);return G}function y(B,U){var L=B.split("@"),G="";L.length>1&&(G=L[0]+"@",B=L[1]),B=B.replace(u,".");var ee=B.split("."),oe=R(ee,U).join(".");return G+oe}function x(B){for(var U=[],L=0,G=B.length,ee,oe;L=55296&&ee<=56319&&L65535&&(U-=65536,L+=b(U>>>10&1023|55296),U=56320|U&1023),L+=b(U),L}).join("")}function T(B){return B-48<10?B-22:B-65<26?B-65:B-97<26?B-97:_}function F(B,U){return B+22+75*(B<26)-((U!=0)<<5)}function P(B,U,L){var G=0;for(B=L?E(B/c):B>>1,B+=E(B/U);B>s*h>>1;G+=_)B=E(B/s);return E(G+(s+1)*B/(B+r))}function A(B){var U=[],L=B.length,G,ee=0,oe=n,ae=i,be,_e,fe,Re,Oe,de,te,W,Y;for(be=B.lastIndexOf(l),be<0&&(be=0),_e=0;_e=128&&D("not-basic"),U.push(B.charCodeAt(_e));for(fe=be>0?be+1:0;fe=L&&D("invalid-input"),te=T(B.charCodeAt(fe++)),(te>=_||te>E((C-ee)/Oe))&&D("overflow"),ee+=te*Oe,W=de<=ae?e:de>=ae+h?h:de-ae,teE(C/Y)&&D("overflow"),Oe*=Y;G=U.length+1,ae=P(ee-Re,G,Re==0),E(ee/G)>C-oe&&D("overflow"),oe+=E(ee/G),ee%=G,U.splice(ee++,0,oe)}return w(U)}function X(B){var U,L,G,ee,oe,ae,be,_e,fe,Re,Oe,de=[],te,W,Y,V;for(B=x(B),te=B.length,U=n,L=0,oe=i,ae=0;ae=U&&OeE((C-L)/W)&&D("overflow"),L+=(be-U)*W,U=be,ae=0;aeC&&D("overflow"),Oe==U){for(_e=L,fe=_;!(Re=fe<=oe?e:fe>=oe+h?h:fe-oe,_e0&&h>e&&(h=e);for(var r=0;r=0?(n=c.substr(0,i),l=c.substr(i+1)):(n=c,l=""),f=decodeURIComponent(n),d=decodeURIComponent(l),N(C,f)?g(C[f])?C[f].push(d):C[f]=[C[f],d]:C[f]=d}return C};var g=Array.isArray||function(S){return Object.prototype.toString.call(S)==="[object Array]"}},{}],211:[function(H,Z,I){"use strict";var N=function(v){switch(typeof v){case"string":return v;case"boolean":return v?"true":"false";case"number":return isFinite(v)?v:"";default:return""}};Z.exports=function(v,m,C,_){return m=m||"&",C=C||"=",v===null&&(v=void 0),typeof v=="object"?S(k(v),function(e){var h=encodeURIComponent(N(e))+C;return g(v[e])?S(v[e],function(r){return h+encodeURIComponent(N(r))}).join(m):h+encodeURIComponent(N(v[e]))}).join(m):_?encodeURIComponent(N(_))+C+encodeURIComponent(N(v)):""};var g=Array.isArray||function(v){return Object.prototype.toString.call(v)==="[object Array]"};function S(v,m){if(v.map)return v.map(m);for(var C=[],_=0;_0?(typeof Q!="string"&&!J.objectMode&&(0,k.default)(Q)!==n.prototype&&(Q=f(Q)),ie?J.endEmitted?V.emit("error",new Error("stream.unshift() after end event")):T(V,J,Q,!0):J.ended?V.emit("error",new Error("stream.push() after EOF")):(J.reading=!1,J.decoder&&!q?(Q=J.decoder.write(Q),J.objectMode||Q.length!==0?T(V,J,Q,!1):L(V,J)):T(V,J,Q,!1))):ie||(J.reading=!1)}return P(J)}function T(V,Q,q,ie){Q.flowing&&Q.length===0&&!Q.sync?(V.emit("data",q),V.read(0)):(Q.length+=Q.objectMode?1:q.length,ie?Q.buffer.unshift(q):Q.buffer.push(q),Q.needReadable&&B(V)),L(V,Q)}function F(V,Q){var q;return!d(Q)&&typeof Q!="string"&&Q!==void 0&&!V.objectMode&&(q=new TypeError("Invalid non-string/buffer chunk")),q}function P(V){return!V.ended&&(V.needReadable||V.length=A?V=A:(V--,V|=V>>>1,V|=V>>>2,V|=V>>>4,V|=V>>>8,V|=V>>>16,V++),V}function z(V,Q){return V<=0||Q.length===0&&Q.ended?0:Q.objectMode?1:V!==V?Q.flowing&&Q.length?Q.buffer.head.data.length:Q.length:(V>Q.highWaterMark&&(Q.highWaterMark=X(V)),V<=Q.length?V:Q.ended?Q.length:(Q.needReadable=!0,0))}x.prototype.read=function(V){s("read",V),V=parseInt(V,10);var Q=this._readableState,q=V;if(V!==0&&(Q.emittedReadable=!1),V===0&&Q.needReadable&&(Q.length>=Q.highWaterMark||Q.ended))return s("read: emitReadable",Q.length,Q.ended),Q.length===0&&Q.ended?te(this):B(this),null;if(V=z(V,Q),V===0&&Q.ended)return Q.length===0&&te(this),null;var ie=Q.needReadable;s("need readable",ie),(Q.length===0||Q.length-V0?ne=fe(V,Q):ne=null,ne===null?(Q.needReadable=!0,V=0):Q.length-=V,Q.length===0&&(Q.ended||(Q.needReadable=!0),q!==V&&Q.ended&&te(this)),ne!==null&&this.emit("data",ne),ne};function O(V,Q){if(Q.ended)return;if(Q.decoder){var q=Q.decoder.end();q&&q.length&&(Q.buffer.push(q),Q.length+=Q.objectMode?1:q.length)}Q.ended=!0,B(V)}function B(V){var Q=V._readableState;Q.needReadable=!1,Q.emittedReadable||(s("emitReadable",Q.flowing),Q.emittedReadable=!0,Q.sync?_.nextTick(U,V):U(V))}function U(V){s("emit readable"),V.emit("readable"),_e(V)}function L(V,Q){Q.readingMore||(Q.readingMore=!0,_.nextTick(G,V,Q))}function G(V,Q){for(var q=Q.length;!Q.reading&&!Q.flowing&&!Q.ended&&Q.length1&&Y(ie.pipes,V)!==-1)&&!we&&(s("false write response, pause",q._readableState.awaitDrain),q._readableState.awaitDrain++,Xe=!0),q.pause())}function Ye(Ie){s("onerror",Ie),Pe(),V.removeListener("error",Ye),c(V,"error")===0&&V.emit("error",Ie)}R(V,"error",Ye);function Ze(){V.removeListener("finish",qe),Pe()}V.once("close",Ze);function qe(){s("onfinish"),V.removeListener("close",Ze),Pe()}V.once("finish",qe);function Pe(){s("unpipe"),q.unpipe(V)}return V.emit("pipe",q),ie.flowing||(s("pipe resume"),q.resume()),V};function ee(V){return function(){var Q=V._readableState;s("pipeOnDrain",Q.awaitDrain),Q.awaitDrain&&Q.awaitDrain--,Q.awaitDrain===0&&c(V,"data")&&(Q.flowing=!0,_e(V))}}x.prototype.unpipe=function(V){var Q=this._readableState,q={hasUnpiped:!1};if(Q.pipesCount===0)return this;if(Q.pipesCount===1)return V&&V!==Q.pipes?this:(V||(V=Q.pipes),Q.pipes=null,Q.pipesCount=0,Q.flowing=!1,V&&V.emit("unpipe",this,q),this);if(!V){var ie=Q.pipes,ne=Q.pipesCount;Q.pipes=null,Q.pipesCount=0,Q.flowing=!1;for(var J=0;J=Q.length?(Q.decoder?q=Q.buffer.join(""):Q.buffer.length===1?q=Q.buffer.head.data:q=Q.buffer.concat(Q.length),Q.buffer.clear()):q=Re(V,Q.buffer,Q.decoder),q}function Re(V,Q,q){var ie;return VJ.length?J.length:V;if($===J.length?ne+=J:ne+=J.slice(0,V),V-=$,V===0){$===J.length?(++ie,q.next?Q.head=q.next:Q.head=Q.tail=null):(Q.head=q,q.data=J.slice($));break}++ie}return Q.length-=ie,ne}function de(V,Q){var q=n.allocUnsafe(V),ie=Q.head,ne=1;for(ie.data.copy(q),V-=ie.data.length;ie=ie.next;){var J=ie.data,$=V>J.length?J.length:V;if(J.copy(q,q.length-V,0,$),V-=$,V===0){$===J.length?(++ne,ie.next?Q.head=ie.next:Q.head=Q.tail=null):(Q.head=ie,ie.data=J.slice($));break}++ne}return Q.length-=ne,q}function te(V){var Q=V._readableState;if(Q.length>0)throw new Error('"endReadable()" called on non-empty stream');Q.endEmitted||(Q.ended=!0,_.nextTick(W,Q,V))}function W(V,Q){!V.endEmitted&&V.length===0&&(V.endEmitted=!0,Q.readable=!1,Q.emit("end"))}function Y(V,Q){for(var q=0,ie=V.length;q-1?c.default:n.nextTick,u;F.WritableState=w;var o=(0,h.default)(H("core-util-is"));o.inherits=H("inherits");var s={deprecate:H("util-deprecate")},E=H("./internal/streams/stream"),b=H("safe-buffer").Buffer,p=g.Uint8Array||function(){};function D(de){return b.from(de)}function R(de){return b.isBuffer(de)||de instanceof p}var y=H("./internal/streams/destroy");o.inherits(F,E);function x(){}function w(de,te){u=u||H("./_stream_duplex"),de=de||{};var W=te instanceof u;this.objectMode=!!de.objectMode,W&&(this.objectMode=this.objectMode||!!de.writableObjectMode);var Y=de.highWaterMark,V=de.writableHighWaterMark,Q=this.objectMode?16:16*1024;Y||Y===0?this.highWaterMark=Y:W&&(V||V===0)?this.highWaterMark=V:this.highWaterMark=Q,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var q=de.decodeStrings===!1;this.decodeStrings=!q,this.defaultEncoding=de.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ie){L(te,ie)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new f(this)}w.prototype.getBuffer=function(){for(var te=this.bufferedRequest,W=[];te;)W.push(te),te=te.next;return W},function(){try{Object.defineProperty(w.prototype,"buffer",{get:s.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(de){}}();var T;typeof _.default=="function"&&m.default&&typeof Function.prototype[m.default]=="function"?(T=Function.prototype[m.default],(0,k.default)(F,m.default,{value:function(te){return T.call(this,te)?!0:this!==F?!1:te&&te._writableState instanceof w}})):T=function(te){return te instanceof this};function F(de){if(u=u||H("./_stream_duplex"),!T.call(F,this)&&!(this instanceof u))return new F(de);this._writableState=new w(de,this),this.writable=!0,de&&(typeof de.write=="function"&&(this._write=de.write),typeof de.writev=="function"&&(this._writev=de.writev),typeof de.destroy=="function"&&(this._destroy=de.destroy),typeof de.final=="function"&&(this._final=de.final)),E.call(this)}F.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function P(de,te){var W=new Error("write after end");de.emit("error",W),n.nextTick(te,W)}function A(de,te,W,Y){var V=!0,Q=!1;return W===null?Q=new TypeError("May not write null values to stream"):typeof W!="string"&&W!==void 0&&!te.objectMode&&(Q=new TypeError("Invalid non-string/buffer chunk")),Q&&(de.emit("error",Q),n.nextTick(Y,Q),V=!1),V}F.prototype.write=function(de,te,W){var Y=this._writableState,V=!1,Q=!Y.objectMode&&R(de);return Q&&!b.isBuffer(de)&&(de=D(de)),typeof te=="function"&&(W=te,te=null),Q?te="buffer":te||(te=Y.defaultEncoding),typeof W!="function"&&(W=x),Y.ended?P(this,W):(Q||A(this,Y,de,W))&&(Y.pendingcb++,V=z(this,Y,Q,de,te,W)),V},F.prototype.cork=function(){var de=this._writableState;de.corked++},F.prototype.uncork=function(){var de=this._writableState;de.corked&&(de.corked--,!de.writing&&!de.corked&&!de.finished&&!de.bufferProcessing&&de.bufferedRequest&&oe(this,de))},F.prototype.setDefaultEncoding=function(te){if(typeof te=="string"&&(te=te.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((te+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+te);return this._writableState.defaultEncoding=te,this};function X(de,te,W){return!de.objectMode&&de.decodeStrings!==!1&&typeof te=="string"&&(te=b.from(te,W)),te}Object.defineProperty(F.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function z(de,te,W,Y,V,Q){if(!W){var q=X(te,Y,V);Y!==q&&(W=!0,V="buffer",Y=q)}var ie=te.objectMode?1:Y.length;te.length+=ie;var ne=te.length0?this.tail.next=_:this.head=_,this.tail=_,++this.length},v.prototype.unshift=function(C){var _={data:C,next:this.head};this.length===0&&(this.tail=_),this.head=_,++this.length},v.prototype.shift=function(){if(this.length===0)return;var C=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,C},v.prototype.clear=function(){this.head=this.tail=null,this.length=0},v.prototype.join=function(C){if(this.length===0)return"";for(var _=this.head,e=""+_.data;_=_.next;)e+=C+_.data;return e},v.prototype.concat=function(C){if(this.length===0)return g.alloc(0);if(this.length===1)return this.head.data;for(var _=g.allocUnsafe(C>>>0),e=this.head,h=0;e;)k(e.data,_,h),h+=e.data.length,e=e.next;return _},v}(),S&&S.inspect&&S.inspect.custom&&(Z.exports.prototype[S.inspect.custom]=function(){var v=S.inspect({length:this.length});return this.constructor.name+" "+v})},{"safe-buffer":228,util:71}],220:[function(H,Z,I){"use strict";var N=H("process-nextick-args");function g(v,m){var C=this,_=this._readableState&&this._readableState.destroyed,e=this._writableState&&this._writableState.destroyed;return _||e?(m?m(v):v&&(!this._writableState||!this._writableState.errorEmitted)&&N.nextTick(k,this,v),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(v||null,function(h){!m&&h?(N.nextTick(k,C,h),C._writableState&&(C._writableState.errorEmitted=!0)):m&&m(h)}),this)}function S(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function k(v,m){v.emit("error",m)}Z.exports={destroy:g,undestroy:S}},{"process-nextick-args":207}],221:[function(H,Z,I){"use strict";Z.exports=H("events").EventEmitter},{events:192}],222:[function(H,Z,I){Z.exports=H("./readable").PassThrough},{"./readable":223}],223:[function(H,Z,I){I=Z.exports=H("./lib/_stream_readable.js"),I.Stream=I,I.Readable=I,I.Writable=H("./lib/_stream_writable.js"),I.Duplex=H("./lib/_stream_duplex.js"),I.Transform=H("./lib/_stream_transform.js"),I.PassThrough=H("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":214,"./lib/_stream_passthrough.js":215,"./lib/_stream_readable.js":216,"./lib/_stream_transform.js":217,"./lib/_stream_writable.js":218}],224:[function(H,Z,I){Z.exports=H("./readable").Transform},{"./readable":223}],225:[function(H,Z,I){Z.exports=H("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(H,Z,I){var N=function(){return this}()||Function("return this")(),g=N.regeneratorRuntime&&Object.getOwnPropertyNames(N).indexOf("regeneratorRuntime")>=0,S=g&&N.regeneratorRuntime;if(N.regeneratorRuntime=void 0,Z.exports=H("./runtime"),g)N.regeneratorRuntime=S;else try{delete N.regeneratorRuntime}catch(k){N.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(H,Z,I){!function(N){"use strict";var g=Object.prototype,S=g.hasOwnProperty,k,v=typeof Symbol=="function"?Symbol:{},m=v.iterator||"@@iterator",C=v.asyncIterator||"@@asyncIterator",_=v.toStringTag||"@@toStringTag",e=typeof Z=="object",h=N.regeneratorRuntime;if(h){e&&(Z.exports=h);return}h=N.regeneratorRuntime=e?Z.exports:{};function r(z,O,B,U){var L=O&&O.prototype instanceof u?O:u,G=Object.create(L.prototype),ee=new P(U||[]);return G._invoke=x(z,B,ee),G}h.wrap=r;function c(z,O,B){try{return{type:"normal",arg:z.call(O,B)}}catch(U){return{type:"throw",arg:U}}}var i="suspendedStart",n="suspendedYield",l="executing",f="completed",d={};function u(){}function o(){}function s(){}var E={};E[m]=function(){return this};var b=Object.getPrototypeOf,p=b&&b(b(A([])));p&&p!==g&&S.call(p,m)&&(E=p);var D=s.prototype=u.prototype=Object.create(E);o.prototype=D.constructor=s,s.constructor=o,s[_]=o.displayName="GeneratorFunction";function R(z){["next","throw","return"].forEach(function(O){z[O]=function(B){return this._invoke(O,B)}})}h.isGeneratorFunction=function(z){var O=typeof z=="function"&&z.constructor;return O?O===o||(O.displayName||O.name)==="GeneratorFunction":!1},h.mark=function(z){return Object.setPrototypeOf?Object.setPrototypeOf(z,s):(z.__proto__=s,_ in z||(z[_]="GeneratorFunction")),z.prototype=Object.create(D),z},h.awrap=function(z){return{__await:z}};function y(z){function O(L,G,ee,oe){var ae=c(z[L],z,G);if(ae.type==="throw")oe(ae.arg);else{var be=ae.arg,_e=be.value;return _e&&typeof _e=="object"&&S.call(_e,"__await")?Promise.resolve(_e.__await).then(function(fe){O("next",fe,ee,oe)},function(fe){O("throw",fe,ee,oe)}):Promise.resolve(_e).then(function(fe){be.value=fe,ee(be)},oe)}}var B;function U(L,G){function ee(){return new Promise(function(oe,ae){O(L,G,oe,ae)})}return B=B?B.then(ee,ee):ee()}this._invoke=U}R(y.prototype),y.prototype[C]=function(){return this},h.AsyncIterator=y,h.async=function(z,O,B,U){var L=new y(r(z,O,B,U));return h.isGeneratorFunction(O)?L:L.next().then(function(G){return G.done?G.value:L.next()})};function x(z,O,B){var U=i;return function(G,ee){if(U===l)throw new Error("Generator is already running");if(U===f){if(G==="throw")throw ee;return X()}for(B.method=G,B.arg=ee;;){var oe=B.delegate;if(oe){var ae=w(oe,B);if(ae){if(ae===d)continue;return ae}}if(B.method==="next")B.sent=B._sent=B.arg;else if(B.method==="throw"){if(U===i)throw U=f,B.arg;B.dispatchException(B.arg)}else B.method==="return"&&B.abrupt("return",B.arg);U=l;var be=c(z,O,B);if(be.type==="normal"){if(U=B.done?f:n,be.arg===d)continue;return{value:be.arg,done:B.done}}else be.type==="throw"&&(U=f,B.method="throw",B.arg=be.arg)}}}function w(z,O){var B=z.iterator[O.method];if(B===k){if(O.delegate=null,O.method==="throw"){if(z.iterator.return&&(O.method="return",O.arg=k,w(z,O),O.method==="throw"))return d;O.method="throw",O.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var U=c(B,z.iterator,O.arg);if(U.type==="throw")return O.method="throw",O.arg=U.arg,O.delegate=null,d;var L=U.arg;if(!L)return O.method="throw",O.arg=new TypeError("iterator result is not an object"),O.delegate=null,d;if(L.done)O[z.resultName]=L.value,O.next=z.nextLoc,O.method!=="return"&&(O.method="next",O.arg=k);else return L;return O.delegate=null,d}R(D),D[_]="Generator",D[m]=function(){return this},D.toString=function(){return"[object Generator]"};function T(z){var O={tryLoc:z[0]};1 in z&&(O.catchLoc=z[1]),2 in z&&(O.finallyLoc=z[2],O.afterLoc=z[3]),this.tryEntries.push(O)}function F(z){var O=z.completion||{};O.type="normal",delete O.arg,z.completion=O}function P(z){this.tryEntries=[{tryLoc:"root"}],z.forEach(T,this),this.reset(!0)}h.keys=function(z){var O=[];for(var B in z)O.push(B);return O.reverse(),function U(){for(;O.length;){var L=O.pop();if(L in z)return U.value=L,U.done=!1,U}return U.done=!0,U}};function A(z){if(z){var O=z[m];if(O)return O.call(z);if(typeof z.next=="function")return z;if(!isNaN(z.length)){var B=-1,U=function L(){for(;++B=0;--U){var L=this.tryEntries[U],G=L.completion;if(L.tryLoc==="root")return B("end");if(L.tryLoc<=this.prev){var ee=S.call(L,"catchLoc"),oe=S.call(L,"finallyLoc");if(ee&&oe){if(this.prev=0;--B){var U=this.tryEntries[B];if(U.tryLoc<=this.prev&&S.call(U,"finallyLoc")&&this.prev=0;--O){var B=this.tryEntries[O];if(B.finallyLoc===z)return this.complete(B.completion,B.afterLoc),F(B),d}},catch:function(z){for(var O=this.tryEntries.length-1;O>=0;--O){var B=this.tryEntries[O];if(B.tryLoc===z){var U=B.completion;if(U.type==="throw"){var L=U.arg;F(B)}return L}}throw new Error("illegal catch attempt")},delegateYield:function(z,O,B){return this.delegate={iterator:A(z),resultName:O,nextLoc:B},this.method==="next"&&(this.arg=k),d}}}(function(){return this}()||Function("return this")())},{}],228:[function(H,Z,I){var N=H("buffer"),g=N.Buffer;function S(v,m){for(var C in v)m[C]=v[C]}g.from&&g.alloc&&g.allocUnsafe&&g.allocUnsafeSlow?Z.exports=N:(S(N,I),I.Buffer=k);function k(v,m,C){return g(v,m,C)}S(g,k),k.from=function(v,m,C){if(typeof v=="number")throw new TypeError("Argument must not be a number");return g(v,m,C)},k.alloc=function(v,m,C){if(typeof v!="number")throw new TypeError("Argument must be a number");var _=g(v);return m!==void 0?typeof C=="string"?_.fill(m,C):_.fill(m):_.fill(0),_},k.allocUnsafe=function(v){if(typeof v!="number")throw new TypeError("Argument must be a number");return g(v)},k.allocUnsafeSlow=function(v){if(typeof v!="number")throw new TypeError("Argument must be a number");return N.SlowBuffer(v)}},{buffer:73}],229:[function(H,Z,I){(function(N){"use strict";var g=H("babel-runtime/core-js/string/from-code-point"),S=n(g),k=H("babel-runtime/core-js/json/stringify"),v=n(k),m=H("babel-runtime/helpers/typeof"),C=n(m),_=H("babel-runtime/core-js/object/define-property"),e=n(_),h=H("babel-runtime/core-js/object/keys"),r=n(h),c=H("babel-runtime/core-js/object/create"),i=n(c);function n(l){return l&&l.__esModule?l:{default:l}}(function(l){l.parser=function(J,$){return new d(J,$)},l.SAXParser=d,l.SAXStream=D,l.createStream=p,l.MAX_BUFFER_LENGTH=64*1024;var f=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];l.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function d(J,$){if(!(this instanceof d))return new d(J,$);var le=this;o(le),le.q=le.c="",le.bufferCheckPosition=l.MAX_BUFFER_LENGTH,le.opt=$||{},le.opt.lowercase=le.opt.lowercase||le.opt.lowercasetags,le.looseCase=le.opt.lowercase?"toLowerCase":"toUpperCase",le.tags=[],le.closed=le.closedRoot=le.sawRoot=!1,le.tag=le.error=null,le.strict=!!J,le.noscript=!!(J||le.opt.noscript),le.state=G.BEGIN,le.strictEntities=le.opt.strictEntities,le.ENTITIES=le.strictEntities?(0,i.default)(l.XML_ENTITIES):(0,i.default)(l.ENTITIES),le.attribList=[],le.opt.xmlns&&(le.ns=(0,i.default)(T)),le.trackPosition=le.opt.position!==!1,le.trackPosition&&(le.position=le.line=le.column=0),oe(le,"onready")}i.default||(Object.create=function(J){function $(){}$.prototype=J;var le=new $;return le}),r.default||(Object.keys=function(J){var $=[];for(var le in J)J.hasOwnProperty(le)&&$.push(le);return $});function u(J){for(var $=Math.max(l.MAX_BUFFER_LENGTH,10),le=0,ce=0,we=f.length;ce$)switch(f[ce]){case"textNode":be(J);break;case"cdata":ae(J,"oncdata",J.cdata),J.cdata="";break;case"script":ae(J,"onscript",J.script),J.script="";break;default:fe(J,"Max buffer length exceeded: "+f[ce])}le=Math.max(le,Fe)}var Xe=l.MAX_BUFFER_LENGTH-le;J.bufferCheckPosition=Xe+J.position}function o(J){for(var $=0,le=f.length;$"||z(J)}function U(J,$){return J.test($)}function L(J,$){return!U(J,$)}var G=0;l.STATE={BEGIN:G++,BEGIN_WHITESPACE:G++,TEXT:G++,TEXT_ENTITY:G++,OPEN_WAKA:G++,SGML_DECL:G++,SGML_DECL_QUOTED:G++,DOCTYPE:G++,DOCTYPE_QUOTED:G++,DOCTYPE_DTD:G++,DOCTYPE_DTD_QUOTED:G++,COMMENT_STARTING:G++,COMMENT:G++,COMMENT_ENDING:G++,COMMENT_ENDED:G++,CDATA:G++,CDATA_ENDING:G++,CDATA_ENDING_2:G++,PROC_INST:G++,PROC_INST_BODY:G++,PROC_INST_ENDING:G++,OPEN_TAG:G++,OPEN_TAG_SLASH:G++,ATTRIB:G++,ATTRIB_NAME:G++,ATTRIB_NAME_SAW_WHITE:G++,ATTRIB_VALUE:G++,ATTRIB_VALUE_QUOTED:G++,ATTRIB_VALUE_CLOSED:G++,ATTRIB_VALUE_UNQUOTED:G++,ATTRIB_VALUE_ENTITY_Q:G++,ATTRIB_VALUE_ENTITY_U:G++,CLOSE_TAG:G++,CLOSE_TAG_SAW_WHITE:G++,SCRIPT:G++,SCRIPT_ENDING:G++},l.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},l.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},(0,r.default)(l.ENTITIES).forEach(function(J){var $=l.ENTITIES[J],le=typeof $=="number"?String.fromCharCode($):$;l.ENTITIES[J]=le});for(var ee in l.STATE)l.STATE[l.STATE[ee]]=ee;G=l.STATE;function oe(J,$,le){J[$]&&J[$](le)}function ae(J,$,le){J.textNode&&be(J),oe(J,$,le)}function be(J){J.textNode=_e(J.opt,J.textNode),J.textNode&&oe(J,"ontext",J.textNode),J.textNode=""}function _e(J,$){return J.trim&&($=$.trim()),J.normalize&&($=$.replace(/\s+/g," ")),$}function fe(J,$){return be(J),J.trackPosition&&($+=` Line: `+J.line+` Column: `+J.column+` Char: `+J.c),$=new Error($),J.error=$,oe(J,"onerror",$),J}function Re(J){return J.sawRoot&&!J.closedRoot&&Oe(J,"Unclosed root tag"),J.state!==G.BEGIN&&J.state!==G.BEGIN_WHITESPACE&&J.state!==G.TEXT&&fe(J,"Unexpected end"),be(J),J.c="",J.closed=!0,oe(J,"onend"),d.call(J,J.strict,J.opt),J}function Oe(J,$){if((typeof J=="undefined"?"undefined":(0,C.default)(J))!=="object"||!(J instanceof d))throw new Error("bad call to strictFail");J.strict&&fe(J,$)}function de(J){J.strict||(J.tagName=J.tagName[J.looseCase]());var $=J.tags[J.tags.length-1]||J,le=J.tag={name:J.tagName,attributes:{}};J.opt.xmlns&&(le.ns=$.ns),J.attribList.length=0,ae(J,"onopentagstart",le)}function te(J,$){var le=J.indexOf(":"),ce=le<0?["",J]:J.split(":"),we=ce[0],Fe=ce[1];return $&&J==="xmlns"&&(we="xmlns",Fe=""),{prefix:we,local:Fe}}function W(J){if(J.strict||(J.attribName=J.attribName[J.looseCase]()),J.attribList.indexOf(J.attribName)!==-1||J.tag.attributes.hasOwnProperty(J.attribName)){J.attribName=J.attribValue="";return}if(J.opt.xmlns){var $=te(J.attribName,!0),le=$.prefix,ce=$.local;if(le==="xmlns")if(ce==="xml"&&J.attribValue!==x)Oe(J,"xml: prefix must be bound to "+x+` Actual: `+J.attribValue);else if(ce==="xmlns"&&J.attribValue!==w)Oe(J,"xmlns: prefix must be bound to "+w+` Actual: `+J.attribValue);else{var we=J.tag,Fe=J.tags[J.tags.length-1]||J;we.ns===Fe.ns&&(we.ns=(0,i.default)(Fe.ns)),we.ns[ce]=J.attribValue}J.attribList.push([J.attribName,J.attribValue])}else J.tag.attributes[J.attribName]=J.attribValue,ae(J,"onattribute",{name:J.attribName,value:J.attribValue});J.attribName=J.attribValue=""}function Y(J,$){if(J.opt.xmlns){var le=J.tag,ce=te(J.tagName);le.prefix=ce.prefix,le.local=ce.local,le.uri=le.ns[ce.prefix]||"",le.prefix&&!le.uri&&(Oe(J,"Unbound namespace prefix: "+(0,v.default)(J.tagName)),le.uri=ce.prefix);var we=J.tags[J.tags.length-1]||J;le.ns&&we.ns!==le.ns&&(0,r.default)(le.ns).forEach(function(ye){ae(J,"onopennamespace",{prefix:ye,uri:le.ns[ye]})});for(var Fe=0,Xe=J.attribList.length;Fe",J.tagName="",J.state=G.SCRIPT;return}ae(J,"onscript",J.script),J.script=""}var $=J.tags.length,le=J.tagName;J.strict||(le=le[J.looseCase]());for(var ce=le;$--;){var we=J.tags[$];if(we.name!==ce)Oe(J,"Unexpected close tag");else break}if($<0){Oe(J,"Unmatched closing tag: "+J.tagName),J.textNode+="",J.state=G.TEXT;return}J.tagName=le;for(var Fe=J.tags.length;Fe-- >$;){var Xe=J.tag=J.tags.pop();J.tagName=J.tag.name,ae(J,"onclosetag",J.tagName);var $e={};for(var Ye in Xe.ns)$e[Ye]=Xe.ns[Ye];var Ze=J.tags[J.tags.length-1]||J;J.opt.xmlns&&Xe.ns!==Ze.ns&&(0,r.default)(Xe.ns).forEach(function(qe){var Pe=Xe.ns[qe];ae(J,"onclosenamespace",{prefix:qe,uri:Pe})})}$===0&&(J.closedRoot=!0),J.tagName=J.attribValue=J.attribName="",J.attribList.length=0,J.state=G.TEXT}function Q(J){var $=J.entity,le=$.toLowerCase(),ce,we="";return J.ENTITIES[$]?J.ENTITIES[$]:J.ENTITIES[le]?J.ENTITIES[le]:($=le,$.charAt(0)==="#"&&($.charAt(1)==="x"?($=$.slice(2),ce=parseInt($,16),we=ce.toString(16)):($=$.slice(1),ce=parseInt($,10),we=ce.toString(10))),$=$.replace(/^0+/,""),isNaN(ce)||we.toLowerCase()!==$?(Oe(J,"Invalid character entity"),"&"+J.entity+";"):(0,S.default)(ce))}function q(J,$){$==="<"?(J.state=G.OPEN_WAKA,J.startTagPosition=J.position):z($)||(Oe(J,"Non-whitespace before first tag."),J.textNode=$,J.state=G.TEXT)}function ie(J,$){var le="";return $"?(ae($,"onsgmldeclaration",$.sgmlDecl),$.sgmlDecl="",$.state=G.TEXT):(O(ce)&&($.state=G.SGML_DECL_QUOTED),$.sgmlDecl+=ce);continue;case G.SGML_DECL_QUOTED:ce===$.q&&($.state=G.SGML_DECL,$.q=""),$.sgmlDecl+=ce;continue;case G.DOCTYPE:ce===">"?($.state=G.TEXT,ae($,"ondoctype",$.doctype),$.doctype=!0):($.doctype+=ce,ce==="["?$.state=G.DOCTYPE_DTD:O(ce)&&($.state=G.DOCTYPE_QUOTED,$.q=ce));continue;case G.DOCTYPE_QUOTED:$.doctype+=ce,ce===$.q&&($.q="",$.state=G.DOCTYPE);continue;case G.DOCTYPE_DTD:$.doctype+=ce,ce==="]"?$.state=G.DOCTYPE:O(ce)&&($.state=G.DOCTYPE_DTD_QUOTED,$.q=ce);continue;case G.DOCTYPE_DTD_QUOTED:$.doctype+=ce,ce===$.q&&($.state=G.DOCTYPE_DTD,$.q="");continue;case G.COMMENT:ce==="-"?$.state=G.COMMENT_ENDING:$.comment+=ce;continue;case G.COMMENT_ENDING:ce==="-"?($.state=G.COMMENT_ENDED,$.comment=_e($.opt,$.comment),$.comment&&ae($,"oncomment",$.comment),$.comment=""):($.comment+="-"+ce,$.state=G.COMMENT);continue;case G.COMMENT_ENDED:ce!==">"?(Oe($,"Malformed comment"),$.comment+="--"+ce,$.state=G.COMMENT):$.state=G.TEXT;continue;case G.CDATA:ce==="]"?$.state=G.CDATA_ENDING:$.cdata+=ce;continue;case G.CDATA_ENDING:ce==="]"?$.state=G.CDATA_ENDING_2:($.cdata+="]"+ce,$.state=G.CDATA);continue;case G.CDATA_ENDING_2:ce===">"?($.cdata&&ae($,"oncdata",$.cdata),ae($,"onclosecdata"),$.cdata="",$.state=G.TEXT):ce==="]"?$.cdata+="]":($.cdata+="]]"+ce,$.state=G.CDATA);continue;case G.PROC_INST:ce==="?"?$.state=G.PROC_INST_ENDING:z(ce)?$.state=G.PROC_INST_BODY:$.procInstName+=ce;continue;case G.PROC_INST_BODY:if(!$.procInstBody&&z(ce))continue;ce==="?"?$.state=G.PROC_INST_ENDING:$.procInstBody+=ce;continue;case G.PROC_INST_ENDING:ce===">"?(ae($,"onprocessinginstruction",{name:$.procInstName,body:$.procInstBody}),$.procInstName=$.procInstBody="",$.state=G.TEXT):($.procInstBody+="?"+ce,$.state=G.PROC_INST_BODY);continue;case G.OPEN_TAG:U(P,ce)?$.tagName+=ce:(de($),ce===">"?Y($):ce==="/"?$.state=G.OPEN_TAG_SLASH:(z(ce)||Oe($,"Invalid character in tag name"),$.state=G.ATTRIB));continue;case G.OPEN_TAG_SLASH:ce===">"?(Y($,!0),V($)):(Oe($,"Forward-slash in opening tag not followed by >"),$.state=G.ATTRIB);continue;case G.ATTRIB:if(z(ce))continue;ce===">"?Y($):ce==="/"?$.state=G.OPEN_TAG_SLASH:U(F,ce)?($.attribName=ce,$.attribValue="",$.state=G.ATTRIB_NAME):Oe($,"Invalid attribute name");continue;case G.ATTRIB_NAME:ce==="="?$.state=G.ATTRIB_VALUE:ce===">"?(Oe($,"Attribute without value"),$.attribValue=$.attribName,W($),Y($)):z(ce)?$.state=G.ATTRIB_NAME_SAW_WHITE:U(P,ce)?$.attribName+=ce:Oe($,"Invalid attribute name");continue;case G.ATTRIB_NAME_SAW_WHITE:if(ce==="=")$.state=G.ATTRIB_VALUE;else{if(z(ce))continue;Oe($,"Attribute without value"),$.tag.attributes[$.attribName]="",$.attribValue="",ae($,"onattribute",{name:$.attribName,value:""}),$.attribName="",ce===">"?Y($):U(F,ce)?($.attribName=ce,$.state=G.ATTRIB_NAME):(Oe($,"Invalid attribute name"),$.state=G.ATTRIB)}continue;case G.ATTRIB_VALUE:if(z(ce))continue;O(ce)?($.q=ce,$.state=G.ATTRIB_VALUE_QUOTED):(Oe($,"Unquoted attribute value"),$.state=G.ATTRIB_VALUE_UNQUOTED,$.attribValue=ce);continue;case G.ATTRIB_VALUE_QUOTED:if(ce!==$.q){ce==="&"?$.state=G.ATTRIB_VALUE_ENTITY_Q:$.attribValue+=ce;continue}W($),$.q="",$.state=G.ATTRIB_VALUE_CLOSED;continue;case G.ATTRIB_VALUE_CLOSED:z(ce)?$.state=G.ATTRIB:ce===">"?Y($):ce==="/"?$.state=G.OPEN_TAG_SLASH:U(F,ce)?(Oe($,"No whitespace between attributes"),$.attribName=ce,$.attribValue="",$.state=G.ATTRIB_NAME):Oe($,"Invalid attribute name");continue;case G.ATTRIB_VALUE_UNQUOTED:if(!B(ce)){ce==="&"?$.state=G.ATTRIB_VALUE_ENTITY_U:$.attribValue+=ce;continue}W($),ce===">"?Y($):$.state=G.ATTRIB;continue;case G.CLOSE_TAG:if($.tagName)ce===">"?V($):U(P,ce)?$.tagName+=ce:$.script?($.script+=""?V($):Oe($,"Invalid characters in closing tag");continue;case G.TEXT_ENTITY:case G.ATTRIB_VALUE_ENTITY_Q:case G.ATTRIB_VALUE_ENTITY_U:var Xe,$e;switch($.state){case G.TEXT_ENTITY:Xe=G.TEXT,$e="textNode";break;case G.ATTRIB_VALUE_ENTITY_Q:Xe=G.ATTRIB_VALUE_QUOTED,$e="attribValue";break;case G.ATTRIB_VALUE_ENTITY_U:Xe=G.ATTRIB_VALUE_UNQUOTED,$e="attribValue";break}ce===";"?($[$e]+=Q($),$.entity="",$.state=Xe):U($.entity.length?X:A,ce)?$.entity+=ce:(Oe($,"Invalid character in entity name"),$[$e]+="&"+$.entity+ce,$.entity="",$.state=Xe);continue;default:throw new Error($,"Unknown state: "+$.state)}}return $.position>=$.bufferCheckPosition&&u($),$}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */S.default||function(){var J=String.fromCharCode,$=Math.floor,le=function(){var we=16384,Fe=[],Xe,$e,Ye=-1,Ze=arguments.length;if(!Ze)return"";for(var qe="";++Ye1114111||$(Pe)!==Pe)throw RangeError("Invalid code point: "+Pe);Pe<=65535?Fe.push(Pe):(Pe-=65536,Xe=(Pe>>10)+55296,$e=Pe%1024+56320,Fe.push(Xe,$e)),(Ye+1===Ze||Fe.length>we)&&(qe+=J.apply(null,Fe),Fe.length=0)}return qe};e.default?Object.defineProperty(String,"fromCodePoint",{value:le,configurable:!0,writable:!0}):String.fromCodePoint=le}()})(typeof I=="undefined"?(void 0).sax={}:I)}).call(this,H("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/define-property":56,"babel-runtime/core-js/object/keys":60,"babel-runtime/core-js/string/from-code-point":63,"babel-runtime/helpers/typeof":67,buffer:73,stream:230,string_decoder:72}],230:[function(H,Z,I){Z.exports=S;var N=H("events").EventEmitter,g=H("inherits");g(S,N),S.Readable=H("readable-stream/readable.js"),S.Writable=H("readable-stream/writable.js"),S.Duplex=H("readable-stream/duplex.js"),S.Transform=H("readable-stream/transform.js"),S.PassThrough=H("readable-stream/passthrough.js"),S.Stream=S;function S(){N.call(this)}S.prototype.pipe=function(k,v){var m=this;function C(n){k.writable&&(k.write(n)===!1&&m.pause&&m.pause())}m.on("data",C);function _(){m.readable&&m.resume&&m.resume()}k.on("drain",_),!k._isStdio&&(!v||v.end!==!1)&&(m.on("end",h),m.on("close",r));var e=!1;function h(){if(e)return;e=!0,k.end()}function r(){if(e)return;e=!0,typeof k.destroy=="function"&&k.destroy()}function c(n){if(i(),N.listenerCount(this,"error")===0)throw n}m.on("error",c),k.on("error",c);function i(){m.removeListener("data",C),k.removeListener("drain",_),m.removeListener("end",h),m.removeListener("close",r),m.removeListener("error",c),k.removeListener("error",c),m.removeListener("end",i),m.removeListener("close",i),k.removeListener("close",i)}return m.on("end",i),m.on("close",i),k.on("close",i),k.emit("pipe",m),k}},{events:192,inherits:196,"readable-stream/duplex.js":213,"readable-stream/passthrough.js":222,"readable-stream/readable.js":223,"readable-stream/transform.js":224,"readable-stream/writable.js":225}],231:[function(H,Z,I){(function(N){var g=H("./lib/request"),S=H("./lib/response"),k=H("xtend"),v=H("builtin-status-codes"),m=H("url"),C=I;C.request=function(_,e){typeof _=="string"?_=m.parse(_):_=k(_);var h=N.location.protocol.search(/^https?:$/)===-1?"http:":"",r=_.protocol||h,c=_.hostname||_.host,i=_.port,n=_.path||"/";c&&c.indexOf(":")!==-1&&(c="["+c+"]"),_.url=(c?r+"//"+c:"")+(i?":"+i:"")+n,_.method=(_.method||"GET").toUpperCase(),_.headers=_.headers||{};var l=new g(_);return e&&l.on("response",e),l},C.get=function(e,h){var r=C.request(e,h);return r.end(),r},C.ClientRequest=g,C.IncomingMessage=S.IncomingMessage,C.Agent=function(){},C.Agent.defaultMaxSockets=4,C.globalAgent=new C.Agent,C.STATUS_CODES=v,C.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":233,"./lib/response":234,"builtin-status-codes":74,url:238,xtend:283}],232:[function(H,Z,I){(function(N){"use strict";I.fetch=C(N.fetch)&&C(N.ReadableStream),I.writableStream=C(N.WritableStream),I.abortController=C(N.AbortController),I.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),I.blobConstructor=!0}catch(_){}var g;function S(){if(g!==void 0)return g;if(N.XMLHttpRequest){g=new N.XMLHttpRequest;try{g.open("GET",N.XDomainRequest?"/":"https://example.com")}catch(_){g=null}}else g=null;return g}function k(_){var e=S();if(!e)return!1;try{return e.responseType=_,e.responseType===_}catch(h){}return!1}var v=typeof N.ArrayBuffer!="undefined",m=v&&C(N.ArrayBuffer.prototype.slice);I.arraybuffer=I.fetch||v&&k("arraybuffer"),I.msstream=!I.fetch&&m&&k("ms-stream"),I.mozchunkedarraybuffer=!I.fetch&&v&&k("moz-chunked-arraybuffer"),I.overrideMimeType=I.fetch||(S()?C(S().overrideMimeType):!1),I.vbArray=C(N.VBArray);function C(_){return typeof _=="function"}g=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(H,Z,I){(function(N,g,S){"use strict";var k=H("babel-runtime/core-js/object/keys"),v=m(k);function m(u){return u&&u.__esModule?u:{default:u}}var C=H("./capability"),_=H("inherits"),e=H("./response"),h=H("readable-stream"),r=H("to-arraybuffer"),c=e.IncomingMessage,i=e.readyStates;function n(u,o){return C.fetch&&o?"fetch":C.mozchunkedarraybuffer?"moz-chunked-arraybuffer":C.msstream?"ms-stream":C.arraybuffer&&u?"arraybuffer":C.vbArray&&u?"text:vbarray":"text"}var l=Z.exports=function(u){var o=this;h.Writable.call(o),o._opts=u,o._body=[],o._headers={},u.auth&&o.setHeader("Authorization","Basic "+new S(u.auth).toString("base64")),(0,v.default)(u.headers).forEach(function(b){o.setHeader(b,u.headers[b])});var s,E=!0;if(u.mode==="disable-fetch"||"requestTimeout"in u&&!C.abortController)E=!1,s=!0;else if(u.mode==="prefer-streaming")s=!1;else if(u.mode==="allow-wrong-content-type")s=!C.overrideMimeType;else if(!u.mode||u.mode==="default"||u.mode==="prefer-fast")s=!0;else throw new Error("Invalid value for opts.mode");o._mode=n(s,E),o._fetchTimer=null,o.on("finish",function(){o._onFinish()})};_(l,h.Writable),l.prototype.setHeader=function(u,o){var s=this,E=u.toLowerCase();if(d.indexOf(E)!==-1)return;s._headers[E]={name:u,value:o}},l.prototype.getHeader=function(u){var o=this._headers[u.toLowerCase()];return o?o.value:null},l.prototype.removeHeader=function(u){var o=this;delete o._headers[u.toLowerCase()]},l.prototype._onFinish=function(){var u=this;if(u._destroyed)return;var o=u._opts,s=u._headers,E=null;o.method!=="GET"&&o.method!=="HEAD"&&(C.arraybuffer?E=r(S.concat(u._body)):C.blobConstructor?E=new g.Blob(u._body.map(function(x){return r(x)}),{type:(s["content-type"]||{}).value||""}):E=S.concat(u._body).toString());var b=[];if((0,v.default)(s).forEach(function(x){var w=s[x].name,T=s[x].value;Array.isArray(T)?T.forEach(function(F){b.push([w,F])}):b.push([w,T])}),u._mode==="fetch"){var p=null,D=null;if(C.abortController){var R=new AbortController;p=R.signal,u._fetchAbortController=R,"requestTimeout"in o&&o.requestTimeout!==0&&(u._fetchTimer=g.setTimeout(function(){u.emit("requestTimeout"),u._fetchAbortController&&u._fetchAbortController.abort()},o.requestTimeout))}g.fetch(u._opts.url,{method:u._opts.method,headers:b,body:E||void 0,mode:"cors",credentials:o.withCredentials?"include":"same-origin",signal:p}).then(function(x){u._fetchResponse=x,u._connect()},function(x){g.clearTimeout(u._fetchTimer),u._destroyed||u.emit("error",x)})}else{var y=u._xhr=new g.XMLHttpRequest;try{y.open(u._opts.method,u._opts.url,!0)}catch(x){N.nextTick(function(){u.emit("error",x)});return}"responseType"in y&&(y.responseType=u._mode.split(":")[0]),"withCredentials"in y&&(y.withCredentials=!!o.withCredentials),u._mode==="text"&&"overrideMimeType"in y&&y.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in o&&(y.timeout=o.requestTimeout,y.ontimeout=function(){u.emit("requestTimeout")}),b.forEach(function(x){y.setRequestHeader(x[0],x[1])}),u._response=null,y.onreadystatechange=function(){switch(y.readyState){case i.LOADING:case i.DONE:u._onXHRProgress();break}},u._mode==="moz-chunked-arraybuffer"&&(y.onprogress=function(){u._onXHRProgress()}),y.onerror=function(){if(u._destroyed)return;u.emit("error",new Error("XHR error"))};try{y.send(E)}catch(x){N.nextTick(function(){u.emit("error",x)});return}}};function f(u){try{var o=u.status;return o!==null&&o!==0}catch(s){return!1}}l.prototype._onXHRProgress=function(){var u=this;if(!f(u._xhr)||u._destroyed)return;u._response||u._connect(),u._response._onXHRProgress()},l.prototype._connect=function(){var u=this;if(u._destroyed)return;u._response=new c(u._xhr,u._fetchResponse,u._mode,u._fetchTimer),u._response.on("error",function(o){u.emit("error",o)}),u.emit("response",u._response)},l.prototype._write=function(u,o,s){var E=this;E._body.push(u),s()},l.prototype.abort=l.prototype.destroy=function(){var u=this;u._destroyed=!0,g.clearTimeout(u._fetchTimer),u._response&&(u._response._destroyed=!0),u._xhr?u._xhr.abort():u._fetchAbortController&&u._fetchAbortController.abort()},l.prototype.end=function(u,o,s){var E=this;typeof u=="function"&&(s=u,u=void 0),h.Writable.prototype.end.call(E,u,o,s)},l.prototype.flushHeaders=function(){},l.prototype.setTimeout=function(){},l.prototype.setNoDelay=function(){},l.prototype.setSocketKeepAlive=function(){};var d=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this,H("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},H("buffer").Buffer)},{"./capability":232,"./response":234,_process:208,"babel-runtime/core-js/object/keys":60,buffer:73,inherits:196,"readable-stream":223,"to-arraybuffer":237}],234:[function(H,Z,I){(function(N,g,S){"use strict";var k=H("babel-runtime/core-js/promise"),v=m(k);function m(c){return c&&c.__esModule?c:{default:c}}var C=H("./capability"),_=H("inherits"),e=H("readable-stream"),h=I.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},r=I.IncomingMessage=function(c,i,n,l){var f=this;if(e.Readable.call(f),f._mode=n,f.headers={},f.rawHeaders=[],f.trailers={},f.rawTrailers=[],f.on("end",function(){N.nextTick(function(){f.emit("close")})}),n==="fetch"){var d=function p(){o.read().then(function(D){if(f._destroyed)return;if(D.done){g.clearTimeout(l),f.push(null);return}f.push(new S(D.value)),p()}).catch(function(D){g.clearTimeout(l),f._destroyed||f.emit("error",D)})};if(f._fetchResponse=i,f.url=i.url,f.statusCode=i.status,f.statusMessage=i.statusText,i.headers.forEach(function(p,D){f.headers[D.toLowerCase()]=p,f.rawHeaders.push(D,p)}),C.writableStream){var u=new WritableStream({write:function(D){return new v.default(function(R,y){f._destroyed?y():f.push(new S(D))?R():f._resumeFetch=R})},close:function(){g.clearTimeout(l),f._destroyed||f.push(null)},abort:function(D){f._destroyed||f.emit("error",D)}});try{i.body.pipeTo(u).catch(function(p){g.clearTimeout(l),f._destroyed||f.emit("error",p)});return}catch(p){}}var o=i.body.getReader();d()}else{f._xhr=c,f._pos=0,f.url=c.responseURL,f.statusCode=c.status,f.statusMessage=c.statusText;var s=c.getAllResponseHeaders().split(/\r?\n/);if(s.forEach(function(p){var D=p.match(/^([^:]+):\s*(.*)/);if(D){var R=D[1].toLowerCase();R==="set-cookie"?(f.headers[R]===void 0&&(f.headers[R]=[]),f.headers[R].push(D[2])):f.headers[R]!==void 0?f.headers[R]+=", "+D[2]:f.headers[R]=D[2],f.rawHeaders.push(D[1],D[2])}}),f._charset="x-user-defined",!C.overrideMimeType){var E=f.rawHeaders["mime-type"];if(E){var b=E.match(/;\s*charset=([^;])(;|$)/);b&&(f._charset=b[1].toLowerCase())}f._charset||(f._charset="utf-8")}}};_(r,e.Readable),r.prototype._read=function(){var c=this,i=c._resumeFetch;i&&(c._resumeFetch=null,i())},r.prototype._onXHRProgress=function(){var c=this,i=c._xhr,n=null;switch(c._mode){case"text:vbarray":if(i.readyState!==h.DONE)break;try{n=new g.VBArray(i.responseBody).toArray()}catch(o){}if(n!==null){c.push(new S(n));break}case"text":try{n=i.responseText}catch(o){c._mode="text:vbarray";break}if(n.length>c._pos){var l=n.substr(c._pos);if(c._charset==="x-user-defined"){for(var f=new S(l.length),d=0;dc._pos&&(c.push(new S(new Uint8Array(u.result.slice(c._pos)))),c._pos=u.result.byteLength)},u.onload=function(){c.push(null)},u.readAsArrayBuffer(n);break}c._xhr.readyState===h.DONE&&c._mode!=="ms-stream"&&c.push(null)}}).call(this,H("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},H("buffer").Buffer)},{"./capability":232,_process:208,"babel-runtime/core-js/promise":61,buffer:73,inherits:196,"readable-stream":223}],235:[function(H,Z,I){"use strict";var N=H("safe-buffer").Buffer,g=N.isEncoding||function(u){u=""+u;switch(u&&u.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function S(u){if(!u)return"utf8";for(var o;;)switch(u){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return u;default:if(o)return;u=(""+u).toLowerCase(),o=!0}}function k(u){var o=S(u);if(typeof o!="string"&&(N.isEncoding===g||!g(u)))throw new Error("Unknown encoding: "+u);return o||u}I.StringDecoder=v;function v(u){this.encoding=k(u);var o;switch(this.encoding){case"utf16le":this.text=c,this.end=i,o=4;break;case"utf8":this.fillLast=e,o=4;break;case"base64":this.text=n,this.end=l,o=3;break;default:this.write=f,this.end=d;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=N.allocUnsafe(o)}v.prototype.write=function(u){if(u.length===0)return"";var o,s;if(this.lastNeed){if(o=this.fillLast(u),o===void 0)return"";s=this.lastNeed,this.lastNeed=0}else s=0;return s>5===6?2:u>>4===14?3:u>>3===30?4:u>>6===2?-1:-2}function C(u,o,s){var E=o.length-1;if(E=0?(b>0&&(u.lastNeed=b-1),b):--E=0?(b>0&&(u.lastNeed=b-2),b):--E=0?(b>0&&(b===2?b=0:u.lastNeed=b-3),b):0))}function _(u,o,s){if((o[0]&192)!==128)return u.lastNeed=0,"\uFFFD";if(u.lastNeed>1&&o.length>1){if((o[1]&192)!==128)return u.lastNeed=1,"\uFFFD";if(u.lastNeed>2&&o.length>2&&(o[2]&192)!==128)return u.lastNeed=2,"\uFFFD"}}function e(u){var o=this.lastTotal-this.lastNeed,s=_(this,u,o);if(s!==void 0)return s;if(this.lastNeed<=u.length)return u.copy(this.lastChar,o,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);u.copy(this.lastChar,o,0,u.length),this.lastNeed-=u.length}function h(u,o){var s=C(this,u,o);if(!this.lastNeed)return u.toString("utf8",o);this.lastTotal=s;var E=u.length-(s-this.lastNeed);return u.copy(this.lastChar,0,E),u.toString("utf8",o,E)}function r(u){var o=u&&u.length?this.write(u):"";return this.lastNeed?o+"\uFFFD":o}function c(u,o){if((u.length-o)%2===0){var s=u.toString("utf16le",o);if(s){var E=s.charCodeAt(s.length-1);if(E>=55296&&E<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=u[u.length-2],this.lastChar[1]=u[u.length-1],s.slice(0,-1)}return s}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=u[u.length-1],u.toString("utf16le",o,u.length-1)}function i(u){var o=u&&u.length?this.write(u):"";if(this.lastNeed){var s=this.lastTotal-this.lastNeed;return o+this.lastChar.toString("utf16le",0,s)}return o}function n(u,o){var s=(u.length-o)%3;return s===0?u.toString("base64",o):(this.lastNeed=3-s,this.lastTotal=3,s===1?this.lastChar[0]=u[u.length-1]:(this.lastChar[0]=u[u.length-2],this.lastChar[1]=u[u.length-1]),u.toString("base64",o,u.length-s))}function l(u){var o=u&&u.length?this.write(u):"";return this.lastNeed?o+this.lastChar.toString("base64",0,3-this.lastNeed):o}function f(u){return u.toString(this.encoding)}function d(u){return u&&u.length?this.write(u):""}},{"safe-buffer":228}],236:[function(H,Z,I){(function(N,g){var S=H("process/browser.js").nextTick,k=Function.prototype.apply,v=Array.prototype.slice,m={},C=0;I.setTimeout=function(){return new _(k.call(setTimeout,window,arguments),clearTimeout)},I.setInterval=function(){return new _(k.call(setInterval,window,arguments),clearInterval)},I.clearTimeout=I.clearInterval=function(e){e.close()};function _(e,h){this._id=e,this._clearFn=h}_.prototype.unref=_.prototype.ref=function(){},_.prototype.close=function(){this._clearFn.call(window,this._id)},I.enroll=function(e,h){clearTimeout(e._idleTimeoutId),e._idleTimeout=h},I.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},I._unrefActive=I.active=function(e){clearTimeout(e._idleTimeoutId);var h=e._idleTimeout;h>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},h))},I.setImmediate=typeof N=="function"?N:function(e){var h=C++,r=arguments.length<2?!1:v.call(arguments,1);return m[h]=!0,S(function(){m[h]&&(r?e.apply(null,r):e.call(null),I.clearImmediate(h))}),h},I.clearImmediate=typeof g=="function"?g:function(e){delete m[e]}}).call(this,H("timers").setImmediate,H("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(H,Z,I){var N=H("buffer").Buffer;Z.exports=function(g){if(g instanceof Uint8Array){if(g.byteOffset===0&&g.byteLength===g.buffer.byteLength)return g.buffer;if(typeof g.buffer.slice=="function")return g.buffer.slice(g.byteOffset,g.byteOffset+g.byteLength)}if(N.isBuffer(g)){for(var S=new Uint8Array(g.length),k=g.length,v=0;v",'"',"`"," ","\r",` `," "],_=["{","}","|","\\","^","`"].concat(C),e=["'"].concat(_),h=["%","/","?",";","#"].concat(e),r=["/","?","#"],c=255,i=/^[+a-z0-9A-Z_-]{0,63}$/,n=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,l={javascript:!0,"javascript:":!0},f={javascript:!0,"javascript:":!0},d={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},u=H("querystring");function o(p,D,R){if(p&&g.isObject(p)&&p instanceof S)return p;var y=new S;return y.parse(p,D,R),y}S.prototype.parse=function(p,D,R){if(!g.isString(p))throw new TypeError("Parameter 'url' must be a string, not "+typeof p);var y=p.indexOf("?"),x=y!==-1&&y127?_e+="x":_e+=be[fe];if(!_e.match(i)){var Oe=oe.slice(0,B),de=oe.slice(B+1),te=be.match(n);te&&(Oe.push(te[1]),de.unshift(te[2])),de.length&&(F="/"+de.join(".")+F),this.hostname=Oe.join(".");break}}}this.hostname.length>c?this.hostname="":this.hostname=this.hostname.toLowerCase(),ee||(this.hostname=N.toASCII(this.hostname));var W=this.port?":"+this.port:"",Y=this.hostname||"";this.host=Y+W,this.href+=this.host,ee&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),F[0]!=="/"&&(F="/"+F))}if(!l[X])for(var B=0,ae=e.length;B0?R.host.split("@"):!1;_e&&(R.auth=_e.shift(),R.host=R.hostname=_e.shift())}return R.search=p.search,R.query=p.query,(!g.isNull(R.pathname)||!g.isNull(R.search))&&(R.path=(R.pathname?R.pathname:"")+(R.search?R.search:"")),R.href=R.format(),R}if(!oe.length)return R.pathname=null,R.search?R.path="/"+R.search:R.path=null,R.href=R.format(),R;for(var fe=oe.slice(-1)[0],Re=(R.host||p.host||oe.length>1)&&(fe==="."||fe==="..")||fe==="",Oe=0,de=oe.length;de>=0;de--)fe=oe[de],fe==="."?oe.splice(de,1):fe===".."?(oe.splice(de,1),Oe++):Oe&&(oe.splice(de,1),Oe--);if(!G&&!ee)for(;Oe--;Oe)oe.unshift("..");G&&oe[0]!==""&&(!oe[0]||oe[0].charAt(0)!=="/")&&oe.unshift(""),Re&&oe.join("/").substr(-1)!=="/"&&oe.push("");var te=oe[0]===""||oe[0]&&oe[0].charAt(0)==="/";if(be){R.hostname=R.host=te?"":oe.length?oe.shift():"";var _e=R.host&&R.host.indexOf("@")>0?R.host.split("@"):!1;_e&&(R.auth=_e.shift(),R.host=R.hostname=_e.shift())}return G=G||R.host&&oe.length,G&&!te&&oe.unshift(""),oe.length?R.pathname=oe.join("/"):(R.pathname=null,R.path=null),(!g.isNull(R.pathname)||!g.isNull(R.search))&&(R.path=(R.pathname?R.pathname:"")+(R.search?R.search:"")),R.auth=p.auth||R.auth,R.slashes=R.slashes||p.slashes,R.href=R.format(),R},S.prototype.parseHost=function(){var p=this.host,D=v.exec(p);D&&(D=D[0],D!==":"&&(this.port=D.substr(1)),p=p.substr(0,p.length-D.length)),p&&(this.hostname=p)}},{"./util":239,punycode:209,querystring:212}],239:[function(H,Z,I){"use strict";Z.exports={isString:function(N){return typeof N=="string"},isObject:function(N){return typeof N=="object"&&N!==null},isNull:function(N){return N===null},isNullOrUndefined:function(N){return N==null}}},{}],240:[function(H,Z,I){(function(N){Z.exports=g;function g(k,v){if(S("noDeprecation"))return k;var m=!1;function C(){if(!m){if(S("throwDeprecation"))throw new Error(v);S("traceDeprecation")?console.trace(v):console.warn(v),m=!0}return k.apply(this,arguments)}return C}function S(k){try{if(!N.localStorage)return!1}catch(m){return!1}var v=N.localStorage[k];return v==null?!1:String(v).toLowerCase()==="true"}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],241:[function(H,Z,I){typeof Object.create=="function"?Z.exports=function(g,S){g.super_=S,g.prototype=Object.create(S.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}})}:Z.exports=function(g,S){g.super_=S;var k=function(){};k.prototype=S.prototype,g.prototype=new k,g.prototype.constructor=g}},{}],242:[function(H,Z,I){Z.exports=function(g){return g&&typeof g=="object"&&typeof g.copy=="function"&&typeof g.fill=="function"&&typeof g.readUInt8=="function"}},{}],243:[function(H,Z,I){(function(N,g){var S=/%[sdj%]/g;I.format=function(O){if(!E(O)){for(var B=[],U=0;U=G)return ae;switch(ae){case"%s":return String(L[U++]);case"%d":return Number(L[U++]);case"%j":try{return JSON.stringify(L[U++])}catch(be){return"[Circular]"}default:return ae}}),oe=L[U];U=3&&(U.depth=arguments[2]),arguments.length>=4&&(U.colors=arguments[3]),d(B)?U.showHidden=B:B&&I._extend(U,B),p(U.showHidden)&&(U.showHidden=!1),p(U.depth)&&(U.depth=2),p(U.colors)&&(U.colors=!1),p(U.customInspect)&&(U.customInspect=!0),U.colors&&(U.stylize=C),h(U,O,U.depth)}I.inspect=m,m.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},m.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function C(O,B){var U=m.styles[B];return U?"["+m.colors[U][0]+"m"+O+"["+m.colors[U][1]+"m":O}function _(O,B){return O}function e(O){var B={};return O.forEach(function(U,L){B[U]=!0}),B}function h(O,B,U){if(O.customInspect&&B&&w(B.inspect)&&B.inspect!==I.inspect&&!(B.constructor&&B.constructor.prototype===B)){var L=B.inspect(U,O);return E(L)||(L=h(O,L,U)),L}var G=r(O,B);if(G)return G;var ee=Object.keys(B),oe=e(ee);if(O.showHidden&&(ee=Object.getOwnPropertyNames(B)),x(B)&&(ee.indexOf("message")>=0||ee.indexOf("description")>=0))return c(B);if(ee.length===0){if(w(B)){var ae=B.name?": "+B.name:"";return O.stylize("[Function"+ae+"]","special")}if(D(B))return O.stylize(RegExp.prototype.toString.call(B),"regexp");if(y(B))return O.stylize(Date.prototype.toString.call(B),"date");if(x(B))return c(B)}var be="",_e=!1,fe=["{","}"];if(f(B)&&(_e=!0,fe=["[","]"]),w(B)){var Re=B.name?": "+B.name:"";be=" [Function"+Re+"]"}if(D(B)&&(be=" "+RegExp.prototype.toString.call(B)),y(B)&&(be=" "+Date.prototype.toUTCString.call(B)),x(B)&&(be=" "+c(B)),ee.length===0&&(!_e||B.length==0))return fe[0]+be+fe[1];if(U<0)return D(B)?O.stylize(RegExp.prototype.toString.call(B),"regexp"):O.stylize("[Object]","special");O.seen.push(B);var Oe;return _e?Oe=i(O,B,U,oe,ee):Oe=ee.map(function(de){return n(O,B,U,oe,de,_e)}),O.seen.pop(),l(Oe,be,fe)}function r(O,B){if(p(B))return O.stylize("undefined","undefined");if(E(B)){var U="'"+JSON.stringify(B).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return O.stylize(U,"string")}if(s(B))return O.stylize(""+B,"number");if(d(B))return O.stylize(""+B,"boolean");if(u(B))return O.stylize("null","null")}function c(O){return"["+Error.prototype.toString.call(O)+"]"}function i(O,B,U,L,G){for(var ee=[],oe=0,ae=B.length;oe-1&&(ee?ae=ae.split(` `).map(function(_e){return" "+_e}).join(` `).substr(2):ae=` `+ae.split(` `).map(function(_e){return" "+_e}).join(` `))):ae=O.stylize("[Circular]","special")),p(oe)){if(ee&&G.match(/^\d+$/))return ae;oe=JSON.stringify(""+G),oe.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(oe=oe.substr(1,oe.length-2),oe=O.stylize(oe,"name")):(oe=oe.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),oe=O.stylize(oe,"string"))}return oe+": "+ae}function l(O,B,U){var L=0,G=O.reduce(function(ee,oe){return L++,oe.indexOf(` `)>=0&&L++,ee+oe.replace(/\u001b\[\d\d?m/g,"").length+1},0);return G>60?U[0]+(B===""?"":B+` `)+" "+O.join(`, `)+" "+U[1]:U[0]+B+" "+O.join(", ")+" "+U[1]}function f(O){return Array.isArray(O)}I.isArray=f;function d(O){return typeof O=="boolean"}I.isBoolean=d;function u(O){return O===null}I.isNull=u;function o(O){return O==null}I.isNullOrUndefined=o;function s(O){return typeof O=="number"}I.isNumber=s;function E(O){return typeof O=="string"}I.isString=E;function b(O){return typeof O=="symbol"}I.isSymbol=b;function p(O){return O===void 0}I.isUndefined=p;function D(O){return R(O)&&F(O)==="[object RegExp]"}I.isRegExp=D;function R(O){return typeof O=="object"&&O!==null}I.isObject=R;function y(O){return R(O)&&F(O)==="[object Date]"}I.isDate=y;function x(O){return R(O)&&(F(O)==="[object Error]"||O instanceof Error)}I.isError=x;function w(O){return typeof O=="function"}I.isFunction=w;function T(O){return O===null||typeof O=="boolean"||typeof O=="number"||typeof O=="string"||typeof O=="symbol"||typeof O=="undefined"}I.isPrimitive=T,I.isBuffer=H("./support/isBuffer");function F(O){return Object.prototype.toString.call(O)}function P(O){return O<10?"0"+O.toString(10):O.toString(10)}var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function X(){var O=new Date,B=[P(O.getHours()),P(O.getMinutes()),P(O.getSeconds())].join(":");return[O.getDate(),A[O.getMonth()],B].join(" ")}I.log=function(){console.log("%s - %s",X(),I.format.apply(I,arguments))},I.inherits=H("inherits"),I._extend=function(O,B){if(!B||!R(B))return O;for(var U=Object.keys(B),L=U.length;L--;)O[U[L]]=B[U[L]];return O};function z(O,B){return Object.prototype.hasOwnProperty.call(O,B)}}).call(this,H("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":242,_process:208,inherits:241}],244:[function(H,Z,I){"use strict";(function(){"use strict";I.stripBOM=function(N){return N[0]==="\uFEFF"?N.substring(1):N}}).call(void 0)},{}],245:[function(H,Z,I){"use strict";var N=H("babel-runtime/helpers/typeof"),g=v(N),S=H("babel-runtime/core-js/object/keys"),k=v(S);function v(m){return m&&m.__esModule?m:{default:m}}(function(){"use strict";var m,C,_,e,h,r={}.hasOwnProperty;m=H("xmlbuilder"),C=H("./defaults").defaults,e=function(i){return typeof i=="string"&&(i.indexOf("&")>=0||i.indexOf(">")>=0||i.indexOf("<")>=0)},h=function(i){return""},_=function(i){return i.replace("]]>","]]]]>")},I.Builder=function(){function c(i){var n,l,f;this.options={},l=C["0.2"];for(n in l){if(!r.call(l,n))continue;f=l[n],this.options[n]=f}for(n in i){if(!r.call(i,n))continue;f=i[n],this.options[n]=f}}return c.prototype.buildObject=function(i){var n,l,f,d,u;return n=this.options.attrkey,l=this.options.charkey,(0,k.default)(i).length===1&&this.options.rootName===C["0.2"].rootName?(u=(0,k.default)(i)[0],i=i[u]):u=this.options.rootName,f=function(o){return function(s,E){var b,p,D,R,y,x;if((typeof E=="undefined"?"undefined":(0,g.default)(E))!=="object")o.options.cdata&&e(E)?s.raw(h(E)):s.txt(E);else if(Array.isArray(E))for(R in E){if(!r.call(E,R))continue;p=E[R];for(y in p)D=p[y],s=f(s.ele(y),D).up()}else for(y in E){if(!r.call(E,y))continue;if(p=E[y],y===n){if((typeof p=="undefined"?"undefined":(0,g.default)(p))==="object")for(b in p)x=p[b],s=s.att(b,x)}else if(y===l)o.options.cdata&&e(p)?s=s.raw(h(p)):s=s.txt(p);else if(Array.isArray(p))for(R in p){if(!r.call(p,R))continue;D=p[R],typeof D=="string"?o.options.cdata&&e(D)?s=s.ele(y).raw(h(D)).up():s=s.ele(y,D).up():s=f(s.ele(y),D).up()}else(typeof p=="undefined"?"undefined":(0,g.default)(p))==="object"?s=f(s.ele(y),p).up():typeof p=="string"&&o.options.cdata&&e(p)?s=s.ele(y).raw(h(p)).up():(p==null&&(p=""),s=s.ele(y,p.toString()).up())}return s}}(this),d=m.create(u,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),f(d,i).end(this.options.renderOpts)},c}()}).call(void 0)},{"./defaults":246,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,xmlbuilder:282}],246:[function(H,Z,I){"use strict";(function(){I.defaults={"0.1":{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},"0.2":{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:` `},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(void 0)},{}],247:[function(H,Z,I){"use strict";var N=H("babel-runtime/core-js/promise"),g=e(N),S=H("babel-runtime/core-js/object/get-own-property-names"),k=e(S),v=H("babel-runtime/core-js/object/keys"),m=e(v),C=H("babel-runtime/helpers/typeof"),_=e(C);function e(h){return h&&h.__esModule?h:{default:h}}(function(){"use strict";var h,r,c,i,n,l,f,d,u=function(b,p){return function(){return b.apply(p,arguments)}},o=function(b,p){for(var D in p)s.call(p,D)&&(b[D]=p[D]);function R(){this.constructor=b}return R.prototype=p.prototype,b.prototype=new R,b.__super__=p.prototype,b},s={}.hasOwnProperty;f=H("sax"),c=H("events"),h=H("./bom"),l=H("./processors"),d=H("timers").setImmediate,r=H("./defaults").defaults,i=function(b){return(typeof b=="undefined"?"undefined":(0,_.default)(b))==="object"&&b!=null&&(0,m.default)(b).length===0},n=function(b,p,D){var R,y,x;for(R=0,y=b.length;R0&&(P[x.options.childkey]=X),X=P;else if(B){B[x.options.childkey]=B[x.options.childkey]||[],z={};for(F in X){if(!s.call(X,F))continue;z[F]=X[F]}B[x.options.childkey].push(z),delete X["#name"],(0,m.default)(X).length===1&&D in X&&!x.EXPLICIT_CHARKEY&&(X=X[D])}}return y.length>0?x.assignOrPush(B,A,X):(x.options.explicitRoot&&(O=X,X={},X[A]=O),x.resultObject=X,x.saxParser.ended=!0,x.emit("end",x.resultObject))}}(this),R=function(x){return function(w){var T,F;if(F=y[y.length-1],F)return F[D]+=w,x.options.explicitChildren&&x.options.preserveChildrenOrder&&x.options.charsAsChildren&&(x.options.includeWhiteChars||w.replace(/\\n/g,"").trim()!=="")&&(F[x.options.childkey]=F[x.options.childkey]||[],T={"#name":"__text__"},T[D]=w,x.options.normalize&&(T[D]=T[D].replace(/\s{2,}/g," ").trim()),F[x.options.childkey].push(T)),F}}(this),this.saxParser.ontext=R,this.saxParser.oncdata=function(x){return function(w){var T;if(T=R(w),T)return T.cdata=!0}}(this)},b.prototype.parseString=function(p,D){var R;D!=null&&typeof D=="function"&&(this.on("end",function(y){return this.reset(),D(null,y)}),this.on("error",function(y){return this.reset(),D(y)}));try{return p=p.toString(),p.trim()===""?(this.emit("end",null),!0):(p=h.stripBOM(p),this.options.async?(this.remaining=p,d(this.processAsync),this.saxParser):this.saxParser.write(p).close())}catch(y){if(R=y,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw R}else return this.emit("error",R),this.saxParser.errThrown=!0}},b.prototype.parseStringPromise=function(p){return new g.default(function(D){return function(R,y){return D.parseString(p,function(x,w){return x?y(x):R(w)})}}(this))},b}(c),I.parseString=function(E,b,p){var D,R,y;return p!=null?(typeof p=="function"&&(D=p),(typeof b=="undefined"?"undefined":(0,_.default)(b))==="object"&&(R=b)):(typeof b=="function"&&(D=b),R={}),y=new I.Parser(R),y.parseString(E,D)},I.parseStringPromise=function(E,b){var p,D;return(typeof b=="undefined"?"undefined":(0,_.default)(b))==="object"&&(p=b),D=new I.Parser(p),D.parseStringPromise(E)}}).call(void 0)},{"./bom":244,"./defaults":246,"./processors":248,"babel-runtime/core-js/object/get-own-property-names":58,"babel-runtime/core-js/object/keys":60,"babel-runtime/core-js/promise":61,"babel-runtime/helpers/typeof":67,events:192,sax:229,timers:236}],248:[function(H,Z,I){"use strict";(function(){"use strict";var N;N=new RegExp(/(?!xmlns)^.*:/),I.normalize=function(g){return g.toLowerCase()},I.firstCharLowerCase=function(g){return g.charAt(0).toLowerCase()+g.slice(1)},I.stripPrefix=function(g){return g.replace(N,"")},I.parseNumbers=function(g){return isNaN(g)||(g=g%1===0?parseInt(g,10):parseFloat(g)),g},I.parseBooleans=function(g){return/^(?:true|false)$/i.test(g)&&(g=g.toLowerCase()==="true"),g}}).call(void 0)},{}],249:[function(H,Z,I){"use strict";(function(){"use strict";var N,g,S,k,v=function(_,e){for(var h in e)m.call(e,h)&&(_[h]=e[h]);function r(){this.constructor=_}return r.prototype=e.prototype,_.prototype=new r,_.__super__=e.prototype,_},m={}.hasOwnProperty;g=H("./defaults"),N=H("./builder"),S=H("./parser"),k=H("./processors"),I.defaults=g.defaults,I.processors=k,I.ValidationError=function(C){v(_,C);function _(e){this.message=e}return _}(Error),I.Builder=N.Builder,I.Parser=S.Parser,I.parseString=S.parseString,I.parseStringPromise=S.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(H,Z,I){"use strict";(function(){Z.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(H,Z,I){"use strict";(function(){Z.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(void 0)},{}],252:[function(H,Z,I){"use strict";var N=H("babel-runtime/core-js/object/get-prototype-of"),g=C(N),S=H("babel-runtime/helpers/typeof"),k=C(S),v=H("babel-runtime/core-js/object/assign"),m=C(v);function C(_){return _&&_.__esModule?_:{default:_}}(function(){var _,e,h,r,c,i,n,l=[].slice,f={}.hasOwnProperty;_=function(){var u,o,s,E,b,p;if(p=arguments[0],b=2<=arguments.length?l.call(arguments,1):[],c(m.default))m.default.apply(null,arguments);else for(u=0,s=b.length;u":"attribute: {"+_+"}, parent: <"+this.parent.name+">"},C.prototype.isEqualNode=function(_){return _.namespaceURI!==this.namespaceURI||(_.prefix!==this.prefix||_.localName!==this.localName)?!1:!(_.value!==this.value)},C}()}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],255:[function(H,Z,I){"use strict";var N=H("babel-runtime/core-js/object/create"),g=S(N);function S(k){return k&&k.__esModule?k:{default:k}}(function(){var k,v,m,C=function(h,r){for(var c in r)_.call(r,c)&&(h[c]=r[c]);function i(){this.constructor=h}return i.prototype=r.prototype,h.prototype=new i,h.__super__=r.prototype,h},_={}.hasOwnProperty;k=H("./NodeType"),m=H("./XMLCharacterData"),Z.exports=v=function(e){C(h,e);function h(r,c){if(h.__super__.constructor.call(this,r),c==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=k.CData,this.value=this.stringify.cdata(c)}return h.prototype.clone=function(){return(0,g.default)(this)},h.prototype.toString=function(r){return this.options.writer.cdata(this,this.options.writer.filterOptions(r))},h}(m)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(H,Z,I){"use strict";var N=H("babel-runtime/core-js/object/create"),g=S(N);function S(k){return k&&k.__esModule?k:{default:k}}(function(){var k,v,m=function(e,h){for(var r in h)C.call(h,r)&&(e[r]=h[r]);function c(){this.constructor=e}return c.prototype=h.prototype,e.prototype=new c,e.__super__=h.prototype,e},C={}.hasOwnProperty;v=H("./XMLNode"),Z.exports=k=function(_){m(e,_);function e(h){e.__super__.constructor.call(this,h),this.value=""}return Object.defineProperty(e.prototype,"data",{get:function(){return this.value},set:function(r){return this.value=r||""}}),Object.defineProperty(e.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(e.prototype,"textContent",{get:function(){return this.value},set:function(r){return this.value=r||""}}),e.prototype.clone=function(){return(0,g.default)(this)},e.prototype.substringData=function(h,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.appendData=function(h){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.insertData=function(h,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.deleteData=function(h,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.replaceData=function(h,r,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.isEqualNode=function(h){return e.__super__.isEqualNode.apply(this,arguments).isEqualNode(h)?!(h.data!==this.data):!1},e}(v)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(H,Z,I){"use strict";var N=H("babel-runtime/core-js/object/create"),g=S(N);function S(k){return k&&k.__esModule?k:{default:k}}(function(){var k,v,m,C=function(h,r){for(var c in r)_.call(r,c)&&(h[c]=r[c]);function i(){this.constructor=h}return i.prototype=r.prototype,h.prototype=new i,h.__super__=r.prototype,h},_={}.hasOwnProperty;k=H("./NodeType"),v=H("./XMLCharacterData"),Z.exports=m=function(e){C(h,e);function h(r,c){if(h.__super__.constructor.call(this,r),c==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=k.Comment,this.value=this.stringify.comment(c)}return h.prototype.clone=function(){return(0,g.default)(this)},h.prototype.toString=function(r){return this.options.writer.comment(this,this.options.writer.filterOptions(r))},h}(v)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(H,Z,I){"use strict";var N=H("babel-runtime/core-js/object/keys"),g=v(N),S=H("babel-runtime/core-js/object/create"),k=v(S);function v(m){return m&&m.__esModule?m:{default:m}}(function(){var m,C,_;C=H("./XMLDOMErrorHandler"),_=H("./XMLDOMStringList"),Z.exports=m=function(){function e(){var h;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new C,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=h=(0,k.default)(this.defaultParams)}return Object.defineProperty(e.prototype,"parameterNames",{get:function(){return new _((0,g.default)(this.defaultParams))}}),e.prototype.getParameter=function(h){return this.params.hasOwnProperty(h)?this.params[h]:null},e.prototype.canSetParameter=function(h,r){return!0},e.prototype.setParameter=function(h,r){return r!=null?this.params[h]=r:delete this.params[h]},e}()}).call(void 0)},{"./XMLDOMErrorHandler":259,"./XMLDOMStringList":261,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60}],259:[function(H,Z,I){"use strict";(function(){var N;Z.exports=N=function(){function g(){}return g.prototype.handleError=function(S){throw new Error(S)},g}()}).call(void 0)},{}],260:[function(H,Z,I){"use strict";(function(){var N;Z.exports=N=function(){function g(){}return g.prototype.hasFeature=function(S,k){return!0},g.prototype.createDocumentType=function(S,k,v){throw new Error("This DOM method is not implemented.")},g.prototype.createDocument=function(S,k,v){throw new Error("This DOM method is not implemented.")},g.prototype.createHTMLDocument=function(S){throw new Error("This DOM method is not implemented.")},g.prototype.getFeature=function(S,k){throw new Error("This DOM method is not implemented.")},g}()}).call(void 0)},{}],261:[function(H,Z,I){"use strict";(function(){var N;Z.exports=N=function(){function g(S){this.arr=S||[]}return Object.defineProperty(g.prototype,"length",{get:function(){return this.arr.length}}),g.prototype.item=function(S){return this.arr[S]||null},g.prototype.contains=function(S){return this.arr.indexOf(S)!==-1},g}()}).call(void 0)},{}],262:[function(H,Z,I){"use strict";(function(){var N,g,S,k=function(C,_){for(var e in _)v.call(_,e)&&(C[e]=_[e]);function h(){this.constructor=C}return h.prototype=_.prototype,C.prototype=new h,C.__super__=_.prototype,C},v={}.hasOwnProperty;S=H("./XMLNode"),N=H("./NodeType"),Z.exports=g=function(m){k(C,m);function C(_,e,h,r,c,i){if(C.__super__.constructor.call(this,_),e==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(h==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(e));if(!r)throw new Error("Missing DTD attribute type. "+this.debugInfo(e));if(!c)throw new Error("Missing DTD attribute default. "+this.debugInfo(e));if(c.indexOf("#")!==0&&(c="#"+c),!c.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(e));if(i&&!c.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(e));this.elementName=this.stringify.name(e),this.type=N.AttributeDeclaration,this.attributeName=this.stringify.name(h),this.attributeType=this.stringify.dtdAttType(r),i&&(this.defaultValue=this.stringify.dtdAttDefault(i)),this.defaultValueType=c}return C.prototype.toString=function(_){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(_))},C}(S)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(H,Z,I){"use strict";(function(){var N,g,S,k=function(C,_){for(var e in _)v.call(_,e)&&(C[e]=_[e]);function h(){this.constructor=C}return h.prototype=_.prototype,C.prototype=new h,C.__super__=_.prototype,C},v={}.hasOwnProperty;S=H("./XMLNode"),N=H("./NodeType"),Z.exports=g=function(m){k(C,m);function C(_,e,h){if(C.__super__.constructor.call(this,_),e==null)throw new Error("Missing DTD element name. "+this.debugInfo());h||(h="(#PCDATA)"),Array.isArray(h)&&(h="("+h.join(",")+")"),this.name=this.stringify.name(e),this.type=N.ElementDeclaration,this.value=this.stringify.dtdElementValue(h)}return C.prototype.toString=function(_){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(_))},C}(S)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(H,Z,I){"use strict";(function(){var N,g,S,k,v=function(_,e){for(var h in e)m.call(e,h)&&(_[h]=e[h]);function r(){this.constructor=_}return r.prototype=e.prototype,_.prototype=new r,_.__super__=e.prototype,_},m={}.hasOwnProperty;k=H("./Utility").isObject,S=H("./XMLNode"),N=H("./NodeType"),Z.exports=g=function(C){v(_,C);function _(e,h,r,c){if(_.__super__.constructor.call(this,e),r==null)throw new Error("Missing DTD entity name. "+this.debugInfo(r));if(c==null)throw new Error("Missing DTD entity value. "+this.debugInfo(r));if(this.pe=!!h,this.name=this.stringify.name(r),this.type=N.EntityDeclaration,!k(c))this.value=this.stringify.dtdEntityValue(c),this.internal=!0;else{if(!c.pubID&&!c.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(r));if(c.pubID&&!c.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(r));if(this.internal=!1,c.pubID!=null&&(this.pubID=this.stringify.dtdPubID(c.pubID)),c.sysID!=null&&(this.sysID=this.stringify.dtdSysID(c.sysID)),c.nData!=null&&(this.nData=this.stringify.dtdNData(c.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(r))}}return Object.defineProperty(_.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(_.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(_.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(_.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(_.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(_.prototype,"xmlVersion",{get:function(){return null}}),_.prototype.toString=function(e){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(e))},_}(S)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(H,Z,I){"use strict";(function(){var N,g,S,k=function(C,_){for(var e in _)v.call(_,e)&&(C[e]=_[e]);function h(){this.constructor=C}return h.prototype=_.prototype,C.prototype=new h,C.__super__=_.prototype,C},v={}.hasOwnProperty;S=H("./XMLNode"),N=H("./NodeType"),Z.exports=g=function(m){k(C,m);function C(_,e,h){if(C.__super__.constructor.call(this,_),e==null)throw new Error("Missing DTD notation name. "+this.debugInfo(e));if(!h.pubID&&!h.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(e));this.name=this.stringify.name(e),this.type=N.NotationDeclaration,h.pubID!=null&&(this.pubID=this.stringify.dtdPubID(h.pubID)),h.sysID!=null&&(this.sysID=this.stringify.dtdSysID(h.sysID))}return Object.defineProperty(C.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(C.prototype,"systemId",{get:function(){return this.sysID}}),C.prototype.toString=function(_){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(_))},C}(S)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(H,Z,I){"use strict";(function(){var N,g,S,k,v=function(_,e){for(var h in e)m.call(e,h)&&(_[h]=e[h]);function r(){this.constructor=_}return r.prototype=e.prototype,_.prototype=new r,_.__super__=e.prototype,_},m={}.hasOwnProperty;k=H("./Utility").isObject,S=H("./XMLNode"),N=H("./NodeType"),Z.exports=g=function(C){v(_,C);function _(e,h,r,c){var i;_.__super__.constructor.call(this,e),k(h)&&(i=h,h=i.version,r=i.encoding,c=i.standalone),h||(h="1.0"),this.type=N.Declaration,this.version=this.stringify.xmlVersion(h),r!=null&&(this.encoding=this.stringify.xmlEncoding(r)),c!=null&&(this.standalone=this.stringify.xmlStandalone(c))}return _.prototype.toString=function(e){return this.options.writer.declaration(this,this.options.writer.filterOptions(e))},_}(S)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(H,Z,I){"use strict";(function(){var N,g,S,k,v,m,C,_,e,h=function(i,n){for(var l in n)r.call(n,l)&&(i[l]=n[l]);function f(){this.constructor=i}return f.prototype=n.prototype,i.prototype=new f,i.__super__=n.prototype,i},r={}.hasOwnProperty;e=H("./Utility").isObject,_=H("./XMLNode"),N=H("./NodeType"),g=H("./XMLDTDAttList"),k=H("./XMLDTDEntity"),S=H("./XMLDTDElement"),v=H("./XMLDTDNotation"),C=H("./XMLNamedNodeMap"),Z.exports=m=function(c){h(i,c);function i(n,l,f){var d,u,o,s,E,b;if(i.__super__.constructor.call(this,n),this.type=N.DocType,n.children){for(s=n.children,u=0,o=s.length;u=0;)this.up();return this.onEnd()},y.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},y.prototype.openNode=function(x){var w,T,F,P;if(!x.isOpen){if(!this.root&&this.currentLevel===0&&x.type===N.Element&&(this.root=x),T="",x.type===N.Element){this.writerOptions.state=g.OpenTag,T=this.writer.indent(x,this.writerOptions,this.currentLevel)+"<"+x.name,P=x.attribs;for(F in P){if(!R.call(P,F))continue;w=P[F],T+=this.writer.attribute(w,this.writerOptions,this.currentLevel)}T+=(x.children?">":"/>")+this.writer.endline(x,this.writerOptions,this.currentLevel),this.writerOptions.state=g.InsideTag}else this.writerOptions.state=g.OpenTag,T=this.writer.indent(x,this.writerOptions,this.currentLevel)+""),T+=this.writer.endline(x,this.writerOptions,this.currentLevel);return this.onData(T,this.currentLevel),x.isOpen=!0}},y.prototype.closeNode=function(x){var w;if(!x.isClosed)return w="",this.writerOptions.state=g.CloseTag,x.type===N.Element?w=this.writer.indent(x,this.writerOptions,this.currentLevel)+""+this.writer.endline(x,this.writerOptions,this.currentLevel):w=this.writer.indent(x,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(x,this.writerOptions,this.currentLevel),this.writerOptions.state=g.None,this.onData(w,this.currentLevel),x.isClosed=!0},y.prototype.onData=function(x,w){return this.documentStarted=!0,this.onDataCallback(x,w+1)},y.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},y.prototype.debugInfo=function(x){return x==null?"":"node: <"+x+">"},y.prototype.ele=function(){return this.element.apply(this,arguments)},y.prototype.nod=function(x,w,T){return this.node(x,w,T)},y.prototype.txt=function(x){return this.text(x)},y.prototype.dat=function(x){return this.cdata(x)},y.prototype.com=function(x){return this.comment(x)},y.prototype.ins=function(x,w){return this.instruction(x,w)},y.prototype.dec=function(x,w,T){return this.declaration(x,w,T)},y.prototype.dtd=function(x,w,T){return this.doctype(x,w,T)},y.prototype.e=function(x,w,T){return this.element(x,w,T)},y.prototype.n=function(x,w,T){return this.node(x,w,T)},y.prototype.t=function(x){return this.text(x)},y.prototype.d=function(x){return this.cdata(x)},y.prototype.c=function(x){return this.comment(x)},y.prototype.r=function(x){return this.raw(x)},y.prototype.i=function(x,w){return this.instruction(x,w)},y.prototype.att=function(){return this.currentNode&&this.currentNode.type===N.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},y.prototype.a=function(){return this.currentNode&&this.currentNode.type===N.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},y.prototype.ent=function(x,w){return this.entity(x,w)},y.prototype.pent=function(x,w){return this.pEntity(x,w)},y.prototype.not=function(x,w){return this.notation(x,w)},y}()}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLAttribute":254,"./XMLCData":255,"./XMLComment":257,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDocument":268,"./XMLElement":271,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLStringWriter":278,"./XMLStringifier":279,"./XMLText":280}],270:[function(H,Z,I){"use strict";var N=H("babel-runtime/core-js/object/create"),g=S(N);function S(k){return k&&k.__esModule?k:{default:k}}(function(){var k,v,m,C=function(h,r){for(var c in r)_.call(r,c)&&(h[c]=r[c]);function i(){this.constructor=h}return i.prototype=r.prototype,h.prototype=new i,h.__super__=r.prototype,h},_={}.hasOwnProperty;m=H("./XMLNode"),k=H("./NodeType"),Z.exports=v=function(e){C(h,e);function h(r){h.__super__.constructor.call(this,r),this.type=k.Dummy}return h.prototype.clone=function(){return(0,g.default)(this)},h.prototype.toString=function(r){return""},h}(m)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(H,Z,I){"use strict";var N=H("babel-runtime/core-js/object/create"),g=S(N);function S(k){return k&&k.__esModule?k:{default:k}}(function(){var k,v,m,C,_,e,h,r,c,i=function(f,d){for(var u in d)n.call(d,u)&&(f[u]=d[u]);function o(){this.constructor=f}return o.prototype=d.prototype,f.prototype=new o,f.__super__=d.prototype,f},n={}.hasOwnProperty;c=H("./Utility"),r=c.isObject,h=c.isFunction,e=c.getValue,_=H("./XMLNode"),k=H("./NodeType"),v=H("./XMLAttribute"),C=H("./XMLNamedNodeMap"),Z.exports=m=function(l){i(f,l);function f(d,u,o){var s,E,b,p;if(f.__super__.constructor.call(this,d),u==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(u),this.type=k.Element,this.attribs={},this.schemaTypeInfo=null,o!=null&&this.attribute(o),d.type===k.Document&&(this.isRoot=!0,this.documentObject=d,d.rootObject=this,d.children)){for(p=d.children,E=0,b=p.length;E=s;u=0<=s?++o:--o)if(!this.attribs[u].isEqualNode(d.attribs[u]))return!1;return!0},f}(_)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(H,Z,I){"use strict";var N=H("babel-runtime/core-js/object/keys"),g=S(N);function S(k){return k&&k.__esModule?k:{default:k}}(function(){var k;Z.exports=k=function(){function v(m){this.nodes=m}return Object.defineProperty(v.prototype,"length",{get:function(){return(0,g.default)(this.nodes).length||0}}),v.prototype.clone=function(){return this.nodes=null},v.prototype.getNamedItem=function(m){return this.nodes[m]},v.prototype.setNamedItem=function(m){var C;return C=this.nodes[m.nodeName],this.nodes[m.nodeName]=m,C||null},v.prototype.removeNamedItem=function(m){var C;return C=this.nodes[m],delete this.nodes[m],C||null},v.prototype.item=function(m){return this.nodes[(0,g.default)(this.nodes)[m]]||null},v.prototype.getNamedItemNS=function(m,C){throw new Error("This DOM method is not implemented.")},v.prototype.setNamedItemNS=function(m){throw new Error("This DOM method is not implemented.")},v.prototype.removeNamedItemNS=function(m,C){throw new Error("This DOM method is not implemented.")},v}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(H,Z,I){"use strict";(function(){var N,g,S,k,v,m,C,_,e,h,r,c,i,n,l,f,d,u,o,s={}.hasOwnProperty;o=H("./Utility"),u=o.isObject,d=o.isFunction,f=o.isEmpty,l=o.getValue,_=null,S=null,k=null,v=null,m=null,i=null,n=null,c=null,C=null,g=null,r=null,e=null,N=null,Z.exports=h=function(){function E(b){this.parent=b,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,_||(_=H("./XMLElement"),S=H("./XMLCData"),k=H("./XMLComment"),v=H("./XMLDeclaration"),m=H("./XMLDocType"),i=H("./XMLRaw"),n=H("./XMLText"),c=H("./XMLProcessingInstruction"),C=H("./XMLDummy"),g=H("./NodeType"),r=H("./XMLNodeList"),e=H("./XMLNamedNodeMap"),N=H("./DocumentPosition"))}return Object.defineProperty(E.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(E.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(E.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(E.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(E.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new r(this.children)),this.childNodeList}}),Object.defineProperty(E.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(E.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(E.prototype,"previousSibling",{get:function(){var p;return p=this.parent.children.indexOf(this),this.parent.children[p-1]||null}}),Object.defineProperty(E.prototype,"nextSibling",{get:function(){var p;return p=this.parent.children.indexOf(this),this.parent.children[p+1]||null}}),Object.defineProperty(E.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(E.prototype,"textContent",{get:function(){var p,D,R,y,x;if(this.nodeType===g.Element||this.nodeType===g.DocumentFragment){for(x="",y=this.children,D=0,R=y.length;D":((D=this.parent)!=null?D.name:void 0)?"node: <"+b+">, parent: <"+this.parent.name+">":"node: <"+b+">"},E.prototype.ele=function(b,p,D){return this.element(b,p,D)},E.prototype.nod=function(b,p,D){return this.node(b,p,D)},E.prototype.txt=function(b){return this.text(b)},E.prototype.dat=function(b){return this.cdata(b)},E.prototype.com=function(b){return this.comment(b)},E.prototype.ins=function(b,p){return this.instruction(b,p)},E.prototype.doc=function(){return this.document()},E.prototype.dec=function(b,p,D){return this.declaration(b,p,D)},E.prototype.e=function(b,p,D){return this.element(b,p,D)},E.prototype.n=function(b,p,D){return this.node(b,p,D)},E.prototype.t=function(b){return this.text(b)},E.prototype.d=function(b){return this.cdata(b)},E.prototype.c=function(b){return this.comment(b)},E.prototype.r=function(b){return this.raw(b)},E.prototype.i=function(b,p){return this.instruction(b,p)},E.prototype.u=function(){return this.up()},E.prototype.importXMLBuilder=function(b){return this.importDocument(b)},E.prototype.replaceChild=function(b,p){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.removeChild=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.appendChild=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.hasChildNodes=function(){return this.children.length!==0},E.prototype.cloneNode=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.isSupported=function(b,p){return!0},E.prototype.hasAttributes=function(){return this.attribs.length!==0},E.prototype.compareDocumentPosition=function(b){var p,D;return p=this,p===b?0:this.document()!==b.document()?(D=N.Disconnected|N.ImplementationSpecific,Math.random()<.5?D|=N.Preceding:D|=N.Following,D):p.isAncestor(b)?N.Contains|N.Preceding:p.isDescendant(b)?N.Contains|N.Following:p.isPreceding(b)?N.Preceding:N.Following},E.prototype.isSameNode=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.lookupPrefix=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.isDefaultNamespace=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.lookupNamespaceURI=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.isEqualNode=function(b){var p,D,R;if(b.nodeType!==this.nodeType)return!1;if(b.children.length!==this.children.length)return!1;for(p=D=0,R=this.children.length-1;0<=R?D<=R:D>=R;p=0<=R?++D:--D)if(!this.children[p].isEqualNode(b.children[p]))return!1;return!0},E.prototype.getFeature=function(b,p){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.setUserData=function(b,p,D){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getUserData=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.contains=function(b){return b?b===this||this.isDescendant(b):!1},E.prototype.isDescendant=function(b){var p,D,R,y,x;for(x=this.children,R=0,y=x.length;RD},E.prototype.treePosition=function(b){var p,D;return D=0,p=!1,this.foreachTreeNode(this.document(),function(R){if(D++,!p&&R===b)return p=!0}),p?D:-1},E.prototype.foreachTreeNode=function(b,p){var D,R,y,x,w;for(b||(b=this.document()),x=b.children,R=0,y=x.length;R0){for(this.stream.write(" ["),this.stream.write(this.endline(e,h,r)),h.state=g.InsideTag,l=e.children,i=0,n=l.length;i"),this.stream.write(this.endline(e,h,r)),h.state=g.None,this.closeNode(e,h,r)},_.prototype.element=function(e,h,r){var c,i,n,l,f,d,u,o,s,E;r||(r=0),this.openNode(e,h,r),h.state=g.OpenTag,this.stream.write(this.indent(e,h,r)+"<"+e.name),s=e.attribs;for(u in s){if(!m.call(s,u))continue;c=s[u],this.attribute(c,h,r)}if(n=e.children.length,l=n===0?null:e.children[0],n===0||e.children.every(function(b){return(b.type===N.Text||b.type===N.Raw)&&b.value===""}))h.allowEmpty?(this.stream.write(">"),h.state=g.CloseTag,this.stream.write("")):(h.state=g.CloseTag,this.stream.write(h.spaceBeforeSlash+"/>"));else if(h.pretty&&n===1&&(l.type===N.Text||l.type===N.Raw)&&l.value!=null)this.stream.write(">"),h.state=g.InsideTag,h.suppressPrettyCount++,o=!0,this.writeChildNode(l,h,r+1),h.suppressPrettyCount--,o=!1,h.state=g.CloseTag,this.stream.write("");else{for(this.stream.write(">"+this.endline(e,h,r)),h.state=g.InsideTag,E=e.children,f=0,d=E.length;f")}return this.stream.write(this.endline(e,h,r)),h.state=g.None,this.closeNode(e,h,r)},_.prototype.processingInstruction=function(e,h,r){return this.stream.write(_.__super__.processingInstruction.call(this,e,h,r))},_.prototype.raw=function(e,h,r){return this.stream.write(_.__super__.raw.call(this,e,h,r))},_.prototype.text=function(e,h,r){return this.stream.write(_.__super__.text.call(this,e,h,r))},_.prototype.dtdAttList=function(e,h,r){return this.stream.write(_.__super__.dtdAttList.call(this,e,h,r))},_.prototype.dtdElement=function(e,h,r){return this.stream.write(_.__super__.dtdElement.call(this,e,h,r))},_.prototype.dtdEntity=function(e,h,r){return this.stream.write(_.__super__.dtdEntity.call(this,e,h,r))},_.prototype.dtdNotation=function(e,h,r){return this.stream.write(_.__super__.dtdNotation.call(this,e,h,r))},_}(k)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(H,Z,I){"use strict";(function(){var N,g,S=function(m,C){for(var _ in C)k.call(C,_)&&(m[_]=C[_]);function e(){this.constructor=m}return e.prototype=C.prototype,m.prototype=new e,m.__super__=C.prototype,m},k={}.hasOwnProperty;g=H("./XMLWriterBase"),Z.exports=N=function(v){S(m,v);function m(C){m.__super__.constructor.call(this,C)}return m.prototype.document=function(C,_){var e,h,r,c,i;for(_=this.filterOptions(_),c="",i=C.children,h=0,r=i.length;h","]]]]>"),this.assertLegalChar(v))},k.prototype.comment=function(v){if(this.options.noValidation)return v;if(v=""+v||"",v.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+v);return this.assertLegalChar(v)},k.prototype.raw=function(v){return this.options.noValidation?v:""+v||""},k.prototype.attValue=function(v){return this.options.noValidation?v:this.assertLegalChar(this.attEscape(v=""+v||""))},k.prototype.insTarget=function(v){return this.options.noValidation?v:this.assertLegalChar(""+v||"")},k.prototype.insValue=function(v){if(this.options.noValidation)return v;if(v=""+v||"",v.match(/\?>/))throw new Error("Invalid processing instruction value: "+v);return this.assertLegalChar(v)},k.prototype.xmlVersion=function(v){if(this.options.noValidation)return v;if(v=""+v||"",!v.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+v);return v},k.prototype.xmlEncoding=function(v){if(this.options.noValidation)return v;if(v=""+v||"",!v.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+v);return this.assertLegalChar(v)},k.prototype.xmlStandalone=function(v){return this.options.noValidation?v:v?"yes":"no"},k.prototype.dtdPubID=function(v){return this.options.noValidation?v:this.assertLegalChar(""+v||"")},k.prototype.dtdSysID=function(v){return this.options.noValidation?v:this.assertLegalChar(""+v||"")},k.prototype.dtdElementValue=function(v){return this.options.noValidation?v:this.assertLegalChar(""+v||"")},k.prototype.dtdAttType=function(v){return this.options.noValidation?v:this.assertLegalChar(""+v||"")},k.prototype.dtdAttDefault=function(v){return this.options.noValidation?v:this.assertLegalChar(""+v||"")},k.prototype.dtdEntityValue=function(v){return this.options.noValidation?v:this.assertLegalChar(""+v||"")},k.prototype.dtdNData=function(v){return this.options.noValidation?v:this.assertLegalChar(""+v||"")},k.prototype.convertAttKey="@",k.prototype.convertPIKey="?",k.prototype.convertTextKey="#text",k.prototype.convertCDataKey="#cdata",k.prototype.convertCommentKey="#comment",k.prototype.convertRawKey="#raw",k.prototype.assertLegalChar=function(v){var m,C;if(this.options.noValidation)return v;if(m="",this.options.version==="1.0"){if(m=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,C=v.match(m))throw new Error("Invalid character in string: "+v+" at index "+C.index)}else if(this.options.version==="1.1"&&(m=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,C=v.match(m)))throw new Error("Invalid character in string: "+v+" at index "+C.index);return v},k.prototype.assertLegalName=function(v){var m;if(this.options.noValidation)return v;if(this.assertLegalChar(v),m=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!v.match(m))throw new Error("Invalid character in name");return v},k.prototype.textEscape=function(v){var m;return this.options.noValidation?v:(m=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,v.replace(m,"&").replace(//g,">").replace(/\r/g," "))},k.prototype.attEscape=function(v){var m;return this.options.noValidation?v:(m=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,v.replace(m,"&").replace(/0)?new Array(p).join(E.indent):""},o.prototype.endline=function(s,E,b){return!E.pretty||E.suppressPrettyCount?"":E.newline},o.prototype.attribute=function(s,E,b){var p;return this.openAttribute(s,E,b),p=" "+s.name+'="'+s.value+'"',this.closeAttribute(s,E,b),p},o.prototype.cdata=function(s,E,b){var p;return this.openNode(s,E,b),E.state=g.OpenTag,p=this.indent(s,E,b)+""+this.endline(s,E,b),E.state=g.None,this.closeNode(s,E,b),p},o.prototype.comment=function(s,E,b){var p;return this.openNode(s,E,b),E.state=g.OpenTag,p=this.indent(s,E,b)+""+this.endline(s,E,b),E.state=g.None,this.closeNode(s,E,b),p},o.prototype.declaration=function(s,E,b){var p;return this.openNode(s,E,b),E.state=g.OpenTag,p=this.indent(s,E,b)+"",p+=this.endline(s,E,b),E.state=g.None,this.closeNode(s,E,b),p},o.prototype.docType=function(s,E,b){var p,D,R,y,x;if(b||(b=0),this.openNode(s,E,b),E.state=g.OpenTag,y=this.indent(s,E,b),y+="0){for(y+=" [",y+=this.endline(s,E,b),E.state=g.InsideTag,x=s.children,D=0,R=x.length;D",y+=this.endline(s,E,b),E.state=g.None,this.closeNode(s,E,b),y},o.prototype.element=function(s,E,b){var p,D,R,y,x,w,T,F,P,A,X,z,O,B;b||(b=0),A=!1,X="",this.openNode(s,E,b),E.state=g.OpenTag,X+=this.indent(s,E,b)+"<"+s.name,z=s.attribs;for(P in z){if(!u.call(z,P))continue;p=z[P],X+=this.attribute(p,E,b)}if(R=s.children.length,y=R===0?null:s.children[0],R===0||s.children.every(function(U){return(U.type===N.Text||U.type===N.Raw)&&U.value===""}))E.allowEmpty?(X+=">",E.state=g.CloseTag,X+=""+this.endline(s,E,b)):(E.state=g.CloseTag,X+=E.spaceBeforeSlash+"/>"+this.endline(s,E,b));else if(E.pretty&&R===1&&(y.type===N.Text||y.type===N.Raw)&&y.value!=null)X+=">",E.state=g.InsideTag,E.suppressPrettyCount++,A=!0,X+=this.writeChildNode(y,E,b+1),E.suppressPrettyCount--,A=!1,E.state=g.CloseTag,X+=""+this.endline(s,E,b);else{if(E.dontPrettyTextNodes){for(O=s.children,x=0,T=O.length;x"+this.endline(s,E,b),E.state=g.InsideTag,B=s.children,w=0,F=B.length;w",A&&E.suppressPrettyCount--,X+=this.endline(s,E,b),E.state=g.None}return this.closeNode(s,E,b),X},o.prototype.writeChildNode=function(s,E,b){switch(s.type){case N.CData:return this.cdata(s,E,b);case N.Comment:return this.comment(s,E,b);case N.Element:return this.element(s,E,b);case N.Raw:return this.raw(s,E,b);case N.Text:return this.text(s,E,b);case N.ProcessingInstruction:return this.processingInstruction(s,E,b);case N.Dummy:return"";case N.Declaration:return this.declaration(s,E,b);case N.DocType:return this.docType(s,E,b);case N.AttributeDeclaration:return this.dtdAttList(s,E,b);case N.ElementDeclaration:return this.dtdElement(s,E,b);case N.EntityDeclaration:return this.dtdEntity(s,E,b);case N.NotationDeclaration:return this.dtdNotation(s,E,b);default:throw new Error("Unknown XML node type: "+s.constructor.name)}},o.prototype.processingInstruction=function(s,E,b){var p;return this.openNode(s,E,b),E.state=g.OpenTag,p=this.indent(s,E,b)+"",p+=this.endline(s,E,b),E.state=g.None,this.closeNode(s,E,b),p},o.prototype.raw=function(s,E,b){var p;return this.openNode(s,E,b),E.state=g.OpenTag,p=this.indent(s,E,b),E.state=g.InsideTag,p+=s.value,E.state=g.CloseTag,p+=this.endline(s,E,b),E.state=g.None,this.closeNode(s,E,b),p},o.prototype.text=function(s,E,b){var p;return this.openNode(s,E,b),E.state=g.OpenTag,p=this.indent(s,E,b),E.state=g.InsideTag,p+=s.value,E.state=g.CloseTag,p+=this.endline(s,E,b),E.state=g.None,this.closeNode(s,E,b),p},o.prototype.dtdAttList=function(s,E,b){var p;return this.openNode(s,E,b),E.state=g.OpenTag,p=this.indent(s,E,b)+""+this.endline(s,E,b),E.state=g.None,this.closeNode(s,E,b),p},o.prototype.dtdElement=function(s,E,b){var p;return this.openNode(s,E,b),E.state=g.OpenTag,p=this.indent(s,E,b)+""+this.endline(s,E,b),E.state=g.None,this.closeNode(s,E,b),p},o.prototype.dtdEntity=function(s,E,b){var p;return this.openNode(s,E,b),E.state=g.OpenTag,p=this.indent(s,E,b)+""+this.endline(s,E,b),E.state=g.None,this.closeNode(s,E,b),p},o.prototype.dtdNotation=function(s,E,b){var p;return this.openNode(s,E,b),E.state=g.OpenTag,p=this.indent(s,E,b)+""+this.endline(s,E,b),E.state=g.None,this.closeNode(s,E,b),p},o.prototype.openNode=function(s,E,b){},o.prototype.closeNode=function(s,E,b){},o.prototype.openAttribute=function(s,E,b){},o.prototype.closeAttribute=function(s,E,b){},o}()}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLCData":255,"./XMLComment":257,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDummy":270,"./XMLElement":271,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLText":280}],282:[function(H,Z,I){"use strict";(function(){var N,g,S,k,v,m,C,_,e,h;h=H("./Utility"),_=h.assign,e=h.isFunction,S=H("./XMLDOMImplementation"),k=H("./XMLDocument"),v=H("./XMLDocumentCB"),C=H("./XMLStringWriter"),m=H("./XMLStreamWriter"),N=H("./NodeType"),g=H("./WriterState"),Z.exports.create=function(r,c,i,n){var l,f;if(r==null)throw new Error("Root element needs a name.");return n=_({},c,i,n),l=new k(n),f=l.element(r),n.headless||(l.declaration(n),(n.pubID!=null||n.sysID!=null)&&l.dtd(n)),f},Z.exports.begin=function(r,c,i){var n;return e(r)&&(n=[r,c],c=n[0],i=n[1],r={}),c?new v(r,c,i):new k(r)},Z.exports.stringWriter=function(r){return new C(r)},Z.exports.streamWriter=function(r,c){return new m(r,c)},Z.exports.implementation=new S,Z.exports.nodeType=N,Z.exports.writerState=g}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLDOMImplementation":260,"./XMLDocument":268,"./XMLDocumentCB":269,"./XMLStreamWriter":277,"./XMLStringWriter":278}],283:[function(H,Z,I){Z.exports=g;var N=Object.prototype.hasOwnProperty;function g(){for(var S={},k=0;kv?r=h(r):r.length>5]|=128<>>9<<4)+14]=c;for(var i=1732584193,n=-271733879,l=-1732584194,f=271733878,d=0;d>16)+(c>>16)+(i>>16);return n<<16|i&65535}function h(r,c){return r<>>32-c}Z.exports=function(c){return N.hash(c,S,16)}},{"./helpers":285}],287:[function(H,Z,I){"use strict";var N=H("./helpers");function g(C,_){C[_>>5]|=128<<24-_%32,C[(_+64>>9<<4)+15]=_;for(var e=Array(80),h=1732584193,r=-271733879,c=-1732584194,i=271733878,n=-1009589776,l=0;l>16)+(_>>16)+(e>>16);return h<<16|e&65535}function m(C,_){return C<<_|C>>>32-_}Z.exports=function(_){return N.hash(_,g,20,!0)}},{"./helpers":285}],288:[function(H,Z,I){"use strict";Z.exports=function(){return function(){}}},{}],289:[function(H,Z,I){(function(N){"use strict";var g=H("babel-runtime/helpers/typeof"),S=k(g);function k(h){return h&&h.__esModule?h:{default:h}}var v=H("stream"),m=v.Stream,C=H("../lib/common/utils/isArray"),_=C.isArray;Z.exports.string=function(r){return typeof r=="string"},Z.exports.array=_,Z.exports.buffer=N.isBuffer;function e(h){return h instanceof m}Z.exports.writableStream=function(r){return e(r)&&typeof r._write=="function"&&(0,S.default)(r._writableState)==="object"}}).call(this,{isBuffer:H("../node_modules/is-buffer/index.js")})},{"../lib/common/utils/isArray":42,"../node_modules/is-buffer/index.js":197,"babel-runtime/helpers/typeof":67,stream:230}],290:[function(H,Z,I){"use strict";I.encodeURIComponent=function(N){try{return encodeURIComponent(N)}catch(g){return N}},I.escape=H("escape-html"),I.timestamp=function(g){if(g){var S=g;return typeof S=="string"&&(S=Number(S)),String(g).length===10&&(S*=1e3),new Date(S)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(H,Z,I){(function(N,g){"use strict";var S=H("babel-runtime/core-js/json/stringify"),k=C(S),v=H("babel-runtime/helpers/typeof"),m=C(v);function C(E){return E&&E.__esModule?E:{default:E}}var _=H("util"),e=H("url"),h=H("http"),r=H("https"),c=H("debug")("urllib"),i=H("humanize-ms"),n,l=0,f=Math.pow(2,31)-10,d=/^https?:\/\//i;function u(E,b){return E===void 0?b:E}function o(E,b){return function(p,D,R){if(p)return b(p);E({data:D,status:R.statusCode,headers:R.headers,res:R})}}I.TIMEOUTS=[i("300s"),i("300s")];var s=["json","text"];I.request=function(b,p,D){return arguments.length===2&&typeof p=="function"&&(D=p,p=null),typeof D=="function"?I.requestWithCallback(b,p,D):(n||(n=H("any-promise")),new n(function(R,y){I.requestWithCallback(b,p,o(R,y))}))},I.requestWithCallback=function(b,p,D){if(!b||typeof b!="string"&&(typeof b=="undefined"?"undefined":(0,m.default)(b))!=="object"){var R=_.format("expect request url to be a string or a http request options, but got %j",b);throw new Error(R)}arguments.length===2&&typeof p=="function"&&(D=p,p=null),p=p||{},l>=f&&(l=0);var y=++l;p.requestUrls=p.requestUrls||[];var x={requestId:y,url:b,args:p,ctx:p.ctx};p.emitter&&p.emitter.emit("request",x),p.timeout=p.timeout||I.TIMEOUTS,p.maxRedirects=p.maxRedirects||10,p.streaming=p.streaming||p.customResponse;var w=Date.now(),T;typeof b=="string"?(d.test(b)||(b="http://"+b),T=e.parse(b)):T=b;var F=(p.type||p.method||T.method||"GET").toUpperCase(),P=T.port||80,A=h,X=u(p.agent,I.agent),z=p.fixJSONCtlChars;T.protocol==="https:"&&(A=r,X=u(p.httpsAgent,I.httpsAgent),T.port||(P=443));var O={host:T.hostname||T.host||"localhost",path:T.path||"/",method:F,port:P,agent:X,headers:p.headers||{},lookup:p.lookup};Array.isArray(p.timeout)?O.requestTimeout=p.timeout[p.timeout.length-1]:typeof p.timeout!="undefined"&&(O.requestTimeout=p.timeout);for(var B=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],U=0;U=0)return c("Request#%d %s: got digest auth header WWW-Authenticate: %s",y,b,he),p.headers=p.headers||{},p.headers.Authorization=digestAuthHeader(O.method,O.path,he,p.digestAuth),c("Request#%d %s: auth with digest header: %s",y,b,p.headers.Authorization),rt.headers["set-cookie"]&&(p.headers.Cookie=rt.headers["set-cookie"].join(";")),I.requestWithCallback(b,p,ye)}var me=Date.now()-w;ie&&(ie.contentDownload=me),c("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",me,W,Y,O.method,O.host,O.path,te,ie);var Ce={status:Y,statusCode:Y,headers:ue,size:W,aborted:V,rt:me,keepAliveSocket:te,data:Je,requestUrls:p.requestUrls,timing:ie,remoteAddress:Q,remotePort:q};if(Ie){var ge="";X&&typeof X.getCurrentStatus=="function"&&(ge=", agent status: "+(0,k.default)(X.getCurrentStatus())),Ie.message+=", "+O.method+" "+b+" "+Y+" (connected: "+de+", keepalive socket: "+te+ge+`) headers: `+(0,k.default)(ue),Ie.data=Je,Ie.path=O.path,Ie.status=Y,Ie.headers=ue,Ie.res=Ce}ye(Ie,Je,p.streaming?rt:Ce),p.emitter&&(x.url=b,x.socket=qe&&qe.connection,x.options=O,x.size=be,p.emitter.emit("response",{requestId:y,error:Ie,ctx:p.ctx,req:x,res:Ce}))}function le(Ie){var Je=null;if(p.followRedirect&&statuses.redirect[Ie.statusCode]){p._followRedirectCount=(p._followRedirectCount||0)+1;var rt=Ie.headers.location;if(!rt)Je=new Error("Got statusCode "+Ie.statusCode+" but cannot resolve next location from headers"),Je.name="FollowRedirectError";else if(p._followRedirectCount>p.maxRedirects)Je=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+b),Je.name="MaxRedirectError";else{var ye=p.formatRedirectUrl?p.formatRedirectUrl(b,rt):e.resolve(b,rt);c("Request#%d %s: `redirected` from %s to %s",y,O.path,b,ye),J(),p.headers&&p.headers.Host&&d.test(rt)&&(p.headers.Host=null);var ue=D;return D=null,I.requestWithCallback(ye,p,ue),{redirect:!0,error:null}}}return{redirect:!1,error:Je}}!O.headers["User-Agent"]&&!O.headers["user-agent"]&&(O.headers["User-Agent"]=navigator.userAgent),p.gzip&&(!O.headers["Accept-Encoding"]&&!O.headers["accept-encoding"]&&(O.headers["Accept-Encoding"]="gzip"));function ce(Ie,Je,rt){var ye=Ie.headers["content-encoding"];return rt(null,Je,ye)}var we=p.writeStream;c("Request#%d %s %s with headers %j, options.path: %s",y,F,b,O.headers,O.path),p.requestUrls.push(b);function Fe(Ie){if(ie&&(ie.waiting=Date.now()-w),c("Request#%d %s `req response` event emit: status %d, headers: %j",y,b,Ie.statusCode,Ie.headers),p.streaming){var Je=le(Ie);if(Je.redirect){Ie.resume();return}return Je.error?(Ie.resume(),$(Je.error,null,Ie)):$(null,null,Ie)}if(Ie.on("close",function(){c("Request#%d %s: `res close` event emit, total size %d",y,b,W)}),Ie.on("error",function(){c("Request#%d %s: `res error` event emit, total size %d",y,b,W)}),Ie.on("aborted",function(){V=!0,c("Request#%d %s: `res aborted` event emit, total size %d",y,b,W)}),we){var Je=le(Ie);if(Je.redirect){Ie.resume();return}return Je.error?(Ie.resume(),we.end(),$(Je.error,null,Ie)):(p.consumeWriteStream===!1?Ie.on("end",$.bind(null,null,null,Ie)):isNode010||isNode012?first([[we,"close"],[Ie,"aborted"]],function(ue,he,me){c("Request#%d %s: writeStream or res %s event emitted",y,b,me),$(Oe||null,null,Ie)}):we.on("close",function(){c("Request#%d %s: writeStream close event emitted",y,b),$(Oe||null,null,Ie)}),Ie.pipe(we))}var rt=[];Ie.on("data",function(ye){c("Request#%d %s: `res data` event emit, size %d",y,b,ye.length),W+=ye.length,rt.push(ye)}),Ie.on("end",function(){var ye=g.concat(rt,W);if(c("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",y,b,W,Ie._dumped),Oe)return $(Oe,ye,Ie);var ue=le(Ie);if(ue.error)return $(ue.error,ye,Ie);if(ue.redirect)return;ce(Ie,ye,function(he,me,Ce){if(he)return $(he,ye,Ie);if(!Ce&&s.indexOf(p.dataType)>=0){try{me=decodeBodyByCharset(me,Ie)}catch(Ee){return c("decodeBodyByCharset error: %s",Ee),$(null,me,Ie)}if(p.dataType==="json")if(W===0)me=null;else{var ge=parseJSON(me,z);ge.error?he=ge.error:me=ge.data}}V&&c("Request#%d %s: Remote socket was terminated before `response.end()` was called",y,b),$(he,me,Ie)})})}var Xe,$e;Array.isArray(p.timeout)?(Xe=i(p.timeout[0]),$e=i(p.timeout[1])):Xe=$e=i(p.timeout),c("ConnectTimeout: %d, ResponseTimeout: %d",Xe,$e);function Ye(){c("Connect timer ticking, timeout: %d",Xe),fe=setTimeout(function(){fe=null,Y===-1&&(Y=-2);var Ie="Connect timeout for "+Xe+"ms",Je="ConnectionTimeoutError";qe.socket||(Je="SocketAssignTimeoutError",Ie+=", working sockets is full"),Oe=new Error(Ie),Oe.name=Je,Oe.requestId=y,c("ConnectTimeout: Request#%d %s %s: %s, connected: %s",y,b,Oe.name,Ie,de),Pe()},Xe)}function Ze(){c("Response timer ticking, timeout: %d",$e),Re=setTimeout(function(){Re=null;var Ie="Response timeout for "+$e+"ms",Je="ResponseTimeoutError";Oe=new Error(Ie),Oe.name=Je,Oe.requestId=y,c("ResponseTimeout: Request#%d %s %s: %s, connected: %s",y,b,Oe.name,Ie,de),Pe()},$e)}var qe;O.mode=p.mode?p.mode:"";try{qe=A.request(O,Fe)}catch(Ie){return $(Ie)}typeof window=="undefined"?Ye():qe.on("requestTimeout",function(){Y===-1&&(Y=-2);var Ie="Connect timeout for "+Xe+"ms",Je="ConnectionTimeoutError";Oe=new Error(Ie),Oe.name=Je,Oe.requestId=y,Pe()});function Pe(){c("Request#%d %s abort, connected: %s",y,b,de),qe.socket||(Oe.noSocket=!0,$(Oe)),qe.abort()}return ie&&qe.on("finish",function(){ie.requestSent=Date.now()-w}),qe.once("socket",function(Ie){ie&&(ie.queuing=Date.now()-w),isNode010&&Ie.socket&&(Ie=Ie.socket);var Je=Ie.readyState;if(Je==="opening"){Ie.once("lookup",function(rt,ye,ue){c("Request#%d %s lookup: %s, %s, %s",y,b,rt,ye,ue),ie&&(ie.dnslookup=Date.now()-w),ye&&(Q=ye)}),Ie.once("connect",function(){ie&&(ie.connected=Date.now()-w),ne(),Ze(),c("Request#%d %s new socket connected",y,b),de=!0,Q||(Q=Ie.remoteAddress),q=Ie.remotePort});return}c("Request#%d %s reuse socket connected, readyState: %s",y,b,Je),de=!0,te=!0,Q||(Q=Ie.remoteAddress),q=Ie.remotePort,ne(),Ze()}),qe.on("error",function(Ie){(Ie.name==="Error"||Ie.name==="TypeError")&&(Ie.name=de?"ResponseError":"RequestError"),Ie.message+=' (req "error")',c("Request#%d %s `req error` event emit, %s: %s",y,b,Ie.name,Ie.message),$(Oe||Ie)}),we&&we.once("error",function(Ie){Ie.message+=' (writeStream "error")',Oe=Ie,c("Request#%d %s `writeStream error` event emit, %s: %s",y,b,Ie.name,Ie.message),Pe()}),p.stream?(p.stream.pipe(qe),p.stream.once("error",function(Ie){Ie.message+=' (stream "error")',Oe=Ie,c("Request#%d %s `readStream error` event emit, %s: %s",y,b,Ie.name,Ie.message),Pe()})):qe.end(ee),qe.requestId=y,qe}}).call(this,H("_process"),H("buffer").Buffer)},{_process:208,"any-promise":49,"babel-runtime/core-js/json/stringify":53,"babel-runtime/helpers/typeof":67,buffer:73,constants:75,debug:288,http:231,https:193,"humanize-ms":194,url:238,util:243}]},{},[1])(1)})}).call(this,__webpack_require__("IyRk"))},n6Qo:function(H,Z,I){"use strict";I.d(Z,"a",function(){return _});var N=I("q1tI"),g=I("biw7"),S=I("fyJ8");function k(e){var h=e.className,r=e.index,c=e.children,i=e.colSpan,n=e.rowSpan,l=N.useContext(g.a),f=l.prefixCls,d=l.fixedInfoList,u=d[r];return N.createElement(S.a,Object.assign({className:h,index:r,component:"td",prefixCls:f,record:null,dataIndex:null,render:function(){return{children:c,props:{colSpan:i,rowSpan:n}}}},u))}function v(e){return N.createElement("tr",Object.assign({},e))}function m(e){var h=e.children,r=N.useContext(g.a),c=r.prefixCls;return N.createElement("tfoot",{className:"".concat(c,"-summary")},h)}var C=Z.b=m,_={Cell:k,Row:v}},nEHx:function(H,Z,I){"use strict";I.d(Z,"a",function(){return N});var N;(function(g){g.DARK="dark",g.LIGHT="light",g.HIGH_CONTRAST="hc"})(N||(N={}))},nj2k:function(H,Z,I){H.exports=I.p+"static/nodata.c3b0b86c.svg"},nnTU:function(H,Z,I){"use strict";I.d(Z,"b",function(){return C}),I.d(Z,"a",function(){return _});var N=I("MI8n"),g=I("JYp7"),S=I("pmY6"),k=I("24hK"),v=I("746U"),m=I("Cg/j");const C=Object(m.c)("commandService"),_=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new N.b,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,h){if(!e)throw new Error("invalid command");if(typeof e=="string"){if(!h)throw new Error("invalid command");return this.registerCommand({id:e,handler:h})}if(e.description){const l=[];for(let d of e.description.args)l.push(d.constraint);const f=e.handler;e.handler=function(d,...u){return Object(v.o)(u,l),f(d,...u)}}const{id:r}=e;let c=this._commands.get(r);c||(c=new k.a,this._commands.set(r,c));let i=c.unshift(e),n=Object(S.i)(()=>{i();const l=this._commands.get(r);(l==null?void 0:l.isEmpty())&&this._commands.delete(r)});return this._onDidRegisterCommand.fire(r),n}registerCommandAlias(e,h){return _.registerCommand(e,(r,...c)=>r.get(C).executeCommand(h,...c))}getCommand(e){const h=this._commands.get(e);return!h||h.isEmpty()?void 0:g.a.first(h)}getCommands(){const e=new Map;for(const h of this._commands.keys()){const r=this.getCommand(h);r&&e.set(h,r)}return e}};_.registerCommand("noop",()=>{})},oRuE:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("OLod"))})(this,function(N){return N.pad.Iso10126={pad:function(g,S){var k=S*4,v=k-g.sigBytes%k;g.concat(N.lib.WordArray.random(v-1)).concat(N.lib.WordArray.create([v<<24],1))},unpad:function(g){var S=g.words[g.sigBytes-1>>>2]&255;g.sigBytes-=S}},N.pad.Iso10126})},osHv:function(H,Z,I){(function(N){N(I("VrN/"))})(function(N){"use strict";var g=N.Pos;function S(d,u){return d.line-u.line||d.ch-u.ch}var k="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",v=k+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",m=new RegExp("<(/?)(["+k+"]["+v+"]*)","g");function C(d,u,o,s){this.line=u,this.ch=o,this.cm=d,this.text=d.getLine(u),this.min=s?Math.max(s.from,d.firstLine()):d.firstLine(),this.max=s?Math.min(s.to-1,d.lastLine()):d.lastLine()}function _(d,u){var o=d.cm.getTokenTypeAt(g(d.line,u));return o&&/\btag\b/.test(o)}function e(d){return d.line>=d.max?void 0:(d.ch=0,d.text=d.cm.getLine(++d.line),!0)}function h(d){return d.line<=d.min?void 0:(d.text=d.cm.getLine(--d.line),d.ch=d.text.length,!0)}function r(d){for(;;){var u=d.text.indexOf(">",d.ch);if(u==-1){if(e(d))continue;return}if(!_(d,u+1)){d.ch=u+1;continue}var o=d.text.lastIndexOf("/",u),s=o>-1&&!/\S/.test(d.text.slice(o+1,u));return d.ch=u+1,s?"selfClose":"regular"}}function c(d){for(;;){var u=d.ch?d.text.lastIndexOf("<",d.ch-1):-1;if(u==-1){if(h(d))continue;return}if(!_(d,u+1)){d.ch=u;continue}m.lastIndex=u,d.ch=u;var o=m.exec(d.text);if(o&&o.index==u)return o}}function i(d){for(;;){m.lastIndex=d.ch;var u=m.exec(d.text);if(!u){if(e(d))continue;return}if(!_(d,u.index+1)){d.ch=u.index+1;continue}return d.ch=u.index+u[0].length,u}}function n(d){for(;;){var u=d.ch?d.text.lastIndexOf(">",d.ch-1):-1;if(u==-1){if(h(d))continue;return}if(!_(d,u+1)){d.ch=u;continue}var o=d.text.lastIndexOf("/",u),s=o>-1&&!/\S/.test(d.text.slice(o+1,u));return d.ch=u+1,s?"selfClose":"regular"}}function l(d,u){for(var o=[];;){var s=i(d),E,b=d.line,p=d.ch-(s?s[0].length:0);if(!s||!(E=r(d)))return;if(E=="selfClose")continue;if(s[1]){for(var D=o.length-1;D>=0;--D)if(o[D]==s[2]){o.length=D;break}if(D<0&&(!u||u==s[2]))return{tag:s[2],from:g(b,p),to:g(d.line,d.ch)}}else o.push(s[2])}}function f(d,u){for(var o=[];;){var s=n(d);if(!s)return;if(s=="selfClose"){c(d);continue}var E=d.line,b=d.ch,p=c(d);if(!p)return;if(p[1])o.push(p[2]);else{for(var D=o.length-1;D>=0;--D)if(o[D]==p[2]){o.length=D;break}if(D<0&&(!u||u==p[2]))return{tag:p[2],from:g(d.line,d.ch),to:g(E,b)}}}}N.registerHelper("fold","xml",function(d,u){for(var o=new C(d,u.line,0);;){var s=i(o);if(!s||o.line!=u.line)return;var E=r(o);if(!E)return;if(!s[1]&&E!="selfClose"){var b=g(o.line,o.ch),p=l(o,s[2]);return p&&S(p.from,b)>0?{from:b,to:p.from}:null}}}),N.findMatchingTag=function(d,u,o){var s=new C(d,u.line,u.ch,o);if(s.text.indexOf(">")==-1&&s.text.indexOf("<")==-1)return;var E=r(s),b=E&&g(s.line,s.ch),p=E&&c(s);if(!E||!p||S(s,u)>0)return;var D={from:g(s.line,s.ch),to:b,tag:p[2]};return E=="selfClose"?{open:D,close:null,at:"open"}:p[1]?{open:f(s,p[2]),close:D,at:"close"}:(s=new C(d,b.line,b.ch,o),{open:D,close:l(s,p[2]),at:"open"})},N.findEnclosingTag=function(d,u,o,s){for(var E=new C(d,u.line,u.ch,o);;){var b=f(E,s);if(!b)break;var p=new C(d,u.line,u.ch,o),D=l(p,b.tag);if(D)return{open:b,close:D}}},N.scanForClosingTag=function(d,u,o,s){var E=new C(d,u.line,u.ch,s?{from:0,to:s}:null);return l(E,o)}})},p5ED:function(H,Z,I){"use strict";var N=I("+L6B"),g=I("2/Rp"),S=I("5Dmo"),k=I("3S7+"),v=I("k1fw"),m=I("9og8"),C=I("tJVT"),_=I("WmNS"),e=I.n(_),h=I("q1tI"),r=I.n(h),c=I("vHTk"),i=I.n(c),n=I("yEEn"),l=I("ZW9T"),f=I("1vsH"),d=I("V0Rq"),u=I("m3rI");Z.a=function(o){var s,E,b,p,D,R,y,x=o.editOffice,w=x===void 0?"view":x,T=o.data,F=o.theme,P=o.type,A=o.filename,X=o.monacoEditor,z=o.className,O=o.style,B=o.close,U=o.onClose,L=o.hasMask,G=o.disabledDownload,ee=Object(h.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),oe=Object(C.a)(ee,2),ae=oe[0],be=oe[1],_e=Object(h.useState)(""),fe=Object(C.a)(_e,2),Re=fe[0],Oe=fe[1],de=Object(h.useState)(),te=Object(C.a)(de,2),W=te[0],Y=te[1],V=window.ENV==="build"?"/react/build":"",Q=u.a.PROXY_SERVER||location.origin,q,ie=1024*1024,ne=10*ie,J=Object(h.useRef)();(s=T)!==null&&s!==void 0&&s.startsWith("/api")&&P!=="txt"&&(T=(u.a.API_SERVER||location.origin)+T),P==="office"&&(q=Object(f.T)(T).filesize,q>ne&&(P="other")),A&&X&&(X.filename=A),Object(h.useEffect)(function(){var we,Fe,Xe=(we=document.cookie)===null||we===void 0||((Fe=we.replace(/\s/g,""))===null||Fe===void 0)?void 0:Fe.split(";");Xe==null||Xe.map(function($e){var Ye=$e.split("=");Ye[0]==="_educoder_session"&&Oe(Ye[1])})},[]),Object(h.useEffect)(function(){P==="office"&&$()},[P,T]);var $=function(){var we=Object(m.a)(e.a.mark(function Fe(){var Xe,$e,Ye;return e.a.wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:return console.log("data:",T),Xe=T,T.startsWith("http")||(Xe=location.origin+Xe),$e=new URL(Xe).pathname.split("/").pop(),qe.next=6,Object(d.V)({attachment_id:$e});case 6:Ye=qe.sent,Y(Ye);case 8:case"end":return qe.stop()}},Fe)}));return function(){return we.apply(this,arguments)}}(),le=function(){if(T.startsWith("http")||T.startsWith("blob:")){ce();return}Object(f.z)(A||"educoder",T,A)},ce=function(){Object(f.x)(A||"educoder",decodeURIComponent(T))};return r.a.createElement("div",{style:Object(v.a)({},O||{}),className:"".concat(L&&i.a.bgBlack," ").concat(P?i.a.wrp:"hide")},B&&r.a.createElement("div",{className:i.a.close,ref:J},!G&&r.a.createElement(k.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return J.current}},r.a.createElement("span",{onClick:ce},r.a.createElement("i",{className:"icon-quxiaozhiding"}))),r.a.createElement(k.a,{title:"\u5173\u95ED",getPopupContainer:function(){return J.current}},r.a.createElement("span",{className:"",onClick:U},r.a.createElement("i",{className:"icon-guanbi1"})))),r.a.createElement("div",{className:"".concat(i.a[z]," ").concat(z," ").concat(i.a.monaco," ").concat(P==="txt"?"show":"hide")},P==="txt"&&r.a.createElement(l.b,X)),P==="audio"&&r.a.createElement("audio",{src:"".concat(((E=T)===null||E===void 0?void 0:E.indexOf("http://"))>-1||((b=T)===null||b===void 0?void 0:b.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(T),autoPlay:!0}),P==="video"&&r.a.createElement(r.a.Fragment,null,((p=T)===null||p===void 0?void 0:p.indexOf("http"))>-1?r.a.createElement("video",{controls:!0,src:"".concat(T),autoPlay:!0}):r.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(T),autoPlay:!0})),P==="office"&&W&&r.a.createElement("iframe",{src:"".concat(V,"/office.html?key=").concat(W.key,"&url=").concat(Q+W.url,"&callbackUrl=").concat(Q+W.callbackUrl,"&fileType=").concat(W.fileType,"&title=").concat(W.title,"&model=").concat(w,"&officeServer=").concat(u.a.OFFICE_SERVER,"&disabledDownload=").concat(!!G)}),P==="html"&&r.a.createElement("iframe",{src:T+"&disposition=inline"}),P==="pdf"&&r.a.createElement("iframe",{src:"".concat(V,"/js/pdfview/index.html?url=").concat(T,"&disabledDownload=").concat(!!G)}),P==="image"&&r.a.createElement("img",{src:"".concat(((D=T)===null||D===void 0?void 0:D.indexOf("http://"))>-1||((R=T)===null||R===void 0?void 0:R.indexOf("https://"))>-1||(y=T)!==null&&y!==void 0&&y.startsWith("/api")?"":"data:image/png;base64,").concat(T)}),P==="other"&&r.a.createElement("div",null,r.a.createElement(g.a,{type:"primary",size:"large",onClick:le},r.a.createElement(n.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),P==="download"&&r.a.createElement(g.a,{type:"primary",size:"large",onClick:le},r.a.createElement(n.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(H,Z,I){},pA7S:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("ETIr"),I("cv67"),I("K3mO"),I("OLod"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.WordArray,v=S.BlockCipher,m=g.algo,C=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],_=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],e=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],h=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],r=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],c=m.DES=v.extend({_doReset:function(){for(var f=this._key,d=f.words,u=[],o=0;o<56;o++){var s=C[o]-1;u[o]=d[s>>>5]>>>31-s%32&1}for(var E=this._subKeys=[],b=0;b<16;b++){for(var p=E[b]=[],D=e[b],o=0;o<24;o++)p[o/6|0]|=u[(_[o]-1+D)%28]<<31-o%6,p[4+(o/6|0)]|=u[28+(_[o+24]-1+D)%28]<<31-o%6;p[0]=p[0]<<1|p[0]>>>31;for(var o=1;o<7;o++)p[o]=p[o]>>>(o-1)*4+3;p[7]=p[7]<<5|p[7]>>>27}for(var R=this._invSubKeys=[],o=0;o<16;o++)R[o]=E[15-o]},encryptBlock:function(f,d){this._doCryptBlock(f,d,this._subKeys)},decryptBlock:function(f,d){this._doCryptBlock(f,d,this._invSubKeys)},_doCryptBlock:function(f,d,u){this._lBlock=f[d],this._rBlock=f[d+1],i.call(this,4,252645135),i.call(this,16,65535),n.call(this,2,858993459),n.call(this,8,16711935),i.call(this,1,1431655765);for(var o=0;o<16;o++){for(var s=u[o],E=this._lBlock,b=this._rBlock,p=0,D=0;D<8;D++)p|=h[D][((b^s[D])&r[D])>>>0];this._lBlock=b,this._rBlock=E^p}var R=this._lBlock;this._lBlock=this._rBlock,this._rBlock=R,i.call(this,1,1431655765),n.call(this,8,16711935),n.call(this,2,858993459),i.call(this,16,65535),i.call(this,4,252645135),f[d]=this._lBlock,f[d+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function i(f,d){var u=(this._lBlock>>>f^this._rBlock)&d;this._rBlock^=u,this._lBlock^=u<>>f^this._lBlock)&d;this._lBlock^=u,this._rBlock^=u<192.");var u=d.slice(0,2),o=d.length<4?d.slice(0,2):d.slice(2,4),s=d.length<6?d.slice(0,2):d.slice(4,6);this._des1=c.createEncryptor(k.create(u)),this._des2=c.createEncryptor(k.create(o)),this._des3=c.createEncryptor(k.create(s))},encryptBlock:function(f,d){this._des1.encryptBlock(f,d),this._des2.decryptBlock(f,d),this._des3.encryptBlock(f,d)},decryptBlock:function(f,d){this._des3.decryptBlock(f,d),this._des2.encryptBlock(f,d),this._des1.decryptBlock(f,d)},keySize:192/32,ivSize:64/32,blockSize:64/32});g.TripleDES=v._createHelper(l)}(),N.TripleDES})},pmY6:function(H,Z,I){"use strict";I.d(Z,"h",function(){return h}),I.d(Z,"g",function(){return c}),I.d(Z,"f",function(){return i}),I.d(Z,"e",function(){return n}),I.d(Z,"i",function(){return l}),I.d(Z,"b",function(){return f}),I.d(Z,"a",function(){return d}),I.d(Z,"d",function(){return u}),I.d(Z,"c",function(){return o});var N=I("C/vA"),g=I("JYp7");const S=!1;let k=null;function v(s){k=s}if(S){const s="__is_disposable_tracked__";v(new class{trackDisposable(E){const b=new Error("Potentially leaked disposable").stack;setTimeout(()=>{E[s]||console.log(b)},3e3)}setParent(E,b){if(E&&E!==d.None)try{E[s]=!0}catch(p){}}markAsDisposed(E){if(E&&E!==d.None)try{E[s]=!0}catch(b){}}markAsSingleton(E){}})}function m(s){return k==null||k.trackDisposable(s),s}function C(s){k==null||k.markAsDisposed(s)}function _(s,E){k==null||k.setParent(s,E)}function e(s,E){if(!k)return;for(const b of s)k.setParent(b,E)}function h(s){return k==null||k.markAsSingleton(s),s}class r extends Error{constructor(s){super(`Encountered errors while disposing of store. Errors: [${s.join(", ")}]`);this.errors=s}}function c(s){return typeof s.dispose=="function"&&s.dispose.length===0}function i(s){if(g.a.is(s)){let E=[];for(const b of s)if(b)try{b.dispose()}catch(p){E.push(p)}if(E.length===1)throw E[0];if(E.length>1)throw new r(E);return Array.isArray(s)?[]:s}else if(s)return s.dispose(),s}function n(...s){const E=l(()=>i(s));return e(s,E),E}function l(s){const E=m({dispose:Object(N.a)(()=>{C(E),s()})});return E}class f{constructor(){this._toDispose=new Set,this._isDisposed=!1,m(this)}dispose(){if(this._isDisposed)return;C(this),this._isDisposed=!0,this.clear()}clear(){try{i(this._toDispose.values())}finally{this._toDispose.clear()}}add(s){if(!s)return s;if(s===this)throw new Error("Cannot register a disposable on itself!");return _(s,this),this._isDisposed?f.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(s),s}}f.DISABLE_DISPOSED_WARNING=!1;class d{constructor(){this._store=new f,m(this),_(this._store,this)}dispose(){C(this),this._store.dispose()}_register(s){if(s===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(s)}}d.None=Object.freeze({dispose(){}});class u{constructor(){this._isDisposed=!1,m(this)}get value(){return this._isDisposed?void 0:this._value}set value(s){var E;if(this._isDisposed||s===this._value)return;(E=this._value)===null||E===void 0||E.dispose(),s&&_(s,this),this._value=s}clear(){this.value=void 0}dispose(){var s;this._isDisposed=!0,C(this),(s=this._value)===null||s===void 0||s.dispose(),this._value=void 0}clearAndLeak(){const s=this._value;return this._value=void 0,s&&_(s,null),s}}class o{constructor(s){this.object=s}dispose(){}}},psGv:function(H,Z,I){var N,g;(function(){var S;(function(){"use strict";var C=[,,function(r){function c(l){this.__parent=l,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}c.prototype.clone_empty=function(){var l=new c(this.__parent);return l.set_indent(this.__indent_count,this.__alignment_count),l},c.prototype.item=function(l){return l<0?this.__items[this.__items.length+l]:this.__items[l]},c.prototype.has_match=function(l){for(var f=this.__items.length-1;f>=0;f--)if(this.__items[f].match(l))return!0;return!1},c.prototype.set_indent=function(l,f){this.is_empty()&&(this.__indent_count=l||0,this.__alignment_count=f||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},c.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},c.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},c.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var l=this.__parent.current_line;return l.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),l.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),l.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,l.__items[0]===" "&&(l.__items.splice(0,1),l.__character_count-=1),!0}return!1},c.prototype.is_empty=function(){return this.__items.length===0},c.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},c.prototype.push=function(l){this.__items.push(l);var f=l.lastIndexOf(` `);f!==-1?this.__character_count=l.length-f:this.__character_count+=l.length},c.prototype.pop=function(){var l=null;return this.is_empty()||(l=this.__items.pop(),this.__character_count-=l.length),l},c.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},c.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},c.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},c.prototype.toString=function(){var l="";return this.is_empty()?this.__parent.indent_empty_lines&&(l=this.__parent.get_indent_string(this.__indent_count)):(l=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),l+=this.__items.join("")),l};function i(l,f){this.__cache=[""],this.__indent_size=l.indent_size,this.__indent_string=l.indent_char,l.indent_with_tabs||(this.__indent_string=new Array(l.indent_size+1).join(l.indent_char)),f=f||"",l.indent_level>0&&(f=new Array(l.indent_level+1).join(this.__indent_string)),this.__base_string=f,this.__base_string_length=f.length}i.prototype.get_indent_size=function(l,f){var d=this.__base_string_length;return f=f||0,l<0&&(d=0),d+=l*this.__indent_size,d+=f,d},i.prototype.get_indent_string=function(l,f){var d=this.__base_string;return f=f||0,l<0&&(l=0,d=""),f+=l*this.__indent_size,this.__ensure_cache(f),d+=this.__cache[f],d},i.prototype.__ensure_cache=function(l){for(;l>=this.__cache.length;)this.__add_column()},i.prototype.__add_column=function(){var l=this.__cache.length,f=0,d="";this.__indent_size&&l>=this.__indent_size&&(f=Math.floor(l/this.__indent_size),l-=f*this.__indent_size,d=new Array(f+1).join(this.__indent_string)),l&&(d+=new Array(l+1).join(" ")),this.__cache.push(d)};function n(l,f){this.__indent_cache=new i(l,f),this.raw=!1,this._end_with_newline=l.end_with_newline,this.indent_size=l.indent_size,this.wrap_line_length=l.wrap_line_length,this.indent_empty_lines=l.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new c(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}n.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},n.prototype.get_line_number=function(){return this.__lines.length},n.prototype.get_indent_string=function(l,f){return this.__indent_cache.get_indent_string(l,f)},n.prototype.get_indent_size=function(l,f){return this.__indent_cache.get_indent_size(l,f)},n.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},n.prototype.add_new_line=function(l){return this.is_empty()||!l&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},n.prototype.get_code=function(l){this.trim(!0);var f=this.current_line.pop();f&&(f[f.length-1]===` `&&(f=f.replace(/\n+$/g,"")),this.current_line.push(f)),this._end_with_newline&&this.__add_outputline();var d=this.__lines.join(` `);return l!==` `&&(d=d.replace(/[\n]/g,l)),d},n.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},n.prototype.set_indent=function(l,f){return l=l||0,f=f||0,this.next_line.set_indent(l,f),this.__lines.length>1?(this.current_line.set_indent(l,f),!0):(this.current_line.set_indent(),!1)},n.prototype.add_raw_token=function(l){for(var f=0;f1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},n.prototype.just_added_newline=function(){return this.current_line.is_empty()},n.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},n.prototype.ensure_empty_line_above=function(l,f){for(var d=this.__lines.length-2;d>=0;){var u=this.__lines[d];if(u.is_empty())break;if(u.item(0).indexOf(l)!==0&&u.item(-1)!==f){this.__lines.splice(d+1,0,new c(this)),this.previous_line=this.__lines[this.__lines.length-2];break}d--}},r.exports.Output=n},function(r){function c(i,n,l,f){this.type=i,this.text=n,this.comments_before=null,this.newlines=l||0,this.whitespace_before=f||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}r.exports.Token=c},,,function(r){function c(l,f){this.raw_options=i(l,f),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}c.prototype._get_array=function(l,f){var d=this.raw_options[l],u=f||[];return typeof d=="object"?d!==null&&typeof d.concat=="function"&&(u=d.concat()):typeof d=="string"&&(u=d.split(/[^a-zA-Z0-9_\/\-]+/)),u},c.prototype._get_boolean=function(l,f){var d=this.raw_options[l],u=d===void 0?!!f:!!d;return u},c.prototype._get_characters=function(l,f){var d=this.raw_options[l],u=f||"";return typeof d=="string"&&(u=d.replace(/\\r/,"\r").replace(/\\n/,` `).replace(/\\t/," ")),u},c.prototype._get_number=function(l,f){var d=this.raw_options[l];f=parseInt(f,10),isNaN(f)&&(f=0);var u=parseInt(d,10);return isNaN(u)&&(u=f),u},c.prototype._get_selection=function(l,f,d){var u=this._get_selection_list(l,f,d);if(u.length!==1)throw new Error("Invalid Option Value: The option '"+l+`' can only be one of the following values: `+f+` You passed in: '`+this.raw_options[l]+"'");return u[0]},c.prototype._get_selection_list=function(l,f,d){if(!f||f.length===0)throw new Error("Selection list cannot be empty.");if(d=d||[f[0]],!this._is_valid_selection(d,f))throw new Error("Invalid Default Value!");var u=this._get_array(l,d);if(!this._is_valid_selection(u,f))throw new Error("Invalid Option Value: The option '"+l+`' can contain only the following values: `+f+` You passed in: '`+this.raw_options[l]+"'");return u},c.prototype._is_valid_selection=function(l,f){return l.length&&f.length&&!l.some(function(d){return f.indexOf(d)===-1})};function i(l,f){var d={};l=n(l);var u;for(u in l)u!==f&&(d[u]=l[u]);if(f&&l[f])for(u in l[f])d[u]=l[f][u];return d}function n(l){var f={},d;for(d in l){var u=d.replace(/-/g,"_");f[u]=l[d]}return f}r.exports.Options=c,r.exports.normalizeOpts=n,r.exports.mergeOpts=i},,function(r){var c=RegExp.prototype.hasOwnProperty("sticky");function i(n){this.__input=n||"",this.__input_length=this.__input.length,this.__position=0}i.prototype.restart=function(){this.__position=0},i.prototype.back=function(){this.__position>0&&(this.__position-=1)},i.prototype.hasNext=function(){return this.__position=0&&n=0&&l=n.length&&this.__input.substring(l-n.length,l).toLowerCase()===n},r.exports.InputScanner=i},function(r,c,i){var n=i(8).InputScanner,l=i(3).Token,f=i(10).TokenStream,d=i(11).WhitespacePattern,u={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},o=function(s,E){this._input=new n(s),this._options=E||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new d(this._input)};o.prototype.tokenize=function(){this._input.restart(),this.__tokens=new f,this._reset();for(var s,E=new l(u.START,""),b=null,p=[],D=new f;E.type!==u.EOF;){for(s=this._get_next_token(E,b);this._is_comment(s);)D.add(s),s=this._get_next_token(E,b);D.isEmpty()||(s.comments_before=D,D=new f),s.parent=b,this._is_opening(s)?(p.push(b),b=s):b&&this._is_closing(s,b)&&(s.opened=b,b.closed=s,b=p.pop(),s.parent=b),s.previous=E,E.next=s,this.__tokens.add(s),E=s}return this.__tokens},o.prototype._is_first_token=function(){return this.__tokens.isEmpty()},o.prototype._reset=function(){},o.prototype._get_next_token=function(s,E){this._readWhitespace();var b=this._input.read(/.+/g);return b?this._create_token(u.RAW,b):this._create_token(u.EOF,"")},o.prototype._is_comment=function(s){return!1},o.prototype._is_opening=function(s){return!1},o.prototype._is_closing=function(s,E){return!1},o.prototype._create_token=function(s,E){var b=new l(s,E,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return b},o.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},r.exports.Tokenizer=o,r.exports.TOKEN=u},function(r){function c(i){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=i}c.prototype.restart=function(){this.__position=0},c.prototype.isEmpty=function(){return this.__tokens_length===0},c.prototype.hasNext=function(){return this.__position=0&&i/),erb:o.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:o.starting_with(/{%/).until_after(/%}/),django_value:o.starting_with(/{{/).until_after(/}}/),django_comment:o.starting_with(/{#/).until_after(/#}/),smarty:o.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:o.starting_with(/{\*/).until_after(/\*}/),smarty_literal:o.starting_with(/{literal}/).until_after(/{\/literal}/)}}f.prototype=new n,f.prototype._create=function(){return new f(this._input,this)},f.prototype._update=function(){this.__set_templated_pattern()},f.prototype.disable=function(d){var u=this._create();return u._disabled[d]=!0,u._update(),u},f.prototype.read_options=function(d){var u=this._create();for(var o in l)u._disabled[o]=d.templating.indexOf(o)===-1;return u._update(),u},f.prototype.exclude=function(d){var u=this._create();return u._excluded[d]=!0,u._update(),u},f.prototype.read=function(){var d="";this._match_pattern?d=this._input.read(this._starting_pattern):d=this._input.read(this._starting_pattern,this.__template_pattern);for(var u=this._read_template();u;)this._match_pattern?u+=this._input.read(this._match_pattern):u+=this._input.readUntil(this.__template_pattern),d+=u,u=this._read_template();return this._until_after&&(d+=this._input.readUntilAfter(this._until_pattern)),d},f.prototype.__set_templated_pattern=function(){var d=[];this._disabled.php||d.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||d.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||d.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(d.push(this.__patterns.django._starting_pattern.source),d.push(this.__patterns.django_value._starting_pattern.source),d.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||d.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&d.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+d.join("|")+")")},f.prototype._read_template=function(){var d="",u=this._input.peek();if(u==="<"){var o=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&o==="?"&&(d=d||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&o==="%"&&(d=d||this.__patterns.erb.read())}else u==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(d=d||this.__patterns.handlebars_comment.read(),d=d||this.__patterns.handlebars_unescaped.read(),d=d||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(d=d||this.__patterns.django_value.read()),this._excluded.django||(d=d||this.__patterns.django_comment.read(),d=d||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(d=d||this.__patterns.smarty_comment.read(),d=d||this.__patterns.smarty_literal.read(),d=d||this.__patterns.smarty.read()));return d},r.exports.TemplatablePattern=f},,,,function(r,c,i){var n=i(19).Beautifier,l=i(20).Options;function f(d,u,o,s){var E=new n(d,u,o,s);return E.beautify()}r.exports=f,r.exports.defaultOptions=function(){return new l}},function(r,c,i){var n=i(20).Options,l=i(2).Output,f=i(21).Tokenizer,d=i(21).TOKEN,u=/\r\n|[\r\n]/,o=/\r\n|[\r\n]/g,s=function(F,P){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=F.max_preserve_newlines,this.preserve_newlines=F.preserve_newlines,this._output=new l(F,P)};s.prototype.current_line_has_match=function(F){return this._output.current_line.has_match(F)},s.prototype.set_space_before_token=function(F,P){this._output.space_before_token=F,this._output.non_breaking_space=P},s.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},s.prototype.add_raw_token=function(F){this._output.add_raw_token(F)},s.prototype.print_preserved_newlines=function(F){var P=0;F.type!==d.TEXT&&F.previous.type!==d.TEXT&&(P=F.newlines?1:0),this.preserve_newlines&&(P=F.newlines0);return P!==0},s.prototype.traverse_whitespace=function(F){return F.whitespace_before||F.newlines?(this.print_preserved_newlines(F)||(this._output.space_before_token=!0),!0):!1},s.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},s.prototype.print_newline=function(F){this._output.add_new_line(F)},s.prototype.print_token=function(F){F.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(F.text))},s.prototype.indent=function(){this.indent_level++},s.prototype.get_full_indent=function(F){return F=this.indent_level+(F||0),F<1?"":this._output.get_indent_string(F)};var E=function(F){for(var P=null,A=F.next;A.type!==d.EOF&&F.closed!==A;){if(A.type===d.ATTRIBUTE&&A.text==="type"){A.next&&A.next.type===d.EQUALS&&A.next.next&&A.next.next.type===d.VALUE&&(P=A.next.next.text);break}A=A.next}return P},b=function(F,P){var A=null,X=null;return P.closed?(F==="script"?A="text/javascript":F==="style"&&(A="text/css"),A=E(P)||A,A.search("text/css")>-1?X="css":A.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?X="javascript":A.search(/(text|application|dojo)\/(x-)?(html)/)>-1?X="html":A.search(/test\/null/)>-1&&(X="null"),X):null};function p(F,P){return P.indexOf(F)!==-1}function D(F,P,A){this.parent=F||null,this.tag=P?P.tag_name:"",this.indent_level=A||0,this.parser_token=P||null}function R(F){this._printer=F,this._current_frame=null}R.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},R.prototype.record_tag=function(F){var P=new D(this._current_frame,F,this._printer.indent_level);this._current_frame=P},R.prototype._try_pop_frame=function(F){var P=null;return F&&(P=F.parser_token,this._printer.indent_level=F.indent_level,this._current_frame=F.parent),P},R.prototype._get_frame=function(F,P){for(var A=this._current_frame;A&&!(F.indexOf(A.tag)!==-1);){if(P&&P.indexOf(A.tag)!==-1){A=null;break}A=A.parent}return A},R.prototype.try_pop=function(F,P){var A=this._get_frame([F],P);return this._try_pop_frame(A)},R.prototype.indent_to_tag=function(F){var P=this._get_frame(F);P&&(this._printer.indent_level=P.indent_level)};function y(F,P,A,X){this._source_text=F||"",P=P||{},this._js_beautify=A,this._css_beautify=X,this._tag_stack=null;var z=new n(P,"html");this._options=z,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,"force".length)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,"preserve".length)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}y.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var F=this._source_text,P=this._options.eol;this._options.eol==="auto"&&(P=` `,F&&u.test(F)&&(P=F.match(u)[0])),F=F.replace(o,` `);var A=F.match(/^[\t ]*/)[0],X={text:"",type:""},z=new x,O=new s(this._options,A),B=new f(F,this._options).tokenize();this._tag_stack=new R(O);for(var U=null,L=B.next();L.type!==d.EOF;)L.type===d.TAG_OPEN||L.type===d.COMMENT?(U=this._handle_tag_open(O,L,z,X),z=U):L.type===d.ATTRIBUTE||L.type===d.EQUALS||L.type===d.VALUE||L.type===d.TEXT&&!z.tag_complete?U=this._handle_inside_tag(O,L,z,B):L.type===d.TAG_CLOSE?U=this._handle_tag_close(O,L,z):L.type===d.TEXT?U=this._handle_text(O,L,z):O.add_raw_token(L),X=U,L=B.next();var G=O._output.get_code(P);return G},y.prototype._handle_tag_close=function(F,P,A){var X={text:P.text,type:P.type};return F.alignment_size=0,A.tag_complete=!0,F.set_space_before_token(P.newlines||P.whitespace_before!=="",!0),A.is_unformatted?F.add_raw_token(P):(A.tag_start_char==="<"&&(F.set_space_before_token(P.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&A.has_wrapped_attrs&&F.print_newline(!1)),F.print_token(P)),A.indent_content&&!(A.is_unformatted||A.is_content_unformatted)&&(F.indent(),A.indent_content=!1),!A.is_inline_element&&!(A.is_unformatted||A.is_content_unformatted)&&F.set_wrap_point(),X},y.prototype._handle_inside_tag=function(F,P,A,X){var z=A.has_wrapped_attrs,O={text:P.text,type:P.type};if(F.set_space_before_token(P.newlines||P.whitespace_before!=="",!0),A.is_unformatted)F.add_raw_token(P);else if(A.tag_start_char==="{"&&P.type===d.TEXT)F.print_preserved_newlines(P)?(P.newlines=0,F.add_raw_token(P)):F.print_token(P);else{if(P.type===d.ATTRIBUTE?(F.set_space_before_token(!0),A.attr_count+=1):(P.type===d.EQUALS||P.type===d.VALUE&&P.previous.type===d.EQUALS)&&F.set_space_before_token(!1),P.type===d.ATTRIBUTE&&A.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(F.traverse_whitespace(P),z=z||P.newlines!==0),this._is_wrap_attributes_force)){var B=A.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&A.attr_count===1){var U=!0,L=0,G;do{if(G=X.peek(L),G.type===d.ATTRIBUTE){U=!1;break}L+=1}while(L<4&&G.type!==d.EOF&&G.type!==d.TAG_CLOSE);B=!U}B&&(F.print_newline(!1),z=!0)}F.print_token(P),z=z||F.previous_token_wrapped(),A.has_wrapped_attrs=z}return O},y.prototype._handle_text=function(F,P,A){var X={text:P.text,type:"TK_CONTENT"};return A.custom_beautifier_name?this._print_custom_beatifier_text(F,P,A):A.is_unformatted||A.is_content_unformatted?F.add_raw_token(P):(F.traverse_whitespace(P),F.print_token(P)),X},y.prototype._print_custom_beatifier_text=function(F,P,A){var X=this;if(P.text!==""){var z=P.text,O,B=1,U="",L="";A.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?O=this._js_beautify:A.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?O=this._css_beautify:A.custom_beautifier_name==="html"&&(O=function(_e,fe){var Re=new y(_e,fe,X._js_beautify,X._css_beautify);return Re.beautify()}),this._options.indent_scripts==="keep"?B=0:this._options.indent_scripts==="separate"&&(B=-F.indent_level);var G=F.get_full_indent(B);if(z=z.replace(/\n[ \t]*$/,""),A.custom_beautifier_name!=="html"&&z[0]==="<"&&z.match(/^(|]]>)$/.exec(z);if(!ee){F.add_raw_token(P);return}U=G+ee[1]+` `,z=ee[4],ee[5]&&(L=G+ee[5]),z=z.replace(/\n[ \t]*$/,""),(ee[2]||ee[3].indexOf(` `)!==-1)&&(ee=ee[3].match(/[ \t]+$/),ee&&(P.whitespace_before=ee[0]))}if(z)if(O){var oe=function(){this.eol=` `};oe.prototype=this._options.raw_options;var ae=new oe;z=O(G+z,ae)}else{var be=P.whitespace_before;be&&(z=z.replace(new RegExp(` (`+be+")?","g"),` `)),z=G+z.replace(/\n/g,` `+G)}U&&(z?z=U+z+` `+L:z=U+L),F.print_newline(!1),z&&(P.text=z,P.whitespace_before="",P.newlines=0,F.add_raw_token(P),F.print_newline(!0))}},y.prototype._handle_tag_open=function(F,P,A,X){var z=this._get_tag_open_token(P);return(A.is_unformatted||A.is_content_unformatted)&&!A.is_empty_element&&P.type===d.TAG_OPEN&&P.text.indexOf("]*)/),this.tag_check=A?A[1]:""):(A=P.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=A?A[1]:"",(P.text.startsWith("{{#>")||P.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&P.next!==null?this.tag_check=P.next.text.split(" ")[0]:this.tag_check=P.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),P.type===d.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||P.closed&&P.closed.text==="/>";var X=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(X=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(X)))}};y.prototype._get_tag_open_token=function(F){var P=new x(this._tag_stack.get_parser_token(),F);return P.alignment_size=this._options.wrap_attributes_indent_size,P.is_end_tag=P.is_end_tag||p(P.tag_check,this._options.void_elements),P.is_empty_element=P.tag_complete||P.is_start_tag&&P.is_end_tag,P.is_unformatted=!P.tag_complete&&p(P.tag_check,this._options.unformatted),P.is_content_unformatted=!P.is_empty_element&&p(P.tag_check,this._options.content_unformatted),P.is_inline_element=p(P.tag_name,this._options.inline)||P.tag_name.includes("-")||P.tag_start_char==="{",P},y.prototype._set_tag_position=function(F,P,A,X,z){if(A.is_empty_element||(A.is_end_tag?A.start_tag_token=this._tag_stack.try_pop(A.tag_name):(this._do_optional_end_element(A)&&(A.is_inline_element||F.print_newline(!1)),this._tag_stack.record_tag(A),(A.tag_name==="script"||A.tag_name==="style")&&!(A.is_unformatted||A.is_content_unformatted)&&(A.custom_beautifier_name=b(A.tag_check,P)))),p(A.tag_check,this._options.extra_liners)&&(F.print_newline(!1),F._output.just_added_blankline()||F.print_newline(!0)),A.is_empty_element){if(A.tag_start_char==="{"&&A.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),A.indent_content=!0;var O=F.current_line_has_match(/{{#if/);O||F.print_newline(!1)}A.tag_name==="!--"&&z.type===d.TAG_CLOSE&&X.is_end_tag&&A.text.indexOf(` `)===-1||(A.is_inline_element||A.is_unformatted||F.print_newline(!1),this._calcluate_parent_multiline(F,A))}else if(A.is_end_tag){var B=!1;B=A.start_tag_token&&A.start_tag_token.multiline_content,B=B||!A.is_inline_element&&!(X.is_inline_element||X.is_unformatted)&&!(z.type===d.TAG_CLOSE&&A.start_tag_token===X)&&z.type!=="TK_CONTENT",(A.is_content_unformatted||A.is_unformatted)&&(B=!1),B&&F.print_newline(!1)}else A.indent_content=!A.custom_beautifier_name,A.tag_start_char==="<"&&(A.tag_name==="html"?A.indent_content=this._options.indent_inner_html:A.tag_name==="head"?A.indent_content=this._options.indent_head_inner_html:A.tag_name==="body"&&(A.indent_content=this._options.indent_body_inner_html)),!(A.is_inline_element||A.is_unformatted)&&(z.type!=="TK_CONTENT"||A.is_content_unformatted)&&F.print_newline(!1),this._calcluate_parent_multiline(F,A)},y.prototype._calcluate_parent_multiline=function(F,P){P.parent&&F._output.just_added_newline()&&!((P.is_inline_element||P.is_unformatted)&&P.parent.is_inline_element)&&(P.parent.multiline_content=!0)};var w=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],T=["a","audio","del","ins","map","noscript","video"];y.prototype._do_optional_end_element=function(F){var P=null;if(F.is_empty_element||!F.is_start_tag||!F.parent)return;if(F.tag_name==="body")P=P||this._tag_stack.try_pop("head");else if(F.tag_name==="li")P=P||this._tag_stack.try_pop("li",["ol","ul"]);else if(F.tag_name==="dd"||F.tag_name==="dt")P=P||this._tag_stack.try_pop("dt",["dl"]),P=P||this._tag_stack.try_pop("dd",["dl"]);else if(F.parent.tag_name==="p"&&w.indexOf(F.tag_name)!==-1){var A=F.parent.parent;(!A||T.indexOf(A.tag_name)===-1)&&(P=P||this._tag_stack.try_pop("p"))}else F.tag_name==="rp"||F.tag_name==="rt"?(P=P||this._tag_stack.try_pop("rt",["ruby","rtc"]),P=P||this._tag_stack.try_pop("rp",["ruby","rtc"])):F.tag_name==="optgroup"?P=P||this._tag_stack.try_pop("optgroup",["select"]):F.tag_name==="option"?P=P||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):F.tag_name==="colgroup"?P=P||this._tag_stack.try_pop("caption",["table"]):F.tag_name==="thead"?(P=P||this._tag_stack.try_pop("caption",["table"]),P=P||this._tag_stack.try_pop("colgroup",["table"])):F.tag_name==="tbody"||F.tag_name==="tfoot"?(P=P||this._tag_stack.try_pop("caption",["table"]),P=P||this._tag_stack.try_pop("colgroup",["table"]),P=P||this._tag_stack.try_pop("thead",["table"]),P=P||this._tag_stack.try_pop("tbody",["table"])):F.tag_name==="tr"?(P=P||this._tag_stack.try_pop("caption",["table"]),P=P||this._tag_stack.try_pop("colgroup",["table"]),P=P||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(F.tag_name==="th"||F.tag_name==="td")&&(P=P||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),P=P||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return F.parent=this._tag_stack.get_parser_token(),P},r.exports.Beautifier=y},function(r,c,i){var n=i(6).Options;function l(f){n.call(this,f,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}l.prototype=new n,r.exports.Options=l},function(r,c,i){var n=i(9).Tokenizer,l=i(9).TOKEN,f=i(13).Directives,d=i(14).TemplatablePattern,u=i(12).Pattern,o={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:l.START,RAW:l.RAW,EOF:l.EOF},s=new f(/<\!--/,/-->/),E=function(b,p){n.call(this,b,p),this._current_tag_name="";var D=new d(this._input).read_options(this._options),R=new u(this._input);if(this.__patterns={word:D.until(/[\n\r\t <]/),single_quote:D.until_after(/'/),double_quote:D.until_after(/"/),attribute:D.until(/[\n\r\t =>]|\/>/),element_name:D.until(/[\n\r\t >\/]/),handlebars_comment:R.starting_with(/{{!--/).until_after(/--}}/),handlebars:R.starting_with(/{{/).until_after(/}}/),handlebars_open:R.until(/[\n\r\t }]/),handlebars_raw_close:R.until(/}}/),comment:R.starting_with(//),cdata:R.starting_with(//),conditional_comment:R.starting_with(//),processing:R.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var y=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=R.matching(y).until_after(y)}};E.prototype=new n,E.prototype._is_comment=function(b){return!1},E.prototype._is_opening=function(b){return b.type===o.TAG_OPEN},E.prototype._is_closing=function(b,p){return b.type===o.TAG_CLOSE&&p&&((b.text===">"||b.text==="/>")&&p.text[0]==="<"||b.text==="}}"&&p.text[0]==="{"&&p.text[1]==="{")},E.prototype._reset=function(){this._current_tag_name=""},E.prototype._get_next_token=function(b,p){var D=null;this._readWhitespace();var R=this._input.peek();return R===null?this._create_token(o.EOF,""):(D=D||this._read_open_handlebars(R,p),D=D||this._read_attribute(R,b,p),D=D||this._read_close(R,p),D=D||this._read_raw_content(R,b,p),D=D||this._read_content_word(R),D=D||this._read_comment_or_cdata(R),D=D||this._read_processing(R),D=D||this._read_open(R,p),D=D||this._create_token(o.UNKNOWN,this._input.next()),D)},E.prototype._read_comment_or_cdata=function(b){var p=null,D=null,R=null;if(b==="<"){var y=this._input.peek(1);y==="!"&&(D=this.__patterns.comment.read(),D?(R=s.get_directives(D),R&&R.ignore==="start"&&(D+=s.readIgnored(this._input))):D=this.__patterns.cdata.read()),D&&(p=this._create_token(o.COMMENT,D),p.directives=R)}return p},E.prototype._read_processing=function(b){var p=null,D=null,R=null;if(b==="<"){var y=this._input.peek(1);(y==="!"||y==="?")&&(D=this.__patterns.conditional_comment.read(),D=D||this.__patterns.processing.read()),D&&(p=this._create_token(o.COMMENT,D),p.directives=R)}return p},E.prototype._read_open=function(b,p){var D=null,R=null;return p||b==="<"&&(D=this._input.next(),this._input.peek()==="/"&&(D+=this._input.next()),D+=this.__patterns.element_name.read(),R=this._create_token(o.TAG_OPEN,D)),R},E.prototype._read_open_handlebars=function(b,p){var D=null,R=null;return p||this._options.indent_handlebars&&b==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(D=this.__patterns.handlebars_comment.read(),D=D||this.__patterns.handlebars.read(),R=this._create_token(o.COMMENT,D)):(D=this.__patterns.handlebars_open.read(),R=this._create_token(o.TAG_OPEN,D))),R},E.prototype._read_close=function(b,p){var D=null,R=null;return p&&(p.text[0]==="<"&&(b===">"||b==="/"&&this._input.peek(1)===">")?(D=this._input.next(),b==="/"&&(D+=this._input.next()),R=this._create_token(o.TAG_CLOSE,D)):p.text[0]==="{"&&b==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),R=this._create_token(o.TAG_CLOSE,"}}"))),R},E.prototype._read_attribute=function(b,p,D){var R=null,y="";if(D&&D.text[0]==="<")if(b==="=")R=this._create_token(o.EQUALS,this._input.next());else if(b==='"'||b==="'"){var x=this._input.next();b==='"'?x+=this.__patterns.double_quote.read():x+=this.__patterns.single_quote.read(),R=this._create_token(o.VALUE,x)}else y=this.__patterns.attribute.read(),y&&(p.type===o.EQUALS?R=this._create_token(o.VALUE,y):R=this._create_token(o.ATTRIBUTE,y));return R},E.prototype._is_content_unformatted=function(b){return this._options.void_elements.indexOf(b)===-1&&(this._options.content_unformatted.indexOf(b)!==-1||this._options.unformatted.indexOf(b)!==-1)},E.prototype._read_raw_content=function(b,p,D){var R="";if(D&&D.text[0]==="{")R=this.__patterns.handlebars_raw_close.read();else if(p.type===o.TAG_CLOSE&&p.opened.text[0]==="<"&&p.text[0]!=="/"){var y=p.opened.text.substr(1).toLowerCase();if(y==="script"||y==="style"){var x=this._read_comment_or_cdata(b);if(x)return x.type=o.TEXT,x;R=this._input.readUntil(new RegExp("","ig"))}else this._is_content_unformatted(y)&&(R=this._input.readUntil(new RegExp("","ig")))}return R?this._create_token(o.TEXT,R):null},E.prototype._read_content_word=function(b){var p="";if(this._options.unformatted_content_delimiter&&(b===this._options.unformatted_content_delimiter[0]&&(p=this.__patterns.unformatted_content_delimiter.read())),p||(p=this.__patterns.word.read()),p)return this._create_token(o.TEXT,p)},r.exports.Tokenizer=E,r.exports.TOKEN=o}],_={};function e(r){var c=_[r];if(c!==void 0)return c.exports;var i=_[r]={exports:{}};return C[r](i,i.exports,e),i.exports}var h=e(18);S=h})();var k=S;if(!0)!(N=[I,I("6UM0"),I("TXwP")],g=function(C){var _=I("6UM0"),e=I("TXwP");return{html_beautify:function(h,r){return k(h,r,_.js_beautify,e.css_beautify)}}}.apply(Z,N),g!==void 0&&(H.exports=g));else var v,m})()},qBft:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("OLod"))})(this,function(N){return N.pad.AnsiX923={pad:function(g,S){var k=g.sigBytes,v=S*4,m=v-k%v,C=k+m-1;g.clamp(),g.words[C>>>2]|=m<<24-C%4*8,g.sigBytes+=m},unpad:function(g){var S=g.words[g.sigBytes-1>>>2]&255;g.sigBytes-=S}},N.pad.Ansix923})},qM6L:function(H,Z,I){(function(N,g){H.exports=Z=g(I("Ib8C"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.WordArray,v=g.enc,m=v.Utf16=v.Utf16BE={stringify:function(_){for(var e=_.words,h=_.sigBytes,r=[],c=0;c>>2]>>>16-c%4*8&65535;r.push(String.fromCharCode(i))}return r.join("")},parse:function(_){for(var e=_.length,h=[],r=0;r>>1]|=_.charCodeAt(r)<<16-r%2*16;return k.create(h,e*2)}};v.Utf16LE={stringify:function(_){for(var e=_.words,h=_.sigBytes,r=[],c=0;c>>2]>>>16-c%4*8&65535);r.push(String.fromCharCode(i))}return r.join("")},parse:function(_){for(var e=_.length,h=[],r=0;r>>1]|=C(_.charCodeAt(r)<<16-r%2*16);return k.create(h,e*2)}};function C(_){return _<<8&4278255360|_>>>8&16711935}}(),N.enc.Utf16})},qu8F:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("OLod"))})(this,function(N){/** @preserve * Counter block mode compatible with Dr Brian Gladman fileenc.c * derived from CryptoJS.mode.CTR * Jan Hruby jhruby.web@gmail.com */return N.mode.CTRGladman=function(){var g=N.lib.BlockCipherMode.extend();function S(m){if((m>>24&255)===255){var C=m>>16&255,_=m>>8&255,e=m&255;C===255?(C=0,_===255?(_=0,e===255?e=0:++e):++_):++C,m=0,m+=C<<16,m+=_<<8,m+=e}else m+=1<<24;return m}function k(m){return(m[0]=S(m[0]))===0&&(m[1]=S(m[1])),m}var v=g.Encryptor=g.extend({processBlock:function(m,C){var _=this._cipher,e=_.blockSize,h=this._iv,r=this._counter;h&&(r=this._counter=h.slice(0),this._iv=void 0),k(r);var c=r.slice(0);_.encryptBlock(c,0);for(var i=0;i=S.length?{done:!0}:{done:!1,value:S[m++]}},e:function(c){throw c},f:C}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var _=!0,e=!1,h;return{s:function(){v=S[Symbol.iterator]()},n:function(){var c=v.next();return _=c.done,c},e:function(c){e=!0,h=c},f:function(){try{!_&&v.return!=null&&v.return()}finally{if(e)throw h}}}}},rUJ1:function(H,Z){const I=/[&<>"']/,N=/[&<>"']/g,g=/[<>"']|&(?!#?\w+;)/,S=/[<>"']|&(?!#?\w+;)/g,k={"&":"&","<":"<",">":">",'"':""","'":"'"},v=R=>k[R];function m(R,y){if(y){if(I.test(R))return R.replace(N,v)}else if(g.test(R))return R.replace(S,v);return R}const C=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function _(R){return R.replace(C,(y,x)=>(x=x.toLowerCase(),x==="colon"?":":x.charAt(0)==="#"?x.charAt(1)==="x"?String.fromCharCode(parseInt(x.substring(2),16)):String.fromCharCode(+x.substring(1)):""))}const e=/(^|[^\[])\^/g;function h(R,y){R=R.source||R,y=y||"";const x={replace:(w,T)=>(T=T.source||T,T=T.replace(e,"$1"),R=R.replace(w,T),x),getRegex:()=>new RegExp(R,y)};return x}const r=/[^\w:]/g,c=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function i(R,y,x){if(R){let w;try{w=decodeURIComponent(_(x)).replace(r,"").toLowerCase()}catch(T){return null}if(w.indexOf("javascript:")===0||w.indexOf("vbscript:")===0||w.indexOf("data:")===0)return null}y&&!c.test(x)&&(x=u(y,x));try{x=encodeURI(x).replace(/%25/g,"%")}catch(w){return null}return x}const n={},l=/^[^:]+:\/*[^/]*$/,f=/^([^:]+:)[\s\S]*$/,d=/^([^:]+:\/*[^/]*)[\s\S]*$/;function u(R,y){n[" "+R]||(l.test(R)?n[" "+R]=R+"/":n[" "+R]=b(R,"/",!0)),R=n[" "+R];const x=R.indexOf(":")===-1;return y.substring(0,2)==="//"?x?y:R.replace(f,"$1")+y:y.charAt(0)==="/"?x?y:R.replace(d,"$1")+y:R+y}const o={exec:function(){}};function s(R){let y=1,x,w;for(;y{let X=!1,z=P;for(;--z>=0&&A[z]==="\\";)X=!X;return X?"|":" |"}),w=x.split(/ \|/);let T=0;if(w.length>y)w.splice(y);else for(;w.length0&&(xt.children=[],Y(yt,xt.children))})}function V(mt,Ct){for(var dt=[],Ht=0;Ht0){dt[0]=yt.id;for(var xt=0;xt0&&jt[0]!==void 0?jt[0]:"",Ar(!0),ur.next=4,Object(le.a)("/api/tag_disciplines.json",{method:"get",params:{target:dt,search:nn}});case 4:_n=ur.sent,hn(_n.tag_disciplines||[]),Ar(!1);case 7:case"end":return ur.stop()}},dr)}));return function(){return Vr.apply(this,arguments)}}(),bn=function(dr){var nn=dr.name;B.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u91CD\u547D\u540D",content:ae.a.createElement("div",null,ae.a.createElement(L.a,{defaultValue:nn,placeholder:"\u8BF7\u8F93\u5165".concat(fn,"\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57"),maxLength:20,onChange:function(jt){nn=jt.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var _n=Object(w.a)(ee.a.mark(function lr(){var ur;return ee.a.wrap(function(br){for(;;)switch(br.prev=br.next){case 0:if(nn){br.next=3;break}return x.b.warn("\u9898\u76EE".concat(fn,"\u4E0D\u80FD\u4E3A\u7A7A")),br.abrupt("return",Promise.reject());case 3:return br.next=5,Object(le.a)("/api/tag_disciplines/".concat(dr.id,"/rename.json"),{method:"post",body:{id:dr.id,name:nn}});case 5:ur=br.sent,(ur==null?void 0:ur.status)===0&&Kn();case 7:case"end":return br.stop()}},lr)}));function jt(){return _n.apply(this,arguments)}return jt}()})},Fr=function(dr){B.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,width:570,title:"\u5220\u9664",content:dt==="practice"?ae.a.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u6765\u6E90\u201C",ae.a.createElement("span",{className:"c-light-primary"},dr.name),"\u201D\u5220\u9664\u5417\uFF1F",ae.a.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u6765\u6E90\u8FDB\u884C\u6E05\u9664\u3002"):ae.a.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u77E5\u8BC6\u70B9\u201C",ae.a.createElement("span",{className:"c-light-primary"},dr.name),"\u201D\u5220\u9664\u5417\uFF1F",ae.a.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u77E5\u8BC6\u70B9\u8FDB\u884C\u6E05\u9664\u3002"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var nn=Object(w.a)(ee.a.mark(function jt(){var lr;return ee.a.wrap(function(Rr){for(;;)switch(Rr.prev=Rr.next){case 0:return Rr.next=2,Object(le.a)("/api/tag_disciplines/".concat(dr.id,".json"),{method:"delete",body:{id:dr.id}});case 2:lr=Rr.sent,(lr==null?void 0:lr.status)===0&&Kn();case 4:case"end":return Rr.stop()}},jt)}));function _n(){return nn.apply(this,arguments)}return _n}()})},di=function(dr){Kn(dr)},fn=dt==="practice"?"\u77E5\u8BC6\u70B9":"\u6765\u6E90";return ae.a.createElement(B.a,{afterClose:function(){Hr(!1),Ar(!1),jr(""),zr("1"),hn([])},centered:!0,keyboard:!1,width:600,title:"".concat(fn,"\u7BA1\u7406"),visible:!!dt,className:at.a.customModal,footer:null,onCancel:Gt},ae.a.createElement("section",{className:at.a.wrap},ae.a.createElement(He.a,{activeKey:cn,onChange:function(dr){jr(""),zr(dr),Kn()}},ae.a.createElement(He.a.TabPane,{tab:"\u65B0\u589E".concat(fn),key:"1"},ae.a.createElement(L.a,{value:ct,onChange:function(dr){return jr(dr.target.value)},className:at.a.in,placeholder:"\u8F93\u5165".concat(fn,"\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57"),maxLength:20}),ae.a.createElement("div",{className:at.a.btns},ae.a.createElement(E.a,{onClick:Gt,className:"mr20"},"\u53D6\u6D88"," "),ae.a.createElement(E.a,{loading:kt,onClick:Ei,type:"primary"},"\u786E\u8BA4\u65B0\u5EFA"))),ae.a.createElement(He.a.TabPane,{tab:"\u5DF2\u6709".concat(fn),key:"2"},ae.a.createElement(L.a.Search,{allowClear:!0,onSearch:di,value:ct,onChange:function(dr){return jr(dr.target.value)},className:at.a.in,placeholder:"\u8F93\u5165".concat(fn,"\u540D\u79F0\u8FDB\u884C\u67E5\u8BE2")}),ae.a.createElement(o.a,{dataSource:An,bordered:!1,loading:Kt,scroll:An.length>7?{y:300}:{},style:{padding:"0 40px 20px 40px"},columns:[{title:"".concat(fn,"\u540D\u79F0"),dataIndex:"name",ellipsis:!0},{title:"\u64CD\u4F5C",dataIndex:"action",width:120,render:function(dr,nn){return ae.a.createElement("span",null,ae.a.createElement("span",{onClick:function(){return bn(nn)},className:"current mr10 c-light-primary"},"\u91CD\u547D\u540D"),ae.a.createElement("span",{onClick:function(){return Fr(nn)},className:"current c-grey-666"},"\u5220\u9664"))}}],pagination:!1})))))},st=it,Tt=I("m3rI"),pt=I("B7Ph"),ht=I("wd/R"),Ft=I.n(ht),Lt=I("1vsH"),Yt=I("9Bee"),$t=I("xKgJ"),Mt=L.a.TextArea,wt=B.a.confirm,Jt=z.a.Panel,Dt={loading:!0,user:null,status:0,data:void 0,lastedUpdateTime:0},St;(function(mt){mt[mt.SET_INITAL_DATA=0]="SET_INITAL_DATA",mt[mt.SET_LOADING=1]="SET_LOADING",mt[mt.SET_STATUS=2]="SET_STATUS"})(St||(St={}));var _t="#### \u9898\u76EE\u63CF\u8FF0\n\u73B0\u6709\u4E00\u4E2A\u6574\u578B\u6570\u7EC4 `nums`\uFF0C\u8BF7\u7F16\u5199\u7A0B\u5E8F\u5C06\u6570\u7EC4 `nums` \u4E2D\u7684\u6240\u6709 `$$0$$` \u79FB\u52A8\u5230\u6570\u7EC4\u7684\u672B\u5C3E\uFF0C\u4F46\u4E0D\u6539\u53D8\u975E\u96F6\u5143\u7D20\u5728\u6570\u7EC4\u4E2D\u7684\u76F8\u5BF9\u4F4D\u7F6E\u3002\u8BF7\u5728\u539F\u6570\u7EC4 `nums` \u4E0A\u8FDB\u884C\u64CD\u4F5C\u3002\n#### \u8F93\u5165\u8F93\u51FA\u683C\u5F0F\n**\u8F93\u5165\u683C\u5F0F**\n\u7B2C\u4E00\u884C\u6709\u4E00\u4E2A\u6574\u6570 `numsSize`\uFF0C\u8868\u793A\u6570\u7EC4 `nums` \u7684\u5927\u5C0F\uFF1B\n\u7B2C\u4E8C\u884C\u6709 `numsSize` \u4E2A\u6574\u6570\uFF0C\u8868\u793A\u6570\u7EC4 `nums` \u7684\u6240\u6709\u5143\u7D20\uFF0C\u6BCF\u4E2A\u6574\u6570\u7528\u4E00\u4E2A\u7A7A\u683C\u9694\u5F00\u3002\n**\u8F93\u51FA\u683C\u5F0F**\n\u4E00\u884C\u8F93\u51FA\u6570\u7EC4 `nums` \u7684\u6240\u6709\u5143\u7D20\uFF0C\u6709 `numsSize` \u4E2A\u6574\u6570\uFF0C\u6BCF\u4E2A\u6574\u6570\u7528\u4E00\u4E2A\u7A7A\u683C\u9694\u5F00\u3002\n#### \u8F93\u5165\u8F93\u51FA\u6837\u4F8B1\n**\u8F93\u5165**\n`4`\n`0 1 2 3`\n**\u8F93\u51FA**\n`1 2 3 0`\n**\u89E3\u91CA\uFF08\u53EF\u9009\uFF09**\nXXXXX\n#### \u8F93\u5165\u8F93\u51FA\u6837\u4F8B2\n**\u8F93\u5165**\n`5`\n`1 1 0 1 0`\n**\u8F93\u51FA**\n`1 1 1 0 0`\n**\u89E3\u91CA\uFF08\u53EF\u9009\uFF09**\nXXXXX\n#### \u8BF4\u660E\u63D0\u793A\n-`1\u2264n\u2264100`";function Et(mt,Ct){switch(Ct.type){case St.SET_INITAL_DATA:return Object(A.a)(Object(A.a)({},mt),Ct.payload);case St.SET_LOADING:return Object(A.a)(Object(A.a)({},mt),{},{loading:Ct.payload});case St.SET_STATUS:return Object(A.a)(Object(A.a)({},mt),{},{status:Ct.payload});default:throw new Error}}var Bt=Z.default=function(){var mt,Ct,dt,Ht=Object(Q.h)(),Gt=Object(Q.g)(),yt=Object(Q.i)(),xt=yt.id,Kt=F.a.useForm(),Ar=Object(P.a)(Kt,1),qt=Ar[0],ut=Object(oe.useState)(),kt=Object(P.a)(ut,2),Hr=kt[0],Yr=kt[1],On=Object(oe.useState)(!1),cn=Object(P.a)(On,2),zr=cn[0],Pt=cn[1],dn=Object(oe.useState)([]),ct=Object(P.a)(dn,2),jr=ct[0],xr=ct[1],Gn=Object(oe.useState)([]),An=Object(P.a)(Gn,2),hn=An[0],Ei=An[1],Kn=Object(oe.useState)([]),bn=Object(P.a)(Kn,2),Fr=bn[0],di=bn[1],fn=Object(oe.useState)([]),Vr=Object(P.a)(fn,2),dr=Vr[0],nn=Vr[1],_n=Object(oe.useState)([]),jt=Object(P.a)(_n,2),lr=jt[0],ur=jt[1],Rr=Object(oe.useState)("C"),br=Object(P.a)(Rr,2),hi=br[0],Fn=br[1],$i=Object(oe.useReducer)(Et,Dt),Ji=Object(P.a)($i,2),Oi=Ji[0],pn=Ji[1],Ki=Oi.loading,Zr=Oi.data,ri=Oi.user,kn=Oi.status,sn=Zr==null?void 0:Zr.hack_sets,Tn=Zr==null||((mt=Zr.hack)===null||mt===void 0)?void 0:mt.test_set_average,fi=Object(oe.useState)(!1),zn=Object(P.a)(fi,2),Vn=zn[0],ki=zn[1],Mi=Object(oe.useRef)([]),Xn=Object(oe.useState)(!1),ji=Object(P.a)(Xn,2),pi=ji[0],mi=ji[1],Yn=Object(oe.useState)(!1),$n=Object(P.a)(Yn,2),Pi=$n[0],ni=$n[1],gi=Object(oe.useRef)(!0),Fi=Object(oe.useState)({}),ii=Object(P.a)(Fi,2),Ur=ii[0],Ut=ii[1];Object(oe.useEffect)(function(){return Object(q.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),Object(q.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),function(){Object(q.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),Object(q.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}},[]),Object(oe.useEffect)(function(){setTimeout(function(){document.title="\u5728\u7EBF\u5237\u9898"},400)});var er=function(){var tr=Object(w.a)(ee.a.mark(function It(){var ir,or;return ee.a.wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:return vr.next=2,Object(le.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice"}});case 2:return ir=vr.sent,vr.next=5,Object(le.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice_source"}});case 5:or=vr.sent,Ei(ir.tag_disciplines||[]),di(or.tag_disciplines||[]);case 8:case"end":return vr.stop()}},It)}));return function(){return tr.apply(this,arguments)}}(),zt=[{language:"C",code:""},{language:"C++",code:""},{language:"Java",code:""},{language:"Python",code:""}],ar=Object(oe.useCallback)(Object(w.a)(ee.a.mark(function tr(){var It,ir,or,Wr,vr,mn,an,Ai,In,Mn,Bn,Xi,ke,Ge,Ve,Ne,xe,Le,Se,je,Be,ze,Ke,Qe,ot,vt,gt;return ee.a.wrap(function(Xt){for(;;)switch(Xt.prev=Xt.next){case 0:if(pn({type:St.SET_LOADING,payload:!0}),!xt){Xt.next=19;break}return Xt.next=4,Fe(xt);case 4:It=Xt.sent,ir=It.user,or=It.language,Wr=It.practice_sets,vr=It.practice_codes,mn=It.description,an=It.difficulty,Ai=It.name,In=It.open_or_not,Mn=It.time_limit,Bn=It.test_set_average,Xi=It.test_set_score,ke=It.status,Ge=It.tag_discipline_ids,Ve=It.source_discipline_ids,Ne=It.item_banks_group_id,xe=It.is_file,Le=xe===void 0?!1:xe,Se=It.hide_actual_output,je=It.review_privilege,Be=It.review_description,ze={review_privilege:je,status:ke,review_description:Be,name:Ai},Ut(ze),ki(Se),Ke=Le?[{input:"",output:"",score:100,position:1}]:Wr,Le?(xr(Wr),qt.setFieldsValue({hack_sets:Ke})):xr([]),Qe={loading:!0,user:ir,status:ke,data:{hack:{difficulty:an,name:Ai,description:mn,open_or_not:In,time_limit:Mn,test_set_average:Bn,test_set_score:Xi,tag_discipline_ids:Ge,source_discipline_ids:Ve,is_file:Le},hack_sets:Ke}},pn({type:St.SET_INITAL_DATA,payload:Qe}),Yr({hack:{difficulty:an,name:Ai,description:mn,open_or_not:In,time_limit:Mn,test_set_average:Bn,test_set_score:Xi,tag_discipline_ids:Ge,source_discipline_ids:Ve,is_file:Le}}),ot=vr==null?void 0:vr.map(function(sr){return Object(A.a)(Object(A.a)({},sr),{},{code:ie.Base64.decode(sr==null?void 0:sr.code)})}),ur(ot),Mi.current=ot,Xt.next=27;break;case 19:return Xt.next=21,we();case 21:vt=Xt.sent,gt=vt.user,pn({type:St.SET_INITAL_DATA,payload:{loading:!0,status:0,user:gt,data:{hack:{difficulty:"",time_limit:3,description:_t,test_set_score:!0,test_set_average:!0,open_or_not:!0,name:"",is_file:!1},hack_sets:[{input:"",output:"",score:100,position:1}]}}}),Yr({hack:{difficulty:"",time_limit:3,description:"",test_set_average:!0,open_or_not:!0,name:"",is_file:!1}}),ur(zt),Mi.current=zt;case 27:pn({type:St.SET_LOADING,payload:!1});case 28:case"end":return Xt.stop()}},tr)})),[xt]);Object(oe.useEffect)(function(){try{ar(),er()}catch(tr){console.log(tr,"----")}},[]);function _r(tr,It){return Lr.apply(this,arguments)}function Lr(){return Lr=Object(w.a)(ee.a.mark(function tr(It,ir){var or,Wr,vr,mn,an,Ai,In,Mn,Bn,Xi,ke,Ge,Ve,Ne,xe,Le,Se,je;return ee.a.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:Wr=Object(A.a)({},It),vr=Wr.hack_sets,mn=Wr.hack,mn.hide_actual_output=Vn,an=[],Ai=[],In=0,Mn=mn!=null&&mn.is_file?jr.map(function(Ke,Qe){return Object(A.a)(Object(A.a)({},Ke),{},{position:Qe+1})}):vr.map(function(Ke){return Object(A.a)(Object(A.a)({},Ke),{},{is_file:!1})}),Bn=Object(l.a)(Mn);try{for(Bn.s();!(Xi=Bn.n()).done;)ke=Xi.value,In+=ke.score,ke.id&&ke.id>=0?an.push(ke):Ai.push(ke)}catch(Ke){Bn.e(Ke)}finally{Bn.f()}if(Mn!=null&&Mn.length){ze.next=11;break}return x.b.error("\u6D4B\u8BD5\u96C6\u4E0D\u80FD\u4E3A\u7A7A"),ze.abrupt("return");case 11:if(!(In!==100&&!mn.test_set_score)){ze.next=14;break}return x.b.error("\u6D4B\u8BD5\u96C6\u7684\u8BC4\u5206\u5360\u6BD4\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E100"),ze.abrupt("return");case 14:if(!(Mn!=null&&Mn.some(function(Ke){return!Ke.output}))){ze.next=17;break}return x.b.error("\u6D4B\u8BD5\u96C6\u8F93\u51FA\u4E0D\u80FD\u4E3A\u7A7A"),ze.abrupt("return");case 17:if(gi.current?mi(!0):ni(!0),Ve=lr==null?void 0:lr.map(function(Ke){return Object(A.a)(Object(A.a)({},Ke),{},{code:ie.Base64.encode(Ke==null?void 0:Ke.code)})}),!xt){ze.next=25;break}return ze.next=22,Xe(xt,{practice:mn,practice_codes:Ve,practice_sets:Ai,update_practice_sets:an});case 22:Ge=ze.sent,ze.next=28;break;case 25:return ze.next=27,ce({practice:mn,practice_codes:Ve,practice_sets:Mn,publish:!gi.current});case 27:Ge=ze.sent;case 28:if(mi(!1),ni(!1),!(((or=Ge)===null||or===void 0?void 0:or.status)===0)){ze.next=46;break}if(!((Ne=Ge)!==null&&Ne!==void 0&&(xe=Ne.similar_practice)!==null&&xe!==void 0&&xe.length)){ze.next=35;break}return Pt(!0),nn((Le=Ge)===null||Le===void 0?void 0:Le.similar_practice),ze.abrupt("return");case 35:if(!xt){ze.next=44;break}if(x.b.success("\u4FDD\u5B58\u6210\u529F"),gi.current){ze.next=42;break}return ze.next=40,Object(le.a)("/api/practices/".concat(xt,"/start"),{method:"get"});case 40:Se=ze.sent,(Se==null?void 0:Se.status)===0&&Gt.push("/problems/".concat(Se==null?void 0:Se.identifier,"/oj/").concat(xt));case 42:ze.next=46;break;case 44:x.b.success("\u65B0\u5EFA\u6210\u529F"),Gt.replace("/problems/".concat((je=Ge)===null||je===void 0?void 0:je.identifier,"/ojedit"));case 46:case"end":return ze.stop()}},tr)})),Lr.apply(this,arguments)}function mr(){Gt.replace("/problems")}var qr=function(It){var ir=Math.floor(100/It.length),or=ir+100%It.length;It=It.map(function(Wr,vr){return vr===It.length-1?Object(A.a)(Object(A.a)({},Wr),{},{score:or}):Object(A.a)(Object(A.a)({},Wr),{},{score:ir})}),xr(It)};function Un(tr){tr.target.value||qr(jr),pn({type:St.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},Zr),{},{hack:Object(A.a)(Object(A.a)({},Zr.hack),{},{test_set_score:tr.target.value})})}})}function hr(tr){pn({type:St.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},Zr),{},{hack:Object(A.a)(Object(A.a)({},Zr.hack),{},{is_file:tr.target.value})})}})}function vi(tr){ki(tr.target.checked)}function kr(tr){var It=tr.target.value;It&&qr(jr),pn({type:St.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},Zr),{},{hack:Object(A.a)(Object(A.a)({},Zr.hack),{},{test_set_average:It})})}})}function Sn(){var tr=qt.getFieldValue("hack_sets"),It=tr.length+1,ir=Math.floor(100/It),or=100%It;tr.map(function(Wr,vr){return Tn&&(Wr.score=ir),Wr.position=vr+1,Wr}),tr.push({input:"",output:"",position:It,score:Tn?ir+or:0}),qt.setFieldsValue({hack_sets:tr}),pn({type:St.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},Zr),{},{hack_sets:tr})}})}Object(oe.useEffect)(function(){if(Tn){var tr=sn==null?void 0:sn.length,It=Math.floor(100/tr),ir=100%tr;sn==null||sn.map(function(or,Wr){return or.score=It,or.position=Wr+1,Wr===tr-1&&(or.score=It+ir),or}),pn({type:St.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},Zr),{},{hack_sets:sn})}}),qt.setFieldsValue({hack_sets:sn})}},[Tn]);function Rn(tr){var It=qt.getFieldValue("hack_sets"),ir=(It==null?void 0:It.length)-1,or=Math.ceil(100/ir),Wr=100%ir;It.splice(tr,1),It==null||It.map(function(vr,mn){return Tn&&(vr.score=or,mn===ir-1&&(vr.score=or+Wr)),vr.position=mn+1,vr}),pn({type:St.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},Zr),{},{hack_sets:It})}}),qt.setFieldsValue({hack_sets:It})}function li(tr){Fn(tr)}var ua=function(It){var ir,or=(ir=Mi.current)===null||ir===void 0?void 0:ir.findIndex(function(Wr){return Wr.language===hi});Mi.current[or].code=It,ur(Mi.current)},Mr=function(It){Yr(Object(A.a)({},qt.getFieldsValue()))},wr=function(){var tr=Object(w.a)(ee.a.mark(function It(ir){var or;return ee.a.wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:return vr.next=2,Object(le.a)("/api/practices/".concat(ir,"/start"),{method:"get"});case 2:or=vr.sent,(or==null?void 0:or.status)===0&&Object(Lt.S)("/problems/".concat(or==null?void 0:or.identifier,"/oj/").concat(ir));case 4:case"end":return vr.stop()}},It)}));return function(ir){return tr.apply(this,arguments)}}(),gr=function(){var tr=Object(w.a)(ee.a.mark(function It(){var ir,or,Wr,vr,mn,an;return ee.a.wrap(function(In){for(;;)switch(In.prev=In.next){case 0:return In.next=2,Fe(xt);case 2:ir=In.sent,or=ir.name,Wr=ir.status,vr=ir.review_privilege,mn=ir.review_description,an={review_privilege:vr,status:Wr,review_description:mn,name:or},Ut(an);case 6:case"end":return In.stop()}},It)}));return function(){return tr.apply(this,arguments)}}(),ai=function(){var It="";B.a.confirm({icon:null,width:700,className:"custom-modal-divider",centered:!0,title:"\u4E0D\u901A\u8FC7\u539F\u56E0",content:ae.a.createElement("div",{className:"mt20"},ae.a.createElement($.a,{className:_e.a.MdEditor,defaultValue:It,onChange:function(or){It=or}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var ir=Object(w.a)(ee.a.mark(function Wr(){var vr;return ee.a.wrap(function(an){for(;;)switch(an.prev=an.next){case 0:if(It){an.next=3;break}return x.b.warn("\u4E0D\u901A\u8FC7\u539F\u56E0\u4E0D\u80FD\u4E3A\u7A7A"),an.abrupt("return",Promise.reject());case 3:return an.next=5,Object(le.a)("/api/practices/".concat(xt,"/review.json"),{method:"post",body:{op:"fail",description:It}});case 5:vr=an.sent,(vr==null?void 0:vr.status)===0&&(x.b.success("\u63D0\u4EA4\u6210\u529F"),gr());case 7:case"end":return an.stop()}},Wr)}));function or(){return ir.apply(this,arguments)}return or}()})},zi=function(){var tr=Object(w.a)(ee.a.mark(function It(){return ee.a.wrap(function(or){for(;;)switch(or.prev=or.next){case 0:B.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u63D0\u793A",content:"\u786E\u8BA4\u5C06\u9898\u76EE\u300A".concat(Ur==null?void 0:Ur.name,"\u300B\u7684\u5BA1\u6838\u901A\u8FC7\u5417\uFF1F"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Wr=Object(w.a)(ee.a.mark(function mn(){var an;return ee.a.wrap(function(In){for(;;)switch(In.prev=In.next){case 0:return In.next=2,Object(le.a)("/api/practices/".concat(xt,"/review.json"),{method:"post",body:{op:"pass"}});case 2:an=In.sent,(an==null?void 0:an.status)===0&&(x.b.success("\u63D0\u4EA4\u6210\u529F"),gr());case 4:case"end":return In.stop()}},mn)}));function vr(){return Wr.apply(this,arguments)}return vr}()});case 1:case"end":return or.stop()}},It)}));return function(){return tr.apply(this,arguments)}}(),Vi=function(){var It=B.a.confirm({icon:null,width:700,className:"".concat(_e.a.cusModal," custom-modal-divider"),centered:!0,title:ae.a.createElement(p.a,null,ae.a.createElement(R.a,{flex:"1"},"\u4E0D\u901A\u8FC7\u539F\u56E0"),ae.a.createElement(R.a,null,ae.a.createElement("span",{className:"iconfont icon-guanbi7 font12 current c-grey-c",onClick:function(){return It.destroy()}}))),content:ae.a.createElement("div",null,ae.a.createElement(Yt.a,{className:"mt20",value:(Ur==null?void 0:Ur.review_description)||""}))})};return ae.a.createElement(d.a,{spinning:Ki,size:"large",className:_e.a["oj-custom-large-spin"]},Zr?ae.a.createElement(oe.Fragment,null,ae.a.createElement("header",{className:_e.a.header},ae.a.createElement("div",null,ae.a.createElement("img",{src:"".concat(Tt.a.IMG_SERVER,"/images/").concat(ri==null?void 0:ri.image_url),alt:"user",width:30}),ae.a.createElement("span",null,ri==null?void 0:ri.name)),ae.a.createElement("h2",null," ",Zr==null||((Ct=Zr.hack)===null||Ct===void 0)?void 0:Ct.name," "),xt?ae.a.createElement("a",{className:_e.a.btn_back,onClick:mr}," ",ae.a.createElement(ne.a,null),"\u9000\u51FA"):null),ae.a.createElement(F.a,{form:qt,initialValues:Zr,layout:"vertical",className:_e.a["oj-form-container"],onValuesChange:Mr,onFinish:_r},ae.a.createElement(Ze.a,{hideResize:!0,className:_e.a["oj-problems"],leftChild:ae.a.createElement(Dr,{formValue:Hr,onRemoveTestCase:Rn,onAddTestCase:Sn,hack:Zr.hack,onChangeScore:Un,onChangehide:vi,onChangeAverage:kr,onChangeFile:hr,uploadData:jr,setUploadData:xr,handleUploadRatio:qr,ischecked:Vn,pointData:hn,sourceData:Fr,getPointData:er,id:xt}),rightChild:ae.a.createElement(Ae,{value:lr==null||((dt=lr.find(function(tr){return tr.language===hi}))===null||dt===void 0)?void 0:dt.code,onChange:ua,onLanguage:li,languageItems:lr,language:hi})}),ae.a.createElement("div",{className:_e.a.footer},!!xt&&ae.a.createElement("div",{className:_e.a.result},ae.a.createElement("span",null,"\u5BA1\u6838\u7ED3\u679C:"),Ur!=null&&Ur.review_privilege?ae.a.createElement(ae.a.Fragment,null,ae.a.createElement("div",{onClick:zi,className:_e.a.pass},"\u901A\u8FC7"),ae.a.createElement("div",{onClick:ai,className:_e.a.noPass},"\u4E0D\u901A\u8FC7")):ae.a.createElement(ae.a.Fragment,null,(Ur==null?void 0:Ur.status)===0&&ae.a.createElement("div",{className:_e.a.passText},ae.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u53D1\u5E03"),(Ur==null?void 0:Ur.status)===1&&ae.a.createElement("div",{className:_e.a.passText},ae.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5DF2\u516C\u5F00"),(Ur==null?void 0:Ur.status)===2&&ae.a.createElement("div",{className:_e.a.passText},ae.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u5BA1\u6279"),(Ur==null?void 0:Ur.status)===3&&ae.a.createElement("div",{className:_e.a.passText},ae.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u4E2D"),(Ur==null?void 0:Ur.status)===4&&ae.a.createElement("div",{className:_e.a.passText},ae.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u5B8C\u6210\u5F85\u516C\u5F00"),(Ur==null?void 0:Ur.status)===5&&ae.a.createElement("div",{className:_e.a.noPassText},ae.a.createElement("i",{className:"iconfont icon-weitongguo1"}),"\u5BA1\u6838\u4E0D\u901A\u8FC7",ae.a.createElement("span",{onClick:Vi},"\u67E5\u770B\u539F\u56E0")))),ae.a.createElement(E.a,{type:"primary",ghost:!0,onClick:mr},"\u9000\u51FA\u7F16\u8F91"),ae.a.createElement(E.a,{disabled:Pi,loading:pi,type:"primary",onClick:function(){gi.current=!0,qt.submit()}},"\u4FDD\u5B58"," "),xt?ae.a.createElement(E.a,{disabled:pi,loading:Pi,style:{background:"#2FC25B",border:0},type:"primary",onClick:function(){gi.current=!1,qt.submit()}},"\u7ACB\u5373\u4F53\u9A8C"):ae.a.createElement(E.a,{disabled:pi,loading:Pi,type:"primary",onClick:function(){gi.current=!1,qt.submit()}},"\u4FDD\u5B58\u5E76\u53D1\u5E03\u5BA1\u6838")))):null,ae.a.createElement(B.a,{centered:!0,destroyOnClose:!0,footer:null,visible:zr,onCancel:function(){return Pt(!1)},title:"\u76F8\u4F3C\u6027\u68C0\u6D4B",width:"600px"},ae.a.createElement("div",null,ae.a.createElement("p",{className:"font14"},"\u7ECF\u7CFB\u7EDF\u68C0\u6D4B\u53D1\u73B0\uFF0C\u672C\u9898\u76EE\u4E0E\u7CFB\u7EDF\u4E2D\u5DF2\u521B\u5EFA\u7684\u9898\u76EE\u9AD8\u5EA6\u96F7\u540C\uFF0C\u8BF7\u8C03\u6574\u9898\u76EE\u540E\u518D\u8FDB\u884C\u4FDD\u5B58"),ae.a.createElement(o.a,{dataSource:dr,bordered:!1,scroll:dr.length>7?{y:300}:{},columns:[{title:"\u76F8\u4F3C\u9898\u9898\u76EE",dataIndex:"name",ellipsis:!0,render:function(It,ir){return ae.a.createElement("span",{onClick:function(){return wr(ir==null?void 0:ir.identifier)},style:{textDecorationLine:"underline"},className:"current c-light-primary"},It)}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"create_time",width:170,render:function(It){var ir;return(ir=Ft()(It))===null||ir===void 0?void 0:ir.format("YYYY-MM-DD HH:mm")}}],pagination:!1}))))};function Dr(mt){var Ct,dt,Ht=mt.ischecked,Gt=mt.formValue,yt=mt.hack,xt=mt.onChangeAverage,Kt=mt.onChangeScore,Ar=mt.onChangehide,qt=mt.onChangeFile,ut=mt.onAddTestCase,kt=mt.onRemoveTestCase,Hr=mt.uploadData,Yr=mt.setUploadData,On=mt.handleUploadRatio,cn=mt.pointData,zr=mt.sourceData,Pt=mt.getPointData,dn=mt.id,ct=yt.test_set_average,jr=yt.test_set_score,xr=Object(oe.useState)(!1),Gn=Object(P.a)(xr,2),An=Gn[0],hn=Gn[1],Ei=Object(oe.useState)(!1),Kn=Object(P.a)(Ei,2),bn=Kn[0],Fr=Kn[1],di=function(lr,ur){var Rr=Object(n.a)(Hr);Rr.splice(ur,1),ct?On(Rr):Yr(Rr)},fn=function(lr,ur){console.log(lr,ur);var Rr=Hr.map(function(br,hi){return hi===ur?Object(A.a)(Object(A.a)({},br),{},{score:lr.target.value?Number(lr.target.value):0}):br});Yr(Rr)},Vr=function(lr){var ur=Hr.concat(lr);yt.test_set_average?On(ur):Yr(ur)};function dr(jt){jt.stopPropagation()}function nn(){if(Object($t.w)()){Fr("practice");return}var jt="";B.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u77E5\u8BC6\u70B9",content:ae.a.createElement("div",null,ae.a.createElement(L.a,{placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:function(ur){jt=ur.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var lr=Object(w.a)(ee.a.mark(function Rr(){var br;return ee.a.wrap(function(Fn){for(;;)switch(Fn.prev=Fn.next){case 0:return Fn.next=2,Object(le.a)("/api/tag_disciplines.json",{method:"post",body:{target:"practice",name:jt}});case 2:br=Fn.sent,(br==null?void 0:br.status)===0&&Pt();case 4:case"end":return Fn.stop()}},Rr)}));function ur(){return lr.apply(this,arguments)}return ur}()})}function _n(){if(Object($t.w)()){Fr("practice_source");return}var jt="";B.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u6765\u6E90",content:ae.a.createElement("div",null,ae.a.createElement(L.a,{placeholder:"\u8BF7\u8F93\u5165\u6765\u6E90\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:function(ur){jt=ur.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var lr=Object(w.a)(ee.a.mark(function Rr(){var br;return ee.a.wrap(function(Fn){for(;;)switch(Fn.prev=Fn.next){case 0:return Fn.next=2,Object(le.a)("/api/tag_disciplines.json",{method:"post",body:{target:"practice_source",name:jt}});case 2:br=Fn.sent,(br==null?void 0:br.status)===0&&Pt();case 4:case"end":return Fn.stop()}},Rr)}));function ur(){return lr.apply(this,arguments)}return ur}()})}return ae.a.createElement("div",{className:_e.a["oj-left-panel"]},ae.a.createElement("div",{className:_e.a["oj-form-info"]},ae.a.createElement(F.a.Item,{label:"\u9898\u76EE\u540D\u79F0",name:["hack","name"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0"}],className:_e.a.inputOne},ae.a.createElement(L.a,{bordered:!1,maxLength:60,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0",suffix:ae.a.createElement("span",null,(Gt==null||((Ct=Gt.hack)===null||Ct===void 0||((dt=Ct.name)===null||dt===void 0))?void 0:dt.length)||0,"/",ae.a.createElement("span",{className:"c-grey-999"},"60"))})),ae.a.createElement(F.a.Item,{name:["hack","description"],valuePropName:"defaultValue",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0\u5185\u5BB9"}]},ae.a.createElement($.a,{placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u63CF\u8FF0\u2026",miniToolbar:!0,id:"moop_cases_content",noStorage:!0,height:200})),ae.a.createElement("div",{className:_e.a.row},ae.a.createElement("div",{className:_e.a.a},ae.a.createElement(F.a.Item,{label:"\u96BE\u6613\u5EA6",name:["hack","difficulty"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u6613\u5EA6"}]},ae.a.createElement(i.a,null,W(de.difficulty)))),ae.a.createElement("div",{className:_e.a.b},ae.a.createElement(F.a.Item,{label:"\u9898\u76EE\u6765\u6E90",name:["hack","source_discipline_ids"]},ae.a.createElement(i.a,{placeholder:"\u9009\u62E9\u9898\u76EE\u6765\u6E90",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:function(lr){return lr.parentNode}},zr.map(function(jt){return ae.a.createElement(i.a.Option,{key:jt.id,value:jt.id},jt.name)}))),ae.a.createElement(E.a,{style:{padding:"0 18px"},type:"primary",ghost:!0,onClick:function(){return _n()}},Object($t.w)()?"\u6765\u6E90\u7BA1\u7406":"\u65B0\u5EFA\u6765\u6E90"))),ae.a.createElement("div",{className:_e.a.row},ae.a.createElement("div",{className:_e.a.b,style:{width:"100%",marginLeft:0}},ae.a.createElement(F.a.Item,{label:"\u77E5\u8BC6\u70B9",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u77E5\u8BC6\u70B9"}],name:["hack","tag_discipline_ids"]},ae.a.createElement(i.a,{placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:function(lr){return lr.parentNode}},cn.map(function(jt){return ae.a.createElement(i.a.Option,{key:jt.id,value:jt.id},jt.name)}))),ae.a.createElement(E.a,{type:"primary",ghost:!0,onClick:function(){return nn()}},Object($t.w)()?"\u77E5\u8BC6\u70B9\u7BA1\u7406":"\u65B0\u5EFA\u77E5\u8BC6\u70B9"))),ae.a.createElement("div",{className:_e.a.field},ae.a.createElement(F.a.Item,{label:"\u8BC4\u6D4B\u65F6\u957F\u9650\u5236",name:["hack","time_limit"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BC4\u6D4B\u65F6\u957F\u9650\u5236"},{type:"number",min:3,message:"\u6700\u5C0F\u9650\u5236\u65F6\u95F4\u662F3\u79D2"}],className:_e.a.inputTwo,extra:ae.a.createElement("span",{style:{position:"absolute",left:200,top:11,color:"#333"}},"\u79D2",ae.a.createElement("span",{className:"ml5 c-grey-999"},"(\u4EE3\u7801\u6267\u884C\u6240\u5141\u8BB8\u7684\u6700\u5927\u65F6\u957F)"))},ae.a.createElement(r.a,{style:{width:185},min:3}))),ae.a.createElement("div",{className:"tst-case-info"},ae.a.createElement("h3",{className:"flex-container",style:{justifyContent:"space-between"}}," ","\u6D4B\u8BD5\u7528\u4F8B\u4E0E\u7CFB\u7EDF\u8BC4\u5206\u89C4\u5219",!yt.is_file&&ae.a.createElement(E.a,{style:{height:40},type:"primary",ghost:!0,onClick:ut},"\u6DFB\u52A0\u6D4B\u8BD5\u7528\u4F8B")),ae.a.createElement(F.a.Item,{name:["hack","test_set_score"]},ae.a.createElement(e.a.Group,{onChange:Kt},ae.a.createElement(e.a,{value:!0},"\u901A\u8FC7\u5168\u90E8\u6D4B\u8BD5\u96C6",ae.a.createElement("span",{className:"tip"}," ","\uFF08\u5B66\u5458\u8BC4\u6D4B\uFF0C\u4EC5\u5F53\u6240\u6709\u6D4B\u8BD5\u96C6\u90FD\u6B63\u786E\u65F6\uFF0C\u624D\u83B7\u5F97\u4E00\u6B21\u6027\u5956\u52B1\uFF09")),ae.a.createElement(e.a,{value:!1},"\u901A\u8FC7\u90E8\u5206\u6D4B\u8BD5\u96C6",ae.a.createElement("span",{className:"tip"}," ","\uFF08\u5B66\u5458\u8BC4\u6D4B\uFF0C\u901A\u8FC7\u6D4B\u8BD5\u96C6\u5373\u53EF\u83B7\u5F97\u5BF9\u5E94\u5956\u52B1\uFF09")))),ae.a.createElement(C.a,{style:{marginBottom:"5px"},checked:Ht,onChange:Ar},"\u9690\u85CF\u5B9E\u9645\u8F93\u51FA \uFF08\u9009\u4E2D\uFF0C\u5219\u5728\u5B66\u751F\u505A\u9898\u8FC7\u7A0B\u4E2D\u65E0\u6CD5\u770B\u5230\u5B9E\u9645\u8F93\u51FA\u7ED3\u679C\uFF0C\u4EC5\u5C55\u793A\u662F\u5426\u8BC4\u6D4B\u662F\u5426\u901A\u8FC7\uFF09"),ae.a.createElement(F.a.Item,{className:_e.a.testJi,name:["hack","is_file"],label:"\u7528\u4F8B\u7C7B\u578B:"},ae.a.createElement(e.a.Group,{onChange:qt},ae.a.createElement(v.a,{direction:"horizontal"},ae.a.createElement(e.a,{value:!1},"\u6587\u672C"),ae.a.createElement(e.a,{value:!0},"\u6587\u4EF6")))),!yt.test_set_score&&ae.a.createElement(F.a.Item,{name:["hack","test_set_average"],label:"\u7CFB\u7EDF\u8BC4\u5206\u5360\u6BD4"},ae.a.createElement(e.a.Group,{onChange:xt},ae.a.createElement(e.a,{value:!0},"\u5747\u5206\u6BD4\u4F8B"),ae.a.createElement(e.a,{value:!1},"\u81EA\u5B9A\u4E49\u6BD4\u4F8B"))),yt.is_file&&ae.a.createElement("div",{className:_e.a.upBtn},ae.a.createElement(E.a,{ghost:!0,type:"primary",className:"mb20",onClick:function(){return hn(!0)}},"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"),ae.a.createElement(pt.a,{disabled:yt==null?void 0:yt.test_set_average,inputChange:fn,showScore:!yt.test_set_score,data:Hr,onRemove:di})),!yt.is_file&&ae.a.createElement(F.a.List,{name:"hack_sets"},function(jt,lr){return Object(S.a)(lr),ae.a.createElement(z.a,{accordion:!0},jt.map(function(ur,Rr){return ae.a.createElement(Jt,{key:"".concat(ur.key,"--").concat(Rr),header:ae.a.createElement("a",{className:_e.a["test-case-name"]},ae.a.createElement("span",null,"\u6D4B\u8BD5\u7528\u4F8B",Rr+1),jr?null:ae.a.createElement(ae.a.Fragment,null,ae.a.createElement(F.a.Item,{name:[ur.name,"score"],fieldKey:[ur.fieldKey,"score"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6D4B\u8BD5\u96C6".concat(Rr+1,"\u8BC4\u5206")}]},ae.a.createElement(r.a,{onClick:dr,min:0,max:100,disabled:ct})),ae.a.createElement("span",null,"%"))),extra:Rr>0?ae.a.createElement("div",{onClick:dr},ae.a.createElement(g.a,{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u5B9A\u5220\u9664\u6D4B\u8BD5\u96C6\b"+(Rr+1),onConfirm:function(){kt(Rr)}},ae.a.createElement(J.a,{className:_e.a["btn-remove-case"]}))):null},ae.a.createElement(F.a.Item,{label:"\u8F93\u5165",name:[ur.name,"input"],fieldKey:[ur.fieldKey,"input"]},ae.a.createElement(Mt,null)),ae.a.createElement(F.a.Item,{label:"\u8F93\u51FA",name:[ur.name,"output"],fieldKey:[ur.fieldKey,"output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},ae.a.createElement(Mt,null)))}))}))),ae.a.createElement(pt.b,{rootIdentifier:dn,visible:An,onClose:function(){return hn(!1)},onOK:Vr}),ae.a.createElement(st,{visible:bn,onCancel:function(){Fr(!1),Pt()},onOK:function(){Fr(!1),Pt()}}))}},rdUC:function(H,Z,I){var N=I("MFOe"),g=N.Global;H.exports={name:"localStorage",read:k,write:v,each:m,remove:C,clearAll:_};function S(){return g.localStorage}function k(e){return S().getItem(e)}function v(e,h){return S().setItem(e,h)}function m(e){for(var h=S().length-1;h>=0;h--){var r=S().key(h);e(k(r),r)}}function C(e){return S().removeItem(e)}function _(){return S().clear()}},sR1s:function(H,Z,I){"use strict";I.d(Z,"b",function(){return k}),I.d(Z,"a",function(){return v}),I.d(Z,"c",function(){return m}),I.d(Z,"d",function(){return C});var N=I("U8pU"),g="RC_TABLE_KEY";function S(_){return _==null?[]:Array.isArray(_)?_:[_]}function k(_,e){if(!e&&typeof e!="number")return _;for(var h=S(e),r=_,c=0;c1)Object(h.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(s.length===0)return Object(h.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var E=s[0];if(m.isValidElement(E)&&Object(r.c)(E)){var b=E.ref;s[0]=m.cloneElement(E,{ref:Object(r.a)(b,this.setChildNode)})}return s.length===1?s[0]:s.map(function(p,D){return!m.isValidElement(p)||"key"in p&&p.key!==null?p:m.cloneElement(p,{key:"".concat(i,"-").concat(D)})})}}]),d}(m.Component);n.displayName="ResizeObserver",Z.a=n},t9D7:function(H,Z,I){"use strict";I.d(Z,"b",function(){return C}),I.d(Z,"g",function(){return e}),I.d(Z,"d",function(){return h}),I.d(Z,"e",function(){return r}),I.d(Z,"a",function(){return c}),I.d(Z,"f",function(){return l}),I.d(Z,"c",function(){return f});var N=I("Vhoy"),g=I("MI8n"),S=I("pmY6"),k=I("Cg/j"),v=I("ic2d"),m=I("nEHx");const C=Object(k.c)("themeService");var _;(function(d){function u(o){return o&&typeof o=="object"&&typeof o.id=="string"}d.isThemeColor=u})(_||(_={}));function e(d){return{id:d}}var h;(function(d){function u(D){return D&&typeof D=="object"&&typeof D.id=="string"&&(typeof D.color=="undefined"||_.isThemeColor(D.color))}d.isThemeIcon=u;const o=new RegExp(`^\\$\\((${N.a.iconNameExpression}(?:${N.a.iconModifierExpression})?)\\)$`);function s(D){const R=o.exec(D);if(!R)return;let[,y]=R;return{id:y}}d.fromString=s;function E(D,R){let y=D.id;const x=y.lastIndexOf("~");return x!==-1&&(y=y.substring(0,x)),R&&(y=`${y}~${R}`),{id:y}}d.modify=E;function b(D,R){var y,x;return D.id===R.id&&((y=D.color)===null||y===void 0?void 0:y.id)===((x=R.color)===null||x===void 0?void 0:x.id)}d.isEqual=b;function p(D,R){return{id:D.id,color:R?e(R):void 0}}d.asThemeIcon=p,d.asClassNameArray=N.a.asClassNameArray,d.asClassName=N.a.asClassName,d.asCSSSelector=N.a.asCSSSelector})(h||(h={}));function r(d){switch(d){case m.a.DARK:return"vs-dark";case m.a.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const c={ThemingContribution:"base.contributions.theming"};class i{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new g.b}onColorThemeChange(d){return this.themingParticipants.push(d),this.onThemingParticipantAddedEmitter.fire(d),Object(S.i)(()=>{const u=this.themingParticipants.indexOf(d);this.themingParticipants.splice(u,1)})}getThemingParticipants(){return this.themingParticipants}}let n=new i;v.a.add(c.ThemingContribution,n);function l(d){return n.onColorThemeChange(d)}class f extends S.a{constructor(d){super();this.themeService=d,this.theme=d.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(u=>this.onThemeChange(u)))}onThemeChange(d){this.theme=d,this.updateStyles()}updateStyles(){}}},uGsb:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("MlIO"),I("1uat"))})(this,function(N){return function(){var g=N,S=g.x64,k=S.Word,v=S.WordArray,m=g.algo,C=m.SHA512,_=m.SHA384=C.extend({_doReset:function(){this._hash=new v.init([new k.init(3418070365,3238371032),new k.init(1654270250,914150663),new k.init(2438529370,812702999),new k.init(355462360,4144912697),new k.init(1731405415,4290775857),new k.init(2394180231,1750603025),new k.init(3675008525,1694076839),new k.init(1203062813,3204075428)])},_doFinalize:function(){var e=C._doFinalize.call(this);return e.sigBytes-=16,e}});g.SHA384=C._createHelper(_),g.HmacSHA384=C._createHmacHelper(_)}(),N.SHA384})},uGxW:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("OLod"))})(this,function(N){return N.pad.NoPadding={pad:function(){},unpad:function(){}},N.pad.NoPadding})},uQRt:function(H,Z,I){H.exports=N;function N(){return I("gaXo"),{}}},ulZh:function(H,Z,I){typeof window!="undefined"&&function(g,S){H.exports=S()}(this,function(){return function(N){var g={};function S(k){if(g[k])return g[k].exports;var v=g[k]={i:k,l:!1,exports:{}};return N[k].call(v.exports,v,v.exports,S),v.l=!0,v.exports}return S.m=N,S.c=g,S.d=function(k,v,m){S.o(k,v)||Object.defineProperty(k,v,{enumerable:!0,get:m})},S.r=function(k){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(k,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(k,"__esModule",{value:!0})},S.t=function(k,v){if(v&1&&(k=S(k)),v&8)return k;if(v&4&&typeof k=="object"&&k&&k.__esModule)return k;var m=Object.create(null);if(S.r(m),Object.defineProperty(m,"default",{enumerable:!0,value:k}),v&2&&typeof k!="string")for(var C in k)S.d(m,C,function(_){return k[_]}.bind(null,C));return m},S.n=function(k){var v=k&&k.__esModule?function(){return k.default}:function(){return k};return S.d(v,"a",v),v},S.o=function(k,v){return Object.prototype.hasOwnProperty.call(k,v)},S.p="/dist/",S(S.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(N,g,S){"use strict";var k=Object.prototype.hasOwnProperty,v="~";function m(){}Object.create&&(m.prototype=Object.create(null),new m().__proto__||(v=!1));function C(r,c,i){this.fn=r,this.context=c,this.once=i||!1}function _(r,c,i,n,l){if(typeof i!="function")throw new TypeError("The listener must be a function");var f=new C(i,n||r,l),d=v?v+c:c;return r._events[d]?r._events[d].fn?r._events[d]=[r._events[d],f]:r._events[d].push(f):(r._events[d]=f,r._eventsCount++),r}function e(r,c){--r._eventsCount===0?r._events=new m:delete r._events[c]}function h(){this._events=new m,this._eventsCount=0}h.prototype.eventNames=function(){var c=[],i,n;if(this._eventsCount===0)return c;for(n in i=this._events)k.call(i,n)&&c.push(v?n.slice(1):n);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(i)):c},h.prototype.listeners=function(c){var i=v?v+c:c,n=this._events[i];if(!n)return[];if(n.fn)return[n.fn];for(var l=0,f=n.length,d=new Array(f);l0},!1)}function r(c,i){for(var n={main:[i]},l={main:[]},f={main:{}};h(n);)for(var d=Object.keys(n),u=0;u=2*D/y||A<=z)return;var O=Number.POSITIVE_INFINITY,B;for(B=d.level-1;B>w;B--){var U=x[B].maxBitrate;if(O=D*U/(8*.8*P),O=A)return;var L=this.bwEstimator.getEstimate();h.logger.warn("Fragment "+d.sn+(u?" part "+u.index:"")+" of level "+d.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+B+` Current BW estimate: `+(Object(k.isFiniteNumber)(L)?(L/1024).toFixed(3):"Unknown")+` Kb/s Estimated load time for current fragment: `+A.toFixed(3)+` s Estimated load time for the next fragment: `+O.toFixed(3)+` s Time to underbuffer: `+z.toFixed(3)+" s"),o.nextLoadLevel=B,this.bwEstimator.sample(R,p.loaded),this.clearTimer(),d.loader&&(this.fragCurrent=this.partCurrent=null,d.loader.abort()),o.trigger(m.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:d,part:u,stats:p})},l.onFragLoaded=function(d,u){var o=u.frag,s=u.part;if(o.type===e.PlaylistLevelType.MAIN&&Object(k.isFiniteNumber)(o.sn)){var E=s?s.stats:o.stats,b=s?s.duration:o.duration;if(this.clearTimer(),this.lastLoadedFragLevel=o.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var p=this.hls.levels[o.level],D=(p.loaded?p.loaded.bytes:0)+E.loaded,R=(p.loaded?p.loaded.duration:0)+b;p.loaded={bytes:D,duration:R},p.realBitrate=Math.round(8*D/R)}if(o.bitrateTest){var y={stats:E,frag:o,part:s,id:o.type};this.onFragBuffered(m.Events.FRAG_BUFFERED,y),o.bitrateTest=!1}}},l.onFragBuffered=function(d,u){var o=u.frag,s=u.part,E=s?s.stats:o.stats;if(E.aborted)return;if(o.type!==e.PlaylistLevelType.MAIN||o.sn==="initSegment")return;var b=E.parsing.end-E.loading.start;this.bwEstimator.sample(b,E.loaded),E.bwEstimate=this.bwEstimator.getEstimate(),o.bitrateTest?this.bitrateTestDelay=b/1e3:this.bitrateTestDelay=0},l.onError=function(d,u){switch(u.details){case _.ErrorDetails.FRAG_LOAD_ERROR:case _.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},l.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},l.getNextABRAutoLevel=function(){var d=this.fragCurrent,u=this.partCurrent,o=this.hls,s=o.maxAutoLevel,E=o.config,b=o.minAutoLevel,p=o.media,D=u?u.duration:d?d.duration:0,R=p?p.currentTime:0,y=p&&p.playbackRate!==0?Math.abs(p.playbackRate):1,x=this.bwEstimator?this.bwEstimator.getEstimate():E.abrEwmaDefaultEstimate,w=(C.BufferHelper.bufferInfo(p,R,E.maxBufferHole).end-R)/y,T=this.findBestLevel(x,b,s,w,E.abrBandWidthFactor,E.abrBandWidthUpFactor);if(T>=0)return T;h.logger.trace((w?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var F=D?Math.min(D,E.maxStarvationDelay):E.maxStarvationDelay,P=E.abrBandWidthFactor,A=E.abrBandWidthUpFactor;if(!w){var X=this.bitrateTestDelay;if(X){var z=D?Math.min(D,E.maxLoadingDelay):E.maxLoadingDelay;F=z-X,h.logger.trace("bitrate test took "+Math.round(1e3*X)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*F)+" ms"),P=A=1}}return T=this.findBestLevel(x,b,s,w+F,P,A),Math.max(T,0)},l.findBestLevel=function(d,u,o,s,E,b){for(var p,D=this.fragCurrent,R=this.partCurrent,y=this.lastLoadedFragLevel,x=this.hls.levels,w=x[y],T=!!(w!=null&&(p=w.details)!==null&&p!==void 0&&p.live),F=w==null?void 0:w.codecSet,P=R?R.duration:D?D.duration:0,A=o;A>=u;A--){var X=x[A];if(!X||F&&X.codecSet!==F)continue;var z=X.details,O=(R?z==null?void 0:z.partTarget:z==null?void 0:z.averagetargetduration)||P,B=void 0;A<=y?B=E*d:B=b*d;var U=x[A].maxBitrate,L=U*O/B;if(h.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+A+"/"+Math.round(B)+"/"+U+"/"+O+"/"+s+"/"+L),B>U&&(!L||T&&!this.bitrateTestDelay||L0&&w===-1?(this.log("Override startPosition with lastCurrentTime @"+T.toFixed(3)),this.state=v.State.IDLE):(this.loadedmetadata=!1,this.state=v.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=w,this.tick()},y.doTick=function(){switch(this.state){case v.State.IDLE:this.doTickIdle();break;case v.State.WAITING_TRACK:{var w,T=this.levels,F=this.trackId,P=T==null||((w=T[F])===null||w===void 0)?void 0:w.details;if(P){if(this.waitForCdnTuneIn(P))break;this.state=v.State.WAITING_INIT_PTS}break}case v.State.FRAG_LOADING_WAITING_RETRY:{var A,X=performance.now(),z=this.retryDate;(!z||X>=z||(A=this.media)!==null&&A!==void 0&&A.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=v.State.IDLE);break}case v.State.WAITING_INIT_PTS:{var O=this.waitingData;if(O){var B=O.frag,U=O.part,L=O.cache,G=O.complete;if(this.initPTS[B.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=v.State.FRAG_LOADING;var ee=L.flush(),oe={frag:B,part:U,payload:ee,networkDetails:null};this._handleFragmentLoadProgress(oe),G&&D.prototype._handleFragmentLoadComplete.call(this,oe)}else if(this.videoTrackCC!==this.waitingVideoCC)u.logger.log("Waiting fragment cc ("+B.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var ae=this.getLoadPosition(),be=C.BufferHelper.bufferInfo(this.mediaBuffer,ae,this.config.maxBufferHole),_e=Object(l.fragmentWithinToleranceTest)(be.end,this.config.maxFragLookUpTolerance,B);_e<0&&(u.logger.log("Waiting fragment cc ("+B.cc+") @ "+B.start+" cancelled because another fragment at "+be.end+" is needed"),this.clearWaitingFragment())}}else this.state=v.State.IDLE}}this.onTickEnd()},y.clearWaitingFragment=function(){var w=this.waitingData;w&&(this.fragmentTracker.removeFragment(w.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=v.State.IDLE)},y.onTickEnd=function(){var w=this.media;if(!w||!w.readyState)return;var T=this.mediaBuffer?this.mediaBuffer:w,F=T.buffered;!this.loadedmetadata&&F.length&&(this.loadedmetadata=!0),this.lastCurrentTime=w.currentTime},y.doTickIdle=function(){var w,T,F=this.hls,P=this.levels,A=this.media,X=this.trackId,z=F.config;if(!P||!P[X])return;if(!A&&(this.startFragRequested||!z.startFragPrefetch))return;var O=P[X],B=O.details;if(!B||B.live&&this.levelLastLoaded!==X||this.waitForCdnTuneIn(B)){this.state=v.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,r.ElementaryStreamTypes.AUDIO,h.PlaylistLevelType.AUDIO));var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,h.PlaylistLevelType.AUDIO);if(U===null)return;var L=U.len,G=this.getMaxBufferLength(),ee=this.audioSwitch;if(L>=G&&!ee)return;if(!ee&&this._streamEnded(U,B)){F.trigger(m.Events.BUFFER_EOS,{type:"audio"}),this.state=v.State.ENDED;return}var oe=B.fragments,ae=oe[0].start,be=U.end;if(ee){var _e=this.getLoadPosition();be=_e,B.PTSKnown&&_eae||U.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),A.currentTime=ae+.05))}var fe=this.getNextFragment(be,B);if(!fe){this.bufferFlushed=!0;return}((w=fe.decryptdata)===null||w===void 0?void 0:w.keyFormat)==="identity"&&!((T=fe.decryptdata)!==null&&T!==void 0&&T.key)?this.loadKey(fe,B):this.loadFragment(fe,B,be)},y.getMaxBufferLength=function(){var w=D.prototype.getMaxBufferLength.call(this),T=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,h.PlaylistLevelType.MAIN);return T===null?w:Math.max(w,T.len)},y.onMediaDetaching=function(){this.videoBuffer=null,D.prototype.onMediaDetaching.call(this)},y.onAudioTracksUpdated=function(w,T){var F=T.audioTracks;this.resetTransmuxer(),this.levels=F.map(function(P){return new e.Level(P)})},y.onAudioTrackSwitching=function(w,T){var F=!!T.url;this.trackId=T.id;var P=this.fragCurrent;P!=null&&P.loader&&P.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),F?this.setInterval(b):this.resetTransmuxer(),F?(this.audioSwitch=!0,this.state=v.State.IDLE):this.state=v.State.STOPPED,this.tick()},y.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},y.onLevelLoaded=function(w,T){this.mainDetails=T.details},y.onAudioTrackLoaded=function(w,T){var F,P=this.levels,A=T.details,X=T.id;if(!P){this.warn("Audio tracks were reset while loading level "+X);return}this.log("Track "+X+" loaded ["+A.startSN+","+A.endSN+"],duration:"+A.totalduration);var z=P[X],O=0;if(A.live||(F=z.details)!==null&&F!==void 0&&F.live){var B=this.mainDetails;if(A.fragments[0]||(A.deltaUpdateFailed=!0),A.deltaUpdateFailed||!B)return;!z.details&&A.hasProgramDateTime&&B.hasProgramDateTime?(Object(f.alignMediaPlaylistByPDT)(A,B),O=A.fragments[0].start):O=this.alignPlaylists(A,z.details)}z.details=A,this.levelLastLoaded=X,!this.startFragRequested&&(this.mainDetails||!A.live)&&this.setStartPosition(z.details,O),this.state===v.State.WAITING_TRACK&&!this.waitForCdnTuneIn(A)&&(this.state=v.State.IDLE),this.tick()},y._handleFragmentLoadProgress=function(w){var T,F=w.frag,P=w.part,A=w.payload,X=this.config,z=this.trackId,O=this.levels;if(!O){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+F.sn+" of level "+F.level+" will not be buffered");return}var B=O[z];console.assert(B,"Audio track is defined on fragment load progress");var U=B.details;console.assert(U,"Audio track details are defined on fragment load progress");var L=X.defaultAudioCodec||B.audioCodec||"mp4a.40.2",G=this.transmuxer;G||(G=this.transmuxer=new i.default(this.hls,h.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var ee=this.initPTS[F.cc],oe=(T=F.initSegment)===null||T===void 0?void 0:T.data;if(ee!==void 0){var ae=!1,be=P?P.index:-1,_e=be!==-1,fe=new n.ChunkMetadata(F.level,F.sn,F.stats.chunkCount,A.byteLength,be,_e);G.push(A,oe,L,"",F,P,U.totalduration,ae,fe,ee)}else{u.logger.log("Unknown video PTS for cc "+F.cc+", waiting for video PTS before demuxing audio frag "+F.sn+" of ["+U.startSN+" ,"+U.endSN+"],track "+z);var Re=this.waitingData=this.waitingData||{frag:F,part:P,cache:new c.default,complete:!1},Oe=Re.cache;Oe.push(new Uint8Array(A)),this.waitingVideoCC=this.videoTrackCC,this.state=v.State.WAITING_INIT_PTS}},y._handleFragmentLoadComplete=function(w){if(this.waitingData){this.waitingData.complete=!0;return}D.prototype._handleFragmentLoadComplete.call(this,w)},y.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},y.onBufferCreated=function(w,T){var F=T.tracks.audio;F&&(this.mediaBuffer=F.buffer),T.tracks.video&&(this.videoBuffer=T.tracks.video.buffer)},y.onFragBuffered=function(w,T){var F=T.frag,P=T.part;if(F.type!==h.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(F)){this.warn("Fragment "+F.sn+(P?" p: "+P.index:"")+" of level "+F.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}F.sn!=="initSegment"&&(this.fragPrevious=F,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(m.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(F,P)},y.onError=function(w,T){switch(T.details){case d.ErrorDetails.FRAG_LOAD_ERROR:case d.ErrorDetails.FRAG_LOAD_TIMEOUT:case d.ErrorDetails.KEY_LOAD_ERROR:case d.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(h.PlaylistLevelType.AUDIO,T);break;case d.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case d.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==v.State.ERROR&&this.state!==v.State.STOPPED&&(this.state=T.fatal?v.State.ERROR:v.State.IDLE,this.warn(T.details+" while loading frag, switching to "+this.state+" state"));break;case d.ErrorDetails.BUFFER_FULL_ERROR:if(T.parent==="audio"&&(this.state===v.State.PARSING||this.state===v.State.PARSED)){var F=!0,P=this.getFwdBufferInfo(this.mediaBuffer,h.PlaylistLevelType.AUDIO);P&&P.len>.5&&(F=!this.reduceMaxBufferLength(P.len)),F&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,D.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},y.onBufferFlushed=function(w,T){var F=T.type;F===r.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},y._handleTransmuxComplete=function(w){var T,F="audio",P=this.hls,A=w.remuxResult,X=w.chunkMeta,z=this.getCurrentContext(X);if(!z){this.warn("The loading context changed while buffering fragment "+X.sn+" of level "+X.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(X.level);return}var O=z.frag,B=z.part,U=A.audio,L=A.text,G=A.id3,ee=A.initSegment;if(this.fragContextChanged(O))return;if(this.state=v.State.PARSING,this.audioSwitch&&U&&this.completeAudioSwitch(),ee!=null&&ee.tracks&&(this._bufferInitSegment(ee.tracks,O,X),P.trigger(m.Events.FRAG_PARSING_INIT_SEGMENT,{frag:O,id:F,tracks:ee.tracks})),U){var oe=U.startPTS,ae=U.endPTS,be=U.startDTS,_e=U.endDTS;B&&(B.elementaryStreams[r.ElementaryStreamTypes.AUDIO]={startPTS:oe,endPTS:ae,startDTS:be,endDTS:_e}),O.setElementaryStreamInfo(r.ElementaryStreamTypes.AUDIO,oe,ae,be,_e),this.bufferFragmentData(U,O,B,X)}if(G!=null&&(T=G.samples)!==null&&T!==void 0&&T.length){var fe=o({frag:O,id:F},G);P.trigger(m.Events.FRAG_PARSING_METADATA,fe)}if(L){var Re=o({frag:O,id:F},L);P.trigger(m.Events.FRAG_PARSING_USERDATA,Re)}},y._bufferInitSegment=function(w,T,F){if(this.state!==v.State.PARSING)return;w.video&&delete w.video;var P=w.audio;if(!P)return;P.levelCodec=P.codec,P.id="audio",this.log("Init audio buffer, container:"+P.container+", codecs[parsed]=["+P.codec+"]"),this.hls.trigger(m.Events.BUFFER_CODECS,w);var A=P.initSegment;if(A!=null&&A.byteLength){var X={type:"audio",frag:T,part:null,chunkMeta:F,parent:T.type,data:A};this.hls.trigger(m.Events.BUFFER_APPENDING,X)}this.tick()},y.loadFragment=function(w,T,F){var P=this.fragmentTracker.getState(w);this.fragCurrent=w,(this.audioSwitch||P===_.FragmentState.NOT_LOADED||P===_.FragmentState.PARTIAL)&&(w.sn==="initSegment"?this._loadInitSegment(w):T.live&&!Object(k.isFiniteNumber)(this.initPTS[w.cc])?(this.log("Waiting for video PTS in continuity counter "+w.cc+" of live stream before loading audio fragment "+w.sn+" of level "+this.trackId),this.state=v.State.WAITING_INIT_PTS):(this.startFragRequested=!0,D.prototype.loadFragment.call(this,w,T,F)))},y.completeAudioSwitch=function(){var w=this.hls,T=this.media,F=this.trackId;T&&(this.log("Switching audio track : flushing all audio"),D.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,w.trigger(m.Events.AUDIO_TRACK_SWITCHED,{id:F})},R}(v.default);g.default=p},"./src/controller/audio-track-controller.ts":function(N,g,S){"use strict";S.r(g);var k=S("./src/events.ts"),v=S("./src/errors.ts"),m=S("./src/controller/base-playlist-controller.ts"),C=S("./src/types/loader.ts");function _(i,n){for(var l=0;l=u.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var o=u[this.trackId];this.log("Now switching to audio-track index "+d);var s=u[d],E=s.id,b=s.groupId,p=b===void 0?"":b,D=s.name,R=s.type,y=s.url;if(this.trackId=d,this.trackName=D,this.selectDefaultTrack=!1,this.hls.trigger(k.Events.AUDIO_TRACK_SWITCHING,{id:E,groupId:p,name:D,type:R,url:y}),s.details&&!s.details.live)return;var x=this.switchParams(s.url,o==null?void 0:o.details);this.loadPlaylist(x)},l.selectInitialTrack=function(){var d=this.tracksInGroup;console.assert(d.length,"Initial audio track should be selected when tracks are known");var u=this.trackName,o=this.findTrackId(u)||this.findTrackId();o!==-1?this.setAudioTrack(o):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(k.Events.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},l.findTrackId=function(d){for(var u=this.tracksInGroup,o=0;on.partTarget&&(s+=1)}if(Object(k.isFiniteNumber)(o))return new v.HlsUrlParameters(o,Object(k.isFiniteNumber)(s)?s:void 0,v.HlsSkip.No)}}},r.loadPlaylist=function(i){},r.shouldLoadTrack=function(i){return this.canLoad&&i&&!!i.url&&(!i.details||i.details.live)},r.playlistLoaded=function(i,n,l){var f=this,d=n.details,u=n.stats,o=u.loading.end?Math.max(0,self.performance.now()-u.loading.end):0;if(d.advancedDateTime=Date.now()-o,d.live||l!=null&&l.live){if(d.reloaded(l),l&&this.log("live playlist "+i+" "+(d.advanced?"REFRESHED "+d.lastPartSn+"-"+d.lastPartIndex:"MISSED")),l&&d.fragments.length>0&&Object(m.mergeDetails)(l,d),!this.canLoad||!d.live)return;var s,E=void 0,b=void 0;if(d.canBlockReload&&d.endSN&&d.advanced){var p=this.hls.config.lowLatencyMode,D=d.lastPartSn,R=d.endSN,y=d.lastPartIndex,x=y!==-1,w=D===R,T=p?0:y;x?(E=w?R+1:D,b=w?T:y+1):E=R+1;var F=d.age,P=F+d.ageHeader,A=Math.min(P-d.partTarget,d.targetduration*1.5);if(A>0){if(l&&A>l.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+l.tuneInGoal+" to: "+A+" with playlist age: "+d.age),A=0;else{var X=Math.floor(A/d.targetduration);if(E+=X,b!==void 0){var z=Math.round(A%d.targetduration/d.partTarget);b+=z}this.log("CDN Tune-in age: "+d.ageHeader+"s last advanced "+F.toFixed(2)+"s goal: "+A+" skip sn "+X+" to part "+b)}d.tuneInGoal=A}if(s=this.getDeliveryDirectives(d,n.deliveryDirectives,E,b),p||!w){this.loadPlaylist(s);return}}else s=this.getDeliveryDirectives(d,n.deliveryDirectives,E,b);var O=Object(m.computeReloadInterval)(d,u);E!==void 0&&d.canBlockReload&&(O-=d.partTarget||1),this.log("reload live playlist "+i+" in "+Math.round(O)+" ms"),this.timer=self.setTimeout(function(){return f.loadPlaylist(s)},O)}else this.clearTimer()},r.getDeliveryDirectives=function(i,n,l,f){var d=Object(v.getSkipValue)(i,l);return n!=null&&n.skip&&i.deltaUpdateFailed&&(l=n.msn,f=n.part,d=v.HlsSkip.No),new v.HlsUrlParameters(l,f,d)},r.retryLoadingOrFail=function(i){var n=this,l=this.hls.config,f=this.retryCount-1&&(d=i.context)!==null&&d!==void 0&&d.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+i.details+'"'),this.loadPlaylist();else{var u=Math.min(Math.pow(2,this.retryCount)*l.levelLoadingRetryDelay,l.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return n.loadPlaylist()},u),this.warn("retry playlist loading #"+this.retryCount+" in "+u+' ms after "'+i.details+'"')}}else this.warn('cannot recover from error "'+i.details+'"'),this.clearTimer(),i.fatal=!0;return f},h}()},"./src/controller/base-stream-controller.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"State",function(){return R}),S.d(g,"default",function(){return y});var k=S("./src/polyfills/number.ts"),v=S("./src/task-loop.ts"),m=S("./src/controller/fragment-tracker.ts"),C=S("./src/utils/buffer-helper.ts"),_=S("./src/utils/logger.ts"),e=S("./src/events.ts"),h=S("./src/errors.ts"),r=S("./src/types/transmuxer.ts"),c=S("./src/utils/mp4-tools.ts"),i=S("./src/utils/discontinuities.ts"),n=S("./src/controller/fragment-finders.ts"),l=S("./src/controller/level-helper.ts"),f=S("./src/loader/fragment-loader.ts"),d=S("./src/crypt/decrypter.ts"),u=S("./src/utils/time-ranges.ts"),o=S("./src/types/loader.ts");function s(x,w){for(var T=0;Tee;(B0&&B&&B.key&&B.iv&&B.method==="AES-128"){var U=self.performance.now();return A.decrypter.webCryptoDecrypt(new Uint8Array(O),B.key.buffer,B.iv.buffer).then(function(L){var G=self.performance.now();return z.trigger(e.Events.FRAG_DECRYPTED,{frag:P,payload:L,stats:{tstart:U,tdecrypt:G}}),X.payload=L,X})}return X}).then(function(X){var z=A.fragCurrent,O=A.hls,B=A.levels;if(!B)throw new Error("init load aborted, missing levels");var U=B[P.level].details;console.assert(U,"Level details are defined when init segment is loaded");var L=P.stats;A.state=R.IDLE,A.fragLoadError=0,P.data=new Uint8Array(X.payload),L.parsing.start=L.buffering.start=self.performance.now(),L.parsing.end=L.buffering.end=self.performance.now(),X.frag===z&&O.trigger(e.Events.FRAG_BUFFERED,{stats:L,frag:z,part:null,id:P.type}),A.tick()}).catch(function(X){A.warn(X),A.resetFragmentLoading(P)})},T.fragContextChanged=function(P){var A=this.fragCurrent;return!P||!A||P.level!==A.level||P.sn!==A.sn||P.urlId!==A.urlId},T.fragBufferedComplete=function(P,A){var X=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+P.type+" sn: "+P.sn+(A?" part: "+A.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+P.level+" "+u.default.toString(C.BufferHelper.getBuffered(X))),this.state=R.IDLE,this.tick()},T._handleFragmentLoadComplete=function(P){var A=this.transmuxer;if(!A)return;var X=P.frag,z=P.part,O=P.partsLoaded,B=!O||O.length===0||O.some(function(L){return!L}),U=new r.ChunkMetadata(X.level,X.sn,X.stats.chunkCount+1,0,z?z.index:-1,!B);A.flush(U)},T._handleFragmentLoadProgress=function(P){},T._doFragLoad=function(P,A,X,z){var O=this;if(X===void 0&&(X=null),!this.levels)throw new Error("frag load aborted, missing levels");if(X=Math.max(P.start,X||0),this.config.lowLatencyMode&&A){var B=A.partList;if(B&&z){X>P.end&&A.fragmentHint&&(P=A.fragmentHint);var U=this.getNextPart(B,P,X);if(U>-1){var L=B[U];return this.log("Loading part sn: "+P.sn+" p: "+L.index+" cc: "+P.cc+" of playlist ["+A.startSN+"-"+A.endSN+"] parts [0-"+U+"-"+(B.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+P.level+", target: "+parseFloat(X.toFixed(3))),this.nextLoadPosition=L.start+L.duration,this.state=R.FRAG_LOADING,this.hls.trigger(e.Events.FRAG_LOADING,{frag:P,part:B[U],targetBufferTime:X}),this.doFragPartsLoad(P,B,U,z).catch(function(G){return O.handleFragLoadError(G)})}else if(!P.url||this.loadedEndOfParts(B,X))return Promise.resolve(null)}}return this.log("Loading fragment "+P.sn+" cc: "+P.cc+" "+(A?"of ["+A.startSN+"-"+A.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+P.level+", target: "+parseFloat(X.toFixed(3))),Object(k.isFiniteNumber)(P.sn)&&!this.bitrateTest&&(this.nextLoadPosition=P.start+P.duration),this.state=R.FRAG_LOADING,this.hls.trigger(e.Events.FRAG_LOADING,{frag:P,targetBufferTime:X}),this.fragmentLoader.load(P,z).catch(function(G){return O.handleFragLoadError(G)})},T.doFragPartsLoad=function(P,A,X,z){var O=this;return new Promise(function(B,U){var L=[],G=function ee(oe){var ae=A[oe];O.fragmentLoader.loadPart(P,ae,z).then(function(be){L[ae.index]=be;var _e=be.part;O.hls.trigger(e.Events.FRAG_LOADED,be);var fe=A[oe+1];if(fe&&fe.fragment===P)ee(oe+1);else return B({frag:P,part:_e,partsLoaded:L})}).catch(U)};G(X)})},T.handleFragLoadError=function(P){var A=P.data;return A&&A.details===h.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(A.frag,A.part):this.hls.trigger(e.Events.ERROR,A),null},T._handleTransmuxerFlush=function(P){var A=this.getCurrentContext(P);if(!A||this.state!==R.PARSING){this.fragCurrent||(this.state=R.IDLE);return}var X=A.frag,z=A.part,O=A.level,B=self.performance.now();X.stats.parsing.end=B,z&&(z.stats.parsing.end=B),this.updateLevelTiming(X,z,O,P.partial)},T.getCurrentContext=function(P){var A=this.levels,X=P.level,z=P.sn,O=P.part;if(!A||!A[X])return this.warn("Levels object was unset while buffering fragment "+z+" of level "+X+". The current chunk will not be buffered."),null;var B=A[X],U=O>-1?Object(l.getPartWith)(B,z,O):null,L=U?U.fragment:Object(l.getFragmentWithSN)(B,z,this.fragCurrent);return L?{frag:L,part:U,level:B}:null},T.bufferFragmentData=function(P,A,X,z){if(!P||this.state!==R.PARSING)return;var O=P.data1,B=P.data2,U=O;if(O&&B&&(U=Object(c.appendUint8Array)(O,B)),!U||!U.length)return;var L={type:P.type,frag:A,part:X,chunkMeta:z,parent:A.type,data:U};this.hls.trigger(e.Events.BUFFER_APPENDING,L),P.dropped&&P.independent&&!X&&this.flushBufferGap(A)},T.flushBufferGap=function(P){var A=this.media;if(!A)return;if(!C.BufferHelper.isBuffered(A,A.currentTime)){this.flushMainBuffer(0,P.start);return}var X=A.currentTime,z=C.BufferHelper.bufferInfo(A,X,0),O=P.duration,B=Math.min(this.config.maxFragLookUpTolerance*2,O*.25),U=Math.max(Math.min(P.start-B,z.end-B),X+B);P.start-U>B&&this.flushMainBuffer(U,P.start)},T.getFwdBufferInfo=function(P,A){var X=this.config,z=this.getLoadPosition();if(!Object(k.isFiniteNumber)(z))return null;var O=C.BufferHelper.bufferInfo(P,z,X.maxBufferHole);if(O.len===0&&O.nextStart!==void 0){var B=this.fragmentTracker.getBufferedFrag(z,A);if(B&&O.nextStart=X?(A.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+A.maxMaxBufferLength+"s"),!0):!1},T.getNextFragment=function(P,A){var X,z,O=A.fragments,B=O.length;if(!B)return null;var U=this.config,L=O[0].start,G;if(A.live){var ee=U.initialLiveManifestSize;if(B-1&&XX.start&&X.loaded},T.getInitialLiveFragment=function(P,A){var X=this.fragPrevious,z=null;if(X){if(P.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+X.programDateTime),z=Object(n.findFragmentByPDT)(A,X.endProgramDateTime,this.config.maxFragLookUpTolerance)),!z){var O=X.sn+1;if(O>=P.startSN&&O<=P.endSN){var B=A[O-P.startSN];X.cc===B.cc&&(z=B,this.log("Live playlist, switching playlist, load frag with next SN: "+z.sn))}z||(z=Object(n.findFragWithCC)(A,X.cc),z&&this.log("Live playlist, switching playlist, load frag with same CC: "+z.sn))}}else{var U=this.hls.liveSyncPosition;U!==null&&(z=this.getFragmentAtPosition(U,this.bitrateTest?P.fragmentEnd:P.edge,P))}return z},T.getFragmentAtPosition=function(P,A,X){var z=this.config,O=this.fragPrevious,B=X.fragments,U=X.endSN,L=X.fragmentHint,G=z.maxFragLookUpTolerance,ee=!!(z.lowLatencyMode&&X.partList&&L);ee&&L&&!this.bitrateTest&&(B=B.concat(L),U=L.sn);var oe;if(PA-G?0:G;oe=Object(n.findFragmentByPTS)(O,B,P,ae)}else oe=B[B.length-1];if(oe){var be=oe.sn-X.startSN,_e=O&&oe.level===O.level,fe=B[be+1],Re=this.fragmentTracker.getState(oe);if(Re===m.FragmentState.BACKTRACKED){oe=null;for(var Oe=be;B[Oe]&&this.fragmentTracker.getState(B[Oe])===m.FragmentState.BACKTRACKED;)O?oe=B[Oe--]:oe=B[--Oe];oe||(oe=fe)}else O&&oe.sn===O.sn&&!ee&&(_e&&(oe.sn=B-A.maxFragLookUpTolerance&&O<=U;if(z!==null&&X.duration>z&&(O"+P.startSN+" prev-sn: "+(O?O.sn:"na")+" fragments: "+U),oe}return L},T.waitForCdnTuneIn=function(P){var A=3;return P.live&&P.canBlockReload&&P.tuneInGoal>Math.max(P.partHoldBack,P.partTarget*A)},T.setStartPosition=function(P,A){var X=this.startPosition;if(X"+P))}}]),w}(v.default)},"./src/controller/buffer-controller.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"default",function(){return n});var k=S("./src/polyfills/number.ts"),v=S("./src/events.ts"),m=S("./src/utils/logger.ts"),C=S("./src/errors.ts"),_=S("./src/utils/buffer-helper.ts"),e=S("./src/utils/mediasource-helper.ts"),h=S("./src/loader/fragment.ts"),r=S("./src/controller/buffer-operation-queue.ts"),c=Object(e.getMediaSource)(),i=/([ha]vc.)(?:\.[^.,]+)+/,n=function(){function l(d){var u=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var o=u.hls,s=u.media,E=u.mediaSource;m.logger.log("[buffer-controller]: Media source opened"),s&&(u.updateMediaElementDuration(),o.trigger(v.Events.MEDIA_ATTACHED,{media:s})),E&&E.removeEventListener("sourceopen",u._onMediaSourceOpen),u.checkPendingTracks()},this._onMediaSourceClose=function(){m.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){m.logger.log("[buffer-controller]: Media source ended")},this.hls=d,this._initSourceBuffer(),this.registerListeners()}var f=l.prototype;return f.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},f.destroy=function(){this.unregisterListeners(),this.details=null},f.registerListeners=function(){var u=this.hls;u.on(v.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),u.on(v.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.on(v.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.on(v.Events.BUFFER_RESET,this.onBufferReset,this),u.on(v.Events.BUFFER_APPENDING,this.onBufferAppending,this),u.on(v.Events.BUFFER_CODECS,this.onBufferCodecs,this),u.on(v.Events.BUFFER_EOS,this.onBufferEos,this),u.on(v.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),u.on(v.Events.LEVEL_UPDATED,this.onLevelUpdated,this),u.on(v.Events.FRAG_PARSED,this.onFragParsed,this),u.on(v.Events.FRAG_CHANGED,this.onFragChanged,this)},f.unregisterListeners=function(){var u=this.hls;u.off(v.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),u.off(v.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.off(v.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.off(v.Events.BUFFER_RESET,this.onBufferReset,this),u.off(v.Events.BUFFER_APPENDING,this.onBufferAppending,this),u.off(v.Events.BUFFER_CODECS,this.onBufferCodecs,this),u.off(v.Events.BUFFER_EOS,this.onBufferEos,this),u.off(v.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),u.off(v.Events.LEVEL_UPDATED,this.onLevelUpdated,this),u.off(v.Events.FRAG_PARSED,this.onFragParsed,this),u.off(v.Events.FRAG_CHANGED,this.onFragChanged,this)},f._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new r.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},f.onManifestParsed=function(u,o){var s=2;(o.audio&&!o.video||!o.altAudio)&&(s=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=s,this.details=null,m.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},f.onMediaAttaching=function(u,o){var s=this.media=o.media;if(s&&c){var E=this.mediaSource=new c;E.addEventListener("sourceopen",this._onMediaSourceOpen),E.addEventListener("sourceended",this._onMediaSourceEnded),E.addEventListener("sourceclose",this._onMediaSourceClose),s.src=self.URL.createObjectURL(E),this._objectUrl=s.src}},f.onMediaDetaching=function(){var u=this.media,o=this.mediaSource,s=this._objectUrl;if(o){if(m.logger.log("[buffer-controller]: media source detaching"),o.readyState==="open")try{o.endOfStream()}catch(E){m.logger.warn("[buffer-controller]: onMediaDetaching: "+E.message+" while calling endOfStream")}this.onBufferReset(),o.removeEventListener("sourceopen",this._onMediaSourceOpen),o.removeEventListener("sourceended",this._onMediaSourceEnded),o.removeEventListener("sourceclose",this._onMediaSourceClose),u&&(s&&self.URL.revokeObjectURL(s),u.src===s?(u.removeAttribute("src"),u.load()):m.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(v.Events.MEDIA_DETACHED,void 0)},f.onBufferReset=function(){var u=this;this.getSourceBufferTypes().forEach(function(o){var s=u.sourceBuffer[o];try{s&&(u.removeBufferListeners(o),u.mediaSource&&u.mediaSource.removeSourceBuffer(s),u.sourceBuffer[o]=void 0)}catch(E){m.logger.warn("[buffer-controller]: Failed to reset the "+o+" buffer",E)}}),this._initSourceBuffer()},f.onBufferCodecs=function(u,o){var s=this,E=this.getSourceBufferTypes().length;if(Object.keys(o).forEach(function(b){if(E){var p=s.tracks[b];if(p&&typeof p.buffer.changeType=="function"){var D=o[b],R=D.codec,y=D.levelCodec,x=D.container,w=(p.levelCodec||p.codec).replace(i,"$1"),T=(y||R).replace(i,"$1");if(w!==T){var F=x+";codecs="+(y||R);s.appendChangeType(b,F)}}}else s.pendingTracks[b]=o[b]}),E)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},f.appendChangeType=function(u,o){var s=this,E=this.operationQueue,b={execute:function(){var D=s.sourceBuffer[u];D&&(m.logger.log("[buffer-controller]: changing "+u+" sourceBuffer type to "+o),D.changeType(o)),E.shiftAndExecuteNext(u)},onStart:function(){},onComplete:function(){},onError:function(D){m.logger.warn("[buffer-controller]: Failed to change "+u+" SourceBuffer type",D)}};E.append(b,u)},f.onBufferAppending=function(u,o){var s=this,E=this.hls,b=this.operationQueue,p=this.tracks,D=o.data,R=o.type,y=o.frag,x=o.part,w=o.chunkMeta,T=w.buffering[R],F=self.performance.now();T.start=F;var P=y.stats.buffering,A=x?x.stats.buffering:null;P.start===0&&(P.start=F),A&&A.start===0&&(A.start=F);var X=p.audio,z=R==="audio"&&w.id===1&&(X==null?void 0:X.container)==="audio/mpeg",O={execute:function(){if(T.executeStart=self.performance.now(),z){var U=s.sourceBuffer[R];if(U){var L=y.start-U.timestampOffset;Math.abs(L)>=.1&&(m.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+y.start+" (delta: "+L+") sn: "+y.sn+")"),U.timestampOffset=y.start)}}s.appendExecutor(D,R)},onStart:function(){},onComplete:function(){var U=self.performance.now();T.executeEnd=T.end=U,P.first===0&&(P.first=U),A&&A.first===0&&(A.first=U);var L=s.sourceBuffer,G={};for(var ee in L)G[ee]=_.BufferHelper.getBuffered(L[ee]);s.appendError=0,s.hls.trigger(v.Events.BUFFER_APPENDED,{type:R,frag:y,part:x,chunkMeta:w,parent:y.type,timeRanges:G})},onError:function(U){m.logger.error("[buffer-controller]: Error encountered while trying to append to the "+R+" SourceBuffer",U);var L={type:C.ErrorTypes.MEDIA_ERROR,parent:y.type,details:C.ErrorDetails.BUFFER_APPEND_ERROR,err:U,fatal:!1};U.code===DOMException.QUOTA_EXCEEDED_ERR?L.details=C.ErrorDetails.BUFFER_FULL_ERROR:(s.appendError++,L.details=C.ErrorDetails.BUFFER_APPEND_ERROR,s.appendError>E.config.appendErrorMaxRetry&&(m.logger.error("[buffer-controller]: Failed "+E.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),L.fatal=!0)),E.trigger(v.Events.ERROR,L)}};b.append(O,R)},f.onBufferFlushing=function(u,o){var s=this,E=this.operationQueue,b=function(D){return{execute:s.removeExecutor.bind(s,D,o.startOffset,o.endOffset),onStart:function(){},onComplete:function(){s.hls.trigger(v.Events.BUFFER_FLUSHED,{type:D})},onError:function(y){m.logger.warn("[buffer-controller]: Failed to remove from "+D+" SourceBuffer",y)}}};o.type?E.append(b(o.type),o.type):this.getSourceBufferTypes().forEach(function(p){E.append(b(p),p)})},f.onFragParsed=function(u,o){var s=this,E=o.frag,b=o.part,p=[],D=b?b.elementaryStreams:E.elementaryStreams;D[h.ElementaryStreamTypes.AUDIOVIDEO]?p.push("audiovideo"):(D[h.ElementaryStreamTypes.AUDIO]&&p.push("audio"),D[h.ElementaryStreamTypes.VIDEO]&&p.push("video"));var R=function(){var x=self.performance.now();E.stats.buffering.end=x,b&&(b.stats.buffering.end=x);var w=b?b.stats:E.stats;s.hls.trigger(v.Events.FRAG_BUFFERED,{frag:E,part:b,stats:w,id:E.type})};p.length===0&&m.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+E.type+" level: "+E.level+" sn: "+E.sn),this.blockBuffers(R,p)},f.onFragChanged=function(u,o){this.flushBackBuffer()},f.onBufferEos=function(u,o){var s=this,E=this.getSourceBufferTypes().reduce(function(b,p){var D=s.sourceBuffer[p];return(!o.type||o.type===p)&&(D&&!D.ended&&(D.ended=!0,m.logger.log("[buffer-controller]: "+p+" sourceBuffer now EOS"))),b&&!!(!D||D.ended)},!0);E&&this.blockBuffers(function(){var b=s.mediaSource;if(!b||b.readyState!=="open")return;b.endOfStream()})},f.onLevelUpdated=function(u,o){var s=o.details;if(!s.fragments.length)return;this.details=s,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},f.flushBackBuffer=function(){var u=this.hls,o=this.details,s=this.media,E=this.sourceBuffer;if(!s||o===null)return;var b=this.getSourceBufferTypes();if(!b.length)return;var p=o.live&&u.config.liveBackBufferLength!==null?u.config.liveBackBufferLength:u.config.backBufferLength;if(!Object(k.isFiniteNumber)(p)||p<0)return;var D=s.currentTime,R=o.levelTargetDuration,y=Math.max(p,R),x=Math.floor(D/R)*R-y;b.forEach(function(w){var T=E[w];if(T){var F=_.BufferHelper.getBuffered(T);F.length>0&&x>F.start(0)&&(u.trigger(v.Events.BACK_BUFFER_REACHED,{bufferEnd:x}),o.live&&u.trigger(v.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:x}),u.trigger(v.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:x,type:w}))}})},f.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var u=this.details,o=this.hls,s=this.media,E=this.mediaSource,b=u.fragments[0].start+u.totalduration,p=s.duration,D=Object(k.isFiniteNumber)(E.duration)?E.duration:0;u.live&&o.config.liveDurationInfinity?(m.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),E.duration=Infinity,this.updateSeekableRange(u)):(b>D&&b>p||!Object(k.isFiniteNumber)(p))&&(m.logger.log("[buffer-controller]: Updating Media Source duration to "+b.toFixed(3)),E.duration=b)},f.updateSeekableRange=function(u){var o=this.mediaSource,s=u.fragments,E=s.length;if(E&&u.live&&o!==null&&o!==void 0&&o.setLiveSeekableRange){var b=Math.max(0,s[0].start),p=Math.max(b,b+u.totalduration);o.setLiveSeekableRange(b,p)}},f.checkPendingTracks=function(){var u=this.bufferCodecEventsExpected,o=this.operationQueue,s=this.pendingTracks,E=Object.keys(s).length;if(E&&!u||E===2){this.createSourceBuffers(s),this.pendingTracks={};var b=this.getSourceBufferTypes();if(b.length===0){this.hls.trigger(v.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}b.forEach(function(p){o.executeNext(p)})}},f.createSourceBuffers=function(u){var o=this.sourceBuffer,s=this.mediaSource;if(!s)throw Error("createSourceBuffers called when mediaSource was null");var E=0;for(var b in u)if(!o[b]){var p=u[b];if(!p)throw Error("source buffer exists for track "+b+", however track does not");var D=p.levelCodec||p.codec,R=p.container+";codecs="+D;m.logger.log("[buffer-controller]: creating sourceBuffer("+R+")");try{var y=o[b]=s.addSourceBuffer(R),x=b;this.addBufferListener(x,"updatestart",this._onSBUpdateStart),this.addBufferListener(x,"updateend",this._onSBUpdateEnd),this.addBufferListener(x,"error",this._onSBUpdateError),this.tracks[b]={buffer:y,codec:D,container:p.container,levelCodec:p.levelCodec,id:p.id},E++}catch(w){m.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+w.message),this.hls.trigger(v.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:w,mimeType:R})}}E&&this.hls.trigger(v.Events.BUFFER_CREATED,{tracks:this.tracks})},f._onSBUpdateStart=function(u){var o=this.operationQueue,s=o.current(u);s.onStart()},f._onSBUpdateEnd=function(u){var o=this.operationQueue,s=o.current(u);s.onComplete(),o.shiftAndExecuteNext(u)},f._onSBUpdateError=function(u,o){m.logger.error("[buffer-controller]: "+u+" SourceBuffer error",o),this.hls.trigger(v.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var s=this.operationQueue.current(u);s&&s.onError(o)},f.removeExecutor=function(u,o,s){var E=this.media,b=this.mediaSource,p=this.operationQueue,D=this.sourceBuffer,R=D[u];if(!E||!b||!R){m.logger.warn("[buffer-controller]: Attempting to remove from the "+u+" SourceBuffer, but it does not exist"),p.shiftAndExecuteNext(u);return}var y=Object(k.isFiniteNumber)(E.duration)?E.duration:Infinity,x=Object(k.isFiniteNumber)(b.duration)?b.duration:Infinity,w=Math.max(0,o),T=Math.min(s,y,x);T>w?(m.logger.log("[buffer-controller]: Removing ["+w+","+T+"] from the "+u+" SourceBuffer"),console.assert(!R.updating,u+" sourceBuffer must not be updating"),R.remove(w,T)):p.shiftAndExecuteNext(u)},f.appendExecutor=function(u,o){var s=this.operationQueue,E=this.sourceBuffer,b=E[o];if(!b){m.logger.warn("[buffer-controller]: Attempting to append to the "+o+" SourceBuffer, but it does not exist"),s.shiftAndExecuteNext(o);return}b.ended=!1,console.assert(!b.updating,o+" sourceBuffer must not be updating"),b.appendBuffer(u)},f.blockBuffers=function(u,o){var s=this;if(o===void 0&&(o=this.getSourceBufferTypes()),!o.length){m.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(u);return}var E=this.operationQueue,b=o.map(function(p){return E.appendBlocker(p)});Promise.all(b).then(function(){u(),o.forEach(function(p){var D=s.sourceBuffer[p];(!D||!D.updating)&&E.shiftAndExecuteNext(p)})})},f.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},f.addBufferListener=function(u,o,s){var E=this.sourceBuffer[u];if(!E)return;var b=s.bind(this,u);this.listeners[u].push({event:o,listener:b}),E.addEventListener(o,b)},f.removeBufferListeners=function(u){var o=this.sourceBuffer[u];if(!o)return;this.listeners[u].forEach(function(s){o.removeEventListener(s.event,s.listener)})},l}()},"./src/controller/buffer-operation-queue.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"default",function(){return v});var k=S("./src/utils/logger.ts"),v=function(){function m(_){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=_}var C=m.prototype;return C.append=function(e,h){var r=this.queues[h];r.push(e),r.length===1&&this.buffers[h]&&this.executeNext(h)},C.insertAbort=function(e,h){var r=this.queues[h];r.unshift(e),this.executeNext(h)},C.appendBlocker=function(e){var h,r=new Promise(function(i){h=i}),c={execute:h,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(c,e),r},C.executeNext=function(e){var h=this.buffers,r=this.queues,c=h[e],i=r[e];if(i.length){var n=i[0];try{n.execute()}catch(l){k.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),n.onError(l),(!c||!c.updating)&&(i.shift(),this.executeNext(e))}}},C.shiftAndExecuteNext=function(e){this.queues[e].shift(),this.executeNext(e)},C.current=function(e){return this.queues[e][0]},m}()},"./src/controller/cap-level-controller.ts":function(N,g,S){"use strict";S.r(g);var k=S("./src/events.ts");function v(_,e){for(var h=0;h0&&this.mediaWidth>0){var r=this.hls.levels;if(r.length){var c=this.hls;c.autoLevelCapping=this.getMaxLevel(r.length-1),c.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=c.autoLevelCapping}}},e.getMaxLevel=function(r){var c=this,i=this.hls.levels;if(!i.length)return-1;var n=i.filter(function(l,f){return _.isLevelAllowed(f,c.restrictedLevels)&&f<=r});return this.clientRect=null,_.getMaxLevelByMediaSize(n,this.mediaWidth,this.mediaHeight)},e.startCapping=function(){if(this.timer)return;this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize()},e.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},e.getDimensions=function(){if(this.clientRect)return this.clientRect;var r=this.media,c={width:0,height:0};if(r){var i=r.getBoundingClientRect();c.width=i.width,c.height=i.height,!c.width&&!c.height&&(c.width=i.right-i.left||r.width||0,c.height=i.bottom-i.top||r.height||0)}return this.clientRect=c,c},_.isLevelAllowed=function(r,c){return c===void 0&&(c=[]),c.indexOf(r)===-1},_.getMaxLevelByMediaSize=function(r,c,i){if(!r||!r.length)return-1;for(var n=function(o,s){return s?o.width!==s.width||o.height!==s.height:!0},l=r.length-1,f=0;f=c||d.height>=i)&&n(d,r[f+1])){l=f;break}}return l},m(_,[{key:"mediaWidth",get:function(){return this.getDimensions().width*_.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*_.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var r=1;try{r=self.devicePixelRatio}catch(c){}return r}}]),_}();g.default=C},"./src/controller/cmcd-controller.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"default",function(){return n});var k=S("./src/events.ts"),v=S("./src/types/cmcd.ts"),m=S("./src/utils/buffer-helper.ts"),C=S("./src/utils/logger.ts");function _(l,f){for(var d=0;d=l.length?{done:!0}:{done:!1,value:l[u++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function r(l,f){if(!l)return;if(typeof l=="string")return c(l,f);var d=Object.prototype.toString.call(l).slice(8,-1);if(d==="Object"&&l.constructor&&(d=l.constructor.name),d==="Map"||d==="Set")return Array.from(l);if(d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d))return c(l,f)}function c(l,f){(f==null||f>l.length)&&(f=l.length);for(var d=0,u=new Array(f);do&&(o=p.bitrate)}return o>0?o:NaN},f.getBufferLength=function(u){var o=this.hls.media,s=u===v.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!s||!o)return NaN;var E=m.BufferHelper.bufferInfo(s,o.currentTime,this.config.maxBufferHole);return E.len*1e3},f.createPlaylistLoader=function(){var u=this.config.pLoader,o=this.applyPlaylistData,s=u||this.config.loader;return function(){function E(p){this.loader=void 0,this.loader=new s(p)}var b=E.prototype;return b.destroy=function(){this.loader.destroy()},b.abort=function(){this.loader.abort()},b.load=function(D,R,y){o(D),this.loader.load(D,R,y)},e(E,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),E}()},f.createFragmentLoader=function(){var u=this.config.fLoader,o=this.applyFragmentData,s=u||this.config.loader;return function(){function E(p){this.loader=void 0,this.loader=new s(p)}var b=E.prototype;return b.destroy=function(){this.loader.destroy()},b.abort=function(){this.loader.abort()},b.load=function(D,R,y){o(D),this.loader.load(D,R,y)},e(E,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),E}()},l.uuid=function(){var u=URL.createObjectURL(new Blob),o=u.toString();return URL.revokeObjectURL(u),o.substr(o.lastIndexOf("/")+1)},l.serialize=function(u){for(var o=[],s=function(z){return!Number.isNaN(z)&&z!=null&&z!==""&&z!==!1},E=function(z){return Math.round(z)},b=function(z){return E(z/100)*100},p=function(z){return encodeURIComponent(z)},D={br:E,d:E,bl:b,dl:b,mtp:b,nor:p,rtp:b,tb:E},R=Object.keys(u||{}).sort(),y=h(R),x;!(x=y()).done;){var w=x.value,T=u[w];if(!s(T))continue;if(w==="v"&&T===1)continue;if(w=="pr"&&T===1)continue;var F=D[w];F&&(T=F(T));var P=typeof T,A=void 0;w==="ot"||w==="sf"||w==="st"?A=w+"="+T:P==="boolean"?A=w:P==="number"?A=w+"="+T:A=w+"="+JSON.stringify(T),o.push(A)}return o.join(",")},l.toHeaders=function(u){for(var o=Object.keys(u),s={},E=["Object","Request","Session","Status"],b=[{},{},{},{}],p={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},D=0,R=o;Dh){this.hls.trigger(k.Events.ERROR,{type:v.ErrorTypes.KEY_SYSTEM_ERROR,details:v.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var p=h-this._requestLicenseFailureCount+1;m.logger.warn("Retrying license request, "+p+" attempts left"),this._requestLicense(o,s)}break}},l._generateLicenseRequestChallenge=function(d,u){switch(d.mediaKeySystemDomain){case C.KeySystems.WIDEVINE:return u}throw new Error("unsupported key-system: "+d.mediaKeySystemDomain)},l._requestLicense=function(d,u){m.logger.log("Requesting content license for key-system");var o=this._mediaKeysList[0];if(!o){m.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(k.Events.ERROR,{type:v.ErrorTypes.KEY_SYSTEM_ERROR,details:v.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var s=this.getLicenseServerUrl(o.mediaKeySystemDomain),E=this._createLicenseXhr(s,d,u);m.logger.log("Sending license request to URL: "+s);var b=this._generateLicenseRequestChallenge(o,d);E.send(b)}catch(p){m.logger.error("Failure requesting DRM license: "+p),this.hls.trigger(k.Events.ERROR,{type:v.ErrorTypes.KEY_SYSTEM_ERROR,details:v.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},l.onMediaAttached=function(d,u){if(!this._emeEnabled)return;var o=u.media;this._media=o,o.addEventListener("encrypted",this._onMediaEncrypted)},l.onMediaDetached=function(){var d=this._media,u=this._mediaKeysList;if(!d)return;d.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(u.map(function(o){if(o.mediaKeysSession)return o.mediaKeysSession.close().catch(function(){})})).then(function(){return d.setMediaKeys(null)}).catch(function(){})},l.onManifestParsed=function(d,u){if(!this._emeEnabled)return;var o=u.levels.map(function(E){return E.audioCodec}).filter(function(E){return!!E}),s=u.levels.map(function(E){return E.videoCodec}).filter(function(E){return!!E});this._attemptKeySystemAccess(C.KeySystems.WIDEVINE,o,s)},e(n,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),n}();g.default=i},"./src/controller/fps-controller.ts":function(N,g,S){"use strict";S.r(g);var k=S("./src/events.ts"),v=S("./src/utils/logger.ts"),m=function(){function C(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}var _=C.prototype;return _.setStreamController=function(h){this.streamController=h},_.registerListeners=function(){this.hls.on(k.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},_.unregisterListeners=function(){this.hls.off(k.Events.MEDIA_ATTACHING,this.onMediaAttaching)},_.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},_.onMediaAttaching=function(h,r){var c=this.hls.config;if(c.capLevelOnFPSDrop){var i=r.media instanceof self.HTMLVideoElement?r.media:null;this.media=i,i&&typeof i.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),c.fpsDroppedMonitoringPeriod)}},_.checkFPS=function(h,r,c){var i=performance.now();if(r){if(this.lastTime){var n=i-this.lastTime,l=c-this.lastDroppedFrames,f=r-this.lastDecodedFrames,d=1e3*l/n,u=this.hls;if(u.trigger(k.Events.FPS_DROP,{currentDropped:l,currentDecoded:f,totalDroppedFrames:c}),d>0&&l>u.config.fpsDroppedMonitoringThreshold*f){var o=u.currentLevel;v.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+o),o>0&&(u.autoLevelCapping===-1||u.autoLevelCapping>=o)&&(o=o-1,u.trigger(k.Events.FPS_DROP_LEVEL_CAPPING,{level:o,droppedLevel:u.currentLevel}),u.autoLevelCapping=o,this.streamController.nextLevelSwitch())}}this.lastTime=i,this.lastDroppedFrames=c,this.lastDecodedFrames=r}},_.checkFPSInterval=function(){var h=this.media;if(h)if(this.isVideoPlaybackQualityAvailable){var r=h.getVideoPlaybackQuality();this.checkFPS(h,r.totalVideoFrames,r.droppedVideoFrames)}else this.checkFPS(h,h.webkitDecodedFrameCount,h.webkitDroppedFrameCount)},C}();g.default=m},"./src/controller/fragment-finders.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"findFragmentByPDT",function(){return m}),S.d(g,"findFragmentByPTS",function(){return C}),S.d(g,"fragmentWithinToleranceTest",function(){return _}),S.d(g,"pdtWithinToleranceTest",function(){return e}),S.d(g,"findFragWithCC",function(){return h});var k=S("./src/polyfills/number.ts"),v=S("./src/utils/binary-search.ts");function m(r,c,i){if(c===null||!Array.isArray(r)||!r.length||!Object(k.isFiniteNumber)(c))return null;var n=r[0].programDateTime;if(c<(n||0))return null;var l=r[r.length-1].endProgramDateTime;if(c>=(l||0))return null;i=i||0;for(var f=0;fr&&i.start?-1:0}function e(r,c,i){var n=Math.min(c,i.duration+(i.deltaPTS?i.deltaPTS:0))*1e3,l=i.endProgramDateTime||0;return l-n>r}function h(r,c){return v.default.search(r,function(i){return i.ccc?-1:0})}},"./src/controller/fragment-tracker.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"FragmentState",function(){return m}),S.d(g,"FragmentTracker",function(){return C});var k=S("./src/events.ts"),v=S("./src/types/loader.ts"),m;(function(h){h.NOT_LOADED="NOT_LOADED",h.BACKTRACKED="BACKTRACKED",h.APPENDING="APPENDING",h.PARTIAL="PARTIAL",h.OK="OK"})(m||(m={}));var C=function(){function h(c){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=c,this._registerListeners()}var r=h.prototype;return r._registerListeners=function(){var i=this.hls;i.on(k.Events.BUFFER_APPENDED,this.onBufferAppended,this),i.on(k.Events.FRAG_BUFFERED,this.onFragBuffered,this),i.on(k.Events.FRAG_LOADED,this.onFragLoaded,this)},r._unregisterListeners=function(){var i=this.hls;i.off(k.Events.BUFFER_APPENDED,this.onBufferAppended,this),i.off(k.Events.FRAG_BUFFERED,this.onFragBuffered,this),i.off(k.Events.FRAG_LOADED,this.onFragLoaded,this)},r.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},r.getAppendedFrag=function(i,n){if(n===v.PlaylistLevelType.MAIN){var l=this.activeFragment,f=this.activeParts;if(!l)return null;if(f)for(var d=f.length;d--;){var u=f[d],o=u?u.end:l.appendedPTS;if(u.start<=i&&o!==void 0&&i<=o)return d>9&&(this.activeParts=f.slice(d-9)),u}else if(l.start<=i&&l.appendedPTS!==void 0&&i<=l.appendedPTS)return l}return this.getBufferedFrag(i,n)},r.getBufferedFrag=function(i,n){for(var l=this.fragments,f=Object.keys(l),d=f.length;d--;){var u=l[f[d]];if((u==null?void 0:u.body.type)===n&&u.buffered){var o=u.body;if(o.start<=i&&i<=o.end)return o}}return null},r.detectEvictedFragments=function(i,n,l){var f=this;Object.keys(this.fragments).forEach(function(d){var u=f.fragments[d];if(!u)return;if(!u.buffered){u.body.type===l&&f.removeFragment(u.body);return}var o=u.range[i];if(!o)return;o.time.some(function(s){var E=!f.isTimeBuffered(s.startPTS,s.endPTS,n);return E&&f.removeFragment(u.body),E})})},r.detectPartialFragments=function(i){var n=this,l=this.timeRanges,f=i.frag,d=i.part;if(!l||f.sn==="initSegment")return;var u=e(f),o=this.fragments[u];if(!o)return;Object.keys(l).forEach(function(s){var E=f.elementaryStreams[s];if(!E)return;var b=l[s],p=d!==null||E.partial===!0;o.range[s]=n.getBufferedTimes(f,d,p,b)}),o.backtrack=o.loaded=null,Object.keys(o.range).length?o.buffered=!0:this.removeFragment(o.body)},r.fragBuffered=function(i){var n=e(i),l=this.fragments[n];l&&(l.backtrack=l.loaded=null,l.buffered=!0)},r.getBufferedTimes=function(i,n,l,f){for(var d={time:[],partial:l},u=n?n.start:i.start,o=n?n.end:i.end,s=i.minEndPTS||o,E=i.maxStartPTS||u,b=0;b=p&&s<=D){d.time.push({startPTS:Math.max(u,f.start(b)),endPTS:Math.min(o,f.end(b))});break}else if(up)d.partial=!0,d.time.push({startPTS:Math.max(u,f.start(b)),endPTS:Math.min(o,f.end(b))});else if(o<=p)break}return d},r.getPartialFragment=function(i){var n=null,l,f,d,u=0,o=this.bufferPadding,s=this.fragments;return Object.keys(s).forEach(function(E){var b=s[E];if(!b)return;_(b)&&(f=b.body.start-o,d=b.body.end+o,i>=f&&i<=d&&(l=Math.min(i-f,d-i),u<=l&&(n=b.body,u=l)))}),n},r.getState=function(i){var n=e(i),l=this.fragments[n];return l?l.buffered?_(l)?m.PARTIAL:m.OK:l.backtrack?m.BACKTRACKED:m.APPENDING:m.NOT_LOADED},r.backtrack=function(i,n){var l=e(i),f=this.fragments[l];if(!f||f.backtrack)return null;var d=f.backtrack=n||f.loaded;return f.loaded=null,d},r.getBacktrackData=function(i){var n=e(i),l=this.fragments[n];if(l){var f,d=l.backtrack;if(d!=null&&(f=d.payload)!==null&&f!==void 0&&f.byteLength)return d;this.removeFragment(i)}return null},r.isTimeBuffered=function(i,n,l){for(var f,d,u=0;u=f&&n<=d)return!0;if(n<=f)return!1}return!1},r.onFragLoaded=function(i,n){var l=n.frag,f=n.part;if(l.sn==="initSegment"||l.bitrateTest||f)return;var d=e(l);this.fragments[d]={body:l,loaded:n,backtrack:null,buffered:!1,range:Object.create(null)}},r.onBufferAppended=function(i,n){var l=this,f=n.frag,d=n.part,u=n.timeRanges;if(f.type===v.PlaylistLevelType.MAIN)if(this.activeFragment=f,d){var o=this.activeParts;o||(this.activeParts=o=[]),o.push(d)}else this.activeParts=null;this.timeRanges=u,Object.keys(u).forEach(function(s){var E=u[s];if(l.detectEvictedFragments(s,E),!d)for(var b=0;bi&&f.removeFragment(o)}})},r.removeFragment=function(i){var n=e(i);i.stats.loaded=0,i.clearElementaryStreamInfo(),delete this.fragments[n]},r.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},h}();function _(h){var r,c;return h.buffered&&(((r=h.range.video)===null||r===void 0?void 0:r.partial)||((c=h.range.audio)===null||c===void 0?void 0:c.partial))}function e(h){return h.type+"_"+h.level+"_"+h.urlId+"_"+h.sn}},"./src/controller/gap-controller.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"STALL_MINIMUM_DURATION_MS",function(){return _}),S.d(g,"MAX_START_GAP_JUMP",function(){return e}),S.d(g,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return h}),S.d(g,"SKIP_BUFFER_RANGE_START",function(){return r}),S.d(g,"default",function(){return c});var k=S("./src/utils/buffer-helper.ts"),v=S("./src/errors.ts"),m=S("./src/events.ts"),C=S("./src/utils/logger.ts"),_=250,e=2,h=.1,r=.05,c=function(){function i(l,f,d,u){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=l,this.media=f,this.fragmentTracker=d,this.hls=u}var n=i.prototype;return n.destroy=function(){this.hls=this.fragmentTracker=this.media=null},n.poll=function(f){var d=this.config,u=this.media,o=this.stalled,s=u.currentTime,E=u.seeking,b=this.seeking&&!E,p=!this.seeking&&E;if(this.seeking=E,s!==f){if(this.moved=!0,o!==null){if(this.stallReported){var D=self.performance.now()-o;C.logger.warn("playback not stuck anymore @"+s+", after "+Math.round(D)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((p||b)&&(this.stalled=null),u.paused||u.ended||u.playbackRate===0||!k.BufferHelper.getBuffered(u).length)return;var R=k.BufferHelper.bufferInfo(u,s,0),y=R.len>0,x=R.nextStart||0;if(!y&&!x)return;if(E){var w=R.len>e,T=!x||x-s>e&&!this.fragmentTracker.getPartialFragment(s);if(w||T)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var F,P=Math.max(x,R.start||0)-s,A=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,X=A==null||((F=A.details)===null||F===void 0)?void 0:F.live,z=X?A.details.targetduration*2:e;if(P>0&&P<=z){this._trySkipBufferHole(null);return}}var O=self.performance.now();if(o===null){this.stalled=O;return}var B=O-o;!E&&B>=_&&this._reportStall(R.len);var U=k.BufferHelper.bufferInfo(u,s,d.maxBufferHole);this._tryFixBufferStall(U,B)},n._tryFixBufferStall=function(f,d){var u=this.config,o=this.fragmentTracker,s=this.media,E=s.currentTime,b=o.getPartialFragment(E);if(b){var p=this._trySkipBufferHole(b);if(p)return}f.len>u.maxBufferHole&&d>u.highBufferWatchdogPeriod*1e3&&(C.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},n._reportStall=function(f){var d=this.hls,u=this.media,o=this.stallReported;o||(this.stallReported=!0,C.logger.warn("Playback stalling at @"+u.currentTime+" due to low buffer (buffer="+f+")"),d.trigger(m.Events.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:f}))},n._trySkipBufferHole=function(f){for(var d=this.config,u=this.hls,o=this.media,s=o.currentTime,E=0,b=k.BufferHelper.getBuffered(o),p=0;p=E&&s.05&&this.forwardBufferLength>1){var p=Math.min(2,Math.max(1,u)),D=Math.round(2/(1+Math.exp(-.75*s-this.edgeStalled))*20)/20;i.playbackRate=Math.min(p,Math.max(1,D))}else i.playbackRate!==1&&i.playbackRate!==0&&(i.playbackRate=1)},r.estimateLiveEdge=function(){var i=this.levelDetails;return i===null?null:i.edge+i.age},r.computeLatency=function(){var i=this.estimateLiveEdge();return i===null?null:i-this.currentTime},_(h,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var i=this.config,n=this.levelDetails;return i.liveMaxLatencyDuration!==void 0?i.liveMaxLatencyDuration:n?i.liveMaxLatencyDurationCount*n.targetduration:0}},{key:"targetLatency",get:function(){var i=this.levelDetails;if(i===null)return null;var n=i.holdBack,l=i.partHoldBack,f=i.targetduration,d=this.config,u=d.liveSyncDuration,o=d.liveSyncDurationCount,s=d.lowLatencyMode,E=this.hls.userConfig,b=s&&l||n;(E.liveSyncDuration||E.liveSyncDurationCount||b===0)&&(b=u!==void 0?u:o*f);var p=f,D=1;return b+Math.min(this.stallCount*D,p)}},{key:"liveSyncPosition",get:function(){var i=this.estimateLiveEdge(),n=this.targetLatency,l=this.levelDetails;if(i===null||n===null||l===null)return null;var f=l.edge,d=i-n-this.edgeStalled,u=f-l.totalduration,o=f-(this.config.lowLatencyMode&&l.partTarget||l.targetduration);return Math.min(Math.max(u,d),o)}},{key:"drift",get:function(){var i=this.levelDetails;return i===null?1:i.drift}},{key:"edgeStalled",get:function(){var i=this.levelDetails;if(i===null)return 0;var n=(this.config.lowLatencyMode&&i.partTarget||i.targetduration)*3;return Math.max(i.age-n,0)}},{key:"forwardBufferLength",get:function(){var i=this.media,n=this.levelDetails;if(!i||!n)return 0;var l=i.buffered.length;return l?i.buffered.end(l-1):n.edge-this.currentTime}}]),h}()},"./src/controller/level-controller.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"default",function(){return d});var k=S("./src/types/level.ts"),v=S("./src/events.ts"),m=S("./src/errors.ts"),C=S("./src/utils/codecs.ts"),_=S("./src/controller/level-helper.ts"),e=S("./src/controller/base-playlist-controller.ts"),h=S("./src/types/loader.ts");function r(){return r=Object.assign||function(u){for(var o=1;o0){x=D[0].bitrate,D.sort(function(B,U){return B.bitrate-U.bitrate}),this._levels=D;for(var X=0;Xthis.hls.config.fragLoadingMaxRetry&&(w=p.frag.level)):w=p.frag.level}break;case m.ErrorDetails.LEVEL_LOAD_ERROR:case m.ErrorDetails.LEVEL_LOAD_TIMEOUT:D&&(D.deliveryDirectives&&(x=!1),w=D.level),y=!0;break;case m.ErrorDetails.REMUX_ALLOC_ERROR:w=p.level,y=!0;break}w!==void 0&&this.recoverLevel(p,w,y,x)},s.recoverLevel=function(b,p,D,R){var y=b.details,x=this._levels[p];if(x.loadError++,D){var w=this.retryLoadingOrFail(b);if(w)b.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(R){var T=x.url.length;if(T>1&&x.loadError1){var R=(p.urlId+1)%D;this.warn("Switching to redundant URL-id "+R),this._levels.forEach(function(y){y.urlId=R}),this.level=b}},s.onFragLoaded=function(b,p){var D=p.frag;if(D!==void 0&&D.type===h.PlaylistLevelType.MAIN){var R=this._levels[D.level];R!==void 0&&(R.fragmentError=0,R.loadError=0)}},s.onLevelLoaded=function(b,p){var D,R=p.level,y=p.details,x=this._levels[R];if(!x){var w;this.warn("Invalid level index "+R),(w=p.deliveryDirectives)!==null&&w!==void 0&&w.skip&&(y.deltaUpdateFailed=!0);return}R===this.currentLevelIndex?(x.fragmentError===0&&(x.loadError=0,this.retryCount=0),this.playlistLoaded(R,p,x.details)):(D=p.deliveryDirectives)!==null&&D!==void 0&&D.skip&&(y.deltaUpdateFailed=!0)},s.onAudioTrackSwitched=function(b,p){var D=this.hls.levels[this.currentLevelIndex];if(!D)return;if(D.audioGroupIds){for(var R=-1,y=this.hls.audioTracks[p.id].groupId,x=0;x0){var R=D.urlId,y=D.url[R];if(b)try{y=b.addDirectives(y)}catch(x){this.warn("Could not construct new URL with HLS Delivery Directives: "+x)}this.log("Attempt loading level index "+p+(b?" at sn "+b.msn+" part "+b.part:"")+" with URL-id "+R+" "+y),this.clearTimer(),this.hls.trigger(v.Events.LEVEL_LOADING,{url:y,level:p,id:R,deliveryDirectives:b||null})}},s.removeLevel=function(b,p){var D=function(x,w){return w!==p},R=this._levels.filter(function(y,x){return x!==b?!0:y.url.length>1&&p!==void 0?(y.url=y.url.filter(D),y.audioGroupIds&&(y.audioGroupIds=y.audioGroupIds.filter(D)),y.textGroupIds&&(y.textGroupIds=y.textGroupIds.filter(D)),y.urlId=0,!0):!1}).map(function(y,x){var w=y.details;return w!=null&&w.fragments&&w.fragments.forEach(function(T){T.level=x}),y});this._levels=R,this.hls.trigger(v.Events.LEVELS_UPDATED,{levels:R})},i(o,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(b){var p,D=this._levels;if(D.length===0)return;if(this.currentLevelIndex===b&&(p=D[b])!==null&&p!==void 0&&p.details)return;if(b<0||b>=D.length){var R=b<0;if(this.hls.trigger(v.Events.ERROR,{type:m.ErrorTypes.OTHER_ERROR,details:m.ErrorDetails.LEVEL_SWITCH_ERROR,level:b,fatal:R,reason:"invalid level idx"}),R)return;b=Math.min(b,D.length-1)}this.clearTimer();var y=this.currentLevelIndex,x=D[y],w=D[b];this.log("switching to level "+b+" from "+y),this.currentLevelIndex=b;var T=r({},w,{level:b,maxBitrate:w.maxBitrate,uri:w.uri,urlId:w.urlId});delete T._urlId,this.hls.trigger(v.Events.LEVEL_SWITCHING,T);var F=w.details;if(!F||F.live){var P=this.switchParams(w.uri,x==null?void 0:x.details);this.loadPlaylist(P)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(b){this.manualLevelIndex=b,this._startLevel===void 0&&(this._startLevel=b),b!==-1&&(this.level=b)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(b){this._firstLevel=b}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var b=this.hls.config.startLevel;return b!==void 0?b:this._firstLevel}else return this._startLevel},set:function(b){this._startLevel=b}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(b){this.level=b,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=b)}}]),o}(e.default)},"./src/controller/level-helper.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"addGroupId",function(){return m}),S.d(g,"assignTrackIdsByGroup",function(){return C}),S.d(g,"updatePTS",function(){return _}),S.d(g,"updateFragPTSDTS",function(){return h}),S.d(g,"mergeDetails",function(){return r}),S.d(g,"mapPartIntersection",function(){return c}),S.d(g,"mapFragmentIntersection",function(){return i}),S.d(g,"adjustSliding",function(){return n}),S.d(g,"addSliding",function(){return l}),S.d(g,"computeReloadInterval",function(){return f}),S.d(g,"getFragmentWithSN",function(){return d}),S.d(g,"getPartWith",function(){return u});var k=S("./src/polyfills/number.ts"),v=S("./src/utils/logger.ts");function m(o,s,E){switch(s){case"audio":o.audioGroupIds||(o.audioGroupIds=[]),o.audioGroupIds.push(E);break;case"text":o.textGroupIds||(o.textGroupIds=[]),o.textGroupIds.push(E);break}}function C(o){var s={};o.forEach(function(E){var b=E.groupId||"";E.id=s[b]=s[b]||0,s[b]++})}function _(o,s,E){var b=o[s],p=o[E];e(b,p)}function e(o,s){var E=s.startPTS;if(Object(k.isFiniteNumber)(E)){var b=0,p;s.sn>o.sn?(b=E-o.start,p=o):(b=o.start-E,p=s),p.duration!==b&&(p.duration=b)}else if(s.sn>o.sn){var D=o.cc===s.cc;D&&o.minEndPTS?s.start=o.start+(o.minEndPTS-o.start):s.start=o.start+o.duration}else s.start=Math.max(o.start-s.duration,0)}function h(o,s,E,b,p,D){var R=b-E;R<=0&&(v.logger.warn("Fragment should have a positive duration",s),b=E+s.duration,D=p+s.duration);var y=E,x=b,w=s.startPTS,T=s.endPTS;if(Object(k.isFiniteNumber)(w)){var F=Math.abs(w-E);Object(k.isFiniteNumber)(s.deltaPTS)?s.deltaPTS=Math.max(F,s.deltaPTS):s.deltaPTS=F,y=Math.max(E,w),E=Math.min(E,w),p=Math.min(p,s.startDTS),x=Math.min(b,T),b=Math.max(b,T),D=Math.max(D,s.endDTS)}s.duration=b-E;var P=E-s.start;s.appendedPTS=b,s.start=s.startPTS=E,s.maxStartPTS=y,s.startDTS=p,s.endPTS=b,s.minEndPTS=x,s.endDTS=D;var A=s.sn;if(!o||Ao.endSN)return 0;var X,z=A-o.startSN,O=o.fragments;for(O[z]=s,X=z;X>0;X--)e(O[X],O[X-1]);for(X=z;X=0;p--){var D=b[p].initSegment;if(D){E=D;break}}o.fragmentHint&&delete o.fragmentHint.endPTS;var R=0,y;if(i(o,s,function(X,z){X.relurl&&(R=X.cc-z.cc),Object(k.isFiniteNumber)(X.startPTS)&&Object(k.isFiniteNumber)(X.endPTS)&&(z.start=z.startPTS=X.startPTS,z.startDTS=X.startDTS,z.appendedPTS=X.appendedPTS,z.maxStartPTS=X.maxStartPTS,z.endPTS=X.endPTS,z.endDTS=X.endDTS,z.minEndPTS=X.minEndPTS,z.duration=X.endPTS-X.startPTS,z.duration&&(y=z),s.PTSKnown=s.alignedSliding=!0),z.elementaryStreams=X.elementaryStreams,z.loader=X.loader,z.stats=X.stats,z.urlId=X.urlId,X.initSegment&&(z.initSegment=X.initSegment,E=X.initSegment)}),E){var x=s.fragmentHint?s.fragments.concat(s.fragmentHint):s.fragments;x.forEach(function(X){var z;(!X.initSegment||X.initSegment.relurl===((z=E)===null||z===void 0?void 0:z.relurl))&&(X.initSegment=E)})}if(s.skippedSegments&&(s.deltaUpdateFailed=s.fragments.some(function(X){return!X}),s.deltaUpdateFailed)){v.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var w=s.skippedSegments;w--;)s.fragments.shift();s.startSN=s.fragments[0].sn,s.startCC=s.fragments[0].cc}var T=s.fragments;if(R){v.logger.warn("discontinuity sliding from playlist, take drift into account");for(var F=0;F=b.length)return;l(s,b[E].start)}function l(o,s){if(s){for(var E=o.fragments,b=o.skippedSegments;b0&&p0&&x===-1&&(this.log("Override startPosition with lastCurrentTime @"+w.toFixed(3)),x=w),this.state=v.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=x,this.tick()}else this._forceStartLoad=!0,this.state=v.State.STOPPED},R.stopLoad=function(){this._forceStartLoad=!1,p.prototype.stopLoad.call(this)},R.doTick=function(){switch(this.state){case v.State.IDLE:this.doTickIdle();break;case v.State.WAITING_LEVEL:{var x,w=this.levels,T=this.level,F=w==null||((x=w[T])===null||x===void 0)?void 0:x.details;if(F&&(!F.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(F))break;this.state=v.State.IDLE;break}break}case v.State.FRAG_LOADING_WAITING_RETRY:{var P,A=self.performance.now(),X=this.retryDate;(!X||A>=X||(P=this.media)!==null&&P!==void 0&&P.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=v.State.IDLE)}break;default:break}this.onTickEnd()},R.onTickEnd=function(){p.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},R.doTickIdle=function(){var x,w,T=this.hls,F=this.levelLastLoaded,P=this.levels,A=this.media,X=T.config,z=T.nextLoadLevel;if(F===null||!A&&(this.startFragRequested||!X.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!P||!P[z])return;var O=P[z];this.level=T.nextLoadLevel=z;var B=O.details;if(!B||this.state===v.State.WAITING_LEVEL||B.live&&this.levelLastLoaded!==z){this.state=v.State.WAITING_LEVEL;return}var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:A,h.PlaylistLevelType.MAIN);if(U===null)return;var L=U.len,G=this.getMaxBufferLength(O.maxBitrate);if(L>=G)return;if(this._streamEnded(U,B)){var ee={};this.altAudio&&(ee.type="video"),this.hls.trigger(C.Events.BUFFER_EOS,ee),this.state=v.State.ENDED;return}var oe=U.end,ae=this.getNextFragment(oe,B);if(this.couldBacktrack&&!this.fragPrevious&&ae&&ae.sn!=="initSegment"){var be=ae.sn-B.startSN;be>1&&(ae=B.fragments[be-1],this.fragmentTracker.removeFragment(ae))}if(ae&&this.fragmentTracker.getState(ae)===e.FragmentState.OK&&this.nextLoadPosition>oe){var _e=this.audioOnly&&!this.altAudio?r.ElementaryStreamTypes.AUDIO:r.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(A,_e,h.PlaylistLevelType.MAIN),ae=this.getNextFragment(this.nextLoadPosition,B)}if(!ae)return;ae.initSegment&&!ae.initSegment.data&&!this.bitrateTest&&(ae=ae.initSegment),((x=ae.decryptdata)===null||x===void 0?void 0:x.keyFormat)==="identity"&&!((w=ae.decryptdata)!==null&&w!==void 0&&w.key)?this.loadKey(ae,B):this.loadFragment(ae,B,oe)},R.loadFragment=function(x,w,T){var F,P=this.fragmentTracker.getState(x);if(this.fragCurrent=x,P===e.FragmentState.BACKTRACKED){var A=this.fragmentTracker.getBacktrackData(x);if(A){this._handleFragmentLoadProgress(A),this._handleFragmentLoadComplete(A);return}else P=e.FragmentState.NOT_LOADED}P===e.FragmentState.NOT_LOADED||P===e.FragmentState.PARTIAL?x.sn==="initSegment"?this._loadInitSegment(x):this.bitrateTest?(x.bitrateTest=!0,this.log("Fragment "+x.sn+" of level "+x.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(x)):(this.startFragRequested=!0,p.prototype.loadFragment.call(this,x,w,T)):P===e.FragmentState.APPENDING?this.reduceMaxBufferLength(x.duration)&&this.fragmentTracker.removeFragment(x):((F=this.media)===null||F===void 0?void 0:F.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},R.getAppendedFrag=function(x){var w=this.fragmentTracker.getAppendedFrag(x,h.PlaylistLevelType.MAIN);return w&&"fragment"in w?w.fragment:w},R.getBufferedFrag=function(x){return this.fragmentTracker.getBufferedFrag(x,h.PlaylistLevelType.MAIN)},R.followingBufferedFrag=function(x){return x?this.getBufferedFrag(x.end+.5):null},R.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},R.nextLevelSwitch=function(){var x=this.levels,w=this.media;if(w!=null&&w.readyState){var T,F=this.getAppendedFrag(w.currentTime);if(F&&F.start>1&&this.flushMainBuffer(0,F.start-1),!w.paused&&x){var P=this.hls.nextLoadLevel,A=x[P],X=this.fragLastKbps;X&&this.fragCurrent?T=this.fragCurrent.duration*A.maxBitrate/(1e3*X)+1:T=0}else T=0;var z=this.getBufferedFrag(w.currentTime+T);if(z){var O=this.followingBufferedFrag(z);if(O){this.abortCurrentFrag();var B=O.maxStartPTS?O.maxStartPTS:O.start,U=O.duration,L=Math.max(z.end,B+Math.min(Math.max(U-this.config.maxFragLookUpTolerance,U*.5),U*.75));this.flushMainBuffer(L,Number.POSITIVE_INFINITY)}}}},R.abortCurrentFrag=function(){var x=this.fragCurrent;this.fragCurrent=null,x!=null&&x.loader&&x.loader.abort(),this.state===v.State.KEY_LOADING&&(this.state=v.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},R.flushMainBuffer=function(x,w){p.prototype.flushMainBuffer.call(this,x,w,this.altAudio?"video":null)},R.onMediaAttached=function(x,w){p.prototype.onMediaAttached.call(this,x,w);var T=w.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),T.addEventListener("playing",this.onvplaying),T.addEventListener("seeked",this.onvseeked),this.gapController=new n.default(this.config,T,this.fragmentTracker,this.hls)},R.onMediaDetaching=function(){var x=this.media;x&&(x.removeEventListener("playing",this.onvplaying),x.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),p.prototype.onMediaDetaching.call(this)},R.onMediaPlaying=function(){this.tick()},R.onMediaSeeked=function(){var x=this.media,w=x?x.currentTime:null;Object(k.isFiniteNumber)(w)&&this.log("Media seeked to "+w.toFixed(3)),this.tick()},R.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(C.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},R.onManifestParsed=function(x,w){var T=!1,F=!1,P;w.levels.forEach(function(A){P=A.audioCodec,P&&(P.indexOf("mp4a.40.2")!==-1&&(T=!0),P.indexOf("mp4a.40.5")!==-1&&(F=!0))}),this.audioCodecSwitch=T&&F&&!Object(m.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=w.levels,this.startFragRequested=!1},R.onLevelLoading=function(x,w){var T=this.levels;if(!T||this.state!==v.State.IDLE)return;var F=T[w.level];(!F.details||F.details.live&&this.levelLastLoaded!==w.level||this.waitForCdnTuneIn(F.details))&&(this.state=v.State.WAITING_LEVEL)},R.onLevelLoaded=function(x,w){var T,F=this.levels,P=w.level,A=w.details,X=A.totalduration;if(!F){this.warn("Levels were reset while loading level "+P);return}this.log("Level "+P+" loaded ["+A.startSN+","+A.endSN+"], cc ["+A.startCC+", "+A.endCC+"] duration:"+X);var z=this.fragCurrent;z&&(this.state===v.State.FRAG_LOADING||this.state===v.State.FRAG_LOADING_WAITING_RETRY)&&(z.level!==w.level&&z.loader&&(this.state=v.State.IDLE,z.loader.abort()));var O=F[P],B=0;if(A.live||(T=O.details)!==null&&T!==void 0&&T.live){if(A.fragments[0]||(A.deltaUpdateFailed=!0),A.deltaUpdateFailed)return;B=this.alignPlaylists(A,O.details)}if(O.details=A,this.levelLastLoaded=P,this.hls.trigger(C.Events.LEVEL_UPDATED,{details:A,level:P}),this.state===v.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(A))return;this.state=v.State.IDLE}this.startFragRequested?A.live&&this.synchronizeToLiveEdge(A):this.setStartPosition(A,B),this.tick()},R._handleFragmentLoadProgress=function(x){var w,T=x.frag,F=x.part,P=x.payload,A=this.levels;if(!A){this.warn("Levels were reset while fragment load was in progress. Fragment "+T.sn+" of level "+T.level+" will not be buffered");return}var X=A[T.level],z=X.details;if(!z){this.warn("Dropping fragment "+T.sn+" of level "+T.level+" after level details were reset");return}var O=X.videoCodec,B=z.PTSKnown||!z.live,U=(w=T.initSegment)===null||w===void 0?void 0:w.data,L=this._getAudioCodec(X),G=this.transmuxer=this.transmuxer||new c.default(this.hls,h.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),ee=F?F.index:-1,oe=ee!==-1,ae=new i.ChunkMetadata(T.level,T.sn,T.stats.chunkCount,P.byteLength,ee,oe),be=this.initPTS[T.cc];G.push(P,U,L,O,T,F,z.totalduration,B,ae,be)},R.onAudioTrackSwitching=function(x,w){var T=this.altAudio,F=!!w.url,P=w.id;if(!F){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var A=this.fragCurrent;A!=null&&A.loader&&(this.log("Switching to main audio track, cancel main fragment load"),A.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var X=this.hls;T&&X.trigger(C.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),X.trigger(C.Events.AUDIO_TRACK_SWITCHED,{id:P})}},R.onAudioTrackSwitched=function(x,w){var T=w.id,F=!!this.hls.audioTracks[T].url;if(F){var P=this.videoBuffer;P&&this.mediaBuffer!==P&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=P)}this.altAudio=F,this.tick()},R.onBufferCreated=function(x,w){var T=w.tracks,F,P,A=!1;for(var X in T){var z=T[X];if(z.id==="main"){if(P=X,F=z,X==="video"){var O=T[X];O&&(this.videoBuffer=O.buffer)}}else A=!0}A&&F?(this.log("Alternate track found, use "+P+".buffered to schedule main fragment loading"),this.mediaBuffer=F.buffer):this.mediaBuffer=this.media},R.onFragBuffered=function(x,w){var T=w.frag,F=w.part;if(T&&T.type!==h.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(T)){this.warn("Fragment "+T.sn+(F?" p: "+F.index:"")+" of level "+T.level+" finished buffering, but was aborted. state: "+this.state),this.state===v.State.PARSED&&(this.state=v.State.IDLE);return}var P=F?F.stats:T.stats;this.fragLastKbps=Math.round(8*P.total/(P.buffering.end-P.loading.first)),T.sn!=="initSegment"&&(this.fragPrevious=T),this.fragBufferedComplete(T,F)},R.onError=function(x,w){switch(w.details){case l.ErrorDetails.FRAG_LOAD_ERROR:case l.ErrorDetails.FRAG_LOAD_TIMEOUT:case l.ErrorDetails.KEY_LOAD_ERROR:case l.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(h.PlaylistLevelType.MAIN,w);break;case l.ErrorDetails.LEVEL_LOAD_ERROR:case l.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==v.State.ERROR&&(w.fatal?(this.warn(""+w.details),this.state=v.State.ERROR):!w.levelRetry&&this.state===v.State.WAITING_LEVEL&&(this.state=v.State.IDLE));break;case l.ErrorDetails.BUFFER_FULL_ERROR:if(w.parent==="main"&&(this.state===v.State.PARSING||this.state===v.State.PARSED)){var T=!0,F=this.getFwdBufferInfo(this.media,h.PlaylistLevelType.MAIN);F&&F.len>.5&&(T=!this.reduceMaxBufferLength(F.len)),T&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},R.checkBuffer=function(){var x=this.media,w=this.gapController;if(!x||!w||!x.readyState)return;var T=_.BufferHelper.getBuffered(x);!this.loadedmetadata&&T.length?(this.loadedmetadata=!0,this.seekToStartPos()):w.poll(this.lastCurrentTime),this.lastCurrentTime=x.currentTime},R.onFragLoadEmergencyAborted=function(){this.state=v.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},R.onBufferFlushed=function(x,w){var T=w.type;if(T!==r.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var F=(T===r.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(F,T,h.PlaylistLevelType.MAIN)}},R.onLevelsUpdated=function(x,w){this.levels=w.levels},R.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},R.seekToStartPos=function(){var x=this.media,w=x.currentTime,T=this.startPosition;if(T>=0&&w0&&(A1&&x.seeking===!1){var T=x.currentTime;if(_.BufferHelper.isBuffered(x,T)?w=this.getAppendedFrag(T):_.BufferHelper.isBuffered(x,T+.1)&&(w=this.getAppendedFrag(T+.1)),w){var F=this.fragPlaying,P=w.level;(!F||w.sn!==F.sn||F.level!==P||w.urlId!==F.urlId)&&(this.hls.trigger(C.Events.FRAG_CHANGED,{frag:w}),(!F||F.level!==P)&&this.hls.trigger(C.Events.LEVEL_SWITCHED,{level:P}),this.fragPlaying=w)}}},u(D,[{key:"nextLevel",get:function(){var x=this.nextBufferedFrag;return x?x.level:-1}},{key:"currentLevel",get:function(){var x=this.media;if(x){var w=this.getAppendedFrag(x.currentTime);if(w)return w.level}return-1}},{key:"nextBufferedFrag",get:function(){var x=this.media;if(x){var w=this.getAppendedFrag(x.currentTime);return this.followingBufferedFrag(w)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),D}(v.default)},"./src/controller/subtitle-stream-controller.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"SubtitleStreamController",function(){return o});var k=S("./src/events.ts"),v=S("./src/utils/logger.ts"),m=S("./src/utils/buffer-helper.ts"),C=S("./src/controller/fragment-finders.ts"),_=S("./src/utils/discontinuities.ts"),e=S("./src/controller/level-helper.ts"),h=S("./src/controller/fragment-tracker.ts"),r=S("./src/controller/base-stream-controller.ts"),c=S("./src/types/loader.ts"),i=S("./src/types/level.ts");function n(s,E){for(var b=0;b=w[P].start&&F<=w[P].end){T=w[P];break}var A=y.start+y.duration;T?T.end=A:(T={start:F,end:A},w.push(T)),this.fragmentTracker.fragBuffered(y)},b.onBufferFlushing=function(D,R){var y=R.startOffset,x=R.endOffset;if(y===0&&x!==Number.POSITIVE_INFINITY){var w=this.currentTrackId,T=this.levels;if(!T.length||!T[w]||!T[w].details)return;var F=T[w].details,P=F.targetduration,A=x-P;if(A<=0)return;R.endOffsetSubtitles=Math.max(0,A),this.tracksBuffered.forEach(function(X){for(var z=0;z=F.length||w!==T||!P)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,x.live||(y=P.details)!==null&&y!==void 0&&y.live){var A=this.mainDetails;if(x.deltaUpdateFailed||!A)return;var X=A.fragments[0];if(!P.details)x.hasProgramDateTime&&A.hasProgramDateTime?Object(_.alignMediaPlaylistByPDT)(x,A):X&&Object(e.addSliding)(x,X.start);else{var z=this.alignPlaylists(x,P.details);z===0&&X&&Object(e.addSliding)(x,X.start)}}if(P.details=x,this.levelLastLoaded=w,this.tick(),x.live&&!this.fragCurrent&&this.media&&this.state===r.State.IDLE){var O=Object(C.findFragmentByPTS)(null,x.fragments,this.media.currentTime,0);O||(this.warn("Subtitle playlist not aligned with playback"),P.details=void 0)}},b._handleFragmentLoadComplete=function(D){var R=D.frag,y=D.payload,x=R.decryptdata,w=this.hls;if(this.fragContextChanged(R))return;if(y&&y.byteLength>0&&x&&x.key&&x.iv&&x.method==="AES-128"){var T=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(y),x.key.buffer,x.iv.buffer).then(function(F){var P=performance.now();w.trigger(k.Events.FRAG_DECRYPTED,{frag:R,payload:F,stats:{tstart:T,tdecrypt:P}})})}},b.doTick=function(){if(!this.media){this.state=r.State.IDLE;return}if(this.state===r.State.IDLE){var D,R=this.currentTrackId,y=this.levels;if(!y.length||!y[R]||!y[R].details)return;var x=y[R].details,w=x.targetduration,T=this.config,F=this.media,P=m.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,F.currentTime-w,T.maxBufferHole),A=P.end,X=P.len,z=this.getMaxBufferLength()+w;if(X>z)return;console.assert(x,"Subtitle track details are defined on idle subtitle stream controller tick");var O=x.fragments,B=O.length,U=x.edge,L,G=this.fragPrevious;if(A-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange)},f.pollTrackChange=function(u){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,u)},f.onMediaDetaching=function(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var u=i(this.media.textTracks);u.forEach(function(o){Object(v.clearCurrentCues)(o)}),this.subtitleTrack=-1,this.media=null},f.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},f.onManifestParsed=function(u,o){this.tracks=o.subtitleTracks},f.onSubtitleTrackLoaded=function(u,o){var s=o.id,E=o.details,b=this.trackId,p=this.tracksInGroup[b];if(!p){this.warn("Invalid subtitle track id "+s);return}var D=p.details;p.details=o.details,this.log("subtitle track "+s+" loaded ["+E.startSN+"-"+E.endSN+"]"),s===this.trackId&&(this.retryCount=0,this.playlistLoaded(s,o,D))},f.onLevelLoading=function(u,o){this.switchLevel(o.level)},f.onLevelSwitching=function(u,o){this.switchLevel(o.level)},f.switchLevel=function(u){var o=this.hls.levels[u];if(!(o!=null&&o.textGroupIds))return;var s=o.textGroupIds[o.urlId];if(this.groupId!==s){var E=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,b=this.tracks.filter(function(R){return!s||R.groupId===s});this.tracksInGroup=b;var p=this.findTrackId(E==null?void 0:E.name)||this.findTrackId();this.groupId=s;var D={subtitleTracks:b};this.log("Updating subtitle tracks, "+b.length+' track(s) found in "'+s+'" group-id'),this.hls.trigger(k.Events.SUBTITLE_TRACKS_UPDATED,D),p!==-1&&this.setSubtitleTrack(p,E)}},f.findTrackId=function(u){for(var o=this.tracksInGroup,s=0;s=E.length)return;this.clearTimer();var b=E[u];if(this.log("Switching to subtitle track "+u),this.trackId=u,b){var p=b.id,D=b.groupId,R=D===void 0?"":D,y=b.name,x=b.type,w=b.url;this.hls.trigger(k.Events.SUBTITLE_TRACK_SWITCH,{id:p,groupId:R,name:y,type:x,url:w});var T=this.switchParams(b.url,o==null?void 0:o.details);this.loadPlaylist(T)}else this.hls.trigger(k.Events.SUBTITLE_TRACK_SWITCH,{id:u})},f.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var u=-1,o=i(this.media.textTracks),s=0;s=0&&(x[0]=Math.min(x[0],E),x[1]=Math.max(x[1],b),R=!0,w/(b-E)>.5))return}if(R||D.push([E,b]),this.config.renderTextTracksNatively){var T=this.captionsTracks[s];this.Cues.newCue(T,E,b,p)}else{var F=this.Cues.newCue(null,E,b,p);this.hls.trigger(v.Events.CUES_PARSED,{type:"captions",cues:F,track:s})}},u.onInitPtsFound=function(s,E){var b=this,p=E.frag,D=E.id,R=E.initPTS,y=E.timescale,x=this.unparsedVttFrags;D==="main"&&(this.initPTS[p.cc]=R,this.timescale[p.cc]=y),x.length&&(this.unparsedVttFrags=[],x.forEach(function(w){b.onFragLoaded(v.Events.FRAG_LOADED,w)}))},u.getExistingTrack=function(s){var E=this.media;if(E)for(var b=0;b>>8^y&255^99,h[p]=y,r[y]=p;var x=b[p],w=b[x],T=b[w],F=b[y]*257^y*16843008;i[p]=F<<24|F>>>8,n[p]=F<<16|F>>>16,l[p]=F<<8|F>>>24,f[p]=F,F=T*16843009^w*65537^x*257^p*16843008,u[y]=F<<24|F>>>8,o[y]=F<<16|F>>>16,s[y]=F<<8|F>>>24,E[y]=F,p?(p=x^b[b[b[T^x]]],D^=b[b[D]]):p=D=1}},_.expandKey=function(h){for(var r=this.uint8ArrayToUint32Array_(h),c=!0,i=0;i>>6)+1;var F=(s[E+2]&60)>>>2;if(F>T.length-1){o.trigger(m.Events.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+F});return}return R=(s[E+2]&1)<<2,R|=(s[E+3]&192)>>>6,k.logger.log("manifest codec:"+b+", ADTS type:"+p+", samplingIndex:"+F),/firefox/i.test(x)?F>=6?(p=5,y=new Array(4),D=F-3):(p=2,y=new Array(2),D=F):x.indexOf("android")!==-1?(p=2,y=new Array(2),D=F):(p=5,y=new Array(4),b&&(b.indexOf("mp4a.40.29")!==-1||b.indexOf("mp4a.40.5")!==-1)||!b&&F>=6?D=F-3:((b&&b.indexOf("mp4a.40.2")!==-1&&(F>=6&&R===1||/vivaldi/i.test(x))||!b&&R===1)&&(p=2,y=new Array(2)),D=F)),y[0]=p<<3,y[0]|=(F&14)>>1,y[1]|=(F&1)<<7,y[1]|=R<<3,p===5&&(y[1]|=(D&14)>>1,y[2]=(D&1)<<7,y[2]|=2<<2,y[3]=0),{config:y,samplerate:T[F],channelCount:R,codec:"mp4a.40."+p,manifestCodec:w}}function _(o,s){return o[s]===255&&(o[s+1]&246)===240}function e(o,s){return o[s+1]&1?7:9}function h(o,s){return(o[s+3]&3)<<11|o[s+4]<<3|(o[s+5]&224)>>>5}function r(o,s){return s+5=o.length)return!1;var b=h(o,s);if(b<=E)return!1;var p=s+b;return p===o.length||c(o,p)}return!1}function l(o,s,E,b,p){if(!o.samplerate){var D=C(s,E,b,p);if(!D)return;o.config=D.config,o.samplerate=D.samplerate,o.channelCount=D.channelCount,o.codec=D.codec,o.manifestCodec=D.manifestCodec,k.logger.log("parsed codec:"+o.codec+", rate:"+D.samplerate+", channels:"+D.channelCount)}}function f(o){return 1024*9e4/o}function d(o,s,E,b,p){var D=e(o,s),R=h(o,s);if(R-=D,R>0){var y=E+b*p;return{headerLength:D,frameLength:R,stamp:y}}}function u(o,s,E,b,p){var D=f(o.samplerate),R=d(s,E,b,p,D);if(R){var y=R.frameLength,x=R.headerLength,w=R.stamp,T=x+y,F=Math.max(0,E+T-s.length),P;F?(P=new Uint8Array(T-x),P.set(s.subarray(E+x,s.length),0)):P=s.subarray(E+x,E+T);var A={unit:P,pts:w};return F||o.samples.push(A),{sample:A,length:T,missing:F}}}},"./src/demux/base-audio-demuxer.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"initPTSFn",function(){return h});var k=S("./src/polyfills/number.ts"),v=S("./src/demux/id3.ts"),m=S("./src/demux/dummy-demuxed-track.ts"),C=S("./src/utils/mp4-tools.ts"),_=S("./src/utils/typed-array.ts"),e=function(){function r(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var c=r.prototype;return c.resetInitSegment=function(n,l,f){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},c.resetTimeStamp=function(){},c.resetContiguity=function(){},c.canParse=function(n,l){return!1},c.appendFrame=function(n,l,f){},c.demux=function(n,l){this.cachedData&&(n=Object(C.appendUint8Array)(this.cachedData,n),this.cachedData=null);var f=v.getID3Data(n,0),d=f?f.length:0,u,o,s=this._audioTrack,E=this._id3Track,b=f?v.getTimeStamp(f):void 0,p=n.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=h(b,l)),f&&f.length>0&&E.samples.push({pts:this.initPTS,dts:this.initPTS,data:f}),o=this.initPTS;de?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,h=e>>3,e-=h>>3,this.bytesAvailable-=h,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)},C.readBits=function(e){var h=Math.min(this.bitsAvailable,e),r=this.word>>>32-h;return e>32&&k.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=h,this.bitsAvailable>0?this.word<<=h:this.bytesAvailable>0&&this.loadWord(),h=e-h,h>0&&this.bitsAvailable?r<>>e)!==0)return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()},C.skipUEG=function(){this.skipBits(1+this.skipLZ())},C.skipEG=function(){this.skipBits(1+this.skipLZ())},C.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},C.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)},C.readBoolean=function(){return this.readBits(1)===1},C.readUByte=function(){return this.readBits(8)},C.readUShort=function(){return this.readBits(16)},C.readUInt=function(){return this.readBits(32)},C.skipScalingList=function(e){for(var h=8,r=8,c,i=0;i0?p.subarray(R,R+y):void 0},C=function(p,D){var R=0;return R=(p[D]&127)<<21,R|=(p[D+1]&127)<<14,R|=(p[D+2]&127)<<7,R|=p[D+3]&127,R},_=function(p,D){return k(p,D)&&C(p,D+6)+10<=p.length-D},e=function(p){for(var D=c(p),R=0;R>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:A+=String.fromCharCode(T);break;case 12:case 13:F=p[X++],A+=String.fromCharCode((T&31)<<6|F&63);break;case 14:F=p[X++],P=p[X++],A+=String.fromCharCode((T&15)<<12|(F&63)<<6|(P&63)<<0);break;default:}}return A},o={decodeTextFrame:l},s;function E(){return!s&&typeof self.TextDecoder!="undefined"&&(s=new self.TextDecoder("utf-8")),s}},"./src/demux/mp3demuxer.ts":function(N,g,S){"use strict";S.r(g);var k=S("./src/demux/base-audio-demuxer.ts"),v=S("./src/demux/id3.ts"),m=S("./src/utils/logger.ts"),C=S("./src/demux/mpegaudio.ts");function _(r,c){r.prototype=Object.create(c.prototype),r.prototype.constructor=r,e(r,c)}function e(r,c){return e=Object.setPrototypeOf||function(n,l){return n.__proto__=l,n},e(r,c)}var h=function(r){_(c,r);function c(){return r.apply(this,arguments)||this}var i=c.prototype;return i.resetInitSegment=function(l,f,d){r.prototype.resetInitSegment.call(this,l,f,d),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:l,duration:d,inputTimeScale:9e4,dropped:0}},c.probe=function(l){if(!l)return!1;for(var f=v.getID3Data(l,0)||[],d=f.length,u=l.length;d0},_.demux=function(h){var r=h,c=Object(v.dummyTrack)();if(this.config.progressive){this.remainderData&&(r=Object(k.appendUint8Array)(this.remainderData,h));var i=Object(k.segmentValidRange)(r);this.remainderData=i.remainder,c.samples=i.valid||new Uint8Array}else c.samples=r;return{audioTrack:Object(v.dummyTrack)(),avcTrack:c,id3Track:Object(v.dummyTrack)(),textTrack:Object(v.dummyTrack)()}},_.flush=function(){var h=Object(v.dummyTrack)();return h.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(v.dummyTrack)(),avcTrack:h,id3Track:Object(v.dummyTrack)(),textTrack:Object(v.dummyTrack)()}},_.demuxSampleAes=function(h,r,c){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},_.destroy=function(){},C}();m.minProbeByteLength=1024,g.default=m},"./src/demux/mpegaudio.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"appendFrame",function(){return e}),S.d(g,"parseHeader",function(){return h}),S.d(g,"isHeaderPattern",function(){return r}),S.d(g,"isHeader",function(){return c}),S.d(g,"canParse",function(){return i}),S.d(g,"probe",function(){return n});var k=null,v=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],m=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],C=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],_=[0,1,1,4];function e(l,f,d,u,o){if(d+24>f.length)return;var s=h(f,d);if(s&&d+s.frameLength<=f.length){var E=s.samplesPerFrame*9e4/s.sampleRate,b=u+o*E,p={unit:f.subarray(d,d+s.frameLength),pts:b,dts:b};return l.config=[],l.channelCount=s.channelCount,l.samplerate=s.sampleRate,l.samples.push(p),{sample:p,length:s.frameLength,missing:0}}}function h(l,f){var d=l[f+1]>>3&3,u=l[f+1]>>1&3,o=l[f+2]>>4&15,s=l[f+2]>>2&3;if(d!==1&&o!==0&&o!==15&&s!==3){var E=l[f+2]>>1&1,b=l[f+3]>>6,p=d===3?3-u:u===3?3:4,D=v[p*14+o-1]*1e3,R=d===3?0:d===2?1:2,y=m[R*3+s],x=b===3?1:2,w=C[d][u],T=_[u],F=w*8*T,P=Math.floor(w*D/y+E)*T;if(k===null){var A=navigator.userAgent||"",X=A.match(/Chrome\/(\d+)/i);k=X?parseInt(X[1]):0}var z=!!k&&k<=87;return z&&u===2&&D>=224e3&&b===0&&(l[f+3]=l[f+3]|128),{sampleRate:y,channelCount:x,frameLength:P,samplesPerFrame:F}}}function r(l,f){return l[f]===255&&(l[f+1]&224)===224&&(l[f+1]&6)!==0}function c(l,f){return f+1=h.length){c();return}if(h[r].unit.length<32)continue;var i=this.decrypter.isSync();if(this.decryptAacSample(h,r,c,i),!i)return}},_.getAvcEncryptedData=function(h){for(var r=Math.floor((h.length-48)/160)*16+16,c=new Int8Array(r),i=0,n=32;n<=h.length-16;n+=160,i+=16)c.set(h.subarray(n,n+16),i);return c},_.getAvcDecryptedUnit=function(h,r){for(var c=new Uint8Array(r),i=0,n=32;n<=h.length-16;n+=160,i+=16)h.set(c.subarray(i,i+16),n);return h},_.decryptAvcSample=function(h,r,c,i,n,l){var f=Object(v.discardEPB)(n.data),d=this.getAvcEncryptedData(f),u=this;this.decryptBuffer(d.buffer,function(o){n.data=u.getAvcDecryptedUnit(f,o),l||u.decryptAvcSamples(h,r,c+1,i)})},_.decryptAvcSamples=function(h,r,c,i){if(h instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;r++,c=0){if(r>=h.length){i();return}for(var n=h[r].units;!(c>=n.length);c++){var l=n[c];if(l.data.length<=48||l.type!==1&&l.type!==5)continue;var f=this.decrypter.isSync();if(this.decryptAvcSample(h,r,c,i,l,f),!f)return}}},C}();g.default=m},"./src/demux/transmuxer-interface.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"default",function(){return n});var k=S("./node_modules/webworkify-webpack/index.js"),v=S.n(k),m=S("./src/events.ts"),C=S("./src/demux/transmuxer.ts"),_=S("./src/utils/logger.ts"),e=S("./src/errors.ts"),h=S("./src/utils/mediasource-helper.ts"),r=S("./node_modules/eventemitter3/index.js"),c=S.n(r),i=Object(h.getMediaSource)()||{isTypeSupported:function(){return!1}},n=function(){function l(d,u,o,s){var E=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=d,this.id=u,this.onTransmuxComplete=o,this.onFlush=s;var b=d.config,p=function(w,T){T=T||{},T.frag=E.frag,T.id=E.id,d.trigger(w,T)};this.observer=new r.EventEmitter,this.observer.on(m.Events.FRAG_DECRYPTED,p),this.observer.on(m.Events.ERROR,p);var D={mp4:i.isTypeSupported("video/mp4"),mpeg:i.isTypeSupported("audio/mpeg"),mp3:i.isTypeSupported('audio/mp4; codecs="mp3"')},R=navigator.vendor;if(b.enableWorker&&typeof Worker!="undefined"){_.logger.log("demuxing in webworker");var y;try{y=this.worker=k("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),y.addEventListener("message",this.onwmsg),y.onerror=function(x){d.trigger(m.Events.ERROR,{type:e.ErrorTypes.OTHER_ERROR,details:e.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(x.message+" ("+x.filename+":"+x.lineno+")")})},y.postMessage({cmd:"init",typeSupported:D,vendor:R,id:u,config:JSON.stringify(b)})}catch(x){_.logger.warn("Error in worker:",x),_.logger.error("Error while initializing DemuxerWorker, fallback to inline"),y&&self.URL.revokeObjectURL(y.objectURL),this.transmuxer=new C.default(this.observer,D,b,R,u),this.worker=null}}else this.transmuxer=new C.default(this.observer,D,b,R,u)}var f=l.prototype;return f.destroy=function(){var u=this.worker;if(u)u.removeEventListener("message",this.onwmsg),u.terminate(),this.worker=null;else{var o=this.transmuxer;o&&(o.destroy(),this.transmuxer=null)}var s=this.observer;s&&s.removeAllListeners(),this.observer=null},f.push=function(u,o,s,E,b,p,D,R,y,x){var w=this;y.transmuxing.start=self.performance.now();var T=this.transmuxer,F=this.worker,P=p?p.start:b.start,A=b.decryptdata,X=this.frag,z=!(X&&b.cc===X.cc),O=!(X&&y.level===X.level),B=X?y.sn-X.sn:-1,U=this.part?y.part-this.part.index:1,L=!O&&(B===1||B===0&&U===1),G=self.performance.now();(O||B||b.stats.parsing.start===0)&&(b.stats.parsing.start=G),p&&(U||!L)&&(p.stats.parsing.start=G);var ee=new C.TransmuxState(z,L,R,O,P);if(!L||z){_.logger.log("[transmuxer-interface, "+b.type+"]: Starting new transmux session for sn: "+y.sn+" p: "+y.part+" level: "+y.level+" id: "+y.id+` discontinuity: `+z+` trackSwitch: `+O+` contiguous: `+L+` accurateTimeOffset: `+R+` timeOffset: `+P);var oe=new C.TransmuxConfig(s,E,o,D,x);this.configureTransmuxer(oe)}if(this.frag=b,this.part=p,F)F.postMessage({cmd:"demux",data:u,decryptdata:A,chunkMeta:y,state:ee},u instanceof ArrayBuffer?[u]:[]);else if(T){var ae=T.push(u,A,y,ee);Object(C.isPromise)(ae)?ae.then(function(be){w.handleTransmuxComplete(be)}):this.handleTransmuxComplete(ae)}},f.flush=function(u){var o=this;u.transmuxing.start=self.performance.now();var s=this.transmuxer,E=this.worker;if(E)E.postMessage({cmd:"flush",chunkMeta:u});else if(s){var b=s.flush(u);Object(C.isPromise)(b)?b.then(function(p){o.handleFlushResult(p,u)}):this.handleFlushResult(b,u)}},f.handleFlushResult=function(u,o){var s=this;u.forEach(function(E){s.handleTransmuxComplete(E)}),this.onFlush(o)},f.onWorkerMessage=function(u){var o=u.data,s=this.hls;switch(o.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(o.data);break}case"flush":{this.onFlush(o.data);break}default:{o.data=o.data||{},o.data.frag=this.frag,o.data.id=this.id,s.trigger(o.event,o.data);break}}},f.configureTransmuxer=function(u){var o=this.worker,s=this.transmuxer;o?o.postMessage({cmd:"configure",config:u}):s&&s.configure(u)},f.handleTransmuxComplete=function(u){u.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(u)},l}()},"./src/demux/transmuxer-worker.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"default",function(){return e});var k=S("./src/demux/transmuxer.ts"),v=S("./src/events.ts"),m=S("./src/utils/logger.ts"),C=S("./node_modules/eventemitter3/index.js"),_=S.n(C);function e(n){var l=new C.EventEmitter,f=function(u,o){n.postMessage({event:u,data:o})};l.on(v.Events.FRAG_DECRYPTED,f),l.on(v.Events.ERROR,f),n.addEventListener("message",function(d){var u=d.data;switch(u.cmd){case"init":{var o=JSON.parse(u.config);n.transmuxer=new k.default(l,u.typeSupported,o,u.vendor,u.id),Object(m.enableLogs)(o.debug),f("init",null);break}case"configure":{n.transmuxer.configure(u.config);break}case"demux":{var s=n.transmuxer.push(u.data,u.decryptdata,u.chunkMeta,u.state);Object(k.isPromise)(s)?s.then(function(p){h(n,p)}):h(n,s);break}case"flush":{var E=u.chunkMeta,b=n.transmuxer.flush(E);Object(k.isPromise)(b)?b.then(function(p){c(n,p,E)}):c(n,b,E);break}default:break}})}function h(n,l){if(i(l.remuxResult))return;var f=[],d=l.remuxResult,u=d.audio,o=d.video;u&&r(f,u),o&&r(f,o),n.postMessage({event:"transmuxComplete",data:l},f)}function r(n,l){l.data1&&n.push(l.data1.buffer),l.data2&&n.push(l.data2.buffer)}function c(n,l,f){l.forEach(function(d){h(n,d)}),n.postMessage({event:"flush",data:f})}function i(n){return!n.audio&&!n.video&&!n.text&&!n.id3&&!n.initSegment}},"./src/demux/transmuxer.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"default",function(){return o}),S.d(g,"isPromise",function(){return b}),S.d(g,"TransmuxConfig",function(){return p}),S.d(g,"TransmuxState",function(){return D});var k=S("./src/events.ts"),v=S("./src/errors.ts"),m=S("./src/crypt/decrypter.ts"),C=S("./src/demux/aacdemuxer.ts"),_=S("./src/demux/mp4demuxer.ts"),e=S("./src/demux/tsdemuxer.ts"),h=S("./src/demux/mp3demuxer.ts"),r=S("./src/remux/mp4-remuxer.ts"),c=S("./src/remux/passthrough-remuxer.ts"),i=S("./src/demux/chunk-cache.ts"),n=S("./src/utils/mp4-tools.ts"),l=S("./src/utils/logger.ts"),f;try{f=self.performance.now.bind(self.performance)}catch(R){l.logger.debug("Unable to use Performance API on this environment"),f=self.Date.now}var d=[{demux:e.default,remux:r.default},{demux:_.default,remux:c.default},{demux:C.default,remux:r.default},{demux:h.default,remux:r.default}],u=1024;d.forEach(function(R){var y=R.demux;u=Math.max(u,y.minProbeByteLength)});var o=function(){function R(x,w,T,F,P){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new i.default,this.observer=x,this.typeSupported=w,this.config=T,this.vendor=F,this.id=P}var y=R.prototype;return y.configure=function(w){this.transmuxConfig=w,this.decrypter&&this.decrypter.reset()},y.push=function(w,T,F,P){var A=this,X=F.transmuxing;X.executeStart=f();var z=new Uint8Array(w),O=this.cache,B=this.config,U=this.currentTransmuxState,L=this.transmuxConfig;P&&(this.currentTransmuxState=P);var G=s(z,T);if(G&&G.method==="AES-128"){var ee=this.getDecrypter();if(B.enableSoftwareAES){var oe=ee.softwareDecrypt(z,G.key.buffer,G.iv.buffer);if(!oe)return X.executeEnd=f(),E(F);z=new Uint8Array(oe)}else return this.decryptionPromise=ee.webCryptoDecrypt(z,G.key.buffer,G.iv.buffer).then(function(ne){var J=A.push(ne,null,F);return A.decryptionPromise=null,J}),this.decryptionPromise}var ae=P||U,be=ae.contiguous,_e=ae.discontinuity,fe=ae.trackSwitch,Re=ae.accurateTimeOffset,Oe=ae.timeOffset,de=L.audioCodec,te=L.videoCodec,W=L.defaultInitPts,Y=L.duration,V=L.initSegmentData;if((_e||fe)&&this.resetInitSegment(V,de,te,Y),_e&&this.resetInitialTimestamp(W),be||this.resetContiguity(),this.needsProbing(z,_e,fe)){if(O.dataLength){var Q=O.flush();z=Object(n.appendUint8Array)(Q,z)}this.configureTransmuxer(z,L)}var q=this.transmux(z,G,Oe,Re,F),ie=this.currentTransmuxState;return ie.contiguous=!0,ie.discontinuity=!1,ie.trackSwitch=!1,X.executeEnd=f(),q},y.flush=function(w){var T=this,F=w.transmuxing;F.executeStart=f();var P=this.decrypter,A=this.cache,X=this.currentTransmuxState,z=this.decryptionPromise;if(z)return z.then(function(){return T.flush(w)});var O=[],B=X.timeOffset;if(P){var U=P.flush();U&&O.push(this.push(U,null,w))}var L=A.dataLength;A.reset();var G=this.demuxer,ee=this.remuxer;if(!G||!ee)return L>=u&&this.observer.emit(k.Events.ERROR,k.Events.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),F.executeEnd=f(),[E(w)];var oe=G.flush(B);return b(oe)?oe.then(function(ae){return T.flushRemux(O,ae,w),O}):(this.flushRemux(O,oe,w),O)},y.flushRemux=function(w,T,F){var P=T.audioTrack,A=T.avcTrack,X=T.id3Track,z=T.textTrack,O=this.currentTransmuxState,B=O.accurateTimeOffset,U=O.timeOffset;l.logger.log("[transmuxer.ts]: Flushed fragment "+F.sn+(F.part>-1?" p: "+F.part:"")+" of level "+F.level);var L=this.remuxer.remux(P,A,X,z,U,B,!0,this.id);w.push({remuxResult:L,chunkMeta:F}),F.transmuxing.executeEnd=f()},y.resetInitialTimestamp=function(w){var T=this.demuxer,F=this.remuxer;if(!T||!F)return;T.resetTimeStamp(w),F.resetTimeStamp(w)},y.resetContiguity=function(){var w=this.demuxer,T=this.remuxer;if(!w||!T)return;w.resetContiguity(),T.resetNextTimestamp()},y.resetInitSegment=function(w,T,F,P){var A=this.demuxer,X=this.remuxer;if(!A||!X)return;A.resetInitSegment(T,F,P),X.resetInitSegment(w,T,F)},y.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},y.transmux=function(w,T,F,P,A){var X;return T&&T.method==="SAMPLE-AES"?X=this.transmuxSampleAes(w,T,F,P,A):X=this.transmuxUnencrypted(w,F,P,A),X},y.transmuxUnencrypted=function(w,T,F,P){var A=this.demuxer.demux(w,T,!1,!this.config.progressive),X=A.audioTrack,z=A.avcTrack,O=A.id3Track,B=A.textTrack,U=this.remuxer.remux(X,z,O,B,T,F,!1,this.id);return{remuxResult:U,chunkMeta:P}},y.transmuxSampleAes=function(w,T,F,P,A){var X=this;return this.demuxer.demuxSampleAes(w,T,F).then(function(z){var O=X.remuxer.remux(z.audioTrack,z.avcTrack,z.id3Track,z.textTrack,F,P,!1,X.id);return{remuxResult:O,chunkMeta:A}})},y.configureTransmuxer=function(w,T){for(var F=this.config,P=this.observer,A=this.typeSupported,X=this.vendor,z=T.audioCodec,O=T.defaultInitPts,B=T.duration,U=T.initSegmentData,L=T.videoCodec,G,ee=0,oe=d.length;ee0&&y!=null&&y.key!=null&&y.iv!==null&&y.method!=null&&(x=y),x}var E=function(y){return{remuxResult:{},chunkMeta:y}};function b(R){return"then"in R&&R.then instanceof Function}var p=function(y,x,w,T,F){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=y,this.videoCodec=x,this.initSegmentData=w,this.duration=T,this.defaultInitPts=F},D=function(y,x,w,T,F){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=y,this.contiguous=x,this.accurateTimeOffset=w,this.trackSwitch=T,this.timeOffset=F}},"./src/demux/tsdemuxer.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"discardEPB",function(){return E});var k=S("./src/demux/adts.ts"),v=S("./src/demux/mpegaudio.ts"),m=S("./src/demux/exp-golomb.ts"),C=S("./src/demux/id3.ts"),_=S("./src/demux/sample-aes.ts"),e=S("./src/events.ts"),h=S("./src/utils/mp4-tools.ts"),r=S("./src/utils/logger.ts"),c=S("./src/errors.ts"),i={video:1,audio:2,id3:3,text:4},n=function(){function b(D,R,y){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=D,this.config=R,this.typeSupported=y}b.probe=function(R){var y=b.syncOffset(R);return y<0?!1:(y&&r.logger.warn("MPEG2-TS detected but first sync word found @ offset "+y+", junk ahead ?"),!0)},b.syncOffset=function(R){for(var y=Math.min(1e3,R.length-3*188),x=0;x>4,de=void 0;if(Oe>1){if(de=_e+5+R[_e+4],de===_e+188)continue}else de=_e+4;switch(Re){case X:fe&&(z&&(T=u(z))&&this.parseAVCPES(T,!1),z={data:[],size:0}),z&&(z.data.push(R.subarray(de,_e+188)),z.size+=_e+188-de);break;case O:fe&&(U&&(T=u(U))&&(P.isAAC?this.parseAACPES(T):this.parseMPEGPES(T)),U={data:[],size:0}),U&&(U.data.push(R.subarray(de,_e+188)),U.size+=_e+188-de);break;case B:fe&&(L&&(T=u(L))&&this.parseID3PES(T),L={data:[],size:0}),L&&(L.data.push(R.subarray(de,_e+188)),L.size+=_e+188-de);break;case 0:fe&&(de+=R[de]+1),oe=this._pmtId=f(R,de);break;case oe:{fe&&(de+=R[de]+1);var te=d(R,de,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,x);X=te.avc,X>0&&(F.pid=X),O=te.audio,O>0&&(P.pid=O,P.isAAC=te.isAAC),B=te.id3,B>0&&(A.pid=B),G&&!ee&&(r.logger.log("reparse from beginning"),G=!1,_e=be-188),ee=this.pmtParsed=!0;break}case 17:case 8191:break;default:G=!0;break}}else this.observer.emit(e.Events.ERROR,e.Events.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});F.pesData=z,P.pesData=U,A.pesData=L;var W={audioTrack:P,avcTrack:F,id3Track:A,textTrack:this._txtTrack};return w&&this.extractRemainingSamples(W),W},p.flush=function(){var R=this.remainderData;this.remainderData=null;var y;return R?y=this.demux(R,-1,!1,!0):y={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(y),this.sampleAes?this.decrypt(y,this.sampleAes):y},p.extractRemainingSamples=function(R){var y=R.audioTrack,x=R.avcTrack,w=R.id3Track,T=x.pesData,F=y.pesData,P=w.pesData,A;T&&(A=u(T))?(this.parseAVCPES(A,!0),x.pesData=null):x.pesData=T,F&&(A=u(F))?(y.isAAC?this.parseAACPES(A):this.parseMPEGPES(A),y.pesData=null):(F!=null&&F.size&&r.logger.log("last AAC PES packet truncated,might overlap between fragments"),y.pesData=F),P&&(A=u(P))?(this.parseID3PES(A),w.pesData=null):w.pesData=P},p.demuxSampleAes=function(R,y,x){var w=this.demux(R,x,!0,!this.config.progressive),T=this.sampleAes=new _.default(this.observer,this.config,y);return this.decrypt(w,T)},p.decrypt=function(R,y){return new Promise(function(x){var w=R.audioTrack,T=R.avcTrack;w.samples&&w.isAAC?y.decryptAacSamples(w.samples,0,function(){T.samples?y.decryptAvcSamples(T.samples,0,0,function(){x(R)}):x(R)}):T.samples&&y.decryptAvcSamples(T.samples,0,0,function(){x(R)})})},p.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},p.parseAVCPES=function(R,y){var x=this,w=this._avcTrack,T=this.parseAVCNALu(R.data),F=!1,P=this.avcSample,A,X=!1;R.data=null,P&&T.length&&!w.audFound&&(o(P,w),P=this.avcSample=l(!1,R.pts,R.dts,"")),T.forEach(function(z){switch(z.type){case 1:{A=!0,P||(P=x.avcSample=l(!0,R.pts,R.dts,"")),F&&(P.debug+="NDR "),P.frame=!0;var O=z.data;if(X&&O.length>4){var B=new m.default(O).readSliceType();(B===2||B===4||B===7||B===9)&&(P.key=!0)}break}case 5:A=!0,P||(P=x.avcSample=l(!0,R.pts,R.dts,"")),F&&(P.debug+="IDR "),P.key=!0,P.frame=!0;break;case 6:{A=!0,F&&P&&(P.debug+="SEI ");var U=new m.default(E(z.data));U.readUByte();for(var L=0,G=0,ee=!1,oe=0;!ee&&U.bytesAvailable>1;){L=0;do oe=U.readUByte(),L+=oe;while(oe===255);G=0;do oe=U.readUByte(),G+=oe;while(oe===255);if(L===4&&U.bytesAvailable!==0){ee=!0;var ae=U.readUByte();if(ae===181){var be=U.readUShort();if(be===49){var _e=U.readUInt();if(_e===1195456820){var fe=U.readUByte();if(fe===3){for(var Re=U.readUByte(),Oe=U.readUByte(),de=31&Re,te=[Re,Oe],W=0;W16){for(var Y=[],V=0;V<16;V++)Y.push(U.readUByte().toString(16)),(V===3||V===5||V===7||V===9)&&Y.push("-");for(var Q=G-16,q=new Uint8Array(Q),ie=0;ie=0){var U={data:R.subarray(O,P-w-1),type:B};F.push(U)}else{var L=this.getLastNalUnit();if(L&&(T&&P<=4-T&&(L.state&&(L.data=L.data.subarray(0,L.data.byteLength-T))),X=P-w-1,X>0)){var G=new Uint8Array(L.data.byteLength+X);G.set(L.data,0),G.set(R.subarray(0,X),L.data.byteLength),L.data=G,L.state=0}}P=0&&w>=0){var ee={data:R.subarray(O,y),type:B,state:w};F.push(ee)}if(F.length===0){var oe=this.getLastNalUnit();if(oe){var ae=new Uint8Array(oe.data.byteLength+R.byteLength);ae.set(oe.data,0),ae.set(R,oe.data.byteLength),oe.data=ae}}return x.naluState=w,F},p.parseAACPES=function(R){var y=0,x=this._audioTrack,w=this.aacOverFlow,T=R.data;if(w){this.aacOverFlow=null;var F=w.sample.unit.byteLength,P=Math.min(w.missing,F),A=F-P;w.sample.unit.set(T.subarray(0,P),A),x.samples.push(w.sample),y=w.missing}var X,z;for(X=y,z=T.length;X1;){var F=new Uint8Array(T[0].length+T[1].length);F.set(T[0]),F.set(T[1],T[0].length),T[0]=F,T.splice(1,1)}D=T[0];var P=(D[0]<<16)+(D[1]<<8)+D[2];if(P===1){if(R=(D[4]<<8)+D[5],R&&R>b.size-6)return null;var A=D[7];A&192&&(x=(D[9]&14)*536870912+(D[10]&255)*4194304+(D[11]&254)*16384+(D[12]&255)*128+(D[13]&254)/2,A&64?(w=(D[14]&14)*536870912+(D[15]&255)*4194304+(D[16]&254)*16384+(D[17]&255)*128+(D[18]&254)/2,x-w>60*9e4&&(r.logger.warn(Math.round((x-w)/9e4)+"s delta between PTS and DTS, align them"),x=w)):w=x),y=D[8];var X=y+9;if(b.size<=X)return null;b.size-=X;for(var z=new Uint8Array(b.size),O=0,B=T.length;OU){X-=U;continue}else D=D.subarray(X),U-=X,X=0;z.set(D,p),p+=U}return R&&(R-=y+3),{data:z,pts:x,dts:w,len:R}}return null}function o(b,p){if(b.units.length&&b.frame){if(b.pts===void 0){var D=p.samples,R=D.length;if(R){var y=D[R-1];b.pts=y.pts,b.dts=y.dts}else{p.dropped++;return}}p.samples.push(b)}b.debug.length&&r.logger.log(b.pts+"/"+b.dts+":"+b.debug)}function s(b,p){var D=b.length;if(D>0){if(p.pts>=b[D-1].pts)b.push(p);else for(var R=D-1;R>=0;R--)if(p.ptsx)return T;return 0}},{key:"maxAutoLevel",get:function(){var y=this.levels,x=this.autoLevelCapping,w;return x===-1&&y&&y.length?w=y.length-1:w=x,w}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(y){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,y)}},{key:"audioTracks",get:function(){var y=this.audioTrackController;return y?y.audioTracks:[]}},{key:"audioTrack",get:function(){var y=this.audioTrackController;return y?y.audioTrack:-1},set:function(y){var x=this.audioTrackController;x&&(x.audioTrack=y)}},{key:"subtitleTracks",get:function(){var y=this.subtitleTrackController;return y?y.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var y=this.subtitleTrackController;return y?y.subtitleTrack:-1},set:function(y){var x=this.subtitleTrackController;x&&(x.subtitleTrack=y)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var y=this.subtitleTrackController;return y?y.subtitleDisplay:!1},set:function(y){var x=this.subtitleTrackController;x&&(x.subtitleDisplay=y)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(y){this.config.lowLatencyMode=y}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return u.Events}},{key:"ErrorTypes",get:function(){return o.ErrorTypes}},{key:"ErrorDetails",get:function(){return o.ErrorDetails}},{key:"DefaultConfig",get:function(){return p.defaultConfig?p.defaultConfig:l.hlsDefaultConfig},set:function(y){p.defaultConfig=y}}]),p}();b.defaultConfig=void 0},"./src/is-supported.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"isSupported",function(){return m}),S.d(g,"changeTypeSupported",function(){return C});var k=S("./src/utils/mediasource-helper.ts");function v(){return self.SourceBuffer||self.WebKitSourceBuffer}function m(){var _=Object(k.getMediaSource)();if(!_)return!1;var e=v(),h=_&&typeof _.isTypeSupported=="function"&&_.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),r=!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function";return!!h&&!!r}function C(){var _,e=v();return typeof(e==null||((_=e.prototype)===null||_===void 0)?void 0:_.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"default",function(){return n}),S.d(g,"LoadError",function(){return f});var k=S("./src/polyfills/number.ts"),v=S("./src/errors.ts");function m(d,u){d.prototype=Object.create(u.prototype),d.prototype.constructor=d,r(d,u)}function C(d){var u=typeof Map=="function"?new Map:void 0;return C=function(s){if(s===null||!h(s))return s;if(typeof s!="function")throw new TypeError("Super expression must either be null or a function");if(typeof u!="undefined"){if(u.has(s))return u.get(s);u.set(s,E)}function E(){return _(s,arguments,c(this).constructor)}return E.prototype=Object.create(s.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),r(E,s)},C(d)}function _(d,u,o){return e()?_=Reflect.construct:_=function(E,b,p){var D=[null];D.push.apply(D,b);var R=Function.bind.apply(E,D),y=new R;return p&&r(y,p.prototype),y},_.apply(null,arguments)}function e(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(d){return!1}}function h(d){return Function.toString.call(d).indexOf("[native code]")!==-1}function r(d,u){return r=Object.setPrototypeOf||function(s,E){return s.__proto__=E,s},r(d,u)}function c(d){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},c(d)}var i=Math.pow(2,17),n=function(){function d(o){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=o}var u=d.prototype;return u.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},u.abort=function(){this.loader&&this.loader.abort()},u.load=function(s,E){var b=this,p=s.url;if(!p)return Promise.reject(new f({type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:s,networkDetails:null},"Fragment does not have a "+(p?"part list":"url")));this.abort();var D=this.config,R=D.fLoader,y=D.loader;return new Promise(function(x,w){b.loader&&b.loader.destroy();var T=b.loader=s.loader=R?new R(D):new y(D),F=l(s),P={timeout:D.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:D.fragLoadingMaxRetryTimeout,highWaterMark:i};s.stats=T.stats,T.load(F,P,{onSuccess:function(X,z,O,B){b.resetLoader(s,T),x({frag:s,part:null,payload:X.data,networkDetails:B})},onError:function(X,z,O){b.resetLoader(s,T),w(new f({type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:s,response:X,networkDetails:O}))},onAbort:function(X,z,O){b.resetLoader(s,T),w(new f({type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:s,networkDetails:O}))},onTimeout:function(X,z,O){b.resetLoader(s,T),w(new f({type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:s,networkDetails:O}))},onProgress:function(X,z,O,B){E&&E({frag:s,part:null,payload:O,networkDetails:B})}})})},u.loadPart=function(s,E,b){var p=this;this.abort();var D=this.config,R=D.fLoader,y=D.loader;return new Promise(function(x,w){p.loader&&p.loader.destroy();var T=p.loader=s.loader=R?new R(D):new y(D),F=l(s,E),P={timeout:D.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:D.fragLoadingMaxRetryTimeout,highWaterMark:i};E.stats=T.stats,T.load(F,P,{onSuccess:function(X,z,O,B){p.resetLoader(s,T),p.updateStatsFromPart(s,E);var U={frag:s,part:E,payload:X.data,networkDetails:B};b(U),x(U)},onError:function(X,z,O){p.resetLoader(s,T),w(new f({type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:s,part:E,response:X,networkDetails:O}))},onAbort:function(X,z,O){s.stats.aborted=E.stats.aborted,p.resetLoader(s,T),w(new f({type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:s,part:E,networkDetails:O}))},onTimeout:function(X,z,O){p.resetLoader(s,T),w(new f({type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:s,part:E,networkDetails:O}))}})})},u.updateStatsFromPart=function(s,E){var b=s.stats,p=E.stats,D=p.total;if(b.loaded+=p.loaded,D){var R=Math.round(s.duration/E.duration),y=Math.min(Math.round(b.loaded/D),R),x=R-y,w=x*Math.round(b.loaded/y);b.total=b.loaded+w}else b.total=Math.max(b.loaded,b.total);var T=b.loading,F=p.loading;T.start?T.first+=F.first-F.start:(T.start=F.start,T.first=F.first),T.end=F.end},u.resetLoader=function(s,E){s.loader=null,this.loader===E&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),E.destroy()},d}();function l(d,u){u===void 0&&(u=null);var o=u||d,s={frag:d,part:u,responseType:"arraybuffer",url:o.url,headers:{},rangeStart:0,rangeEnd:0},E=o.byteRangeStartOffset,b=o.byteRangeEndOffset;return Object(k.isFiniteNumber)(E)&&Object(k.isFiniteNumber)(b)&&(s.rangeStart=E,s.rangeEnd=b),s}var f=function(d){m(u,d);function u(o){for(var s,E=arguments.length,b=new Array(E>1?E-1:0),p=1;p>8*(15-D)&255;return p},s.setDecryptDataFromLevelKey=function(b,p){var D=b;return(b==null?void 0:b.method)==="AES-128"&&b.uri&&!b.iv&&(D=_.LevelKey.fromURI(b.uri),D.method=b.method,D.iv=this.createInitializationVector(p),D.keyFormat="identity"),D},s.setElementaryStreamInfo=function(b,p,D,R,y,x){x===void 0&&(x=!1);var w=this.elementaryStreams,T=w[b];if(!T){w[b]={startPTS:p,endPTS:D,startDTS:R,endDTS:y,partial:x};return}T.startPTS=Math.min(T.startPTS,p),T.endPTS=Math.max(T.endPTS,D),T.startDTS=Math.min(T.startDTS,R),T.endDTS=Math.max(T.endDTS,y)},s.clearElementaryStreamInfo=function(){var b=this.elementaryStreams;b[n.AUDIO]=null,b[n.VIDEO]=null,b[n.AUDIOVIDEO]=null},i(o,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var b=this.sn;typeof b!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&C.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),b=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,b)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(k.isFiniteNumber)(this.programDateTime))return null;var b=Object(k.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+b*1e3}},{key:"encrypted",get:function(){var b;return!!((b=this.decryptdata)!==null&&b!==void 0&&b.keyFormat&&this.decryptdata.uri)}}]),o}(l),d=function(u){h(o,u);function o(s,E,b,p,D){var R;R=u.call(this,b)||this,R.fragOffset=0,R.duration=0,R.gap=!1,R.independent=!1,R.relurl=void 0,R.fragment=void 0,R.index=void 0,R.stats=new e.LoadStats,R.duration=s.decimalFloatingPoint("DURATION"),R.gap=s.bool("GAP"),R.independent=s.bool("INDEPENDENT"),R.relurl=s.enumeratedString("URI"),R.fragment=E,R.index=p;var y=s.enumeratedString("BYTERANGE");return y&&R.setByteRange(y,D),D&&(R.fragOffset=D.fragOffset+D.duration),R}return i(o,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var E=this.elementaryStreams;return!!(E.audio||E.video||E.audiovideo)}}]),o}(l)},"./src/loader/key-loader.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"default",function(){return C});var k=S("./src/events.ts"),v=S("./src/errors.ts"),m=S("./src/utils/logger.ts"),C=function(){function _(h){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=h,this._registerListeners()}var e=_.prototype;return e._registerListeners=function(){this.hls.on(k.Events.KEY_LOADING,this.onKeyLoading,this)},e._unregisterListeners=function(){this.hls.off(k.Events.KEY_LOADING,this.onKeyLoading)},e.destroy=function(){this._unregisterListeners();for(var r in this.loaders){var c=this.loaders[r];c&&c.destroy()}this.loaders={}},e.onKeyLoading=function(r,c){var i=c.frag,n=i.type,l=this.loaders[n];if(!i.decryptdata){m.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var f=i.decryptdata.uri;if(f!==this.decrypturl||this.decryptkey===null){var d=this.hls.config;if(l&&(m.logger.warn("abort previous key loader for type:"+n),l.abort()),!f){m.logger.warn("key uri is falsy");return}var u=d.loader,o=i.loader=this.loaders[n]=new u(d);this.decrypturl=f,this.decryptkey=null;var s={url:f,frag:i,responseType:"arraybuffer"},E={timeout:d.fragLoadingTimeOut,maxRetry:0,retryDelay:d.fragLoadingRetryDelay,maxRetryDelay:d.fragLoadingMaxRetryTimeout,highWaterMark:0},b={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};o.load(s,E,b)}else this.decryptkey&&(i.decryptdata.key=this.decryptkey,this.hls.trigger(k.Events.KEY_LOADED,{frag:i}))},e.loadsuccess=function(r,c,i){var n=i.frag;if(!n.decryptdata){m.logger.error("after key load, decryptdata unset");return}this.decryptkey=n.decryptdata.key=new Uint8Array(r.data),n.loader=null,delete this.loaders[n.type],this.hls.trigger(k.Events.KEY_LOADED,{frag:n})},e.loaderror=function(r,c){var i=c.frag,n=i.loader;n&&n.abort(),delete this.loaders[i.type],this.hls.trigger(k.Events.ERROR,{type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:i,response:r})},e.loadtimeout=function(r,c){var i=c.frag,n=i.loader;n&&n.abort(),delete this.loaders[i.type],this.hls.trigger(k.Events.ERROR,{type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:i})},_}()},"./src/loader/level-details.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"LevelDetails",function(){return _});var k=S("./src/polyfills/number.ts");function v(e,h){for(var r=0;rc.endSN||i>0||i===0&&n>0,this.updated||this.advanced?this.misses=Math.floor(c.misses*.6):this.misses=c.misses+1,this.availabilityDelay=c.availabilityDelay},m(e,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(k.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||C}},{key:"drift",get:function(){var c=this.driftEndTime-this.driftStartTime;if(c>0){var i=this.driftEnd-this.driftStart;return i*1e3/c}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var c;return(c=this.partList)!==null&&c!==void 0&&c.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var c;return(c=this.fragments)!==null&&c!==void 0&&c.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var c;return(c=this.partList)!==null&&c!==void 0&&c.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var c;return(c=this.partList)!==null&&c!==void 0&&c.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),e}()},"./src/loader/level-key.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"LevelKey",function(){return _});var k=S("./node_modules/url-toolkit/src/url-toolkit.js"),v=S.n(k);function m(e,h){for(var r=0;r2){var w=x.shift()+".";return w+=parseInt(x.shift()).toString(16),w+=("000"+parseInt(x.shift()).toString(16)).substr(-4),w}return y},D.resolve=function(y,x){return v.buildAbsoluteURL(x,y,{alwaysNormalize:!0})},D.parseMasterPlaylist=function(y,x){var w=[],T={},F=!1;i.lastIndex=0;for(var P;(P=i.exec(y))!=null;)if(P[1]){var A=new h.AttrList(P[1]),X={attrs:A,bitrate:A.decimalInteger("AVERAGE-BANDWIDTH")||A.decimalInteger("BANDWIDTH"),name:A.NAME,url:D.resolve(P[2],x)},z=A.decimalResolution("RESOLUTION");z&&(X.width=z.width,X.height=z.height),s((A.CODECS||"").split(/[ ,]+/).filter(function(B){return B}),X),X.videoCodec&&X.videoCodec.indexOf("avc1")!==-1&&(X.videoCodec=D.convertAVC1ToAVCOTI(X.videoCodec)),w.push(X)}else if(P[3]){var O=new h.AttrList(P[3]);O["DATA-ID"]&&(F=!0,T[O["DATA-ID"]]=O)}return{levels:w,sessionData:F?T:null}},D.parseMasterPlaylistMedia=function(y,x,w,T){T===void 0&&(T=[]);var F,P=[],A=0;for(n.lastIndex=0;(F=n.exec(y))!==null;){var X=new h.AttrList(F[1]);if(X.TYPE===w){var z={attrs:X,bitrate:0,id:A++,groupId:X["GROUP-ID"],instreamId:X["INSTREAM-ID"],name:X.NAME||X.LANGUAGE||"",type:w,default:X.bool("DEFAULT"),autoselect:X.bool("AUTOSELECT"),forced:X.bool("FORCED"),lang:X.LANGUAGE,url:X.URI?D.resolve(X.URI,x):""};if(T.length){var O=D.findGroup(T,z.groupId)||T[0];E(z,O,"audioCodec"),E(z,O,"textCodec")}P.push(z)}}return P},D.parseLevelPlaylist=function(y,x,w,T,F){var P=new _.LevelDetails(x),A=P.fragments,X=null,z=0,O=0,B=0,U=0,L=null,G=new C.Fragment(T,x),ee,oe,ae,be=-1,_e=!1;for(l.lastIndex=0,P.m3u8=y;(ee=l.exec(y))!==null;){_e&&(_e=!1,G=new C.Fragment(T,x),G.start=B,G.sn=z,G.cc=U,G.level=w,X&&(G.initSegment=X,G.rawProgramDateTime=X.rawProgramDateTime));var fe=ee[1];if(fe){G.duration=parseFloat(fe);var Re=(" "+ee[2]).slice(1);G.title=Re||null,G.tagList.push(Re?["INF",fe,Re]:["INF",fe])}else if(ee[3])Object(k.isFiniteNumber)(G.duration)&&(G.start=B,ae&&(G.levelkey=ae),G.sn=z,G.level=w,G.cc=U,G.urlId=F,A.push(G),G.relurl=(" "+ee[3]).slice(1),p(G,L),L=G,B+=G.duration,z++,O=0,_e=!0);else if(ee[4]){var Oe=(" "+ee[4]).slice(1);L?G.setByteRange(Oe,L):G.setByteRange(Oe)}else if(ee[5])G.rawProgramDateTime=(" "+ee[5]).slice(1),G.tagList.push(["PROGRAM-DATE-TIME",G.rawProgramDateTime]),be===-1&&(be=A.length);else{if(ee=ee[0].match(f),!ee){r.logger.warn("No matches on slow regex match for level playlist!");continue}for(oe=1;oe-1){r.logger.warn("Keyformat "+Fe+" is not supported from the manifest");continue}else if(Fe!=="identity")continue;J&&(ae=e.LevelKey.fromURL(x,$),$&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(J)>=0&&(ae.method=J,ae.keyFormat=Fe,we&&(ae.keyID=we),ce&&(ae.keyFormatVersions=ce),ae.iv=le));break}case"START":{var $e=new h.AttrList(te),Ye=$e.decimalFloatingPoint("TIME-OFFSET");Object(k.isFiniteNumber)(Ye)&&(P.startTimeOffset=Ye);break}case"MAP":{var Ze=new h.AttrList(te);G.relurl=Ze.URI,Ze.BYTERANGE&&G.setByteRange(Ze.BYTERANGE),G.level=w,G.sn="initSegment",ae&&(G.levelkey=ae),G.initSegment=null,X=G,_e=!0;break}case"SERVER-CONTROL":{var qe=new h.AttrList(te);P.canBlockReload=qe.bool("CAN-BLOCK-RELOAD"),P.canSkipUntil=qe.optionalFloat("CAN-SKIP-UNTIL",0),P.canSkipDateRanges=P.canSkipUntil>0&&qe.bool("CAN-SKIP-DATERANGES"),P.partHoldBack=qe.optionalFloat("PART-HOLD-BACK",0),P.holdBack=qe.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Pe=new h.AttrList(te);P.partTarget=Pe.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ie=P.partList;Ie||(Ie=P.partList=[]);var Je=O>0?Ie[Ie.length-1]:void 0,rt=O++,ye=new C.Part(new h.AttrList(te),G,x,rt,Je);Ie.push(ye),G.duration+=ye.duration;break}case"PRELOAD-HINT":{var ue=new h.AttrList(te);P.preloadHint=ue;break}case"RENDITION-REPORT":{var he=new h.AttrList(te);P.renditionReports=P.renditionReports||[],P.renditionReports.push(he);break}default:r.logger.warn("line parsed but not handled: "+ee);break}}}L&&!L.relurl?(A.pop(),B-=L.duration,P.partList&&(P.fragmentHint=L)):P.partList&&(p(G,L),G.cc=U,P.fragmentHint=G);var me=A.length,Ce=A[0],ge=A[me-1];if(B+=P.skippedSegments*P.targetduration,B>0&&me&&ge){P.averagetargetduration=B/me;var Ee=ge.sn;P.endSN=Ee!=="initSegment"?Ee:0,Ce&&(P.startCC=Ce.cc,Ce.initSegment||P.fragments.every(function(Ae){return Ae.relurl&&u(Ae.relurl)})&&(r.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),G=new C.Fragment(T,x),G.relurl=ge.relurl,G.level=w,G.sn="initSegment",Ce.initSegment=G,P.needSidxRanges=!0))}else P.endSN=0,P.startCC=0;return P.fragmentHint&&(B+=P.fragmentHint.duration),P.totalduration=B,P.endCC=U,be>0&&b(A,be),P},D}();function s(D,R){["video","audio","text"].forEach(function(y){var x=D.filter(function(T){return Object(c.isCodecType)(T,y)});if(x.length){var w=x.filter(function(T){return T.lastIndexOf("avc1",0)===0||T.lastIndexOf("mp4a",0)===0});R[y+"Codec"]=w.length>0?w[0]:x[0],D=D.filter(function(T){return x.indexOf(T)===-1})}}),R.unknownCodecs=D}function E(D,R,y){var x=R[y];x&&(D[y]=x)}function b(D,R){for(var y=D[R],x=R;x--;){var w=D[x];if(!w)return;w.programDateTime=y.programDateTime-w.duration*1e3,y=w}}function p(D,R){D.rawProgramDateTime?D.programDateTime=Date.parse(D.rawProgramDateTime):R!=null&&R.programDateTime&&(D.programDateTime=R.endProgramDateTime),Object(k.isFiniteNumber)(D.programDateTime)||(D.programDateTime=null,D.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(N,g,S){"use strict";S.r(g);var k=S("./src/polyfills/number.ts"),v=S("./src/events.ts"),m=S("./src/errors.ts"),C=S("./src/utils/logger.ts"),_=S("./src/utils/mp4-tools.ts"),e=S("./src/loader/m3u8-parser.ts"),h=S("./src/types/loader.ts"),r=S("./src/utils/attr-list.ts");function c(l){var f=l.type;switch(f){case h.PlaylistContextType.AUDIO_TRACK:return h.PlaylistLevelType.AUDIO;case h.PlaylistContextType.SUBTITLE_TRACK:return h.PlaylistLevelType.SUBTITLE;default:return h.PlaylistLevelType.MAIN}}function i(l,f){var d=l.url;return(d===void 0||d.indexOf("data:")===0)&&(d=f.url),d}var n=function(){function l(d){this.hls=void 0,this.loaders=Object.create(null),this.hls=d,this.registerListeners()}var f=l.prototype;return f.registerListeners=function(){var u=this.hls;u.on(v.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.on(v.Events.LEVEL_LOADING,this.onLevelLoading,this),u.on(v.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),u.on(v.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},f.unregisterListeners=function(){var u=this.hls;u.off(v.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.off(v.Events.LEVEL_LOADING,this.onLevelLoading,this),u.off(v.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),u.off(v.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},f.createInternalLoader=function(u){var o=this.hls.config,s=o.pLoader,E=o.loader,b=s||E,p=new b(o);return u.loader=p,this.loaders[u.type]=p,p},f.getInternalLoader=function(u){return this.loaders[u.type]},f.resetInternalLoader=function(u){this.loaders[u]&&delete this.loaders[u]},f.destroyInternalLoaders=function(){for(var u in this.loaders){var o=this.loaders[u];o&&o.destroy(),this.resetInternalLoader(u)}},f.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},f.onManifestLoading=function(u,o){var s=o.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:h.PlaylistContextType.MANIFEST,url:s,deliveryDirectives:null})},f.onLevelLoading=function(u,o){var s=o.id,E=o.level,b=o.url,p=o.deliveryDirectives;this.load({id:s,groupId:null,level:E,responseType:"text",type:h.PlaylistContextType.LEVEL,url:b,deliveryDirectives:p})},f.onAudioTrackLoading=function(u,o){var s=o.id,E=o.groupId,b=o.url,p=o.deliveryDirectives;this.load({id:s,groupId:E,level:null,responseType:"text",type:h.PlaylistContextType.AUDIO_TRACK,url:b,deliveryDirectives:p})},f.onSubtitleTrackLoading=function(u,o){var s=o.id,E=o.groupId,b=o.url,p=o.deliveryDirectives;this.load({id:s,groupId:E,level:null,responseType:"text",type:h.PlaylistContextType.SUBTITLE_TRACK,url:b,deliveryDirectives:p})},f.load=function(u){var o,s=this.hls.config,E=this.getInternalLoader(u);if(E){var b=E.context;if(b&&b.url===u.url){C.logger.trace("[playlist-loader]: playlist request ongoing");return}C.logger.log("[playlist-loader]: aborting previous loader for type: "+u.type),E.abort()}var p,D,R,y;switch(u.type){case h.PlaylistContextType.MANIFEST:p=s.manifestLoadingMaxRetry,D=s.manifestLoadingTimeOut,R=s.manifestLoadingRetryDelay,y=s.manifestLoadingMaxRetryTimeout;break;case h.PlaylistContextType.LEVEL:case h.PlaylistContextType.AUDIO_TRACK:case h.PlaylistContextType.SUBTITLE_TRACK:p=0,D=s.levelLoadingTimeOut;break;default:p=s.levelLoadingMaxRetry,D=s.levelLoadingTimeOut,R=s.levelLoadingRetryDelay,y=s.levelLoadingMaxRetryTimeout;break}if(E=this.createInternalLoader(u),(o=u.deliveryDirectives)!==null&&o!==void 0&&o.part){var x;if(u.type===h.PlaylistContextType.LEVEL&&u.level!==null?x=this.hls.levels[u.level].details:u.type===h.PlaylistContextType.AUDIO_TRACK&&u.id!==null?x=this.hls.audioTracks[u.id].details:u.type===h.PlaylistContextType.SUBTITLE_TRACK&&u.id!==null&&(x=this.hls.subtitleTracks[u.id].details),x){var w=x.partTarget,T=x.targetduration;w&&T&&(D=Math.min(Math.max(w*3,T*.8)*1e3,D))}}var F={timeout:D,maxRetry:p,retryDelay:R,maxRetryDelay:y,highWaterMark:0},P={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};E.load(u,F,P)},f.loadsuccess=function(u,o,s,E){if(E===void 0&&(E=null),s.isSidxRequest){this.handleSidxRequest(u,s),this.handlePlaylistLoaded(u,o,s,E);return}this.resetInternalLoader(s.type);var b=u.data;if(b.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(u,s,"no EXTM3U delimiter",E);return}o.parsing.start=performance.now(),b.indexOf("#EXTINF:")>0||b.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(u,o,s,E):this.handleMasterPlaylist(u,o,s,E)},f.loaderror=function(u,o,s){s===void 0&&(s=null),this.handleNetworkError(o,s,!1,u)},f.loadtimeout=function(u,o,s){s===void 0&&(s=null),this.handleNetworkError(o,s,!0)},f.handleMasterPlaylist=function(u,o,s,E){var b=this.hls,p=u.data,D=i(u,s),R=e.default.parseMasterPlaylist(p,D),y=R.levels,x=R.sessionData;if(!y.length){this.handleManifestParsingError(u,s,"no level found in manifest",E);return}var w=y.map(function(z){return{id:z.attrs.AUDIO,audioCodec:z.audioCodec}}),T=y.map(function(z){return{id:z.attrs.SUBTITLES,textCodec:z.textCodec}}),F=e.default.parseMasterPlaylistMedia(p,D,"AUDIO",w),P=e.default.parseMasterPlaylistMedia(p,D,"SUBTITLES",T),A=e.default.parseMasterPlaylistMedia(p,D,"CLOSED-CAPTIONS");if(F.length){var X=F.some(function(z){return!z.url});!X&&y[0].audioCodec&&!y[0].attrs.AUDIO&&(C.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),F.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new r.AttrList({}),bitrate:0,url:""}))}b.trigger(v.Events.MANIFEST_LOADED,{levels:y,audioTracks:F,subtitles:P,captions:A,url:D,stats:o,networkDetails:E,sessionData:x})},f.handleTrackOrLevelPlaylist=function(u,o,s,E){var b=this.hls,p=s.id,D=s.level,R=s.type,y=i(u,s),x=Object(k.isFiniteNumber)(p)?p:0,w=Object(k.isFiniteNumber)(D)?D:x,T=c(s),F=e.default.parseLevelPlaylist(u.data,y,w,T,x);if(!F.fragments.length){b.trigger(v.Events.ERROR,{type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:y,reason:"no fragments found in level",level:typeof s.level=="number"?s.level:void 0});return}if(R===h.PlaylistContextType.MANIFEST){var P={attrs:new r.AttrList({}),bitrate:0,details:F,name:"",url:y};b.trigger(v.Events.MANIFEST_LOADED,{levels:[P],audioTracks:[],url:y,stats:o,networkDetails:E,sessionData:null})}if(o.parsing.end=performance.now(),F.needSidxRanges){var A,X=(A=F.fragments[0].initSegment)===null||A===void 0?void 0:A.url;this.load({url:X,isSidxRequest:!0,type:R,level:D,levelDetails:F,id:p,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}s.levelDetails=F,this.handlePlaylistLoaded(u,o,s,E)},f.handleSidxRequest=function(u,o){var s=Object(_.parseSegmentIndex)(new Uint8Array(u.data));if(!s)return;var E=s.references,b=o.levelDetails;E.forEach(function(p,D){var R=p.info,y=b.fragments[D];y.byteRange.length===0&&y.setByteRange(String(1+R.end-R.start)+"@"+String(R.start)),y.initSegment&&y.initSegment.setByteRange(String(s.moovEndOffset)+"@0")})},f.handleManifestParsingError=function(u,o,s,E){this.hls.trigger(v.Events.ERROR,{type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:o.type===h.PlaylistContextType.MANIFEST,url:u.url,reason:s,response:u,context:o,networkDetails:E})},f.handleNetworkError=function(u,o,s,E){s===void 0&&(s=!1),C.logger.warn("[playlist-loader]: A network "+(s?"timeout":"error")+" occurred while loading "+u.type+" level: "+u.level+" id: "+u.id+' group-id: "'+u.groupId+'"');var b=m.ErrorDetails.UNKNOWN,p=!1,D=this.getInternalLoader(u);switch(u.type){case h.PlaylistContextType.MANIFEST:b=s?m.ErrorDetails.MANIFEST_LOAD_TIMEOUT:m.ErrorDetails.MANIFEST_LOAD_ERROR,p=!0;break;case h.PlaylistContextType.LEVEL:b=s?m.ErrorDetails.LEVEL_LOAD_TIMEOUT:m.ErrorDetails.LEVEL_LOAD_ERROR,p=!1;break;case h.PlaylistContextType.AUDIO_TRACK:b=s?m.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:m.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,p=!1;break;case h.PlaylistContextType.SUBTITLE_TRACK:b=s?m.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:m.ErrorDetails.SUBTITLE_LOAD_ERROR,p=!1;break}D&&this.resetInternalLoader(u.type);var R={type:m.ErrorTypes.NETWORK_ERROR,details:b,fatal:p,url:u.url,loader:D,context:u,networkDetails:o};E&&(R.response=E),this.hls.trigger(v.Events.ERROR,R)},f.handlePlaylistLoaded=function(u,o,s,E){var b=s.type,p=s.level,D=s.id,R=s.groupId,y=s.loader,x=s.levelDetails,w=s.deliveryDirectives;if(!(x!=null&&x.targetduration)){this.handleManifestParsingError(u,s,"invalid target duration",E);return}if(!y)return;x.live&&(y.getCacheAge&&(x.ageHeader=y.getCacheAge()||0),(!y.getCacheAge||isNaN(x.ageHeader))&&(x.ageHeader=0));switch(b){case h.PlaylistContextType.MANIFEST:case h.PlaylistContextType.LEVEL:this.hls.trigger(v.Events.LEVEL_LOADED,{details:x,level:p||0,id:D||0,stats:o,networkDetails:E,deliveryDirectives:w});break;case h.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(v.Events.AUDIO_TRACK_LOADED,{details:x,id:D||0,groupId:R||"",stats:o,networkDetails:E,deliveryDirectives:w});break;case h.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(v.Events.SUBTITLE_TRACK_LOADED,{details:x,id:D||0,groupId:R||"",stats:o,networkDetails:E,deliveryDirectives:w});break}},l}();g.default=n},"./src/polyfills/number.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"isFiniteNumber",function(){return k}),S.d(g,"MAX_SAFE_INTEGER",function(){return v});var k=Number.isFinite||function(m){return typeof m=="number"&&isFinite(m)},v=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(N,g,S){"use strict";S.r(g);var k=function(){function v(){}return v.getSilentFrame=function(C,_){switch(C){case"mp4a.40.2":if(_===1)return new Uint8Array([0,200,0,128,35,128]);if(_===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(_===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(_===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(_===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(_===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(_===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(_===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(_===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}return},v}();g.default=k},"./src/remux/mp4-generator.ts":function(N,g,S){"use strict";S.r(g);var k=Math.pow(2,32)-1,v=function(){function m(){}return m.init=function(){m.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var _;for(_ in m.types)m.types.hasOwnProperty(_)&&(m.types[_]=[_.charCodeAt(0),_.charCodeAt(1),_.charCodeAt(2),_.charCodeAt(3)]);var e=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),h=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);m.HDLR_TYPES={video:e,audio:h};var r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),c=new Uint8Array([0,0,0,0,0,0,0,0]);m.STTS=m.STSC=m.STCO=c,m.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),m.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),m.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),m.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var i=new Uint8Array([105,115,111,109]),n=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);m.FTYP=m.box(m.types.ftyp,i,l,i,n),m.DINF=m.box(m.types.dinf,m.box(m.types.dref,r))},m.box=function(_){for(var e=8,h=arguments.length,r=new Array(h>1?h-1:0),c=1;c>24&255,l[1]=e>>16&255,l[2]=e>>8&255,l[3]=e&255,l.set(_,4),i=0,e=8;i>24&255,_>>16&255,_>>8&255,_&255,h>>24,h>>16&255,h>>8&255,h&255,r>>24,r>>16&255,r>>8&255,r&255,85,196,0,0]))},m.mdia=function(_){return m.box(m.types.mdia,m.mdhd(_.timescale,_.duration),m.hdlr(_.type),m.minf(_))},m.mfhd=function(_){return m.box(m.types.mfhd,new Uint8Array([0,0,0,0,_>>24,_>>16&255,_>>8&255,_&255]))},m.minf=function(_){return _.type==="audio"?m.box(m.types.minf,m.box(m.types.smhd,m.SMHD),m.DINF,m.stbl(_)):m.box(m.types.minf,m.box(m.types.vmhd,m.VMHD),m.DINF,m.stbl(_))},m.moof=function(_,e,h){return m.box(m.types.moof,m.mfhd(_),m.traf(h,e))},m.moov=function(_){for(var e=_.length,h=[];e--;)h[e]=m.trak(_[e]);return m.box.apply(null,[m.types.moov,m.mvhd(_[0].timescale,_[0].duration)].concat(h).concat(m.mvex(_)))},m.mvex=function(_){for(var e=_.length,h=[];e--;)h[e]=m.trex(_[e]);return m.box.apply(null,[m.types.mvex].concat(h))},m.mvhd=function(_,e){e*=_;var h=Math.floor(e/(k+1)),r=Math.floor(e%(k+1)),c=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,_>>24&255,_>>16&255,_>>8&255,_&255,h>>24,h>>16&255,h>>8&255,h&255,r>>24,r>>16&255,r>>8&255,r&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return m.box(m.types.mvhd,c)},m.sdtp=function(_){var e=_.samples||[],h=new Uint8Array(4+e.length),r,c;for(r=0;r>>8&255),e.push(i&255),e=e.concat(Array.prototype.slice.call(c));for(r=0;r<_.pps.length;r++)c=_.pps[r],i=c.byteLength,h.push(i>>>8&255),h.push(i&255),h=h.concat(Array.prototype.slice.call(c));var n=m.box(m.types.avcC,new Uint8Array([1,e[3],e[4],e[5],252|3,224|_.sps.length].concat(e).concat([_.pps.length]).concat(h))),l=_.width,f=_.height,d=_.pixelRatio[0],u=_.pixelRatio[1];return m.box(m.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,l&255,f>>8&255,f&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),n,m.box(m.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),m.box(m.types.pasp,new Uint8Array([d>>24,d>>16&255,d>>8&255,d&255,u>>24,u>>16&255,u>>8&255,u&255])))},m.esds=function(_){var e=_.config.length;return new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(_.config).concat([6,1,2]))},m.mp4a=function(_){var e=_.samplerate;return m.box(m.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,_.channelCount,0,16,0,0,0,0,e>>8&255,e&255,0,0]),m.box(m.types.esds,m.esds(_)))},m.mp3=function(_){var e=_.samplerate;return m.box(m.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,_.channelCount,0,16,0,0,0,0,e>>8&255,e&255,0,0]))},m.stsd=function(_){return _.type==="audio"?!_.isAAC&&_.codec==="mp3"?m.box(m.types.stsd,m.STSD,m.mp3(_)):m.box(m.types.stsd,m.STSD,m.mp4a(_)):m.box(m.types.stsd,m.STSD,m.avc1(_))},m.tkhd=function(_){var e=_.id,h=_.duration*_.timescale,r=_.width,c=_.height,i=Math.floor(h/(k+1)),n=Math.floor(h%(k+1));return m.box(m.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,0,0,0,0,i>>24,i>>16&255,i>>8&255,i&255,n>>24,n>>16&255,n>>8&255,n&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,r>>8&255,r&255,0,0,c>>8&255,c&255,0,0]))},m.traf=function(_,e){var h=m.sdtp(_),r=_.id,c=Math.floor(e/(k+1)),i=Math.floor(e%(k+1));return m.box(m.types.traf,m.box(m.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255])),m.box(m.types.tfdt,new Uint8Array([1,0,0,0,c>>24,c>>16&255,c>>8&255,c&255,i>>24,i>>16&255,i>>8&255,i&255])),m.trun(_,h.length+16+20+8+16+8+8),h)},m.trak=function(_){return _.duration=_.duration||4294967295,m.box(m.types.trak,m.tkhd(_),m.mdia(_))},m.trex=function(_){var e=_.id;return m.box(m.types.trex,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,e&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},m.trun=function(_,e){var h=_.samples||[],r=h.length,c=12+16*r,i=new Uint8Array(c),n,l,f,d,u,o;for(e+=8+c,i.set([0,0,15,1,r>>>24&255,r>>>16&255,r>>>8&255,r&255,e>>>24&255,e>>>16&255,e>>>8&255,e&255],0),n=0;n>>24&255,f>>>16&255,f>>>8&255,f&255,d>>>24&255,d>>>16&255,d>>>8&255,d&255,u.isLeading<<2|u.dependsOn,u.isDependedOn<<6|u.hasRedundancy<<4|u.paddingValue<<1|u.isNonSync,u.degradPrio&240<<8,u.degradPrio&15,o>>>24&255,o>>>16&255,o>>>8&255,o&255],12+16*n);return m.box(m.types.trun,i)},m.initSegment=function(_){m.types||m.init();var e=m.moov(_),h=new Uint8Array(m.FTYP.byteLength+e.byteLength);return h.set(m.FTYP),h.set(e,m.FTYP.byteLength),h},m}();v.types=void 0,v.HDLR_TYPES=void 0,v.STTS=void 0,v.STSC=void 0,v.STCO=void 0,v.STSZ=void 0,v.VMHD=void 0,v.SMHD=void 0,v.STSD=void 0,v.FTYP=void 0,v.DINF=void 0,g.default=v},"./src/remux/mp4-remuxer.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"default",function(){return o}),S.d(g,"normalizePts",function(){return s});var k=S("./src/polyfills/number.ts"),v=S("./src/remux/aac-helper.ts"),m=S("./src/remux/mp4-generator.ts"),C=S("./src/events.ts"),_=S("./src/errors.ts"),e=S("./src/utils/logger.ts"),h=S("./src/types/loader.ts"),r=S("./src/utils/timescale-conversion.ts");function c(){return c=Object.assign||function(D){for(var R=1;R0?F:P.pts},x[0].pts);return w&&e.logger.debug("PTS rollover detected"),T},R.remux=function(x,w,T,F,P,A,X,z){var O,B,U,L,G,ee,oe=P,ae=P,be=x.pid>-1,_e=w.pid>-1,fe=w.samples.length,Re=x.samples.length>0,Oe=fe>1,de=(!be||Re)&&(!_e||Oe)||this.ISGenerated||X;if(de){this.ISGenerated||(U=this.generateIS(x,w,P));var te=this.isVideoContiguous,W=-1;if(Oe&&(W=E(w.samples),!te&&this.config.forceKeyFrameOnDiscontinuity))if(ee=!0,W>0){e.logger.warn("[mp4-remuxer]: Dropped "+W+" out of "+fe+" video samples due to a missing keyframe");var Y=this.getVideoStartPts(w.samples);w.samples=w.samples.slice(W),w.dropped+=W,ae+=(w.samples[0].pts-Y)/(w.timescale||9e4)}else W===-1&&(e.logger.warn("[mp4-remuxer]: No keyframe found out of "+fe+" video samples"),ee=!1);if(this.ISGenerated){if(Re&&Oe){var V=this.getVideoStartPts(w.samples),Q=s(x.samples[0].pts,V)-V,q=Q/w.inputTimeScale;oe+=Math.max(0,q),ae+=Math.max(0,-q)}if(Re){if(x.samplerate||(e.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),U=this.generateIS(x,w,P)),B=this.remuxAudio(x,oe,this.isAudioContiguous,A,_e||Oe||z===h.PlaylistLevelType.AUDIO?ae:void 0),Oe){var ie=B?B.endPTS-B.startPTS:0;w.inputTimeScale||(e.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),U=this.generateIS(x,w,P)),O=this.remuxVideo(w,ae,te,ie)}}else Oe&&(O=this.remuxVideo(w,ae,te,0));O&&(O.firstKeyFrame=W,O.independent=W!==-1)}}return this.ISGenerated&&(T.samples.length&&(G=this.remuxID3(T,P)),F.samples.length&&(L=this.remuxText(F,P))),{audio:B,video:O,initSegment:U,independent:ee,text:L,id3:G}},R.generateIS=function(x,w,T){var F=x.samples,P=w.samples,A=this.typeSupported,X={},z=!Object(k.isFiniteNumber)(this._initPTS),O="audio/mp4",B,U,L;if(z&&(B=U=Infinity),x.config&&F.length&&(x.timescale=x.samplerate,x.isAAC||(A.mpeg?(O="audio/mpeg",x.codec=""):A.mp3&&(x.codec="mp3")),X.audio={id:"audio",container:O,codec:x.codec,initSegment:!x.isAAC&&A.mpeg?new Uint8Array(0):m.default.initSegment([x]),metadata:{channelCount:x.channelCount}},z&&(L=x.inputTimeScale,B=U=F[0].pts-Math.round(L*T))),w.sps&&w.pps&&P.length&&(w.timescale=w.inputTimeScale,X.video={id:"main",container:"video/mp4",codec:w.codec,initSegment:m.default.initSegment([w]),metadata:{width:w.width,height:w.height}},z)){L=w.inputTimeScale;var G=this.getVideoStartPts(P),ee=Math.round(L*T);U=Math.min(U,s(P[0].dts,G)-ee),B=Math.min(B,G-ee)}if(Object.keys(X).length)return this.ISGenerated=!0,z&&(this._initPTS=B,this._initDTS=U),{tracks:X,initPTS:B,timescale:L}},R.remuxVideo=function(x,w,T,F){var P=x.inputTimeScale,A=x.samples,X=[],z=A.length,O=this._initPTS,B=this.nextAvcDts,U=8,L,G,ee,oe=Number.POSITIVE_INFINITY,ae=Number.NEGATIVE_INFINITY,be=0,_e=!1;if(!T||B===null){var fe=w*P,Re=A[0].pts-s(A[0].dts,A[0].pts);B=fe-Re}for(var Oe=0;Oede.pts){var te=9e4*.2;be=Math.max(Math.min(be,de.pts-de.dts),-1*te)}de.dts0?Oe-1:Oe].dts&&(_e=!0)}_e&&A.sort(function(Tt,pt){var ht=Tt.dts-pt.dts,Ft=Tt.pts-pt.pts;return ht||Ft}),G=A[0].dts,ee=A[A.length-1].dts;var W=Math.round((ee-G)/(z-1));if(be<0){if(beW,ne=q<-1;if(ie||ne){ie?e.logger.warn("AVC: "+Object(r.toMsFromMpegTsClock)(q,!0)+" ms ("+q+"dts) hole between fragments detected, filling it"):e.logger.warn("AVC: "+Object(r.toMsFromMpegTsClock)(-q,!0)+" ms ("+q+"dts) overlapping between fragments detected"),G=B;var J=A[0].pts-q;A[0].dts=G,A[0].pts=J,e.logger.log("Video: First PTS/DTS adjusted: "+Object(r.toMsFromMpegTsClock)(J,!0)+"/"+Object(r.toMsFromMpegTsClock)(G,!0)+", delta: "+Object(r.toMsFromMpegTsClock)(q,!0)+" ms")}}u&&(G=Math.max(0,G));for(var $=0,le=0,ce=0;ce0?Ie-1:Ie].dts;if(Ee.stretchShortVideoTrack&&this.nextAudioPts!==null){var De=Math.floor(Ee.maxBufferHole*P),Me=(F?oe+F*P:this.nextAudioPts)-Je.pts;Me>De?(L=Me-Ae,L<0&&(L=Ae),e.logger.log("[mp4-remuxer]: It is approximately "+Me/90+" ms to the next segment; using duration "+L/90+" ms for the last video frame.")):L=Ae}else L=Ae}var He=Math.round(Je.pts-Je.dts);X.push(new b(Je.key,L,ye,He))}if(X.length&&f&&f<70){var nt=X[0].flags;nt.dependsOn=2,nt.isNonSync=0}console.assert(L!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=B=ee+L,this.isVideoContiguous=!0;var at=m.default.moof(x.sequenceNumber++,G,c({},x,{samples:X})),it="video",st={data1:at,data2:qe,startPTS:oe/P,endPTS:(ae+L)/P,startDTS:G/P,endDTS:B/P,type:it,hasAudio:!1,hasVideo:!0,nb:X.length,dropped:x.dropped};return x.samples=[],x.dropped=0,console.assert(qe.length,"MDAT length must not be zero"),st},R.remuxAudio=function(x,w,T,F,P){var A=x.inputTimeScale,X=x.samplerate?x.samplerate:A,z=A/X,O=x.isAAC?n:l,B=O*z,U=this._initPTS,L=!x.isAAC&&this.typeSupported.mpeg,G=[],ee=x.samples,oe=L?0:8,ae=this.nextAudioPts||-1,be=w*A;if(this.isAudioContiguous=T=T||ee.length&&ae>0&&(F&&Math.abs(be-ae)<9e3||Math.abs(s(ee[0].pts-U,be)-ae)<20*B),ee.forEach(function(Ce){Ce.pts=s(Ce.pts-U,be)}),!T||ae<0){if(ee=ee.filter(function(Ce){return Ce.pts>=0}),!ee.length)return;P===0?ae=0:F?ae=Math.max(0,be):ae=ee[0].pts}if(x.isAAC)for(var _e=P!==void 0,fe=this.config.maxAudioFramesDrift,Re=0,Oe=ae;Re=fe*B&&Y0){le+=oe;try{$=new Uint8Array(le)}catch(Ce){this.observer.emit(C.Events.ERROR,C.Events.ERROR,{type:_.ErrorTypes.MUX_ERROR,details:_.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:le,reason:"fail allocating audio mdat "+le});return}if(!L){var qe=new DataView($.buffer);qe.setUint32(0,le),$.set(m.default.types.mdat,4)}}else return;$.set($e,oe);var Pe=$e.byteLength;oe+=Pe,G.push(new b(!0,O,Pe,0)),J=Ye}var Ie=G.length;if(!Ie)return;var Je=G[G.length-1];this.nextAudioPts=ae=J+z*Je.duration;var rt=L?new Uint8Array(0):m.default.moof(x.sequenceNumber++,ne/z,c({},x,{samples:G}));x.samples=[];var ye=ne/A,ue=ae/A,he="audio",me={data1:rt,data2:$,startPTS:ye,endPTS:ue,startDTS:ye,endDTS:ue,type:he,hasAudio:!0,hasVideo:!1,nb:Ie};return this.isAudioContiguous=!0,console.assert($.length,"MDAT length must not be zero"),me},R.remuxEmptyAudio=function(x,w,T,F){var P=x.inputTimeScale,A=x.samplerate?x.samplerate:P,X=P/A,z=this.nextAudioPts,O=(z!==null?z:F.startDTS*P)+this._initDTS,B=F.endDTS*P+this._initDTS,U=X*n,L=Math.ceil((B-O)/U),G=v.default.getSilentFrame(x.manifestCodec||x.codec,x.channelCount);if(e.logger.warn("[mp4-remuxer]: remux empty Audio"),!G){e.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var ee=[],oe=0;oe4294967296;)D+=y;return D}function E(D){for(var R=0;R0?this.lastEndDTS=x:(C.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var w=!!D.audio,T=!!D.video,F="";w&&(F+="audio"),T&&(F+="video");var P={data1:b,startPTS:y,startDTS:y,endPTS:x,endDTS:x,type:F,hasAudio:w,hasVideo:T,nb:1,dropped:0};return E.audio=P.type==="audio"?P:void 0,E.video=P.type!=="audio"?P:void 0,E.text=d,E.id3=f,E.initSegment=p,E},r}(),e=function(c,i,n){return Object(v.getStartDTS)(c,i)-n};function h(r,c){var i=r==null?void 0:r.codec;return i&&i.length>4?i:i==="hvc1"?"hvc1.1.c.L120.90":i==="av01"?"av01.0.04M.08":i==="avc1"||c===m.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}g.default=_},"./src/task-loop.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"default",function(){return k});var k=function(){function v(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var m=v.prototype;return m.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},m.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},m.onHandlerDestroyed=function(){},m.hasInterval=function(){return!!this._tickInterval},m.hasNextTick=function(){return!!this._tickTimer},m.setInterval=function(_){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,_),!0)},m.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},m.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},m.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},m.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},m.doTick=function(){},v}()},"./src/types/cmcd.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"CMCDVersion",function(){return k}),S.d(g,"CMCDObjectType",function(){return v}),S.d(g,"CMCDStreamingFormat",function(){return m}),S.d(g,"CMCDStreamType",function(){return C});var k=1,v;(function(_){_.MANIFEST="m",_.AUDIO="a",_.VIDEO="v",_.MUXED="av",_.INIT="i",_.CAPTION="c",_.TIMED_TEXT="tt",_.KEY="k",_.OTHER="o"})(v||(v={}));var m;(function(_){_.DASH="d",_.HLS="h",_.SMOOTH="s",_.OTHER="o"})(m||(m={}));var C;(function(_){_.VOD="v",_.LIVE="l"})(C||(C={}))},"./src/types/level.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"HlsSkip",function(){return m}),S.d(g,"getSkipValue",function(){return C}),S.d(g,"HlsUrlParameters",function(){return _}),S.d(g,"Level",function(){return e});function k(h,r){for(var c=0;cNumber.MAX_SAFE_INTEGER?Infinity:r},_.hexadecimalInteger=function(h){if(this[h]){var r=(this[h]||"0x").slice(2);r=(r.length&1?"0":"")+r;for(var c=new Uint8Array(r.length/2),i=0;iNumber.MAX_SAFE_INTEGER?Infinity:r},_.decimalFloatingPoint=function(h){return parseFloat(this[h])},_.optionalFloat=function(h,r){var c=this[h];return c?parseFloat(c):r},_.enumeratedString=function(h){return this[h]},_.bool=function(h){return this[h]==="YES"},_.decimalResolution=function(h){var r=k.exec(this[h]);return r===null?void 0:{width:parseInt(r[1],10),height:parseInt(r[2],10)}},C.parseAttrList=function(h){var r,c={},i='"';for(v.lastIndex=0;(r=v.exec(h))!==null;){var n=r[2];n.indexOf(i)===0&&n.lastIndexOf(i)===n.length-1&&(n=n.slice(1,-1)),c[r[1]]=n}return c},C}()},"./src/utils/binary-search.ts":function(N,g,S){"use strict";S.r(g);var k={search:function(m,C){for(var _=0,e=m.length-1,h=null,r=null;_<=e;){h=(_+e)/2|0,r=m[h];var c=C(r);if(c>0)_=h+1;else if(c<0)e=h-1;else return r}return null}};g.default=k},"./src/utils/buffer-helper.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"BufferHelper",function(){return m});var k=S("./src/utils/logger.ts"),v={length:0,start:function(){return 0},end:function(){return 0}},m=function(){function C(){}return C.isBuffered=function(e,h){try{if(e){for(var r=C.getBuffered(e),c=0;c=r.start(c)&&h<=r.end(c))return!0}}catch(i){}return!1},C.bufferInfo=function(e,h,r){try{if(e){var c=C.getBuffered(e),i=[],n;for(n=0;nl&&(c[n-1].end=e[i].end):c.push(e[i])}else c.push(e[i])}else c=e;for(var f=0,d,u=h,o=h,s=0;s=E&&h=T&&k.logger.log(this.time+" ["+T+"] "+F)},y}(),f=function(x){for(var w=[],T=0;T_&&(this.logger.log(n.DEBUG,"Too large cursor position "+this.pos),this.pos=_)},x.moveCursor=function(T){var F=this.pos+T;if(T>1)for(var P=this.pos+1;P=144&&this.backSpace();var F=m(T);if(this.pos>=_){this.logger.log(n.ERROR,"Cannot insert "+T.toString(16)+" ("+F+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(F,this.currPenState),this.moveCursor(1)},x.clearFromPos=function(T){var F;for(F=T;F<_;F++)this.chars[F].reset()},x.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},x.clearToEndOfRow=function(){this.clearFromPos(this.pos)},x.getTextString=function(){for(var T=[],F=!0,P=0;P<_;P++){var A=this.chars[P].uchar;A!==" "&&(F=!1),T.push(A)}return F?"":T.join("")},x.setPenStyles=function(T){this.currPenState.setStyles(T);var F=this.chars[this.pos];F.setPenState(this.currPenState)},y}(),s=function(){function y(w){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var T=0;T0&&(T?P="["+F.join(" | ")+"]":P=F.join(` `)),P},x.getTextAndFormat=function(){return this.rows},y}(),E=function(){function y(w,T,F){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=w,this.outputFilter=T,this.mode=null,this.verbose=0,this.displayedMemory=new s(F),this.nonDisplayedMemory=new s(F),this.lastOutputScreen=new s(F),this.currRollUpRow=this.displayedMemory.rows[C-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=F}var x=y.prototype;return x.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[C-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},x.getHandler=function(){return this.outputFilter},x.setHandler=function(T){this.outputFilter=T},x.setPAC=function(T){this.writeScreen.setPAC(T)},x.setBkgData=function(T){this.writeScreen.setBkgData(T)},x.setMode=function(T){if(T===this.mode)return;this.mode=T,this.logger.log(n.INFO,"MODE="+T),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=T},x.insertChars=function(T){for(var F=0;F=46,F.italics)F.foreground="white";else{var P=Math.floor(T/2)-16,A=["white","green","blue","cyan","red","yellow","magenta"];F.foreground=A[P]}this.logger.log(n.INFO,"MIDROW: "+JSON.stringify(F)),this.writeScreen.setPen(F)},x.outputDataUpdate=function(T){T===void 0&&(T=!1);var F=this.logger.time;if(F===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=F:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,F,this.lastOutputScreen),T&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:F),this.lastOutputScreen.copy(this.displayedMemory))},x.cueSplitAtTime=function(T){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,T,this.displayedMemory),this.cueStartTime=T))},y}(),b=function(){function y(w,T,F){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var P=new l;this.channels=[null,new E(w,T,P),new E(w+1,F,P)],this.cmdHistory=R(),this.logger=P}var x=y.prototype;return x.getHandler=function(T){return this.channels[T].getHandler()},x.setHandler=function(T,F){this.channels[T].setHandler(F)},x.addData=function(T,F){var P,A,X,z=!1;this.logger.time=T;for(var O=0;O ("+f([A,X])+")"),P=this.parseCmd(A,X),P||(P=this.parseMidrow(A,X)),P||(P=this.parsePAC(A,X)),P||(P=this.parseBackgroundAttributes(A,X)),!P&&(z=this.parseChars(A,X),z)){var B=this.currentChannel;if(B&&B>0){var U=this.channels[B];U.insertChars(z)}else this.logger.log(n.WARNING,"No channel found yet. TEXT-MODE?")}!P&&!z&&this.logger.log(n.WARNING,"Couldn't parse cleaned data "+f([A,X])+" orig: "+f([F[O],F[O+1]]))}},x.parseCmd=function(T,F){var P=this.cmdHistory,A=(T===20||T===28||T===21||T===29)&&F>=32&&F<=47,X=(T===23||T===31)&&F>=33&&F<=35;if(!(A||X))return!1;if(D(T,F,P))return p(null,null,P),this.logger.log(n.DEBUG,"Repeated command ("+f([T,F])+") is dropped"),!0;var z=T===20||T===21||T===23?1:2,O=this.channels[z];return T===20||T===21||T===28||T===29?F===32?O.ccRCL():F===33?O.ccBS():F===34?O.ccAOF():F===35?O.ccAON():F===36?O.ccDER():F===37?O.ccRU(2):F===38?O.ccRU(3):F===39?O.ccRU(4):F===40?O.ccFON():F===41?O.ccRDC():F===42?O.ccTR():F===43?O.ccRTD():F===44?O.ccEDM():F===45?O.ccCR():F===46?O.ccENM():F===47&&O.ccEOC():O.ccTO(F-32),p(T,F,P),this.currentChannel=z,!0},x.parseMidrow=function(T,F){var P=0;if((T===17||T===25)&&F>=32&&F<=47){if(T===17?P=1:P=2,P!==this.currentChannel)return this.logger.log(n.ERROR,"Mismatch channel in midrow parsing"),!1;var A=this.channels[P];return A?(A.ccMIDROW(F),this.logger.log(n.DEBUG,"MIDROW ("+f([T,F])+")"),!0):!1}return!1},x.parsePAC=function(T,F){var P,A=this.cmdHistory,X=(T>=17&&T<=23||T>=25&&T<=31)&&F>=64&&F<=127,z=(T===16||T===24)&&F>=64&&F<=95;if(!(X||z))return!1;if(D(T,F,A))return p(null,null,A),!0;var O=T<=23?1:2;F>=64&&F<=95?P=O===1?e[T]:r[T]:P=O===1?h[T]:c[T];var B=this.channels[O];return B?(B.setPAC(this.interpretPAC(P,F)),p(T,F,A),this.currentChannel=O,!0):!1},x.interpretPAC=function(T,F){var P,A={color:null,italics:!1,indent:null,underline:!1,row:T};return F>95?P=F-96:P=F-64,A.underline=(P&1)===1,P<=13?A.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(P/2)]:P<=15?(A.italics=!0,A.color="white"):A.indent=Math.floor((P-16)/2)*4,A},x.parseChars=function(T,F){var P,A=null,X=null;if(T>=25?(P=2,X=T-8):(P=1,X=T),X>=17&&X<=19){var z;X===17?z=F+80:X===18?z=F+112:z=F+144,this.logger.log(n.INFO,"Special char '"+m(z)+"' in channel "+P),A=[z]}else T>=32&&T<=127&&(A=F===0?[T]:[T,F]);if(A){var O=f(A);this.logger.log(n.DEBUG,"Char codes = "+O.join(",")),p(T,F,this.cmdHistory)}return A},x.parseBackgroundAttributes=function(T,F){var P=(T===16||T===24)&&F>=32&&F<=47,A=(T===23||T===31)&&F>=45&&F<=47;if(!(P||A))return!1;var X,z={};T===16||T===24?(X=Math.floor((F-32)/2),z.background=i[X],F%2===1&&(z.background=z.background+"_semi")):F===45?z.background="transparent":(z.foreground="black",F===47&&(z.underline=!0));var O=T<=23?1:2,B=this.channels[O];return B.setBkgData(z),p(T,F,this.cmdHistory),!0},x.reset=function(){for(var T=0;T=16?u--:u++;var p=Object(k.fixLineBreaks)(o.trim()),D=Object(v.generateCueId)(r,c,p);(!h||!h.cues||!h.cues.getCueById(D))&&(f=new s(r,c,p),f.id=D,f.line=E+1,f.align="left",f.position=10+Math.min(80,Math.floor(u*8/32)*10),n.push(f))}return h&&n.length&&(n.sort(function(R,y){return R.line==="auto"||y.line==="auto"?0:R.line>8&&y.line>8?y.line-R.line:R.line-y.line}),n.forEach(function(R){return Object(m.addCueToTrack)(h,R)})),n}};g.default=_},"./src/utils/discontinuities.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"findFirstFragWithCC",function(){return C}),S.d(g,"shouldAlignOnDiscontinuities",function(){return _}),S.d(g,"findDiscontinuousReferenceFrag",function(){return e}),S.d(g,"adjustSlidingStart",function(){return r}),S.d(g,"alignStream",function(){return c}),S.d(g,"alignPDT",function(){return n}),S.d(g,"alignFragmentByPDTDelta",function(){return l}),S.d(g,"alignMediaPlaylistByPDT",function(){return f});var k=S("./src/polyfills/number.ts"),v=S("./src/utils/logger.ts"),m=S("./src/controller/level-helper.ts");function C(d,u){for(var o=null,s=0,E=d.length;so.startCC||d&&d.cc=this.minWeight_},C.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},C.destroy=function(){},m}();g.default=v},"./src/utils/ewma.ts":function(N,g,S){"use strict";S.r(g);var k=function(){function v(C,_,e){_===void 0&&(_=0),e===void 0&&(e=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=C,this.alpha_=C?Math.exp(Math.log(.5)/C):0,this.estimate_=_,this.totalWeight_=e}var m=v.prototype;return m.sample=function(_,e){var h=Math.pow(this.alpha_,_);this.estimate_=e*(1-h)+h*this.estimate_,this.totalWeight_+=_},m.getTotalWeight=function(){return this.totalWeight_},m.getEstimate=function(){if(this.alpha_){var _=1-Math.pow(this.alpha_,this.totalWeight_);if(_)return this.estimate_/_}return this.estimate_},v}();g.default=k},"./src/utils/fetch-loader.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"fetchSupported",function(){return l});var k=S("./src/polyfills/number.ts"),v=S("./src/loader/load-stats.ts"),m=S("./src/demux/chunk-cache.ts");function C(s,E){s.prototype=Object.create(E.prototype),s.prototype.constructor=s,c(s,E)}function _(s){var E=typeof Map=="function"?new Map:void 0;return _=function(p){if(p===null||!r(p))return p;if(typeof p!="function")throw new TypeError("Super expression must either be null or a function");if(typeof E!="undefined"){if(E.has(p))return E.get(p);E.set(p,D)}function D(){return e(p,arguments,i(this).constructor)}return D.prototype=Object.create(p.prototype,{constructor:{value:D,enumerable:!1,writable:!0,configurable:!0}}),c(D,p)},_(s)}function e(s,E,b){return h()?e=Reflect.construct:e=function(D,R,y){var x=[null];x.push.apply(x,R);var w=Function.bind.apply(D,x),T=new w;return y&&c(T,y.prototype),T},e.apply(null,arguments)}function h(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(s){return!1}}function r(s){return Function.toString.call(s).indexOf("[native code]")!==-1}function c(s,E){return c=Object.setPrototypeOf||function(p,D){return p.__proto__=D,p},c(s,E)}function i(s){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(b){return b.__proto__||Object.getPrototypeOf(b)},i(s)}function n(){return n=Object.assign||function(s){for(var E=1;E=y&&x(D,R,w.flush(),p)):x(D,R,X,p),P()}).catch(function(){return Promise.reject()})};return F()},s}();function d(s,E){var b={method:"GET",mode:"cors",credentials:"same-origin",signal:E,headers:new self.Headers(n({},s.headers))};return s.rangeEnd&&b.headers.set("Range","bytes="+s.rangeStart+"-"+String(s.rangeEnd-1)),b}function u(s,E){return new self.Request(s.url,E)}var o=function(s){C(E,s);function E(b,p,D){var R;return R=s.call(this,b)||this,R.code=void 0,R.details=void 0,R.code=p,R.details=D,R}return E}(_(Error));g.default=f},"./src/utils/imsc1-ttml-parser.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"IMSC1_CODEC",function(){return r}),S.d(g,"parseIMSC1",function(){return l});var k=S("./src/utils/mp4-tools.ts"),v=S("./src/utils/vttparser.ts"),m=S("./src/utils/vttcue.ts"),C=S("./src/demux/id3.ts"),_=S("./src/utils/timescale-conversion.ts"),e=S("./src/utils/webvtt-parser.ts");function h(){return h=Object.assign||function(y){for(var x=1;x"):k}function _(r){for(var c=arguments.length,i=new Array(c>1?c-1:0),n=1;n>24,E[b+1]=p>>16&255,E[b+2]=p>>8&255,E[b+3]=p&255}function c(E,b){var p=[];if(!b.length)return p;var D,R,y;"data"in E?(D=E.data,R=E.start,y=E.end):(D=E,R=0,y=D.byteLength);for(var x=R;x1?x+w:y;if(T===b[0])if(b.length===1)p.push({data:D,start:x+8,end:F});else{var P=c({data:D,start:x+8,end:F},b.slice(1));P.length&&C.apply(p,P)}x=F}return p}function i(E){var b=c(E,["moov"]),p=b[0],D=p?p.end:null,R=c(E,["sidx"]);if(!R||!R[0])return null;var y=[],x=R[0],w=x.data[0],T=w===0?8:16,F=h(x,T);T+=4;var P=0,A=0;w===0?T+=8:T+=16,T+=2;var X=x.end+A,z=e(x,T);T+=2;for(var O=0;O>>31;if(G===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var ee=h(x,B);B+=4,y.push({referenceSize:L,subsegmentDuration:ee,info:{duration:ee/F,start:X,end:X+L-1}}),X+=L,B+=4,T=B}return{earliestPresentationTime:P,timescale:F,version:w,referencesCount:z,references:y,moovEndOffset:D}}function n(E){for(var b=[],p=c(E,["moov","trak"]),D=0;D_)&&(this.startTime=_),this.endTime=e,this.screen=h,this.timelineController.createCaptionsTrack(this.trackName)},m.reset=function(){this.cueRanges=[]},v}()},"./src/utils/texttrack-utils.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"sendAddTrackEvent",function(){return v}),S.d(g,"addCueToTrack",function(){return m}),S.d(g,"clearCurrentCues",function(){return C}),S.d(g,"removeCuesInRange",function(){return _}),S.d(g,"getCuesInRange",function(){return h});var k=S("./src/utils/logger.ts");function v(r,c){var i;try{i=new Event("addtrack")}catch(n){i=document.createEvent("Event"),i.initEvent("addtrack",!1,!1)}i.track=r,c.dispatchEvent(i)}function m(r,c){var i=r.mode;if(i==="disabled"&&(r.mode="hidden"),r.cues&&!r.cues.getCueById(c.id))try{if(r.addCue(c),!r.cues.getCueById(c.id))throw new Error("addCue is failed for: "+c)}catch(l){k.logger.debug("[texttrack-utils]: "+l);var n=new self.TextTrackCue(c.startTime,c.endTime,c.text);n.id=c.id,r.addCue(n)}i==="disabled"&&(r.mode=i)}function C(r){var c=r.mode;if(c==="disabled"&&(r.mode="hidden"),r.cues)for(var i=r.cues.length;i--;)r.removeCue(r.cues[i]);c==="disabled"&&(r.mode=c)}function _(r,c,i){var n=r.mode;if(n==="disabled"&&(r.mode="hidden"),r.cues&&r.cues.length>0)for(var l=h(r.cues,c,i),f=0;fr[i].endTime)return-1;for(var n=0,l=i;n<=l;){var f=Math.floor((l+n)/2);if(cr[f].startTime&&n-1)for(var f=l,d=r.length;f=c&&u.endTime<=i)n.push(u);else if(u.startTime>i)return n}return n}},"./src/utils/time-ranges.ts":function(N,g,S){"use strict";S.r(g);var k={toString:function(m){for(var C="",_=m.length,e=0;e<_;e++)C+="["+m.start(e).toFixed(3)+","+m.end(e).toFixed(3)+"]";return C}};g.default=k},"./src/utils/timescale-conversion.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"toTimescaleFromBase",function(){return v}),S.d(g,"toTimescaleFromScale",function(){return m}),S.d(g,"toMsFromMpegTsClock",function(){return C}),S.d(g,"toMpegTsClockFromTimescale",function(){return _});var k=9e4;function v(e,h,r,c){r===void 0&&(r=1),c===void 0&&(c=!1);var i=e*h*r;return c?Math.round(i):i}function m(e,h,r,c){return r===void 0&&(r=1),c===void 0&&(c=!1),v(e,h,1/r,c)}function C(e,h){return h===void 0&&(h=!1),v(e,1e3,1/k,h)}function _(e,h){return h===void 0&&(h=1),v(e,k,1/h)}},"./src/utils/typed-array.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"sliceUint8",function(){return k});function k(v,m,C){return Uint8Array.prototype.slice?v.slice(m,C):new Uint8Array(Array.prototype.slice.call(v,m,C))}},"./src/utils/vttcue.ts":function(N,g,S){"use strict";S.r(g),g.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var k=["","lr","rl"],v=["start","middle","end","left","right"];function m(r,c){if(typeof c!="string")return!1;if(!Array.isArray(r))return!1;var i=c.toLowerCase();return~r.indexOf(i)?i:!1}function C(r){return m(k,r)}function _(r){return m(v,r)}function e(r){for(var c=arguments.length,i=new Array(c>1?c-1:0),n=1;n100)throw new Error("Position must be between 0 and 100.");y=P,this.hasBeenReset=!0}})),Object.defineProperty(n,"positionAlign",e({},l,{get:function(){return x},set:function(P){var A=_(P);if(!A)throw new SyntaxError("An invalid or illegal string was specified.");x=A,this.hasBeenReset=!0}})),Object.defineProperty(n,"size",e({},l,{get:function(){return w},set:function(P){if(P<0||P>100)throw new Error("Size must be between 0 and 100.");w=P,this.hasBeenReset=!0}})),Object.defineProperty(n,"align",e({},l,{get:function(){return T},set:function(P){var A=_(P);if(!A)throw new SyntaxError("An invalid or illegal string was specified.");T=A,this.hasBeenReset=!0}})),n.displayState=void 0}return h.prototype.getCueAsHTML=function(){var r=self.WebVTT;return r.convertCueToDOMTree(self,this.text)},h}()},"./src/utils/vttparser.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"parseTimeStamp",function(){return m}),S.d(g,"fixLineBreaks",function(){return c}),S.d(g,"VTTParser",function(){return i});var k=S("./src/utils/vttcue.ts"),v=function(){function n(){}var l=n.prototype;return l.decode=function(d,u){if(!d)return"";if(typeof d!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(d))},n}();function m(n){function l(d,u,o,s){return(d|0)*3600+(u|0)*60+(o|0)+parseFloat(s||0)}var f=n.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return f?parseFloat(f[2])>59?l(f[2],f[3],0,f[4]):l(f[1],f[2],f[3],f[4]):null}var C=function(){function n(){this.values=Object.create(null)}var l=n.prototype;return l.set=function(d,u){!this.get(d)&&u!==""&&(this.values[d]=u)},l.get=function(d,u,o){return o?this.has(d)?this.values[d]:u[o]:this.has(d)?this.values[d]:u},l.has=function(d){return d in this.values},l.alt=function(d,u,o){for(var s=0;s=0&&o<=100)return this.set(d,o),!0}return!1},n}();function _(n,l,f,d){var u=d?n.split(d):[n];for(var o in u){if(typeof u[o]!="string")continue;var s=u[o].split(f);if(s.length!==2)continue;var E=s[0],b=s[1];l(E,b)}}var e=new k.default(0,0,""),h=e.align==="middle"?"middle":"center";function r(n,l,f){var d=n;function u(){var E=m(n);if(E===null)throw new Error("Malformed timestamp: "+d);return n=n.replace(/^[^\sa-zA-Z-]+/,""),E}function o(E,b){var p=new C;_(E,function(y,x){var w;switch(y){case"region":for(var T=f.length-1;T>=0;T--)if(f[T].id===x){p.set(y,f[T].region);break}break;case"vertical":p.alt(y,x,["rl","lr"]);break;case"line":w=x.split(","),p.integer(y,w[0]),p.percent(y,w[0])&&p.set("snapToLines",!1),p.alt(y,w[0],["auto"]),w.length===2&&p.alt("lineAlign",w[1],["start",h,"end"]);break;case"position":w=x.split(","),p.percent(y,w[0]),w.length===2&&p.alt("positionAlign",w[1],["start",h,"end","line-left","line-right","auto"]);break;case"size":p.percent(y,x);break;case"align":p.alt(y,x,["start",h,"end","left","right"]);break}},/:/,/\s/),b.region=p.get("region",null),b.vertical=p.get("vertical","");var D=p.get("line","auto");D==="auto"&&e.line===-1&&(D=-1),b.line=D,b.lineAlign=p.get("lineAlign","start"),b.snapToLines=p.get("snapToLines",!0),b.size=p.get("size",100),b.align=p.get("align",h);var R=p.get("position","auto");R==="auto"&&e.position===50&&(R=b.align==="start"||b.align==="left"?0:b.align==="end"||b.align==="right"?100:50),b.position=R}function s(){n=n.replace(/^\s+/,"")}if(s(),l.startTime=u(),s(),n.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+d);n=n.substr(3),s(),l.endTime=u(),s(),o(n,l)}function c(n){return n.replace(//gi,` `)}var i=function(){function n(){this.state="INITIAL",this.buffer="",this.decoder=new v,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var l=n.prototype;return l.parse=function(d){var u=this;d&&(u.buffer+=u.decoder.decode(d,{stream:!0}));function o(){var R=u.buffer,y=0;for(R=c(R);y")===-1){u.cue.id=E;continue}case"CUE":if(!u.cue){u.state="BADCUE";continue}try{r(E,u.cue,u.regionList)}catch(R){u.cue=null,u.state="BADCUE";continue}u.state="CUETEXT";continue;case"CUETEXT":{var D=E.indexOf("-->")!==-1;if(!E||D&&(p=!0)){u.oncue&&u.cue&&u.oncue(u.cue),u.cue=null,u.state="ID";continue}if(u.cue===null)continue;u.cue.text&&(u.cue.text+=` `),u.cue.text+=E}continue;case"BADCUE":E||(u.state="ID")}}}catch(R){u.state==="CUETEXT"&&u.cue&&u.oncue&&u.oncue(u.cue),u.cue=null,u.state=u.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},l.flush=function(){var d=this;try{if((d.cue||d.state==="HEADER")&&(d.buffer+=` `,d.parse()),d.state==="INITIAL"||d.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(u){d.onparsingerror&&d.onparsingerror(u)}return d.onflush&&d.onflush(),this},n}()},"./src/utils/webvtt-parser.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"generateCueId",function(){return i}),S.d(g,"parseWebVTT",function(){return l});var k=S("./src/polyfills/number.ts"),v=S("./src/utils/vttparser.ts"),m=S("./src/demux/id3.ts"),C=S("./src/utils/timescale-conversion.ts"),_=S("./src/remux/mp4-remuxer.ts"),e=/\r\n|\n\r|\n|\r/g,h=function(d,u,o){return o===void 0&&(o=0),d.substr(o,u.length)===u},r=function(d){var u=parseInt(d.substr(-3)),o=parseInt(d.substr(-6,2)),s=parseInt(d.substr(-9,2)),E=d.length>9?parseInt(d.substr(0,d.indexOf(":"))):0;if(!Object(k.isFiniteNumber)(u)||!Object(k.isFiniteNumber)(o)||!Object(k.isFiniteNumber)(s)||!Object(k.isFiniteNumber)(E))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+d);return u+=1e3*o,u+=60*1e3*s,u+=60*60*1e3*E,u},c=function(d){for(var u=5381,o=d.length;o;)u=u*33^d.charCodeAt(--o);return(u>>>0).toString()};function i(f,d,u){return c(f.toString())+c(d.toString())+c(u)}var n=function(d,u,o){var s=d[u],E=d[s.prevCC];if(!E||!E.new&&s.new){d.ccOffset=d.presentationOffset=s.start,s.new=!1;return}for(;(b=E)!==null&&b!==void 0&&b.new;){var b;d.ccOffset+=s.start-E.start,s.new=!1,s=E,E=d[s.prevCC]}d.presentationOffset=o};function l(f,d,u,o,s,E,b,p){var D=new v.VTTParser,R=Object(m.utf8ArrayToStr)(new Uint8Array(f)).trim().replace(e,` `).split(` `),y=[],x=Object(C.toMpegTsClockFromTimescale)(d,u),w="00:00.000",T=0,F=0,P,A=!0,X=!1;D.oncue=function(z){var O=o[s],B=o.ccOffset,U=(T-x)/9e4;if(O!=null&&O.new&&(F!==void 0?B=o.ccOffset=O.start:n(o,s,U)),U&&(B=U-o.presentationOffset),X){var L=z.endTime-z.startTime,G=Object(_.normalizePts)((z.startTime+B-F)*9e4,E*9e4)/9e4;z.startTime=G,z.endTime=G+L}var ee=z.text.trim();z.text=decodeURIComponent(encodeURIComponent(ee)),z.id||(z.id=i(z.startTime,z.endTime,ee)),z.endTime>0&&y.push(z)},D.onparsingerror=function(z){P=z},D.onflush=function(){if(P){p(P);return}b(y)},R.forEach(function(z){if(A)if(h(z,"X-TIMESTAMP-MAP=")){A=!1,X=!0,z.substr(16).split(",").forEach(function(O){h(O,"LOCAL:")?w=O.substr(6):h(O,"MPEGTS:")&&(T=parseInt(O.substr(7)))});try{F=r(w)/1e3}catch(O){X=!1,P=O}return}else z===""&&(A=!1);D.parse(z+` `)}),D.flush()}},"./src/utils/xhr-loader.ts":function(N,g,S){"use strict";S.r(g);var k=S("./src/utils/logger.ts"),v=S("./src/loader/load-stats.ts"),m=/^age:\s*[\d.]+\s*$/m,C=function(){function _(h){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=h?h.xhrSetup:null,this.stats=new v.LoadStats,this.retryDelay=0}var e=_.prototype;return e.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},e.abortInternal=function(){var r=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),r&&(r.onreadystatechange=null,r.onprogress=null,r.readyState!==4&&(this.stats.aborted=!0,r.abort()))},e.abort=function(){var r;this.abortInternal(),(r=this.callbacks)!==null&&r!==void 0&&r.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},e.load=function(r,c,i){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=r,this.config=c,this.callbacks=i,this.retryDelay=c.retryDelay,this.loadInternal()},e.loadInternal=function(){var r=this.config,c=this.context;if(!r)return;var i=this.loader=new self.XMLHttpRequest,n=this.stats;n.loading.first=0,n.loaded=0;var l=this.xhrSetup;try{if(l)try{l(i,c.url)}catch(u){i.open("GET",c.url,!0),l(i,c.url)}i.readyState||i.open("GET",c.url,!0);var f=this.context.headers;if(f)for(var d in f)i.setRequestHeader(d,f[d])}catch(u){this.callbacks.onError({code:i.status,text:u.message},c,i);return}c.rangeEnd&&i.setRequestHeader("Range","bytes="+c.rangeStart+"-"+(c.rangeEnd-1)),i.onreadystatechange=this.readystatechange.bind(this),i.onprogress=this.loadprogress.bind(this),i.responseType=c.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),r.timeout),i.send()},e.readystatechange=function(){var r=this.context,c=this.loader,i=this.stats;if(!r||!c)return;var n=c.readyState,l=this.config;if(i.aborted)return;if(n>=2)if(self.clearTimeout(this.requestTimeout),i.loading.first===0&&(i.loading.first=Math.max(self.performance.now(),i.loading.start)),n===4){c.onreadystatechange=null,c.onprogress=null;var f=c.status;if(f>=200&&f<300){i.loading.end=Math.max(self.performance.now(),i.loading.first);var d,u;if(r.responseType==="arraybuffer"?(d=c.response,u=d.byteLength):(d=c.responseText,u=d.length),i.loaded=i.total=u,!this.callbacks)return;var o=this.callbacks.onProgress;if(o&&o(i,r,d,c),!this.callbacks)return;var s={url:c.responseURL,data:d};this.callbacks.onSuccess(s,i,r,c)}else i.retry>=l.maxRetry||f>=400&&f<499?(k.logger.error(f+" while loading "+r.url),this.callbacks.onError({code:f,text:c.statusText},r,c)):(k.logger.warn(f+" while loading "+r.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,l.maxRetryDelay),i.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),l.timeout)},e.loadtimeout=function(){k.logger.warn("timeout while loading "+this.context.url);var r=this.callbacks;r&&(this.abortInternal(),r.onTimeout(this.stats,this.context,this.loader))},e.loadprogress=function(r){var c=this.stats;c.loaded=r.loaded,r.lengthComputable&&(c.total=r.total)},e.getCacheAge=function(){var r=null;if(this.loader&&m.test(this.loader.getAllResponseHeaders())){var c=this.loader.getResponseHeader("age");r=c?parseFloat(c):null}return r},_}();g.default=C}}).default})},vHTk:function(H,Z,I){H.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},w7YG:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("ETIr"),I("cv67"),I("K3mO"),I("OLod"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.StreamCipher,v=g.algo,m=v.RC4=k.extend({_doReset:function(){for(var e=this._key,h=e.words,r=e.sigBytes,c=this._S=[],i=0;i<256;i++)c[i]=i;for(var i=0,n=0;i<256;i++){var l=i%r,f=h[l>>>2]>>>24-l%4*8&255;n=(n+c[i]+f)%256;var d=c[i];c[i]=c[n],c[n]=d}this._i=this._j=0},_doProcessBlock:function(e,h){e[h]^=C.call(this)},keySize:256/32,ivSize:0});function C(){for(var e=this._S,h=this._i,r=this._j,c=0,i=0;i<4;i++){h=(h+1)%256,r=(r+e[h])%256;var n=e[h];e[h]=e[r],e[r]=n,c|=e[(e[h]+e[r])%256]<<24-i*8}return this._i=h,this._j=r,c}g.RC4=k._createHelper(m);var _=v.RC4Drop=m.extend({cfg:m.cfg.extend({drop:192}),_doReset:function(){m._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)C.call(this)}});g.RC4Drop=k._createHelper(_)}(),N.RC4})},wCXF:function(H,Z,I){"use strict";I.d(Z,"a",function(){return $e});var N=I("rePB"),g=I("VTBJ"),S=I("KQm4"),k=I("U8pU"),v=I("ODXe"),m=I("q1tI"),C=I("TSYQ"),_=I.n(C),e=I("Gytx"),h=I.n(e),r=I("Kwbf"),c=I("t23M"),i=I("qx4F"),n=I("6eGT"),l=I("IBYe"),f=I("Ff2n"),d=I("c+Xe"),u=I("fyJ8"),o=I("biw7");function s(Pe,Ie,Je,rt,ye){var ue=Je[Pe]||{},he=Je[Ie]||{},me,Ce;ue.fixed==="left"?me=rt.left[Pe]:he.fixed==="right"&&(Ce=rt.right[Ie]);var ge=!1,Ee=!1,Ae=!1,De=!1,Me=Je[Ie+1],He=Je[Pe-1];if(ye==="rtl"){if(me!==void 0){var nt=He&&He.fixed==="left";De=!nt}else if(Ce!==void 0){var at=Me&&Me.fixed==="right";Ae=!at}}else if(me!==void 0){var it=Me&&Me.fixed==="left";ge=!it}else if(Ce!==void 0){var st=He&&He.fixed==="right";Ee=!st}return{fixLeft:me,fixRight:Ce,lastFixLeft:ge,firstFixRight:Ee,lastFixRight:Ae,firstFixLeft:De,isSticky:rt.isSticky}}var E=I("sR1s");function b(Pe){var Ie=Pe.cells,Je=Pe.stickyOffsets,rt=Pe.flattenColumns,ye=Pe.rowComponent,ue=Pe.cellComponent,he=Pe.onHeaderRow,me=Pe.index,Ce=m.useContext(o.a),ge=Ce.prefixCls,Ee=Ce.direction,Ae;he&&(Ae=he(Ie.map(function(Me){return Me.column}),me));var De=Object(E.a)(Ie.map(function(Me){return Me.column}));return m.createElement(ye,Object.assign({},Ae),Ie.map(function(Me,He){var nt=Me.column,at=s(Me.colStart,Me.colEnd,rt,Je,Ee),it;return nt&&nt.onHeaderCell&&(it=Me.column.onHeaderCell(nt)),m.createElement(u.a,Object.assign({},Me,{ellipsis:nt.ellipsis,align:nt.align,component:ue,prefixCls:ge,key:De[He]},at,{additionalProps:it,rowType:"header"}))}))}b.displayName="HeaderRow";var p=b;function D(Pe){var Ie=[];function Je(he,me){var Ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ie[Ce]=Ie[Ce]||[];var ge=me,Ee=he.filter(Boolean).map(function(Ae){var De={key:Ae.key,className:Ae.className||"",children:Ae.title,column:Ae,colStart:ge},Me=1,He=Ae.children;return He&&He.length>0&&(Me=Je(He,ge,Ce+1).reduce(function(nt,at){return nt+at},0),De.hasSubColumns=!0),"colSpan"in Ae&&(Me=Ae.colSpan),"rowSpan"in Ae&&(De.rowSpan=Ae.rowSpan),De.colSpan=Me,De.colEnd=De.colStart+Me-1,Ie[Ce].push(De),ge+=Me,Me});return Ee}Je(Pe,0);for(var rt=Ie.length,ye=function(me){Ie[me].forEach(function(Ce){!("rowSpan"in Ce)&&!Ce.hasSubColumns&&(Ce.rowSpan=rt-me)})},ue=0;ue=0;me-=1){var Ce=Ie[me],ge=Je&&Je[me],Ee=ge&&ge[x.a];(Ce||Ee||he)&&(ye.unshift(m.createElement("col",Object.assign({key:me,style:{width:Ce,minWidth:Ce}},Ee))),he=!0)}return m.createElement("colgroup",null,ye)}var T=w;function F(Pe,Ie){return Object(m.useMemo)(function(){for(var Je=[],rt=0;rt1?ct-1:0),xr=1;xr=Ae&&(Bt=Ae-De),he({scrollLeft:Bt/Ae*(Ee+2)}),st.current.x=Dt.pageX},Mt=function(){var Dt=Object($.b)(ue.current).top,St=Dt+ue.current.offsetHeight,_t=document.documentElement.scrollTop+window.innerHeight;St-Object(i.a)()<=_t||Dt>=_t-me?it(function(Et){return Object(g.a)(Object(g.a)({},Et),{},{isHiddenScrollBar:!0})}):it(function(Et){return Object(g.a)(Object(g.a)({},Et),{},{isHiddenScrollBar:!1})})},wt=function(Dt){it(function(St){return Object(g.a)(Object(g.a)({},St),{},{scrollLeft:Dt/Ee*Ae||0})})};return m.useImperativeHandle(Je,function(){return{setScrollLeft:wt}}),m.useEffect(function(){var Jt=Object(J.a)(document.body,"mouseup",Lt,!1),Dt=Object(J.a)(document.body,"mousemove",$t,!1);return Mt(),function(){Jt.remove(),Dt.remove()}},[De,ht]),m.useEffect(function(){var Jt=Object(J.a)(window,"scroll",Mt,!1),Dt=Object(J.a)(window,"resize",Mt,!1);return function(){Jt.remove(),Dt.remove()}},[]),m.useEffect(function(){at.isHiddenScrollBar||it(function(Jt){var Dt,St;return Object(g.a)(Object(g.a)({},Jt),{},{scrollLeft:ue.current.scrollLeft/((Dt=ue.current)===null||Dt===void 0?void 0:Dt.scrollWidth)*((St=ue.current)===null||St===void 0?void 0:St.clientWidth)})})},[at.isHiddenScrollBar]),Ee<=Ae||!De||at.isHiddenScrollBar?null:m.createElement("div",{style:{height:Object(i.a)(),width:Ae,bottom:me},className:"".concat(ge,"-sticky-scroll")},m.createElement("div",{onMouseDown:Yt,ref:Me,className:_()("".concat(ge,"-sticky-scroll-bar"),Object(N.a)({},"".concat(ge,"-sticky-scroll-bar-active"),ht)),style:{width:"".concat(De,"px"),transform:"translate3d(".concat(at.scrollLeft,"px, 0, 0)")}}))},ce=m.forwardRef(le);function we(Pe,Ie){return m.useMemo(function(){var Je=!!Pe;return{isSticky:Je,stickyClassName:Je?"".concat(Ie,"-sticky-header"):"",offsetHeader:Object(k.a)(Pe)==="object"&&Pe.offsetHeader||0,offsetScroll:Object(k.a)(Pe)==="object"&&Pe.offsetScroll||0}},[Pe,Ie])}var Fe=[],Xe={},$e="rc-table-internal-hook",Ye=m.memo(function(Pe){var Ie=Pe.children;return Ie},function(Pe,Ie){return h()(Pe.props,Ie.props)?Pe.pingLeft!==Ie.pingLeft||Pe.pingRight!==Ie.pingRight:!1});function Ze(Pe){var Ie,Je=Pe.prefixCls,rt=Pe.className,ye=Pe.rowClassName,ue=Pe.style,he=Pe.data,me=Pe.rowKey,Ce=Pe.scroll,ge=Pe.tableLayout,Ee=Pe.direction,Ae=Pe.title,De=Pe.footer,Me=Pe.summary,He=Pe.id,nt=Pe.showHeader,at=Pe.components,it=Pe.emptyText,st=Pe.onRow,Tt=Pe.onHeaderRow,pt=Pe.internalHooks,ht=Pe.transformColumns,Ft=Pe.internalRefs,Lt=Pe.sticky,Yt=he||Fe,$t=!!Yt.length,Mt=m.useState(0),wt=Object(v.a)(Mt,2),Jt=wt[0],Dt=wt[1];m.useEffect(function(){Dt(Object(i.a)())});var St=m.useMemo(function(){return Object(E.c)(at,{})},[at]),_t=m.useCallback(function(Mr,wr){return Object(E.b)(St,Mr)||wr},[St]),Et=m.useMemo(function(){return typeof me=="function"?me:function(Mr){var wr=Mr&&Mr[me];return wr}},[me]),Bt=Object(x.c)(Pe),Dr=Bt.expandIcon,mt=Bt.expandedRowKeys,Ct=Bt.defaultExpandedRowKeys,dt=Bt.defaultExpandAllRows,Ht=Bt.expandedRowRender,Gt=Bt.onExpand,yt=Bt.onExpandedRowsChange,xt=Bt.expandRowByClick,Kt=Bt.rowExpandable,Ar=Bt.expandIconColumnIndex,qt=Bt.expandedRowClassName,ut=Bt.childrenColumnName,kt=Bt.indentSize,Hr=Dr||ie,Yr=ut||"children",On=m.useMemo(function(){return Ht?"row":Pe.expandable&&pt===$e&&Pe.expandable.__PARENT_RENDER_ICON__||Yt.some(function(Mr){return Mr&&Object(k.a)(Mr)==="object"&&Mr[Yr]})?"nest":!1},[!!Ht,Yt]),cn=m.useState(function(){return Ct||(dt?ne(Yt,Et,Yr):[])}),zr=Object(v.a)(cn,2),Pt=zr[0],dn=zr[1],ct=m.useMemo(function(){return new Set(mt||Pt||[])},[mt,Pt]),jr=m.useCallback(function(Mr){var wr=Et(Mr,Yt.indexOf(Mr)),gr,ai=ct.has(wr);ai?(ct.delete(wr),gr=Object(S.a)(ct)):gr=[].concat(Object(S.a)(ct),[wr]),dn(gr),Gt&&Gt(!ai,Mr),yt&&yt(gr)},[Et,ct,Yt,Gt,yt]),xr=m.useState(0),Gn=Object(v.a)(xr,2),An=Gn[0],hn=Gn[1],Ei=Object(fe.b)(Object(g.a)(Object(g.a)(Object(g.a)({},Pe),Bt),{},{expandable:!!Ht,expandedKeys:ct,getRowKey:Et,onTriggerExpand:jr,expandIcon:Hr,expandIconColumnIndex:Ar,direction:Ee}),pt===$e?ht:null),Kn=Object(v.a)(Ei,2),bn=Kn[0],Fr=Kn[1],di=m.useMemo(function(){return{columns:bn,flattenColumns:Fr}},[bn,Fr]),fn=m.useRef(),Vr=m.useRef(),dr=m.useRef(),nn=m.useState(!1),_n=Object(v.a)(nn,2),jt=_n[0],lr=_n[1],ur=m.useState(!1),Rr=Object(v.a)(ur,2),br=Rr[0],hi=Rr[1],Fn=de(new Map),$i=Object(v.a)(Fn,2),Ji=$i[0],Oi=$i[1],pn=Object(E.a)(Fr),Ki=pn.map(function(Mr){return Ji.get(Mr)}),Zr=m.useMemo(function(){return Ki},[Ki.join("_")]),ri=Y(Zr,Fr.length,Ee),kn=Ce&&Object(E.d)(Ce.y),sn=Ce&&Object(E.d)(Ce.x),Tn=sn&&Fr.some(function(Mr){var wr=Mr.fixed;return wr}),fi=m.useRef(),zn=we(Lt,Je),Vn=zn.isSticky,ki=zn.offsetHeader,Mi=zn.offsetScroll,Xn=zn.stickyClassName,ji,pi,mi;kn&&(pi={overflowY:"scroll",maxHeight:Ce.y}),sn&&(ji={overflowX:"auto"},kn||(pi={overflowY:"hidden"}),mi={width:Ce.x===!0?"auto":Ce.x,minWidth:"100%"});var Yn=m.useCallback(function(Mr,wr){Oi(function(gr){var ai=new Map(gr);return ai.set(Mr,wr),ai})},[]),$n=te(null),Pi=Object(v.a)($n,2),ni=Pi[0],gi=Pi[1];function Fi(Mr,wr){if(!wr)return;typeof wr=="function"?wr(Mr):wr.scrollLeft!==Mr&&(wr.scrollLeft=Mr)}var ii=function(wr){var gr=wr.currentTarget,ai=wr.scrollLeft,zi=typeof ai=="number"?ai:gr.scrollLeft,Vi=gr||Xe;if(!gi()||gi()===Vi){var tr;ni(Vi),Fi(zi,Vr.current),Fi(zi,dr.current),Fi(zi,(tr=fi.current)===null||tr===void 0?void 0:tr.setScrollLeft)}if(gr){var It=gr.scrollWidth,ir=gr.clientWidth;lr(zi>0),hi(zi0?[].concat(Object(g.a)(f),Object(g.a)(r(s).map(function(E){return Object(S.a)({fixed:o},E)}))):[].concat(Object(g.a)(f),[Object(S.a)(Object(S.a)({},d),{},{fixed:o})])},[])}function c(l){for(var f=!0,d=0;d=0;s-=1){var E=l[s];if(o&&E.fixed!=="right")o=!1;else if(!o&&E.fixed==="right"){Object(C.a)(!1,"Index ".concat(s+1," of `columns` missing `fixed='right'` prop."));break}}}function i(l){return l.map(function(f){var d=f.fixed,u=Object(k.a)(f,["fixed"]),o=d;return d==="left"?o="right":d==="right"&&(o="left"),Object(S.a)({fixed:o},u)})}function n(l,f){var d=l.prefixCls,u=l.columns,o=l.children,s=l.expandable,E=l.expandedKeys,b=l.getRowKey,p=l.onTriggerExpand,D=l.expandIcon,R=l.rowExpandable,y=l.expandIconColumnIndex,x=l.direction,w=l.expandRowByClick,T=v.useMemo(function(){return u||h(o)},[u,o]),F=v.useMemo(function(){if(s){var X,z=y||0,O=T[z],B=(X={},Object(N.a)(X,e.a,{className:"".concat(d,"-expand-icon-col")}),Object(N.a)(X,"title",""),Object(N.a)(X,"fixed",O?O.fixed:null),Object(N.a)(X,"className","".concat(d,"-row-expand-icon-cell")),Object(N.a)(X,"render",function(G,ee,oe){var ae=b(ee,oe),be=E.has(ae),_e=R?R(ee):!0,fe=D({prefixCls:d,expanded:be,expandable:_e,record:ee,onExpand:p});return w?v.createElement("span",{onClick:function(Oe){return Oe.stopPropagation()}},fe):fe}),X),U=T.slice();return z>=0&&U.splice(z,0,B),U}return T},[s,T,b,E,D,x]),P=v.useMemo(function(){var X=F;return f&&(X=f(X)),X.length||(X=[{render:function(){return null}}]),X},[f,F,x]),A=v.useMemo(function(){return x==="rtl"?i(r(P)):r(P)},[P,x]);return[P,A]}Z.b=n},wZgz:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("ETIr"),I("cv67"),I("K3mO"),I("OLod"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.BlockCipher,v=g.algo,m=[],C=[],_=[],e=[],h=[],r=[],c=[],i=[],n=[],l=[];(function(){for(var u=[],o=0;o<256;o++)o<128?u[o]=o<<1:u[o]=o<<1^283;for(var s=0,E=0,o=0;o<256;o++){var b=E^E<<1^E<<2^E<<3^E<<4;b=b>>>8^b&255^99,m[s]=b,C[b]=s;var p=u[s],D=u[p],R=u[D],y=u[b]*257^b*16843008;_[s]=y<<24|y>>>8,e[s]=y<<16|y>>>16,h[s]=y<<8|y>>>24,r[s]=y;var y=R*16843009^D*65537^p*257^s*16843008;c[b]=y<<24|y>>>8,i[b]=y<<16|y>>>16,n[b]=y<<8|y>>>24,l[b]=y,s?(s=p^u[u[u[R^p]]],E^=u[u[E]]):s=E=1}})();var f=[0,1,2,4,8,16,32,64,128,27,54],d=v.AES=k.extend({_doReset:function(){var u;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var o=this._keyPriorReset=this._key,s=o.words,E=o.sigBytes/4,b=this._nRounds=E+6,p=(b+1)*4,D=this._keySchedule=[],R=0;R6&&R%E==4&&(u=m[u>>>24]<<24|m[u>>>16&255]<<16|m[u>>>8&255]<<8|m[u&255]):(u=u<<8|u>>>24,u=m[u>>>24]<<24|m[u>>>16&255]<<16|m[u>>>8&255]<<8|m[u&255],u^=f[R/E|0]<<24),D[R]=D[R-E]^u);for(var y=this._invKeySchedule=[],x=0;x>>24]]^i[m[u>>>16&255]]^n[m[u>>>8&255]]^l[m[u&255]]}},encryptBlock:function(u,o){this._doCryptBlock(u,o,this._keySchedule,_,e,h,r,m)},decryptBlock:function(u,o){var s=u[o+1];u[o+1]=u[o+3],u[o+3]=s,this._doCryptBlock(u,o,this._invKeySchedule,c,i,n,l,C);var s=u[o+1];u[o+1]=u[o+3],u[o+3]=s},_doCryptBlock:function(u,o,s,E,b,p,D,R){for(var y=this._nRounds,x=u[o]^s[0],w=u[o+1]^s[1],T=u[o+2]^s[2],F=u[o+3]^s[3],P=4,A=1;A>>24]^b[w>>>16&255]^p[T>>>8&255]^D[F&255]^s[P++],z=E[w>>>24]^b[T>>>16&255]^p[F>>>8&255]^D[x&255]^s[P++],O=E[T>>>24]^b[F>>>16&255]^p[x>>>8&255]^D[w&255]^s[P++],B=E[F>>>24]^b[x>>>16&255]^p[w>>>8&255]^D[T&255]^s[P++];x=X,w=z,T=O,F=B}var X=(R[x>>>24]<<24|R[w>>>16&255]<<16|R[T>>>8&255]<<8|R[F&255])^s[P++],z=(R[w>>>24]<<24|R[T>>>16&255]<<16|R[F>>>8&255]<<8|R[x&255])^s[P++],O=(R[T>>>24]<<24|R[F>>>16&255]<<16|R[x>>>8&255]<<8|R[w&255])^s[P++],B=(R[F>>>24]<<24|R[x>>>16&255]<<16|R[w>>>8&255]<<8|R[T&255])^s[P++];u[o]=X,u[o+1]=z,u[o+2]=O,u[o+3]=B},keySize:256/32});g.AES=k._createHelper(d)}(),N.AES})},wbyO:function(H,Z,I){(function(N,g){H.exports=Z=g(I("Ib8C"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.WordArray,v=g.enc,m=v.Base64url={stringify:function(_,e=!0){var h=_.words,r=_.sigBytes,c=e?this._safe_map:this._map;_.clamp();for(var i=[],n=0;n>>2]>>>24-n%4*8&255,f=h[n+1>>>2]>>>24-(n+1)%4*8&255,d=h[n+2>>>2]>>>24-(n+2)%4*8&255,u=l<<16|f<<8|d,o=0;o<4&&n+o*.75>>6*(3-o)&63));var s=c.charAt(64);if(s)for(;i.length%4;)i.push(s);return i.join("")},parse:function(_,e=!0){var h=_.length,r=e?this._safe_map:this._map,c=this._reverseMap;if(!c){c=this._reverseMap=[];for(var i=0;i>>6-i%4*2,f=n|l;r[c>>>2]|=f<<24-c%4*8,c++}return k.create(r,c)}}(),N.enc.Base64url})},"y0+3":function(H,Z,I){"use strict";I.d(Z,"a",function(){return r}),I.d(Z,"b",function(){return i});var N=/margin|padding|width|height|max|min|offset/,g={left:!0,top:!0},S={cssFloat:1,styleFloat:1,float:1};function k(n){return n.nodeType===1?n.ownerDocument.defaultView.getComputedStyle(n,null):{}}function v(n,l,f){if(l=l.toLowerCase(),f==="auto"){if(l==="height")return n.offsetHeight;if(l==="width")return n.offsetWidth}return l in g||(g[l]=N.test(l)),g[l]?parseFloat(f)||0:f}function m(n,l){var f=arguments.length,d=k(n);return l=S[l]?"cssFloat"in n.style?"cssFloat":"styleFloat":l,f===1?d:v(n,l,d[l]||n.style[l])}function C(n,l,f){var d=arguments.length;if(l=S[l]?"cssFloat"in n.style?"cssFloat":"styleFloat":l,d===3)return typeof f=="number"&&N.test(l)&&(f="".concat(f,"px")),n.style[l]=f,f;for(var u in l)l.hasOwnProperty(u)&&C(n,u,l[u]);return k(n)}function _(n){return n===document.body?document.documentElement.clientWidth:n.offsetWidth}function e(n){return n===document.body?window.innerHeight||document.documentElement.clientHeight:n.offsetHeight}function h(){var n=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),l=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:n,height:l}}function r(){var n=document.documentElement.clientWidth,l=window.innerHeight||document.documentElement.clientHeight;return{width:n,height:l}}function c(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function i(n){var l=n.getBoundingClientRect(),f=document.documentElement;return{left:l.left+(window.pageXOffset||f.scrollLeft)-(f.clientLeft||document.body.clientLeft||0),top:l.top+(window.pageYOffset||f.scrollTop)-(f.clientTop||document.body.clientTop||0)}}},ynwM:function(H,Z,I){var N=I("MFOe"),g=N.Global;H.exports={name:"oldFF-globalStorage",read:k,write:v,each:m,remove:C,clearAll:_};var S=g.globalStorage;function k(e){return S[e]}function v(e,h){S[e]=h}function m(e){for(var h=S.length-1;h>=0;h--){var r=S.key(h);e(S[r],r)}}function C(e){return S.removeItem(e)}function _(){m(function(e,h){delete S[e]})}}}]);