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

193 lines
1.5 MiB

This file contains invisible Unicode characters!

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

(window.webpackJsonp=window.webpackJsonp||[]).push([[214,3,5,7,8,19],{"++UQ":function(Je,Ke,B){},"+NIl":function(Je,Ke,B){(function(ae){ae(B("VrN/"))})(function(ae){"use strict";ae.defineMode("stex",function(Q,U){"use strict";function w(c,s){c.cmdState.push(s)}function P(c){return c.cmdState.length>0?c.cmdState[c.cmdState.length-1]:null}function S(c){var s=c.cmdState.pop();s&&s.closeBracket()}function C(c){for(var s=c.cmdState,u=s.length-1;u>=0;u--){var i=s[u];if(i.name=="DEFAULT")continue;return i}return{styleIdentifier:function(){return null}}}function T(c,s,u){return function(){this.name=c,this.bracketNo=0,this.style=s,this.styles=u,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var h={};h.importmodule=T("importmodule","tag",["string","builtin"]),h.documentclass=T("documentclass","tag",["","atom"]),h.usepackage=T("usepackage","tag",["atom"]),h.begin=T("begin","tag",["atom"]),h.end=T("end","tag",["atom"]),h.label=T("label","tag",["atom"]),h.ref=T("ref","tag",["atom"]),h.eqref=T("eqref","tag",["atom"]),h.cite=T("cite","tag",["atom"]),h.bibitem=T("bibitem","tag",["atom"]),h.Bibitem=T("Bibitem","tag",["atom"]),h.RBibitem=T("RBibitem","tag",["atom"]),h.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function p(c,s){c.f=s}function f(c,s){var u;if(c.match(/^\\[a-zA-Z@]+/)){var i=c.current().slice(1);return u=h.hasOwnProperty(i)?h[i]:h.DEFAULT,u=new u,w(s,u),p(s,a),u.style}if(c.match(/^\\[$&%#{}_]/))return"tag";if(c.match(/^\\[,;!\/\\]/))return"tag";if(c.match("\\["))return p(s,function(t,d){return l(t,d,"\\]")}),"keyword";if(c.match("\\("))return p(s,function(t,d){return l(t,d,"\\)")}),"keyword";if(c.match("$$"))return p(s,function(t,d){return l(t,d,"$$")}),"keyword";if(c.match("$"))return p(s,function(t,d){return l(t,d,"$")}),"keyword";var n=c.next();if(n=="%")return c.skipToEnd(),"comment";if(n=="}"||n=="]"){if(u=P(s),u)u.closeBracket(n),p(s,a);else return"error";return"bracket"}else return n=="{"||n=="["?(u=h.DEFAULT,u=new u,w(s,u),"bracket"):/\d/.test(n)?(c.eatWhile(/[\w.%]/),"atom"):(c.eatWhile(/[\w\-_]/),u=C(s),u.name=="begin"&&(u.argument=c.current()),u.styleIdentifier())}function l(c,s,u){if(c.eatSpace())return null;if(u&&c.match(u))return p(s,f),"keyword";if(c.match(/^\\[a-zA-Z@]+/))return"tag";if(c.match(/^[a-zA-Z]+/))return"variable-2";if(c.match(/^\\[$&%#{}_]/))return"tag";if(c.match(/^\\[,;!\/]/))return"tag";if(c.match(/^[\^_&]/))return"tag";if(c.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(c.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var i=c.next();return i=="{"||i=="}"||i=="["||i=="]"||i=="("||i==")"?"bracket":i=="%"?(c.skipToEnd(),"comment"):"error"}function a(c,s){var u=c.peek(),i;return u=="{"||u=="["?(i=P(s),i.openBracket(u),c.eat(u),p(s,f),"bracket"):/[ \t\r]/.test(u)?(c.eat(u),null):(p(s,f),S(s),f(c,s))}return{startState:function(){var c=U.inMathMode?function(s,u){return l(s,u)}:f;return{cmdState:[],f:c}},copyState:function(c){return{cmdState:c.cmdState.slice(),f:c.f}},token:function(c,s){return s.f(c,s)},blankLine:function(c){c.f=f,c.cmdState.length=0},lineComment:"%"}}),ae.defineMIME("text/x-stex","stex"),ae.defineMIME("text/x-latex","stex")})},"+QRC":function(Je,Ke,B){"use strict";var ae=B("E9nw"),Q={"text/plain":"Text","text/html":"Url",default:"Text"},U="Copy to clipboard: #{key}, Enter";function w(S){var C=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return S.replace(/#{\s*key\s*}/g,C)}function P(S,C){var T,h,p,f,l,a,c=!1;C||(C={}),T=C.debug||!1;try{p=ae(),f=document.createRange(),l=document.getSelection(),a=document.createElement("span"),a.textContent=S,a.style.all="unset",a.style.position="fixed",a.style.top=0,a.style.clip="rect(0, 0, 0, 0)",a.style.whiteSpace="pre",a.style.webkitUserSelect="text",a.style.MozUserSelect="text",a.style.msUserSelect="text",a.style.userSelect="text",a.addEventListener("copy",function(u){if(u.stopPropagation(),C.format)if(u.preventDefault(),typeof u.clipboardData=="undefined"){T&&console.warn("unable to use e.clipboardData"),T&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var i=Q[C.format]||Q.default;window.clipboardData.setData(i,S)}else u.clipboardData.clearData(),u.clipboardData.setData(C.format,S);C.onCopy&&(u.preventDefault(),C.onCopy(u.clipboardData))}),document.body.appendChild(a),f.selectNodeContents(a),l.addRange(f);var s=document.execCommand("copy");if(!s)throw new Error("copy command was unsuccessful");c=!0}catch(u){T&&console.error("unable to copy using execCommand: ",u),T&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(C.format||"text",S),C.onCopy&&C.onCopy(window.clipboardData),c=!0}catch(i){T&&console.error("unable to copy using clipboardData: ",i),T&&console.error("falling back to prompt"),h=w("message"in C?C.message:U),window.prompt(h,S)}}finally{l&&(typeof l.removeRange=="function"?l.removeRange(f):l.removeAllRanges()),a&&document.body.removeChild(a),p()}return c}Je.exports=P},"+aKw":function(Je,Ke,B){"use strict";var ae=B("tJVT"),Q=B("cDcd"),U=B.n(Q),w=function(C){return String(C).length===1?"0".concat(C):C},P=function(C){var T=C.className,h=T===void 0?"":T,p=C.onChange,f=C.defaultValue,l=f===void 0?0:f,a=Object(Q.useState)(l),c=Object(ae.a)(a,2),s=c[0],u=c[1];Object(Q.useEffect)(function(){var d=setTimeout(function(){u(s+1e3)},1e3);return p(s+1e3),function(){clearInterval(d)}},[s]);var i=parseInt(s/(60*6e4))||"00",n=parseInt(s%(60*6e4)/6e4)||"00",t=parseInt(s%6e4/1e3)||"00";return U.a.createElement("div",{className:h},w(i),":",w(n),":",w(t))};Ke.a=P},"+ua5":function(Je,Ke,B){},"07cG":function(Je,Ke,B){Je.exports={ldsRing:"ldsRing___2F8W7",idsRingWrapper:"idsRingWrapper___fC2cF",ldsring:"ldsring___3A88y"}},"0r65":function(Je,Ke){var B=arguments[3],ae=arguments[4],Q=arguments[5],U=JSON.stringify;Je.exports=function(w,P){for(var S,C=Object.keys(Q),T=0,h=C.length;T<h;T++){var p=C[T],f=Q[p].exports;if(f===w||f&&f.default===w){S=p;break}}if(!S){S=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var l={},T=0,h=C.length;T<h;T++){var p=C[T];l[p]=p}ae[S]=["function(require,module,exports){"+w+"(self); }",l]}var a=Math.floor(Math.pow(16,8)*Math.random()).toString(16),c={};c[S]=S,ae[a]=["function(require,module,exports){var f = require("+U(S)+");(f.default ? f.default : f)(self);}",c];var s={};u(a);function u(b){s[b]=!0;for(var y in ae[b][1]){var _=ae[b][1][y];s[_]||u(_)}}var i="("+B+")({"+Object.keys(s).map(function(b){return U(b)+":["+ae[b][0]+","+U(ae[b][1])+"]"}).join(",")+"},{},["+U(a)+"])",n=window.URL||window.webkitURL||window.mozURL||window.msURL,t=new Blob([i],{type:"text/javascript"});if(P&&P.bare)return t;var d=n.createObjectURL(t),v=new Worker(d);return v.objectURL=d,v}},"19Vz":function(Je,Ke,B){(function(ae){ae(B("VrN/"))})(function(ae){ae.defineOption("placeholder","",function(T,h,p){var f=p&&p!=ae.Init;if(h&&!f)T.on("blur",P),T.on("change",S),T.on("swapDoc",S),ae.on(T.getInputField(),"compositionupdate",T.state.placeholderCompose=function(){w(T)}),S(T);else if(!h&&f){T.off("blur",P),T.off("change",S),T.off("swapDoc",S),ae.off(T.getInputField(),"compositionupdate",T.state.placeholderCompose),Q(T);var l=T.getWrapperElement();l.className=l.className.replace(" CodeMirror-empty","")}h&&!T.hasFocus()&&P(T)});function Q(T){T.state.placeholder&&(T.state.placeholder.parentNode.removeChild(T.state.placeholder),T.state.placeholder=null)}function U(T){Q(T);var h=T.state.placeholder=document.createElement("pre");h.style.cssText="height: 0; overflow: visible",h.style.direction=T.getOption("direction"),h.className="CodeMirror-placeholder CodeMirror-line-like";var p=T.getOption("placeholder");typeof p=="string"&&(p=document.createTextNode(p)),h.appendChild(p),T.display.lineSpace.insertBefore(h,T.display.lineSpace.firstChild)}function w(T){setTimeout(function(){var h=!1,p=T.getInputField();p.nodeName=="TEXTAREA"?h=!p.value:T.lineCount()==1&&(h=!/[^\u200b]/.test(p.querySelector(".CodeMirror-line").textContent)),h?U(T):Q(T)},20)}function P(T){C(T)&&U(T)}function S(T){var h=T.getWrapperElement(),p=C(T);h.className=h.className.replace(" CodeMirror-empty","")+(p?" CodeMirror-empty":""),p?U(T):Q(T)}function C(T){return T.lineCount()===1&&T.getLine(0)===""}})},"1FX+":function(Je,Ke,B){Je.exports={flex_box_center:"flex_box_center___t3HuD",flex_space_between:"flex_space_between___3eY6W",flex_box_vertical_center:"flex_box_vertical_center___SMD2f",flex_box_center_end:"flex_box_center_end___1qy96",flex_box_column:"flex_box_column___1iEso",wrap:"wrap___3Vyua",head:"head___HUi2n",sort:"sort___1UPxB",btn:"btn___2b6SJ",listWarp:"listWarp___1pNnP",pagination:"pagination___3I0F3",fixedRight:"fixedRight___527Xj","oj-width-input":"oj-width-input___QQMFK"}},"1eCo":function(Je,Ke,B){(function(ae){ae(B("VrN/"))})(function(ae){"use strict";var Q={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},U={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ae.defineMode("xml",function(w,P){var S=w.indentUnit,C={},T=P.htmlMode?Q:U;for(var h in T)C[h]=T[h];for(var h in P)C[h]=P[h];var p,f;function l(x,A){function O(F){return A.tokenize=F,F(x,A)}var D=x.next();if(D=="<")return x.eat("!")?x.eat("[")?x.match("CDATA[")?O(s("atom","]]>")):null:x.match("--")?O(s("comment","-->")):x.match("DOCTYPE",!0,!0)?(x.eatWhile(/[\w\._\-]/),O(u(1))):null:x.eat("?")?(x.eatWhile(/[\w\._\-]/),A.tokenize=s("meta","?>"),"meta"):(p=x.eat("/")?"closeTag":"openTag",A.tokenize=a,"tag bracket");if(D=="&"){var I;return x.eat("#")?x.eat("x")?I=x.eatWhile(/[a-fA-F\d]/)&&x.eat(";"):I=x.eatWhile(/[\d]/)&&x.eat(";"):I=x.eatWhile(/[\w\.\-:]/)&&x.eat(";"),I?"atom":"error"}else return x.eatWhile(/[^&<]/),null}l.isInText=!0;function a(x,A){var O=x.next();if(O==">"||O=="/"&&x.eat(">"))return A.tokenize=l,p=O==">"?"endTag":"selfcloseTag","tag bracket";if(O=="=")return p="equals",null;if(O=="<"){A.tokenize=l,A.state=d,A.tagName=A.tagStart=null;var D=A.tokenize(x,A);return D?D+" tag error":"tag error"}else return/[\'\"]/.test(O)?(A.tokenize=c(O),A.stringStartCol=x.column(),A.tokenize(x,A)):(x.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function c(x){var A=function(O,D){for(;!O.eol();)if(O.next()==x){D.tokenize=a;break}return"string"};return A.isInAttribute=!0,A}function s(x,A){return function(O,D){for(;!O.eol();){if(O.match(A)){D.tokenize=l;break}O.next()}return x}}function u(x){return function(A,O){for(var D;(D=A.next())!=null;){if(D=="<")return O.tokenize=u(x+1),O.tokenize(A,O);if(D==">")if(x==1){O.tokenize=l;break}else return O.tokenize=u(x-1),O.tokenize(A,O)}return"meta"}}function i(x,A,O){this.prev=x.context,this.tagName=A,this.indent=x.indented,this.startOfLine=O,(C.doNotIndent.hasOwnProperty(A)||x.context&&x.context.noIndent)&&(this.noIndent=!0)}function n(x){x.context&&(x.context=x.context.prev)}function t(x,A){for(var O;;){if(!x.context)return;if(O=x.context.tagName,!C.contextGrabbers.hasOwnProperty(O)||!C.contextGrabbers[O].hasOwnProperty(A))return;n(x)}}function d(x,A,O){return x=="openTag"?(O.tagStart=A.column(),v):x=="closeTag"?b:d}function v(x,A,O){return x=="word"?(O.tagName=A.current(),f="tag",m):C.allowMissingTagName&&x=="endTag"?(f="tag bracket",m(x,A,O)):(f="error",v)}function b(x,A,O){if(x=="word"){var D=A.current();return O.context&&O.context.tagName!=D&&C.implicitlyClosed.hasOwnProperty(O.context.tagName)&&n(O),O.context&&O.context.tagName==D||C.matchClosing===!1?(f="tag",y):(f="tag error",_)}else return C.allowMissingTagName&&x=="endTag"?(f="tag bracket",y(x,A,O)):(f="error",_)}function y(x,A,O){return x!="endTag"?(f="error",y):(n(O),d)}function _(x,A,O){return f="error",y(x,A,O)}function m(x,A,O){if(x=="word")return f="attribute",g;if(x=="endTag"||x=="selfcloseTag"){var D=O.tagName,I=O.tagStart;return O.tagName=O.tagStart=null,x=="selfcloseTag"||C.autoSelfClosers.hasOwnProperty(D)?t(O,D):(t(O,D),O.context=new i(O,D,I==O.indented)),d}return f="error",m}function g(x,A,O){return x=="equals"?E:(C.allowMissing||(f="error"),m(x,A,O))}function E(x,A,O){return x=="string"?o:x=="word"&&C.allowUnquoted?(f="string",m):(f="error",m(x,A,O))}function o(x,A,O){return x=="string"?o:m(x,A,O)}return{startState:function(x){var A={tokenize:l,state:d,indented:x||0,tagName:null,tagStart:null,context:null};return x!=null&&(A.baseIndent=x),A},token:function(x,A){if(!A.tagName&&x.sol()&&(A.indented=x.indentation()),x.eatSpace())return null;p=null;var O=A.tokenize(x,A);return(O||p)&&O!="comment"&&(f=null,A.state=A.state(p||O,x,A),f&&(O=f=="error"?O+" error":f)),O},indent:function(x,A,O){var D=x.context;if(x.tokenize.isInAttribute)return x.tagStart==x.indented?x.stringStartCol+1:x.indented+S;if(D&&D.noIndent)return ae.Pass;if(x.tokenize!=a&&x.tokenize!=l)return O?O.match(/^(\s*)/)[0].length:0;if(x.tagName)return C.multilineTagIndentPastTag!==!1?x.tagStart+x.tagName.length+2:x.tagStart+S*(C.multilineTagIndentFactor||1);if(C.alignCDATA&&/<!\[CDATA\[/.test(A))return 0;var I=A&&/^<(\/)?([\w_:\.-]*)/.exec(A);if(I&&I[1])for(;D;)if(D.tagName==I[2]){D=D.prev;break}else if(C.implicitlyClosed.hasOwnProperty(D.tagName))D=D.prev;else break;else if(I)for(;D;){var F=C.contextGrabbers[D.tagName];if(F&&F.hasOwnProperty(I[2]))D=D.prev;else break}for(;D&&D.prev&&!D.startOfLine;)D=D.prev;return D?D.indent+S:x.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:C.htmlMode?"html":"xml",helperType:C.htmlMode?"html":"xml",skipAttribute:function(x){x.state==E&&(x.state=m)},xmlCurrentTag:function(x){return x.tagName?{name:x.tagName,close:x.type=="closeTag"}:null},xmlCurrentContext:function(x){for(var A=[],O=x.context;O;O=O.prev)O.tagName&&A.push(O.tagName);return A.reverse()}}}),ae.defineMIME("text/xml","xml"),ae.defineMIME("application/xml","xml"),ae.mimeModes.hasOwnProperty("text/html")||ae.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1j5w":function(Je,Ke,B){"use strict";B.d(Ke,"d",function(){return $}),B.d(Ke,"b",function(){return Be}),B.d(Ke,"c",function(){return rt}),B.d(Ke,"a",function(){return xt});var ae=B("VTBJ"),Q=B("1OyB"),U=B("vuIU"),w=B("JX7q"),P=B("Ji7U"),S=B("LK+K"),C=B("cDcd"),T=B("I8Z2"),h=B("BGR+"),p=B("wx14"),f=B("rePB"),l=B("4IlW"),a=B("2GS6"),c=B("Gytx"),s=B.n(c),u=B("TSYQ"),i=B.n(u),n=B("U8pU"),t=B("ODXe"),d=/iPhone/i,v=/iPod/i,b=/iPad/i,y=/\bAndroid(?:.+)Mobile\b/i,_=/Android/i,m=/\bAndroid(?:.+)SD4930UR\b/i,g=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,E=/Windows Phone/i,o=/\bWindows(?:.+)ARM\b/i,x=/BlackBerry/i,A=/BB10/i,O=/Opera Mini/i,D=/\b(CriOS|Chrome)(?:.+)Mobile/i,I=/Mobile(?:.+)Firefox\b/i;function F(wt,st){return wt.test(st)}function z(wt){var st=wt||(typeof navigator!="undefined"?navigator.userAgent:""),ut=st.split("[FBAN");if(typeof ut[1]!="undefined"){var $e=ut,_e=Object(t.a)($e,1);st=_e[0]}if(ut=st.split("Twitter"),typeof ut[1]!="undefined"){var je=ut,ct=Object(t.a)(je,1);st=ct[0]}var et={apple:{phone:F(d,st)&&!F(E,st),ipod:F(v,st),tablet:!F(d,st)&&F(b,st)&&!F(E,st),device:(F(d,st)||F(v,st)||F(b,st))&&!F(E,st)},amazon:{phone:F(m,st),tablet:!F(m,st)&&F(g,st),device:F(m,st)||F(g,st)},android:{phone:!F(E,st)&&F(m,st)||!F(E,st)&&F(y,st),tablet:!F(E,st)&&!F(m,st)&&!F(y,st)&&(F(g,st)||F(_,st)),device:!F(E,st)&&(F(m,st)||F(g,st)||F(y,st)||F(_,st))||F(/\bokhttp\b/i,st)},windows:{phone:F(E,st),tablet:F(o,st),device:F(E,st)||F(o,st)},other:{blackberry:F(x,st),blackberry10:F(A,st),opera:F(O,st),firefox:F(I,st),chrome:F(D,st),device:F(x,st)||F(A,st)||F(O,st)||F(I,st)||F(D,st)},any:null,phone:null,tablet:null};return et.any=et.apple.device||et.android.device||et.windows.device||et.other.device,et.phone=et.apple.phone||et.android.phone||et.windows.phone,et.tablet=et.apple.tablet||et.android.tablet||et.windows.tablet,et}var ne=Object(ae.a)(Object(ae.a)({},z()),{},{isMobile:z}),j=ne;function G(){}function X(wt,st,ut){var $e=st||"";return wt.key||"".concat($e,"item_").concat(ut)}function Z(wt){return"".concat(wt,"-menu-")}function K(wt,st){var ut=-1;C.Children.forEach(wt,function($e){ut+=1,$e&&$e.type&&$e.type.isMenuItemGroup?C.Children.forEach($e.props.children,function(_e){ut+=1,st(_e,ut)}):st($e,ut)})}function q(wt,st,ut){if(!wt||ut.find)return;C.Children.forEach(wt,function($e){if($e){var _e=$e.type;if(!_e||!(_e.isSubMenu||_e.isMenuItem||_e.isMenuItemGroup))return;st.indexOf($e.key)!==-1?ut.find=!0:$e.props.children&&q($e.props.children,st,ut)}})}var ie=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],oe=function(st){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,$e=st&&typeof st.getBoundingClientRect=="function"&&st.getBoundingClientRect().width;if($e){if(ut){var _e=getComputedStyle(st),je=_e.marginLeft,ct=_e.marginRight;$e+=+je.replace("px","")+ +ct.replace("px","")}$e=+$e.toFixed(6)}return $e||0},ye=function(st,ut,$e){st&&Object(n.a)(st.style)==="object"&&(st.style[ut]=$e)},pe=function(){return j.any},we=B("KQm4"),fe=B("Ff2n"),Te=B("faye"),Fe=B("bdgK"),De=B("uciX"),Me=B("8XRh"),Ue={adjustX:1,adjustY:1},ve={topLeft:{points:["bl","tl"],overflow:Ue,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Ue,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Ue,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Ue,offset:[4,0]}},ce={topLeft:{points:["bl","tl"],overflow:Ue,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Ue,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Ue,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Ue,offset:[4,0]}},Ie=ve,Ne=0,Xe={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},ee=function(st,ut,$e){var _e=Z(ut),je=st.getState();st.setState({defaultActiveFirst:Object(ae.a)(Object(ae.a)({},je.defaultActiveFirst),{},Object(f.a)({},_e,$e))})},k=function(wt){Object(P.a)(ut,wt);var st=Object(S.a)(ut);function ut($e){var _e;Object(Q.a)(this,ut),_e=st.call(this,$e),_e.onDestroy=function(lt){_e.props.onDestroy(lt)},_e.onKeyDown=function(lt){var gt=lt.keyCode,kt=_e.menuInstance,zt=_e.props,$t=zt.isOpen,Se=zt.store;if(gt===l.a.ENTER)return _e.onTitleClick(lt),ee(Se,_e.props.eventKey,!0),!0;if(gt===l.a.RIGHT)return $t?kt.onKeyDown(lt):(_e.triggerOpenChange(!0),ee(Se,_e.props.eventKey,!0)),!0;if(gt===l.a.LEFT){var de;if($t)de=kt.onKeyDown(lt);else return;return de||(_e.triggerOpenChange(!1),de=!0),de}return $t&&(gt===l.a.UP||gt===l.a.DOWN)?kt.onKeyDown(lt):void 0},_e.onOpenChange=function(lt){_e.props.onOpenChange(lt)},_e.onPopupVisibleChange=function(lt){_e.triggerOpenChange(lt,lt?"mouseenter":"mouseleave")},_e.onMouseEnter=function(lt){var gt=_e.props,kt=gt.eventKey,zt=gt.onMouseEnter,$t=gt.store;ee($t,_e.props.eventKey,!1),zt({key:kt,domEvent:lt})},_e.onMouseLeave=function(lt){var gt=_e.props,kt=gt.parentMenu,zt=gt.eventKey,$t=gt.onMouseLeave;kt.subMenuInstance=Object(w.a)(_e),$t({key:zt,domEvent:lt})},_e.onTitleMouseEnter=function(lt){var gt=_e.props,kt=gt.eventKey,zt=gt.onItemHover,$t=gt.onTitleMouseEnter;zt({key:kt,hover:!0}),$t({key:kt,domEvent:lt})},_e.onTitleMouseLeave=function(lt){var gt=_e.props,kt=gt.parentMenu,zt=gt.eventKey,$t=gt.onItemHover,Se=gt.onTitleMouseLeave;kt.subMenuInstance=Object(w.a)(_e),$t({key:zt,hover:!1}),Se({key:zt,domEvent:lt})},_e.onTitleClick=function(lt){var gt=Object(w.a)(_e),kt=gt.props;if(kt.onTitleClick({key:kt.eventKey,domEvent:lt}),kt.triggerSubMenuAction==="hover")return;_e.triggerOpenChange(!kt.isOpen,"click"),ee(kt.store,_e.props.eventKey,!1)},_e.onSubMenuClick=function(lt){typeof _e.props.onClick=="function"&&_e.props.onClick(_e.addKeyPath(lt))},_e.onSelect=function(lt){_e.props.onSelect(lt)},_e.onDeselect=function(lt){_e.props.onDeselect(lt)},_e.getPrefixCls=function(){return"".concat(_e.props.rootPrefixCls,"-submenu")},_e.getActiveClassName=function(){return"".concat(_e.getPrefixCls(),"-active")},_e.getDisabledClassName=function(){return"".concat(_e.getPrefixCls(),"-disabled")},_e.getSelectedClassName=function(){return"".concat(_e.getPrefixCls(),"-selected")},_e.getOpenClassName=function(){return"".concat(_e.props.rootPrefixCls,"-submenu-open")},_e.saveMenuInstance=function(lt){_e.menuInstance=lt},_e.addKeyPath=function(lt){return Object(ae.a)(Object(ae.a)({},lt),{},{keyPath:(lt.keyPath||[]).concat(_e.props.eventKey)})},_e.triggerOpenChange=function(lt,gt){var kt=_e.props.eventKey,zt=function(){_e.onOpenChange({key:kt,item:Object(w.a)(_e),trigger:gt,open:lt})};gt==="mouseenter"?_e.mouseenterTimeout=setTimeout(function(){zt()},0):zt()},_e.isChildrenSelected=function(){var lt={find:!1};return q(_e.props.children,_e.props.selectedKeys,lt),lt.find},_e.isOpen=function(){return _e.props.openKeys.indexOf(_e.props.eventKey)!==-1},_e.adjustWidth=function(){if(!_e.subMenuTitle||!_e.menuInstance)return;var lt=Te.findDOMNode(_e.menuInstance);if(lt.offsetWidth>=_e.subMenuTitle.offsetWidth)return;lt.style.minWidth="".concat(_e.subMenuTitle.offsetWidth,"px")},_e.saveSubMenuTitle=function(lt){_e.subMenuTitle=lt},_e.getBaseProps=function(){var lt=Object(w.a)(_e),gt=lt.props;return{mode:gt.mode==="horizontal"?"vertical":gt.mode,visible:_e.props.isOpen,level:gt.level+1,inlineIndent:gt.inlineIndent,focusable:!1,onClick:_e.onSubMenuClick,onSelect:_e.onSelect,onDeselect:_e.onDeselect,onDestroy:_e.onDestroy,selectedKeys:gt.selectedKeys,eventKey:"".concat(gt.eventKey,"-menu-"),openKeys:gt.openKeys,motion:gt.motion,onOpenChange:_e.onOpenChange,subMenuOpenDelay:gt.subMenuOpenDelay,parentMenu:Object(w.a)(_e),subMenuCloseDelay:gt.subMenuCloseDelay,forceSubMenuRender:gt.forceSubMenuRender,triggerSubMenuAction:gt.triggerSubMenuAction,builtinPlacements:gt.builtinPlacements,defaultActiveFirst:gt.store.getState().defaultActiveFirst[Z(gt.eventKey)],multiple:gt.multiple,prefixCls:gt.rootPrefixCls,id:_e.internalMenuId,manualRef:_e.saveMenuInstance,itemIcon:gt.itemIcon,expandIcon:gt.expandIcon,direction:gt.direction}},_e.getMotion=function(lt,gt){var kt=Object(w.a)(_e),zt=kt.haveRendered,$t=_e.props,Se=$t.motion,de=$t.rootPrefixCls,W=Object(ae.a)(Object(ae.a)({},Se),{},{leavedClassName:"".concat(de,"-hidden"),removeOnLeave:!1,motionAppear:zt||!gt||lt!=="inline"});return W};var je=$e.store,ct=$e.eventKey,et=je.getState(),At=et.defaultActiveFirst;_e.isRootMenu=!1;var Ct=!1;return At&&(Ct=At[ct]),ee(je,ct,Ct),_e}return Object(U.a)(ut,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var _e=this,je=this.props,ct=je.mode,et=je.parentMenu,At=je.manualRef;if(At&&At(this),ct!=="horizontal"||!et.isRootMenu||!this.props.isOpen)return;this.minWidthTimeout=setTimeout(function(){return _e.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var _e=this.props,je=_e.onDestroy,ct=_e.eventKey;je&&je(ct),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(_e){var je=this,ct=this.getBaseProps(),et=this.getMotion(ct.mode,ct.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||ct.visible||ct.forceSubMenuRender,!this.haveOpened)return C.createElement("div",null);var At=ct.direction;return C.createElement(Me.default,Object.assign({visible:ct.visible},et),function(Ct){var lt=Ct.className,gt=Ct.style,kt=i()("".concat(ct.prefixCls,"-sub"),lt,Object(f.a)({},"".concat(ct.prefixCls,"-rtl"),At==="rtl"));return C.createElement(Pe,Object.assign({},ct,{id:je.internalMenuId,className:kt,style:gt}),_e)})}},{key:"render",value:function(){var _e,je=Object(ae.a)({},this.props),ct=je.isOpen,et=this.getPrefixCls(),At=je.mode==="inline",Ct=i()(et,"".concat(et,"-").concat(je.mode),(_e={},Object(f.a)(_e,je.className,!!je.className),Object(f.a)(_e,this.getOpenClassName(),ct),Object(f.a)(_e,this.getActiveClassName(),je.active||ct&&!At),Object(f.a)(_e,this.getDisabledClassName(),je.disabled),Object(f.a)(_e,this.getSelectedClassName(),this.isChildrenSelected()),_e));this.internalMenuId||(je.eventKey?this.internalMenuId="".concat(je.eventKey,"$Menu"):(Ne+=1,this.internalMenuId="$__$".concat(Ne,"$Menu")));var lt={},gt={},kt={};je.disabled||(lt={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},gt={onClick:this.onTitleClick},kt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var zt={},$t=je.direction;At&&($t==="rtl"?zt.paddingRight=je.inlineIndent*je.level:zt.paddingLeft=je.inlineIndent*je.level);var Se={};this.props.isOpen&&(Se={"aria-owns":this.internalMenuId});var de=null;je.mode!=="horizontal"&&(de=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(de=C.createElement(this.props.expandIcon,Object(ae.a)({},this.props))));var W=C.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:zt,className:"".concat(et,"-title"),role:"button"},kt,gt,{"aria-expanded":ct},Se,{"aria-haspopup":"true",title:typeof je.title=="string"?je.title:void 0}),je.title,de||C.createElement("i",{className:"".concat(et,"-arrow")})),J=this.renderChildren(je.children),te=je.parentMenu.isRootMenu?je.parentMenu.props.getPopupContainer:function(nn){return nn.parentNode},se=Xe[je.mode],Ee=je.popupOffset?{offset:je.popupOffset}:{},ze=je.mode==="inline"?"":je.popupClassName;ze+=$t==="rtl"?" ".concat(et,"-rtl"):"";var qe=je.disabled,St=je.triggerSubMenuAction,Lt=je.subMenuOpenDelay,it=je.forceSubMenuRender,Tt=je.subMenuCloseDelay,Qt=je.builtinPlacements;ie.forEach(function(nn){return delete je[nn]}),delete je.onClick;var Et=$t==="rtl"?Object.assign({},ce,Qt):Object.assign({},ve,Qt);return delete je.direction,C.createElement("li",Object.assign({},je,lt,{className:Ct,role:"menuitem"}),At&&W,At&&J,!At&&C.createElement(De.a,{prefixCls:et,popupClassName:i()("".concat(et,"-popup"),ze),getPopupContainer:te,builtinPlacements:Et,popupPlacement:se,popupVisible:ct,popupAlign:Ee,popup:J,action:qe?[]:[St],mouseEnterDelay:Lt,mouseLeaveDelay:Tt,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:it},W))}}]),ut}(C.Component);k.defaultProps={onMouseEnter:G,onMouseLeave:G,onTitleMouseEnter:G,onTitleMouseLeave:G,onTitleClick:G,manualRef:G,mode:"vertical",title:""};var N=Object(T.b)(function(wt,st){var ut=wt.openKeys,$e=wt.activeKey,_e=wt.selectedKeys,je=st.eventKey,ct=st.subMenuKey;return{isOpen:ut.indexOf(je)>-1,active:$e[ct]===je,selectedKeys:_e}})(k);N.isSubMenu=!0;var $=N,V="menuitem-overflowed",Y=.5,me=function(wt){Object(P.a)(ut,wt);var st=Object(S.a)(ut);function ut(){var $e;return Object(Q.a)(this,ut),$e=st.apply(this,arguments),$e.resizeObserver=null,$e.mutationObserver=null,$e.originalTotalWidth=0,$e.overflowedItems=[],$e.menuItemSizes=[],$e.cancelFrameId=null,$e.state={lastVisibleIndex:void 0},$e.getMenuItemNodes=function(){var _e=$e.props.prefixCls,je=Te.findDOMNode(Object(w.a)($e));return je?[].slice.call(je.children).filter(function(ct){return ct.className.split(" ").indexOf("".concat(_e,"-overflowed-submenu"))<0}):[]},$e.getOverflowedSubMenuItem=function(_e,je,ct){var et=$e.props,At=et.overflowedIndicator,Ct=et.level,lt=et.mode,gt=et.prefixCls,kt=et.theme;if(Ct!==1||lt!=="horizontal")return null;var zt=$e.props.children[0],$t=zt.props,Se=$t.children,de=$t.title,W=$t.style,J=Object(fe.a)($t,["children","title","style"]),te=Object(ae.a)({},W),se="".concat(_e,"-overflowed-indicator"),Ee="".concat(_e,"-overflowed-indicator");je.length===0&&ct!==!0?te=Object(ae.a)(Object(ae.a)({},te),{},{display:"none"}):ct&&(te=Object(ae.a)(Object(ae.a)({},te),{},{visibility:"hidden",position:"absolute"}),se="".concat(se,"-placeholder"),Ee="".concat(Ee,"-placeholder"));var ze=kt?"".concat(gt,"-").concat(kt):"",qe={};return ie.forEach(function(St){J[St]!==void 0&&(qe[St]=J[St])}),C.createElement($,Object.assign({title:At,className:"".concat(gt,"-overflowed-submenu"),popupClassName:ze},qe,{key:se,eventKey:Ee,disabled:!1,style:te}),je)},$e.setChildrenWidthAndResize=function(){if($e.props.mode!=="horizontal")return;var _e=Te.findDOMNode(Object(w.a)($e));if(!_e)return;var je=_e.children;if(!je||je.length===0)return;var ct=_e.children[je.length-1];ye(ct,"display","inline-block");var et=$e.getMenuItemNodes(),At=et.filter(function(Ct){return Ct.className.split(" ").indexOf(V)>=0});At.forEach(function(Ct){ye(Ct,"display","inline-block")}),$e.menuItemSizes=et.map(function(Ct){return oe(Ct,!0)}),At.forEach(function(Ct){ye(Ct,"display","none")}),$e.overflowedIndicatorWidth=oe(_e.children[_e.children.length-1],!0),$e.originalTotalWidth=$e.menuItemSizes.reduce(function(Ct,lt){return Ct+lt},0),$e.handleResize(),ye(ct,"display","none")},$e.handleResize=function(){if($e.props.mode!=="horizontal")return;var _e=Te.findDOMNode(Object(w.a)($e));if(!_e)return;var je=oe(_e);$e.overflowedItems=[];var ct=0,et;$e.originalTotalWidth>je+Y&&(et=-1,$e.menuItemSizes.forEach(function(At){ct+=At,ct+$e.overflowedIndicatorWidth<=je&&(et+=1)})),$e.setState({lastVisibleIndex:et})},$e}return Object(U.a)(ut,[{key:"componentDidMount",value:function(){var _e=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var je=Te.findDOMNode(this);if(!je)return;this.resizeObserver=new Fe.default(function(ct){ct.forEach(function(){var et=_e.cancelFrameId;cancelAnimationFrame(et),_e.cancelFrameId=requestAnimationFrame(_e.setChildrenWidthAndResize)})}),[].slice.call(je.children).concat(je).forEach(function(ct){_e.resizeObserver.observe(ct)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){_e.resizeObserver.disconnect(),[].slice.call(je.children).concat(je).forEach(function(ct){_e.resizeObserver.observe(ct)}),_e.setChildrenWidthAndResize()}),this.mutationObserver.observe(je,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(_e){var je=this,ct=this.state.lastVisibleIndex;return(_e||[]).reduce(function(et,At,Ct){var lt=At;if(je.props.mode==="horizontal"){var gt=je.getOverflowedSubMenuItem(At.props.eventKey,[]);ct!==void 0&&je.props.className.indexOf("".concat(je.props.prefixCls,"-root"))!==-1&&(Ct>ct&&(lt=C.cloneElement(At,{style:{display:"none"},eventKey:"".concat(At.props.eventKey,"-hidden"),className:"".concat(V)})),Ct===ct+1&&(je.overflowedItems=_e.slice(ct+1).map(function(zt){return C.cloneElement(zt,{key:zt.props.eventKey,mode:"vertical-left"})}),gt=je.getOverflowedSubMenuItem(At.props.eventKey,je.overflowedItems)));var kt=[].concat(Object(we.a)(et),[gt,lt]);return Ct===_e.length-1&&kt.push(je.getOverflowedSubMenuItem(At.props.eventKey,[],!0)),kt}return[].concat(Object(we.a)(et),[lt])},[])}},{key:"render",value:function(){var _e=this.props,je=_e.visible,ct=_e.prefixCls,et=_e.overflowedIndicator,At=_e.mode,Ct=_e.level,lt=_e.tag,gt=_e.children,kt=_e.theme,zt=Object(fe.a)(_e,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),$t=lt;return C.createElement($t,Object.assign({},zt),this.renderChildren(gt))}}]),ut}(C.Component);me.defaultProps={tag:"div",className:""};var Ae=me;function at(wt){return wt.length?wt.every(function(st){return!!st.props.disabled}):!0}function Le(wt,st,ut){var $e=wt.getState();wt.setState({activeKey:Object(ae.a)(Object(ae.a)({},$e.activeKey),{},Object(f.a)({},st,ut))})}function ke(wt){return wt.eventKey||"0-menu-"}function Ye(wt,st){var ut=st,$e=wt.children,_e=wt.eventKey;if(ut){var je;if(K($e,function(ct,et){ct&&ct.props&&!ct.props.disabled&&ut===X(ct,_e,et)&&(je=!0)}),je)return ut}return ut=null,wt.defaultActiveFirst&&K($e,function(ct,et){!ut&&ct&&!ct.props.disabled&&(ut=X(ct,_e,et))}),ut}function Ze(wt){if(wt){var st=this.instanceArray.indexOf(wt);st!==-1?this.instanceArray[st]=wt:this.instanceArray.push(wt)}}var Ve=function(wt){Object(P.a)(ut,wt);var st=Object(S.a)(ut);function ut($e){var _e;return Object(Q.a)(this,ut),_e=st.call(this,$e),_e.onKeyDown=function(je,ct){var et=je.keyCode,At;if(_e.getFlatInstanceArray().forEach(function(lt){lt&&lt.props.active&&lt.onKeyDown&&(At=lt.onKeyDown(je))}),At)return 1;var Ct=null;return(et===l.a.UP||et===l.a.DOWN)&&(Ct=_e.step(et===l.a.UP?-1:1)),Ct?(je.preventDefault(),Le(_e.props.store,ke(_e.props),Ct.props.eventKey),typeof ct=="function"&&ct(Ct),1):void 0},_e.onItemHover=function(je){var ct=je.key,et=je.hover;Le(_e.props.store,ke(_e.props),et?ct:null)},_e.onDeselect=function(je){_e.props.onDeselect(je)},_e.onSelect=function(je){_e.props.onSelect(je)},_e.onClick=function(je){_e.props.onClick(je)},_e.onOpenChange=function(je){_e.props.onOpenChange(je)},_e.onDestroy=function(je){_e.props.onDestroy(je)},_e.getFlatInstanceArray=function(){return _e.instanceArray},_e.step=function(je){var ct=_e.getFlatInstanceArray(),et=_e.props.store.getState().activeKey[ke(_e.props)],At=ct.length;if(!At)return null;je<0&&(ct=ct.concat().reverse());var Ct=-1;if(ct.every(function(zt,$t){return zt&&zt.props.eventKey===et?(Ct=$t,!1):!0}),!_e.props.defaultActiveFirst&&Ct!==-1&&at(ct.slice(Ct,At-1)))return;var lt=(Ct+1)%At,gt=lt;do{var kt=ct[gt];if(!kt||kt.props.disabled)gt=(gt+1)%At;else return kt}while(gt!==lt);return null},_e.renderCommonMenuItem=function(je,ct,et){var At=_e.props.store.getState(),Ct=Object(w.a)(_e),lt=Ct.props,gt=X(je,lt.eventKey,ct),kt=je.props;if(!kt||typeof je.type=="string")return je;var zt=gt===At.activeKey,$t=Object(ae.a)(Object(ae.a)({mode:kt.mode||lt.mode,level:lt.level,inlineIndent:lt.inlineIndent,renderMenuItem:_e.renderMenuItem,rootPrefixCls:lt.prefixCls,index:ct,parentMenu:lt.parentMenu,manualRef:kt.disabled?void 0:Object(a.a)(je.ref,Ze.bind(Object(w.a)(_e))),eventKey:gt,active:!kt.disabled&&zt,multiple:lt.multiple,onClick:function(de){(kt.onClick||G)(de),_e.onClick(de)},onItemHover:_e.onItemHover,motion:lt.motion,subMenuOpenDelay:lt.subMenuOpenDelay,subMenuCloseDelay:lt.subMenuCloseDelay,forceSubMenuRender:lt.forceSubMenuRender,onOpenChange:_e.onOpenChange,onDeselect:_e.onDeselect,onSelect:_e.onSelect,builtinPlacements:lt.builtinPlacements,itemIcon:kt.itemIcon||_e.props.itemIcon,expandIcon:kt.expandIcon||_e.props.expandIcon},et),{},{direction:lt.direction});return(lt.mode==="inline"||pe())&&($t.triggerSubMenuAction="click"),C.cloneElement(je,$t)},_e.renderMenuItem=function(je,ct,et){if(!je)return null;var At=_e.props.store.getState(),Ct={openKeys:At.openKeys,selectedKeys:At.selectedKeys,triggerSubMenuAction:_e.props.triggerSubMenuAction,subMenuKey:et};return _e.renderCommonMenuItem(je,ct,Ct)},$e.store.setState({activeKey:Object(ae.a)(Object(ae.a)({},$e.store.getState().activeKey),{},Object(f.a)({},$e.eventKey,Ye($e,$e.activeKey)))}),_e.instanceArray=[],_e}return Object(U.a)(ut,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(_e){return this.props.visible||_e.visible||this.props.className!==_e.className||!s()(this.props.style,_e.style)}},{key:"componentDidUpdate",value:function(_e){var je=this.props,ct="activeKey"in je?je.activeKey:je.store.getState().activeKey[ke(je)],et=Ye(je,ct);if(et!==ct)Le(je.store,ke(je),et);else if("activeKey"in _e){var At=Ye(_e,_e.activeKey);et!==At&&Le(je.store,ke(je),et)}}},{key:"render",value:function(){var _e=this,je=Object(p.a)({},this.props);this.instanceArray=[];var ct=i()(je.prefixCls,je.className,"".concat(je.prefixCls,"-").concat(je.mode)),et={className:ct,role:je.role||"menu"};je.id&&(et.id=je.id),je.focusable&&(et.tabIndex=0,et.onKeyDown=this.onKeyDown);var At=je.prefixCls,Ct=je.eventKey,lt=je.visible,gt=je.level,kt=je.mode,zt=je.overflowedIndicator,$t=je.theme;return ie.forEach(function(Se){return delete je[Se]}),delete je.onClick,C.createElement(Ae,Object.assign({},je,{prefixCls:At,mode:kt,tag:"ul",level:gt,theme:$t,visible:lt,overflowedIndicator:zt},et),C.Children.map(je.children,function(Se,de){return _e.renderMenuItem(Se,de,Ct||"0-menu-")}))}}]),ut}(C.Component);Ve.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:G};var He=Object(T.b)()(Ve),Pe=He,Re=B("Kwbf");function Oe(wt,st,ut){var $e=wt.prefixCls,_e=wt.motion,je=wt.defaultMotions,ct=je===void 0?{}:je,et=wt.openAnimation,At=wt.openTransitionName,Ct=st.switchingModeFromInline;if(_e)return _e;if(Object(n.a)(et)==="object"&&et)Object(Re.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof et=="string")return{motionName:"".concat($e,"-open-").concat(et)};if(At)return{motionName:At};var lt=ct[ut];return lt||(Ct?null:ct.other)}var he=function(wt){Object(P.a)(ut,wt);var st=Object(S.a)(ut);function ut($e){var _e;Object(Q.a)(this,ut),_e=st.call(this,$e),_e.inlineOpenKeys=[],_e.onSelect=function(et){var At=Object(w.a)(_e),Ct=At.props;if(Ct.selectable){var lt=_e.store.getState(),gt=lt.selectedKeys,kt=et.key;Ct.multiple?gt=gt.concat([kt]):gt=[kt],"selectedKeys"in Ct||_e.store.setState({selectedKeys:gt}),Ct.onSelect(Object(ae.a)(Object(ae.a)({},et),{},{selectedKeys:gt}))}},_e.onClick=function(et){var At=_e.getRealMenuMode(),Ct=Object(w.a)(_e),lt=Ct.store,gt=Ct.props.onOpenChange;At!=="inline"&&!("openKeys"in _e.props)&&(lt.setState({openKeys:[]}),gt([])),_e.props.onClick(et)},_e.onKeyDown=function(et,At){_e.innerMenu.getWrappedInstance().onKeyDown(et,At)},_e.onOpenChange=function(et){var At=Object(w.a)(_e),Ct=At.props,lt=_e.store.getState().openKeys.concat(),gt=!1,kt=function($t){var Se=!1;if($t.open)Se=lt.indexOf($t.key)===-1,Se&&lt.push($t.key);else{var de=lt.indexOf($t.key);Se=de!==-1,Se&&lt.splice(de,1)}gt=gt||Se};Array.isArray(et)?et.forEach(kt):kt(et),gt&&("openKeys"in _e.props||_e.store.setState({openKeys:lt}),Ct.onOpenChange(lt))},_e.onDeselect=function(et){var At=Object(w.a)(_e),Ct=At.props;if(Ct.selectable){var lt=_e.store.getState().selectedKeys.concat(),gt=et.key,kt=lt.indexOf(gt);kt!==-1&&lt.splice(kt,1),"selectedKeys"in Ct||_e.store.setState({selectedKeys:lt}),Ct.onDeselect(Object(ae.a)(Object(ae.a)({},et),{},{selectedKeys:lt}))}},_e.onMouseEnter=function(et){_e.restoreModeVerticalFromInline();var At=_e.props.onMouseEnter;At&&At(et)},_e.onTransitionEnd=function(et){var At=et.propertyName==="width"&&et.target===et.currentTarget,Ct=et.target.className,lt=Object.prototype.toString.call(Ct)==="[object SVGAnimatedString]"?Ct.animVal:Ct,gt=et.propertyName==="font-size"&&lt.indexOf("anticon")>=0;(At||gt)&&_e.restoreModeVerticalFromInline()},_e.setInnerMenu=function(et){_e.innerMenu=et},_e.isRootMenu=!0;var je=$e.defaultSelectedKeys,ct=$e.defaultOpenKeys;return"selectedKeys"in $e&&(je=$e.selectedKeys||[]),"openKeys"in $e&&(ct=$e.openKeys||[]),_e.store=Object(T.c)({selectedKeys:je,openKeys:ct,activeKey:{"0-menu-":Ye($e,$e.activeKey)}}),_e.state={switchingModeFromInline:!1},_e}return Object(U.a)(ut,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(_e){this.updateOpentKeysWhenSwitchMode(_e),this.updateMiniStore();var je=this.props,ct=je.siderCollapsed,et=je.inlineCollapsed,At=je.onOpenChange;(!_e.inlineCollapsed&&et||!_e.siderCollapsed&&ct)&&At([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(_e){var je=this.props,ct=this.store,et=this.inlineOpenKeys,At=ct.getState(),Ct={};_e.mode==="inline"&&je.mode!=="inline"&&this.setState({switchingModeFromInline:!0}),"openKeys"in je||((je.inlineCollapsed&&!_e.inlineCollapsed||je.siderCollapsed&&!_e.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=At.openKeys.concat(),Ct.openKeys=[]),(!je.inlineCollapsed&&_e.inlineCollapsed||!je.siderCollapsed&&_e.siderCollapsed)&&(Ct.openKeys=et,this.inlineOpenKeys=[])),Object.keys(Ct).length&&ct.setState(Ct)}},{key:"updateMenuDisplay",value:function(){var _e=this.props.collapsedWidth,je=this.store,ct=this.prevOpenKeys,et=this.getInlineCollapsed()&&(_e===0||_e==="0"||_e==="0px");et?(this.prevOpenKeys=je.getState().openKeys.concat(),this.store.setState({openKeys:[]})):ct&&(this.store.setState({openKeys:ct}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var _e=this.props.mode,je=this.state.switchingModeFromInline,ct=this.getInlineCollapsed();return je&&ct?"inline":ct?"vertical":_e}},{key:"getInlineCollapsed",value:function(){var _e=this.props,je=_e.inlineCollapsed,ct=_e.siderCollapsed;return ct!==void 0?ct:je}},{key:"restoreModeVerticalFromInline",value:function(){var _e=this.state.switchingModeFromInline;_e&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var _e=Object(ae.a)({},Object(h.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),je=this.getRealMenuMode();return _e.className+=" ".concat(_e.prefixCls,"-root"),_e.direction==="rtl"&&(_e.className+=" ".concat(_e.prefixCls,"-rtl")),_e=Object(ae.a)(Object(ae.a)({},_e),{},{mode:je,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Oe(this.props,this.state,je)}),delete _e.openAnimation,delete _e.openTransitionName,C.createElement(T.a,{store:this.store},C.createElement(Pe,Object.assign({},_e,{ref:this.setInnerMenu}),this.props.children))}}]),ut}(C.Component);he.defaultProps={selectable:!0,onClick:G,onSelect:G,onOpenChange:G,onDeselect:G,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:C.createElement("span",null,"\xB7\xB7\xB7")};var be=he,Ce=function(wt){Object(P.a)(ut,wt);var st=Object(S.a)(ut);function ut(){var $e;return Object(Q.a)(this,ut),$e=st.apply(this,arguments),$e.onKeyDown=function(_e){var je=_e.keyCode;return je===l.a.ENTER?($e.onClick(_e),!0):void 0},$e.onMouseLeave=function(_e){var je=$e.props,ct=je.eventKey,et=je.onItemHover,At=je.onMouseLeave;et({key:ct,hover:!1}),At({key:ct,domEvent:_e})},$e.onMouseEnter=function(_e){var je=$e.props,ct=je.eventKey,et=je.onItemHover,At=je.onMouseEnter;et({key:ct,hover:!0}),At({key:ct,domEvent:_e})},$e.onClick=function(_e){var je=$e.props,ct=je.eventKey,et=je.multiple,At=je.onClick,Ct=je.onSelect,lt=je.onDeselect,gt=je.isSelected,kt={key:ct,keyPath:[ct],item:Object(w.a)($e),domEvent:_e};At(kt),et?gt?lt(kt):Ct(kt):gt||Ct(kt)},$e.saveNode=function(_e){$e.node=_e},$e}return Object(U.a)(ut,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var _e=this.props;_e.onDestroy&&_e.onDestroy(_e.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var _e,je=Object(ae.a)({},this.props),ct=i()(this.getPrefixCls(),je.className,(_e={},Object(f.a)(_e,this.getActiveClassName(),!je.disabled&&je.active),Object(f.a)(_e,this.getSelectedClassName(),je.isSelected),Object(f.a)(_e,this.getDisabledClassName(),je.disabled),_e)),et=Object(ae.a)(Object(ae.a)({},je.attribute),{},{title:typeof je.title=="string"?je.title:void 0,className:ct,role:je.role||"menuitem","aria-disabled":je.disabled});je.role==="option"?et=Object(ae.a)(Object(ae.a)({},et),{},{role:"option","aria-selected":je.isSelected}):(je.role===null||je.role==="none")&&(et.role="none");var At={onClick:je.disabled?null:this.onClick,onMouseLeave:je.disabled?null:this.onMouseLeave,onMouseEnter:je.disabled?null:this.onMouseEnter},Ct=Object(ae.a)({},je.style);je.mode==="inline"&&(je.direction==="rtl"?Ct.paddingRight=je.inlineIndent*je.level:Ct.paddingLeft=je.inlineIndent*je.level),ie.forEach(function(gt){return delete je[gt]}),delete je.direction;var lt=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(lt=C.createElement(this.props.itemIcon,this.props)),C.createElement("li",Object.assign({},Object(h.default)(je,["onClick","onMouseEnter","onMouseLeave","onSelect"]),et,At,{style:Ct,ref:this.saveNode}),je.children,lt)}}]),ut}(C.Component);Ce.isMenuItem=!0,Ce.defaultProps={onSelect:G,onMouseEnter:G,onMouseLeave:G,manualRef:G};var xe=Object(T.b)(function(wt,st){var ut=wt.activeKey,$e=wt.selectedKeys,_e=st.eventKey,je=st.subMenuKey;return{active:ut[je]===_e,isSelected:$e.indexOf(_e)!==-1}})(Ce),Be=xe,Qe=function(wt){Object(P.a)(ut,wt);var st=Object(S.a)(ut);function ut(){var $e;return Object(Q.a)(this,ut),$e=st.apply(this,arguments),$e.renderInnerMenuItem=function(_e){var je=$e.props,ct=je.renderMenuItem,et=je.index;return ct(_e,et,$e.props.subMenuKey)},$e}return Object(U.a)(ut,[{key:"render",value:function(){var _e=Object(p.a)({},this.props),je=_e.className,ct=je===void 0?"":je,et=_e.rootPrefixCls,At="".concat(et,"-item-group-title"),Ct="".concat(et,"-item-group-list"),lt=_e.title,gt=_e.children;return ie.forEach(function(kt){return delete _e[kt]}),delete _e.onClick,delete _e.direction,C.createElement("li",Object.assign({},_e,{className:"".concat(ct," ").concat(et,"-item-group")}),C.createElement("div",{className:At,title:typeof lt=="string"?lt:void 0},lt),C.createElement("ul",{className:Ct},C.Children.map(gt,this.renderInnerMenuItem)))}}]),ut}(C.Component);Qe.isMenuItemGroup=!0,Qe.defaultProps={disabled:!0};var rt=Qe,dt=function(st){var ut=st.className,$e=st.rootPrefixCls,_e=st.style;return C.createElement("li",{className:"".concat(ut," ").concat($e,"-item-divider"),style:_e})};dt.defaultProps={disabled:!0,className:"",style:{}};var xt=dt,_t=Ke.e=be},"3tLw":function(Je,Ke,B){Je.exports=B.p+"static/a.39070d50.svg"},"4xil":function(Je,Ke,B){Je.exports={watermark:"watermark___2DVjg",videovideo:"videovideo___3jScv",animate__loop:"animate__loop___36IZ1",upDown:"upDown___3FGkz",container:"container___GV_Ds","video-container":"video-container___35tqx","video-controls":"video-controls___u99fM",hide:"hide___2GDit","video-progress":"video-progress___2LKQJ",seek:"seek___3b-US","seek-tooltip":"seek-tooltip___bZ9sZ","bottom-controls":"bottom-controls___74sQw","left-controls":"left-controls___2kBb3","right-controls":"right-controls___3oxDi","volume-controls":"volume-controls___QLaWH","fullscreen-button":"fullscreen-button___2nHzc","fullscreen-button1":"fullscreen-button1___1murk","pip-button":"pip-button___18qQG","playback-animation":"playback-animation___gCL6X",volume:"volume___10eUe",hidden:"hidden___2JBJW"}},"55Ip":function(Je,Ke,B){"use strict";B.d(Ke,"a",function(){return t});var ae=B("Ty5D"),Q=B("dI71"),U=B("cDcd"),w=B.n(U),P=B("YS25"),S=B("17x9"),C=B.n(S),T=B("wx14"),h=B("zLVn"),p=B("9R94"),f=function(E){Object(Q.a)(o,E);function o(){for(var A,O=arguments.length,D=new Array(O),I=0;I<O;I++)D[I]=arguments[I];return A=E.call.apply(E,[this].concat(D))||this,A.history=Object(P.a)(A.props),A}var x=o.prototype;return x.render=function(){return w.a.createElement(ae.c,{history:this.history,children:this.props.children})},o}(w.a.Component),l=function(E){Object(Q.a)(o,E);function o(){for(var A,O=arguments.length,D=new Array(O),I=0;I<O;I++)D[I]=arguments[I];return A=E.call.apply(E,[this].concat(D))||this,A.history=Object(P.b)(A.props),A}var x=o.prototype;return x.render=function(){return w.a.createElement(ae.c,{history:this.history,children:this.props.children})},o}(w.a.Component),a=function(o,x){return typeof o=="function"?o(x):o},c=function(o,x){return typeof o=="string"?Object(P.c)(o,null,null,x):o},s=function(o){return o},u=w.a.forwardRef;typeof u=="undefined"&&(u=s);function i(E){return!!(E.metaKey||E.altKey||E.ctrlKey||E.shiftKey)}var n=u(function(E,o){var x=E.innerRef,A=E.navigate,O=E.onClick,D=Object(h.a)(E,["innerRef","navigate","onClick"]),I=D.target,F=Object(T.a)({},D,{onClick:function(ne){try{O&&O(ne)}catch(j){throw ne.preventDefault(),j}!ne.defaultPrevented&&ne.button===0&&(!I||I==="_self")&&!i(ne)&&(ne.preventDefault(),A())}});return s!==u?F.ref=o||x:F.ref=x,w.a.createElement("a",F)}),t=u(function(E,o){var x=E.component,A=x===void 0?n:x,O=E.replace,D=E.to,I=E.innerRef,F=Object(h.a)(E,["component","replace","to","innerRef"]);return w.a.createElement(ae.e.Consumer,null,function(z){z||Object(p.a)(!1);var ne=z.history,j=c(a(D,z.location),z.location),G=j?ne.createHref(j):"",X=Object(T.a)({},F,{href:G,navigate:function(){var K=a(D,z.location),q=O?ne.replace:ne.push;q(K)}});return s!==u?X.ref=o||I:X.innerRef=I,w.a.createElement(A,X)})});if(!1)var d,v;var b=function(o){return o},y=w.a.forwardRef;typeof y=="undefined"&&(y=b);function _(){for(var E=arguments.length,o=new Array(E),x=0;x<E;x++)o[x]=arguments[x];return o.filter(function(A){return A}).join(" ")}var m=y(function(E,o){var x=E["aria-current"],A=x===void 0?"page":x,O=E.activeClassName,D=O===void 0?"active":O,I=E.activeStyle,F=E.className,z=E.exact,ne=E.isActive,j=E.location,G=E.sensitive,X=E.strict,Z=E.style,K=E.to,q=E.innerRef,ie=Object(h.a)(E,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return w.a.createElement(ae.e.Consumer,null,function(oe){oe||Object(p.a)(!1);var ye=j||oe.location,pe=c(a(K,ye),ye),we=pe.pathname,fe=we&&we.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),Te=fe?Object(ae.f)(ye.pathname,{path:fe,exact:z,sensitive:G,strict:X}):null,Fe=!!(ne?ne(Te,ye):Te),De=Fe?_(F,D):F,Me=Fe?Object(T.a)({},Z,{},I):Z,Ue=Object(T.a)({"aria-current":Fe&&A||null,className:De,style:Me,to:pe},ie);return b!==y?Ue.ref=o||q:Ue.innerRef=q,w.a.createElement(t,Ue)})});if(!1)var g},"5nXd":function(Je,Ke,B){var ae=B("MFOe"),Q=ae.slice,U=ae.pluck,w=ae.each,P=ae.bind,S=ae.create,C=ae.isList,T=ae.isFunction,h=ae.isObject;Je.exports={createStore:l};var p={version:"2.0.12",enabled:!1,get:function(a,c){var s=this.storage.read(this._namespacePrefix+a);return this._deserialize(s,c)},set:function(a,c){return c===void 0?this.remove(a):(this.storage.write(this._namespacePrefix+a,this._serialize(c)),c)},remove:function(a){this.storage.remove(this._namespacePrefix+a)},each:function(a){var c=this;this.storage.each(function(s,u){a.call(c,c._deserialize(s),(u||"").replace(c._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(a){return this._namespacePrefix=="__storejs_"+a+"_"},createStore:function(){return l.apply(this,arguments)},addPlugin:function(a){this._addPlugin(a)},namespace:function(a){return l(this.storage,this.plugins,a)}};function f(){var a=typeof console=="undefined"?null:console;if(!a)return;var c=a.warn?a.warn:a.log;c.apply(a,arguments)}function l(a,c,s){s||(s=""),a&&!C(a)&&(a=[a]),c&&!C(c)&&(c=[c]);var u=s?"__storejs_"+s+"_":"",i=s?new RegExp("^"+u):null,n=/^[a-zA-Z0-9_\-]*$/;if(!n.test(s))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var t={_namespacePrefix:u,_namespaceRegexp:i,_testStorage:function(v){try{var b="__storejs__test__";v.write(b,b);var y=v.read(b)===b;return v.remove(b),y}catch(_){return!1}},_assignPluginFnProp:function(v,b){var y=this[b];this[b]=function(){var m=Q(arguments,0),g=this;function E(){return y?(w(arguments,function(x,A){m[A]=x}),y.apply(g,m)):void 0}var o=[E].concat(m);return v.apply(g,o)}},_serialize:function(v){return JSON.stringify(v)},_deserialize:function(v,b){if(!v)return b;var y="";try{y=JSON.parse(v)}catch(_){y=v}return y!==void 0?y:b},_addStorage:function(v){if(this.enabled)return;this._testStorage(v)&&(this.storage=v,this.enabled=!0)},_addPlugin:function(v){var b=this;if(C(v)){w(v,function(m){b._addPlugin(m)});return}var y=U(this.plugins,function(m){return v===m});if(y)return;if(this.plugins.push(v),!T(v))throw new Error("Plugins must be function values that return objects");var _=v.call(this);if(!h(_))throw new Error("Plugins must return an object of function properties");w(_,function(m,g){if(!T(m))throw new Error("Bad plugin property: "+g+" from plugin "+v.name+". Plugins should only return functions.");b._assignPluginFnProp(m,g)})},addStorage:function(v){f("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(v)}},d=S(t,p,{plugins:[]});return d.raw={},w(d,function(v,b){T(v)&&(d.raw[b]=P(d,v))}),w(a,function(v){d._addStorage(v)}),w(c,function(v){d._addPlugin(v)}),d}},"6+eU":function(Je,Ke,B){"use strict";B.d(Ke,"a",function(){return y});var ae=B("wx14"),Q=B("rePB"),U=B("VTBJ"),w=B("1OyB"),P=B("vuIU"),S=B("Ji7U"),C=B("LK+K"),T=B("cDcd"),h=B.n(T),p=B("TSYQ"),f=B.n(p),l=function(m){var g,E="".concat(m.rootPrefixCls,"-item"),o=f()(E,"".concat(E,"-").concat(m.page),(g={},Object(Q.a)(g,"".concat(E,"-active"),m.active),Object(Q.a)(g,m.className,!!m.className),Object(Q.a)(g,"".concat(E,"-disabled"),!m.page),g)),x=function(){m.onClick(m.page)},A=function(D){m.onKeyPress(D,m.onClick,m.page)};return h.a.createElement("li",{title:m.showTitle?m.page:null,className:o,onClick:x,onKeyPress:A,tabIndex:"0"},m.itemRender(m.page,"page",h.a.createElement("a",{rel:"nofollow"},m.page)))},a=l,c={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},s=function(_){Object(S.a)(g,_);var m=Object(C.a)(g);function g(){var E;Object(w.a)(this,g);for(var o=arguments.length,x=new Array(o),A=0;A<o;A++)x[A]=arguments[A];return E=m.call.apply(m,[this].concat(x)),E.state={goInputText:""},E.buildOptionText=function(O){return"".concat(O," ").concat(E.props.locale.items_per_page)},E.changeSize=function(O){E.props.changeSize(Number(O))},E.handleChange=function(O){E.setState({goInputText:O.target.value})},E.handleBlur=function(O){var D=E.props,I=D.goButton,F=D.quickGo,z=D.rootPrefixCls,ne=E.state.goInputText;if(I||ne==="")return;if(O.relatedTarget&&(O.relatedTarget.className.indexOf("".concat(z,"-prev"))>=0||O.relatedTarget.className.indexOf("".concat(z,"-next"))>=0))return;E.setState({goInputText:""}),F(E.getValidValue())},E.go=function(O){var D=E.state.goInputText;if(D==="")return;(O.keyCode===c.ENTER||O.type==="click")&&(E.setState({goInputText:""}),E.props.quickGo(E.getValidValue()))},E}return Object(P.a)(g,[{key:"getValidValue",value:function(){var o=this.state,x=o.goInputText,A=o.current;return!x||isNaN(x)?A:Number(x)}},{key:"getPageSizeOptions",value:function(){var o=this.props,x=o.pageSize,A=o.pageSizeOptions;return A.some(function(O){return O.toString()===x.toString()})?A:A.concat([x.toString()]).sort(function(O,D){var I=isNaN(Number(O))?0:Number(O),F=isNaN(Number(D))?0:Number(D);return I-F})}},{key:"render",value:function(){var o=this,x=this.props,A=x.pageSize,O=x.locale,D=x.rootPrefixCls,I=x.changeSize,F=x.quickGo,z=x.goButton,ne=x.selectComponentClass,j=x.buildOptionText,G=x.selectPrefixCls,X=x.disabled,Z=this.state.goInputText,K="".concat(D,"-options"),q=ne,ie=null,oe=null,ye=null;if(!I&&!F)return null;var pe=this.getPageSizeOptions();if(I&&q){var we=pe.map(function(fe,Te){return h.a.createElement(q.Option,{key:Te,value:fe.toString()},(j||o.buildOptionText)(fe))});ie=h.a.createElement(q,{disabled:X,prefixCls:G,showSearch:!1,className:"".concat(K,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(A||pe[0]).toString(),onChange:this.changeSize,getPopupContainer:function(Te){return Te.parentNode}},we)}return F&&(z&&(ye=typeof z=="boolean"?h.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:X,className:"".concat(K,"-quick-jumper-button")},O.jump_to_confirm):h.a.createElement("span",{onClick:this.go,onKeyUp:this.go},z)),oe=h.a.createElement("div",{className:"".concat(K,"-quick-jumper")},O.jump_to,h.a.createElement("input",{disabled:X,type:"text",value:Z,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),O.page,ye)),h.a.createElement("li",{className:"".concat(K)},ie,oe)}}]),g}(h.a.Component);s.defaultProps={pageSizeOptions:["10","20","50","100"]};var u=s,i=B("N2Kk");function n(){}function t(_){return typeof _=="number"&&isFinite(_)&&Math.floor(_)===_}function d(_,m,g){return g}function v(_,m,g){var E=typeof _=="undefined"?m.pageSize:_;return Math.floor((g.total-1)/E)+1}var b=function(_){Object(S.a)(g,_);var m=Object(C.a)(g);function g(E){var o;Object(w.a)(this,g),o=m.call(this,E),o.getJumpPrevPage=function(){return Math.max(1,o.state.current-(o.props.showLessItems?3:5))},o.getJumpNextPage=function(){return Math.min(v(void 0,o.state,o.props),o.state.current+(o.props.showLessItems?3:5))},o.getItemIcon=function(I,F){var z=o.props.prefixCls,ne=I||h.a.createElement("button",{type:"button","aria-label":F,className:"".concat(z,"-item-link")});return typeof I=="function"&&(ne=h.a.createElement(I,Object(U.a)({},o.props))),ne},o.savePaginationNode=function(I){o.paginationNode=I},o.isValid=function(I){return t(I)&&I!==o.state.current},o.shouldDisplayQuickJumper=function(){var I=o.props,F=I.showQuickJumper,z=I.pageSize,ne=I.total;return ne<=z?!1:F},o.handleKeyDown=function(I){(I.keyCode===c.ARROW_UP||I.keyCode===c.ARROW_DOWN)&&I.preventDefault()},o.handleKeyUp=function(I){var F=o.getValidValue(I),z=o.state.currentInputValue;F!==z&&o.setState({currentInputValue:F}),I.keyCode===c.ENTER?o.handleChange(F):I.keyCode===c.ARROW_UP?o.handleChange(F-1):I.keyCode===c.ARROW_DOWN&&o.handleChange(F+1)},o.changePageSize=function(I){var F=o.state.current,z=v(I,o.state,o.props);F=F>z?z:F,z===0&&(F=o.state.current),typeof I=="number"&&("pageSize"in o.props||o.setState({pageSize:I}),"current"in o.props||o.setState({current:F,currentInputValue:F})),o.props.onShowSizeChange(F,I),"onChange"in o.props&&o.props.onChange&&o.props.onChange(F,I)},o.handleChange=function(I){var F=o.props.disabled,z=I;if(o.isValid(z)&&!F){var ne=v(void 0,o.state,o.props);z>ne?z=ne:z<1&&(z=1),"current"in o.props||o.setState({current:z,currentInputValue:z});var j=o.state.pageSize;return o.props.onChange(z,j),z}return o.state.current},o.prev=function(){o.hasPrev()&&o.handleChange(o.state.current-1)},o.next=function(){o.hasNext()&&o.handleChange(o.state.current+1)},o.jumpPrev=function(){o.handleChange(o.getJumpPrevPage())},o.jumpNext=function(){o.handleChange(o.getJumpNextPage())},o.hasPrev=function(){return o.state.current>1},o.hasNext=function(){return o.state.current<v(void 0,o.state,o.props)},o.runIfEnter=function(I,F){if(I.key==="Enter"||I.charCode===13){for(var z=arguments.length,ne=new Array(z>2?z-2:0),j=2;j<z;j++)ne[j-2]=arguments[j];F.apply(void 0,ne)}},o.runIfEnterPrev=function(I){o.runIfEnter(I,o.prev)},o.runIfEnterNext=function(I){o.runIfEnter(I,o.next)},o.runIfEnterJumpPrev=function(I){o.runIfEnter(I,o.jumpPrev)},o.runIfEnterJumpNext=function(I){o.runIfEnter(I,o.jumpNext)},o.handleGoTO=function(I){(I.keyCode===c.ENTER||I.type==="click")&&o.handleChange(o.state.currentInputValue)};var x=E.onChange!==n,A="current"in E;A&&!x&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var O=E.defaultCurrent;"current"in E&&(O=E.current);var D=E.defaultPageSize;return"pageSize"in E&&(D=E.pageSize),O=Math.min(O,v(D,void 0,E)),o.state={current:O,currentInputValue:O,pageSize:D},o}return Object(P.a)(g,[{key:"componentDidUpdate",value:function(o,x){var A=this.props.prefixCls;if(x.current!==this.state.current&&this.paginationNode){var O=this.paginationNode.querySelector(".".concat(A,"-item-").concat(x.current));O&&document.activeElement===O&&O.blur()}}},{key:"getValidValue",value:function(o){var x=o.target.value,A=v(void 0,this.state,this.props),O=this.state.currentInputValue,D;return x===""?D=x:isNaN(Number(x))?D=O:x>=A?D=A:D=Number(x),D}},{key:"getShowSizeChanger",value:function(){var o=this.props,x=o.showSizeChanger,A=o.total,O=o.totalBoundaryShowSizeChanger;return typeof x!="undefined"?x:A>O}},{key:"renderPrev",value:function(o){var x=this.props,A=x.prevIcon,O=x.itemRender,D=O(o,"prev",this.getItemIcon(A,"prev page")),I=!this.hasPrev();return Object(T.isValidElement)(D)?Object(T.cloneElement)(D,{disabled:I}):D}},{key:"renderNext",value:function(o){var x=this.props,A=x.nextIcon,O=x.itemRender,D=O(o,"next",this.getItemIcon(A,"next page")),I=!this.hasNext();return Object(T.isValidElement)(D)?Object(T.cloneElement)(D,{disabled:I}):D}},{key:"render",value:function(){var o=this,x=this.props,A=x.prefixCls,O=x.className,D=x.style,I=x.disabled,F=x.hideOnSinglePage,z=x.total,ne=x.locale,j=x.showQuickJumper,G=x.showLessItems,X=x.showTitle,Z=x.showTotal,K=x.simple,q=x.itemRender,ie=x.showPrevNextJumpers,oe=x.jumpPrevIcon,ye=x.jumpNextIcon,pe=x.selectComponentClass,we=x.selectPrefixCls,fe=x.pageSizeOptions,Te=this.state,Fe=Te.current,De=Te.pageSize,Me=Te.currentInputValue;if(F===!0&&z<=De)return null;var Ue=v(void 0,this.state,this.props),ve=[],ce=null,Ie=null,Ne=null,Xe=null,ee=null,k=j&&j.goButton,N=G?1:2,$=Fe-1>0?Fe-1:0,V=Fe+1<Ue?Fe+1:Ue,Y=Object.keys(this.props).reduce(function(he,be){return(be.substr(0,5)==="data-"||be.substr(0,5)==="aria-"||be==="role")&&(he[be]=o.props[be]),he},{});if(K)return k&&(typeof k=="boolean"?ee=h.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},ne.jump_to_confirm):ee=h.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},k),ee=h.a.createElement("li",{title:X?"".concat(ne.jump_to).concat(Fe,"/").concat(Ue):null,className:"".concat(A,"-simple-pager")},ee)),h.a.createElement("ul",Object(ae.a)({className:f()(A,"".concat(A,"-simple"),Object(Q.a)({},"".concat(A,"-disabled"),I),O),style:D,ref:this.savePaginationNode},Y),h.a.createElement("li",{title:X?ne.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:f()("".concat(A,"-prev"),Object(Q.a)({},"".concat(A,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev($)),h.a.createElement("li",{title:X?"".concat(Fe,"/").concat(Ue):null,className:"".concat(A,"-simple-pager")},h.a.createElement("input",{type:"text",value:Me,disabled:I,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),h.a.createElement("span",{className:"".concat(A,"-slash")},"/"),Ue),h.a.createElement("li",{title:X?ne.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:f()("".concat(A,"-next"),Object(Q.a)({},"".concat(A,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(V)),ee);if(Ue<=3+N*2){var me={locale:ne,rootPrefixCls:A,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:X,itemRender:q};Ue||ve.push(h.a.createElement(a,Object(ae.a)({},me,{key:"noPager",page:Ue,className:"".concat(A,"-disabled")})));for(var Ae=1;Ae<=Ue;Ae+=1){var at=Fe===Ae;ve.push(h.a.createElement(a,Object(ae.a)({},me,{key:Ae,page:Ae,active:at})))}}else{var Le=G?ne.prev_3:ne.prev_5,ke=G?ne.next_3:ne.next_5;ie&&(ce=h.a.createElement("li",{title:X?Le:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:f()("".concat(A,"-jump-prev"),Object(Q.a)({},"".concat(A,"-jump-prev-custom-icon"),!!oe))},q(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(oe,"prev page"))),Ie=h.a.createElement("li",{title:X?ke:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:f()("".concat(A,"-jump-next"),Object(Q.a)({},"".concat(A,"-jump-next-custom-icon"),!!ye))},q(this.getJumpNextPage(),"jump-next",this.getItemIcon(ye,"next page")))),Xe=h.a.createElement(a,{locale:ne,last:!0,rootPrefixCls:A,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ue,page:Ue,active:!1,showTitle:X,itemRender:q}),Ne=h.a.createElement(a,{locale:ne,rootPrefixCls:A,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:X,itemRender:q});var Ye=Math.max(1,Fe-N),Ze=Math.min(Fe+N,Ue);Fe-1<=N&&(Ze=1+N*2),Ue-Fe<=N&&(Ye=Ue-N*2);for(var Ve=Ye;Ve<=Ze;Ve+=1){var He=Fe===Ve;ve.push(h.a.createElement(a,{locale:ne,rootPrefixCls:A,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ve,page:Ve,active:He,showTitle:X,itemRender:q}))}Fe-1>=N*2&&Fe!==1+2&&(ve[0]=Object(T.cloneElement)(ve[0],{className:"".concat(A,"-item-after-jump-prev")}),ve.unshift(ce)),Ue-Fe>=N*2&&Fe!==Ue-2&&(ve[ve.length-1]=Object(T.cloneElement)(ve[ve.length-1],{className:"".concat(A,"-item-before-jump-next")}),ve.push(Ie)),Ye!==1&&ve.unshift(Ne),Ze!==Ue&&ve.push(Xe)}var Pe=null;Z&&(Pe=h.a.createElement("li",{className:"".concat(A,"-total-text")},Z(z,[z===0?0:(Fe-1)*De+1,Fe*De>z?z:Fe*De])));var Re=!this.hasPrev()||!Ue,Oe=!this.hasNext()||!Ue;return h.a.createElement("ul",Object(ae.a)({className:f()(A,O,Object(Q.a)({},"".concat(A,"-disabled"),I)),style:D,unselectable:"unselectable",ref:this.savePaginationNode},Y),Pe,h.a.createElement("li",{title:X?ne.prev_page:null,onClick:this.prev,tabIndex:Re?null:0,onKeyPress:this.runIfEnterPrev,className:f()("".concat(A,"-prev"),Object(Q.a)({},"".concat(A,"-disabled"),Re)),"aria-disabled":Re},this.renderPrev($)),ve,h.a.createElement("li",{title:X?ne.next_page:null,onClick:this.next,tabIndex:Oe?null:0,onKeyPress:this.runIfEnterNext,className:f()("".concat(A,"-next"),Object(Q.a)({},"".concat(A,"-disabled"),Oe)),"aria-disabled":Oe},this.renderNext(V)),h.a.createElement(u,{disabled:I,locale:ne,rootPrefixCls:A,selectComponentClass:pe,selectPrefixCls:we,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Fe,pageSize:De,pageSizeOptions:fe,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:k}))}}],[{key:"getDerivedStateFromProps",value:function(o,x){var A={};if("current"in o&&(A.current=o.current,o.current!==x.current&&(A.currentInputValue=A.current)),"pageSize"in o&&o.pageSize!==x.pageSize){var O=x.current,D=v(o.pageSize,x,o);O=O>D?D:O,"current"in o||(A.current=O,A.currentInputValue=O),A.pageSize=o.pageSize}return A}}]),g}(h.a.Component);b.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:n,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:n,locale:i.a,style:{},itemRender:d,totalBoundaryShowSizeChanger:50};var y=b},"6RRn":function(Je,Ke,B){"use strict";var ae=B("wCXF"),Q=B("n6Qo");B.d(Ke,"b",function(){return Q.a});var U=B("IBYe"),w=B("6eGT"),P=B("hW8S");B.d(Ke,"a",function(){return P.a}),Ke.c=ae.b},"6eGT":function(Je,Ke,B){"use strict";function ae(Q){return null}Ke.a=ae},"7+5b":function(Je,Ke,B){Je.exports=B.p+"static/v.e7f297d6.svg"},"7Cbv":function(Je,Ke,B){"use strict";var ae=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),Q=new Uint8Array(16);function U(){if(!ae)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ae(Q)}var w=/^(?:[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 P(a){return typeof a=="string"&&w.test(a)}for(var S=P,C=[],T=0;T<256;++T)C.push((T+256).toString(16).substr(1));function h(a){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=(C[a[c+0]]+C[a[c+1]]+C[a[c+2]]+C[a[c+3]]+"-"+C[a[c+4]]+C[a[c+5]]+"-"+C[a[c+6]]+C[a[c+7]]+"-"+C[a[c+8]]+C[a[c+9]]+"-"+C[a[c+10]]+C[a[c+11]]+C[a[c+12]]+C[a[c+13]]+C[a[c+14]]+C[a[c+15]]).toLowerCase();if(!S(s))throw TypeError("Stringified UUID is invalid");return s}var p=h;function f(a,c,s){a=a||{};var u=a.random||(a.rng||U)();if(u[6]=u[6]&15|64,u[8]=u[8]&63|128,c){s=s||0;for(var i=0;i<16;++i)c[s+i]=u[i];return c}return p(u)}var l=Ke.a=f},"7ahc":function(Je,Ke,B){"use strict";B.d(Ke,"a",function(){return v});var ae=B("k1fw"),Q=B("0Owb"),U=B("+L6B"),w=B("2/Rp"),P=B("y8nQ"),S=B("Vl3Y"),C=B("tJVT"),T=B("OaEy"),h=B("2fM7"),p=B("cDcd"),f=B.n(p),l=B("VrN/"),a=B.n(l),c=B("p77/"),s=B.n(c),u=B("c5Ni"),i=B.n(u),n=h.a.Option,t={labelCol:{span:4},wrapperCol:{span:20}},d={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"]};Ke.b=function(b){var y=b.callback,_=b.onCancel,m=Object(p.useState)("python"),g=Object(C.a)(m,2),E=g[0],o=g[1];function x(O){o(d[O][1])}function A(O){y(O)}return f.a.createElement(S.a,Object(Q.a)({},t,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:A}),f.a.createElement(S.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},f.a.createElement(h.a,{onChange:x},Object.keys(d).map(function(O){return f.a.createElement(n,{key:O,value:O},d[O][0])}))),f.a.createElement(S.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},f.a.createElement(v,{mode:E})),f.a.createElement("div",{className:"flex-container flex-end"},f.a.createElement(w.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),f.a.createElement(w.a,{type:"ghost",onClick:_},"\u53D6\u6D88")))};function v(b){var y=b.value,_=b.onChange,m=b.mode,g=b.options,E=g===void 0?{}:g,o=Object(p.useRef)(),x=Object(p.useState)(),A=Object(C.a)(x,2),O=A[0],D=A[1];return Object(p.useEffect)(function(){if(O){function I(F){var z=F.getValue();_&&_(z)}return O.on("change",I),function(){O.off("change",I)}}},[O,_]),Object(p.useEffect)(function(){O&&O.setOption("mode",m)},[O,m]),Object(p.useEffect)(function(){O&&((y!==O.getValue()||y==="")&&setTimeout(function(){O.setValue(y||" ")},300))},[O,y]),Object(p.useEffect)(function(){if(o.current&&!O){var I=a.a.fromTextArea(o.current,Object(ae.a)({mode:m,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},E));D(I)}},[o.current,O]),f.a.createElement("div",{className:"my-codemirror-container"},f.a.createElement("textarea",{ref:o}))}},"7ixt":function(Je,Ke,B){"use strict";B.d(Ke,"a",function(){return U});var ae={adjustX:1,adjustY:1},Q=[0,0],U={left:{points:["cr","cl"],overflow:ae,offset:[-4,0],targetOffset:Q},right:{points:["cl","cr"],overflow:ae,offset:[4,0],targetOffset:Q},top:{points:["bc","tc"],overflow:ae,offset:[0,-4],targetOffset:Q},bottom:{points:["tc","bc"],overflow:ae,offset:[0,4],targetOffset:Q},topLeft:{points:["bl","tl"],overflow:ae,offset:[0,-4],targetOffset:Q},leftTop:{points:["tr","tl"],overflow:ae,offset:[-4,0],targetOffset:Q},topRight:{points:["br","tr"],overflow:ae,offset:[0,-4],targetOffset:Q},rightTop:{points:["tl","tr"],overflow:ae,offset:[4,0],targetOffset:Q},bottomRight:{points:["tr","br"],overflow:ae,offset:[0,4],targetOffset:Q},rightBottom:{points:["bl","br"],overflow:ae,offset:[4,0],targetOffset:Q},bottomLeft:{points:["tl","bl"],overflow:ae,offset:[0,4],targetOffset:Q},leftBottom:{points:["br","bl"],overflow:ae,offset:[-4,0],targetOffset:Q}},w=U},"7qur":function(Je,Ke,B){"use strict";B.d(Ke,"m",function(){return Q}),B.d(Ke,"s",function(){return U}),B.d(Ke,"h",function(){return w}),B.d(Ke,"o",function(){return P}),B.d(Ke,"n",function(){return S}),B.d(Ke,"l",function(){return C}),B.d(Ke,"b",function(){return T}),B.d(Ke,"q",function(){return h}),B.d(Ke,"t",function(){return p}),B.d(Ke,"v",function(){return f}),B.d(Ke,"w",function(){return l}),B.d(Ke,"u",function(){return a}),B.d(Ke,"p",function(){return c}),B.d(Ke,"f",function(){return s}),B.d(Ke,"a",function(){return u}),B.d(Ke,"j",function(){return i}),B.d(Ke,"k",function(){return n}),B.d(Ke,"d",function(){return t}),B.d(Ke,"g",function(){return d}),B.d(Ke,"c",function(){return v}),B.d(Ke,"e",function(){return b}),B.d(Ke,"i",function(){return y}),B.d(Ke,"r",function(){return _});var ae=B("ErOA");function Q(m){return Object(ae.c)("mypractices/".concat(m,".json"),{hidePopLogin:!0})}function U(m,g){return Object(ae.f)("mypractices/".concat(m,"/code_submit.json"),g)}function w(m,g){return Object(ae.c)("mypractices/".concat(m,"/code_debug.json"),g)}function P(m,g){return Object(ae.c)("mypractices/".concat(m,"/submit_records.json"),g)}function S(m){return Object(ae.c)("mypractices/record_detail.json",{id:m})}function C(m,g){return Object(ae.c)("mypractices/".concat(m,"/result.json"),{mode:g})}function T(m,g){return Object(ae.f)("mypractices/".concat(m,"/add_notes.json"),g)}function h(m,g){return Object(ae.f)("mypractices/".concat(m,"/restore_initial_code.json"),g)}function p(m,g){return Object(ae.f)("mypractices/".concat(m,"/sync_code.json"),g)}function f(m,g){return Object(ae.f)("mypractices/".concat(m,"/update_code.json"),g)}function l(m){return Object(ae.f)("mypractices/".concat(m,"/initial_codes.json"))}function a(m,g){return Object(ae.f)("discusses/".concat(m,"/plus.json"),g)}function c(m){return Object(ae.c)("practices/practices_list.json",m)}function s(m,g){return Object(ae.c)("practices/".concat(m,"/question_solution_articles"),g)}function u(m,g){return Object(ae.f)("practices/".concat(m,"/question_solution_articles"),g)}function i(m,g){return Object(ae.g)("practices/".concat(m,"/question_solution_articles/").concat(g==null?void 0:g.active),g)}function n(m,g){return Object(ae.c)("practices/".concat(m,"/question_solution_articles/").concat(g==null?void 0:g.active,"/edit"),g)}function t(m,g){return Object(ae.c)("practices/".concat(m,"/question_solution_articles/").concat(g==null?void 0:g.active),g)}function d(m,g){return Object(ae.f)("practices/".concat(m,"/question_solution_articles/").concat(g==null?void 0:g.active,"/set_authority_or_excellent"),g)}function v(m,g){return Object(ae.f)("practices/".concat(m,"/question_solution_articles/").concat(g==null?void 0:g.active,"/praise_or_treads"),g)}function b(m,g){return Object(ae.f)("practices/".concat(m,"/question_solution_articles/").concat(g==null?void 0:g.active,"/hide"))}function y(m,g){return Object(ae.b)("practices/".concat(m,"/question_solution_articles/").concat(g==null?void 0:g.active),g)}function _(m,g){return Object(ae.f)("mypractices/".concat(m,"/update_practice_time_sum"),g)}},"815F":function(Je,Ke,B){"use strict";B.d(Ke,"e",function(){return C}),B.d(Ke,"c",function(){return h}),B.d(Ke,"d",function(){return p}),B.d(Ke,"a",function(){return l}),B.d(Ke,"f",function(){return a}),B.d(Ke,"b",function(){return c});var ae=B("KQm4"),Q=B("VTBJ"),U=B("Ff2n"),w=B("Zm9Q"),P=B("Kwbf"),S=B("OZM5");function C(s,u){return s!=null?s:u}function T(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],u=new Map;function i(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(n||[]).forEach(function(d){var v=d.key,b=d.children;Object(P.a)(v!=null,"Tree node must have a certain key: [".concat(t).concat(v,"]"));var y=String(v);Object(P.a)(!u.has(y)||v===null||v===void 0,"Same 'key' exist in the Tree: ".concat(y)),u.set(y,!0),i(b,"".concat(t).concat(y," > "))})}i(s)}function h(s){function u(i){var n=Object(w.a)(i);return n.map(function(t){if(!Object(S.i)(t))return Object(P.a)(!t,"Tree/TreeNode can only accept TreeNode as children."),null;var d=t.key,v=t.props,b=v.children,y=Object(U.a)(v,["children"]),_=Object(Q.a)({key:d},y),m=u(b);return m.length&&(_.children=m),_}).filter(function(t){return t})}return u(s)}function p(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=new Set(u===!0?[]:u),n=[];function t(d){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return d.map(function(b,y){var _=Object(S.h)(v?v.pos:"0",y),m=C(b.key,_),g=Object(Q.a)(Object(Q.a)({},b),{},{parent:v,pos:_,children:null,data:b,isStart:[].concat(Object(ae.a)(v?v.isStart:[]),[y===0]),isEnd:[].concat(Object(ae.a)(v?v.isEnd:[]),[y===d.length-1])});return n.push(g),u===!0||i.has(m)?g.children=t(b.children||[],g):g.children=[],g})}return t(s),n}function f(s,u,i){var n;i?typeof i=="string"?n=function(v){return v[i]}:typeof i=="function"&&(n=function(v){return i(v)}):n=function(v,b){return C(v.key,b)};function t(d,v,b){var y=d?d.children:s,_=d?Object(S.h)(b.pos,v):"0";if(d){var m=n(d,_),g={node:d,index:v,pos:_,key:m,parentPos:b.node?b.pos:null,level:b.level+1};u(g)}y&&y.forEach(function(E,o){t(E,o,{node:d,pos:_,level:b?b.level+1:-1})})}t(null)}function l(s){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=u.initWrapper,n=u.processEntity,t=u.onProcessFinished,d=arguments.length>2?arguments[2]:void 0,v={},b={},y={posEntities:v,keyEntities:b};return i&&(y=i(y)||y),f(s,function(_){var m=_.node,g=_.index,E=_.pos,o=_.key,x=_.parentPos,A=_.level,O={node:m,index:g,key:o,pos:E,level:A},D=C(o,E);v[E]=O,b[D]=O,O.parent=v[x],O.parent&&(O.parent.children=O.parent.children||[],O.parent.children.push(O)),n&&n(O,y)},d),t&&t(y),y}function a(s,u){var i=u.expandedKeys,n=u.selectedKeys,t=u.loadedKeys,d=u.loadingKeys,v=u.checkedKeys,b=u.halfCheckedKeys,y=u.dragOverNodeKey,_=u.dropPosition,m=u.keyEntities,g=m[s],E={eventKey:s,expanded:i.indexOf(s)!==-1,selected:n.indexOf(s)!==-1,loaded:t.indexOf(s)!==-1,loading:d.indexOf(s)!==-1,checked:v.indexOf(s)!==-1,halfChecked:b.indexOf(s)!==-1,pos:String(g?g.pos:""),dragOver:y===s&&_===0,dragOverGapTop:y===s&&_===-1,dragOverGapBottom:y===s&&_===1};return E}function c(s){var u=s.data,i=s.expanded,n=s.selected,t=s.checked,d=s.loaded,v=s.loading,b=s.halfChecked,y=s.dragOver,_=s.dragOverGapTop,m=s.dragOverGapBottom,g=s.pos,E=s.active,o=Object(Q.a)(Object(Q.a)({},u),{},{expanded:i,selected:n,checked:t,loaded:d,loading:v,halfChecked:b,dragOver:y,dragOverGapTop:_,dragOverGapBottom:m,pos:g,active:E});return"props"in o||Object.defineProperty(o,"props",{get:function(){return Object(P.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),s}}),o}},"8EBN":function(Je,Ke,B){(function(ae){ae(B("VrN/"))})(function(ae){"use strict";ae.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 Q=0;Q<ae.modeInfo.length;Q++){var U=ae.modeInfo[Q];U.mimes&&(U.mime=U.mimes[0])}ae.findModeByMIME=function(w){w=w.toLowerCase();for(var P=0;P<ae.modeInfo.length;P++){var S=ae.modeInfo[P];if(S.mime==w)return S;if(S.mimes){for(var C=0;C<S.mimes.length;C++)if(S.mimes[C]==w)return S}}if(/\+xml$/.test(w))return ae.findModeByMIME("application/xml");if(/\+json$/.test(w))return ae.findModeByMIME("application/json")},ae.findModeByExtension=function(w){w=w.toLowerCase();for(var P=0;P<ae.modeInfo.length;P++){var S=ae.modeInfo[P];if(S.ext){for(var C=0;C<S.ext.length;C++)if(S.ext[C]==w)return S}}},ae.findModeByFileName=function(w){for(var P=0;P<ae.modeInfo.length;P++){var S=ae.modeInfo[P];if(S.file&&S.file.test(w))return S}var C=w.lastIndexOf("."),T=C>-1&&w.substring(C+1,w.length);if(T)return ae.findModeByExtension(T)},ae.findModeByName=function(w){w=w.toLowerCase();for(var P=0;P<ae.modeInfo.length;P++){var S=ae.modeInfo[P];if(S.name.toLowerCase()==w)return S;if(S.alias){for(var C=0;C<S.alias.length;C++)if(S.alias[C].toLowerCase()==w)return S}}}})},"8hTe":function(Je,Ke,B){Je.exports={button:"button___1wy9m"}},"9Bee":function(Je,Ke,B){"use strict";var ae=B("DYRE"),Q=B("zeV3"),U=B("+L6B"),w=B("2/Rp"),P=B("k1fw"),S=B("tJVT"),C=B("cDcd"),T=B.n(C),h=B("vg9a"),p=B("DlQD"),f=B.n(p),l=B("rUJ1");function a(ye,pe){var we=ye.match(/^(\s+)(?:```)/);if(we===null)return pe;var fe=we[1];return pe.split(`
`).map(function(Te){var Fe=Te.match(/^\s+/);if(Fe===null)return Te;var De=Object(S.a)(Fe,1),Me=De[0];return Me.length>=fe.length?Te.slice(fe.length):Te}).join(`
`)}var c=[],s=["<ul>"],u=new f.a.Renderer,i=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function n(){c.length=0,s=["<ul>"]}var t={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function d(ye,pe,we,fe){if(pe>=ye.length||ye[pe].level<=we)return pe;var Te=ye[pe];fe.push("<li><a href='#"+Te.anchor+"'>"+Te.text+"</a>"),pe++;var Fe=[];return pe=d(ye,pe,Te.level,Fe),Fe.length>0&&(fe.push("<ul>"),Fe.forEach(function(De){fe.push(De)}),fe.push("</ul>")),fe.push("</li>"),pe=d(ye,pe,we,fe),pe}function v(){return d(c,0,0,s),s.push("</ul>"),s.join("")}var b={heading:function(pe){var we=i.exec(pe);if(we)return{type:"heading",raw:we[0],depth:we[1].length,text:we[2]}},fences:function(pe){var we=this.rules.block.fences.exec(pe);if(we){var fe=we[0],Te=a(fe,we[3]||""),Fe=we[2]?we[2].trim():we[2];if(["latex","katex","math"].indexOf(Fe)>=0){var De=m(),Me=Te;Te=De,g[De]={type:"block",expression:Me}}return{type:"code",raw:fe,lang:Fe,text:Te}}}},y=/(?:\${2})([^\n`]+?)(?:\${2})/gi,_=0,m=function(){return"__special_katext_id_".concat(_++,"__")},g={};function E(){return g}function o(){_=0,g={}}function x(ye){return ye=ye.replace(y,function(pe,we){var fe=m();return g[fe]={type:"inline",expression:we},fe}),ye}var A=u.listitem;u.listitem=function(ye){return A(x(ye))};var O=u.paragraph;u.paragraph=function(ye){return O(x(ye))};var D=u.tablecell;u.tablecell=function(ye,pe){return D(x(ye),pe)},u.code=function(ye,pe,we){var fe=(pe||"").match(/\S*/)[0];return fe?["latex","katex","math"].indexOf(fe)>=0?"<p class='editormd-tex'>".concat(ye,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(pe,'">').concat(we?ye:Object(l.escape)(ye,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(we?ye:Object(l.escape)(ye,!0))+"</code></pre>"},u.heading=function(ye,pe,we){var fe=this.options.headerPrefix+we.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return c.push({anchor:fe,level:pe,text:ye}),"<h"+pe+' id="'+fe+'">'+ye+"</h"+pe+">"},f.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),f.a.use({tokenizer:b,renderer:u});var I=f.a,F=B("SJMd"),z=B("ulZh"),ne=B.n(z),j=B("m3rI"),G=B("Oy/b"),X=B("p5ED"),Z=B("8hTe"),K=B.n(Z),q=/<pre[^>]*>/g;function ie(ye){var pe=document.createElement("div");return pe.innerHTML=ye,pe.childNodes.length===0?"":pe.childNodes[0].nodeValue}var oe=Ke.a=function(ye){var pe=ye.value,we=pe===void 0?"":pe,fe=ye.edit,Te=fe===void 0?!1:fe,Fe=ye.className,De=ye.showTextOnly,Me=ye.showLines,Ue=ye.replaces,ve=ye.zoomImg,ce=ye.hasMask,Ie=ye.style,Ne=Ie===void 0?{}:Ie,Xe=ye.stylesPrev,ee=Xe===void 0?{}:Xe,k=String(we),N=Object(C.useRef)(),$=Object(C.useRef)(),V=Object(C.useState)(""),Y=Object(S.a)(V,2),me=Y[0],Ae=Y[1],at=Object(C.useState)("office"),Le=Object(S.a)(at,2),ke=Le[0],Ye=Le[1],Ze=Object(C.useMemo)(function(){try{var Oe=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,he=/\"\/api\/attachments\/|\"\/attachments\/download\//g,be=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;k=k.replace(Oe,"("+j.a.API_SERVER+"/api/attachments/").replace(he,'"'+j.a.API_SERVER+"/api/attachments/").replace(be,'"'+j.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(Qe){}var Ce=I(k),xe=E();if(k.match(/\[TOC\]/)&&(Ce=Ce.replace("<p>[TOC]</p>",v()),n()),Ce=Ce.replace(/(__special_katext_id_\d+__)/g,function(Qe,rt){var dt=xe[rt],xt=dt.type,_t=dt.expression;return Object(G.renderToString)(ie(_t)||"",{displayMode:xt==="block",throwOnError:!1,output:"html"})}),Ce=Ce.replace(/▁/g,"\u2581\u2581\u2581"),o(),De){var Be=document.createElement("div");return Be.innerHTML=Ce,Be.innerText}return setTimeout(function(){return Pe()},500),Ce},[k]),Ve=Object(C.useRef)();t.WebkitLineClamp=Me,Me&&(Ne=Object(P.a)(Object(P.a)({},Ne),t));function He(Oe){var he=Oe.target;if(he.tagName.toUpperCase()==="IMG"){if(ve){var be=he.getAttribute("src");Ae(be),Ye("image")}}else if(he.tagName.toUpperCase()==="A"){var Ce=he.getAttribute("href");if(Ce.indexOf("office")>-1)Oe.preventDefault(),Ae(Ce),Ye("office");else if(Ce.indexOf("application/pdf")>-1)Oe.preventDefault(),Ae(Ce),Ye("pdf");else if(Ce.indexOf("text/html")>-1)Oe.preventDefault(),Ae(Ce),Ye("html");else if(Ce.startsWith("#")){Oe.preventDefault();var xe=document.getElementById(Ce.replace("#",""));xe&&xe.scrollIntoView(!0)}}}var Pe=function(){var he,be=(he=Ve.current)===null||he===void 0?void 0:he.querySelectorAll("video");be==null||be.forEach(function(Ce){if(Ce.oncontextmenu=function(){return!1},Ce.src.indexOf(".m3u8")>-1&&!Ce.canPlayType("application/vnd.apple.mpegurl")){if(ne.a.isSupported()){var xe=new ne.a;xe.loadSource(Ce.src),xe.attachMedia(Ce)}}})};Object(C.useEffect)(function(){if(Ve.current&&Ze&&(Ze.match(q)&&window.PR.prettyPrint()),Ve.current)return Ve.current.addEventListener("click",He),function(){Ve.current.removeEventListener("click",He),o(),n()}},[Ze,Ve.current,He]);var Re=function(he){if(!Te)return;he.target.nodeName==="IMG"?(N.current.style.display="flex",N.current.style.width=he.target.clientWidth+"px",N.current.style.height=he.target.clientHeight+"px",N.current.style.top=he.target.offsetTop+"px",N.current.style.left=he.target.offsetLeft+"px",$.current.src=he.target.getAttribute("src")):N.current.style.display="none"};return T.a.createElement("div",{style:{position:"relative"}},T.a.createElement("div",{ref:Ve,style:Object(P.a)({},Ne),className:"".concat(Fe||""," markdown-body ").concat(K.a.mdBody),onMouseOver:Re,dangerouslySetInnerHTML:{__html:Ze}}),T.a.createElement("div",{ref:N,className:K.a.button},T.a.createElement(Q.a,null,T.a.createElement(w.a,{onClick:function(){return openCrop()}},"\u88C1\u526A"),T.a.createElement(w.a,{onClick:function(){return openEditor()}},"\u7F16\u8F91"))),T.a.createElement("img",{ref:$,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),T.a.createElement(X.a,{close:!0,data:me,type:me!=null&&me.length?ke:"",style:Object(P.a)({},ee),onClose:function(){return Ae("")}}))}},"9VGf":function(Je,Ke,B){"use strict";B.d(Ke,"a",function(){return U});var ae=B("cDcd"),Q=B.n(ae);function U(w,P){var S=Object(ae.useRef)();Object(ae.useEffect)(function(){S.current=w}),Object(ae.useEffect)(function(){function C(){S.current()}if(P!==null){var T=setInterval(C,P);return function(){return clearInterval(T)}}},[P])}},AMnG:function(Je,Ke,B){"use strict";var ae=B("miYZ"),Q=B("tsqr"),U=B("tJVT"),w=B("cDcd"),P=B.n(w),S=B("nWbc"),C=B.n(S),T=B("Ot1p");Ke.a=function(h){var p=h.id,f=h.activeDiscussIndex,l=h.onReplyDiscuss,a=Object(w.useState)(""),c=Object(U.a)(a,2),s=c[0],u=c[1];function i(t){u(t)}function n(){if(!s){Q.b.info("\u56DE\u590D\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A!");return}l(p,s),u("")}return P.a.createElement("div",{key:p,className:"discuss-item-editor",style:{display:f===p?"block":"none",width:"100%"}},P.a.createElement(T.a,{miniToolbar:!0,startInit:f===p,defaultValue:s,id:p,noStorage:!0,watch:!1,height:155,placeholder:"\u6211\u8981\u56DE\u590D",showResizeBar:!0,onChange:i}),P.a.createElement("a",{onClick:n,className:"btn-send"},"\u53D1\u9001"))}},Aky1:function(Je,Ke,B){"use strict";B.d(Ke,"a",function(){return h});var ae=B("ErOA"),Q=B("ppsT"),U=B.n(Q),w="",P,S="";function C(p){T(p)}function T(p){P=new U.a.Vod({timeout:6e4,partSize:1048576,parallel:5,retryCount:3,retryDuration:2,region:"ap-southeast-1",userId:1829848226361863,enableUploadProgress:!1,addFileSuccess:function(l){console.log("addFileSuccess: "+l.file.name),p.addFileSuccess&&p.addFileSuccess(l),P.startUpload()},onUploadstarted:function(l){var a=l.file.name;if(l.videoId){var u="/api/users/".concat(w,"/video_auths.json");Object(ae.a)(u,{method:"put",body:{video_id:l.videoId,title:a,file_name:a,virtual_classroom_id:S}}).then(function(i){if(i.status==-1){p.onUploadError&&p.onUploadError(l);return}var n=i.data,t=n.UploadAuth,d=n.UploadAddress,v=n.VideoId;P.setUploadAuthAndAddress(l,t,d)}).catch(function(i){P.deleteFile(P._curIndex),P.nextUpload(),console.log(i)})}else{var c="/api/users/".concat(w,"/video_auths.json"),s="";Object(ae.a)(c,{method:"Post",body:{title:s+a,file_name:s+a,virtual_classroom_id:S}}).then(function(i){if(i){var n=i.data,t=n.UploadAuth,d=n.UploadAddress,v=n.VideoId;P.setUploadAuthAndAddress(l,t,d,v)}}).catch(function(i){P.deleteFile(P._curIndex),P.nextUpload(),console.log(i)}),console.log("\u6587\u4EF6\u5F00\u59CB\u4E0A\u4F20...")}},onUploadSucceed:function(l){p.onUploadSucceed&&p.onUploadSucceed(l),console.log("\u6587\u4EF6\u4E0A\u4F20\u6210\u529F!")},onUploadFailed:function(l,a,c){p.onUploadFailed&&p.onUploadFailed(l),console.log("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25!")},onUploadCanceled:function(l,a,c){console.log("\u6587\u4EF6\u4E0A\u4F20\u5DF2\u6682\u505C!")},onUploadProgress:function(l,a,c){p.onUploadProgress&&p.onUploadProgress(l,a,c);var s=Math.ceil(c*100);console.log("\u6587\u4EF6\u4E0A\u4F20\u4E2D...")},onUploadTokenExpired:function(l){console.log("\u6587\u4EF6\u4E0A\u4F20\u8D85\u65F6!");var a="/api/users/".concat(w,"/video_auths.json");Object(ae.a)(a,{method:"put",body:{video_id:l.videoId}}).then(function(c){var s=c.data,u=s.UploadAuth;P.resumeUploadWithAuth(u)}).catch(function(c){console.log(c)})},onUploadEnd:function(l){p.onUploadEnd&&p.onUploadEnd(l),console.log("onUploadEnd: uploaded all the files")}}),p.gotUploader&&p.gotUploader(P)}function h(p,f,l){p&&(w=p),f&&(S=f),C(l)}},BU3w:function(Je,Ke,B){"use strict";B.d(Ke,"a",function(){return S});var ae=B("MNnm"),Q="rc-util-key";function U(C){if(C.attachTo)return C.attachTo;var T=document.querySelector("head");return T||document.body}function w(C){var T,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(ae.a)())return null;var p=document.createElement("style");if((T=h.csp)===null||T===void 0?void 0:T.nonce){var f;p.nonce=(f=h.csp)===null||f===void 0?void 0:f.nonce}p.innerHTML=C;var l=U(h),a=l.firstChild;return h.prepend&&l.prepend?l.prepend(p):h.prepend&&a?l.insertBefore(p,a):l.appendChild(p),p}var P=new Map;function S(C,T){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},p=U(h);if(!P.has(p)){var f=w("",h),l=f.parentNode;P.set(p,l),l.removeChild(f)}var a=Array.from(P.get(p).children).find(function(n){return n.tagName==="STYLE"&&n[Q]===T});if(a){var c,s;if(((c=h.csp)===null||c===void 0?void 0:c.nonce)&&a.nonce!==((s=h.csp)===null||s===void 0?void 0:s.nonce)){var u;a.nonce=(u=h.csp)===null||u===void 0?void 0:u.nonce}return a.innerHTML!==C&&(a.innerHTML=C),a}var i=w(C,h);return i[Q]=T,i}},Bd2K:function(Je,Ke,B){(function(ae){ae(B("VrN/"),B("osHv"))})(function(ae){ae.defineOption("autoCloseTags",!1,function(h,p,f){if(f!=ae.Init&&f&&h.removeKeyMap("autoCloseTags"),!p)return;var l={name:"autoCloseTags"};(typeof p!="object"||p.whenClosing!==!1)&&(l["'/'"]=function(a){return S(a)}),(typeof p!="object"||p.whenOpening!==!1)&&(l["'>'"]=function(a){return w(a)}),h.addKeyMap(l)});var Q=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],U=["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 w(h){if(h.getOption("disableInput"))return ae.Pass;for(var p=h.listSelections(),f=[],l=h.getOption("autoCloseTags"),a=0;a<p.length;a++){if(!p[a].empty())return ae.Pass;var c=p[a].head,s=h.getTokenAt(c),u=ae.innerMode(h.getMode(),s.state),i=u.state,n=u.mode.xmlCurrentTag&&u.mode.xmlCurrentTag(i),t=n&&n.name;if(!t)return ae.Pass;var d=u.mode.configuration=="html",v=typeof l=="object"&&l.dontCloseTags||d&&Q,b=typeof l=="object"&&l.indentTags||d&&U;s.end>c.ch&&(t=t.slice(0,t.length-s.end+c.ch));var y=t.toLowerCase();if(!t||s.type=="string"&&(s.end!=c.ch||!/[\"\']/.test(s.string.charAt(s.string.length-1))||s.string.length==1)||s.type=="tag"&&n.close||s.string.indexOf("/")==c.ch-s.start-1||v&&C(v,y)>-1||T(h,u.mode.xmlCurrentContext&&u.mode.xmlCurrentContext(i)||[],t,c,!0))return ae.Pass;var _=typeof l=="object"&&l.emptyTags;if(_&&C(_,t)>-1){f[a]={text:"/>",newPos:ae.Pos(c.line,c.ch+2)};continue}var m=b&&C(b,y)>-1;f[a]={indent:m,text:">"+(m?`
`:"")+"</"+t+">",newPos:m?ae.Pos(c.line+1,0):ae.Pos(c.line,c.ch+1)}}for(var g=typeof l=="object"&&l.dontIndentOnAutoClose,a=p.length-1;a>=0;a--){var E=f[a];h.replaceRange(E.text,p[a].head,p[a].anchor,"+insert");var o=h.listSelections().slice(0);o[a]={head:E.newPos,anchor:E.newPos},h.setSelections(o),!g&&E.indent&&(h.indentLine(E.newPos.line,null,!0),h.indentLine(E.newPos.line+1,null,!0))}}function P(h,p){for(var f=h.listSelections(),l=[],a=p?"/":"</",c=h.getOption("autoCloseTags"),s=typeof c=="object"&&c.dontIndentOnSlash,u=0;u<f.length;u++){if(!f[u].empty())return ae.Pass;var i=f[u].head,n=h.getTokenAt(i),t=ae.innerMode(h.getMode(),n.state),d=t.state;if(p&&(n.type=="string"||n.string.charAt(0)!="<"||n.start!=i.ch-1))return ae.Pass;var v,b=t.mode.name!="xml"&&h.getMode().name=="htmlmixed";if(b&&t.mode.name=="javascript")v=a+"script";else if(b&&t.mode.name=="css")v=a+"style";else{var y=t.mode.xmlCurrentContext&&t.mode.xmlCurrentContext(d);if(!y||y.length&&T(h,y,y[y.length-1],i))return ae.Pass;v=a+y[y.length-1]}h.getLine(i.line).charAt(n.end)!=">"&&(v+=">"),l[u]=v}if(h.replaceSelections(l),f=h.listSelections(),!s)for(var u=0;u<f.length;u++)(u==f.length-1||f[u].head.line<f[u+1].head.line)&&h.indentLine(f[u].head.line)}function S(h){return h.getOption("disableInput")?ae.Pass:P(h,!0)}ae.commands.closeTag=function(h){return P(h)};function C(h,p){if(h.indexOf)return h.indexOf(p);for(var f=0,l=h.length;f<l;++f)if(h[f]==p)return f;return-1}function T(h,p,f,l,a){if(!ae.scanForClosingTag)return!1;var c=Math.min(h.lastLine()+1,l.line+500),s=ae.scanForClosingTag(h,l,null,c);if(!s||s.tag!=f)return!1;for(var u=a?1:0,i=p.length-1;i>=0&&p[i]==f;i--)++u;l=s.to;for(var i=1;i<u;i++){var n=ae.scanForClosingTag(h,l,null,c);if(!n||n.tag!=f)return!1;l=n.to}return!0}})},BdwD:function(Je,Ke,B){"use strict";var ae=B("+L6B"),Q=B("2/Rp"),U=B("0Owb"),w=B("k1fw"),P=B("cDcd"),S=B.n(P),C=B("FOrL"),T=B.n(C),h=function(f){var l=f.buttonProps,a=l===void 0?{}:l,c=f.styles,s=c===void 0?{}:c,u=f.customText,i=f.ButtonText,n=f.ButtonClick,t=f.Buttonclass,d=f.ButtonTwo;return S.a.createElement("section",{className:"tc animated fadeIn",style:Object(w.a)(Object(w.a)({},{color:"#999",margin:"200px auto"}),s)},S.a.createElement("img",{src:T.a}),S.a.createElement("p",{className:"mt20 font14"},u||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),i&&S.a.createElement(Q.a,Object(U.a)({className:t,onClick:n},a),i),d&&d)};Ke.a=h},BjJ7:function(Je,Ke,B){"use strict";B.d(Ke,"d",function(){return Q}),B.d(Ke,"c",function(){return U}),B.d(Ke,"e",function(){return w}),B.d(Ke,"b",function(){return P}),B.d(Ke,"a",function(){return C});var ae=B("m3rI");function Q(T){var h=!0;if(T.length>0){for(var p=0;p<T.length;p++)if(T[p].compile_success==0||!T[p].compile_success){h=!1;break}}else h=!1;return h}function U(T){for(var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",p=[],f=0;f<T.length;f++){var l=T[f],a=h?"".concat(h,"/").concat(l.name):"".concat(l.name);p.push({title:l.name,isLeaf:!(l.type==="tree"),key:a})}return p}function w(T,h,p){for(var f=0;f<T.length;f++){var l=T[f];if(l.key===h){l.children=p;break}l.children&&w(l.children,h,p)}return T}function P(T,h,p){var f;return function(){var l=this,a=arguments,c=function(){f=null,p||T.apply(l,a)},s=p&&!f;clearTimeout(f),f=setTimeout(c,h),s&&T.apply(l,a)}}var S=!0,C=ae.a.API_SERVER},"C+DQ":function(Je,Ke,B){},CNDd:function(Je,Ke,B){Je.exports=B.p+"static/c1.7850f139.svg"},CaVn:function(Je,Ke,B){Je.exports={flex_box_center:"flex_box_center___2wZ0h",flex_space_between:"flex_space_between___3MVWH",flex_box_vertical_center:"flex_box_vertical_center___O0jNB",flex_box_center_end:"flex_box_center_end___2q4xj",flex_box_column:"flex_box_column___13R-8",listDetails:"listDetails___3lMam",head:"head___2jzWe",name:"name___3xIfG",title:"title___3-ce8",a:"a___1ZME1",b:"b___oiiqU",tag:"tag___32Ulf",btn:"btn___lJ5fA",scroll:"scroll___anvih",video:"video___1gujl",html:"html___z0BU7",g:"g___3sfQf",btns:"btns___OWbut"}},CrYA:function(Je,Ke,B){var ae=B("MFOe"),Q=ae.Global;Je.exports={name:"sessionStorage",read:w,write:P,each:S,remove:C,clearAll:T};function U(){return Q.sessionStorage}function w(h){return U().getItem(h)}function P(h,p){return U().setItem(h,p)}function S(h){for(var p=U().length-1;p>=0;p--){var f=U().key(p);h(w(f),f)}}function C(h){return U().removeItem(h)}function T(){return U().clear()}},DlQD:function(Je,Ke,B){(function(ae,Q){Je.exports=Q()})(this,function(){"use strict";function ae(Pe,Re){for(var Oe=0;Oe<Re.length;Oe++){var he=Re[Oe];he.enumerable=he.enumerable||!1,he.configurable=!0,"value"in he&&(he.writable=!0),Object.defineProperty(Pe,he.key,he)}}function Q(Pe,Re,Oe){return Re&&ae(Pe.prototype,Re),Oe&&ae(Pe,Oe),Pe}function U(Pe,Re){if(!Pe)return;if(typeof Pe=="string")return w(Pe,Re);var Oe=Object.prototype.toString.call(Pe).slice(8,-1);if(Oe==="Object"&&Pe.constructor&&(Oe=Pe.constructor.name),Oe==="Map"||Oe==="Set")return Array.from(Pe);if(Oe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Oe))return w(Pe,Re)}function w(Pe,Re){(Re==null||Re>Pe.length)&&(Re=Pe.length);for(var Oe=0,he=new Array(Re);Oe<Re;Oe++)he[Oe]=Pe[Oe];return he}function P(Pe,Re){var Oe;if(typeof Symbol=="undefined"||Pe[Symbol.iterator]==null){if(Array.isArray(Pe)||(Oe=U(Pe))||Re&&Pe&&typeof Pe.length=="number"){Oe&&(Pe=Oe);var he=0;return function(){return he>=Pe.length?{done:!0}:{done:!1,value:Pe[he++]}}}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 Oe=Pe[Symbol.iterator](),Oe.next.bind(Oe)}function S(Pe,Re){return Re={exports:{}},Pe(Re,Re.exports),Re.exports}var C=S(function(Pe){function Re(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function Oe(he){Pe.exports.defaults=he}Pe.exports={defaults:Re(),getDefaults:Re,changeDefaults:Oe}}),T=C.defaults,h=C.getDefaults,p=C.changeDefaults,f=/[&<>"']/,l=/[&<>"']/g,a=/[<>"']|&(?!#?\w+;)/,c=/[<>"']|&(?!#?\w+;)/g,s={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},u=function(Re){return s[Re]};function i(Pe,Re){if(Re){if(f.test(Pe))return Pe.replace(l,u)}else if(a.test(Pe))return Pe.replace(c,u);return Pe}var n=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function t(Pe){return Pe.replace(n,function(Re,Oe){return Oe=Oe.toLowerCase(),Oe==="colon"?":":Oe.charAt(0)==="#"?Oe.charAt(1)==="x"?String.fromCharCode(parseInt(Oe.substring(2),16)):String.fromCharCode(+Oe.substring(1)):""})}var d=/(^|[^\[])\^/g;function v(Pe,Re){Pe=Pe.source||Pe,Re=Re||"";var Oe={replace:function(be,Ce){return Ce=Ce.source||Ce,Ce=Ce.replace(d,"$1"),Pe=Pe.replace(be,Ce),Oe},getRegex:function(){return new RegExp(Pe,Re)}};return Oe}var b=/[^\w:]/g,y=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function _(Pe,Re,Oe){if(Pe){var he;try{he=decodeURIComponent(t(Oe)).replace(b,"").toLowerCase()}catch(be){return null}if(he.indexOf("javascript:")===0||he.indexOf("vbscript:")===0||he.indexOf("data:")===0)return null}Re&&!y.test(Oe)&&(Oe=x(Re,Oe));try{Oe=encodeURI(Oe).replace(/%25/g,"%")}catch(be){return null}return Oe}var m={},g=/^[^:]+:\/*[^/]*$/,E=/^([^:]+:)[\s\S]*$/,o=/^([^:]+:\/*[^/]*)[\s\S]*$/;function x(Pe,Re){m[" "+Pe]||(g.test(Pe)?m[" "+Pe]=Pe+"/":m[" "+Pe]=I(Pe,"/",!0)),Pe=m[" "+Pe];var Oe=Pe.indexOf(":")===-1;return Re.substring(0,2)==="//"?Oe?Re:Pe.replace(E,"$1")+Re:Re.charAt(0)==="/"?Oe?Re:Pe.replace(o,"$1")+Re:Pe+Re}var A={exec:function(){}};function O(Pe){for(var Re=1,Oe,he;Re<arguments.length;Re++){Oe=arguments[Re];for(he in Oe)Object.prototype.hasOwnProperty.call(Oe,he)&&(Pe[he]=Oe[he])}return Pe}function D(Pe,Re){var Oe=Pe.replace(/\|/g,function(Ce,xe,Be){for(var Qe=!1,rt=xe;--rt>=0&&Be[rt]==="\\";)Qe=!Qe;return Qe?"|":" |"}),he=Oe.split(/ \|/),be=0;if(he.length>Re)he.splice(Re);else for(;he.length<Re;)he.push("");for(;be<he.length;be++)he[be]=he[be].trim().replace(/\\\|/g,"|");return he}function I(Pe,Re,Oe){var he=Pe.length;if(he===0)return"";for(var be=0;be<he;){var Ce=Pe.charAt(he-be-1);if(Ce===Re&&!Oe)be++;else if(Ce!==Re&&Oe)be++;else break}return Pe.substr(0,he-be)}function F(Pe,Re){if(Pe.indexOf(Re[1])===-1)return-1;for(var Oe=Pe.length,he=0,be=0;be<Oe;be++)if(Pe[be]==="\\")be++;else if(Pe[be]===Re[0])he++;else if(Pe[be]===Re[1]&&(he--,he<0))return be;return-1}function z(Pe){Pe&&Pe.sanitize&&!Pe.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}var ne={escape:i,unescape:t,edit:v,cleanUrl:_,resolveUrl:x,noopTest:A,merge:O,splitCells:D,rtrim:I,findClosingBracket:F,checkSanitizeDeprecation:z},j=C.defaults,G=ne.rtrim,X=ne.splitCells,Z=ne.escape,K=ne.findClosingBracket;function q(Pe,Re,Oe){var he=Re.href,be=Re.title?Z(Re.title):null,Ce=Pe[1].replace(/\\([\[\]])/g,"$1");return Pe[0].charAt(0)!=="!"?{type:"link",raw:Oe,href:he,title:be,text:Ce}:{type:"image",raw:Oe,href:he,title:be,text:Z(Ce)}}function ie(Pe,Re){var Oe=Pe.match(/^(\s+)(?:```)/);if(Oe===null)return Re;var he=Oe[1];return Re.split(`
`).map(function(be){var Ce=be.match(/^\s+/);if(Ce===null)return be;var xe=Ce[0];return xe.length>=he.length?be.slice(he.length):be}).join(`
`)}var oe=function(){function Pe(Oe){this.options=Oe||j}var Re=Pe.prototype;return Re.space=function(he){var be=this.rules.block.newline.exec(he);if(be)return be[0].length>1?{type:"space",raw:be[0]}:{raw:`
`}},Re.code=function(he,be){var Ce=this.rules.block.code.exec(he);if(Ce){var xe=be[be.length-1];if(xe&&xe.type==="paragraph")return{raw:Ce[0],text:Ce[0].trimRight()};var Be=Ce[0].replace(/^ {4}/gm,"");return{type:"code",raw:Ce[0],codeBlockStyle:"indented",text:this.options.pedantic?Be:G(Be,`
`)}}},Re.fences=function(he){var be=this.rules.block.fences.exec(he);if(be){var Ce=be[0],xe=ie(Ce,be[3]||"");return{type:"code",raw:Ce,lang:be[2]?be[2].trim():be[2],text:xe}}},Re.heading=function(he){var be=this.rules.block.heading.exec(he);if(be)return{type:"heading",raw:be[0],depth:be[1].length,text:be[2]}},Re.nptable=function(he){var be=this.rules.block.nptable.exec(he);if(be){var Ce={type:"table",header:X(be[1].replace(/^ *| *\| *$/g,"")),align:be[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:be[3]?be[3].replace(/\n$/,"").split(`
`):[],raw:be[0]};if(Ce.header.length===Ce.align.length){var xe=Ce.align.length,Be;for(Be=0;Be<xe;Be++)/^ *-+: *$/.test(Ce.align[Be])?Ce.align[Be]="right":/^ *:-+: *$/.test(Ce.align[Be])?Ce.align[Be]="center":/^ *:-+ *$/.test(Ce.align[Be])?Ce.align[Be]="left":Ce.align[Be]=null;for(xe=Ce.cells.length,Be=0;Be<xe;Be++)Ce.cells[Be]=X(Ce.cells[Be],Ce.header.length);return Ce}}},Re.hr=function(he){var be=this.rules.block.hr.exec(he);if(be)return{type:"hr",raw:be[0]}},Re.blockquote=function(he){var be=this.rules.block.blockquote.exec(he);if(be){var Ce=be[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:be[0],text:Ce}}},Re.list=function(he){var be=this.rules.block.list.exec(he);if(be){for(var Ce=be[0],xe=be[2],Be=xe.length>1,Qe=xe[xe.length-1]===")",rt={type:"list",raw:Ce,ordered:Be,start:Be?+xe.slice(0,-1):"",loose:!1,items:[]},dt=be[0].match(this.rules.block.item),xt=!1,_t,wt,st,ut,$e,_e,je,ct=dt.length,et=0;et<ct;et++)_t=dt[et],Ce=_t,wt=_t.length,_t=_t.replace(/^ *([*+-]|\d+[.)]) */,""),~_t.indexOf(`
`)&&(wt-=_t.length,_t=this.options.pedantic?_t.replace(/^ {1,4}/gm,""):_t.replace(new RegExp("^ {1,"+wt+"}","gm"),"")),et!==ct-1&&(st=this.rules.block.bullet.exec(dt[et+1])[0],(Be?st.length===1||!Qe&&st[st.length-1]===")":st.length>1||this.options.smartLists&&st!==xe)&&(ut=dt.slice(et+1).join(`
`),rt.raw=rt.raw.substring(0,rt.raw.length-ut.length),et=ct-1)),$e=xt||/\n\n(?!\s*$)/.test(_t),et!==ct-1&&(xt=_t.charAt(_t.length-1)===`
`,$e||($e=xt)),$e&&(rt.loose=!0),_e=/^\[[ xX]\] /.test(_t),je=void 0,_e&&(je=_t[1]!==" ",_t=_t.replace(/^\[[ xX]\] +/,"")),rt.items.push({type:"list_item",raw:Ce,task:_e,checked:je,loose:$e,text:_t});return rt}},Re.html=function(he){var be=this.rules.block.html.exec(he);if(be)return{type:this.options.sanitize?"paragraph":"html",raw:be[0],pre:!this.options.sanitizer&&(be[1]==="pre"||be[1]==="script"||be[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(be[0]):Z(be[0]):be[0]}},Re.def=function(he){var be=this.rules.block.def.exec(he);if(be){be[3]&&(be[3]=be[3].substring(1,be[3].length-1));var Ce=be[1].toLowerCase().replace(/\s+/g," ");return{tag:Ce,raw:be[0],href:be[2],title:be[3]}}},Re.table=function(he){var be=this.rules.block.table.exec(he);if(be){var Ce={type:"table",header:X(be[1].replace(/^ *| *\| *$/g,"")),align:be[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:be[3]?be[3].replace(/\n$/,"").split(`
`):[]};if(Ce.header.length===Ce.align.length){Ce.raw=be[0];var xe=Ce.align.length,Be;for(Be=0;Be<xe;Be++)/^ *-+: *$/.test(Ce.align[Be])?Ce.align[Be]="right":/^ *:-+: *$/.test(Ce.align[Be])?Ce.align[Be]="center":/^ *:-+ *$/.test(Ce.align[Be])?Ce.align[Be]="left":Ce.align[Be]=null;for(xe=Ce.cells.length,Be=0;Be<xe;Be++)Ce.cells[Be]=X(Ce.cells[Be].replace(/^ *\| *| *\| *$/g,""),Ce.header.length);return Ce}}},Re.lheading=function(he){var be=this.rules.block.lheading.exec(he);if(be)return{type:"heading",raw:be[0],depth:be[2].charAt(0)==="="?1:2,text:be[1]}},Re.paragraph=function(he){var be=this.rules.block.paragraph.exec(he);if(be)return{type:"paragraph",raw:be[0],text:be[1].charAt(be[1].length-1)===`
`?be[1].slice(0,-1):be[1]}},Re.text=function(he,be){var Ce=this.rules.block.text.exec(he);if(Ce){var xe=be[be.length-1];return xe&&xe.type==="text"?{raw:Ce[0],text:Ce[0]}:{type:"text",raw:Ce[0],text:Ce[0]}}},Re.escape=function(he){var be=this.rules.inline.escape.exec(he);if(be)return{type:"escape",raw:be[0],text:Z(be[1])}},Re.tag=function(he,be,Ce){var xe=this.rules.inline.tag.exec(he);if(xe)return!be&&/^<a /i.test(xe[0])?be=!0:be&&/^<\/a>/i.test(xe[0])&&(be=!1),!Ce&&/^<(pre|code|kbd|script)(\s|>)/i.test(xe[0])?Ce=!0:Ce&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(xe[0])&&(Ce=!1),{type:this.options.sanitize?"text":"html",raw:xe[0],inLink:be,inRawBlock:Ce,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(xe[0]):Z(xe[0]):xe[0]}},Re.link=function(he){var be=this.rules.inline.link.exec(he);if(be){var Ce=K(be[2],"()");if(Ce>-1){var xe=be[0].indexOf("!")===0?5:4,Be=xe+be[1].length+Ce;be[2]=be[2].substring(0,Ce),be[0]=be[0].substring(0,Be).trim(),be[3]=""}var Qe=be[2],rt="";if(this.options.pedantic){var dt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Qe);dt?(Qe=dt[1],rt=dt[3]):rt=""}else rt=be[3]?be[3].slice(1,-1):"";Qe=Qe.trim().replace(/^<([\s\S]*)>$/,"$1");var xt=q(be,{href:Qe&&Qe.replace(this.rules.inline._escapes,"$1"),title:rt&&rt.replace(this.rules.inline._escapes,"$1")},be[0]);return xt}},Re.reflink=function(he,be){var Ce;if((Ce=this.rules.inline.reflink.exec(he))||(Ce=this.rules.inline.nolink.exec(he))){var xe=(Ce[2]||Ce[1]).replace(/\s+/g," ");if(xe=be[xe.toLowerCase()],!xe||!xe.href){var Be=Ce[0].charAt(0);return{type:"text",raw:Be,text:Be}}var Qe=q(Ce,xe,Ce[0]);return Qe}},Re.strong=function(he,be,Ce){Ce===void 0&&(Ce="");var xe=this.rules.inline.strong.start.exec(he);if(xe&&(!xe[1]||xe[1]&&(Ce===""||this.rules.inline.punctuation.exec(Ce)))){be=be.slice(-1*he.length);var Be=xe[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Be.lastIndex=0;for(var Qe;(xe=Be.exec(be))!=null;)if(Qe=this.rules.inline.strong.middle.exec(be.slice(0,xe.index+3)),Qe)return{type:"strong",raw:he.slice(0,Qe[0].length),text:he.slice(2,Qe[0].length-2)}}},Re.em=function(he,be,Ce){Ce===void 0&&(Ce="");var xe=this.rules.inline.em.start.exec(he);if(xe&&(!xe[1]||xe[1]&&(Ce===""||this.rules.inline.punctuation.exec(Ce)))){be=be.slice(-1*he.length);var Be=xe[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Be.lastIndex=0;for(var Qe;(xe=Be.exec(be))!=null;)if(Qe=this.rules.inline.em.middle.exec(be.slice(0,xe.index+2)),Qe)return{type:"em",raw:he.slice(0,Qe[0].length),text:he.slice(1,Qe[0].length-1)}}},Re.codespan=function(he){var be=this.rules.inline.code.exec(he);if(be){var Ce=be[2].replace(/\n/g," "),xe=/[^ ]/.test(Ce),Be=Ce.startsWith(" ")&&Ce.endsWith(" ");return xe&&Be&&(Ce=Ce.substring(1,Ce.length-1)),Ce=Z(Ce,!0),{type:"codespan",raw:be[0],text:Ce}}},Re.br=function(he){var be=this.rules.inline.br.exec(he);if(be)return{type:"br",raw:be[0]}},Re.del=function(he){var be=this.rules.inline.del.exec(he);if(be)return{type:"del",raw:be[0],text:be[1]}},Re.autolink=function(he,be){var Ce=this.rules.inline.autolink.exec(he);if(Ce){var xe,Be;return Ce[2]==="@"?(xe=Z(this.options.mangle?be(Ce[1]):Ce[1]),Be="mailto:"+xe):(xe=Z(Ce[1]),Be=xe),{type:"link",raw:Ce[0],text:xe,href:Be,tokens:[{type:"text",raw:xe,text:xe}]}}},Re.url=function(he,be){var Ce;if(Ce=this.rules.inline.url.exec(he)){var xe,Be;if(Ce[2]==="@")xe=Z(this.options.mangle?be(Ce[0]):Ce[0]),Be="mailto:"+xe;else{var Qe;do Qe=Ce[0],Ce[0]=this.rules.inline._backpedal.exec(Ce[0])[0];while(Qe!==Ce[0]);xe=Z(Ce[0]),Ce[1]==="www."?Be="http://"+xe:Be=xe}return{type:"link",raw:Ce[0],text:xe,href:Be,tokens:[{type:"text",raw:xe,text:xe}]}}},Re.inlineText=function(he,be,Ce){var xe=this.rules.inline.text.exec(he);if(xe){var Be;return be?Be=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(xe[0]):Z(xe[0]):xe[0]:Be=Z(this.options.smartypants?Ce(xe[0]):xe[0]),{type:"text",raw:xe[0],text:Be}}},Pe}(),ye=ne.noopTest,pe=ne.edit,we=ne.merge,fe={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:ye,table:ye,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};fe._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,fe._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,fe.def=pe(fe.def).replace("label",fe._label).replace("title",fe._title).getRegex(),fe.bullet=/(?:[*+-]|\d{1,9}[.)])/,fe.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,fe.item=pe(fe.item,"gm").replace(/bull/g,fe.bullet).getRegex(),fe.list=pe(fe.list).replace(/bull/g,fe.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+fe.def.source+")").getRegex(),fe._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",fe._comment=/<!--(?!-?>)[\s\S]*?-->/,fe.html=pe(fe.html,"i").replace("comment",fe._comment).replace("tag",fe._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),fe.paragraph=pe(fe._paragraph).replace("hr",fe.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",fe._tag).getRegex(),fe.blockquote=pe(fe.blockquote).replace("paragraph",fe.paragraph).getRegex(),fe.normal=we({},fe),fe.gfm=we({},fe.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),fe.gfm.nptable=pe(fe.gfm.nptable).replace("hr",fe.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",fe._tag).getRegex(),fe.gfm.table=pe(fe.gfm.table).replace("hr",fe.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",fe._tag).getRegex(),fe.pedantic=we({},fe.normal,{html:pe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",fe._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:ye,paragraph:pe(fe.normal._paragraph).replace("hr",fe.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",fe.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var Te={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ye,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:ye,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};Te._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Te.punctuation=pe(Te.punctuation).replace(/punctuation/g,Te._punctuation).getRegex(),Te._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",Te._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",Te.em.start=pe(Te.em.start).replace(/punctuation/g,Te._punctuation).getRegex(),Te.em.middle=pe(Te.em.middle).replace(/punctuation/g,Te._punctuation).replace(/overlapSkip/g,Te._overlapSkip).getRegex(),Te.em.endAst=pe(Te.em.endAst,"g").replace(/punctuation/g,Te._punctuation).getRegex(),Te.em.endUnd=pe(Te.em.endUnd,"g").replace(/punctuation/g,Te._punctuation).getRegex(),Te.strong.start=pe(Te.strong.start).replace(/punctuation/g,Te._punctuation).getRegex(),Te.strong.middle=pe(Te.strong.middle).replace(/punctuation/g,Te._punctuation).replace(/blockSkip/g,Te._blockSkip).getRegex(),Te.strong.endAst=pe(Te.strong.endAst,"g").replace(/punctuation/g,Te._punctuation).getRegex(),Te.strong.endUnd=pe(Te.strong.endUnd,"g").replace(/punctuation/g,Te._punctuation).getRegex(),Te.blockSkip=pe(Te._blockSkip,"g").getRegex(),Te.overlapSkip=pe(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=pe(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=pe(Te.tag).replace("comment",fe._comment).replace("attribute",Te._attribute).getRegex(),Te._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Te._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,Te._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Te.link=pe(Te.link).replace("label",Te._label).replace("href",Te._href).replace("title",Te._title).getRegex(),Te.reflink=pe(Te.reflink).replace("label",Te._label).getRegex(),Te.reflinkSearch=pe(Te.reflinkSearch,"g").replace("reflink",Te.reflink).replace("nolink",Te.nolink).getRegex(),Te.normal=we({},Te),Te.pedantic=we({},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:pe(/^!?\[(label)\]\((.*?)\)/).replace("label",Te._label).getRegex(),reflink:pe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Te._label).getRegex()}),Te.gfm=we({},Te.normal,{escape:pe(Te.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),Te.gfm.url=pe(Te.gfm.url,"i").replace("email",Te.gfm._extended_email).getRegex(),Te.breaks=we({},Te.gfm,{br:pe(Te.br).replace("{2,}","*").getRegex(),text:pe(Te.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Fe={block:fe,inline:Te},De=C.defaults,Me=Fe.block,Ue=Fe.inline;function ve(Pe){return Pe.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function ce(Pe){var Re="",Oe,he,be=Pe.length;for(Oe=0;Oe<be;Oe++)he=Pe.charCodeAt(Oe),Math.random()>.5&&(he="x"+he.toString(16)),Re+="&#"+he+";";return Re}var Ie=function(){function Pe(Oe){this.tokens=[],this.tokens.links=Object.create(null),this.options=Oe||De,this.options.tokenizer=this.options.tokenizer||new oe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var he={block:Me.normal,inline:Ue.normal};this.options.pedantic?(he.block=Me.pedantic,he.inline=Ue.pedantic):this.options.gfm&&(he.block=Me.gfm,this.options.breaks?he.inline=Ue.breaks:he.inline=Ue.gfm),this.tokenizer.rules=he}Pe.lex=function(he,be){var Ce=new Pe(be);return Ce.lex(he)};var Re=Pe.prototype;return Re.lex=function(he){return he=he.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(he,this.tokens,!0),this.inline(this.tokens),this.tokens},Re.blockTokens=function(he,be,Ce){be===void 0&&(be=[]),Ce===void 0&&(Ce=!0),he=he.replace(/^ +$/gm,"");for(var xe,Be,Qe,rt;he;){if(xe=this.tokenizer.space(he)){he=he.substring(xe.raw.length),xe.type&&be.push(xe);continue}if(xe=this.tokenizer.code(he,be)){he=he.substring(xe.raw.length),xe.type?be.push(xe):(rt=be[be.length-1],rt.raw+=`
`+xe.raw,rt.text+=`
`+xe.text);continue}if(xe=this.tokenizer.fences(he)){he=he.substring(xe.raw.length),be.push(xe);continue}if(xe=this.tokenizer.heading(he)){he=he.substring(xe.raw.length),be.push(xe);continue}if(xe=this.tokenizer.nptable(he)){he=he.substring(xe.raw.length),be.push(xe);continue}if(xe=this.tokenizer.hr(he)){he=he.substring(xe.raw.length),be.push(xe);continue}if(xe=this.tokenizer.blockquote(he)){he=he.substring(xe.raw.length),xe.tokens=this.blockTokens(xe.text,[],Ce),be.push(xe);continue}if(xe=this.tokenizer.list(he)){for(he=he.substring(xe.raw.length),Qe=xe.items.length,Be=0;Be<Qe;Be++)xe.items[Be].tokens=this.blockTokens(xe.items[Be].text,[],!1);be.push(xe);continue}if(xe=this.tokenizer.html(he)){he=he.substring(xe.raw.length),be.push(xe);continue}if(Ce&&(xe=this.tokenizer.def(he))){he=he.substring(xe.raw.length),this.tokens.links[xe.tag]||(this.tokens.links[xe.tag]={href:xe.href,title:xe.title});continue}if(xe=this.tokenizer.table(he)){he=he.substring(xe.raw.length),be.push(xe);continue}if(xe=this.tokenizer.lheading(he)){he=he.substring(xe.raw.length),be.push(xe);continue}if(Ce&&(xe=this.tokenizer.paragraph(he))){he=he.substring(xe.raw.length),be.push(xe);continue}if(xe=this.tokenizer.text(he,be)){he=he.substring(xe.raw.length),xe.type?be.push(xe):(rt=be[be.length-1],rt.raw+=`
`+xe.raw,rt.text+=`
`+xe.text);continue}if(he){var dt="Infinite loop on byte: "+he.charCodeAt(0);if(this.options.silent){console.error(dt);break}else throw new Error(dt)}}return be},Re.inline=function(he){var be,Ce,xe,Be,Qe,rt,dt=he.length;for(be=0;be<dt;be++){rt=he[be];switch(rt.type){case"paragraph":case"text":case"heading":{rt.tokens=[],this.inlineTokens(rt.text,rt.tokens);break}case"table":{for(rt.tokens={header:[],cells:[]},Be=rt.header.length,Ce=0;Ce<Be;Ce++)rt.tokens.header[Ce]=[],this.inlineTokens(rt.header[Ce],rt.tokens.header[Ce]);for(Be=rt.cells.length,Ce=0;Ce<Be;Ce++)for(Qe=rt.cells[Ce],rt.tokens.cells[Ce]=[],xe=0;xe<Qe.length;xe++)rt.tokens.cells[Ce][xe]=[],this.inlineTokens(Qe[xe],rt.tokens.cells[Ce][xe]);break}case"blockquote":{this.inline(rt.tokens);break}case"list":{for(Be=rt.items.length,Ce=0;Ce<Be;Ce++)this.inline(rt.items[Ce].tokens);break}}}return he},Re.inlineTokens=function(he,be,Ce,xe,Be){be===void 0&&(be=[]),Ce===void 0&&(Ce=!1),xe===void 0&&(xe=!1),Be===void 0&&(Be="");var Qe,rt=he,dt;if(this.tokens.links){var xt=Object.keys(this.tokens.links);if(xt.length>0)for(;(dt=this.tokenizer.rules.inline.reflinkSearch.exec(rt))!=null;)xt.includes(dt[0].slice(dt[0].lastIndexOf("[")+1,-1))&&(rt=rt.slice(0,dt.index)+"["+"a".repeat(dt[0].length-2)+"]"+rt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(dt=this.tokenizer.rules.inline.blockSkip.exec(rt))!=null;)rt=rt.slice(0,dt.index)+"["+"a".repeat(dt[0].length-2)+"]"+rt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;he;){if(Qe=this.tokenizer.escape(he)){he=he.substring(Qe.raw.length),be.push(Qe);continue}if(Qe=this.tokenizer.tag(he,Ce,xe)){he=he.substring(Qe.raw.length),Ce=Qe.inLink,xe=Qe.inRawBlock,be.push(Qe);continue}if(Qe=this.tokenizer.link(he)){he=he.substring(Qe.raw.length),Qe.type==="link"&&(Qe.tokens=this.inlineTokens(Qe.text,[],!0,xe)),be.push(Qe);continue}if(Qe=this.tokenizer.reflink(he,this.tokens.links)){he=he.substring(Qe.raw.length),Qe.type==="link"&&(Qe.tokens=this.inlineTokens(Qe.text,[],!0,xe)),be.push(Qe);continue}if(Qe=this.tokenizer.strong(he,rt,Be)){he=he.substring(Qe.raw.length),Qe.tokens=this.inlineTokens(Qe.text,[],Ce,xe),be.push(Qe);continue}if(Qe=this.tokenizer.em(he,rt,Be)){he=he.substring(Qe.raw.length),Qe.tokens=this.inlineTokens(Qe.text,[],Ce,xe),be.push(Qe);continue}if(Qe=this.tokenizer.codespan(he)){he=he.substring(Qe.raw.length),be.push(Qe);continue}if(Qe=this.tokenizer.br(he)){he=he.substring(Qe.raw.length),be.push(Qe);continue}if(Qe=this.tokenizer.del(he)){he=he.substring(Qe.raw.length),Qe.tokens=this.inlineTokens(Qe.text,[],Ce,xe),be.push(Qe);continue}if(Qe=this.tokenizer.autolink(he,ce)){he=he.substring(Qe.raw.length),be.push(Qe);continue}if(!Ce&&(Qe=this.tokenizer.url(he,ce))){he=he.substring(Qe.raw.length),be.push(Qe);continue}if(Qe=this.tokenizer.inlineText(he,xe,ve)){he=he.substring(Qe.raw.length),Be=Qe.raw.slice(-1),be.push(Qe);continue}if(he){var _t="Infinite loop on byte: "+he.charCodeAt(0);if(this.options.silent){console.error(_t);break}else throw new Error(_t)}}return be},Q(Pe,null,[{key:"rules",get:function(){return{block:Me,inline:Ue}}}]),Pe}(),Ne=C.defaults,Xe=ne.cleanUrl,ee=ne.escape,k=function(){function Pe(Oe){this.options=Oe||Ne}var Re=Pe.prototype;return Re.code=function(he,be,Ce){var xe=(be||"").match(/\S*/)[0];if(this.options.highlight){var Be=this.options.highlight(he,xe);Be!=null&&Be!==he&&(Ce=!0,he=Be)}return xe?'<pre><code class="'+this.options.langPrefix+ee(xe,!0)+'">'+(Ce?he:ee(he,!0))+`</code></pre>
`:"<pre><code>"+(Ce?he:ee(he,!0))+`</code></pre>
`},Re.blockquote=function(he){return`<blockquote>
`+he+`</blockquote>
`},Re.html=function(he){return he},Re.heading=function(he,be,Ce,xe){return this.options.headerIds?"<h"+be+' id="'+this.options.headerPrefix+xe.slug(Ce)+'">'+he+"</h"+be+`>
`:"<h"+be+">"+he+"</h"+be+`>
`},Re.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},Re.list=function(he,be,Ce){var xe=be?"ol":"ul",Be=be&&Ce!==1?' start="'+Ce+'"':"";return"<"+xe+Be+`>
`+he+"</"+xe+`>
`},Re.listitem=function(he){return"<li>"+he+`</li>
`},Re.checkbox=function(he){return"<input "+(he?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Re.paragraph=function(he){return"<p>"+he+`</p>
`},Re.table=function(he,be){return be&&(be="<tbody>"+be+"</tbody>"),`<table>
<thead>
`+he+`</thead>
`+be+`</table>
`},Re.tablerow=function(he){return`<tr>
`+he+`</tr>
`},Re.tablecell=function(he,be){var Ce=be.header?"th":"td",xe=be.align?"<"+Ce+' align="'+be.align+'">':"<"+Ce+">";return xe+he+"</"+Ce+`>
`},Re.strong=function(he){return"<strong>"+he+"</strong>"},Re.em=function(he){return"<em>"+he+"</em>"},Re.codespan=function(he){return"<code>"+he+"</code>"},Re.br=function(){return this.options.xhtml?"<br/>":"<br>"},Re.del=function(he){return"<del>"+he+"</del>"},Re.link=function(he,be,Ce){if(he=Xe(this.options.sanitize,this.options.baseUrl,he),he===null)return Ce;var xe='<a href="'+ee(he)+'"';return be&&(xe+=' title="'+be+'"'),xe+=">"+Ce+"</a>",xe},Re.image=function(he,be,Ce){if(he=Xe(this.options.sanitize,this.options.baseUrl,he),he===null)return Ce;var xe='<img src="'+he+'" alt="'+Ce+'"';return be&&(xe+=' title="'+be+'"'),xe+=this.options.xhtml?"/>":">",xe},Re.text=function(he){return he},Pe}(),N=function(){function Pe(){}var Re=Pe.prototype;return Re.strong=function(he){return he},Re.em=function(he){return he},Re.codespan=function(he){return he},Re.del=function(he){return he},Re.html=function(he){return he},Re.text=function(he){return he},Re.link=function(he,be,Ce){return""+Ce},Re.image=function(he,be,Ce){return""+Ce},Re.br=function(){return""},Pe}(),$=function(){function Pe(){this.seen={}}var Re=Pe.prototype;return Re.slug=function(he){var be=he.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(be)){var Ce=be;do this.seen[Ce]++,be=Ce+"-"+this.seen[Ce];while(this.seen.hasOwnProperty(be))}return this.seen[be]=0,be},Pe}(),V=C.defaults,Y=ne.unescape,me=function(){function Pe(Oe){this.options=Oe||V,this.options.renderer=this.options.renderer||new k,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new N,this.slugger=new $}Pe.parse=function(he,be){var Ce=new Pe(be);return Ce.parse(he)};var Re=Pe.prototype;return Re.parse=function(he,be){be===void 0&&(be=!0);var Ce="",xe,Be,Qe,rt,dt,xt,_t,wt,st,ut,$e,_e,je,ct,et,At,Ct,lt,gt=he.length;for(xe=0;xe<gt;xe++){ut=he[xe];switch(ut.type){case"space":continue;case"hr":{Ce+=this.renderer.hr();continue}case"heading":{Ce+=this.renderer.heading(this.parseInline(ut.tokens),ut.depth,Y(this.parseInline(ut.tokens,this.textRenderer)),this.slugger);continue}case"code":{Ce+=this.renderer.code(ut.text,ut.lang,ut.escaped);continue}case"table":{for(wt="",_t="",rt=ut.header.length,Be=0;Be<rt;Be++)_t+=this.renderer.tablecell(this.parseInline(ut.tokens.header[Be]),{header:!0,align:ut.align[Be]});for(wt+=this.renderer.tablerow(_t),st="",rt=ut.cells.length,Be=0;Be<rt;Be++){for(xt=ut.tokens.cells[Be],_t="",dt=xt.length,Qe=0;Qe<dt;Qe++)_t+=this.renderer.tablecell(this.parseInline(xt[Qe]),{header:!1,align:ut.align[Qe]});st+=this.renderer.tablerow(_t)}Ce+=this.renderer.table(wt,st);continue}case"blockquote":{st=this.parse(ut.tokens),Ce+=this.renderer.blockquote(st);continue}case"list":{for($e=ut.ordered,_e=ut.start,je=ut.loose,rt=ut.items.length,st="",Be=0;Be<rt;Be++)et=ut.items[Be],At=et.checked,Ct=et.task,ct="",et.task&&(lt=this.renderer.checkbox(At),je?et.tokens.length>0&&et.tokens[0].type==="text"?(et.tokens[0].text=lt+" "+et.tokens[0].text,et.tokens[0].tokens&&et.tokens[0].tokens.length>0&&et.tokens[0].tokens[0].type==="text"&&(et.tokens[0].tokens[0].text=lt+" "+et.tokens[0].tokens[0].text)):et.tokens.unshift({type:"text",text:lt}):ct+=lt),ct+=this.parse(et.tokens,je),st+=this.renderer.listitem(ct,Ct,At);Ce+=this.renderer.list(st,$e,_e);continue}case"html":{Ce+=this.renderer.html(ut.text);continue}case"paragraph":{Ce+=this.renderer.paragraph(this.parseInline(ut.tokens));continue}case"text":{for(st=ut.tokens?this.parseInline(ut.tokens):ut.text;xe+1<gt&&he[xe+1].type==="text";)ut=he[++xe],st+=`
`+(ut.tokens?this.parseInline(ut.tokens):ut.text);Ce+=be?this.renderer.paragraph(st):st;continue}default:{var kt='Token with "'+ut.type+'" type was not found.';if(this.options.silent){console.error(kt);return}else throw new Error(kt)}}}return Ce},Re.parseInline=function(he,be){be=be||this.renderer;var Ce="",xe,Be,Qe=he.length;for(xe=0;xe<Qe;xe++){Be=he[xe];switch(Be.type){case"escape":{Ce+=be.text(Be.text);break}case"html":{Ce+=be.html(Be.text);break}case"link":{Ce+=be.link(Be.href,Be.title,this.parseInline(Be.tokens,be));break}case"image":{Ce+=be.image(Be.href,Be.title,Be.text);break}case"strong":{Ce+=be.strong(this.parseInline(Be.tokens,be));break}case"em":{Ce+=be.em(this.parseInline(Be.tokens,be));break}case"codespan":{Ce+=be.codespan(Be.text);break}case"br":{Ce+=be.br();break}case"del":{Ce+=be.del(this.parseInline(Be.tokens,be));break}case"text":{Ce+=be.text(Be.text);break}default:{var rt='Token with "'+Be.type+'" type was not found.';if(this.options.silent){console.error(rt);return}else throw new Error(rt)}}}return Ce},Pe}(),Ae=ne.merge,at=ne.checkSanitizeDeprecation,Le=ne.escape,ke=C.getDefaults,Ye=C.changeDefaults,Ze=C.defaults;function Ve(Pe,Re,Oe){if(typeof Pe=="undefined"||Pe===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Pe!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Pe)+", string expected");if(typeof Re=="function"&&(Oe=Re,Re=null),Re=Ae({},Ve.defaults,Re||{}),at(Re),Oe){var he=Re.highlight,be;try{be=Ie.lex(Pe,Re)}catch(Qe){return Oe(Qe)}var Ce=function(rt){var dt;if(!rt)try{dt=me.parse(be,Re)}catch(xt){rt=xt}return Re.highlight=he,rt?Oe(rt):Oe(null,dt)};if(!he||he.length<3)return Ce();if(delete Re.highlight,!be.length)return Ce();var xe=0;Ve.walkTokens(be,function(Qe){Qe.type==="code"&&(xe++,setTimeout(function(){he(Qe.text,Qe.lang,function(rt,dt){if(rt)return Ce(rt);dt!=null&&dt!==Qe.text&&(Qe.text=dt,Qe.escaped=!0),xe--,xe===0&&Ce()})},0))}),xe===0&&Ce();return}try{var Be=Ie.lex(Pe,Re);return Re.walkTokens&&Ve.walkTokens(Be,Re.walkTokens),me.parse(Be,Re)}catch(Qe){if(Qe.message+=`
Please report this to https://github.com/markedjs/marked.`,Re.silent)return"<p>An error occurred:</p><pre>"+Le(Qe.message+"",!0)+"</pre>";throw Qe}}Ve.options=Ve.setOptions=function(Pe){return Ae(Ve.defaults,Pe),Ye(Ve.defaults),Ve},Ve.getDefaults=ke,Ve.defaults=Ze,Ve.use=function(Pe){var Re=Ae({},Pe);if(Pe.renderer&&function(){var he=Ve.defaults.renderer||new k,be=function(Be){var Qe=he[Be];he[Be]=function(){for(var rt=arguments.length,dt=new Array(rt),xt=0;xt<rt;xt++)dt[xt]=arguments[xt];var _t=Pe.renderer[Be].apply(he,dt);return _t===!1&&(_t=Qe.apply(he,dt)),_t}};for(var Ce in Pe.renderer)be(Ce);Re.renderer=he}(),Pe.tokenizer&&function(){var he=Ve.defaults.tokenizer||new oe,be=function(Be){var Qe=he[Be];he[Be]=function(){for(var rt=arguments.length,dt=new Array(rt),xt=0;xt<rt;xt++)dt[xt]=arguments[xt];var _t=Pe.tokenizer[Be].apply(he,dt);return _t===!1&&(_t=Qe.apply(he,dt)),_t}};for(var Ce in Pe.tokenizer)be(Ce);Re.tokenizer=he}(),Pe.walkTokens){var Oe=Ve.defaults.walkTokens;Re.walkTokens=function(he){Pe.walkTokens(he),Oe&&Oe(he)}}Ve.setOptions(Re)},Ve.walkTokens=function(Pe,Re){for(var Oe=P(Pe),he;!(he=Oe()).done;){var be=he.value;Re(be);switch(be.type){case"table":{for(var Ce=P(be.tokens.header),xe;!(xe=Ce()).done;){var Be=xe.value;Ve.walkTokens(Be,Re)}for(var Qe=P(be.tokens.cells),rt;!(rt=Qe()).done;)for(var dt=rt.value,xt=P(dt),_t;!(_t=xt()).done;){var wt=_t.value;Ve.walkTokens(wt,Re)}break}case"list":{Ve.walkTokens(be.items,Re);break}default:be.tokens&&Ve.walkTokens(be.tokens,Re)}}},Ve.Parser=me,Ve.parser=me.parse,Ve.Renderer=k,Ve.TextRenderer=N,Ve.Lexer=Ie,Ve.lexer=Ie.lex,Ve.Tokenizer=oe,Ve.Slugger=$,Ve.parse=Ve;var He=Ve;return He})},"DlR+":function(Je,Ke,B){var ae=B("MFOe"),Q=ae.Global,U=ae.trim;Je.exports={name:"cookieStorage",read:P,write:C,each:S,remove:T,clearAll:h};var w=Q.document;function P(f){if(!f||!p(f))return null;var l="(?:^|.*;\\s*)"+escape(f).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(w.cookie.replace(new RegExp(l),"$1"))}function S(f){for(var l=w.cookie.split(/; ?/g),a=l.length-1;a>=0;a--){if(!U(l[a]))continue;var c=l[a].split("="),s=unescape(c[0]),u=unescape(c[1]);f(u,s)}}function C(f,l){if(!f)return;w.cookie=escape(f)+"="+escape(l)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function T(f){if(!f||!p(f))return;w.cookie=escape(f)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function h(){S(function(f,l){T(l)})}function p(f){return new RegExp("(?:^|;\\s*)"+escape(f).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(w.cookie)}},E2g8:function(Je,Ke,B){(function(ae,Q){/*!
* @overview es6-promise - a tiny implementation of Promises/A+.
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
* @version v4.2.8+1e68dce6
*/(function(U,w){Je.exports=w()})(this,function(){"use strict";function U(k){var N=typeof k;return k!==null&&(N==="object"||N==="function")}function w(k){return typeof k=="function"}var P=void 0;Array.isArray?P=Array.isArray:P=function(k){return Object.prototype.toString.call(k)==="[object Array]"};var S=P,C=0,T=void 0,h=void 0,p=function(N,$){y[C]=N,y[C+1]=$,C+=2,C===2&&(h?h(_):g())};function f(k){h=k}function l(k){p=k}var a=typeof window!="undefined"?window:void 0,c=a||{},s=c.MutationObserver||c.WebKitMutationObserver,u=typeof self=="undefined"&&typeof ae!="undefined"&&{}.toString.call(ae)==="[object process]",i=typeof Uint8ClampedArray!="undefined"&&typeof importScripts!="undefined"&&typeof MessageChannel!="undefined";function n(){return function(){return ae.nextTick(_)}}function t(){return typeof T!="undefined"?function(){T(_)}:b()}function d(){var k=0,N=new s(_),$=document.createTextNode("");return N.observe($,{characterData:!0}),function(){$.data=k=++k%2}}function v(){var k=new MessageChannel;return k.port1.onmessage=_,function(){return k.port2.postMessage(0)}}function b(){var k=setTimeout;return function(){return k(_,1)}}var y=new Array(1e3);function _(){for(var k=0;k<C;k+=2){var N=y[k],$=y[k+1];N($),y[k]=void 0,y[k+1]=void 0}C=0}function m(){try{var k=Function("return this")().require("vertx");return T=k.runOnLoop||k.runOnContext,t()}catch(N){return b()}}var g=void 0;u?g=n():s?g=d():i?g=v():a===void 0&&!0?g=m():g=b();function E(k,N){var $=this,V=new this.constructor(A);V[x]===void 0&&Fe(V);var Y=$._state;if(Y){var me=arguments[Y-1];p(function(){return pe(Y,V,me,$._result)})}else oe($,V,k,N);return V}function o(k){var N=this;if(k&&typeof k=="object"&&k.constructor===N)return k;var $=new N(A);return Z($,k),$}var x=Math.random().toString(36).substring(2);function A(){}var O=void 0,D=1,I=2;function F(){return new TypeError("You cannot resolve a promise with itself")}function z(){return new TypeError("A promises callback cannot return that same promise.")}function ne(k,N,$,V){try{k.call(N,$,V)}catch(Y){return Y}}function j(k,N,$){p(function(V){var Y=!1,me=ne($,N,function(Ae){if(Y)return;Y=!0,N!==Ae?Z(V,Ae):q(V,Ae)},function(Ae){if(Y)return;Y=!0,ie(V,Ae)},"Settle: "+(V._label||" unknown promise"));!Y&&me&&(Y=!0,ie(V,me))},k)}function G(k,N){N._state===D?q(k,N._result):N._state===I?ie(k,N._result):oe(N,void 0,function($){return Z(k,$)},function($){return ie(k,$)})}function X(k,N,$){N.constructor===k.constructor&&$===E&&N.constructor.resolve===o?G(k,N):$===void 0?q(k,N):w($)?j(k,N,$):q(k,N)}function Z(k,N){if(k===N)ie(k,F());else if(U(N)){var $=void 0;try{$=N.then}catch(V){ie(k,V);return}X(k,N,$)}else q(k,N)}function K(k){k._onerror&&k._onerror(k._result),ye(k)}function q(k,N){if(k._state!==O)return;k._result=N,k._state=D,k._subscribers.length!==0&&p(ye,k)}function ie(k,N){if(k._state!==O)return;k._state=I,k._result=N,p(K,k)}function oe(k,N,$,V){var Y=k._subscribers,me=Y.length;k._onerror=null,Y[me]=N,Y[me+D]=$,Y[me+I]=V,me===0&&k._state&&p(ye,k)}function ye(k){var N=k._subscribers,$=k._state;if(N.length===0)return;for(var V=void 0,Y=void 0,me=k._result,Ae=0;Ae<N.length;Ae+=3)V=N[Ae],Y=N[Ae+$],V?pe($,V,Y,me):Y(me);k._subscribers.length=0}function pe(k,N,$,V){var Y=w($),me=void 0,Ae=void 0,at=!0;if(Y){try{me=$(V)}catch(Le){at=!1,Ae=Le}if(N===me){ie(N,z());return}}else me=V;N._state!==O||(Y&&at?Z(N,me):at===!1?ie(N,Ae):k===D?q(N,me):k===I&&ie(N,me))}function we(k,N){try{N(function(V){Z(k,V)},function(V){ie(k,V)})}catch($){ie(k,$)}}var fe=0;function Te(){return fe++}function Fe(k){k[x]=fe++,k._state=void 0,k._result=void 0,k._subscribers=[]}function De(){return new Error("Array Methods must be provided an Array")}var Me=function(){function k(N,$){this._instanceConstructor=N,this.promise=new N(A),this.promise[x]||Fe(this.promise),S($)?(this.length=$.length,this._remaining=$.length,this._result=new Array(this.length),this.length===0?q(this.promise,this._result):(this.length=this.length||0,this._enumerate($),this._remaining===0&&q(this.promise,this._result))):ie(this.promise,De())}return k.prototype._enumerate=function($){for(var V=0;this._state===O&&V<$.length;V++)this._eachEntry($[V],V)},k.prototype._eachEntry=function($,V){var Y=this._instanceConstructor,me=Y.resolve;if(me===o){var Ae=void 0,at=void 0,Le=!1;try{Ae=$.then}catch(Ye){Le=!0,at=Ye}if(Ae===E&&$._state!==O)this._settledAt($._state,V,$._result);else if(typeof Ae!="function")this._remaining--,this._result[V]=$;else if(Y===Xe){var ke=new Y(A);Le?ie(ke,at):X(ke,$,Ae),this._willSettleAt(ke,V)}else this._willSettleAt(new Y(function(Ye){return Ye($)}),V)}else this._willSettleAt(me($),V)},k.prototype._settledAt=function($,V,Y){var me=this.promise;me._state===O&&(this._remaining--,$===I?ie(me,Y):this._result[V]=Y),this._remaining===0&&q(me,this._result)},k.prototype._willSettleAt=function($,V){var Y=this;oe($,void 0,function(me){return Y._settledAt(D,V,me)},function(me){return Y._settledAt(I,V,me)})},k}();function Ue(k){return new Me(this,k).promise}function ve(k){var N=this;return S(k)?new N(function($,V){for(var Y=k.length,me=0;me<Y;me++)N.resolve(k[me]).then($,V)}):new N(function($,V){return V(new TypeError("You must pass an array to race."))})}function ce(k){var N=this,$=new N(A);return ie($,k),$}function Ie(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function Ne(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var Xe=function(){function k(N){this[x]=Te(),this._result=this._state=void 0,this._subscribers=[],A!==N&&(typeof N!="function"&&Ie(),this instanceof k?we(this,N):Ne())}return k.prototype.catch=function($){return this.then(null,$)},k.prototype.finally=function($){var V=this,Y=V.constructor;return w($)?V.then(function(me){return Y.resolve($()).then(function(){return me})},function(me){return Y.resolve($()).then(function(){throw me})}):V.then($,$)},k}();Xe.prototype.then=E,Xe.all=Ue,Xe.race=ve,Xe.resolve=o,Xe.reject=ce,Xe._setScheduler=f,Xe._setAsap=l,Xe._asap=p;function ee(){var k=void 0;if(typeof Q!="undefined")k=Q;else if(typeof self!="undefined")k=self;else try{k=Function("return this")()}catch(V){throw new Error("polyfill failed because global object is unavailable in this environment")}var N=k.Promise;if(N){var $=null;try{$=Object.prototype.toString.call(N.resolve())}catch(V){}if($==="[object Promise]"&&!N.cast)return}k.Promise=Xe}return Xe.polyfill=ee,Xe.Promise=Xe,Xe})}).call(this,B("Q2Ig"),B("IyRk"))},E9nw:function(Je,Ke){Je.exports=function(){var B=document.getSelection();if(!B.rangeCount)return function(){};for(var ae=document.activeElement,Q=[],U=0;U<B.rangeCount;U++)Q.push(B.getRangeAt(U));switch(ae.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":ae.blur();break;default:ae=null;break}return B.removeAllRanges(),function(){B.type==="Caret"&&B.removeAllRanges(),B.rangeCount||Q.forEach(function(w){B.addRange(w)}),ae&&ae.focus()}}},EHPI:function(Je,Ke,B){"use strict";var ae=B("bbsP"),Q=B("/wGt"),U=B("tJVT"),w=B("k1fw"),P=B("cDcd"),S=B.n(P),C=B("ZW9T"),T=B("ZD9Y"),h=B("M8RZ"),p=B("bCnd"),f=B("fcyK"),l=B.n(f),a={theme:Object(p.a)("cmCodeMode","vs-dark"),fontSize:Object(p.a)("cmFontSize",14),showEditorSetting:!1,tabToSpace:Object(p.a)("cmTabToSpace",!0)},c;(function(i){i[i.set_font_size=0]="set_font_size",i[i.set_theme=1]="set_theme",i[i.on_tab_to_space=2]="on_tab_to_space",i[i.set_show_editor_setting=3]="set_show_editor_setting"})(c||(c={}));function s(i,n){switch(n.type){case c.set_show_editor_setting:return Object(w.a)(Object(w.a)({},i),{},{showEditorSetting:n.payload});case c.set_theme:return Object(w.a)(Object(w.a)({},i),{},{theme:n.payload});case c.set_font_size:return Object(w.a)(Object(w.a)({},i),{},{fontSize:n.payload});case c.on_tab_to_space:return Object(w.a)(Object(w.a)({},i),{},{tabToSpace:n.payload});default:throw new Error}}Ke.a=function(i){var n=i.isLoading,t=i.value,d=i.onChange,v=i.language,b=i.ActionBarRender,y=b===void 0?function(ne){return S.a.createElement(u,{onShowCodeSetting:ne})}:b,_=Object(P.useReducer)(s,a),m=Object(U.a)(_,2),g=m[0],E=m[1],o=g.theme,x=g.fontSize,A=g.showEditorSetting,O=g.tabToSpace,D={onFontSizeChange:function(j){E({type:c.set_font_size,payload:j}),Object(p.b)("cmFontSize",j)},tabToSpace:O,cmFontSize:x,className:"oj",cmCodeMode:o,onTabToSpace:function(j){E({type:c.on_tab_to_space,payload:j}),Object(p.b)("cmTabToSpace",j)},onCodeModeChange:function(j){E({type:c.set_theme,payload:j}),Object(p.b)("cmCodeMode",j)}};function I(){E({type:c.set_show_editor_setting,payload:!1})}function F(){E({type:c.set_show_editor_setting,payload:!0})}var z={value:t,language:v,onChange:d,theme:o,height:"calc(100% - 56px)",options:{fontSize:x,insertSpaces:O}};return S.a.createElement(P.Fragment,null,S.a.createElement("div",{className:"code-panel-container"},y(F),!n&&S.a.createElement(C.b,z)),S.a.createElement(h.a,null,S.a.createElement(Q.a,{className:"oj",title:null,placement:"right",closable:!1,visible:A,onClose:I},S.a.createElement(T.a,D))))};function u(i){var n=i.onShowCodeSetting;return S.a.createElement("div",{className:"action-bar"},S.a.createElement("span",null,"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\u6587\u4EF6"),S.a.createElement("a",{onClick:n},S.a.createElement("i",{className:"iconfont icon-shezhi"})))}},ELLl:function(Je,Ke,B){(function(ae){ae(B("VrN/"))})(function(ae){var Q={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},U=ae.Pos;ae.defineOption("autoCloseBrackets",!1,function(s,u,i){i&&i!=ae.Init&&(s.removeKeyMap(P),s.state.closeBrackets=null),u&&(S(w(u,"pairs")),s.state.closeBrackets=u,s.addKeyMap(P))});function w(s,u){return u=="pairs"&&typeof s=="string"?s:typeof s=="object"&&s[u]!=null?s[u]:Q[u]}var P={Backspace:h,Enter:p};function S(s){for(var u=0;u<s.length;u++){var i=s.charAt(u),n="'"+i+"'";P[n]||(P[n]=C(i))}}S(Q.pairs+"`");function C(s){return function(u){return l(u,s)}}function T(s){var u=s.state.closeBrackets;if(!u||u.override)return u;var i=s.getModeAt(s.getCursor());return i.closeBrackets||u}function h(s){var u=T(s);if(!u||s.getOption("disableInput"))return ae.Pass;for(var i=w(u,"pairs"),n=s.listSelections(),t=0;t<n.length;t++){if(!n[t].empty())return ae.Pass;var d=a(s,n[t].head);if(!d||i.indexOf(d)%2!=0)return ae.Pass}for(var t=n.length-1;t>=0;t--){var v=n[t].head;s.replaceRange("",U(v.line,v.ch-1),U(v.line,v.ch+1),"+delete")}}function p(s){var u=T(s),i=u&&w(u,"explode");if(!i||s.getOption("disableInput"))return ae.Pass;for(var n=s.listSelections(),t=0;t<n.length;t++){if(!n[t].empty())return ae.Pass;var d=a(s,n[t].head);if(!d||i.indexOf(d)%2!=0)return ae.Pass}s.operation(function(){var v=s.lineSeparator()||`
`;s.replaceSelection(v+v,null),s.execCommand("goCharLeft"),n=s.listSelections();for(var b=0;b<n.length;b++){var y=n[b].head.line;s.indentLine(y,null,!0),s.indentLine(y+1,null,!0)}})}function f(s){var u=ae.cmpPos(s.anchor,s.head)>0;return{anchor:new U(s.anchor.line,s.anchor.ch+(u?-1:1)),head:new U(s.head.line,s.head.ch+(u?1:-1))}}function l(s,u){var i=T(s);if(!i||s.getOption("disableInput"))return ae.Pass;var n=w(i,"pairs"),t=n.indexOf(u);if(t==-1)return ae.Pass;for(var d=w(i,"closeBefore"),v=w(i,"triples"),b=n.charAt(t+1)==u,y=s.listSelections(),_=t%2==0,m,g=0;g<y.length;g++){var E=y[g],o=E.head,x,A=s.getRange(o,U(o.line,o.ch+1));if(_&&!E.empty())x="surround";else if((b||!_)&&A==u)b&&c(s,o)?x="both":v.indexOf(u)>=0&&s.getRange(o,U(o.line,o.ch+3))==u+u+u?x="skipThree":x="skip";else if(b&&o.ch>1&&v.indexOf(u)>=0&&s.getRange(U(o.line,o.ch-2),o)==u+u){if(o.ch>2&&/\bstring/.test(s.getTokenTypeAt(U(o.line,o.ch-2))))return ae.Pass;x="addFour"}else if(b){var O=o.ch==0?" ":s.getRange(U(o.line,o.ch-1),o);if(!ae.isWordChar(A)&&O!=u&&!ae.isWordChar(O))x="both";else return ae.Pass}else if(_&&(A.length===0||/\s/.test(A)||d.indexOf(A)>-1))x="both";else return ae.Pass;if(!m)m=x;else if(m!=x)return ae.Pass}var D=t%2?n.charAt(t-1):u,I=t%2?u:n.charAt(t+1);s.operation(function(){if(m=="skip")s.execCommand("goCharRight");else if(m=="skipThree")for(var F=0;F<3;F++)s.execCommand("goCharRight");else if(m=="surround"){for(var z=s.getSelections(),F=0;F<z.length;F++)z[F]=D+z[F]+I;s.replaceSelections(z,"around"),z=s.listSelections().slice();for(var F=0;F<z.length;F++)z[F]=f(z[F]);s.setSelections(z)}else m=="both"?(s.replaceSelection(D+I,null),s.triggerElectric(D+I),s.execCommand("goCharLeft")):m=="addFour"&&(s.replaceSelection(D+D+D+D,"before"),s.execCommand("goCharRight"))})}function a(s,u){var i=s.getRange(U(u.line,u.ch-1),U(u.line,u.ch+1));return i.length==2?i:null}function c(s,u){var i=s.getTokenAt(U(u.line,u.ch+1));return/\bstring/.test(i.type)&&i.start==u.ch&&(u.ch==0||!/\bstring/.test(s.getTokenTypeAt(u)))}})},FOrL:function(Je,Ke,B){Je.exports=B.p+"static/nodata.a6b3f948.png"},GUcZ:function(Je,Ke,B){"use strict";var ae=B("fWQN"),Q=B("mtLc"),U=function(){function Se(){Object(ae.a)(this,Se)}return Object(Q.a)(Se,null,[{key:"install",value:function(){Object.setPrototypeOf=Object.setPrototypeOf||function(W,J){return W.__proto__=J,W},Object.assign=Object.assign||function(W){if(W==null)throw new TypeError("Cannot convert undefined or null to object");for(var J=Object(W),te=1;te<arguments.length;te++){var se=arguments[te];if(se!=null)for(var Ee in se)se.hasOwnProperty(Ee)&&(J[Ee]=se[Ee])}return J},typeof self.Promise!="function"&&B("E2g8").polyfill()}}]),Se}();U.install();var w=U,P=B("+qE3"),S=B.n(P),C=function(){function Se(){Object(ae.a)(this,Se)}return Object(Q.a)(Se,null,[{key:"e",value:function(W,J){(!W||Se.FORCE_GLOBAL_TAG)&&(W=Se.GLOBAL_TAG);var te="[".concat(W,"] > ").concat(J);if(Se.ENABLE_CALLBACK&&Se.emitter.emit("log","error",te),!Se.ENABLE_ERROR)return;console.error?console.error(te):console.warn?console.warn(te):console.log(te)}},{key:"i",value:function(W,J){(!W||Se.FORCE_GLOBAL_TAG)&&(W=Se.GLOBAL_TAG);var te="[".concat(W,"] > ").concat(J);if(Se.ENABLE_CALLBACK&&Se.emitter.emit("log","info",te),!Se.ENABLE_INFO)return;console.info?console.info(te):console.log(te)}},{key:"w",value:function(W,J){(!W||Se.FORCE_GLOBAL_TAG)&&(W=Se.GLOBAL_TAG);var te="[".concat(W,"] > ").concat(J);if(Se.ENABLE_CALLBACK&&Se.emitter.emit("log","warn",te),!Se.ENABLE_WARN)return;console.warn?console.warn(te):console.log(te)}},{key:"d",value:function(W,J){(!W||Se.FORCE_GLOBAL_TAG)&&(W=Se.GLOBAL_TAG);var te="[".concat(W,"] > ").concat(J);if(Se.ENABLE_CALLBACK&&Se.emitter.emit("log","debug",te),!Se.ENABLE_DEBUG)return;console.debug?console.debug(te):console.log(te)}},{key:"v",value:function(W,J){(!W||Se.FORCE_GLOBAL_TAG)&&(W=Se.GLOBAL_TAG);var te="[".concat(W,"] > ").concat(J);if(Se.ENABLE_CALLBACK&&Se.emitter.emit("log","verbose",te),!Se.ENABLE_VERBOSE)return;console.log(te)}}]),Se}();C.GLOBAL_TAG="flv.js",C.FORCE_GLOBAL_TAG=!1,C.ENABLE_ERROR=!0,C.ENABLE_INFO=!0,C.ENABLE_WARN=!0,C.ENABLE_DEBUG=!0,C.ENABLE_VERBOSE=!0,C.ENABLE_CALLBACK=!1,C.emitter=new S.a;var T=C,h=function(){function Se(){Object(ae.a)(this,Se),this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}return Object(Q.a)(Se,[{key:"reset",value:function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0}},{key:"addBytes",value:function(W){this._firstCheckpoint===0?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=W,this._totalBytes+=W):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=W,this._totalBytes+=W):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=W,this._totalBytes+=W,this._lastCheckpoint=this._now())}},{key:"currentKBps",get:function(){this.addBytes(0);var W=(this._now()-this._lastCheckpoint)/1e3;return W==0&&(W=1),this._intervalBytes/W/1024}},{key:"lastSecondKBps",get:function(){return this.addBytes(0),this._lastSecondBytes!==0?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}},{key:"averageKBps",get:function(){var W=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/W/1024}}]),Se}(),p=h,f=B("yKVA"),l=B("879j"),a=function(){function Se(de){Object(ae.a)(this,Se),this._message=de}return Object(Q.a)(Se,[{key:"name",get:function(){return"RuntimeException"}},{key:"message",get:function(){return this._message}},{key:"toString",value:function(){return this.name+": "+this.message}}]),Se}(),c=function(Se){Object(f.a)(W,Se);var de=Object(l.a)(W);function W(J){return Object(ae.a)(this,W),de.call(this,J)}return Object(Q.a)(W,[{key:"name",get:function(){return"IllegalStateException"}}]),W}(a),s=function(Se){Object(f.a)(W,Se);var de=Object(l.a)(W);function W(J){return Object(ae.a)(this,W),de.call(this,J)}return Object(Q.a)(W,[{key:"name",get:function(){return"InvalidArgumentException"}}]),W}(a),u=function(Se){Object(f.a)(W,Se);var de=Object(l.a)(W);function W(J){return Object(ae.a)(this,W),de.call(this,J)}return Object(Q.a)(W,[{key:"name",get:function(){return"NotImplementedException"}}]),W}(a),i={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},n={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},t=function(){function Se(de){Object(ae.a)(this,Se),this._type=de||"undefined",this._status=i.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}return Object(Q.a)(Se,[{key:"destroy",value:function(){this._status=i.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}},{key:"isWorking",value:function(){return this._status===i.kConnecting||this._status===i.kBuffering}},{key:"type",get:function(){return this._type}},{key:"status",get:function(){return this._status}},{key:"needStashBuffer",get:function(){return this._needStash}},{key:"onContentLengthKnown",get:function(){return this._onContentLengthKnown},set:function(W){this._onContentLengthKnown=W}},{key:"onURLRedirect",get:function(){return this._onURLRedirect},set:function(W){this._onURLRedirect=W}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(W){this._onDataArrival=W}},{key:"onError",get:function(){return this._onError},set:function(W){this._onError=W}},{key:"onComplete",get:function(){return this._onComplete},set:function(W){this._onComplete=W}},{key:"open",value:function(W,J){throw new u("Unimplemented abstract function!")}},{key:"abort",value:function(){throw new u("Unimplemented abstract function!")}}]),Se}(),d=B("oZsa");function v(Se,de){for(;!Object.prototype.hasOwnProperty.call(Se,de)&&!(Se=Object(d.a)(Se),Se===null););return Se}function b(Se,de,W){return typeof Reflect!="undefined"&&Reflect.get?b=Reflect.get:b=function(te,se,Ee){var ze=v(te,se);if(!ze)return;var qe=Object.getOwnPropertyDescriptor(ze,se);return qe.get?qe.get.call(Ee):qe.value},b(Se,de,W||Se)}var y={};function _(){var Se=self.navigator.userAgent.toLowerCase(),de=/(edge)\/([\w.]+)/.exec(Se)||/(opr)[\/]([\w.]+)/.exec(Se)||/(chrome)[ \/]([\w.]+)/.exec(Se)||/(iemobile)[\/]([\w.]+)/.exec(Se)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(Se)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(Se)||/(webkit)[ \/]([\w.]+)/.exec(Se)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(Se)||/(msie) ([\w.]+)/.exec(Se)||Se.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(Se)||Se.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(Se)||[],W=/(ipad)/.exec(Se)||/(ipod)/.exec(Se)||/(windows phone)/.exec(Se)||/(iphone)/.exec(Se)||/(kindle)/.exec(Se)||/(android)/.exec(Se)||/(windows)/.exec(Se)||/(mac)/.exec(Se)||/(linux)/.exec(Se)||/(cros)/.exec(Se)||[],J={browser:de[5]||de[3]||de[1]||"",version:de[2]||de[4]||"0",majorVersion:de[4]||de[2]||"0",platform:W[0]||""},te={};if(J.browser){te[J.browser]=!0;var se=J.majorVersion.split(".");te.version={major:parseInt(J.majorVersion,10),string:J.version},se.length>1&&(te.version.minor=parseInt(se[1],10)),se.length>2&&(te.version.build=parseInt(se[2],10))}if(J.platform&&(te[J.platform]=!0),(te.chrome||te.opr||te.safari)&&(te.webkit=!0),te.rv||te.iemobile){te.rv&&delete te.rv;var Ee="msie";J.browser=Ee,te[Ee]=!0}if(te.edge){delete te.edge;var ze="msedge";J.browser=ze,te[ze]=!0}if(te.opr){var qe="opera";J.browser=qe,te[qe]=!0}if(te.safari&&te.android){var St="android";J.browser=St,te[St]=!0}te.name=J.browser,te.platform=J.platform;for(var Lt in y)y.hasOwnProperty(Lt)&&delete y[Lt];Object.assign(y,te)}_();var m=y,g=function(Se){Object(f.a)(W,Se);var de=Object(l.a)(W);function W(J,te){var se;return Object(ae.a)(this,W),se=de.call(this,"fetch-stream-loader"),se.TAG="FetchStreamLoader",se._seekHandler=J,se._config=te,se._needStash=!0,se._requestAbort=!1,se._contentLength=null,se._receivedLength=0,se}return Object(Q.a)(W,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),b(Object(d.a)(W.prototype),"destroy",this).call(this)}},{key:"open",value:function(te,se){var Ee=this;this._dataSource=te,this._range=se;var ze=te.url;this._config.reuseRedirectedURL&&te.redirectedURL!=null&&(ze=te.redirectedURL);var qe=this._seekHandler.getConfig(ze,se),St=new self.Headers;if(typeof qe.headers=="object"){var Lt=qe.headers;for(var it in Lt)Lt.hasOwnProperty(it)&&St.append(it,Lt[it])}var Tt={method:"GET",headers:St,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(var Qt in this._config.headers)St.append(Qt,this._config.headers[Qt]);te.cors===!1&&(Tt.mode="same-origin"),te.withCredentials&&(Tt.credentials="include"),te.referrerPolicy&&(Tt.referrerPolicy=te.referrerPolicy),this._status=i.kConnecting,self.fetch(qe.url,Tt).then(function(Et){if(Ee._requestAbort){Ee._requestAbort=!1,Ee._status=i.kIdle;return}if(Et.ok&&Et.status>=200&&Et.status<=299){if(Et.url!==qe.url&&Ee._onURLRedirect){var nn=Ee._seekHandler.removeURLParameters(Et.url);Ee._onURLRedirect(nn)}var Jt=Et.headers.get("Content-Length");return Jt!=null&&(Ee._contentLength=parseInt(Jt),Ee._contentLength!==0&&(Ee._onContentLengthKnown&&Ee._onContentLengthKnown(Ee._contentLength))),Ee._pump.call(Ee,Et.body.getReader())}else if(Ee._status=i.kError,Ee._onError)Ee._onError(n.HTTP_STATUS_CODE_INVALID,{code:Et.status,msg:Et.statusText});else throw new a("FetchStreamLoader: Http code invalid, "+Et.status+" "+Et.statusText)}).catch(function(Et){if(Ee._status=i.kError,Ee._onError)Ee._onError(n.EXCEPTION,{code:-1,msg:Et.message});else throw Et})}},{key:"abort",value:function(){this._requestAbort=!0}},{key:"_pump",value:function(te){var se=this;return te.read().then(function(Ee){if(Ee.done)if(se._contentLength!==null&&se._receivedLength<se._contentLength){se._status=i.kError;var ze=n.EARLY_EOF,qe={code:-1,msg:"Fetch stream meet Early-EOF"};if(se._onError)se._onError(ze,qe);else throw new a(qe.msg)}else se._status=i.kComplete,se._onComplete&&se._onComplete(se._range.from,se._range.from+se._receivedLength-1);else{if(se._requestAbort===!0)return se._requestAbort=!1,se._status=i.kComplete,te.cancel();se._status=i.kBuffering;var St=Ee.value.buffer,Lt=se._range.from+se._receivedLength;se._receivedLength+=St.byteLength,se._onDataArrival&&se._onDataArrival(St,Lt,se._receivedLength),se._pump(te)}}).catch(function(Ee){if(Ee.code===11&&m.msedge)return;se._status=i.kError;var ze=0,qe=null;if((Ee.code===19||Ee.message==="network error")&&(se._contentLength===null||se._contentLength!==null&&se._receivedLength<se._contentLength)?(ze=n.EARLY_EOF,qe={code:Ee.code,msg:"Fetch stream meet Early-EOF"}):(ze=n.EXCEPTION,qe={code:Ee.code,msg:Ee.message}),se._onError)se._onError(ze,qe);else throw new a(qe.msg)})}}],[{key:"isSupported",value:function(){try{var te=m.msedge&&m.version.minor>=15048,se=m.msedge?te:!0;return self.fetch&&self.ReadableStream&&se}catch(Ee){return!1}}}]),W}(t),E=g,o=function(Se){Object(f.a)(W,Se);var de=Object(l.a)(W);function W(J,te){var se;return Object(ae.a)(this,W),se=de.call(this,"xhr-moz-chunked-loader"),se.TAG="MozChunkedLoader",se._seekHandler=J,se._config=te,se._needStash=!0,se._xhr=null,se._requestAbort=!1,se._contentLength=null,se._receivedLength=0,se}return Object(Q.a)(W,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),b(Object(d.a)(W.prototype),"destroy",this).call(this)}},{key:"open",value:function(te,se){this._dataSource=te,this._range=se;var Ee=te.url;this._config.reuseRedirectedURL&&te.redirectedURL!=null&&(Ee=te.redirectedURL);var ze=this._seekHandler.getConfig(Ee,se);this._requestURL=ze.url;var qe=this._xhr=new XMLHttpRequest;if(qe.open("GET",ze.url,!0),qe.responseType="moz-chunked-arraybuffer",qe.onreadystatechange=this._onReadyStateChange.bind(this),qe.onprogress=this._onProgress.bind(this),qe.onloadend=this._onLoadEnd.bind(this),qe.onerror=this._onXhrError.bind(this),te.withCredentials&&(qe.withCredentials=!0),typeof ze.headers=="object"){var St=ze.headers;for(var Lt in St)St.hasOwnProperty(Lt)&&qe.setRequestHeader(Lt,St[Lt])}if(typeof this._config.headers=="object"){var it=this._config.headers;for(var Tt in it)it.hasOwnProperty(Tt)&&qe.setRequestHeader(Tt,it[Tt])}this._status=i.kConnecting,qe.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=i.kComplete}},{key:"_onReadyStateChange",value:function(te){var se=te.target;if(se.readyState===2){if(se.responseURL!=null&&se.responseURL!==this._requestURL&&this._onURLRedirect){var Ee=this._seekHandler.removeURLParameters(se.responseURL);this._onURLRedirect(Ee)}if(se.status!==0&&(se.status<200||se.status>299))if(this._status=i.kError,this._onError)this._onError(n.HTTP_STATUS_CODE_INVALID,{code:se.status,msg:se.statusText});else throw new a("MozChunkedLoader: Http code invalid, "+se.status+" "+se.statusText);else this._status=i.kBuffering}}},{key:"_onProgress",value:function(te){if(this._status===i.kError)return;this._contentLength===null&&(te.total!==null&&te.total!==0&&(this._contentLength=te.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)));var se=te.target.response,Ee=this._range.from+this._receivedLength;this._receivedLength+=se.byteLength,this._onDataArrival&&this._onDataArrival(se,Ee,this._receivedLength)}},{key:"_onLoadEnd",value:function(te){if(this._requestAbort===!0){this._requestAbort=!1;return}else if(this._status===i.kError)return;this._status=i.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)}},{key:"_onXhrError",value:function(te){this._status=i.kError;var se=0,Ee=null;if(this._contentLength&&te.loaded<this._contentLength?(se=n.EARLY_EOF,Ee={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(se=n.EXCEPTION,Ee={code:-1,msg:te.constructor.name+" "+te.type}),this._onError)this._onError(se,Ee);else throw new a(Ee.msg)}}],[{key:"isSupported",value:function(){try{var te=new XMLHttpRequest;return te.open("GET","https://example.com",!0),te.responseType="moz-chunked-arraybuffer",te.responseType==="moz-chunked-arraybuffer"}catch(se){return T.w("MozChunkedLoader",se.message),!1}}}]),W}(t),x=o,A=function(Se){Object(f.a)(W,Se);var de=Object(l.a)(W);function W(J,te){var se;return Object(ae.a)(this,W),se=de.call(this,"xhr-msstream-loader"),se.TAG="MSStreamLoader",se._seekHandler=J,se._config=te,se._needStash=!0,se._xhr=null,se._reader=null,se._totalRange=null,se._currentRange=null,se._currentRequestURL=null,se._currentRedirectedURL=null,se._contentLength=null,se._receivedLength=0,se._bufferLimit=16*1024*1024,se._lastTimeBufferSize=0,se._isReconnecting=!1,se}return Object(Q.a)(W,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._reader&&(this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr=null),b(Object(d.a)(W.prototype),"destroy",this).call(this)}},{key:"open",value:function(te,se){this._internalOpen(te,se,!1)}},{key:"_internalOpen",value:function(te,se,Ee){this._dataSource=te,Ee?this._currentRange=se:this._totalRange=se;var ze=te.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?ze=this._currentRedirectedURL:te.redirectedURL!=null&&(ze=te.redirectedURL));var qe=this._seekHandler.getConfig(ze,se);this._currentRequestURL=qe.url;var St=this._reader=new self.MSStreamReader;St.onprogress=this._msrOnProgress.bind(this),St.onload=this._msrOnLoad.bind(this),St.onerror=this._msrOnError.bind(this);var Lt=this._xhr=new XMLHttpRequest;if(Lt.open("GET",qe.url,!0),Lt.responseType="ms-stream",Lt.onreadystatechange=this._xhrOnReadyStateChange.bind(this),Lt.onerror=this._xhrOnError.bind(this),te.withCredentials&&(Lt.withCredentials=!0),typeof qe.headers=="object"){var it=qe.headers;for(var Tt in it)it.hasOwnProperty(Tt)&&Lt.setRequestHeader(Tt,it[Tt])}if(typeof this._config.headers=="object"){var Qt=this._config.headers;for(var Et in Qt)Qt.hasOwnProperty(Et)&&Lt.setRequestHeader(Et,Qt[Et])}this._isReconnecting?this._isReconnecting=!1:this._status=i.kConnecting,Lt.send()}},{key:"abort",value:function(){this._internalAbort(),this._status=i.kComplete}},{key:"_internalAbort",value:function(){this._reader&&(this._reader.readyState===1&&this._reader.abort(),this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.abort(),this._xhr.onreadystatechange=null,this._xhr=null)}},{key:"_xhrOnReadyStateChange",value:function(te){var se=te.target;if(se.readyState===2)if(se.status>=200&&se.status<=299){if(this._status=i.kBuffering,se.responseURL!=null){var Ee=this._seekHandler.removeURLParameters(se.responseURL);se.responseURL!==this._currentRequestURL&&Ee!==this._currentRedirectedURL&&(this._currentRedirectedURL=Ee,this._onURLRedirect&&this._onURLRedirect(Ee))}var ze=se.getResponseHeader("Content-Length");if(ze!=null&&this._contentLength==null){var qe=parseInt(ze);qe>0&&(this._contentLength=qe,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else if(this._status=i.kError,this._onError)this._onError(n.HTTP_STATUS_CODE_INVALID,{code:se.status,msg:se.statusText});else throw new a("MSStreamLoader: Http code invalid, "+se.status+" "+se.statusText);else if(se.readyState===3&&(se.status>=200&&se.status<=299)){this._status=i.kBuffering;var St=se.response;this._reader.readAsArrayBuffer(St)}}},{key:"_xhrOnError",value:function(te){this._status=i.kError;var se=n.EXCEPTION,Ee={code:-1,msg:te.constructor.name+" "+te.type};if(this._onError)this._onError(se,Ee);else throw new a(Ee.msg)}},{key:"_msrOnProgress",value:function(te){var se=te.target,Ee=se.result;if(Ee==null){this._doReconnectIfNeeded();return}var ze=Ee.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=Ee.byteLength;var qe=this._totalRange.from+this._receivedLength;this._receivedLength+=ze.byteLength,this._onDataArrival&&this._onDataArrival(ze,qe,this._receivedLength),Ee.byteLength>=this._bufferLimit&&(T.v(this.TAG,"MSStream buffer exceeded max size near ".concat(qe+ze.byteLength,", reconnecting...")),this._doReconnectIfNeeded())}},{key:"_doReconnectIfNeeded",value:function(){if(this._contentLength==null||this._receivedLength<this._contentLength){this._isReconnecting=!0,this._lastTimeBufferSize=0,this._internalAbort();var te={from:this._totalRange.from+this._receivedLength,to:-1};this._internalOpen(this._dataSource,te,!0)}}},{key:"_msrOnLoad",value:function(te){this._status=i.kComplete,this._onComplete&&this._onComplete(this._totalRange.from,this._totalRange.from+this._receivedLength-1)}},{key:"_msrOnError",value:function(te){this._status=i.kError;var se=0,Ee=null;if(this._contentLength&&this._receivedLength<this._contentLength?(se=n.EARLY_EOF,Ee={code:-1,msg:"MSStream meet Early-Eof"}):(se=n.EARLY_EOF,Ee={code:-1,msg:te.constructor.name+" "+te.type}),this._onError)this._onError(se,Ee);else throw new a(Ee.msg)}}],[{key:"isSupported",value:function(){try{if(typeof self.MSStream=="undefined"||typeof self.MSStreamReader=="undefined")return!1;var te=new XMLHttpRequest;return te.open("GET","https://example.com",!0),te.responseType="ms-stream",te.responseType==="ms-stream"}catch(se){return T.w("MSStreamLoader",se.message),!1}}}]),W}(t),O=A,D=function(Se){Object(f.a)(W,Se);var de=Object(l.a)(W);function W(J,te){var se;return Object(ae.a)(this,W),se=de.call(this,"xhr-range-loader"),se.TAG="RangeLoader",se._seekHandler=J,se._config=te,se._needStash=!1,se._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],se._currentChunkSizeKB=384,se._currentSpeedNormalized=0,se._zeroSpeedChunkCount=0,se._xhr=null,se._speedSampler=new p,se._requestAbort=!1,se._waitForTotalLength=!1,se._totalLengthReceived=!1,se._currentRequestURL=null,se._currentRedirectedURL=null,se._currentRequestRange=null,se._totalLength=null,se._contentLength=null,se._receivedLength=0,se._lastTimeLoaded=0,se}return Object(Q.a)(W,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr=null),b(Object(d.a)(W.prototype),"destroy",this).call(this)}},{key:"currentSpeed",get:function(){return this._speedSampler.lastSecondKBps}},{key:"open",value:function(te,se){this._dataSource=te,this._range=se,this._status=i.kConnecting;var Ee=!1;this._dataSource.filesize!=null&&this._dataSource.filesize!==0&&(Ee=!0,this._totalLength=this._dataSource.filesize),!this._totalLengthReceived&&!Ee?(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1})):this._openSubRange()}},{key:"_openSubRange",value:function(){var te=this._currentChunkSizeKB*1024,se=this._range.from+this._receivedLength,Ee=se+te;this._contentLength!=null&&(Ee-this._range.from>=this._contentLength&&(Ee=this._range.from+this._contentLength-1)),this._currentRequestRange={from:se,to:Ee},this._internalOpen(this._dataSource,this._currentRequestRange)}},{key:"_internalOpen",value:function(te,se){this._lastTimeLoaded=0;var Ee=te.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?Ee=this._currentRedirectedURL:te.redirectedURL!=null&&(Ee=te.redirectedURL));var ze=this._seekHandler.getConfig(Ee,se);this._currentRequestURL=ze.url;var qe=this._xhr=new XMLHttpRequest;if(qe.open("GET",ze.url,!0),qe.responseType="arraybuffer",qe.onreadystatechange=this._onReadyStateChange.bind(this),qe.onprogress=this._onProgress.bind(this),qe.onload=this._onLoad.bind(this),qe.onerror=this._onXhrError.bind(this),te.withCredentials&&(qe.withCredentials=!0),typeof ze.headers=="object"){var St=ze.headers;for(var Lt in St)St.hasOwnProperty(Lt)&&qe.setRequestHeader(Lt,St[Lt])}if(typeof this._config.headers=="object"){var it=this._config.headers;for(var Tt in it)it.hasOwnProperty(Tt)&&qe.setRequestHeader(Tt,it[Tt])}qe.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._internalAbort(),this._status=i.kComplete}},{key:"_internalAbort",value:function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)}},{key:"_onReadyStateChange",value:function(te){var se=te.target;if(se.readyState===2){if(se.responseURL!=null){var Ee=this._seekHandler.removeURLParameters(se.responseURL);se.responseURL!==this._currentRequestURL&&Ee!==this._currentRedirectedURL&&(this._currentRedirectedURL=Ee,this._onURLRedirect&&this._onURLRedirect(Ee))}if(se.status>=200&&se.status<=299){if(this._waitForTotalLength)return;this._status=i.kBuffering}else if(this._status=i.kError,this._onError)this._onError(n.HTTP_STATUS_CODE_INVALID,{code:se.status,msg:se.statusText});else throw new a("RangeLoader: Http code invalid, "+se.status+" "+se.statusText)}}},{key:"_onProgress",value:function(te){if(this._status===i.kError)return;if(this._contentLength===null){var se=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,se=!0;var Ee=te.total;this._internalAbort(),Ee!=null&Ee!==0&&(this._totalLength=Ee)}if(this._range.to===-1?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,se){this._openSubRange();return}this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var ze=te.loaded-this._lastTimeLoaded;this._lastTimeLoaded=te.loaded,this._speedSampler.addBytes(ze)}},{key:"_normalizeSpeed",value:function(te){var se=this._chunkSizeKBList,Ee=se.length-1,ze=0,qe=0,St=Ee;if(te<se[0])return se[0];for(;qe<=St;){if(ze=qe+Math.floor((St-qe)/2),ze===Ee||te>=se[ze]&&te<se[ze+1])return se[ze];se[ze]<te?qe=ze+1:St=ze-1}}},{key:"_onLoad",value:function(te){if(this._status===i.kError)return;if(this._waitForTotalLength){this._waitForTotalLength=!1;return}this._lastTimeLoaded=0;var se=this._speedSampler.lastSecondKBps;if(se===0&&(this._zeroSpeedChunkCount++,this._zeroSpeedChunkCount>=3&&(se=this._speedSampler.currentKBps)),se!==0){var Ee=this._normalizeSpeed(se);this._currentSpeedNormalized!==Ee&&(this._currentSpeedNormalized=Ee,this._currentChunkSizeKB=Ee)}var ze=te.target.response,qe=this._range.from+this._receivedLength;this._receivedLength+=ze.byteLength;var St=!1;this._contentLength!=null&&this._receivedLength<this._contentLength?this._openSubRange():St=!0,this._onDataArrival&&this._onDataArrival(ze,qe,this._receivedLength),St&&(this._status=i.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}},{key:"_onXhrError",value:function(te){this._status=i.kError;var se=0,Ee=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(se=n.EARLY_EOF,Ee={code:-1,msg:"RangeLoader meet Early-Eof"}):(se=n.EXCEPTION,Ee={code:-1,msg:te.constructor.name+" "+te.type}),this._onError)this._onError(se,Ee);else throw new a(Ee.msg)}}],[{key:"isSupported",value:function(){try{var te=new XMLHttpRequest;return te.open("GET","https://example.com",!0),te.responseType="arraybuffer",te.responseType==="arraybuffer"}catch(se){return T.w("RangeLoader",se.message),!1}}}]),W}(t),I=D,F=function(Se){Object(f.a)(W,Se);var de=Object(l.a)(W);function W(){var J;return Object(ae.a)(this,W),J=de.call(this,"websocket-loader"),J.TAG="WebSocketLoader",J._needStash=!0,J._ws=null,J._requestAbort=!1,J._receivedLength=0,J}return Object(Q.a)(W,[{key:"destroy",value:function(){this._ws&&this.abort(),b(Object(d.a)(W.prototype),"destroy",this).call(this)}},{key:"open",value:function(te){try{var se=this._ws=new self.WebSocket(te.url);se.binaryType="arraybuffer",se.onopen=this._onWebSocketOpen.bind(this),se.onclose=this._onWebSocketClose.bind(this),se.onmessage=this._onWebSocketMessage.bind(this),se.onerror=this._onWebSocketError.bind(this),this._status=i.kConnecting}catch(ze){this._status=i.kError;var Ee={code:ze.code,msg:ze.message};if(this._onError)this._onError(n.EXCEPTION,Ee);else throw new a(Ee.msg)}}},{key:"abort",value:function(){var te=this._ws;te&&(te.readyState===0||te.readyState===1)&&(this._requestAbort=!0,te.close()),this._ws=null,this._status=i.kComplete}},{key:"_onWebSocketOpen",value:function(te){this._status=i.kBuffering}},{key:"_onWebSocketClose",value:function(te){if(this._requestAbort===!0){this._requestAbort=!1;return}this._status=i.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)}},{key:"_onWebSocketMessage",value:function(te){var se=this;if(te.data instanceof ArrayBuffer)this._dispatchArrayBuffer(te.data);else if(te.data instanceof Blob){var Ee=new FileReader;Ee.onload=function(){se._dispatchArrayBuffer(Ee.result)},Ee.readAsArrayBuffer(te.data)}else{this._status=i.kError;var ze={code:-1,msg:"Unsupported WebSocket message type: "+te.data.constructor.name};if(this._onError)this._onError(n.EXCEPTION,ze);else throw new a(ze.msg)}}},{key:"_dispatchArrayBuffer",value:function(te){var se=te,Ee=this._receivedLength;this._receivedLength+=se.byteLength,this._onDataArrival&&this._onDataArrival(se,Ee,this._receivedLength)}},{key:"_onWebSocketError",value:function(te){this._status=i.kError;var se={code:te.code,msg:te.message};if(this._onError)this._onError(n.EXCEPTION,se);else throw new a(se.msg)}}],[{key:"isSupported",value:function(){try{return typeof self.WebSocket!="undefined"}catch(te){return!1}}}]),W}(t),z=F,ne=function(){function Se(de){Object(ae.a)(this,Se),this._zeroStart=de||!1}return Object(Q.a)(Se,[{key:"getConfig",value:function(W,J){var te={};if(J.from!==0||J.to!==-1){var se;J.to!==-1?se="bytes=".concat(J.from.toString(),"-").concat(J.to.toString()):se="bytes=".concat(J.from.toString(),"-"),te.Range=se}else this._zeroStart&&(te.Range="bytes=0-");return{url:W,headers:te}}},{key:"removeURLParameters",value:function(W){return W}}]),Se}(),j=ne,G=function(){function Se(de,W){Object(ae.a)(this,Se),this._startName=de,this._endName=W}return Object(Q.a)(Se,[{key:"getConfig",value:function(W,J){var te=W;if(J.from!==0||J.to!==-1){var se=!0;te.indexOf("?")===-1&&(te+="?",se=!1),se&&(te+="&"),te+="".concat(this._startName,"=").concat(J.from.toString()),J.to!==-1&&(te+="&".concat(this._endName,"=").concat(J.to.toString()))}return{url:te,headers:{}}}},{key:"removeURLParameters",value:function(W){var J=W.split("?")[0],te=void 0,se=W.indexOf("?");se!==-1&&(te=W.substring(se+1));var Ee="";if(te!=null&&te.length>0)for(var ze=te.split("&"),qe=0;qe<ze.length;qe++){var St=ze[qe].split("="),Lt=qe>0;St[0]!==this._startName&&St[0]!==this._endName&&(Lt&&(Ee+="&"),Ee+=ze[qe])}return Ee.length===0?J:J+"?"+Ee}}]),Se}(),X=G,Z=function(){function Se(de,W,J){Object(ae.a)(this,Se),this.TAG="IOController",this._config=W,this._extraData=J,this._stashInitialSize=1024*384,W.stashInitialSize!=null&&W.stashInitialSize>0&&(this._stashInitialSize=W.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=1024*1024*3,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,W.enableStashBuffer===!1&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=de,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(de.url),this._refTotalLength=de.filesize?de.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new p,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}return Object(Q.a)(Se,[{key:"destroy",value:function(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null}},{key:"isWorking",value:function(){return this._loader&&this._loader.isWorking()&&!this._paused}},{key:"isPaused",value:function(){return this._paused}},{key:"status",get:function(){return this._loader.status}},{key:"extraData",get:function(){return this._extraData},set:function(W){this._extraData=W}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(W){this._onDataArrival=W}},{key:"onSeeked",get:function(){return this._onSeeked},set:function(W){this._onSeeked=W}},{key:"onError",get:function(){return this._onError},set:function(W){this._onError=W}},{key:"onComplete",get:function(){return this._onComplete},set:function(W){this._onComplete=W}},{key:"onRedirect",get:function(){return this._onRedirect},set:function(W){this._onRedirect=W}},{key:"onRecoveredEarlyEof",get:function(){return this._onRecoveredEarlyEof},set:function(W){this._onRecoveredEarlyEof=W}},{key:"currentURL",get:function(){return this._dataSource.url}},{key:"hasRedirect",get:function(){return this._redirectedURL!=null||this._dataSource.redirectedURL!=null}},{key:"currentRedirectedURL",get:function(){return this._redirectedURL||this._dataSource.redirectedURL}},{key:"currentSpeed",get:function(){return this._loaderClass===I?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}},{key:"loaderType",get:function(){return this._loader.type}},{key:"_selectSeekHandler",value:function(){var W=this._config;if(W.seekType==="range")this._seekHandler=new j(this._config.rangeLoadZeroStart);else if(W.seekType==="param"){var J=W.seekParamStart||"bstart",te=W.seekParamEnd||"bend";this._seekHandler=new X(J,te)}else if(W.seekType==="custom"){if(typeof W.customSeekHandler!="function")throw new s("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new W.customSeekHandler}else throw new s("Invalid seekType in config: ".concat(W.seekType))}},{key:"_selectLoader",value:function(){if(this._config.customLoader!=null)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=z;else if(E.isSupported())this._loaderClass=E;else if(x.isSupported())this._loaderClass=x;else if(I.isSupported())this._loaderClass=I;else throw new a("Your browser doesn't support xhr with arraybuffer responseType!")}},{key:"_createLoader",value:function(){this._loader=new this._loaderClass(this._seekHandler,this._config),this._loader.needStashBuffer===!1&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)}},{key:"open",value:function(W){this._currentRange={from:0,to:-1},W&&(this._currentRange.from=W),this._speedSampler.reset(),W||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))}},{key:"abort",value:function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}},{key:"pause",value:function(){this.isWorking()&&(this._loader.abort(),this._stashUsed!==0?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)}},{key:"resume",value:function(){if(this._paused){this._paused=!1;var W=this._resumeFrom;this._resumeFrom=0,this._internalSeek(W,!0)}}},{key:"seek",value:function(W){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(W,!0)}},{key:"_internalSeek",value:function(W,J){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(J),this._loader.destroy(),this._loader=null;var te={from:W,to:-1};this._currentRange={from:te.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,te),this._onSeeked&&this._onSeeked()}},{key:"updateUrl",value:function(W){if(!W||typeof W!="string"||W.length===0)throw new s("Url must be a non-empty string!");this._dataSource.url=W}},{key:"_expandBuffer",value:function(W){for(var J=this._stashSize;J+1024*1024*1<W;)J*=2;if(J+=1024*1024*1,J===this._bufferSize)return;var te=new ArrayBuffer(J);if(this._stashUsed>0){var se=new Uint8Array(this._stashBuffer,0,this._stashUsed),Ee=new Uint8Array(te,0,J);Ee.set(se,0)}this._stashBuffer=te,this._bufferSize=J}},{key:"_normalizeSpeed",value:function(W){var J=this._speedNormalizeList,te=J.length-1,se=0,Ee=0,ze=te;if(W<J[0])return J[0];for(;Ee<=ze;){if(se=Ee+Math.floor((ze-Ee)/2),se===te||W>=J[se]&&W<J[se+1])return J[se];J[se]<W?Ee=se+1:ze=se-1}}},{key:"_adjustStashSize",value:function(W){var J=0;this._config.isLive||W<512?J=W:W>=512&&W<=1024?J=Math.floor(W*1.5):J=W*2,J>8192&&(J=8192);var te=J*1024+1024*1024*1;this._bufferSize<te&&this._expandBuffer(te),this._stashSize=J*1024}},{key:"_dispatchChunks",value:function(W,J){return this._currentRange.to=J+W.byteLength-1,this._onDataArrival(W,J)}},{key:"_onURLRedirect",value:function(W){this._redirectedURL=W,this._onRedirect&&this._onRedirect(W)}},{key:"_onContentLengthKnown",value:function(W){W&&this._fullRequestFlag&&(this._totalLength=W,this._fullRequestFlag=!1)}},{key:"_onLoaderChunkArrival",value:function(W,J,te){if(!this._onDataArrival)throw new c("IOController: No existing consumer (onDataArrival) callback!");if(this._paused)return;this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),this._speedSampler.addBytes(W.byteLength);var se=this._speedSampler.lastSecondKBps;if(se!==0){var Ee=this._normalizeSpeed(se);this._speedNormalized!==Ee&&(this._speedNormalized=Ee,this._adjustStashSize(Ee))}if(this._enableStash)if(this._stashUsed===0&&this._stashByteStart===0&&(this._stashByteStart=J),this._stashUsed+W.byteLength<=this._stashSize){var Qt=new Uint8Array(this._stashBuffer,0,this._stashSize);Qt.set(new Uint8Array(W),this._stashUsed),this._stashUsed+=W.byteLength}else{var Et=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){var nn=this._stashBuffer.slice(0,this._stashUsed),Jt=this._dispatchChunks(nn,this._stashByteStart);if(Jt<nn.byteLength){if(Jt>0){var It=new Uint8Array(nn,Jt);Et.set(It,0),this._stashUsed=It.byteLength,this._stashByteStart+=Jt}}else this._stashUsed=0,this._stashByteStart+=Jt;this._stashUsed+W.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+W.byteLength),Et=new Uint8Array(this._stashBuffer,0,this._bufferSize)),Et.set(new Uint8Array(W),this._stashUsed),this._stashUsed+=W.byteLength}else{var yt=this._dispatchChunks(W,J);if(yt<W.byteLength){var Sn=W.byteLength-yt;Sn>this._bufferSize&&(this._expandBuffer(Sn),Et=new Uint8Array(this._stashBuffer,0,this._bufferSize)),Et.set(new Uint8Array(W,yt),0),this._stashUsed+=Sn,this._stashByteStart=J+yt}}}else if(this._stashUsed===0){var ze=this._dispatchChunks(W,J);if(ze<W.byteLength){var qe=W.byteLength-ze;qe>this._bufferSize&&this._expandBuffer(qe);var St=new Uint8Array(this._stashBuffer,0,this._bufferSize);St.set(new Uint8Array(W,ze),0),this._stashUsed+=qe,this._stashByteStart=J+ze}}else{this._stashUsed+W.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+W.byteLength);var Lt=new Uint8Array(this._stashBuffer,0,this._bufferSize);Lt.set(new Uint8Array(W),this._stashUsed),this._stashUsed+=W.byteLength;var it=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(it<this._stashUsed&&it>0){var Tt=new Uint8Array(this._stashBuffer,it);Lt.set(Tt,0)}this._stashUsed-=it,this._stashByteStart+=it}}},{key:"_flushStashBuffer",value:function(W){if(this._stashUsed>0){var J=this._stashBuffer.slice(0,this._stashUsed),te=this._dispatchChunks(J,this._stashByteStart),se=J.byteLength-te;if(te<J.byteLength)if(W)T.w(this.TAG,"".concat(se," bytes unconsumed data remain when flush buffer, dropped"));else{if(te>0){var Ee=new Uint8Array(this._stashBuffer,0,this._bufferSize),ze=new Uint8Array(J,te);Ee.set(ze,0),this._stashUsed=ze.byteLength,this._stashByteStart+=te}return 0}return this._stashUsed=0,this._stashByteStart=0,se}return 0}},{key:"_onLoaderComplete",value:function(W,J){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}},{key:"_onLoaderError",value:function(W,J){T.e(this.TAG,"Loader error, code = ".concat(J.code,", msg = ").concat(J.msg)),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,W=n.UNRECOVERABLE_EARLY_EOF);switch(W){case n.EARLY_EOF:{if(!this._config.isLive&&this._totalLength){var te=this._currentRange.to+1;te<this._totalLength&&(T.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(te,!1));return}W=n.UNRECOVERABLE_EARLY_EOF;break}case n.UNRECOVERABLE_EARLY_EOF:case n.CONNECTING_TIMEOUT:case n.HTTP_STATUS_CODE_INVALID:case n.EXCEPTION:break}if(this._onError)this._onError(W,J);else throw new a("IOException: "+J.msg)}}]),Se}(),K=Z,q={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,lazyLoad:!0,lazyLoadMaxDuration:3*60,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:3*60,autoCleanupMinBackwardDuration:2*60,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1,headers:void 0,customLoader:void 0};function ie(){return Object.assign({},q)}var oe=function(){function Se(){Object(ae.a)(this,Se)}return Object(Q.a)(Se,null,[{key:"supportMSEH264Playback",value:function(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}},{key:"supportNetworkStreamIO",value:function(){var W=new K({},ie()),J=W.loaderType;return W.destroy(),J=="fetch-stream-loader"||J=="xhr-moz-chunked-loader"}},{key:"getNetworkLoaderTypeName",value:function(){var W=new K({},ie()),J=W.loaderType;return W.destroy(),J}},{key:"supportNativeMediaPlayback",value:function(W){Se.videoElement==null&&(Se.videoElement=window.document.createElement("video"));var J=Se.videoElement.canPlayType(W);return J==="probably"||J=="maybe"}},{key:"getFeatureList",value:function(){var W={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return W.mseFlvPlayback=Se.supportMSEH264Playback(),W.networkStreamIO=Se.supportNetworkStreamIO(),W.networkLoaderName=Se.getNetworkLoaderTypeName(),W.mseLiveFlvPlayback=W.mseFlvPlayback&&W.networkStreamIO,W.nativeMP4H264Playback=Se.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),W.nativeWebmVP8Playback=Se.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),W.nativeWebmVP9Playback=Se.supportNativeMediaPlayback('video/webm; codecs="vp9"'),W}}]),Se}(),ye=oe,pe={ERROR:"error",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info"},we=pe,fe=function(){function Se(){Object(ae.a)(this,Se)}return Object(Q.a)(Se,null,[{key:"forceGlobalTag",get:function(){return T.FORCE_GLOBAL_TAG},set:function(W){T.FORCE_GLOBAL_TAG=W,Se._notifyChange()}},{key:"globalTag",get:function(){return T.GLOBAL_TAG},set:function(W){T.GLOBAL_TAG=W,Se._notifyChange()}},{key:"enableAll",get:function(){return T.ENABLE_VERBOSE&&T.ENABLE_DEBUG&&T.ENABLE_INFO&&T.ENABLE_WARN&&T.ENABLE_ERROR},set:function(W){T.ENABLE_VERBOSE=W,T.ENABLE_DEBUG=W,T.ENABLE_INFO=W,T.ENABLE_WARN=W,T.ENABLE_ERROR=W,Se._notifyChange()}},{key:"enableDebug",get:function(){return T.ENABLE_DEBUG},set:function(W){T.ENABLE_DEBUG=W,Se._notifyChange()}},{key:"enableVerbose",get:function(){return T.ENABLE_VERBOSE},set:function(W){T.ENABLE_VERBOSE=W,Se._notifyChange()}},{key:"enableInfo",get:function(){return T.ENABLE_INFO},set:function(W){T.ENABLE_INFO=W,Se._notifyChange()}},{key:"enableWarn",get:function(){return T.ENABLE_WARN},set:function(W){T.ENABLE_WARN=W,Se._notifyChange()}},{key:"enableError",get:function(){return T.ENABLE_ERROR},set:function(W){T.ENABLE_ERROR=W,Se._notifyChange()}},{key:"getConfig",value:function(){return{globalTag:T.GLOBAL_TAG,forceGlobalTag:T.FORCE_GLOBAL_TAG,enableVerbose:T.ENABLE_VERBOSE,enableDebug:T.ENABLE_DEBUG,enableInfo:T.ENABLE_INFO,enableWarn:T.ENABLE_WARN,enableError:T.ENABLE_ERROR,enableCallback:T.ENABLE_CALLBACK}}},{key:"applyConfig",value:function(W){T.GLOBAL_TAG=W.globalTag,T.FORCE_GLOBAL_TAG=W.forceGlobalTag,T.ENABLE_VERBOSE=W.enableVerbose,T.ENABLE_DEBUG=W.enableDebug,T.ENABLE_INFO=W.enableInfo,T.ENABLE_WARN=W.enableWarn,T.ENABLE_ERROR=W.enableError,T.ENABLE_CALLBACK=W.enableCallback}},{key:"_notifyChange",value:function(){var W=Se.emitter;if(W.listenerCount("change")>0){var J=Se.getConfig();W.emit("change",J)}}},{key:"registerListener",value:function(W){Se.emitter.addListener("change",W)}},{key:"removeListener",value:function(W){Se.emitter.removeListener("change",W)}},{key:"addLogListener",value:function(W){T.emitter.addListener("log",W),T.emitter.listenerCount("log")>0&&(T.ENABLE_CALLBACK=!0,Se._notifyChange())}},{key:"removeLogListener",value:function(W){T.emitter.removeListener("log",W),T.emitter.listenerCount("log")===0&&(T.ENABLE_CALLBACK=!1,Se._notifyChange())}}]),Se}();fe.emitter=new S.a;var Te=fe,Fe=function(){function Se(){Object(ae.a)(this,Se),this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}return Object(Q.a)(Se,[{key:"isComplete",value:function(){var W=this.hasAudio===!1||this.hasAudio===!0&&this.audioCodec!=null&&this.audioSampleRate!=null&&this.audioChannelCount!=null,J=this.hasVideo===!1||this.hasVideo===!0&&this.videoCodec!=null&&this.width!=null&&this.height!=null&&this.fps!=null&&this.profile!=null&&this.level!=null&&this.refFrames!=null&&this.chromaFormat!=null&&this.sarNum!=null&&this.sarDen!=null;return this.mimeType!=null&&this.duration!=null&&this.metadata!=null&&this.hasKeyframesIndex!=null&&W&&J}},{key:"isSeekable",value:function(){return this.hasKeyframesIndex===!0}},{key:"getNearestKeyframe",value:function(W){if(this.keyframesIndex==null)return null;var J=this.keyframesIndex,te=this._search(J.times,W);return{index:te,milliseconds:J.times[te],fileposition:J.filepositions[te]}}},{key:"_search",value:function(W,J){var te=0,se=W.length-1,Ee=0,ze=0,qe=se;for(J<W[0]&&(te=0,ze=qe+1);ze<=qe;)if(Ee=ze+Math.floor((qe-ze)/2),Ee===se||J>=W[Ee]&&J<W[Ee+1]){te=Ee;break}else W[Ee]<J?ze=Ee+1:qe=Ee-1;return te}}]),Se}(),De=Fe;function Me(Se,de,W){var J=Se;if(de+W<J.length){for(;W--;)if((J[++de]&192)!==128)return!1;return!0}else return!1}function Ue(Se){for(var de=[],W=Se,J=0,te=Se.length;J<te;){if(W[J]<128){de.push(String.fromCharCode(W[J])),++J;continue}else if(!(W[J]<192)){if(W[J]<224){if(Me(W,J,1)){var se=(W[J]&31)<<6|W[J+1]&63;if(se>=128){de.push(String.fromCharCode(se&65535)),J+=2;continue}}}else if(W[J]<240){if(Me(W,J,2)){var Ee=(W[J]&15)<<12|(W[J+1]&63)<<6|W[J+2]&63;if(Ee>=2048&&(Ee&63488)!==55296){de.push(String.fromCharCode(Ee&65535)),J+=3;continue}}}else if(W[J]<248&&Me(W,J,3)){var ze=(W[J]&7)<<18|(W[J+1]&63)<<12|(W[J+2]&63)<<6|W[J+3]&63;if(ze>65536&&ze<1114112){ze-=65536,de.push(String.fromCharCode(ze>>>10|55296)),de.push(String.fromCharCode(ze&1023|56320)),J+=4;continue}}}de.push(String.fromCharCode(65533)),++J}return de.join("")}var ve=Ue,ce=function(){var Se=new ArrayBuffer(2);return new DataView(Se).setInt16(0,256,!0),new Int16Array(Se)[0]===256}(),Ie=function(){function Se(){Object(ae.a)(this,Se)}return Object(Q.a)(Se,null,[{key:"parseScriptData",value:function(W,J,te){var se={};try{var Ee=Se.parseValue(W,J,te),ze=Se.parseValue(W,J+Ee.size,te-Ee.size);se[Ee.data]=ze.data}catch(qe){T.e("AMF",qe.toString())}return se}},{key:"parseObject",value:function(W,J,te){if(te<3)throw new c("Data not enough when parse ScriptDataObject");var se=Se.parseString(W,J,te),Ee=Se.parseValue(W,J+se.size,te-se.size),ze=Ee.objectEnd;return{data:{name:se.data,value:Ee.data},size:se.size+Ee.size,objectEnd:ze}}},{key:"parseVariable",value:function(W,J,te){return Se.parseObject(W,J,te)}},{key:"parseString",value:function(W,J,te){if(te<2)throw new c("Data not enough when parse String");var se=new DataView(W,J,te),Ee=se.getUint16(0,!ce),ze;return Ee>0?ze=ve(new Uint8Array(W,J+2,Ee)):ze="",{data:ze,size:2+Ee}}},{key:"parseLongString",value:function(W,J,te){if(te<4)throw new c("Data not enough when parse LongString");var se=new DataView(W,J,te),Ee=se.getUint32(0,!ce),ze;return Ee>0?ze=ve(new Uint8Array(W,J+4,Ee)):ze="",{data:ze,size:4+Ee}}},{key:"parseDate",value:function(W,J,te){if(te<10)throw new c("Data size invalid when parse Date");var se=new DataView(W,J,te),Ee=se.getFloat64(0,!ce),ze=se.getInt16(8,!ce);return Ee+=ze*60*1e3,{data:new Date(Ee),size:8+2}}},{key:"parseValue",value:function(W,J,te){if(te<1)throw new c("Data not enough when parse Value");var se=new DataView(W,J,te),Ee=1,ze=se.getUint8(0),qe,St=!1;try{switch(ze){case 0:qe=se.getFloat64(1,!ce),Ee+=8;break;case 1:{var Lt=se.getUint8(1);qe=!!Lt,Ee+=1;break}case 2:{var it=Se.parseString(W,J+1,te-1);qe=it.data,Ee+=it.size;break}case 3:{qe={};var Tt=0;for((se.getUint32(te-4,!ce)&16777215)===9&&(Tt=3);Ee<te-4;){var Qt=Se.parseObject(W,J+Ee,te-Ee-Tt);if(Qt.objectEnd)break;qe[Qt.data.name]=Qt.data.value,Ee+=Qt.size}if(Ee<=te-3){var Et=se.getUint32(Ee-1,!ce)&16777215;Et===9&&(Ee+=3)}break}case 8:{qe={},Ee+=4;var nn=0;for((se.getUint32(te-4,!ce)&16777215)===9&&(nn=3);Ee<te-8;){var Jt=Se.parseVariable(W,J+Ee,te-Ee-nn);if(Jt.objectEnd)break;qe[Jt.data.name]=Jt.data.value,Ee+=Jt.size}if(Ee<=te-3){var It=se.getUint32(Ee-1,!ce)&16777215;It===9&&(Ee+=3)}break}case 9:qe=void 0,Ee=1,St=!0;break;case 10:{qe=[];var yt=se.getUint32(1,!ce);Ee+=4;for(var Sn=0;Sn<yt;Sn++){var mt=Se.parseValue(W,J+Ee,te-Ee);qe.push(mt.data),Ee+=mt.size}break}case 11:{var ln=Se.parseDate(W,J+1,te-1);qe=ln.data,Ee+=ln.size;break}case 12:{var fn=Se.parseString(W,J+1,te-1);qe=fn.data,Ee+=fn.size;break}default:Ee=te,T.w("AMF","Unsupported AMF value type "+ze)}}catch(Zn){T.e("AMF",Zn.toString())}return{data:qe,size:Ee,objectEnd:St}}}]),Se}(),Ne=Ie,Xe=function(){function Se(de){Object(ae.a)(this,Se),this.TAG="ExpGolomb",this._buffer=de,this._buffer_index=0,this._total_bytes=de.byteLength,this._total_bits=de.byteLength*8,this._current_word=0,this._current_word_bits_left=0}return Object(Q.a)(Se,[{key:"destroy",value:function(){this._buffer=null}},{key:"_fillCurrentWord",value:function(){var W=this._total_bytes-this._buffer_index;if(W<=0)throw new c("ExpGolomb: _fillCurrentWord() but no bytes available");var J=Math.min(4,W),te=new Uint8Array(4);te.set(this._buffer.subarray(this._buffer_index,this._buffer_index+J)),this._current_word=new DataView(te.buffer).getUint32(0,!1),this._buffer_index+=J,this._current_word_bits_left=J*8}},{key:"readBits",value:function(W){if(W>32)throw new s("ExpGolomb: readBits() bits exceeded max 32bits!");if(W<=this._current_word_bits_left){var J=this._current_word>>>32-W;return this._current_word<<=W,this._current_word_bits_left-=W,J}var te=this._current_word_bits_left?this._current_word:0;te=te>>>32-this._current_word_bits_left;var se=W-this._current_word_bits_left;this._fillCurrentWord();var Ee=Math.min(se,this._current_word_bits_left),ze=this._current_word>>>32-Ee;return this._current_word<<=Ee,this._current_word_bits_left-=Ee,te=te<<Ee|ze,te}},{key:"readBool",value:function(){return this.readBits(1)===1}},{key:"readByte",value:function(){return this.readBits(8)}},{key:"_skipLeadingZero",value:function(){var W;for(W=0;W<this._current_word_bits_left;W++)if((this._current_word&2147483648>>>W)!==0)return this._current_word<<=W,this._current_word_bits_left-=W,W;return this._fillCurrentWord(),W+this._skipLeadingZero()}},{key:"readUEG",value:function(){var W=this._skipLeadingZero();return this.readBits(W+1)-1}},{key:"readSEG",value:function(){var W=this.readUEG();return W&1?W+1>>>1:-1*(W>>>1)}}]),Se}(),ee=Xe,k=function(){function Se(){Object(ae.a)(this,Se)}return Object(Q.a)(Se,null,[{key:"_ebsp2rbsp",value:function(W){for(var J=W,te=J.byteLength,se=new Uint8Array(te),Ee=0,ze=0;ze<te;ze++){if(ze>=2&&(J[ze]===3&&J[ze-1]===0&&J[ze-2]===0))continue;se[Ee]=J[ze],Ee++}return new Uint8Array(se.buffer,0,Ee)}},{key:"parseSPS",value:function(W){var J=Se._ebsp2rbsp(W),te=new ee(J);te.readByte();var se=te.readByte();te.readByte();var Ee=te.readByte();te.readUEG();var ze=Se.getProfileString(se),qe=Se.getLevelString(Ee),St=1,Lt=420,it=[0,420,422,444],Tt=8;if((se===100||se===110||se===122||se===244||se===44||se===83||se===86||se===118||se===128||se===138||se===144)&&(St=te.readUEG(),St===3&&te.readBits(1),St<=3&&(Lt=it[St]),Tt=te.readUEG()+8,te.readUEG(),te.readBits(1),te.readBool()))for(var Qt=St!==3?8:12,Et=0;Et<Qt;Et++)te.readBool()&&(Et<6?Se._skipScalingList(te,16):Se._skipScalingList(te,64));te.readUEG();var nn=te.readUEG();if(nn===0)te.readUEG();else if(nn===1){te.readBits(1),te.readSEG(),te.readSEG();for(var Jt=te.readUEG(),It=0;It<Jt;It++)te.readSEG()}var yt=te.readUEG();te.readBits(1);var Sn=te.readUEG(),mt=te.readUEG(),ln=te.readBits(1);ln===0&&te.readBits(1),te.readBits(1);var fn=0,Zn=0,rr=0,xn=0,Er=te.readBool();Er&&(fn=te.readUEG(),Zn=te.readUEG(),rr=te.readUEG(),xn=te.readUEG());var Cr=1,un=1,Mn=0,Nr=!0,Xr=0,xr=0,ur=te.readBool();if(ur){if(te.readBool()){var gr=te.readByte(),gi=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],pr=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];gr>0&&gr<16?(Cr=gi[gr-1],un=pr[gr-1]):gr===255&&(Cr=te.readByte()<<8|te.readByte(),un=te.readByte()<<8|te.readByte())}if(te.readBool()&&te.readBool(),te.readBool()&&(te.readBits(4),te.readBool()&&te.readBits(24)),te.readBool()&&(te.readUEG(),te.readUEG()),te.readBool()){var yr=te.readBits(32),Or=te.readBits(32);Nr=te.readBool(),Xr=Or,xr=yr*2,Mn=Xr/xr}}var Kr=1;(Cr!==1||un!==1)&&(Kr=Cr/un);var Sr=0,ui=0;if(St===0)Sr=1,ui=2-ln;else{var Pr=St===3?1:2,yi=St===1?2:1;Sr=Pr,ui=yi*(2-ln)}var ci=(Sn+1)*16,ni=(2-ln)*((mt+1)*16);ci-=(fn+Zn)*Sr,ni-=(rr+xn)*ui;var Di=Math.ceil(ci*Kr);return te.destroy(),te=null,{profile_string:ze,level_string:qe,bit_depth:Tt,ref_frames:yt,chroma_format:Lt,chroma_format_string:Se.getChromaFormatString(Lt),frame_rate:{fixed:Nr,fps:Mn,fps_den:xr,fps_num:Xr},sar_ratio:{width:Cr,height:un},codec_size:{width:ci,height:ni},present_size:{width:Di,height:ni}}}},{key:"_skipScalingList",value:function(W,J){for(var te=8,se=8,Ee=0,ze=0;ze<J;ze++)se!==0&&(Ee=W.readSEG(),se=(te+Ee+256)%256),te=se===0?te:se}},{key:"getProfileString",value:function(W){switch(W){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}}},{key:"getLevelString",value:function(W){return(W/10).toFixed(1)}},{key:"getChromaFormatString",value:function(W){switch(W){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}]),Se}(),N=k,$={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"},V=$;function Y(Se){return Se>>>8&255|(Se&255)<<8}function me(Se){return(Se&4278190080)>>>24|(Se&16711680)>>>8|(Se&65280)<<8|(Se&255)<<24}function Ae(Se,de){return Se[de]<<24|Se[de+1]<<16|Se[de+2]<<8|Se[de+3]}var at=function(){function Se(de,W){Object(ae.a)(this,Se),this.TAG="FLVDemuxer",this._config=W,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=de.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=de.hasAudioTrack,this._hasVideo=de.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new De,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){var J=new ArrayBuffer(2);return new DataView(J).setInt16(0,256,!0),new Int16Array(J)[0]===256}()}return Object(Q.a)(Se,[{key:"destroy",value:function(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null}},{key:"bindDataSource",value:function(W){return W.onDataArrival=this.parseChunks.bind(this),this}},{key:"onTrackMetadata",get:function(){return this._onTrackMetadata},set:function(W){this._onTrackMetadata=W}},{key:"onMediaInfo",get:function(){return this._onMediaInfo},set:function(W){this._onMediaInfo=W}},{key:"onMetaDataArrived",get:function(){return this._onMetaDataArrived},set:function(W){this._onMetaDataArrived=W}},{key:"onScriptDataArrived",get:function(){return this._onScriptDataArrived},set:function(W){this._onScriptDataArrived=W}},{key:"onError",get:function(){return this._onError},set:function(W){this._onError=W}},{key:"onDataAvailable",get:function(){return this._onDataAvailable},set:function(W){this._onDataAvailable=W}},{key:"timestampBase",get:function(){return this._timestampBase},set:function(W){this._timestampBase=W}},{key:"overridedDuration",get:function(){return this._duration},set:function(W){this._durationOverrided=!0,this._duration=W,this._mediaInfo.duration=W}},{key:"overridedHasAudio",set:function(W){this._hasAudioFlagOverrided=!0,this._hasAudio=W,this._mediaInfo.hasAudio=W}},{key:"overridedHasVideo",set:function(W){this._hasVideoFlagOverrided=!0,this._hasVideo=W,this._mediaInfo.hasVideo=W}},{key:"resetMediaInfo",value:function(){this._mediaInfo=new De}},{key:"_isInitialMetadataDispatched",value:function(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!this._hasAudio&&this._hasVideo?this._videoInitialMetadataDispatched:!1}},{key:"parseChunks",value:function(W,J){if(!this._onError||!this._onMediaInfo||!this._onTrackMetadata||!this._onDataAvailable)throw new c("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var te=0,se=this._littleEndian;if(J===0)if(W.byteLength>13){var Ee=Se.probe(W);te=Ee.dataOffset}else return 0;if(this._firstParse){this._firstParse=!1,J+te!==this._dataOffset&&T.w(this.TAG,"First time parsing but chunk byteStart invalid!");var ze=new DataView(W,te),qe=ze.getUint32(0,!se);qe!==0&&T.w(this.TAG,"PrevTagSize0 !== 0 !!!"),te+=4}for(;te<W.byteLength;){this._dispatch=!0;var St=new DataView(W,te);if(te+11+4>W.byteLength)break;var Lt=St.getUint8(0),it=St.getUint32(0,!se)&16777215;if(te+11+it+4>W.byteLength)break;if(Lt!==8&&Lt!==9&&Lt!==18){T.w(this.TAG,"Unsupported tag type ".concat(Lt,", skipped")),te+=11+it+4;continue}var Tt=St.getUint8(4),Qt=St.getUint8(5),Et=St.getUint8(6),nn=St.getUint8(7),Jt=Et|Qt<<8|Tt<<16|nn<<24,It=St.getUint32(7,!se)&16777215;It!==0&&T.w(this.TAG,"Meet tag which has StreamID != 0!");var yt=te+11;switch(Lt){case 8:this._parseAudioData(W,yt,it,Jt);break;case 9:this._parseVideoData(W,yt,it,Jt,J+te);break;case 18:this._parseScriptData(W,yt,it);break}var Sn=St.getUint32(11+it,!se);Sn!==11+it&&T.w(this.TAG,"Invalid PrevTagSize ".concat(Sn)),te+=11+it+4}return this._isInitialMetadataDispatched()&&(this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack)),te}},{key:"_parseScriptData",value:function(W,J,te){var se=Ne.parseScriptData(W,J,te);if(se.hasOwnProperty("onMetaData")){if(se.onMetaData==null||typeof se.onMetaData!="object"){T.w(this.TAG,"Invalid onMetaData structure!");return}this._metadata&&T.w(this.TAG,"Found another onMetaData tag!"),this._metadata=se;var Ee=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},Ee)),typeof Ee.hasAudio=="boolean"&&(this._hasAudioFlagOverrided===!1&&(this._hasAudio=Ee.hasAudio,this._mediaInfo.hasAudio=this._hasAudio)),typeof Ee.hasVideo=="boolean"&&(this._hasVideoFlagOverrided===!1&&(this._hasVideo=Ee.hasVideo,this._mediaInfo.hasVideo=this._hasVideo)),typeof Ee.audiodatarate=="number"&&(this._mediaInfo.audioDataRate=Ee.audiodatarate),typeof Ee.videodatarate=="number"&&(this._mediaInfo.videoDataRate=Ee.videodatarate),typeof Ee.width=="number"&&(this._mediaInfo.width=Ee.width),typeof Ee.height=="number"&&(this._mediaInfo.height=Ee.height),typeof Ee.duration=="number"){if(!this._durationOverrided){var ze=Math.floor(Ee.duration*this._timescale);this._duration=ze,this._mediaInfo.duration=ze}}else this._mediaInfo.duration=0;if(typeof Ee.framerate=="number"){var qe=Math.floor(Ee.framerate*1e3);if(qe>0){var St=qe/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=St,this._referenceFrameRate.fps_num=qe,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=St}}if(typeof Ee.keyframes=="object"){this._mediaInfo.hasKeyframesIndex=!0;var Lt=Ee.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(Lt),Ee.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=Ee,T.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(se).length>0&&(this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},se)))}},{key:"_parseKeyframesIndex",value:function(W){for(var J=[],te=[],se=1;se<W.times.length;se++){var Ee=this._timestampBase+Math.floor(W.times[se]*1e3);J.push(Ee),te.push(W.filepositions[se])}return{times:J,filepositions:te}}},{key:"_parseAudioData",value:function(W,J,te,se){if(te<=1){T.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");return}if(this._hasAudioFlagOverrided===!0&&this._hasAudio===!1)return;var Ee=this._littleEndian,ze=new DataView(W,J,te),qe=ze.getUint8(0),St=qe>>>4;if(St!==2&&St!==10){this._onError(V.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+St);return}var Lt=0,it=(qe&12)>>>2;if(it>=0&&it<=4)Lt=this._flvSoundRateTable[it];else{this._onError(V.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+it);return}var Tt=(qe&2)>>>1,Qt=qe&1,Et=this._audioMetadata,nn=this._audioTrack;if(Et||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),Et=this._audioMetadata={},Et.type="audio",Et.id=nn.id,Et.timescale=this._timescale,Et.duration=this._duration,Et.audioSampleRate=Lt,Et.channelCount=Qt===0?1:2),St===10){var Jt=this._parseAACAudioData(W,J+1,te-1);if(Jt==null)return;if(Jt.packetType===0){Et.config&&T.w(this.TAG,"Found another AudioSpecificConfig!");var It=Jt.data;Et.audioSampleRate=It.samplingRate,Et.channelCount=It.channelCount,Et.codec=It.codec,Et.originalCodec=It.originalCodec,Et.config=It.config,Et.refSampleDuration=1024/Et.audioSampleRate*Et.timescale,T.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",Et);var yt=this._mediaInfo;yt.audioCodec=Et.originalCodec,yt.audioSampleRate=Et.audioSampleRate,yt.audioChannelCount=Et.channelCount,yt.hasVideo?yt.videoCodec!=null&&(yt.mimeType='video/x-flv; codecs="'+yt.videoCodec+","+yt.audioCodec+'"'):yt.mimeType='video/x-flv; codecs="'+yt.audioCodec+'"',yt.isComplete()&&this._onMediaInfo(yt)}else if(Jt.packetType===1){var Sn=this._timestampBase+se,mt={unit:Jt.data,length:Jt.data.byteLength,dts:Sn,pts:Sn};nn.samples.push(mt),nn.length+=Jt.data.length}else T.e(this.TAG,"Flv: Unsupported AAC data type ".concat(Jt.packetType))}else if(St===2){if(!Et.codec){var ln=this._parseMP3AudioData(W,J+1,te-1,!0);if(ln==null)return;Et.audioSampleRate=ln.samplingRate,Et.channelCount=ln.channelCount,Et.codec=ln.codec,Et.originalCodec=ln.originalCodec,Et.refSampleDuration=1152/Et.audioSampleRate*Et.timescale,T.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",Et);var fn=this._mediaInfo;fn.audioCodec=Et.codec,fn.audioSampleRate=Et.audioSampleRate,fn.audioChannelCount=Et.channelCount,fn.audioDataRate=ln.bitRate,fn.hasVideo?fn.videoCodec!=null&&(fn.mimeType='video/x-flv; codecs="'+fn.videoCodec+","+fn.audioCodec+'"'):fn.mimeType='video/x-flv; codecs="'+fn.audioCodec+'"',fn.isComplete()&&this._onMediaInfo(fn)}var Zn=this._parseMP3AudioData(W,J+1,te-1,!1);if(Zn==null)return;var rr=this._timestampBase+se,xn={unit:Zn,length:Zn.byteLength,dts:rr,pts:rr};nn.samples.push(xn),nn.length+=Zn.length}}},{key:"_parseAACAudioData",value:function(W,J,te){if(te<=1){T.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");return}var se={},Ee=new Uint8Array(W,J,te);return se.packetType=Ee[0],Ee[0]===0?se.data=this._parseAACAudioSpecificConfig(W,J+1,te-1):se.data=Ee.subarray(1),se}},{key:"_parseAACAudioSpecificConfig",value:function(W,J,te){var se=new Uint8Array(W,J,te),Ee=null,ze=0,qe=0,St=null,Lt=0,it=null;if(ze=qe=se[0]>>>3,Lt=(se[0]&7)<<1|se[1]>>>7,Lt<0||Lt>=this._mpegSamplingRates.length){this._onError(V.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");return}var Tt=this._mpegSamplingRates[Lt],Qt=(se[1]&120)>>>3;if(Qt<0||Qt>=8){this._onError(V.FORMAT_ERROR,"Flv: AAC invalid channel configuration");return}ze===5&&(it=(se[1]&7)<<1|se[2]>>>7,St=(se[2]&124)>>>2);var Et=self.navigator.userAgent.toLowerCase();return Et.indexOf("firefox")!==-1?Lt>=6?(ze=5,Ee=new Array(4),it=Lt-3):(ze=2,Ee=new Array(2),it=Lt):Et.indexOf("android")!==-1?(ze=2,Ee=new Array(2),it=Lt):(ze=5,it=Lt,Ee=new Array(4),Lt>=6?it=Lt-3:Qt===1&&(ze=2,Ee=new Array(2),it=Lt)),Ee[0]=ze<<3,Ee[0]|=(Lt&15)>>>1,Ee[1]=(Lt&15)<<7,Ee[1]|=(Qt&15)<<3,ze===5&&(Ee[1]|=(it&15)>>>1,Ee[2]=(it&1)<<7,Ee[2]|=2<<2,Ee[3]=0),{config:Ee,samplingRate:Tt,channelCount:Qt,codec:"mp4a.40."+ze,originalCodec:"mp4a.40."+qe}}},{key:"_parseMP3AudioData",value:function(W,J,te,se){if(te<4){T.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");return}var Ee=this._littleEndian,ze=new Uint8Array(W,J,te),qe=null;if(se){if(ze[0]!==255)return;var St=ze[1]>>>3&3,Lt=(ze[1]&6)>>1,it=(ze[2]&240)>>>4,Tt=(ze[2]&12)>>>2,Qt=ze[3]>>>6&3,Et=Qt!==3?2:1,nn=0,Jt=0,It=34,yt="mp3";switch(St){case 0:nn=this._mpegAudioV25SampleRateTable[Tt];break;case 2:nn=this._mpegAudioV20SampleRateTable[Tt];break;case 3:nn=this._mpegAudioV10SampleRateTable[Tt];break}switch(Lt){case 1:It=34,it<this._mpegAudioL3BitRateTable.length&&(Jt=this._mpegAudioL3BitRateTable[it]);break;case 2:It=33,it<this._mpegAudioL2BitRateTable.length&&(Jt=this._mpegAudioL2BitRateTable[it]);break;case 3:It=32,it<this._mpegAudioL1BitRateTable.length&&(Jt=this._mpegAudioL1BitRateTable[it]);break}qe={bitRate:Jt,samplingRate:nn,channelCount:Et,codec:yt,originalCodec:yt}}else qe=ze;return qe}},{key:"_parseVideoData",value:function(W,J,te,se,Ee){if(te<=1){T.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");return}if(this._hasVideoFlagOverrided===!0&&this._hasVideo===!1)return;var ze=new Uint8Array(W,J,te)[0],qe=(ze&240)>>>4,St=ze&15;if(St!==7){this._onError(V.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: ".concat(St));return}this._parseAVCVideoPacket(W,J+1,te-1,se,Ee,qe)}},{key:"_parseAVCVideoPacket",value:function(W,J,te,se,Ee,ze){if(te<4){T.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");return}var qe=this._littleEndian,St=new DataView(W,J,te),Lt=St.getUint8(0),it=St.getUint32(0,!qe)&16777215,Tt=it<<8>>8;if(Lt===0)this._parseAVCDecoderConfigurationRecord(W,J+4,te-4);else if(Lt===1)this._parseAVCVideoData(W,J+4,te-4,se,Ee,ze,Tt);else if(!(Lt===2)){this._onError(V.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(Lt));return}}},{key:"_parseAVCDecoderConfigurationRecord",value:function(W,J,te){if(te<7){T.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");return}var se=this._videoMetadata,Ee=this._videoTrack,ze=this._littleEndian,qe=new DataView(W,J,te);se?typeof se.avcc!="undefined"&&T.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),se=this._videoMetadata={},se.type="video",se.id=Ee.id,se.timescale=this._timescale,se.duration=this._duration);var St=qe.getUint8(0),Lt=qe.getUint8(1),it=qe.getUint8(2),Tt=qe.getUint8(3);if(St!==1||Lt===0){this._onError(V.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");return}if(this._naluLengthSize=(qe.getUint8(4)&3)+1,this._naluLengthSize!==3&&this._naluLengthSize!==4){this._onError(V.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: ".concat(this._naluLengthSize-1));return}var Qt=qe.getUint8(5)&31;if(Qt===0){this._onError(V.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");return}else Qt>1&&T.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ".concat(Qt));for(var Et=6,nn=0;nn<Qt;nn++){var Jt=qe.getUint16(Et,!ze);if(Et+=2,Jt===0)continue;var It=new Uint8Array(W,J+Et,Jt);Et+=Jt;var yt=N.parseSPS(It);if(nn!==0)continue;se.codecWidth=yt.codec_size.width,se.codecHeight=yt.codec_size.height,se.presentWidth=yt.present_size.width,se.presentHeight=yt.present_size.height,se.profile=yt.profile_string,se.level=yt.level_string,se.bitDepth=yt.bit_depth,se.chromaFormat=yt.chroma_format,se.sarRatio=yt.sar_ratio,se.frameRate=yt.frame_rate,(yt.frame_rate.fixed===!1||yt.frame_rate.fps_num===0||yt.frame_rate.fps_den===0)&&(se.frameRate=this._referenceFrameRate);var Sn=se.frameRate.fps_den,mt=se.frameRate.fps_num;se.refSampleDuration=se.timescale*(Sn/mt);for(var ln=It.subarray(1,4),fn="avc1.",Zn=0;Zn<3;Zn++){var rr=ln[Zn].toString(16);rr.length<2&&(rr="0"+rr),fn+=rr}se.codec=fn;var xn=this._mediaInfo;xn.width=se.codecWidth,xn.height=se.codecHeight,xn.fps=se.frameRate.fps,xn.profile=se.profile,xn.level=se.level,xn.refFrames=yt.ref_frames,xn.chromaFormat=yt.chroma_format_string,xn.sarNum=se.sarRatio.width,xn.sarDen=se.sarRatio.height,xn.videoCodec=fn,xn.hasAudio?xn.audioCodec!=null&&(xn.mimeType='video/x-flv; codecs="'+xn.videoCodec+","+xn.audioCodec+'"'):xn.mimeType='video/x-flv; codecs="'+xn.videoCodec+'"',xn.isComplete()&&this._onMediaInfo(xn)}var Er=qe.getUint8(Et);if(Er===0){this._onError(V.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS");return}else Er>1&&T.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ".concat(Er));Et++;for(var Cr=0;Cr<Er;Cr++){var un=qe.getUint16(Et,!ze);if(Et+=2,un===0)continue;Et+=un}se.avcc=new Uint8Array(te),se.avcc.set(new Uint8Array(W,J,te),0),T.v(this.TAG,"Parsed AVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",se)}},{key:"_parseAVCVideoData",value:function(W,J,te,se,Ee,ze,qe){for(var St=this._littleEndian,Lt=new DataView(W,J,te),it=[],Tt=0,Qt=0,Et=this._naluLengthSize,nn=this._timestampBase+se,Jt=ze===1;Qt<te;){if(Qt+4>=te){T.w(this.TAG,"Malformed Nalu near timestamp ".concat(nn,", offset = ").concat(Qt,", dataSize = ").concat(te));break}var It=Lt.getUint32(Qt,!St);if(Et===3&&(It>>>=8),It>te-Et){T.w(this.TAG,"Malformed Nalus near timestamp ".concat(nn,", NaluSize > DataSize!"));return}var yt=Lt.getUint8(Qt+Et)&31;yt===5&&(Jt=!0);var Sn=new Uint8Array(W,J+Qt,Et+It),mt={type:yt,data:Sn};it.push(mt),Tt+=Sn.byteLength,Qt+=Et+It}if(it.length){var ln=this._videoTrack,fn={units:it,length:Tt,isKeyframe:Jt,dts:nn,cts:qe,pts:nn+qe};Jt&&(fn.fileposition=Ee),ln.samples.push(fn),ln.length+=Tt}}}],[{key:"probe",value:function(W){var J=new Uint8Array(W),te={match:!1};if(J[0]!==70||J[1]!==76||J[2]!==86||J[3]!==1)return te;var se=(J[4]&4)>>>2!==0,Ee=(J[4]&1)!==0,ze=Ae(J,5);return ze<9?te:{match:!0,consumed:ze,dataOffset:ze,hasAudioTrack:se,hasVideoTrack:Ee}}}]),Se}(),Le=at,ke=function(){function Se(){Object(ae.a)(this,Se)}return Object(Q.a)(Se,null,[{key:"init",value:function(){Se.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]};for(var W in Se.types)Se.types.hasOwnProperty(W)&&(Se.types[W]=[W.charCodeAt(0),W.charCodeAt(1),W.charCodeAt(2),W.charCodeAt(3)]);var J=Se.constants={};J.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),J.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),J.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),J.STSC=J.STCO=J.STTS,J.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),J.HDLR_VIDEO=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]),J.HDLR_AUDIO=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]),J.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),J.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),J.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}},{key:"box",value:function(W){for(var J=8,te=null,se=Array.prototype.slice.call(arguments,1),Ee=se.length,ze=0;ze<Ee;ze++)J+=se[ze].byteLength;te=new Uint8Array(J),te[0]=J>>>24&255,te[1]=J>>>16&255,te[2]=J>>>8&255,te[3]=J&255,te.set(W,4);for(var qe=8,St=0;St<Ee;St++)te.set(se[St],qe),qe+=se[St].byteLength;return te}},{key:"generateInitSegment",value:function(W){var J=Se.box(Se.types.ftyp,Se.constants.FTYP),te=Se.moov(W),se=new Uint8Array(J.byteLength+te.byteLength);return se.set(J,0),se.set(te,J.byteLength),se}},{key:"moov",value:function(W){var J=Se.mvhd(W.timescale,W.duration),te=Se.trak(W),se=Se.mvex(W);return Se.box(Se.types.moov,J,te,se)}},{key:"mvhd",value:function(W,J){return Se.box(Se.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,W>>>24&255,W>>>16&255,W>>>8&255,W&255,J>>>24&255,J>>>16&255,J>>>8&255,J&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]))}},{key:"trak",value:function(W){return Se.box(Se.types.trak,Se.tkhd(W),Se.mdia(W))}},{key:"tkhd",value:function(W){var J=W.id,te=W.duration,se=W.presentWidth,Ee=W.presentHeight;return Se.box(Se.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,J>>>24&255,J>>>16&255,J>>>8&255,J&255,0,0,0,0,te>>>24&255,te>>>16&255,te>>>8&255,te&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,se>>>8&255,se&255,0,0,Ee>>>8&255,Ee&255,0,0]))}},{key:"mdia",value:function(W){return Se.box(Se.types.mdia,Se.mdhd(W),Se.hdlr(W),Se.minf(W))}},{key:"mdhd",value:function(W){var J=W.timescale,te=W.duration;return Se.box(Se.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,J>>>24&255,J>>>16&255,J>>>8&255,J&255,te>>>24&255,te>>>16&255,te>>>8&255,te&255,85,196,0,0]))}},{key:"hdlr",value:function(W){var J=null;return W.type==="audio"?J=Se.constants.HDLR_AUDIO:J=Se.constants.HDLR_VIDEO,Se.box(Se.types.hdlr,J)}},{key:"minf",value:function(W){var J=null;return W.type==="audio"?J=Se.box(Se.types.smhd,Se.constants.SMHD):J=Se.box(Se.types.vmhd,Se.constants.VMHD),Se.box(Se.types.minf,J,Se.dinf(),Se.stbl(W))}},{key:"dinf",value:function(){var W=Se.box(Se.types.dinf,Se.box(Se.types.dref,Se.constants.DREF));return W}},{key:"stbl",value:function(W){var J=Se.box(Se.types.stbl,Se.stsd(W),Se.box(Se.types.stts,Se.constants.STTS),Se.box(Se.types.stsc,Se.constants.STSC),Se.box(Se.types.stsz,Se.constants.STSZ),Se.box(Se.types.stco,Se.constants.STCO));return J}},{key:"stsd",value:function(W){return W.type==="audio"?W.codec==="mp3"?Se.box(Se.types.stsd,Se.constants.STSD_PREFIX,Se.mp3(W)):Se.box(Se.types.stsd,Se.constants.STSD_PREFIX,Se.mp4a(W)):Se.box(Se.types.stsd,Se.constants.STSD_PREFIX,Se.avc1(W))}},{key:"mp3",value:function(W){var J=W.channelCount,te=W.audioSampleRate,se=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,J,0,16,0,0,0,0,te>>>8&255,te&255,0,0]);return Se.box(Se.types[".mp3"],se)}},{key:"mp4a",value:function(W){var J=W.channelCount,te=W.audioSampleRate,se=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,J,0,16,0,0,0,0,te>>>8&255,te&255,0,0]);return Se.box(Se.types.mp4a,se,Se.esds(W))}},{key:"esds",value:function(W){var J=W.config||[],te=J.length,se=new Uint8Array([0,0,0,0,3,23+te,0,1,0,4,15+te,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([te]).concat(J).concat([6,1,2]));return Se.box(Se.types.esds,se)}},{key:"avc1",value:function(W){var J=W.avcc,te=W.codecWidth,se=W.codecHeight,Ee=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,te>>>8&255,te&255,se>>>8&255,se&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return Se.box(Se.types.avc1,Ee,Se.box(Se.types.avcC,J))}},{key:"mvex",value:function(W){return Se.box(Se.types.mvex,Se.trex(W))}},{key:"trex",value:function(W){var J=W.id,te=new Uint8Array([0,0,0,0,J>>>24&255,J>>>16&255,J>>>8&255,J&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return Se.box(Se.types.trex,te)}},{key:"moof",value:function(W,J){return Se.box(Se.types.moof,Se.mfhd(W.sequenceNumber),Se.traf(W,J))}},{key:"mfhd",value:function(W){var J=new Uint8Array([0,0,0,0,W>>>24&255,W>>>16&255,W>>>8&255,W&255]);return Se.box(Se.types.mfhd,J)}},{key:"traf",value:function(W,J){var te=W.id,se=Se.box(Se.types.tfhd,new Uint8Array([0,0,0,0,te>>>24&255,te>>>16&255,te>>>8&255,te&255])),Ee=Se.box(Se.types.tfdt,new Uint8Array([0,0,0,0,J>>>24&255,J>>>16&255,J>>>8&255,J&255])),ze=Se.sdtp(W),qe=Se.trun(W,ze.byteLength+16+16+8+16+8+8);return Se.box(Se.types.traf,se,Ee,qe,ze)}},{key:"sdtp",value:function(W){for(var J=W.samples||[],te=J.length,se=new Uint8Array(4+te),Ee=0;Ee<te;Ee++){var ze=J[Ee].flags;se[Ee+4]=ze.isLeading<<6|ze.dependsOn<<4|ze.isDependedOn<<2|ze.hasRedundancy}return Se.box(Se.types.sdtp,se)}},{key:"trun",value:function(W,J){var te=W.samples||[],se=te.length,Ee=12+16*se,ze=new Uint8Array(Ee);J+=8+Ee,ze.set([0,0,15,1,se>>>24&255,se>>>16&255,se>>>8&255,se&255,J>>>24&255,J>>>16&255,J>>>8&255,J&255],0);for(var qe=0;qe<se;qe++){var St=te[qe].duration,Lt=te[qe].size,it=te[qe].flags,Tt=te[qe].cts;ze.set([St>>>24&255,St>>>16&255,St>>>8&255,St&255,Lt>>>24&255,Lt>>>16&255,Lt>>>8&255,Lt&255,it.isLeading<<2|it.dependsOn,it.isDependedOn<<6|it.hasRedundancy<<4|it.isNonSync,0,0,Tt>>>24&255,Tt>>>16&255,Tt>>>8&255,Tt&255],12+16*qe)}return Se.box(Se.types.trun,ze)}},{key:"mdat",value:function(W){return Se.box(Se.types.mdat,W)}}]),Se}();ke.init();var Ye=ke,Ze=function(){function Se(){Object(ae.a)(this,Se)}return Object(Q.a)(Se,null,[{key:"getSilentFrame",value:function(W,J){if(W==="mp4a.40.2"){if(J===1)return new Uint8Array([0,200,0,128,35,128]);if(J===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(J===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(J===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(J===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(J===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])}else{if(J===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(J===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(J===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])}return null}}]),Se}(),Ve=Ze,He=function Se(de,W,J,te,se){Object(ae.a)(this,Se),this.dts=de,this.pts=W,this.duration=J,this.originalDts=te,this.isSyncPoint=se,this.fileposition=null},Pe=function(){function Se(){Object(ae.a)(this,Se),this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}return Object(Q.a)(Se,[{key:"appendSyncPoint",value:function(W){W.isSyncPoint=!0,this.syncPoints.push(W)}}]),Se}(),Re=function(){function Se(){Object(ae.a)(this,Se),this._list=[]}return Object(Q.a)(Se,[{key:"clear",value:function(){this._list=[]}},{key:"appendArray",value:function(W){var J=this._list;if(W.length===0)return;J.length>0&&W[0].originalDts<J[J.length-1].originalDts&&this.clear(),Array.prototype.push.apply(J,W)}},{key:"getLastSyncPointBeforeDts",value:function(W){if(this._list.length==0)return null;var J=this._list,te=0,se=J.length-1,Ee=0,ze=0,qe=se;for(W<J[0].dts&&(te=0,ze=qe+1);ze<=qe;)if(Ee=ze+Math.floor((qe-ze)/2),Ee===se||W>=J[Ee].dts&&W<J[Ee+1].dts){te=Ee;break}else J[Ee].dts<W?ze=Ee+1:qe=Ee-1;return this._list[te]}}]),Se}(),Oe=function(){function Se(de){Object(ae.a)(this,Se),this._type=de,this._list=[],this._lastAppendLocation=-1}return Object(Q.a)(Se,[{key:"type",get:function(){return this._type}},{key:"length",get:function(){return this._list.length}},{key:"isEmpty",value:function(){return this._list.length===0}},{key:"clear",value:function(){this._list=[],this._lastAppendLocation=-1}},{key:"_searchNearestSegmentBefore",value:function(W){var J=this._list;if(J.length===0)return-2;var te=J.length-1,se=0,Ee=0,ze=te,qe=0;if(W<J[0].originalBeginDts)return qe=-1,qe;for(;Ee<=ze;)if(se=Ee+Math.floor((ze-Ee)/2),se===te||W>J[se].lastSample.originalDts&&W<J[se+1].originalBeginDts){qe=se;break}else J[se].originalBeginDts<W?Ee=se+1:ze=se-1;return qe}},{key:"_searchNearestSegmentAfter",value:function(W){return this._searchNearestSegmentBefore(W)+1}},{key:"append",value:function(W){var J=this._list,te=W,se=this._lastAppendLocation,Ee=0;se!==-1&&se<J.length&&te.originalBeginDts>=J[se].lastSample.originalDts&&(se===J.length-1||se<J.length-1&&te.originalBeginDts<J[se+1].originalBeginDts)?Ee=se+1:J.length>0&&(Ee=this._searchNearestSegmentBefore(te.originalBeginDts)+1),this._lastAppendLocation=Ee,this._list.splice(Ee,0,te)}},{key:"getLastSegmentBefore",value:function(W){var J=this._searchNearestSegmentBefore(W);return J>=0?this._list[J]:null}},{key:"getLastSampleBefore",value:function(W){var J=this.getLastSegmentBefore(W);return J!=null?J.lastSample:null}},{key:"getLastSyncPointBefore",value:function(W){for(var J=this._searchNearestSegmentBefore(W),te=this._list[J].syncPoints;te.length===0&&J>0;)J--,te=this._list[J].syncPoints;return te.length>0?te[te.length-1]:null}}]),Se}(),he=function(){function Se(de){Object(ae.a)(this,Se),this.TAG="MP4Remuxer",this._config=de,this._isLive=de.isLive===!0,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=Infinity,this._videoDtsBase=Infinity,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new Oe("audio"),this._videoSegmentInfoList=new Oe("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!!(m.chrome&&(m.version.major<50||m.version.major===50&&m.version.build<2661)),this._fillSilentAfterSeek=m.msedge||m.msie,this._mp3UseMpegAudio=!m.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return Object(Q.a)(Se,[{key:"destroy",value:function(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null}},{key:"bindDataSource",value:function(W){return W.onDataAvailable=this.remux.bind(this),W.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}},{key:"onInitSegment",get:function(){return this._onInitSegment},set:function(W){this._onInitSegment=W}},{key:"onMediaSegment",get:function(){return this._onMediaSegment},set:function(W){this._onMediaSegment=W}},{key:"insertDiscontinuity",value:function(){this._audioNextDts=this._videoNextDts=void 0}},{key:"seek",value:function(W){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}},{key:"remux",value:function(W,J){if(!this._onMediaSegment)throw new c("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(W,J),this._remuxVideo(J),this._remuxAudio(W)}},{key:"_onTrackMetadataReceived",value:function(W,J){var te=null,se="mp4",Ee=J.codec;if(W==="audio")this._audioMeta=J,J.codec==="mp3"&&this._mp3UseMpegAudio?(se="mpeg",Ee="",te=new Uint8Array):te=Ye.generateInitSegment(J);else if(W==="video")this._videoMeta=J,te=Ye.generateInitSegment(J);else return;if(!this._onInitSegment)throw new c("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(W,{type:W,data:te.buffer,codec:Ee,container:"".concat(W,"/").concat(se),mediaDuration:J.duration})}},{key:"_calculateDtsBase",value:function(W,J){if(this._dtsBaseInited)return;W.samples&&W.samples.length&&(this._audioDtsBase=W.samples[0].dts),J.samples&&J.samples.length&&(this._videoDtsBase=J.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0}},{key:"flushStashedSamples",value:function(){var W=this._videoStashedLastSample,J=this._audioStashedLastSample,te={type:"video",id:1,sequenceNumber:0,samples:[],length:0};W!=null&&(te.samples.push(W),te.length=W.length);var se={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};J!=null&&(se.samples.push(J),se.length=J.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(te,!0),this._remuxAudio(se,!0)}},{key:"_remuxAudio",value:function(W,J){if(this._audioMeta==null)return;var te=W,se=te.samples,Ee=void 0,ze=-1,qe=-1,St=-1,Lt=this._audioMeta.refSampleDuration,it=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,Tt=this._dtsBaseInited&&this._audioNextDts===void 0,Qt=!1;if(!se||se.length===0)return;if(se.length===1&&!J)return;var Et=0,nn=null,Jt=0;it?(Et=0,Jt=te.length):(Et=8,Jt=8+te.length);var It=null;if(se.length>1&&(It=se.pop(),Jt-=It.length),this._audioStashedLastSample!=null){var yt=this._audioStashedLastSample;this._audioStashedLastSample=null,se.unshift(yt),Jt+=yt.length}It!=null&&(this._audioStashedLastSample=It);var Sn=se[0].dts-this._dtsBase;if(this._audioNextDts)Ee=Sn-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())Ee=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&(this._audioMeta.originalCodec!=="mp3"&&(Qt=!0));else{var mt=this._audioSegmentInfoList.getLastSampleBefore(Sn);if(mt!=null){var ln=Sn-(mt.originalDts+mt.duration);ln<=3&&(ln=0);var fn=mt.dts+mt.duration+ln;Ee=Sn-fn}else Ee=0}if(Qt){var Zn=Sn-Ee,rr=this._videoSegmentInfoList.getLastSegmentBefore(Sn);if(rr!=null&&rr.beginDts<Zn){var xn=Ve.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(xn){var Er=rr.beginDts,Cr=Zn-rr.beginDts;T.v(this.TAG,"InsertPrefixSilentAudio: dts: ".concat(Er,", duration: ").concat(Cr)),se.unshift({unit:xn,dts:Er,pts:Er}),Jt+=xn.byteLength}}else Qt=!1}for(var un=[],Mn=0;Mn<se.length;Mn++){var Nr=se[Mn],Xr=Nr.unit,xr=Nr.dts-this._dtsBase,ur=xr-Ee;ze===-1&&(ze=ur);var gr=0;if(Mn!==se.length-1){var gi=se[Mn+1].dts-this._dtsBase-Ee;gr=gi-ur}else if(It!=null){var pr=It.dts-this._dtsBase-Ee;gr=pr-ur}else un.length>=1?gr=un[un.length-1].duration:gr=Math.floor(Lt);var yr=!1,Or=null;if(gr>Lt*1.5&&this._audioMeta.codec!=="mp3"&&this._fillAudioTimestampGap&&!m.safari){yr=!0;var Kr=Math.abs(gr-Lt),Sr=Math.ceil(Kr/Lt),ui=ur+Lt;T.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.
`+"dts: ".concat(ur+gr," ms, expected: ").concat(ur+Math.round(Lt)," ms, ")+"delta: ".concat(Math.round(Kr)," ms, generate: ").concat(Sr," frames"));var Pr=Ve.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);Pr==null&&(T.w(this.TAG,"Unable to generate silent frame for "+"".concat(this._audioMeta.originalCodec," with ").concat(this._audioMeta.channelCount," channels, repeat last frame")),Pr=Xr),Or=[];for(var yi=0;yi<Sr;yi++){var ci=Math.round(ui);if(Or.length>0){var ni=Or[Or.length-1];ni.duration=ci-ni.dts}var Di={dts:ci,pts:ci,cts:0,unit:Pr,size:Pr.byteLength,duration:0,originalDts:xr,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};Or.push(Di),Jt+=Di.size,ui+=Lt}var Ni=Or[Or.length-1];Ni.duration=ur+gr-Ni.dts,gr=Math.round(Lt)}un.push({dts:ur,pts:ur,cts:0,unit:Nr.unit,size:Nr.unit.byteLength,duration:gr,originalDts:xr,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),yr&&un.push.apply(un,Or)}it?nn=new Uint8Array(Jt):(nn=new Uint8Array(Jt),nn[0]=Jt>>>24&255,nn[1]=Jt>>>16&255,nn[2]=Jt>>>8&255,nn[3]=Jt&255,nn.set(Ye.types.mdat,4));for(var Ui=0;Ui<un.length;Ui++){var di=un[Ui].unit;nn.set(di,Et),Et+=di.byteLength}var mr=un[un.length-1];qe=mr.dts+mr.duration,this._audioNextDts=qe;var dr=new Pe;dr.beginDts=ze,dr.endDts=qe,dr.beginPts=ze,dr.endPts=qe,dr.originalBeginDts=un[0].originalDts,dr.originalEndDts=mr.originalDts+mr.duration,dr.firstSample=new He(un[0].dts,un[0].pts,un[0].duration,un[0].originalDts,!1),dr.lastSample=new He(mr.dts,mr.pts,mr.duration,mr.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(dr),te.samples=un,te.sequenceNumber++;var qr=null;it?qr=new Uint8Array:qr=Ye.moof(te,ze),te.samples=[],te.length=0;var ri={type:"audio",data:this._mergeBoxes(qr,nn).buffer,sampleCount:un.length,info:dr};it&&Tt&&(ri.timestampOffset=ze),this._onMediaSegment("audio",ri)}},{key:"_remuxVideo",value:function(W,J){if(this._videoMeta==null)return;var te=W,se=te.samples,Ee=void 0,ze=-1,qe=-1,St=-1,Lt=-1;if(!se||se.length===0)return;if(se.length===1&&!J)return;var it=8,Tt=null,Qt=8+W.length,Et=null;if(se.length>1&&(Et=se.pop(),Qt-=Et.length),this._videoStashedLastSample!=null){var nn=this._videoStashedLastSample;this._videoStashedLastSample=null,se.unshift(nn),Qt+=nn.length}Et!=null&&(this._videoStashedLastSample=Et);var Jt=se[0].dts-this._dtsBase;if(this._videoNextDts)Ee=Jt-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())Ee=0;else{var It=this._videoSegmentInfoList.getLastSampleBefore(Jt);if(It!=null){var yt=Jt-(It.originalDts+It.duration);yt<=3&&(yt=0);var Sn=It.dts+It.duration+yt;Ee=Jt-Sn}else Ee=0}for(var mt=new Pe,ln=[],fn=0;fn<se.length;fn++){var Zn=se[fn],rr=Zn.dts-this._dtsBase,xn=Zn.isKeyframe,Er=rr-Ee,Cr=Zn.cts,un=Er+Cr;ze===-1&&(ze=Er,St=un);var Mn=0;if(fn!==se.length-1){var Nr=se[fn+1].dts-this._dtsBase-Ee;Mn=Nr-Er}else if(Et!=null){var Xr=Et.dts-this._dtsBase-Ee;Mn=Xr-Er}else ln.length>=1?Mn=ln[ln.length-1].duration:Mn=Math.floor(this._videoMeta.refSampleDuration);if(xn){var xr=new He(Er,un,Mn,Zn.dts,!0);xr.fileposition=Zn.fileposition,mt.appendSyncPoint(xr)}ln.push({dts:Er,pts:un,cts:Cr,units:Zn.units,size:Zn.length,isKeyframe:xn,duration:Mn,originalDts:rr,flags:{isLeading:0,dependsOn:xn?2:1,isDependedOn:xn?1:0,hasRedundancy:0,isNonSync:xn?0:1}})}Tt=new Uint8Array(Qt),Tt[0]=Qt>>>24&255,Tt[1]=Qt>>>16&255,Tt[2]=Qt>>>8&255,Tt[3]=Qt&255,Tt.set(Ye.types.mdat,4);for(var ur=0;ur<ln.length;ur++)for(var gr=ln[ur].units;gr.length;){var gi=gr.shift(),pr=gi.data;Tt.set(pr,it),it+=pr.byteLength}var yr=ln[ln.length-1];if(qe=yr.dts+yr.duration,Lt=yr.pts+yr.duration,this._videoNextDts=qe,mt.beginDts=ze,mt.endDts=qe,mt.beginPts=St,mt.endPts=Lt,mt.originalBeginDts=ln[0].originalDts,mt.originalEndDts=yr.originalDts+yr.duration,mt.firstSample=new He(ln[0].dts,ln[0].pts,ln[0].duration,ln[0].originalDts,ln[0].isKeyframe),mt.lastSample=new He(yr.dts,yr.pts,yr.duration,yr.originalDts,yr.isKeyframe),this._isLive||this._videoSegmentInfoList.append(mt),te.samples=ln,te.sequenceNumber++,this._forceFirstIDR){var Or=ln[0].flags;Or.dependsOn=2,Or.isNonSync=0}var Kr=Ye.moof(te,ze);te.samples=[],te.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(Kr,Tt).buffer,sampleCount:ln.length,info:mt})}},{key:"_mergeBoxes",value:function(W,J){var te=new Uint8Array(W.byteLength+J.byteLength);return te.set(W,0),te.set(J,W.byteLength),te}}]),Se}(),be=he,Ce={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"},xe=Ce,Be=function(){function Se(de,W){Object(ae.a)(this,Se),this.TAG="TransmuxingController",this._emitter=new S.a,this._config=W,de.segments||(de.segments=[{duration:de.duration,filesize:de.filesize,url:de.url}]),typeof de.cors!="boolean"&&(de.cors=!0),typeof de.withCredentials!="boolean"&&(de.withCredentials=!1),this._mediaDataSource=de,this._currentSegmentIndex=0;var J=0;this._mediaDataSource.segments.forEach(function(te){te.timestampBase=J,J+=te.duration,te.cors=de.cors,te.withCredentials=de.withCredentials,W.referrerPolicy&&(te.referrerPolicy=W.referrerPolicy)}),!isNaN(J)&&this._mediaDataSource.duration!==J&&(this._mediaDataSource.duration=J),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}return Object(Q.a)(Se,[{key:"destroy",value:function(){this._mediaInfo=null,this._mediaDataSource=null,this._statisticsReporter&&this._disableStatisticsReporter(),this._ioctl&&(this._ioctl.destroy(),this._ioctl=null),this._demuxer&&(this._demuxer.destroy(),this._demuxer=null),this._remuxer&&(this._remuxer.destroy(),this._remuxer=null),this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(W,J){this._emitter.addListener(W,J)}},{key:"off",value:function(W,J){this._emitter.removeListener(W,J)}},{key:"start",value:function(){this._loadSegment(0),this._enableStatisticsReporter()}},{key:"_loadSegment",value:function(W,J){this._currentSegmentIndex=W;var te=this._mediaDataSource.segments[W],se=this._ioctl=new K(te,this._config,W);se.onError=this._onIOException.bind(this),se.onSeeked=this._onIOSeeked.bind(this),se.onComplete=this._onIOComplete.bind(this),se.onRedirect=this._onIORedirect.bind(this),se.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),J?this._demuxer.bindDataSource(this._ioctl):se.onDataArrival=this._onInitChunkArrival.bind(this),se.open(J)}},{key:"stop",value:function(){this._internalAbort(),this._disableStatisticsReporter()}},{key:"_internalAbort",value:function(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)}},{key:"pause",value:function(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())}},{key:"resume",value:function(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())}},{key:"seek",value:function(W){if(this._mediaInfo==null||!this._mediaInfo.isSeekable())return;var J=this._searchSegmentIndexContains(W);if(J===this._currentSegmentIndex){var te=this._mediaInfo.segments[J];if(te==null)this._pendingSeekTime=W;else{var se=te.getNearestKeyframe(W);this._remuxer.seek(se.milliseconds),this._ioctl.seek(se.fileposition),this._pendingResolveSeekPoint=se.milliseconds}}else{var Ee=this._mediaInfo.segments[J];if(Ee==null)this._pendingSeekTime=W,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(J);else{var ze=Ee.getNearestKeyframe(W);this._internalAbort(),this._remuxer.seek(W),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[J].timestampBase,this._loadSegment(J,ze.fileposition),this._pendingResolveSeekPoint=ze.milliseconds,this._reportSegmentMediaInfo(J)}}this._enableStatisticsReporter()}},{key:"_searchSegmentIndexContains",value:function(W){for(var J=this._mediaDataSource.segments,te=J.length-1,se=0;se<J.length;se++)if(W<J[se].timestampBase){te=se-1;break}return te}},{key:"_onInitChunkArrival",value:function(W,J){var te=this,se=null,Ee=0;if(J>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,Ee=this._demuxer.parseChunks(W,J);else if((se=Le.probe(W)).match){this._demuxer=new Le(se,this._config),this._remuxer||(this._remuxer=new be(this._config));var ze=this._mediaDataSource;ze.duration!=null&&!isNaN(ze.duration)&&(this._demuxer.overridedDuration=ze.duration),typeof ze.hasAudio=="boolean"&&(this._demuxer.overridedHasAudio=ze.hasAudio),typeof ze.hasVideo=="boolean"&&(this._demuxer.overridedHasVideo=ze.hasVideo),this._demuxer.timestampBase=ze.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),Ee=this._demuxer.parseChunks(W,J)}else se=null,T.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(function(){te._internalAbort()}),this._emitter.emit(xe.DEMUX_ERROR,V.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),Ee=0;return Ee}},{key:"_onMediaInfo",value:function(W){var J=this;this._mediaInfo==null&&(this._mediaInfo=Object.assign({},W),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,De.prototype));var te=Object.assign({},W);Object.setPrototypeOf(te,De.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=te,this._reportSegmentMediaInfo(this._currentSegmentIndex),this._pendingSeekTime!=null&&Promise.resolve().then(function(){var se=J._pendingSeekTime;J._pendingSeekTime=null,J.seek(se)})}},{key:"_onMetaDataArrived",value:function(W){this._emitter.emit(xe.METADATA_ARRIVED,W)}},{key:"_onScriptDataArrived",value:function(W){this._emitter.emit(xe.SCRIPTDATA_ARRIVED,W)}},{key:"_onIOSeeked",value:function(){this._remuxer.insertDiscontinuity()}},{key:"_onIOComplete",value:function(W){var J=W,te=J+1;te<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(te)):(this._remuxer.flushStashedSamples(),this._emitter.emit(xe.LOADING_COMPLETE),this._disableStatisticsReporter())}},{key:"_onIORedirect",value:function(W){var J=this._ioctl.extraData;this._mediaDataSource.segments[J].redirectedURL=W}},{key:"_onIORecoveredEarlyEof",value:function(){this._emitter.emit(xe.RECOVERED_EARLY_EOF)}},{key:"_onIOException",value:function(W,J){T.e(this.TAG,"IOException: type = ".concat(W,", code = ").concat(J.code,", msg = ").concat(J.msg)),this._emitter.emit(xe.IO_ERROR,W,J),this._disableStatisticsReporter()}},{key:"_onDemuxException",value:function(W,J){T.e(this.TAG,"DemuxException: type = ".concat(W,", info = ").concat(J)),this._emitter.emit(xe.DEMUX_ERROR,W,J)}},{key:"_onRemuxerInitSegmentArrival",value:function(W,J){this._emitter.emit(xe.INIT_SEGMENT,W,J)}},{key:"_onRemuxerMediaSegmentArrival",value:function(W,J){if(this._pendingSeekTime!=null)return;if(this._emitter.emit(xe.MEDIA_SEGMENT,W,J),this._pendingResolveSeekPoint!=null&&W==="video"){var te=J.info.syncPoints,se=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,m.safari&&te.length>0&&te[0].originalDts===se&&(se=te[0].pts),this._emitter.emit(xe.RECOMMEND_SEEKPOINT,se)}}},{key:"_enableStatisticsReporter",value:function(){this._statisticsReporter==null&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}},{key:"_disableStatisticsReporter",value:function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"_reportSegmentMediaInfo",value:function(W){var J=this._mediaInfo.segments[W],te=Object.assign({},J);te.duration=this._mediaInfo.duration,te.segmentCount=this._mediaInfo.segmentCount,delete te.segments,delete te.keyframesIndex,this._emitter.emit(xe.MEDIA_INFO,te)}},{key:"_reportStatisticsInfo",value:function(){var W={};W.url=this._ioctl.currentURL,W.hasRedirect=this._ioctl.hasRedirect,W.hasRedirect&&(W.redirectedURL=this._ioctl.currentRedirectedURL),W.speed=this._ioctl.currentSpeed,W.loaderType=this._ioctl.loaderType,W.currentSegmentIndex=this._currentSegmentIndex,W.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(xe.STATISTICS_INFO,W)}}]),Se}(),Qe=Be,rt=function(de){var W="TransmuxingWorker",J=null,te=Jt.bind(this);w.install(),de.addEventListener("message",function(It){switch(It.data.cmd){case"init":J=new Qe(It.data.param[0],It.data.param[1]),J.on(xe.IO_ERROR,Qt.bind(this)),J.on(xe.DEMUX_ERROR,Et.bind(this)),J.on(xe.INIT_SEGMENT,se.bind(this)),J.on(xe.MEDIA_SEGMENT,Ee.bind(this)),J.on(xe.LOADING_COMPLETE,ze.bind(this)),J.on(xe.RECOVERED_EARLY_EOF,qe.bind(this)),J.on(xe.MEDIA_INFO,St.bind(this)),J.on(xe.METADATA_ARRIVED,Lt.bind(this)),J.on(xe.SCRIPTDATA_ARRIVED,it.bind(this)),J.on(xe.STATISTICS_INFO,Tt.bind(this)),J.on(xe.RECOMMEND_SEEKPOINT,nn.bind(this));break;case"destroy":J&&(J.destroy(),J=null),de.postMessage({msg:"destroyed"});break;case"start":J.start();break;case"stop":J.stop();break;case"seek":J.seek(It.data.param);break;case"pause":J.pause();break;case"resume":J.resume();break;case"logging_config":{var yt=It.data.param;Te.applyConfig(yt),yt.enableCallback===!0?Te.addLogListener(te):Te.removeLogListener(te);break}}});function se(It,yt){var Sn={msg:xe.INIT_SEGMENT,data:{type:It,data:yt}};de.postMessage(Sn,[yt.data])}function Ee(It,yt){var Sn={msg:xe.MEDIA_SEGMENT,data:{type:It,data:yt}};de.postMessage(Sn,[yt.data])}function ze(){var It={msg:xe.LOADING_COMPLETE};de.postMessage(It)}function qe(){var It={msg:xe.RECOVERED_EARLY_EOF};de.postMessage(It)}function St(It){var yt={msg:xe.MEDIA_INFO,data:It};de.postMessage(yt)}function Lt(It){var yt={msg:xe.METADATA_ARRIVED,data:It};de.postMessage(yt)}function it(It){var yt={msg:xe.SCRIPTDATA_ARRIVED,data:It};de.postMessage(yt)}function Tt(It){var yt={msg:xe.STATISTICS_INFO,data:It};de.postMessage(yt)}function Qt(It,yt){de.postMessage({msg:xe.IO_ERROR,data:{type:It,info:yt}})}function Et(It,yt){de.postMessage({msg:xe.DEMUX_ERROR,data:{type:It,info:yt}})}function nn(It){de.postMessage({msg:xe.RECOMMEND_SEEKPOINT,data:It})}function Jt(It,yt){de.postMessage({msg:"logcat_callback",data:{type:It,logcat:yt}})}},dt=rt,xt=function(){function Se(de,W){if(Object(ae.a)(this,Se),this.TAG="Transmuxer",this._emitter=new S.a,W.enableWorker&&typeof Worker!="undefined")try{var J=B("0r65");this._worker=J(dt),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[de,W]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},Te.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:Te.getConfig()})}catch(se){T.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new Qe(de,W)}else this._controller=new Qe(de,W);if(this._controller){var te=this._controller;te.on(xe.IO_ERROR,this._onIOError.bind(this)),te.on(xe.DEMUX_ERROR,this._onDemuxError.bind(this)),te.on(xe.INIT_SEGMENT,this._onInitSegment.bind(this)),te.on(xe.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),te.on(xe.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),te.on(xe.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),te.on(xe.MEDIA_INFO,this._onMediaInfo.bind(this)),te.on(xe.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),te.on(xe.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),te.on(xe.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),te.on(xe.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return Object(Q.a)(Se,[{key:"destroy",value:function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),Te.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(W,J){this._emitter.addListener(W,J)}},{key:"off",value:function(W,J){this._emitter.removeListener(W,J)}},{key:"hasWorker",value:function(){return this._worker!=null}},{key:"open",value:function(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()}},{key:"close",value:function(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()}},{key:"seek",value:function(W){this._worker?this._worker.postMessage({cmd:"seek",param:W}):this._controller.seek(W)}},{key:"pause",value:function(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}},{key:"resume",value:function(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}},{key:"_onInitSegment",value:function(W,J){var te=this;Promise.resolve().then(function(){te._emitter.emit(xe.INIT_SEGMENT,W,J)})}},{key:"_onMediaSegment",value:function(W,J){var te=this;Promise.resolve().then(function(){te._emitter.emit(xe.MEDIA_SEGMENT,W,J)})}},{key:"_onLoadingComplete",value:function(){var W=this;Promise.resolve().then(function(){W._emitter.emit(xe.LOADING_COMPLETE)})}},{key:"_onRecoveredEarlyEof",value:function(){var W=this;Promise.resolve().then(function(){W._emitter.emit(xe.RECOVERED_EARLY_EOF)})}},{key:"_onMediaInfo",value:function(W){var J=this;Promise.resolve().then(function(){J._emitter.emit(xe.MEDIA_INFO,W)})}},{key:"_onMetaDataArrived",value:function(W){var J=this;Promise.resolve().then(function(){J._emitter.emit(xe.METADATA_ARRIVED,W)})}},{key:"_onScriptDataArrived",value:function(W){var J=this;Promise.resolve().then(function(){J._emitter.emit(xe.SCRIPTDATA_ARRIVED,W)})}},{key:"_onStatisticsInfo",value:function(W){var J=this;Promise.resolve().then(function(){J._emitter.emit(xe.STATISTICS_INFO,W)})}},{key:"_onIOError",value:function(W,J){var te=this;Promise.resolve().then(function(){te._emitter.emit(xe.IO_ERROR,W,J)})}},{key:"_onDemuxError",value:function(W,J){var te=this;Promise.resolve().then(function(){te._emitter.emit(xe.DEMUX_ERROR,W,J)})}},{key:"_onRecommendSeekpoint",value:function(W){var J=this;Promise.resolve().then(function(){J._emitter.emit(xe.RECOMMEND_SEEKPOINT,W)})}},{key:"_onLoggingConfigChanged",value:function(W){this._worker&&this._worker.postMessage({cmd:"logging_config",param:W})}},{key:"_onWorkerMessage",value:function(W){var J=W.data,te=J.data;if(J.msg==="destroyed"||this._workerDestroying){this._workerDestroying=!1,this._worker.terminate(),this._worker=null;return}switch(J.msg){case xe.INIT_SEGMENT:case xe.MEDIA_SEGMENT:this._emitter.emit(J.msg,te.type,te.data);break;case xe.LOADING_COMPLETE:case xe.RECOVERED_EARLY_EOF:this._emitter.emit(J.msg);break;case xe.MEDIA_INFO:Object.setPrototypeOf(te,De.prototype),this._emitter.emit(J.msg,te);break;case xe.METADATA_ARRIVED:case xe.SCRIPTDATA_ARRIVED:case xe.STATISTICS_INFO:this._emitter.emit(J.msg,te);break;case xe.IO_ERROR:case xe.DEMUX_ERROR:this._emitter.emit(J.msg,te.type,te.info);break;case xe.RECOMMEND_SEEKPOINT:this._emitter.emit(J.msg,te);break;case"logcat_callback":T.emitter.emit("log",te.type,te.logcat);break;default:break}}}]),Se}(),_t=xt,wt={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"},st=wt,ut=function(){function Se(de){Object(ae.a)(this,Se),this.TAG="MSEController",this._config=de,this._emitter=new S.a,this._config.isLive&&this._config.autoCleanupSourceBuffer==null&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new Re}return Object(Q.a)(Se,[{key:"destroy",value:function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(W,J){this._emitter.addListener(W,J)}},{key:"off",value:function(W,J){this._emitter.removeListener(W,J)}},{key:"attachMediaElement",value:function(W){if(this._mediaSource)throw new c("MediaSource has been attached to an HTMLMediaElement!");var J=this._mediaSource=new window.MediaSource;J.addEventListener("sourceopen",this.e.onSourceOpen),J.addEventListener("sourceended",this.e.onSourceEnded),J.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=W,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),W.src=this._mediaSourceObjectURL}},{key:"detachMediaElement",value:function(){if(this._mediaSource){var W=this._mediaSource;for(var J in this._sourceBuffers){var te=this._pendingSegments[J];te.splice(0,te.length),this._pendingSegments[J]=null,this._pendingRemoveRanges[J]=null,this._lastInitSegments[J]=null;var se=this._sourceBuffers[J];if(se){if(W.readyState!=="closed"){try{W.removeSourceBuffer(se)}catch(Ee){T.e(this.TAG,Ee.message)}se.removeEventListener("error",this.e.onSourceBufferError),se.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[J]=null,this._sourceBuffers[J]=null}}if(W.readyState==="open")try{W.endOfStream()}catch(Ee){T.e(this.TAG,Ee.message)}W.removeEventListener("sourceopen",this.e.onSourceOpen),W.removeEventListener("sourceended",this.e.onSourceEnded),W.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)}},{key:"appendInitSegment",value:function(W,J){if(!this._mediaSource||this._mediaSource.readyState!=="open"){this._pendingSourceBufferInit.push(W),this._pendingSegments[W.type].push(W);return}var te=W,se="".concat(te.container);te.codec&&te.codec.length>0&&(se+=";codecs=".concat(te.codec));var Ee=!1;if(T.v(this.TAG,"Received Initialization Segment, mimeType: "+se),this._lastInitSegments[te.type]=te,se!==this._mimeTypes[te.type]){if(this._mimeTypes[te.type])T.v(this.TAG,"Notice: ".concat(te.type," mimeType changed, origin: ").concat(this._mimeTypes[te.type],", target: ").concat(se));else{Ee=!0;try{var ze=this._sourceBuffers[te.type]=this._mediaSource.addSourceBuffer(se);ze.addEventListener("error",this.e.onSourceBufferError),ze.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(qe){T.e(this.TAG,qe.message),this._emitter.emit(st.ERROR,{code:qe.code,msg:qe.message});return}}this._mimeTypes[te.type]=se}J||this._pendingSegments[te.type].push(te),Ee||this._sourceBuffers[te.type]&&!this._sourceBuffers[te.type].updating&&this._doAppendSegments(),m.safari&&te.container==="audio/mpeg"&&te.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=te.mediaDuration/1e3,this._updateMediaSourceDuration())}},{key:"appendMediaSegment",value:function(W){var J=W;this._pendingSegments[J.type].push(J),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var te=this._sourceBuffers[J.type];te&&!te.updating&&!this._hasPendingRemoveRanges()&&this._doAppendSegments()}},{key:"seek",value:function(W){for(var J in this._sourceBuffers){if(!this._sourceBuffers[J])continue;var te=this._sourceBuffers[J];if(this._mediaSource.readyState==="open")try{te.abort()}catch(Lt){T.e(this.TAG,Lt.message)}this._idrList.clear();var se=this._pendingSegments[J];if(se.splice(0,se.length),this._mediaSource.readyState==="closed")continue;for(var Ee=0;Ee<te.buffered.length;Ee++){var ze=te.buffered.start(Ee),qe=te.buffered.end(Ee);this._pendingRemoveRanges[J].push({start:ze,end:qe})}if(te.updating||this._doRemoveRanges(),m.safari){var St=this._lastInitSegments[J];St&&(this._pendingSegments[J].push(St),te.updating||this._doAppendSegments())}}}},{key:"endOfStream",value:function(){var W=this._mediaSource,J=this._sourceBuffers;if(!W||W.readyState!=="open"){W&&W.readyState==="closed"&&this._hasPendingSegments()&&(this._hasPendingEos=!0);return}J.video&&J.video.updating||J.audio&&J.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,W.endOfStream())}},{key:"getNearestKeyframe",value:function(W){return this._idrList.getLastSyncPointBeforeDts(W)}},{key:"_needCleanupSourceBuffer",value:function(){if(!this._config.autoCleanupSourceBuffer)return!1;var W=this._mediaElement.currentTime;for(var J in this._sourceBuffers){var te=this._sourceBuffers[J];if(te){var se=te.buffered;if(se.length>=1&&W-se.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}},{key:"_doCleanupSourceBuffer",value:function(){var W=this._mediaElement.currentTime;for(var J in this._sourceBuffers){var te=this._sourceBuffers[J];if(te){for(var se=te.buffered,Ee=!1,ze=0;ze<se.length;ze++){var qe=se.start(ze),St=se.end(ze);if(qe<=W&&W<St+3){if(W-qe>=this._config.autoCleanupMaxBackwardDuration){Ee=!0;var Lt=W-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[J].push({start:qe,end:Lt})}}else St<W&&(Ee=!0,this._pendingRemoveRanges[J].push({start:qe,end:St}))}Ee&&!te.updating&&this._doRemoveRanges()}}}},{key:"_updateMediaSourceDuration",value:function(){var W=this._sourceBuffers;if(this._mediaElement.readyState===0||this._mediaSource.readyState!=="open")return;if(W.video&&W.video.updating||W.audio&&W.audio.updating)return;var J=this._mediaSource.duration,te=this._pendingMediaDuration;te>0&&(isNaN(J)||te>J)&&(T.v(this.TAG,"Update MediaSource duration from ".concat(J," to ").concat(te)),this._mediaSource.duration=te),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}},{key:"_doRemoveRanges",value:function(){for(var W in this._pendingRemoveRanges){if(!this._sourceBuffers[W]||this._sourceBuffers[W].updating)continue;for(var J=this._sourceBuffers[W],te=this._pendingRemoveRanges[W];te.length&&!J.updating;){var se=te.shift();J.remove(se.start,se.end)}}}},{key:"_doAppendSegments",value:function(){var W=this._pendingSegments;for(var J in W){if(!this._sourceBuffers[J]||this._sourceBuffers[J].updating)continue;if(W[J].length>0){var te=W[J].shift();if(te.timestampOffset){var se=this._sourceBuffers[J].timestampOffset,Ee=te.timestampOffset/1e3,ze=Math.abs(se-Ee);ze>.1&&(T.v(this.TAG,"Update MPEG audio timestampOffset from ".concat(se," to ").concat(Ee)),this._sourceBuffers[J].timestampOffset=Ee),delete te.timestampOffset}if(!te.data||te.data.byteLength===0)continue;try{this._sourceBuffers[J].appendBuffer(te.data),this._isBufferFull=!1,J==="video"&&te.hasOwnProperty("info")&&this._idrList.appendArray(te.info.syncPoints)}catch(qe){this._pendingSegments[J].unshift(te),qe.code===22?(this._isBufferFull||this._emitter.emit(st.BUFFER_FULL),this._isBufferFull=!0):(T.e(this.TAG,qe.message),this._emitter.emit(st.ERROR,{code:qe.code,msg:qe.message}))}}}}},{key:"_onSourceOpen",value:function(){if(T.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var W=this._pendingSourceBufferInit;W.length;){var J=W.shift();this.appendInitSegment(J,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(st.SOURCE_OPEN)}},{key:"_onSourceEnded",value:function(){T.v(this.TAG,"MediaSource onSourceEnded")}},{key:"_onSourceClose",value:function(){T.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&this.e!=null&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}},{key:"_hasPendingSegments",value:function(){var W=this._pendingSegments;return W.video.length>0||W.audio.length>0}},{key:"_hasPendingRemoveRanges",value:function(){var W=this._pendingRemoveRanges;return W.video.length>0||W.audio.length>0}},{key:"_onSourceBufferUpdateEnd",value:function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(st.UPDATE_END)}},{key:"_onSourceBufferError",value:function(W){T.e(this.TAG,"SourceBuffer Error: ".concat(W))}}]),Se}(),$e=ut,_e={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},je={NETWORK_EXCEPTION:n.EXCEPTION,NETWORK_STATUS_CODE_INVALID:n.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:n.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:n.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:V.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:V.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:V.CODEC_UNSUPPORTED},ct=function(){function Se(de,W){if(Object(ae.a)(this,Se),this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new S.a,this._config=ie(),typeof W=="object"&&Object.assign(this._config,W),de.type.toLowerCase()!=="flv")throw new s("FlvPlayer requires an flv MediaDataSource input!");de.isLive===!0&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=de,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;var J=m.chrome&&(m.version.major<50||m.version.major===50&&m.version.build<2661);this._alwaysSeekKeyframe=!!(J||m.msedge||m.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}return Object(Q.a)(Se,[{key:"destroy",value:function(){this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(W,J){var te=this;W===we.MEDIA_INFO?this._mediaInfo!=null&&Promise.resolve().then(function(){te._emitter.emit(we.MEDIA_INFO,te.mediaInfo)}):W===we.STATISTICS_INFO&&(this._statisticsInfo!=null&&Promise.resolve().then(function(){te._emitter.emit(we.STATISTICS_INFO,te.statisticsInfo)})),this._emitter.addListener(W,J)}},{key:"off",value:function(W,J){this._emitter.removeListener(W,J)}},{key:"attachMediaElement",value:function(W){var J=this;if(this._mediaElement=W,W.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),W.addEventListener("seeking",this.e.onvSeeking),W.addEventListener("canplay",this.e.onvCanPlay),W.addEventListener("stalled",this.e.onvStalled),W.addEventListener("progress",this.e.onvProgress),this._msectl=new $e(this._config),this._msectl.on(st.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(st.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(st.SOURCE_OPEN,function(){J._mseSourceOpened=!0,J._hasPendingLoad&&(J._hasPendingLoad=!1,J.load())}),this._msectl.on(st.ERROR,function(te){J._emitter.emit(we.ERROR,_e.MEDIA_ERROR,je.MEDIA_MSE_ERROR,te)}),this._msectl.attachMediaElement(W),this._pendingSeekTime!=null)try{W.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(te){}}},{key:"detachMediaElement",value:function(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)}},{key:"load",value:function(){var W=this;if(!this._mediaElement)throw new c("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new c("FlvPlayer.load() has been called, please call unload() first!");if(this._hasPendingLoad)return;if(this._config.deferLoadAfterSourceOpen&&this._mseSourceOpened===!1){this._hasPendingLoad=!0;return}this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new _t(this._mediaDataSource,this._config),this._transmuxer.on(xe.INIT_SEGMENT,function(J,te){W._msectl.appendInitSegment(te)}),this._transmuxer.on(xe.MEDIA_SEGMENT,function(J,te){if(W._msectl.appendMediaSegment(te),W._config.lazyLoad&&!W._config.isLive){var se=W._mediaElement.currentTime;te.info.endDts>=(se+W._config.lazyLoadMaxDuration)*1e3&&(W._progressChecker==null&&(T.v(W.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),W._suspendTransmuxer()))}}),this._transmuxer.on(xe.LOADING_COMPLETE,function(){W._msectl.endOfStream(),W._emitter.emit(we.LOADING_COMPLETE)}),this._transmuxer.on(xe.RECOVERED_EARLY_EOF,function(){W._emitter.emit(we.RECOVERED_EARLY_EOF)}),this._transmuxer.on(xe.IO_ERROR,function(J,te){W._emitter.emit(we.ERROR,_e.NETWORK_ERROR,J,te)}),this._transmuxer.on(xe.DEMUX_ERROR,function(J,te){W._emitter.emit(we.ERROR,_e.MEDIA_ERROR,J,{code:-1,msg:te})}),this._transmuxer.on(xe.MEDIA_INFO,function(J){W._mediaInfo=J,W._emitter.emit(we.MEDIA_INFO,Object.assign({},J))}),this._transmuxer.on(xe.METADATA_ARRIVED,function(J){W._emitter.emit(we.METADATA_ARRIVED,J)}),this._transmuxer.on(xe.SCRIPTDATA_ARRIVED,function(J){W._emitter.emit(we.SCRIPTDATA_ARRIVED,J)}),this._transmuxer.on(xe.STATISTICS_INFO,function(J){W._statisticsInfo=W._fillStatisticsInfo(J),W._emitter.emit(we.STATISTICS_INFO,Object.assign({},W._statisticsInfo))}),this._transmuxer.on(xe.RECOMMEND_SEEKPOINT,function(J){W._mediaElement&&!W._config.accurateSeek&&(W._requestSetTime=!0,W._mediaElement.currentTime=J/1e3)}),this._transmuxer.open()}},{key:"unload",value:function(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(W){this._mediaElement.volume=W}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(W){this._mediaElement.muted=W}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(W){this._mediaElement?this._internalSeek(W):this._pendingSeekTime=W}},{key:"mediaInfo",get:function(){return Object.assign({},this._mediaInfo)}},{key:"statisticsInfo",get:function(){return this._statisticsInfo==null&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}},{key:"_fillStatisticsInfo",value:function(W){if(W.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return W;var J=!0,te=0,se=0;if(this._mediaElement.getVideoPlaybackQuality){var Ee=this._mediaElement.getVideoPlaybackQuality();te=Ee.totalVideoFrames,se=Ee.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(te=this._mediaElement.webkitDecodedFrameCount,se=this._mediaElement.webkitDroppedFrameCount):J=!1;return J&&(W.decodedFrames=te,W.droppedFrames=se),W}},{key:"_onmseUpdateEnd",value:function(){if(!this._config.lazyLoad||this._config.isLive)return;for(var W=this._mediaElement.buffered,J=this._mediaElement.currentTime,te=0,se=0,Ee=0;Ee<W.length;Ee++){var ze=W.start(Ee),qe=W.end(Ee);if(ze<=J&&J<qe){te=ze,se=qe;break}}se>=J+this._config.lazyLoadMaxDuration&&this._progressChecker==null&&(T.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}},{key:"_onmseBufferFull",value:function(){T.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),this._progressChecker==null&&this._suspendTransmuxer()}},{key:"_suspendTransmuxer",value:function(){this._transmuxer&&(this._transmuxer.pause(),this._progressChecker==null&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}},{key:"_checkProgressAndResume",value:function(){for(var W=this._mediaElement.currentTime,J=this._mediaElement.buffered,te=!1,se=0;se<J.length;se++){var Ee=J.start(se),ze=J.end(se);if(W>=Ee&&W<ze){W>=ze-this._config.lazyLoadRecoverDuration&&(te=!0);break}}te&&(window.clearInterval(this._progressChecker),this._progressChecker=null,te&&(T.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}},{key:"_isTimepointBuffered",value:function(W){for(var J=this._mediaElement.buffered,te=0;te<J.length;te++){var se=J.start(te),Ee=J.end(te);if(W>=se&&W<Ee)return!0}return!1}},{key:"_internalSeek",value:function(W){var J=this._isTimepointBuffered(W),te=!1,se=0;if(W<1&&this._mediaElement.buffered.length>0){var Ee=this._mediaElement.buffered.start(0);(Ee<1&&W<Ee||m.safari)&&(te=!0,se=m.safari?.1:Ee)}if(te)this._requestSetTime=!0,this._mediaElement.currentTime=se;else if(J){if(!this._alwaysSeekKeyframe)this._requestSetTime=!0,this._mediaElement.currentTime=W;else{var ze=this._msectl.getNearestKeyframe(Math.floor(W*1e3));this._requestSetTime=!0,ze!=null?this._mediaElement.currentTime=ze.dts/1e3:this._mediaElement.currentTime=W}this._progressChecker!=null&&this._checkProgressAndResume()}else this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(W),this._transmuxer.seek(Math.floor(W*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=W)}},{key:"_checkAndApplyUnbufferedSeekpoint",value:function(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){var W=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(W)||(this._progressChecker!=null&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(W),this._transmuxer.seek(Math.floor(W*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=W))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}},{key:"_checkAndResumeStuckPlayback",value:function(W){var J=this._mediaElement;if(W||!this._receivedCanPlay||J.readyState<2){var te=J.buffered;te.length>0&&J.currentTime<te.start(0)&&(T.w(this.TAG,"Playback seems stuck at ".concat(J.currentTime,", seek to ").concat(te.start(0))),this._requestSetTime=!0,this._mediaElement.currentTime=te.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress))}else this._mediaElement.removeEventListener("progress",this.e.onvProgress)}},{key:"_onvLoadedMetadata",value:function(W){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)}},{key:"_onvSeeking",value:function(W){var J=this._mediaElement.currentTime,te=this._mediaElement.buffered;if(this._requestSetTime){this._requestSetTime=!1;return}if(J<1&&te.length>0){var se=te.start(0);if(se<1&&J<se||m.safari){this._requestSetTime=!0,this._mediaElement.currentTime=m.safari?.1:se;return}}if(this._isTimepointBuffered(J)){if(this._alwaysSeekKeyframe){var Ee=this._msectl.getNearestKeyframe(Math.floor(J*1e3));Ee!=null&&(this._requestSetTime=!0,this._mediaElement.currentTime=Ee.dts/1e3)}this._progressChecker!=null&&this._checkProgressAndResume();return}this._seekpointRecord={seekPoint:J,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}},{key:"_onvCanPlay",value:function(W){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)}},{key:"_onvStalled",value:function(W){this._checkAndResumeStuckPlayback(!0)}},{key:"_onvProgress",value:function(W){this._checkAndResumeStuckPlayback()}}]),Se}(),et=ct,At=function(){function Se(de,W){if(Object(ae.a)(this,Se),this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new S.a,this._config=ie(),typeof W=="object"&&Object.assign(this._config,W),de.type.toLowerCase()==="flv")throw new s("NativePlayer does't support flv MediaDataSource input!");if(de.hasOwnProperty("segments"))throw new s("NativePlayer(".concat(de.type,") doesn't support multipart playback!"));this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=de,this._mediaElement=null}return Object(Q.a)(Se,[{key:"destroy",value:function(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(W,J){var te=this;W===we.MEDIA_INFO?this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(function(){te._emitter.emit(we.MEDIA_INFO,te.mediaInfo)}):W===we.STATISTICS_INFO&&(this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(function(){te._emitter.emit(we.STATISTICS_INFO,te.statisticsInfo)})),this._emitter.addListener(W,J)}},{key:"off",value:function(W,J){this._emitter.removeListener(W,J)}},{key:"attachMediaElement",value:function(W){if(this._mediaElement=W,W.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._pendingSeekTime!=null)try{W.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(J){}}},{key:"detachMediaElement",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"load",value:function(){if(!this._mediaElement)throw new c("HTMLMediaElement must be attached before load()!");this._mediaElement.src=this._mediaDataSource.url,this._mediaElement.readyState>0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)}},{key:"unload",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(W){this._mediaElement.volume=W}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(W){this._mediaElement.muted=W}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(W){this._mediaElement?this._mediaElement.currentTime=W:this._pendingSeekTime=W}},{key:"mediaInfo",get:function(){var W=this._mediaElement instanceof HTMLAudioElement?"audio/":"video/",J={mimeType:W+this._mediaDataSource.type};return this._mediaElement&&(J.duration=Math.floor(this._mediaElement.duration*1e3),this._mediaElement instanceof HTMLVideoElement&&(J.width=this._mediaElement.videoWidth,J.height=this._mediaElement.videoHeight)),J}},{key:"statisticsInfo",get:function(){var W={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return W;var J=!0,te=0,se=0;if(this._mediaElement.getVideoPlaybackQuality){var Ee=this._mediaElement.getVideoPlaybackQuality();te=Ee.totalVideoFrames,se=Ee.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(te=this._mediaElement.webkitDecodedFrameCount,se=this._mediaElement.webkitDroppedFrameCount):J=!1;return J&&(W.decodedFrames=te,W.droppedFrames=se),W}},{key:"_onvLoadedMetadata",value:function(W){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(we.MEDIA_INFO,this.mediaInfo)}},{key:"_reportStatisticsInfo",value:function(){this._emitter.emit(we.STATISTICS_INFO,this.statisticsInfo)}}]),Se}(),Ct=At;w.install();function lt(Se,de){var W=Se;if(W==null||typeof W!="object")throw new s("MediaDataSource must be an javascript object!");if(!W.hasOwnProperty("type"))throw new s("MediaDataSource must has type field to indicate video file type!");switch(W.type){case"flv":return new et(W,de);default:return new Ct(W,de)}}function gt(){return ye.supportMSEH264Playback()}function kt(){return ye.getFeatureList()}var zt={};zt.createPlayer=lt,zt.isSupported=gt,zt.getFeatureList=kt,zt.BaseLoader=t,zt.LoaderStatus=i,zt.LoaderErrors=n,zt.Events=we,zt.ErrorTypes=_e,zt.ErrorDetails=je,zt.FlvPlayer=et,zt.NativePlayer=Ct,zt.LoggingControl=Te,Object.defineProperty(zt,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var $t=Ke.a=zt},GgEA:function(Je,Ke,B){},Gytx:function(Je,Ke){Je.exports=function(ae,Q,U,w){var P=U?U.call(w,ae,Q):void 0;if(P!==void 0)return!!P;if(ae===Q)return!0;if(typeof ae!="object"||!ae||typeof Q!="object"||!Q)return!1;var S=Object.keys(ae),C=Object.keys(Q);if(S.length!==C.length)return!1;for(var T=Object.prototype.hasOwnProperty.bind(Q),h=0;h<S.length;h++){var p=S[h];if(!T(p))return!1;var f=ae[p],l=Q[p];if(P=U?U.call(w,f,l,p):void 0,P===!1||P===void 0&&f!==l)return!1}return!0}},HmJG:function(Je,Ke,B){},Hw79:function(Je,Ke,B){Je.exports={pagination:"pagination___2VQzP",info:"info___1saw2"}},I8Z2:function(Je,Ke,B){"use strict";B.d(Ke,"a",function(){return w}),B.d(Ke,"b",function(){return a}),B.d(Ke,"c",function(){return s});var ae=B("cDcd"),Q=function(){var u=function(i,n){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,d){t.__proto__=d}||function(t,d){for(var v in d)d.hasOwnProperty(v)&&(t[v]=d[v])},u(i,n)};return function(i,n){u(i,n);function t(){this.constructor=i}i.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}}(),U=ae.createContext(null),w=function(u){Q(i,u);function i(){return u!==null&&u.apply(this,arguments)||this}return i.prototype.render=function(){return ae.createElement(U.Provider,{value:this.props.store},this.props.children)},i}(ae.Component),P=B("Gytx"),S=B.n(P),C=B("2mql"),T=B.n(C),h=function(){var u=function(i,n){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,d){t.__proto__=d}||function(t,d){for(var v in d)d.hasOwnProperty(v)&&(t[v]=d[v])},u(i,n)};return function(i,n){u(i,n);function t(){this.constructor=i}i.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}}(),p=function(){return p=Object.assign||function(u){for(var i,n=1,t=arguments.length;n<t;n++){i=arguments[n];for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&(u[d]=i[d])}return u},p.apply(this,arguments)};function f(u){return u.displayName||u.name||"Component"}var l=function(){return{}};function a(u,i){i===void 0&&(i={});var n=!!u,t=u||l;return function(v){var b=function(_){h(m,_);function m(g,E){var o=_.call(this,g,E)||this;return o.unsubscribe=null,o.handleChange=function(){if(!o.unsubscribe)return;var x=t(o.store.getState(),o.props);o.setState({subscribed:x})},o.store=o.context,o.state={subscribed:t(o.store.getState(),g),store:o.store,props:g},o}return m.getDerivedStateFromProps=function(g,E){return u&&u.length===2&&g!==E.props?{subscribed:t(E.store.getState(),g),props:g}:{props:g}},m.prototype.componentDidMount=function(){this.trySubscribe()},m.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},m.prototype.shouldComponentUpdate=function(g,E){return!S()(this.props,g)||!S()(this.state.subscribed,E.subscribed)},m.prototype.trySubscribe=function(){n&&(this.unsubscribe=this.store.subscribe(this.handleChange),this.handleChange())},m.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},m.prototype.render=function(){var g=p(p(p({},this.props),this.state.subscribed),{store:this.store});return ae.createElement(v,p({},g,{ref:this.props.miniStoreForwardedRef}))},m.displayName="Connect("+f(v)+")",m.contextType=U,m}(ae.Component);if(i.forwardRef){var y=ae.forwardRef(function(_,m){return ae.createElement(b,p({},_,{miniStoreForwardedRef:m}))});return T()(y,v)}return T()(b,v)}}var c=function(){return c=Object.assign||function(u){for(var i,n=1,t=arguments.length;n<t;n++){i=arguments[n];for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&(u[d]=i[d])}return u},c.apply(this,arguments)};function s(u){var i=u,n=[];function t(b){i=c(c({},i),b);for(var y=0;y<n.length;y++)n[y]()}function d(){return i}function v(b){return n.push(b),function(){var _=n.indexOf(b);n.splice(_,1)}}return{setState:t,getState:d,subscribe:v}}},IBYe:function(Je,Ke,B){"use strict";function ae(Q){return null}Ke.a=ae},IxHN:function(Je,Ke,B){"use strict";var ae=B("cDcd"),Q=B.n(ae),U=B("07cG"),w=B.n(U);Ke.a=function(P){var S=P.message,C=P.className,T=P.children,h=P.style,p=h===void 0?{}:h;return Q.a.createElement("div",{className:"".concat(w.a.idsRingWrapper," ").concat(C)},Q.a.createElement("div",{className:w.a.ldsRing},Q.a.createElement("div",null),Q.a.createElement("div",null),Q.a.createElement("div",null),Q.a.createElement("div",null)),S?Q.a.createElement("p",{style:p},S):null,T)}},J66h:function(Je,Ke,B){(function(ae){var Q,U;(function(w,P){Je.exports=P(w)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof ae!="undefined"?ae:this,function(w){"use strict";w=w||{};var P=w.Base64,S="2.6.4",C="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",T=function(D){for(var I={},F=0,z=D.length;F<z;F++)I[D.charAt(F)]=F;return I}(C),h=String.fromCharCode,p=function(D){if(D.length<2){var I=D.charCodeAt(0);return I<128?D:I<2048?h(192|I>>>6)+h(128|I&63):h(224|I>>>12&15)+h(128|I>>>6&63)+h(128|I&63)}else{var I=65536+(D.charCodeAt(0)-55296)*1024+(D.charCodeAt(1)-56320);return h(240|I>>>18&7)+h(128|I>>>12&63)+h(128|I>>>6&63)+h(128|I&63)}},f=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,l=function(D){return D.replace(f,p)},a=function(D){var I=[0,2,1][D.length%3],F=D.charCodeAt(0)<<16|(D.length>1?D.charCodeAt(1):0)<<8|(D.length>2?D.charCodeAt(2):0),z=[C.charAt(F>>>18),C.charAt(F>>>12&63),I>=2?"=":C.charAt(F>>>6&63),I>=1?"=":C.charAt(F&63)];return z.join("")},c=w.btoa&&typeof w.btoa=="function"?function(D){return w.btoa(D)}:function(D){if(D.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return D.replace(/[\s\S]{1,3}/g,a)},s=function(D){return c(l(String(D)))},u=function(D){return D.replace(/[+\/]/g,function(I){return I=="+"?"-":"_"}).replace(/=/g,"")},i=function(D,I){return I?u(s(D)):s(D)},n=function(D){return i(D,!0)},t;w.Uint8Array&&(t=function(D,I){for(var F="",z=0,ne=D.length;z<ne;z+=3){var j=D[z],G=D[z+1],X=D[z+2],Z=j<<16|G<<8|X;F+=C.charAt(Z>>>18)+C.charAt(Z>>>12&63)+(typeof G!="undefined"?C.charAt(Z>>>6&63):"=")+(typeof X!="undefined"?C.charAt(Z&63):"=")}return I?u(F):F});var d=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,v=function(D){switch(D.length){case 4:var I=(7&D.charCodeAt(0))<<18|(63&D.charCodeAt(1))<<12|(63&D.charCodeAt(2))<<6|63&D.charCodeAt(3),F=I-65536;return h((F>>>10)+55296)+h((F&1023)+56320);case 3:return h((15&D.charCodeAt(0))<<12|(63&D.charCodeAt(1))<<6|63&D.charCodeAt(2));default:return h((31&D.charCodeAt(0))<<6|63&D.charCodeAt(1))}},b=function(D){return D.replace(d,v)},y=function(D){var I=D.length,F=I%4,z=(I>0?T[D.charAt(0)]<<18:0)|(I>1?T[D.charAt(1)]<<12:0)|(I>2?T[D.charAt(2)]<<6:0)|(I>3?T[D.charAt(3)]:0),ne=[h(z>>>16),h(z>>>8&255),h(z&255)];return ne.length-=[0,0,2,1][F],ne.join("")},_=w.atob&&typeof w.atob=="function"?function(D){return w.atob(D)}:function(D){return D.replace(/\S{1,4}/g,y)},m=function(D){return _(String(D).replace(/[^A-Za-z0-9\+\/]/g,""))},g=function(D){return b(_(D))},E=function(D){return String(D).replace(/[-_]/g,function(I){return I=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},o=function(D){return g(E(D))},x;w.Uint8Array&&(x=function(D){return Uint8Array.from(m(E(D)),function(I){return I.charCodeAt(0)})});var A=function(){var D=w.Base64;return w.Base64=P,D};if(w.Base64={VERSION:S,atob:m,btoa:c,fromBase64:o,toBase64:i,utob:l,encode:i,encodeURI:n,btou:b,decode:o,noConflict:A,fromUint8Array:t,toUint8Array:x},typeof Object.defineProperty=="function"){var O=function(D){return{value:D,enumerable:!1,writable:!0,configurable:!0}};w.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",O(function(){return o(this)})),Object.defineProperty(String.prototype,"toBase64",O(function(D){return i(this,D)})),Object.defineProperty(String.prototype,"toBase64URI",O(function(){return i(this,!0)}))}}return w.Meteor&&(Base64=w.Base64),Je.exports?Je.exports.Base64=w.Base64:!(Q=[],U=function(){return w.Base64}.apply(Ke,Q),U!==void 0&&(Je.exports=U)),{Base64:w.Base64}})}).call(this,B("IyRk"))},JOrW:function(Je,Ke,B){Je.exports=B.p+"static/gf.09d89ab3.svg"},LdHM:function(Je,Ke,B){"use strict";B.d(Ke,"b",function(){return d}),B.d(Ke,"a",function(){return b});var ae=B("1OyB"),Q=B("vuIU"),U=B("Ji7U"),w=B("LK+K"),P=B("cDcd"),S=B("rePB"),C=B("Ff2n"),T=B("ODXe"),h=B("4IlW"),p=B("bX4T"),f=B("YrtM"),l=B("TSYQ"),a=B.n(l),c=B("+nKL"),s=B("8OUc"),u=function(X,Z){var K=X.prefixCls,q=X.id,ie=X.flattenOptions,oe=X.childrenAsData,ye=X.values,pe=X.searchValue,we=X.multiple,fe=X.defaultActiveFirstOption,Te=X.height,Fe=X.itemHeight,De=X.notFoundContent,Me=X.open,Ue=X.menuItemSelectedIcon,ve=X.virtual,ce=X.onSelect,Ie=X.onToggleOpen,Ne=X.onActiveValue,Xe=X.onScroll,ee=X.onMouseEnter,k="".concat(K,"-item"),N=Object(f.a)(function(){return ie},[Me,ie],function(He,Pe){return Pe[0]&&He[1]!==Pe[1]}),$=P.useRef(null),V=function(Pe){Pe.preventDefault()},Y=function(Pe){$.current&&$.current.scrollTo({index:Pe})},me=function(Pe){for(var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Oe=N.length,he=0;he<Oe;he+=1){var be=(Pe+he*Re+Oe)%Oe,Ce=N[be],xe=Ce.group,Be=Ce.data;if(!xe&&!Be.disabled)return be}return-1},Ae=P.useState(function(){return me(0)}),at=Object(T.a)(Ae,2),Le=at[0],ke=at[1],Ye=function(Pe){ke(Pe);var Re=N[Pe];if(!Re){Ne(null,-1);return}Ne(Re.data.value,Pe)};P.useEffect(function(){Ye(fe!==!1?me(0):-1)},[N.length,pe]),P.useEffect(function(){var He=setTimeout(function(){if(!we&&Me&&ye.size===1){var Pe=Array.from(ye)[0],Re=N.findIndex(function(Oe){var he=Oe.data;return he.value===Pe});Ye(Re),Y(Re)}});return function(){return clearTimeout(He)}},[Me]);var Ze=function(Pe){Pe!==void 0&&ce(Pe,{selected:!ye.has(Pe)}),we||Ie(!1)};if(P.useImperativeHandle(Z,function(){return{onKeyDown:function(Pe){var Re=Pe.which;switch(Re){case h.a.UP:case h.a.DOWN:{var Oe=0;if(Re===h.a.UP?Oe=-1:Re===h.a.DOWN&&(Oe=1),Oe!==0){var he=me(Le+Oe,Oe);Y(he),Ye(he)}break}case h.a.ENTER:{var be=N[Le];be&&!be.data.disabled?Ze(be.data.value):Ze(void 0),Me&&Pe.preventDefault();break}case h.a.ESC:Ie(!1)}},onKeyUp:function(){},scrollTo:function(Pe){Y(Pe)}}}),N.length===0)return P.createElement("div",{role:"listbox",id:"".concat(q,"_list"),className:"".concat(k,"-empty"),onMouseDown:V},De);function Ve(He){var Pe=N[He];if(!Pe)return null;var Re=Pe.data||{},Oe=Re.value,he=Re.label,be=Re.children,Ce=Object(p.a)(Re,!0),xe=oe?be:he;return Pe?P.createElement("div",Object.assign({"aria-label":typeof xe=="string"?xe:null},Ce,{key:He,role:"option",id:"".concat(q,"_list_").concat(He),"aria-selected":ye.has(Oe)}),Oe):null}return P.createElement(P.Fragment,null,P.createElement("div",{role:"listbox",id:"".concat(q,"_list"),style:{height:0,width:0,overflow:"hidden"}},Ve(Le-1),Ve(Le),Ve(Le+1)),P.createElement(c.a,{itemKey:"key",ref:$,data:N,height:Te,itemHeight:Fe,fullHeight:!1,onMouseDown:V,onScroll:Xe,virtual:ve,onMouseEnter:ee},function(He,Pe){var Re,Oe=He.group,he=He.groupOption,be=He.data,Ce=be.label,xe=be.key;if(Oe)return P.createElement("div",{className:a()(k,"".concat(k,"-group"))},Ce!==void 0?Ce:xe);var Be=be.disabled,Qe=be.value,rt=be.title,dt=be.children,xt=be.style,_t=be.className,wt=Object(C.a)(be,["disabled","value","title","children","style","className"]),st=ye.has(Qe),ut="".concat(k,"-option"),$e=a()(k,ut,_t,(Re={},Object(S.a)(Re,"".concat(ut,"-grouped"),he),Object(S.a)(Re,"".concat(ut,"-active"),Le===Pe&&!Be),Object(S.a)(Re,"".concat(ut,"-disabled"),Be),Object(S.a)(Re,"".concat(ut,"-selected"),st),Re)),_e=oe?dt:Ce,je=!Ue||typeof Ue=="function"||st;return P.createElement("div",Object.assign({},wt,{"aria-selected":st,className:$e,title:rt,onMouseMove:function(){if(Le===Pe||Be)return;Ye(Pe)},onClick:function(){Be||Ze(Qe)},style:xt}),P.createElement("div",{className:"".concat(ut,"-content")},_e||Qe),P.isValidElement(Ue)||st,je&&P.createElement(s.a,{className:"".concat(k,"-option-state"),customizeIcon:Ue,customizeIconProps:{isSelected:st}},st?"\u2713":null))}))},i=P.forwardRef(u);i.displayName="OptionList";var n=i,t=function(){return null};t.isSelectOption=!0;var d=t,v=function(){return null};v.isSelectOptGroup=!0;var b=v,y=B("VTBJ"),_=B("Zm9Q");function m(G){var X=G.key,Z=G.props,K=Z.children,q=Z.value,ie=Object(C.a)(Z,["children","value"]);return Object(y.a)({key:X,value:q!==void 0?q:X,children:K},ie)}function g(G){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(_.a)(G).map(function(Z,K){if(!P.isValidElement(Z)||!Z.type)return null;var q=Z.type.isSelectOptGroup,ie=Z.key,oe=Z.props,ye=oe.children,pe=Object(C.a)(oe,["children"]);return X||!q?m(Z):Object(y.a)(Object(y.a)({key:"__RC_SELECT_GRP__".concat(ie===null?K:ie,"__"),label:ie},pe),{},{options:g(ye)})}).filter(function(Z){return Z})}var E=B("2Qr1"),o=B("qNPg"),x=B("U8pU"),A=B("Kwbf"),O=B("WKfj");function D(G){var X=G.mode,Z=G.options,K=G.children,q=G.backfill,ie=G.allowClear,oe=G.placeholder,ye=G.getInputElement,pe=G.showSearch,we=G.onSearch,fe=G.defaultOpen,Te=G.autoFocus,Fe=G.labelInValue,De=G.value,Me=G.inputValue,Ue=G.optionLabelProp,ve=X==="multiple"||X==="tags",ce=pe!==void 0?pe:ve||X==="combobox",Ie=Z||g(K);if(Object(A.a)(X!=="tags"||Ie.every(function(k){return!k.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),X==="tags"||X==="combobox"){var Ne=Ie.some(function(k){return k.options?k.options.some(function(N){return typeof("value"in N?N.value:N.key)=="number"}):typeof("value"in k?k.value:k.key)=="number"});Object(A.a)(!Ne,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(A.a)(X!=="combobox"||!Ue,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(A.a)(X==="combobox"||!q,"`backfill` only works with `combobox` mode."),Object(A.a)(X==="combobox"||!ye,"`getInputElement` only work with `combobox` mode."),Object(A.b)(X!=="combobox"||!ye||!ie||!oe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),we&&!ce&&X!=="combobox"&&X!=="tags"&&Object(A.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(A.b)(!fe||Te,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),De!=null){var Xe=Object(O.d)(De);Object(A.a)(!Fe||Xe.every(function(k){return Object(x.a)(k)==="object"&&("key"in k||"value"in k)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(A.a)(!ve||Array.isArray(De),"`value` should be array when `mode` is `multiple` or `tags`")}if(K){var ee=null;Object(_.a)(K).some(function(k){if(!P.isValidElement(k)||!k.type)return!1;var N=k.type;if(N.isSelectOption)return!1;if(N.isSelectOptGroup){var $=Object(_.a)(k.props.children).every(function(V){return!P.isValidElement(V)||!k.type||V.type.isSelectOption?!0:(ee=V.type,!1)});return!$}return ee=N,!0}),ee&&Object(A.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ee.displayName||ee.name||ee,"`.")),Object(A.a)(Me===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var I=D,F=Object(o.a)({prefixCls:"rc-select",components:{optionList:n},convertChildrenToData:g,flattenOptions:E.d,getLabeledValue:E.e,filterOptions:E.b,isValueDisabled:E.g,findValueOption:E.c,warningProps:I,fillOptionsWithMissingValue:E.a}),z=function(G){Object(U.a)(Z,G);var X=Object(w.a)(Z);function Z(){var K;return Object(ae.a)(this,Z),K=X.apply(this,arguments),K.selectRef=P.createRef(),K.focus=function(){K.selectRef.current.focus()},K.blur=function(){K.selectRef.current.blur()},K}return Object(Q.a)(Z,[{key:"render",value:function(){return P.createElement(F,Object.assign({ref:this.selectRef},this.props))}}]),Z}(P.Component);z.Option=d,z.OptGroup=b;var ne=z,j=Ke.c=ne},M8RZ:function(Je,Ke,B){"use strict";B.d(Ke,"a",function(){return h});var ae=B("fWQN"),Q=B("mtLc"),U=B("yKVA"),w=B("879j"),P=B("cDcd"),S=B.n(P),C=B("faye"),T=B.n(C),h=function(p){Object(U.a)(l,p);var f=Object(w.a)(l);function l(a){var c;Object(ae.a)(this,l),c=f.call(this,a);var s=window.document;return c.node=s.createElement("div"),s.body.appendChild(c.node),c}return Object(Q.a)(l,[{key:"render",value:function(){var c=this.props.children;return Object(C.createPortal)(c,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),l}(S.a.Component)},MFOe:function(Je,Ke,B){(function(ae){var Q=S(),U=C(),w=T(),P=typeof window!="undefined"?window:ae;Je.exports={assign:Q,create:U,trim:w,bind:h,slice:p,each:f,map:l,pluck:a,isList:c,isFunction:s,isObject:u,Global:P};function S(){return Object.assign?Object.assign:function(n,t,d,v){for(var b=1;b<arguments.length;b++)f(Object(arguments[b]),function(y,_){n[_]=y});return n}}function C(){if(Object.create)return function(t,d,v,b){var y=p(arguments,1);return Q.apply(this,[Object.create(t)].concat(y))};{function i(){}return function(t,d,v,b){var y=p(arguments,1);return i.prototype=t,Q.apply(this,[new i].concat(y))}}}function T(){return String.prototype.trim?function(n){return String.prototype.trim.call(n)}:function(n){return n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function h(i,n){return function(){return n.apply(i,Array.prototype.slice.call(arguments,0))}}function p(i,n){return Array.prototype.slice.call(i,n||0)}function f(i,n){a(i,function(t,d){return n(t,d),!1})}function l(i,n){var t=c(i)?[]:{};return a(i,function(d,v){return t[v]=n(d,v),!1}),t}function a(i,n){if(c(i)){for(var t=0;t<i.length;t++)if(n(i[t],t))return i[t]}else for(var d in i)if(i.hasOwnProperty(d)&&n(i[d],d))return i[d]}function c(i){return i!=null&&typeof i!="function"&&typeof i.length=="number"}function s(i){return i&&{}.toString.call(i)==="[object Function]"}function u(i){return i&&{}.toString.call(i)==="[object Object]"}}).call(this,B("IyRk"))},MVJL:function(Je,Ke,B){Je.exports={flex_box_center:"flex_box_center___2gBaY",flex_space_between:"flex_space_between___2uD--",flex_box_vertical_center:"flex_box_vertical_center___3Bq-4",flex_box_center_end:"flex_box_center_end___2MOXm",flex_box_column:"flex_box_column___1Sq4x",discussItem:"discussItem___Mk503",wrap:"wrap___VPGVq",list:"list___2zNHf",btns:"btns___1hoB3",secondLevelDiscuss:"secondLevelDiscuss___9Ixoa",line:"line___20Ukm",thirdlyLevelDiscuss:"thirdlyLevelDiscuss___3ZS-s"}},NvD2:function(Je,Ke,B){"use strict";B.d(Ke,"a",function(){return S});var ae=B("Kwbf");function Q(C,T){var h=new Set;return C.forEach(function(p){T.has(p)||h.add(p)}),h}function U(C){var T=C||{},h=T.disabled,p=T.disableCheckbox,f=T.checkable;return!!(h||p)||f===!1}function w(C,T,h,p){for(var f=new Set(C),l=new Set,a=0;a<=h;a+=1){var c=T.get(a)||new Set;c.forEach(function(n){var t=n.key,d=n.node,v=n.children,b=v===void 0?[]:v;f.has(t)&&!p(d)&&b.filter(function(y){return!p(y.node)}).forEach(function(y){f.add(y.key)})})}for(var s=new Set,u=h;u>=0;u-=1){var i=T.get(u)||new Set;i.forEach(function(n){var t=n.parent,d=n.node;if(p(d)||!n.parent||s.has(n.parent.key))return;if(p(n.parent.node)){s.add(t.key);return}var v=!0,b=!1;(t.children||[]).filter(function(y){return!p(y.node)}).forEach(function(y){var _=y.key,m=f.has(_);v&&!m&&(v=!1),!b&&(m||l.has(_))&&(b=!0)}),v&&f.add(t.key),b&&l.add(t.key),s.add(t.key)})}return{checkedKeys:Array.from(f),halfCheckedKeys:Array.from(Q(l,f))}}function P(C,T,h,p,f){for(var l=new Set(C),a=new Set(T),c=0;c<=p;c+=1){var s=h.get(c)||new Set;s.forEach(function(t){var d=t.key,v=t.node,b=t.children,y=b===void 0?[]:b;!l.has(d)&&!a.has(d)&&!f(v)&&y.filter(function(_){return!f(_.node)}).forEach(function(_){l.delete(_.key)})})}a=new Set;for(var u=new Set,i=p;i>=0;i-=1){var n=h.get(i)||new Set;n.forEach(function(t){var d=t.parent,v=t.node;if(f(v)||!t.parent||u.has(t.parent.key))return;if(f(t.parent.node)){u.add(d.key);return}var b=!0,y=!1;(d.children||[]).filter(function(_){return!f(_.node)}).forEach(function(_){var m=_.key,g=l.has(m);b&&!g&&(b=!1),!y&&(g||a.has(m))&&(y=!0)}),b||l.delete(d.key),y&&a.add(d.key),u.add(d.key)})}return{checkedKeys:Array.from(l),halfCheckedKeys:Array.from(Q(a,l))}}function S(C,T,h,p){var f=[],l;p?l=p:l=U;var a=new Set(C.filter(function(i){var n=!!h[i];return n||f.push(i),n})),c=new Map,s=0;Object.keys(h).forEach(function(i){var n=h[i],t=n.level,d=c.get(t);d||(d=new Set,c.set(t,d)),d.add(n),s=Math.max(s,t)}),Object(ae.a)(!f.length,"Tree missing follow keys: ".concat(f.slice(0,100).map(function(i){return"'".concat(i,"'")}).join(", ")));var u;return T===!0?u=w(a,c,s,l):u=P(a,T.halfCheckedKeys,c,s,l),u}},OLES:function(Je,Ke,B){"use strict";var ae=B("U8pU"),Q=B("VTBJ"),U=B("Ff2n"),w=B("cDcd"),P=B("uciX"),S=B("7ixt"),C=function(a){var c=a.overlay,s=a.prefixCls,u=a.id,i=a.overlayInnerStyle;return w.createElement("div",{className:"".concat(s,"-inner"),id:u,role:"tooltip",style:i},typeof c=="function"?c():c)},T=C,h=function(a,c){var s=a.overlayClassName,u=a.trigger,i=u===void 0?["hover"]:u,n=a.mouseEnterDelay,t=n===void 0?0:n,d=a.mouseLeaveDelay,v=d===void 0?.1:d,b=a.overlayStyle,y=a.prefixCls,_=y===void 0?"rc-tooltip":y,m=a.children,g=a.onVisibleChange,E=a.afterVisibleChange,o=a.transitionName,x=a.animation,A=a.placement,O=A===void 0?"right":A,D=a.align,I=D===void 0?{}:D,F=a.destroyTooltipOnHide,z=F===void 0?!1:F,ne=a.defaultVisible,j=a.getTooltipContainer,G=a.overlayInnerStyle,X=Object(U.a)(a,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),Z=Object(w.useRef)(null);Object(w.useImperativeHandle)(c,function(){return Z.current});var K=Object(Q.a)({},X);"visible"in a&&(K.popupVisible=a.visible);var q=function(){var we=a.arrowContent,fe=we===void 0?null:we,Te=a.overlay,Fe=a.id;return[w.createElement("div",{className:"".concat(_,"-arrow"),key:"arrow"},fe),w.createElement(T,{key:"content",prefixCls:_,id:Fe,overlay:Te,overlayInnerStyle:G})]},ie=!1,oe=!1;if(typeof z=="boolean")ie=z;else if(z&&Object(ae.a)(z)==="object"){var ye=z.keepParent;ie=ye===!0,oe=ye===!1}return w.createElement(P.a,Object.assign({popupClassName:s,prefixCls:_,popup:q,action:i,builtinPlacements:S.a,popupPlacement:O,ref:Z,popupAlign:I,getPopupContainer:j,onPopupVisibleChange:g,afterPopupVisibleChange:E,popupTransitionName:o,popupAnimation:x,defaultPopupVisible:ne,destroyPopupOnHide:ie,autoDestroy:oe,mouseLeaveDelay:v,popupStyle:b,mouseEnterDelay:t},K),m)},p=Object(w.forwardRef)(h),f=Ke.a=p},OZM5:function(Je,Ke,B){"use strict";B.d(Ke,"b",function(){return p}),B.d(Ke,"a",function(){return f}),B.d(Ke,"k",function(){return l}),B.d(Ke,"h",function(){return a}),B.d(Ke,"i",function(){return c}),B.d(Ke,"g",function(){return s}),B.d(Ke,"c",function(){return u}),B.d(Ke,"d",function(){return i}),B.d(Ke,"j",function(){return d}),B.d(Ke,"e",function(){return v}),B.d(Ke,"f",function(){return b});var ae=B("KQm4"),Q=B("U8pU"),U=B("Ff2n"),w=B("cDcd"),P=B.n(w),S=B("Kwbf"),C=B("WaYH"),T=.25,h=2;function p(y,_){var m=y.slice(),g=m.indexOf(_);return g>=0&&m.splice(g,1),m}function f(y,_){var m=y.slice();return m.indexOf(_)===-1&&m.push(_),m}function l(y){return y.split("-")}function a(y,_){return"".concat(y,"-").concat(_)}function c(y){return y&&y.type&&y.type.isTreeNode}function s(y,_){var m=[y],g=_[y];function E(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];o.forEach(function(x){var A=x.key,O=x.children;m.push(A),E(O)})}return E(g.children),m}function u(y,_){var m=y.clientY,g=_.selectHandle.getBoundingClientRect(),E=g.top,o=g.bottom,x=g.height,A=Math.max(x*T,h);return m<=E+A?-1:m>=o-A?1:0}function i(y,_){if(!y)return;var m=_.multiple;return m?y.slice():y.length?[y[0]]:y}var n=function(_){return _};function t(y,_){if(!y)return[];var m=_||{},g=m.processProps,E=g===void 0?n:g,o=Array.isArray(y)?y:[y];return o.map(function(x){var A=x.children,O=Object(U.a)(x,["children"]),D=t(A,_);return P.a.createElement(C.a,Object.assign({},E(O)),D)})}function d(y){if(!y)return null;var _;if(Array.isArray(y))_={checkedKeys:y,halfCheckedKeys:void 0};else if(Object(Q.a)(y)==="object")_={checkedKeys:y.checked||void 0,halfCheckedKeys:y.halfChecked||void 0};else return Object(S.a)(!1,"`checkedKeys` is not an array or an object"),null;return _}function v(y,_){var m=new Set;function g(E){if(m.has(E))return;var o=_[E];if(!o)return;m.add(E);var x=o.parent,A=o.node;if(A.disabled)return;x&&g(x.key)}return(y||[]).forEach(function(E){g(E)}),Object(ae.a)(m)}function b(y){var _={};return Object.keys(y).forEach(function(m){(m.startsWith("data-")||m.startsWith("aria-"))&&(_[m]=y[m])}),_}},"OkW/":function(Je,Ke,B){},Ot1p:function(Je,Ke,B){"use strict";var ae=B("2qtc"),Q=B("kLXV"),U=B("rAM+"),w=B("miYZ"),P=B("tsqr"),S=B("9og8"),C=B("tJVT"),T=B("jrin"),h=B("WmNS"),p=B.n(h),f=B("cDcd"),l=B.n(f),a=B("VrN/"),c=B.n(a),s=B("bdgK"),u=B("p77/"),i=B("Bd2K"),n=B("ELLl"),t=B("19Vz"),d=B("lZu9"),v=B("+NIl"),b=B("kSUc"),y=B("9Bee"),_=function(Be){var Qe=Be.value,rt=Qe===void 0?"":Qe,dt=Be.className,xt=Be.showTextOnly,_t=Be.showLines,wt=Be.style,st=wt===void 0?{}:wt,ut=Object(f.useMemo)(function(){return""},[rt]);return l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{dangerouslySetInnerHTML:{__html:ut}}))},m=B("0Owb"),g=B("dejd"),E=B("C+DQ"),o=B("1vsH"),x=B("m3rI"),A=[{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 O(Be){var Qe=Be.onActionCallback,rt=Be.title,dt=Be.icon,xt=Be.actionName,_t=Be.className,wt=_t===void 0?"":_t,st=Be.children;function ut(){Qe(xt)}return l.a.createElement("a",{title:rt,className:wt,onClick:ut},l.a.createElement("i",{className:"md-iconfont ".concat(dt)}),st)}var D=function(Be){var Qe=Be.watch,rt=Be.showNullButton,dt=Be.onActionCallback,xt=Be.fullScreen,_t=Be.insertTemp,wt=Be.hidetoolBar,st=Be.uuid,ut=Be.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(o.G)("_educoder_session_login"),"&_educoder_session=").concat(Object(o.G)("_educoder_session"),"&key=").concat(st,"&api=").concat(encodeURIComponent(x.a.PROXY_SERVER)));var $e=[].concat(A,[{title:"".concat(Qe?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Qe?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return l.a.createElement("ul",{className:"markdown-toolbar-container"},!wt&&$e.map(function(_e,je){return l.a.createElement("li",{key:je},_e.actionName?l.a.createElement(O,Object(m.a)({},_e,{onActionCallback:dt})):l.a.createElement("span",{className:"v-line"}))}),rt?l.a.createElement("li",null,l.a.createElement(O,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:dt},l.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,_t&&l.a.createElement("li",null,l.a.createElement(O,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(_t),onActionCallback:dt},l.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),l.a.createElement("li",{className:"btn-full-screen"},l.a.createElement(O,{icon:"".concat(xt?"icon-shrink":"icon-enlarge"),title:xt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:dt})))},I=B("M8RZ"),F=B("+L6B"),z=B("2/Rp"),ne=B("y8nQ"),j=B("Vl3Y"),G=B("5NDa"),X=B("5rEg"),Z={labelCol:{span:4},wrapperCol:{span:20}},K=function(Be){var Qe=Be.callback,rt=Be.onCancel;function dt(xt){Qe(xt)}return l.a.createElement(j.a,Object(m.a)({},Z,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:dt}),l.a.createElement(j.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},l.a.createElement(X.a,null)),l.a.createElement(j.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},l.a.createElement(X.a,null)),l.a.createElement("div",{className:"flex-container flex-end"},l.a.createElement(z.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(z.a,{type:"ghost",onClick:rt},"\u53D6\u6D88")))},q=B("7ahc"),ie=B("HmJG"),oe=B("BjJ7"),ye=j.a.useForm,pe={width:280,marginRight:10},we={labelCol:{span:5},wrapperCol:{span:19}},fe=function(Be){var Qe=Be.callback,rt=Be.onCancel,dt=ye(),xt=Object(C.a)(dt,1),_t=xt[0];function wt($e){Qe($e)}function st($e,_e){if($e.status===-1){P.b.error($e.message);return}_t.setFieldsValue({src:"/api/attachments/".concat($e.id),type:_e.type})}function ut($e){var _e=$e.target.files[0];Fe(_e,st)}return l.a.createElement(j.a,Object(m.a)({form:_t},we,{className:"upload-image-panel",onFinish:wt}),l.a.createElement(j.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},l.a.createElement("div",{className:"flex-container"},l.a.createElement(j.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},l.a.createElement(X.a,{style:pe})),l.a.createElement(Te,{onFileChange:ut}))),l.a.createElement(j.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},l.a.createElement(X.a,{style:{width:264}})),l.a.createElement(j.a.Item,{style:{textAlign:"right"}},l.a.createElement(z.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(z.a,{type:"ghost",onClick:rt},"\u53D6\u6D88")))};function Te(Be){var Qe=Be.onFileChange;return l.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",l.a.createElement("input",{type:"file",onChange:Qe}))}function Fe(Be,Qe){if(!Be)throw new String("\u6CA1\u6709\u6587\u4EF6");var rt=new FormData;rt.append("editormd-image-file",Be),rt.append("file_param_name","editormd-image-file"),rt.append("byxhr","true");var dt=new window.XMLHttpRequest;dt.withCredentials=!0,dt.addEventListener("load",function(xt){Qe(JSON.parse(xt.target.responseText),Be)},!1),dt.addEventListener("error",function(xt){console.error(xt)},!1),dt.open("POST","".concat(oe.a,"/api/attachments.json")),dt.send(rt)}var De=B("giR+"),Me=B("fyUT"),Ue=B("7Kak"),ve=B("9yH6"),ce=ve.a.Group,Ie={margin:"0 8px"},Ne=function(Be){var Qe=Be.callback,rt=Be.onCancel;function dt(xt){Qe(xt)}return l.a.createElement(j.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:dt},l.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},l.a.createElement("span",{style:Ie},"\u5355\u5143\u683C\u6570\uFF1A"),l.a.createElement("span",{style:Ie},"\u884C\u6570"),l.a.createElement(j.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},l.a.createElement(Me.a,null)),l.a.createElement("span",{style:Ie},"\u5217\u6570"),l.a.createElement(j.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},l.a.createElement(Me.a,null))),l.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},l.a.createElement("span",{style:Ie},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),l.a.createElement(j.a.Item,{name:"align"},l.a.createElement(ce,null,l.a.createElement(ve.a,{value:"default"},l.a.createElement("i",{className:"fa fa-align-justify"})),l.a.createElement(ve.a,{value:"left"},l.a.createElement("i",{className:"fa fa-align-left"})),l.a.createElement(ve.a,{value:"center"},l.a.createElement("i",{className:"fa fa-align-center"})),l.a.createElement(ve.a,{value:"right"},l.a.createElement("i",{className:"fa fa-align-right"}))))),l.a.createElement("div",{className:"flex-container flex-end"},l.a.createElement(z.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(z.a,{type:"ghost",onClick:rt},"\u53D6\u6D88")))},Xe=B("ErOA"),ee=B("7Cbv"),k="link",N="upload-image",$="code-block",V="add-table",Y="------------",me={default:Y,left:":".concat(Y),center:":".concat(Y,":"),right:"".concat(Y,":")},Ae=B("9VGf"),at,Le;function ke(){}var Ye=0,Ze=1e4,Ve="\u2581",He=`
**\u6A21\u677F\u6807\u9898**
\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`;function Pe(Be){return/^\d+$/.test(Be)?"".concat(Be,"px"):Be}var Re=navigator.platform.toUpperCase().indexOf("MAC")>=0,Oe=Re?"Cmd":"Ctrl",he=["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"],be=(at={},Object(T.a)(at,Oe+"-B","bold"),Object(T.a)(at,Oe+"-I","italic"),at),Ce=(Le={},Object(T.a)(Le,k,"\u6DFB\u52A0\u94FE\u63A5"),Object(T.a)(Le,$,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(T.a)(Le,N,"\u6DFB\u52A0\u6587\u4EF6"),Object(T.a)(Le,V,"\u6DFB\u52A0\u8868\u683C"),Le),xe=Ke.a=function(Be){var Qe=Be.defaultValue,rt=Qe===void 0?"":Qe,dt=Be.onChange,xt=Be.width,_t=xt===void 0?"100%":xt,wt=Be.height,st=wt===void 0?400:wt,ut=Be.miniToolbar,$e=ut===void 0?!1:ut,_e=Be.isFocus,je=_e===void 0?!1:_e,ct=Be.watch,et=Be.insertTemp,At=Be.mode,Ct=At===void 0?"markdown":At,lt=Be.id,gt=lt===void 0?"markdown-editor-id":lt,kt=Be.showResizeBar,zt=kt===void 0?!1:kt,$t=Be.noStorage,Se=$t===void 0?!1:$t,de=Be.showNullButton,W=de===void 0?!1:de,J=Be.hidetoolBar,te=J===void 0?!1:J,se=Be.fullScreen,Ee=se===void 0?!1:se,ze=Be.onBlur,qe=Be.onCMBeforeChange,St=Be.onFullScreen,Lt=Be.className,it=Lt===void 0?"":Lt,Tt=Be.disablePaste,Qt=Tt===void 0?!1:Tt,Et=Be.placeholder,nn=Et===void 0?"":Et,Jt=Be.values,It=Jt===void 0?"":Jt,yt=Object(f.useState)(null),Sn=Object(C.a)(yt,2),mt=Sn[0],ln=Sn[1],fn=Object(f.useState)(rt),Zn=Object(C.a)(fn,2),rr=Zn[0],xn=Zn[1],Er=Object(f.useState)(ct),Cr=Object(C.a)(Er,2),un=Cr[0],Mn=Cr[1],Nr=Object(f.useState)(Ee),Xr=Object(C.a)(Nr,2),xr=Xr[0],ur=Xr[1],gr=Object(f.useState)(""),gi=Object(C.a)(gr,2),pr=gi[0],yr=gi[1],Or=Object(f.useState)(0),Kr=Object(C.a)(Or,2),Sr=Kr[0],ui=Kr[1],Pr=Object(f.useState)(st),yi=Object(C.a)(Pr,2),ci=yi[0],ni=yi[1],Di=Object(f.useState)(!1),Ni=Object(C.a)(Di,2),Ui=Ni[0],di=Ni[1],mr=Object(f.useRef)(Object(ee.a)()),dr=Object(f.useRef)(!1),qr=Object(f.useRef)(),ri=Object(f.useRef)(),fi=Object(f.useRef)(),ii=Object(f.useRef)(),Xi=Object(f.useRef)(),na=function(){var tn=Object(S.a)(p.a.mark(function yn(){var an,Rn;return p.a.wrap(function(or){for(;;)switch(or.prev=or.next){case 0:return or.next=2,Object(Xe.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:mr.current}});case 2:Rn=or.sent,Rn!=null&&(an=Rn.attachments)!==null&&an!==void 0&&an.length&&(console.log("cm:",mt,ri),Rn.attachments.map(function(Vt){Vt.content_type.indexOf("image")>-1?mt.replaceSelection("![,](/api/attachments/".concat(Vt.id,"?type=").concat(Vt.content_type,")")):Vt.content_type.indexOf("video")>-1?mt.replaceSelection('<video width="100%" controls src="'.concat(x.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):Vt.content_type.indexOf("pdf")>-1?mt.replaceSelection('<a href="'.concat(x.a.API_SERVER,"/api/attachments/").concat(Vt.id,"?type=").concat(Vt.content_type,'&disposition=inline" target="_blank">').concat(Vt.name,"</a>")):mt.replaceSelection("[".concat(Vt.name,"](").concat(x.a.API_SERVER,"/api/attachments/").concat(Vt.id,"?type=").concat(Vt.content_type,")"))}));case 4:case"end":return or.stop()}},yn)}));return function(){return tn.apply(this,arguments)}}();Object(f.useEffect)(function(){xn(It),mt==null||mt.setValue(It)},[It]),Object(f.useEffect)(function(){St==null||St(xr)},[xr]),Object(f.useEffect)(function(){if(ri.current){var tn=c.a.fromTextArea(ri.current,{mode:Ct,lineNumbers:!$e,lineWrapping:!0,value:rt,autoCloseTags:!0,autoCloseBrackets:!0});je&&tn.focus();function yn(an,Rn){if(Qt){Rn.preventDefault();return}var Xn=Rn.clipboardData;if(Xn){var or=Xn.types.toString(),Vt=Xn.items;if(or==="Files"||Xn.types.indexOf("Files")>-1){if(Rn.preventDefault(),Ct=="stex")return;try{var br,Hr=Vt[1];((br=Vt[0])===null||br===void 0?void 0:br.kind)==="file"&&(Hr=Vt[0]);var kn=Hr.getAsFile(),Oi=kn.name.split(".").pop();Fe(kn,function(nr){if(nr.id){var Ur,nt,pt;(kn==null||((Ur=kn.type)===null||Ur===void 0)?void 0:Ur.indexOf("image"))>-1?tn.replaceSelection("![,](/api/attachments/".concat(nr.id,"?type=").concat(nr.content_type,")")):(kn==null||((nt=kn.type)===null||nt===void 0)?void 0:nt.indexOf("video"))>-1?tn.replaceSelection('<video width="100%" controls src="'.concat(x.a.API_SERVER,"/api/attachments/").concat(nr.id,'"></video>')):(kn==null||((pt=kn.type)===null||pt===void 0)?void 0:pt.indexOf("pdf"))>-1?tn.replaceSelection('<a href="'.concat(x.a.API_SERVER,"/api/attachments/").concat(nr.id,"?type=").concat(kn.type,'&disposition=inline" target="_blank">').concat(kn.name,"</a>")):he.includes(Oi)?tn.replaceSelection('<a href="'.concat(x.a.API_SERVER,"/api/attachments/").concat(nr.id,'?type=office&disposition=inline" target="_blank">').concat(kn.name,"</a>")):tn.replaceSelection("[".concat(kn.name,"](").concat(x.a.API_SERVER,"/api/attachments/").concat(nr.id,"?type=").concat(nr.content_type,")"))}else(nr==null?void 0:nr.status)===401&&(document.location.href="/user/login")})}catch(nr){P.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return tn.on("paste",yn),tn.on("dragleave",function(an,Rn){fi.current.classList.remove("mouse-hover-md")}),tn.on("dragover",function(an,Rn){fi.current.classList.add("mouse-hover-md")}),tn.on("drop",function(an,Rn){fi.current.classList.add("mouse-hover-md");var Xn;if(Xn=Rn.dataTransfer.files,Xn.length>0){Rn.preventDefault(),Rn.stopPropagation();for(var or=function(Hr){var kn=Xn[Hr],Oi=kn.name.split(".").pop();Fe(kn,function(nr){if(nr.id){var Ur,nt,pt;(kn==null||((Ur=kn.type)===null||Ur===void 0)?void 0:Ur.indexOf("image"))>-1?tn.replaceSelection("![,](/api/attachments/".concat(nr.id,"?type=").concat(nr.content_type,")")):(kn==null||((nt=kn.type)===null||nt===void 0)?void 0:nt.indexOf("video"))>-1?tn.replaceSelection('<video width="100%" controls src="'.concat(x.a.API_SERVER,"/api/attachments/").concat(nr.id,'"></video>')):(kn==null||((pt=kn.type)===null||pt===void 0)?void 0:pt.indexOf("pdf"))>-1?tn.replaceSelection('<a href="'.concat(x.a.API_SERVER,"/api/attachments/").concat(nr.id,"?type=").concat(kn.type,'&disposition=inline" target="_blank">').concat(kn.name,"</a>")):he.includes(Oi)?tn.replaceSelection('<a href="'.concat(x.a.API_SERVER,"/api/attachments/").concat(nr.id,'?type=office&disposition=inline" target="_blank">').concat(kn.name,"</a>")):tn.replaceSelection("[".concat(kn.name,"](").concat(x.a.API_SERVER,"/api/attachments/").concat(nr.id,"?type=").concat(nr.content_type,")"))}else(nr==null?void 0:nr.status)===401&&(document.location.href="/user/login")})},Vt=0;Vt<Xn.length;Vt++)or(Vt)}}),ln(tn),function(){tn.off("paste",yn)}}},[]);var ai=Object(f.useCallback)(function(){if(fi.current)try{}catch(tn){console.log(tn,"---- to set md editor body height")}},[ci,fi,xr]);Object(f.useEffect)(function(){function tn(){var an=new s.default(function(Rn){var Xn=Object(U.a)(Rn),or;try{for(Xn.s();!(or=Xn.n()).done;){var Vt=or.value;(Vt.target.offsetHeight>0||Vt.target.offsetWidth>0)&&(ai(),mt.setSize("100%","100%"),mt.refresh())}}catch(br){Xn.e(br)}finally{Xn.f()}});return an.observe(ri.current.parentElement),an}if(mt){var yn=tn();return function(){yn.unobserve(ri.current.parentElement)}}},[mt,ai]),Object(f.useEffect)(function(){if(mt){for(var tn=[],yn=function(){var Vt=Rn[an];Xn=Object(C.a)(Vt,2);var br=Xn[0],Hr=Xn[1],kn=Object(T.a)({},br,function(){Yi(Hr)});tn.push(kn),mt.addKeyMap(kn)},an=0,Rn=Object.entries(be);an<Rn.length;an++){var Xn;yn()}return qr.current=setInterval(function(){dr.current&&na()},4e3),function(){clearInterval(qr.current);var or=Object(U.a)(tn),Vt;try{for(or.s();!(Vt=or.n()).done;){var br=Vt.value;mt.removeKeyMap(br)}}catch(Hr){or.e(Hr)}finally{or.f()}}}},[mt]),Object(f.useEffect)(function(){Ee!==xr&&ur(Ee)},[Ee]),Object(Ae.a)(function(){if(!Se&&Sr>0){var tn=new Date().getTime(),yn=window.sessionStorage.getItem(gt);tn>=Sr+Ze&&(!yn||yn!==rr)&&(window.sessionStorage.setItem(gt,rr),di(!0))}},Ze),Object(f.useEffect)(function(){Mn(ct)},[mt,ct]),Object(f.useEffect)(function(){mt&&(je&&mt.focus())},[mt,je]),Object(f.useEffect)(function(){if(un&&mt){var tn=mt.getScrollerElement();function yn(an){var Rn=an.target;if(Xi.current){var Xn=Rn.scrollTop/Rn.scrollHeight;Xi.current.scrollTop=Xi.current.scrollHeight*Xn}}return tn.addEventListener("scroll",yn),function(){tn.removeEventListener("scroll",yn)}}},[mt,un]),Object(f.useEffect)(function(){if(mt&&qe){function tn(yn,an){qe(yn,an)}return mt.on("beforeChange",tn),function(){mt.off("beforeChange",tn)}}},[mt,qe]),Object(f.useEffect)(function(){if(mt&&ze){function tn(){ze(mt.getValue())}return mt.on("blur",tn),function(){mt.off("blur",tn)}}},[mt,ze]),Object(f.useEffect)(function(){if(mt){function tn(yn){var an=yn.getValue();xn(an),ui(new Date().getTime()),yn.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),dt&&dt(an)}return mt.on("change",tn),function(){mt.off("change",tn)}}},[mt,dt]),Object(f.useEffect)(function(){mt&&(rt==null?(mt.setValue(""),xn("")):rt!==mt.getValue()&&(mt.setValue(rt),xn(rt),mt.setCursor(mt.lineCount(),0)))},[mt,rt]);var Yi=Object(f.useCallback)(function(tn){var yn=mt.getCursor(),an=mt.getSelection(),Rn=an.split(`
`);switch(tn){case"bold":return mt.replaceSelection("**"+an+"**"),an===""&&mt.setCursor(yn.line,yn.ch+2),mt.focus();case"italic":return mt.replaceSelection("*"+an+"*"),an===""&&mt.setCursor(yn.line,yn.ch+1),mt.focus();case"code":return mt.replaceSelection("`"+an+"`"),an===""&&mt.setCursor(yn.line,yn.ch+1),mt.focus();case"inline-latex":return mt.replaceSelection("`$$"+an+"$$`"),an===""&&mt.setCursor(yn.line,yn.ch+3),mt.focus();case"latex":return mt.replaceSelection("```latex\n"+an+"\n```"),mt.setCursor(yn.line+1,an.length+1),mt.focus();case"line-break":return mt.replaceSelection(`<br/>
`),mt.focus();case"list-ul":return an===""?mt.replaceSelection("- "+an):mt.replaceSelection(Rn.map(function(Xn){return Xn===""?"":"- ".concat(Xn)}).join(`
`)),mt.focus();case"list-ol":return an===""?mt.replaceSelection("1. "+an):mt.replaceSelection(Rn.map(function(Xn,or){return Xn===""?"":"".concat(or+1,". ").concat(Xn)}).join(`
`)),mt.focus();case"add-null-ch":return an===""&&mt.setCursor(yn.line,yn.ch+1),mt.replaceSelection(Ve),mt.focus();case"inster-template-1":return an===""&&mt.setCursor(yn.line,yn.ch),mt.replaceSelection(He),mt.focus();case"eraser":return mt.setValue(""),mt.focus();case"trigger-watch":return Mn(!un),mt.focus();case"trigger-full-screen":return ur(!xr),mt.focus();case k:yr(k);return;case $:yr($);return;case N:yr(N);return;case V:yr(V);return;default:throw new Error}},[mt,un,xr]),Zr=Object(f.useCallback)(function(tn){yr("");switch(pr){case k:var yn=tn.title,an=tn.link;return mt.replaceSelection("[".concat(yn,"](").concat(an,")")),mt.focus();case $:var Rn=tn.language,Xn=tn.content;return mt.replaceSelection(["```"+Rn,Xn,"```"].join(`
`)),mt.focus();case N:var or=tn.src,Vt=tn.alt;return Vt?mt.replaceSelection("![ ".concat(Vt," ]( ").concat(or,' "').concat(Vt,'" )')):mt.replaceSelection("![,](".concat(or,")")),mt.focus();case V:for(var br=tn.row,Hr=tn.col,kn=tn.align,Oi=`
`,nr=0;nr<br;nr++){for(var Ur=[],nt=[],pt=0;pt<Hr;pt++)nr===1&&nt.push(me[kn]),Ur.push(" ");nr===1&&(Oi+="| ".concat(nt.join(" | "),` |
`)),Oi+="| ".concat(Ur.join(Hr===1?"":" | "),` |
`)}return mt.replaceSelection(Oi+`
`),mt.focus();default:throw new Error}},[mt,pr]),Wi=Object(f.useMemo)(function(){switch(pr){case k:return l.a.createElement(K,{callback:Zr,onCancel:Pi});case $:return l.a.createElement(q.b,{callback:Zr,onCancel:Pi});case N:return l.a.createElement(fe,{callback:Zr,onCancel:Pi});case V:return l.a.createElement(Ne,{callback:Zr,onCancel:Pi});default:return null}},[pr]);function Pi(){yr("")}Object(f.useEffect)(function(){if(ii.current){var tn=ii.current,yn=!1,an=0;function Rn(Vt){yn=!0,an=Vt.pageY}function Xn(){yn=!1}function or(Vt){if(yn){var br=Vt.pageY-an;br<0&&(br=0),br>300&&(br=300);var Hr=st+br+"px";ni(Hr)}}return tn.addEventListener("mousedown",Rn),document.addEventListener("mousemove",or),document.addEventListener("mouseup",Xn),function(){tn.removeEventListener("mousedown",Rn),document.removeEventListener("mousemove",or),document.removeEventListener("mouseup",Xn)}}},[mt,ii]),Object(f.useEffect)(function(){ni(st)},[st]);var Ci=Pe(_t),$i=Pe(ci),bi={width:Ci,height:$i},Ji=Object(f.useMemo)(function(){if(Sr){var tn=new Date(Sr),yn=tn.getHours(),an=tn.getMinutes(),Rn=tn.getSeconds();return yn=yn<10?"0"+yn:yn,an=an<10?"0"+an:an,Rn=Rn<10?"0"+Rn:Rn,"".concat(yn,":").concat(an,":").concat(Rn)}return 0},[Sr]);function Qi(){window.sessionStorage.removeItem(gt),di(!1),ui(0)}function hi(){di(!1),ui(0),mt.setValue(window.sessionStorage.getItem(gt))}function Zi(tn,yn){var an=mt.getValue();an=an.replace(tn,yn),xn(an),mt==null||mt.setValue(an)}return l.a.createElement(f.Fragment,null,l.a.createElement("div",{className:"markdown-editor-wrapper",ref:fi},l.a.createElement("div",{className:"markdown-editor-container ".concat(it," ").concat(un?"on-preview":""," ").concat($e?"mini":""," ").concat(xr?"full-screen":""),style:bi},l.a.createElement(D,{insertTemp:et,watch:un,fullScreen:xr,showNullButton:W,onActionCallback:Yi,hidetoolBar:te,uuid:mr.current,setOpenPhones:function(){dr.current=!0}}),l.a.createElement("div",{className:"markdown-editor-body"},l.a.createElement("div",{className:"codemirror-container"},l.a.createElement("textarea",{ref:ri,placeholder:nn})),un?l.a.createElement("div",{ref:Xi,className:"preview-container"},Ct==="stex"&&l.a.createElement(_,{value:rr}),Ct!=="stex"&&l.a.createElement(y.a,{edit:!0,value:rr,replaces:Zi})):null))),zt?l.a.createElement("a",{ref:ii,className:"editor-resize"}):null,l.a.createElement(I.a,null,Ce[pr]?l.a.createElement(Q.a,{centered:!0,title:Ce[pr],visible:!0,onCancel:Pi,footer:null,className:"markdown-popup-form"},Wi):null))}},P5Jw:function(Je,Ke,B){"use strict";var ae=B("rHrb"),Q=ae.CopyToClipboard;Q.CopyToClipboard=Q,Je.exports=Q},PD8m:function(Je,Ke){Je.exports={name:"memoryStorage",read:ae,write:Q,each:U,remove:w,clearAll:P};var B={};function ae(S){return B[S]}function Q(S,C){B[S]=C}function U(S){for(var C in B)B.hasOwnProperty(C)&&S(B[C],C)}function w(S){delete B[S]}function P(S){B={}}},RELg:function(Je,Ke,B){var ae=B("MFOe"),Q=ae.Global;Je.exports={name:"oldIE-userDataStorage",write:C,read:T,each:h,remove:p,clearAll:f};var U="storejs",w=Q.document,P=c(),S=(Q.navigator?Q.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function C(s,u){if(S)return;var i=a(s);P(function(n){n.setAttribute(i,u),n.save(U)})}function T(s){if(S)return;var u=a(s),i=null;return P(function(n){i=n.getAttribute(u)}),i}function h(s){P(function(u){for(var i=u.XMLDocument.documentElement.attributes,n=i.length-1;n>=0;n--){var t=i[n];s(u.getAttribute(t.name),t.name)}})}function p(s){var u=a(s);P(function(i){i.removeAttribute(u),i.save(U)})}function f(){P(function(s){var u=s.XMLDocument.documentElement.attributes;s.load(U);for(var i=u.length-1;i>=0;i--)s.removeAttribute(u[i].name);s.save(U)})}var l=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function a(s){return s.replace(/^\d/,"___$&").replace(l,"___")}function c(){if(!w||!w.documentElement||!w.documentElement.addBehavior)return null;var s="script",u,i,n;try{i=new ActiveXObject("htmlfile"),i.open(),i.write("<"+s+">document.w=window</"+s+'><iframe src="/favicon.ico"></iframe>'),i.close(),u=i.w.frames[0].document,n=u.createElement("div")}catch(t){n=w.createElement("div"),u=w.body}return function(t){var d=[].slice.call(arguments,0);d.unshift(n),u.appendChild(n),n.addBehavior("#default#userData"),n.load(U),t.apply(this,d),u.removeChild(n);return}}},RpDr:function(Je,Ke,B){"use strict";B.d(Ke,"a",function(){return y}),B.d(Ke,"c",function(){return g});var ae=B("+L6B"),Q=B("2/Rp"),U=B("tJVT"),w=B("k1fw"),P=B("jrin"),S=B("5NDa"),C=B("5rEg"),T=B("cDcd"),h=B.n(T),p=B("8Skl"),f=B("y3Kf"),l=B("bdLU"),a=B("J66h"),c=B.n(a),s=B("++UQ"),u=B.n(s),i=B("IxHN"),n=B("9Bee"),t=B("1vsH"),d,v=C.a.TextArea,b={visible:!1,tabIndex:"0"},y=(d={},Object(P.a)(d,l.a.NOMATCH,"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D"),Object(P.a)(d,l.a.OK,"\u8C03\u8BD5\u901A\u8FC7"),Object(P.a)(d,2,"\u8C03\u8BD5\u8D85\u65F6"),Object(P.a)(d,3,"\u8C03\u8BD5pod\u5931\u8D25"),Object(P.a)(d,4,"\u7F16\u8BD1\u5931\u8D25"),Object(P.a)(d,5,"\u6267\u884C\u5931\u8D25"),d),_;(function(o){o[o.SET_VISIBLE=0]="SET_VISIBLE",o[o.SET_TABINDEX=1]="SET_TABINDEX"})(_||(_={}));function m(o,x){switch(x.type){case _.SET_VISIBLE:return Object(w.a)(Object(w.a)({},o),{},{visible:x.payload});case _.SET_TABINDEX:return Object(w.a)(Object(w.a)({},o),{},{tabIndex:x.payload});default:throw new Error}}function g(o){var x=o.status,A=o.error_msg,O=o.output,D=o.input,I=o.expected_output,F=o.is_file,z=o.input_file_url,ne=o.output_file_url,j=o.expected_output_file_url,G=null,X={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(x){case l.a.NOMATCH:G=h.a.createElement(h.a.Fragment,null,h.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!F&&h.a.createElement(n.a,{value:D,style:X}),F&&h.a.createElement("div",{style:X},h.a.createElement("a",{onClick:function(){return Object(t.y)(z,D)}},D)),h.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!F&&h.a.createElement(n.a,{value:O&&a.Base64.decode(O)||"",style:X}),F&&h.a.createElement("div",{style:X},h.a.createElement("a",{onClick:function(){return Object(t.y)(ne,O)}},O)),h.a.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!F&&h.a.createElement(n.a,{value:I&&a.Base64.decode(I)||"",style:X}),F&&h.a.createElement("div",{style:X},h.a.createElement("a",{onClick:function(){return Object(t.y)(j,I)}},I)));break;case l.a.EXECUTEFAILURE:G=h.a.createElement(h.a.Fragment,null,h.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!F&&h.a.createElement(n.a,{value:D,style:X}),F&&h.a.createElement("div",{style:X},h.a.createElement("a",{onClick:function(){return Object(t.y)(z,D)}},D)),h.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),h.a.createElement("pre",{className:"error"},a.Base64.decode(A)));break;case l.a.COMPILEFAILURE:G=h.a.createElement(h.a.Fragment,null,h.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!F&&h.a.createElement(n.a,{value:D,style:X}),F&&h.a.createElement("div",{style:X},h.a.createElement("a",{onClick:function(){return Object(t.y)(z,D)}},D)),h.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),h.a.createElement("pre",{className:"error"},a.Base64.decode(A)));break;case l.a.PODFAILURE:G=h.a.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case l.a.TIMEOUT:G=h.a.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return h.a.createElement(h.a.Fragment,null," ",G," ")}function E(o){var x=o.status,A=o.error_msg,O=o.execute_time,D=o.output,I=o.input,F=o.expected_output,z=o.is_file,ne=o.input_file_url,j=o.output_file_url,G=o.expected_output_file_url,X=null;switch(x){case l.a.OK:X=h.a.createElement(h.a.Fragment,null,h.a.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",O),h.a.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),h.a.createElement("pre",null,a.Base64.decode(D)));break;case l.a.NOMATCH:X=h.a.createElement(h.a.Fragment,null,h.a.createElement("p",null,"\u8F93\u5165\uFF1A",h.a.createElement("pre",null,I)),h.a.createElement("p",null,"\u8F93\u51FA\uFF1A",D&&a.Base64.decode(D)),h.a.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",F&&a.Base64.decode(F)));break;case l.a.EXECUTEFAILURE:X=h.a.createElement(h.a.Fragment,null,h.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",h.a.createElement("pre",null,I)),h.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),h.a.createElement("pre",{className:"error"},a.Base64.decode(A)));break;case l.a.COMPILEFAILURE:X=h.a.createElement(h.a.Fragment,null,h.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",h.a.createElement("pre",null,I)),h.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),h.a.createElement("pre",{className:"error"},a.Base64.decode(A)));break;case l.a.PODFAILURE:X=h.a.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case l.a.TIMEOUT:X=h.a.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return h.a.createElement(h.a.Fragment,null," ",X," ")}Ke.b=function(o){var x=o.id,A=o.input,O=o.debuging,D=o.submitting,I=o.executingMessage,F=o.debugResult,z=o.onChangeInput,ne=o.onDebugCode,j=o.onSubmitCode,G=Object(T.useReducer)(m,b),X=Object(U.a)(G,2),Z=X[0],K=X[1],q=Z.visible,ie=Z.tabIndex;Object(T.useEffect)(function(){K({type:_.SET_VISIBLE,payload:!1})},[x]);function oe(fe){var Te=fe.target.id;K({type:_.SET_TABINDEX,payload:Te})}function ye(){K({type:_.SET_VISIBLE,payload:!q})}var pe=Object(T.useMemo)(function(){if(F){var fe=F.status;return h.a.createElement(h.a.Fragment,null,E(F))}return null},[F]);function we(){K({type:_.SET_VISIBLE,payload:!0}),K({type:_.SET_TABINDEX,payload:"1"}),ne()}return h.a.createElement("div",{className:"test-case-panel"},h.a.createElement("div",{className:"test-case-panel-body ".concat(q?"active":"")},h.a.createElement("ul",{className:"s-navs"},h.a.createElement("li",null,h.a.createElement("a",{className:ie==="0"?"active":"",id:"0",onClick:oe},"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B")),h.a.createElement("li",null,h.a.createElement("a",{className:ie==="1"?"active":"",id:"1",onClick:oe},"\u4EE3\u7801\u6267\u884C\u7ED3\u679C"))),h.a.createElement("div",{className:"tab-panel-body ".concat(ie==="0"?"":"hide")},h.a.createElement(v,{placeholder:"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D",value:A,onChange:z})),h.a.createElement("div",{className:"tab-panel-body ".concat(ie==="1"?"":"hide")},O?h.a.createElement(i.a,{message:I}):F?h.a.createElement("section",{style:{height:200}}," ",pe," "):h.a.createElement("p",{className:"tip"},"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D"))),h.a.createElement("a",{className:"btn-collapse ".concat(q?"up":""),onClick:ye},q?h.a.createElement(p.a,null):h.a.createElement(f.a,null)),h.a.createElement("footer",{className:"footer"},h.a.createElement("span",{style:{visibility:"hidden"}},"\u63A7\u5236\u53F0"),h.a.createElement("div",{className:"flex-container"},h.a.createElement(Q.a,{id:"oj-prev",className:"btn-blue",type:"ghost"},"\u4E0A\u4E00\u9898"),h.a.createElement(Q.a,{id:"oj-next",className:"btn-blue",type:"ghost"},"\u4E0B\u4E00\u9898"),h.a.createElement(Q.a,{className:"btn-green",type:"ghost",loading:O,onClick:we},"\u8C03\u8BD5\u4EE3\u7801"),h.a.createElement(Q.a,{type:"primary",loading:D,disabled:D,onClick:function(){K({type:_.SET_VISIBLE,payload:!1}),j()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},"S/kP":function(Je,Ke,B){Je.exports=B.p+"static/time.a3dc82f3.svg"},"SA+Z":function(Je,Ke,B){var ae=B("wTVA"),Q=B("EbDI"),U=B("ZhPi"),w=B("wkBT");function P(S){return ae(S)||Q(S)||U(S)||w()}Je.exports=P,Je.exports.__esModule=!0,Je.exports.default=Je.exports},SJMd:function(Je,Ke){/**
* @license
* Copyright (C) 2006 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/var B,ae,Q,U=!1,w,P;window.PR_SHOULD_USE_CONTINUATION=!0;var S,C;(function(){var T=window,h=["break,continue,do,else,for,if,return,while"],p=[h,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],f=[p,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],l=[f,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],a=[f,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],c=[f,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],s="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",u=[f,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],i="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",n=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],t=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],d=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],v=[l,c,a,u,i,n,t,d],b=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,y="str",_="kwd",m="com",g="typ",E="lit",o="pun",x="pln",A="tag",O="dec",D="src",I="atn",F="atv",z="nocode",ne="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function j(ce){for(var Ie=0,Ne=!1,Xe=!1,ee=0,k=ce.length;ee<k;++ee){var N=ce[ee];if(N.ignoreCase)Xe=!0;else if(/[a-z]/i.test(N.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Ne=!0,Xe=!1;break}}var $={b:8,t:9,n:10,v:11,f:12,r:13};function V(Le){var ke=Le.charCodeAt(0);if(ke!==92)return ke;var Ye=Le.charAt(1);return ke=$[Ye],ke||("0"<=Ye&&Ye<="7"?parseInt(Le.substring(1),8):Ye==="u"||Ye==="x"?parseInt(Le.substring(2),16):Le.charCodeAt(1))}function Y(Le){if(Le<32)return(Le<16?"\\x0":"\\x")+Le.toString(16);var ke=String.fromCharCode(Le);return ke==="\\"||ke==="-"||ke==="]"||ke==="^"?"\\"+ke:ke}function me(Le){var ke=Le.substring(1,Le.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),Ye=[],Ze=ke[0]==="^",Ve=["["];Ze&&Ve.push("^");for(var He=Ze?1:0,Pe=ke.length;He<Pe;++He){var Re=ke[He];if(/\\[bdsw]/i.test(Re))Ve.push(Re);else{var Oe=V(Re),he;He+2<Pe&&ke[He+1]==="-"?(he=V(ke[He+2]),He+=2):he=Oe,Ye.push([Oe,he]),he<65||Oe>122||(he<65||Oe>90||Ye.push([Math.max(65,Oe)|32,Math.min(he,90)|32]),he<97||Oe>122||Ye.push([Math.max(97,Oe)&~32,Math.min(he,122)&~32]))}}Ye.sort(function(Be,Qe){return Be[0]-Qe[0]||Qe[1]-Be[1]});for(var be=[],Ce=[],He=0;He<Ye.length;++He){var xe=Ye[He];xe[0]<=Ce[1]+1?Ce[1]=Math.max(Ce[1],xe[1]):be.push(Ce=xe)}for(var He=0;He<be.length;++He){var xe=be[He];Ve.push(Y(xe[0])),xe[1]>xe[0]&&(xe[1]+1>xe[0]&&Ve.push("-"),Ve.push(Y(xe[1])))}return Ve.push("]"),Ve.join("")}function Ae(Le){for(var ke=Le.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")),Ye=ke.length,Ze=[],Ve=0,He=0;Ve<Ye;++Ve){var Pe=ke[Ve];if(Pe==="(")++He;else if(Pe.charAt(0)==="\\"){var Re=+Pe.substring(1);Re&&(Re<=He?Ze[Re]=-1:ke[Ve]=Y(Re))}}for(var Ve=1;Ve<Ze.length;++Ve)Ze[Ve]===-1&&(Ze[Ve]=++Ie);for(var Ve=0,He=0;Ve<Ye;++Ve){var Pe=ke[Ve];if(Pe==="(")++He,Ze[He]||(ke[Ve]="(?:");else if(Pe.charAt(0)==="\\"){var Re=+Pe.substring(1);Re&&Re<=He&&(ke[Ve]="\\"+Ze[Re])}}for(var Ve=0;Ve<Ye;++Ve)ke[Ve]==="^"&&ke[Ve+1]!=="^"&&(ke[Ve]="");if(Le.ignoreCase&&Ne)for(var Ve=0;Ve<Ye;++Ve){var Pe=ke[Ve],Oe=Pe.charAt(0);Pe.length>=2&&Oe==="["?ke[Ve]=me(Pe):Oe!=="\\"&&(ke[Ve]=Pe.replace(/[a-zA-Z]/g,function(Ce){var xe=Ce.charCodeAt(0);return"["+String.fromCharCode(xe&~32,xe|32)+"]"}))}return ke.join("")}for(var at=[],ee=0,k=ce.length;ee<k;++ee){var N=ce[ee];if(N.global||N.multiline)throw new Error(""+N);at.push("(?:"+Ae(N)+")")}return new RegExp(at.join("|"),Xe?"gi":"g")}function G(ce,Ie){var Ne=/(?:^|\s)nocode(?:\s|$)/,Xe=[],ee=0,k=[],N=0;function $(V){var Y=V.nodeType;if(Y==1){if(Ne.test(V.className))return;for(var me=V.firstChild;me;me=me.nextSibling)$(me);var Ae=V.nodeName.toLowerCase();(Ae==="br"||Ae==="li")&&(Xe[N]=`
`,k[N<<1]=ee++,k[N++<<1|1]=V)}else if(Y==3||Y==4){var at=V.nodeValue;at.length&&(Ie?at=at.replace(/\r\n?/g,`
`):at=at.replace(/[ \t\r\n]+/g," "),Xe[N]=at,k[N<<1]=ee,ee+=at.length,k[N++<<1|1]=V)}}return $(ce),{sourceCode:Xe.join("").replace(/\n$/,""),spans:k}}function X(ce,Ie,Ne,Xe,ee){if(!Ne)return;var k={sourceNode:ce,pre:1,langExtension:null,numberLines:null,sourceCode:Ne,spans:null,basePos:Ie,decorations:null};Xe(k),ee.push.apply(ee,k.decorations)}var Z=/\S/;function K(ce){for(var Ie=void 0,Ne=ce.firstChild;Ne;Ne=Ne.nextSibling){var Xe=Ne.nodeType;Ie=Xe===1?Ie?ce:Ne:Xe===3&&Z.test(Ne.nodeValue)?ce:Ie}return Ie===ce?void 0:Ie}function q(ce,Ie){var Ne={},Xe;(function(){for(var N=ce.concat(Ie),$=[],V={},Y=0,me=N.length;Y<me;++Y){var Ae=N[Y],at=Ae[3];if(at)for(var Le=at.length;--Le>=0;)Ne[at.charAt(Le)]=Ae;var ke=Ae[1],Ye=""+ke;V.hasOwnProperty(Ye)||($.push(ke),V[Ye]=null)}$.push(/[\0-\uffff]/),Xe=j($)})();var ee=Ie.length,k=function(N){for(var $=N.sourceCode,V=N.basePos,Y=N.sourceNode,me=[V,x],Ae=0,at=$.match(Xe)||[],Le={},ke=0,Ye=at.length;ke<Ye;++ke){var Ze=at[ke],Ve=Le[Ze],He=void 0,Pe;if(typeof Ve=="string")Pe=!1;else{var Re=Ne[Ze.charAt(0)];if(Re)He=Ze.match(Re[1]),Ve=Re[0];else{for(var Oe=0;Oe<ee;++Oe)if(Re=Ie[Oe],He=Ze.match(Re[1]),He){Ve=Re[0];break}He||(Ve=x)}Pe=Ve.length>=5&&Ve.substring(0,5)==="lang-",Pe&&!(He&&typeof He[1]=="string")&&(Pe=!1,Ve=D),Pe||(Le[Ze]=Ve)}var he=Ae;if(Ae+=Ze.length,!Pe)me.push(V+he,Ve);else{var be=He[1],Ce=Ze.indexOf(be),xe=Ce+be.length;He[2]&&(xe=Ze.length-He[2].length,Ce=xe-be.length);var Be=Ve.substring(5);X(Y,V+he,Ze.substring(0,Ce),k,me),X(Y,V+he+Ce,be,Te(Be,be),me),X(Y,V+he+xe,Ze.substring(xe),k,me)}}N.decorations=me};return k}function ie(ce){var Ie=[],Ne=[];ce.tripleQuotedStrings?Ie.push([y,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ce.multiLineStrings?Ie.push([y,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Ie.push([y,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ce.verbatimStrings&&Ne.push([y,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Xe=ce.hashComments;Xe&&(ce.cStyleComments?(Xe>1?Ie.push([m,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Ie.push([m,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Ne.push([y,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Ie.push([m,/^#[^\r\n]*/,null,"#"])),ce.cStyleComments&&(Ne.push([m,/^\/\/[^\r\n]*/,null]),Ne.push([m,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var ee=ce.regexLiterals;if(ee){var k=ee>1?"":`
\r`,N=k?".":"[\\S\\s]",$="/(?=[^/*"+k+"])(?:[^/\\x5B\\x5C"+k+"]|\\x5C"+N+"|\\x5B(?:[^\\x5C\\x5D"+k+"]|\\x5C"+N+")*(?:\\x5D|$))+/";Ne.push(["lang-regex",RegExp("^"+ne+"("+$+")")])}var V=ce.types;V&&Ne.push([g,V]);var Y=(""+ce.keywords).replace(/^ | $/g,"");Y.length&&Ne.push([_,new RegExp("^(?:"+Y.replace(/[\s,]+/g,"|")+")\\b"),null]),Ie.push([x,/^\s+/,null,` \r
\xA0`]);var me="^.[^\\s\\w.$@'\"`/\\\\]*";return ce.regexLiterals&&(me+="(?!s*/)"),Ne.push([E,/^@[a-z_$][a-z_$@0-9]*/i,null],[g,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[x,/^[a-z_$][a-z_$@0-9]*/i,null],[E,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[x,/^\\[\s\S]?/,null],[o,new RegExp(me),null]),q(Ie,Ne)}var oe=ie({keywords:v,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ye(ce,Ie,Ne){for(var Xe=/(?:^|\s)nocode(?:\s|$)/,ee=/\r\n?|\n/,k=ce.ownerDocument,N=k.createElement("li");ce.firstChild;)N.appendChild(ce.firstChild);var $=[N];function V(ke){var Ye=ke.nodeType;if(Ye==1&&!Xe.test(ke.className))if(ke.nodeName==="br")Y(ke),ke.parentNode&&ke.parentNode.removeChild(ke);else for(var Ze=ke.firstChild;Ze;Ze=Ze.nextSibling)V(Ze);else if((Ye==3||Ye==4)&&Ne){var Ve=ke.nodeValue,He=Ve.match(ee);if(He){var Pe=Ve.substring(0,He.index);ke.nodeValue=Pe;var Re=Ve.substring(He.index+He[0].length);if(Re){var Oe=ke.parentNode;Oe.insertBefore(k.createTextNode(Re),ke.nextSibling)}Y(ke),Pe||ke.parentNode.removeChild(ke)}}}function Y(ke){for(;!ke.nextSibling;)if(ke=ke.parentNode,!ke)return;function Ye(He,Pe){var Re=Pe?He.cloneNode(!1):He,Oe=He.parentNode;if(Oe){var he=Ye(Oe,1),be=He.nextSibling;he.appendChild(Re);for(var Ce=be;Ce;Ce=be)be=Ce.nextSibling,he.appendChild(Ce)}return Re}for(var Ze=Ye(ke.nextSibling,0),Ve;(Ve=Ze.parentNode)&&Ve.nodeType===1;)Ze=Ve;$.push(Ze)}for(var me=0;me<$.length;++me)V($[me]);Ie===(Ie|0)&&$[0].setAttribute("value",Ie);var Ae=k.createElement("ol");Ae.className="linenums";for(var at=Math.max(0,Ie-1|0)||0,me=0,Le=$.length;me<Le;++me)N=$[me],N.className="L"+(me+at)%10,N.firstChild||N.appendChild(k.createTextNode("\xA0")),Ae.appendChild(N);ce.appendChild(Ae)}function pe(ce){var Ie=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Ie=Ie&&+Ie[1]<=8;var Ne=/\n/g,Xe=ce.sourceCode,ee=Xe.length,k=0,N=ce.spans,$=N.length,V=0,Y=ce.decorations,me=Y.length,Ae=0;Y[me]=ee;var at,Le;for(Le=at=0;Le<me;)Y[Le]!==Y[Le+2]?(Y[at++]=Y[Le++],Y[at++]=Y[Le++]):Le+=2;for(me=at,Le=at=0;Le<me;){for(var ke=Y[Le],Ye=Y[Le+1],Ze=Le+2;Ze+2<=me&&Y[Ze+1]===Ye;)Ze+=2;Y[at++]=ke,Y[at++]=Ye,Le=Ze}me=Y.length=at;var Ve=ce.sourceNode,He="";Ve&&(He=Ve.style.display,Ve.style.display="none");try{for(var Pe=null;V<$;){var Re=N[V],Oe=N[V+2]||ee,he=Y[Ae+2]||ee,Ze=Math.min(Oe,he),be=N[V+1],Ce;if(be.nodeType!==1&&(Ce=Xe.substring(k,Ze))){Ie&&(Ce=Ce.replace(Ne,"\r")),be.nodeValue=Ce;var xe=be.ownerDocument,Be=xe.createElement("span");Be.className=Y[Ae+1];var Qe=be.parentNode;Qe.replaceChild(Be,be),Be.appendChild(be),k<Oe&&(N[V+1]=be=xe.createTextNode(Xe.substring(Ze,Oe)),Qe.insertBefore(be,Be.nextSibling))}k=Ze,k>=Oe&&(V+=2),k>=he&&(Ae+=2)}}finally{Ve&&(Ve.style.display=He)}}var we={};function fe(ce,Ie){for(var Ne=Ie.length;--Ne>=0;){var Xe=Ie[Ne];we.hasOwnProperty(Xe)?T.console&&console.warn("cannot override language handler %s",Xe):we[Xe]=ce}}function Te(ce,Ie){return ce&&we.hasOwnProperty(ce)||(ce=/^\s*</.test(Ie)?"default-markup":"default-code"),we[ce]}fe(oe,["default-code"]),fe(q([],[[x,/^[^<?]+/],[O,/^<!\w[^>]*(?:>|$)/],[m,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[o,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),fe(q([[x,/^[\s]+/,null,` \r
`],[F,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[A,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[I,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[o,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),fe(q([],[[F,/^[\s\S]+/]]),["uq.val"]),fe(ie({keywords:l,hashComments:!0,cStyleComments:!0,types:b}),["c","cc","cpp","cxx","cyc","m"]),fe(ie({keywords:"null,true,false"}),["json"]),fe(ie({keywords:c,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:b}),["cs"]),fe(ie({keywords:a,cStyleComments:!0}),["java"]),fe(ie({keywords:d,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),fe(ie({keywords:n,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),fe(ie({keywords:i,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),fe(ie({keywords:t,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),fe(ie({keywords:u,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),fe(ie({keywords:s,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),fe(q([],[[y,/^[\s\S]+/]]),["regex"]);function Fe(ce){var Ie=ce.langExtension;try{var Ne=G(ce.sourceNode,ce.pre),Xe=Ne.sourceCode;ce.sourceCode=Xe,ce.spans=Ne.spans,ce.basePos=0,Te(Ie,Xe)(ce),pe(ce)}catch(ee){T.console&&console.log(ee&&ee.stack||ee)}}function De(ce,Ie,Ne){var Xe=Ne||!1,ee=Ie||null,k=document.createElement("div");k.innerHTML="<pre>"+ce+"</pre>",k=k.firstChild,Xe&&ye(k,Xe,!0);var N={langExtension:ee,numberLines:Xe,sourceNode:k,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Fe(N),k.innerHTML}function Me(ce,Ie){var Ne=Ie||document.body,Xe=Ne.ownerDocument||document;function ee(Re){return Ne.getElementsByTagName(Re)}for(var k=[ee("pre"),ee("code"),ee("xmp")],N=[],$=0;$<k.length;++$)for(var V=0,Y=k[$].length;V<Y;++V)N.push(k[$][V]);k=null;var me=Date;me.now||(me={now:function(){return+new Date}});var Ae=0,at=/\blang(?:uage)?-([\w.]+)(?!\S)/,Le=/\bprettyprint\b/,ke=/\bprettyprinted\b/,Ye=/pre|xmp/i,Ze=/^code$/i,Ve=/^(?:pre|code|xmp)$/i,He={};function Pe(){for(var Re=T.PR_SHOULD_USE_CONTINUATION?me.now()+250:Infinity;Ae<N.length&&me.now()<Re;Ae++){for(var Oe=N[Ae],he=He,be=Oe;be=be.previousSibling;){var Ce=be.nodeType,xe=(Ce===7||Ce===8)&&be.nodeValue;if(xe?!/^\??prettify\b/.test(xe):Ce!==3||/\S/.test(be.nodeValue))break;if(xe){he={},xe.replace(/\b(\w+)=([\w:.%+-]+)/g,function(ct,et,At){he[et]=At});break}}var Be=Oe.className;if((he!==He||Le.test(Be))&&!ke.test(Be)){for(var Qe=!1,rt=Oe.parentNode;rt;rt=rt.parentNode){var dt=rt.tagName;if(Ve.test(dt)&&rt.className&&Le.test(rt.className)){Qe=!0;break}}if(!Qe){Oe.className+=" prettyprinted";var xt=he.lang;if(!xt){xt=Be.match(at);var _t;!xt&&(_t=K(Oe))&&Ze.test(_t.tagName)&&(xt=_t.className.match(at)),xt&&(xt=xt[1])}var wt;if(Ye.test(Oe.tagName))wt=1;else{var st=Oe.currentStyle,ut=Xe.defaultView,$e=st?st.whiteSpace:ut&&ut.getComputedStyle?ut.getComputedStyle(Oe,null).getPropertyValue("white-space"):0;wt=$e&&$e.substring(0,3)==="pre"}var _e=he.linenums;(_e=_e==="true"||+_e)||(_e=Be.match(/\blinenums\b(?::(\d+))?/),_e=_e?_e[1]&&_e[1].length?+_e[1]:!0:!1),_e&&ye(Oe,_e,wt);var je={langExtension:xt,sourceNode:Oe,numberLines:_e,pre:wt,sourceCode:null,basePos:null,spans:null,decorations:null};Fe(je)}}}Ae<N.length?T.setTimeout(Pe,250):typeof ce=="function"&&ce()}Pe()}var Ue=T.PR={createSimpleLexer:q,registerLangHandler:fe,sourceDecorator:ie,PR_ATTRIB_NAME:I,PR_ATTRIB_VALUE:F,PR_COMMENT:m,PR_DECLARATION:O,PR_KEYWORD:_,PR_LITERAL:E,PR_NOCODE:z,PR_PLAIN:x,PR_PUNCTUATION:o,PR_SOURCE:D,PR_STRING:y,PR_TAG:A,PR_TYPE:g,prettyPrintOne:U?T.prettyPrintOne=De:S=De,prettyPrint:C=U?T.prettyPrint=Me:C=Me},ve=T.define;typeof ve=="function"&&ve.amd&&ve("google-code-prettify",[],function(){return Ue})})()},TcMa:function(Je,Ke,B){Je.exports={desc:"desc___qlRMF",info:"info___JEaKq","commit-info":"commit-info___3-4e0"}},UZu5:function(Je,Ke,B){},VEzc:function(Je,Ke,B){Je.exports={flex_box_center:"flex_box_center___z2AYj",flex_space_between:"flex_space_between___2PZH7",flex_box_vertical_center:"flex_box_vertical_center___3Vw8I",flex_box_center_end:"flex_box_center_end___1dJQf",flex_box_column:"flex_box_column___kstqC",wrap:"wrap___wWYG3",head:"head___1xABk",title:"title___yYb50",content:"content___fzoVv",list:"list___2q90P",footer:"footer___3zT-e"}},"VrN/":function(Je,Ke,B){(function(ae,Q){Je.exports=Q()})(this,function(){"use strict";var ae=navigator.userAgent,Q=navigator.platform,U=/gecko\/\d/i.test(ae),w=/MSIE \d/.test(ae),P=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ae),S=/Edge\/(\d+)/.exec(ae),C=w||P||S,T=C&&(w?document.documentMode||6:+(S||P)[1]),h=!S&&/WebKit\//.test(ae),p=h&&/Qt\/\d+\.\d+/.test(ae),f=!S&&/Chrome\//.test(ae),l=/Opera\//.test(ae),a=/Apple Computer/.test(navigator.vendor),c=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ae),s=/PhantomJS/.test(ae),u=!S&&/AppleWebKit/.test(ae)&&/Mobile\/\w+/.test(ae),i=/Android/.test(ae),n=u||i||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ae),t=u||/Mac/.test(Q),d=/\bCrOS\b/.test(ae),v=/win/i.test(Q),b=l&&ae.match(/Version\/(\d*\.\d*)/);b&&(b=Number(b[1])),b&&b>=15&&(l=!1,h=!0);var y=t&&(p||l&&(b==null||b<12.11)),_=U||C&&T>=9;function m(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var g=function(e,r){var R=e.className,L=m(r).exec(R);if(L){var M=R.slice(L.index+L[0].length);e.className=R.slice(0,L.index)+(M?L[1]+M:"")}};function E(e){for(var r=e.childNodes.length;r>0;--r)e.removeChild(e.firstChild);return e}function o(e,r){return E(e).appendChild(r)}function x(e,r,R,L){var M=document.createElement(e);if(R&&(M.className=R),L&&(M.style.cssText=L),typeof r=="string")M.appendChild(document.createTextNode(r));else if(r)for(var H=0;H<r.length;++H)M.appendChild(r[H]);return M}function A(e,r,R,L){var M=x(e,r,R,L);return M.setAttribute("role","presentation"),M}var O;document.createRange?O=function(e,r,R,L){var M=document.createRange();return M.setEnd(L||e,R),M.setStart(e,r),M}:O=function(e,r,R){var L=document.body.createTextRange();try{L.moveToElementText(e.parentNode)}catch(M){return L}return L.collapse(!0),L.moveEnd("character",R),L.moveStart("character",r),L};function D(e,r){if(r.nodeType==3&&(r=r.parentNode),e.contains)return e.contains(r);do if(r.nodeType==11&&(r=r.host),r==e)return!0;while(r=r.parentNode)}function I(){var e;try{e=document.activeElement}catch(r){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function F(e,r){var R=e.className;m(r).test(R)||(e.className+=(R?" ":"")+r)}function z(e,r){for(var R=e.split(" "),L=0;L<R.length;L++)R[L]&&!m(R[L]).test(r)&&(r+=" "+R[L]);return r}var ne=function(e){e.select()};u?ne=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:C&&(ne=function(e){try{e.select()}catch(r){}});function j(e){var r=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,r)}}function G(e,r,R){r||(r={});for(var L in e)e.hasOwnProperty(L)&&(R!==!1||!r.hasOwnProperty(L))&&(r[L]=e[L]);return r}function X(e,r,R,L,M){r==null&&(r=e.search(/[^\s\u00a0]/),r==-1&&(r=e.length));for(var H=L||0,re=M||0;;){var le=e.indexOf(" ",H);if(le<0||le>=r)return re+(r-H);re+=le-H,re+=R-re%R,H=le+1}}var Z=function(){this.id=null,this.f=null,this.time=0,this.handler=j(this.onTimeout,this)};Z.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Z.prototype.set=function(e,r){this.f=r;var R=+new Date+e;(!this.id||R<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=R)};function K(e,r){for(var R=0;R<e.length;++R)if(e[R]==r)return R;return-1}var q=50,ie={toString:function(){return"CodeMirror.Pass"}},oe={scroll:!1},ye={origin:"*mouse"},pe={origin:"+move"};function we(e,r,R){for(var L=0,M=0;;){var H=e.indexOf(" ",L);H==-1&&(H=e.length);var re=H-L;if(H==e.length||M+re>=r)return L+Math.min(re,r-M);if(M+=H-L,M+=R-M%R,L=H+1,M>=r)return L}}var fe=[""];function Te(e){for(;fe.length<=e;)fe.push(Fe(fe)+" ");return fe[e]}function Fe(e){return e[e.length-1]}function De(e,r){for(var R=[],L=0;L<e.length;L++)R[L]=r(e[L],L);return R}function Me(e,r,R){for(var L=0,M=R(r);L<e.length&&R(e[L])<=M;)L++;e.splice(L,0,r)}function Ue(){}function ve(e,r){var R;return Object.create?R=Object.create(e):(Ue.prototype=e,R=new Ue),r&&G(r,R),R}var ce=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Ie(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ce.test(e))}function Ne(e,r){return r?r.source.indexOf("\\w")>-1&&Ie(e)?!0:r.test(e):Ie(e)}function Xe(e){for(var r in e)if(e.hasOwnProperty(r)&&e[r])return!1;return!0}var ee=/[\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 k(e){return e.charCodeAt(0)>=768&&ee.test(e)}function N(e,r,R){for(;(R<0?r>0:r<e.length)&&k(e.charAt(r));)r+=R;return r}function $(e,r,R){for(var L=r>R?-1:1;;){if(r==R)return r;var M=(r+R)/2,H=L<0?Math.ceil(M):Math.floor(M);if(H==r)return e(H)?r:R;e(H)?R=H:r=H+L}}function V(e,r,R,L){if(!e)return L(r,R,"ltr",0);for(var M=!1,H=0;H<e.length;++H){var re=e[H];(re.from<R&&re.to>r||r==R&&re.to==r)&&(L(Math.max(re.from,r),Math.min(re.to,R),re.level==1?"rtl":"ltr",H),M=!0)}M||L(r,R,"ltr")}var Y=null;function me(e,r,R){var L;Y=null;for(var M=0;M<e.length;++M){var H=e[M];if(H.from<r&&H.to>r)return M;H.to==r&&(H.from!=H.to&&R=="before"?L=M:Y=M),H.from==r&&(H.from!=H.to&&R!="before"?L=M:Y=M)}return L!=null?L:Y}var Ae=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function R(ge){return ge<=247?e.charAt(ge):1424<=ge&&ge<=1524?"R":1536<=ge&&ge<=1785?r.charAt(ge-1536):1774<=ge&&ge<=2220?"r":8192<=ge&&ge<=8203?"w":ge==8204?"b":"L"}var L=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,M=/[stwN]/,H=/[LRr]/,re=/[Lb1n]/,le=/[1n]/;function ue(ge,We,Ge){this.level=ge,this.from=We,this.to=Ge}return function(ge,We){var Ge=We=="ltr"?"L":"R";if(ge.length==0||We=="ltr"&&!L.test(ge))return!1;for(var ot=ge.length,tt=[],bt=0;bt<ot;++bt)tt.push(R(ge.charCodeAt(bt)));for(var Ot=0,Mt=Ge;Ot<ot;++Ot){var Wt=tt[Ot];Wt=="m"?tt[Ot]=Mt:Mt=Wt}for(var Yt=0,Kt=Ge;Yt<ot;++Yt){var en=tt[Yt];en=="1"&&Kt=="r"?tt[Yt]="n":H.test(en)&&(Kt=en,en=="r"&&(tt[Yt]="R"))}for(var bn=1,dn=tt[0];bn<ot-1;++bn){var Gn=tt[bn];Gn=="+"&&dn=="1"&&tt[bn+1]=="1"?tt[bn]="1":Gn==","&&dn==tt[bn+1]&&(dn=="1"||dn=="n")&&(tt[bn]=dn),dn=Gn}for(var _r=0;_r<ot;++_r){var Jr=tt[_r];if(Jr==",")tt[_r]="N";else if(Jr=="%"){var Ar=void 0;for(Ar=_r+1;Ar<ot&&tt[Ar]=="%";++Ar);for(var Ri=_r&&tt[_r-1]=="!"||Ar<ot&&tt[Ar]=="1"?"1":"N",Si=_r;Si<Ar;++Si)tt[Si]=Ri;_r=Ar-1}}for(var Br=0,wi=Ge;Br<ot;++Br){var ti=tt[Br];wi=="L"&&ti=="1"?tt[Br]="L":H.test(ti)&&(wi=ti)}for(var Vr=0;Vr<ot;++Vr)if(M.test(tt[Vr])){var Wr=void 0;for(Wr=Vr+1;Wr<ot&&M.test(tt[Wr]);++Wr);for(var Dr=(Vr?tt[Vr-1]:Ge)=="L",Ti=(Wr<ot?tt[Wr]:Ge)=="L",Pa=Dr==Ti?Dr?"L":"R":Ge,fa=Vr;fa<Wr;++fa)tt[fa]=Pa;Vr=Wr-1}for(var li=[],qi,Qr=0;Qr<ot;)if(re.test(tt[Qr])){var Fo=Qr;for(++Qr;Qr<ot&&re.test(tt[Qr]);++Qr);li.push(new ue(0,Fo,Qr))}else{var ta=Qr,ya=li.length,ba=We=="rtl"?1:0;for(++Qr;Qr<ot&&tt[Qr]!="L";++Qr);for(var vi=ta;vi<Qr;)if(le.test(tt[vi])){ta<vi&&(li.splice(ya,0,new ue(1,ta,vi)),ya+=ba);var Ma=vi;for(++vi;vi<Qr&&le.test(tt[vi]);++vi);li.splice(ya,0,new ue(2,Ma,vi)),ya+=ba,ta=vi}else++vi;ta<Qr&&li.splice(ya,0,new ue(1,ta,Qr))}return We=="ltr"&&(li[0].level==1&&(qi=ge.match(/^\s+/))&&(li[0].from=qi[0].length,li.unshift(new ue(0,0,qi[0].length))),Fe(li).level==1&&(qi=ge.match(/\s+$/))&&(Fe(li).to-=qi[0].length,li.push(new ue(0,ot-qi[0].length,ot)))),We=="rtl"?li.reverse():li}}();function at(e,r){var R=e.order;return R==null&&(R=e.order=Ae(e.text,r)),R}var Le=[],ke=function(e,r,R){if(e.addEventListener)e.addEventListener(r,R,!1);else if(e.attachEvent)e.attachEvent("on"+r,R);else{var L=e._handlers||(e._handlers={});L[r]=(L[r]||Le).concat(R)}};function Ye(e,r){return e._handlers&&e._handlers[r]||Le}function Ze(e,r,R){if(e.removeEventListener)e.removeEventListener(r,R,!1);else if(e.detachEvent)e.detachEvent("on"+r,R);else{var L=e._handlers,M=L&&L[r];if(M){var H=K(M,R);H>-1&&(L[r]=M.slice(0,H).concat(M.slice(H+1)))}}}function Ve(e,r){var R=Ye(e,r);if(!R.length)return;for(var L=Array.prototype.slice.call(arguments,2),M=0;M<R.length;++M)R[M].apply(null,L)}function He(e,r,R){return typeof r=="string"&&(r={type:r,preventDefault:function(){this.defaultPrevented=!0}}),Ve(e,R||r.type,e,r),Ce(r)||r.codemirrorIgnore}function Pe(e){var r=e._handlers&&e._handlers.cursorActivity;if(!r)return;for(var R=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),L=0;L<r.length;++L)K(R,r[L])==-1&&R.push(r[L])}function Re(e,r){return Ye(e,r).length>0}function Oe(e){e.prototype.on=function(r,R){ke(this,r,R)},e.prototype.off=function(r,R){Ze(this,r,R)}}function he(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function be(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ce(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function xe(e){he(e),be(e)}function Be(e){return e.target||e.srcElement}function Qe(e){var r=e.which;return r==null&&(e.button&1?r=1:e.button&2?r=3:e.button&4&&(r=2)),t&&e.ctrlKey&&r==1&&(r=3),r}var rt=function(){if(C&&T<9)return!1;var e=x("div");return"draggable"in e||"dragDrop"in e}(),dt;function xt(e){if(dt==null){var r=x("span","\u200B");o(e,x("span",[r,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(dt=r.offsetWidth<=1&&r.offsetHeight>2&&!(C&&T<8))}var R=dt?x("span","\u200B"):x("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return R.setAttribute("cm-text",""),R}var _t;function wt(e){if(_t!=null)return _t;var r=o(e,document.createTextNode("A\u062EA")),R=O(r,0,1).getBoundingClientRect(),L=O(r,1,2).getBoundingClientRect();return E(e),!R||R.left==R.right?!1:_t=L.right-R.right<3}var st=`
b`.split(/\n/).length!=3?function(e){for(var r=0,R=[],L=e.length;r<=L;){var M=e.indexOf(`
`,r);M==-1&&(M=e.length);var H=e.slice(r,e.charAt(M-1)=="\r"?M-1:M),re=H.indexOf("\r");re!=-1?(R.push(H.slice(0,re)),r+=re+1):(R.push(H),r=M+1)}return R}:function(e){return e.split(/\r\n?|\n/)},ut=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(r){return!1}}:function(e){var r;try{r=e.ownerDocument.selection.createRange()}catch(R){}return!r||r.parentElement()!=e?!1:r.compareEndPoints("StartToEnd",r)!=0},$e=function(){var e=x("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),_e=null;function je(e){if(_e!=null)return _e;var r=o(e,x("span","x")),R=r.getBoundingClientRect(),L=O(r,0,1).getBoundingClientRect();return _e=Math.abs(R.left-L.left)>1}var ct={},et={};function At(e,r){arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),ct[e]=r}function Ct(e,r){et[e]=r}function lt(e){if(typeof e=="string"&&et.hasOwnProperty(e))e=et[e];else if(e&&typeof e.name=="string"&&et.hasOwnProperty(e.name)){var r=et[e.name];typeof r=="string"&&(r={name:r}),e=ve(r,e),e.name=r.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return lt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return lt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function gt(e,r){r=lt(r);var R=ct[r.name];if(!R)return gt(e,"text/plain");var L=R(e,r);if(kt.hasOwnProperty(r.name)){var M=kt[r.name];for(var H in M){if(!M.hasOwnProperty(H))continue;L.hasOwnProperty(H)&&(L["_"+H]=L[H]),L[H]=M[H]}}if(L.name=r.name,r.helperType&&(L.helperType=r.helperType),r.modeProps)for(var re in r.modeProps)L[re]=r.modeProps[re];return L}var kt={};function zt(e,r){var R=kt.hasOwnProperty(e)?kt[e]:kt[e]={};G(r,R)}function $t(e,r){if(r===!0)return r;if(e.copyState)return e.copyState(r);var R={};for(var L in r){var M=r[L];M instanceof Array&&(M=M.concat([])),R[L]=M}return R}function Se(e,r){for(var R;e.innerMode&&!(R=e.innerMode(r),!R||R.mode==e);)r=R.state,e=R.mode;return R||{mode:e,state:r}}function de(e,r,R){return e.startState?e.startState(r,R):!0}var W=function(e,r,R){this.pos=this.start=0,this.string=e,this.tabSize=r||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=R};W.prototype.eol=function(){return this.pos>=this.string.length},W.prototype.sol=function(){return this.pos==this.lineStart},W.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},W.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},W.prototype.eat=function(e){var r=this.string.charAt(this.pos),R;if(typeof e=="string"?R=r==e:R=r&&(e.test?e.test(r):e(r)),R)return++this.pos,r},W.prototype.eatWhile=function(e){for(var r=this.pos;this.eat(e););return this.pos>r},W.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},W.prototype.skipToEnd=function(){this.pos=this.string.length},W.prototype.skipTo=function(e){var r=this.string.indexOf(e,this.pos);if(r>-1)return this.pos=r,!0},W.prototype.backUp=function(e){this.pos-=e},W.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=X(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?X(this.string,this.lineStart,this.tabSize):0)},W.prototype.indentation=function(){return X(this.string,null,this.tabSize)-(this.lineStart?X(this.string,this.lineStart,this.tabSize):0)},W.prototype.match=function(e,r,R){if(typeof e=="string"){var L=function(re){return R?re.toLowerCase():re},M=this.string.substr(this.pos,e.length);if(L(M)==L(e))return r!==!1&&(this.pos+=e.length),!0}else{var H=this.string.slice(this.pos).match(e);return H&&H.index>0?null:(H&&r!==!1&&(this.pos+=H[0].length),H)}},W.prototype.current=function(){return this.string.slice(this.start,this.pos)},W.prototype.hideFirstChars=function(e,r){this.lineStart+=e;try{return r()}finally{this.lineStart-=e}},W.prototype.lookAhead=function(e){var r=this.lineOracle;return r&&r.lookAhead(e)},W.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function J(e,r){if(r-=e.first,r<0||r>=e.size)throw new Error("There is no line "+(r+e.first)+" in the document.");for(var R=e;!R.lines;)for(var L=0;;++L){var M=R.children[L],H=M.chunkSize();if(r<H){R=M;break}r-=H}return R.lines[r]}function te(e,r,R){var L=[],M=r.line;return e.iter(r.line,R.line+1,function(H){var re=H.text;M==R.line&&(re=re.slice(0,R.ch)),M==r.line&&(re=re.slice(r.ch)),L.push(re),++M}),L}function se(e,r,R){var L=[];return e.iter(r,R,function(M){L.push(M.text)}),L}function Ee(e,r){var R=r-e.height;if(R)for(var L=e;L;L=L.parent)L.height+=R}function ze(e){if(e.parent==null)return null;for(var r=e.parent,R=K(r.lines,e),L=r.parent;L;r=L,L=L.parent)for(var M=0;!(L.children[M]==r);++M)R+=L.children[M].chunkSize();return R+r.first}function qe(e,r){var R=e.first;e:do{for(var L=0;L<e.children.length;++L){var M=e.children[L],H=M.height;if(r<H){e=M;continue e}r-=H,R+=M.chunkSize()}return R}while(!e.lines);for(var re=0;re<e.lines.length;++re){var le=e.lines[re],ue=le.height;if(r<ue)break;r-=ue}return R+re}function St(e,r){return r>=e.first&&r<e.first+e.size}function Lt(e,r){return String(e.lineNumberFormatter(r+e.firstLineNumber))}function it(e,r,R){if(R===void 0&&(R=null),!(this instanceof it))return new it(e,r,R);this.line=e,this.ch=r,this.sticky=R}function Tt(e,r){return e.line-r.line||e.ch-r.ch}function Qt(e,r){return e.sticky==r.sticky&&Tt(e,r)==0}function Et(e){return it(e.line,e.ch)}function nn(e,r){return Tt(e,r)<0?r:e}function Jt(e,r){return Tt(e,r)<0?e:r}function It(e,r){return Math.max(e.first,Math.min(r,e.first+e.size-1))}function yt(e,r){if(r.line<e.first)return it(e.first,0);var R=e.first+e.size-1;return r.line>R?it(R,J(e,R).text.length):Sn(r,J(e,r.line).text.length)}function Sn(e,r){var R=e.ch;return R==null||R>r?it(e.line,r):R<0?it(e.line,0):e}function mt(e,r){for(var R=[],L=0;L<r.length;L++)R[L]=yt(e,r[L]);return R}var ln=function(e,r){this.state=e,this.lookAhead=r},fn=function(e,r,R,L){this.state=r,this.doc=e,this.line=R,this.maxLookAhead=L||0,this.baseTokens=null,this.baseTokenPos=1};fn.prototype.lookAhead=function(e){var r=this.doc.getLine(this.line+e);return r!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),r},fn.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var r=this.baseTokens[this.baseTokenPos+1];return{type:r&&r.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},fn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},fn.fromSaved=function(e,r,R){return r instanceof ln?new fn(e,$t(e.mode,r.state),R,r.lookAhead):new fn(e,$t(e.mode,r),R)},fn.prototype.save=function(e){var r=e!==!1?$t(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ln(r,this.maxLookAhead):r};function Zn(e,r,R,L){var M=[e.state.modeGen],H={};xr(e,r.text,e.doc.mode,R,function(ge,We){return M.push(ge,We)},H,L);for(var re=R.state,le=function(ge){R.baseTokens=M;var We=e.state.overlays[ge],Ge=1,ot=0;R.state=!0,xr(e,r.text,We.mode,R,function(tt,bt){for(var Ot=Ge;ot<tt;){var Mt=M[Ge];Mt>tt&&M.splice(Ge,1,tt,M[Ge+1],Mt),Ge+=2,ot=Math.min(tt,Mt)}if(!bt)return;if(We.opaque)M.splice(Ot,Ge-Ot,tt,"overlay "+bt),Ge=Ot+2;else for(;Ot<Ge;Ot+=2){var Wt=M[Ot+1];M[Ot+1]=(Wt?Wt+" ":"")+"overlay "+bt}},H),R.state=re,R.baseTokens=null,R.baseTokenPos=1},ue=0;ue<e.state.overlays.length;++ue)le(ue);return{styles:M,classes:H.bgClass||H.textClass?H:null}}function rr(e,r,R){if(!r.styles||r.styles[0]!=e.state.modeGen){var L=xn(e,ze(r)),M=r.text.length>e.options.maxHighlightLength&&$t(e.doc.mode,L.state),H=Zn(e,r,L);M&&(L.state=M),r.stateAfter=L.save(!M),r.styles=H.styles,H.classes?r.styleClasses=H.classes:r.styleClasses&&(r.styleClasses=null),R===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return r.styles}function xn(e,r,R){var L=e.doc,M=e.display;if(!L.mode.startState)return new fn(L,!0,r);var H=ur(e,r,R),re=H>L.first&&J(L,H-1).stateAfter,le=re?fn.fromSaved(L,re,H):new fn(L,de(L.mode),H);return L.iter(H,r,function(ue){Er(e,ue.text,le);var ge=le.line;ue.stateAfter=ge==r-1||ge%5==0||ge>=M.viewFrom&&ge<M.viewTo?le.save():null,le.nextLine()}),R&&(L.modeFrontier=le.line),le}function Er(e,r,R,L){var M=e.doc.mode,H=new W(r,e.options.tabSize,R);for(H.start=H.pos=L||0,r==""&&Cr(M,R.state);!H.eol();)un(M,H,R.state),H.start=H.pos}function Cr(e,r){if(e.blankLine)return e.blankLine(r);if(!e.innerMode)return;var R=Se(e,r);if(R.mode.blankLine)return R.mode.blankLine(R.state)}function un(e,r,R,L){for(var M=0;M<10;M++){L&&(L[0]=Se(e,R).mode);var H=e.token(r,R);if(r.pos>r.start)return H}throw new Error("Mode "+e.name+" failed to advance stream.")}var Mn=function(e,r,R){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=r||null,this.state=R};function Nr(e,r,R,L){var M=e.doc,H=M.mode,re;r=yt(M,r);var le=J(M,r.line),ue=xn(e,r.line,R),ge=new W(le.text,e.options.tabSize,ue),We;for(L&&(We=[]);(L||ge.pos<r.ch)&&!ge.eol();)ge.start=ge.pos,re=un(H,ge,ue.state),L&&We.push(new Mn(ge,re,$t(M.mode,ue.state)));return L?We:new Mn(ge,re,ue.state)}function Xr(e,r){if(e)for(;;){var R=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!R)break;e=e.slice(0,R.index)+e.slice(R.index+R[0].length);var L=R[1]?"bgClass":"textClass";r[L]==null?r[L]=R[2]:new RegExp("(?:^|\\s)"+R[2]+"(?:$|\\s)").test(r[L])||(r[L]+=" "+R[2])}return e}function xr(e,r,R,L,M,H,re){var le=R.flattenSpans;le==null&&(le=e.options.flattenSpans);var ue=0,ge=null,We=new W(r,e.options.tabSize,L),Ge,ot=e.options.addModeClass&&[null];for(r==""&&Xr(Cr(R,L.state),H);!We.eol();){if(We.pos>e.options.maxHighlightLength?(le=!1,re&&Er(e,r,L,We.pos),We.pos=r.length,Ge=null):Ge=Xr(un(R,We,L.state,ot),H),ot){var tt=ot[0].name;tt&&(Ge="m-"+(Ge?tt+" "+Ge:tt))}if(!le||ge!=Ge){for(;ue<We.start;)ue=Math.min(We.start,ue+5e3),M(ue,ge);ge=Ge}We.start=We.pos}for(;ue<We.pos;){var bt=Math.min(We.pos,ue+5e3);M(bt,ge),ue=bt}}function ur(e,r,R){for(var L,M,H=e.doc,re=R?-1:r-(e.doc.mode.innerMode?1e3:100),le=r;le>re;--le){if(le<=H.first)return H.first;var ue=J(H,le-1),ge=ue.stateAfter;if(ge&&(!R||le+(ge instanceof ln?ge.lookAhead:0)<=H.modeFrontier))return le;var We=X(ue.text,null,e.options.tabSize);(M==null||L>We)&&(M=le-1,L=We)}return M}function gr(e,r){if(e.modeFrontier=Math.min(e.modeFrontier,r),e.highlightFrontier<r-10)return;for(var R=e.first,L=r-1;L>R;L--){var M=J(e,L).stateAfter;if(M&&(!(M instanceof ln)||L+M.lookAhead<r)){R=L+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,R)}var gi=!1,pr=!1;function yr(){gi=!0}function Or(){pr=!0}function Kr(e,r,R){this.marker=e,this.from=r,this.to=R}function Sr(e,r){if(e)for(var R=0;R<e.length;++R){var L=e[R];if(L.marker==r)return L}}function ui(e,r){for(var R,L=0;L<e.length;++L)e[L]!=r&&(R||(R=[])).push(e[L]);return R}function Pr(e,r){e.markedSpans=e.markedSpans?e.markedSpans.concat([r]):[r],r.marker.attachLine(e)}function yi(e,r,R){var L;if(e)for(var M=0;M<e.length;++M){var H=e[M],re=H.marker,le=H.from==null||(re.inclusiveLeft?H.from<=r:H.from<r);if(le||H.from==r&&re.type=="bookmark"&&(!R||!H.marker.insertLeft)){var ue=H.to==null||(re.inclusiveRight?H.to>=r:H.to>r);(L||(L=[])).push(new Kr(re,H.from,ue?null:H.to))}}return L}function ci(e,r,R){var L;if(e)for(var M=0;M<e.length;++M){var H=e[M],re=H.marker,le=H.to==null||(re.inclusiveRight?H.to>=r:H.to>r);if(le||H.from==r&&re.type=="bookmark"&&(!R||H.marker.insertLeft)){var ue=H.from==null||(re.inclusiveLeft?H.from<=r:H.from<r);(L||(L=[])).push(new Kr(re,ue?null:H.from-r,H.to==null?null:H.to-r))}}return L}function ni(e,r){if(r.full)return null;var R=St(e,r.from.line)&&J(e,r.from.line).markedSpans,L=St(e,r.to.line)&&J(e,r.to.line).markedSpans;if(!R&&!L)return null;var M=r.from.ch,H=r.to.ch,re=Tt(r.from,r.to)==0,le=yi(R,M,re),ue=ci(L,H,re),ge=r.text.length==1,We=Fe(r.text).length+(ge?M:0);if(le)for(var Ge=0;Ge<le.length;++Ge){var ot=le[Ge];if(ot.to==null){var tt=Sr(ue,ot.marker);tt?ge&&(ot.to=tt.to==null?null:tt.to+We):ot.to=M}}if(ue)for(var bt=0;bt<ue.length;++bt){var Ot=ue[bt];if(Ot.to!=null&&(Ot.to+=We),Ot.from==null){var Mt=Sr(le,Ot.marker);Mt||(Ot.from=We,ge&&(le||(le=[])).push(Ot))}else Ot.from+=We,ge&&(le||(le=[])).push(Ot)}le&&(le=Di(le)),ue&&ue!=le&&(ue=Di(ue));var Wt=[le];if(!ge){var Yt=r.text.length-2,Kt;if(Yt>0&&le)for(var en=0;en<le.length;++en)le[en].to==null&&(Kt||(Kt=[])).push(new Kr(le[en].marker,null,null));for(var bn=0;bn<Yt;++bn)Wt.push(Kt);Wt.push(ue)}return Wt}function Di(e){for(var r=0;r<e.length;++r){var R=e[r];R.from!=null&&R.from==R.to&&R.marker.clearWhenEmpty!==!1&&e.splice(r--,1)}return e.length?e:null}function Ni(e,r,R){var L=null;if(e.iter(r.line,R.line+1,function(tt){if(tt.markedSpans)for(var bt=0;bt<tt.markedSpans.length;++bt){var Ot=tt.markedSpans[bt].marker;Ot.readOnly&&(!L||K(L,Ot)==-1)&&(L||(L=[])).push(Ot)}}),!L)return null;for(var M=[{from:r,to:R}],H=0;H<L.length;++H)for(var re=L[H],le=re.find(0),ue=0;ue<M.length;++ue){var ge=M[ue];if(Tt(ge.to,le.from)<0||Tt(ge.from,le.to)>0)continue;var We=[ue,1],Ge=Tt(ge.from,le.from),ot=Tt(ge.to,le.to);(Ge<0||!re.inclusiveLeft&&!Ge)&&We.push({from:ge.from,to:le.from}),(ot>0||!re.inclusiveRight&&!ot)&&We.push({from:le.to,to:ge.to}),M.splice.apply(M,We),ue+=We.length-3}return M}function Ui(e){var r=e.markedSpans;if(!r)return;for(var R=0;R<r.length;++R)r[R].marker.detachLine(e);e.markedSpans=null}function di(e,r){if(!r)return;for(var R=0;R<r.length;++R)r[R].marker.attachLine(e);e.markedSpans=r}function mr(e){return e.inclusiveLeft?-1:0}function dr(e){return e.inclusiveRight?1:0}function qr(e,r){var R=e.lines.length-r.lines.length;if(R!=0)return R;var L=e.find(),M=r.find(),H=Tt(L.from,M.from)||mr(e)-mr(r);if(H)return-H;var re=Tt(L.to,M.to)||dr(e)-dr(r);return re||r.id-e.id}function ri(e,r){var R=pr&&e.markedSpans,L;if(R)for(var M=void 0,H=0;H<R.length;++H)M=R[H],M.marker.collapsed&&(r?M.from:M.to)==null&&(!L||qr(L,M.marker)<0)&&(L=M.marker);return L}function fi(e){return ri(e,!0)}function ii(e){return ri(e,!1)}function Xi(e,r){var R=pr&&e.markedSpans,L;if(R)for(var M=0;M<R.length;++M){var H=R[M];H.marker.collapsed&&(H.from==null||H.from<r)&&(H.to==null||H.to>r)&&(!L||qr(L,H.marker)<0)&&(L=H.marker)}return L}function na(e,r,R,L,M){var H=J(e,r),re=pr&&H.markedSpans;if(re)for(var le=0;le<re.length;++le){var ue=re[le];if(!ue.marker.collapsed)continue;var ge=ue.marker.find(0),We=Tt(ge.from,R)||mr(ue.marker)-mr(M),Ge=Tt(ge.to,L)||dr(ue.marker)-dr(M);if(We>=0&&Ge<=0||We<=0&&Ge>=0)continue;if(We<=0&&(ue.marker.inclusiveRight&&M.inclusiveLeft?Tt(ge.to,R)>=0:Tt(ge.to,R)>0)||We>=0&&(ue.marker.inclusiveRight&&M.inclusiveLeft?Tt(ge.from,L)<=0:Tt(ge.from,L)<0))return!0}}function ai(e){for(var r;r=fi(e);)e=r.find(-1,!0).line;return e}function Yi(e){for(var r;r=ii(e);)e=r.find(1,!0).line;return e}function Zr(e){for(var r,R;r=ii(e);)e=r.find(1,!0).line,(R||(R=[])).push(e);return R}function Wi(e,r){var R=J(e,r),L=ai(R);return R==L?r:ze(L)}function Pi(e,r){if(r>e.lastLine())return r;var R=J(e,r),L;if(!Ci(e,R))return r;for(;L=ii(R);)R=L.find(1,!0).line;return ze(R)+1}function Ci(e,r){var R=pr&&r.markedSpans;if(R)for(var L=void 0,M=0;M<R.length;++M){if(L=R[M],!L.marker.collapsed)continue;if(L.from==null)return!0;if(L.marker.widgetNode)continue;if(L.from==0&&L.marker.inclusiveLeft&&$i(e,r,L))return!0}}function $i(e,r,R){if(R.to==null){var L=R.marker.find(1,!0);return $i(e,L.line,Sr(L.line.markedSpans,R.marker))}if(R.marker.inclusiveRight&&R.to==r.text.length)return!0;for(var M=void 0,H=0;H<r.markedSpans.length;++H)if(M=r.markedSpans[H],M.marker.collapsed&&!M.marker.widgetNode&&M.from==R.to&&(M.to==null||M.to!=R.from)&&(M.marker.inclusiveLeft||R.marker.inclusiveRight)&&$i(e,r,M))return!0}function bi(e){e=ai(e);for(var r=0,R=e.parent,L=0;L<R.lines.length;++L){var M=R.lines[L];if(M==e)break;r+=M.height}for(var H=R.parent;H;R=H,H=R.parent)for(var re=0;re<H.children.length;++re){var le=H.children[re];if(le==R)break;r+=le.height}return r}function Ji(e){if(e.height==0)return 0;for(var r=e.text.length,R,L=e;R=fi(L);){var M=R.find(0,!0);L=M.from.line,r+=M.from.ch-M.to.ch}for(L=e;R=ii(L);){var H=R.find(0,!0);r-=L.text.length-H.from.ch,L=H.to.line,r+=L.text.length-H.to.ch}return r}function Qi(e){var r=e.display,R=e.doc;r.maxLine=J(R,R.first),r.maxLineLength=Ji(r.maxLine),r.maxLineChanged=!0,R.iter(function(L){var M=Ji(L);M>r.maxLineLength&&(r.maxLineLength=M,r.maxLine=L)})}var hi=function(e,r,R){this.text=e,di(this,r),this.height=R?R(this):1};hi.prototype.lineNo=function(){return ze(this)},Oe(hi);function Zi(e,r,R,L){e.text=r,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Ui(e),di(e,R);var M=L?L(e):1;M!=e.height&&Ee(e,M)}function tn(e){e.parent=null,Ui(e)}var yn={},an={};function Rn(e,r){if(!e||/^\s*$/.test(e))return null;var R=r.addModeClass?an:yn;return R[e]||(R[e]=e.replace(/\S+/g,"cm-$&"))}function Xn(e,r){var R=A("span",null,null,h?"padding-right: .1px":null),L={pre:A("pre",[R],"CodeMirror-line"),content:R,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};r.measure={};for(var M=0;M<=(r.rest?r.rest.length:0);M++){var H=M?r.rest[M-1]:r.line,re=void 0;L.pos=0,L.addToken=Vt,wt(e.display.measure)&&(re=at(H,e.doc.direction))&&(L.addToken=Hr(L.addToken,re)),L.map=[];var le=r!=e.display.externalMeasured&&ze(H);Oi(H,L,rr(e,H,le)),H.styleClasses&&(H.styleClasses.bgClass&&(L.bgClass=z(H.styleClasses.bgClass,L.bgClass||"")),H.styleClasses.textClass&&(L.textClass=z(H.styleClasses.textClass,L.textClass||""))),L.map.length==0&&L.map.push(0,0,L.content.appendChild(xt(e.display.measure))),M==0?(r.measure.map=L.map,r.measure.cache={}):((r.measure.maps||(r.measure.maps=[])).push(L.map),(r.measure.caches||(r.measure.caches=[])).push({}))}if(h){var ue=L.content.lastChild;(/\bcm-tab\b/.test(ue.className)||ue.querySelector&&ue.querySelector(".cm-tab"))&&(L.content.className="cm-tab-wrap-hack")}return Ve(e,"renderLine",e,r.line,L.pre),L.pre.className&&(L.textClass=z(L.pre.className,L.textClass||"")),L}function or(e){var r=x("span","\u2022","cm-invalidchar");return r.title="\\u"+e.charCodeAt(0).toString(16),r.setAttribute("aria-label",r.title),r}function Vt(e,r,R,L,M,H,re){if(!r)return;var le=e.splitSpaces?br(r,e.trailingSpace):r,ue=e.cm.state.specialChars,ge=!1,We;if(!ue.test(r))e.col+=r.length,We=document.createTextNode(le),e.map.push(e.pos,e.pos+r.length,We),C&&T<9&&(ge=!0),e.pos+=r.length;else{We=document.createDocumentFragment();for(var Ge=0;;){ue.lastIndex=Ge;var ot=ue.exec(r),tt=ot?ot.index-Ge:r.length-Ge;if(tt){var bt=document.createTextNode(le.slice(Ge,Ge+tt));C&&T<9?We.appendChild(x("span",[bt])):We.appendChild(bt),e.map.push(e.pos,e.pos+tt,bt),e.col+=tt,e.pos+=tt}if(!ot)break;Ge+=tt+1;var Ot=void 0;if(ot[0]==" "){var Mt=e.cm.options.tabSize,Wt=Mt-e.col%Mt;Ot=We.appendChild(x("span",Te(Wt),"cm-tab")),Ot.setAttribute("role","presentation"),Ot.setAttribute("cm-text"," "),e.col+=Wt}else ot[0]=="\r"||ot[0]==`
`?(Ot=We.appendChild(x("span",ot[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Ot.setAttribute("cm-text",ot[0]),e.col+=1):(Ot=e.cm.options.specialCharPlaceholder(ot[0]),Ot.setAttribute("cm-text",ot[0]),C&&T<9?We.appendChild(x("span",[Ot])):We.appendChild(Ot),e.col+=1);e.map.push(e.pos,e.pos+1,Ot),e.pos++}}if(e.trailingSpace=le.charCodeAt(r.length-1)==32,R||L||M||ge||H||re){var Yt=R||"";L&&(Yt+=L),M&&(Yt+=M);var Kt=x("span",[We],Yt,H);if(re)for(var en in re)re.hasOwnProperty(en)&&en!="style"&&en!="class"&&Kt.setAttribute(en,re[en]);return e.content.appendChild(Kt)}e.content.appendChild(We)}function br(e,r){if(e.length>1&&!/ /.test(e))return e;for(var R=r,L="",M=0;M<e.length;M++){var H=e.charAt(M);H==" "&&R&&(M==e.length-1||e.charCodeAt(M+1)==32)&&(H="\xA0"),L+=H,R=H==" "}return L}function Hr(e,r){return function(R,L,M,H,re,le,ue){M=M?M+" cm-force-border":"cm-force-border";for(var ge=R.pos,We=ge+L.length;;){for(var Ge=void 0,ot=0;ot<r.length&&!(Ge=r[ot],Ge.to>ge&&Ge.from<=ge);ot++);if(Ge.to>=We)return e(R,L,M,H,re,le,ue);e(R,L.slice(0,Ge.to-ge),M,H,null,le,ue),H=null,L=L.slice(Ge.to-ge),ge=Ge.to}}}function kn(e,r,R,L){var M=!L&&R.widgetNode;M&&e.map.push(e.pos,e.pos+r,M),!L&&e.cm.display.input.needsContentAttribute&&(M||(M=e.content.appendChild(document.createElement("span"))),M.setAttribute("cm-marker",R.id)),M&&(e.cm.display.input.setUneditable(M),e.content.appendChild(M)),e.pos+=r,e.trailingSpace=!1}function Oi(e,r,R){var L=e.markedSpans,M=e.text,H=0;if(!L){for(var re=1;re<R.length;re+=2)r.addToken(r,M.slice(H,H=R[re]),Rn(R[re+1],r.cm.options));return}for(var le=M.length,ue=0,ge=1,We="",Ge,ot,tt=0,bt,Ot,Mt,Wt,Yt;;){if(tt==ue){bt=Ot=Mt=ot="",Yt=null,Wt=null,tt=Infinity;for(var Kt=[],en=void 0,bn=0;bn<L.length;++bn){var dn=L[bn],Gn=dn.marker;if(Gn.type=="bookmark"&&dn.from==ue&&Gn.widgetNode)Kt.push(Gn);else if(dn.from<=ue&&(dn.to==null||dn.to>ue||Gn.collapsed&&dn.to==ue&&dn.from==ue)){if(dn.to!=null&&dn.to!=ue&&tt>dn.to&&(tt=dn.to,Ot=""),Gn.className&&(bt+=" "+Gn.className),Gn.css&&(ot=(ot?ot+";":"")+Gn.css),Gn.startStyle&&dn.from==ue&&(Mt+=" "+Gn.startStyle),Gn.endStyle&&dn.to==tt&&(en||(en=[])).push(Gn.endStyle,dn.to),Gn.title&&((Yt||(Yt={})).title=Gn.title),Gn.attributes)for(var _r in Gn.attributes)(Yt||(Yt={}))[_r]=Gn.attributes[_r];Gn.collapsed&&(!Wt||qr(Wt.marker,Gn)<0)&&(Wt=dn)}else dn.from>ue&&tt>dn.from&&(tt=dn.from)}if(en)for(var Jr=0;Jr<en.length;Jr+=2)en[Jr+1]==tt&&(Ot+=" "+en[Jr]);if(!Wt||Wt.from==ue)for(var Ar=0;Ar<Kt.length;++Ar)kn(r,0,Kt[Ar]);if(Wt&&(Wt.from||0)==ue){if(kn(r,(Wt.to==null?le+1:Wt.to)-ue,Wt.marker,Wt.from==null),Wt.to==null)return;Wt.to==ue&&(Wt=!1)}}if(ue>=le)break;for(var Ri=Math.min(le,tt);;){if(We){var Si=ue+We.length;if(!Wt){var Br=Si>Ri?We.slice(0,Ri-ue):We;r.addToken(r,Br,Ge?Ge+bt:bt,Mt,ue+Br.length==tt?Ot:"",ot,Yt)}if(Si>=Ri){We=We.slice(Ri-ue),ue=Ri;break}ue=Si,Mt=""}We=M.slice(H,H=R[ge++]),Ge=Rn(R[ge++],r.cm.options)}}}function nr(e,r,R){this.line=r,this.rest=Zr(r),this.size=this.rest?ze(Fe(this.rest))-R+1:1,this.node=this.text=null,this.hidden=Ci(e,r)}function Ur(e,r,R){for(var L=[],M,H=r;H<R;H=M){var re=new nr(e.doc,J(e.doc,H),H);M=H+re.size,L.push(re)}return L}var nt=null;function pt(e){nt?nt.ops.push(e):e.ownsGroup=nt={ops:[e],delayedCallbacks:[]}}function Pt(e){var r=e.delayedCallbacks,R=0;do{for(;R<r.length;R++)r[R].call(null);for(var L=0;L<e.ops.length;L++){var M=e.ops[L];if(M.cursorActivityHandlers)for(;M.cursorActivityCalled<M.cursorActivityHandlers.length;)M.cursorActivityHandlers[M.cursorActivityCalled++].call(null,M.cm)}}while(R<r.length)}function Dt(e,r){var R=e.ownsGroup;if(!R)return;try{Pt(R)}finally{nt=null,r(R)}}var Ht=null;function jt(e,r){var R=Ye(e,r);if(!R.length)return;var L=Array.prototype.slice.call(arguments,2),M;nt?M=nt.delayedCallbacks:Ht?M=Ht:(M=Ht=[],setTimeout(ht,0));for(var H=function(le){M.push(function(){return R[le].apply(null,L)})},re=0;re<R.length;++re)H(re)}function ht(){var e=Ht;Ht=null;for(var r=0;r<e.length;++r)e[r]()}function ft(e,r,R,L){for(var M=0;M<r.changes.length;M++){var H=r.changes[M];H=="text"?Rt(e,r):H=="gutter"?Fn(e,r,R,L):H=="class"?rn(e,r):H=="widget"&&wn(e,r,L)}r.changes=null}function Ft(e){return e.node==e.text&&(e.node=x("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),C&&T<8&&(e.node.style.zIndex=2)),e.node}function vt(e,r){var R=r.bgClass?r.bgClass+" "+(r.line.bgClass||""):r.line.bgClass;if(R&&(R+=" CodeMirror-linebackground"),r.background)R?r.background.className=R:(r.background.parentNode.removeChild(r.background),r.background=null);else if(R){var L=Ft(r);r.background=L.insertBefore(x("div",null,R),L.firstChild),e.display.input.setUneditable(r.background)}}function Zt(e,r){var R=e.display.externalMeasured;return R&&R.line==r.line?(e.display.externalMeasured=null,r.measure=R.measure,R.built):Xn(e,r)}function Rt(e,r){var R=r.text.className,L=Zt(e,r);r.text==r.node&&(r.node=L.pre),r.text.parentNode.replaceChild(L.pre,r.text),r.text=L.pre,L.bgClass!=r.bgClass||L.textClass!=r.textClass?(r.bgClass=L.bgClass,r.textClass=L.textClass,rn(e,r)):R&&(r.text.className=R)}function rn(e,r){vt(e,r),r.line.wrapClass?Ft(r).className=r.line.wrapClass:r.node!=r.text&&(r.node.className="");var R=r.textClass?r.textClass+" "+(r.line.textClass||""):r.line.textClass;r.text.className=R||""}function Fn(e,r,R,L){if(r.gutter&&(r.node.removeChild(r.gutter),r.gutter=null),r.gutterBackground&&(r.node.removeChild(r.gutterBackground),r.gutterBackground=null),r.line.gutterClass){var M=Ft(r);r.gutterBackground=x("div",null,"CodeMirror-gutter-background "+r.line.gutterClass,"left: "+(e.options.fixedGutter?L.fixedPos:-L.gutterTotalWidth)+"px; width: "+L.gutterTotalWidth+"px"),e.display.input.setUneditable(r.gutterBackground),M.insertBefore(r.gutterBackground,r.text)}var H=r.line.gutterMarkers;if(e.options.lineNumbers||H){var re=Ft(r),le=r.gutter=x("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?L.fixedPos:-L.gutterTotalWidth)+"px");if(e.display.input.setUneditable(le),re.insertBefore(le,r.text),r.line.gutterClass&&(le.className+=" "+r.line.gutterClass),e.options.lineNumbers&&(!H||!H["CodeMirror-linenumbers"])&&(r.lineNumber=le.appendChild(x("div",Lt(e.options,R),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+L.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),H)for(var ue=0;ue<e.display.gutterSpecs.length;++ue){var ge=e.display.gutterSpecs[ue].className,We=H.hasOwnProperty(ge)&&H[ge];We&&le.appendChild(x("div",[We],"CodeMirror-gutter-elt","left: "+L.gutterLeft[ge]+"px; width: "+L.gutterWidth[ge]+"px"))}}}function wn(e,r,R){r.alignable&&(r.alignable=null);for(var L=m("CodeMirror-linewidget"),M=r.node.firstChild,H=void 0;M;M=H)H=M.nextSibling,L.test(M.className)&&r.node.removeChild(M);zn(e,r,R)}function vn(e,r,R,L){var M=Zt(e,r);return r.text=r.node=M.pre,M.bgClass&&(r.bgClass=M.bgClass),M.textClass&&(r.textClass=M.textClass),rn(e,r),Fn(e,r,R,L),zn(e,r,L),r.node}function zn(e,r,R){if(Tn(e,r.line,r,R,!0),r.rest)for(var L=0;L<r.rest.length;L++)Tn(e,r.rest[L],r,R,!1)}function Tn(e,r,R,L,M){if(!r.widgets)return;for(var H=Ft(R),re=0,le=r.widgets;re<le.length;++re){var ue=le[re],ge=x("div",[ue.node],"CodeMirror-linewidget"+(ue.className?" "+ue.className:""));ue.handleMouseEvents||ge.setAttribute("cm-ignore-events","true"),Bn(ue,ge,R,L),e.display.input.setUneditable(ge),M&&ue.above?H.insertBefore(ge,R.gutter||R.text):H.appendChild(ge),jt(ue,"redraw")}}function Bn(e,r,R,L){if(e.noHScroll){(R.alignable||(R.alignable=[])).push(r);var M=L.wrapperWidth;r.style.left=L.fixedPos+"px",e.coverGutter||(M-=L.gutterTotalWidth,r.style.paddingLeft=L.gutterTotalWidth+"px"),r.style.width=M+"px"}e.coverGutter&&(r.style.zIndex=5,r.style.position="relative",e.noHScroll||(r.style.marginLeft=-L.gutterTotalWidth+"px"))}function In(e){if(e.height!=null)return e.height;var r=e.doc.cm;if(!r)return 0;if(!D(document.body,e.node)){var R="position: relative;";e.coverGutter&&(R+="margin-left: -"+r.display.gutters.offsetWidth+"px;"),e.noHScroll&&(R+="width: "+r.display.wrapper.clientWidth+"px;"),o(r.display.measure,x("div",[e.node],null,R))}return e.height=e.node.parentNode.offsetHeight}function ir(e,r){for(var R=Be(r);R!=e.wrapper;R=R.parentNode)if(!R||R.nodeType==1&&R.getAttribute("cm-ignore-events")=="true"||R.parentNode==e.sizer&&R!=e.mover)return!0}function Vn(e){return e.lineSpace.offsetTop}function cr(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function vr(e){if(e.cachedPaddingH)return e.cachedPaddingH;var r=o(e.measure,x("pre","x","CodeMirror-line-like")),R=window.getComputedStyle?window.getComputedStyle(r):r.currentStyle,L={left:parseInt(R.paddingLeft),right:parseInt(R.paddingRight)};return!isNaN(L.left)&&!isNaN(L.right)&&(e.cachedPaddingH=L),L}function er(e){return q-e.display.nativeBarWidth}function Dn(e){return e.display.scroller.clientWidth-er(e)-e.display.barWidth}function Qn(e){return e.display.scroller.clientHeight-er(e)-e.display.barHeight}function Pn(e,r,R){var L=e.options.lineWrapping,M=L&&Dn(e);if(!r.measure.heights||L&&r.measure.width!=M){var H=r.measure.heights=[];if(L){r.measure.width=M;for(var re=r.text.firstChild.getClientRects(),le=0;le<re.length-1;le++){var ue=re[le],ge=re[le+1];Math.abs(ue.bottom-ge.bottom)>2&&H.push((ue.bottom+ge.top)/2-R.top)}}H.push(R.bottom-R.top)}}function Ut(e,r,R){if(e.line==r)return{map:e.measure.map,cache:e.measure.cache};for(var L=0;L<e.rest.length;L++)if(e.rest[L]==r)return{map:e.measure.maps[L],cache:e.measure.caches[L]};for(var M=0;M<e.rest.length;M++)if(ze(e.rest[M])>R)return{map:e.measure.maps[M],cache:e.measure.caches[M],before:!0}}function cn(e,r){r=ai(r);var R=ze(r),L=e.display.externalMeasured=new nr(e.doc,r,R);L.lineN=R;var M=L.built=Xn(e,L);return L.text=M.pre,o(e.display.lineMeasure,M.pre),L}function tr(e,r,R,L){return Cn(e,qn(e,r),R,L)}function sr(e,r){if(r>=e.display.viewFrom&&r<e.display.viewTo)return e.display.view[Gr(e,r)];var R=e.display.externalMeasured;if(R&&r>=R.lineN&&r<R.lineN+R.size)return R}function qn(e,r){var R=ze(r),L=sr(e,R);L&&!L.text?L=null:L&&L.changes&&(ft(e,L,R,Jn(e)),e.curOp.forceUpdate=!0),L||(L=cn(e,r));var M=Ut(L,r,R);return{line:r,view:L,rect:null,map:M.map,cache:M.cache,before:M.before,hasHeights:!1}}function Cn(e,r,R,L,M){r.before&&(R=-1);var H=R+(L||""),re;return r.cache.hasOwnProperty(H)?re=r.cache[H]:(r.rect||(r.rect=r.view.text.getBoundingClientRect()),r.hasHeights||(Pn(e,r.view,r.rect),r.hasHeights=!0),re=Nt(e,r,R,L),re.bogus||(r.cache[H]=re)),{left:re.left,right:re.right,top:M?re.rtop:re.top,bottom:M?re.rbottom:re.bottom}}var Wn={left:0,right:0,top:0,bottom:0};function on(e,r,R){for(var L,M,H,re,le,ue,ge=0;ge<e.length;ge+=3)if(le=e[ge],ue=e[ge+1],r<le?(M=0,H=1,re="left"):r<ue?(M=r-le,H=M+1):(ge==e.length-3||r==ue&&e[ge+3]>r)&&(H=ue-le,M=H-1,r>=ue&&(re="right")),M!=null){if(L=e[ge+2],le==ue&&R==(L.insertLeft?"left":"right")&&(re=R),R=="left"&&M==0)for(;ge&&e[ge-2]==e[ge-3]&&e[ge-1].insertLeft;)L=e[(ge-=3)+2],re="left";if(R=="right"&&M==ue-le)for(;ge<e.length-3&&e[ge+3]==e[ge+4]&&!e[ge+5].insertLeft;)L=e[(ge+=3)+2],re="right";break}return{node:L,start:M,end:H,collapse:re,coverStart:le,coverEnd:ue}}function _n(e,r){var R=Wn;if(r=="left")for(var L=0;L<e.length&&!((R=e[L]).left!=R.right);L++);else for(var M=e.length-1;M>=0&&!((R=e[M]).left!=R.right);M--);return R}function Nt(e,r,R,L){var M=on(r.map,R,L),H=M.node,re=M.start,le=M.end,ue=M.collapse,ge;if(H.nodeType==3){for(var We=0;We<4;We++){for(;re&&k(r.line.text.charAt(M.coverStart+re));)--re;for(;M.coverStart+le<M.coverEnd&&k(r.line.text.charAt(M.coverStart+le));)++le;if(C&&T<9&&re==0&&le==M.coverEnd-M.coverStart?ge=H.parentNode.getBoundingClientRect():ge=_n(O(H,re,le).getClientRects(),L),ge.left||ge.right||re==0)break;le=re,re=re-1,ue="right"}C&&T<11&&(ge=Bt(e.display.measure,ge))}else{re>0&&(ue=L="right");var Ge;e.options.lineWrapping&&(Ge=H.getClientRects()).length>1?ge=Ge[L=="right"?Ge.length-1:0]:ge=H.getBoundingClientRect()}if(C&&T<9&&!re&&(!ge||!ge.left&&!ge.right)){var ot=H.parentNode.getClientRects()[0];ot?ge={left:ot.left,right:ot.left+jn(e.display),top:ot.top,bottom:ot.bottom}:ge=Wn}for(var tt=ge.top-r.rect.top,bt=ge.bottom-r.rect.top,Ot=(tt+bt)/2,Mt=r.view.measure.heights,Wt=0;Wt<Mt.length-1&&!(Ot<Mt[Wt]);Wt++);var Yt=Wt?Mt[Wt-1]:0,Kt=Mt[Wt],en={left:(ue=="right"?ge.right:ge.left)-r.rect.left,right:(ue=="left"?ge.left:ge.right)-r.rect.left,top:Yt,bottom:Kt};return!ge.left&&!ge.right&&(en.bogus=!0),e.options.singleCursorHeightPerLine||(en.rtop=tt,en.rbottom=bt),en}function Bt(e,r){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!je(e))return r;var R=screen.logicalXDPI/screen.deviceXDPI,L=screen.logicalYDPI/screen.deviceYDPI;return{left:r.left*R,right:r.right*R,top:r.top*L,bottom:r.bottom*L}}function Xt(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var r=0;r<e.rest.length;r++)e.measure.caches[r]={}}function hn(e){e.display.externalMeasure=null,E(e.display.lineMeasure);for(var r=0;r<e.display.view.length;r++)Xt(e.display.view[r])}function qt(e){hn(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Nn(){return f&&i?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function pn(){return f&&i?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function On(e){var r=0;if(e.widgets)for(var R=0;R<e.widgets.length;++R)e.widgets[R].above&&(r+=In(e.widgets[R]));return r}function gn(e,r,R,L,M){if(!M){var H=On(r);R.top+=H,R.bottom+=H}if(L=="line")return R;L||(L="local");var re=bi(r);if(L=="local"?re+=Vn(e.display):re-=e.display.viewOffset,L=="page"||L=="window"){var le=e.display.lineSpace.getBoundingClientRect();re+=le.top+(L=="window"?0:pn());var ue=le.left+(L=="window"?0:Nn());R.left+=ue,R.right+=ue}return R.top+=re,R.bottom+=re,R}function ar(e,r,R){if(R=="div")return r;var L=r.left,M=r.top;if(R=="page")L-=Nn(),M-=pn();else if(R=="local"||!R){var H=e.display.sizer.getBoundingClientRect();L+=H.left,M+=H.top}var re=e.display.lineSpace.getBoundingClientRect();return{left:L-re.left,top:M-re.top}}function Yn(e,r,R,L,M){return L||(L=J(e.doc,r.line)),gn(e,L,tr(e,L,r.ch,M),R)}function $n(e,r,R,L,M,H){L=L||J(e.doc,r.line),M||(M=qn(e,L));function re(bt,Ot){var Mt=Cn(e,M,bt,Ot?"right":"left",H);return Ot?Mt.left=Mt.right:Mt.right=Mt.left,gn(e,L,Mt,R)}var le=at(L,e.doc.direction),ue=r.ch,ge=r.sticky;if(ue>=L.text.length?(ue=L.text.length,ge="before"):ue<=0&&(ue=0,ge="after"),!le)return re(ge=="before"?ue-1:ue,ge=="before");function We(bt,Ot,Mt){var Wt=le[Ot],Yt=Wt.level==1;return re(Mt?bt-1:bt,Yt!=Mt)}var Ge=me(le,ue,ge),ot=Y,tt=We(ue,Ge,ge=="before");return ot!=null&&(tt.other=We(ue,ot,ge!="before")),tt}function wr(e,r){var R=0;r=yt(e.doc,r),e.options.lineWrapping||(R=jn(e.display)*r.ch);var L=J(e.doc,r.line),M=bi(L)+Vn(e.display);return{left:R,right:R,top:M,bottom:M+L.height}}function jr(e,r,R,L,M){var H=it(e,r,R);return H.xRel=M,L&&(H.outside=L),H}function Ai(e,r,R){var L=e.doc;if(R+=e.display.viewOffset,R<0)return jr(L.first,0,null,-1,-1);var M=qe(L,R),H=L.first+L.size-1;if(M>H)return jr(L.first+L.size-1,J(L,H).text.length,null,1,1);r<0&&(r=0);for(var re=J(L,M);;){var le=Hi(e,re,M,r,R),ue=Xi(re,le.ch+(le.xRel>0||le.outside>0?1:0));if(!ue)return le;var ge=ue.find(1);if(ge.line==M)return ge;re=J(L,M=ge.line)}}function zr(e,r,R,L){L-=On(r);var M=r.text.length,H=$(function(re){return Cn(e,R,re-1).bottom<=L},M,0);return M=$(function(re){return Cn(e,R,re).top>L},H,M),{begin:H,end:M}}function Mi(e,r,R,L){R||(R=qn(e,r));var M=gn(e,r,Cn(e,R,L),"line").top;return zr(e,r,R,M)}function Ki(e,r,R,L){return e.bottom<=R?!1:e.top>R?!0:(L?e.left:e.right)>r}function Hi(e,r,R,L,M){M-=bi(r);var H=qn(e,r),re=On(r),le=0,ue=r.text.length,ge=!0,We=at(r,e.doc.direction);if(We){var Ge=(e.options.lineWrapping?_a:ji)(e,r,R,H,We,L,M);ge=Ge.level!=1,le=ge?Ge.from:Ge.to-1,ue=ge?Ge.to:Ge.from-1}var ot=null,tt=null,bt=$(function(bn){var dn=Cn(e,H,bn);return dn.top+=re,dn.bottom+=re,Ki(dn,L,M,!1)?(dn.top<=M&&dn.left<=L&&(ot=bn,tt=dn),!0):!1},le,ue),Ot,Mt,Wt=!1;if(tt){var Yt=L-tt.left<tt.right-L,Kt=Yt==ge;bt=ot+(Kt?0:1),Mt=Kt?"after":"before",Ot=Yt?tt.left:tt.right}else{!ge&&(bt==ue||bt==le)&&bt++,Mt=bt==0?"after":bt==r.text.length?"before":Cn(e,H,bt-(ge?1:0)).bottom+re<=M==ge?"after":"before";var en=$n(e,it(R,bt,Mt),"line",r,H);Ot=en.left,Wt=M<en.top?-1:M>=en.bottom?1:0}return bt=N(r.text,bt,1),jr(R,bt,Mt,Wt,L-Ot)}function ji(e,r,R,L,M,H,re){var le=$(function(Ge){var ot=M[Ge],tt=ot.level!=1;return Ki($n(e,it(R,tt?ot.to:ot.from,tt?"before":"after"),"line",r,L),H,re,!0)},0,M.length-1),ue=M[le];if(le>0){var ge=ue.level!=1,We=$n(e,it(R,ge?ue.from:ue.to,ge?"after":"before"),"line",r,L);Ki(We,H,re,!0)&&We.top>re&&(ue=M[le-1])}return ue}function _a(e,r,R,L,M,H,re){var le=zr(e,r,L,re),ue=le.begin,ge=le.end;/\s/.test(r.text.charAt(ge-1))&&ge--;for(var We=null,Ge=null,ot=0;ot<M.length;ot++){var tt=M[ot];if(tt.from>=ge||tt.to<=ue)continue;var bt=tt.level!=1,Ot=Cn(e,L,bt?Math.min(ge,tt.to)-1:Math.max(ue,tt.from)).right,Mt=Ot<H?H-Ot+1e9:Ot-H;(!We||Ge>Mt)&&(We=tt,Ge=Mt)}return We||(We=M[M.length-1]),We.from<ue&&(We={from:ue,to:We.to,level:We.level}),We.to>ge&&(We={from:We.from,to:ge,level:We.level}),We}var Un;function mn(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Un==null){Un=x("pre",null,"CodeMirror-line-like");for(var r=0;r<49;++r)Un.appendChild(document.createTextNode("x")),Un.appendChild(x("br"));Un.appendChild(document.createTextNode("x"))}o(e.measure,Un);var R=Un.offsetHeight/50;return R>3&&(e.cachedTextHeight=R),E(e.measure),R||1}function jn(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var r=x("span","xxxxxxxxxx"),R=x("pre",[r],"CodeMirror-line-like");o(e.measure,R);var L=r.getBoundingClientRect(),M=(L.right-L.left)/10;return M>2&&(e.cachedCharWidth=M),M||10}function Jn(e){for(var r=e.display,R={},L={},M=r.gutters.clientLeft,H=r.gutters.firstChild,re=0;H;H=H.nextSibling,++re){var le=e.display.gutterSpecs[re].className;R[le]=H.offsetLeft+H.clientLeft+M,L[le]=H.clientWidth}return{fixedPos:Lr(r),gutterTotalWidth:r.gutters.offsetWidth,gutterLeft:R,gutterWidth:L,wrapperWidth:r.wrapper.clientWidth}}function Lr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Kn(e){var r=mn(e.display),R=e.options.lineWrapping,L=R&&Math.max(5,e.display.scroller.clientWidth/jn(e.display)-3);return function(M){if(Ci(e.doc,M))return 0;var H=0;if(M.widgets)for(var re=0;re<M.widgets.length;re++)M.widgets[re].height&&(H+=M.widgets[re].height);return R?H+(Math.ceil(M.text.length/L)||1)*r:H+r}}function _i(e){var r=e.doc,R=Kn(e);r.iter(function(L){var M=R(L);M!=L.height&&Ee(L,M)})}function pi(e,r,R,L){var M=e.display;if(!R&&Be(r).getAttribute("cm-not-content")=="true")return null;var H,re,le=M.lineSpace.getBoundingClientRect();try{H=r.clientX-le.left,re=r.clientY-le.top}catch(Ge){return null}var ue=Ai(e,H,re),ge;if(L&&ue.xRel>0&&(ge=J(e.doc,ue.line).text).length==ue.ch){var We=X(ge,ge.length,e.options.tabSize)-ge.length;ue=it(ue.line,Math.max(0,Math.round((H-vr(e.display).left)/jn(e.display))-We))}return ue}function Gr(e,r){if(r>=e.display.viewTo)return null;if(r-=e.display.viewFrom,r<0)return null;for(var R=e.display.view,L=0;L<R.length;L++)if(r-=R[L].size,r<0)return L}function Mr(e,r,R,L){r==null&&(r=e.doc.first),R==null&&(R=e.doc.first+e.doc.size),L||(L=0);var M=e.display;if(L&&R<M.viewTo&&(M.updateLineNumbers==null||M.updateLineNumbers>r)&&(M.updateLineNumbers=r),e.curOp.viewChanged=!0,r>=M.viewTo)pr&&Wi(e.doc,r)<M.viewTo&&ei(e);else if(R<=M.viewFrom)pr&&Pi(e.doc,R+L)>M.viewFrom?ei(e):(M.viewFrom+=L,M.viewTo+=L);else if(r<=M.viewFrom&&R>=M.viewTo)ei(e);else if(r<=M.viewFrom){var H=Ln(e,R,R+L,1);H?(M.view=M.view.slice(H.index),M.viewFrom=H.lineN,M.viewTo+=L):ei(e)}else if(R>=M.viewTo){var re=Ln(e,r,r,-1);re?(M.view=M.view.slice(0,re.index),M.viewTo=re.lineN):ei(e)}else{var le=Ln(e,r,r,-1),ue=Ln(e,R,R+L,1);le&&ue?(M.view=M.view.slice(0,le.index).concat(Ur(e,le.lineN,ue.lineN)).concat(M.view.slice(ue.index)),M.viewTo+=L):ei(e)}var ge=M.externalMeasured;ge&&(R<ge.lineN?ge.lineN+=L:r<ge.lineN+ge.size&&(M.externalMeasured=null))}function oi(e,r,R){e.curOp.viewChanged=!0;var L=e.display,M=e.display.externalMeasured;if(M&&r>=M.lineN&&r<M.lineN+M.size&&(L.externalMeasured=null),r<L.viewFrom||r>=L.viewTo)return;var H=L.view[Gr(e,r)];if(H.node==null)return;var re=H.changes||(H.changes=[]);K(re,R)==-1&&re.push(R)}function ei(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Ln(e,r,R,L){var M=Gr(e,r),H,re=e.display.view;if(!pr||R==e.doc.first+e.doc.size)return{index:M,lineN:R};for(var le=e.display.viewFrom,ue=0;ue<M;ue++)le+=re[ue].size;if(le!=r){if(L>0){if(M==re.length-1)return null;H=le+re[M].size-r,M++}else H=le-r;r+=H,R+=H}for(;Wi(e.doc,R)!=R;){if(M==(L<0?0:re.length-1))return null;R+=L*re[M-(L<0?1:0)].size,M+=L}return{index:M,lineN:R}}function En(e,r,R){var L=e.display,M=L.view;M.length==0||r>=L.viewTo||R<=L.viewFrom?(L.view=Ur(e,r,R),L.viewFrom=r):(L.viewFrom>r?L.view=Ur(e,r,L.viewFrom).concat(L.view):L.viewFrom<r&&(L.view=L.view.slice(Gr(e,r))),L.viewFrom=r,L.viewTo<R?L.view=L.view.concat(Ur(e,L.viewTo,R)):L.viewTo>R&&(L.view=L.view.slice(0,Gr(e,R)))),L.viewTo=R}function Hn(e){for(var r=e.display.view,R=0,L=0;L<r.length;L++){var M=r[L];!M.hidden&&(!M.node||M.changes)&&++R}return R}function Gt(e){e.display.input.showSelection(e.display.input.prepareSelection())}function An(e,r){r===void 0&&(r=!0);for(var R=e.doc,L={},M=L.cursors=document.createDocumentFragment(),H=L.selection=document.createDocumentFragment(),re=0;re<R.sel.ranges.length;re++){if(!r&&re==R.sel.primIndex)continue;var le=R.sel.ranges[re];if(le.from().line>=e.display.viewTo||le.to().line<e.display.viewFrom)continue;var ue=le.empty();(ue||e.options.showCursorWhenSelecting)&&fr(e,le.head,M),ue||Fr(e,le,H)}return L}function fr(e,r,R){var L=$n(e,r,"div",null,null,!e.options.singleCursorHeightPerLine),M=R.appendChild(x("div","\xA0","CodeMirror-cursor"));if(M.style.left=L.left+"px",M.style.top=L.top+"px",M.style.height=Math.max(0,L.bottom-L.top)*e.options.cursorHeight+"px",L.other){var H=R.appendChild(x("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));H.style.display="",H.style.left=L.other.left+"px",H.style.top=L.other.top+"px",H.style.height=(L.other.bottom-L.other.top)*.85+"px"}}function Rr(e,r){return e.top-r.top||e.left-r.left}function Fr(e,r,R){var L=e.display,M=e.doc,H=document.createDocumentFragment(),re=vr(e.display),le=re.left,ue=Math.max(L.sizerWidth,Dn(e)-L.sizer.offsetLeft)-re.right,ge=M.direction=="ltr";function We(Kt,en,bn,dn){en<0&&(en=0),en=Math.round(en),dn=Math.round(dn),H.appendChild(x("div",null,"CodeMirror-selected","position: absolute; left: "+Kt+`px;
top: `+en+"px; width: "+(bn==null?ue-Kt:bn)+`px;
height: `+(dn-en)+"px"))}function Ge(Kt,en,bn){var dn=J(M,Kt),Gn=dn.text.length,_r,Jr;function Ar(Br,wi){return Yn(e,it(Kt,Br),"div",dn,wi)}function Ri(Br,wi,ti){var Vr=Mi(e,dn,null,Br),Wr=wi=="ltr"==(ti=="after")?"left":"right",Dr=ti=="after"?Vr.begin:Vr.end-(/\s/.test(dn.text.charAt(Vr.end-1))?2:1);return Ar(Dr,Wr)[Wr]}var Si=at(dn,M.direction);return V(Si,en||0,bn==null?Gn:bn,function(Br,wi,ti,Vr){var Wr=ti=="ltr",Dr=Ar(Br,Wr?"left":"right"),Ti=Ar(wi-1,Wr?"right":"left"),Pa=en==null&&Br==0,fa=bn==null&&wi==Gn,li=Vr==0,qi=!Si||Vr==Si.length-1;if(Ti.top-Dr.top<=3){var Qr=(ge?Pa:fa)&&li,Fo=(ge?fa:Pa)&&qi,ta=Qr?le:(Wr?Dr:Ti).left,ya=Fo?ue:(Wr?Ti:Dr).right;We(ta,Dr.top,ya-ta,Dr.bottom)}else{var ba,vi,Ma,Bo;Wr?(ba=ge&&Pa&&li?le:Dr.left,vi=ge?ue:Ri(Br,ti,"before"),Ma=ge?le:Ri(wi,ti,"after"),Bo=ge&&fa&&qi?ue:Ti.right):(ba=ge?Ri(Br,ti,"before"):le,vi=!ge&&Pa&&li?ue:Dr.right,Ma=!ge&&fa&&qi?le:Ti.left,Bo=ge?Ri(wi,ti,"after"):ue),We(ba,Dr.top,vi-ba,Dr.bottom),Dr.bottom<Ti.top&&We(le,Dr.bottom,null,Ti.top),We(Ma,Ti.top,Bo-Ma,Ti.bottom)}(!_r||Rr(Dr,_r)<0)&&(_r=Dr),Rr(Ti,_r)<0&&(_r=Ti),(!Jr||Rr(Dr,Jr)<0)&&(Jr=Dr),Rr(Ti,Jr)<0&&(Jr=Ti)}),{start:_r,end:Jr}}var ot=r.from(),tt=r.to();if(ot.line==tt.line)Ge(ot.line,ot.ch,tt.ch);else{var bt=J(M,ot.line),Ot=J(M,tt.line),Mt=ai(bt)==ai(Ot),Wt=Ge(ot.line,ot.ch,Mt?bt.text.length+1:null).end,Yt=Ge(tt.line,Mt?0:null,tt.ch).start;Mt&&(Wt.top<Yt.top-2?(We(Wt.right,Wt.top,null,Wt.bottom),We(le,Yt.top,Yt.left,Yt.bottom)):We(Wt.right,Wt.top,Yt.left-Wt.right,Wt.bottom)),Wt.bottom<Yt.top&&We(le,Wt.bottom,null,Yt.top)}R.appendChild(H)}function ra(e){if(!e.state.focused)return;var r=e.display;clearInterval(r.blinker);var R=!0;r.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?r.blinker=setInterval(function(){e.hasFocus()||Ei(e),r.cursorDiv.style.visibility=(R=!R)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(r.cursorDiv.style.visibility="hidden")}function sn(e){e.state.focused||(e.display.input.focus(),ha(e))}function ia(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Ei(e))},100)}function ha(e,r){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Ve(e,"focus",e,r),e.state.focused=!0,F(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),h&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),ra(e)}function Ei(e,r){if(e.state.delayingBlurEvent)return;e.state.focused&&(Ve(e,"blur",e,r),e.state.focused=!1,g(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Fi(e){for(var r=e.display,R=r.lineDiv.offsetTop,L=0;L<r.view.length;L++){var M=r.view[L],H=e.options.lineWrapping,re=void 0,le=0;if(M.hidden)continue;if(C&&T<8){var ue=M.node.offsetTop+M.node.offsetHeight;re=ue-R,R=ue}else{var ge=M.node.getBoundingClientRect();re=ge.bottom-ge.top,!H&&M.text.firstChild&&(le=M.text.firstChild.getBoundingClientRect().right-ge.left-1)}var We=M.line.height-re;if((We>.005||We<-.005)&&(Ee(M.line,re),Bi(M.line),M.rest))for(var Ge=0;Ge<M.rest.length;Ge++)Bi(M.rest[Ge]);if(le>e.display.sizerWidth){var ot=Math.ceil(le/jn(e.display));ot>e.display.maxLineLength&&(e.display.maxLineLength=ot,e.display.maxLine=M.line,e.display.maxLineChanged=!0)}}}function Bi(e){if(e.widgets)for(var r=0;r<e.widgets.length;++r){var R=e.widgets[r],L=R.node.parentNode;L&&(R.height=L.offsetHeight)}}function zi(e,r,R){var L=R&&R.top!=null?Math.max(0,R.top):e.scroller.scrollTop;L=Math.floor(L-Vn(e));var M=R&&R.bottom!=null?R.bottom:L+e.wrapper.clientHeight,H=qe(r,L),re=qe(r,M);if(R&&R.ensure){var le=R.ensure.from.line,ue=R.ensure.to.line;le<H?(H=le,re=qe(r,bi(J(r,le))+e.wrapper.clientHeight)):Math.min(ue,r.lastLine())>=re&&(H=qe(r,bi(J(r,ue))-e.wrapper.clientHeight),re=ue)}return{from:H,to:Math.max(re,H+1)}}function aa(e,r){if(He(e,"scrollCursorIntoView"))return;var R=e.display,L=R.sizer.getBoundingClientRect(),M=null;if(r.top+L.top<0?M=!0:r.bottom+L.top>(window.innerHeight||document.documentElement.clientHeight)&&(M=!1),M!=null&&!s){var H=x("div","\u200B",null,`position: absolute;
top: `+(r.top-R.viewOffset-Vn(e.display))+`px;
height: `+(r.bottom-r.top+er(e)+R.barHeight)+`px;
left: `+r.left+"px; width: "+Math.max(2,r.right-r.left)+"px;");e.display.lineSpace.appendChild(H),H.scrollIntoView(M),e.display.lineSpace.removeChild(H)}}function oa(e,r,R,L){L==null&&(L=0);var M;!e.options.lineWrapping&&r==R&&(r=r.ch?it(r.line,r.sticky=="before"?r.ch-1:r.ch,"after"):r,R=r.sticky=="before"?it(r.line,r.ch+1,"before"):r);for(var H=0;H<5;H++){var re=!1,le=$n(e,r),ue=!R||R==r?le:$n(e,R);M={left:Math.min(le.left,ue.left),top:Math.min(le.top,ue.top)-L,right:Math.max(le.left,ue.left),bottom:Math.max(le.bottom,ue.bottom)+L};var ge=kr(e,M),We=e.doc.scrollTop,Ge=e.doc.scrollLeft;if(ge.scrollTop!=null&&(Ia(e,ge.scrollTop),Math.abs(e.doc.scrollTop-We)>1&&(re=!0)),ge.scrollLeft!=null&&(pa(e,ge.scrollLeft),Math.abs(e.doc.scrollLeft-Ge)>1&&(re=!0)),!re)break}return M}function go(e,r){var R=kr(e,r);R.scrollTop!=null&&Ia(e,R.scrollTop),R.scrollLeft!=null&&pa(e,R.scrollLeft)}function kr(e,r){var R=e.display,L=mn(e.display);r.top<0&&(r.top=0);var M=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:R.scroller.scrollTop,H=Qn(e),re={};r.bottom-r.top>H&&(r.bottom=r.top+H);var le=e.doc.height+cr(R),ue=r.top<L,ge=r.bottom>le-L;if(r.top<M)re.scrollTop=ue?0:r.top;else if(r.bottom>M+H){var We=Math.min(r.top,(ge?le:r.bottom)-H);We!=M&&(re.scrollTop=We)}var Ge=e.options.fixedGutter?0:R.gutters.offsetWidth,ot=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:R.scroller.scrollLeft-Ge,tt=Dn(e)-R.gutters.offsetWidth,bt=r.right-r.left>tt;return bt&&(r.right=r.left+tt),r.left<10?re.scrollLeft=0:r.left<ot?re.scrollLeft=Math.max(0,r.left+Ge-(bt?0:10)):r.right>tt+ot-3&&(re.scrollLeft=r.right+(bt?0:10)-tt),re}function yo(e,r){if(r==null)return;eo(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+r}function Ea(e){eo(e);var r=e.getCursor();e.curOp.scrollToPos={from:r,to:r,margin:e.options.cursorScrollMargin}}function ka(e,r,R){(r!=null||R!=null)&&eo(e),r!=null&&(e.curOp.scrollLeft=r),R!=null&&(e.curOp.scrollTop=R)}function Qs(e,r){eo(e),e.curOp.scrollToPos=r}function eo(e){var r=e.curOp.scrollToPos;if(r){e.curOp.scrollToPos=null;var R=wr(e,r.from),L=wr(e,r.to);Wo(e,R,L,r.margin)}}function Wo(e,r,R,L){var M=kr(e,{left:Math.min(r.left,R.left),top:Math.min(r.top,R.top)-L,right:Math.max(r.right,R.right),bottom:Math.max(r.bottom,R.bottom)+L});ka(e,M.scrollLeft,M.scrollTop)}function Ia(e,r){if(Math.abs(e.doc.scrollTop-r)<2)return;U||_o(e,{top:r}),Ko(e,r,!0),U&&_o(e),ja(e,100)}function Ko(e,r,R){if(r=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,r)),e.display.scroller.scrollTop==r&&!R)return;e.doc.scrollTop=r,e.display.scrollbars.setScrollTop(r),e.display.scroller.scrollTop!=r&&(e.display.scroller.scrollTop=r)}function pa(e,r,R,L){if(r=Math.max(0,Math.min(r,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(R?r==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-r)<2)&&!L)return;e.doc.scrollLeft=r,Xo(e),e.display.scroller.scrollLeft!=r&&(e.display.scroller.scrollLeft=r),e.display.scrollbars.setScrollLeft(r)}function Na(e){var r=e.display,R=r.gutters.offsetWidth,L=Math.round(e.doc.height+cr(e.display));return{clientHeight:r.scroller.clientHeight,viewHeight:r.wrapper.clientHeight,scrollWidth:r.scroller.scrollWidth,clientWidth:r.scroller.clientWidth,viewWidth:r.wrapper.clientWidth,barLeft:e.options.fixedGutter?R:0,docHeight:L,scrollHeight:L+er(e)+r.barHeight,nativeBarWidth:r.nativeBarWidth,gutterWidth:R}}var ma=function(e,r,R){this.cm=R;var L=this.vert=x("div",[x("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),M=this.horiz=x("div",[x("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");L.tabIndex=M.tabIndex=-1,e(L),e(M),ke(L,"scroll",function(){L.clientHeight&&r(L.scrollTop,"vertical")}),ke(M,"scroll",function(){M.clientWidth&&r(M.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,C&&T<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ma.prototype.update=function(e){var r=e.scrollWidth>e.clientWidth+1,R=e.scrollHeight>e.clientHeight+1,L=e.nativeBarWidth;if(R){this.vert.style.display="block",this.vert.style.bottom=r?L+"px":"0";var M=e.viewHeight-(r?L:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+M)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(r){this.horiz.style.display="block",this.horiz.style.right=R?L+"px":"0",this.horiz.style.left=e.barLeft+"px";var H=e.viewWidth-e.barLeft-(R?L:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+H)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(L==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:R?L:0,bottom:r?L:0}},ma.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ma.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ma.prototype.zeroWidthHack=function(){var e=t&&!c?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Z,this.disableVert=new Z},ma.prototype.enableZeroWidthBar=function(e,r,R){e.style.pointerEvents="auto";function L(){var M=e.getBoundingClientRect(),H=R=="vert"?document.elementFromPoint(M.right-1,(M.top+M.bottom)/2):document.elementFromPoint((M.right+M.left)/2,M.bottom-1);H!=e?e.style.pointerEvents="none":r.set(1e3,L)}r.set(1e3,L)},ma.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ua=function(){};Ua.prototype.update=function(){return{bottom:0,right:0}},Ua.prototype.setScrollLeft=function(){},Ua.prototype.setScrollTop=function(){},Ua.prototype.clear=function(){};function xa(e,r){r||(r=Na(e));var R=e.display.barWidth,L=e.display.barHeight;Ho(e,r);for(var M=0;M<4&&R!=e.display.barWidth||L!=e.display.barHeight;M++)R!=e.display.barWidth&&e.options.lineWrapping&&Fi(e),Ho(e,Na(e)),R=e.display.barWidth,L=e.display.barHeight}function Ho(e,r){var R=e.display,L=R.scrollbars.update(r);R.sizer.style.paddingRight=(R.barWidth=L.right)+"px",R.sizer.style.paddingBottom=(R.barHeight=L.bottom)+"px",R.heightForcer.style.borderBottom=L.bottom+"px solid transparent",L.right&&L.bottom?(R.scrollbarFiller.style.display="block",R.scrollbarFiller.style.height=L.bottom+"px",R.scrollbarFiller.style.width=L.right+"px"):R.scrollbarFiller.style.display="",L.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(R.gutterFiller.style.display="block",R.gutterFiller.style.height=L.bottom+"px",R.gutterFiller.style.width=r.gutterWidth+"px"):R.gutterFiller.style.display=""}var zo={native:ma,null:Ua};function Go(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&g(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new zo[e.options.scrollbarStyle](function(r){e.display.wrapper.insertBefore(r,e.display.scrollbarFiller),ke(r,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),r.setAttribute("cm-not-content","true")},function(r,R){R=="horizontal"?pa(e,r):Ia(e,r)},e),e.display.scrollbars.addClass&&F(e.display.wrapper,e.display.scrollbars.addClass)}var Zs=0;function va(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Zs},pt(e.curOp)}function ga(e){var r=e.curOp;r&&Dt(r,function(R){for(var L=0;L<R.ops.length;L++)R.ops[L].cm.curOp=null;el(R)})}function el(e){for(var r=e.ops,R=0;R<r.length;R++)tl(r[R]);for(var L=0;L<r.length;L++)nl(r[L]);for(var M=0;M<r.length;M++)rl(r[M]);for(var H=0;H<r.length;H++)il(r[H]);for(var re=0;re<r.length;re++)al(r[re])}function tl(e){var r=e.cm,R=r.display;sl(r),e.updateMaxLine&&Qi(r),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<R.viewFrom||e.scrollToPos.to.line>=R.viewTo)||R.maxLineChanged&&r.options.lineWrapping,e.update=e.mustUpdate&&new to(r,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function nl(e){e.updatedDisplay=e.mustUpdate&&bo(e.cm,e.update)}function rl(e){var r=e.cm,R=r.display;e.updatedDisplay&&Fi(r),e.barMeasure=Na(r),R.maxLineChanged&&!r.options.lineWrapping&&(e.adjustWidthTo=tr(r,R.maxLine,R.maxLine.text.length).left+3,r.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(R.scroller.clientWidth,R.sizer.offsetLeft+e.adjustWidthTo+er(r)+r.display.barWidth),e.maxScrollLeft=Math.max(0,R.sizer.offsetLeft+e.adjustWidthTo-Dn(r))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=R.input.prepareSelection())}function il(e){var r=e.cm;e.adjustWidthTo!=null&&(r.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<r.doc.scrollLeft&&pa(r,Math.min(r.display.scroller.scrollLeft,e.maxScrollLeft),!0),r.display.maxLineChanged=!1);var R=e.focus&&e.focus==I();e.preparedSelection&&r.display.input.showSelection(e.preparedSelection,R),(e.updatedDisplay||e.startHeight!=r.doc.height)&&xa(r,e.barMeasure),e.updatedDisplay&&xo(r,e.barMeasure),e.selectionChanged&&ra(r),r.state.focused&&e.updateInput&&r.display.input.reset(e.typing),R&&sn(e.cm)}function al(e){var r=e.cm,R=r.display,L=r.doc;if(e.updatedDisplay&&Vo(r,e.update),R.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(R.wheelStartX=R.wheelStartY=null),e.scrollTop!=null&&Ko(r,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&pa(r,e.scrollLeft,!0,!0),e.scrollToPos){var M=oa(r,yt(L,e.scrollToPos.from),yt(L,e.scrollToPos.to),e.scrollToPos.margin);aa(r,M)}var H=e.maybeHiddenMarkers,re=e.maybeUnhiddenMarkers;if(H)for(var le=0;le<H.length;++le)H[le].lines.length||Ve(H[le],"hide");if(re)for(var ue=0;ue<re.length;++ue)re[ue].lines.length&&Ve(re[ue],"unhide");R.wrapper.offsetHeight&&(L.scrollTop=r.display.scroller.scrollTop),e.changeObjs&&Ve(r,"changes",r,e.changeObjs),e.update&&e.update.finish()}function Li(e,r){if(e.curOp)return r();va(e);try{return r()}finally{ga(e)}}function Yr(e,r){return function(){if(e.curOp)return r.apply(e,arguments);va(e);try{return r.apply(e,arguments)}finally{ga(e)}}}function mi(e){return function(){if(this.curOp)return e.apply(this,arguments);va(this);try{return e.apply(this,arguments)}finally{ga(this)}}}function $r(e){return function(){var r=this.cm;if(!r||r.curOp)return e.apply(this,arguments);va(r);try{return e.apply(this,arguments)}finally{ga(r)}}}function ja(e,r){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(r,j(ol,e))}function ol(e){var r=e.doc;if(r.highlightFrontier>=e.display.viewTo)return;var R=+new Date+e.options.workTime,L=xn(e,r.highlightFrontier),M=[];r.iter(L.line,Math.min(r.first+r.size,e.display.viewTo+500),function(H){if(L.line>=e.display.viewFrom){var re=H.styles,le=H.text.length>e.options.maxHighlightLength?$t(r.mode,L.state):null,ue=Zn(e,H,L,!0);le&&(L.state=le),H.styles=ue.styles;var ge=H.styleClasses,We=ue.classes;We?H.styleClasses=We:ge&&(H.styleClasses=null);for(var Ge=!re||re.length!=H.styles.length||ge!=We&&(!ge||!We||ge.bgClass!=We.bgClass||ge.textClass!=We.textClass),ot=0;!Ge&&ot<re.length;++ot)Ge=re[ot]!=H.styles[ot];Ge&&M.push(L.line),H.stateAfter=L.save(),L.nextLine()}else H.text.length<=e.options.maxHighlightLength&&Er(e,H.text,L),H.stateAfter=L.line%5==0?L.save():null,L.nextLine();if(+new Date>R)return ja(e,e.options.workDelay),!0}),r.highlightFrontier=L.line,r.modeFrontier=Math.max(r.modeFrontier,L.line),M.length&&Li(e,function(){for(var H=0;H<M.length;H++)oi(e,M[H],"text")})}var to=function(e,r,R){var L=e.display;this.viewport=r,this.visible=zi(L,e.doc,r),this.editorIsHidden=!L.wrapper.offsetWidth,this.wrapperHeight=L.wrapper.clientHeight,this.wrapperWidth=L.wrapper.clientWidth,this.oldDisplayWidth=Dn(e),this.force=R,this.dims=Jn(e),this.events=[]};to.prototype.signal=function(e,r){Re(e,r)&&this.events.push(arguments)},to.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ve.apply(null,this.events[e])};function sl(e){var r=e.display;!r.scrollbarsClipped&&r.scroller.offsetWidth&&(r.nativeBarWidth=r.scroller.offsetWidth-r.scroller.clientWidth,r.heightForcer.style.height=er(e)+"px",r.sizer.style.marginBottom=-r.nativeBarWidth+"px",r.sizer.style.borderRightWidth=er(e)+"px",r.scrollbarsClipped=!0)}function ll(e){if(e.hasFocus())return null;var r=I();if(!r||!D(e.display.lineDiv,r))return null;var R={activeElt:r};if(window.getSelection){var L=window.getSelection();L.anchorNode&&L.extend&&D(e.display.lineDiv,L.anchorNode)&&(R.anchorNode=L.anchorNode,R.anchorOffset=L.anchorOffset,R.focusNode=L.focusNode,R.focusOffset=L.focusOffset)}return R}function ul(e){if(!e||!e.activeElt||e.activeElt==I())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&D(document.body,e.anchorNode)&&D(document.body,e.focusNode)){var r=window.getSelection(),R=document.createRange();R.setEnd(e.anchorNode,e.anchorOffset),R.collapse(!1),r.removeAllRanges(),r.addRange(R),r.extend(e.focusNode,e.focusOffset)}}function bo(e,r){var R=e.display,L=e.doc;if(r.editorIsHidden)return ei(e),!1;if(!r.force&&r.visible.from>=R.viewFrom&&r.visible.to<=R.viewTo&&(R.updateLineNumbers==null||R.updateLineNumbers>=R.viewTo)&&R.renderedView==R.view&&Hn(e)==0)return!1;Yo(e)&&(ei(e),r.dims=Jn(e));var M=L.first+L.size,H=Math.max(r.visible.from-e.options.viewportMargin,L.first),re=Math.min(M,r.visible.to+e.options.viewportMargin);R.viewFrom<H&&H-R.viewFrom<20&&(H=Math.max(L.first,R.viewFrom)),R.viewTo>re&&R.viewTo-re<20&&(re=Math.min(M,R.viewTo)),pr&&(H=Wi(e.doc,H),re=Pi(e.doc,re));var le=H!=R.viewFrom||re!=R.viewTo||R.lastWrapHeight!=r.wrapperHeight||R.lastWrapWidth!=r.wrapperWidth;En(e,H,re),R.viewOffset=bi(J(e.doc,R.viewFrom)),e.display.mover.style.top=R.viewOffset+"px";var ue=Hn(e);if(!le&&ue==0&&!r.force&&R.renderedView==R.view&&(R.updateLineNumbers==null||R.updateLineNumbers>=R.viewTo))return!1;var ge=ll(e);return ue>4&&(R.lineDiv.style.display="none"),cl(e,R.updateLineNumbers,r.dims),ue>4&&(R.lineDiv.style.display=""),R.renderedView=R.view,ul(ge),E(R.cursorDiv),E(R.selectionDiv),R.gutters.style.height=R.sizer.style.minHeight=0,le&&(R.lastWrapHeight=r.wrapperHeight,R.lastWrapWidth=r.wrapperWidth,ja(e,400)),R.updateLineNumbers=null,!0}function Vo(e,r){for(var R=r.viewport,L=!0;;L=!1){if(!L||!e.options.lineWrapping||r.oldDisplayWidth==Dn(e)){if(R&&R.top!=null&&(R={top:Math.min(e.doc.height+cr(e.display)-Qn(e),R.top)}),r.visible=zi(e.display,e.doc,R),r.visible.from>=e.display.viewFrom&&r.visible.to<=e.display.viewTo)break}else L&&(r.visible=zi(e.display,e.doc,R));if(!bo(e,r))break;Fi(e);var M=Na(e);Gt(e),xa(e,M),xo(e,M),r.force=!1}r.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(r.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function _o(e,r){var R=new to(e,r);if(bo(e,R)){Fi(e),Vo(e,R);var L=Na(e);Gt(e),xa(e,L),xo(e,L),R.finish()}}function cl(e,r,R){var L=e.display,M=e.options.lineNumbers,H=L.lineDiv,re=H.firstChild;function le(bt){var Ot=bt.nextSibling;return h&&t&&e.display.currentWheelTarget==bt?bt.style.display="none":bt.parentNode.removeChild(bt),Ot}for(var ue=L.view,ge=L.viewFrom,We=0;We<ue.length;We++){var Ge=ue[We];if(!Ge.hidden)if(!Ge.node||Ge.node.parentNode!=H){var ot=vn(e,Ge,ge,R);H.insertBefore(ot,re)}else{for(;re!=Ge.node;)re=le(re);var tt=M&&r!=null&&r<=ge&&Ge.lineNumber;Ge.changes&&(K(Ge.changes,"gutter")>-1&&(tt=!1),ft(e,Ge,ge,R)),tt&&(E(Ge.lineNumber),Ge.lineNumber.appendChild(document.createTextNode(Lt(e.options,ge)))),re=Ge.node.nextSibling}ge+=Ge.size}for(;re;)re=le(re)}function Eo(e){var r=e.gutters.offsetWidth;e.sizer.style.marginLeft=r+"px"}function xo(e,r){e.display.sizer.style.minHeight=r.docHeight+"px",e.display.heightForcer.style.top=r.docHeight+"px",e.display.gutters.style.height=r.docHeight+e.display.barHeight+er(e)+"px"}function Xo(e){var r=e.display,R=r.view;if(!r.alignWidgets&&(!r.gutters.firstChild||!e.options.fixedGutter))return;for(var L=Lr(r)-r.scroller.scrollLeft+e.doc.scrollLeft,M=r.gutters.offsetWidth,H=L+"px",re=0;re<R.length;re++)if(!R[re].hidden){e.options.fixedGutter&&(R[re].gutter&&(R[re].gutter.style.left=H),R[re].gutterBackground&&(R[re].gutterBackground.style.left=H));var le=R[re].alignable;if(le)for(var ue=0;ue<le.length;ue++)le[ue].style.left=H}e.options.fixedGutter&&(r.gutters.style.left=L+M+"px")}function Yo(e){if(!e.options.lineNumbers)return!1;var r=e.doc,R=Lt(e.options,r.first+r.size-1),L=e.display;if(R.length!=L.lineNumChars){var M=L.measure.appendChild(x("div",[x("div",R)],"CodeMirror-linenumber CodeMirror-gutter-elt")),H=M.firstChild.offsetWidth,re=M.offsetWidth-H;return L.lineGutter.style.width="",L.lineNumInnerWidth=Math.max(H,L.lineGutter.offsetWidth-re)+1,L.lineNumWidth=L.lineNumInnerWidth+re,L.lineNumChars=L.lineNumInnerWidth?R.length:-1,L.lineGutter.style.width=L.lineNumWidth+"px",Eo(e.display),!0}return!1}function So(e,r){for(var R=[],L=!1,M=0;M<e.length;M++){var H=e[M],re=null;if(typeof H!="string"&&(re=H.style,H=H.className),H=="CodeMirror-linenumbers")if(r)L=!0;else continue;R.push({className:H,style:re})}return r&&!L&&R.push({className:"CodeMirror-linenumbers",style:null}),R}function $o(e){var r=e.gutters,R=e.gutterSpecs;E(r),e.lineGutter=null;for(var L=0;L<R.length;++L){var M=R[L],H=M.className,re=M.style,le=r.appendChild(x("div",null,"CodeMirror-gutter "+H));re&&(le.style.cssText=re),H=="CodeMirror-linenumbers"&&(e.lineGutter=le,le.style.width=(e.lineNumWidth||1)+"px")}r.style.display=R.length?"":"none",Eo(e)}function Fa(e){$o(e.display),Mr(e),Xo(e)}function dl(e,r,R,L){var M=this;this.input=R,M.scrollbarFiller=x("div",null,"CodeMirror-scrollbar-filler"),M.scrollbarFiller.setAttribute("cm-not-content","true"),M.gutterFiller=x("div",null,"CodeMirror-gutter-filler"),M.gutterFiller.setAttribute("cm-not-content","true"),M.lineDiv=A("div",null,"CodeMirror-code"),M.selectionDiv=x("div",null,null,"position: relative; z-index: 1"),M.cursorDiv=x("div",null,"CodeMirror-cursors"),M.measure=x("div",null,"CodeMirror-measure"),M.lineMeasure=x("div",null,"CodeMirror-measure"),M.lineSpace=A("div",[M.measure,M.lineMeasure,M.selectionDiv,M.cursorDiv,M.lineDiv],null,"position: relative; outline: none");var H=A("div",[M.lineSpace],"CodeMirror-lines");M.mover=x("div",[H],null,"position: relative"),M.sizer=x("div",[M.mover],"CodeMirror-sizer"),M.sizerWidth=null,M.heightForcer=x("div",null,null,"position: absolute; height: "+q+"px; width: 1px;"),M.gutters=x("div",null,"CodeMirror-gutters"),M.lineGutter=null,M.scroller=x("div",[M.sizer,M.heightForcer,M.gutters],"CodeMirror-scroll"),M.scroller.setAttribute("tabIndex","-1"),M.wrapper=x("div",[M.scrollbarFiller,M.gutterFiller,M.scroller],"CodeMirror"),C&&T<8&&(M.gutters.style.zIndex=-1,M.scroller.style.paddingRight=0),!h&&!(U&&n)&&(M.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(M.wrapper):e(M.wrapper)),M.viewFrom=M.viewTo=r.first,M.reportedViewFrom=M.reportedViewTo=r.first,M.view=[],M.renderedView=null,M.externalMeasured=null,M.viewOffset=0,M.lastWrapHeight=M.lastWrapWidth=0,M.updateLineNumbers=null,M.nativeBarWidth=M.barHeight=M.barWidth=0,M.scrollbarsClipped=!1,M.lineNumWidth=M.lineNumInnerWidth=M.lineNumChars=null,M.alignWidgets=!1,M.cachedCharWidth=M.cachedTextHeight=M.cachedPaddingH=null,M.maxLine=null,M.maxLineLength=0,M.maxLineChanged=!1,M.wheelDX=M.wheelDY=M.wheelStartX=M.wheelStartY=null,M.shift=!1,M.selForContextMenu=null,M.activeTouch=null,M.gutterSpecs=So(L.gutters,L.lineNumbers),$o(M),R.init(M)}var no=0,ki=null;C?ki=-.53:U?ki=15:f?ki=-.7:a&&(ki=-1/3);function Jo(e){var r=e.wheelDeltaX,R=e.wheelDeltaY;return r==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(r=e.detail),R==null&&e.detail&&e.axis==e.VERTICAL_AXIS?R=e.detail:R==null&&(R=e.wheelDelta),{x:r,y:R}}function fl(e){var r=Jo(e);return r.x*=ki,r.y*=ki,r}function Qo(e,r){var R=Jo(r),L=R.x,M=R.y,H=e.display,re=H.scroller,le=re.scrollWidth>re.clientWidth,ue=re.scrollHeight>re.clientHeight;if(!(L&&le||M&&ue))return;if(M&&t&&h){e:for(var ge=r.target,We=H.view;ge!=re;ge=ge.parentNode)for(var Ge=0;Ge<We.length;Ge++)if(We[Ge].node==ge){e.display.currentWheelTarget=ge;break e}}if(L&&!U&&!l&&ki!=null){M&&ue&&Ia(e,Math.max(0,re.scrollTop+M*ki)),pa(e,Math.max(0,re.scrollLeft+L*ki)),(!M||M&&ue)&&he(r),H.wheelStartX=null;return}if(M&&ki!=null){var ot=M*ki,tt=e.doc.scrollTop,bt=tt+H.wrapper.clientHeight;ot<0?tt=Math.max(0,tt+ot-50):bt=Math.min(e.doc.height,bt+ot+50),_o(e,{top:tt,bottom:bt})}no<20&&(H.wheelStartX==null?(H.wheelStartX=re.scrollLeft,H.wheelStartY=re.scrollTop,H.wheelDX=L,H.wheelDY=M,setTimeout(function(){if(H.wheelStartX==null)return;var Ot=re.scrollLeft-H.wheelStartX,Mt=re.scrollTop-H.wheelStartY,Wt=Mt&&H.wheelDY&&Mt/H.wheelDY||Ot&&H.wheelDX&&Ot/H.wheelDX;if(H.wheelStartX=H.wheelStartY=null,!Wt)return;ki=(ki*no+Wt)/(no+1),++no},200)):(H.wheelDX+=L,H.wheelDY+=M))}var Ii=function(e,r){this.ranges=e,this.primIndex=r};Ii.prototype.primary=function(){return this.ranges[this.primIndex]},Ii.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var r=0;r<this.ranges.length;r++){var R=this.ranges[r],L=e.ranges[r];if(!Qt(R.anchor,L.anchor)||!Qt(R.head,L.head))return!1}return!0},Ii.prototype.deepCopy=function(){for(var e=[],r=0;r<this.ranges.length;r++)e[r]=new lr(Et(this.ranges[r].anchor),Et(this.ranges[r].head));return new Ii(e,this.primIndex)},Ii.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Ii.prototype.contains=function(e,r){r||(r=e);for(var R=0;R<this.ranges.length;R++){var L=this.ranges[R];if(Tt(r,L.from())>=0&&Tt(e,L.to())<=0)return R}return-1};var lr=function(e,r){this.anchor=e,this.head=r};lr.prototype.from=function(){return Jt(this.anchor,this.head)},lr.prototype.to=function(){return nn(this.anchor,this.head)},lr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Gi(e,r,R){var L=e&&e.options.selectionsMayTouch,M=r[R];r.sort(function(ot,tt){return Tt(ot.from(),tt.from())}),R=K(r,M);for(var H=1;H<r.length;H++){var re=r[H],le=r[H-1],ue=Tt(le.to(),re.from());if(L&&!re.empty()?ue>0:ue>=0){var ge=Jt(le.from(),re.from()),We=nn(le.to(),re.to()),Ge=le.empty()?re.from()==re.head:le.from()==le.head;H<=R&&--R,r.splice(--H,2,new lr(Ge?We:ge,Ge?ge:We))}}return new Ii(r,R)}function sa(e,r){return new Ii([new lr(e,r||e)],0)}function la(e){return e.text?it(e.from.line+e.text.length-1,Fe(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function qo(e,r){if(Tt(e,r.from)<0)return e;if(Tt(e,r.to)<=0)return la(r);var R=e.line+r.text.length-(r.to.line-r.from.line)-1,L=e.ch;return e.line==r.to.line&&(L+=la(r).ch-r.to.ch),it(R,L)}function wo(e,r){for(var R=[],L=0;L<e.sel.ranges.length;L++){var M=e.sel.ranges[L];R.push(new lr(qo(M.anchor,r),qo(M.head,r)))}return Gi(e.cm,R,e.sel.primIndex)}function Zo(e,r,R){return e.line==r.line?it(R.line,e.ch-r.ch+R.ch):it(R.line+(e.line-r.line),e.ch)}function hl(e,r,R){for(var L=[],M=it(e.first,0),H=M,re=0;re<r.length;re++){var le=r[re],ue=Zo(le.from,M,H),ge=Zo(la(le),M,H);if(M=le.to,H=ge,R=="around"){var We=e.sel.ranges[re],Ge=Tt(We.head,We.anchor)<0;L[re]=new lr(Ge?ge:ue,Ge?ue:ge)}else L[re]=new lr(ue,ue)}return new Ii(L,e.sel.primIndex)}function To(e){e.doc.mode=gt(e.options,e.doc.modeOption),Ba(e)}function Ba(e){e.doc.iter(function(r){r.stateAfter&&(r.stateAfter=null),r.styles&&(r.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ja(e,100),e.state.modeGen++,e.curOp&&Mr(e)}function es(e,r){return r.from.ch==0&&r.to.ch==0&&Fe(r.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Co(e,r,R,L){function M(Yt){return R?R[Yt]:null}function H(Yt,Kt,en){Zi(Yt,Kt,en,L),jt(Yt,"change",Yt,r)}function re(Yt,Kt){for(var en=[],bn=Yt;bn<Kt;++bn)en.push(new hi(ge[bn],M(bn),L));return en}var le=r.from,ue=r.to,ge=r.text,We=J(e,le.line),Ge=J(e,ue.line),ot=Fe(ge),tt=M(ge.length-1),bt=ue.line-le.line;if(r.full)e.insert(0,re(0,ge.length)),e.remove(ge.length,e.size-ge.length);else if(es(e,r)){var Ot=re(0,ge.length-1);H(Ge,Ge.text,tt),bt&&e.remove(le.line,bt),Ot.length&&e.insert(le.line,Ot)}else if(We==Ge)if(ge.length==1)H(We,We.text.slice(0,le.ch)+ot+We.text.slice(ue.ch),tt);else{var Mt=re(1,ge.length-1);Mt.push(new hi(ot+We.text.slice(ue.ch),tt,L)),H(We,We.text.slice(0,le.ch)+ge[0],M(0)),e.insert(le.line+1,Mt)}else if(ge.length==1)H(We,We.text.slice(0,le.ch)+ge[0]+Ge.text.slice(ue.ch),M(0)),e.remove(le.line+1,bt);else{H(We,We.text.slice(0,le.ch)+ge[0],M(0)),H(Ge,ot+Ge.text.slice(ue.ch),tt);var Wt=re(1,ge.length-1);bt>1&&e.remove(le.line+1,bt-1),e.insert(le.line+1,Wt)}jt(e,"change",e,r)}function ua(e,r,R){function L(M,H,re){if(M.linked)for(var le=0;le<M.linked.length;++le){var ue=M.linked[le];if(ue.doc==H)continue;var ge=re&&ue.sharedHist;if(R&&!ge)continue;r(ue.doc,ge),L(ue.doc,M,ge)}}L(e,null,!0)}function ts(e,r){if(r.cm)throw new Error("This document is already in use.");e.doc=r,r.cm=e,_i(e),To(e),ns(e),e.options.lineWrapping||Qi(e),e.options.mode=r.modeOption,Mr(e)}function ns(e){(e.doc.direction=="rtl"?F:g)(e.display.lineDiv,"CodeMirror-rtl")}function pl(e){Li(e,function(){ns(e),Mr(e)})}function ro(e){this.done=[],this.undone=[],this.undoDepth=Infinity,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function Oo(e,r){var R={from:Et(r.from),to:la(r),text:te(e,r.from,r.to)};return as(e,R,r.from.line,r.to.line+1),ua(e,function(L){return as(L,R,r.from.line,r.to.line+1)},!0),R}function rs(e){for(;e.length;){var r=Fe(e);if(r.ranges)e.pop();else break}}function ml(e,r){if(r)return rs(e.done),Fe(e.done);if(e.done.length&&!Fe(e.done).ranges)return Fe(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Fe(e.done)}function is(e,r,R,L){var M=e.history;M.undone.length=0;var H=+new Date,re,le;if((M.lastOp==L||M.lastOrigin==r.origin&&r.origin&&(r.origin.charAt(0)=="+"&&M.lastModTime>H-(e.cm?e.cm.options.historyEventDelay:500)||r.origin.charAt(0)=="*"))&&(re=ml(M,M.lastOp==L)))le=Fe(re.changes),Tt(r.from,r.to)==0&&Tt(r.from,le.to)==0?le.to=la(r):re.changes.push(Oo(e,r));else{var ue=Fe(M.done);for((!ue||!ue.ranges)&&io(e.sel,M.done),re={changes:[Oo(e,r)],generation:M.generation},M.done.push(re);M.done.length>M.undoDepth;)M.done.shift(),M.done[0].ranges||M.done.shift()}M.done.push(R),M.generation=++M.maxGeneration,M.lastModTime=M.lastSelTime=H,M.lastOp=M.lastSelOp=L,M.lastOrigin=M.lastSelOrigin=r.origin,le||Ve(e,"historyAdded")}function vl(e,r,R,L){var M=r.charAt(0);return M=="*"||M=="+"&&R.ranges.length==L.ranges.length&&R.somethingSelected()==L.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,r,R,L){var M=e.history,H=L&&L.origin;R==M.lastSelOp||H&&M.lastSelOrigin==H&&(M.lastModTime==M.lastSelTime&&M.lastOrigin==H||vl(e,H,Fe(M.done),r))?M.done[M.done.length-1]=r:io(r,M.done),M.lastSelTime=+new Date,M.lastSelOrigin=H,M.lastSelOp=R,L&&L.clearRedo!==!1&&rs(M.undone)}function io(e,r){var R=Fe(r);R&&R.ranges&&R.equals(e)||r.push(e)}function as(e,r,R,L){var M=r["spans_"+e.id],H=0;e.iter(Math.max(e.first,R),Math.min(e.first+e.size,L),function(re){re.markedSpans&&((M||(M=r["spans_"+e.id]={}))[H]=re.markedSpans),++H})}function yl(e){if(!e)return null;for(var r,R=0;R<e.length;++R)e[R].marker.explicitlyCleared?r||(r=e.slice(0,R)):r&&r.push(e[R]);return r?r.length?r:null:e}function bl(e,r){var R=r["spans_"+e.id];if(!R)return null;for(var L=[],M=0;M<r.text.length;++M)L.push(yl(R[M]));return L}function os(e,r){var R=bl(e,r),L=ni(e,r);if(!R)return L;if(!L)return R;for(var M=0;M<R.length;++M){var H=R[M],re=L[M];if(H&&re){e:for(var le=0;le<re.length;++le){for(var ue=re[le],ge=0;ge<H.length;++ge)if(H[ge].marker==ue.marker)continue e;H.push(ue)}}else re&&(R[M]=re)}return R}function Sa(e,r,R){for(var L=[],M=0;M<e.length;++M){var H=e[M];if(H.ranges){L.push(R?Ii.prototype.deepCopy.call(H):H);continue}var re=H.changes,le=[];L.push({changes:le});for(var ue=0;ue<re.length;++ue){var ge=re[ue],We=void 0;if(le.push({from:ge.from,to:ge.to,text:ge.text}),r)for(var Ge in ge)(We=Ge.match(/^spans_(\d+)$/))&&(K(r,Number(We[1]))>-1&&(Fe(le)[Ge]=ge[Ge],delete ge[Ge]))}}return L}function Ao(e,r,R,L){if(L){var M=e.anchor;if(R){var H=Tt(r,M)<0;H!=Tt(R,M)<0?(M=r,r=R):H!=Tt(r,R)<0&&(r=R)}return new lr(M,r)}else return new lr(R||r,r)}function ao(e,r,R,L,M){M==null&&(M=e.cm&&(e.cm.display.shift||e.extend)),si(e,new Ii([Ao(e.sel.primary(),r,R,M)],0),L)}function ss(e,r,R){for(var L=[],M=e.cm&&(e.cm.display.shift||e.extend),H=0;H<e.sel.ranges.length;H++)L[H]=Ao(e.sel.ranges[H],r[H],null,M);var re=Gi(e.cm,L,e.sel.primIndex);si(e,re,R)}function Lo(e,r,R,L){var M=e.sel.ranges.slice(0);M[r]=R,si(e,Gi(e.cm,M,e.sel.primIndex),L)}function ls(e,r,R,L){si(e,sa(r,R),L)}function _l(e,r,R){var L={ranges:r.ranges,update:function(M){this.ranges=[];for(var H=0;H<M.length;H++)this.ranges[H]=new lr(yt(e,M[H].anchor),yt(e,M[H].head))},origin:R&&R.origin};return Ve(e,"beforeSelectionChange",e,L),e.cm&&Ve(e.cm,"beforeSelectionChange",e.cm,L),L.ranges!=r.ranges?Gi(e.cm,L.ranges,L.ranges.length-1):r}function us(e,r,R){var L=e.history.done,M=Fe(L);M&&M.ranges?(L[L.length-1]=r,oo(e,r,R)):si(e,r,R)}function si(e,r,R){oo(e,r,R),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,R)}function oo(e,r,R){(Re(e,"beforeSelectionChange")||e.cm&&Re(e.cm,"beforeSelectionChange"))&&(r=_l(e,r,R));var L=R&&R.bias||(Tt(r.primary().head,e.sel.primary().head)<0?-1:1);cs(e,fs(e,r,L,!0)),!(R&&R.scroll===!1)&&e.cm&&Ea(e.cm)}function cs(e,r){if(r.equals(e.sel))return;e.sel=r,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Pe(e.cm)),jt(e,"cursorActivity",e)}function ds(e){cs(e,fs(e,e.sel,null,!1))}function fs(e,r,R,L){for(var M,H=0;H<r.ranges.length;H++){var re=r.ranges[H],le=r.ranges.length==e.sel.ranges.length&&e.sel.ranges[H],ue=so(e,re.anchor,le&&le.anchor,R,L),ge=so(e,re.head,le&&le.head,R,L);(M||ue!=re.anchor||ge!=re.head)&&(M||(M=r.ranges.slice(0,H)),M[H]=new lr(ue,ge))}return M?Gi(e.cm,M,r.primIndex):r}function wa(e,r,R,L,M){var H=J(e,r.line);if(H.markedSpans)for(var re=0;re<H.markedSpans.length;++re){var le=H.markedSpans[re],ue=le.marker,ge="selectLeft"in ue?!ue.selectLeft:ue.inclusiveLeft,We="selectRight"in ue?!ue.selectRight:ue.inclusiveRight;if((le.from==null||(ge?le.from<=r.ch:le.from<r.ch))&&(le.to==null||(We?le.to>=r.ch:le.to>r.ch))){if(M&&(Ve(ue,"beforeCursorEnter"),ue.explicitlyCleared))if(H.markedSpans){--re;continue}else break;if(!ue.atomic)continue;if(R){var Ge=ue.find(L<0?1:-1),ot=void 0;if((L<0?We:ge)&&(Ge=hs(e,Ge,-L,Ge&&Ge.line==r.line?H:null)),Ge&&Ge.line==r.line&&(ot=Tt(Ge,R))&&(L<0?ot<0:ot>0))return wa(e,Ge,r,L,M)}var tt=ue.find(L<0?-1:1);return(L<0?ge:We)&&(tt=hs(e,tt,L,tt.line==r.line?H:null)),tt?wa(e,tt,r,L,M):null}}return r}function so(e,r,R,L,M){var H=L||1,re=wa(e,r,R,H,M)||!M&&wa(e,r,R,H,!0)||wa(e,r,R,-H,M)||!M&&wa(e,r,R,-H,!0);return re||(e.cantEdit=!0,it(e.first,0))}function hs(e,r,R,L){return R<0&&r.ch==0?r.line>e.first?yt(e,it(r.line-1)):null:R>0&&r.ch==(L||J(e,r.line)).text.length?r.line<e.first+e.size-1?it(r.line+1,0):null:new it(r.line,r.ch+R)}function ps(e){e.setSelection(it(e.firstLine(),0),it(e.lastLine()),oe)}function ms(e,r,R){var L={canceled:!1,from:r.from,to:r.to,text:r.text,origin:r.origin,cancel:function(){return L.canceled=!0}};return R&&(L.update=function(M,H,re,le){M&&(L.from=yt(e,M)),H&&(L.to=yt(e,H)),re&&(L.text=re),le!==void 0&&(L.origin=le)}),Ve(e,"beforeChange",e,L),e.cm&&Ve(e.cm,"beforeChange",e.cm,L),L.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:L.from,to:L.to,text:L.text,origin:L.origin}}function Ta(e,r,R){if(e.cm){if(!e.cm.curOp)return Yr(e.cm,Ta)(e,r,R);if(e.cm.state.suppressEdits)return}if((Re(e,"beforeChange")||e.cm&&Re(e.cm,"beforeChange"))&&(r=ms(e,r,!0),!r))return;var L=gi&&!R&&Ni(e,r.from,r.to);if(L)for(var M=L.length-1;M>=0;--M)vs(e,{from:L[M].from,to:L[M].to,text:M?[""]:r.text,origin:r.origin});else vs(e,r)}function vs(e,r){if(r.text.length==1&&r.text[0]==""&&Tt(r.from,r.to)==0)return;var R=wo(e,r);is(e,r,R,e.cm?e.cm.curOp.id:NaN),Wa(e,r,R,ni(e,r));var L=[];ua(e,function(M,H){!H&&K(L,M.history)==-1&&(_s(M.history,r),L.push(M.history)),Wa(M,r,null,ni(M,r))})}function lo(e,r,R){var L=e.cm&&e.cm.state.suppressEdits;if(L&&!R)return;for(var M=e.history,H,re=e.sel,le=r=="undo"?M.done:M.undone,ue=r=="undo"?M.undone:M.done,ge=0;ge<le.length&&!(H=le[ge],R?H.ranges&&!H.equals(e.sel):!H.ranges);ge++);if(ge==le.length)return;for(M.lastOrigin=M.lastSelOrigin=null;;)if(H=le.pop(),H.ranges){if(io(H,ue),R&&!H.equals(e.sel)){si(e,H,{clearRedo:!1});return}re=H}else if(L){le.push(H);return}else break;var We=[];io(re,ue),ue.push({changes:We,generation:M.generation}),M.generation=H.generation||++M.maxGeneration;for(var Ge=Re(e,"beforeChange")||e.cm&&Re(e.cm,"beforeChange"),ot=function(Ot){var Mt=H.changes[Ot];if(Mt.origin=r,Ge&&!ms(e,Mt,!1))return le.length=0,{};We.push(Oo(e,Mt));var Wt=Ot?wo(e,Mt):Fe(le);Wa(e,Mt,Wt,os(e,Mt)),!Ot&&e.cm&&e.cm.scrollIntoView({from:Mt.from,to:la(Mt)});var Yt=[];ua(e,function(Kt,en){!en&&K(Yt,Kt.history)==-1&&(_s(Kt.history,Mt),Yt.push(Kt.history)),Wa(Kt,Mt,null,os(Kt,Mt))})},tt=H.changes.length-1;tt>=0;--tt){var bt=ot(tt);if(bt)return bt.v}}function gs(e,r){if(r==0)return;if(e.first+=r,e.sel=new Ii(De(e.sel.ranges,function(M){return new lr(it(M.anchor.line+r,M.anchor.ch),it(M.head.line+r,M.head.ch))}),e.sel.primIndex),e.cm){Mr(e.cm,e.first,e.first-r,r);for(var R=e.cm.display,L=R.viewFrom;L<R.viewTo;L++)oi(e.cm,L,"gutter")}}function Wa(e,r,R,L){if(e.cm&&!e.cm.curOp)return Yr(e.cm,Wa)(e,r,R,L);if(r.to.line<e.first){gs(e,r.text.length-1-(r.to.line-r.from.line));return}if(r.from.line>e.lastLine())return;if(r.from.line<e.first){var M=r.text.length-1-(e.first-r.from.line);gs(e,M),r={from:it(e.first,0),to:it(r.to.line+M,r.to.ch),text:[Fe(r.text)],origin:r.origin}}var H=e.lastLine();r.to.line>H&&(r={from:r.from,to:it(H,J(e,H).text.length),text:[r.text[0]],origin:r.origin}),r.removed=te(e,r.from,r.to),R||(R=wo(e,r)),e.cm?El(e.cm,r,L):Co(e,r,L),oo(e,R,oe),e.cantEdit&&so(e,it(e.firstLine(),0))&&(e.cantEdit=!1)}function El(e,r,R){var L=e.doc,M=e.display,H=r.from,re=r.to,le=!1,ue=H.line;e.options.lineWrapping||(ue=ze(ai(J(L,H.line))),L.iter(ue,re.line+1,function(tt){if(tt==M.maxLine)return le=!0,!0})),L.sel.contains(r.from,r.to)>-1&&Pe(e),Co(L,r,R,Kn(e)),e.options.lineWrapping||(L.iter(ue,H.line+r.text.length,function(tt){var bt=Ji(tt);bt>M.maxLineLength&&(M.maxLine=tt,M.maxLineLength=bt,M.maxLineChanged=!0,le=!1)}),le&&(e.curOp.updateMaxLine=!0)),gr(L,H.line),ja(e,400);var ge=r.text.length-(re.line-H.line)-1;r.full?Mr(e):H.line==re.line&&r.text.length==1&&!es(e.doc,r)?oi(e,H.line,"text"):Mr(e,H.line,re.line+1,ge);var We=Re(e,"changes"),Ge=Re(e,"change");if(Ge||We){var ot={from:H,to:re,text:r.text,removed:r.removed,origin:r.origin};Ge&&jt(e,"change",e,ot),We&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(ot)}e.display.selForContextMenu=null}function Ca(e,r,R,L,M){var H;L||(L=R),Tt(L,R)<0&&(H=[L,R],R=H[0],L=H[1]),typeof r=="string"&&(r=e.splitLines(r)),Ta(e,{from:R,to:L,text:r,origin:M})}function ys(e,r,R,L){R<e.line?e.line+=L:r<e.line&&(e.line=r,e.ch=0)}function bs(e,r,R,L){for(var M=0;M<e.length;++M){var H=e[M],re=!0;if(H.ranges){H.copied||(H=e[M]=H.deepCopy(),H.copied=!0);for(var le=0;le<H.ranges.length;le++)ys(H.ranges[le].anchor,r,R,L),ys(H.ranges[le].head,r,R,L);continue}for(var ue=0;ue<H.changes.length;++ue){var ge=H.changes[ue];if(R<ge.from.line)ge.from=it(ge.from.line+L,ge.from.ch),ge.to=it(ge.to.line+L,ge.to.ch);else if(r<=ge.to.line){re=!1;break}}re||(e.splice(0,M+1),M=0)}}function _s(e,r){var R=r.from.line,L=r.to.line,M=r.text.length-(L-R)-1;bs(e.done,R,L,M),bs(e.undone,R,L,M)}function Ka(e,r,R,L){var M=r,H=r;return typeof r=="number"?H=J(e,It(e,r)):M=ze(r),M==null?null:(L(H,M)&&e.cm&&oi(e.cm,M,R),H)}function Ha(e){this.lines=e,this.parent=null;for(var r=0,R=0;R<e.length;++R)e[R].parent=this,r+=e[R].height;this.height=r}Ha.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,r){for(var R=e,L=e+r;R<L;++R){var M=this.lines[R];this.height-=M.height,tn(M),jt(M,"delete")}this.lines.splice(e,r)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,r,R){this.height+=R,this.lines=this.lines.slice(0,e).concat(r).concat(this.lines.slice(e));for(var L=0;L<r.length;++L)r[L].parent=this},iterN:function(e,r,R){for(var L=e+r;e<L;++e)if(R(this.lines[e]))return!0}};function za(e){this.children=e;for(var r=0,R=0,L=0;L<e.length;++L){var M=e[L];r+=M.chunkSize(),R+=M.height,M.parent=this}this.size=r,this.height=R,this.parent=null}za.prototype={chunkSize:function(){return this.size},removeInner:function(e,r){this.size-=r;for(var R=0;R<this.children.length;++R){var L=this.children[R],M=L.chunkSize();if(e<M){var H=Math.min(r,M-e),re=L.height;if(L.removeInner(e,H),this.height-=re-L.height,M==H&&(this.children.splice(R--,1),L.parent=null),(r-=H)==0)break;e=0}else e-=M}if(this.size-r<25&&(this.children.length>1||!(this.children[0]instanceof Ha))){var le=[];this.collapse(le),this.children=[new Ha(le)],this.children[0].parent=this}},collapse:function(e){for(var r=0;r<this.children.length;++r)this.children[r].collapse(e)},insertInner:function(e,r,R){this.size+=r.length,this.height+=R;for(var L=0;L<this.children.length;++L){var M=this.children[L],H=M.chunkSize();if(e<=H){if(M.insertInner(e,r,R),M.lines&&M.lines.length>50){for(var re=M.lines.length%25+25,le=re;le<M.lines.length;){var ue=new Ha(M.lines.slice(le,le+=25));M.height-=ue.height,this.children.splice(++L,0,ue),ue.parent=this}M.lines=M.lines.slice(0,re),this.maybeSpill()}break}e-=H}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var r=e.children.splice(e.children.length-5,5),R=new za(r);if(e.parent){e.size-=R.size,e.height-=R.height;var M=K(e.parent.children,e);e.parent.children.splice(M+1,0,R)}else{var L=new za(e.children);L.parent=e,e.children=[L,R],e=L}R.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,r,R){for(var L=0;L<this.children.length;++L){var M=this.children[L],H=M.chunkSize();if(e<H){var re=Math.min(r,H-e);if(M.iterN(e,re,R))return!0;if((r-=re)==0)break;e=0}else e-=H}}};var Ga=function(e,r,R){if(R)for(var L in R)R.hasOwnProperty(L)&&(this[L]=R[L]);this.doc=e,this.node=r};Ga.prototype.clear=function(){var e=this.doc.cm,r=this.line.widgets,R=this.line,L=ze(R);if(L==null||!r)return;for(var M=0;M<r.length;++M)r[M]==this&&r.splice(M--,1);r.length||(R.widgets=null);var H=In(this);Ee(R,Math.max(0,R.height-H)),e&&(Li(e,function(){Es(e,R,-H),oi(e,L,"widget")}),jt(e,"lineWidgetCleared",e,this,L))},Ga.prototype.changed=function(){var e=this,r=this.height,R=this.doc.cm,L=this.line;this.height=null;var M=In(this)-r;if(!M)return;Ci(this.doc,L)||Ee(L,L.height+M),R&&Li(R,function(){R.curOp.forceUpdate=!0,Es(R,L,M),jt(R,"lineWidgetChanged",R,e,ze(L))})},Oe(Ga);function Es(e,r,R){bi(r)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&yo(e,R)}function xl(e,r,R,L){var M=new Ga(e,R,L),H=e.cm;return H&&M.noHScroll&&(H.display.alignWidgets=!0),Ka(e,r,"widget",function(re){var le=re.widgets||(re.widgets=[]);if(M.insertAt==null?le.push(M):le.splice(Math.min(le.length-1,Math.max(0,M.insertAt)),0,M),M.line=re,H&&!Ci(e,re)){var ue=bi(re)<e.scrollTop;Ee(re,re.height+In(M)),ue&&yo(H,M.height),H.curOp.forceUpdate=!0}return!0}),H&&jt(H,"lineWidgetAdded",H,M,typeof r=="number"?r:ze(r)),M}var xs=0,ca=function(e,r){this.lines=[],this.type=r,this.doc=e,this.id=++xs};ca.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,r=e&&!e.curOp;if(r&&va(e),Re(this,"clear")){var R=this.find();R&&jt(this,"clear",R.from,R.to)}for(var L=null,M=null,H=0;H<this.lines.length;++H){var re=this.lines[H],le=Sr(re.markedSpans,this);e&&!this.collapsed?oi(e,ze(re),"text"):e&&(le.to!=null&&(M=ze(re)),le.from!=null&&(L=ze(re))),re.markedSpans=ui(re.markedSpans,le),le.from==null&&this.collapsed&&!Ci(this.doc,re)&&e&&Ee(re,mn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var ue=0;ue<this.lines.length;++ue){var ge=ai(this.lines[ue]),We=Ji(ge);We>e.display.maxLineLength&&(e.display.maxLine=ge,e.display.maxLineLength=We,e.display.maxLineChanged=!0)}L!=null&&e&&this.collapsed&&Mr(e,L,M+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&ds(e.doc)),e&&jt(e,"markerCleared",e,this,L,M),r&&ga(e),this.parent&&this.parent.clear()},ca.prototype.find=function(e,r){e==null&&this.type=="bookmark"&&(e=1);for(var R,L,M=0;M<this.lines.length;++M){var H=this.lines[M],re=Sr(H.markedSpans,this);if(re.from!=null&&(R=it(r?H:ze(H),re.from),e==-1))return R;if(re.to!=null&&(L=it(r?H:ze(H),re.to),e==1))return L}return R&&{from:R,to:L}},ca.prototype.changed=function(){var e=this,r=this.find(-1,!0),R=this,L=this.doc.cm;if(!r||!L)return;Li(L,function(){var M=r.line,H=ze(r.line),re=sr(L,H);if(re&&(Xt(re),L.curOp.selectionChanged=L.curOp.forceUpdate=!0),L.curOp.updateMaxLine=!0,!Ci(R.doc,M)&&R.height!=null){var le=R.height;R.height=null;var ue=In(R)-le;ue&&Ee(M,M.height+ue)}jt(L,"markerChanged",L,e)})},ca.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var r=this.doc.cm.curOp;(!r.maybeHiddenMarkers||K(r.maybeHiddenMarkers,this)==-1)&&(r.maybeUnhiddenMarkers||(r.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ca.prototype.detachLine=function(e){if(this.lines.splice(K(this.lines,e),1),!this.lines.length&&this.doc.cm){var r=this.doc.cm.curOp;(r.maybeHiddenMarkers||(r.maybeHiddenMarkers=[])).push(this)}},Oe(ca);function Oa(e,r,R,L,M){if(L&&L.shared)return Sl(e,r,R,L,M);if(e.cm&&!e.cm.curOp)return Yr(e.cm,Oa)(e,r,R,L,M);var H=new ca(e,M),re=Tt(r,R);if(L&&G(L,H,!1),re>0||re==0&&H.clearWhenEmpty!==!1)return H;if(H.replacedWith&&(H.collapsed=!0,H.widgetNode=A("span",[H.replacedWith],"CodeMirror-widget"),L.handleMouseEvents||H.widgetNode.setAttribute("cm-ignore-events","true"),L.insertLeft&&(H.widgetNode.insertLeft=!0)),H.collapsed){if(na(e,r.line,r,R,H)||r.line!=R.line&&na(e,R.line,r,R,H))throw new Error("Inserting collapsed marker partially overlapping an existing one");Or()}H.addToHistory&&is(e,{from:r,to:R,origin:"markText"},e.sel,NaN);var le=r.line,ue=e.cm,ge;if(e.iter(le,R.line+1,function(Ge){ue&&H.collapsed&&!ue.options.lineWrapping&&ai(Ge)==ue.display.maxLine&&(ge=!0),H.collapsed&&le!=r.line&&Ee(Ge,0),Pr(Ge,new Kr(H,le==r.line?r.ch:null,le==R.line?R.ch:null)),++le}),H.collapsed&&e.iter(r.line,R.line+1,function(Ge){Ci(e,Ge)&&Ee(Ge,0)}),H.clearOnEnter&&ke(H,"beforeCursorEnter",function(){return H.clear()}),H.readOnly&&(yr(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),H.collapsed&&(H.id=++xs,H.atomic=!0),ue){if(ge&&(ue.curOp.updateMaxLine=!0),H.collapsed)Mr(ue,r.line,R.line+1);else if(H.className||H.startStyle||H.endStyle||H.css||H.attributes||H.title)for(var We=r.line;We<=R.line;We++)oi(ue,We,"text");H.atomic&&ds(ue.doc),jt(ue,"markerAdded",ue,H)}return H}var Va=function(e,r){this.markers=e,this.primary=r;for(var R=0;R<e.length;++R)e[R].parent=this};Va.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();jt(this,"clear")},Va.prototype.find=function(e,r){return this.primary.find(e,r)},Oe(Va);function Sl(e,r,R,L,M){L=G(L),L.shared=!1;var H=[Oa(e,r,R,L,M)],re=H[0],le=L.widgetNode;return ua(e,function(ue){le&&(L.widgetNode=le.cloneNode(!0)),H.push(Oa(ue,yt(ue,r),yt(ue,R),L,M));for(var ge=0;ge<ue.linked.length;++ge)if(ue.linked[ge].isParent)return;re=Fe(H)}),new Va(H,re)}function Ss(e){return e.findMarks(it(e.first,0),e.clipPos(it(e.lastLine())),function(r){return r.parent})}function wl(e,r){for(var R=0;R<r.length;R++){var L=r[R],M=L.find(),H=e.clipPos(M.from),re=e.clipPos(M.to);if(Tt(H,re)){var le=Oa(e,H,re,L.primary,L.primary.type);L.markers.push(le),le.parent=L}}}function Tl(e){for(var r=function(L){var M=e[L],H=[M.primary.doc];ua(M.primary.doc,function(ue){return H.push(ue)});for(var re=0;re<M.markers.length;re++){var le=M.markers[re];K(H,le.doc)==-1&&(le.parent=null,M.markers.splice(re--,1))}},R=0;R<e.length;R++)r(R)}var Cl=0,xi=function(e,r,R,L,M){if(!(this instanceof xi))return new xi(e,r,R,L,M);R==null&&(R=0),za.call(this,[new Ha([new hi("",null)])]),this.first=R,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=R;var H=it(R,0);this.sel=sa(H),this.history=new ro(null),this.id=++Cl,this.modeOption=r,this.lineSep=L,this.direction=M=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Co(this,{from:H,to:H,text:e}),si(this,sa(H),oe)};xi.prototype=ve(za.prototype,{constructor:xi,iter:function(e,r,R){R?this.iterN(e-this.first,r-e,R):this.iterN(this.first,this.first+this.size,e)},insert:function(e,r){for(var R=0,L=0;L<r.length;++L)R+=r[L].height;this.insertInner(e-this.first,r,R)},remove:function(e,r){this.removeInner(e-this.first,r)},getValue:function(e){var r=se(this,this.first,this.first+this.size);return e===!1?r:r.join(e||this.lineSeparator())},setValue:$r(function(e){var r=it(this.first,0),R=this.first+this.size-1;Ta(this,{from:r,to:it(R,J(this,R).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&ka(this.cm,0,0),si(this,sa(r),oe)}),replaceRange:function(e,r,R,L){r=yt(this,r),R=R?yt(this,R):r,Ca(this,e,r,R,L)},getRange:function(e,r,R){var L=te(this,yt(this,e),yt(this,r));return R===!1?L:L.join(R||this.lineSeparator())},getLine:function(e){var r=this.getLineHandle(e);return r&&r.text},getLineHandle:function(e){if(St(this,e))return J(this,e)},getLineNumber:function(e){return ze(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=J(this,e)),ai(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return yt(this,e)},getCursor:function(e){var r=this.sel.primary(),R;return e==null||e=="head"?R=r.head:e=="anchor"?R=r.anchor:e=="end"||e=="to"||e===!1?R=r.to():R=r.from(),R},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:$r(function(e,r,R){ls(this,yt(this,typeof e=="number"?it(e,r||0):e),null,R)}),setSelection:$r(function(e,r,R){ls(this,yt(this,e),yt(this,r||e),R)}),extendSelection:$r(function(e,r,R){ao(this,yt(this,e),r&&yt(this,r),R)}),extendSelections:$r(function(e,r){ss(this,mt(this,e),r)}),extendSelectionsBy:$r(function(e,r){var R=De(this.sel.ranges,e);ss(this,mt(this,R),r)}),setSelections:$r(function(e,r,R){if(!e.length)return;for(var L=[],M=0;M<e.length;M++)L[M]=new lr(yt(this,e[M].anchor),yt(this,e[M].head));r==null&&(r=Math.min(e.length-1,this.sel.primIndex)),si(this,Gi(this.cm,L,r),R)}),addSelection:$r(function(e,r,R){var L=this.sel.ranges.slice(0);L.push(new lr(yt(this,e),yt(this,r||e))),si(this,Gi(this.cm,L,L.length-1),R)}),getSelection:function(e){for(var r=this.sel.ranges,R,L=0;L<r.length;L++){var M=te(this,r[L].from(),r[L].to());R=R?R.concat(M):M}return e===!1?R:R.join(e||this.lineSeparator())},getSelections:function(e){for(var r=[],R=this.sel.ranges,L=0;L<R.length;L++){var M=te(this,R[L].from(),R[L].to());e!==!1&&(M=M.join(e||this.lineSeparator())),r[L]=M}return r},replaceSelection:function(e,r,R){for(var L=[],M=0;M<this.sel.ranges.length;M++)L[M]=e;this.replaceSelections(L,r,R||"+input")},replaceSelections:$r(function(e,r,R){for(var L=[],M=this.sel,H=0;H<M.ranges.length;H++){var re=M.ranges[H];L[H]={from:re.from(),to:re.to(),text:this.splitLines(e[H]),origin:R}}for(var le=r&&r!="end"&&hl(this,L,r),ue=L.length-1;ue>=0;ue--)Ta(this,L[ue]);le?us(this,le):this.cm&&Ea(this.cm)}),undo:$r(function(){lo(this,"undo")}),redo:$r(function(){lo(this,"redo")}),undoSelection:$r(function(){lo(this,"undo",!0)}),redoSelection:$r(function(){lo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,r=0,R=0,L=0;L<e.done.length;L++)e.done[L].ranges||++r;for(var M=0;M<e.undone.length;M++)e.undone[M].ranges||++R;return{undo:r,redo:R}},clearHistory:function(){var e=this;this.history=new ro(this.history.maxGeneration),ua(this,function(r){return r.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Sa(this.history.done),undone:Sa(this.history.undone)}},setHistory:function(e){var r=this.history=new ro(this.history.maxGeneration);r.done=Sa(e.done.slice(0),null,!0),r.undone=Sa(e.undone.slice(0),null,!0)},setGutterMarker:$r(function(e,r,R){return Ka(this,e,"gutter",function(L){var M=L.gutterMarkers||(L.gutterMarkers={});return M[r]=R,!R&&Xe(M)&&(L.gutterMarkers=null),!0})}),clearGutter:$r(function(e){var r=this;this.iter(function(R){R.gutterMarkers&&R.gutterMarkers[e]&&Ka(r,R,"gutter",function(){return R.gutterMarkers[e]=null,Xe(R.gutterMarkers)&&(R.gutterMarkers=null),!0})})}),lineInfo:function(e){var r;if(typeof e=="number"){if(!St(this,e))return null;if(r=e,e=J(this,e),!e)return null}else if(r=ze(e),r==null)return null;return{line:r,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:$r(function(e,r,R){return Ka(this,e,r=="gutter"?"gutter":"class",function(L){var M=r=="text"?"textClass":r=="background"?"bgClass":r=="gutter"?"gutterClass":"wrapClass";if(!L[M])L[M]=R;else{if(m(R).test(L[M]))return!1;L[M]+=" "+R}return!0})}),removeLineClass:$r(function(e,r,R){return Ka(this,e,r=="gutter"?"gutter":"class",function(L){var M=r=="text"?"textClass":r=="background"?"bgClass":r=="gutter"?"gutterClass":"wrapClass",H=L[M];if(H)if(R==null)L[M]=null;else{var re=H.match(m(R));if(!re)return!1;var le=re.index+re[0].length;L[M]=H.slice(0,re.index)+(!re.index||le==H.length?"":" ")+H.slice(le)||null}else return!1;return!0})}),addLineWidget:$r(function(e,r,R){return xl(this,e,r,R)}),removeLineWidget:function(e){e.clear()},markText:function(e,r,R){return Oa(this,yt(this,e),yt(this,r),R,R&&R.type||"range")},setBookmark:function(e,r){var R={replacedWith:r&&(r.nodeType==null?r.widget:r),insertLeft:r&&r.insertLeft,clearWhenEmpty:!1,shared:r&&r.shared,handleMouseEvents:r&&r.handleMouseEvents};return e=yt(this,e),Oa(this,e,e,R,"bookmark")},findMarksAt:function(e){e=yt(this,e);var r=[],R=J(this,e.line).markedSpans;if(R)for(var L=0;L<R.length;++L){var M=R[L];(M.from==null||M.from<=e.ch)&&(M.to==null||M.to>=e.ch)&&r.push(M.marker.parent||M.marker)}return r},findMarks:function(e,r,R){e=yt(this,e),r=yt(this,r);var L=[],M=e.line;return this.iter(e.line,r.line+1,function(H){var re=H.markedSpans;if(re)for(var le=0;le<re.length;le++){var ue=re[le];!(ue.to!=null&&M==e.line&&e.ch>=ue.to||ue.from==null&&M!=e.line||ue.from!=null&&M==r.line&&ue.from>=r.ch)&&(!R||R(ue.marker))&&L.push(ue.marker.parent||ue.marker)}++M}),L},getAllMarks:function(){var e=[];return this.iter(function(r){var R=r.markedSpans;if(R)for(var L=0;L<R.length;++L)R[L].from!=null&&e.push(R[L].marker)}),e},posFromIndex:function(e){var r,R=this.first,L=this.lineSeparator().length;return this.iter(function(M){var H=M.text.length+L;if(H>e)return r=e,!0;e-=H,++R}),yt(this,it(R,r))},indexFromPos:function(e){e=yt(this,e);var r=e.ch;if(e.line<this.first||e.ch<0)return 0;var R=this.lineSeparator().length;return this.iter(this.first,e.line,function(L){r+=L.text.length+R}),r},copy:function(e){var r=new xi(se(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return r.scrollTop=this.scrollTop,r.scrollLeft=this.scrollLeft,r.sel=this.sel,r.extend=!1,e&&(r.history.undoDepth=this.history.undoDepth,r.setHistory(this.getHistory())),r},linkedDoc:function(e){e||(e={});var r=this.first,R=this.first+this.size;e.from!=null&&e.from>r&&(r=e.from),e.to!=null&&e.to<R&&(R=e.to);var L=new xi(se(this,r,R),e.mode||this.modeOption,r,this.lineSep,this.direction);return e.sharedHist&&(L.history=this.history),(this.linked||(this.linked=[])).push({doc:L,sharedHist:e.sharedHist}),L.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],wl(L,Ss(this)),L},unlinkDoc:function(e){if(e instanceof Tr&&(e=e.doc),this.linked)for(var r=0;r<this.linked.length;++r){var R=this.linked[r];if(R.doc!=e)continue;this.linked.splice(r,1),e.unlinkDoc(this),Tl(Ss(this));break}if(e.history==this.history){var L=[e.id];ua(e,function(M){return L.push(M.id)},!0),e.history=new ro(null),e.history.done=Sa(this.history.done,L),e.history.undone=Sa(this.history.undone,L)}},iterLinkedDocs:function(e){ua(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):st(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:$r(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(r){return r.order=null}),this.cm&&pl(this.cm)})}),xi.prototype.eachLine=xi.prototype.iter;var ws=0;function Ol(e){var r=this;if(Ts(r),He(r,e)||ir(r.display,e))return;he(e),C&&(ws=+new Date);var R=pi(r,e,!0),L=e.dataTransfer.files;if(!R||r.isReadOnly())return;if(L&&L.length&&window.FileReader&&window.File)for(var M=L.length,H=Array(M),re=0,le=function(){++re==M&&Yr(r,function(){R=yt(r.doc,R);var tt={from:R,to:R,text:r.doc.splitLines(H.filter(function(bt){return bt!=null}).join(r.doc.lineSeparator())),origin:"paste"};Ta(r.doc,tt),us(r.doc,sa(yt(r.doc,R),yt(r.doc,la(tt))))})()},ue=function(tt,bt){if(r.options.allowDropFileTypes&&K(r.options.allowDropFileTypes,tt.type)==-1){le();return}var Ot=new FileReader;Ot.onerror=function(){return le()},Ot.onload=function(){var Mt=Ot.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Mt)){le();return}H[bt]=Mt,le()},Ot.readAsText(tt)},ge=0;ge<L.length;ge++)ue(L[ge],ge);else{if(r.state.draggingText&&r.doc.sel.contains(R)>-1){r.state.draggingText(e),setTimeout(function(){return r.display.input.focus()},20);return}try{var We=e.dataTransfer.getData("Text");if(We){var Ge;if(r.state.draggingText&&!r.state.draggingText.copy&&(Ge=r.listSelections()),oo(r.doc,sa(R,R)),Ge)for(var ot=0;ot<Ge.length;++ot)Ca(r.doc,"",Ge[ot].anchor,Ge[ot].head,"drag");r.replaceSelection(We,"around","paste"),r.display.input.focus()}}catch(tt){}}}function Al(e,r){if(C&&(!e.state.draggingText||+new Date-ws<100)){xe(r);return}if(He(e,r)||ir(e.display,r))return;if(r.dataTransfer.setData("Text",e.getSelection()),r.dataTransfer.effectAllowed="copyMove",r.dataTransfer.setDragImage&&!a){var R=x("img",null,null,"position: fixed; left: 0; top: 0;");R.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",l&&(R.width=R.height=1,e.display.wrapper.appendChild(R),R._top=R.offsetTop),r.dataTransfer.setDragImage(R,0,0),l&&R.parentNode.removeChild(R)}}function Ll(e,r){var R=pi(e,r);if(!R)return;var L=document.createDocumentFragment();fr(e,R,L),e.display.dragCursor||(e.display.dragCursor=x("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),o(e.display.dragCursor,L)}function Ts(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Cs(e){if(!document.getElementsByClassName)return;for(var r=document.getElementsByClassName("CodeMirror"),R=[],L=0;L<r.length;L++){var M=r[L].CodeMirror;M&&R.push(M)}R.length&&R[0].operation(function(){for(var H=0;H<R.length;H++)e(R[H])})}var Os=!1;function Rl(){if(Os)return;Dl(),Os=!0}function Dl(){var e;ke(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Cs(Pl)},100))}),ke(window,"blur",function(){return Cs(Ei)})}function Pl(e){var r=e.display;r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.scrollbarsClipped=!1,e.setSize()}for(var da={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Xa=0;Xa<10;Xa++)da[Xa+48]=da[Xa+96]=String(Xa);for(var uo=65;uo<=90;uo++)da[uo]=String.fromCharCode(uo);for(var Ya=1;Ya<=12;Ya++)da[Ya+111]=da[Ya+63235]="F"+Ya;var ea={};ea.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},ea.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},ea.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},ea.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},ea.default=t?ea.macDefault:ea.pcDefault;function Ml(e){var r=e.split(/-(?!$)/);e=r[r.length-1];for(var R,L,M,H,re=0;re<r.length-1;re++){var le=r[re];if(/^(cmd|meta|m)$/i.test(le))H=!0;else if(/^a(lt)?$/i.test(le))R=!0;else if(/^(c|ctrl|control)$/i.test(le))L=!0;else if(/^s(hift)?$/i.test(le))M=!0;else throw new Error("Unrecognized modifier name: "+le)}return R&&(e="Alt-"+e),L&&(e="Ctrl-"+e),H&&(e="Cmd-"+e),M&&(e="Shift-"+e),e}function kl(e){var r={};for(var R in e)if(e.hasOwnProperty(R)){var L=e[R];if(/^(name|fallthrough|(de|at)tach)$/.test(R))continue;if(L=="..."){delete e[R];continue}for(var M=De(R.split(" "),Ml),H=0;H<M.length;H++){var re=void 0,le=void 0;H==M.length-1?(le=M.join(" "),re=L):(le=M.slice(0,H+1).join(" "),re="...");var ue=r[le];if(!ue)r[le]=re;else if(ue!=re)throw new Error("Inconsistent bindings for "+le)}delete e[R]}for(var ge in r)e[ge]=r[ge];return e}function Aa(e,r,R,L){r=co(r);var M=r.call?r.call(e,L):r[e];if(M===!1)return"nothing";if(M==="...")return"multi";if(M!=null&&R(M))return"handled";if(r.fallthrough){if(Object.prototype.toString.call(r.fallthrough)!="[object Array]")return Aa(e,r.fallthrough,R,L);for(var H=0;H<r.fallthrough.length;H++){var re=Aa(e,r.fallthrough[H],R,L);if(re)return re}}}function As(e){var r=typeof e=="string"?e:da[e.keyCode];return r=="Ctrl"||r=="Alt"||r=="Shift"||r=="Mod"}function Ls(e,r,R){var L=e;return r.altKey&&L!="Alt"&&(e="Alt-"+e),(y?r.metaKey:r.ctrlKey)&&L!="Ctrl"&&(e="Ctrl-"+e),(y?r.ctrlKey:r.metaKey)&&L!="Mod"&&(e="Cmd-"+e),!R&&r.shiftKey&&L!="Shift"&&(e="Shift-"+e),e}function Rs(e,r){if(l&&e.keyCode==34&&e.char)return!1;var R=da[e.keyCode];return R==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(R=e.code),Ls(R,e,r))}function co(e){return typeof e=="string"?ea[e]:e}function La(e,r){for(var R=e.doc.sel.ranges,L=[],M=0;M<R.length;M++){for(var H=r(R[M]);L.length&&Tt(H.from,Fe(L).to)<=0;){var re=L.pop();if(Tt(re.from,H.from)<0){H.from=re.from;break}}L.push(H)}Li(e,function(){for(var le=L.length-1;le>=0;le--)Ca(e.doc,"",L[le].from,L[le].to,"+delete");Ea(e)})}function Ro(e,r,R){var L=N(e.text,r+R,R);return L<0||L>e.text.length?null:L}function Do(e,r,R){var L=Ro(e,r.ch,R);return L==null?null:new it(r.line,L,R<0?"after":"before")}function Po(e,r,R,L,M){if(e){r.doc.direction=="rtl"&&(M=-M);var H=at(R,r.doc.direction);if(H){var re=M<0?Fe(H):H[0],le=M<0==(re.level==1),ue=le?"after":"before",ge;if(re.level>0||r.doc.direction=="rtl"){var We=qn(r,R);ge=M<0?R.text.length-1:0;var Ge=Cn(r,We,ge).top;ge=$(function(ot){return Cn(r,We,ot).top==Ge},M<0==(re.level==1)?re.from:re.to-1,ge),ue=="before"&&(ge=Ro(R,ge,1))}else ge=M<0?re.to:re.from;return new it(L,ge,ue)}}return new it(L,M<0?R.text.length:0,M<0?"before":"after")}function Il(e,r,R,L){var M=at(r,e.doc.direction);if(!M)return Do(r,R,L);R.ch>=r.text.length?(R.ch=r.text.length,R.sticky="before"):R.ch<=0&&(R.ch=0,R.sticky="after");var H=me(M,R.ch,R.sticky),re=M[H];if(e.doc.direction=="ltr"&&re.level%2==0&&(L>0?re.to>R.ch:re.from<R.ch))return Do(r,R,L);var le=function(Wt,Yt){return Ro(r,Wt instanceof it?Wt.ch:Wt,Yt)},ue,ge=function(Wt){return e.options.lineWrapping?(ue=ue||qn(e,r),Mi(e,r,ue,Wt)):{begin:0,end:r.text.length}},We=ge(R.sticky=="before"?le(R,-1):R.ch);if(e.doc.direction=="rtl"||re.level==1){var Ge=re.level==1==L<0,ot=le(R,Ge?1:-1);if(ot!=null&&(Ge?ot<=re.to&&ot<=We.end:ot>=re.from&&ot>=We.begin)){var tt=Ge?"before":"after";return new it(R.line,ot,tt)}}var bt=function(Wt,Yt,Kt){for(var en=function(_r,Jr){return Jr?new it(R.line,le(_r,1),"before"):new it(R.line,_r,"after")};Wt>=0&&Wt<M.length;Wt+=Yt){var bn=M[Wt],dn=Yt>0==(bn.level!=1),Gn=dn?Kt.begin:le(Kt.end,-1);if(bn.from<=Gn&&Gn<bn.to)return en(Gn,dn);if(Gn=dn?bn.from:le(bn.to,-1),Kt.begin<=Gn&&Gn<Kt.end)return en(Gn,dn)}},Ot=bt(H+L,L,We);if(Ot)return Ot;var Mt=L>0?We.end:le(We.begin,-1);return Mt!=null&&!(L>0&&Mt==r.text.length)&&(Ot=bt(L>0?0:M.length-1,L,ge(Mt)),Ot)?Ot:null}var $a={selectAll:ps,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),oe)},killLine:function(e){return La(e,function(r){if(r.empty()){var R=J(e.doc,r.head.line).text.length;return r.head.ch==R&&r.head.line<e.lastLine()?{from:r.head,to:it(r.head.line+1,0)}:{from:r.head,to:it(r.head.line,R)}}else return{from:r.from(),to:r.to()}})},deleteLine:function(e){return La(e,function(r){return{from:it(r.from().line,0),to:yt(e.doc,it(r.to().line+1,0))}})},delLineLeft:function(e){return La(e,function(r){return{from:it(r.from().line,0),to:r.from()}})},delWrappedLineLeft:function(e){return La(e,function(r){var R=e.charCoords(r.head,"div").top+5,L=e.coordsChar({left:0,top:R},"div");return{from:L,to:r.from()}})},delWrappedLineRight:function(e){return La(e,function(r){var R=e.charCoords(r.head,"div").top+5,L=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:R},"div");return{from:r.from(),to:L}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(it(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(it(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(r){return Ds(e,r.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(r){return Ps(e,r.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(r){return Nl(e,r.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(r){var R=e.cursorCoords(r.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:R},"div")},pe)},goLineLeft:function(e){return e.extendSelectionsBy(function(r){var R=e.cursorCoords(r.head,"div").top+5;return e.coordsChar({left:0,top:R},"div")},pe)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(r){var R=e.cursorCoords(r.head,"div").top+5,L=e.coordsChar({left:0,top:R},"div");return L.ch<e.getLine(L.line).search(/\S/)?Ps(e,r.head):L},pe)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var r=[],R=e.listSelections(),L=e.options.tabSize,M=0;M<R.length;M++){var H=R[M].from(),re=X(e.getLine(H.line),H.ch,L);r.push(Te(L-re%L))}e.replaceSelections(r)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Li(e,function(){for(var r=e.listSelections(),R=[],L=0;L<r.length;L++){if(!r[L].empty())continue;var M=r[L].head,H=J(e.doc,M.line).text;if(H){if(M.ch==H.length&&(M=new it(M.line,M.ch-1)),M.ch>0)M=new it(M.line,M.ch+1),e.replaceRange(H.charAt(M.ch-1)+H.charAt(M.ch-2),it(M.line,M.ch-2),M,"+transpose");else if(M.line>e.doc.first){var re=J(e.doc,M.line-1).text;re&&(M=new it(M.line,1),e.replaceRange(H.charAt(0)+e.doc.lineSeparator()+re.charAt(re.length-1),it(M.line-1,re.length-1),M,"+transpose"))}}R.push(new lr(M,M))}e.setSelections(R)})},newlineAndIndent:function(e){return Li(e,function(){for(var r=e.listSelections(),R=r.length-1;R>=0;R--)e.replaceRange(e.doc.lineSeparator(),r[R].anchor,r[R].head,"+input");r=e.listSelections();for(var L=0;L<r.length;L++)e.indentLine(r[L].from().line,null,!0);Ea(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Ds(e,r){var R=J(e.doc,r),L=ai(R);return L!=R&&(r=ze(L)),Po(!0,e,L,r,1)}function Nl(e,r){var R=J(e.doc,r),L=Yi(R);return L!=R&&(r=ze(L)),Po(!0,e,R,r,-1)}function Ps(e,r){var R=Ds(e,r.line),L=J(e.doc,R.line),M=at(L,e.doc.direction);if(!M||M[0].level==0){var H=Math.max(R.ch,L.text.search(/\S/)),re=r.line==R.line&&r.ch<=H&&r.ch;return it(R.line,re?0:H,R.sticky)}return R}function fo(e,r,R){if(typeof r=="string"&&(r=$a[r],!r))return!1;e.display.input.ensurePolled();var L=e.display.shift,M=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),R&&(e.display.shift=!1),M=r(e)!=ie}finally{e.display.shift=L,e.state.suppressEdits=!1}return M}function Ul(e,r,R){for(var L=0;L<e.state.keyMaps.length;L++){var M=Aa(r,e.state.keyMaps[L],R,e);if(M)return M}return e.options.extraKeys&&Aa(r,e.options.extraKeys,R,e)||Aa(r,e.options.keyMap,R,e)}var jl=new Z;function Ja(e,r,R,L){var M=e.state.keySeq;if(M){if(As(r))return"handled";if(/\'$/.test(r)?e.state.keySeq=null:jl.set(50,function(){e.state.keySeq==M&&(e.state.keySeq=null,e.display.input.reset())}),Ms(e,M+" "+r,R,L))return!0}return Ms(e,r,R,L)}function Ms(e,r,R,L){var M=Ul(e,r,L);return M=="multi"&&(e.state.keySeq=r),M=="handled"&&jt(e,"keyHandled",e,r,R),(M=="handled"||M=="multi")&&(he(R),ra(e)),!!M}function ks(e,r){var R=Rs(r,!0);return R?r.shiftKey&&!e.state.keySeq?Ja(e,"Shift-"+R,r,function(L){return fo(e,L,!0)})||Ja(e,R,r,function(L){if(typeof L=="string"?/^go[A-Z]/.test(L):L.motion)return fo(e,L)}):Ja(e,R,r,function(L){return fo(e,L)}):!1}function Fl(e,r,R){return Ja(e,"'"+R+"'",r,function(L){return fo(e,L,!0)})}var Mo=null;function Is(e){var r=this;if(e.target&&e.target!=r.display.input.getField())return;if(r.curOp.focus=I(),He(r,e))return;C&&T<11&&e.keyCode==27&&(e.returnValue=!1);var R=e.keyCode;r.display.shift=R==16||e.shiftKey;var L=ks(r,e);l&&(Mo=L?R:null,!L&&R==88&&!$e&&(t?e.metaKey:e.ctrlKey)&&r.replaceSelection("",null,"cut")),U&&!t&&!L&&R==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),R==18&&!/\bCodeMirror-crosshair\b/.test(r.display.lineDiv.className)&&Bl(r)}function Bl(e){var r=e.display.lineDiv;F(r,"CodeMirror-crosshair");function R(L){(L.keyCode==18||!L.altKey)&&(g(r,"CodeMirror-crosshair"),Ze(document,"keyup",R),Ze(document,"mouseover",R))}ke(document,"keyup",R),ke(document,"mouseover",R)}function Ns(e){e.keyCode==16&&(this.doc.sel.shift=!1),He(this,e)}function Us(e){var r=this;if(e.target&&e.target!=r.display.input.getField())return;if(ir(r.display,e)||He(r,e)||e.ctrlKey&&!e.altKey||t&&e.metaKey)return;var R=e.keyCode,L=e.charCode;if(l&&R==Mo){Mo=null,he(e);return}if(l&&(!e.which||e.which<10)&&ks(r,e))return;var M=String.fromCharCode(L==null?R:L);if(M=="\b")return;if(Fl(r,e,M))return;r.display.input.onKeyPress(e)}var Wl=400,ko=function(e,r,R){this.time=e,this.pos=r,this.button=R};ko.prototype.compare=function(e,r,R){return this.time+Wl>e&&Tt(r,this.pos)==0&&R==this.button};var Qa,qa;function Kl(e,r){var R=+new Date;return qa&&qa.compare(R,e,r)?(Qa=qa=null,"triple"):Qa&&Qa.compare(R,e,r)?(qa=new ko(R,e,r),Qa=null,"double"):(Qa=new ko(R,e,r),qa=null,"single")}function js(e){var r=this,R=r.display;if(He(r,e)||R.activeTouch&&R.input.supportsTouch())return;if(R.input.ensurePolled(),R.shift=e.shiftKey,ir(R,e)){h||(R.scroller.draggable=!1,setTimeout(function(){return R.scroller.draggable=!0},100));return}if(Io(r,e))return;var L=pi(r,e),M=Qe(e),H=L?Kl(L,M):"single";if(window.focus(),M==1&&r.state.selectingText&&r.state.selectingText(e),L&&Hl(r,M,L,H,e))return;M==1?L?Gl(r,L,H,e):Be(e)==R.scroller&&he(e):M==2?(L&&ao(r.doc,L),setTimeout(function(){return R.input.focus()},20)):M==3&&(_?r.display.input.onContextMenu(e):ia(r))}function Hl(e,r,R,L,M){var H="Click";return L=="double"?H="Double"+H:L=="triple"&&(H="Triple"+H),H=(r==1?"Left":r==2?"Middle":"Right")+H,Ja(e,Ls(H,M),M,function(re){if(typeof re=="string"&&(re=$a[re]),!re)return!1;var le=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),le=re(e,R)!=ie}finally{e.state.suppressEdits=!1}return le})}function zl(e,r,R){var L=e.getOption("configureMouse"),M=L?L(e,r,R):{};if(M.unit==null){var H=d?R.shiftKey&&R.metaKey:R.altKey;M.unit=H?"rectangle":r=="single"?"char":r=="double"?"word":"line"}return(M.extend==null||e.doc.extend)&&(M.extend=e.doc.extend||R.shiftKey),M.addNew==null&&(M.addNew=t?R.metaKey:R.ctrlKey),M.moveOnDrag==null&&(M.moveOnDrag=!(t?R.altKey:R.ctrlKey)),M}function Gl(e,r,R,L){C?setTimeout(j(sn,e),0):e.curOp.focus=I();var M=zl(e,R,L),H=e.doc.sel,re;e.options.dragDrop&&rt&&!e.isReadOnly()&&R=="single"&&(re=H.contains(r))>-1&&(Tt((re=H.ranges[re]).from(),r)<0||r.xRel>0)&&(Tt(re.to(),r)>0||r.xRel<0)?Vl(e,L,r,M):Xl(e,L,r,M)}function Vl(e,r,R,L){var M=e.display,H=!1,re=Yr(e,function(ge){h&&(M.scroller.draggable=!1),e.state.draggingText=!1,Ze(M.wrapper.ownerDocument,"mouseup",re),Ze(M.wrapper.ownerDocument,"mousemove",le),Ze(M.scroller,"dragstart",ue),Ze(M.scroller,"drop",re),H||(he(ge),L.addNew||ao(e.doc,R,null,null,L.extend),h&&!a||C&&T==9?setTimeout(function(){M.wrapper.ownerDocument.body.focus({preventScroll:!0}),M.input.focus()},20):M.input.focus())}),le=function(ge){H=H||Math.abs(r.clientX-ge.clientX)+Math.abs(r.clientY-ge.clientY)>=10},ue=function(){return H=!0};h&&(M.scroller.draggable=!0),e.state.draggingText=re,re.copy=!L.moveOnDrag,M.scroller.dragDrop&&M.scroller.dragDrop(),ke(M.wrapper.ownerDocument,"mouseup",re),ke(M.wrapper.ownerDocument,"mousemove",le),ke(M.scroller,"dragstart",ue),ke(M.scroller,"drop",re),ia(e),setTimeout(function(){return M.input.focus()},20)}function Fs(e,r,R){if(R=="char")return new lr(r,r);if(R=="word")return e.findWordAt(r);if(R=="line")return new lr(it(r.line,0),yt(e.doc,it(r.line+1,0)));var L=R(e,r);return new lr(L.from,L.to)}function Xl(e,r,R,L){var M=e.display,H=e.doc;he(r);var re,le,ue=H.sel,ge=ue.ranges;if(L.addNew&&!L.extend?(le=H.sel.contains(R),le>-1?re=ge[le]:re=new lr(R,R)):(re=H.sel.primary(),le=H.sel.primIndex),L.unit=="rectangle")L.addNew||(re=new lr(R,R)),R=pi(e,r,!0,!0),le=-1;else{var We=Fs(e,R,L.unit);L.extend?re=Ao(re,We.anchor,We.head,L.extend):re=We}L.addNew?le==-1?(le=ge.length,si(H,Gi(e,ge.concat([re]),le),{scroll:!1,origin:"*mouse"})):ge.length>1&&ge[le].empty()&&L.unit=="char"&&!L.extend?(si(H,Gi(e,ge.slice(0,le).concat(ge.slice(le+1)),0),{scroll:!1,origin:"*mouse"}),ue=H.sel):Lo(H,le,re,ye):(le=0,si(H,new Ii([re],0),ye),ue=H.sel);var Ge=R;function ot(Kt){if(Tt(Ge,Kt)==0)return;if(Ge=Kt,L.unit=="rectangle"){for(var en=[],bn=e.options.tabSize,dn=X(J(H,R.line).text,R.ch,bn),Gn=X(J(H,Kt.line).text,Kt.ch,bn),_r=Math.min(dn,Gn),Jr=Math.max(dn,Gn),Ar=Math.min(R.line,Kt.line),Ri=Math.min(e.lastLine(),Math.max(R.line,Kt.line));Ar<=Ri;Ar++){var Si=J(H,Ar).text,Br=we(Si,_r,bn);_r==Jr?en.push(new lr(it(Ar,Br),it(Ar,Br))):Si.length>Br&&en.push(new lr(it(Ar,Br),it(Ar,we(Si,Jr,bn))))}en.length||en.push(new lr(R,R)),si(H,Gi(e,ue.ranges.slice(0,le).concat(en),le),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Kt)}else{var wi=re,ti=Fs(e,Kt,L.unit),Vr=wi.anchor,Wr;Tt(ti.anchor,Vr)>0?(Wr=ti.head,Vr=Jt(wi.from(),ti.anchor)):(Wr=ti.anchor,Vr=nn(wi.to(),ti.head));var Dr=ue.ranges.slice(0);Dr[le]=Yl(e,new lr(yt(H,Vr),Wr)),si(H,Gi(e,Dr,le),ye)}}var tt=M.wrapper.getBoundingClientRect(),bt=0;function Ot(Kt){var en=++bt,bn=pi(e,Kt,!0,L.unit=="rectangle");if(!bn)return;if(Tt(bn,Ge)!=0){e.curOp.focus=I(),ot(bn);var dn=zi(M,H);(bn.line>=dn.to||bn.line<dn.from)&&setTimeout(Yr(e,function(){bt==en&&Ot(Kt)}),150)}else{var Gn=Kt.clientY<tt.top?-20:Kt.clientY>tt.bottom?20:0;Gn&&setTimeout(Yr(e,function(){if(bt!=en)return;M.scroller.scrollTop+=Gn,Ot(Kt)}),50)}}function Mt(Kt){e.state.selectingText=!1,bt=Infinity,Kt&&(he(Kt),M.input.focus()),Ze(M.wrapper.ownerDocument,"mousemove",Wt),Ze(M.wrapper.ownerDocument,"mouseup",Yt),H.history.lastSelOrigin=null}var Wt=Yr(e,function(Kt){Kt.buttons===0||!Qe(Kt)?Mt(Kt):Ot(Kt)}),Yt=Yr(e,Mt);e.state.selectingText=Yt,ke(M.wrapper.ownerDocument,"mousemove",Wt),ke(M.wrapper.ownerDocument,"mouseup",Yt)}function Yl(e,r){var R=r.anchor,L=r.head,M=J(e.doc,R.line);if(Tt(R,L)==0&&R.sticky==L.sticky)return r;var H=at(M);if(!H)return r;var re=me(H,R.ch,R.sticky),le=H[re];if(le.from!=R.ch&&le.to!=R.ch)return r;var ue=re+(le.from==R.ch==(le.level!=1)?0:1);if(ue==0||ue==H.length)return r;var ge;if(L.line!=R.line)ge=(L.line-R.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var We=me(H,L.ch,L.sticky),Ge=We-re||(L.ch-R.ch)*(le.level==1?-1:1);We==ue-1||We==ue?ge=Ge<0:ge=Ge>0}var ot=H[ue+(ge?-1:0)],tt=ge==(ot.level==1),bt=tt?ot.from:ot.to,Ot=tt?"after":"before";return R.ch==bt&&R.sticky==Ot?r:new lr(new it(R.line,bt,Ot),L)}function Bs(e,r,R,L){var M,H;if(r.touches)M=r.touches[0].clientX,H=r.touches[0].clientY;else try{M=r.clientX,H=r.clientY}catch(ot){return!1}if(M>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;L&&he(r);var re=e.display,le=re.lineDiv.getBoundingClientRect();if(H>le.bottom||!Re(e,R))return Ce(r);H-=le.top-re.viewOffset;for(var ue=0;ue<e.display.gutterSpecs.length;++ue){var ge=re.gutters.childNodes[ue];if(ge&&ge.getBoundingClientRect().right>=M){var We=qe(e.doc,H),Ge=e.display.gutterSpecs[ue];return Ve(e,R,e,We,Ge.className,r),Ce(r)}}}function Io(e,r){return Bs(e,r,"gutterClick",!0)}function Ws(e,r){if(ir(e.display,r)||$l(e,r))return;if(He(e,r,"contextmenu"))return;_||e.display.input.onContextMenu(r)}function $l(e,r){return Re(e,"gutterContextMenu")?Bs(e,r,"gutterContextMenu",!1):!1}function Ks(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),qt(e)}var Ra={toString:function(){return"CodeMirror.Init"}},Hs={},ho={};function Jl(e){var r=e.optionHandlers;function R(L,M,H,re){e.defaults[L]=M,H&&(r[L]=re?function(le,ue,ge){ge!=Ra&&H(le,ue,ge)}:H)}e.defineOption=R,e.Init=Ra,R("value","",function(L,M){return L.setValue(M)},!0),R("mode",null,function(L,M){L.doc.modeOption=M,To(L)},!0),R("indentUnit",2,To,!0),R("indentWithTabs",!1),R("smartIndent",!0),R("tabSize",4,function(L){Ba(L),qt(L),Mr(L)},!0),R("lineSeparator",null,function(L,M){if(L.doc.lineSep=M,!M)return;var H=[],re=L.doc.first;L.doc.iter(function(ue){for(var ge=0;;){var We=ue.text.indexOf(M,ge);if(We==-1)break;ge=We+M.length,H.push(it(re,We))}re++});for(var le=H.length-1;le>=0;le--)Ca(L.doc,M,H[le],it(H[le].line,H[le].ch+M.length))}),R("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(L,M,H){L.state.specialChars=new RegExp(M.source+(M.test(" ")?"":"| "),"g"),H!=Ra&&L.refresh()}),R("specialCharPlaceholder",or,function(L){return L.refresh()},!0),R("electricChars",!0),R("inputStyle",n?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),R("spellcheck",!1,function(L,M){return L.getInputField().spellcheck=M},!0),R("autocorrect",!1,function(L,M){return L.getInputField().autocorrect=M},!0),R("autocapitalize",!1,function(L,M){return L.getInputField().autocapitalize=M},!0),R("rtlMoveVisually",!v),R("wholeLineUpdateBefore",!0),R("theme","default",function(L){Ks(L),Fa(L)},!0),R("keyMap","default",function(L,M,H){var re=co(M),le=H!=Ra&&co(H);le&&le.detach&&le.detach(L,re),re.attach&&re.attach(L,le||null)}),R("extraKeys",null),R("configureMouse",null),R("lineWrapping",!1,ql,!0),R("gutters",[],function(L,M){L.display.gutterSpecs=So(M,L.options.lineNumbers),Fa(L)},!0),R("fixedGutter",!0,function(L,M){L.display.gutters.style.left=M?Lr(L.display)+"px":"0",L.refresh()},!0),R("coverGutterNextToScrollbar",!1,function(L){return xa(L)},!0),R("scrollbarStyle","native",function(L){Go(L),xa(L),L.display.scrollbars.setScrollTop(L.doc.scrollTop),L.display.scrollbars.setScrollLeft(L.doc.scrollLeft)},!0),R("lineNumbers",!1,function(L,M){L.display.gutterSpecs=So(L.options.gutters,M),Fa(L)},!0),R("firstLineNumber",1,Fa,!0),R("lineNumberFormatter",function(L){return L},Fa,!0),R("showCursorWhenSelecting",!1,Gt,!0),R("resetSelectionOnContextMenu",!0),R("lineWiseCopyCut",!0),R("pasteLinesPerSelection",!0),R("selectionsMayTouch",!1),R("readOnly",!1,function(L,M){M=="nocursor"&&(Ei(L),L.display.input.blur()),L.display.input.readOnlyChanged(M)}),R("screenReaderLabel",null,function(L,M){M=M===""?null:M,L.display.input.screenReaderLabelChanged(M)}),R("disableInput",!1,function(L,M){M||L.display.input.reset()},!0),R("dragDrop",!0,Ql),R("allowDropFileTypes",null),R("cursorBlinkRate",530),R("cursorScrollMargin",0),R("cursorHeight",1,Gt,!0),R("singleCursorHeightPerLine",!0,Gt,!0),R("workTime",100),R("workDelay",100),R("flattenSpans",!0,Ba,!0),R("addModeClass",!1,Ba,!0),R("pollInterval",100),R("undoDepth",200,function(L,M){return L.doc.history.undoDepth=M}),R("historyEventDelay",1250),R("viewportMargin",10,function(L){return L.refresh()},!0),R("maxHighlightLength",1e4,Ba,!0),R("moveInputWithCursor",!0,function(L,M){M||L.display.input.resetPosition()}),R("tabindex",null,function(L,M){return L.display.input.getField().tabIndex=M||""}),R("autofocus",null),R("direction","ltr",function(L,M){return L.doc.setDirection(M)},!0),R("phrases",null)}function Ql(e,r,R){var L=R&&R!=Ra;if(!r!=!L){var M=e.display.dragFunctions,H=r?ke:Ze;H(e.display.scroller,"dragstart",M.start),H(e.display.scroller,"dragenter",M.enter),H(e.display.scroller,"dragover",M.over),H(e.display.scroller,"dragleave",M.leave),H(e.display.scroller,"drop",M.drop)}}function ql(e){e.options.lineWrapping?(F(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(g(e.display.wrapper,"CodeMirror-wrap"),Qi(e)),_i(e),Mr(e),qt(e),setTimeout(function(){return xa(e)},100)}function Tr(e,r){var R=this;if(!(this instanceof Tr))return new Tr(e,r);this.options=r=r?G(r):{},G(Hs,r,!1);var L=r.value;typeof L=="string"?L=new xi(L,r.mode,null,r.lineSeparator,r.direction):r.mode&&(L.modeOption=r.mode),this.doc=L;var M=new Tr.inputStyles[r.inputStyle](this),H=this.display=new dl(e,L,M,r);H.wrapper.CodeMirror=this,Ks(this),r.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Go(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new Z,keySeq:null,specialChars:null},r.autofocus&&!n&&H.input.focus(),C&&T<11&&setTimeout(function(){return R.display.input.reset(!0)},20),Zl(this),Rl(),va(this),this.curOp.forceUpdate=!0,ts(this,L),r.autofocus&&!n||this.hasFocus()?setTimeout(function(){R.hasFocus()&&!R.state.focused&&ha(R)},20):Ei(this);for(var re in ho)ho.hasOwnProperty(re)&&ho[re](this,r[re],Ra);Yo(this),r.finishInit&&r.finishInit(this);for(var le=0;le<No.length;++le)No[le](this);ga(this),h&&r.lineWrapping&&getComputedStyle(H.lineDiv).textRendering=="optimizelegibility"&&(H.lineDiv.style.textRendering="auto")}Tr.defaults=Hs,Tr.optionHandlers=ho;function Zl(e){var r=e.display;ke(r.scroller,"mousedown",Yr(e,js)),C&&T<11?ke(r.scroller,"dblclick",Yr(e,function(ue){if(He(e,ue))return;var ge=pi(e,ue);if(!ge||Io(e,ue)||ir(e.display,ue))return;he(ue);var We=e.findWordAt(ge);ao(e.doc,We.anchor,We.head)})):ke(r.scroller,"dblclick",function(ue){return He(e,ue)||he(ue)}),ke(r.scroller,"contextmenu",function(ue){return Ws(e,ue)}),ke(r.input.getField(),"contextmenu",function(ue){r.scroller.contains(ue.target)||Ws(e,ue)});var R,L={end:0};function M(){r.activeTouch&&(R=setTimeout(function(){return r.activeTouch=null},1e3),L=r.activeTouch,L.end=+new Date)}function H(ue){if(ue.touches.length!=1)return!1;var ge=ue.touches[0];return ge.radiusX<=1&&ge.radiusY<=1}function re(ue,ge){if(ge.left==null)return!0;var We=ge.left-ue.left,Ge=ge.top-ue.top;return We*We+Ge*Ge>20*20}ke(r.scroller,"touchstart",function(ue){if(!He(e,ue)&&!H(ue)&&!Io(e,ue)){r.input.ensurePolled(),clearTimeout(R);var ge=+new Date;r.activeTouch={start:ge,moved:!1,prev:ge-L.end<=300?L:null},ue.touches.length==1&&(r.activeTouch.left=ue.touches[0].pageX,r.activeTouch.top=ue.touches[0].pageY)}}),ke(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),ke(r.scroller,"touchend",function(ue){var ge=r.activeTouch;if(ge&&!ir(r,ue)&&ge.left!=null&&!ge.moved&&new Date-ge.start<300){var We=e.coordsChar(r.activeTouch,"page"),Ge;!ge.prev||re(ge,ge.prev)?Ge=new lr(We,We):!ge.prev.prev||re(ge,ge.prev.prev)?Ge=e.findWordAt(We):Ge=new lr(it(We.line,0),yt(e.doc,it(We.line+1,0))),e.setSelection(Ge.anchor,Ge.head),e.focus(),he(ue)}M()}),ke(r.scroller,"touchcancel",M),ke(r.scroller,"scroll",function(){r.scroller.clientHeight&&(Ia(e,r.scroller.scrollTop),pa(e,r.scroller.scrollLeft,!0),Ve(e,"scroll",e))}),ke(r.scroller,"mousewheel",function(ue){return Qo(e,ue)}),ke(r.scroller,"DOMMouseScroll",function(ue){return Qo(e,ue)}),ke(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(ue){He(e,ue)||xe(ue)},over:function(ue){He(e,ue)||(Ll(e,ue),xe(ue))},start:function(ue){return Al(e,ue)},drop:Yr(e,Ol),leave:function(ue){He(e,ue)||Ts(e)}};var le=r.input.getField();ke(le,"keyup",function(ue){return Ns.call(e,ue)}),ke(le,"keydown",Yr(e,Is)),ke(le,"keypress",Yr(e,Us)),ke(le,"focus",function(ue){return ha(e,ue)}),ke(le,"blur",function(ue){return Ei(e,ue)})}var No=[];Tr.defineInitHook=function(e){return No.push(e)};function Za(e,r,R,L){var M=e.doc,H;R==null&&(R="add"),R=="smart"&&(M.mode.indent?H=xn(e,r).state:R="prev");var re=e.options.tabSize,le=J(M,r),ue=X(le.text,null,re);le.stateAfter&&(le.stateAfter=null);var ge=le.text.match(/^\s*/)[0],We;if(!L&&!/\S/.test(le.text))We=0,R="not";else if(R=="smart"&&(We=M.mode.indent(H,le.text.slice(ge.length),le.text),We==ie||We>150)){if(!L)return;R="prev"}R=="prev"?r>M.first?We=X(J(M,r-1).text,null,re):We=0:R=="add"?We=ue+e.options.indentUnit:R=="subtract"?We=ue-e.options.indentUnit:typeof R=="number"&&(We=ue+R),We=Math.max(0,We);var Ge="",ot=0;if(e.options.indentWithTabs)for(var tt=Math.floor(We/re);tt;--tt)ot+=re,Ge+=" ";if(ot<We&&(Ge+=Te(We-ot)),Ge!=ge)return Ca(M,Ge,it(r,0),it(r,ge.length),"+input"),le.stateAfter=null,!0;for(var bt=0;bt<M.sel.ranges.length;bt++){var Ot=M.sel.ranges[bt];if(Ot.head.line==r&&Ot.head.ch<ge.length){var Mt=it(r,ge.length);Lo(M,bt,new lr(Mt,Mt));break}}}var Vi=null;function po(e){Vi=e}function Uo(e,r,R,L,M){var H=e.doc;e.display.shift=!1,L||(L=H.sel);var re=+new Date-200,le=M=="paste"||e.state.pasteIncoming>re,ue=st(r),ge=null;if(le&&L.ranges.length>1)if(Vi&&Vi.text.join(`
`)==r){if(L.ranges.length%Vi.text.length==0){ge=[];for(var We=0;We<Vi.text.length;We++)ge.push(H.splitLines(Vi.text[We]))}}else ue.length==L.ranges.length&&e.options.pasteLinesPerSelection&&(ge=De(ue,function(Wt){return[Wt]}));for(var Ge=e.curOp.updateInput,ot=L.ranges.length-1;ot>=0;ot--){var tt=L.ranges[ot],bt=tt.from(),Ot=tt.to();tt.empty()&&(R&&R>0?bt=it(bt.line,bt.ch-R):e.state.overwrite&&!le?Ot=it(Ot.line,Math.min(J(H,Ot.line).text.length,Ot.ch+Fe(ue).length)):le&&Vi&&Vi.lineWise&&Vi.text.join(`
`)==ue.join(`
`)&&(bt=Ot=it(bt.line,0)));var Mt={from:bt,to:Ot,text:ge?ge[ot%ge.length]:ue,origin:M||(le?"paste":e.state.cutIncoming>re?"cut":"+input")};Ta(e.doc,Mt),jt(e,"inputRead",e,Mt)}r&&!le&&Gs(e,r),Ea(e),e.curOp.updateInput<2&&(e.curOp.updateInput=Ge),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function zs(e,r){var R=e.clipboardData&&e.clipboardData.getData("Text");if(R)return e.preventDefault(),!r.isReadOnly()&&!r.options.disableInput&&Li(r,function(){return Uo(r,R,0,null,"paste")}),!0}function Gs(e,r){if(!e.options.electricChars||!e.options.smartIndent)return;for(var R=e.doc.sel,L=R.ranges.length-1;L>=0;L--){var M=R.ranges[L];if(M.head.ch>100||L&&R.ranges[L-1].head.line==M.head.line)continue;var H=e.getModeAt(M.head),re=!1;if(H.electricChars){for(var le=0;le<H.electricChars.length;le++)if(r.indexOf(H.electricChars.charAt(le))>-1){re=Za(e,M.head.line,"smart");break}}else H.electricInput&&(H.electricInput.test(J(e.doc,M.head.line).text.slice(0,M.head.ch))&&(re=Za(e,M.head.line,"smart")));re&&jt(e,"electricInput",e,M.head.line)}}function Vs(e){for(var r=[],R=[],L=0;L<e.doc.sel.ranges.length;L++){var M=e.doc.sel.ranges[L].head.line,H={anchor:it(M,0),head:it(M+1,0)};R.push(H),r.push(e.getRange(H.anchor,H.head))}return{text:r,ranges:R}}function Xs(e,r,R,L){e.setAttribute("autocorrect",R?"":"off"),e.setAttribute("autocapitalize",L?"":"off"),e.setAttribute("spellcheck",!!r)}function Ys(){var e=x("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),r=x("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return h?e.style.width="1000px":e.setAttribute("wrap","off"),u&&(e.style.border="1px solid black"),Xs(e),r}function eu(e){var r=e.optionHandlers,R=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(L,M){var H=this.options,re=H[L];if(H[L]==M&&L!="mode")return;H[L]=M,r.hasOwnProperty(L)&&Yr(this,r[L])(this,M,re),Ve(this,"optionChange",this,L)},getOption:function(L){return this.options[L]},getDoc:function(){return this.doc},addKeyMap:function(L,M){this.state.keyMaps[M?"push":"unshift"](co(L))},removeKeyMap:function(L){for(var M=this.state.keyMaps,H=0;H<M.length;++H)if(M[H]==L||M[H].name==L)return M.splice(H,1),!0},addOverlay:mi(function(L,M){var H=L.token?L:e.getMode(this.options,L);if(H.startState)throw new Error("Overlays may not be stateful.");Me(this.state.overlays,{mode:H,modeSpec:L,opaque:M&&M.opaque,priority:M&&M.priority||0},function(re){return re.priority}),this.state.modeGen++,Mr(this)}),removeOverlay:mi(function(L){for(var M=this.state.overlays,H=0;H<M.length;++H){var re=M[H].modeSpec;if(re==L||typeof L=="string"&&re.name==L){M.splice(H,1),this.state.modeGen++,Mr(this);return}}}),indentLine:mi(function(L,M,H){typeof M!="string"&&typeof M!="number"&&(M==null?M=this.options.smartIndent?"smart":"prev":M=M?"add":"subtract"),St(this.doc,L)&&Za(this,L,M,H)}),indentSelection:mi(function(L){for(var M=this.doc.sel.ranges,H=-1,re=0;re<M.length;re++){var le=M[re];if(le.empty())le.head.line>H&&(Za(this,le.head.line,L,!0),H=le.head.line,re==this.doc.sel.primIndex&&Ea(this));else{var ue=le.from(),ge=le.to(),We=Math.max(H,ue.line);H=Math.min(this.lastLine(),ge.line-(ge.ch?0:1))+1;for(var Ge=We;Ge<H;++Ge)Za(this,Ge,L);var ot=this.doc.sel.ranges;ue.ch==0&&M.length==ot.length&&ot[re].from().ch>0&&Lo(this.doc,re,new lr(ue,ot[re].to()),oe)}}}),getTokenAt:function(L,M){return Nr(this,L,M)},getLineTokens:function(L,M){return Nr(this,it(L),M,!0)},getTokenTypeAt:function(L){L=yt(this.doc,L);var M=rr(this,J(this.doc,L.line)),H=0,re=(M.length-1)/2,le=L.ch,ue;if(le==0)ue=M[2];else for(;;){var ge=H+re>>1;if((ge?M[ge*2-1]:0)>=le)re=ge;else if(M[ge*2+1]<le)H=ge+1;else{ue=M[ge*2+2];break}}var We=ue?ue.indexOf("overlay "):-1;return We<0?ue:We==0?null:ue.slice(0,We-1)},getModeAt:function(L){var M=this.doc.mode;return M.innerMode?e.innerMode(M,this.getTokenAt(L).state).mode:M},getHelper:function(L,M){return this.getHelpers(L,M)[0]},getHelpers:function(L,M){var H=[];if(!R.hasOwnProperty(M))return H;var re=R[M],le=this.getModeAt(L);if(typeof le[M]=="string")re[le[M]]&&H.push(re[le[M]]);else if(le[M])for(var ue=0;ue<le[M].length;ue++){var ge=re[le[M][ue]];ge&&H.push(ge)}else le.helperType&&re[le.helperType]?H.push(re[le.helperType]):re[le.name]&&H.push(re[le.name]);for(var We=0;We<re._global.length;We++){var Ge=re._global[We];Ge.pred(le,this)&&K(H,Ge.val)==-1&&H.push(Ge.val)}return H},getStateAfter:function(L,M){var H=this.doc;return L=It(H,L==null?H.first+H.size-1:L),xn(this,L+1,M).state},cursorCoords:function(L,M){var H,re=this.doc.sel.primary();return L==null?H=re.head:typeof L=="object"?H=yt(this.doc,L):H=L?re.from():re.to(),$n(this,H,M||"page")},charCoords:function(L,M){return Yn(this,yt(this.doc,L),M||"page")},coordsChar:function(L,M){return L=ar(this,L,M||"page"),Ai(this,L.left,L.top)},lineAtHeight:function(L,M){return L=ar(this,{top:L,left:0},M||"page").top,qe(this.doc,L+this.display.viewOffset)},heightAtLine:function(L,M,H){var re=!1,le;if(typeof L=="number"){var ue=this.doc.first+this.doc.size-1;L<this.doc.first?L=this.doc.first:L>ue&&(L=ue,re=!0),le=J(this.doc,L)}else le=L;return gn(this,le,{top:0,left:0},M||"page",H||re).top+(re?this.doc.height-bi(le):0)},defaultTextHeight:function(){return mn(this.display)},defaultCharWidth:function(){return jn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(L,M,H,re,le){var ue=this.display;L=$n(this,yt(this.doc,L));var ge=L.bottom,We=L.left;if(M.style.position="absolute",M.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(M),ue.sizer.appendChild(M),re=="over")ge=L.top;else if(re=="above"||re=="near"){var Ge=Math.max(ue.wrapper.clientHeight,this.doc.height),ot=Math.max(ue.sizer.clientWidth,ue.lineSpace.clientWidth);(re=="above"||L.bottom+M.offsetHeight>Ge)&&L.top>M.offsetHeight?ge=L.top-M.offsetHeight:L.bottom+M.offsetHeight<=Ge&&(ge=L.bottom),We+M.offsetWidth>ot&&(We=ot-M.offsetWidth)}M.style.top=ge+"px",M.style.left=M.style.right="",le=="right"?(We=ue.sizer.clientWidth-M.offsetWidth,M.style.right="0px"):(le=="left"?We=0:le=="middle"&&(We=(ue.sizer.clientWidth-M.offsetWidth)/2),M.style.left=We+"px"),H&&go(this,{left:We,top:ge,right:We+M.offsetWidth,bottom:ge+M.offsetHeight})},triggerOnKeyDown:mi(Is),triggerOnKeyPress:mi(Us),triggerOnKeyUp:Ns,triggerOnMouseDown:mi(js),execCommand:function(L){if($a.hasOwnProperty(L))return $a[L].call(null,this)},triggerElectric:mi(function(L){Gs(this,L)}),findPosH:function(L,M,H,re){var le=1;M<0&&(le=-1,M=-M);for(var ue=yt(this.doc,L),ge=0;ge<M&&!(ue=jo(this.doc,ue,le,H,re),ue.hitSide);++ge);return ue},moveH:mi(function(L,M){var H=this;this.extendSelectionsBy(function(re){return H.display.shift||H.doc.extend||re.empty()?jo(H.doc,re.head,L,M,H.options.rtlMoveVisually):L<0?re.from():re.to()},pe)}),deleteH:mi(function(L,M){var H=this.doc.sel,re=this.doc;H.somethingSelected()?re.replaceSelection("",null,"+delete"):La(this,function(le){var ue=jo(re,le.head,L,M,!1);return L<0?{from:ue,to:le.head}:{from:le.head,to:ue}})}),findPosV:function(L,M,H,re){var le=1,ue=re;M<0&&(le=-1,M=-M);for(var ge=yt(this.doc,L),We=0;We<M;++We){var Ge=$n(this,ge,"div");if(ue==null?ue=Ge.left:Ge.left=ue,ge=$s(this,Ge,le,H),ge.hitSide)break}return ge},moveV:mi(function(L,M){var H=this,re=this.doc,le=[],ue=!this.display.shift&&!re.extend&&re.sel.somethingSelected();if(re.extendSelectionsBy(function(We){if(ue)return L<0?We.from():We.to();var Ge=$n(H,We.head,"div");We.goalColumn!=null&&(Ge.left=We.goalColumn),le.push(Ge.left);var ot=$s(H,Ge,L,M);return M=="page"&&We==re.sel.primary()&&yo(H,Yn(H,ot,"div").top-Ge.top),ot},pe),le.length)for(var ge=0;ge<re.sel.ranges.length;ge++)re.sel.ranges[ge].goalColumn=le[ge]}),findWordAt:function(L){var M=this.doc,H=J(M,L.line).text,re=L.ch,le=L.ch;if(H){var ue=this.getHelper(L,"wordChars");(L.sticky=="before"||le==H.length)&&re?--re:++le;for(var ge=H.charAt(re),We=Ne(ge,ue)?function(Ge){return Ne(Ge,ue)}:/\s/.test(ge)?function(Ge){return/\s/.test(Ge)}:function(Ge){return!/\s/.test(Ge)&&!Ne(Ge)};re>0&&We(H.charAt(re-1));)--re;for(;le<H.length&&We(H.charAt(le));)++le}return new lr(it(L.line,re),it(L.line,le))},toggleOverwrite:function(L){if(L!=null&&L==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?F(this.display.cursorDiv,"CodeMirror-overwrite"):g(this.display.cursorDiv,"CodeMirror-overwrite"),Ve(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==I()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:mi(function(L,M){ka(this,L,M)}),getScrollInfo:function(){var L=this.display.scroller;return{left:L.scrollLeft,top:L.scrollTop,height:L.scrollHeight-er(this)-this.display.barHeight,width:L.scrollWidth-er(this)-this.display.barWidth,clientHeight:Qn(this),clientWidth:Dn(this)}},scrollIntoView:mi(function(L,M){L==null?(L={from:this.doc.sel.primary().head,to:null},M==null&&(M=this.options.cursorScrollMargin)):typeof L=="number"?L={from:it(L,0),to:null}:L.from==null&&(L={from:L,to:null}),L.to||(L.to=L.from),L.margin=M||0,L.from.line!=null?Qs(this,L):Wo(this,L.from,L.to,L.margin)}),setSize:mi(function(L,M){var H=this,re=function(ue){return typeof ue=="number"||/^\d+$/.test(String(ue))?ue+"px":ue};L!=null&&(this.display.wrapper.style.width=re(L)),M!=null&&(this.display.wrapper.style.height=re(M)),this.options.lineWrapping&&hn(this);var le=this.display.viewFrom;this.doc.iter(le,this.display.viewTo,function(ue){if(ue.widgets){for(var ge=0;ge<ue.widgets.length;ge++)if(ue.widgets[ge].noHScroll){oi(H,le,"widget");break}}++le}),this.curOp.forceUpdate=!0,Ve(this,"refresh",this)}),operation:function(L){return Li(this,L)},startOperation:function(){return va(this)},endOperation:function(){return ga(this)},refresh:mi(function(){var L=this.display.cachedTextHeight;Mr(this),this.curOp.forceUpdate=!0,qt(this),ka(this,this.doc.scrollLeft,this.doc.scrollTop),Eo(this.display),(L==null||Math.abs(L-mn(this.display))>.5||this.options.lineWrapping)&&_i(this),Ve(this,"refresh",this)}),swapDoc:mi(function(L){var M=this.doc;return M.cm=null,this.state.selectingText&&this.state.selectingText(),ts(this,L),qt(this),this.display.input.reset(),ka(this,L.scrollLeft,L.scrollTop),this.curOp.forceScroll=!0,jt(this,"swapDoc",this,M),M}),phrase:function(L){var M=this.options.phrases;return M&&Object.prototype.hasOwnProperty.call(M,L)?M[L]:L},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}},Oe(e),e.registerHelper=function(L,M,H){R.hasOwnProperty(L)||(R[L]=e[L]={_global:[]}),R[L][M]=H},e.registerGlobalHelper=function(L,M,H,re){e.registerHelper(L,M,re),R[L]._global.push({pred:H,val:re})}}function jo(e,r,R,L,M){var H=r,re=R,le=J(e,r.line),ue=M&&e.direction=="rtl"?-R:R;function ge(){var Yt=r.line+ue;return Yt<e.first||Yt>=e.first+e.size?!1:(r=new it(Yt,r.ch,r.sticky),le=J(e,Yt))}function We(Yt){var Kt;if(L=="codepoint"){var en=le.text.charCodeAt(r.ch+(L>0?0:-1));isNaN(en)?Kt=null:Kt=new it(r.line,Math.max(0,Math.min(le.text.length,r.ch+R*(en>=55296&&en<56320?2:1))),-R)}else M?Kt=Il(e.cm,le,r,R):Kt=Do(le,r,R);if(Kt==null)if(!Yt&&ge())r=Po(M,e.cm,le,r.line,ue);else return!1;else r=Kt;return!0}if(L=="char"||L=="codepoint")We();else if(L=="column")We(!0);else if(L=="word"||L=="group")for(var Ge=null,ot=L=="group",tt=e.cm&&e.cm.getHelper(r,"wordChars"),bt=!0;!(R<0&&!We(!bt));bt=!1){var Ot=le.text.charAt(r.ch)||`
`,Mt=Ne(Ot,tt)?"w":ot&&Ot==`
`?"n":!ot||/\s/.test(Ot)?null:"p";if(ot&&!bt&&!Mt&&(Mt="s"),Ge&&Ge!=Mt){R<0&&(R=1,We(),r.sticky="after");break}if(Mt&&(Ge=Mt),R>0&&!We(!bt))break}var Wt=so(e,r,H,re,!0);return Qt(H,Wt)&&(Wt.hitSide=!0),Wt}function $s(e,r,R,L){var M=e.doc,H=r.left,re;if(L=="page"){var le=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ue=Math.max(le-.5*mn(e.display),3);re=(R>0?r.bottom:r.top)+R*ue}else L=="line"&&(re=R>0?r.bottom+3:r.top-3);for(var ge;!(ge=Ai(e,H,re),!ge.outside);){if(R<0?re<=0:re>=M.height){ge.hitSide=!0;break}re+=R*5}return ge}var hr=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Z,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};hr.prototype.init=function(e){var r=this,R=this,L=R.cm,M=R.div=e.lineDiv;Xs(M,L.options.spellcheck,L.options.autocorrect,L.options.autocapitalize);function H(le){for(var ue=le.target;ue;ue=ue.parentNode){if(ue==M)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ue.className))break}return!1}ke(M,"paste",function(le){if(!H(le)||He(L,le)||zs(le,L))return;T<=11&&setTimeout(Yr(L,function(){return r.updateFromDOM()}),20)}),ke(M,"compositionstart",function(le){r.composing={data:le.data,done:!1}}),ke(M,"compositionupdate",function(le){r.composing||(r.composing={data:le.data,done:!1})}),ke(M,"compositionend",function(le){r.composing&&(le.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),ke(M,"touchstart",function(){return R.forceCompositionEnd()}),ke(M,"input",function(){r.composing||r.readFromDOMSoon()});function re(le){if(!H(le)||He(L,le))return;if(L.somethingSelected())po({lineWise:!1,text:L.getSelections()}),le.type=="cut"&&L.replaceSelection("",null,"cut");else if(L.options.lineWiseCopyCut){var ue=Vs(L);po({lineWise:!0,text:ue.text}),le.type=="cut"&&L.operation(function(){L.setSelections(ue.ranges,0,oe),L.replaceSelection("",null,"cut")})}else return;if(le.clipboardData){le.clipboardData.clearData();var ge=Vi.text.join(`
`);if(le.clipboardData.setData("Text",ge),le.clipboardData.getData("Text")==ge){le.preventDefault();return}}var We=Ys(),Ge=We.firstChild;L.display.lineSpace.insertBefore(We,L.display.lineSpace.firstChild),Ge.value=Vi.text.join(`
`);var ot=document.activeElement;ne(Ge),setTimeout(function(){L.display.lineSpace.removeChild(We),ot.focus(),ot==M&&R.showPrimarySelection()},50)}ke(M,"copy",re),ke(M,"cut",re)},hr.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},hr.prototype.prepareSelection=function(){var e=An(this.cm,!1);return e.focus=document.activeElement==this.div,e},hr.prototype.showSelection=function(e,r){if(!e||!this.cm.display.view.length)return;(e.focus||r)&&this.showPrimarySelection(),this.showMultipleSelections(e)},hr.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},hr.prototype.showPrimarySelection=function(){var e=this.getSelection(),r=this.cm,R=r.doc.sel.primary(),L=R.from(),M=R.to();if(r.display.viewTo==r.display.viewFrom||L.line>=r.display.viewTo||M.line<r.display.viewFrom){e.removeAllRanges();return}var H=mo(r,e.anchorNode,e.anchorOffset),re=mo(r,e.focusNode,e.focusOffset);if(H&&!H.bad&&re&&!re.bad&&Tt(Jt(H,re),L)==0&&Tt(nn(H,re),M)==0)return;var le=r.display.view,ue=L.line>=r.display.viewFrom&&Js(r,L)||{node:le[0].measure.map[2],offset:0},ge=M.line<r.display.viewTo&&Js(r,M);if(!ge){var We=le[le.length-1].measure,Ge=We.maps?We.maps[We.maps.length-1]:We.map;ge={node:Ge[Ge.length-1],offset:Ge[Ge.length-2]-Ge[Ge.length-3]}}if(!ue||!ge){e.removeAllRanges();return}var ot=e.rangeCount&&e.getRangeAt(0),tt;try{tt=O(ue.node,ue.offset,ge.offset,ge.node)}catch(bt){}tt&&(!U&&r.state.focused?(e.collapse(ue.node,ue.offset),tt.collapsed||(e.removeAllRanges(),e.addRange(tt))):(e.removeAllRanges(),e.addRange(tt)),ot&&e.anchorNode==null?e.addRange(ot):U&&this.startGracePeriod()),this.rememberSelection()},hr.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},hr.prototype.showMultipleSelections=function(e){o(this.cm.display.cursorDiv,e.cursors),o(this.cm.display.selectionDiv,e.selection)},hr.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},hr.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var r=e.getRangeAt(0).commonAncestorContainer;return D(this.div,r)},hr.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},hr.prototype.blur=function(){this.div.blur()},hr.prototype.getField=function(){return this.div},hr.prototype.supportsTouch=function(){return!0},hr.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Li(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function r(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,r))}this.polling.set(this.cm.options.pollInterval,r)},hr.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},hr.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),r=this.cm;if(i&&f&&this.cm.display.gutterSpecs.length&&tu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var R=mo(r,e.anchorNode,e.anchorOffset),L=mo(r,e.focusNode,e.focusOffset);R&&L&&Li(r,function(){si(r.doc,sa(R,L),oe),(R.bad||L.bad)&&(r.curOp.selectionChanged=!0)})},hr.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,r=e.display,R=e.doc.sel.primary(),L=R.from(),M=R.to();if(L.ch==0&&L.line>e.firstLine()&&(L=it(L.line-1,J(e.doc,L.line-1).length)),M.ch==J(e.doc,M.line).text.length&&M.line<e.lastLine()&&(M=it(M.line+1,0)),L.line<r.viewFrom||M.line>r.viewTo-1)return!1;var H,re,le;L.line==r.viewFrom||(H=Gr(e,L.line))==0?(re=ze(r.view[0].line),le=r.view[0].node):(re=ze(r.view[H].line),le=r.view[H-1].node.nextSibling);var ue=Gr(e,M.line),ge,We;if(ue==r.view.length-1?(ge=r.viewTo-1,We=r.lineDiv.lastChild):(ge=ze(r.view[ue+1].line)-1,We=r.view[ue+1].node.previousSibling),!le)return!1;for(var Ge=e.doc.splitLines(nu(e,le,We,re,ge)),ot=te(e.doc,it(re,0),it(ge,J(e.doc,ge).text.length));Ge.length>1&&ot.length>1;)if(Fe(Ge)==Fe(ot))Ge.pop(),ot.pop(),ge--;else if(Ge[0]==ot[0])Ge.shift(),ot.shift(),re++;else break;for(var tt=0,bt=0,Ot=Ge[0],Mt=ot[0],Wt=Math.min(Ot.length,Mt.length);tt<Wt&&Ot.charCodeAt(tt)==Mt.charCodeAt(tt);)++tt;for(var Yt=Fe(Ge),Kt=Fe(ot),en=Math.min(Yt.length-(Ge.length==1?tt:0),Kt.length-(ot.length==1?tt:0));bt<en&&Yt.charCodeAt(Yt.length-bt-1)==Kt.charCodeAt(Kt.length-bt-1);)++bt;if(Ge.length==1&&ot.length==1&&re==L.line)for(;tt&&tt>L.ch&&Yt.charCodeAt(Yt.length-bt-1)==Kt.charCodeAt(Kt.length-bt-1);)tt--,bt++;Ge[Ge.length-1]=Yt.slice(0,Yt.length-bt).replace(/^\u200b+/,""),Ge[0]=Ge[0].slice(tt).replace(/\u200b+$/,"");var bn=it(re,tt),dn=it(ge,ot.length?Fe(ot).length-bt:0);if(Ge.length>1||Ge[0]||Tt(bn,dn))return Ca(e.doc,Ge,bn,dn,"+input"),!0},hr.prototype.ensurePolled=function(){this.forceCompositionEnd()},hr.prototype.reset=function(){this.forceCompositionEnd()},hr.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},hr.prototype.readFromDOMSoon=function(){var e=this;if(this.readDOMTimeout!=null)return;this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80)},hr.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Li(this.cm,function(){return Mr(e.cm)})},hr.prototype.setUneditable=function(e){e.contentEditable="false"},hr.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Yr(this.cm,Uo)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},hr.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},hr.prototype.onContextMenu=function(){},hr.prototype.resetPosition=function(){},hr.prototype.needsContentAttribute=!0;function Js(e,r){var R=sr(e,r.line);if(!R||R.hidden)return null;var L=J(e.doc,r.line),M=Ut(R,L,r.line),H=at(L,e.doc.direction),re="left";if(H){var le=me(H,r.ch);re=le%2?"right":"left"}var ue=on(M.map,r.ch,re);return ue.offset=ue.collapse=="right"?ue.end:ue.start,ue}function tu(e){for(var r=e;r;r=r.parentNode)if(/CodeMirror-gutter-wrapper/.test(r.className))return!0;return!1}function Da(e,r){return r&&(e.bad=!0),e}function nu(e,r,R,L,M){var H="",re=!1,le=e.doc.lineSeparator(),ue=!1;function ge(tt){return function(bt){return bt.id==tt}}function We(){re&&(H+=le,ue&&(H+=le),re=ue=!1)}function Ge(tt){tt&&(We(),H+=tt)}function ot(tt){if(tt.nodeType==1){var bt=tt.getAttribute("cm-text");if(bt){Ge(bt);return}var Ot=tt.getAttribute("cm-marker"),Mt;if(Ot){var Wt=e.findMarks(it(L,0),it(M+1,0),ge(+Ot));Wt.length&&(Mt=Wt[0].find(0))&&Ge(te(e.doc,Mt.from,Mt.to).join(le));return}if(tt.getAttribute("contenteditable")=="false")return;var Yt=/^(pre|div|p|li|table|br)$/i.test(tt.nodeName);if(!/^br$/i.test(tt.nodeName)&&tt.textContent.length==0)return;Yt&&We();for(var Kt=0;Kt<tt.childNodes.length;Kt++)ot(tt.childNodes[Kt]);/^(pre|p)$/i.test(tt.nodeName)&&(ue=!0),Yt&&(re=!0)}else tt.nodeType==3&&Ge(tt.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(ot(r),r==R);)r=r.nextSibling,ue=!1;return H}function mo(e,r,R){var L;if(r==e.display.lineDiv){if(L=e.display.lineDiv.childNodes[R],!L)return Da(e.clipPos(it(e.display.viewTo-1)),!0);r=null,R=0}else for(L=r;;L=L.parentNode){if(!L||L==e.display.lineDiv)return null;if(L.parentNode&&L.parentNode==e.display.lineDiv)break}for(var M=0;M<e.display.view.length;M++){var H=e.display.view[M];if(H.node==L)return ru(H,r,R)}}function ru(e,r,R){var L=e.text.firstChild,M=!1;if(!r||!D(L,r))return Da(it(ze(e.line),0),!0);if(r==L&&(M=!0,r=L.childNodes[R],R=0,!r)){var H=e.rest?Fe(e.rest):e.line;return Da(it(ze(H),H.text.length),M)}var re=r.nodeType==3?r:null,le=r;for(!re&&r.childNodes.length==1&&r.firstChild.nodeType==3&&(re=r.firstChild,R&&(R=re.nodeValue.length));le.parentNode!=L;)le=le.parentNode;var ue=e.measure,ge=ue.maps;function We(Mt,Wt,Yt){for(var Kt=-1;Kt<(ge?ge.length:0);Kt++)for(var en=Kt<0?ue.map:ge[Kt],bn=0;bn<en.length;bn+=3){var dn=en[bn+2];if(dn==Mt||dn==Wt){var Gn=ze(Kt<0?e.line:e.rest[Kt]),_r=en[bn]+Yt;return(Yt<0||dn!=Mt)&&(_r=en[bn+(Yt?1:0)]),it(Gn,_r)}}}var Ge=We(re,le,R);if(Ge)return Da(Ge,M);for(var ot=le.nextSibling,tt=re?re.nodeValue.length-R:0;ot;ot=ot.nextSibling){if(Ge=We(ot,ot.firstChild,0),Ge)return Da(it(Ge.line,Ge.ch-tt),M);tt+=ot.textContent.length}for(var bt=le.previousSibling,Ot=R;bt;bt=bt.previousSibling){if(Ge=We(bt,bt.firstChild,-1),Ge)return Da(it(Ge.line,Ge.ch+Ot),M);Ot+=bt.textContent.length}}var Ir=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Z,this.hasSelection=!1,this.composing=null};Ir.prototype.init=function(e){var r=this,R=this,L=this.cm;this.createField(e);var M=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),u&&(M.style.width="0px"),ke(M,"input",function(){C&&T>=9&&r.hasSelection&&(r.hasSelection=null),R.poll()}),ke(M,"paste",function(re){if(He(L,re)||zs(re,L))return;L.state.pasteIncoming=+new Date,R.fastPoll()});function H(re){if(He(L,re))return;if(L.somethingSelected())po({lineWise:!1,text:L.getSelections()});else if(L.options.lineWiseCopyCut){var le=Vs(L);po({lineWise:!0,text:le.text}),re.type=="cut"?L.setSelections(le.ranges,null,oe):(R.prevInput="",M.value=le.text.join(`
`),ne(M))}else return;re.type=="cut"&&(L.state.cutIncoming=+new Date)}ke(M,"cut",H),ke(M,"copy",H),ke(e.scroller,"paste",function(re){if(ir(e,re)||He(L,re))return;if(!M.dispatchEvent){L.state.pasteIncoming=+new Date,R.focus();return}var le=new Event("paste");le.clipboardData=re.clipboardData,M.dispatchEvent(le)}),ke(e.lineSpace,"selectstart",function(re){ir(e,re)||he(re)}),ke(M,"compositionstart",function(){var re=L.getCursor("from");R.composing&&R.composing.range.clear(),R.composing={start:re,range:L.markText(re,L.getCursor("to"),{className:"CodeMirror-composing"})}}),ke(M,"compositionend",function(){R.composing&&(R.poll(),R.composing.range.clear(),R.composing=null)})},Ir.prototype.createField=function(e){this.wrapper=Ys(),this.textarea=this.wrapper.firstChild},Ir.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Ir.prototype.prepareSelection=function(){var e=this.cm,r=e.display,R=e.doc,L=An(e);if(e.options.moveInputWithCursor){var M=$n(e,R.sel.primary().head,"div"),H=r.wrapper.getBoundingClientRect(),re=r.lineDiv.getBoundingClientRect();L.teTop=Math.max(0,Math.min(r.wrapper.clientHeight-10,M.top+re.top-H.top)),L.teLeft=Math.max(0,Math.min(r.wrapper.clientWidth-10,M.left+re.left-H.left))}return L},Ir.prototype.showSelection=function(e){var r=this.cm,R=r.display;o(R.cursorDiv,e.cursors),o(R.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ir.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var r=this.cm;if(r.somethingSelected()){this.prevInput="";var R=r.getSelection();this.textarea.value=R,r.state.focused&&ne(this.textarea),C&&T>=9&&(this.hasSelection=R)}else e||(this.prevInput=this.textarea.value="",C&&T>=9&&(this.hasSelection=null))},Ir.prototype.getField=function(){return this.textarea},Ir.prototype.supportsTouch=function(){return!1},Ir.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!n||I()!=this.textarea))try{this.textarea.focus()}catch(e){}},Ir.prototype.blur=function(){this.textarea.blur()},Ir.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ir.prototype.receivedFocus=function(){this.slowPoll()},Ir.prototype.slowPoll=function(){var e=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Ir.prototype.fastPoll=function(){var e=!1,r=this;r.pollingFast=!0;function R(){var L=r.poll();!L&&!e?(e=!0,r.polling.set(60,R)):(r.pollingFast=!1,r.slowPoll())}r.polling.set(20,R)},Ir.prototype.poll=function(){var e=this,r=this.cm,R=this.textarea,L=this.prevInput;if(this.contextMenuPending||!r.state.focused||ut(R)&&!L&&!this.composing||r.isReadOnly()||r.options.disableInput||r.state.keySeq)return!1;var M=R.value;if(M==L&&!r.somethingSelected())return!1;if(C&&T>=9&&this.hasSelection===M||t&&/[\uf700-\uf7ff]/.test(M))return r.display.input.reset(),!1;if(r.doc.sel==r.display.selForContextMenu){var H=M.charCodeAt(0);if(H==8203&&!L&&(L="\u200B"),H==8666)return this.reset(),this.cm.execCommand("undo")}for(var re=0,le=Math.min(L.length,M.length);re<le&&L.charCodeAt(re)==M.charCodeAt(re);)++re;return Li(r,function(){Uo(r,M.slice(re),L.length-re,null,e.composing?"*compose":null),M.length>1e3||M.indexOf(`
`)>-1?R.value=e.prevInput="":e.prevInput=M,e.composing&&(e.composing.range.clear(),e.composing.range=r.markText(e.composing.start,r.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ir.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ir.prototype.onKeyPress=function(){C&&T>=9&&(this.hasSelection=null),this.fastPoll()},Ir.prototype.onContextMenu=function(e){var r=this,R=r.cm,L=R.display,M=r.textarea;r.contextMenuPending&&r.contextMenuPending();var H=pi(R,e),re=L.scroller.scrollTop;if(!H||l)return;var le=R.options.resetSelectionOnContextMenu;le&&R.doc.sel.contains(H)==-1&&Yr(R,si)(R.doc,sa(H),oe);var ue=M.style.cssText,ge=r.wrapper.style.cssText,We=r.wrapper.offsetParent.getBoundingClientRect();r.wrapper.style.cssText="position: static",M.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-We.top-5)+"px; left: "+(e.clientX-We.left-5)+`px;
z-index: 1000; background: `+(C?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Ge;h&&(Ge=window.scrollY),L.input.focus(),h&&window.scrollTo(null,Ge),L.input.reset(),R.somethingSelected()||(M.value=r.prevInput=" "),r.contextMenuPending=tt,L.selForContextMenu=R.doc.sel,clearTimeout(L.detectingSelectAll);function ot(){if(M.selectionStart!=null){var Ot=R.somethingSelected(),Mt="\u200B"+(Ot?M.value:"");M.value="\u21DA",M.value=Mt,r.prevInput=Ot?"":"\u200B",M.selectionStart=1,M.selectionEnd=Mt.length,L.selForContextMenu=R.doc.sel}}function tt(){if(r.contextMenuPending!=tt)return;if(r.contextMenuPending=!1,r.wrapper.style.cssText=ge,M.style.cssText=ue,C&&T<9&&L.scrollbars.setScrollTop(L.scroller.scrollTop=re),M.selectionStart!=null){(!C||C&&T<9)&&ot();var Ot=0,Mt=function(){L.selForContextMenu==R.doc.sel&&M.selectionStart==0&&M.selectionEnd>0&&r.prevInput=="\u200B"?Yr(R,ps)(R):Ot++<10?L.detectingSelectAll=setTimeout(Mt,500):(L.selForContextMenu=null,L.input.reset())};L.detectingSelectAll=setTimeout(Mt,200)}}if(C&&T>=9&&ot(),_){xe(e);var bt=function(){Ze(window,"mouseup",bt),setTimeout(tt,20)};ke(window,"mouseup",bt)}else setTimeout(tt,50)},Ir.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Ir.prototype.setUneditable=function(){},Ir.prototype.needsContentAttribute=!1;function iu(e,r){if(r=r?G(r):{},r.value=e.value,!r.tabindex&&e.tabIndex&&(r.tabindex=e.tabIndex),!r.placeholder&&e.placeholder&&(r.placeholder=e.placeholder),r.autofocus==null){var R=I();r.autofocus=R==e||e.getAttribute("autofocus")!=null&&R==document.body}function L(){e.value=le.getValue()}var M;if(e.form&&(ke(e.form,"submit",L),!r.leaveSubmitMethodAlone)){var H=e.form;M=H.submit;try{var re=H.submit=function(){L(),H.submit=M,H.submit(),H.submit=re}}catch(ue){}}r.finishInit=function(ue){ue.save=L,ue.getTextArea=function(){return e},ue.toTextArea=function(){ue.toTextArea=isNaN,L(),e.parentNode.removeChild(ue.getWrapperElement()),e.style.display="",e.form&&(Ze(e.form,"submit",L),!r.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=M))}},e.style.display="none";var le=Tr(function(ue){return e.parentNode.insertBefore(ue,e.nextSibling)},r);return le}function au(e){e.off=Ze,e.on=ke,e.wheelEventPixels=fl,e.Doc=xi,e.splitLines=st,e.countColumn=X,e.findColumn=we,e.isWordChar=Ie,e.Pass=ie,e.signal=Ve,e.Line=hi,e.changeEnd=la,e.scrollbarModel=zo,e.Pos=it,e.cmpPos=Tt,e.modes=ct,e.mimeModes=et,e.resolveMode=lt,e.getMode=gt,e.modeExtensions=kt,e.extendMode=zt,e.copyState=$t,e.startState=de,e.innerMode=Se,e.commands=$a,e.keyMap=ea,e.keyName=Rs,e.isModifierKey=As,e.lookupKey=Aa,e.normalizeKeyMap=kl,e.StringStream=W,e.SharedTextMarker=Va,e.TextMarker=ca,e.LineWidget=Ga,e.e_preventDefault=he,e.e_stopPropagation=be,e.e_stop=xe,e.addClass=F,e.contains=D,e.rmClass=g,e.keyNames=da}Jl(Tr),eu(Tr);var ou="iter insert remove copy getEditor constructor".split(" ");for(var vo in xi.prototype)xi.prototype.hasOwnProperty(vo)&&K(ou,vo)<0&&(Tr.prototype[vo]=function(e){return function(){return e.apply(this.doc,arguments)}}(xi.prototype[vo]));return Oe(xi),Tr.inputStyles={textarea:Ir,contenteditable:hr},Tr.defineMode=function(e){!Tr.defaults.mode&&e!="null"&&(Tr.defaults.mode=e),At.apply(this,arguments)},Tr.defineMIME=Ct,Tr.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Tr.defineMIME("text/plain","null"),Tr.defineExtension=function(e,r){Tr.prototype[e]=r},Tr.defineDocExtension=function(e,r){xi.prototype[e]=r},Tr.fromTextArea=iu,au(Tr),Tr.version="5.58.2",Tr})},W7jJ:function(Je,Ke,B){"use strict";B.r(Ke);var ae=B("0Owb"),Q=B("PpiC"),U=B("OaEy"),w=B("2fM7"),P=B("T2oS"),S=B("W9HT"),C=B("miYZ"),T=B("tsqr"),h=B("2qtc"),p=B("kLXV"),f=B("9og8"),l=B("tJVT"),a=B("k1fw"),c=B("aHsQ"),s=B("sGsY"),u=B("WmNS"),i=B.n(u),n=B("cDcd"),t=B.n(n),d=B("Fvcw"),v=B("GIiI"),b=B("Ty5D"),y=B("9kvl"),_=B("55Ip"),m=B("7qur"),g=B("cDPC"),E=B("m3rI"),o=B("RCxd"),x=B("EHPI"),A=B("J66h"),O=B("uMZB"),D=B.n(O),I=B("sNtx"),F=B("RpDr"),z=B("+L6B"),ne=B("2/Rp"),j=B("y8nQ"),G=B("Vl3Y"),X=B("5NDa"),Z=B("5rEg"),K=Z.a.TextArea,q=5e3,ie=function(nt){var pt=nt.callback,Pt=nt.onCancel,Dt=nt.notes;function Ht(jt){pt(jt)}return t.a.createElement(G.a,{className:"note-form-panel",onFinish:Ht,initialValues:{notes:Dt}},t.a.createElement(G.a.Item,{name:"notes",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9"},{max:q,message:"\u7B14\u8BB0\u6700\u5927\u5B57\u6570\u4E3A".concat(q)}]},t.a.createElement(K,{placeholder:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9",rows:5})),t.a.createElement(G.a.Item,{style:{textAlign:"right"}},t.a.createElement(ne.a,{type:"ghost",onClick:Pt,style:{marginRight:10}}," \u53D6\u6D88 "),t.a.createElement(ne.a,{type:"primary",htmlType:"submit"}," \u63D0\u4EA4 ")))},oe=B("ZsLC"),ye=B.n(oe),pe=B("DjyN"),we=B("NUBc"),fe=B("g9YV"),Te=B("wCAj"),Fe=B("Hw79"),De=B.n(Fe),Me=B("ye1Q"),Ue=B("lfch"),ve=B("bdLU"),ce=B("1vsH"),Ie=B("wd/R"),Ne=B.n(Ie),Xe=Te.a.Column,ee=function(nt){var pt=nt.submitResult,Pt=nt.submitting,Dt=nt.submitRecords,Ht=nt.page,jt=nt.onPageChange,ht=nt.topicId,ft=pt||{},Ft=ft.status,vt=ft.id,Zt=ft.input,Rt=ft.output,rn=ft.expected_output,Fn=ft.is_file,wn=ft.input_file_url,vn=ft.output_file_url,zn=ft.expected_output_file_url,Tn=ft.error_msg,Bn=Dt||{},In=Bn.records,ir=Bn.records_count,Vn=Object(b.i)();function cr(){Fn?navigator.clipboard.writeText(A.Base64.decode(Tn)).then(function(){T.b.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")}):navigator.clipboard.writeText(A.Base64.decode(Rt)).then(function(){T.b.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")})}return t.a.createElement(S.a,{spinning:Pt,tip:"\u8BC4\u6D4B\u4E2D...",indicator:t.a.createElement(Me.a,{style:{fontSize:24},spin:!0})},vt?t.a.createElement(t.a.Fragment,null,t.a.createElement("ul",{className:De.a.info},t.a.createElement("li",null,"\u6267\u884C\u7ED3\u679C\uFF1A",t.a.createElement("span",{className:Ft===ve.a.OK?"c-green":"c-red"},F.a[Ft])),t.a.createElement("li",{className:De.a.error},t.a.createElement("a",{onClick:cr},"\u590D\u5236\u9519\u8BEF\u4FE1\u606F ",t.a.createElement(Ue.a,null)," ")),t.a.createElement("li",null,t.a.createElement(_.a,{to:"/problems/".concat(ht,"/record-detail/").concat(vt,"?backId=").concat(Vn==null?void 0:Vn.save_identifier)},"\u663E\u793A\u8BE6\u60C5 > "))),Ft!==ve.a.OK?t.a.createElement(t.a.Fragment,null,t.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),t.a.createElement("pre",null,!Fn&&Zt,Fn&&t.a.createElement("a",{style:{fontSize:"16px"},onClick:function(){return Object(ce.y)(wn,Zt)}},Zt)),t.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),t.a.createElement("pre",null,(Ft===4||Ft===5)&&A.Base64.decode(Tn),Ft!=4&&Ft!=5&&(Fn?t.a.createElement("a",{style:{fontSize:"16px"},onClick:function(){return Object(ce.y)(vn,Rt)}},Rt):A.Base64.decode(Rt))),t.a.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),t.a.createElement("pre",null,!Fn&&A.Base64.decode(rn),Fn&&t.a.createElement("a",{style:{fontSize:"16px"},onClick:function(){return Object(ce.y)(zn,rn)}},rn))):null):null,(In==null?void 0:In.length)>0?t.a.createElement(Te.a,{dataSource:In,rowKey:"id",pagination:!1},t.a.createElement(Xe,{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",render:function(er,Dn){return t.a.createElement("span",null," ",Ne()(er).format("YYYY-MM-DD HH:mm:ss"))}}),t.a.createElement(Xe,{title:"\u63D0\u4EA4\u7ED3\u679C",dataIndex:"status",key:"status",render:function(er,Dn){var Qn;return t.a.createElement(_.a,{className:er===0?"c-green":"c-red",to:"/problems/".concat(ht,"/record-detail/").concat(Dn.id,"?backId=").concat(Vn==null?void 0:Vn.save_identifier)},(Qn=F.a[er])===null||Qn===void 0?void 0:Qn.replace("\u8C03\u8BD5","\u8BC4\u6D4B"))}}),t.a.createElement(Xe,{title:"\u6267\u884C\u7528\u65F6 (S)",dataIndex:"execute_time",key:"execute_time"}),t.a.createElement(Xe,{title:"\u5185\u5B58\u6D88\u8017\uFF08MB\uFF09",dataIndex:"execute_memory",key:"execute_memory"}),t.a.createElement(Xe,{title:"\u8BED\u8A00",dataIndex:"language",key:"language"})):null,ir>15?t.a.createElement(we.a,{className:De.a.pagination,current:Ht,pageSize:15,total:ir,onChange:jt}):null)},k=B("BdwD"),N=B("DYRE"),$=B("zeV3"),V=B("+BJd"),Y=B("mr32"),me=B("TcMa"),Ae=B.n(me),at=B("9Bee"),Le={1:{name:"\u7B80\u5355",color:"#52c41a"},2:{name:"\u9002\u4E2D",color:"#faad14"},3:{name:"\u56F0\u96BE",color:"#f5222d"}},ke=function(nt){var pt=nt.hack,Pt=nt.onTriggerPraise,Dt=nt.toDiscuss,Ht=pt.language,jt=pt.difficulty,ht=pt.time_limit,ft=pt.username,Ft=pt.user_path,vt=pt.user_praise,Zt=pt.comments_count,Rt=pt.praises_count,rn=pt.description,Fn=pt.pass_count,wn=pt.submit_count,vn=Object(b.h)();console.log(pt.language,"language");var zn=Le[jt];return t.a.createElement(t.a.Fragment,null,t.a.createElement("ul",{className:Ae.a.info},t.a.createElement("li",null,"\u96BE\u5EA6\uFF1A",t.a.createElement(Y.a,{color:zn.color},zn.name)),t.a.createElement("li",null,"\u8BC4\u6D4B\u65F6\u957F\u9650\u5236\uFF1A",t.a.createElement("b",null,ht,"\u79D2"))),t.a.createElement(at.a,{value:rn,className:Ae.a.desc}),t.a.createElement("ul",{className:Ae.a["commit-info"]},t.a.createElement("li",null,t.a.createElement($.a,{size:4},t.a.createElement("span",null,"\u901A\u8FC7\u6B21\u6570")," ",t.a.createElement("b",null,Fn))),t.a.createElement("li",null,t.a.createElement($.a,{size:4},t.a.createElement("span",null,"\u63D0\u4EA4\u6B21\u6570")," ",t.a.createElement("b",null,wn))," "),t.a.createElement("li",{style:{flex:"1 0 0"}}),t.a.createElement("li",null,t.a.createElement($.a,{size:4},t.a.createElement("i",{className:"iconfont icon-huifu1",onClick:Dt})," ",t.a.createElement("b",null,Zt))," ")))},Ye=B("dhSg"),Ze=B("ps8w"),Ve=B.n(Ze),He=B("oBTY"),Pe=B("M8RZ"),Re=B("OkW/"),Oe=B("ErOA");function he(nt){return Object(Oe.c)("comments.json",nt)}function be(nt){return Object(Oe.f)("/discusses/".concat(nt,"/plus.json"),{container_type:"Discuss",type:1})}function Ce(nt){return Object(Oe.f)("comments/reply.json",nt)}function xe(nt){return Object(Oe.f)("comments.json",nt)}function Be(nt){return Object(Oe.f)("comments/".concat(nt==null?void 0:nt.id,"/hidden.json"),nt)}function Qe(nt){return Object(Oe.b)("comments/".concat(nt==null?void 0:nt.id,".json"))}var rt=B("GgEA"),dt=B("AMnG"),xt=B("xKgJ");function _t(nt){var pt=nt.author;return t.a.createElement("a",{href:"/users/".concat(pt.login),target:"_blank"},t.a.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",height:"50",style:{borderRadius:"50%"},src:"".concat(E.a.IMG_SERVER,"/images/").concat(pt.image_url),width:"50"}))}function wt(nt){var pt=nt.data,Pt=nt.index,Dt=nt.parentDiscussIndex,Ht=nt.user,jt=nt.onSetActionType,ht=pt.author,ft=pt.can_delete,Ft=pt.content,vt=pt.id,Zt=pt.time;function Rt(){jt({id:vt,index:Pt,type:"delete-discuss",parentDiscussIndex:Dt,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}var rn=Ht.admin||ft||ht.user_id===Ht.user_id;return t.a.createElement("div",{className:"discuss-item-container second-discuss "},t.a.createElement(_t,{author:ht}),t.a.createElement("section",null,t.a.createElement("div",{className:"discuss-info"},t.a.createElement("a",{href:"/users/".concat(ht.login),target:"_blank"},ht.name),t.a.createElement("span",{className:"grey"},Zt),t.a.createElement("div",{className:"btn-group",style:{marginBottom:0}},rn?t.a.createElement("a",{onClick:Rt,title:"\u5220\u9664"},t.a.createElement("i",{className:"iconfont icon-shanchu"})):null)),t.a.createElement(at.a,{className:"discuss-content",value:Ft})))}var st=function(nt){var pt=nt.user,Pt=nt.data,Dt=nt.index,Ht=nt.onPlusDiscuss,jt=nt.onSetActionType,ht=nt.activeDiscussIndex,ft=nt.onReplyDiscuss,Ft=nt.onSetActiveDiscussIndex,vt=Pt.content,Zt=Pt.children,Rt=Pt.hidden,rn=Pt.id,Fn=Pt.praise_count,wn=Pt.time,vn=Pt.user_praise,zn=Pt.can_delete,Tn=Pt.author;console.log(zn&&(!Zt||Zt.length==0),"children22");function Bn(){Ft(rn)}function In(){Ht(rn,!vn,Dt)}function ir(){jt({id:rn,index:Dt,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function Vn(){jt({id:rn,index:Dt,params:{hidden:Rt?"0":"1"},type:"hidden-discuss",message:Rt?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}var cr=pt.admin||pt.user_id===Tn.user_id;return t.a.createElement("div",{className:"discuss-item-container",key:rn},t.a.createElement(_t,{author:Tn}),t.a.createElement("section",null,t.a.createElement("div",{className:"discuss-info"},t.a.createElement("a",{href:"/users/".concat(Tn.login),target:"_blank"}," ",Tn.name," "),t.a.createElement("span",{className:"grey"},wn)),t.a.createElement(at.a,{className:"discuss-content",value:vt}),Zt&&Zt.length>0?t.a.createElement("div",{className:"reply-discuss-container"},Zt.map(function(vr,er){return t.a.createElement(wt,{key:vr.id,data:vr,index:er,user:pt,onSetActionType:jt,parentDiscussIndex:Dt})})):null,t.a.createElement("div",{className:"btn-group"},Object(xt.v)()?t.a.createElement("a",{onClick:Vn,title:Rt?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},t.a.createElement("i",{className:Rt?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,zn&&(!Zt||Zt.length==0)?t.a.createElement("a",{onClick:ir,title:"\u5220\u9664"},t.a.createElement("i",{className:"iconfont icon-shanchu"})):null,t.a.createElement("a",{onClick:Bn,title:"\u56DE\u590D"}," ",t.a.createElement("i",{className:"iconfont icon-huifu1"})," "),t.a.createElement("a",{onClick:In,className:vn?"c-orange":""},t.a.createElement("i",{className:vn?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),t.a.createElement("span",null,Fn||""))),t.a.createElement(dt.a,{id:rn,activeDiscussIndex:ht,onReplyDiscuss:ft})))},ut=B("kaH+"),$e=B("Wx9E"),_e=B("Ot1p"),je=function(nt){var pt=nt.user_praise,Pt=nt.praise_count,Dt=nt.praisePlus,Ht=nt.onCreateDiscuss,jt=nt.discuss_count,ht=Object(n.useState)(!1),ft=Object(l.a)(ht,2),Ft=ft[0],vt=ft[1],Zt=Object(n.useState)(""),Rt=Object(l.a)(Zt,2),rn=Rt[0],Fn=Rt[1];function wn(In){Fn(In)}function vn(){vt(!0)}function zn(){vt(!1)}function Tn(){return Bn.apply(this,arguments)}function Bn(){return Bn=Object(f.a)(i.a.mark(function In(){return i.a.wrap(function(Vn){for(;;)switch(Vn.prev=Vn.next){case 0:Ht(rn),Fn(""),vt(!1);case 3:case"end":return Vn.stop()}},In)})),Bn.apply(this,arguments)}return t.a.createElement("div",{className:"dis-input-editor-container ".concat(Ft?"active":""," ")},t.a.createElement("div",{className:Ft?"text-area hide":"text-area"},t.a.createElement("input",{placeholder:"\u8BF4\u70B9\u4EC0\u4E48",onClick:vn}),t.a.createElement("a",{style:{alignItems:"center"}}," ",t.a.createElement("i",{className:"iconfont icon-huifu1"})," \xA0 \xA0",jt," "),t.a.createElement("a",{className:"c-light-black",onClick:Dt,style:{alignItems:"center"},title:pt?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},t.a.createElement("i",{className:"mr3 ".concat(pt?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"," ")}),Pt?t.a.createElement("span",null,Pt):"")),Ft?t.a.createElement("div",{className:"input-mask",onClick:zn}):null,t.a.createElement("div",{className:Ft?"md-container":"md-container hide"},t.a.createElement(_e.a,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:rn,height:240,onChange:wn}),t.a.createElement("div",{className:"tip-container",onClick:zn},t.a.createElement("a",{className:"btn-send",onClick:Tn}," \u53D1\u9001 "))))},ct={loading:!1,page:1,data:[],count:0,actionType:null,activeDiscussIndex:null},et;(function(nt){nt[nt.GET_DISCUSSES=0]="GET_DISCUSSES",nt[nt.TOP_OR_DOWN_DISCUSS=1]="TOP_OR_DOWN_DISCUSS",nt[nt.ACTIVE_DISCUSS_INDEX=2]="ACTIVE_DISCUSS_INDEX",nt[nt.PLUS_DISCUSS=3]="PLUS_DISCUSS",nt[nt.SET_ACTION_TYPE=4]="SET_ACTION_TYPE",nt[nt.SET_PAGE=5]="SET_PAGE",nt[nt.SHOW_DISCUSSES_LOADING=6]="SHOW_DISCUSSES_LOADING"})(et||(et={}));function At(nt,pt){switch(pt.type){case et.SHOW_DISCUSSES_LOADING:return Object(a.a)(Object(a.a)({},nt),{},{loading:!0});case et.GET_DISCUSSES:return Object(a.a)(Object(a.a)({},nt),pt.payload);case et.TOP_OR_DOWN_DISCUSS:return Object(a.a)(Object(a.a)({},nt),pt.payload);case et.SET_ACTION_TYPE:return Object(a.a)(Object(a.a)({},nt),pt.payload);case et.PLUS_DISCUSS:return Object(a.a)(Object(a.a)({},nt),pt.payload);case et.SET_PAGE:return Object(a.a)(Object(a.a)({},nt),{},{page:pt.payload});case et.ACTIVE_DISCUSS_INDEX:return Object(a.a)(Object(a.a)({},nt),pt.payload);default:throw new Error}}var Ct=function(nt){var pt=nt.user,Pt=nt.identifier,Dt=nt.hack,Ht=nt.onTriggerPraise,jt=nt.setDiscussTotal,ht=Object(n.useReducer)(At,ct),ft=Object(l.a)(ht,2),Ft=ft[0],vt=ft[1],Zt=Ft.loading,Rt=Ft.page,rn=Ft.data,Fn=Ft.count,wn=Ft.actionType,vn=Ft.activeDiscussIndex,zn=Object(n.useCallback)(Object(f.a)(i.a.mark(function cn(){var tr,sr,qn;return i.a.wrap(function(Wn){for(;;)switch(Wn.prev=Wn.next){case 0:return vt({type:et.SHOW_DISCUSSES_LOADING}),Wn.next=3,he({container_type:"Practice",container_identifier:Pt,limit:10,page:Rt});case 3:tr=Wn.sent,sr=tr.comments,qn=tr.disscuss_count,vt({type:et.GET_DISCUSSES,payload:{data:sr,count:qn,loading:!1}}),jt(qn);case 7:case"end":return Wn.stop()}},cn)})),[Rt,Pt]);Object(n.useEffect)(function(){zn()},[Pt,Rt]);function Tn(cn){vt({type:et.SET_PAGE,page:cn})}function Bn(cn){vt({type:et.SET_ACTION_TYPE,payload:{actionType:cn}})}function In(cn){vn===cn?vt({type:et.ACTIVE_DISCUSS_INDEX,payload:{activeDiscussIndex:null}}):vt({type:et.ACTIVE_DISCUSS_INDEX,payload:{activeDiscussIndex:cn}})}function ir(cn,tr,sr){return Vn.apply(this,arguments)}function Vn(){return Vn=Object(f.a)(i.a.mark(function cn(tr,sr,qn){var Cn;return i.a.wrap(function(on){for(;;)switch(on.prev=on.next){case 0:return on.prev=0,on.next=3,be(tr);case 3:Cn=on.sent,rn[qn].user_praise=sr,rn[qn].praise_count=Cn.praise_count,vt({type:et.PLUS_DISCUSS,payload:{data:Object(He.a)(rn)}}),on.next=12;break;case 9:on.prev=9,on.t0=on.catch(0),console.log(on.t0);case 12:case"end":return on.stop()}},cn,null,[[0,9]])})),Vn.apply(this,arguments)}function cr(){return vr.apply(this,arguments)}function vr(){return vr=Object(f.a)(i.a.mark(function cn(){var tr,sr,qn,Cn,Wn;return i.a.wrap(function(_n){for(;;)switch(_n.prev=_n.next){case 0:if(tr=wn.id,sr=wn.params,qn=wn.type,Cn=wn.index,Wn=wn.parentDiscussIndex,!(qn==="hidden-discuss")){_n.next=7;break}return console.log(sr,"params"),_n.next=5,Be(Object(a.a)({id:tr,container_type:"Practice",container_identifier:Pt},sr));case 5:Wn?rn[Wn].children[Cn].hidden=sr.hidden==1:rn[Cn].hidden=sr.hidden==1,vt({type:et.SET_ACTION_TYPE,payload:{actionType:null,data:Object(He.a)(rn)}});case 7:if(!(qn==="delete-discuss")){_n.next=13;break}return _n.next=10,Qe({id:tr,container_type:"Practice",container_identifier:Pt});case 10:return vt({type:et.SET_ACTION_TYPE,payload:{actionType:null}}),_n.next=13,zn();case 13:case"end":return _n.stop()}},cn)})),vr.apply(this,arguments)}function er(){vt({type:et.SET_ACTION_TYPE,payload:{actionType:null}})}function Dn(cn,tr){return Qn.apply(this,arguments)}function Qn(){return Qn=Object(f.a)(i.a.mark(function cn(tr,sr){return i.a.wrap(function(Cn){for(;;)switch(Cn.prev=Cn.next){case 0:return Cn.prev=0,Cn.next=3,Ce({container_type:"Practice",container_identifier:Pt,comments:{content:sr,parent_id:tr}});case 3:zn(),Cn.next=9;break;case 6:Cn.prev=6,Cn.t0=Cn.catch(0),console.log(Cn.t0);case 9:case"end":return Cn.stop()}},cn,null,[[0,6]])})),Qn.apply(this,arguments)}function Pn(cn){return Ut.apply(this,arguments)}function Ut(){return Ut=Object(f.a)(i.a.mark(function cn(tr){return i.a.wrap(function(qn){for(;;)switch(qn.prev=qn.next){case 0:return vt({type:et.SHOW_DISCUSSES_LOADING}),qn.next=3,xe({comments:{content:tr},container_type:"Practice",container_identifier:Pt});case 3:zn();case 4:case"end":return qn.stop()}},cn)})),Ut.apply(this,arguments)}return t.a.createElement(t.a.Fragment,null,t.a.createElement("div",{className:"discuss-panel"},rn.length===0?t.a.createElement(k.a,null):rn.map(function(cn,tr){return t.a.createElement(st,{onReplyDiscuss:Dn,onPlusDiscuss:ir,onSetActiveDiscussIndex:In,onSetActionType:Bn,data:cn,index:tr,user:pt,activeDiscussIndex:vn})}),Fn>10?t.a.createElement("div",{className:"pagination-container"},t.a.createElement(we.a,{showQuickJumper:!0,onChange:Tn,current:Rt,total:Fn})):null),t.a.createElement(je,{user_praise:Dt.user_praise,praise_count:Dt.praises_count,praisePlus:Ht,discuss_count:Dt.comments_count,onCreateDiscuss:Pn}),t.a.createElement(Pe.a,null,t.a.createElement(p.a,{centered:!0,title:"\u63D0\u793A",visible:!!wn,onOk:cr,onCancel:er},t.a.createElement("p",null,wn?wn.message:"")),t.a.createElement(ut.a,null)))},lt=B("1FX+"),gt=B.n(lt),kt=B("pYxM"),zt=B.n(kt),$t=B("sB/4"),Se=B.n($t),de=B("Wtmd"),W=B.n(de),J=B("CNDd"),te=B.n(J),se=B("nCk5"),Ee=B.n(se),ze=B("kovY"),qe=B.n(ze),St=function(pt){var Pt=pt.style,Dt=Pt===void 0?{}:Pt,Ht=pt.onClick,jt=pt.onAssist,ht=pt.onHide,ft=pt.data,Ft=pt.active,vt=pt.showLine;return t.a.createElement(t.a.Fragment,null,t.a.createElement("div",{className:Ft===(ft==null?void 0:ft.id)?"".concat(zt.a.list," ").concat(zt.a.active):zt.a.list,style:Dt,onClick:function(){return Ht(ft)}},(ft==null?void 0:ft.video)&&t.a.createElement("div",{className:zt.a.left},t.a.createElement("img",{src:ft==null?void 0:ft.video_cover}),t.a.createElement("div",null,t.a.createElement("img",{src:Se.a}),t.a.createElement("span",null,ft==null?void 0:ft.video_duration)),t.a.createElement("div",{className:zt.a.mask})),t.a.createElement("div",{className:zt.a.right},t.a.createElement("div",{className:zt.a.name},t.a.createElement("img",{src:E.a.IMG_SERVER+"/images/"+(ft==null?void 0:ft.image_url),width:30,height:30}),t.a.createElement("div",{title:ft==null?void 0:ft.name,className:zt.a.title},ft==null?void 0:ft.name),(ft==null?void 0:ft.is_authority)&&t.a.createElement("div",{className:zt.a.b},"\u5B98\u65B9"),(ft==null?void 0:ft.is_excellent)&&t.a.createElement("div",{className:zt.a.a},"\u7CBE\u9009")),t.a.createElement("div",{className:zt.a.des},t.a.createElement(at.a,{showLines:2,showTextOnly:!0,value:(ft==null?void 0:ft.content)||"\u6682\u65E0\u5185\u5BB9"})),t.a.createElement("div",{className:zt.a.tag},t.a.createElement("span",{className:"current",onClick:function(Rt){Rt.stopPropagation(),jt(ft)}},t.a.createElement("img",{src:ft!=null&&ft.user_liker?te.a:W.a}),t.a.createElement("span",{style:{color:ft!=null&&ft.user_liker?"#0152d9":"#656f87"}},ft==null?void 0:ft.praises_count)),t.a.createElement("span",null,t.a.createElement("img",{src:Ee.a}),t.a.createElement("span",null,ft==null?void 0:ft.discusses_count)),t.a.createElement("span",null,t.a.createElement("img",{src:qe.a}),t.a.createElement("span",null,ft==null?void 0:ft.viewed_count)),Object(xt.v)()&&t.a.createElement("span",{className:"current",style:{color:"#0152d9",marginRight:0,userSelect:"none"},onClick:function(Rt){Rt.stopPropagation(),ht(ft)}},ft!=null&&ft.is_hidden?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF")))),vt&&t.a.createElement("div",{className:zt.a.line}))},Lt=St,it=B("5Dmo"),Tt=B("3S7+"),Qt=B("Z8dc"),Et=B.n(Qt),nn=B("Aky1"),Jt=B("7+5b"),It=B.n(Jt),yt=B("twBr"),Sn=B.n(yt),mt=B("oE5q"),ln=B.n(mt),fn=function(pt,Pt){var Dt,Ht,jt,ht=Pt.payload.uploadInfo,ft=ht===void 0?{}:ht;switch(Pt.type){case"addVideo":return{videoList:[].concat(Object(He.a)(pt.videoList),[{name:ft.file.name,size:ft.file.size,type:ft.file.type,fileHash:ft.fileHash,state:ft.state,video_id:ft.videoId,attachment_id:"",article_id:-1,loaded:0,title:""}])};case"removeVideo":return{videoList:pt.videoList.filter(function(Ft){return Ft.name!==Pt.payload.name})};case"replaceVideo":return{videoList:Pt.payload};case"removeAll":return[];case"updateProgress":return{videoList:pt.videoList.map(function(Ft){return Ft.name===Pt.payload.uploadInfo.file.name?Object(a.a)(Object(a.a)({},Ft),{loaded:Pt.payload.progressPercent,video_id:ft.videoId,fileHash:ft.fileHash}):Ft})};case"updateTitle":return{videoList:(Dt=pt.videoList)===null||Dt===void 0?void 0:Dt.map(function(Ft){return Ft.name===Pt.payload.item.name?Object(a.a)(Object(a.a)({},Ft),{title:Pt.payload.title}):Ft})};case"updateImg":return{videoList:(Ht=pt.videoList)===null||Ht===void 0?void 0:Ht.map(function(Ft){return Ft.name===Pt.payload.item.name?Object(a.a)(Object(a.a)({},Ft),{attachment_id:Pt.payload.attachment_id}):Ft})};case"updateImg":return{videoList:(jt=pt.videoList)===null||jt===void 0?void 0:jt.map(function(Ft){return Ft.name===Pt.payload.item.name?Object(a.a)(Object(a.a)({},Ft),{attachment_id:Pt.payload.attachment_id}):Ft})};default:return[]}},Zn=function(pt){var Pt,Dt,Ht=pt.onClose,jt=pt.onOk,ht=pt.identifier,ft=pt.active,Ft=G.a.useForm(),vt=Object(l.a)(Ft,1),Zt=vt[0],Rt=Object(n.useState)({}),rn=Object(l.a)(Rt,2),Fn=rn[0],wn=rn[1],vn=Object(n.useState)(!1),zn=Object(l.a)(vn,2),Tn=zn[0],Bn=zn[1],In=Object(n.useState)(!1),ir=Object(l.a)(In,2),Vn=ir[0],cr=ir[1],vr=Object(n.useReducer)(fn,{videoList:[]}),er=Object(l.a)(vr,2),Dn=er[0],Qn=er[1],Pn=Object(xt.x)(),Ut=Object(b.i)(),cn=Object(n.useRef)();Object(n.useEffect)(function(){ft&&tr()},[ft]);var tr=function(){var pn=Object(f.a)(i.a.mark(function On(){var gn,ar,Yn,$n,wr,jr,Ai,zr,Mi,Ki,Hi,ji;return i.a.wrap(function(Un){for(;;)switch(Un.prev=Un.next){case 0:return Un.next=2,Object(m.k)(ht,{active:ft});case 2:gn=Un.sent,(gn==null?void 0:gn.status)===0&&(jr={name:gn==null||((ar=gn.data)===null||ar===void 0)?void 0:ar.name,content:gn==null||((Yn=gn.data)===null||Yn===void 0)?void 0:Yn.content},Zt.setFieldsValue(jr),wn(jr),gn!=null&&($n=gn.data)!==null&&$n!==void 0&&(wr=$n.videos)!==null&&wr!==void 0&&wr[0]&&Qn({type:"replaceVideo",payload:[{video_id:gn==null||((Ai=gn.data)===null||Ai===void 0||((zr=Ai.videos)===null||zr===void 0||((Mi=zr[0])===null||Mi===void 0)))?void 0:Mi.video_id,name:gn==null||((Ki=gn.data)===null||Ki===void 0||((Hi=Ki.videos)===null||Hi===void 0||((ji=Hi[0])===null||ji===void 0)))?void 0:ji.title,loaded:100}]}));case 4:case"end":return Un.stop()}},On)}));return function(){return pn.apply(this,arguments)}}(),sr=function(On,gn){wn(Object(a.a)({},gn))},qn=function(){var pn=Object(f.a)(i.a.mark(function On(gn){var ar,Yn,$n,wr,jr;return i.a.wrap(function(zr){for(;;)switch(zr.prev=zr.next){case 0:if(Yn={videos:Dn.videoList,articles:gn},cr(!0),!ft){zr.next=9;break}return Yn.active=ft,zr.next=6,Object(m.j)(ht,Yn);case 6:$n=zr.sent,zr.next=12;break;case 9:return zr.next=11,Object(m.a)(ht,Yn);case 11:$n=zr.sent;case 12:((ar=$n)===null||ar===void 0?void 0:ar.status)===0&&(console.log(ft||((wr=$n)===null||wr===void 0?void 0:wr.id),44),jt(ft||((jr=$n)===null||jr===void 0?void 0:jr.id))),cr(!1);case 14:case"end":return zr.stop()}},On)}));return function(gn){return pn.apply(this,arguments)}}(),Cn=function(){var On=document.getElementById("fileUpload");On.value=""},Wn=function(On){var gn='{"Vod":{}}';if(Bn(!0),cn.current){cn.current.addFile(On,null,null,null,gn);return}Object(nn.a)(Pn==null?void 0:Pn.login,"",{create:!cn,addFileSuccess:function(Yn){Qn({type:"addVideo",payload:{uploadInfo:Yn}})},onUploadProgress:function(Yn,$n,wr){var jr=Math.ceil(wr*100);Qn({type:"updateProgress",payload:{uploadInfo:Yn,progressPercent:jr}}),Cn()},onUploadFailed:function(Yn){T.b.info("\u89C6\u9891\u4E91\u670D\u52A1\u51FA\u73B0\u5F02\u5E38\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20\u3002")},onUploadEnd:function(Yn){Bn(!1)},onUploadSucceed:function(Yn){Bn(!1)},onUploadError:function(Yn){Bn(!1)},gotUploader:function(Yn){Yn.addFile(On,null,null,null,gn),cn.current=Yn}})},on=function(On){var gn,ar=1024,Yn=On.target.files[0];if(!Yn){Cn();return}var $n=Yn.name.toLowerCase();if($n&&$n.indexOf(".avi")==-1&&$n.indexOf(".flv")==-1&&$n.indexOf(".f4v")==-1&&$n.indexOf(".m4v")==-1&&$n.indexOf(".mov")==-1&&$n.indexOf(".mp4")==-1&&$n.indexOf(".rmvb")==-1&&$n.indexOf(".swf")==-1&&$n.indexOf(".webm")==-1&&$n.indexOf(".wmv")==-1){T.b.info("\u4E0D\u652F\u6301\u7684\u89C6\u9891\u683C\u5F0F"),Cn();return}if(Yn.size>ar*1024*1024){T.b.info("\u89C6\u9891\u5927\u5C0F\u8D85\u8FC7".concat(ar,"M")),Cn();return}if((gn=Dn.videoList)!==null&&gn!==void 0&&gn.find(function(wr){return wr.name===Yn.name})){T.b.info("\u4F60\u4E0D\u80FD\u4E0A\u4F20\u540C\u4E00\u4E2A\u89C6\u9891\u6587\u4EF6\u540D\u79F0\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u3002"),Cn();return}Wn(Yn)},_n=function(On,gn){p.a.confirm({title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:t.a.createElement("div",{className:"tc"},"\u60A8\u786E\u8BA4\u8981",gn?"\u5220\u9664":"\u53D6\u6D88\u4E0A\u4F20","\u8BE5\u89C6\u9891\u5417\uFF1F"),onOk:function(){Cn(),Qn({type:"removeVideo",payload:{name:On}})}})},Nt=function(){return t.a.createElement("label",{htmlFor:"fileUpload",className:Et.a.main},t.a.createElement("img",{src:It.a,alt:""}),t.a.createElement("span",null,"\u4E0A\u4F20\u89C6\u9891"))},Bt=function(On){return t.a.createElement("div",{className:Et.a.mainLoading},t.a.createElement("div",{className:Et.a.proWarp},t.a.createElement("div",{className:Et.a.pro},t.a.createElement("div",{style:{width:On}})),t.a.createElement("span",null,On||0,"%")),t.a.createElement("aside",null,"\u4E0A\u4F20\u4E2D"),t.a.createElement("div",{className:Et.a.tip},t.a.createElement(Tt.a,{getPopupContainer:function(ar){return ar.parentNode},title:t.a.createElement("div",null,t.a.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",t.a.createElement("a",{className:"current c-light-primary",target:"_blank",href:"/users/innov/videos/protocol"},"\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"),"\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B"),t.a.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),t.a.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},t.a.createElement("img",{src:ln.a,alt:""}))))},Xt=function(On){return t.a.createElement("div",{className:Et.a.mainSucceed},t.a.createElement("img",{src:Sn.a,alt:""}),t.a.createElement("span",null,"\u4E0A\u4F20\u6210\u529F"),t.a.createElement("div",{className:Et.a.tip},t.a.createElement(Tt.a,{getPopupContainer:function(ar){return ar.parentNode},title:t.a.createElement("div",null,t.a.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",t.a.createElement("a",{className:"current c-light-primary",target:"_blank",href:"/users/innov/videos/protocol"},"\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"),"\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B"),t.a.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),t.a.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},t.a.createElement("img",{src:ln.a,alt:""}))),t.a.createElement("div",{className:Et.a.del,onClick:function(){return _n(On.name,On.loaded==100)}},t.a.createElement("i",{className:"iconfont icon-shanchu7 mr5"}),"\u5220\u9664\u89C6\u9891"))},hn=function(){var On;return t.a.createElement(t.a.Fragment,null,(On=Dn.videoList)===null||On===void 0?void 0:On.map(function(gn,ar){return t.a.createElement(t.a.Fragment,{key:ar},gn.loaded==100?Xt(gn):Bt(gn.loaded))}))},qt=function(){p.a.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u6CE8\u610F",icon:null,className:"custom-modal-divider",content:"\u60A8\u6B63\u5728\u7F16\u5199\u9898\u89E3\uFF0C\u70B9\u51FB\u5173\u95ED\u540E\uFF0C\u60A8\u7684\u9898\u89E3\u5185\u5BB9\u5C06\u4E0D\u4F1A\u8FDB\u884C\u4FDD\u5B58\u3002",onOk:Ht})},Nn=(Pt=Dn.videoList)===null||Pt===void 0?void 0:Pt.length;return t.a.createElement("div",{className:Et.a.listForm},t.a.createElement("header",null,ft?"\u7F16\u8F91":"\u53D1\u5E03","\u9898\u89E3"),t.a.createElement("section",{className:Et.a.scroll,id:"sss"},t.a.createElement("div",{className:Et.a.formWrap}," ",t.a.createElement(G.a,{form:Zt,scrollToFirstError:!0,layout:"vertical",onValuesChange:sr,onFinish:qn},t.a.createElement(G.a.Item,{name:"name",label:"\u6807\u9898:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u540D\u79F0"},{max:60,message:"\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},t.a.createElement(Z.a,{bordered:!1,placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26",suffix:"".concat(((Dt=Fn.name)===null||Dt===void 0?void 0:Dt.length)||0,"/60")})),t.a.createElement(G.a.Item,{name:"content",label:"\u5185\u5BB9:"},t.a.createElement(_e.a,{defaultValue:Fn.content||"",watch:!0})))),t.a.createElement("div",{className:Et.a.upload},Nn?hn():Nt(),t.a.createElement("input",{type:"file",id:"fileUpload",style:{display:"none"},onChange:on,accept:".mkv, .flv, .f4v, .rmvb, .swf, video/mp4,video/x-m4v,video/flv,video/f4v,video/rmvb,video/swf,video/*"}))),t.a.createElement("div",{className:Et.a.btns},t.a.createElement(ne.a,{onClick:qt,type:"primary",ghost:!0},"\u5173\u95ED"),t.a.createElement(ne.a,{loading:Vn,disabled:Tn,onClick:function(){return Zt.submit()},type:"primary"},"\u53D1\u5E03\u9898\u89E3")))},rr=Zn,xn=B("cWXX"),Er=B("/ezw"),Cr=B("CaVn"),un=B.n(Cr),Mn=B("s8/Y"),Nr=B.n(Mn),Xr=B("JOrW"),xr=B.n(Xr),ur=B("gqXR"),gr=B.n(ur),gi=B("14J3"),pr=B("BMrR"),yr=B("jCWc"),Or=B("kPKH"),Kr=B("wW8i"),Sr=B.n(Kr),ui=B("MVJL"),Pr=B.n(ui),yi=function(pt){var Pt=pt.id,Dt=pt.cb,Ht=Object(n.useState)(""),jt=Object(l.a)(Ht,2),ht=jt[0],ft=jt[1];return t.a.createElement("aside",{className:"mt10"},t.a.createElement(_e.a,{defaultValue:ht,id:"writeForumsReviewId",onChange:function(vt){ft(vt)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),t.a.createElement(pr.a,null,t.a.createElement(Or.a,{flex:"1"}),t.a.createElement(Or.a,null,t.a.createElement(ne.a,{type:"primary",size:"large",onClick:Object(f.a)(i.a.mark(function Ft(){return i.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:ht===""?T.b.error("\u8BF7\u8F93\u5165\u5185\u5BB9"):Dt(Pt,ht);case 1:case"end":return Zt.stop()}},Ft)}))},"\u53D1\u9001"))))},ci=function(pt){var Pt,Dt=pt.data;return t.a.createElement("div",{className:Pr.a.thirdlyLevelDiscuss},t.a.createElement("span",{className:"c-grey-333"},t.a.createElement("span",{className:"font 14 c-light-primary"},Dt==null||((Pt=Dt.author)===null||Pt===void 0)?void 0:Pt.name),"@",t.a.createElement("span",{className:"font 14 c-light-primary"},Dt==null?void 0:Dt.parent_name),":"),t.a.createElement(at.a,{value:Dt==null?void 0:Dt.content}))},ni=function(pt){var Pt,Dt,Ht,jt,ht=pt.data,ft=pt.onReplyDiscuss,Ft=pt.thirdlyReply,vt=pt.setThirdlyReply,Zt=Object(xt.x)();return console.log(Zt,"user"),t.a.createElement("div",{className:Pr.a.list},t.a.createElement("img",{src:E.a.IMG_SERVER+"/images/"+(ht==null||((Pt=ht.author)===null||Pt===void 0)?void 0:Pt.image_url)}),t.a.createElement("div",{className:Pr.a.wrap},t.a.createElement("div",{className:"font14",style:{marginBottom:6}},t.a.createElement("span",{className:"c-grey-333"},ht==null||((Dt=ht.author)===null||Dt===void 0)?void 0:Dt.name),(Zt==null?void 0:Zt.login)!==(ht==null||((Ht=ht.author)===null||Ht===void 0)?void 0:Ht.login)&&t.a.createElement("span",{onClick:function(){return vt(ht==null?void 0:ht.id)},className:"c-grey-999 current",style:{float:"right"}},t.a.createElement("i",{className:"iconfont icon-huifu3 mr3 font12"}),t.a.createElement("span",null,"\u56DE\u590D"))),t.a.createElement(at.a,{value:ht==null?void 0:ht.content}),ht==null||((jt=ht.children)===null||jt===void 0)?void 0:jt.map(function(Rt){return t.a.createElement(ci,{key:Rt.id,data:Rt})}),Ft===(ht==null?void 0:ht.id)&&t.a.createElement("div",null,t.a.createElement(yi,{id:ht==null?void 0:ht.id,cb:ft}),t.a.createElement("div",{style:{textAlign:"end",paddingTop:20},onClick:function(){return vt(null)},className:"c-light-primary current"},t.a.createElement("i",{style:{transform:"scale(0.7)",display:"inline-block"},className:"iconfont icon-shouqi font12"}),"\u6536\u8D77\u56DE\u590D")),t.a.createElement("div",{className:Pr.a.line})))},Di=function(pt){var Pt,Dt,Ht,jt,ht=pt.data,ft=pt.onReplyDiscuss,Ft=pt.secondReply,vt=pt.setSecondReply,Zt=pt.thirdlyReply,Rt=pt.setThirdlyReply,rn=pt.onPlusDiscuss,Fn=Object(n.useState)(!1),wn=Object(l.a)(Fn,2),vn=wn[0],zn=wn[1];return console.log(ht,"data"),t.a.createElement("div",{className:Pr.a.discussItem},t.a.createElement("div",{className:Pr.a.list},t.a.createElement("img",{src:E.a.IMG_SERVER+"/images/"+(ht==null||((Pt=ht.author)===null||Pt===void 0)?void 0:Pt.image_url)}),t.a.createElement("div",{className:Pr.a.wrap},t.a.createElement("div",{className:"font14",style:{marginBottom:6}},t.a.createElement("span",{className:"c-grey-333 mr30"},ht==null||((Dt=ht.author)===null||Dt===void 0)?void 0:Dt.name),t.a.createElement("span",{className:"c-grey-999"},ht==null?void 0:ht.time)),t.a.createElement(at.a,{value:ht==null?void 0:ht.content}),t.a.createElement("div",{className:Pr.a.btns},t.a.createElement("div",{onClick:function(){return rn(ht==null?void 0:ht.id)},className:ht!=null&&ht.user_praise?"c-light-primary":"c-grey-999"},t.a.createElement("i",{className:"iconfont icon-xiaodianzan2 mr3"}),t.a.createElement("span",null,ht==null?void 0:ht.praise_count)),t.a.createElement("div",{onClick:function(){var Bn;if((ht==null||((Bn=ht.children)===null||Bn===void 0)?void 0:Bn.length)===0)return;vt(null),zn(!vn)},style:{color:vn?"#0152d9":"#999999"}},t.a.createElement("i",{className:"iconfont icon-xiaopinglun2 mr3"}),t.a.createElement("span",null,vn?"\u6536\u8D77\u8BC4\u8BBA":ht==null||((Ht=ht.children)===null||Ht===void 0)?void 0:Ht.length)),t.a.createElement("div",{onClick:function(){zn(!1),vt(Ft===(ht==null?void 0:ht.id)?null:ht==null?void 0:ht.id)},style:{color:Ft===(ht==null?void 0:ht.id)?"#0152d9":"#999999"}},t.a.createElement("i",{className:"iconfont icon-huifu3 mr3"}),t.a.createElement("span",null,Ft===(ht==null?void 0:ht.id)?"\u6536\u8D77\u56DE\u590D":"\u56DE\u590D"))),Ft===(ht==null?void 0:ht.id)&&t.a.createElement(yi,{id:ht==null?void 0:ht.id,cb:function(Bn,In){ft(Bn,In),zn(!0)}}),vn&&t.a.createElement("div",{className:Pr.a.secondLevelDiscuss},ht==null||((jt=ht.children)===null||jt===void 0)?void 0:jt.map(function(Tn){return t.a.createElement(ni,{thirdlyReply:Zt,setThirdlyReply:Rt,key:Tn.id,data:Tn,onReplyDiscuss:ft})})))))},Ni=Di,Ui=function(pt){var Pt=pt.identifier,Dt=pt.active,Ht=pt.onOk,jt=Object(n.useState)(""),ht=Object(l.a)(jt,2),ft=ht[0],Ft=ht[1],vt=Object(n.useState)(1),Zt=Object(l.a)(vt,2),Rt=Zt[0],rn=Zt[1],Fn=Object(n.useState)([]),wn=Object(l.a)(Fn,2),vn=wn[0],zn=wn[1],Tn=Object(n.useState)(0),Bn=Object(l.a)(Tn,2),In=Bn[0],ir=Bn[1],Vn=Object(n.useState)(null),cr=Object(l.a)(Vn,2),vr=cr[0],er=cr[1],Dn=Object(n.useState)(null),Qn=Object(l.a)(Dn,2),Pn=Qn[0],Ut=Qn[1];Object(n.useEffect)(function(){cn(1),rn(1)},[Dt]);var cn=function(){var Wn=Object(f.a)(i.a.mark(function on(_n){var Nt;return i.a.wrap(function(Xt){for(;;)switch(Xt.prev=Xt.next){case 0:return Xt.next=2,he({container_type:"QuestionSolutionArticle",container_identifier:Dt,limit:5,page:_n});case 2:Nt=Xt.sent,Nt!=null&&Nt.comments&&(zn((Nt==null?void 0:Nt.comments)||[]),rn(_n),ir(Nt==null?void 0:Nt.disscuss_count));case 4:case"end":return Xt.stop()}},on)}));return function(_n){return Wn.apply(this,arguments)}}(),tr=function(){var Wn=Object(f.a)(i.a.mark(function on(){var _n;return i.a.wrap(function(Bt){for(;;)switch(Bt.prev=Bt.next){case 0:if(!(ft==="")){Bt.next=3;break}return T.b.error("\u8BF7\u8F93\u5165\u5185\u5BB9"),Bt.abrupt("return");case 3:return Bt.next=5,xe({comments:{content:ft},container_type:"QuestionSolutionArticle",container_identifier:Dt});case 5:_n=Bt.sent,_n!=null&&_n.discuss&&(Ft(""),cn(Rt),Ht());case 7:case"end":return Bt.stop()}},on)}));return function(){return Wn.apply(this,arguments)}}(),sr=function(){var Wn=Object(f.a)(i.a.mark(function on(_n,Nt,Bt){var Xt;return i.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return qt.next=2,Ce({container_type:"QuestionSolutionArticle",container_identifier:Dt,comments:{content:Nt,parent_id:_n}});case 2:Xt=qt.sent,er(null),Ut(null),cn(Rt);case 6:case"end":return qt.stop()}},on)}));return function(_n,Nt,Bt){return Wn.apply(this,arguments)}}(),qn=function(){var Wn=Object(f.a)(i.a.mark(function on(_n){var Nt;return i.a.wrap(function(Xt){for(;;)switch(Xt.prev=Xt.next){case 0:return Xt.next=2,be(_n);case 2:Nt=Xt.sent,cn(Rt);case 4:case"end":return Xt.stop()}},on)}));return function(_n){return Wn.apply(this,arguments)}}(),Cn=function(on){rn(on),cn(on)};return t.a.createElement("div",{className:Sr.a.discuss},t.a.createElement("aside",{className:Sr.a.reply,style:{borderWidth:In?1:0}},t.a.createElement(_e.a,{defaultValue:ft,id:"writeForumsReviewId",onChange:function(on){Ft(on)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),t.a.createElement(pr.a,null,t.a.createElement(Or.a,{flex:"1"}),t.a.createElement(Or.a,null,t.a.createElement(ne.a,{type:"primary",size:"large",onClick:function(){return tr()}},"\u53D1\u9001")))),vn==null?void 0:vn.map(function(Wn){return t.a.createElement(Ni,{secondReply:vr,setSecondReply:er,thirdlyReply:Pn,setThirdlyReply:Ut,key:Wn.id,data:Wn,onReplyDiscuss:sr,onPlusDiscuss:qn})}),t.a.createElement(we.a,{className:Sr.a.pagination,showTotal:function(on){return t.a.createElement("span",{style:{color:"#656F87"}},"\u5171",t.a.createElement("span",{className:"c-light-primary"},on),"\u6761\u6570\u636E")},current:Rt,onChange:Cn,total:In,showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,pageSize:5}))},di=Ui,mr=B("hgre"),dr=function(pt){var Pt,Dt,Ht,jt,ht,ft,Ft,vt,Zt,Rt,rn=pt.active,Fn=pt.identifier,wn=pt.onAssist,vn=pt.onEdit,zn=pt.onArticlesSkip,Tn=pt.onClose,Bn=pt.onOk,In=pt.onDelete,ir=pt.detailsIndex,Vn=pt.btnShowStatus,cr=Object(n.useState)(!0),vr=Object(l.a)(cr,2),er=vr[0],Dn=vr[1],Qn=Object(n.useState)({}),Pn=Object(l.a)(Qn,2),Ut=Pn[0],cn=Pn[1];Object(n.useEffect)(function(){rn&&tr()},[rn,ir]);var tr=function(){var on=Object(f.a)(i.a.mark(function _n(){var Nt,Bt,Xt=arguments;return i.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return Nt=Xt.length>0&&Xt[0]!==void 0?Xt[0]:!0,Nt&&Dn(!0),qt.next=4,Object(m.d)(Fn,{active:rn});case 4:Bt=qt.sent,(Bt==null?void 0:Bt.status)===0&&cn((Bt==null?void 0:Bt.data)||{}),Dn(!1);case 7:case"end":return qt.stop()}},_n)}));return function(){return on.apply(this,arguments)}}(),sr=function(){var on=Object(f.a)(i.a.mark(function _n(Nt){var Bt;return i.a.wrap(function(hn){for(;;)switch(hn.prev=hn.next){case 0:return hn.next=2,Object(m.g)(Fn,Object(a.a)({active:rn},Nt));case 2:Bt=hn.sent,(Bt==null?void 0:Bt.status)===0&&(tr(!1),Bn());case 4:case"end":return hn.stop()}},_n)}));return function(Nt){return on.apply(this,arguments)}}(),qn=function(){var on=Object(f.a)(i.a.mark(function _n(Nt){var Bt;return i.a.wrap(function(hn){for(;;)switch(hn.prev=hn.next){case 0:return hn.next=2,Object(m.c)(Fn,{active:Nt==null?void 0:Nt.id});case 2:Bt=hn.sent,Bt.status===0&&(tr(!1),Bn());case 4:case"end":return hn.stop()}},_n)}));return function(Nt){return on.apply(this,arguments)}}(),Cn=function(_n){p.a.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:null,className:"custom-modal-divider",content:"\u786E\u8BA4\u8981\u5220\u9664\u8BE5\u9898\u89E3\u5417?",onOk:function(){return In(_n)}})},Wn=function(){tr(!1),Bn()};return t.a.createElement("div",{className:un.a.listDetails},t.a.createElement(Er.a,{className:"pt20 pl20 pr20",loading:er,active:!0,paragraph:{rows:5}},t.a.createElement("div",{className:un.a.head},t.a.createElement("div",{className:un.a.name},t.a.createElement("div",{title:Ut==null?void 0:Ut.name,className:un.a.title},Ut==null?void 0:Ut.name),(Ut==null?void 0:Ut.is_authority)&&t.a.createElement("div",{className:un.a.b},"\u5B98\u65B9"),(Ut==null?void 0:Ut.is_excellent)&&t.a.createElement("div",{className:un.a.a},"\u7CBE\u9009")),t.a.createElement("div",{className:un.a.tag},t.a.createElement("img",{src:E.a.IMG_SERVER+"/images/"+(Ut==null?void 0:Ut.image_url)}),t.a.createElement("div",{className:"c-grey-333 ml5 mr20 font14"},Ut==null?void 0:Ut.username),t.a.createElement("div",{style:{display:"inline-block",marginBottom:-2},className:"c-grey-999 mr20 font12"},"\u53D1\u5E03\u4E8E",Ne()(Ut==null?void 0:Ut.created_at).format("YYYY-MM-DD")),t.a.createElement("span",null,t.a.createElement("img",{src:W.a}),t.a.createElement("span",null,Ut==null?void 0:Ut.praises_count)),t.a.createElement("span",null,t.a.createElement("img",{src:Ee.a}),t.a.createElement("span",null,Ut==null?void 0:Ut.discusses_count)),t.a.createElement("span",null,t.a.createElement("img",{src:qe.a}),t.a.createElement("span",null,Ut==null?void 0:Ut.viewed_count)),t.a.createElement("div",{className:un.a.btn},(Object(xt.v)()||(Ut==null?void 0:Ut.is_self))&&t.a.createElement(t.a.Fragment,null,t.a.createElement(ne.a,{onClick:function(){return Cn(Ut)},type:"primary",ghost:!0},"\u5220\u9664"),t.a.createElement(ne.a,{onClick:function(){return vn(Ut)},type:"primary",ghost:!0},"\u7F16\u8F91")),Object(xt.v)()&&t.a.createElement(ne.a,{onClick:function(){return sr({is_authority:!(Ut!=null&&Ut.is_authority)})},type:"primary"},t.a.createElement("img",{src:xr.a}),Ut!=null&&Ut.is_authority?"\u53D6\u6D88":"\u8BBE\u4E3A","\u5B98\u65B9"),Object(xt.v)()&&t.a.createElement(ne.a,{onClick:function(){return sr({is_excellent:!(Ut!=null&&Ut.is_excellent)})},type:"primary"},t.a.createElement("img",{src:Nr.a}),Ut!=null&&Ut.is_excellent?"\u53D6\u6D88":"\u8BBE\u4E3A","\u7CBE\u9009")))),t.a.createElement("div",{className:un.a.scroll},(Ut==null||((Pt=Ut.videos)===null||Pt===void 0||((Dt=Pt[0])===null||Dt===void 0))?void 0:Dt.id)&&t.a.createElement("div",{className:un.a.video},t.a.createElement(S.a,{tip:"\u6B63\u5728\u8F6C\u7801\uFF0C\u8BF7\u7A0D\u7B49...",spinning:!(Ut!=null&&(Ht=Ut.videos)!==null&&Ht!==void 0&&(jt=Ht[0])!==null&&jt!==void 0&&jt.transcoded)},t.a.createElement(mr.a,{poster:Ut==null||((ht=Ut.videos)===null||ht===void 0||((ft=ht[0])===null||ft===void 0))?void 0:ft.cover_url,src:(Ut==null||((Ft=Ut.videos)===null||Ft===void 0||((vt=Ft[0])===null||vt===void 0))?void 0:vt.play_url)||"",videoId:Ut==null||((Zt=Ut.videos)===null||Zt===void 0||((Rt=Zt[0])===null||Rt===void 0))?void 0:Rt.id,logWatchHistory:function(){}}))),t.a.createElement(at.a,{className:un.a.html,value:(Ut==null?void 0:Ut.content)||""}),t.a.createElement("div",{onClick:function(){return qn(Ut)},className:un.a.g},t.a.createElement("img",{className:"mr10",src:(Ut!=null&&Ut.user_liker,gr.a)}),t.a.createElement("span",null,Ut==null?void 0:Ut.praises_count)),t.a.createElement(di,{onOk:Wn,active:rn,identifier:Fn})),t.a.createElement("div",{className:un.a.btns},t.a.createElement(ne.a,{onClick:function(){return Tn()},type:"primary",ghost:!0},"\u5173\u95ED"),Vn[0]&&t.a.createElement(ne.a,{onClick:function(_n){return zn(_n,"prev")},style:{marginLeft:20},type:"primary"},"\u4E0A\u4E00\u9898\u89E3"),Vn[1]&&t.a.createElement(ne.a,{onClick:function(_n){return zn(_n,"next")},style:{marginLeft:20},type:"primary"},"\u4E0B\u4E00\u9898\u89E3"))))},qr=dr,ri=B("3tLw"),fi=B.n(ri),ii=B("ek7X"),Xi=B("0NbB"),na=function(pt){var Pt=pt.identifier,Dt=pt.tabStatus,Ht=pt.setFilterListTotal,jt=pt.setListStatus,ht={page:1,limit:10,total:0,search:"",save_search:"",sort_by:"updated_at",sort_direction:null},ft=Object(n.useState)(Object(a.a)({},ht)),Ft=Object(l.a)(ft,2),vt=Ft[0],Zt=Ft[1],Rt=Object(n.useState)(!1),rn=Object(l.a)(Rt,2),Fn=rn[0],wn=rn[1],vn=Object(n.useState)(0),zn=Object(l.a)(vn,2),Tn=zn[0],Bn=zn[1],In=Object(n.useState)(1),ir=Object(l.a)(In,2),Vn=ir[0],cr=ir[1],vr=Object(n.useState)(null),er=Object(l.a)(vr,2),Dn=er[0],Qn=er[1],Pn=Object(n.useState)([]),Ut=Object(l.a)(Pn,2),cn=Ut[0],tr=Ut[1],sr=Object(n.useState)([!0,!0]),qn=Object(l.a)(sr,2),Cn=qn[0],Wn=qn[1],on=Object(n.useState)(0),_n=Object(l.a)(on,2),Nt=_n[0],Bt=_n[1],Xt=Object(n.useRef)(null);Object(n.useEffect)(function(){wr()},[Dt]),Object(n.useEffect)(function(){hn()},[Dn]),Object(n.useEffect)(function(){Nn(Object(a.a)({},ht)),wr()},[Pt]),Object(n.useEffect)(function(){return window.addEventListener("resize",qt),jt(Nt),function(){window.removeEventListener("resize",qt)}},[Nt]);var hn=function(){var Un=Object(f.a)(i.a.mark(function mn(){var jn,Jn;return i.a.wrap(function(Kn){for(;;)switch(Kn.prev=Kn.next){case 0:if(Dn){Kn.next=3;break}return Wn([!0,!0]),Kn.abrupt("return");case 3:jn=[!0,!0],Jn=cn==null?void 0:cn.findIndex(function(_i){return _i.id===Dn}),Jn===0&&vt.page===1&&(jn[0]=!1),(vt.page-1)*vt.limit+(Jn+1)===vt.total&&(jn[1]=!1),Wn(jn);case 8:case"end":return Kn.stop()}},mn)}));return function(){return Un.apply(this,arguments)}}(),qt=function(){if(Nt){var mn,jn=window.innerWidth-((mn=Xt.current)===null||mn===void 0?void 0:mn.clientWidth);Bn(jn)}},Nn=function(){var Un=Object(f.a)(i.a.mark(function mn(jn){var Jn,Lr,Kn,_i;return i.a.wrap(function(Gr){for(;;)switch(Gr.prev=Gr.next){case 0:return wn(!0),Gr.next=3,Object(m.f)(Pt,jn);case 3:return Jn=Gr.sent,(Jn==null?void 0:Jn.status)===0&&(tr((Jn==null||((Lr=Jn.data)===null||Lr===void 0)?void 0:Lr.articles)||[]),Zt(Object(a.a)(Object(a.a)({},jn),{},{total:Jn==null||((Kn=Jn.data)===null||Kn===void 0)?void 0:Kn.articles_count})),Ht(Jn==null||((_i=Jn.data)===null||_i===void 0)?void 0:_i.articles_count)),wn(!1),Gr.abrupt("return",Jn);case 7:case"end":return Gr.stop()}},mn)}));return function(jn){return Un.apply(this,arguments)}}(),pn=function(){(vt==null?void 0:vt.sort_direction)===null?vt.sort_direction="asc":(vt==null?void 0:vt.sort_direction)==="asc"?vt.sort_direction="desc":(vt==null?void 0:vt.sort_direction)==="desc"&&(vt.sort_direction=null),vt.page=1,wr(),Zt(Object(a.a)({},vt)),Nn(vt)},On=function(){vt.page=1,vt.search=vt==null?void 0:vt.save_search,wr(),Zt(Object(a.a)({},vt)),Nn(vt)},gn=function(){var mn,jn=document.getElementsByClassName("btn-resize");jn[0].style.visibility="hidden";var Jn=window.innerWidth-((mn=Xt.current)===null||mn===void 0?void 0:mn.clientWidth);Bn(Jn)},ar=function(){gn(),Bt(1)},Yn=function(mn){gn(),Qn(mn==null?void 0:mn.id),Bt(3)},$n=function(mn){gn(),Qn(mn==null?void 0:mn.id),Bt(2)},wr=function(){var mn=document.getElementsByClassName("btn-resize");mn[0].style.visibility="visible",Bn(0),Bt(0),Qn(null)},jr=function(mn){Bt(3),Qn(mn),vt.page=1,Zt(Object(a.a)({},vt)),Nn(vt)},Ai=function(mn){Bt(3),Qn(mn),Zt(Object(a.a)({},vt)),Nn(vt)},zr=function(mn){Zt(Object(a.a)({},vt)),Nn(vt)},Mi=function(){var Un=Object(f.a)(i.a.mark(function mn(jn){var Jn;return i.a.wrap(function(Kn){for(;;)switch(Kn.prev=Kn.next){case 0:return Kn.next=2,Object(m.c)(Pt,{active:jn==null?void 0:jn.id});case 2:Jn=Kn.sent,Jn.status===0&&(Nn(vt),cr(Vn+1));case 4:case"end":return Kn.stop()}},mn)}));return function(jn){return Un.apply(this,arguments)}}(),Ki=function(){var Un=Object(f.a)(i.a.mark(function mn(jn){var Jn;return i.a.wrap(function(Kn){for(;;)switch(Kn.prev=Kn.next){case 0:return Kn.next=2,Object(m.e)(Pt,{active:jn==null?void 0:jn.id});case 2:Jn=Kn.sent,Jn.status===0&&(Nn(vt),cr(Vn+1));case 4:case"end":return Kn.stop()}},mn)}));return function(jn){return Un.apply(this,arguments)}}(),Hi=function(){var Un=Object(f.a)(i.a.mark(function mn(jn){var Jn;return i.a.wrap(function(Kn){for(;;)switch(Kn.prev=Kn.next){case 0:return Kn.next=2,Object(m.i)(Pt,{active:jn==null?void 0:jn.id});case 2:Jn=Kn.sent,Jn.status===0&&(wr(),Nn(vt));case 4:case"end":return Kn.stop()}},mn)}));return function(jn){return Un.apply(this,arguments)}}(),ji=function(mn){vt.page=mn,Zt(Object(a.a)({},vt)),Nn(vt)},_a=function(){var Un=Object(f.a)(i.a.mark(function mn(jn,Jn){var Lr,Kn,_i,pi,Gr,Mr,oi,ei,Ln,En,Hn;return i.a.wrap(function(An){for(;;)switch(An.prev=An.next){case 0:if(Lr=cn==null?void 0:cn.findIndex(function(fr){return fr.id===Dn}),console.log(Lr,Jn,22),!(Jn==="prev")){An.next=21;break}if(!(Lr===void 0)){An.next=6;break}return T.b.warn("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728"),An.abrupt("return");case 6:if(!(Lr===0)){An.next=19;break}if(!(vt.page===1)){An.next=10;break}return T.b.warn("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728"),An.abrupt("return");case 10:if(!(vt.page!==1)){An.next=17;break}return vt.page=vt.page-1,Zt(Object(a.a)({},vt)),An.next=15,Nn(vt);case 15:Kn=An.sent,(Kn==null?void 0:Kn.status)===0&&(Mr=Kn==null||((_i=Kn.data)===null||_i===void 0)?void 0:_i.articles[(Kn==null||((pi=Kn.data)===null||pi===void 0||((Gr=pi.articles)===null||Gr===void 0))?void 0:Gr.length)-1],Qn(Mr==null?void 0:Mr.id),console.log(jn.target,555));case 17:An.next=21;break;case 19:oi=cn[Lr-1],Qn(oi==null?void 0:oi.id);case 21:if(!(Jn==="next")){An.next=39;break}if(!(Lr===void 0)){An.next=25;break}return T.b.warn("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728"),An.abrupt("return");case 25:if(!((vt.page-1)*vt.limit+(Lr+1)===vt.total)){An.next=28;break}return T.b.warn("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728"),An.abrupt("return");case 28:if(!(Lr+1===vt.limit)){An.next=37;break}return vt.page=vt.page+1,Zt(Object(a.a)({},vt)),An.next=33,Nn(vt);case 33:ei=An.sent,(ei==null?void 0:ei.status)===0&&(En=ei==null||((Ln=ei.data)===null||Ln===void 0)?void 0:Ln.articles[0],Qn(En==null?void 0:En.id)),An.next=39;break;case 37:Hn=cn[Lr+1],Qn(Hn==null?void 0:Hn.id);case 39:case"end":return An.stop()}},mn)}));return function(jn,Jn){return Un.apply(this,arguments)}}();return t.a.createElement("div",{className:gt.a.wrap,ref:Xt},t.a.createElement("div",{className:gt.a.head},t.a.createElement("div",{className:gt.a.sort,onClick:pn},t.a.createElement("span",null,"\u6700\u65B0"),t.a.createElement("aside",null,t.a.createElement(ii.a,{style:{color:(vt==null?void 0:vt.sort_direction)==="asc"?"#0152d9":"#bfbfbf"}}),t.a.createElement(Xi.a,{style:{color:(vt==null?void 0:vt.sort_direction)==="desc"?"#0152d9":"#bfbfbf"}}))),t.a.createElement(Z.a.Search,{value:vt.save_search,className:gt.a["oj-width-input"],placeholder:"\u641C\u7D22\u9898\u89E3",onChange:function(mn){vt.save_search=mn.target.value,Zt(Object(a.a)({},vt))},onSearch:On}),t.a.createElement("div",{onClick:ar,className:gt.a.btn},t.a.createElement("img",{src:fi.a}),"\u5199\u9898\u89E3")),t.a.createElement("div",{className:gt.a.listWarp},t.a.createElement(S.a,{spinning:Fn,className:"mt20"},cn==null?void 0:cn.map(function(Un,mn){var jn=!0;return mn+1===cn.length&&mn!==0&&(jn=!1),t.a.createElement(Lt,{active:Dn,key:Un.id,data:Un,showLine:jn,onClick:Yn,onAssist:Mi,onHide:Ki})}),(cn==null?void 0:cn.length)===0&&t.a.createElement(k.a,{customText:"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"}))),t.a.createElement(we.a,{className:gt.a.pagination,showTotal:function(mn){return t.a.createElement("span",{style:{color:"#656F87"}},"\u5171",t.a.createElement("span",{className:"c-light-primary"},mn),"\u6761\u6570\u636E")},total:vt.total,showSizeChanger:!1,current:vt==null?void 0:vt.page,onChange:ji,hideOnSinglePage:!0,showQuickJumper:!0}),Nt>0&&t.a.createElement("div",{className:gt.a.fixedRight,style:{width:Tn}},Nt===1&&t.a.createElement(rr,{identifier:Pt,onClose:wr,onOk:jr}),Nt===2&&t.a.createElement(rr,{active:Dn,identifier:Pt,onClose:wr,onOk:Ai}),Nt===3&&t.a.createElement(qr,{btnShowStatus:Cn,onArticlesSkip:_a,detailsIndex:Vn,active:Dn,identifier:Pt,onClose:wr,onOk:zr,onEdit:$n,onAssist:Mi,onDelete:Hi})))},ai=na,Yi=B("VEzc"),Zr=B.n(Yi),Wi=function(pt){var Pt,Dt=pt.visible,Ht=pt.onVisible,jt=pt.value,ht=pt.onChange,ft=pt.setIndex,Ft={page:1,per_page:30,total:0,tag_discipline_id:[],search:"",save_search:"",difficulty:null},vt=Object(n.useState)(Ft),Zt=Object(l.a)(vt,2),Rt=Zt[0],rn=Zt[1],Fn=Object(n.useState)([]),wn=Object(l.a)(Fn,2),vn=wn[0],zn=wn[1],Tn=Object(n.useState)([]),Bn=Object(l.a)(Tn,2),In=Bn[0],ir=Bn[1],Vn=Object(n.useState)(!1),cr=Object(l.a)(Vn,2),vr=cr[0],er=cr[1],Dn=Object(n.useRef)([]),Qn=Object(n.useRef)(null),Pn=Object(b.i)();Object(n.useEffect)(function(){return Pn!=null&&Pn.id&&(Qn.current=setInterval(function(){Ut(30)},3e4)),function(){clearInterval(Qn.current)}},[]);var Ut=function(){var Nt=Object(f.a)(i.a.mark(function Bt(Xt){var hn;return i.a.wrap(function(Nn){for(;;)switch(Nn.prev=Nn.next){case 0:return Nn.next=2,Object(m.r)(Pn==null?void 0:Pn.id,{practice_time:Xt});case 2:hn=Nn.sent;case 3:case"end":return Nn.stop()}},Bt)}));return function(Xt){return Nt.apply(this,arguments)}}();Object(n.useEffect)(function(){Wn(Rt),qn()},[]),Object(n.useEffect)(function(){return window.addEventListener("click",tr),function(){window.removeEventListener("click",tr)}},[Pn==null?void 0:Pn.save_identifier,Dt]),Object(n.useEffect)(function(){var Nt=Dn.current.findIndex(function(Nn){return Nn.identifier===(Pn==null?void 0:Pn.save_identifier)}),Bt=Dn.current[Nt-1],Xt=Dn.current[Nt+1],hn=document.getElementById("oj-prev"),qt=document.getElementById("oj-next");Bt?hn.style.display="block":hn.style.display="none",Xt?qt.style.display="block":qt.style.display="none"},[Pn==null?void 0:Pn.save_identifier,Dn.current]);var cn=function(Bt,Xt){if(Bt.id===Xt)return Bt;for(var hn=0,qt=Bt;qt=qt.parentNode;hn++){if(qt.id===Xt)return qt;if(qt==document.documentElement)return!1}},tr=function(){var Nt=Object(f.a)(i.a.mark(function Bt(Xt){var hn,qt,Nn;return i.a.wrap(function(On){for(;;)switch(On.prev=On.next){case 0:if(!cn(Xt.target,"oj-drawer")&&Dt&&Ht(!1),hn=Dn.current.findIndex(function(gn){return gn.identifier===(Pn==null?void 0:Pn.save_identifier)}),qt=Dn.current[hn-1],Nn=Dn.current[hn+1],!(Xt.target.id==="oj-prev")){On.next=14;break}if(!(!qt||hn===-1)){On.next=8;break}return T.b.warn("\u4E0A\u4E00\u9898\u4E0D\u5B58\u5728"),On.abrupt("return");case 8:return Xt.target.style.pointerEvents="none",Xt.target.style.cursor="not-allowed",On.next=12,on(qt==null?void 0:qt.identifier);case 12:ft("0"),setTimeout(function(){Xt.target.style.pointerEvents="auto",Xt.target.style.cursor="pointer"},400);case 14:if(!(Xt.target.id==="oj-next"||Xt.target.id==="oj-modal-next")){On.next=24;break}if(!(!Nn||hn===-1)){On.next=18;break}return T.b.warn("\u4E0B\u4E00\u9898\u4E0D\u5B58\u5728"),On.abrupt("return");case 18:return Xt.target.style.pointerEvents="none",Xt.target.style.cursor="not-allowed",On.next=22,on(Nn==null?void 0:Nn.identifier);case 22:ft("0"),setTimeout(function(){Xt.target.style.pointerEvents="auto",Xt.target.style.cursor="pointer"},400);case 24:case"end":return On.stop()}},Bt)}));return function(Xt){return Nt.apply(this,arguments)}}();Object(n.useEffect)(function(){ht(Pn==null?void 0:Pn.save_identifier);var Nt=In.findIndex(function(Bt){return Bt.some(function(Xt){return Xt.identifier===(Pn==null?void 0:Pn.save_identifier)})});Nt===-1?rn(Object(a.a)(Object(a.a)({},Rt),{},{page:1})):rn(Object(a.a)(Object(a.a)({},Rt),{},{page:Nt+1}))},[Pn==null?void 0:Pn.save_identifier,In]);var sr=function(Bt){Rt.page=1,Rt.tag_discipline_id=Bt,rn(Object(a.a)({},Rt)),Wn(Rt)},qn=function(){var Nt=Object(f.a)(i.a.mark(function Bt(){var Xt;return i.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return qt.next=2,Object(Oe.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice",position:"index"}});case 2:Xt=qt.sent,zn(Xt.tag_disciplines||[]);case 4:case"end":return qt.stop()}},Bt)}));return function(){return Nt.apply(this,arguments)}}(),Cn=function(Bt){Rt.page=1,Rt.difficulty=typeof Bt=="number"?Bt:null,rn(Object(a.a)({},Rt)),Wn(Rt)},Wn=function(){var Nt=Object(f.a)(i.a.mark(function Bt(Xt){var hn,qt,Nn,pn,On,gn;return i.a.wrap(function(Yn){for(;;)switch(Yn.prev=Yn.next){case 0:return er(!0),Yn.next=3,Object(m.p)(Xt);case 3:if(hn=Yn.sent,hn!=null&&hn.practices_list){for(Nn=hn==null||((qt=hn.practices_list)===null||qt===void 0)?void 0:qt.length,pn=[],On=0;On<Nn;On+=Rt==null?void 0:Rt.per_page)pn.push(hn==null||((gn=hn.practices_list)===null||gn===void 0)?void 0:gn.slice(On,On+(Rt==null?void 0:Rt.per_page)));rn(Object(a.a)(Object(a.a)({},Rt),{},{total:hn==null?void 0:hn.practices_count})),Dn.current=(hn==null?void 0:hn.practices_list)||[],ir(pn)}er(!1);case 6:case"end":return Yn.stop()}},Bt)}));return function(Xt){return Nt.apply(this,arguments)}}(),on=function(){var Nt=Object(f.a)(i.a.mark(function Bt(Xt,hn){var qt;return i.a.wrap(function(pn){for(;;)switch(pn.prev=pn.next){case 0:return pn.next=2,Object(Oe.a)("/api/practices/".concat(Xt,"/start"),{method:"get"});case 2:qt=pn.sent,(qt==null?void 0:qt.status)===0&&y.d.push("/problems/".concat(qt==null?void 0:qt.identifier,"/oj/").concat(Xt));case 4:case"end":return pn.stop()}},Bt)}));return function(Xt,hn){return Nt.apply(this,arguments)}}(),_n=function(Bt){Rt.page=Bt,rn(Object(a.a)({},Rt))};return t.a.createElement("div",{className:Zr.a.wrap,id:"oj-drawer",style:{left:Dt?0:-700}},t.a.createElement("div",{className:Zr.a.head},t.a.createElement("div",{className:Zr.a.title},"\u9898\u76EE\u5217\u8868"),t.a.createElement(Z.a.Search,{value:Rt==null?void 0:Rt.save_search,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0\u641C\u7D22",style:{width:178,marginLeft:"auto",marginRight:10},onChange:function(Bt){Rt.save_search=Bt.target.value,rn(Object(a.a)({},Rt))},onSearch:function(){Rt.page=1,Rt.search=Rt.save_search,rn(Object(a.a)({},Rt)),Wn(Rt)}}),t.a.createElement(w.a,{value:Rt==null?void 0:Rt.tag_discipline_id,style:{width:210},mode:"multiple",placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,showArrow:!0,getPopupContainer:function(Bt){return Bt.parentNode},maxTagTextLength:2,maxTagCount:2,onChange:sr},vn.map(function(Nt){return t.a.createElement(w.a.Option,{key:Nt.id,value:Nt.id},Nt.name)})),t.a.createElement(w.a,{style:{width:70,marginLeft:10},allowClear:!0,placeholder:"\u96BE\u5EA6",getPopupContainer:function(Bt){return Bt.parentNode},value:Rt==null?void 0:Rt.difficulty,onChange:Cn},t.a.createElement(w.a.Option,{value:1},"\u7B80\u5355"),t.a.createElement(w.a.Option,{value:2},"\u9002\u4E2D"),t.a.createElement(w.a.Option,{value:3},"\u56F0\u96BE"))),t.a.createElement("div",{className:Zr.a.content},t.a.createElement(S.a,{spinning:vr},In==null||((Pt=In[Rt.page-1])===null||Pt===void 0)?void 0:Pt.map(function(Nt){return t.a.createElement("div",{key:Nt.identifier,className:Zr.a.list,onClick:function(Xt){return on(Nt.identifier,Xt)}},t.a.createElement("i",{style:{visibility:jt===Nt.identifier?"visible":"hidden"},className:"iconfont icon-wancheng1 c-green-29b"}),t.a.createElement("span",{style:{fontWeight:jt===Nt.identifier?"bold":400,color:jt===Nt.identifier?"#ffffff":"#bac4cd"},title:Nt==null?void 0:Nt.name},Nt.name),(Nt==null?void 0:Nt.difficulty)===1&&t.a.createElement("b",{style:{color:"#2FA34F"}},"\u7B80\u5355"),(Nt==null?void 0:Nt.difficulty)===2&&t.a.createElement("b",{style:{color:"#0152d9"}},"\u9002\u4E2D"),(Nt==null?void 0:Nt.difficulty)===3&&t.a.createElement("b",{style:{color:"#FA6400"}},"\u56F0\u96BE"))}))),t.a.createElement("div",{className:Zr.a.footer},t.a.createElement(we.a,{showTotal:function(Bt){return t.a.createElement("span",{style:{color:"#656F87"}},"\u5171",t.a.createElement("span",{className:"c-light-primary"},Bt),"\u6761\u6570\u636E")},total:Rt.total,pageSize:Rt==null?void 0:Rt.per_page,current:Rt==null?void 0:Rt.page,showSizeChanger:!1,onChange:_n,showQuickJumper:!0,hideOnSinglePage:!0})))},Pi=Wi,Ci=function(nt){var pt,Pt=nt.hack,Dt=nt.onTriggerPraise,Ht=nt.topicId,jt=nt.page,ht=nt.onPageChange,ft=nt.user,Ft=nt.submitRecords,vt=nt.submitting,Zt=nt.submitResult,Rt=Object(b.h)(),rn=Object(n.useState)((Rt==null||((pt=Rt.query)===null||pt===void 0)?void 0:pt.tab)||"0"),Fn=Object(l.a)(rn,2),wn=Fn[0],vn=Fn[1],zn=Object(n.useState)(0),Tn=Object(l.a)(zn,2),Bn=Tn[0],In=Tn[1],ir=Object(n.useState)(0),Vn=Object(l.a)(ir,2),cr=Vn[0],vr=Vn[1],er=Object(n.useState)(0),Dn=Object(l.a)(er,2),Qn=Dn[0],Pn=Dn[1],Ut=Object(n.useState)(),cn=Object(l.a)(Ut,2),tr=cn[0],sr=cn[1],qn=Object(n.useState)(!1),Cn=Object(l.a)(qn,2),Wn=Cn[0],on=Cn[1];function _n(Bt){var Xt=Bt.target.id;if(wn==="3"&&Xt!==wn&&(cr===1||cr===2)){p.a.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u6CE8\u610F",icon:null,className:"custom-modal-divider",content:"\u60A8\u6B63\u5728\u7F16\u5199\u9898\u89E3\uFF0C\u70B9\u51FB\u5173\u95ED\u540E\uFF0C\u60A8\u7684\u9898\u89E3\u5185\u5BB9\u5C06\u4E0D\u4F1A\u8FDB\u884C\u4FDD\u5B58\u3002",onOk:function(){vn(Xt)}});return}vn(Xt)}Object(n.useEffect)(function(){var Bt=Ye.a.subscribe("to-commit-info",function(){vn("1")});return Bt},[]);function Nt(){vn("2")}return t.a.createElement("div",{className:ye.a["left-panel"]},t.a.createElement("ul",{className:"".concat(ye.a["s-navs"]," ").concat(ye.a["bg-white"]," ").concat(ye.a.b1)},t.a.createElement("li",{className:"mr40 current"},t.a.createElement("img",{onClick:function(){return on(!0)},src:Ve.a})),t.a.createElement("li",{className:ye.a["oj-mr"]},t.a.createElement("a",{className:wn==="0"?ye.a.active:"",id:"0",onClick:_n},"\u4EFB\u52A1\u63CF\u8FF0")),t.a.createElement("li",{className:ye.a["oj-mr"]},t.a.createElement("a",{className:wn==="3"?ye.a.active:"",id:"3",onClick:_n},"\u9898\u89E3",Qn?"(".concat(Qn,")"):"")),t.a.createElement("li",{className:ye.a["oj-mr"]},t.a.createElement("a",{className:wn==="2"?ye.a.active:"",id:"2",onClick:_n},"\u8BC4\u8BBA",Bn?"(".concat(Bn,")"):"")),t.a.createElement("li",null,t.a.createElement("a",{className:wn==="1"?ye.a.active:"",id:"1",onClick:_n},"\u63D0\u4EA4\u8BB0\u5F55"))),t.a.createElement("div",{className:"".concat(ye.a["tab-panel-body"]," ").concat(wn==="0"?"":"hide"),style:{padding:"0 0 0 16px"}},t.a.createElement(ke,{hack:Pt,onTriggerPraise:Dt,toDiscuss:Nt})),t.a.createElement("div",{className:"".concat(ye.a["tab-panel-body"]," ").concat(wn==="1"?"":"hide")},Ft!=null&&Ft.records_count?t.a.createElement(ee,{page:jt,onPageChange:ht,topicId:Ht,submitting:vt,submitRecords:Ft,submitResult:Zt}):t.a.createElement(k.a,null)),t.a.createElement("div",{className:"".concat(ye.a["tab-panel-body"]," ").concat(wn==="2"?"":"hide"),style:{padding:0}},t.a.createElement(Ct,{setDiscussTotal:In,user:ft,identifier:Pt.identifier,hack:Pt,onTriggerPraise:Dt})),t.a.createElement("div",{className:"".concat(ye.a["tab-panel-body"]," ").concat(wn==="3"?"":"hide"),style:{padding:0}},t.a.createElement(ai,{setListStatus:vr,setFilterListTotal:Pn,tabStatus:wn,identifier:Pt.identifier})),t.a.createElement(Pi,{visible:Wn,setIndex:vn,onVisible:function(Xt){return on(Xt)},value:tr,onChange:function(Xt){return sr(Xt)}}))},$i=B("+aKw"),bi=B("oFv4"),Ji=B.n(bi),Qi=B("S/kP"),hi=B.n(Qi),Zi=B("t/PP"),tn=B.n(Zi),yn=B("LvDl"),an=B.n(yn),Rn=B("P5Jw"),Xn=s.a.Countdown,or={Java:"java",C:"c",Python:"py","C++":"c"},Vt;(function(nt){nt[nt.SET_LOADING=0]="SET_LOADING",nt[nt.GET_DATA=1]="GET_DATA",nt[nt.GET_SUBMIT_RECORDS=2]="GET_SUBMIT_RECORDS",nt[nt.SET_DATA=3]="SET_DATA",nt[nt.SET_DEBUGING=4]="SET_DEBUGING",nt[nt.SET_SUBMITING=5]="SET_SUBMITING",nt[nt.SET_EXECUTE_MESSAGE=6]="SET_EXECUTE_MESSAGE",nt[nt.SET_EXECUTE_RESULT=7]="SET_EXECUTE_RESULT",nt[nt.SET_SUBMIT_RESULT=8]="SET_SUBMIT_RESULT",nt[nt.SET_SHOW_NOTE=9]="SET_SHOW_NOTE",nt[nt.SET_PAGE=10]="SET_PAGE",nt[nt.GET_LANGUAGE=11]="GET_LANGUAGE",nt[nt.GET_DRAWER=12]="GET_DRAWER"})(Vt||(Vt={}));function br(){return new Date().getTime()}var Hr={loading:!0,data:void 0,showNote:!1,debugResult:void 0,submitResult:void 0,debuging:!1,submitting:!1,submitRecords:void 0,submitRecordPage:1,executingMessage:"",languageValue:"",languageList:[],drawerData:[]};function kn(nt,pt){switch(pt.type){case Vt.GET_DATA:return Object(a.a)(Object(a.a)({},nt),pt.payload);case Vt.SET_DATA:return Object(a.a)(Object(a.a)({},nt),{},{data:pt.payload});case Vt.SET_LOADING:return Object(a.a)(Object(a.a)({},nt),{},{loading:pt.payload});case Vt.GET_LANGUAGE:return Object(a.a)(Object(a.a)({},nt),{},{languageList:pt.payload});case Vt.GET_DRAWER:return Object(a.a)(Object(a.a)({},nt),{},{drawerData:pt.payload});case Vt.SET_SHOW_NOTE:return Object(a.a)(Object(a.a)({},nt),{},{showNote:pt.payload});case Vt.SET_DEBUGING:return Object(a.a)(Object(a.a)({},nt),{},{debuging:pt.payload});case Vt.SET_SUBMITING:return Object(a.a)(Object(a.a)({},nt),{},{submitting:pt.payload});case Vt.GET_SUBMIT_RECORDS:return Object(a.a)(Object(a.a)({},nt),{},{submitRecords:pt.payload});case Vt.SET_PAGE:return Object(a.a)(Object(a.a)({},nt),{},{submitRecordPage:pt.payload});case Vt.SET_EXECUTE_MESSAGE:return Object(a.a)(Object(a.a)({},nt),{},{executingMessage:pt.payload});case Vt.SET_EXECUTE_RESULT:return Object(a.a)(Object(a.a)({},nt),pt.payload);case Vt.SET_SUBMIT_RESULT:return Object(a.a)(Object(a.a)({},nt),pt.payload);default:throw new Error}}var Oi=Ke.default=function(nt){var pt,Pt,Dt=nt.children,Ht=Object(n.useReducer)(kn,Hr),jt=Object(l.a)(Ht,2),ht=jt[0],ft=jt[1],Ft=Object(b.i)(),vt=Ft.id,Zt=Object(b.g)(),Rt=Object(b.h)(),rn=ht.languageValue,Fn=ht.languageList,wn=ht.loading,vn=ht.data,zn=ht.debugResult,Tn=ht.submitResult,Bn=ht.submitRecords,In=ht.submitRecordPage,ir=ht.showNote,Vn=ht.debuging,cr=ht.submitting,vr=ht.executingMessage,er=Object(n.useState)("#FFF"),Dn=Object(l.a)(er,2),Qn=Dn[0],Pn=Dn[1],Ut=Object(n.useState)(null),cn=Object(l.a)(Ut,2),tr=cn[0],sr=cn[1],qn=Object(n.useState)({}),Cn=Object(l.a)(qn,2),Wn=Cn[0],on=Cn[1],_n=Object(n.useState)(!1),Nt=Object(l.a)(_n,2),Bt=Nt[0],Xt=Nt[1],hn=Object(n.useRef)(null),qt=Object(n.useRef)(null),Nn=vn==null?void 0:vn.user,pn=vn==null?void 0:vn.hack;Object(n.useEffect)(function(){return Object(y.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),Object(y.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),function(){Object(y.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),Object(y.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}},[]),Object(n.useEffect)(function(){setTimeout(function(){document.title="\u5728\u7EBF\u5237\u9898"},400)}),Object(n.useEffect)(function(){if(Bt){var Ln,En=document.getElementById("oj-next"),Hn=document.getElementById("oj-modal-next");(En==null||((Ln=En.style)===null||Ln===void 0)?void 0:Ln.display)==="none"?Hn.style.display="none":Hn.style.display="block"}},[Bt]),Object(n.useEffect)(function(){function Ln(){return En.apply(this,arguments)}function En(){return En=Object(f.a)(i.a.mark(function Hn(){var Gt,An,fr,Rr,Fr;return i.a.wrap(function(sn){for(;;)switch(sn.prev=sn.next){case 0:return sn.next=2,Object(m.m)(vt);case 2:Gt=sn.sent,Gt.status===401?document.location.href="/user/login":(Gt.hack=Gt.practice,Gt.hack.code=A.Base64.decode(Gt==null||((An=Gt.hack)===null||An===void 0)?void 0:An.code),Fr="".concat(Nn==null?void 0:Nn.login,"-language"),localStorage.getItem(Fr)&&(Gt.hack.language=localStorage.getItem(Fr)),qt.current=an.a.cloneDeep(Gt),qt.current.language=Gt==null||((fr=Gt.hack)===null||fr===void 0)?void 0:fr.language,ft({type:Vt.GET_DATA,payload:{loading:!1,data:Gt}}),ft({type:Vt.SET_SUBMIT_RESULT,payload:{languageValue:Gt==null||((Rr=Gt.hack)===null||Rr===void 0)?void 0:Rr.language}}));case 4:case"end":return sn.stop()}},Hn)})),En.apply(this,arguments)}vt&&Ln()},[vt]),Object(n.useEffect)(function(){ft({type:Vt.SET_SUBMIT_RESULT,payload:{debugResult:void 0}}),Yn(),Xt(!1)},[vt]),Object(n.useEffect)(function(){clearTimeout(hn.current)},[vt]),Object(n.useEffect)(function(){gn()},[vt,In]);var On=function(){window.parent.postMessage("backExercise","*")};function gn(){return ar.apply(this,arguments)}function ar(){return ar=Object(f.a)(i.a.mark(function Ln(){var En;return i.a.wrap(function(Gt){for(;;)switch(Gt.prev=Gt.next){case 0:return Gt.prev=0,Gt.next=3,Object(m.o)(vt,{limit:15,page:In});case 3:En=Gt.sent,ft({type:Vt.GET_SUBMIT_RECORDS,payload:En}),Gt.next=10;break;case 7:Gt.prev=7,Gt.t0=Gt.catch(0),console.log(Gt.t0);case 10:case"end":return Gt.stop()}},Ln,null,[[0,7]])})),ar.apply(this,arguments)}function Yn(){return $n.apply(this,arguments)}function $n(){return $n=Object(f.a)(i.a.mark(function Ln(){var En;return i.a.wrap(function(Gt){for(;;)switch(Gt.prev=Gt.next){case 0:return Gt.prev=0,Gt.next=3,Object(m.w)(vt);case 3:En=Gt.sent,ft({type:Vt.GET_LANGUAGE,payload:En==null?void 0:En.data}),Gt.next=10;break;case 7:Gt.prev=7,Gt.t0=Gt.catch(0),console.log(Gt.t0);case 10:case"end":return Gt.stop()}},Ln,null,[[0,7]])})),$n.apply(this,arguments)}function wr(Ln){ft({type:Vt.SET_PAGE,payload:Ln})}function jr(Ln){return Ai.apply(this,arguments)}function Ai(){return Ai=Object(f.a)(i.a.mark(function Ln(En){var Hn,Gt,An,fr,Rr,Fr;return i.a.wrap(function(sn){for(;;)switch(sn.prev=sn.next){case 0:return Rr=((Hn=window)===null||Hn===void 0||((Gt=Hn.location)===null||Gt===void 0||((An=Gt.pathname)===null||An===void 0||((fr=An.split("/"))===null||fr===void 0)))?void 0:fr[2])||vt,sn.next=3,Object(m.v)(Rr,En||{code:A.Base64.encode(pn.code),language:rn});case 3:return Fr=sn.sent,sn.abrupt("return",Fr);case 5:case"end":return sn.stop()}},Ln)})),Ai.apply(this,arguments)}function zr(){return Mi.apply(this,arguments)}function Mi(){return Mi=Object(f.a)(i.a.mark(function Ln(){var En,Hn,Gt,An,fr,Rr,Fr;return i.a.wrap(function(sn){for(;;)switch(sn.prev=sn.next){case 0:if(!cr){sn.next=2;break}return sn.abrupt("return");case 2:return ft({type:Vt.SET_SUBMITING,payload:!0}),sn.prev=3,Ye.a.publish("to-commit-info"),sn.next=7,jr();case 7:if(En=sn.sent,!(En.status===0)){sn.next=21;break}return Fr=function(){return Fr=Object(f.a)(i.a.mark(function ha(){var Ei,Fi,Bi,zi,aa,oa;return i.a.wrap(function(kr){for(;;)switch(kr.prev=kr.next){case 0:return kr.next=2,Object(m.l)(vt,"submit");case 2:if(Ei=kr.sent,Fi=Ei.status,Bi=Ei.data,zi=br(),aa=zi-fr>(An+3)*1e3,Fi!==0&&!aa&&setTimeout(Rr,1e3),!aa){kr.next=12;break}return p.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),ft({type:Vt.SET_SUBMITING,payload:!1}),kr.abrupt("return");case 12:if(!(Fi===0)){kr.next=19;break}return Bi.status===2&&p.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),kr.next=16,Object(m.o)(vt,{limit:15,page:In});case 16:oa=kr.sent,ft({type:Vt.SET_SUBMIT_RESULT,payload:Object(a.a)(Object(a.a)({},ht),{},{submitResult:Bi,submitting:!1,submitRecords:oa})}),(Bi==null?void 0:Bi.status)===0&&Xt(!0);case 19:case"end":return kr.stop()}},ha)})),Fr.apply(this,arguments)},Rr=function(){return Fr.apply(this,arguments)},Hn={},sn.next=14,Object(m.s)(vt,Hn);case 14:if(Gt=sn.sent,!(Gt.status===-1)){sn.next=18;break}return window.parent.location.href="/classrooms/".concat(Rt.query.coursesId,"/exercise/").concat(Rt.query.exercisesId,"/detail"),sn.abrupt("return");case 18:An=pn.time_limit,fr=br(),Rr();case 21:sn.next=26;break;case 23:sn.prev=23,sn.t0=sn.catch(3),ft({type:Vt.SET_SUBMITING,payload:!1});case 26:case"end":return sn.stop()}},Ln,null,[[3,23]])})),Mi.apply(this,arguments)}function Ki(){return Hi.apply(this,arguments)}function Hi(){return Hi=Object(f.a)(i.a.mark(function Ln(){var En,Hn,Gt,An,fr,Rr,Fr;return i.a.wrap(function(sn){for(;;)switch(sn.prev=sn.next){case 0:return ht.debuging=!0,ft({type:Vt.SET_DEBUGING,payload:!0}),sn.prev=2,sn.next=5,jr();case 5:if(En=sn.sent,!(En.status===0)){sn.next=21;break}return Fr=function(){return Fr=Object(f.a)(i.a.mark(function ha(){var Ei,Fi,Bi,zi,aa,oa;return i.a.wrap(function(kr){for(;;)switch(kr.prev=kr.next){case 0:return kr.next=2,Object(m.l)(vt,"debug");case 2:if(Ei=kr.sent,Fi=Ei.status,Bi=Ei.message,zi=Ei.data,aa=br(),oa=aa-fr>(Hn+3)*1e3,Fi!==0&&!oa&&(ft({type:Vt.SET_EXECUTE_MESSAGE,payload:Bi}),setTimeout(Rr,1e3)),!oa){kr.next=13;break}return p.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),ft({type:Vt.SET_DEBUGING,payload:!1}),kr.abrupt("return");case 13:Fi===0&&(ft({type:Vt.SET_DEBUGING,payload:!1}),zi.status===2&&p.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),ft({type:Vt.SET_EXECUTE_RESULT,payload:Object(a.a)(Object(a.a)({},ht),{},{debugResult:zi,debuging:!1})}));case 14:case"end":return kr.stop()}},ha)})),Fr.apply(this,arguments)},Rr=function(){return Fr.apply(this,arguments)},Hn=pn.time_limit,Gt={input:encodeURIComponent(vn.test_case.input)},sn.next=13,Object(m.h)(vt,Gt);case 13:if(An=sn.sent,!(An.status===-1)){sn.next=17;break}return window.parent.location.href="/classrooms/".concat(Rt.query.coursesId,"/exercise/").concat(Rt.query.exercisesId,"/detail"),sn.abrupt("return");case 17:fr=br(),Rr(),sn.next=22;break;case 21:ft({type:Vt.SET_DEBUGING,payload:!1});case 22:sn.next=27;break;case 24:sn.prev=24,sn.t0=sn.catch(2),console.log(sn.t0);case 27:return sn.prev=27,sn.finish(27);case 29:case"end":return sn.stop()}},Ln,null,[[2,24,27,29]])})),Hi.apply(this,arguments)}function ji(Ln){var En;clearTimeout(hn.current),hn.current=setTimeout(function(){var Hn;jr({code:A.Base64.encode(Ln),language:qt==null||((Hn=qt.current)===null||Hn===void 0)?void 0:Hn.language})},2e3),ft({type:Vt.SET_DATA,payload:Object(a.a)(Object(a.a)({},qt==null?void 0:qt.current),{},{hack:Object(a.a)(Object(a.a)({},qt==null||((En=qt.current)===null||En===void 0)?void 0:En.hack),{},{code:Ln})})})}function _a(Ln){var En=Ln.target.value;ft({type:Vt.SET_DATA,payload:Object(a.a)(Object(a.a)({},vn),{},{test_case:{input:En}})})}var Un=function(){var Ln=Object(f.a)(i.a.mark(function En(Hn){var Gt,An,fr,Rr,Fr;return i.a.wrap(function(sn){for(;;)switch(sn.prev=sn.next){case 0:return ft({type:Vt.SET_LOADING,payload:!0}),sn.next=3,jr();case 3:if(Gt=sn.sent,!(Gt.status===0)){sn.next=14;break}return ft({type:Vt.SET_SUBMIT_RESULT,payload:{languageValue:Hn}}),qt.current.language=Hn,An="".concat(Nn==null?void 0:Nn.login,"-language"),localStorage.setItem(An,Hn),sn.next=11,Object(m.w)(vt);case 11:fr=sn.sent,fr.status===0&&(Fr=fr==null||((Rr=fr.data)===null||Rr===void 0)?void 0:Rr.find(function(ia){return ia.language===Hn}),ji(A.Base64.decode(Fr.code))),setTimeout(function(){ft({type:Vt.SET_LOADING,payload:!1})},300);case 14:case"end":return sn.stop()}},En)}));return function(Hn){return Ln.apply(this,arguments)}}();function mn(){return jn.apply(this,arguments)}function jn(){return jn=Object(f.a)(i.a.mark(function Ln(){var En;return i.a.wrap(function(Gt){for(;;)switch(Gt.prev=Gt.next){case 0:return Gt.prev=0,Gt.next=3,Object(m.q)(vt,{language:rn});case 3:En=Gt.sent,En.status===401?Zt.replace("/login",{from:Rt.pathname}):(ji(A.Base64.decode(En.code)),Yn()),Gt.next=10;break;case 7:Gt.prev=7,Gt.t0=Gt.catch(0),console.log(Gt.t0);case 10:case"end":return Gt.stop()}},Ln,null,[[0,7]])})),jn.apply(this,arguments)}function Jn(){p.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:t.a.createElement("p",null,"\u521D\u59CB\u4EE3\u7801\u6709\u4FEE\u6539\uFF0C\u66F4\u65B0\u540E\u5C06\u8986\u76D6\u73B0\u6709\u4EE3\u7801\u54E6~ ",t.a.createElement("br",null),"\u8BF7\u5C06\u60A8\u7F16\u8F91\u7684\u4EE3\u7801\u4FDD\u5B58\u81F3\u672C\u5730\uFF0C\u4EE5\u9632\u4E22\u5931"),onOk:function(){return Object(f.a)(i.a.mark(function En(){var Hn;return i.a.wrap(function(An){for(;;)switch(An.prev=An.next){case 0:return An.next=2,Object(m.t)(vt,{language:rn});case 2:Hn=An.sent,Hn.status===401?Zt.replace("/login",{from:Rt.pathname}):ji(A.Base64.decode(Hn.code));case 4:case"end":return An.stop()}},En)}))()}})}function Lr(){ft({type:Vt.SET_SHOW_NOTE,payload:!0})}function Kn(){ft({type:Vt.SET_SHOW_NOTE,payload:!1})}function _i(Ln){return pi.apply(this,arguments)}function pi(){return pi=Object(f.a)(i.a.mark(function Ln(En){return i.a.wrap(function(Gt){for(;;)switch(Gt.prev=Gt.next){case 0:return Gt.next=2,Object(m.b)(vt,En);case 2:ft({type:Vt.GET_DATA,payload:{showNote:!1,data:Object(a.a)(Object(a.a)({},vn),{},{hack:Object(a.a)(Object(a.a)({},pn),{},{notes:En.notes})})}});case 3:case"end":return Gt.stop()}},Ln)})),pi.apply(this,arguments)}var Gr={input:vn==null||((pt=vn.test_case)===null||pt===void 0)?void 0:pt.input,language:pn==null?void 0:pn.language,code:pn==null?void 0:pn.code,title:"main."+or[pn==null?void 0:pn.language],modify_code:pn==null?void 0:pn.modify_code,notes:pn==null?void 0:pn.notes,debugResult:zn,debuging:Vn,submitting:cr,executingMessage:vr,id:vt,languageValue:rn,languageList:Fn,onChangeLanguage:Un,onCancelNote:Kn,onAddNote:_i,showNote:ir,onShowNote:Lr,onSubmitCode:zr,onChangeCode:ji,onChangeInput:_a,onDebugCode:Ki,onResetCode:mn,onSyncCode:Jn,onUpdateCode:jr};function Mr(){return oi.apply(this,arguments)}function oi(){return oi=Object(f.a)(i.a.mark(function Ln(){var En,Hn,Gt;return i.a.wrap(function(fr){for(;;)switch(fr.prev=fr.next){case 0:return fr.next=2,Object(m.u)(pn.id,{container_type:"Hack",type:1});case 2:En=fr.sent,Hn=En.praise_count,Gt=Object(a.a)(Object(a.a)({},vn),{},{hack:Object(a.a)(Object(a.a)({},pn),{},{praises_count:Hn,user_praise:!pn.user_praise})}),ft({type:Vt.SET_DATA,payload:Gt});case 6:case"end":return fr.stop()}},Ln)})),oi.apply(this,arguments)}var ei={topicId:vt,submitResult:Tn,submitRecords:Bn,submitting:cr,page:In,onPageChange:wr,hack:pn,user:vn==null?void 0:vn.user,onTriggerPraise:Mr};return console.log(vn,qt==null?void 0:qt.current,"data--------"),t.a.createElement(t.a.Fragment,null,t.a.createElement(S.a,{className:"oj-custom-large-spin",size:"large",spinning:wn},vn?t.a.createElement("div",{className:"oj-custom-warp"},t.a.createElement("header",{className:D.a.header,style:{minWidth:1200}},t.a.createElement("div",null,t.a.createElement("img",{src:"".concat(E.a.IMG_SERVER,"/images/").concat(Nn.image_url),alt:"user",width:30}),t.a.createElement("span",null,Nn.name)),t.a.createElement("h2",{className:"flex-wrp flex_box_column flex_box_center"},t.a.createElement("div",null,pn.name),t.a.createElement($i.a,{onChange:function(En){},className:"font12 c-grey-999"})),t.a.createElement(Rn.CopyToClipboard,{text:"".concat((Pt=window.location)===null||Pt===void 0?void 0:Pt.origin,"/problems/").concat(pn.identifier,"/share"),onCopy:function(){return T.b.success("\u590D\u5236\u9898\u76EE\u94FE\u63A5\u6210\u529F")}},t.a.createElement("span",{className:D.a.btn_back,style:{marginRight:10,cursor:"pointer"}}," ",t.a.createElement("i",{className:"iconfont icon-fenxiang1 font14 mr5"}),"\u5206\u4EAB\u9898\u76EE")),pn.edit_privilege?t.a.createElement(_.a,{className:D.a.btn_back,to:"/problems/".concat(pn.identifier,"/ojedit"),style:{marginRight:10}}," ",t.a.createElement(d.a,null)," \u7F16\u8F91"):null,t.a.createElement(_.a,{className:D.a.btn_back,onClick:function(){},to:"/problems"}," ",t.a.createElement(v.a,null),"\u9000\u51FA")),t.a.createElement(g.a,{hideResize:!0,className:"my-problems oj-problems",leftChild:t.a.createElement(Ci,ei),rightChild:t.a.createElement(Ur,Gr)})):null),t.a.createElement(p.a,{centered:!0,closable:!1,width:680,footer:null,visible:Bt,className:"oj-modal"},t.a.createElement("section",{className:"oj-modal-content"},t.a.createElement("div",{className:"oj-modal-head"},t.a.createElement("img",{src:Ji.a,alt:""}),t.a.createElement("i",{onClick:function(){return Xt(!1)},className:"iconfont icon-guanbi1"})),t.a.createElement("aside",null,t.a.createElement("img",{className:"mr30",src:tn.a}),"\u8FD0\u884C\u65F6\u95F4:\xA0",t.a.createElement("span",{style:{color:"#75d6ba",marginRight:100}},Tn==null?void 0:Tn.execute_time,"s"),"\u4F18\u4E8E",t.a.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(Tn==null?void 0:Tn.time_better_than)||100,"%"),"\u7684\u7528\u6237"),t.a.createElement("aside",{className:"mb50"},t.a.createElement("img",{src:hi.a,className:"mr30"}),t.a.createElement("span",{className:"oj-modal-tt"},t.a.createElement("span",null,t.a.createElement("span",null,"\u5360\u7528\u5185\u5B58:\xA0"),t.a.createElement("span",{className:"c-light-primary"},Tn==null?void 0:Tn.execute_memory,"mb")),t.a.createElement("span",null,t.a.createElement("span",null))),"\u4F18\u4E8E",t.a.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(Tn==null?void 0:Tn.memory_better_than)||100,"%"),"\u7684\u7528\u6237"),t.a.createElement("div",{id:"oj-modal-next",className:"oj-modal-btn"},"\u8FDB\u5165\u4E0B\u4E00\u9898"))))};function nr(nt){var pt=nt.languageValue,Pt=nt.languageList,Dt=nt.onChangeLanguage,Ht=nt.title,jt=nt.modify_code,ht=nt.onSyncCode,ft=nt.onShowCodeSetting,Ft=nt.onResetCode,vt=Object(b.h)(),Zt=function(){p.a.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:t.a.createElement(o.a,null),content:"\u4F60\u5728\u672C\u6587\u4EF6\u4E2D\u4FEE\u6539\u7684\u5185\u5BB9\u5C06\u4E22\u5931\uFF0C\u662F\u5426\u786E\u5B9A\u91CD\u65B0\u52A0\u8F7D\u521D\u59CB\u4EE3\u7801\uFF1F",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Ft})};return t.a.createElement("div",{className:"action-bar"},t.a.createElement(w.a,{className:"oj-select",value:pt,style:{width:100},placeholder:"\u9009\u62E9\u8BED\u8A00",onChange:Dt},Pt==null?void 0:Pt.map(function(Rt){return t.a.createElement(w.a.Option,{key:Rt.language,value:Rt.language},Rt.language)})),t.a.createElement("span",null),t.a.createElement("a",{title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",onClick:Zt},t.a.createElement("i",{className:"iconfont icon-zhongzhi font-20 "})),t.a.createElement("a",{onClick:ft},t.a.createElement("i",{className:"iconfont icon-shezhi"})))}function Ur(nt){var pt=nt.id,Pt=nt.input,Dt=nt.showNote,Ht=nt.onShowNote,jt=nt.notes,ht=nt.onCancelNote,ft=nt.onAddNote,Ft=nt.debugResult,vt=nt.language,Zt=nt.debuging,Rt=nt.submitting,rn=nt.executingMessage,Fn=nt.code,wn=nt.onSubmitCode,vn=nt.onDebugCode,zn=nt.onChangeCode,Tn=nt.onChangeInput,Bn=nt.onUpdateCode,In=Object(Q.a)(nt,["id","input","showNote","onShowNote","notes","onCancelNote","onAddNote","debugResult","language","debuging","submitting","executingMessage","code","onSubmitCode","onDebugCode","onChangeCode","onChangeInput","onUpdateCode"]);function ir(cr){return t.a.createElement(nr,Object(ae.a)({},In,{onShowCodeSetting:cr}))}var Vn={id:pt,input:Pt,debugResult:Ft,debuging:Zt,submitting:Rt,executingMessage:rn,onDebugCode:vn,onChangeCode:zn,onSubmitCode:wn,onChangeInput:Tn};return t.a.createElement("div",{className:"right-panel"},t.a.createElement(x.a,{language:vt,value:Fn,onChange:zn,ActionBarRender:ir}),t.a.createElement("div",{className:"note-form-area ".concat(Dt?"active":"")},t.a.createElement(ie,{onCancel:ht,notes:jt,callback:ft})),t.a.createElement(F.b,Vn))}},WaYH:function(Je,Ke,B){"use strict";var ae=B("rePB"),Q=B("Ff2n"),U=B("VTBJ"),w=B("1OyB"),P=B("vuIU"),S=B("JX7q"),C=B("Ji7U"),T=B("LK+K"),h=B("cDcd"),p=B("TSYQ"),f=B.n(p),l=B("sboe"),a=B("OZM5"),c=function(_){var m=_.prefixCls,g=_.level,E=_.isStart,o=_.isEnd;if(!g)return null;for(var x="".concat(m,"-indent-unit"),A=[],O=0;O<g;O+=1){var D;A.push(h.createElement("span",{key:O,className:f()(x,(D={},Object(ae.a)(D,"".concat(x,"-start"),E[O+1]),Object(ae.a)(D,"".concat(x,"-end"),o[O+1]),Object(ae.a)(D,"".concat(x,"-end-first-level"),!O&&o[0]),D))}))}return h.createElement("span",{"aria-hidden":"true",className:"".concat(m,"-indent")},A)},s=c,u=B("815F"),i="open",n="close",t="---",d=function(y){Object(C.a)(m,y);var _=Object(T.a)(m);function m(){var g;return Object(w.a)(this,m),g=_.apply(this,arguments),g.state={dragNodeHighlight:!1},g.onSelectorClick=function(E){var o=g.props.context.onNodeClick;o(E,Object(u.b)(g.props)),g.isSelectable()?g.onSelect(E):g.onCheck(E)},g.onSelectorDoubleClick=function(E){var o=g.props.context.onNodeDoubleClick;o(E,Object(u.b)(g.props))},g.onSelect=function(E){if(g.isDisabled())return;var o=g.props.context.onNodeSelect;E.preventDefault(),o(E,Object(u.b)(g.props))},g.onCheck=function(E){if(g.isDisabled())return;var o=g.props,x=o.disableCheckbox,A=o.checked,O=g.props.context.onNodeCheck;if(!g.isCheckable()||x)return;E.preventDefault();var D=!A;O(E,Object(u.b)(g.props),D)},g.onMouseEnter=function(E){var o=g.props.context.onNodeMouseEnter;o(E,Object(u.b)(g.props))},g.onMouseLeave=function(E){var o=g.props.context.onNodeMouseLeave;o(E,Object(u.b)(g.props))},g.onContextMenu=function(E){var o=g.props.context.onNodeContextMenu;o(E,Object(u.b)(g.props))},g.onDragStart=function(E){var o=g.props.context.onNodeDragStart;E.stopPropagation(),g.setState({dragNodeHighlight:!0}),o(E,Object(S.a)(g));try{E.dataTransfer.setData("text/plain","")}catch(x){}},g.onDragEnter=function(E){var o=g.props.context.onNodeDragEnter;E.preventDefault(),E.stopPropagation(),o(E,Object(S.a)(g))},g.onDragOver=function(E){var o=g.props.context.onNodeDragOver;E.preventDefault(),E.stopPropagation(),o(E,Object(S.a)(g))},g.onDragLeave=function(E){var o=g.props.context.onNodeDragLeave;E.stopPropagation(),o(E,Object(S.a)(g))},g.onDragEnd=function(E){var o=g.props.context.onNodeDragEnd;E.stopPropagation(),g.setState({dragNodeHighlight:!1}),o(E,Object(S.a)(g))},g.onDrop=function(E){var o=g.props.context.onNodeDrop;E.preventDefault(),E.stopPropagation(),g.setState({dragNodeHighlight:!1}),o(E,Object(S.a)(g))},g.onExpand=function(E){var o=g.props.context.onNodeExpand;o(E,Object(u.b)(g.props))},g.setSelectHandle=function(E){g.selectHandle=E},g.getNodeState=function(){var E=g.props.expanded;return g.isLeaf()?null:E?i:n},g.hasChildren=function(){var E=g.props.eventKey,o=g.props.context.keyEntities,x=o[E]||{},A=x.children;return!!(A||[]).length},g.isLeaf=function(){var E=g.props,o=E.isLeaf,x=E.loaded,A=g.props.context.loadData,O=g.hasChildren();return o===!1?!1:o||!A&&!O||A&&x&&!O},g.isDisabled=function(){var E=g.props.disabled,o=g.props.context.disabled;return!!(o||E)},g.isCheckable=function(){var E=g.props.checkable,o=g.props.context.checkable;return!o||E===!1?!1:o},g.syncLoadData=function(E){var o=E.expanded,x=E.loading,A=E.loaded,O=g.props.context,D=O.loadData,I=O.onNodeLoad;if(x)return;D&&o&&!g.isLeaf()&&(!g.hasChildren()&&!A&&I(Object(u.b)(g.props)))},g.renderSwitcher=function(){var E=g.props,o=E.expanded,x=E.switcherIcon,A=g.props.context,O=A.prefixCls,D=A.switcherIcon,I=x||D;if(g.isLeaf())return h.createElement("span",{className:f()("".concat(O,"-switcher"),"".concat(O,"-switcher-noop"))},typeof I=="function"?I(Object(U.a)(Object(U.a)({},g.props),{},{isLeaf:!0})):I);var F=f()("".concat(O,"-switcher"),"".concat(O,"-switcher_").concat(o?i:n));return h.createElement("span",{onClick:g.onExpand,className:F},typeof I=="function"?I(Object(U.a)(Object(U.a)({},g.props),{},{isLeaf:!1})):I)},g.renderCheckbox=function(){var E=g.props,o=E.checked,x=E.halfChecked,A=E.disableCheckbox,O=g.props.context.prefixCls,D=g.isDisabled(),I=g.isCheckable();if(!I)return null;var F=typeof I!="boolean"?I:null;return h.createElement("span",{className:f()("".concat(O,"-checkbox"),o&&"".concat(O,"-checkbox-checked"),!o&&x&&"".concat(O,"-checkbox-indeterminate"),(D||A)&&"".concat(O,"-checkbox-disabled")),onClick:g.onCheck},F)},g.renderIcon=function(){var E=g.props.loading,o=g.props.context.prefixCls;return h.createElement("span",{className:f()("".concat(o,"-iconEle"),"".concat(o,"-icon__").concat(g.getNodeState()||"docu"),E&&"".concat(o,"-icon_loading"))})},g.renderSelector=function(){var E=g.state.dragNodeHighlight,o=g.props,x=o.title,A=o.selected,O=o.icon,D=o.loading,I=o.data,F=g.props.context,z=F.prefixCls,ne=F.showIcon,j=F.icon,G=F.draggable,X=F.loadData,Z=F.titleRender,K=g.isDisabled(),q="".concat(z,"-node-content-wrapper"),ie;if(ne){var oe=O||j;ie=oe?h.createElement("span",{className:f()("".concat(z,"-iconEle"),"".concat(z,"-icon__customize"))},typeof oe=="function"?oe(g.props):oe):g.renderIcon()}else X&&D&&(ie=g.renderIcon());var ye;typeof x=="function"?ye=x(I):Z?ye=Z(I):ye=x;var pe=h.createElement("span",{className:"".concat(z,"-title")},ye);return h.createElement("span",{ref:g.setSelectHandle,title:typeof x=="string"?x:"",className:f()("".concat(q),"".concat(q,"-").concat(g.getNodeState()||"normal"),!K&&(A||E)&&"".concat(z,"-node-selected"),!K&&G&&"draggable"),draggable:!K&&G||void 0,"aria-grabbed":!K&&G||void 0,onMouseEnter:g.onMouseEnter,onMouseLeave:g.onMouseLeave,onContextMenu:g.onContextMenu,onClick:g.onSelectorClick,onDoubleClick:g.onSelectorDoubleClick,onDragStart:G?g.onDragStart:void 0},ie,pe)},g}return Object(P.a)(m,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var E=this.props.selectable,o=this.props.context.selectable;return typeof E=="boolean"?E:o}},{key:"render",value:function(){var E,o=this.props,x=o.eventKey,A=o.className,O=o.style,D=o.dragOver,I=o.dragOverGapTop,F=o.dragOverGapBottom,z=o.isLeaf,ne=o.isStart,j=o.isEnd,G=o.expanded,X=o.selected,Z=o.checked,K=o.halfChecked,q=o.loading,ie=o.domRef,oe=o.active,ye=o.onMouseMove,pe=Object(Q.a)(o,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),we=this.props.context,fe=we.prefixCls,Te=we.filterTreeNode,Fe=we.draggable,De=we.keyEntities,Me=this.isDisabled(),Ue=Object(a.f)(pe),ve=De[x]||{},ce=ve.level,Ie=j[j.length-1];return h.createElement("div",Object.assign({ref:ie,className:f()(A,"".concat(fe,"-treenode"),(E={},Object(ae.a)(E,"".concat(fe,"-treenode-disabled"),Me),Object(ae.a)(E,"".concat(fe,"-treenode-switcher-").concat(G?"open":"close"),!z),Object(ae.a)(E,"".concat(fe,"-treenode-checkbox-checked"),Z),Object(ae.a)(E,"".concat(fe,"-treenode-checkbox-indeterminate"),K),Object(ae.a)(E,"".concat(fe,"-treenode-selected"),X),Object(ae.a)(E,"".concat(fe,"-treenode-loading"),q),Object(ae.a)(E,"".concat(fe,"-treenode-active"),oe),Object(ae.a)(E,"".concat(fe,"-treenode-leaf-last"),Ie),Object(ae.a)(E,"drag-over",!Me&&D),Object(ae.a)(E,"drag-over-gap-top",!Me&&I),Object(ae.a)(E,"drag-over-gap-bottom",!Me&&F),Object(ae.a)(E,"filter-node",Te&&Te(Object(u.b)(this.props))),E)),style:O,onDragEnter:Fe?this.onDragEnter:void 0,onDragOver:Fe?this.onDragOver:void 0,onDragLeave:Fe?this.onDragLeave:void 0,onDrop:Fe?this.onDrop:void 0,onDragEnd:Fe?this.onDragEnd:void 0,onMouseMove:ye},Ue),h.createElement(s,{prefixCls:fe,level:ce,isStart:ne,isEnd:j}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),m}(h.Component),v=function(_){return h.createElement(l.a.Consumer,null,function(m){return h.createElement(d,Object.assign({},_,{context:m}))})};v.displayName="TreeNode",v.defaultProps={title:t},v.isTreeNode=1;var b=Ke.a=v},Wtmd:function(Je,Ke,B){Je.exports=B.p+"static/c.03ba6fd6.svg"},Wx9E:function(Je,Ke,B){},XIdC:function(Je,Ke,B){"use strict";var ae=B("rePB"),Q=B("ODXe"),U=B("Ff2n"),w=B("cDcd"),P=B.n(w),S=B("TSYQ"),C=B.n(S),T=B("6cGi"),h=B("4IlW"),p=w.forwardRef(function(f,l){var a,c=f.prefixCls,s=c===void 0?"rc-switch":c,u=f.className,i=f.checked,n=f.defaultChecked,t=f.disabled,d=f.loadingIcon,v=f.checkedChildren,b=f.unCheckedChildren,y=f.onClick,_=f.onChange,m=f.onKeyDown,g=Object(U.a)(f,["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"]),E=Object(T.a)(!1,{value:i,defaultValue:n}),o=Object(Q.a)(E,2),x=o[0],A=o[1];function O(z,ne){var j=x;return t||(j=z,A(j),_==null||_(j,ne)),j}function D(z){z.which===h.a.LEFT?O(!1,z):z.which===h.a.RIGHT&&O(!0,z),m==null||m(z)}function I(z){var ne=O(!x,z);y==null||y(ne,z)}var F=C()(s,u,(a={},Object(ae.a)(a,"".concat(s,"-checked"),x),Object(ae.a)(a,"".concat(s,"-disabled"),t),a));return w.createElement("button",Object.assign({},g,{type:"button",role:"switch","aria-checked":x,disabled:t,className:F,ref:l,onKeyDown:D,onClick:I}),d,w.createElement("span",{className:"".concat(s,"-inner")},x?v:b))});p.displayName="Switch",Ke.a=p},Y1PL:function(Je,Ke,B){"use strict";B.r(Ke),B.d(Ke,"ResizableTextArea",function(){return K});var ae=B("wx14"),Q=B("1OyB"),U=B("vuIU"),w=B("Ji7U"),P=B("LK+K"),S=B("cDcd"),C=B("VTBJ"),T=B("rePB"),h=B("Zm9Q"),p=B("Kwbf"),f=B("c+Xe"),l=B("m+aA"),a=B("bdgK"),c=new Map;function s(oe){oe.forEach(function(ye){var pe,we=ye.target;(pe=c.get(we))===null||pe===void 0||pe.forEach(function(fe){return fe(we)})})}var u=new a.default(s),i=null,n=null;function t(oe,ye){c.has(oe)||(c.set(oe,new Set),u.observe(oe)),c.get(oe).add(ye)}function d(oe,ye){c.has(oe)&&(c.get(oe).delete(ye),c.get(oe).size||(u.unobserve(oe),c.delete(oe)))}var v=function(oe){Object(w.a)(pe,oe);var ye=Object(P.a)(pe);function pe(){return Object(Q.a)(this,pe),ye.apply(this,arguments)}return Object(U.a)(pe,[{key:"render",value:function(){return this.props.children}}]),pe}(S.Component),b=S.createContext(null);function y(oe){var ye=oe.children,pe=oe.onBatchResize,we=S.useRef(0),fe=S.useRef([]),Te=S.useContext(b),Fe=S.useCallback(function(De,Me,Ue){we.current+=1;var ve=we.current;fe.current.push({size:De,element:Me,data:Ue}),Promise.resolve().then(function(){ve===we.current&&(pe==null||pe(fe.current),fe.current=[])}),Te==null||Te(De,Me,Ue)},[pe,Te]);return S.createElement(b.Provider,{value:Fe},ye)}function _(oe){var ye=oe.children,pe=oe.disabled,we=S.useRef(null),fe=S.useRef(null),Te=S.useContext(b),Fe=S.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),De=S.isValidElement(ye)&&Object(f.c)(ye),Me=De?ye.ref:null,Ue=S.useMemo(function(){return Object(f.a)(Me,we)},[Me,we]),ve=S.useRef(oe);ve.current=oe;var ce=S.useCallback(function(Ie){var Ne=ve.current,Xe=Ne.onResize,ee=Ne.data,k=Ie.getBoundingClientRect(),N=k.width,$=k.height,V=Ie.offsetWidth,Y=Ie.offsetHeight,me=Math.floor(N),Ae=Math.floor($);if(Fe.current.width!==me||Fe.current.height!==Ae||Fe.current.offsetWidth!==V||Fe.current.offsetHeight!==Y){var at={width:me,height:Ae,offsetWidth:V,offsetHeight:Y};Fe.current=at;var Le=V===Math.round(N)?N:V,ke=Y===Math.round($)?$:Y,Ye=Object(C.a)(Object(C.a)({},at),{},{offsetWidth:Le,offsetHeight:ke});Te==null||Te(Ye,Ie,ee),Xe&&Promise.resolve().then(function(){Xe(Ye,Ie)})}},[]);return S.useEffect(function(){var Ie=Object(l.a)(we.current)||Object(l.a)(fe.current);return Ie&&!pe&&t(Ie,ce),function(){return d(Ie,ce)}},[we.current,pe]),S.createElement(v,{ref:fe},De?S.cloneElement(ye,{ref:Ue}):ye)}var m="rc-observer-key";function g(oe){var ye=oe.children,pe=Object(h.a)(ye);return pe.map(function(we,fe){var Te=(we==null?void 0:we.key)||"".concat(m,"-").concat(fe);return S.createElement(_,Object(ae.a)({},oe,{key:Te}),we)})}g.Collection=y;var E=g,o=B("bT9E"),x=B("TSYQ"),A=B.n(x),O=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important
`,D=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],I={},F;function z(oe){var ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,pe=oe.getAttribute("id")||oe.getAttribute("data-reactid")||oe.getAttribute("name");if(ye&&I[pe])return I[pe];var we=window.getComputedStyle(oe),fe=we.getPropertyValue("box-sizing")||we.getPropertyValue("-moz-box-sizing")||we.getPropertyValue("-webkit-box-sizing"),Te=parseFloat(we.getPropertyValue("padding-bottom"))+parseFloat(we.getPropertyValue("padding-top")),Fe=parseFloat(we.getPropertyValue("border-bottom-width"))+parseFloat(we.getPropertyValue("border-top-width")),De=D.map(function(Ue){return"".concat(Ue,":").concat(we.getPropertyValue(Ue))}).join(";"),Me={sizingStyle:De,paddingSize:Te,borderSize:Fe,boxSizing:fe};return ye&&pe&&(I[pe]=Me),Me}function ne(oe){var ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,pe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,we=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;F||(F=document.createElement("textarea"),F.setAttribute("tab-index","-1"),F.setAttribute("aria-hidden","true"),document.body.appendChild(F)),oe.getAttribute("wrap")?F.setAttribute("wrap",oe.getAttribute("wrap")):F.removeAttribute("wrap");var fe=z(oe,ye),Te=fe.paddingSize,Fe=fe.borderSize,De=fe.boxSizing,Me=fe.sizingStyle;F.setAttribute("style","".concat(Me,";").concat(O)),F.value=oe.value||oe.placeholder||"";var Ue=Number.MIN_SAFE_INTEGER,ve=Number.MAX_SAFE_INTEGER,ce=F.scrollHeight,Ie;if(De==="border-box"?ce+=Fe:De==="content-box"&&(ce-=Te),pe!==null||we!==null){F.value=" ";var Ne=F.scrollHeight-Te;pe!==null&&(Ue=Ne*pe,De==="border-box"&&(Ue=Ue+Te+Fe),ce=Math.max(Ue,ce)),we!==null&&(ve=Ne*we,De==="border-box"&&(ve=ve+Te+Fe),Ie=ce>ve?"":"hidden",ce=Math.min(ve,ce))}return{height:ce,minHeight:Ue,maxHeight:ve,overflowY:Ie,resize:"none"}}var j=B("Gytx"),G=B.n(j),X;(function(oe){oe[oe.NONE=0]="NONE",oe[oe.RESIZING=1]="RESIZING",oe[oe.RESIZED=2]="RESIZED"})(X||(X={}));var Z=function(oe){Object(w.a)(pe,oe);var ye=Object(P.a)(pe);function pe(we){var fe;return Object(Q.a)(this,pe),fe=ye.call(this,we),fe.nextFrameActionId=void 0,fe.resizeFrameId=void 0,fe.textArea=void 0,fe.saveTextArea=function(Te){fe.textArea=Te},fe.handleResize=function(Te){var Fe=fe.state.resizeStatus,De=fe.props,Me=De.autoSize,Ue=De.onResize;if(Fe!==X.NONE)return;typeof Ue=="function"&&Ue(Te),Me&&fe.resizeOnNextFrame()},fe.resizeOnNextFrame=function(){cancelAnimationFrame(fe.nextFrameActionId),fe.nextFrameActionId=requestAnimationFrame(fe.resizeTextarea)},fe.resizeTextarea=function(){var Te=fe.props.autoSize;if(!Te||!fe.textArea)return;var Fe=Te.minRows,De=Te.maxRows,Me=ne(fe.textArea,!1,Fe,De);fe.setState({textareaStyles:Me,resizeStatus:X.RESIZING},function(){cancelAnimationFrame(fe.resizeFrameId),fe.resizeFrameId=requestAnimationFrame(function(){fe.setState({resizeStatus:X.RESIZED},function(){fe.resizeFrameId=requestAnimationFrame(function(){fe.setState({resizeStatus:X.NONE}),fe.fixFirefoxAutoScroll()})})})})},fe.renderTextArea=function(){var Te=fe.props,Fe=Te.prefixCls,De=Fe===void 0?"rc-textarea":Fe,Me=Te.autoSize,Ue=Te.onResize,ve=Te.className,ce=Te.disabled,Ie=fe.state,Ne=Ie.textareaStyles,Xe=Ie.resizeStatus,ee=Object(o.a)(fe.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),k=A()(De,ve,Object(T.a)({},"".concat(De,"-disabled"),ce));"value"in ee&&(ee.value=ee.value||"");var N=Object(C.a)(Object(C.a)(Object(C.a)({},fe.props.style),Ne),Xe===X.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return S.createElement(E,{onResize:fe.handleResize,disabled:!(Me||Ue)},S.createElement("textarea",Object(ae.a)({},ee,{className:k,style:N,ref:fe.saveTextArea})))},fe.state={textareaStyles:{},resizeStatus:X.NONE},fe}return Object(U.a)(pe,[{key:"componentDidUpdate",value:function(fe){(fe.value!==this.props.value||!G()(fe.autoSize,this.props.autoSize))&&this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var fe=this.textArea.selectionStart,Te=this.textArea.selectionEnd;this.textArea.setSelectionRange(fe,Te)}}catch(Fe){}}},{key:"render",value:function(){return this.renderTextArea()}}]),pe}(S.Component),K=Z,q=function(oe){Object(w.a)(pe,oe);var ye=Object(P.a)(pe);function pe(we){var fe;Object(Q.a)(this,pe),fe=ye.call(this,we),fe.resizableTextArea=void 0,fe.focus=function(){fe.resizableTextArea.textArea.focus()},fe.saveTextArea=function(Fe){fe.resizableTextArea=Fe},fe.handleChange=function(Fe){var De=fe.props.onChange;fe.setValue(Fe.target.value,function(){fe.resizableTextArea.resizeTextarea()}),De&&De(Fe)},fe.handleKeyDown=function(Fe){var De=fe.props,Me=De.onPressEnter,Ue=De.onKeyDown;Fe.keyCode===13&&Me&&Me(Fe),Ue&&Ue(Fe)};var Te=typeof we.value=="undefined"||we.value===null?we.defaultValue:we.value;return fe.state={value:Te},fe}return Object(U.a)(pe,[{key:"setValue",value:function(fe,Te){"value"in this.props||this.setState({value:fe},Te)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return S.createElement(K,Object(ae.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(fe){return"value"in fe?{value:fe.value}:null}}]),pe}(S.Component),ie=Ke.default=q},Z8dc:function(Je,Ke,B){Je.exports={flex_box_center:"flex_box_center___3U5jH",flex_space_between:"flex_space_between___10tgP",flex_box_vertical_center:"flex_box_vertical_center___1e5pu",flex_box_center_end:"flex_box_center_end___WDBuM",flex_box_column:"flex_box_column___3TSEG",listForm:"listForm___264Pu",scroll:"scroll___CK9uS",formWrap:"formWrap___2n6e2",btns:"btns___2wuct",main:"main___1WFqr",mainLoading:"mainLoading___1kJWi",tip:"tip___10JaH",proWarp:"proWarp___TMP84",pro:"pro___1CLLm",mainSucceed:"mainSucceed___3NYgf",del:"del___34rdE"}},ZD9Y:function(Je,Ke,B){"use strict";var ae=B("BoS7"),Q=B("Sdc0"),U=B("OaEy"),w=B("2fM7"),P=B("cDcd"),S=B.n(P),C=B("lOMy"),T=B.n(C),h=w.a.Option;Ke.a=function(p){var f=p.onFontSizeChange,l=p.cmFontSize,a=p.cmCodeMode,c=p.onCodeModeChange,s=p.onTabToSpace,u=p.className,i=u===void 0?"":u,n=p.tabToSpace,t=p.children;return S.a.createElement("div",{className:"tpi-code-setting ".concat(i)},S.a.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),S.a.createElement("section",null,S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),S.a.createElement(w.a,{bordered:!1,size:"small",value:a,onChange:c},S.a.createElement(h,{value:"vs"},"\u767D\u8272\u80CC\u666F"),S.a.createElement(h,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),S.a.createElement(w.a,{bordered:!1,size:"small",value:l,onChange:f},S.a.createElement(h,{value:12},"12px"),S.a.createElement(h,{value:14},"14px"),S.a.createElement(h,{value:16},"16px"),S.a.createElement(h,{value:18},"18px"),S.a.createElement(h,{value:20},"20px"),S.a.createElement(h,{value:22},"22px"))),S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"Tab\u8F6C\u6362"),S.a.createElement(Q.a,{checked:n,onChange:s}))),S.a.createElement("h3",null,"\u5FEB\u6377\u952E"),S.a.createElement("section",null,S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),S.a.createElement("span",null,"Ctrl + S")),S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),S.a.createElement("span",null,"F1 / Alt + F1")),S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),S.a.createElement("span",null,"Ctrl + ]/[")),S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),S.a.createElement("span",null,"Ctrl + Shift + \\")),S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),S.a.createElement("span",null,"Home")),S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),S.a.createElement("span",null,"End"))),t)}},ZW9T:function(Je,Ke,B){"use strict";B.d(Ke,"a",function(){return b});var ae=B("k1fw"),Q=B("miYZ"),U=B("tsqr"),w=B("rAM+"),P=B("tJVT"),S=B("PpiC"),C=B("cDcd"),T=B.n(C),h=B("bdgK");function p(y,_,m,g,E){var o=_.getWordUntilPosition(m),x={startLineNumber:m.lineNumber,endLineNumber:m.lineNumber,startColumn:o.startColumn,endColumn:o.endColumn},A=g.map(function(O){return{label:O,kind:y.languages.CompletionItemKind.Keyword,insertText:O,insertTextRules:y.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:x}});return E.map(function(O){A.push(Object(ae.a)(Object(ae.a)({},O),{},{range:x}))}),A}var f=function(y){var _={label:"ifelse",kind:y.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`),insertTextRules:y.languages.CompletionItemInsertTextRule.InsertAsSnippet},m=["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","inline","restrict","_Bool","_Complex","_Imaginary","_Alignas","_Alignof","_Atomic","_Static_assert","_Noreturn","_Thread_local","_Generic"];y.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(x,A){var O=p(y,x,A,m,[_]);return{suggestions:O}}});var g=["False","None","True","and","as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"];y.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(x,A){var O=[{label:"print",kind:y.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
`),insertTextRules:y.languages.CompletionItemInsertTextRule.InsertAsSnippet}],D=p(y,x,A,g,O);return{suggestions:D}}});var E=["abstract","assert","boolean","break","byte","case","catch","char","class","const","continue","default","do","double","else","enum","extends","final","finally","float","for","goto","if","implements","import","instance of","int","interface","long","native","new","package","private","protected","public","return","strictfp","short","static","super","switch","synchronized","this","throw","throws","transient","try","void","volatile","while"];y.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(x,A){var O=[_,{label:"main",kind:y.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
`),insertTextRules:y.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:y.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
`),insertTextRules:y.languages.CompletionItemInsertTextRule.InsertAsSnippet}],D=p(y,x,A,E,O);return{suggestions:D}}})},l="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",a=B("LvDl"),c=B("+ua5");function s(y){return/^\d+$/.test(y)?"".concat(y,"px"):y}function u(){}var i=!1,n={"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 t(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],_=y;if(Array.isArray(y)){for(var m=0;m<y.length;m++){var g=n[y[m]];if(g)return g}return _[0]}return n[_]||_}var d=null,v=Ke.b=function(y){var _=y.width,m=_===void 0?"100%":_,g=y.height,E=g===void 0?"100%":g,o=y.value,x=y.language,A=x===void 0?"javascript":x,O=y.style,D=O===void 0?{}:O,I=y.options,F=I===void 0?{}:I,z=y.overrideServices,ne=z===void 0?{}:z,j=y.theme,G=j===void 0?"vs-dark":j,X=y.onEditBlur,Z=y.onSave,K=y.autoHeight,q=K===void 0?!1:K,ie=y.forbidCopy,oe=ie===void 0?!1:ie,ye=y.onChange,pe=ye===void 0?u:ye,we=y.editorDidMount,fe=we===void 0?u:we,Te=y.onFocus,Fe=Te===void 0?u:Te,De=y.filename,Me=De===void 0?"educoder.txt":De,Ue=y.errorLine,ve=y.errorContent,ce=ve===void 0?"":ve,Ie=Object(S.a)(y,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),Ne=Object(C.useRef)(),Xe=Object(C.useRef)({}),ee=Object(C.useRef)(),k=Object(C.useRef)(!1),N=Object(C.useRef)(),$=Object(C.useState)(!1),V=Object(P.a)($,2),Y=V[0],me=V[1];function Ae(){var rt;return Ne.current&&(rt=new h.default(function(dt){var xt=Object(w.a)(dt),_t;try{for(xt.s();!(_t=xt.n()).done;){var wt=_t.value;(wt.target.offsetHeight>0||wt.target.offsetWidth>0)&&Xe.current.instance.layout()}}catch(st){xt.e(st)}finally{xt.f()}}),rt.observe(Ne.current)),rt}function at(){U.b.warn(decodeURIComponent(l))}var Le=function(){var dt=Xe.current.instance;if(o!=null&&dt&&Y){var xt=dt.getModel();xt&&o!==xt.getValue()&&(i=!0,xt.setValue(o),dt.layout(),i=!1)}};Object(C.useEffect)(function(){ee.current&&clearTimeout(ee.current),ee.current=setTimeout(function(){Le()},500)},[o,Y,Xe.current]),Object(C.useEffect)(function(){if(Ue&&Xe.current&&Xe.current.instance){var rt=Xe.current.instance;rt.changeViewZones(function(xt){var _t=document.createElement("div");_t.style.padding="10px 20px",_t.style.width="calc(100% - 20px)",_t.className="my-error-line-wrp",_t.innerHTML=ce,xt.addZone({afterLineNumber:Ue||11,heightInLines:3,domNode:_t})});var dt={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};rt.addOverlayWidget(dt),rt.revealPositionInCenter({lineNumber:20,column:1})}},[Ue,Xe.current,Y]);function ke(){var rt=Xe.current.instance;if(rt){var dt=rt.getSelection(),xt=Xe.current.pastePos||{},_t=new d.Range(xt.startLineNumber||dt.endLineNumber,xt.startColumn||dt.endColumn,xt.endLineNumber||dt.endLineNumber,xt.endColumn||dt.endColumn);setTimeout(function(){rt.executeEdits("",[{range:_t,text:""}])},300)}}function Ye(rt){(window.navigator.platform.match("Mac")?rt.metaKey:rt.ctrlKey)&&rt.keyCode==83&&(rt.preventDefault(),Z())}var Ze=function(){if(q&&Xe.current.instance){var dt=Xe.current.instance.getContentHeight();Be(dt<E?E:dt)}else Be(E)};function Ve(rt){var dt=document.createEvent("MouseEvents");dt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),rt.dispatchEvent(dt)}function He(rt,dt){var xt=window.URL||window.webkitURL||window,_t=new Blob([dt]),wt=document.createElementNS("http://www.w3.org/1999/xhtml","a");wt.href=xt.createObjectURL(_t),wt.download=rt,Ve(wt)}Object(C.useEffect)(function(){Ze()},[Ze]),Object(C.useEffect)(function(){Ne.current&&!Y&&B.e(27).then(B.t.bind(null,"M/lh",7)).then(function(rt){try{d=rt,Xe.current.instance=d.editor.create(Ne.current,{value:o,language:t(A),theme:G,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},ne);var dt=Xe.current.instance;if(fe(dt,d),setTimeout(function(){Ze(),Xe.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){He(Me||"educoder.txt",dt.getValue())}})},500),Xe.current.subscription=dt.onDidChangeModelContent(function(_t){k.current?clearTimeout(N.current):(Ze(),pe(dt.getValue(),_t)),N.current=setTimeout(function(){k.current=!1},500)}),window.Monaco||f(d),oe&&(dt.addCommand(d.KeyMod.CtrlCmd|d.KeyMod.Shift|d.KeyCode.KEY_V,function(){return at(),null}),dt.addCommand(d.KeyMod.CtrlCmd|d.KeyCode.KEY_C,function(){return at(),null})),window.Monaco=d,X&&dt.onDidBlurEditorWidget(function(){X(dt.getValue())}),Fe&&dt.onDidFocusEditorText(function(){Fe(dt.getValue())}),oe){dt.addCommand(d.KeyMod.CtrlCmd|d.KeyCode.KEY_V,function(){return at(),null}),dt.onDidPaste(function(_t){Xe.current.pastePos=_t});try{window.addEventListener("paste",ke)}catch(_t){}}var xt=Ae();return me(!0),function(){var _t=Xe.current.instance;_t.dispose();var wt=_t.getModel();wt&&wt.dispose(),Xe.current.subscription&&Xe.current.subscription.dispose(),oe&&window.removeEventListener("paste",ke),xt.unobserve(Ne.current)}}catch(_t){}})},[]),Object(C.useEffect)(function(){var rt=Xe.current.instance;if(rt&&Y)return document.addEventListener("keydown",Ye,!1),function(){document.removeEventListener("keydown",Ye)}},[Z,Y]),Object(C.useEffect)(function(){var rt=Xe.current.instance;if(rt&&Y){var dt=t(A);d.editor.setModelLanguage(rt.getModel(),dt),console.log("language:",A,rt.getModel(),dt)}},[A,Y]),Object(C.useEffect)(function(){var rt=Xe.current.instance;rt&&Y&&d.editor.setTheme(G)},[G,Y]),Object(C.useEffect)(function(){var rt=Xe.current.instance;rt&&Y&&(rt.updateOptions(Object(ae.a)({},F)),setTimeout(function(){rt.getModel().updateOptions(Object(ae.a)({},F))},200))},[JSON.stringify(F),Y]),Object(C.useEffect)(function(){var rt=Xe.current.instance;rt&&Y&&rt.layout()},[m,E,Y]);var Pe=Object(C.useState)(s(m)),Re=Object(P.a)(Pe,2),Oe=Re[0],he=Re[1],be=Object(C.useState)(s(E)),Ce=Object(P.a)(be,2),xe=Ce[0],Be=Ce[1],Qe=Object(ae.a)(Object(ae.a)({},D),{},{width:Oe,height:xe});return T.a.createElement("div",{className:"my-monaco-editor",ref:Ne,style:Qe})};function b(y){var _=y.width,m=_===void 0?"100%":_,g=y.height,E=g===void 0?"100%":g,o=y.original,x=y.modified,A=y.language,O=y.options,D=O===void 0?{}:O,I=Object(C.useRef)(),F=Object(C.useState)(null),z=Object(P.a)(F,2),ne=z[0],j=z[1];function G(q){var ie;return I.current&&(ie=new h.default(function(oe){var ye=Object(w.a)(oe),pe;try{for(ye.s();!(pe=ye.n()).done;){var we=pe.value;(we.target.offsetHeight>0||we.target.offsetWidth>0)&&q.layout()}}catch(fe){ye.e(fe)}finally{ye.f()}}),ie.observe(I.current)),ie}Object(C.useEffect)(function(){I.current&&B.e(27).then(B.t.bind(null,"M/lh",7)).then(function(q){d=q;var ie=d.editor.createDiffEditor(I.current,Object(ae.a)(Object(ae.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},D),{},{wordWrap:!0}));j(ie);var oe=G(ie);return function(){ie.dispose();var ye=ie.getModel();ye&&ye.dispose(),oe.unobserve(I.current)}})},[]),Object(C.useEffect)(function(){ne&&ne.setModel({original:d.editor.createModel(o,A),modified:d.editor.createModel(x,A)})},[o,x,A,ne]);var X=s(m),Z=s(E),K={width:X,height:Z};return T.a.createElement("div",{className:"my-diff-editor",ref:I,style:K})}},ZpRC:function(Je,Ke,B){"use strict";function ae(f){return typeof f=="object"&&f!=null&&f.nodeType===1}function Q(f,l){return(!l||f!=="hidden")&&f!=="visible"&&f!=="clip"}function U(f,l){if(f.clientHeight<f.scrollHeight||f.clientWidth<f.scrollWidth){var a=getComputedStyle(f,null);return Q(a.overflowY,l)||Q(a.overflowX,l)||function(c){var s=function(u){if(!u.ownerDocument||!u.ownerDocument.defaultView)return null;try{return u.ownerDocument.defaultView.frameElement}catch(i){return null}}(c);return!!s&&(s.clientHeight<c.scrollHeight||s.clientWidth<c.scrollWidth)}(f)}return!1}function w(f,l,a,c,s,u,i,n){return u<f&&i>l||u>f&&i<l?0:u<=f&&n<=a||i>=l&&n>=a?u-f-c:i>l&&n<a||u<f&&n>a?i-l+s:0}var P=function(f,l){var a=window,c=l.scrollMode,s=l.block,u=l.inline,i=l.boundary,n=l.skipOverflowHiddenElements,t=typeof i=="function"?i:function(Ne){return Ne!==i};if(!ae(f))throw new TypeError("Invalid target");for(var d=document.scrollingElement||document.documentElement,v=[],b=f;ae(b)&&t(b);){if((b=b.parentElement)===d){v.push(b);break}b!=null&&b===document.body&&U(b)&&!U(document.documentElement)||b!=null&&U(b,n)&&v.push(b)}for(var y=a.visualViewport?a.visualViewport.width:innerWidth,_=a.visualViewport?a.visualViewport.height:innerHeight,m=window.scrollX||pageXOffset,g=window.scrollY||pageYOffset,E=f.getBoundingClientRect(),o=E.height,x=E.width,A=E.top,O=E.right,D=E.bottom,I=E.left,F=s==="start"||s==="nearest"?A:s==="end"?D:A+o/2,z=u==="center"?I+x/2:u==="end"?O:I,ne=[],j=0;j<v.length;j++){var G=v[j],X=G.getBoundingClientRect(),Z=X.height,K=X.width,q=X.top,ie=X.right,oe=X.bottom,ye=X.left;if(c==="if-needed"&&A>=0&&I>=0&&D<=_&&O<=y&&A>=q&&D<=oe&&I>=ye&&O<=ie)return ne;var pe=getComputedStyle(G),we=parseInt(pe.borderLeftWidth,10),fe=parseInt(pe.borderTopWidth,10),Te=parseInt(pe.borderRightWidth,10),Fe=parseInt(pe.borderBottomWidth,10),De=0,Me=0,Ue="offsetWidth"in G?G.offsetWidth-G.clientWidth-we-Te:0,ve="offsetHeight"in G?G.offsetHeight-G.clientHeight-fe-Fe:0;if(d===G)De=s==="start"?F:s==="end"?F-_:s==="nearest"?w(g,g+_,_,fe,Fe,g+F,g+F+o,o):F-_/2,Me=u==="start"?z:u==="center"?z-y/2:u==="end"?z-y:w(m,m+y,y,we,Te,m+z,m+z+x,x),De=Math.max(0,De+g),Me=Math.max(0,Me+m);else{De=s==="start"?F-q-fe:s==="end"?F-oe+Fe+ve:s==="nearest"?w(q,oe,Z,fe,Fe+ve,F,F+o,o):F-(q+Z/2)+ve/2,Me=u==="start"?z-ye-we:u==="center"?z-(ye+K/2)+Ue/2:u==="end"?z-ie+Te+Ue:w(ye,ie,K,we,Te+Ue,z,z+x,x);var ce=G.scrollLeft,Ie=G.scrollTop;F+=Ie-(De=Math.max(0,Math.min(Ie+De,G.scrollHeight-Z+ve))),z+=ce-(Me=Math.max(0,Math.min(ce+Me,G.scrollWidth-K+Ue)))}ne.push({el:G,top:De,left:Me})}return ne};function S(f){return f===Object(f)&&Object.keys(f).length!==0}function C(f,l){l===void 0&&(l="auto");var a="scrollBehavior"in document.body.style;f.forEach(function(c){var s=c.el,u=c.top,i=c.left;s.scroll&&a?s.scroll({top:u,left:i,behavior:l}):(s.scrollTop=u,s.scrollLeft=i)})}function T(f){return f===!1?{block:"end",inline:"nearest"}:S(f)?f:{block:"start",inline:"nearest"}}function h(f,l){var a=!f.ownerDocument.documentElement.contains(f);if(S(l)&&typeof l.behavior=="function")return l.behavior(a?[]:P(f,l));if(a)return;var c=T(l);return C(P(f,c),c.behavior)}var p=Ke.a=h},ZsLC:function(Je,Ke,B){Je.exports={"left-panel":"left-panel___FTwwW","tab-panel-body":"tab-panel-body___2YSOx",b1:"b1___3qx3o","oj-mr":"oj-mr___1GA9N","oj-width-input":"oj-width-input___3GkyP","s-navs":"s-navs___1fGGf","bg-white":"bg-white___1ZAy0",active:"active___39N6D"}},bCnd:function(Je,Ke,B){"use strict";B.d(Ke,"b",function(){return w}),B.d(Ke,"a",function(){return P});var ae=B("je13"),Q=B.n(ae),U=!1;function w(S,C){var T=Q.a.get("__ec");T||(T={}),T[S]=C,Q.a.set("__ec",T)}function P(S,C){var T=Q.a.get("__ec");return T?T[S]===void 0?C:T[S]:C}},bT9E:function(Je,Ke,B){"use strict";B.d(Ke,"a",function(){return Q});var ae=B("VTBJ");function Q(U,w){var P=Object(ae.a)({},U);return Array.isArray(w)&&w.forEach(function(S){delete P[S]}),P}},bdLU:function(Je,Ke,B){"use strict";B.d(Ke,"a",function(){return ae});var ae;(function(Q){Q[Q.NOMATCH=-1]="NOMATCH",Q[Q.OK=0]="OK",Q[Q.TIMEOUT=2]="TIMEOUT",Q[Q.PODFAILURE=3]="PODFAILURE",Q[Q.COMPILEFAILURE=4]="COMPILEFAILURE",Q[Q.EXECUTEFAILURE=5]="EXECUTEFAILURE"})(ae||(ae={}))},biw7:function(Je,Ke,B){"use strict";var ae=B("cDcd"),Q=B.n(ae),U=ae.createContext(null);Ke.a=U},c5Ni:function(Je,Ke,B){},cDPC:function(Je,Ke,B){"use strict";var ae=B("tJVT"),Q=B("cDcd"),U=B.n(Q),w=B("i3hx"),P=B.n(w);Ke.a=function(S){var C=S.defaultX,T=C===void 0?"40%":C,h=S.leftChild,p=S.rightChild,f=S.className,l=S.hideResize,a=l===void 0?!1:l,c=Object(Q.useState)(T),s=Object(ae.a)(c,2),u=s[0],i=s[1],n=Object(Q.useRef)();function t(){n.current=!0}Object(Q.useEffect)(function(){function b(_){n.current&&i(_.pageX)}function y(){n.current=!1}return window.addEventListener("mousemove",b),window.addEventListener("mouseup",y),function(){window.removeEventListener("mousemove",b),window.removeEventListener("mouseup",y)}},[]);var d=typeof u=="number"&&u!==.01?"".concat(u,"px"):T,v="calc(100% - ".concat(a?"0px":"4px"," - ").concat(d,")");return U.a.createElement("div",{className:"split-panel-container ".concat(f)},U.a.createElement("section",{style:{width:d,display:u===.01?"none":""}},h),U.a.createElement("section",{className:"resize-x-bar",onMouseDown:t},U.a.createElement("a",{className:"btn-resize"},U.a.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},U.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"})))),U.a.createElement("section",{style:{width:v}},p))}},dejd:function(Je,Ke,B){},dmUQ:function(Je,Ke,B){"use strict";var ae=B("Ff2n"),Q=B("rePB"),U=B("1OyB"),w=B("vuIU"),P=B("Ji7U"),S=B("md7G"),C=B("foSv"),T=B("cDcd"),h=B.n(T),p=B("TSYQ"),f=B.n(p),l=B("4IlW");function a(o,x){var A=Object.keys(o);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(o);x&&(O=O.filter(function(D){return Object.getOwnPropertyDescriptor(o,D).enumerable})),A.push.apply(A,O)}return A}function c(o){for(var x=1;x<arguments.length;x++){var A=arguments[x]!=null?arguments[x]:{};x%2?a(Object(A),!0).forEach(function(O){Object(Q.a)(o,O,A[O])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(A)):a(Object(A)).forEach(function(O){Object.defineProperty(o,O,Object.getOwnPropertyDescriptor(A,O))})}return o}function s(o){var x=u();return function(){var O=Object(C.a)(o),D;if(x){var I=Object(C.a)(this).constructor;D=Reflect.construct(O,arguments,I)}else D=O.apply(this,arguments);return Object(S.a)(this,D)}}function u(){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}}function i(){}function n(o){o.preventDefault()}var t=function(x){return x.replace(/[^\w.-]+/g,"")},d=200,v=600,b=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,y=function(x){return x!=null},_=function(x,A){return A===x||typeof A=="number"&&typeof x=="number"&&isNaN(A)&&isNaN(x)},m=function(o){Object(P.a)(A,o);var x=s(A);function A(O){var D;Object(U.a)(this,A),D=x.call(this,O),D.onKeyDown=function(z){var ne=D.props,j=ne.onKeyDown,G=ne.onPressEnter;if(z.keyCode===l.a.UP){var X=D.getRatio(z);D.up(z,X,null),D.stop()}else if(z.keyCode===l.a.DOWN){var Z=D.getRatio(z);D.down(z,Z,null),D.stop()}else z.keyCode===l.a.ENTER&&G&&G(z);if(D.recordCursorPosition(),D.lastKeyCode=z.keyCode,j){for(var K=arguments.length,q=new Array(K>1?K-1:0),ie=1;ie<K;ie++)q[ie-1]=arguments[ie];j.apply(void 0,[z].concat(q))}},D.onKeyUp=function(z){var ne=D.props.onKeyUp;if(D.stop(),D.recordCursorPosition(),ne){for(var j=arguments.length,G=new Array(j>1?j-1:0),X=1;X<j;X++)G[X-1]=arguments[X];ne.apply(void 0,[z].concat(G))}},D.onChange=function(z){var ne=D.props.onChange;D.state.focused&&(D.inputting=!0),D.rawInput=D.props.parser(D.getValueFromEvent(z)),D.setState({inputValue:D.rawInput}),ne(D.toNumber(D.rawInput))},D.onMouseUp=function(){var z=D.props.onMouseUp;D.recordCursorPosition(),z&&z.apply(void 0,arguments)},D.onFocus=function(){var z;D.setState({focused:!0}),(z=D.props).onFocus.apply(z,arguments)},D.onBlur=function(){var z=D.props.onBlur;D.inputting=!1,D.setState({focused:!1});var ne=D.getCurrentValidValue(D.state.inputValue),j=D.setValue(ne,i);if(z){var G=D.input.value,X=D.getInputDisplayValue({focus:!1,value:j});D.input.value=X&&Number(X),z.apply(void 0,arguments),D.input.value=G}},D.getRatio=function(z){var ne=1;return z.metaKey||z.ctrlKey?ne=.1:z.shiftKey&&(ne=10),ne},D.getFullNum=function(z){return isNaN(z)?z:/e/i.test(String(z))?Number(z).toFixed(18).replace(/\.?0+$/,""):z},D.getPrecision=function(z){if(y(D.props.precision))return D.props.precision;var ne=String(z);if(ne.indexOf("e-")>=0)return parseInt(ne.slice(ne.indexOf("e-")+2),10);var j=0;return ne.indexOf(".")>=0&&(j=ne.length-ne.indexOf(".")-1),j},D.getInputDisplayValue=function(z){var ne=z||D.state,j=ne.focused,G=ne.inputValue,X=ne.value,Z;j?Z=G:Z=D.toPrecisionAsStep(X),Z==null&&(Z="");var K=D.formatWrapper(Z);return y(D.props.decimalSeparator)&&(K=K.toString().replace(".",D.props.decimalSeparator)),K},D.recordCursorPosition=function(){try{D.cursorStart=D.input.selectionStart,D.cursorEnd=D.input.selectionEnd,D.currentValue=D.input.value,D.cursorBefore=D.input.value.substring(0,D.cursorStart),D.cursorAfter=D.input.value.substring(D.cursorEnd)}catch(z){}},D.restoreByAfter=function(z){if(z===void 0)return!1;var ne=D.input.value,j=ne.lastIndexOf(z);if(j===-1)return!1;var G=D.cursorBefore.length;return D.lastKeyCode===l.a.DELETE&&D.cursorBefore.charAt(G-1)===z[0]?(D.fixCaret(G,G),!0):j+z.length===ne.length?(D.fixCaret(j,j),!0):!1},D.partRestoreByAfter=function(z){return z===void 0?!1:Array.prototype.some.call(z,function(ne,j){var G=z.substring(j);return D.restoreByAfter(G)})},D.isNotCompleteNumber=function(z){return isNaN(z)||z===""||z===null||z&&z.toString().indexOf(".")===z.toString().length-1},D.stop=function(){D.autoStepTimer&&clearTimeout(D.autoStepTimer)},D.down=function(z,ne,j){D.pressingUpOrDown=!0,D.step("down",z,ne,j)},D.up=function(z,ne,j){D.pressingUpOrDown=!0,D.step("up",z,ne,j)},D.saveInput=function(z){D.input=z};var I=O.value;I===void 0&&(I=O.defaultValue),D.state={focused:O.autoFocus};var F=D.getValidValue(D.toNumber(I));return D.state=c(c({},D.state),{},{inputValue:D.toPrecisionAsStep(F),value:F}),D}return Object(w.a)(A,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(D){var I=this.props,F=I.value,z=I.onChange,ne=I.max,j=I.min,G=this.state.focused;if(D){if(!_(D.value,F)||!_(D.max,ne)||!_(D.min,j)){var X=G?F:this.getValidValue(F),Z;this.pressingUpOrDown?Z=X:this.inputting?Z=this.rawInput:Z=this.toPrecisionAsStep(X),this.setState({value:X,inputValue:Z})}var K="value"in this.props?F:this.state.value;"max"in this.props&&D.max!==ne&&typeof K=="number"&&K>ne&&z&&z(ne),"min"in this.props&&D.min!==j&&typeof K=="number"&&K<j&&z&&z(j)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var q=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===l.a.BACKSPACE?q=this.cursorStart-1:this.lastKeyCode===l.a.DELETE&&(q=this.cursorStart):q=this.input.value.length,this.fixCaret(q,q)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case l.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case l.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(ie){}if(this.lastKeyCode=null,!this.pressingUpOrDown)return;this.props.focusOnUpDown&&this.state.focused&&(document.activeElement!==this.input&&this.focus())}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"getCurrentValidValue",value:function(D){var I=D;return I===""?I="":this.isNotCompleteNumber(parseFloat(I))?I=this.state.value:I=this.getValidValue(I),this.toNumber(I)}},{key:"getValueFromEvent",value:function(D){var I=D.target.value.trim().replace(/。/g,".");return y(this.props.decimalSeparator)&&(I=I.replace(this.props.decimalSeparator,".")),I}},{key:"getValidValue",value:function(D){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,z=parseFloat(D);return isNaN(z)?D:(z<I&&(z=I),z>F&&(z=F),z)}},{key:"setValue",value:function(D,I){var F=this.props.precision,z=this.isNotCompleteNumber(parseFloat(D))?null:parseFloat(D),ne=this.state.value,j=ne===void 0?null:ne,G=this.state.inputValue,X=G===void 0?null:G,Z=typeof z=="number"?z.toFixed(F):"".concat(z),K=z!==j||Z!=="".concat(X);return"value"in this.props?(X=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:X},I)):this.setState({value:z,inputValue:this.toPrecisionAsStep(D)},I),K&&this.props.onChange(z),z}},{key:"getMaxPrecision",value:function(D){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,F=this.props,z=F.precision,ne=F.step;if(y(z))return z;var j=this.getPrecision(I),G=this.getPrecision(ne),X=this.getPrecision(D);return D?Math.max(X,j+G):j+G}},{key:"getPrecisionFactor",value:function(D){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,F=this.getMaxPrecision(D,I);return Math.pow(10,F)}},{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(D){return this.props.formatter?this.props.formatter(D):D}},{key:"toPrecisionAsStep",value:function(D){if(this.isNotCompleteNumber(D)||D==="")return D;var I=Math.abs(this.getMaxPrecision(D));return isNaN(I)?D.toString():Number(D).toFixed(I)}},{key:"toNumber",value:function(D){var I=this.props.precision,F=this.state.focused,z=D&&D.length>16&&F;return this.isNotCompleteNumber(D)||z?D:y(I)?Math.round(D*Math.pow(10,I))/Math.pow(10,I):Number(D)}},{key:"upStep",value:function(D,I){var F=this.props.step,z=this.getPrecisionFactor(D,I),ne=Math.abs(this.getMaxPrecision(D,I)),j=((z*D+z*F*I)/z).toFixed(ne);return this.toNumber(j)}},{key:"downStep",value:function(D,I){var F=this.props.step,z=this.getPrecisionFactor(D,I),ne=Math.abs(this.getMaxPrecision(D,I)),j=((z*D-z*F*I)/z).toFixed(ne);return this.toNumber(j)}},{key:"step",value:function(D,I){var F=this,z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,ne=arguments.length>3?arguments[3]:void 0;this.stop(),I&&(I.persist(),I.preventDefault());var j=this.props;if(j.disabled)return;var G=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(G))return;var X=this["".concat(D,"Step")](G,z),Z=X>j.max||X<j.min;if(X>j.max?X=j.max:X<j.min&&(X=j.min),this.setValue(X,null),this.setState({focused:!0},function(){F.pressingUpOrDown=!1}),Z)return;this.autoStepTimer=setTimeout(function(){F[D](I,z,!0)},ne?d:v)}},{key:"fixCaret",value:function(D,I){if(D===void 0||I===void 0||!this.input||!this.input.value)return;try{var F=this.input.selectionStart,z=this.input.selectionEnd;(D!==F||I!==z)&&this.input.setSelectionRange(D,I)}catch(ne){}}},{key:"render",value:function(){var D,I=this.props,F=I.prefixCls,z=I.disabled,ne=I.readOnly,j=I.useTouch,G=I.autoComplete,X=I.upHandler,Z=I.downHandler,K=I.className,q=I.max,ie=I.min,oe=I.style,ye=I.title,pe=I.onMouseEnter,we=I.onMouseLeave,fe=I.onMouseOver,Te=I.onMouseOut,Fe=I.required,De=I.onClick,Me=I.tabIndex,Ue=I.type,ve=I.placeholder,ce=I.id,Ie=I.inputMode,Ne=I.pattern,Xe=I.step,ee=I.maxLength,k=I.autoFocus,N=I.name,$=I.onPaste,V=I.onInput,Y=Object(ae.a)(I,["prefixCls","disabled","readOnly","useTouch","autoComplete","upHandler","downHandler","className","max","min","style","title","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","required","onClick","tabIndex","type","placeholder","id","inputMode","pattern","step","maxLength","autoFocus","name","onPaste","onInput"]),me=this.state,Ae=me.value,at=me.focused,Le=f()(F,(D={},Object(Q.a)(D,K,!!K),Object(Q.a)(D,"".concat(F,"-disabled"),z),Object(Q.a)(D,"".concat(F,"-focused"),at),D)),ke={};Object.keys(Y).forEach(function(xe){(xe.substr(0,5)==="data-"||xe.substr(0,5)==="aria-"||xe==="role")&&(ke[xe]=Y[xe])});var Ye=!ne&&!z,Ze=this.getInputDisplayValue(null),Ve=(Ae||Ae===0)&&(isNaN(Ae)||Number(Ae)>=q),He=(Ae||Ae===0)&&(isNaN(Ae)||Number(Ae)<=ie),Pe=Ve||z||ne,Re=He||z||ne,Oe=f()("".concat(F,"-handler"),"".concat(F,"-handler-up"),Object(Q.a)({},"".concat(F,"-handler-up-disabled"),Pe)),he=f()("".concat(F,"-handler"),"".concat(F,"-handler-down"),Object(Q.a)({},"".concat(F,"-handler-down-disabled"),Re)),be=j?{onTouchStart:Pe?i:this.up,onTouchEnd:this.stop}:{onMouseDown:Pe?i:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Ce=j?{onTouchStart:Re?i:this.down,onTouchEnd:this.stop}:{onMouseDown:Re?i:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return h.a.createElement("div",{className:Le,style:oe,title:ye,onMouseEnter:pe,onMouseLeave:we,onMouseOver:fe,onMouseOut:Te,onFocus:function(){return null},onBlur:function(){return null}},h.a.createElement("div",{className:"".concat(F,"-handler-wrap")},h.a.createElement("span",Object.assign({unselectable:"on"},be,{role:"button","aria-label":"Increase Value","aria-disabled":Pe,className:Oe}),X||h.a.createElement("span",{unselectable:"on",className:"".concat(F,"-handler-up-inner"),onClick:n})),h.a.createElement("span",Object.assign({unselectable:"on"},Ce,{role:"button","aria-label":"Decrease Value","aria-disabled":Re,className:he}),Z||h.a.createElement("span",{unselectable:"on",className:"".concat(F,"-handler-down-inner"),onClick:n}))),h.a.createElement("div",{className:"".concat(F,"-input-wrap")},h.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":ie,"aria-valuemax":q,"aria-valuenow":Ae,required:Fe,type:Ue,placeholder:ve,onPaste:$,onClick:De,onMouseUp:this.onMouseUp,className:"".concat(F,"-input"),tabIndex:Me,autoComplete:G,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Ye?this.onKeyDown:i,onKeyUp:Ye?this.onKeyUp:i,autoFocus:k,maxLength:ee,readOnly:ne,disabled:z,max:q,min:ie,step:Xe,name:N,title:ye,id:ce,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(Ze),pattern:Ne,inputMode:Ie,onInput:V},ke))))}}]),A}(h.a.Component);m.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:b,min:-b,step:1,style:{},onChange:i,onKeyDown:i,onPressEnter:i,onFocus:i,onBlur:i,parser:t,required:!1,autoComplete:"off"};var g=m,E=Ke.a=g},fcSX:function(Je,Ke,B){"use strict";var ae=B("Ff2n"),Q=B("1OyB"),U=B("vuIU"),w=B("Ji7U"),P=B("md7G"),S=B("foSv"),C=B("1W/9"),T=B("cDcd"),h=B("rePB"),p=B("JX7q"),f=B("TSYQ"),l=B.n(f),a=B("qx4F"),c=B("4IlW");function s(z){return Array.isArray(z)?z:[z]}var u={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},i=Object.keys(u).filter(function(z){if(typeof document=="undefined")return!1;var ne=document.getElementsByTagName("html")[0];return z in(ne?ne.style:{})})[0],n=u[i];function t(z,ne,j,G){z.addEventListener?z.addEventListener(ne,j,G):z.attachEvent&&z.attachEvent("on".concat(ne),j)}function d(z,ne,j,G){z.removeEventListener?z.removeEventListener(ne,j,G):z.attachEvent&&z.detachEvent("on".concat(ne),j)}function v(z,ne){var j=typeof z=="function"?z(ne):z;return Array.isArray(j)?j.length===2?j:[j[0],j[1]]:[j]}var b=function(ne){return!isNaN(parseFloat(ne))&&isFinite(ne)},y=!(typeof window!="undefined"&&window.document&&window.document.createElement),_=function z(ne,j,G,X){if(!j||j===document||j instanceof Document)return!1;if(j===ne.parentNode)return!0;var Z=Math.max(Math.abs(G),Math.abs(X))===Math.abs(X),K=Math.max(Math.abs(G),Math.abs(X))===Math.abs(G),q=j.scrollHeight-j.clientHeight,ie=j.scrollWidth-j.clientWidth,oe=document.defaultView.getComputedStyle(j),ye=oe.overflowY==="auto"||oe.overflowY==="scroll",pe=oe.overflowX==="auto"||oe.overflowX==="scroll",we=q&&ye,fe=ie&&pe;return Z&&(!we||we&&(j.scrollTop>=q&&X<0||j.scrollTop<=0&&X>0))||K&&(!fe||fe&&(j.scrollLeft>=ie&&G<0||j.scrollLeft<=0&&G>0))?z(ne,j.parentNode,G,X):!1};function m(z){var ne=g();return function(){var G=Object(S.a)(z),X;if(ne){var Z=Object(S.a)(this).constructor;X=Reflect.construct(G,arguments,Z)}else X=G.apply(this,arguments);return Object(P.a)(this,X)}}function g(){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(z){return!1}}var E={},o=function(z){Object(w.a)(j,z);var ne=m(j);function j(G){var X;return Object(Q.a)(this,j),X=ne.call(this,G),X.domFocus=function(){X.dom&&X.dom.focus()},X.removeStartHandler=function(Z){if(Z.touches.length>1)return;X.startPos={x:Z.touches[0].clientX,y:Z.touches[0].clientY}},X.removeMoveHandler=function(Z){if(Z.changedTouches.length>1)return;var K=Z.currentTarget,q=Z.changedTouches[0].clientX-X.startPos.x,ie=Z.changedTouches[0].clientY-X.startPos.y;(K===X.maskDom||K===X.handlerDom||K===X.contentDom&&_(K,Z.target,q,ie))&&Z.cancelable&&Z.preventDefault()},X.transitionEnd=function(Z){var K=Z.target;d(K,n,X.transitionEnd),K.style.transition=""},X.onKeyDown=function(Z){if(Z.keyCode===c.a.ESC){var K=X.props.onClose;Z.stopPropagation(),K&&K(Z)}},X.onWrapperTransitionEnd=function(Z){var K=X.props,q=K.open,ie=K.afterVisibleChange;Z.target===X.contentWrapper&&Z.propertyName.match(/transform$/)&&(X.dom.style.transition="",!q&&X.getCurrentDrawerSome()&&(document.body.style.overflowX="",X.maskDom&&(X.maskDom.style.left="",X.maskDom.style.width="")),ie&&ie(!!q))},X.openLevelTransition=function(){var Z=X.props,K=Z.open,q=Z.width,ie=Z.height,oe=X.getHorizontalBoolAndPlacementName(),ye=oe.isHorizontal,pe=oe.placementName,we=X.contentDom?X.contentDom.getBoundingClientRect()[ye?"width":"height"]:0,fe=(ye?q:ie)||we;X.setLevelAndScrolling(K,pe,fe)},X.setLevelTransform=function(Z,K,q,ie){var oe=X.props,ye=oe.placement,pe=oe.levelMove,we=oe.duration,fe=oe.ease,Te=oe.showMask;X.levelDom.forEach(function(Fe){Fe.style.transition="transform ".concat(we," ").concat(fe),t(Fe,n,X.transitionEnd);var De=Z?q:0;if(pe){var Me=v(pe,{target:Fe,open:Z});De=Z?Me[0]:Me[1]||0}var Ue=typeof De=="number"?"".concat(De,"px"):De,ve=ye==="left"||ye==="top"?Ue:"-".concat(Ue);ve=Te&&ye==="right"&&ie?"calc(".concat(ve," + ").concat(ie,"px)"):ve,Fe.style.transform=De?"".concat(K,"(").concat(ve,")"):""})},X.setLevelAndScrolling=function(Z,K,q){var ie=X.props.onChange;if(!y){var oe=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?Object(a.a)(!0):0;X.setLevelTransform(Z,K,q,oe),X.toggleScrollingToDrawerAndBody(oe)}ie&&ie(Z)},X.toggleScrollingToDrawerAndBody=function(Z){var K=X.props,q=K.getOpenCount,ie=K.getContainer,oe=K.showMask,ye=K.open,pe=ie&&ie(),we=q&&q();if(pe&&pe.parentNode===document.body&&oe){var fe=["touchstart"],Te=[document.body,X.maskDom,X.handlerDom,X.contentDom];ye&&document.body.style.overflow!=="hidden"?(Z&&X.addScrollingEffect(Z),we===1&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",Te.forEach(function(Fe,De){if(!Fe)return;t(Fe,fe[De]||"touchmove",De?X.removeMoveHandler:X.removeStartHandler,X.passive)})):X.getCurrentDrawerSome()&&(we||(document.body.style.overflow=""),document.body.style.touchAction="",Z&&X.remScrollingEffect(Z),Te.forEach(function(Fe,De){if(!Fe)return;d(Fe,fe[De]||"touchmove",De?X.removeMoveHandler:X.removeStartHandler,X.passive)}))}},X.addScrollingEffect=function(Z){var K=X.props,q=K.placement,ie=K.duration,oe=K.ease,ye=K.getOpenCount,pe=K.switchScrollingEffect,we=ye&&ye();we===1&&pe();var fe="width ".concat(ie," ").concat(oe),Te="transform ".concat(ie," ").concat(oe);X.dom.style.transition="none";switch(q){case"right":X.dom.style.transform="translateX(-".concat(Z,"px)");break;case"top":case"bottom":X.dom.style.width="calc(100% - ".concat(Z,"px)"),X.dom.style.transform="translateZ(0)";break;default:break}clearTimeout(X.timeout),X.timeout=setTimeout(function(){X.dom&&(X.dom.style.transition="".concat(Te,",").concat(fe),X.dom.style.width="",X.dom.style.transform="")})},X.remScrollingEffect=function(Z){var K=X.props,q=K.placement,ie=K.duration,oe=K.ease,ye=K.getOpenCount,pe=K.switchScrollingEffect,we=ye&&ye();we||pe(!0),i&&(document.body.style.overflowX="hidden"),X.dom.style.transition="none";var fe,Te="width ".concat(ie," ").concat(oe),Fe="transform ".concat(ie," ").concat(oe);switch(q){case"left":{X.dom.style.width="100%",Te="width 0s ".concat(oe," ").concat(ie);break}case"right":{X.dom.style.transform="translateX(".concat(Z,"px)"),X.dom.style.width="100%",Te="width 0s ".concat(oe," ").concat(ie),X.maskDom&&(X.maskDom.style.left="-".concat(Z,"px"),X.maskDom.style.width="calc(100% + ".concat(Z,"px)"));break}case"top":case"bottom":{X.dom.style.width="calc(100% + ".concat(Z,"px)"),X.dom.style.height="100%",X.dom.style.transform="translateZ(0)",fe="height 0s ".concat(oe," ").concat(ie);break}default:break}clearTimeout(X.timeout),X.timeout=setTimeout(function(){X.dom&&(X.dom.style.transition="".concat(Fe,",").concat(fe?"".concat(fe,","):"").concat(Te),X.dom.style.transform="",X.dom.style.width="",X.dom.style.height="")})},X.getCurrentDrawerSome=function(){return!Object.keys(E).some(function(Z){return E[Z]})},X.getLevelDom=function(Z){var K=Z.level,q=Z.getContainer;if(y)return;var ie=q&&q(),oe=ie?ie.parentNode:null;if(X.levelDom=[],K==="all"){var ye=oe?Array.prototype.slice.call(oe.children):[];ye.forEach(function(pe){pe.nodeName!=="SCRIPT"&&pe.nodeName!=="STYLE"&&pe.nodeName!=="LINK"&&pe!==ie&&X.levelDom.push(pe)})}else K&&s(K).forEach(function(pe){document.querySelectorAll(pe).forEach(function(we){X.levelDom.push(we)})})},X.getHorizontalBoolAndPlacementName=function(){var Z=X.props.placement,K=Z==="left"||Z==="right",q="translate".concat(K?"X":"Y");return{isHorizontal:K,placementName:q}},X.state={_self:Object(p.a)(X)},X}return Object(U.a)(j,[{key:"componentDidMount",value:function(){var X=this;if(!y){var Z=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return Z=!0,null}}))}catch(ye){}this.passive=Z?{passive:!1}:!1}var K=this.props,q=K.open,ie=K.getContainer,oe=ie&&ie();this.drawerId="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(Math.random()*9).toString())).toString(16)),this.getLevelDom(this.props),q&&(oe&&oe.parentNode===document.body&&(E[this.drawerId]=q),this.openLevelTransition(),this.forceUpdate(function(){X.domFocus()}))}},{key:"componentDidUpdate",value:function(X){var Z=this.props,K=Z.open,q=Z.getContainer,ie=q&&q();K!==X.open&&(K&&this.domFocus(),ie&&ie.parentNode===document.body&&(E[this.drawerId]=!!K),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var X=this.props,Z=X.getOpenCount,K=X.open,q=X.switchScrollingEffect,ie=typeof Z=="function"&&Z();delete E[this.drawerId],K&&(this.setLevelTransform(!1),document.body.style.touchAction=""),ie||(document.body.style.overflow="",q(!0))}},{key:"render",value:function(){var X,Z=this,K=this.props,q=K.className,ie=K.children,oe=K.style,ye=K.width,pe=K.height,we=K.defaultOpen,fe=K.open,Te=K.prefixCls,Fe=K.placement,De=K.level,Me=K.levelMove,Ue=K.ease,ve=K.duration,ce=K.getContainer,Ie=K.handler,Ne=K.onChange,Xe=K.afterVisibleChange,ee=K.showMask,k=K.maskClosable,N=K.maskStyle,$=K.onClose,V=K.onHandleClick,Y=K.keyboard,me=K.getOpenCount,Ae=K.switchScrollingEffect,at=Object(ae.a)(K,["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"]),Le=this.dom?fe:!1,ke=l()(Te,(X={},Object(h.a)(X,"".concat(Te,"-").concat(Fe),!0),Object(h.a)(X,"".concat(Te,"-open"),Le),Object(h.a)(X,q||"",!!q),Object(h.a)(X,"no-mask",!ee),X)),Ye=this.getHorizontalBoolAndPlacementName(),Ze=Ye.placementName,Ve=Fe==="left"||Fe==="top"?"-100%":"100%",He=Le?"":"".concat(Ze,"(").concat(Ve,")"),Pe=Ie&&T.cloneElement(Ie,{onClick:function(Oe){Ie.props.onClick&&Ie.props.onClick(),V&&V(Oe)},ref:function(Oe){Z.handlerDom=Oe}});return T.createElement("div",Object.assign({},at,{tabIndex:-1,className:ke,style:oe,ref:function(Oe){Z.dom=Oe},onKeyDown:Le&&Y?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),ee&&T.createElement("div",{className:"".concat(Te,"-mask"),onClick:k?$:void 0,style:N,ref:function(Oe){Z.maskDom=Oe}}),T.createElement("div",{className:"".concat(Te,"-content-wrapper"),style:{transform:He,msTransform:He,width:b(ye)?"".concat(ye,"px"):ye,height:b(pe)?"".concat(pe,"px"):pe},ref:function(Oe){Z.contentWrapper=Oe}},T.createElement("div",{className:"".concat(Te,"-content"),ref:function(Oe){Z.contentDom=Oe},onTouchStart:Le&&ee?this.removeStartHandler:void 0,onTouchMove:Le&&ee?this.removeMoveHandler:void 0},ie),Pe))}}],[{key:"getDerivedStateFromProps",value:function(X,Z){var K=Z.prevProps,q=Z._self,ie={prevProps:X};if(K!==void 0){var oe=X.placement,ye=X.level;oe!==K.placement&&(q.contentDom=null),ye!==K.level&&q.getLevelDom(X)}return ie}}]),j}(T.Component);o.defaultProps={switchScrollingEffect:function(){}};var x=o;function A(z){var ne=O();return function(){var G=Object(S.a)(z),X;if(ne){var Z=Object(S.a)(this).constructor;X=Reflect.construct(G,arguments,Z)}else X=G.apply(this,arguments);return Object(P.a)(this,X)}}function O(){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(z){return!1}}var D=function(z){Object(w.a)(j,z);var ne=A(j);function j(G){var X;Object(Q.a)(this,j),X=ne.call(this,G),X.onHandleClick=function(K){var q=X.props,ie=q.onHandleClick,oe=q.open;if(ie&&ie(K),typeof oe=="undefined"){var ye=X.state.open;X.setState({open:!ye})}},X.onClose=function(K){var q=X.props,ie=q.onClose,oe=q.open;ie&&ie(K),typeof oe=="undefined"&&X.setState({open:!1})};var Z=typeof G.open!="undefined"?G.open:!!G.defaultOpen;return X.state={open:Z},"onMaskClick"in G&&console.warn("`onMaskClick` are removed, please use `onClose` instead."),X}return Object(U.a)(j,[{key:"render",value:function(){var X=this,Z=this.props,K=Z.defaultOpen,q=Z.getContainer,ie=Z.wrapperClassName,oe=Z.forceRender,ye=Z.handler,pe=Object(ae.a)(Z,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),we=this.state.open;if(!q)return T.createElement("div",{className:ie,ref:function(Fe){X.dom=Fe}},T.createElement(x,Object.assign({},pe,{open:we,handler:ye,getContainer:function(){return X.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var fe=!!ye||oe;return T.createElement(C.a,{visible:we,forceRender:fe,getContainer:q,wrapperClassName:ie},function(Te){var Fe=Te.visible,De=Te.afterClose,Me=Object(ae.a)(Te,["visible","afterClose"]);return T.createElement(x,Object.assign({},pe,Me,{open:Fe!==void 0?Fe:we,afterVisibleChange:De!==void 0?De:pe.afterVisibleChange,handler:ye,onClose:X.onClose,onHandleClick:X.onHandleClick}))})}}],[{key:"getDerivedStateFromProps",value:function(X,Z){var K=Z.prevProps,q={prevProps:X};return typeof K!="undefined"&&X.open!==K.open&&(q.open=X.open),q}}]),j}(T.Component);D.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:T.createElement("div",{className:"drawer-handle"},T.createElement("i",{className:"drawer-handle-icon"})),showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",className:"",keyboard:!0,forceRender:!1};var I=D,F=Ke.a=I},fcyK:function(Je,Ke,B){},fyJ8:function(Je,Ke,B){"use strict";var ae=B("rePB"),Q=B("VTBJ"),U=B("Ff2n"),w=B("U8pU"),P=B("cDcd"),S=B.n(P),C=B("TSYQ"),T=B.n(C),h=B("c+Xe"),p=B("sR1s");function f(u){return u&&Object(w.a)(u)==="object"&&!Array.isArray(u)&&!P.isValidElement(u)}function l(u){return typeof u=="string"?!0:Object(h.c)(u)}function a(u,i){var n,t=u.prefixCls,d=u.className,v=u.record,b=u.index,y=u.dataIndex,_=u.render,m=u.children,g=u.component,E=g===void 0?"td":g,o=u.colSpan,x=u.rowSpan,A=u.fixLeft,O=u.fixRight,D=u.firstFixLeft,I=u.lastFixLeft,F=u.firstFixRight,z=u.lastFixRight,ne=u.appendNode,j=u.additionalProps,G=j===void 0?{}:j,X=u.ellipsis,Z=u.align,K=u.rowType,q=u.isSticky,ie="".concat(t,"-cell"),oe,ye;if(m)ye=m;else{var pe=Object(p.b)(v,y);if(ye=pe,_){var we=_(pe,v,b);f(we)?(ye=we.children,oe=we.props):ye=we}}Object(w.a)(ye)==="object"&&!Array.isArray(ye)&&!P.isValidElement(ye)&&(ye=null),X&&(I||F)&&(ye=P.createElement("span",{className:"".concat(ie,"-content")},ye));var fe=oe||{},Te=fe.colSpan,Fe=fe.rowSpan,De=fe.style,Me=fe.className,Ue=Object(U.a)(fe,["colSpan","rowSpan","style","className"]),ve=Te!==void 0?Te:o,ce=Fe!==void 0?Fe:x;if(ve===0||ce===0)return null;var Ie={},Ne=typeof A=="number",Xe=typeof O=="number";Ne&&(Ie.position="sticky",Ie.left=A),Xe&&(Ie.position="sticky",Ie.right=O);var ee={};Z&&(ee.textAlign=Z);var k,N=X===!0?{showTitle:!0}:X;N&&(N.showTitle||K==="header")&&(typeof ye=="string"||typeof ye=="number"?k=ye.toString():P.isValidElement(ye)&&typeof ye.props.children=="string"&&(k=ye.props.children));var $=Object(Q.a)(Object(Q.a)(Object(Q.a)({title:k},Ue),G),{},{colSpan:ve&&ve!==1?ve:null,rowSpan:ce&&ce!==1?ce:null,className:T()(ie,d,(n={},Object(ae.a)(n,"".concat(ie,"-fix-left"),Ne),Object(ae.a)(n,"".concat(ie,"-fix-left-first"),D),Object(ae.a)(n,"".concat(ie,"-fix-left-last"),I),Object(ae.a)(n,"".concat(ie,"-fix-right"),Xe),Object(ae.a)(n,"".concat(ie,"-fix-right-first"),F),Object(ae.a)(n,"".concat(ie,"-fix-right-last"),z),Object(ae.a)(n,"".concat(ie,"-ellipsis"),X),Object(ae.a)(n,"".concat(ie,"-with-append"),ne),Object(ae.a)(n,"".concat(ie,"-fix-sticky"),(Ne||Xe)&&q),n),G.className,Me),style:Object(Q.a)(Object(Q.a)(Object(Q.a)(Object(Q.a)({},G.style),ee),Ie),De),ref:l(E)?i:null});return P.createElement(E,Object.assign({},$),ne,ye)}var c=P.forwardRef(a);c.displayName="Cell";var s=P.memo(c,function(u,i){return i.shouldCellUpdate?!i.shouldCellUpdate(i.record,u.record):!1});Ke.a=s},gRFJ:function(Je,Ke,B){Je.exports=[B("rdUC"),B("ynwM"),B("RELg"),B("DlR+"),B("CrYA"),B("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(Je){return Je<10?"0"+Je:Je}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(Je){return rx_escapable.lastIndex=0,rx_escapable.test(Je)?'"'+Je.replace(rx_escapable,function(Ke){var B=meta[Ke];return typeof B=="string"?B:"\\u"+("0000"+Ke.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+Je+'"'}function str(Je,Ke){var B,ae,Q,U,w=gap,P,S=Ke[Je];S&&typeof S=="object"&&typeof S.toJSON=="function"&&(S=S.toJSON(Je)),typeof rep=="function"&&(S=rep.call(Ke,Je,S));switch(typeof S){case"string":return quote(S);case"number":return isFinite(S)?String(S):"null";case"boolean":case"null":return String(S);case"object":if(!S)return"null";if(gap+=indent,P=[],Object.prototype.toString.apply(S)==="[object Array]"){for(U=S.length,B=0;B<U;B+=1)P[B]=str(B,S)||"null";return Q=P.length===0?"[]":gap?`[
`+gap+P.join(`,
`+gap)+`
`+w+"]":"["+P.join(",")+"]",gap=w,Q}if(rep&&typeof rep=="object")for(U=rep.length,B=0;B<U;B+=1)typeof rep[B]=="string"&&(ae=rep[B],Q=str(ae,S),Q&&P.push(quote(ae)+(gap?": ":":")+Q));else for(ae in S)Object.prototype.hasOwnProperty.call(S,ae)&&(Q=str(ae,S),Q&&P.push(quote(ae)+(gap?": ":":")+Q));return Q=P.length===0?"{}":gap?`{
`+gap+P.join(`,
`+gap)+`
`+w+"}":"{"+P.join(",")+"}",gap=w,Q}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(Je,Ke,B){var ae;if(gap="",indent="",typeof B=="number")for(ae=0;ae<B;ae+=1)indent+=" ";else typeof B=="string"&&(indent=B);if(rep=Ke,Ke&&typeof Ke!="function"&&(typeof Ke!="object"||typeof Ke.length!="number"))throw new Error("JSON.stringify");return str("",{"":Je})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(Je,Ke){var B,ae,Q=Je[Ke];if(Q&&typeof Q=="object")for(B in Q)Object.prototype.hasOwnProperty.call(Q,B)&&(ae=walk(Q,B),ae!==void 0?Q[B]=ae:delete Q[B]);return reviver.call(Je,Ke,Q)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(Je){return"\\u"+("0000"+Je.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},gqXR:function(Je,Ke,B){Je.exports=B.p+"static/g.a5bcde87.svg"},hW8S:function(Je,Ke,B){"use strict";B.d(Ke,"a",function(){return w}),B.d(Ke,"c",function(){return P}),B.d(Ke,"b",function(){return S});var ae=B("VTBJ"),Q=B("Ff2n"),U=B("Kwbf"),w="RC_TABLE_INTERNAL_COL_DEFINE";function P(C){var T=C.expandable,h=Object(Q.a)(C,["expandable"]);return"expandable"in C?Object(ae.a)(Object(ae.a)({},h),T):h}function S(C){return Object.keys(C).reduce(function(T,h){return(h.substr(0,5)==="data-"||h.substr(0,5)==="aria-")&&(T[h]=C[h]),T},{})}},hgre:function(Je,Ke,B){"use strict";var ae=B("miYZ"),Q=B("tsqr"),U=B("9og8"),w=B("WmNS"),P=B.n(w),S=B("cDcd"),C=B.n(S),T=B("GUcZ"),h=B("ulZh"),p=B.n(h),f=B("xKgJ"),l=B("P5Jw"),a=B.n(l),c=B("bntm"),s=B("4xil"),u=B.n(s);function i(v){if(isNaN(v))return{minutes:"00",seconds:"00"};var b=new Date(v*1e3).toISOString().substr(11,8);return{hour:b.substr(0,2),minutes:b.substr(3,2),seconds:b.substr(6,2)}}Object.defineProperty(HTMLMediaElement.prototype,"playing",{get:function(){return this.currentTime>0&&!this.paused&&!this.ended&&this.readyState>2}});function n(v,b){return v-b}function t(v){v.sort(n);for(var b=0,y=0;y<v.length-1;y++){var _=Math.abs(v[y+1]-v[y]);_<21&&(b+=_)}return b}var d=/(android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini)/i;Ke.a=Object(S.forwardRef)(function(v,b){var y,_=v.src,m=v.toLog,g=v.videoId,E=v.logWatchHistory,o=v.courseId,x=o===void 0?null:o,A=v.startTime,O=v.handlePause,D=O===void 0?function(){}:O,I=v.handlePlay,F=I===void 0?function(){}:I,z=v.handlePlayEnded,ne=z===void 0?function(){}:z,j=v.videoSpeed,G=j===void 0?1:j,X=_==null||((y=_.split("."))===null||y===void 0)?void 0:y.pop(),Z=X==="flv",K=Object(S.useRef)(),q=Object(S.useRef)(),ie=Object(S.useRef)(),oe=Object(S.useRef)(),ye=Object(S.useRef)(),pe=Object(S.useRef)(),we=Object(S.useRef)(),fe=Object(S.useRef)(),Te=Object(S.useRef)(),Fe=Object(S.useRef)(),De=Object(S.useRef)(),Me=Object(S.useRef)(),Ue=Object(S.useRef)(),ve=Object(S.useRef)(),ce=navigator.userAgent.toLowerCase().match(d),Ie=ce?ce[0]:"pc",Ne=Object(S.useRef)(!1),Xe=Object(f.x)(),ee=0,k=0,N=0,$=null,V=!1,Y=20,me=1,Ae=!1,at=!1,Le=[];Object(S.useImperativeHandle)(b,function(){return{getLastUpdatedTime:function(){return K.current.currentTime},getDuration:function(){return K.current.duration}}});var ke=Object(S.useCallback)(function(Pe){var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Oe={point:K.current.currentTime};$?(Oe.log_id=$,Oe.watch_duration=t(Le),Oe.total_duration=k):(x?(Oe.video_id=parseInt(g,10),Oe.course_id=x):Oe.video_id=g,Oe.duration=ee,Oe.device=Ie),Re&&(Oe.ed="1");function he(){return be.apply(this,arguments)}function be(){return be=Object(U.a)(P.a.mark(function Ce(){var xe;return P.a.wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:return Ae=!0,Qe.next=3,E(Oe);case 3:xe=Qe.sent,$=xe,Ae=!1,Pe&&Pe();case 7:case"end":return Qe.stop()}},Ce)})),be.apply(this,arguments)}he()},[g,x]);Object(S.useEffect)(function(){Q.b.destroy();var Pe=null;return T.a.isSupported&&Z&&_&&(_==null?void 0:_.indexOf(".m3u8"))<0?(Pe=T.a.createPlayer({type:"flv",volume:.8,cors:!0,url:_,muted:!1}),K.current&&(Pe.attachMediaElement(K.current),Pe.load())):K.current.setAttribute("src",_),Ze(),function(){Pe&&(Pe.unload(),Pe.pause(),Pe.destroy(),Pe=null)}},[K,Z,_]);function Ye(){K.current.paused?(oe.current.style.display="none",ye.current.style.display="block"):(oe.current.style.display="block",ye.current.style.display="none")}function Ze(){De.current.style.display="none",Ue.current.style.display="none",Me.current.style.display="none",K.current.muted||K.current.volume===0?De.current.style.display="block":K.current.volume>0&&K.current.volume<=.5?Ue.current.style.display="block":Me.current.style.display="block"}Object(S.useEffect)(function(){var Pe=document.getElementById("play"),Re=document.querySelectorAll(".playback-icons use");function Oe(){F(),A&&!Ne.current&&(K.current.currentTime=A),Ne.current=!0,Le.push(K.current.currentTime),V||(V=!0,m&&ke())}function he(){return be.apply(this,arguments)}function be(){return be=Object(U.a)(P.a.mark(function $e(){return P.a.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:Ye(),Le.push(K.current.currentTime),m&&ke(function(){$=null,N=0,V=!1,Ae=!1,at=!1,Le=[],k=0,me=1},!0);case 3:case"end":return je.stop()}},$e)})),be.apply(this,arguments)}function Ce(){pe.current.value=Math.round(K.current.currentTime),we.current.value=Math.round(K.current.currentTime)}function xe(){var $e=i(Math.round(K.current.currentTime));Te.current.innerText="".concat($e.hour>0?$e.hour+":":"").concat($e.minutes,":").concat($e.seconds),Te.current.setAttribute("datetime","".concat($e.hour>0?" "+$e.hour+" ":"").concat($e.minutes,"m ").concat($e.seconds,"s"))}function Be(){var $e=Math.round(K.current.duration);pe.current.setAttribute("max",$e),we.current.setAttribute("max",$e);var _e=i($e);fe.current.innerText="".concat(_e.hour>0?_e.hour+":":"").concat(_e.minutes,":").concat(_e.seconds),fe.current.setAttribute("datetime","".concat(_e.hour>0?" "+_e.hour+" ":"").concat(_e.minutes,"m ").concat(_e.seconds,"s"))}function Qe(){var $e=Math.round(K.current.duration);pe.current.setAttribute("max",$e),we.current.setAttribute("max",$e);var _e=i($e);fe.current.innerText="".concat(_e.hour>0?_e.hour+":":"").concat(_e.minutes,":").concat(_e.seconds),fe.current.setAttribute("datetime","".concat(_e.hour>0?" "+_e.hour+" ":"").concat(_e.minutes,"m ").concat(_e.seconds,"s")),Ce(),xe();var je=q.current.getBoundingClientRect(),ct=je.width,et=je.height,At=je.x,Ct=je.y;if(At<0||Ct<0||!ct)return;if(!at){var lt=K.current.currentTime,gt=lt-N;Math.abs(gt)<10?(k+=Math.abs(gt),N=lt,Ae||k-me*Y>=0&&(me++,Le.push(N),m&&ke())):(N=lt,m&&ke())}}function rt(){at=!0}function dt(){K.current.playing&&Le.push(K.current.currentTime,N),N=K.current.currentTime,at=!1}function xt(){ee=K.current.duration,ee<=20&&(Y=ee/3),K.current.addEventListener("play",Oe)}function _t($e){$e.preventDefault(),Object(c.a)()?(K.current.style.width="100%",K.current.style.height="100%"):K.current.style.cssText=""}function wt(){D()}function st($e){var _e=$e.target.dataset.seek?$e.target.dataset.seek:$e.target.value;K.current.currentTime=_e,we.current.value=_e,pe.current.value=_e}function ut($e){var _e=Math.round($e.offsetX/$e.target.clientWidth*parseInt($e.target.getAttribute("max"),10));pe.current.setAttribute("data-seek",_e);var je=i(_e);Fe.current.textContent="".concat(je.hour>0?je.hour+":":"").concat(je.minutes,":").concat(je.seconds);var ct=K.current.getBoundingClientRect();Fe.current.style.left="".concat($e.pageX-ct.left,"px")}return ie.current.addEventListener(Object(c.c)(),_t),K.current.addEventListener("canplay",xt),K.current.addEventListener("ended",he),K.current.addEventListener("seeking",rt),K.current.addEventListener("seeked",dt),K.current.addEventListener("loadedmetadata",Be),pe.current.addEventListener("mousemove",ut),pe.current.addEventListener("input",st),K.current.addEventListener("timeupdate",Qe),K.current.addEventListener("pause",wt),K.current.addEventListener("volumechange",Ze),function(){K.current.removeEventListener("canplay",xt),K.current.removeEventListener("play",Oe),K.current.removeEventListener("ended",he),K.current.removeEventListener("seeking",rt),K.current.removeEventListener("seeked",dt),pe.current.removeEventListener("mousemove",ut),pe.current.removeEventListener("input",st),K.current.removeEventListener("timeupdate",Qe),K.current.removeEventListener("pause",wt),K.current.removeEventListener("loadedmetadata",Be),K.current.removeEventListener("volumechange",Ze),K.current.playing&&(Le.push(N,K.current.currentTime),m&&ke())}},[K,_]),Object(S.useEffect)(function(){if(K.current.onended=function(){ne(K)},K.current.oncontextmenu=function(){return!1},(_==null?void 0:_.indexOf(".m3u8"))>-1){if(K.current.canPlayType("application/vnd.apple.mpegurl"))K.current.src=_;else if(p.a.isSupported()){var Pe=new p.a;Pe.loadSource(_),Pe.attachMedia(K.current)}}},[_]),Object(S.useEffect)(function(){K.current.playbackRate=G},[G]);var Ve=function(){K.current.paused||K.current.ended?K.current.play():K.current.pause(),Ye()};function He(){K.current.muted=!K.current.muted,K.current.muted?(ve.current.setAttribute("data-volume",volume.value),ve.current.value=0):ve.current.value=ve.current.dataset.volume}return C.a.createElement("div",{style:{position:"relative"},ref:ie},C.a.createElement("div",{ref:q,className:"".concat(u.a.watermark," animated_alternate animate__animated_10s animate__infinite animate__stepstart ").concat(u.a.animate__loop)},Xe?Xe.login:" "),C.a.createElement("div",{className:u.a.container},C.a.createElement("div",{className:u.a["video-container"],id:"video-container"},C.a.createElement("div",{className:u.a["playback-animation"],id:"playback-animation"},C.a.createElement("svg",{className:u.a["playback-icons"]},C.a.createElement("use",{className:"hidden",href:"#play-icon"}),C.a.createElement("use",{href:"#pause"}))),C.a.createElement("video",{className:u.a.video,id:"video",preload:"auto",disablePictureInPicture:!0,ref:K,autoPlay:!1}),C.a.createElement("div",{className:"".concat(u.a["video-controls"]," "),id:"video-controls"},C.a.createElement("div",{className:u.a["bottom-controls"]},C.a.createElement("div",{className:u.a["left-controls"]},C.a.createElement("button",{"data-title":"\u64AD\u653E/\u6682\u505C",id:"play",onClick:Ve},C.a.createElement("svg",{className:u.a["playback-icons"]},C.a.createElement("use",{ref:ye,href:"#play-icon"}),C.a.createElement("use",{ref:oe,style:{display:"none"},href:"#pause"}))),C.a.createElement("div",{className:u.a.time},C.a.createElement("time",{id:"time-elapsed",ref:Te},"00:00"),C.a.createElement("span",null," / "),C.a.createElement("time",{id:"duration",ref:fe},"00:00"))),C.a.createElement("div",{className:u.a["right-controls"]},C.a.createElement(l.CopyToClipboard,{text:_,onCopy:function(){return Q.b.success("\u590D\u5236\u6210\u529F")}},C.a.createElement("button",{"data-title":"\u590D\u5236\u94FE\u63A5"},C.a.createElement("i",{className:"icon-lianjie2 iconfont",style:{fontSize:"12px",color:"white"}}))),C.a.createElement("div",{className:u.a["volume-controls"]},C.a.createElement("button",{"data-title":"\u5F00\u542F/\u5173\u95ED\u58F0\u97F3",className:u.a["volume-button"],id:"volume-button",onClick:He},C.a.createElement("i",{ref:De,className:"icon-a-bianzu8 iconfont",style:{fontSize:"14px",color:"white"}}),C.a.createElement("i",{ref:Ue,className:"icon-shengyinkaibeifen iconfont",style:{fontSize:"14px",color:"white"}}),C.a.createElement("i",{ref:Me,className:"icon-shengyinkai iconfont",style:{fontSize:"14px",color:"white"}})),C.a.createElement("input",{className:u.a.volume,id:"volume",value:"1","data-mute":"0.5",type:"range",max:"1",min:"0",step:"0.01",ref:ve,style:{display:"none"},onClick:Ze})),C.a.createElement("button",{"data-title":"\u5168\u5C4F/\u9000\u51FA\u5168\u5C4F",className:u.a["fullscreen-button"],onClick:function(){Object(c.a)()?Object(c.b)():Object(c.d)(ie.current)}},C.a.createElement("i",{className:"icon-fangda1 iconfont",style:{fontSize:"12px",color:"white"}})))),C.a.createElement("div",{className:u.a["video-progress"]},C.a.createElement("progress",{ref:we,value:"0",min:"0"}),C.a.createElement("input",{className:u.a.seek,ref:pe,value:"0",min:"0",type:"range",step:"1"}),C.a.createElement("div",{className:u.a["seek-tooltip"],ref:Fe,id:"seek-tooltip"},"00:00"))))),C.a.createElement("svg",{style:{display:"none"}},C.a.createElement("defs",null,C.a.createElement("symbol",{id:"pause",viewBox:"0 0 24 24"},C.a.createElement("path",{d:"M14.016 5.016h3.984v13.969h-3.984v-13.969zM6 18.984v-13.969h3.984v13.969h-3.984z"})),C.a.createElement("symbol",{id:"play-icon",viewBox:"0 0 24 24"},C.a.createElement("path",{d:"M8.016 5.016l10.969 6.984-10.969 6.984v-13.969z"})),C.a.createElement("symbol",{id:"volume-high",viewBox:"0 0 24 24"},C.a.createElement("path",{d:"M14.016 3.234q3.047 0.656 5.016 3.117t1.969 5.648-1.969 5.648-5.016 3.117v-2.063q2.203-0.656 3.586-2.484t1.383-4.219-1.383-4.219-3.586-2.484v-2.063zM16.5 12q0 2.813-2.484 4.031v-8.063q1.031 0.516 1.758 1.688t0.727 2.344zM3 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6z"})),C.a.createElement("symbol",{id:"volume-low",viewBox:"0 0 24 24"},C.a.createElement("path",{d:"M5.016 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6zM18.516 12q0 2.766-2.531 4.031v-8.063q1.031 0.516 1.781 1.711t0.75 2.32z"})),C.a.createElement("symbol",{id:"volume-mute",viewBox:"0 0 24 24"},C.a.createElement("path",{d:"M12 3.984v4.219l-2.109-2.109zM4.266 3l16.734 16.734-1.266 1.266-2.063-2.063q-1.547 1.313-3.656 1.828v-2.063q1.172-0.328 2.25-1.172l-4.266-4.266v6.75l-5.016-5.016h-3.984v-6h4.734l-4.734-4.734zM18.984 12q0-2.391-1.383-4.219t-3.586-2.484v-2.063q3.047 0.656 5.016 3.117t1.969 5.648q0 2.203-1.031 4.172l-1.5-1.547q0.516-1.266 0.516-2.625zM16.5 12q0 0.422-0.047 0.609l-2.438-2.438v-2.203q1.031 0.516 1.758 1.688t0.727 2.344z"})),C.a.createElement("symbol",{id:"fullscreen",viewBox:"0 0 24 24"},C.a.createElement("path",{d:"M14.016 5.016h4.969v4.969h-1.969v-3h-3v-1.969zM17.016 17.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 9.984v-4.969h4.969v1.969h-3v3h-1.969zM6.984 14.016v3h3v1.969h-4.969v-4.969h1.969z"})),C.a.createElement("symbol",{id:"fullscreen-exit",viewBox:"0 0 24 24"},C.a.createElement("path",{d:"M15.984 8.016h3v1.969h-4.969v-4.969h1.969v3zM14.016 18.984v-4.969h4.969v1.969h-3v3h-1.969zM8.016 8.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 15.984v-1.969h4.969v4.969h-1.969v-3h-3z"})),C.a.createElement("symbol",{id:"pip",viewBox:"0 0 24 24"},C.a.createElement("path",{d:"M21 19.031v-14.063h-18v14.063h18zM23.016 18.984q0 0.797-0.609 1.406t-1.406 0.609h-18q-0.797 0-1.406-0.609t-0.609-1.406v-14.016q0-0.797 0.609-1.383t1.406-0.586h18q0.797 0 1.406 0.586t0.609 1.383v14.016zM18.984 11.016v6h-7.969v-6h7.969z"})))))})},i3hx:function(Je,Ke,B){},je13:function(Je,Ke,B){var ae=B("5nXd"),Q=B("gRFJ"),U=[B("uQRt")];Je.exports=ae.createStore(Q,U)},kSUc:function(Je,Ke,B){},"kaH+":function(Je,Ke,B){"use strict";var ae=B("+L6B"),Q=B("2/Rp"),U=B("tJVT"),w=B("cDcd"),P=B.n(w),S=B("UZu5"),C=B.n(S),T=B("dhSg"),h=B("rLCj"),p=B("dF/Y"),f=B("4i/N");Ke.a=function(){var l=Object(w.useState)(""),a=Object(U.a)(l,2),c=a[0],s=a[1],u=Object(w.useState)(0),i=Object(U.a)(u,2),n=i[0],t=i[1],d=Object(w.useRef)("");Object(w.useEffect)(function(){var E=T.a.subscribe("preview-image",function(o){s(o),document.body.style.overflow="hidden"});return E},[]),Object(w.useEffect)(function(){return document.addEventListener("keydown",v),function(){document.removeEventListener("keydown",v)}},[]),Object(w.useEffect)(function(){d.current=c},[c]);function v(E){E.keyCode==27&&d.current&&b()}function b(){document.body.style.overflow="auto",s("")}function y(){t(n+90)}var _=Object(w.useRef)(),m=Object(w.useRef)(),g=function(o){(o.nativeEvent.target===_.current||o.nativeEvent.target===m.current)&&b()};return P.a.createElement(w.Fragment,null,c?P.a.createElement("div",{className:"image-preview-container",ref:_,onClick:g},P.a.createElement("div",{className:"button-group"},P.a.createElement(Q.a,{onClick:y},"\u65CB\u8F6C",P.a.createElement(h.a,null)),P.a.createElement(Q.a,{href:c},"\u4E0B\u8F7D",P.a.createElement(p.a,null)),P.a.createElement(Q.a,{onClick:b},"\u5173\u95ED",P.a.createElement(f.a,null))),P.a.createElement("div",{className:"preview-wrp-group",ref:m},P.a.createElement("img",{className:"image-preview",src:c,alt:"\u9884\u89C8\u5927\u56FE",style:{transform:"rotate(".concat(n,"deg)")}}))):null)}},kovY:function(Je,Ke,B){Je.exports=B.p+"static/e.eabfa286.svg"},lOMy:function(Je,Ke,B){},lZu9:function(Je,Ke,B){(function(ae){ae(B("VrN/"),B("1eCo"),B("8EBN"))})(function(ae){"use strict";ae.defineMode("markdown",function(Q,U){var w=ae.getMode(Q,"text/html"),P=w.name=="null";function S(j){if(ae.findModeByName){var G=ae.findModeByName(j);G&&(j=G.mime||G.mimes[0])}var X=ae.getMode(Q,j);return X.name=="null"?null:X}U.highlightFormatting===void 0&&(U.highlightFormatting=!1),U.maxBlockquoteDepth===void 0&&(U.maxBlockquoteDepth=0),U.taskLists===void 0&&(U.taskLists=!1),U.strikethrough===void 0&&(U.strikethrough=!1),U.emoji===void 0&&(U.emoji=!1),U.fencedCodeBlockHighlighting===void 0&&(U.fencedCodeBlockHighlighting=!0),U.fencedCodeBlockDefaultMode===void 0&&(U.fencedCodeBlockDefaultMode="text/plain"),U.xml===void 0&&(U.xml=!0),U.tokenTypeOverrides===void 0&&(U.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 T in C)C.hasOwnProperty(T)&&U.tokenTypeOverrides[T]&&(C[T]=U.tokenTypeOverrides[T]);var h=/^([*\-_])(?:\s*\1){2,}\s*$/,p=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,f=/^\[(x| )\](?=\s)/i,l=U.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,a=/^ {0,3}(?:\={1,}|-{2,})\s*$/,c=/^[^#!\[\]*_\\<>` "'(~:]+/,s=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,u=/^\s*\[[^\]]+?\]:.*$/,i=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,n=" ";function t(j,G,X){return G.f=G.inline=X,X(j,G)}function d(j,G,X){return G.f=G.block=X,X(j,G)}function v(j){return!j||!/\S/.test(j.string)}function b(j){if(j.linkTitle=!1,j.linkHref=!1,j.linkText=!1,j.em=!1,j.strong=!1,j.strikethrough=!1,j.quote=0,j.indentedCode=!1,j.f==_){var G=P;if(!G){var X=ae.innerMode(w,j.htmlState);G=X.mode.name=="xml"&&X.state.tagStart===null&&!X.state.context&&X.state.tokenize.isInText}G&&(j.f=o,j.block=y,j.htmlState=null)}return j.trailingSpace=0,j.trailingSpaceNewLine=!1,j.prevLine=j.thisLine,j.thisLine={stream:null},null}function y(j,G){var X=j.column()===G.indentation,Z=v(G.prevLine.stream),K=G.indentedCode,q=G.prevLine.hr,ie=G.list!==!1,oe=(G.listStack[G.listStack.length-1]||0)+3;G.indentedCode=!1;var ye=G.indentation;if(G.indentationDiff===null&&(G.indentationDiff=G.indentation,ie)){for(G.list=null;ye<G.listStack[G.listStack.length-1];)G.listStack.pop(),G.listStack.length?G.indentation=G.listStack[G.listStack.length-1]:G.list=!1;G.list!==!1&&(G.indentationDiff=ye-G.listStack[G.listStack.length-1])}var pe=!Z&&!q&&!G.prevLine.header&&(!ie||!K)&&!G.prevLine.fencedCodeEnd,we=(G.list===!1||q||Z)&&G.indentation<=oe&&j.match(h),fe=null;if(G.indentationDiff>=4&&(K||G.prevLine.fencedCodeEnd||G.prevLine.header||Z))return j.skipToEnd(),G.indentedCode=!0,C.code;if(j.eatSpace())return null;if(X&&G.indentation<=oe&&(fe=j.match(l))&&fe[1].length<=6)return G.quote=0,G.header=fe[1].length,G.thisLine.header=!0,U.highlightFormatting&&(G.formatting="header"),G.f=G.inline,g(G);if(G.indentation<=oe&&j.eat(">"))return G.quote=X?1:G.quote+1,U.highlightFormatting&&(G.formatting="quote"),j.eatSpace(),g(G);if(!we&&!G.setext&&X&&G.indentation<=oe&&(fe=j.match(p))){var Te=fe[1]?"ol":"ul";return G.indentation=ye+j.current().length,G.list=!0,G.quote=0,G.listStack.push(G.indentation),G.em=!1,G.strong=!1,G.code=!1,G.strikethrough=!1,U.taskLists&&j.match(f,!1)&&(G.taskList=!0),G.f=G.inline,U.highlightFormatting&&(G.formatting=["list","list-"+Te]),g(G)}else{if(X&&G.indentation<=oe&&(fe=j.match(s,!0)))return G.quote=0,G.fencedEndRE=new RegExp(fe[1]+"+ *$"),G.localMode=U.fencedCodeBlockHighlighting&&S(fe[2]||U.fencedCodeBlockDefaultMode),G.localMode&&(G.localState=ae.startState(G.localMode)),G.f=G.block=m,U.highlightFormatting&&(G.formatting="code-block"),G.code=-1,g(G);if(G.setext||(!pe||!ie)&&!G.quote&&G.list===!1&&!G.code&&!we&&!u.test(j.string)&&(fe=j.lookAhead(1))&&(fe=fe.match(a)))return G.setext?(G.header=G.setext,G.setext=0,j.skipToEnd(),U.highlightFormatting&&(G.formatting="header")):(G.header=fe[0].charAt(0)=="="?1:2,G.setext=G.header),G.thisLine.header=!0,G.f=G.inline,g(G);if(we)return j.skipToEnd(),G.hr=!0,G.thisLine.hr=!0,C.hr;if(j.peek()==="[")return t(j,G,I)}return t(j,G,G.inline)}function _(j,G){var X=w.token(j,G.htmlState);if(!P){var Z=ae.innerMode(w,G.htmlState);(Z.mode.name=="xml"&&Z.state.tagStart===null&&!Z.state.context&&Z.state.tokenize.isInText||G.md_inside&&j.current().indexOf(">")>-1)&&(G.f=o,G.block=y,G.htmlState=null)}return X}function m(j,G){var X=G.listStack[G.listStack.length-1]||0,Z=G.indentation<X,K=X+3;if(G.fencedEndRE&&G.indentation<=K&&(Z||j.match(G.fencedEndRE))){U.highlightFormatting&&(G.formatting="code-block");var q;return Z||(q=g(G)),G.localMode=G.localState=null,G.block=y,G.f=o,G.fencedEndRE=null,G.code=0,G.thisLine.fencedCodeEnd=!0,Z?d(j,G,G.block):q}else return G.localMode?G.localMode.token(j,G.localState):(j.skipToEnd(),C.code)}function g(j){var G=[];if(j.formatting){G.push(C.formatting),typeof j.formatting=="string"&&(j.formatting=[j.formatting]);for(var X=0;X<j.formatting.length;X++)G.push(C.formatting+"-"+j.formatting[X]),j.formatting[X]==="header"&&G.push(C.formatting+"-"+j.formatting[X]+"-"+j.header),j.formatting[X]==="quote"&&(!U.maxBlockquoteDepth||U.maxBlockquoteDepth>=j.quote?G.push(C.formatting+"-"+j.formatting[X]+"-"+j.quote):G.push("error"))}if(j.taskOpen)return G.push("meta"),G.length?G.join(" "):null;if(j.taskClosed)return G.push("property"),G.length?G.join(" "):null;if(j.linkHref?G.push(C.linkHref,"url"):(j.strong&&G.push(C.strong),j.em&&G.push(C.em),j.strikethrough&&G.push(C.strikethrough),j.emoji&&G.push(C.emoji),j.linkText&&G.push(C.linkText),j.code&&G.push(C.code),j.image&&G.push(C.image),j.imageAltText&&G.push(C.imageAltText,"link"),j.imageMarker&&G.push(C.imageMarker)),j.header&&G.push(C.header,C.header+"-"+j.header),j.quote&&(G.push(C.quote),!U.maxBlockquoteDepth||U.maxBlockquoteDepth>=j.quote?G.push(C.quote+"-"+j.quote):G.push(C.quote+"-"+U.maxBlockquoteDepth)),j.list!==!1){var Z=(j.listStack.length-1)%3;Z?Z===1?G.push(C.list2):G.push(C.list3):G.push(C.list1)}return j.trailingSpaceNewLine?G.push("trailing-space-new-line"):j.trailingSpace&&G.push("trailing-space-"+(j.trailingSpace%2?"a":"b")),G.length?G.join(" "):null}function E(j,G){return j.match(c,!0)?g(G):void 0}function o(j,G){var X=G.text(j,G);if(typeof X!="undefined")return X;if(G.list)return G.list=null,g(G);if(G.taskList){var Z=j.match(f,!0)[1]===" ";return Z?G.taskOpen=!0:G.taskClosed=!0,U.highlightFormatting&&(G.formatting="task"),G.taskList=!1,g(G)}if(G.taskOpen=!1,G.taskClosed=!1,G.header&&j.match(/^#+$/,!0))return U.highlightFormatting&&(G.formatting="header"),g(G);var K=j.next();if(G.linkTitle){G.linkTitle=!1;var q=K;K==="("&&(q=")"),q=(q+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ie="^\\s*(?:[^"+q+"\\\\]+|\\\\\\\\|\\\\.)"+q;if(j.match(new RegExp(ie),!0))return C.linkHref}if(K==="`"){var oe=G.formatting;U.highlightFormatting&&(G.formatting="code"),j.eatWhile("`");var ye=j.current().length;if(G.code==0&&(!G.quote||ye==1))return G.code=ye,g(G);if(ye==G.code){var pe=g(G);return G.code=0,pe}else return G.formatting=oe,g(G)}else if(G.code)return g(G);if(K==="\\"&&(j.next(),U.highlightFormatting)){var we=g(G),fe=C.formatting+"-escape";return we?we+" "+fe:fe}if(K==="!"&&j.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return G.imageMarker=!0,G.image=!0,U.highlightFormatting&&(G.formatting="image"),g(G);if(K==="["&&G.imageMarker&&j.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return G.imageMarker=!1,G.imageAltText=!0,U.highlightFormatting&&(G.formatting="image"),g(G);if(K==="]"&&G.imageAltText){U.highlightFormatting&&(G.formatting="image");var we=g(G);return G.imageAltText=!1,G.image=!1,G.inline=G.f=A,we}if(K==="["&&!G.image)return G.linkText&&j.match(/^.*?\]/)||(G.linkText=!0,U.highlightFormatting&&(G.formatting="link")),g(G);if(K==="]"&&G.linkText){U.highlightFormatting&&(G.formatting="link");var we=g(G);return G.linkText=!1,G.inline=G.f=j.match(/\(.*?\)| ?\[.*?\]/,!1)?A:o,we}if(K==="<"&&j.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){G.f=G.inline=x,U.highlightFormatting&&(G.formatting="link");var we=g(G);return we?we+=" ":we="",we+C.linkInline}if(K==="<"&&j.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){G.f=G.inline=x,U.highlightFormatting&&(G.formatting="link");var we=g(G);return we?we+=" ":we="",we+C.linkEmail}if(U.xml&&K==="<"&&j.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Te=j.string.indexOf(">",j.pos);if(Te!=-1){var Fe=j.string.substring(j.start,Te);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Fe)&&(G.md_inside=!0)}return j.backUp(1),G.htmlState=ae.startState(w),d(j,G,_)}if(U.xml&&K==="<"&&j.match(/^\/\w*?>/))return G.md_inside=!1,"tag";if(K==="*"||K==="_"){for(var De=1,Me=j.pos==1?" ":j.string.charAt(j.pos-2);De<3&&j.eat(K);)De++;var Ue=j.peek()||" ",ve=!/\s/.test(Ue)&&(!i.test(Ue)||/\s/.test(Me)||i.test(Me)),ce=!/\s/.test(Me)&&(!i.test(Me)||/\s/.test(Ue)||i.test(Ue)),Ie=null,Ne=null;if(De%2&&(!G.em&&ve&&(K==="*"||!ce||i.test(Me))?Ie=!0:G.em==K&&ce&&(K==="*"||!ve||i.test(Ue))&&(Ie=!1)),De>1&&(!G.strong&&ve&&(K==="*"||!ce||i.test(Me))?Ne=!0:G.strong==K&&ce&&(K==="*"||!ve||i.test(Ue))&&(Ne=!1)),Ne!=null||Ie!=null){U.highlightFormatting&&(G.formatting=Ie==null?"strong":Ne==null?"em":"strong em"),Ie===!0&&(G.em=K),Ne===!0&&(G.strong=K);var pe=g(G);return Ie===!1&&(G.em=!1),Ne===!1&&(G.strong=!1),pe}}else if(K===" "&&(j.eat("*")||j.eat("_"))){if(j.peek()===" ")return g(G);j.backUp(1)}if(U.strikethrough){if(K==="~"&&j.eatWhile(K)){if(G.strikethrough){U.highlightFormatting&&(G.formatting="strikethrough");var pe=g(G);return G.strikethrough=!1,pe}else if(j.match(/^[^\s]/,!1))return G.strikethrough=!0,U.highlightFormatting&&(G.formatting="strikethrough"),g(G)}else if(K===" "&&j.match(/^~~/,!0)){if(j.peek()===" ")return g(G);j.backUp(2)}}if(U.emoji&&K===":"&&j.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){G.emoji=!0,U.highlightFormatting&&(G.formatting="emoji");var Xe=g(G);return G.emoji=!1,Xe}return K===" "&&(j.match(/^ +$/,!1)?G.trailingSpace++:G.trailingSpace&&(G.trailingSpaceNewLine=!0)),g(G)}function x(j,G){var X=j.next();if(X===">"){G.f=G.inline=o,U.highlightFormatting&&(G.formatting="link");var Z=g(G);return Z?Z+=" ":Z="",Z+C.linkInline}return j.match(/^[^>]+/,!0),C.linkInline}function A(j,G){if(j.eatSpace())return null;var X=j.next();return X==="("||X==="["?(G.f=G.inline=D(X==="("?")":"]"),U.highlightFormatting&&(G.formatting="link-string"),G.linkHref=!0,g(G)):"error"}var O={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function D(j){return function(G,X){var Z=G.next();if(Z===j){X.f=X.inline=o,U.highlightFormatting&&(X.formatting="link-string");var K=g(X);return X.linkHref=!1,K}return G.match(O[j]),X.linkHref=!0,g(X)}}function I(j,G){return j.match(/^([^\]\\]|\\.)*\]:/,!1)?(G.f=F,j.next(),U.highlightFormatting&&(G.formatting="link"),G.linkText=!0,g(G)):t(j,G,o)}function F(j,G){if(j.match(/^\]:/,!0)){G.f=G.inline=z,U.highlightFormatting&&(G.formatting="link");var X=g(G);return G.linkText=!1,X}return j.match(/^([^\]\\]|\\.)+/,!0),C.linkText}function z(j,G){return j.eatSpace()?null:(j.match(/^[^\s]+/,!0),j.peek()===void 0?G.linkTitle=!0:j.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),G.f=G.inline=o,C.linkHref+" url")}var ne={startState:function(){return{f:y,prevLine:{stream:null},thisLine:{stream:null},block:y,htmlState:null,indentation:0,inline:o,text:E,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(j){return{f:j.f,prevLine:j.prevLine,thisLine:j.thisLine,block:j.block,htmlState:j.htmlState&&ae.copyState(w,j.htmlState),indentation:j.indentation,localMode:j.localMode,localState:j.localMode?ae.copyState(j.localMode,j.localState):null,inline:j.inline,text:j.text,formatting:!1,linkText:j.linkText,linkTitle:j.linkTitle,linkHref:j.linkHref,code:j.code,em:j.em,strong:j.strong,strikethrough:j.strikethrough,emoji:j.emoji,header:j.header,setext:j.setext,hr:j.hr,taskList:j.taskList,list:j.list,listStack:j.listStack.slice(0),quote:j.quote,indentedCode:j.indentedCode,trailingSpace:j.trailingSpace,trailingSpaceNewLine:j.trailingSpaceNewLine,md_inside:j.md_inside,fencedEndRE:j.fencedEndRE}},token:function(j,G){if(G.formatting=!1,j!=G.thisLine.stream){if(G.header=0,G.hr=!1,j.match(/^\s*$/,!0))return b(G),null;if(G.prevLine=G.thisLine,G.thisLine={stream:j},G.taskList=!1,G.trailingSpace=0,G.trailingSpaceNewLine=!1,!G.localState&&(G.f=G.block,G.f!=_)){var X=j.match(/^\s*/,!0)[0].replace(/\t/g,n).length;if(G.indentation=X,G.indentationDiff=null,X>0)return null}}return G.f(j,G)},innerMode:function(j){return j.block==_?{state:j.htmlState,mode:w}:j.localState?{state:j.localState,mode:j.localMode}:{state:j,mode:ne}},indent:function(j,G,X){return j.block==_&&w.indent?w.indent(j.htmlState,G,X):j.localState&&j.localMode.indent?j.localMode.indent(j.localState,G,X):ae.Pass},blankLine:b,getType:g,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return ne},"xml"),ae.defineMIME("text/markdown","markdown"),ae.defineMIME("text/x-markdown","markdown")})},n6Qo:function(Je,Ke,B){"use strict";B.d(Ke,"a",function(){return T});var ae=B("cDcd"),Q=B("biw7"),U=B("fyJ8");function w(h){var p=h.className,f=h.index,l=h.children,a=h.colSpan,c=h.rowSpan,s=ae.useContext(Q.a),u=s.prefixCls,i=s.fixedInfoList,n=i[f];return ae.createElement(U.a,Object.assign({className:p,index:f,component:"td",prefixCls:u,record:null,dataIndex:null,render:function(){return{children:l,props:{colSpan:a,rowSpan:c}}}},n))}function P(h){return ae.createElement("tr",Object.assign({},h))}function S(h){var p=h.children,f=ae.useContext(Q.a),l=f.prefixCls;return ae.createElement("tfoot",{className:"".concat(l,"-summary")},p)}var C=Ke.b=S,T={Cell:w,Row:P}},nCk5:function(Je,Ke,B){Je.exports=B.p+"static/d.53bf6ae3.svg"},nWbc:function(Je,Ke,B){},oE5q:function(Je,Ke,B){Je.exports=B.p+"static/t.0b94c5c3.svg"},oFv4:function(Je,Ke,B){Je.exports=B.p+"static/internal.da228387.png"},osHv:function(Je,Ke,B){(function(ae){ae(B("VrN/"))})(function(ae){"use strict";var Q=ae.Pos;function U(i,n){return i.line-n.line||i.ch-n.ch}var w="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",P=w+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",S=new RegExp("<(/?)(["+w+"]["+P+"]*)","g");function C(i,n,t,d){this.line=n,this.ch=t,this.cm=i,this.text=i.getLine(n),this.min=d?Math.max(d.from,i.firstLine()):i.firstLine(),this.max=d?Math.min(d.to-1,i.lastLine()):i.lastLine()}function T(i,n){var t=i.cm.getTokenTypeAt(Q(i.line,n));return t&&/\btag\b/.test(t)}function h(i){return i.line>=i.max?void 0:(i.ch=0,i.text=i.cm.getLine(++i.line),!0)}function p(i){return i.line<=i.min?void 0:(i.text=i.cm.getLine(--i.line),i.ch=i.text.length,!0)}function f(i){for(;;){var n=i.text.indexOf(">",i.ch);if(n==-1){if(h(i))continue;return}if(!T(i,n+1)){i.ch=n+1;continue}var t=i.text.lastIndexOf("/",n),d=t>-1&&!/\S/.test(i.text.slice(t+1,n));return i.ch=n+1,d?"selfClose":"regular"}}function l(i){for(;;){var n=i.ch?i.text.lastIndexOf("<",i.ch-1):-1;if(n==-1){if(p(i))continue;return}if(!T(i,n+1)){i.ch=n;continue}S.lastIndex=n,i.ch=n;var t=S.exec(i.text);if(t&&t.index==n)return t}}function a(i){for(;;){S.lastIndex=i.ch;var n=S.exec(i.text);if(!n){if(h(i))continue;return}if(!T(i,n.index+1)){i.ch=n.index+1;continue}return i.ch=n.index+n[0].length,n}}function c(i){for(;;){var n=i.ch?i.text.lastIndexOf(">",i.ch-1):-1;if(n==-1){if(p(i))continue;return}if(!T(i,n+1)){i.ch=n;continue}var t=i.text.lastIndexOf("/",n),d=t>-1&&!/\S/.test(i.text.slice(t+1,n));return i.ch=n+1,d?"selfClose":"regular"}}function s(i,n){for(var t=[];;){var d=a(i),v,b=i.line,y=i.ch-(d?d[0].length:0);if(!d||!(v=f(i)))return;if(v=="selfClose")continue;if(d[1]){for(var _=t.length-1;_>=0;--_)if(t[_]==d[2]){t.length=_;break}if(_<0&&(!n||n==d[2]))return{tag:d[2],from:Q(b,y),to:Q(i.line,i.ch)}}else t.push(d[2])}}function u(i,n){for(var t=[];;){var d=c(i);if(!d)return;if(d=="selfClose"){l(i);continue}var v=i.line,b=i.ch,y=l(i);if(!y)return;if(y[1])t.push(y[2]);else{for(var _=t.length-1;_>=0;--_)if(t[_]==y[2]){t.length=_;break}if(_<0&&(!n||n==y[2]))return{tag:y[2],from:Q(i.line,i.ch),to:Q(v,b)}}}}ae.registerHelper("fold","xml",function(i,n){for(var t=new C(i,n.line,0);;){var d=a(t);if(!d||t.line!=n.line)return;var v=f(t);if(!v)return;if(!d[1]&&v!="selfClose"){var b=Q(t.line,t.ch),y=s(t,d[2]);return y&&U(y.from,b)>0?{from:b,to:y.from}:null}}}),ae.findMatchingTag=function(i,n,t){var d=new C(i,n.line,n.ch,t);if(d.text.indexOf(">")==-1&&d.text.indexOf("<")==-1)return;var v=f(d),b=v&&Q(d.line,d.ch),y=v&&l(d);if(!v||!y||U(d,n)>0)return;var _={from:Q(d.line,d.ch),to:b,tag:y[2]};return v=="selfClose"?{open:_,close:null,at:"open"}:y[1]?{open:u(d,y[2]),close:_,at:"close"}:(d=new C(i,b.line,b.ch,t),{open:_,close:s(d,y[2]),at:"open"})},ae.findEnclosingTag=function(i,n,t,d){for(var v=new C(i,n.line,n.ch,t);;){var b=u(v,d);if(!b)break;var y=new C(i,n.line,n.ch,t),_=s(y,b.tag);if(_)return{open:b,close:_}}},ae.scanForClosingTag=function(i,n,t,d){var v=new C(i,n.line,n.ch,d?{from:0,to:d}:null);return s(v,t)}})},p5ED:function(Je,Ke,B){"use strict";var ae=B("+L6B"),Q=B("2/Rp"),U=B("5Dmo"),w=B("3S7+"),P=B("k1fw"),S=B("tJVT"),C=B("cDcd"),T=B.n(C),h=B("vHTk"),p=B.n(h),f=B("yEEn"),l=B("ZW9T"),a=B("1vsH");Ke.a=function(c){var s=c.name,u=c.data,i=c.theme,n=c.type,t=c.filename,d=c.monacoEditor,v=c.className,b=c.style,y=c.close,_=c.onClose,m=c.hasMask,g=Object(C.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),E=Object(S.a)(g,2),o=E[0],x=E[1],A=Object(C.useState)(""),O=Object(S.a)(A,2),D=O[0],I=O[1],F,z=1024*1024,ne=10*z,j=Object(C.useRef)();n==="office"&&(F=Object(a.V)(u).filesize,F>ne&&(n="other")),t&&(d.filename=t),Object(C.useEffect)(function(){var Z,K,q=(Z=document.cookie)===null||Z===void 0||((K=Z.replace(/\s/g,""))===null||K===void 0)?void 0:K.split(";");q==null||q.map(function(ie){var oe=ie.split("=");oe[0]==="_educoder_session"&&I(oe[1])})},[]);var G=function(){if(u.startsWith("http")||u.startsWith("blob:")){X();return}Object(a.z)(t||"educoder",u,t)},X=function(){Object(a.x)(t||"educoder",decodeURIComponent(u))};return console.log("data:",u,"fileanme:",t," name:",s),T.a.createElement("div",{style:Object(P.a)({},b||{}),className:"".concat(m&&p.a.bgBlack," ").concat(n?p.a.wrp:"hide")},y&&T.a.createElement("div",{className:p.a.close,ref:j},T.a.createElement(w.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return j.current}},T.a.createElement("span",{onClick:X},T.a.createElement("i",{className:"icon-quxiaozhiding"}))),T.a.createElement(w.a,{title:"\u5173\u95ED",getPopupContainer:function(){return j.current}},T.a.createElement("span",{className:"",onClick:_},T.a.createElement("i",{className:"icon-guanbi1"})))),T.a.createElement("div",{className:"".concat(p.a[v]," ").concat(v," ").concat(p.a.monaco," ").concat(n==="txt"?"show":"hide")},n==="txt"&&T.a.createElement(l.b,d)),n==="audio"&&T.a.createElement("audio",{src:"".concat(u!=null&&u.startsWith("/")||(u==null?void 0:u.indexOf("https://"))>-1?u:"data:audio/mp3;base64,").concat(u),autoPlay:!0}),n==="video"&&T.a.createElement(T.a.Fragment,null,u!=null&&u.startsWith("/")?T.a.createElement("video",{controls:!0,src:"".concat(u),autoPlay:!0}):T.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(u),autoPlay:!0})),n==="html"&&T.a.createElement("iframe",{src:u+"&disposition=inline"}),n==="html"&&T.a.createElement("iframe",{src:u+"&disposition=inline"}),n==="pdf"&&T.a.createElement("embed",{className:p.a.embed,src:u}),n==="image"&&T.a.createElement(T.a.Fragment,null,T.a.createElement("img",{src:"".concat(u!=null&&u.startsWith("/")||(u==null?void 0:u.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(u)})),n==="other"&&T.a.createElement("div",null,T.a.createElement(Q.a,{type:"primary",size:"large",onClick:G},T.a.createElement(f.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(n==="download"||n==="office")&&T.a.createElement(Q.a,{type:"primary",size:"large",onClick:G},T.a.createElement(f.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(Je,Ke,B){},pYxM:function(Je,Ke,B){Je.exports={flex_box_center:"flex_box_center___v-DUT",flex_space_between:"flex_space_between___1bRJc",flex_box_vertical_center:"flex_box_vertical_center___k_OZG",flex_box_center_end:"flex_box_center_end___2lt4j",flex_box_column:"flex_box_column___3fVE5",active:"active___-vjVj",line:"line___3pg8N",list:"list___3yqVJ",left:"left___2dr70",mask:"mask___186YH",right:"right___17A6Y",name:"name___v6M7T",title:"title___1BhMz",a:"a___3T4cN",b:"b___1z1Bk",des:"des___29QAn",tag:"tag___FfUI2"}},ppsT:function(Je,Ke,B){(function(ae){var Q,Q;!function(U){if(!0)window.OSS=U(),Je.exports=U();else var w}(function(){var U;return function(){function w(P,S,C){function T(f,l){if(!S[f]){if(!P[f]){var a=typeof Q=="function"&&Q;if(!l&&a)return Q(f,!0);if(h)return h(f,!0);var c=new Error("Cannot find module '"+f+"'");throw c.code="MODULE_NOT_FOUND",c}var s=S[f]={exports:{}};P[f][0].call(s.exports,function(u){return T(P[f][1][u]||u)},s,s.exports,w,P,S,C)}return S[f].exports}for(var h=typeof Q=="function"&&Q,p=0;p<C.length;p++)T(C[p]);return T}return w}()({1:[function(w,P,S){"use strict";var C=w("./browser/client");C.Buffer=w("buffer").Buffer,C.co=w("co"),C.urllib=w("../shims/xhr"),C.version=w("./browser/version").version,P.exports=C},{"../shims/xhr":244,"./browser/client":2,"./browser/version":5,buffer:38,co:41}],2:[function(w,P,S){(function(C,T){"use strict";function h(Z){return Z&&Z.__esModule?Z:{default:Z}}function p(Z,K){return Z[K]||Z[K.toLowerCase()]}function f(Z,K){var q=o.parse(Z);if(!q.protocol){var ie=K?"https://":"http://";q=o.parse(ie+Z)}if(q.protocol!=="http:"&&q.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return q}function l(Z,K,q){var ie=q?"https://":"http://",oe=K?"-internal.aliyuncs.com":".aliyuncs.com";return Z.substr(0,"vpc100-oss-cn-".length)==="vpc100-oss-cn-"&&(oe=".aliyuncs.com"),o.parse(ie+Z+oe)}function a(){return document&&document.location&&document.location.protocol==="https:"}function c(Z,K){if(!(this instanceof c))return new c(Z,K);Z&&Z.inited?this.options=Z:this.options=c.initOptions(Z),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=D,this.agent=this.options.agent||G),this.ctx=K,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}var s=w("babel-runtime/regenerator"),u=h(s),i=w("babel-runtime/core-js/object/keys"),n=h(i),t=w("debug")("ali-oss"),d=w("./../../shims/crypto/crypto.js"),v=w("path"),b=w("copy-to"),y=w("mime"),_=w("xml2js"),m=w("humanize-ms"),g=w("agentkeepalive"),E=w("merge-descriptors"),o=w("url"),x=w("is-type-of"),A=w("platform"),O=w("utility"),D=w("urllib"),I=w("./version"),F=w("dateformat"),z=w("bowser"),ne=w("../common/signUtils"),j=w("../common/utils"),G=new g;P.exports=c,c.initOptions=function(Z){if(!Z||!Z.accessKeyId||!Z.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");var K=a(),q={region:"oss-cn-hangzhou",internal:!1,secure:K,bucket:null,endpoint:null,cname:!1};if((0,n.default)(Z).forEach(function(ie){Z[ie]!==void 0&&(q[ie]=Z[ie])}),q.accessKeyId=q.accessKeyId.trim(),q.accessKeySecret=q.accessKeySecret.trim(),q.timeout&&(q.timeout=m(q.timeout)),q.endpoint)q.endpoint=f(q.endpoint,q.secure);else{if(!q.region)throw new Error("require options.endpoint or options.region");q.endpoint=l(q.region,q.internal,q.secure)}return q.inited=!0,q};var X=c.prototype;E(X,w("./object")),E(X,w("./managed_upload")),E(X,w("../common/multipart")),E(X,w("../common/thunkpool.js")),c.Wrapper=w("./wrapper"),X.signature=function(Z){return t("authorization stringToSign: %s",Z),ne.computeSignature(this.options.accessKeySecret,Z)},X.authorization=function(Z,K,q,ie){var oe=ne.buildCanonicalString(Z.toUpperCase(),K,{headers:ie,parameters:q});return ne.authorization(this.options.accessKeyId,this.options.accessKeySecret,oe)},X.createRequest=function(Z){var K={"x-oss-date":F(+new Date+this.options.amendTimeSkewed,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.options.stsToken&&(K["x-oss-security-token"]=this.options.stsToken),b(Z.headers).to(K),p(K,"Content-Type")||(Z.mime===y.default_type&&(Z.mime=""),Z.mime&&Z.mime.indexOf("/")>0?K["Content-Type"]=Z.mime:K["Content-Type"]=y.getType(Z.mime||v.extname(Z.object||""))||"application/octet-stream"),Z.content&&(K["Content-Md5"]=d.createHash("md5").update(new T(Z.content,"utf8")).digest("base64"),K["Content-Length"]||(K["Content-Length"]=Z.content.length));var q=this._getResource(Z);K.authorization=this.authorization(Z.method,q,Z.subres,K);var ie=this._getReqUrl(Z);t("request %s %s, with headers %j, !!stream: %s",Z.method,ie,K,!!Z.stream);var oe=Z.timeout||this.options.timeout;return{url:ie,params:{agent:this.agent,method:Z.method,content:Z.content,stream:Z.stream,headers:K,timeout:oe,writeStream:Z.writeStream,customResponse:Z.customResponse,ctx:Z.ctx||this.ctx}}},X.request=u.default.mark(function Z(K){var q,ie,oe,ye;return u.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:return q=this.createRequest(K),ie=void 0,oe=void 0,pe.prev=3,pe.next=6,this.urllib.request(q.url,q.params);case 6:ie=pe.sent,t("response %s %s, got %s, headers: %j",K.method,q.url,ie.status,ie.headers),pe.next=13;break;case 10:pe.prev=10,pe.t0=pe.catch(3),oe=pe.t0;case 13:if(ye=void 0,!ie||!K.successStatuses||K.successStatuses.indexOf(ie.status)!==-1){pe.next=26;break}return pe.next=17,this.requestError(ie);case 17:if(ye=pe.sent,ye.code!=="RequestTimeTooSkewed"){pe.next=23;break}return this.options.amendTimeSkewed=+new Date(ye.serverTime)-new Date,pe.next=22,this.request(K);case 22:return pe.abrupt("return",pe.sent);case 23:ye.params=K,pe.next=30;break;case 26:if(!oe){pe.next=30;break}return pe.next=29,this.requestError(oe);case 29:ye=pe.sent;case 30:if(!ye){pe.next=32;break}throw ye;case 32:if(!K.xmlResponse){pe.next=36;break}return pe.next=35,this.parseXML(ie.data);case 35:ie.data=pe.sent;case 36:return pe.abrupt("return",ie);case 37:case"end":return pe.stop()}},Z,this,[[3,10]])}),X._getResource=function(Z){var K="/";return Z.bucket&&(K+=Z.bucket+"/"),Z.object&&(K+=Z.object),K},X._isIP=function(Z){return j._isIP(Z)},X._escape=function(Z){return O.encodeURIComponent(Z).replace(/%2F/g,"/")},X._getReqUrl=function(Z){var K={};b(this.options.endpoint).to(K);var q=this._isIP(K.hostname),ie=this.options.cname;!Z.bucket||ie||q||(K.host=Z.bucket+"."+K.host);var oe="/";Z.bucket&&q&&(oe+=Z.bucket+"/"),Z.object&&(oe+=this._escape(Z.object).replace(/\+/g,"%2B")),K.pathname=oe;var ye={};if(Z.query&&E(ye,Z.query),Z.subres){var pe={};x.string(Z.subres)?pe[Z.subres]="":x.array(Z.subres)?Z.subres.forEach(function(we){pe[we]=""}):pe=Z.subres,E(ye,pe)}return K.query=ye,o.format(K)},X._getUserAgent=function(){var Z=C&&C.browser?"js":"nodejs",K="aliyun-sdk-"+Z+"/"+I.version,q=A.description;return!q&&C&&(q="Node.js "+C.version.slice(1)+" on "+C.platform+" "+C.arch),this._checkUserAgent(K+" "+q)},X._checkUserAgent=function(Z){return Z.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta")},X.checkBrowserAndVersion=function(Z,K){return z.name===Z&&z.version.split(".")[0]===K},X.parseXML=function(Z){return function(K){T.isBuffer(Z)&&(Z=Z.toString()),_.parseString(Z,{explicitRoot:!1,explicitArray:!1},K)}},X.requestError=u.default.mark(function Z(K){var q,ie,oe,ye;return u.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:if(q=null,K.data&&K.data.length){pe.next=5;break}K.status===-1||K.status===-2?(q=new Error(K.message),q.name=K.name,q.status=K.status,q.code=K.name):(K.status===404?(q=new Error("Object not exists"),q.name="NoSuchKeyError",q.status=404,q.code="NoSuchKey"):K.status===412?(q=new Error("Pre condition failed"),q.name="PreconditionFailedError",q.status=412,q.code="PreconditionFailed"):(q=new Error("Unknow error, status: "+K.status),q.name="UnknowError",q.status=K.status),q.requestId=K.headers["x-oss-request-id"],q.host=""),pe.next=30;break;case 5:return ie=String(K.data),t("request response error data: %s",ie),oe=void 0,pe.prev=8,pe.next=11,this.parseXML(ie)||{};case 11:oe=pe.sent,pe.next=21;break;case 14:return pe.prev=14,pe.t0=pe.catch(8),t(ie),pe.t0.message+=`
raw xml: `+ie,pe.t0.status=K.status,pe.t0.requestId=K.headers["x-oss-request-id"],pe.abrupt("return",pe.t0);case 21:ye=oe.Message||"unknow request error, status: "+K.status,oe.Condition&&(ye+=" (condition: "+oe.Condition+")"),q=new Error(ye),q.name=oe.Code?oe.Code+"Error":"UnknowError",q.status=K.status,q.code=oe.Code,q.requestId=oe.RequestId,q.hostId=oe.HostId,q.serverTime=oe.ServerTime;case 30:return t("generate error %j",q),pe.abrupt("return",q);case 32:case"end":return pe.stop()}},Z,this,[[8,14]])})}).call(this,w("_process"),w("buffer").Buffer)},{"../common/multipart":8,"../common/signUtils":9,"../common/thunkpool.js":10,"../common/utils":11,"./../../shims/crypto/crypto.js":237,"./managed_upload":3,"./object":4,"./version":5,"./wrapper":6,_process:173,agentkeepalive:12,"babel-runtime/core-js/object/keys":23,"babel-runtime/regenerator":33,bowser:35,buffer:38,"copy-to":43,dateformat:154,debug:155,"humanize-ms":160,"is-type-of":165,"merge-descriptors":168,mime:242,path:170,platform:171,url:203,urllib:244,utility:243,xml2js:213}],3:[function(w,P,S){(function(C){"use strict";function T(b){return b&&b.__esModule?b:{default:b}}function h(b,y){if(!(this instanceof h))return new h(b,y);v.call(this,y),this.file=b,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}var p=w("babel-runtime/core-js/array/from"),f=T(p),l=w("babel-runtime/regenerator"),a=T(l),c=w("is-type-of"),s=w("util"),u=w("path"),i=w("mime"),n=w("copy-to"),t=S;t.multipartUpload=a.default.mark(function b(y,_,m){var g,E,o,x,A,O,D,I,F;return a.default.wrap(function(z){for(;;)switch(z.prev=z.next){case 0:if(this.resetCancelFlag(),m=m||{},!m.checkpoint||!m.checkpoint.uploadId){z.next=6;break}return z.next=5,this._resumeMultipart(m.checkpoint,m);case 5:return z.abrupt("return",z.sent);case 6:return g=102400,m.mime||(c.file(_)?m.mime=i.getType(u.extname(_.name)):c.blob(_)?m.mime=_.type:m.mime=i.getType(u.extname(_))),m.headers=m.headers||{},this._convertMetaToHeaders(m.meta,m.headers),z.next=12,this._getFileSize(_);case 12:if(!((E=z.sent)<g)){z.next=25;break}return o=this._createStream(_,0,E),m.contentLength=E,z.next=18,this.putStream(y,o,m);case 18:if(x=z.sent,!m||!m.progress){z.next=22;break}return z.next=22,m.progress(1);case 22:return A={res:x.res,bucket:this.options.bucket,name:y,etag:x.res.headers.etag},(m.headers&&m.headers["x-oss-callback"]||m.callback)&&(A.data=x.data),z.abrupt("return",A);case 25:if(!(m.partSize&&m.partSize<g)){z.next=27;break}throw new Error("partSize must not be smaller than "+g);case 27:return z.next=29,this.initMultipartUpload(y,m);case 29:if(O=z.sent,D=O.uploadId,I=this._getPartSize(E,m.partSize),F={file:_,name:y,fileSize:E,partSize:I,uploadId:D,doneParts:[]},!m||!m.progress){z.next=36;break}return z.next=36,m.progress(0,F,O.res);case 36:return z.next=38,this._resumeMultipart(F,m);case 38:return z.abrupt("return",z.sent);case 39:case"end":return z.stop()}},b,this)}),t._resumeMultipart=a.default.mark(function b(y,_){var m,g,E,o,x,A,O,D,I,F,z,ne,j,G,X,Z,K,q,ie,oe,ye;return a.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:if(!this.isCancel()){pe.next=2;break}throw this._makeCancelEvent();case 2:if(m=y.file,g=y.fileSize,E=y.partSize,o=y.uploadId,x=y.doneParts,A=y.name,O=[],x.length>0&&n(x).to(O),D=this._divideParts(g,E),I=D.length,F=!1,z=a.default.mark(function we(fe,Te){var Fe,De,Me;return a.default.wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:if(fe.isCancel()){Ue.next=21;break}return Ue.prev=1,Fe=D[Te-1],De={stream:fe._createStream(m,Fe.start,Fe.end),size:Fe.end-Fe.start},Ue.next=6,fe._uploadPart(A,o,Te,De);case 6:if(Me=Ue.sent,fe.isCancel()||F){Ue.next=13;break}if(y.doneParts.push({number:Te,etag:Me.res.headers.etag}),O.push({number:Te,etag:Me.res.headers.etag}),!_||!_.progress){Ue.next=13;break}return Ue.next=13,_.progress(x.length/I,y,Me.res);case 13:Ue.next=21;break;case 15:if(Ue.prev=15,Ue.t0=Ue.catch(1),fe.isCancel()){Ue.next=21;break}throw fe.cancel(),Ue.t0.partNum=Te,Ue.t0;case 21:case"end":return Ue.stop()}},we,this,[[1,15]])}),ne=(0,f.default)(new Array(I),function(we,fe){return fe+1}),j=O.map(function(we){return we.number}),G=ne.filter(function(we){return j.indexOf(we)<0}),X=5,Z=_.parallel||X,!this.checkBrowserAndVersion("Internet Explorer","10")&&Z!==1){pe.next=26;break}K=0;case 16:if(!(K<G.length)){pe.next=24;break}if(!this.isCancel()){pe.next=19;break}throw this._makeCancelEvent();case 19:return pe.next=21,z(this,G[K]);case 21:K++,pe.next=16;break;case 24:pe.next=40;break;case 26:for(q=[],ie=0;ie<G.length;ie++)q.push(z(this,G[ie]));return pe.next=30,this._thunkPool(q,Z);case 30:if(oe=pe.sent,F=!0,!(oe&&oe.length>0)){pe.next=37;break}throw this.resetCancelFlag(),ye=oe[0],ye.message="Failed to upload some parts with error: "+ye.toString()+" part_num: "+ye.partNum,ye;case 37:if(!this.isCancel()){pe.next=40;break}throw q=null,this._makeCancelEvent();case 40:return pe.next=42,this.completeMultipartUpload(A,o,O,_);case 42:return pe.abrupt("return",pe.sent);case 43:case"end":return pe.stop()}},b,this)}),c.file=function(b){return typeof File!="undefined"&&b instanceof File},c.blob=function(b){return typeof Blob!="undefined"&&b instanceof Blob},t._getFileSize=a.default.mark(function b(y){var _;return a.default.wrap(function(m){for(;;)switch(m.prev=m.next){case 0:if(!c.buffer(y)){m.next=4;break}return m.abrupt("return",y.length);case 4:if(!c.blob(y)&&!c.file(y)){m.next=6;break}return m.abrupt("return",y.size);case 6:if(!c.string(y)){m.next=11;break}return m.next=9,this._statFile(y);case 9:return _=m.sent,m.abrupt("return",_.size);case 11:throw new Error("_getFileSize requires Buffer/File/String.");case 12:case"end":return m.stop()}},b,this)});var d=w("stream"),v=d.Readable;s.inherits(h,v),h.prototype.readFileAndPush=function(b){if(this.fileBuffer)for(var y=!0;y&&this.fileBuffer&&this.start<this.fileBuffer.length;){var _=this.start,m=_+b;m=m>this.fileBuffer.length?this.fileBuffer.length:m,this.start=m,y=this.push(this.fileBuffer.slice(_,m))}},h.prototype._read=function(b){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file)return this.finish||(this.fileBuffer=null,this.finish=!0),void this.push(null);b=b||16384;var y=this;this.reader.onload=function(_){y.fileBuffer=new C(new Uint8Array(_.target.result)),y.file=null,y.readFileAndPush(b)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(b)},t._createStream=function(b,y,_){if(c.blob(b)||c.file(b))return new h(b.slice(y,_));throw new Error("_createStream requires File/String.")},t._getPartSize=function(b,y){return y?Math.max(Math.ceil(b/1e4),y):1048576},t._divideParts=function(b,y){for(var _=Math.ceil(b/y),m=[],g=0;g<_;g++){var E=y*g,o=Math.min(E+y,b);m.push({start:E,end:o})}return m},t._makeCancelEvent=function(){return{status:0,name:"cancel"}}}).call(this,w("buffer").Buffer)},{"babel-runtime/core-js/array/from":16,"babel-runtime/regenerator":33,buffer:38,"copy-to":43,"is-type-of":165,mime:242,path:170,stream:195,util:207}],4:[function(w,P,S){"use strict";function C(y){return y&&y.__esModule?y:{default:y}}var T=w("babel-runtime/core-js/object/keys"),h=C(T),p=w("babel-runtime/regenerator"),f=C(p),l=w("debug")("ali-oss:object"),a=w("utility"),c=w("fs"),s=w("is-type-of"),u=w("url"),i=w("copy-to"),n=w("path"),t=w("mime"),d=w("../common/callback"),v=w("../common/signUtils"),b=S;b.append=f.default.mark(function y(_,m,g){var E;return f.default.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return g=g||{},g.position===void 0&&(g.position="0"),g.subres={append:"",position:g.position},g.method="POST",o.next=6,this.put(_,m,g);case 6:return E=o.sent,E.nextAppendPosition=E.res.headers["x-oss-next-append-position"],o.abrupt("return",E);case 9:case"end":return o.stop()}},y,this)}),b.put=f.default.mark(function y(_,m,g){var E,o,x,A,O,D;return f.default.wrap(function(I){for(;;)switch(I.prev=I.next){case 0:if(E=void 0,g=g||{},!s.buffer(m)){I.next=6;break}E=m,I.next=18;break;case 6:if(!s.blob(m)&&!s.file(m)){I.next=17;break}return g.mime||(s.file(m)?g.mime=t.getType(n.extname(m.name)):g.mime=m.type),o=this._createStream(m,0,m.size),I.next=11,this._getFileSize(m);case 11:return g.contentLength=I.sent,I.next=14,this.putStream(_,o,g);case 14:return I.abrupt("return",I.sent);case 17:throw new TypeError("Must provide Buffer/Blob for put.");case 18:return g.headers=g.headers||{},this._convertMetaToHeaders(g.meta,g.headers),x=g.method||"PUT",A=this._objectRequestParams(x,_,g),d.encodeCallback(A,g),A.mime=g.mime,A.content=E,A.successStatuses=[200],I.next=28,this.request(A);case 28:return O=I.sent,D={name:_,url:this._objectUrl(_),res:O.res},A.headers&&A.headers["x-oss-callback"]&&(D.data=JSON.parse(O.data.toString())),I.abrupt("return",D);case 32:case"end":return I.stop()}},y,this)}),b.putStream=f.default.mark(function y(_,m,g){var E,o,x,A;return f.default.wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return g=g||{},g.headers=g.headers||{},g.contentLength?g.headers["Content-Length"]=g.contentLength:g.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(g.meta,g.headers),E=g.method||"PUT",o=this._objectRequestParams(E,_,g),d.encodeCallback(o,g),o.mime=g.mime,o.stream=m,o.successStatuses=[200],O.next=12,this.request(o);case 12:return x=O.sent,A={name:_,url:this._objectUrl(_),res:x.res},o.headers&&o.headers["x-oss-callback"]&&(A.data=JSON.parse(x.data.toString())),O.abrupt("return",A);case 16:case"end":return O.stop()}},y,this)}),b.head=f.default.mark(function y(_,m){var g,E,o;return f.default.wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return g=this._objectRequestParams("HEAD",_,m),g.successStatuses=[200,304],x.next=4,this.request(g);case 4:return E=x.sent,o={meta:null,res:E.res,status:E.status},E.status===200&&(0,h.default)(E.headers).forEach(function(A){A.indexOf("x-oss-meta-")===0&&(o.meta||(o.meta={}),o.meta[A.substring(11)]=E.headers[A])}),x.abrupt("return",o);case 8:case"end":return x.stop()}},y,this)}),b.get=f.default.mark(function y(_,m,g){var E,o,x,A;return f.default.wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return E=null,o=!1,s.writableStream(m)?E=m:s.string(m)?(E=c.createWriteStream(m),o=!0):g=m,g=g||{},g.process&&(g.subres=g.subres||{},g.subres["x-oss-process"]=g.process),x=void 0,O.prev=6,A=this._objectRequestParams("GET",_,g),A.writeStream=E,A.successStatuses=[200,206,304],O.next=12,this.request(A);case 12:x=O.sent,o&&E.destroy(),O.next=24;break;case 16:if(O.prev=16,O.t0=O.catch(6),!o){O.next=23;break}return E.destroy(),l("get error: %s, delete the exists file %s",O.t0,m),O.next=23,this._deleteFileSafe(m);case 23:throw O.t0;case 24:return O.abrupt("return",{res:x.res,content:x.data});case 25:case"end":return O.stop()}},y,this,[[6,16]])}),b.getStream=f.default.mark(function y(_,m){var g,E;return f.default.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return m=m||{},g=this._objectRequestParams("GET",_,m),g.customResponse=!0,g.successStatuses=[200,206,304],o.next=6,this.request(g);case 6:return E=o.sent,o.abrupt("return",{stream:E.res,res:{status:E.status,headers:E.headers}});case 8:case"end":return o.stop()}},y,this)}),b.delete=f.default.mark(function y(_,m){var g,E;return f.default.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return g=this._objectRequestParams("DELETE",_,m),g.successStatuses=[204],o.next=4,this.request(g);case 4:return E=o.sent,o.abrupt("return",{res:E.res});case 6:case"end":return o.stop()}},y,this)}),b.deleteMulti=f.default.mark(function y(_,m){var g,E,o,x,A,O;return f.default.wrap(function(D){for(;;)switch(D.prev=D.next){case 0:for(m=m||{},g=`<?xml version="1.0" encoding="UTF-8"?>
<Delete>
`,m.quiet?g+=` <Quiet>true</Quiet>
`:g+=` <Quiet>false</Quiet>
`,E=0;E<_.length;E++)g+=" <Object><Key>"+a.escape(this._objectName(_[E]))+`</Key></Object>
`;return g+="</Delete>",l("delete multi objects: %s",g),m.subres="delete",o=this._objectRequestParams("POST","",m),o.mime="xml",o.content=g,o.xmlResponse=!0,o.successStatuses=[200],D.next=14,this.request(o);case 14:return x=D.sent,A=x.data,O=A&&A.Deleted||null,O&&(Array.isArray(O)||(O=[O]),O=O.map(function(I){return I.Key})),D.abrupt("return",{res:x.res,deleted:O});case 19:case"end":return D.stop()}},y,this)}),b.copy=f.default.mark(function y(_,m,g){var E,o,x;return f.default.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return g=g||{},g.headers=g.headers||{},(0,h.default)(g.headers).forEach(function(O){g.headers["x-oss-copy-source-"+O.toLowerCase()]=g.headers[O]}),g.meta&&(g.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(g.meta,g.headers),m=m[0]!=="/"?"/"+this.options.bucket+"/"+encodeURIComponent(m):"/"+encodeURIComponent(m.slice(1)),g.headers["x-oss-copy-source"]=m,E=this._objectRequestParams("PUT",_,g),E.xmlResponse=!0,E.successStatuses=[200,304],A.next=12,this.request(E);case 12:return o=A.sent,x=o.data,x&&(x={etag:x.ETag,lastModified:x.LastModified}),A.abrupt("return",{data:x,res:o.res});case 16:case"end":return A.stop()}},y,this)}),b.putMeta=f.default.mark(function y(_,m,g){return f.default.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return E.next=2,this.copy(_,_,{meta:m||{},timeout:g&&g.timeout,ctx:g&&g.ctx});case 2:return E.abrupt("return",E.sent);case 3:case"end":return E.stop()}},y,this)}),b.list=f.default.mark(function y(_,m){var g,E,o,x,A;return f.default.wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return g=this._objectRequestParams("GET","",m),g.query=_,g.xmlResponse=!0,g.successStatuses=[200],O.next=6,this.request(g);case 6:return E=O.sent,o=E.data.Contents,x=this,o&&(Array.isArray(o)||(o=[o]),o=o.map(function(D){return{name:D.Key,url:x._objectUrl(D.Key),lastModified:D.LastModified,etag:D.ETag,type:D.Type,size:Number(D.Size),storageClass:D.StorageClass,owner:{id:D.Owner.ID,displayName:D.Owner.DisplayName}}})),A=E.data.CommonPrefixes||null,A&&(Array.isArray(A)||(A=[A]),A=A.map(function(D){return D.Prefix})),O.abrupt("return",{res:E.res,objects:o,prefixes:A,nextMarker:E.data.NextMarker||null,isTruncated:E.data.IsTruncated==="true"});case 13:case"end":return O.stop()}},y,this)}),b.putACL=f.default.mark(function y(_,m,g){var E,o;return f.default.wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return g=g||{},g.subres="acl",g.headers=g.headers||{},g.headers["x-oss-object-acl"]=m,_=this._objectName(_),E=this._objectRequestParams("PUT",_,g),E.successStatuses=[200],x.next=9,this.request(E);case 9:return o=x.sent,x.abrupt("return",{res:o.res});case 11:case"end":return x.stop()}},y,this)}),b.getACL=f.default.mark(function y(_,m){var g,E;return f.default.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return m=m||{},m.subres="acl",_=this._objectName(_),g=this._objectRequestParams("GET",_,m),g.successStatuses=[200],g.xmlResponse=!0,o.next=8,this.request(g);case 8:return E=o.sent,o.abrupt("return",{acl:E.data.AccessControlList.Grant,owner:{id:E.data.Owner.ID,displayName:E.data.Owner.DisplayName},res:E.res});case 10:case"end":return o.stop()}},y,this)}),b.restore=f.default.mark(function y(_,m){var g,E;return f.default.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return m=m||{},m.subres="restore",g=this._objectRequestParams("POST",_,m),g.successStatuses=[202],o.next=6,this.request(g);case 6:return E=o.sent,o.abrupt("return",{res:E.res});case 8:case"end":return o.stop()}},y,this)}),b.signatureUrl=function(y,_){_=_||{},y=this._objectName(y),_.method=_.method||"GET";var m=a.timestamp()+(_.expires||1800),g={bucket:this.options.bucket,object:y},E=this._getResource(g);this.options.stsToken&&(_["security-token"]=this.options.stsToken);var o=v._signatureForURL(this.options.accessKeySecret,_,E,m),x=u.parse(this._getReqUrl(g));return x.query={OSSAccessKeyId:this.options.accessKeyId,Expires:m,Signature:o.Signature},i(o.subResource).to(x.query),x.format()},b.getObjectUrl=function(y,_){return _?_[_.length-1]!=="/"&&(_+="/"):_=this.options.endpoint.format(),_+this._escape(this._objectName(y))},b._objectUrl=function(y){return this._getReqUrl({bucket:this.options.bucket,object:y})},b.generateObjectUrl=function(y,_){if(_)_[_.length-1]!=="/"&&(_+="/");else{_=this.options.endpoint.format();var m=u.parse(_),g=this.options.bucket;m.hostname=g+"."+m.hostname,m.host=g+"."+m.host,_=m.format()}return _+this._escape(this._objectName(y))},b._objectRequestParams=function(y,_,m){if(!this.options.bucket)throw new Error("Please create a bucket first");m=m||{},_=this._objectName(_);var g={object:_,bucket:this.options.bucket,method:y,subres:m&&m.subres,timeout:m&&m.timeout,ctx:m&&m.ctx};return m.headers&&(g.headers={},i(m.headers).to(g.headers)),g},b._objectName=function(y){return y.replace(/^\/+/,"")},b._statFile=function(y){return function(_){c.stat(y,_)}},b._convertMetaToHeaders=function(y,_){y&&(0,h.default)(y).forEach(function(m){_["x-oss-meta-"+m]=y[m]})},b._deleteFileSafe=function(y){return function(_){c.exists(y,function(m){m?c.unlink(y,function(g){g&&l("unlink %j error: %s",y,g),_()}):_()})}}},{"../common/callback":7,"../common/signUtils":9,"babel-runtime/core-js/object/keys":23,"babel-runtime/regenerator":33,"copy-to":43,debug:155,fs:36,"is-type-of":165,mime:242,path:170,url:203,utility:243}],5:[function(w,P,S){"use strict";S.version="5.3.1"},{}],6:[function(w,P,S){"use strict";function C(n){return n&&n.__esModule?n:{default:n}}function T(n){return n&&typeof n.next=="function"&&typeof n.throw=="function"}function h(n){if(!n)return!1;var t=n.constructor;return!!t&&(t.name==="GeneratorFunction"||t.displayName==="GeneratorFunction"||T(t.prototype)||T(n.prototype))}function p(n,t){var d=new n(t),v=(0,s.default)(d),b=(0,s.default)((0,a.default)(d));v.concat(b).forEach(function(y){h(d[y])?this[y]=u.wrap(d[y]).bind(d):this[y]=d[y]},this)}function f(n){if(!(this instanceof f))return new f(n);p.call(this,i,n)}var l=w("babel-runtime/core-js/object/get-prototype-of"),a=C(l),c=w("babel-runtime/core-js/object/keys"),s=C(c),u=w("co"),i=w("./client");P.exports=f,f.STS=function n(t){if(!(this instanceof n))return new n(t);p.call(this,i.STS,t)}},{"./client":2,"babel-runtime/core-js/object/get-prototype-of":22,"babel-runtime/core-js/object/keys":23,co:41}],7:[function(w,P,S){(function(C){"use strict";function T(a){return a&&a.__esModule?a:{default:a}}var h=w("babel-runtime/core-js/object/keys"),p=T(h),f=w("babel-runtime/core-js/json/stringify"),l=T(f);S.encodeCallback=function(a,c){if(a.headers=a.headers||{},!Object.prototype.hasOwnProperty.call(a.headers,"x-oss-callback")&&c.callback){var s={callbackUrl:encodeURI(c.callback.url),callbackBody:c.callback.body};c.callback.host&&(s.callbackHost=c.callback.host),c.callback.contentType&&(s.callbackBodyType=c.callback.contentType);var u=new C((0,l.default)(s)).toString("base64");if(a.headers["x-oss-callback"]=u,c.callback.customValue){var i={};(0,p.default)(c.callback.customValue).forEach(function(n){i["x:"+n]=c.callback.customValue[n]}),a.headers["x-oss-callback-var"]=new C((0,l.default)(i)).toString("base64")}}}}).call(this,w("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/keys":23,buffer:38}],8:[function(w,P,S){"use strict";var C=w("babel-runtime/regenerator"),T=function(l){return l&&l.__esModule?l:{default:l}}(C),h=w("copy-to"),p=w("./callback"),f=S;f.listUploads=T.default.mark(function l(a,c){var s,u,i,n;return T.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return c=c||{},s={},h(c).to(s),s.subres="uploads",u=this._objectRequestParams("GET","",s),u.query=a,u.xmlResponse=!0,u.successStatuses=[200],t.next=10,this.request(u);case 10:return i=t.sent,n=i.data.Upload||[],Array.isArray(n)||(n=[n]),n=n.map(function(d){return{name:d.Key,uploadId:d.UploadId,initiated:d.Initiated}}),t.abrupt("return",{res:i.res,uploads:n,bucket:i.data.Bucket,nextKeyMarker:i.data.NextKeyMarker,nextUploadIdMarker:i.data.NextUploadIdMarker,isTruncated:i.data.IsTruncated==="true"});case 15:case"end":return t.stop()}},l,this)}),f.listParts=T.default.mark(function l(a,c,s,u){var i,n,t;return T.default.wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return u=u||{},i={},h(u).to(i),i.subres={uploadId:c},n=this._objectRequestParams("GET",a,i),n.query=s,n.xmlResponse=!0,n.successStatuses=[200],d.next=10,this.request(n);case 10:return t=d.sent,d.abrupt("return",{res:t.res,uploadId:t.data.UploadId,bucket:t.data.Bucket,name:t.data.Key,partNumberMarker:t.data.PartNumberMarker,nextPartNumberMarker:t.data.NextPartNumberMarker,maxParts:t.data.MaxParts,isTruncated:t.data.IsTruncated,parts:t.data.Part||[]});case 12:case"end":return d.stop()}},l,this)}),f.abortMultipartUpload=T.default.mark(function l(a,c,s){var u,i,n;return T.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.cancel(),s=s||{},u={},h(s).to(u),u.subres={uploadId:c},i=this._objectRequestParams("DELETE",a,u),i.successStatuses=[204],t.next=9,this.request(i);case 9:return n=t.sent,t.abrupt("return",{res:n.res});case 11:case"end":return t.stop()}},l,this)}),f.initMultipartUpload=T.default.mark(function l(a,c){var s,u,i;return T.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return c=c||{},s={},h(c).to(s),s.headers=s.headers||{},this._convertMetaToHeaders(c.meta,s.headers),s.subres="uploads",u=this._objectRequestParams("POST",a,s),u.mime=c.mime,u.xmlResponse=!0,u.successStatuses=[200],n.next=12,this.request(u);case 12:return i=n.sent,n.abrupt("return",{res:i.res,bucket:i.data.Bucket,name:i.data.Key,uploadId:i.data.UploadId});case 14:case"end":return n.stop()}},l,this)}),f.uploadPart=T.default.mark(function l(a,c,s,u,i,n,t){var d;return T.default.wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return d={stream:this._createStream(u,i,n),size:n-i},v.next=3,this._uploadPart(a,c,s,d,t);case 3:return v.abrupt("return",v.sent);case 4:case"end":return v.stop()}},l,this)}),f.completeMultipartUpload=T.default.mark(function l(a,c,s,u){var i,n,t,d,v,b,y,_;return T.default.wrap(function(m){for(;;)switch(m.prev=m.next){case 0:for(i=s.concat().sort(function(g,E){return g.number-E.number}).filter(function(g,E,o){return!E||g.number!==o[E-1].number}),n=`<?xml version="1.0" encoding="UTF-8"?>
<CompleteMultipartUpload>
`,t=0;t<i.length;t++)d=i[t],n+=`<Part>
`,n+="<PartNumber>"+d.number+`</PartNumber>
`,n+="<ETag>"+d.etag+`</ETag>
`,n+=`</Part>
`;return n+="</CompleteMultipartUpload>",u=u||{},v={},h(u).to(v),v.subres={uploadId:c},b=this._objectRequestParams("POST",a,v),p.encodeCallback(b,v),b.mime="xml",b.content=n,b.headers&&b.headers["x-oss-callback"]||(b.xmlResponse=!0),b.successStatuses=[200],m.next=16,this.request(b);case 16:return y=m.sent,_={res:y.res,bucket:b.bucket,name:a,etag:y.res.headers.etag},b.headers&&b.headers["x-oss-callback"]&&(_.data=JSON.parse(y.data.toString())),m.abrupt("return",_);case 20:case"end":return m.stop()}},l,this)}),f._uploadPart=T.default.mark(function l(a,c,s,u,i){var n,t,d;return T.default.wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return i=i||{},n={},h(i).to(n),n.headers={"Content-Length":u.size},n.subres={partNumber:s,uploadId:c},t=this._objectRequestParams("PUT",a,n),t.mime=n.mime,t.stream=u.stream,t.successStatuses=[200],v.next=11,this.request(t);case 11:return d=v.sent,u.stream=null,t.stream=null,v.abrupt("return",{name:a,etag:d.res.headers.etag,res:d.res});case 15:case"end":return v.stop()}},l,this)})},{"./callback":7,"babel-runtime/regenerator":33,"copy-to":43}],9:[function(w,P,S){(function(C){"use strict";function T(s){return s&&s.__esModule?s:{default:s}}var h=w("babel-runtime/core-js/json/stringify"),p=T(h),f=w("babel-runtime/core-js/object/keys"),l=T(f),a=w("./../../shims/crypto/crypto.js"),c=w("is-type-of");S.buildCanonicalizedResource=function(s,u){var i=""+s,n="?";if(c.string(u)&&u.trim()!=="")i+=n+u;else if(c.array(u))u.sort(),i+=n+u.join("&");else if(u){var t=function(v,b){return v[0]>b[0]?1:v[0]<b[0]?-1:0},d=function(v){i+=n+v,u[v]&&(i+="="+u[v]),n="&"};(0,l.default)(u).sort(t).forEach(d)}return i},S.buildCanonicalString=function(s,u,i,n){i=i||{};var t=i.headers||{},d=[],v={},b=[s.toUpperCase(),t["Content-Md5"]||"",t["Content-Type"]||t["Content-Type".toLowerCase()],n||t["x-oss-date"]];return(0,l.default)(t).forEach(function(y){var _=y.toLowerCase();_.indexOf("x-oss-")===0&&(v[_]=String(t[y]).trim())}),(0,l.default)(v).sort().forEach(function(y){d.push(y+":"+v[y])}),b=b.concat(d),b.push(this.buildCanonicalizedResource(u,i.parameters)),b.join(`
`)},S.computeSignature=function(s,u){return a.createHmac("sha1",s).update(new C(u,"utf8")).digest("base64")},S.authorization=function(s,u,i){return"OSS "+s+":"+this.computeSignature(u,i)},S._signatureForURL=function(s,u,i,n){var t={},d={};if(u.process&&(d["x-oss-process"]=u.process),u.response&&(0,l.default)(u.response).forEach(function(_){var m="response-"+_.toLowerCase();d[m]=u.response[_]}),(0,l.default)(u).forEach(function(_){var m=_.toLowerCase(),g=u[_];m.indexOf("x-oss-")===0?t[m]=g:m.indexOf("content-md5")===0||m.indexOf("content-type")===0?t[_]=g:m!=="expires"&&m!=="response"&&m!=="process"&&m!=="method"&&(d[m]=g)}),Object.prototype.hasOwnProperty.call(u,"security-token")&&(d["security-token"]=u["security-token"]),Object.prototype.hasOwnProperty.call(u,"callback")){var v={callbackUrl:encodeURI(u.callback.url),callbackBody:u.callback.body};if(u.callback.host&&(v.callbackHost=u.callback.host),u.callback.contentType&&(v.callbackBodyType=u.callback.contentType),d.callback=new C((0,p.default)(v)).toString("base64"),u.callback.customValue){var b={};(0,l.default)(u.callback.customValue).forEach(function(_){b["x:"+_]=u.callback.customValue[_]}),d["callback-var"]=new C((0,p.default)(b)).toString("base64")}}var y=this.buildCanonicalString(u.method,i,{headers:t,parameters:d},n.toString());return{Signature:this.computeSignature(s,y),subResource:d}}}).call(this,w("buffer").Buffer)},{"./../../shims/crypto/crypto.js":237,"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/keys":23,buffer:38,"is-type-of":165}],10:[function(w,P,S){"use strict";var C=w("babel-runtime/regenerator"),T=function(a){return a&&a.__esModule?a:{default:a}}(C),h=w("co"),p=w("co-priority-queue"),f=w("any-promise"),l=S;l._thunkPool=function(a,c){function s(d,v){++n===d.length&&v(t)}function u(d,v){function b(){var o;return T.default.wrap(function(x){for(;;)switch(x.prev=x.next){case 0:o=void 0;case 1:if(i.isCancel()){x.next=9;break}return x.next=4,m.next();case 4:return o=x.sent,x.next=7,o();case 7:x.next=1;break;case 9:g+=1,g===d&&(m.fns=[],m.buffer=[],v(t));case 11:case"end":return x.stop()}},_,this)}function y(o){console.error(o.stack)}for(var _=T.default.mark(b),m=new p,g=0,E=0;E<d;E++)h(b).catch(y);return function(o,x){return function(A){m.push(T.default.mark(function O(){return T.default.wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return D.prev=0,D.t0=A,D.next=4,o;case 4:D.t1=D.sent,(0,D.t0)(null,D.t1),D.next=11;break;case 8:D.prev=8,D.t2=D.catch(0),A(D.t2);case 11:case"end":return D.stop()}},O,this,[[0,8]])}),x)}}}var i=this,n=0,t=[];return new f(function(d){function v(g){return T.default.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return E.next=2,_(a[g]);case 2:s(a,d);case 3:case"end":return E.stop()}},y,this)}function b(g){t.push(g),s(a,d)}for(var y=T.default.mark(v),_=new u(c,d),m=0;m<a.length;m++)h(v(m)).catch(b)})},l.cancel=function(){this.options.cancelFlag=!0},l.isCancel=function(){return this.options.cancelFlag},l.resetCancelFlag=function(){this.options.cancelFlag=!1}},{"any-promise":13,"babel-runtime/regenerator":33,co:41,"co-priority-queue":40}],11:[function(w,P,S){"use strict";S._isIP=function(C){var T=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,h=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;return T.test(C)||h.test(C)}},{}],12:[function(w,P,S){function C(){}P.exports=C,P.exports.HttpsAgent=C},{}],13:[function(w,P,S){P.exports=w("./register")().Promise},{"./register":15}],14:[function(w,P,S){"use strict";var C=null;P.exports=function(T,h){return function(p,f){p=p||null,f=f||{};var l=f.global!==!1;if(C===null&&l&&(C=T["@@any-promise/REGISTRATION"]||null),C!==null&&p!==null&&C.implementation!==p)throw new Error('any-promise already defined as "'+C.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return C===null&&(C=p!==null&&f.Promise!==void 0?{Promise:f.Promise,implementation:p}:h(p),l&&(T["@@any-promise/REGISTRATION"]=C)),C}}},{}],15:[function(w,P,S){"use strict";function C(){if(window.Promise===void 0)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"}}P.exports=w("./loader")(window,C)},{"./loader":14}],16:[function(w,P,S){P.exports={default:w("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":44}],17:[function(w,P,S){P.exports={default:w("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":45}],18:[function(w,P,S){P.exports={default:w("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":46}],19:[function(w,P,S){P.exports={default:w("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":47}],20:[function(w,P,S){P.exports={default:w("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":48}],21:[function(w,P,S){P.exports={default:w("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":49}],22:[function(w,P,S){P.exports={default:w("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":50}],23:[function(w,P,S){P.exports={default:w("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":51}],24:[function(w,P,S){P.exports={default:w("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":52}],25:[function(w,P,S){P.exports={default:w("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":53}],26:[function(w,P,S){P.exports={default:w("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":54}],27:[function(w,P,S){P.exports={default:w("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":56}],28:[function(w,P,S){P.exports={default:w("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":55}],29:[function(w,P,S){P.exports={default:w("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":57}],30:[function(w,P,S){"use strict";S.__esModule=!0,S.default=function(C,T){if(!(C instanceof T))throw new TypeError("Cannot call a class as a function")}},{}],31:[function(w,P,S){"use strict";S.__esModule=!0;var C=w("../core-js/object/define-property"),T=function(h){return h&&h.__esModule?h:{default:h}}(C);S.default=function(){function h(p,f){for(var l=0;l<f.length;l++){var a=f[l];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),(0,T.default)(p,a.key,a)}}return function(p,f,l){return f&&h(p.prototype,f),l&&h(p,l),p}}()},{"../core-js/object/define-property":20}],32:[function(w,P,S){"use strict";function C(a){return a&&a.__esModule?a:{default:a}}S.__esModule=!0;var T=w("../core-js/symbol/iterator"),h=C(T),p=w("../core-js/symbol"),f=C(p),l=typeof f.default=="function"&&typeof h.default=="symbol"?function(a){return typeof a}:function(a){return a&&typeof f.default=="function"&&a.constructor===f.default&&a!==f.default.prototype?"symbol":typeof a};S.default=typeof f.default=="function"&&l(h.default)==="symbol"?function(a){return a===void 0?"undefined":l(a)}:function(a){return a&&typeof f.default=="function"&&a.constructor===f.default&&a!==f.default.prototype?"symbol":a===void 0?"undefined":l(a)}},{"../core-js/symbol":27,"../core-js/symbol/iterator":29}],33:[function(w,P,S){P.exports=w("regenerator-runtime")},{"regenerator-runtime":191}],34:[function(w,P,S){"use strict";function C(d){var v=d.length;if(v%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var b=d.indexOf("=");return b===-1&&(b=v),[b,b===v?0:4-b%4]}function T(d){var v=C(d),b=v[0],y=v[1];return 3*(b+y)/4-y}function h(d,v,b){return 3*(v+b)/4-b}function p(d){for(var v,b=C(d),y=b[0],_=b[1],m=new u(h(d,y,_)),g=0,E=_>0?y-4:y,o=0;o<E;o+=4)v=s[d.charCodeAt(o)]<<18|s[d.charCodeAt(o+1)]<<12|s[d.charCodeAt(o+2)]<<6|s[d.charCodeAt(o+3)],m[g++]=v>>16&255,m[g++]=v>>8&255,m[g++]=255&v;return _===2&&(v=s[d.charCodeAt(o)]<<2|s[d.charCodeAt(o+1)]>>4,m[g++]=255&v),_===1&&(v=s[d.charCodeAt(o)]<<10|s[d.charCodeAt(o+1)]<<4|s[d.charCodeAt(o+2)]>>2,m[g++]=v>>8&255,m[g++]=255&v),m}function f(d){return c[d>>18&63]+c[d>>12&63]+c[d>>6&63]+c[63&d]}function l(d,v,b){for(var y,_=[],m=v;m<b;m+=3)y=(d[m]<<16&16711680)+(d[m+1]<<8&65280)+(255&d[m+2]),_.push(f(y));return _.join("")}function a(d){for(var v,b=d.length,y=b%3,_=[],m=0,g=b-y;m<g;m+=16383)_.push(l(d,m,m+16383>g?g:m+16383));return y===1?(v=d[b-1],_.push(c[v>>2]+c[v<<4&63]+"==")):y===2&&(v=(d[b-2]<<8)+d[b-1],_.push(c[v>>10]+c[v>>4&63]+c[v<<2&63]+"=")),_.join("")}S.byteLength=T,S.toByteArray=p,S.fromByteArray=a;for(var c=[],s=[],u=typeof Uint8Array!="undefined"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0,t=i.length;n<t;++n)c[n]=i[n],s[i.charCodeAt(n)]=n;s["-".charCodeAt(0)]=62,s["_".charCodeAt(0)]=63},{}],35:[function(w,P,S){!function(C,T,h){P!==void 0&&P.exports?P.exports=h():typeof U=="function"&&U.amd?U("bowser",h):C.bowser=h()}(this,0,function(){function C(s){function u(Z){var K=s.match(Z);return K&&K.length>1&&K[1]||""}function i(Z){var K=s.match(Z);return K&&K.length>1&&K[2]||""}var n,t=u(/(ipod|iphone|ipad)/i).toLowerCase(),d=/like android/i.test(s),v=!d&&/android/i.test(s),b=/nexus\s*[0-6]\s*/i.test(s),y=!b&&/nexus\s*[0-9]+/i.test(s),_=/CrOS/.test(s),m=/silk/i.test(s),g=/sailfish/i.test(s),E=/tizen/i.test(s),o=/(web|hpw)os/i.test(s),x=/windows phone/i.test(s),A=(/SamsungBrowser/i.test(s),!x&&/windows/i.test(s)),O=!t&&!m&&/macintosh/i.test(s),D=!v&&!g&&!E&&!o&&/linux/i.test(s),I=i(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),F=u(/version\/(\d+(\.\d+)?)/i),z=/tablet/i.test(s)&&!/tablet pc/i.test(s),ne=!z&&/[^-]mobi/i.test(s),j=/xbox/i.test(s);/opera/i.test(s)?n={name:"Opera",opera:a,version:F||u(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(s)?n={name:"Opera",opera:a,version:u(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||F}:/SamsungBrowser/i.test(s)?n={name:"Samsung Internet for Android",samsungBrowser:a,version:F||u(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/coast/i.test(s)?n={name:"Opera Coast",coast:a,version:F||u(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(s)?n={name:"Yandex Browser",yandexbrowser:a,version:F||u(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(s)?n={name:"UC Browser",ucbrowser:a,version:u(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(s)?n={name:"Maxthon",maxthon:a,version:u(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(s)?n={name:"Epiphany",epiphany:a,version:u(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(s)?n={name:"Puffin",puffin:a,version:u(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(s)?n={name:"Sleipnir",sleipnir:a,version:u(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(s)?n={name:"K-Meleon",kMeleon:a,version:u(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:x?(n={name:"Windows Phone",osname:"Windows Phone",windowsphone:a},I?(n.msedge=a,n.version=I):(n.msie=a,n.version=u(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(s)?n={name:"Internet Explorer",msie:a,version:u(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:_?n={name:"Chrome",osname:"Chrome OS",chromeos:a,chromeBook:a,chrome:a,version:u(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(s)?n={name:"Microsoft Edge",msedge:a,version:I}:/vivaldi/i.test(s)?n={name:"Vivaldi",vivaldi:a,version:u(/vivaldi\/(\d+(\.\d+)?)/i)||F}:g?n={name:"Sailfish",osname:"Sailfish OS",sailfish:a,version:u(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(s)?n={name:"SeaMonkey",seamonkey:a,version:u(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(s)?(n={name:"Firefox",firefox:a,version:u(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(s)&&(n.firefoxos=a,n.osname="Firefox OS")):m?n={name:"Amazon Silk",silk:a,version:u(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(s)?n={name:"PhantomJS",phantom:a,version:u(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(s)?n={name:"SlimerJS",slimer:a,version:u(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(s)||/rim\stablet/i.test(s)?n={name:"BlackBerry",osname:"BlackBerry OS",blackberry:a,version:F||u(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:o?(n={name:"WebOS",osname:"WebOS",webos:a,version:F||u(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(s)&&(n.touchpad=a)):/bada/i.test(s)?n={name:"Bada",osname:"Bada",bada:a,version:u(/dolfin\/(\d+(\.\d+)?)/i)}:E?n={name:"Tizen",osname:"Tizen",tizen:a,version:u(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||F}:/qupzilla/i.test(s)?n={name:"QupZilla",qupzilla:a,version:u(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||F}:/chromium/i.test(s)?n={name:"Chromium",chromium:a,version:u(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||F}:/chrome|crios|crmo/i.test(s)?n={name:"Chrome",chrome:a,version:u(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:v?n={name:"Android",version:F}:/safari|applewebkit/i.test(s)?(n={name:"Safari",safari:a},F&&(n.version=F)):t?(n={name:t=="iphone"?"iPhone":t=="ipad"?"iPad":"iPod"},F&&(n.version=F)):n=/googlebot/i.test(s)?{name:"Googlebot",googlebot:a,version:u(/googlebot\/(\d+(\.\d+))/i)||F}:{name:u(/^(.*)\/(.*) /),version:i(/^(.*)\/(.*) /)},!n.msedge&&/(apple)?webkit/i.test(s)?(/(apple)?webkit\/537\.36/i.test(s)?(n.name=n.name||"Blink",n.blink=a):(n.name=n.name||"Webkit",n.webkit=a),!n.version&&F&&(n.version=F)):!n.opera&&/gecko\//i.test(s)&&(n.name=n.name||"Gecko",n.gecko=a,n.version=n.version||u(/gecko\/(\d+(\.\d+)?)/i)),n.windowsphone||!v&&!n.silk?!n.windowsphone&&t?(n[t]=a,n.ios=a,n.osname="iOS"):O?(n.mac=a,n.osname="macOS"):j?(n.xbox=a,n.osname="Xbox"):A?(n.windows=a,n.osname="Windows"):D&&(n.linux=a,n.osname="Linux"):(n.android=a,n.osname="Android");var G="";n.windows?G=function(Z){switch(Z){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}}(u(/Windows ((NT|XP)( \d\d?.\d)?)/i)):n.windowsphone?G=u(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):n.mac?(G=u(/Mac OS X (\d+([_\.\s]\d+)*)/i),G=G.replace(/[_\s]/g,".")):t?(G=u(/os (\d+([_\s]\d+)*) like mac os x/i),G=G.replace(/[_\s]/g,".")):v?G=u(/android[ \/-](\d+(\.\d+)*)/i):n.webos?G=u(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):n.blackberry?G=u(/rim\stablet\sos\s(\d+(\.\d+)*)/i):n.bada?G=u(/bada\/(\d+(\.\d+)*)/i):n.tizen&&(G=u(/tizen[\/\s](\d+(\.\d+)*)/i)),G&&(n.osversion=G);var X=!n.windows&&G.split(".")[0];return z||y||t=="ipad"||v&&(X==3||X>=4&&!ne)||n.silk?n.tablet=a:(ne||t=="iphone"||t=="ipod"||v||b||n.blackberry||n.webos||n.bada)&&(n.mobile=a),n.msedge||n.msie&&n.version>=10||n.yandexbrowser&&n.version>=15||n.vivaldi&&n.version>=1||n.chrome&&n.version>=20||n.samsungBrowser&&n.version>=4||n.firefox&&n.version>=20||n.safari&&n.version>=6||n.opera&&n.version>=10||n.ios&&n.osversion&&n.osversion.split(".")[0]>=6||n.blackberry&&n.version>=10.1||n.chromium&&n.version>=20?n.a=a:n.msie&&n.version<10||n.chrome&&n.version<20||n.firefox&&n.version<20||n.safari&&n.version<6||n.opera&&n.version<10||n.ios&&n.osversion&&n.osversion.split(".")[0]<6||n.chromium&&n.version<20?n.c=a:n.x=a,n}function T(s){return s.split(".").length}function h(s,u){var i,n=[];if(Array.prototype.map)return Array.prototype.map.call(s,u);for(i=0;i<s.length;i++)n.push(u(s[i]));return n}function p(s){for(var u=Math.max(T(s[0]),T(s[1])),i=h(s,function(n){var t=u-T(n);return n+=new Array(t+1).join(".0"),h(n.split("."),function(d){return new Array(20-d.length).join("0")+d}).reverse()});--u>=0;){if(i[0][u]>i[1][u])return 1;if(i[0][u]!==i[1][u])return-1;if(u===0)return 0}}function f(s,u,i){var n=c;typeof u=="string"&&(i=u,u=void 0),u===void 0&&(u=!1),i&&(n=C(i));var t=""+n.version;for(var d in s)if(s.hasOwnProperty(d)&&n[d]){if(typeof s[d]!="string")throw new Error("Browser version in the minVersion map should be a string: "+d+": "+String(s));return p([t,s[d]])<0}return u}function l(s,u,i){return!f(s,u,i)}var a=!0,c=C(typeof navigator!="undefined"&&navigator.userAgent||"");return c.test=function(s){for(var u=0;u<s.length;++u){var i=s[u];if(typeof i=="string"&&i in c)return!0}return!1},c.isUnsupportedBrowser=f,c.compareVersions=p,c.check=l,c._detect=C,c.detect=C,c})},{}],36:[function(w,P,S){},{}],37:[function(w,P,S){function C(c){if(c&&!l(c))throw new Error("Unknown encoding: "+c)}function T(c){return c.toString(this.encoding)}function h(c){this.charReceived=c.length%2,this.charLength=this.charReceived?2:0}function p(c){this.charReceived=c.length%3,this.charLength=this.charReceived?3:0}var f=w("buffer").Buffer,l=f.isEncoding||function(c){switch(c&&c.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}},a=S.StringDecoder=function(c){switch(this.encoding=(c||"utf8").toLowerCase().replace(/[-_]/,""),C(c),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=h;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=p;break;default:return void(this.write=T)}this.charBuffer=new f(6),this.charReceived=0,this.charLength=0};a.prototype.write=function(c){for(var s="";this.charLength;){var u=c.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:c.length;if(c.copy(this.charBuffer,this.charReceived,0,u),this.charReceived+=u,this.charReceived<this.charLength)return"";c=c.slice(u,c.length),s=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var n=s.charCodeAt(s.length-1);if(!(n>=55296&&n<=56319)){if(this.charReceived=this.charLength=0,c.length===0)return s;break}this.charLength+=this.surrogateSize,s=""}this.detectIncompleteChar(c);var i=c.length;this.charLength&&(c.copy(this.charBuffer,0,c.length-this.charReceived,i),i-=this.charReceived),s+=c.toString(this.encoding,0,i);var i=s.length-1,n=s.charCodeAt(i);if(n>=55296&&n<=56319){var t=this.surrogateSize;return this.charLength+=t,this.charReceived+=t,this.charBuffer.copy(this.charBuffer,t,0,t),c.copy(this.charBuffer,0,0,t),s.substring(0,i)}return s},a.prototype.detectIncompleteChar=function(c){for(var s=c.length>=3?3:c.length;s>0;s--){var u=c[c.length-s];if(s==1&&u>>5==6){this.charLength=2;break}if(s<=2&&u>>4==14){this.charLength=3;break}if(s<=3&&u>>3==30){this.charLength=4;break}}this.charReceived=s},a.prototype.end=function(c){var s="";if(c&&c.length&&(s=this.write(c)),this.charReceived){var u=this.charReceived,i=this.charBuffer,n=this.encoding;s+=i.slice(0,u).toString(n)}return s}},{buffer:38}],38:[function(w,P,S){(function(C){"use strict";function T(){return p.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function h(k,N){if(T()<N)throw new RangeError("Invalid typed array length");return p.TYPED_ARRAY_SUPPORT?(k=new Uint8Array(N),k.__proto__=p.prototype):(k===null&&(k=new p(N)),k.length=N),k}function p(k,N,$){if(!(p.TYPED_ARRAY_SUPPORT||this instanceof p))return new p(k,N,$);if(typeof k=="number"){if(typeof N=="string")throw new Error("If encoding is specified then the first argument must be a string");return c(this,k)}return f(this,k,N,$)}function f(k,N,$,V){if(typeof N=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&N instanceof ArrayBuffer?i(k,N,$,V):typeof N=="string"?s(k,N,$):n(k,N)}function l(k){if(typeof k!="number")throw new TypeError('"size" argument must be a number');if(k<0)throw new RangeError('"size" argument must not be negative')}function a(k,N,$,V){return l(N),N<=0?h(k,N):$!==void 0?typeof V=="string"?h(k,N).fill($,V):h(k,N).fill($):h(k,N)}function c(k,N){if(l(N),k=h(k,N<0?0:0|t(N)),!p.TYPED_ARRAY_SUPPORT)for(var $=0;$<N;++$)k[$]=0;return k}function s(k,N,$){if(typeof $=="string"&&$!==""||($="utf8"),!p.isEncoding($))throw new TypeError('"encoding" must be a valid string encoding');var V=0|v(N,$);k=h(k,V);var Y=k.write(N,$);return Y!==V&&(k=k.slice(0,Y)),k}function u(k,N){var $=N.length<0?0:0|t(N.length);k=h(k,$);for(var V=0;V<$;V+=1)k[V]=255&N[V];return k}function i(k,N,$,V){if(N.byteLength,$<0||N.byteLength<$)throw new RangeError("'offset' is out of bounds");if(N.byteLength<$+(V||0))throw new RangeError("'length' is out of bounds");return N=$===void 0&&V===void 0?new Uint8Array(N):V===void 0?new Uint8Array(N,$):new Uint8Array(N,$,V),p.TYPED_ARRAY_SUPPORT?(k=N,k.__proto__=p.prototype):k=u(k,N),k}function n(k,N){if(p.isBuffer(N)){var $=0|t(N.length);return k=h(k,$),k.length===0||N.copy(k,0,0,$),k}if(N){if(typeof ArrayBuffer!="undefined"&&N.buffer instanceof ArrayBuffer||"length"in N)return typeof N.length!="number"||ve(N.length)?h(k,0):u(k,N);if(N.type==="Buffer"&&Ne(N.data))return u(k,N.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function t(k){if(k>=T())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+T().toString(16)+" bytes");return 0|k}function d(k){return+k!=k&&(k=0),p.alloc(+k)}function v(k,N){if(p.isBuffer(k))return k.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(k)||k instanceof ArrayBuffer))return k.byteLength;typeof k!="string"&&(k=""+k);var $=k.length;if($===0)return 0;for(var V=!1;;)switch(N){case"ascii":case"latin1":case"binary":return $;case"utf8":case"utf-8":case void 0:return Te(k).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*$;case"hex":return $>>>1;case"base64":return Me(k).length;default:if(V)return Te(k).length;N=(""+N).toLowerCase(),V=!0}}function b(k,N,$){var V=!1;if((N===void 0||N<0)&&(N=0),N>this.length)return"";if(($===void 0||$>this.length)&&($=this.length),$<=0)return"";if($>>>=0,N>>>=0,$<=N)return"";for(k||(k="utf8");;)switch(k){case"hex":return j(this,N,$);case"utf8":case"utf-8":return I(this,N,$);case"ascii":return z(this,N,$);case"latin1":case"binary":return ne(this,N,$);case"base64":return D(this,N,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,N,$);default:if(V)throw new TypeError("Unknown encoding: "+k);k=(k+"").toLowerCase(),V=!0}}function y(k,N,$){var V=k[N];k[N]=k[$],k[$]=V}function _(k,N,$,V,Y){if(k.length===0)return-1;if(typeof $=="string"?(V=$,$=0):$>2147483647?$=2147483647:$<-2147483648&&($=-2147483648),$=+$,isNaN($)&&($=Y?0:k.length-1),$<0&&($=k.length+$),$>=k.length){if(Y)return-1;$=k.length-1}else if($<0){if(!Y)return-1;$=0}if(typeof N=="string"&&(N=p.from(N,V)),p.isBuffer(N))return N.length===0?-1:m(k,N,$,V,Y);if(typeof N=="number")return N&=255,p.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?Y?Uint8Array.prototype.indexOf.call(k,N,$):Uint8Array.prototype.lastIndexOf.call(k,N,$):m(k,[N],$,V,Y);throw new TypeError("val must be string, number or Buffer")}function m(k,N,$,V,Y){function me(He,Pe){return Ae===1?He[Pe]:He.readUInt16BE(Pe*Ae)}var Ae=1,at=k.length,Le=N.length;if(V!==void 0&&((V=String(V).toLowerCase())==="ucs2"||V==="ucs-2"||V==="utf16le"||V==="utf-16le")){if(k.length<2||N.length<2)return-1;Ae=2,at/=2,Le/=2,$/=2}var ke;if(Y){var Ye=-1;for(ke=$;ke<at;ke++)if(me(k,ke)===me(N,Ye===-1?0:ke-Ye)){if(Ye===-1&&(Ye=ke),ke-Ye+1===Le)return Ye*Ae}else Ye!==-1&&(ke-=ke-Ye),Ye=-1}else for($+Le>at&&($=at-Le),ke=$;ke>=0;ke--){for(var Ze=!0,Ve=0;Ve<Le;Ve++)if(me(k,ke+Ve)!==me(N,Ve)){Ze=!1;break}if(Ze)return ke}return-1}function g(k,N,$,V){$=Number($)||0;var Y=k.length-$;V?(V=Number(V))>Y&&(V=Y):V=Y;var me=N.length;if(me%2!=0)throw new TypeError("Invalid hex string");V>me/2&&(V=me/2);for(var Ae=0;Ae<V;++Ae){var at=parseInt(N.substr(2*Ae,2),16);if(isNaN(at))return Ae;k[$+Ae]=at}return Ae}function E(k,N,$,V){return Ue(Te(N,k.length-$),k,$,V)}function o(k,N,$,V){return Ue(Fe(N),k,$,V)}function x(k,N,$,V){return o(k,N,$,V)}function A(k,N,$,V){return Ue(Me(N),k,$,V)}function O(k,N,$,V){return Ue(De(N,k.length-$),k,$,V)}function D(k,N,$){return N===0&&$===k.length?ce.fromByteArray(k):ce.fromByteArray(k.slice(N,$))}function I(k,N,$){$=Math.min(k.length,$);for(var V=[],Y=N;Y<$;){var me=k[Y],Ae=null,at=me>239?4:me>223?3:me>191?2:1;if(Y+at<=$){var Le,ke,Ye,Ze;switch(at){case 1:me<128&&(Ae=me);break;case 2:Le=k[Y+1],(192&Le)==128&&(Ze=(31&me)<<6|63&Le)>127&&(Ae=Ze);break;case 3:Le=k[Y+1],ke=k[Y+2],(192&Le)==128&&(192&ke)==128&&(Ze=(15&me)<<12|(63&Le)<<6|63&ke)>2047&&(Ze<55296||Ze>57343)&&(Ae=Ze);break;case 4:Le=k[Y+1],ke=k[Y+2],Ye=k[Y+3],(192&Le)==128&&(192&ke)==128&&(192&Ye)==128&&(Ze=(15&me)<<18|(63&Le)<<12|(63&ke)<<6|63&Ye)>65535&&Ze<1114112&&(Ae=Ze)}}Ae===null?(Ae=65533,at=1):Ae>65535&&(Ae-=65536,V.push(Ae>>>10&1023|55296),Ae=56320|1023&Ae),V.push(Ae),Y+=at}return F(V)}function F(k){var N=k.length;if(N<=Xe)return String.fromCharCode.apply(String,k);for(var $="",V=0;V<N;)$+=String.fromCharCode.apply(String,k.slice(V,V+=Xe));return $}function z(k,N,$){var V="";$=Math.min(k.length,$);for(var Y=N;Y<$;++Y)V+=String.fromCharCode(127&k[Y]);return V}function ne(k,N,$){var V="";$=Math.min(k.length,$);for(var Y=N;Y<$;++Y)V+=String.fromCharCode(k[Y]);return V}function j(k,N,$){var V=k.length;(!N||N<0)&&(N=0),(!$||$<0||$>V)&&($=V);for(var Y="",me=N;me<$;++me)Y+=fe(k[me]);return Y}function G(k,N,$){for(var V=k.slice(N,$),Y="",me=0;me<V.length;me+=2)Y+=String.fromCharCode(V[me]+256*V[me+1]);return Y}function X(k,N,$){if(k%1!=0||k<0)throw new RangeError("offset is not uint");if(k+N>$)throw new RangeError("Trying to access beyond buffer length")}function Z(k,N,$,V,Y,me){if(!p.isBuffer(k))throw new TypeError('"buffer" argument must be a Buffer instance');if(N>Y||N<me)throw new RangeError('"value" argument is out of bounds');if($+V>k.length)throw new RangeError("Index out of range")}function K(k,N,$,V){N<0&&(N=65535+N+1);for(var Y=0,me=Math.min(k.length-$,2);Y<me;++Y)k[$+Y]=(N&255<<8*(V?Y:1-Y))>>>8*(V?Y:1-Y)}function q(k,N,$,V){N<0&&(N=4294967295+N+1);for(var Y=0,me=Math.min(k.length-$,4);Y<me;++Y)k[$+Y]=N>>>8*(V?Y:3-Y)&255}function ie(k,N,$,V,Y,me){if($+V>k.length)throw new RangeError("Index out of range");if($<0)throw new RangeError("Index out of range")}function oe(k,N,$,V,Y){return Y||ie(k,N,$,4,34028234663852886e22,-34028234663852886e22),Ie.write(k,N,$,V,23,4),$+4}function ye(k,N,$,V,Y){return Y||ie(k,N,$,8,17976931348623157e292,-17976931348623157e292),Ie.write(k,N,$,V,52,8),$+8}function pe(k){if(k=we(k).replace(ee,""),k.length<2)return"";for(;k.length%4!=0;)k+="=";return k}function we(k){return k.trim?k.trim():k.replace(/^\s+|\s+$/g,"")}function fe(k){return k<16?"0"+k.toString(16):k.toString(16)}function Te(k,N){N=N||1/0;for(var $,V=k.length,Y=null,me=[],Ae=0;Ae<V;++Ae){if(($=k.charCodeAt(Ae))>55295&&$<57344){if(!Y){if($>56319){(N-=3)>-1&&me.push(239,191,189);continue}if(Ae+1===V){(N-=3)>-1&&me.push(239,191,189);continue}Y=$;continue}if($<56320){(N-=3)>-1&&me.push(239,191,189),Y=$;continue}$=65536+(Y-55296<<10|$-56320)}else Y&&(N-=3)>-1&&me.push(239,191,189);if(Y=null,$<128){if((N-=1)<0)break;me.push($)}else if($<2048){if((N-=2)<0)break;me.push($>>6|192,63&$|128)}else if($<65536){if((N-=3)<0)break;me.push($>>12|224,$>>6&63|128,63&$|128)}else{if(!($<1114112))throw new Error("Invalid code point");if((N-=4)<0)break;me.push($>>18|240,$>>12&63|128,$>>6&63|128,63&$|128)}}return me}function Fe(k){for(var N=[],$=0;$<k.length;++$)N.push(255&k.charCodeAt($));return N}function De(k,N){for(var $,V,Y,me=[],Ae=0;Ae<k.length&&!((N-=2)<0);++Ae)$=k.charCodeAt(Ae),V=$>>8,Y=$%256,me.push(Y),me.push(V);return me}function Me(k){return ce.toByteArray(pe(k))}function Ue(k,N,$,V){for(var Y=0;Y<V&&!(Y+$>=N.length||Y>=k.length);++Y)N[Y+$]=k[Y];return Y}function ve(k){return k!==k}var ce=w("base64-js"),Ie=w("ieee754"),Ne=w("isarray");S.Buffer=p,S.SlowBuffer=d,S.INSPECT_MAX_BYTES=50,p.TYPED_ARRAY_SUPPORT=C.TYPED_ARRAY_SUPPORT!==void 0?C.TYPED_ARRAY_SUPPORT:function(){try{var k=new Uint8Array(1);return k.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},k.foo()===42&&typeof k.subarray=="function"&&k.subarray(1,1).byteLength===0}catch(N){return!1}}(),S.kMaxLength=T(),p.poolSize=8192,p._augment=function(k){return k.__proto__=p.prototype,k},p.from=function(k,N,$){return f(null,k,N,$)},p.TYPED_ARRAY_SUPPORT&&(p.prototype.__proto__=Uint8Array.prototype,p.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&p[Symbol.species]===p&&Object.defineProperty(p,Symbol.species,{value:null,configurable:!0})),p.alloc=function(k,N,$){return a(null,k,N,$)},p.allocUnsafe=function(k){return c(null,k)},p.allocUnsafeSlow=function(k){return c(null,k)},p.isBuffer=function(k){return!(k==null||!k._isBuffer)},p.compare=function(k,N){if(!p.isBuffer(k)||!p.isBuffer(N))throw new TypeError("Arguments must be Buffers");if(k===N)return 0;for(var $=k.length,V=N.length,Y=0,me=Math.min($,V);Y<me;++Y)if(k[Y]!==N[Y]){$=k[Y],V=N[Y];break}return $<V?-1:V<$?1:0},p.isEncoding=function(k){switch(String(k).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},p.concat=function(k,N){if(!Ne(k))throw new TypeError('"list" argument must be an Array of Buffers');if(k.length===0)return p.alloc(0);var $;if(N===void 0)for(N=0,$=0;$<k.length;++$)N+=k[$].length;var V=p.allocUnsafe(N),Y=0;for($=0;$<k.length;++$){var me=k[$];if(!p.isBuffer(me))throw new TypeError('"list" argument must be an Array of Buffers');me.copy(V,Y),Y+=me.length}return V},p.byteLength=v,p.prototype._isBuffer=!0,p.prototype.swap16=function(){var k=this.length;if(k%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var N=0;N<k;N+=2)y(this,N,N+1);return this},p.prototype.swap32=function(){var k=this.length;if(k%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var N=0;N<k;N+=4)y(this,N,N+3),y(this,N+1,N+2);return this},p.prototype.swap64=function(){var k=this.length;if(k%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var N=0;N<k;N+=8)y(this,N,N+7),y(this,N+1,N+6),y(this,N+2,N+5),y(this,N+3,N+4);return this},p.prototype.toString=function(){var k=0|this.length;return k===0?"":arguments.length===0?I(this,0,k):b.apply(this,arguments)},p.prototype.equals=function(k){if(!p.isBuffer(k))throw new TypeError("Argument must be a Buffer");return this===k||p.compare(this,k)===0},p.prototype.inspect=function(){var k="",N=S.INSPECT_MAX_BYTES;return this.length>0&&(k=this.toString("hex",0,N).match(/.{2}/g).join(" "),this.length>N&&(k+=" ... ")),"<Buffer "+k+">"},p.prototype.compare=function(k,N,$,V,Y){if(!p.isBuffer(k))throw new TypeError("Argument must be a Buffer");if(N===void 0&&(N=0),$===void 0&&($=k?k.length:0),V===void 0&&(V=0),Y===void 0&&(Y=this.length),N<0||$>k.length||V<0||Y>this.length)throw new RangeError("out of range index");if(V>=Y&&N>=$)return 0;if(V>=Y)return-1;if(N>=$)return 1;if(N>>>=0,$>>>=0,V>>>=0,Y>>>=0,this===k)return 0;for(var me=Y-V,Ae=$-N,at=Math.min(me,Ae),Le=this.slice(V,Y),ke=k.slice(N,$),Ye=0;Ye<at;++Ye)if(Le[Ye]!==ke[Ye]){me=Le[Ye],Ae=ke[Ye];break}return me<Ae?-1:Ae<me?1:0},p.prototype.includes=function(k,N,$){return this.indexOf(k,N,$)!==-1},p.prototype.indexOf=function(k,N,$){return _(this,k,N,$,!0)},p.prototype.lastIndexOf=function(k,N,$){return _(this,k,N,$,!1)},p.prototype.write=function(k,N,$,V){if(N===void 0)V="utf8",$=this.length,N=0;else if($===void 0&&typeof N=="string")V=N,$=this.length,N=0;else{if(!isFinite(N))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");N|=0,isFinite($)?($|=0,V===void 0&&(V="utf8")):(V=$,$=void 0)}var Y=this.length-N;if(($===void 0||$>Y)&&($=Y),k.length>0&&($<0||N<0)||N>this.length)throw new RangeError("Attempt to write outside buffer bounds");V||(V="utf8");for(var me=!1;;)switch(V){case"hex":return g(this,k,N,$);case"utf8":case"utf-8":return E(this,k,N,$);case"ascii":return o(this,k,N,$);case"latin1":case"binary":return x(this,k,N,$);case"base64":return A(this,k,N,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,k,N,$);default:if(me)throw new TypeError("Unknown encoding: "+V);V=(""+V).toLowerCase(),me=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Xe=4096;p.prototype.slice=function(k,N){var $=this.length;k=~~k,N=N===void 0?$:~~N,k<0?(k+=$)<0&&(k=0):k>$&&(k=$),N<0?(N+=$)<0&&(N=0):N>$&&(N=$),N<k&&(N=k);var V;if(p.TYPED_ARRAY_SUPPORT)V=this.subarray(k,N),V.__proto__=p.prototype;else{var Y=N-k;V=new p(Y,void 0);for(var me=0;me<Y;++me)V[me]=this[me+k]}return V},p.prototype.readUIntLE=function(k,N,$){k|=0,N|=0,$||X(k,N,this.length);for(var V=this[k],Y=1,me=0;++me<N&&(Y*=256);)V+=this[k+me]*Y;return V},p.prototype.readUIntBE=function(k,N,$){k|=0,N|=0,$||X(k,N,this.length);for(var V=this[k+--N],Y=1;N>0&&(Y*=256);)V+=this[k+--N]*Y;return V},p.prototype.readUInt8=function(k,N){return N||X(k,1,this.length),this[k]},p.prototype.readUInt16LE=function(k,N){return N||X(k,2,this.length),this[k]|this[k+1]<<8},p.prototype.readUInt16BE=function(k,N){return N||X(k,2,this.length),this[k]<<8|this[k+1]},p.prototype.readUInt32LE=function(k,N){return N||X(k,4,this.length),(this[k]|this[k+1]<<8|this[k+2]<<16)+16777216*this[k+3]},p.prototype.readUInt32BE=function(k,N){return N||X(k,4,this.length),16777216*this[k]+(this[k+1]<<16|this[k+2]<<8|this[k+3])},p.prototype.readIntLE=function(k,N,$){k|=0,N|=0,$||X(k,N,this.length);for(var V=this[k],Y=1,me=0;++me<N&&(Y*=256);)V+=this[k+me]*Y;return Y*=128,V>=Y&&(V-=Math.pow(2,8*N)),V},p.prototype.readIntBE=function(k,N,$){k|=0,N|=0,$||X(k,N,this.length);for(var V=N,Y=1,me=this[k+--V];V>0&&(Y*=256);)me+=this[k+--V]*Y;return Y*=128,me>=Y&&(me-=Math.pow(2,8*N)),me},p.prototype.readInt8=function(k,N){return N||X(k,1,this.length),128&this[k]?-1*(255-this[k]+1):this[k]},p.prototype.readInt16LE=function(k,N){N||X(k,2,this.length);var $=this[k]|this[k+1]<<8;return 32768&$?4294901760|$:$},p.prototype.readInt16BE=function(k,N){N||X(k,2,this.length);var $=this[k+1]|this[k]<<8;return 32768&$?4294901760|$:$},p.prototype.readInt32LE=function(k,N){return N||X(k,4,this.length),this[k]|this[k+1]<<8|this[k+2]<<16|this[k+3]<<24},p.prototype.readInt32BE=function(k,N){return N||X(k,4,this.length),this[k]<<24|this[k+1]<<16|this[k+2]<<8|this[k+3]},p.prototype.readFloatLE=function(k,N){return N||X(k,4,this.length),Ie.read(this,k,!0,23,4)},p.prototype.readFloatBE=function(k,N){return N||X(k,4,this.length),Ie.read(this,k,!1,23,4)},p.prototype.readDoubleLE=function(k,N){return N||X(k,8,this.length),Ie.read(this,k,!0,52,8)},p.prototype.readDoubleBE=function(k,N){return N||X(k,8,this.length),Ie.read(this,k,!1,52,8)},p.prototype.writeUIntLE=function(k,N,$,V){(k=+k,N|=0,$|=0,!V)&&Z(this,k,N,$,Math.pow(2,8*$)-1,0);var Y=1,me=0;for(this[N]=255&k;++me<$&&(Y*=256);)this[N+me]=k/Y&255;return N+$},p.prototype.writeUIntBE=function(k,N,$,V){(k=+k,N|=0,$|=0,!V)&&Z(this,k,N,$,Math.pow(2,8*$)-1,0);var Y=$-1,me=1;for(this[N+Y]=255&k;--Y>=0&&(me*=256);)this[N+Y]=k/me&255;return N+$},p.prototype.writeUInt8=function(k,N,$){return k=+k,N|=0,$||Z(this,k,N,1,255,0),p.TYPED_ARRAY_SUPPORT||(k=Math.floor(k)),this[N]=255&k,N+1},p.prototype.writeUInt16LE=function(k,N,$){return k=+k,N|=0,$||Z(this,k,N,2,65535,0),p.TYPED_ARRAY_SUPPORT?(this[N]=255&k,this[N+1]=k>>>8):K(this,k,N,!0),N+2},p.prototype.writeUInt16BE=function(k,N,$){return k=+k,N|=0,$||Z(this,k,N,2,65535,0),p.TYPED_ARRAY_SUPPORT?(this[N]=k>>>8,this[N+1]=255&k):K(this,k,N,!1),N+2},p.prototype.writeUInt32LE=function(k,N,$){return k=+k,N|=0,$||Z(this,k,N,4,4294967295,0),p.TYPED_ARRAY_SUPPORT?(this[N+3]=k>>>24,this[N+2]=k>>>16,this[N+1]=k>>>8,this[N]=255&k):q(this,k,N,!0),N+4},p.prototype.writeUInt32BE=function(k,N,$){return k=+k,N|=0,$||Z(this,k,N,4,4294967295,0),p.TYPED_ARRAY_SUPPORT?(this[N]=k>>>24,this[N+1]=k>>>16,this[N+2]=k>>>8,this[N+3]=255&k):q(this,k,N,!1),N+4},p.prototype.writeIntLE=function(k,N,$,V){if(k=+k,N|=0,!V){var Y=Math.pow(2,8*$-1);Z(this,k,N,$,Y-1,-Y)}var me=0,Ae=1,at=0;for(this[N]=255&k;++me<$&&(Ae*=256);)k<0&&at===0&&this[N+me-1]!==0&&(at=1),this[N+me]=(k/Ae>>0)-at&255;return N+$},p.prototype.writeIntBE=function(k,N,$,V){if(k=+k,N|=0,!V){var Y=Math.pow(2,8*$-1);Z(this,k,N,$,Y-1,-Y)}var me=$-1,Ae=1,at=0;for(this[N+me]=255&k;--me>=0&&(Ae*=256);)k<0&&at===0&&this[N+me+1]!==0&&(at=1),this[N+me]=(k/Ae>>0)-at&255;return N+$},p.prototype.writeInt8=function(k,N,$){return k=+k,N|=0,$||Z(this,k,N,1,127,-128),p.TYPED_ARRAY_SUPPORT||(k=Math.floor(k)),k<0&&(k=255+k+1),this[N]=255&k,N+1},p.prototype.writeInt16LE=function(k,N,$){return k=+k,N|=0,$||Z(this,k,N,2,32767,-32768),p.TYPED_ARRAY_SUPPORT?(this[N]=255&k,this[N+1]=k>>>8):K(this,k,N,!0),N+2},p.prototype.writeInt16BE=function(k,N,$){return k=+k,N|=0,$||Z(this,k,N,2,32767,-32768),p.TYPED_ARRAY_SUPPORT?(this[N]=k>>>8,this[N+1]=255&k):K(this,k,N,!1),N+2},p.prototype.writeInt32LE=function(k,N,$){return k=+k,N|=0,$||Z(this,k,N,4,2147483647,-2147483648),p.TYPED_ARRAY_SUPPORT?(this[N]=255&k,this[N+1]=k>>>8,this[N+2]=k>>>16,this[N+3]=k>>>24):q(this,k,N,!0),N+4},p.prototype.writeInt32BE=function(k,N,$){return k=+k,N|=0,$||Z(this,k,N,4,2147483647,-2147483648),k<0&&(k=4294967295+k+1),p.TYPED_ARRAY_SUPPORT?(this[N]=k>>>24,this[N+1]=k>>>16,this[N+2]=k>>>8,this[N+3]=255&k):q(this,k,N,!1),N+4},p.prototype.writeFloatLE=function(k,N,$){return oe(this,k,N,!0,$)},p.prototype.writeFloatBE=function(k,N,$){return oe(this,k,N,!1,$)},p.prototype.writeDoubleLE=function(k,N,$){return ye(this,k,N,!0,$)},p.prototype.writeDoubleBE=function(k,N,$){return ye(this,k,N,!1,$)},p.prototype.copy=function(k,N,$,V){if($||($=0),V||V===0||(V=this.length),N>=k.length&&(N=k.length),N||(N=0),V>0&&V<$&&(V=$),V===$)return 0;if(k.length===0||this.length===0)return 0;if(N<0)throw new RangeError("targetStart out of bounds");if($<0||$>=this.length)throw new RangeError("sourceStart out of bounds");if(V<0)throw new RangeError("sourceEnd out of bounds");V>this.length&&(V=this.length),k.length-N<V-$&&(V=k.length-N+$);var Y,me=V-$;if(this===k&&$<N&&N<V)for(Y=me-1;Y>=0;--Y)k[Y+N]=this[Y+$];else if(me<1e3||!p.TYPED_ARRAY_SUPPORT)for(Y=0;Y<me;++Y)k[Y+N]=this[Y+$];else Uint8Array.prototype.set.call(k,this.subarray($,$+me),N);return me},p.prototype.fill=function(k,N,$,V){if(typeof k=="string"){if(typeof N=="string"?(V=N,N=0,$=this.length):typeof $=="string"&&(V=$,$=this.length),k.length===1){var Y=k.charCodeAt(0);Y<256&&(k=Y)}if(V!==void 0&&typeof V!="string")throw new TypeError("encoding must be a string");if(typeof V=="string"&&!p.isEncoding(V))throw new TypeError("Unknown encoding: "+V)}else typeof k=="number"&&(k&=255);if(N<0||this.length<N||this.length<$)throw new RangeError("Out of range index");if($<=N)return this;N>>>=0,$=$===void 0?this.length:$>>>0,k||(k=0);var me;if(typeof k=="number")for(me=N;me<$;++me)this[me]=k;else{var Ae=p.isBuffer(k)?k:Te(new p(k,V).toString()),at=Ae.length;for(me=0;me<$-N;++me)this[me+N]=Ae[me%at]}return this};var ee=/[^+\/0-9A-Za-z-_]/g}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"base64-js":34,ieee754:161,isarray:166}],39:[function(w,P,S){P.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"}},{}],40:[function(w,P,S){"use strict";var C=function(){this.buffer=[],this.fns=[]};C.prototype.push=function(h,p){if(this.fns.length)return this.fns.shift()(null,h);var f={data:h,priority:p},l=T(this.buffer,f,function(a){return a.priority});this.buffer.splice(l,0,f)},C.prototype.next=function(){var h=this;return function(p){if(h.buffer.length)return p(null,h.buffer.pop().data);h.fns.push(p)}};var T=function(h,p,f){p=f(p);for(var l=0,a=h?h.length:l;l<a;){var c=l+a>>>1;f(h[c])<p?l=c+1:a=c}return l};P.exports=C},{}],41:[function(w,P,S){function C(i){var n=this,t=u.call(arguments,1);return new Promise(function(d,v){function b(m){var g;try{g=i.next(m)}catch(E){return v(E)}_(g)}function y(m){var g;try{g=i.throw(m)}catch(E){return v(E)}_(g)}function _(m){if(m.done)return d(m.value);var g=T.call(n,m.value);return g&&l(g)?g.then(b,y):y(new TypeError('You may only yield a function, promise, generator, array, or object, but the following object was passed: "'+String(m.value)+'"'))}if(typeof i=="function"&&(i=i.apply(n,t)),!i||typeof i.next!="function")return d(i);b()})}function T(i){return i&&(l(i)?i:c(i)||a(i)?C.call(this,i):typeof i=="function"?h.call(this,i):Array.isArray(i)?p.call(this,i):s(i)?f.call(this,i):i)}function h(i){var n=this;return new Promise(function(t,d){i.call(n,function(v,b){if(v)return d(v);arguments.length>2&&(b=u.call(arguments,1)),t(b)})})}function p(i){return Promise.all(i.map(T,this))}function f(i){for(var n=new i.constructor,t=Object.keys(i),d=[],v=0;v<t.length;v++){var b=t[v],y=T.call(this,i[b]);y&&l(y)?function(_,m){n[m]=void 0,d.push(_.then(function(g){n[m]=g}))}(y,b):n[b]=i[b]}return Promise.all(d).then(function(){return n})}function l(i){return typeof i.then=="function"}function a(i){return typeof i.next=="function"&&typeof i.throw=="function"}function c(i){var n=i.constructor;return!!n&&(n.name==="GeneratorFunction"||n.displayName==="GeneratorFunction"||a(n.prototype))}function s(i){return Object==i.constructor}var u=Array.prototype.slice;P.exports=C.default=C.co=C,C.wrap=function(i){function n(){return C.call(this,i.apply(this,arguments))}return n.__generatorFunction__=i,n}},{}],42:[function(w,P,S){P.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}},{}],43:[function(w,P,S){"use strict";function C(p,f){if(!(this instanceof C))return new C(p,f);this.src=p,this._withAccess=f}function T(p,f){return p[f]===void 0&&p.__lookupGetter__(f)===void 0&&p.__lookupSetter__(f)===void 0}var h=Array.prototype.slice;P.exports=C,C.prototype.withAccess=function(p){return this._withAccess=p!==!1,this},C.prototype.pick=function(p){return Array.isArray(p)||(p=h.call(arguments)),p.length&&(this.keys=p),this},C.prototype.to=function(p){if(p=p||{},!this.src)return p;var f=this.keys||Object.keys(this.src);if(!this._withAccess){for(var l=0;l<f.length;l++)a=f[l],p[a]===void 0&&(p[a]=this.src[a]);return p}for(var l=0;l<f.length;l++){var a=f[l];if(T(p,a)){var c=this.src.__lookupGetter__(a),s=this.src.__lookupSetter__(a);c&&p.__defineGetter__(a,c),s&&p.__defineSetter__(a,s),c||s||(p[a]=this.src[a])}}return p},C.prototype.toCover=function(p){for(var f=this.keys||Object.keys(this.src),l=0;l<f.length;l++){var a=f[l];delete p[a];var c=this.src.__lookupGetter__(a),s=this.src.__lookupSetter__(a);c&&p.__defineGetter__(a,c),s&&p.__defineSetter__(a,s),c||s||(p[a]=this.src[a])}},C.prototype.override=C.prototype.toCover,C.prototype.and=function(p){var f={};return this.to(f),this.src=p,this.to(f),this.src=f,this}},{}],44:[function(w,P,S){w("../../modules/es6.string.iterator"),w("../../modules/es6.array.from"),P.exports=w("../../modules/_core").Array.from},{"../../modules/_core":65,"../../modules/es6.array.from":133,"../../modules/es6.string.iterator":145}],45:[function(w,P,S){var C=w("../../modules/_core"),T=C.JSON||(C.JSON={stringify:JSON.stringify});P.exports=function(h){return T.stringify.apply(T,arguments)}},{"../../modules/_core":65}],46:[function(w,P,S){w("../../modules/es6.object.assign"),P.exports=w("../../modules/_core").Object.assign},{"../../modules/_core":65,"../../modules/es6.object.assign":136}],47:[function(w,P,S){w("../../modules/es6.object.create");var C=w("../../modules/_core").Object;P.exports=function(T,h){return C.create(T,h)}},{"../../modules/_core":65,"../../modules/es6.object.create":137}],48:[function(w,P,S){w("../../modules/es6.object.define-property");var C=w("../../modules/_core").Object;P.exports=function(T,h,p){return C.defineProperty(T,h,p)}},{"../../modules/_core":65,"../../modules/es6.object.define-property":138}],49:[function(w,P,S){w("../../modules/es6.object.get-own-property-names");var C=w("../../modules/_core").Object;P.exports=function(T){return C.getOwnPropertyNames(T)}},{"../../modules/_core":65,"../../modules/es6.object.get-own-property-names":139}],50:[function(w,P,S){w("../../modules/es6.object.get-prototype-of"),P.exports=w("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":65,"../../modules/es6.object.get-prototype-of":140}],51:[function(w,P,S){w("../../modules/es6.object.keys"),P.exports=w("../../modules/_core").Object.keys},{"../../modules/_core":65,"../../modules/es6.object.keys":141}],52:[function(w,P,S){w("../modules/es6.object.to-string"),w("../modules/es6.string.iterator"),w("../modules/web.dom.iterable"),w("../modules/es6.promise"),w("../modules/es7.promise.finally"),w("../modules/es7.promise.try"),P.exports=w("../modules/_core").Promise},{"../modules/_core":65,"../modules/es6.object.to-string":142,"../modules/es6.promise":143,"../modules/es6.string.iterator":145,"../modules/es7.promise.finally":147,"../modules/es7.promise.try":148,"../modules/web.dom.iterable":151}],53:[function(w,P,S){w("../modules/web.immediate"),P.exports=w("../modules/_core").setImmediate},{"../modules/_core":65,"../modules/web.immediate":152}],54:[function(w,P,S){w("../../modules/es6.string.from-code-point"),P.exports=w("../../modules/_core").String.fromCodePoint},{"../../modules/_core":65,"../../modules/es6.string.from-code-point":144}],55:[function(w,P,S){w("../../modules/es6.function.has-instance"),P.exports=w("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":130,"../../modules/es6.function.has-instance":135}],56:[function(w,P,S){w("../../modules/es6.symbol"),w("../../modules/es6.object.to-string"),w("../../modules/es7.symbol.async-iterator"),w("../../modules/es7.symbol.observable"),P.exports=w("../../modules/_core").Symbol},{"../../modules/_core":65,"../../modules/es6.object.to-string":142,"../../modules/es6.symbol":146,"../../modules/es7.symbol.async-iterator":149,"../../modules/es7.symbol.observable":150}],57:[function(w,P,S){w("../../modules/es6.string.iterator"),w("../../modules/web.dom.iterable"),P.exports=w("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":130,"../../modules/es6.string.iterator":145,"../../modules/web.dom.iterable":151}],58:[function(w,P,S){P.exports=function(C){if(typeof C!="function")throw TypeError(C+" is not a function!");return C}},{}],59:[function(w,P,S){P.exports=function(){}},{}],60:[function(w,P,S){P.exports=function(C,T,h,p){if(!(C instanceof T)||p!==void 0&&p in C)throw TypeError(h+": incorrect invocation!");return C}},{}],61:[function(w,P,S){var C=w("./_is-object");P.exports=function(T){if(!C(T))throw TypeError(T+" is not an object!");return T}},{"./_is-object":85}],62:[function(w,P,S){var C=w("./_to-iobject"),T=w("./_to-length"),h=w("./_to-absolute-index");P.exports=function(p){return function(f,l,a){var c,s=C(f),u=T(s.length),i=h(a,u);if(p&&l!=l){for(;u>i;)if((c=s[i++])!=c)return!0}else for(;u>i;i++)if((p||i in s)&&s[i]===l)return p||i||0;return!p&&-1}}},{"./_to-absolute-index":121,"./_to-iobject":123,"./_to-length":124}],63:[function(w,P,S){var C=w("./_cof"),T=w("./_wks")("toStringTag"),h=C(function(){return arguments}())=="Arguments",p=function(f,l){try{return f[l]}catch(a){}};P.exports=function(f){var l,a,c;return f===void 0?"Undefined":f===null?"Null":typeof(a=p(l=Object(f),T))=="string"?a:h?C(l):(c=C(l))=="Object"&&typeof l.callee=="function"?"Arguments":c}},{"./_cof":64,"./_wks":131}],64:[function(w,P,S){var C={}.toString;P.exports=function(T){return C.call(T).slice(8,-1)}},{}],65:[function(w,P,S){var C=P.exports={version:"2.5.7"};typeof __e=="number"&&(__e=C)},{}],66:[function(w,P,S){"use strict";var C=w("./_object-dp"),T=w("./_property-desc");P.exports=function(h,p,f){p in h?C.f(h,p,T(0,f)):h[p]=f}},{"./_object-dp":98,"./_property-desc":111}],67:[function(w,P,S){var C=w("./_a-function");P.exports=function(T,h,p){if(C(T),h===void 0)return T;switch(p){case 1:return function(f){return T.call(h,f)};case 2:return function(f,l){return T.call(h,f,l)};case 3:return function(f,l,a){return T.call(h,f,l,a)}}return function(){return T.apply(h,arguments)}}},{"./_a-function":58}],68:[function(w,P,S){P.exports=function(C){if(C==null)throw TypeError("Can't call method on "+C);return C}},{}],69:[function(w,P,S){P.exports=!w("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":74}],70:[function(w,P,S){var C=w("./_is-object"),T=w("./_global").document,h=C(T)&&C(T.createElement);P.exports=function(p){return h?T.createElement(p):{}}},{"./_global":76,"./_is-object":85}],71:[function(w,P,S){P.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],72:[function(w,P,S){var C=w("./_object-keys"),T=w("./_object-gops"),h=w("./_object-pie");P.exports=function(p){var f=C(p),l=T.f;if(l)for(var a,c=l(p),s=h.f,u=0;c.length>u;)s.call(p,a=c[u++])&&f.push(a);return f}},{"./_object-gops":103,"./_object-keys":106,"./_object-pie":107}],73:[function(w,P,S){var C=w("./_global"),T=w("./_core"),h=w("./_ctx"),p=w("./_hide"),f=w("./_has"),l=function(a,c,s){var u,i,n,t=a&l.F,d=a&l.G,v=a&l.S,b=a&l.P,y=a&l.B,_=a&l.W,m=d?T:T[c]||(T[c]={}),g=m.prototype,E=d?C:v?C[c]:(C[c]||{}).prototype;d&&(s=c);for(u in s)(i=!t&&E&&E[u]!==void 0)&&f(m,u)||(n=i?E[u]:s[u],m[u]=d&&typeof E[u]!="function"?s[u]:y&&i?h(n,C):_&&E[u]==n?function(o){var x=function(A,O,D){if(this instanceof o){switch(arguments.length){case 0:return new o;case 1:return new o(A);case 2:return new o(A,O)}return new o(A,O,D)}return o.apply(this,arguments)};return x.prototype=o.prototype,x}(n):b&&typeof n=="function"?h(Function.call,n):n,b&&((m.virtual||(m.virtual={}))[u]=n,a&l.R&&g&&!g[u]&&p(g,u,n)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,P.exports=l},{"./_core":65,"./_ctx":67,"./_global":76,"./_has":77,"./_hide":78}],74:[function(w,P,S){P.exports=function(C){try{return!!C()}catch(T){return!0}}},{}],75:[function(w,P,S){var C=w("./_ctx"),T=w("./_iter-call"),h=w("./_is-array-iter"),p=w("./_an-object"),f=w("./_to-length"),l=w("./core.get-iterator-method"),a={},c={},S=P.exports=function(s,u,i,n,t){var d,v,b,y,_=t?function(){return s}:l(s),m=C(i,n,u?2:1),g=0;if(typeof _!="function")throw TypeError(s+" is not iterable!");if(h(_)){for(d=f(s.length);d>g;g++)if((y=u?m(p(v=s[g])[0],v[1]):m(s[g]))===a||y===c)return y}else for(b=_.call(s);!(v=b.next()).done;)if((y=T(b,m,v.value,u))===a||y===c)return y};S.BREAK=a,S.RETURN=c},{"./_an-object":61,"./_ctx":67,"./_is-array-iter":83,"./_iter-call":86,"./_to-length":124,"./core.get-iterator-method":132}],76:[function(w,P,S){var C=P.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=C)},{}],77:[function(w,P,S){var C={}.hasOwnProperty;P.exports=function(T,h){return C.call(T,h)}},{}],78:[function(w,P,S){var C=w("./_object-dp"),T=w("./_property-desc");P.exports=w("./_descriptors")?function(h,p,f){return C.f(h,p,T(1,f))}:function(h,p,f){return h[p]=f,h}},{"./_descriptors":69,"./_object-dp":98,"./_property-desc":111}],79:[function(w,P,S){var C=w("./_global").document;P.exports=C&&C.documentElement},{"./_global":76}],80:[function(w,P,S){P.exports=!w("./_descriptors")&&!w("./_fails")(function(){return Object.defineProperty(w("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":69,"./_dom-create":70,"./_fails":74}],81:[function(w,P,S){P.exports=function(C,T,h){var p=h===void 0;switch(T.length){case 0:return p?C():C.call(h);case 1:return p?C(T[0]):C.call(h,T[0]);case 2:return p?C(T[0],T[1]):C.call(h,T[0],T[1]);case 3:return p?C(T[0],T[1],T[2]):C.call(h,T[0],T[1],T[2]);case 4:return p?C(T[0],T[1],T[2],T[3]):C.call(h,T[0],T[1],T[2],T[3])}return C.apply(h,T)}},{}],82:[function(w,P,S){var C=w("./_cof");P.exports=Object("z").propertyIsEnumerable(0)?Object:function(T){return C(T)=="String"?T.split(""):Object(T)}},{"./_cof":64}],83:[function(w,P,S){var C=w("./_iterators"),T=w("./_wks")("iterator"),h=Array.prototype;P.exports=function(p){return p!==void 0&&(C.Array===p||h[T]===p)}},{"./_iterators":91,"./_wks":131}],84:[function(w,P,S){var C=w("./_cof");P.exports=Array.isArray||function(T){return C(T)=="Array"}},{"./_cof":64}],85:[function(w,P,S){P.exports=function(C){return typeof C=="object"?C!==null:typeof C=="function"}},{}],86:[function(w,P,S){var C=w("./_an-object");P.exports=function(T,h,p,f){try{return f?h(C(p)[0],p[1]):h(p)}catch(a){var l=T.return;throw l!==void 0&&C(l.call(T)),a}}},{"./_an-object":61}],87:[function(w,P,S){"use strict";var C=w("./_object-create"),T=w("./_property-desc"),h=w("./_set-to-string-tag"),p={};w("./_hide")(p,w("./_wks")("iterator"),function(){return this}),P.exports=function(f,l,a){f.prototype=C(p,{next:T(1,a)}),h(f,l+" Iterator")}},{"./_hide":78,"./_object-create":97,"./_property-desc":111,"./_set-to-string-tag":115,"./_wks":131}],88:[function(w,P,S){"use strict";var C=w("./_library"),T=w("./_export"),h=w("./_redefine"),p=w("./_hide"),f=w("./_iterators"),l=w("./_iter-create"),a=w("./_set-to-string-tag"),c=w("./_object-gpo"),s=w("./_wks")("iterator"),u=!([].keys&&"next"in[].keys()),i=function(){return this};P.exports=function(n,t,d,v,b,y,_){l(d,t,v);var m,g,E,o=function(j){if(!u&&j in D)return D[j];switch(j){case"keys":case"values":return function(){return new d(this,j)}}return function(){return new d(this,j)}},x=t+" Iterator",A=b=="values",O=!1,D=n.prototype,I=D[s]||D["@@iterator"]||b&&D[b],F=I||o(b),z=b?A?o("entries"):F:void 0,ne=t=="Array"&&D.entries||I;if(ne&&(E=c(ne.call(new n)))!==Object.prototype&&E.next&&(a(E,x,!0),C||typeof E[s]=="function"||p(E,s,i)),A&&I&&I.name!=="values"&&(O=!0,F=function(){return I.call(this)}),C&&!_||!u&&!O&&D[s]||p(D,s,F),f[t]=F,f[x]=i,b)if(m={values:A?F:o("values"),keys:y?F:o("keys"),entries:z},_)for(g in m)g in D||h(D,g,m[g]);else T(T.P+T.F*(u||O),t,m);return m}},{"./_export":73,"./_hide":78,"./_iter-create":87,"./_iterators":91,"./_library":92,"./_object-gpo":104,"./_redefine":113,"./_set-to-string-tag":115,"./_wks":131}],89:[function(w,P,S){var C=w("./_wks")("iterator"),T=!1;try{var h=[7][C]();h.return=function(){T=!0},Array.from(h,function(){throw 2})}catch(p){}P.exports=function(p,f){if(!f&&!T)return!1;var l=!1;try{var a=[7],c=a[C]();c.next=function(){return{done:l=!0}},a[C]=function(){return c},p(a)}catch(s){}return l}},{"./_wks":131}],90:[function(w,P,S){P.exports=function(C,T){return{value:T,done:!!C}}},{}],91:[function(w,P,S){P.exports={}},{}],92:[function(w,P,S){P.exports=!0},{}],93:[function(w,P,S){var C=w("./_uid")("meta"),T=w("./_is-object"),h=w("./_has"),p=w("./_object-dp").f,f=0,l=Object.isExtensible||function(){return!0},a=!w("./_fails")(function(){return l(Object.preventExtensions({}))}),c=function(t){p(t,C,{value:{i:"O"+ ++f,w:{}}})},s=function(t,d){if(!T(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!h(t,C)){if(!l(t))return"F";if(!d)return"E";c(t)}return t[C].i},u=function(t,d){if(!h(t,C)){if(!l(t))return!0;if(!d)return!1;c(t)}return t[C].w},i=function(t){return a&&n.NEED&&l(t)&&!h(t,C)&&c(t),t},n=P.exports={KEY:C,NEED:!1,fastKey:s,getWeak:u,onFreeze:i}},{"./_fails":74,"./_has":77,"./_is-object":85,"./_object-dp":98,"./_uid":127}],94:[function(w,P,S){var C=w("./_global"),T=w("./_task").set,h=C.MutationObserver||C.WebKitMutationObserver,p=C.process,f=C.Promise,l=w("./_cof")(p)=="process";P.exports=function(){var a,c,s,u=function(){var d,v;for(l&&(d=p.domain)&&d.exit();a;){v=a.fn,a=a.next;try{v()}catch(b){throw a?s():c=void 0,b}}c=void 0,d&&d.enter()};if(l)s=function(){p.nextTick(u)};else if(!h||C.navigator&&C.navigator.standalone)if(f&&f.resolve){var i=f.resolve(void 0);s=function(){i.then(u)}}else s=function(){T.call(C,u)};else{var n=!0,t=document.createTextNode("");new h(u).observe(t,{characterData:!0}),s=function(){t.data=n=!n}}return function(d){var v={fn:d,next:void 0};c&&(c.next=v),a||(a=v,s()),c=v}}},{"./_cof":64,"./_global":76,"./_task":120}],95:[function(w,P,S){"use strict";function C(h){var p,f;this.promise=new h(function(l,a){if(p!==void 0||f!==void 0)throw TypeError("Bad Promise constructor");p=l,f=a}),this.resolve=T(p),this.reject=T(f)}var T=w("./_a-function");P.exports.f=function(h){return new C(h)}},{"./_a-function":58}],96:[function(w,P,S){"use strict";var C=w("./_object-keys"),T=w("./_object-gops"),h=w("./_object-pie"),p=w("./_to-object"),f=w("./_iobject"),l=Object.assign;P.exports=!l||w("./_fails")(function(){var a={},c={},s=Symbol(),u="abcdefghijklmnopqrst";return a[s]=7,u.split("").forEach(function(i){c[i]=i}),l({},a)[s]!=7||Object.keys(l({},c)).join("")!=u})?function(a,c){for(var s=p(a),u=arguments.length,i=1,n=T.f,t=h.f;u>i;)for(var d,v=f(arguments[i++]),b=n?C(v).concat(n(v)):C(v),y=b.length,_=0;y>_;)t.call(v,d=b[_++])&&(s[d]=v[d]);return s}:l},{"./_fails":74,"./_iobject":82,"./_object-gops":103,"./_object-keys":106,"./_object-pie":107,"./_to-object":125}],97:[function(w,P,S){var C=w("./_an-object"),T=w("./_object-dps"),h=w("./_enum-bug-keys"),p=w("./_shared-key")("IE_PROTO"),f=function(){},l=function(){var a,c=w("./_dom-create")("iframe"),s=h.length;for(c.style.display="none",w("./_html").appendChild(c),c.src="javascript:",a=c.contentWindow.document,a.open(),a.write("<script>document.F=Object</script>"),a.close(),l=a.F;s--;)delete l.prototype[h[s]];return l()};P.exports=Object.create||function(a,c){var s;return a!==null?(f.prototype=C(a),s=new f,f.prototype=null,s[p]=a):s=l(),c===void 0?s:T(s,c)}},{"./_an-object":61,"./_dom-create":70,"./_enum-bug-keys":71,"./_html":79,"./_object-dps":99,"./_shared-key":116}],98:[function(w,P,S){var C=w("./_an-object"),T=w("./_ie8-dom-define"),h=w("./_to-primitive"),p=Object.defineProperty;S.f=w("./_descriptors")?Object.defineProperty:function(f,l,a){if(C(f),l=h(l,!0),C(a),T)try{return p(f,l,a)}catch(c){}if("get"in a||"set"in a)throw TypeError("Accessors not supported!");return"value"in a&&(f[l]=a.value),f}},{"./_an-object":61,"./_descriptors":69,"./_ie8-dom-define":80,"./_to-primitive":126}],99:[function(w,P,S){var C=w("./_object-dp"),T=w("./_an-object"),h=w("./_object-keys");P.exports=w("./_descriptors")?Object.defineProperties:function(p,f){T(p);for(var l,a=h(f),c=a.length,s=0;c>s;)C.f(p,l=a[s++],f[l]);return p}},{"./_an-object":61,"./_descriptors":69,"./_object-dp":98,"./_object-keys":106}],100:[function(w,P,S){var C=w("./_object-pie"),T=w("./_property-desc"),h=w("./_to-iobject"),p=w("./_to-primitive"),f=w("./_has"),l=w("./_ie8-dom-define"),a=Object.getOwnPropertyDescriptor;S.f=w("./_descriptors")?a:function(c,s){if(c=h(c),s=p(s,!0),l)try{return a(c,s)}catch(u){}if(f(c,s))return T(!C.f.call(c,s),c[s])}},{"./_descriptors":69,"./_has":77,"./_ie8-dom-define":80,"./_object-pie":107,"./_property-desc":111,"./_to-iobject":123,"./_to-primitive":126}],101:[function(w,P,S){var C=w("./_to-iobject"),T=w("./_object-gopn").f,h={}.toString,p=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],f=function(l){try{return T(l)}catch(a){return p.slice()}};P.exports.f=function(l){return p&&h.call(l)=="[object Window]"?f(l):T(C(l))}},{"./_object-gopn":102,"./_to-iobject":123}],102:[function(w,P,S){var C=w("./_object-keys-internal"),T=w("./_enum-bug-keys").concat("length","prototype");S.f=Object.getOwnPropertyNames||function(h){return C(h,T)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],103:[function(w,P,S){S.f=Object.getOwnPropertySymbols},{}],104:[function(w,P,S){var C=w("./_has"),T=w("./_to-object"),h=w("./_shared-key")("IE_PROTO"),p=Object.prototype;P.exports=Object.getPrototypeOf||function(f){return f=T(f),C(f,h)?f[h]:typeof f.constructor=="function"&&f instanceof f.constructor?f.constructor.prototype:f instanceof Object?p:null}},{"./_has":77,"./_shared-key":116,"./_to-object":125}],105:[function(w,P,S){var C=w("./_has"),T=w("./_to-iobject"),h=w("./_array-includes")(!1),p=w("./_shared-key")("IE_PROTO");P.exports=function(f,l){var a,c=T(f),s=0,u=[];for(a in c)a!=p&&C(c,a)&&u.push(a);for(;l.length>s;)C(c,a=l[s++])&&(~h(u,a)||u.push(a));return u}},{"./_array-includes":62,"./_has":77,"./_shared-key":116,"./_to-iobject":123}],106:[function(w,P,S){var C=w("./_object-keys-internal"),T=w("./_enum-bug-keys");P.exports=Object.keys||function(h){return C(h,T)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],107:[function(w,P,S){S.f={}.propertyIsEnumerable},{}],108:[function(w,P,S){var C=w("./_export"),T=w("./_core"),h=w("./_fails");P.exports=function(p,f){var l=(T.Object||{})[p]||Object[p],a={};a[p]=f(l),C(C.S+C.F*h(function(){l(1)}),"Object",a)}},{"./_core":65,"./_export":73,"./_fails":74}],109:[function(w,P,S){P.exports=function(C){try{return{e:!1,v:C()}}catch(T){return{e:!0,v:T}}}},{}],110:[function(w,P,S){var C=w("./_an-object"),T=w("./_is-object"),h=w("./_new-promise-capability");P.exports=function(p,f){if(C(p),T(f)&&f.constructor===p)return f;var l=h.f(p);return(0,l.resolve)(f),l.promise}},{"./_an-object":61,"./_is-object":85,"./_new-promise-capability":95}],111:[function(w,P,S){P.exports=function(C,T){return{enumerable:!(1&C),configurable:!(2&C),writable:!(4&C),value:T}}},{}],112:[function(w,P,S){var C=w("./_hide");P.exports=function(T,h,p){for(var f in h)p&&T[f]?T[f]=h[f]:C(T,f,h[f]);return T}},{"./_hide":78}],113:[function(w,P,S){P.exports=w("./_hide")},{"./_hide":78}],114:[function(w,P,S){"use strict";var C=w("./_global"),T=w("./_core"),h=w("./_object-dp"),p=w("./_descriptors"),f=w("./_wks")("species");P.exports=function(l){var a=typeof T[l]=="function"?T[l]:C[l];p&&a&&!a[f]&&h.f(a,f,{configurable:!0,get:function(){return this}})}},{"./_core":65,"./_descriptors":69,"./_global":76,"./_object-dp":98,"./_wks":131}],115:[function(w,P,S){var C=w("./_object-dp").f,T=w("./_has"),h=w("./_wks")("toStringTag");P.exports=function(p,f,l){p&&!T(p=l?p:p.prototype,h)&&C(p,h,{configurable:!0,value:f})}},{"./_has":77,"./_object-dp":98,"./_wks":131}],116:[function(w,P,S){var C=w("./_shared")("keys"),T=w("./_uid");P.exports=function(h){return C[h]||(C[h]=T(h))}},{"./_shared":117,"./_uid":127}],117:[function(w,P,S){var C=w("./_core"),T=w("./_global"),h=T["__core-js_shared__"]||(T["__core-js_shared__"]={});(P.exports=function(p,f){return h[p]||(h[p]=f!==void 0?f:{})})("versions",[]).push({version:C.version,mode:w("./_library")?"pure":"global",copyright:"\u6F0F 2018 Denis Pushkarev (zloirock.ru)"})},{"./_core":65,"./_global":76,"./_library":92}],118:[function(w,P,S){var C=w("./_an-object"),T=w("./_a-function"),h=w("./_wks")("species");P.exports=function(p,f){var l,a=C(p).constructor;return a===void 0||(l=C(a)[h])==null?f:T(l)}},{"./_a-function":58,"./_an-object":61,"./_wks":131}],119:[function(w,P,S){var C=w("./_to-integer"),T=w("./_defined");P.exports=function(h){return function(p,f){var l,a,c=String(T(p)),s=C(f),u=c.length;return s<0||s>=u?h?"":void 0:(l=c.charCodeAt(s),l<55296||l>56319||s+1===u||(a=c.charCodeAt(s+1))<56320||a>57343?h?c.charAt(s):l:h?c.slice(s,s+2):a-56320+(l-55296<<10)+65536)}}},{"./_defined":68,"./_to-integer":122}],120:[function(w,P,S){var C,T,h,p=w("./_ctx"),f=w("./_invoke"),l=w("./_html"),a=w("./_dom-create"),c=w("./_global"),s=c.process,u=c.setImmediate,i=c.clearImmediate,n=c.MessageChannel,t=c.Dispatch,d=0,v={},b=function(){var _=+this;if(v.hasOwnProperty(_)){var m=v[_];delete v[_],m()}},y=function(_){b.call(_.data)};u&&i||(u=function(_){for(var m=[],g=1;arguments.length>g;)m.push(arguments[g++]);return v[++d]=function(){f(typeof _=="function"?_:Function(_),m)},C(d),d},i=function(_){delete v[_]},w("./_cof")(s)=="process"?C=function(_){s.nextTick(p(b,_,1))}:t&&t.now?C=function(_){t.now(p(b,_,1))}:n?(T=new n,h=T.port2,T.port1.onmessage=y,C=p(h.postMessage,h,1)):c.addEventListener&&typeof postMessage=="function"&&!c.importScripts?(C=function(_){c.postMessage(_+"","*")},c.addEventListener("message",y,!1)):C="onreadystatechange"in a("script")?function(_){l.appendChild(a("script")).onreadystatechange=function(){l.removeChild(this),b.call(_)}}:function(_){setTimeout(p(b,_,1),0)}),P.exports={set:u,clear:i}},{"./_cof":64,"./_ctx":67,"./_dom-create":70,"./_global":76,"./_html":79,"./_invoke":81}],121:[function(w,P,S){var C=w("./_to-integer"),T=Math.max,h=Math.min;P.exports=function(p,f){return p=C(p),p<0?T(p+f,0):h(p,f)}},{"./_to-integer":122}],122:[function(w,P,S){var C=Math.ceil,T=Math.floor;P.exports=function(h){return isNaN(h=+h)?0:(h>0?T:C)(h)}},{}],123:[function(w,P,S){var C=w("./_iobject"),T=w("./_defined");P.exports=function(h){return C(T(h))}},{"./_defined":68,"./_iobject":82}],124:[function(w,P,S){var C=w("./_to-integer"),T=Math.min;P.exports=function(h){return h>0?T(C(h),9007199254740991):0}},{"./_to-integer":122}],125:[function(w,P,S){var C=w("./_defined");P.exports=function(T){return Object(C(T))}},{"./_defined":68}],126:[function(w,P,S){var C=w("./_is-object");P.exports=function(T,h){if(!C(T))return T;var p,f;if(h&&typeof(p=T.toString)=="function"&&!C(f=p.call(T)))return f;if(typeof(p=T.valueOf)=="function"&&!C(f=p.call(T)))return f;if(!h&&typeof(p=T.toString)=="function"&&!C(f=p.call(T)))return f;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":85}],127:[function(w,P,S){var C=0,T=Math.random();P.exports=function(h){return"Symbol(".concat(h===void 0?"":h,")_",(++C+T).toString(36))}},{}],128:[function(w,P,S){var C=w("./_global"),T=C.navigator;P.exports=T&&T.userAgent||""},{"./_global":76}],129:[function(w,P,S){var C=w("./_global"),T=w("./_core"),h=w("./_library"),p=w("./_wks-ext"),f=w("./_object-dp").f;P.exports=function(l){var a=T.Symbol||(T.Symbol=h?{}:C.Symbol||{});l.charAt(0)=="_"||l in a||f(a,l,{value:p.f(l)})}},{"./_core":65,"./_global":76,"./_library":92,"./_object-dp":98,"./_wks-ext":130}],130:[function(w,P,S){S.f=w("./_wks")},{"./_wks":131}],131:[function(w,P,S){var C=w("./_shared")("wks"),T=w("./_uid"),h=w("./_global").Symbol,p=typeof h=="function";(P.exports=function(f){return C[f]||(C[f]=p&&h[f]||(p?h:T)("Symbol."+f))}).store=C},{"./_global":76,"./_shared":117,"./_uid":127}],132:[function(w,P,S){var C=w("./_classof"),T=w("./_wks")("iterator"),h=w("./_iterators");P.exports=w("./_core").getIteratorMethod=function(p){if(p!=null)return p[T]||p["@@iterator"]||h[C(p)]}},{"./_classof":63,"./_core":65,"./_iterators":91,"./_wks":131}],133:[function(w,P,S){"use strict";var C=w("./_ctx"),T=w("./_export"),h=w("./_to-object"),p=w("./_iter-call"),f=w("./_is-array-iter"),l=w("./_to-length"),a=w("./_create-property"),c=w("./core.get-iterator-method");T(T.S+T.F*!w("./_iter-detect")(function(s){Array.from(s)}),"Array",{from:function(s){var u,i,n,t,d=h(s),v=typeof this=="function"?this:Array,b=arguments.length,y=b>1?arguments[1]:void 0,_=y!==void 0,m=0,g=c(d);if(_&&(y=C(y,b>2?arguments[2]:void 0,2)),g==null||v==Array&&f(g))for(u=l(d.length),i=new v(u);u>m;m++)a(i,m,_?y(d[m],m):d[m]);else for(t=g.call(d),i=new v;!(n=t.next()).done;m++)a(i,m,_?p(t,y,[n.value,m],!0):n.value);return i.length=m,i}})},{"./_create-property":66,"./_ctx":67,"./_export":73,"./_is-array-iter":83,"./_iter-call":86,"./_iter-detect":89,"./_to-length":124,"./_to-object":125,"./core.get-iterator-method":132}],134:[function(w,P,S){"use strict";var C=w("./_add-to-unscopables"),T=w("./_iter-step"),h=w("./_iterators"),p=w("./_to-iobject");P.exports=w("./_iter-define")(Array,"Array",function(f,l){this._t=p(f),this._i=0,this._k=l},function(){var f=this._t,l=this._k,a=this._i++;return!f||a>=f.length?(this._t=void 0,T(1)):l=="keys"?T(0,a):l=="values"?T(0,f[a]):T(0,[a,f[a]])},"values"),h.Arguments=h.Array,C("keys"),C("values"),C("entries")},{"./_add-to-unscopables":59,"./_iter-define":88,"./_iter-step":90,"./_iterators":91,"./_to-iobject":123}],135:[function(w,P,S){"use strict";var C=w("./_is-object"),T=w("./_object-gpo"),h=w("./_wks")("hasInstance"),p=Function.prototype;h in p||w("./_object-dp").f(p,h,{value:function(f){if(typeof this!="function"||!C(f))return!1;if(!C(this.prototype))return f instanceof this;for(;f=T(f);)if(this.prototype===f)return!0;return!1}})},{"./_is-object":85,"./_object-dp":98,"./_object-gpo":104,"./_wks":131}],136:[function(w,P,S){var C=w("./_export");C(C.S+C.F,"Object",{assign:w("./_object-assign")})},{"./_export":73,"./_object-assign":96}],137:[function(w,P,S){var C=w("./_export");C(C.S,"Object",{create:w("./_object-create")})},{"./_export":73,"./_object-create":97}],138:[function(w,P,S){var C=w("./_export");C(C.S+C.F*!w("./_descriptors"),"Object",{defineProperty:w("./_object-dp").f})},{"./_descriptors":69,"./_export":73,"./_object-dp":98}],139:[function(w,P,S){w("./_object-sap")("getOwnPropertyNames",function(){return w("./_object-gopn-ext").f})},{"./_object-gopn-ext":101,"./_object-sap":108}],140:[function(w,P,S){var C=w("./_to-object"),T=w("./_object-gpo");w("./_object-sap")("getPrototypeOf",function(){return function(h){return T(C(h))}})},{"./_object-gpo":104,"./_object-sap":108,"./_to-object":125}],141:[function(w,P,S){var C=w("./_to-object"),T=w("./_object-keys");w("./_object-sap")("keys",function(){return function(h){return T(C(h))}})},{"./_object-keys":106,"./_object-sap":108,"./_to-object":125}],142:[function(w,P,S){arguments[4][36][0].apply(S,arguments)},{dup:36}],143:[function(w,P,S){"use strict";var C,T,h,p,f=w("./_library"),l=w("./_global"),a=w("./_ctx"),c=w("./_classof"),s=w("./_export"),u=w("./_is-object"),i=w("./_a-function"),n=w("./_an-instance"),t=w("./_for-of"),d=w("./_species-constructor"),v=w("./_task").set,b=w("./_microtask")(),y=w("./_new-promise-capability"),_=w("./_perform"),m=w("./_user-agent"),g=w("./_promise-resolve"),E=l.TypeError,o=l.process,x=o&&o.versions,A=x&&x.v8||"",O=l.Promise,D=c(o)=="process",I=function(){},F=T=y.f,z=!!function(){try{var ie=O.resolve(1),oe=(ie.constructor={})[w("./_wks")("species")]=function(ye){ye(I,I)};return(D||typeof PromiseRejectionEvent=="function")&&ie.then(I)instanceof oe&&A.indexOf("6.6")!==0&&m.indexOf("Chrome/66")===-1}catch(ye){}}(),ne=function(ie){var oe;return!(!u(ie)||typeof(oe=ie.then)!="function")&&oe},j=function(ie,oe){if(!ie._n){ie._n=!0;var ye=ie._c;b(function(){for(var pe=ie._v,we=ie._s==1,fe=0;ye.length>fe;)!function(Te){var Fe,De,Me,Ue=we?Te.ok:Te.fail,ve=Te.resolve,ce=Te.reject,Ie=Te.domain;try{Ue?(we||(ie._h==2&&Z(ie),ie._h=1),Ue===!0?Fe=pe:(Ie&&Ie.enter(),Fe=Ue(pe),Ie&&(Ie.exit(),Me=!0)),Fe===Te.promise?ce(E("Promise-chain cycle")):(De=ne(Fe))?De.call(Fe,ve,ce):ve(Fe)):ce(pe)}catch(Ne){Ie&&!Me&&Ie.exit(),ce(Ne)}}(ye[fe++]);ie._c=[],ie._n=!1,oe&&!ie._h&&G(ie)})}},G=function(ie){v.call(l,function(){var oe,ye,pe,we=ie._v,fe=X(ie);if(fe&&(oe=_(function(){D?o.emit("unhandledRejection",we,ie):(ye=l.onunhandledrejection)?ye({promise:ie,reason:we}):(pe=l.console)&&pe.error&&pe.error("Unhandled promise rejection",we)}),ie._h=D||X(ie)?2:1),ie._a=void 0,fe&&oe.e)throw oe.v})},X=function(ie){return ie._h!==1&&(ie._a||ie._c).length===0},Z=function(ie){v.call(l,function(){var oe;D?o.emit("rejectionHandled",ie):(oe=l.onrejectionhandled)&&oe({promise:ie,reason:ie._v})})},K=function(ie){var oe=this;oe._d||(oe._d=!0,oe=oe._w||oe,oe._v=ie,oe._s=2,oe._a||(oe._a=oe._c.slice()),j(oe,!0))},q=function(ie){var oe,ye=this;if(!ye._d){ye._d=!0,ye=ye._w||ye;try{if(ye===ie)throw E("Promise can't be resolved itself");(oe=ne(ie))?b(function(){var pe={_w:ye,_d:!1};try{oe.call(ie,a(q,pe,1),a(K,pe,1))}catch(we){K.call(pe,we)}}):(ye._v=ie,ye._s=1,j(ye,!1))}catch(pe){K.call({_w:ye,_d:!1},pe)}}};z||(O=function(ie){n(this,O,"Promise","_h"),i(ie),C.call(this);try{ie(a(q,this,1),a(K,this,1))}catch(oe){K.call(this,oe)}},C=function(ie){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},C.prototype=w("./_redefine-all")(O.prototype,{then:function(ie,oe){var ye=F(d(this,O));return ye.ok=typeof ie!="function"||ie,ye.fail=typeof oe=="function"&&oe,ye.domain=D?o.domain:void 0,this._c.push(ye),this._a&&this._a.push(ye),this._s&&j(this,!1),ye.promise},catch:function(ie){return this.then(void 0,ie)}}),h=function(){var ie=new C;this.promise=ie,this.resolve=a(q,ie,1),this.reject=a(K,ie,1)},y.f=F=function(ie){return ie===O||ie===p?new h(ie):T(ie)}),s(s.G+s.W+s.F*!z,{Promise:O}),w("./_set-to-string-tag")(O,"Promise"),w("./_set-species")("Promise"),p=w("./_core").Promise,s(s.S+s.F*!z,"Promise",{reject:function(ie){var oe=F(this);return(0,oe.reject)(ie),oe.promise}}),s(s.S+s.F*(f||!z),"Promise",{resolve:function(ie){return g(f&&this===p?O:this,ie)}}),s(s.S+s.F*!(z&&w("./_iter-detect")(function(ie){O.all(ie).catch(I)})),"Promise",{all:function(ie){var oe=this,ye=F(oe),pe=ye.resolve,we=ye.reject,fe=_(function(){var Te=[],Fe=0,De=1;t(ie,!1,function(Me){var Ue=Fe++,ve=!1;Te.push(void 0),De++,oe.resolve(Me).then(function(ce){ve||(ve=!0,Te[Ue]=ce,--De||pe(Te))},we)}),--De||pe(Te)});return fe.e&&we(fe.v),ye.promise},race:function(ie){var oe=this,ye=F(oe),pe=ye.reject,we=_(function(){t(ie,!1,function(fe){oe.resolve(fe).then(ye.resolve,pe)})});return we.e&&pe(we.v),ye.promise}})},{"./_a-function":58,"./_an-instance":60,"./_classof":63,"./_core":65,"./_ctx":67,"./_export":73,"./_for-of":75,"./_global":76,"./_is-object":85,"./_iter-detect":89,"./_library":92,"./_microtask":94,"./_new-promise-capability":95,"./_perform":109,"./_promise-resolve":110,"./_redefine-all":112,"./_set-species":114,"./_set-to-string-tag":115,"./_species-constructor":118,"./_task":120,"./_user-agent":128,"./_wks":131}],144:[function(w,P,S){var C=w("./_export"),T=w("./_to-absolute-index"),h=String.fromCharCode,p=String.fromCodePoint;C(C.S+C.F*(!!p&&p.length!=1),"String",{fromCodePoint:function(f){for(var l,a=[],c=arguments.length,s=0;c>s;){if(l=+arguments[s++],T(l,1114111)!==l)throw RangeError(l+" is not a valid code point");a.push(l<65536?h(l):h(55296+((l-=65536)>>10),l%1024+56320))}return a.join("")}})},{"./_export":73,"./_to-absolute-index":121}],145:[function(w,P,S){"use strict";var C=w("./_string-at")(!0);w("./_iter-define")(String,"String",function(T){this._t=String(T),this._i=0},function(){var T,h=this._t,p=this._i;return p>=h.length?{value:void 0,done:!0}:(T=C(h,p),this._i+=T.length,{value:T,done:!1})})},{"./_iter-define":88,"./_string-at":119}],146:[function(w,P,S){"use strict";var C=w("./_global"),T=w("./_has"),h=w("./_descriptors"),p=w("./_export"),f=w("./_redefine"),l=w("./_meta").KEY,a=w("./_fails"),c=w("./_shared"),s=w("./_set-to-string-tag"),u=w("./_uid"),i=w("./_wks"),n=w("./_wks-ext"),t=w("./_wks-define"),d=w("./_enum-keys"),v=w("./_is-array"),b=w("./_an-object"),y=w("./_is-object"),_=w("./_to-iobject"),m=w("./_to-primitive"),g=w("./_property-desc"),E=w("./_object-create"),o=w("./_object-gopn-ext"),x=w("./_object-gopd"),A=w("./_object-dp"),O=w("./_object-keys"),D=x.f,I=A.f,F=o.f,z=C.Symbol,ne=C.JSON,j=ne&&ne.stringify,G=i("_hidden"),X=i("toPrimitive"),Z={}.propertyIsEnumerable,K=c("symbol-registry"),q=c("symbols"),ie=c("op-symbols"),oe=Object.prototype,ye=typeof z=="function",pe=C.QObject,we=!pe||!pe.prototype||!pe.prototype.findChild,fe=h&&a(function(){return E(I({},"a",{get:function(){return I(this,"a",{value:7}).a}})).a!=7})?function($,V,Y){var me=D(oe,V);me&&delete oe[V],I($,V,Y),me&&$!==oe&&I(oe,V,me)}:I,Te=function($){var V=q[$]=E(z.prototype);return V._k=$,V},Fe=ye&&typeof z.iterator=="symbol"?function($){return typeof $=="symbol"}:function($){return $ instanceof z},De=function($,V,Y){return $===oe&&De(ie,V,Y),b($),V=m(V,!0),b(Y),T(q,V)?(Y.enumerable?(T($,G)&&$[G][V]&&($[G][V]=!1),Y=E(Y,{enumerable:g(0,!1)})):(T($,G)||I($,G,g(1,{})),$[G][V]=!0),fe($,V,Y)):I($,V,Y)},Me=function($,V){b($);for(var Y,me=d(V=_(V)),Ae=0,at=me.length;at>Ae;)De($,Y=me[Ae++],V[Y]);return $},Ue=function($,V){return V===void 0?E($):Me(E($),V)},ve=function($){var V=Z.call(this,$=m($,!0));return!(this===oe&&T(q,$)&&!T(ie,$))&&(!(V||!T(this,$)||!T(q,$)||T(this,G)&&this[G][$])||V)},ce=function($,V){if($=_($),V=m(V,!0),$!==oe||!T(q,V)||T(ie,V)){var Y=D($,V);return!Y||!T(q,V)||T($,G)&&$[G][V]||(Y.enumerable=!0),Y}},Ie=function($){for(var V,Y=F(_($)),me=[],Ae=0;Y.length>Ae;)T(q,V=Y[Ae++])||V==G||V==l||me.push(V);return me},Ne=function($){for(var V,Y=$===oe,me=F(Y?ie:_($)),Ae=[],at=0;me.length>at;)!T(q,V=me[at++])||Y&&!T(oe,V)||Ae.push(q[V]);return Ae};ye||(z=function(){if(this instanceof z)throw TypeError("Symbol is not a constructor!");var $=u(arguments.length>0?arguments[0]:void 0),V=function(Y){this===oe&&V.call(ie,Y),T(this,G)&&T(this[G],$)&&(this[G][$]=!1),fe(this,$,g(1,Y))};return h&&we&&fe(oe,$,{configurable:!0,set:V}),Te($)},f(z.prototype,"toString",function(){return this._k}),x.f=ce,A.f=De,w("./_object-gopn").f=o.f=Ie,w("./_object-pie").f=ve,w("./_object-gops").f=Ne,h&&!w("./_library")&&f(oe,"propertyIsEnumerable",ve,!0),n.f=function($){return Te(i($))}),p(p.G+p.W+p.F*!ye,{Symbol:z});for(var Xe="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;Xe.length>ee;)i(Xe[ee++]);for(var k=O(i.store),N=0;k.length>N;)t(k[N++]);p(p.S+p.F*!ye,"Symbol",{for:function($){return T(K,$+="")?K[$]:K[$]=z($)},keyFor:function($){if(!Fe($))throw TypeError($+" is not a symbol!");for(var V in K)if(K[V]===$)return V},useSetter:function(){we=!0},useSimple:function(){we=!1}}),p(p.S+p.F*!ye,"Object",{create:Ue,defineProperty:De,defineProperties:Me,getOwnPropertyDescriptor:ce,getOwnPropertyNames:Ie,getOwnPropertySymbols:Ne}),ne&&p(p.S+p.F*(!ye||a(function(){var $=z();return j([$])!="[null]"||j({a:$})!="{}"||j(Object($))!="{}"})),"JSON",{stringify:function($){for(var V,Y,me=[$],Ae=1;arguments.length>Ae;)me.push(arguments[Ae++]);if(Y=V=me[1],(y(V)||$!==void 0)&&!Fe($))return v(V)||(V=function(at,Le){if(typeof Y=="function"&&(Le=Y.call(this,at,Le)),!Fe(Le))return Le}),me[1]=V,j.apply(ne,me)}}),z.prototype[X]||w("./_hide")(z.prototype,X,z.prototype.valueOf),s(z,"Symbol"),s(Math,"Math",!0),s(C.JSON,"JSON",!0)},{"./_an-object":61,"./_descriptors":69,"./_enum-keys":72,"./_export":73,"./_fails":74,"./_global":76,"./_has":77,"./_hide":78,"./_is-array":84,"./_is-object":85,"./_library":92,"./_meta":93,"./_object-create":97,"./_object-dp":98,"./_object-gopd":100,"./_object-gopn":102,"./_object-gopn-ext":101,"./_object-gops":103,"./_object-keys":106,"./_object-pie":107,"./_property-desc":111,"./_redefine":113,"./_set-to-string-tag":115,"./_shared":117,"./_to-iobject":123,"./_to-primitive":126,"./_uid":127,"./_wks":131,"./_wks-define":129,"./_wks-ext":130}],147:[function(w,P,S){"use strict";var C=w("./_export"),T=w("./_core"),h=w("./_global"),p=w("./_species-constructor"),f=w("./_promise-resolve");C(C.P+C.R,"Promise",{finally:function(l){var a=p(this,T.Promise||h.Promise),c=typeof l=="function";return this.then(c?function(s){return f(a,l()).then(function(){return s})}:l,c?function(s){return f(a,l()).then(function(){throw s})}:l)}})},{"./_core":65,"./_export":73,"./_global":76,"./_promise-resolve":110,"./_species-constructor":118}],148:[function(w,P,S){"use strict";var C=w("./_export"),T=w("./_new-promise-capability"),h=w("./_perform");C(C.S,"Promise",{try:function(p){var f=T.f(this),l=h(p);return(l.e?f.reject:f.resolve)(l.v),f.promise}})},{"./_export":73,"./_new-promise-capability":95,"./_perform":109}],149:[function(w,P,S){w("./_wks-define")("asyncIterator")},{"./_wks-define":129}],150:[function(w,P,S){w("./_wks-define")("observable")},{"./_wks-define":129}],151:[function(w,P,S){w("./es6.array.iterator");for(var C=w("./_global"),T=w("./_hide"),h=w("./_iterators"),p=w("./_wks")("toStringTag"),f="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(","),l=0;l<f.length;l++){var a=f[l],c=C[a],s=c&&c.prototype;s&&!s[p]&&T(s,p,a),h[a]=h.Array}},{"./_global":76,"./_hide":78,"./_iterators":91,"./_wks":131,"./es6.array.iterator":134}],152:[function(w,P,S){var C=w("./_export"),T=w("./_task");C(C.G+C.B,{setImmediate:T.set,clearImmediate:T.clear})},{"./_export":73,"./_task":120}],153:[function(w,P,S){(function(C){"use strict";function T(m){return Array.isArray?Array.isArray(m):b(m)==="[object Array]"}function h(m){return typeof m=="boolean"}function p(m){return m===null}function f(m){return m==null}function l(m){return typeof m=="number"}function a(m){return typeof m=="string"}function c(m){return(m===void 0?"undefined":(0,_.default)(m))==="symbol"}function s(m){return m===void 0}function u(m){return b(m)==="[object RegExp]"}function i(m){return(m===void 0?"undefined":(0,_.default)(m))==="object"&&m!==null}function n(m){return b(m)==="[object Date]"}function t(m){return b(m)==="[object Error]"||m instanceof Error}function d(m){return typeof m=="function"}function v(m){return m===null||typeof m=="boolean"||typeof m=="number"||typeof m=="string"||(m===void 0?"undefined":(0,_.default)(m))==="symbol"||m===void 0}function b(m){return Object.prototype.toString.call(m)}var y=w("babel-runtime/helpers/typeof"),_=function(m){return m&&m.__esModule?m:{default:m}}(y);S.isArray=T,S.isBoolean=h,S.isNull=p,S.isNullOrUndefined=f,S.isNumber=l,S.isString=a,S.isSymbol=c,S.isUndefined=s,S.isRegExp=u,S.isObject=i,S.isDate=n,S.isError=t,S.isFunction=d,S.isPrimitive=v,S.isBuffer=C.isBuffer}).call(this,{isBuffer:w("../../is-buffer/index.js")})},{"../../is-buffer/index.js":163,"babel-runtime/helpers/typeof":32}],154:[function(w,P,S){"use strict";var C=w("babel-runtime/helpers/typeof"),T=function(h){return h&&h.__esModule?h:{default:h}}(C);!function(h){function p(s,u){for(s=String(s),u=u||2;s.length<u;)s="0"+s;return s}function f(s){var u=new Date(s.getFullYear(),s.getMonth(),s.getDate());u.setDate(u.getDate()-(u.getDay()+6)%7+3);var i=new Date(u.getFullYear(),0,4);i.setDate(i.getDate()-(i.getDay()+6)%7+3);var n=u.getTimezoneOffset()-i.getTimezoneOffset();u.setHours(u.getHours()-n);var t=(u-i)/6048e5;return 1+Math.floor(t)}function l(s){var u=s.getDay();return u===0&&(u=7),u}function a(s){return s===null?"null":s===void 0?"undefined":(s===void 0?"undefined":(0,T.default)(s))!=="object"?s===void 0?"undefined":(0,T.default)(s):Array.isArray(s)?"array":{}.toString.call(s).slice(8,-1).toLowerCase()}var c=function(){var s=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,u=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,i=/[^-+\dA-Z]/g;return function(n,t,d,v){if(arguments.length!==1||a(n)!=="string"||/\d/.test(n)||(t=n,n=void 0),n=n||new Date,n instanceof Date||(n=new Date(n)),isNaN(n))throw TypeError("Invalid date");t=String(c.masks[t]||t||c.masks.default);var b=t.slice(0,4);b!=="UTC:"&&b!=="GMT:"||(t=t.slice(4),d=!0,b==="GMT:"&&(v=!0));var y=d?"getUTC":"get",_=n[y+"Date"](),m=n[y+"Day"](),g=n[y+"Month"](),E=n[y+"FullYear"](),o=n[y+"Hours"](),x=n[y+"Minutes"](),A=n[y+"Seconds"](),O=n[y+"Milliseconds"](),D=d?0:n.getTimezoneOffset(),I=f(n),F=l(n),z={d:_,dd:p(_),ddd:c.i18n.dayNames[m],dddd:c.i18n.dayNames[m+7],m:g+1,mm:p(g+1),mmm:c.i18n.monthNames[g],mmmm:c.i18n.monthNames[g+12],yy:String(E).slice(2),yyyy:E,h:o%12||12,hh:p(o%12||12),H:o,HH:p(o),M:x,MM:p(x),s:A,ss:p(A),l:p(O,3),L:p(Math.round(O/10)),t:o<12?"a":"p",tt:o<12?"am":"pm",T:o<12?"A":"P",TT:o<12?"AM":"PM",Z:v?"GMT":d?"UTC":(String(n).match(u)||[""]).pop().replace(i,""),o:(D>0?"-":"+")+p(100*Math.floor(Math.abs(D)/60)+Math.abs(D)%60,4),S:["th","st","nd","rd"][_%10>3?0:(_%100-_%10!=10)*_%10],W:I,N:F};return t.replace(s,function(ne){return ne in z?z[ne]:ne.slice(1,ne.length-1)})}}();c.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"},c.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"]},typeof U=="function"&&U.amd?U(function(){return c}):(S===void 0?"undefined":(0,T.default)(S))==="object"?P.exports=c:h.dateFormat=c}(void 0)},{"babel-runtime/helpers/typeof":32}],155:[function(w,P,S){(function(C){function T(){return!(typeof window=="undefined"||!window.process||window.process.type!=="renderer")||typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function h(a){var c=this.useColors;if(a[0]=(c?"%c":"")+this.namespace+(c?" %c":" ")+a[0]+(c?"%c ":" ")+"+"+S.humanize(this.diff),c){var s="color: "+this.color;a.splice(1,0,s,"color: inherit");var u=0,i=0;a[0].replace(/%[a-zA-Z%]/g,function(n){n!=="%%"&&(u++,n==="%c"&&(i=u))}),a.splice(i,0,s)}}function p(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function f(a){try{a==null?S.storage.removeItem("debug"):S.storage.debug=a}catch(c){}}function l(){var a;try{a=S.storage.debug}catch(c){}return!a&&C!==void 0&&"env"in C&&(a=C.env.DEBUG),a}S=P.exports=w("./debug"),S.log=p,S.formatArgs=h,S.save=f,S.load=l,S.useColors=T,S.storage=typeof chrome!="undefined"&&chrome.storage!==void 0?chrome.storage.local:function(){try{return window.localStorage}catch(a){}}(),S.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],S.formatters.j=function(a){try{return JSON.stringify(a)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}},S.enable(l())}).call(this,w("_process"))},{"./debug":156,_process:173}],156:[function(w,P,S){function C(c){var s,u=0;for(s in c)u=(u<<5)-u+c.charCodeAt(s),u|=0;return S.colors[Math.abs(u)%S.colors.length]}function T(c){function s(){if(s.enabled){var u=s,i=+new Date,n=i-(a||i);u.diff=n,u.prev=a,u.curr=i,a=i;for(var t=new Array(arguments.length),d=0;d<t.length;d++)t[d]=arguments[d];t[0]=S.coerce(t[0]),typeof t[0]!="string"&&t.unshift("%O");var v=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,function(b,y){if(b==="%%")return b;v++;var _=S.formatters[y];if(typeof _=="function"){var m=t[v];b=_.call(u,m),t.splice(v,1),v--}return b}),S.formatArgs.call(u,t),(s.log||S.log||console.log.bind(console)).apply(u,t)}}return s.namespace=c,s.enabled=S.enabled(c),s.useColors=S.useColors(),s.color=C(c),typeof S.init=="function"&&S.init(s),s}function h(c){S.save(c),S.names=[],S.skips=[];for(var s=(typeof c=="string"?c:"").split(/[\s,]+/),u=s.length,i=0;i<u;i++)s[i]&&(c=s[i].replace(/\*/g,".*?"),c[0]==="-"?S.skips.push(new RegExp("^"+c.substr(1)+"$")):S.names.push(new RegExp("^"+c+"$")))}function p(){S.enable("")}function f(c){var s,u;for(s=0,u=S.skips.length;s<u;s++)if(S.skips[s].test(c))return!1;for(s=0,u=S.names.length;s<u;s++)if(S.names[s].test(c))return!0;return!1}function l(c){return c instanceof Error?c.stack||c.message:c}S=P.exports=T.debug=T.default=T,S.coerce=l,S.disable=p,S.enable=h,S.enabled=f,S.humanize=w("ms"),S.names=[],S.skips=[],S.formatters={};var a},{ms:169}],157:[function(w,P,S){"use strict";function C(h){var p=""+h,f=T.exec(p);if(!f)return p;var l,a="",c=0,s=0;for(c=f.index;c<p.length;c++){switch(p.charCodeAt(c)){case 34:l="&quot;";break;case 38:l="&amp;";break;case 39:l="&#39;";break;case 60:l="&lt;";break;case 62:l="&gt;";break;default:continue}s!==c&&(a+=p.substring(s,c)),s=c+1,a+=l}return s!==c?a+p.substring(s,c):a}var T=/["'&<>]/;P.exports=C},{}],158:[function(w,P,S){function C(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function T(l){return typeof l=="function"}function h(l){return typeof l=="number"}function p(l){return typeof l=="object"&&l!==null}function f(l){return l===void 0}P.exports=C,C.EventEmitter=C,C.prototype._events=void 0,C.prototype._maxListeners=void 0,C.defaultMaxListeners=10,C.prototype.setMaxListeners=function(l){if(!h(l)||l<0||isNaN(l))throw TypeError("n must be a positive number");return this._maxListeners=l,this},C.prototype.emit=function(l){var a,c,s,u,i,n;if(this._events||(this._events={}),l==="error"&&(!this._events.error||p(this._events.error)&&!this._events.error.length)){if((a=arguments[1])instanceof Error)throw a;var t=new Error('Uncaught, unspecified "error" event. ('+a+")");throw t.context=a,t}if(c=this._events[l],f(c))return!1;if(T(c))switch(arguments.length){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:u=Array.prototype.slice.call(arguments,1),c.apply(this,u)}else if(p(c))for(u=Array.prototype.slice.call(arguments,1),n=c.slice(),s=n.length,i=0;i<s;i++)n[i].apply(this,u);return!0},C.prototype.addListener=function(l,a){var c;if(!T(a))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",l,T(a.listener)?a.listener:a),this._events[l]?p(this._events[l])?this._events[l].push(a):this._events[l]=[this._events[l],a]:this._events[l]=a,p(this._events[l])&&!this._events[l].warned&&(c=f(this._maxListeners)?C.defaultMaxListeners:this._maxListeners)&&c>0&&this._events[l].length>c&&(this._events[l].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[l].length),typeof console.trace=="function"&&console.trace()),this},C.prototype.on=C.prototype.addListener,C.prototype.once=function(l,a){function c(){this.removeListener(l,c),s||(s=!0,a.apply(this,arguments))}if(!T(a))throw TypeError("listener must be a function");var s=!1;return c.listener=a,this.on(l,c),this},C.prototype.removeListener=function(l,a){var c,s,u,i;if(!T(a))throw TypeError("listener must be a function");if(!this._events||!this._events[l])return this;if(c=this._events[l],u=c.length,s=-1,c===a||T(c.listener)&&c.listener===a)delete this._events[l],this._events.removeListener&&this.emit("removeListener",l,a);else if(p(c)){for(i=u;i-- >0;)if(c[i]===a||c[i].listener&&c[i].listener===a){s=i;break}if(s<0)return this;c.length===1?(c.length=0,delete this._events[l]):c.splice(s,1),this._events.removeListener&&this.emit("removeListener",l,a)}return this},C.prototype.removeAllListeners=function(l){var a,c;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[l]&&delete this._events[l],this;if(arguments.length===0){for(a in this._events)a!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events={},this}if(c=this._events[l],T(c))this.removeListener(l,c);else if(c)for(;c.length;)this.removeListener(l,c[c.length-1]);return delete this._events[l],this},C.prototype.listeners=function(l){return this._events&&this._events[l]?T(this._events[l])?[this._events[l]]:this._events[l].slice():[]},C.prototype.listenerCount=function(l){if(this._events){var a=this._events[l];if(T(a))return 1;if(a)return a.length}return 0},C.listenerCount=function(l,a){return l.listenerCount(a)}},{}],159:[function(w,P,S){var C=w("http"),T=P.exports;for(var h in C)C.hasOwnProperty(h)&&(T[h]=C[h]);T.request=function(p,f){return p||(p={}),p.scheme="https",p.protocol="https:",C.request.call(this,p,f)}},{http:196}],160:[function(w,P,S){"use strict";var C=w("util"),T=w("ms");P.exports=function(h){if(typeof h=="number")return h;var p=T(h);if(p===void 0){var f=new Error(C.format("humanize-ms(%j) result undefined",h));console.warn(f.stack)}return p}},{ms:169,util:207}],161:[function(w,P,S){S.read=function(C,T,h,p,f){var l,a,c=8*f-p-1,s=(1<<c)-1,u=s>>1,i=-7,n=h?f-1:0,t=h?-1:1,d=C[T+n];for(n+=t,l=d&(1<<-i)-1,d>>=-i,i+=c;i>0;l=256*l+C[T+n],n+=t,i-=8);for(a=l&(1<<-i)-1,l>>=-i,i+=p;i>0;a=256*a+C[T+n],n+=t,i-=8);if(l===0)l=1-u;else{if(l===s)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,p),l-=u}return(d?-1:1)*a*Math.pow(2,l-p)},S.write=function(C,T,h,p,f,l){var a,c,s,u=8*l-f-1,i=(1<<u)-1,n=i>>1,t=f===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=p?0:l-1,v=p?1:-1,b=T<0||T===0&&1/T<0?1:0;for(T=Math.abs(T),isNaN(T)||T===1/0?(c=isNaN(T)?1:0,a=i):(a=Math.floor(Math.log(T)/Math.LN2),T*(s=Math.pow(2,-a))<1&&(a--,s*=2),T+=a+n>=1?t/s:t*Math.pow(2,1-n),T*s>=2&&(a++,s/=2),a+n>=i?(c=0,a=i):a+n>=1?(c=(T*s-1)*Math.pow(2,f),a+=n):(c=T*Math.pow(2,n-1)*Math.pow(2,f),a=0));f>=8;C[h+d]=255&c,d+=v,c/=256,f-=8);for(a=a<<f|c,u+=f;u>0;C[h+d]=255&a,d+=v,a/=256,u-=8);C[h+d-v]|=128*b}},{}],162:[function(w,P,S){typeof Object.create=="function"?P.exports=function(C,T){C.super_=T,C.prototype=Object.create(T.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}})}:P.exports=function(C,T){C.super_=T;var h=function(){};h.prototype=T.prototype,C.prototype=new h,C.prototype.constructor=C}},{}],163:[function(w,P,S){function C(h){return!!h.constructor&&typeof h.constructor.isBuffer=="function"&&h.constructor.isBuffer(h)}function T(h){return typeof h.readFloatLE=="function"&&typeof h.slice=="function"&&C(h.slice(0,0))}P.exports=function(h){return h!=null&&(C(h)||T(h)||!!h._isBuffer)}},{}],164:[function(w,P,S){!function(C){function T(f){return p.call(f).replace(/^[^{]*{\s*/,"").replace(/\s*}[^}]*$/,"")}function h(f){return typeof f=="function"&&(/^class(\s|\{\}$)/.test(p.call(f))||/^.*classCallCheck\(/.test(T(f)))}var p=Function.prototype.toString;S!==void 0?(P!==void 0&&P.exports&&(S=P.exports=h),S.isClass=h):typeof U=="function"&&U.amd?U([],function(){return h}):C.isClass=h}(this)},{}],165:[function(w,P,S){"use strict";function C(l){var a=l.slice(2);return a=a[0].toLowerCase()+a.slice(1)}var T=w("core-util-is"),h=w("isstream"),p=w("is-class");Object.keys(T).map(function(l){S[C(l)]=T[l]}),S.stream=h,S.readableStream=h.isReadable,S.writableStream=h.isWritable,S.duplexStream=h.isDuplex,S.class=p,S.finite=function(l){return Number.isFinite(l)},S.NaN=function(l){return Number.isNaN(l)},S.generator=function(l){return l&&typeof l.next=="function"&&typeof l.throw=="function"},S.generatorFunction=function(l){return l&&l.constructor&&l.constructor.name==="GeneratorFunction"},S.asyncFunction=function(l){return l&&l.constructor&&l.constructor.name==="AsyncFunction"},S.promise=function(l){return l&&typeof l.then=="function"};var f=Math.pow(2,31);S.int=function(l){return T.isNumber(l)&&l%1==0},S.int32=function(l){return S.int(l)&&l<f&&l>=-f},S.long=function(l){return S.int(l)&&(l>=f||l<-f)},S.Long=function(l){return S.object(l)&&S.number(l.high)&&S.number(l.low)},S.double=function(l){return T.isNumber(l)&&!isNaN(l)&&l%1!=0},S.date=function(l){return l instanceof Date},S.regExp=function(l){return l instanceof RegExp},S.regexp=S.regExp,S.error=function(l){return l instanceof Error},S.array=function(l){return Array.isArray(l)}},{"core-util-is":153,"is-class":164,isstream:167}],166:[function(w,P,S){var C={}.toString;P.exports=Array.isArray||function(T){return C.call(T)=="[object Array]"}},{}],167:[function(w,P,S){function C(l){return l instanceof f.Stream}function T(l){return C(l)&&typeof l._read=="function"&&typeof l._readableState=="object"}function h(l){return C(l)&&typeof l._write=="function"&&typeof l._writableState=="object"}function p(l){return T(l)&&h(l)}var f=w("stream");P.exports=C,P.exports.isReadable=T,P.exports.isWritable=h,P.exports.isDuplex=p},{stream:195}],168:[function(w,P,S){"use strict";function C(h,p,f){if(!h)throw new TypeError("argument dest is required");if(!p)throw new TypeError("argument src is required");return f===void 0&&(f=!0),Object.getOwnPropertyNames(p).forEach(function(l){if(f||!T.call(h,l)){var a=Object.getOwnPropertyDescriptor(p,l);Object.defineProperty(h,l,a)}}),h}P.exports=C;var T=Object.prototype.hasOwnProperty},{}],169:[function(w,P,S){function C(u){if(u=String(u),!(u.length>100)){var i=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(u);if(i){var n=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return n*s;case"days":case"day":case"d":return n*c;case"hours":case"hour":case"hrs":case"hr":case"h":return n*a;case"minutes":case"minute":case"mins":case"min":case"m":return n*l;case"seconds":case"second":case"secs":case"sec":case"s":return n*f;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function T(u){return u>=c?Math.round(u/c)+"d":u>=a?Math.round(u/a)+"h":u>=l?Math.round(u/l)+"m":u>=f?Math.round(u/f)+"s":u+"ms"}function h(u){return p(u,c,"day")||p(u,a,"hour")||p(u,l,"minute")||p(u,f,"second")||u+" ms"}function p(u,i,n){if(!(u<i))return u<1.5*i?Math.floor(u/i)+" "+n:Math.ceil(u/i)+" "+n+"s"}var f=1e3,l=60*f,a=60*l,c=24*a,s=365.25*c;P.exports=function(u,i){i=i||{};var n=typeof u;if(n==="string"&&u.length>0)return C(u);if(n==="number"&&isNaN(u)===!1)return i.long?h(u):T(u);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(u))}},{}],170:[function(w,P,S){(function(C){function T(l,a){for(var c=0,s=l.length-1;s>=0;s--){var u=l[s];u==="."?l.splice(s,1):u===".."?(l.splice(s,1),c++):c&&(l.splice(s,1),c--)}if(a)for(;c--;c)l.unshift("..");return l}function h(l){typeof l!="string"&&(l+="");var a,c=0,s=-1,u=!0;for(a=l.length-1;a>=0;--a)if(l.charCodeAt(a)===47){if(!u){c=a+1;break}}else s===-1&&(u=!1,s=a+1);return s===-1?"":l.slice(c,s)}function p(l,a){if(l.filter)return l.filter(a);for(var c=[],s=0;s<l.length;s++)a(l[s],s,l)&&c.push(l[s]);return c}S.resolve=function(){for(var l="",a=!1,c=arguments.length-1;c>=-1&&!a;c--){var s=c>=0?arguments[c]:C.cwd();if(typeof s!="string")throw new TypeError("Arguments to path.resolve must be strings");s&&(l=s+"/"+l,a=s.charAt(0)==="/")}return l=T(p(l.split("/"),function(u){return!!u}),!a).join("/"),(a?"/":"")+l||"."},S.normalize=function(l){var a=S.isAbsolute(l),c=f(l,-1)==="/";return l=T(p(l.split("/"),function(s){return!!s}),!a).join("/"),l||a||(l="."),l&&c&&(l+="/"),(a?"/":"")+l},S.isAbsolute=function(l){return l.charAt(0)==="/"},S.join=function(){var l=Array.prototype.slice.call(arguments,0);return S.normalize(p(l,function(a,c){if(typeof a!="string")throw new TypeError("Arguments to path.join must be strings");return a}).join("/"))},S.relative=function(l,a){function c(v){for(var b=0;b<v.length&&v[b]==="";b++);for(var y=v.length-1;y>=0&&v[y]==="";y--);return b>y?[]:v.slice(b,y-b+1)}l=S.resolve(l).substr(1),a=S.resolve(a).substr(1);for(var s=c(l.split("/")),u=c(a.split("/")),i=Math.min(s.length,u.length),n=i,t=0;t<i;t++)if(s[t]!==u[t]){n=t;break}for(var d=[],t=n;t<s.length;t++)d.push("..");return d=d.concat(u.slice(n)),d.join("/")},S.sep="/",S.delimiter=":",S.dirname=function(l){if(typeof l!="string"&&(l+=""),l.length===0)return".";for(var a=l.charCodeAt(0),c=a===47,s=-1,u=!0,i=l.length-1;i>=1;--i)if((a=l.charCodeAt(i))===47){if(!u){s=i;break}}else u=!1;return s===-1?c?"/":".":c&&s===1?"/":l.slice(0,s)},S.basename=function(l,a){var c=h(l);return a&&c.substr(-1*a.length)===a&&(c=c.substr(0,c.length-a.length)),c},S.extname=function(l){typeof l!="string"&&(l+="");for(var a=-1,c=0,s=-1,u=!0,i=0,n=l.length-1;n>=0;--n){var t=l.charCodeAt(n);if(t!==47)s===-1&&(u=!1,s=n+1),t===46?a===-1?a=n:i!==1&&(i=1):a!==-1&&(i=-1);else if(!u){c=n+1;break}}return a===-1||s===-1||i===0||i===1&&a===s-1&&a===c+1?"":l.slice(a,s)};var f="ab".substr(-1)==="b"?function(l,a,c){return l.substr(a,c)}:function(l,a,c){return a<0&&(a=l.length+a),l.substr(a,c)}}).call(this,w("_process"))},{_process:173}],171:[function(w,P,S){(function(C){(function(){"use strict";function T(A){return A=String(A),A.charAt(0).toUpperCase()+A.slice(1)}function h(A,O,D){var I={"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 O&&D&&/^Win/i.test(A)&&!/^Windows Phone /i.test(A)&&(I=I[/[\d.]+$/.exec(A)])&&(A="Windows "+I),A=String(A),O&&D&&(A=A.replace(RegExp(O,"i"),D)),A=f(A.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])}function p(A,O){var D=-1,I=A?A.length:0;if(typeof I=="number"&&I>-1&&I<=_)for(;++D<I;)O(A[D],D,A);else l(A,O)}function f(A){return A=i(A),/^(?:webOS|i(?:OS|P))/.test(A)?A:T(A)}function l(A,O){for(var D in A)E.call(A,D)&&O(A[D],D,A)}function a(A){return A==null?T(A):o.call(A).slice(8,-1)}function c(A,O){var D=A!=null?typeof A[O]:"number";return!(/^(?:boolean|number|string|undefined)$/.test(D)||D=="object"&&!A[O])}function s(A){return String(A).replace(/([ -])(?!$)/g,"$1?")}function u(A,O){var D=null;return p(A,function(I,F){D=O(D,I,F,A)}),D}function i(A){return String(A).replace(/^ +| +$/g,"")}function n(A){function O($){return u($,function(V,Y){var me=Y.pattern||s(Y);return!V&&(V=RegExp("\\b"+me+" *\\d+[.\\w_]*","i").exec(A)||RegExp("\\b"+me+" *\\w+-[\\w]*","i").exec(A)||RegExp("\\b"+me+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(A))&&((V=String(Y.label&&!RegExp(me,"i").test(Y.label)?Y.label:V).split("/"))[1]&&!/[\d.]+/.test(V[0])&&(V[0]+=" "+V[1]),Y=Y.label||Y,V=f(V[0].replace(RegExp(me,"i"),Y).replace(RegExp("; *(?:"+Y+"[_-])?","i")," ").replace(RegExp("("+Y+")[-_.]?(\\w)","i"),"$1 $2"))),V})}function D(){return this.description||""}var I=d,F=A&&typeof A=="object"&&a(A)!="String";F&&(I=A,A=null);var z=I.navigator||{},ne=z.userAgent||"";A||(A=ne);var j,G,X=F?!!z.likeChrome:/\bChrome\b/.test(A)&&!/internal|\n/i.test(o.toString()),Z=F?"Object":"ScriptBridgingProxyObject",K=F?"Object":"Environment",q=F&&I.java?"JavaPackage":a(I.java),ie=F?"Object":"RuntimeObject",oe=/\bJava/.test(q)&&I.java,ye=oe&&a(I.environment)==K,pe=oe?"a":"\u4F2A",we=oe?"b":"\u5C3E",fe=I.document||{},Te=I.operamini||I.opera,Fe=m.test(Fe=F&&Te?Te["[[Class]]"]:a(Te))?Fe:Te=null,De=A,Me=[],Ue=null,ve=A==ne,ce=ve&&Te&&typeof Te.version=="function"&&Te.version(),Ie=function($){return u($,function(V,Y){return V||RegExp("\\b"+(Y.pattern||s(Y))+"\\b","i").exec(A)&&(Y.label||Y)})}([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),Ne=function($){return u($,function(V,Y){return V||RegExp("\\b"+(Y.pattern||s(Y))+"\\b","i").exec(A)&&(Y.label||Y)})}(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"Edge"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Waterfox","WebPositive","Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chrome",{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),Xe=O([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),ee=function($){return u($,function(V,Y,me){return V||(Y[Xe]||Y[/^[a-z]+(?: +[a-z]+\b)*/i.exec(Xe)]||RegExp("\\b"+s(me)+"(?:\\b|\\w*\\d)","i").exec(A))&&me})}({Apple:{iPad:1,iPhone:1,iPod:1},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1}}),k=function($){return u($,function(V,Y){var me=Y.pattern||s(Y);return!V&&(V=RegExp("\\b"+me+"(?:/[\\d.]+|[ \\w.]*)","i").exec(A))&&(V=h(V,me,Y.label||Y)),V})}(["Windows Phone","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian","Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);if(Ie&&(Ie=[Ie]),ee&&!Xe&&(Xe=O([ee])),(j=/\bGoogle TV\b/.exec(Xe))&&(Xe=j[0]),/\bSimulator\b/i.test(A)&&(Xe=(Xe?Xe+" ":"")+"Simulator"),Ne=="Opera Mini"&&/\bOPiOS\b/.test(A)&&Me.push("running in Turbo/Uncompressed mode"),Ne=="IE"&&/\blike iPhone OS\b/.test(A)?(j=n(A.replace(/like iPhone OS/,"")),ee=j.manufacturer,Xe=j.product):/^iP/.test(Xe)?(Ne||(Ne="Safari"),k="iOS"+((j=/ OS ([\d_]+)/i.exec(A))?" "+j[1].replace(/_/g,"."):"")):Ne!="Konqueror"||/buntu/i.test(k)?ee&&ee!="Google"&&(/Chrome/.test(Ne)&&!/\bMobile Safari\b/i.test(A)||/\bVita\b/.test(Xe))||/\bAndroid\b/.test(k)&&/^Chrome/.test(Ne)&&/\bVersion\//i.test(A)?(Ne="Android Browser",k=/\bAndroid\b/.test(k)?k:"Android"):Ne=="Silk"?(/\bMobi/i.test(A)||(k="Android",Me.unshift("desktop mode")),/Accelerated *= *true/i.test(A)&&Me.unshift("accelerated")):Ne=="PaleMoon"&&(j=/\bFirefox\/([\d.]+)\b/.exec(A))?Me.push("identifying as Firefox "+j[1]):Ne=="Firefox"&&(j=/\b(Mobile|Tablet|TV)\b/i.exec(A))?(k||(k="Firefox OS"),Xe||(Xe=j[1])):!Ne||(j=!/\bMinefield\b/i.test(A)&&/\b(?:Firefox|Safari)\b/.exec(Ne))?(Ne&&!Xe&&/[\/,]|^[^(]+?\)/.test(A.slice(A.indexOf(j+"/")+8))&&(Ne=null),(j=Xe||ee||k)&&(Xe||ee||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(k))&&(Ne=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(k)?k:j)+" Browser")):Ne=="Electron"&&(j=(/\bChrome\/([\d.]+)\b/.exec(A)||0)[1])&&Me.push("Chromium "+j):k="Kubuntu",ce||(ce=function($){return u($,function(V,Y){return V||(RegExp(Y+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(A)||0)[1]||null})}(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",s(Ne),"(?:Firefox|Minefield|NetFront)"])),(j=Ie=="iCab"&&parseFloat(ce)>3&&"WebKit"||/\bOpera\b/.test(Ne)&&(/\bOPR\b/.test(A)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(A)&&!/^(?:Trident|EdgeHTML)$/.test(Ie)&&"WebKit"||!Ie&&/\bMSIE\b/i.test(A)&&(k=="Mac OS"?"Tasman":"Trident")||Ie=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(Ne)&&"NetFront")&&(Ie=[j]),Ne=="IE"&&(j=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(A)||0)[1])?(Ne+=" Mobile",k="Windows Phone "+(/\+$/.test(j)?j:j+".x"),Me.unshift("desktop mode")):/\bWPDesktop\b/i.test(A)?(Ne="IE Mobile",k="Windows Phone 8.x",Me.unshift("desktop mode"),ce||(ce=(/\brv:([\d.]+)/.exec(A)||0)[1])):Ne!="IE"&&Ie=="Trident"&&(j=/\brv:([\d.]+)/.exec(A))&&(Ne&&Me.push("identifying as "+Ne+(ce?" "+ce:"")),Ne="IE",ce=j[1]),ve){if(c(I,"global"))if(oe&&(j=oe.lang.System,De=j.getProperty("os.arch"),k=k||j.getProperty("os.name")+" "+j.getProperty("os.version")),ye){try{ce=I.require("ringo/engine").version.join("."),Ne="RingoJS"}catch($){(j=I.system)&&j.global.system==I.system&&(Ne="Narwhal",k||(k=j[0].os||null))}Ne||(Ne="Rhino")}else typeof I.process=="object"&&!I.process.browser&&(j=I.process)&&(typeof j.versions=="object"&&(typeof j.versions.electron=="string"?(Me.push("Node "+j.versions.node),Ne="Electron",ce=j.versions.electron):typeof j.versions.nw=="string"&&(Me.push("Chromium "+ce,"Node "+j.versions.node),Ne="NW.js",ce=j.versions.nw)),Ne||(Ne="Node.js",De=j.arch,k=j.platform,ce=/[\d.]+/.exec(j.version),ce=ce?ce[0]:null));else a(j=I.runtime)==Z?(Ne="Adobe AIR",k=j.flash.system.Capabilities.os):a(j=I.phantom)==ie?(Ne="PhantomJS",ce=(j=j.version||null)&&j.major+"."+j.minor+"."+j.patch):typeof fe.documentMode=="number"&&(j=/\bTrident\/(\d+)/i.exec(A))?(ce=[ce,fe.documentMode],(j=+j[1]+4)!=ce[1]&&(Me.push("IE "+ce[1]+" mode"),Ie&&(Ie[1]=""),ce[1]=j),ce=Ne=="IE"?String(ce[1].toFixed(1)):ce[0]):typeof fe.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(Ne)&&(Me.push("masking as "+Ne+" "+ce),Ne="IE",ce="11.0",Ie=["Trident"],k="Windows");k=k&&f(k)}if(ce&&(j=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(ce)||/(?:alpha|beta)(?: ?\d)?/i.exec(A+";"+(ve&&z.appMinorVersion))||/\bMinefield\b/i.test(A)&&"a")&&(Ue=/b/i.test(j)?"beta":"alpha",ce=ce.replace(RegExp(j+"\\+?$"),"")+(Ue=="beta"?we:pe)+(/\d+\+?/.exec(j)||"")),Ne=="Fennec"||Ne=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(k))Ne="Firefox Mobile";else if(Ne=="Maxthon"&&ce)ce=ce.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Xe))Xe=="Xbox 360"&&(k=null),Xe=="Xbox 360"&&/\bIEMobile\b/.test(A)&&Me.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(Ne)&&(!Ne||Xe||/Browser|Mobi/.test(Ne))||k!="Windows CE"&&!/Mobi/i.test(A))if(Ne=="IE"&&ve)try{I.external===null&&Me.unshift("platform preview")}catch($){Me.unshift("embedded")}else(/\bBlackBerry\b/.test(Xe)||/\bBB10\b/.test(A))&&(j=(RegExp(Xe.replace(/ +/g," *")+"/([.\\d]+)","i").exec(A)||0)[1]||ce)?(j=[j,/BB10/.test(A)],k=(j[1]?(Xe=null,ee="BlackBerry"):"Device Software")+" "+j[0],ce=null):this!=l&&Xe!="Wii"&&(ve&&Te||/Opera/.test(Ne)&&/\b(?:MSIE|Firefox)\b/i.test(A)||Ne=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(k)||Ne=="IE"&&(k&&!/^Win/.test(k)&&ce>5.5||/\bWindows XP\b/.test(k)&&ce>8||ce==8&&!/\bTrident\b/.test(A)))&&!m.test(j=n.call(l,A.replace(m,"")+";"))&&j.name&&(j="ing as "+j.name+((j=j.version)?" "+j:""),m.test(Ne)?(/\bIE\b/.test(j)&&k=="Mac OS"&&(k=null),j="identify"+j):(j="mask"+j,Ne=Fe?f(Fe.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(j)&&(k=null),ve||(ce=null)),Ie=["Presto"],Me.push(j));else Ne+=" Mobile";(j=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(A)||0)[1])&&(j=[parseFloat(j.replace(/\.(\d)$/,".0$1")),j],Ne=="Safari"&&j[1].slice(-1)=="+"?(Ne="WebKit Nightly",Ue="alpha",ce=j[1].slice(0,-1)):ce!=j[1]&&ce!=(j[2]=(/\bSafari\/([\d.]+\+?)/i.exec(A)||0)[1])||(ce=null),j[1]=(/\bChrome\/([\d.]+)/i.exec(A)||0)[1],j[0]==537.36&&j[2]==537.36&&parseFloat(j[1])>=28&&Ie=="WebKit"&&(Ie=["Blink"]),ve&&(X||j[1])?(Ie&&(Ie[1]="like Chrome"),j=j[1]||(j=j[0],j<530?1:j<532?2:j<532.05?3:j<533?4:j<534.03?5:j<534.07?6:j<534.1?7:j<534.13?8:j<534.16?9:j<534.24?10:j<534.3?11:j<535.01?12:j<535.02?"13+":j<535.07?15:j<535.11?16:j<535.19?17:j<536.05?18:j<536.1?19:j<537.01?20:j<537.11?"21+":j<537.13?23:j<537.18?24:j<537.24?25:j<537.36?26:Ie!="Blink"?"27":"28")):(Ie&&(Ie[1]="like Safari"),j=j[0],j=j<400?1:j<500?2:j<526?3:j<533?4:j<534?"4+":j<535?5:j<537?6:j<538?7:j<601?8:"8"),Ie&&(Ie[1]+=" "+(j+=typeof j=="number"?".x":/[.+]/.test(j)?"":"+")),Ne=="Safari"&&(!ce||parseInt(ce)>45)&&(ce=j)),Ne=="Opera"&&(j=/\bzbov|zvav$/.exec(k))?(Ne+=" ",Me.unshift("desktop mode"),j=="zvav"?(Ne+="Mini",ce=null):Ne+="Mobile",k=k.replace(RegExp(" *"+j+"$"),"")):Ne=="Safari"&&/\bChrome\b/.exec(Ie&&Ie[1])&&(Me.unshift("desktop mode"),Ne="Chrome Mobile",ce=null,/\bOS X\b/.test(k)?(ee="Apple",k="iOS 4.3+"):k=null),ce&&ce.indexOf(j=/[\d.]+$/.exec(k))==0&&A.indexOf("/"+j+"-")>-1&&(k=i(k.replace(j,""))),Ie&&!/\b(?:Avant|Nook)\b/.test(Ne)&&(/Browser|Lunascape|Maxthon/.test(Ne)||Ne!="Safari"&&/^iOS/.test(k)&&/\bSafari\b/.test(Ie[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(Ne)&&Ie[1])&&(j=Ie[Ie.length-1])&&Me.push(j),Me.length&&(Me=["("+Me.join("; ")+")"]),ee&&Xe&&Xe.indexOf(ee)<0&&Me.push("on "+ee),Xe&&Me.push((/^on /.test(Me[Me.length-1])?"":"on ")+Xe),k&&(j=/ ([\d.+]+)$/.exec(k),G=j&&k.charAt(k.length-j[0].length-1)=="/",k={architecture:32,family:j&&!G?k.replace(j[0],""):k,version:j?j[1]:null,toString:function(){var $=this.version;return this.family+($&&!G?" "+$:"")+(this.architecture==64?" 64-bit":"")}}),(j=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(De))&&!/\bi686\b/i.test(De)?(k&&(k.architecture=64,k.family=k.family.replace(RegExp(" *"+j),"")),Ne&&(/\bWOW64\b/i.test(A)||ve&&/\w(?:86|32)$/.test(z.cpuClass||z.platform)&&!/\bWin64; x64\b/i.test(A))&&Me.unshift("32-bit")):k&&/^OS X/.test(k.family)&&Ne=="Chrome"&&parseFloat(ce)>=39&&(k.architecture=64),A||(A=null);var N={};return N.description=A,N.layout=Ie&&Ie[0],N.manufacturer=ee,N.name=Ne,N.prerelease=Ue,N.product=Xe,N.ua=A,N.version=Ne&&ce,N.os=k||{architecture:null,family:null,version:null,toString:function(){return"null"}},N.parse=n,N.toString=D,N.version&&Me.unshift(ce),N.name&&Me.unshift(Ne),k&&Ne&&(k!=String(k).split(" ")[0]||k!=Ne.split(" ")[0]&&!Xe)&&Me.push(Xe?"("+k+")":"on "+k),Me.length&&(N.description=Me.join(" ")),N}var t={function:!0,object:!0},d=t[typeof window]&&window||this,v=t[typeof S]&&S,b=t[typeof P]&&P&&!P.nodeType&&P,y=v&&b&&typeof C=="object"&&C;!y||y.global!==y&&y.window!==y&&y.self!==y||(d=y);var _=Math.pow(2,53)-1,m=/\bOpera/,g=Object.prototype,E=g.hasOwnProperty,o=g.toString,x=n();typeof U=="function"&&typeof U.amd=="object"&&U.amd?(d.platform=x,U(function(){return x})):v&&b?l(x,function(A,O){v[O]=A}):d.platform=x}).call(this)}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],172:[function(w,P,S){(function(C){"use strict";function T(h,p,f,l){if(typeof h!="function")throw new TypeError('"callback" argument must be a function');var a,c,s=arguments.length;switch(s){case 0:case 1:return C.nextTick(h);case 2:return C.nextTick(function(){h.call(null,p)});case 3:return C.nextTick(function(){h.call(null,p,f)});case 4:return C.nextTick(function(){h.call(null,p,f,l)});default:for(a=new Array(s-1),c=0;c<a.length;)a[c++]=arguments[c];return C.nextTick(function(){h.apply(null,a)})}}!C.version||C.version.indexOf("v0.")===0||C.version.indexOf("v1.")===0&&C.version.indexOf("v1.8.")!==0?P.exports={nextTick:T}:P.exports=C}).call(this,w("_process"))},{_process:173}],173:[function(w,P,S){function C(){throw new Error("setTimeout has not been defined")}function T(){throw new Error("clearTimeout has not been defined")}function h(b){if(s===setTimeout)return setTimeout(b,0);if((s===C||!s)&&setTimeout)return s=setTimeout,setTimeout(b,0);try{return s(b,0)}catch(y){try{return s.call(null,b,0)}catch(_){return s.call(this,b,0)}}}function p(b){if(u===clearTimeout)return clearTimeout(b);if((u===T||!u)&&clearTimeout)return u=clearTimeout,clearTimeout(b);try{return u(b)}catch(y){try{return u.call(null,b)}catch(_){return u.call(this,b)}}}function f(){d&&n&&(d=!1,n.length?t=n.concat(t):v=-1,t.length&&l())}function l(){if(!d){var b=h(f);d=!0;for(var y=t.length;y;){for(n=t,t=[];++v<y;)n&&n[v].run();v=-1,y=t.length}n=null,d=!1,p(b)}}function a(b,y){this.fun=b,this.array=y}function c(){}var s,u,i=P.exports={};!function(){try{s=typeof setTimeout=="function"?setTimeout:C}catch(b){s=C}try{u=typeof clearTimeout=="function"?clearTimeout:T}catch(b){u=T}}();var n,t=[],d=!1,v=-1;i.nextTick=function(b){var y=new Array(arguments.length-1);if(arguments.length>1)for(var _=1;_<arguments.length;_++)y[_-1]=arguments[_];t.push(new a(b,y)),t.length!==1||d||h(l)},a.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=c,i.addListener=c,i.once=c,i.off=c,i.removeListener=c,i.removeAllListeners=c,i.emit=c,i.prependListener=c,i.prependOnceListener=c,i.listeners=function(b){return[]},i.binding=function(b){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(b){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],174:[function(w,P,S){(function(C){!function(T){function h(q){throw new RangeError(G[q])}function p(q,ie){for(var oe=q.length,ye=[];oe--;)ye[oe]=ie(q[oe]);return ye}function f(q,ie){var oe=q.split("@"),ye="";return oe.length>1&&(ye=oe[0]+"@",q=oe[1]),q=q.replace(j,"."),ye+p(q.split("."),ie).join(".")}function l(q){for(var ie,oe,ye=[],pe=0,we=q.length;pe<we;)ie=q.charCodeAt(pe++),ie>=55296&&ie<=56319&&pe<we?(oe=q.charCodeAt(pe++),(64512&oe)==56320?ye.push(((1023&ie)<<10)+(1023&oe)+65536):(ye.push(ie),pe--)):ye.push(ie);return ye}function a(q){return p(q,function(ie){var oe="";return ie>65535&&(ie-=65536,oe+=K(ie>>>10&1023|55296),ie=56320|1023&ie),oe+=K(ie)}).join("")}function c(q){return q-48<10?q-22:q-65<26?q-65:q-97<26?q-97:E}function s(q,ie){return q+22+75*(q<26)-((ie!=0)<<5)}function u(q,ie,oe){var ye=0;for(q=oe?Z(q/O):q>>1,q+=Z(q/ie);q>X*x>>1;ye+=E)q=Z(q/X);return Z(ye+(X+1)*q/(q+A))}function i(q){var ie,oe,ye,pe,we,fe,Te,Fe,De,Me,Ue=[],ve=q.length,ce=0,Ie=I,Ne=D;for(oe=q.lastIndexOf(F),oe<0&&(oe=0),ye=0;ye<oe;++ye)q.charCodeAt(ye)>=128&&h("not-basic"),Ue.push(q.charCodeAt(ye));for(pe=oe>0?oe+1:0;pe<ve;){for(we=ce,fe=1,Te=E;pe>=ve&&h("invalid-input"),Fe=c(q.charCodeAt(pe++)),(Fe>=E||Fe>Z((g-ce)/fe))&&h("overflow"),ce+=Fe*fe,De=Te<=Ne?o:Te>=Ne+x?x:Te-Ne,!(Fe<De);Te+=E)Me=E-De,fe>Z(g/Me)&&h("overflow"),fe*=Me;ie=Ue.length+1,Ne=u(ce-we,ie,we==0),Z(ce/ie)>g-Ie&&h("overflow"),Ie+=Z(ce/ie),ce%=ie,Ue.splice(ce++,0,Ie)}return a(Ue)}function n(q){var ie,oe,ye,pe,we,fe,Te,Fe,De,Me,Ue,ve,ce,Ie,Ne,Xe=[];for(q=l(q),ve=q.length,ie=I,oe=0,we=D,fe=0;fe<ve;++fe)(Ue=q[fe])<128&&Xe.push(K(Ue));for(ye=pe=Xe.length,pe&&Xe.push(F);ye<ve;){for(Te=g,fe=0;fe<ve;++fe)(Ue=q[fe])>=ie&&Ue<Te&&(Te=Ue);for(ce=ye+1,Te-ie>Z((g-oe)/ce)&&h("overflow"),oe+=(Te-ie)*ce,ie=Te,fe=0;fe<ve;++fe)if(Ue=q[fe],Ue<ie&&++oe>g&&h("overflow"),Ue==ie){for(Fe=oe,De=E;Me=De<=we?o:De>=we+x?x:De-we,!(Fe<Me);De+=E)Ne=Fe-Me,Ie=E-Me,Xe.push(K(s(Me+Ne%Ie,0))),Fe=Z(Ne/Ie);Xe.push(K(s(Fe,0))),we=u(oe,ce,ye==pe),oe=0,++ye}++oe,++ie}return Xe.join("")}function t(q){return f(q,function(ie){return z.test(ie)?i(ie.slice(4).toLowerCase()):ie})}function d(q){return f(q,function(ie){return ne.test(ie)?"xn--"+n(ie):ie})}var v=typeof S=="object"&&S&&!S.nodeType&&S,b=typeof P=="object"&&P&&!P.nodeType&&P,y=typeof C=="object"&&C;y.global!==y&&y.window!==y&&y.self!==y||(T=y);var _,m,g=2147483647,E=36,o=1,x=26,A=38,O=700,D=72,I=128,F="-",z=/^xn--/,ne=/[^\x20-\x7E]/,j=/[\x2E\u3002\uFF0E\uFF61]/g,G={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},X=E-o,Z=Math.floor,K=String.fromCharCode;if(_={version:"1.4.1",ucs2:{decode:l,encode:a},decode:i,encode:n,toASCII:d,toUnicode:t},typeof U=="function"&&typeof U.amd=="object"&&U.amd)U("punycode",function(){return _});else if(v&&b)if(P.exports==v)b.exports=_;else for(m in _)_.hasOwnProperty(m)&&(v[m]=_[m]);else T.punycode=_}(this)}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],175:[function(w,P,S){"use strict";function C(h,p){return Object.prototype.hasOwnProperty.call(h,p)}P.exports=function(h,p,f,l){p=p||"&",f=f||"=";var a={};if(typeof h!="string"||h.length===0)return a;var c=/\+/g;h=h.split(p);var s=1e3;l&&typeof l.maxKeys=="number"&&(s=l.maxKeys);var u=h.length;s>0&&u>s&&(u=s);for(var i=0;i<u;++i){var n,t,d,v,b=h[i].replace(c,"%20"),y=b.indexOf(f);y>=0?(n=b.substr(0,y),t=b.substr(y+1)):(n=b,t=""),d=decodeURIComponent(n),v=decodeURIComponent(t),C(a,d)?T(a[d])?a[d].push(v):a[d]=[a[d],v]:a[d]=v}return a};var T=Array.isArray||function(h){return Object.prototype.toString.call(h)==="[object Array]"}},{}],176:[function(w,P,S){"use strict";function C(f,l){if(f.map)return f.map(l);for(var a=[],c=0;c<f.length;c++)a.push(l(f[c],c));return a}var T=function(f){switch(typeof f){case"string":return f;case"boolean":return f?"true":"false";case"number":return isFinite(f)?f:"";default:return""}};P.exports=function(f,l,a,c){return l=l||"&",a=a||"=",f===null&&(f=void 0),typeof f=="object"?C(p(f),function(s){var u=encodeURIComponent(T(s))+a;return h(f[s])?C(f[s],function(i){return u+encodeURIComponent(T(i))}).join(l):u+encodeURIComponent(T(f[s]))}).join(l):c?encodeURIComponent(T(c))+a+encodeURIComponent(T(f)):""};var h=Array.isArray||function(f){return Object.prototype.toString.call(f)==="[object Array]"},p=Object.keys||function(f){var l=[];for(var a in f)Object.prototype.hasOwnProperty.call(f,a)&&l.push(a);return l}},{}],177:[function(w,P,S){"use strict";S.decode=S.parse=w("./decode"),S.encode=S.stringify=w("./encode")},{"./decode":175,"./encode":176}],178:[function(w,P,S){P.exports=w("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":179}],179:[function(w,P,S){"use strict";function C(d){if(!(this instanceof C))return new C(d);s.call(this,d),u.call(this,d),d&&d.readable===!1&&(this.readable=!1),d&&d.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,d&&d.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",T)}function T(){this.allowHalfOpen||this._writableState.ended||l.nextTick(h,this)}function h(d){d.end()}var p=w("babel-runtime/core-js/object/keys"),f=function(d){return d&&d.__esModule?d:{default:d}}(p),l=w("process-nextick-args"),a=f.default||function(d){var v=[];for(var b in d)v.push(b);return v};P.exports=C;var c=w("core-util-is");c.inherits=w("inherits");var s=w("./_stream_readable"),u=w("./_stream_writable");c.inherits(C,s);for(var i=a(u.prototype),n=0;n<i.length;n++){var t=i[n];C.prototype[t]||(C.prototype[t]=u.prototype[t])}Object.defineProperty(C.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(C.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(d){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=d,this._writableState.destroyed=d)}}),C.prototype._destroy=function(d,v){this.push(null),this.end(),l.nextTick(v,d)}},{"./_stream_readable":181,"./_stream_writable":183,"babel-runtime/core-js/object/keys":23,"core-util-is":153,inherits:162,"process-nextick-args":172}],180:[function(w,P,S){"use strict";function C(p){if(!(this instanceof C))return new C(p);T.call(this,p)}P.exports=C;var T=w("./_stream_transform"),h=w("core-util-is");h.inherits=w("inherits"),h.inherits(C,T),C.prototype._transform=function(p,f,l){l(null,p)}},{"./_stream_transform":182,"core-util-is":153,inherits:162}],181:[function(w,P,S){(function(C,T){"use strict";function h(ve){return oe.from(ve)}function p(ve){return oe.isBuffer(ve)||ve instanceof ye}function f(ve,ce,Ie){if(typeof ve.prependListener=="function")return ve.prependListener(ce,Ie);ve._events&&ve._events[ce]?K(ve._events[ce])?ve._events[ce].unshift(Ie):ve._events[ce]=[Ie,ve._events[ce]]:ve.on(ce,Ie)}function l(ve,ce){Z=Z||w("./_stream_duplex"),ve=ve||{};var Ie=ce instanceof Z;this.objectMode=!!ve.objectMode,Ie&&(this.objectMode=this.objectMode||!!ve.readableObjectMode);var Ne=ve.highWaterMark,Xe=ve.readableHighWaterMark,ee=this.objectMode?16:16384;this.highWaterMark=Ne||Ne===0?Ne:Ie&&(Xe||Xe===0)?Xe:ee,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new Fe,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=ve.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,ve.encoding&&(Te||(Te=w("string_decoder/").StringDecoder),this.decoder=new Te(ve.encoding),this.encoding=ve.encoding)}function a(ve){if(Z=Z||w("./_stream_duplex"),!(this instanceof a))return new a(ve);this._readableState=new l(ve,this),this.readable=!0,ve&&(typeof ve.read=="function"&&(this._read=ve.read),typeof ve.destroy=="function"&&(this._destroy=ve.destroy)),ie.call(this)}function c(ve,ce,Ie,Ne,Xe){var ee=ve._readableState;if(ce===null)ee.reading=!1,d(ve,ee);else{var k;Xe||(k=u(ee,ce)),k?ve.emit("error",k):ee.objectMode||ce&&ce.length>0?(typeof ce=="string"||ee.objectMode||(0,G.default)(ce)===oe.prototype||(ce=h(ce)),Ne?ee.endEmitted?ve.emit("error",new Error("stream.unshift() after end event")):s(ve,ee,ce,!0):ee.ended?ve.emit("error",new Error("stream.push() after EOF")):(ee.reading=!1,ee.decoder&&!Ie?(ce=ee.decoder.write(ce),ee.objectMode||ce.length!==0?s(ve,ee,ce,!1):y(ve,ee)):s(ve,ee,ce,!1))):Ne||(ee.reading=!1)}return i(ee)}function s(ve,ce,Ie,Ne){ce.flowing&&ce.length===0&&!ce.sync?(ve.emit("data",Ie),ve.read(0)):(ce.length+=ce.objectMode?1:Ie.length,Ne?ce.buffer.unshift(Ie):ce.buffer.push(Ie),ce.needReadable&&v(ve)),y(ve,ce)}function u(ve,ce){var Ie;return p(ce)||typeof ce=="string"||ce===void 0||ve.objectMode||(Ie=new TypeError("Invalid non-string/buffer chunk")),Ie}function i(ve){return!ve.ended&&(ve.needReadable||ve.length<ve.highWaterMark||ve.length===0)}function n(ve){return ve>=Ue?ve=Ue:(ve--,ve|=ve>>>1,ve|=ve>>>2,ve|=ve>>>4,ve|=ve>>>8,ve|=ve>>>16,ve++),ve}function t(ve,ce){return ve<=0||ce.length===0&&ce.ended?0:ce.objectMode?1:ve!==ve?ce.flowing&&ce.length?ce.buffer.head.data.length:ce.length:(ve>ce.highWaterMark&&(ce.highWaterMark=n(ve)),ve<=ce.length?ve:ce.ended?ce.length:(ce.needReadable=!0,0))}function d(ve,ce){if(!ce.ended){if(ce.decoder){var Ie=ce.decoder.end();Ie&&Ie.length&&(ce.buffer.push(Ie),ce.length+=ce.objectMode?1:Ie.length)}ce.ended=!0,v(ve)}}function v(ve){var ce=ve._readableState;ce.needReadable=!1,ce.emittedReadable||(fe("emitReadable",ce.flowing),ce.emittedReadable=!0,ce.sync?X.nextTick(b,ve):b(ve))}function b(ve){fe("emit readable"),ve.emit("readable"),x(ve)}function y(ve,ce){ce.readingMore||(ce.readingMore=!0,X.nextTick(_,ve,ce))}function _(ve,ce){for(var Ie=ce.length;!ce.reading&&!ce.flowing&&!ce.ended&&ce.length<ce.highWaterMark&&(fe("maybeReadMore read 0"),ve.read(0),Ie!==ce.length);)Ie=ce.length;ce.readingMore=!1}function m(ve){return function(){var ce=ve._readableState;fe("pipeOnDrain",ce.awaitDrain),ce.awaitDrain&&ce.awaitDrain--,ce.awaitDrain===0&&q(ve,"data")&&(ce.flowing=!0,x(ve))}}function g(ve){fe("readable nexttick read 0"),ve.read(0)}function E(ve,ce){ce.resumeScheduled||(ce.resumeScheduled=!0,X.nextTick(o,ve,ce))}function o(ve,ce){ce.reading||(fe("resume read 0"),ve.read(0)),ce.resumeScheduled=!1,ce.awaitDrain=0,ve.emit("resume"),x(ve),ce.flowing&&!ce.reading&&ve.read(0)}function x(ve){var ce=ve._readableState;for(fe("flow",ce.flowing);ce.flowing&&ve.read()!==null;);}function A(ve,ce){if(ce.length===0)return null;var Ie;return ce.objectMode?Ie=ce.buffer.shift():!ve||ve>=ce.length?(Ie=ce.decoder?ce.buffer.join(""):ce.buffer.length===1?ce.buffer.head.data:ce.buffer.concat(ce.length),ce.buffer.clear()):Ie=O(ve,ce.buffer,ce.decoder),Ie}function O(ve,ce,Ie){var Ne;return ve<ce.head.data.length?(Ne=ce.head.data.slice(0,ve),ce.head.data=ce.head.data.slice(ve)):Ne=ve===ce.head.data.length?ce.shift():Ie?D(ve,ce):I(ve,ce),Ne}function D(ve,ce){var Ie=ce.head,Ne=1,Xe=Ie.data;for(ve-=Xe.length;Ie=Ie.next;){var ee=Ie.data,k=ve>ee.length?ee.length:ve;if(k===ee.length?Xe+=ee:Xe+=ee.slice(0,ve),(ve-=k)===0){k===ee.length?(++Ne,Ie.next?ce.head=Ie.next:ce.head=ce.tail=null):(ce.head=Ie,Ie.data=ee.slice(k));break}++Ne}return ce.length-=Ne,Xe}function I(ve,ce){var Ie=oe.allocUnsafe(ve),Ne=ce.head,Xe=1;for(Ne.data.copy(Ie),ve-=Ne.data.length;Ne=Ne.next;){var ee=Ne.data,k=ve>ee.length?ee.length:ve;if(ee.copy(Ie,Ie.length-ve,0,k),(ve-=k)===0){k===ee.length?(++Xe,Ne.next?ce.head=Ne.next:ce.head=ce.tail=null):(ce.head=Ne,Ne.data=ee.slice(k));break}++Xe}return ce.length-=Xe,Ie}function F(ve){var ce=ve._readableState;if(ce.length>0)throw new Error('"endReadable()" called on non-empty stream');ce.endEmitted||(ce.ended=!0,X.nextTick(z,ce,ve))}function z(ve,ce){ve.endEmitted||ve.length!==0||(ve.endEmitted=!0,ce.readable=!1,ce.emit("end"))}function ne(ve,ce){for(var Ie=0,Ne=ve.length;Ie<Ne;Ie++)if(ve[Ie]===ce)return Ie;return-1}var j=w("babel-runtime/core-js/object/get-prototype-of"),G=function(ve){return ve&&ve.__esModule?ve:{default:ve}}(j),X=w("process-nextick-args");P.exports=a;var Z,K=w("isarray");a.ReadableState=l;var q=(w("events").EventEmitter,function(ve,ce){return ve.listeners(ce).length}),ie=w("./internal/streams/stream"),oe=w("safe-buffer").Buffer,ye=T.Uint8Array||function(){},pe=w("core-util-is");pe.inherits=w("inherits");var we=w("util"),fe=void 0;fe=we&&we.debuglog?we.debuglog("stream"):function(){};var Te,Fe=w("./internal/streams/BufferList"),De=w("./internal/streams/destroy");pe.inherits(a,ie);var Me=["error","close","destroy","pause","resume"];Object.defineProperty(a.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(ve){this._readableState&&(this._readableState.destroyed=ve)}}),a.prototype.destroy=De.destroy,a.prototype._undestroy=De.undestroy,a.prototype._destroy=function(ve,ce){this.push(null),ce(ve)},a.prototype.push=function(ve,ce){var Ie,Ne=this._readableState;return Ne.objectMode?Ie=!0:typeof ve=="string"&&(ce=ce||Ne.defaultEncoding,ce!==Ne.encoding&&(ve=oe.from(ve,ce),ce=""),Ie=!0),c(this,ve,ce,!1,Ie)},a.prototype.unshift=function(ve){return c(this,ve,null,!0,!1)},a.prototype.isPaused=function(){return this._readableState.flowing===!1},a.prototype.setEncoding=function(ve){return Te||(Te=w("string_decoder/").StringDecoder),this._readableState.decoder=new Te(ve),this._readableState.encoding=ve,this};var Ue=8388608;a.prototype.read=function(ve){fe("read",ve),ve=parseInt(ve,10);var ce=this._readableState,Ie=ve;if(ve!==0&&(ce.emittedReadable=!1),ve===0&&ce.needReadable&&(ce.length>=ce.highWaterMark||ce.ended))return fe("read: emitReadable",ce.length,ce.ended),ce.length===0&&ce.ended?F(this):v(this),null;if((ve=t(ve,ce))===0&&ce.ended)return ce.length===0&&F(this),null;var Ne=ce.needReadable;fe("need readable",Ne),(ce.length===0||ce.length-ve<ce.highWaterMark)&&(Ne=!0,fe("length less than watermark",Ne)),ce.ended||ce.reading?(Ne=!1,fe("reading or ended",Ne)):Ne&&(fe("do read"),ce.reading=!0,ce.sync=!0,ce.length===0&&(ce.needReadable=!0),this._read(ce.highWaterMark),ce.sync=!1,ce.reading||(ve=t(Ie,ce)));var Xe;return Xe=ve>0?A(ve,ce):null,Xe===null?(ce.needReadable=!0,ve=0):ce.length-=ve,ce.length===0&&(ce.ended||(ce.needReadable=!0),Ie!==ve&&ce.ended&&F(this)),Xe!==null&&this.emit("data",Xe),Xe},a.prototype._read=function(ve){this.emit("error",new Error("_read() is not implemented"))},a.prototype.pipe=function(ve,ce){function Ie(Ze,Ve){fe("onunpipe"),Ze===Y&&Ve&&Ve.hasUnpiped===!1&&(Ve.hasUnpiped=!0,Xe())}function Ne(){fe("onend"),ve.end()}function Xe(){fe("cleanup"),ve.removeListener("close",N),ve.removeListener("finish",$),ve.removeListener("drain",Le),ve.removeListener("error",k),ve.removeListener("unpipe",Ie),Y.removeListener("end",Ne),Y.removeListener("end",V),Y.removeListener("data",ee),ke=!0,!me.awaitDrain||ve._writableState&&!ve._writableState.needDrain||Le()}function ee(Ze){fe("ondata"),Ye=!1,ve.write(Ze)!==!1||Ye||((me.pipesCount===1&&me.pipes===ve||me.pipesCount>1&&ne(me.pipes,ve)!==-1)&&!ke&&(fe("false write response, pause",Y._readableState.awaitDrain),Y._readableState.awaitDrain++,Ye=!0),Y.pause())}function k(Ze){fe("onerror",Ze),V(),ve.removeListener("error",k),q(ve,"error")===0&&ve.emit("error",Ze)}function N(){ve.removeListener("finish",$),V()}function $(){fe("onfinish"),ve.removeListener("close",N),V()}function V(){fe("unpipe"),Y.unpipe(ve)}var Y=this,me=this._readableState;switch(me.pipesCount){case 0:me.pipes=ve;break;case 1:me.pipes=[me.pipes,ve];break;default:me.pipes.push(ve)}me.pipesCount+=1,fe("pipe count=%d opts=%j",me.pipesCount,ce);var Ae=(!ce||ce.end!==!1)&&ve!==C.stdout&&ve!==C.stderr,at=Ae?Ne:V;me.endEmitted?X.nextTick(at):Y.once("end",at),ve.on("unpipe",Ie);var Le=m(Y);ve.on("drain",Le);var ke=!1,Ye=!1;return Y.on("data",ee),f(ve,"error",k),ve.once("close",N),ve.once("finish",$),ve.emit("pipe",Y),me.flowing||(fe("pipe resume"),Y.resume()),ve},a.prototype.unpipe=function(ve){var ce=this._readableState,Ie={hasUnpiped:!1};if(ce.pipesCount===0)return this;if(ce.pipesCount===1)return ve&&ve!==ce.pipes?this:(ve||(ve=ce.pipes),ce.pipes=null,ce.pipesCount=0,ce.flowing=!1,ve&&ve.emit("unpipe",this,Ie),this);if(!ve){var Ne=ce.pipes,Xe=ce.pipesCount;ce.pipes=null,ce.pipesCount=0,ce.flowing=!1;for(var ee=0;ee<Xe;ee++)Ne[ee].emit("unpipe",this,Ie);return this}var k=ne(ce.pipes,ve);return k===-1?this:(ce.pipes.splice(k,1),ce.pipesCount-=1,ce.pipesCount===1&&(ce.pipes=ce.pipes[0]),ve.emit("unpipe",this,Ie),this)},a.prototype.on=function(ve,ce){var Ie=ie.prototype.on.call(this,ve,ce);if(ve==="data")this._readableState.flowing!==!1&&this.resume();else if(ve==="readable"){var Ne=this._readableState;Ne.endEmitted||Ne.readableListening||(Ne.readableListening=Ne.needReadable=!0,Ne.emittedReadable=!1,Ne.reading?Ne.length&&v(this):X.nextTick(g,this))}return Ie},a.prototype.addListener=a.prototype.on,a.prototype.resume=function(){var ve=this._readableState;return ve.flowing||(fe("resume"),ve.flowing=!0,E(this,ve)),this},a.prototype.pause=function(){return fe("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(fe("pause"),this._readableState.flowing=!1,this.emit("pause")),this},a.prototype.wrap=function(ve){var ce=this,Ie=this._readableState,Ne=!1;ve.on("end",function(){if(fe("wrapped end"),Ie.decoder&&!Ie.ended){var k=Ie.decoder.end();k&&k.length&&ce.push(k)}ce.push(null)}),ve.on("data",function(k){(fe("wrapped data"),Ie.decoder&&(k=Ie.decoder.write(k)),(!Ie.objectMode||k!=null)&&(Ie.objectMode||k&&k.length))&&(ce.push(k)||(Ne=!0,ve.pause()))});for(var Xe in ve)this[Xe]===void 0&&typeof ve[Xe]=="function"&&(this[Xe]=function(k){return function(){return ve[k].apply(ve,arguments)}}(Xe));for(var ee=0;ee<Me.length;ee++)ve.on(Me[ee],this.emit.bind(this,Me[ee]));return this._read=function(k){fe("wrapped _read",k),Ne&&(Ne=!1,ve.resume())},this},Object.defineProperty(a.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),a._fromList=A}).call(this,w("_process"),typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":179,"./internal/streams/BufferList":184,"./internal/streams/destroy":185,"./internal/streams/stream":186,_process:173,"babel-runtime/core-js/object/get-prototype-of":22,"core-util-is":153,events:158,inherits:162,isarray:166,"process-nextick-args":172,"safe-buffer":193,"string_decoder/":200,util:36}],182:[function(w,P,S){"use strict";function C(a,c){var s=this._transformState;s.transforming=!1;var u=s.writecb;if(!u)return this.emit("error",new Error("write callback called multiple times"));s.writechunk=null,s.writecb=null,c!=null&&this.push(c),u(a);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function T(a){if(!(this instanceof T))return new T(a);f.call(this,a),this._transformState={afterTransform:C.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,a&&(typeof a.transform=="function"&&(this._transform=a.transform),typeof a.flush=="function"&&(this._flush=a.flush)),this.on("prefinish",h)}function h(){var a=this;typeof this._flush=="function"?this._flush(function(c,s){p(a,c,s)}):p(this,null,null)}function p(a,c,s){if(c)return a.emit("error",c);if(s!=null&&a.push(s),a._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(a._transformState.transforming)throw new Error("Calling transform done when still transforming");return a.push(null)}P.exports=T;var f=w("./_stream_duplex"),l=w("core-util-is");l.inherits=w("inherits"),l.inherits(T,f),T.prototype.push=function(a,c){return this._transformState.needTransform=!1,f.prototype.push.call(this,a,c)},T.prototype._transform=function(a,c,s){throw new Error("_transform() is not implemented")},T.prototype._write=function(a,c,s){var u=this._transformState;if(u.writecb=s,u.writechunk=a,u.writeencoding=c,!u.transforming){var i=this._readableState;(u.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},T.prototype._read=function(a){var c=this._transformState;c.writechunk!==null&&c.writecb&&!c.transforming?(c.transforming=!0,this._transform(c.writechunk,c.writeencoding,c.afterTransform)):c.needTransform=!0},T.prototype._destroy=function(a,c){var s=this;f.prototype._destroy.call(this,a,function(u){c(u),s.emit("close")})}},{"./_stream_duplex":179,"core-util-is":153,inherits:162}],183:[function(w,P,S){(function(C,T){"use strict";function h(De){return De&&De.__esModule?De:{default:De}}function p(De){var Me=this;this.next=null,this.entry=null,this.finish=function(){D(Me,De)}}function f(De){return we.from(De)}function l(De){return we.isBuffer(De)||De instanceof fe}function a(){}function c(De,Me){q=q||w("./_stream_duplex"),De=De||{};var Ue=Me instanceof q;this.objectMode=!!De.objectMode,Ue&&(this.objectMode=this.objectMode||!!De.writableObjectMode);var ve=De.highWaterMark,ce=De.writableHighWaterMark,Ie=this.objectMode?16:16384;this.highWaterMark=ve||ve===0?ve:Ue&&(ce||ce===0)?ce:Ie,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 Ne=De.decodeStrings===!1;this.decodeStrings=!Ne,this.defaultEncoding=De.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Xe){y(Me,Xe)},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 p(this)}function s(De){if(q=q||w("./_stream_duplex"),!(Fe.call(s,this)||this instanceof q))return new s(De);this._writableState=new c(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)),pe.call(this)}function u(De,Me){var Ue=new Error("write after end");De.emit("error",Ue),K.nextTick(Me,Ue)}function i(De,Me,Ue,ve){var ce=!0,Ie=!1;return Ue===null?Ie=new TypeError("May not write null values to stream"):typeof Ue=="string"||Ue===void 0||Me.objectMode||(Ie=new TypeError("Invalid non-string/buffer chunk")),Ie&&(De.emit("error",Ie),K.nextTick(ve,Ie),ce=!1),ce}function n(De,Me,Ue){return De.objectMode||De.decodeStrings===!1||typeof Me!="string"||(Me=we.from(Me,Ue)),Me}function t(De,Me,Ue,ve,ce,Ie){if(!Ue){var Ne=n(Me,ve,ce);ve!==Ne&&(Ue=!0,ce="buffer",ve=Ne)}var Xe=Me.objectMode?1:ve.length;Me.length+=Xe;var ee=Me.length<Me.highWaterMark;if(ee||(Me.needDrain=!0),Me.writing||Me.corked){var k=Me.lastBufferedRequest;Me.lastBufferedRequest={chunk:ve,encoding:ce,isBuf:Ue,callback:Ie,next:null},k?k.next=Me.lastBufferedRequest:Me.bufferedRequest=Me.lastBufferedRequest,Me.bufferedRequestCount+=1}else d(De,Me,!1,Xe,ve,ce,Ie);return ee}function d(De,Me,Ue,ve,ce,Ie,Ne){Me.writelen=ve,Me.writecb=Ne,Me.writing=!0,Me.sync=!0,Ue?De._writev(ce,Me.onwrite):De._write(ce,Ie,Me.onwrite),Me.sync=!1}function v(De,Me,Ue,ve,ce){--Me.pendingcb,Ue?(K.nextTick(ce,ve),K.nextTick(A,De,Me),De._writableState.errorEmitted=!0,De.emit("error",ve)):(ce(ve),De._writableState.errorEmitted=!0,De.emit("error",ve),A(De,Me))}function b(De){De.writing=!1,De.writecb=null,De.length-=De.writelen,De.writelen=0}function y(De,Me){var Ue=De._writableState,ve=Ue.sync,ce=Ue.writecb;if(b(Ue),Me)v(De,Ue,ve,Me,ce);else{var Ie=E(Ue);Ie||Ue.corked||Ue.bufferProcessing||!Ue.bufferedRequest||g(De,Ue),ve?ie(_,De,Ue,Ie,ce):_(De,Ue,Ie,ce)}}function _(De,Me,Ue,ve){Ue||m(De,Me),Me.pendingcb--,ve(),A(De,Me)}function m(De,Me){Me.length===0&&Me.needDrain&&(Me.needDrain=!1,De.emit("drain"))}function g(De,Me){Me.bufferProcessing=!0;var Ue=Me.bufferedRequest;if(De._writev&&Ue&&Ue.next){var ve=Me.bufferedRequestCount,ce=new Array(ve),Ie=Me.corkedRequestsFree;Ie.entry=Ue;for(var Ne=0,Xe=!0;Ue;)ce[Ne]=Ue,Ue.isBuf||(Xe=!1),Ue=Ue.next,Ne+=1;ce.allBuffers=Xe,d(De,Me,!0,Me.length,ce,"",Ie.finish),Me.pendingcb++,Me.lastBufferedRequest=null,Ie.next?(Me.corkedRequestsFree=Ie.next,Ie.next=null):Me.corkedRequestsFree=new p(Me),Me.bufferedRequestCount=0}else{for(;Ue;){var ee=Ue.chunk,k=Ue.encoding,N=Ue.callback;if(d(De,Me,!1,Me.objectMode?1:ee.length,ee,k,N),Ue=Ue.next,Me.bufferedRequestCount--,Me.writing)break}Ue===null&&(Me.lastBufferedRequest=null)}Me.bufferedRequest=Ue,Me.bufferProcessing=!1}function E(De){return De.ending&&De.length===0&&De.bufferedRequest===null&&!De.finished&&!De.writing}function o(De,Me){De._final(function(Ue){Me.pendingcb--,Ue&&De.emit("error",Ue),Me.prefinished=!0,De.emit("prefinish"),A(De,Me)})}function x(De,Me){Me.prefinished||Me.finalCalled||(typeof De._final=="function"?(Me.pendingcb++,Me.finalCalled=!0,K.nextTick(o,De,Me)):(Me.prefinished=!0,De.emit("prefinish")))}function A(De,Me){var Ue=E(Me);return Ue&&(x(De,Me),Me.pendingcb===0&&(Me.finished=!0,De.emit("finish"))),Ue}function O(De,Me,Ue){Me.ending=!0,A(De,Me),Ue&&(Me.finished?K.nextTick(Ue):De.once("finish",Ue)),Me.ended=!0,De.writable=!1}function D(De,Me,Ue){var ve=De.entry;for(De.entry=null;ve;){var ce=ve.callback;Me.pendingcb--,ce(Ue),ve=ve.next}Me.corkedRequestsFree?Me.corkedRequestsFree.next=De:Me.corkedRequestsFree=De}var I=w("babel-runtime/core-js/object/define-property"),F=h(I),z=w("babel-runtime/core-js/symbol/has-instance"),ne=h(z),j=w("babel-runtime/core-js/symbol"),G=h(j),X=w("babel-runtime/core-js/set-immediate"),Z=h(X),K=w("process-nextick-args");P.exports=s;var q,ie=!C.browser&&["v0.10","v0.9."].indexOf(C.version.slice(0,5))>-1?Z.default:K.nextTick;s.WritableState=c;var oe=w("core-util-is");oe.inherits=w("inherits");var ye={deprecate:w("util-deprecate")},pe=w("./internal/streams/stream"),we=w("safe-buffer").Buffer,fe=T.Uint8Array||function(){},Te=w("./internal/streams/destroy");oe.inherits(s,pe),c.prototype.getBuffer=function(){for(var De=this.bufferedRequest,Me=[];De;)Me.push(De),De=De.next;return Me},function(){try{Object.defineProperty(c.prototype,"buffer",{get:ye.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(De){}}();var Fe;typeof G.default=="function"&&ne.default&&typeof Function.prototype[ne.default]=="function"?(Fe=Function.prototype[ne.default],(0,F.default)(s,ne.default,{value:function(De){return!!Fe.call(this,De)||this===s&&De&&De._writableState instanceof c}})):Fe=function(De){return De instanceof this},s.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},s.prototype.write=function(De,Me,Ue){var ve=this._writableState,ce=!1,Ie=!ve.objectMode&&l(De);return Ie&&!we.isBuffer(De)&&(De=f(De)),typeof Me=="function"&&(Ue=Me,Me=null),Ie?Me="buffer":Me||(Me=ve.defaultEncoding),typeof Ue!="function"&&(Ue=a),ve.ended?u(this,Ue):(Ie||i(this,ve,De,Ue))&&(ve.pendingcb++,ce=t(this,ve,Ie,De,Me,Ue)),ce},s.prototype.cork=function(){this._writableState.corked++},s.prototype.uncork=function(){var De=this._writableState;De.corked&&(De.corked--,De.writing||De.corked||De.finished||De.bufferProcessing||!De.bufferedRequest||g(this,De))},s.prototype.setDefaultEncoding=function(De){if(typeof De=="string"&&(De=De.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((De+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+De);return this._writableState.defaultEncoding=De,this},Object.defineProperty(s.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),s.prototype._write=function(De,Me,Ue){Ue(new Error("_write() is not implemented"))},s.prototype._writev=null,s.prototype.end=function(De,Me,Ue){var ve=this._writableState;typeof De=="function"?(Ue=De,De=null,Me=null):typeof Me=="function"&&(Ue=Me,Me=null),De!=null&&this.write(De,Me),ve.corked&&(ve.corked=1,this.uncork()),ve.ending||ve.finished||O(this,ve,Ue)},Object.defineProperty(s.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(De){this._writableState&&(this._writableState.destroyed=De)}}),s.prototype.destroy=Te.destroy,s.prototype._undestroy=Te.undestroy,s.prototype._destroy=function(De,Me){this.end(),Me(De)}}).call(this,w("_process"),typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":179,"./internal/streams/destroy":185,"./internal/streams/stream":186,_process:173,"babel-runtime/core-js/object/define-property":20,"babel-runtime/core-js/set-immediate":25,"babel-runtime/core-js/symbol":27,"babel-runtime/core-js/symbol/has-instance":28,"core-util-is":153,inherits:162,"process-nextick-args":172,"safe-buffer":193,"util-deprecate":205}],184:[function(w,P,S){"use strict";function C(f,l){if(!(f instanceof l))throw new TypeError("Cannot call a class as a function")}function T(f,l,a){f.copy(l,a)}var h=w("safe-buffer").Buffer,p=w("util");P.exports=function(){function f(){C(this,f),this.head=null,this.tail=null,this.length=0}return f.prototype.push=function(l){var a={data:l,next:null};this.length>0?this.tail.next=a:this.head=a,this.tail=a,++this.length},f.prototype.unshift=function(l){var a={data:l,next:this.head};this.length===0&&(this.tail=a),this.head=a,++this.length},f.prototype.shift=function(){if(this.length!==0){var l=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,l}},f.prototype.clear=function(){this.head=this.tail=null,this.length=0},f.prototype.join=function(l){if(this.length===0)return"";for(var a=this.head,c=""+a.data;a=a.next;)c+=l+a.data;return c},f.prototype.concat=function(l){if(this.length===0)return h.alloc(0);if(this.length===1)return this.head.data;for(var a=h.allocUnsafe(l>>>0),c=this.head,s=0;c;)T(c.data,a,s),s+=c.data.length,c=c.next;return a},f}(),p&&p.inspect&&p.inspect.custom&&(P.exports.prototype[p.inspect.custom]=function(){var f=p.inspect({length:this.length});return this.constructor.name+" "+f})},{"safe-buffer":193,util:36}],185:[function(w,P,S){"use strict";function C(f,l){var a=this,c=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return c||s?(l?l(f):!f||this._writableState&&this._writableState.errorEmitted||p.nextTick(h,this,f),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(f||null,function(u){!l&&u?(p.nextTick(h,a,u),a._writableState&&(a._writableState.errorEmitted=!0)):l&&l(u)}),this)}function T(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function h(f,l){f.emit("error",l)}var p=w("process-nextick-args");P.exports={destroy:C,undestroy:T}},{"process-nextick-args":172}],186:[function(w,P,S){"use strict";P.exports=w("events").EventEmitter},{events:158}],187:[function(w,P,S){P.exports=w("./readable").PassThrough},{"./readable":188}],188:[function(w,P,S){S=P.exports=w("./lib/_stream_readable.js"),S.Stream=S,S.Readable=S,S.Writable=w("./lib/_stream_writable.js"),S.Duplex=w("./lib/_stream_duplex.js"),S.Transform=w("./lib/_stream_transform.js"),S.PassThrough=w("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":179,"./lib/_stream_passthrough.js":180,"./lib/_stream_readable.js":181,"./lib/_stream_transform.js":182,"./lib/_stream_writable.js":183}],189:[function(w,P,S){P.exports=w("./readable").Transform},{"./readable":188}],190:[function(w,P,S){P.exports=w("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":183}],191:[function(w,P,S){var C=function(){return this}()||Function("return this")(),T=C.regeneratorRuntime&&Object.getOwnPropertyNames(C).indexOf("regeneratorRuntime")>=0,h=T&&C.regeneratorRuntime;if(C.regeneratorRuntime=void 0,P.exports=w("./runtime"),T)C.regeneratorRuntime=h;else try{delete C.regeneratorRuntime}catch(p){C.regeneratorRuntime=void 0}},{"./runtime":192}],192:[function(w,P,S){!function(C){"use strict";function T(Z,K,q,ie){var oe=K&&K.prototype instanceof p?K:p,ye=Object.create(oe.prototype),pe=new t(ie||[]);return ye._invoke=s(Z,q,pe),ye}function h(Z,K,q){try{return{type:"normal",arg:Z.call(K,q)}}catch(ie){return{type:"throw",arg:ie}}}function p(){}function f(){}function l(){}function a(Z){["next","throw","return"].forEach(function(K){Z[K]=function(q){return this._invoke(K,q)}})}function c(Z){function K(oe,ye,pe,we){var fe=h(Z[oe],Z,ye);if(fe.type!=="throw"){var Te=fe.arg,Fe=Te.value;return Fe&&typeof Fe=="object"&&_.call(Fe,"__await")?Promise.resolve(Fe.__await).then(function(De){K("next",De,pe,we)},function(De){K("throw",De,pe,we)}):Promise.resolve(Fe).then(function(De){Te.value=De,pe(Te)},we)}we(fe.arg)}function q(oe,ye){function pe(){return new Promise(function(we,fe){K(oe,ye,we,fe)})}return ie=ie?ie.then(pe,pe):pe()}var ie;this._invoke=q}function s(Z,K,q){var ie=O;return function(oe,ye){if(ie===I)throw new Error("Generator is already running");if(ie===F){if(oe==="throw")throw ye;return v()}for(q.method=oe,q.arg=ye;;){var pe=q.delegate;if(pe){var we=u(pe,q);if(we){if(we===z)continue;return we}}if(q.method==="next")q.sent=q._sent=q.arg;else if(q.method==="throw"){if(ie===O)throw ie=F,q.arg;q.dispatchException(q.arg)}else q.method==="return"&&q.abrupt("return",q.arg);ie=I;var fe=h(Z,K,q);if(fe.type==="normal"){if(ie=q.done?F:D,fe.arg===z)continue;return{value:fe.arg,done:q.done}}fe.type==="throw"&&(ie=F,q.method="throw",q.arg=fe.arg)}}}function u(Z,K){var q=Z.iterator[K.method];if(q===b){if(K.delegate=null,K.method==="throw"){if(Z.iterator.return&&(K.method="return",K.arg=b,u(Z,K),K.method==="throw"))return z;K.method="throw",K.arg=new TypeError("The iterator does not provide a 'throw' method")}return z}var ie=h(q,Z.iterator,K.arg);if(ie.type==="throw")return K.method="throw",K.arg=ie.arg,K.delegate=null,z;var oe=ie.arg;return oe?oe.done?(K[Z.resultName]=oe.value,K.next=Z.nextLoc,K.method!=="return"&&(K.method="next",K.arg=b),K.delegate=null,z):oe:(K.method="throw",K.arg=new TypeError("iterator result is not an object"),K.delegate=null,z)}function i(Z){var K={tryLoc:Z[0]};1 in Z&&(K.catchLoc=Z[1]),2 in Z&&(K.finallyLoc=Z[2],K.afterLoc=Z[3]),this.tryEntries.push(K)}function n(Z){var K=Z.completion||{};K.type="normal",delete K.arg,Z.completion=K}function t(Z){this.tryEntries=[{tryLoc:"root"}],Z.forEach(i,this),this.reset(!0)}function d(Z){if(Z){var K=Z[g];if(K)return K.call(Z);if(typeof Z.next=="function")return Z;if(!isNaN(Z.length)){var q=-1,ie=function oe(){for(;++q<Z.length;)if(_.call(Z,q))return oe.value=Z[q],oe.done=!1,oe;return oe.value=b,oe.done=!0,oe};return ie.next=ie}}return{next:v}}function v(){return{value:b,done:!0}}var b,y=Object.prototype,_=y.hasOwnProperty,m=typeof Symbol=="function"?Symbol:{},g=m.iterator||"@@iterator",E=m.asyncIterator||"@@asyncIterator",o=m.toStringTag||"@@toStringTag",x=typeof P=="object",A=C.regeneratorRuntime;if(A)return void(x&&(P.exports=A));A=C.regeneratorRuntime=x?P.exports:{},A.wrap=T;var O="suspendedStart",D="suspendedYield",I="executing",F="completed",z={},ne={};ne[g]=function(){return this};var j=Object.getPrototypeOf,G=j&&j(j(d([])));G&&G!==y&&_.call(G,g)&&(ne=G);var X=l.prototype=p.prototype=Object.create(ne);f.prototype=X.constructor=l,l.constructor=f,l[o]=f.displayName="GeneratorFunction",A.isGeneratorFunction=function(Z){var K=typeof Z=="function"&&Z.constructor;return!!K&&(K===f||(K.displayName||K.name)==="GeneratorFunction")},A.mark=function(Z){return Object.setPrototypeOf?Object.setPrototypeOf(Z,l):(Z.__proto__=l,o in Z||(Z[o]="GeneratorFunction")),Z.prototype=Object.create(X),Z},A.awrap=function(Z){return{__await:Z}},a(c.prototype),c.prototype[E]=function(){return this},A.AsyncIterator=c,A.async=function(Z,K,q,ie){var oe=new c(T(Z,K,q,ie));return A.isGeneratorFunction(K)?oe:oe.next().then(function(ye){return ye.done?ye.value:oe.next()})},a(X),X[o]="Generator",X[g]=function(){return this},X.toString=function(){return"[object Generator]"},A.keys=function(Z){var K=[];for(var q in Z)K.push(q);return K.reverse(),function ie(){for(;K.length;){var oe=K.pop();if(oe in Z)return ie.value=oe,ie.done=!1,ie}return ie.done=!0,ie}},A.values=d,t.prototype={constructor:t,reset:function(Z){if(this.prev=0,this.next=0,this.sent=this._sent=b,this.done=!1,this.delegate=null,this.method="next",this.arg=b,this.tryEntries.forEach(n),!Z)for(var K in this)K.charAt(0)==="t"&&_.call(this,K)&&!isNaN(+K.slice(1))&&(this[K]=b)},stop:function(){this.done=!0;var Z=this.tryEntries[0],K=Z.completion;if(K.type==="throw")throw K.arg;return this.rval},dispatchException:function(Z){function K(fe,Te){return ye.type="throw",ye.arg=Z,q.next=fe,Te&&(q.method="next",q.arg=b),!!Te}if(this.done)throw Z;for(var q=this,ie=this.tryEntries.length-1;ie>=0;--ie){var oe=this.tryEntries[ie],ye=oe.completion;if(oe.tryLoc==="root")return K("end");if(oe.tryLoc<=this.prev){var pe=_.call(oe,"catchLoc"),we=_.call(oe,"finallyLoc");if(pe&&we){if(this.prev<oe.catchLoc)return K(oe.catchLoc,!0);if(this.prev<oe.finallyLoc)return K(oe.finallyLoc)}else if(pe){if(this.prev<oe.catchLoc)return K(oe.catchLoc,!0)}else{if(!we)throw new Error("try statement without catch or finally");if(this.prev<oe.finallyLoc)return K(oe.finallyLoc)}}}},abrupt:function(Z,K){for(var q=this.tryEntries.length-1;q>=0;--q){var ie=this.tryEntries[q];if(ie.tryLoc<=this.prev&&_.call(ie,"finallyLoc")&&this.prev<ie.finallyLoc){var oe=ie;break}}oe&&(Z==="break"||Z==="continue")&&oe.tryLoc<=K&&K<=oe.finallyLoc&&(oe=null);var ye=oe?oe.completion:{};return ye.type=Z,ye.arg=K,oe?(this.method="next",this.next=oe.finallyLoc,z):this.complete(ye)},complete:function(Z,K){if(Z.type==="throw")throw Z.arg;return Z.type==="break"||Z.type==="continue"?this.next=Z.arg:Z.type==="return"?(this.rval=this.arg=Z.arg,this.method="return",this.next="end"):Z.type==="normal"&&K&&(this.next=K),z},finish:function(Z){for(var K=this.tryEntries.length-1;K>=0;--K){var q=this.tryEntries[K];if(q.finallyLoc===Z)return this.complete(q.completion,q.afterLoc),n(q),z}},catch:function(Z){for(var K=this.tryEntries.length-1;K>=0;--K){var q=this.tryEntries[K];if(q.tryLoc===Z){var ie=q.completion;if(ie.type==="throw"){var oe=ie.arg;n(q)}return oe}}throw new Error("illegal catch attempt")},delegateYield:function(Z,K,q){return this.delegate={iterator:d(Z),resultName:K,nextLoc:q},this.method==="next"&&(this.arg=b),z}}}(function(){return this}()||Function("return this")())},{}],193:[function(w,P,S){function C(f,l){for(var a in f)l[a]=f[a]}function T(f,l,a){return p(f,l,a)}var h=w("buffer"),p=h.Buffer;p.from&&p.alloc&&p.allocUnsafe&&p.allocUnsafeSlow?P.exports=h:(C(h,S),S.Buffer=T),C(p,T),T.from=function(f,l,a){if(typeof f=="number")throw new TypeError("Argument must not be a number");return p(f,l,a)},T.alloc=function(f,l,a){if(typeof f!="number")throw new TypeError("Argument must be a number");var c=p(f);return l!==void 0?typeof a=="string"?c.fill(l,a):c.fill(l):c.fill(0),c},T.allocUnsafe=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return p(f)},T.allocUnsafeSlow=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return h.SlowBuffer(f)}},{buffer:38}],194:[function(w,P,S){(function(C){"use strict";function T(v){return v&&v.__esModule?v:{default:v}}var h=w("babel-runtime/core-js/string/from-code-point"),p=T(h),f=w("babel-runtime/core-js/json/stringify"),l=T(f),a=w("babel-runtime/helpers/typeof"),c=T(a),s=w("babel-runtime/core-js/object/define-property"),u=T(s),i=w("babel-runtime/core-js/object/keys"),n=T(i),t=w("babel-runtime/core-js/object/create"),d=T(t);!function(v){function b(V,Y){if(!(this instanceof b))return new b(V,Y);var me=this;_(me),me.q=me.c="",me.bufferCheckPosition=v.MAX_BUFFER_LENGTH,me.opt=Y||{},me.opt.lowercase=me.opt.lowercase||me.opt.lowercasetags,me.looseCase=me.opt.lowercase?"toLowerCase":"toUpperCase",me.tags=[],me.closed=me.closedRoot=me.sawRoot=!1,me.tag=me.error=null,me.strict=!!V,me.noscript=!(!V&&!me.opt.noscript),me.state=N.BEGIN,me.strictEntities=me.opt.strictEntities,me.ENTITIES=me.strictEntities?(0,d.default)(v.XML_ENTITIES):(0,d.default)(v.ENTITIES),me.attribList=[],me.opt.xmlns&&(me.ns=(0,d.default)(Ie)),me.trackPosition=me.opt.position!==!1,me.trackPosition&&(me.position=me.line=me.column=0),I(me,"onready")}function y(V){for(var Y=Math.max(v.MAX_BUFFER_LENGTH,10),me=0,Ae=0,at=Te.length;Ae<at;Ae++){var Le=V[Te[Ae]].length;if(Le>Y)switch(Te[Ae]){case"textNode":z(V);break;case"cdata":F(V,"oncdata",V.cdata),V.cdata="";break;case"script":F(V,"onscript",V.script),V.script="";break;default:j(V,"Max buffer length exceeded: "+Te[Ae])}me=Math.max(me,Le)}var ke=v.MAX_BUFFER_LENGTH-me;V.bufferCheckPosition=ke+V.position}function _(V){for(var Y=0,me=Te.length;Y<me;Y++)V[Te[Y]]=""}function m(V){z(V),V.cdata!==""&&(F(V,"oncdata",V.cdata),V.cdata=""),V.script!==""&&(F(V,"onscript",V.script),V.script="")}function g(V,Y){return new E(V,Y)}function E(V,Y){if(!(this instanceof E))return new E(V,Y);Fe.apply(this),this._parser=new b(V,Y),this.writable=!0,this.readable=!0;var me=this;this._parser.onend=function(){me.emit("end")},this._parser.onerror=function(Ae){me.emit("error",Ae),me._parser.error=null},this._decoder=null,De.forEach(function(Ae){(0,u.default)(me,"on"+Ae,{get:function(){return me._parser["on"+Ae]},set:function(at){if(!at)return me.removeAllListeners(Ae),me._parser["on"+Ae]=at,at;me.on(Ae,at)},enumerable:!0,configurable:!1})})}function o(V){return V===" "||V===`
`||V==="\r"||V===" "}function x(V){return V==='"'||V==="'"}function A(V){return V===">"||o(V)}function O(V,Y){return V.test(Y)}function D(V,Y){return!O(V,Y)}function I(V,Y,me){V[Y]&&V[Y](me)}function F(V,Y,me){V.textNode&&z(V),I(V,Y,me)}function z(V){V.textNode=ne(V.opt,V.textNode),V.textNode&&I(V,"ontext",V.textNode),V.textNode=""}function ne(V,Y){return V.trim&&(Y=Y.trim()),V.normalize&&(Y=Y.replace(/\s+/g," ")),Y}function j(V,Y){return z(V),V.trackPosition&&(Y+=`
Line: `+V.line+`
Column: `+V.column+`
Char: `+V.c),Y=new Error(Y),V.error=Y,I(V,"onerror",Y),V}function G(V){return V.sawRoot&&!V.closedRoot&&X(V,"Unclosed root tag"),V.state!==N.BEGIN&&V.state!==N.BEGIN_WHITESPACE&&V.state!==N.TEXT&&j(V,"Unexpected end"),z(V),V.c="",V.closed=!0,I(V,"onend"),b.call(V,V.strict,V.opt),V}function X(V,Y){if((V===void 0?"undefined":(0,c.default)(V))!=="object"||!(V instanceof b))throw new Error("bad call to strictFail");V.strict&&j(V,Y)}function Z(V){V.strict||(V.tagName=V.tagName[V.looseCase]());var Y=V.tags[V.tags.length-1]||V,me=V.tag={name:V.tagName,attributes:{}};V.opt.xmlns&&(me.ns=Y.ns),V.attribList.length=0,F(V,"onopentagstart",me)}function K(V,Y){var me=V.indexOf(":"),Ae=me<0?["",V]:V.split(":"),at=Ae[0],Le=Ae[1];return Y&&V==="xmlns"&&(at="xmlns",Le=""),{prefix:at,local:Le}}function q(V){if(V.strict||(V.attribName=V.attribName[V.looseCase]()),V.attribList.indexOf(V.attribName)!==-1||V.tag.attributes.hasOwnProperty(V.attribName))return void(V.attribName=V.attribValue="");if(V.opt.xmlns){var Y=K(V.attribName,!0),me=Y.prefix,Ae=Y.local;if(me==="xmlns")if(Ae==="xml"&&V.attribValue!==ve)X(V,"xml: prefix must be bound to "+ve+`
Actual: `+V.attribValue);else if(Ae==="xmlns"&&V.attribValue!==ce)X(V,"xmlns: prefix must be bound to "+ce+`
Actual: `+V.attribValue);else{var at=V.tag,Le=V.tags[V.tags.length-1]||V;at.ns===Le.ns&&(at.ns=(0,d.default)(Le.ns)),at.ns[Ae]=V.attribValue}V.attribList.push([V.attribName,V.attribValue])}else V.tag.attributes[V.attribName]=V.attribValue,F(V,"onattribute",{name:V.attribName,value:V.attribValue});V.attribName=V.attribValue=""}function ie(V,Y){if(V.opt.xmlns){var me=V.tag,Ae=K(V.tagName);me.prefix=Ae.prefix,me.local=Ae.local,me.uri=me.ns[Ae.prefix]||"",me.prefix&&!me.uri&&(X(V,"Unbound namespace prefix: "+(0,l.default)(V.tagName)),me.uri=Ae.prefix);var at=V.tags[V.tags.length-1]||V;me.ns&&at.ns!==me.ns&&(0,n.default)(me.ns).forEach(function(be){F(V,"onopennamespace",{prefix:be,uri:me.ns[be]})});for(var Le=0,ke=V.attribList.length;Le<ke;Le++){var Ye=V.attribList[Le],Ze=Ye[0],Ve=Ye[1],He=K(Ze,!0),Pe=He.prefix,Re=He.local,Oe=Pe===""?"":me.ns[Pe]||"",he={name:Ze,value:Ve,prefix:Pe,local:Re,uri:Oe};Pe&&Pe!=="xmlns"&&!Oe&&(X(V,"Unbound namespace prefix: "+(0,l.default)(Pe)),he.uri=Pe),V.tag.attributes[Ze]=he,F(V,"onattribute",he)}V.attribList.length=0}V.tag.isSelfClosing=!!Y,V.sawRoot=!0,V.tags.push(V.tag),F(V,"onopentag",V.tag),Y||(V.noscript||V.tagName.toLowerCase()!=="script"?V.state=N.TEXT:V.state=N.SCRIPT,V.tag=null,V.tagName=""),V.attribName=V.attribValue="",V.attribList.length=0}function oe(V){if(!V.tagName)return X(V,"Weird empty close tag."),V.textNode+="</>",void(V.state=N.TEXT);if(V.script){if(V.tagName!=="script")return V.script+="</"+V.tagName+">",V.tagName="",void(V.state=N.SCRIPT);F(V,"onscript",V.script),V.script=""}var Y=V.tags.length,me=V.tagName;V.strict||(me=me[V.looseCase]());for(var Ae=me;Y--&&!(V.tags[Y].name===Ae);)X(V,"Unexpected close tag");if(Y<0)return X(V,"Unmatched closing tag: "+V.tagName),V.textNode+="</"+V.tagName+">",void(V.state=N.TEXT);V.tagName=me;for(var at=V.tags.length;at-- >Y;){var Le=V.tag=V.tags.pop();V.tagName=V.tag.name,F(V,"onclosetag",V.tagName);var ke={};for(var Ye in Le.ns)ke[Ye]=Le.ns[Ye];var Ze=V.tags[V.tags.length-1]||V;V.opt.xmlns&&Le.ns!==Ze.ns&&(0,n.default)(Le.ns).forEach(function(Ve){var He=Le.ns[Ve];F(V,"onclosenamespace",{prefix:Ve,uri:He})})}Y===0&&(V.closedRoot=!0),V.tagName=V.attribValue=V.attribName="",V.attribList.length=0,V.state=N.TEXT}function ye(V){var Y,me=V.entity,Ae=me.toLowerCase(),at="";return V.ENTITIES[me]?V.ENTITIES[me]:V.ENTITIES[Ae]?V.ENTITIES[Ae]:(me=Ae,me.charAt(0)==="#"&&(me.charAt(1)==="x"?(me=me.slice(2),Y=parseInt(me,16),at=Y.toString(16)):(me=me.slice(1),Y=parseInt(me,10),at=Y.toString(10))),me=me.replace(/^0+/,""),isNaN(Y)||at.toLowerCase()!==me?(X(V,"Invalid character entity"),"&"+V.entity+";"):(0,p.default)(Y))}function pe(V,Y){Y==="<"?(V.state=N.OPEN_WAKA,V.startTagPosition=V.position):o(Y)||(X(V,"Non-whitespace before first tag."),V.textNode=Y,V.state=N.TEXT)}function we(V,Y){var me="";return Y<V.length&&(me=V.charAt(Y)),me}function fe(V){var Y=this;if(this.error)throw this.error;if(Y.closed)return j(Y,"Cannot write after close. Assign an onready handler.");if(V===null)return G(Y);(V===void 0?"undefined":(0,c.default)(V))==="object"&&(V=V.toString());for(var me=0,Ae="";!(Ae=we(V,me++),Y.c=Ae,!Ae);)switch(Y.trackPosition&&(Y.position++,Ae===`
`?(Y.line++,Y.column=0):Y.column++),Y.state){case N.BEGIN:if(Y.state=N.BEGIN_WHITESPACE,Ae==="\uFEFF")continue;pe(Y,Ae);continue;case N.BEGIN_WHITESPACE:pe(Y,Ae);continue;case N.TEXT:if(Y.sawRoot&&!Y.closedRoot){for(var at=me-1;Ae&&Ae!=="<"&&Ae!=="&";)(Ae=we(V,me++))&&Y.trackPosition&&(Y.position++,Ae===`
`?(Y.line++,Y.column=0):Y.column++);Y.textNode+=V.substring(at,me-1)}Ae!=="<"||Y.sawRoot&&Y.closedRoot&&!Y.strict?(o(Ae)||Y.sawRoot&&!Y.closedRoot||X(Y,"Text data outside of root node."),Ae==="&"?Y.state=N.TEXT_ENTITY:Y.textNode+=Ae):(Y.state=N.OPEN_WAKA,Y.startTagPosition=Y.position);continue;case N.SCRIPT:Ae==="<"?Y.state=N.SCRIPT_ENDING:Y.script+=Ae;continue;case N.SCRIPT_ENDING:Ae==="/"?Y.state=N.CLOSE_TAG:(Y.script+="<"+Ae,Y.state=N.SCRIPT);continue;case N.OPEN_WAKA:if(Ae==="!")Y.state=N.SGML_DECL,Y.sgmlDecl="";else if(!o(Ae))if(O(Ne,Ae))Y.state=N.OPEN_TAG,Y.tagName=Ae;else if(Ae==="/")Y.state=N.CLOSE_TAG,Y.tagName="";else if(Ae==="?")Y.state=N.PROC_INST,Y.procInstName=Y.procInstBody="";else{if(X(Y,"Unencoded <"),Y.startTagPosition+1<Y.position){var Le=Y.position-Y.startTagPosition;Ae=new Array(Le).join(" ")+Ae}Y.textNode+="<"+Ae,Y.state=N.TEXT}continue;case N.SGML_DECL:(Y.sgmlDecl+Ae).toUpperCase()===Me?(F(Y,"onopencdata"),Y.state=N.CDATA,Y.sgmlDecl="",Y.cdata=""):Y.sgmlDecl+Ae==="--"?(Y.state=N.COMMENT,Y.comment="",Y.sgmlDecl=""):(Y.sgmlDecl+Ae).toUpperCase()===Ue?(Y.state=N.DOCTYPE,(Y.doctype||Y.sawRoot)&&X(Y,"Inappropriately located doctype declaration"),Y.doctype="",Y.sgmlDecl=""):Ae===">"?(F(Y,"onsgmldeclaration",Y.sgmlDecl),Y.sgmlDecl="",Y.state=N.TEXT):(x(Ae)&&(Y.state=N.SGML_DECL_QUOTED),Y.sgmlDecl+=Ae);continue;case N.SGML_DECL_QUOTED:Ae===Y.q&&(Y.state=N.SGML_DECL,Y.q=""),Y.sgmlDecl+=Ae;continue;case N.DOCTYPE:Ae===">"?(Y.state=N.TEXT,F(Y,"ondoctype",Y.doctype),Y.doctype=!0):(Y.doctype+=Ae,Ae==="["?Y.state=N.DOCTYPE_DTD:x(Ae)&&(Y.state=N.DOCTYPE_QUOTED,Y.q=Ae));continue;case N.DOCTYPE_QUOTED:Y.doctype+=Ae,Ae===Y.q&&(Y.q="",Y.state=N.DOCTYPE);continue;case N.DOCTYPE_DTD:Y.doctype+=Ae,Ae==="]"?Y.state=N.DOCTYPE:x(Ae)&&(Y.state=N.DOCTYPE_DTD_QUOTED,Y.q=Ae);continue;case N.DOCTYPE_DTD_QUOTED:Y.doctype+=Ae,Ae===Y.q&&(Y.state=N.DOCTYPE_DTD,Y.q="");continue;case N.COMMENT:Ae==="-"?Y.state=N.COMMENT_ENDING:Y.comment+=Ae;continue;case N.COMMENT_ENDING:Ae==="-"?(Y.state=N.COMMENT_ENDED,Y.comment=ne(Y.opt,Y.comment),Y.comment&&F(Y,"oncomment",Y.comment),Y.comment=""):(Y.comment+="-"+Ae,Y.state=N.COMMENT);continue;case N.COMMENT_ENDED:Ae!==">"?(X(Y,"Malformed comment"),Y.comment+="--"+Ae,Y.state=N.COMMENT):Y.state=N.TEXT;continue;case N.CDATA:Ae==="]"?Y.state=N.CDATA_ENDING:Y.cdata+=Ae;continue;case N.CDATA_ENDING:Ae==="]"?Y.state=N.CDATA_ENDING_2:(Y.cdata+="]"+Ae,Y.state=N.CDATA);continue;case N.CDATA_ENDING_2:Ae===">"?(Y.cdata&&F(Y,"oncdata",Y.cdata),F(Y,"onclosecdata"),Y.cdata="",Y.state=N.TEXT):Ae==="]"?Y.cdata+="]":(Y.cdata+="]]"+Ae,Y.state=N.CDATA);continue;case N.PROC_INST:Ae==="?"?Y.state=N.PROC_INST_ENDING:o(Ae)?Y.state=N.PROC_INST_BODY:Y.procInstName+=Ae;continue;case N.PROC_INST_BODY:if(!Y.procInstBody&&o(Ae))continue;Ae==="?"?Y.state=N.PROC_INST_ENDING:Y.procInstBody+=Ae;continue;case N.PROC_INST_ENDING:Ae===">"?(F(Y,"onprocessinginstruction",{name:Y.procInstName,body:Y.procInstBody}),Y.procInstName=Y.procInstBody="",Y.state=N.TEXT):(Y.procInstBody+="?"+Ae,Y.state=N.PROC_INST_BODY);continue;case N.OPEN_TAG:O(Xe,Ae)?Y.tagName+=Ae:(Z(Y),Ae===">"?ie(Y):Ae==="/"?Y.state=N.OPEN_TAG_SLASH:(o(Ae)||X(Y,"Invalid character in tag name"),Y.state=N.ATTRIB));continue;case N.OPEN_TAG_SLASH:Ae===">"?(ie(Y,!0),oe(Y)):(X(Y,"Forward-slash in opening tag not followed by >"),Y.state=N.ATTRIB);continue;case N.ATTRIB:if(o(Ae))continue;Ae===">"?ie(Y):Ae==="/"?Y.state=N.OPEN_TAG_SLASH:O(Ne,Ae)?(Y.attribName=Ae,Y.attribValue="",Y.state=N.ATTRIB_NAME):X(Y,"Invalid attribute name");continue;case N.ATTRIB_NAME:Ae==="="?Y.state=N.ATTRIB_VALUE:Ae===">"?(X(Y,"Attribute without value"),Y.attribValue=Y.attribName,q(Y),ie(Y)):o(Ae)?Y.state=N.ATTRIB_NAME_SAW_WHITE:O(Xe,Ae)?Y.attribName+=Ae:X(Y,"Invalid attribute name");continue;case N.ATTRIB_NAME_SAW_WHITE:if(Ae==="=")Y.state=N.ATTRIB_VALUE;else{if(o(Ae))continue;X(Y,"Attribute without value"),Y.tag.attributes[Y.attribName]="",Y.attribValue="",F(Y,"onattribute",{name:Y.attribName,value:""}),Y.attribName="",Ae===">"?ie(Y):O(Ne,Ae)?(Y.attribName=Ae,Y.state=N.ATTRIB_NAME):(X(Y,"Invalid attribute name"),Y.state=N.ATTRIB)}continue;case N.ATTRIB_VALUE:if(o(Ae))continue;x(Ae)?(Y.q=Ae,Y.state=N.ATTRIB_VALUE_QUOTED):(X(Y,"Unquoted attribute value"),Y.state=N.ATTRIB_VALUE_UNQUOTED,Y.attribValue=Ae);continue;case N.ATTRIB_VALUE_QUOTED:if(Ae!==Y.q){Ae==="&"?Y.state=N.ATTRIB_VALUE_ENTITY_Q:Y.attribValue+=Ae;continue}q(Y),Y.q="",Y.state=N.ATTRIB_VALUE_CLOSED;continue;case N.ATTRIB_VALUE_CLOSED:o(Ae)?Y.state=N.ATTRIB:Ae===">"?ie(Y):Ae==="/"?Y.state=N.OPEN_TAG_SLASH:O(Ne,Ae)?(X(Y,"No whitespace between attributes"),Y.attribName=Ae,Y.attribValue="",Y.state=N.ATTRIB_NAME):X(Y,"Invalid attribute name");continue;case N.ATTRIB_VALUE_UNQUOTED:if(!A(Ae)){Ae==="&"?Y.state=N.ATTRIB_VALUE_ENTITY_U:Y.attribValue+=Ae;continue}q(Y),Ae===">"?ie(Y):Y.state=N.ATTRIB;continue;case N.CLOSE_TAG:if(Y.tagName)Ae===">"?oe(Y):O(Xe,Ae)?Y.tagName+=Ae:Y.script?(Y.script+="</"+Y.tagName,Y.tagName="",Y.state=N.SCRIPT):(o(Ae)||X(Y,"Invalid tagname in closing tag"),Y.state=N.CLOSE_TAG_SAW_WHITE);else{if(o(Ae))continue;D(Ne,Ae)?Y.script?(Y.script+="</"+Ae,Y.state=N.SCRIPT):X(Y,"Invalid tagname in closing tag."):Y.tagName=Ae}continue;case N.CLOSE_TAG_SAW_WHITE:if(o(Ae))continue;Ae===">"?oe(Y):X(Y,"Invalid characters in closing tag");continue;case N.TEXT_ENTITY:case N.ATTRIB_VALUE_ENTITY_Q:case N.ATTRIB_VALUE_ENTITY_U:var ke,Ye;switch(Y.state){case N.TEXT_ENTITY:ke=N.TEXT,Ye="textNode";break;case N.ATTRIB_VALUE_ENTITY_Q:ke=N.ATTRIB_VALUE_QUOTED,Ye="attribValue";break;case N.ATTRIB_VALUE_ENTITY_U:ke=N.ATTRIB_VALUE_UNQUOTED,Ye="attribValue"}Ae===";"?(Y[Ye]+=ye(Y),Y.entity="",Y.state=ke):O(Y.entity.length?k:ee,Ae)?Y.entity+=Ae:(X(Y,"Invalid character in entity name"),Y[Ye]+="&"+Y.entity+Ae,Y.entity="",Y.state=ke);continue;default:throw new Error(Y,"Unknown state: "+Y.state)}return Y.position>=Y.bufferCheckPosition&&y(Y),Y}v.parser=function(V,Y){return new b(V,Y)},v.SAXParser=b,v.SAXStream=E,v.createStream=g,v.MAX_BUFFER_LENGTH=65536;var Te=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];v.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],d.default||(Object.create=function(V){function Y(){}return Y.prototype=V,new Y}),n.default||(Object.keys=function(V){var Y=[];for(var me in V)V.hasOwnProperty(me)&&Y.push(me);return Y}),b.prototype={end:function(){G(this)},write:fe,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){m(this)}};var Fe;try{Fe=w("stream").Stream}catch(V){Fe=function(){}}var De=v.EVENTS.filter(function(V){return V!=="error"&&V!=="end"});E.prototype=(0,d.default)(Fe.prototype,{constructor:{value:E}}),E.prototype.write=function(V){if(typeof C=="function"&&typeof C.isBuffer=="function"&&C.isBuffer(V)){if(!this._decoder){var Y=w("string_decoder").StringDecoder;this._decoder=new Y("utf8")}V=this._decoder.write(V)}return this._parser.write(V.toString()),this.emit("data",V),!0},E.prototype.end=function(V){return V&&V.length&&this.write(V),this._parser.end(),!0},E.prototype.on=function(V,Y){var me=this;return me._parser["on"+V]||De.indexOf(V)===-1||(me._parser["on"+V]=function(){var Ae=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);Ae.splice(0,0,V),me.emit.apply(me,Ae)}),Fe.prototype.on.call(me,V,Y)};var Me="[CDATA[",Ue="DOCTYPE",ve="http://www.w3.org/XML/1998/namespace",ce="http://www.w3.org/2000/xmlns/",Ie={xml:ve,xmlns:ce},Ne=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Xe=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,ee=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,k=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,N=0;v.STATE={BEGIN:N++,BEGIN_WHITESPACE:N++,TEXT:N++,TEXT_ENTITY:N++,OPEN_WAKA:N++,SGML_DECL:N++,SGML_DECL_QUOTED:N++,DOCTYPE:N++,DOCTYPE_QUOTED:N++,DOCTYPE_DTD:N++,DOCTYPE_DTD_QUOTED:N++,COMMENT_STARTING:N++,COMMENT:N++,COMMENT_ENDING:N++,COMMENT_ENDED:N++,CDATA:N++,CDATA_ENDING:N++,CDATA_ENDING_2:N++,PROC_INST:N++,PROC_INST_BODY:N++,PROC_INST_ENDING:N++,OPEN_TAG:N++,OPEN_TAG_SLASH:N++,ATTRIB:N++,ATTRIB_NAME:N++,ATTRIB_NAME_SAW_WHITE:N++,ATTRIB_VALUE:N++,ATTRIB_VALUE_QUOTED:N++,ATTRIB_VALUE_CLOSED:N++,ATTRIB_VALUE_UNQUOTED:N++,ATTRIB_VALUE_ENTITY_Q:N++,ATTRIB_VALUE_ENTITY_U:N++,CLOSE_TAG:N++,CLOSE_TAG_SAW_WHITE:N++,SCRIPT:N++,SCRIPT_ENDING:N++},v.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},v.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},(0,n.default)(v.ENTITIES).forEach(function(V){var Y=v.ENTITIES[V],me=typeof Y=="number"?String.fromCharCode(Y):Y;v.ENTITIES[V]=me});for(var $ in v.STATE)v.STATE[v.STATE[$]]=$;N=v.STATE,p.default||function(){var V=String.fromCharCode,Y=Math.floor,me=function(){var Ae,at,Le=[],ke=-1,Ye=arguments.length;if(!Ye)return"";for(var Ze="";++ke<Ye;){var Ve=Number(arguments[ke]);if(!isFinite(Ve)||Ve<0||Ve>1114111||Y(Ve)!==Ve)throw RangeError("Invalid code point: "+Ve);Ve<=65535?Le.push(Ve):(Ve-=65536,Ae=55296+(Ve>>10),at=Ve%1024+56320,Le.push(Ae,at)),(ke+1===Ye||Le.length>16384)&&(Ze+=V.apply(null,Le),Le.length=0)}return Ze};u.default?Object.defineProperty(String,"fromCodePoint",{value:me,configurable:!0,writable:!0}):String.fromCodePoint=me}()}(S===void 0?(void 0).sax={}:S)}).call(this,w("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/create":19,"babel-runtime/core-js/object/define-property":20,"babel-runtime/core-js/object/keys":23,"babel-runtime/core-js/string/from-code-point":26,"babel-runtime/helpers/typeof":32,buffer:38,stream:195,string_decoder:37}],195:[function(w,P,S){function C(){T.call(this)}P.exports=C;var T=w("events").EventEmitter;w("inherits")(C,T),C.Readable=w("readable-stream/readable.js"),C.Writable=w("readable-stream/writable.js"),C.Duplex=w("readable-stream/duplex.js"),C.Transform=w("readable-stream/transform.js"),C.PassThrough=w("readable-stream/passthrough.js"),C.Stream=C,C.prototype.pipe=function(h,p){function f(t){h.writable&&h.write(t)===!1&&i.pause&&i.pause()}function l(){i.readable&&i.resume&&i.resume()}function a(){n||(n=!0,h.end())}function c(){n||(n=!0,typeof h.destroy=="function"&&h.destroy())}function s(t){if(u(),T.listenerCount(this,"error")===0)throw t}function u(){i.removeListener("data",f),h.removeListener("drain",l),i.removeListener("end",a),i.removeListener("close",c),i.removeListener("error",s),h.removeListener("error",s),i.removeListener("end",u),i.removeListener("close",u),h.removeListener("close",u)}var i=this;i.on("data",f),h.on("drain",l),h._isStdio||p&&p.end===!1||(i.on("end",a),i.on("close",c));var n=!1;return i.on("error",s),h.on("error",s),i.on("end",u),i.on("close",u),h.on("close",u),h.emit("pipe",i),h}},{events:158,inherits:162,"readable-stream/duplex.js":178,"readable-stream/passthrough.js":187,"readable-stream/readable.js":188,"readable-stream/transform.js":189,"readable-stream/writable.js":190}],196:[function(w,P,S){(function(C){var T=w("./lib/request"),h=w("./lib/response"),p=w("xtend"),f=w("builtin-status-codes"),l=w("url"),a=S;a.request=function(c,s){c=typeof c=="string"?l.parse(c):p(c);var u=C.location.protocol.search(/^https?:$/)===-1?"http:":"",i=c.protocol||u,n=c.hostname||c.host,t=c.port,d=c.path||"/";n&&n.indexOf(":")!==-1&&(n="["+n+"]"),c.url=(n?i+"//"+n:"")+(t?":"+t:"")+d,c.method=(c.method||"GET").toUpperCase(),c.headers=c.headers||{};var v=new T(c);return s&&v.on("response",s),v},a.get=function(c,s){var u=a.request(c,s);return u.end(),u},a.ClientRequest=T,a.IncomingMessage=h.IncomingMessage,a.Agent=function(){},a.Agent.defaultMaxSockets=4,a.globalAgent=new a.Agent,a.STATUS_CODES=f,a.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 ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":198,"./lib/response":199,"builtin-status-codes":39,url:203,xtend:236}],197:[function(w,P,S){(function(C){"use strict";function T(){if(f!==void 0)return f;if(C.XMLHttpRequest){f=new C.XMLHttpRequest;try{f.open("GET",C.XDomainRequest?"/":"https://example.com")}catch(c){f=null}}else f=null;return f}function h(c){var s=T();if(!s)return!1;try{return s.responseType=c,s.responseType===c}catch(u){}return!1}function p(c){return typeof c=="function"}S.fetch=p(C.fetch)&&p(C.ReadableStream),S.writableStream=p(C.WritableStream),S.abortController=p(C.AbortController),S.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),S.blobConstructor=!0}catch(c){}var f,l=C.ArrayBuffer!==void 0,a=l&&p(C.ArrayBuffer.prototype.slice);S.arraybuffer=S.fetch||l&&h("arraybuffer"),S.msstream=!S.fetch&&a&&h("ms-stream"),S.mozchunkedarraybuffer=!S.fetch&&l&&h("moz-chunked-arraybuffer"),S.overrideMimeType=S.fetch||!!T()&&p(T().overrideMimeType),S.vbArray=p(C.VBArray),f=null}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],198:[function(w,P,S){(function(C,T,h){"use strict";function p(y,_){return c.fetch&&_?"fetch":c.mozchunkedarraybuffer?"moz-chunked-arraybuffer":c.msstream?"ms-stream":c.arraybuffer&&y?"arraybuffer":c.vbArray&&y?"text:vbarray":"text"}function f(y){try{var _=y.status;return _!==null&&_!==0}catch(m){return!1}}var l=w("babel-runtime/core-js/object/keys"),a=function(y){return y&&y.__esModule?y:{default:y}}(l),c=w("./capability"),s=w("inherits"),u=w("./response"),i=w("readable-stream"),n=w("to-arraybuffer"),t=u.IncomingMessage,d=u.readyStates,v=P.exports=function(y){var _=this;i.Writable.call(_),_._opts=y,_._body=[],_._headers={},y.auth&&_.setHeader("Authorization","Basic "+new h(y.auth).toString("base64")),(0,a.default)(y.headers).forEach(function(E){_.setHeader(E,y.headers[E])});var m,g=!0;if(y.mode==="disable-fetch"||"requestTimeout"in y&&!c.abortController)g=!1,m=!0;else if(y.mode==="prefer-streaming")m=!1;else if(y.mode==="allow-wrong-content-type")m=!c.overrideMimeType;else{if(y.mode&&y.mode!=="default"&&y.mode!=="prefer-fast")throw new Error("Invalid value for opts.mode");m=!0}_._mode=p(m,g),_._fetchTimer=null,_.on("finish",function(){_._onFinish()})};s(v,i.Writable),v.prototype.setHeader=function(y,_){var m=this,g=y.toLowerCase();b.indexOf(g)===-1&&(m._headers[g]={name:y,value:_})},v.prototype.getHeader=function(y){var _=this._headers[y.toLowerCase()];return _?_.value:null},v.prototype.removeHeader=function(y){delete this._headers[y.toLowerCase()]},v.prototype._onFinish=function(){var y=this;if(!y._destroyed){var _=y._opts,m=y._headers,g=null;_.method!=="GET"&&_.method!=="HEAD"&&(g=c.arraybuffer?n(h.concat(y._body)):c.blobConstructor?new T.Blob(y._body.map(function(O){return n(O)}),{type:(m["content-type"]||{}).value||""}):h.concat(y._body).toString());var E=[];if((0,a.default)(m).forEach(function(O){var D=m[O].name,I=m[O].value;Array.isArray(I)?I.forEach(function(F){E.push([D,F])}):E.push([D,I])}),y._mode==="fetch"){var o=null;if(c.abortController){var x=new AbortController;o=x.signal,y._fetchAbortController=x,"requestTimeout"in _&&_.requestTimeout!==0&&(y._fetchTimer=T.setTimeout(function(){y.emit("requestTimeout"),y._fetchAbortController&&y._fetchAbortController.abort()},_.requestTimeout))}T.fetch(y._opts.url,{method:y._opts.method,headers:E,body:g||void 0,mode:"cors",credentials:_.withCredentials?"include":"same-origin",signal:o}).then(function(O){y._fetchResponse=O,y._connect()},function(O){T.clearTimeout(y._fetchTimer),y._destroyed||y.emit("error",O)})}else{var A=y._xhr=new T.XMLHttpRequest;try{A.open(y._opts.method,y._opts.url,!0)}catch(O){return void C.nextTick(function(){y.emit("error",O)})}"responseType"in A&&(A.responseType=y._mode.split(":")[0]),"withCredentials"in A&&(A.withCredentials=!!_.withCredentials),y._mode==="text"&&"overrideMimeType"in A&&A.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in _&&(A.timeout=_.requestTimeout,A.ontimeout=function(){y.emit("requestTimeout")}),E.forEach(function(O){A.setRequestHeader(O[0],O[1])}),y._response=null,A.onreadystatechange=function(){switch(A.readyState){case d.LOADING:case d.DONE:y._onXHRProgress()}},y._mode==="moz-chunked-arraybuffer"&&(A.onprogress=function(){y._onXHRProgress()}),A.onerror=function(){y._destroyed||y.emit("error",new Error("XHR error"))};try{A.send(g)}catch(O){return void C.nextTick(function(){y.emit("error",O)})}}}},v.prototype._onXHRProgress=function(){var y=this;f(y._xhr)&&!y._destroyed&&(y._response||y._connect(),y._response._onXHRProgress())},v.prototype._connect=function(){var y=this;y._destroyed||(y._response=new t(y._xhr,y._fetchResponse,y._mode,y._fetchTimer),y._response.on("error",function(_){y.emit("error",_)}),y.emit("response",y._response))},v.prototype._write=function(y,_,m){this._body.push(y),m()},v.prototype.abort=v.prototype.destroy=function(){var y=this;y._destroyed=!0,T.clearTimeout(y._fetchTimer),y._response&&(y._response._destroyed=!0),y._xhr?y._xhr.abort():y._fetchAbortController&&y._fetchAbortController.abort()},v.prototype.end=function(y,_,m){var g=this;typeof y=="function"&&(m=y,y=void 0),i.Writable.prototype.end.call(g,y,_,m)},v.prototype.flushHeaders=function(){},v.prototype.setTimeout=function(){},v.prototype.setNoDelay=function(){},v.prototype.setSocketKeepAlive=function(){};var b=["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,w("_process"),typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{},w("buffer").Buffer)},{"./capability":197,"./response":199,_process:173,"babel-runtime/core-js/object/keys":23,buffer:38,inherits:162,"readable-stream":188,"to-arraybuffer":202}],199:[function(w,P,S){(function(C,T,h){"use strict";var p=w("babel-runtime/core-js/promise"),f=function(i){return i&&i.__esModule?i:{default:i}}(p),l=w("./capability"),a=w("inherits"),c=w("readable-stream"),s=S.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},u=S.IncomingMessage=function(i,n,t,d){var v=this;if(c.Readable.call(v),v._mode=t,v.headers={},v.rawHeaders=[],v.trailers={},v.rawTrailers=[],v.on("end",function(){C.nextTick(function(){v.emit("close")})}),t==="fetch"){if(v._fetchResponse=n,v.url=n.url,v.statusCode=n.status,v.statusMessage=n.statusText,n.headers.forEach(function(g,E){v.headers[E.toLowerCase()]=g,v.rawHeaders.push(E,g)}),l.writableStream){var b=new WritableStream({write:function(g){return new f.default(function(E,o){v._destroyed?o():v.push(new h(g))?E():v._resumeFetch=E})},close:function(){T.clearTimeout(d),v._destroyed||v.push(null)},abort:function(g){v._destroyed||v.emit("error",g)}});try{return void n.body.pipeTo(b).catch(function(g){T.clearTimeout(d),v._destroyed||v.emit("error",g)})}catch(g){}}var y=n.body.getReader();!function g(){y.read().then(function(E){if(!v._destroyed){if(E.done)return T.clearTimeout(d),void v.push(null);v.push(new h(E.value)),g()}}).catch(function(E){T.clearTimeout(d),v._destroyed||v.emit("error",E)})}()}else if(v._xhr=i,v._pos=0,v.url=i.responseURL,v.statusCode=i.status,v.statusMessage=i.statusText,i.getAllResponseHeaders().split(/\r?\n/).forEach(function(g){var E=g.match(/^([^:]+):\s*(.*)/);if(E){var o=E[1].toLowerCase();o==="set-cookie"?(v.headers[o]===void 0&&(v.headers[o]=[]),v.headers[o].push(E[2])):v.headers[o]!==void 0?v.headers[o]+=", "+E[2]:v.headers[o]=E[2],v.rawHeaders.push(E[1],E[2])}}),v._charset="x-user-defined",!l.overrideMimeType){var _=v.rawHeaders["mime-type"];if(_){var m=_.match(/;\s*charset=([^;])(;|$)/);m&&(v._charset=m[1].toLowerCase())}v._charset||(v._charset="utf-8")}};a(u,c.Readable),u.prototype._read=function(){var i=this,n=i._resumeFetch;n&&(i._resumeFetch=null,n())},u.prototype._onXHRProgress=function(){var i=this,n=i._xhr,t=null;switch(i._mode){case"text:vbarray":if(n.readyState!==s.DONE)break;try{t=new T.VBArray(n.responseBody).toArray()}catch(_){}if(t!==null){i.push(new h(t));break}case"text":try{t=n.responseText}catch(_){i._mode="text:vbarray";break}if(t.length>i._pos){var d=t.substr(i._pos);if(i._charset==="x-user-defined"){for(var v=new h(d.length),b=0;b<d.length;b++)v[b]=255&d.charCodeAt(b);i.push(v)}else i.push(d,i._charset);i._pos=t.length}break;case"arraybuffer":if(n.readyState!==s.DONE||!n.response)break;t=n.response,i.push(new h(new Uint8Array(t)));break;case"moz-chunked-arraybuffer":if(t=n.response,n.readyState!==s.LOADING||!t)break;i.push(new h(new Uint8Array(t)));break;case"ms-stream":if(t=n.response,n.readyState!==s.LOADING)break;var y=new T.MSStreamReader;y.onprogress=function(){y.result.byteLength>i._pos&&(i.push(new h(new Uint8Array(y.result.slice(i._pos)))),i._pos=y.result.byteLength)},y.onload=function(){i.push(null)},y.readAsArrayBuffer(t)}i._xhr.readyState===s.DONE&&i._mode!=="ms-stream"&&i.push(null)}}).call(this,w("_process"),typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{},w("buffer").Buffer)},{"./capability":197,_process:173,"babel-runtime/core-js/promise":24,buffer:38,inherits:162,"readable-stream":188}],200:[function(w,P,S){"use strict";function C(_){if(!_)return"utf8";for(var m;;)switch(_){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 _;default:if(m)return;_=(""+_).toLowerCase(),m=!0}}function T(_){var m=C(_);if(typeof m!="string"&&(b.isEncoding===y||!y(_)))throw new Error("Unknown encoding: "+_);return m||_}function h(_){this.encoding=T(_);var m;switch(this.encoding){case"utf16le":this.text=u,this.end=i,m=4;break;case"utf8":this.fillLast=a,m=4;break;case"base64":this.text=n,this.end=t,m=3;break;default:return this.write=d,void(this.end=v)}this.lastNeed=0,this.lastTotal=0,this.lastChar=b.allocUnsafe(m)}function p(_){return _<=127?0:_>>5==6?2:_>>4==14?3:_>>3==30?4:_>>6==2?-1:-2}function f(_,m,g){var E=m.length-1;if(E<g)return 0;var o=p(m[E]);return o>=0?(o>0&&(_.lastNeed=o-1),o):--E<g||o===-2?0:(o=p(m[E]))>=0?(o>0&&(_.lastNeed=o-2),o):--E<g||o===-2?0:(o=p(m[E]),o>=0?(o>0&&(o===2?o=0:_.lastNeed=o-3),o):0)}function l(_,m,g){if((192&m[0])!=128)return _.lastNeed=0,"\u951F\uFFFD";if(_.lastNeed>1&&m.length>1){if((192&m[1])!=128)return _.lastNeed=1,"\u951F\uFFFD";if(_.lastNeed>2&&m.length>2&&(192&m[2])!=128)return _.lastNeed=2,"\u951F\uFFFD"}}function a(_){var m=this.lastTotal-this.lastNeed,g=l(this,_,m);return g!==void 0?g:this.lastNeed<=_.length?(_.copy(this.lastChar,m,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(_.copy(this.lastChar,m,0,_.length),void(this.lastNeed-=_.length))}function c(_,m){var g=f(this,_,m);if(!this.lastNeed)return _.toString("utf8",m);this.lastTotal=g;var E=_.length-(g-this.lastNeed);return _.copy(this.lastChar,0,E),_.toString("utf8",m,E)}function s(_){var m=_&&_.length?this.write(_):"";return this.lastNeed?m+"\u951F\uFFFD":m}function u(_,m){if((_.length-m)%2==0){var g=_.toString("utf16le",m);if(g){var E=g.charCodeAt(g.length-1);if(E>=55296&&E<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=_[_.length-2],this.lastChar[1]=_[_.length-1],g.slice(0,-1)}return g}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=_[_.length-1],_.toString("utf16le",m,_.length-1)}function i(_){var m=_&&_.length?this.write(_):"";if(this.lastNeed){var g=this.lastTotal-this.lastNeed;return m+this.lastChar.toString("utf16le",0,g)}return m}function n(_,m){var g=(_.length-m)%3;return g===0?_.toString("base64",m):(this.lastNeed=3-g,this.lastTotal=3,g===1?this.lastChar[0]=_[_.length-1]:(this.lastChar[0]=_[_.length-2],this.lastChar[1]=_[_.length-1]),_.toString("base64",m,_.length-g))}function t(_){var m=_&&_.length?this.write(_):"";return this.lastNeed?m+this.lastChar.toString("base64",0,3-this.lastNeed):m}function d(_){return _.toString(this.encoding)}function v(_){return _&&_.length?this.write(_):""}var b=w("safe-buffer").Buffer,y=b.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}};S.StringDecoder=h,h.prototype.write=function(_){if(_.length===0)return"";var m,g;if(this.lastNeed){if((m=this.fillLast(_))===void 0)return"";g=this.lastNeed,this.lastNeed=0}else g=0;return g<_.length?m?m+this.text(_,g):this.text(_,g):m||""},h.prototype.end=s,h.prototype.text=c,h.prototype.fillLast=function(_){if(this.lastNeed<=_.length)return _.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);_.copy(this.lastChar,this.lastTotal-this.lastNeed,0,_.length),this.lastNeed-=_.length}},{"safe-buffer":193}],201:[function(w,P,S){(function(C,T){function h(s,u){this._id=s,this._clearFn=u}var p=w("process/browser.js").nextTick,f=Function.prototype.apply,l=Array.prototype.slice,a={},c=0;S.setTimeout=function(){return new h(f.call(setTimeout,window,arguments),clearTimeout)},S.setInterval=function(){return new h(f.call(setInterval,window,arguments),clearInterval)},S.clearTimeout=S.clearInterval=function(s){s.close()},h.prototype.unref=h.prototype.ref=function(){},h.prototype.close=function(){this._clearFn.call(window,this._id)},S.enroll=function(s,u){clearTimeout(s._idleTimeoutId),s._idleTimeout=u},S.unenroll=function(s){clearTimeout(s._idleTimeoutId),s._idleTimeout=-1},S._unrefActive=S.active=function(s){clearTimeout(s._idleTimeoutId);var u=s._idleTimeout;u>=0&&(s._idleTimeoutId=setTimeout(function(){s._onTimeout&&s._onTimeout()},u))},S.setImmediate=typeof C=="function"?C:function(s){var u=c++,i=!(arguments.length<2)&&l.call(arguments,1);return a[u]=!0,p(function(){a[u]&&(i?s.apply(null,i):s.call(null),S.clearImmediate(u))}),u},S.clearImmediate=typeof T=="function"?T:function(s){delete a[s]}}).call(this,w("timers").setImmediate,w("timers").clearImmediate)},{"process/browser.js":173,timers:201}],202:[function(w,P,S){var C=w("buffer").Buffer;P.exports=function(T){if(T instanceof Uint8Array){if(T.byteOffset===0&&T.byteLength===T.buffer.byteLength)return T.buffer;if(typeof T.buffer.slice=="function")return T.buffer.slice(T.byteOffset,T.byteOffset+T.byteLength)}if(C.isBuffer(T)){for(var h=new Uint8Array(T.length),p=T.length,f=0;f<p;f++)h[f]=T[f];return h.buffer}throw new Error("Argument must be a Buffer")}},{buffer:38}],203:[function(w,P,S){"use strict";function C(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function T(o,x,A){if(o&&a.isObject(o)&&o instanceof C)return o;var O=new C;return O.parse(o,x,A),O}function h(o){return a.isString(o)&&(o=T(o)),o instanceof C?o.format():C.prototype.format.call(o)}function p(o,x){return T(o,!1,!0).resolve(x)}function f(o,x){return o?T(o,!1,!0).resolveObject(x):x}var l=w("punycode"),a=w("./util");S.parse=T,S.resolve=p,S.resolveObject=f,S.format=h,S.Url=C;var c=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,i=["<",">",'"',"`"," ","\r",`
`," "],n=["{","}","|","\\","^","`"].concat(i),t=["'"].concat(n),d=["%","/","?",";","#"].concat(t),v=["/","?","#"],b=/^[+a-z0-9A-Z_-]{0,63}$/,y=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,_={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},E=w("querystring");C.prototype.parse=function(o,x,A){if(!a.isString(o))throw new TypeError("Parameter 'url' must be a string, not "+typeof o);var O=o.indexOf("?"),D=O!==-1&&O<o.indexOf("#")?"?":"#",I=o.split(D),F=/\\/g;I[0]=I[0].replace(F,"/"),o=I.join(D);var z=o;if(z=z.trim(),!A&&o.split("#").length===1){var ne=u.exec(z);if(ne)return this.path=z,this.href=z,this.pathname=ne[1],ne[2]?(this.search=ne[2],this.query=x?E.parse(this.search.substr(1)):this.search.substr(1)):x&&(this.search="",this.query={}),this}var j=c.exec(z);if(j){j=j[0];var G=j.toLowerCase();this.protocol=G,z=z.substr(j.length)}if(A||j||z.match(/^\/\/[^@\/]+@[^@\/]+/)){var X=z.substr(0,2)==="//";!X||j&&m[j]||(z=z.substr(2),this.slashes=!0)}if(!m[j]&&(X||j&&!g[j])){for(var Z=-1,K=0;K<v.length;K++){var q=z.indexOf(v[K]);q!==-1&&(Z===-1||q<Z)&&(Z=q)}var ie,oe;oe=Z===-1?z.lastIndexOf("@"):z.lastIndexOf("@",Z),oe!==-1&&(ie=z.slice(0,oe),z=z.slice(oe+1),this.auth=decodeURIComponent(ie)),Z=-1;for(var K=0;K<d.length;K++){var q=z.indexOf(d[K]);q!==-1&&(Z===-1||q<Z)&&(Z=q)}Z===-1&&(Z=z.length),this.host=z.slice(0,Z),z=z.slice(Z),this.parseHost(),this.hostname=this.hostname||"";var ye=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!ye)for(var pe=this.hostname.split(/\./),K=0,we=pe.length;K<we;K++){var fe=pe[K];if(fe&&!fe.match(b)){for(var Te="",Fe=0,De=fe.length;Fe<De;Fe++)fe.charCodeAt(Fe)>127?Te+="x":Te+=fe[Fe];if(!Te.match(b)){var Me=pe.slice(0,K),Ue=pe.slice(K+1),ve=fe.match(y);ve&&(Me.push(ve[1]),Ue.unshift(ve[2])),Ue.length&&(z="/"+Ue.join(".")+z),this.hostname=Me.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),ye||(this.hostname=l.toASCII(this.hostname));var ce=this.port?":"+this.port:"",Ie=this.hostname||"";this.host=Ie+ce,this.href+=this.host,ye&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),z[0]!=="/"&&(z="/"+z))}if(!_[G])for(var K=0,we=t.length;K<we;K++){var Ne=t[K];if(z.indexOf(Ne)!==-1){var Xe=encodeURIComponent(Ne);Xe===Ne&&(Xe=escape(Ne)),z=z.split(Ne).join(Xe)}}var ee=z.indexOf("#");ee!==-1&&(this.hash=z.substr(ee),z=z.slice(0,ee));var k=z.indexOf("?");if(k!==-1?(this.search=z.substr(k),this.query=z.substr(k+1),x&&(this.query=E.parse(this.query)),z=z.slice(0,k)):x&&(this.search="",this.query={}),z&&(this.pathname=z),g[G]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var ce=this.pathname||"",N=this.search||"";this.path=ce+N}return this.href=this.format(),this},C.prototype.format=function(){var o=this.auth||"";o&&(o=encodeURIComponent(o),o=o.replace(/%3A/i,":"),o+="@");var x=this.protocol||"",A=this.pathname||"",O=this.hash||"",D=!1,I="";this.host?D=o+this.host:this.hostname&&(D=o+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(D+=":"+this.port)),this.query&&a.isObject(this.query)&&Object.keys(this.query).length&&(I=E.stringify(this.query));var F=this.search||I&&"?"+I||"";return x&&x.substr(-1)!==":"&&(x+=":"),this.slashes||(!x||g[x])&&D!==!1?(D="//"+(D||""),A&&A.charAt(0)!=="/"&&(A="/"+A)):D||(D=""),O&&O.charAt(0)!=="#"&&(O="#"+O),F&&F.charAt(0)!=="?"&&(F="?"+F),A=A.replace(/[?#]/g,function(z){return encodeURIComponent(z)}),F=F.replace("#","%23"),x+D+A+F+O},C.prototype.resolve=function(o){return this.resolveObject(T(o,!1,!0)).format()},C.prototype.resolveObject=function(o){if(a.isString(o)){var x=new C;x.parse(o,!1,!0),o=x}for(var A=new C,O=Object.keys(this),D=0;D<O.length;D++){var I=O[D];A[I]=this[I]}if(A.hash=o.hash,o.href==="")return A.href=A.format(),A;if(o.slashes&&!o.protocol){for(var F=Object.keys(o),z=0;z<F.length;z++){var ne=F[z];ne!=="protocol"&&(A[ne]=o[ne])}return g[A.protocol]&&A.hostname&&!A.pathname&&(A.path=A.pathname="/"),A.href=A.format(),A}if(o.protocol&&o.protocol!==A.protocol){if(!g[o.protocol]){for(var j=Object.keys(o),G=0;G<j.length;G++){var X=j[G];A[X]=o[X]}return A.href=A.format(),A}if(A.protocol=o.protocol,o.host||m[o.protocol])A.pathname=o.pathname;else{for(var we=(o.pathname||"").split("/");we.length&&!(o.host=we.shift()););o.host||(o.host=""),o.hostname||(o.hostname=""),we[0]!==""&&we.unshift(""),we.length<2&&we.unshift(""),A.pathname=we.join("/")}if(A.search=o.search,A.query=o.query,A.host=o.host||"",A.auth=o.auth,A.hostname=o.hostname||o.host,A.port=o.port,A.pathname||A.search){var Z=A.pathname||"",K=A.search||"";A.path=Z+K}return A.slashes=A.slashes||o.slashes,A.href=A.format(),A}var q=A.pathname&&A.pathname.charAt(0)==="/",ie=o.host||o.pathname&&o.pathname.charAt(0)==="/",oe=ie||q||A.host&&o.pathname,ye=oe,pe=A.pathname&&A.pathname.split("/")||[],we=o.pathname&&o.pathname.split("/")||[],fe=A.protocol&&!g[A.protocol];if(fe&&(A.hostname="",A.port=null,A.host&&(pe[0]===""?pe[0]=A.host:pe.unshift(A.host)),A.host="",o.protocol&&(o.hostname=null,o.port=null,o.host&&(we[0]===""?we[0]=o.host:we.unshift(o.host)),o.host=null),oe=oe&&(we[0]===""||pe[0]==="")),ie)A.host=o.host||o.host===""?o.host:A.host,A.hostname=o.hostname||o.hostname===""?o.hostname:A.hostname,A.search=o.search,A.query=o.query,pe=we;else if(we.length)pe||(pe=[]),pe.pop(),pe=pe.concat(we),A.search=o.search,A.query=o.query;else if(!a.isNullOrUndefined(o.search)){if(fe){A.hostname=A.host=pe.shift();var Te=!!(A.host&&A.host.indexOf("@")>0)&&A.host.split("@");Te&&(A.auth=Te.shift(),A.host=A.hostname=Te.shift())}return A.search=o.search,A.query=o.query,a.isNull(A.pathname)&&a.isNull(A.search)||(A.path=(A.pathname?A.pathname:"")+(A.search?A.search:"")),A.href=A.format(),A}if(!pe.length)return A.pathname=null,A.search?A.path="/"+A.search:A.path=null,A.href=A.format(),A;for(var Fe=pe.slice(-1)[0],De=(A.host||o.host||pe.length>1)&&(Fe==="."||Fe==="..")||Fe==="",Me=0,Ue=pe.length;Ue>=0;Ue--)Fe=pe[Ue],Fe==="."?pe.splice(Ue,1):Fe===".."?(pe.splice(Ue,1),Me++):Me&&(pe.splice(Ue,1),Me--);if(!oe&&!ye)for(;Me--;Me)pe.unshift("..");!oe||pe[0]===""||pe[0]&&pe[0].charAt(0)==="/"||pe.unshift(""),De&&pe.join("/").substr(-1)!=="/"&&pe.push("");var ve=pe[0]===""||pe[0]&&pe[0].charAt(0)==="/";if(fe){A.hostname=A.host=ve?"":pe.length?pe.shift():"";var Te=!!(A.host&&A.host.indexOf("@")>0)&&A.host.split("@");Te&&(A.auth=Te.shift(),A.host=A.hostname=Te.shift())}return oe=oe||A.host&&pe.length,oe&&!ve&&pe.unshift(""),pe.length?A.pathname=pe.join("/"):(A.pathname=null,A.path=null),a.isNull(A.pathname)&&a.isNull(A.search)||(A.path=(A.pathname?A.pathname:"")+(A.search?A.search:"")),A.auth=o.auth||A.auth,A.slashes=A.slashes||o.slashes,A.href=A.format(),A},C.prototype.parseHost=function(){var o=this.host,x=s.exec(o);x&&(x=x[0],x!==":"&&(this.port=x.substr(1)),o=o.substr(0,o.length-x.length)),o&&(this.hostname=o)}},{"./util":204,punycode:174,querystring:177}],204:[function(w,P,S){"use strict";P.exports={isString:function(C){return typeof C=="string"},isObject:function(C){return typeof C=="object"&&C!==null},isNull:function(C){return C===null},isNullOrUndefined:function(C){return C==null}}},{}],205:[function(w,P,S){(function(C){function T(p,f){function l(){if(!a){if(h("throwDeprecation"))throw new Error(f);h("traceDeprecation")?console.trace(f):console.warn(f),a=!0}return p.apply(this,arguments)}if(h("noDeprecation"))return p;var a=!1;return l}function h(p){try{if(!C.localStorage)return!1}catch(l){return!1}var f=C.localStorage[p];return f!=null&&String(f).toLowerCase()==="true"}P.exports=T}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],206:[function(w,P,S){P.exports=function(C){return C&&typeof C=="object"&&typeof C.copy=="function"&&typeof C.fill=="function"&&typeof C.readUInt8=="function"}},{}],207:[function(w,P,S){(function(C,T){function h(K,q){var ie={seen:[],stylize:f};return arguments.length>=3&&(ie.depth=arguments[2]),arguments.length>=4&&(ie.colors=arguments[3]),d(q)?ie.showHidden=q:q&&S._extend(ie,q),g(ie.showHidden)&&(ie.showHidden=!1),g(ie.depth)&&(ie.depth=2),g(ie.colors)&&(ie.colors=!1),g(ie.customInspect)&&(ie.customInspect=!0),ie.colors&&(ie.stylize=p),a(ie,K,ie.depth)}function p(K,q){var ie=h.styles[q];return ie?"["+h.colors[ie][0]+"m"+K+"["+h.colors[ie][1]+"m":K}function f(K,q){return K}function l(K){var q={};return K.forEach(function(ie,oe){q[ie]=!0}),q}function a(K,q,ie){if(K.customInspect&&q&&O(q.inspect)&&q.inspect!==S.inspect&&(!q.constructor||q.constructor.prototype!==q)){var oe=q.inspect(ie,K);return _(oe)||(oe=a(K,oe,ie)),oe}var ye=c(K,q);if(ye)return ye;var pe=Object.keys(q),we=l(pe);if(K.showHidden&&(pe=Object.getOwnPropertyNames(q)),A(q)&&(pe.indexOf("message")>=0||pe.indexOf("description")>=0))return s(q);if(pe.length===0){if(O(q)){var fe=q.name?": "+q.name:"";return K.stylize("[Function"+fe+"]","special")}if(E(q))return K.stylize(RegExp.prototype.toString.call(q),"regexp");if(x(q))return K.stylize(Date.prototype.toString.call(q),"date");if(A(q))return s(q)}var Te="",Fe=!1,De=["{","}"];if((t(q)&&(Fe=!0,De=["[","]"]),O(q))&&(Te=" [Function"+(q.name?": "+q.name:"")+"]"),E(q)&&(Te=" "+RegExp.prototype.toString.call(q)),x(q)&&(Te=" "+Date.prototype.toUTCString.call(q)),A(q)&&(Te=" "+s(q)),pe.length===0&&(!Fe||q.length==0))return De[0]+Te+De[1];if(ie<0)return E(q)?K.stylize(RegExp.prototype.toString.call(q),"regexp"):K.stylize("[Object]","special");K.seen.push(q);var Me;return Me=Fe?u(K,q,ie,we,pe):pe.map(function(Ue){return i(K,q,ie,we,Ue,Fe)}),K.seen.pop(),n(Me,Te,De)}function c(K,q){if(g(q))return K.stylize("undefined","undefined");if(_(q)){var ie="'"+JSON.stringify(q).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return K.stylize(ie,"string")}return y(q)?K.stylize(""+q,"number"):d(q)?K.stylize(""+q,"boolean"):v(q)?K.stylize("null","null"):void 0}function s(K){return"["+Error.prototype.toString.call(K)+"]"}function u(K,q,ie,oe,ye){for(var pe=[],we=0,fe=q.length;we<fe;++we)ne(q,String(we))?pe.push(i(K,q,ie,oe,String(we),!0)):pe.push("");return ye.forEach(function(Te){Te.match(/^\d+$/)||pe.push(i(K,q,ie,oe,Te,!0))}),pe}function i(K,q,ie,oe,ye,pe){var we,fe,Te;if(Te=Object.getOwnPropertyDescriptor(q,ye)||{value:q[ye]},Te.get?fe=Te.set?K.stylize("[Getter/Setter]","special"):K.stylize("[Getter]","special"):Te.set&&(fe=K.stylize("[Setter]","special")),ne(oe,ye)||(we="["+ye+"]"),fe||(K.seen.indexOf(Te.value)<0?(fe=v(ie)?a(K,Te.value,null):a(K,Te.value,ie-1),fe.indexOf(`
`)>-1&&(fe=pe?fe.split(`
`).map(function(Fe){return" "+Fe}).join(`
`).substr(2):`
`+fe.split(`
`).map(function(Fe){return" "+Fe}).join(`
`))):fe=K.stylize("[Circular]","special")),g(we)){if(pe&&ye.match(/^\d+$/))return fe;we=JSON.stringify(""+ye),we.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(we=we.substr(1,we.length-2),we=K.stylize(we,"name")):(we=we.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),we=K.stylize(we,"string"))}return we+": "+fe}function n(K,q,ie){var oe=0;return K.reduce(function(ye,pe){return oe++,pe.indexOf(`
`)>=0&&oe++,ye+pe.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?ie[0]+(q===""?"":q+`
`)+" "+K.join(`,
`)+" "+ie[1]:ie[0]+q+" "+K.join(", ")+" "+ie[1]}function t(K){return Array.isArray(K)}function d(K){return typeof K=="boolean"}function v(K){return K===null}function b(K){return K==null}function y(K){return typeof K=="number"}function _(K){return typeof K=="string"}function m(K){return typeof K=="symbol"}function g(K){return K===void 0}function E(K){return o(K)&&I(K)==="[object RegExp]"}function o(K){return typeof K=="object"&&K!==null}function x(K){return o(K)&&I(K)==="[object Date]"}function A(K){return o(K)&&(I(K)==="[object Error]"||K instanceof Error)}function O(K){return typeof K=="function"}function D(K){return K===null||typeof K=="boolean"||typeof K=="number"||typeof K=="string"||typeof K=="symbol"||K===void 0}function I(K){return Object.prototype.toString.call(K)}function F(K){return K<10?"0"+K.toString(10):K.toString(10)}function z(){var K=new Date,q=[F(K.getHours()),F(K.getMinutes()),F(K.getSeconds())].join(":");return[K.getDate(),Z[K.getMonth()],q].join(" ")}function ne(K,q){return Object.prototype.hasOwnProperty.call(K,q)}var j=/%[sdj%]/g;S.format=function(K){if(!_(K)){for(var q=[],ie=0;ie<arguments.length;ie++)q.push(h(arguments[ie]));return q.join(" ")}for(var ie=1,oe=arguments,ye=oe.length,pe=String(K).replace(j,function(Te){if(Te==="%%")return"%";if(ie>=ye)return Te;switch(Te){case"%s":return String(oe[ie++]);case"%d":return Number(oe[ie++]);case"%j":try{return JSON.stringify(oe[ie++])}catch(Fe){return"[Circular]"}default:return Te}}),we=oe[ie];ie<ye;we=oe[++ie])v(we)||!o(we)?pe+=" "+we:pe+=" "+h(we);return pe},S.deprecate=function(K,q){function ie(){if(!oe){if(C.throwDeprecation)throw new Error(q);C.traceDeprecation?console.trace(q):console.error(q),oe=!0}return K.apply(this,arguments)}if(g(T.process))return function(){return S.deprecate(K,q).apply(this,arguments)};if(C.noDeprecation===!0)return K;var oe=!1;return ie};var G,X={};S.debuglog=function(K){if(g(G)&&(G=C.env.NODE_DEBUG||""),K=K.toUpperCase(),!X[K])if(new RegExp("\\b"+K+"\\b","i").test(G)){var q=C.pid;X[K]=function(){var ie=S.format.apply(S,arguments);console.error("%s %d: %s",K,q,ie)}}else X[K]=function(){};return X[K]},S.inspect=h,h.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]},h.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},S.isArray=t,S.isBoolean=d,S.isNull=v,S.isNullOrUndefined=b,S.isNumber=y,S.isString=_,S.isSymbol=m,S.isUndefined=g,S.isRegExp=E,S.isObject=o,S.isDate=x,S.isError=A,S.isFunction=O,S.isPrimitive=D,S.isBuffer=w("./support/isBuffer");var Z=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];S.log=function(){console.log("%s - %s",z(),S.format.apply(S,arguments))},S.inherits=w("inherits"),S._extend=function(K,q){if(!q||!o(q))return K;for(var ie=Object.keys(q),oe=ie.length;oe--;)K[ie[oe]]=q[ie[oe]];return K}}).call(this,w("_process"),typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":206,_process:173,inherits:162}],208:[function(w,P,S){"use strict";(function(){S.stripBOM=function(C){return C[0]==="\uFEFF"?C.substring(1):C}}).call(void 0)},{}],209:[function(w,P,S){"use strict";function C(l){return l&&l.__esModule?l:{default:l}}var T=w("babel-runtime/helpers/typeof"),h=C(T),p=w("babel-runtime/core-js/object/keys"),f=C(p);(function(){var l,a,c,s,u,i={}.hasOwnProperty;l=w("xmlbuilder"),a=w("./defaults").defaults,s=function(n){return typeof n=="string"&&(n.indexOf("&")>=0||n.indexOf(">")>=0||n.indexOf("<")>=0)},u=function(n){return"<![CDATA["+c(n)+"]]>"},c=function(n){return n.replace("]]>","]]]]><![CDATA[>")},S.Builder=function(){function n(t){var d,v,b;this.options={},v=a[.2];for(d in v)i.call(v,d)&&(b=v[d],this.options[d]=b);for(d in t)i.call(t,d)&&(b=t[d],this.options[d]=b)}return n.prototype.buildObject=function(t){var d,v,b,y,_;return d=this.options.attrkey,v=this.options.charkey,(0,f.default)(t).length===1&&this.options.rootName===a[.2].rootName?(_=(0,f.default)(t)[0],t=t[_]):_=this.options.rootName,b=function(m){return function(g,E){var o,x,A,O,D,I;if((E===void 0?"undefined":(0,h.default)(E))!=="object")m.options.cdata&&s(E)?g.raw(u(E)):g.txt(E);else if(Array.isArray(E)){for(O in E)if(i.call(E,O)){x=E[O];for(D in x)A=x[D],g=b(g.ele(D),A).up()}}else for(D in E)if(i.call(E,D))if(x=E[D],D===d){if((x===void 0?"undefined":(0,h.default)(x))==="object")for(o in x)I=x[o],g=g.att(o,I)}else if(D===v)g=m.options.cdata&&s(x)?g.raw(u(x)):g.txt(x);else if(Array.isArray(x))for(O in x)i.call(x,O)&&(A=x[O],g=typeof A=="string"?m.options.cdata&&s(A)?g.ele(D).raw(u(A)).up():g.ele(D,A).up():b(g.ele(D),A).up());else(x===void 0?"undefined":(0,h.default)(x))==="object"?g=b(g.ele(D),x).up():typeof x=="string"&&m.options.cdata&&s(x)?g=g.ele(D).raw(u(x)).up():(x==null&&(x=""),g=g.ele(D,x.toString()).up());return g}}(this),y=l.create(_,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),b(y,t).end(this.options.renderOpts)},n}()}).call(void 0)},{"./defaults":210,"babel-runtime/core-js/object/keys":23,"babel-runtime/helpers/typeof":32,xmlbuilder:235}],210:[function(w,P,S){"use strict";(function(){S.defaults={.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:""},.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)},{}],211:[function(w,P,S){"use strict";function C(c){return c&&c.__esModule?c:{default:c}}var T=w("babel-runtime/core-js/object/get-own-property-names"),h=C(T),p=w("babel-runtime/core-js/object/keys"),f=C(p),l=w("babel-runtime/helpers/typeof"),a=C(l);(function(){var c,s,u,i,n,t,d,v,b=function(m,g){return function(){return m.apply(g,arguments)}},y=function(m,g){function E(){this.constructor=m}for(var o in g)_.call(g,o)&&(m[o]=g[o]);return E.prototype=g.prototype,m.prototype=new E,m.__super__=g.prototype,m},_={}.hasOwnProperty;d=w("sax"),u=w("events"),c=w("./bom"),t=w("./processors"),v=w("timers").setImmediate,s=w("./defaults").defaults,i=function(m){return(m===void 0?"undefined":(0,a.default)(m))==="object"&&m!=null&&(0,f.default)(m).length===0},n=function(m,g,E){var o,x,A;for(o=0,x=m.length;o<x;o++)A=m[o],g=A(g,E);return g},S.Parser=function(m){function g(E){this.parseString=b(this.parseString,this),this.reset=b(this.reset,this),this.assignOrPush=b(this.assignOrPush,this),this.processAsync=b(this.processAsync,this);var o,x,A;if(!(this instanceof S.Parser))return new S.Parser(E);this.options={},x=s[.2];for(o in x)_.call(x,o)&&(A=x[o],this.options[o]=A);for(o in E)_.call(E,o)&&(A=E[o],this.options[o]=A);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(t.normalize)),this.reset()}return y(g,m),g.prototype.processAsync=function(){var E,o;try{return this.remaining.length<=this.options.chunkSize?(E=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(E),this.saxParser.close()):(E=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(E),v(this.processAsync))}catch(x){if(o=x,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(o)}},g.prototype.assignOrPush=function(E,o,x){return o in E?(E[o]instanceof Array||(E[o]=[E[o]]),E[o].push(x)):this.options.explicitArray?E[o]=[x]:E[o]=x},g.prototype.reset=function(){var E,o,x,A;return this.removeAllListeners(),this.saxParser=d.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(O){return function(D){if(O.saxParser.resume(),!O.saxParser.errThrown)return O.saxParser.errThrown=!0,O.emit("error",D)}}(this),this.saxParser.onend=function(O){return function(){if(!O.saxParser.ended)return O.saxParser.ended=!0,O.emit("end",O.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,A=[],E=this.options.attrkey,o=this.options.charkey,this.saxParser.onopentag=function(O){return function(D){var I,F,z,ne,j;if(z={},z[o]="",!O.options.ignoreAttrs){j=D.attributes;for(I in j)_.call(j,I)&&(E in z||O.options.mergeAttrs||(z[E]={}),F=O.options.attrValueProcessors?n(O.options.attrValueProcessors,D.attributes[I],I):D.attributes[I],ne=O.options.attrNameProcessors?n(O.options.attrNameProcessors,I):I,O.options.mergeAttrs?O.assignOrPush(z,ne,F):z[E][ne]=F)}return z["#name"]=O.options.tagNameProcessors?n(O.options.tagNameProcessors,D.name):D.name,O.options.xmlns&&(z[O.options.xmlnskey]={uri:D.uri,local:D.local}),A.push(z)}}(this),this.saxParser.onclosetag=function(O){return function(){var D,I,F,z,ne,j,G,X,Z,K;if(j=A.pop(),ne=j["#name"],O.options.explicitChildren&&O.options.preserveChildrenOrder||delete j["#name"],j.cdata===!0&&(D=j.cdata,delete j.cdata),Z=A[A.length-1],j[o].match(/^\s*$/)&&!D?(I=j[o],delete j[o]):(O.options.trim&&(j[o]=j[o].trim()),O.options.normalize&&(j[o]=j[o].replace(/\s{2,}/g," ").trim()),j[o]=O.options.valueProcessors?n(O.options.valueProcessors,j[o],ne):j[o],(0,f.default)(j).length===1&&o in j&&!O.EXPLICIT_CHARKEY&&(j=j[o])),i(j)&&(j=O.options.emptyTag!==""?O.options.emptyTag:I),O.options.validator!=null&&(K="/"+function(){var q,ie,oe;for(oe=[],q=0,ie=A.length;q<ie;q++)z=A[q],oe.push(z["#name"]);return oe}().concat(ne).join("/"),function(){var q;try{j=O.options.validator(K,Z&&Z[ne],j)}catch(ie){return q=ie,O.emit("error",q)}}()),O.options.explicitChildren&&!O.options.mergeAttrs&&(j===void 0?"undefined":(0,a.default)(j))==="object")if(O.options.preserveChildrenOrder){if(Z){Z[O.options.childkey]=Z[O.options.childkey]||[],G={};for(F in j)_.call(j,F)&&(G[F]=j[F]);Z[O.options.childkey].push(G),delete j["#name"],(0,f.default)(j).length===1&&o in j&&!O.EXPLICIT_CHARKEY&&(j=j[o])}}else z={},O.options.attrkey in j&&(z[O.options.attrkey]=j[O.options.attrkey],delete j[O.options.attrkey]),!O.options.charsAsChildren&&O.options.charkey in j&&(z[O.options.charkey]=j[O.options.charkey],delete j[O.options.charkey]),(0,h.default)(j).length>0&&(z[O.options.childkey]=j),j=z;return A.length>0?O.assignOrPush(Z,ne,j):(O.options.explicitRoot&&(X=j,j={},j[ne]=X),O.resultObject=j,O.saxParser.ended=!0,O.emit("end",O.resultObject))}}(this),x=function(O){return function(D){var I,F;if(F=A[A.length-1])return F[o]+=D,O.options.explicitChildren&&O.options.preserveChildrenOrder&&O.options.charsAsChildren&&(O.options.includeWhiteChars||D.replace(/\\n/g,"").trim()!=="")&&(F[O.options.childkey]=F[O.options.childkey]||[],I={"#name":"__text__"},I[o]=D,O.options.normalize&&(I[o]=I[o].replace(/\s{2,}/g," ").trim()),F[O.options.childkey].push(I)),F}}(this),this.saxParser.ontext=x,this.saxParser.oncdata=function(O){return function(D){var I;if(I=x(D))return I.cdata=!0}}()},g.prototype.parseString=function(E,o){var x;o!=null&&typeof o=="function"&&(this.on("end",function(A){return this.reset(),o(null,A)}),this.on("error",function(A){return this.reset(),o(A)}));try{return E=E.toString(),E.trim()===""?(this.emit("end",null),!0):(E=c.stripBOM(E),this.options.async?(this.remaining=E,v(this.processAsync),this.saxParser):this.saxParser.write(E).close())}catch(A){if(x=A,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",x),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw x}},g}(u.EventEmitter),S.parseString=function(m,g,E){var o,x,A;return E!=null?(typeof E=="function"&&(o=E),(g===void 0?"undefined":(0,a.default)(g))==="object"&&(x=g)):(typeof g=="function"&&(o=g),x={}),A=new S.Parser(x),A.parseString(m,o)}}).call(void 0)},{"./bom":208,"./defaults":210,"./processors":212,"babel-runtime/core-js/object/get-own-property-names":21,"babel-runtime/core-js/object/keys":23,"babel-runtime/helpers/typeof":32,events:158,sax:194,timers:201}],212:[function(w,P,S){"use strict";(function(){var C;C=new RegExp(/(?!xmlns)^.*:/),S.normalize=function(T){return T.toLowerCase()},S.firstCharLowerCase=function(T){return T.charAt(0).toLowerCase()+T.slice(1)},S.stripPrefix=function(T){return T.replace(C,"")},S.parseNumbers=function(T){return isNaN(T)||(T=T%1==0?parseInt(T,10):parseFloat(T)),T},S.parseBooleans=function(T){return/^(?:true|false)$/i.test(T)&&(T=T.toLowerCase()==="true"),T}}).call(void 0)},{}],213:[function(w,P,S){"use strict";(function(){var C,T,h,p,f=function(a,c){function s(){this.constructor=a}for(var u in c)l.call(c,u)&&(a[u]=c[u]);return s.prototype=c.prototype,a.prototype=new s,a.__super__=c.prototype,a},l={}.hasOwnProperty;T=w("./defaults"),C=w("./builder"),h=w("./parser"),p=w("./processors"),S.defaults=T.defaults,S.processors=p,S.ValidationError=function(a){function c(s){this.message=s}return f(c,a),c}(Error),S.Builder=C.Builder,S.Parser=h.Parser,S.parseString=h.parseString}).call(void 0)},{"./builder":209,"./defaults":210,"./parser":211,"./processors":212}],214:[function(w,P,S){"use strict";function C(c){return c&&c.__esModule?c:{default:c}}var T=w("babel-runtime/core-js/object/get-prototype-of"),h=C(T),p=w("babel-runtime/helpers/typeof"),f=C(p),l=w("babel-runtime/core-js/object/assign"),a=C(l);(function(){var c,s,u,i,n,t,d=[].slice,v={}.hasOwnProperty;c=function(){var b,y,_,m,g,E;if(E=arguments[0],g=2<=arguments.length?d.call(arguments,1):[],i(a.default))a.default.apply(null,arguments);else for(b=0,_=g.length;b<_;b++)if((m=g[b])!=null)for(y in m)v.call(m,y)&&(E[y]=m[y]);return E},i=function(b){return!!b&&Object.prototype.toString.call(b)==="[object Function]"},n=function(b){var y;return!!b&&((y=b===void 0?"undefined":(0,f.default)(b))==="function"||y==="object")},s=function(b){return i(Array.isArray)?Array.isArray(b):Object.prototype.toString.call(b)==="[object Array]"},u=function(b){var y;if(s(b))return!b.length;for(y in b)if(v.call(b,y))return!1;return!0},t=function(b){var y,_;return n(b)&&(_=(0,h.default)(b))&&(y=_.constructor)&&typeof y=="function"&&y instanceof y&&Function.prototype.toString.call(y)===Function.prototype.toString.call(Object)},P.exports.assign=c,P.exports.isFunction=i,P.exports.isObject=n,P.exports.isArray=s,P.exports.isEmpty=u,P.exports.isPlainObject=t}).call(void 0)},{"babel-runtime/core-js/object/assign":18,"babel-runtime/core-js/object/get-prototype-of":22,"babel-runtime/helpers/typeof":32}],215:[function(w,P,S){"use strict";var C=w("babel-runtime/core-js/object/create"),T=function(h){return h&&h.__esModule?h:{default:h}}(C);(function(){P.exports=function(){function h(p,f,l){if(this.options=p.options,this.stringify=p.stringify,f==null)throw new Error("Missing attribute name of element "+p.name);if(l==null)throw new Error("Missing attribute value for attribute "+f+" of element "+p.name);this.name=this.stringify.attName(f),this.value=this.stringify.attValue(l)}return h.prototype.clone=function(){return(0,T.default)(this)},h.prototype.toString=function(p){return this.options.writer.set(p).attribute(this)},h}()}).call(void 0)},{"babel-runtime/core-js/object/create":19}],216:[function(w,P,S){"use strict";var C=w("babel-runtime/core-js/object/create"),T=function(h){return h&&h.__esModule?h:{default:h}}(C);(function(){var h,p=function(l,a){function c(){this.constructor=l}for(var s in a)f.call(a,s)&&(l[s]=a[s]);return c.prototype=a.prototype,l.prototype=new c,l.__super__=a.prototype,l},f={}.hasOwnProperty;h=w("./XMLNode"),P.exports=function(l){function a(c,s){if(a.__super__.constructor.call(this,c),s==null)throw new Error("Missing CDATA text");this.text=this.stringify.cdata(s)}return p(a,l),a.prototype.clone=function(){return(0,T.default)(this)},a.prototype.toString=function(c){return this.options.writer.set(c).cdata(this)},a}(h)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],217:[function(w,P,S){"use strict";var C=w("babel-runtime/core-js/object/create"),T=function(h){return h&&h.__esModule?h:{default:h}}(C);(function(){var h,p=function(l,a){function c(){this.constructor=l}for(var s in a)f.call(a,s)&&(l[s]=a[s]);return c.prototype=a.prototype,l.prototype=new c,l.__super__=a.prototype,l},f={}.hasOwnProperty;h=w("./XMLNode"),P.exports=function(l){function a(c,s){if(a.__super__.constructor.call(this,c),s==null)throw new Error("Missing comment text");this.text=this.stringify.comment(s)}return p(a,l),a.prototype.clone=function(){return(0,T.default)(this)},a.prototype.toString=function(c){return this.options.writer.set(c).comment(this)},a}(h)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],218:[function(w,P,S){"use strict";(function(){var C,T=function(p,f){function l(){this.constructor=p}for(var a in f)h.call(f,a)&&(p[a]=f[a]);return l.prototype=f.prototype,p.prototype=new l,p.__super__=f.prototype,p},h={}.hasOwnProperty;C=w("./XMLNode"),P.exports=function(p){function f(l,a,c,s,u,i){if(f.__super__.constructor.call(this,l),a==null)throw new Error("Missing DTD element name");if(c==null)throw new Error("Missing DTD attribute name");if(!s)throw new Error("Missing DTD attribute type");if(!u)throw new Error("Missing DTD attribute default");if(u.indexOf("#")!==0&&(u="#"+u),!u.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT");if(i&&!u.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT");this.elementName=this.stringify.eleName(a),this.attributeName=this.stringify.attName(c),this.attributeType=this.stringify.dtdAttType(s),this.defaultValue=this.stringify.dtdAttDefault(i),this.defaultValueType=u}return T(f,p),f.prototype.toString=function(l){return this.options.writer.set(l).dtdAttList(this)},f}(C)}).call(void 0)},{"./XMLNode":227}],219:[function(w,P,S){"use strict";(function(){var C,T=function(p,f){function l(){this.constructor=p}for(var a in f)h.call(f,a)&&(p[a]=f[a]);return l.prototype=f.prototype,p.prototype=new l,p.__super__=f.prototype,p},h={}.hasOwnProperty;C=w("./XMLNode"),P.exports=function(p){function f(l,a,c){if(f.__super__.constructor.call(this,l),a==null)throw new Error("Missing DTD element name");c||(c="(#PCDATA)"),Array.isArray(c)&&(c="("+c.join(",")+")"),this.name=this.stringify.eleName(a),this.value=this.stringify.dtdElementValue(c)}return T(f,p),f.prototype.toString=function(l){return this.options.writer.set(l).dtdElement(this)},f}(C)}).call(void 0)},{"./XMLNode":227}],220:[function(w,P,S){"use strict";(function(){var C,T,h=function(f,l){function a(){this.constructor=f}for(var c in l)p.call(l,c)&&(f[c]=l[c]);return a.prototype=l.prototype,f.prototype=new a,f.__super__=l.prototype,f},p={}.hasOwnProperty;T=w("./Utility").isObject,C=w("./XMLNode"),P.exports=function(f){function l(a,c,s,u){if(l.__super__.constructor.call(this,a),s==null)throw new Error("Missing entity name");if(u==null)throw new Error("Missing entity value");if(this.pe=!!c,this.name=this.stringify.eleName(s),T(u)){if(!u.pubID&&!u.sysID)throw new Error("Public and/or system identifiers are required for an external entity");if(u.pubID&&!u.sysID)throw new Error("System identifier is required for a public external entity");if(u.pubID!=null&&(this.pubID=this.stringify.dtdPubID(u.pubID)),u.sysID!=null&&(this.sysID=this.stringify.dtdSysID(u.sysID)),u.nData!=null&&(this.nData=this.stringify.dtdNData(u.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity")}else this.value=this.stringify.dtdEntityValue(u)}return h(l,f),l.prototype.toString=function(a){return this.options.writer.set(a).dtdEntity(this)},l}(C)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],221:[function(w,P,S){"use strict";(function(){var C,T=function(p,f){function l(){this.constructor=p}for(var a in f)h.call(f,a)&&(p[a]=f[a]);return l.prototype=f.prototype,p.prototype=new l,p.__super__=f.prototype,p},h={}.hasOwnProperty;C=w("./XMLNode"),P.exports=function(p){function f(l,a,c){if(f.__super__.constructor.call(this,l),a==null)throw new Error("Missing notation name");if(!c.pubID&&!c.sysID)throw new Error("Public or system identifiers are required for an external entity");this.name=this.stringify.eleName(a),c.pubID!=null&&(this.pubID=this.stringify.dtdPubID(c.pubID)),c.sysID!=null&&(this.sysID=this.stringify.dtdSysID(c.sysID))}return T(f,p),f.prototype.toString=function(l){return this.options.writer.set(l).dtdNotation(this)},f}(C)}).call(void 0)},{"./XMLNode":227}],222:[function(w,P,S){"use strict";(function(){var C,T,h=function(f,l){function a(){this.constructor=f}for(var c in l)p.call(l,c)&&(f[c]=l[c]);return a.prototype=l.prototype,f.prototype=new a,f.__super__=l.prototype,f},p={}.hasOwnProperty;T=w("./Utility").isObject,C=w("./XMLNode"),P.exports=function(f){function l(a,c,s,u){var i;l.__super__.constructor.call(this,a),T(c)&&(i=c,c=i.version,s=i.encoding,u=i.standalone),c||(c="1.0"),this.version=this.stringify.xmlVersion(c),s!=null&&(this.encoding=this.stringify.xmlEncoding(s)),u!=null&&(this.standalone=this.stringify.xmlStandalone(u))}return h(l,f),l.prototype.toString=function(a){return this.options.writer.set(a).declaration(this)},l}(C)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],223:[function(w,P,S){"use strict";(function(){var C,T,h,p,f,l,a=function(s,u){function i(){this.constructor=s}for(var n in u)c.call(u,n)&&(s[n]=u[n]);return i.prototype=u.prototype,s.prototype=new i,s.__super__=u.prototype,s},c={}.hasOwnProperty;l=w("./Utility").isObject,f=w("./XMLNode"),C=w("./XMLDTDAttList"),h=w("./XMLDTDEntity"),T=w("./XMLDTDElement"),p=w("./XMLDTDNotation"),P.exports=function(s){function u(i,n,t){var d,v;u.__super__.constructor.call(this,i),this.documentObject=i,l(n)&&(d=n,n=d.pubID,t=d.sysID),t==null&&(v=[n,t],t=v[0],n=v[1]),n!=null&&(this.pubID=this.stringify.dtdPubID(n)),t!=null&&(this.sysID=this.stringify.dtdSysID(t))}return a(u,s),u.prototype.element=function(i,n){var t;return t=new T(this,i,n),this.children.push(t),this},u.prototype.attList=function(i,n,t,d,v){var b;return b=new C(this,i,n,t,d,v),this.children.push(b),this},u.prototype.entity=function(i,n){var t;return t=new h(this,!1,i,n),this.children.push(t),this},u.prototype.pEntity=function(i,n){var t;return t=new h(this,!0,i,n),this.children.push(t),this},u.prototype.notation=function(i,n){var t;return t=new p(this,i,n),this.children.push(t),this},u.prototype.toString=function(i){return this.options.writer.set(i).docType(this)},u.prototype.ele=function(i,n){return this.element(i,n)},u.prototype.att=function(i,n,t,d,v){return this.attList(i,n,t,d,v)},u.prototype.ent=function(i,n){return this.entity(i,n)},u.prototype.pent=function(i,n){return this.pEntity(i,n)},u.prototype.not=function(i,n){return this.notation(i,n)},u.prototype.up=function(){return this.root()||this.documentObject},u}(f)}).call(void 0)},{"./Utility":214,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLNode":227}],224:[function(w,P,S){"use strict";(function(){var C,T,h,p,f=function(a,c){function s(){this.constructor=a}for(var u in c)l.call(c,u)&&(a[u]=c[u]);return s.prototype=c.prototype,a.prototype=new s,a.__super__=c.prototype,a},l={}.hasOwnProperty;p=w("./Utility").isPlainObject,C=w("./XMLNode"),h=w("./XMLStringifier"),T=w("./XMLStringWriter"),P.exports=function(a){function c(s){c.__super__.constructor.call(this,null),s||(s={}),s.writer||(s.writer=new T),this.options=s,this.stringify=new h(s),this.isDocument=!0}return f(c,a),c.prototype.end=function(s){var u;return s?p(s)&&(u=s,s=this.options.writer.set(u)):s=this.options.writer,s.document(this)},c.prototype.toString=function(s){return this.options.writer.set(s).document(this)},c}(C)}).call(void 0)},{"./Utility":214,"./XMLNode":227,"./XMLStringWriter":231,"./XMLStringifier":232}],225:[function(w,P,S){"use strict";(function(){var C,T,h,p,f,l,a,c,s,u,i,n,t,d,v,b,y,_,m,g={}.hasOwnProperty;m=w("./Utility"),y=m.isObject,b=m.isFunction,_=m.isPlainObject,u=w("./XMLElement"),T=w("./XMLCData"),h=w("./XMLComment"),n=w("./XMLRaw"),v=w("./XMLText"),i=w("./XMLProcessingInstruction"),c=w("./XMLDeclaration"),s=w("./XMLDocType"),p=w("./XMLDTDAttList"),l=w("./XMLDTDEntity"),f=w("./XMLDTDElement"),a=w("./XMLDTDNotation"),C=w("./XMLAttribute"),d=w("./XMLStringifier"),t=w("./XMLStringWriter"),P.exports=function(){function E(o,x,A){var O;o||(o={}),o.writer?_(o.writer)&&(O=o.writer,o.writer=new t(O)):o.writer=new t(o),this.options=o,this.writer=o.writer,this.stringify=new d(o),this.onDataCallback=x||function(){},this.onEndCallback=A||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return E.prototype.node=function(o,x,A){var O;if(o==null)throw new Error("Missing node name");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node");return this.openCurrent(),o=o.valueOf(),x==null&&(x={}),x=x.valueOf(),y(x)||(O=[x,A],A=O[0],x=O[1]),this.currentNode=new u(this,o,x),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,A!=null&&this.text(A),this},E.prototype.element=function(o,x,A){return this.currentNode&&this.currentNode instanceof s?this.dtdElement.apply(this,arguments):this.node(o,x,A)},E.prototype.attribute=function(o,x){var A,O;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode");if(o!=null&&(o=o.valueOf()),y(o))for(A in o)g.call(o,A)&&(O=o[A],this.attribute(A,O));else b(x)&&(x=x.apply()),this.options.skipNullAttributes&&x==null||(this.currentNode.attributes[o]=new C(this,o,x));return this},E.prototype.text=function(o){var x;return this.openCurrent(),x=new v(this,o),this.onData(this.writer.text(x,this.currentLevel+1)),this},E.prototype.cdata=function(o){var x;return this.openCurrent(),x=new T(this,o),this.onData(this.writer.cdata(x,this.currentLevel+1)),this},E.prototype.comment=function(o){var x;return this.openCurrent(),x=new h(this,o),this.onData(this.writer.comment(x,this.currentLevel+1)),this},E.prototype.raw=function(o){var x;return this.openCurrent(),x=new n(this,o),this.onData(this.writer.raw(x,this.currentLevel+1)),this},E.prototype.instruction=function(o,x){var A,O,D,I,F;if(this.openCurrent(),o!=null&&(o=o.valueOf()),x!=null&&(x=x.valueOf()),Array.isArray(o))for(A=0,I=o.length;A<I;A++)O=o[A],this.instruction(O);else if(y(o))for(O in o)g.call(o,O)&&(D=o[O],this.instruction(O,D));else b(x)&&(x=x.apply()),F=new i(this,o,x),this.onData(this.writer.processingInstruction(F,this.currentLevel+1));return this},E.prototype.declaration=function(o,x,A){var O;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node");return O=new c(this,o,x,A),this.onData(this.writer.declaration(O,this.currentLevel+1)),this},E.prototype.doctype=function(o,x,A){if(this.openCurrent(),o==null)throw new Error("Missing root node name");if(this.root)throw new Error("dtd() must come before the root node");return this.currentNode=new s(this,x,A),this.currentNode.rootNodeName=o,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},E.prototype.dtdElement=function(o,x){var A;return this.openCurrent(),A=new f(this,o,x),this.onData(this.writer.dtdElement(A,this.currentLevel+1)),this},E.prototype.attList=function(o,x,A,O,D){var I;return this.openCurrent(),I=new p(this,o,x,A,O,D),this.onData(this.writer.dtdAttList(I,this.currentLevel+1)),this},E.prototype.entity=function(o,x){var A;return this.openCurrent(),A=new l(this,!1,o,x),this.onData(this.writer.dtdEntity(A,this.currentLevel+1)),this},E.prototype.pEntity=function(o,x){var A;return this.openCurrent(),A=new l(this,!0,o,x),this.onData(this.writer.dtdEntity(A,this.currentLevel+1)),this},E.prototype.notation=function(o,x){var A;return this.openCurrent(),A=new a(this,o,x),this.onData(this.writer.dtdNotation(A,this.currentLevel+1)),this},E.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},E.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},E.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},E.prototype.openNode=function(o){if(!o.isOpen)return!this.root&&this.currentLevel===0&&o instanceof u&&(this.root=o),this.onData(this.writer.openNode(o,this.currentLevel)),o.isOpen=!0},E.prototype.closeNode=function(o){if(!o.isClosed)return this.onData(this.writer.closeNode(o,this.currentLevel)),o.isClosed=!0},E.prototype.onData=function(o){return this.documentStarted=!0,this.onDataCallback(o)},E.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},E.prototype.ele=function(){return this.element.apply(this,arguments)},E.prototype.nod=function(o,x,A){return this.node(o,x,A)},E.prototype.txt=function(o){return this.text(o)},E.prototype.dat=function(o){return this.cdata(o)},E.prototype.com=function(o){return this.comment(o)},E.prototype.ins=function(o,x){return this.instruction(o,x)},E.prototype.dec=function(o,x,A){return this.declaration(o,x,A)},E.prototype.dtd=function(o,x,A){return this.doctype(o,x,A)},E.prototype.e=function(o,x,A){return this.element(o,x,A)},E.prototype.n=function(o,x,A){return this.node(o,x,A)},E.prototype.t=function(o){return this.text(o)},E.prototype.d=function(o){return this.cdata(o)},E.prototype.c=function(o){return this.comment(o)},E.prototype.r=function(o){return this.raw(o)},E.prototype.i=function(o,x){return this.instruction(o,x)},E.prototype.att=function(){return this.currentNode&&this.currentNode instanceof s?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},E.prototype.a=function(){return this.currentNode&&this.currentNode instanceof s?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},E.prototype.ent=function(o,x){return this.entity(o,x)},E.prototype.pent=function(o,x){return this.pEntity(o,x)},E.prototype.not=function(o,x){return this.notation(o,x)},E}()}).call(void 0)},{"./Utility":214,"./XMLAttribute":215,"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLStringWriter":231,"./XMLStringifier":232,"./XMLText":233}],226:[function(w,P,S){"use strict";var C=w("babel-runtime/core-js/object/create"),T=function(h){return h&&h.__esModule?h:{default:h}}(C);(function(){var h,p,f,l,a,c=function(u,i){function n(){this.constructor=u}for(var t in i)s.call(i,t)&&(u[t]=i[t]);return n.prototype=i.prototype,u.prototype=new n,u.__super__=i.prototype,u},s={}.hasOwnProperty;a=w("./Utility"),l=a.isObject,f=a.isFunction,p=w("./XMLNode"),h=w("./XMLAttribute"),P.exports=function(u){function i(n,t,d){if(i.__super__.constructor.call(this,n),t==null)throw new Error("Missing element name");this.name=this.stringify.eleName(t),this.attributes={},d!=null&&this.attribute(d),n.isDocument&&(this.isRoot=!0,this.documentObject=n,n.rootObject=this)}return c(i,u),i.prototype.clone=function(){var n,t,d,v;d=(0,T.default)(this),d.isRoot&&(d.documentObject=null),d.attributes={},v=this.attributes;for(t in v)s.call(v,t)&&(n=v[t],d.attributes[t]=n.clone());return d.children=[],this.children.forEach(function(b){var y;return y=b.clone(),y.parent=d,d.children.push(y)}),d},i.prototype.attribute=function(n,t){var d,v;if(n!=null&&(n=n.valueOf()),l(n))for(d in n)s.call(n,d)&&(v=n[d],this.attribute(d,v));else f(t)&&(t=t.apply()),this.options.skipNullAttributes&&t==null||(this.attributes[n]=new h(this,n,t));return this},i.prototype.removeAttribute=function(n){var t,d,v;if(n==null)throw new Error("Missing attribute name");if(n=n.valueOf(),Array.isArray(n))for(d=0,v=n.length;d<v;d++)t=n[d],delete this.attributes[t];else delete this.attributes[n];return this},i.prototype.toString=function(n){return this.options.writer.set(n).element(this)},i.prototype.att=function(n,t){return this.attribute(n,t)},i.prototype.a=function(n,t){return this.attribute(n,t)},i}(p)}).call(void 0)},{"./Utility":214,"./XMLAttribute":215,"./XMLNode":227,"babel-runtime/core-js/object/create":19}],227:[function(w,P,S){"use strict";(function(){var C,T,h,p,f,l,a,c,s,u,i,n,t={}.hasOwnProperty;n=w("./Utility"),i=n.isObject,u=n.isFunction,s=n.isEmpty,f=null,C=null,T=null,h=null,p=null,a=null,c=null,l=null,P.exports=function(){function d(v){this.parent=v,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.children=[],f||(f=w("./XMLElement"),C=w("./XMLCData"),T=w("./XMLComment"),h=w("./XMLDeclaration"),p=w("./XMLDocType"),a=w("./XMLRaw"),c=w("./XMLText"),l=w("./XMLProcessingInstruction"))}return d.prototype.element=function(v,b,y){var _,m,g,E,o,x,A,O,D,I;if(x=null,b==null&&(b={}),b=b.valueOf(),i(b)||(D=[b,y],y=D[0],b=D[1]),v!=null&&(v=v.valueOf()),Array.isArray(v))for(g=0,A=v.length;g<A;g++)m=v[g],x=this.element(m);else if(u(v))x=this.element(v.apply());else if(i(v)){for(o in v)if(t.call(v,o))if(I=v[o],u(I)&&(I=I.apply()),i(I)&&s(I)&&(I=null),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&o.indexOf(this.stringify.convertAttKey)===0)x=this.attribute(o.substr(this.stringify.convertAttKey.length),I);else if(!this.options.separateArrayItems&&Array.isArray(I))for(E=0,O=I.length;E<O;E++)m=I[E],_={},_[o]=m,x=this.element(_);else i(I)?(x=this.element(o),x.element(I)):x=this.element(o,I)}else x=!this.options.ignoreDecorators&&this.stringify.convertTextKey&&v.indexOf(this.stringify.convertTextKey)===0?this.text(y):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&v.indexOf(this.stringify.convertCDataKey)===0?this.cdata(y):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&v.indexOf(this.stringify.convertCommentKey)===0?this.comment(y):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&v.indexOf(this.stringify.convertRawKey)===0?this.raw(y):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&v.indexOf(this.stringify.convertPIKey)===0?this.instruction(v.substr(this.stringify.convertPIKey.length),y):this.node(v,b,y);if(x==null)throw new Error("Could not create any elements with: "+v);return x},d.prototype.insertBefore=function(v,b,y){var _,m,g;if(this.isRoot)throw new Error("Cannot insert elements at root level");return m=this.parent.children.indexOf(this),g=this.parent.children.splice(m),_=this.parent.element(v,b,y),Array.prototype.push.apply(this.parent.children,g),_},d.prototype.insertAfter=function(v,b,y){var _,m,g;if(this.isRoot)throw new Error("Cannot insert elements at root level");return m=this.parent.children.indexOf(this),g=this.parent.children.splice(m+1),_=this.parent.element(v,b,y),Array.prototype.push.apply(this.parent.children,g),_},d.prototype.remove=function(){var v;if(this.isRoot)throw new Error("Cannot remove the root element");return v=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[v,v-v+1].concat([])),this.parent},d.prototype.node=function(v,b,y){var _,m;return v!=null&&(v=v.valueOf()),b||(b={}),b=b.valueOf(),i(b)||(m=[b,y],y=m[0],b=m[1]),_=new f(this,v,b),y!=null&&_.text(y),this.children.push(_),_},d.prototype.text=function(v){var b;return b=new c(this,v),this.children.push(b),this},d.prototype.cdata=function(v){var b;return b=new C(this,v),this.children.push(b),this},d.prototype.comment=function(v){var b;return b=new T(this,v),this.children.push(b),this},d.prototype.commentBefore=function(v){var b,y;return b=this.parent.children.indexOf(this),y=this.parent.children.splice(b),this.parent.comment(v),Array.prototype.push.apply(this.parent.children,y),this},d.prototype.commentAfter=function(v){var b,y;return b=this.parent.children.indexOf(this),y=this.parent.children.splice(b+1),this.parent.comment(v),Array.prototype.push.apply(this.parent.children,y),this},d.prototype.raw=function(v){var b;return b=new a(this,v),this.children.push(b),this},d.prototype.instruction=function(v,b){var y,_,m,g,E;if(v!=null&&(v=v.valueOf()),b!=null&&(b=b.valueOf()),Array.isArray(v))for(g=0,E=v.length;g<E;g++)y=v[g],this.instruction(y);else if(i(v))for(y in v)t.call(v,y)&&(_=v[y],this.instruction(y,_));else u(b)&&(b=b.apply()),m=new l(this,v,b),this.children.push(m);return this},d.prototype.instructionBefore=function(v,b){var y,_;return y=this.parent.children.indexOf(this),_=this.parent.children.splice(y),this.parent.instruction(v,b),Array.prototype.push.apply(this.parent.children,_),this},d.prototype.instructionAfter=function(v,b){var y,_;return y=this.parent.children.indexOf(this),_=this.parent.children.splice(y+1),this.parent.instruction(v,b),Array.prototype.push.apply(this.parent.children,_),this},d.prototype.declaration=function(v,b,y){var _,m;return _=this.document(),m=new h(_,v,b,y),_.children[0]instanceof h?_.children[0]=m:_.children.unshift(m),_.root()||_},d.prototype.doctype=function(v,b){var y,_,m,g,E,o,x,A,O,D;for(_=this.document(),m=new p(_,v,b),O=_.children,g=E=0,x=O.length;E<x;g=++E)if((y=O[g])instanceof p)return _.children[g]=m,m;for(D=_.children,g=o=0,A=D.length;o<A;g=++o)if(y=D[g],y.isRoot)return _.children.splice(g,0,m),m;return _.children.push(m),m},d.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},d.prototype.root=function(){var v;for(v=this;v;){if(v.isDocument)return v.rootObject;if(v.isRoot)return v;v=v.parent}},d.prototype.document=function(){var v;for(v=this;v;){if(v.isDocument)return v;v=v.parent}},d.prototype.end=function(v){return this.document().end(v)},d.prototype.prev=function(){var v;if((v=this.parent.children.indexOf(this))<1)throw new Error("Already at the first node");return this.parent.children[v-1]},d.prototype.next=function(){var v;if((v=this.parent.children.indexOf(this))===-1||v===this.parent.children.length-1)throw new Error("Already at the last node");return this.parent.children[v+1]},d.prototype.importDocument=function(v){var b;return b=v.root().clone(),b.parent=this,b.isRoot=!1,this.children.push(b),this},d.prototype.ele=function(v,b,y){return this.element(v,b,y)},d.prototype.nod=function(v,b,y){return this.node(v,b,y)},d.prototype.txt=function(v){return this.text(v)},d.prototype.dat=function(v){return this.cdata(v)},d.prototype.com=function(v){return this.comment(v)},d.prototype.ins=function(v,b){return this.instruction(v,b)},d.prototype.doc=function(){return this.document()},d.prototype.dec=function(v,b,y){return this.declaration(v,b,y)},d.prototype.dtd=function(v,b){return this.doctype(v,b)},d.prototype.e=function(v,b,y){return this.element(v,b,y)},d.prototype.n=function(v,b,y){return this.node(v,b,y)},d.prototype.t=function(v){return this.text(v)},d.prototype.d=function(v){return this.cdata(v)},d.prototype.c=function(v){return this.comment(v)},d.prototype.r=function(v){return this.raw(v)},d.prototype.i=function(v,b){return this.instruction(v,b)},d.prototype.u=function(){return this.up()},d.prototype.importXMLBuilder=function(v){return this.importDocument(v)},d}()}).call(void 0)},{"./Utility":214,"./XMLCData":216,"./XMLComment":217,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233}],228:[function(w,P,S){"use strict";var C=w("babel-runtime/core-js/object/create"),T=function(h){return h&&h.__esModule?h:{default:h}}(C);(function(){var h,p=function(l,a){function c(){this.constructor=l}for(var s in a)f.call(a,s)&&(l[s]=a[s]);return c.prototype=a.prototype,l.prototype=new c,l.__super__=a.prototype,l},f={}.hasOwnProperty;h=w("./XMLNode"),P.exports=function(l){function a(c,s,u){if(a.__super__.constructor.call(this,c),s==null)throw new Error("Missing instruction target");this.target=this.stringify.insTarget(s),u&&(this.value=this.stringify.insValue(u))}return p(a,l),a.prototype.clone=function(){return(0,T.default)(this)},a.prototype.toString=function(c){return this.options.writer.set(c).processingInstruction(this)},a}(h)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],229:[function(w,P,S){"use strict";var C=w("babel-runtime/core-js/object/create"),T=function(h){return h&&h.__esModule?h:{default:h}}(C);(function(){var h,p=function(l,a){function c(){this.constructor=l}for(var s in a)f.call(a,s)&&(l[s]=a[s]);return c.prototype=a.prototype,l.prototype=new c,l.__super__=a.prototype,l},f={}.hasOwnProperty;h=w("./XMLNode"),P.exports=function(l){function a(c,s){if(a.__super__.constructor.call(this,c),s==null)throw new Error("Missing raw text");this.value=this.stringify.raw(s)}return p(a,l),a.prototype.clone=function(){return(0,T.default)(this)},a.prototype.toString=function(c){return this.options.writer.set(c).raw(this)},a}(h)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],230:[function(w,P,S){"use strict";(function(){var C,T,h,p,f,l,a,c,s,u,i,n,t,d=function(b,y){function _(){this.constructor=b}for(var m in y)v.call(y,m)&&(b[m]=y[m]);return _.prototype=y.prototype,b.prototype=new _,b.__super__=y.prototype,b},v={}.hasOwnProperty;a=w("./XMLDeclaration"),c=w("./XMLDocType"),C=w("./XMLCData"),T=w("./XMLComment"),s=w("./XMLElement"),i=w("./XMLRaw"),n=w("./XMLText"),u=w("./XMLProcessingInstruction"),h=w("./XMLDTDAttList"),p=w("./XMLDTDElement"),f=w("./XMLDTDEntity"),l=w("./XMLDTDNotation"),t=w("./XMLWriterBase"),P.exports=function(b){function y(_,m){y.__super__.constructor.call(this,m),this.stream=_}return d(y,b),y.prototype.document=function(_){var m,g,E,o,x,A,O,D;for(A=_.children,g=0,o=A.length;g<o;g++)m=A[g],m.isLastRootNode=!1;for(_.children[_.children.length-1].isLastRootNode=!0,O=_.children,D=[],E=0,x=O.length;E<x;E++)switch(m=O[E],!1){case!(m instanceof a):D.push(this.declaration(m));break;case!(m instanceof c):D.push(this.docType(m));break;case!(m instanceof T):D.push(this.comment(m));break;case!(m instanceof u):D.push(this.processingInstruction(m));break;default:D.push(this.element(m))}return D},y.prototype.attribute=function(_){return this.stream.write(" "+_.name+'="'+_.value+'"')},y.prototype.cdata=function(_,m){return this.stream.write(this.space(m)+"<![CDATA["+_.text+"]]>"+this.endline(_))},y.prototype.comment=function(_,m){return this.stream.write(this.space(m)+"<!-- "+_.text+" -->"+this.endline(_))},y.prototype.declaration=function(_,m){return this.stream.write(this.space(m)),this.stream.write('<?xml version="'+_.version+'"'),_.encoding!=null&&this.stream.write(' encoding="'+_.encoding+'"'),_.standalone!=null&&this.stream.write(' standalone="'+_.standalone+'"'),this.stream.write(this.spacebeforeslash+"?>"),this.stream.write(this.endline(_))},y.prototype.docType=function(_,m){var g,E,o,x;if(m||(m=0),this.stream.write(this.space(m)),this.stream.write("<!DOCTYPE "+_.root().name),_.pubID&&_.sysID?this.stream.write(' PUBLIC "'+_.pubID+'" "'+_.sysID+'"'):_.sysID&&this.stream.write(' SYSTEM "'+_.sysID+'"'),_.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(_)),x=_.children,E=0,o=x.length;E<o;E++)switch(g=x[E],!1){case!(g instanceof h):this.dtdAttList(g,m+1);break;case!(g instanceof p):this.dtdElement(g,m+1);break;case!(g instanceof f):this.dtdEntity(g,m+1);break;case!(g instanceof l):this.dtdNotation(g,m+1);break;case!(g instanceof C):this.cdata(g,m+1);break;case!(g instanceof T):this.comment(g,m+1);break;case!(g instanceof u):this.processingInstruction(g,m+1);break;default:throw new Error("Unknown DTD node type: "+g.constructor.name)}this.stream.write("]")}return this.stream.write(this.spacebeforeslash+">"),this.stream.write(this.endline(_))},y.prototype.element=function(_,m){var g,E,o,x,A,O,D,I;m||(m=0),I=this.space(m),this.stream.write(I+"<"+_.name),O=_.attributes;for(A in O)v.call(O,A)&&(g=O[A],this.attribute(g));if(_.children.length===0||_.children.every(function(F){return F.value===""}))this.allowEmpty?this.stream.write("></"+_.name+">"):this.stream.write(this.spacebeforeslash+"/>");else if(this.pretty&&_.children.length===1&&_.children[0].value!=null)this.stream.write(">"),this.stream.write(_.children[0].value),this.stream.write("</"+_.name+">");else{for(this.stream.write(">"+this.newline),D=_.children,o=0,x=D.length;o<x;o++)switch(E=D[o],!1){case!(E instanceof C):this.cdata(E,m+1);break;case!(E instanceof T):this.comment(E,m+1);break;case!(E instanceof s):this.element(E,m+1);break;case!(E instanceof i):this.raw(E,m+1);break;case!(E instanceof n):this.text(E,m+1);break;case!(E instanceof u):this.processingInstruction(E,m+1);break;default:throw new Error("Unknown XML node type: "+E.constructor.name)}this.stream.write(I+"</"+_.name+">")}return this.stream.write(this.endline(_))},y.prototype.processingInstruction=function(_,m){return this.stream.write(this.space(m)+"<?"+_.target),_.value&&this.stream.write(" "+_.value),this.stream.write(this.spacebeforeslash+"?>"+this.endline(_))},y.prototype.raw=function(_,m){return this.stream.write(this.space(m)+_.value+this.endline(_))},y.prototype.text=function(_,m){return this.stream.write(this.space(m)+_.value+this.endline(_))},y.prototype.dtdAttList=function(_,m){return this.stream.write(this.space(m)+"<!ATTLIST "+_.elementName+" "+_.attributeName+" "+_.attributeType),_.defaultValueType!=="#DEFAULT"&&this.stream.write(" "+_.defaultValueType),_.defaultValue&&this.stream.write(' "'+_.defaultValue+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(_))},y.prototype.dtdElement=function(_,m){return this.stream.write(this.space(m)+"<!ELEMENT "+_.name+" "+_.value),this.stream.write(this.spacebeforeslash+">"+this.endline(_))},y.prototype.dtdEntity=function(_,m){return this.stream.write(this.space(m)+"<!ENTITY"),_.pe&&this.stream.write(" %"),this.stream.write(" "+_.name),_.value?this.stream.write(' "'+_.value+'"'):(_.pubID&&_.sysID?this.stream.write(' PUBLIC "'+_.pubID+'" "'+_.sysID+'"'):_.sysID&&this.stream.write(' SYSTEM "'+_.sysID+'"'),_.nData&&this.stream.write(" NDATA "+_.nData)),this.stream.write(this.spacebeforeslash+">"+this.endline(_))},y.prototype.dtdNotation=function(_,m){return this.stream.write(this.space(m)+"<!NOTATION "+_.name),_.pubID&&_.sysID?this.stream.write(' PUBLIC "'+_.pubID+'" "'+_.sysID+'"'):_.pubID?this.stream.write(' PUBLIC "'+_.pubID+'"'):_.sysID&&this.stream.write(' SYSTEM "'+_.sysID+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(_))},y.prototype.endline=function(_){return _.isLastRootNode?"":this.newline},y}(t)}).call(void 0)},{"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233,"./XMLWriterBase":234}],231:[function(w,P,S){"use strict";(function(){var C,T,h,p,f,l,a,c,s,u,i,n,t,d=function(b,y){function _(){this.constructor=b}for(var m in y)v.call(y,m)&&(b[m]=y[m]);return _.prototype=y.prototype,b.prototype=new _,b.__super__=y.prototype,b},v={}.hasOwnProperty;a=w("./XMLDeclaration"),c=w("./XMLDocType"),C=w("./XMLCData"),T=w("./XMLComment"),s=w("./XMLElement"),i=w("./XMLRaw"),n=w("./XMLText"),u=w("./XMLProcessingInstruction"),h=w("./XMLDTDAttList"),p=w("./XMLDTDElement"),f=w("./XMLDTDEntity"),l=w("./XMLDTDNotation"),t=w("./XMLWriterBase"),P.exports=function(b){function y(_){y.__super__.constructor.call(this,_)}return d(y,b),y.prototype.document=function(_){var m,g,E,o,x;for(this.textispresent=!1,o="",x=_.children,g=0,E=x.length;g<E;g++)m=x[g],o+=function(){switch(!1){case!(m instanceof a):return this.declaration(m);case!(m instanceof c):return this.docType(m);case!(m instanceof T):return this.comment(m);case!(m instanceof u):return this.processingInstruction(m);default:return this.element(m,0)}}.call(this);return this.pretty&&o.slice(-this.newline.length)===this.newline&&(o=o.slice(0,-this.newline.length)),o},y.prototype.attribute=function(_){return" "+_.name+'="'+_.value+'"'},y.prototype.cdata=function(_,m){return this.space(m)+"<![CDATA["+_.text+"]]>"+this.newline},y.prototype.comment=function(_,m){return this.space(m)+"<!-- "+_.text+" -->"+this.newline},y.prototype.declaration=function(_,m){var g;return g=this.space(m),g+='<?xml version="'+_.version+'"',_.encoding!=null&&(g+=' encoding="'+_.encoding+'"'),_.standalone!=null&&(g+=' standalone="'+_.standalone+'"'),g+=this.spacebeforeslash+"?>",g+=this.newline},y.prototype.docType=function(_,m){var g,E,o,x,A;if(m||(m=0),x=this.space(m),x+="<!DOCTYPE "+_.root().name,_.pubID&&_.sysID?x+=' PUBLIC "'+_.pubID+'" "'+_.sysID+'"':_.sysID&&(x+=' SYSTEM "'+_.sysID+'"'),_.children.length>0){for(x+=" [",x+=this.newline,A=_.children,E=0,o=A.length;E<o;E++)g=A[E],x+=function(){switch(!1){case!(g instanceof h):return this.dtdAttList(g,m+1);case!(g instanceof p):return this.dtdElement(g,m+1);case!(g instanceof f):return this.dtdEntity(g,m+1);case!(g instanceof l):return this.dtdNotation(g,m+1);case!(g instanceof C):return this.cdata(g,m+1);case!(g instanceof T):return this.comment(g,m+1);case!(g instanceof u):return this.processingInstruction(g,m+1);default:throw new Error("Unknown DTD node type: "+g.constructor.name)}}.call(this);x+="]"}return x+=this.spacebeforeslash+">",x+=this.newline},y.prototype.element=function(_,m){var g,E,o,x,A,O,D,I,F,z,ne,j,G;m||(m=0),G=!1,this.textispresent?(this.newline="",this.pretty=!1):(this.newline=this.newlinedefault,this.pretty=this.prettydefault),j=this.space(m),I="",I+=j+"<"+_.name,F=_.attributes;for(D in F)v.call(F,D)&&(g=F[D],I+=this.attribute(g));if(_.children.length===0||_.children.every(function(X){return X.value===""}))this.allowEmpty?I+="></"+_.name+">"+this.newline:I+=this.spacebeforeslash+"/>"+this.newline;else if(this.pretty&&_.children.length===1&&_.children[0].value!=null)I+=">",I+=_.children[0].value,I+="</"+_.name+">"+this.newline;else{if(this.dontprettytextnodes){for(z=_.children,o=0,A=z.length;o<A;o++)if(E=z[o],E.value!=null){this.textispresent++,G=!0;break}}for(this.textispresent&&(this.newline="",this.pretty=!1,j=this.space(m)),I+=">"+this.newline,ne=_.children,x=0,O=ne.length;x<O;x++)E=ne[x],I+=function(){switch(!1){case!(E instanceof C):return this.cdata(E,m+1);case!(E instanceof T):return this.comment(E,m+1);case!(E instanceof s):return this.element(E,m+1);case!(E instanceof i):return this.raw(E,m+1);case!(E instanceof n):return this.text(E,m+1);case!(E instanceof u):return this.processingInstruction(E,m+1);default:throw new Error("Unknown XML node type: "+E.constructor.name)}}.call(this);G&&this.textispresent--,this.textispresent||(this.newline=this.newlinedefault,this.pretty=this.prettydefault),I+=j+"</"+_.name+">"+this.newline}return I},y.prototype.processingInstruction=function(_,m){var g;return g=this.space(m)+"<?"+_.target,_.value&&(g+=" "+_.value),g+=this.spacebeforeslash+"?>"+this.newline},y.prototype.raw=function(_,m){return this.space(m)+_.value+this.newline},y.prototype.text=function(_,m){return this.space(m)+_.value+this.newline},y.prototype.dtdAttList=function(_,m){var g;return g=this.space(m)+"<!ATTLIST "+_.elementName+" "+_.attributeName+" "+_.attributeType,_.defaultValueType!=="#DEFAULT"&&(g+=" "+_.defaultValueType),_.defaultValue&&(g+=' "'+_.defaultValue+'"'),g+=this.spacebeforeslash+">"+this.newline},y.prototype.dtdElement=function(_,m){return this.space(m)+"<!ELEMENT "+_.name+" "+_.value+this.spacebeforeslash+">"+this.newline},y.prototype.dtdEntity=function(_,m){var g;return g=this.space(m)+"<!ENTITY",_.pe&&(g+=" %"),g+=" "+_.name,_.value?g+=' "'+_.value+'"':(_.pubID&&_.sysID?g+=' PUBLIC "'+_.pubID+'" "'+_.sysID+'"':_.sysID&&(g+=' SYSTEM "'+_.sysID+'"'),_.nData&&(g+=" NDATA "+_.nData)),g+=this.spacebeforeslash+">"+this.newline},y.prototype.dtdNotation=function(_,m){var g;return g=this.space(m)+"<!NOTATION "+_.name,_.pubID&&_.sysID?g+=' PUBLIC "'+_.pubID+'" "'+_.sysID+'"':_.pubID?g+=' PUBLIC "'+_.pubID+'"':_.sysID&&(g+=' SYSTEM "'+_.sysID+'"'),g+=this.spacebeforeslash+">"+this.newline},y.prototype.openNode=function(_,m){var g,E,o,x;if(m||(m=0),_ instanceof s){o=this.space(m)+"<"+_.name,x=_.attributes;for(E in x)v.call(x,E)&&(g=x[E],o+=this.attribute(g));return o+=(_.children?">":"/>")+this.newline}return o=this.space(m)+"<!DOCTYPE "+_.rootNodeName,_.pubID&&_.sysID?o+=' PUBLIC "'+_.pubID+'" "'+_.sysID+'"':_.sysID&&(o+=' SYSTEM "'+_.sysID+'"'),o+=(_.children?" [":">")+this.newline},y.prototype.closeNode=function(_,m){switch(m||(m=0),!1){case!(_ instanceof s):return this.space(m)+"</"+_.name+">"+this.newline;case!(_ instanceof c):return this.space(m)+"]>"+this.newline}},y}(t)}).call(void 0)},{"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233,"./XMLWriterBase":234}],232:[function(w,P,S){"use strict";(function(){var C=function(h,p){return function(){return h.apply(p,arguments)}},T={}.hasOwnProperty;P.exports=function(){function h(p){this.assertLegalChar=C(this.assertLegalChar,this);var f,l,a;p||(p={}),this.noDoubleEncoding=p.noDoubleEncoding,l=p.stringify||{};for(f in l)T.call(l,f)&&(a=l[f],this[f]=a)}return h.prototype.eleName=function(p){return p=""+p||"",this.assertLegalChar(p)},h.prototype.eleText=function(p){return p=""+p||"",this.assertLegalChar(this.elEscape(p))},h.prototype.cdata=function(p){return p=""+p||"",p=p.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(p)},h.prototype.comment=function(p){if(p=""+p||"",p.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+p);return this.assertLegalChar(p)},h.prototype.raw=function(p){return""+p||""},h.prototype.attName=function(p){return p=""+p||""},h.prototype.attValue=function(p){return p=""+p||"",this.attEscape(p)},h.prototype.insTarget=function(p){return""+p||""},h.prototype.insValue=function(p){if(p=""+p||"",p.match(/\?>/))throw new Error("Invalid processing instruction value: "+p);return p},h.prototype.xmlVersion=function(p){if(p=""+p||"",!p.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+p);return p},h.prototype.xmlEncoding=function(p){if(p=""+p||"",!p.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+p);return p},h.prototype.xmlStandalone=function(p){return p?"yes":"no"},h.prototype.dtdPubID=function(p){return""+p||""},h.prototype.dtdSysID=function(p){return""+p||""},h.prototype.dtdElementValue=function(p){return""+p||""},h.prototype.dtdAttType=function(p){return""+p||""},h.prototype.dtdAttDefault=function(p){return p!=null?""+p||"":p},h.prototype.dtdEntityValue=function(p){return""+p||""},h.prototype.dtdNData=function(p){return""+p||""},h.prototype.convertAttKey="@",h.prototype.convertPIKey="?",h.prototype.convertTextKey="#text",h.prototype.convertCDataKey="#cdata",h.prototype.convertCommentKey="#comment",h.prototype.convertRawKey="#raw",h.prototype.assertLegalChar=function(p){var f;if(f=p.match(/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/))throw new Error("Invalid character in string: "+p+" at index "+f.index);return p},h.prototype.elEscape=function(p){var f;return f=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,p.replace(f,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;")},h.prototype.attEscape=function(p){var f;return f=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,p.replace(f,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;")},h}()}).call(void 0)},{}],233:[function(w,P,S){"use strict";var C=w("babel-runtime/core-js/object/create"),T=function(h){return h&&h.__esModule?h:{default:h}}(C);(function(){var h,p=function(l,a){function c(){this.constructor=l}for(var s in a)f.call(a,s)&&(l[s]=a[s]);return c.prototype=a.prototype,l.prototype=new c,l.__super__=a.prototype,l},f={}.hasOwnProperty;h=w("./XMLNode"),P.exports=function(l){function a(c,s){if(a.__super__.constructor.call(this,c),s==null)throw new Error("Missing element text");this.value=this.stringify.eleText(s)}return p(a,l),a.prototype.clone=function(){return(0,T.default)(this)},a.prototype.toString=function(c){return this.options.writer.set(c).text(this)},a}(h)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],234:[function(w,P,S){"use strict";(function(){var C={}.hasOwnProperty;P.exports=function(){function T(h){var p,f,l,a,c,s,u,i,n;h||(h={}),this.pretty=h.pretty||!1,this.allowEmpty=(f=h.allowEmpty)!=null&&f,this.pretty?(this.indent=(l=h.indent)!=null?l:" ",this.newline=(a=h.newline)!=null?a:`
`,this.offset=(c=h.offset)!=null?c:0,this.dontprettytextnodes=(s=h.dontprettytextnodes)!=null?s:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash=(u=h.spacebeforeslash)!=null?u:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,i=h.writer||{};for(p in i)C.call(i,p)&&(n=i[p],this[p]=n)}return T.prototype.set=function(h){var p,f,l;h||(h={}),"pretty"in h&&(this.pretty=h.pretty),"allowEmpty"in h&&(this.allowEmpty=h.allowEmpty),this.pretty?(this.indent="indent"in h?h.indent:" ",this.newline="newline"in h?h.newline:`
`,this.offset="offset"in h?h.offset:0,this.dontprettytextnodes="dontprettytextnodes"in h?h.dontprettytextnodes:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash="spacebeforeslash"in h?h.spacebeforeslash:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,f=h.writer||{};for(p in f)C.call(f,p)&&(l=f[p],this[p]=l);return this},T.prototype.space=function(h){var p;return this.pretty?(p=(h||0)+this.offset+1,p>0?new Array(p).join(this.indent):""):""},T}()}).call(void 0)},{}],235:[function(w,P,S){"use strict";(function(){var C,T,h,p,f,l,a;a=w("./Utility"),f=a.assign,l=a.isFunction,C=w("./XMLDocument"),T=w("./XMLDocumentCB"),p=w("./XMLStringWriter"),h=w("./XMLStreamWriter"),P.exports.create=function(c,s,u,i){var n,t;if(c==null)throw new Error("Root element needs a name");return i=f({},s,u,i),n=new C(i),t=n.element(c),i.headless||(n.declaration(i),i.pubID==null&&i.sysID==null||n.doctype(i)),t},P.exports.begin=function(c,s,u){var i;return l(c)&&(i=[c,s],s=i[0],u=i[1],c={}),s?new T(c,s,u):new C(c)},P.exports.stringWriter=function(c){return new p(c)},P.exports.streamWriter=function(c,s){return new h(c,s)}}).call(void 0)},{"./Utility":214,"./XMLDocument":224,"./XMLDocumentCB":225,"./XMLStreamWriter":230,"./XMLStringWriter":231}],236:[function(w,P,S){function C(){for(var h={},p=0;p<arguments.length;p++){var f=arguments[p];for(var l in f)T.call(f,l)&&(h[l]=f[l])}return h}P.exports=C;var T=Object.prototype.hasOwnProperty},{}],237:[function(w,P,S){"use strict";function C(i,n,t){p.isBuffer(n)||(n=new p(n)),p.isBuffer(t)||(t=new p(t)),n.length>s?n=i(n):n.length<s&&(n=p.concat([n,u],s));for(var d=new p(s),v=new p(s),b=0;b<s;b++)d[b]=54^n[b],v[b]=92^n[b];var y=i(p.concat([d,t]));return i(p.concat([v,y]))}function T(i,n){i=i||"sha1";var t=c[i],d=[],v=0;return t||h("algorithm:",i,"is not yet supported"),{update:function(b){return p.isBuffer(b)||(b=new p(b)),d.push(b),v+=b.length,this},digest:function(b){var y=p.concat(d),_=n?C(t,n,y):t(y);return d=null,b?_.toString(b):_}}}function h(){var i=[].slice.call(arguments).join(" ");throw new Error([i,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
`))}var p=w("buffer").Buffer,f=w("./sha"),l=w("./sha256"),a=w("./md5"),c={sha1:f,sha256:l,md5:a},s=64,u=new p(s);u.fill(0),S.createHash=function(i){return T(i)},S.createHmac=function(i,n){return T(i,n)},function(i,n){for(var t in i)n(i[t],t)}(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],function(i){S[i]=function(){h("sorry,",i,"is not implemented yet")}})},{"./md5":239,"./sha":240,"./sha256":241,buffer:38}],238:[function(w,P,S){"use strict";function C(c,s){if(c.length%f!=0){var u=c.length+(f-c.length%f);c=p.concat([c,l],u)}for(var i=[],n=s?c.readInt32BE:c.readInt32LE,t=0;t<c.length;t+=f)i.push(n.call(c,t));return i}function T(c,s,u){for(var i=new p(s),n=u?i.writeInt32BE:i.writeInt32LE,t=0;t<c.length;t++)n.call(i,c[t],4*t,!0);return i}function h(c,s,u,i){return p.isBuffer(c)||(c=new p(c)),T(s(C(c,i),c.length*a),u,i)}var p=w("buffer").Buffer,f=4,l=new p(f);l.fill(0);var a=8;P.exports={hash:h}},{buffer:38}],239:[function(w,P,S){"use strict";function C(u,i){u[i>>5]|=128<<i%32,u[14+(i+64>>>9<<4)]=i;for(var n=1732584193,t=-271733879,d=-1732584194,v=271733878,b=0;b<u.length;b+=16){var y=n,_=t,m=d,g=v;n=h(n,t,d,v,u[b+0],7,-680876936),v=h(v,n,t,d,u[b+1],12,-389564586),d=h(d,v,n,t,u[b+2],17,606105819),t=h(t,d,v,n,u[b+3],22,-1044525330),n=h(n,t,d,v,u[b+4],7,-176418897),v=h(v,n,t,d,u[b+5],12,1200080426),d=h(d,v,n,t,u[b+6],17,-1473231341),t=h(t,d,v,n,u[b+7],22,-45705983),n=h(n,t,d,v,u[b+8],7,1770035416),v=h(v,n,t,d,u[b+9],12,-1958414417),d=h(d,v,n,t,u[b+10],17,-42063),t=h(t,d,v,n,u[b+11],22,-1990404162),n=h(n,t,d,v,u[b+12],7,1804603682),v=h(v,n,t,d,u[b+13],12,-40341101),d=h(d,v,n,t,u[b+14],17,-1502002290),t=h(t,d,v,n,u[b+15],22,1236535329),n=p(n,t,d,v,u[b+1],5,-165796510),v=p(v,n,t,d,u[b+6],9,-1069501632),d=p(d,v,n,t,u[b+11],14,643717713),t=p(t,d,v,n,u[b+0],20,-373897302),n=p(n,t,d,v,u[b+5],5,-701558691),v=p(v,n,t,d,u[b+10],9,38016083),d=p(d,v,n,t,u[b+15],14,-660478335),t=p(t,d,v,n,u[b+4],20,-405537848),n=p(n,t,d,v,u[b+9],5,568446438),v=p(v,n,t,d,u[b+14],9,-1019803690),d=p(d,v,n,t,u[b+3],14,-187363961),t=p(t,d,v,n,u[b+8],20,1163531501),n=p(n,t,d,v,u[b+13],5,-1444681467),v=p(v,n,t,d,u[b+2],9,-51403784),d=p(d,v,n,t,u[b+7],14,1735328473),t=p(t,d,v,n,u[b+12],20,-1926607734),n=f(n,t,d,v,u[b+5],4,-378558),v=f(v,n,t,d,u[b+8],11,-2022574463),d=f(d,v,n,t,u[b+11],16,1839030562),t=f(t,d,v,n,u[b+14],23,-35309556),n=f(n,t,d,v,u[b+1],4,-1530992060),v=f(v,n,t,d,u[b+4],11,1272893353),d=f(d,v,n,t,u[b+7],16,-155497632),t=f(t,d,v,n,u[b+10],23,-1094730640),n=f(n,t,d,v,u[b+13],4,681279174),v=f(v,n,t,d,u[b+0],11,-358537222),d=f(d,v,n,t,u[b+3],16,-722521979),t=f(t,d,v,n,u[b+6],23,76029189),n=f(n,t,d,v,u[b+9],4,-640364487),v=f(v,n,t,d,u[b+12],11,-421815835),d=f(d,v,n,t,u[b+15],16,530742520),t=f(t,d,v,n,u[b+2],23,-995338651),n=l(n,t,d,v,u[b+0],6,-198630844),v=l(v,n,t,d,u[b+7],10,1126891415),d=l(d,v,n,t,u[b+14],15,-1416354905),t=l(t,d,v,n,u[b+5],21,-57434055),n=l(n,t,d,v,u[b+12],6,1700485571),v=l(v,n,t,d,u[b+3],10,-1894986606),d=l(d,v,n,t,u[b+10],15,-1051523),t=l(t,d,v,n,u[b+1],21,-2054922799),n=l(n,t,d,v,u[b+8],6,1873313359),v=l(v,n,t,d,u[b+15],10,-30611744),d=l(d,v,n,t,u[b+6],15,-1560198380),t=l(t,d,v,n,u[b+13],21,1309151649),n=l(n,t,d,v,u[b+4],6,-145523070),v=l(v,n,t,d,u[b+11],10,-1120210379),d=l(d,v,n,t,u[b+2],15,718787259),t=l(t,d,v,n,u[b+9],21,-343485551),n=a(n,y),t=a(t,_),d=a(d,m),v=a(v,g)}return Array(n,t,d,v)}function T(u,i,n,t,d,v){return a(c(a(a(i,u),a(t,v)),d),n)}function h(u,i,n,t,d,v,b){return T(i&n|~i&t,u,i,d,v,b)}function p(u,i,n,t,d,v,b){return T(i&t|n&~t,u,i,d,v,b)}function f(u,i,n,t,d,v,b){return T(i^n^t,u,i,d,v,b)}function l(u,i,n,t,d,v,b){return T(n^(i|~t),u,i,d,v,b)}function a(u,i){var n=(65535&u)+(65535&i);return(u>>16)+(i>>16)+(n>>16)<<16|65535&n}function c(u,i){return u<<i|u>>>32-i}var s=w("./helpers");P.exports=function(u){return s.hash(u,C,16)}},{"./helpers":238}],240:[function(w,P,S){"use strict";function C(a,c){a[c>>5]|=128<<24-c%32,a[15+(c+64>>9<<4)]=c;for(var s=Array(80),u=1732584193,i=-271733879,n=-1732584194,t=271733878,d=-1009589776,v=0;v<a.length;v+=16){for(var b=u,y=i,_=n,m=t,g=d,E=0;E<80;E++){s[E]=E<16?a[v+E]:f(s[E-3]^s[E-8]^s[E-14]^s[E-16],1);var o=p(p(f(u,5),T(E,i,n,t)),p(p(d,s[E]),h(E)));d=t,t=n,n=f(i,30),i=u,u=o}u=p(u,b),i=p(i,y),n=p(n,_),t=p(t,m),d=p(d,g)}return Array(u,i,n,t,d)}function T(a,c,s,u){return a<20?c&s|~c&u:a<40?c^s^u:a<60?c&s|c&u|s&u:c^s^u}function h(a){return a<20?1518500249:a<40?1859775393:a<60?-1894007588:-899497514}function p(a,c){var s=(65535&a)+(65535&c);return(a>>16)+(c>>16)+(s>>16)<<16|65535&s}function f(a,c){return a<<c|a>>>32-c}var l=w("./helpers");P.exports=function(a){return l.hash(a,C,20,!0)}},{"./helpers":238}],241:[function(w,P,S){"use strict";var C=w("./helpers"),T=function(n,t){var d=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(d>>16)<<16|65535&d},h=function(n,t){return n>>>t|n<<32-t},p=function(n,t){return n>>>t},f=function(n,t,d){return n&t^~n&d},l=function(n,t,d){return n&t^n&d^t&d},a=function(n){return h(n,2)^h(n,13)^h(n,22)},c=function(n){return h(n,6)^h(n,11)^h(n,25)},s=function(n){return h(n,7)^h(n,18)^p(n,3)},u=function(n){return h(n,17)^h(n,19)^p(n,10)},i=function(n,t){var d,v,b,y,_,m,g,E,o,x,A,O,D=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),I=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),F=new Array(64);n[t>>5]|=128<<24-t%32,n[15+(t+64>>9<<4)]=t;for(var o=0;o<n.length;o+=16){d=I[0],v=I[1],b=I[2],y=I[3],_=I[4],m=I[5],g=I[6],E=I[7];for(var x=0;x<64;x++)F[x]=x<16?n[x+o]:T(T(T(u(F[x-2]),F[x-7]),s(F[x-15])),F[x-16]),A=T(T(T(T(E,c(_)),f(_,m,g)),D[x]),F[x]),O=T(a(d),l(d,v,b)),E=g,g=m,m=_,_=T(y,A),y=b,b=v,v=d,d=T(A,O);I[0]=T(d,I[0]),I[1]=T(v,I[1]),I[2]=T(b,I[2]),I[3]=T(y,I[3]),I[4]=T(_,I[4]),I[5]=T(m,I[5]),I[6]=T(g,I[6]),I[7]=T(E,I[7])}return I};P.exports=function(n){return C.hash(n,i,32,!0)}},{"./helpers":238}],242:[function(w,P,S){(function(C){"use strict";function T(i){return i&&i.__esModule?i:{default:i}}var h=w("babel-runtime/core-js/object/create"),p=T(h),f=w("babel-runtime/helpers/classCallCheck"),l=T(f),a=w("babel-runtime/helpers/createClass"),c=T(a),s=w("babel-runtime/helpers/typeof"),u=T(s);!function(i){if((S===void 0?"undefined":(0,u.default)(S))==="object"&&P!==void 0)P.exports=i();else if(typeof U=="function"&&U.amd)U([],i);else{var n;n=typeof window!="undefined"?window:C!==void 0?C:typeof self!="undefined"?self:this,n.mime=i()}}(function(){return function i(n,t,d){function v(_,m){if(!t[_]){if(!n[_]){var g=typeof w=="function"&&w;if(!m&&g)return g(_,!0);if(b)return b(_,!0);var E=new Error("Cannot find module '"+_+"'");throw E.code="MODULE_NOT_FOUND",E}var o=t[_]={exports:{}};n[_][0].call(o.exports,function(x){var A=n[_][1][x];return v(A||x)},o,o.exports,i,n,t,d)}return t[_].exports}for(var b=typeof w=="function"&&w,y=0;y<d.length;y++)v(d[y]);return v}({1:[function(i,n,t){var d=function(){function v(){(0,l.default)(this,v),this._types=(0,p.default)(null),this._extensions=(0,p.default)(null);for(var b=0;b<arguments.length;b++)this.define(arguments[b])}return(0,c.default)(v,[{key:"define",value:function(b,y){for(var _ in b){for(var m=b[_],g=0;g<m.length;g++){var E=m[g];if(!y&&E in this._types)throw new Error('Attempt to change mapping for "'+E+'" extension from "'+this._types[E]+'" to "'+_+'". Pass `force=true` to allow this, otherwise remove "'+E+'" from the list of extensions for "'+_+'".');this._types[E]=_}!y&&this._extensions[_]||(this._extensions[_]=m[0])}}},{key:"getType",value:function(b){b=String(b);var y=b.replace(/^.*[\/\\]/,"").toLowerCase(),_=y.replace(/^.*\./,"").toLowerCase(),m=y.length<b.length;return(_.length<y.length-1||!m)&&this._types[_]||null}},{key:"getExtension",value:function(b){return(b=/^\s*([^;\s]*)/.test(b)&&RegExp.$1)&&this._extensions[b.toLowerCase()]||null}}]),v}();n.exports=d},{}],2:[function(i,n,t){var d=i("./Mime");n.exports=new d(i("./types/standard"),i("./types/other"))},{"./Mime":1,"./types/other":3,"./types/standard":4}],3:[function(i,n,t){n.exports={"application/prs.cww":["cww"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":[],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":[],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-otf":[],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-ttf":["ttf","ttc"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":[],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":[],"application/x-msdownload":["com","bat"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["wmf","emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":[],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":[],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":[],"audio/x-wav":[],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":[],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":[],"image/x-pcx":["pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":[],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}},{}],4:[function(i,n,t){n.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomsvc+xml":["atomsvc"],"application/bdoc":["bdoc"],"application/ccxml+xml":["ccxml"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/font-tdpfr":["pfr"],"application/font-woff":["woff"],"application/font-woff2":["woff2"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/pskc+xml":["pskcxml"],"application/rdf+xml":["rdf"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/voicexml+xml":["vxml"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-diff+xml":["xdf"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":[],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mp3":[],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":[],"audio/webm":["weba"],"audio/xm":["xm"],"font/otf":["otf"],"image/apng":["apng"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/g3fax":["g3"],"image/gif":["gif"],"image/ief":["ief"],"image/jpeg":["jpeg","jpg","jpe"],"image/ktx":["ktx"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/tiff":["tiff","tif"],"image/webp":["webp"],"message/rfc822":["eml","mime"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["x3db","x3dbz"],"model/x3d+vrml":["x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/hjson":["hjson"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":[],"text/sgml":["sgml","sgm"],"text/slim":["slim","slm"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":[],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}},{}]},{},[2])(2)})}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"babel-runtime/core-js/object/create":19,"babel-runtime/helpers/classCallCheck":30,"babel-runtime/helpers/createClass":31,"babel-runtime/helpers/typeof":32}],243:[function(w,P,S){"use strict";S.encodeURIComponent=function(C){try{return encodeURIComponent(C)}catch(T){return C}},S.escape=w("escape-html"),S.timestamp=function(C){if(C){var T=C;return typeof T=="string"&&(T=Number(T)),String(C).length===10&&(T*=1e3),new Date(T)}return Math.round(Date.now()/1e3)}},{"escape-html":157}],244:[function(w,P,S){(function(C,T){"use strict";function h(E){return E&&E.__esModule?E:{default:E}}function p(E,o){return E===void 0?o:E}function f(E,o){return function(x,A,O){if(x)return o(x);E({data:A,status:O.statusCode,headers:O.headers,res:O})}}var l,a=w("babel-runtime/core-js/json/stringify"),c=h(a),s=w("babel-runtime/helpers/typeof"),u=h(s),i=w("util"),n=w("url"),t=w("http"),d=w("https"),v=w("debug")("urllib"),b=w("humanize-ms"),y=0,_=Math.pow(2,31)-10,m=/^https?:\/\//i;S.TIMEOUTS=[b("300s"),b("300s")];var g=["json","text"];S.request=function(E,o,x){return arguments.length===2&&typeof o=="function"&&(x=o,o=null),typeof x=="function"?S.requestWithCallback(E,o,x):(l||(l=w("any-promise")),new l(function(A,O){S.requestWithCallback(E,o,f(A,O))}))},S.requestWithCallback=function(E,o,x){function A(){Xe&&(clearTimeout(Xe),Xe=null)}function O(){ee&&(clearTimeout(ee),ee=null)}function D(He,Pe,Re){if(O(),!x)return console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),X,C.pid,fe.method,E),void(He&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
stack: %s`,Date(),X,C.pid,He.name,He.message,He.stack));var Oe=x;x=null;var he={};if(Re&&(Y=Re.statusCode,he=Re.headers),Y===401&&he["www-authenticate"]&&(!o.headers||!o.headers.Authorization)&&o.digestAuth){var be=he["www-authenticate"];if(be.indexOf("Digest ")>=0)return v("Request#%d %s: got digest auth header WWW-Authenticate: %s",X,E,be),o.headers=o.headers||{},o.headers.Authorization=digestAuthHeader(fe.method,fe.path,be,o.digestAuth),v("Request#%d %s: auth with digest header: %s",X,E,o.headers.Authorization),Re.headers["set-cookie"]&&(o.headers.Cookie=Re.headers["set-cookie"].join(";")),S.requestWithCallback(E,o,Oe)}var Ce=Date.now()-q;Le&&(Le.contentDownload=Ce),v("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Ce,V,Y,fe.method,fe.host,fe.path,$,Le);var xe={status:Y,statusCode:Y,headers:he,size:V,aborted:me,rt:Ce,keepAliveSocket:$,data:Pe,requestUrls:o.requestUrls,timing:Le,remoteAddress:Ae,remotePort:at};if(He){var Be="";pe&&typeof pe.getCurrentStatus=="function"&&(Be=", agent status: "+(0,c.default)(pe.getCurrentStatus())),He.message+=", "+fe.method+" "+E+" "+Y+" (connected: "+N+", keepalive socket: "+$+Be+`)
headers: `+(0,c.default)(he),He.data=Pe,He.path=fe.path,He.status=Y,He.headers=he,He.res=xe}Oe(He,Pe,o.streaming?Re:xe),o.emitter&&(Z.url=E,Z.socket=Ve&&Ve.connection,Z.options=fe,Z.size=Ie,o.emitter.emit("response",{requestId:X,error:He,ctx:o.ctx,req:Z,res:xe}))}function I(He){var Pe=null;if(o.followRedirect&&statuses.redirect[He.statusCode]){o._followRedirectCount=(o._followRedirectCount||0)+1;var Re=He.headers.location;if(Re){if(!(o._followRedirectCount>o.maxRedirects)){var Oe=o.formatRedirectUrl?o.formatRedirectUrl(E,Re):n.resolve(E,Re);v("Request#%d %s: `redirected` from %s to %s",X,fe.path,E,Oe),O(),o.headers&&o.headers.Host&&m.test(Re)&&(o.headers.Host=null);var he=x;return x=null,S.requestWithCallback(Oe,o,he),{redirect:!0,error:null}}Pe=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+E),Pe.name="MaxRedirectError"}else Pe=new Error("Got statusCode "+He.statusCode+" but cannot resolve next location from headers"),Pe.name="FollowRedirectError"}return{redirect:!1,error:Pe}}function F(He,Pe,Re){return Re(null,Pe,He.headers["content-encoding"])}function z(He){if(Le&&(Le.waiting=Date.now()-q),v("Request#%d %s `req response` event emit: status %d, headers: %j",X,E,He.statusCode,He.headers),o.streaming){var Pe=I(He);return Pe.redirect?void He.resume():Pe.error?(He.resume(),D(Pe.error,null,He)):D(null,null,He)}if(He.on("close",function(){v("Request#%d %s: `res close` event emit, total size %d",X,E,V)}),He.on("error",function(){v("Request#%d %s: `res error` event emit, total size %d",X,E,V)}),He.on("aborted",function(){me=!0,v("Request#%d %s: `res aborted` event emit, total size %d",X,E,V)}),ke){var Pe=I(He);return Pe.redirect?void He.resume():Pe.error?(He.resume(),ke.end(),D(Pe.error,null,He)):(o.consumeWriteStream===!1?He.on("end",D.bind(null,null,null,He)):isNode010||isNode012?first([[ke,"close"],[He,"aborted"]],function(he,be,Ce){v("Request#%d %s: writeStream or res %s event emitted",X,E,Ce),D(k||null,null,He)}):ke.on("close",function(){v("Request#%d %s: writeStream close event emitted",X,E),D(k||null,null,He)}),He.pipe(ke))}var Re=[];He.on("data",function(Oe){v("Request#%d %s: `res data` event emit, size %d",X,E,Oe.length),V+=Oe.length,Re.push(Oe)}),He.on("end",function(){var Oe=T.concat(Re,V);if(v("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",X,E,V,He._dumped),k)return D(k,Oe,He);var he=I(He);if(he.error)return D(he.error,Oe,He);he.redirect||F(He,Oe,function(be,Ce,xe){if(be)return D(be,Oe,He);if(!xe&&g.indexOf(o.dataType)>=0){try{Ce=decodeBodyByCharset(Ce,He)}catch(Qe){return v("decodeBodyByCharset error: %s",Qe),D(null,Ce,He)}if(o.dataType==="json")if(V===0)Ce=null;else{var Be=parseJSON(Ce,we);Be.error?be=Be.error:Ce=Be.data}}me&&v("Request#%d %s: Remote socket was terminated before `response.end()` was called",X,E),D(be,Ce,He)})})}function ne(){v("Response timer ticking, timeout: %d",Ze),ee=setTimeout(function(){ee=null;var He="Response timeout for "+Ze+"ms";k=new Error(He),k.name="ResponseTimeoutError",k.requestId=X,v("ResponseTimeout: Request#%d %s %s: %s, connected: %s",X,E,k.name,He,N),j()},Ze)}function j(){v("Request#%d %s abort, connected: %s",X,E,N),Ve.socket||(k.noSocket=!0,D(k)),Ve.abort()}if(!E||typeof E!="string"&&(E===void 0?"undefined":(0,u.default)(E))!=="object"){var G=i.format("expect request url to be a string or a http request options, but got %j",E);throw new Error(G)}arguments.length===2&&typeof o=="function"&&(x=o,o=null),o=o||{},y>=_&&(y=0);var X=++y;o.requestUrls=o.requestUrls||[];var Z={requestId:X,url:E,args:o,ctx:o.ctx};o.emitter&&o.emitter.emit("request",Z),o.timeout=o.timeout||S.TIMEOUTS,o.maxRedirects=o.maxRedirects||10,o.streaming=o.streaming||o.customResponse;var K,q=Date.now();typeof E=="string"?(m.test(E)||(E="http://"+E),K=n.parse(E)):K=E;var ie=(o.type||o.method||K.method||"GET").toUpperCase(),oe=K.port||80,ye=t,pe=p(o.agent,S.agent),we=o.fixJSONCtlChars;K.protocol==="https:"&&(ye=d,pe=p(o.httpsAgent,S.httpsAgent),K.port||(oe=443));var fe={host:K.hostname||K.host||"localhost",path:K.path||"/",method:ie,port:oe,agent:pe,headers:o.headers||{},lookup:o.lookup};Array.isArray(o.timeout)?fe.requestTimeout=o.timeout[o.timeout.length-1]:o.timeout!==void 0&&(fe.requestTimeout=o.timeout);for(var Te=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],Fe=0;Fe<Te.length;Fe++){var De=Te[Fe];o.hasOwnProperty(De)&&(fe[De]=o[De])}fe.rejectUnauthorized!==!1||fe.hasOwnProperty("secureOptions")||(fe.secureOptions=w("constants").SSL_OP_NO_TLSv1_2);var Me=o.auth||K.auth;Me&&(fe.auth=Me);var Ue=o.content||o.data,ve=ie==="GET"||ie==="HEAD"||o.dataAsQueryString;if(!o.content&&Ue&&typeof Ue!="string"&&!T.isBuffer(Ue))if(ve)Ue=o.nestedQuerystring?qs.stringify(Ue):querystring.stringify(Ue);else{var ce=fe.headers["Content-Type"]||fe.headers["content-type"];ce||(ce=o.contentType==="json"?"application/json":"application/x-www-form-urlencoded",fe.headers["Content-Type"]=ce),Ue=parseContentType(ce).type==="application/json"?(0,c.default)(Ue):o.nestedQuerystring?qs.stringify(Ue):querystring.stringify(Ue)}ve&&Ue&&(fe.path+=(K.query?"&":"?")+Ue,Ue=null);var Ie=0;if(Ue){var Ne=Ue.length;T.isBuffer(Ue)||(Ne=T.byteLength(Ue)),Ie=fe.headers["Content-Length"]=Ne}o.dataType==="json"&&(fe.headers.Accept="application/json"),typeof o.beforeRequest=="function"&&o.beforeRequest(fe);var Xe=null,ee=null,k=null,N=!1,$=!1,V=0,Y=-1,me=!1,Ae="",at="",Le=null;o.timing&&(Le={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0}),fe.headers["User-Agent"]||fe.headers["user-agent"]||(fe.headers["User-Agent"]=navigator.userAgent),o.gzip&&(fe.headers["Accept-Encoding"]||fe.headers["accept-encoding"]||(fe.headers["Accept-Encoding"]="gzip"));var ke=o.writeStream;v("Request#%d %s %s with headers %j, options.path: %s",X,ie,E,fe.headers,fe.path),o.requestUrls.push(E);var Ye,Ze;Array.isArray(o.timeout)?(Ye=b(o.timeout[0]),Ze=b(o.timeout[1])):Ye=Ze=b(o.timeout),v("ConnectTimeout: %d, ResponseTimeout: %d",Ye,Ze);var Ve;try{Ve=ye.request(fe,z)}catch(He){return D(He)}return typeof window=="undefined"?function(){v("Connect timer ticking, timeout: %d",Ye),Xe=setTimeout(function(){Xe=null,Y===-1&&(Y=-2);var He="Connect timeout for "+Ye+"ms",Pe="ConnectionTimeoutError";Ve.socket||(Pe="SocketAssignTimeoutError",He+=", working sockets is full"),k=new Error(He),k.name=Pe,k.requestId=X,v("ConnectTimeout: Request#%d %s %s: %s, connected: %s",X,E,k.name,He,N),j()},Ye)}():Ve.on("requestTimeout",function(){Y===-1&&(Y=-2);var He="Connect timeout for "+Ye+"ms";k=new Error(He),k.name="ConnectionTimeoutError",k.requestId=X,j()}),Le&&Ve.on("finish",function(){Le.requestSent=Date.now()-q}),Ve.once("socket",function(He){Le&&(Le.queuing=Date.now()-q),isNode010&&He.socket&&(He=He.socket);var Pe=He.readyState;if(Pe==="opening")return He.once("lookup",function(Re,Oe,he){v("Request#%d %s lookup: %s, %s, %s",X,E,Re,Oe,he),Le&&(Le.dnslookup=Date.now()-q),Oe&&(Ae=Oe)}),void He.once("connect",function(){Le&&(Le.connected=Date.now()-q),A(),ne(),v("Request#%d %s new socket connected",X,E),N=!0,Ae||(Ae=He.remoteAddress),at=He.remotePort});v("Request#%d %s reuse socket connected, readyState: %s",X,E,Pe),N=!0,$=!0,Ae||(Ae=He.remoteAddress),at=He.remotePort,A(),ne()}),Ve.on("error",function(He){He.name!=="Error"&&He.name!=="TypeError"||(He.name=N?"ResponseError":"RequestError"),He.message+=' (req "error")',v("Request#%d %s `req error` event emit, %s: %s",X,E,He.name,He.message),D(k||He)}),ke&&ke.once("error",function(He){He.message+=' (writeStream "error")',k=He,v("Request#%d %s `writeStream error` event emit, %s: %s",X,E,He.name,He.message),j()}),o.stream?(o.stream.pipe(Ve),o.stream.once("error",function(He){He.message+=' (stream "error")',k=He,v("Request#%d %s `readStream error` event emit, %s: %s",X,E,He.name,He.message),j()})):Ve.end(Ue),Ve.requestId=X,Ve}}).call(this,w("_process"),w("buffer").Buffer)},{_process:173,"any-promise":13,"babel-runtime/core-js/json/stringify":17,"babel-runtime/helpers/typeof":32,buffer:38,constants:42,debug:155,http:196,https:159,"humanize-ms":160,url:203,util:207}]},{},[1])(1)}),!function(U){function w(S){if(P[S])return P[S].exports;var C=P[S]={i:S,l:!1,exports:{}};return U[S].call(C.exports,C,C.exports,w),C.l=!0,C.exports}var P={};w.m=U,w.c=P,w.d=function(S,C,T){w.o(S,C)||Object.defineProperty(S,C,{configurable:!1,enumerable:!0,get:T})},w.n=function(S){var C=S&&S.__esModule?function(){return S.default}:function(){return S};return w.d(C,"a",C),C},w.o=function(S,C){return Object.prototype.hasOwnProperty.call(S,C)},w.p="",w(w.s=12)}([function(U,w,P){!function(S,C){U.exports=w=C()}(0,function(){var S=S||function(C,T){var h=Object.create||function(){function d(){}return function(v){var b;return d.prototype=v,b=new d,d.prototype=null,b}}(),p={},f=p.lib={},l=f.Base=function(){return{extend:function(d){var v=h(this);return d&&v.mixIn(d),v.hasOwnProperty("init")&&this.init!==v.init||(v.init=function(){v.$super.init.apply(this,arguments)}),v.init.prototype=v,v.$super=this,v},create:function(){var d=this.extend();return d.init.apply(d,arguments),d},init:function(){},mixIn:function(d){for(var v in d)d.hasOwnProperty(v)&&(this[v]=d[v]);d.hasOwnProperty("toString")&&(this.toString=d.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),a=f.WordArray=l.extend({init:function(d,v){d=this.words=d||[],this.sigBytes=v!=null?v:4*d.length},toString:function(d){return(d||s).stringify(this)},concat:function(d){var v=this.words,b=d.words,y=this.sigBytes,_=d.sigBytes;if(this.clamp(),y%4)for(var m=0;m<_;m++){var g=b[m>>>2]>>>24-m%4*8&255;v[y+m>>>2]|=g<<24-(y+m)%4*8}else for(var m=0;m<_;m+=4)v[y+m>>>2]=b[m>>>2];return this.sigBytes+=_,this},clamp:function(){var d=this.words,v=this.sigBytes;d[v>>>2]&=4294967295<<32-v%4*8,d.length=C.ceil(v/4)},clone:function(){var d=l.clone.call(this);return d.words=this.words.slice(0),d},random:function(d){for(var v,b=[],y=0;y<d;y+=4){var _=function(m){var m=m,g=987654321,E=4294967295;return function(){g=36969*(65535&g)+(g>>16)&E,m=18e3*(65535&m)+(m>>16)&E;var o=(g<<16)+m&E;return o/=4294967296,(o+=.5)*(C.random()>.5?1:-1)}}(4294967296*(v||C.random()));v=987654071*_(),b.push(4294967296*_()|0)}return new a.init(b,d)}}),c=p.enc={},s=c.Hex={stringify:function(d){for(var v=d.words,b=d.sigBytes,y=[],_=0;_<b;_++){var m=v[_>>>2]>>>24-_%4*8&255;y.push((m>>>4).toString(16)),y.push((15&m).toString(16))}return y.join("")},parse:function(d){for(var v=d.length,b=[],y=0;y<v;y+=2)b[y>>>3]|=parseInt(d.substr(y,2),16)<<24-y%8*4;return new a.init(b,v/2)}},u=c.Latin1={stringify:function(d){for(var v=d.words,b=d.sigBytes,y=[],_=0;_<b;_++){var m=v[_>>>2]>>>24-_%4*8&255;y.push(String.fromCharCode(m))}return y.join("")},parse:function(d){for(var v=d.length,b=[],y=0;y<v;y++)b[y>>>2]|=(255&d.charCodeAt(y))<<24-y%4*8;return new a.init(b,v)}},i=c.Utf8={stringify:function(d){try{return decodeURIComponent(escape(u.stringify(d)))}catch(v){throw new Error("Malformed UTF-8 data")}},parse:function(d){return u.parse(unescape(encodeURIComponent(d)))}},n=f.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(d){typeof d=="string"&&(d=i.parse(d)),this._data.concat(d),this._nDataBytes+=d.sigBytes},_process:function(d){var v=this._data,b=v.words,y=v.sigBytes,_=this.blockSize,m=4*_,g=y/m;g=d?C.ceil(g):C.max((0|g)-this._minBufferSize,0);var E=g*_,o=C.min(4*E,y);if(E){for(var x=0;x<E;x+=_)this._doProcessBlock(b,x);var A=b.splice(0,E);v.sigBytes-=o}return new a.init(A,o)},clone:function(){var d=l.clone.call(this);return d._data=this._data.clone(),d},_minBufferSize:0}),t=(f.Hasher=n.extend({cfg:l.extend(),init:function(d){this.cfg=this.cfg.extend(d),this.reset()},reset:function(){n.reset.call(this),this._doReset()},update:function(d){return this._append(d),this._process(),this},finalize:function(d){return d&&this._append(d),this._doFinalize()},blockSize:16,_createHelper:function(d){return function(v,b){return new d.init(b).finalize(v)}},_createHmacHelper:function(d){return function(v,b){return new t.HMAC.init(d,b).finalize(v)}}}),p.algo={});return p}(Math);return S})},function(U,w,P){"use strict";function S(h,p){if(!(h instanceof p))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var C=function(){function h(p,f){for(var l=0;l<f.length;l++){var a=f[l];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(p,a.key,a)}}return function(p,f,l){return f&&h(p.prototype,f),l&&h(p,l),p}}(),T=function(){function h(){S(this,h)}return C(h,null,[{key:"detectIEVersion",value:function(){for(var p=4,f=document.createElement("div"),l=f.getElementsByTagName("i");f.innerHTML="<!--[if gt IE "+p+"]><i></i><![endif]-->",l[0];)p++;return p>4&&p}},{key:"extend",value:function(p,f){for(var l in f)Object.prototype.hasOwnProperty.call(f,l)&&f[l]&&(p[l]=f[l])}},{key:"isArray",value:function(p){return Object.prototype.toString.call(arg)==="[object Array]"}},{key:"getFileType",value:function(p){return p=p.toLowerCase(),/.mp4|.flv|.m3u8|.avi|.rm|.rmvb|.mpeg|.mpg|.mov|.wmv|.3gp|.asf|.dat|.dv|.f4v|.gif|.m2t|.m4v|.mj2|.mjpeg|.mpe|.mts|.ogg|.qt|.swf|.ts|.vob|.wmv|.webm/.test(p)?"video":/.mp3|.wav|.ape|.cda|.au|.midi|.mac|.aac|.ac3|.acm|.amr|.caf|.flac|.m4a|.ra|.wma/.test(p)?"audio":/.bmp|.jpg|.jpeg|.png/.test(p)?"img":"other"}},{key:"isImage",value:function(p){return p=p.toLowerCase(),!!/.jpg|.jpeg|.png/.test(p)}},{key:"ISODateString",value:function(p){function f(l){return l<10?"0"+l:l}return p.getUTCFullYear()+"-"+f(p.getUTCMonth()+1)+"-"+f(p.getUTCDate())+"T"+f(p.getUTCHours())+":"+f(p.getUTCMinutes())+":"+f(p.getUTCSeconds())+"Z"}},{key:"isIntNum",value:function(p){return!!/^\d+$/.test(p)}}]),h}();w.default=T},function(U,w,P){!function(S,C){U.exports=w=C(P(0))}(0,function(S){return function(C){function T(t,d,v,b,y,_,m){var g=t+(d&v|~d&b)+y+m;return(g<<_|g>>>32-_)+d}function h(t,d,v,b,y,_,m){var g=t+(d&b|v&~b)+y+m;return(g<<_|g>>>32-_)+d}function p(t,d,v,b,y,_,m){var g=t+(d^v^b)+y+m;return(g<<_|g>>>32-_)+d}function f(t,d,v,b,y,_,m){var g=t+(v^(d|~b))+y+m;return(g<<_|g>>>32-_)+d}var l=S,a=l.lib,c=a.WordArray,s=a.Hasher,u=l.algo,i=[];!function(){for(var t=0;t<64;t++)i[t]=4294967296*C.abs(C.sin(t+1))|0}();var n=u.MD5=s.extend({_doReset:function(){this._hash=new c.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,d){for(var v=0;v<16;v++){var b=d+v,y=t[b];t[b]=16711935&(y<<8|y>>>24)|4278255360&(y<<24|y>>>8)}var _=this._hash.words,m=t[d+0],g=t[d+1],E=t[d+2],o=t[d+3],x=t[d+4],A=t[d+5],O=t[d+6],D=t[d+7],I=t[d+8],F=t[d+9],z=t[d+10],ne=t[d+11],j=t[d+12],G=t[d+13],X=t[d+14],Z=t[d+15],K=_[0],q=_[1],ie=_[2],oe=_[3];K=T(K,q,ie,oe,m,7,i[0]),oe=T(oe,K,q,ie,g,12,i[1]),ie=T(ie,oe,K,q,E,17,i[2]),q=T(q,ie,oe,K,o,22,i[3]),K=T(K,q,ie,oe,x,7,i[4]),oe=T(oe,K,q,ie,A,12,i[5]),ie=T(ie,oe,K,q,O,17,i[6]),q=T(q,ie,oe,K,D,22,i[7]),K=T(K,q,ie,oe,I,7,i[8]),oe=T(oe,K,q,ie,F,12,i[9]),ie=T(ie,oe,K,q,z,17,i[10]),q=T(q,ie,oe,K,ne,22,i[11]),K=T(K,q,ie,oe,j,7,i[12]),oe=T(oe,K,q,ie,G,12,i[13]),ie=T(ie,oe,K,q,X,17,i[14]),q=T(q,ie,oe,K,Z,22,i[15]),K=h(K,q,ie,oe,g,5,i[16]),oe=h(oe,K,q,ie,O,9,i[17]),ie=h(ie,oe,K,q,ne,14,i[18]),q=h(q,ie,oe,K,m,20,i[19]),K=h(K,q,ie,oe,A,5,i[20]),oe=h(oe,K,q,ie,z,9,i[21]),ie=h(ie,oe,K,q,Z,14,i[22]),q=h(q,ie,oe,K,x,20,i[23]),K=h(K,q,ie,oe,F,5,i[24]),oe=h(oe,K,q,ie,X,9,i[25]),ie=h(ie,oe,K,q,o,14,i[26]),q=h(q,ie,oe,K,I,20,i[27]),K=h(K,q,ie,oe,G,5,i[28]),oe=h(oe,K,q,ie,E,9,i[29]),ie=h(ie,oe,K,q,D,14,i[30]),q=h(q,ie,oe,K,j,20,i[31]),K=p(K,q,ie,oe,A,4,i[32]),oe=p(oe,K,q,ie,I,11,i[33]),ie=p(ie,oe,K,q,ne,16,i[34]),q=p(q,ie,oe,K,X,23,i[35]),K=p(K,q,ie,oe,g,4,i[36]),oe=p(oe,K,q,ie,x,11,i[37]),ie=p(ie,oe,K,q,D,16,i[38]),q=p(q,ie,oe,K,z,23,i[39]),K=p(K,q,ie,oe,G,4,i[40]),oe=p(oe,K,q,ie,m,11,i[41]),ie=p(ie,oe,K,q,o,16,i[42]),q=p(q,ie,oe,K,O,23,i[43]),K=p(K,q,ie,oe,F,4,i[44]),oe=p(oe,K,q,ie,j,11,i[45]),ie=p(ie,oe,K,q,Z,16,i[46]),q=p(q,ie,oe,K,E,23,i[47]),K=f(K,q,ie,oe,m,6,i[48]),oe=f(oe,K,q,ie,D,10,i[49]),ie=f(ie,oe,K,q,X,15,i[50]),q=f(q,ie,oe,K,A,21,i[51]),K=f(K,q,ie,oe,j,6,i[52]),oe=f(oe,K,q,ie,o,10,i[53]),ie=f(ie,oe,K,q,z,15,i[54]),q=f(q,ie,oe,K,g,21,i[55]),K=f(K,q,ie,oe,I,6,i[56]),oe=f(oe,K,q,ie,Z,10,i[57]),ie=f(ie,oe,K,q,O,15,i[58]),q=f(q,ie,oe,K,G,21,i[59]),K=f(K,q,ie,oe,x,6,i[60]),oe=f(oe,K,q,ie,ne,10,i[61]),ie=f(ie,oe,K,q,E,15,i[62]),q=f(q,ie,oe,K,F,21,i[63]),_[0]=_[0]+K|0,_[1]=_[1]+q|0,_[2]=_[2]+ie|0,_[3]=_[3]+oe|0},_doFinalize:function(){var t=this._data,d=t.words,v=8*this._nDataBytes,b=8*t.sigBytes;d[b>>>5]|=128<<24-b%32;var y=C.floor(v/4294967296),_=v;d[15+(b+64>>>9<<4)]=16711935&(y<<8|y>>>24)|4278255360&(y<<24|y>>>8),d[14+(b+64>>>9<<4)]=16711935&(_<<8|_>>>24)|4278255360&(_<<24|_>>>8),t.sigBytes=4*(d.length+1),this._process();for(var m=this._hash,g=m.words,E=0;E<4;E++){var o=g[E];g[E]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}return m},clone:function(){var t=s.clone.call(this);return t._hash=this._hash.clone(),t}});l.MD5=s._createHelper(n),l.HmacMD5=s._createHmacHelper(n)}(Math),S.MD5})},function(U,w,P){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.UPLOADSTATE={INIT:"init",UPLOADING:"uploading",COMPLETE:"complete",INTERRUPT:"interrupt"},w.UPLOADSTEP={INIT:"init",PART:"part",COMPLETE:"complete"},w.UPLOADDEFAULT={PARALLEL:5,PARTSIZE:1048576}},function(U,w,P){"use strict";function S(n){return n&&n.__esModule?n:{default:n}}function C(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var T=function(){function n(t,d){for(var v=0;v<d.length;v++){var b=d[v];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(t,b.key,b)}}return function(t,d,v){return d&&n(t.prototype,d),v&&n(t,v),t}}(),h=P(5),p=S(h),f=P(25),l=S(f),a=P(6),c=S(a),s=P(7),u=S(s),i=function(){function n(t){C(this,n);var d=u.default.os.name,v=u.default.os.version||"",b=u.default.browser.name,y=u.default.browser.version||"",_=window.location.href,m="";_&&(m=u.default.getHost(_));var g="pc";u.default.os.ipad?g="pad":(u.default.os.iphone||u.default.os.android)&&(g="phone"),this._ri=p.default.create(),this.initParam={APIVersion:"0.6.0",lv:"1",av:c.default.version,pd:"upload",sm:"upload",md:"uploader",uuid:n.getUuid(),os:d,ov:v,et:b,ev:y,uat:navigator.userAgent,app_n:m,tt:g,dm:"h5",ut:""}}return T(n,[{key:"log",value:function(t,d){d&&d.ri?(this._ri=d.ri,delete d.ri):this._ri=p.default.create(),d&&d.ut&&(this.initParam.ut=d.ut,delete d.ut),this.initParam.t=new Date().getTime(),this.initParam.ll=t=="20006"?"error":"info",this.initParam.ri=this._ri,this.initParam.e=t;var v=[];if(d)for(var b in d)v.push(b+"="+d[b]);var y=v.join("&");this.initParam.args=encodeURIComponent(y==""?"0":y);var _=[];for(var b in this.initParam)_.push(b+"="+this.initParam[b]);var m=_.join("&");AliyunUpload&&AliyunUpload.__logTestCallback__?AliyunUpload.__logTestCallback__(m):new Image(0,0).src="https://videocloud.cn-hangzhou.log.aliyuncs.com/logstores/upload/track?"+m}}],[{key:"getUuid",value:function(){var t=l.default.get("p_h5_upload_u");return t||(t=p.default.create(),l.default.set("p_h5_upload_u",t,730)),t}},{key:"getClientId",value:function(){return l.default.get("p_h5_upload_clientId")}},{key:"setClientId",value:function(t){return t||(t=p.default.create()),l.default.set("p_h5_upload_clientId",t,730),t}}]),n}();w.default=i},function(U,w,P){"use strict";function S(h,p){if(!(h instanceof p))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var C=function(){function h(p,f){for(var l=0;l<f.length;l++){var a=f[l];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(p,a.key,a)}}return function(p,f,l){return f&&h(p.prototype,f),l&&h(p,l),p}}(),T=function(){function h(){S(this,h)}return C(h,null,[{key:"create",value:function(p,f){var l,a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),c=[];if(f=f||a.length,p)for(l=0;l<p;l++)c[l]=a[0|Math.random()*f];else{var s;for(c[8]=c[13]=c[18]=c[23]="-",c[14]="4",l=0;l<36;l++)c[l]||(s=0|16*Math.random(),c[l]=a[l==19?3&s|8:s])}return c.join("")}}]),h}();w.default=T},function(U,w,P){"use strict";Object.defineProperty(w,"__esModule",{value:!0});var S={version:"1.5.0"};w.default=S},function(U,w,P){"use strict";function S(a,c){if(!(a instanceof c))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var C=function(){function a(c,s){for(var u=0;u<s.length;u++){var i=s[u];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,i.key,i)}}return function(c,s,u){return s&&a(c.prototype,s),u&&a(c,u),c}}(),T=function(a){var c=navigator.userAgent,s="other";if(a.ios)return"iOS";if(a.android)return"android";if(c.indexOf("Baiduspider")>-1)return"Baiduspider";if(c.indexOf("PlayStation")>-1)return"PS4";var u=navigator.platform=="Win32"||navigator.platform=="Windows"||c.indexOf("Windows")>-1,i=navigator.platform=="Mac68K"||navigator.platform=="MacPPC"||navigator.platform=="Macintosh"||navigator.platform=="MacIntel";return i&&(s="macOS"),navigator.platform=="X11"&&!u&&!i&&(s="Unix"),String(navigator.platform).indexOf("Linux")>-1&&(s="Linux"),u?"windows":s},h=function(){var a=navigator.userAgent,c="";return(a.indexOf("Windows NT 5.0")>-1||a.indexOf("Windows 2000")>-1)&&(c="2000"),(a.indexOf("Windows NT 5.1")>-1||a.indexOf("Windows XP")>-1)&&(c="XP"),(a.indexOf("Windows NT 5.2")>-1||a.indexOf("Windows 2003")>-1)&&(c="2003"),(a.indexOf("Windows NT 6.0")>-1||a.indexOf("Windows Vista")>-1)&&(c="Vista"),(a.indexOf("Windows NT 6.1")>-1||a.indexOf("Windows 7")>-1)&&(c="7"),(a.indexOf("Windows NT 6.2")>-1||a.indexOf("Windows 8")>-1)&&(c="8"),(a.indexOf("Windows NT 6.3")>-1||a.indexOf("Windows 8.1")>-1)&&(c="8.1"),(a.indexOf("Windows NT 10")>-1||a.indexOf("Windows 10")>-1)&&(c="10"),c},p=function(a){var c=navigator.userAgent.toLowerCase();return a.chrome?"Chrome":a.firefox?"Firefox":a.safari?"Safari":a.webview?"webview":a.ie?/edge/.test(c)?"Edge":"IE":/baiduspider/.test(c)?"Baiduspider":/ucweb/.test(c)||/UCBrowser/.test(c)?"UC":/opera/.test(c)?"Opera":/ucweb/.test(c)?"UC":/360se/.test(c)?"360\u6D4F\u89C8\u5668":/bidubrowser/.test(c)?"\u767E\u5EA6\u6D4F\u89C8\u5668":/metasr/.test(c)?"\u641C\u72D7\u6D4F\u89C8\u5668":/lbbrowser/.test(c)?"\u730E\u8C79\u6D4F\u89C8\u5668":/micromessenger/.test(c)?"\u5FAE\u4FE1\u5185\u7F6E\u6D4F\u89C8\u5668":/qqbrowser/.test(c)?"QQ\u6D4F\u89C8\u5668":/playstation/.test(c)?"PS4\u6D4F\u89C8\u5668":void 0},f=function(){var a={},c={},s=navigator.userAgent,u=navigator.platform,i=s.match(/Web[kK]it[\/]{0,1}([\d.]+)/),n=s.match(/(Android);?[\s\/]+([\d.]+)?/),t=!!s.match(/\(Macintosh\; Intel /),d=s.match(/(iPad).*OS\s([\d_]+)/),v=s.match(/(iPod)(.*OS\s([\d_]+))?/),b=!d&&s.match(/(iPhone\sOS)\s([\d_]+)/),y=s.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),_=/Win\d{2}|Windows/.test(u),m=s.match(/Windows Phone ([\d.]+)/),g=y&&s.match(/TouchPad/),E=s.match(/Kindle\/([\d.]+)/),o=s.match(/Silk\/([\d._]+)/),x=s.match(/(BlackBerry).*Version\/([\d.]+)/),A=s.match(/(BB10).*Version\/([\d.]+)/),O=s.match(/(RIM\sTablet\sOS)\s([\d.]+)/),D=s.match(/PlayBook/),I=s.match(/Chrome\/([\d.]+)/)||s.match(/CriOS\/([\d.]+)/),F=s.match(/Firefox\/([\d.]+)/),z=s.match(/\((?:Mobile|Tablet); rv:([\d.]+)\).*Firefox\/[\d.]+/),ne=s.match(/MSIE\s([\d.]+)/)||s.match(/Trident\/[\d](?=[^\?]+).*rv:([0-9.].)/),j=!I&&s.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/),G=j||s.match(/Version\/([\d.]+)([^S](Safari)|[^M]*(Mobile)[^S]*(Safari))/);if((c.webkit=!!i)&&(c.version=i[1]),n&&(a.android=!0,a.version=n[2]),b&&!v&&(a.ios=a.iphone=!0,a.version=b[2].replace(/_/g,".")),d&&(a.ios=a.ipad=!0,a.version=d[2].replace(/_/g,".")),v&&(a.ios=a.ipod=!0,a.version=v[3]?v[3].replace(/_/g,"."):null),m&&(a.wp=!0,a.version=m[1]),y&&(a.webos=!0,a.version=y[2]),g&&(a.touchpad=!0),x&&(a.blackberry=!0,a.version=x[2]),A&&(a.bb10=!0,a.version=A[2]),O&&(a.rimtabletos=!0,a.version=O[2]),D&&(c.playbook=!0),E&&(a.kindle=!0,a.version=E[1]),o&&(c.silk=!0,c.version=o[1]),!o&&a.android&&s.match(/Kindle Fire/)&&(c.silk=!0),I&&(c.chrome=!0,c.version=I[1]),F&&(c.firefox=!0,c.version=F[1]),z&&(a.firefoxos=!0,a.version=z[1]),ne&&(c.ie=!0,c.version=ne[1]),G&&(t||a.ios||_||n)&&(c.safari=!0,a.ios||(c.version=G[1])),j&&(c.webview=!0),t){var X=s.match(/[\d]*_[\d]*_[\d]*/);X&&X.length>0&&X[0]&&(a.version=X[0].replace(/_/g,"."))}return a.tablet=!!(d||D||n&&!s.match(/Mobile/)||F&&s.match(/Tablet/)||ne&&!s.match(/Phone/)&&s.match(/Touch/)),a.phone=!(a.tablet||a.ipod||!(n||b||y||x||A||I&&s.match(/Android/)||I&&s.match(/CriOS\/([\d.]+)/)||F&&s.match(/Mobile/)||ne&&s.match(/Touch/))),a.pc=!a.tablet&&!a.phone,t?a.name="macOS":_?(a.name="windows",a.version=h()):a.name=T(a),c.name=p(c),{os:a,browser:c}}(),l=function(){function a(){S(this,a)}return C(a,null,[{key:"getHost",value:function(c){var s="";if(c===void 0||c==null||c=="")return"";var u=c.indexOf("//"),i=c;u>-1&&(i=c.substring(u+2));var s=i,n=i.split("/");return n&&n.length>0&&(s=n[0]),n=s.split(":"),n&&n.length>0&&(s=n[0]),s}},{key:"os",get:function(){return f.os}},{key:"browser",get:function(){var c=f.browser;return c.name||(c.name=p()),c}}]),a}();w.default=l},function(U,w,P){"use strict";function S(h,p){if(!(h instanceof p))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var C=function(){function h(p,f){for(var l=0;l<f.length;l++){var a=f[l];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(p,a.key,a)}}return function(p,f,l){return f&&h(p.prototype,f),l&&h(p,l),p}}(),T=function(){function h(){S(this,h)}return C(h,null,[{key:"get",value:function(p,f,l,a,c){var s;l=l||function(){},typeof XMLHttpRequest=="undefined"&&(window.XMLHttpRequest=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(u){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(u){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(u){}throw new Error("This browser does not support XMLHttpRequest.")}),s=new XMLHttpRequest,s.onreadystatechange=function(){s.readyState===4&&(s.status===200?f(s.responseText):l(s.responseText))};try{a===void 0&&(a=!0),s.open("GET",p,a),c&&(s.withCredentials=!0)}catch(u){return void l(u)}try{s.send()}catch(u){l(u)}}}]),h}();w.default=T},function(U,w,P){"use strict";function S(f,l){if(!(f instanceof l))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var C=function(){function f(l,a){for(var c=0;c<a.length;c++){var s=a[c];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(l,s.key,s)}}return function(l,a,c){return a&&f(l.prototype,a),c&&f(l,c),l}}(),T=P(27),h=P(30),p=(P(10),function(){function f(){S(this,f)}return C(f,null,[{key:"randomUUID",value:function(){for(var l=[],a="0123456789abcdef",c=0;c<36;c++)l[c]=a.substr(Math.floor(16*Math.random()),1);return l[14]="4",l[19]=a.substr(3&l[19]|8,1),l[8]=l[13]=l[18]=l[23]="-",l.join("")}},{key:"aliyunEncodeURI",value:function(l){var a=encodeURIComponent(l);return a=a.replace(/\+/g,"%20").replace(/\*/g,"%2A").replace(/%7E/g,"~").replace(/!/g,"%21").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/'/g,"%27")}},{key:"makeUTF8sort",value:function(l,a,c){if(!l)throw new Error("PrismPlayer Error: vid should not be null!");var s=[];for(var u in l)s.push(u);for(var i=s.sort(),n="",t=i.length,u=0;u<t;u++){var d=f.aliyunEncodeURI(i[u]),v=f.aliyunEncodeURI(l[i[u]]);n==""?n=d+a+v:n+=c+d+a+v}return n}},{key:"makeChangeSiga",value:function(l,a){if(!l)throw new Error("PrismPlayer Error: vid should not be null!");return h.stringify(T("GET&"+f.aliyunEncodeURI("/")+"&"+f.aliyunEncodeURI(f.makeUTF8sort(l,"=","&")),a+"&"))}}]),f}());w.default=p},function(U,w,P){!function(S,C){U.exports=w=C(P(0))}(0,function(S){return S.enc.Utf8})},function(U,w,P){!function(S,C){U.exports=w=C(P(0))}(0,function(S){return S.enc.Hex})},function(U,w,P){U.exports=P(13)},function(U,w,P){"use strict";var S,C,T=(typeof Symbol=="function"&&Symbol.iterator,P(14)),h=function(f){return f&&f.__esModule?f:{default:f}}(T),p={Vod:h.default};S=[],(C=function(){return p}.apply(w,S))!==void 0&&(U.exports=C),window.AliyunUpload=p,Je.exports=AliyunUpload},function(U,w,P){"use strict";function S(A){return A&&A.__esModule?A:{default:A}}function C(A,O){if(!(A instanceof O))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var T=function(){function A(O,D){for(var I=0;I<D.length;I++){var F=D[I];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(O,F.key,F)}}return function(O,D,I){return D&&A(O.prototype,D),I&&A(O,I),O}}(),h=P(15),p=P(3),f=P(16),l=S(f),a=P(18),c=S(a),s=P(24),u=S(s),i=P(4),n=S(i),t=P(1),d=S(t),v=P(5),b=S(v),y=P(26),_=S(y),m=P(31),g=S(m),E=P(32),o=S(E),x=(P(2),function(){function A(O){C(this,A),this.options=O,this.options.partSize=this.options.partSize||p.UPLOADDEFAULT.PARTSIZE,this.options.parallel=this.options.parallel||p.UPLOADDEFAULT.PARALLEL,this.options.region=this.options.region||"cn-shanghai",this.options.cname=this.options.cname||!1,this.options.localCheckpoint=this.options.localCheckpoint||!1,this.options.enableUploadProgress===void 0&&(this.options.enableUploadProgress=!0),this._ossCreditor=new Object,this._state=h.VODSTATE.INIT,this._uploadList=[],this._curIndex=-1,this._ossUpload=null,this._log=new n.default,this._retryCount=0,this._retryTotal=this.options.retryCount||3,this._retryDuration=this.options.retryDuration||2,this._state=h.VODSTATE.INIT,this._uploadWay="vod",this._onbeforeunload=!1,this._invalidUserId=!1,this._initEvent()}return T(A,[{key:"init",value:function(O,D,I,F){return this._retryCount=0,!(I&&!F||!I&&F)&&!(O&&!D||!O&&D)&&(this._ossCreditor.accessKeyId=O,this._ossCreditor.accessKeySecret=D,this._ossCreditor.securityToken=I,this._ossCreditor.expireTime=F,!0)}},{key:"addFile",value:function(O,D,I,F,z,ne){if(!O)return!1;if(O.size==0)try{this.options.onUploadFailed({file:O},"EmptyFile","\u6587\u4EF6\u5927\u5C0F\u4E3A0\uFF0C\u4E0D\u80FD\u4E0A\u4F20")}catch(Z){console.log(Z)}for(var j=(this.options,0);j<this._uploadList.length;j++)if(this._uploadList[j].file==O)return!1;var G=new Object;if(G.file=O,G._endpoint=D,G._bucket=I,G._object=F,G.state=h.UPLOADSTATE.INIT,G.isImage=d.default.isImage(O.name),!G.isImage&&this.options.enableUploadProgress){var X=this;o.default.getMd5(O,function(Z){G.fileHash=Z;var K=X._getCheckoutpoint(G);X.options.localCheckpoint||K||X._getCheckoutpointFromCloud(G,function(q){if(q.UploadPoint){var ie=JSON.parse(q.UploadPoint);ie.loaded!=1&&(G.checkpoint=ie.checkpoint,G.loaded=ie.loaded,G.videoId=q.VideoId,X._saveCheckoutpoint(G,ie.checkpoint))}},function(q){try{if((q=JSON.parse(q))&&q.Code=="InvalidParameter"&&q.Message.indexOf("UserId")>0){X._invalidUserId=!0;var ie=q.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(ie)}}catch(oe){console.log(oe)}})})}z&&(G.videoInfo=z?JSON.parse(z).Vod:{},G.userData=c.default.encode(z)),G.ri=b.default.create(),this._uploadList.push(G),this._reportLog("20001",G,{ql:this._uploadList.length});try{this.options.addFileSuccess&&this.options.addFileSuccess(G)}catch(Z){console.log(Z)}return!0}},{key:"deleteFile",value:function(O){return!!this.cancelFile(O)&&(this._uploadList.splice(O,1),!0)}},{key:"cleanList",value:function(){this.stopUpload(),this._uploadList.length=0,this._curIndex=-1}},{key:"cancelFile",value:function(O){if(this.options,O<0||O>=this._uploadList.length)return!1;var D=this._uploadList[O];if(O==this._curIndex&&D.state==h.UPLOADSTATE.UPLOADING){D.state=h.UPLOADSTATE.CANCELED;var I=this._getCheckoutpoint(D);I&&I.checkpoint&&(I=I.checkpoint),I&&this._ossUpload.abort(D),this._removeCheckoutpoint(D),this.nextUpload()}else D.state!=h.UPLOADSTATE.SUCCESS&&(D.state=h.UPLOADSTATE.CANCELED);return this._reportLog("20008",D),!0}},{key:"resumeFile",value:function(O){if(this.options,O<0||O>=this._uploadList.length)return!1;var D=this._uploadList[O];return D.state==h.UPLOADSTATE.CANCELED&&(D.state=h.UPLOADSTATE.INIT,!0)}},{key:"listFiles",value:function(){return this._uploadList}},{key:"getCheckpoint",value:function(O){return this._getCheckoutpoint({file:O})}},{key:"startUpload",value:function(O){if(this._retryCount=0,this.options,this._state==h.VODSTATE.START||this._state==h.VODSTATE.EXPIRE)return void console.log("already started or expired");if(this._initState(),this._curIndex=this._findUploadIndex(),this._curIndex==-1)return void(this._state=h.VODSTATE.END);var D=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(D),this._state=h.VODSTATE.START}},{key:"nextUpload",value:function(){var O=this.options;if(this._state==h.VODSTATE.START)if(this._curIndex=this._findUploadIndex(),this._curIndex!=-1){var D=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(D)}else{this._state=h.VODSTATE.END;try{O.onUploadEnd&&O.onUploadEnd(D)}catch(I){console.log(I)}}}},{key:"clear",value:function(O){for(var D=this.options,I=0,F=0;F<this._uploadList.length;F++)D.uploadList[F].state==h.UPLOADSTATE.SUCCESS&&I++,this._uploadList[F].state==O&&(D.uploadList.splice(F,1),F--);D.onClear&&D.onClear(D.uploadList.length,I)}},{key:"stopUpload",value:function(){if((this._state==h.VODSTATE.START||this._state==h.VODSTATE.FAILURE||this._curIndex==-1)&&this._curIndex!=-1){var O=this._uploadList[this._curIndex];this._state=h.VODSTATE.STOP,O.state=h.UPLOADSTATE.STOPED,this._changeState(O,h.UPLOADSTATE.STOPED),this._ossUpload.cancel()}}},{key:"resumeUploadWithAuth",value:function(O){var D=this;if(!O)return!1;var I=JSON.parse(c.default.decode(O));return!!(I.AccessKeyId&&I.AccessKeySecret&&I.SecurityToken&&I.Expiration)&&D.resumeUploadWithToken(I.AccessKeyId,I.AccessKeySecret,I.SecurityToken,I.Expiration)}},{key:"resumeUploadWithToken",value:function(O,D,I,F){if(this.options,!(O&&D&&I&&F))return!1;if(this._state!=h.VODSTATE.EXPIRE)return!1;if(this._curIndex==-1)return!1;var z="";return this._uploadList.length>this._curIndex&&(z=this._uploadList[this._curIndex]),z&&(this.init(O,D,I,F),this._state=h.VODSTATE.START,this._ossUpload=null,this._uploadCore(z,z.retry),z.retry=!1),!0}},{key:"resumeUploadWithSTSToken",value:function(O,D,I){if(this._curIndex==-1)return!1;if(this._state!=h.VODSTATE.EXPIRE)return!1;if(this._uploadList.length>this._curIndex){var F=this._uploadList[this._curIndex];F.object?this._refreshSTSTokenUpload(F,O,D,I):this.setSTSToken(F,O,D,I)}}},{key:"setSTSTokenDirectlyUpload",value:function(O,D,I,F,z){if(!(D&&I&&F&&z))return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken and expiration should not be empty."),!1;this._ut="oss";var ne=O;this.init(D,I,F,z),ne.endpoint=ne._endpoint,ne.bucket=ne._bucket,ne.object=ne._object,this._ossUpload=null,this._uploadCore(ne,O.retry),O.retry=!1}},{key:"setSTSToken",value:function(O,D,I,F){if(!D||!I||!F)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;this._ut="vod",this._uploadWay="sts";var z=O.videoInfo,ne={accessKeyId:D,securityToken:F,accessKeySecret:I,fileName:O.file.name,title:z.Title,requestId:O.ri,region:this.options.region};z.ImageType&&(ne.imageType=z.ImageType),z.ImageExt&&(ne.imageExt=z.ImageExt),z.FileSize&&(ne.fileSize=z.FileSize),z.Description&&(ne.description=z.Description),z.CateId&&(ne.cateId=z.CateId),z.Tags&&(ne.tags=z.Tags),z.TemplateGroupId&&(ne.templateGroupId=z.TemplateGroupId),z.StorageLocation&&(ne.storageLocation=z.StorageLocation),z.CoverURL&&(ne.coverUrl=z.CoverURL),z.TransCodeMode&&(ne.transCodeMode=z.TransCodeMode),z.UserData&&(ne.userData=z.UserData);var j=this,G="getUploadAuth";O.videoId?(ne.videoId=O.videoId,G="refreshUploadAuth"):O.isImage&&(G="getImageUploadAuth"),_.default[G](ne,function(X){O.videoId=X.VideoId?X.VideoId:O.videoId,j.setUploadAuthAndAddress(O,X.UploadAuth,X.UploadAddress),j._state=h.VODSTATE.START},function(X){j._error(O,{name:X.Code,code:X.Code,message:X.Message,requestId:X.RequestId})})}},{key:"setUploadAuthAndAddress",value:function(O,D,I,F){if(!O||!D||!I)return!1;var z=JSON.parse(c.default.decode(D));if(!(z.AccessKeyId&&z.AccessKeySecret&&z.SecurityToken&&z.Expiration))return console.error("uploadauth is invalid"),!1;var ne={},j=O;if(I){if(ne=JSON.parse(c.default.decode(I)),!ne.Endpoint||!ne.Bucket||!ne.FileName)return console.error("uploadAddress is invalid"),!1}else ne.Endpoint=j.endpoint,ne.Bucket=j.bucket,ne.FileName=j.object;this._ut="vod",this._uploadWay="vod",this.options.region=z.Region||this.options.region,this.init(z.AccessKeyId,z.AccessKeySecret,z.SecurityToken,z.Expiration),j.endpoint=j._endpoint?j._endpoint:ne.Endpoint,j.bucket=j._bucket?j._bucket:ne.Bucket,j.object=j._object?j._object:ne.FileName,j.region=this.options.region,F&&(j.videoId=F),this._ossUpload=null,this._uploadCore(j,O.retry),O.retry=!1}},{key:"_refreshSTSTokenUpload",value:function(O,D,I,F){if(!D||!I||!F)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;var z={accessKeyId:D,securityToken:F,accessKeySecret:I,videoId:O.object,requestId:O.ri,region:this.options.region},ne=this,j="refreshUploadAuth";O.isImage&&(j="getImageUploadAuth"),_.default[j](z,function(G){ne.setUploadAuthAndAddress(O,G.UploadAuth,UploadAddress),ne._state=h.VODSTATE.START},function(G){ne._error(O,{name:G.Code,code:G.Code,message:G.Message,requestId:G.RequestId})})}},{key:"_upload",value:function(O){var D=arguments.length>1&&arguments[1]!==void 0&&arguments[1],I=this.options;if(O.retry=D,I.onUploadstarted&&!D)try{var F=this._getCheckoutpoint(O);F&&F.state!=h.UPLOADSTATE.UPLOADING&&(O.checkpoint=F,O.videoId=F.videoId),I.onUploadstarted(O)}catch(z){console.log(z)}}},{key:"_uploadCore",value:function(O){if(arguments.length>1&&arguments[1]!==void 0&&arguments[1],!this._ossCreditor.accessKeyId||!this._ossCreditor.accessKeySecret||!this._ossCreditor.securityToken)throw new Error("AccessKeyId\u3001AccessKeySecret\u3001securityToken should not be null");if(O.state=h.UPLOADSTATE.UPLOADING,!this._ossUpload){O.endpoint=O.endpoint||"http://oss-cn-hangzhou.aliyuncs.com";var D=this;this._ossUpload=new l.default({bucket:O.bucket,endpoint:O.endpoint,AccessKeyId:this._ossCreditor.accessKeyId,AccessKeySecret:this._ossCreditor.accessKeySecret,SecurityToken:this._ossCreditor.securityToken,timeout:this.options.timeout,cname:this.options.cname},{onerror:function(X,Z){D._error.call(D,X,Z)},oncomplete:function(X,Z){D._complete.call(D,X,Z)},onprogress:function(X,Z,K){D._progress.call(D,X,Z,K)}})}var I=d.default.getFileType(O.file.name),F=this._getCheckoutpoint(O),z="",ne="";F&&F.checkpoint&&(ne=F.state,z=F.videoId,F=F.checkpoint),F&&z==O.videoId&&ne!=h.UPLOADSTATE.UPLOADING&&(F.file=O.file,O.checkpoint=F,F.uploadId);var j=this._adjustPartSize(O);this._reportLog("20002",O,{ft:I,fs:O.file.size,bu:O.bucket,ok:O.object,vid:O.videoId||"",fn:O.file.name,fw:null,fh:null,ps:j});var G={headers:{"x-oss-notification":O.userData?O.userData:""},partSize:j,parallel:this.options.parallel};this._ossUpload.upload(O,G)}},{key:"_findUploadIndex",value:function(){for(var O=-1,D=0;D<this._uploadList.length;D++)if(this._uploadList[D].state==h.UPLOADSTATE.INIT){O=D;break}return O}},{key:"_error",value:function(O,D){if(D.name=="cancel")try{this.options.onUploadCanceled(O,D)}catch(F){console.log(F)}else{if(D.message.indexOf("InvalidAccessKeyIdError")>0||D.name=="SignatureDoesNotMatchError"||D.code=="SecurityTokenExpired"||D.code=="InvalidSecurityToken.Expired"||D.code=="InvalidAccessKeyId"&&this._ossCreditor.securityToken){if(this.options.onUploadTokenExpired){this._state=h.VODSTATE.EXPIRE,O.state=h.UPLOADSTATE.FAIlURE;try{this.options.onUploadTokenExpired(O,D)}catch(F){console.log(F)}}return}if((D.name=="RequestTimeoutError"||D.name=="ConnectionTimeout"||D.name=="ConnectionTimeoutError")&&this._retryTotal>this._retryCount){var I=this;return setTimeout(function(){I._uploadCore(O,!0)},1e3*I._retryDuration),void this._retryCount++}D.name=="NoSuchUploadError"&&this._removeCheckoutpoint(O),this._handleError(O,D)}}},{key:"_handleError",value:function(O,D){var I=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],F=h.UPLOADSTATE.FAIlURE;if(O.state!=h.UPLOADSTATE.CANCELED&&(O.state=h.UPLOADSTATE.FAIlURE,this._state=h.VODSTATE.FAILURE,this.options.onUploadFailed&&D&&D.code&&D.message))try{this.options.onUploadFailed(O,D.code,D.message)}catch(ne){console.log(ne)}if(I&&this._changeState(O,F),this._reportLog("20006",O,{code:D.name,message:D.message,requestId:D.requestId,fs:O.file.size,bu:O.bucket,ok:O.object,fn:O.file.name}),this._reportLog("20004",O,{requestId:D.requestId,fs:O.file.size,bu:O.bucket,ok:O.object,fn:O.file.name}),O.ri=b.default.create(),this._findUploadIndex()!=-1){var z=this;this._state=h.VODSTATE.START,setTimeout(function(){z.nextUpload()},100)}}},{key:"_complete",value:function(O,D){if(O.state=h.UPLOADSTATE.SUCCESS,this.options.onUploadSucceed)try{this.options.onUploadSucceed(O)}catch(z){console.log(z)}var I=0;D&&D.res&&D.res.headers&&(I=D.res.headers["x-oss-request-id"]),this._removeCheckoutpoint(O);var F=this;setTimeout(function(){F.nextUpload()},100),this._retryCount=0,this._reportLog("20003",O,{requestId:I})}},{key:"_progress",value:function(O,D,I){if(this.options.onUploadProgress)try{O.loaded=D.loaded,this.options.onUploadProgress(O,D.total,D.loaded)}catch(Z){console.log(Z)}var F=D.checkpoint,z=0;F&&(O.checkpoint=F,this._saveCheckoutpoint(O,F,h.UPLOADSTATE.UPLOADING),z=F.uploadId),this._retryCount=0;var ne=this._getPortNumber(F),j=0;if(I&&I.headers&&(j=I.headers["x-oss-request-id"]),D.loaded!=0&&this._reportLog("20007",O,{pn:ne,requestId:j}),D.loaded!=1&&this._reportLog("20005",O,{UploadId:z,pn:ne+1,pr:O.retry?1:0,fs:O.file.size,bu:O.bucket,ok:O.object,fn:O.file.name}),!this._invalidUserId&&!O.isImage&&this._ut=="vod"&&this.options.enableUploadProgress){var G={file:O.file,checkpoint:D,userId:this.options.userId,videoId:O.videoId,region:this.options.region,fileHash:O.fileHash};try{var X=this;g.default.upload(G,function(){},function(Z){if((Z=JSON.parse(Z))&&Z.Code=="InvalidParameter"&&Z.Message.indexOf("UserId")>0){X._invalidUserId=!0;var K=Z.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(K)}})}catch(Z){console.log(Z)}}}},{key:"_getPortNumber",value:function(O){if(O){var D=O.doneParts;if(D&&D.length>0)return D[D.length-1].number}return 0}},{key:"_removeCheckoutpoint",value:function(O){var D=this._getCheckoutpointKey(O);u.default.remove(D)}},{key:"_getCheckoutpoint",value:function(O){var D=this._getCheckoutpointKey(O),I=u.default.get(D);if(I)try{return JSON.parse(I)}catch(F){}return""}},{key:"_saveCheckoutpoint",value:function(O,D,I){if(D){var F=this._getCheckoutpointKey(O),z=O.file,ne={fileName:z.name,lastModified:z.lastModified,size:z.size,object:O.object,videoId:O.videoId,bucket:O.bucket,endpoint:O.endpoint,checkpoint:D,loaded:O.loaded,state:I};u.default.set(F,JSON.stringify(ne))}}},{key:"_changeState",value:function(O,D){var I=this._getCheckoutpoint(O);I&&((this._onbeforeunload=!0)&&(D=h.UPLOADSTATE.STOPED),this._saveCheckoutpoint(O,I.checkpoint,D))}},{key:"_getCheckoutpointKey",value:function(O){return"upload_"+O.file.lastModified+"_"+O.file.name+"_"+O.file.size}},{key:"_getCheckoutpointFromCloud",value:function(O,D,I){var F={userId:this.options.userId,uploadInfoList:[{FileName:O.file.name,FileSize:O.file.size,FileCreateTime:O.file.lastModified,FileHash:O.fileHash}],region:this.options.region};g.default.get(F,function(z){D(z)},I)}},{key:"_reportLog",value:function(O,D,I){I||(I={}),I.ri=D.ri,this._ut&&(I.ut=this._ut),this._log.log(O,I)}},{key:"_initEvent",value:function(){var O=this;window&&(window.onbeforeunload=function(D){if(O._onbeforeunload=!0,O._curIndex!=-1&&O._uploadList.length>O._curIndex){var I=O._uploadList[O._curIndex];O._changeState(I,h.UPLOADSTATE.STOPED)}})}},{key:"_initState",value:function(){for(var O=0;O<this._uploadList.length;O++){var D=this._uploadList[O];D.state!=h.UPLOADSTATE.FAIlURE&&D.state!=h.UPLOADSTATE.STOPED||(D.state=h.UPLOADSTATE.INIT)}this._state=h.VODSTATE.INIT}},{key:"_adjustPartSize",value:function(O){return O.file.size/this.options.partSize>1e4?O.file.size/9999:this.options.partSize}}]),A}());w.default=x},function(U,w,P){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.UPLOADSTATE={INIT:"Ready",UPLOADING:"Uploading",SUCCESS:"Success",FAIlURE:"Failure",CANCELED:"Canceled",STOPED:"Stoped"},w.VODSTATE={INIT:"Init",START:"Start",STOP:"Stop",FAILURE:"Failure",EXPIRE:"Expire",END:"End"}},function(U,w,P){"use strict";function S(a){return a&&a.__esModule?a:{default:a}}function C(a,c){if(!(a instanceof c))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var T=function(){function a(c,s){for(var u=0;u<s.length;u++){var i=s[u];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,i.key,i)}}return function(c,s,u){return s&&a(c.prototype,s),u&&a(c,u),c}}(),h=P(3),p=P(17),f=(S(p),P(1)),l=(S(f),function(){function a(c,s){if(C(this,a),c){this._config=c,this.create(this._config),this._uploadInfo=null,this._callback={};var u=function(){};this._callback.onerror=s.onerror||u,this._callback.oncomplete=s.oncomplete||u,this._callback.onprogress=s.onprogress||u}}return T(a,[{key:"create",value:function(c){if(c.endpoint=c.endpoint||this._config.endpoint,c.bucket=c.bucket||this._config.bucket,!(c.AccessKeyId&&c.AccessKeySecret&&c.endpoint&&c.SecurityToken))throw new Error("AccessKeyId\u3001AccessKeySecret\u3001endpoint should not be null");var s={accessKeyId:c.AccessKeyId,accessKeySecret:c.AccessKeySecret,stsToken:c.SecurityToken,endpoint:c.endpoint||this._config.endpoint,bucket:c.bucket||this._config.bucket,secure:!0,cname:c.cname};c.timeout&&(s.timeout=c.timeout),this.oss=new OSS.Wrapper(s)}},{key:"abort",value:function(c){if(c.checkpoint){var s=c.checkpoint.uploadId;this.oss.abortMultipartUpload(c.object,s)}}},{key:"getVersion",value:function(){}},{key:"cancel",value:function(){this.oss.cancel&&this.oss.cancel()}},{key:"upload",value:function(c,s){this._uploadInfo=c;var u=this,i=function(t,d,v){return function(b){u._progress(t,d,v),b()}},n={parallel:s.parallel||this._config.parallel||h.UPLOADDEFAULT.PARALLEL,partSize:s.partSize||this._config.partSize||h.UPLOADDEFAULT.PARTSIZE,progress:i};s.headers&&(n.headers=s.headers),c.checkpoint&&(n.checkpoint=c.checkpoint),c.bucket||(this.oss.options.bucket=c.bucket),c.endpoint||(this.oss.options.endpoint=c.endpoint),this.oss.multipartUpload(c.object,c.file,n).then(function(t,d){u._complete(t)}).catch(function(t){u.oss.cancel&&(u.oss&&u.oss.isCancel()?console.log("oss is cancel as error"):u.oss.cancel()),u._error(t)})}},{key:"header",value:function(c,s,u){this.oss.get(c.object).then(function(i){s(i)}).catch(function(i){u(i)})}},{key:"_progress",value:function(c,s,u){this._callback.onprogress(this._uploadInfo,{loaded:c,total:this._uploadInfo.file.size,checkpoint:s},u)}},{key:"_error",value:function(c){this._callback.onerror(this._uploadInfo,c)}},{key:"_complete",value:function(c){this._callback.oncomplete(this._uploadInfo,c)}}]),a}());w.default=l},function(U,w,P){"use strict";function S(h,p){if(!(h instanceof p))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var C=function(){function h(p,f){for(var l=0;l<f.length;l++){var a=f[l];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(p,a.key,a)}}return function(p,f,l){return f&&h(p.prototype,f),l&&h(p,l),p}}(),T=function(){function h(){S(this,h)}return C(h,null,[{key:"format",value:function(p){if(arguments.length<2)return null;for(var f=arguments[1],l=1;l<arguments.length;l++){var a=new RegExp("\\{"+(l-1)+"\\}","gm");f=f.replace(a,arguments[l+1])}return{code:p,message:f}}},{key:"CODE",get:function(){return{SUCCESS:"Successful",EmptyValue:"InvalidParameter.EmptyValue",STSInvalid:"InvalidParameter.TokenInvalid",ReadFileError:"ReadFileError",FILEDUPLICATION:"FileDuplication",UploadALEADRYSTARTED:"UploadAlearyStarted"}}},{key:"MESSAGE",get:function(){return{SUCCESS:"Successful",EmptyValue:"\u53C2\u6570 {0} \u4E0D\u80FD\u4E3A\u7A7A\u3002",STSInvalid:"STS\u53C2\u6570\u975E\u6CD5\uFF0C accessKeyId\u3001accessKeySecret\u3001secretToken\u3001expireTime\u90FD\u4E0D\u80FD\u4E3A\u7A7A\u3002",ReadFileError:"\u8BFB\u53D6\u6587\u4EF6{0}{1}\u5931\u8D25.",FILEDUPLICATION:"\u6587\u4EF6\u91CD\u590D\u6DFB\u52A0 {0}",UploadALEADRYSTARTED:"\u91CD\u590D\u5F00\u59CB."}}}]),h}();w.default=T},function(U,w,P){"use strict";(function(S){function C(p,f){if(!(p instanceof f))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var T=function(){function p(f,l){for(var a=0;a<l.length;a++){var c=l[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(f,c.key,c)}}return function(f,l,a){return l&&p(f.prototype,l),a&&p(f,a),f}}(),h=function(){function p(){C(this,p)}return T(p,null,[{key:"encode",value:function(f){return new S(f).toString("base64")}},{key:"decode",value:function(f){return new S(f,"base64").toString()}}]),p}();w.default=h}).call(w,P(19).Buffer)},function(U,w,P){"use strict";(function(S){function C(){return h.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function T(ee,k){if(C()<k)throw new RangeError("Invalid typed array length");return h.TYPED_ARRAY_SUPPORT?(ee=new Uint8Array(k),ee.__proto__=h.prototype):(ee===null&&(ee=new h(k)),ee.length=k),ee}function h(ee,k,N){if(!(h.TYPED_ARRAY_SUPPORT||this instanceof h))return new h(ee,k,N);if(typeof ee=="number"){if(typeof k=="string")throw new Error("If encoding is specified then the first argument must be a string");return a(this,ee)}return p(this,ee,k,N)}function p(ee,k,N,$){if(typeof k=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&k instanceof ArrayBuffer?u(ee,k,N,$):typeof k=="string"?c(ee,k,N):i(ee,k)}function f(ee){if(typeof ee!="number")throw new TypeError('"size" argument must be a number');if(ee<0)throw new RangeError('"size" argument must not be negative')}function l(ee,k,N,$){return f(k),k<=0?T(ee,k):N!==void 0?typeof $=="string"?T(ee,k).fill(N,$):T(ee,k).fill(N):T(ee,k)}function a(ee,k){if(f(k),ee=T(ee,k<0?0:0|n(k)),!h.TYPED_ARRAY_SUPPORT)for(var N=0;N<k;++N)ee[N]=0;return ee}function c(ee,k,N){if(typeof N=="string"&&N!==""||(N="utf8"),!h.isEncoding(N))throw new TypeError('"encoding" must be a valid string encoding');var $=0|d(k,N);ee=T(ee,$);var V=ee.write(k,N);return V!==$&&(ee=ee.slice(0,V)),ee}function s(ee,k){var N=k.length<0?0:0|n(k.length);ee=T(ee,N);for(var $=0;$<N;$+=1)ee[$]=255&k[$];return ee}function u(ee,k,N,$){if(k.byteLength,N<0||k.byteLength<N)throw new RangeError("'offset' is out of bounds");if(k.byteLength<N+($||0))throw new RangeError("'length' is out of bounds");return k=N===void 0&&$===void 0?new Uint8Array(k):$===void 0?new Uint8Array(k,N):new Uint8Array(k,N,$),h.TYPED_ARRAY_SUPPORT?(ee=k,ee.__proto__=h.prototype):ee=s(ee,k),ee}function i(ee,k){if(h.isBuffer(k)){var N=0|n(k.length);return ee=T(ee,N),ee.length===0||k.copy(ee,0,0,N),ee}if(k){if(typeof ArrayBuffer!="undefined"&&k.buffer instanceof ArrayBuffer||"length"in k)return typeof k.length!="number"||Ue(k.length)?T(ee,0):s(ee,k);if(k.type==="Buffer"&&Ie(k.data))return s(ee,k.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function n(ee){if(ee>=C())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+C().toString(16)+" bytes");return 0|ee}function t(ee){return+ee!=ee&&(ee=0),h.alloc(+ee)}function d(ee,k){if(h.isBuffer(ee))return ee.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(ee)||ee instanceof ArrayBuffer))return ee.byteLength;typeof ee!="string"&&(ee=""+ee);var N=ee.length;if(N===0)return 0;for(var $=!1;;)switch(k){case"ascii":case"latin1":case"binary":return N;case"utf8":case"utf-8":case void 0:return fe(ee).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*N;case"hex":return N>>>1;case"base64":return De(ee).length;default:if($)return fe(ee).length;k=(""+k).toLowerCase(),$=!0}}function v(ee,k,N){var $=!1;if((k===void 0||k<0)&&(k=0),k>this.length)return"";if((N===void 0||N>this.length)&&(N=this.length),N<=0)return"";if(N>>>=0,k>>>=0,N<=k)return"";for(ee||(ee="utf8");;)switch(ee){case"hex":return ne(this,k,N);case"utf8":case"utf-8":return D(this,k,N);case"ascii":return F(this,k,N);case"latin1":case"binary":return z(this,k,N);case"base64":return O(this,k,N);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,k,N);default:if($)throw new TypeError("Unknown encoding: "+ee);ee=(ee+"").toLowerCase(),$=!0}}function b(ee,k,N){var $=ee[k];ee[k]=ee[N],ee[N]=$}function y(ee,k,N,$,V){if(ee.length===0)return-1;if(typeof N=="string"?($=N,N=0):N>2147483647?N=2147483647:N<-2147483648&&(N=-2147483648),N=+N,isNaN(N)&&(N=V?0:ee.length-1),N<0&&(N=ee.length+N),N>=ee.length){if(V)return-1;N=ee.length-1}else if(N<0){if(!V)return-1;N=0}if(typeof k=="string"&&(k=h.from(k,$)),h.isBuffer(k))return k.length===0?-1:_(ee,k,N,$,V);if(typeof k=="number")return k&=255,h.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?V?Uint8Array.prototype.indexOf.call(ee,k,N):Uint8Array.prototype.lastIndexOf.call(ee,k,N):_(ee,[k],N,$,V);throw new TypeError("val must be string, number or Buffer")}function _(ee,k,N,$,V){function Y(Ve,He){return me===1?Ve[He]:Ve.readUInt16BE(He*me)}var me=1,Ae=ee.length,at=k.length;if($!==void 0&&(($=String($).toLowerCase())==="ucs2"||$==="ucs-2"||$==="utf16le"||$==="utf-16le")){if(ee.length<2||k.length<2)return-1;me=2,Ae/=2,at/=2,N/=2}var Le;if(V){var ke=-1;for(Le=N;Le<Ae;Le++)if(Y(ee,Le)===Y(k,ke===-1?0:Le-ke)){if(ke===-1&&(ke=Le),Le-ke+1===at)return ke*me}else ke!==-1&&(Le-=Le-ke),ke=-1}else for(N+at>Ae&&(N=Ae-at),Le=N;Le>=0;Le--){for(var Ye=!0,Ze=0;Ze<at;Ze++)if(Y(ee,Le+Ze)!==Y(k,Ze)){Ye=!1;break}if(Ye)return Le}return-1}function m(ee,k,N,$){N=Number(N)||0;var V=ee.length-N;$?($=Number($))>V&&($=V):$=V;var Y=k.length;if(Y%2!=0)throw new TypeError("Invalid hex string");$>Y/2&&($=Y/2);for(var me=0;me<$;++me){var Ae=parseInt(k.substr(2*me,2),16);if(isNaN(Ae))return me;ee[N+me]=Ae}return me}function g(ee,k,N,$){return Me(fe(k,ee.length-N),ee,N,$)}function E(ee,k,N,$){return Me(Te(k),ee,N,$)}function o(ee,k,N,$){return E(ee,k,N,$)}function x(ee,k,N,$){return Me(De(k),ee,N,$)}function A(ee,k,N,$){return Me(Fe(k,ee.length-N),ee,N,$)}function O(ee,k,N){return k===0&&N===ee.length?ve.fromByteArray(ee):ve.fromByteArray(ee.slice(k,N))}function D(ee,k,N){N=Math.min(ee.length,N);for(var $=[],V=k;V<N;){var Y=ee[V],me=null,Ae=Y>239?4:Y>223?3:Y>191?2:1;if(V+Ae<=N){var at,Le,ke,Ye;switch(Ae){case 1:Y<128&&(me=Y);break;case 2:at=ee[V+1],(192&at)==128&&(Ye=(31&Y)<<6|63&at)>127&&(me=Ye);break;case 3:at=ee[V+1],Le=ee[V+2],(192&at)==128&&(192&Le)==128&&(Ye=(15&Y)<<12|(63&at)<<6|63&Le)>2047&&(Ye<55296||Ye>57343)&&(me=Ye);break;case 4:at=ee[V+1],Le=ee[V+2],ke=ee[V+3],(192&at)==128&&(192&Le)==128&&(192&ke)==128&&(Ye=(15&Y)<<18|(63&at)<<12|(63&Le)<<6|63&ke)>65535&&Ye<1114112&&(me=Ye)}}me===null?(me=65533,Ae=1):me>65535&&(me-=65536,$.push(me>>>10&1023|55296),me=56320|1023&me),$.push(me),V+=Ae}return I($)}function I(ee){var k=ee.length;if(k<=Ne)return String.fromCharCode.apply(String,ee);for(var N="",$=0;$<k;)N+=String.fromCharCode.apply(String,ee.slice($,$+=Ne));return N}function F(ee,k,N){var $="";N=Math.min(ee.length,N);for(var V=k;V<N;++V)$+=String.fromCharCode(127&ee[V]);return $}function z(ee,k,N){var $="";N=Math.min(ee.length,N);for(var V=k;V<N;++V)$+=String.fromCharCode(ee[V]);return $}function ne(ee,k,N){var $=ee.length;(!k||k<0)&&(k=0),(!N||N<0||N>$)&&(N=$);for(var V="",Y=k;Y<N;++Y)V+=we(ee[Y]);return V}function j(ee,k,N){for(var $=ee.slice(k,N),V="",Y=0;Y<$.length;Y+=2)V+=String.fromCharCode($[Y]+256*$[Y+1]);return V}function G(ee,k,N){if(ee%1!=0||ee<0)throw new RangeError("offset is not uint");if(ee+k>N)throw new RangeError("Trying to access beyond buffer length")}function X(ee,k,N,$,V,Y){if(!h.isBuffer(ee))throw new TypeError('"buffer" argument must be a Buffer instance');if(k>V||k<Y)throw new RangeError('"value" argument is out of bounds');if(N+$>ee.length)throw new RangeError("Index out of range")}function Z(ee,k,N,$){k<0&&(k=65535+k+1);for(var V=0,Y=Math.min(ee.length-N,2);V<Y;++V)ee[N+V]=(k&255<<8*($?V:1-V))>>>8*($?V:1-V)}function K(ee,k,N,$){k<0&&(k=4294967295+k+1);for(var V=0,Y=Math.min(ee.length-N,4);V<Y;++V)ee[N+V]=k>>>8*($?V:3-V)&255}function q(ee,k,N,$,V,Y){if(N+$>ee.length)throw new RangeError("Index out of range");if(N<0)throw new RangeError("Index out of range")}function ie(ee,k,N,$,V){return V||q(ee,k,N,4,34028234663852886e22,-34028234663852886e22),ce.write(ee,k,N,$,23,4),N+4}function oe(ee,k,N,$,V){return V||q(ee,k,N,8,17976931348623157e292,-17976931348623157e292),ce.write(ee,k,N,$,52,8),N+8}function ye(ee){if(ee=pe(ee).replace(Xe,""),ee.length<2)return"";for(;ee.length%4!=0;)ee+="=";return ee}function pe(ee){return ee.trim?ee.trim():ee.replace(/^\s+|\s+$/g,"")}function we(ee){return ee<16?"0"+ee.toString(16):ee.toString(16)}function fe(ee,k){k=k||1/0;for(var N,$=ee.length,V=null,Y=[],me=0;me<$;++me){if((N=ee.charCodeAt(me))>55295&&N<57344){if(!V){if(N>56319){(k-=3)>-1&&Y.push(239,191,189);continue}if(me+1===$){(k-=3)>-1&&Y.push(239,191,189);continue}V=N;continue}if(N<56320){(k-=3)>-1&&Y.push(239,191,189),V=N;continue}N=65536+(V-55296<<10|N-56320)}else V&&(k-=3)>-1&&Y.push(239,191,189);if(V=null,N<128){if((k-=1)<0)break;Y.push(N)}else if(N<2048){if((k-=2)<0)break;Y.push(N>>6|192,63&N|128)}else if(N<65536){if((k-=3)<0)break;Y.push(N>>12|224,N>>6&63|128,63&N|128)}else{if(!(N<1114112))throw new Error("Invalid code point");if((k-=4)<0)break;Y.push(N>>18|240,N>>12&63|128,N>>6&63|128,63&N|128)}}return Y}function Te(ee){for(var k=[],N=0;N<ee.length;++N)k.push(255&ee.charCodeAt(N));return k}function Fe(ee,k){for(var N,$,V,Y=[],me=0;me<ee.length&&!((k-=2)<0);++me)N=ee.charCodeAt(me),$=N>>8,V=N%256,Y.push(V),Y.push($);return Y}function De(ee){return ve.toByteArray(ye(ee))}function Me(ee,k,N,$){for(var V=0;V<$&&!(V+N>=k.length||V>=ee.length);++V)k[V+N]=ee[V];return V}function Ue(ee){return ee!==ee}/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/var ve=P(21),ce=P(22),Ie=P(23);w.Buffer=h,w.SlowBuffer=t,w.INSPECT_MAX_BYTES=50,h.TYPED_ARRAY_SUPPORT=S.TYPED_ARRAY_SUPPORT!==void 0?S.TYPED_ARRAY_SUPPORT:function(){try{var ee=new Uint8Array(1);return ee.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},ee.foo()===42&&typeof ee.subarray=="function"&&ee.subarray(1,1).byteLength===0}catch(k){return!1}}(),w.kMaxLength=C(),h.poolSize=8192,h._augment=function(ee){return ee.__proto__=h.prototype,ee},h.from=function(ee,k,N){return p(null,ee,k,N)},h.TYPED_ARRAY_SUPPORT&&(h.prototype.__proto__=Uint8Array.prototype,h.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&h[Symbol.species]===h&&Object.defineProperty(h,Symbol.species,{value:null,configurable:!0})),h.alloc=function(ee,k,N){return l(null,ee,k,N)},h.allocUnsafe=function(ee){return a(null,ee)},h.allocUnsafeSlow=function(ee){return a(null,ee)},h.isBuffer=function(ee){return!(ee==null||!ee._isBuffer)},h.compare=function(ee,k){if(!h.isBuffer(ee)||!h.isBuffer(k))throw new TypeError("Arguments must be Buffers");if(ee===k)return 0;for(var N=ee.length,$=k.length,V=0,Y=Math.min(N,$);V<Y;++V)if(ee[V]!==k[V]){N=ee[V],$=k[V];break}return N<$?-1:$<N?1:0},h.isEncoding=function(ee){switch(String(ee).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},h.concat=function(ee,k){if(!Ie(ee))throw new TypeError('"list" argument must be an Array of Buffers');if(ee.length===0)return h.alloc(0);var N;if(k===void 0)for(k=0,N=0;N<ee.length;++N)k+=ee[N].length;var $=h.allocUnsafe(k),V=0;for(N=0;N<ee.length;++N){var Y=ee[N];if(!h.isBuffer(Y))throw new TypeError('"list" argument must be an Array of Buffers');Y.copy($,V),V+=Y.length}return $},h.byteLength=d,h.prototype._isBuffer=!0,h.prototype.swap16=function(){var ee=this.length;if(ee%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var k=0;k<ee;k+=2)b(this,k,k+1);return this},h.prototype.swap32=function(){var ee=this.length;if(ee%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var k=0;k<ee;k+=4)b(this,k,k+3),b(this,k+1,k+2);return this},h.prototype.swap64=function(){var ee=this.length;if(ee%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var k=0;k<ee;k+=8)b(this,k,k+7),b(this,k+1,k+6),b(this,k+2,k+5),b(this,k+3,k+4);return this},h.prototype.toString=function(){var ee=0|this.length;return ee===0?"":arguments.length===0?D(this,0,ee):v.apply(this,arguments)},h.prototype.equals=function(ee){if(!h.isBuffer(ee))throw new TypeError("Argument must be a Buffer");return this===ee||h.compare(this,ee)===0},h.prototype.inspect=function(){var ee="",k=w.INSPECT_MAX_BYTES;return this.length>0&&(ee=this.toString("hex",0,k).match(/.{2}/g).join(" "),this.length>k&&(ee+=" ... ")),"<Buffer "+ee+">"},h.prototype.compare=function(ee,k,N,$,V){if(!h.isBuffer(ee))throw new TypeError("Argument must be a Buffer");if(k===void 0&&(k=0),N===void 0&&(N=ee?ee.length:0),$===void 0&&($=0),V===void 0&&(V=this.length),k<0||N>ee.length||$<0||V>this.length)throw new RangeError("out of range index");if($>=V&&k>=N)return 0;if($>=V)return-1;if(k>=N)return 1;if(k>>>=0,N>>>=0,$>>>=0,V>>>=0,this===ee)return 0;for(var Y=V-$,me=N-k,Ae=Math.min(Y,me),at=this.slice($,V),Le=ee.slice(k,N),ke=0;ke<Ae;++ke)if(at[ke]!==Le[ke]){Y=at[ke],me=Le[ke];break}return Y<me?-1:me<Y?1:0},h.prototype.includes=function(ee,k,N){return this.indexOf(ee,k,N)!==-1},h.prototype.indexOf=function(ee,k,N){return y(this,ee,k,N,!0)},h.prototype.lastIndexOf=function(ee,k,N){return y(this,ee,k,N,!1)},h.prototype.write=function(ee,k,N,$){if(k===void 0)$="utf8",N=this.length,k=0;else if(N===void 0&&typeof k=="string")$=k,N=this.length,k=0;else{if(!isFinite(k))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");k|=0,isFinite(N)?(N|=0,$===void 0&&($="utf8")):($=N,N=void 0)}var V=this.length-k;if((N===void 0||N>V)&&(N=V),ee.length>0&&(N<0||k<0)||k>this.length)throw new RangeError("Attempt to write outside buffer bounds");$||($="utf8");for(var Y=!1;;)switch($){case"hex":return m(this,ee,k,N);case"utf8":case"utf-8":return g(this,ee,k,N);case"ascii":return E(this,ee,k,N);case"latin1":case"binary":return o(this,ee,k,N);case"base64":return x(this,ee,k,N);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,ee,k,N);default:if(Y)throw new TypeError("Unknown encoding: "+$);$=(""+$).toLowerCase(),Y=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Ne=4096;h.prototype.slice=function(ee,k){var N=this.length;ee=~~ee,k=k===void 0?N:~~k,ee<0?(ee+=N)<0&&(ee=0):ee>N&&(ee=N),k<0?(k+=N)<0&&(k=0):k>N&&(k=N),k<ee&&(k=ee);var $;if(h.TYPED_ARRAY_SUPPORT)$=this.subarray(ee,k),$.__proto__=h.prototype;else{var V=k-ee;$=new h(V,void 0);for(var Y=0;Y<V;++Y)$[Y]=this[Y+ee]}return $},h.prototype.readUIntLE=function(ee,k,N){ee|=0,k|=0,N||G(ee,k,this.length);for(var $=this[ee],V=1,Y=0;++Y<k&&(V*=256);)$+=this[ee+Y]*V;return $},h.prototype.readUIntBE=function(ee,k,N){ee|=0,k|=0,N||G(ee,k,this.length);for(var $=this[ee+--k],V=1;k>0&&(V*=256);)$+=this[ee+--k]*V;return $},h.prototype.readUInt8=function(ee,k){return k||G(ee,1,this.length),this[ee]},h.prototype.readUInt16LE=function(ee,k){return k||G(ee,2,this.length),this[ee]|this[ee+1]<<8},h.prototype.readUInt16BE=function(ee,k){return k||G(ee,2,this.length),this[ee]<<8|this[ee+1]},h.prototype.readUInt32LE=function(ee,k){return k||G(ee,4,this.length),(this[ee]|this[ee+1]<<8|this[ee+2]<<16)+16777216*this[ee+3]},h.prototype.readUInt32BE=function(ee,k){return k||G(ee,4,this.length),16777216*this[ee]+(this[ee+1]<<16|this[ee+2]<<8|this[ee+3])},h.prototype.readIntLE=function(ee,k,N){ee|=0,k|=0,N||G(ee,k,this.length);for(var $=this[ee],V=1,Y=0;++Y<k&&(V*=256);)$+=this[ee+Y]*V;return V*=128,$>=V&&($-=Math.pow(2,8*k)),$},h.prototype.readIntBE=function(ee,k,N){ee|=0,k|=0,N||G(ee,k,this.length);for(var $=k,V=1,Y=this[ee+--$];$>0&&(V*=256);)Y+=this[ee+--$]*V;return V*=128,Y>=V&&(Y-=Math.pow(2,8*k)),Y},h.prototype.readInt8=function(ee,k){return k||G(ee,1,this.length),128&this[ee]?-1*(255-this[ee]+1):this[ee]},h.prototype.readInt16LE=function(ee,k){k||G(ee,2,this.length);var N=this[ee]|this[ee+1]<<8;return 32768&N?4294901760|N:N},h.prototype.readInt16BE=function(ee,k){k||G(ee,2,this.length);var N=this[ee+1]|this[ee]<<8;return 32768&N?4294901760|N:N},h.prototype.readInt32LE=function(ee,k){return k||G(ee,4,this.length),this[ee]|this[ee+1]<<8|this[ee+2]<<16|this[ee+3]<<24},h.prototype.readInt32BE=function(ee,k){return k||G(ee,4,this.length),this[ee]<<24|this[ee+1]<<16|this[ee+2]<<8|this[ee+3]},h.prototype.readFloatLE=function(ee,k){return k||G(ee,4,this.length),ce.read(this,ee,!0,23,4)},h.prototype.readFloatBE=function(ee,k){return k||G(ee,4,this.length),ce.read(this,ee,!1,23,4)},h.prototype.readDoubleLE=function(ee,k){return k||G(ee,8,this.length),ce.read(this,ee,!0,52,8)},h.prototype.readDoubleBE=function(ee,k){return k||G(ee,8,this.length),ce.read(this,ee,!1,52,8)},h.prototype.writeUIntLE=function(ee,k,N,$){(ee=+ee,k|=0,N|=0,!$)&&X(this,ee,k,N,Math.pow(2,8*N)-1,0);var V=1,Y=0;for(this[k]=255&ee;++Y<N&&(V*=256);)this[k+Y]=ee/V&255;return k+N},h.prototype.writeUIntBE=function(ee,k,N,$){(ee=+ee,k|=0,N|=0,!$)&&X(this,ee,k,N,Math.pow(2,8*N)-1,0);var V=N-1,Y=1;for(this[k+V]=255&ee;--V>=0&&(Y*=256);)this[k+V]=ee/Y&255;return k+N},h.prototype.writeUInt8=function(ee,k,N){return ee=+ee,k|=0,N||X(this,ee,k,1,255,0),h.TYPED_ARRAY_SUPPORT||(ee=Math.floor(ee)),this[k]=255&ee,k+1},h.prototype.writeUInt16LE=function(ee,k,N){return ee=+ee,k|=0,N||X(this,ee,k,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[k]=255&ee,this[k+1]=ee>>>8):Z(this,ee,k,!0),k+2},h.prototype.writeUInt16BE=function(ee,k,N){return ee=+ee,k|=0,N||X(this,ee,k,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[k]=ee>>>8,this[k+1]=255&ee):Z(this,ee,k,!1),k+2},h.prototype.writeUInt32LE=function(ee,k,N){return ee=+ee,k|=0,N||X(this,ee,k,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[k+3]=ee>>>24,this[k+2]=ee>>>16,this[k+1]=ee>>>8,this[k]=255&ee):K(this,ee,k,!0),k+4},h.prototype.writeUInt32BE=function(ee,k,N){return ee=+ee,k|=0,N||X(this,ee,k,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[k]=ee>>>24,this[k+1]=ee>>>16,this[k+2]=ee>>>8,this[k+3]=255&ee):K(this,ee,k,!1),k+4},h.prototype.writeIntLE=function(ee,k,N,$){if(ee=+ee,k|=0,!$){var V=Math.pow(2,8*N-1);X(this,ee,k,N,V-1,-V)}var Y=0,me=1,Ae=0;for(this[k]=255&ee;++Y<N&&(me*=256);)ee<0&&Ae===0&&this[k+Y-1]!==0&&(Ae=1),this[k+Y]=(ee/me>>0)-Ae&255;return k+N},h.prototype.writeIntBE=function(ee,k,N,$){if(ee=+ee,k|=0,!$){var V=Math.pow(2,8*N-1);X(this,ee,k,N,V-1,-V)}var Y=N-1,me=1,Ae=0;for(this[k+Y]=255&ee;--Y>=0&&(me*=256);)ee<0&&Ae===0&&this[k+Y+1]!==0&&(Ae=1),this[k+Y]=(ee/me>>0)-Ae&255;return k+N},h.prototype.writeInt8=function(ee,k,N){return ee=+ee,k|=0,N||X(this,ee,k,1,127,-128),h.TYPED_ARRAY_SUPPORT||(ee=Math.floor(ee)),ee<0&&(ee=255+ee+1),this[k]=255&ee,k+1},h.prototype.writeInt16LE=function(ee,k,N){return ee=+ee,k|=0,N||X(this,ee,k,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[k]=255&ee,this[k+1]=ee>>>8):Z(this,ee,k,!0),k+2},h.prototype.writeInt16BE=function(ee,k,N){return ee=+ee,k|=0,N||X(this,ee,k,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[k]=ee>>>8,this[k+1]=255&ee):Z(this,ee,k,!1),k+2},h.prototype.writeInt32LE=function(ee,k,N){return ee=+ee,k|=0,N||X(this,ee,k,4,2147483647,-2147483648),h.TYPED_ARRAY_SUPPORT?(this[k]=255&ee,this[k+1]=ee>>>8,this[k+2]=ee>>>16,this[k+3]=ee>>>24):K(this,ee,k,!0),k+4},h.prototype.writeInt32BE=function(ee,k,N){return ee=+ee,k|=0,N||X(this,ee,k,4,2147483647,-2147483648),ee<0&&(ee=4294967295+ee+1),h.TYPED_ARRAY_SUPPORT?(this[k]=ee>>>24,this[k+1]=ee>>>16,this[k+2]=ee>>>8,this[k+3]=255&ee):K(this,ee,k,!1),k+4},h.prototype.writeFloatLE=function(ee,k,N){return ie(this,ee,k,!0,N)},h.prototype.writeFloatBE=function(ee,k,N){return ie(this,ee,k,!1,N)},h.prototype.writeDoubleLE=function(ee,k,N){return oe(this,ee,k,!0,N)},h.prototype.writeDoubleBE=function(ee,k,N){return oe(this,ee,k,!1,N)},h.prototype.copy=function(ee,k,N,$){if(N||(N=0),$||$===0||($=this.length),k>=ee.length&&(k=ee.length),k||(k=0),$>0&&$<N&&($=N),$===N)return 0;if(ee.length===0||this.length===0)return 0;if(k<0)throw new RangeError("targetStart out of bounds");if(N<0||N>=this.length)throw new RangeError("sourceStart out of bounds");if($<0)throw new RangeError("sourceEnd out of bounds");$>this.length&&($=this.length),ee.length-k<$-N&&($=ee.length-k+N);var V,Y=$-N;if(this===ee&&N<k&&k<$)for(V=Y-1;V>=0;--V)ee[V+k]=this[V+N];else if(Y<1e3||!h.TYPED_ARRAY_SUPPORT)for(V=0;V<Y;++V)ee[V+k]=this[V+N];else Uint8Array.prototype.set.call(ee,this.subarray(N,N+Y),k);return Y},h.prototype.fill=function(ee,k,N,$){if(typeof ee=="string"){if(typeof k=="string"?($=k,k=0,N=this.length):typeof N=="string"&&($=N,N=this.length),ee.length===1){var V=ee.charCodeAt(0);V<256&&(ee=V)}if($!==void 0&&typeof $!="string")throw new TypeError("encoding must be a string");if(typeof $=="string"&&!h.isEncoding($))throw new TypeError("Unknown encoding: "+$)}else typeof ee=="number"&&(ee&=255);if(k<0||this.length<k||this.length<N)throw new RangeError("Out of range index");if(N<=k)return this;k>>>=0,N=N===void 0?this.length:N>>>0,ee||(ee=0);var Y;if(typeof ee=="number")for(Y=k;Y<N;++Y)this[Y]=ee;else{var me=h.isBuffer(ee)?ee:fe(new h(ee,$).toString()),Ae=me.length;for(Y=0;Y<N-k;++Y)this[Y+k]=me[Y%Ae]}return this};var Xe=/[^+\/0-9A-Za-z-_]/g}).call(w,P(20))},function(U,w){var P;P=function(){return this}();try{P=P||Function("return this")()||(0,eval)("this")}catch(S){typeof window=="object"&&(P=window)}U.exports=P},function(U,w,P){"use strict";function S(n){var t=n.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return n[t-2]==="="?2:n[t-1]==="="?1:0}function C(n){return 3*n.length/4-S(n)}function T(n){var t,d,v,b,y,_=n.length;b=S(n),y=new c(3*_/4-b),d=b>0?_-4:_;var m=0;for(t=0;t<d;t+=4)v=a[n.charCodeAt(t)]<<18|a[n.charCodeAt(t+1)]<<12|a[n.charCodeAt(t+2)]<<6|a[n.charCodeAt(t+3)],y[m++]=v>>16&255,y[m++]=v>>8&255,y[m++]=255&v;return b===2?(v=a[n.charCodeAt(t)]<<2|a[n.charCodeAt(t+1)]>>4,y[m++]=255&v):b===1&&(v=a[n.charCodeAt(t)]<<10|a[n.charCodeAt(t+1)]<<4|a[n.charCodeAt(t+2)]>>2,y[m++]=v>>8&255,y[m++]=255&v),y}function h(n){return l[n>>18&63]+l[n>>12&63]+l[n>>6&63]+l[63&n]}function p(n,t,d){for(var v,b=[],y=t;y<d;y+=3)v=(n[y]<<16)+(n[y+1]<<8)+n[y+2],b.push(h(v));return b.join("")}function f(n){for(var t,d=n.length,v=d%3,b="",y=[],_=0,m=d-v;_<m;_+=16383)y.push(p(n,_,_+16383>m?m:_+16383));return v===1?(t=n[d-1],b+=l[t>>2],b+=l[t<<4&63],b+="=="):v===2&&(t=(n[d-2]<<8)+n[d-1],b+=l[t>>10],b+=l[t>>4&63],b+=l[t<<2&63],b+="="),y.push(b),y.join("")}w.byteLength=C,w.toByteArray=T,w.fromByteArray=f;for(var l=[],a=[],c=typeof Uint8Array!="undefined"?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,i=s.length;u<i;++u)l[u]=s[u],a[s.charCodeAt(u)]=u;a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},function(U,w){w.read=function(P,S,C,T,h){var p,f,l=8*h-T-1,a=(1<<l)-1,c=a>>1,s=-7,u=C?h-1:0,i=C?-1:1,n=P[S+u];for(u+=i,p=n&(1<<-s)-1,n>>=-s,s+=l;s>0;p=256*p+P[S+u],u+=i,s-=8);for(f=p&(1<<-s)-1,p>>=-s,s+=T;s>0;f=256*f+P[S+u],u+=i,s-=8);if(p===0)p=1-c;else{if(p===a)return f?NaN:1/0*(n?-1:1);f+=Math.pow(2,T),p-=c}return(n?-1:1)*f*Math.pow(2,p-T)},w.write=function(P,S,C,T,h,p){var f,l,a,c=8*p-h-1,s=(1<<c)-1,u=s>>1,i=h===23?Math.pow(2,-24)-Math.pow(2,-77):0,n=T?0:p-1,t=T?1:-1,d=S<0||S===0&&1/S<0?1:0;for(S=Math.abs(S),isNaN(S)||S===1/0?(l=isNaN(S)?1:0,f=s):(f=Math.floor(Math.log(S)/Math.LN2),S*(a=Math.pow(2,-f))<1&&(f--,a*=2),S+=f+u>=1?i/a:i*Math.pow(2,1-u),S*a>=2&&(f++,a/=2),f+u>=s?(l=0,f=s):f+u>=1?(l=(S*a-1)*Math.pow(2,h),f+=u):(l=S*Math.pow(2,u-1)*Math.pow(2,h),f=0));h>=8;P[C+n]=255&l,n+=t,l/=256,h-=8);for(f=f<<h|l,c+=h;c>0;P[C+n]=255&f,n+=t,f/=256,c-=8);P[C+n-t]|=128*d}},function(U,w){var P={}.toString;U.exports=Array.isArray||function(S){return P.call(S)=="[object Array]"}},function(U,w,P){"use strict";function S(h,p){if(!(h instanceof p))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var C=function(){function h(p,f){for(var l=0;l<f.length;l++){var a=f[l];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(p,a.key,a)}}return function(p,f,l){return f&&h(p.prototype,f),l&&h(p,l),p}}(),T=function(){function h(){S(this,h)}return C(h,null,[{key:"set",value:function(p,f){try{window.localStorage&&localStorage.setItem(p,f)}catch(l){window[p+"_localStorage"]=f}}},{key:"get",value:function(p){try{if(window.localStorage)return localStorage.getItem(p)}catch(f){return window[p+"_localStorage"]}return""}},{key:"remove",value:function(p){try{window.localStorage&&localStorage.removeItem(p)}catch(f){delete window[p+"_localStorage"]}}}]),h}();w.default=T},function(U,w,P){"use strict";function S(h,p){if(!(h instanceof p))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var C=function(){function h(p,f){for(var l=0;l<f.length;l++){var a=f[l];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(p,a.key,a)}}return function(p,f,l){return f&&h(p.prototype,f),l&&h(p,l),p}}(),T=function(){function h(){S(this,h)}return C(h,null,[{key:"get",value:function(p){for(var f=p+"",l=document.cookie.split(";"),a=0;a<l.length;a++){var c=l[a].trim();if(c.indexOf(f)==0)return unescape(c.substring(f.length+1,c.length))}return""}},{key:"set",value:function(p,f,l){var a=new Date;a.setTime(a.getTime()+24*l*60*60*1e3);var c="expires="+a.toGMTString();document.cookie=p+"="+escape(f)+"; "+c}}]),h}();w.default=T},function(U,w,P){"use strict";function S(c){return c&&c.__esModule?c:{default:c}}function C(c,s){if(!(c instanceof s))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var T=function(){function c(s,u){for(var i=0;i<u.length;i++){var n=u[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(s,n.key,n)}}return function(s,u,i){return u&&c(s.prototype,u),i&&c(s,i),s}}(),h=P(8),p=S(h),f=P(9),l=S(f),a=function(){function c(){C(this,c)}return T(c,null,[{key:"refreshUploadAuth",value:function(s,u,i){var n=(l.default.randomUUID(),l.default.randomUUID()),t={AccessKeyId:s.accessKeyId,SecurityToken:s.securityToken,Action:"RefreshUploadVideo",VideoId:s.videoId,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:n,RequestId:s.requestId},d=l.default.makeUTF8sort(t,"=","&")+"&Signature="+l.default.aliyunEncodeURI(l.default.makeChangeSiga(t,s.accessKeySecret)),v="https://vod."+s.region+".aliyuncs.com/?"+d;p.default.get(v,function(b){var b=JSON.parse(b);u&&u(b)},function(b){if(i){var y=JSON.parse(b);i(y)}})}},{key:"getUploadAuth",value:function(s,u,i){var n=(l.default.randomUUID(),l.default.randomUUID()),t={AccessKeyId:s.accessKeyId,SecurityToken:s.securityToken,Action:"CreateUploadVideo",Title:s.title,FileName:s.fileName,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:n,RequestId:s.requestId};s.fileSize&&(t.FileSize=s.fileSize),s.description&&(t.Description=s.description),s.cateId&&(t.CateId=s.cateId),s.tags&&(t.Tags=s.tags),s.templateGroupId&&(t.TemplateGroupId=s.templateGroupId),s.storageLocation&&(t.StorageLocation=s.storageLocation),s.coverUrl&&(t.CoverURL=s.coverUrl),s.transCodeMode&&(t.TransCodeMode=s.transCodeMode),s.userData&&(t.UserData=JSON.stringify(s.userData));var d=l.default.makeUTF8sort(t,"=","&")+"&Signature="+l.default.aliyunEncodeURI(l.default.makeChangeSiga(t,s.accessKeySecret)),v="https://vod."+s.region+".aliyuncs.com/?"+d;p.default.get(v,function(b){try{b=JSON.parse(b)}catch(y){if(i)return void i({Code:"GetUploadAuthFailed",Message:"\u83B7\u53D6uploadauth\u5931\u8D25"})}u&&u(b)},function(b){if(i){var y={Code:"GetUploadAuthFailed",Message:"\u83B7\u53D6uploadauth\u5931\u8D25"};try{y=JSON.parse(b)}catch(_){}i(y)}})}},{key:"getImageUploadAuth",value:function(s,u,i){var n=(l.default.randomUUID(),l.default.randomUUID()),t={AccessKeyId:s.accessKeyId,SecurityToken:s.securityToken,Action:"CreateUploadImage",ImageType:s.imageType?s.imageType:"default",Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:n,RequestId:s.requestId};s.title&&(t.Title=s.title),s.imageExt&&(t.ImageExt=s.imageExt),s.tags&&(t.Tags=s.tags),s.storageLocation&&(t.StorageLocation=s.storageLocation);var d=l.default.makeUTF8sort(t,"=","&")+"&Signature="+l.default.aliyunEncodeURI(l.default.makeChangeSiga(t,s.accessKeySecret)),v="https://vod."+s.region+".aliyuncs.com/?"+d;p.default.get(v,function(b){b=JSON.parse(b),u&&u(b)},function(b){if(i){var y=JSON.parse(b);i(y)}})}}]),c}();w.default=a},function(U,w,P){!function(S,C,T){U.exports=w=C(P(0),P(28),P(29))}(0,function(S){return S.HmacSHA1})},function(U,w,P){!function(S,C){U.exports=w=C(P(0))}(0,function(S){return function(){var C=S,T=C.lib,h=T.WordArray,p=T.Hasher,f=C.algo,l=[],a=f.SHA1=p.extend({_doReset:function(){this._hash=new h.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(c,s){for(var u=this._hash.words,i=u[0],n=u[1],t=u[2],d=u[3],v=u[4],b=0;b<80;b++){if(b<16)l[b]=0|c[s+b];else{var y=l[b-3]^l[b-8]^l[b-14]^l[b-16];l[b]=y<<1|y>>>31}var _=(i<<5|i>>>27)+v+l[b];_+=b<20?1518500249+(n&t|~n&d):b<40?1859775393+(n^t^d):b<60?(n&t|n&d|t&d)-1894007588:(n^t^d)-899497514,v=d,d=t,t=n<<30|n>>>2,n=i,i=_}u[0]=u[0]+i|0,u[1]=u[1]+n|0,u[2]=u[2]+t|0,u[3]=u[3]+d|0,u[4]=u[4]+v|0},_doFinalize:function(){var c=this._data,s=c.words,u=8*this._nDataBytes,i=8*c.sigBytes;return s[i>>>5]|=128<<24-i%32,s[14+(i+64>>>9<<4)]=Math.floor(u/4294967296),s[15+(i+64>>>9<<4)]=u,c.sigBytes=4*s.length,this._process(),this._hash},clone:function(){var c=p.clone.call(this);return c._hash=this._hash.clone(),c}});C.SHA1=p._createHelper(a),C.HmacSHA1=p._createHmacHelper(a)}(),S.SHA1})},function(U,w,P){!function(S,C){U.exports=w=C(P(0))}(0,function(S){!function(){var C=S,T=C.lib,h=T.Base,p=C.enc,f=p.Utf8,l=C.algo;l.HMAC=h.extend({init:function(a,c){a=this._hasher=new a.init,typeof c=="string"&&(c=f.parse(c));var s=a.blockSize,u=4*s;c.sigBytes>u&&(c=a.finalize(c)),c.clamp();for(var i=this._oKey=c.clone(),n=this._iKey=c.clone(),t=i.words,d=n.words,v=0;v<s;v++)t[v]^=1549556828,d[v]^=909522486;i.sigBytes=n.sigBytes=u,this.reset()},reset:function(){var a=this._hasher;a.reset(),a.update(this._iKey)},update:function(a){return this._hasher.update(a),this},finalize:function(a){var c=this._hasher,s=c.finalize(a);return c.reset(),c.finalize(this._oKey.clone().concat(s))}})}()})},function(U,w,P){!function(S,C){U.exports=w=C(P(0))}(0,function(S){return function(){function C(l,a,c){for(var s=[],u=0,i=0;i<a;i++)if(i%4){var n=c[l.charCodeAt(i-1)]<<i%4*2,t=c[l.charCodeAt(i)]>>>6-i%4*2;s[u>>>2]|=(n|t)<<24-u%4*8,u++}return p.create(s,u)}var T=S,h=T.lib,p=h.WordArray,f=T.enc;f.Base64={stringify:function(l){var a=l.words,c=l.sigBytes,s=this._map;l.clamp();for(var u=[],i=0;i<c;i+=3)for(var n=a[i>>>2]>>>24-i%4*8&255,t=a[i+1>>>2]>>>24-(i+1)%4*8&255,d=a[i+2>>>2]>>>24-(i+2)%4*8&255,v=n<<16|t<<8|d,b=0;b<4&&i+.75*b<c;b++)u.push(s.charAt(v>>>6*(3-b)&63));var y=s.charAt(64);if(y)for(;u.length%4;)u.push(y);return u.join("")},parse:function(l){var a=l.length,c=this._map,s=this._reverseMap;if(!s){s=this._reverseMap=[];for(var u=0;u<c.length;u++)s[c.charCodeAt(u)]=u}var i=c.charAt(64);if(i){var n=l.indexOf(i);n!==-1&&(a=n)}return C(l,a,s)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),S.enc.Base64})},function(U,w,P){"use strict";function S(m){return m&&m.__esModule?m:{default:m}}function C(m,g){if(!(m instanceof g))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var T=function(){function m(g,E){for(var o=0;o<E.length;o++){var x=E[o];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(g,x.key,x)}}return function(g,E,o){return E&&m(g.prototype,E),o&&m(g,o),g}}(),h=P(8),p=S(h),f=P(7),l=S(f),a=P(4),c=S(a),s=P(6),u=S(s),i=P(1),n=S(i),t=P(9),d=S(t),v=P(2),b=P(11),y=P(10),_=function(){function m(){C(this,m)}return T(m,null,[{key:"getAuthInfo",value:function(g,E,o){var x=g+"|f#Ylm&^1TppeRhLg|"+o;return E&&(x=g+"|"+E+"|f#Ylm&^1TppeRhLg|"+o),v(y.parse(x)).toString(b)}},{key:"upload",value:function(g,E,o){var x=n.default.ISODateString(new Date),A=Math.floor(new Date().valueOf()/1e3),O=c.default.getClientId();O=c.default.setClientId(O);var D=m.getAuthInfo(g.userId,O,A),I=d.default.randomUUID(),F={Source:"WebSDK",BusinessType:"UploadVideo",Action:"ReportUploadProgress",TerminalType:"H5",DeviceModel:l.default.browser.name+(l.default.browser.version||""),AppVersion:u.default.version,AuthTimestamp:A,Timestamp:x,AuthInfo:D,FileName:g.file.name,FileSize:g.file.size,FileCreateTime:g.file.lastModified,FileHash:g.fileHash,UploadId:g.checkpoint.checkpoint.uploadId,PartSize:g.checkpoint.checkpoint.partSize,DonePartsCount:g.checkpoint.checkpoint.doneParts.length,UploadPoint:JSON.stringify(g.checkpoint),UploadRatio:g.checkpoint.loaded,UserId:g.userId,VideoId:g.videoId,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:I};O&&(F.ClientId=O);var z=d.default.makeUTF8sort(F,"=","&")+"&Signature="+d.default.aliyunEncodeURI(d.default.makeChangeSiga(F,g.accessKeySecret)),ne="https://vod."+g.region+".aliyuncs.com/?"+z;p.default.get(ne,function(j){E&&E()},function(j){j&&(o(j),console.log(j))})}},{key:"get",value:function(g,E,o){var x=n.default.ISODateString(new Date),A=Math.floor(new Date().valueOf()/1e3),O=c.default.getClientId(),D=m.getAuthInfo(g.userId,O,A),I=d.default.randomUUID(),F={Source:"WebSDK",BusinessType:"UploadVideo",Action:"GetUploadProgress",TerminalType:"H5",DeviceModel:l.default.browser.name+(l.default.browser.version||""),AppVersion:u.default.version,AuthTimestamp:A,Timestamp:x,AuthInfo:D,UserId:g.userId,UploadInfoList:JSON.stringify(g.uploadInfoList),Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:I};O&&(F.ClientId=O);var z=d.default.makeUTF8sort(F,"=","&")+"&Signature="+d.default.aliyunEncodeURI(d.default.makeChangeSiga(F,g.accessKeySecret)),ne="https://vod."+g.region+".aliyuncs.com/?"+z;p.default.get(ne,function(j){var G={},X=O;j=j?JSON.parse(j):{},j.UploadProgress&&j.UploadProgress.UploadProgressList&&j.UploadProgress.UploadProgressList.length>0&&(G=j.UploadProgress.UploadProgressList[0],X=G.ClientId),c.default.setClientId(X),E&&E(G)},function(j){j&&(o(j),console.log(j))})}}]),m}();w.default=_},function(U,w,P){"use strict";function S(f,l){if(!(f instanceof l))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var C=function(){function f(l,a){for(var c=0;c<a.length;c++){var s=a[c];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(l,s.key,s)}}return function(l,a,c){return a&&f(l.prototype,a),c&&f(l,c),l}}(),T=P(2),h=P(33),p=(P(11),function(){function f(){S(this,f)}return C(f,null,[{key:"getMd5",value:function(l,a,c){var s=new FileReader;s.onload=function(n){try{if(n&&n.target){var t=T(h.parse(n.target.result)),d=t.toString();a(d)}}catch(v){console.log(v)}},s.onerror=function(n){console.log(n),errorCallback(n)};var u=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,i=u.call(l,0,1024);s.readAsBinaryString(i)}}]),f}());w.default=p},function(U,w,P){!function(S,C){U.exports=w=C(P(0))}(0,function(S){return S.enc.Latin1})}])}).call(this,B("IyRk"))},ps8w:function(Je,Ke,B){Je.exports=B.p+"static/show.6268a056.svg"},"rAM+":function(Je,Ke,B){"use strict";B.d(Ke,"a",function(){return Q});var ae=B("Qw5x");function Q(U,w){var P;if(typeof Symbol=="undefined"||U[Symbol.iterator]==null){if(Array.isArray(U)||(P=Object(ae.a)(U))||w&&U&&typeof U.length=="number"){P&&(U=P);var S=0,C=function(){};return{s:C,n:function(){return S>=U.length?{done:!0}:{done:!1,value:U[S++]}},e:function(l){throw l},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 T=!0,h=!1,p;return{s:function(){P=U[Symbol.iterator]()},n:function(){var l=P.next();return T=l.done,l},e:function(l){h=!0,p=l},f:function(){try{!T&&P.return!=null&&P.return()}finally{if(h)throw p}}}}},rHrb:function(Je,Ke,B){"use strict";Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.CopyToClipboard=void 0;var ae=U(B("cDcd")),Q=U(B("+QRC"));function U(t){return t&&t.__esModule?t:{default:t}}function w(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?w=function(v){return typeof v}:w=function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},w(t)}function P(t,d){var v=Object.keys(t);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(t);d&&(b=b.filter(function(y){return Object.getOwnPropertyDescriptor(t,y).enumerable})),v.push.apply(v,b)}return v}function S(t){for(var d=1;d<arguments.length;d++){var v=arguments[d]!=null?arguments[d]:{};d%2?P(v,!0).forEach(function(b){i(t,b,v[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(v)):P(v).forEach(function(b){Object.defineProperty(t,b,Object.getOwnPropertyDescriptor(v,b))})}return t}function C(t,d){if(t==null)return{};var v=T(t,d),b,y;if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(t);for(y=0;y<_.length;y++){if(b=_[y],d.indexOf(b)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(t,b))continue;v[b]=t[b]}}return v}function T(t,d){if(t==null)return{};var v={},b=Object.keys(t),y,_;for(_=0;_<b.length;_++){if(y=b[_],d.indexOf(y)>=0)continue;v[y]=t[y]}return v}function h(t,d){if(!(t instanceof d))throw new TypeError("Cannot call a class as a function")}function p(t,d){for(var v=0;v<d.length;v++){var b=d[v];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(t,b.key,b)}}function f(t,d,v){return d&&p(t.prototype,d),v&&p(t,v),t}function l(t,d){return d&&(w(d)==="object"||typeof d=="function")?d:c(t)}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(v){return v.__proto__||Object.getPrototypeOf(v)},a(t)}function c(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(d&&d.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),d&&u(t,d)}function u(t,d){return u=Object.setPrototypeOf||function(b,y){return b.__proto__=y,b},u(t,d)}function i(t,d,v){return d in t?Object.defineProperty(t,d,{value:v,enumerable:!0,configurable:!0,writable:!0}):t[d]=v,t}var n=function(t){s(d,t);function d(){var v,b;h(this,d);for(var y=arguments.length,_=new Array(y),m=0;m<y;m++)_[m]=arguments[m];return b=l(this,(v=a(d)).call.apply(v,[this].concat(_))),i(c(b),"onClick",function(g){var E=b.props,o=E.text,x=E.onCopy,A=E.children,O=E.options,D=ae.default.Children.only(A),I=(0,Q.default)(o,O);x&&x(o,I),D&&D.props&&typeof D.props.onClick=="function"&&D.props.onClick(g)}),b}return f(d,[{key:"render",value:function(){var b=this.props,y=b.text,_=b.onCopy,m=b.options,g=b.children,E=C(b,["text","onCopy","options","children"]),o=ae.default.Children.only(g);return ae.default.cloneElement(o,S({},E,{onClick:this.onClick}))}}]),d}(ae.default.PureComponent);Ke.CopyToClipboard=n,i(n,"defaultProps",{onCopy:void 0,options:void 0})},rUJ1:function(Je,Ke){const B=/[&<>"']/,ae=/[&<>"']/g,Q=/[<>"']|&(?!#?\w+;)/,U=/[<>"']|&(?!#?\w+;)/g,w={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},P=m=>w[m];function S(m,g){if(g){if(B.test(m))return m.replace(ae,P)}else if(Q.test(m))return m.replace(U,P);return m}const C=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function T(m){return m.replace(C,(g,E)=>(E=E.toLowerCase(),E==="colon"?":":E.charAt(0)==="#"?E.charAt(1)==="x"?String.fromCharCode(parseInt(E.substring(2),16)):String.fromCharCode(+E.substring(1)):""))}const h=/(^|[^\[])\^/g;function p(m,g){m=m.source||m,g=g||"";const E={replace:(o,x)=>(x=x.source||x,x=x.replace(h,"$1"),m=m.replace(o,x),E),getRegex:()=>new RegExp(m,g)};return E}const f=/[^\w:]/g,l=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function a(m,g,E){if(m){let o;try{o=decodeURIComponent(T(E)).replace(f,"").toLowerCase()}catch(x){return null}if(o.indexOf("javascript:")===0||o.indexOf("vbscript:")===0||o.indexOf("data:")===0)return null}g&&!l.test(E)&&(E=n(g,E));try{E=encodeURI(E).replace(/%25/g,"%")}catch(o){return null}return E}const c={},s=/^[^:]+:\/*[^/]*$/,u=/^([^:]+:)[\s\S]*$/,i=/^([^:]+:\/*[^/]*)[\s\S]*$/;function n(m,g){c[" "+m]||(s.test(m)?c[" "+m]=m+"/":c[" "+m]=b(m,"/",!0)),m=c[" "+m];const E=m.indexOf(":")===-1;return g.substring(0,2)==="//"?E?g:m.replace(u,"$1")+g:g.charAt(0)==="/"?E?g:m.replace(i,"$1")+g:m+g}const t={exec:function(){}};function d(m){let g=1,E,o;for(;g<arguments.length;g++){E=arguments[g];for(o in E)Object.prototype.hasOwnProperty.call(E,o)&&(m[o]=E[o])}return m}function v(m,g){const E=m.replace(/\|/g,(A,O,D)=>{let I=!1,F=O;for(;--F>=0&&D[F]==="\\";)I=!I;return I?"|":" |"}),o=E.split(/ \|/);let x=0;if(o.length>g)o.splice(g);else for(;o.length<g;)o.push("");for(;x<o.length;x++)o[x]=o[x].trim().replace(/\\\|/g,"|");return o}function b(m,g,E){const o=m.length;if(o===0)return"";let x=0;for(;x<o;){const A=m.charAt(o-x-1);if(A===g&&!E)x++;else if(A!==g&&E)x++;else break}return m.substr(0,o-x)}function y(m,g){if(m.indexOf(g[1])===-1)return-1;const E=m.length;let o=0,x=0;for(;x<E;x++)if(m[x]==="\\")x++;else if(m[x]===g[0])o++;else if(m[x]===g[1]&&(o--,o<0))return x;return-1}function _(m){m&&m.sanitize&&!m.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}Je.exports={escape:S,unescape:T,edit:p,cleanUrl:a,resolveUrl:n,noopTest:t,merge:d,splitCells:v,rtrim:b,findClosingBracket:y,checkSanitizeDeprecation:_}},rdUC:function(Je,Ke,B){var ae=B("MFOe"),Q=ae.Global;Je.exports={name:"localStorage",read:w,write:P,each:S,remove:C,clearAll:T};function U(){return Q.localStorage}function w(h){return U().getItem(h)}function P(h,p){return U().setItem(h,p)}function S(h){for(var p=U().length-1;p>=0;p--){var f=U().key(p);h(w(f),f)}}function C(h){return U().removeItem(h)}function T(){return U().clear()}},"s8/Y":function(Je,Ke,B){Je.exports=B.p+"static/jx.6713fc81.svg"},"sB/4":function(Je,Ke,B){Je.exports=B.p+"static/b.7405990c.svg"},sNtx:function(Je,Ke,B){},sR1s:function(Je,Ke,B){"use strict";B.d(Ke,"b",function(){return w}),B.d(Ke,"a",function(){return P}),B.d(Ke,"c",function(){return S}),B.d(Ke,"d",function(){return C});var ae=B("U8pU"),Q="RC_TABLE_KEY";function U(T){return T==null?[]:Array.isArray(T)?T:[T]}function w(T,h){if(!h&&typeof h!="number")return T;for(var p=U(h),f=T,l=0;l<p.length;l+=1){if(!f)return null;var a=p[l];f=f[a]}return f}function P(T){var h=[],p={};return T.forEach(function(f){for(var l=f||{},a=l.key,c=l.dataIndex,s=a||U(c).join("-")||Q;p[s];)s="".concat(s,"_next");p[s]=!0,h.push(s)}),h}function S(){var T={};function h(a,c){c&&Object.keys(c).forEach(function(s){var u=c[s];u&&Object(ae.a)(u)==="object"?(a[s]=a[s]||{},h(a[s],u)):a[s]=u})}for(var p=arguments.length,f=new Array(p),l=0;l<p;l++)f[l]=arguments[l];return f.forEach(function(a){h(T,a)}),T}function C(T){return T!=null}},sboe:function(Je,Ke,B){"use strict";B.d(Ke,"a",function(){return U});var ae=B("cDcd"),Q=B.n(ae),U=ae.createContext(null)},"t/PP":function(Je,Ke,B){Je.exports=B.p+"static/title.dd3b799f.svg"},t23M:function(Je,Ke,B){"use strict";var ae=B("VTBJ"),Q=B("1OyB"),U=B("vuIU"),w=B("Ji7U"),P=B("LK+K"),S=B("cDcd"),C=B.n(S),T=B("m+aA"),h=B("Zm9Q"),p=B("Kwbf"),f=B("c+Xe"),l=B("bdgK"),a="rc-observer-key",c=function(s){Object(w.a)(i,s);var u=Object(P.a)(i);function i(){var n;return Object(Q.a)(this,i),n=u.apply(this,arguments),n.resizeObserver=null,n.childNode=null,n.currentElement=null,n.state={width:0,height:0,offsetHeight:0,offsetWidth:0},n.onResize=function(t){var d=n.props.onResize,v=t[0].target,b=v.getBoundingClientRect(),y=b.width,_=b.height,m=v.offsetWidth,g=v.offsetHeight,E=Math.floor(y),o=Math.floor(_);if(n.state.width!==E||n.state.height!==o||n.state.offsetWidth!==m||n.state.offsetHeight!==g){var x={width:E,height:o,offsetWidth:m,offsetHeight:g};n.setState(x),d&&Promise.resolve().then(function(){d(Object(ae.a)(Object(ae.a)({},x),{},{offsetWidth:m,offsetHeight:g}))})}},n.setChildNode=function(t){n.childNode=t},n}return Object(U.a)(i,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var t=this.props.disabled;if(t){this.destroyObserver();return}var d=Object(T.a)(this.childNode||this),v=d!==this.currentElement;v&&(this.destroyObserver(),this.currentElement=d),!this.resizeObserver&&d&&(this.resizeObserver=new l.default(this.onResize),this.resizeObserver.observe(d))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var t=this.props.children,d=Object(h.a)(t);if(d.length>1)Object(p.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(d.length===0)return Object(p.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var v=d[0];if(S.isValidElement(v)&&Object(f.c)(v)){var b=v.ref;d[0]=S.cloneElement(v,{ref:Object(f.a)(b,this.setChildNode)})}return d.length===1?d[0]:d.map(function(y,_){return!S.isValidElement(y)||"key"in y&&y.key!==null?y:S.cloneElement(y,{key:"".concat(a,"-").concat(_)})})}}]),i}(S.Component);c.displayName="ResizeObserver",Ke.a=c},twBr:function(Je,Ke,B){Je.exports=B.p+"static/s.1f286590.svg"},uMZB:function(Je,Ke,B){Je.exports={header:"header___3a50V",checkboxs:"checkboxs___3TnBC",field:"field___SHW6f","oj-form-container":"oj-form-container___36KBv","oj-left-panel":"oj-left-panel___3Fdj5","oj-form-info":"oj-form-info___dilPb",footer:"footer___1Ie9U","test-case-name":"test-case-name___356US","btn-remove-case":"btn-remove-case___1Z5cd","icon-tag":"icon-tag___3zUaP",btn_back:"btn_back___2UBbR",testJi:"testJi___1dyLk",upBtn:"upBtn___1I0SJ"}},uQRt:function(Je,Ke,B){Je.exports=ae;function ae(){return B("gaXo"),{}}},ulZh:function(Je,Ke,B){typeof window!="undefined"&&function(Q,U){Je.exports=U()}(this,function(){return function(ae){var Q={};function U(w){if(Q[w])return Q[w].exports;var P=Q[w]={i:w,l:!1,exports:{}};return ae[w].call(P.exports,P,P.exports,U),P.l=!0,P.exports}return U.m=ae,U.c=Q,U.d=function(w,P,S){U.o(w,P)||Object.defineProperty(w,P,{enumerable:!0,get:S})},U.r=function(w){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(w,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(w,"__esModule",{value:!0})},U.t=function(w,P){if(P&1&&(w=U(w)),P&8)return w;if(P&4&&typeof w=="object"&&w&&w.__esModule)return w;var S=Object.create(null);if(U.r(S),Object.defineProperty(S,"default",{enumerable:!0,value:w}),P&2&&typeof w!="string")for(var C in w)U.d(S,C,function(T){return w[T]}.bind(null,C));return S},U.n=function(w){var P=w&&w.__esModule?function(){return w.default}:function(){return w};return U.d(P,"a",P),P},U.o=function(w,P){return Object.prototype.hasOwnProperty.call(w,P)},U.p="/dist/",U(U.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(ae,Q,U){"use strict";var w=Object.prototype.hasOwnProperty,P="~";function S(){}Object.create&&(S.prototype=Object.create(null),new S().__proto__||(P=!1));function C(f,l,a){this.fn=f,this.context=l,this.once=a||!1}function T(f,l,a,c,s){if(typeof a!="function")throw new TypeError("The listener must be a function");var u=new C(a,c||f,s),i=P?P+l:l;return f._events[i]?f._events[i].fn?f._events[i]=[f._events[i],u]:f._events[i].push(u):(f._events[i]=u,f._eventsCount++),f}function h(f,l){--f._eventsCount===0?f._events=new S:delete f._events[l]}function p(){this._events=new S,this._eventsCount=0}p.prototype.eventNames=function(){var l=[],a,c;if(this._eventsCount===0)return l;for(c in a=this._events)w.call(a,c)&&l.push(P?c.slice(1):c);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(a)):l},p.prototype.listeners=function(l){var a=P?P+l:l,c=this._events[a];if(!c)return[];if(c.fn)return[c.fn];for(var s=0,u=c.length,i=new Array(u);s<u;s++)i[s]=c[s].fn;return i},p.prototype.listenerCount=function(l){var a=P?P+l:l,c=this._events[a];return c?c.fn?1:c.length:0},p.prototype.emit=function(l,a,c,s,u,i){var n=P?P+l:l;if(!this._events[n])return!1;var t=this._events[n],d=arguments.length,v,b;if(t.fn){t.once&&this.removeListener(l,t.fn,void 0,!0);switch(d){case 1:return t.fn.call(t.context),!0;case 2:return t.fn.call(t.context,a),!0;case 3:return t.fn.call(t.context,a,c),!0;case 4:return t.fn.call(t.context,a,c,s),!0;case 5:return t.fn.call(t.context,a,c,s,u),!0;case 6:return t.fn.call(t.context,a,c,s,u,i),!0}for(b=1,v=new Array(d-1);b<d;b++)v[b-1]=arguments[b];t.fn.apply(t.context,v)}else{var y=t.length,_;for(b=0;b<y;b++){t[b].once&&this.removeListener(l,t[b].fn,void 0,!0);switch(d){case 1:t[b].fn.call(t[b].context);break;case 2:t[b].fn.call(t[b].context,a);break;case 3:t[b].fn.call(t[b].context,a,c);break;case 4:t[b].fn.call(t[b].context,a,c,s);break;default:if(!v)for(_=1,v=new Array(d-1);_<d;_++)v[_-1]=arguments[_];t[b].fn.apply(t[b].context,v)}}}return!0},p.prototype.on=function(l,a,c){return T(this,l,a,c,!1)},p.prototype.once=function(l,a,c){return T(this,l,a,c,!0)},p.prototype.removeListener=function(l,a,c,s){var u=P?P+l:l;if(!this._events[u])return this;if(!a)return h(this,u),this;var i=this._events[u];if(i.fn)i.fn===a&&(!s||i.once)&&(!c||i.context===c)&&h(this,u);else{for(var n=0,t=[],d=i.length;n<d;n++)(i[n].fn!==a||s&&!i[n].once||c&&i[n].context!==c)&&t.push(i[n]);t.length?this._events[u]=t.length===1?t[0]:t:h(this,u)}return this},p.prototype.removeAllListeners=function(l){var a;return l?(a=P?P+l:l,this._events[a]&&h(this,a)):(this._events=new S,this._eventsCount=0),this},p.prototype.off=p.prototype.removeListener,p.prototype.addListener=p.prototype.on,p.prefixed=P,p.EventEmitter=p,ae.exports=p},"./node_modules/url-toolkit/src/url-toolkit.js":function(ae,Q,U){(function(w){var P=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,S=/^([^\/?#]*)([^]*)$/,C=/(?:\/|^)\.(?=\/)/g,T=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,h={buildAbsoluteURL:function(p,f,l){if(l=l||{},p=p.trim(),f=f.trim(),!f){if(!l.alwaysNormalize)return p;var a=h.parseURL(p);if(!a)throw new Error("Error trying to parse base URL.");return a.path=h.normalizePath(a.path),h.buildURLFromParts(a)}var c=h.parseURL(f);if(!c)throw new Error("Error trying to parse relative URL.");if(c.scheme)return l.alwaysNormalize?(c.path=h.normalizePath(c.path),h.buildURLFromParts(c)):f;var s=h.parseURL(p);if(!s)throw new Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&s.path[0]!=="/"){var u=S.exec(s.path);s.netLoc=u[1],s.path=u[2]}s.netLoc&&!s.path&&(s.path="/");var i={scheme:s.scheme,netLoc:c.netLoc,path:null,params:c.params,query:c.query,fragment:c.fragment};if(!c.netLoc&&(i.netLoc=s.netLoc,c.path[0]!=="/"))if(!c.path)i.path=s.path,c.params||(i.params=s.params,c.query||(i.query=s.query));else{var n=s.path,t=n.substring(0,n.lastIndexOf("/")+1)+c.path;i.path=h.normalizePath(t)}return i.path===null&&(i.path=l.alwaysNormalize?h.normalizePath(c.path):c.path),h.buildURLFromParts(i)},parseURL:function(p){var f=P.exec(p);return f?{scheme:f[1]||"",netLoc:f[2]||"",path:f[3]||"",params:f[4]||"",query:f[5]||"",fragment:f[6]||""}:null},normalizePath:function(p){for(p=p.split("").reverse().join("").replace(C,"");p.length!==(p=p.replace(T,"")).length;);return p.split("").reverse().join("")},buildURLFromParts:function(p){return p.scheme+p.netLoc+p.path+p.params+p.query+p.fragment}};ae.exports=h})(this)},"./node_modules/webworkify-webpack/index.js":function(ae,Q,U){function w(l){var a={};function c(u){if(a[u])return a[u].exports;var i=a[u]={i:u,l:!1,exports:{}};return l[u].call(i.exports,i,i.exports,c),i.l=!0,i.exports}c.m=l,c.c=a,c.i=function(u){return u},c.d=function(u,i,n){c.o(u,i)||Object.defineProperty(u,i,{configurable:!1,enumerable:!0,get:n})},c.r=function(u){Object.defineProperty(u,"__esModule",{value:!0})},c.n=function(u){var i=u&&u.__esModule?function(){return u.default}:function(){return u};return c.d(i,"a",i),i},c.o=function(u,i){return Object.prototype.hasOwnProperty.call(u,i)},c.p="/",c.oe=function(u){throw console.error(u),u};var s=c(c.s=ENTRY_MODULE);return s.default||s}var P="[\\.|\\-|\\+|\\w|/|@]+",S="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+P+").*?\\)";function C(l){return(l+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function T(l){return!isNaN(1*l)}function h(l,a,c){var s={};s[c]=[];var u=a.toString(),i=u.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!i)return s;for(var n=i[1],t=new RegExp("(\\\\n|\\W)"+C(n)+S,"g"),d;d=t.exec(u);){if(d[3]==="dll-reference")continue;s[c].push(d[3])}for(t=new RegExp("\\("+C(n)+'\\("(dll-reference\\s('+P+'))"\\)\\)'+S,"g");d=t.exec(u);)l[d[2]]||(s[c].push(d[1]),l[d[2]]=U(d[1]).m),s[d[2]]=s[d[2]]||[],s[d[2]].push(d[4]);for(var v=Object.keys(s),b=0;b<v.length;b++)for(var y=0;y<s[v[b]].length;y++)T(s[v[b]][y])&&(s[v[b]][y]=1*s[v[b]][y]);return s}function p(l){var a=Object.keys(l);return a.reduce(function(c,s){return c||l[s].length>0},!1)}function f(l,a){for(var c={main:[a]},s={main:[]},u={main:{}};p(c);)for(var i=Object.keys(c),n=0;n<i.length;n++){var t=i[n],d=c[t],v=d.pop();if(u[t]=u[t]||{},u[t][v]||!l[t][v])continue;u[t][v]=!0,s[t]=s[t]||[],s[t].push(v);for(var b=h(l,l[t][v],t),y=Object.keys(b),_=0;_<y.length;_++)c[y[_]]=c[y[_]]||[],c[y[_]]=c[y[_]].concat(b[y[_]])}return s}ae.exports=function(l,a){a=a||{};var c={main:U.m},s=a.all?{main:Object.keys(c.main)}:f(c,l),u="";Object.keys(s).filter(function(v){return v!=="main"}).forEach(function(v){for(var b=0;s[v][b];)b++;s[v].push(b),c[v][b]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",u=u+"var "+v+" = ("+w.toString().replace("ENTRY_MODULE",JSON.stringify(b))+")({"+s[v].map(function(y){return""+JSON.stringify(y)+": "+c[v][y].toString()}).join(",")+`});
`}),u=u+"new (("+w.toString().replace("ENTRY_MODULE",JSON.stringify(l))+")({"+s.main.map(function(v){return""+JSON.stringify(v)+": "+c.main[v].toString()}).join(",")+"}))(self);";var i=new window.Blob([u],{type:"text/javascript"});if(a.bare)return i;var n=window.URL||window.webkitURL||window.mozURL||window.msURL,t=n.createObjectURL(i),d=new window.Worker(t);return d.objectURL=t,d}},"./src/config.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"hlsDefaultConfig",function(){return _}),U.d(Q,"mergeConfig",function(){return g}),U.d(Q,"enableStreamingMode",function(){return E});var w=U("./src/controller/abr-controller.ts"),P=U("./src/controller/audio-stream-controller.ts"),S=U("./src/controller/audio-track-controller.ts"),C=U("./src/controller/subtitle-stream-controller.ts"),T=U("./src/controller/subtitle-track-controller.ts"),h=U("./src/controller/buffer-controller.ts"),p=U("./src/controller/timeline-controller.ts"),f=U("./src/controller/cap-level-controller.ts"),l=U("./src/controller/fps-controller.ts"),a=U("./src/controller/eme-controller.ts"),c=U("./src/controller/cmcd-controller.ts"),s=U("./src/utils/xhr-loader.ts"),u=U("./src/utils/fetch-loader.ts"),i=U("./src/utils/cues.ts"),n=U("./src/utils/mediakeys-helper.ts"),t=U("./src/utils/logger.ts");function d(){return d=Object.assign||function(o){for(var x=1;x<arguments.length;x++){var A=arguments[x];for(var O in A)Object.prototype.hasOwnProperty.call(A,O)&&(o[O]=A[O])}return o},d.apply(this,arguments)}function v(o,x){var A=Object.keys(o);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(o);x&&(O=O.filter(function(D){return Object.getOwnPropertyDescriptor(o,D).enumerable})),A.push.apply(A,O)}return A}function b(o){for(var x=1;x<arguments.length;x++){var A=arguments[x]!=null?arguments[x]:{};x%2?v(Object(A),!0).forEach(function(O){y(o,O,A[O])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(A)):v(Object(A)).forEach(function(O){Object.defineProperty(o,O,Object.getOwnPropertyDescriptor(A,O))})}return o}function y(o,x,A){return x in o?Object.defineProperty(o,x,{value:A,enumerable:!0,configurable:!0,writable:!0}):o[x]=A,o}var _=b(b({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:Infinity,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:Infinity,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:s.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:w.default,bufferController:h.default,capLevelController:f.default,fpsController:l.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:n.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},m()),{},{subtitleStreamController:C.SubtitleStreamController,subtitleTrackController:T.default,timelineController:p.TimelineController,audioStreamController:P.default,audioTrackController:S.default,emeController:a.default,cmcdController:c.default});function m(){return{cueHandler:i.default,enableCEA708Captions:!0,enableWebVTT:!0,enableIMSC1:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function g(o,x){if((x.liveSyncDurationCount||x.liveMaxLatencyDurationCount)&&(x.liveSyncDuration||x.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(x.liveMaxLatencyDurationCount!==void 0&&(x.liveSyncDurationCount===void 0||x.liveMaxLatencyDurationCount<=x.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(x.liveMaxLatencyDuration!==void 0&&(x.liveSyncDuration===void 0||x.liveMaxLatencyDuration<=x.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return d({},o,x)}function E(o){var x=o.loader;if(x!==u.default&&x!==s.default)t.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),o.progressive=!1;else{var A=Object(u.fetchSupported)();A&&(o.loader=u.default,o.progressive=!0,o.enableSoftwareAES=!0,t.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(ae,Q,U){"use strict";U.r(Q);var w=U("./src/polyfills/number.ts"),P=U("./src/utils/ewma-bandwidth-estimator.ts"),S=U("./src/events.ts"),C=U("./src/utils/buffer-helper.ts"),T=U("./src/errors.ts"),h=U("./src/types/loader.ts"),p=U("./src/utils/logger.ts");function f(c,s){for(var u=0;u<s.length;u++){var i=s[u];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,i.key,i)}}function l(c,s,u){return s&&f(c.prototype,s),u&&f(c,u),c}var a=function(){function c(u){this.hls=void 0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=void 0,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=u;var i=u.config;this.bwEstimator=new P.default(i.abrEwmaSlowVoD,i.abrEwmaFastVoD,i.abrEwmaDefaultEstimate),this.registerListeners()}var s=c.prototype;return s.registerListeners=function(){var i=this.hls;i.on(S.Events.FRAG_LOADING,this.onFragLoading,this),i.on(S.Events.FRAG_LOADED,this.onFragLoaded,this),i.on(S.Events.FRAG_BUFFERED,this.onFragBuffered,this),i.on(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),i.on(S.Events.ERROR,this.onError,this)},s.unregisterListeners=function(){var i=this.hls;i.off(S.Events.FRAG_LOADING,this.onFragLoading,this),i.off(S.Events.FRAG_LOADED,this.onFragLoaded,this),i.off(S.Events.FRAG_BUFFERED,this.onFragBuffered,this),i.off(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),i.off(S.Events.ERROR,this.onError,this)},s.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},s.onFragLoading=function(i,n){var t=n.frag;if(t.type===h.PlaylistLevelType.MAIN&&!this.timer){var d;this.fragCurrent=t,this.partCurrent=(d=n.part)!=null?d:null,this.timer=self.setInterval(this.onCheck,100)}},s.onLevelLoaded=function(i,n){var t=this.hls.config;n.details.live?this.bwEstimator.update(t.abrEwmaSlowLive,t.abrEwmaFastLive):this.bwEstimator.update(t.abrEwmaSlowVoD,t.abrEwmaFastVoD)},s._abandonRulesCheck=function(){var i=this.fragCurrent,n=this.partCurrent,t=this.hls,d=t.autoLevelEnabled,v=t.config,b=t.media;if(!i||!b)return;var y=n?n.stats:i.stats,_=n?n.duration:i.duration;if(y.aborted){p.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!d||b.paused||!b.playbackRate||!b.readyState)return;var m=performance.now()-y.loading.start,g=Math.abs(b.playbackRate);if(m<=500*_/g)return;var E=t.levels,o=t.minAutoLevel,x=E[i.level],A=y.total||Math.max(y.loaded,Math.round(_*x.maxBitrate/8)),O=Math.max(1,y.bwEstimate?y.bwEstimate/8:y.loaded*1e3/m),D=(A-y.loaded)/O,I=b.currentTime,F=(C.BufferHelper.bufferInfo(b,I,v.maxBufferHole).end-I)/g;if(F>=2*_/g||D<=F)return;var z=Number.POSITIVE_INFINITY,ne;for(ne=i.level-1;ne>o;ne--){var j=E[ne].maxBitrate;if(z=_*j/(8*.8*O),z<F)break}if(z>=D)return;var G=this.bwEstimator.getEstimate();p.logger.warn("Fragment "+i.sn+(n?" part "+n.index:"")+" of level "+i.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+ne+`
Current BW estimate: `+(Object(w.isFiniteNumber)(G)?(G/1024).toFixed(3):"Unknown")+` Kb/s
Estimated load time for current fragment: `+D.toFixed(3)+` s
Estimated load time for the next fragment: `+z.toFixed(3)+` s
Time to underbuffer: `+F.toFixed(3)+" s"),t.nextLoadLevel=ne,this.bwEstimator.sample(m,y.loaded),this.clearTimer(),i.loader&&(this.fragCurrent=this.partCurrent=null,i.loader.abort()),t.trigger(S.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:i,part:n,stats:y})},s.onFragLoaded=function(i,n){var t=n.frag,d=n.part;if(t.type===h.PlaylistLevelType.MAIN&&Object(w.isFiniteNumber)(t.sn)){var v=d?d.stats:t.stats,b=d?d.duration:t.duration;if(this.clearTimer(),this.lastLoadedFragLevel=t.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var y=this.hls.levels[t.level],_=(y.loaded?y.loaded.bytes:0)+v.loaded,m=(y.loaded?y.loaded.duration:0)+b;y.loaded={bytes:_,duration:m},y.realBitrate=Math.round(8*_/m)}if(t.bitrateTest){var g={stats:v,frag:t,part:d,id:t.type};this.onFragBuffered(S.Events.FRAG_BUFFERED,g),t.bitrateTest=!1}}},s.onFragBuffered=function(i,n){var t=n.frag,d=n.part,v=d?d.stats:t.stats;if(v.aborted)return;if(t.type!==h.PlaylistLevelType.MAIN||t.sn==="initSegment")return;var b=v.parsing.end-v.loading.start;this.bwEstimator.sample(b,v.loaded),v.bwEstimate=this.bwEstimator.getEstimate(),t.bitrateTest?this.bitrateTestDelay=b/1e3:this.bitrateTestDelay=0},s.onError=function(i,n){switch(n.details){case T.ErrorDetails.FRAG_LOAD_ERROR:case T.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},s.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},s.getNextABRAutoLevel=function(){var i=this.fragCurrent,n=this.partCurrent,t=this.hls,d=t.maxAutoLevel,v=t.config,b=t.minAutoLevel,y=t.media,_=n?n.duration:i?i.duration:0,m=y?y.currentTime:0,g=y&&y.playbackRate!==0?Math.abs(y.playbackRate):1,E=this.bwEstimator?this.bwEstimator.getEstimate():v.abrEwmaDefaultEstimate,o=(C.BufferHelper.bufferInfo(y,m,v.maxBufferHole).end-m)/g,x=this.findBestLevel(E,b,d,o,v.abrBandWidthFactor,v.abrBandWidthUpFactor);if(x>=0)return x;p.logger.trace((o?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var A=_?Math.min(_,v.maxStarvationDelay):v.maxStarvationDelay,O=v.abrBandWidthFactor,D=v.abrBandWidthUpFactor;if(!o){var I=this.bitrateTestDelay;if(I){var F=_?Math.min(_,v.maxLoadingDelay):v.maxLoadingDelay;A=F-I,p.logger.trace("bitrate test took "+Math.round(1e3*I)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*A)+" ms"),O=D=1}}return x=this.findBestLevel(E,b,d,o+A,O,D),Math.max(x,0)},s.findBestLevel=function(i,n,t,d,v,b){for(var y,_=this.fragCurrent,m=this.partCurrent,g=this.lastLoadedFragLevel,E=this.hls.levels,o=E[g],x=!!(o!=null&&(y=o.details)!==null&&y!==void 0&&y.live),A=o==null?void 0:o.codecSet,O=m?m.duration:_?_.duration:0,D=t;D>=n;D--){var I=E[D];if(!I||A&&I.codecSet!==A)continue;var F=I.details,z=(m?F==null?void 0:F.partTarget:F==null?void 0:F.averagetargetduration)||O,ne=void 0;D<=g?ne=v*i:ne=b*i;var j=E[D].maxBitrate,G=j*z/ne;if(p.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+D+"/"+Math.round(ne)+"/"+j+"/"+z+"/"+d+"/"+G),ne>j&&(!G||x&&!this.bitrateTestDelay||G<d))return D}return-1},l(c,[{key:"nextAutoLevel",get:function(){var i=this._nextAutoLevel,n=this.bwEstimator;if(i!==-1&&(!n||!n.canEstimate()))return i;var t=this.getNextABRAutoLevel();return i!==-1&&(t=Math.min(i,t)),t},set:function(i){this._nextAutoLevel=i}}]),c}();Q.default=a},"./src/controller/audio-stream-controller.ts":function(ae,Q,U){"use strict";U.r(Q);var w=U("./src/polyfills/number.ts"),P=U("./src/controller/base-stream-controller.ts"),S=U("./src/events.ts"),C=U("./src/utils/buffer-helper.ts"),T=U("./src/controller/fragment-tracker.ts"),h=U("./src/types/level.ts"),p=U("./src/types/loader.ts"),f=U("./src/loader/fragment.ts"),l=U("./src/demux/chunk-cache.ts"),a=U("./src/demux/transmuxer-interface.ts"),c=U("./src/types/transmuxer.ts"),s=U("./src/controller/fragment-finders.ts"),u=U("./src/utils/discontinuities.ts"),i=U("./src/errors.ts"),n=U("./src/utils/logger.ts");function t(){return t=Object.assign||function(_){for(var m=1;m<arguments.length;m++){var g=arguments[m];for(var E in g)Object.prototype.hasOwnProperty.call(g,E)&&(_[E]=g[E])}return _},t.apply(this,arguments)}function d(_,m){_.prototype=Object.create(m.prototype),_.prototype.constructor=_,v(_,m)}function v(_,m){return v=Object.setPrototypeOf||function(E,o){return E.__proto__=o,E},v(_,m)}var b=100,y=function(_){d(m,_);function m(E,o){var x;return x=_.call(this,E,o,"[audio-stream-controller]")||this,x.videoBuffer=null,x.videoTrackCC=-1,x.waitingVideoCC=-1,x.audioSwitch=!1,x.trackId=-1,x.waitingData=null,x.mainDetails=null,x.bufferFlushed=!1,x._registerListeners(),x}var g=m.prototype;return g.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},g._registerListeners=function(){var o=this.hls;o.on(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),o.on(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),o.on(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.on(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),o.on(S.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),o.on(S.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),o.on(S.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),o.on(S.Events.ERROR,this.onError,this),o.on(S.Events.BUFFER_RESET,this.onBufferReset,this),o.on(S.Events.BUFFER_CREATED,this.onBufferCreated,this),o.on(S.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),o.on(S.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),o.on(S.Events.FRAG_BUFFERED,this.onFragBuffered,this)},g._unregisterListeners=function(){var o=this.hls;o.off(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),o.off(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),o.off(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.off(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),o.off(S.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),o.off(S.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),o.off(S.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),o.off(S.Events.ERROR,this.onError,this),o.off(S.Events.BUFFER_RESET,this.onBufferReset,this),o.off(S.Events.BUFFER_CREATED,this.onBufferCreated,this),o.off(S.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),o.off(S.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),o.off(S.Events.FRAG_BUFFERED,this.onFragBuffered,this)},g.onInitPtsFound=function(o,x){var A=x.frag,O=x.id,D=x.initPTS;if(O==="main"){var I=A.cc;this.initPTS[A.cc]=D,this.log("InitPTS for cc: "+I+" found from main: "+D),this.videoTrackCC=I,this.state===P.State.WAITING_INIT_PTS&&this.tick()}},g.startLoad=function(o){if(!this.levels){this.startPosition=o,this.state=P.State.STOPPED;return}var x=this.lastCurrentTime;this.stopLoad(),this.setInterval(b),this.fragLoadError=0,x>0&&o===-1?(this.log("Override startPosition with lastCurrentTime @"+x.toFixed(3)),this.state=P.State.IDLE):(this.loadedmetadata=!1,this.state=P.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=o,this.tick()},g.doTick=function(){switch(this.state){case P.State.IDLE:this.doTickIdle();break;case P.State.WAITING_TRACK:{var o,x=this.levels,A=this.trackId,O=x==null||((o=x[A])===null||o===void 0)?void 0:o.details;if(O){if(this.waitForCdnTuneIn(O))break;this.state=P.State.WAITING_INIT_PTS}break}case P.State.FRAG_LOADING_WAITING_RETRY:{var D,I=performance.now(),F=this.retryDate;(!F||I>=F||(D=this.media)!==null&&D!==void 0&&D.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=P.State.IDLE);break}case P.State.WAITING_INIT_PTS:{var z=this.waitingData;if(z){var ne=z.frag,j=z.part,G=z.cache,X=z.complete;if(this.initPTS[ne.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=P.State.FRAG_LOADING;var Z=G.flush(),K={frag:ne,part:j,payload:Z,networkDetails:null};this._handleFragmentLoadProgress(K),X&&_.prototype._handleFragmentLoadComplete.call(this,K)}else if(this.videoTrackCC!==this.waitingVideoCC)n.logger.log("Waiting fragment cc ("+ne.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var q=this.getLoadPosition(),ie=C.BufferHelper.bufferInfo(this.mediaBuffer,q,this.config.maxBufferHole),oe=Object(s.fragmentWithinToleranceTest)(ie.end,this.config.maxFragLookUpTolerance,ne);oe<0&&(n.logger.log("Waiting fragment cc ("+ne.cc+") @ "+ne.start+" cancelled because another fragment at "+ie.end+" is needed"),this.clearWaitingFragment())}}else this.state=P.State.IDLE}}this.onTickEnd()},g.clearWaitingFragment=function(){var o=this.waitingData;o&&(this.fragmentTracker.removeFragment(o.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=P.State.IDLE)},g.onTickEnd=function(){var o=this.media;if(!o||!o.readyState)return;var x=this.mediaBuffer?this.mediaBuffer:o,A=x.buffered;!this.loadedmetadata&&A.length&&(this.loadedmetadata=!0),this.lastCurrentTime=o.currentTime},g.doTickIdle=function(){var o,x,A=this.hls,O=this.levels,D=this.media,I=this.trackId,F=A.config;if(!O||!O[I])return;if(!D&&(this.startFragRequested||!F.startFragPrefetch))return;var z=O[I],ne=z.details;if(!ne||ne.live&&this.levelLastLoaded!==I||this.waitForCdnTuneIn(ne)){this.state=P.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,f.ElementaryStreamTypes.AUDIO,p.PlaylistLevelType.AUDIO));var j=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,p.PlaylistLevelType.AUDIO);if(j===null)return;var G=j.len,X=this.getMaxBufferLength(),Z=this.audioSwitch;if(G>=X&&!Z)return;if(!Z&&this._streamEnded(j,ne)){A.trigger(S.Events.BUFFER_EOS,{type:"audio"}),this.state=P.State.ENDED;return}var K=ne.fragments,q=K[0].start,ie=j.end;if(Z){var oe=this.getLoadPosition();ie=oe,ne.PTSKnown&&oe<q&&((j.end>q||j.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),D.currentTime=q+.05))}var ye=this.getNextFragment(ie,ne);if(!ye){this.bufferFlushed=!0;return}((o=ye.decryptdata)===null||o===void 0?void 0:o.keyFormat)==="identity"&&!((x=ye.decryptdata)!==null&&x!==void 0&&x.key)?this.loadKey(ye,ne):this.loadFragment(ye,ne,ie)},g.getMaxBufferLength=function(){var o=_.prototype.getMaxBufferLength.call(this),x=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,p.PlaylistLevelType.MAIN);return x===null?o:Math.max(o,x.len)},g.onMediaDetaching=function(){this.videoBuffer=null,_.prototype.onMediaDetaching.call(this)},g.onAudioTracksUpdated=function(o,x){var A=x.audioTracks;this.resetTransmuxer(),this.levels=A.map(function(O){return new h.Level(O)})},g.onAudioTrackSwitching=function(o,x){var A=!!x.url;this.trackId=x.id;var O=this.fragCurrent;O!=null&&O.loader&&O.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),A?this.setInterval(b):this.resetTransmuxer(),A?(this.audioSwitch=!0,this.state=P.State.IDLE):this.state=P.State.STOPPED,this.tick()},g.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},g.onLevelLoaded=function(o,x){this.mainDetails=x.details},g.onAudioTrackLoaded=function(o,x){var A,O=this.levels,D=x.details,I=x.id;if(!O){this.warn("Audio tracks were reset while loading level "+I);return}this.log("Track "+I+" loaded ["+D.startSN+","+D.endSN+"],duration:"+D.totalduration);var F=O[I],z=0;if(D.live||(A=F.details)!==null&&A!==void 0&&A.live){var ne=this.mainDetails;if(D.fragments[0]||(D.deltaUpdateFailed=!0),D.deltaUpdateFailed||!ne)return;!F.details&&D.hasProgramDateTime&&ne.hasProgramDateTime?(Object(u.alignMediaPlaylistByPDT)(D,ne),z=D.fragments[0].start):z=this.alignPlaylists(D,F.details)}F.details=D,this.levelLastLoaded=I,!this.startFragRequested&&(this.mainDetails||!D.live)&&this.setStartPosition(F.details,z),this.state===P.State.WAITING_TRACK&&!this.waitForCdnTuneIn(D)&&(this.state=P.State.IDLE),this.tick()},g._handleFragmentLoadProgress=function(o){var x,A=o.frag,O=o.part,D=o.payload,I=this.config,F=this.trackId,z=this.levels;if(!z){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+A.sn+" of level "+A.level+" will not be buffered");return}var ne=z[F];console.assert(ne,"Audio track is defined on fragment load progress");var j=ne.details;console.assert(j,"Audio track details are defined on fragment load progress");var G=I.defaultAudioCodec||ne.audioCodec||"mp4a.40.2",X=this.transmuxer;X||(X=this.transmuxer=new a.default(this.hls,p.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var Z=this.initPTS[A.cc],K=(x=A.initSegment)===null||x===void 0?void 0:x.data;if(Z!==void 0){var q=!1,ie=O?O.index:-1,oe=ie!==-1,ye=new c.ChunkMetadata(A.level,A.sn,A.stats.chunkCount,D.byteLength,ie,oe);X.push(D,K,G,"",A,O,j.totalduration,q,ye,Z)}else{n.logger.log("Unknown video PTS for cc "+A.cc+", waiting for video PTS before demuxing audio frag "+A.sn+" of ["+j.startSN+" ,"+j.endSN+"],track "+F);var pe=this.waitingData=this.waitingData||{frag:A,part:O,cache:new l.default,complete:!1},we=pe.cache;we.push(new Uint8Array(D)),this.waitingVideoCC=this.videoTrackCC,this.state=P.State.WAITING_INIT_PTS}},g._handleFragmentLoadComplete=function(o){if(this.waitingData){this.waitingData.complete=!0;return}_.prototype._handleFragmentLoadComplete.call(this,o)},g.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},g.onBufferCreated=function(o,x){var A=x.tracks.audio;A&&(this.mediaBuffer=A.buffer),x.tracks.video&&(this.videoBuffer=x.tracks.video.buffer)},g.onFragBuffered=function(o,x){var A=x.frag,O=x.part;if(A.type!==p.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(A)){this.warn("Fragment "+A.sn+(O?" p: "+O.index:"")+" of level "+A.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}A.sn!=="initSegment"&&(this.fragPrevious=A,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(S.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(A,O)},g.onError=function(o,x){switch(x.details){case i.ErrorDetails.FRAG_LOAD_ERROR:case i.ErrorDetails.FRAG_LOAD_TIMEOUT:case i.ErrorDetails.KEY_LOAD_ERROR:case i.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(p.PlaylistLevelType.AUDIO,x);break;case i.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case i.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==P.State.ERROR&&this.state!==P.State.STOPPED&&(this.state=x.fatal?P.State.ERROR:P.State.IDLE,this.warn(x.details+" while loading frag, switching to "+this.state+" state"));break;case i.ErrorDetails.BUFFER_FULL_ERROR:if(x.parent==="audio"&&(this.state===P.State.PARSING||this.state===P.State.PARSED)){var A=!0,O=this.getFwdBufferInfo(this.mediaBuffer,p.PlaylistLevelType.AUDIO);O&&O.len>.5&&(A=!this.reduceMaxBufferLength(O.len)),A&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,_.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},g.onBufferFlushed=function(o,x){var A=x.type;A===f.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},g._handleTransmuxComplete=function(o){var x,A="audio",O=this.hls,D=o.remuxResult,I=o.chunkMeta,F=this.getCurrentContext(I);if(!F){this.warn("The loading context changed while buffering fragment "+I.sn+" of level "+I.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(I.level);return}var z=F.frag,ne=F.part,j=D.audio,G=D.text,X=D.id3,Z=D.initSegment;if(this.fragContextChanged(z))return;if(this.state=P.State.PARSING,this.audioSwitch&&j&&this.completeAudioSwitch(),Z!=null&&Z.tracks&&(this._bufferInitSegment(Z.tracks,z,I),O.trigger(S.Events.FRAG_PARSING_INIT_SEGMENT,{frag:z,id:A,tracks:Z.tracks})),j){var K=j.startPTS,q=j.endPTS,ie=j.startDTS,oe=j.endDTS;ne&&(ne.elementaryStreams[f.ElementaryStreamTypes.AUDIO]={startPTS:K,endPTS:q,startDTS:ie,endDTS:oe}),z.setElementaryStreamInfo(f.ElementaryStreamTypes.AUDIO,K,q,ie,oe),this.bufferFragmentData(j,z,ne,I)}if(X!=null&&(x=X.samples)!==null&&x!==void 0&&x.length){var ye=t({frag:z,id:A},X);O.trigger(S.Events.FRAG_PARSING_METADATA,ye)}if(G){var pe=t({frag:z,id:A},G);O.trigger(S.Events.FRAG_PARSING_USERDATA,pe)}},g._bufferInitSegment=function(o,x,A){if(this.state!==P.State.PARSING)return;o.video&&delete o.video;var O=o.audio;if(!O)return;O.levelCodec=O.codec,O.id="audio",this.log("Init audio buffer, container:"+O.container+", codecs[parsed]=["+O.codec+"]"),this.hls.trigger(S.Events.BUFFER_CODECS,o);var D=O.initSegment;if(D!=null&&D.byteLength){var I={type:"audio",frag:x,part:null,chunkMeta:A,parent:x.type,data:D};this.hls.trigger(S.Events.BUFFER_APPENDING,I)}this.tick()},g.loadFragment=function(o,x,A){var O=this.fragmentTracker.getState(o);this.fragCurrent=o,(this.audioSwitch||O===T.FragmentState.NOT_LOADED||O===T.FragmentState.PARTIAL)&&(o.sn==="initSegment"?this._loadInitSegment(o):x.live&&!Object(w.isFiniteNumber)(this.initPTS[o.cc])?(this.log("Waiting for video PTS in continuity counter "+o.cc+" of live stream before loading audio fragment "+o.sn+" of level "+this.trackId),this.state=P.State.WAITING_INIT_PTS):(this.startFragRequested=!0,_.prototype.loadFragment.call(this,o,x,A)))},g.completeAudioSwitch=function(){var o=this.hls,x=this.media,A=this.trackId;x&&(this.log("Switching audio track : flushing all audio"),_.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,o.trigger(S.Events.AUDIO_TRACK_SWITCHED,{id:A})},m}(P.default);Q.default=y},"./src/controller/audio-track-controller.ts":function(ae,Q,U){"use strict";U.r(Q);var w=U("./src/events.ts"),P=U("./src/errors.ts"),S=U("./src/controller/base-playlist-controller.ts"),C=U("./src/types/loader.ts");function T(a,c){for(var s=0;s<c.length;s++){var u=c[s];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(a,u.key,u)}}function h(a,c,s){return c&&T(a.prototype,c),s&&T(a,s),a}function p(a,c){a.prototype=Object.create(c.prototype),a.prototype.constructor=a,f(a,c)}function f(a,c){return f=Object.setPrototypeOf||function(u,i){return u.__proto__=i,u},f(a,c)}var l=function(a){p(c,a);function c(u){var i;return i=a.call(this,u,"[audio-track-controller]")||this,i.tracks=[],i.groupId=null,i.tracksInGroup=[],i.trackId=-1,i.trackName="",i.selectDefaultTrack=!0,i.registerListeners(),i}var s=c.prototype;return s.registerListeners=function(){var i=this.hls;i.on(w.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.on(w.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.on(w.Events.LEVEL_LOADING,this.onLevelLoading,this),i.on(w.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),i.on(w.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),i.on(w.Events.ERROR,this.onError,this)},s.unregisterListeners=function(){var i=this.hls;i.off(w.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.off(w.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.off(w.Events.LEVEL_LOADING,this.onLevelLoading,this),i.off(w.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),i.off(w.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),i.off(w.Events.ERROR,this.onError,this)},s.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,a.prototype.destroy.call(this)},s.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},s.onManifestParsed=function(i,n){this.tracks=n.audioTracks||[]},s.onAudioTrackLoaded=function(i,n){var t=n.id,d=n.details,v=this.tracksInGroup[t];if(!v){this.warn("Invalid audio track id "+t);return}var b=v.details;v.details=n.details,this.log("audioTrack "+t+" loaded ["+d.startSN+"-"+d.endSN+"]"),t===this.trackId&&(this.retryCount=0,this.playlistLoaded(t,n,b))},s.onLevelLoading=function(i,n){this.switchLevel(n.level)},s.onLevelSwitching=function(i,n){this.switchLevel(n.level)},s.switchLevel=function(i){var n=this.hls.levels[i];if(!(n!=null&&n.audioGroupIds))return;var t=n.audioGroupIds[n.urlId];if(this.groupId!==t){this.groupId=t;var d=this.tracks.filter(function(b){return!t||b.groupId===t});this.selectDefaultTrack&&!d.some(function(b){return b.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=d;var v={audioTracks:d};this.log("Updating audio tracks, "+d.length+' track(s) found in "'+t+'" group-id'),this.hls.trigger(w.Events.AUDIO_TRACKS_UPDATED,v),this.selectInitialTrack()}},s.onError=function(i,n){if(a.prototype.onError.call(this,i,n),n.fatal||!n.context)return;n.context.type===C.PlaylistContextType.AUDIO_TRACK&&n.context.id===this.trackId&&n.context.groupId===this.groupId&&this.retryLoadingOrFail(n)},s.setAudioTrack=function(i){var n=this.tracksInGroup;if(i<0||i>=n.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var t=n[this.trackId];this.log("Now switching to audio-track index "+i);var d=n[i],v=d.id,b=d.groupId,y=b===void 0?"":b,_=d.name,m=d.type,g=d.url;if(this.trackId=i,this.trackName=_,this.selectDefaultTrack=!1,this.hls.trigger(w.Events.AUDIO_TRACK_SWITCHING,{id:v,groupId:y,name:_,type:m,url:g}),d.details&&!d.details.live)return;var E=this.switchParams(d.url,t==null?void 0:t.details);this.loadPlaylist(E)},s.selectInitialTrack=function(){var i=this.tracksInGroup;console.assert(i.length,"Initial audio track should be selected when tracks are known");var n=this.trackName,t=this.findTrackId(n)||this.findTrackId();t!==-1?this.setAudioTrack(t):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},s.findTrackId=function(i){for(var n=this.tracksInGroup,t=0;t<n.length;t++){var d=n[t];if((!this.selectDefaultTrack||d.default)&&(!i||i===d.name))return d.id}return-1},s.loadPlaylist=function(i){var n=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(n)){var t=n.id,d=n.groupId,v=n.url;if(i)try{v=i.addDirectives(v)}catch(b){this.warn("Could not construct new URL with HLS Delivery Directives: "+b)}this.log("loading audio-track playlist for id: "+t),this.clearTimer(),this.hls.trigger(w.Events.AUDIO_TRACK_LOADING,{url:v,id:t,groupId:d,deliveryDirectives:i||null})}},h(c,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(i){this.selectDefaultTrack=!1,this.setAudioTrack(i)}}]),c}(S.default);Q.default=l},"./src/controller/base-playlist-controller.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"default",function(){return h});var w=U("./src/polyfills/number.ts"),P=U("./src/types/level.ts"),S=U("./src/controller/level-helper.ts"),C=U("./src/utils/logger.ts"),T=U("./src/errors.ts"),h=function(){function p(l,a){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=C.logger.log.bind(C.logger,a+":"),this.warn=C.logger.warn.bind(C.logger,a+":"),this.hls=l}var f=p.prototype;return f.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},f.onError=function(a,c){c.fatal&&c.type===T.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},f.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},f.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},f.stopLoad=function(){this.canLoad=!1,this.clearTimer()},f.switchParams=function(a,c){var s=c==null?void 0:c.renditionReports;if(s)for(var u=0;u<s.length;u++){var i=s[u],n=""+i.URI;if(n===a.substr(-n.length)){var t=parseInt(i["LAST-MSN"]),d=parseInt(i["LAST-PART"]);if(c&&this.hls.config.lowLatencyMode){var v=Math.min(c.age-c.partTarget,c.targetduration);d!==void 0&&v>c.partTarget&&(d+=1)}if(Object(w.isFiniteNumber)(t))return new P.HlsUrlParameters(t,Object(w.isFiniteNumber)(d)?d:void 0,P.HlsSkip.No)}}},f.loadPlaylist=function(a){},f.shouldLoadTrack=function(a){return this.canLoad&&a&&!!a.url&&(!a.details||a.details.live)},f.playlistLoaded=function(a,c,s){var u=this,i=c.details,n=c.stats,t=n.loading.end?Math.max(0,self.performance.now()-n.loading.end):0;if(i.advancedDateTime=Date.now()-t,i.live||s!=null&&s.live){if(i.reloaded(s),s&&this.log("live playlist "+a+" "+(i.advanced?"REFRESHED "+i.lastPartSn+"-"+i.lastPartIndex:"MISSED")),s&&i.fragments.length>0&&Object(S.mergeDetails)(s,i),!this.canLoad||!i.live)return;var d,v=void 0,b=void 0;if(i.canBlockReload&&i.endSN&&i.advanced){var y=this.hls.config.lowLatencyMode,_=i.lastPartSn,m=i.endSN,g=i.lastPartIndex,E=g!==-1,o=_===m,x=y?0:g;E?(v=o?m+1:_,b=o?x:g+1):v=m+1;var A=i.age,O=A+i.ageHeader,D=Math.min(O-i.partTarget,i.targetduration*1.5);if(D>0){if(s&&D>s.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+s.tuneInGoal+" to: "+D+" with playlist age: "+i.age),D=0;else{var I=Math.floor(D/i.targetduration);if(v+=I,b!==void 0){var F=Math.round(D%i.targetduration/i.partTarget);b+=F}this.log("CDN Tune-in age: "+i.ageHeader+"s last advanced "+A.toFixed(2)+"s goal: "+D+" skip sn "+I+" to part "+b)}i.tuneInGoal=D}if(d=this.getDeliveryDirectives(i,c.deliveryDirectives,v,b),y||!o){this.loadPlaylist(d);return}}else d=this.getDeliveryDirectives(i,c.deliveryDirectives,v,b);var z=Object(S.computeReloadInterval)(i,n);v!==void 0&&i.canBlockReload&&(z-=i.partTarget||1),this.log("reload live playlist "+a+" in "+Math.round(z)+" ms"),this.timer=self.setTimeout(function(){return u.loadPlaylist(d)},z)}else this.clearTimer()},f.getDeliveryDirectives=function(a,c,s,u){var i=Object(P.getSkipValue)(a,s);return c!=null&&c.skip&&a.deltaUpdateFailed&&(s=c.msn,u=c.part,i=P.HlsSkip.No),new P.HlsUrlParameters(s,u,i)},f.retryLoadingOrFail=function(a){var c=this,s=this.hls.config,u=this.retryCount<s.levelLoadingMaxRetry;if(u){var i;if(this.retryCount++,a.details.indexOf("LoadTimeOut")>-1&&(i=a.context)!==null&&i!==void 0&&i.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+a.details+'"'),this.loadPlaylist();else{var n=Math.min(Math.pow(2,this.retryCount)*s.levelLoadingRetryDelay,s.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return c.loadPlaylist()},n),this.warn("retry playlist loading #"+this.retryCount+" in "+n+' ms after "'+a.details+'"')}}else this.warn('cannot recover from error "'+a.details+'"'),this.clearTimer(),a.fatal=!0;return u},p}()},"./src/controller/base-stream-controller.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"State",function(){return m}),U.d(Q,"default",function(){return g});var w=U("./src/polyfills/number.ts"),P=U("./src/task-loop.ts"),S=U("./src/controller/fragment-tracker.ts"),C=U("./src/utils/buffer-helper.ts"),T=U("./src/utils/logger.ts"),h=U("./src/events.ts"),p=U("./src/errors.ts"),f=U("./src/types/transmuxer.ts"),l=U("./src/utils/mp4-tools.ts"),a=U("./src/utils/discontinuities.ts"),c=U("./src/controller/fragment-finders.ts"),s=U("./src/controller/level-helper.ts"),u=U("./src/loader/fragment-loader.ts"),i=U("./src/crypt/decrypter.ts"),n=U("./src/utils/time-ranges.ts"),t=U("./src/types/loader.ts");function d(E,o){for(var x=0;x<o.length;x++){var A=o[x];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(E,A.key,A)}}function v(E,o,x){return o&&d(E.prototype,o),x&&d(E,x),E}function b(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}function y(E,o){E.prototype=Object.create(o.prototype),E.prototype.constructor=E,_(E,o)}function _(E,o){return _=Object.setPrototypeOf||function(A,O){return A.__proto__=O,A},_(E,o)}var m={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BACKTRACKING:"BACKTRACKING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},g=function(E){y(o,E);function o(A,O,D){var I;return I=E.call(this)||this,I.hls=void 0,I.fragPrevious=null,I.fragCurrent=null,I.fragmentTracker=void 0,I.transmuxer=null,I._state=m.STOPPED,I.media=void 0,I.mediaBuffer=void 0,I.config=void 0,I.bitrateTest=!1,I.lastCurrentTime=0,I.nextLoadPosition=0,I.startPosition=0,I.loadedmetadata=!1,I.fragLoadError=0,I.retryDate=0,I.levels=null,I.fragmentLoader=void 0,I.levelLastLoaded=null,I.startFragRequested=!1,I.decrypter=void 0,I.initPTS=[],I.onvseeking=null,I.onvended=null,I.logPrefix="",I.log=void 0,I.warn=void 0,I.logPrefix=D,I.log=T.logger.log.bind(T.logger,D+":"),I.warn=T.logger.warn.bind(T.logger,D+":"),I.hls=A,I.fragmentLoader=new u.default(A.config),I.fragmentTracker=O,I.config=A.config,I.decrypter=new i.default(A,A.config),A.on(h.Events.KEY_LOADED,I.onKeyLoaded,b(I)),I}var x=o.prototype;return x.doTick=function(){this.onTickEnd()},x.onTickEnd=function(){},x.startLoad=function(O){},x.stopLoad=function(){this.fragmentLoader.abort();var O=this.fragCurrent;O&&this.fragmentTracker.removeFragment(O),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=m.STOPPED},x._streamEnded=function(O,D){var I=this.fragCurrent,F=this.fragmentTracker;if(!D.live&&I&&I.sn===D.endSN&&!O.nextStart){var z=F.getState(I);return z===S.FragmentState.PARTIAL||z===S.FragmentState.OK}return!1},x.onMediaAttached=function(O,D){var I=this.media=this.mediaBuffer=D.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),I.addEventListener("seeking",this.onvseeking),I.addEventListener("ended",this.onvended);var F=this.config;this.levels&&F.autoStartLoad&&this.state===m.STOPPED&&this.startLoad(F.startPosition)},x.onMediaDetaching=function(){var O=this.media;O!=null&&O.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),O&&(O.removeEventListener("seeking",this.onvseeking),O.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},x.onMediaSeeking=function(){var O=this.config,D=this.fragCurrent,I=this.media,F=this.mediaBuffer,z=this.state,ne=I?I.currentTime:0,j=C.BufferHelper.bufferInfo(F||I,ne,O.maxBufferHole);if(this.log("media seeking to "+(Object(w.isFiniteNumber)(ne)?ne.toFixed(3):ne)+", state: "+z),z===m.ENDED)this.resetLoadingState();else if(D&&!j.len){var G=O.maxFragLookUpTolerance,X=D.start-G,Z=D.start+D.duration+G,K=ne>Z;(ne<X||K)&&(K&&D.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),D.loader.abort()),this.resetLoadingState())}I&&(this.lastCurrentTime=ne),!this.loadedmetadata&&!j.len&&(this.nextLoadPosition=this.startPosition=ne),this.tickImmediate()},x.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},x.onKeyLoaded=function(O,D){if(this.state!==m.KEY_LOADING||D.frag!==this.fragCurrent||!this.levels)return;this.state=m.IDLE;var I=this.levels[D.frag.level].details;I&&this.loadFragment(D.frag,I,D.frag.start)},x.onHandlerDestroying=function(){this.stopLoad(),E.prototype.onHandlerDestroying.call(this)},x.onHandlerDestroyed=function(){this.state=m.STOPPED,this.hls.off(h.Events.KEY_LOADED,this.onKeyLoaded,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,E.prototype.onHandlerDestroyed.call(this)},x.loadKey=function(O,D){this.log("Loading key for "+O.sn+" of ["+D.startSN+"-"+D.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+O.level),this.state=m.KEY_LOADING,this.fragCurrent=O,this.hls.trigger(h.Events.KEY_LOADING,{frag:O})},x.loadFragment=function(O,D,I){this._loadFragForPlayback(O,D,I)},x._loadFragForPlayback=function(O,D,I){var F=this,z=function(j){if(F.fragContextChanged(O)){F.warn("Fragment "+O.sn+(j.part?" p: "+j.part.index:"")+" of level "+O.level+" was dropped during download."),F.fragmentTracker.removeFragment(O);return}O.stats.chunkCount++,F._handleFragmentLoadProgress(j)};this._doFragLoad(O,D,I,z).then(function(ne){if(!ne)return;F.fragLoadError=0;var j=F.state;if(F.fragContextChanged(O)){(j===m.FRAG_LOADING||j===m.BACKTRACKING||!F.fragCurrent&&j===m.PARSING)&&(F.fragmentTracker.removeFragment(O),F.state=m.IDLE);return}if("payload"in ne&&(F.log("Loaded fragment "+O.sn+" of level "+O.level),F.hls.trigger(h.Events.FRAG_LOADED,ne),F.state===m.BACKTRACKING)){F.fragmentTracker.backtrack(O,ne),F.resetFragmentLoading(O);return}F._handleFragmentLoadComplete(ne)}).catch(function(ne){F.warn(ne),F.resetFragmentLoading(O)})},x.flushMainBuffer=function(O,D,I){if(I===void 0&&(I=null),!(O-D))return;var F={startOffset:O,endOffset:D,type:I};this.fragLoadError=0,this.hls.trigger(h.Events.BUFFER_FLUSHING,F)},x._loadInitSegment=function(O){var D=this;this._doFragLoad(O).then(function(I){if(!I||D.fragContextChanged(O)||!D.levels)throw new Error("init load aborted");return I}).then(function(I){var F=D.hls,z=I.payload,ne=O.decryptdata;if(z&&z.byteLength>0&&ne&&ne.key&&ne.iv&&ne.method==="AES-128"){var j=self.performance.now();return D.decrypter.webCryptoDecrypt(new Uint8Array(z),ne.key.buffer,ne.iv.buffer).then(function(G){var X=self.performance.now();return F.trigger(h.Events.FRAG_DECRYPTED,{frag:O,payload:G,stats:{tstart:j,tdecrypt:X}}),I.payload=G,I})}return I}).then(function(I){var F=D.fragCurrent,z=D.hls,ne=D.levels;if(!ne)throw new Error("init load aborted, missing levels");var j=ne[O.level].details;console.assert(j,"Level details are defined when init segment is loaded");var G=O.stats;D.state=m.IDLE,D.fragLoadError=0,O.data=new Uint8Array(I.payload),G.parsing.start=G.buffering.start=self.performance.now(),G.parsing.end=G.buffering.end=self.performance.now(),I.frag===F&&z.trigger(h.Events.FRAG_BUFFERED,{stats:G,frag:F,part:null,id:O.type}),D.tick()}).catch(function(I){D.warn(I),D.resetFragmentLoading(O)})},x.fragContextChanged=function(O){var D=this.fragCurrent;return!O||!D||O.level!==D.level||O.sn!==D.sn||O.urlId!==D.urlId},x.fragBufferedComplete=function(O,D){var I=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+O.type+" sn: "+O.sn+(D?" part: "+D.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+O.level+" "+n.default.toString(C.BufferHelper.getBuffered(I))),this.state=m.IDLE,this.tick()},x._handleFragmentLoadComplete=function(O){var D=this.transmuxer;if(!D)return;var I=O.frag,F=O.part,z=O.partsLoaded,ne=!z||z.length===0||z.some(function(G){return!G}),j=new f.ChunkMetadata(I.level,I.sn,I.stats.chunkCount+1,0,F?F.index:-1,!ne);D.flush(j)},x._handleFragmentLoadProgress=function(O){},x._doFragLoad=function(O,D,I,F){var z=this;if(I===void 0&&(I=null),!this.levels)throw new Error("frag load aborted, missing levels");if(I=Math.max(O.start,I||0),this.config.lowLatencyMode&&D){var ne=D.partList;if(ne&&F){I>O.end&&D.fragmentHint&&(O=D.fragmentHint);var j=this.getNextPart(ne,O,I);if(j>-1){var G=ne[j];return this.log("Loading part sn: "+O.sn+" p: "+G.index+" cc: "+O.cc+" of playlist ["+D.startSN+"-"+D.endSN+"] parts [0-"+j+"-"+(ne.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+O.level+", target: "+parseFloat(I.toFixed(3))),this.nextLoadPosition=G.start+G.duration,this.state=m.FRAG_LOADING,this.hls.trigger(h.Events.FRAG_LOADING,{frag:O,part:ne[j],targetBufferTime:I}),this.doFragPartsLoad(O,ne,j,F).catch(function(X){return z.handleFragLoadError(X)})}else if(!O.url||this.loadedEndOfParts(ne,I))return Promise.resolve(null)}}return this.log("Loading fragment "+O.sn+" cc: "+O.cc+" "+(D?"of ["+D.startSN+"-"+D.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+O.level+", target: "+parseFloat(I.toFixed(3))),Object(w.isFiniteNumber)(O.sn)&&!this.bitrateTest&&(this.nextLoadPosition=O.start+O.duration),this.state=m.FRAG_LOADING,this.hls.trigger(h.Events.FRAG_LOADING,{frag:O,targetBufferTime:I}),this.fragmentLoader.load(O,F).catch(function(X){return z.handleFragLoadError(X)})},x.doFragPartsLoad=function(O,D,I,F){var z=this;return new Promise(function(ne,j){var G=[],X=function Z(K){var q=D[K];z.fragmentLoader.loadPart(O,q,F).then(function(ie){G[q.index]=ie;var oe=ie.part;z.hls.trigger(h.Events.FRAG_LOADED,ie);var ye=D[K+1];if(ye&&ye.fragment===O)Z(K+1);else return ne({frag:O,part:oe,partsLoaded:G})}).catch(j)};X(I)})},x.handleFragLoadError=function(O){var D=O.data;return D&&D.details===p.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(D.frag,D.part):this.hls.trigger(h.Events.ERROR,D),null},x._handleTransmuxerFlush=function(O){var D=this.getCurrentContext(O);if(!D||this.state!==m.PARSING){this.fragCurrent||(this.state=m.IDLE);return}var I=D.frag,F=D.part,z=D.level,ne=self.performance.now();I.stats.parsing.end=ne,F&&(F.stats.parsing.end=ne),this.updateLevelTiming(I,F,z,O.partial)},x.getCurrentContext=function(O){var D=this.levels,I=O.level,F=O.sn,z=O.part;if(!D||!D[I])return this.warn("Levels object was unset while buffering fragment "+F+" of level "+I+". The current chunk will not be buffered."),null;var ne=D[I],j=z>-1?Object(s.getPartWith)(ne,F,z):null,G=j?j.fragment:Object(s.getFragmentWithSN)(ne,F,this.fragCurrent);return G?{frag:G,part:j,level:ne}:null},x.bufferFragmentData=function(O,D,I,F){if(!O||this.state!==m.PARSING)return;var z=O.data1,ne=O.data2,j=z;if(z&&ne&&(j=Object(l.appendUint8Array)(z,ne)),!j||!j.length)return;var G={type:O.type,frag:D,part:I,chunkMeta:F,parent:D.type,data:j};this.hls.trigger(h.Events.BUFFER_APPENDING,G),O.dropped&&O.independent&&!I&&this.flushBufferGap(D)},x.flushBufferGap=function(O){var D=this.media;if(!D)return;if(!C.BufferHelper.isBuffered(D,D.currentTime)){this.flushMainBuffer(0,O.start);return}var I=D.currentTime,F=C.BufferHelper.bufferInfo(D,I,0),z=O.duration,ne=Math.min(this.config.maxFragLookUpTolerance*2,z*.25),j=Math.max(Math.min(O.start-ne,F.end-ne),I+ne);O.start-j>ne&&this.flushMainBuffer(j,O.start)},x.getFwdBufferInfo=function(O,D){var I=this.config,F=this.getLoadPosition();if(!Object(w.isFiniteNumber)(F))return null;var z=C.BufferHelper.bufferInfo(O,F,I.maxBufferHole);if(z.len===0&&z.nextStart!==void 0){var ne=this.fragmentTracker.getBufferedFrag(F,D);if(ne&&z.nextStart<ne.end)return C.BufferHelper.bufferInfo(O,F,Math.max(z.nextStart,I.maxBufferHole))}return z},x.getMaxBufferLength=function(O){var D=this.config,I;return O?I=Math.max(8*D.maxBufferSize/O,D.maxBufferLength):I=D.maxBufferLength,Math.min(I,D.maxMaxBufferLength)},x.reduceMaxBufferLength=function(O){var D=this.config,I=O||D.maxBufferLength;return D.maxMaxBufferLength>=I?(D.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+D.maxMaxBufferLength+"s"),!0):!1},x.getNextFragment=function(O,D){var I,F,z=D.fragments,ne=z.length;if(!ne)return null;var j=this.config,G=z[0].start,X;if(D.live){var Z=j.initialLiveManifestSize;if(ne<Z)return this.warn("Not enough fragments to start playback (have: "+ne+", need: "+Z+")"),null;!D.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(X=this.getInitialLiveFragment(D,z),this.startPosition=X?this.hls.liveSyncPosition||X.start:O)}else O<=G&&(X=z[0]);if(!X){var K=j.lowLatencyMode?D.partEnd:D.fragmentEnd;X=this.getFragmentAtPosition(O,K,D)}return(I=X)!==null&&I!==void 0&&I.initSegment&&!((F=X)!==null&&F!==void 0&&F.initSegment.data)&&!this.bitrateTest&&(X=X.initSegment),X},x.getNextPart=function(O,D,I){for(var F=-1,z=!1,ne=!0,j=0,G=O.length;j<G;j++){var X=O[j];if(ne=ne&&!X.independent,F>-1&&I<X.start)break;var Z=X.loaded;!Z&&(z||X.independent||ne)&&X.fragment===D&&(F=j),z=Z}return F},x.loadedEndOfParts=function(O,D){var I=O[O.length-1];return I&&D>I.start&&I.loaded},x.getInitialLiveFragment=function(O,D){var I=this.fragPrevious,F=null;if(I){if(O.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+I.programDateTime),F=Object(c.findFragmentByPDT)(D,I.endProgramDateTime,this.config.maxFragLookUpTolerance)),!F){var z=I.sn+1;if(z>=O.startSN&&z<=O.endSN){var ne=D[z-O.startSN];I.cc===ne.cc&&(F=ne,this.log("Live playlist, switching playlist, load frag with next SN: "+F.sn))}F||(F=Object(c.findFragWithCC)(D,I.cc),F&&this.log("Live playlist, switching playlist, load frag with same CC: "+F.sn))}}else{var j=this.hls.liveSyncPosition;j!==null&&(F=this.getFragmentAtPosition(j,this.bitrateTest?O.fragmentEnd:O.edge,O))}return F},x.getFragmentAtPosition=function(O,D,I){var F=this.config,z=this.fragPrevious,ne=I.fragments,j=I.endSN,G=I.fragmentHint,X=F.maxFragLookUpTolerance,Z=!!(F.lowLatencyMode&&I.partList&&G);Z&&G&&!this.bitrateTest&&(ne=ne.concat(G),j=G.sn);var K;if(O<D){var q=O>D-X?0:X;K=Object(c.findFragmentByPTS)(z,ne,O,q)}else K=ne[ne.length-1];if(K){var ie=K.sn-I.startSN,oe=z&&K.level===z.level,ye=ne[ie+1],pe=this.fragmentTracker.getState(K);if(pe===S.FragmentState.BACKTRACKED){K=null;for(var we=ie;ne[we]&&this.fragmentTracker.getState(ne[we])===S.FragmentState.BACKTRACKED;)z?K=ne[we--]:K=ne[--we];K||(K=ye)}else z&&K.sn===z.sn&&!Z&&(oe&&(K.sn<j&&this.fragmentTracker.getState(ye)!==S.FragmentState.OK?(this.log("SN "+K.sn+" just loaded, load next one: "+ye.sn),K=ye):K=null))}return K},x.synchronizeToLiveEdge=function(O){var D=this.config,I=this.media;if(!I)return;var F=this.hls.liveSyncPosition,z=I.currentTime,ne=O.fragments[0].start,j=O.edge,G=z>=ne-D.maxFragLookUpTolerance&&z<=j;if(F!==null&&I.duration>F&&(z<F||!G)){var X=D.liveMaxLatencyDuration!==void 0?D.liveMaxLatencyDuration:D.liveMaxLatencyDurationCount*O.targetduration;(!G&&I.readyState<4||z<j-X)&&(this.loadedmetadata||(this.nextLoadPosition=F),I.readyState&&(this.warn("Playback: "+z.toFixed(3)+" is located too far from the end of live sliding playlist: "+j+", reset currentTime to : "+F.toFixed(3)),I.currentTime=F))}},x.alignPlaylists=function(O,D){var I=this.levels,F=this.levelLastLoaded,z=this.fragPrevious,ne=F!==null?I[F]:null,j=O.fragments.length;if(!j)return this.warn("No fragments in live playlist"),0;var G=O.fragments[0].start,X=!D,Z=O.alignedSliding&&Object(w.isFiniteNumber)(G);if(X||!Z&&!G){Object(a.alignStream)(z,ne,O);var K=O.fragments[0].start;return this.log("Live playlist sliding: "+K.toFixed(2)+" start-sn: "+(D?D.startSN:"na")+"->"+O.startSN+" prev-sn: "+(z?z.sn:"na")+" fragments: "+j),K}return G},x.waitForCdnTuneIn=function(O){var D=3;return O.live&&O.canBlockReload&&O.tuneInGoal>Math.max(O.partHoldBack,O.partTarget*D)},x.setStartPosition=function(O,D){var I=this.startPosition;if(I<D&&(I=-1),I===-1||this.lastCurrentTime===-1){var F=O.startTimeOffset;Object(w.isFiniteNumber)(F)?(I=D+F,F<0&&(I+=O.totalduration),I=Math.min(Math.max(D,I),D+O.totalduration),this.log("Start time offset "+F+" found in playlist, adjust startPosition to "+I),this.startPosition=I):O.live?I=this.hls.liveSyncPosition||D:this.startPosition=I=0,this.lastCurrentTime=I}this.nextLoadPosition=I},x.getLoadPosition=function(){var O=this.media,D=0;return this.loadedmetadata&&O?D=O.currentTime:this.nextLoadPosition&&(D=this.nextLoadPosition),D},x.handleFragLoadAborted=function(O,D){this.transmuxer&&O.sn!=="initSegment"&&O.stats.aborted&&(this.warn("Fragment "+O.sn+(D?" part"+D.index:"")+" of level "+O.level+" was aborted"),this.resetFragmentLoading(O))},x.resetFragmentLoading=function(O){(!this.fragCurrent||!this.fragContextChanged(O))&&(this.state=m.IDLE)},x.onFragmentOrKeyLoadError=function(O,D){if(D.fatal)return;var I=D.frag;if(!I||I.type!==O)return;var F=this.fragCurrent;console.assert(F&&I.sn===F.sn&&I.level===F.level&&I.urlId===F.urlId,"Frag load error must match current frag to retry");var z=this.config;if(this.fragLoadError+1<=z.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(I.level))return;var ne=Math.min(Math.pow(2,this.fragLoadError)*z.fragLoadingRetryDelay,z.fragLoadingMaxRetryTimeout);this.warn("Fragment "+I.sn+" of "+O+" "+I.level+" failed to load, retrying in "+ne+"ms"),this.retryDate=self.performance.now()+ne,this.fragLoadError++,this.state=m.FRAG_LOADING_WAITING_RETRY}else D.levelRetry?(O===t.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=m.IDLE):(T.logger.error(D.details+" reaches max retry, redispatch as fatal ..."),D.fatal=!0,this.hls.stopLoad(),this.state=m.ERROR)},x.afterBufferFlushed=function(O,D,I){if(!O)return;var F=C.BufferHelper.getBuffered(O);this.fragmentTracker.detectEvictedFragments(D,F,I),this.state===m.ENDED&&this.resetLoadingState()},x.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=m.IDLE},x.resetLiveStartWhenNotLoaded=function(O){if(!this.loadedmetadata){this.startFragRequested=!1;var D=this.levels?this.levels[O].details:null;if(D!=null&&D.live)return this.startPosition=-1,this.setStartPosition(D,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},x.updateLevelTiming=function(O,D,I,F){var z=this,ne=I.details;console.assert(!!ne,"level.details must be defined");var j=Object.keys(O.elementaryStreams).reduce(function(G,X){var Z=O.elementaryStreams[X];if(Z){var K=Z.endPTS-Z.startPTS;if(K<=0)return z.warn("Could not parse fragment "+O.sn+" "+X+" duration reliably ("+K+") resetting transmuxer to fallback to playlist timing"),z.resetTransmuxer(),G||!1;var q=F?0:Object(s.updateFragPTSDTS)(ne,O,Z.startPTS,Z.endPTS,Z.startDTS,Z.endDTS);return z.hls.trigger(h.Events.LEVEL_PTS_UPDATED,{details:ne,level:I,drift:q,type:X,frag:O,start:Z.startPTS,end:Z.endPTS}),!0}return G},!1);j?(this.state=m.PARSED,this.hls.trigger(h.Events.FRAG_PARSED,{frag:O,part:D})):this.resetLoadingState()},x.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},v(o,[{key:"state",get:function(){return this._state},set:function(O){var D=this._state;D!==O&&(this._state=O,this.log(D+"->"+O))}}]),o}(P.default)},"./src/controller/buffer-controller.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"default",function(){return c});var w=U("./src/polyfills/number.ts"),P=U("./src/events.ts"),S=U("./src/utils/logger.ts"),C=U("./src/errors.ts"),T=U("./src/utils/buffer-helper.ts"),h=U("./src/utils/mediasource-helper.ts"),p=U("./src/loader/fragment.ts"),f=U("./src/controller/buffer-operation-queue.ts"),l=Object(h.getMediaSource)(),a=/([ha]vc.)(?:\.[^.,]+)+/,c=function(){function s(i){var n=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var t=n.hls,d=n.media,v=n.mediaSource;S.logger.log("[buffer-controller]: Media source opened"),d&&(n.updateMediaElementDuration(),t.trigger(P.Events.MEDIA_ATTACHED,{media:d})),v&&v.removeEventListener("sourceopen",n._onMediaSourceOpen),n.checkPendingTracks()},this._onMediaSourceClose=function(){S.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){S.logger.log("[buffer-controller]: Media source ended")},this.hls=i,this._initSourceBuffer(),this.registerListeners()}var u=s.prototype;return u.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},u.destroy=function(){this.unregisterListeners(),this.details=null},u.registerListeners=function(){var n=this.hls;n.on(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(P.Events.BUFFER_RESET,this.onBufferReset,this),n.on(P.Events.BUFFER_APPENDING,this.onBufferAppending,this),n.on(P.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.on(P.Events.BUFFER_EOS,this.onBufferEos,this),n.on(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),n.on(P.Events.LEVEL_UPDATED,this.onLevelUpdated,this),n.on(P.Events.FRAG_PARSED,this.onFragParsed,this),n.on(P.Events.FRAG_CHANGED,this.onFragChanged,this)},u.unregisterListeners=function(){var n=this.hls;n.off(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(P.Events.BUFFER_RESET,this.onBufferReset,this),n.off(P.Events.BUFFER_APPENDING,this.onBufferAppending,this),n.off(P.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.off(P.Events.BUFFER_EOS,this.onBufferEos,this),n.off(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),n.off(P.Events.LEVEL_UPDATED,this.onLevelUpdated,this),n.off(P.Events.FRAG_PARSED,this.onFragParsed,this),n.off(P.Events.FRAG_CHANGED,this.onFragChanged,this)},u._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new f.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},u.onManifestParsed=function(n,t){var d=2;(t.audio&&!t.video||!t.altAudio)&&(d=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=d,this.details=null,S.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},u.onMediaAttaching=function(n,t){var d=this.media=t.media;if(d&&l){var v=this.mediaSource=new l;v.addEventListener("sourceopen",this._onMediaSourceOpen),v.addEventListener("sourceended",this._onMediaSourceEnded),v.addEventListener("sourceclose",this._onMediaSourceClose),d.src=self.URL.createObjectURL(v),this._objectUrl=d.src}},u.onMediaDetaching=function(){var n=this.media,t=this.mediaSource,d=this._objectUrl;if(t){if(S.logger.log("[buffer-controller]: media source detaching"),t.readyState==="open")try{t.endOfStream()}catch(v){S.logger.warn("[buffer-controller]: onMediaDetaching: "+v.message+" while calling endOfStream")}this.onBufferReset(),t.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("sourceended",this._onMediaSourceEnded),t.removeEventListener("sourceclose",this._onMediaSourceClose),n&&(d&&self.URL.revokeObjectURL(d),n.src===d?(n.removeAttribute("src"),n.load()):S.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(P.Events.MEDIA_DETACHED,void 0)},u.onBufferReset=function(){var n=this;this.getSourceBufferTypes().forEach(function(t){var d=n.sourceBuffer[t];try{d&&(n.removeBufferListeners(t),n.mediaSource&&n.mediaSource.removeSourceBuffer(d),n.sourceBuffer[t]=void 0)}catch(v){S.logger.warn("[buffer-controller]: Failed to reset the "+t+" buffer",v)}}),this._initSourceBuffer()},u.onBufferCodecs=function(n,t){var d=this,v=this.getSourceBufferTypes().length;if(Object.keys(t).forEach(function(b){if(v){var y=d.tracks[b];if(y&&typeof y.buffer.changeType=="function"){var _=t[b],m=_.codec,g=_.levelCodec,E=_.container,o=(y.levelCodec||y.codec).replace(a,"$1"),x=(g||m).replace(a,"$1");if(o!==x){var A=E+";codecs="+(g||m);d.appendChangeType(b,A)}}}else d.pendingTracks[b]=t[b]}),v)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},u.appendChangeType=function(n,t){var d=this,v=this.operationQueue,b={execute:function(){var _=d.sourceBuffer[n];_&&(S.logger.log("[buffer-controller]: changing "+n+" sourceBuffer type to "+t),_.changeType(t)),v.shiftAndExecuteNext(n)},onStart:function(){},onComplete:function(){},onError:function(_){S.logger.warn("[buffer-controller]: Failed to change "+n+" SourceBuffer type",_)}};v.append(b,n)},u.onBufferAppending=function(n,t){var d=this,v=this.hls,b=this.operationQueue,y=this.tracks,_=t.data,m=t.type,g=t.frag,E=t.part,o=t.chunkMeta,x=o.buffering[m],A=self.performance.now();x.start=A;var O=g.stats.buffering,D=E?E.stats.buffering:null;O.start===0&&(O.start=A),D&&D.start===0&&(D.start=A);var I=y.audio,F=m==="audio"&&o.id===1&&(I==null?void 0:I.container)==="audio/mpeg",z={execute:function(){if(x.executeStart=self.performance.now(),F){var j=d.sourceBuffer[m];if(j){var G=g.start-j.timestampOffset;Math.abs(G)>=.1&&(S.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+g.start+" (delta: "+G+") sn: "+g.sn+")"),j.timestampOffset=g.start)}}d.appendExecutor(_,m)},onStart:function(){},onComplete:function(){var j=self.performance.now();x.executeEnd=x.end=j,O.first===0&&(O.first=j),D&&D.first===0&&(D.first=j);var G=d.sourceBuffer,X={};for(var Z in G)X[Z]=T.BufferHelper.getBuffered(G[Z]);d.appendError=0,d.hls.trigger(P.Events.BUFFER_APPENDED,{type:m,frag:g,part:E,chunkMeta:o,parent:g.type,timeRanges:X})},onError:function(j){S.logger.error("[buffer-controller]: Error encountered while trying to append to the "+m+" SourceBuffer",j);var G={type:C.ErrorTypes.MEDIA_ERROR,parent:g.type,details:C.ErrorDetails.BUFFER_APPEND_ERROR,err:j,fatal:!1};j.code===DOMException.QUOTA_EXCEEDED_ERR?G.details=C.ErrorDetails.BUFFER_FULL_ERROR:(d.appendError++,G.details=C.ErrorDetails.BUFFER_APPEND_ERROR,d.appendError>v.config.appendErrorMaxRetry&&(S.logger.error("[buffer-controller]: Failed "+v.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),G.fatal=!0)),v.trigger(P.Events.ERROR,G)}};b.append(z,m)},u.onBufferFlushing=function(n,t){var d=this,v=this.operationQueue,b=function(_){return{execute:d.removeExecutor.bind(d,_,t.startOffset,t.endOffset),onStart:function(){},onComplete:function(){d.hls.trigger(P.Events.BUFFER_FLUSHED,{type:_})},onError:function(g){S.logger.warn("[buffer-controller]: Failed to remove from "+_+" SourceBuffer",g)}}};t.type?v.append(b(t.type),t.type):this.getSourceBufferTypes().forEach(function(y){v.append(b(y),y)})},u.onFragParsed=function(n,t){var d=this,v=t.frag,b=t.part,y=[],_=b?b.elementaryStreams:v.elementaryStreams;_[p.ElementaryStreamTypes.AUDIOVIDEO]?y.push("audiovideo"):(_[p.ElementaryStreamTypes.AUDIO]&&y.push("audio"),_[p.ElementaryStreamTypes.VIDEO]&&y.push("video"));var m=function(){var E=self.performance.now();v.stats.buffering.end=E,b&&(b.stats.buffering.end=E);var o=b?b.stats:v.stats;d.hls.trigger(P.Events.FRAG_BUFFERED,{frag:v,part:b,stats:o,id:v.type})};y.length===0&&S.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+v.type+" level: "+v.level+" sn: "+v.sn),this.blockBuffers(m,y)},u.onFragChanged=function(n,t){this.flushBackBuffer()},u.onBufferEos=function(n,t){var d=this,v=this.getSourceBufferTypes().reduce(function(b,y){var _=d.sourceBuffer[y];return(!t.type||t.type===y)&&(_&&!_.ended&&(_.ended=!0,S.logger.log("[buffer-controller]: "+y+" sourceBuffer now EOS"))),b&&!!(!_||_.ended)},!0);v&&this.blockBuffers(function(){var b=d.mediaSource;if(!b||b.readyState!=="open")return;b.endOfStream()})},u.onLevelUpdated=function(n,t){var d=t.details;if(!d.fragments.length)return;this.details=d,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},u.flushBackBuffer=function(){var n=this.hls,t=this.details,d=this.media,v=this.sourceBuffer;if(!d||t===null)return;var b=this.getSourceBufferTypes();if(!b.length)return;var y=t.live&&n.config.liveBackBufferLength!==null?n.config.liveBackBufferLength:n.config.backBufferLength;if(!Object(w.isFiniteNumber)(y)||y<0)return;var _=d.currentTime,m=t.levelTargetDuration,g=Math.max(y,m),E=Math.floor(_/m)*m-g;b.forEach(function(o){var x=v[o];if(x){var A=T.BufferHelper.getBuffered(x);A.length>0&&E>A.start(0)&&(n.trigger(P.Events.BACK_BUFFER_REACHED,{bufferEnd:E}),t.live&&n.trigger(P.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:E}),n.trigger(P.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:E,type:o}))}})},u.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var n=this.details,t=this.hls,d=this.media,v=this.mediaSource,b=n.fragments[0].start+n.totalduration,y=d.duration,_=Object(w.isFiniteNumber)(v.duration)?v.duration:0;n.live&&t.config.liveDurationInfinity?(S.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),v.duration=Infinity,this.updateSeekableRange(n)):(b>_&&b>y||!Object(w.isFiniteNumber)(y))&&(S.logger.log("[buffer-controller]: Updating Media Source duration to "+b.toFixed(3)),v.duration=b)},u.updateSeekableRange=function(n){var t=this.mediaSource,d=n.fragments,v=d.length;if(v&&n.live&&t!==null&&t!==void 0&&t.setLiveSeekableRange){var b=Math.max(0,d[0].start),y=Math.max(b,b+n.totalduration);t.setLiveSeekableRange(b,y)}},u.checkPendingTracks=function(){var n=this.bufferCodecEventsExpected,t=this.operationQueue,d=this.pendingTracks,v=Object.keys(d).length;if(v&&!n||v===2){this.createSourceBuffers(d),this.pendingTracks={};var b=this.getSourceBufferTypes();if(b.length===0){this.hls.trigger(P.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(y){t.executeNext(y)})}},u.createSourceBuffers=function(n){var t=this.sourceBuffer,d=this.mediaSource;if(!d)throw Error("createSourceBuffers called when mediaSource was null");var v=0;for(var b in n)if(!t[b]){var y=n[b];if(!y)throw Error("source buffer exists for track "+b+", however track does not");var _=y.levelCodec||y.codec,m=y.container+";codecs="+_;S.logger.log("[buffer-controller]: creating sourceBuffer("+m+")");try{var g=t[b]=d.addSourceBuffer(m),E=b;this.addBufferListener(E,"updatestart",this._onSBUpdateStart),this.addBufferListener(E,"updateend",this._onSBUpdateEnd),this.addBufferListener(E,"error",this._onSBUpdateError),this.tracks[b]={buffer:g,codec:_,container:y.container,levelCodec:y.levelCodec,id:y.id},v++}catch(o){S.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+o.message),this.hls.trigger(P.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:o,mimeType:m})}}v&&this.hls.trigger(P.Events.BUFFER_CREATED,{tracks:this.tracks})},u._onSBUpdateStart=function(n){var t=this.operationQueue,d=t.current(n);d.onStart()},u._onSBUpdateEnd=function(n){var t=this.operationQueue,d=t.current(n);d.onComplete(),t.shiftAndExecuteNext(n)},u._onSBUpdateError=function(n,t){S.logger.error("[buffer-controller]: "+n+" SourceBuffer error",t),this.hls.trigger(P.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var d=this.operationQueue.current(n);d&&d.onError(t)},u.removeExecutor=function(n,t,d){var v=this.media,b=this.mediaSource,y=this.operationQueue,_=this.sourceBuffer,m=_[n];if(!v||!b||!m){S.logger.warn("[buffer-controller]: Attempting to remove from the "+n+" SourceBuffer, but it does not exist"),y.shiftAndExecuteNext(n);return}var g=Object(w.isFiniteNumber)(v.duration)?v.duration:Infinity,E=Object(w.isFiniteNumber)(b.duration)?b.duration:Infinity,o=Math.max(0,t),x=Math.min(d,g,E);x>o?(S.logger.log("[buffer-controller]: Removing ["+o+","+x+"] from the "+n+" SourceBuffer"),console.assert(!m.updating,n+" sourceBuffer must not be updating"),m.remove(o,x)):y.shiftAndExecuteNext(n)},u.appendExecutor=function(n,t){var d=this.operationQueue,v=this.sourceBuffer,b=v[t];if(!b){S.logger.warn("[buffer-controller]: Attempting to append to the "+t+" SourceBuffer, but it does not exist"),d.shiftAndExecuteNext(t);return}b.ended=!1,console.assert(!b.updating,t+" sourceBuffer must not be updating"),b.appendBuffer(n)},u.blockBuffers=function(n,t){var d=this;if(t===void 0&&(t=this.getSourceBufferTypes()),!t.length){S.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(n);return}var v=this.operationQueue,b=t.map(function(y){return v.appendBlocker(y)});Promise.all(b).then(function(){n(),t.forEach(function(y){var _=d.sourceBuffer[y];(!_||!_.updating)&&v.shiftAndExecuteNext(y)})})},u.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},u.addBufferListener=function(n,t,d){var v=this.sourceBuffer[n];if(!v)return;var b=d.bind(this,n);this.listeners[n].push({event:t,listener:b}),v.addEventListener(t,b)},u.removeBufferListeners=function(n){var t=this.sourceBuffer[n];if(!t)return;this.listeners[n].forEach(function(d){t.removeEventListener(d.event,d.listener)})},s}()},"./src/controller/buffer-operation-queue.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"default",function(){return P});var w=U("./src/utils/logger.ts"),P=function(){function S(T){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=T}var C=S.prototype;return C.append=function(h,p){var f=this.queues[p];f.push(h),f.length===1&&this.buffers[p]&&this.executeNext(p)},C.insertAbort=function(h,p){var f=this.queues[p];f.unshift(h),this.executeNext(p)},C.appendBlocker=function(h){var p,f=new Promise(function(a){p=a}),l={execute:p,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(l,h),f},C.executeNext=function(h){var p=this.buffers,f=this.queues,l=p[h],a=f[h];if(a.length){var c=a[0];try{c.execute()}catch(s){w.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),c.onError(s),(!l||!l.updating)&&(a.shift(),this.executeNext(h))}}},C.shiftAndExecuteNext=function(h){this.queues[h].shift(),this.executeNext(h)},C.current=function(h){return this.queues[h][0]},S}()},"./src/controller/cap-level-controller.ts":function(ae,Q,U){"use strict";U.r(Q);var w=U("./src/events.ts");function P(T,h){for(var p=0;p<h.length;p++){var f=h[p];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(T,f.key,f)}}function S(T,h,p){return h&&P(T.prototype,h),p&&P(T,p),T}var C=function(){function T(p){this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.hls=void 0,this.streamController=void 0,this.clientRect=void 0,this.hls=p,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var h=T.prototype;return h.setStreamController=function(f){this.streamController=f},h.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},h.registerListeners=function(){var f=this.hls;f.on(w.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),f.on(w.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),f.on(w.Events.MANIFEST_PARSED,this.onManifestParsed,this),f.on(w.Events.BUFFER_CODECS,this.onBufferCodecs,this),f.on(w.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},h.unregisterListener=function(){var f=this.hls;f.off(w.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),f.off(w.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),f.off(w.Events.MANIFEST_PARSED,this.onManifestParsed,this),f.off(w.Events.BUFFER_CODECS,this.onBufferCodecs,this),f.off(w.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},h.onFpsDropLevelCapping=function(f,l){T.isLevelAllowed(l.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(l.droppedLevel)},h.onMediaAttaching=function(f,l){this.media=l.media instanceof HTMLVideoElement?l.media:null},h.onManifestParsed=function(f,l){var a=this.hls;this.restrictedLevels=[],this.firstLevel=l.firstLevel,a.config.capLevelToPlayerSize&&l.video&&this.startCapping()},h.onBufferCodecs=function(f,l){var a=this.hls;a.config.capLevelToPlayerSize&&l.video&&this.startCapping()},h.onMediaDetaching=function(){this.stopCapping()},h.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var f=this.hls.levels;if(f.length){var l=this.hls;l.autoLevelCapping=this.getMaxLevel(f.length-1),l.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=l.autoLevelCapping}}},h.getMaxLevel=function(f){var l=this,a=this.hls.levels;if(!a.length)return-1;var c=a.filter(function(s,u){return T.isLevelAllowed(u,l.restrictedLevels)&&u<=f});return this.clientRect=null,T.getMaxLevelByMediaSize(c,this.mediaWidth,this.mediaHeight)},h.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()},h.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},h.getDimensions=function(){if(this.clientRect)return this.clientRect;var f=this.media,l={width:0,height:0};if(f){var a=f.getBoundingClientRect();l.width=a.width,l.height=a.height,!l.width&&!l.height&&(l.width=a.right-a.left||f.width||0,l.height=a.bottom-a.top||f.height||0)}return this.clientRect=l,l},T.isLevelAllowed=function(f,l){return l===void 0&&(l=[]),l.indexOf(f)===-1},T.getMaxLevelByMediaSize=function(f,l,a){if(!f||!f.length)return-1;for(var c=function(t,d){return d?t.width!==d.width||t.height!==d.height:!0},s=f.length-1,u=0;u<f.length;u+=1){var i=f[u];if((i.width>=l||i.height>=a)&&c(i,f[u+1])){s=u;break}}return s},S(T,[{key:"mediaWidth",get:function(){return this.getDimensions().width*T.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*T.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var f=1;try{f=self.devicePixelRatio}catch(l){}return f}}]),T}();Q.default=C},"./src/controller/cmcd-controller.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"default",function(){return c});var w=U("./src/events.ts"),P=U("./src/types/cmcd.ts"),S=U("./src/utils/buffer-helper.ts"),C=U("./src/utils/logger.ts");function T(s,u){for(var i=0;i<u.length;i++){var n=u[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(s,n.key,n)}}function h(s,u,i){return u&&T(s.prototype,u),i&&T(s,i),s}function p(s,u){var i=typeof Symbol!="undefined"&&s[Symbol.iterator]||s["@@iterator"];if(i)return(i=i.call(s)).next.bind(i);if(Array.isArray(s)||(i=f(s))||u&&s&&typeof s.length=="number"){i&&(s=i);var n=0;return function(){return n>=s.length?{done:!0}:{done:!1,value:s[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f(s,u){if(!s)return;if(typeof s=="string")return l(s,u);var i=Object.prototype.toString.call(s).slice(8,-1);if(i==="Object"&&s.constructor&&(i=s.constructor.name),i==="Map"||i==="Set")return Array.from(s);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return l(s,u)}function l(s,u){(u==null||u>s.length)&&(u=s.length);for(var i=0,n=new Array(u);i<u;i++)n[i]=s[i];return n}function a(){return a=Object.assign||function(s){for(var u=1;u<arguments.length;u++){var i=arguments[u];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(s[n]=i[n])}return s},a.apply(this,arguments)}var c=function(){function s(i){var n=this;this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){n.initialized&&(n.starved=!0),n.buffering=!0},this.onPlaying=function(){n.initialized||(n.initialized=!0),n.buffering=!1},this.applyPlaylistData=function(v){try{n.apply(v,{ot:P.CMCDObjectType.MANIFEST,su:!n.initialized})}catch(b){C.logger.warn("Could not generate manifest CMCD data.",b)}},this.applyFragmentData=function(v){try{var b=v.frag,y=n.hls.levels[b.level],_=n.getObjectType(b),m={d:b.duration*1e3,ot:_};(_===P.CMCDObjectType.VIDEO||_===P.CMCDObjectType.AUDIO||_==P.CMCDObjectType.MUXED)&&(m.br=y.bitrate/1e3,m.tb=n.getTopBandwidth(_),m.bl=n.getBufferLength(_)),n.apply(v,m)}catch(g){C.logger.warn("Could not generate segment CMCD data.",g)}},this.hls=i;var t=this.config=i.config,d=t.cmcd;d!=null&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=d.sessionId||s.uuid(),this.cid=d.contentId,this.useHeaders=d.useHeaders===!0,this.registerListeners())}var u=s.prototype;return u.registerListeners=function(){var n=this.hls;n.on(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.on(w.Events.MEDIA_DETACHED,this.onMediaDetached,this),n.on(w.Events.BUFFER_CREATED,this.onBufferCreated,this)},u.unregisterListeners=function(){var n=this.hls;n.off(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.off(w.Events.MEDIA_DETACHED,this.onMediaDetached,this),n.off(w.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},u.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},u.onMediaAttached=function(n,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},u.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},u.onBufferCreated=function(n,t){var d,v;this.audioBuffer=(d=t.tracks.audio)===null||d===void 0?void 0:d.buffer,this.videoBuffer=(v=t.tracks.video)===null||v===void 0?void 0:v.buffer},u.createData=function(){var n;return{v:P.CMCDVersion,sf:P.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(n=this.media)===null||n===void 0?void 0:n.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},u.apply=function(n,t){t===void 0&&(t={}),a(t,this.createData());var d=t.ot===P.CMCDObjectType.INIT||t.ot===P.CMCDObjectType.VIDEO||t.ot===P.CMCDObjectType.MUXED;if(this.starved&&d&&(t.bs=!0,t.su=!0,this.starved=!1),t.su==null&&(t.su=this.buffering),this.useHeaders){var v=s.toHeaders(t);if(!Object.keys(v).length)return;n.headers||(n.headers={}),a(n.headers,v)}else{var b=s.toQuery(t);if(!b)return;n.url=s.appendQueryToUri(n.url,b)}},u.getObjectType=function(n){var t=n.type;return t==="subtitle"?P.CMCDObjectType.TIMED_TEXT:n.sn==="initSegment"?P.CMCDObjectType.INIT:t==="audio"?P.CMCDObjectType.AUDIO:t==="main"?this.hls.audioTracks.length?P.CMCDObjectType.VIDEO:P.CMCDObjectType.MUXED:void 0},u.getTopBandwidth=function(n){for(var t=0,d=n===P.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,v=p(d),b;!(b=v()).done;){var y=b.value;y.bitrate>t&&(t=y.bitrate)}return t>0?t:NaN},u.getBufferLength=function(n){var t=this.hls.media,d=n===P.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!d||!t)return NaN;var v=S.BufferHelper.bufferInfo(d,t.currentTime,this.config.maxBufferHole);return v.len*1e3},u.createPlaylistLoader=function(){var n=this.config.pLoader,t=this.applyPlaylistData,d=n||this.config.loader;return function(){function v(y){this.loader=void 0,this.loader=new d(y)}var b=v.prototype;return b.destroy=function(){this.loader.destroy()},b.abort=function(){this.loader.abort()},b.load=function(_,m,g){t(_),this.loader.load(_,m,g)},h(v,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),v}()},u.createFragmentLoader=function(){var n=this.config.fLoader,t=this.applyFragmentData,d=n||this.config.loader;return function(){function v(y){this.loader=void 0,this.loader=new d(y)}var b=v.prototype;return b.destroy=function(){this.loader.destroy()},b.abort=function(){this.loader.abort()},b.load=function(_,m,g){t(_),this.loader.load(_,m,g)},h(v,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),v}()},s.uuid=function(){var n=URL.createObjectURL(new Blob),t=n.toString();return URL.revokeObjectURL(n),t.substr(t.lastIndexOf("/")+1)},s.serialize=function(n){for(var t=[],d=function(F){return!Number.isNaN(F)&&F!=null&&F!==""&&F!==!1},v=function(F){return Math.round(F)},b=function(F){return v(F/100)*100},y=function(F){return encodeURIComponent(F)},_={br:v,d:v,bl:b,dl:b,mtp:b,nor:y,rtp:b,tb:v},m=Object.keys(n||{}).sort(),g=p(m),E;!(E=g()).done;){var o=E.value,x=n[o];if(!d(x))continue;if(o==="v"&&x===1)continue;if(o=="pr"&&x===1)continue;var A=_[o];A&&(x=A(x));var O=typeof x,D=void 0;o==="ot"||o==="sf"||o==="st"?D=o+"="+x:O==="boolean"?D=o:O==="number"?D=o+"="+x:D=o+"="+JSON.stringify(x),t.push(D)}return t.join(",")},s.toHeaders=function(n){for(var t=Object.keys(n),d={},v=["Object","Request","Session","Status"],b=[{},{},{},{}],y={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},_=0,m=t;_<m.length;_++){var g=m[_],E=y[g]!=null?y[g]:1;b[E][g]=n[g]}for(var o=0;o<b.length;o++){var x=s.serialize(b[o]);x&&(d["CMCD-"+v[o]]=x)}return d},s.toQuery=function(n){return"CMCD="+encodeURIComponent(s.serialize(n))},s.appendQueryToUri=function(n,t){if(!t)return n;var d=n.includes("?")?"&":"?";return""+n+d+t},s}()},"./src/controller/eme-controller.ts":function(ae,Q,U){"use strict";U.r(Q);var w=U("./src/events.ts"),P=U("./src/errors.ts"),S=U("./src/utils/logger.ts"),C=U("./src/utils/mediakeys-helper.ts");function T(c,s){for(var u=0;u<s.length;u++){var i=s[u];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,i.key,i)}}function h(c,s,u){return s&&T(c.prototype,s),u&&T(c,u),c}var p=3,f=function(s,u,i){var n={audioCapabilities:[],videoCapabilities:[]};return s.forEach(function(t){n.audioCapabilities.push({contentType:'audio/mp4; codecs="'+t+'"',robustness:i.audioRobustness||""})}),u.forEach(function(t){n.videoCapabilities.push({contentType:'video/mp4; codecs="'+t+'"',robustness:i.videoRobustness||""})}),[n]},l=function(s,u,i,n){switch(s){case C.KeySystems.WIDEVINE:return f(u,i,n);default:throw new Error("Unknown key-system: "+s)}},a=function(){function c(u){this.hls=void 0,this._widevineLicenseUrl=void 0,this._licenseXhrSetup=void 0,this._licenseResponseCallback=void 0,this._emeEnabled=void 0,this._requestMediaKeySystemAccess=void 0,this._drmSystemOptions=void 0,this._config=void 0,this._mediaKeysList=[],this._media=null,this._hasSetMediaKeys=!1,this._requestLicenseFailureCount=0,this.mediaKeysPromise=null,this._onMediaEncrypted=this.onMediaEncrypted.bind(this),this.hls=u,this._config=u.config,this._widevineLicenseUrl=this._config.widevineLicenseUrl,this._licenseXhrSetup=this._config.licenseXhrSetup,this._licenseResponseCallback=this._config.licenseResponseCallback,this._emeEnabled=this._config.emeEnabled,this._requestMediaKeySystemAccess=this._config.requestMediaKeySystemAccessFunc,this._drmSystemOptions=this._config.drmSystemOptions,this._registerListeners()}var s=c.prototype;return s.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},s._registerListeners=function(){this.hls.on(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(w.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(w.Events.MANIFEST_PARSED,this.onManifestParsed,this)},s._unregisterListeners=function(){this.hls.off(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(w.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(w.Events.MANIFEST_PARSED,this.onManifestParsed,this)},s.getLicenseServerUrl=function(i){switch(i){case C.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+i+'"')},s._attemptKeySystemAccess=function(i,n,t){var d=this,v=l(i,n,t,this._drmSystemOptions);S.logger.log("Requesting encrypted media key-system access");var b=this.requestMediaKeySystemAccess(i,v);this.mediaKeysPromise=b.then(function(y){return d._onMediaKeySystemAccessObtained(i,y)}),b.catch(function(y){S.logger.error('Failed to obtain key-system "'+i+'" access:',y)})},s._onMediaKeySystemAccessObtained=function(i,n){var t=this;S.logger.log('Access for key-system "'+i+'" obtained');var d={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:n,mediaKeySystemDomain:i};this._mediaKeysList.push(d);var v=Promise.resolve().then(function(){return n.createMediaKeys()}).then(function(b){return d.mediaKeys=b,S.logger.log('Media-keys created for key-system "'+i+'"'),t._onMediaKeysCreated(),b});return v.catch(function(b){S.logger.error("Failed to create media-keys:",b)}),v},s._onMediaKeysCreated=function(){var i=this;this._mediaKeysList.forEach(function(n){n.mediaKeysSession||(n.mediaKeysSession=n.mediaKeys.createSession(),i._onNewMediaKeySession(n.mediaKeysSession))})},s._onNewMediaKeySession=function(i){var n=this;S.logger.log("New key-system session "+i.sessionId),i.addEventListener("message",function(t){n._onKeySessionMessage(i,t.message)},!1)},s._onKeySessionMessage=function(i,n){S.logger.log("Got EME message event, creating license request"),this._requestLicense(n,function(t){S.logger.log("Received license data (length: "+(t&&t.byteLength)+"), updating key-session"),i.update(t)})},s.onMediaEncrypted=function(i){var n=this;if(S.logger.log('Media is encrypted using "'+i.initDataType+'" init data type'),!this.mediaKeysPromise){S.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var t=function(v){if(!n._media)return;n._attemptSetMediaKeys(v),n._generateRequestWithPreferredKeySession(i.initDataType,i.initData)};this.mediaKeysPromise.then(t).catch(t)},s._attemptSetMediaKeys=function(i){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var n=this._mediaKeysList[0];if(!n||!n.mediaKeys){S.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}S.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(n.mediaKeys),this._hasSetMediaKeys=!0}},s._generateRequestWithPreferredKeySession=function(i,n){var t=this,d=this._mediaKeysList[0];if(!d){S.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(d.mediaKeysSessionInitialized){S.logger.warn("Key-Session already initialized but requested again");return}var v=d.mediaKeysSession;if(!v){S.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!n){S.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}S.logger.log('Generating key-session request for "'+i+'" init data type'),d.mediaKeysSessionInitialized=!0,v.generateRequest(i,n).then(function(){S.logger.debug("Key-session generation succeeded")}).catch(function(b){S.logger.error("Error generating key-session request:",b),t.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},s._createLicenseXhr=function(i,n,t){var d=new XMLHttpRequest;d.responseType="arraybuffer",d.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,d,i,n,t);var v=this._licenseXhrSetup;if(v)try{v.call(this.hls,d,i),v=void 0}catch(b){S.logger.error(b)}try{d.readyState||d.open("POST",i,!0),v&&v.call(this.hls,d,i)}catch(b){throw new Error("issue setting up KeySystem license XHR "+b)}return d},s._onLicenseRequestReadyStageChange=function(i,n,t,d){switch(i.readyState){case 4:if(i.status===200){this._requestLicenseFailureCount=0,S.logger.log("License request succeeded");var v=i.response,b=this._licenseResponseCallback;if(b)try{v=b.call(this.hls,i,n)}catch(_){S.logger.error(_)}d(v)}else{if(S.logger.error("License Request XHR failed ("+n+"). Status: "+i.status+" ("+i.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>p){this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var y=p-this._requestLicenseFailureCount+1;S.logger.warn("Retrying license request, "+y+" attempts left"),this._requestLicense(t,d)}break}},s._generateLicenseRequestChallenge=function(i,n){switch(i.mediaKeySystemDomain){case C.KeySystems.WIDEVINE:return n}throw new Error("unsupported key-system: "+i.mediaKeySystemDomain)},s._requestLicense=function(i,n){S.logger.log("Requesting content license for key-system");var t=this._mediaKeysList[0];if(!t){S.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var d=this.getLicenseServerUrl(t.mediaKeySystemDomain),v=this._createLicenseXhr(d,i,n);S.logger.log("Sending license request to URL: "+d);var b=this._generateLicenseRequestChallenge(t,i);v.send(b)}catch(y){S.logger.error("Failure requesting DRM license: "+y),this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},s.onMediaAttached=function(i,n){if(!this._emeEnabled)return;var t=n.media;this._media=t,t.addEventListener("encrypted",this._onMediaEncrypted)},s.onMediaDetached=function(){var i=this._media,n=this._mediaKeysList;if(!i)return;i.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(n.map(function(t){if(t.mediaKeysSession)return t.mediaKeysSession.close().catch(function(){})})).then(function(){return i.setMediaKeys(null)}).catch(function(){})},s.onManifestParsed=function(i,n){if(!this._emeEnabled)return;var t=n.levels.map(function(v){return v.audioCodec}).filter(function(v){return!!v}),d=n.levels.map(function(v){return v.videoCodec}).filter(function(v){return!!v});this._attemptKeySystemAccess(C.KeySystems.WIDEVINE,t,d)},h(c,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),c}();Q.default=a},"./src/controller/fps-controller.ts":function(ae,Q,U){"use strict";U.r(Q);var w=U("./src/events.ts"),P=U("./src/utils/logger.ts"),S=function(){function C(h){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=h,this.registerListeners()}var T=C.prototype;return T.setStreamController=function(p){this.streamController=p},T.registerListeners=function(){this.hls.on(w.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},T.unregisterListeners=function(){this.hls.off(w.Events.MEDIA_ATTACHING,this.onMediaAttaching)},T.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},T.onMediaAttaching=function(p,f){var l=this.hls.config;if(l.capLevelOnFPSDrop){var a=f.media instanceof self.HTMLVideoElement?f.media:null;this.media=a,a&&typeof a.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),l.fpsDroppedMonitoringPeriod)}},T.checkFPS=function(p,f,l){var a=performance.now();if(f){if(this.lastTime){var c=a-this.lastTime,s=l-this.lastDroppedFrames,u=f-this.lastDecodedFrames,i=1e3*s/c,n=this.hls;if(n.trigger(w.Events.FPS_DROP,{currentDropped:s,currentDecoded:u,totalDroppedFrames:l}),i>0&&s>n.config.fpsDroppedMonitoringThreshold*u){var t=n.currentLevel;P.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+t),t>0&&(n.autoLevelCapping===-1||n.autoLevelCapping>=t)&&(t=t-1,n.trigger(w.Events.FPS_DROP_LEVEL_CAPPING,{level:t,droppedLevel:n.currentLevel}),n.autoLevelCapping=t,this.streamController.nextLevelSwitch())}}this.lastTime=a,this.lastDroppedFrames=l,this.lastDecodedFrames=f}},T.checkFPSInterval=function(){var p=this.media;if(p)if(this.isVideoPlaybackQualityAvailable){var f=p.getVideoPlaybackQuality();this.checkFPS(p,f.totalVideoFrames,f.droppedVideoFrames)}else this.checkFPS(p,p.webkitDecodedFrameCount,p.webkitDroppedFrameCount)},C}();Q.default=S},"./src/controller/fragment-finders.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"findFragmentByPDT",function(){return S}),U.d(Q,"findFragmentByPTS",function(){return C}),U.d(Q,"fragmentWithinToleranceTest",function(){return T}),U.d(Q,"pdtWithinToleranceTest",function(){return h}),U.d(Q,"findFragWithCC",function(){return p});var w=U("./src/polyfills/number.ts"),P=U("./src/utils/binary-search.ts");function S(f,l,a){if(l===null||!Array.isArray(f)||!f.length||!Object(w.isFiniteNumber)(l))return null;var c=f[0].programDateTime;if(l<(c||0))return null;var s=f[f.length-1].endProgramDateTime;if(l>=(s||0))return null;a=a||0;for(var u=0;u<f.length;++u){var i=f[u];if(h(l,a,i))return i}return null}function C(f,l,a,c){a===void 0&&(a=0),c===void 0&&(c=0);var s=null;if(f?s=l[f.sn-l[0].sn+1]||null:a===0&&l[0].start===0&&(s=l[0]),s&&T(a,c,s)===0)return s;var u=P.default.search(l,T.bind(null,a,c));return u||s}function T(f,l,a){f===void 0&&(f=0),l===void 0&&(l=0);var c=Math.min(l,a.duration+(a.deltaPTS?a.deltaPTS:0));return a.start+a.duration-c<=f?1:a.start-c>f&&a.start?-1:0}function h(f,l,a){var c=Math.min(l,a.duration+(a.deltaPTS?a.deltaPTS:0))*1e3,s=a.endProgramDateTime||0;return s-c>f}function p(f,l){return P.default.search(f,function(a){return a.cc<l?1:a.cc>l?-1:0})}},"./src/controller/fragment-tracker.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"FragmentState",function(){return S}),U.d(Q,"FragmentTracker",function(){return C});var w=U("./src/events.ts"),P=U("./src/types/loader.ts"),S;(function(p){p.NOT_LOADED="NOT_LOADED",p.BACKTRACKED="BACKTRACKED",p.APPENDING="APPENDING",p.PARTIAL="PARTIAL",p.OK="OK"})(S||(S={}));var C=function(){function p(l){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=l,this._registerListeners()}var f=p.prototype;return f._registerListeners=function(){var a=this.hls;a.on(w.Events.BUFFER_APPENDED,this.onBufferAppended,this),a.on(w.Events.FRAG_BUFFERED,this.onFragBuffered,this),a.on(w.Events.FRAG_LOADED,this.onFragLoaded,this)},f._unregisterListeners=function(){var a=this.hls;a.off(w.Events.BUFFER_APPENDED,this.onBufferAppended,this),a.off(w.Events.FRAG_BUFFERED,this.onFragBuffered,this),a.off(w.Events.FRAG_LOADED,this.onFragLoaded,this)},f.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},f.getAppendedFrag=function(a,c){if(c===P.PlaylistLevelType.MAIN){var s=this.activeFragment,u=this.activeParts;if(!s)return null;if(u)for(var i=u.length;i--;){var n=u[i],t=n?n.end:s.appendedPTS;if(n.start<=a&&t!==void 0&&a<=t)return i>9&&(this.activeParts=u.slice(i-9)),n}else if(s.start<=a&&s.appendedPTS!==void 0&&a<=s.appendedPTS)return s}return this.getBufferedFrag(a,c)},f.getBufferedFrag=function(a,c){for(var s=this.fragments,u=Object.keys(s),i=u.length;i--;){var n=s[u[i]];if((n==null?void 0:n.body.type)===c&&n.buffered){var t=n.body;if(t.start<=a&&a<=t.end)return t}}return null},f.detectEvictedFragments=function(a,c,s){var u=this;Object.keys(this.fragments).forEach(function(i){var n=u.fragments[i];if(!n)return;if(!n.buffered){n.body.type===s&&u.removeFragment(n.body);return}var t=n.range[a];if(!t)return;t.time.some(function(d){var v=!u.isTimeBuffered(d.startPTS,d.endPTS,c);return v&&u.removeFragment(n.body),v})})},f.detectPartialFragments=function(a){var c=this,s=this.timeRanges,u=a.frag,i=a.part;if(!s||u.sn==="initSegment")return;var n=h(u),t=this.fragments[n];if(!t)return;Object.keys(s).forEach(function(d){var v=u.elementaryStreams[d];if(!v)return;var b=s[d],y=i!==null||v.partial===!0;t.range[d]=c.getBufferedTimes(u,i,y,b)}),t.backtrack=t.loaded=null,Object.keys(t.range).length?t.buffered=!0:this.removeFragment(t.body)},f.fragBuffered=function(a){var c=h(a),s=this.fragments[c];s&&(s.backtrack=s.loaded=null,s.buffered=!0)},f.getBufferedTimes=function(a,c,s,u){for(var i={time:[],partial:s},n=c?c.start:a.start,t=c?c.end:a.end,d=a.minEndPTS||t,v=a.maxStartPTS||n,b=0;b<u.length;b++){var y=u.start(b)-this.bufferPadding,_=u.end(b)+this.bufferPadding;if(v>=y&&d<=_){i.time.push({startPTS:Math.max(n,u.start(b)),endPTS:Math.min(t,u.end(b))});break}else if(n<_&&t>y)i.partial=!0,i.time.push({startPTS:Math.max(n,u.start(b)),endPTS:Math.min(t,u.end(b))});else if(t<=y)break}return i},f.getPartialFragment=function(a){var c=null,s,u,i,n=0,t=this.bufferPadding,d=this.fragments;return Object.keys(d).forEach(function(v){var b=d[v];if(!b)return;T(b)&&(u=b.body.start-t,i=b.body.end+t,a>=u&&a<=i&&(s=Math.min(a-u,i-a),n<=s&&(c=b.body,n=s)))}),c},f.getState=function(a){var c=h(a),s=this.fragments[c];return s?s.buffered?T(s)?S.PARTIAL:S.OK:s.backtrack?S.BACKTRACKED:S.APPENDING:S.NOT_LOADED},f.backtrack=function(a,c){var s=h(a),u=this.fragments[s];if(!u||u.backtrack)return null;var i=u.backtrack=c||u.loaded;return u.loaded=null,i},f.getBacktrackData=function(a){var c=h(a),s=this.fragments[c];if(s){var u,i=s.backtrack;if(i!=null&&(u=i.payload)!==null&&u!==void 0&&u.byteLength)return i;this.removeFragment(a)}return null},f.isTimeBuffered=function(a,c,s){for(var u,i,n=0;n<s.length;n++){if(u=s.start(n)-this.bufferPadding,i=s.end(n)+this.bufferPadding,a>=u&&c<=i)return!0;if(c<=u)return!1}return!1},f.onFragLoaded=function(a,c){var s=c.frag,u=c.part;if(s.sn==="initSegment"||s.bitrateTest||u)return;var i=h(s);this.fragments[i]={body:s,loaded:c,backtrack:null,buffered:!1,range:Object.create(null)}},f.onBufferAppended=function(a,c){var s=this,u=c.frag,i=c.part,n=c.timeRanges;if(u.type===P.PlaylistLevelType.MAIN)if(this.activeFragment=u,i){var t=this.activeParts;t||(this.activeParts=t=[]),t.push(i)}else this.activeParts=null;this.timeRanges=n,Object.keys(n).forEach(function(d){var v=n[d];if(s.detectEvictedFragments(d,v),!i)for(var b=0;b<v.length;b++)u.appendedPTS=Math.max(v.end(b),u.appendedPTS||0)})},f.onFragBuffered=function(a,c){this.detectPartialFragments(c)},f.hasFragment=function(a){var c=h(a);return!!this.fragments[c]},f.removeFragmentsInRange=function(a,c,s){var u=this;Object.keys(this.fragments).forEach(function(i){var n=u.fragments[i];if(!n)return;if(n.buffered){var t=n.body;t.type===s&&t.start<c&&t.end>a&&u.removeFragment(t)}})},f.removeFragment=function(a){var c=h(a);a.stats.loaded=0,a.clearElementaryStreamInfo(),delete this.fragments[c]},f.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},p}();function T(p){var f,l;return p.buffered&&(((f=p.range.video)===null||f===void 0?void 0:f.partial)||((l=p.range.audio)===null||l===void 0?void 0:l.partial))}function h(p){return p.type+"_"+p.level+"_"+p.urlId+"_"+p.sn}},"./src/controller/gap-controller.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"STALL_MINIMUM_DURATION_MS",function(){return T}),U.d(Q,"MAX_START_GAP_JUMP",function(){return h}),U.d(Q,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return p}),U.d(Q,"SKIP_BUFFER_RANGE_START",function(){return f}),U.d(Q,"default",function(){return l});var w=U("./src/utils/buffer-helper.ts"),P=U("./src/errors.ts"),S=U("./src/events.ts"),C=U("./src/utils/logger.ts"),T=250,h=2,p=.1,f=.05,l=function(){function a(s,u,i,n){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=s,this.media=u,this.fragmentTracker=i,this.hls=n}var c=a.prototype;return c.destroy=function(){this.hls=this.fragmentTracker=this.media=null},c.poll=function(u){var i=this.config,n=this.media,t=this.stalled,d=n.currentTime,v=n.seeking,b=this.seeking&&!v,y=!this.seeking&&v;if(this.seeking=v,d!==u){if(this.moved=!0,t!==null){if(this.stallReported){var _=self.performance.now()-t;C.logger.warn("playback not stuck anymore @"+d+", after "+Math.round(_)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((y||b)&&(this.stalled=null),n.paused||n.ended||n.playbackRate===0||!w.BufferHelper.getBuffered(n).length)return;var m=w.BufferHelper.bufferInfo(n,d,0),g=m.len>0,E=m.nextStart||0;if(!g&&!E)return;if(v){var o=m.len>h,x=!E||E-d>h&&!this.fragmentTracker.getPartialFragment(d);if(o||x)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var A,O=Math.max(E,m.start||0)-d,D=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,I=D==null||((A=D.details)===null||A===void 0)?void 0:A.live,F=I?D.details.targetduration*2:h;if(O>0&&O<=F){this._trySkipBufferHole(null);return}}var z=self.performance.now();if(t===null){this.stalled=z;return}var ne=z-t;!v&&ne>=T&&this._reportStall(m.len);var j=w.BufferHelper.bufferInfo(n,d,i.maxBufferHole);this._tryFixBufferStall(j,ne)},c._tryFixBufferStall=function(u,i){var n=this.config,t=this.fragmentTracker,d=this.media,v=d.currentTime,b=t.getPartialFragment(v);if(b){var y=this._trySkipBufferHole(b);if(y)return}u.len>n.maxBufferHole&&i>n.highBufferWatchdogPeriod*1e3&&(C.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},c._reportStall=function(u){var i=this.hls,n=this.media,t=this.stallReported;t||(this.stallReported=!0,C.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer (buffer="+u+")"),i.trigger(S.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:u}))},c._trySkipBufferHole=function(u){for(var i=this.config,n=this.hls,t=this.media,d=t.currentTime,v=0,b=w.BufferHelper.getBuffered(t),y=0;y<b.length;y++){var _=b.start(y);if(d+i.maxBufferHole>=v&&d<_){var m=Math.max(_+f,t.currentTime+p);return C.logger.warn("skipping hole, adjusting currentTime from "+d+" to "+m),this.moved=!0,this.stalled=null,t.currentTime=m,u&&n.trigger(S.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+d+" to "+m,frag:u}),m}v=b.end(y)}return 0},c._tryNudgeBuffer=function(){var u=this.config,i=this.hls,n=this.media,t=n.currentTime,d=(this.nudgeRetry||0)+1;if(this.nudgeRetry=d,d<u.nudgeMaxRetry){var v=t+d*u.nudgeOffset;C.logger.warn("Nudging 'currentTime' from "+t+" to "+v),n.currentTime=v,i.trigger(S.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else C.logger.error("Playhead still not moving while enough data buffered @"+t+" after "+u.nudgeMaxRetry+" nudges"),i.trigger(S.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},a}()},"./src/controller/id3-track-controller.ts":function(ae,Q,U){"use strict";U.r(Q);var w=U("./src/events.ts"),P=U("./src/utils/texttrack-utils.ts"),S=U("./src/demux/id3.ts"),C=.25,T=function(){function h(f){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=f,this._registerListeners()}var p=h.prototype;return p.destroy=function(){this._unregisterListeners()},p._registerListeners=function(){var l=this.hls;l.on(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.on(w.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.on(w.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),l.on(w.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},p._unregisterListeners=function(){var l=this.hls;l.off(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.off(w.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.off(w.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),l.off(w.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},p.onMediaAttached=function(l,a){this.media=a.media},p.onMediaDetaching=function(){if(!this.id3Track)return;Object(P.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},p.getID3Track=function(l){if(!this.media)return;for(var a=0;a<l.length;a++){var c=l[a];if(c.kind==="metadata"&&c.label==="id3")return Object(P.sendAddTrackEvent)(c,this.media),c}return this.media.addTextTrack("metadata","id3")},p.onFragParsingMetadata=function(l,a){if(!this.media)return;var c=a.frag,s=a.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var u=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,i=0;i<s.length;i++){var n=S.getID3Frames(s[i].data);if(n){var t=s[i].pts,d=i<s.length-1?s[i+1].pts:c.end,v=d-t;v<=0&&(d=t+C);for(var b=0;b<n.length;b++){var y=n[b];if(!S.isTimeStampFrame(y)){var _=new u(t,d,"");_.value=y,this.id3Track.addCue(_)}}}}},p.onBufferFlushing=function(l,a){var c=a.startOffset,s=a.endOffset,u=a.type;if(!u||u==="audio"){var i=this.id3Track;i&&Object(P.removeCuesInRange)(i,c,s)}},h}();Q.default=T},"./src/controller/latency-controller.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"default",function(){return h});var w=U("./src/errors.ts"),P=U("./src/events.ts"),S=U("./src/utils/logger.ts");function C(p,f){for(var l=0;l<f.length;l++){var a=f[l];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(p,a.key,a)}}function T(p,f,l){return f&&C(p.prototype,f),l&&C(p,l),p}var h=function(){function p(l){var a=this;this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=function(){return a.timeupdate()},this.hls=l,this.config=l.config,this.registerListeners()}var f=p.prototype;return f.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},f.registerListeners=function(){this.hls.on(P.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(P.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(P.Events.ERROR,this.onError,this)},f.unregisterListeners=function(){this.hls.off(P.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(P.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(P.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(P.Events.ERROR,this.onError)},f.onMediaAttached=function(a,c){this.media=c.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},f.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},f.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},f.onLevelUpdated=function(a,c){var s=c.details;this.levelDetails=s,s.advanced&&this.timeupdate(),!s.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},f.onError=function(a,c){if(c.details!==w.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,S.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},f.timeupdate=function(){var a=this.media,c=this.levelDetails;if(!a||!c)return;this.currentTime=a.currentTime;var s=this.computeLatency();if(s===null)return;this._latency=s;var u=this.config,i=u.lowLatencyMode,n=u.maxLiveSyncPlaybackRate;if(!i||n===1)return;var t=this.targetLatency;if(t===null)return;var d=s-t,v=Math.min(this.maxLatency,t+c.targetduration),b=d<v;if(c.live&&b&&d>.05&&this.forwardBufferLength>1){var y=Math.min(2,Math.max(1,n)),_=Math.round(2/(1+Math.exp(-.75*d-this.edgeStalled))*20)/20;a.playbackRate=Math.min(y,Math.max(1,_))}else a.playbackRate!==1&&a.playbackRate!==0&&(a.playbackRate=1)},f.estimateLiveEdge=function(){var a=this.levelDetails;return a===null?null:a.edge+a.age},f.computeLatency=function(){var a=this.estimateLiveEdge();return a===null?null:a-this.currentTime},T(p,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var a=this.config,c=this.levelDetails;return a.liveMaxLatencyDuration!==void 0?a.liveMaxLatencyDuration:c?a.liveMaxLatencyDurationCount*c.targetduration:0}},{key:"targetLatency",get:function(){var a=this.levelDetails;if(a===null)return null;var c=a.holdBack,s=a.partHoldBack,u=a.targetduration,i=this.config,n=i.liveSyncDuration,t=i.liveSyncDurationCount,d=i.lowLatencyMode,v=this.hls.userConfig,b=d&&s||c;(v.liveSyncDuration||v.liveSyncDurationCount||b===0)&&(b=n!==void 0?n:t*u);var y=u,_=1;return b+Math.min(this.stallCount*_,y)}},{key:"liveSyncPosition",get:function(){var a=this.estimateLiveEdge(),c=this.targetLatency,s=this.levelDetails;if(a===null||c===null||s===null)return null;var u=s.edge,i=a-c-this.edgeStalled,n=u-s.totalduration,t=u-(this.config.lowLatencyMode&&s.partTarget||s.targetduration);return Math.min(Math.max(n,i),t)}},{key:"drift",get:function(){var a=this.levelDetails;return a===null?1:a.drift}},{key:"edgeStalled",get:function(){var a=this.levelDetails;if(a===null)return 0;var c=(this.config.lowLatencyMode&&a.partTarget||a.targetduration)*3;return Math.max(a.age-c,0)}},{key:"forwardBufferLength",get:function(){var a=this.media,c=this.levelDetails;if(!a||!c)return 0;var s=a.buffered.length;return s?a.buffered.end(s-1):c.edge-this.currentTime}}]),p}()},"./src/controller/level-controller.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"default",function(){return i});var w=U("./src/types/level.ts"),P=U("./src/events.ts"),S=U("./src/errors.ts"),C=U("./src/utils/codecs.ts"),T=U("./src/controller/level-helper.ts"),h=U("./src/controller/base-playlist-controller.ts"),p=U("./src/types/loader.ts");function f(){return f=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var d=arguments[t];for(var v in d)Object.prototype.hasOwnProperty.call(d,v)&&(n[v]=d[v])}return n},f.apply(this,arguments)}function l(n,t){for(var d=0;d<t.length;d++){var v=t[d];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(n,v.key,v)}}function a(n,t,d){return t&&l(n.prototype,t),d&&l(n,d),n}function c(n,t){n.prototype=Object.create(t.prototype),n.prototype.constructor=n,s(n,t)}function s(n,t){return s=Object.setPrototypeOf||function(v,b){return v.__proto__=b,v},s(n,t)}var u=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),i=function(n){c(t,n);function t(v){var b;return b=n.call(this,v,"[level-controller]")||this,b._levels=[],b._firstLevel=-1,b._startLevel=void 0,b.currentLevelIndex=-1,b.manualLevelIndex=-1,b.onParsedComplete=void 0,b._registerListeners(),b}var d=t.prototype;return d._registerListeners=function(){var b=this.hls;b.on(P.Events.MANIFEST_LOADED,this.onManifestLoaded,this),b.on(P.Events.LEVEL_LOADED,this.onLevelLoaded,this),b.on(P.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),b.on(P.Events.FRAG_LOADED,this.onFragLoaded,this),b.on(P.Events.ERROR,this.onError,this)},d._unregisterListeners=function(){var b=this.hls;b.off(P.Events.MANIFEST_LOADED,this.onManifestLoaded,this),b.off(P.Events.LEVEL_LOADED,this.onLevelLoaded,this),b.off(P.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),b.off(P.Events.FRAG_LOADED,this.onFragLoaded,this),b.off(P.Events.ERROR,this.onError,this)},d.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,n.prototype.destroy.call(this)},d.startLoad=function(){var b=this._levels;b.forEach(function(y){y.loadError=0}),n.prototype.startLoad.call(this)},d.onManifestLoaded=function(b,y){var _=[],m=[],g=[],E,o={},x,A=!1,O=!1,D=!1;if(y.levels.forEach(function(ne){var j=ne.attrs;A=A||!!(ne.width&&ne.height),O=O||!!ne.videoCodec,D=D||!!ne.audioCodec,u&&ne.audioCodec&&ne.audioCodec.indexOf("mp4a.40.34")!==-1&&(ne.audioCodec=void 0);var G=ne.bitrate+"-"+ne.attrs.RESOLUTION+"-"+ne.attrs.CODECS;x=o[G],x?x.url.push(ne.url):(x=new w.Level(ne),o[G]=x,_.push(x)),j&&(j.AUDIO&&Object(T.addGroupId)(x,"audio",j.AUDIO),j.SUBTITLES&&Object(T.addGroupId)(x,"text",j.SUBTITLES))}),(A||O)&&D&&(_=_.filter(function(ne){var j=ne.videoCodec,G=ne.width,X=ne.height;return!!j||!!(G&&X)})),_=_.filter(function(ne){var j=ne.audioCodec,G=ne.videoCodec;return(!j||Object(C.isCodecSupportedInMp4)(j,"audio"))&&(!G||Object(C.isCodecSupportedInMp4)(G,"video"))}),y.audioTracks&&(m=y.audioTracks.filter(function(ne){return!ne.audioCodec||Object(C.isCodecSupportedInMp4)(ne.audioCodec,"audio")}),Object(T.assignTrackIdsByGroup)(m)),y.subtitles&&(g=y.subtitles,Object(T.assignTrackIdsByGroup)(g)),_.length>0){E=_[0].bitrate,_.sort(function(ne,j){return ne.bitrate-j.bitrate}),this._levels=_;for(var I=0;I<_.length;I++)if(_[I].bitrate===E){this._firstLevel=I,this.log("manifest loaded, "+_.length+" level(s) found, first bitrate: "+E);break}var F=D&&!O,z={levels:_,audioTracks:m,subtitleTracks:g,firstLevel:this._firstLevel,stats:y.stats,audio:D,video:O,altAudio:!F&&m.some(function(ne){return!!ne.url})};this.hls.trigger(P.Events.MANIFEST_PARSED,z),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(P.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:y.url,reason:"no level with compatible codecs found in manifest"})},d.onError=function(b,y){if(n.prototype.onError.call(this,b,y),y.fatal)return;var _=y.context,m=this._levels[this.currentLevelIndex];if(_&&(_.type===p.PlaylistContextType.AUDIO_TRACK&&m.audioGroupIds&&_.groupId===m.audioGroupIds[m.urlId]||_.type===p.PlaylistContextType.SUBTITLE_TRACK&&m.textGroupIds&&_.groupId===m.textGroupIds[m.urlId])){this.redundantFailover(this.currentLevelIndex);return}var g=!1,E=!0,o;switch(y.details){case S.ErrorDetails.FRAG_LOAD_ERROR:case S.ErrorDetails.FRAG_LOAD_TIMEOUT:case S.ErrorDetails.KEY_LOAD_ERROR:case S.ErrorDetails.KEY_LOAD_TIMEOUT:if(y.frag){var x=this._levels[y.frag.level];x?(x.fragmentError++,x.fragmentError>this.hls.config.fragLoadingMaxRetry&&(o=y.frag.level)):o=y.frag.level}break;case S.ErrorDetails.LEVEL_LOAD_ERROR:case S.ErrorDetails.LEVEL_LOAD_TIMEOUT:_&&(_.deliveryDirectives&&(E=!1),o=_.level),g=!0;break;case S.ErrorDetails.REMUX_ALLOC_ERROR:o=y.level,g=!0;break}o!==void 0&&this.recoverLevel(y,o,g,E)},d.recoverLevel=function(b,y,_,m){var g=b.details,E=this._levels[y];if(E.loadError++,_){var o=this.retryLoadingOrFail(b);if(o)b.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(m){var x=E.url.length;if(x>1&&E.loadError<x)b.levelRetry=!0,this.redundantFailover(y);else if(this.manualLevelIndex===-1){var A=y===0?this._levels.length-1:y-1;this.currentLevelIndex!==A&&this._levels[A].loadError===0&&(this.warn(g+": switch to "+A),b.levelRetry=!0,this.hls.nextAutoLevel=A)}}},d.redundantFailover=function(b){var y=this._levels[b],_=y.url.length;if(_>1){var m=(y.urlId+1)%_;this.warn("Switching to redundant URL-id "+m),this._levels.forEach(function(g){g.urlId=m}),this.level=b}},d.onFragLoaded=function(b,y){var _=y.frag;if(_!==void 0&&_.type===p.PlaylistLevelType.MAIN){var m=this._levels[_.level];m!==void 0&&(m.fragmentError=0,m.loadError=0)}},d.onLevelLoaded=function(b,y){var _,m=y.level,g=y.details,E=this._levels[m];if(!E){var o;this.warn("Invalid level index "+m),(o=y.deliveryDirectives)!==null&&o!==void 0&&o.skip&&(g.deltaUpdateFailed=!0);return}m===this.currentLevelIndex?(E.fragmentError===0&&(E.loadError=0,this.retryCount=0),this.playlistLoaded(m,y,E.details)):(_=y.deliveryDirectives)!==null&&_!==void 0&&_.skip&&(g.deltaUpdateFailed=!0)},d.onAudioTrackSwitched=function(b,y){var _=this.hls.levels[this.currentLevelIndex];if(!_)return;if(_.audioGroupIds){for(var m=-1,g=this.hls.audioTracks[y.id].groupId,E=0;E<_.audioGroupIds.length;E++)if(_.audioGroupIds[E]===g){m=E;break}m!==_.urlId&&(_.urlId=m,this.startLoad())}},d.loadPlaylist=function(b){var y=this.currentLevelIndex,_=this._levels[y];if(this.canLoad&&_&&_.url.length>0){var m=_.urlId,g=_.url[m];if(b)try{g=b.addDirectives(g)}catch(E){this.warn("Could not construct new URL with HLS Delivery Directives: "+E)}this.log("Attempt loading level index "+y+(b?" at sn "+b.msn+" part "+b.part:"")+" with URL-id "+m+" "+g),this.clearTimer(),this.hls.trigger(P.Events.LEVEL_LOADING,{url:g,level:y,id:m,deliveryDirectives:b||null})}},d.removeLevel=function(b,y){var _=function(E,o){return o!==y},m=this._levels.filter(function(g,E){return E!==b?!0:g.url.length>1&&y!==void 0?(g.url=g.url.filter(_),g.audioGroupIds&&(g.audioGroupIds=g.audioGroupIds.filter(_)),g.textGroupIds&&(g.textGroupIds=g.textGroupIds.filter(_)),g.urlId=0,!0):!1}).map(function(g,E){var o=g.details;return o!=null&&o.fragments&&o.fragments.forEach(function(x){x.level=E}),g});this._levels=m,this.hls.trigger(P.Events.LEVELS_UPDATED,{levels:m})},a(t,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(b){var y,_=this._levels;if(_.length===0)return;if(this.currentLevelIndex===b&&(y=_[b])!==null&&y!==void 0&&y.details)return;if(b<0||b>=_.length){var m=b<0;if(this.hls.trigger(P.Events.ERROR,{type:S.ErrorTypes.OTHER_ERROR,details:S.ErrorDetails.LEVEL_SWITCH_ERROR,level:b,fatal:m,reason:"invalid level idx"}),m)return;b=Math.min(b,_.length-1)}this.clearTimer();var g=this.currentLevelIndex,E=_[g],o=_[b];this.log("switching to level "+b+" from "+g),this.currentLevelIndex=b;var x=f({},o,{level:b,maxBitrate:o.maxBitrate,uri:o.uri,urlId:o.urlId});delete x._urlId,this.hls.trigger(P.Events.LEVEL_SWITCHING,x);var A=o.details;if(!A||A.live){var O=this.switchParams(o.uri,E==null?void 0:E.details);this.loadPlaylist(O)}}},{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)}}]),t}(h.default)},"./src/controller/level-helper.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"addGroupId",function(){return S}),U.d(Q,"assignTrackIdsByGroup",function(){return C}),U.d(Q,"updatePTS",function(){return T}),U.d(Q,"updateFragPTSDTS",function(){return p}),U.d(Q,"mergeDetails",function(){return f}),U.d(Q,"mapPartIntersection",function(){return l}),U.d(Q,"mapFragmentIntersection",function(){return a}),U.d(Q,"adjustSliding",function(){return c}),U.d(Q,"addSliding",function(){return s}),U.d(Q,"computeReloadInterval",function(){return u}),U.d(Q,"getFragmentWithSN",function(){return i}),U.d(Q,"getPartWith",function(){return n});var w=U("./src/polyfills/number.ts"),P=U("./src/utils/logger.ts");function S(t,d,v){switch(d){case"audio":t.audioGroupIds||(t.audioGroupIds=[]),t.audioGroupIds.push(v);break;case"text":t.textGroupIds||(t.textGroupIds=[]),t.textGroupIds.push(v);break}}function C(t){var d={};t.forEach(function(v){var b=v.groupId||"";v.id=d[b]=d[b]||0,d[b]++})}function T(t,d,v){var b=t[d],y=t[v];h(b,y)}function h(t,d){var v=d.startPTS;if(Object(w.isFiniteNumber)(v)){var b=0,y;d.sn>t.sn?(b=v-t.start,y=t):(b=t.start-v,y=d),y.duration!==b&&(y.duration=b)}else if(d.sn>t.sn){var _=t.cc===d.cc;_&&t.minEndPTS?d.start=t.start+(t.minEndPTS-t.start):d.start=t.start+t.duration}else d.start=Math.max(t.start-d.duration,0)}function p(t,d,v,b,y,_){var m=b-v;m<=0&&(P.logger.warn("Fragment should have a positive duration",d),b=v+d.duration,_=y+d.duration);var g=v,E=b,o=d.startPTS,x=d.endPTS;if(Object(w.isFiniteNumber)(o)){var A=Math.abs(o-v);Object(w.isFiniteNumber)(d.deltaPTS)?d.deltaPTS=Math.max(A,d.deltaPTS):d.deltaPTS=A,g=Math.max(v,o),v=Math.min(v,o),y=Math.min(y,d.startDTS),E=Math.min(b,x),b=Math.max(b,x),_=Math.max(_,d.endDTS)}d.duration=b-v;var O=v-d.start;d.appendedPTS=b,d.start=d.startPTS=v,d.maxStartPTS=g,d.startDTS=y,d.endPTS=b,d.minEndPTS=E,d.endDTS=_;var D=d.sn;if(!t||D<t.startSN||D>t.endSN)return 0;var I,F=D-t.startSN,z=t.fragments;for(z[F]=d,I=F;I>0;I--)h(z[I],z[I-1]);for(I=F;I<z.length-1;I++)h(z[I],z[I+1]);return t.fragmentHint&&h(z[z.length-1],t.fragmentHint),t.PTSKnown=t.alignedSliding=!0,O}function f(t,d){for(var v=null,b=t.fragments,y=b.length-1;y>=0;y--){var _=b[y].initSegment;if(_){v=_;break}}t.fragmentHint&&delete t.fragmentHint.endPTS;var m=0,g;if(a(t,d,function(I,F){I.relurl&&(m=I.cc-F.cc),Object(w.isFiniteNumber)(I.startPTS)&&Object(w.isFiniteNumber)(I.endPTS)&&(F.start=F.startPTS=I.startPTS,F.startDTS=I.startDTS,F.appendedPTS=I.appendedPTS,F.maxStartPTS=I.maxStartPTS,F.endPTS=I.endPTS,F.endDTS=I.endDTS,F.minEndPTS=I.minEndPTS,F.duration=I.endPTS-I.startPTS,F.duration&&(g=F),d.PTSKnown=d.alignedSliding=!0),F.elementaryStreams=I.elementaryStreams,F.loader=I.loader,F.stats=I.stats,F.urlId=I.urlId,I.initSegment&&(F.initSegment=I.initSegment,v=I.initSegment)}),v){var E=d.fragmentHint?d.fragments.concat(d.fragmentHint):d.fragments;E.forEach(function(I){var F;(!I.initSegment||I.initSegment.relurl===((F=v)===null||F===void 0?void 0:F.relurl))&&(I.initSegment=v)})}if(d.skippedSegments&&(d.deltaUpdateFailed=d.fragments.some(function(I){return!I}),d.deltaUpdateFailed)){P.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var o=d.skippedSegments;o--;)d.fragments.shift();d.startSN=d.fragments[0].sn,d.startCC=d.fragments[0].cc}var x=d.fragments;if(m){P.logger.warn("discontinuity sliding from playlist, take drift into account");for(var A=0;A<x.length;A++)x[A].cc+=m}d.skippedSegments&&(d.startCC=d.fragments[0].cc),l(t.partList,d.partList,function(I,F){F.elementaryStreams=I.elementaryStreams,F.stats=I.stats}),g?p(d,g,g.startPTS,g.endPTS,g.startDTS,g.endDTS):c(t,d),x.length&&(d.totalduration=d.edge-x[0].start),d.driftStartTime=t.driftStartTime,d.driftStart=t.driftStart;var O=d.advancedDateTime;if(d.advanced&&O){var D=d.edge;d.driftStart||(d.driftStartTime=O,d.driftStart=D),d.driftEndTime=O,d.driftEnd=D}else d.driftEndTime=t.driftEndTime,d.driftEnd=t.driftEnd,d.advancedDateTime=t.advancedDateTime}function l(t,d,v){if(t&&d)for(var b=0,y=0,_=t.length;y<=_;y++){var m=t[y],g=d[y+b];m&&g&&m.index===g.index&&m.fragment.sn===g.fragment.sn?v(m,g):b--}}function a(t,d,v){for(var b=d.skippedSegments,y=Math.max(t.startSN,d.startSN)-d.startSN,_=(t.fragmentHint?1:0)+(b?d.endSN:Math.min(t.endSN,d.endSN))-d.startSN,m=d.startSN-t.startSN,g=d.fragmentHint?d.fragments.concat(d.fragmentHint):d.fragments,E=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,o=y;o<=_;o++){var x=E[m+o],A=g[o];b&&!A&&o<b&&(A=d.fragments[o]=x),x&&A&&v(x,A)}}function c(t,d){var v=d.startSN+d.skippedSegments-t.startSN,b=t.fragments;if(v<0||v>=b.length)return;s(d,b[v].start)}function s(t,d){if(d){for(var v=t.fragments,b=t.skippedSegments;b<v.length;b++)v[b].start+=d;t.fragmentHint&&(t.fragmentHint.start+=d)}}function u(t,d){var v=1e3*t.levelTargetDuration,b=v/2,y=t.age,_=y>0&&y<v*3,m=d.loading.end-d.loading.start,g,E=t.availabilityDelay;if(t.updated===!1)if(_){var o=333*t.misses;g=Math.max(Math.min(b,m*2),o),t.availabilityDelay=(t.availabilityDelay||0)+g}else g=b;else _?(E=Math.min(E||v/2,y),t.availabilityDelay=E,g=E+v-y):g=v-m;return Math.round(g)}function i(t,d,v){if(!t||!t.details)return null;var b=t.details,y=b.fragments[d-b.startSN];return y||(y=b.fragmentHint,y&&y.sn===d?y:d<b.startSN&&v&&v.sn===d?v:null)}function n(t,d,v){if(!t||!t.details)return null;var b=t.details.partList;if(b)for(var y=b.length;y--;){var _=b[y];if(_.index===v&&_.fragment.sn===d)return _}return null}},"./src/controller/stream-controller.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"default",function(){return b});var w=U("./src/polyfills/number.ts"),P=U("./src/controller/base-stream-controller.ts"),S=U("./src/is-supported.ts"),C=U("./src/events.ts"),T=U("./src/utils/buffer-helper.ts"),h=U("./src/controller/fragment-tracker.ts"),p=U("./src/types/loader.ts"),f=U("./src/loader/fragment.ts"),l=U("./src/demux/transmuxer-interface.ts"),a=U("./src/types/transmuxer.ts"),c=U("./src/controller/gap-controller.ts"),s=U("./src/errors.ts"),u=U("./src/utils/logger.ts");function i(y,_){for(var m=0;m<_.length;m++){var g=_[m];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(y,g.key,g)}}function n(y,_,m){return _&&i(y.prototype,_),m&&i(y,m),y}function t(y,_){y.prototype=Object.create(_.prototype),y.prototype.constructor=y,d(y,_)}function d(y,_){return d=Object.setPrototypeOf||function(g,E){return g.__proto__=E,g},d(y,_)}var v=100,b=function(y){t(_,y);function _(g,E){var o;return o=y.call(this,g,E,"[stream-controller]")||this,o.audioCodecSwap=!1,o.gapController=null,o.level=-1,o._forceStartLoad=!1,o.altAudio=!1,o.audioOnly=!1,o.fragPlaying=null,o.onvplaying=null,o.onvseeked=null,o.fragLastKbps=0,o.stalled=!1,o.couldBacktrack=!1,o.audioCodecSwitch=!1,o.videoBuffer=null,o._registerListeners(),o}var m=_.prototype;return m._registerListeners=function(){var E=this.hls;E.on(C.Events.MEDIA_ATTACHED,this.onMediaAttached,this),E.on(C.Events.MEDIA_DETACHING,this.onMediaDetaching,this),E.on(C.Events.MANIFEST_LOADING,this.onManifestLoading,this),E.on(C.Events.MANIFEST_PARSED,this.onManifestParsed,this),E.on(C.Events.LEVEL_LOADING,this.onLevelLoading,this),E.on(C.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.on(C.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),E.on(C.Events.ERROR,this.onError,this),E.on(C.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),E.on(C.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),E.on(C.Events.BUFFER_CREATED,this.onBufferCreated,this),E.on(C.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),E.on(C.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),E.on(C.Events.FRAG_BUFFERED,this.onFragBuffered,this)},m._unregisterListeners=function(){var E=this.hls;E.off(C.Events.MEDIA_ATTACHED,this.onMediaAttached,this),E.off(C.Events.MEDIA_DETACHING,this.onMediaDetaching,this),E.off(C.Events.MANIFEST_LOADING,this.onManifestLoading,this),E.off(C.Events.MANIFEST_PARSED,this.onManifestParsed,this),E.off(C.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.off(C.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),E.off(C.Events.ERROR,this.onError,this),E.off(C.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),E.off(C.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),E.off(C.Events.BUFFER_CREATED,this.onBufferCreated,this),E.off(C.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),E.off(C.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),E.off(C.Events.FRAG_BUFFERED,this.onFragBuffered,this)},m.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},m.startLoad=function(E){if(this.levels){var o=this.lastCurrentTime,x=this.hls;if(this.stopLoad(),this.setInterval(v),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var A=x.startLevel;A===-1&&(x.config.testBandwidth?(A=0,this.bitrateTest=!0):A=x.nextAutoLevel),this.level=x.nextLoadLevel=A,this.loadedmetadata=!1}o>0&&E===-1&&(this.log("Override startPosition with lastCurrentTime @"+o.toFixed(3)),E=o),this.state=P.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=E,this.tick()}else this._forceStartLoad=!0,this.state=P.State.STOPPED},m.stopLoad=function(){this._forceStartLoad=!1,y.prototype.stopLoad.call(this)},m.doTick=function(){switch(this.state){case P.State.IDLE:this.doTickIdle();break;case P.State.WAITING_LEVEL:{var E,o=this.levels,x=this.level,A=o==null||((E=o[x])===null||E===void 0)?void 0:E.details;if(A&&(!A.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(A))break;this.state=P.State.IDLE;break}break}case P.State.FRAG_LOADING_WAITING_RETRY:{var O,D=self.performance.now(),I=this.retryDate;(!I||D>=I||(O=this.media)!==null&&O!==void 0&&O.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=P.State.IDLE)}break;default:break}this.onTickEnd()},m.onTickEnd=function(){y.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},m.doTickIdle=function(){var E,o,x=this.hls,A=this.levelLastLoaded,O=this.levels,D=this.media,I=x.config,F=x.nextLoadLevel;if(A===null||!D&&(this.startFragRequested||!I.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!O||!O[F])return;var z=O[F];this.level=x.nextLoadLevel=F;var ne=z.details;if(!ne||this.state===P.State.WAITING_LEVEL||ne.live&&this.levelLastLoaded!==F){this.state=P.State.WAITING_LEVEL;return}var j=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:D,p.PlaylistLevelType.MAIN);if(j===null)return;var G=j.len,X=this.getMaxBufferLength(z.maxBitrate);if(G>=X)return;if(this._streamEnded(j,ne)){var Z={};this.altAudio&&(Z.type="video"),this.hls.trigger(C.Events.BUFFER_EOS,Z),this.state=P.State.ENDED;return}var K=j.end,q=this.getNextFragment(K,ne);if(this.couldBacktrack&&!this.fragPrevious&&q&&q.sn!=="initSegment"){var ie=q.sn-ne.startSN;ie>1&&(q=ne.fragments[ie-1],this.fragmentTracker.removeFragment(q))}if(q&&this.fragmentTracker.getState(q)===h.FragmentState.OK&&this.nextLoadPosition>K){var oe=this.audioOnly&&!this.altAudio?f.ElementaryStreamTypes.AUDIO:f.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(D,oe,p.PlaylistLevelType.MAIN),q=this.getNextFragment(this.nextLoadPosition,ne)}if(!q)return;q.initSegment&&!q.initSegment.data&&!this.bitrateTest&&(q=q.initSegment),((E=q.decryptdata)===null||E===void 0?void 0:E.keyFormat)==="identity"&&!((o=q.decryptdata)!==null&&o!==void 0&&o.key)?this.loadKey(q,ne):this.loadFragment(q,ne,K)},m.loadFragment=function(E,o,x){var A,O=this.fragmentTracker.getState(E);if(this.fragCurrent=E,O===h.FragmentState.BACKTRACKED){var D=this.fragmentTracker.getBacktrackData(E);if(D){this._handleFragmentLoadProgress(D),this._handleFragmentLoadComplete(D);return}else O=h.FragmentState.NOT_LOADED}O===h.FragmentState.NOT_LOADED||O===h.FragmentState.PARTIAL?E.sn==="initSegment"?this._loadInitSegment(E):this.bitrateTest?(E.bitrateTest=!0,this.log("Fragment "+E.sn+" of level "+E.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(E)):(this.startFragRequested=!0,y.prototype.loadFragment.call(this,E,o,x)):O===h.FragmentState.APPENDING?this.reduceMaxBufferLength(E.duration)&&this.fragmentTracker.removeFragment(E):((A=this.media)===null||A===void 0?void 0:A.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},m.getAppendedFrag=function(E){var o=this.fragmentTracker.getAppendedFrag(E,p.PlaylistLevelType.MAIN);return o&&"fragment"in o?o.fragment:o},m.getBufferedFrag=function(E){return this.fragmentTracker.getBufferedFrag(E,p.PlaylistLevelType.MAIN)},m.followingBufferedFrag=function(E){return E?this.getBufferedFrag(E.end+.5):null},m.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},m.nextLevelSwitch=function(){var E=this.levels,o=this.media;if(o!=null&&o.readyState){var x,A=this.getAppendedFrag(o.currentTime);if(A&&A.start>1&&this.flushMainBuffer(0,A.start-1),!o.paused&&E){var O=this.hls.nextLoadLevel,D=E[O],I=this.fragLastKbps;I&&this.fragCurrent?x=this.fragCurrent.duration*D.maxBitrate/(1e3*I)+1:x=0}else x=0;var F=this.getBufferedFrag(o.currentTime+x);if(F){var z=this.followingBufferedFrag(F);if(z){this.abortCurrentFrag();var ne=z.maxStartPTS?z.maxStartPTS:z.start,j=z.duration,G=Math.max(F.end,ne+Math.min(Math.max(j-this.config.maxFragLookUpTolerance,j*.5),j*.75));this.flushMainBuffer(G,Number.POSITIVE_INFINITY)}}}},m.abortCurrentFrag=function(){var E=this.fragCurrent;this.fragCurrent=null,E!=null&&E.loader&&E.loader.abort(),this.state===P.State.KEY_LOADING&&(this.state=P.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},m.flushMainBuffer=function(E,o){y.prototype.flushMainBuffer.call(this,E,o,this.altAudio?"video":null)},m.onMediaAttached=function(E,o){y.prototype.onMediaAttached.call(this,E,o);var x=o.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),x.addEventListener("playing",this.onvplaying),x.addEventListener("seeked",this.onvseeked),this.gapController=new c.default(this.config,x,this.fragmentTracker,this.hls)},m.onMediaDetaching=function(){var E=this.media;E&&(E.removeEventListener("playing",this.onvplaying),E.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),y.prototype.onMediaDetaching.call(this)},m.onMediaPlaying=function(){this.tick()},m.onMediaSeeked=function(){var E=this.media,o=E?E.currentTime:null;Object(w.isFiniteNumber)(o)&&this.log("Media seeked to "+o.toFixed(3)),this.tick()},m.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},m.onManifestParsed=function(E,o){var x=!1,A=!1,O;o.levels.forEach(function(D){O=D.audioCodec,O&&(O.indexOf("mp4a.40.2")!==-1&&(x=!0),O.indexOf("mp4a.40.5")!==-1&&(A=!0))}),this.audioCodecSwitch=x&&A&&!Object(S.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=o.levels,this.startFragRequested=!1},m.onLevelLoading=function(E,o){var x=this.levels;if(!x||this.state!==P.State.IDLE)return;var A=x[o.level];(!A.details||A.details.live&&this.levelLastLoaded!==o.level||this.waitForCdnTuneIn(A.details))&&(this.state=P.State.WAITING_LEVEL)},m.onLevelLoaded=function(E,o){var x,A=this.levels,O=o.level,D=o.details,I=D.totalduration;if(!A){this.warn("Levels were reset while loading level "+O);return}this.log("Level "+O+" loaded ["+D.startSN+","+D.endSN+"], cc ["+D.startCC+", "+D.endCC+"] duration:"+I);var F=this.fragCurrent;F&&(this.state===P.State.FRAG_LOADING||this.state===P.State.FRAG_LOADING_WAITING_RETRY)&&(F.level!==o.level&&F.loader&&(this.state=P.State.IDLE,F.loader.abort()));var z=A[O],ne=0;if(D.live||(x=z.details)!==null&&x!==void 0&&x.live){if(D.fragments[0]||(D.deltaUpdateFailed=!0),D.deltaUpdateFailed)return;ne=this.alignPlaylists(D,z.details)}if(z.details=D,this.levelLastLoaded=O,this.hls.trigger(C.Events.LEVEL_UPDATED,{details:D,level:O}),this.state===P.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(D))return;this.state=P.State.IDLE}this.startFragRequested?D.live&&this.synchronizeToLiveEdge(D):this.setStartPosition(D,ne),this.tick()},m._handleFragmentLoadProgress=function(E){var o,x=E.frag,A=E.part,O=E.payload,D=this.levels;if(!D){this.warn("Levels were reset while fragment load was in progress. Fragment "+x.sn+" of level "+x.level+" will not be buffered");return}var I=D[x.level],F=I.details;if(!F){this.warn("Dropping fragment "+x.sn+" of level "+x.level+" after level details were reset");return}var z=I.videoCodec,ne=F.PTSKnown||!F.live,j=(o=x.initSegment)===null||o===void 0?void 0:o.data,G=this._getAudioCodec(I),X=this.transmuxer=this.transmuxer||new l.default(this.hls,p.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),Z=A?A.index:-1,K=Z!==-1,q=new a.ChunkMetadata(x.level,x.sn,x.stats.chunkCount,O.byteLength,Z,K),ie=this.initPTS[x.cc];X.push(O,j,G,z,x,A,F.totalduration,ne,q,ie)},m.onAudioTrackSwitching=function(E,o){var x=this.altAudio,A=!!o.url,O=o.id;if(!A){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var D=this.fragCurrent;D!=null&&D.loader&&(this.log("Switching to main audio track, cancel main fragment load"),D.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var I=this.hls;x&&I.trigger(C.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),I.trigger(C.Events.AUDIO_TRACK_SWITCHED,{id:O})}},m.onAudioTrackSwitched=function(E,o){var x=o.id,A=!!this.hls.audioTracks[x].url;if(A){var O=this.videoBuffer;O&&this.mediaBuffer!==O&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=O)}this.altAudio=A,this.tick()},m.onBufferCreated=function(E,o){var x=o.tracks,A,O,D=!1;for(var I in x){var F=x[I];if(F.id==="main"){if(O=I,A=F,I==="video"){var z=x[I];z&&(this.videoBuffer=z.buffer)}}else D=!0}D&&A?(this.log("Alternate track found, use "+O+".buffered to schedule main fragment loading"),this.mediaBuffer=A.buffer):this.mediaBuffer=this.media},m.onFragBuffered=function(E,o){var x=o.frag,A=o.part;if(x&&x.type!==p.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(x)){this.warn("Fragment "+x.sn+(A?" p: "+A.index:"")+" of level "+x.level+" finished buffering, but was aborted. state: "+this.state),this.state===P.State.PARSED&&(this.state=P.State.IDLE);return}var O=A?A.stats:x.stats;this.fragLastKbps=Math.round(8*O.total/(O.buffering.end-O.loading.first)),x.sn!=="initSegment"&&(this.fragPrevious=x),this.fragBufferedComplete(x,A)},m.onError=function(E,o){switch(o.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(p.PlaylistLevelType.MAIN,o);break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==P.State.ERROR&&(o.fatal?(this.warn(""+o.details),this.state=P.State.ERROR):!o.levelRetry&&this.state===P.State.WAITING_LEVEL&&(this.state=P.State.IDLE));break;case s.ErrorDetails.BUFFER_FULL_ERROR:if(o.parent==="main"&&(this.state===P.State.PARSING||this.state===P.State.PARSED)){var x=!0,A=this.getFwdBufferInfo(this.media,p.PlaylistLevelType.MAIN);A&&A.len>.5&&(x=!this.reduceMaxBufferLength(A.len)),x&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},m.checkBuffer=function(){var E=this.media,o=this.gapController;if(!E||!o||!E.readyState)return;var x=T.BufferHelper.getBuffered(E);!this.loadedmetadata&&x.length?(this.loadedmetadata=!0,this.seekToStartPos()):o.poll(this.lastCurrentTime),this.lastCurrentTime=E.currentTime},m.onFragLoadEmergencyAborted=function(){this.state=P.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},m.onBufferFlushed=function(E,o){var x=o.type;if(x!==f.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var A=(x===f.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(A,x,p.PlaylistLevelType.MAIN)}},m.onLevelsUpdated=function(E,o){this.levels=o.levels},m.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},m.seekToStartPos=function(){var E=this.media,o=E.currentTime,x=this.startPosition;if(x>=0&&o<x){if(E.seeking){u.logger.log("could not seek to "+x+", already seeking at "+o);return}var A=T.BufferHelper.getBuffered(E),O=A.length?A.start(0):0,D=O-x;D>0&&(D<this.config.maxBufferHole||D<this.config.maxFragLookUpTolerance)&&(u.logger.log("adjusting start position by "+D+" to match buffer start"),x+=D,this.startPosition=x),this.log("seek to target start position "+x+" from current time "+o),E.currentTime=x}},m._getAudioCodec=function(E){var o=this.config.defaultAudioCodec||E.audioCodec;return this.audioCodecSwap&&o&&(this.log("Swapping audio codec"),o.indexOf("mp4a.40.5")!==-1?o="mp4a.40.2":o="mp4a.40.5"),o},m._loadBitrateTestFrag=function(E){var o=this;this._doFragLoad(E).then(function(x){var A=o.hls;if(!x||A.nextLoadLevel||o.fragContextChanged(E))return;o.fragLoadError=0,o.state=P.State.IDLE,o.startFragRequested=!1,o.bitrateTest=!1;var O=E.stats;O.parsing.start=O.parsing.end=O.buffering.start=O.buffering.end=self.performance.now(),A.trigger(C.Events.FRAG_LOADED,x)})},m._handleTransmuxComplete=function(E){var o,x="main",A=this.hls,O=E.remuxResult,D=E.chunkMeta,I=this.getCurrentContext(D);if(!I){this.warn("The loading context changed while buffering fragment "+D.sn+" of level "+D.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(D.level);return}var F=I.frag,z=I.part,ne=I.level,j=O.video,G=O.text,X=O.id3,Z=O.initSegment,K=this.altAudio?void 0:O.audio;if(this.fragContextChanged(F))return;if(this.state=P.State.PARSING,Z){Z.tracks&&(this._bufferInitSegment(ne,Z.tracks,F,D),A.trigger(C.Events.FRAG_PARSING_INIT_SEGMENT,{frag:F,id:x,tracks:Z.tracks}));var q=Z.initPTS,ie=Z.timescale;Object(w.isFiniteNumber)(q)&&(this.initPTS[F.cc]=q,A.trigger(C.Events.INIT_PTS_FOUND,{frag:F,id:x,initPTS:q,timescale:ie}))}if(j&&O.independent!==!1){if(ne.details){var oe=j.startPTS,ye=j.endPTS,pe=j.startDTS,we=j.endDTS;if(z)z.elementaryStreams[j.type]={startPTS:oe,endPTS:ye,startDTS:pe,endDTS:we};else if(j.firstKeyFrame&&j.independent&&(this.couldBacktrack=!0),j.dropped&&j.independent){var fe=this.getLoadPosition()+this.config.maxBufferHole;if(fe<oe){this.backtrack(F);return}F.setElementaryStreamInfo(j.type,F.start,ye,F.start,we,!0)}F.setElementaryStreamInfo(j.type,oe,ye,pe,we),this.bufferFragmentData(j,F,z,D)}}else if(O.independent===!1){this.backtrack(F);return}if(K){var Te=K.startPTS,Fe=K.endPTS,De=K.startDTS,Me=K.endDTS;z&&(z.elementaryStreams[f.ElementaryStreamTypes.AUDIO]={startPTS:Te,endPTS:Fe,startDTS:De,endDTS:Me}),F.setElementaryStreamInfo(f.ElementaryStreamTypes.AUDIO,Te,Fe,De,Me),this.bufferFragmentData(K,F,z,D)}if(X!=null&&(o=X.samples)!==null&&o!==void 0&&o.length){var Ue={frag:F,id:x,samples:X.samples};A.trigger(C.Events.FRAG_PARSING_METADATA,Ue)}if(G){var ve={frag:F,id:x,samples:G.samples};A.trigger(C.Events.FRAG_PARSING_USERDATA,ve)}},m._bufferInitSegment=function(E,o,x,A){var O=this;if(this.state!==P.State.PARSING)return;this.audioOnly=!!o.audio&&!o.video,this.altAudio&&!this.audioOnly&&delete o.audio;var D=o.audio,I=o.video,F=o.audiovideo;if(D){var z=E.audioCodec,ne=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(z&&(z.indexOf("mp4a.40.5")!==-1?z="mp4a.40.2":z="mp4a.40.5"),D.metadata.channelCount!==1&&ne.indexOf("firefox")===-1&&(z="mp4a.40.5")),ne.indexOf("android")!==-1&&D.container!=="audio/mpeg"&&(z="mp4a.40.2",this.log("Android: force audio codec to "+z)),E.audioCodec&&E.audioCodec!==z&&this.log('Swapping manifest audio codec "'+E.audioCodec+'" for "'+z+'"'),D.levelCodec=z,D.id="main",this.log("Init audio buffer, container:"+D.container+", codecs[selected/level/parsed]=["+(z||"")+"/"+(E.audioCodec||"")+"/"+D.codec+"]")}I&&(I.levelCodec=E.videoCodec,I.id="main",this.log("Init video buffer, container:"+I.container+", codecs[level/parsed]=["+(E.videoCodec||"")+"/"+I.codec+"]")),F&&this.log("Init audiovideo buffer, container:"+F.container+", codecs[level/parsed]=["+(E.attrs.CODECS||"")+"/"+F.codec+"]"),this.hls.trigger(C.Events.BUFFER_CODECS,o),Object.keys(o).forEach(function(j){var G=o[j],X=G.initSegment;X!=null&&X.byteLength&&O.hls.trigger(C.Events.BUFFER_APPENDING,{type:j,data:X,frag:x,part:null,chunkMeta:A,parent:x.type})}),this.tick()},m.backtrack=function(E){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(E);var o=this.fragmentTracker.backtrack(E);this.fragPrevious=null,this.nextLoadPosition=E.start,o?this.resetFragmentLoading(E):this.state=P.State.BACKTRACKING},m.checkFragmentChanged=function(){var E=this.media,o=null;if(E&&E.readyState>1&&E.seeking===!1){var x=E.currentTime;if(T.BufferHelper.isBuffered(E,x)?o=this.getAppendedFrag(x):T.BufferHelper.isBuffered(E,x+.1)&&(o=this.getAppendedFrag(x+.1)),o){var A=this.fragPlaying,O=o.level;(!A||o.sn!==A.sn||A.level!==O||o.urlId!==A.urlId)&&(this.hls.trigger(C.Events.FRAG_CHANGED,{frag:o}),(!A||A.level!==O)&&this.hls.trigger(C.Events.LEVEL_SWITCHED,{level:O}),this.fragPlaying=o)}}},n(_,[{key:"nextLevel",get:function(){var E=this.nextBufferedFrag;return E?E.level:-1}},{key:"currentLevel",get:function(){var E=this.media;if(E){var o=this.getAppendedFrag(E.currentTime);if(o)return o.level}return-1}},{key:"nextBufferedFrag",get:function(){var E=this.media;if(E){var o=this.getAppendedFrag(E.currentTime);return this.followingBufferedFrag(o)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),_}(P.default)},"./src/controller/subtitle-stream-controller.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"SubtitleStreamController",function(){return t});var w=U("./src/events.ts"),P=U("./src/utils/logger.ts"),S=U("./src/utils/buffer-helper.ts"),C=U("./src/controller/fragment-finders.ts"),T=U("./src/utils/discontinuities.ts"),h=U("./src/controller/level-helper.ts"),p=U("./src/controller/fragment-tracker.ts"),f=U("./src/controller/base-stream-controller.ts"),l=U("./src/types/loader.ts"),a=U("./src/types/level.ts");function c(d,v){for(var b=0;b<v.length;b++){var y=v[b];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(d,y.key,y)}}function s(d,v,b){return v&&c(d.prototype,v),b&&c(d,b),d}function u(d,v){d.prototype=Object.create(v.prototype),d.prototype.constructor=d,i(d,v)}function i(d,v){return i=Object.setPrototypeOf||function(y,_){return y.__proto__=_,y},i(d,v)}var n=500,t=function(d){u(v,d);function v(y,_){var m;return m=d.call(this,y,_,"[subtitle-stream-controller]")||this,m.levels=[],m.currentTrackId=-1,m.tracksBuffered=[],m.mainDetails=null,m._registerListeners(),m}var b=v.prototype;return b.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},b._registerListeners=function(){var _=this.hls;_.on(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),_.on(w.Events.MEDIA_DETACHING,this.onMediaDetaching,this),_.on(w.Events.MANIFEST_LOADING,this.onManifestLoading,this),_.on(w.Events.LEVEL_LOADED,this.onLevelLoaded,this),_.on(w.Events.ERROR,this.onError,this),_.on(w.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),_.on(w.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),_.on(w.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),_.on(w.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),_.on(w.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},b._unregisterListeners=function(){var _=this.hls;_.off(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),_.off(w.Events.MEDIA_DETACHING,this.onMediaDetaching,this),_.off(w.Events.MANIFEST_LOADING,this.onManifestLoading,this),_.off(w.Events.LEVEL_LOADED,this.onLevelLoaded,this),_.off(w.Events.ERROR,this.onError,this),_.off(w.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),_.off(w.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),_.off(w.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),_.off(w.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),_.off(w.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},b.startLoad=function(){this.stopLoad(),this.state=f.State.IDLE,this.setInterval(n),this.tick()},b.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},b.onLevelLoaded=function(_,m){this.mainDetails=m.details},b.onSubtitleFragProcessed=function(_,m){var g=m.frag,E=m.success;if(this.fragPrevious=g,this.state=f.State.IDLE,!E)return;var o=this.tracksBuffered[this.currentTrackId];if(!o)return;for(var x,A=g.start,O=0;O<o.length;O++)if(A>=o[O].start&&A<=o[O].end){x=o[O];break}var D=g.start+g.duration;x?x.end=D:(x={start:A,end:D},o.push(x)),this.fragmentTracker.fragBuffered(g)},b.onBufferFlushing=function(_,m){var g=m.startOffset,E=m.endOffset;if(g===0&&E!==Number.POSITIVE_INFINITY){var o=this.currentTrackId,x=this.levels;if(!x.length||!x[o]||!x[o].details)return;var A=x[o].details,O=A.targetduration,D=E-O;if(D<=0)return;m.endOffsetSubtitles=Math.max(0,D),this.tracksBuffered.forEach(function(I){for(var F=0;F<I.length;){if(I[F].end<=D){I.shift();continue}else if(I[F].start<D)I[F].start=D;else break;F++}}),this.fragmentTracker.removeFragmentsInRange(g,D,l.PlaylistLevelType.SUBTITLE)}},b.onError=function(_,m){var g,E=m.frag;if(!E||E.type!==l.PlaylistLevelType.SUBTITLE)return;(g=this.fragCurrent)!==null&&g!==void 0&&g.loader&&this.fragCurrent.loader.abort(),this.state=f.State.IDLE},b.onSubtitleTracksUpdated=function(_,m){var g=this,E=m.subtitleTracks;this.tracksBuffered=[],this.levels=E.map(function(o){return new a.Level(o)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(o){g.tracksBuffered[o.id]=[]}),this.mediaBuffer=null},b.onSubtitleTrackSwitch=function(_,m){if(this.currentTrackId=m.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var g=this.levels[this.currentTrackId];g!=null&&g.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,g&&this.setInterval(n)},b.onSubtitleTrackLoaded=function(_,m){var g,E=m.details,o=m.id,x=this.currentTrackId,A=this.levels;if(!A.length)return;var O=A[x];if(o>=A.length||o!==x||!O)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,E.live||(g=O.details)!==null&&g!==void 0&&g.live){var D=this.mainDetails;if(E.deltaUpdateFailed||!D)return;var I=D.fragments[0];if(!O.details)E.hasProgramDateTime&&D.hasProgramDateTime?Object(T.alignMediaPlaylistByPDT)(E,D):I&&Object(h.addSliding)(E,I.start);else{var F=this.alignPlaylists(E,O.details);F===0&&I&&Object(h.addSliding)(E,I.start)}}if(O.details=E,this.levelLastLoaded=o,this.tick(),E.live&&!this.fragCurrent&&this.media&&this.state===f.State.IDLE){var z=Object(C.findFragmentByPTS)(null,E.fragments,this.media.currentTime,0);z||(this.warn("Subtitle playlist not aligned with playback"),O.details=void 0)}},b._handleFragmentLoadComplete=function(_){var m=_.frag,g=_.payload,E=m.decryptdata,o=this.hls;if(this.fragContextChanged(m))return;if(g&&g.byteLength>0&&E&&E.key&&E.iv&&E.method==="AES-128"){var x=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(g),E.key.buffer,E.iv.buffer).then(function(A){var O=performance.now();o.trigger(w.Events.FRAG_DECRYPTED,{frag:m,payload:A,stats:{tstart:x,tdecrypt:O}})})}},b.doTick=function(){if(!this.media){this.state=f.State.IDLE;return}if(this.state===f.State.IDLE){var _,m=this.currentTrackId,g=this.levels;if(!g.length||!g[m]||!g[m].details)return;var E=g[m].details,o=E.targetduration,x=this.config,A=this.media,O=S.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,A.currentTime-o,x.maxBufferHole),D=O.end,I=O.len,F=this.getMaxBufferLength()+o;if(I>F)return;console.assert(E,"Subtitle track details are defined on idle subtitle stream controller tick");var z=E.fragments,ne=z.length,j=E.edge,G,X=this.fragPrevious;if(D<j){var Z=x.maxFragLookUpTolerance;X&&E.hasProgramDateTime&&(G=Object(C.findFragmentByPDT)(z,X.endProgramDateTime,Z)),G||(G=Object(C.findFragmentByPTS)(X,z,D,Z),!G&&X&&X.start<z[0].start&&(G=z[0]))}else G=z[ne-1];(_=G)!==null&&_!==void 0&&_.encrypted?(P.logger.log("Loading key for "+G.sn),this.state=f.State.KEY_LOADING,this.hls.trigger(w.Events.KEY_LOADING,{frag:G})):G&&this.fragmentTracker.getState(G)===p.FragmentState.NOT_LOADED&&this.loadFragment(G,E,D)}},b.loadFragment=function(_,m,g){this.fragCurrent=_,d.prototype.loadFragment.call(this,_,m,g)},s(v,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),v}(f.default)},"./src/controller/subtitle-track-controller.ts":function(ae,Q,U){"use strict";U.r(Q);var w=U("./src/events.ts"),P=U("./src/utils/texttrack-utils.ts"),S=U("./src/controller/base-playlist-controller.ts"),C=U("./src/types/loader.ts");function T(c,s){for(var u=0;u<s.length;u++){var i=s[u];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,i.key,i)}}function h(c,s,u){return s&&T(c.prototype,s),u&&T(c,u),c}function p(c,s){c.prototype=Object.create(s.prototype),c.prototype.constructor=c,f(c,s)}function f(c,s){return f=Object.setPrototypeOf||function(i,n){return i.__proto__=n,i},f(c,s)}var l=function(c){p(s,c);function s(i){var n;return n=c.call(this,i,"[subtitle-track-controller]")||this,n.media=null,n.tracks=[],n.groupId=null,n.tracksInGroup=[],n.trackId=-1,n.selectDefaultTrack=!0,n.queuedDefaultTrack=-1,n.trackChangeListener=function(){return n.onTextTracksChanged()},n.asyncPollTrackChange=function(){return n.pollTrackChange(0)},n.useTextTrackPolling=!1,n.subtitlePollingInterval=-1,n.subtitleDisplay=!0,n.registerListeners(),n}var u=s.prototype;return u.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,c.prototype.destroy.call(this)},u.registerListeners=function(){var n=this.hls;n.on(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.on(w.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(w.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(w.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(w.Events.LEVEL_LOADING,this.onLevelLoading,this),n.on(w.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),n.on(w.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),n.on(w.Events.ERROR,this.onError,this)},u.unregisterListeners=function(){var n=this.hls;n.off(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.off(w.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(w.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(w.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(w.Events.LEVEL_LOADING,this.onLevelLoading,this),n.off(w.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),n.off(w.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),n.off(w.Events.ERROR,this.onError,this)},u.onMediaAttached=function(n,t){if(this.media=t.media,!this.media)return;this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange)},u.pollTrackChange=function(n){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,n)},u.onMediaDetaching=function(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var n=a(this.media.textTracks);n.forEach(function(t){Object(P.clearCurrentCues)(t)}),this.subtitleTrack=-1,this.media=null},u.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},u.onManifestParsed=function(n,t){this.tracks=t.subtitleTracks},u.onSubtitleTrackLoaded=function(n,t){var d=t.id,v=t.details,b=this.trackId,y=this.tracksInGroup[b];if(!y){this.warn("Invalid subtitle track id "+d);return}var _=y.details;y.details=t.details,this.log("subtitle track "+d+" loaded ["+v.startSN+"-"+v.endSN+"]"),d===this.trackId&&(this.retryCount=0,this.playlistLoaded(d,t,_))},u.onLevelLoading=function(n,t){this.switchLevel(t.level)},u.onLevelSwitching=function(n,t){this.switchLevel(t.level)},u.switchLevel=function(n){var t=this.hls.levels[n];if(!(t!=null&&t.textGroupIds))return;var d=t.textGroupIds[t.urlId];if(this.groupId!==d){var v=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,b=this.tracks.filter(function(m){return!d||m.groupId===d});this.tracksInGroup=b;var y=this.findTrackId(v==null?void 0:v.name)||this.findTrackId();this.groupId=d;var _={subtitleTracks:b};this.log("Updating subtitle tracks, "+b.length+' track(s) found in "'+d+'" group-id'),this.hls.trigger(w.Events.SUBTITLE_TRACKS_UPDATED,_),y!==-1&&this.setSubtitleTrack(y,v)}},u.findTrackId=function(n){for(var t=this.tracksInGroup,d=0;d<t.length;d++){var v=t[d];if((!this.selectDefaultTrack||v.default)&&(!n||n===v.name))return v.id}return-1},u.onError=function(n,t){if(c.prototype.onError.call(this,n,t),t.fatal||!t.context)return;t.context.type===C.PlaylistContextType.SUBTITLE_TRACK&&t.context.id===this.trackId&&t.context.groupId===this.groupId&&this.retryLoadingOrFail(t)},u.loadPlaylist=function(n){var t=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(t)){var d=t.id,v=t.groupId,b=t.url;if(n)try{b=n.addDirectives(b)}catch(y){this.warn("Could not construct new URL with HLS Delivery Directives: "+y)}this.log("Loading subtitle playlist for id "+d),this.hls.trigger(w.Events.SUBTITLE_TRACK_LOADING,{url:b,id:d,groupId:v,deliveryDirectives:n||null})}},u.toggleTrackModes=function(n){var t=this,d=this.media,v=this.subtitleDisplay,b=this.trackId;if(!d)return;var y=a(d.textTracks),_=y.filter(function(E){return E.groupId===t.groupId});if(n===-1)[].slice.call(y).forEach(function(E){E.mode="disabled"});else{var m=_[b];m&&(m.mode="disabled")}var g=_[n];g&&(g.mode=v?"showing":"hidden")},u.setSubtitleTrack=function(n,t){var d,v=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=n;return}if(this.trackId!==n&&this.toggleTrackModes(n),this.trackId===n&&(n===-1||(d=v[n])!==null&&d!==void 0&&d.details)||n<-1||n>=v.length)return;this.clearTimer();var b=v[n];if(this.log("Switching to subtitle track "+n),this.trackId=n,b){var y=b.id,_=b.groupId,m=_===void 0?"":_,g=b.name,E=b.type,o=b.url;this.hls.trigger(w.Events.SUBTITLE_TRACK_SWITCH,{id:y,groupId:m,name:g,type:E,url:o});var x=this.switchParams(b.url,t==null?void 0:t.details);this.loadPlaylist(x)}else this.hls.trigger(w.Events.SUBTITLE_TRACK_SWITCH,{id:n})},u.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var n=-1,t=a(this.media.textTracks),d=0;d<t.length;d++)if(t[d].mode==="hidden")n=d;else if(t[d].mode==="showing"){n=d;break}this.subtitleTrack!==n&&(this.subtitleTrack=n)},h(s,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(n){this.selectDefaultTrack=!1;var t=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(n,t)}}]),s}(S.default);function a(c){for(var s=[],u=0;u<c.length;u++){var i=c[u];i.kind==="subtitles"&&i.label&&s.push(c[u])}return s}Q.default=l},"./src/controller/timeline-controller.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"TimelineController",function(){return a});var w=U("./src/polyfills/number.ts"),P=U("./src/events.ts"),S=U("./src/utils/cea-608-parser.ts"),C=U("./src/utils/output-filter.ts"),T=U("./src/utils/webvtt-parser.ts"),h=U("./src/utils/texttrack-utils.ts"),p=U("./src/utils/imsc1-ttml-parser.ts"),f=U("./src/types/loader.ts"),l=U("./src/utils/logger.ts"),a=function(){function i(t){if(this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.timescale=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=u(),this.captionsProperties=void 0,this.hls=t,this.config=t.config,this.Cues=t.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},this.config.enableCEA708Captions){var d=new C.default(this,"textTrack1"),v=new C.default(this,"textTrack2"),b=new C.default(this,"textTrack3"),y=new C.default(this,"textTrack4");this.cea608Parser1=new S.default(1,d,v),this.cea608Parser2=new S.default(3,b,y)}t.on(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.on(P.Events.MANIFEST_LOADED,this.onManifestLoaded,this),t.on(P.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.on(P.Events.FRAG_LOADING,this.onFragLoading,this),t.on(P.Events.FRAG_LOADED,this.onFragLoaded,this),t.on(P.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),t.on(P.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),t.on(P.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),t.on(P.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),t.on(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var n=i.prototype;return n.destroy=function(){var d=this.hls;d.off(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),d.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),d.off(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),d.off(P.Events.MANIFEST_LOADED,this.onManifestLoaded,this),d.off(P.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),d.off(P.Events.FRAG_LOADING,this.onFragLoading,this),d.off(P.Events.FRAG_LOADED,this.onFragLoaded,this),d.off(P.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),d.off(P.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),d.off(P.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),d.off(P.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),d.off(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},n.addCues=function(d,v,b,y,_){for(var m=!1,g=_.length;g--;){var E=_[g],o=s(E[0],E[1],v,b);if(o>=0&&(E[0]=Math.min(E[0],v),E[1]=Math.max(E[1],b),m=!0,o/(b-v)>.5))return}if(m||_.push([v,b]),this.config.renderTextTracksNatively){var x=this.captionsTracks[d];this.Cues.newCue(x,v,b,y)}else{var A=this.Cues.newCue(null,v,b,y);this.hls.trigger(P.Events.CUES_PARSED,{type:"captions",cues:A,track:d})}},n.onInitPtsFound=function(d,v){var b=this,y=v.frag,_=v.id,m=v.initPTS,g=v.timescale,E=this.unparsedVttFrags;_==="main"&&(this.initPTS[y.cc]=m,this.timescale[y.cc]=g),E.length&&(this.unparsedVttFrags=[],E.forEach(function(o){b.onFragLoaded(P.Events.FRAG_LOADED,o)}))},n.getExistingTrack=function(d){var v=this.media;if(v)for(var b=0;b<v.textTracks.length;b++){var y=v.textTracks[b];if(y[d])return y}return null},n.createCaptionsTrack=function(d){this.config.renderTextTracksNatively?this.createNativeTrack(d):this.createNonNativeTrack(d)},n.createNativeTrack=function(d){if(this.captionsTracks[d])return;var v=this.captionsProperties,b=this.captionsTracks,y=this.media,_=v[d],m=_.label,g=_.languageCode,E=this.getExistingTrack(d);if(E)b[d]=E,Object(h.clearCurrentCues)(b[d]),Object(h.sendAddTrackEvent)(b[d],y);else{var o=this.createTextTrack("captions",m,g);o&&(o[d]=!0,b[d]=o)}},n.createNonNativeTrack=function(d){if(this.nonNativeCaptionsTracks[d])return;var v=this.captionsProperties[d];if(!v)return;var b=v.label,y={_id:d,label:b,kind:"captions",default:v.media?!!v.media.default:!1,closedCaptions:v.media};this.nonNativeCaptionsTracks[d]=y,this.hls.trigger(P.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[y]})},n.createTextTrack=function(d,v,b){var y=this.media;return y?y.addTextTrack(d,v,b):void 0},n.onMediaAttaching=function(d,v){this.media=v.media,this._cleanTracks()},n.onMediaDetaching=function(){var d=this.captionsTracks;Object.keys(d).forEach(function(v){Object(h.clearCurrentCues)(d[v]),delete d[v]}),this.nonNativeCaptionsTracks={}},n.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=u(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},n._cleanTracks=function(){var d=this.media;if(!d)return;var v=d.textTracks;if(v)for(var b=0;b<v.length;b++)Object(h.clearCurrentCues)(v[b])},n.onSubtitleTracksUpdated=function(d,v){var b=this;this.textTracks=[];var y=v.subtitleTracks||[],_=y.some(function(o){return o.textCodec===p.IMSC1_CODEC});if(this.config.enableWebVTT||_&&this.config.enableIMSC1){var m=this.tracks&&y&&this.tracks.length===y.length;if(this.tracks=y||[],this.config.renderTextTracksNatively){var g=this.media?this.media.textTracks:[];this.tracks.forEach(function(o,x){var A;if(x<g.length){for(var O=null,D=0;D<g.length;D++)if(c(g[D],o)){O=g[D];break}O&&(A=O)}A?Object(h.clearCurrentCues)(A):(A=b.createTextTrack("subtitles",o.name,o.lang),A&&(A.mode="disabled")),A&&(A.groupId=o.groupId,b.textTracks.push(A))})}else if(!m&&this.tracks&&this.tracks.length){var E=this.tracks.map(function(o){return{label:o.name,kind:o.type.toLowerCase(),default:o.default,subtitleTrack:o}});this.hls.trigger(P.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:E})}}},n.onManifestLoaded=function(d,v){var b=this;this.config.enableCEA708Captions&&v.captions&&v.captions.forEach(function(y){var _=/(?:CC|SERVICE)([1-4])/.exec(y.instreamId);if(!_)return;var m="textTrack"+_[1],g=b.captionsProperties[m];if(!g)return;g.label=y.name,y.lang&&(g.languageCode=y.lang),g.media=y})},n.onFragLoading=function(d,v){var b=this.cea608Parser1,y=this.cea608Parser2,_=this.lastSn,m=this.lastPartIndex;if(!this.enabled||!(b&&y))return;if(v.frag.type===f.PlaylistLevelType.MAIN){var g,E,o=v.frag.sn,x=(g=v==null||((E=v.part)===null||E===void 0)?void 0:E.index)!=null?g:-1;o===_+1||o===_&&x===m+1||(b.reset(),y.reset()),this.lastSn=o,this.lastPartIndex=x}},n.onFragLoaded=function(d,v){var b=v.frag,y=v.payload,_=this.initPTS,m=this.unparsedVttFrags;if(b.type===f.PlaylistLevelType.SUBTITLE)if(y.byteLength){if(!Object(w.isFiniteNumber)(_[b.cc])){m.push(v),_.length&&this.hls.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:b,error:new Error("Missing initial subtitle PTS")});return}var g=b.decryptdata;if(g==null||g.key==null||g.method!=="AES-128"){var E=this.tracks[b.level],o=this.vttCCs;o[b.cc]||(o[b.cc]={start:b.start,prevCC:this.prevCC,new:!0},this.prevCC=b.cc),E&&E.textCodec===p.IMSC1_CODEC?this._parseIMSC1(b,y):this._parseVTTs(b,y,o)}}else this.hls.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:b,error:new Error("Empty subtitle payload")})},n._parseIMSC1=function(d,v){var b=this,y=this.hls;Object(p.parseIMSC1)(v,this.initPTS[d.cc],this.timescale[d.cc],function(_){b._appendCues(_,d.level),y.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:d})},function(_){l.logger.log("Failed to parse IMSC1: "+_),y.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:d,error:_})})},n._parseVTTs=function(d,v,b){var y=this,_=this.hls;Object(T.parseWebVTT)(v,this.initPTS[d.cc],this.timescale[d.cc],b,d.cc,d.start,function(m){y._appendCues(m,d.level),_.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:d})},function(m){y._fallbackToIMSC1(d,v),l.logger.log("Failed to parse VTT cue: "+m),_.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:d,error:m})})},n._fallbackToIMSC1=function(d,v){var b=this,y=this.tracks[d.level];y.textCodec||Object(p.parseIMSC1)(v,this.initPTS[d.cc],this.timescale[d.cc],function(){y.textCodec=p.IMSC1_CODEC,b._parseIMSC1(d,v)},function(){y.textCodec="wvtt"})},n._appendCues=function(d,v){var b=this.hls;if(this.config.renderTextTracksNatively){var y=this.textTracks[v];if(y.mode==="disabled")return;d.forEach(function(g){return Object(h.addCueToTrack)(y,g)})}else{var _=this.tracks[v],m=_.default?"default":"subtitles"+v;b.trigger(P.Events.CUES_PARSED,{type:"subtitles",cues:d,track:m})}},n.onFragDecrypted=function(d,v){var b=v.frag;if(b.type===f.PlaylistLevelType.SUBTITLE){if(!Object(w.isFiniteNumber)(this.initPTS[b.cc])){this.unparsedVttFrags.push(v);return}this.onFragLoaded(P.Events.FRAG_LOADED,v)}},n.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},n.onFragParsingUserdata=function(d,v){var b=this.cea608Parser1,y=this.cea608Parser2;if(!this.enabled||!(b&&y))return;for(var _=0;_<v.samples.length;_++){var m=v.samples[_].bytes;if(m){var g=this.extractCea608Data(m);b.addData(v.samples[_].pts,g[0]),y.addData(v.samples[_].pts,g[1])}}},n.onBufferFlushing=function(d,v){var b=v.startOffset,y=v.endOffset,_=v.endOffsetSubtitles,m=v.type,g=this.media;if(!g||g.currentTime<y)return;if(!m||m==="video"){var E=this.captionsTracks;Object.keys(E).forEach(function(x){return Object(h.removeCuesInRange)(E[x],b,y)})}if(this.config.renderTextTracksNatively&&(b===0&&_!==void 0)){var o=this.textTracks;Object.keys(o).forEach(function(x){return Object(h.removeCuesInRange)(o[x],b,_)})}},n.extractCea608Data=function(d){for(var v=d[0]&31,b=2,y=[[],[]],_=0;_<v;_++){var m=d[b++],g=127&d[b++],E=127&d[b++],o=(4&m)!==0,x=3&m;if(g===0&&E===0)continue;o&&((x===0||x===1)&&(y[x].push(g),y[x].push(E)))}return y},i}();function c(i,n){return i&&i.label===n.name&&!(i.textTrack1||i.textTrack2)}function s(i,n,t,d){return Math.min(n,d)-Math.max(i,t)}function u(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"default",function(){return w});var w=function(){function P(C,T){this.subtle=void 0,this.aesIV=void 0,this.subtle=C,this.aesIV=T}var S=P.prototype;return S.decrypt=function(T,h){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},h,T)},P}()},"./src/crypt/aes-decryptor.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"removePadding",function(){return P}),U.d(Q,"default",function(){return S});var w=U("./src/utils/typed-array.ts");function P(C){var T=C.byteLength,h=T&&new DataView(C.buffer).getUint8(T-1);return h?Object(w.sliceUint8)(C,0,T-h):C}var S=function(){function C(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var T=C.prototype;return T.uint8ArrayToUint32Array_=function(p){for(var f=new DataView(p),l=new Uint32Array(4),a=0;a<4;a++)l[a]=f.getUint32(a*4);return l},T.initTable=function(){var p=this.sBox,f=this.invSBox,l=this.subMix,a=l[0],c=l[1],s=l[2],u=l[3],i=this.invSubMix,n=i[0],t=i[1],d=i[2],v=i[3],b=new Uint32Array(256),y=0,_=0,m=0;for(m=0;m<256;m++)m<128?b[m]=m<<1:b[m]=m<<1^283;for(m=0;m<256;m++){var g=_^_<<1^_<<2^_<<3^_<<4;g=g>>>8^g&255^99,p[y]=g,f[g]=y;var E=b[y],o=b[E],x=b[o],A=b[g]*257^g*16843008;a[y]=A<<24|A>>>8,c[y]=A<<16|A>>>16,s[y]=A<<8|A>>>24,u[y]=A,A=x*16843009^o*65537^E*257^y*16843008,n[g]=A<<24|A>>>8,t[g]=A<<16|A>>>16,d[g]=A<<8|A>>>24,v[g]=A,y?(y=E^b[b[b[x^E]]],_^=b[b[_]]):y=_=1}},T.expandKey=function(p){for(var f=this.uint8ArrayToUint32Array_(p),l=!0,a=0;a<f.length&&l;)l=f[a]===this.key[a],a++;if(l)return;this.key=f;var c=this.keySize=f.length;if(c!==4&&c!==6&&c!==8)throw new Error("Invalid aes key size="+c);var s=this.ksRows=(c+6+1)*4,u,i,n=this.keySchedule=new Uint32Array(s),t=this.invKeySchedule=new Uint32Array(s),d=this.sBox,v=this.rcon,b=this.invSubMix,y=b[0],_=b[1],m=b[2],g=b[3],E,o;for(u=0;u<s;u++){if(u<c){E=n[u]=f[u];continue}o=E,u%c===0?(o=o<<8|o>>>24,o=d[o>>>24]<<24|d[o>>>16&255]<<16|d[o>>>8&255]<<8|d[o&255],o^=v[u/c|0]<<24):c>6&&u%c===4&&(o=d[o>>>24]<<24|d[o>>>16&255]<<16|d[o>>>8&255]<<8|d[o&255]),n[u]=E=(n[u-c]^o)>>>0}for(i=0;i<s;i++)u=s-i,i&3?o=n[u]:o=n[u-4],i<4||u<=4?t[i]=o:t[i]=y[d[o>>>24]]^_[d[o>>>16&255]]^m[d[o>>>8&255]]^g[d[o&255]],t[i]=t[i]>>>0},T.networkToHostOrderSwap=function(p){return p<<24|(p&65280)<<8|(p&16711680)>>8|p>>>24},T.decrypt=function(p,f,l){for(var a=this.keySize+6,c=this.invKeySchedule,s=this.invSBox,u=this.invSubMix,i=u[0],n=u[1],t=u[2],d=u[3],v=this.uint8ArrayToUint32Array_(l),b=v[0],y=v[1],_=v[2],m=v[3],g=new Int32Array(p),E=new Int32Array(g.length),o,x,A,O,D,I,F,z,ne,j,G,X,Z,K,q=this.networkToHostOrderSwap;f<g.length;){for(ne=q(g[f]),j=q(g[f+1]),G=q(g[f+2]),X=q(g[f+3]),D=ne^c[0],I=X^c[1],F=G^c[2],z=j^c[3],Z=4,K=1;K<a;K++)o=i[D>>>24]^n[I>>16&255]^t[F>>8&255]^d[z&255]^c[Z],x=i[I>>>24]^n[F>>16&255]^t[z>>8&255]^d[D&255]^c[Z+1],A=i[F>>>24]^n[z>>16&255]^t[D>>8&255]^d[I&255]^c[Z+2],O=i[z>>>24]^n[D>>16&255]^t[I>>8&255]^d[F&255]^c[Z+3],D=o,I=x,F=A,z=O,Z=Z+4;o=s[D>>>24]<<24^s[I>>16&255]<<16^s[F>>8&255]<<8^s[z&255]^c[Z],x=s[I>>>24]<<24^s[F>>16&255]<<16^s[z>>8&255]<<8^s[D&255]^c[Z+1],A=s[F>>>24]<<24^s[z>>16&255]<<16^s[D>>8&255]<<8^s[I&255]^c[Z+2],O=s[z>>>24]<<24^s[D>>16&255]<<16^s[I>>8&255]<<8^s[F&255]^c[Z+3],E[f]=q(o^b),E[f+1]=q(O^y),E[f+2]=q(A^_),E[f+3]=q(x^m),b=ne,y=j,_=G,m=X,f=f+4}return E.buffer},C}()},"./src/crypt/decrypter.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"default",function(){return f});var w=U("./src/crypt/aes-crypto.ts"),P=U("./src/crypt/fast-aes-key.ts"),S=U("./src/crypt/aes-decryptor.ts"),C=U("./src/utils/logger.ts"),T=U("./src/utils/mp4-tools.ts"),h=U("./src/utils/typed-array.ts"),p=16,f=function(){function l(c,s,u){var i=u===void 0?{}:u,n=i.removePKCS7Padding,t=n===void 0?!0:n;if(this.logEnabled=!0,this.observer=void 0,this.config=void 0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.observer=c,this.config=s,this.removePKCS7Padding=t,t)try{var d=self.crypto;d&&(this.subtle=d.subtle||d.webkitSubtle)}catch(v){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var a=l.prototype;return a.destroy=function(){this.observer=null},a.isSync=function(){return this.config.enableSoftwareAES},a.flush=function(){var s=this.currentResult;if(!s){this.reset();return}var u=new Uint8Array(s);return this.reset(),this.removePKCS7Padding?Object(S.removePadding)(u):u},a.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},a.decrypt=function(s,u,i,n){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(s),u,i);var t=this.flush();t&&n(t.buffer)}else this.webCryptoDecrypt(new Uint8Array(s),u,i).then(n)},a.softwareDecrypt=function(s,u,i){var n=this.currentIV,t=this.currentResult,d=this.remainderData;this.logOnce("JS AES decrypt"),d&&(s=Object(T.appendUint8Array)(d,s),this.remainderData=null);var v=this.getValidChunk(s);if(!v.length)return null;n&&(i=n);var b=this.softwareDecrypter;b||(b=this.softwareDecrypter=new S.default),b.expandKey(u);var y=t;return this.currentResult=b.decrypt(v.buffer,0,i),this.currentIV=Object(h.sliceUint8)(v,-16).buffer,y||null},a.webCryptoDecrypt=function(s,u,i){var n=this,t=this.subtle;return(this.key!==u||!this.fastAesKey)&&(this.key=u,this.fastAesKey=new P.default(t,u)),this.fastAesKey.expandKey().then(function(d){if(!t)return Promise.reject(new Error("web crypto not initialized"));var v=new w.default(t,i);return v.decrypt(s.buffer,d)}).catch(function(d){return n.onWebCryptoError(d,s,u,i)})},a.onWebCryptoError=function(s,u,i,n){return C.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",s),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(u,i,n)},a.getValidChunk=function(s){var u=s,i=s.length-s.length%p;return i!==s.length&&(u=Object(h.sliceUint8)(s,0,i),this.remainderData=Object(h.sliceUint8)(s,i)),u},a.logOnce=function(s){if(!this.logEnabled)return;C.logger.log("[decrypter.ts]: "+s),this.logEnabled=!1},l}()},"./src/crypt/fast-aes-key.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"default",function(){return w});var w=function(){function P(C,T){this.subtle=void 0,this.key=void 0,this.subtle=C,this.key=T}var S=P.prototype;return S.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},P}()},"./src/demux/aacdemuxer.ts":function(ae,Q,U){"use strict";U.r(Q);var w=U("./src/demux/base-audio-demuxer.ts"),P=U("./src/demux/adts.ts"),S=U("./src/utils/logger.ts"),C=U("./src/demux/id3.ts");function T(f,l){f.prototype=Object.create(l.prototype),f.prototype.constructor=f,h(f,l)}function h(f,l){return h=Object.setPrototypeOf||function(c,s){return c.__proto__=s,c},h(f,l)}var p=function(f){T(l,f);function l(c,s){var u;return u=f.call(this)||this,u.observer=void 0,u.config=void 0,u.observer=c,u.config=s,u}var a=l.prototype;return a.resetInitSegment=function(s,u,i){f.prototype.resetInitSegment.call(this,s,u,i),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:s,duration:i,inputTimeScale:9e4,dropped:0}},l.probe=function(s){if(!s)return!1;for(var u=C.getID3Data(s,0)||[],i=u.length,n=s.length;i<n;i++)if(P.probe(s,i))return S.logger.log("ADTS sync word found !"),!0;return!1},a.canParse=function(s,u){return P.canParse(s,u)},a.appendFrame=function(s,u,i){P.initTrackConfig(s,this.observer,u,i,s.manifestCodec);var n=P.appendFrame(s,u,i,this.initPTS,this.frameIndex);if(n&&n.missing===0)return n},l}(w.default);p.minProbeByteLength=9,Q.default=p},"./src/demux/adts.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"getAudioConfig",function(){return C}),U.d(Q,"isHeaderPattern",function(){return T}),U.d(Q,"getHeaderLength",function(){return h}),U.d(Q,"getFullFrameLength",function(){return p}),U.d(Q,"canGetFrameLength",function(){return f}),U.d(Q,"isHeader",function(){return l}),U.d(Q,"canParse",function(){return a}),U.d(Q,"probe",function(){return c}),U.d(Q,"initTrackConfig",function(){return s}),U.d(Q,"getFrameDuration",function(){return u}),U.d(Q,"parseFrameHeader",function(){return i}),U.d(Q,"appendFrame",function(){return n});var w=U("./src/utils/logger.ts"),P=U("./src/errors.ts"),S=U("./src/events.ts");function C(t,d,v,b){var y,_,m,g,E=navigator.userAgent.toLowerCase(),o=b,x=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];y=((d[v+2]&192)>>>6)+1;var A=(d[v+2]&60)>>>2;if(A>x.length-1){t.trigger(S.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+A});return}return m=(d[v+2]&1)<<2,m|=(d[v+3]&192)>>>6,w.logger.log("manifest codec:"+b+", ADTS type:"+y+", samplingIndex:"+A),/firefox/i.test(E)?A>=6?(y=5,g=new Array(4),_=A-3):(y=2,g=new Array(2),_=A):E.indexOf("android")!==-1?(y=2,g=new Array(2),_=A):(y=5,g=new Array(4),b&&(b.indexOf("mp4a.40.29")!==-1||b.indexOf("mp4a.40.5")!==-1)||!b&&A>=6?_=A-3:((b&&b.indexOf("mp4a.40.2")!==-1&&(A>=6&&m===1||/vivaldi/i.test(E))||!b&&m===1)&&(y=2,g=new Array(2)),_=A)),g[0]=y<<3,g[0]|=(A&14)>>1,g[1]|=(A&1)<<7,g[1]|=m<<3,y===5&&(g[1]|=(_&14)>>1,g[2]=(_&1)<<7,g[2]|=2<<2,g[3]=0),{config:g,samplerate:x[A],channelCount:m,codec:"mp4a.40."+y,manifestCodec:o}}function T(t,d){return t[d]===255&&(t[d+1]&246)===240}function h(t,d){return t[d+1]&1?7:9}function p(t,d){return(t[d+3]&3)<<11|t[d+4]<<3|(t[d+5]&224)>>>5}function f(t,d){return d+5<t.length}function l(t,d){return d+1<t.length&&T(t,d)}function a(t,d){return f(t,d)&&T(t,d)&&p(t,d)<=t.length-d}function c(t,d){if(l(t,d)){var v=h(t,d);if(d+v>=t.length)return!1;var b=p(t,d);if(b<=v)return!1;var y=d+b;return y===t.length||l(t,y)}return!1}function s(t,d,v,b,y){if(!t.samplerate){var _=C(d,v,b,y);if(!_)return;t.config=_.config,t.samplerate=_.samplerate,t.channelCount=_.channelCount,t.codec=_.codec,t.manifestCodec=_.manifestCodec,w.logger.log("parsed codec:"+t.codec+", rate:"+_.samplerate+", channels:"+_.channelCount)}}function u(t){return 1024*9e4/t}function i(t,d,v,b,y){var _=h(t,d),m=p(t,d);if(m-=_,m>0){var g=v+b*y;return{headerLength:_,frameLength:m,stamp:g}}}function n(t,d,v,b,y){var _=u(t.samplerate),m=i(d,v,b,y,_);if(m){var g=m.frameLength,E=m.headerLength,o=m.stamp,x=E+g,A=Math.max(0,v+x-d.length),O;A?(O=new Uint8Array(x-E),O.set(d.subarray(v+E,d.length),0)):O=d.subarray(v+E,v+x);var D={unit:O,pts:o};return A||t.samples.push(D),{sample:D,length:x,missing:A}}}},"./src/demux/base-audio-demuxer.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"initPTSFn",function(){return p});var w=U("./src/polyfills/number.ts"),P=U("./src/demux/id3.ts"),S=U("./src/demux/dummy-demuxed-track.ts"),C=U("./src/utils/mp4-tools.ts"),T=U("./src/utils/typed-array.ts"),h=function(){function f(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var l=f.prototype;return l.resetInitSegment=function(c,s,u){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},l.resetTimeStamp=function(){},l.resetContiguity=function(){},l.canParse=function(c,s){return!1},l.appendFrame=function(c,s,u){},l.demux=function(c,s){this.cachedData&&(c=Object(C.appendUint8Array)(this.cachedData,c),this.cachedData=null);var u=P.getID3Data(c,0),i=u?u.length:0,n,t,d=this._audioTrack,v=this._id3Track,b=u?P.getTimeStamp(u):void 0,y=c.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=p(b,s)),u&&u.length>0&&v.samples.push({pts:this.initPTS,dts:this.initPTS,data:u}),t=this.initPTS;i<y;){if(this.canParse(c,i)){var _=this.appendFrame(d,c,i);_?(this.frameIndex++,t=_.sample.pts,i+=_.length,n=i):i=y}else P.canParse(c,i)?(u=P.getID3Data(c,i),v.samples.push({pts:t,dts:t,data:u}),i+=u.length,n=i):i++;if(i===y&&n!==y){var m=Object(T.sliceUint8)(c,n);this.cachedData?this.cachedData=Object(C.appendUint8Array)(this.cachedData,m):this.cachedData=m}}return{audioTrack:d,avcTrack:Object(S.dummyTrack)(),id3Track:v,textTrack:Object(S.dummyTrack)()}},l.demuxSampleAes=function(c,s,u){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},l.flush=function(c){var s=this.cachedData;return s&&(this.cachedData=null,this.demux(s,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(S.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(S.dummyTrack)()}},l.destroy=function(){},f}(),p=function(l,a){return Object(w.isFiniteNumber)(l)?l*90:a*9e4};Q.default=h},"./src/demux/chunk-cache.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"default",function(){return w});var w=function(){function S(){this.chunks=[],this.dataLength=0}var C=S.prototype;return C.push=function(h){this.chunks.push(h),this.dataLength+=h.length},C.flush=function(){var h=this.chunks,p=this.dataLength,f;if(h.length)h.length===1?f=h[0]:f=P(h,p);else return new Uint8Array(0);return this.reset(),f},C.reset=function(){this.chunks.length=0,this.dataLength=0},S}();function P(S,C){for(var T=new Uint8Array(C),h=0,p=0;p<S.length;p++){var f=S[p];T.set(f,h),h+=f.length}return T}},"./src/demux/dummy-demuxed-track.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"dummyTrack",function(){return w});function w(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(ae,Q,U){"use strict";U.r(Q);var w=U("./src/utils/logger.ts"),P=function(){function S(T){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=T,this.bytesAvailable=T.byteLength,this.word=0,this.bitsAvailable=0}var C=S.prototype;return C.loadWord=function(){var h=this.data,p=this.bytesAvailable,f=h.byteLength-p,l=new Uint8Array(4),a=Math.min(4,p);if(a===0)throw new Error("no bytes available");l.set(h.subarray(f,f+a)),this.word=new DataView(l.buffer).getUint32(0),this.bitsAvailable=a*8,this.bytesAvailable-=a},C.skipBits=function(h){var p;this.bitsAvailable>h?(this.word<<=h,this.bitsAvailable-=h):(h-=this.bitsAvailable,p=h>>3,h-=p>>3,this.bytesAvailable-=p,this.loadWord(),this.word<<=h,this.bitsAvailable-=h)},C.readBits=function(h){var p=Math.min(this.bitsAvailable,h),f=this.word>>>32-p;return h>32&&w.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=p,this.bitsAvailable>0?this.word<<=p:this.bytesAvailable>0&&this.loadWord(),p=h-p,p>0&&this.bitsAvailable?f<<p|this.readBits(p):f},C.skipLZ=function(){var h;for(h=0;h<this.bitsAvailable;++h)if((this.word&2147483648>>>h)!==0)return this.word<<=h,this.bitsAvailable-=h,h;return this.loadWord(),h+this.skipLZ()},C.skipUEG=function(){this.skipBits(1+this.skipLZ())},C.skipEG=function(){this.skipBits(1+this.skipLZ())},C.readUEG=function(){var h=this.skipLZ();return this.readBits(h+1)-1},C.readEG=function(){var h=this.readUEG();return 1&h?1+h>>>1:-1*(h>>>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(h){for(var p=8,f=8,l,a=0;a<h;a++)f!==0&&(l=this.readEG(),f=(p+l+256)%256),p=f===0?p:f},C.readSPS=function(){var h=0,p=0,f=0,l=0,a,c,s,u=this.readUByte.bind(this),i=this.readBits.bind(this),n=this.readUEG.bind(this),t=this.readBoolean.bind(this),d=this.skipBits.bind(this),v=this.skipEG.bind(this),b=this.skipUEG.bind(this),y=this.skipScalingList.bind(this);u();var _=u();if(i(5),d(3),u(),b(),_===100||_===110||_===122||_===244||_===44||_===83||_===86||_===118||_===128){var m=n();if(m===3&&d(1),b(),b(),d(1),t())for(c=m!==3?8:12,s=0;s<c;s++)t()&&(s<6?y(16):y(64))}b();var g=n();if(g===0)n();else if(g===1)for(d(1),v(),v(),a=n(),s=0;s<a;s++)v();b(),d(1);var E=n(),o=n(),x=i(1);x===0&&d(1),d(1),t()&&(h=n(),p=n(),f=n(),l=n());var A=[1,1];if(t()&&t()){var O=u();switch(O){case 1:A=[1,1];break;case 2:A=[12,11];break;case 3:A=[10,11];break;case 4:A=[16,11];break;case 5:A=[40,33];break;case 6:A=[24,11];break;case 7:A=[20,11];break;case 8:A=[32,11];break;case 9:A=[80,33];break;case 10:A=[18,11];break;case 11:A=[15,11];break;case 12:A=[64,33];break;case 13:A=[160,99];break;case 14:A=[4,3];break;case 15:A=[3,2];break;case 16:A=[2,1];break;case 255:{A=[u()<<8|u(),u()<<8|u()];break}}}return{width:Math.ceil((E+1)*16-h*2-p*2),height:(2-x)*(o+1)*16-(x?2:4)*(f+l),pixelRatio:A}},C.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},S}();Q.default=P},"./src/demux/id3.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"isHeader",function(){return w}),U.d(Q,"isFooter",function(){return P}),U.d(Q,"getID3Data",function(){return S}),U.d(Q,"canParse",function(){return T}),U.d(Q,"getTimeStamp",function(){return h}),U.d(Q,"isTimeStampFrame",function(){return p}),U.d(Q,"getID3Frames",function(){return l}),U.d(Q,"decodeFrame",function(){return a}),U.d(Q,"utf8ArrayToStr",function(){return n}),U.d(Q,"testables",function(){return t});var w=function(y,_){return _+10<=y.length&&(y[_]===73&&y[_+1]===68&&y[_+2]===51&&(y[_+3]<255&&y[_+4]<255&&(y[_+6]<128&&y[_+7]<128&&y[_+8]<128&&y[_+9]<128)))},P=function(y,_){return _+10<=y.length&&(y[_]===51&&y[_+1]===68&&y[_+2]===73&&(y[_+3]<255&&y[_+4]<255&&(y[_+6]<128&&y[_+7]<128&&y[_+8]<128&&y[_+9]<128)))},S=function(y,_){for(var m=_,g=0;w(y,_);){g+=10;var E=C(y,_+6);g+=E,P(y,_+10)&&(g+=10),_+=g}return g>0?y.subarray(m,m+g):void 0},C=function(y,_){var m=0;return m=(y[_]&127)<<21,m|=(y[_+1]&127)<<14,m|=(y[_+2]&127)<<7,m|=y[_+3]&127,m},T=function(y,_){return w(y,_)&&C(y,_+6)+10<=y.length-_},h=function(y){for(var _=l(y),m=0;m<_.length;m++){var g=_[m];if(p(g))return i(g)}return},p=function(y){return y&&y.key==="PRIV"&&y.info==="com.apple.streaming.transportStreamTimestamp"},f=function(y){var _=String.fromCharCode(y[0],y[1],y[2],y[3]),m=C(y,4),g=10;return{type:_,size:m,data:y.subarray(g,g+m)}},l=function(y){for(var _=0,m=[];w(y,_);){var g=C(y,_+6);_+=10;for(var E=_+g;_+8<E;){var o=f(y.subarray(_)),x=a(o);x&&m.push(x),_+=o.size+10}P(y,_)&&(_+=10)}return m},a=function(y){return y.type==="PRIV"?c(y):y.type[0]==="W"?u(y):s(y)},c=function(y){if(y.size<2)return;var _=n(y.data,!0),m=new Uint8Array(y.data.subarray(_.length+1));return{key:y.type,info:_,data:m.buffer}},s=function(y){if(y.size<2)return;if(y.type==="TXXX"){var _=1,m=n(y.data.subarray(_),!0);_+=m.length+1;var g=n(y.data.subarray(_));return{key:y.type,info:m,data:g}}var E=n(y.data.subarray(1));return{key:y.type,data:E}},u=function(y){if(y.type==="WXXX"){if(y.size<2)return;var _=1,m=n(y.data.subarray(_),!0);_+=m.length+1;var g=n(y.data.subarray(_));return{key:y.type,info:m,data:g}}var E=n(y.data);return{key:y.type,data:E}},i=function(y){if(y.data.byteLength===8){var _=new Uint8Array(y.data),m=_[3]&1,g=(_[4]<<23)+(_[5]<<15)+(_[6]<<7)+_[7];return g/=45,m&&(g+=4772185884e-2),Math.round(g)}return},n=function(y,_){_===void 0&&(_=!1);var m=v();if(m){var g=m.decode(y);if(_){var E=g.indexOf("\0");return E!==-1?g.substring(0,E):g}return g.replace(/\0/g,"")}for(var o=y.length,x,A,O,D="",I=0;I<o;){if(x=y[I++],x===0&&_)return D;if(x===0||x===3)continue;switch(x>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:D+=String.fromCharCode(x);break;case 12:case 13:A=y[I++],D+=String.fromCharCode((x&31)<<6|A&63);break;case 14:A=y[I++],O=y[I++],D+=String.fromCharCode((x&15)<<12|(A&63)<<6|(O&63)<<0);break;default:}}return D},t={decodeTextFrame:s},d;function v(){return!d&&typeof self.TextDecoder!="undefined"&&(d=new self.TextDecoder("utf-8")),d}},"./src/demux/mp3demuxer.ts":function(ae,Q,U){"use strict";U.r(Q);var w=U("./src/demux/base-audio-demuxer.ts"),P=U("./src/demux/id3.ts"),S=U("./src/utils/logger.ts"),C=U("./src/demux/mpegaudio.ts");function T(f,l){f.prototype=Object.create(l.prototype),f.prototype.constructor=f,h(f,l)}function h(f,l){return h=Object.setPrototypeOf||function(c,s){return c.__proto__=s,c},h(f,l)}var p=function(f){T(l,f);function l(){return f.apply(this,arguments)||this}var a=l.prototype;return a.resetInitSegment=function(s,u,i){f.prototype.resetInitSegment.call(this,s,u,i),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:s,duration:i,inputTimeScale:9e4,dropped:0}},l.probe=function(s){if(!s)return!1;for(var u=P.getID3Data(s,0)||[],i=u.length,n=s.length;i<n;i++)if(C.probe(s,i))return S.logger.log("MPEG Audio sync word found !"),!0;return!1},a.canParse=function(s,u){return C.canParse(s,u)},a.appendFrame=function(s,u,i){return this.initPTS===null?void 0:C.appendFrame(s,u,i,this.initPTS,this.frameIndex)},l}(w.default);p.minProbeByteLength=4,Q.default=p},"./src/demux/mp4demuxer.ts":function(ae,Q,U){"use strict";U.r(Q);var w=U("./src/utils/mp4-tools.ts"),P=U("./src/demux/dummy-demuxed-track.ts"),S=function(){function C(h,p){this.remainderData=null,this.config=void 0,this.config=p}var T=C.prototype;return T.resetTimeStamp=function(){},T.resetInitSegment=function(){},T.resetContiguity=function(){},C.probe=function(p){return Object(w.findBox)({data:p,start:0,end:Math.min(p.length,16384)},["moof"]).length>0},T.demux=function(p){var f=p,l=Object(P.dummyTrack)();if(this.config.progressive){this.remainderData&&(f=Object(w.appendUint8Array)(this.remainderData,p));var a=Object(w.segmentValidRange)(f);this.remainderData=a.remainder,l.samples=a.valid||new Uint8Array}else l.samples=f;return{audioTrack:Object(P.dummyTrack)(),avcTrack:l,id3Track:Object(P.dummyTrack)(),textTrack:Object(P.dummyTrack)()}},T.flush=function(){var p=Object(P.dummyTrack)();return p.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(P.dummyTrack)(),avcTrack:p,id3Track:Object(P.dummyTrack)(),textTrack:Object(P.dummyTrack)()}},T.demuxSampleAes=function(p,f,l){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},T.destroy=function(){},C}();S.minProbeByteLength=1024,Q.default=S},"./src/demux/mpegaudio.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"appendFrame",function(){return h}),U.d(Q,"parseHeader",function(){return p}),U.d(Q,"isHeaderPattern",function(){return f}),U.d(Q,"isHeader",function(){return l}),U.d(Q,"canParse",function(){return a}),U.d(Q,"probe",function(){return c});var w=null,P=[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],S=[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]],T=[0,1,1,4];function h(s,u,i,n,t){if(i+24>u.length)return;var d=p(u,i);if(d&&i+d.frameLength<=u.length){var v=d.samplesPerFrame*9e4/d.sampleRate,b=n+t*v,y={unit:u.subarray(i,i+d.frameLength),pts:b,dts:b};return s.config=[],s.channelCount=d.channelCount,s.samplerate=d.sampleRate,s.samples.push(y),{sample:y,length:d.frameLength,missing:0}}}function p(s,u){var i=s[u+1]>>3&3,n=s[u+1]>>1&3,t=s[u+2]>>4&15,d=s[u+2]>>2&3;if(i!==1&&t!==0&&t!==15&&d!==3){var v=s[u+2]>>1&1,b=s[u+3]>>6,y=i===3?3-n:n===3?3:4,_=P[y*14+t-1]*1e3,m=i===3?0:i===2?1:2,g=S[m*3+d],E=b===3?1:2,o=C[i][n],x=T[n],A=o*8*x,O=Math.floor(o*_/g+v)*x;if(w===null){var D=navigator.userAgent||"",I=D.match(/Chrome\/(\d+)/i);w=I?parseInt(I[1]):0}var F=!!w&&w<=87;return F&&n===2&&_>=224e3&&b===0&&(s[u+3]=s[u+3]|128),{sampleRate:g,channelCount:E,frameLength:O,samplesPerFrame:A}}}function f(s,u){return s[u]===255&&(s[u+1]&224)===224&&(s[u+1]&6)!==0}function l(s,u){return u+1<s.length&&f(s,u)}function a(s,u){var i=4;return f(s,u)&&i<=s.length-u}function c(s,u){if(u+1<s.length&&f(s,u)){var i=4,n=p(s,u),t=i;n!=null&&n.frameLength&&(t=n.frameLength);var d=u+t;return d===s.length||l(s,d)}return!1}},"./src/demux/sample-aes.ts":function(ae,Q,U){"use strict";U.r(Q);var w=U("./src/crypt/decrypter.ts"),P=U("./src/demux/tsdemuxer.ts"),S=function(){function C(h,p,f){this.keyData=void 0,this.decrypter=void 0,this.keyData=f,this.decrypter=new w.default(h,p,{removePKCS7Padding:!1})}var T=C.prototype;return T.decryptBuffer=function(p,f){this.decrypter.decrypt(p,this.keyData.key.buffer,this.keyData.iv.buffer,f)},T.decryptAacSample=function(p,f,l,a){var c=p[f].unit,s=c.subarray(16,c.length-c.length%16),u=s.buffer.slice(s.byteOffset,s.byteOffset+s.length),i=this;this.decryptBuffer(u,function(n){var t=new Uint8Array(n);c.set(t,16),a||i.decryptAacSamples(p,f+1,l)})},T.decryptAacSamples=function(p,f,l){for(;;f++){if(f>=p.length){l();return}if(p[f].unit.length<32)continue;var a=this.decrypter.isSync();if(this.decryptAacSample(p,f,l,a),!a)return}},T.getAvcEncryptedData=function(p){for(var f=Math.floor((p.length-48)/160)*16+16,l=new Int8Array(f),a=0,c=32;c<=p.length-16;c+=160,a+=16)l.set(p.subarray(c,c+16),a);return l},T.getAvcDecryptedUnit=function(p,f){for(var l=new Uint8Array(f),a=0,c=32;c<=p.length-16;c+=160,a+=16)p.set(l.subarray(a,a+16),c);return p},T.decryptAvcSample=function(p,f,l,a,c,s){var u=Object(P.discardEPB)(c.data),i=this.getAvcEncryptedData(u),n=this;this.decryptBuffer(i.buffer,function(t){c.data=n.getAvcDecryptedUnit(u,t),s||n.decryptAvcSamples(p,f,l+1,a)})},T.decryptAvcSamples=function(p,f,l,a){if(p instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;f++,l=0){if(f>=p.length){a();return}for(var c=p[f].units;!(l>=c.length);l++){var s=c[l];if(s.data.length<=48||s.type!==1&&s.type!==5)continue;var u=this.decrypter.isSync();if(this.decryptAvcSample(p,f,l,a,s,u),!u)return}}},C}();Q.default=S},"./src/demux/transmuxer-interface.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"default",function(){return c});var w=U("./node_modules/webworkify-webpack/index.js"),P=U.n(w),S=U("./src/events.ts"),C=U("./src/demux/transmuxer.ts"),T=U("./src/utils/logger.ts"),h=U("./src/errors.ts"),p=U("./src/utils/mediasource-helper.ts"),f=U("./node_modules/eventemitter3/index.js"),l=U.n(f),a=Object(p.getMediaSource)()||{isTypeSupported:function(){return!1}},c=function(){function s(i,n,t,d){var v=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=i,this.id=n,this.onTransmuxComplete=t,this.onFlush=d;var b=i.config,y=function(o,x){x=x||{},x.frag=v.frag,x.id=v.id,i.trigger(o,x)};this.observer=new f.EventEmitter,this.observer.on(S.Events.FRAG_DECRYPTED,y),this.observer.on(S.Events.ERROR,y);var _={mp4:a.isTypeSupported("video/mp4"),mpeg:a.isTypeSupported("audio/mpeg"),mp3:a.isTypeSupported('audio/mp4; codecs="mp3"')},m=navigator.vendor;if(b.enableWorker&&typeof Worker!="undefined"){T.logger.log("demuxing in webworker");var g;try{g=this.worker=w("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),g.addEventListener("message",this.onwmsg),g.onerror=function(E){i.trigger(S.Events.ERROR,{type:h.ErrorTypes.OTHER_ERROR,details:h.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(E.message+" ("+E.filename+":"+E.lineno+")")})},g.postMessage({cmd:"init",typeSupported:_,vendor:m,id:n,config:JSON.stringify(b)})}catch(E){T.logger.warn("Error in worker:",E),T.logger.error("Error while initializing DemuxerWorker, fallback to inline"),g&&self.URL.revokeObjectURL(g.objectURL),this.transmuxer=new C.default(this.observer,_,b,m,n),this.worker=null}}else this.transmuxer=new C.default(this.observer,_,b,m,n)}var u=s.prototype;return u.destroy=function(){var n=this.worker;if(n)n.removeEventListener("message",this.onwmsg),n.terminate(),this.worker=null;else{var t=this.transmuxer;t&&(t.destroy(),this.transmuxer=null)}var d=this.observer;d&&d.removeAllListeners(),this.observer=null},u.push=function(n,t,d,v,b,y,_,m,g,E){var o=this;g.transmuxing.start=self.performance.now();var x=this.transmuxer,A=this.worker,O=y?y.start:b.start,D=b.decryptdata,I=this.frag,F=!(I&&b.cc===I.cc),z=!(I&&g.level===I.level),ne=I?g.sn-I.sn:-1,j=this.part?g.part-this.part.index:1,G=!z&&(ne===1||ne===0&&j===1),X=self.performance.now();(z||ne||b.stats.parsing.start===0)&&(b.stats.parsing.start=X),y&&(j||!G)&&(y.stats.parsing.start=X);var Z=new C.TransmuxState(F,G,m,z,O);if(!G||F){T.logger.log("[transmuxer-interface, "+b.type+"]: Starting new transmux session for sn: "+g.sn+" p: "+g.part+" level: "+g.level+" id: "+g.id+`
discontinuity: `+F+`
trackSwitch: `+z+`
contiguous: `+G+`
accurateTimeOffset: `+m+`
timeOffset: `+O);var K=new C.TransmuxConfig(d,v,t,_,E);this.configureTransmuxer(K)}if(this.frag=b,this.part=y,A)A.postMessage({cmd:"demux",data:n,decryptdata:D,chunkMeta:g,state:Z},n instanceof ArrayBuffer?[n]:[]);else if(x){var q=x.push(n,D,g,Z);Object(C.isPromise)(q)?q.then(function(ie){o.handleTransmuxComplete(ie)}):this.handleTransmuxComplete(q)}},u.flush=function(n){var t=this;n.transmuxing.start=self.performance.now();var d=this.transmuxer,v=this.worker;if(v)v.postMessage({cmd:"flush",chunkMeta:n});else if(d){var b=d.flush(n);Object(C.isPromise)(b)?b.then(function(y){t.handleFlushResult(y,n)}):this.handleFlushResult(b,n)}},u.handleFlushResult=function(n,t){var d=this;n.forEach(function(v){d.handleTransmuxComplete(v)}),this.onFlush(t)},u.onWorkerMessage=function(n){var t=n.data,d=this.hls;switch(t.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(t.data);break}case"flush":{this.onFlush(t.data);break}default:{t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,d.trigger(t.event,t.data);break}}},u.configureTransmuxer=function(n){var t=this.worker,d=this.transmuxer;t?t.postMessage({cmd:"configure",config:n}):d&&d.configure(n)},u.handleTransmuxComplete=function(n){n.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(n)},s}()},"./src/demux/transmuxer-worker.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"default",function(){return h});var w=U("./src/demux/transmuxer.ts"),P=U("./src/events.ts"),S=U("./src/utils/logger.ts"),C=U("./node_modules/eventemitter3/index.js"),T=U.n(C);function h(c){var s=new C.EventEmitter,u=function(n,t){c.postMessage({event:n,data:t})};s.on(P.Events.FRAG_DECRYPTED,u),s.on(P.Events.ERROR,u),c.addEventListener("message",function(i){var n=i.data;switch(n.cmd){case"init":{var t=JSON.parse(n.config);c.transmuxer=new w.default(s,n.typeSupported,t,n.vendor,n.id),Object(S.enableLogs)(t.debug),u("init",null);break}case"configure":{c.transmuxer.configure(n.config);break}case"demux":{var d=c.transmuxer.push(n.data,n.decryptdata,n.chunkMeta,n.state);Object(w.isPromise)(d)?d.then(function(y){p(c,y)}):p(c,d);break}case"flush":{var v=n.chunkMeta,b=c.transmuxer.flush(v);Object(w.isPromise)(b)?b.then(function(y){l(c,y,v)}):l(c,b,v);break}default:break}})}function p(c,s){if(a(s.remuxResult))return;var u=[],i=s.remuxResult,n=i.audio,t=i.video;n&&f(u,n),t&&f(u,t),c.postMessage({event:"transmuxComplete",data:s},u)}function f(c,s){s.data1&&c.push(s.data1.buffer),s.data2&&c.push(s.data2.buffer)}function l(c,s,u){s.forEach(function(i){p(c,i)}),c.postMessage({event:"flush",data:u})}function a(c){return!c.audio&&!c.video&&!c.text&&!c.id3&&!c.initSegment}},"./src/demux/transmuxer.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"default",function(){return t}),U.d(Q,"isPromise",function(){return b}),U.d(Q,"TransmuxConfig",function(){return y}),U.d(Q,"TransmuxState",function(){return _});var w=U("./src/events.ts"),P=U("./src/errors.ts"),S=U("./src/crypt/decrypter.ts"),C=U("./src/demux/aacdemuxer.ts"),T=U("./src/demux/mp4demuxer.ts"),h=U("./src/demux/tsdemuxer.ts"),p=U("./src/demux/mp3demuxer.ts"),f=U("./src/remux/mp4-remuxer.ts"),l=U("./src/remux/passthrough-remuxer.ts"),a=U("./src/demux/chunk-cache.ts"),c=U("./src/utils/mp4-tools.ts"),s=U("./src/utils/logger.ts"),u;try{u=self.performance.now.bind(self.performance)}catch(m){s.logger.debug("Unable to use Performance API on this environment"),u=self.Date.now}var i=[{demux:h.default,remux:f.default},{demux:T.default,remux:l.default},{demux:C.default,remux:f.default},{demux:p.default,remux:f.default}],n=1024;i.forEach(function(m){var g=m.demux;n=Math.max(n,g.minProbeByteLength)});var t=function(){function m(E,o,x,A,O){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new a.default,this.observer=E,this.typeSupported=o,this.config=x,this.vendor=A,this.id=O}var g=m.prototype;return g.configure=function(o){this.transmuxConfig=o,this.decrypter&&this.decrypter.reset()},g.push=function(o,x,A,O){var D=this,I=A.transmuxing;I.executeStart=u();var F=new Uint8Array(o),z=this.cache,ne=this.config,j=this.currentTransmuxState,G=this.transmuxConfig;O&&(this.currentTransmuxState=O);var X=d(F,x);if(X&&X.method==="AES-128"){var Z=this.getDecrypter();if(ne.enableSoftwareAES){var K=Z.softwareDecrypt(F,X.key.buffer,X.iv.buffer);if(!K)return I.executeEnd=u(),v(A);F=new Uint8Array(K)}else return this.decryptionPromise=Z.webCryptoDecrypt(F,X.key.buffer,X.iv.buffer).then(function(Ie){var Ne=D.push(Ie,null,A);return D.decryptionPromise=null,Ne}),this.decryptionPromise}var q=O||j,ie=q.contiguous,oe=q.discontinuity,ye=q.trackSwitch,pe=q.accurateTimeOffset,we=q.timeOffset,fe=G.audioCodec,Te=G.videoCodec,Fe=G.defaultInitPts,De=G.duration,Me=G.initSegmentData;if((oe||ye)&&this.resetInitSegment(Me,fe,Te,De),oe&&this.resetInitialTimestamp(Fe),ie||this.resetContiguity(),this.needsProbing(F,oe,ye)){if(z.dataLength){var Ue=z.flush();F=Object(c.appendUint8Array)(Ue,F)}this.configureTransmuxer(F,G)}var ve=this.transmux(F,X,we,pe,A),ce=this.currentTransmuxState;return ce.contiguous=!0,ce.discontinuity=!1,ce.trackSwitch=!1,I.executeEnd=u(),ve},g.flush=function(o){var x=this,A=o.transmuxing;A.executeStart=u();var O=this.decrypter,D=this.cache,I=this.currentTransmuxState,F=this.decryptionPromise;if(F)return F.then(function(){return x.flush(o)});var z=[],ne=I.timeOffset;if(O){var j=O.flush();j&&z.push(this.push(j,null,o))}var G=D.dataLength;D.reset();var X=this.demuxer,Z=this.remuxer;if(!X||!Z)return G>=n&&this.observer.emit(w.Events.ERROR,w.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),A.executeEnd=u(),[v(o)];var K=X.flush(ne);return b(K)?K.then(function(q){return x.flushRemux(z,q,o),z}):(this.flushRemux(z,K,o),z)},g.flushRemux=function(o,x,A){var O=x.audioTrack,D=x.avcTrack,I=x.id3Track,F=x.textTrack,z=this.currentTransmuxState,ne=z.accurateTimeOffset,j=z.timeOffset;s.logger.log("[transmuxer.ts]: Flushed fragment "+A.sn+(A.part>-1?" p: "+A.part:"")+" of level "+A.level);var G=this.remuxer.remux(O,D,I,F,j,ne,!0,this.id);o.push({remuxResult:G,chunkMeta:A}),A.transmuxing.executeEnd=u()},g.resetInitialTimestamp=function(o){var x=this.demuxer,A=this.remuxer;if(!x||!A)return;x.resetTimeStamp(o),A.resetTimeStamp(o)},g.resetContiguity=function(){var o=this.demuxer,x=this.remuxer;if(!o||!x)return;o.resetContiguity(),x.resetNextTimestamp()},g.resetInitSegment=function(o,x,A,O){var D=this.demuxer,I=this.remuxer;if(!D||!I)return;D.resetInitSegment(x,A,O),I.resetInitSegment(o,x,A)},g.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},g.transmux=function(o,x,A,O,D){var I;return x&&x.method==="SAMPLE-AES"?I=this.transmuxSampleAes(o,x,A,O,D):I=this.transmuxUnencrypted(o,A,O,D),I},g.transmuxUnencrypted=function(o,x,A,O){var D=this.demuxer.demux(o,x,!1,!this.config.progressive),I=D.audioTrack,F=D.avcTrack,z=D.id3Track,ne=D.textTrack,j=this.remuxer.remux(I,F,z,ne,x,A,!1,this.id);return{remuxResult:j,chunkMeta:O}},g.transmuxSampleAes=function(o,x,A,O,D){var I=this;return this.demuxer.demuxSampleAes(o,x,A).then(function(F){var z=I.remuxer.remux(F.audioTrack,F.avcTrack,F.id3Track,F.textTrack,A,O,!1,I.id);return{remuxResult:z,chunkMeta:D}})},g.configureTransmuxer=function(o,x){for(var A=this.config,O=this.observer,D=this.typeSupported,I=this.vendor,F=x.audioCodec,z=x.defaultInitPts,ne=x.duration,j=x.initSegmentData,G=x.videoCodec,X,Z=0,K=i.length;Z<K;Z++)if(i[Z].demux.probe(o)){X=i[Z];break}X||(s.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),X={demux:T.default,remux:l.default});var q=this.demuxer,ie=this.remuxer,oe=X.remux,ye=X.demux;(!ie||!(ie instanceof oe))&&(this.remuxer=new oe(O,A,D,I)),(!q||!(q instanceof ye))&&(this.demuxer=new ye(O,A,D),this.probe=ye.probe),this.resetInitSegment(j,F,G,ne),this.resetInitialTimestamp(z)},g.needsProbing=function(o,x,A){return!this.demuxer||!this.remuxer||x||A},g.getDecrypter=function(){var o=this.decrypter;return o||(o=this.decrypter=new S.default(this.observer,this.config)),o},m}();function d(m,g){var E=null;return m.byteLength>0&&g!=null&&g.key!=null&&g.iv!==null&&g.method!=null&&(E=g),E}var v=function(g){return{remuxResult:{},chunkMeta:g}};function b(m){return"then"in m&&m.then instanceof Function}var y=function(g,E,o,x,A){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=g,this.videoCodec=E,this.initSegmentData=o,this.duration=x,this.defaultInitPts=A},_=function(g,E,o,x,A){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=g,this.contiguous=E,this.accurateTimeOffset=o,this.trackSwitch=x,this.timeOffset=A}},"./src/demux/tsdemuxer.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"discardEPB",function(){return v});var w=U("./src/demux/adts.ts"),P=U("./src/demux/mpegaudio.ts"),S=U("./src/demux/exp-golomb.ts"),C=U("./src/demux/id3.ts"),T=U("./src/demux/sample-aes.ts"),h=U("./src/events.ts"),p=U("./src/utils/mp4-tools.ts"),f=U("./src/utils/logger.ts"),l=U("./src/errors.ts"),a={video:1,audio:2,id3:3,text:4},c=function(){function b(_,m,g){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=_,this.config=m,this.typeSupported=g}b.probe=function(m){var g=b.syncOffset(m);return g<0?!1:(g&&f.logger.warn("MPEG2-TS detected but first sync word found @ offset "+g+", junk ahead ?"),!0)},b.syncOffset=function(m){for(var g=Math.min(1e3,m.length-3*188),E=0;E<g;){if(m[E]===71&&m[E+188]===71&&m[E+2*188]===71)return E;E++}return-1},b.createTrack=function(m,g){return{container:m==="video"||m==="audio"?"video/mp2t":void 0,type:m,id:a[m],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:m==="audio"?g:void 0}};var y=b.prototype;return y.resetInitSegment=function(m,g,E){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=b.createTrack("video",E),this._audioTrack=b.createTrack("audio",E),this._id3Track=b.createTrack("id3",E),this._txtTrack=b.createTrack("text",E),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=m,this.videoCodec=g,this._duration=E},y.resetTimeStamp=function(){},y.resetContiguity=function(){var m=this._audioTrack,g=this._avcTrack,E=this._id3Track;m&&(m.pesData=null),g&&(g.pesData=null),E&&(E.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},y.demux=function(m,g,E,o){E===void 0&&(E=!1),o===void 0&&(o=!1),E||(this.sampleAes=null);var x,A=this._avcTrack,O=this._audioTrack,D=this._id3Track,I=A.pid,F=A.pesData,z=O.pid,ne=D.pid,j=O.pesData,G=D.pesData,X=!1,Z=this.pmtParsed,K=this._pmtId,q=m.length;if(this.remainderData&&(m=Object(p.appendUint8Array)(this.remainderData,m),q=m.length,this.remainderData=null),q<188&&!o)return this.remainderData=m,{audioTrack:O,avcTrack:A,id3Track:D,textTrack:this._txtTrack};var ie=Math.max(0,b.syncOffset(m));q-=(q+ie)%188,q<m.byteLength&&!o&&(this.remainderData=new Uint8Array(m.buffer,q,m.buffer.byteLength-q));for(var oe=ie;oe<q;oe+=188)if(m[oe]===71){var ye=!!(m[oe+1]&64),pe=((m[oe+1]&31)<<8)+m[oe+2],we=(m[oe+3]&48)>>4,fe=void 0;if(we>1){if(fe=oe+5+m[oe+4],fe===oe+188)continue}else fe=oe+4;switch(pe){case I:ye&&(F&&(x=n(F))&&this.parseAVCPES(x,!1),F={data:[],size:0}),F&&(F.data.push(m.subarray(fe,oe+188)),F.size+=oe+188-fe);break;case z:ye&&(j&&(x=n(j))&&(O.isAAC?this.parseAACPES(x):this.parseMPEGPES(x)),j={data:[],size:0}),j&&(j.data.push(m.subarray(fe,oe+188)),j.size+=oe+188-fe);break;case ne:ye&&(G&&(x=n(G))&&this.parseID3PES(x),G={data:[],size:0}),G&&(G.data.push(m.subarray(fe,oe+188)),G.size+=oe+188-fe);break;case 0:ye&&(fe+=m[fe]+1),K=this._pmtId=u(m,fe);break;case K:{ye&&(fe+=m[fe]+1);var Te=i(m,fe,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,E);I=Te.avc,I>0&&(A.pid=I),z=Te.audio,z>0&&(O.pid=z,O.isAAC=Te.isAAC),ne=Te.id3,ne>0&&(D.pid=ne),X&&!Z&&(f.logger.log("reparse from beginning"),X=!1,oe=ie-188),Z=this.pmtParsed=!0;break}case 17:case 8191:break;default:X=!0;break}}else this.observer.emit(h.Events.ERROR,h.Events.ERROR,{type:l.ErrorTypes.MEDIA_ERROR,details:l.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});A.pesData=F,O.pesData=j,D.pesData=G;var Fe={audioTrack:O,avcTrack:A,id3Track:D,textTrack:this._txtTrack};return o&&this.extractRemainingSamples(Fe),Fe},y.flush=function(){var m=this.remainderData;this.remainderData=null;var g;return m?g=this.demux(m,-1,!1,!0):g={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(g),this.sampleAes?this.decrypt(g,this.sampleAes):g},y.extractRemainingSamples=function(m){var g=m.audioTrack,E=m.avcTrack,o=m.id3Track,x=E.pesData,A=g.pesData,O=o.pesData,D;x&&(D=n(x))?(this.parseAVCPES(D,!0),E.pesData=null):E.pesData=x,A&&(D=n(A))?(g.isAAC?this.parseAACPES(D):this.parseMPEGPES(D),g.pesData=null):(A!=null&&A.size&&f.logger.log("last AAC PES packet truncated,might overlap between fragments"),g.pesData=A),O&&(D=n(O))?(this.parseID3PES(D),o.pesData=null):o.pesData=O},y.demuxSampleAes=function(m,g,E){var o=this.demux(m,E,!0,!this.config.progressive),x=this.sampleAes=new T.default(this.observer,this.config,g);return this.decrypt(o,x)},y.decrypt=function(m,g){return new Promise(function(E){var o=m.audioTrack,x=m.avcTrack;o.samples&&o.isAAC?g.decryptAacSamples(o.samples,0,function(){x.samples?g.decryptAvcSamples(x.samples,0,0,function(){E(m)}):E(m)}):x.samples&&g.decryptAvcSamples(x.samples,0,0,function(){E(m)})})},y.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},y.parseAVCPES=function(m,g){var E=this,o=this._avcTrack,x=this.parseAVCNALu(m.data),A=!1,O=this.avcSample,D,I=!1;m.data=null,O&&x.length&&!o.audFound&&(t(O,o),O=this.avcSample=s(!1,m.pts,m.dts,"")),x.forEach(function(F){switch(F.type){case 1:{D=!0,O||(O=E.avcSample=s(!0,m.pts,m.dts,"")),A&&(O.debug+="NDR "),O.frame=!0;var z=F.data;if(I&&z.length>4){var ne=new S.default(z).readSliceType();(ne===2||ne===4||ne===7||ne===9)&&(O.key=!0)}break}case 5:D=!0,O||(O=E.avcSample=s(!0,m.pts,m.dts,"")),A&&(O.debug+="IDR "),O.key=!0,O.frame=!0;break;case 6:{D=!0,A&&O&&(O.debug+="SEI ");var j=new S.default(v(F.data));j.readUByte();for(var G=0,X=0,Z=!1,K=0;!Z&&j.bytesAvailable>1;){G=0;do K=j.readUByte(),G+=K;while(K===255);X=0;do K=j.readUByte(),X+=K;while(K===255);if(G===4&&j.bytesAvailable!==0){Z=!0;var q=j.readUByte();if(q===181){var ie=j.readUShort();if(ie===49){var oe=j.readUInt();if(oe===1195456820){var ye=j.readUByte();if(ye===3){for(var pe=j.readUByte(),we=j.readUByte(),fe=31&pe,Te=[pe,we],Fe=0;Fe<fe;Fe++)Te.push(j.readUByte()),Te.push(j.readUByte()),Te.push(j.readUByte());d(E._txtTrack.samples,{type:3,pts:m.pts,bytes:Te})}}}}}else if(G===5&&j.bytesAvailable!==0){if(Z=!0,X>16){for(var De=[],Me=0;Me<16;Me++)De.push(j.readUByte().toString(16)),(Me===3||Me===5||Me===7||Me===9)&&De.push("-");for(var Ue=X-16,ve=new Uint8Array(Ue),ce=0;ce<Ue;ce++)ve[ce]=j.readUByte();d(E._txtTrack.samples,{pts:m.pts,payloadType:G,uuid:De.join(""),userData:Object(C.utf8ArrayToStr)(ve),userDataBytes:ve})}}else if(X<j.bytesAvailable)for(var Ie=0;Ie<X;Ie++)j.readUByte()}break}case 7:if(D=!0,I=!0,A&&O&&(O.debug+="SPS "),!o.sps){var Ne=new S.default(F.data),Xe=Ne.readSPS();o.width=Xe.width,o.height=Xe.height,o.pixelRatio=Xe.pixelRatio,o.sps=[F.data],o.duration=E._duration;for(var ee=F.data.subarray(1,4),k="avc1.",N=0;N<3;N++){var $=ee[N].toString(16);$.length<2&&($="0"+$),k+=$}o.codec=k}break;case 8:D=!0,A&&O&&(O.debug+="PPS "),o.pps||(o.pps=[F.data]);break;case 9:D=!1,o.audFound=!0,O&&t(O,o),O=E.avcSample=s(!1,m.pts,m.dts,A?"AUD ":"");break;case 12:D=!1;break;default:D=!1,O&&(O.debug+="unknown NAL "+F.type+" ");break}if(O&&D){var V=O.units;V.push(F)}}),g&&O&&(t(O,o),this.avcSample=null)},y.getLastNalUnit=function(){var m,g=this.avcSample,E;if(!g||g.units.length===0){var o=this._avcTrack.samples;g=o[o.length-1]}if((m=g)!==null&&m!==void 0&&m.units){var x=g.units;E=x[x.length-1]}return E},y.parseAVCNALu=function(m){var g=m.byteLength,E=this._avcTrack,o=E.naluState||0,x=o,A=[],O=0,D,I,F,z=-1,ne=0;for(o===-1&&(z=0,ne=m[0]&31,o=0,O=1);O<g;){if(D=m[O++],!o){o=D?0:1;continue}if(o===1){o=D?0:2;continue}if(!D)o=3;else if(D===1){if(z>=0){var j={data:m.subarray(z,O-o-1),type:ne};A.push(j)}else{var G=this.getLastNalUnit();if(G&&(x&&O<=4-x&&(G.state&&(G.data=G.data.subarray(0,G.data.byteLength-x))),I=O-o-1,I>0)){var X=new Uint8Array(G.data.byteLength+I);X.set(G.data,0),X.set(m.subarray(0,I),G.data.byteLength),G.data=X,G.state=0}}O<g?(F=m[O]&31,z=O,ne=F,o=0):o=-1}else o=0}if(z>=0&&o>=0){var Z={data:m.subarray(z,g),type:ne,state:o};A.push(Z)}if(A.length===0){var K=this.getLastNalUnit();if(K){var q=new Uint8Array(K.data.byteLength+m.byteLength);q.set(K.data,0),q.set(m,K.data.byteLength),K.data=q}}return E.naluState=o,A},y.parseAACPES=function(m){var g=0,E=this._audioTrack,o=this.aacOverFlow,x=m.data;if(o){this.aacOverFlow=null;var A=o.sample.unit.byteLength,O=Math.min(o.missing,A),D=A-O;o.sample.unit.set(x.subarray(0,O),D),E.samples.push(o.sample),g=o.missing}var I,F;for(I=g,F=x.length;I<F-1&&!w.isHeader(x,I);I++);if(I!==g){var z,ne;if(I<F-1?(z="AAC PES did not start with ADTS header,offset:"+I,ne=!1):(z="no ADTS header found in AAC PES",ne=!0),f.logger.warn("parsing error:"+z),this.observer.emit(h.Events.ERROR,h.Events.ERROR,{type:l.ErrorTypes.MEDIA_ERROR,details:l.ErrorDetails.FRAG_PARSING_ERROR,fatal:ne,reason:z}),ne)return}w.initTrackConfig(E,this.observer,x,I,this.audioCodec);var j;if(m.pts!==void 0)j=m.pts;else if(o){var G=w.getFrameDuration(E.samplerate);j=o.sample.pts+G}else{f.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var X=0;I<F;)if(w.isHeader(x,I)){if(I+5<F){var Z=w.appendFrame(E,x,I,j,X);if(Z)if(Z.missing)this.aacOverFlow=Z;else{I+=Z.length,X++;continue}}break}else I++},y.parseMPEGPES=function(m){var g=m.data,E=g.length,o=0,x=0,A=m.pts;if(A===void 0){f.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;x<E;)if(P.isHeader(g,x)){var O=P.appendFrame(this._audioTrack,g,x,A,o);if(O)x+=O.length,o++;else break}else x++},y.parseID3PES=function(m){if(m.pts===void 0){f.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(m)},b}();c.minProbeByteLength=188;function s(b,y,_,m){return{key:b,frame:!1,pts:y,dts:_,units:[],debug:m,length:0}}function u(b,y){return(b[y+10]&31)<<8|b[y+11]}function i(b,y,_,m){var g={audio:-1,avc:-1,id3:-1,isAAC:!0},E=(b[y+1]&15)<<8|b[y+2],o=y+3+E-4,x=(b[y+10]&15)<<8|b[y+11];for(y+=12+x;y<o;){var A=(b[y+1]&31)<<8|b[y+2];switch(b[y]){case 207:if(!m){f.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:g.audio===-1&&(g.audio=A);break;case 21:g.id3===-1&&(g.id3=A);break;case 219:if(!m){f.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:g.avc===-1&&(g.avc=A);break;case 3:case 4:_?g.audio===-1&&(g.audio=A,g.isAAC=!1):f.logger.log("MPEG audio found, not supported in this browser");break;case 36:f.logger.warn("Unsupported HEVC stream type found");break;default:break}y+=((b[y+3]&15)<<8|b[y+4])+5}return g}function n(b){var y=0,_,m,g,E,o,x=b.data;if(!b||b.size===0)return null;for(;x[0].length<19&&x.length>1;){var A=new Uint8Array(x[0].length+x[1].length);A.set(x[0]),A.set(x[1],x[0].length),x[0]=A,x.splice(1,1)}_=x[0];var O=(_[0]<<16)+(_[1]<<8)+_[2];if(O===1){if(m=(_[4]<<8)+_[5],m&&m>b.size-6)return null;var D=_[7];D&192&&(E=(_[9]&14)*536870912+(_[10]&255)*4194304+(_[11]&254)*16384+(_[12]&255)*128+(_[13]&254)/2,D&64?(o=(_[14]&14)*536870912+(_[15]&255)*4194304+(_[16]&254)*16384+(_[17]&255)*128+(_[18]&254)/2,E-o>60*9e4&&(f.logger.warn(Math.round((E-o)/9e4)+"s delta between PTS and DTS, align them"),E=o)):o=E),g=_[8];var I=g+9;if(b.size<=I)return null;b.size-=I;for(var F=new Uint8Array(b.size),z=0,ne=x.length;z<ne;z++){_=x[z];var j=_.byteLength;if(I)if(I>j){I-=j;continue}else _=_.subarray(I),j-=I,I=0;F.set(_,y),y+=j}return m&&(m-=g+3),{data:F,pts:E,dts:o,len:m}}return null}function t(b,y){if(b.units.length&&b.frame){if(b.pts===void 0){var _=y.samples,m=_.length;if(m){var g=_[m-1];b.pts=g.pts,b.dts=g.dts}else{y.dropped++;return}}y.samples.push(b)}b.debug.length&&f.logger.log(b.pts+"/"+b.dts+":"+b.debug)}function d(b,y){var _=b.length;if(_>0){if(y.pts>=b[_-1].pts)b.push(y);else for(var m=_-1;m>=0;m--)if(y.pts<b[m].pts){b.splice(m,0,y);break}}else b.push(y)}function v(b){for(var y=b.byteLength,_=[],m=1;m<y-2;)b[m]===0&&b[m+1]===0&&b[m+2]===3?(_.push(m+2),m+=2):m++;if(_.length===0)return b;var g=y-_.length,E=new Uint8Array(g),o=0;for(m=0;m<g;o++,m++)o===_[0]&&(o++,_.shift()),E[m]=b[o];return E}Q.default=c},"./src/errors.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"ErrorTypes",function(){return w}),U.d(Q,"ErrorDetails",function(){return P});var w;(function(S){S.NETWORK_ERROR="networkError",S.MEDIA_ERROR="mediaError",S.KEY_SYSTEM_ERROR="keySystemError",S.MUX_ERROR="muxError",S.OTHER_ERROR="otherError"})(w||(w={}));var P;(function(S){S.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",S.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",S.KEY_SYSTEM_NO_SESSION="keySystemNoSession",S.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",S.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",S.MANIFEST_LOAD_ERROR="manifestLoadError",S.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",S.MANIFEST_PARSING_ERROR="manifestParsingError",S.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",S.LEVEL_EMPTY_ERROR="levelEmptyError",S.LEVEL_LOAD_ERROR="levelLoadError",S.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",S.LEVEL_SWITCH_ERROR="levelSwitchError",S.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",S.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",S.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",S.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",S.FRAG_LOAD_ERROR="fragLoadError",S.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",S.FRAG_DECRYPT_ERROR="fragDecryptError",S.FRAG_PARSING_ERROR="fragParsingError",S.REMUX_ALLOC_ERROR="remuxAllocError",S.KEY_LOAD_ERROR="keyLoadError",S.KEY_LOAD_TIMEOUT="keyLoadTimeOut",S.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",S.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",S.BUFFER_APPEND_ERROR="bufferAppendError",S.BUFFER_APPENDING_ERROR="bufferAppendingError",S.BUFFER_STALLED_ERROR="bufferStalledError",S.BUFFER_FULL_ERROR="bufferFullError",S.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",S.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",S.INTERNAL_EXCEPTION="internalException",S.INTERNAL_ABORTED="aborted",S.UNKNOWN="unknown"})(P||(P={}))},"./src/events.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"Events",function(){return w});var w;(function(P){P.MEDIA_ATTACHING="hlsMediaAttaching",P.MEDIA_ATTACHED="hlsMediaAttached",P.MEDIA_DETACHING="hlsMediaDetaching",P.MEDIA_DETACHED="hlsMediaDetached",P.BUFFER_RESET="hlsBufferReset",P.BUFFER_CODECS="hlsBufferCodecs",P.BUFFER_CREATED="hlsBufferCreated",P.BUFFER_APPENDING="hlsBufferAppending",P.BUFFER_APPENDED="hlsBufferAppended",P.BUFFER_EOS="hlsBufferEos",P.BUFFER_FLUSHING="hlsBufferFlushing",P.BUFFER_FLUSHED="hlsBufferFlushed",P.MANIFEST_LOADING="hlsManifestLoading",P.MANIFEST_LOADED="hlsManifestLoaded",P.MANIFEST_PARSED="hlsManifestParsed",P.LEVEL_SWITCHING="hlsLevelSwitching",P.LEVEL_SWITCHED="hlsLevelSwitched",P.LEVEL_LOADING="hlsLevelLoading",P.LEVEL_LOADED="hlsLevelLoaded",P.LEVEL_UPDATED="hlsLevelUpdated",P.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",P.LEVELS_UPDATED="hlsLevelsUpdated",P.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",P.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",P.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",P.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",P.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",P.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",P.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",P.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",P.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",P.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",P.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",P.CUES_PARSED="hlsCuesParsed",P.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",P.INIT_PTS_FOUND="hlsInitPtsFound",P.FRAG_LOADING="hlsFragLoading",P.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",P.FRAG_LOADED="hlsFragLoaded",P.FRAG_DECRYPTED="hlsFragDecrypted",P.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",P.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",P.FRAG_PARSING_METADATA="hlsFragParsingMetadata",P.FRAG_PARSED="hlsFragParsed",P.FRAG_BUFFERED="hlsFragBuffered",P.FRAG_CHANGED="hlsFragChanged",P.FPS_DROP="hlsFpsDrop",P.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",P.ERROR="hlsError",P.DESTROYING="hlsDestroying",P.KEY_LOADING="hlsKeyLoading",P.KEY_LOADED="hlsKeyLoaded",P.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",P.BACK_BUFFER_REACHED="hlsBackBufferReached"})(w||(w={}))},"./src/hls.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"default",function(){return b});var w=U("./node_modules/url-toolkit/src/url-toolkit.js"),P=U.n(w),S=U("./src/loader/playlist-loader.ts"),C=U("./src/loader/key-loader.ts"),T=U("./src/controller/id3-track-controller.ts"),h=U("./src/controller/latency-controller.ts"),p=U("./src/controller/level-controller.ts"),f=U("./src/controller/fragment-tracker.ts"),l=U("./src/controller/stream-controller.ts"),a=U("./src/is-supported.ts"),c=U("./src/utils/logger.ts"),s=U("./src/config.ts"),u=U("./node_modules/eventemitter3/index.js"),i=U.n(u),n=U("./src/events.ts"),t=U("./src/errors.ts");function d(y,_){for(var m=0;m<_.length;m++){var g=_[m];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(y,g.key,g)}}function v(y,_,m){return _&&d(y.prototype,_),m&&d(y,m),y}var b=function(){y.isSupported=function(){return Object(a.isSupported)()};function y(m){m===void 0&&(m={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new u.EventEmitter,this._autoLevelCapping=void 0,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var g=this.config=Object(s.mergeConfig)(y.DefaultConfig,m);this.userConfig=m,Object(c.enableLogs)(g.debug),this._autoLevelCapping=-1,g.progressive&&Object(s.enableStreamingMode)(g);var E=g.abrController,o=g.bufferController,x=g.capLevelController,A=g.fpsController,O=this.abrController=new E(this),D=this.bufferController=new o(this),I=this.capLevelController=new x(this),F=new A(this),z=new S.default(this),ne=new C.default(this),j=new T.default(this),G=this.levelController=new p.default(this),X=new f.FragmentTracker(this),Z=this.streamController=new l.default(this,X);I.setStreamController(Z),F.setStreamController(Z);var K=[G,Z];this.networkControllers=K;var q=[z,ne,O,D,I,F,j,X];this.audioTrackController=this.createController(g.audioTrackController,null,K),this.createController(g.audioStreamController,X,K),this.subtitleTrackController=this.createController(g.subtitleTrackController,null,K),this.createController(g.subtitleStreamController,X,K),this.createController(g.timelineController,null,q),this.emeController=this.createController(g.emeController,null,q),this.cmcdController=this.createController(g.cmcdController,null,q),this.latencyController=this.createController(h.default,null,q),this.coreComponents=q}var _=y.prototype;return _.createController=function(g,E,o){if(g){var x=E?new g(this,E):new g(this);return o&&o.push(x),x}return null},_.on=function(g,E,o){o===void 0&&(o=this),this._emitter.on(g,E,o)},_.once=function(g,E,o){o===void 0&&(o=this),this._emitter.once(g,E,o)},_.removeAllListeners=function(g){this._emitter.removeAllListeners(g)},_.off=function(g,E,o,x){o===void 0&&(o=this),this._emitter.off(g,E,o,x)},_.listeners=function(g){return this._emitter.listeners(g)},_.emit=function(g,E,o){return this._emitter.emit(g,E,o)},_.trigger=function(g,E){if(this.config.debug)return this.emit(g,g,E);try{return this.emit(g,g,E)}catch(o){c.logger.error("An internal error happened while handling event "+g+'. Error message: "'+o.message+'". Here is a stacktrace:',o),this.trigger(n.Events.ERROR,{type:t.ErrorTypes.OTHER_ERROR,details:t.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:g,error:o})}return!1},_.listenerCount=function(g){return this._emitter.listenerCount(g)},_.destroy=function(){c.logger.log("destroy"),this.trigger(n.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(g){return g.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(g){return g.destroy()}),this.coreComponents.length=0},_.attachMedia=function(g){c.logger.log("attachMedia"),this._media=g,this.trigger(n.Events.MEDIA_ATTACHING,{media:g})},_.detachMedia=function(){c.logger.log("detachMedia"),this.trigger(n.Events.MEDIA_DETACHING,void 0),this._media=null},_.loadSource=function(g){this.stopLoad();var E=this.media,o=this.url,x=this.url=w.buildAbsoluteURL(self.location.href,g,{alwaysNormalize:!0});c.logger.log("loadSource:"+x),E&&o&&o!==x&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(E)),this.trigger(n.Events.MANIFEST_LOADING,{url:g})},_.startLoad=function(g){g===void 0&&(g=-1),c.logger.log("startLoad("+g+")"),this.networkControllers.forEach(function(E){E.startLoad(g)})},_.stopLoad=function(){c.logger.log("stopLoad"),this.networkControllers.forEach(function(g){g.stopLoad()})},_.swapAudioCodec=function(){c.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},_.recoverMediaError=function(){c.logger.log("recoverMediaError");var g=this._media;this.detachMedia(),g&&this.attachMedia(g)},_.removeLevel=function(g,E){E===void 0&&(E=0),this.levelController.removeLevel(g,E)},v(y,[{key:"levels",get:function(){var g=this.levelController.levels;return g||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(g){c.logger.log("set currentLevel:"+g),this.loadLevel=g,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(g){c.logger.log("set nextLevel:"+g),this.levelController.manualLevel=g,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(g){c.logger.log("set loadLevel:"+g),this.levelController.manualLevel=g}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(g){this.levelController.nextLoadLevel=g}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(g){c.logger.log("set firstLevel:"+g),this.levelController.firstLevel=g}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(g){c.logger.log("set startLevel:"+g),g!==-1&&(g=Math.max(g,this.minAutoLevel)),this.levelController.startLevel=g}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(g){var E=!!g;E!==this.config.capLevelToPlayerSize&&(E?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=E)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(g){this._autoLevelCapping!==g&&(c.logger.log("set autoLevelCapping:"+g),this._autoLevelCapping=g)}},{key:"bandwidthEstimate",get:function(){var g=this.abrController.bwEstimator;return g?g.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var g=this.levels,E=this.config.minAutoBitrate;if(!g)return 0;for(var o=g.length,x=0;x<o;x++)if(g[x].maxBitrate>E)return x;return 0}},{key:"maxAutoLevel",get:function(){var g=this.levels,E=this.autoLevelCapping,o;return E===-1&&g&&g.length?o=g.length-1:o=E,o}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(g){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,g)}},{key:"audioTracks",get:function(){var g=this.audioTrackController;return g?g.audioTracks:[]}},{key:"audioTrack",get:function(){var g=this.audioTrackController;return g?g.audioTrack:-1},set:function(g){var E=this.audioTrackController;E&&(E.audioTrack=g)}},{key:"subtitleTracks",get:function(){var g=this.subtitleTrackController;return g?g.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var g=this.subtitleTrackController;return g?g.subtitleTrack:-1},set:function(g){var E=this.subtitleTrackController;E&&(E.subtitleTrack=g)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var g=this.subtitleTrackController;return g?g.subtitleDisplay:!1},set:function(g){var E=this.subtitleTrackController;E&&(E.subtitleDisplay=g)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(g){this.config.lowLatencyMode=g}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return n.Events}},{key:"ErrorTypes",get:function(){return t.ErrorTypes}},{key:"ErrorDetails",get:function(){return t.ErrorDetails}},{key:"DefaultConfig",get:function(){return y.defaultConfig?y.defaultConfig:s.hlsDefaultConfig},set:function(g){y.defaultConfig=g}}]),y}();b.defaultConfig=void 0},"./src/is-supported.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"isSupported",function(){return S}),U.d(Q,"changeTypeSupported",function(){return C});var w=U("./src/utils/mediasource-helper.ts");function P(){return self.SourceBuffer||self.WebKitSourceBuffer}function S(){var T=Object(w.getMediaSource)();if(!T)return!1;var h=P(),p=T&&typeof T.isTypeSupported=="function"&&T.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),f=!h||h.prototype&&typeof h.prototype.appendBuffer=="function"&&typeof h.prototype.remove=="function";return!!p&&!!f}function C(){var T,h=P();return typeof(h==null||((T=h.prototype)===null||T===void 0)?void 0:T.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"default",function(){return c}),U.d(Q,"LoadError",function(){return u});var w=U("./src/polyfills/number.ts"),P=U("./src/errors.ts");function S(i,n){i.prototype=Object.create(n.prototype),i.prototype.constructor=i,f(i,n)}function C(i){var n=typeof Map=="function"?new Map:void 0;return C=function(d){if(d===null||!p(d))return d;if(typeof d!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n!="undefined"){if(n.has(d))return n.get(d);n.set(d,v)}function v(){return T(d,arguments,l(this).constructor)}return v.prototype=Object.create(d.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),f(v,d)},C(i)}function T(i,n,t){return h()?T=Reflect.construct:T=function(v,b,y){var _=[null];_.push.apply(_,b);var m=Function.bind.apply(v,_),g=new m;return y&&f(g,y.prototype),g},T.apply(null,arguments)}function h(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(i){return!1}}function p(i){return Function.toString.call(i).indexOf("[native code]")!==-1}function f(i,n){return f=Object.setPrototypeOf||function(d,v){return d.__proto__=v,d},f(i,n)}function l(i){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},l(i)}var a=Math.pow(2,17),c=function(){function i(t){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=t}var n=i.prototype;return n.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},n.abort=function(){this.loader&&this.loader.abort()},n.load=function(d,v){var b=this,y=d.url;if(!y)return Promise.reject(new u({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:d,networkDetails:null},"Fragment does not have a "+(y?"part list":"url")));this.abort();var _=this.config,m=_.fLoader,g=_.loader;return new Promise(function(E,o){b.loader&&b.loader.destroy();var x=b.loader=d.loader=m?new m(_):new g(_),A=s(d),O={timeout:_.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:_.fragLoadingMaxRetryTimeout,highWaterMark:a};d.stats=x.stats,x.load(A,O,{onSuccess:function(I,F,z,ne){b.resetLoader(d,x),E({frag:d,part:null,payload:I.data,networkDetails:ne})},onError:function(I,F,z){b.resetLoader(d,x),o(new u({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:d,response:I,networkDetails:z}))},onAbort:function(I,F,z){b.resetLoader(d,x),o(new u({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:d,networkDetails:z}))},onTimeout:function(I,F,z){b.resetLoader(d,x),o(new u({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:d,networkDetails:z}))},onProgress:function(I,F,z,ne){v&&v({frag:d,part:null,payload:z,networkDetails:ne})}})})},n.loadPart=function(d,v,b){var y=this;this.abort();var _=this.config,m=_.fLoader,g=_.loader;return new Promise(function(E,o){y.loader&&y.loader.destroy();var x=y.loader=d.loader=m?new m(_):new g(_),A=s(d,v),O={timeout:_.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:_.fragLoadingMaxRetryTimeout,highWaterMark:a};v.stats=x.stats,x.load(A,O,{onSuccess:function(I,F,z,ne){y.resetLoader(d,x),y.updateStatsFromPart(d,v);var j={frag:d,part:v,payload:I.data,networkDetails:ne};b(j),E(j)},onError:function(I,F,z){y.resetLoader(d,x),o(new u({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:d,part:v,response:I,networkDetails:z}))},onAbort:function(I,F,z){d.stats.aborted=v.stats.aborted,y.resetLoader(d,x),o(new u({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:d,part:v,networkDetails:z}))},onTimeout:function(I,F,z){y.resetLoader(d,x),o(new u({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:d,part:v,networkDetails:z}))}})})},n.updateStatsFromPart=function(d,v){var b=d.stats,y=v.stats,_=y.total;if(b.loaded+=y.loaded,_){var m=Math.round(d.duration/v.duration),g=Math.min(Math.round(b.loaded/_),m),E=m-g,o=E*Math.round(b.loaded/g);b.total=b.loaded+o}else b.total=Math.max(b.loaded,b.total);var x=b.loading,A=y.loading;x.start?x.first+=A.first-A.start:(x.start=A.start,x.first=A.first),x.end=A.end},n.resetLoader=function(d,v){d.loader=null,this.loader===v&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),v.destroy()},i}();function s(i,n){n===void 0&&(n=null);var t=n||i,d={frag:i,part:n,responseType:"arraybuffer",url:t.url,headers:{},rangeStart:0,rangeEnd:0},v=t.byteRangeStartOffset,b=t.byteRangeEndOffset;return Object(w.isFiniteNumber)(v)&&Object(w.isFiniteNumber)(b)&&(d.rangeStart=v,d.rangeEnd=b),d}var u=function(i){S(n,i);function n(t){for(var d,v=arguments.length,b=new Array(v>1?v-1:0),y=1;y<v;y++)b[y-1]=arguments[y];return d=i.call.apply(i,[this].concat(b))||this,d.data=void 0,d.data=t,d}return n}(C(Error))},"./src/loader/fragment.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"ElementaryStreamTypes",function(){return c}),U.d(Q,"BaseSegment",function(){return s}),U.d(Q,"Fragment",function(){return u}),U.d(Q,"Part",function(){return i});var w=U("./src/polyfills/number.ts"),P=U("./node_modules/url-toolkit/src/url-toolkit.js"),S=U.n(P),C=U("./src/utils/logger.ts"),T=U("./src/loader/level-key.ts"),h=U("./src/loader/load-stats.ts");function p(n,t){n.prototype=Object.create(t.prototype),n.prototype.constructor=n,f(n,t)}function f(n,t){return f=Object.setPrototypeOf||function(v,b){return v.__proto__=b,v},f(n,t)}function l(n,t){for(var d=0;d<t.length;d++){var v=t[d];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(n,v.key,v)}}function a(n,t,d){return t&&l(n.prototype,t),d&&l(n,d),n}var c;(function(n){n.AUDIO="audio",n.VIDEO="video",n.AUDIOVIDEO="audiovideo"})(c||(c={}));var s=function(){function n(d){var v;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(v={},v[c.AUDIO]=null,v[c.VIDEO]=null,v[c.AUDIOVIDEO]=null,v),this.baseurl=d}var t=n.prototype;return t.setByteRange=function(v,b){var y=v.split("@",2),_=[];y.length===1?_[0]=b?b.byteRangeEndOffset:0:_[0]=parseInt(y[1]),_[1]=parseInt(y[0])+_[0],this._byteRange=_},a(n,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Object(P.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(v){this._url=v}}]),n}(),u=function(n){p(t,n);function t(v,b){var y;return y=n.call(this,b)||this,y._decryptdata=null,y.rawProgramDateTime=null,y.programDateTime=null,y.tagList=[],y.duration=0,y.sn=0,y.levelkey=void 0,y.type=void 0,y.loader=null,y.level=-1,y.cc=0,y.startPTS=void 0,y.endPTS=void 0,y.appendedPTS=void 0,y.startDTS=void 0,y.endDTS=void 0,y.start=0,y.deltaPTS=void 0,y.maxStartPTS=void 0,y.minEndPTS=void 0,y.stats=new h.LoadStats,y.urlId=0,y.data=void 0,y.bitrateTest=!1,y.title=null,y.initSegment=null,y.type=v,y}var d=t.prototype;return d.createInitializationVector=function(b){for(var y=new Uint8Array(16),_=12;_<16;_++)y[_]=b>>8*(15-_)&255;return y},d.setDecryptDataFromLevelKey=function(b,y){var _=b;return(b==null?void 0:b.method)==="AES-128"&&b.uri&&!b.iv&&(_=T.LevelKey.fromURI(b.uri),_.method=b.method,_.iv=this.createInitializationVector(y),_.keyFormat="identity"),_},d.setElementaryStreamInfo=function(b,y,_,m,g,E){E===void 0&&(E=!1);var o=this.elementaryStreams,x=o[b];if(!x){o[b]={startPTS:y,endPTS:_,startDTS:m,endDTS:g,partial:E};return}x.startPTS=Math.min(x.startPTS,y),x.endPTS=Math.max(x.endPTS,_),x.startDTS=Math.min(x.startDTS,m),x.endDTS=Math.max(x.endDTS,g)},d.clearElementaryStreamInfo=function(){var b=this.elementaryStreams;b[c.AUDIO]=null,b[c.VIDEO]=null,b[c.AUDIOVIDEO]=null},a(t,[{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(w.isFiniteNumber)(this.programDateTime))return null;var b=Object(w.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)}}]),t}(s),i=function(n){p(t,n);function t(d,v,b,y,_){var m;m=n.call(this,b)||this,m.fragOffset=0,m.duration=0,m.gap=!1,m.independent=!1,m.relurl=void 0,m.fragment=void 0,m.index=void 0,m.stats=new h.LoadStats,m.duration=d.decimalFloatingPoint("DURATION"),m.gap=d.bool("GAP"),m.independent=d.bool("INDEPENDENT"),m.relurl=d.enumeratedString("URI"),m.fragment=v,m.index=y;var g=d.enumeratedString("BYTERANGE");return g&&m.setByteRange(g,_),_&&(m.fragOffset=_.fragOffset+_.duration),m}return a(t,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var v=this.elementaryStreams;return!!(v.audio||v.video||v.audiovideo)}}]),t}(s)},"./src/loader/key-loader.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"default",function(){return C});var w=U("./src/events.ts"),P=U("./src/errors.ts"),S=U("./src/utils/logger.ts"),C=function(){function T(p){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=p,this._registerListeners()}var h=T.prototype;return h._registerListeners=function(){this.hls.on(w.Events.KEY_LOADING,this.onKeyLoading,this)},h._unregisterListeners=function(){this.hls.off(w.Events.KEY_LOADING,this.onKeyLoading)},h.destroy=function(){this._unregisterListeners();for(var f in this.loaders){var l=this.loaders[f];l&&l.destroy()}this.loaders={}},h.onKeyLoading=function(f,l){var a=l.frag,c=a.type,s=this.loaders[c];if(!a.decryptdata){S.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var u=a.decryptdata.uri;if(u!==this.decrypturl||this.decryptkey===null){var i=this.hls.config;if(s&&(S.logger.warn("abort previous key loader for type:"+c),s.abort()),!u){S.logger.warn("key uri is falsy");return}var n=i.loader,t=a.loader=this.loaders[c]=new n(i);this.decrypturl=u,this.decryptkey=null;var d={url:u,frag:a,responseType:"arraybuffer"},v={timeout:i.fragLoadingTimeOut,maxRetry:0,retryDelay:i.fragLoadingRetryDelay,maxRetryDelay:i.fragLoadingMaxRetryTimeout,highWaterMark:0},b={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};t.load(d,v,b)}else this.decryptkey&&(a.decryptdata.key=this.decryptkey,this.hls.trigger(w.Events.KEY_LOADED,{frag:a}))},h.loadsuccess=function(f,l,a){var c=a.frag;if(!c.decryptdata){S.logger.error("after key load, decryptdata unset");return}this.decryptkey=c.decryptdata.key=new Uint8Array(f.data),c.loader=null,delete this.loaders[c.type],this.hls.trigger(w.Events.KEY_LOADED,{frag:c})},h.loaderror=function(f,l){var a=l.frag,c=a.loader;c&&c.abort(),delete this.loaders[a.type],this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:a,response:f})},h.loadtimeout=function(f,l){var a=l.frag,c=a.loader;c&&c.abort(),delete this.loaders[a.type],this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:a})},T}()},"./src/loader/level-details.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"LevelDetails",function(){return T});var w=U("./src/polyfills/number.ts");function P(h,p){for(var f=0;f<p.length;f++){var l=p[f];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(h,l.key,l)}}function S(h,p,f){return p&&P(h.prototype,p),f&&P(h,f),h}var C=10,T=function(){function h(f){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.fragments=[],this.url=f}var p=h.prototype;return p.reloaded=function(l){if(!l){this.advanced=!0,this.updated=!0;return}var a=this.lastPartSn-l.lastPartSn,c=this.lastPartIndex-l.lastPartIndex;this.updated=this.endSN!==l.endSN||!!c||!!a,this.advanced=this.endSN>l.endSN||a>0||a===0&&c>0,this.updated||this.advanced?this.misses=Math.floor(l.misses*.6):this.misses=l.misses+1,this.availabilityDelay=l.availabilityDelay},S(h,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(w.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||C}},{key:"drift",get:function(){var l=this.driftEndTime-this.driftStartTime;if(l>0){var a=this.driftEnd-this.driftStart;return a*1e3/l}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var l;return(l=this.partList)!==null&&l!==void 0&&l.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var l;return(l=this.fragments)!==null&&l!==void 0&&l.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 l;return(l=this.partList)!==null&&l!==void 0&&l.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var l;return(l=this.partList)!==null&&l!==void 0&&l.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),h}()},"./src/loader/level-key.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"LevelKey",function(){return T});var w=U("./node_modules/url-toolkit/src/url-toolkit.js"),P=U.n(w);function S(h,p){for(var f=0;f<p.length;f++){var l=p[f];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(h,l.key,l)}}function C(h,p,f){return p&&S(h.prototype,p),f&&S(h,f),h}var T=function(){h.fromURL=function(f,l){return new h(f,l)},h.fromURI=function(f){return new h(f)};function h(p,f){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,f?this._uri=Object(w.buildAbsoluteURL)(p,f,{alwaysNormalize:!0}):this._uri=p}return C(h,[{key:"uri",get:function(){return this._uri}}]),h}()},"./src/loader/load-stats.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"LoadStats",function(){return w});var w=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}},"./src/loader/m3u8-parser.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"default",function(){return t});var w=U("./src/polyfills/number.ts"),P=U("./node_modules/url-toolkit/src/url-toolkit.js"),S=U.n(P),C=U("./src/loader/fragment.ts"),T=U("./src/loader/level-details.ts"),h=U("./src/loader/level-key.ts"),p=U("./src/utils/attr-list.ts"),f=U("./src/utils/logger.ts"),l=U("./src/utils/codecs.ts"),a=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,c=/#EXT-X-MEDIA:(.*)/g,s=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),u=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(PLAYLIST-TYPE):(.+)/.source,/#EXT-X-(MEDIA-SEQUENCE): *(\d+)/.source,/#EXT-X-(SKIP):(.+)/.source,/#EXT-X-(TARGETDURATION): *(\d+)/.source,/#EXT-X-(KEY):(.+)/.source,/#EXT-X-(START):(.+)/.source,/#EXT-X-(ENDLIST)/.source,/#EXT-X-(DISCONTINUITY-SEQ)UENCE: *(\d+)/.source,/#EXT-X-(DIS)CONTINUITY/.source,/#EXT-X-(VERSION):(\d+)/.source,/#EXT-X-(MAP):(.+)/.source,/#EXT-X-(SERVER-CONTROL):(.+)/.source,/#EXT-X-(PART-INF):(.+)/.source,/#EXT-X-(GAP)/.source,/#EXT-X-(BITRATE):\s*(\d+)/.source,/#EXT-X-(PART):(.+)/.source,/#EXT-X-(PRELOAD-HINT):(.+)/.source,/#EXT-X-(RENDITION-REPORT):(.+)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),i=/\.(mp4|m4s|m4v|m4a)$/i;function n(_){var m,g;return i.test((m=(g=P.parseURL(_))===null||g===void 0?void 0:g.path)!=null?m:"")}var t=function(){function _(){}return _.findGroup=function(g,E){for(var o=0;o<g.length;o++){var x=g[o];if(x.id===E)return x}},_.convertAVC1ToAVCOTI=function(g){var E=g.split(".");if(E.length>2){var o=E.shift()+".";return o+=parseInt(E.shift()).toString(16),o+=("000"+parseInt(E.shift()).toString(16)).substr(-4),o}return g},_.resolve=function(g,E){return P.buildAbsoluteURL(E,g,{alwaysNormalize:!0})},_.parseMasterPlaylist=function(g,E){var o=[],x={},A=!1;a.lastIndex=0;for(var O;(O=a.exec(g))!=null;)if(O[1]){var D=new p.AttrList(O[1]),I={attrs:D,bitrate:D.decimalInteger("AVERAGE-BANDWIDTH")||D.decimalInteger("BANDWIDTH"),name:D.NAME,url:_.resolve(O[2],E)},F=D.decimalResolution("RESOLUTION");F&&(I.width=F.width,I.height=F.height),d((D.CODECS||"").split(/[ ,]+/).filter(function(ne){return ne}),I),I.videoCodec&&I.videoCodec.indexOf("avc1")!==-1&&(I.videoCodec=_.convertAVC1ToAVCOTI(I.videoCodec)),o.push(I)}else if(O[3]){var z=new p.AttrList(O[3]);z["DATA-ID"]&&(A=!0,x[z["DATA-ID"]]=z)}return{levels:o,sessionData:A?x:null}},_.parseMasterPlaylistMedia=function(g,E,o,x){x===void 0&&(x=[]);var A,O=[],D=0;for(c.lastIndex=0;(A=c.exec(g))!==null;){var I=new p.AttrList(A[1]);if(I.TYPE===o){var F={attrs:I,bitrate:0,id:D++,groupId:I["GROUP-ID"],instreamId:I["INSTREAM-ID"],name:I.NAME||I.LANGUAGE||"",type:o,default:I.bool("DEFAULT"),autoselect:I.bool("AUTOSELECT"),forced:I.bool("FORCED"),lang:I.LANGUAGE,url:I.URI?_.resolve(I.URI,E):""};if(x.length){var z=_.findGroup(x,F.groupId)||x[0];v(F,z,"audioCodec"),v(F,z,"textCodec")}O.push(F)}}return O},_.parseLevelPlaylist=function(g,E,o,x,A){var O=new T.LevelDetails(E),D=O.fragments,I=null,F=0,z=0,ne=0,j=0,G=null,X=new C.Fragment(x,E),Z,K,q,ie=-1,oe=!1;for(s.lastIndex=0,O.m3u8=g;(Z=s.exec(g))!==null;){oe&&(oe=!1,X=new C.Fragment(x,E),X.start=ne,X.sn=F,X.cc=j,X.level=o,I&&(X.initSegment=I,X.rawProgramDateTime=I.rawProgramDateTime));var ye=Z[1];if(ye){X.duration=parseFloat(ye);var pe=(" "+Z[2]).slice(1);X.title=pe||null,X.tagList.push(pe?["INF",ye,pe]:["INF",ye])}else if(Z[3])Object(w.isFiniteNumber)(X.duration)&&(X.start=ne,q&&(X.levelkey=q),X.sn=F,X.level=o,X.cc=j,X.urlId=A,D.push(X),X.relurl=(" "+Z[3]).slice(1),y(X,G),G=X,ne+=X.duration,F++,z=0,oe=!0);else if(Z[4]){var we=(" "+Z[4]).slice(1);G?X.setByteRange(we,G):X.setByteRange(we)}else if(Z[5])X.rawProgramDateTime=(" "+Z[5]).slice(1),X.tagList.push(["PROGRAM-DATE-TIME",X.rawProgramDateTime]),ie===-1&&(ie=D.length);else{if(Z=Z[0].match(u),!Z){f.logger.warn("No matches on slow regex match for level playlist!");continue}for(K=1;K<Z.length&&!(typeof Z[K]!="undefined");K++);var fe=(" "+Z[K]).slice(1),Te=(" "+Z[K+1]).slice(1),Fe=Z[K+2]?(" "+Z[K+2]).slice(1):"";switch(fe){case"PLAYLIST-TYPE":O.type=Te.toUpperCase();break;case"MEDIA-SEQUENCE":F=O.startSN=parseInt(Te);break;case"SKIP":{var De=new p.AttrList(Te),Me=De.decimalInteger("SKIPPED-SEGMENTS");if(Object(w.isFiniteNumber)(Me)){O.skippedSegments=Me;for(var Ue=Me;Ue--;)D.unshift(null);F+=Me}var ve=De.enumeratedString("RECENTLY-REMOVED-DATERANGES");ve&&(O.recentlyRemovedDateranges=ve.split(" "));break}case"TARGETDURATION":O.targetduration=parseFloat(Te);break;case"VERSION":O.version=parseInt(Te);break;case"EXTM3U":break;case"ENDLIST":O.live=!1;break;case"#":(Te||Fe)&&X.tagList.push(Fe?[Te,Fe]:[Te]);break;case"DIS":j++;case"GAP":X.tagList.push([fe]);break;case"BITRATE":X.tagList.push([fe,Te]);break;case"DISCONTINUITY-SEQ":j=parseInt(Te);break;case"KEY":{var ce,Ie=new p.AttrList(Te),Ne=Ie.enumeratedString("METHOD"),Xe=Ie.URI,ee=Ie.hexadecimalInteger("IV"),k=Ie.enumeratedString("KEYFORMATVERSIONS"),N=Ie.enumeratedString("KEYID"),$=(ce=Ie.enumeratedString("KEYFORMAT"))!=null?ce:"identity",V=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(V.indexOf($)>-1){f.logger.warn("Keyformat "+$+" is not supported from the manifest");continue}else if($!=="identity")continue;Ne&&(q=h.LevelKey.fromURL(E,Xe),Xe&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(Ne)>=0&&(q.method=Ne,q.keyFormat=$,N&&(q.keyID=N),k&&(q.keyFormatVersions=k),q.iv=ee));break}case"START":{var Y=new p.AttrList(Te),me=Y.decimalFloatingPoint("TIME-OFFSET");Object(w.isFiniteNumber)(me)&&(O.startTimeOffset=me);break}case"MAP":{var Ae=new p.AttrList(Te);X.relurl=Ae.URI,Ae.BYTERANGE&&X.setByteRange(Ae.BYTERANGE),X.level=o,X.sn="initSegment",q&&(X.levelkey=q),X.initSegment=null,I=X,oe=!0;break}case"SERVER-CONTROL":{var at=new p.AttrList(Te);O.canBlockReload=at.bool("CAN-BLOCK-RELOAD"),O.canSkipUntil=at.optionalFloat("CAN-SKIP-UNTIL",0),O.canSkipDateRanges=O.canSkipUntil>0&&at.bool("CAN-SKIP-DATERANGES"),O.partHoldBack=at.optionalFloat("PART-HOLD-BACK",0),O.holdBack=at.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Le=new p.AttrList(Te);O.partTarget=Le.decimalFloatingPoint("PART-TARGET");break}case"PART":{var ke=O.partList;ke||(ke=O.partList=[]);var Ye=z>0?ke[ke.length-1]:void 0,Ze=z++,Ve=new C.Part(new p.AttrList(Te),X,E,Ze,Ye);ke.push(Ve),X.duration+=Ve.duration;break}case"PRELOAD-HINT":{var He=new p.AttrList(Te);O.preloadHint=He;break}case"RENDITION-REPORT":{var Pe=new p.AttrList(Te);O.renditionReports=O.renditionReports||[],O.renditionReports.push(Pe);break}default:f.logger.warn("line parsed but not handled: "+Z);break}}}G&&!G.relurl?(D.pop(),ne-=G.duration,O.partList&&(O.fragmentHint=G)):O.partList&&(y(X,G),X.cc=j,O.fragmentHint=X);var Re=D.length,Oe=D[0],he=D[Re-1];if(ne+=O.skippedSegments*O.targetduration,ne>0&&Re&&he){O.averagetargetduration=ne/Re;var be=he.sn;O.endSN=be!=="initSegment"?be:0,Oe&&(O.startCC=Oe.cc,Oe.initSegment||O.fragments.every(function(Ce){return Ce.relurl&&n(Ce.relurl)})&&(f.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),X=new C.Fragment(x,E),X.relurl=he.relurl,X.level=o,X.sn="initSegment",Oe.initSegment=X,O.needSidxRanges=!0))}else O.endSN=0,O.startCC=0;return O.fragmentHint&&(ne+=O.fragmentHint.duration),O.totalduration=ne,O.endCC=j,ie>0&&b(D,ie),O},_}();function d(_,m){["video","audio","text"].forEach(function(g){var E=_.filter(function(x){return Object(l.isCodecType)(x,g)});if(E.length){var o=E.filter(function(x){return x.lastIndexOf("avc1",0)===0||x.lastIndexOf("mp4a",0)===0});m[g+"Codec"]=o.length>0?o[0]:E[0],_=_.filter(function(x){return E.indexOf(x)===-1})}}),m.unknownCodecs=_}function v(_,m,g){var E=m[g];E&&(_[g]=E)}function b(_,m){for(var g=_[m],E=m;E--;){var o=_[E];if(!o)return;o.programDateTime=g.programDateTime-o.duration*1e3,g=o}}function y(_,m){_.rawProgramDateTime?_.programDateTime=Date.parse(_.rawProgramDateTime):m!=null&&m.programDateTime&&(_.programDateTime=m.endProgramDateTime),Object(w.isFiniteNumber)(_.programDateTime)||(_.programDateTime=null,_.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(ae,Q,U){"use strict";U.r(Q);var w=U("./src/polyfills/number.ts"),P=U("./src/events.ts"),S=U("./src/errors.ts"),C=U("./src/utils/logger.ts"),T=U("./src/utils/mp4-tools.ts"),h=U("./src/loader/m3u8-parser.ts"),p=U("./src/types/loader.ts"),f=U("./src/utils/attr-list.ts");function l(s){var u=s.type;switch(u){case p.PlaylistContextType.AUDIO_TRACK:return p.PlaylistLevelType.AUDIO;case p.PlaylistContextType.SUBTITLE_TRACK:return p.PlaylistLevelType.SUBTITLE;default:return p.PlaylistLevelType.MAIN}}function a(s,u){var i=s.url;return(i===void 0||i.indexOf("data:")===0)&&(i=u.url),i}var c=function(){function s(i){this.hls=void 0,this.loaders=Object.create(null),this.hls=i,this.registerListeners()}var u=s.prototype;return u.registerListeners=function(){var n=this.hls;n.on(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(P.Events.LEVEL_LOADING,this.onLevelLoading,this),n.on(P.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),n.on(P.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},u.unregisterListeners=function(){var n=this.hls;n.off(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(P.Events.LEVEL_LOADING,this.onLevelLoading,this),n.off(P.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),n.off(P.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},u.createInternalLoader=function(n){var t=this.hls.config,d=t.pLoader,v=t.loader,b=d||v,y=new b(t);return n.loader=y,this.loaders[n.type]=y,y},u.getInternalLoader=function(n){return this.loaders[n.type]},u.resetInternalLoader=function(n){this.loaders[n]&&delete this.loaders[n]},u.destroyInternalLoaders=function(){for(var n in this.loaders){var t=this.loaders[n];t&&t.destroy(),this.resetInternalLoader(n)}},u.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},u.onManifestLoading=function(n,t){var d=t.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:p.PlaylistContextType.MANIFEST,url:d,deliveryDirectives:null})},u.onLevelLoading=function(n,t){var d=t.id,v=t.level,b=t.url,y=t.deliveryDirectives;this.load({id:d,groupId:null,level:v,responseType:"text",type:p.PlaylistContextType.LEVEL,url:b,deliveryDirectives:y})},u.onAudioTrackLoading=function(n,t){var d=t.id,v=t.groupId,b=t.url,y=t.deliveryDirectives;this.load({id:d,groupId:v,level:null,responseType:"text",type:p.PlaylistContextType.AUDIO_TRACK,url:b,deliveryDirectives:y})},u.onSubtitleTrackLoading=function(n,t){var d=t.id,v=t.groupId,b=t.url,y=t.deliveryDirectives;this.load({id:d,groupId:v,level:null,responseType:"text",type:p.PlaylistContextType.SUBTITLE_TRACK,url:b,deliveryDirectives:y})},u.load=function(n){var t,d=this.hls.config,v=this.getInternalLoader(n);if(v){var b=v.context;if(b&&b.url===n.url){C.logger.trace("[playlist-loader]: playlist request ongoing");return}C.logger.log("[playlist-loader]: aborting previous loader for type: "+n.type),v.abort()}var y,_,m,g;switch(n.type){case p.PlaylistContextType.MANIFEST:y=d.manifestLoadingMaxRetry,_=d.manifestLoadingTimeOut,m=d.manifestLoadingRetryDelay,g=d.manifestLoadingMaxRetryTimeout;break;case p.PlaylistContextType.LEVEL:case p.PlaylistContextType.AUDIO_TRACK:case p.PlaylistContextType.SUBTITLE_TRACK:y=0,_=d.levelLoadingTimeOut;break;default:y=d.levelLoadingMaxRetry,_=d.levelLoadingTimeOut,m=d.levelLoadingRetryDelay,g=d.levelLoadingMaxRetryTimeout;break}if(v=this.createInternalLoader(n),(t=n.deliveryDirectives)!==null&&t!==void 0&&t.part){var E;if(n.type===p.PlaylistContextType.LEVEL&&n.level!==null?E=this.hls.levels[n.level].details:n.type===p.PlaylistContextType.AUDIO_TRACK&&n.id!==null?E=this.hls.audioTracks[n.id].details:n.type===p.PlaylistContextType.SUBTITLE_TRACK&&n.id!==null&&(E=this.hls.subtitleTracks[n.id].details),E){var o=E.partTarget,x=E.targetduration;o&&x&&(_=Math.min(Math.max(o*3,x*.8)*1e3,_))}}var A={timeout:_,maxRetry:y,retryDelay:m,maxRetryDelay:g,highWaterMark:0},O={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};v.load(n,A,O)},u.loadsuccess=function(n,t,d,v){if(v===void 0&&(v=null),d.isSidxRequest){this.handleSidxRequest(n,d),this.handlePlaylistLoaded(n,t,d,v);return}this.resetInternalLoader(d.type);var b=n.data;if(b.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(n,d,"no EXTM3U delimiter",v);return}t.parsing.start=performance.now(),b.indexOf("#EXTINF:")>0||b.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(n,t,d,v):this.handleMasterPlaylist(n,t,d,v)},u.loaderror=function(n,t,d){d===void 0&&(d=null),this.handleNetworkError(t,d,!1,n)},u.loadtimeout=function(n,t,d){d===void 0&&(d=null),this.handleNetworkError(t,d,!0)},u.handleMasterPlaylist=function(n,t,d,v){var b=this.hls,y=n.data,_=a(n,d),m=h.default.parseMasterPlaylist(y,_),g=m.levels,E=m.sessionData;if(!g.length){this.handleManifestParsingError(n,d,"no level found in manifest",v);return}var o=g.map(function(F){return{id:F.attrs.AUDIO,audioCodec:F.audioCodec}}),x=g.map(function(F){return{id:F.attrs.SUBTITLES,textCodec:F.textCodec}}),A=h.default.parseMasterPlaylistMedia(y,_,"AUDIO",o),O=h.default.parseMasterPlaylistMedia(y,_,"SUBTITLES",x),D=h.default.parseMasterPlaylistMedia(y,_,"CLOSED-CAPTIONS");if(A.length){var I=A.some(function(F){return!F.url});!I&&g[0].audioCodec&&!g[0].attrs.AUDIO&&(C.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),A.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new f.AttrList({}),bitrate:0,url:""}))}b.trigger(P.Events.MANIFEST_LOADED,{levels:g,audioTracks:A,subtitles:O,captions:D,url:_,stats:t,networkDetails:v,sessionData:E})},u.handleTrackOrLevelPlaylist=function(n,t,d,v){var b=this.hls,y=d.id,_=d.level,m=d.type,g=a(n,d),E=Object(w.isFiniteNumber)(y)?y:0,o=Object(w.isFiniteNumber)(_)?_:E,x=l(d),A=h.default.parseLevelPlaylist(n.data,g,o,x,E);if(!A.fragments.length){b.trigger(P.Events.ERROR,{type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:g,reason:"no fragments found in level",level:typeof d.level=="number"?d.level:void 0});return}if(m===p.PlaylistContextType.MANIFEST){var O={attrs:new f.AttrList({}),bitrate:0,details:A,name:"",url:g};b.trigger(P.Events.MANIFEST_LOADED,{levels:[O],audioTracks:[],url:g,stats:t,networkDetails:v,sessionData:null})}if(t.parsing.end=performance.now(),A.needSidxRanges){var D,I=(D=A.fragments[0].initSegment)===null||D===void 0?void 0:D.url;this.load({url:I,isSidxRequest:!0,type:m,level:_,levelDetails:A,id:y,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}d.levelDetails=A,this.handlePlaylistLoaded(n,t,d,v)},u.handleSidxRequest=function(n,t){var d=Object(T.parseSegmentIndex)(new Uint8Array(n.data));if(!d)return;var v=d.references,b=t.levelDetails;v.forEach(function(y,_){var m=y.info,g=b.fragments[_];g.byteRange.length===0&&g.setByteRange(String(1+m.end-m.start)+"@"+String(m.start)),g.initSegment&&g.initSegment.setByteRange(String(d.moovEndOffset)+"@0")})},u.handleManifestParsingError=function(n,t,d,v){this.hls.trigger(P.Events.ERROR,{type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:t.type===p.PlaylistContextType.MANIFEST,url:n.url,reason:d,response:n,context:t,networkDetails:v})},u.handleNetworkError=function(n,t,d,v){d===void 0&&(d=!1),C.logger.warn("[playlist-loader]: A network "+(d?"timeout":"error")+" occurred while loading "+n.type+" level: "+n.level+" id: "+n.id+' group-id: "'+n.groupId+'"');var b=S.ErrorDetails.UNKNOWN,y=!1,_=this.getInternalLoader(n);switch(n.type){case p.PlaylistContextType.MANIFEST:b=d?S.ErrorDetails.MANIFEST_LOAD_TIMEOUT:S.ErrorDetails.MANIFEST_LOAD_ERROR,y=!0;break;case p.PlaylistContextType.LEVEL:b=d?S.ErrorDetails.LEVEL_LOAD_TIMEOUT:S.ErrorDetails.LEVEL_LOAD_ERROR,y=!1;break;case p.PlaylistContextType.AUDIO_TRACK:b=d?S.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:S.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,y=!1;break;case p.PlaylistContextType.SUBTITLE_TRACK:b=d?S.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:S.ErrorDetails.SUBTITLE_LOAD_ERROR,y=!1;break}_&&this.resetInternalLoader(n.type);var m={type:S.ErrorTypes.NETWORK_ERROR,details:b,fatal:y,url:n.url,loader:_,context:n,networkDetails:t};v&&(m.response=v),this.hls.trigger(P.Events.ERROR,m)},u.handlePlaylistLoaded=function(n,t,d,v){var b=d.type,y=d.level,_=d.id,m=d.groupId,g=d.loader,E=d.levelDetails,o=d.deliveryDirectives;if(!(E!=null&&E.targetduration)){this.handleManifestParsingError(n,d,"invalid target duration",v);return}if(!g)return;E.live&&(g.getCacheAge&&(E.ageHeader=g.getCacheAge()||0),(!g.getCacheAge||isNaN(E.ageHeader))&&(E.ageHeader=0));switch(b){case p.PlaylistContextType.MANIFEST:case p.PlaylistContextType.LEVEL:this.hls.trigger(P.Events.LEVEL_LOADED,{details:E,level:y||0,id:_||0,stats:t,networkDetails:v,deliveryDirectives:o});break;case p.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(P.Events.AUDIO_TRACK_LOADED,{details:E,id:_||0,groupId:m||"",stats:t,networkDetails:v,deliveryDirectives:o});break;case p.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(P.Events.SUBTITLE_TRACK_LOADED,{details:E,id:_||0,groupId:m||"",stats:t,networkDetails:v,deliveryDirectives:o});break}},s}();Q.default=c},"./src/polyfills/number.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"isFiniteNumber",function(){return w}),U.d(Q,"MAX_SAFE_INTEGER",function(){return P});var w=Number.isFinite||function(S){return typeof S=="number"&&isFinite(S)},P=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(ae,Q,U){"use strict";U.r(Q);var w=function(){function P(){}return P.getSilentFrame=function(C,T){switch(C){case"mp4a.40.2":if(T===1)return new Uint8Array([0,200,0,128,35,128]);if(T===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(T===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(T===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(T===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(T===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(T===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(T===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(T===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},P}();Q.default=w},"./src/remux/mp4-generator.ts":function(ae,Q,U){"use strict";U.r(Q);var w=Math.pow(2,32)-1,P=function(){function S(){}return S.init=function(){S.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 T;for(T in S.types)S.types.hasOwnProperty(T)&&(S.types[T]=[T.charCodeAt(0),T.charCodeAt(1),T.charCodeAt(2),T.charCodeAt(3)]);var h=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]),p=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]);S.HDLR_TYPES={video:h,audio:p};var f=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),l=new Uint8Array([0,0,0,0,0,0,0,0]);S.STTS=S.STSC=S.STCO=l,S.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),S.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),S.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),S.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var a=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),s=new Uint8Array([0,0,0,1]);S.FTYP=S.box(S.types.ftyp,a,s,a,c),S.DINF=S.box(S.types.dinf,S.box(S.types.dref,f))},S.box=function(T){for(var h=8,p=arguments.length,f=new Array(p>1?p-1:0),l=1;l<p;l++)f[l-1]=arguments[l];for(var a=f.length,c=a;a--;)h+=f[a].byteLength;var s=new Uint8Array(h);for(s[0]=h>>24&255,s[1]=h>>16&255,s[2]=h>>8&255,s[3]=h&255,s.set(T,4),a=0,h=8;a<c;a++)s.set(f[a],h),h+=f[a].byteLength;return s},S.hdlr=function(T){return S.box(S.types.hdlr,S.HDLR_TYPES[T])},S.mdat=function(T){return S.box(S.types.mdat,T)},S.mdhd=function(T,h){h*=T;var p=Math.floor(h/(w+1)),f=Math.floor(h%(w+1));return S.box(S.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,T>>24&255,T>>16&255,T>>8&255,T&255,p>>24,p>>16&255,p>>8&255,p&255,f>>24,f>>16&255,f>>8&255,f&255,85,196,0,0]))},S.mdia=function(T){return S.box(S.types.mdia,S.mdhd(T.timescale,T.duration),S.hdlr(T.type),S.minf(T))},S.mfhd=function(T){return S.box(S.types.mfhd,new Uint8Array([0,0,0,0,T>>24,T>>16&255,T>>8&255,T&255]))},S.minf=function(T){return T.type==="audio"?S.box(S.types.minf,S.box(S.types.smhd,S.SMHD),S.DINF,S.stbl(T)):S.box(S.types.minf,S.box(S.types.vmhd,S.VMHD),S.DINF,S.stbl(T))},S.moof=function(T,h,p){return S.box(S.types.moof,S.mfhd(T),S.traf(p,h))},S.moov=function(T){for(var h=T.length,p=[];h--;)p[h]=S.trak(T[h]);return S.box.apply(null,[S.types.moov,S.mvhd(T[0].timescale,T[0].duration)].concat(p).concat(S.mvex(T)))},S.mvex=function(T){for(var h=T.length,p=[];h--;)p[h]=S.trex(T[h]);return S.box.apply(null,[S.types.mvex].concat(p))},S.mvhd=function(T,h){h*=T;var p=Math.floor(h/(w+1)),f=Math.floor(h%(w+1)),l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,T>>24&255,T>>16&255,T>>8&255,T&255,p>>24,p>>16&255,p>>8&255,p&255,f>>24,f>>16&255,f>>8&255,f&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 S.box(S.types.mvhd,l)},S.sdtp=function(T){var h=T.samples||[],p=new Uint8Array(4+h.length),f,l;for(f=0;f<h.length;f++)l=h[f].flags,p[f+4]=l.dependsOn<<4|l.isDependedOn<<2|l.hasRedundancy;return S.box(S.types.sdtp,p)},S.stbl=function(T){return S.box(S.types.stbl,S.stsd(T),S.box(S.types.stts,S.STTS),S.box(S.types.stsc,S.STSC),S.box(S.types.stsz,S.STSZ),S.box(S.types.stco,S.STCO))},S.avc1=function(T){var h=[],p=[],f,l,a;for(f=0;f<T.sps.length;f++)l=T.sps[f],a=l.byteLength,h.push(a>>>8&255),h.push(a&255),h=h.concat(Array.prototype.slice.call(l));for(f=0;f<T.pps.length;f++)l=T.pps[f],a=l.byteLength,p.push(a>>>8&255),p.push(a&255),p=p.concat(Array.prototype.slice.call(l));var c=S.box(S.types.avcC,new Uint8Array([1,h[3],h[4],h[5],252|3,224|T.sps.length].concat(h).concat([T.pps.length]).concat(p))),s=T.width,u=T.height,i=T.pixelRatio[0],n=T.pixelRatio[1];return S.box(S.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,s>>8&255,s&255,u>>8&255,u&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]),c,S.box(S.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),S.box(S.types.pasp,new Uint8Array([i>>24,i>>16&255,i>>8&255,i&255,n>>24,n>>16&255,n>>8&255,n&255])))},S.esds=function(T){var h=T.config.length;return new Uint8Array([0,0,0,0,3,23+h,0,1,0,4,15+h,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([h]).concat(T.config).concat([6,1,2]))},S.mp4a=function(T){var h=T.samplerate;return S.box(S.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,T.channelCount,0,16,0,0,0,0,h>>8&255,h&255,0,0]),S.box(S.types.esds,S.esds(T)))},S.mp3=function(T){var h=T.samplerate;return S.box(S.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,T.channelCount,0,16,0,0,0,0,h>>8&255,h&255,0,0]))},S.stsd=function(T){return T.type==="audio"?!T.isAAC&&T.codec==="mp3"?S.box(S.types.stsd,S.STSD,S.mp3(T)):S.box(S.types.stsd,S.STSD,S.mp4a(T)):S.box(S.types.stsd,S.STSD,S.avc1(T))},S.tkhd=function(T){var h=T.id,p=T.duration*T.timescale,f=T.width,l=T.height,a=Math.floor(p/(w+1)),c=Math.floor(p%(w+1));return S.box(S.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,h>>24&255,h>>16&255,h>>8&255,h&255,0,0,0,0,a>>24,a>>16&255,a>>8&255,a&255,c>>24,c>>16&255,c>>8&255,c&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,f>>8&255,f&255,0,0,l>>8&255,l&255,0,0]))},S.traf=function(T,h){var p=S.sdtp(T),f=T.id,l=Math.floor(h/(w+1)),a=Math.floor(h%(w+1));return S.box(S.types.traf,S.box(S.types.tfhd,new Uint8Array([0,0,0,0,f>>24,f>>16&255,f>>8&255,f&255])),S.box(S.types.tfdt,new Uint8Array([1,0,0,0,l>>24,l>>16&255,l>>8&255,l&255,a>>24,a>>16&255,a>>8&255,a&255])),S.trun(T,p.length+16+20+8+16+8+8),p)},S.trak=function(T){return T.duration=T.duration||4294967295,S.box(S.types.trak,S.tkhd(T),S.mdia(T))},S.trex=function(T){var h=T.id;return S.box(S.types.trex,new Uint8Array([0,0,0,0,h>>24,h>>16&255,h>>8&255,h&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},S.trun=function(T,h){var p=T.samples||[],f=p.length,l=12+16*f,a=new Uint8Array(l),c,s,u,i,n,t;for(h+=8+l,a.set([0,0,15,1,f>>>24&255,f>>>16&255,f>>>8&255,f&255,h>>>24&255,h>>>16&255,h>>>8&255,h&255],0),c=0;c<f;c++)s=p[c],u=s.duration,i=s.size,n=s.flags,t=s.cts,a.set([u>>>24&255,u>>>16&255,u>>>8&255,u&255,i>>>24&255,i>>>16&255,i>>>8&255,i&255,n.isLeading<<2|n.dependsOn,n.isDependedOn<<6|n.hasRedundancy<<4|n.paddingValue<<1|n.isNonSync,n.degradPrio&240<<8,n.degradPrio&15,t>>>24&255,t>>>16&255,t>>>8&255,t&255],12+16*c);return S.box(S.types.trun,a)},S.initSegment=function(T){S.types||S.init();var h=S.moov(T),p=new Uint8Array(S.FTYP.byteLength+h.byteLength);return p.set(S.FTYP),p.set(h,S.FTYP.byteLength),p},S}();P.types=void 0,P.HDLR_TYPES=void 0,P.STTS=void 0,P.STSC=void 0,P.STCO=void 0,P.STSZ=void 0,P.VMHD=void 0,P.SMHD=void 0,P.STSD=void 0,P.FTYP=void 0,P.DINF=void 0,Q.default=P},"./src/remux/mp4-remuxer.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"default",function(){return t}),U.d(Q,"normalizePts",function(){return d});var w=U("./src/polyfills/number.ts"),P=U("./src/remux/aac-helper.ts"),S=U("./src/remux/mp4-generator.ts"),C=U("./src/events.ts"),T=U("./src/errors.ts"),h=U("./src/utils/logger.ts"),p=U("./src/types/loader.ts"),f=U("./src/utils/timescale-conversion.ts");function l(){return l=Object.assign||function(_){for(var m=1;m<arguments.length;m++){var g=arguments[m];for(var E in g)Object.prototype.hasOwnProperty.call(g,E)&&(_[E]=g[E])}return _},l.apply(this,arguments)}var a=10*1e3,c=1024,s=1152,u=null,i=null,n=!1,t=function(){function _(g,E,o,x){if(x===void 0&&(x=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=g,this.config=E,this.typeSupported=o,this.ISGenerated=!1,u===null){var A=navigator.userAgent||"",O=A.match(/Chrome\/(\d+)/i);u=O?parseInt(O[1]):0}if(i===null){var D=navigator.userAgent.match(/Safari\/(\d+)/i);i=D?parseInt(D[1]):0}n=!!u&&u<75||!!i&&i<600}var m=_.prototype;return m.destroy=function(){},m.resetTimeStamp=function(E){h.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=E},m.resetNextTimestamp=function(){h.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},m.resetInitSegment=function(){h.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},m.getVideoStartPts=function(E){var o=!1,x=E.reduce(function(A,O){var D=O.pts-A;return D<-4294967296?(o=!0,d(A,O.pts)):D>0?A:O.pts},E[0].pts);return o&&h.logger.debug("PTS rollover detected"),x},m.remux=function(E,o,x,A,O,D,I,F){var z,ne,j,G,X,Z,K=O,q=O,ie=E.pid>-1,oe=o.pid>-1,ye=o.samples.length,pe=E.samples.length>0,we=ye>1,fe=(!ie||pe)&&(!oe||we)||this.ISGenerated||I;if(fe){this.ISGenerated||(j=this.generateIS(E,o,O));var Te=this.isVideoContiguous,Fe=-1;if(we&&(Fe=v(o.samples),!Te&&this.config.forceKeyFrameOnDiscontinuity))if(Z=!0,Fe>0){h.logger.warn("[mp4-remuxer]: Dropped "+Fe+" out of "+ye+" video samples due to a missing keyframe");var De=this.getVideoStartPts(o.samples);o.samples=o.samples.slice(Fe),o.dropped+=Fe,q+=(o.samples[0].pts-De)/(o.timescale||9e4)}else Fe===-1&&(h.logger.warn("[mp4-remuxer]: No keyframe found out of "+ye+" video samples"),Z=!1);if(this.ISGenerated){if(pe&&we){var Me=this.getVideoStartPts(o.samples),Ue=d(E.samples[0].pts,Me)-Me,ve=Ue/o.inputTimeScale;K+=Math.max(0,ve),q+=Math.max(0,-ve)}if(pe){if(E.samplerate||(h.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),j=this.generateIS(E,o,O)),ne=this.remuxAudio(E,K,this.isAudioContiguous,D,oe||we||F===p.PlaylistLevelType.AUDIO?q:void 0),we){var ce=ne?ne.endPTS-ne.startPTS:0;o.inputTimeScale||(h.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),j=this.generateIS(E,o,O)),z=this.remuxVideo(o,q,Te,ce)}}else we&&(z=this.remuxVideo(o,q,Te,0));z&&(z.firstKeyFrame=Fe,z.independent=Fe!==-1)}}return this.ISGenerated&&(x.samples.length&&(X=this.remuxID3(x,O)),A.samples.length&&(G=this.remuxText(A,O))),{audio:ne,video:z,initSegment:j,independent:Z,text:G,id3:X}},m.generateIS=function(E,o,x){var A=E.samples,O=o.samples,D=this.typeSupported,I={},F=!Object(w.isFiniteNumber)(this._initPTS),z="audio/mp4",ne,j,G;if(F&&(ne=j=Infinity),E.config&&A.length&&(E.timescale=E.samplerate,E.isAAC||(D.mpeg?(z="audio/mpeg",E.codec=""):D.mp3&&(E.codec="mp3")),I.audio={id:"audio",container:z,codec:E.codec,initSegment:!E.isAAC&&D.mpeg?new Uint8Array(0):S.default.initSegment([E]),metadata:{channelCount:E.channelCount}},F&&(G=E.inputTimeScale,ne=j=A[0].pts-Math.round(G*x))),o.sps&&o.pps&&O.length&&(o.timescale=o.inputTimeScale,I.video={id:"main",container:"video/mp4",codec:o.codec,initSegment:S.default.initSegment([o]),metadata:{width:o.width,height:o.height}},F)){G=o.inputTimeScale;var X=this.getVideoStartPts(O),Z=Math.round(G*x);j=Math.min(j,d(O[0].dts,X)-Z),ne=Math.min(ne,X-Z)}if(Object.keys(I).length)return this.ISGenerated=!0,F&&(this._initPTS=ne,this._initDTS=j),{tracks:I,initPTS:ne,timescale:G}},m.remuxVideo=function(E,o,x,A){var O=E.inputTimeScale,D=E.samples,I=[],F=D.length,z=this._initPTS,ne=this.nextAvcDts,j=8,G,X,Z,K=Number.POSITIVE_INFINITY,q=Number.NEGATIVE_INFINITY,ie=0,oe=!1;if(!x||ne===null){var ye=o*O,pe=D[0].pts-d(D[0].dts,D[0].pts);ne=ye-pe}for(var we=0;we<F;we++){var fe=D[we];if(fe.pts=d(fe.pts-z,ne),fe.dts=d(fe.dts-z,ne),fe.dts>fe.pts){var Te=9e4*.2;ie=Math.max(Math.min(ie,fe.pts-fe.dts),-1*Te)}fe.dts<D[we>0?we-1:we].dts&&(oe=!0)}oe&&D.sort(function(wt,st){var ut=wt.dts-st.dts,$e=wt.pts-st.pts;return ut||$e}),X=D[0].dts,Z=D[D.length-1].dts;var Fe=Math.round((Z-X)/(F-1));if(ie<0){if(ie<Fe*-2){h.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(f.toMsFromMpegTsClock)(-Fe,!0)+" ms");for(var De=ie,Me=0;Me<F;Me++)D[Me].dts=De=Math.max(De,D[Me].pts-Fe),D[Me].pts=Math.max(De,D[Me].pts)}else{h.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(f.toMsFromMpegTsClock)(ie,!0)+" ms to overcome this issue");for(var Ue=0;Ue<F;Ue++)D[Ue].dts=D[Ue].dts+ie}X=D[0].dts}if(x){var ve=X-ne,ce=ve>Fe,Ie=ve<-1;if(ce||Ie){ce?h.logger.warn("AVC: "+Object(f.toMsFromMpegTsClock)(ve,!0)+" ms ("+ve+"dts) hole between fragments detected, filling it"):h.logger.warn("AVC: "+Object(f.toMsFromMpegTsClock)(-ve,!0)+" ms ("+ve+"dts) overlapping between fragments detected"),X=ne;var Ne=D[0].pts-ve;D[0].dts=X,D[0].pts=Ne,h.logger.log("Video: First PTS/DTS adjusted: "+Object(f.toMsFromMpegTsClock)(Ne,!0)+"/"+Object(f.toMsFromMpegTsClock)(X,!0)+", delta: "+Object(f.toMsFromMpegTsClock)(ve,!0)+" ms")}}n&&(X=Math.max(0,X));for(var Xe=0,ee=0,k=0;k<F;k++){for(var N=D[k],$=N.units,V=$.length,Y=0,me=0;me<V;me++)Y+=$[me].data.length;ee+=Y,Xe+=V,N.length=Y,N.dts=Math.max(N.dts,X),N.pts=Math.max(N.pts,N.dts,0),K=Math.min(N.pts,K),q=Math.max(N.pts,q)}Z=D[F-1].dts;var Ae=ee+4*Xe+8,at;try{at=new Uint8Array(Ae)}catch(wt){this.observer.emit(C.Events.ERROR,C.Events.ERROR,{type:T.ErrorTypes.MUX_ERROR,details:T.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Ae,reason:"fail allocating video mdat "+Ae});return}var Le=new DataView(at.buffer);Le.setUint32(0,Ae),at.set(S.default.types.mdat,4);for(var ke=0;ke<F;ke++){for(var Ye=D[ke],Ze=Ye.units,Ve=0,He=0,Pe=Ze.length;He<Pe;He++){var Re=Ze[He],Oe=Re.data,he=Re.data.byteLength;Le.setUint32(j,he),j+=4,at.set(Oe,j),j+=he,Ve+=4+he}if(ke<F-1)G=D[ke+1].dts-Ye.dts;else{var be=this.config,Ce=Ye.dts-D[ke>0?ke-1:ke].dts;if(be.stretchShortVideoTrack&&this.nextAudioPts!==null){var xe=Math.floor(be.maxBufferHole*O),Be=(A?K+A*O:this.nextAudioPts)-Ye.pts;Be>xe?(G=Be-Ce,G<0&&(G=Ce),h.logger.log("[mp4-remuxer]: It is approximately "+Be/90+" ms to the next segment; using duration "+G/90+" ms for the last video frame.")):G=Ce}else G=Ce}var Qe=Math.round(Ye.pts-Ye.dts);I.push(new b(Ye.key,G,Ve,Qe))}if(I.length&&u&&u<70){var rt=I[0].flags;rt.dependsOn=2,rt.isNonSync=0}console.assert(G!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=ne=Z+G,this.isVideoContiguous=!0;var dt=S.default.moof(E.sequenceNumber++,X,l({},E,{samples:I})),xt="video",_t={data1:dt,data2:at,startPTS:K/O,endPTS:(q+G)/O,startDTS:X/O,endDTS:ne/O,type:xt,hasAudio:!1,hasVideo:!0,nb:I.length,dropped:E.dropped};return E.samples=[],E.dropped=0,console.assert(at.length,"MDAT length must not be zero"),_t},m.remuxAudio=function(E,o,x,A,O){var D=E.inputTimeScale,I=E.samplerate?E.samplerate:D,F=D/I,z=E.isAAC?c:s,ne=z*F,j=this._initPTS,G=!E.isAAC&&this.typeSupported.mpeg,X=[],Z=E.samples,K=G?0:8,q=this.nextAudioPts||-1,ie=o*D;if(this.isAudioContiguous=x=x||Z.length&&q>0&&(A&&Math.abs(ie-q)<9e3||Math.abs(d(Z[0].pts-j,ie)-q)<20*ne),Z.forEach(function(Oe){Oe.pts=d(Oe.pts-j,ie)}),!x||q<0){if(Z=Z.filter(function(Oe){return Oe.pts>=0}),!Z.length)return;O===0?q=0:A?q=Math.max(0,ie):q=Z[0].pts}if(E.isAAC)for(var oe=O!==void 0,ye=this.config.maxAudioFramesDrift,pe=0,we=q;pe<Z.length;pe++){var fe=Z[pe],Te=fe.pts,Fe=Te-we,De=Math.abs(1e3*Fe/D);if(Fe<=-ye*ne&&oe)pe===0&&(h.logger.warn("Audio frame @ "+(Te/D).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*Fe/D)+" ms."),this.nextAudioPts=q=we=Te);else if(Fe>=ye*ne&&De<a&&oe){var Me=Math.round(Fe/ne);we=Te-Me*ne,we<0&&(Me--,we+=ne),pe===0&&(this.nextAudioPts=q=we),h.logger.warn("[mp4-remuxer]: Injecting "+Me+" audio frame @ "+(we/D).toFixed(3)+"s due to "+Math.round(1e3*Fe/D)+" ms gap.");for(var Ue=0;Ue<Me;Ue++){var ve=Math.max(we,0),ce=P.default.getSilentFrame(E.manifestCodec||E.codec,E.channelCount);ce||(h.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),ce=fe.unit.subarray()),Z.splice(pe,0,{unit:ce,pts:ve}),we+=ne,pe++}}fe.pts=we,we+=ne}for(var Ie=null,Ne=null,Xe,ee=0,k=Z.length;k--;)ee+=Z[k].unit.byteLength;for(var N=0,$=Z.length;N<$;N++){var V=Z[N],Y=V.unit,me=V.pts;if(Ne!==null){var Ae=X[N-1];Ae.duration=Math.round((me-Ne)/F)}else if(x&&E.isAAC&&(me=q),Ie=me,ee>0){ee+=K;try{Xe=new Uint8Array(ee)}catch(Oe){this.observer.emit(C.Events.ERROR,C.Events.ERROR,{type:T.ErrorTypes.MUX_ERROR,details:T.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:ee,reason:"fail allocating audio mdat "+ee});return}if(!G){var at=new DataView(Xe.buffer);at.setUint32(0,ee),Xe.set(S.default.types.mdat,4)}}else return;Xe.set(Y,K);var Le=Y.byteLength;K+=Le,X.push(new b(!0,z,Le,0)),Ne=me}var ke=X.length;if(!ke)return;var Ye=X[X.length-1];this.nextAudioPts=q=Ne+F*Ye.duration;var Ze=G?new Uint8Array(0):S.default.moof(E.sequenceNumber++,Ie/F,l({},E,{samples:X}));E.samples=[];var Ve=Ie/D,He=q/D,Pe="audio",Re={data1:Ze,data2:Xe,startPTS:Ve,endPTS:He,startDTS:Ve,endDTS:He,type:Pe,hasAudio:!0,hasVideo:!1,nb:ke};return this.isAudioContiguous=!0,console.assert(Xe.length,"MDAT length must not be zero"),Re},m.remuxEmptyAudio=function(E,o,x,A){var O=E.inputTimeScale,D=E.samplerate?E.samplerate:O,I=O/D,F=this.nextAudioPts,z=(F!==null?F:A.startDTS*O)+this._initDTS,ne=A.endDTS*O+this._initDTS,j=I*c,G=Math.ceil((ne-z)/j),X=P.default.getSilentFrame(E.manifestCodec||E.codec,E.channelCount);if(h.logger.warn("[mp4-remuxer]: remux empty Audio"),!X){h.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var Z=[],K=0;K<G;K++){var q=z+K*j;Z.push({unit:X,pts:q,dts:q})}return E.samples=Z,this.remuxAudio(E,o,x,!1)},m.remuxID3=function(E,o){var x=E.samples.length;if(!x)return;for(var A=E.inputTimeScale,O=this._initPTS,D=this._initDTS,I=0;I<x;I++){var F=E.samples[I];F.pts=d(F.pts-O,o*A)/A,F.dts=d(F.dts-D,o*A)/A}var z=E.samples;return E.samples=[],{samples:z}},m.remuxText=function(E,o){var x=E.samples.length;if(!x)return;for(var A=E.inputTimeScale,O=this._initPTS,D=0;D<x;D++){var I=E.samples[D];I.pts=d(I.pts-O,o*A)/A}E.samples.sort(function(z,ne){return z.pts-ne.pts});var F=E.samples;return E.samples=[],{samples:F}},_}();function d(_,m){var g;if(m===null)return _;for(m<_?g=-8589934592:g=8589934592;Math.abs(_-m)>4294967296;)_+=g;return _}function v(_){for(var m=0;m<_.length;m++)if(_[m].key)return m;return-1}var b=function(m,g,E,o){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=g,this.size=E,this.cts=o,this.flags=new y(m)},y=function(m){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=m?2:1,this.isNonSync=m?0:1}},"./src/remux/passthrough-remuxer.ts":function(ae,Q,U){"use strict";U.r(Q);var w=U("./src/polyfills/number.ts"),P=U("./src/utils/mp4-tools.ts"),S=U("./src/loader/fragment.ts"),C=U("./src/utils/logger.ts"),T=function(){function f(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndDTS=null}var l=f.prototype;return l.destroy=function(){},l.resetTimeStamp=function(c){this.initPTS=c,this.lastEndDTS=null},l.resetNextTimestamp=function(){this.lastEndDTS=null},l.resetInitSegment=function(c,s,u){this.audioCodec=s,this.videoCodec=u,this.generateInitSegment(c),this.emitInitSegment=!0},l.generateInitSegment=function(c){var s=this.audioCodec,u=this.videoCodec;if(!c||!c.byteLength){this.initTracks=void 0,this.initData=void 0;return}var i=this.initData=Object(P.parseInitSegment)(c);s||(s=p(i.audio,S.ElementaryStreamTypes.AUDIO)),u||(u=p(i.video,S.ElementaryStreamTypes.VIDEO));var n={};i.audio&&i.video?n.audiovideo={container:"video/mp4",codec:s+","+u,initSegment:c,id:"main"}:i.audio?n.audio={container:"audio/mp4",codec:s,initSegment:c,id:"audio"}:i.video?n.video={container:"video/mp4",codec:u,initSegment:c,id:"main"}:C.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=n},l.remux=function(c,s,u,i,n){var t=this.initPTS,d=this.lastEndDTS,v={audio:void 0,video:void 0,text:i,id3:u,initSegment:void 0};Object(w.isFiniteNumber)(d)||(d=this.lastEndDTS=n||0);var b=s.samples;if(!b||!b.length)return v;var y={initPTS:void 0,timescale:1},_=this.initData;if((!_||!_.length)&&(this.generateInitSegment(b),_=this.initData),!_||!_.length)return C.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),v;this.emitInitSegment&&(y.tracks=this.initTracks,this.emitInitSegment=!1),Object(w.isFiniteNumber)(t)||(this.initPTS=y.initPTS=t=h(_,b,d));var m=Object(P.getDuration)(b,_),g=d,E=m+g;Object(P.offsetStartDTS)(_,b,t),m>0?this.lastEndDTS=E:(C.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var o=!!_.audio,x=!!_.video,A="";o&&(A+="audio"),x&&(A+="video");var O={data1:b,startPTS:g,startDTS:g,endPTS:E,endDTS:E,type:A,hasAudio:o,hasVideo:x,nb:1,dropped:0};return v.audio=O.type==="audio"?O:void 0,v.video=O.type!=="audio"?O:void 0,v.text=i,v.id3=u,v.initSegment=y,v},f}(),h=function(l,a,c){return Object(P.getStartDTS)(l,a)-c};function p(f,l){var a=f==null?void 0:f.codec;return a&&a.length>4?a:a==="hvc1"?"hvc1.1.c.L120.90":a==="av01"?"av01.0.04M.08":a==="avc1"||l===S.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}Q.default=T},"./src/task-loop.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"default",function(){return w});var w=function(){function P(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var S=P.prototype;return S.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},S.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},S.onHandlerDestroyed=function(){},S.hasInterval=function(){return!!this._tickInterval},S.hasNextTick=function(){return!!this._tickTimer},S.setInterval=function(T){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,T),!0)},S.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},S.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},S.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},S.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},S.doTick=function(){},P}()},"./src/types/cmcd.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"CMCDVersion",function(){return w}),U.d(Q,"CMCDObjectType",function(){return P}),U.d(Q,"CMCDStreamingFormat",function(){return S}),U.d(Q,"CMCDStreamType",function(){return C});var w=1,P;(function(T){T.MANIFEST="m",T.AUDIO="a",T.VIDEO="v",T.MUXED="av",T.INIT="i",T.CAPTION="c",T.TIMED_TEXT="tt",T.KEY="k",T.OTHER="o"})(P||(P={}));var S;(function(T){T.DASH="d",T.HLS="h",T.SMOOTH="s",T.OTHER="o"})(S||(S={}));var C;(function(T){T.VOD="v",T.LIVE="l"})(C||(C={}))},"./src/types/level.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"HlsSkip",function(){return S}),U.d(Q,"getSkipValue",function(){return C}),U.d(Q,"HlsUrlParameters",function(){return T}),U.d(Q,"Level",function(){return h});function w(p,f){for(var l=0;l<f.length;l++){var a=f[l];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(p,a.key,a)}}function P(p,f,l){return f&&w(p.prototype,f),l&&w(p,l),p}var S;(function(p){p.No="",p.Yes="YES",p.v2="v2"})(S||(S={}));function C(p,f){var l=p.canSkipUntil,a=p.canSkipDateRanges,c=p.endSN,s=f!==void 0?f-c:0;return l&&s<l?a?S.v2:S.Yes:S.No}var T=function(){function p(l,a,c){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=l,this.part=a,this.skip=c}var f=p.prototype;return f.addDirectives=function(a){var c=new self.URL(a);return this.msn!==void 0&&c.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&c.searchParams.set("_HLS_part",this.part.toString()),this.skip&&c.searchParams.set("_HLS_skip",this.skip),c.toString()},p}(),h=function(){function p(f){this.attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[f.url],this.attrs=f.attrs,this.bitrate=f.bitrate,f.details&&(this.details=f.details),this.id=f.id||0,this.name=f.name,this.width=f.width||0,this.height=f.height||0,this.audioCodec=f.audioCodec,this.videoCodec=f.videoCodec,this.unknownCodecs=f.unknownCodecs,this.codecSet=[f.videoCodec,f.audioCodec].filter(function(l){return l}).join(",").replace(/\.[^.,]+/g,"")}return P(p,[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(l){var a=l%this.url.length;this._urlId!==a&&(this.details=void 0,this._urlId=a)}}]),p}()},"./src/types/loader.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"PlaylistContextType",function(){return w}),U.d(Q,"PlaylistLevelType",function(){return P});var w;(function(S){S.MANIFEST="manifest",S.LEVEL="level",S.AUDIO_TRACK="audioTrack",S.SUBTITLE_TRACK="subtitleTrack"})(w||(w={}));var P;(function(S){S.MAIN="main",S.AUDIO="audio",S.SUBTITLE="subtitle"})(P||(P={}))},"./src/types/transmuxer.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"ChunkMetadata",function(){return w});var w=function(C,T,h,p,f,l){p===void 0&&(p=0),f===void 0&&(f=-1),l===void 0&&(l=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=P(),this.buffering={audio:P(),video:P(),audiovideo:P()},this.level=C,this.sn=T,this.id=h,this.size=p,this.part=f,this.partial=l};function P(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"AttrList",function(){return S});var w=/^(\d+)x(\d+)$/,P=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,S=function(){function C(h){typeof h=="string"&&(h=C.parseAttrList(h));for(var p in h)h.hasOwnProperty(p)&&(this[p]=h[p])}var T=C.prototype;return T.decimalInteger=function(p){var f=parseInt(this[p],10);return f>Number.MAX_SAFE_INTEGER?Infinity:f},T.hexadecimalInteger=function(p){if(this[p]){var f=(this[p]||"0x").slice(2);f=(f.length&1?"0":"")+f;for(var l=new Uint8Array(f.length/2),a=0;a<f.length/2;a++)l[a]=parseInt(f.slice(a*2,a*2+2),16);return l}else return null},T.hexadecimalIntegerAsNumber=function(p){var f=parseInt(this[p],16);return f>Number.MAX_SAFE_INTEGER?Infinity:f},T.decimalFloatingPoint=function(p){return parseFloat(this[p])},T.optionalFloat=function(p,f){var l=this[p];return l?parseFloat(l):f},T.enumeratedString=function(p){return this[p]},T.bool=function(p){return this[p]==="YES"},T.decimalResolution=function(p){var f=w.exec(this[p]);return f===null?void 0:{width:parseInt(f[1],10),height:parseInt(f[2],10)}},C.parseAttrList=function(p){var f,l={},a='"';for(P.lastIndex=0;(f=P.exec(p))!==null;){var c=f[2];c.indexOf(a)===0&&c.lastIndexOf(a)===c.length-1&&(c=c.slice(1,-1)),l[f[1]]=c}return l},C}()},"./src/utils/binary-search.ts":function(ae,Q,U){"use strict";U.r(Q);var w={search:function(S,C){for(var T=0,h=S.length-1,p=null,f=null;T<=h;){p=(T+h)/2|0,f=S[p];var l=C(f);if(l>0)T=p+1;else if(l<0)h=p-1;else return f}return null}};Q.default=w},"./src/utils/buffer-helper.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"BufferHelper",function(){return S});var w=U("./src/utils/logger.ts"),P={length:0,start:function(){return 0},end:function(){return 0}},S=function(){function C(){}return C.isBuffered=function(h,p){try{if(h){for(var f=C.getBuffered(h),l=0;l<f.length;l++)if(p>=f.start(l)&&p<=f.end(l))return!0}}catch(a){}return!1},C.bufferInfo=function(h,p,f){try{if(h){var l=C.getBuffered(h),a=[],c;for(c=0;c<l.length;c++)a.push({start:l.start(c),end:l.end(c)});return this.bufferedInfo(a,p,f)}}catch(s){}return{len:0,start:p,end:p,nextStart:void 0}},C.bufferedInfo=function(h,p,f){p=Math.max(0,p),h.sort(function(y,_){var m=y.start-_.start;return m||_.end-y.end});var l=[];if(f)for(var a=0;a<h.length;a++){var c=l.length;if(c){var s=l[c-1].end;h[a].start-s<f?h[a].end>s&&(l[c-1].end=h[a].end):l.push(h[a])}else l.push(h[a])}else l=h;for(var u=0,i,n=p,t=p,d=0;d<l.length;d++){var v=l[d].start,b=l[d].end;if(p+f>=v&&p<b)n=v,t=b,u=t-p;else if(p+f<v){i=v;break}}return{len:u,start:n||0,end:t||0,nextStart:i}},C.getBuffered=function(h){try{return h.buffered}catch(p){return w.logger.log("failed to get media.buffered",p),P}},C}()},"./src/utils/cea-608-parser.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"Row",function(){return t}),U.d(Q,"CaptionScreen",function(){return d});var w=U("./src/utils/logger.ts"),P={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},S=function(E){var o=E;return P.hasOwnProperty(E)&&(o=P[E]),String.fromCharCode(o)},C=15,T=100,h={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},p={17:2,18:4,21:6,22:8,23:10,19:13,20:15},f={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},l={25:2,26:4,29:6,30:8,31:10,27:13,28:15},a=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],c;(function(g){g[g.ERROR=0]="ERROR",g[g.TEXT=1]="TEXT",g[g.WARNING=2]="WARNING",g[g.INFO=2]="INFO",g[g.DEBUG=3]="DEBUG",g[g.DATA=3]="DATA"})(c||(c={}));var s=function(){function g(){this.time=null,this.verboseLevel=c.ERROR}var E=g.prototype;return E.log=function(x,A){this.verboseLevel>=x&&w.logger.log(this.time+" ["+x+"] "+A)},g}(),u=function(E){for(var o=[],x=0;x<E.length;x++)o.push(E[x].toString(16));return o},i=function(){function g(o,x,A,O,D){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=o||"white",this.underline=x||!1,this.italics=A||!1,this.background=O||"black",this.flash=D||!1}var E=g.prototype;return E.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},E.setStyles=function(x){for(var A=["foreground","underline","italics","background","flash"],O=0;O<A.length;O++){var D=A[O];x.hasOwnProperty(D)&&(this[D]=x[D])}},E.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},E.equals=function(x){return this.foreground===x.foreground&&this.underline===x.underline&&this.italics===x.italics&&this.background===x.background&&this.flash===x.flash},E.copy=function(x){this.foreground=x.foreground,this.underline=x.underline,this.italics=x.italics,this.background=x.background,this.flash=x.flash},E.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},g}(),n=function(){function g(o,x,A,O,D,I){this.uchar=void 0,this.penState=void 0,this.uchar=o||" ",this.penState=new i(x,A,O,D,I)}var E=g.prototype;return E.reset=function(){this.uchar=" ",this.penState.reset()},E.setChar=function(x,A){this.uchar=x,this.penState.copy(A)},E.setPenState=function(x){this.penState.copy(x)},E.equals=function(x){return this.uchar===x.uchar&&this.penState.equals(x.penState)},E.copy=function(x){this.uchar=x.uchar,this.penState.copy(x.penState)},E.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},g}(),t=function(){function g(o){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var x=0;x<T;x++)this.chars.push(new n);this.logger=o,this.pos=0,this.currPenState=new i}var E=g.prototype;return E.equals=function(x){for(var A=!0,O=0;O<T;O++)if(!this.chars[O].equals(x.chars[O])){A=!1;break}return A},E.copy=function(x){for(var A=0;A<T;A++)this.chars[A].copy(x.chars[A])},E.isEmpty=function(){for(var x=!0,A=0;A<T;A++)if(!this.chars[A].isEmpty()){x=!1;break}return x},E.setCursor=function(x){this.pos!==x&&(this.pos=x),this.pos<0?(this.logger.log(c.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>T&&(this.logger.log(c.DEBUG,"Too large cursor position "+this.pos),this.pos=T)},E.moveCursor=function(x){var A=this.pos+x;if(x>1)for(var O=this.pos+1;O<A+1;O++)this.chars[O].setPenState(this.currPenState);this.setCursor(A)},E.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},E.insertChar=function(x){x>=144&&this.backSpace();var A=S(x);if(this.pos>=T){this.logger.log(c.ERROR,"Cannot insert "+x.toString(16)+" ("+A+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(A,this.currPenState),this.moveCursor(1)},E.clearFromPos=function(x){var A;for(A=x;A<T;A++)this.chars[A].reset()},E.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},E.clearToEndOfRow=function(){this.clearFromPos(this.pos)},E.getTextString=function(){for(var x=[],A=!0,O=0;O<T;O++){var D=this.chars[O].uchar;D!==" "&&(A=!1),x.push(D)}return A?"":x.join("")},E.setPenStyles=function(x){this.currPenState.setStyles(x);var A=this.chars[this.pos];A.setPenState(this.currPenState)},g}(),d=function(){function g(o){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var x=0;x<C;x++)this.rows.push(new t(o));this.logger=o,this.currRow=C-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var E=g.prototype;return E.reset=function(){for(var x=0;x<C;x++)this.rows[x].clear();this.currRow=C-1},E.equals=function(x){for(var A=!0,O=0;O<C;O++)if(!this.rows[O].equals(x.rows[O])){A=!1;break}return A},E.copy=function(x){for(var A=0;A<C;A++)this.rows[A].copy(x.rows[A])},E.isEmpty=function(){for(var x=!0,A=0;A<C;A++)if(!this.rows[A].isEmpty()){x=!1;break}return x},E.backSpace=function(){var x=this.rows[this.currRow];x.backSpace()},E.clearToEndOfRow=function(){var x=this.rows[this.currRow];x.clearToEndOfRow()},E.insertChar=function(x){var A=this.rows[this.currRow];A.insertChar(x)},E.setPen=function(x){var A=this.rows[this.currRow];A.setPenStyles(x)},E.moveCursor=function(x){var A=this.rows[this.currRow];A.moveCursor(x)},E.setCursor=function(x){this.logger.log(c.INFO,"setCursor: "+x);var A=this.rows[this.currRow];A.setCursor(x)},E.setPAC=function(x){this.logger.log(c.INFO,"pacData = "+JSON.stringify(x));var A=x.row-1;if(this.nrRollUpRows&&A<this.nrRollUpRows-1&&(A=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==A){for(var O=0;O<C;O++)this.rows[O].clear();var D=this.currRow+1-this.nrRollUpRows,I=this.lastOutputScreen;if(I){var F=I.rows[D].cueStartTime,z=this.logger.time;if(F&&z!==null&&F<z)for(var ne=0;ne<this.nrRollUpRows;ne++)this.rows[A-this.nrRollUpRows+ne+1].copy(I.rows[D+ne])}}this.currRow=A;var j=this.rows[this.currRow];if(x.indent!==null){var G=x.indent,X=Math.max(G-1,0);j.setCursor(x.indent),x.color=j.chars[X].penState.foreground}var Z={foreground:x.color,underline:x.underline,italics:x.italics,background:"black",flash:!1};this.setPen(Z)},E.setBkgData=function(x){this.logger.log(c.INFO,"bkgData = "+JSON.stringify(x)),this.backSpace(),this.setPen(x),this.insertChar(32)},E.setRollUpRows=function(x){this.nrRollUpRows=x},E.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(c.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(c.TEXT,this.getDisplayText());var x=this.currRow+1-this.nrRollUpRows,A=this.rows.splice(x,1)[0];A.clear(),this.rows.splice(this.currRow,0,A),this.logger.log(c.INFO,"Rolling up")},E.getDisplayText=function(x){x=x||!1;for(var A=[],O="",D=-1,I=0;I<C;I++){var F=this.rows[I].getTextString();F&&(D=I+1,x?A.push("Row "+D+": '"+F+"'"):A.push(F.trim()))}return A.length>0&&(x?O="["+A.join(" | ")+"]":O=A.join(`
`)),O},E.getTextAndFormat=function(){return this.rows},g}(),v=function(){function g(o,x,A){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=o,this.outputFilter=x,this.mode=null,this.verbose=0,this.displayedMemory=new d(A),this.nonDisplayedMemory=new d(A),this.lastOutputScreen=new d(A),this.currRollUpRow=this.displayedMemory.rows[C-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=A}var E=g.prototype;return E.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[C-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},E.getHandler=function(){return this.outputFilter},E.setHandler=function(x){this.outputFilter=x},E.setPAC=function(x){this.writeScreen.setPAC(x)},E.setBkgData=function(x){this.writeScreen.setBkgData(x)},E.setMode=function(x){if(x===this.mode)return;this.mode=x,this.logger.log(c.INFO,"MODE="+x),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=x},E.insertChars=function(x){for(var A=0;A<x.length;A++)this.writeScreen.insertChar(x[A]);var O=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(c.INFO,O+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(c.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},E.ccRCL=function(){this.logger.log(c.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},E.ccBS=function(){if(this.logger.log(c.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},E.ccAOF=function(){},E.ccAON=function(){},E.ccDER=function(){this.logger.log(c.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},E.ccRU=function(x){this.logger.log(c.INFO,"RU("+x+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(x)},E.ccFON=function(){this.logger.log(c.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},E.ccRDC=function(){this.logger.log(c.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},E.ccTR=function(){this.logger.log(c.INFO,"TR"),this.setMode("MODE_TEXT")},E.ccRTD=function(){this.logger.log(c.INFO,"RTD"),this.setMode("MODE_TEXT")},E.ccEDM=function(){this.logger.log(c.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},E.ccCR=function(){this.logger.log(c.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},E.ccENM=function(){this.logger.log(c.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},E.ccEOC=function(){if(this.logger.log(c.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var x=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=x,this.writeScreen=this.nonDisplayedMemory,this.logger.log(c.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},E.ccTO=function(x){this.logger.log(c.INFO,"TO("+x+") - Tab Offset"),this.writeScreen.moveCursor(x)},E.ccMIDROW=function(x){var A={flash:!1};if(A.underline=x%2===1,A.italics=x>=46,A.italics)A.foreground="white";else{var O=Math.floor(x/2)-16,D=["white","green","blue","cyan","red","yellow","magenta"];A.foreground=D[O]}this.logger.log(c.INFO,"MIDROW: "+JSON.stringify(A)),this.writeScreen.setPen(A)},E.outputDataUpdate=function(x){x===void 0&&(x=!1);var A=this.logger.time;if(A===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=A:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,A,this.lastOutputScreen),x&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:A),this.lastOutputScreen.copy(this.displayedMemory))},E.cueSplitAtTime=function(x){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,x,this.displayedMemory),this.cueStartTime=x))},g}(),b=function(){function g(o,x,A){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var O=new s;this.channels=[null,new v(o,x,O),new v(o+1,A,O)],this.cmdHistory=m(),this.logger=O}var E=g.prototype;return E.getHandler=function(x){return this.channels[x].getHandler()},E.setHandler=function(x,A){this.channels[x].setHandler(A)},E.addData=function(x,A){var O,D,I,F=!1;this.logger.time=x;for(var z=0;z<A.length;z+=2){if(D=A[z]&127,I=A[z+1]&127,D===0&&I===0)continue;if(this.logger.log(c.DATA,"["+u([A[z],A[z+1]])+"] -> ("+u([D,I])+")"),O=this.parseCmd(D,I),O||(O=this.parseMidrow(D,I)),O||(O=this.parsePAC(D,I)),O||(O=this.parseBackgroundAttributes(D,I)),!O&&(F=this.parseChars(D,I),F)){var ne=this.currentChannel;if(ne&&ne>0){var j=this.channels[ne];j.insertChars(F)}else this.logger.log(c.WARNING,"No channel found yet. TEXT-MODE?")}!O&&!F&&this.logger.log(c.WARNING,"Couldn't parse cleaned data "+u([D,I])+" orig: "+u([A[z],A[z+1]]))}},E.parseCmd=function(x,A){var O=this.cmdHistory,D=(x===20||x===28||x===21||x===29)&&A>=32&&A<=47,I=(x===23||x===31)&&A>=33&&A<=35;if(!(D||I))return!1;if(_(x,A,O))return y(null,null,O),this.logger.log(c.DEBUG,"Repeated command ("+u([x,A])+") is dropped"),!0;var F=x===20||x===21||x===23?1:2,z=this.channels[F];return x===20||x===21||x===28||x===29?A===32?z.ccRCL():A===33?z.ccBS():A===34?z.ccAOF():A===35?z.ccAON():A===36?z.ccDER():A===37?z.ccRU(2):A===38?z.ccRU(3):A===39?z.ccRU(4):A===40?z.ccFON():A===41?z.ccRDC():A===42?z.ccTR():A===43?z.ccRTD():A===44?z.ccEDM():A===45?z.ccCR():A===46?z.ccENM():A===47&&z.ccEOC():z.ccTO(A-32),y(x,A,O),this.currentChannel=F,!0},E.parseMidrow=function(x,A){var O=0;if((x===17||x===25)&&A>=32&&A<=47){if(x===17?O=1:O=2,O!==this.currentChannel)return this.logger.log(c.ERROR,"Mismatch channel in midrow parsing"),!1;var D=this.channels[O];return D?(D.ccMIDROW(A),this.logger.log(c.DEBUG,"MIDROW ("+u([x,A])+")"),!0):!1}return!1},E.parsePAC=function(x,A){var O,D=this.cmdHistory,I=(x>=17&&x<=23||x>=25&&x<=31)&&A>=64&&A<=127,F=(x===16||x===24)&&A>=64&&A<=95;if(!(I||F))return!1;if(_(x,A,D))return y(null,null,D),!0;var z=x<=23?1:2;A>=64&&A<=95?O=z===1?h[x]:f[x]:O=z===1?p[x]:l[x];var ne=this.channels[z];return ne?(ne.setPAC(this.interpretPAC(O,A)),y(x,A,D),this.currentChannel=z,!0):!1},E.interpretPAC=function(x,A){var O,D={color:null,italics:!1,indent:null,underline:!1,row:x};return A>95?O=A-96:O=A-64,D.underline=(O&1)===1,O<=13?D.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(O/2)]:O<=15?(D.italics=!0,D.color="white"):D.indent=Math.floor((O-16)/2)*4,D},E.parseChars=function(x,A){var O,D=null,I=null;if(x>=25?(O=2,I=x-8):(O=1,I=x),I>=17&&I<=19){var F;I===17?F=A+80:I===18?F=A+112:F=A+144,this.logger.log(c.INFO,"Special char '"+S(F)+"' in channel "+O),D=[F]}else x>=32&&x<=127&&(D=A===0?[x]:[x,A]);if(D){var z=u(D);this.logger.log(c.DEBUG,"Char codes = "+z.join(",")),y(x,A,this.cmdHistory)}return D},E.parseBackgroundAttributes=function(x,A){var O=(x===16||x===24)&&A>=32&&A<=47,D=(x===23||x===31)&&A>=45&&A<=47;if(!(O||D))return!1;var I,F={};x===16||x===24?(I=Math.floor((A-32)/2),F.background=a[I],A%2===1&&(F.background=F.background+"_semi")):A===45?F.background="transparent":(F.foreground="black",A===47&&(F.underline=!0));var z=x<=23?1:2,ne=this.channels[z];return ne.setBkgData(F),y(x,A,this.cmdHistory),!0},E.reset=function(){for(var x=0;x<Object.keys(this.channels).length;x++){var A=this.channels[x];A&&A.reset()}this.cmdHistory=m()},E.cueSplitAtTime=function(x){for(var A=0;A<this.channels.length;A++){var O=this.channels[A];O&&O.cueSplitAtTime(x)}},g}();function y(g,E,o){o.a=g,o.b=E}function _(g,E,o){return o.a===g&&o.b===E}function m(){return{a:null,b:null}}Q.default=b},"./src/utils/codecs.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"isCodecType",function(){return P}),U.d(Q,"isCodecSupportedInMp4",function(){return S});var w={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}};function P(C,T){var h=w[T];return!!h&&h[C.slice(0,4)]===!0}function S(C,T){return MediaSource.isTypeSupported((T||"video")+'/mp4;codecs="'+C+'"')}},"./src/utils/cues.ts":function(ae,Q,U){"use strict";U.r(Q);var w=U("./src/utils/vttparser.ts"),P=U("./src/utils/webvtt-parser.ts"),S=U("./src/utils/texttrack-utils.ts"),C=/\s/,T={newCue:function(p,f,l,a){for(var c=[],s,u,i,n,t,d=self.VTTCue||self.TextTrackCue,v=0;v<a.rows.length;v++)if(s=a.rows[v],i=!0,n=0,t="",!s.isEmpty()){for(var b=0;b<s.chars.length;b++)C.test(s.chars[b].uchar)&&i?n++:(t+=s.chars[b].uchar,i=!1);s.cueStartTime=f,f===l&&(l+=1e-4),n>=16?n--:n++;var y=Object(w.fixLineBreaks)(t.trim()),_=Object(P.generateCueId)(f,l,y);(!p||!p.cues||!p.cues.getCueById(_))&&(u=new d(f,l,y),u.id=_,u.line=v+1,u.align="left",u.position=10+Math.min(80,Math.floor(n*8/32)*10),c.push(u))}return p&&c.length&&(c.sort(function(m,g){return m.line==="auto"||g.line==="auto"?0:m.line>8&&g.line>8?g.line-m.line:m.line-g.line}),c.forEach(function(m){return Object(S.addCueToTrack)(p,m)})),c}};Q.default=T},"./src/utils/discontinuities.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"findFirstFragWithCC",function(){return C}),U.d(Q,"shouldAlignOnDiscontinuities",function(){return T}),U.d(Q,"findDiscontinuousReferenceFrag",function(){return h}),U.d(Q,"adjustSlidingStart",function(){return f}),U.d(Q,"alignStream",function(){return l}),U.d(Q,"alignPDT",function(){return c}),U.d(Q,"alignFragmentByPDTDelta",function(){return s}),U.d(Q,"alignMediaPlaylistByPDT",function(){return u});var w=U("./src/polyfills/number.ts"),P=U("./src/utils/logger.ts"),S=U("./src/controller/level-helper.ts");function C(i,n){for(var t=null,d=0,v=i.length;d<v;d++){var b=i[d];if(b&&b.cc===n){t=b;break}}return t}function T(i,n,t){return!!(n.details&&(t.endCC>t.startCC||i&&i.cc<t.startCC))}function h(i,n){var t=i.fragments,d=n.fragments;if(!d.length||!t.length){P.logger.log("No fragments to align");return}var v=C(t,d[0].cc);if(!v||v&&!v.startPTS){P.logger.log("No frag in previous level to align on");return}return v}function p(i,n){if(i){var t=i.start+n;i.start=i.startPTS=t,i.endPTS=t+i.duration}}function f(i,n){for(var t=n.fragments,d=0,v=t.length;d<v;d++)p(t[d],i);n.fragmentHint&&p(n.fragmentHint,i),n.alignedSliding=!0}function l(i,n,t){if(!n)return;a(i,t,n),!t.alignedSliding&&n.details&&c(t,n.details),!t.alignedSliding&&n.details&&!t.skippedSegments&&Object(S.adjustSliding)(n.details,t)}function a(i,n,t){if(T(i,t,n)){var d=h(t.details,n);d&&Object(w.isFiniteNumber)(d.start)&&(P.logger.log("Adjusting PTS using last level due to CC increase within current level "+n.url),f(d.start,n))}}function c(i,n){if(!n.fragments.length||!i.hasProgramDateTime||!n.hasProgramDateTime)return;var t=n.fragments[0].programDateTime,d=i.fragments[0].programDateTime,v=(d-t)/1e3+n.fragments[0].start;v&&Object(w.isFiniteNumber)(v)&&(P.logger.log("Adjusting PTS using programDateTime delta "+(d-t)+"ms, sliding:"+v.toFixed(3)+" "+i.url+" "),f(v,i))}function s(i,n){var t=i.programDateTime;if(!t)return;var d=(t-n)/1e3;i.start=i.startPTS=d,i.endPTS=d+i.duration}function u(i,n){if(!n.fragments.length||!i.hasProgramDateTime||!n.hasProgramDateTime)return;var t=n.fragments[0].programDateTime,d=n.fragments[0].start,v=t-d*1e3;i.fragments.forEach(function(b){s(b,v)}),i.fragmentHint&&s(i.fragmentHint,v),i.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(ae,Q,U){"use strict";U.r(Q);var w=U("./src/utils/ewma.ts"),P=function(){function S(T,h,p){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=p,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new w.default(T),this.fast_=new w.default(h)}var C=S.prototype;return C.update=function(h,p){var f=this.slow_,l=this.fast_;this.slow_.halfLife!==h&&(this.slow_=new w.default(h,f.getEstimate(),f.getTotalWeight())),this.fast_.halfLife!==p&&(this.fast_=new w.default(p,l.getEstimate(),l.getTotalWeight()))},C.sample=function(h,p){h=Math.max(h,this.minDelayMs_);var f=8*p,l=h/1e3,a=f/l;this.fast_.sample(l,a),this.slow_.sample(l,a)},C.canEstimate=function(){var h=this.fast_;return h&&h.getTotalWeight()>=this.minWeight_},C.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},C.destroy=function(){},S}();Q.default=P},"./src/utils/ewma.ts":function(ae,Q,U){"use strict";U.r(Q);var w=function(){function P(C,T,h){T===void 0&&(T=0),h===void 0&&(h=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_=T,this.totalWeight_=h}var S=P.prototype;return S.sample=function(T,h){var p=Math.pow(this.alpha_,T);this.estimate_=h*(1-p)+p*this.estimate_,this.totalWeight_+=T},S.getTotalWeight=function(){return this.totalWeight_},S.getEstimate=function(){if(this.alpha_){var T=1-Math.pow(this.alpha_,this.totalWeight_);if(T)return this.estimate_/T}return this.estimate_},P}();Q.default=w},"./src/utils/fetch-loader.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"fetchSupported",function(){return s});var w=U("./src/polyfills/number.ts"),P=U("./src/loader/load-stats.ts"),S=U("./src/demux/chunk-cache.ts");function C(d,v){d.prototype=Object.create(v.prototype),d.prototype.constructor=d,l(d,v)}function T(d){var v=typeof Map=="function"?new Map:void 0;return T=function(y){if(y===null||!f(y))return y;if(typeof y!="function")throw new TypeError("Super expression must either be null or a function");if(typeof v!="undefined"){if(v.has(y))return v.get(y);v.set(y,_)}function _(){return h(y,arguments,a(this).constructor)}return _.prototype=Object.create(y.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),l(_,y)},T(d)}function h(d,v,b){return p()?h=Reflect.construct:h=function(_,m,g){var E=[null];E.push.apply(E,m);var o=Function.bind.apply(_,E),x=new o;return g&&l(x,g.prototype),x},h.apply(null,arguments)}function p(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(d){return!1}}function f(d){return Function.toString.call(d).indexOf("[native code]")!==-1}function l(d,v){return l=Object.setPrototypeOf||function(y,_){return y.__proto__=_,y},l(d,v)}function a(d){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(b){return b.__proto__||Object.getPrototypeOf(b)},a(d)}function c(){return c=Object.assign||function(d){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var y in b)Object.prototype.hasOwnProperty.call(b,y)&&(d[y]=b[y])}return d},c.apply(this,arguments)}function s(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(d){}return!1}var u=function(){function d(b){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=b.fetchSetup||n,this.controller=new self.AbortController,this.stats=new P.LoadStats}var v=d.prototype;return v.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},v.abortInternal=function(){var y=this.response;(!y||!y.ok)&&(this.stats.aborted=!0,this.controller.abort())},v.abort=function(){var y;this.abortInternal(),(y=this.callbacks)!==null&&y!==void 0&&y.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},v.load=function(y,_,m){var g=this,E=this.stats;if(E.loading.start)throw new Error("Loader can only be used once.");E.loading.start=self.performance.now();var o=i(y,this.controller.signal),x=m.onProgress,A=y.responseType==="arraybuffer",O=A?"byteLength":"length";this.context=y,this.config=_,this.callbacks=m,this.request=this.fetchSetup(y,o),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){g.abortInternal(),m.onTimeout(E,y,g.response)},_.timeout),self.fetch(this.request).then(function(D){if(g.response=g.loader=D,!D.ok){var I=D.status,F=D.statusText;throw new t(F||"fetch, bad network response",I,D)}return E.loading.first=Math.max(self.performance.now(),E.loading.start),E.total=parseInt(D.headers.get("Content-Length")||"0"),x&&Object(w.isFiniteNumber)(_.highWaterMark)?g.loadProgressively(D,E,y,_.highWaterMark,x):A?D.arrayBuffer():D.text()}).then(function(D){var I=g.response;self.clearTimeout(g.requestTimeout),E.loading.end=Math.max(self.performance.now(),E.loading.first),E.loaded=E.total=D[O];var F={url:I.url,data:D};x&&!Object(w.isFiniteNumber)(_.highWaterMark)&&x(E,y,D,I),m.onSuccess(F,E,y,I)}).catch(function(D){if(self.clearTimeout(g.requestTimeout),E.aborted)return;var I=D.code||0;m.onError({code:I,text:D.message},y,D.details)})},v.getCacheAge=function(){var y=null;if(this.response){var _=this.response.headers.get("age");y=_?parseFloat(_):null}return y},v.loadProgressively=function(y,_,m,g,E){g===void 0&&(g=0);var o=new S.default,x=y.body.getReader(),A=function O(){return x.read().then(function(D){if(D.done)return o.dataLength&&E(_,m,o.flush(),y),Promise.resolve(new ArrayBuffer(0));var I=D.value,F=I.length;return _.loaded+=F,F<g||o.dataLength?(o.push(I),o.dataLength>=g&&E(_,m,o.flush(),y)):E(_,m,I,y),O()}).catch(function(){return Promise.reject()})};return A()},d}();function i(d,v){var b={method:"GET",mode:"cors",credentials:"same-origin",signal:v,headers:new self.Headers(c({},d.headers))};return d.rangeEnd&&b.headers.set("Range","bytes="+d.rangeStart+"-"+String(d.rangeEnd-1)),b}function n(d,v){return new self.Request(d.url,v)}var t=function(d){C(v,d);function v(b,y,_){var m;return m=d.call(this,b)||this,m.code=void 0,m.details=void 0,m.code=y,m.details=_,m}return v}(T(Error));Q.default=u},"./src/utils/imsc1-ttml-parser.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"IMSC1_CODEC",function(){return f}),U.d(Q,"parseIMSC1",function(){return s});var w=U("./src/utils/mp4-tools.ts"),P=U("./src/utils/vttparser.ts"),S=U("./src/utils/vttcue.ts"),C=U("./src/demux/id3.ts"),T=U("./src/utils/timescale-conversion.ts"),h=U("./src/utils/webvtt-parser.ts");function p(){return p=Object.assign||function(g){for(var E=1;E<arguments.length;E++){var o=arguments[E];for(var x in o)Object.prototype.hasOwnProperty.call(o,x)&&(g[x]=o[x])}return g},p.apply(this,arguments)}var f="stpp.ttml.im1t",l=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,a=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,c={left:"start",center:"center",right:"end",start:"start",end:"end"};function s(g,E,o,x,A){var O=Object(w.findBox)(new Uint8Array(g),["mdat"]);if(O.length===0){A(new Error("Could not parse IMSC1 mdat"));return}var D=O[0],I=Object(C.utf8ArrayToStr)(new Uint8Array(g,D.start,D.end-D.start)),F=Object(T.toTimescaleFromScale)(E,1,o);try{x(u(I,F))}catch(z){A(z)}}function u(g,E){var o=new DOMParser,x=o.parseFromString(g,"text/xml"),A=x.getElementsByTagName("tt")[0];if(!A)throw new Error("Invalid ttml");var O={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},D=Object.keys(O).reduce(function(j,G){return j[G]=A.getAttribute("ttp:"+G)||O[G],j},{}),I=A.getAttribute("xml:space")!=="preserve",F=n(i(A,"styling","style")),z=n(i(A,"layout","region")),ne=i(A,"body","[begin]");return[].map.call(ne,function(j){var G=t(j,I);if(!G||!j.hasAttribute("begin"))return null;var X=y(j.getAttribute("begin"),D),Z=y(j.getAttribute("dur"),D),K=y(j.getAttribute("end"),D);if(X===null)throw b(j);if(K===null){if(Z===null)throw b(j);K=X+Z}var q=new S.default(X-E,K-E,G);q.id=Object(h.generateCueId)(q.startTime,q.endTime,q.text);var ie=z[j.getAttribute("region")],oe=F[j.getAttribute("style")];q.position=10,q.size=80;var ye=d(ie,oe),pe=ye.textAlign;if(pe){var we=c[pe];we&&(q.lineAlign=we),q.align=pe}return p(q,ye),q}).filter(function(j){return j!==null})}function i(g,E,o){var x=g.getElementsByTagName(E)[0];return x?[].slice.call(x.querySelectorAll(o)):[]}function n(g){return g.reduce(function(E,o){var x=o.getAttribute("xml:id");return x&&(E[x]=o),E},{})}function t(g,E){return[].slice.call(g.childNodes).reduce(function(o,x,A){var O;return x.nodeName==="br"&&A?o+`
`:(O=x.childNodes)!==null&&O!==void 0&&O.length?t(x,E):E?o+x.textContent.trim().replace(/\s+/g," "):o+x.textContent},"")}function d(g,E){var o="http://www.w3.org/ns/ttml#styling",x=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return x.reduce(function(A,O){var D=v(E,o,O)||v(g,o,O);return D&&(A[O]=D),A},{})}function v(g,E,o){return g.hasAttributeNS(E,o)?g.getAttributeNS(E,o):null}function b(g){return new Error("Could not parse ttml timestamp "+g)}function y(g,E){if(!g)return null;var o=Object(P.parseTimeStamp)(g);return o===null&&(l.test(g)?o=_(g,E):a.test(g)&&(o=m(g,E))),o}function _(g,E){var o=l.exec(g),x=(o[4]|0)+(o[5]|0)/E.subFrameRate;return(o[1]|0)*3600+(o[2]|0)*60+(o[3]|0)+x/E.frameRate}function m(g,E){var o=a.exec(g),x=Number(o[1]),A=o[2];switch(A){case"h":return x*3600;case"m":return x*60;case"ms":return x*1e3;case"f":return x/E.frameRate;case"t":return x/E.tickRate}return x}},"./src/utils/logger.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"enableLogs",function(){return h}),U.d(Q,"logger",function(){return p});var w=function(){},P={trace:w,debug:w,log:w,warn:w,info:w,error:w},S=P;function C(f){var l=self.console[f];return l?l.bind(self.console,"["+f+"] >"):w}function T(f){for(var l=arguments.length,a=new Array(l>1?l-1:0),c=1;c<l;c++)a[c-1]=arguments[c];a.forEach(function(s){S[s]=f[s]?f[s].bind(f):C(s)})}function h(f){if(self.console&&f===!0||typeof f=="object"){T(f,"debug","log","info","warn","error");try{S.log()}catch(l){S=P}}else S=P}var p=S},"./src/utils/mediakeys-helper.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"KeySystems",function(){return w}),U.d(Q,"requestMediaKeySystemAccess",function(){return P});var w;(function(S){S.WIDEVINE="com.widevine.alpha",S.PLAYREADY="com.microsoft.playready"})(w||(w={}));var P=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"getMediaSource",function(){return w});function w(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"bin2str",function(){return T}),U.d(Q,"readUint16",function(){return h}),U.d(Q,"readUint32",function(){return p}),U.d(Q,"writeUint32",function(){return f}),U.d(Q,"findBox",function(){return l}),U.d(Q,"parseSegmentIndex",function(){return a}),U.d(Q,"parseInitSegment",function(){return c}),U.d(Q,"getStartDTS",function(){return s}),U.d(Q,"getDuration",function(){return u}),U.d(Q,"computeRawDurationFromSamples",function(){return i}),U.d(Q,"offsetStartDTS",function(){return n}),U.d(Q,"segmentValidRange",function(){return t}),U.d(Q,"appendUint8Array",function(){return d});var w=U("./src/utils/typed-array.ts"),P=U("./src/loader/fragment.ts"),S=Math.pow(2,32)-1,C=[].push;function T(v){return String.fromCharCode.apply(null,v)}function h(v,b){"data"in v&&(b+=v.start,v=v.data);var y=v[b]<<8|v[b+1];return y<0?65536+y:y}function p(v,b){"data"in v&&(b+=v.start,v=v.data);var y=v[b]<<24|v[b+1]<<16|v[b+2]<<8|v[b+3];return y<0?4294967296+y:y}function f(v,b,y){"data"in v&&(b+=v.start,v=v.data),v[b]=y>>24,v[b+1]=y>>16&255,v[b+2]=y>>8&255,v[b+3]=y&255}function l(v,b){var y=[];if(!b.length)return y;var _,m,g;"data"in v?(_=v.data,m=v.start,g=v.end):(_=v,m=0,g=_.byteLength);for(var E=m;E<g;){var o=p(_,E),x=T(_.subarray(E+4,E+8)),A=o>1?E+o:g;if(x===b[0])if(b.length===1)y.push({data:_,start:E+8,end:A});else{var O=l({data:_,start:E+8,end:A},b.slice(1));O.length&&C.apply(y,O)}E=A}return y}function a(v){var b=l(v,["moov"]),y=b[0],_=y?y.end:null,m=l(v,["sidx"]);if(!m||!m[0])return null;var g=[],E=m[0],o=E.data[0],x=o===0?8:16,A=p(E,x);x+=4;var O=0,D=0;o===0?x+=8:x+=16,x+=2;var I=E.end+D,F=h(E,x);x+=2;for(var z=0;z<F;z++){var ne=x,j=p(E,ne);ne+=4;var G=j&2147483647,X=(j&2147483648)>>>31;if(X===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var Z=p(E,ne);ne+=4,g.push({referenceSize:G,subsegmentDuration:Z,info:{duration:Z/A,start:I,end:I+G-1}}),I+=G,ne+=4,x=ne}return{earliestPresentationTime:O,timescale:A,version:o,referencesCount:F,references:g,moovEndOffset:_}}function c(v){for(var b=[],y=l(v,["moov","trak"]),_=0;_<y.length;_++){var m=y[_],g=l(m,["tkhd"])[0];if(g){var E=g.data[g.start],o=E===0?12:20,x=p(g,o),A=l(m,["mdia","mdhd"])[0];if(A){E=A.data[A.start],o=E===0?12:20;var O=p(A,o),D=l(m,["mdia","hdlr"])[0];if(D){var I=T(D.data.subarray(D.start+8,D.start+12)),F={soun:P.ElementaryStreamTypes.AUDIO,vide:P.ElementaryStreamTypes.VIDEO}[I];if(F){var z=l(m,["mdia","minf","stbl","stsd"])[0],ne=void 0;z&&(ne=T(z.data.subarray(z.start+12,z.start+16))),b[x]={timescale:O,type:F},b[F]={timescale:O,id:x,codec:ne}}}}}}var j=l(v,["moov","mvex","trex"]);return j.forEach(function(G){var X=p(G,4),Z=b[X];Z&&(Z.default={duration:p(G,12),flags:p(G,20)})}),b}function s(v,b){return l(b,["moof","traf"]).reduce(function(y,_){var m=l(_,["tfdt"])[0],g=m.data[m.start],E=l(_,["tfhd"]).reduce(function(o,x){var A=p(x,4),O=v[A];if(O){var D=p(m,4);g===1&&(D*=Math.pow(2,32),D+=p(m,8));var I=O.timescale||9e4,F=D/I;if(isFinite(F)&&(o===null||F<o))return F}return o},null);return E!==null&&isFinite(E)&&(y===null||E<y)?E:y},null)||0}function u(v,b){for(var y=0,_=0,m=0,g=l(v,["moof","traf"]),E=0;E<g.length;E++){var o=g[E],x=l(o,["tfhd"])[0],A=p(x,4),O=b[A];if(!O)continue;var D=O.default,I=p(x,0)|(D==null?void 0:D.flags),F=D==null?void 0:D.duration;I&8&&(I&2?F=p(x,12):F=p(x,8));for(var z=O.timescale||9e4,ne=l(o,["trun"]),j=0;j<ne.length;j++){if(F){var G=p(ne[j],4);y=F*G}else y=i(ne[j]);O.type===P.ElementaryStreamTypes.VIDEO?_+=y/z:O.type===P.ElementaryStreamTypes.AUDIO&&(m+=y/z)}}if(_===0&&m===0){var X=a(v);if(X!=null&&X.references)return X.references.reduce(function(Z,K){return Z+K.info.duration||0},0)}return _||m}function i(v){var b=p(v,0),y=8;b&1&&(y+=4),b&4&&(y+=4);for(var _=0,m=p(v,4),g=0;g<m;g++){if(b&256){var E=p(v,y);_+=E,y+=4}b&512&&(y+=4),b&1024&&(y+=4),b&2048&&(y+=4)}return _}function n(v,b,y){l(b,["moof","traf"]).forEach(function(_){l(_,["tfhd"]).forEach(function(m){var g=p(m,4),E=v[g];if(!E)return;var o=E.timescale||9e4;l(_,["tfdt"]).forEach(function(x){var A=x.data[x.start],O=p(x,4);if(A===0)f(x,4,O-y*o);else{O*=Math.pow(2,32),O+=p(x,8),O-=y*o,O=Math.max(O,0);var D=Math.floor(O/(S+1)),I=Math.floor(O%(S+1));f(x,4,D),f(x,8,I)}})})})}function t(v){var b={valid:null,remainder:null},y=l(v,["moof"]);if(y){if(y.length<2)return b.remainder=v,b}else return b;var _=y[y.length-1];return b.valid=Object(w.sliceUint8)(v,0,_.start-8),b.remainder=Object(w.sliceUint8)(v,_.start-8),b}function d(v,b){var y=new Uint8Array(v.length+b.length);return y.set(v),y.set(b,v.length),y}},"./src/utils/output-filter.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"default",function(){return w});var w=function(){function P(C,T){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=C,this.trackName=T}var S=P.prototype;return S.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},S.newCue=function(T,h,p){(this.startTime===null||this.startTime>T)&&(this.startTime=T),this.endTime=h,this.screen=p,this.timelineController.createCaptionsTrack(this.trackName)},S.reset=function(){this.cueRanges=[]},P}()},"./src/utils/texttrack-utils.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"sendAddTrackEvent",function(){return P}),U.d(Q,"addCueToTrack",function(){return S}),U.d(Q,"clearCurrentCues",function(){return C}),U.d(Q,"removeCuesInRange",function(){return T}),U.d(Q,"getCuesInRange",function(){return p});var w=U("./src/utils/logger.ts");function P(f,l){var a;try{a=new Event("addtrack")}catch(c){a=document.createEvent("Event"),a.initEvent("addtrack",!1,!1)}a.track=f,l.dispatchEvent(a)}function S(f,l){var a=f.mode;if(a==="disabled"&&(f.mode="hidden"),f.cues&&!f.cues.getCueById(l.id))try{if(f.addCue(l),!f.cues.getCueById(l.id))throw new Error("addCue is failed for: "+l)}catch(s){w.logger.debug("[texttrack-utils]: "+s);var c=new self.TextTrackCue(l.startTime,l.endTime,l.text);c.id=l.id,f.addCue(c)}a==="disabled"&&(f.mode=a)}function C(f){var l=f.mode;if(l==="disabled"&&(f.mode="hidden"),f.cues)for(var a=f.cues.length;a--;)f.removeCue(f.cues[a]);l==="disabled"&&(f.mode=l)}function T(f,l,a){var c=f.mode;if(c==="disabled"&&(f.mode="hidden"),f.cues&&f.cues.length>0)for(var s=p(f.cues,l,a),u=0;u<s.length;u++)f.removeCue(s[u]);c==="disabled"&&(f.mode=c)}function h(f,l){if(l<f[0].startTime)return 0;var a=f.length-1;if(l>f[a].endTime)return-1;for(var c=0,s=a;c<=s;){var u=Math.floor((s+c)/2);if(l<f[u].startTime)s=u-1;else if(l>f[u].startTime&&c<a)c=u+1;else return u}return f[c].startTime-l<l-f[s].startTime?c:s}function p(f,l,a){var c=[],s=h(f,l);if(s>-1)for(var u=s,i=f.length;u<i;u++){var n=f[u];if(n.startTime>=l&&n.endTime<=a)c.push(n);else if(n.startTime>a)return c}return c}},"./src/utils/time-ranges.ts":function(ae,Q,U){"use strict";U.r(Q);var w={toString:function(S){for(var C="",T=S.length,h=0;h<T;h++)C+="["+S.start(h).toFixed(3)+","+S.end(h).toFixed(3)+"]";return C}};Q.default=w},"./src/utils/timescale-conversion.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"toTimescaleFromBase",function(){return P}),U.d(Q,"toTimescaleFromScale",function(){return S}),U.d(Q,"toMsFromMpegTsClock",function(){return C}),U.d(Q,"toMpegTsClockFromTimescale",function(){return T});var w=9e4;function P(h,p,f,l){f===void 0&&(f=1),l===void 0&&(l=!1);var a=h*p*f;return l?Math.round(a):a}function S(h,p,f,l){return f===void 0&&(f=1),l===void 0&&(l=!1),P(h,p,1/f,l)}function C(h,p){return p===void 0&&(p=!1),P(h,1e3,1/w,p)}function T(h,p){return p===void 0&&(p=1),P(h,w,1/p)}},"./src/utils/typed-array.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"sliceUint8",function(){return w});function w(P,S,C){return Uint8Array.prototype.slice?P.slice(S,C):new Uint8Array(Array.prototype.slice.call(P,S,C))}},"./src/utils/vttcue.ts":function(ae,Q,U){"use strict";U.r(Q),Q.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var w=["","lr","rl"],P=["start","middle","end","left","right"];function S(f,l){if(typeof l!="string")return!1;if(!Array.isArray(f))return!1;var a=l.toLowerCase();return~f.indexOf(a)?a:!1}function C(f){return S(w,f)}function T(f){return S(P,f)}function h(f){for(var l=arguments.length,a=new Array(l>1?l-1:0),c=1;c<l;c++)a[c-1]=arguments[c];for(var s=1;s<arguments.length;s++){var u=arguments[s];for(var i in u)f[i]=u[i]}return f}function p(f,l,a){var c=this,s={enumerable:!0};c.hasBeenReset=!1;var u="",i=!1,n=f,t=l,d=a,v=null,b="",y=!0,_="auto",m="start",g=50,E="middle",o=50,x="middle";Object.defineProperty(c,"id",h({},s,{get:function(){return u},set:function(O){u=""+O}})),Object.defineProperty(c,"pauseOnExit",h({},s,{get:function(){return i},set:function(O){i=!!O}})),Object.defineProperty(c,"startTime",h({},s,{get:function(){return n},set:function(O){if(typeof O!="number")throw new TypeError("Start time must be set to a number.");n=O,this.hasBeenReset=!0}})),Object.defineProperty(c,"endTime",h({},s,{get:function(){return t},set:function(O){if(typeof O!="number")throw new TypeError("End time must be set to a number.");t=O,this.hasBeenReset=!0}})),Object.defineProperty(c,"text",h({},s,{get:function(){return d},set:function(O){d=""+O,this.hasBeenReset=!0}})),Object.defineProperty(c,"region",h({},s,{get:function(){return v},set:function(O){v=O,this.hasBeenReset=!0}})),Object.defineProperty(c,"vertical",h({},s,{get:function(){return b},set:function(O){var D=C(O);if(D===!1)throw new SyntaxError("An invalid or illegal string was specified.");b=D,this.hasBeenReset=!0}})),Object.defineProperty(c,"snapToLines",h({},s,{get:function(){return y},set:function(O){y=!!O,this.hasBeenReset=!0}})),Object.defineProperty(c,"line",h({},s,{get:function(){return _},set:function(O){if(typeof O!="number"&&O!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");_=O,this.hasBeenReset=!0}})),Object.defineProperty(c,"lineAlign",h({},s,{get:function(){return m},set:function(O){var D=T(O);if(!D)throw new SyntaxError("An invalid or illegal string was specified.");m=D,this.hasBeenReset=!0}})),Object.defineProperty(c,"position",h({},s,{get:function(){return g},set:function(O){if(O<0||O>100)throw new Error("Position must be between 0 and 100.");g=O,this.hasBeenReset=!0}})),Object.defineProperty(c,"positionAlign",h({},s,{get:function(){return E},set:function(O){var D=T(O);if(!D)throw new SyntaxError("An invalid or illegal string was specified.");E=D,this.hasBeenReset=!0}})),Object.defineProperty(c,"size",h({},s,{get:function(){return o},set:function(O){if(O<0||O>100)throw new Error("Size must be between 0 and 100.");o=O,this.hasBeenReset=!0}})),Object.defineProperty(c,"align",h({},s,{get:function(){return x},set:function(O){var D=T(O);if(!D)throw new SyntaxError("An invalid or illegal string was specified.");x=D,this.hasBeenReset=!0}})),c.displayState=void 0}return p.prototype.getCueAsHTML=function(){var f=self.WebVTT;return f.convertCueToDOMTree(self,this.text)},p}()},"./src/utils/vttparser.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"parseTimeStamp",function(){return S}),U.d(Q,"fixLineBreaks",function(){return l}),U.d(Q,"VTTParser",function(){return a});var w=U("./src/utils/vttcue.ts"),P=function(){function c(){}var s=c.prototype;return s.decode=function(i,n){if(!i)return"";if(typeof i!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(i))},c}();function S(c){function s(i,n,t,d){return(i|0)*3600+(n|0)*60+(t|0)+parseFloat(d||0)}var u=c.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return u?parseFloat(u[2])>59?s(u[2],u[3],0,u[4]):s(u[1],u[2],u[3],u[4]):null}var C=function(){function c(){this.values=Object.create(null)}var s=c.prototype;return s.set=function(i,n){!this.get(i)&&n!==""&&(this.values[i]=n)},s.get=function(i,n,t){return t?this.has(i)?this.values[i]:n[t]:this.has(i)?this.values[i]:n},s.has=function(i){return i in this.values},s.alt=function(i,n,t){for(var d=0;d<t.length;++d)if(n===t[d]){this.set(i,n);break}},s.integer=function(i,n){/^-?\d+$/.test(n)&&this.set(i,parseInt(n,10))},s.percent=function(i,n){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(n)){var t=parseFloat(n);if(t>=0&&t<=100)return this.set(i,t),!0}return!1},c}();function T(c,s,u,i){var n=i?c.split(i):[c];for(var t in n){if(typeof n[t]!="string")continue;var d=n[t].split(u);if(d.length!==2)continue;var v=d[0],b=d[1];s(v,b)}}var h=new w.default(0,0,""),p=h.align==="middle"?"middle":"center";function f(c,s,u){var i=c;function n(){var v=S(c);if(v===null)throw new Error("Malformed timestamp: "+i);return c=c.replace(/^[^\sa-zA-Z-]+/,""),v}function t(v,b){var y=new C;T(v,function(g,E){var o;switch(g){case"region":for(var x=u.length-1;x>=0;x--)if(u[x].id===E){y.set(g,u[x].region);break}break;case"vertical":y.alt(g,E,["rl","lr"]);break;case"line":o=E.split(","),y.integer(g,o[0]),y.percent(g,o[0])&&y.set("snapToLines",!1),y.alt(g,o[0],["auto"]),o.length===2&&y.alt("lineAlign",o[1],["start",p,"end"]);break;case"position":o=E.split(","),y.percent(g,o[0]),o.length===2&&y.alt("positionAlign",o[1],["start",p,"end","line-left","line-right","auto"]);break;case"size":y.percent(g,E);break;case"align":y.alt(g,E,["start",p,"end","left","right"]);break}},/:/,/\s/),b.region=y.get("region",null),b.vertical=y.get("vertical","");var _=y.get("line","auto");_==="auto"&&h.line===-1&&(_=-1),b.line=_,b.lineAlign=y.get("lineAlign","start"),b.snapToLines=y.get("snapToLines",!0),b.size=y.get("size",100),b.align=y.get("align",p);var m=y.get("position","auto");m==="auto"&&h.position===50&&(m=b.align==="start"||b.align==="left"?0:b.align==="end"||b.align==="right"?100:50),b.position=m}function d(){c=c.replace(/^\s+/,"")}if(d(),s.startTime=n(),d(),c.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+i);c=c.substr(3),d(),s.endTime=n(),d(),t(c,s)}function l(c){return c.replace(/<br(?: \/)?>/gi,`
`)}var a=function(){function c(){this.state="INITIAL",this.buffer="",this.decoder=new P,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var s=c.prototype;return s.parse=function(i){var n=this;i&&(n.buffer+=n.decoder.decode(i,{stream:!0}));function t(){var m=n.buffer,g=0;for(m=l(m);g<m.length&&m[g]!=="\r"&&m[g]!==`
`;)++g;var E=m.substr(0,g);return m[g]==="\r"&&++g,m[g]===`
`&&++g,n.buffer=m.substr(g),E}function d(m){T(m,function(g,E){},/:/)}try{var v="";if(n.state==="INITIAL"){if(!/\r\n|\n/.test(n.buffer))return this;v=t();var b=v.match(/^()?WEBVTT([ \t].*)?$/);if(!b||!b[0])throw new Error("Malformed WebVTT signature.");n.state="HEADER"}for(var y=!1;n.buffer;){if(!/\r\n|\n/.test(n.buffer))return this;y?y=!1:v=t();switch(n.state){case"HEADER":/:/.test(v)?d(v):v||(n.state="ID");continue;case"NOTE":v||(n.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(v)){n.state="NOTE";break}if(!v)continue;if(n.cue=new w.default(0,0,""),n.state="CUE",v.indexOf("-->")===-1){n.cue.id=v;continue}case"CUE":if(!n.cue){n.state="BADCUE";continue}try{f(v,n.cue,n.regionList)}catch(m){n.cue=null,n.state="BADCUE";continue}n.state="CUETEXT";continue;case"CUETEXT":{var _=v.indexOf("-->")!==-1;if(!v||_&&(y=!0)){n.oncue&&n.cue&&n.oncue(n.cue),n.cue=null,n.state="ID";continue}if(n.cue===null)continue;n.cue.text&&(n.cue.text+=`
`),n.cue.text+=v}continue;case"BADCUE":v||(n.state="ID")}}}catch(m){n.state==="CUETEXT"&&n.cue&&n.oncue&&n.oncue(n.cue),n.cue=null,n.state=n.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},s.flush=function(){var i=this;try{if((i.cue||i.state==="HEADER")&&(i.buffer+=`
`,i.parse()),i.state==="INITIAL"||i.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(n){i.onparsingerror&&i.onparsingerror(n)}return i.onflush&&i.onflush(),this},c}()},"./src/utils/webvtt-parser.ts":function(ae,Q,U){"use strict";U.r(Q),U.d(Q,"generateCueId",function(){return a}),U.d(Q,"parseWebVTT",function(){return s});var w=U("./src/polyfills/number.ts"),P=U("./src/utils/vttparser.ts"),S=U("./src/demux/id3.ts"),C=U("./src/utils/timescale-conversion.ts"),T=U("./src/remux/mp4-remuxer.ts"),h=/\r\n|\n\r|\n|\r/g,p=function(i,n,t){return t===void 0&&(t=0),i.substr(t,n.length)===n},f=function(i){var n=parseInt(i.substr(-3)),t=parseInt(i.substr(-6,2)),d=parseInt(i.substr(-9,2)),v=i.length>9?parseInt(i.substr(0,i.indexOf(":"))):0;if(!Object(w.isFiniteNumber)(n)||!Object(w.isFiniteNumber)(t)||!Object(w.isFiniteNumber)(d)||!Object(w.isFiniteNumber)(v))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+i);return n+=1e3*t,n+=60*1e3*d,n+=60*60*1e3*v,n},l=function(i){for(var n=5381,t=i.length;t;)n=n*33^i.charCodeAt(--t);return(n>>>0).toString()};function a(u,i,n){return l(u.toString())+l(i.toString())+l(n)}var c=function(i,n,t){var d=i[n],v=i[d.prevCC];if(!v||!v.new&&d.new){i.ccOffset=i.presentationOffset=d.start,d.new=!1;return}for(;(b=v)!==null&&b!==void 0&&b.new;){var b;i.ccOffset+=d.start-v.start,d.new=!1,d=v,v=i[d.prevCC]}i.presentationOffset=t};function s(u,i,n,t,d,v,b,y){var _=new P.VTTParser,m=Object(S.utf8ArrayToStr)(new Uint8Array(u)).trim().replace(h,`
`).split(`
`),g=[],E=Object(C.toMpegTsClockFromTimescale)(i,n),o="00:00.000",x=0,A=0,O,D=!0,I=!1;_.oncue=function(F){var z=t[d],ne=t.ccOffset,j=(x-E)/9e4;if(z!=null&&z.new&&(A!==void 0?ne=t.ccOffset=z.start:c(t,d,j)),j&&(ne=j-t.presentationOffset),I){var G=F.endTime-F.startTime,X=Object(T.normalizePts)((F.startTime+ne-A)*9e4,v*9e4)/9e4;F.startTime=X,F.endTime=X+G}var Z=F.text.trim();F.text=decodeURIComponent(encodeURIComponent(Z)),F.id||(F.id=a(F.startTime,F.endTime,Z)),F.endTime>0&&g.push(F)},_.onparsingerror=function(F){O=F},_.onflush=function(){if(O){y(O);return}b(g)},m.forEach(function(F){if(D)if(p(F,"X-TIMESTAMP-MAP=")){D=!1,I=!0,F.substr(16).split(",").forEach(function(z){p(z,"LOCAL:")?o=z.substr(6):p(z,"MPEGTS:")&&(x=parseInt(z.substr(7)))});try{A=f(o)/1e3}catch(z){I=!1,O=z}return}else F===""&&(D=!1);_.parse(F+`
`)}),_.flush()}},"./src/utils/xhr-loader.ts":function(ae,Q,U){"use strict";U.r(Q);var w=U("./src/utils/logger.ts"),P=U("./src/loader/load-stats.ts"),S=/^age:\s*[\d.]+\s*$/m,C=function(){function T(p){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=p?p.xhrSetup:null,this.stats=new P.LoadStats,this.retryDelay=0}var h=T.prototype;return h.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},h.abortInternal=function(){var f=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),f&&(f.onreadystatechange=null,f.onprogress=null,f.readyState!==4&&(this.stats.aborted=!0,f.abort()))},h.abort=function(){var f;this.abortInternal(),(f=this.callbacks)!==null&&f!==void 0&&f.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},h.load=function(f,l,a){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=f,this.config=l,this.callbacks=a,this.retryDelay=l.retryDelay,this.loadInternal()},h.loadInternal=function(){var f=this.config,l=this.context;if(!f)return;var a=this.loader=new self.XMLHttpRequest,c=this.stats;c.loading.first=0,c.loaded=0;var s=this.xhrSetup;try{if(s)try{s(a,l.url)}catch(n){a.open("GET",l.url,!0),s(a,l.url)}a.readyState||a.open("GET",l.url,!0);var u=this.context.headers;if(u)for(var i in u)a.setRequestHeader(i,u[i])}catch(n){this.callbacks.onError({code:a.status,text:n.message},l,a);return}l.rangeEnd&&a.setRequestHeader("Range","bytes="+l.rangeStart+"-"+(l.rangeEnd-1)),a.onreadystatechange=this.readystatechange.bind(this),a.onprogress=this.loadprogress.bind(this),a.responseType=l.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),f.timeout),a.send()},h.readystatechange=function(){var f=this.context,l=this.loader,a=this.stats;if(!f||!l)return;var c=l.readyState,s=this.config;if(a.aborted)return;if(c>=2)if(self.clearTimeout(this.requestTimeout),a.loading.first===0&&(a.loading.first=Math.max(self.performance.now(),a.loading.start)),c===4){l.onreadystatechange=null,l.onprogress=null;var u=l.status;if(u>=200&&u<300){a.loading.end=Math.max(self.performance.now(),a.loading.first);var i,n;if(f.responseType==="arraybuffer"?(i=l.response,n=i.byteLength):(i=l.responseText,n=i.length),a.loaded=a.total=n,!this.callbacks)return;var t=this.callbacks.onProgress;if(t&&t(a,f,i,l),!this.callbacks)return;var d={url:l.responseURL,data:i};this.callbacks.onSuccess(d,a,f,l)}else a.retry>=s.maxRetry||u>=400&&u<499?(w.logger.error(u+" while loading "+f.url),this.callbacks.onError({code:u,text:l.statusText},f,l)):(w.logger.warn(u+" while loading "+f.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,s.maxRetryDelay),a.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),s.timeout)},h.loadtimeout=function(){w.logger.warn("timeout while loading "+this.context.url);var f=this.callbacks;f&&(this.abortInternal(),f.onTimeout(this.stats,this.context,this.loader))},h.loadprogress=function(f){var l=this.stats;l.loaded=f.loaded,f.lengthComputable&&(l.total=f.total)},h.getCacheAge=function(){var f=null;if(this.loader&&S.test(this.loader.getAllResponseHeaders())){var l=this.loader.getResponseHeader("age");f=l?parseFloat(l):null}return f},T}();Q.default=C}}).default})},vHTk:function(Je,Ke,B){Je.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wCXF:function(Je,Ke,B){"use strict";B.d(Ke,"a",function(){return Y});var ae=B("rePB"),Q=B("VTBJ"),U=B("KQm4"),w=B("U8pU"),P=B("ODXe"),S=B("cDcd"),C=B("TSYQ"),T=B.n(C),h=B("Gytx"),p=B.n(h),f=B("Kwbf"),l=B("t23M"),a=B("qx4F"),c=B("6eGT"),s=B("IBYe"),u=B("Ff2n"),i=B("c+Xe"),n=B("fyJ8"),t=B("biw7");function d(Le,ke,Ye,Ze,Ve){var He=Ye[Le]||{},Pe=Ye[ke]||{},Re,Oe;He.fixed==="left"?Re=Ze.left[Le]:Pe.fixed==="right"&&(Oe=Ze.right[ke]);var he=!1,be=!1,Ce=!1,xe=!1,Be=Ye[ke+1],Qe=Ye[Le-1];if(Ve==="rtl"){if(Re!==void 0){var rt=Qe&&Qe.fixed==="left";xe=!rt}else if(Oe!==void 0){var dt=Be&&Be.fixed==="right";Ce=!dt}}else if(Re!==void 0){var xt=Be&&Be.fixed==="left";he=!xt}else if(Oe!==void 0){var _t=Qe&&Qe.fixed==="right";be=!_t}return{fixLeft:Re,fixRight:Oe,lastFixLeft:he,firstFixRight:be,lastFixRight:Ce,firstFixLeft:xe,isSticky:Ze.isSticky}}var v=B("sR1s");function b(Le){var ke=Le.cells,Ye=Le.stickyOffsets,Ze=Le.flattenColumns,Ve=Le.rowComponent,He=Le.cellComponent,Pe=Le.onHeaderRow,Re=Le.index,Oe=S.useContext(t.a),he=Oe.prefixCls,be=Oe.direction,Ce;Pe&&(Ce=Pe(ke.map(function(Be){return Be.column}),Re));var xe=Object(v.a)(ke.map(function(Be){return Be.column}));return S.createElement(Ve,Object.assign({},Ce),ke.map(function(Be,Qe){var rt=Be.column,dt=d(Be.colStart,Be.colEnd,Ze,Ye,be),xt;return rt&&rt.onHeaderCell&&(xt=Be.column.onHeaderCell(rt)),S.createElement(n.a,Object.assign({},Be,{ellipsis:rt.ellipsis,align:rt.align,component:He,prefixCls:he,key:xe[Qe]},dt,{additionalProps:xt,rowType:"header"}))}))}b.displayName="HeaderRow";var y=b;function _(Le){var ke=[];function Ye(Pe,Re){var Oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;ke[Oe]=ke[Oe]||[];var he=Re,be=Pe.filter(Boolean).map(function(Ce){var xe={key:Ce.key,className:Ce.className||"",children:Ce.title,column:Ce,colStart:he},Be=1,Qe=Ce.children;return Qe&&Qe.length>0&&(Be=Ye(Qe,he,Oe+1).reduce(function(rt,dt){return rt+dt},0),xe.hasSubColumns=!0),"colSpan"in Ce&&(Be=Ce.colSpan),"rowSpan"in Ce&&(xe.rowSpan=Ce.rowSpan),xe.colSpan=Be,xe.colEnd=xe.colStart+Be-1,ke[Oe].push(xe),he+=Be,Be});return be}Ye(Le,0);for(var Ze=ke.length,Ve=function(Re){ke[Re].forEach(function(Oe){!("rowSpan"in Oe)&&!Oe.hasSubColumns&&(Oe.rowSpan=Ze-Re)})},He=0;He<Ze;He+=1)Ve(He);return ke}function m(Le){var ke=Le.stickyOffsets,Ye=Le.columns,Ze=Le.flattenColumns,Ve=Le.onHeaderRow,He=S.useContext(t.a),Pe=He.prefixCls,Re=He.getComponent,Oe=S.useMemo(function(){return _(Ye)},[Ye]),he=Re(["header","wrapper"],"thead"),be=Re(["header","row"],"tr"),Ce=Re(["header","cell"],"th");return S.createElement(he,{className:"".concat(Pe,"-thead")},Oe.map(function(xe,Be){var Qe=S.createElement(y,{key:Be,flattenColumns:Ze,cells:xe,stickyOffsets:ke,rowComponent:be,cellComponent:Ce,onHeaderRow:Ve,index:Be});return Qe}))}var g=m,E=B("hW8S");function o(Le){for(var ke=Le.colWidths,Ye=Le.columns,Ze=Le.columCount,Ve=[],He=Ze||Ye.length,Pe=!1,Re=He-1;Re>=0;Re-=1){var Oe=ke[Re],he=Ye&&Ye[Re],be=he&&he[E.a];(Oe||be||Pe)&&(Ve.unshift(S.createElement("col",Object.assign({key:Re,style:{width:Oe,minWidth:Oe}},be))),Pe=!0)}return S.createElement("colgroup",null,Ve)}var x=o;function A(Le,ke){return Object(S.useMemo)(function(){for(var Ye=[],Ze=0;Ze<ke;Ze+=1){var Ve=Le[Ze];if(Ve!==void 0)Ye[Ze]=Ve;else return null}return Ye},[Le.join("_"),ke])}var O=S.forwardRef(function(Le,ke){var Ye=Le.noData,Ze=Le.columns,Ve=Le.flattenColumns,He=Le.colWidths,Pe=Le.columCount,Re=Le.stickyOffsets,Oe=Le.direction,he=Le.fixHeader,be=Le.offsetHeader,Ce=Le.stickyClassName,xe=Le.onScroll,Be=Object(u.a)(Le,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),Qe=S.useContext(t.a),rt=Qe.prefixCls,dt=Qe.scrollbarSize,xt=Qe.isSticky,_t=xt&&!he?0:dt,wt=S.useRef(null),st=S.useCallback(function(At){Object(i.b)(ke,At),Object(i.b)(wt,At)},[]);S.useEffect(function(){var At;function Ct(lt){var gt=lt.currentTarget,kt=lt.deltaX;kt&&(xe({currentTarget:gt,scrollLeft:gt.scrollLeft+kt}),lt.preventDefault())}return(At=wt.current)===null||At===void 0||At.addEventListener("wheel",Ct),function(){var lt;(lt=wt.current)===null||lt===void 0||lt.removeEventListener("wheel",Ct)}},[]);var ut=Ve[Ve.length-1],$e={fixed:ut?ut.fixed:null,onHeaderCell:function(){return{className:"".concat(rt,"-cell-scrollbar")}}},_e=Object(S.useMemo)(function(){return _t?[].concat(Object(U.a)(Ze),[$e]):Ze},[_t,Ze]),je=Object(S.useMemo)(function(){return _t?[].concat(Object(U.a)(Ve),[$e]):Ve},[_t,Ve]),ct=Object(S.useMemo)(function(){var At=Re.right,Ct=Re.left;return Object(Q.a)(Object(Q.a)({},Re),{},{left:Oe==="rtl"?[].concat(Object(U.a)(Ct.map(function(lt){return lt+_t})),[0]):Ct,right:Oe==="rtl"?At:[].concat(Object(U.a)(At.map(function(lt){return lt+_t})),[0]),isSticky:xt})},[_t,Re,xt]),et=A(He,Pe);return S.createElement("div",{style:Object(Q.a)({overflow:"hidden"},xt?{top:be}:{}),ref:st,className:T()("".concat(rt,"-header"),Object(ae.a)({},Ce,!!Ce))},S.createElement("table",{style:{tableLayout:"fixed",visibility:Ye||et?null:"hidden"}},S.createElement(x,{colWidths:et?[].concat(Object(U.a)(et),[_t]):[],columCount:Pe+1,columns:je}),S.createElement(g,Object.assign({},Be,{stickyOffsets:ct,columns:_e,flattenColumns:je}))))});O.displayName="FixedHeader";var D=O,I=S.createContext(null),F=I;function z(Le){var ke=Le.prefixCls,Ye=Le.children,Ze=Le.component,Ve=Le.cellComponent,He=Le.fixHeader,Pe=Le.fixColumn,Re=Le.horizonScroll,Oe=Le.className,he=Le.expanded,be=Le.componentWidth,Ce=Le.colSpan,xe=S.useContext(t.a),Be=xe.scrollbarSize;return S.useMemo(function(){var Qe=Ye;return Pe&&(Qe=S.createElement("div",{style:{width:be-(He?Be:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(ke,"-expanded-row-fixed")},Qe)),S.createElement(Ze,{className:Oe,style:{display:he?null:"none"}},S.createElement(n.a,{component:Ve,prefixCls:ke,colSpan:Ce},Qe))},[Ye,Ze,He,Re,Oe,he,be,Ce,Be])}var ne=z;function j(Le){var ke=Le.className,Ye=Le.style,Ze=Le.record,Ve=Le.index,He=Le.rowKey,Pe=Le.getRowKey,Re=Le.rowExpandable,Oe=Le.expandedKeys,he=Le.onRow,be=Le.indent,Ce=be===void 0?0:be,xe=Le.rowComponent,Be=Le.cellComponent,Qe=Le.childrenColumnName,rt=S.useContext(t.a),dt=rt.prefixCls,xt=rt.fixedInfoList,_t=S.useContext(F),wt=_t.fixHeader,st=_t.fixColumn,ut=_t.horizonScroll,$e=_t.componentWidth,_e=_t.flattenColumns,je=_t.expandableType,ct=_t.expandRowByClick,et=_t.onTriggerExpand,At=_t.rowClassName,Ct=_t.expandedRowClassName,lt=_t.indentSize,gt=_t.expandIcon,kt=_t.expandedRowRender,zt=_t.expandIconColumnIndex,$t=S.useState(!1),Se=Object(P.a)($t,2),de=Se[0],W=Se[1],J=Oe&&Oe.has(Le.recordKey);S.useEffect(function(){J&&W(!0)},[J]);var te=je==="row"&&(!Re||Re(Ze)),se=je==="nest",Ee=Qe&&Ze&&Ze[Qe],ze=te||se,qe;he&&(qe=he(Ze,Ve));var St=function(yt){if(ct&&ze&&et(Ze,yt),qe&&qe.onClick){for(var Sn,mt=arguments.length,ln=new Array(mt>1?mt-1:0),fn=1;fn<mt;fn++)ln[fn-1]=arguments[fn];(Sn=qe).onClick.apply(Sn,[yt].concat(ln))}},Lt;typeof At=="string"?Lt=At:typeof At=="function"&&(Lt=At(Ze,Ve,Ce));var it=Object(v.a)(_e),Tt=S.createElement(xe,Object.assign({},qe,{"data-row-key":He,className:T()(ke,"".concat(dt,"-row"),"".concat(dt,"-row-level-").concat(Ce),Lt,qe&&qe.className),style:Object(Q.a)(Object(Q.a)({},Ye),qe?qe.style:null),onClick:St}),_e.map(function(It,yt){var Sn=It.render,mt=It.dataIndex,ln=It.className,fn=it[yt],Zn=xt[yt],rr;yt===(zt||0)&&se&&(rr=S.createElement(S.Fragment,null,S.createElement("span",{style:{paddingLeft:"".concat(lt*Ce,"px")},className:"".concat(dt,"-row-indent indent-level-").concat(Ce)}),gt({prefixCls:dt,expanded:J,expandable:Ee,record:Ze,onExpand:et})));var xn;return It.onCell&&(xn=It.onCell(Ze,Ve)),S.createElement(n.a,Object.assign({className:ln,ellipsis:It.ellipsis,align:It.align,component:Be,prefixCls:dt,key:fn,record:Ze,index:Ve,dataIndex:mt,render:Sn,shouldCellUpdate:It.shouldCellUpdate},Zn,{appendNode:rr,additionalProps:xn}))})),Qt;if(te&&(de||J)){var Et=kt(Ze,Ve,Ce+1,J),nn=Ct&&Ct(Ze,Ve,Ce);Qt=S.createElement(ne,{expanded:J,className:T()("".concat(dt,"-expanded-row"),"".concat(dt,"-expanded-row-level-").concat(Ce+1),nn),prefixCls:dt,fixHeader:wt,fixColumn:st,horizonScroll:ut,component:xe,componentWidth:$e,cellComponent:Be,colSpan:_e.length},Et)}var Jt;return Ee&&J&&(Jt=(Ze[Qe]||[]).map(function(It,yt){var Sn=Pe(It,yt);return S.createElement(j,Object.assign({},Le,{key:Sn,rowKey:Sn,record:It,recordKey:Sn,index:yt,indent:Ce+1}))})),S.createElement(S.Fragment,null,Tt,Qt,Jt)}j.displayName="BodyRow";var G=j,X=S.createContext(null),Z=X;function K(Le){var ke=Le.columnKey,Ye=Le.onColumnResize,Ze=S.useRef();return S.useEffect(function(){Ze.current&&Ye(ke,Ze.current.offsetWidth)},[]),S.createElement(l.a,{onResize:function(He){var Pe=He.offsetWidth;Ye(ke,Pe)}},S.createElement("td",{ref:Ze,style:{padding:0,border:0,height:0}},S.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function q(Le){var ke=Le.data,Ye=Le.getRowKey,Ze=Le.measureColumnWidth,Ve=Le.expandedKeys,He=Le.onRow,Pe=Le.rowExpandable,Re=Le.emptyNode,Oe=Le.childrenColumnName,he=S.useContext(Z),be=he.onColumnResize,Ce=S.useContext(t.a),xe=Ce.prefixCls,Be=Ce.getComponent,Qe=S.useContext(F),rt=Qe.fixHeader,dt=Qe.horizonScroll,xt=Qe.flattenColumns,_t=Qe.componentWidth;return S.useMemo(function(){var wt=Be(["body","wrapper"],"tbody"),st=Be(["body","row"],"tr"),ut=Be(["body","cell"],"td"),$e;ke.length?$e=ke.map(function(je,ct){var et=Ye(je,ct);return S.createElement(G,{key:et,rowKey:et,record:je,recordKey:et,index:ct,rowComponent:st,cellComponent:ut,expandedKeys:Ve,onRow:He,getRowKey:Ye,rowExpandable:Pe,childrenColumnName:Oe})}):$e=S.createElement(ne,{expanded:!0,className:"".concat(xe,"-placeholder"),prefixCls:xe,fixHeader:rt,fixColumn:dt,horizonScroll:dt,component:st,componentWidth:_t,cellComponent:ut,colSpan:xt.length},Re);var _e=Object(v.a)(xt);return S.createElement(wt,{className:"".concat(xe,"-tbody")},Ze&&S.createElement("tr",{"aria-hidden":"true",className:"".concat(xe,"-measure-row"),style:{height:0}},_e.map(function(je){return S.createElement(K,{key:je,columnKey:je,onColumnResize:be})})),$e)},[ke,xe,He,Ze,Ve,Ye,Be,_t,Re,xt])}var ie=S.memo(q);ie.displayName="Body";var oe=ie,ye=B("wRmb"),pe=B("xEkU"),we=B.n(pe);function fe(Le){var ke=Object(S.useRef)(Le),Ye=Object(S.useState)({}),Ze=Object(P.a)(Ye,2),Ve=Ze[1],He=Object(S.useRef)(null),Pe=Object(S.useRef)([]);function Re(Oe){He.current===null&&(Pe.current=[],He.current=we()(function(){Pe.current.forEach(function(he){ke.current=he(ke.current)}),He.current=null,Ve({})})),Pe.current.push(Oe)}return Object(S.useEffect)(function(){return function(){we.a.cancel(He.current)}},[]),[ke.current,Re]}function Te(Le){var ke=Object(S.useRef)(Le),Ye=Object(S.useRef)(null);function Ze(){window.clearTimeout(Ye.current)}function Ve(Pe){ke.current=Pe,Ze(),Ye.current=window.setTimeout(function(){ke.current=null,Ye.current=null},100)}function He(){return ke.current}return Object(S.useEffect)(function(){return Ze},[]),[Ve,He]}function Fe(Le,ke,Ye){var Ze=Object(S.useMemo)(function(){for(var Ve=[],He=[],Pe=0,Re=0,Oe=0;Oe<ke;Oe+=1)if(Ye==="rtl"){He[Oe]=Re,Re+=Le[Oe]||0;var he=ke-Oe-1;Ve[he]=Pe,Pe+=Le[he]||0}else{Ve[Oe]=Pe,Pe+=Le[Oe]||0;var be=ke-Oe-1;He[be]=Re,Re+=Le[be]||0}return{left:Ve,right:He}},[Le,ke,Ye]);return Ze}var De=Fe;function Me(Le){var ke=Le.className,Ye=Le.children;return S.createElement("div",{className:ke},Ye)}var Ue=Me,ve=B("n6Qo");function ce(Le){var ke,Ye=Le.prefixCls,Ze=Le.record,Ve=Le.onExpand,He=Le.expanded,Pe=Le.expandable,Re="".concat(Ye,"-row-expand-icon");if(!Pe)return S.createElement("span",{className:T()(Re,"".concat(Ye,"-row-spaced"))});var Oe=function(be){Ve(Ze,be),be.stopPropagation()};return S.createElement("span",{className:T()(Re,(ke={},Object(ae.a)(ke,"".concat(Ye,"-row-expanded"),He),Object(ae.a)(ke,"".concat(Ye,"-row-collapsed"),!He),ke)),onClick:Oe})}function Ie(Le,ke,Ye){var Ze=[];function Ve(He){(He||[]).forEach(function(Pe,Re){Ze.push(ke(Pe,Re)),Ve(Pe[Ye])})}return Ve(Le),Ze}var Ne=B("zT1h"),Xe=B("y0+3"),ee=function(ke,Ye){var Ze,Ve,He=ke.scrollBodyRef,Pe=ke.onScroll,Re=ke.offsetScroll,Oe=S.useContext(t.a),he=Oe.prefixCls,be=((Ze=He.current)===null||Ze===void 0?void 0:Ze.scrollWidth)||0,Ce=((Ve=He.current)===null||Ve===void 0?void 0:Ve.clientWidth)||0,xe=be&&Ce*(Ce/be),Be=S.useRef(),Qe=fe({scrollLeft:0,isHiddenScrollBar:!1}),rt=Object(P.a)(Qe,2),dt=rt[0],xt=rt[1],_t=S.useRef({delta:0,x:0}),wt=S.useState(!1),st=Object(P.a)(wt,2),ut=st[0],$e=st[1],_e=function(){$e(!1)},je=function(lt){lt.persist(),_t.current.delta=lt.pageX-dt.scrollLeft,_t.current.x=0,$e(!0),lt.preventDefault()},ct=function(lt){var gt,kt=lt||((gt=window)===null||gt===void 0?void 0:gt.event),zt=kt.buttons;if(!ut||zt===0){ut&&$e(!1);return}var $t=_t.current.x+lt.pageX-_t.current.x-_t.current.delta;$t<=0&&($t=0),$t+xe>=Ce&&($t=Ce-xe),Pe({scrollLeft:$t/Ce*(be+2)}),_t.current.x=lt.pageX},et=function(){var lt=Object(Xe.b)(He.current).top,gt=lt+He.current.offsetHeight,kt=document.documentElement.scrollTop+window.innerHeight;gt-Object(a.a)()<=kt||lt>=kt-Re?xt(function(zt){return Object(Q.a)(Object(Q.a)({},zt),{},{isHiddenScrollBar:!0})}):xt(function(zt){return Object(Q.a)(Object(Q.a)({},zt),{},{isHiddenScrollBar:!1})})},At=function(lt){xt(function(gt){return Object(Q.a)(Object(Q.a)({},gt),{},{scrollLeft:lt/be*Ce||0})})};return S.useImperativeHandle(Ye,function(){return{setScrollLeft:At}}),S.useEffect(function(){var Ct=Object(Ne.a)(document.body,"mouseup",_e,!1),lt=Object(Ne.a)(document.body,"mousemove",ct,!1);return et(),function(){Ct.remove(),lt.remove()}},[xe,ut]),S.useEffect(function(){var Ct=Object(Ne.a)(window,"scroll",et,!1),lt=Object(Ne.a)(window,"resize",et,!1);return function(){Ct.remove(),lt.remove()}},[]),S.useEffect(function(){dt.isHiddenScrollBar||xt(function(Ct){var lt,gt;return Object(Q.a)(Object(Q.a)({},Ct),{},{scrollLeft:He.current.scrollLeft/((lt=He.current)===null||lt===void 0?void 0:lt.scrollWidth)*((gt=He.current)===null||gt===void 0?void 0:gt.clientWidth)})})},[dt.isHiddenScrollBar]),be<=Ce||!xe||dt.isHiddenScrollBar?null:S.createElement("div",{style:{height:Object(a.a)(),width:Ce,bottom:Re},className:"".concat(he,"-sticky-scroll")},S.createElement("div",{onMouseDown:je,ref:Be,className:T()("".concat(he,"-sticky-scroll-bar"),Object(ae.a)({},"".concat(he,"-sticky-scroll-bar-active"),ut)),style:{width:"".concat(xe,"px"),transform:"translate3d(".concat(dt.scrollLeft,"px, 0, 0)")}}))},k=S.forwardRef(ee);function N(Le,ke){return S.useMemo(function(){var Ye=!!Le;return{isSticky:Ye,stickyClassName:Ye?"".concat(ke,"-sticky-header"):"",offsetHeader:Object(w.a)(Le)==="object"&&Le.offsetHeader||0,offsetScroll:Object(w.a)(Le)==="object"&&Le.offsetScroll||0}},[Le,ke])}var $=[],V={},Y="rc-table-internal-hook",me=S.memo(function(Le){var ke=Le.children;return ke},function(Le,ke){return p()(Le.props,ke.props)?Le.pingLeft!==ke.pingLeft||Le.pingRight!==ke.pingRight:!1});function Ae(Le){var ke,Ye=Le.prefixCls,Ze=Le.className,Ve=Le.rowClassName,He=Le.style,Pe=Le.data,Re=Le.rowKey,Oe=Le.scroll,he=Le.tableLayout,be=Le.direction,Ce=Le.title,xe=Le.footer,Be=Le.summary,Qe=Le.id,rt=Le.showHeader,dt=Le.components,xt=Le.emptyText,_t=Le.onRow,wt=Le.onHeaderRow,st=Le.internalHooks,ut=Le.transformColumns,$e=Le.internalRefs,_e=Le.sticky,je=Pe||$,ct=!!je.length,et=S.useState(0),At=Object(P.a)(et,2),Ct=At[0],lt=At[1];S.useEffect(function(){lt(Object(a.a)())});var gt=S.useMemo(function(){return Object(v.c)(dt,{})},[dt]),kt=S.useCallback(function(Dt,Ht){return Object(v.b)(gt,Dt)||Ht},[gt]),zt=S.useMemo(function(){return typeof Re=="function"?Re:function(Dt){var Ht=Dt&&Dt[Re];return Ht}},[Re]),$t=Object(E.c)(Le),Se=$t.expandIcon,de=$t.expandedRowKeys,W=$t.defaultExpandedRowKeys,J=$t.defaultExpandAllRows,te=$t.expandedRowRender,se=$t.onExpand,Ee=$t.onExpandedRowsChange,ze=$t.expandRowByClick,qe=$t.rowExpandable,St=$t.expandIconColumnIndex,Lt=$t.expandedRowClassName,it=$t.childrenColumnName,Tt=$t.indentSize,Qt=Se||ce,Et=it||"children",nn=S.useMemo(function(){return te?"row":Le.expandable&&st===Y&&Le.expandable.__PARENT_RENDER_ICON__||je.some(function(Dt){return Dt&&Object(w.a)(Dt)==="object"&&Dt[Et]})?"nest":!1},[!!te,je]),Jt=S.useState(function(){return W||(J?Ie(je,zt,Et):[])}),It=Object(P.a)(Jt,2),yt=It[0],Sn=It[1],mt=S.useMemo(function(){return new Set(de||yt||[])},[de,yt]),ln=S.useCallback(function(Dt){var Ht=zt(Dt,je.indexOf(Dt)),jt,ht=mt.has(Ht);ht?(mt.delete(Ht),jt=Object(U.a)(mt)):jt=[].concat(Object(U.a)(mt),[Ht]),Sn(jt),se&&se(!ht,Dt),Ee&&Ee(jt)},[zt,mt,je,se,Ee]),fn=S.useState(0),Zn=Object(P.a)(fn,2),rr=Zn[0],xn=Zn[1],Er=Object(ye.b)(Object(Q.a)(Object(Q.a)(Object(Q.a)({},Le),$t),{},{expandable:!!te,expandedKeys:mt,getRowKey:zt,onTriggerExpand:ln,expandIcon:Qt,expandIconColumnIndex:St,direction:be}),st===Y?ut:null),Cr=Object(P.a)(Er,2),un=Cr[0],Mn=Cr[1],Nr=S.useMemo(function(){return{columns:un,flattenColumns:Mn}},[un,Mn]),Xr=S.useRef(),xr=S.useRef(),ur=S.useRef(),gr=S.useState(!1),gi=Object(P.a)(gr,2),pr=gi[0],yr=gi[1],Or=S.useState(!1),Kr=Object(P.a)(Or,2),Sr=Kr[0],ui=Kr[1],Pr=fe(new Map),yi=Object(P.a)(Pr,2),ci=yi[0],ni=yi[1],Di=Object(v.a)(Mn),Ni=Di.map(function(Dt){return ci.get(Dt)}),Ui=S.useMemo(function(){return Ni},[Ni.join("_")]),di=De(Ui,Mn.length,be),mr=Oe&&Object(v.d)(Oe.y),dr=Oe&&Object(v.d)(Oe.x),qr=dr&&Mn.some(function(Dt){var Ht=Dt.fixed;return Ht}),ri=S.useRef(),fi=N(_e,Ye),ii=fi.isSticky,Xi=fi.offsetHeader,na=fi.offsetScroll,ai=fi.stickyClassName,Yi,Zr,Wi;mr&&(Zr={overflowY:"scroll",maxHeight:Oe.y}),dr&&(Yi={overflowX:"auto"},mr||(Zr={overflowY:"hidden"}),Wi={width:Oe.x===!0?"auto":Oe.x,minWidth:"100%"});var Pi=S.useCallback(function(Dt,Ht){ni(function(jt){var ht=new Map(jt);return ht.set(Dt,Ht),ht})},[]),Ci=Te(null),$i=Object(P.a)(Ci,2),bi=$i[0],Ji=$i[1];function Qi(Dt,Ht){if(!Ht)return;typeof Ht=="function"?Ht(Dt):Ht.scrollLeft!==Dt&&(Ht.scrollLeft=Dt)}var hi=function(Ht){var jt=Ht.currentTarget,ht=Ht.scrollLeft,ft=typeof ht=="number"?ht:jt.scrollLeft,Ft=jt||V;if(!Ji()||Ji()===Ft){var vt;bi(Ft),Qi(ft,xr.current),Qi(ft,ur.current),Qi(ft,(vt=ri.current)===null||vt===void 0?void 0:vt.setScrollLeft)}if(jt){var Zt=jt.scrollWidth,Rt=jt.clientWidth;yr(ft>0),ui(ft<Zt-Rt)}},Zi=function(){ur.current&&hi({currentTarget:ur.current})},tn=function(Ht){var jt=Ht.width;Zi(),xn(Xr.current?Xr.current.offsetWidth:jt)};S.useEffect(function(){return Zi},[]),S.useEffect(function(){dr&&Zi()},[dr]),S.useEffect(function(){st===Y&&$e&&($e.body.current=ur.current)});var yn=kt(["table"],"table"),an=S.useMemo(function(){return he||(qr?Oe.x==="max-content"?"auto":"fixed":mr||Mn.some(function(Dt){var Ht=Dt.ellipsis;return Ht})?"fixed":"auto")},[mr,qr,Mn,he]),Rn,Xn={colWidths:Ui,columCount:Mn.length,stickyOffsets:di,onHeaderRow:wt,fixHeader:mr},or=S.useMemo(function(){return ct?null:typeof xt=="function"?xt():xt},[ct,xt]),Vt=S.createElement(oe,{data:je,measureColumnWidth:mr||dr||ii,expandedKeys:mt,rowExpandable:qe,getRowKey:zt,onRow:_t,emptyNode:or,childrenColumnName:Et}),br=S.createElement(x,{colWidths:Mn.map(function(Dt){var Ht=Dt.width;return Ht}),columns:Mn}),Hr=Be&&S.createElement(ve.b,null,Be(je)),kn=kt(["body"]);if(mr||ii){var Oi;typeof kn=="function"?(Oi=kn(je,{scrollbarSize:Ct,ref:ur,onScroll:hi}),Xn.colWidths=Mn.map(function(Dt,Ht){var jt=Dt.width,ht=Ht===un.length-1?jt-Ct:jt;return typeof ht=="number"&&!Number.isNaN(ht)?ht:(Object(f.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):Oi=S.createElement("div",{style:Object(Q.a)(Object(Q.a)({},Yi),Zr),onScroll:hi,ref:ur,className:T()("".concat(Ye,"-body"))},S.createElement(yn,{style:Object(Q.a)(Object(Q.a)({},Wi),{},{tableLayout:an})},br,Vt,Hr),ii&&S.createElement(k,{ref:ri,offsetScroll:na,scrollBodyRef:ur,onScroll:hi})),Rn=S.createElement(S.Fragment,null,rt!==!1&&S.createElement(D,Object.assign({noData:!je.length},Xn,Nr,{direction:be,offsetHeader:Xi,stickyClassName:ai,ref:xr,onScroll:hi})),Oi)}else Rn=S.createElement("div",{style:Object(Q.a)(Object(Q.a)({},Yi),Zr),className:T()("".concat(Ye,"-content")),onScroll:hi,ref:ur},S.createElement(yn,{style:Object(Q.a)(Object(Q.a)({},Wi),{},{tableLayout:an})},br,rt!==!1&&S.createElement(g,Object.assign({},Xn,Nr)),Vt,Hr));var nr=Object(E.b)(Le),Ur=S.createElement("div",Object.assign({className:T()(Ye,Ze,(ke={},Object(ae.a)(ke,"".concat(Ye,"-rtl"),be==="rtl"),Object(ae.a)(ke,"".concat(Ye,"-ping-left"),pr),Object(ae.a)(ke,"".concat(Ye,"-ping-right"),Sr),Object(ae.a)(ke,"".concat(Ye,"-layout-fixed"),he==="fixed"),Object(ae.a)(ke,"".concat(Ye,"-fixed-header"),mr),Object(ae.a)(ke,"".concat(Ye,"-fixed-column"),qr),Object(ae.a)(ke,"".concat(Ye,"-scroll-horizontal"),dr),Object(ae.a)(ke,"".concat(Ye,"-has-fix-left"),Mn[0]&&Mn[0].fixed),Object(ae.a)(ke,"".concat(Ye,"-has-fix-right"),Mn[Mn.length-1]&&Mn[Mn.length-1].fixed==="right"),ke)),style:He,id:Qe,ref:Xr},nr),S.createElement(me,{pingLeft:pr,pingRight:Sr,props:Object(Q.a)(Object(Q.a)({},Le),{},{stickyOffsets:di,mergedExpandedKeys:mt})},Ce&&S.createElement(Ue,{className:"".concat(Ye,"-title")},Ce(je)),S.createElement("div",{className:"".concat(Ye,"-container")},Rn),xe&&S.createElement(Ue,{className:"".concat(Ye,"-footer")},xe(je))));dr&&(Ur=S.createElement(l.a,{onResize:tn},Ur));var nt=S.useMemo(function(){return{prefixCls:Ye,getComponent:kt,scrollbarSize:Ct,direction:be,fixedInfoList:Mn.map(function(Dt,Ht){return d(Ht,Ht,Mn,di,be)}),isSticky:ii}},[Ye,kt,Ct,be,Mn,di,be,ii]),pt=S.useMemo(function(){return Object(Q.a)(Object(Q.a)({},Nr),{},{tableLayout:an,rowClassName:Ve,expandedRowClassName:Lt,componentWidth:rr,fixHeader:mr,fixColumn:qr,horizonScroll:dr,expandIcon:Qt,expandableType:nn,expandRowByClick:ze,expandedRowRender:te,onTriggerExpand:ln,expandIconColumnIndex:St,indentSize:Tt})},[Nr,an,Ve,Lt,rr,mr,qr,dr,Qt,nn,ze,te,ln,St,Tt]),Pt=S.useMemo(function(){return{onColumnResize:Pi}},[Pi]);return S.createElement(t.a.Provider,{value:nt},S.createElement(F.Provider,{value:pt},S.createElement(Z.Provider,{value:Pt},Ur)))}Ae.Column=s.a,Ae.ColumnGroup=c.a,Ae.Summary=ve.a,Ae.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var at=Ke.b=Ae},wRmb:function(Je,Ke,B){"use strict";B.d(Ke,"a",function(){return p});var ae=B("rePB"),Q=B("KQm4"),U=B("VTBJ"),w=B("Ff2n"),P=B("cDcd"),S=B.n(P),C=B("Kwbf"),T=B("Zm9Q"),h=B("hW8S");function p(s){return Object(T.a)(s).filter(function(u){return P.isValidElement(u)}).map(function(u){var i=u.key,n=u.props,t=n.children,d=Object(w.a)(n,["children"]),v=Object(U.a)({key:i},d);return t&&(v.children=p(t)),v})}function f(s){return s.reduce(function(u,i){var n=i.fixed,t=n===!0?"left":n,d=i.children;return d&&d.length>0?[].concat(Object(Q.a)(u),Object(Q.a)(f(d).map(function(v){return Object(U.a)({fixed:t},v)}))):[].concat(Object(Q.a)(u),[Object(U.a)(Object(U.a)({},i),{},{fixed:t})])},[])}function l(s){for(var u=!0,i=0;i<s.length;i+=1){var n=s[i];if(u&&n.fixed!=="left")u=!1;else if(!u&&n.fixed==="left"){Object(C.a)(!1,"Index ".concat(i-1," of `columns` missing `fixed='left'` prop."));break}}for(var t=!0,d=s.length-1;d>=0;d-=1){var v=s[d];if(t&&v.fixed!=="right")t=!1;else if(!t&&v.fixed==="right"){Object(C.a)(!1,"Index ".concat(d+1," of `columns` missing `fixed='right'` prop."));break}}}function a(s){return s.map(function(u){var i=u.fixed,n=Object(w.a)(u,["fixed"]),t=i;return i==="left"?t="right":i==="right"&&(t="left"),Object(U.a)({fixed:t},n)})}function c(s,u){var i=s.prefixCls,n=s.columns,t=s.children,d=s.expandable,v=s.expandedKeys,b=s.getRowKey,y=s.onTriggerExpand,_=s.expandIcon,m=s.rowExpandable,g=s.expandIconColumnIndex,E=s.direction,o=s.expandRowByClick,x=P.useMemo(function(){return n||p(t)},[n,t]),A=P.useMemo(function(){if(d){var I,F=g||0,z=x[F],ne=(I={},Object(ae.a)(I,h.a,{className:"".concat(i,"-expand-icon-col")}),Object(ae.a)(I,"title",""),Object(ae.a)(I,"fixed",z?z.fixed:null),Object(ae.a)(I,"className","".concat(i,"-row-expand-icon-cell")),Object(ae.a)(I,"render",function(X,Z,K){var q=b(Z,K),ie=v.has(q),oe=m?m(Z):!0,ye=_({prefixCls:i,expanded:ie,expandable:oe,record:Z,onExpand:y});return o?P.createElement("span",{onClick:function(we){return we.stopPropagation()}},ye):ye}),I),j=x.slice();return F>=0&&j.splice(F,0,ne),j}return x},[d,x,b,v,_,E]),O=P.useMemo(function(){var I=A;return u&&(I=u(I)),I.length||(I=[{render:function(){return null}}]),I},[u,A,E]),D=P.useMemo(function(){return E==="rtl"?a(f(O)):f(O)},[O,E]);return[O,D]}Ke.b=c},wW8i:function(Je,Ke,B){Je.exports={flex_box_center:"flex_box_center___3xqQI",flex_space_between:"flex_space_between___1fvHN",flex_box_vertical_center:"flex_box_vertical_center___1Gb4J",flex_box_center_end:"flex_box_center_end___8RbQi",flex_box_column:"flex_box_column___3xL78",discuss:"discuss___ybobd",reply:"reply___3EgHc",pagination:"pagination___2EiMG"}},"y0+3":function(Je,Ke,B){"use strict";B.d(Ke,"a",function(){return f}),B.d(Ke,"b",function(){return a});var ae=/margin|padding|width|height|max|min|offset/,Q={left:!0,top:!0},U={cssFloat:1,styleFloat:1,float:1};function w(c){return c.nodeType===1?c.ownerDocument.defaultView.getComputedStyle(c,null):{}}function P(c,s,u){if(s=s.toLowerCase(),u==="auto"){if(s==="height")return c.offsetHeight;if(s==="width")return c.offsetWidth}return s in Q||(Q[s]=ae.test(s)),Q[s]?parseFloat(u)||0:u}function S(c,s){var u=arguments.length,i=w(c);return s=U[s]?"cssFloat"in c.style?"cssFloat":"styleFloat":s,u===1?i:P(c,s,i[s]||c.style[s])}function C(c,s,u){var i=arguments.length;if(s=U[s]?"cssFloat"in c.style?"cssFloat":"styleFloat":s,i===3)return typeof u=="number"&&ae.test(s)&&(u="".concat(u,"px")),c.style[s]=u,u;for(var n in s)s.hasOwnProperty(n)&&C(c,n,s[n]);return w(c)}function T(c){return c===document.body?document.documentElement.clientWidth:c.offsetWidth}function h(c){return c===document.body?window.innerHeight||document.documentElement.clientHeight:c.offsetHeight}function p(){var c=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),s=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:c,height:s}}function f(){var c=document.documentElement.clientWidth,s=window.innerHeight||document.documentElement.clientHeight;return{width:c,height:s}}function l(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function a(c){var s=c.getBoundingClientRect(),u=document.documentElement;return{left:s.left+(window.pageXOffset||u.scrollLeft)-(u.clientLeft||document.body.clientLeft||0),top:s.top+(window.pageYOffset||u.scrollTop)-(u.clientTop||document.body.clientTop||0)}}},ynwM:function(Je,Ke,B){var ae=B("MFOe"),Q=ae.Global;Je.exports={name:"oldFF-globalStorage",read:w,write:P,each:S,remove:C,clearAll:T};var U=Q.globalStorage;function w(h){return U[h]}function P(h,p){U[h]=p}function S(h){for(var p=U.length-1;p>=0;p--){var f=U.key(p);h(U[f],f)}}function C(h){return U.removeItem(h)}function T(){S(function(h,p){delete U[h]})}}}]);