|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[214,3,5,7,8,16,19],{"++UQ":function(Ve,Be,W){},"+NIl":function(Ve,Be,W){(function(re){re(W("VrN/"))})(function(re){"use strict";re.defineMode("stex",function($,U){"use strict";function S(c,s){c.cmdState.push(s)}function P(c){return c.cmdState.length>0?c.cmdState[c.cmdState.length-1]:null}function E(c){var s=c.cmdState.pop();s&&s.closeBracket()}function C(c){for(var s=c.cmdState,d=s.length-1;d>=0;d--){var i=s[d];if(i.name=="DEFAULT")continue;return i}return{styleIdentifier:function(){return null}}}function w(c,s,d){return function(){this.name=c,this.bracketNo=0,this.style=s,this.styles=d,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var u={};u.importmodule=w("importmodule","tag",["string","builtin"]),u.documentclass=w("documentclass","tag",["","atom"]),u.usepackage=w("usepackage","tag",["atom"]),u.begin=w("begin","tag",["atom"]),u.end=w("end","tag",["atom"]),u.label=w("label","tag",["atom"]),u.ref=w("ref","tag",["atom"]),u.eqref=w("eqref","tag",["atom"]),u.cite=w("cite","tag",["atom"]),u.bibitem=w("bibitem","tag",["atom"]),u.Bibitem=w("Bibitem","tag",["atom"]),u.RBibitem=w("RBibitem","tag",["atom"]),u.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 d;if(c.match(/^\\[a-zA-Z@]+/)){var i=c.current().slice(1);return d=u.hasOwnProperty(i)?u[i]:u.DEFAULT,d=new d,S(s,d),p(s,a),d.style}if(c.match(/^\\[$&%#{}_]/))return"tag";if(c.match(/^\\[,;!\/\\]/))return"tag";if(c.match("\\["))return p(s,function(n,h){return o(n,h,"\\]")}),"keyword";if(c.match("\\("))return p(s,function(n,h){return o(n,h,"\\)")}),"keyword";if(c.match("$$"))return p(s,function(n,h){return o(n,h,"$$")}),"keyword";if(c.match("$"))return p(s,function(n,h){return o(n,h,"$")}),"keyword";var t=c.next();if(t=="%")return c.skipToEnd(),"comment";if(t=="}"||t=="]"){if(d=P(s),d)d.closeBracket(t),p(s,a);else return"error";return"bracket"}else return t=="{"||t=="["?(d=u.DEFAULT,d=new d,S(s,d),"bracket"):/\d/.test(t)?(c.eatWhile(/[\w.%]/),"atom"):(c.eatWhile(/[\w\-_]/),d=C(s),d.name=="begin"&&(d.argument=c.current()),d.styleIdentifier())}function o(c,s,d){if(c.eatSpace())return null;if(d&&c.match(d))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 d=c.peek(),i;return d=="{"||d=="["?(i=P(s),i.openBracket(d),c.eat(d),p(s,f),"bracket"):/[ \t\r]/.test(d)?(c.eat(d),null):(p(s,f),E(s),f(c,s))}return{startState:function(){var c=U.inMathMode?function(s,d){return o(s,d)}: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:"%"}}),re.defineMIME("text/x-stex","stex"),re.defineMIME("text/x-latex","stex")})},"+QRC":function(Ve,Be,W){"use strict";var re=W("E9nw"),$={"text/plain":"Text","text/html":"Url",default:"Text"},U="Copy to clipboard: #{key}, Enter";function S(E){var C=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return E.replace(/#{\s*key\s*}/g,C)}function P(E,C){var w,u,p,f,o,a,c=!1;C||(C={}),w=C.debug||!1;try{p=re(),f=document.createRange(),o=document.getSelection(),a=document.createElement("span"),a.textContent=E,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(d){if(d.stopPropagation(),C.format)if(d.preventDefault(),typeof d.clipboardData=="undefined"){w&&console.warn("unable to use e.clipboardData"),w&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var i=$[C.format]||$.default;window.clipboardData.setData(i,E)}else d.clipboardData.clearData(),d.clipboardData.setData(C.format,E);C.onCopy&&(d.preventDefault(),C.onCopy(d.clipboardData))}),document.body.appendChild(a),f.selectNodeContents(a),o.addRange(f);var s=document.execCommand("copy");if(!s)throw new Error("copy command was unsuccessful");c=!0}catch(d){w&&console.error("unable to copy using execCommand: ",d),w&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(C.format||"text",E),C.onCopy&&C.onCopy(window.clipboardData),c=!0}catch(i){w&&console.error("unable to copy using clipboardData: ",i),w&&console.error("falling back to prompt"),u=S("message"in C?C.message:U),window.prompt(u,E)}}finally{o&&(typeof o.removeRange=="function"?o.removeRange(f):o.removeAllRanges()),a&&document.body.removeChild(a),p()}return c}Ve.exports=P},"+aKw":function(Ve,Be,W){"use strict";var re=W("tJVT"),$=W("cDcd"),U=W.n($),S=function(C){return String(C).length===1?"0".concat(C):C},P=function(C){var w=C.className,u=w===void 0?"":w,p=C.onChange,f=C.defaultValue,o=f===void 0?0:f,a=Object($.useState)(o),c=Object(re.a)(a,2),s=c[0],d=c[1];Object($.useEffect)(function(){var h=setTimeout(function(){d(s+1e3)},1e3);return p(s+1e3),function(){clearInterval(h)}},[s]);var i=parseInt(s/(60*6e4))||"00",t=parseInt(s%(60*6e4)/6e4)||"00",n=parseInt(s%6e4/1e3)||"00";return U.a.createElement("div",{className:u},S(i),":",S(t),":",S(n))};Be.a=P},"+ua5":function(Ve,Be,W){},"07cG":function(Ve,Be,W){Ve.exports={ldsRing:"ldsRing___2F8W7",idsRingWrapper:"idsRingWrapper___fC2cF",ldsring:"ldsring___3A88y"}},"0r65":function(Ve,Be){var W=arguments[3],re=arguments[4],$=arguments[5],U=JSON.stringify;Ve.exports=function(S,P){for(var E,C=Object.keys($),w=0,u=C.length;w<u;w++){var p=C[w],f=$[p].exports;if(f===S||f&&f.default===S){E=p;break}}if(!E){E=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var o={},w=0,u=C.length;w<u;w++){var p=C[w];o[p]=p}re[E]=["function(require,module,exports){"+S+"(self); }",o]}var a=Math.floor(Math.pow(16,8)*Math.random()).toString(16),c={};c[E]=E,re[a]=["function(require,module,exports){var f = require("+U(E)+");(f.default ? f.default : f)(self);}",c];var s={};d(a);function d(b){s[b]=!0;for(var y in re[b][1]){var _=re[b][1][y];s[_]||d(_)}}var i="("+W+")({"+Object.keys(s).map(function(b){return U(b)+":["+re[b][0]+","+U(re[b][1])+"]"}).join(",")+"},{},["+U(a)+"])",t=window.URL||window.webkitURL||window.mozURL||window.msURL,n=new Blob([i],{type:"text/javascript"});if(P&&P.bare)return n;var h=t.createObjectURL(n),v=new Worker(h);return v.objectURL=h,v}},"19Vz":function(Ve,Be,W){(function(re){re(W("VrN/"))})(function(re){re.defineOption("placeholder","",function(w,u,p){var f=p&&p!=re.Init;if(u&&!f)w.on("blur",P),w.on("change",E),w.on("swapDoc",E),re.on(w.getInputField(),"compositionupdate",w.state.placeholderCompose=function(){S(w)}),E(w);else if(!u&&f){w.off("blur",P),w.off("change",E),w.off("swapDoc",E),re.off(w.getInputField(),"compositionupdate",w.state.placeholderCompose),$(w);var o=w.getWrapperElement();o.className=o.className.replace(" CodeMirror-empty","")}u&&!w.hasFocus()&&P(w)});function $(w){w.state.placeholder&&(w.state.placeholder.parentNode.removeChild(w.state.placeholder),w.state.placeholder=null)}function U(w){$(w);var u=w.state.placeholder=document.createElement("pre");u.style.cssText="height: 0; overflow: visible",u.style.direction=w.getOption("direction"),u.className="CodeMirror-placeholder CodeMirror-line-like";var p=w.getOption("placeholder");typeof p=="string"&&(p=document.createTextNode(p)),u.appendChild(p),w.display.lineSpace.insertBefore(u,w.display.lineSpace.firstChild)}function S(w){setTimeout(function(){var u=!1,p=w.getInputField();p.nodeName=="TEXTAREA"?u=!p.value:w.lineCount()==1&&(u=!/[^\u200b]/.test(p.querySelector(".CodeMirror-line").textContent)),u?U(w):$(w)},20)}function P(w){C(w)&&U(w)}function E(w){var u=w.getWrapperElement(),p=C(w);u.className=u.className.replace(" CodeMirror-empty","")+(p?" CodeMirror-empty":""),p?U(w):$(w)}function C(w){return w.lineCount()===1&&w.getLine(0)===""}})},"1FX+":function(Ve,Be,W){Ve.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(Ve,Be,W){(function(re){re(W("VrN/"))})(function(re){"use strict";var $={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};re.defineMode("xml",function(S,P){var E=S.indentUnit,C={},w=P.htmlMode?$:U;for(var u in w)C[u]=w[u];for(var u in P)C[u]=P[u];var p,f;function o(T,A){function O(j){return A.tokenize=j,j(T,A)}var D=T.next();if(D=="<")return T.eat("!")?T.eat("[")?T.match("CDATA[")?O(s("atom","]]>")):null:T.match("--")?O(s("comment","-->")):T.match("DOCTYPE",!0,!0)?(T.eatWhile(/[\w\._\-]/),O(d(1))):null:T.eat("?")?(T.eatWhile(/[\w\._\-]/),A.tokenize=s("meta","?>"),"meta"):(p=T.eat("/")?"closeTag":"openTag",A.tokenize=a,"tag bracket");if(D=="&"){var I;return T.eat("#")?T.eat("x")?I=T.eatWhile(/[a-fA-F\d]/)&&T.eat(";"):I=T.eatWhile(/[\d]/)&&T.eat(";"):I=T.eatWhile(/[\w\.\-:]/)&&T.eat(";"),I?"atom":"error"}else return T.eatWhile(/[^&<]/),null}o.isInText=!0;function a(T,A){var O=T.next();if(O==">"||O=="/"&&T.eat(">"))return A.tokenize=o,p=O==">"?"endTag":"selfcloseTag","tag bracket";if(O=="=")return p="equals",null;if(O=="<"){A.tokenize=o,A.state=h,A.tagName=A.tagStart=null;var D=A.tokenize(T,A);return D?D+" tag error":"tag error"}else return/[\'\"]/.test(O)?(A.tokenize=c(O),A.stringStartCol=T.column(),A.tokenize(T,A)):(T.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function c(T){var A=function(O,D){for(;!O.eol();)if(O.next()==T){D.tokenize=a;break}return"string"};return A.isInAttribute=!0,A}function s(T,A){return function(O,D){for(;!O.eol();){if(O.match(A)){D.tokenize=o;break}O.next()}return T}}function d(T){return function(A,O){for(var D;(D=A.next())!=null;){if(D=="<")return O.tokenize=d(T+1),O.tokenize(A,O);if(D==">")if(T==1){O.tokenize=o;break}else return O.tokenize=d(T-1),O.tokenize(A,O)}return"meta"}}function i(T,A,O){this.prev=T.context,this.tagName=A,this.indent=T.indented,this.startOfLine=O,(C.doNotIndent.hasOwnProperty(A)||T.context&&T.context.noIndent)&&(this.noIndent=!0)}function t(T){T.context&&(T.context=T.context.prev)}function n(T,A){for(var O;;){if(!T.context)return;if(O=T.context.tagName,!C.contextGrabbers.hasOwnProperty(O)||!C.contextGrabbers[O].hasOwnProperty(A))return;t(T)}}function h(T,A,O){return T=="openTag"?(O.tagStart=A.column(),v):T=="closeTag"?b:h}function v(T,A,O){return T=="word"?(O.tagName=A.current(),f="tag",m):C.allowMissingTagName&&T=="endTag"?(f="tag bracket",m(T,A,O)):(f="error",v)}function b(T,A,O){if(T=="word"){var D=A.current();return O.context&&O.context.tagName!=D&&C.implicitlyClosed.hasOwnProperty(O.context.tagName)&&t(O),O.context&&O.context.tagName==D||C.matchClosing===!1?(f="tag",y):(f="tag error",_)}else return C.allowMissingTagName&&T=="endTag"?(f="tag bracket",y(T,A,O)):(f="error",_)}function y(T,A,O){return T!="endTag"?(f="error",y):(t(O),h)}function _(T,A,O){return f="error",y(T,A,O)}function m(T,A,O){if(T=="word")return f="attribute",g;if(T=="endTag"||T=="selfcloseTag"){var D=O.tagName,I=O.tagStart;return O.tagName=O.tagStart=null,T=="selfcloseTag"||C.autoSelfClosers.hasOwnProperty(D)?n(O,D):(n(O,D),O.context=new i(O,D,I==O.indented)),h}return f="error",m}function g(T,A,O){return T=="equals"?x:(C.allowMissing||(f="error"),m(T,A,O))}function x(T,A,O){return T=="string"?l:T=="word"&&C.allowUnquoted?(f="string",m):(f="error",m(T,A,O))}function l(T,A,O){return T=="string"?l:m(T,A,O)}return{startState:function(T){var A={tokenize:o,state:h,indented:T||0,tagName:null,tagStart:null,context:null};return T!=null&&(A.baseIndent=T),A},token:function(T,A){if(!A.tagName&&T.sol()&&(A.indented=T.indentation()),T.eatSpace())return null;p=null;var O=A.tokenize(T,A);return(O||p)&&O!="comment"&&(f=null,A.state=A.state(p||O,T,A),f&&(O=f=="error"?O+" error":f)),O},indent:function(T,A,O){var D=T.context;if(T.tokenize.isInAttribute)return T.tagStart==T.indented?T.stringStartCol+1:T.indented+E;if(D&&D.noIndent)return re.Pass;if(T.tokenize!=a&&T.tokenize!=o)return O?O.match(/^(\s*)/)[0].length:0;if(T.tagName)return C.multilineTagIndentPastTag!==!1?T.tagStart+T.tagName.length+2:T.tagStart+E*(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 j=C.contextGrabbers[D.tagName];if(j&&j.hasOwnProperty(I[2]))D=D.prev;else break}for(;D&&D.prev&&!D.startOfLine;)D=D.prev;return D?D.indent+E:T.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:C.htmlMode?"html":"xml",helperType:C.htmlMode?"html":"xml",skipAttribute:function(T){T.state==x&&(T.state=m)},xmlCurrentTag:function(T){return T.tagName?{name:T.tagName,close:T.type=="closeTag"}:null},xmlCurrentContext:function(T){for(var A=[],O=T.context;O;O=O.prev)O.tagName&&A.push(O.tagName);return A.reverse()}}}),re.defineMIME("text/xml","xml"),re.defineMIME("application/xml","xml"),re.mimeModes.hasOwnProperty("text/html")||re.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1j5w":function(Ve,Be,W){"use strict";W.d(Be,"d",function(){return J}),W.d(Be,"b",function(){return $e}),W.d(Be,"c",function(){return dt}),W.d(Be,"a",function(){return Dt});var re=W("VTBJ"),$=W("1OyB"),U=W("vuIU"),S=W("JX7q"),P=W("Ji7U"),E=W("LK+K"),C=W("cDcd"),w=W("I8Z2"),u=W("BGR+"),p=W("wx14"),f=W("rePB"),o=W("4IlW"),a=W("2GS6"),c=W("Gytx"),s=W.n(c),d=W("TSYQ"),i=W.n(d),t=W("U8pU"),n=W("ODXe"),h=/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,x=/Windows Phone/i,l=/\bWindows(?:.+)ARM\b/i,T=/BlackBerry/i,A=/BB10/i,O=/Opera Mini/i,D=/\b(CriOS|Chrome)(?:.+)Mobile/i,I=/Mobile(?:.+)Firefox\b/i;function j(xt,nt){return xt.test(nt)}function B(xt){var nt=xt||(typeof navigator!="undefined"?navigator.userAgent:""),ct=nt.split("[FBAN");if(typeof ct[1]!="undefined"){var Je=ct,Ee=Object(n.a)(Je,1);nt=Ee[0]}if(ct=nt.split("Twitter"),typeof ct[1]!="undefined"){var Ue=ct,ft=Object(n.a)(Ue,1);nt=ft[0]}var Qe={apple:{phone:j(h,nt)&&!j(x,nt),ipod:j(v,nt),tablet:!j(h,nt)&&j(b,nt)&&!j(x,nt),device:(j(h,nt)||j(v,nt)||j(b,nt))&&!j(x,nt)},amazon:{phone:j(m,nt),tablet:!j(m,nt)&&j(g,nt),device:j(m,nt)||j(g,nt)},android:{phone:!j(x,nt)&&j(m,nt)||!j(x,nt)&&j(y,nt),tablet:!j(x,nt)&&!j(m,nt)&&!j(y,nt)&&(j(g,nt)||j(_,nt)),device:!j(x,nt)&&(j(m,nt)||j(g,nt)||j(y,nt)||j(_,nt))||j(/\bokhttp\b/i,nt)},windows:{phone:j(x,nt),tablet:j(l,nt),device:j(x,nt)||j(l,nt)},other:{blackberry:j(T,nt),blackberry10:j(A,nt),opera:j(O,nt),firefox:j(I,nt),chrome:j(D,nt),device:j(T,nt)||j(A,nt)||j(O,nt)||j(I,nt)||j(D,nt)},any:null,phone:null,tablet:null};return Qe.any=Qe.apple.device||Qe.android.device||Qe.windows.device||Qe.other.device,Qe.phone=Qe.apple.phone||Qe.android.phone||Qe.windows.phone,Qe.tablet=Qe.apple.tablet||Qe.android.tablet||Qe.windows.tablet,Qe}var ee=Object(re.a)(Object(re.a)({},B()),{},{isMobile:B}),F=ee;function G(){}function X(xt,nt,ct){var Je=nt||"";return xt.key||"".concat(Je,"item_").concat(ct)}function Z(xt){return"".concat(xt,"-menu-")}function K(xt,nt){var ct=-1;C.Children.forEach(xt,function(Je){ct+=1,Je&&Je.type&&Je.type.isMenuItemGroup?C.Children.forEach(Je.props.children,function(Ee){ct+=1,nt(Ee,ct)}):nt(Je,ct)})}function q(xt,nt,ct){if(!xt||ct.find)return;C.Children.forEach(xt,function(Je){if(Je){var Ee=Je.type;if(!Ee||!(Ee.isSubMenu||Ee.isMenuItem||Ee.isMenuItemGroup))return;nt.indexOf(Je.key)!==-1?ct.find=!0:Je.props.children&&q(Je.props.children,nt,ct)}})}var ae=["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(nt){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Je=nt&&typeof nt.getBoundingClientRect=="function"&&nt.getBoundingClientRect().width;if(Je){if(ct){var Ee=getComputedStyle(nt),Ue=Ee.marginLeft,ft=Ee.marginRight;Je+=+Ue.replace("px","")+ +ft.replace("px","")}Je=+Je.toFixed(6)}return Je||0},ve=function(nt,ct,Je){nt&&Object(t.a)(nt.style)==="object"&&(nt.style[ct]=Je)},he=function(){return F.any},_e=W("KQm4"),fe=W("Ff2n"),xe=W("faye"),je=W("bdgK"),Le=W("uciX"),ke=W("8XRh"),Fe={adjustX:1,adjustY:1},ge={topLeft:{points:["bl","tl"],overflow:Fe,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Fe,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Fe,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Fe,offset:[4,0]}},ce={topLeft:{points:["bl","tl"],overflow:Fe,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Fe,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Fe,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Fe,offset:[4,0]}},Ie=ge,Ne=0,Xe={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},te=function(nt,ct,Je){var Ee=Z(ct),Ue=nt.getState();nt.setState({defaultActiveFirst:Object(re.a)(Object(re.a)({},Ue.defaultActiveFirst),{},Object(f.a)({},Ee,Je))})},k=function(xt){Object(P.a)(ct,xt);var nt=Object(E.a)(ct);function ct(Je){var Ee;Object($.a)(this,ct),Ee=nt.call(this,Je),Ee.onDestroy=function(lt){Ee.props.onDestroy(lt)},Ee.onKeyDown=function(lt){var yt=lt.keyCode,Nt=Ee.menuInstance,Gt=Ee.props,Xt=Gt.isOpen,Te=Gt.store;if(yt===o.a.ENTER)return Ee.onTitleClick(lt),te(Te,Ee.props.eventKey,!0),!0;if(yt===o.a.RIGHT)return Xt?Nt.onKeyDown(lt):(Ee.triggerOpenChange(!0),te(Te,Ee.props.eventKey,!0)),!0;if(yt===o.a.LEFT){var de;if(Xt)de=Nt.onKeyDown(lt);else return;return de||(Ee.triggerOpenChange(!1),de=!0),de}return Xt&&(yt===o.a.UP||yt===o.a.DOWN)?Nt.onKeyDown(lt):void 0},Ee.onOpenChange=function(lt){Ee.props.onOpenChange(lt)},Ee.onPopupVisibleChange=function(lt){Ee.triggerOpenChange(lt,lt?"mouseenter":"mouseleave")},Ee.onMouseEnter=function(lt){var yt=Ee.props,Nt=yt.eventKey,Gt=yt.onMouseEnter,Xt=yt.store;te(Xt,Ee.props.eventKey,!1),Gt({key:Nt,domEvent:lt})},Ee.onMouseLeave=function(lt){var yt=Ee.props,Nt=yt.parentMenu,Gt=yt.eventKey,Xt=yt.onMouseLeave;Nt.subMenuInstance=Object(S.a)(Ee),Xt({key:Gt,domEvent:lt})},Ee.onTitleMouseEnter=function(lt){var yt=Ee.props,Nt=yt.eventKey,Gt=yt.onItemHover,Xt=yt.onTitleMouseEnter;Gt({key:Nt,hover:!0}),Xt({key:Nt,domEvent:lt})},Ee.onTitleMouseLeave=function(lt){var yt=Ee.props,Nt=yt.parentMenu,Gt=yt.eventKey,Xt=yt.onItemHover,Te=yt.onTitleMouseLeave;Nt.subMenuInstance=Object(S.a)(Ee),Xt({key:Gt,hover:!1}),Te({key:Gt,domEvent:lt})},Ee.onTitleClick=function(lt){var yt=Object(S.a)(Ee),Nt=yt.props;if(Nt.onTitleClick({key:Nt.eventKey,domEvent:lt}),Nt.triggerSubMenuAction==="hover")return;Ee.triggerOpenChange(!Nt.isOpen,"click"),te(Nt.store,Ee.props.eventKey,!1)},Ee.onSubMenuClick=function(lt){typeof Ee.props.onClick=="function"&&Ee.props.onClick(Ee.addKeyPath(lt))},Ee.onSelect=function(lt){Ee.props.onSelect(lt)},Ee.onDeselect=function(lt){Ee.props.onDeselect(lt)},Ee.getPrefixCls=function(){return"".concat(Ee.props.rootPrefixCls,"-submenu")},Ee.getActiveClassName=function(){return"".concat(Ee.getPrefixCls(),"-active")},Ee.getDisabledClassName=function(){return"".concat(Ee.getPrefixCls(),"-disabled")},Ee.getSelectedClassName=function(){return"".concat(Ee.getPrefixCls(),"-selected")},Ee.getOpenClassName=function(){return"".concat(Ee.props.rootPrefixCls,"-submenu-open")},Ee.saveMenuInstance=function(lt){Ee.menuInstance=lt},Ee.addKeyPath=function(lt){return Object(re.a)(Object(re.a)({},lt),{},{keyPath:(lt.keyPath||[]).concat(Ee.props.eventKey)})},Ee.triggerOpenChange=function(lt,yt){var Nt=Ee.props.eventKey,Gt=function(){Ee.onOpenChange({key:Nt,item:Object(S.a)(Ee),trigger:yt,open:lt})};yt==="mouseenter"?Ee.mouseenterTimeout=setTimeout(function(){Gt()},0):Gt()},Ee.isChildrenSelected=function(){var lt={find:!1};return q(Ee.props.children,Ee.props.selectedKeys,lt),lt.find},Ee.isOpen=function(){return Ee.props.openKeys.indexOf(Ee.props.eventKey)!==-1},Ee.adjustWidth=function(){if(!Ee.subMenuTitle||!Ee.menuInstance)return;var lt=xe.findDOMNode(Ee.menuInstance);if(lt.offsetWidth>=Ee.subMenuTitle.offsetWidth)return;lt.style.minWidth="".concat(Ee.subMenuTitle.offsetWidth,"px")},Ee.saveSubMenuTitle=function(lt){Ee.subMenuTitle=lt},Ee.getBaseProps=function(){var lt=Object(S.a)(Ee),yt=lt.props;return{mode:yt.mode==="horizontal"?"vertical":yt.mode,visible:Ee.props.isOpen,level:yt.level+1,inlineIndent:yt.inlineIndent,focusable:!1,onClick:Ee.onSubMenuClick,onSelect:Ee.onSelect,onDeselect:Ee.onDeselect,onDestroy:Ee.onDestroy,selectedKeys:yt.selectedKeys,eventKey:"".concat(yt.eventKey,"-menu-"),openKeys:yt.openKeys,motion:yt.motion,onOpenChange:Ee.onOpenChange,subMenuOpenDelay:yt.subMenuOpenDelay,parentMenu:Object(S.a)(Ee),subMenuCloseDelay:yt.subMenuCloseDelay,forceSubMenuRender:yt.forceSubMenuRender,triggerSubMenuAction:yt.triggerSubMenuAction,builtinPlacements:yt.builtinPlacements,defaultActiveFirst:yt.store.getState().defaultActiveFirst[Z(yt.eventKey)],multiple:yt.multiple,prefixCls:yt.rootPrefixCls,id:Ee.internalMenuId,manualRef:Ee.saveMenuInstance,itemIcon:yt.itemIcon,expandIcon:yt.expandIcon,direction:yt.direction}},Ee.getMotion=function(lt,yt){var Nt=Object(S.a)(Ee),Gt=Nt.haveRendered,Xt=Ee.props,Te=Xt.motion,de=Xt.rootPrefixCls,H=Object(re.a)(Object(re.a)({},Te),{},{leavedClassName:"".concat(de,"-hidden"),removeOnLeave:!1,motionAppear:Gt||!yt||lt!=="inline"});return H};var Ue=Je.store,ft=Je.eventKey,Qe=Ue.getState(),Ot=Qe.defaultActiveFirst;Ee.isRootMenu=!1;var wt=!1;return Ot&&(wt=Ot[ft]),te(Ue,ft,wt),Ee}return Object(U.a)(ct,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Ee=this,Ue=this.props,ft=Ue.mode,Qe=Ue.parentMenu,Ot=Ue.manualRef;if(Ot&&Ot(this),ft!=="horizontal"||!Qe.isRootMenu||!this.props.isOpen)return;this.minWidthTimeout=setTimeout(function(){return Ee.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var Ee=this.props,Ue=Ee.onDestroy,ft=Ee.eventKey;Ue&&Ue(ft),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(Ee){var Ue=this,ft=this.getBaseProps(),Qe=this.getMotion(ft.mode,ft.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||ft.visible||ft.forceSubMenuRender,!this.haveOpened)return C.createElement("div",null);var Ot=ft.direction;return C.createElement(ke.default,Object.assign({visible:ft.visible},Qe),function(wt){var lt=wt.className,yt=wt.style,Nt=i()("".concat(ft.prefixCls,"-sub"),lt,Object(f.a)({},"".concat(ft.prefixCls,"-rtl"),Ot==="rtl"));return C.createElement(Me,Object.assign({},ft,{id:Ue.internalMenuId,className:Nt,style:yt}),Ee)})}},{key:"render",value:function(){var Ee,Ue=Object(re.a)({},this.props),ft=Ue.isOpen,Qe=this.getPrefixCls(),Ot=Ue.mode==="inline",wt=i()(Qe,"".concat(Qe,"-").concat(Ue.mode),(Ee={},Object(f.a)(Ee,Ue.className,!!Ue.className),Object(f.a)(Ee,this.getOpenClassName(),ft),Object(f.a)(Ee,this.getActiveClassName(),Ue.active||ft&&!Ot),Object(f.a)(Ee,this.getDisabledClassName(),Ue.disabled),Object(f.a)(Ee,this.getSelectedClassName(),this.isChildrenSelected()),Ee));this.internalMenuId||(Ue.eventKey?this.internalMenuId="".concat(Ue.eventKey,"$Menu"):(Ne+=1,this.internalMenuId="$__$".concat(Ne,"$Menu")));var lt={},yt={},Nt={};Ue.disabled||(lt={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},yt={onClick:this.onTitleClick},Nt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Gt={},Xt=Ue.direction;Ot&&(Xt==="rtl"?Gt.paddingRight=Ue.inlineIndent*Ue.level:Gt.paddingLeft=Ue.inlineIndent*Ue.level);var Te={};this.props.isOpen&&(Te={"aria-owns":this.internalMenuId});var de=null;Ue.mode!=="horizontal"&&(de=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(de=C.createElement(this.props.expandIcon,Object(re.a)({},this.props))));var H=C.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:Gt,className:"".concat(Qe,"-title"),role:"button"},Nt,yt,{"aria-expanded":ft},Te,{"aria-haspopup":"true",title:typeof Ue.title=="string"?Ue.title:void 0}),Ue.title,de||C.createElement("i",{className:"".concat(Qe,"-arrow")})),Q=this.renderChildren(Ue.children),ne=Ue.parentMenu.isRootMenu?Ue.parentMenu.props.getPopupContainer:function(nn){return nn.parentNode},se=Xe[Ue.mode],Se=Ue.popupOffset?{offset:Ue.popupOffset}:{},He=Ue.mode==="inline"?"":Ue.popupClassName;He+=Xt==="rtl"?" ".concat(Qe,"-rtl"):"";var qe=Ue.disabled,Tt=Ue.triggerSubMenuAction,Lt=Ue.subMenuOpenDelay,rt=Ue.forceSubMenuRender,Ct=Ue.subMenuCloseDelay,Jt=Ue.builtinPlacements;ae.forEach(function(nn){return delete Ue[nn]}),delete Ue.onClick;var St=Xt==="rtl"?Object.assign({},ce,Jt):Object.assign({},ge,Jt);return delete Ue.direction,C.createElement("li",Object.assign({},Ue,lt,{className:wt,role:"menuitem"}),Ot&&H,Ot&&Q,!Ot&&C.createElement(Le.a,{prefixCls:Qe,popupClassName:i()("".concat(Qe,"-popup"),He),getPopupContainer:ne,builtinPlacements:St,popupPlacement:se,popupVisible:ft,popupAlign:Se,popup:Q,action:qe?[]:[Tt],mouseEnterDelay:Lt,mouseLeaveDelay:Ct,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:rt},H))}}]),ct}(C.Component);k.defaultProps={onMouseEnter:G,onMouseLeave:G,onTitleMouseEnter:G,onTitleMouseLeave:G,onTitleClick:G,manualRef:G,mode:"vertical",title:""};var N=Object(w.b)(function(xt,nt){var ct=xt.openKeys,Je=xt.activeKey,Ee=xt.selectedKeys,Ue=nt.eventKey,ft=nt.subMenuKey;return{isOpen:ct.indexOf(Ue)>-1,active:Je[ft]===Ue,selectedKeys:Ee}})(k);N.isSubMenu=!0;var J=N,V="menuitem-overflowed",Y=.5,me=function(xt){Object(P.a)(ct,xt);var nt=Object(E.a)(ct);function ct(){var Je;return Object($.a)(this,ct),Je=nt.apply(this,arguments),Je.resizeObserver=null,Je.mutationObserver=null,Je.originalTotalWidth=0,Je.overflowedItems=[],Je.menuItemSizes=[],Je.cancelFrameId=null,Je.state={lastVisibleIndex:void 0},Je.getMenuItemNodes=function(){var Ee=Je.props.prefixCls,Ue=xe.findDOMNode(Object(S.a)(Je));return Ue?[].slice.call(Ue.children).filter(function(ft){return ft.className.split(" ").indexOf("".concat(Ee,"-overflowed-submenu"))<0}):[]},Je.getOverflowedSubMenuItem=function(Ee,Ue,ft){var Qe=Je.props,Ot=Qe.overflowedIndicator,wt=Qe.level,lt=Qe.mode,yt=Qe.prefixCls,Nt=Qe.theme;if(wt!==1||lt!=="horizontal")return null;var Gt=Je.props.children[0],Xt=Gt.props,Te=Xt.children,de=Xt.title,H=Xt.style,Q=Object(fe.a)(Xt,["children","title","style"]),ne=Object(re.a)({},H),se="".concat(Ee,"-overflowed-indicator"),Se="".concat(Ee,"-overflowed-indicator");Ue.length===0&&ft!==!0?ne=Object(re.a)(Object(re.a)({},ne),{},{display:"none"}):ft&&(ne=Object(re.a)(Object(re.a)({},ne),{},{visibility:"hidden",position:"absolute"}),se="".concat(se,"-placeholder"),Se="".concat(Se,"-placeholder"));var He=Nt?"".concat(yt,"-").concat(Nt):"",qe={};return ae.forEach(function(Tt){Q[Tt]!==void 0&&(qe[Tt]=Q[Tt])}),C.createElement(J,Object.assign({title:Ot,className:"".concat(yt,"-overflowed-submenu"),popupClassName:He},qe,{key:se,eventKey:Se,disabled:!1,style:ne}),Ue)},Je.setChildrenWidthAndResize=function(){if(Je.props.mode!=="horizontal")return;var Ee=xe.findDOMNode(Object(S.a)(Je));if(!Ee)return;var Ue=Ee.children;if(!Ue||Ue.length===0)return;var ft=Ee.children[Ue.length-1];ve(ft,"display","inline-block");var Qe=Je.getMenuItemNodes(),Ot=Qe.filter(function(wt){return wt.className.split(" ").indexOf(V)>=0});Ot.forEach(function(wt){ve(wt,"display","inline-block")}),Je.menuItemSizes=Qe.map(function(wt){return oe(wt,!0)}),Ot.forEach(function(wt){ve(wt,"display","none")}),Je.overflowedIndicatorWidth=oe(Ee.children[Ee.children.length-1],!0),Je.originalTotalWidth=Je.menuItemSizes.reduce(function(wt,lt){return wt+lt},0),Je.handleResize(),ve(ft,"display","none")},Je.handleResize=function(){if(Je.props.mode!=="horizontal")return;var Ee=xe.findDOMNode(Object(S.a)(Je));if(!Ee)return;var Ue=oe(Ee);Je.overflowedItems=[];var ft=0,Qe;Je.originalTotalWidth>Ue+Y&&(Qe=-1,Je.menuItemSizes.forEach(function(Ot){ft+=Ot,ft+Je.overflowedIndicatorWidth<=Ue&&(Qe+=1)})),Je.setState({lastVisibleIndex:Qe})},Je}return Object(U.a)(ct,[{key:"componentDidMount",value:function(){var Ee=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Ue=xe.findDOMNode(this);if(!Ue)return;this.resizeObserver=new je.default(function(ft){ft.forEach(function(){var Qe=Ee.cancelFrameId;cancelAnimationFrame(Qe),Ee.cancelFrameId=requestAnimationFrame(Ee.setChildrenWidthAndResize)})}),[].slice.call(Ue.children).concat(Ue).forEach(function(ft){Ee.resizeObserver.observe(ft)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){Ee.resizeObserver.disconnect(),[].slice.call(Ue.children).concat(Ue).forEach(function(ft){Ee.resizeObserver.observe(ft)}),Ee.setChildrenWidthAndResize()}),this.mutationObserver.observe(Ue,{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(Ee){var Ue=this,ft=this.state.lastVisibleIndex;return(Ee||[]).reduce(function(Qe,Ot,wt){var lt=Ot;if(Ue.props.mode==="horizontal"){var yt=Ue.getOverflowedSubMenuItem(Ot.props.eventKey,[]);ft!==void 0&&Ue.props.className.indexOf("".concat(Ue.props.prefixCls,"-root"))!==-1&&(wt>ft&&(lt=C.cloneElement(Ot,{style:{display:"none"},eventKey:"".concat(Ot.props.eventKey,"-hidden"),className:"".concat(V)})),wt===ft+1&&(Ue.overflowedItems=Ee.slice(ft+1).map(function(Gt){return C.cloneElement(Gt,{key:Gt.props.eventKey,mode:"vertical-left"})}),yt=Ue.getOverflowedSubMenuItem(Ot.props.eventKey,Ue.overflowedItems)));var Nt=[].concat(Object(_e.a)(Qe),[yt,lt]);return wt===Ee.length-1&&Nt.push(Ue.getOverflowedSubMenuItem(Ot.props.eventKey,[],!0)),Nt}return[].concat(Object(_e.a)(Qe),[lt])},[])}},{key:"render",value:function(){var Ee=this.props,Ue=Ee.visible,ft=Ee.prefixCls,Qe=Ee.overflowedIndicator,Ot=Ee.mode,wt=Ee.level,lt=Ee.tag,yt=Ee.children,Nt=Ee.theme,Gt=Object(fe.a)(Ee,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),Xt=lt;return C.createElement(Xt,Object.assign({},Gt),this.renderChildren(yt))}}]),ct}(C.Component);me.defaultProps={tag:"div",className:""};var Ae=me;function at(xt){return xt.length?xt.every(function(nt){return!!nt.props.disabled}):!0}function Re(xt,nt,ct){var Je=xt.getState();xt.setState({activeKey:Object(re.a)(Object(re.a)({},Je.activeKey),{},Object(f.a)({},nt,ct))})}function Pe(xt){return xt.eventKey||"0-menu-"}function Ye(xt,nt){var ct=nt,Je=xt.children,Ee=xt.eventKey;if(ct){var Ue;if(K(Je,function(ft,Qe){ft&&ft.props&&!ft.props.disabled&&ct===X(ft,Ee,Qe)&&(Ue=!0)}),Ue)return ct}return ct=null,xt.defaultActiveFirst&&K(Je,function(ft,Qe){!ct&&ft&&!ft.props.disabled&&(ct=X(ft,Ee,Qe))}),ct}function Ze(xt){if(xt){var nt=this.instanceArray.indexOf(xt);nt!==-1?this.instanceArray[nt]=xt:this.instanceArray.push(xt)}}var ze=function(xt){Object(P.a)(ct,xt);var nt=Object(E.a)(ct);function ct(Je){var Ee;return Object($.a)(this,ct),Ee=nt.call(this,Je),Ee.onKeyDown=function(Ue,ft){var Qe=Ue.keyCode,Ot;if(Ee.getFlatInstanceArray().forEach(function(lt){lt&<.props.active&<.onKeyDown&&(Ot=lt.onKeyDown(Ue))}),Ot)return 1;var wt=null;return(Qe===o.a.UP||Qe===o.a.DOWN)&&(wt=Ee.step(Qe===o.a.UP?-1:1)),wt?(Ue.preventDefault(),Re(Ee.props.store,Pe(Ee.props),wt.props.eventKey),typeof ft=="function"&&ft(wt),1):void 0},Ee.onItemHover=function(Ue){var ft=Ue.key,Qe=Ue.hover;Re(Ee.props.store,Pe(Ee.props),Qe?ft:null)},Ee.onDeselect=function(Ue){Ee.props.onDeselect(Ue)},Ee.onSelect=function(Ue){Ee.props.onSelect(Ue)},Ee.onClick=function(Ue){Ee.props.onClick(Ue)},Ee.onOpenChange=function(Ue){Ee.props.onOpenChange(Ue)},Ee.onDestroy=function(Ue){Ee.props.onDestroy(Ue)},Ee.getFlatInstanceArray=function(){return Ee.instanceArray},Ee.step=function(Ue){var ft=Ee.getFlatInstanceArray(),Qe=Ee.props.store.getState().activeKey[Pe(Ee.props)],Ot=ft.length;if(!Ot)return null;Ue<0&&(ft=ft.concat().reverse());var wt=-1;if(ft.every(function(Gt,Xt){return Gt&&Gt.props.eventKey===Qe?(wt=Xt,!1):!0}),!Ee.props.defaultActiveFirst&&wt!==-1&&at(ft.slice(wt,Ot-1)))return;var lt=(wt+1)%Ot,yt=lt;do{var Nt=ft[yt];if(!Nt||Nt.props.disabled)yt=(yt+1)%Ot;else return Nt}while(yt!==lt);return null},Ee.renderCommonMenuItem=function(Ue,ft,Qe){var Ot=Ee.props.store.getState(),wt=Object(S.a)(Ee),lt=wt.props,yt=X(Ue,lt.eventKey,ft),Nt=Ue.props;if(!Nt||typeof Ue.type=="string")return Ue;var Gt=yt===Ot.activeKey,Xt=Object(re.a)(Object(re.a)({mode:Nt.mode||lt.mode,level:lt.level,inlineIndent:lt.inlineIndent,renderMenuItem:Ee.renderMenuItem,rootPrefixCls:lt.prefixCls,index:ft,parentMenu:lt.parentMenu,manualRef:Nt.disabled?void 0:Object(a.a)(Ue.ref,Ze.bind(Object(S.a)(Ee))),eventKey:yt,active:!Nt.disabled&&Gt,multiple:lt.multiple,onClick:function(de){(Nt.onClick||G)(de),Ee.onClick(de)},onItemHover:Ee.onItemHover,motion:lt.motion,subMenuOpenDelay:lt.subMenuOpenDelay,subMenuCloseDelay:lt.subMenuCloseDelay,forceSubMenuRender:lt.forceSubMenuRender,onOpenChange:Ee.onOpenChange,onDeselect:Ee.onDeselect,onSelect:Ee.onSelect,builtinPlacements:lt.builtinPlacements,itemIcon:Nt.itemIcon||Ee.props.itemIcon,expandIcon:Nt.expandIcon||Ee.props.expandIcon},Qe),{},{direction:lt.direction});return(lt.mode==="inline"||he())&&(Xt.triggerSubMenuAction="click"),C.cloneElement(Ue,Xt)},Ee.renderMenuItem=function(Ue,ft,Qe){if(!Ue)return null;var Ot=Ee.props.store.getState(),wt={openKeys:Ot.openKeys,selectedKeys:Ot.selectedKeys,triggerSubMenuAction:Ee.props.triggerSubMenuAction,subMenuKey:Qe};return Ee.renderCommonMenuItem(Ue,ft,wt)},Je.store.setState({activeKey:Object(re.a)(Object(re.a)({},Je.store.getState().activeKey),{},Object(f.a)({},Je.eventKey,Ye(Je,Je.activeKey)))}),Ee.instanceArray=[],Ee}return Object(U.a)(ct,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(Ee){return this.props.visible||Ee.visible||this.props.className!==Ee.className||!s()(this.props.style,Ee.style)}},{key:"componentDidUpdate",value:function(Ee){var Ue=this.props,ft="activeKey"in Ue?Ue.activeKey:Ue.store.getState().activeKey[Pe(Ue)],Qe=Ye(Ue,ft);if(Qe!==ft)Re(Ue.store,Pe(Ue),Qe);else if("activeKey"in Ee){var Ot=Ye(Ee,Ee.activeKey);Qe!==Ot&&Re(Ue.store,Pe(Ue),Qe)}}},{key:"render",value:function(){var Ee=this,Ue=Object(p.a)({},this.props);this.instanceArray=[];var ft=i()(Ue.prefixCls,Ue.className,"".concat(Ue.prefixCls,"-").concat(Ue.mode)),Qe={className:ft,role:Ue.role||"menu"};Ue.id&&(Qe.id=Ue.id),Ue.focusable&&(Qe.tabIndex=0,Qe.onKeyDown=this.onKeyDown);var Ot=Ue.prefixCls,wt=Ue.eventKey,lt=Ue.visible,yt=Ue.level,Nt=Ue.mode,Gt=Ue.overflowedIndicator,Xt=Ue.theme;return ae.forEach(function(Te){return delete Ue[Te]}),delete Ue.onClick,C.createElement(Ae,Object.assign({},Ue,{prefixCls:Ot,mode:Nt,tag:"ul",level:yt,theme:Xt,visible:lt,overflowedIndicator:Gt},Qe),C.Children.map(Ue.children,function(Te,de){return Ee.renderMenuItem(Te,de,wt||"0-menu-")}))}}]),ct}(C.Component);ze.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:G};var We=Object(w.b)()(ze),Me=We,De=W("Kwbf");function Oe(xt,nt,ct){var Je=xt.prefixCls,Ee=xt.motion,Ue=xt.defaultMotions,ft=Ue===void 0?{}:Ue,Qe=xt.openAnimation,Ot=xt.openTransitionName,wt=nt.switchingModeFromInline;if(Ee)return Ee;if(Object(t.a)(Qe)==="object"&&Qe)Object(De.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof Qe=="string")return{motionName:"".concat(Je,"-open-").concat(Qe)};if(Ot)return{motionName:Ot};var lt=ft[ct];return lt||(wt?null:ft.other)}var pe=function(xt){Object(P.a)(ct,xt);var nt=Object(E.a)(ct);function ct(Je){var Ee;Object($.a)(this,ct),Ee=nt.call(this,Je),Ee.inlineOpenKeys=[],Ee.onSelect=function(Qe){var Ot=Object(S.a)(Ee),wt=Ot.props;if(wt.selectable){var lt=Ee.store.getState(),yt=lt.selectedKeys,Nt=Qe.key;wt.multiple?yt=yt.concat([Nt]):yt=[Nt],"selectedKeys"in wt||Ee.store.setState({selectedKeys:yt}),wt.onSelect(Object(re.a)(Object(re.a)({},Qe),{},{selectedKeys:yt}))}},Ee.onClick=function(Qe){var Ot=Ee.getRealMenuMode(),wt=Object(S.a)(Ee),lt=wt.store,yt=wt.props.onOpenChange;Ot!=="inline"&&!("openKeys"in Ee.props)&&(lt.setState({openKeys:[]}),yt([])),Ee.props.onClick(Qe)},Ee.onKeyDown=function(Qe,Ot){Ee.innerMenu.getWrappedInstance().onKeyDown(Qe,Ot)},Ee.onOpenChange=function(Qe){var Ot=Object(S.a)(Ee),wt=Ot.props,lt=Ee.store.getState().openKeys.concat(),yt=!1,Nt=function(Xt){var Te=!1;if(Xt.open)Te=lt.indexOf(Xt.key)===-1,Te&<.push(Xt.key);else{var de=lt.indexOf(Xt.key);Te=de!==-1,Te&<.splice(de,1)}yt=yt||Te};Array.isArray(Qe)?Qe.forEach(Nt):Nt(Qe),yt&&("openKeys"in Ee.props||Ee.store.setState({openKeys:lt}),wt.onOpenChange(lt))},Ee.onDeselect=function(Qe){var Ot=Object(S.a)(Ee),wt=Ot.props;if(wt.selectable){var lt=Ee.store.getState().selectedKeys.concat(),yt=Qe.key,Nt=lt.indexOf(yt);Nt!==-1&<.splice(Nt,1),"selectedKeys"in wt||Ee.store.setState({selectedKeys:lt}),wt.onDeselect(Object(re.a)(Object(re.a)({},Qe),{},{selectedKeys:lt}))}},Ee.onMouseEnter=function(Qe){Ee.restoreModeVerticalFromInline();var Ot=Ee.props.onMouseEnter;Ot&&Ot(Qe)},Ee.onTransitionEnd=function(Qe){var Ot=Qe.propertyName==="width"&&Qe.target===Qe.currentTarget,wt=Qe.target.className,lt=Object.prototype.toString.call(wt)==="[object SVGAnimatedString]"?wt.animVal:wt,yt=Qe.propertyName==="font-size"&<.indexOf("anticon")>=0;(Ot||yt)&&Ee.restoreModeVerticalFromInline()},Ee.setInnerMenu=function(Qe){Ee.innerMenu=Qe},Ee.isRootMenu=!0;var Ue=Je.defaultSelectedKeys,ft=Je.defaultOpenKeys;return"selectedKeys"in Je&&(Ue=Je.selectedKeys||[]),"openKeys"in Je&&(ft=Je.openKeys||[]),Ee.store=Object(w.c)({selectedKeys:Ue,openKeys:ft,activeKey:{"0-menu-":Ye(Je,Je.activeKey)}}),Ee.state={switchingModeFromInline:!1},Ee}return Object(U.a)(ct,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(Ee){this.updateOpentKeysWhenSwitchMode(Ee),this.updateMiniStore();var Ue=this.props,ft=Ue.siderCollapsed,Qe=Ue.inlineCollapsed,Ot=Ue.onOpenChange;(!Ee.inlineCollapsed&&Qe||!Ee.siderCollapsed&&ft)&&Ot([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(Ee){var Ue=this.props,ft=this.store,Qe=this.inlineOpenKeys,Ot=ft.getState(),wt={};Ee.mode==="inline"&&Ue.mode!=="inline"&&this.setState({switchingModeFromInline:!0}),"openKeys"in Ue||((Ue.inlineCollapsed&&!Ee.inlineCollapsed||Ue.siderCollapsed&&!Ee.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=Ot.openKeys.concat(),wt.openKeys=[]),(!Ue.inlineCollapsed&&Ee.inlineCollapsed||!Ue.siderCollapsed&&Ee.siderCollapsed)&&(wt.openKeys=Qe,this.inlineOpenKeys=[])),Object.keys(wt).length&&ft.setState(wt)}},{key:"updateMenuDisplay",value:function(){var Ee=this.props.collapsedWidth,Ue=this.store,ft=this.prevOpenKeys,Qe=this.getInlineCollapsed()&&(Ee===0||Ee==="0"||Ee==="0px");Qe?(this.prevOpenKeys=Ue.getState().openKeys.concat(),this.store.setState({openKeys:[]})):ft&&(this.store.setState({openKeys:ft}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var Ee=this.props.mode,Ue=this.state.switchingModeFromInline,ft=this.getInlineCollapsed();return Ue&&ft?"inline":ft?"vertical":Ee}},{key:"getInlineCollapsed",value:function(){var Ee=this.props,Ue=Ee.inlineCollapsed,ft=Ee.siderCollapsed;return ft!==void 0?ft:Ue}},{key:"restoreModeVerticalFromInline",value:function(){var Ee=this.state.switchingModeFromInline;Ee&&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 Ee=Object(re.a)({},Object(u.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Ue=this.getRealMenuMode();return Ee.className+=" ".concat(Ee.prefixCls,"-root"),Ee.direction==="rtl"&&(Ee.className+=" ".concat(Ee.prefixCls,"-rtl")),Ee=Object(re.a)(Object(re.a)({},Ee),{},{mode:Ue,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,Ue)}),delete Ee.openAnimation,delete Ee.openTransitionName,C.createElement(w.a,{store:this.store},C.createElement(Me,Object.assign({},Ee,{ref:this.setInnerMenu}),this.props.children))}}]),ct}(C.Component);pe.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=pe,Ce=function(xt){Object(P.a)(ct,xt);var nt=Object(E.a)(ct);function ct(){var Je;return Object($.a)(this,ct),Je=nt.apply(this,arguments),Je.onKeyDown=function(Ee){var Ue=Ee.keyCode;return Ue===o.a.ENTER?(Je.onClick(Ee),!0):void 0},Je.onMouseLeave=function(Ee){var Ue=Je.props,ft=Ue.eventKey,Qe=Ue.onItemHover,Ot=Ue.onMouseLeave;Qe({key:ft,hover:!1}),Ot({key:ft,domEvent:Ee})},Je.onMouseEnter=function(Ee){var Ue=Je.props,ft=Ue.eventKey,Qe=Ue.onItemHover,Ot=Ue.onMouseEnter;Qe({key:ft,hover:!0}),Ot({key:ft,domEvent:Ee})},Je.onClick=function(Ee){var Ue=Je.props,ft=Ue.eventKey,Qe=Ue.multiple,Ot=Ue.onClick,wt=Ue.onSelect,lt=Ue.onDeselect,yt=Ue.isSelected,Nt={key:ft,keyPath:[ft],item:Object(S.a)(Je),domEvent:Ee};Ot(Nt),Qe?yt?lt(Nt):wt(Nt):yt||wt(Nt)},Je.saveNode=function(Ee){Je.node=Ee},Je}return Object(U.a)(ct,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var Ee=this.props;Ee.onDestroy&&Ee.onDestroy(Ee.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 Ee,Ue=Object(re.a)({},this.props),ft=i()(this.getPrefixCls(),Ue.className,(Ee={},Object(f.a)(Ee,this.getActiveClassName(),!Ue.disabled&&Ue.active),Object(f.a)(Ee,this.getSelectedClassName(),Ue.isSelected),Object(f.a)(Ee,this.getDisabledClassName(),Ue.disabled),Ee)),Qe=Object(re.a)(Object(re.a)({},Ue.attribute),{},{title:typeof Ue.title=="string"?Ue.title:void 0,className:ft,role:Ue.role||"menuitem","aria-disabled":Ue.disabled});Ue.role==="option"?Qe=Object(re.a)(Object(re.a)({},Qe),{},{role:"option","aria-selected":Ue.isSelected}):(Ue.role===null||Ue.role==="none")&&(Qe.role="none");var Ot={onClick:Ue.disabled?null:this.onClick,onMouseLeave:Ue.disabled?null:this.onMouseLeave,onMouseEnter:Ue.disabled?null:this.onMouseEnter},wt=Object(re.a)({},Ue.style);Ue.mode==="inline"&&(Ue.direction==="rtl"?wt.paddingRight=Ue.inlineIndent*Ue.level:wt.paddingLeft=Ue.inlineIndent*Ue.level),ae.forEach(function(yt){return delete Ue[yt]}),delete Ue.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(u.default)(Ue,["onClick","onMouseEnter","onMouseLeave","onSelect"]),Qe,Ot,{style:wt,ref:this.saveNode}),Ue.children,lt)}}]),ct}(C.Component);Ce.isMenuItem=!0,Ce.defaultProps={onSelect:G,onMouseEnter:G,onMouseLeave:G,manualRef:G};var we=Object(w.b)(function(xt,nt){var ct=xt.activeKey,Je=xt.selectedKeys,Ee=nt.eventKey,Ue=nt.subMenuKey;return{active:ct[Ue]===Ee,isSelected:Je.indexOf(Ee)!==-1}})(Ce),$e=we,it=function(xt){Object(P.a)(ct,xt);var nt=Object(E.a)(ct);function ct(){var Je;return Object($.a)(this,ct),Je=nt.apply(this,arguments),Je.renderInnerMenuItem=function(Ee){var Ue=Je.props,ft=Ue.renderMenuItem,Qe=Ue.index;return ft(Ee,Qe,Je.props.subMenuKey)},Je}return Object(U.a)(ct,[{key:"render",value:function(){var Ee=Object(p.a)({},this.props),Ue=Ee.className,ft=Ue===void 0?"":Ue,Qe=Ee.rootPrefixCls,Ot="".concat(Qe,"-item-group-title"),wt="".concat(Qe,"-item-group-list"),lt=Ee.title,yt=Ee.children;return ae.forEach(function(Nt){return delete Ee[Nt]}),delete Ee.onClick,delete Ee.direction,C.createElement("li",Object.assign({},Ee,{className:"".concat(ft," ").concat(Qe,"-item-group")}),C.createElement("div",{className:Ot,title:typeof lt=="string"?lt:void 0},lt),C.createElement("ul",{className:wt},C.Children.map(yt,this.renderInnerMenuItem)))}}]),ct}(C.Component);it.isMenuItemGroup=!0,it.defaultProps={disabled:!0};var dt=it,Et=function(nt){var ct=nt.className,Je=nt.rootPrefixCls,Ee=nt.style;return C.createElement("li",{className:"".concat(ct," ").concat(Je,"-item-divider"),style:Ee})};Et.defaultProps={disabled:!0,className:"",style:{}};var Dt=Et,ot=Be.e=be},"3tLw":function(Ve,Be,W){Ve.exports=W.p+"static/a.39070d50.svg"},"4xil":function(Ve,Be,W){Ve.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(Ve,Be,W){"use strict";W.d(Be,"a",function(){return n});var re=W("Ty5D"),$=W("dI71"),U=W("cDcd"),S=W.n(U),P=W("YS25"),E=W("17x9"),C=W.n(E),w=W("wx14"),u=W("zLVn"),p=W("9R94"),f=function(x){Object($.a)(l,x);function l(){for(var A,O=arguments.length,D=new Array(O),I=0;I<O;I++)D[I]=arguments[I];return A=x.call.apply(x,[this].concat(D))||this,A.history=Object(P.a)(A.props),A}var T=l.prototype;return T.render=function(){return S.a.createElement(re.c,{history:this.history,children:this.props.children})},l}(S.a.Component),o=function(x){Object($.a)(l,x);function l(){for(var A,O=arguments.length,D=new Array(O),I=0;I<O;I++)D[I]=arguments[I];return A=x.call.apply(x,[this].concat(D))||this,A.history=Object(P.b)(A.props),A}var T=l.prototype;return T.render=function(){return S.a.createElement(re.c,{history:this.history,children:this.props.children})},l}(S.a.Component),a=function(l,T){return typeof l=="function"?l(T):l},c=function(l,T){return typeof l=="string"?Object(P.c)(l,null,null,T):l},s=function(l){return l},d=S.a.forwardRef;typeof d=="undefined"&&(d=s);function i(x){return!!(x.metaKey||x.altKey||x.ctrlKey||x.shiftKey)}var t=d(function(x,l){var T=x.innerRef,A=x.navigate,O=x.onClick,D=Object(u.a)(x,["innerRef","navigate","onClick"]),I=D.target,j=Object(w.a)({},D,{onClick:function(ee){try{O&&O(ee)}catch(F){throw ee.preventDefault(),F}!ee.defaultPrevented&&ee.button===0&&(!I||I==="_self")&&!i(ee)&&(ee.preventDefault(),A())}});return s!==d?j.ref=l||T:j.ref=T,S.a.createElement("a",j)}),n=d(function(x,l){var T=x.component,A=T===void 0?t:T,O=x.replace,D=x.to,I=x.innerRef,j=Object(u.a)(x,["component","replace","to","innerRef"]);return S.a.createElement(re.e.Consumer,null,function(B){B||Object(p.a)(!1);var ee=B.history,F=c(a(D,B.location),B.location),G=F?ee.createHref(F):"",X=Object(w.a)({},j,{href:G,navigate:function(){var K=a(D,B.location),q=O?ee.replace:ee.push;q(K)}});return s!==d?X.ref=l||I:X.innerRef=I,S.a.createElement(A,X)})});if(!1)var h,v;var b=function(l){return l},y=S.a.forwardRef;typeof y=="undefined"&&(y=b);function _(){for(var x=arguments.length,l=new Array(x),T=0;T<x;T++)l[T]=arguments[T];return l.filter(function(A){return A}).join(" ")}var m=y(function(x,l){var T=x["aria-current"],A=T===void 0?"page":T,O=x.activeClassName,D=O===void 0?"active":O,I=x.activeStyle,j=x.className,B=x.exact,ee=x.isActive,F=x.location,G=x.sensitive,X=x.strict,Z=x.style,K=x.to,q=x.innerRef,ae=Object(u.a)(x,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return S.a.createElement(re.e.Consumer,null,function(oe){oe||Object(p.a)(!1);var ve=F||oe.location,he=c(a(K,ve),ve),_e=he.pathname,fe=_e&&_e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),xe=fe?Object(re.f)(ve.pathname,{path:fe,exact:B,sensitive:G,strict:X}):null,je=!!(ee?ee(xe,ve):xe),Le=je?_(j,D):j,ke=je?Object(w.a)({},Z,{},I):Z,Fe=Object(w.a)({"aria-current":je&&A||null,className:Le,style:ke,to:he},ae);return b!==y?Fe.ref=l||q:Fe.innerRef=q,S.a.createElement(n,Fe)})});if(!1)var g},"5nXd":function(Ve,Be,W){var re=W("MFOe"),$=re.slice,U=re.pluck,S=re.each,P=re.bind,E=re.create,C=re.isList,w=re.isFunction,u=re.isObject;Ve.exports={createStore:o};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,d){a.call(c,c._deserialize(s),(d||"").replace(c._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(a){return this._namespacePrefix=="__storejs_"+a+"_"},createStore:function(){return o.apply(this,arguments)},addPlugin:function(a){this._addPlugin(a)},namespace:function(a){return o(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 o(a,c,s){s||(s=""),a&&!C(a)&&(a=[a]),c&&!C(c)&&(c=[c]);var d=s?"__storejs_"+s+"_":"",i=s?new RegExp("^"+d):null,t=/^[a-zA-Z0-9_\-]*$/;if(!t.test(s))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var n={_namespacePrefix:d,_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=$(arguments,0),g=this;function x(){return y?(S(arguments,function(T,A){m[A]=T}),y.apply(g,m)):void 0}var l=[x].concat(m);return v.apply(g,l)}},_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)){S(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),!w(v))throw new Error("Plugins must be function values that return objects");var _=v.call(this);if(!u(_))throw new Error("Plugins must return an object of function properties");S(_,function(m,g){if(!w(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)}},h=E(n,p,{plugins:[]});return h.raw={},S(h,function(v,b){w(v)&&(h.raw[b]=P(h,v))}),S(a,function(v){h._addStorage(v)}),S(c,function(v){h._addPlugin(v)}),h}},"6+eU":function(Ve,Be,W){"use strict";W.d(Be,"a",function(){return y});var re=W("wx14"),$=W("rePB"),U=W("VTBJ"),S=W("1OyB"),P=W("vuIU"),E=W("Ji7U"),C=W("LK+K"),w=W("cDcd"),u=W.n(w),p=W("TSYQ"),f=W.n(p),o=function(m){var g,x="".concat(m.rootPrefixCls,"-item"),l=f()(x,"".concat(x,"-").concat(m.page),(g={},Object($.a)(g,"".concat(x,"-active"),m.active),Object($.a)(g,m.className,!!m.className),Object($.a)(g,"".concat(x,"-disabled"),!m.page),g)),T=function(){m.onClick(m.page)},A=function(D){m.onKeyPress(D,m.onClick,m.page)};return u.a.createElement("li",{title:m.showTitle?m.page:null,className:l,onClick:T,onKeyPress:A,tabIndex:"0"},m.itemRender(m.page,"page",u.a.createElement("a",{rel:"nofollow"},m.page)))},a=o,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(E.a)(g,_);var m=Object(C.a)(g);function g(){var x;Object(S.a)(this,g);for(var l=arguments.length,T=new Array(l),A=0;A<l;A++)T[A]=arguments[A];return x=m.call.apply(m,[this].concat(T)),x.state={goInputText:""},x.buildOptionText=function(O){return"".concat(O," ").concat(x.props.locale.items_per_page)},x.changeSize=function(O){x.props.changeSize(Number(O))},x.handleChange=function(O){x.setState({goInputText:O.target.value})},x.handleBlur=function(O){var D=x.props,I=D.goButton,j=D.quickGo,B=D.rootPrefixCls,ee=x.state.goInputText;if(I||ee==="")return;if(O.relatedTarget&&(O.relatedTarget.className.indexOf("".concat(B,"-prev"))>=0||O.relatedTarget.className.indexOf("".concat(B,"-next"))>=0))return;x.setState({goInputText:""}),j(x.getValidValue())},x.go=function(O){var D=x.state.goInputText;if(D==="")return;(O.keyCode===c.ENTER||O.type==="click")&&(x.setState({goInputText:""}),x.props.quickGo(x.getValidValue()))},x}return Object(P.a)(g,[{key:"getValidValue",value:function(){var l=this.state,T=l.goInputText,A=l.current;return!T||isNaN(T)?A:Number(T)}},{key:"getPageSizeOptions",value:function(){var l=this.props,T=l.pageSize,A=l.pageSizeOptions;return A.some(function(O){return O.toString()===T.toString()})?A:A.concat([T.toString()]).sort(function(O,D){var I=isNaN(Number(O))?0:Number(O),j=isNaN(Number(D))?0:Number(D);return I-j})}},{key:"render",value:function(){var l=this,T=this.props,A=T.pageSize,O=T.locale,D=T.rootPrefixCls,I=T.changeSize,j=T.quickGo,B=T.goButton,ee=T.selectComponentClass,F=T.buildOptionText,G=T.selectPrefixCls,X=T.disabled,Z=this.state.goInputText,K="".concat(D,"-options"),q=ee,ae=null,oe=null,ve=null;if(!I&&!j)return null;var he=this.getPageSizeOptions();if(I&&q){var _e=he.map(function(fe,xe){return u.a.createElement(q.Option,{key:xe,value:fe.toString()},(F||l.buildOptionText)(fe))});ae=u.a.createElement(q,{disabled:X,prefixCls:G,showSearch:!1,className:"".concat(K,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(A||he[0]).toString(),onChange:this.changeSize,getPopupContainer:function(xe){return xe.parentNode}},_e)}return j&&(B&&(ve=typeof B=="boolean"?u.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:X,className:"".concat(K,"-quick-jumper-button")},O.jump_to_confirm):u.a.createElement("span",{onClick:this.go,onKeyUp:this.go},B)),oe=u.a.createElement("div",{className:"".concat(K,"-quick-jumper")},O.jump_to,u.a.createElement("input",{disabled:X,type:"text",value:Z,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),O.page,ve)),u.a.createElement("li",{className:"".concat(K)},ae,oe)}}]),g}(u.a.Component);s.defaultProps={pageSizeOptions:["10","20","50","100"]};var d=s,i=W("N2Kk");function t(){}function n(_){return typeof _=="number"&&isFinite(_)&&Math.floor(_)===_}function h(_,m,g){return g}function v(_,m,g){var x=typeof _=="undefined"?m.pageSize:_;return Math.floor((g.total-1)/x)+1}var b=function(_){Object(E.a)(g,_);var m=Object(C.a)(g);function g(x){var l;Object(S.a)(this,g),l=m.call(this,x),l.getJumpPrevPage=function(){return Math.max(1,l.state.current-(l.props.showLessItems?3:5))},l.getJumpNextPage=function(){return Math.min(v(void 0,l.state,l.props),l.state.current+(l.props.showLessItems?3:5))},l.getItemIcon=function(I,j){var B=l.props.prefixCls,ee=I||u.a.createElement("button",{type:"button","aria-label":j,className:"".concat(B,"-item-link")});return typeof I=="function"&&(ee=u.a.createElement(I,Object(U.a)({},l.props))),ee},l.savePaginationNode=function(I){l.paginationNode=I},l.isValid=function(I){return n(I)&&I!==l.state.current},l.shouldDisplayQuickJumper=function(){var I=l.props,j=I.showQuickJumper,B=I.pageSize,ee=I.total;return ee<=B?!1:j},l.handleKeyDown=function(I){(I.keyCode===c.ARROW_UP||I.keyCode===c.ARROW_DOWN)&&I.preventDefault()},l.handleKeyUp=function(I){var j=l.getValidValue(I),B=l.state.currentInputValue;j!==B&&l.setState({currentInputValue:j}),I.keyCode===c.ENTER?l.handleChange(j):I.keyCode===c.ARROW_UP?l.handleChange(j-1):I.keyCode===c.ARROW_DOWN&&l.handleChange(j+1)},l.changePageSize=function(I){var j=l.state.current,B=v(I,l.state,l.props);j=j>B?B:j,B===0&&(j=l.state.current),typeof I=="number"&&("pageSize"in l.props||l.setState({pageSize:I}),"current"in l.props||l.setState({current:j,currentInputValue:j})),l.props.onShowSizeChange(j,I),"onChange"in l.props&&l.props.onChange&&l.props.onChange(j,I)},l.handleChange=function(I){var j=l.props.disabled,B=I;if(l.isValid(B)&&!j){var ee=v(void 0,l.state,l.props);B>ee?B=ee:B<1&&(B=1),"current"in l.props||l.setState({current:B,currentInputValue:B});var F=l.state.pageSize;return l.props.onChange(B,F),B}return l.state.current},l.prev=function(){l.hasPrev()&&l.handleChange(l.state.current-1)},l.next=function(){l.hasNext()&&l.handleChange(l.state.current+1)},l.jumpPrev=function(){l.handleChange(l.getJumpPrevPage())},l.jumpNext=function(){l.handleChange(l.getJumpNextPage())},l.hasPrev=function(){return l.state.current>1},l.hasNext=function(){return l.state.current<v(void 0,l.state,l.props)},l.runIfEnter=function(I,j){if(I.key==="Enter"||I.charCode===13){for(var B=arguments.length,ee=new Array(B>2?B-2:0),F=2;F<B;F++)ee[F-2]=arguments[F];j.apply(void 0,ee)}},l.runIfEnterPrev=function(I){l.runIfEnter(I,l.prev)},l.runIfEnterNext=function(I){l.runIfEnter(I,l.next)},l.runIfEnterJumpPrev=function(I){l.runIfEnter(I,l.jumpPrev)},l.runIfEnterJumpNext=function(I){l.runIfEnter(I,l.jumpNext)},l.handleGoTO=function(I){(I.keyCode===c.ENTER||I.type==="click")&&l.handleChange(l.state.currentInputValue)};var T=x.onChange!==t,A="current"in x;A&&!T&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var O=x.defaultCurrent;"current"in x&&(O=x.current);var D=x.defaultPageSize;return"pageSize"in x&&(D=x.pageSize),O=Math.min(O,v(D,void 0,x)),l.state={current:O,currentInputValue:O,pageSize:D},l}return Object(P.a)(g,[{key:"componentDidUpdate",value:function(l,T){var A=this.props.prefixCls;if(T.current!==this.state.current&&this.paginationNode){var O=this.paginationNode.querySelector(".".concat(A,"-item-").concat(T.current));O&&document.activeElement===O&&O.blur()}}},{key:"getValidValue",value:function(l){var T=l.target.value,A=v(void 0,this.state,this.props),O=this.state.currentInputValue,D;return T===""?D=T:isNaN(Number(T))?D=O:T>=A?D=A:D=Number(T),D}},{key:"getShowSizeChanger",value:function(){var l=this.props,T=l.showSizeChanger,A=l.total,O=l.totalBoundaryShowSizeChanger;return typeof T!="undefined"?T:A>O}},{key:"renderPrev",value:function(l){var T=this.props,A=T.prevIcon,O=T.itemRender,D=O(l,"prev",this.getItemIcon(A,"prev page")),I=!this.hasPrev();return Object(w.isValidElement)(D)?Object(w.cloneElement)(D,{disabled:I}):D}},{key:"renderNext",value:function(l){var T=this.props,A=T.nextIcon,O=T.itemRender,D=O(l,"next",this.getItemIcon(A,"next page")),I=!this.hasNext();return Object(w.isValidElement)(D)?Object(w.cloneElement)(D,{disabled:I}):D}},{key:"render",value:function(){var l=this,T=this.props,A=T.prefixCls,O=T.className,D=T.style,I=T.disabled,j=T.hideOnSinglePage,B=T.total,ee=T.locale,F=T.showQuickJumper,G=T.showLessItems,X=T.showTitle,Z=T.showTotal,K=T.simple,q=T.itemRender,ae=T.showPrevNextJumpers,oe=T.jumpPrevIcon,ve=T.jumpNextIcon,he=T.selectComponentClass,_e=T.selectPrefixCls,fe=T.pageSizeOptions,xe=this.state,je=xe.current,Le=xe.pageSize,ke=xe.currentInputValue;if(j===!0&&B<=Le)return null;var Fe=v(void 0,this.state,this.props),ge=[],ce=null,Ie=null,Ne=null,Xe=null,te=null,k=F&&F.goButton,N=G?1:2,J=je-1>0?je-1:0,V=je+1<Fe?je+1:Fe,Y=Object.keys(this.props).reduce(function(pe,be){return(be.substr(0,5)==="data-"||be.substr(0,5)==="aria-"||be==="role")&&(pe[be]=l.props[be]),pe},{});if(K)return k&&(typeof k=="boolean"?te=u.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},ee.jump_to_confirm):te=u.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},k),te=u.a.createElement("li",{title:X?"".concat(ee.jump_to).concat(je,"/").concat(Fe):null,className:"".concat(A,"-simple-pager")},te)),u.a.createElement("ul",Object(re.a)({className:f()(A,"".concat(A,"-simple"),Object($.a)({},"".concat(A,"-disabled"),I),O),style:D,ref:this.savePaginationNode},Y),u.a.createElement("li",{title:X?ee.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:f()("".concat(A,"-prev"),Object($.a)({},"".concat(A,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(J)),u.a.createElement("li",{title:X?"".concat(je,"/").concat(Fe):null,className:"".concat(A,"-simple-pager")},u.a.createElement("input",{type:"text",value:ke,disabled:I,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),u.a.createElement("span",{className:"".concat(A,"-slash")},"/"),Fe),u.a.createElement("li",{title:X?ee.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:f()("".concat(A,"-next"),Object($.a)({},"".concat(A,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(V)),te);if(Fe<=3+N*2){var me={locale:ee,rootPrefixCls:A,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:X,itemRender:q};Fe||ge.push(u.a.createElement(a,Object(re.a)({},me,{key:"noPager",page:Fe,className:"".concat(A,"-disabled")})));for(var Ae=1;Ae<=Fe;Ae+=1){var at=je===Ae;ge.push(u.a.createElement(a,Object(re.a)({},me,{key:Ae,page:Ae,active:at})))}}else{var Re=G?ee.prev_3:ee.prev_5,Pe=G?ee.next_3:ee.next_5;ae&&(ce=u.a.createElement("li",{title:X?Re:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:f()("".concat(A,"-jump-prev"),Object($.a)({},"".concat(A,"-jump-prev-custom-icon"),!!oe))},q(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(oe,"prev page"))),Ie=u.a.createElement("li",{title:X?Pe:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:f()("".concat(A,"-jump-next"),Object($.a)({},"".concat(A,"-jump-next-custom-icon"),!!ve))},q(this.getJumpNextPage(),"jump-next",this.getItemIcon(ve,"next page")))),Xe=u.a.createElement(a,{locale:ee,last:!0,rootPrefixCls:A,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Fe,page:Fe,active:!1,showTitle:X,itemRender:q}),Ne=u.a.createElement(a,{locale:ee,rootPrefixCls:A,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:X,itemRender:q});var Ye=Math.max(1,je-N),Ze=Math.min(je+N,Fe);je-1<=N&&(Ze=1+N*2),Fe-je<=N&&(Ye=Fe-N*2);for(var ze=Ye;ze<=Ze;ze+=1){var We=je===ze;ge.push(u.a.createElement(a,{locale:ee,rootPrefixCls:A,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:ze,page:ze,active:We,showTitle:X,itemRender:q}))}je-1>=N*2&&je!==1+2&&(ge[0]=Object(w.cloneElement)(ge[0],{className:"".concat(A,"-item-after-jump-prev")}),ge.unshift(ce)),Fe-je>=N*2&&je!==Fe-2&&(ge[ge.length-1]=Object(w.cloneElement)(ge[ge.length-1],{className:"".concat(A,"-item-before-jump-next")}),ge.push(Ie)),Ye!==1&&ge.unshift(Ne),Ze!==Fe&&ge.push(Xe)}var Me=null;Z&&(Me=u.a.createElement("li",{className:"".concat(A,"-total-text")},Z(B,[B===0?0:(je-1)*Le+1,je*Le>B?B:je*Le])));var De=!this.hasPrev()||!Fe,Oe=!this.hasNext()||!Fe;return u.a.createElement("ul",Object(re.a)({className:f()(A,O,Object($.a)({},"".concat(A,"-disabled"),I)),style:D,unselectable:"unselectable",ref:this.savePaginationNode},Y),Me,u.a.createElement("li",{title:X?ee.prev_page:null,onClick:this.prev,tabIndex:De?null:0,onKeyPress:this.runIfEnterPrev,className:f()("".concat(A,"-prev"),Object($.a)({},"".concat(A,"-disabled"),De)),"aria-disabled":De},this.renderPrev(J)),ge,u.a.createElement("li",{title:X?ee.next_page:null,onClick:this.next,tabIndex:Oe?null:0,onKeyPress:this.runIfEnterNext,className:f()("".concat(A,"-next"),Object($.a)({},"".concat(A,"-disabled"),Oe)),"aria-disabled":Oe},this.renderNext(V)),u.a.createElement(d,{disabled:I,locale:ee,rootPrefixCls:A,selectComponentClass:he,selectPrefixCls:_e,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:je,pageSize:Le,pageSizeOptions:fe,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:k}))}}],[{key:"getDerivedStateFromProps",value:function(l,T){var A={};if("current"in l&&(A.current=l.current,l.current!==T.current&&(A.currentInputValue=A.current)),"pageSize"in l&&l.pageSize!==T.pageSize){var O=T.current,D=v(l.pageSize,T,l);O=O>D?D:O,"current"in l||(A.current=O,A.currentInputValue=O),A.pageSize=l.pageSize}return A}}]),g}(u.a.Component);b.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:t,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:t,locale:i.a,style:{},itemRender:h,totalBoundaryShowSizeChanger:50};var y=b},"6RRn":function(Ve,Be,W){"use strict";var re=W("wCXF"),$=W("n6Qo");W.d(Be,"b",function(){return $.a});var U=W("IBYe"),S=W("6eGT"),P=W("hW8S");W.d(Be,"a",function(){return P.a}),Be.c=re.b},"6eGT":function(Ve,Be,W){"use strict";function re($){return null}Be.a=re},"7+5b":function(Ve,Be,W){Ve.exports=W.p+"static/v.e7f297d6.svg"},"7Cbv":function(Ve,Be,W){"use strict";var re=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),$=new Uint8Array(16);function U(){if(!re)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return re($)}var S=/^(?:[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"&&S.test(a)}for(var E=P,C=[],w=0;w<256;++w)C.push((w+256).toString(16).substr(1));function u(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(!E(s))throw TypeError("Stringified UUID is invalid");return s}var p=u;function f(a,c,s){a=a||{};var d=a.random||(a.rng||U)();if(d[6]=d[6]&15|64,d[8]=d[8]&63|128,c){s=s||0;for(var i=0;i<16;++i)c[s+i]=d[i];return c}return p(d)}var o=Be.a=f},"7ahc":function(Ve,Be,W){"use strict";W.d(Be,"a",function(){return v});var re=W("k1fw"),$=W("0Owb"),U=W("+L6B"),S=W("2/Rp"),P=W("y8nQ"),E=W("Vl3Y"),C=W("tJVT"),w=W("OaEy"),u=W("2fM7"),p=W("cDcd"),f=W.n(p),o=W("VrN/"),a=W.n(o),c=W("p77/"),s=W.n(c),d=W("c5Ni"),i=W.n(d),t=u.a.Option,n={labelCol:{span:4},wrapperCol:{span:20}},h={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"]};Be.b=function(b){var y=b.callback,_=b.onCancel,m=Object(p.useState)("python"),g=Object(C.a)(m,2),x=g[0],l=g[1];function T(O){l(h[O][1])}function A(O){y(O)}return f.a.createElement(E.a,Object($.a)({},n,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:A}),f.a.createElement(E.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},f.a.createElement(u.a,{onChange:T},Object.keys(h).map(function(O){return f.a.createElement(t,{key:O,value:O},h[O][0])}))),f.a.createElement(E.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:x})),f.a.createElement("div",{className:"flex-container flex-end"},f.a.createElement(S.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),f.a.createElement(S.a,{type:"ghost",onClick:_},"\u53D6\u6D88")))};function v(b){var y=b.value,_=b.onChange,m=b.mode,g=b.options,x=g===void 0?{}:g,l=Object(p.useRef)(),T=Object(p.useState)(),A=Object(C.a)(T,2),O=A[0],D=A[1];return Object(p.useEffect)(function(){if(O){function I(j){var B=j.getValue();_&&_(B)}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(l.current&&!O){var I=a.a.fromTextArea(l.current,Object(re.a)({mode:m,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},x));D(I)}},[l.current,O]),f.a.createElement("div",{className:"my-codemirror-container"},f.a.createElement("textarea",{ref:l}))}},"7ixt":function(Ve,Be,W){"use strict";W.d(Be,"a",function(){return U});var re={adjustX:1,adjustY:1},$=[0,0],U={left:{points:["cr","cl"],overflow:re,offset:[-4,0],targetOffset:$},right:{points:["cl","cr"],overflow:re,offset:[4,0],targetOffset:$},top:{points:["bc","tc"],overflow:re,offset:[0,-4],targetOffset:$},bottom:{points:["tc","bc"],overflow:re,offset:[0,4],targetOffset:$},topLeft:{points:["bl","tl"],overflow:re,offset:[0,-4],targetOffset:$},leftTop:{points:["tr","tl"],overflow:re,offset:[-4,0],targetOffset:$},topRight:{points:["br","tr"],overflow:re,offset:[0,-4],targetOffset:$},rightTop:{points:["tl","tr"],overflow:re,offset:[4,0],targetOffset:$},bottomRight:{points:["tr","br"],overflow:re,offset:[0,4],targetOffset:$},rightBottom:{points:["bl","br"],overflow:re,offset:[4,0],targetOffset:$},bottomLeft:{points:["tl","bl"],overflow:re,offset:[0,4],targetOffset:$},leftBottom:{points:["br","bl"],overflow:re,offset:[-4,0],targetOffset:$}},S=U},"7qur":function(Ve,Be,W){"use strict";W.d(Be,"m",function(){return $}),W.d(Be,"s",function(){return U}),W.d(Be,"h",function(){return S}),W.d(Be,"o",function(){return P}),W.d(Be,"n",function(){return E}),W.d(Be,"l",function(){return C}),W.d(Be,"b",function(){return w}),W.d(Be,"q",function(){return u}),W.d(Be,"t",function(){return p}),W.d(Be,"v",function(){return f}),W.d(Be,"w",function(){return o}),W.d(Be,"u",function(){return a}),W.d(Be,"p",function(){return c}),W.d(Be,"f",function(){return s}),W.d(Be,"a",function(){return d}),W.d(Be,"j",function(){return i}),W.d(Be,"k",function(){return t}),W.d(Be,"d",function(){return n}),W.d(Be,"g",function(){return h}),W.d(Be,"c",function(){return v}),W.d(Be,"e",function(){return b}),W.d(Be,"i",function(){return y}),W.d(Be,"r",function(){return _});var re=W("ErOA");function $(m){return Object(re.c)("mypractices/".concat(m,".json"),{hidePopLogin:!0})}function U(m,g){return Object(re.f)("mypractices/".concat(m,"/code_submit.json"),g)}function S(m,g){return Object(re.c)("mypractices/".concat(m,"/code_debug.json"),g)}function P(m,g){return Object(re.c)("mypractices/".concat(m,"/submit_records.json"),g)}function E(m){return Object(re.c)("mypractices/record_detail.json",{id:m})}function C(m,g){return Object(re.c)("mypractices/".concat(m,"/result.json"),{mode:g})}function w(m,g){return Object(re.f)("mypractices/".concat(m,"/add_notes.json"),g)}function u(m,g){return Object(re.f)("mypractices/".concat(m,"/restore_initial_code.json"),g)}function p(m,g){return Object(re.f)("mypractices/".concat(m,"/sync_code.json"),g)}function f(m,g){return Object(re.f)("mypractices/".concat(m,"/update_code.json"),g)}function o(m){return Object(re.f)("mypractices/".concat(m,"/initial_codes.json"))}function a(m,g){return Object(re.f)("discusses/".concat(m,"/plus.json"),g)}function c(m){return Object(re.c)("practices/practices_list.json",m)}function s(m,g){return Object(re.c)("practices/".concat(m,"/question_solution_articles"),g)}function d(m,g){return Object(re.f)("practices/".concat(m,"/question_solution_articles"),g)}function i(m,g){return Object(re.g)("practices/".concat(m,"/question_solution_articles/").concat(g==null?void 0:g.active),g)}function t(m,g){return Object(re.c)("practices/".concat(m,"/question_solution_articles/").concat(g==null?void 0:g.active,"/edit"),g)}function n(m,g){return Object(re.c)("practices/".concat(m,"/question_solution_articles/").concat(g==null?void 0:g.active),g)}function h(m,g){return Object(re.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(re.f)("practices/".concat(m,"/question_solution_articles/").concat(g==null?void 0:g.active,"/praise_or_treads"),g)}function b(m,g){return Object(re.f)("practices/".concat(m,"/question_solution_articles/").concat(g==null?void 0:g.active,"/hide"))}function y(m,g){return Object(re.b)("practices/".concat(m,"/question_solution_articles/").concat(g==null?void 0:g.active),g)}function _(m,g){return Object(re.f)("mypractices/".concat(m,"/update_practice_time_sum"),g)}},"815F":function(Ve,Be,W){"use strict";W.d(Be,"e",function(){return C}),W.d(Be,"c",function(){return u}),W.d(Be,"d",function(){return p}),W.d(Be,"a",function(){return o}),W.d(Be,"f",function(){return a}),W.d(Be,"b",function(){return c});var re=W("KQm4"),$=W("VTBJ"),U=W("Ff2n"),S=W("Zm9Q"),P=W("Kwbf"),E=W("OZM5");function C(s,d){return s!=null?s:d}function w(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],d=new Map;function i(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(t||[]).forEach(function(h){var v=h.key,b=h.children;Object(P.a)(v!=null,"Tree node must have a certain key: [".concat(n).concat(v,"]"));var y=String(v);Object(P.a)(!d.has(y)||v===null||v===void 0,"Same 'key' exist in the Tree: ".concat(y)),d.set(y,!0),i(b,"".concat(n).concat(y," > "))})}i(s)}function u(s){function d(i){var t=Object(S.a)(i);return t.map(function(n){if(!Object(E.i)(n))return Object(P.a)(!n,"Tree/TreeNode can only accept TreeNode as children."),null;var h=n.key,v=n.props,b=v.children,y=Object(U.a)(v,["children"]),_=Object($.a)({key:h},y),m=d(b);return m.length&&(_.children=m),_}).filter(function(n){return n})}return d(s)}function p(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=new Set(d===!0?[]:d),t=[];function n(h){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return h.map(function(b,y){var _=Object(E.h)(v?v.pos:"0",y),m=C(b.key,_),g=Object($.a)(Object($.a)({},b),{},{parent:v,pos:_,children:null,data:b,isStart:[].concat(Object(re.a)(v?v.isStart:[]),[y===0]),isEnd:[].concat(Object(re.a)(v?v.isEnd:[]),[y===h.length-1])});return t.push(g),d===!0||i.has(m)?g.children=n(b.children||[],g):g.children=[],g})}return n(s),t}function f(s,d,i){var t;i?typeof i=="string"?t=function(v){return v[i]}:typeof i=="function"&&(t=function(v){return i(v)}):t=function(v,b){return C(v.key,b)};function n(h,v,b){var y=h?h.children:s,_=h?Object(E.h)(b.pos,v):"0";if(h){var m=t(h,_),g={node:h,index:v,pos:_,key:m,parentPos:b.node?b.pos:null,level:b.level+1};d(g)}y&&y.forEach(function(x,l){n(x,l,{node:h,pos:_,level:b?b.level+1:-1})})}n(null)}function o(s){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=d.initWrapper,t=d.processEntity,n=d.onProcessFinished,h=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,x=_.pos,l=_.key,T=_.parentPos,A=_.level,O={node:m,index:g,key:l,pos:x,level:A},D=C(l,x);v[x]=O,b[D]=O,O.parent=v[T],O.parent&&(O.parent.children=O.parent.children||[],O.parent.children.push(O)),t&&t(O,y)},h),n&&n(y),y}function a(s,d){var i=d.expandedKeys,t=d.selectedKeys,n=d.loadedKeys,h=d.loadingKeys,v=d.checkedKeys,b=d.halfCheckedKeys,y=d.dragOverNodeKey,_=d.dropPosition,m=d.keyEntities,g=m[s],x={eventKey:s,expanded:i.indexOf(s)!==-1,selected:t.indexOf(s)!==-1,loaded:n.indexOf(s)!==-1,loading:h.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 x}function c(s){var d=s.data,i=s.expanded,t=s.selected,n=s.checked,h=s.loaded,v=s.loading,b=s.halfChecked,y=s.dragOver,_=s.dragOverGapTop,m=s.dragOverGapBottom,g=s.pos,x=s.active,l=Object($.a)(Object($.a)({},d),{},{expanded:i,selected:t,checked:n,loaded:h,loading:v,halfChecked:b,dragOver:y,dragOverGapTop:_,dragOverGapBottom:m,pos:g,active:x});return"props"in l||Object.defineProperty(l,"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}}),l}},"8EBN":function(Ve,Be,W){(function(re){re(W("VrN/"))})(function(re){"use strict";re.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 $=0;$<re.modeInfo.length;$++){var U=re.modeInfo[$];U.mimes&&(U.mime=U.mimes[0])}re.findModeByMIME=function(S){S=S.toLowerCase();for(var P=0;P<re.modeInfo.length;P++){var E=re.modeInfo[P];if(E.mime==S)return E;if(E.mimes){for(var C=0;C<E.mimes.length;C++)if(E.mimes[C]==S)return E}}if(/\+xml$/.test(S))return re.findModeByMIME("application/xml");if(/\+json$/.test(S))return re.findModeByMIME("application/json")},re.findModeByExtension=function(S){S=S.toLowerCase();for(var P=0;P<re.modeInfo.length;P++){var E=re.modeInfo[P];if(E.ext){for(var C=0;C<E.ext.length;C++)if(E.ext[C]==S)return E}}},re.findModeByFileName=function(S){for(var P=0;P<re.modeInfo.length;P++){var E=re.modeInfo[P];if(E.file&&E.file.test(S))return E}var C=S.lastIndexOf("."),w=C>-1&&S.substring(C+1,S.length);if(w)return re.findModeByExtension(w)},re.findModeByName=function(S){S=S.toLowerCase();for(var P=0;P<re.modeInfo.length;P++){var E=re.modeInfo[P];if(E.name.toLowerCase()==S)return E;if(E.alias){for(var C=0;C<E.alias.length;C++)if(E.alias[C].toLowerCase()==S)return E}}}})},"8hTe":function(Ve,Be,W){Ve.exports={button:"button___1wy9m"}},"9Bee":function(Ve,Be,W){"use strict";var re=W("DYRE"),$=W("zeV3"),U=W("+L6B"),S=W("2/Rp"),P=W("k1fw"),E=W("tJVT"),C=W("cDcd"),w=W.n(C),u=W("vg9a"),p=W("DlQD"),f=W.n(p),o=W("rUJ1");function a(ve,he){var _e=ve.match(/^(\s+)(?:```)/);if(_e===null)return he;var fe=_e[1];return he.split(`
|
|
|
`).map(function(xe){var je=xe.match(/^\s+/);if(je===null)return xe;var Le=Object(E.a)(je,1),ke=Le[0];return ke.length>=fe.length?xe.slice(fe.length):xe}).join(`
|
|
|
`)}var c=[],s=["<ul>"],d=new f.a.Renderer,i=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function t(){c.length=0,s=["<ul>"]}var n={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function h(ve,he,_e,fe){if(he>=ve.length||ve[he].level<=_e)return he;var xe=ve[he];fe.push("<li><a href='#"+xe.anchor+"'>"+xe.text+"</a>"),he++;var je=[];return he=h(ve,he,xe.level,je),je.length>0&&(fe.push("<ul>"),je.forEach(function(Le){fe.push(Le)}),fe.push("</ul>")),fe.push("</li>"),he=h(ve,he,_e,fe),he}function v(){return h(c,0,0,s),s.push("</ul>"),s.join("")}var b={heading:function(he){var _e=i.exec(he);if(_e)return{type:"heading",raw:_e[0],depth:_e[1].length,text:_e[2]}},fences:function(he){var _e=this.rules.block.fences.exec(he);if(_e){var fe=_e[0],xe=a(fe,_e[3]||""),je=_e[2]?_e[2].trim():_e[2];if(["latex","katex","math"].indexOf(je)>=0){var Le=m(),ke=xe;xe=Le,g[Le]={type:"block",expression:ke}}return{type:"code",raw:fe,lang:je,text:xe}}}},y=/(?:\${2})([^\n`]+?)(?:\${2})/gi,_=0,m=function(){return"__special_katext_id_".concat(_++,"__")},g={};function x(){return g}function l(){_=0,g={}}function T(ve){return ve=ve.replace(y,function(he,_e){var fe=m();return g[fe]={type:"inline",expression:_e},fe}),ve}var A=d.listitem;d.listitem=function(ve){return A(T(ve))};var O=d.paragraph;d.paragraph=function(ve){return O(T(ve))};var D=d.tablecell;d.tablecell=function(ve,he){return D(T(ve),he)},d.code=function(ve,he,_e){var fe=(he||"").match(/\S*/)[0];return fe?["latex","katex","math"].indexOf(fe)>=0?"<p class='editormd-tex'>".concat(ve,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(he,'">').concat(_e?ve:Object(o.escape)(ve,!0),`</code></pre>
|
|
|
`):'<pre class="prettyprint linenums"><code>'+(_e?ve:Object(o.escape)(ve,!0))+"</code></pre>"},d.heading=function(ve,he,_e){var fe=this.options.headerPrefix+_e.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return c.push({anchor:fe,level:he,text:ve}),"<h"+he+' id="'+fe+'">'+ve+"</h"+he+">"},f.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),f.a.use({tokenizer:b,renderer:d});var I=f.a,j=W("SJMd"),B=W("ulZh"),ee=W.n(B),F=W("m3rI"),G=W("Oy/b"),X=W("p5ED"),Z=W("8hTe"),K=W.n(Z),q=/<pre[^>]*>/g;function ae(ve){var he=document.createElement("div");return he.innerHTML=ve,he.childNodes.length===0?"":he.childNodes[0].nodeValue}var oe=Be.a=function(ve){var he=ve.value,_e=he===void 0?"":he,fe=ve.edit,xe=fe===void 0?!1:fe,je=ve.className,Le=ve.showTextOnly,ke=ve.showLines,Fe=ve.replaces,ge=ve.zoomImg,ce=ve.hasMask,Ie=ve.style,Ne=Ie===void 0?{}:Ie,Xe=ve.stylesPrev,te=Xe===void 0?{}:Xe,k=String(_e),N=Object(C.useRef)(),J=Object(C.useRef)(),V=Object(C.useState)(""),Y=Object(E.a)(V,2),me=Y[0],Ae=Y[1],at=Object(C.useState)("office"),Re=Object(E.a)(at,2),Pe=Re[0],Ye=Re[1],Ze=Object(C.useMemo)(function(){try{var Oe=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,pe=/\"\/api\/attachments\/|\"\/attachments\/download\//g,be=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;k=k.replace(Oe,"("+F.a.API_SERVER+"/api/attachments/").replace(pe,'"'+F.a.API_SERVER+"/api/attachments/").replace(be,'"'+F.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(it){}var Ce=I(k),we=x();if(k.match(/\[TOC\]/)&&(Ce=Ce.replace("<p>[TOC]</p>",v()),t()),Ce=Ce.replace(/(__special_katext_id_\d+__)/g,function(it,dt){var Et=we[dt],Dt=Et.type,ot=Et.expression;return Object(G.renderToString)(ae(ot)||"",{displayMode:Dt==="block",throwOnError:!1,output:"html"})}),Ce=Ce.replace(/▁/g,"\u2581\u2581\u2581"),l(),Le){var $e=document.createElement("div");return $e.innerHTML=Ce,$e.innerText}return setTimeout(function(){return Me()},500),Ce},[k]),ze=Object(C.useRef)();n.WebkitLineClamp=ke,ke&&(Ne=Object(P.a)(Object(P.a)({},Ne),n));function We(Oe){var pe=Oe.target;if(pe.tagName.toUpperCase()==="IMG"){if(ge){var be=pe.getAttribute("src");Ae(be),Ye("image")}}else if(pe.tagName.toUpperCase()==="A"){var Ce=pe.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 we=document.getElementById(Ce.replace("#",""));we&&we.scrollIntoView(!0)}}}var Me=function(){var pe,be=(pe=ze.current)===null||pe===void 0?void 0:pe.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(ee.a.isSupported()){var we=new ee.a;we.loadSource(Ce.src),we.attachMedia(Ce)}}})};Object(C.useEffect)(function(){if(ze.current&&Ze&&(Ze.match(q)&&window.PR.prettyPrint()),ze.current)return ze.current.addEventListener("click",We),function(){ze.current.removeEventListener("click",We),l(),t()}},[Ze,ze.current,We]);var De=function(pe){if(!xe)return;pe.target.nodeName==="IMG"?(N.current.style.display="flex",N.current.style.width=pe.target.clientWidth+"px",N.current.style.height=pe.target.clientHeight+"px",N.current.style.top=pe.target.offsetTop+"px",N.current.style.left=pe.target.offsetLeft+"px",J.current.src=pe.target.getAttribute("src")):N.current.style.display="none"};return w.a.createElement("div",{style:{position:"relative"}},w.a.createElement("div",{ref:ze,style:Object(P.a)({},Ne),className:"".concat(je||""," markdown-body ").concat(K.a.mdBody),onMouseOver:De,dangerouslySetInnerHTML:{__html:Ze}}),w.a.createElement("div",{ref:N,className:K.a.button},w.a.createElement($.a,null,w.a.createElement(S.a,{onClick:function(){return openCrop()}},"\u88C1\u526A"),w.a.createElement(S.a,{onClick:function(){return openEditor()}},"\u7F16\u8F91"))),w.a.createElement("img",{ref:J,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),w.a.createElement(X.a,{close:!0,data:me,type:me!=null&&me.length?Pe:"",style:Object(P.a)({},te),onClose:function(){return Ae("")}}))}},"9VGf":function(Ve,Be,W){"use strict";W.d(Be,"a",function(){return U});var re=W("cDcd"),$=W.n(re);function U(S,P){var E=Object(re.useRef)();Object(re.useEffect)(function(){E.current=S}),Object(re.useEffect)(function(){function C(){E.current()}if(P!==null){var w=setInterval(C,P);return function(){return clearInterval(w)}}},[P])}},AMnG:function(Ve,Be,W){"use strict";var re=W("miYZ"),$=W("tsqr"),U=W("tJVT"),S=W("cDcd"),P=W.n(S),E=W("nWbc"),C=W.n(E),w=W("Ot1p");Be.a=function(u){var p=u.id,f=u.activeDiscussIndex,o=u.onReplyDiscuss,a=Object(S.useState)(""),c=Object(U.a)(a,2),s=c[0],d=c[1];function i(n){d(n)}function t(){if(!s){$.b.info("\u56DE\u590D\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A!");return}o(p,s),d("")}return P.a.createElement("div",{key:p,className:"discuss-item-editor",style:{display:f===p?"block":"none",width:"100%"}},P.a.createElement(w.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:t,className:"btn-send"},"\u53D1\u9001"))}},Aky1:function(Ve,Be,W){"use strict";W.d(Be,"a",function(){return u});var re=W("ErOA"),$=W("ppsT"),U=W.n($),S="",P,E="";function C(p){w(p)}function w(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(o){console.log("addFileSuccess: "+o.file.name),p.addFileSuccess&&p.addFileSuccess(o),P.startUpload()},onUploadstarted:function(o){var a=o.file.name;if(o.videoId){var d="/api/users/".concat(S,"/video_auths.json");Object(re.a)(d,{method:"put",body:{video_id:o.videoId,title:a,file_name:a,virtual_classroom_id:E}}).then(function(i){if(i.status==-1){p.onUploadError&&p.onUploadError(o);return}var t=i.data,n=t.UploadAuth,h=t.UploadAddress,v=t.VideoId;P.setUploadAuthAndAddress(o,n,h)}).catch(function(i){P.deleteFile(P._curIndex),P.nextUpload(),console.log(i)})}else{var c="/api/users/".concat(S,"/video_auths.json"),s="";Object(re.a)(c,{method:"Post",body:{title:s+a,file_name:s+a,virtual_classroom_id:E}}).then(function(i){if(i){var t=i.data,n=t.UploadAuth,h=t.UploadAddress,v=t.VideoId;P.setUploadAuthAndAddress(o,n,h,v)}}).catch(function(i){P.deleteFile(P._curIndex),P.nextUpload(),console.log(i)}),console.log("\u6587\u4EF6\u5F00\u59CB\u4E0A\u4F20...")}},onUploadSucceed:function(o){p.onUploadSucceed&&p.onUploadSucceed(o),console.log("\u6587\u4EF6\u4E0A\u4F20\u6210\u529F!")},onUploadFailed:function(o,a,c){p.onUploadFailed&&p.onUploadFailed(o),console.log("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25!")},onUploadCanceled:function(o,a,c){console.log("\u6587\u4EF6\u4E0A\u4F20\u5DF2\u6682\u505C!")},onUploadProgress:function(o,a,c){p.onUploadProgress&&p.onUploadProgress(o,a,c);var s=Math.ceil(c*100);console.log("\u6587\u4EF6\u4E0A\u4F20\u4E2D...")},onUploadTokenExpired:function(o){console.log("\u6587\u4EF6\u4E0A\u4F20\u8D85\u65F6!");var a="/api/users/".concat(S,"/video_auths.json");Object(re.a)(a,{method:"put",body:{video_id:o.videoId}}).then(function(c){var s=c.data,d=s.UploadAuth;P.resumeUploadWithAuth(d)}).catch(function(c){console.log(c)})},onUploadEnd:function(o){p.onUploadEnd&&p.onUploadEnd(o),console.log("onUploadEnd: uploaded all the files")}}),p.gotUploader&&p.gotUploader(P)}function u(p,f,o){p&&(S=p),f&&(E=f),C(o)}},BU3w:function(Ve,Be,W){"use strict";W.d(Be,"a",function(){return E});var re=W("MNnm"),$="rc-util-key";function U(C){if(C.attachTo)return C.attachTo;var w=document.querySelector("head");return w||document.body}function S(C){var w,u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(re.a)())return null;var p=document.createElement("style");if((w=u.csp)===null||w===void 0?void 0:w.nonce){var f;p.nonce=(f=u.csp)===null||f===void 0?void 0:f.nonce}p.innerHTML=C;var o=U(u),a=o.firstChild;return u.prepend&&o.prepend?o.prepend(p):u.prepend&&a?o.insertBefore(p,a):o.appendChild(p),p}var P=new Map;function E(C,w){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},p=U(u);if(!P.has(p)){var f=S("",u),o=f.parentNode;P.set(p,o),o.removeChild(f)}var a=Array.from(P.get(p).children).find(function(t){return t.tagName==="STYLE"&&t[$]===w});if(a){var c,s;if(((c=u.csp)===null||c===void 0?void 0:c.nonce)&&a.nonce!==((s=u.csp)===null||s===void 0?void 0:s.nonce)){var d;a.nonce=(d=u.csp)===null||d===void 0?void 0:d.nonce}return a.innerHTML!==C&&(a.innerHTML=C),a}var i=S(C,u);return i[$]=w,i}},Bd2K:function(Ve,Be,W){(function(re){re(W("VrN/"),W("osHv"))})(function(re){re.defineOption("autoCloseTags",!1,function(u,p,f){if(f!=re.Init&&f&&u.removeKeyMap("autoCloseTags"),!p)return;var o={name:"autoCloseTags"};(typeof p!="object"||p.whenClosing!==!1)&&(o["'/'"]=function(a){return E(a)}),(typeof p!="object"||p.whenOpening!==!1)&&(o["'>'"]=function(a){return S(a)}),u.addKeyMap(o)});var $=["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 S(u){if(u.getOption("disableInput"))return re.Pass;for(var p=u.listSelections(),f=[],o=u.getOption("autoCloseTags"),a=0;a<p.length;a++){if(!p[a].empty())return re.Pass;var c=p[a].head,s=u.getTokenAt(c),d=re.innerMode(u.getMode(),s.state),i=d.state,t=d.mode.xmlCurrentTag&&d.mode.xmlCurrentTag(i),n=t&&t.name;if(!n)return re.Pass;var h=d.mode.configuration=="html",v=typeof o=="object"&&o.dontCloseTags||h&&$,b=typeof o=="object"&&o.indentTags||h&&U;s.end>c.ch&&(n=n.slice(0,n.length-s.end+c.ch));var y=n.toLowerCase();if(!n||s.type=="string"&&(s.end!=c.ch||!/[\"\']/.test(s.string.charAt(s.string.length-1))||s.string.length==1)||s.type=="tag"&&t.close||s.string.indexOf("/")==c.ch-s.start-1||v&&C(v,y)>-1||w(u,d.mode.xmlCurrentContext&&d.mode.xmlCurrentContext(i)||[],n,c,!0))return re.Pass;var _=typeof o=="object"&&o.emptyTags;if(_&&C(_,n)>-1){f[a]={text:"/>",newPos:re.Pos(c.line,c.ch+2)};continue}var m=b&&C(b,y)>-1;f[a]={indent:m,text:">"+(m?`
|
|
|
|
|
|
`:"")+"</"+n+">",newPos:m?re.Pos(c.line+1,0):re.Pos(c.line,c.ch+1)}}for(var g=typeof o=="object"&&o.dontIndentOnAutoClose,a=p.length-1;a>=0;a--){var x=f[a];u.replaceRange(x.text,p[a].head,p[a].anchor,"+insert");var l=u.listSelections().slice(0);l[a]={head:x.newPos,anchor:x.newPos},u.setSelections(l),!g&&x.indent&&(u.indentLine(x.newPos.line,null,!0),u.indentLine(x.newPos.line+1,null,!0))}}function P(u,p){for(var f=u.listSelections(),o=[],a=p?"/":"</",c=u.getOption("autoCloseTags"),s=typeof c=="object"&&c.dontIndentOnSlash,d=0;d<f.length;d++){if(!f[d].empty())return re.Pass;var i=f[d].head,t=u.getTokenAt(i),n=re.innerMode(u.getMode(),t.state),h=n.state;if(p&&(t.type=="string"||t.string.charAt(0)!="<"||t.start!=i.ch-1))return re.Pass;var v,b=n.mode.name!="xml"&&u.getMode().name=="htmlmixed";if(b&&n.mode.name=="javascript")v=a+"script";else if(b&&n.mode.name=="css")v=a+"style";else{var y=n.mode.xmlCurrentContext&&n.mode.xmlCurrentContext(h);if(!y||y.length&&w(u,y,y[y.length-1],i))return re.Pass;v=a+y[y.length-1]}u.getLine(i.line).charAt(t.end)!=">"&&(v+=">"),o[d]=v}if(u.replaceSelections(o),f=u.listSelections(),!s)for(var d=0;d<f.length;d++)(d==f.length-1||f[d].head.line<f[d+1].head.line)&&u.indentLine(f[d].head.line)}function E(u){return u.getOption("disableInput")?re.Pass:P(u,!0)}re.commands.closeTag=function(u){return P(u)};function C(u,p){if(u.indexOf)return u.indexOf(p);for(var f=0,o=u.length;f<o;++f)if(u[f]==p)return f;return-1}function w(u,p,f,o,a){if(!re.scanForClosingTag)return!1;var c=Math.min(u.lastLine()+1,o.line+500),s=re.scanForClosingTag(u,o,null,c);if(!s||s.tag!=f)return!1;for(var d=a?1:0,i=p.length-1;i>=0&&p[i]==f;i--)++d;o=s.to;for(var i=1;i<d;i++){var t=re.scanForClosingTag(u,o,null,c);if(!t||t.tag!=f)return!1;o=t.to}return!0}})},BdwD:function(Ve,Be,W){"use strict";var re=W("+L6B"),$=W("2/Rp"),U=W("0Owb"),S=W("k1fw"),P=W("cDcd"),E=W.n(P),C=W("FOrL"),w=W.n(C),u=function(f){var o=f.buttonProps,a=o===void 0?{}:o,c=f.styles,s=c===void 0?{}:c,d=f.customText,i=f.ButtonText,t=f.ButtonClick,n=f.Buttonclass,h=f.ButtonTwo;return E.a.createElement("section",{className:"tc animated fadeIn",style:Object(S.a)(Object(S.a)({},{color:"#999",margin:"200px auto"}),s)},E.a.createElement("img",{src:w.a}),E.a.createElement("p",{className:"mt20 font14"},d||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),i&&E.a.createElement($.a,Object(U.a)({className:n,onClick:t},a),i),h&&h)};Be.a=u},BjJ7:function(Ve,Be,W){"use strict";W.d(Be,"d",function(){return $}),W.d(Be,"c",function(){return U}),W.d(Be,"e",function(){return S}),W.d(Be,"b",function(){return P}),W.d(Be,"a",function(){return C});var re=W("m3rI");function $(w){var u=!0;if(w.length>0){for(var p=0;p<w.length;p++)if(w[p].compile_success==0||!w[p].compile_success){u=!1;break}}else u=!1;return u}function U(w){for(var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",p=[],f=0;f<w.length;f++){var o=w[f],a=u?"".concat(u,"/").concat(o.name):"".concat(o.name);p.push({title:o.name,isLeaf:!(o.type==="tree"),key:a})}return p}function S(w,u,p){for(var f=0;f<w.length;f++){var o=w[f];if(o.key===u){o.children=p;break}o.children&&S(o.children,u,p)}return w}function P(w,u,p){var f;return function(){var o=this,a=arguments,c=function(){f=null,p||w.apply(o,a)},s=p&&!f;clearTimeout(f),f=setTimeout(c,u),s&&w.apply(o,a)}}var E=!0,C=re.a.API_SERVER},"C+DQ":function(Ve,Be,W){},CNDd:function(Ve,Be,W){Ve.exports=W.p+"static/c1.7850f139.svg"},CaVn:function(Ve,Be,W){Ve.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(Ve,Be,W){var re=W("MFOe"),$=re.Global;Ve.exports={name:"sessionStorage",read:S,write:P,each:E,remove:C,clearAll:w};function U(){return $.sessionStorage}function S(u){return U().getItem(u)}function P(u,p){return U().setItem(u,p)}function E(u){for(var p=U().length-1;p>=0;p--){var f=U().key(p);u(S(f),f)}}function C(u){return U().removeItem(u)}function w(){return U().clear()}},D1Df:function(Ve,Be,W){"use strict";function re(D){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?re=function(j){return typeof j}:re=function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j},re(D)}function $(){return $=Object.assign||function(D){for(var I=1;I<arguments.length;I++){var j=arguments[I];for(var B in j)Object.prototype.hasOwnProperty.call(j,B)&&(D[B]=j[B])}return D},$.apply(this,arguments)}function U(D,I){var j=Object.keys(D);if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(D);I&&(B=B.filter(function(ee){return Object.getOwnPropertyDescriptor(D,ee).enumerable})),j.push.apply(j,B)}return j}function S(D){for(var I=1;I<arguments.length;I++){var j=arguments[I]!=null?arguments[I]:{};I%2?U(j,!0).forEach(function(B){s(D,B,j[B])}):Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors(j)):U(j).forEach(function(B){Object.defineProperty(D,B,Object.getOwnPropertyDescriptor(j,B))})}return D}function P(D,I){if(D==null)return{};var j=E(D,I),B,ee;if(Object.getOwnPropertySymbols){var F=Object.getOwnPropertySymbols(D);for(ee=0;ee<F.length;ee++){if(B=F[ee],I.indexOf(B)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(D,B))continue;j[B]=D[B]}}return j}function E(D,I){if(D==null)return{};var j={},B=Object.keys(D),ee,F;for(F=0;F<B.length;F++){if(ee=B[F],I.indexOf(ee)>=0)continue;j[ee]=D[ee]}return j}function C(D,I){if(!(D instanceof I))throw new TypeError("Cannot call a class as a function")}function w(D,I){for(var j=0;j<I.length;j++){var B=I[j];B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B&&(B.writable=!0),Object.defineProperty(D,B.key,B)}}function u(D,I,j){return I&&w(D.prototype,I),j&&w(D,j),D}function p(D,I){return I&&(re(I)==="object"||typeof I=="function")?I:o(D)}function f(D){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(j){return j.__proto__||Object.getPrototypeOf(j)},f(D)}function o(D){if(D===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return D}function a(D,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function");D.prototype=Object.create(I&&I.prototype,{constructor:{value:D,writable:!0,configurable:!0}}),I&&c(D,I)}function c(D,I){return c=Object.setPrototypeOf||function(B,ee){return B.__proto__=ee,B},c(D,I)}function s(D,I,j){return I in D?Object.defineProperty(D,I,{value:j,enumerable:!0,configurable:!0,writable:!0}):D[I]=j,D}var d=W("cDcd"),i=W("17x9"),t=W("H38U"),n=W("aRTE");function h(D){for(var I="",j=0;j<D.length;j++){var B=D.charCodeAt(j);B<128?I+=String.fromCharCode(B):B<2048?(I+=String.fromCharCode(192|B>>6),I+=String.fromCharCode(128|B&63)):B<55296||B>=57344?(I+=String.fromCharCode(224|B>>12),I+=String.fromCharCode(128|B>>6&63),I+=String.fromCharCode(128|B&63)):(j++,B=65536+((B&1023)<<10|D.charCodeAt(j)&1023),I+=String.fromCharCode(240|B>>18),I+=String.fromCharCode(128|B>>12&63),I+=String.fromCharCode(128|B>>6&63),I+=String.fromCharCode(128|B&63))}return I}var v={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000",includeMargin:!1},b={},y=4,_=.1;function m(D){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,j=[];return D.forEach(function(B,ee){var F=null;B.forEach(function(G,X){if(!G&&F!==null){j.push("M".concat(F+I," ").concat(ee+I,"h").concat(X-F,"v1H").concat(F+I,"z")),F=null;return}if(X===B.length-1){if(!G)return;F===null?j.push("M".concat(X+I,",").concat(ee+I," h1v1H").concat(X+I,"z")):j.push("M".concat(F+I,",").concat(ee+I," h").concat(X+1-F,"v1H").concat(F+I,"z"));return}G&&F===null&&(F=X)})}),j.join("")}function g(D,I){return D.slice().map(function(j,B){return B<I.y||B>=I.y+I.h?j:j.map(function(ee,F){return F<I.x||F>=I.x+I.w?ee:!1})})}function x(D,I){var j=D.imageSettings,B=D.size,ee=D.includeMargin;if(j==null)return null;var F=ee?y:0,G=I.length+F*2,X=Math.floor(B*_),Z=G/B,K=(j.width||X)*Z,q=(j.height||X)*Z,ae=j.x==null?I.length/2-K/2:j.x*Z,oe=j.y==null?I.length/2-q/2:j.y*Z,ve=null;if(j.excavate){var he=Math.floor(ae),_e=Math.floor(oe),fe=Math.ceil(K+ae-he),xe=Math.ceil(q+oe-_e);ve={x:he,y:_e,w:fe,h:xe}}return{x:ae,y:oe,h:q,w:K,excavation:ve}}var l=function(){try{new Path2D().addPath(new Path2D)}catch(D){return!1}return!0}(),T=function(D){a(I,D);function I(){var j,B;C(this,I);for(var ee=arguments.length,F=new Array(ee),G=0;G<ee;G++)F[G]=arguments[G];return B=p(this,(j=f(I)).call.apply(j,[this].concat(F))),s(o(B),"_canvas",void 0),s(o(B),"_image",void 0),s(o(B),"state",{imgLoaded:!1}),s(o(B),"handleImageLoad",function(){B.setState({imgLoaded:!0})}),B}return u(I,[{key:"componentDidMount",value:function(){this.update()}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var B=this.props,ee=B.value,F=B.size,G=B.level,X=B.bgColor,Z=B.fgColor,K=B.includeMargin,q=B.imageSettings,ae=new t(-1,n[G]);if(ae.addData(h(ee)),ae.make(),this._canvas!=null){var oe=this._canvas,ve=oe.getContext("2d");if(!ve)return;var he=ae.modules;if(he===null)return;var _e=K?y:0,fe=he.length+_e*2,xe=x(this.props,he);q!=null&&xe!=null&&(xe.excavation!=null&&(he=g(he,xe.excavation)));var je=window.devicePixelRatio||1;oe.height=oe.width=F*je;var Le=F/fe*je;ve.scale(Le,Le),ve.fillStyle=X,ve.fillRect(0,0,fe,fe),ve.fillStyle=Z,l?ve.fill(new Path2D(m(he,_e))):he.forEach(function(ke,Fe){ke.forEach(function(ge,ce){ge&&ve.fillRect(ce+_e,Fe+_e,1,1)})}),this.state.imgLoaded&&this._image&&xe!=null&&ve.drawImage(this._image,xe.x+_e,xe.y+_e,xe.w,xe.h)}}},{key:"render",value:function(){var B=this,ee=this.props,F=ee.value,G=ee.size,X=ee.level,Z=ee.bgColor,K=ee.fgColor,q=ee.style,ae=ee.includeMargin,oe=ee.imageSettings,ve=P(ee,["value","size","level","bgColor","fgColor","style","includeMargin","imageSettings"]),he=S({height:G,width:G},q),_e=null,fe=oe&&oe.src;return oe!=null&&fe!=null&&(_e=d.createElement("img",{src:fe,style:{display:"none"},onLoad:this.handleImageLoad,ref:function(je){return B._image=je}})),d.createElement(d.Fragment,null,d.createElement("canvas",$({style:he,height:G,width:G,ref:function(je){return B._canvas=je}},ve)),_e)}}]),I}(d.PureComponent);s(T,"defaultProps",v);var A=function(D){a(I,D);function I(){return C(this,I),p(this,f(I).apply(this,arguments))}return u(I,[{key:"render",value:function(){var B=this.props,ee=B.value,F=B.size,G=B.level,X=B.bgColor,Z=B.fgColor,K=B.includeMargin,q=B.imageSettings,ae=P(B,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]),oe=new t(-1,n[G]);oe.addData(h(ee)),oe.make();var ve=oe.modules;if(ve===null)return null;var he=K?y:0,_e=ve.length+he*2,fe=x(this.props,ve),xe=null;q!=null&&fe!=null&&(fe.excavation!=null&&(ve=g(ve,fe.excavation)),xe=d.createElement("image",{xlinkHref:q.src,height:fe.h,width:fe.w,x:fe.x+he,y:fe.y+he,preserveAspectRatio:"none"}));var je=m(ve,he);return d.createElement("svg",$({shapeRendering:"crispEdges",height:F,width:F,viewBox:"0 0 ".concat(_e," ").concat(_e)},ae),d.createElement("path",{fill:X,d:"M0,0 h".concat(_e,"v").concat(_e,"H0z")}),d.createElement("path",{fill:Z,d:je}),xe)}}]),I}(d.PureComponent);s(A,"defaultProps",v);var O=function(I){var j=I.renderAs,B=P(I,["renderAs"]),ee=j==="svg"?A:T;return d.createElement(ee,B)};O.defaultProps=S({renderAs:"canvas"},v),Ve.exports=O},DlQD:function(Ve,Be,W){(function(re,$){Ve.exports=$()})(this,function(){"use strict";function re(Me,De){for(var Oe=0;Oe<De.length;Oe++){var pe=De[Oe];pe.enumerable=pe.enumerable||!1,pe.configurable=!0,"value"in pe&&(pe.writable=!0),Object.defineProperty(Me,pe.key,pe)}}function $(Me,De,Oe){return De&&re(Me.prototype,De),Oe&&re(Me,Oe),Me}function U(Me,De){if(!Me)return;if(typeof Me=="string")return S(Me,De);var Oe=Object.prototype.toString.call(Me).slice(8,-1);if(Oe==="Object"&&Me.constructor&&(Oe=Me.constructor.name),Oe==="Map"||Oe==="Set")return Array.from(Me);if(Oe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Oe))return S(Me,De)}function S(Me,De){(De==null||De>Me.length)&&(De=Me.length);for(var Oe=0,pe=new Array(De);Oe<De;Oe++)pe[Oe]=Me[Oe];return pe}function P(Me,De){var Oe;if(typeof Symbol=="undefined"||Me[Symbol.iterator]==null){if(Array.isArray(Me)||(Oe=U(Me))||De&&Me&&typeof Me.length=="number"){Oe&&(Me=Oe);var pe=0;return function(){return pe>=Me.length?{done:!0}:{done:!1,value:Me[pe++]}}}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=Me[Symbol.iterator](),Oe.next.bind(Oe)}function E(Me,De){return De={exports:{}},Me(De,De.exports),De.exports}var C=E(function(Me){function De(){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(pe){Me.exports.defaults=pe}Me.exports={defaults:De(),getDefaults:De,changeDefaults:Oe}}),w=C.defaults,u=C.getDefaults,p=C.changeDefaults,f=/[&<>"']/,o=/[&<>"']/g,a=/[<>"']|&(?!#?\w+;)/,c=/[<>"']|&(?!#?\w+;)/g,s={"&":"&","<":"<",">":">",'"':""","'":"'"},d=function(De){return s[De]};function i(Me,De){if(De){if(f.test(Me))return Me.replace(o,d)}else if(a.test(Me))return Me.replace(c,d);return Me}var t=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function n(Me){return Me.replace(t,function(De,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 h=/(^|[^\[])\^/g;function v(Me,De){Me=Me.source||Me,De=De||"";var Oe={replace:function(be,Ce){return Ce=Ce.source||Ce,Ce=Ce.replace(h,"$1"),Me=Me.replace(be,Ce),Oe},getRegex:function(){return new RegExp(Me,De)}};return Oe}var b=/[^\w:]/g,y=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function _(Me,De,Oe){if(Me){var pe;try{pe=decodeURIComponent(n(Oe)).replace(b,"").toLowerCase()}catch(be){return null}if(pe.indexOf("javascript:")===0||pe.indexOf("vbscript:")===0||pe.indexOf("data:")===0)return null}De&&!y.test(Oe)&&(Oe=T(De,Oe));try{Oe=encodeURI(Oe).replace(/%25/g,"%")}catch(be){return null}return Oe}var m={},g=/^[^:]+:\/*[^/]*$/,x=/^([^:]+:)[\s\S]*$/,l=/^([^:]+:\/*[^/]*)[\s\S]*$/;function T(Me,De){m[" "+Me]||(g.test(Me)?m[" "+Me]=Me+"/":m[" "+Me]=I(Me,"/",!0)),Me=m[" "+Me];var Oe=Me.indexOf(":")===-1;return De.substring(0,2)==="//"?Oe?De:Me.replace(x,"$1")+De:De.charAt(0)==="/"?Oe?De:Me.replace(l,"$1")+De:Me+De}var A={exec:function(){}};function O(Me){for(var De=1,Oe,pe;De<arguments.length;De++){Oe=arguments[De];for(pe in Oe)Object.prototype.hasOwnProperty.call(Oe,pe)&&(Me[pe]=Oe[pe])}return Me}function D(Me,De){var Oe=Me.replace(/\|/g,function(Ce,we,$e){for(var it=!1,dt=we;--dt>=0&&$e[dt]==="\\";)it=!it;return it?"|":" |"}),pe=Oe.split(/ \|/),be=0;if(pe.length>De)pe.splice(De);else for(;pe.length<De;)pe.push("");for(;be<pe.length;be++)pe[be]=pe[be].trim().replace(/\\\|/g,"|");return pe}function I(Me,De,Oe){var pe=Me.length;if(pe===0)return"";for(var be=0;be<pe;){var Ce=Me.charAt(pe-be-1);if(Ce===De&&!Oe)be++;else if(Ce!==De&&Oe)be++;else break}return Me.substr(0,pe-be)}function j(Me,De){if(Me.indexOf(De[1])===-1)return-1;for(var Oe=Me.length,pe=0,be=0;be<Oe;be++)if(Me[be]==="\\")be++;else if(Me[be]===De[0])pe++;else if(Me[be]===De[1]&&(pe--,pe<0))return be;return-1}function B(Me){Me&&Me.sanitize&&!Me.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 ee={escape:i,unescape:n,edit:v,cleanUrl:_,resolveUrl:T,noopTest:A,merge:O,splitCells:D,rtrim:I,findClosingBracket:j,checkSanitizeDeprecation:B},F=C.defaults,G=ee.rtrim,X=ee.splitCells,Z=ee.escape,K=ee.findClosingBracket;function q(Me,De,Oe){var pe=De.href,be=De.title?Z(De.title):null,Ce=Me[1].replace(/\\([\[\]])/g,"$1");return Me[0].charAt(0)!=="!"?{type:"link",raw:Oe,href:pe,title:be,text:Ce}:{type:"image",raw:Oe,href:pe,title:be,text:Z(Ce)}}function ae(Me,De){var Oe=Me.match(/^(\s+)(?:```)/);if(Oe===null)return De;var pe=Oe[1];return De.split(`
|
|
|
`).map(function(be){var Ce=be.match(/^\s+/);if(Ce===null)return be;var we=Ce[0];return we.length>=pe.length?be.slice(pe.length):be}).join(`
|
|
|
`)}var oe=function(){function Me(Oe){this.options=Oe||F}var De=Me.prototype;return De.space=function(pe){var be=this.rules.block.newline.exec(pe);if(be)return be[0].length>1?{type:"space",raw:be[0]}:{raw:`
|
|
|
`}},De.code=function(pe,be){var Ce=this.rules.block.code.exec(pe);if(Ce){var we=be[be.length-1];if(we&&we.type==="paragraph")return{raw:Ce[0],text:Ce[0].trimRight()};var $e=Ce[0].replace(/^ {4}/gm,"");return{type:"code",raw:Ce[0],codeBlockStyle:"indented",text:this.options.pedantic?$e:G($e,`
|
|
|
`)}}},De.fences=function(pe){var be=this.rules.block.fences.exec(pe);if(be){var Ce=be[0],we=ae(Ce,be[3]||"");return{type:"code",raw:Ce,lang:be[2]?be[2].trim():be[2],text:we}}},De.heading=function(pe){var be=this.rules.block.heading.exec(pe);if(be)return{type:"heading",raw:be[0],depth:be[1].length,text:be[2]}},De.nptable=function(pe){var be=this.rules.block.nptable.exec(pe);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 we=Ce.align.length,$e;for($e=0;$e<we;$e++)/^ *-+: *$/.test(Ce.align[$e])?Ce.align[$e]="right":/^ *:-+: *$/.test(Ce.align[$e])?Ce.align[$e]="center":/^ *:-+ *$/.test(Ce.align[$e])?Ce.align[$e]="left":Ce.align[$e]=null;for(we=Ce.cells.length,$e=0;$e<we;$e++)Ce.cells[$e]=X(Ce.cells[$e],Ce.header.length);return Ce}}},De.hr=function(pe){var be=this.rules.block.hr.exec(pe);if(be)return{type:"hr",raw:be[0]}},De.blockquote=function(pe){var be=this.rules.block.blockquote.exec(pe);if(be){var Ce=be[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:be[0],text:Ce}}},De.list=function(pe){var be=this.rules.block.list.exec(pe);if(be){for(var Ce=be[0],we=be[2],$e=we.length>1,it=we[we.length-1]===")",dt={type:"list",raw:Ce,ordered:$e,start:$e?+we.slice(0,-1):"",loose:!1,items:[]},Et=be[0].match(this.rules.block.item),Dt=!1,ot,xt,nt,ct,Je,Ee,Ue,ft=Et.length,Qe=0;Qe<ft;Qe++)ot=Et[Qe],Ce=ot,xt=ot.length,ot=ot.replace(/^ *([*+-]|\d+[.)]) */,""),~ot.indexOf(`
|
|
|
`)&&(xt-=ot.length,ot=this.options.pedantic?ot.replace(/^ {1,4}/gm,""):ot.replace(new RegExp("^ {1,"+xt+"}","gm"),"")),Qe!==ft-1&&(nt=this.rules.block.bullet.exec(Et[Qe+1])[0],($e?nt.length===1||!it&&nt[nt.length-1]===")":nt.length>1||this.options.smartLists&&nt!==we)&&(ct=Et.slice(Qe+1).join(`
|
|
|
`),dt.raw=dt.raw.substring(0,dt.raw.length-ct.length),Qe=ft-1)),Je=Dt||/\n\n(?!\s*$)/.test(ot),Qe!==ft-1&&(Dt=ot.charAt(ot.length-1)===`
|
|
|
`,Je||(Je=Dt)),Je&&(dt.loose=!0),Ee=/^\[[ xX]\] /.test(ot),Ue=void 0,Ee&&(Ue=ot[1]!==" ",ot=ot.replace(/^\[[ xX]\] +/,"")),dt.items.push({type:"list_item",raw:Ce,task:Ee,checked:Ue,loose:Je,text:ot});return dt}},De.html=function(pe){var be=this.rules.block.html.exec(pe);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]}},De.def=function(pe){var be=this.rules.block.def.exec(pe);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]}}},De.table=function(pe){var be=this.rules.block.table.exec(pe);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 we=Ce.align.length,$e;for($e=0;$e<we;$e++)/^ *-+: *$/.test(Ce.align[$e])?Ce.align[$e]="right":/^ *:-+: *$/.test(Ce.align[$e])?Ce.align[$e]="center":/^ *:-+ *$/.test(Ce.align[$e])?Ce.align[$e]="left":Ce.align[$e]=null;for(we=Ce.cells.length,$e=0;$e<we;$e++)Ce.cells[$e]=X(Ce.cells[$e].replace(/^ *\| *| *\| *$/g,""),Ce.header.length);return Ce}}},De.lheading=function(pe){var be=this.rules.block.lheading.exec(pe);if(be)return{type:"heading",raw:be[0],depth:be[2].charAt(0)==="="?1:2,text:be[1]}},De.paragraph=function(pe){var be=this.rules.block.paragraph.exec(pe);if(be)return{type:"paragraph",raw:be[0],text:be[1].charAt(be[1].length-1)===`
|
|
|
`?be[1].slice(0,-1):be[1]}},De.text=function(pe,be){var Ce=this.rules.block.text.exec(pe);if(Ce){var we=be[be.length-1];return we&&we.type==="text"?{raw:Ce[0],text:Ce[0]}:{type:"text",raw:Ce[0],text:Ce[0]}}},De.escape=function(pe){var be=this.rules.inline.escape.exec(pe);if(be)return{type:"escape",raw:be[0],text:Z(be[1])}},De.tag=function(pe,be,Ce){var we=this.rules.inline.tag.exec(pe);if(we)return!be&&/^<a /i.test(we[0])?be=!0:be&&/^<\/a>/i.test(we[0])&&(be=!1),!Ce&&/^<(pre|code|kbd|script)(\s|>)/i.test(we[0])?Ce=!0:Ce&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(we[0])&&(Ce=!1),{type:this.options.sanitize?"text":"html",raw:we[0],inLink:be,inRawBlock:Ce,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(we[0]):Z(we[0]):we[0]}},De.link=function(pe){var be=this.rules.inline.link.exec(pe);if(be){var Ce=K(be[2],"()");if(Ce>-1){var we=be[0].indexOf("!")===0?5:4,$e=we+be[1].length+Ce;be[2]=be[2].substring(0,Ce),be[0]=be[0].substring(0,$e).trim(),be[3]=""}var it=be[2],dt="";if(this.options.pedantic){var Et=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(it);Et?(it=Et[1],dt=Et[3]):dt=""}else dt=be[3]?be[3].slice(1,-1):"";it=it.trim().replace(/^<([\s\S]*)>$/,"$1");var Dt=q(be,{href:it&&it.replace(this.rules.inline._escapes,"$1"),title:dt&&dt.replace(this.rules.inline._escapes,"$1")},be[0]);return Dt}},De.reflink=function(pe,be){var Ce;if((Ce=this.rules.inline.reflink.exec(pe))||(Ce=this.rules.inline.nolink.exec(pe))){var we=(Ce[2]||Ce[1]).replace(/\s+/g," ");if(we=be[we.toLowerCase()],!we||!we.href){var $e=Ce[0].charAt(0);return{type:"text",raw:$e,text:$e}}var it=q(Ce,we,Ce[0]);return it}},De.strong=function(pe,be,Ce){Ce===void 0&&(Ce="");var we=this.rules.inline.strong.start.exec(pe);if(we&&(!we[1]||we[1]&&(Ce===""||this.rules.inline.punctuation.exec(Ce)))){be=be.slice(-1*pe.length);var $e=we[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;$e.lastIndex=0;for(var it;(we=$e.exec(be))!=null;)if(it=this.rules.inline.strong.middle.exec(be.slice(0,we.index+3)),it)return{type:"strong",raw:pe.slice(0,it[0].length),text:pe.slice(2,it[0].length-2)}}},De.em=function(pe,be,Ce){Ce===void 0&&(Ce="");var we=this.rules.inline.em.start.exec(pe);if(we&&(!we[1]||we[1]&&(Ce===""||this.rules.inline.punctuation.exec(Ce)))){be=be.slice(-1*pe.length);var $e=we[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;$e.lastIndex=0;for(var it;(we=$e.exec(be))!=null;)if(it=this.rules.inline.em.middle.exec(be.slice(0,we.index+2)),it)return{type:"em",raw:pe.slice(0,it[0].length),text:pe.slice(1,it[0].length-1)}}},De.codespan=function(pe){var be=this.rules.inline.code.exec(pe);if(be){var Ce=be[2].replace(/\n/g," "),we=/[^ ]/.test(Ce),$e=Ce.startsWith(" ")&&Ce.endsWith(" ");return we&&$e&&(Ce=Ce.substring(1,Ce.length-1)),Ce=Z(Ce,!0),{type:"codespan",raw:be[0],text:Ce}}},De.br=function(pe){var be=this.rules.inline.br.exec(pe);if(be)return{type:"br",raw:be[0]}},De.del=function(pe){var be=this.rules.inline.del.exec(pe);if(be)return{type:"del",raw:be[0],text:be[1]}},De.autolink=function(pe,be){var Ce=this.rules.inline.autolink.exec(pe);if(Ce){var we,$e;return Ce[2]==="@"?(we=Z(this.options.mangle?be(Ce[1]):Ce[1]),$e="mailto:"+we):(we=Z(Ce[1]),$e=we),{type:"link",raw:Ce[0],text:we,href:$e,tokens:[{type:"text",raw:we,text:we}]}}},De.url=function(pe,be){var Ce;if(Ce=this.rules.inline.url.exec(pe)){var we,$e;if(Ce[2]==="@")we=Z(this.options.mangle?be(Ce[0]):Ce[0]),$e="mailto:"+we;else{var it;do it=Ce[0],Ce[0]=this.rules.inline._backpedal.exec(Ce[0])[0];while(it!==Ce[0]);we=Z(Ce[0]),Ce[1]==="www."?$e="http://"+we:$e=we}return{type:"link",raw:Ce[0],text:we,href:$e,tokens:[{type:"text",raw:we,text:we}]}}},De.inlineText=function(pe,be,Ce){var we=this.rules.inline.text.exec(pe);if(we){var $e;return be?$e=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(we[0]):Z(we[0]):we[0]:$e=Z(this.options.smartypants?Ce(we[0]):we[0]),{type:"text",raw:we[0],text:$e}}},Me}(),ve=ee.noopTest,he=ee.edit,_e=ee.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:ve,table:ve,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=he(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=he(fe.item,"gm").replace(/bull/g,fe.bullet).getRegex(),fe.list=he(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=he(fe.html,"i").replace("comment",fe._comment).replace("tag",fe._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),fe.paragraph=he(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=he(fe.blockquote).replace("paragraph",fe.paragraph).getRegex(),fe.normal=_e({},fe),fe.gfm=_e({},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=he(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=he(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=_e({},fe.normal,{html:he(`^ *(?: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:ve,paragraph:he(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 xe={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ve,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:ve,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};xe._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",xe.punctuation=he(xe.punctuation).replace(/punctuation/g,xe._punctuation).getRegex(),xe._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",xe._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",xe.em.start=he(xe.em.start).replace(/punctuation/g,xe._punctuation).getRegex(),xe.em.middle=he(xe.em.middle).replace(/punctuation/g,xe._punctuation).replace(/overlapSkip/g,xe._overlapSkip).getRegex(),xe.em.endAst=he(xe.em.endAst,"g").replace(/punctuation/g,xe._punctuation).getRegex(),xe.em.endUnd=he(xe.em.endUnd,"g").replace(/punctuation/g,xe._punctuation).getRegex(),xe.strong.start=he(xe.strong.start).replace(/punctuation/g,xe._punctuation).getRegex(),xe.strong.middle=he(xe.strong.middle).replace(/punctuation/g,xe._punctuation).replace(/blockSkip/g,xe._blockSkip).getRegex(),xe.strong.endAst=he(xe.strong.endAst,"g").replace(/punctuation/g,xe._punctuation).getRegex(),xe.strong.endUnd=he(xe.strong.endUnd,"g").replace(/punctuation/g,xe._punctuation).getRegex(),xe.blockSkip=he(xe._blockSkip,"g").getRegex(),xe.overlapSkip=he(xe._overlapSkip,"g").getRegex(),xe._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,xe._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,xe._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])?)+(?![-_])/,xe.autolink=he(xe.autolink).replace("scheme",xe._scheme).replace("email",xe._email).getRegex(),xe._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,xe.tag=he(xe.tag).replace("comment",fe._comment).replace("attribute",xe._attribute).getRegex(),xe._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,xe._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,xe._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,xe.link=he(xe.link).replace("label",xe._label).replace("href",xe._href).replace("title",xe._title).getRegex(),xe.reflink=he(xe.reflink).replace("label",xe._label).getRegex(),xe.reflinkSearch=he(xe.reflinkSearch,"g").replace("reflink",xe.reflink).replace("nolink",xe.nolink).getRegex(),xe.normal=_e({},xe),xe.pedantic=_e({},xe.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:he(/^!?\[(label)\]\((.*?)\)/).replace("label",xe._label).getRegex(),reflink:he(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",xe._label).getRegex()}),xe.gfm=_e({},xe.normal,{escape:he(xe.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),xe.gfm.url=he(xe.gfm.url,"i").replace("email",xe.gfm._extended_email).getRegex(),xe.breaks=_e({},xe.gfm,{br:he(xe.br).replace("{2,}","*").getRegex(),text:he(xe.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var je={block:fe,inline:xe},Le=C.defaults,ke=je.block,Fe=je.inline;function ge(Me){return Me.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(Me){var De="",Oe,pe,be=Me.length;for(Oe=0;Oe<be;Oe++)pe=Me.charCodeAt(Oe),Math.random()>.5&&(pe="x"+pe.toString(16)),De+="&#"+pe+";";return De}var Ie=function(){function Me(Oe){this.tokens=[],this.tokens.links=Object.create(null),this.options=Oe||Le,this.options.tokenizer=this.options.tokenizer||new oe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var pe={block:ke.normal,inline:Fe.normal};this.options.pedantic?(pe.block=ke.pedantic,pe.inline=Fe.pedantic):this.options.gfm&&(pe.block=ke.gfm,this.options.breaks?pe.inline=Fe.breaks:pe.inline=Fe.gfm),this.tokenizer.rules=pe}Me.lex=function(pe,be){var Ce=new Me(be);return Ce.lex(pe)};var De=Me.prototype;return De.lex=function(pe){return pe=pe.replace(/\r\n|\r/g,`
|
|
|
`).replace(/\t/g," "),this.blockTokens(pe,this.tokens,!0),this.inline(this.tokens),this.tokens},De.blockTokens=function(pe,be,Ce){be===void 0&&(be=[]),Ce===void 0&&(Ce=!0),pe=pe.replace(/^ +$/gm,"");for(var we,$e,it,dt;pe;){if(we=this.tokenizer.space(pe)){pe=pe.substring(we.raw.length),we.type&&be.push(we);continue}if(we=this.tokenizer.code(pe,be)){pe=pe.substring(we.raw.length),we.type?be.push(we):(dt=be[be.length-1],dt.raw+=`
|
|
|
`+we.raw,dt.text+=`
|
|
|
`+we.text);continue}if(we=this.tokenizer.fences(pe)){pe=pe.substring(we.raw.length),be.push(we);continue}if(we=this.tokenizer.heading(pe)){pe=pe.substring(we.raw.length),be.push(we);continue}if(we=this.tokenizer.nptable(pe)){pe=pe.substring(we.raw.length),be.push(we);continue}if(we=this.tokenizer.hr(pe)){pe=pe.substring(we.raw.length),be.push(we);continue}if(we=this.tokenizer.blockquote(pe)){pe=pe.substring(we.raw.length),we.tokens=this.blockTokens(we.text,[],Ce),be.push(we);continue}if(we=this.tokenizer.list(pe)){for(pe=pe.substring(we.raw.length),it=we.items.length,$e=0;$e<it;$e++)we.items[$e].tokens=this.blockTokens(we.items[$e].text,[],!1);be.push(we);continue}if(we=this.tokenizer.html(pe)){pe=pe.substring(we.raw.length),be.push(we);continue}if(Ce&&(we=this.tokenizer.def(pe))){pe=pe.substring(we.raw.length),this.tokens.links[we.tag]||(this.tokens.links[we.tag]={href:we.href,title:we.title});continue}if(we=this.tokenizer.table(pe)){pe=pe.substring(we.raw.length),be.push(we);continue}if(we=this.tokenizer.lheading(pe)){pe=pe.substring(we.raw.length),be.push(we);continue}if(Ce&&(we=this.tokenizer.paragraph(pe))){pe=pe.substring(we.raw.length),be.push(we);continue}if(we=this.tokenizer.text(pe,be)){pe=pe.substring(we.raw.length),we.type?be.push(we):(dt=be[be.length-1],dt.raw+=`
|
|
|
`+we.raw,dt.text+=`
|
|
|
`+we.text);continue}if(pe){var Et="Infinite loop on byte: "+pe.charCodeAt(0);if(this.options.silent){console.error(Et);break}else throw new Error(Et)}}return be},De.inline=function(pe){var be,Ce,we,$e,it,dt,Et=pe.length;for(be=0;be<Et;be++){dt=pe[be];switch(dt.type){case"paragraph":case"text":case"heading":{dt.tokens=[],this.inlineTokens(dt.text,dt.tokens);break}case"table":{for(dt.tokens={header:[],cells:[]},$e=dt.header.length,Ce=0;Ce<$e;Ce++)dt.tokens.header[Ce]=[],this.inlineTokens(dt.header[Ce],dt.tokens.header[Ce]);for($e=dt.cells.length,Ce=0;Ce<$e;Ce++)for(it=dt.cells[Ce],dt.tokens.cells[Ce]=[],we=0;we<it.length;we++)dt.tokens.cells[Ce][we]=[],this.inlineTokens(it[we],dt.tokens.cells[Ce][we]);break}case"blockquote":{this.inline(dt.tokens);break}case"list":{for($e=dt.items.length,Ce=0;Ce<$e;Ce++)this.inline(dt.items[Ce].tokens);break}}}return pe},De.inlineTokens=function(pe,be,Ce,we,$e){be===void 0&&(be=[]),Ce===void 0&&(Ce=!1),we===void 0&&(we=!1),$e===void 0&&($e="");var it,dt=pe,Et;if(this.tokens.links){var Dt=Object.keys(this.tokens.links);if(Dt.length>0)for(;(Et=this.tokenizer.rules.inline.reflinkSearch.exec(dt))!=null;)Dt.includes(Et[0].slice(Et[0].lastIndexOf("[")+1,-1))&&(dt=dt.slice(0,Et.index)+"["+"a".repeat(Et[0].length-2)+"]"+dt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Et=this.tokenizer.rules.inline.blockSkip.exec(dt))!=null;)dt=dt.slice(0,Et.index)+"["+"a".repeat(Et[0].length-2)+"]"+dt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;pe;){if(it=this.tokenizer.escape(pe)){pe=pe.substring(it.raw.length),be.push(it);continue}if(it=this.tokenizer.tag(pe,Ce,we)){pe=pe.substring(it.raw.length),Ce=it.inLink,we=it.inRawBlock,be.push(it);continue}if(it=this.tokenizer.link(pe)){pe=pe.substring(it.raw.length),it.type==="link"&&(it.tokens=this.inlineTokens(it.text,[],!0,we)),be.push(it);continue}if(it=this.tokenizer.reflink(pe,this.tokens.links)){pe=pe.substring(it.raw.length),it.type==="link"&&(it.tokens=this.inlineTokens(it.text,[],!0,we)),be.push(it);continue}if(it=this.tokenizer.strong(pe,dt,$e)){pe=pe.substring(it.raw.length),it.tokens=this.inlineTokens(it.text,[],Ce,we),be.push(it);continue}if(it=this.tokenizer.em(pe,dt,$e)){pe=pe.substring(it.raw.length),it.tokens=this.inlineTokens(it.text,[],Ce,we),be.push(it);continue}if(it=this.tokenizer.codespan(pe)){pe=pe.substring(it.raw.length),be.push(it);continue}if(it=this.tokenizer.br(pe)){pe=pe.substring(it.raw.length),be.push(it);continue}if(it=this.tokenizer.del(pe)){pe=pe.substring(it.raw.length),it.tokens=this.inlineTokens(it.text,[],Ce,we),be.push(it);continue}if(it=this.tokenizer.autolink(pe,ce)){pe=pe.substring(it.raw.length),be.push(it);continue}if(!Ce&&(it=this.tokenizer.url(pe,ce))){pe=pe.substring(it.raw.length),be.push(it);continue}if(it=this.tokenizer.inlineText(pe,we,ge)){pe=pe.substring(it.raw.length),$e=it.raw.slice(-1),be.push(it);continue}if(pe){var ot="Infinite loop on byte: "+pe.charCodeAt(0);if(this.options.silent){console.error(ot);break}else throw new Error(ot)}}return be},$(Me,null,[{key:"rules",get:function(){return{block:ke,inline:Fe}}}]),Me}(),Ne=C.defaults,Xe=ee.cleanUrl,te=ee.escape,k=function(){function Me(Oe){this.options=Oe||Ne}var De=Me.prototype;return De.code=function(pe,be,Ce){var we=(be||"").match(/\S*/)[0];if(this.options.highlight){var $e=this.options.highlight(pe,we);$e!=null&&$e!==pe&&(Ce=!0,pe=$e)}return we?'<pre><code class="'+this.options.langPrefix+te(we,!0)+'">'+(Ce?pe:te(pe,!0))+`</code></pre>
|
|
|
`:"<pre><code>"+(Ce?pe:te(pe,!0))+`</code></pre>
|
|
|
`},De.blockquote=function(pe){return`<blockquote>
|
|
|
`+pe+`</blockquote>
|
|
|
`},De.html=function(pe){return pe},De.heading=function(pe,be,Ce,we){return this.options.headerIds?"<h"+be+' id="'+this.options.headerPrefix+we.slug(Ce)+'">'+pe+"</h"+be+`>
|
|
|
`:"<h"+be+">"+pe+"</h"+be+`>
|
|
|
`},De.hr=function(){return this.options.xhtml?`<hr/>
|
|
|
`:`<hr>
|
|
|
`},De.list=function(pe,be,Ce){var we=be?"ol":"ul",$e=be&&Ce!==1?' start="'+Ce+'"':"";return"<"+we+$e+`>
|
|
|
`+pe+"</"+we+`>
|
|
|
`},De.listitem=function(pe){return"<li>"+pe+`</li>
|
|
|
`},De.checkbox=function(pe){return"<input "+(pe?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},De.paragraph=function(pe){return"<p>"+pe+`</p>
|
|
|
`},De.table=function(pe,be){return be&&(be="<tbody>"+be+"</tbody>"),`<table>
|
|
|
<thead>
|
|
|
`+pe+`</thead>
|
|
|
`+be+`</table>
|
|
|
`},De.tablerow=function(pe){return`<tr>
|
|
|
`+pe+`</tr>
|
|
|
`},De.tablecell=function(pe,be){var Ce=be.header?"th":"td",we=be.align?"<"+Ce+' align="'+be.align+'">':"<"+Ce+">";return we+pe+"</"+Ce+`>
|
|
|
`},De.strong=function(pe){return"<strong>"+pe+"</strong>"},De.em=function(pe){return"<em>"+pe+"</em>"},De.codespan=function(pe){return"<code>"+pe+"</code>"},De.br=function(){return this.options.xhtml?"<br/>":"<br>"},De.del=function(pe){return"<del>"+pe+"</del>"},De.link=function(pe,be,Ce){if(pe=Xe(this.options.sanitize,this.options.baseUrl,pe),pe===null)return Ce;var we='<a href="'+te(pe)+'"';return be&&(we+=' title="'+be+'"'),we+=">"+Ce+"</a>",we},De.image=function(pe,be,Ce){if(pe=Xe(this.options.sanitize,this.options.baseUrl,pe),pe===null)return Ce;var we='<img src="'+pe+'" alt="'+Ce+'"';return be&&(we+=' title="'+be+'"'),we+=this.options.xhtml?"/>":">",we},De.text=function(pe){return pe},Me}(),N=function(){function Me(){}var De=Me.prototype;return De.strong=function(pe){return pe},De.em=function(pe){return pe},De.codespan=function(pe){return pe},De.del=function(pe){return pe},De.html=function(pe){return pe},De.text=function(pe){return pe},De.link=function(pe,be,Ce){return""+Ce},De.image=function(pe,be,Ce){return""+Ce},De.br=function(){return""},Me}(),J=function(){function Me(){this.seen={}}var De=Me.prototype;return De.slug=function(pe){var be=pe.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},Me}(),V=C.defaults,Y=ee.unescape,me=function(){function Me(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 J}Me.parse=function(pe,be){var Ce=new Me(be);return Ce.parse(pe)};var De=Me.prototype;return De.parse=function(pe,be){be===void 0&&(be=!0);var Ce="",we,$e,it,dt,Et,Dt,ot,xt,nt,ct,Je,Ee,Ue,ft,Qe,Ot,wt,lt,yt=pe.length;for(we=0;we<yt;we++){ct=pe[we];switch(ct.type){case"space":continue;case"hr":{Ce+=this.renderer.hr();continue}case"heading":{Ce+=this.renderer.heading(this.parseInline(ct.tokens),ct.depth,Y(this.parseInline(ct.tokens,this.textRenderer)),this.slugger);continue}case"code":{Ce+=this.renderer.code(ct.text,ct.lang,ct.escaped);continue}case"table":{for(xt="",ot="",dt=ct.header.length,$e=0;$e<dt;$e++)ot+=this.renderer.tablecell(this.parseInline(ct.tokens.header[$e]),{header:!0,align:ct.align[$e]});for(xt+=this.renderer.tablerow(ot),nt="",dt=ct.cells.length,$e=0;$e<dt;$e++){for(Dt=ct.tokens.cells[$e],ot="",Et=Dt.length,it=0;it<Et;it++)ot+=this.renderer.tablecell(this.parseInline(Dt[it]),{header:!1,align:ct.align[it]});nt+=this.renderer.tablerow(ot)}Ce+=this.renderer.table(xt,nt);continue}case"blockquote":{nt=this.parse(ct.tokens),Ce+=this.renderer.blockquote(nt);continue}case"list":{for(Je=ct.ordered,Ee=ct.start,Ue=ct.loose,dt=ct.items.length,nt="",$e=0;$e<dt;$e++)Qe=ct.items[$e],Ot=Qe.checked,wt=Qe.task,ft="",Qe.task&&(lt=this.renderer.checkbox(Ot),Ue?Qe.tokens.length>0&&Qe.tokens[0].type==="text"?(Qe.tokens[0].text=lt+" "+Qe.tokens[0].text,Qe.tokens[0].tokens&&Qe.tokens[0].tokens.length>0&&Qe.tokens[0].tokens[0].type==="text"&&(Qe.tokens[0].tokens[0].text=lt+" "+Qe.tokens[0].tokens[0].text)):Qe.tokens.unshift({type:"text",text:lt}):ft+=lt),ft+=this.parse(Qe.tokens,Ue),nt+=this.renderer.listitem(ft,wt,Ot);Ce+=this.renderer.list(nt,Je,Ee);continue}case"html":{Ce+=this.renderer.html(ct.text);continue}case"paragraph":{Ce+=this.renderer.paragraph(this.parseInline(ct.tokens));continue}case"text":{for(nt=ct.tokens?this.parseInline(ct.tokens):ct.text;we+1<yt&&pe[we+1].type==="text";)ct=pe[++we],nt+=`
|
|
|
`+(ct.tokens?this.parseInline(ct.tokens):ct.text);Ce+=be?this.renderer.paragraph(nt):nt;continue}default:{var Nt='Token with "'+ct.type+'" type was not found.';if(this.options.silent){console.error(Nt);return}else throw new Error(Nt)}}}return Ce},De.parseInline=function(pe,be){be=be||this.renderer;var Ce="",we,$e,it=pe.length;for(we=0;we<it;we++){$e=pe[we];switch($e.type){case"escape":{Ce+=be.text($e.text);break}case"html":{Ce+=be.html($e.text);break}case"link":{Ce+=be.link($e.href,$e.title,this.parseInline($e.tokens,be));break}case"image":{Ce+=be.image($e.href,$e.title,$e.text);break}case"strong":{Ce+=be.strong(this.parseInline($e.tokens,be));break}case"em":{Ce+=be.em(this.parseInline($e.tokens,be));break}case"codespan":{Ce+=be.codespan($e.text);break}case"br":{Ce+=be.br();break}case"del":{Ce+=be.del(this.parseInline($e.tokens,be));break}case"text":{Ce+=be.text($e.text);break}default:{var dt='Token with "'+$e.type+'" type was not found.';if(this.options.silent){console.error(dt);return}else throw new Error(dt)}}}return Ce},Me}(),Ae=ee.merge,at=ee.checkSanitizeDeprecation,Re=ee.escape,Pe=C.getDefaults,Ye=C.changeDefaults,Ze=C.defaults;function ze(Me,De,Oe){if(typeof Me=="undefined"||Me===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Me!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Me)+", string expected");if(typeof De=="function"&&(Oe=De,De=null),De=Ae({},ze.defaults,De||{}),at(De),Oe){var pe=De.highlight,be;try{be=Ie.lex(Me,De)}catch(it){return Oe(it)}var Ce=function(dt){var Et;if(!dt)try{Et=me.parse(be,De)}catch(Dt){dt=Dt}return De.highlight=pe,dt?Oe(dt):Oe(null,Et)};if(!pe||pe.length<3)return Ce();if(delete De.highlight,!be.length)return Ce();var we=0;ze.walkTokens(be,function(it){it.type==="code"&&(we++,setTimeout(function(){pe(it.text,it.lang,function(dt,Et){if(dt)return Ce(dt);Et!=null&&Et!==it.text&&(it.text=Et,it.escaped=!0),we--,we===0&&Ce()})},0))}),we===0&&Ce();return}try{var $e=Ie.lex(Me,De);return De.walkTokens&&ze.walkTokens($e,De.walkTokens),me.parse($e,De)}catch(it){if(it.message+=`
|
|
|
Please report this to https://github.com/markedjs/marked.`,De.silent)return"<p>An error occurred:</p><pre>"+Re(it.message+"",!0)+"</pre>";throw it}}ze.options=ze.setOptions=function(Me){return Ae(ze.defaults,Me),Ye(ze.defaults),ze},ze.getDefaults=Pe,ze.defaults=Ze,ze.use=function(Me){var De=Ae({},Me);if(Me.renderer&&function(){var pe=ze.defaults.renderer||new k,be=function($e){var it=pe[$e];pe[$e]=function(){for(var dt=arguments.length,Et=new Array(dt),Dt=0;Dt<dt;Dt++)Et[Dt]=arguments[Dt];var ot=Me.renderer[$e].apply(pe,Et);return ot===!1&&(ot=it.apply(pe,Et)),ot}};for(var Ce in Me.renderer)be(Ce);De.renderer=pe}(),Me.tokenizer&&function(){var pe=ze.defaults.tokenizer||new oe,be=function($e){var it=pe[$e];pe[$e]=function(){for(var dt=arguments.length,Et=new Array(dt),Dt=0;Dt<dt;Dt++)Et[Dt]=arguments[Dt];var ot=Me.tokenizer[$e].apply(pe,Et);return ot===!1&&(ot=it.apply(pe,Et)),ot}};for(var Ce in Me.tokenizer)be(Ce);De.tokenizer=pe}(),Me.walkTokens){var Oe=ze.defaults.walkTokens;De.walkTokens=function(pe){Me.walkTokens(pe),Oe&&Oe(pe)}}ze.setOptions(De)},ze.walkTokens=function(Me,De){for(var Oe=P(Me),pe;!(pe=Oe()).done;){var be=pe.value;De(be);switch(be.type){case"table":{for(var Ce=P(be.tokens.header),we;!(we=Ce()).done;){var $e=we.value;ze.walkTokens($e,De)}for(var it=P(be.tokens.cells),dt;!(dt=it()).done;)for(var Et=dt.value,Dt=P(Et),ot;!(ot=Dt()).done;){var xt=ot.value;ze.walkTokens(xt,De)}break}case"list":{ze.walkTokens(be.items,De);break}default:be.tokens&&ze.walkTokens(be.tokens,De)}}},ze.Parser=me,ze.parser=me.parse,ze.Renderer=k,ze.TextRenderer=N,ze.Lexer=Ie,ze.lexer=Ie.lex,ze.Tokenizer=oe,ze.Slugger=J,ze.parse=ze;var We=ze;return We})},"DlR+":function(Ve,Be,W){var re=W("MFOe"),$=re.Global,U=re.trim;Ve.exports={name:"cookieStorage",read:P,write:C,each:E,remove:w,clearAll:u};var S=$.document;function P(f){if(!f||!p(f))return null;var o="(?:^|.*;\\s*)"+escape(f).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(S.cookie.replace(new RegExp(o),"$1"))}function E(f){for(var o=S.cookie.split(/; ?/g),a=o.length-1;a>=0;a--){if(!U(o[a]))continue;var c=o[a].split("="),s=unescape(c[0]),d=unescape(c[1]);f(d,s)}}function C(f,o){if(!f)return;S.cookie=escape(f)+"="+escape(o)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function w(f){if(!f||!p(f))return;S.cookie=escape(f)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function u(){E(function(f,o){w(o)})}function p(f){return new RegExp("(?:^|;\\s*)"+escape(f).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(S.cookie)}},E2g8:function(Ve,Be,W){(function(re,$){/*!
|
|
|
* @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,S){Ve.exports=S()})(this,function(){"use strict";function U(k){var N=typeof k;return k!==null&&(N==="object"||N==="function")}function S(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 E=P,C=0,w=void 0,u=void 0,p=function(N,J){y[C]=N,y[C+1]=J,C+=2,C===2&&(u?u(_):g())};function f(k){u=k}function o(k){p=k}var a=typeof window!="undefined"?window:void 0,c=a||{},s=c.MutationObserver||c.WebKitMutationObserver,d=typeof self=="undefined"&&typeof re!="undefined"&&{}.toString.call(re)==="[object process]",i=typeof Uint8ClampedArray!="undefined"&&typeof importScripts!="undefined"&&typeof MessageChannel!="undefined";function t(){return function(){return re.nextTick(_)}}function n(){return typeof w!="undefined"?function(){w(_)}:b()}function h(){var k=0,N=new s(_),J=document.createTextNode("");return N.observe(J,{characterData:!0}),function(){J.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],J=y[k+1];N(J),y[k]=void 0,y[k+1]=void 0}C=0}function m(){try{var k=Function("return this")().require("vertx");return w=k.runOnLoop||k.runOnContext,n()}catch(N){return b()}}var g=void 0;d?g=t():s?g=h():i?g=v():a===void 0&&!0?g=m():g=b();function x(k,N){var J=this,V=new this.constructor(A);V[T]===void 0&&je(V);var Y=J._state;if(Y){var me=arguments[Y-1];p(function(){return he(Y,V,me,J._result)})}else oe(J,V,k,N);return V}function l(k){var N=this;if(k&&typeof k=="object"&&k.constructor===N)return k;var J=new N(A);return Z(J,k),J}var T=Math.random().toString(36).substring(2);function A(){}var O=void 0,D=1,I=2;function j(){return new TypeError("You cannot resolve a promise with itself")}function B(){return new TypeError("A promises callback cannot return that same promise.")}function ee(k,N,J,V){try{k.call(N,J,V)}catch(Y){return Y}}function F(k,N,J){p(function(V){var Y=!1,me=ee(J,N,function(Ae){if(Y)return;Y=!0,N!==Ae?Z(V,Ae):q(V,Ae)},function(Ae){if(Y)return;Y=!0,ae(V,Ae)},"Settle: "+(V._label||" unknown promise"));!Y&&me&&(Y=!0,ae(V,me))},k)}function G(k,N){N._state===D?q(k,N._result):N._state===I?ae(k,N._result):oe(N,void 0,function(J){return Z(k,J)},function(J){return ae(k,J)})}function X(k,N,J){N.constructor===k.constructor&&J===x&&N.constructor.resolve===l?G(k,N):J===void 0?q(k,N):S(J)?F(k,N,J):q(k,N)}function Z(k,N){if(k===N)ae(k,j());else if(U(N)){var J=void 0;try{J=N.then}catch(V){ae(k,V);return}X(k,N,J)}else q(k,N)}function K(k){k._onerror&&k._onerror(k._result),ve(k)}function q(k,N){if(k._state!==O)return;k._result=N,k._state=D,k._subscribers.length!==0&&p(ve,k)}function ae(k,N){if(k._state!==O)return;k._state=I,k._result=N,p(K,k)}function oe(k,N,J,V){var Y=k._subscribers,me=Y.length;k._onerror=null,Y[me]=N,Y[me+D]=J,Y[me+I]=V,me===0&&k._state&&p(ve,k)}function ve(k){var N=k._subscribers,J=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+J],V?he(J,V,Y,me):Y(me);k._subscribers.length=0}function he(k,N,J,V){var Y=S(J),me=void 0,Ae=void 0,at=!0;if(Y){try{me=J(V)}catch(Re){at=!1,Ae=Re}if(N===me){ae(N,B());return}}else me=V;N._state!==O||(Y&&at?Z(N,me):at===!1?ae(N,Ae):k===D?q(N,me):k===I&&ae(N,me))}function _e(k,N){try{N(function(V){Z(k,V)},function(V){ae(k,V)})}catch(J){ae(k,J)}}var fe=0;function xe(){return fe++}function je(k){k[T]=fe++,k._state=void 0,k._result=void 0,k._subscribers=[]}function Le(){return new Error("Array Methods must be provided an Array")}var ke=function(){function k(N,J){this._instanceConstructor=N,this.promise=new N(A),this.promise[T]||je(this.promise),E(J)?(this.length=J.length,this._remaining=J.length,this._result=new Array(this.length),this.length===0?q(this.promise,this._result):(this.length=this.length||0,this._enumerate(J),this._remaining===0&&q(this.promise,this._result))):ae(this.promise,Le())}return k.prototype._enumerate=function(J){for(var V=0;this._state===O&&V<J.length;V++)this._eachEntry(J[V],V)},k.prototype._eachEntry=function(J,V){var Y=this._instanceConstructor,me=Y.resolve;if(me===l){var Ae=void 0,at=void 0,Re=!1;try{Ae=J.then}catch(Ye){Re=!0,at=Ye}if(Ae===x&&J._state!==O)this._settledAt(J._state,V,J._result);else if(typeof Ae!="function")this._remaining--,this._result[V]=J;else if(Y===Xe){var Pe=new Y(A);Re?ae(Pe,at):X(Pe,J,Ae),this._willSettleAt(Pe,V)}else this._willSettleAt(new Y(function(Ye){return Ye(J)}),V)}else this._willSettleAt(me(J),V)},k.prototype._settledAt=function(J,V,Y){var me=this.promise;me._state===O&&(this._remaining--,J===I?ae(me,Y):this._result[V]=Y),this._remaining===0&&q(me,this._result)},k.prototype._willSettleAt=function(J,V){var Y=this;oe(J,void 0,function(me){return Y._settledAt(D,V,me)},function(me){return Y._settledAt(I,V,me)})},k}();function Fe(k){return new ke(this,k).promise}function ge(k){var N=this;return E(k)?new N(function(J,V){for(var Y=k.length,me=0;me<Y;me++)N.resolve(k[me]).then(J,V)}):new N(function(J,V){return V(new TypeError("You must pass an array to race."))})}function ce(k){var N=this,J=new N(A);return ae(J,k),J}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[T]=xe(),this._result=this._state=void 0,this._subscribers=[],A!==N&&(typeof N!="function"&&Ie(),this instanceof k?_e(this,N):Ne())}return k.prototype.catch=function(J){return this.then(null,J)},k.prototype.finally=function(J){var V=this,Y=V.constructor;return S(J)?V.then(function(me){return Y.resolve(J()).then(function(){return me})},function(me){return Y.resolve(J()).then(function(){throw me})}):V.then(J,J)},k}();Xe.prototype.then=x,Xe.all=Fe,Xe.race=ge,Xe.resolve=l,Xe.reject=ce,Xe._setScheduler=f,Xe._setAsap=o,Xe._asap=p;function te(){var k=void 0;if(typeof $!="undefined")k=$;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 J=null;try{J=Object.prototype.toString.call(N.resolve())}catch(V){}if(J==="[object Promise]"&&!N.cast)return}k.Promise=Xe}return Xe.polyfill=te,Xe.Promise=Xe,Xe})}).call(this,W("Q2Ig"),W("IyRk"))},E9nw:function(Ve,Be){Ve.exports=function(){var W=document.getSelection();if(!W.rangeCount)return function(){};for(var re=document.activeElement,$=[],U=0;U<W.rangeCount;U++)$.push(W.getRangeAt(U));switch(re.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":re.blur();break;default:re=null;break}return W.removeAllRanges(),function(){W.type==="Caret"&&W.removeAllRanges(),W.rangeCount||$.forEach(function(S){W.addRange(S)}),re&&re.focus()}}},EHPI:function(Ve,Be,W){"use strict";var re=W("bbsP"),$=W("/wGt"),U=W("tJVT"),S=W("k1fw"),P=W("cDcd"),E=W.n(P),C=W("ZW9T"),w=W("ZD9Y"),u=W("M8RZ"),p=W("bCnd"),f=W("fcyK"),o=W.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,t){switch(t.type){case c.set_show_editor_setting:return Object(S.a)(Object(S.a)({},i),{},{showEditorSetting:t.payload});case c.set_theme:return Object(S.a)(Object(S.a)({},i),{},{theme:t.payload});case c.set_font_size:return Object(S.a)(Object(S.a)({},i),{},{fontSize:t.payload});case c.on_tab_to_space:return Object(S.a)(Object(S.a)({},i),{},{tabToSpace:t.payload});default:throw new Error}}Be.a=function(i){var t=i.isLoading,n=i.value,h=i.onChange,v=i.language,b=i.ActionBarRender,y=b===void 0?function(ee){return E.a.createElement(d,{onShowCodeSetting:ee})}:b,_=Object(P.useReducer)(s,a),m=Object(U.a)(_,2),g=m[0],x=m[1],l=g.theme,T=g.fontSize,A=g.showEditorSetting,O=g.tabToSpace,D={onFontSizeChange:function(F){x({type:c.set_font_size,payload:F}),Object(p.b)("cmFontSize",F)},tabToSpace:O,cmFontSize:T,className:"oj",cmCodeMode:l,onTabToSpace:function(F){x({type:c.on_tab_to_space,payload:F}),Object(p.b)("cmTabToSpace",F)},onCodeModeChange:function(F){x({type:c.set_theme,payload:F}),Object(p.b)("cmCodeMode",F)}};function I(){x({type:c.set_show_editor_setting,payload:!1})}function j(){x({type:c.set_show_editor_setting,payload:!0})}var B={value:n,language:v,onChange:h,theme:l,height:"calc(100% - 56px)",options:{fontSize:T,insertSpaces:O}};return E.a.createElement(P.Fragment,null,E.a.createElement("div",{className:"code-panel-container"},y(j),!t&&E.a.createElement(C.b,B)),E.a.createElement(u.a,null,E.a.createElement($.a,{className:"oj",title:null,placement:"right",closable:!1,visible:A,onClose:I},E.a.createElement(w.a,D))))};function d(i){var t=i.onShowCodeSetting;return E.a.createElement("div",{className:"action-bar"},E.a.createElement("span",null,"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\u6587\u4EF6"),E.a.createElement("a",{onClick:t},E.a.createElement("i",{className:"iconfont icon-shezhi"})))}},ELLl:function(Ve,Be,W){(function(re){re(W("VrN/"))})(function(re){var $={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},U=re.Pos;re.defineOption("autoCloseBrackets",!1,function(s,d,i){i&&i!=re.Init&&(s.removeKeyMap(P),s.state.closeBrackets=null),d&&(E(S(d,"pairs")),s.state.closeBrackets=d,s.addKeyMap(P))});function S(s,d){return d=="pairs"&&typeof s=="string"?s:typeof s=="object"&&s[d]!=null?s[d]:$[d]}var P={Backspace:u,Enter:p};function E(s){for(var d=0;d<s.length;d++){var i=s.charAt(d),t="'"+i+"'";P[t]||(P[t]=C(i))}}E($.pairs+"`");function C(s){return function(d){return o(d,s)}}function w(s){var d=s.state.closeBrackets;if(!d||d.override)return d;var i=s.getModeAt(s.getCursor());return i.closeBrackets||d}function u(s){var d=w(s);if(!d||s.getOption("disableInput"))return re.Pass;for(var i=S(d,"pairs"),t=s.listSelections(),n=0;n<t.length;n++){if(!t[n].empty())return re.Pass;var h=a(s,t[n].head);if(!h||i.indexOf(h)%2!=0)return re.Pass}for(var n=t.length-1;n>=0;n--){var v=t[n].head;s.replaceRange("",U(v.line,v.ch-1),U(v.line,v.ch+1),"+delete")}}function p(s){var d=w(s),i=d&&S(d,"explode");if(!i||s.getOption("disableInput"))return re.Pass;for(var t=s.listSelections(),n=0;n<t.length;n++){if(!t[n].empty())return re.Pass;var h=a(s,t[n].head);if(!h||i.indexOf(h)%2!=0)return re.Pass}s.operation(function(){var v=s.lineSeparator()||`
|
|
|
`;s.replaceSelection(v+v,null),s.execCommand("goCharLeft"),t=s.listSelections();for(var b=0;b<t.length;b++){var y=t[b].head.line;s.indentLine(y,null,!0),s.indentLine(y+1,null,!0)}})}function f(s){var d=re.cmpPos(s.anchor,s.head)>0;return{anchor:new U(s.anchor.line,s.anchor.ch+(d?-1:1)),head:new U(s.head.line,s.head.ch+(d?1:-1))}}function o(s,d){var i=w(s);if(!i||s.getOption("disableInput"))return re.Pass;var t=S(i,"pairs"),n=t.indexOf(d);if(n==-1)return re.Pass;for(var h=S(i,"closeBefore"),v=S(i,"triples"),b=t.charAt(n+1)==d,y=s.listSelections(),_=n%2==0,m,g=0;g<y.length;g++){var x=y[g],l=x.head,T,A=s.getRange(l,U(l.line,l.ch+1));if(_&&!x.empty())T="surround";else if((b||!_)&&A==d)b&&c(s,l)?T="both":v.indexOf(d)>=0&&s.getRange(l,U(l.line,l.ch+3))==d+d+d?T="skipThree":T="skip";else if(b&&l.ch>1&&v.indexOf(d)>=0&&s.getRange(U(l.line,l.ch-2),l)==d+d){if(l.ch>2&&/\bstring/.test(s.getTokenTypeAt(U(l.line,l.ch-2))))return re.Pass;T="addFour"}else if(b){var O=l.ch==0?" ":s.getRange(U(l.line,l.ch-1),l);if(!re.isWordChar(A)&&O!=d&&!re.isWordChar(O))T="both";else return re.Pass}else if(_&&(A.length===0||/\s/.test(A)||h.indexOf(A)>-1))T="both";else return re.Pass;if(!m)m=T;else if(m!=T)return re.Pass}var D=n%2?t.charAt(n-1):d,I=n%2?d:t.charAt(n+1);s.operation(function(){if(m=="skip")s.execCommand("goCharRight");else if(m=="skipThree")for(var j=0;j<3;j++)s.execCommand("goCharRight");else if(m=="surround"){for(var B=s.getSelections(),j=0;j<B.length;j++)B[j]=D+B[j]+I;s.replaceSelections(B,"around"),B=s.listSelections().slice();for(var j=0;j<B.length;j++)B[j]=f(B[j]);s.setSelections(B)}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,d){var i=s.getRange(U(d.line,d.ch-1),U(d.line,d.ch+1));return i.length==2?i:null}function c(s,d){var i=s.getTokenAt(U(d.line,d.ch+1));return/\bstring/.test(i.type)&&i.start==d.ch&&(d.ch==0||!/\bstring/.test(s.getTokenTypeAt(d)))}})},FOrL:function(Ve,Be,W){Ve.exports=W.p+"static/nodata.a6b3f948.png"},GUcZ:function(Ve,Be,W){"use strict";var re=W("fWQN"),$=W("mtLc"),U=function(){function Te(){Object(re.a)(this,Te)}return Object($.a)(Te,null,[{key:"install",value:function(){Object.setPrototypeOf=Object.setPrototypeOf||function(H,Q){return H.__proto__=Q,H},Object.assign=Object.assign||function(H){if(H==null)throw new TypeError("Cannot convert undefined or null to object");for(var Q=Object(H),ne=1;ne<arguments.length;ne++){var se=arguments[ne];if(se!=null)for(var Se in se)se.hasOwnProperty(Se)&&(Q[Se]=se[Se])}return Q},typeof self.Promise!="function"&&W("E2g8").polyfill()}}]),Te}();U.install();var S=U,P=W("+qE3"),E=W.n(P),C=function(){function Te(){Object(re.a)(this,Te)}return Object($.a)(Te,null,[{key:"e",value:function(H,Q){(!H||Te.FORCE_GLOBAL_TAG)&&(H=Te.GLOBAL_TAG);var ne="[".concat(H,"] > ").concat(Q);if(Te.ENABLE_CALLBACK&&Te.emitter.emit("log","error",ne),!Te.ENABLE_ERROR)return;console.error?console.error(ne):console.warn?console.warn(ne):console.log(ne)}},{key:"i",value:function(H,Q){(!H||Te.FORCE_GLOBAL_TAG)&&(H=Te.GLOBAL_TAG);var ne="[".concat(H,"] > ").concat(Q);if(Te.ENABLE_CALLBACK&&Te.emitter.emit("log","info",ne),!Te.ENABLE_INFO)return;console.info?console.info(ne):console.log(ne)}},{key:"w",value:function(H,Q){(!H||Te.FORCE_GLOBAL_TAG)&&(H=Te.GLOBAL_TAG);var ne="[".concat(H,"] > ").concat(Q);if(Te.ENABLE_CALLBACK&&Te.emitter.emit("log","warn",ne),!Te.ENABLE_WARN)return;console.warn?console.warn(ne):console.log(ne)}},{key:"d",value:function(H,Q){(!H||Te.FORCE_GLOBAL_TAG)&&(H=Te.GLOBAL_TAG);var ne="[".concat(H,"] > ").concat(Q);if(Te.ENABLE_CALLBACK&&Te.emitter.emit("log","debug",ne),!Te.ENABLE_DEBUG)return;console.debug?console.debug(ne):console.log(ne)}},{key:"v",value:function(H,Q){(!H||Te.FORCE_GLOBAL_TAG)&&(H=Te.GLOBAL_TAG);var ne="[".concat(H,"] > ").concat(Q);if(Te.ENABLE_CALLBACK&&Te.emitter.emit("log","verbose",ne),!Te.ENABLE_VERBOSE)return;console.log(ne)}}]),Te}();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 E.a;var w=C,u=function(){function Te(){Object(re.a)(this,Te),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($.a)(Te,[{key:"reset",value:function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0}},{key:"addBytes",value:function(H){this._firstCheckpoint===0?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=H,this._totalBytes+=H):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=H,this._totalBytes+=H):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=H,this._totalBytes+=H,this._lastCheckpoint=this._now())}},{key:"currentKBps",get:function(){this.addBytes(0);var H=(this._now()-this._lastCheckpoint)/1e3;return H==0&&(H=1),this._intervalBytes/H/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 H=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/H/1024}}]),Te}(),p=u,f=W("yKVA"),o=W("879j"),a=function(){function Te(de){Object(re.a)(this,Te),this._message=de}return Object($.a)(Te,[{key:"name",get:function(){return"RuntimeException"}},{key:"message",get:function(){return this._message}},{key:"toString",value:function(){return this.name+": "+this.message}}]),Te}(),c=function(Te){Object(f.a)(H,Te);var de=Object(o.a)(H);function H(Q){return Object(re.a)(this,H),de.call(this,Q)}return Object($.a)(H,[{key:"name",get:function(){return"IllegalStateException"}}]),H}(a),s=function(Te){Object(f.a)(H,Te);var de=Object(o.a)(H);function H(Q){return Object(re.a)(this,H),de.call(this,Q)}return Object($.a)(H,[{key:"name",get:function(){return"InvalidArgumentException"}}]),H}(a),d=function(Te){Object(f.a)(H,Te);var de=Object(o.a)(H);function H(Q){return Object(re.a)(this,H),de.call(this,Q)}return Object($.a)(H,[{key:"name",get:function(){return"NotImplementedException"}}]),H}(a),i={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},t={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},n=function(){function Te(de){Object(re.a)(this,Te),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($.a)(Te,[{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(H){this._onContentLengthKnown=H}},{key:"onURLRedirect",get:function(){return this._onURLRedirect},set:function(H){this._onURLRedirect=H}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(H){this._onDataArrival=H}},{key:"onError",get:function(){return this._onError},set:function(H){this._onError=H}},{key:"onComplete",get:function(){return this._onComplete},set:function(H){this._onComplete=H}},{key:"open",value:function(H,Q){throw new d("Unimplemented abstract function!")}},{key:"abort",value:function(){throw new d("Unimplemented abstract function!")}}]),Te}(),h=W("oZsa");function v(Te,de){for(;!Object.prototype.hasOwnProperty.call(Te,de)&&!(Te=Object(h.a)(Te),Te===null););return Te}function b(Te,de,H){return typeof Reflect!="undefined"&&Reflect.get?b=Reflect.get:b=function(ne,se,Se){var He=v(ne,se);if(!He)return;var qe=Object.getOwnPropertyDescriptor(He,se);return qe.get?qe.get.call(Se):qe.value},b(Te,de,H||Te)}var y={};function _(){var Te=self.navigator.userAgent.toLowerCase(),de=/(edge)\/([\w.]+)/.exec(Te)||/(opr)[\/]([\w.]+)/.exec(Te)||/(chrome)[ \/]([\w.]+)/.exec(Te)||/(iemobile)[\/]([\w.]+)/.exec(Te)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(Te)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(Te)||/(webkit)[ \/]([\w.]+)/.exec(Te)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(Te)||/(msie) ([\w.]+)/.exec(Te)||Te.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(Te)||Te.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(Te)||[],H=/(ipad)/.exec(Te)||/(ipod)/.exec(Te)||/(windows phone)/.exec(Te)||/(iphone)/.exec(Te)||/(kindle)/.exec(Te)||/(android)/.exec(Te)||/(windows)/.exec(Te)||/(mac)/.exec(Te)||/(linux)/.exec(Te)||/(cros)/.exec(Te)||[],Q={browser:de[5]||de[3]||de[1]||"",version:de[2]||de[4]||"0",majorVersion:de[4]||de[2]||"0",platform:H[0]||""},ne={};if(Q.browser){ne[Q.browser]=!0;var se=Q.majorVersion.split(".");ne.version={major:parseInt(Q.majorVersion,10),string:Q.version},se.length>1&&(ne.version.minor=parseInt(se[1],10)),se.length>2&&(ne.version.build=parseInt(se[2],10))}if(Q.platform&&(ne[Q.platform]=!0),(ne.chrome||ne.opr||ne.safari)&&(ne.webkit=!0),ne.rv||ne.iemobile){ne.rv&&delete ne.rv;var Se="msie";Q.browser=Se,ne[Se]=!0}if(ne.edge){delete ne.edge;var He="msedge";Q.browser=He,ne[He]=!0}if(ne.opr){var qe="opera";Q.browser=qe,ne[qe]=!0}if(ne.safari&&ne.android){var Tt="android";Q.browser=Tt,ne[Tt]=!0}ne.name=Q.browser,ne.platform=Q.platform;for(var Lt in y)y.hasOwnProperty(Lt)&&delete y[Lt];Object.assign(y,ne)}_();var m=y,g=function(Te){Object(f.a)(H,Te);var de=Object(o.a)(H);function H(Q,ne){var se;return Object(re.a)(this,H),se=de.call(this,"fetch-stream-loader"),se.TAG="FetchStreamLoader",se._seekHandler=Q,se._config=ne,se._needStash=!0,se._requestAbort=!1,se._contentLength=null,se._receivedLength=0,se}return Object($.a)(H,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),b(Object(h.a)(H.prototype),"destroy",this).call(this)}},{key:"open",value:function(ne,se){var Se=this;this._dataSource=ne,this._range=se;var He=ne.url;this._config.reuseRedirectedURL&&ne.redirectedURL!=null&&(He=ne.redirectedURL);var qe=this._seekHandler.getConfig(He,se),Tt=new self.Headers;if(typeof qe.headers=="object"){var Lt=qe.headers;for(var rt in Lt)Lt.hasOwnProperty(rt)&&Tt.append(rt,Lt[rt])}var Ct={method:"GET",headers:Tt,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(var Jt in this._config.headers)Tt.append(Jt,this._config.headers[Jt]);ne.cors===!1&&(Ct.mode="same-origin"),ne.withCredentials&&(Ct.credentials="include"),ne.referrerPolicy&&(Ct.referrerPolicy=ne.referrerPolicy),this._status=i.kConnecting,self.fetch(qe.url,Ct).then(function(St){if(Se._requestAbort){Se._requestAbort=!1,Se._status=i.kIdle;return}if(St.ok&&St.status>=200&&St.status<=299){if(St.url!==qe.url&&Se._onURLRedirect){var nn=Se._seekHandler.removeURLParameters(St.url);Se._onURLRedirect(nn)}var Qt=St.headers.get("Content-Length");return Qt!=null&&(Se._contentLength=parseInt(Qt),Se._contentLength!==0&&(Se._onContentLengthKnown&&Se._onContentLengthKnown(Se._contentLength))),Se._pump.call(Se,St.body.getReader())}else if(Se._status=i.kError,Se._onError)Se._onError(t.HTTP_STATUS_CODE_INVALID,{code:St.status,msg:St.statusText});else throw new a("FetchStreamLoader: Http code invalid, "+St.status+" "+St.statusText)}).catch(function(St){if(Se._status=i.kError,Se._onError)Se._onError(t.EXCEPTION,{code:-1,msg:St.message});else throw St})}},{key:"abort",value:function(){this._requestAbort=!0}},{key:"_pump",value:function(ne){var se=this;return ne.read().then(function(Se){if(Se.done)if(se._contentLength!==null&&se._receivedLength<se._contentLength){se._status=i.kError;var He=t.EARLY_EOF,qe={code:-1,msg:"Fetch stream meet Early-EOF"};if(se._onError)se._onError(He,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,ne.cancel();se._status=i.kBuffering;var Tt=Se.value.buffer,Lt=se._range.from+se._receivedLength;se._receivedLength+=Tt.byteLength,se._onDataArrival&&se._onDataArrival(Tt,Lt,se._receivedLength),se._pump(ne)}}).catch(function(Se){if(Se.code===11&&m.msedge)return;se._status=i.kError;var He=0,qe=null;if((Se.code===19||Se.message==="network error")&&(se._contentLength===null||se._contentLength!==null&&se._receivedLength<se._contentLength)?(He=t.EARLY_EOF,qe={code:Se.code,msg:"Fetch stream meet Early-EOF"}):(He=t.EXCEPTION,qe={code:Se.code,msg:Se.message}),se._onError)se._onError(He,qe);else throw new a(qe.msg)})}}],[{key:"isSupported",value:function(){try{var ne=m.msedge&&m.version.minor>=15048,se=m.msedge?ne:!0;return self.fetch&&self.ReadableStream&&se}catch(Se){return!1}}}]),H}(n),x=g,l=function(Te){Object(f.a)(H,Te);var de=Object(o.a)(H);function H(Q,ne){var se;return Object(re.a)(this,H),se=de.call(this,"xhr-moz-chunked-loader"),se.TAG="MozChunkedLoader",se._seekHandler=Q,se._config=ne,se._needStash=!0,se._xhr=null,se._requestAbort=!1,se._contentLength=null,se._receivedLength=0,se}return Object($.a)(H,[{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(h.a)(H.prototype),"destroy",this).call(this)}},{key:"open",value:function(ne,se){this._dataSource=ne,this._range=se;var Se=ne.url;this._config.reuseRedirectedURL&&ne.redirectedURL!=null&&(Se=ne.redirectedURL);var He=this._seekHandler.getConfig(Se,se);this._requestURL=He.url;var qe=this._xhr=new XMLHttpRequest;if(qe.open("GET",He.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),ne.withCredentials&&(qe.withCredentials=!0),typeof He.headers=="object"){var Tt=He.headers;for(var Lt in Tt)Tt.hasOwnProperty(Lt)&&qe.setRequestHeader(Lt,Tt[Lt])}if(typeof this._config.headers=="object"){var rt=this._config.headers;for(var Ct in rt)rt.hasOwnProperty(Ct)&&qe.setRequestHeader(Ct,rt[Ct])}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(ne){var se=ne.target;if(se.readyState===2){if(se.responseURL!=null&&se.responseURL!==this._requestURL&&this._onURLRedirect){var Se=this._seekHandler.removeURLParameters(se.responseURL);this._onURLRedirect(Se)}if(se.status!==0&&(se.status<200||se.status>299))if(this._status=i.kError,this._onError)this._onError(t.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(ne){if(this._status===i.kError)return;this._contentLength===null&&(ne.total!==null&&ne.total!==0&&(this._contentLength=ne.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)));var se=ne.target.response,Se=this._range.from+this._receivedLength;this._receivedLength+=se.byteLength,this._onDataArrival&&this._onDataArrival(se,Se,this._receivedLength)}},{key:"_onLoadEnd",value:function(ne){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(ne){this._status=i.kError;var se=0,Se=null;if(this._contentLength&&ne.loaded<this._contentLength?(se=t.EARLY_EOF,Se={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(se=t.EXCEPTION,Se={code:-1,msg:ne.constructor.name+" "+ne.type}),this._onError)this._onError(se,Se);else throw new a(Se.msg)}}],[{key:"isSupported",value:function(){try{var ne=new XMLHttpRequest;return ne.open("GET","https://example.com",!0),ne.responseType="moz-chunked-arraybuffer",ne.responseType==="moz-chunked-arraybuffer"}catch(se){return w.w("MozChunkedLoader",se.message),!1}}}]),H}(n),T=l,A=function(Te){Object(f.a)(H,Te);var de=Object(o.a)(H);function H(Q,ne){var se;return Object(re.a)(this,H),se=de.call(this,"xhr-msstream-loader"),se.TAG="MSStreamLoader",se._seekHandler=Q,se._config=ne,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($.a)(H,[{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(h.a)(H.prototype),"destroy",this).call(this)}},{key:"open",value:function(ne,se){this._internalOpen(ne,se,!1)}},{key:"_internalOpen",value:function(ne,se,Se){this._dataSource=ne,Se?this._currentRange=se:this._totalRange=se;var He=ne.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?He=this._currentRedirectedURL:ne.redirectedURL!=null&&(He=ne.redirectedURL));var qe=this._seekHandler.getConfig(He,se);this._currentRequestURL=qe.url;var Tt=this._reader=new self.MSStreamReader;Tt.onprogress=this._msrOnProgress.bind(this),Tt.onload=this._msrOnLoad.bind(this),Tt.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),ne.withCredentials&&(Lt.withCredentials=!0),typeof qe.headers=="object"){var rt=qe.headers;for(var Ct in rt)rt.hasOwnProperty(Ct)&&Lt.setRequestHeader(Ct,rt[Ct])}if(typeof this._config.headers=="object"){var Jt=this._config.headers;for(var St in Jt)Jt.hasOwnProperty(St)&&Lt.setRequestHeader(St,Jt[St])}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(ne){var se=ne.target;if(se.readyState===2)if(se.status>=200&&se.status<=299){if(this._status=i.kBuffering,se.responseURL!=null){var Se=this._seekHandler.removeURLParameters(se.responseURL);se.responseURL!==this._currentRequestURL&&Se!==this._currentRedirectedURL&&(this._currentRedirectedURL=Se,this._onURLRedirect&&this._onURLRedirect(Se))}var He=se.getResponseHeader("Content-Length");if(He!=null&&this._contentLength==null){var qe=parseInt(He);qe>0&&(this._contentLength=qe,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else if(this._status=i.kError,this._onError)this._onError(t.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 Tt=se.response;this._reader.readAsArrayBuffer(Tt)}}},{key:"_xhrOnError",value:function(ne){this._status=i.kError;var se=t.EXCEPTION,Se={code:-1,msg:ne.constructor.name+" "+ne.type};if(this._onError)this._onError(se,Se);else throw new a(Se.msg)}},{key:"_msrOnProgress",value:function(ne){var se=ne.target,Se=se.result;if(Se==null){this._doReconnectIfNeeded();return}var He=Se.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=Se.byteLength;var qe=this._totalRange.from+this._receivedLength;this._receivedLength+=He.byteLength,this._onDataArrival&&this._onDataArrival(He,qe,this._receivedLength),Se.byteLength>=this._bufferLimit&&(w.v(this.TAG,"MSStream buffer exceeded max size near ".concat(qe+He.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 ne={from:this._totalRange.from+this._receivedLength,to:-1};this._internalOpen(this._dataSource,ne,!0)}}},{key:"_msrOnLoad",value:function(ne){this._status=i.kComplete,this._onComplete&&this._onComplete(this._totalRange.from,this._totalRange.from+this._receivedLength-1)}},{key:"_msrOnError",value:function(ne){this._status=i.kError;var se=0,Se=null;if(this._contentLength&&this._receivedLength<this._contentLength?(se=t.EARLY_EOF,Se={code:-1,msg:"MSStream meet Early-Eof"}):(se=t.EARLY_EOF,Se={code:-1,msg:ne.constructor.name+" "+ne.type}),this._onError)this._onError(se,Se);else throw new a(Se.msg)}}],[{key:"isSupported",value:function(){try{if(typeof self.MSStream=="undefined"||typeof self.MSStreamReader=="undefined")return!1;var ne=new XMLHttpRequest;return ne.open("GET","https://example.com",!0),ne.responseType="ms-stream",ne.responseType==="ms-stream"}catch(se){return w.w("MSStreamLoader",se.message),!1}}}]),H}(n),O=A,D=function(Te){Object(f.a)(H,Te);var de=Object(o.a)(H);function H(Q,ne){var se;return Object(re.a)(this,H),se=de.call(this,"xhr-range-loader"),se.TAG="RangeLoader",se._seekHandler=Q,se._config=ne,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($.a)(H,[{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(h.a)(H.prototype),"destroy",this).call(this)}},{key:"currentSpeed",get:function(){return this._speedSampler.lastSecondKBps}},{key:"open",value:function(ne,se){this._dataSource=ne,this._range=se,this._status=i.kConnecting;var Se=!1;this._dataSource.filesize!=null&&this._dataSource.filesize!==0&&(Se=!0,this._totalLength=this._dataSource.filesize),!this._totalLengthReceived&&!Se?(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1})):this._openSubRange()}},{key:"_openSubRange",value:function(){var ne=this._currentChunkSizeKB*1024,se=this._range.from+this._receivedLength,Se=se+ne;this._contentLength!=null&&(Se-this._range.from>=this._contentLength&&(Se=this._range.from+this._contentLength-1)),this._currentRequestRange={from:se,to:Se},this._internalOpen(this._dataSource,this._currentRequestRange)}},{key:"_internalOpen",value:function(ne,se){this._lastTimeLoaded=0;var Se=ne.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?Se=this._currentRedirectedURL:ne.redirectedURL!=null&&(Se=ne.redirectedURL));var He=this._seekHandler.getConfig(Se,se);this._currentRequestURL=He.url;var qe=this._xhr=new XMLHttpRequest;if(qe.open("GET",He.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),ne.withCredentials&&(qe.withCredentials=!0),typeof He.headers=="object"){var Tt=He.headers;for(var Lt in Tt)Tt.hasOwnProperty(Lt)&&qe.setRequestHeader(Lt,Tt[Lt])}if(typeof this._config.headers=="object"){var rt=this._config.headers;for(var Ct in rt)rt.hasOwnProperty(Ct)&&qe.setRequestHeader(Ct,rt[Ct])}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(ne){var se=ne.target;if(se.readyState===2){if(se.responseURL!=null){var Se=this._seekHandler.removeURLParameters(se.responseURL);se.responseURL!==this._currentRequestURL&&Se!==this._currentRedirectedURL&&(this._currentRedirectedURL=Se,this._onURLRedirect&&this._onURLRedirect(Se))}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(t.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(ne){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 Se=ne.total;this._internalAbort(),Se!=null&Se!==0&&(this._totalLength=Se)}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 He=ne.loaded-this._lastTimeLoaded;this._lastTimeLoaded=ne.loaded,this._speedSampler.addBytes(He)}},{key:"_normalizeSpeed",value:function(ne){var se=this._chunkSizeKBList,Se=se.length-1,He=0,qe=0,Tt=Se;if(ne<se[0])return se[0];for(;qe<=Tt;){if(He=qe+Math.floor((Tt-qe)/2),He===Se||ne>=se[He]&&ne<se[He+1])return se[He];se[He]<ne?qe=He+1:Tt=He-1}}},{key:"_onLoad",value:function(ne){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 Se=this._normalizeSpeed(se);this._currentSpeedNormalized!==Se&&(this._currentSpeedNormalized=Se,this._currentChunkSizeKB=Se)}var He=ne.target.response,qe=this._range.from+this._receivedLength;this._receivedLength+=He.byteLength;var Tt=!1;this._contentLength!=null&&this._receivedLength<this._contentLength?this._openSubRange():Tt=!0,this._onDataArrival&&this._onDataArrival(He,qe,this._receivedLength),Tt&&(this._status=i.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}},{key:"_onXhrError",value:function(ne){this._status=i.kError;var se=0,Se=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(se=t.EARLY_EOF,Se={code:-1,msg:"RangeLoader meet Early-Eof"}):(se=t.EXCEPTION,Se={code:-1,msg:ne.constructor.name+" "+ne.type}),this._onError)this._onError(se,Se);else throw new a(Se.msg)}}],[{key:"isSupported",value:function(){try{var ne=new XMLHttpRequest;return ne.open("GET","https://example.com",!0),ne.responseType="arraybuffer",ne.responseType==="arraybuffer"}catch(se){return w.w("RangeLoader",se.message),!1}}}]),H}(n),I=D,j=function(Te){Object(f.a)(H,Te);var de=Object(o.a)(H);function H(){var Q;return Object(re.a)(this,H),Q=de.call(this,"websocket-loader"),Q.TAG="WebSocketLoader",Q._needStash=!0,Q._ws=null,Q._requestAbort=!1,Q._receivedLength=0,Q}return Object($.a)(H,[{key:"destroy",value:function(){this._ws&&this.abort(),b(Object(h.a)(H.prototype),"destroy",this).call(this)}},{key:"open",value:function(ne){try{var se=this._ws=new self.WebSocket(ne.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(He){this._status=i.kError;var Se={code:He.code,msg:He.message};if(this._onError)this._onError(t.EXCEPTION,Se);else throw new a(Se.msg)}}},{key:"abort",value:function(){var ne=this._ws;ne&&(ne.readyState===0||ne.readyState===1)&&(this._requestAbort=!0,ne.close()),this._ws=null,this._status=i.kComplete}},{key:"_onWebSocketOpen",value:function(ne){this._status=i.kBuffering}},{key:"_onWebSocketClose",value:function(ne){if(this._requestAbort===!0){this._requestAbort=!1;return}this._status=i.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)}},{key:"_onWebSocketMessage",value:function(ne){var se=this;if(ne.data instanceof ArrayBuffer)this._dispatchArrayBuffer(ne.data);else if(ne.data instanceof Blob){var Se=new FileReader;Se.onload=function(){se._dispatchArrayBuffer(Se.result)},Se.readAsArrayBuffer(ne.data)}else{this._status=i.kError;var He={code:-1,msg:"Unsupported WebSocket message type: "+ne.data.constructor.name};if(this._onError)this._onError(t.EXCEPTION,He);else throw new a(He.msg)}}},{key:"_dispatchArrayBuffer",value:function(ne){var se=ne,Se=this._receivedLength;this._receivedLength+=se.byteLength,this._onDataArrival&&this._onDataArrival(se,Se,this._receivedLength)}},{key:"_onWebSocketError",value:function(ne){this._status=i.kError;var se={code:ne.code,msg:ne.message};if(this._onError)this._onError(t.EXCEPTION,se);else throw new a(se.msg)}}],[{key:"isSupported",value:function(){try{return typeof self.WebSocket!="undefined"}catch(ne){return!1}}}]),H}(n),B=j,ee=function(){function Te(de){Object(re.a)(this,Te),this._zeroStart=de||!1}return Object($.a)(Te,[{key:"getConfig",value:function(H,Q){var ne={};if(Q.from!==0||Q.to!==-1){var se;Q.to!==-1?se="bytes=".concat(Q.from.toString(),"-").concat(Q.to.toString()):se="bytes=".concat(Q.from.toString(),"-"),ne.Range=se}else this._zeroStart&&(ne.Range="bytes=0-");return{url:H,headers:ne}}},{key:"removeURLParameters",value:function(H){return H}}]),Te}(),F=ee,G=function(){function Te(de,H){Object(re.a)(this,Te),this._startName=de,this._endName=H}return Object($.a)(Te,[{key:"getConfig",value:function(H,Q){var ne=H;if(Q.from!==0||Q.to!==-1){var se=!0;ne.indexOf("?")===-1&&(ne+="?",se=!1),se&&(ne+="&"),ne+="".concat(this._startName,"=").concat(Q.from.toString()),Q.to!==-1&&(ne+="&".concat(this._endName,"=").concat(Q.to.toString()))}return{url:ne,headers:{}}}},{key:"removeURLParameters",value:function(H){var Q=H.split("?")[0],ne=void 0,se=H.indexOf("?");se!==-1&&(ne=H.substring(se+1));var Se="";if(ne!=null&&ne.length>0)for(var He=ne.split("&"),qe=0;qe<He.length;qe++){var Tt=He[qe].split("="),Lt=qe>0;Tt[0]!==this._startName&&Tt[0]!==this._endName&&(Lt&&(Se+="&"),Se+=He[qe])}return Se.length===0?Q:Q+"?"+Se}}]),Te}(),X=G,Z=function(){function Te(de,H,Q){Object(re.a)(this,Te),this.TAG="IOController",this._config=H,this._extraData=Q,this._stashInitialSize=1024*384,H.stashInitialSize!=null&&H.stashInitialSize>0&&(this._stashInitialSize=H.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,H.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($.a)(Te,[{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(H){this._extraData=H}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(H){this._onDataArrival=H}},{key:"onSeeked",get:function(){return this._onSeeked},set:function(H){this._onSeeked=H}},{key:"onError",get:function(){return this._onError},set:function(H){this._onError=H}},{key:"onComplete",get:function(){return this._onComplete},set:function(H){this._onComplete=H}},{key:"onRedirect",get:function(){return this._onRedirect},set:function(H){this._onRedirect=H}},{key:"onRecoveredEarlyEof",get:function(){return this._onRecoveredEarlyEof},set:function(H){this._onRecoveredEarlyEof=H}},{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 H=this._config;if(H.seekType==="range")this._seekHandler=new F(this._config.rangeLoadZeroStart);else if(H.seekType==="param"){var Q=H.seekParamStart||"bstart",ne=H.seekParamEnd||"bend";this._seekHandler=new X(Q,ne)}else if(H.seekType==="custom"){if(typeof H.customSeekHandler!="function")throw new s("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new H.customSeekHandler}else throw new s("Invalid seekType in config: ".concat(H.seekType))}},{key:"_selectLoader",value:function(){if(this._config.customLoader!=null)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=B;else if(x.isSupported())this._loaderClass=x;else if(T.isSupported())this._loaderClass=T;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(H){this._currentRange={from:0,to:-1},H&&(this._currentRange.from=H),this._speedSampler.reset(),H||(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 H=this._resumeFrom;this._resumeFrom=0,this._internalSeek(H,!0)}}},{key:"seek",value:function(H){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(H,!0)}},{key:"_internalSeek",value:function(H,Q){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(Q),this._loader.destroy(),this._loader=null;var ne={from:H,to:-1};this._currentRange={from:ne.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,ne),this._onSeeked&&this._onSeeked()}},{key:"updateUrl",value:function(H){if(!H||typeof H!="string"||H.length===0)throw new s("Url must be a non-empty string!");this._dataSource.url=H}},{key:"_expandBuffer",value:function(H){for(var Q=this._stashSize;Q+1024*1024*1<H;)Q*=2;if(Q+=1024*1024*1,Q===this._bufferSize)return;var ne=new ArrayBuffer(Q);if(this._stashUsed>0){var se=new Uint8Array(this._stashBuffer,0,this._stashUsed),Se=new Uint8Array(ne,0,Q);Se.set(se,0)}this._stashBuffer=ne,this._bufferSize=Q}},{key:"_normalizeSpeed",value:function(H){var Q=this._speedNormalizeList,ne=Q.length-1,se=0,Se=0,He=ne;if(H<Q[0])return Q[0];for(;Se<=He;){if(se=Se+Math.floor((He-Se)/2),se===ne||H>=Q[se]&&H<Q[se+1])return Q[se];Q[se]<H?Se=se+1:He=se-1}}},{key:"_adjustStashSize",value:function(H){var Q=0;this._config.isLive||H<512?Q=H:H>=512&&H<=1024?Q=Math.floor(H*1.5):Q=H*2,Q>8192&&(Q=8192);var ne=Q*1024+1024*1024*1;this._bufferSize<ne&&this._expandBuffer(ne),this._stashSize=Q*1024}},{key:"_dispatchChunks",value:function(H,Q){return this._currentRange.to=Q+H.byteLength-1,this._onDataArrival(H,Q)}},{key:"_onURLRedirect",value:function(H){this._redirectedURL=H,this._onRedirect&&this._onRedirect(H)}},{key:"_onContentLengthKnown",value:function(H){H&&this._fullRequestFlag&&(this._totalLength=H,this._fullRequestFlag=!1)}},{key:"_onLoaderChunkArrival",value:function(H,Q,ne){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(H.byteLength);var se=this._speedSampler.lastSecondKBps;if(se!==0){var Se=this._normalizeSpeed(se);this._speedNormalized!==Se&&(this._speedNormalized=Se,this._adjustStashSize(Se))}if(this._enableStash)if(this._stashUsed===0&&this._stashByteStart===0&&(this._stashByteStart=Q),this._stashUsed+H.byteLength<=this._stashSize){var Jt=new Uint8Array(this._stashBuffer,0,this._stashSize);Jt.set(new Uint8Array(H),this._stashUsed),this._stashUsed+=H.byteLength}else{var St=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){var nn=this._stashBuffer.slice(0,this._stashUsed),Qt=this._dispatchChunks(nn,this._stashByteStart);if(Qt<nn.byteLength){if(Qt>0){var Ut=new Uint8Array(nn,Qt);St.set(Ut,0),this._stashUsed=Ut.byteLength,this._stashByteStart+=Qt}}else this._stashUsed=0,this._stashByteStart+=Qt;this._stashUsed+H.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+H.byteLength),St=new Uint8Array(this._stashBuffer,0,this._bufferSize)),St.set(new Uint8Array(H),this._stashUsed),this._stashUsed+=H.byteLength}else{var vt=this._dispatchChunks(H,Q);if(vt<H.byteLength){var En=H.byteLength-vt;En>this._bufferSize&&(this._expandBuffer(En),St=new Uint8Array(this._stashBuffer,0,this._bufferSize)),St.set(new Uint8Array(H,vt),0),this._stashUsed+=En,this._stashByteStart=Q+vt}}}else if(this._stashUsed===0){var He=this._dispatchChunks(H,Q);if(He<H.byteLength){var qe=H.byteLength-He;qe>this._bufferSize&&this._expandBuffer(qe);var Tt=new Uint8Array(this._stashBuffer,0,this._bufferSize);Tt.set(new Uint8Array(H,He),0),this._stashUsed+=qe,this._stashByteStart=Q+He}}else{this._stashUsed+H.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+H.byteLength);var Lt=new Uint8Array(this._stashBuffer,0,this._bufferSize);Lt.set(new Uint8Array(H),this._stashUsed),this._stashUsed+=H.byteLength;var rt=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(rt<this._stashUsed&&rt>0){var Ct=new Uint8Array(this._stashBuffer,rt);Lt.set(Ct,0)}this._stashUsed-=rt,this._stashByteStart+=rt}}},{key:"_flushStashBuffer",value:function(H){if(this._stashUsed>0){var Q=this._stashBuffer.slice(0,this._stashUsed),ne=this._dispatchChunks(Q,this._stashByteStart),se=Q.byteLength-ne;if(ne<Q.byteLength)if(H)w.w(this.TAG,"".concat(se," bytes unconsumed data remain when flush buffer, dropped"));else{if(ne>0){var Se=new Uint8Array(this._stashBuffer,0,this._bufferSize),He=new Uint8Array(Q,ne);Se.set(He,0),this._stashUsed=He.byteLength,this._stashByteStart+=ne}return 0}return this._stashUsed=0,this._stashByteStart=0,se}return 0}},{key:"_onLoaderComplete",value:function(H,Q){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}},{key:"_onLoaderError",value:function(H,Q){w.e(this.TAG,"Loader error, code = ".concat(Q.code,", msg = ").concat(Q.msg)),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,H=t.UNRECOVERABLE_EARLY_EOF);switch(H){case t.EARLY_EOF:{if(!this._config.isLive&&this._totalLength){var ne=this._currentRange.to+1;ne<this._totalLength&&(w.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(ne,!1));return}H=t.UNRECOVERABLE_EARLY_EOF;break}case t.UNRECOVERABLE_EARLY_EOF:case t.CONNECTING_TIMEOUT:case t.HTTP_STATUS_CODE_INVALID:case t.EXCEPTION:break}if(this._onError)this._onError(H,Q);else throw new a("IOException: "+Q.msg)}}]),Te}(),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 ae(){return Object.assign({},q)}var oe=function(){function Te(){Object(re.a)(this,Te)}return Object($.a)(Te,null,[{key:"supportMSEH264Playback",value:function(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}},{key:"supportNetworkStreamIO",value:function(){var H=new K({},ae()),Q=H.loaderType;return H.destroy(),Q=="fetch-stream-loader"||Q=="xhr-moz-chunked-loader"}},{key:"getNetworkLoaderTypeName",value:function(){var H=new K({},ae()),Q=H.loaderType;return H.destroy(),Q}},{key:"supportNativeMediaPlayback",value:function(H){Te.videoElement==null&&(Te.videoElement=window.document.createElement("video"));var Q=Te.videoElement.canPlayType(H);return Q==="probably"||Q=="maybe"}},{key:"getFeatureList",value:function(){var H={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return H.mseFlvPlayback=Te.supportMSEH264Playback(),H.networkStreamIO=Te.supportNetworkStreamIO(),H.networkLoaderName=Te.getNetworkLoaderTypeName(),H.mseLiveFlvPlayback=H.mseFlvPlayback&&H.networkStreamIO,H.nativeMP4H264Playback=Te.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),H.nativeWebmVP8Playback=Te.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),H.nativeWebmVP9Playback=Te.supportNativeMediaPlayback('video/webm; codecs="vp9"'),H}}]),Te}(),ve=oe,he={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"},_e=he,fe=function(){function Te(){Object(re.a)(this,Te)}return Object($.a)(Te,null,[{key:"forceGlobalTag",get:function(){return w.FORCE_GLOBAL_TAG},set:function(H){w.FORCE_GLOBAL_TAG=H,Te._notifyChange()}},{key:"globalTag",get:function(){return w.GLOBAL_TAG},set:function(H){w.GLOBAL_TAG=H,Te._notifyChange()}},{key:"enableAll",get:function(){return w.ENABLE_VERBOSE&&w.ENABLE_DEBUG&&w.ENABLE_INFO&&w.ENABLE_WARN&&w.ENABLE_ERROR},set:function(H){w.ENABLE_VERBOSE=H,w.ENABLE_DEBUG=H,w.ENABLE_INFO=H,w.ENABLE_WARN=H,w.ENABLE_ERROR=H,Te._notifyChange()}},{key:"enableDebug",get:function(){return w.ENABLE_DEBUG},set:function(H){w.ENABLE_DEBUG=H,Te._notifyChange()}},{key:"enableVerbose",get:function(){return w.ENABLE_VERBOSE},set:function(H){w.ENABLE_VERBOSE=H,Te._notifyChange()}},{key:"enableInfo",get:function(){return w.ENABLE_INFO},set:function(H){w.ENABLE_INFO=H,Te._notifyChange()}},{key:"enableWarn",get:function(){return w.ENABLE_WARN},set:function(H){w.ENABLE_WARN=H,Te._notifyChange()}},{key:"enableError",get:function(){return w.ENABLE_ERROR},set:function(H){w.ENABLE_ERROR=H,Te._notifyChange()}},{key:"getConfig",value:function(){return{globalTag:w.GLOBAL_TAG,forceGlobalTag:w.FORCE_GLOBAL_TAG,enableVerbose:w.ENABLE_VERBOSE,enableDebug:w.ENABLE_DEBUG,enableInfo:w.ENABLE_INFO,enableWarn:w.ENABLE_WARN,enableError:w.ENABLE_ERROR,enableCallback:w.ENABLE_CALLBACK}}},{key:"applyConfig",value:function(H){w.GLOBAL_TAG=H.globalTag,w.FORCE_GLOBAL_TAG=H.forceGlobalTag,w.ENABLE_VERBOSE=H.enableVerbose,w.ENABLE_DEBUG=H.enableDebug,w.ENABLE_INFO=H.enableInfo,w.ENABLE_WARN=H.enableWarn,w.ENABLE_ERROR=H.enableError,w.ENABLE_CALLBACK=H.enableCallback}},{key:"_notifyChange",value:function(){var H=Te.emitter;if(H.listenerCount("change")>0){var Q=Te.getConfig();H.emit("change",Q)}}},{key:"registerListener",value:function(H){Te.emitter.addListener("change",H)}},{key:"removeListener",value:function(H){Te.emitter.removeListener("change",H)}},{key:"addLogListener",value:function(H){w.emitter.addListener("log",H),w.emitter.listenerCount("log")>0&&(w.ENABLE_CALLBACK=!0,Te._notifyChange())}},{key:"removeLogListener",value:function(H){w.emitter.removeListener("log",H),w.emitter.listenerCount("log")===0&&(w.ENABLE_CALLBACK=!1,Te._notifyChange())}}]),Te}();fe.emitter=new E.a;var xe=fe,je=function(){function Te(){Object(re.a)(this,Te),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($.a)(Te,[{key:"isComplete",value:function(){var H=this.hasAudio===!1||this.hasAudio===!0&&this.audioCodec!=null&&this.audioSampleRate!=null&&this.audioChannelCount!=null,Q=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&&H&&Q}},{key:"isSeekable",value:function(){return this.hasKeyframesIndex===!0}},{key:"getNearestKeyframe",value:function(H){if(this.keyframesIndex==null)return null;var Q=this.keyframesIndex,ne=this._search(Q.times,H);return{index:ne,milliseconds:Q.times[ne],fileposition:Q.filepositions[ne]}}},{key:"_search",value:function(H,Q){var ne=0,se=H.length-1,Se=0,He=0,qe=se;for(Q<H[0]&&(ne=0,He=qe+1);He<=qe;)if(Se=He+Math.floor((qe-He)/2),Se===se||Q>=H[Se]&&Q<H[Se+1]){ne=Se;break}else H[Se]<Q?He=Se+1:qe=Se-1;return ne}}]),Te}(),Le=je;function ke(Te,de,H){var Q=Te;if(de+H<Q.length){for(;H--;)if((Q[++de]&192)!==128)return!1;return!0}else return!1}function Fe(Te){for(var de=[],H=Te,Q=0,ne=Te.length;Q<ne;){if(H[Q]<128){de.push(String.fromCharCode(H[Q])),++Q;continue}else if(!(H[Q]<192)){if(H[Q]<224){if(ke(H,Q,1)){var se=(H[Q]&31)<<6|H[Q+1]&63;if(se>=128){de.push(String.fromCharCode(se&65535)),Q+=2;continue}}}else if(H[Q]<240){if(ke(H,Q,2)){var Se=(H[Q]&15)<<12|(H[Q+1]&63)<<6|H[Q+2]&63;if(Se>=2048&&(Se&63488)!==55296){de.push(String.fromCharCode(Se&65535)),Q+=3;continue}}}else if(H[Q]<248&&ke(H,Q,3)){var He=(H[Q]&7)<<18|(H[Q+1]&63)<<12|(H[Q+2]&63)<<6|H[Q+3]&63;if(He>65536&&He<1114112){He-=65536,de.push(String.fromCharCode(He>>>10|55296)),de.push(String.fromCharCode(He&1023|56320)),Q+=4;continue}}}de.push(String.fromCharCode(65533)),++Q}return de.join("")}var ge=Fe,ce=function(){var Te=new ArrayBuffer(2);return new DataView(Te).setInt16(0,256,!0),new Int16Array(Te)[0]===256}(),Ie=function(){function Te(){Object(re.a)(this,Te)}return Object($.a)(Te,null,[{key:"parseScriptData",value:function(H,Q,ne){var se={};try{var Se=Te.parseValue(H,Q,ne),He=Te.parseValue(H,Q+Se.size,ne-Se.size);se[Se.data]=He.data}catch(qe){w.e("AMF",qe.toString())}return se}},{key:"parseObject",value:function(H,Q,ne){if(ne<3)throw new c("Data not enough when parse ScriptDataObject");var se=Te.parseString(H,Q,ne),Se=Te.parseValue(H,Q+se.size,ne-se.size),He=Se.objectEnd;return{data:{name:se.data,value:Se.data},size:se.size+Se.size,objectEnd:He}}},{key:"parseVariable",value:function(H,Q,ne){return Te.parseObject(H,Q,ne)}},{key:"parseString",value:function(H,Q,ne){if(ne<2)throw new c("Data not enough when parse String");var se=new DataView(H,Q,ne),Se=se.getUint16(0,!ce),He;return Se>0?He=ge(new Uint8Array(H,Q+2,Se)):He="",{data:He,size:2+Se}}},{key:"parseLongString",value:function(H,Q,ne){if(ne<4)throw new c("Data not enough when parse LongString");var se=new DataView(H,Q,ne),Se=se.getUint32(0,!ce),He;return Se>0?He=ge(new Uint8Array(H,Q+4,Se)):He="",{data:He,size:4+Se}}},{key:"parseDate",value:function(H,Q,ne){if(ne<10)throw new c("Data size invalid when parse Date");var se=new DataView(H,Q,ne),Se=se.getFloat64(0,!ce),He=se.getInt16(8,!ce);return Se+=He*60*1e3,{data:new Date(Se),size:8+2}}},{key:"parseValue",value:function(H,Q,ne){if(ne<1)throw new c("Data not enough when parse Value");var se=new DataView(H,Q,ne),Se=1,He=se.getUint8(0),qe,Tt=!1;try{switch(He){case 0:qe=se.getFloat64(1,!ce),Se+=8;break;case 1:{var Lt=se.getUint8(1);qe=!!Lt,Se+=1;break}case 2:{var rt=Te.parseString(H,Q+1,ne-1);qe=rt.data,Se+=rt.size;break}case 3:{qe={};var Ct=0;for((se.getUint32(ne-4,!ce)&16777215)===9&&(Ct=3);Se<ne-4;){var Jt=Te.parseObject(H,Q+Se,ne-Se-Ct);if(Jt.objectEnd)break;qe[Jt.data.name]=Jt.data.value,Se+=Jt.size}if(Se<=ne-3){var St=se.getUint32(Se-1,!ce)&16777215;St===9&&(Se+=3)}break}case 8:{qe={},Se+=4;var nn=0;for((se.getUint32(ne-4,!ce)&16777215)===9&&(nn=3);Se<ne-8;){var Qt=Te.parseVariable(H,Q+Se,ne-Se-nn);if(Qt.objectEnd)break;qe[Qt.data.name]=Qt.data.value,Se+=Qt.size}if(Se<=ne-3){var Ut=se.getUint32(Se-1,!ce)&16777215;Ut===9&&(Se+=3)}break}case 9:qe=void 0,Se=1,Tt=!0;break;case 10:{qe=[];var vt=se.getUint32(1,!ce);Se+=4;for(var En=0;En<vt;En++){var xn=Te.parseValue(H,Q+Se,ne-Se);qe.push(xn.data),Se+=xn.size}break}case 11:{var ln=Te.parseDate(H,Q+1,ne-1);qe=ln.data,Se+=ln.size;break}case 12:{var un=Te.parseString(H,Q+1,ne-1);qe=un.data,Se+=un.size;break}default:Se=ne,w.w("AMF","Unsupported AMF value type "+He)}}catch(er){w.e("AMF",er.toString())}return{data:qe,size:Se,objectEnd:Tt}}}]),Te}(),Ne=Ie,Xe=function(){function Te(de){Object(re.a)(this,Te),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($.a)(Te,[{key:"destroy",value:function(){this._buffer=null}},{key:"_fillCurrentWord",value:function(){var H=this._total_bytes-this._buffer_index;if(H<=0)throw new c("ExpGolomb: _fillCurrentWord() but no bytes available");var Q=Math.min(4,H),ne=new Uint8Array(4);ne.set(this._buffer.subarray(this._buffer_index,this._buffer_index+Q)),this._current_word=new DataView(ne.buffer).getUint32(0,!1),this._buffer_index+=Q,this._current_word_bits_left=Q*8}},{key:"readBits",value:function(H){if(H>32)throw new s("ExpGolomb: readBits() bits exceeded max 32bits!");if(H<=this._current_word_bits_left){var Q=this._current_word>>>32-H;return this._current_word<<=H,this._current_word_bits_left-=H,Q}var ne=this._current_word_bits_left?this._current_word:0;ne=ne>>>32-this._current_word_bits_left;var se=H-this._current_word_bits_left;this._fillCurrentWord();var Se=Math.min(se,this._current_word_bits_left),He=this._current_word>>>32-Se;return this._current_word<<=Se,this._current_word_bits_left-=Se,ne=ne<<Se|He,ne}},{key:"readBool",value:function(){return this.readBits(1)===1}},{key:"readByte",value:function(){return this.readBits(8)}},{key:"_skipLeadingZero",value:function(){var H;for(H=0;H<this._current_word_bits_left;H++)if((this._current_word&2147483648>>>H)!==0)return this._current_word<<=H,this._current_word_bits_left-=H,H;return this._fillCurrentWord(),H+this._skipLeadingZero()}},{key:"readUEG",value:function(){var H=this._skipLeadingZero();return this.readBits(H+1)-1}},{key:"readSEG",value:function(){var H=this.readUEG();return H&1?H+1>>>1:-1*(H>>>1)}}]),Te}(),te=Xe,k=function(){function Te(){Object(re.a)(this,Te)}return Object($.a)(Te,null,[{key:"_ebsp2rbsp",value:function(H){for(var Q=H,ne=Q.byteLength,se=new Uint8Array(ne),Se=0,He=0;He<ne;He++){if(He>=2&&(Q[He]===3&&Q[He-1]===0&&Q[He-2]===0))continue;se[Se]=Q[He],Se++}return new Uint8Array(se.buffer,0,Se)}},{key:"parseSPS",value:function(H){var Q=Te._ebsp2rbsp(H),ne=new te(Q);ne.readByte();var se=ne.readByte();ne.readByte();var Se=ne.readByte();ne.readUEG();var He=Te.getProfileString(se),qe=Te.getLevelString(Se),Tt=1,Lt=420,rt=[0,420,422,444],Ct=8;if((se===100||se===110||se===122||se===244||se===44||se===83||se===86||se===118||se===128||se===138||se===144)&&(Tt=ne.readUEG(),Tt===3&&ne.readBits(1),Tt<=3&&(Lt=rt[Tt]),Ct=ne.readUEG()+8,ne.readUEG(),ne.readBits(1),ne.readBool()))for(var Jt=Tt!==3?8:12,St=0;St<Jt;St++)ne.readBool()&&(St<6?Te._skipScalingList(ne,16):Te._skipScalingList(ne,64));ne.readUEG();var nn=ne.readUEG();if(nn===0)ne.readUEG();else if(nn===1){ne.readBits(1),ne.readSEG(),ne.readSEG();for(var Qt=ne.readUEG(),Ut=0;Ut<Qt;Ut++)ne.readSEG()}var vt=ne.readUEG();ne.readBits(1);var En=ne.readUEG(),xn=ne.readUEG(),ln=ne.readBits(1);ln===0&&ne.readBits(1),ne.readBits(1);var un=0,er=0,ir=0,gt=0,yr=ne.readBool();yr&&(un=ne.readUEG(),er=ne.readUEG(),ir=ne.readUEG(),gt=ne.readUEG());var Cr=1,gn=1,Ln=0,_r=!0,Jr=0,kr=0,tr=ne.readBool();if(tr){if(ne.readBool()){var fr=ne.readByte(),Ei=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],Er=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];fr>0&&fr<16?(Cr=Ei[fr-1],gn=Er[fr-1]):fr===255&&(Cr=ne.readByte()<<8|ne.readByte(),gn=ne.readByte()<<8|ne.readByte())}if(ne.readBool()&&ne.readBool(),ne.readBool()&&(ne.readBits(4),ne.readBool()&&ne.readBits(24)),ne.readBool()&&(ne.readUEG(),ne.readUEG()),ne.readBool()){var ur=ne.readBits(32),xr=ne.readBits(32);_r=ne.readBool(),Jr=xr,kr=ur*2,Ln=Jr/kr}}var zr=1;(Cr!==1||gn!==1)&&(zr=Cr/gn);var Rr=0,Gr=0;if(Tt===0)Rr=1,Gr=2-ln;else{var br=Tt===3?1:2,xi=Tt===1?2:1;Rr=br,Gr=xi*(2-ln)}var oi=(En+1)*16,Br=(2-ln)*((xn+1)*16);oi-=(un+er)*Rr,Br-=(ir+gt)*Gr;var ci=Math.ceil(oi*zr);return ne.destroy(),ne=null,{profile_string:He,level_string:qe,bit_depth:Ct,ref_frames:vt,chroma_format:Lt,chroma_format_string:Te.getChromaFormatString(Lt),frame_rate:{fixed:_r,fps:Ln,fps_den:kr,fps_num:Jr},sar_ratio:{width:Cr,height:gn},codec_size:{width:oi,height:Br},present_size:{width:ci,height:Br}}}},{key:"_skipScalingList",value:function(H,Q){for(var ne=8,se=8,Se=0,He=0;He<Q;He++)se!==0&&(Se=H.readSEG(),se=(ne+Se+256)%256),ne=se===0?ne:se}},{key:"getProfileString",value:function(H){switch(H){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(H){return(H/10).toFixed(1)}},{key:"getChromaFormatString",value:function(H){switch(H){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}]),Te}(),N=k,J={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"},V=J;function Y(Te){return Te>>>8&255|(Te&255)<<8}function me(Te){return(Te&4278190080)>>>24|(Te&16711680)>>>8|(Te&65280)<<8|(Te&255)<<24}function Ae(Te,de){return Te[de]<<24|Te[de+1]<<16|Te[de+2]<<8|Te[de+3]}var at=function(){function Te(de,H){Object(re.a)(this,Te),this.TAG="FLVDemuxer",this._config=H,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 Le,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 Q=new ArrayBuffer(2);return new DataView(Q).setInt16(0,256,!0),new Int16Array(Q)[0]===256}()}return Object($.a)(Te,[{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(H){return H.onDataArrival=this.parseChunks.bind(this),this}},{key:"onTrackMetadata",get:function(){return this._onTrackMetadata},set:function(H){this._onTrackMetadata=H}},{key:"onMediaInfo",get:function(){return this._onMediaInfo},set:function(H){this._onMediaInfo=H}},{key:"onMetaDataArrived",get:function(){return this._onMetaDataArrived},set:function(H){this._onMetaDataArrived=H}},{key:"onScriptDataArrived",get:function(){return this._onScriptDataArrived},set:function(H){this._onScriptDataArrived=H}},{key:"onError",get:function(){return this._onError},set:function(H){this._onError=H}},{key:"onDataAvailable",get:function(){return this._onDataAvailable},set:function(H){this._onDataAvailable=H}},{key:"timestampBase",get:function(){return this._timestampBase},set:function(H){this._timestampBase=H}},{key:"overridedDuration",get:function(){return this._duration},set:function(H){this._durationOverrided=!0,this._duration=H,this._mediaInfo.duration=H}},{key:"overridedHasAudio",set:function(H){this._hasAudioFlagOverrided=!0,this._hasAudio=H,this._mediaInfo.hasAudio=H}},{key:"overridedHasVideo",set:function(H){this._hasVideoFlagOverrided=!0,this._hasVideo=H,this._mediaInfo.hasVideo=H}},{key:"resetMediaInfo",value:function(){this._mediaInfo=new Le}},{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(H,Q){if(!this._onError||!this._onMediaInfo||!this._onTrackMetadata||!this._onDataAvailable)throw new c("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var ne=0,se=this._littleEndian;if(Q===0)if(H.byteLength>13){var Se=Te.probe(H);ne=Se.dataOffset}else return 0;if(this._firstParse){this._firstParse=!1,Q+ne!==this._dataOffset&&w.w(this.TAG,"First time parsing but chunk byteStart invalid!");var He=new DataView(H,ne),qe=He.getUint32(0,!se);qe!==0&&w.w(this.TAG,"PrevTagSize0 !== 0 !!!"),ne+=4}for(;ne<H.byteLength;){this._dispatch=!0;var Tt=new DataView(H,ne);if(ne+11+4>H.byteLength)break;var Lt=Tt.getUint8(0),rt=Tt.getUint32(0,!se)&16777215;if(ne+11+rt+4>H.byteLength)break;if(Lt!==8&&Lt!==9&&Lt!==18){w.w(this.TAG,"Unsupported tag type ".concat(Lt,", skipped")),ne+=11+rt+4;continue}var Ct=Tt.getUint8(4),Jt=Tt.getUint8(5),St=Tt.getUint8(6),nn=Tt.getUint8(7),Qt=St|Jt<<8|Ct<<16|nn<<24,Ut=Tt.getUint32(7,!se)&16777215;Ut!==0&&w.w(this.TAG,"Meet tag which has StreamID != 0!");var vt=ne+11;switch(Lt){case 8:this._parseAudioData(H,vt,rt,Qt);break;case 9:this._parseVideoData(H,vt,rt,Qt,Q+ne);break;case 18:this._parseScriptData(H,vt,rt);break}var En=Tt.getUint32(11+rt,!se);En!==11+rt&&w.w(this.TAG,"Invalid PrevTagSize ".concat(En)),ne+=11+rt+4}return this._isInitialMetadataDispatched()&&(this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack)),ne}},{key:"_parseScriptData",value:function(H,Q,ne){var se=Ne.parseScriptData(H,Q,ne);if(se.hasOwnProperty("onMetaData")){if(se.onMetaData==null||typeof se.onMetaData!="object"){w.w(this.TAG,"Invalid onMetaData structure!");return}this._metadata&&w.w(this.TAG,"Found another onMetaData tag!"),this._metadata=se;var Se=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},Se)),typeof Se.hasAudio=="boolean"&&(this._hasAudioFlagOverrided===!1&&(this._hasAudio=Se.hasAudio,this._mediaInfo.hasAudio=this._hasAudio)),typeof Se.hasVideo=="boolean"&&(this._hasVideoFlagOverrided===!1&&(this._hasVideo=Se.hasVideo,this._mediaInfo.hasVideo=this._hasVideo)),typeof Se.audiodatarate=="number"&&(this._mediaInfo.audioDataRate=Se.audiodatarate),typeof Se.videodatarate=="number"&&(this._mediaInfo.videoDataRate=Se.videodatarate),typeof Se.width=="number"&&(this._mediaInfo.width=Se.width),typeof Se.height=="number"&&(this._mediaInfo.height=Se.height),typeof Se.duration=="number"){if(!this._durationOverrided){var He=Math.floor(Se.duration*this._timescale);this._duration=He,this._mediaInfo.duration=He}}else this._mediaInfo.duration=0;if(typeof Se.framerate=="number"){var qe=Math.floor(Se.framerate*1e3);if(qe>0){var Tt=qe/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=Tt,this._referenceFrameRate.fps_num=qe,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=Tt}}if(typeof Se.keyframes=="object"){this._mediaInfo.hasKeyframesIndex=!0;var Lt=Se.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(Lt),Se.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=Se,w.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(H){for(var Q=[],ne=[],se=1;se<H.times.length;se++){var Se=this._timestampBase+Math.floor(H.times[se]*1e3);Q.push(Se),ne.push(H.filepositions[se])}return{times:Q,filepositions:ne}}},{key:"_parseAudioData",value:function(H,Q,ne,se){if(ne<=1){w.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");return}if(this._hasAudioFlagOverrided===!0&&this._hasAudio===!1)return;var Se=this._littleEndian,He=new DataView(H,Q,ne),qe=He.getUint8(0),Tt=qe>>>4;if(Tt!==2&&Tt!==10){this._onError(V.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+Tt);return}var Lt=0,rt=(qe&12)>>>2;if(rt>=0&&rt<=4)Lt=this._flvSoundRateTable[rt];else{this._onError(V.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+rt);return}var Ct=(qe&2)>>>1,Jt=qe&1,St=this._audioMetadata,nn=this._audioTrack;if(St||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),St=this._audioMetadata={},St.type="audio",St.id=nn.id,St.timescale=this._timescale,St.duration=this._duration,St.audioSampleRate=Lt,St.channelCount=Jt===0?1:2),Tt===10){var Qt=this._parseAACAudioData(H,Q+1,ne-1);if(Qt==null)return;if(Qt.packetType===0){St.config&&w.w(this.TAG,"Found another AudioSpecificConfig!");var Ut=Qt.data;St.audioSampleRate=Ut.samplingRate,St.channelCount=Ut.channelCount,St.codec=Ut.codec,St.originalCodec=Ut.originalCodec,St.config=Ut.config,St.refSampleDuration=1024/St.audioSampleRate*St.timescale,w.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",St);var vt=this._mediaInfo;vt.audioCodec=St.originalCodec,vt.audioSampleRate=St.audioSampleRate,vt.audioChannelCount=St.channelCount,vt.hasVideo?vt.videoCodec!=null&&(vt.mimeType='video/x-flv; codecs="'+vt.videoCodec+","+vt.audioCodec+'"'):vt.mimeType='video/x-flv; codecs="'+vt.audioCodec+'"',vt.isComplete()&&this._onMediaInfo(vt)}else if(Qt.packetType===1){var En=this._timestampBase+se,xn={unit:Qt.data,length:Qt.data.byteLength,dts:En,pts:En};nn.samples.push(xn),nn.length+=Qt.data.length}else w.e(this.TAG,"Flv: Unsupported AAC data type ".concat(Qt.packetType))}else if(Tt===2){if(!St.codec){var ln=this._parseMP3AudioData(H,Q+1,ne-1,!0);if(ln==null)return;St.audioSampleRate=ln.samplingRate,St.channelCount=ln.channelCount,St.codec=ln.codec,St.originalCodec=ln.originalCodec,St.refSampleDuration=1152/St.audioSampleRate*St.timescale,w.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",St);var un=this._mediaInfo;un.audioCodec=St.codec,un.audioSampleRate=St.audioSampleRate,un.audioChannelCount=St.channelCount,un.audioDataRate=ln.bitRate,un.hasVideo?un.videoCodec!=null&&(un.mimeType='video/x-flv; codecs="'+un.videoCodec+","+un.audioCodec+'"'):un.mimeType='video/x-flv; codecs="'+un.audioCodec+'"',un.isComplete()&&this._onMediaInfo(un)}var er=this._parseMP3AudioData(H,Q+1,ne-1,!1);if(er==null)return;var ir=this._timestampBase+se,gt={unit:er,length:er.byteLength,dts:ir,pts:ir};nn.samples.push(gt),nn.length+=er.length}}},{key:"_parseAACAudioData",value:function(H,Q,ne){if(ne<=1){w.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");return}var se={},Se=new Uint8Array(H,Q,ne);return se.packetType=Se[0],Se[0]===0?se.data=this._parseAACAudioSpecificConfig(H,Q+1,ne-1):se.data=Se.subarray(1),se}},{key:"_parseAACAudioSpecificConfig",value:function(H,Q,ne){var se=new Uint8Array(H,Q,ne),Se=null,He=0,qe=0,Tt=null,Lt=0,rt=null;if(He=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 Ct=this._mpegSamplingRates[Lt],Jt=(se[1]&120)>>>3;if(Jt<0||Jt>=8){this._onError(V.FORMAT_ERROR,"Flv: AAC invalid channel configuration");return}He===5&&(rt=(se[1]&7)<<1|se[2]>>>7,Tt=(se[2]&124)>>>2);var St=self.navigator.userAgent.toLowerCase();return St.indexOf("firefox")!==-1?Lt>=6?(He=5,Se=new Array(4),rt=Lt-3):(He=2,Se=new Array(2),rt=Lt):St.indexOf("android")!==-1?(He=2,Se=new Array(2),rt=Lt):(He=5,rt=Lt,Se=new Array(4),Lt>=6?rt=Lt-3:Jt===1&&(He=2,Se=new Array(2),rt=Lt)),Se[0]=He<<3,Se[0]|=(Lt&15)>>>1,Se[1]=(Lt&15)<<7,Se[1]|=(Jt&15)<<3,He===5&&(Se[1]|=(rt&15)>>>1,Se[2]=(rt&1)<<7,Se[2]|=2<<2,Se[3]=0),{config:Se,samplingRate:Ct,channelCount:Jt,codec:"mp4a.40."+He,originalCodec:"mp4a.40."+qe}}},{key:"_parseMP3AudioData",value:function(H,Q,ne,se){if(ne<4){w.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");return}var Se=this._littleEndian,He=new Uint8Array(H,Q,ne),qe=null;if(se){if(He[0]!==255)return;var Tt=He[1]>>>3&3,Lt=(He[1]&6)>>1,rt=(He[2]&240)>>>4,Ct=(He[2]&12)>>>2,Jt=He[3]>>>6&3,St=Jt!==3?2:1,nn=0,Qt=0,Ut=34,vt="mp3";switch(Tt){case 0:nn=this._mpegAudioV25SampleRateTable[Ct];break;case 2:nn=this._mpegAudioV20SampleRateTable[Ct];break;case 3:nn=this._mpegAudioV10SampleRateTable[Ct];break}switch(Lt){case 1:Ut=34,rt<this._mpegAudioL3BitRateTable.length&&(Qt=this._mpegAudioL3BitRateTable[rt]);break;case 2:Ut=33,rt<this._mpegAudioL2BitRateTable.length&&(Qt=this._mpegAudioL2BitRateTable[rt]);break;case 3:Ut=32,rt<this._mpegAudioL1BitRateTable.length&&(Qt=this._mpegAudioL1BitRateTable[rt]);break}qe={bitRate:Qt,samplingRate:nn,channelCount:St,codec:vt,originalCodec:vt}}else qe=He;return qe}},{key:"_parseVideoData",value:function(H,Q,ne,se,Se){if(ne<=1){w.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");return}if(this._hasVideoFlagOverrided===!0&&this._hasVideo===!1)return;var He=new Uint8Array(H,Q,ne)[0],qe=(He&240)>>>4,Tt=He&15;if(Tt!==7){this._onError(V.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: ".concat(Tt));return}this._parseAVCVideoPacket(H,Q+1,ne-1,se,Se,qe)}},{key:"_parseAVCVideoPacket",value:function(H,Q,ne,se,Se,He){if(ne<4){w.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");return}var qe=this._littleEndian,Tt=new DataView(H,Q,ne),Lt=Tt.getUint8(0),rt=Tt.getUint32(0,!qe)&16777215,Ct=rt<<8>>8;if(Lt===0)this._parseAVCDecoderConfigurationRecord(H,Q+4,ne-4);else if(Lt===1)this._parseAVCVideoData(H,Q+4,ne-4,se,Se,He,Ct);else if(!(Lt===2)){this._onError(V.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(Lt));return}}},{key:"_parseAVCDecoderConfigurationRecord",value:function(H,Q,ne){if(ne<7){w.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");return}var se=this._videoMetadata,Se=this._videoTrack,He=this._littleEndian,qe=new DataView(H,Q,ne);se?typeof se.avcc!="undefined"&&w.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=Se.id,se.timescale=this._timescale,se.duration=this._duration);var Tt=qe.getUint8(0),Lt=qe.getUint8(1),rt=qe.getUint8(2),Ct=qe.getUint8(3);if(Tt!==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 Jt=qe.getUint8(5)&31;if(Jt===0){this._onError(V.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");return}else Jt>1&&w.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ".concat(Jt));for(var St=6,nn=0;nn<Jt;nn++){var Qt=qe.getUint16(St,!He);if(St+=2,Qt===0)continue;var Ut=new Uint8Array(H,Q+St,Qt);St+=Qt;var vt=N.parseSPS(Ut);if(nn!==0)continue;se.codecWidth=vt.codec_size.width,se.codecHeight=vt.codec_size.height,se.presentWidth=vt.present_size.width,se.presentHeight=vt.present_size.height,se.profile=vt.profile_string,se.level=vt.level_string,se.bitDepth=vt.bit_depth,se.chromaFormat=vt.chroma_format,se.sarRatio=vt.sar_ratio,se.frameRate=vt.frame_rate,(vt.frame_rate.fixed===!1||vt.frame_rate.fps_num===0||vt.frame_rate.fps_den===0)&&(se.frameRate=this._referenceFrameRate);var En=se.frameRate.fps_den,xn=se.frameRate.fps_num;se.refSampleDuration=se.timescale*(En/xn);for(var ln=Ut.subarray(1,4),un="avc1.",er=0;er<3;er++){var ir=ln[er].toString(16);ir.length<2&&(ir="0"+ir),un+=ir}se.codec=un;var gt=this._mediaInfo;gt.width=se.codecWidth,gt.height=se.codecHeight,gt.fps=se.frameRate.fps,gt.profile=se.profile,gt.level=se.level,gt.refFrames=vt.ref_frames,gt.chromaFormat=vt.chroma_format_string,gt.sarNum=se.sarRatio.width,gt.sarDen=se.sarRatio.height,gt.videoCodec=un,gt.hasAudio?gt.audioCodec!=null&&(gt.mimeType='video/x-flv; codecs="'+gt.videoCodec+","+gt.audioCodec+'"'):gt.mimeType='video/x-flv; codecs="'+gt.videoCodec+'"',gt.isComplete()&&this._onMediaInfo(gt)}var yr=qe.getUint8(St);if(yr===0){this._onError(V.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS");return}else yr>1&&w.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ".concat(yr));St++;for(var Cr=0;Cr<yr;Cr++){var gn=qe.getUint16(St,!He);if(St+=2,gn===0)continue;St+=gn}se.avcc=new Uint8Array(ne),se.avcc.set(new Uint8Array(H,Q,ne),0),w.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(H,Q,ne,se,Se,He,qe){for(var Tt=this._littleEndian,Lt=new DataView(H,Q,ne),rt=[],Ct=0,Jt=0,St=this._naluLengthSize,nn=this._timestampBase+se,Qt=He===1;Jt<ne;){if(Jt+4>=ne){w.w(this.TAG,"Malformed Nalu near timestamp ".concat(nn,", offset = ").concat(Jt,", dataSize = ").concat(ne));break}var Ut=Lt.getUint32(Jt,!Tt);if(St===3&&(Ut>>>=8),Ut>ne-St){w.w(this.TAG,"Malformed Nalus near timestamp ".concat(nn,", NaluSize > DataSize!"));return}var vt=Lt.getUint8(Jt+St)&31;vt===5&&(Qt=!0);var En=new Uint8Array(H,Q+Jt,St+Ut),xn={type:vt,data:En};rt.push(xn),Ct+=En.byteLength,Jt+=St+Ut}if(rt.length){var ln=this._videoTrack,un={units:rt,length:Ct,isKeyframe:Qt,dts:nn,cts:qe,pts:nn+qe};Qt&&(un.fileposition=Se),ln.samples.push(un),ln.length+=Ct}}}],[{key:"probe",value:function(H){var Q=new Uint8Array(H),ne={match:!1};if(Q[0]!==70||Q[1]!==76||Q[2]!==86||Q[3]!==1)return ne;var se=(Q[4]&4)>>>2!==0,Se=(Q[4]&1)!==0,He=Ae(Q,5);return He<9?ne:{match:!0,consumed:He,dataOffset:He,hasAudioTrack:se,hasVideoTrack:Se}}}]),Te}(),Re=at,Pe=function(){function Te(){Object(re.a)(this,Te)}return Object($.a)(Te,null,[{key:"init",value:function(){Te.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 H in Te.types)Te.types.hasOwnProperty(H)&&(Te.types[H]=[H.charCodeAt(0),H.charCodeAt(1),H.charCodeAt(2),H.charCodeAt(3)]);var Q=Te.constants={};Q.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),Q.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),Q.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),Q.STSC=Q.STCO=Q.STTS,Q.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Q.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]),Q.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]),Q.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Q.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),Q.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}},{key:"box",value:function(H){for(var Q=8,ne=null,se=Array.prototype.slice.call(arguments,1),Se=se.length,He=0;He<Se;He++)Q+=se[He].byteLength;ne=new Uint8Array(Q),ne[0]=Q>>>24&255,ne[1]=Q>>>16&255,ne[2]=Q>>>8&255,ne[3]=Q&255,ne.set(H,4);for(var qe=8,Tt=0;Tt<Se;Tt++)ne.set(se[Tt],qe),qe+=se[Tt].byteLength;return ne}},{key:"generateInitSegment",value:function(H){var Q=Te.box(Te.types.ftyp,Te.constants.FTYP),ne=Te.moov(H),se=new Uint8Array(Q.byteLength+ne.byteLength);return se.set(Q,0),se.set(ne,Q.byteLength),se}},{key:"moov",value:function(H){var Q=Te.mvhd(H.timescale,H.duration),ne=Te.trak(H),se=Te.mvex(H);return Te.box(Te.types.moov,Q,ne,se)}},{key:"mvhd",value:function(H,Q){return Te.box(Te.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,H>>>24&255,H>>>16&255,H>>>8&255,H&255,Q>>>24&255,Q>>>16&255,Q>>>8&255,Q&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(H){return Te.box(Te.types.trak,Te.tkhd(H),Te.mdia(H))}},{key:"tkhd",value:function(H){var Q=H.id,ne=H.duration,se=H.presentWidth,Se=H.presentHeight;return Te.box(Te.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,Q>>>24&255,Q>>>16&255,Q>>>8&255,Q&255,0,0,0,0,ne>>>24&255,ne>>>16&255,ne>>>8&255,ne&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,Se>>>8&255,Se&255,0,0]))}},{key:"mdia",value:function(H){return Te.box(Te.types.mdia,Te.mdhd(H),Te.hdlr(H),Te.minf(H))}},{key:"mdhd",value:function(H){var Q=H.timescale,ne=H.duration;return Te.box(Te.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,Q>>>24&255,Q>>>16&255,Q>>>8&255,Q&255,ne>>>24&255,ne>>>16&255,ne>>>8&255,ne&255,85,196,0,0]))}},{key:"hdlr",value:function(H){var Q=null;return H.type==="audio"?Q=Te.constants.HDLR_AUDIO:Q=Te.constants.HDLR_VIDEO,Te.box(Te.types.hdlr,Q)}},{key:"minf",value:function(H){var Q=null;return H.type==="audio"?Q=Te.box(Te.types.smhd,Te.constants.SMHD):Q=Te.box(Te.types.vmhd,Te.constants.VMHD),Te.box(Te.types.minf,Q,Te.dinf(),Te.stbl(H))}},{key:"dinf",value:function(){var H=Te.box(Te.types.dinf,Te.box(Te.types.dref,Te.constants.DREF));return H}},{key:"stbl",value:function(H){var Q=Te.box(Te.types.stbl,Te.stsd(H),Te.box(Te.types.stts,Te.constants.STTS),Te.box(Te.types.stsc,Te.constants.STSC),Te.box(Te.types.stsz,Te.constants.STSZ),Te.box(Te.types.stco,Te.constants.STCO));return Q}},{key:"stsd",value:function(H){return H.type==="audio"?H.codec==="mp3"?Te.box(Te.types.stsd,Te.constants.STSD_PREFIX,Te.mp3(H)):Te.box(Te.types.stsd,Te.constants.STSD_PREFIX,Te.mp4a(H)):Te.box(Te.types.stsd,Te.constants.STSD_PREFIX,Te.avc1(H))}},{key:"mp3",value:function(H){var Q=H.channelCount,ne=H.audioSampleRate,se=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,Q,0,16,0,0,0,0,ne>>>8&255,ne&255,0,0]);return Te.box(Te.types[".mp3"],se)}},{key:"mp4a",value:function(H){var Q=H.channelCount,ne=H.audioSampleRate,se=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,Q,0,16,0,0,0,0,ne>>>8&255,ne&255,0,0]);return Te.box(Te.types.mp4a,se,Te.esds(H))}},{key:"esds",value:function(H){var Q=H.config||[],ne=Q.length,se=new Uint8Array([0,0,0,0,3,23+ne,0,1,0,4,15+ne,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([ne]).concat(Q).concat([6,1,2]));return Te.box(Te.types.esds,se)}},{key:"avc1",value:function(H){var Q=H.avcc,ne=H.codecWidth,se=H.codecHeight,Se=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,ne>>>8&255,ne&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 Te.box(Te.types.avc1,Se,Te.box(Te.types.avcC,Q))}},{key:"mvex",value:function(H){return Te.box(Te.types.mvex,Te.trex(H))}},{key:"trex",value:function(H){var Q=H.id,ne=new Uint8Array([0,0,0,0,Q>>>24&255,Q>>>16&255,Q>>>8&255,Q&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return Te.box(Te.types.trex,ne)}},{key:"moof",value:function(H,Q){return Te.box(Te.types.moof,Te.mfhd(H.sequenceNumber),Te.traf(H,Q))}},{key:"mfhd",value:function(H){var Q=new Uint8Array([0,0,0,0,H>>>24&255,H>>>16&255,H>>>8&255,H&255]);return Te.box(Te.types.mfhd,Q)}},{key:"traf",value:function(H,Q){var ne=H.id,se=Te.box(Te.types.tfhd,new Uint8Array([0,0,0,0,ne>>>24&255,ne>>>16&255,ne>>>8&255,ne&255])),Se=Te.box(Te.types.tfdt,new Uint8Array([0,0,0,0,Q>>>24&255,Q>>>16&255,Q>>>8&255,Q&255])),He=Te.sdtp(H),qe=Te.trun(H,He.byteLength+16+16+8+16+8+8);return Te.box(Te.types.traf,se,Se,qe,He)}},{key:"sdtp",value:function(H){for(var Q=H.samples||[],ne=Q.length,se=new Uint8Array(4+ne),Se=0;Se<ne;Se++){var He=Q[Se].flags;se[Se+4]=He.isLeading<<6|He.dependsOn<<4|He.isDependedOn<<2|He.hasRedundancy}return Te.box(Te.types.sdtp,se)}},{key:"trun",value:function(H,Q){var ne=H.samples||[],se=ne.length,Se=12+16*se,He=new Uint8Array(Se);Q+=8+Se,He.set([0,0,15,1,se>>>24&255,se>>>16&255,se>>>8&255,se&255,Q>>>24&255,Q>>>16&255,Q>>>8&255,Q&255],0);for(var qe=0;qe<se;qe++){var Tt=ne[qe].duration,Lt=ne[qe].size,rt=ne[qe].flags,Ct=ne[qe].cts;He.set([Tt>>>24&255,Tt>>>16&255,Tt>>>8&255,Tt&255,Lt>>>24&255,Lt>>>16&255,Lt>>>8&255,Lt&255,rt.isLeading<<2|rt.dependsOn,rt.isDependedOn<<6|rt.hasRedundancy<<4|rt.isNonSync,0,0,Ct>>>24&255,Ct>>>16&255,Ct>>>8&255,Ct&255],12+16*qe)}return Te.box(Te.types.trun,He)}},{key:"mdat",value:function(H){return Te.box(Te.types.mdat,H)}}]),Te}();Pe.init();var Ye=Pe,Ze=function(){function Te(){Object(re.a)(this,Te)}return Object($.a)(Te,null,[{key:"getSilentFrame",value:function(H,Q){if(H==="mp4a.40.2"){if(Q===1)return new Uint8Array([0,200,0,128,35,128]);if(Q===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(Q===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(Q===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(Q===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(Q===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(Q===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(Q===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(Q===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}}]),Te}(),ze=Ze,We=function Te(de,H,Q,ne,se){Object(re.a)(this,Te),this.dts=de,this.pts=H,this.duration=Q,this.originalDts=ne,this.isSyncPoint=se,this.fileposition=null},Me=function(){function Te(){Object(re.a)(this,Te),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($.a)(Te,[{key:"appendSyncPoint",value:function(H){H.isSyncPoint=!0,this.syncPoints.push(H)}}]),Te}(),De=function(){function Te(){Object(re.a)(this,Te),this._list=[]}return Object($.a)(Te,[{key:"clear",value:function(){this._list=[]}},{key:"appendArray",value:function(H){var Q=this._list;if(H.length===0)return;Q.length>0&&H[0].originalDts<Q[Q.length-1].originalDts&&this.clear(),Array.prototype.push.apply(Q,H)}},{key:"getLastSyncPointBeforeDts",value:function(H){if(this._list.length==0)return null;var Q=this._list,ne=0,se=Q.length-1,Se=0,He=0,qe=se;for(H<Q[0].dts&&(ne=0,He=qe+1);He<=qe;)if(Se=He+Math.floor((qe-He)/2),Se===se||H>=Q[Se].dts&&H<Q[Se+1].dts){ne=Se;break}else Q[Se].dts<H?He=Se+1:qe=Se-1;return this._list[ne]}}]),Te}(),Oe=function(){function Te(de){Object(re.a)(this,Te),this._type=de,this._list=[],this._lastAppendLocation=-1}return Object($.a)(Te,[{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(H){var Q=this._list;if(Q.length===0)return-2;var ne=Q.length-1,se=0,Se=0,He=ne,qe=0;if(H<Q[0].originalBeginDts)return qe=-1,qe;for(;Se<=He;)if(se=Se+Math.floor((He-Se)/2),se===ne||H>Q[se].lastSample.originalDts&&H<Q[se+1].originalBeginDts){qe=se;break}else Q[se].originalBeginDts<H?Se=se+1:He=se-1;return qe}},{key:"_searchNearestSegmentAfter",value:function(H){return this._searchNearestSegmentBefore(H)+1}},{key:"append",value:function(H){var Q=this._list,ne=H,se=this._lastAppendLocation,Se=0;se!==-1&&se<Q.length&&ne.originalBeginDts>=Q[se].lastSample.originalDts&&(se===Q.length-1||se<Q.length-1&&ne.originalBeginDts<Q[se+1].originalBeginDts)?Se=se+1:Q.length>0&&(Se=this._searchNearestSegmentBefore(ne.originalBeginDts)+1),this._lastAppendLocation=Se,this._list.splice(Se,0,ne)}},{key:"getLastSegmentBefore",value:function(H){var Q=this._searchNearestSegmentBefore(H);return Q>=0?this._list[Q]:null}},{key:"getLastSampleBefore",value:function(H){var Q=this.getLastSegmentBefore(H);return Q!=null?Q.lastSample:null}},{key:"getLastSyncPointBefore",value:function(H){for(var Q=this._searchNearestSegmentBefore(H),ne=this._list[Q].syncPoints;ne.length===0&&Q>0;)Q--,ne=this._list[Q].syncPoints;return ne.length>0?ne[ne.length-1]:null}}]),Te}(),pe=function(){function Te(de){Object(re.a)(this,Te),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($.a)(Te,[{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(H){return H.onDataAvailable=this.remux.bind(this),H.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}},{key:"onInitSegment",get:function(){return this._onInitSegment},set:function(H){this._onInitSegment=H}},{key:"onMediaSegment",get:function(){return this._onMediaSegment},set:function(H){this._onMediaSegment=H}},{key:"insertDiscontinuity",value:function(){this._audioNextDts=this._videoNextDts=void 0}},{key:"seek",value:function(H){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}},{key:"remux",value:function(H,Q){if(!this._onMediaSegment)throw new c("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(H,Q),this._remuxVideo(Q),this._remuxAudio(H)}},{key:"_onTrackMetadataReceived",value:function(H,Q){var ne=null,se="mp4",Se=Q.codec;if(H==="audio")this._audioMeta=Q,Q.codec==="mp3"&&this._mp3UseMpegAudio?(se="mpeg",Se="",ne=new Uint8Array):ne=Ye.generateInitSegment(Q);else if(H==="video")this._videoMeta=Q,ne=Ye.generateInitSegment(Q);else return;if(!this._onInitSegment)throw new c("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(H,{type:H,data:ne.buffer,codec:Se,container:"".concat(H,"/").concat(se),mediaDuration:Q.duration})}},{key:"_calculateDtsBase",value:function(H,Q){if(this._dtsBaseInited)return;H.samples&&H.samples.length&&(this._audioDtsBase=H.samples[0].dts),Q.samples&&Q.samples.length&&(this._videoDtsBase=Q.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0}},{key:"flushStashedSamples",value:function(){var H=this._videoStashedLastSample,Q=this._audioStashedLastSample,ne={type:"video",id:1,sequenceNumber:0,samples:[],length:0};H!=null&&(ne.samples.push(H),ne.length=H.length);var se={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};Q!=null&&(se.samples.push(Q),se.length=Q.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(ne,!0),this._remuxAudio(se,!0)}},{key:"_remuxAudio",value:function(H,Q){if(this._audioMeta==null)return;var ne=H,se=ne.samples,Se=void 0,He=-1,qe=-1,Tt=-1,Lt=this._audioMeta.refSampleDuration,rt=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,Ct=this._dtsBaseInited&&this._audioNextDts===void 0,Jt=!1;if(!se||se.length===0)return;if(se.length===1&&!Q)return;var St=0,nn=null,Qt=0;rt?(St=0,Qt=ne.length):(St=8,Qt=8+ne.length);var Ut=null;if(se.length>1&&(Ut=se.pop(),Qt-=Ut.length),this._audioStashedLastSample!=null){var vt=this._audioStashedLastSample;this._audioStashedLastSample=null,se.unshift(vt),Qt+=vt.length}Ut!=null&&(this._audioStashedLastSample=Ut);var En=se[0].dts-this._dtsBase;if(this._audioNextDts)Se=En-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())Se=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&(this._audioMeta.originalCodec!=="mp3"&&(Jt=!0));else{var xn=this._audioSegmentInfoList.getLastSampleBefore(En);if(xn!=null){var ln=En-(xn.originalDts+xn.duration);ln<=3&&(ln=0);var un=xn.dts+xn.duration+ln;Se=En-un}else Se=0}if(Jt){var er=En-Se,ir=this._videoSegmentInfoList.getLastSegmentBefore(En);if(ir!=null&&ir.beginDts<er){var gt=ze.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(gt){var yr=ir.beginDts,Cr=er-ir.beginDts;w.v(this.TAG,"InsertPrefixSilentAudio: dts: ".concat(yr,", duration: ").concat(Cr)),se.unshift({unit:gt,dts:yr,pts:yr}),Qt+=gt.byteLength}}else Jt=!1}for(var gn=[],Ln=0;Ln<se.length;Ln++){var _r=se[Ln],Jr=_r.unit,kr=_r.dts-this._dtsBase,tr=kr-Se;He===-1&&(He=tr);var fr=0;if(Ln!==se.length-1){var Ei=se[Ln+1].dts-this._dtsBase-Se;fr=Ei-tr}else if(Ut!=null){var Er=Ut.dts-this._dtsBase-Se;fr=Er-tr}else gn.length>=1?fr=gn[gn.length-1].duration:fr=Math.floor(Lt);var ur=!1,xr=null;if(fr>Lt*1.5&&this._audioMeta.codec!=="mp3"&&this._fillAudioTimestampGap&&!m.safari){ur=!0;var zr=Math.abs(fr-Lt),Rr=Math.ceil(zr/Lt),Gr=tr+Lt;w.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.
|
|
|
`+"dts: ".concat(tr+fr," ms, expected: ").concat(tr+Math.round(Lt)," ms, ")+"delta: ".concat(Math.round(zr)," ms, generate: ").concat(Rr," frames"));var br=ze.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);br==null&&(w.w(this.TAG,"Unable to generate silent frame for "+"".concat(this._audioMeta.originalCodec," with ").concat(this._audioMeta.channelCount," channels, repeat last frame")),br=Jr),xr=[];for(var xi=0;xi<Rr;xi++){var oi=Math.round(Gr);if(xr.length>0){var Br=xr[xr.length-1];Br.duration=oi-Br.dts}var ci={dts:oi,pts:oi,cts:0,unit:br,size:br.byteLength,duration:0,originalDts:kr,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};xr.push(ci),Qt+=ci.size,Gr+=Lt}var Ni=xr[xr.length-1];Ni.duration=tr+fr-Ni.dts,fr=Math.round(Lt)}gn.push({dts:tr,pts:tr,cts:0,unit:_r.unit,size:_r.unit.byteLength,duration:fr,originalDts:kr,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),ur&&gn.push.apply(gn,xr)}rt?nn=new Uint8Array(Qt):(nn=new Uint8Array(Qt),nn[0]=Qt>>>24&255,nn[1]=Qt>>>16&255,nn[2]=Qt>>>8&255,nn[3]=Qt&255,nn.set(Ye.types.mdat,4));for(var Si=0;Si<gn.length;Si++){var di=gn[Si].unit;nn.set(di,St),St+=di.byteLength}var hr=gn[gn.length-1];qe=hr.dts+hr.duration,this._audioNextDts=qe;var pr=new Me;pr.beginDts=He,pr.endDts=qe,pr.beginPts=He,pr.endPts=qe,pr.originalBeginDts=gn[0].originalDts,pr.originalEndDts=hr.originalDts+hr.duration,pr.firstSample=new We(gn[0].dts,gn[0].pts,gn[0].duration,gn[0].originalDts,!1),pr.lastSample=new We(hr.dts,hr.pts,hr.duration,hr.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(pr),ne.samples=gn,ne.sequenceNumber++;var Qr=null;rt?Qr=new Uint8Array:Qr=Ye.moof(ne,He),ne.samples=[],ne.length=0;var Ui={type:"audio",data:this._mergeBoxes(Qr,nn).buffer,sampleCount:gn.length,info:pr};rt&&Ct&&(Ui.timestampOffset=He),this._onMediaSegment("audio",Ui)}},{key:"_remuxVideo",value:function(H,Q){if(this._videoMeta==null)return;var ne=H,se=ne.samples,Se=void 0,He=-1,qe=-1,Tt=-1,Lt=-1;if(!se||se.length===0)return;if(se.length===1&&!Q)return;var rt=8,Ct=null,Jt=8+H.length,St=null;if(se.length>1&&(St=se.pop(),Jt-=St.length),this._videoStashedLastSample!=null){var nn=this._videoStashedLastSample;this._videoStashedLastSample=null,se.unshift(nn),Jt+=nn.length}St!=null&&(this._videoStashedLastSample=St);var Qt=se[0].dts-this._dtsBase;if(this._videoNextDts)Se=Qt-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())Se=0;else{var Ut=this._videoSegmentInfoList.getLastSampleBefore(Qt);if(Ut!=null){var vt=Qt-(Ut.originalDts+Ut.duration);vt<=3&&(vt=0);var En=Ut.dts+Ut.duration+vt;Se=Qt-En}else Se=0}for(var xn=new Me,ln=[],un=0;un<se.length;un++){var er=se[un],ir=er.dts-this._dtsBase,gt=er.isKeyframe,yr=ir-Se,Cr=er.cts,gn=yr+Cr;He===-1&&(He=yr,Tt=gn);var Ln=0;if(un!==se.length-1){var _r=se[un+1].dts-this._dtsBase-Se;Ln=_r-yr}else if(St!=null){var Jr=St.dts-this._dtsBase-Se;Ln=Jr-yr}else ln.length>=1?Ln=ln[ln.length-1].duration:Ln=Math.floor(this._videoMeta.refSampleDuration);if(gt){var kr=new We(yr,gn,Ln,er.dts,!0);kr.fileposition=er.fileposition,xn.appendSyncPoint(kr)}ln.push({dts:yr,pts:gn,cts:Cr,units:er.units,size:er.length,isKeyframe:gt,duration:Ln,originalDts:ir,flags:{isLeading:0,dependsOn:gt?2:1,isDependedOn:gt?1:0,hasRedundancy:0,isNonSync:gt?0:1}})}Ct=new Uint8Array(Jt),Ct[0]=Jt>>>24&255,Ct[1]=Jt>>>16&255,Ct[2]=Jt>>>8&255,Ct[3]=Jt&255,Ct.set(Ye.types.mdat,4);for(var tr=0;tr<ln.length;tr++)for(var fr=ln[tr].units;fr.length;){var Ei=fr.shift(),Er=Ei.data;Ct.set(Er,rt),rt+=Er.byteLength}var ur=ln[ln.length-1];if(qe=ur.dts+ur.duration,Lt=ur.pts+ur.duration,this._videoNextDts=qe,xn.beginDts=He,xn.endDts=qe,xn.beginPts=Tt,xn.endPts=Lt,xn.originalBeginDts=ln[0].originalDts,xn.originalEndDts=ur.originalDts+ur.duration,xn.firstSample=new We(ln[0].dts,ln[0].pts,ln[0].duration,ln[0].originalDts,ln[0].isKeyframe),xn.lastSample=new We(ur.dts,ur.pts,ur.duration,ur.originalDts,ur.isKeyframe),this._isLive||this._videoSegmentInfoList.append(xn),ne.samples=ln,ne.sequenceNumber++,this._forceFirstIDR){var xr=ln[0].flags;xr.dependsOn=2,xr.isNonSync=0}var zr=Ye.moof(ne,He);ne.samples=[],ne.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(zr,Ct).buffer,sampleCount:ln.length,info:xn})}},{key:"_mergeBoxes",value:function(H,Q){var ne=new Uint8Array(H.byteLength+Q.byteLength);return ne.set(H,0),ne.set(Q,H.byteLength),ne}}]),Te}(),be=pe,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"},we=Ce,$e=function(){function Te(de,H){Object(re.a)(this,Te),this.TAG="TransmuxingController",this._emitter=new E.a,this._config=H,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 Q=0;this._mediaDataSource.segments.forEach(function(ne){ne.timestampBase=Q,Q+=ne.duration,ne.cors=de.cors,ne.withCredentials=de.withCredentials,H.referrerPolicy&&(ne.referrerPolicy=H.referrerPolicy)}),!isNaN(Q)&&this._mediaDataSource.duration!==Q&&(this._mediaDataSource.duration=Q),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}return Object($.a)(Te,[{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(H,Q){this._emitter.addListener(H,Q)}},{key:"off",value:function(H,Q){this._emitter.removeListener(H,Q)}},{key:"start",value:function(){this._loadSegment(0),this._enableStatisticsReporter()}},{key:"_loadSegment",value:function(H,Q){this._currentSegmentIndex=H;var ne=this._mediaDataSource.segments[H],se=this._ioctl=new K(ne,this._config,H);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),Q?this._demuxer.bindDataSource(this._ioctl):se.onDataArrival=this._onInitChunkArrival.bind(this),se.open(Q)}},{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(H){if(this._mediaInfo==null||!this._mediaInfo.isSeekable())return;var Q=this._searchSegmentIndexContains(H);if(Q===this._currentSegmentIndex){var ne=this._mediaInfo.segments[Q];if(ne==null)this._pendingSeekTime=H;else{var se=ne.getNearestKeyframe(H);this._remuxer.seek(se.milliseconds),this._ioctl.seek(se.fileposition),this._pendingResolveSeekPoint=se.milliseconds}}else{var Se=this._mediaInfo.segments[Q];if(Se==null)this._pendingSeekTime=H,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(Q);else{var He=Se.getNearestKeyframe(H);this._internalAbort(),this._remuxer.seek(H),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[Q].timestampBase,this._loadSegment(Q,He.fileposition),this._pendingResolveSeekPoint=He.milliseconds,this._reportSegmentMediaInfo(Q)}}this._enableStatisticsReporter()}},{key:"_searchSegmentIndexContains",value:function(H){for(var Q=this._mediaDataSource.segments,ne=Q.length-1,se=0;se<Q.length;se++)if(H<Q[se].timestampBase){ne=se-1;break}return ne}},{key:"_onInitChunkArrival",value:function(H,Q){var ne=this,se=null,Se=0;if(Q>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,Se=this._demuxer.parseChunks(H,Q);else if((se=Re.probe(H)).match){this._demuxer=new Re(se,this._config),this._remuxer||(this._remuxer=new be(this._config));var He=this._mediaDataSource;He.duration!=null&&!isNaN(He.duration)&&(this._demuxer.overridedDuration=He.duration),typeof He.hasAudio=="boolean"&&(this._demuxer.overridedHasAudio=He.hasAudio),typeof He.hasVideo=="boolean"&&(this._demuxer.overridedHasVideo=He.hasVideo),this._demuxer.timestampBase=He.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),Se=this._demuxer.parseChunks(H,Q)}else se=null,w.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(function(){ne._internalAbort()}),this._emitter.emit(we.DEMUX_ERROR,V.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),Se=0;return Se}},{key:"_onMediaInfo",value:function(H){var Q=this;this._mediaInfo==null&&(this._mediaInfo=Object.assign({},H),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,Le.prototype));var ne=Object.assign({},H);Object.setPrototypeOf(ne,Le.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=ne,this._reportSegmentMediaInfo(this._currentSegmentIndex),this._pendingSeekTime!=null&&Promise.resolve().then(function(){var se=Q._pendingSeekTime;Q._pendingSeekTime=null,Q.seek(se)})}},{key:"_onMetaDataArrived",value:function(H){this._emitter.emit(we.METADATA_ARRIVED,H)}},{key:"_onScriptDataArrived",value:function(H){this._emitter.emit(we.SCRIPTDATA_ARRIVED,H)}},{key:"_onIOSeeked",value:function(){this._remuxer.insertDiscontinuity()}},{key:"_onIOComplete",value:function(H){var Q=H,ne=Q+1;ne<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(ne)):(this._remuxer.flushStashedSamples(),this._emitter.emit(we.LOADING_COMPLETE),this._disableStatisticsReporter())}},{key:"_onIORedirect",value:function(H){var Q=this._ioctl.extraData;this._mediaDataSource.segments[Q].redirectedURL=H}},{key:"_onIORecoveredEarlyEof",value:function(){this._emitter.emit(we.RECOVERED_EARLY_EOF)}},{key:"_onIOException",value:function(H,Q){w.e(this.TAG,"IOException: type = ".concat(H,", code = ").concat(Q.code,", msg = ").concat(Q.msg)),this._emitter.emit(we.IO_ERROR,H,Q),this._disableStatisticsReporter()}},{key:"_onDemuxException",value:function(H,Q){w.e(this.TAG,"DemuxException: type = ".concat(H,", info = ").concat(Q)),this._emitter.emit(we.DEMUX_ERROR,H,Q)}},{key:"_onRemuxerInitSegmentArrival",value:function(H,Q){this._emitter.emit(we.INIT_SEGMENT,H,Q)}},{key:"_onRemuxerMediaSegmentArrival",value:function(H,Q){if(this._pendingSeekTime!=null)return;if(this._emitter.emit(we.MEDIA_SEGMENT,H,Q),this._pendingResolveSeekPoint!=null&&H==="video"){var ne=Q.info.syncPoints,se=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,m.safari&&ne.length>0&&ne[0].originalDts===se&&(se=ne[0].pts),this._emitter.emit(we.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(H){var Q=this._mediaInfo.segments[H],ne=Object.assign({},Q);ne.duration=this._mediaInfo.duration,ne.segmentCount=this._mediaInfo.segmentCount,delete ne.segments,delete ne.keyframesIndex,this._emitter.emit(we.MEDIA_INFO,ne)}},{key:"_reportStatisticsInfo",value:function(){var H={};H.url=this._ioctl.currentURL,H.hasRedirect=this._ioctl.hasRedirect,H.hasRedirect&&(H.redirectedURL=this._ioctl.currentRedirectedURL),H.speed=this._ioctl.currentSpeed,H.loaderType=this._ioctl.loaderType,H.currentSegmentIndex=this._currentSegmentIndex,H.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(we.STATISTICS_INFO,H)}}]),Te}(),it=$e,dt=function(de){var H="TransmuxingWorker",Q=null,ne=Qt.bind(this);S.install(),de.addEventListener("message",function(Ut){switch(Ut.data.cmd){case"init":Q=new it(Ut.data.param[0],Ut.data.param[1]),Q.on(we.IO_ERROR,Jt.bind(this)),Q.on(we.DEMUX_ERROR,St.bind(this)),Q.on(we.INIT_SEGMENT,se.bind(this)),Q.on(we.MEDIA_SEGMENT,Se.bind(this)),Q.on(we.LOADING_COMPLETE,He.bind(this)),Q.on(we.RECOVERED_EARLY_EOF,qe.bind(this)),Q.on(we.MEDIA_INFO,Tt.bind(this)),Q.on(we.METADATA_ARRIVED,Lt.bind(this)),Q.on(we.SCRIPTDATA_ARRIVED,rt.bind(this)),Q.on(we.STATISTICS_INFO,Ct.bind(this)),Q.on(we.RECOMMEND_SEEKPOINT,nn.bind(this));break;case"destroy":Q&&(Q.destroy(),Q=null),de.postMessage({msg:"destroyed"});break;case"start":Q.start();break;case"stop":Q.stop();break;case"seek":Q.seek(Ut.data.param);break;case"pause":Q.pause();break;case"resume":Q.resume();break;case"logging_config":{var vt=Ut.data.param;xe.applyConfig(vt),vt.enableCallback===!0?xe.addLogListener(ne):xe.removeLogListener(ne);break}}});function se(Ut,vt){var En={msg:we.INIT_SEGMENT,data:{type:Ut,data:vt}};de.postMessage(En,[vt.data])}function Se(Ut,vt){var En={msg:we.MEDIA_SEGMENT,data:{type:Ut,data:vt}};de.postMessage(En,[vt.data])}function He(){var Ut={msg:we.LOADING_COMPLETE};de.postMessage(Ut)}function qe(){var Ut={msg:we.RECOVERED_EARLY_EOF};de.postMessage(Ut)}function Tt(Ut){var vt={msg:we.MEDIA_INFO,data:Ut};de.postMessage(vt)}function Lt(Ut){var vt={msg:we.METADATA_ARRIVED,data:Ut};de.postMessage(vt)}function rt(Ut){var vt={msg:we.SCRIPTDATA_ARRIVED,data:Ut};de.postMessage(vt)}function Ct(Ut){var vt={msg:we.STATISTICS_INFO,data:Ut};de.postMessage(vt)}function Jt(Ut,vt){de.postMessage({msg:we.IO_ERROR,data:{type:Ut,info:vt}})}function St(Ut,vt){de.postMessage({msg:we.DEMUX_ERROR,data:{type:Ut,info:vt}})}function nn(Ut){de.postMessage({msg:we.RECOMMEND_SEEKPOINT,data:Ut})}function Qt(Ut,vt){de.postMessage({msg:"logcat_callback",data:{type:Ut,logcat:vt}})}},Et=dt,Dt=function(){function Te(de,H){if(Object(re.a)(this,Te),this.TAG="Transmuxer",this._emitter=new E.a,H.enableWorker&&typeof Worker!="undefined")try{var Q=W("0r65");this._worker=Q(Et),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[de,H]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},xe.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:xe.getConfig()})}catch(se){w.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new it(de,H)}else this._controller=new it(de,H);if(this._controller){var ne=this._controller;ne.on(we.IO_ERROR,this._onIOError.bind(this)),ne.on(we.DEMUX_ERROR,this._onDemuxError.bind(this)),ne.on(we.INIT_SEGMENT,this._onInitSegment.bind(this)),ne.on(we.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),ne.on(we.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),ne.on(we.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),ne.on(we.MEDIA_INFO,this._onMediaInfo.bind(this)),ne.on(we.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),ne.on(we.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),ne.on(we.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),ne.on(we.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return Object($.a)(Te,[{key:"destroy",value:function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),xe.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(H,Q){this._emitter.addListener(H,Q)}},{key:"off",value:function(H,Q){this._emitter.removeListener(H,Q)}},{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(H){this._worker?this._worker.postMessage({cmd:"seek",param:H}):this._controller.seek(H)}},{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(H,Q){var ne=this;Promise.resolve().then(function(){ne._emitter.emit(we.INIT_SEGMENT,H,Q)})}},{key:"_onMediaSegment",value:function(H,Q){var ne=this;Promise.resolve().then(function(){ne._emitter.emit(we.MEDIA_SEGMENT,H,Q)})}},{key:"_onLoadingComplete",value:function(){var H=this;Promise.resolve().then(function(){H._emitter.emit(we.LOADING_COMPLETE)})}},{key:"_onRecoveredEarlyEof",value:function(){var H=this;Promise.resolve().then(function(){H._emitter.emit(we.RECOVERED_EARLY_EOF)})}},{key:"_onMediaInfo",value:function(H){var Q=this;Promise.resolve().then(function(){Q._emitter.emit(we.MEDIA_INFO,H)})}},{key:"_onMetaDataArrived",value:function(H){var Q=this;Promise.resolve().then(function(){Q._emitter.emit(we.METADATA_ARRIVED,H)})}},{key:"_onScriptDataArrived",value:function(H){var Q=this;Promise.resolve().then(function(){Q._emitter.emit(we.SCRIPTDATA_ARRIVED,H)})}},{key:"_onStatisticsInfo",value:function(H){var Q=this;Promise.resolve().then(function(){Q._emitter.emit(we.STATISTICS_INFO,H)})}},{key:"_onIOError",value:function(H,Q){var ne=this;Promise.resolve().then(function(){ne._emitter.emit(we.IO_ERROR,H,Q)})}},{key:"_onDemuxError",value:function(H,Q){var ne=this;Promise.resolve().then(function(){ne._emitter.emit(we.DEMUX_ERROR,H,Q)})}},{key:"_onRecommendSeekpoint",value:function(H){var Q=this;Promise.resolve().then(function(){Q._emitter.emit(we.RECOMMEND_SEEKPOINT,H)})}},{key:"_onLoggingConfigChanged",value:function(H){this._worker&&this._worker.postMessage({cmd:"logging_config",param:H})}},{key:"_onWorkerMessage",value:function(H){var Q=H.data,ne=Q.data;if(Q.msg==="destroyed"||this._workerDestroying){this._workerDestroying=!1,this._worker.terminate(),this._worker=null;return}switch(Q.msg){case we.INIT_SEGMENT:case we.MEDIA_SEGMENT:this._emitter.emit(Q.msg,ne.type,ne.data);break;case we.LOADING_COMPLETE:case we.RECOVERED_EARLY_EOF:this._emitter.emit(Q.msg);break;case we.MEDIA_INFO:Object.setPrototypeOf(ne,Le.prototype),this._emitter.emit(Q.msg,ne);break;case we.METADATA_ARRIVED:case we.SCRIPTDATA_ARRIVED:case we.STATISTICS_INFO:this._emitter.emit(Q.msg,ne);break;case we.IO_ERROR:case we.DEMUX_ERROR:this._emitter.emit(Q.msg,ne.type,ne.info);break;case we.RECOMMEND_SEEKPOINT:this._emitter.emit(Q.msg,ne);break;case"logcat_callback":w.emitter.emit("log",ne.type,ne.logcat);break;default:break}}}]),Te}(),ot=Dt,xt={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"},nt=xt,ct=function(){function Te(de){Object(re.a)(this,Te),this.TAG="MSEController",this._config=de,this._emitter=new E.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 De}return Object($.a)(Te,[{key:"destroy",value:function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(H,Q){this._emitter.addListener(H,Q)}},{key:"off",value:function(H,Q){this._emitter.removeListener(H,Q)}},{key:"attachMediaElement",value:function(H){if(this._mediaSource)throw new c("MediaSource has been attached to an HTMLMediaElement!");var Q=this._mediaSource=new window.MediaSource;Q.addEventListener("sourceopen",this.e.onSourceOpen),Q.addEventListener("sourceended",this.e.onSourceEnded),Q.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=H,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),H.src=this._mediaSourceObjectURL}},{key:"detachMediaElement",value:function(){if(this._mediaSource){var H=this._mediaSource;for(var Q in this._sourceBuffers){var ne=this._pendingSegments[Q];ne.splice(0,ne.length),this._pendingSegments[Q]=null,this._pendingRemoveRanges[Q]=null,this._lastInitSegments[Q]=null;var se=this._sourceBuffers[Q];if(se){if(H.readyState!=="closed"){try{H.removeSourceBuffer(se)}catch(Se){w.e(this.TAG,Se.message)}se.removeEventListener("error",this.e.onSourceBufferError),se.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[Q]=null,this._sourceBuffers[Q]=null}}if(H.readyState==="open")try{H.endOfStream()}catch(Se){w.e(this.TAG,Se.message)}H.removeEventListener("sourceopen",this.e.onSourceOpen),H.removeEventListener("sourceended",this.e.onSourceEnded),H.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(H,Q){if(!this._mediaSource||this._mediaSource.readyState!=="open"){this._pendingSourceBufferInit.push(H),this._pendingSegments[H.type].push(H);return}var ne=H,se="".concat(ne.container);ne.codec&&ne.codec.length>0&&(se+=";codecs=".concat(ne.codec));var Se=!1;if(w.v(this.TAG,"Received Initialization Segment, mimeType: "+se),this._lastInitSegments[ne.type]=ne,se!==this._mimeTypes[ne.type]){if(this._mimeTypes[ne.type])w.v(this.TAG,"Notice: ".concat(ne.type," mimeType changed, origin: ").concat(this._mimeTypes[ne.type],", target: ").concat(se));else{Se=!0;try{var He=this._sourceBuffers[ne.type]=this._mediaSource.addSourceBuffer(se);He.addEventListener("error",this.e.onSourceBufferError),He.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(qe){w.e(this.TAG,qe.message),this._emitter.emit(nt.ERROR,{code:qe.code,msg:qe.message});return}}this._mimeTypes[ne.type]=se}Q||this._pendingSegments[ne.type].push(ne),Se||this._sourceBuffers[ne.type]&&!this._sourceBuffers[ne.type].updating&&this._doAppendSegments(),m.safari&&ne.container==="audio/mpeg"&&ne.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=ne.mediaDuration/1e3,this._updateMediaSourceDuration())}},{key:"appendMediaSegment",value:function(H){var Q=H;this._pendingSegments[Q.type].push(Q),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var ne=this._sourceBuffers[Q.type];ne&&!ne.updating&&!this._hasPendingRemoveRanges()&&this._doAppendSegments()}},{key:"seek",value:function(H){for(var Q in this._sourceBuffers){if(!this._sourceBuffers[Q])continue;var ne=this._sourceBuffers[Q];if(this._mediaSource.readyState==="open")try{ne.abort()}catch(Lt){w.e(this.TAG,Lt.message)}this._idrList.clear();var se=this._pendingSegments[Q];if(se.splice(0,se.length),this._mediaSource.readyState==="closed")continue;for(var Se=0;Se<ne.buffered.length;Se++){var He=ne.buffered.start(Se),qe=ne.buffered.end(Se);this._pendingRemoveRanges[Q].push({start:He,end:qe})}if(ne.updating||this._doRemoveRanges(),m.safari){var Tt=this._lastInitSegments[Q];Tt&&(this._pendingSegments[Q].push(Tt),ne.updating||this._doAppendSegments())}}}},{key:"endOfStream",value:function(){var H=this._mediaSource,Q=this._sourceBuffers;if(!H||H.readyState!=="open"){H&&H.readyState==="closed"&&this._hasPendingSegments()&&(this._hasPendingEos=!0);return}Q.video&&Q.video.updating||Q.audio&&Q.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,H.endOfStream())}},{key:"getNearestKeyframe",value:function(H){return this._idrList.getLastSyncPointBeforeDts(H)}},{key:"_needCleanupSourceBuffer",value:function(){if(!this._config.autoCleanupSourceBuffer)return!1;var H=this._mediaElement.currentTime;for(var Q in this._sourceBuffers){var ne=this._sourceBuffers[Q];if(ne){var se=ne.buffered;if(se.length>=1&&H-se.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}},{key:"_doCleanupSourceBuffer",value:function(){var H=this._mediaElement.currentTime;for(var Q in this._sourceBuffers){var ne=this._sourceBuffers[Q];if(ne){for(var se=ne.buffered,Se=!1,He=0;He<se.length;He++){var qe=se.start(He),Tt=se.end(He);if(qe<=H&&H<Tt+3){if(H-qe>=this._config.autoCleanupMaxBackwardDuration){Se=!0;var Lt=H-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[Q].push({start:qe,end:Lt})}}else Tt<H&&(Se=!0,this._pendingRemoveRanges[Q].push({start:qe,end:Tt}))}Se&&!ne.updating&&this._doRemoveRanges()}}}},{key:"_updateMediaSourceDuration",value:function(){var H=this._sourceBuffers;if(this._mediaElement.readyState===0||this._mediaSource.readyState!=="open")return;if(H.video&&H.video.updating||H.audio&&H.audio.updating)return;var Q=this._mediaSource.duration,ne=this._pendingMediaDuration;ne>0&&(isNaN(Q)||ne>Q)&&(w.v(this.TAG,"Update MediaSource duration from ".concat(Q," to ").concat(ne)),this._mediaSource.duration=ne),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}},{key:"_doRemoveRanges",value:function(){for(var H in this._pendingRemoveRanges){if(!this._sourceBuffers[H]||this._sourceBuffers[H].updating)continue;for(var Q=this._sourceBuffers[H],ne=this._pendingRemoveRanges[H];ne.length&&!Q.updating;){var se=ne.shift();Q.remove(se.start,se.end)}}}},{key:"_doAppendSegments",value:function(){var H=this._pendingSegments;for(var Q in H){if(!this._sourceBuffers[Q]||this._sourceBuffers[Q].updating)continue;if(H[Q].length>0){var ne=H[Q].shift();if(ne.timestampOffset){var se=this._sourceBuffers[Q].timestampOffset,Se=ne.timestampOffset/1e3,He=Math.abs(se-Se);He>.1&&(w.v(this.TAG,"Update MPEG audio timestampOffset from ".concat(se," to ").concat(Se)),this._sourceBuffers[Q].timestampOffset=Se),delete ne.timestampOffset}if(!ne.data||ne.data.byteLength===0)continue;try{this._sourceBuffers[Q].appendBuffer(ne.data),this._isBufferFull=!1,Q==="video"&&ne.hasOwnProperty("info")&&this._idrList.appendArray(ne.info.syncPoints)}catch(qe){this._pendingSegments[Q].unshift(ne),qe.code===22?(this._isBufferFull||this._emitter.emit(nt.BUFFER_FULL),this._isBufferFull=!0):(w.e(this.TAG,qe.message),this._emitter.emit(nt.ERROR,{code:qe.code,msg:qe.message}))}}}}},{key:"_onSourceOpen",value:function(){if(w.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var H=this._pendingSourceBufferInit;H.length;){var Q=H.shift();this.appendInitSegment(Q,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(nt.SOURCE_OPEN)}},{key:"_onSourceEnded",value:function(){w.v(this.TAG,"MediaSource onSourceEnded")}},{key:"_onSourceClose",value:function(){w.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 H=this._pendingSegments;return H.video.length>0||H.audio.length>0}},{key:"_hasPendingRemoveRanges",value:function(){var H=this._pendingRemoveRanges;return H.video.length>0||H.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(nt.UPDATE_END)}},{key:"_onSourceBufferError",value:function(H){w.e(this.TAG,"SourceBuffer Error: ".concat(H))}}]),Te}(),Je=ct,Ee={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},Ue={NETWORK_EXCEPTION:t.EXCEPTION,NETWORK_STATUS_CODE_INVALID:t.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:t.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:t.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},ft=function(){function Te(de,H){if(Object(re.a)(this,Te),this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new E.a,this._config=ae(),typeof H=="object"&&Object.assign(this._config,H),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 Q=m.chrome&&(m.version.major<50||m.version.major===50&&m.version.build<2661);this._alwaysSeekKeyframe=!!(Q||m.msedge||m.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}return Object($.a)(Te,[{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(H,Q){var ne=this;H===_e.MEDIA_INFO?this._mediaInfo!=null&&Promise.resolve().then(function(){ne._emitter.emit(_e.MEDIA_INFO,ne.mediaInfo)}):H===_e.STATISTICS_INFO&&(this._statisticsInfo!=null&&Promise.resolve().then(function(){ne._emitter.emit(_e.STATISTICS_INFO,ne.statisticsInfo)})),this._emitter.addListener(H,Q)}},{key:"off",value:function(H,Q){this._emitter.removeListener(H,Q)}},{key:"attachMediaElement",value:function(H){var Q=this;if(this._mediaElement=H,H.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),H.addEventListener("seeking",this.e.onvSeeking),H.addEventListener("canplay",this.e.onvCanPlay),H.addEventListener("stalled",this.e.onvStalled),H.addEventListener("progress",this.e.onvProgress),this._msectl=new Je(this._config),this._msectl.on(nt.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(nt.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(nt.SOURCE_OPEN,function(){Q._mseSourceOpened=!0,Q._hasPendingLoad&&(Q._hasPendingLoad=!1,Q.load())}),this._msectl.on(nt.ERROR,function(ne){Q._emitter.emit(_e.ERROR,Ee.MEDIA_ERROR,Ue.MEDIA_MSE_ERROR,ne)}),this._msectl.attachMediaElement(H),this._pendingSeekTime!=null)try{H.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(ne){}}},{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 H=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 ot(this._mediaDataSource,this._config),this._transmuxer.on(we.INIT_SEGMENT,function(Q,ne){H._msectl.appendInitSegment(ne)}),this._transmuxer.on(we.MEDIA_SEGMENT,function(Q,ne){if(H._msectl.appendMediaSegment(ne),H._config.lazyLoad&&!H._config.isLive){var se=H._mediaElement.currentTime;ne.info.endDts>=(se+H._config.lazyLoadMaxDuration)*1e3&&(H._progressChecker==null&&(w.v(H.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),H._suspendTransmuxer()))}}),this._transmuxer.on(we.LOADING_COMPLETE,function(){H._msectl.endOfStream(),H._emitter.emit(_e.LOADING_COMPLETE)}),this._transmuxer.on(we.RECOVERED_EARLY_EOF,function(){H._emitter.emit(_e.RECOVERED_EARLY_EOF)}),this._transmuxer.on(we.IO_ERROR,function(Q,ne){H._emitter.emit(_e.ERROR,Ee.NETWORK_ERROR,Q,ne)}),this._transmuxer.on(we.DEMUX_ERROR,function(Q,ne){H._emitter.emit(_e.ERROR,Ee.MEDIA_ERROR,Q,{code:-1,msg:ne})}),this._transmuxer.on(we.MEDIA_INFO,function(Q){H._mediaInfo=Q,H._emitter.emit(_e.MEDIA_INFO,Object.assign({},Q))}),this._transmuxer.on(we.METADATA_ARRIVED,function(Q){H._emitter.emit(_e.METADATA_ARRIVED,Q)}),this._transmuxer.on(we.SCRIPTDATA_ARRIVED,function(Q){H._emitter.emit(_e.SCRIPTDATA_ARRIVED,Q)}),this._transmuxer.on(we.STATISTICS_INFO,function(Q){H._statisticsInfo=H._fillStatisticsInfo(Q),H._emitter.emit(_e.STATISTICS_INFO,Object.assign({},H._statisticsInfo))}),this._transmuxer.on(we.RECOMMEND_SEEKPOINT,function(Q){H._mediaElement&&!H._config.accurateSeek&&(H._requestSetTime=!0,H._mediaElement.currentTime=Q/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(H){this._mediaElement.volume=H}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(H){this._mediaElement.muted=H}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(H){this._mediaElement?this._internalSeek(H):this._pendingSeekTime=H}},{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(H){if(H.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return H;var Q=!0,ne=0,se=0;if(this._mediaElement.getVideoPlaybackQuality){var Se=this._mediaElement.getVideoPlaybackQuality();ne=Se.totalVideoFrames,se=Se.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(ne=this._mediaElement.webkitDecodedFrameCount,se=this._mediaElement.webkitDroppedFrameCount):Q=!1;return Q&&(H.decodedFrames=ne,H.droppedFrames=se),H}},{key:"_onmseUpdateEnd",value:function(){if(!this._config.lazyLoad||this._config.isLive)return;for(var H=this._mediaElement.buffered,Q=this._mediaElement.currentTime,ne=0,se=0,Se=0;Se<H.length;Se++){var He=H.start(Se),qe=H.end(Se);if(He<=Q&&Q<qe){ne=He,se=qe;break}}se>=Q+this._config.lazyLoadMaxDuration&&this._progressChecker==null&&(w.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}},{key:"_onmseBufferFull",value:function(){w.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 H=this._mediaElement.currentTime,Q=this._mediaElement.buffered,ne=!1,se=0;se<Q.length;se++){var Se=Q.start(se),He=Q.end(se);if(H>=Se&&H<He){H>=He-this._config.lazyLoadRecoverDuration&&(ne=!0);break}}ne&&(window.clearInterval(this._progressChecker),this._progressChecker=null,ne&&(w.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}},{key:"_isTimepointBuffered",value:function(H){for(var Q=this._mediaElement.buffered,ne=0;ne<Q.length;ne++){var se=Q.start(ne),Se=Q.end(ne);if(H>=se&&H<Se)return!0}return!1}},{key:"_internalSeek",value:function(H){var Q=this._isTimepointBuffered(H),ne=!1,se=0;if(H<1&&this._mediaElement.buffered.length>0){var Se=this._mediaElement.buffered.start(0);(Se<1&&H<Se||m.safari)&&(ne=!0,se=m.safari?.1:Se)}if(ne)this._requestSetTime=!0,this._mediaElement.currentTime=se;else if(Q){if(!this._alwaysSeekKeyframe)this._requestSetTime=!0,this._mediaElement.currentTime=H;else{var He=this._msectl.getNearestKeyframe(Math.floor(H*1e3));this._requestSetTime=!0,He!=null?this._mediaElement.currentTime=He.dts/1e3:this._mediaElement.currentTime=H}this._progressChecker!=null&&this._checkProgressAndResume()}else this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(H),this._transmuxer.seek(Math.floor(H*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=H)}},{key:"_checkAndApplyUnbufferedSeekpoint",value:function(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){var H=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(H)||(this._progressChecker!=null&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(H),this._transmuxer.seek(Math.floor(H*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=H))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}},{key:"_checkAndResumeStuckPlayback",value:function(H){var Q=this._mediaElement;if(H||!this._receivedCanPlay||Q.readyState<2){var ne=Q.buffered;ne.length>0&&Q.currentTime<ne.start(0)&&(w.w(this.TAG,"Playback seems stuck at ".concat(Q.currentTime,", seek to ").concat(ne.start(0))),this._requestSetTime=!0,this._mediaElement.currentTime=ne.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress))}else this._mediaElement.removeEventListener("progress",this.e.onvProgress)}},{key:"_onvLoadedMetadata",value:function(H){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)}},{key:"_onvSeeking",value:function(H){var Q=this._mediaElement.currentTime,ne=this._mediaElement.buffered;if(this._requestSetTime){this._requestSetTime=!1;return}if(Q<1&&ne.length>0){var se=ne.start(0);if(se<1&&Q<se||m.safari){this._requestSetTime=!0,this._mediaElement.currentTime=m.safari?.1:se;return}}if(this._isTimepointBuffered(Q)){if(this._alwaysSeekKeyframe){var Se=this._msectl.getNearestKeyframe(Math.floor(Q*1e3));Se!=null&&(this._requestSetTime=!0,this._mediaElement.currentTime=Se.dts/1e3)}this._progressChecker!=null&&this._checkProgressAndResume();return}this._seekpointRecord={seekPoint:Q,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}},{key:"_onvCanPlay",value:function(H){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)}},{key:"_onvStalled",value:function(H){this._checkAndResumeStuckPlayback(!0)}},{key:"_onvProgress",value:function(H){this._checkAndResumeStuckPlayback()}}]),Te}(),Qe=ft,Ot=function(){function Te(de,H){if(Object(re.a)(this,Te),this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new E.a,this._config=ae(),typeof H=="object"&&Object.assign(this._config,H),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($.a)(Te,[{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(H,Q){var ne=this;H===_e.MEDIA_INFO?this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(function(){ne._emitter.emit(_e.MEDIA_INFO,ne.mediaInfo)}):H===_e.STATISTICS_INFO&&(this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(function(){ne._emitter.emit(_e.STATISTICS_INFO,ne.statisticsInfo)})),this._emitter.addListener(H,Q)}},{key:"off",value:function(H,Q){this._emitter.removeListener(H,Q)}},{key:"attachMediaElement",value:function(H){if(this._mediaElement=H,H.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._pendingSeekTime!=null)try{H.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(Q){}}},{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(H){this._mediaElement.volume=H}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(H){this._mediaElement.muted=H}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(H){this._mediaElement?this._mediaElement.currentTime=H:this._pendingSeekTime=H}},{key:"mediaInfo",get:function(){var H=this._mediaElement instanceof HTMLAudioElement?"audio/":"video/",Q={mimeType:H+this._mediaDataSource.type};return this._mediaElement&&(Q.duration=Math.floor(this._mediaElement.duration*1e3),this._mediaElement instanceof HTMLVideoElement&&(Q.width=this._mediaElement.videoWidth,Q.height=this._mediaElement.videoHeight)),Q}},{key:"statisticsInfo",get:function(){var H={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return H;var Q=!0,ne=0,se=0;if(this._mediaElement.getVideoPlaybackQuality){var Se=this._mediaElement.getVideoPlaybackQuality();ne=Se.totalVideoFrames,se=Se.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(ne=this._mediaElement.webkitDecodedFrameCount,se=this._mediaElement.webkitDroppedFrameCount):Q=!1;return Q&&(H.decodedFrames=ne,H.droppedFrames=se),H}},{key:"_onvLoadedMetadata",value:function(H){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(_e.MEDIA_INFO,this.mediaInfo)}},{key:"_reportStatisticsInfo",value:function(){this._emitter.emit(_e.STATISTICS_INFO,this.statisticsInfo)}}]),Te}(),wt=Ot;S.install();function lt(Te,de){var H=Te;if(H==null||typeof H!="object")throw new s("MediaDataSource must be an javascript object!");if(!H.hasOwnProperty("type"))throw new s("MediaDataSource must has type field to indicate video file type!");switch(H.type){case"flv":return new Qe(H,de);default:return new wt(H,de)}}function yt(){return ve.supportMSEH264Playback()}function Nt(){return ve.getFeatureList()}var Gt={};Gt.createPlayer=lt,Gt.isSupported=yt,Gt.getFeatureList=Nt,Gt.BaseLoader=n,Gt.LoaderStatus=i,Gt.LoaderErrors=t,Gt.Events=_e,Gt.ErrorTypes=Ee,Gt.ErrorDetails=Ue,Gt.FlvPlayer=Qe,Gt.NativePlayer=wt,Gt.LoggingControl=xe,Object.defineProperty(Gt,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var Xt=Be.a=Gt},GgEA:function(Ve,Be,W){},Gytx:function(Ve,Be){Ve.exports=function(re,$,U,S){var P=U?U.call(S,re,$):void 0;if(P!==void 0)return!!P;if(re===$)return!0;if(typeof re!="object"||!re||typeof $!="object"||!$)return!1;var E=Object.keys(re),C=Object.keys($);if(E.length!==C.length)return!1;for(var w=Object.prototype.hasOwnProperty.bind($),u=0;u<E.length;u++){var p=E[u];if(!w(p))return!1;var f=re[p],o=$[p];if(P=U?U.call(S,f,o,p):void 0,P===!1||P===void 0&&f!==o)return!1}return!0}},H38U:function(Ve,Be,W){var re=W("f4xo"),$=W("rcnY"),U=W("wU8J"),S=W("Iq15"),P=W("dWSS");function E(w,u){this.typeNumber=w,this.errorCorrectLevel=u,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var C=E.prototype;C.addData=function(w){var u=new re(w);this.dataList.push(u),this.dataCache=null},C.isDark=function(w,u){if(w<0||this.moduleCount<=w||u<0||this.moduleCount<=u)throw new Error(w+","+u);return this.modules[w][u]},C.getModuleCount=function(){return this.moduleCount},C.make=function(){if(this.typeNumber<1){var w=1;for(w=1;w<40;w++){for(var u=$.getRSBlocks(w,this.errorCorrectLevel),p=new U,f=0,o=0;o<u.length;o++)f+=u[o].dataCount;for(var o=0;o<this.dataList.length;o++){var a=this.dataList[o];p.put(a.mode,4),p.put(a.getLength(),S.getLengthInBits(a.mode,w)),a.write(p)}if(p.getLengthInBits()<=f*8)break}this.typeNumber=w}this.makeImpl(!1,this.getBestMaskPattern())},C.makeImpl=function(w,u){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var p=0;p<this.moduleCount;p++){this.modules[p]=new Array(this.moduleCount);for(var f=0;f<this.moduleCount;f++)this.modules[p][f]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(w,u),this.typeNumber>=7&&this.setupTypeNumber(w),this.dataCache==null&&(this.dataCache=E.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,u)},C.setupPositionProbePattern=function(w,u){for(var p=-1;p<=7;p++){if(w+p<=-1||this.moduleCount<=w+p)continue;for(var f=-1;f<=7;f++){if(u+f<=-1||this.moduleCount<=u+f)continue;0<=p&&p<=6&&(f==0||f==6)||0<=f&&f<=6&&(p==0||p==6)||2<=p&&p<=4&&2<=f&&f<=4?this.modules[w+p][u+f]=!0:this.modules[w+p][u+f]=!1}}},C.getBestMaskPattern=function(){for(var w=0,u=0,p=0;p<8;p++){this.makeImpl(!0,p);var f=S.getLostPoint(this);(p==0||w>f)&&(w=f,u=p)}return u},C.createMovieClip=function(w,u,p){var f=w.createEmptyMovieClip(u,p),o=1;this.make();for(var a=0;a<this.modules.length;a++)for(var c=a*o,s=0;s<this.modules[a].length;s++){var d=s*o,i=this.modules[a][s];i&&(f.beginFill(0,100),f.moveTo(d,c),f.lineTo(d+o,c),f.lineTo(d+o,c+o),f.lineTo(d,c+o),f.endFill())}return f},C.setupTimingPattern=function(){for(var w=8;w<this.moduleCount-8;w++){if(this.modules[w][6]!=null)continue;this.modules[w][6]=w%2==0}for(var u=8;u<this.moduleCount-8;u++){if(this.modules[6][u]!=null)continue;this.modules[6][u]=u%2==0}},C.setupPositionAdjustPattern=function(){for(var w=S.getPatternPosition(this.typeNumber),u=0;u<w.length;u++)for(var p=0;p<w.length;p++){var f=w[u],o=w[p];if(this.modules[f][o]!=null)continue;for(var a=-2;a<=2;a++)for(var c=-2;c<=2;c++)a==-2||a==2||c==-2||c==2||a==0&&c==0?this.modules[f+a][o+c]=!0:this.modules[f+a][o+c]=!1}},C.setupTypeNumber=function(w){for(var u=S.getBCHTypeNumber(this.typeNumber),p=0;p<18;p++){var f=!w&&(u>>p&1)==1;this.modules[Math.floor(p/3)][p%3+this.moduleCount-8-3]=f}for(var p=0;p<18;p++){var f=!w&&(u>>p&1)==1;this.modules[p%3+this.moduleCount-8-3][Math.floor(p/3)]=f}},C.setupTypeInfo=function(w,u){for(var p=this.errorCorrectLevel<<3|u,f=S.getBCHTypeInfo(p),o=0;o<15;o++){var a=!w&&(f>>o&1)==1;o<6?this.modules[o][8]=a:o<8?this.modules[o+1][8]=a:this.modules[this.moduleCount-15+o][8]=a}for(var o=0;o<15;o++){var a=!w&&(f>>o&1)==1;o<8?this.modules[8][this.moduleCount-o-1]=a:o<9?this.modules[8][15-o-1+1]=a:this.modules[8][15-o-1]=a}this.modules[this.moduleCount-8][8]=!w},C.mapData=function(w,u){for(var p=-1,f=this.moduleCount-1,o=7,a=0,c=this.moduleCount-1;c>0;c-=2)for(c==6&&c--;;){for(var s=0;s<2;s++)if(this.modules[f][c-s]==null){var d=!1;a<w.length&&(d=(w[a]>>>o&1)==1);var i=S.getMask(u,f,c-s);i&&(d=!d),this.modules[f][c-s]=d,o--,o==-1&&(a++,o=7)}if(f+=p,f<0||this.moduleCount<=f){f-=p,p=-p;break}}},E.PAD0=236,E.PAD1=17,E.createData=function(w,u,p){for(var f=$.getRSBlocks(w,u),o=new U,a=0;a<p.length;a++){var c=p[a];o.put(c.mode,4),o.put(c.getLength(),S.getLengthInBits(c.mode,w)),c.write(o)}for(var s=0,a=0;a<f.length;a++)s+=f[a].dataCount;if(o.getLengthInBits()>s*8)throw new Error("code length overflow. ("+o.getLengthInBits()+">"+s*8+")");for(o.getLengthInBits()+4<=s*8&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=s*8);){if(o.put(E.PAD0,8),o.getLengthInBits()>=s*8)break;o.put(E.PAD1,8)}return E.createBytes(o,f)},E.createBytes=function(w,u){for(var p=0,f=0,o=0,a=new Array(u.length),c=new Array(u.length),s=0;s<u.length;s++){var d=u[s].dataCount,i=u[s].totalCount-d;f=Math.max(f,d),o=Math.max(o,i),a[s]=new Array(d);for(var t=0;t<a[s].length;t++)a[s][t]=255&w.buffer[t+p];p+=d;var n=S.getErrorCorrectPolynomial(i),h=new P(a[s],n.getLength()-1),v=h.mod(n);c[s]=new Array(n.getLength()-1);for(var t=0;t<c[s].length;t++){var b=t+v.getLength()-c[s].length;c[s][t]=b>=0?v.get(b):0}}for(var y=0,t=0;t<u.length;t++)y+=u[t].totalCount;for(var _=new Array(y),m=0,t=0;t<f;t++)for(var s=0;s<u.length;s++)t<a[s].length&&(_[m++]=a[s][t]);for(var t=0;t<o;t++)for(var s=0;s<u.length;s++)t<c[s].length&&(_[m++]=c[s][t]);return _},Ve.exports=E},HmJG:function(Ve,Be,W){},Hw79:function(Ve,Be,W){Ve.exports={pagination:"pagination___2VQzP",info:"info___1saw2"}},I8Z2:function(Ve,Be,W){"use strict";W.d(Be,"a",function(){return S}),W.d(Be,"b",function(){return a}),W.d(Be,"c",function(){return s});var re=W("cDcd"),$=function(){var d=function(i,t){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,h){n.__proto__=h}||function(n,h){for(var v in h)h.hasOwnProperty(v)&&(n[v]=h[v])},d(i,t)};return function(i,t){d(i,t);function n(){this.constructor=i}i.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),U=re.createContext(null),S=function(d){$(i,d);function i(){return d!==null&&d.apply(this,arguments)||this}return i.prototype.render=function(){return re.createElement(U.Provider,{value:this.props.store},this.props.children)},i}(re.Component),P=W("Gytx"),E=W.n(P),C=W("2mql"),w=W.n(C),u=function(){var d=function(i,t){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,h){n.__proto__=h}||function(n,h){for(var v in h)h.hasOwnProperty(v)&&(n[v]=h[v])},d(i,t)};return function(i,t){d(i,t);function n(){this.constructor=i}i.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),p=function(){return p=Object.assign||function(d){for(var i,t=1,n=arguments.length;t<n;t++){i=arguments[t];for(var h in i)Object.prototype.hasOwnProperty.call(i,h)&&(d[h]=i[h])}return d},p.apply(this,arguments)};function f(d){return d.displayName||d.name||"Component"}var o=function(){return{}};function a(d,i){i===void 0&&(i={});var t=!!d,n=d||o;return function(v){var b=function(_){u(m,_);function m(g,x){var l=_.call(this,g,x)||this;return l.unsubscribe=null,l.handleChange=function(){if(!l.unsubscribe)return;var T=n(l.store.getState(),l.props);l.setState({subscribed:T})},l.store=l.context,l.state={subscribed:n(l.store.getState(),g),store:l.store,props:g},l}return m.getDerivedStateFromProps=function(g,x){return d&&d.length===2&&g!==x.props?{subscribed:n(x.store.getState(),g),props:g}:{props:g}},m.prototype.componentDidMount=function(){this.trySubscribe()},m.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},m.prototype.shouldComponentUpdate=function(g,x){return!E()(this.props,g)||!E()(this.state.subscribed,x.subscribed)},m.prototype.trySubscribe=function(){t&&(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 re.createElement(v,p({},g,{ref:this.props.miniStoreForwardedRef}))},m.displayName="Connect("+f(v)+")",m.contextType=U,m}(re.Component);if(i.forwardRef){var y=re.forwardRef(function(_,m){return re.createElement(b,p({},_,{miniStoreForwardedRef:m}))});return w()(y,v)}return w()(b,v)}}var c=function(){return c=Object.assign||function(d){for(var i,t=1,n=arguments.length;t<n;t++){i=arguments[t];for(var h in i)Object.prototype.hasOwnProperty.call(i,h)&&(d[h]=i[h])}return d},c.apply(this,arguments)};function s(d){var i=d,t=[];function n(b){i=c(c({},i),b);for(var y=0;y<t.length;y++)t[y]()}function h(){return i}function v(b){return t.push(b),function(){var _=t.indexOf(b);t.splice(_,1)}}return{setState:n,getState:h,subscribe:v}}},IBYe:function(Ve,Be,W){"use strict";function re($){return null}Be.a=re},Iq15:function(Ve,Be,W){var re=W("nVVt"),$=W("dWSS"),U=W("dQei"),S={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},P={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0,G18:1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,G15_MASK:1<<14|1<<12|1<<10|1<<4|1<<1,getBCHTypeInfo:function(E){for(var C=E<<10;P.getBCHDigit(C)-P.getBCHDigit(P.G15)>=0;)C^=P.G15<<P.getBCHDigit(C)-P.getBCHDigit(P.G15);return(E<<10|C)^P.G15_MASK},getBCHTypeNumber:function(E){for(var C=E<<12;P.getBCHDigit(C)-P.getBCHDigit(P.G18)>=0;)C^=P.G18<<P.getBCHDigit(C)-P.getBCHDigit(P.G18);return E<<12|C},getBCHDigit:function(E){for(var C=0;E!=0;)C++,E>>>=1;return C},getPatternPosition:function(E){return P.PATTERN_POSITION_TABLE[E-1]},getMask:function(E,C,w){switch(E){case S.PATTERN000:return(C+w)%2==0;case S.PATTERN001:return C%2==0;case S.PATTERN010:return w%3==0;case S.PATTERN011:return(C+w)%3==0;case S.PATTERN100:return(Math.floor(C/2)+Math.floor(w/3))%2==0;case S.PATTERN101:return C*w%2+C*w%3==0;case S.PATTERN110:return(C*w%2+C*w%3)%2==0;case S.PATTERN111:return(C*w%3+(C+w)%2)%2==0;default:throw new Error("bad maskPattern:"+E)}},getErrorCorrectPolynomial:function(E){for(var C=new $([1],0),w=0;w<E;w++)C=C.multiply(new $([1,U.gexp(w)],0));return C},getLengthInBits:function(E,C){if(1<=C&&C<10)switch(E){case re.MODE_NUMBER:return 10;case re.MODE_ALPHA_NUM:return 9;case re.MODE_8BIT_BYTE:return 8;case re.MODE_KANJI:return 8;default:throw new Error("mode:"+E)}else if(C<27)switch(E){case re.MODE_NUMBER:return 12;case re.MODE_ALPHA_NUM:return 11;case re.MODE_8BIT_BYTE:return 16;case re.MODE_KANJI:return 10;default:throw new Error("mode:"+E)}else if(C<41)switch(E){case re.MODE_NUMBER:return 14;case re.MODE_ALPHA_NUM:return 13;case re.MODE_8BIT_BYTE:return 16;case re.MODE_KANJI:return 12;default:throw new Error("mode:"+E)}else throw new Error("type:"+C)},getLostPoint:function(E){for(var C=E.getModuleCount(),w=0,u=0;u<C;u++)for(var p=0;p<C;p++){for(var f=0,o=E.isDark(u,p),a=-1;a<=1;a++){if(u+a<0||C<=u+a)continue;for(var c=-1;c<=1;c++){if(p+c<0||C<=p+c)continue;if(a==0&&c==0)continue;o==E.isDark(u+a,p+c)&&f++}}f>5&&(w+=3+f-5)}for(var u=0;u<C-1;u++)for(var p=0;p<C-1;p++){var s=0;E.isDark(u,p)&&s++,E.isDark(u+1,p)&&s++,E.isDark(u,p+1)&&s++,E.isDark(u+1,p+1)&&s++,(s==0||s==4)&&(w+=3)}for(var u=0;u<C;u++)for(var p=0;p<C-6;p++)E.isDark(u,p)&&!E.isDark(u,p+1)&&E.isDark(u,p+2)&&E.isDark(u,p+3)&&E.isDark(u,p+4)&&!E.isDark(u,p+5)&&E.isDark(u,p+6)&&(w+=40);for(var p=0;p<C;p++)for(var u=0;u<C-6;u++)E.isDark(u,p)&&!E.isDark(u+1,p)&&E.isDark(u+2,p)&&E.isDark(u+3,p)&&E.isDark(u+4,p)&&!E.isDark(u+5,p)&&E.isDark(u+6,p)&&(w+=40);for(var d=0,p=0;p<C;p++)for(var u=0;u<C;u++)E.isDark(u,p)&&d++;var i=Math.abs(100*d/C/C-50)/5;return w+=i*10,w}};Ve.exports=P},IxHN:function(Ve,Be,W){"use strict";var re=W("cDcd"),$=W.n(re),U=W("07cG"),S=W.n(U);Be.a=function(P){var E=P.message,C=P.className,w=P.children,u=P.style,p=u===void 0?{}:u;return $.a.createElement("div",{className:"".concat(S.a.idsRingWrapper," ").concat(C)},$.a.createElement("div",{className:S.a.ldsRing},$.a.createElement("div",null),$.a.createElement("div",null),$.a.createElement("div",null),$.a.createElement("div",null)),E?$.a.createElement("p",{style:p},E):null,w)}},J66h:function(Ve,Be,W){(function(re){var $,U;(function(S,P){Ve.exports=P(S)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof re!="undefined"?re:this,function(S){"use strict";S=S||{};var P=S.Base64,E="2.6.4",C="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",w=function(D){for(var I={},j=0,B=D.length;j<B;j++)I[D.charAt(j)]=j;return I}(C),u=String.fromCharCode,p=function(D){if(D.length<2){var I=D.charCodeAt(0);return I<128?D:I<2048?u(192|I>>>6)+u(128|I&63):u(224|I>>>12&15)+u(128|I>>>6&63)+u(128|I&63)}else{var I=65536+(D.charCodeAt(0)-55296)*1024+(D.charCodeAt(1)-56320);return u(240|I>>>18&7)+u(128|I>>>12&63)+u(128|I>>>6&63)+u(128|I&63)}},f=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,o=function(D){return D.replace(f,p)},a=function(D){var I=[0,2,1][D.length%3],j=D.charCodeAt(0)<<16|(D.length>1?D.charCodeAt(1):0)<<8|(D.length>2?D.charCodeAt(2):0),B=[C.charAt(j>>>18),C.charAt(j>>>12&63),I>=2?"=":C.charAt(j>>>6&63),I>=1?"=":C.charAt(j&63)];return B.join("")},c=S.btoa&&typeof S.btoa=="function"?function(D){return S.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(o(String(D)))},d=function(D){return D.replace(/[+\/]/g,function(I){return I=="+"?"-":"_"}).replace(/=/g,"")},i=function(D,I){return I?d(s(D)):s(D)},t=function(D){return i(D,!0)},n;S.Uint8Array&&(n=function(D,I){for(var j="",B=0,ee=D.length;B<ee;B+=3){var F=D[B],G=D[B+1],X=D[B+2],Z=F<<16|G<<8|X;j+=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?d(j):j});var h=/[\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),j=I-65536;return u((j>>>10)+55296)+u((j&1023)+56320);case 3:return u((15&D.charCodeAt(0))<<12|(63&D.charCodeAt(1))<<6|63&D.charCodeAt(2));default:return u((31&D.charCodeAt(0))<<6|63&D.charCodeAt(1))}},b=function(D){return D.replace(h,v)},y=function(D){var I=D.length,j=I%4,B=(I>0?w[D.charAt(0)]<<18:0)|(I>1?w[D.charAt(1)]<<12:0)|(I>2?w[D.charAt(2)]<<6:0)|(I>3?w[D.charAt(3)]:0),ee=[u(B>>>16),u(B>>>8&255),u(B&255)];return ee.length-=[0,0,2,1][j],ee.join("")},_=S.atob&&typeof S.atob=="function"?function(D){return S.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))},x=function(D){return String(D).replace(/[-_]/g,function(I){return I=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},l=function(D){return g(x(D))},T;S.Uint8Array&&(T=function(D){return Uint8Array.from(m(x(D)),function(I){return I.charCodeAt(0)})});var A=function(){var D=S.Base64;return S.Base64=P,D};if(S.Base64={VERSION:E,atob:m,btoa:c,fromBase64:l,toBase64:i,utob:o,encode:i,encodeURI:t,btou:b,decode:l,noConflict:A,fromUint8Array:n,toUint8Array:T},typeof Object.defineProperty=="function"){var O=function(D){return{value:D,enumerable:!1,writable:!0,configurable:!0}};S.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",O(function(){return l(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 S.Meteor&&(Base64=S.Base64),Ve.exports?Ve.exports.Base64=S.Base64:!($=[],U=function(){return S.Base64}.apply(Be,$),U!==void 0&&(Ve.exports=U)),{Base64:S.Base64}})}).call(this,W("IyRk"))},JOrW:function(Ve,Be,W){Ve.exports=W.p+"static/gf.09d89ab3.svg"},LdHM:function(Ve,Be,W){"use strict";W.d(Be,"b",function(){return h}),W.d(Be,"a",function(){return b});var re=W("1OyB"),$=W("vuIU"),U=W("Ji7U"),S=W("LK+K"),P=W("cDcd"),E=W("rePB"),C=W("Ff2n"),w=W("ODXe"),u=W("4IlW"),p=W("bX4T"),f=W("YrtM"),o=W("TSYQ"),a=W.n(o),c=W("+nKL"),s=W("8OUc"),d=function(X,Z){var K=X.prefixCls,q=X.id,ae=X.flattenOptions,oe=X.childrenAsData,ve=X.values,he=X.searchValue,_e=X.multiple,fe=X.defaultActiveFirstOption,xe=X.height,je=X.itemHeight,Le=X.notFoundContent,ke=X.open,Fe=X.menuItemSelectedIcon,ge=X.virtual,ce=X.onSelect,Ie=X.onToggleOpen,Ne=X.onActiveValue,Xe=X.onScroll,te=X.onMouseEnter,k="".concat(K,"-item"),N=Object(f.a)(function(){return ae},[ke,ae],function(We,Me){return Me[0]&&We[1]!==Me[1]}),J=P.useRef(null),V=function(Me){Me.preventDefault()},Y=function(Me){J.current&&J.current.scrollTo({index:Me})},me=function(Me){for(var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Oe=N.length,pe=0;pe<Oe;pe+=1){var be=(Me+pe*De+Oe)%Oe,Ce=N[be],we=Ce.group,$e=Ce.data;if(!we&&!$e.disabled)return be}return-1},Ae=P.useState(function(){return me(0)}),at=Object(w.a)(Ae,2),Re=at[0],Pe=at[1],Ye=function(Me){Pe(Me);var De=N[Me];if(!De){Ne(null,-1);return}Ne(De.data.value,Me)};P.useEffect(function(){Ye(fe!==!1?me(0):-1)},[N.length,he]),P.useEffect(function(){var We=setTimeout(function(){if(!_e&&ke&&ve.size===1){var Me=Array.from(ve)[0],De=N.findIndex(function(Oe){var pe=Oe.data;return pe.value===Me});Ye(De),Y(De)}});return function(){return clearTimeout(We)}},[ke]);var Ze=function(Me){Me!==void 0&&ce(Me,{selected:!ve.has(Me)}),_e||Ie(!1)};if(P.useImperativeHandle(Z,function(){return{onKeyDown:function(Me){var De=Me.which;switch(De){case u.a.UP:case u.a.DOWN:{var Oe=0;if(De===u.a.UP?Oe=-1:De===u.a.DOWN&&(Oe=1),Oe!==0){var pe=me(Re+Oe,Oe);Y(pe),Ye(pe)}break}case u.a.ENTER:{var be=N[Re];be&&!be.data.disabled?Ze(be.data.value):Ze(void 0),ke&&Me.preventDefault();break}case u.a.ESC:Ie(!1)}},onKeyUp:function(){},scrollTo:function(Me){Y(Me)}}}),N.length===0)return P.createElement("div",{role:"listbox",id:"".concat(q,"_list"),className:"".concat(k,"-empty"),onMouseDown:V},Le);function ze(We){var Me=N[We];if(!Me)return null;var De=Me.data||{},Oe=De.value,pe=De.label,be=De.children,Ce=Object(p.a)(De,!0),we=oe?be:pe;return Me?P.createElement("div",Object.assign({"aria-label":typeof we=="string"?we:null},Ce,{key:We,role:"option",id:"".concat(q,"_list_").concat(We),"aria-selected":ve.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"}},ze(Re-1),ze(Re),ze(Re+1)),P.createElement(c.a,{itemKey:"key",ref:J,data:N,height:xe,itemHeight:je,fullHeight:!1,onMouseDown:V,onScroll:Xe,virtual:ge,onMouseEnter:te},function(We,Me){var De,Oe=We.group,pe=We.groupOption,be=We.data,Ce=be.label,we=be.key;if(Oe)return P.createElement("div",{className:a()(k,"".concat(k,"-group"))},Ce!==void 0?Ce:we);var $e=be.disabled,it=be.value,dt=be.title,Et=be.children,Dt=be.style,ot=be.className,xt=Object(C.a)(be,["disabled","value","title","children","style","className"]),nt=ve.has(it),ct="".concat(k,"-option"),Je=a()(k,ct,ot,(De={},Object(E.a)(De,"".concat(ct,"-grouped"),pe),Object(E.a)(De,"".concat(ct,"-active"),Re===Me&&!$e),Object(E.a)(De,"".concat(ct,"-disabled"),$e),Object(E.a)(De,"".concat(ct,"-selected"),nt),De)),Ee=oe?Et:Ce,Ue=!Fe||typeof Fe=="function"||nt;return P.createElement("div",Object.assign({},xt,{"aria-selected":nt,className:Je,title:dt,onMouseMove:function(){if(Re===Me||$e)return;Ye(Me)},onClick:function(){$e||Ze(it)},style:Dt}),P.createElement("div",{className:"".concat(ct,"-content")},Ee||it),P.isValidElement(Fe)||nt,Ue&&P.createElement(s.a,{className:"".concat(k,"-option-state"),customizeIcon:Fe,customizeIconProps:{isSelected:nt}},nt?"\u2713":null))}))},i=P.forwardRef(d);i.displayName="OptionList";var t=i,n=function(){return null};n.isSelectOption=!0;var h=n,v=function(){return null};v.isSelectOptGroup=!0;var b=v,y=W("VTBJ"),_=W("Zm9Q");function m(G){var X=G.key,Z=G.props,K=Z.children,q=Z.value,ae=Object(C.a)(Z,["children","value"]);return Object(y.a)({key:X,value:q!==void 0?q:X,children:K},ae)}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,ae=Z.key,oe=Z.props,ve=oe.children,he=Object(C.a)(oe,["children"]);return X||!q?m(Z):Object(y.a)(Object(y.a)({key:"__RC_SELECT_GRP__".concat(ae===null?K:ae,"__"),label:ae},he),{},{options:g(ve)})}).filter(function(Z){return Z})}var x=W("2Qr1"),l=W("qNPg"),T=W("U8pU"),A=W("Kwbf"),O=W("WKfj");function D(G){var X=G.mode,Z=G.options,K=G.children,q=G.backfill,ae=G.allowClear,oe=G.placeholder,ve=G.getInputElement,he=G.showSearch,_e=G.onSearch,fe=G.defaultOpen,xe=G.autoFocus,je=G.labelInValue,Le=G.value,ke=G.inputValue,Fe=G.optionLabelProp,ge=X==="multiple"||X==="tags",ce=he!==void 0?he:ge||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"||!Fe,"`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"||!ve,"`getInputElement` only work with `combobox` mode."),Object(A.b)(X!=="combobox"||!ve||!ae||!oe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),_e&&!ce&&X!=="combobox"&&X!=="tags"&&Object(A.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(A.b)(!fe||xe,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Le!=null){var Xe=Object(O.d)(Le);Object(A.a)(!je||Xe.every(function(k){return Object(T.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)(!ge||Array.isArray(Le),"`value` should be array when `mode` is `multiple` or `tags`")}if(K){var te=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 J=Object(_.a)(k.props.children).every(function(V){return!P.isValidElement(V)||!k.type||V.type.isSelectOption?!0:(te=V.type,!1)});return!J}return te=N,!0}),te&&Object(A.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(te.displayName||te.name||te,"`.")),Object(A.a)(ke===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var I=D,j=Object(l.a)({prefixCls:"rc-select",components:{optionList:t},convertChildrenToData:g,flattenOptions:x.d,getLabeledValue:x.e,filterOptions:x.b,isValueDisabled:x.g,findValueOption:x.c,warningProps:I,fillOptionsWithMissingValue:x.a}),B=function(G){Object(U.a)(Z,G);var X=Object(S.a)(Z);function Z(){var K;return Object(re.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($.a)(Z,[{key:"render",value:function(){return P.createElement(j,Object.assign({ref:this.selectRef},this.props))}}]),Z}(P.Component);B.Option=h,B.OptGroup=b;var ee=B,F=Be.c=ee},M8RZ:function(Ve,Be,W){"use strict";W.d(Be,"a",function(){return u});var re=W("fWQN"),$=W("mtLc"),U=W("yKVA"),S=W("879j"),P=W("cDcd"),E=W.n(P),C=W("faye"),w=W.n(C),u=function(p){Object(U.a)(o,p);var f=Object(S.a)(o);function o(a){var c;Object(re.a)(this,o),c=f.call(this,a);var s=window.document;return c.node=s.createElement("div"),s.body.appendChild(c.node),c}return Object($.a)(o,[{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)}}]),o}(E.a.Component)},MFOe:function(Ve,Be,W){(function(re){var $=E(),U=C(),S=w(),P=typeof window!="undefined"?window:re;Ve.exports={assign:$,create:U,trim:S,bind:u,slice:p,each:f,map:o,pluck:a,isList:c,isFunction:s,isObject:d,Global:P};function E(){return Object.assign?Object.assign:function(t,n,h,v){for(var b=1;b<arguments.length;b++)f(Object(arguments[b]),function(y,_){t[_]=y});return t}}function C(){if(Object.create)return function(n,h,v,b){var y=p(arguments,1);return $.apply(this,[Object.create(n)].concat(y))};{function i(){}return function(n,h,v,b){var y=p(arguments,1);return i.prototype=n,$.apply(this,[new i].concat(y))}}}function w(){return String.prototype.trim?function(t){return String.prototype.trim.call(t)}:function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function u(i,t){return function(){return t.apply(i,Array.prototype.slice.call(arguments,0))}}function p(i,t){return Array.prototype.slice.call(i,t||0)}function f(i,t){a(i,function(n,h){return t(n,h),!1})}function o(i,t){var n=c(i)?[]:{};return a(i,function(h,v){return n[v]=t(h,v),!1}),n}function a(i,t){if(c(i)){for(var n=0;n<i.length;n++)if(t(i[n],n))return i[n]}else for(var h in i)if(i.hasOwnProperty(h)&&t(i[h],h))return i[h]}function c(i){return i!=null&&typeof i!="function"&&typeof i.length=="number"}function s(i){return i&&{}.toString.call(i)==="[object Function]"}function d(i){return i&&{}.toString.call(i)==="[object Object]"}}).call(this,W("IyRk"))},MVJL:function(Ve,Be,W){Ve.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(Ve,Be,W){"use strict";W.d(Be,"a",function(){return E});var re=W("Kwbf");function $(C,w){var u=new Set;return C.forEach(function(p){w.has(p)||u.add(p)}),u}function U(C){var w=C||{},u=w.disabled,p=w.disableCheckbox,f=w.checkable;return!!(u||p)||f===!1}function S(C,w,u,p){for(var f=new Set(C),o=new Set,a=0;a<=u;a+=1){var c=w.get(a)||new Set;c.forEach(function(t){var n=t.key,h=t.node,v=t.children,b=v===void 0?[]:v;f.has(n)&&!p(h)&&b.filter(function(y){return!p(y.node)}).forEach(function(y){f.add(y.key)})})}for(var s=new Set,d=u;d>=0;d-=1){var i=w.get(d)||new Set;i.forEach(function(t){var n=t.parent,h=t.node;if(p(h)||!t.parent||s.has(t.parent.key))return;if(p(t.parent.node)){s.add(n.key);return}var v=!0,b=!1;(n.children||[]).filter(function(y){return!p(y.node)}).forEach(function(y){var _=y.key,m=f.has(_);v&&!m&&(v=!1),!b&&(m||o.has(_))&&(b=!0)}),v&&f.add(n.key),b&&o.add(n.key),s.add(n.key)})}return{checkedKeys:Array.from(f),halfCheckedKeys:Array.from($(o,f))}}function P(C,w,u,p,f){for(var o=new Set(C),a=new Set(w),c=0;c<=p;c+=1){var s=u.get(c)||new Set;s.forEach(function(n){var h=n.key,v=n.node,b=n.children,y=b===void 0?[]:b;!o.has(h)&&!a.has(h)&&!f(v)&&y.filter(function(_){return!f(_.node)}).forEach(function(_){o.delete(_.key)})})}a=new Set;for(var d=new Set,i=p;i>=0;i-=1){var t=u.get(i)||new Set;t.forEach(function(n){var h=n.parent,v=n.node;if(f(v)||!n.parent||d.has(n.parent.key))return;if(f(n.parent.node)){d.add(h.key);return}var b=!0,y=!1;(h.children||[]).filter(function(_){return!f(_.node)}).forEach(function(_){var m=_.key,g=o.has(m);b&&!g&&(b=!1),!y&&(g||a.has(m))&&(y=!0)}),b||o.delete(h.key),y&&a.add(h.key),d.add(h.key)})}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from($(a,o))}}function E(C,w,u,p){var f=[],o;p?o=p:o=U;var a=new Set(C.filter(function(i){var t=!!u[i];return t||f.push(i),t})),c=new Map,s=0;Object.keys(u).forEach(function(i){var t=u[i],n=t.level,h=c.get(n);h||(h=new Set,c.set(n,h)),h.add(t),s=Math.max(s,n)}),Object(re.a)(!f.length,"Tree missing follow keys: ".concat(f.slice(0,100).map(function(i){return"'".concat(i,"'")}).join(", ")));var d;return w===!0?d=S(a,c,s,o):d=P(a,w.halfCheckedKeys,c,s,o),d}},OLES:function(Ve,Be,W){"use strict";var re=W("U8pU"),$=W("VTBJ"),U=W("Ff2n"),S=W("cDcd"),P=W("uciX"),E=W("7ixt"),C=function(a){var c=a.overlay,s=a.prefixCls,d=a.id,i=a.overlayInnerStyle;return S.createElement("div",{className:"".concat(s,"-inner"),id:d,role:"tooltip",style:i},typeof c=="function"?c():c)},w=C,u=function(a,c){var s=a.overlayClassName,d=a.trigger,i=d===void 0?["hover"]:d,t=a.mouseEnterDelay,n=t===void 0?0:t,h=a.mouseLeaveDelay,v=h===void 0?.1:h,b=a.overlayStyle,y=a.prefixCls,_=y===void 0?"rc-tooltip":y,m=a.children,g=a.onVisibleChange,x=a.afterVisibleChange,l=a.transitionName,T=a.animation,A=a.placement,O=A===void 0?"right":A,D=a.align,I=D===void 0?{}:D,j=a.destroyTooltipOnHide,B=j===void 0?!1:j,ee=a.defaultVisible,F=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(S.useRef)(null);Object(S.useImperativeHandle)(c,function(){return Z.current});var K=Object($.a)({},X);"visible"in a&&(K.popupVisible=a.visible);var q=function(){var _e=a.arrowContent,fe=_e===void 0?null:_e,xe=a.overlay,je=a.id;return[S.createElement("div",{className:"".concat(_,"-arrow"),key:"arrow"},fe),S.createElement(w,{key:"content",prefixCls:_,id:je,overlay:xe,overlayInnerStyle:G})]},ae=!1,oe=!1;if(typeof B=="boolean")ae=B;else if(B&&Object(re.a)(B)==="object"){var ve=B.keepParent;ae=ve===!0,oe=ve===!1}return S.createElement(P.a,Object.assign({popupClassName:s,prefixCls:_,popup:q,action:i,builtinPlacements:E.a,popupPlacement:O,ref:Z,popupAlign:I,getPopupContainer:F,onPopupVisibleChange:g,afterPopupVisibleChange:x,popupTransitionName:l,popupAnimation:T,defaultPopupVisible:ee,destroyPopupOnHide:ae,autoDestroy:oe,mouseLeaveDelay:v,popupStyle:b,mouseEnterDelay:n},K),m)},p=Object(S.forwardRef)(u),f=Be.a=p},OZM5:function(Ve,Be,W){"use strict";W.d(Be,"b",function(){return p}),W.d(Be,"a",function(){return f}),W.d(Be,"k",function(){return o}),W.d(Be,"h",function(){return a}),W.d(Be,"i",function(){return c}),W.d(Be,"g",function(){return s}),W.d(Be,"c",function(){return d}),W.d(Be,"d",function(){return i}),W.d(Be,"j",function(){return h}),W.d(Be,"e",function(){return v}),W.d(Be,"f",function(){return b});var re=W("KQm4"),$=W("U8pU"),U=W("Ff2n"),S=W("cDcd"),P=W.n(S),E=W("Kwbf"),C=W("WaYH"),w=.25,u=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 o(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 x(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];l.forEach(function(T){var A=T.key,O=T.children;m.push(A),x(O)})}return x(g.children),m}function d(y,_){var m=y.clientY,g=_.selectHandle.getBoundingClientRect(),x=g.top,l=g.bottom,T=g.height,A=Math.max(T*w,u);return m<=x+A?-1:m>=l-A?1:0}function i(y,_){if(!y)return;var m=_.multiple;return m?y.slice():y.length?[y[0]]:y}var t=function(_){return _};function n(y,_){if(!y)return[];var m=_||{},g=m.processProps,x=g===void 0?t:g,l=Array.isArray(y)?y:[y];return l.map(function(T){var A=T.children,O=Object(U.a)(T,["children"]),D=n(A,_);return P.a.createElement(C.a,Object.assign({},x(O)),D)})}function h(y){if(!y)return null;var _;if(Array.isArray(y))_={checkedKeys:y,halfCheckedKeys:void 0};else if(Object($.a)(y)==="object")_={checkedKeys:y.checked||void 0,halfCheckedKeys:y.halfChecked||void 0};else return Object(E.a)(!1,"`checkedKeys` is not an array or an object"),null;return _}function v(y,_){var m=new Set;function g(x){if(m.has(x))return;var l=_[x];if(!l)return;m.add(x);var T=l.parent,A=l.node;if(A.disabled)return;T&&g(T.key)}return(y||[]).forEach(function(x){g(x)}),Object(re.a)(m)}function b(y){var _={};return Object.keys(y).forEach(function(m){(m.startsWith("data-")||m.startsWith("aria-"))&&(_[m]=y[m])}),_}},"OkW/":function(Ve,Be,W){},Ot1p:function(Ve,Be,W){"use strict";var re=W("2qtc"),$=W("kLXV"),U=W("rAM+"),S=W("miYZ"),P=W("tsqr"),E=W("9og8"),C=W("tJVT"),w=W("jrin"),u=W("WmNS"),p=W.n(u),f=W("cDcd"),o=W.n(f),a=W("VrN/"),c=W.n(a),s=W("bdgK"),d=W("p77/"),i=W("Bd2K"),t=W("ELLl"),n=W("19Vz"),h=W("lZu9"),v=W("+NIl"),b=W("kSUc"),y=W("9Bee"),_=function(ot){var xt=ot.value,nt=xt===void 0?"":xt,ct=ot.className,Je=ot.showTextOnly,Ee=ot.showLines,Ue=ot.style,ft=Ue===void 0?{}:Ue,Qe=Object(f.useMemo)(function(){return""},[nt]);return o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{dangerouslySetInnerHTML:{__html:Qe}}))},m=W("Q9mQ"),g=W("diRs"),x=W("0Owb"),l=W("dejd"),T=W("C+DQ"),A=W("D1Df"),O=W.n(A),D=W("1vsH"),I=W("m3rI"),j=[{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 B(ot){var xt=ot.onActionCallback,nt=ot.title,ct=ot.icon,Je=ot.actionName,Ee=ot.className,Ue=Ee===void 0?"":Ee,ft=ot.children;function Qe(){xt(Je)}return o.a.createElement("a",{title:nt,className:Ue,onClick:Qe},o.a.createElement("i",{className:"md-iconfont ".concat(ct)}),ft)}var ee=function(ot){var xt=ot.watch,nt=ot.showNullButton,ct=ot.onActionCallback,Je=ot.fullScreen,Ee=ot.insertTemp,Ue=ot.hidetoolBar,ft=ot.uuid,Qe=ot.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(D.G)("_educoder_session_login"),"&_educoder_session=").concat(Object(D.G)("_educoder_session"),"&key=").concat(ft,"&api=").concat(encodeURIComponent(I.a.PROXY_SERVER)));var Ot=[].concat(j,[{title:"".concat(xt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(xt?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return o.a.createElement("ul",{className:"markdown-toolbar-container"},!Ue&&Ot.map(function(wt,lt){return o.a.createElement("li",{key:lt},wt.actionName?o.a.createElement(B,Object(x.a)({},wt,{onActionCallback:ct})):o.a.createElement("span",{className:"v-line"}))}),nt?o.a.createElement("li",null,o.a.createElement(B,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:ct},o.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Ee&&o.a.createElement("li",null,o.a.createElement(B,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(Ee),onActionCallback:ct},o.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),o.a.createElement("li",null,o.a.createElement(g.a,{title:"\u6253\u5F00\u624B\u673A\u626B\u4E00\u626B",content:o.a.createElement("div",null,o.a.createElement(O.a,{size:150,fgColor:"#000",value:"https://test2.educoder.net/upload.html?_educoder_session_login=".concat(Object(D.G)("_educoder_session_login"),"&_educoder_session=").concat(Object(D.G)("_educoder_session"),"&key=").concat(ft,"&api=").concat(encodeURIComponent(I.a.PROXY_SERVER))}))},o.a.createElement("span",{className:"fill-tip",onMouseOver:function(){return Qe(!0)}},"\u624B\u673A\u4E0A\u4F20\u6587\u4EF6"))),o.a.createElement("li",{className:"btn-full-screen"},o.a.createElement(B,{icon:"".concat(Je?"icon-shrink":"icon-enlarge"),title:Je?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:ct})))},F=W("M8RZ"),G=W("+L6B"),X=W("2/Rp"),Z=W("y8nQ"),K=W("Vl3Y"),q=W("5NDa"),ae=W("5rEg"),oe={labelCol:{span:4},wrapperCol:{span:20}},ve=function(ot){var xt=ot.callback,nt=ot.onCancel;function ct(Je){xt(Je)}return o.a.createElement(K.a,Object(x.a)({},oe,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:ct}),o.a.createElement(K.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},o.a.createElement(ae.a,null)),o.a.createElement(K.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},o.a.createElement(ae.a,null)),o.a.createElement("div",{className:"flex-container flex-end"},o.a.createElement(X.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),o.a.createElement(X.a,{type:"ghost",onClick:nt},"\u53D6\u6D88")))},he=W("7ahc"),_e=W("k1fw"),fe=W("HmJG"),xe=W("BjJ7"),je=K.a.useForm,Le={width:280,marginRight:10},ke={labelCol:{span:5},wrapperCol:{span:19}},Fe=function(ot){var xt=ot.callback,nt=ot.onCancel,ct=je(),Je=Object(C.a)(ct,1),Ee=Je[0],Ue=useRef();function ft(wt){xt(Object(_e.a)(Object(_e.a)({},wt),{},{name:Ue.current}))}function Qe(wt,lt){if(wt.status===-1){P.b.error(wt.message);return}Ee.setFieldsValue({src:"/api/attachments/".concat(wt.id),type:lt.type})}function Ot(wt){var lt=wt.target.files[0];Ue.current=lt.name,ce(lt,Qe)}return o.a.createElement(K.a,Object(x.a)({form:Ee},ke,{className:"upload-image-panel",onFinish:ft}),o.a.createElement(K.a.Item,{label:"\u6587\u4EF6\u5730\u5740",required:!0},o.a.createElement("div",{className:"flex-container"},o.a.createElement(K.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},o.a.createElement(ae.a,{style:Le})),o.a.createElement(ge,{onFileChange:Ot}))),o.a.createElement(K.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},o.a.createElement(ae.a,{style:{width:264}})),o.a.createElement(K.a.Item,{style:{textAlign:"right"}},o.a.createElement(X.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),o.a.createElement(X.a,{type:"ghost",onClick:nt},"\u53D6\u6D88")))};function ge(ot){var xt=ot.onFileChange;return o.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",o.a.createElement("input",{type:"file",onChange:xt}))}function ce(ot,xt){if(!ot)throw new String("\u6CA1\u6709\u6587\u4EF6");var nt=new FormData;nt.append("editormd-image-file",ot),nt.append("file_param_name","editormd-image-file"),nt.append("byxhr","true");var ct=new window.XMLHttpRequest;ct.withCredentials=!0,ct.addEventListener("load",function(Je){xt(JSON.parse(Je.target.responseText),ot)},!1),ct.addEventListener("error",function(Je){console.error(Je)},!1),ct.open("POST","".concat(xe.a,"/api/attachments.json")),ct.send(nt)}var Ie=W("giR+"),Ne=W("fyUT"),Xe=W("7Kak"),te=W("9yH6"),k=te.a.Group,N={margin:"0 8px"},J=function(ot){var xt=ot.callback,nt=ot.onCancel;function ct(Je){xt(Je)}return o.a.createElement(K.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:ct},o.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},o.a.createElement("span",{style:N},"\u5355\u5143\u683C\u6570\uFF1A"),o.a.createElement("span",{style:N},"\u884C\u6570"),o.a.createElement(K.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},o.a.createElement(Ne.a,null)),o.a.createElement("span",{style:N},"\u5217\u6570"),o.a.createElement(K.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},o.a.createElement(Ne.a,null))),o.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},o.a.createElement("span",{style:N},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),o.a.createElement(K.a.Item,{name:"align"},o.a.createElement(k,null,o.a.createElement(te.a,{value:"default"},o.a.createElement("i",{className:"fa fa-align-justify"})),o.a.createElement(te.a,{value:"left"},o.a.createElement("i",{className:"fa fa-align-left"})),o.a.createElement(te.a,{value:"center"},o.a.createElement("i",{className:"fa fa-align-center"})),o.a.createElement(te.a,{value:"right"},o.a.createElement("i",{className:"fa fa-align-right"}))))),o.a.createElement("div",{className:"flex-container flex-end"},o.a.createElement(X.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),o.a.createElement(X.a,{type:"ghost",onClick:nt},"\u53D6\u6D88")))},V=W("ErOA"),Y=W("7Cbv"),me="link",Ae="upload-image",at="code-block",Re="add-table",Pe="------------",Ye={default:Pe,left:":".concat(Pe),center:":".concat(Pe,":"),right:"".concat(Pe,":")},Ze=W("9VGf"),ze,We;function Me(){}var De=0,Oe=1e4,pe="\u2581",be=`
|
|
|
**\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 Ce(ot){return/^\d+$/.test(ot)?"".concat(ot,"px"):ot}var we=navigator.platform.toUpperCase().indexOf("MAC")>=0,$e=we?"Cmd":"Ctrl",it=["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"],dt=(ze={},Object(w.a)(ze,$e+"-B","bold"),Object(w.a)(ze,$e+"-I","italic"),ze),Et=(We={},Object(w.a)(We,me,"\u6DFB\u52A0\u94FE\u63A5"),Object(w.a)(We,at,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(w.a)(We,Ae,"\u6DFB\u52A0\u6587\u4EF6"),Object(w.a)(We,Re,"\u6DFB\u52A0\u8868\u683C"),We),Dt=Be.a=function(ot){var xt=ot.defaultValue,nt=xt===void 0?"":xt,ct=ot.onChange,Je=ot.width,Ee=Je===void 0?"100%":Je,Ue=ot.height,ft=Ue===void 0?400:Ue,Qe=ot.miniToolbar,Ot=Qe===void 0?!1:Qe,wt=ot.isFocus,lt=wt===void 0?!1:wt,yt=ot.watch,Nt=ot.insertTemp,Gt=ot.mode,Xt=Gt===void 0?"markdown":Gt,Te=ot.id,de=Te===void 0?"markdown-editor-id":Te,H=ot.showResizeBar,Q=H===void 0?!1:H,ne=ot.noStorage,se=ne===void 0?!1:ne,Se=ot.showNullButton,He=Se===void 0?!1:Se,qe=ot.hidetoolBar,Tt=qe===void 0?!1:qe,Lt=ot.fullScreen,rt=Lt===void 0?!1:Lt,Ct=ot.onBlur,Jt=ot.onCMBeforeChange,St=ot.onFullScreen,nn=ot.className,Qt=nn===void 0?"":nn,Ut=ot.disablePaste,vt=Ut===void 0?!1:Ut,En=ot.placeholder,xn=En===void 0?"":En,ln=ot.values,un=ln===void 0?"":ln,er=Object(f.useState)(null),ir=Object(C.a)(er,2),gt=ir[0],yr=ir[1],Cr=Object(f.useState)(nt),gn=Object(C.a)(Cr,2),Ln=gn[0],_r=gn[1],Jr=Object(f.useState)(yt),kr=Object(C.a)(Jr,2),tr=kr[0],fr=kr[1],Ei=Object(f.useState)(rt),Er=Object(C.a)(Ei,2),ur=Er[0],xr=Er[1],zr=Object(f.useState)(""),Rr=Object(C.a)(zr,2),Gr=Rr[0],br=Rr[1],xi=Object(f.useState)(0),oi=Object(C.a)(xi,2),Br=oi[0],ci=oi[1],Ni=Object(f.useState)(ft),Si=Object(C.a)(Ni,2),di=Si[0],hr=Si[1],pr=Object(f.useState)(!1),Qr=Object(C.a)(pr,2),Ui=Qr[0],Li=Qr[1],fi=Object(f.useRef)(Object(Y.a)()),ea=Object(f.useRef)(!1),Vi=Object(f.useRef)(),Ir=Object(f.useRef)(),wi=Object(f.useRef)(),qr=Object(f.useRef)(),Ti=Object(f.useRef)(),Xi=function(){var tn=Object(E.a)(p.a.mark(function jt(){var an,Pn;return p.a.wrap(function(ar){for(;;)switch(ar.prev=ar.next){case 0:return ar.next=2,Object(V.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:fi.current}});case 2:Pn=ar.sent,Pn!=null&&(an=Pn.attachments)!==null&&an!==void 0&&an.length&&(console.log("cm:",gt,Ir),Pn.attachments.map(function(Kn){Kn.content_type.indexOf("image")>-1?gt.replaceSelection(".concat(Kn.content_type,")")):Kn.content_type.indexOf("video")>-1?gt.replaceSelection('<video width="100%" controls src="'.concat(I.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):Kn.content_type.indexOf("pdf")>-1?gt.replaceSelection('<a href="'.concat(I.a.API_SERVER,"/api/attachments/").concat(Kn.id,"?type=").concat(Kn.content_type,'&disposition=inline" target="_blank">').concat(Kn.name,"</a>")):gt.replaceSelection("[".concat(Kn.name,"](").concat(I.a.API_SERVER,"/api/attachments/").concat(Kn.id,"?type=").concat(Kn.content_type,")"))}));case 4:case"end":return ar.stop()}},jt)}));return function(){return tn.apply(this,arguments)}}();Object(f.useEffect)(function(){_r(un),gt==null||gt.setValue(un)},[un]),Object(f.useEffect)(function(){St==null||St(ur)},[ur]),Object(f.useEffect)(function(){if(Ir.current){var tn=c.a.fromTextArea(Ir.current,{mode:Xt,lineNumbers:!Ot,lineWrapping:!0,value:nt,autoCloseTags:!0,autoCloseBrackets:!0});lt&&tn.focus();function jt(an,Pn){if(vt){Pn.preventDefault();return}var Vn=Pn.clipboardData;if(Vn){var ar=Vn.types.toString(),Kn=Vn.items;if(ar==="Files"||Vn.types.indexOf("Files")>-1){if(Pn.preventDefault(),Xt=="stex")return;try{var mr,et=Kn[1];((mr=Kn[0])===null||mr===void 0?void 0:mr.kind)==="file"&&(et=Kn[0]);var ut=et.getAsFile(),Pt=ut.name.split(".").pop();ce(ut,function(bt){if(bt.id){var It,Mt,ht;(ut==null||((It=ut.type)===null||It===void 0)?void 0:It.indexOf("image"))>-1?tn.replaceSelection(".concat(bt.content_type,")")):(ut==null||((Mt=ut.type)===null||Mt===void 0)?void 0:Mt.indexOf("video"))>-1?tn.replaceSelection('<video width="100%" controls src="'.concat(I.a.API_SERVER,"/api/attachments/").concat(bt.id,'"></video>')):(ut==null||((ht=ut.type)===null||ht===void 0)?void 0:ht.indexOf("pdf"))>-1?tn.replaceSelection('<a href="'.concat(I.a.API_SERVER,"/api/attachments/").concat(bt.id,"?type=").concat(ut.type,'&disposition=inline" target="_blank">').concat(ut.name,"</a>")):it.includes(Pt)?tn.replaceSelection('<a href="'.concat(I.a.API_SERVER,"/api/attachments/").concat(bt.id,'?type=office&disposition=inline" target="_blank">').concat(ut.name,"</a>")):tn.replaceSelection("[".concat(ut.name,"](").concat(I.a.API_SERVER,"/api/attachments/").concat(bt.id,"?type=").concat(bt.content_type,")"))}else(bt==null?void 0:bt.status)===401&&(document.location.href="/user/login")})}catch(bt){P.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return tn.on("paste",jt),tn.on("dragleave",function(an,Pn){wi.current.classList.remove("mouse-hover-md")}),tn.on("dragover",function(an,Pn){wi.current.classList.add("mouse-hover-md")}),tn.on("drop",function(an,Pn){wi.current.classList.add("mouse-hover-md");var Vn;if(Vn=Pn.dataTransfer.files,Vn.length>0){Pn.preventDefault(),Pn.stopPropagation();for(var ar=function(et){var ut=Vn[et],Pt=ut.name.split(".").pop();ce(ut,function(bt){if(bt.id){var It,Mt,ht;(ut==null||((It=ut.type)===null||It===void 0)?void 0:It.indexOf("image"))>-1?tn.replaceSelection(".concat(bt.content_type,")")):(ut==null||((Mt=ut.type)===null||Mt===void 0)?void 0:Mt.indexOf("video"))>-1?tn.replaceSelection('<video width="100%" controls src="'.concat(I.a.API_SERVER,"/api/attachments/").concat(bt.id,'"></video>')):(ut==null||((ht=ut.type)===null||ht===void 0)?void 0:ht.indexOf("pdf"))>-1?tn.replaceSelection('<a href="'.concat(I.a.API_SERVER,"/api/attachments/").concat(bt.id,"?type=").concat(ut.type,'&disposition=inline" target="_blank">').concat(ut.name,"</a>")):it.includes(Pt)?tn.replaceSelection('<a href="'.concat(I.a.API_SERVER,"/api/attachments/").concat(bt.id,'?type=office&disposition=inline" target="_blank">').concat(ut.name,"</a>")):tn.replaceSelection("[".concat(ut.name,"](").concat(I.a.API_SERVER,"/api/attachments/").concat(bt.id,"?type=").concat(bt.content_type,")"))}else(bt==null?void 0:bt.status)===401&&(document.location.href="/user/login")})},Kn=0;Kn<Vn.length;Kn++)ar(Kn)}}),yr(tn),function(){tn.off("paste",jt)}}},[]);var hi=Object(f.useCallback)(function(){if(wi.current)try{}catch(tn){console.log(tn,"---- to set md editor body height")}},[di,wi,ur]);Object(f.useEffect)(function(){function tn(){var an=new s.default(function(Pn){var Vn=Object(U.a)(Pn),ar;try{for(Vn.s();!(ar=Vn.n()).done;){var Kn=ar.value;(Kn.target.offsetHeight>0||Kn.target.offsetWidth>0)&&(hi(),gt.setSize("100%","100%"),gt.refresh())}}catch(mr){Vn.e(mr)}finally{Vn.f()}});return an.observe(Ir.current.parentElement),an}if(gt){var jt=tn();return function(){jt.unobserve(Ir.current.parentElement)}}},[gt,hi]),Object(f.useEffect)(function(){if(gt){for(var tn=[],jt=function(){var Kn=Pn[an];Vn=Object(C.a)(Kn,2);var mr=Vn[0],et=Vn[1],ut=Object(w.a)({},mr,function(){ji(et)});tn.push(ut),gt.addKeyMap(ut)},an=0,Pn=Object.entries(dt);an<Pn.length;an++){var Vn;jt()}return Vi.current=setInterval(function(){ea.current&&Xi()},4e3),function(){clearInterval(Vi.current);var ar=Object(U.a)(tn),Kn;try{for(ar.s();!(Kn=ar.n()).done;){var mr=Kn.value;gt.removeKeyMap(mr)}}catch(et){ar.e(et)}finally{ar.f()}}}},[gt]),Object(f.useEffect)(function(){rt!==ur&&xr(rt)},[rt]),Object(Ze.a)(function(){if(!se&&Br>0){var tn=new Date().getTime(),jt=window.sessionStorage.getItem(de);tn>=Br+Oe&&(!jt||jt!==Ln)&&(window.sessionStorage.setItem(de,Ln),Li(!0))}},Oe),Object(f.useEffect)(function(){fr(yt)},[gt,yt]),Object(f.useEffect)(function(){gt&&(lt&>.focus())},[gt,lt]),Object(f.useEffect)(function(){if(tr&>){var tn=gt.getScrollerElement();function jt(an){var Pn=an.target;if(Ti.current){var Vn=Pn.scrollTop/Pn.scrollHeight;Ti.current.scrollTop=Ti.current.scrollHeight*Vn}}return tn.addEventListener("scroll",jt),function(){tn.removeEventListener("scroll",jt)}}},[gt,tr]),Object(f.useEffect)(function(){if(gt&&Jt){function tn(jt,an){Jt(jt,an)}return gt.on("beforeChange",tn),function(){gt.off("beforeChange",tn)}}},[gt,Jt]),Object(f.useEffect)(function(){if(gt&&Ct){function tn(){Ct(gt.getValue())}return gt.on("blur",tn),function(){gt.off("blur",tn)}}},[gt,Ct]),Object(f.useEffect)(function(){if(gt){function tn(jt){var an=jt.getValue();_r(an),ci(new Date().getTime()),jt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),ct&&ct(an)}return gt.on("change",tn),function(){gt.off("change",tn)}}},[gt,ct]),Object(f.useEffect)(function(){gt&&(nt==null?(gt.setValue(""),_r("")):nt!==gt.getValue()&&(gt.setValue(nt),_r(nt),gt.setCursor(gt.lineCount(),0)))},[gt,nt]);var ji=Object(f.useCallback)(function(tn){var jt=gt.getCursor(),an=gt.getSelection(),Pn=an.split(`
|
|
|
`);switch(tn){case"bold":return gt.replaceSelection("**"+an+"**"),an===""&>.setCursor(jt.line,jt.ch+2),gt.focus();case"italic":return gt.replaceSelection("*"+an+"*"),an===""&>.setCursor(jt.line,jt.ch+1),gt.focus();case"code":return gt.replaceSelection("`"+an+"`"),an===""&>.setCursor(jt.line,jt.ch+1),gt.focus();case"inline-latex":return gt.replaceSelection("`$$"+an+"$$`"),an===""&>.setCursor(jt.line,jt.ch+3),gt.focus();case"latex":return gt.replaceSelection("```latex\n"+an+"\n```"),gt.setCursor(jt.line+1,an.length+1),gt.focus();case"line-break":return gt.replaceSelection(`<br/>
|
|
|
`),gt.focus();case"list-ul":return an===""?gt.replaceSelection("- "+an):gt.replaceSelection(Pn.map(function(Vn){return Vn===""?"":"- ".concat(Vn)}).join(`
|
|
|
`)),gt.focus();case"list-ol":return an===""?gt.replaceSelection("1. "+an):gt.replaceSelection(Pn.map(function(Vn,ar){return Vn===""?"":"".concat(ar+1,". ").concat(Vn)}).join(`
|
|
|
`)),gt.focus();case"add-null-ch":return an===""&>.setCursor(jt.line,jt.ch+1),gt.replaceSelection(pe),gt.focus();case"inster-template-1":return an===""&>.setCursor(jt.line,jt.ch),gt.replaceSelection(be),gt.focus();case"eraser":return gt.setValue(""),gt.focus();case"trigger-watch":return fr(!tr),gt.focus();case"trigger-full-screen":return xr(!ur),gt.focus();case me:br(me);return;case at:br(at);return;case Ae:br(Ae);return;case Re:br(Re);return;default:throw new Error}},[gt,tr,ur]),Zr=Object(f.useCallback)(function(tn){br("");switch(Gr){case me:var jt=tn.title,an=tn.link;return gt.replaceSelection("[".concat(jt,"](").concat(an,")")),gt.focus();case at:var Pn=tn.language,Vn=tn.content;return gt.replaceSelection(["```"+Pn,Vn,"```"].join(`
|
|
|
`)),gt.focus();case Ae:var ar=tn.src,Kn=tn.alt;return Kn?gt.replaceSelection(".concat(ar,' "').concat(Kn,'" )')):gt.replaceSelection("")),gt.focus();case Re:for(var mr=tn.row,et=tn.col,ut=tn.align,Pt=`
|
|
|
`,bt=0;bt<mr;bt++){for(var It=[],Mt=[],ht=0;ht<et;ht++)bt===1&&Mt.push(Ye[ut]),It.push(" ");bt===1&&(Pt+="| ".concat(Mt.join(" | "),` |
|
|
|
`)),Pt+="| ".concat(It.join(et===1?"":" | "),` |
|
|
|
`)}return gt.replaceSelection(Pt+`
|
|
|
`),gt.focus();default:throw new Error}},[gt,Gr]),Fi=Object(f.useMemo)(function(){switch(Gr){case me:return o.a.createElement(ve,{callback:Zr,onCancel:pi});case at:return o.a.createElement(he.b,{callback:Zr,onCancel:pi});case Ae:return o.a.createElement(Fe,{callback:Zr,onCancel:pi});case Re:return o.a.createElement(J,{callback:Zr,onCancel:pi});default:return null}},[Gr]);function pi(){br("")}Object(f.useEffect)(function(){if(qr.current){var tn=qr.current,jt=!1,an=0;function Pn(Kn){jt=!0,an=Kn.pageY}function Vn(){jt=!1}function ar(Kn){if(jt){var mr=Kn.pageY-an;mr<0&&(mr=0),mr>300&&(mr=300);var et=ft+mr+"px";hr(et)}}return tn.addEventListener("mousedown",Pn),document.addEventListener("mousemove",ar),document.addEventListener("mouseup",Vn),function(){tn.removeEventListener("mousedown",Pn),document.removeEventListener("mousemove",ar),document.removeEventListener("mouseup",Vn)}}},[gt,qr]),Object(f.useEffect)(function(){hr(ft)},[ft]);var ni=Ce(Ee),Yi=Ce(di),da={width:ni,height:Yi},fa=Object(f.useMemo)(function(){if(Br){var tn=new Date(Br),jt=tn.getHours(),an=tn.getMinutes(),Pn=tn.getSeconds();return jt=jt<10?"0"+jt:jt,an=an<10?"0"+an:an,Pn=Pn<10?"0"+Pn:Pn,"".concat(jt,":").concat(an,":").concat(Pn)}return 0},[Br]);function $i(){window.sessionStorage.removeItem(de),Li(!1),ci(0)}function Ji(){Li(!1),ci(0),gt.setValue(window.sessionStorage.getItem(de))}function Qi(tn,jt){var an=gt.getValue();an=an.replace(tn,jt),_r(an),gt==null||gt.setValue(an)}return o.a.createElement(f.Fragment,null,o.a.createElement("div",{className:"markdown-editor-wrapper",ref:wi},o.a.createElement("div",{className:"markdown-editor-container ".concat(Qt," ").concat(tr?"on-preview":""," ").concat(Ot?"mini":""," ").concat(ur?"full-screen":""),style:da},o.a.createElement(ee,{insertTemp:Nt,watch:tr,fullScreen:ur,showNullButton:He,onActionCallback:ji,hidetoolBar:Tt,uuid:fi.current,setOpenPhones:function(){ea.current=!0}}),o.a.createElement("div",{className:"markdown-editor-body"},o.a.createElement("div",{className:"codemirror-container"},o.a.createElement("textarea",{ref:Ir,placeholder:xn})),tr?o.a.createElement("div",{ref:Ti,className:"preview-container"},Xt==="stex"&&o.a.createElement(_,{value:Ln}),Xt!=="stex"&&o.a.createElement(y.a,{edit:!0,value:Ln,replaces:Qi})):null))),Q?o.a.createElement("a",{ref:qr,className:"editor-resize"}):null,o.a.createElement(F.a,null,Et[Gr]?o.a.createElement($.a,{centered:!0,title:Et[Gr],visible:!0,onCancel:pi,footer:null,className:"markdown-popup-form"},Fi):null))}},P5Jw:function(Ve,Be,W){"use strict";var re=W("rHrb"),$=re.CopyToClipboard;$.CopyToClipboard=$,Ve.exports=$},PD8m:function(Ve,Be){Ve.exports={name:"memoryStorage",read:re,write:$,each:U,remove:S,clearAll:P};var W={};function re(E){return W[E]}function $(E,C){W[E]=C}function U(E){for(var C in W)W.hasOwnProperty(C)&&E(W[C],C)}function S(E){delete W[E]}function P(E){W={}}},RELg:function(Ve,Be,W){var re=W("MFOe"),$=re.Global;Ve.exports={name:"oldIE-userDataStorage",write:C,read:w,each:u,remove:p,clearAll:f};var U="storejs",S=$.document,P=c(),E=($.navigator?$.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function C(s,d){if(E)return;var i=a(s);P(function(t){t.setAttribute(i,d),t.save(U)})}function w(s){if(E)return;var d=a(s),i=null;return P(function(t){i=t.getAttribute(d)}),i}function u(s){P(function(d){for(var i=d.XMLDocument.documentElement.attributes,t=i.length-1;t>=0;t--){var n=i[t];s(d.getAttribute(n.name),n.name)}})}function p(s){var d=a(s);P(function(i){i.removeAttribute(d),i.save(U)})}function f(){P(function(s){var d=s.XMLDocument.documentElement.attributes;s.load(U);for(var i=d.length-1;i>=0;i--)s.removeAttribute(d[i].name);s.save(U)})}var o=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function a(s){return s.replace(/^\d/,"___$&").replace(o,"___")}function c(){if(!S||!S.documentElement||!S.documentElement.addBehavior)return null;var s="script",d,i,t;try{i=new ActiveXObject("htmlfile"),i.open(),i.write("<"+s+">document.w=window</"+s+'><iframe src="/favicon.ico"></iframe>'),i.close(),d=i.w.frames[0].document,t=d.createElement("div")}catch(n){t=S.createElement("div"),d=S.body}return function(n){var h=[].slice.call(arguments,0);h.unshift(t),d.appendChild(t),t.addBehavior("#default#userData"),t.load(U),n.apply(this,h),d.removeChild(t);return}}},RpDr:function(Ve,Be,W){"use strict";W.d(Be,"a",function(){return y}),W.d(Be,"c",function(){return g});var re=W("+L6B"),$=W("2/Rp"),U=W("tJVT"),S=W("k1fw"),P=W("jrin"),E=W("5NDa"),C=W("5rEg"),w=W("cDcd"),u=W.n(w),p=W("8Skl"),f=W("y3Kf"),o=W("bdLU"),a=W("J66h"),c=W.n(a),s=W("++UQ"),d=W.n(s),i=W("IxHN"),t=W("9Bee"),n=W("1vsH"),h,v=C.a.TextArea,b={visible:!1,tabIndex:"0"},y=(h={},Object(P.a)(h,o.a.NOMATCH,"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D"),Object(P.a)(h,o.a.OK,"\u8C03\u8BD5\u901A\u8FC7"),Object(P.a)(h,2,"\u8C03\u8BD5\u8D85\u65F6"),Object(P.a)(h,3,"\u8C03\u8BD5pod\u5931\u8D25"),Object(P.a)(h,4,"\u7F16\u8BD1\u5931\u8D25"),Object(P.a)(h,5,"\u6267\u884C\u5931\u8D25"),h),_;(function(l){l[l.SET_VISIBLE=0]="SET_VISIBLE",l[l.SET_TABINDEX=1]="SET_TABINDEX"})(_||(_={}));function m(l,T){switch(T.type){case _.SET_VISIBLE:return Object(S.a)(Object(S.a)({},l),{},{visible:T.payload});case _.SET_TABINDEX:return Object(S.a)(Object(S.a)({},l),{},{tabIndex:T.payload});default:throw new Error}}function g(l){var T=l.status,A=l.error_msg,O=l.output,D=l.input,I=l.expected_output,j=l.is_file,B=l.input_file_url,ee=l.output_file_url,F=l.expected_output_file_url,G=null,X={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(T){case o.a.NOMATCH:G=u.a.createElement(u.a.Fragment,null,u.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!j&&u.a.createElement(t.a,{value:D,style:X}),j&&u.a.createElement("div",{style:X},u.a.createElement("a",{onClick:function(){return Object(n.y)(B,D)}},D)),u.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!j&&u.a.createElement(t.a,{value:O&&a.Base64.decode(O)||"",style:X}),j&&u.a.createElement("div",{style:X},u.a.createElement("a",{onClick:function(){return Object(n.y)(ee,O)}},O)),u.a.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!j&&u.a.createElement(t.a,{value:I&&a.Base64.decode(I)||"",style:X}),j&&u.a.createElement("div",{style:X},u.a.createElement("a",{onClick:function(){return Object(n.y)(F,I)}},I)));break;case o.a.EXECUTEFAILURE:G=u.a.createElement(u.a.Fragment,null,u.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!j&&u.a.createElement(t.a,{value:D,style:X}),j&&u.a.createElement("div",{style:X},u.a.createElement("a",{onClick:function(){return Object(n.y)(B,D)}},D)),u.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),u.a.createElement("pre",{className:"error"},a.Base64.decode(A)));break;case o.a.COMPILEFAILURE:G=u.a.createElement(u.a.Fragment,null,u.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!j&&u.a.createElement(t.a,{value:D,style:X}),j&&u.a.createElement("div",{style:X},u.a.createElement("a",{onClick:function(){return Object(n.y)(B,D)}},D)),u.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),u.a.createElement("pre",{className:"error"},a.Base64.decode(A)));break;case o.a.PODFAILURE:G=u.a.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case o.a.TIMEOUT:G=u.a.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return u.a.createElement(u.a.Fragment,null," ",G," ")}function x(l){var T=l.status,A=l.error_msg,O=l.execute_time,D=l.output,I=l.input,j=l.expected_output,B=l.is_file,ee=l.input_file_url,F=l.output_file_url,G=l.expected_output_file_url,X=null;switch(T){case o.a.OK:X=u.a.createElement(u.a.Fragment,null,u.a.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",O),u.a.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),u.a.createElement("pre",null,a.Base64.decode(D)));break;case o.a.NOMATCH:X=u.a.createElement(u.a.Fragment,null,u.a.createElement("p",null,"\u8F93\u5165\uFF1A",u.a.createElement("pre",null,I)),u.a.createElement("p",null,"\u8F93\u51FA\uFF1A",D&&a.Base64.decode(D)),u.a.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",j&&a.Base64.decode(j)));break;case o.a.EXECUTEFAILURE:X=u.a.createElement(u.a.Fragment,null,u.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",u.a.createElement("pre",null,I)),u.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),u.a.createElement("pre",{className:"error"},a.Base64.decode(A)));break;case o.a.COMPILEFAILURE:X=u.a.createElement(u.a.Fragment,null,u.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",u.a.createElement("pre",null,I)),u.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),u.a.createElement("pre",{className:"error"},a.Base64.decode(A)));break;case o.a.PODFAILURE:X=u.a.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case o.a.TIMEOUT:X=u.a.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return u.a.createElement(u.a.Fragment,null," ",X," ")}Be.b=function(l){var T=l.id,A=l.input,O=l.debuging,D=l.submitting,I=l.executingMessage,j=l.debugResult,B=l.onChangeInput,ee=l.onDebugCode,F=l.onSubmitCode,G=Object(w.useReducer)(m,b),X=Object(U.a)(G,2),Z=X[0],K=X[1],q=Z.visible,ae=Z.tabIndex;Object(w.useEffect)(function(){K({type:_.SET_VISIBLE,payload:!1})},[T]);function oe(fe){var xe=fe.target.id;K({type:_.SET_TABINDEX,payload:xe})}function ve(){K({type:_.SET_VISIBLE,payload:!q})}var he=Object(w.useMemo)(function(){if(j){var fe=j.status;return u.a.createElement(u.a.Fragment,null,x(j))}return null},[j]);function _e(){K({type:_.SET_VISIBLE,payload:!0}),K({type:_.SET_TABINDEX,payload:"1"}),ee()}return u.a.createElement("div",{className:"test-case-panel"},u.a.createElement("div",{className:"test-case-panel-body ".concat(q?"active":"")},u.a.createElement("ul",{className:"s-navs"},u.a.createElement("li",null,u.a.createElement("a",{className:ae==="0"?"active":"",id:"0",onClick:oe},"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B")),u.a.createElement("li",null,u.a.createElement("a",{className:ae==="1"?"active":"",id:"1",onClick:oe},"\u4EE3\u7801\u6267\u884C\u7ED3\u679C"))),u.a.createElement("div",{className:"tab-panel-body ".concat(ae==="0"?"":"hide")},u.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:B})),u.a.createElement("div",{className:"tab-panel-body ".concat(ae==="1"?"":"hide")},O?u.a.createElement(i.a,{message:I}):j?u.a.createElement("section",{style:{height:200}}," ",he," "):u.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"))),u.a.createElement("a",{className:"btn-collapse ".concat(q?"up":""),onClick:ve},q?u.a.createElement(p.a,null):u.a.createElement(f.a,null)),u.a.createElement("footer",{className:"footer"},u.a.createElement("span",{style:{visibility:"hidden"}},"\u63A7\u5236\u53F0"),u.a.createElement("div",{className:"flex-container"},u.a.createElement($.a,{id:"oj-prev",className:"btn-blue",type:"ghost"},"\u4E0A\u4E00\u9898"),u.a.createElement($.a,{id:"oj-next",className:"btn-blue",type:"ghost"},"\u4E0B\u4E00\u9898"),u.a.createElement($.a,{className:"btn-green",type:"ghost",loading:O,onClick:_e},"\u8C03\u8BD5\u4EE3\u7801"),u.a.createElement($.a,{type:"primary",loading:D,disabled:D,onClick:function(){K({type:_.SET_VISIBLE,payload:!1}),F()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},"S/kP":function(Ve,Be,W){Ve.exports=W.p+"static/time.a3dc82f3.svg"},"SA+Z":function(Ve,Be,W){var re=W("wTVA"),$=W("EbDI"),U=W("ZhPi"),S=W("wkBT");function P(E){return re(E)||$(E)||U(E)||S()}Ve.exports=P,Ve.exports.__esModule=!0,Ve.exports.default=Ve.exports},SJMd:function(Ve,Be){/**
|
|
|
* @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 W,re,$,U=!1,S,P;window.PR_SHOULD_USE_CONTINUATION=!0;var E,C;(function(){var w=window,u=["break,continue,do,else,for,if,return,while"],p=[u,"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"],o=[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",d=[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",t=[u,"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"],n=[u,"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"],h=[u,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],v=[o,c,a,d,i,t,n,h],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",x="lit",l="pun",T="pln",A="tag",O="dec",D="src",I="atn",j="atv",B="nocode",ee="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function F(ce){for(var Ie=0,Ne=!1,Xe=!1,te=0,k=ce.length;te<k;++te){var N=ce[te];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 J={b:8,t:9,n:10,v:11,f:12,r:13};function V(Re){var Pe=Re.charCodeAt(0);if(Pe!==92)return Pe;var Ye=Re.charAt(1);return Pe=J[Ye],Pe||("0"<=Ye&&Ye<="7"?parseInt(Re.substring(1),8):Ye==="u"||Ye==="x"?parseInt(Re.substring(2),16):Re.charCodeAt(1))}function Y(Re){if(Re<32)return(Re<16?"\\x0":"\\x")+Re.toString(16);var Pe=String.fromCharCode(Re);return Pe==="\\"||Pe==="-"||Pe==="]"||Pe==="^"?"\\"+Pe:Pe}function me(Re){var Pe=Re.substring(1,Re.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=Pe[0]==="^",ze=["["];Ze&&ze.push("^");for(var We=Ze?1:0,Me=Pe.length;We<Me;++We){var De=Pe[We];if(/\\[bdsw]/i.test(De))ze.push(De);else{var Oe=V(De),pe;We+2<Me&&Pe[We+1]==="-"?(pe=V(Pe[We+2]),We+=2):pe=Oe,Ye.push([Oe,pe]),pe<65||Oe>122||(pe<65||Oe>90||Ye.push([Math.max(65,Oe)|32,Math.min(pe,90)|32]),pe<97||Oe>122||Ye.push([Math.max(97,Oe)&~32,Math.min(pe,122)&~32]))}}Ye.sort(function($e,it){return $e[0]-it[0]||it[1]-$e[1]});for(var be=[],Ce=[],We=0;We<Ye.length;++We){var we=Ye[We];we[0]<=Ce[1]+1?Ce[1]=Math.max(Ce[1],we[1]):be.push(Ce=we)}for(var We=0;We<be.length;++We){var we=be[We];ze.push(Y(we[0])),we[1]>we[0]&&(we[1]+1>we[0]&&ze.push("-"),ze.push(Y(we[1])))}return ze.push("]"),ze.join("")}function Ae(Re){for(var Pe=Re.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=Pe.length,Ze=[],ze=0,We=0;ze<Ye;++ze){var Me=Pe[ze];if(Me==="(")++We;else if(Me.charAt(0)==="\\"){var De=+Me.substring(1);De&&(De<=We?Ze[De]=-1:Pe[ze]=Y(De))}}for(var ze=1;ze<Ze.length;++ze)Ze[ze]===-1&&(Ze[ze]=++Ie);for(var ze=0,We=0;ze<Ye;++ze){var Me=Pe[ze];if(Me==="(")++We,Ze[We]||(Pe[ze]="(?:");else if(Me.charAt(0)==="\\"){var De=+Me.substring(1);De&&De<=We&&(Pe[ze]="\\"+Ze[De])}}for(var ze=0;ze<Ye;++ze)Pe[ze]==="^"&&Pe[ze+1]!=="^"&&(Pe[ze]="");if(Re.ignoreCase&&Ne)for(var ze=0;ze<Ye;++ze){var Me=Pe[ze],Oe=Me.charAt(0);Me.length>=2&&Oe==="["?Pe[ze]=me(Me):Oe!=="\\"&&(Pe[ze]=Me.replace(/[a-zA-Z]/g,function(Ce){var we=Ce.charCodeAt(0);return"["+String.fromCharCode(we&~32,we|32)+"]"}))}return Pe.join("")}for(var at=[],te=0,k=ce.length;te<k;++te){var N=ce[te];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=[],te=0,k=[],N=0;function J(V){var Y=V.nodeType;if(Y==1){if(Ne.test(V.className))return;for(var me=V.firstChild;me;me=me.nextSibling)J(me);var Ae=V.nodeName.toLowerCase();(Ae==="br"||Ae==="li")&&(Xe[N]=`
|
|
|
`,k[N<<1]=te++,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]=te,te+=at.length,k[N++<<1|1]=V)}}return J(ce),{sourceCode:Xe.join("").replace(/\n$/,""),spans:k}}function X(ce,Ie,Ne,Xe,te){if(!Ne)return;var k={sourceNode:ce,pre:1,langExtension:null,numberLines:null,sourceCode:Ne,spans:null,basePos:Ie,decorations:null};Xe(k),te.push.apply(te,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),J=[],V={},Y=0,me=N.length;Y<me;++Y){var Ae=N[Y],at=Ae[3];if(at)for(var Re=at.length;--Re>=0;)Ne[at.charAt(Re)]=Ae;var Pe=Ae[1],Ye=""+Pe;V.hasOwnProperty(Ye)||(J.push(Pe),V[Ye]=null)}J.push(/[\0-\uffff]/),Xe=F(J)})();var te=Ie.length,k=function(N){for(var J=N.sourceCode,V=N.basePos,Y=N.sourceNode,me=[V,T],Ae=0,at=J.match(Xe)||[],Re={},Pe=0,Ye=at.length;Pe<Ye;++Pe){var Ze=at[Pe],ze=Re[Ze],We=void 0,Me;if(typeof ze=="string")Me=!1;else{var De=Ne[Ze.charAt(0)];if(De)We=Ze.match(De[1]),ze=De[0];else{for(var Oe=0;Oe<te;++Oe)if(De=Ie[Oe],We=Ze.match(De[1]),We){ze=De[0];break}We||(ze=T)}Me=ze.length>=5&&ze.substring(0,5)==="lang-",Me&&!(We&&typeof We[1]=="string")&&(Me=!1,ze=D),Me||(Re[Ze]=ze)}var pe=Ae;if(Ae+=Ze.length,!Me)me.push(V+pe,ze);else{var be=We[1],Ce=Ze.indexOf(be),we=Ce+be.length;We[2]&&(we=Ze.length-We[2].length,Ce=we-be.length);var $e=ze.substring(5);X(Y,V+pe,Ze.substring(0,Ce),k,me),X(Y,V+pe+Ce,be,xe($e,be),me),X(Y,V+pe+we,Ze.substring(we),k,me)}}N.decorations=me};return k}function ae(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 te=ce.regexLiterals;if(te){var k=te>1?"":`
|
|
|
\r`,N=k?".":"[\\S\\s]",J="/(?=[^/*"+k+"])(?:[^/\\x5B\\x5C"+k+"]|\\x5C"+N+"|\\x5B(?:[^\\x5C\\x5D"+k+"]|\\x5C"+N+")*(?:\\x5D|$))+/";Ne.push(["lang-regex",RegExp("^"+ee+"("+J+")")])}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([T,/^\s+/,null,` \r
|
|
|
\xA0`]);var me="^.[^\\s\\w.$@'\"`/\\\\]*";return ce.regexLiterals&&(me+="(?!s*/)"),Ne.push([x,/^@[a-z_$][a-z_$@0-9]*/i,null],[g,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[T,/^[a-z_$][a-z_$@0-9]*/i,null],[x,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[T,/^\\[\s\S]?/,null],[l,new RegExp(me),null]),q(Ie,Ne)}var oe=ae({keywords:v,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ve(ce,Ie,Ne){for(var Xe=/(?:^|\s)nocode(?:\s|$)/,te=/\r\n?|\n/,k=ce.ownerDocument,N=k.createElement("li");ce.firstChild;)N.appendChild(ce.firstChild);var J=[N];function V(Pe){var Ye=Pe.nodeType;if(Ye==1&&!Xe.test(Pe.className))if(Pe.nodeName==="br")Y(Pe),Pe.parentNode&&Pe.parentNode.removeChild(Pe);else for(var Ze=Pe.firstChild;Ze;Ze=Ze.nextSibling)V(Ze);else if((Ye==3||Ye==4)&&Ne){var ze=Pe.nodeValue,We=ze.match(te);if(We){var Me=ze.substring(0,We.index);Pe.nodeValue=Me;var De=ze.substring(We.index+We[0].length);if(De){var Oe=Pe.parentNode;Oe.insertBefore(k.createTextNode(De),Pe.nextSibling)}Y(Pe),Me||Pe.parentNode.removeChild(Pe)}}}function Y(Pe){for(;!Pe.nextSibling;)if(Pe=Pe.parentNode,!Pe)return;function Ye(We,Me){var De=Me?We.cloneNode(!1):We,Oe=We.parentNode;if(Oe){var pe=Ye(Oe,1),be=We.nextSibling;pe.appendChild(De);for(var Ce=be;Ce;Ce=be)be=Ce.nextSibling,pe.appendChild(Ce)}return De}for(var Ze=Ye(Pe.nextSibling,0),ze;(ze=Ze.parentNode)&&ze.nodeType===1;)Ze=ze;J.push(Ze)}for(var me=0;me<J.length;++me)V(J[me]);Ie===(Ie|0)&&J[0].setAttribute("value",Ie);var Ae=k.createElement("ol");Ae.className="linenums";for(var at=Math.max(0,Ie-1|0)||0,me=0,Re=J.length;me<Re;++me)N=J[me],N.className="L"+(me+at)%10,N.firstChild||N.appendChild(k.createTextNode("\xA0")),Ae.appendChild(N);ce.appendChild(Ae)}function he(ce){var Ie=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Ie=Ie&&+Ie[1]<=8;var Ne=/\n/g,Xe=ce.sourceCode,te=Xe.length,k=0,N=ce.spans,J=N.length,V=0,Y=ce.decorations,me=Y.length,Ae=0;Y[me]=te;var at,Re;for(Re=at=0;Re<me;)Y[Re]!==Y[Re+2]?(Y[at++]=Y[Re++],Y[at++]=Y[Re++]):Re+=2;for(me=at,Re=at=0;Re<me;){for(var Pe=Y[Re],Ye=Y[Re+1],Ze=Re+2;Ze+2<=me&&Y[Ze+1]===Ye;)Ze+=2;Y[at++]=Pe,Y[at++]=Ye,Re=Ze}me=Y.length=at;var ze=ce.sourceNode,We="";ze&&(We=ze.style.display,ze.style.display="none");try{for(var Me=null;V<J;){var De=N[V],Oe=N[V+2]||te,pe=Y[Ae+2]||te,Ze=Math.min(Oe,pe),be=N[V+1],Ce;if(be.nodeType!==1&&(Ce=Xe.substring(k,Ze))){Ie&&(Ce=Ce.replace(Ne,"\r")),be.nodeValue=Ce;var we=be.ownerDocument,$e=we.createElement("span");$e.className=Y[Ae+1];var it=be.parentNode;it.replaceChild($e,be),$e.appendChild(be),k<Oe&&(N[V+1]=be=we.createTextNode(Xe.substring(Ze,Oe)),it.insertBefore(be,$e.nextSibling))}k=Ze,k>=Oe&&(V+=2),k>=pe&&(Ae+=2)}}finally{ze&&(ze.style.display=We)}}var _e={};function fe(ce,Ie){for(var Ne=Ie.length;--Ne>=0;){var Xe=Ie[Ne];_e.hasOwnProperty(Xe)?w.console&&console.warn("cannot override language handler %s",Xe):_e[Xe]=ce}}function xe(ce,Ie){return ce&&_e.hasOwnProperty(ce)||(ce=/^\s*</.test(Ie)?"default-markup":"default-code"),_e[ce]}fe(oe,["default-code"]),fe(q([],[[T,/^[^<?]+/],[O,/^<!\w[^>]*(?:>|$)/],[m,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[l,/^(?:<[%?]|[%?]>)/],["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([[T,/^[\s]+/,null,` \r
|
|
|
`],[j,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[A,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[I,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[l,/^[=<>\/]+/],["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([],[[j,/^[\s\S]+/]]),["uq.val"]),fe(ae({keywords:o,hashComments:!0,cStyleComments:!0,types:b}),["c","cc","cpp","cxx","cyc","m"]),fe(ae({keywords:"null,true,false"}),["json"]),fe(ae({keywords:c,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:b}),["cs"]),fe(ae({keywords:a,cStyleComments:!0}),["java"]),fe(ae({keywords:h,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),fe(ae({keywords:t,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),fe(ae({keywords:i,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),fe(ae({keywords:n,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),fe(ae({keywords:d,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),fe(ae({keywords:s,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),fe(q([],[[y,/^[\s\S]+/]]),["regex"]);function je(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,xe(Ie,Xe)(ce),he(ce)}catch(te){w.console&&console.log(te&&te.stack||te)}}function Le(ce,Ie,Ne){var Xe=Ne||!1,te=Ie||null,k=document.createElement("div");k.innerHTML="<pre>"+ce+"</pre>",k=k.firstChild,Xe&&ve(k,Xe,!0);var N={langExtension:te,numberLines:Xe,sourceNode:k,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return je(N),k.innerHTML}function ke(ce,Ie){var Ne=Ie||document.body,Xe=Ne.ownerDocument||document;function te(De){return Ne.getElementsByTagName(De)}for(var k=[te("pre"),te("code"),te("xmp")],N=[],J=0;J<k.length;++J)for(var V=0,Y=k[J].length;V<Y;++V)N.push(k[J][V]);k=null;var me=Date;me.now||(me={now:function(){return+new Date}});var Ae=0,at=/\blang(?:uage)?-([\w.]+)(?!\S)/,Re=/\bprettyprint\b/,Pe=/\bprettyprinted\b/,Ye=/pre|xmp/i,Ze=/^code$/i,ze=/^(?:pre|code|xmp)$/i,We={};function Me(){for(var De=w.PR_SHOULD_USE_CONTINUATION?me.now()+250:Infinity;Ae<N.length&&me.now()<De;Ae++){for(var Oe=N[Ae],pe=We,be=Oe;be=be.previousSibling;){var Ce=be.nodeType,we=(Ce===7||Ce===8)&&be.nodeValue;if(we?!/^\??prettify\b/.test(we):Ce!==3||/\S/.test(be.nodeValue))break;if(we){pe={},we.replace(/\b(\w+)=([\w:.%+-]+)/g,function(ft,Qe,Ot){pe[Qe]=Ot});break}}var $e=Oe.className;if((pe!==We||Re.test($e))&&!Pe.test($e)){for(var it=!1,dt=Oe.parentNode;dt;dt=dt.parentNode){var Et=dt.tagName;if(ze.test(Et)&&dt.className&&Re.test(dt.className)){it=!0;break}}if(!it){Oe.className+=" prettyprinted";var Dt=pe.lang;if(!Dt){Dt=$e.match(at);var ot;!Dt&&(ot=K(Oe))&&Ze.test(ot.tagName)&&(Dt=ot.className.match(at)),Dt&&(Dt=Dt[1])}var xt;if(Ye.test(Oe.tagName))xt=1;else{var nt=Oe.currentStyle,ct=Xe.defaultView,Je=nt?nt.whiteSpace:ct&&ct.getComputedStyle?ct.getComputedStyle(Oe,null).getPropertyValue("white-space"):0;xt=Je&&Je.substring(0,3)==="pre"}var Ee=pe.linenums;(Ee=Ee==="true"||+Ee)||(Ee=$e.match(/\blinenums\b(?::(\d+))?/),Ee=Ee?Ee[1]&&Ee[1].length?+Ee[1]:!0:!1),Ee&&ve(Oe,Ee,xt);var Ue={langExtension:Dt,sourceNode:Oe,numberLines:Ee,pre:xt,sourceCode:null,basePos:null,spans:null,decorations:null};je(Ue)}}}Ae<N.length?w.setTimeout(Me,250):typeof ce=="function"&&ce()}Me()}var Fe=w.PR={createSimpleLexer:q,registerLangHandler:fe,sourceDecorator:ae,PR_ATTRIB_NAME:I,PR_ATTRIB_VALUE:j,PR_COMMENT:m,PR_DECLARATION:O,PR_KEYWORD:_,PR_LITERAL:x,PR_NOCODE:B,PR_PLAIN:T,PR_PUNCTUATION:l,PR_SOURCE:D,PR_STRING:y,PR_TAG:A,PR_TYPE:g,prettyPrintOne:U?w.prettyPrintOne=Le:E=Le,prettyPrint:C=U?w.prettyPrint=ke:C=ke},ge=w.define;typeof ge=="function"&&ge.amd&&ge("google-code-prettify",[],function(){return Fe})})()},TcMa:function(Ve,Be,W){Ve.exports={desc:"desc___qlRMF",info:"info___JEaKq","commit-info":"commit-info___3-4e0"}},UZu5:function(Ve,Be,W){},VEzc:function(Ve,Be,W){Ve.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(Ve,Be,W){(function(re,$){Ve.exports=$()})(this,function(){"use strict";var re=navigator.userAgent,$=navigator.platform,U=/gecko\/\d/i.test(re),S=/MSIE \d/.test(re),P=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(re),E=/Edge\/(\d+)/.exec(re),C=S||P||E,w=C&&(S?document.documentMode||6:+(E||P)[1]),u=!E&&/WebKit\//.test(re),p=u&&/Qt\/\d+\.\d+/.test(re),f=!E&&/Chrome\//.test(re),o=/Opera\//.test(re),a=/Apple Computer/.test(navigator.vendor),c=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(re),s=/PhantomJS/.test(re),d=!E&&/AppleWebKit/.test(re)&&/Mobile\/\w+/.test(re),i=/Android/.test(re),t=d||i||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(re),n=d||/Mac/.test($),h=/\bCrOS\b/.test(re),v=/win/i.test($),b=o&&re.match(/Version\/(\d*\.\d*)/);b&&(b=Number(b[1])),b&&b>=15&&(o=!1,u=!0);var y=n&&(p||o&&(b==null||b<12.11)),_=U||C&&w>=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 x(e){for(var r=e.childNodes.length;r>0;--r)e.removeChild(e.firstChild);return e}function l(e,r){return x(e).appendChild(r)}function T(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 z=0;z<r.length;++z)M.appendChild(r[z]);return M}function A(e,r,R,L){var M=T(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 j(e,r){var R=e.className;m(r).test(R)||(e.className+=(R?" ":"")+r)}function B(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 ee=function(e){e.select()};d?ee=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:C&&(ee=function(e){try{e.select()}catch(r){}});function F(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 z=L||0,ie=M||0;;){var le=e.indexOf(" ",z);if(le<0||le>=r)return ie+(r-z);ie+=le-z,ie+=R-ie%R,z=le+1}}var Z=function(){this.id=null,this.f=null,this.time=0,this.handler=F(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,ae={toString:function(){return"CodeMirror.Pass"}},oe={scroll:!1},ve={origin:"*mouse"},he={origin:"+move"};function _e(e,r,R){for(var L=0,M=0;;){var z=e.indexOf(" ",L);z==-1&&(z=e.length);var ie=z-L;if(z==e.length||M+ie>=r)return L+Math.min(ie,r-M);if(M+=z-L,M+=R-M%R,L=z+1,M>=r)return L}}var fe=[""];function xe(e){for(;fe.length<=e;)fe.push(je(fe)+" ");return fe[e]}function je(e){return e[e.length-1]}function Le(e,r){for(var R=[],L=0;L<e.length;L++)R[L]=r(e[L],L);return R}function ke(e,r,R){for(var L=0,M=R(r);L<e.length&&R(e[L])<=M;)L++;e.splice(L,0,r)}function Fe(){}function ge(e,r){var R;return Object.create?R=Object.create(e):(Fe.prototype=e,R=new Fe),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 te=/[\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&&te.test(e)}function N(e,r,R){for(;(R<0?r>0:r<e.length)&&k(e.charAt(r));)r+=R;return r}function J(e,r,R){for(var L=r>R?-1:1;;){if(r==R)return r;var M=(r+R)/2,z=L<0?Math.ceil(M):Math.floor(M);if(z==r)return e(z)?r:R;e(z)?R=z:r=z+L}}function V(e,r,R,L){if(!e)return L(r,R,"ltr",0);for(var M=!1,z=0;z<e.length;++z){var ie=e[z];(ie.from<R&&ie.to>r||r==R&&ie.to==r)&&(L(Math.max(ie.from,r),Math.min(ie.to,R),ie.level==1?"rtl":"ltr",z),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 z=e[M];if(z.from<r&&z.to>r)return M;z.to==r&&(z.from!=z.to&&R=="before"?L=M:Y=M),z.from==r&&(z.from!=z.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(ye){return ye<=247?e.charAt(ye):1424<=ye&&ye<=1524?"R":1536<=ye&&ye<=1785?r.charAt(ye-1536):1774<=ye&&ye<=2220?"r":8192<=ye&&ye<=8203?"w":ye==8204?"b":"L"}var L=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,M=/[stwN]/,z=/[LRr]/,ie=/[Lb1n]/,le=/[1n]/;function ue(ye,Ke,Ge){this.level=ye,this.from=Ke,this.to=Ge}return function(ye,Ke){var Ge=Ke=="ltr"?"L":"R";if(ye.length==0||Ke=="ltr"&&!L.test(ye))return!1;for(var st=ye.length,tt=[],_t=0;_t<st;++_t)tt.push(R(ye.charCodeAt(_t)));for(var At=0,kt=Ge;At<st;++At){var Ht=tt[At];Ht=="m"?tt[At]=kt:kt=Ht}for(var $t=0,zt=Ge;$t<st;++$t){var en=tt[$t];en=="1"&&zt=="r"?tt[$t]="n":z.test(en)&&(zt=en,en=="r"&&(tt[$t]="R"))}for(var yn=1,dn=tt[0];yn<st-1;++yn){var zn=tt[yn];zn=="+"&&dn=="1"&&tt[yn+1]=="1"?tt[yn]="1":zn==","&&dn==tt[yn+1]&&(dn=="1"||dn=="n")&&(tt[yn]=dn),dn=zn}for(var gr=0;gr<st;++gr){var Yr=tt[gr];if(Yr==",")tt[gr]="N";else if(Yr=="%"){var Tr=void 0;for(Tr=gr+1;Tr<st&&tt[Tr]=="%";++Tr);for(var Ai=gr&&tt[gr-1]=="!"||Tr<st&&tt[Tr]=="1"?"1":"N",yi=gr;yi<Tr;++yi)tt[yi]=Ai;gr=Tr-1}}for(var jr=0,bi=Ge;jr<st;++jr){var ti=tt[jr];bi=="L"&&ti=="1"?tt[jr]="L":z.test(ti)&&(bi=ti)}for(var Hr=0;Hr<st;++Hr)if(M.test(tt[Hr])){var Fr=void 0;for(Fr=Hr+1;Fr<st&&M.test(tt[Fr]);++Fr);for(var Lr=(Hr?tt[Hr-1]:Ge)=="L",_i=(Fr<st?tt[Fr]:Ge)=="L",Pa=Lr==_i?Lr?"L":"R":Ge,ca=Hr;ca<Fr;++ca)tt[ca]=Pa;Hr=Fr-1}for(var ai=[],Gi,$r=0;$r<st;)if(ie.test(tt[$r])){var Fo=$r;for(++$r;$r<st&&ie.test(tt[$r]);++$r);ai.push(new ue(0,Fo,$r))}else{var Zi=$r,ya=ai.length,ba=Ke=="rtl"?1:0;for(++$r;$r<st&&tt[$r]!="L";++$r);for(var ui=Zi;ui<$r;)if(le.test(tt[ui])){Zi<ui&&(ai.splice(ya,0,new ue(1,Zi,ui)),ya+=ba);var Ma=ui;for(++ui;ui<$r&&le.test(tt[ui]);++ui);ai.splice(ya,0,new ue(2,Ma,ui)),ya+=ba,Zi=ui}else++ui;Zi<$r&&ai.splice(ya,0,new ue(1,Zi,$r))}return Ke=="ltr"&&(ai[0].level==1&&(Gi=ye.match(/^\s+/))&&(ai[0].from=Gi[0].length,ai.unshift(new ue(0,0,Gi[0].length))),je(ai).level==1&&(Gi=ye.match(/\s+$/))&&(je(ai).to-=Gi[0].length,ai.push(new ue(0,st-Gi[0].length,st)))),Ke=="rtl"?ai.reverse():ai}}();function at(e,r){var R=e.order;return R==null&&(R=e.order=Ae(e.text,r)),R}var Re=[],Pe=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]||Re).concat(R)}};function Ye(e,r){return e._handlers&&e._handlers[r]||Re}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 z=K(M,R);z>-1&&(L[r]=M.slice(0,z).concat(M.slice(z+1)))}}}function ze(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 We(e,r,R){return typeof r=="string"&&(r={type:r,preventDefault:function(){this.defaultPrevented=!0}}),ze(e,R||r.type,e,r),Ce(r)||r.codemirrorIgnore}function Me(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 De(e,r){return Ye(e,r).length>0}function Oe(e){e.prototype.on=function(r,R){Pe(this,r,R)},e.prototype.off=function(r,R){Ze(this,r,R)}}function pe(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 we(e){pe(e),be(e)}function $e(e){return e.target||e.srcElement}function it(e){var r=e.which;return r==null&&(e.button&1?r=1:e.button&2?r=3:e.button&4&&(r=2)),n&&e.ctrlKey&&r==1&&(r=3),r}var dt=function(){if(C&&w<9)return!1;var e=T("div");return"draggable"in e||"dragDrop"in e}(),Et;function Dt(e){if(Et==null){var r=T("span","\u200B");l(e,T("span",[r,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Et=r.offsetWidth<=1&&r.offsetHeight>2&&!(C&&w<8))}var R=Et?T("span","\u200B"):T("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return R.setAttribute("cm-text",""),R}var ot;function xt(e){if(ot!=null)return ot;var r=l(e,document.createTextNode("A\u062EA")),R=O(r,0,1).getBoundingClientRect(),L=O(r,1,2).getBoundingClientRect();return x(e),!R||R.left==R.right?!1:ot=L.right-R.right<3}var nt=`
|
|
|
|
|
|
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 z=e.slice(r,e.charAt(M-1)=="\r"?M-1:M),ie=z.indexOf("\r");ie!=-1?(R.push(z.slice(0,ie)),r+=ie+1):(R.push(z),r=M+1)}return R}:function(e){return e.split(/\r\n?|\n/)},ct=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},Je=function(){var e=T("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Ee=null;function Ue(e){if(Ee!=null)return Ee;var r=l(e,T("span","x")),R=r.getBoundingClientRect(),L=O(r,0,1).getBoundingClientRect();return Ee=Math.abs(R.left-L.left)>1}var ft={},Qe={};function Ot(e,r){arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),ft[e]=r}function wt(e,r){Qe[e]=r}function lt(e){if(typeof e=="string"&&Qe.hasOwnProperty(e))e=Qe[e];else if(e&&typeof e.name=="string"&&Qe.hasOwnProperty(e.name)){var r=Qe[e.name];typeof r=="string"&&(r={name:r}),e=ge(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 yt(e,r){r=lt(r);var R=ft[r.name];if(!R)return yt(e,"text/plain");var L=R(e,r);if(Nt.hasOwnProperty(r.name)){var M=Nt[r.name];for(var z in M){if(!M.hasOwnProperty(z))continue;L.hasOwnProperty(z)&&(L["_"+z]=L[z]),L[z]=M[z]}}if(L.name=r.name,r.helperType&&(L.helperType=r.helperType),r.modeProps)for(var ie in r.modeProps)L[ie]=r.modeProps[ie];return L}var Nt={};function Gt(e,r){var R=Nt.hasOwnProperty(e)?Nt[e]:Nt[e]={};G(r,R)}function Xt(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 Te(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 H=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};H.prototype.eol=function(){return this.pos>=this.string.length},H.prototype.sol=function(){return this.pos==this.lineStart},H.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},H.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},H.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},H.prototype.eatWhile=function(e){for(var r=this.pos;this.eat(e););return this.pos>r},H.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},H.prototype.skipToEnd=function(){this.pos=this.string.length},H.prototype.skipTo=function(e){var r=this.string.indexOf(e,this.pos);if(r>-1)return this.pos=r,!0},H.prototype.backUp=function(e){this.pos-=e},H.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)},H.prototype.indentation=function(){return X(this.string,null,this.tabSize)-(this.lineStart?X(this.string,this.lineStart,this.tabSize):0)},H.prototype.match=function(e,r,R){if(typeof e=="string"){var L=function(ie){return R?ie.toLowerCase():ie},M=this.string.substr(this.pos,e.length);if(L(M)==L(e))return r!==!1&&(this.pos+=e.length),!0}else{var z=this.string.slice(this.pos).match(e);return z&&z.index>0?null:(z&&r!==!1&&(this.pos+=z[0].length),z)}},H.prototype.current=function(){return this.string.slice(this.start,this.pos)},H.prototype.hideFirstChars=function(e,r){this.lineStart+=e;try{return r()}finally{this.lineStart-=e}},H.prototype.lookAhead=function(e){var r=this.lineOracle;return r&&r.lookAhead(e)},H.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Q(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],z=M.chunkSize();if(r<z){R=M;break}r-=z}return R.lines[r]}function ne(e,r,R){var L=[],M=r.line;return e.iter(r.line,R.line+1,function(z){var ie=z.text;M==R.line&&(ie=ie.slice(0,R.ch)),M==r.line&&(ie=ie.slice(r.ch)),L.push(ie),++M}),L}function se(e,r,R){var L=[];return e.iter(r,R,function(M){L.push(M.text)}),L}function Se(e,r){var R=r-e.height;if(R)for(var L=e;L;L=L.parent)L.height+=R}function He(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],z=M.height;if(r<z){e=M;continue e}r-=z,R+=M.chunkSize()}return R}while(!e.lines);for(var ie=0;ie<e.lines.length;++ie){var le=e.lines[ie],ue=le.height;if(r<ue)break;r-=ue}return R+ie}function Tt(e,r){return r>=e.first&&r<e.first+e.size}function Lt(e,r){return String(e.lineNumberFormatter(r+e.firstLineNumber))}function rt(e,r,R){if(R===void 0&&(R=null),!(this instanceof rt))return new rt(e,r,R);this.line=e,this.ch=r,this.sticky=R}function Ct(e,r){return e.line-r.line||e.ch-r.ch}function Jt(e,r){return e.sticky==r.sticky&&Ct(e,r)==0}function St(e){return rt(e.line,e.ch)}function nn(e,r){return Ct(e,r)<0?r:e}function Qt(e,r){return Ct(e,r)<0?e:r}function Ut(e,r){return Math.max(e.first,Math.min(r,e.first+e.size-1))}function vt(e,r){if(r.line<e.first)return rt(e.first,0);var R=e.first+e.size-1;return r.line>R?rt(R,Q(e,R).text.length):En(r,Q(e,r.line).text.length)}function En(e,r){var R=e.ch;return R==null||R>r?rt(e.line,r):R<0?rt(e.line,0):e}function xn(e,r){for(var R=[],L=0;L<r.length;L++)R[L]=vt(e,r[L]);return R}var ln=function(e,r){this.state=e,this.lookAhead=r},un=function(e,r,R,L){this.state=r,this.doc=e,this.line=R,this.maxLookAhead=L||0,this.baseTokens=null,this.baseTokenPos=1};un.prototype.lookAhead=function(e){var r=this.doc.getLine(this.line+e);return r!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),r},un.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}},un.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},un.fromSaved=function(e,r,R){return r instanceof ln?new un(e,Xt(e.mode,r.state),R,r.lookAhead):new un(e,Xt(e.mode,r),R)},un.prototype.save=function(e){var r=e!==!1?Xt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ln(r,this.maxLookAhead):r};function er(e,r,R,L){var M=[e.state.modeGen],z={};kr(e,r.text,e.doc.mode,R,function(ye,Ke){return M.push(ye,Ke)},z,L);for(var ie=R.state,le=function(ye){R.baseTokens=M;var Ke=e.state.overlays[ye],Ge=1,st=0;R.state=!0,kr(e,r.text,Ke.mode,R,function(tt,_t){for(var At=Ge;st<tt;){var kt=M[Ge];kt>tt&&M.splice(Ge,1,tt,M[Ge+1],kt),Ge+=2,st=Math.min(tt,kt)}if(!_t)return;if(Ke.opaque)M.splice(At,Ge-At,tt,"overlay "+_t),Ge=At+2;else for(;At<Ge;At+=2){var Ht=M[At+1];M[At+1]=(Ht?Ht+" ":"")+"overlay "+_t}},z),R.state=ie,R.baseTokens=null,R.baseTokenPos=1},ue=0;ue<e.state.overlays.length;++ue)le(ue);return{styles:M,classes:z.bgClass||z.textClass?z:null}}function ir(e,r,R){if(!r.styles||r.styles[0]!=e.state.modeGen){var L=gt(e,He(r)),M=r.text.length>e.options.maxHighlightLength&&Xt(e.doc.mode,L.state),z=er(e,r,L);M&&(L.state=M),r.stateAfter=L.save(!M),r.styles=z.styles,z.classes?r.styleClasses=z.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 gt(e,r,R){var L=e.doc,M=e.display;if(!L.mode.startState)return new un(L,!0,r);var z=tr(e,r,R),ie=z>L.first&&Q(L,z-1).stateAfter,le=ie?un.fromSaved(L,ie,z):new un(L,de(L.mode),z);return L.iter(z,r,function(ue){yr(e,ue.text,le);var ye=le.line;ue.stateAfter=ye==r-1||ye%5==0||ye>=M.viewFrom&&ye<M.viewTo?le.save():null,le.nextLine()}),R&&(L.modeFrontier=le.line),le}function yr(e,r,R,L){var M=e.doc.mode,z=new H(r,e.options.tabSize,R);for(z.start=z.pos=L||0,r==""&&Cr(M,R.state);!z.eol();)gn(M,z,R.state),z.start=z.pos}function Cr(e,r){if(e.blankLine)return e.blankLine(r);if(!e.innerMode)return;var R=Te(e,r);if(R.mode.blankLine)return R.mode.blankLine(R.state)}function gn(e,r,R,L){for(var M=0;M<10;M++){L&&(L[0]=Te(e,R).mode);var z=e.token(r,R);if(r.pos>r.start)return z}throw new Error("Mode "+e.name+" failed to advance stream.")}var Ln=function(e,r,R){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=r||null,this.state=R};function _r(e,r,R,L){var M=e.doc,z=M.mode,ie;r=vt(M,r);var le=Q(M,r.line),ue=gt(e,r.line,R),ye=new H(le.text,e.options.tabSize,ue),Ke;for(L&&(Ke=[]);(L||ye.pos<r.ch)&&!ye.eol();)ye.start=ye.pos,ie=gn(z,ye,ue.state),L&&Ke.push(new Ln(ye,ie,Xt(M.mode,ue.state)));return L?Ke:new Ln(ye,ie,ue.state)}function Jr(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 kr(e,r,R,L,M,z,ie){var le=R.flattenSpans;le==null&&(le=e.options.flattenSpans);var ue=0,ye=null,Ke=new H(r,e.options.tabSize,L),Ge,st=e.options.addModeClass&&[null];for(r==""&&Jr(Cr(R,L.state),z);!Ke.eol();){if(Ke.pos>e.options.maxHighlightLength?(le=!1,ie&&yr(e,r,L,Ke.pos),Ke.pos=r.length,Ge=null):Ge=Jr(gn(R,Ke,L.state,st),z),st){var tt=st[0].name;tt&&(Ge="m-"+(Ge?tt+" "+Ge:tt))}if(!le||ye!=Ge){for(;ue<Ke.start;)ue=Math.min(Ke.start,ue+5e3),M(ue,ye);ye=Ge}Ke.start=Ke.pos}for(;ue<Ke.pos;){var _t=Math.min(Ke.pos,ue+5e3);M(_t,ye),ue=_t}}function tr(e,r,R){for(var L,M,z=e.doc,ie=R?-1:r-(e.doc.mode.innerMode?1e3:100),le=r;le>ie;--le){if(le<=z.first)return z.first;var ue=Q(z,le-1),ye=ue.stateAfter;if(ye&&(!R||le+(ye instanceof ln?ye.lookAhead:0)<=z.modeFrontier))return le;var Ke=X(ue.text,null,e.options.tabSize);(M==null||L>Ke)&&(M=le-1,L=Ke)}return M}function fr(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=Q(e,L).stateAfter;if(M&&(!(M instanceof ln)||L+M.lookAhead<r)){R=L+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,R)}var Ei=!1,Er=!1;function ur(){Ei=!0}function xr(){Er=!0}function zr(e,r,R){this.marker=e,this.from=r,this.to=R}function Rr(e,r){if(e)for(var R=0;R<e.length;++R){var L=e[R];if(L.marker==r)return L}}function Gr(e,r){for(var R,L=0;L<e.length;++L)e[L]!=r&&(R||(R=[])).push(e[L]);return R}function br(e,r){e.markedSpans=e.markedSpans?e.markedSpans.concat([r]):[r],r.marker.attachLine(e)}function xi(e,r,R){var L;if(e)for(var M=0;M<e.length;++M){var z=e[M],ie=z.marker,le=z.from==null||(ie.inclusiveLeft?z.from<=r:z.from<r);if(le||z.from==r&&ie.type=="bookmark"&&(!R||!z.marker.insertLeft)){var ue=z.to==null||(ie.inclusiveRight?z.to>=r:z.to>r);(L||(L=[])).push(new zr(ie,z.from,ue?null:z.to))}}return L}function oi(e,r,R){var L;if(e)for(var M=0;M<e.length;++M){var z=e[M],ie=z.marker,le=z.to==null||(ie.inclusiveRight?z.to>=r:z.to>r);if(le||z.from==r&&ie.type=="bookmark"&&(!R||z.marker.insertLeft)){var ue=z.from==null||(ie.inclusiveLeft?z.from<=r:z.from<r);(L||(L=[])).push(new zr(ie,ue?null:z.from-r,z.to==null?null:z.to-r))}}return L}function Br(e,r){if(r.full)return null;var R=Tt(e,r.from.line)&&Q(e,r.from.line).markedSpans,L=Tt(e,r.to.line)&&Q(e,r.to.line).markedSpans;if(!R&&!L)return null;var M=r.from.ch,z=r.to.ch,ie=Ct(r.from,r.to)==0,le=xi(R,M,ie),ue=oi(L,z,ie),ye=r.text.length==1,Ke=je(r.text).length+(ye?M:0);if(le)for(var Ge=0;Ge<le.length;++Ge){var st=le[Ge];if(st.to==null){var tt=Rr(ue,st.marker);tt?ye&&(st.to=tt.to==null?null:tt.to+Ke):st.to=M}}if(ue)for(var _t=0;_t<ue.length;++_t){var At=ue[_t];if(At.to!=null&&(At.to+=Ke),At.from==null){var kt=Rr(le,At.marker);kt||(At.from=Ke,ye&&(le||(le=[])).push(At))}else At.from+=Ke,ye&&(le||(le=[])).push(At)}le&&(le=ci(le)),ue&&ue!=le&&(ue=ci(ue));var Ht=[le];if(!ye){var $t=r.text.length-2,zt;if($t>0&&le)for(var en=0;en<le.length;++en)le[en].to==null&&(zt||(zt=[])).push(new zr(le[en].marker,null,null));for(var yn=0;yn<$t;++yn)Ht.push(zt);Ht.push(ue)}return Ht}function ci(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 _t=0;_t<tt.markedSpans.length;++_t){var At=tt.markedSpans[_t].marker;At.readOnly&&(!L||K(L,At)==-1)&&(L||(L=[])).push(At)}}),!L)return null;for(var M=[{from:r,to:R}],z=0;z<L.length;++z)for(var ie=L[z],le=ie.find(0),ue=0;ue<M.length;++ue){var ye=M[ue];if(Ct(ye.to,le.from)<0||Ct(ye.from,le.to)>0)continue;var Ke=[ue,1],Ge=Ct(ye.from,le.from),st=Ct(ye.to,le.to);(Ge<0||!ie.inclusiveLeft&&!Ge)&&Ke.push({from:ye.from,to:le.from}),(st>0||!ie.inclusiveRight&&!st)&&Ke.push({from:le.to,to:ye.to}),M.splice.apply(M,Ke),ue+=Ke.length-3}return M}function Si(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 hr(e){return e.inclusiveLeft?-1:0}function pr(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(),z=Ct(L.from,M.from)||hr(e)-hr(r);if(z)return-z;var ie=Ct(L.to,M.to)||pr(e)-pr(r);return ie||r.id-e.id}function Ui(e,r){var R=Er&&e.markedSpans,L;if(R)for(var M=void 0,z=0;z<R.length;++z)M=R[z],M.marker.collapsed&&(r?M.from:M.to)==null&&(!L||Qr(L,M.marker)<0)&&(L=M.marker);return L}function Li(e){return Ui(e,!0)}function fi(e){return Ui(e,!1)}function ea(e,r){var R=Er&&e.markedSpans,L;if(R)for(var M=0;M<R.length;++M){var z=R[M];z.marker.collapsed&&(z.from==null||z.from<r)&&(z.to==null||z.to>r)&&(!L||Qr(L,z.marker)<0)&&(L=z.marker)}return L}function Vi(e,r,R,L,M){var z=Q(e,r),ie=Er&&z.markedSpans;if(ie)for(var le=0;le<ie.length;++le){var ue=ie[le];if(!ue.marker.collapsed)continue;var ye=ue.marker.find(0),Ke=Ct(ye.from,R)||hr(ue.marker)-hr(M),Ge=Ct(ye.to,L)||pr(ue.marker)-pr(M);if(Ke>=0&&Ge<=0||Ke<=0&&Ge>=0)continue;if(Ke<=0&&(ue.marker.inclusiveRight&&M.inclusiveLeft?Ct(ye.to,R)>=0:Ct(ye.to,R)>0)||Ke>=0&&(ue.marker.inclusiveRight&&M.inclusiveLeft?Ct(ye.from,L)<=0:Ct(ye.from,L)<0))return!0}}function Ir(e){for(var r;r=Li(e);)e=r.find(-1,!0).line;return e}function wi(e){for(var r;r=fi(e);)e=r.find(1,!0).line;return e}function qr(e){for(var r,R;r=fi(e);)e=r.find(1,!0).line,(R||(R=[])).push(e);return R}function Ti(e,r){var R=Q(e,r),L=Ir(R);return R==L?r:He(L)}function Xi(e,r){if(r>e.lastLine())return r;var R=Q(e,r),L;if(!hi(e,R))return r;for(;L=fi(R);)R=L.find(1,!0).line;return He(R)+1}function hi(e,r){var R=Er&&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&&ji(e,r,L))return!0}}function ji(e,r,R){if(R.to==null){var L=R.marker.find(1,!0);return ji(e,L.line,Rr(L.line.markedSpans,R.marker))}if(R.marker.inclusiveRight&&R.to==r.text.length)return!0;for(var M=void 0,z=0;z<r.markedSpans.length;++z)if(M=r.markedSpans[z],M.marker.collapsed&&!M.marker.widgetNode&&M.from==R.to&&(M.to==null||M.to!=R.from)&&(M.marker.inclusiveLeft||R.marker.inclusiveRight)&&ji(e,r,M))return!0}function Zr(e){e=Ir(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 z=R.parent;z;R=z,z=R.parent)for(var ie=0;ie<z.children.length;++ie){var le=z.children[ie];if(le==R)break;r+=le.height}return r}function Fi(e){if(e.height==0)return 0;for(var r=e.text.length,R,L=e;R=Li(L);){var M=R.find(0,!0);L=M.from.line,r+=M.from.ch-M.to.ch}for(L=e;R=fi(L);){var z=R.find(0,!0);r-=L.text.length-z.from.ch,L=z.to.line,r+=L.text.length-z.to.ch}return r}function pi(e){var r=e.display,R=e.doc;r.maxLine=Q(R,R.first),r.maxLineLength=Fi(r.maxLine),r.maxLineChanged=!0,R.iter(function(L){var M=Fi(L);M>r.maxLineLength&&(r.maxLineLength=M,r.maxLine=L)})}var ni=function(e,r,R){this.text=e,di(this,r),this.height=R?R(this):1};ni.prototype.lineNo=function(){return He(this)},Oe(ni);function Yi(e,r,R,L){e.text=r,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Si(e),di(e,R);var M=L?L(e):1;M!=e.height&&Se(e,M)}function da(e){e.parent=null,Si(e)}var fa={},$i={};function Ji(e,r){if(!e||/^\s*$/.test(e))return null;var R=r.addModeClass?$i:fa;return R[e]||(R[e]=e.replace(/\S+/g,"cm-$&"))}function Qi(e,r){var R=A("span",null,null,u?"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 z=M?r.rest[M-1]:r.line,ie=void 0;L.pos=0,L.addToken=jt,xt(e.display.measure)&&(ie=at(z,e.doc.direction))&&(L.addToken=Pn(L.addToken,ie)),L.map=[];var le=r!=e.display.externalMeasured&&He(z);ar(z,L,ir(e,z,le)),z.styleClasses&&(z.styleClasses.bgClass&&(L.bgClass=B(z.styleClasses.bgClass,L.bgClass||"")),z.styleClasses.textClass&&(L.textClass=B(z.styleClasses.textClass,L.textClass||""))),L.map.length==0&&L.map.push(0,0,L.content.appendChild(Dt(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(u){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 ze(e,"renderLine",e,r.line,L.pre),L.pre.className&&(L.textClass=B(L.pre.className,L.textClass||"")),L}function tn(e){var r=T("span","\u2022","cm-invalidchar");return r.title="\\u"+e.charCodeAt(0).toString(16),r.setAttribute("aria-label",r.title),r}function jt(e,r,R,L,M,z,ie){if(!r)return;var le=e.splitSpaces?an(r,e.trailingSpace):r,ue=e.cm.state.specialChars,ye=!1,Ke;if(!ue.test(r))e.col+=r.length,Ke=document.createTextNode(le),e.map.push(e.pos,e.pos+r.length,Ke),C&&w<9&&(ye=!0),e.pos+=r.length;else{Ke=document.createDocumentFragment();for(var Ge=0;;){ue.lastIndex=Ge;var st=ue.exec(r),tt=st?st.index-Ge:r.length-Ge;if(tt){var _t=document.createTextNode(le.slice(Ge,Ge+tt));C&&w<9?Ke.appendChild(T("span",[_t])):Ke.appendChild(_t),e.map.push(e.pos,e.pos+tt,_t),e.col+=tt,e.pos+=tt}if(!st)break;Ge+=tt+1;var At=void 0;if(st[0]==" "){var kt=e.cm.options.tabSize,Ht=kt-e.col%kt;At=Ke.appendChild(T("span",xe(Ht),"cm-tab")),At.setAttribute("role","presentation"),At.setAttribute("cm-text"," "),e.col+=Ht}else st[0]=="\r"||st[0]==`
|
|
|
`?(At=Ke.appendChild(T("span",st[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),At.setAttribute("cm-text",st[0]),e.col+=1):(At=e.cm.options.specialCharPlaceholder(st[0]),At.setAttribute("cm-text",st[0]),C&&w<9?Ke.appendChild(T("span",[At])):Ke.appendChild(At),e.col+=1);e.map.push(e.pos,e.pos+1,At),e.pos++}}if(e.trailingSpace=le.charCodeAt(r.length-1)==32,R||L||M||ye||z||ie){var $t=R||"";L&&($t+=L),M&&($t+=M);var zt=T("span",[Ke],$t,z);if(ie)for(var en in ie)ie.hasOwnProperty(en)&&en!="style"&&en!="class"&&zt.setAttribute(en,ie[en]);return e.content.appendChild(zt)}e.content.appendChild(Ke)}function an(e,r){if(e.length>1&&!/ /.test(e))return e;for(var R=r,L="",M=0;M<e.length;M++){var z=e.charAt(M);z==" "&&R&&(M==e.length-1||e.charCodeAt(M+1)==32)&&(z="\xA0"),L+=z,R=z==" "}return L}function Pn(e,r){return function(R,L,M,z,ie,le,ue){M=M?M+" cm-force-border":"cm-force-border";for(var ye=R.pos,Ke=ye+L.length;;){for(var Ge=void 0,st=0;st<r.length&&!(Ge=r[st],Ge.to>ye&&Ge.from<=ye);st++);if(Ge.to>=Ke)return e(R,L,M,z,ie,le,ue);e(R,L.slice(0,Ge.to-ye),M,z,null,le,ue),z=null,L=L.slice(Ge.to-ye),ye=Ge.to}}}function Vn(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 ar(e,r,R){var L=e.markedSpans,M=e.text,z=0;if(!L){for(var ie=1;ie<R.length;ie+=2)r.addToken(r,M.slice(z,z=R[ie]),Ji(R[ie+1],r.cm.options));return}for(var le=M.length,ue=0,ye=1,Ke="",Ge,st,tt=0,_t,At,kt,Ht,$t;;){if(tt==ue){_t=At=kt=st="",$t=null,Ht=null,tt=Infinity;for(var zt=[],en=void 0,yn=0;yn<L.length;++yn){var dn=L[yn],zn=dn.marker;if(zn.type=="bookmark"&&dn.from==ue&&zn.widgetNode)zt.push(zn);else if(dn.from<=ue&&(dn.to==null||dn.to>ue||zn.collapsed&&dn.to==ue&&dn.from==ue)){if(dn.to!=null&&dn.to!=ue&&tt>dn.to&&(tt=dn.to,At=""),zn.className&&(_t+=" "+zn.className),zn.css&&(st=(st?st+";":"")+zn.css),zn.startStyle&&dn.from==ue&&(kt+=" "+zn.startStyle),zn.endStyle&&dn.to==tt&&(en||(en=[])).push(zn.endStyle,dn.to),zn.title&&(($t||($t={})).title=zn.title),zn.attributes)for(var gr in zn.attributes)($t||($t={}))[gr]=zn.attributes[gr];zn.collapsed&&(!Ht||Qr(Ht.marker,zn)<0)&&(Ht=dn)}else dn.from>ue&&tt>dn.from&&(tt=dn.from)}if(en)for(var Yr=0;Yr<en.length;Yr+=2)en[Yr+1]==tt&&(At+=" "+en[Yr]);if(!Ht||Ht.from==ue)for(var Tr=0;Tr<zt.length;++Tr)Vn(r,0,zt[Tr]);if(Ht&&(Ht.from||0)==ue){if(Vn(r,(Ht.to==null?le+1:Ht.to)-ue,Ht.marker,Ht.from==null),Ht.to==null)return;Ht.to==ue&&(Ht=!1)}}if(ue>=le)break;for(var Ai=Math.min(le,tt);;){if(Ke){var yi=ue+Ke.length;if(!Ht){var jr=yi>Ai?Ke.slice(0,Ai-ue):Ke;r.addToken(r,jr,Ge?Ge+_t:_t,kt,ue+jr.length==tt?At:"",st,$t)}if(yi>=Ai){Ke=Ke.slice(Ai-ue),ue=Ai;break}ue=yi,kt=""}Ke=M.slice(z,z=R[ye++]),Ge=Ji(R[ye++],r.cm.options)}}}function Kn(e,r,R){this.line=r,this.rest=qr(r),this.size=this.rest?He(je(this.rest))-R+1:1,this.node=this.text=null,this.hidden=hi(e,r)}function mr(e,r,R){for(var L=[],M,z=r;z<R;z=M){var ie=new Kn(e.doc,Q(e.doc,z),z);M=z+ie.size,L.push(ie)}return L}var et=null;function ut(e){et?et.ops.push(e):e.ownsGroup=et={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 bt(e,r){var R=e.ownsGroup;if(!R)return;try{Pt(R)}finally{et=null,r(R)}}var It=null;function Mt(e,r){var R=Ye(e,r);if(!R.length)return;var L=Array.prototype.slice.call(arguments,2),M;et?M=et.delayedCallbacks:It?M=It:(M=It=[],setTimeout(ht,0));for(var z=function(le){M.push(function(){return R[le].apply(null,L)})},ie=0;ie<R.length;++ie)z(ie)}function ht(){var e=It;It=null;for(var r=0;r<e.length;++r)e[r]()}function pt(e,r,R,L){for(var M=0;M<r.changes.length;M++){var z=r.changes[M];z=="text"?Rt(e,r):z=="gutter"?Un(e,r,R,L):z=="class"?rn(e,r):z=="widget"&&Sn(e,r,L)}r.changes=null}function Wt(e){return e.node==e.text&&(e.node=T("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),C&&w<8&&(e.node.style.zIndex=2)),e.node}function mt(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=Wt(r);r.background=L.insertBefore(T("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):Qi(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){mt(e,r),r.line.wrapClass?Wt(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 Un(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=Wt(r);r.gutterBackground=T("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 z=r.line.gutterMarkers;if(e.options.lineNumbers||z){var ie=Wt(r),le=r.gutter=T("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?L.fixedPos:-L.gutterTotalWidth)+"px");if(e.display.input.setUneditable(le),ie.insertBefore(le,r.text),r.line.gutterClass&&(le.className+=" "+r.line.gutterClass),e.options.lineNumbers&&(!z||!z["CodeMirror-linenumbers"])&&(r.lineNumber=le.appendChild(T("div",Lt(e.options,R),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+L.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),z)for(var ue=0;ue<e.display.gutterSpecs.length;++ue){var ye=e.display.gutterSpecs[ue].className,Ke=z.hasOwnProperty(ye)&&z[ye];Ke&&le.appendChild(T("div",[Ke],"CodeMirror-gutter-elt","left: "+L.gutterLeft[ye]+"px; width: "+L.gutterWidth[ye]+"px"))}}}function Sn(e,r,R){r.alignable&&(r.alignable=null);for(var L=m("CodeMirror-linewidget"),M=r.node.firstChild,z=void 0;M;M=z)z=M.nextSibling,L.test(M.className)&&r.node.removeChild(M);Hn(e,r,R)}function mn(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),Un(e,r,R,L),Hn(e,r,L),r.node}function Hn(e,r,R){if(wn(e,r.line,r,R,!0),r.rest)for(var L=0;L<r.rest.length;L++)wn(e,r.rest[L],r,R,!1)}function wn(e,r,R,L,M){if(!r.widgets)return;for(var z=Wt(R),ie=0,le=r.widgets;ie<le.length;++ie){var ue=le[ie],ye=T("div",[ue.node],"CodeMirror-linewidget"+(ue.className?" "+ue.className:""));ue.handleMouseEvents||ye.setAttribute("cm-ignore-events","true"),jn(ue,ye,R,L),e.display.input.setUneditable(ye),M&&ue.above?z.insertBefore(ye,R.gutter||R.text):z.appendChild(ye),Mt(ue,"redraw")}}function jn(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 Mn(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;"),l(r.display.measure,T("div",[e.node],null,R))}return e.height=e.node.parentNode.offsetHeight}function nr(e,r){for(var R=$e(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 Gn(e){return e.lineSpace.offsetTop}function lr(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function vr(e){if(e.cachedPaddingH)return e.cachedPaddingH;var r=l(e.measure,T("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 qn(e){return q-e.display.nativeBarWidth}function Rn(e){return e.display.scroller.clientWidth-qn(e)-e.display.barWidth}function Jn(e){return e.display.scroller.clientHeight-qn(e)-e.display.barHeight}function Dn(e,r,R){var L=e.options.lineWrapping,M=L&&Rn(e);if(!r.measure.heights||L&&r.measure.width!=M){var z=r.measure.heights=[];if(L){r.measure.width=M;for(var ie=r.text.firstChild.getClientRects(),le=0;le<ie.length-1;le++){var ue=ie[le],ye=ie[le+1];Math.abs(ue.bottom-ye.bottom)>2&&z.push((ue.bottom+ye.top)/2-R.top)}}z.push(R.bottom-R.top)}}function Bt(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(He(e.rest[M])>R)return{map:e.measure.maps[M],cache:e.measure.caches[M],before:!0}}function cn(e,r){r=Ir(r);var R=He(r),L=e.display.externalMeasured=new Kn(e.doc,r,R);L.lineN=R;var M=L.built=Qi(e,L);return L.text=M.pre,l(e.display.lineMeasure,M.pre),L}function Zn(e,r,R,L){return Tn(e,Qn(e,r),R,L)}function or(e,r){if(r>=e.display.viewFrom&&r<e.display.viewTo)return e.display.view[Kr(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=He(r),L=or(e,R);L&&!L.text?L=null:L&&L.changes&&(pt(e,L,R,$n(e)),e.curOp.forceUpdate=!0),L||(L=cn(e,r));var M=Bt(L,r,R);return{line:r,view:L,rect:null,map:M.map,cache:M.cache,before:M.before,hasHeights:!1}}function Tn(e,r,R,L,M){r.before&&(R=-1);var z=R+(L||""),ie;return r.cache.hasOwnProperty(z)?ie=r.cache[z]:(r.rect||(r.rect=r.view.text.getBoundingClientRect()),r.hasHeights||(Dn(e,r.view,r.rect),r.hasHeights=!0),ie=Ft(e,r,R,L),ie.bogus||(r.cache[z]=ie)),{left:ie.left,right:ie.right,top:M?ie.rtop:ie.top,bottom:M?ie.rbottom:ie.bottom}}var Fn={left:0,right:0,top:0,bottom:0};function on(e,r,R){for(var L,M,z,ie,le,ue,ye=0;ye<e.length;ye+=3)if(le=e[ye],ue=e[ye+1],r<le?(M=0,z=1,ie="left"):r<ue?(M=r-le,z=M+1):(ye==e.length-3||r==ue&&e[ye+3]>r)&&(z=ue-le,M=z-1,r>=ue&&(ie="right")),M!=null){if(L=e[ye+2],le==ue&&R==(L.insertLeft?"left":"right")&&(ie=R),R=="left"&&M==0)for(;ye&&e[ye-2]==e[ye-3]&&e[ye-1].insertLeft;)L=e[(ye-=3)+2],ie="left";if(R=="right"&&M==ue-le)for(;ye<e.length-3&&e[ye+3]==e[ye+4]&&!e[ye+5].insertLeft;)L=e[(ye+=3)+2],ie="right";break}return{node:L,start:M,end:z,collapse:ie,coverStart:le,coverEnd:ue}}function bn(e,r){var R=Fn;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 Ft(e,r,R,L){var M=on(r.map,R,L),z=M.node,ie=M.start,le=M.end,ue=M.collapse,ye;if(z.nodeType==3){for(var Ke=0;Ke<4;Ke++){for(;ie&&k(r.line.text.charAt(M.coverStart+ie));)--ie;for(;M.coverStart+le<M.coverEnd&&k(r.line.text.charAt(M.coverStart+le));)++le;if(C&&w<9&&ie==0&&le==M.coverEnd-M.coverStart?ye=z.parentNode.getBoundingClientRect():ye=bn(O(z,ie,le).getClientRects(),L),ye.left||ye.right||ie==0)break;le=ie,ie=ie-1,ue="right"}C&&w<11&&(ye=Kt(e.display.measure,ye))}else{ie>0&&(ue=L="right");var Ge;e.options.lineWrapping&&(Ge=z.getClientRects()).length>1?ye=Ge[L=="right"?Ge.length-1:0]:ye=z.getBoundingClientRect()}if(C&&w<9&&!ie&&(!ye||!ye.left&&!ye.right)){var st=z.parentNode.getClientRects()[0];st?ye={left:st.left,right:st.left+Nn(e.display),top:st.top,bottom:st.bottom}:ye=Fn}for(var tt=ye.top-r.rect.top,_t=ye.bottom-r.rect.top,At=(tt+_t)/2,kt=r.view.measure.heights,Ht=0;Ht<kt.length-1&&!(At<kt[Ht]);Ht++);var $t=Ht?kt[Ht-1]:0,zt=kt[Ht],en={left:(ue=="right"?ye.right:ye.left)-r.rect.left,right:(ue=="left"?ye.left:ye.right)-r.rect.left,top:$t,bottom:zt};return!ye.left&&!ye.right&&(en.bogus=!0),e.options.singleCursorHeightPerLine||(en.rtop=tt,en.rbottom=_t),en}function Kt(e,r){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Ue(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 Yt(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 fn(e){e.display.externalMeasure=null,x(e.display.lineMeasure);for(var r=0;r<e.display.view.length;r++)Yt(e.display.view[r])}function qt(e){fn(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function kn(){return f&&i?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function hn(){return f&&i?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Cn(e){var r=0;if(e.widgets)for(var R=0;R<e.widgets.length;++R)e.widgets[R].above&&(r+=Mn(e.widgets[R]));return r}function vn(e,r,R,L,M){if(!M){var z=Cn(r);R.top+=z,R.bottom+=z}if(L=="line")return R;L||(L="local");var ie=Zr(r);if(L=="local"?ie+=Gn(e.display):ie-=e.display.viewOffset,L=="page"||L=="window"){var le=e.display.lineSpace.getBoundingClientRect();ie+=le.top+(L=="window"?0:hn());var ue=le.left+(L=="window"?0:kn());R.left+=ue,R.right+=ue}return R.top+=ie,R.bottom+=ie,R}function rr(e,r,R){if(R=="div")return r;var L=r.left,M=r.top;if(R=="page")L-=kn(),M-=hn();else if(R=="local"||!R){var z=e.display.sizer.getBoundingClientRect();L+=z.left,M+=z.top}var ie=e.display.lineSpace.getBoundingClientRect();return{left:L-ie.left,top:M-ie.top}}function Xn(e,r,R,L,M){return L||(L=Q(e.doc,r.line)),vn(e,L,Zn(e,L,r.ch,M),R)}function Yn(e,r,R,L,M,z){L=L||Q(e.doc,r.line),M||(M=Qn(e,L));function ie(_t,At){var kt=Tn(e,M,_t,At?"right":"left",z);return At?kt.left=kt.right:kt.right=kt.left,vn(e,L,kt,R)}var le=at(L,e.doc.direction),ue=r.ch,ye=r.sticky;if(ue>=L.text.length?(ue=L.text.length,ye="before"):ue<=0&&(ue=0,ye="after"),!le)return ie(ye=="before"?ue-1:ue,ye=="before");function Ke(_t,At,kt){var Ht=le[At],$t=Ht.level==1;return ie(kt?_t-1:_t,$t!=kt)}var Ge=me(le,ue,ye),st=Y,tt=Ke(ue,Ge,ye=="before");return st!=null&&(tt.other=Ke(ue,st,ye!="before")),tt}function Sr(e,r){var R=0;r=vt(e.doc,r),e.options.lineWrapping||(R=Nn(e.display)*r.ch);var L=Q(e.doc,r.line),M=Zr(L)+Gn(e.display);return{left:R,right:R,top:M,bottom:M+L.height}}function Nr(e,r,R,L,M){var z=rt(e,r,R);return z.xRel=M,L&&(z.outside=L),z}function Ci(e,r,R){var L=e.doc;if(R+=e.display.viewOffset,R<0)return Nr(L.first,0,null,-1,-1);var M=qe(L,R),z=L.first+L.size-1;if(M>z)return Nr(L.first+L.size-1,Q(L,z).text.length,null,1,1);r<0&&(r=0);for(var ie=Q(L,M);;){var le=Wi(e,ie,M,r,R),ue=ea(ie,le.ch+(le.xRel>0||le.outside>0?1:0));if(!ue)return le;var ye=ue.find(1);if(ye.line==M)return ye;ie=Q(L,M=ye.line)}}function Wr(e,r,R,L){L-=Cn(r);var M=r.text.length,z=J(function(ie){return Tn(e,R,ie-1).bottom<=L},M,0);return M=J(function(ie){return Tn(e,R,ie).top>L},z,M),{begin:z,end:M}}function Ri(e,r,R,L){R||(R=Qn(e,r));var M=vn(e,r,Tn(e,R,L),"line").top;return Wr(e,r,R,M)}function Bi(e,r,R,L){return e.bottom<=R?!1:e.top>R?!0:(L?e.left:e.right)>r}function Wi(e,r,R,L,M){M-=Zr(r);var z=Qn(e,r),ie=Cn(r),le=0,ue=r.text.length,ye=!0,Ke=at(r,e.doc.direction);if(Ke){var Ge=(e.options.lineWrapping?_a:Mi)(e,r,R,z,Ke,L,M);ye=Ge.level!=1,le=ye?Ge.from:Ge.to-1,ue=ye?Ge.to:Ge.from-1}var st=null,tt=null,_t=J(function(yn){var dn=Tn(e,z,yn);return dn.top+=ie,dn.bottom+=ie,Bi(dn,L,M,!1)?(dn.top<=M&&dn.left<=L&&(st=yn,tt=dn),!0):!1},le,ue),At,kt,Ht=!1;if(tt){var $t=L-tt.left<tt.right-L,zt=$t==ye;_t=st+(zt?0:1),kt=zt?"after":"before",At=$t?tt.left:tt.right}else{!ye&&(_t==ue||_t==le)&&_t++,kt=_t==0?"after":_t==r.text.length?"before":Tn(e,z,_t-(ye?1:0)).bottom+ie<=M==ye?"after":"before";var en=Yn(e,rt(R,_t,kt),"line",r,z);At=en.left,Ht=M<en.top?-1:M>=en.bottom?1:0}return _t=N(r.text,_t,1),Nr(R,_t,kt,Ht,L-At)}function Mi(e,r,R,L,M,z,ie){var le=J(function(Ge){var st=M[Ge],tt=st.level!=1;return Bi(Yn(e,rt(R,tt?st.to:st.from,tt?"before":"after"),"line",r,L),z,ie,!0)},0,M.length-1),ue=M[le];if(le>0){var ye=ue.level!=1,Ke=Yn(e,rt(R,ye?ue.from:ue.to,ye?"after":"before"),"line",r,L);Bi(Ke,z,ie,!0)&&Ke.top>ie&&(ue=M[le-1])}return ue}function _a(e,r,R,L,M,z,ie){var le=Wr(e,r,L,ie),ue=le.begin,ye=le.end;/\s/.test(r.text.charAt(ye-1))&&ye--;for(var Ke=null,Ge=null,st=0;st<M.length;st++){var tt=M[st];if(tt.from>=ye||tt.to<=ue)continue;var _t=tt.level!=1,At=Tn(e,L,_t?Math.min(ye,tt.to)-1:Math.max(ue,tt.from)).right,kt=At<z?z-At+1e9:At-z;(!Ke||Ge>kt)&&(Ke=tt,Ge=kt)}return Ke||(Ke=M[M.length-1]),Ke.from<ue&&(Ke={from:ue,to:Ke.to,level:Ke.level}),Ke.to>ye&&(Ke={from:Ke.from,to:ye,level:Ke.level}),Ke}var In;function pn(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(In==null){In=T("pre",null,"CodeMirror-line-like");for(var r=0;r<49;++r)In.appendChild(document.createTextNode("x")),In.appendChild(T("br"));In.appendChild(document.createTextNode("x"))}l(e.measure,In);var R=In.offsetHeight/50;return R>3&&(e.cachedTextHeight=R),x(e.measure),R||1}function Nn(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var r=T("span","xxxxxxxxxx"),R=T("pre",[r],"CodeMirror-line-like");l(e.measure,R);var L=r.getBoundingClientRect(),M=(L.right-L.left)/10;return M>2&&(e.cachedCharWidth=M),M||10}function $n(e){for(var r=e.display,R={},L={},M=r.gutters.clientLeft,z=r.gutters.firstChild,ie=0;z;z=z.nextSibling,++ie){var le=e.display.gutterSpecs[ie].className;R[le]=z.offsetLeft+z.clientLeft+M,L[le]=z.clientWidth}return{fixedPos:Or(r),gutterTotalWidth:r.gutters.offsetWidth,gutterLeft:R,gutterWidth:L,wrapperWidth:r.wrapper.clientWidth}}function Or(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Bn(e){var r=pn(e.display),R=e.options.lineWrapping,L=R&&Math.max(5,e.display.scroller.clientWidth/Nn(e.display)-3);return function(M){if(hi(e.doc,M))return 0;var z=0;if(M.widgets)for(var ie=0;ie<M.widgets.length;ie++)M.widgets[ie].height&&(z+=M.widgets[ie].height);return R?z+(Math.ceil(M.text.length/L)||1)*r:z+r}}function mi(e){var r=e.doc,R=Bn(e);r.iter(function(L){var M=R(L);M!=L.height&&Se(L,M)})}function si(e,r,R,L){var M=e.display;if(!R&&$e(r).getAttribute("cm-not-content")=="true")return null;var z,ie,le=M.lineSpace.getBoundingClientRect();try{z=r.clientX-le.left,ie=r.clientY-le.top}catch(Ge){return null}var ue=Ci(e,z,ie),ye;if(L&&ue.xRel>0&&(ye=Q(e.doc,ue.line).text).length==ue.ch){var Ke=X(ye,ye.length,e.options.tabSize)-ye.length;ue=rt(ue.line,Math.max(0,Math.round((z-vr(e.display).left)/Nn(e.display))-Ke))}return ue}function Kr(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 Dr(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)Er&&Ti(e.doc,r)<M.viewTo&&ei(e);else if(R<=M.viewFrom)Er&&Xi(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 z=An(e,R,R+L,1);z?(M.view=M.view.slice(z.index),M.viewFrom=z.lineN,M.viewTo+=L):ei(e)}else if(R>=M.viewTo){var ie=An(e,r,r,-1);ie?(M.view=M.view.slice(0,ie.index),M.viewTo=ie.lineN):ei(e)}else{var le=An(e,r,r,-1),ue=An(e,R,R+L,1);le&&ue?(M.view=M.view.slice(0,le.index).concat(mr(e,le.lineN,ue.lineN)).concat(M.view.slice(ue.index)),M.viewTo+=L):ei(e)}var ye=M.externalMeasured;ye&&(R<ye.lineN?ye.lineN+=L:r<ye.lineN+ye.size&&(M.externalMeasured=null))}function ri(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 z=L.view[Kr(e,r)];if(z.node==null)return;var ie=z.changes||(z.changes=[]);K(ie,R)==-1&&ie.push(R)}function ei(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function An(e,r,R,L){var M=Kr(e,r),z,ie=e.display.view;if(!Er||R==e.doc.first+e.doc.size)return{index:M,lineN:R};for(var le=e.display.viewFrom,ue=0;ue<M;ue++)le+=ie[ue].size;if(le!=r){if(L>0){if(M==ie.length-1)return null;z=le+ie[M].size-r,M++}else z=le-r;r+=z,R+=z}for(;Ti(e.doc,R)!=R;){if(M==(L<0?0:ie.length-1))return null;R+=L*ie[M-(L<0?1:0)].size,M+=L}return{index:M,lineN:R}}function _n(e,r,R){var L=e.display,M=L.view;M.length==0||r>=L.viewTo||R<=L.viewFrom?(L.view=mr(e,r,R),L.viewFrom=r):(L.viewFrom>r?L.view=mr(e,r,L.viewFrom).concat(L.view):L.viewFrom<r&&(L.view=L.view.slice(Kr(e,r))),L.viewFrom=r,L.viewTo<R?L.view=L.view.concat(mr(e,L.viewTo,R)):L.viewTo>R&&(L.view=L.view.slice(0,Kr(e,R)))),L.viewTo=R}function Wn(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 Vt(e){e.display.input.showSelection(e.display.input.prepareSelection())}function On(e,r){r===void 0&&(r=!0);for(var R=e.doc,L={},M=L.cursors=document.createDocumentFragment(),z=L.selection=document.createDocumentFragment(),ie=0;ie<R.sel.ranges.length;ie++){if(!r&&ie==R.sel.primIndex)continue;var le=R.sel.ranges[ie];if(le.from().line>=e.display.viewTo||le.to().line<e.display.viewFrom)continue;var ue=le.empty();(ue||e.options.showCursorWhenSelecting)&&cr(e,le.head,M),ue||Ur(e,le,z)}return L}function cr(e,r,R){var L=Yn(e,r,"div",null,null,!e.options.singleCursorHeightPerLine),M=R.appendChild(T("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 z=R.appendChild(T("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));z.style.display="",z.style.left=L.other.left+"px",z.style.top=L.other.top+"px",z.style.height=(L.other.bottom-L.other.top)*.85+"px"}}function Ar(e,r){return e.top-r.top||e.left-r.left}function Ur(e,r,R){var L=e.display,M=e.doc,z=document.createDocumentFragment(),ie=vr(e.display),le=ie.left,ue=Math.max(L.sizerWidth,Rn(e)-L.sizer.offsetLeft)-ie.right,ye=M.direction=="ltr";function Ke(zt,en,yn,dn){en<0&&(en=0),en=Math.round(en),dn=Math.round(dn),z.appendChild(T("div",null,"CodeMirror-selected","position: absolute; left: "+zt+`px;
|
|
|
top: `+en+"px; width: "+(yn==null?ue-zt:yn)+`px;
|
|
|
height: `+(dn-en)+"px"))}function Ge(zt,en,yn){var dn=Q(M,zt),zn=dn.text.length,gr,Yr;function Tr(jr,bi){return Xn(e,rt(zt,jr),"div",dn,bi)}function Ai(jr,bi,ti){var Hr=Ri(e,dn,null,jr),Fr=bi=="ltr"==(ti=="after")?"left":"right",Lr=ti=="after"?Hr.begin:Hr.end-(/\s/.test(dn.text.charAt(Hr.end-1))?2:1);return Tr(Lr,Fr)[Fr]}var yi=at(dn,M.direction);return V(yi,en||0,yn==null?zn:yn,function(jr,bi,ti,Hr){var Fr=ti=="ltr",Lr=Tr(jr,Fr?"left":"right"),_i=Tr(bi-1,Fr?"right":"left"),Pa=en==null&&jr==0,ca=yn==null&&bi==zn,ai=Hr==0,Gi=!yi||Hr==yi.length-1;if(_i.top-Lr.top<=3){var $r=(ye?Pa:ca)&&ai,Fo=(ye?ca:Pa)&&Gi,Zi=$r?le:(Fr?Lr:_i).left,ya=Fo?ue:(Fr?_i:Lr).right;Ke(Zi,Lr.top,ya-Zi,Lr.bottom)}else{var ba,ui,Ma,Bo;Fr?(ba=ye&&Pa&&ai?le:Lr.left,ui=ye?ue:Ai(jr,ti,"before"),Ma=ye?le:Ai(bi,ti,"after"),Bo=ye&&ca&&Gi?ue:_i.right):(ba=ye?Ai(jr,ti,"before"):le,ui=!ye&&Pa&&ai?ue:Lr.right,Ma=!ye&&ca&&Gi?le:_i.left,Bo=ye?Ai(bi,ti,"after"):ue),Ke(ba,Lr.top,ui-ba,Lr.bottom),Lr.bottom<_i.top&&Ke(le,Lr.bottom,null,_i.top),Ke(Ma,_i.top,Bo-Ma,_i.bottom)}(!gr||Ar(Lr,gr)<0)&&(gr=Lr),Ar(_i,gr)<0&&(gr=_i),(!Yr||Ar(Lr,Yr)<0)&&(Yr=Lr),Ar(_i,Yr)<0&&(Yr=_i)}),{start:gr,end:Yr}}var st=r.from(),tt=r.to();if(st.line==tt.line)Ge(st.line,st.ch,tt.ch);else{var _t=Q(M,st.line),At=Q(M,tt.line),kt=Ir(_t)==Ir(At),Ht=Ge(st.line,st.ch,kt?_t.text.length+1:null).end,$t=Ge(tt.line,kt?0:null,tt.ch).start;kt&&(Ht.top<$t.top-2?(Ke(Ht.right,Ht.top,null,Ht.bottom),Ke(le,$t.top,$t.left,$t.bottom)):Ke(Ht.right,Ht.top,$t.left-Ht.right,Ht.bottom)),Ht.bottom<$t.top&&Ke(le,Ht.bottom,null,$t.top)}R.appendChild(z)}function ta(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()||vi(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 na(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,vi(e))},100)}function ha(e,r){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(ze(e,"focus",e,r),e.state.focused=!0,j(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),u&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),ta(e)}function vi(e,r){if(e.state.delayingBlurEvent)return;e.state.focused&&(ze(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 ki(e){for(var r=e.display,R=r.lineDiv.offsetTop,L=0;L<r.view.length;L++){var M=r.view[L],z=e.options.lineWrapping,ie=void 0,le=0;if(M.hidden)continue;if(C&&w<8){var ue=M.node.offsetTop+M.node.offsetHeight;ie=ue-R,R=ue}else{var ye=M.node.getBoundingClientRect();ie=ye.bottom-ye.top,!z&&M.text.firstChild&&(le=M.text.firstChild.getBoundingClientRect().right-ye.left-1)}var Ke=M.line.height-ie;if((Ke>.005||Ke<-.005)&&(Se(M.line,ie),Ii(M.line),M.rest))for(var Ge=0;Ge<M.rest.length;Ge++)Ii(M.rest[Ge]);if(le>e.display.sizerWidth){var st=Math.ceil(le/Nn(e.display));st>e.display.maxLineLength&&(e.display.maxLineLength=st,e.display.maxLine=M.line,e.display.maxLineChanged=!0)}}}function Ii(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 Ki(e,r,R){var L=R&&R.top!=null?Math.max(0,R.top):e.scroller.scrollTop;L=Math.floor(L-Gn(e));var M=R&&R.bottom!=null?R.bottom:L+e.wrapper.clientHeight,z=qe(r,L),ie=qe(r,M);if(R&&R.ensure){var le=R.ensure.from.line,ue=R.ensure.to.line;le<z?(z=le,ie=qe(r,Zr(Q(r,le))+e.wrapper.clientHeight)):Math.min(ue,r.lastLine())>=ie&&(z=qe(r,Zr(Q(r,ue))-e.wrapper.clientHeight),ie=ue)}return{from:z,to:Math.max(ie,z+1)}}function ra(e,r){if(We(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 z=T("div","\u200B",null,`position: absolute;
|
|
|
top: `+(r.top-R.viewOffset-Gn(e.display))+`px;
|
|
|
height: `+(r.bottom-r.top+qn(e)+R.barHeight)+`px;
|
|
|
left: `+r.left+"px; width: "+Math.max(2,r.right-r.left)+"px;");e.display.lineSpace.appendChild(z),z.scrollIntoView(M),e.display.lineSpace.removeChild(z)}}function ia(e,r,R,L){L==null&&(L=0);var M;!e.options.lineWrapping&&r==R&&(r=r.ch?rt(r.line,r.sticky=="before"?r.ch-1:r.ch,"after"):r,R=r.sticky=="before"?rt(r.line,r.ch+1,"before"):r);for(var z=0;z<5;z++){var ie=!1,le=Yn(e,r),ue=!R||R==r?le:Yn(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 ye=Pr(e,M),Ke=e.doc.scrollTop,Ge=e.doc.scrollLeft;if(ye.scrollTop!=null&&(Ia(e,ye.scrollTop),Math.abs(e.doc.scrollTop-Ke)>1&&(ie=!0)),ye.scrollLeft!=null&&(pa(e,ye.scrollLeft),Math.abs(e.doc.scrollLeft-Ge)>1&&(ie=!0)),!ie)break}return M}function go(e,r){var R=Pr(e,r);R.scrollTop!=null&&Ia(e,R.scrollTop),R.scrollLeft!=null&&pa(e,R.scrollLeft)}function Pr(e,r){var R=e.display,L=pn(e.display);r.top<0&&(r.top=0);var M=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:R.scroller.scrollTop,z=Jn(e),ie={};r.bottom-r.top>z&&(r.bottom=r.top+z);var le=e.doc.height+lr(R),ue=r.top<L,ye=r.bottom>le-L;if(r.top<M)ie.scrollTop=ue?0:r.top;else if(r.bottom>M+z){var Ke=Math.min(r.top,(ye?le:r.bottom)-z);Ke!=M&&(ie.scrollTop=Ke)}var Ge=e.options.fixedGutter?0:R.gutters.offsetWidth,st=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:R.scroller.scrollLeft-Ge,tt=Rn(e)-R.gutters.offsetWidth,_t=r.right-r.left>tt;return _t&&(r.right=r.left+tt),r.left<10?ie.scrollLeft=0:r.left<st?ie.scrollLeft=Math.max(0,r.left+Ge-(_t?0:10)):r.right>tt+st-3&&(ie.scrollLeft=r.right+(_t?0:10)-tt),ie}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=Sr(e,r.from),L=Sr(e,r.to);Wo(e,R,L,r.margin)}}function Wo(e,r,R,L){var M=Pr(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+lr(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+qn(e)+r.barHeight,nativeBarWidth:r.nativeBarWidth,gutterWidth:R}}var ma=function(e,r,R){this.cm=R;var L=this.vert=T("div",[T("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),M=this.horiz=T("div",[T("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");L.tabIndex=M.tabIndex=-1,e(L),e(M),Pe(L,"scroll",function(){L.clientHeight&&r(L.scrollTop,"vertical")}),Pe(M,"scroll",function(){M.clientWidth&&r(M.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,C&&w<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 z=e.viewWidth-e.barLeft-(R?L:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+z)+"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=n&&!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(),z=R=="vert"?document.elementFromPoint(M.right-1,(M.top+M.bottom)/2):document.elementFromPoint((M.right+M.left)/2,M.bottom-1);z!=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&&ki(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),Pe(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&&j(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},ut(e.curOp)}function ga(e){var r=e.curOp;r&&bt(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 z=0;z<r.length;z++)il(r[z]);for(var ie=0;ie<r.length;ie++)al(r[ie])}function tl(e){var r=e.cm,R=r.display;sl(r),e.updateMaxLine&&pi(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&&ki(r),e.barMeasure=Na(r),R.maxLineChanged&&!r.options.lineWrapping&&(e.adjustWidthTo=Zn(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+qn(r)+r.display.barWidth),e.maxScrollLeft=Math.max(0,R.sizer.offsetLeft+e.adjustWidthTo-Rn(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&&ta(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=ia(r,vt(L,e.scrollToPos.from),vt(L,e.scrollToPos.to),e.scrollToPos.margin);ra(r,M)}var z=e.maybeHiddenMarkers,ie=e.maybeUnhiddenMarkers;if(z)for(var le=0;le<z.length;++le)z[le].lines.length||ze(z[le],"hide");if(ie)for(var ue=0;ue<ie.length;++ue)ie[ue].lines.length&&ze(ie[ue],"unhide");R.wrapper.offsetHeight&&(L.scrollTop=r.display.scroller.scrollTop),e.changeObjs&&ze(r,"changes",r,e.changeObjs),e.update&&e.update.finish()}function Oi(e,r){if(e.curOp)return r();va(e);try{return r()}finally{ga(e)}}function Vr(e,r){return function(){if(e.curOp)return r.apply(e,arguments);va(e);try{return r.apply(e,arguments)}finally{ga(e)}}}function li(e){return function(){if(this.curOp)return e.apply(this,arguments);va(this);try{return e.apply(this,arguments)}finally{ga(this)}}}function Xr(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,F(ol,e))}function ol(e){var r=e.doc;if(r.highlightFrontier>=e.display.viewTo)return;var R=+new Date+e.options.workTime,L=gt(e,r.highlightFrontier),M=[];r.iter(L.line,Math.min(r.first+r.size,e.display.viewTo+500),function(z){if(L.line>=e.display.viewFrom){var ie=z.styles,le=z.text.length>e.options.maxHighlightLength?Xt(r.mode,L.state):null,ue=er(e,z,L,!0);le&&(L.state=le),z.styles=ue.styles;var ye=z.styleClasses,Ke=ue.classes;Ke?z.styleClasses=Ke:ye&&(z.styleClasses=null);for(var Ge=!ie||ie.length!=z.styles.length||ye!=Ke&&(!ye||!Ke||ye.bgClass!=Ke.bgClass||ye.textClass!=Ke.textClass),st=0;!Ge&&st<ie.length;++st)Ge=ie[st]!=z.styles[st];Ge&&M.push(L.line),z.stateAfter=L.save(),L.nextLine()}else z.text.length<=e.options.maxHighlightLength&&yr(e,z.text,L),z.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&&Oi(e,function(){for(var z=0;z<M.length;z++)ri(e,M[z],"text")})}var to=function(e,r,R){var L=e.display;this.viewport=r,this.visible=Ki(L,e.doc,r),this.editorIsHidden=!L.wrapper.offsetWidth,this.wrapperHeight=L.wrapper.clientHeight,this.wrapperWidth=L.wrapper.clientWidth,this.oldDisplayWidth=Rn(e),this.force=R,this.dims=$n(e),this.events=[]};to.prototype.signal=function(e,r){De(e,r)&&this.events.push(arguments)},to.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ze.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=qn(e)+"px",r.sizer.style.marginBottom=-r.nativeBarWidth+"px",r.sizer.style.borderRightWidth=qn(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&&Wn(e)==0)return!1;Yo(e)&&(ei(e),r.dims=$n(e));var M=L.first+L.size,z=Math.max(r.visible.from-e.options.viewportMargin,L.first),ie=Math.min(M,r.visible.to+e.options.viewportMargin);R.viewFrom<z&&z-R.viewFrom<20&&(z=Math.max(L.first,R.viewFrom)),R.viewTo>ie&&R.viewTo-ie<20&&(ie=Math.min(M,R.viewTo)),Er&&(z=Ti(e.doc,z),ie=Xi(e.doc,ie));var le=z!=R.viewFrom||ie!=R.viewTo||R.lastWrapHeight!=r.wrapperHeight||R.lastWrapWidth!=r.wrapperWidth;_n(e,z,ie),R.viewOffset=Zr(Q(e.doc,R.viewFrom)),e.display.mover.style.top=R.viewOffset+"px";var ue=Wn(e);if(!le&&ue==0&&!r.force&&R.renderedView==R.view&&(R.updateLineNumbers==null||R.updateLineNumbers>=R.viewTo))return!1;var ye=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(ye),x(R.cursorDiv),x(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==Rn(e)){if(R&&R.top!=null&&(R={top:Math.min(e.doc.height+lr(e.display)-Jn(e),R.top)}),r.visible=Ki(e.display,e.doc,R),r.visible.from>=e.display.viewFrom&&r.visible.to<=e.display.viewTo)break}else L&&(r.visible=Ki(e.display,e.doc,R));if(!bo(e,r))break;ki(e);var M=Na(e);Vt(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)){ki(e),Vo(e,R);var L=Na(e);Vt(e),xa(e,L),xo(e,L),R.finish()}}function cl(e,r,R){var L=e.display,M=e.options.lineNumbers,z=L.lineDiv,ie=z.firstChild;function le(_t){var At=_t.nextSibling;return u&&n&&e.display.currentWheelTarget==_t?_t.style.display="none":_t.parentNode.removeChild(_t),At}for(var ue=L.view,ye=L.viewFrom,Ke=0;Ke<ue.length;Ke++){var Ge=ue[Ke];if(!Ge.hidden)if(!Ge.node||Ge.node.parentNode!=z){var st=mn(e,Ge,ye,R);z.insertBefore(st,ie)}else{for(;ie!=Ge.node;)ie=le(ie);var tt=M&&r!=null&&r<=ye&&Ge.lineNumber;Ge.changes&&(K(Ge.changes,"gutter")>-1&&(tt=!1),pt(e,Ge,ye,R)),tt&&(x(Ge.lineNumber),Ge.lineNumber.appendChild(document.createTextNode(Lt(e.options,ye)))),ie=Ge.node.nextSibling}ye+=Ge.size}for(;ie;)ie=le(ie)}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+qn(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=Or(r)-r.scroller.scrollLeft+e.doc.scrollLeft,M=r.gutters.offsetWidth,z=L+"px",ie=0;ie<R.length;ie++)if(!R[ie].hidden){e.options.fixedGutter&&(R[ie].gutter&&(R[ie].gutter.style.left=z),R[ie].gutterBackground&&(R[ie].gutterBackground.style.left=z));var le=R[ie].alignable;if(le)for(var ue=0;ue<le.length;ue++)le[ue].style.left=z}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(T("div",[T("div",R)],"CodeMirror-linenumber CodeMirror-gutter-elt")),z=M.firstChild.offsetWidth,ie=M.offsetWidth-z;return L.lineGutter.style.width="",L.lineNumInnerWidth=Math.max(z,L.lineGutter.offsetWidth-ie)+1,L.lineNumWidth=L.lineNumInnerWidth+ie,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 z=e[M],ie=null;if(typeof z!="string"&&(ie=z.style,z=z.className),z=="CodeMirror-linenumbers")if(r)L=!0;else continue;R.push({className:z,style:ie})}return r&&!L&&R.push({className:"CodeMirror-linenumbers",style:null}),R}function $o(e){var r=e.gutters,R=e.gutterSpecs;x(r),e.lineGutter=null;for(var L=0;L<R.length;++L){var M=R[L],z=M.className,ie=M.style,le=r.appendChild(T("div",null,"CodeMirror-gutter "+z));ie&&(le.style.cssText=ie),z=="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),Dr(e),Xo(e)}function dl(e,r,R,L){var M=this;this.input=R,M.scrollbarFiller=T("div",null,"CodeMirror-scrollbar-filler"),M.scrollbarFiller.setAttribute("cm-not-content","true"),M.gutterFiller=T("div",null,"CodeMirror-gutter-filler"),M.gutterFiller.setAttribute("cm-not-content","true"),M.lineDiv=A("div",null,"CodeMirror-code"),M.selectionDiv=T("div",null,null,"position: relative; z-index: 1"),M.cursorDiv=T("div",null,"CodeMirror-cursors"),M.measure=T("div",null,"CodeMirror-measure"),M.lineMeasure=T("div",null,"CodeMirror-measure"),M.lineSpace=A("div",[M.measure,M.lineMeasure,M.selectionDiv,M.cursorDiv,M.lineDiv],null,"position: relative; outline: none");var z=A("div",[M.lineSpace],"CodeMirror-lines");M.mover=T("div",[z],null,"position: relative"),M.sizer=T("div",[M.mover],"CodeMirror-sizer"),M.sizerWidth=null,M.heightForcer=T("div",null,null,"position: absolute; height: "+q+"px; width: 1px;"),M.gutters=T("div",null,"CodeMirror-gutters"),M.lineGutter=null,M.scroller=T("div",[M.sizer,M.heightForcer,M.gutters],"CodeMirror-scroll"),M.scroller.setAttribute("tabIndex","-1"),M.wrapper=T("div",[M.scrollbarFiller,M.gutterFiller,M.scroller],"CodeMirror"),C&&w<8&&(M.gutters.style.zIndex=-1,M.scroller.style.paddingRight=0),!u&&!(U&&t)&&(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,Di=null;C?Di=-.53:U?Di=15:f?Di=-.7:a&&(Di=-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*=Di,r.y*=Di,r}function Qo(e,r){var R=Jo(r),L=R.x,M=R.y,z=e.display,ie=z.scroller,le=ie.scrollWidth>ie.clientWidth,ue=ie.scrollHeight>ie.clientHeight;if(!(L&&le||M&&ue))return;if(M&&n&&u){e:for(var ye=r.target,Ke=z.view;ye!=ie;ye=ye.parentNode)for(var Ge=0;Ge<Ke.length;Ge++)if(Ke[Ge].node==ye){e.display.currentWheelTarget=ye;break e}}if(L&&!U&&!o&&Di!=null){M&&ue&&Ia(e,Math.max(0,ie.scrollTop+M*Di)),pa(e,Math.max(0,ie.scrollLeft+L*Di)),(!M||M&&ue)&&pe(r),z.wheelStartX=null;return}if(M&&Di!=null){var st=M*Di,tt=e.doc.scrollTop,_t=tt+z.wrapper.clientHeight;st<0?tt=Math.max(0,tt+st-50):_t=Math.min(e.doc.height,_t+st+50),_o(e,{top:tt,bottom:_t})}no<20&&(z.wheelStartX==null?(z.wheelStartX=ie.scrollLeft,z.wheelStartY=ie.scrollTop,z.wheelDX=L,z.wheelDY=M,setTimeout(function(){if(z.wheelStartX==null)return;var At=ie.scrollLeft-z.wheelStartX,kt=ie.scrollTop-z.wheelStartY,Ht=kt&&z.wheelDY&&kt/z.wheelDY||At&&z.wheelDX&&At/z.wheelDX;if(z.wheelStartX=z.wheelStartY=null,!Ht)return;Di=(Di*no+Ht)/(no+1),++no},200)):(z.wheelDX+=L,z.wheelDY+=M))}var Pi=function(e,r){this.ranges=e,this.primIndex=r};Pi.prototype.primary=function(){return this.ranges[this.primIndex]},Pi.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(!Jt(R.anchor,L.anchor)||!Jt(R.head,L.head))return!1}return!0},Pi.prototype.deepCopy=function(){for(var e=[],r=0;r<this.ranges.length;r++)e[r]=new sr(St(this.ranges[r].anchor),St(this.ranges[r].head));return new Pi(e,this.primIndex)},Pi.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Pi.prototype.contains=function(e,r){r||(r=e);for(var R=0;R<this.ranges.length;R++){var L=this.ranges[R];if(Ct(r,L.from())>=0&&Ct(e,L.to())<=0)return R}return-1};var sr=function(e,r){this.anchor=e,this.head=r};sr.prototype.from=function(){return Qt(this.anchor,this.head)},sr.prototype.to=function(){return nn(this.anchor,this.head)},sr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Hi(e,r,R){var L=e&&e.options.selectionsMayTouch,M=r[R];r.sort(function(st,tt){return Ct(st.from(),tt.from())}),R=K(r,M);for(var z=1;z<r.length;z++){var ie=r[z],le=r[z-1],ue=Ct(le.to(),ie.from());if(L&&!ie.empty()?ue>0:ue>=0){var ye=Qt(le.from(),ie.from()),Ke=nn(le.to(),ie.to()),Ge=le.empty()?ie.from()==ie.head:le.from()==le.head;z<=R&&--R,r.splice(--z,2,new sr(Ge?Ke:ye,Ge?ye:Ke))}}return new Pi(r,R)}function aa(e,r){return new Pi([new sr(e,r||e)],0)}function oa(e){return e.text?rt(e.from.line+e.text.length-1,je(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function qo(e,r){if(Ct(e,r.from)<0)return e;if(Ct(e,r.to)<=0)return oa(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+=oa(r).ch-r.to.ch),rt(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 sr(qo(M.anchor,r),qo(M.head,r)))}return Hi(e.cm,R,e.sel.primIndex)}function Zo(e,r,R){return e.line==r.line?rt(R.line,e.ch-r.ch+R.ch):rt(R.line+(e.line-r.line),e.ch)}function hl(e,r,R){for(var L=[],M=rt(e.first,0),z=M,ie=0;ie<r.length;ie++){var le=r[ie],ue=Zo(le.from,M,z),ye=Zo(oa(le),M,z);if(M=le.to,z=ye,R=="around"){var Ke=e.sel.ranges[ie],Ge=Ct(Ke.head,Ke.anchor)<0;L[ie]=new sr(Ge?ye:ue,Ge?ue:ye)}else L[ie]=new sr(ue,ue)}return new Pi(L,e.sel.primIndex)}function To(e){e.doc.mode=yt(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&&Dr(e)}function es(e,r){return r.from.ch==0&&r.to.ch==0&&je(r.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Co(e,r,R,L){function M($t){return R?R[$t]:null}function z($t,zt,en){Yi($t,zt,en,L),Mt($t,"change",$t,r)}function ie($t,zt){for(var en=[],yn=$t;yn<zt;++yn)en.push(new ni(ye[yn],M(yn),L));return en}var le=r.from,ue=r.to,ye=r.text,Ke=Q(e,le.line),Ge=Q(e,ue.line),st=je(ye),tt=M(ye.length-1),_t=ue.line-le.line;if(r.full)e.insert(0,ie(0,ye.length)),e.remove(ye.length,e.size-ye.length);else if(es(e,r)){var At=ie(0,ye.length-1);z(Ge,Ge.text,tt),_t&&e.remove(le.line,_t),At.length&&e.insert(le.line,At)}else if(Ke==Ge)if(ye.length==1)z(Ke,Ke.text.slice(0,le.ch)+st+Ke.text.slice(ue.ch),tt);else{var kt=ie(1,ye.length-1);kt.push(new ni(st+Ke.text.slice(ue.ch),tt,L)),z(Ke,Ke.text.slice(0,le.ch)+ye[0],M(0)),e.insert(le.line+1,kt)}else if(ye.length==1)z(Ke,Ke.text.slice(0,le.ch)+ye[0]+Ge.text.slice(ue.ch),M(0)),e.remove(le.line+1,_t);else{z(Ke,Ke.text.slice(0,le.ch)+ye[0],M(0)),z(Ge,st+Ge.text.slice(ue.ch),tt);var Ht=ie(1,ye.length-1);_t>1&&e.remove(le.line+1,_t-1),e.insert(le.line+1,Ht)}Mt(e,"change",e,r)}function sa(e,r,R){function L(M,z,ie){if(M.linked)for(var le=0;le<M.linked.length;++le){var ue=M.linked[le];if(ue.doc==z)continue;var ye=ie&&ue.sharedHist;if(R&&!ye)continue;r(ue.doc,ye),L(ue.doc,M,ye)}}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,mi(e),To(e),ns(e),e.options.lineWrapping||pi(e),e.options.mode=r.modeOption,Dr(e)}function ns(e){(e.doc.direction=="rtl"?j:g)(e.display.lineDiv,"CodeMirror-rtl")}function pl(e){Oi(e,function(){ns(e),Dr(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:St(r.from),to:oa(r),text:ne(e,r.from,r.to)};return as(e,R,r.from.line,r.to.line+1),sa(e,function(L){return as(L,R,r.from.line,r.to.line+1)},!0),R}function rs(e){for(;e.length;){var r=je(e);if(r.ranges)e.pop();else break}}function ml(e,r){if(r)return rs(e.done),je(e.done);if(e.done.length&&!je(e.done).ranges)return je(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),je(e.done)}function is(e,r,R,L){var M=e.history;M.undone.length=0;var z=+new Date,ie,le;if((M.lastOp==L||M.lastOrigin==r.origin&&r.origin&&(r.origin.charAt(0)=="+"&&M.lastModTime>z-(e.cm?e.cm.options.historyEventDelay:500)||r.origin.charAt(0)=="*"))&&(ie=ml(M,M.lastOp==L)))le=je(ie.changes),Ct(r.from,r.to)==0&&Ct(r.from,le.to)==0?le.to=oa(r):ie.changes.push(Oo(e,r));else{var ue=je(M.done);for((!ue||!ue.ranges)&&io(e.sel,M.done),ie={changes:[Oo(e,r)],generation:M.generation},M.done.push(ie);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=z,M.lastOp=M.lastSelOp=L,M.lastOrigin=M.lastSelOrigin=r.origin,le||ze(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,z=L&&L.origin;R==M.lastSelOp||z&&M.lastSelOrigin==z&&(M.lastModTime==M.lastSelTime&&M.lastOrigin==z||vl(e,z,je(M.done),r))?M.done[M.done.length-1]=r:io(r,M.done),M.lastSelTime=+new Date,M.lastSelOrigin=z,M.lastSelOp=R,L&&L.clearRedo!==!1&&rs(M.undone)}function io(e,r){var R=je(r);R&&R.ranges&&R.equals(e)||r.push(e)}function as(e,r,R,L){var M=r["spans_"+e.id],z=0;e.iter(Math.max(e.first,R),Math.min(e.first+e.size,L),function(ie){ie.markedSpans&&((M||(M=r["spans_"+e.id]={}))[z]=ie.markedSpans),++z})}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=Br(e,r);if(!R)return L;if(!L)return R;for(var M=0;M<R.length;++M){var z=R[M],ie=L[M];if(z&&ie){e:for(var le=0;le<ie.length;++le){for(var ue=ie[le],ye=0;ye<z.length;++ye)if(z[ye].marker==ue.marker)continue e;z.push(ue)}}else ie&&(R[M]=ie)}return R}function Sa(e,r,R){for(var L=[],M=0;M<e.length;++M){var z=e[M];if(z.ranges){L.push(R?Pi.prototype.deepCopy.call(z):z);continue}var ie=z.changes,le=[];L.push({changes:le});for(var ue=0;ue<ie.length;++ue){var ye=ie[ue],Ke=void 0;if(le.push({from:ye.from,to:ye.to,text:ye.text}),r)for(var Ge in ye)(Ke=Ge.match(/^spans_(\d+)$/))&&(K(r,Number(Ke[1]))>-1&&(je(le)[Ge]=ye[Ge],delete ye[Ge]))}}return L}function Ao(e,r,R,L){if(L){var M=e.anchor;if(R){var z=Ct(r,M)<0;z!=Ct(R,M)<0?(M=r,r=R):z!=Ct(r,R)<0&&(r=R)}return new sr(M,r)}else return new sr(R||r,r)}function ao(e,r,R,L,M){M==null&&(M=e.cm&&(e.cm.display.shift||e.extend)),ii(e,new Pi([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),z=0;z<e.sel.ranges.length;z++)L[z]=Ao(e.sel.ranges[z],r[z],null,M);var ie=Hi(e.cm,L,e.sel.primIndex);ii(e,ie,R)}function Lo(e,r,R,L){var M=e.sel.ranges.slice(0);M[r]=R,ii(e,Hi(e.cm,M,e.sel.primIndex),L)}function ls(e,r,R,L){ii(e,aa(r,R),L)}function _l(e,r,R){var L={ranges:r.ranges,update:function(M){this.ranges=[];for(var z=0;z<M.length;z++)this.ranges[z]=new sr(vt(e,M[z].anchor),vt(e,M[z].head))},origin:R&&R.origin};return ze(e,"beforeSelectionChange",e,L),e.cm&&ze(e.cm,"beforeSelectionChange",e.cm,L),L.ranges!=r.ranges?Hi(e.cm,L.ranges,L.ranges.length-1):r}function us(e,r,R){var L=e.history.done,M=je(L);M&&M.ranges?(L[L.length-1]=r,oo(e,r,R)):ii(e,r,R)}function ii(e,r,R){oo(e,r,R),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,R)}function oo(e,r,R){(De(e,"beforeSelectionChange")||e.cm&&De(e.cm,"beforeSelectionChange"))&&(r=_l(e,r,R));var L=R&&R.bias||(Ct(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,Me(e.cm)),Mt(e,"cursorActivity",e)}function ds(e){cs(e,fs(e,e.sel,null,!1))}function fs(e,r,R,L){for(var M,z=0;z<r.ranges.length;z++){var ie=r.ranges[z],le=r.ranges.length==e.sel.ranges.length&&e.sel.ranges[z],ue=so(e,ie.anchor,le&&le.anchor,R,L),ye=so(e,ie.head,le&&le.head,R,L);(M||ue!=ie.anchor||ye!=ie.head)&&(M||(M=r.ranges.slice(0,z)),M[z]=new sr(ue,ye))}return M?Hi(e.cm,M,r.primIndex):r}function wa(e,r,R,L,M){var z=Q(e,r.line);if(z.markedSpans)for(var ie=0;ie<z.markedSpans.length;++ie){var le=z.markedSpans[ie],ue=le.marker,ye="selectLeft"in ue?!ue.selectLeft:ue.inclusiveLeft,Ke="selectRight"in ue?!ue.selectRight:ue.inclusiveRight;if((le.from==null||(ye?le.from<=r.ch:le.from<r.ch))&&(le.to==null||(Ke?le.to>=r.ch:le.to>r.ch))){if(M&&(ze(ue,"beforeCursorEnter"),ue.explicitlyCleared))if(z.markedSpans){--ie;continue}else break;if(!ue.atomic)continue;if(R){var Ge=ue.find(L<0?1:-1),st=void 0;if((L<0?Ke:ye)&&(Ge=hs(e,Ge,-L,Ge&&Ge.line==r.line?z:null)),Ge&&Ge.line==r.line&&(st=Ct(Ge,R))&&(L<0?st<0:st>0))return wa(e,Ge,r,L,M)}var tt=ue.find(L<0?-1:1);return(L<0?ye:Ke)&&(tt=hs(e,tt,L,tt.line==r.line?z:null)),tt?wa(e,tt,r,L,M):null}}return r}function so(e,r,R,L,M){var z=L||1,ie=wa(e,r,R,z,M)||!M&&wa(e,r,R,z,!0)||wa(e,r,R,-z,M)||!M&&wa(e,r,R,-z,!0);return ie||(e.cantEdit=!0,rt(e.first,0))}function hs(e,r,R,L){return R<0&&r.ch==0?r.line>e.first?vt(e,rt(r.line-1)):null:R>0&&r.ch==(L||Q(e,r.line)).text.length?r.line<e.first+e.size-1?rt(r.line+1,0):null:new rt(r.line,r.ch+R)}function ps(e){e.setSelection(rt(e.firstLine(),0),rt(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,z,ie,le){M&&(L.from=vt(e,M)),z&&(L.to=vt(e,z)),ie&&(L.text=ie),le!==void 0&&(L.origin=le)}),ze(e,"beforeChange",e,L),e.cm&&ze(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 Vr(e.cm,Ta)(e,r,R);if(e.cm.state.suppressEdits)return}if((De(e,"beforeChange")||e.cm&&De(e.cm,"beforeChange"))&&(r=ms(e,r,!0),!r))return;var L=Ei&&!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]==""&&Ct(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,Br(e,r));var L=[];sa(e,function(M,z){!z&&K(L,M.history)==-1&&(_s(M.history,r),L.push(M.history)),Wa(M,r,null,Br(M,r))})}function lo(e,r,R){var L=e.cm&&e.cm.state.suppressEdits;if(L&&!R)return;for(var M=e.history,z,ie=e.sel,le=r=="undo"?M.done:M.undone,ue=r=="undo"?M.undone:M.done,ye=0;ye<le.length&&!(z=le[ye],R?z.ranges&&!z.equals(e.sel):!z.ranges);ye++);if(ye==le.length)return;for(M.lastOrigin=M.lastSelOrigin=null;;)if(z=le.pop(),z.ranges){if(io(z,ue),R&&!z.equals(e.sel)){ii(e,z,{clearRedo:!1});return}ie=z}else if(L){le.push(z);return}else break;var Ke=[];io(ie,ue),ue.push({changes:Ke,generation:M.generation}),M.generation=z.generation||++M.maxGeneration;for(var Ge=De(e,"beforeChange")||e.cm&&De(e.cm,"beforeChange"),st=function(At){var kt=z.changes[At];if(kt.origin=r,Ge&&!ms(e,kt,!1))return le.length=0,{};Ke.push(Oo(e,kt));var Ht=At?wo(e,kt):je(le);Wa(e,kt,Ht,os(e,kt)),!At&&e.cm&&e.cm.scrollIntoView({from:kt.from,to:oa(kt)});var $t=[];sa(e,function(zt,en){!en&&K($t,zt.history)==-1&&(_s(zt.history,kt),$t.push(zt.history)),Wa(zt,kt,null,os(zt,kt))})},tt=z.changes.length-1;tt>=0;--tt){var _t=st(tt);if(_t)return _t.v}}function gs(e,r){if(r==0)return;if(e.first+=r,e.sel=new Pi(Le(e.sel.ranges,function(M){return new sr(rt(M.anchor.line+r,M.anchor.ch),rt(M.head.line+r,M.head.ch))}),e.sel.primIndex),e.cm){Dr(e.cm,e.first,e.first-r,r);for(var R=e.cm.display,L=R.viewFrom;L<R.viewTo;L++)ri(e.cm,L,"gutter")}}function Wa(e,r,R,L){if(e.cm&&!e.cm.curOp)return Vr(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:rt(e.first,0),to:rt(r.to.line+M,r.to.ch),text:[je(r.text)],origin:r.origin}}var z=e.lastLine();r.to.line>z&&(r={from:r.from,to:rt(z,Q(e,z).text.length),text:[r.text[0]],origin:r.origin}),r.removed=ne(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,rt(e.firstLine(),0))&&(e.cantEdit=!1)}function El(e,r,R){var L=e.doc,M=e.display,z=r.from,ie=r.to,le=!1,ue=z.line;e.options.lineWrapping||(ue=He(Ir(Q(L,z.line))),L.iter(ue,ie.line+1,function(tt){if(tt==M.maxLine)return le=!0,!0})),L.sel.contains(r.from,r.to)>-1&&Me(e),Co(L,r,R,Bn(e)),e.options.lineWrapping||(L.iter(ue,z.line+r.text.length,function(tt){var _t=Fi(tt);_t>M.maxLineLength&&(M.maxLine=tt,M.maxLineLength=_t,M.maxLineChanged=!0,le=!1)}),le&&(e.curOp.updateMaxLine=!0)),fr(L,z.line),ja(e,400);var ye=r.text.length-(ie.line-z.line)-1;r.full?Dr(e):z.line==ie.line&&r.text.length==1&&!es(e.doc,r)?ri(e,z.line,"text"):Dr(e,z.line,ie.line+1,ye);var Ke=De(e,"changes"),Ge=De(e,"change");if(Ge||Ke){var st={from:z,to:ie,text:r.text,removed:r.removed,origin:r.origin};Ge&&Mt(e,"change",e,st),Ke&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(st)}e.display.selForContextMenu=null}function Ca(e,r,R,L,M){var z;L||(L=R),Ct(L,R)<0&&(z=[L,R],R=z[0],L=z[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 z=e[M],ie=!0;if(z.ranges){z.copied||(z=e[M]=z.deepCopy(),z.copied=!0);for(var le=0;le<z.ranges.length;le++)ys(z.ranges[le].anchor,r,R,L),ys(z.ranges[le].head,r,R,L);continue}for(var ue=0;ue<z.changes.length;++ue){var ye=z.changes[ue];if(R<ye.from.line)ye.from=rt(ye.from.line+L,ye.from.ch),ye.to=rt(ye.to.line+L,ye.to.ch);else if(r<=ye.to.line){ie=!1;break}}ie||(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,z=r;return typeof r=="number"?z=Q(e,Ut(e,r)):M=He(r),M==null?null:(L(z,M)&&e.cm&&ri(e.cm,M,R),z)}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,da(M),Mt(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 z=Math.min(r,M-e),ie=L.height;if(L.removeInner(e,z),this.height-=ie-L.height,M==z&&(this.children.splice(R--,1),L.parent=null),(r-=z)==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],z=M.chunkSize();if(e<=z){if(M.insertInner(e,r,R),M.lines&&M.lines.length>50){for(var ie=M.lines.length%25+25,le=ie;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,ie),this.maybeSpill()}break}e-=z}},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],z=M.chunkSize();if(e<z){var ie=Math.min(r,z-e);if(M.iterN(e,ie,R))return!0;if((r-=ie)==0)break;e=0}else e-=z}}};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=He(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 z=Mn(this);Se(R,Math.max(0,R.height-z)),e&&(Oi(e,function(){Es(e,R,-z),ri(e,L,"widget")}),Mt(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=Mn(this)-r;if(!M)return;hi(this.doc,L)||Se(L,L.height+M),R&&Oi(R,function(){R.curOp.forceUpdate=!0,Es(R,L,M),Mt(R,"lineWidgetChanged",R,e,He(L))})},Oe(Ga);function Es(e,r,R){Zr(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),z=e.cm;return z&&M.noHScroll&&(z.display.alignWidgets=!0),Ka(e,r,"widget",function(ie){var le=ie.widgets||(ie.widgets=[]);if(M.insertAt==null?le.push(M):le.splice(Math.min(le.length-1,Math.max(0,M.insertAt)),0,M),M.line=ie,z&&!hi(e,ie)){var ue=Zr(ie)<e.scrollTop;Se(ie,ie.height+Mn(M)),ue&&yo(z,M.height),z.curOp.forceUpdate=!0}return!0}),z&&Mt(z,"lineWidgetAdded",z,M,typeof r=="number"?r:He(r)),M}var xs=0,la=function(e,r){this.lines=[],this.type=r,this.doc=e,this.id=++xs};la.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,r=e&&!e.curOp;if(r&&va(e),De(this,"clear")){var R=this.find();R&&Mt(this,"clear",R.from,R.to)}for(var L=null,M=null,z=0;z<this.lines.length;++z){var ie=this.lines[z],le=Rr(ie.markedSpans,this);e&&!this.collapsed?ri(e,He(ie),"text"):e&&(le.to!=null&&(M=He(ie)),le.from!=null&&(L=He(ie))),ie.markedSpans=Gr(ie.markedSpans,le),le.from==null&&this.collapsed&&!hi(this.doc,ie)&&e&&Se(ie,pn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var ue=0;ue<this.lines.length;++ue){var ye=Ir(this.lines[ue]),Ke=Fi(ye);Ke>e.display.maxLineLength&&(e.display.maxLine=ye,e.display.maxLineLength=Ke,e.display.maxLineChanged=!0)}L!=null&&e&&this.collapsed&&Dr(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&&Mt(e,"markerCleared",e,this,L,M),r&&ga(e),this.parent&&this.parent.clear()},la.prototype.find=function(e,r){e==null&&this.type=="bookmark"&&(e=1);for(var R,L,M=0;M<this.lines.length;++M){var z=this.lines[M],ie=Rr(z.markedSpans,this);if(ie.from!=null&&(R=rt(r?z:He(z),ie.from),e==-1))return R;if(ie.to!=null&&(L=rt(r?z:He(z),ie.to),e==1))return L}return R&&{from:R,to:L}},la.prototype.changed=function(){var e=this,r=this.find(-1,!0),R=this,L=this.doc.cm;if(!r||!L)return;Oi(L,function(){var M=r.line,z=He(r.line),ie=or(L,z);if(ie&&(Yt(ie),L.curOp.selectionChanged=L.curOp.forceUpdate=!0),L.curOp.updateMaxLine=!0,!hi(R.doc,M)&&R.height!=null){var le=R.height;R.height=null;var ue=Mn(R)-le;ue&&Se(M,M.height+ue)}Mt(L,"markerChanged",L,e)})},la.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)},la.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(la);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 Vr(e.cm,Oa)(e,r,R,L,M);var z=new la(e,M),ie=Ct(r,R);if(L&&G(L,z,!1),ie>0||ie==0&&z.clearWhenEmpty!==!1)return z;if(z.replacedWith&&(z.collapsed=!0,z.widgetNode=A("span",[z.replacedWith],"CodeMirror-widget"),L.handleMouseEvents||z.widgetNode.setAttribute("cm-ignore-events","true"),L.insertLeft&&(z.widgetNode.insertLeft=!0)),z.collapsed){if(Vi(e,r.line,r,R,z)||r.line!=R.line&&Vi(e,R.line,r,R,z))throw new Error("Inserting collapsed marker partially overlapping an existing one");xr()}z.addToHistory&&is(e,{from:r,to:R,origin:"markText"},e.sel,NaN);var le=r.line,ue=e.cm,ye;if(e.iter(le,R.line+1,function(Ge){ue&&z.collapsed&&!ue.options.lineWrapping&&Ir(Ge)==ue.display.maxLine&&(ye=!0),z.collapsed&&le!=r.line&&Se(Ge,0),br(Ge,new zr(z,le==r.line?r.ch:null,le==R.line?R.ch:null)),++le}),z.collapsed&&e.iter(r.line,R.line+1,function(Ge){hi(e,Ge)&&Se(Ge,0)}),z.clearOnEnter&&Pe(z,"beforeCursorEnter",function(){return z.clear()}),z.readOnly&&(ur(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),z.collapsed&&(z.id=++xs,z.atomic=!0),ue){if(ye&&(ue.curOp.updateMaxLine=!0),z.collapsed)Dr(ue,r.line,R.line+1);else if(z.className||z.startStyle||z.endStyle||z.css||z.attributes||z.title)for(var Ke=r.line;Ke<=R.line;Ke++)ri(ue,Ke,"text");z.atomic&&ds(ue.doc),Mt(ue,"markerAdded",ue,z)}return z}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();Mt(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 z=[Oa(e,r,R,L,M)],ie=z[0],le=L.widgetNode;return sa(e,function(ue){le&&(L.widgetNode=le.cloneNode(!0)),z.push(Oa(ue,vt(ue,r),vt(ue,R),L,M));for(var ye=0;ye<ue.linked.length;++ye)if(ue.linked[ye].isParent)return;ie=je(z)}),new Va(z,ie)}function Ss(e){return e.findMarks(rt(e.first,0),e.clipPos(rt(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(),z=e.clipPos(M.from),ie=e.clipPos(M.to);if(Ct(z,ie)){var le=Oa(e,z,ie,L.primary,L.primary.type);L.markers.push(le),le.parent=L}}}function Tl(e){for(var r=function(L){var M=e[L],z=[M.primary.doc];sa(M.primary.doc,function(ue){return z.push(ue)});for(var ie=0;ie<M.markers.length;ie++){var le=M.markers[ie];K(z,le.doc)==-1&&(le.parent=null,M.markers.splice(ie--,1))}},R=0;R<e.length;R++)r(R)}var Cl=0,gi=function(e,r,R,L,M){if(!(this instanceof gi))return new gi(e,r,R,L,M);R==null&&(R=0),za.call(this,[new Ha([new ni("",null)])]),this.first=R,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=R;var z=rt(R,0);this.sel=aa(z),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:z,to:z,text:e}),ii(this,aa(z),oe)};gi.prototype=ge(za.prototype,{constructor:gi,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:Xr(function(e){var r=rt(this.first,0),R=this.first+this.size-1;Ta(this,{from:r,to:rt(R,Q(this,R).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&ka(this.cm,0,0),ii(this,aa(r),oe)}),replaceRange:function(e,r,R,L){r=vt(this,r),R=R?vt(this,R):r,Ca(this,e,r,R,L)},getRange:function(e,r,R){var L=ne(this,vt(this,e),vt(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(Tt(this,e))return Q(this,e)},getLineNumber:function(e){return He(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=Q(this,e)),Ir(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return vt(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:Xr(function(e,r,R){ls(this,vt(this,typeof e=="number"?rt(e,r||0):e),null,R)}),setSelection:Xr(function(e,r,R){ls(this,vt(this,e),vt(this,r||e),R)}),extendSelection:Xr(function(e,r,R){ao(this,vt(this,e),r&&vt(this,r),R)}),extendSelections:Xr(function(e,r){ss(this,xn(this,e),r)}),extendSelectionsBy:Xr(function(e,r){var R=Le(this.sel.ranges,e);ss(this,xn(this,R),r)}),setSelections:Xr(function(e,r,R){if(!e.length)return;for(var L=[],M=0;M<e.length;M++)L[M]=new sr(vt(this,e[M].anchor),vt(this,e[M].head));r==null&&(r=Math.min(e.length-1,this.sel.primIndex)),ii(this,Hi(this.cm,L,r),R)}),addSelection:Xr(function(e,r,R){var L=this.sel.ranges.slice(0);L.push(new sr(vt(this,e),vt(this,r||e))),ii(this,Hi(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=ne(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=ne(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:Xr(function(e,r,R){for(var L=[],M=this.sel,z=0;z<M.ranges.length;z++){var ie=M.ranges[z];L[z]={from:ie.from(),to:ie.to(),text:this.splitLines(e[z]),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:Xr(function(){lo(this,"undo")}),redo:Xr(function(){lo(this,"redo")}),undoSelection:Xr(function(){lo(this,"undo",!0)}),redoSelection:Xr(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),sa(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:Xr(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:Xr(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(!Tt(this,e))return null;if(r=e,e=Q(this,e),!e)return null}else if(r=He(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:Xr(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:Xr(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",z=L[M];if(z)if(R==null)L[M]=null;else{var ie=z.match(m(R));if(!ie)return!1;var le=ie.index+ie[0].length;L[M]=z.slice(0,ie.index)+(!ie.index||le==z.length?"":" ")+z.slice(le)||null}else return!1;return!0})}),addLineWidget:Xr(function(e,r,R){return xl(this,e,r,R)}),removeLineWidget:function(e){e.clear()},markText:function(e,r,R){return Oa(this,vt(this,e),vt(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=vt(this,e),Oa(this,e,e,R,"bookmark")},findMarksAt:function(e){e=vt(this,e);var r=[],R=Q(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=vt(this,e),r=vt(this,r);var L=[],M=e.line;return this.iter(e.line,r.line+1,function(z){var ie=z.markedSpans;if(ie)for(var le=0;le<ie.length;le++){var ue=ie[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 z=M.text.length+L;if(z>e)return r=e,!0;e-=z,++R}),vt(this,rt(R,r))},indexFromPos:function(e){e=vt(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 gi(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 gi(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 wr&&(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];sa(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){sa(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):nt(e)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:Xr(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)})}),gi.prototype.eachLine=gi.prototype.iter;var ws=0;function Ol(e){var r=this;if(Ts(r),We(r,e)||nr(r.display,e))return;pe(e),C&&(ws=+new Date);var R=si(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,z=Array(M),ie=0,le=function(){++ie==M&&Vr(r,function(){R=vt(r.doc,R);var tt={from:R,to:R,text:r.doc.splitLines(z.filter(function(_t){return _t!=null}).join(r.doc.lineSeparator())),origin:"paste"};Ta(r.doc,tt),us(r.doc,aa(vt(r.doc,R),vt(r.doc,oa(tt))))})()},ue=function(tt,_t){if(r.options.allowDropFileTypes&&K(r.options.allowDropFileTypes,tt.type)==-1){le();return}var At=new FileReader;At.onerror=function(){return le()},At.onload=function(){var kt=At.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(kt)){le();return}z[_t]=kt,le()},At.readAsText(tt)},ye=0;ye<L.length;ye++)ue(L[ye],ye);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 Ke=e.dataTransfer.getData("Text");if(Ke){var Ge;if(r.state.draggingText&&!r.state.draggingText.copy&&(Ge=r.listSelections()),oo(r.doc,aa(R,R)),Ge)for(var st=0;st<Ge.length;++st)Ca(r.doc,"",Ge[st].anchor,Ge[st].head,"drag");r.replaceSelection(Ke,"around","paste"),r.display.input.focus()}}catch(tt){}}}function Al(e,r){if(C&&(!e.state.draggingText||+new Date-ws<100)){we(r);return}if(We(e,r)||nr(e.display,r))return;if(r.dataTransfer.setData("Text",e.getSelection()),r.dataTransfer.effectAllowed="copyMove",r.dataTransfer.setDragImage&&!a){var R=T("img",null,null,"position: fixed; left: 0; top: 0;");R.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",o&&(R.width=R.height=1,e.display.wrapper.appendChild(R),R._top=R.offsetTop),r.dataTransfer.setDragImage(R,0,0),o&&R.parentNode.removeChild(R)}}function Ll(e,r){var R=si(e,r);if(!R)return;var L=document.createDocumentFragment();cr(e,R,L),e.display.dragCursor||(e.display.dragCursor=T("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),l(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 z=0;z<R.length;z++)e(R[z])})}var Os=!1;function Rl(){if(Os)return;Dl(),Os=!0}function Dl(){var e;Pe(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Cs(Pl)},100))}),Pe(window,"blur",function(){return Cs(vi)})}function Pl(e){var r=e.display;r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.scrollbarsClipped=!1,e.setSize()}for(var ua={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++)ua[Xa+48]=ua[Xa+96]=String(Xa);for(var uo=65;uo<=90;uo++)ua[uo]=String.fromCharCode(uo);for(var Ya=1;Ya<=12;Ya++)ua[Ya+111]=ua[Ya+63235]="F"+Ya;var qi={};qi.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"},qi.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"},qi.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"},qi.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"]},qi.default=n?qi.macDefault:qi.pcDefault;function Ml(e){var r=e.split(/-(?!$)/);e=r[r.length-1];for(var R,L,M,z,ie=0;ie<r.length-1;ie++){var le=r[ie];if(/^(cmd|meta|m)$/i.test(le))z=!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),z&&(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=Le(R.split(" "),Ml),z=0;z<M.length;z++){var ie=void 0,le=void 0;z==M.length-1?(le=M.join(" "),ie=L):(le=M.slice(0,z+1).join(" "),ie="...");var ue=r[le];if(!ue)r[le]=ie;else if(ue!=ie)throw new Error("Inconsistent bindings for "+le)}delete e[R]}for(var ye in r)e[ye]=r[ye];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 z=0;z<r.fallthrough.length;z++){var ie=Aa(e,r.fallthrough[z],R,L);if(ie)return ie}}}function As(e){var r=typeof e=="string"?e:ua[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(o&&e.keyCode==34&&e.char)return!1;var R=ua[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"?qi[e]:e}function La(e,r){for(var R=e.doc.sel.ranges,L=[],M=0;M<R.length;M++){for(var z=r(R[M]);L.length&&Ct(z.from,je(L).to)<=0;){var ie=L.pop();if(Ct(ie.from,z.from)<0){z.from=ie.from;break}}L.push(z)}Oi(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 rt(r.line,L,R<0?"after":"before")}function Po(e,r,R,L,M){if(e){r.doc.direction=="rtl"&&(M=-M);var z=at(R,r.doc.direction);if(z){var ie=M<0?je(z):z[0],le=M<0==(ie.level==1),ue=le?"after":"before",ye;if(ie.level>0||r.doc.direction=="rtl"){var Ke=Qn(r,R);ye=M<0?R.text.length-1:0;var Ge=Tn(r,Ke,ye).top;ye=J(function(st){return Tn(r,Ke,st).top==Ge},M<0==(ie.level==1)?ie.from:ie.to-1,ye),ue=="before"&&(ye=Ro(R,ye,1))}else ye=M<0?ie.to:ie.from;return new rt(L,ye,ue)}}return new rt(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 z=me(M,R.ch,R.sticky),ie=M[z];if(e.doc.direction=="ltr"&&ie.level%2==0&&(L>0?ie.to>R.ch:ie.from<R.ch))return Do(r,R,L);var le=function(Ht,$t){return Ro(r,Ht instanceof rt?Ht.ch:Ht,$t)},ue,ye=function(Ht){return e.options.lineWrapping?(ue=ue||Qn(e,r),Ri(e,r,ue,Ht)):{begin:0,end:r.text.length}},Ke=ye(R.sticky=="before"?le(R,-1):R.ch);if(e.doc.direction=="rtl"||ie.level==1){var Ge=ie.level==1==L<0,st=le(R,Ge?1:-1);if(st!=null&&(Ge?st<=ie.to&&st<=Ke.end:st>=ie.from&&st>=Ke.begin)){var tt=Ge?"before":"after";return new rt(R.line,st,tt)}}var _t=function(Ht,$t,zt){for(var en=function(gr,Yr){return Yr?new rt(R.line,le(gr,1),"before"):new rt(R.line,gr,"after")};Ht>=0&&Ht<M.length;Ht+=$t){var yn=M[Ht],dn=$t>0==(yn.level!=1),zn=dn?zt.begin:le(zt.end,-1);if(yn.from<=zn&&zn<yn.to)return en(zn,dn);if(zn=dn?yn.from:le(yn.to,-1),zt.begin<=zn&&zn<zt.end)return en(zn,dn)}},At=_t(z+L,L,Ke);if(At)return At;var kt=L>0?Ke.end:le(Ke.begin,-1);return kt!=null&&!(L>0&&kt==r.text.length)&&(At=_t(L>0?0:M.length-1,L,ye(kt)),At)?At: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=Q(e.doc,r.head.line).text.length;return r.head.ch==R&&r.head.line<e.lastLine()?{from:r.head,to:rt(r.head.line+1,0)}:{from:r.head,to:rt(r.head.line,R)}}else return{from:r.from(),to:r.to()}})},deleteLine:function(e){return La(e,function(r){return{from:rt(r.from().line,0),to:vt(e.doc,rt(r.to().line+1,0))}})},delLineLeft:function(e){return La(e,function(r){return{from:rt(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(rt(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(rt(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")},he)},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")},he)},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},he)},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 z=R[M].from(),ie=X(e.getLine(z.line),z.ch,L);r.push(xe(L-ie%L))}e.replaceSelections(r)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Oi(e,function(){for(var r=e.listSelections(),R=[],L=0;L<r.length;L++){if(!r[L].empty())continue;var M=r[L].head,z=Q(e.doc,M.line).text;if(z){if(M.ch==z.length&&(M=new rt(M.line,M.ch-1)),M.ch>0)M=new rt(M.line,M.ch+1),e.replaceRange(z.charAt(M.ch-1)+z.charAt(M.ch-2),rt(M.line,M.ch-2),M,"+transpose");else if(M.line>e.doc.first){var ie=Q(e.doc,M.line-1).text;ie&&(M=new rt(M.line,1),e.replaceRange(z.charAt(0)+e.doc.lineSeparator()+ie.charAt(ie.length-1),rt(M.line-1,ie.length-1),M,"+transpose"))}}R.push(new sr(M,M))}e.setSelections(R)})},newlineAndIndent:function(e){return Oi(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=Q(e.doc,r),L=Ir(R);return L!=R&&(r=He(L)),Po(!0,e,L,r,1)}function Nl(e,r){var R=Q(e.doc,r),L=wi(R);return L!=R&&(r=He(L)),Po(!0,e,R,r,-1)}function Ps(e,r){var R=Ds(e,r.line),L=Q(e.doc,R.line),M=at(L,e.doc.direction);if(!M||M[0].level==0){var z=Math.max(R.ch,L.text.search(/\S/)),ie=r.line==R.line&&r.ch<=z&&r.ch;return rt(R.line,ie?0:z,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)!=ae}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"&&Mt(e,"keyHandled",e,r,R),(M=="handled"||M=="multi")&&(pe(R),ta(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(),We(r,e))return;C&&w<11&&e.keyCode==27&&(e.returnValue=!1);var R=e.keyCode;r.display.shift=R==16||e.shiftKey;var L=ks(r,e);o&&(Mo=L?R:null,!L&&R==88&&!Je&&(n?e.metaKey:e.ctrlKey)&&r.replaceSelection("",null,"cut")),U&&!n&&!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;j(r,"CodeMirror-crosshair");function R(L){(L.keyCode==18||!L.altKey)&&(g(r,"CodeMirror-crosshair"),Ze(document,"keyup",R),Ze(document,"mouseover",R))}Pe(document,"keyup",R),Pe(document,"mouseover",R)}function Ns(e){e.keyCode==16&&(this.doc.sel.shift=!1),We(this,e)}function Us(e){var r=this;if(e.target&&e.target!=r.display.input.getField())return;if(nr(r.display,e)||We(r,e)||e.ctrlKey&&!e.altKey||n&&e.metaKey)return;var R=e.keyCode,L=e.charCode;if(o&&R==Mo){Mo=null,pe(e);return}if(o&&(!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&&Ct(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(We(r,e)||R.activeTouch&&R.input.supportsTouch())return;if(R.input.ensurePolled(),R.shift=e.shiftKey,nr(R,e)){u||(R.scroller.draggable=!1,setTimeout(function(){return R.scroller.draggable=!0},100));return}if(Io(r,e))return;var L=si(r,e),M=it(e),z=L?Kl(L,M):"single";if(window.focus(),M==1&&r.state.selectingText&&r.state.selectingText(e),L&&Hl(r,M,L,z,e))return;M==1?L?Gl(r,L,z,e):$e(e)==R.scroller&&pe(e):M==2?(L&&ao(r.doc,L),setTimeout(function(){return R.input.focus()},20)):M==3&&(_?r.display.input.onContextMenu(e):na(r))}function Hl(e,r,R,L,M){var z="Click";return L=="double"?z="Double"+z:L=="triple"&&(z="Triple"+z),z=(r==1?"Left":r==2?"Middle":"Right")+z,Ja(e,Ls(z,M),M,function(ie){if(typeof ie=="string"&&(ie=$a[ie]),!ie)return!1;var le=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),le=ie(e,R)!=ae}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 z=h?R.shiftKey&&R.metaKey:R.altKey;M.unit=z?"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=n?R.metaKey:R.ctrlKey),M.moveOnDrag==null&&(M.moveOnDrag=!(n?R.altKey:R.ctrlKey)),M}function Gl(e,r,R,L){C?setTimeout(F(sn,e),0):e.curOp.focus=I();var M=zl(e,R,L),z=e.doc.sel,ie;e.options.dragDrop&&dt&&!e.isReadOnly()&&R=="single"&&(ie=z.contains(r))>-1&&(Ct((ie=z.ranges[ie]).from(),r)<0||r.xRel>0)&&(Ct(ie.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,z=!1,ie=Vr(e,function(ye){u&&(M.scroller.draggable=!1),e.state.draggingText=!1,Ze(M.wrapper.ownerDocument,"mouseup",ie),Ze(M.wrapper.ownerDocument,"mousemove",le),Ze(M.scroller,"dragstart",ue),Ze(M.scroller,"drop",ie),z||(pe(ye),L.addNew||ao(e.doc,R,null,null,L.extend),u&&!a||C&&w==9?setTimeout(function(){M.wrapper.ownerDocument.body.focus({preventScroll:!0}),M.input.focus()},20):M.input.focus())}),le=function(ye){z=z||Math.abs(r.clientX-ye.clientX)+Math.abs(r.clientY-ye.clientY)>=10},ue=function(){return z=!0};u&&(M.scroller.draggable=!0),e.state.draggingText=ie,ie.copy=!L.moveOnDrag,M.scroller.dragDrop&&M.scroller.dragDrop(),Pe(M.wrapper.ownerDocument,"mouseup",ie),Pe(M.wrapper.ownerDocument,"mousemove",le),Pe(M.scroller,"dragstart",ue),Pe(M.scroller,"drop",ie),na(e),setTimeout(function(){return M.input.focus()},20)}function Fs(e,r,R){if(R=="char")return new sr(r,r);if(R=="word")return e.findWordAt(r);if(R=="line")return new sr(rt(r.line,0),vt(e.doc,rt(r.line+1,0)));var L=R(e,r);return new sr(L.from,L.to)}function Xl(e,r,R,L){var M=e.display,z=e.doc;pe(r);var ie,le,ue=z.sel,ye=ue.ranges;if(L.addNew&&!L.extend?(le=z.sel.contains(R),le>-1?ie=ye[le]:ie=new sr(R,R)):(ie=z.sel.primary(),le=z.sel.primIndex),L.unit=="rectangle")L.addNew||(ie=new sr(R,R)),R=si(e,r,!0,!0),le=-1;else{var Ke=Fs(e,R,L.unit);L.extend?ie=Ao(ie,Ke.anchor,Ke.head,L.extend):ie=Ke}L.addNew?le==-1?(le=ye.length,ii(z,Hi(e,ye.concat([ie]),le),{scroll:!1,origin:"*mouse"})):ye.length>1&&ye[le].empty()&&L.unit=="char"&&!L.extend?(ii(z,Hi(e,ye.slice(0,le).concat(ye.slice(le+1)),0),{scroll:!1,origin:"*mouse"}),ue=z.sel):Lo(z,le,ie,ve):(le=0,ii(z,new Pi([ie],0),ve),ue=z.sel);var Ge=R;function st(zt){if(Ct(Ge,zt)==0)return;if(Ge=zt,L.unit=="rectangle"){for(var en=[],yn=e.options.tabSize,dn=X(Q(z,R.line).text,R.ch,yn),zn=X(Q(z,zt.line).text,zt.ch,yn),gr=Math.min(dn,zn),Yr=Math.max(dn,zn),Tr=Math.min(R.line,zt.line),Ai=Math.min(e.lastLine(),Math.max(R.line,zt.line));Tr<=Ai;Tr++){var yi=Q(z,Tr).text,jr=_e(yi,gr,yn);gr==Yr?en.push(new sr(rt(Tr,jr),rt(Tr,jr))):yi.length>jr&&en.push(new sr(rt(Tr,jr),rt(Tr,_e(yi,Yr,yn))))}en.length||en.push(new sr(R,R)),ii(z,Hi(e,ue.ranges.slice(0,le).concat(en),le),{origin:"*mouse",scroll:!1}),e.scrollIntoView(zt)}else{var bi=ie,ti=Fs(e,zt,L.unit),Hr=bi.anchor,Fr;Ct(ti.anchor,Hr)>0?(Fr=ti.head,Hr=Qt(bi.from(),ti.anchor)):(Fr=ti.anchor,Hr=nn(bi.to(),ti.head));var Lr=ue.ranges.slice(0);Lr[le]=Yl(e,new sr(vt(z,Hr),Fr)),ii(z,Hi(e,Lr,le),ve)}}var tt=M.wrapper.getBoundingClientRect(),_t=0;function At(zt){var en=++_t,yn=si(e,zt,!0,L.unit=="rectangle");if(!yn)return;if(Ct(yn,Ge)!=0){e.curOp.focus=I(),st(yn);var dn=Ki(M,z);(yn.line>=dn.to||yn.line<dn.from)&&setTimeout(Vr(e,function(){_t==en&&At(zt)}),150)}else{var zn=zt.clientY<tt.top?-20:zt.clientY>tt.bottom?20:0;zn&&setTimeout(Vr(e,function(){if(_t!=en)return;M.scroller.scrollTop+=zn,At(zt)}),50)}}function kt(zt){e.state.selectingText=!1,_t=Infinity,zt&&(pe(zt),M.input.focus()),Ze(M.wrapper.ownerDocument,"mousemove",Ht),Ze(M.wrapper.ownerDocument,"mouseup",$t),z.history.lastSelOrigin=null}var Ht=Vr(e,function(zt){zt.buttons===0||!it(zt)?kt(zt):At(zt)}),$t=Vr(e,kt);e.state.selectingText=$t,Pe(M.wrapper.ownerDocument,"mousemove",Ht),Pe(M.wrapper.ownerDocument,"mouseup",$t)}function Yl(e,r){var R=r.anchor,L=r.head,M=Q(e.doc,R.line);if(Ct(R,L)==0&&R.sticky==L.sticky)return r;var z=at(M);if(!z)return r;var ie=me(z,R.ch,R.sticky),le=z[ie];if(le.from!=R.ch&&le.to!=R.ch)return r;var ue=ie+(le.from==R.ch==(le.level!=1)?0:1);if(ue==0||ue==z.length)return r;var ye;if(L.line!=R.line)ye=(L.line-R.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var Ke=me(z,L.ch,L.sticky),Ge=Ke-ie||(L.ch-R.ch)*(le.level==1?-1:1);Ke==ue-1||Ke==ue?ye=Ge<0:ye=Ge>0}var st=z[ue+(ye?-1:0)],tt=ye==(st.level==1),_t=tt?st.from:st.to,At=tt?"after":"before";return R.ch==_t&&R.sticky==At?r:new sr(new rt(R.line,_t,At),L)}function Bs(e,r,R,L){var M,z;if(r.touches)M=r.touches[0].clientX,z=r.touches[0].clientY;else try{M=r.clientX,z=r.clientY}catch(st){return!1}if(M>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;L&&pe(r);var ie=e.display,le=ie.lineDiv.getBoundingClientRect();if(z>le.bottom||!De(e,R))return Ce(r);z-=le.top-ie.viewOffset;for(var ue=0;ue<e.display.gutterSpecs.length;++ue){var ye=ie.gutters.childNodes[ue];if(ye&&ye.getBoundingClientRect().right>=M){var Ke=qe(e.doc,z),Ge=e.display.gutterSpecs[ue];return ze(e,R,e,Ke,Ge.className,r),Ce(r)}}}function Io(e,r){return Bs(e,r,"gutterClick",!0)}function Ws(e,r){if(nr(e.display,r)||$l(e,r))return;if(We(e,r,"contextmenu"))return;_||e.display.input.onContextMenu(r)}function $l(e,r){return De(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,z,ie){e.defaults[L]=M,z&&(r[L]=ie?function(le,ue,ye){ye!=Ra&&z(le,ue,ye)}:z)}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),Dr(L)},!0),R("lineSeparator",null,function(L,M){if(L.doc.lineSep=M,!M)return;var z=[],ie=L.doc.first;L.doc.iter(function(ue){for(var ye=0;;){var Ke=ue.text.indexOf(M,ye);if(Ke==-1)break;ye=Ke+M.length,z.push(rt(ie,Ke))}ie++});for(var le=z.length-1;le>=0;le--)Ca(L.doc,M,z[le],rt(z[le].line,z[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,z){L.state.specialChars=new RegExp(M.source+(M.test(" ")?"":"| "),"g"),z!=Ra&&L.refresh()}),R("specialCharPlaceholder",tn,function(L){return L.refresh()},!0),R("electricChars",!0),R("inputStyle",t?"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,z){var ie=co(M),le=z!=Ra&&co(z);le&&le.detach&&le.detach(L,ie),ie.attach&&ie.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?Or(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,Vt,!0),R("resetSelectionOnContextMenu",!0),R("lineWiseCopyCut",!0),R("pasteLinesPerSelection",!0),R("selectionsMayTouch",!1),R("readOnly",!1,function(L,M){M=="nocursor"&&(vi(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,Vt,!0),R("singleCursorHeightPerLine",!0,Vt,!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,z=r?Pe:Ze;z(e.display.scroller,"dragstart",M.start),z(e.display.scroller,"dragenter",M.enter),z(e.display.scroller,"dragover",M.over),z(e.display.scroller,"dragleave",M.leave),z(e.display.scroller,"drop",M.drop)}}function ql(e){e.options.lineWrapping?(j(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(g(e.display.wrapper,"CodeMirror-wrap"),pi(e)),mi(e),Dr(e),qt(e),setTimeout(function(){return xa(e)},100)}function wr(e,r){var R=this;if(!(this instanceof wr))return new wr(e,r);this.options=r=r?G(r):{},G(Hs,r,!1);var L=r.value;typeof L=="string"?L=new gi(L,r.mode,null,r.lineSeparator,r.direction):r.mode&&(L.modeOption=r.mode),this.doc=L;var M=new wr.inputStyles[r.inputStyle](this),z=this.display=new dl(e,L,M,r);z.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&&!t&&z.input.focus(),C&&w<11&&setTimeout(function(){return R.display.input.reset(!0)},20),Zl(this),Rl(),va(this),this.curOp.forceUpdate=!0,ts(this,L),r.autofocus&&!t||this.hasFocus()?setTimeout(function(){R.hasFocus()&&!R.state.focused&&ha(R)},20):vi(this);for(var ie in ho)ho.hasOwnProperty(ie)&&ho[ie](this,r[ie],Ra);Yo(this),r.finishInit&&r.finishInit(this);for(var le=0;le<No.length;++le)No[le](this);ga(this),u&&r.lineWrapping&&getComputedStyle(z.lineDiv).textRendering=="optimizelegibility"&&(z.lineDiv.style.textRendering="auto")}wr.defaults=Hs,wr.optionHandlers=ho;function Zl(e){var r=e.display;Pe(r.scroller,"mousedown",Vr(e,js)),C&&w<11?Pe(r.scroller,"dblclick",Vr(e,function(ue){if(We(e,ue))return;var ye=si(e,ue);if(!ye||Io(e,ue)||nr(e.display,ue))return;pe(ue);var Ke=e.findWordAt(ye);ao(e.doc,Ke.anchor,Ke.head)})):Pe(r.scroller,"dblclick",function(ue){return We(e,ue)||pe(ue)}),Pe(r.scroller,"contextmenu",function(ue){return Ws(e,ue)}),Pe(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 z(ue){if(ue.touches.length!=1)return!1;var ye=ue.touches[0];return ye.radiusX<=1&&ye.radiusY<=1}function ie(ue,ye){if(ye.left==null)return!0;var Ke=ye.left-ue.left,Ge=ye.top-ue.top;return Ke*Ke+Ge*Ge>20*20}Pe(r.scroller,"touchstart",function(ue){if(!We(e,ue)&&!z(ue)&&!Io(e,ue)){r.input.ensurePolled(),clearTimeout(R);var ye=+new Date;r.activeTouch={start:ye,moved:!1,prev:ye-L.end<=300?L:null},ue.touches.length==1&&(r.activeTouch.left=ue.touches[0].pageX,r.activeTouch.top=ue.touches[0].pageY)}}),Pe(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),Pe(r.scroller,"touchend",function(ue){var ye=r.activeTouch;if(ye&&!nr(r,ue)&&ye.left!=null&&!ye.moved&&new Date-ye.start<300){var Ke=e.coordsChar(r.activeTouch,"page"),Ge;!ye.prev||ie(ye,ye.prev)?Ge=new sr(Ke,Ke):!ye.prev.prev||ie(ye,ye.prev.prev)?Ge=e.findWordAt(Ke):Ge=new sr(rt(Ke.line,0),vt(e.doc,rt(Ke.line+1,0))),e.setSelection(Ge.anchor,Ge.head),e.focus(),pe(ue)}M()}),Pe(r.scroller,"touchcancel",M),Pe(r.scroller,"scroll",function(){r.scroller.clientHeight&&(Ia(e,r.scroller.scrollTop),pa(e,r.scroller.scrollLeft,!0),ze(e,"scroll",e))}),Pe(r.scroller,"mousewheel",function(ue){return Qo(e,ue)}),Pe(r.scroller,"DOMMouseScroll",function(ue){return Qo(e,ue)}),Pe(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(ue){We(e,ue)||we(ue)},over:function(ue){We(e,ue)||(Ll(e,ue),we(ue))},start:function(ue){return Al(e,ue)},drop:Vr(e,Ol),leave:function(ue){We(e,ue)||Ts(e)}};var le=r.input.getField();Pe(le,"keyup",function(ue){return Ns.call(e,ue)}),Pe(le,"keydown",Vr(e,Is)),Pe(le,"keypress",Vr(e,Us)),Pe(le,"focus",function(ue){return ha(e,ue)}),Pe(le,"blur",function(ue){return vi(e,ue)})}var No=[];wr.defineInitHook=function(e){return No.push(e)};function Za(e,r,R,L){var M=e.doc,z;R==null&&(R="add"),R=="smart"&&(M.mode.indent?z=gt(e,r).state:R="prev");var ie=e.options.tabSize,le=Q(M,r),ue=X(le.text,null,ie);le.stateAfter&&(le.stateAfter=null);var ye=le.text.match(/^\s*/)[0],Ke;if(!L&&!/\S/.test(le.text))Ke=0,R="not";else if(R=="smart"&&(Ke=M.mode.indent(z,le.text.slice(ye.length),le.text),Ke==ae||Ke>150)){if(!L)return;R="prev"}R=="prev"?r>M.first?Ke=X(Q(M,r-1).text,null,ie):Ke=0:R=="add"?Ke=ue+e.options.indentUnit:R=="subtract"?Ke=ue-e.options.indentUnit:typeof R=="number"&&(Ke=ue+R),Ke=Math.max(0,Ke);var Ge="",st=0;if(e.options.indentWithTabs)for(var tt=Math.floor(Ke/ie);tt;--tt)st+=ie,Ge+=" ";if(st<Ke&&(Ge+=xe(Ke-st)),Ge!=ye)return Ca(M,Ge,rt(r,0),rt(r,ye.length),"+input"),le.stateAfter=null,!0;for(var _t=0;_t<M.sel.ranges.length;_t++){var At=M.sel.ranges[_t];if(At.head.line==r&&At.head.ch<ye.length){var kt=rt(r,ye.length);Lo(M,_t,new sr(kt,kt));break}}}var zi=null;function po(e){zi=e}function Uo(e,r,R,L,M){var z=e.doc;e.display.shift=!1,L||(L=z.sel);var ie=+new Date-200,le=M=="paste"||e.state.pasteIncoming>ie,ue=nt(r),ye=null;if(le&&L.ranges.length>1)if(zi&&zi.text.join(`
|
|
|
`)==r){if(L.ranges.length%zi.text.length==0){ye=[];for(var Ke=0;Ke<zi.text.length;Ke++)ye.push(z.splitLines(zi.text[Ke]))}}else ue.length==L.ranges.length&&e.options.pasteLinesPerSelection&&(ye=Le(ue,function(Ht){return[Ht]}));for(var Ge=e.curOp.updateInput,st=L.ranges.length-1;st>=0;st--){var tt=L.ranges[st],_t=tt.from(),At=tt.to();tt.empty()&&(R&&R>0?_t=rt(_t.line,_t.ch-R):e.state.overwrite&&!le?At=rt(At.line,Math.min(Q(z,At.line).text.length,At.ch+je(ue).length)):le&&zi&&zi.lineWise&&zi.text.join(`
|
|
|
`)==ue.join(`
|
|
|
`)&&(_t=At=rt(_t.line,0)));var kt={from:_t,to:At,text:ye?ye[st%ye.length]:ue,origin:M||(le?"paste":e.state.cutIncoming>ie?"cut":"+input")};Ta(e.doc,kt),Mt(e,"inputRead",e,kt)}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&&Oi(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 z=e.getModeAt(M.head),ie=!1;if(z.electricChars){for(var le=0;le<z.electricChars.length;le++)if(r.indexOf(z.electricChars.charAt(le))>-1){ie=Za(e,M.head.line,"smart");break}}else z.electricInput&&(z.electricInput.test(Q(e.doc,M.head.line).text.slice(0,M.head.ch))&&(ie=Za(e,M.head.line,"smart")));ie&&Mt(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,z={anchor:rt(M,0),head:rt(M+1,0)};R.push(z),r.push(e.getRange(z.anchor,z.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=T("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),r=T("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return u?e.style.width="1000px":e.setAttribute("wrap","off"),d&&(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 z=this.options,ie=z[L];if(z[L]==M&&L!="mode")return;z[L]=M,r.hasOwnProperty(L)&&Vr(this,r[L])(this,M,ie),ze(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,z=0;z<M.length;++z)if(M[z]==L||M[z].name==L)return M.splice(z,1),!0},addOverlay:li(function(L,M){var z=L.token?L:e.getMode(this.options,L);if(z.startState)throw new Error("Overlays may not be stateful.");ke(this.state.overlays,{mode:z,modeSpec:L,opaque:M&&M.opaque,priority:M&&M.priority||0},function(ie){return ie.priority}),this.state.modeGen++,Dr(this)}),removeOverlay:li(function(L){for(var M=this.state.overlays,z=0;z<M.length;++z){var ie=M[z].modeSpec;if(ie==L||typeof L=="string"&&ie.name==L){M.splice(z,1),this.state.modeGen++,Dr(this);return}}}),indentLine:li(function(L,M,z){typeof M!="string"&&typeof M!="number"&&(M==null?M=this.options.smartIndent?"smart":"prev":M=M?"add":"subtract"),Tt(this.doc,L)&&Za(this,L,M,z)}),indentSelection:li(function(L){for(var M=this.doc.sel.ranges,z=-1,ie=0;ie<M.length;ie++){var le=M[ie];if(le.empty())le.head.line>z&&(Za(this,le.head.line,L,!0),z=le.head.line,ie==this.doc.sel.primIndex&&Ea(this));else{var ue=le.from(),ye=le.to(),Ke=Math.max(z,ue.line);z=Math.min(this.lastLine(),ye.line-(ye.ch?0:1))+1;for(var Ge=Ke;Ge<z;++Ge)Za(this,Ge,L);var st=this.doc.sel.ranges;ue.ch==0&&M.length==st.length&&st[ie].from().ch>0&&Lo(this.doc,ie,new sr(ue,st[ie].to()),oe)}}}),getTokenAt:function(L,M){return _r(this,L,M)},getLineTokens:function(L,M){return _r(this,rt(L),M,!0)},getTokenTypeAt:function(L){L=vt(this.doc,L);var M=ir(this,Q(this.doc,L.line)),z=0,ie=(M.length-1)/2,le=L.ch,ue;if(le==0)ue=M[2];else for(;;){var ye=z+ie>>1;if((ye?M[ye*2-1]:0)>=le)ie=ye;else if(M[ye*2+1]<le)z=ye+1;else{ue=M[ye*2+2];break}}var Ke=ue?ue.indexOf("overlay "):-1;return Ke<0?ue:Ke==0?null:ue.slice(0,Ke-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 z=[];if(!R.hasOwnProperty(M))return z;var ie=R[M],le=this.getModeAt(L);if(typeof le[M]=="string")ie[le[M]]&&z.push(ie[le[M]]);else if(le[M])for(var ue=0;ue<le[M].length;ue++){var ye=ie[le[M][ue]];ye&&z.push(ye)}else le.helperType&&ie[le.helperType]?z.push(ie[le.helperType]):ie[le.name]&&z.push(ie[le.name]);for(var Ke=0;Ke<ie._global.length;Ke++){var Ge=ie._global[Ke];Ge.pred(le,this)&&K(z,Ge.val)==-1&&z.push(Ge.val)}return z},getStateAfter:function(L,M){var z=this.doc;return L=Ut(z,L==null?z.first+z.size-1:L),gt(this,L+1,M).state},cursorCoords:function(L,M){var z,ie=this.doc.sel.primary();return L==null?z=ie.head:typeof L=="object"?z=vt(this.doc,L):z=L?ie.from():ie.to(),Yn(this,z,M||"page")},charCoords:function(L,M){return Xn(this,vt(this.doc,L),M||"page")},coordsChar:function(L,M){return L=rr(this,L,M||"page"),Ci(this,L.left,L.top)},lineAtHeight:function(L,M){return L=rr(this,{top:L,left:0},M||"page").top,qe(this.doc,L+this.display.viewOffset)},heightAtLine:function(L,M,z){var ie=!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,ie=!0),le=Q(this.doc,L)}else le=L;return vn(this,le,{top:0,left:0},M||"page",z||ie).top+(ie?this.doc.height-Zr(le):0)},defaultTextHeight:function(){return pn(this.display)},defaultCharWidth:function(){return Nn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(L,M,z,ie,le){var ue=this.display;L=Yn(this,vt(this.doc,L));var ye=L.bottom,Ke=L.left;if(M.style.position="absolute",M.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(M),ue.sizer.appendChild(M),ie=="over")ye=L.top;else if(ie=="above"||ie=="near"){var Ge=Math.max(ue.wrapper.clientHeight,this.doc.height),st=Math.max(ue.sizer.clientWidth,ue.lineSpace.clientWidth);(ie=="above"||L.bottom+M.offsetHeight>Ge)&&L.top>M.offsetHeight?ye=L.top-M.offsetHeight:L.bottom+M.offsetHeight<=Ge&&(ye=L.bottom),Ke+M.offsetWidth>st&&(Ke=st-M.offsetWidth)}M.style.top=ye+"px",M.style.left=M.style.right="",le=="right"?(Ke=ue.sizer.clientWidth-M.offsetWidth,M.style.right="0px"):(le=="left"?Ke=0:le=="middle"&&(Ke=(ue.sizer.clientWidth-M.offsetWidth)/2),M.style.left=Ke+"px"),z&&go(this,{left:Ke,top:ye,right:Ke+M.offsetWidth,bottom:ye+M.offsetHeight})},triggerOnKeyDown:li(Is),triggerOnKeyPress:li(Us),triggerOnKeyUp:Ns,triggerOnMouseDown:li(js),execCommand:function(L){if($a.hasOwnProperty(L))return $a[L].call(null,this)},triggerElectric:li(function(L){Gs(this,L)}),findPosH:function(L,M,z,ie){var le=1;M<0&&(le=-1,M=-M);for(var ue=vt(this.doc,L),ye=0;ye<M&&!(ue=jo(this.doc,ue,le,z,ie),ue.hitSide);++ye);return ue},moveH:li(function(L,M){var z=this;this.extendSelectionsBy(function(ie){return z.display.shift||z.doc.extend||ie.empty()?jo(z.doc,ie.head,L,M,z.options.rtlMoveVisually):L<0?ie.from():ie.to()},he)}),deleteH:li(function(L,M){var z=this.doc.sel,ie=this.doc;z.somethingSelected()?ie.replaceSelection("",null,"+delete"):La(this,function(le){var ue=jo(ie,le.head,L,M,!1);return L<0?{from:ue,to:le.head}:{from:le.head,to:ue}})}),findPosV:function(L,M,z,ie){var le=1,ue=ie;M<0&&(le=-1,M=-M);for(var ye=vt(this.doc,L),Ke=0;Ke<M;++Ke){var Ge=Yn(this,ye,"div");if(ue==null?ue=Ge.left:Ge.left=ue,ye=$s(this,Ge,le,z),ye.hitSide)break}return ye},moveV:li(function(L,M){var z=this,ie=this.doc,le=[],ue=!this.display.shift&&!ie.extend&&ie.sel.somethingSelected();if(ie.extendSelectionsBy(function(Ke){if(ue)return L<0?Ke.from():Ke.to();var Ge=Yn(z,Ke.head,"div");Ke.goalColumn!=null&&(Ge.left=Ke.goalColumn),le.push(Ge.left);var st=$s(z,Ge,L,M);return M=="page"&&Ke==ie.sel.primary()&&yo(z,Xn(z,st,"div").top-Ge.top),st},he),le.length)for(var ye=0;ye<ie.sel.ranges.length;ye++)ie.sel.ranges[ye].goalColumn=le[ye]}),findWordAt:function(L){var M=this.doc,z=Q(M,L.line).text,ie=L.ch,le=L.ch;if(z){var ue=this.getHelper(L,"wordChars");(L.sticky=="before"||le==z.length)&&ie?--ie:++le;for(var ye=z.charAt(ie),Ke=Ne(ye,ue)?function(Ge){return Ne(Ge,ue)}:/\s/.test(ye)?function(Ge){return/\s/.test(Ge)}:function(Ge){return!/\s/.test(Ge)&&!Ne(Ge)};ie>0&&Ke(z.charAt(ie-1));)--ie;for(;le<z.length&&Ke(z.charAt(le));)++le}return new sr(rt(L.line,ie),rt(L.line,le))},toggleOverwrite:function(L){if(L!=null&&L==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?j(this.display.cursorDiv,"CodeMirror-overwrite"):g(this.display.cursorDiv,"CodeMirror-overwrite"),ze(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==I()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:li(function(L,M){ka(this,L,M)}),getScrollInfo:function(){var L=this.display.scroller;return{left:L.scrollLeft,top:L.scrollTop,height:L.scrollHeight-qn(this)-this.display.barHeight,width:L.scrollWidth-qn(this)-this.display.barWidth,clientHeight:Jn(this),clientWidth:Rn(this)}},scrollIntoView:li(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:rt(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:li(function(L,M){var z=this,ie=function(ue){return typeof ue=="number"||/^\d+$/.test(String(ue))?ue+"px":ue};L!=null&&(this.display.wrapper.style.width=ie(L)),M!=null&&(this.display.wrapper.style.height=ie(M)),this.options.lineWrapping&&fn(this);var le=this.display.viewFrom;this.doc.iter(le,this.display.viewTo,function(ue){if(ue.widgets){for(var ye=0;ye<ue.widgets.length;ye++)if(ue.widgets[ye].noHScroll){ri(z,le,"widget");break}}++le}),this.curOp.forceUpdate=!0,ze(this,"refresh",this)}),operation:function(L){return Oi(this,L)},startOperation:function(){return va(this)},endOperation:function(){return ga(this)},refresh:li(function(){var L=this.display.cachedTextHeight;Dr(this),this.curOp.forceUpdate=!0,qt(this),ka(this,this.doc.scrollLeft,this.doc.scrollTop),Eo(this.display),(L==null||Math.abs(L-pn(this.display))>.5||this.options.lineWrapping)&&mi(this),ze(this,"refresh",this)}),swapDoc:li(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,Mt(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,z){R.hasOwnProperty(L)||(R[L]=e[L]={_global:[]}),R[L][M]=z},e.registerGlobalHelper=function(L,M,z,ie){e.registerHelper(L,M,ie),R[L]._global.push({pred:z,val:ie})}}function jo(e,r,R,L,M){var z=r,ie=R,le=Q(e,r.line),ue=M&&e.direction=="rtl"?-R:R;function ye(){var $t=r.line+ue;return $t<e.first||$t>=e.first+e.size?!1:(r=new rt($t,r.ch,r.sticky),le=Q(e,$t))}function Ke($t){var zt;if(L=="codepoint"){var en=le.text.charCodeAt(r.ch+(L>0?0:-1));isNaN(en)?zt=null:zt=new rt(r.line,Math.max(0,Math.min(le.text.length,r.ch+R*(en>=55296&&en<56320?2:1))),-R)}else M?zt=Il(e.cm,le,r,R):zt=Do(le,r,R);if(zt==null)if(!$t&&ye())r=Po(M,e.cm,le,r.line,ue);else return!1;else r=zt;return!0}if(L=="char"||L=="codepoint")Ke();else if(L=="column")Ke(!0);else if(L=="word"||L=="group")for(var Ge=null,st=L=="group",tt=e.cm&&e.cm.getHelper(r,"wordChars"),_t=!0;!(R<0&&!Ke(!_t));_t=!1){var At=le.text.charAt(r.ch)||`
|
|
|
`,kt=Ne(At,tt)?"w":st&&At==`
|
|
|
`?"n":!st||/\s/.test(At)?null:"p";if(st&&!_t&&!kt&&(kt="s"),Ge&&Ge!=kt){R<0&&(R=1,Ke(),r.sticky="after");break}if(kt&&(Ge=kt),R>0&&!Ke(!_t))break}var Ht=so(e,r,z,ie,!0);return Jt(z,Ht)&&(Ht.hitSide=!0),Ht}function $s(e,r,R,L){var M=e.doc,z=r.left,ie;if(L=="page"){var le=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ue=Math.max(le-.5*pn(e.display),3);ie=(R>0?r.bottom:r.top)+R*ue}else L=="line"&&(ie=R>0?r.bottom+3:r.top-3);for(var ye;!(ye=Ci(e,z,ie),!ye.outside);){if(R<0?ie<=0:ie>=M.height){ye.hitSide=!0;break}ie+=R*5}return ye}var dr=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};dr.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 z(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}Pe(M,"paste",function(le){if(!z(le)||We(L,le)||zs(le,L))return;w<=11&&setTimeout(Vr(L,function(){return r.updateFromDOM()}),20)}),Pe(M,"compositionstart",function(le){r.composing={data:le.data,done:!1}}),Pe(M,"compositionupdate",function(le){r.composing||(r.composing={data:le.data,done:!1})}),Pe(M,"compositionend",function(le){r.composing&&(le.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),Pe(M,"touchstart",function(){return R.forceCompositionEnd()}),Pe(M,"input",function(){r.composing||r.readFromDOMSoon()});function ie(le){if(!z(le)||We(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 ye=zi.text.join(`
|
|
|
`);if(le.clipboardData.setData("Text",ye),le.clipboardData.getData("Text")==ye){le.preventDefault();return}}var Ke=Ys(),Ge=Ke.firstChild;L.display.lineSpace.insertBefore(Ke,L.display.lineSpace.firstChild),Ge.value=zi.text.join(`
|
|
|
`);var st=document.activeElement;ee(Ge),setTimeout(function(){L.display.lineSpace.removeChild(Ke),st.focus(),st==M&&R.showPrimarySelection()},50)}Pe(M,"copy",ie),Pe(M,"cut",ie)},dr.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},dr.prototype.prepareSelection=function(){var e=On(this.cm,!1);return e.focus=document.activeElement==this.div,e},dr.prototype.showSelection=function(e,r){if(!e||!this.cm.display.view.length)return;(e.focus||r)&&this.showPrimarySelection(),this.showMultipleSelections(e)},dr.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},dr.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 z=mo(r,e.anchorNode,e.anchorOffset),ie=mo(r,e.focusNode,e.focusOffset);if(z&&!z.bad&&ie&&!ie.bad&&Ct(Qt(z,ie),L)==0&&Ct(nn(z,ie),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},ye=M.line<r.display.viewTo&&Js(r,M);if(!ye){var Ke=le[le.length-1].measure,Ge=Ke.maps?Ke.maps[Ke.maps.length-1]:Ke.map;ye={node:Ge[Ge.length-1],offset:Ge[Ge.length-2]-Ge[Ge.length-3]}}if(!ue||!ye){e.removeAllRanges();return}var st=e.rangeCount&&e.getRangeAt(0),tt;try{tt=O(ue.node,ue.offset,ye.offset,ye.node)}catch(_t){}tt&&(!U&&r.state.focused?(e.collapse(ue.node,ue.offset),tt.collapsed||(e.removeAllRanges(),e.addRange(tt))):(e.removeAllRanges(),e.addRange(tt)),st&&e.anchorNode==null?e.addRange(st):U&&this.startGracePeriod()),this.rememberSelection()},dr.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)},dr.prototype.showMultipleSelections=function(e){l(this.cm.display.cursorDiv,e.cursors),l(this.cm.display.selectionDiv,e.selection)},dr.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},dr.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var r=e.getRangeAt(0).commonAncestorContainer;return D(this.div,r)},dr.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},dr.prototype.blur=function(){this.div.blur()},dr.prototype.getField=function(){return this.div},dr.prototype.supportsTouch=function(){return!0},dr.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Oi(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)},dr.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},dr.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&&Oi(r,function(){ii(r.doc,aa(R,L),oe),(R.bad||L.bad)&&(r.curOp.selectionChanged=!0)})},dr.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=rt(L.line-1,Q(e.doc,L.line-1).length)),M.ch==Q(e.doc,M.line).text.length&&M.line<e.lastLine()&&(M=rt(M.line+1,0)),L.line<r.viewFrom||M.line>r.viewTo-1)return!1;var z,ie,le;L.line==r.viewFrom||(z=Kr(e,L.line))==0?(ie=He(r.view[0].line),le=r.view[0].node):(ie=He(r.view[z].line),le=r.view[z-1].node.nextSibling);var ue=Kr(e,M.line),ye,Ke;if(ue==r.view.length-1?(ye=r.viewTo-1,Ke=r.lineDiv.lastChild):(ye=He(r.view[ue+1].line)-1,Ke=r.view[ue+1].node.previousSibling),!le)return!1;for(var Ge=e.doc.splitLines(nu(e,le,Ke,ie,ye)),st=ne(e.doc,rt(ie,0),rt(ye,Q(e.doc,ye).text.length));Ge.length>1&&st.length>1;)if(je(Ge)==je(st))Ge.pop(),st.pop(),ye--;else if(Ge[0]==st[0])Ge.shift(),st.shift(),ie++;else break;for(var tt=0,_t=0,At=Ge[0],kt=st[0],Ht=Math.min(At.length,kt.length);tt<Ht&&At.charCodeAt(tt)==kt.charCodeAt(tt);)++tt;for(var $t=je(Ge),zt=je(st),en=Math.min($t.length-(Ge.length==1?tt:0),zt.length-(st.length==1?tt:0));_t<en&&$t.charCodeAt($t.length-_t-1)==zt.charCodeAt(zt.length-_t-1);)++_t;if(Ge.length==1&&st.length==1&&ie==L.line)for(;tt&&tt>L.ch&&$t.charCodeAt($t.length-_t-1)==zt.charCodeAt(zt.length-_t-1);)tt--,_t++;Ge[Ge.length-1]=$t.slice(0,$t.length-_t).replace(/^\u200b+/,""),Ge[0]=Ge[0].slice(tt).replace(/\u200b+$/,"");var yn=rt(ie,tt),dn=rt(ye,st.length?je(st).length-_t:0);if(Ge.length>1||Ge[0]||Ct(yn,dn))return Ca(e.doc,Ge,yn,dn,"+input"),!0},dr.prototype.ensurePolled=function(){this.forceCompositionEnd()},dr.prototype.reset=function(){this.forceCompositionEnd()},dr.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},dr.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)},dr.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Oi(this.cm,function(){return Dr(e.cm)})},dr.prototype.setUneditable=function(e){e.contentEditable="false"},dr.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Vr(this.cm,Uo)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},dr.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},dr.prototype.onContextMenu=function(){},dr.prototype.resetPosition=function(){},dr.prototype.needsContentAttribute=!0;function Js(e,r){var R=or(e,r.line);if(!R||R.hidden)return null;var L=Q(e.doc,r.line),M=Bt(R,L,r.line),z=at(L,e.doc.direction),ie="left";if(z){var le=me(z,r.ch);ie=le%2?"right":"left"}var ue=on(M.map,r.ch,ie);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 z="",ie=!1,le=e.doc.lineSeparator(),ue=!1;function ye(tt){return function(_t){return _t.id==tt}}function Ke(){ie&&(z+=le,ue&&(z+=le),ie=ue=!1)}function Ge(tt){tt&&(Ke(),z+=tt)}function st(tt){if(tt.nodeType==1){var _t=tt.getAttribute("cm-text");if(_t){Ge(_t);return}var At=tt.getAttribute("cm-marker"),kt;if(At){var Ht=e.findMarks(rt(L,0),rt(M+1,0),ye(+At));Ht.length&&(kt=Ht[0].find(0))&&Ge(ne(e.doc,kt.from,kt.to).join(le));return}if(tt.getAttribute("contenteditable")=="false")return;var $t=/^(pre|div|p|li|table|br)$/i.test(tt.nodeName);if(!/^br$/i.test(tt.nodeName)&&tt.textContent.length==0)return;$t&&Ke();for(var zt=0;zt<tt.childNodes.length;zt++)st(tt.childNodes[zt]);/^(pre|p)$/i.test(tt.nodeName)&&(ue=!0),$t&&(ie=!0)}else tt.nodeType==3&&Ge(tt.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(st(r),r==R);)r=r.nextSibling,ue=!1;return z}function mo(e,r,R){var L;if(r==e.display.lineDiv){if(L=e.display.lineDiv.childNodes[R],!L)return Da(e.clipPos(rt(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 z=e.display.view[M];if(z.node==L)return ru(z,r,R)}}function ru(e,r,R){var L=e.text.firstChild,M=!1;if(!r||!D(L,r))return Da(rt(He(e.line),0),!0);if(r==L&&(M=!0,r=L.childNodes[R],R=0,!r)){var z=e.rest?je(e.rest):e.line;return Da(rt(He(z),z.text.length),M)}var ie=r.nodeType==3?r:null,le=r;for(!ie&&r.childNodes.length==1&&r.firstChild.nodeType==3&&(ie=r.firstChild,R&&(R=ie.nodeValue.length));le.parentNode!=L;)le=le.parentNode;var ue=e.measure,ye=ue.maps;function Ke(kt,Ht,$t){for(var zt=-1;zt<(ye?ye.length:0);zt++)for(var en=zt<0?ue.map:ye[zt],yn=0;yn<en.length;yn+=3){var dn=en[yn+2];if(dn==kt||dn==Ht){var zn=He(zt<0?e.line:e.rest[zt]),gr=en[yn]+$t;return($t<0||dn!=kt)&&(gr=en[yn+($t?1:0)]),rt(zn,gr)}}}var Ge=Ke(ie,le,R);if(Ge)return Da(Ge,M);for(var st=le.nextSibling,tt=ie?ie.nodeValue.length-R:0;st;st=st.nextSibling){if(Ge=Ke(st,st.firstChild,0),Ge)return Da(rt(Ge.line,Ge.ch-tt),M);tt+=st.textContent.length}for(var _t=le.previousSibling,At=R;_t;_t=_t.previousSibling){if(Ge=Ke(_t,_t.firstChild,-1),Ge)return Da(rt(Ge.line,Ge.ch+At),M);At+=_t.textContent.length}}var Mr=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Z,this.hasSelection=!1,this.composing=null};Mr.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),d&&(M.style.width="0px"),Pe(M,"input",function(){C&&w>=9&&r.hasSelection&&(r.hasSelection=null),R.poll()}),Pe(M,"paste",function(ie){if(We(L,ie)||zs(ie,L))return;L.state.pasteIncoming=+new Date,R.fastPoll()});function z(ie){if(We(L,ie))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}),ie.type=="cut"?L.setSelections(le.ranges,null,oe):(R.prevInput="",M.value=le.text.join(`
|
|
|
`),ee(M))}else return;ie.type=="cut"&&(L.state.cutIncoming=+new Date)}Pe(M,"cut",z),Pe(M,"copy",z),Pe(e.scroller,"paste",function(ie){if(nr(e,ie)||We(L,ie))return;if(!M.dispatchEvent){L.state.pasteIncoming=+new Date,R.focus();return}var le=new Event("paste");le.clipboardData=ie.clipboardData,M.dispatchEvent(le)}),Pe(e.lineSpace,"selectstart",function(ie){nr(e,ie)||pe(ie)}),Pe(M,"compositionstart",function(){var ie=L.getCursor("from");R.composing&&R.composing.range.clear(),R.composing={start:ie,range:L.markText(ie,L.getCursor("to"),{className:"CodeMirror-composing"})}}),Pe(M,"compositionend",function(){R.composing&&(R.poll(),R.composing.range.clear(),R.composing=null)})},Mr.prototype.createField=function(e){this.wrapper=Ys(),this.textarea=this.wrapper.firstChild},Mr.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Mr.prototype.prepareSelection=function(){var e=this.cm,r=e.display,R=e.doc,L=On(e);if(e.options.moveInputWithCursor){var M=Yn(e,R.sel.primary().head,"div"),z=r.wrapper.getBoundingClientRect(),ie=r.lineDiv.getBoundingClientRect();L.teTop=Math.max(0,Math.min(r.wrapper.clientHeight-10,M.top+ie.top-z.top)),L.teLeft=Math.max(0,Math.min(r.wrapper.clientWidth-10,M.left+ie.left-z.left))}return L},Mr.prototype.showSelection=function(e){var r=this.cm,R=r.display;l(R.cursorDiv,e.cursors),l(R.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Mr.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&&ee(this.textarea),C&&w>=9&&(this.hasSelection=R)}else e||(this.prevInput=this.textarea.value="",C&&w>=9&&(this.hasSelection=null))},Mr.prototype.getField=function(){return this.textarea},Mr.prototype.supportsTouch=function(){return!1},Mr.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!t||I()!=this.textarea))try{this.textarea.focus()}catch(e){}},Mr.prototype.blur=function(){this.textarea.blur()},Mr.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Mr.prototype.receivedFocus=function(){this.slowPoll()},Mr.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()})},Mr.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)},Mr.prototype.poll=function(){var e=this,r=this.cm,R=this.textarea,L=this.prevInput;if(this.contextMenuPending||!r.state.focused||ct(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&&w>=9&&this.hasSelection===M||n&&/[\uf700-\uf7ff]/.test(M))return r.display.input.reset(),!1;if(r.doc.sel==r.display.selForContextMenu){var z=M.charCodeAt(0);if(z==8203&&!L&&(L="\u200B"),z==8666)return this.reset(),this.cm.execCommand("undo")}for(var ie=0,le=Math.min(L.length,M.length);ie<le&&L.charCodeAt(ie)==M.charCodeAt(ie);)++ie;return Oi(r,function(){Uo(r,M.slice(ie),L.length-ie,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},Mr.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Mr.prototype.onKeyPress=function(){C&&w>=9&&(this.hasSelection=null),this.fastPoll()},Mr.prototype.onContextMenu=function(e){var r=this,R=r.cm,L=R.display,M=r.textarea;r.contextMenuPending&&r.contextMenuPending();var z=si(R,e),ie=L.scroller.scrollTop;if(!z||o)return;var le=R.options.resetSelectionOnContextMenu;le&&R.doc.sel.contains(z)==-1&&Vr(R,ii)(R.doc,aa(z),oe);var ue=M.style.cssText,ye=r.wrapper.style.cssText,Ke=r.wrapper.offsetParent.getBoundingClientRect();r.wrapper.style.cssText="position: static",M.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(e.clientY-Ke.top-5)+"px; left: "+(e.clientX-Ke.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;u&&(Ge=window.scrollY),L.input.focus(),u&&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 st(){if(M.selectionStart!=null){var At=R.somethingSelected(),kt="\u200B"+(At?M.value:"");M.value="\u21DA",M.value=kt,r.prevInput=At?"":"\u200B",M.selectionStart=1,M.selectionEnd=kt.length,L.selForContextMenu=R.doc.sel}}function tt(){if(r.contextMenuPending!=tt)return;if(r.contextMenuPending=!1,r.wrapper.style.cssText=ye,M.style.cssText=ue,C&&w<9&&L.scrollbars.setScrollTop(L.scroller.scrollTop=ie),M.selectionStart!=null){(!C||C&&w<9)&&st();var At=0,kt=function(){L.selForContextMenu==R.doc.sel&&M.selectionStart==0&&M.selectionEnd>0&&r.prevInput=="\u200B"?Vr(R,ps)(R):At++<10?L.detectingSelectAll=setTimeout(kt,500):(L.selForContextMenu=null,L.input.reset())};L.detectingSelectAll=setTimeout(kt,200)}}if(C&&w>=9&&st(),_){we(e);var _t=function(){Ze(window,"mouseup",_t),setTimeout(tt,20)};Pe(window,"mouseup",_t)}else setTimeout(tt,50)},Mr.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Mr.prototype.setUneditable=function(){},Mr.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&&(Pe(e.form,"submit",L),!r.leaveSubmitMethodAlone)){var z=e.form;M=z.submit;try{var ie=z.submit=function(){L(),z.submit=M,z.submit(),z.submit=ie}}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=wr(function(ue){return e.parentNode.insertBefore(ue,e.nextSibling)},r);return le}function au(e){e.off=Ze,e.on=Pe,e.wheelEventPixels=fl,e.Doc=gi,e.splitLines=nt,e.countColumn=X,e.findColumn=_e,e.isWordChar=Ie,e.Pass=ae,e.signal=ze,e.Line=ni,e.changeEnd=oa,e.scrollbarModel=zo,e.Pos=rt,e.cmpPos=Ct,e.modes=ft,e.mimeModes=Qe,e.resolveMode=lt,e.getMode=yt,e.modeExtensions=Nt,e.extendMode=Gt,e.copyState=Xt,e.startState=de,e.innerMode=Te,e.commands=$a,e.keyMap=qi,e.keyName=Rs,e.isModifierKey=As,e.lookupKey=Aa,e.normalizeKeyMap=kl,e.StringStream=H,e.SharedTextMarker=Va,e.TextMarker=la,e.LineWidget=Ga,e.e_preventDefault=pe,e.e_stopPropagation=be,e.e_stop=we,e.addClass=j,e.contains=D,e.rmClass=g,e.keyNames=ua}Jl(wr),eu(wr);var ou="iter insert remove copy getEditor constructor".split(" ");for(var vo in gi.prototype)gi.prototype.hasOwnProperty(vo)&&K(ou,vo)<0&&(wr.prototype[vo]=function(e){return function(){return e.apply(this.doc,arguments)}}(gi.prototype[vo]));return Oe(gi),wr.inputStyles={textarea:Mr,contenteditable:dr},wr.defineMode=function(e){!wr.defaults.mode&&e!="null"&&(wr.defaults.mode=e),Ot.apply(this,arguments)},wr.defineMIME=wt,wr.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),wr.defineMIME("text/plain","null"),wr.defineExtension=function(e,r){wr.prototype[e]=r},wr.defineDocExtension=function(e,r){gi.prototype[e]=r},wr.fromTextArea=iu,au(wr),wr.version="5.58.2",wr})},W7jJ:function(Ve,Be,W){"use strict";W.r(Be);var re=W("0Owb"),$=W("PpiC"),U=W("OaEy"),S=W("2fM7"),P=W("T2oS"),E=W("W9HT"),C=W("miYZ"),w=W("tsqr"),u=W("2qtc"),p=W("kLXV"),f=W("9og8"),o=W("tJVT"),a=W("k1fw"),c=W("aHsQ"),s=W("sGsY"),d=W("WmNS"),i=W.n(d),t=W("cDcd"),n=W.n(t),h=W("Fvcw"),v=W("GIiI"),b=W("Ty5D"),y=W("9kvl"),_=W("55Ip"),m=W("7qur"),g=W("cDPC"),x=W("m3rI"),l=W("RCxd"),T=W("EHPI"),A=W("J66h"),O=W("uMZB"),D=W.n(O),I=W("sNtx"),j=W("RpDr"),B=W("+L6B"),ee=W("2/Rp"),F=W("y8nQ"),G=W("Vl3Y"),X=W("5NDa"),Z=W("5rEg"),K=Z.a.TextArea,q=5e3,ae=function(et){var ut=et.callback,Pt=et.onCancel,bt=et.notes;function It(Mt){ut(Mt)}return n.a.createElement(G.a,{className:"note-form-panel",onFinish:It,initialValues:{notes:bt}},n.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)}]},n.a.createElement(K,{placeholder:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9",rows:5})),n.a.createElement(G.a.Item,{style:{textAlign:"right"}},n.a.createElement(ee.a,{type:"ghost",onClick:Pt,style:{marginRight:10}}," \u53D6\u6D88 "),n.a.createElement(ee.a,{type:"primary",htmlType:"submit"}," \u63D0\u4EA4 ")))},oe=W("ZsLC"),ve=W.n(oe),he=W("DjyN"),_e=W("NUBc"),fe=W("g9YV"),xe=W("wCAj"),je=W("Hw79"),Le=W.n(je),ke=W("ye1Q"),Fe=W("lfch"),ge=W("bdLU"),ce=W("1vsH"),Ie=W("wd/R"),Ne=W.n(Ie),Xe=xe.a.Column,te=function(et){var ut=et.submitResult,Pt=et.submitting,bt=et.submitRecords,It=et.page,Mt=et.onPageChange,ht=et.topicId,pt=ut||{},Wt=pt.status,mt=pt.id,Zt=pt.input,Rt=pt.output,rn=pt.expected_output,Un=pt.is_file,Sn=pt.input_file_url,mn=pt.output_file_url,Hn=pt.expected_output_file_url,wn=pt.error_msg,jn=bt||{},Mn=jn.records,nr=jn.records_count,Gn=Object(b.i)();function lr(){Un?navigator.clipboard.writeText(A.Base64.decode(wn)).then(function(){w.b.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")}):navigator.clipboard.writeText(A.Base64.decode(Rt)).then(function(){w.b.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")})}return n.a.createElement(E.a,{spinning:Pt,tip:"\u8BC4\u6D4B\u4E2D...",indicator:n.a.createElement(ke.a,{style:{fontSize:24},spin:!0})},mt?n.a.createElement(n.a.Fragment,null,n.a.createElement("ul",{className:Le.a.info},n.a.createElement("li",null,"\u6267\u884C\u7ED3\u679C\uFF1A",n.a.createElement("span",{className:Wt===ge.a.OK?"c-green":"c-red"},j.a[Wt])),n.a.createElement("li",{className:Le.a.error},n.a.createElement("a",{onClick:lr},"\u590D\u5236\u9519\u8BEF\u4FE1\u606F ",n.a.createElement(Fe.a,null)," ")),n.a.createElement("li",null,n.a.createElement(_.a,{to:"/problems/".concat(ht,"/record-detail/").concat(mt,"?backId=").concat(Gn==null?void 0:Gn.save_identifier)},"\u663E\u793A\u8BE6\u60C5 > "))),Wt!==ge.a.OK?n.a.createElement(n.a.Fragment,null,n.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),n.a.createElement("pre",null,!Un&&Zt,Un&&n.a.createElement("a",{style:{fontSize:"16px"},onClick:function(){return Object(ce.y)(Sn,Zt)}},Zt)),n.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),n.a.createElement("pre",null,(Wt===4||Wt===5)&&A.Base64.decode(wn),Wt!=4&&Wt!=5&&(Un?n.a.createElement("a",{style:{fontSize:"16px"},onClick:function(){return Object(ce.y)(mn,Rt)}},Rt):A.Base64.decode(Rt))),n.a.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),n.a.createElement("pre",null,!Un&&A.Base64.decode(rn),Un&&n.a.createElement("a",{style:{fontSize:"16px"},onClick:function(){return Object(ce.y)(Hn,rn)}},rn))):null):null,(Mn==null?void 0:Mn.length)>0?n.a.createElement(xe.a,{dataSource:Mn,rowKey:"id",pagination:!1},n.a.createElement(Xe,{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",render:function(qn,Rn){return n.a.createElement("span",null," ",Ne()(qn).format("YYYY-MM-DD HH:mm:ss"))}}),n.a.createElement(Xe,{title:"\u63D0\u4EA4\u7ED3\u679C",dataIndex:"status",key:"status",render:function(qn,Rn){var Jn;return n.a.createElement(_.a,{className:qn===0?"c-green":"c-red",to:"/problems/".concat(ht,"/record-detail/").concat(Rn.id,"?backId=").concat(Gn==null?void 0:Gn.save_identifier)},(Jn=j.a[qn])===null||Jn===void 0?void 0:Jn.replace("\u8C03\u8BD5","\u8BC4\u6D4B"))}}),n.a.createElement(Xe,{title:"\u6267\u884C\u7528\u65F6 (S)",dataIndex:"execute_time",key:"execute_time"}),n.a.createElement(Xe,{title:"\u5185\u5B58\u6D88\u8017\uFF08MB\uFF09",dataIndex:"execute_memory",key:"execute_memory"}),n.a.createElement(Xe,{title:"\u8BED\u8A00",dataIndex:"language",key:"language"})):null,nr>15?n.a.createElement(_e.a,{className:Le.a.pagination,current:It,pageSize:15,total:nr,onChange:Mt}):null)},k=W("BdwD"),N=W("DYRE"),J=W("zeV3"),V=W("+BJd"),Y=W("mr32"),me=W("TcMa"),Ae=W.n(me),at=W("9Bee"),Re={1:{name:"\u7B80\u5355",color:"#52c41a"},2:{name:"\u9002\u4E2D",color:"#faad14"},3:{name:"\u56F0\u96BE",color:"#f5222d"}},Pe=function(et){var ut=et.hack,Pt=et.onTriggerPraise,bt=et.toDiscuss,It=ut.language,Mt=ut.difficulty,ht=ut.time_limit,pt=ut.username,Wt=ut.user_path,mt=ut.user_praise,Zt=ut.comments_count,Rt=ut.praises_count,rn=ut.description,Un=ut.pass_count,Sn=ut.submit_count,mn=Object(b.h)();console.log(ut.language,"language");var Hn=Re[Mt];return n.a.createElement(n.a.Fragment,null,n.a.createElement("ul",{className:Ae.a.info},n.a.createElement("li",null,"\u96BE\u5EA6\uFF1A",n.a.createElement(Y.a,{color:Hn.color},Hn.name)),n.a.createElement("li",null,"\u8BC4\u6D4B\u65F6\u957F\u9650\u5236\uFF1A",n.a.createElement("b",null,ht,"\u79D2"))),n.a.createElement(at.a,{value:rn,className:Ae.a.desc}),n.a.createElement("ul",{className:Ae.a["commit-info"]},n.a.createElement("li",null,n.a.createElement(J.a,{size:4},n.a.createElement("span",null,"\u901A\u8FC7\u6B21\u6570")," ",n.a.createElement("b",null,Un))),n.a.createElement("li",null,n.a.createElement(J.a,{size:4},n.a.createElement("span",null,"\u63D0\u4EA4\u6B21\u6570")," ",n.a.createElement("b",null,Sn))," "),n.a.createElement("li",{style:{flex:"1 0 0"}}),n.a.createElement("li",null,n.a.createElement(J.a,{size:4},n.a.createElement("i",{className:"iconfont icon-huifu1",onClick:bt})," ",n.a.createElement("b",null,Zt))," ")))},Ye=W("dhSg"),Ze=W("ps8w"),ze=W.n(Ze),We=W("oBTY"),Me=W("M8RZ"),De=W("OkW/"),Oe=W("ErOA");function pe(et){return Object(Oe.c)("comments.json",et)}function be(et){return Object(Oe.f)("/discusses/".concat(et,"/plus.json"),{container_type:"Discuss",type:1})}function Ce(et){return Object(Oe.f)("comments/reply.json",et)}function we(et){return Object(Oe.f)("comments.json",et)}function $e(et){return Object(Oe.f)("comments/".concat(et==null?void 0:et.id,"/hidden.json"),et)}function it(et){return Object(Oe.b)("comments/".concat(et==null?void 0:et.id,".json"))}var dt=W("GgEA"),Et=W("AMnG"),Dt=W("xKgJ");function ot(et){var ut=et.author;return n.a.createElement("a",{href:"/users/".concat(ut.login),target:"_blank"},n.a.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",height:"50",style:{borderRadius:"50%"},src:"".concat(x.a.IMG_SERVER,"/images/").concat(ut.image_url),width:"50"}))}function xt(et){var ut=et.data,Pt=et.index,bt=et.parentDiscussIndex,It=et.user,Mt=et.onSetActionType,ht=ut.author,pt=ut.can_delete,Wt=ut.content,mt=ut.id,Zt=ut.time;function Rt(){Mt({id:mt,index:Pt,type:"delete-discuss",parentDiscussIndex:bt,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}var rn=It.admin||pt||ht.user_id===It.user_id;return n.a.createElement("div",{className:"discuss-item-container second-discuss "},n.a.createElement(ot,{author:ht}),n.a.createElement("section",null,n.a.createElement("div",{className:"discuss-info"},n.a.createElement("a",{href:"/users/".concat(ht.login),target:"_blank"},ht.name),n.a.createElement("span",{className:"grey"},Zt),n.a.createElement("div",{className:"btn-group",style:{marginBottom:0}},rn?n.a.createElement("a",{onClick:Rt,title:"\u5220\u9664"},n.a.createElement("i",{className:"iconfont icon-shanchu"})):null)),n.a.createElement(at.a,{className:"discuss-content",value:Wt})))}var nt=function(et){var ut=et.user,Pt=et.data,bt=et.index,It=et.onPlusDiscuss,Mt=et.onSetActionType,ht=et.activeDiscussIndex,pt=et.onReplyDiscuss,Wt=et.onSetActiveDiscussIndex,mt=Pt.content,Zt=Pt.children,Rt=Pt.hidden,rn=Pt.id,Un=Pt.praise_count,Sn=Pt.time,mn=Pt.user_praise,Hn=Pt.can_delete,wn=Pt.author;console.log(Hn&&(!Zt||Zt.length==0),"children22");function jn(){Wt(rn)}function Mn(){It(rn,!mn,bt)}function nr(){Mt({id:rn,index:bt,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function Gn(){Mt({id:rn,index:bt,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 lr=ut.admin||ut.user_id===wn.user_id;return n.a.createElement("div",{className:"discuss-item-container",key:rn},n.a.createElement(ot,{author:wn}),n.a.createElement("section",null,n.a.createElement("div",{className:"discuss-info"},n.a.createElement("a",{href:"/users/".concat(wn.login),target:"_blank"}," ",wn.name," "),n.a.createElement("span",{className:"grey"},Sn)),n.a.createElement(at.a,{className:"discuss-content",value:mt}),Zt&&Zt.length>0?n.a.createElement("div",{className:"reply-discuss-container"},Zt.map(function(vr,qn){return n.a.createElement(xt,{key:vr.id,data:vr,index:qn,user:ut,onSetActionType:Mt,parentDiscussIndex:bt})})):null,n.a.createElement("div",{className:"btn-group"},Object(Dt.v)()?n.a.createElement("a",{onClick:Gn,title:Rt?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},n.a.createElement("i",{className:Rt?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,Hn&&(!Zt||Zt.length==0)?n.a.createElement("a",{onClick:nr,title:"\u5220\u9664"},n.a.createElement("i",{className:"iconfont icon-shanchu"})):null,n.a.createElement("a",{onClick:jn,title:"\u56DE\u590D"}," ",n.a.createElement("i",{className:"iconfont icon-huifu1"})," "),n.a.createElement("a",{onClick:Mn,className:mn?"c-orange":""},n.a.createElement("i",{className:mn?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),n.a.createElement("span",null,Un||""))),n.a.createElement(Et.a,{id:rn,activeDiscussIndex:ht,onReplyDiscuss:pt})))},ct=W("kaH+"),Je=W("Wx9E"),Ee=W("Ot1p"),Ue=function(et){var ut=et.user_praise,Pt=et.praise_count,bt=et.praisePlus,It=et.onCreateDiscuss,Mt=et.discuss_count,ht=Object(t.useState)(!1),pt=Object(o.a)(ht,2),Wt=pt[0],mt=pt[1],Zt=Object(t.useState)(""),Rt=Object(o.a)(Zt,2),rn=Rt[0],Un=Rt[1];function Sn(Mn){Un(Mn)}function mn(){mt(!0)}function Hn(){mt(!1)}function wn(){return jn.apply(this,arguments)}function jn(){return jn=Object(f.a)(i.a.mark(function Mn(){return i.a.wrap(function(Gn){for(;;)switch(Gn.prev=Gn.next){case 0:It(rn),Un(""),mt(!1);case 3:case"end":return Gn.stop()}},Mn)})),jn.apply(this,arguments)}return n.a.createElement("div",{className:"dis-input-editor-container ".concat(Wt?"active":""," ")},n.a.createElement("div",{className:Wt?"text-area hide":"text-area"},n.a.createElement("input",{placeholder:"\u8BF4\u70B9\u4EC0\u4E48",onClick:mn}),n.a.createElement("a",{style:{alignItems:"center"}}," ",n.a.createElement("i",{className:"iconfont icon-huifu1"})," \xA0 \xA0",Mt," "),n.a.createElement("a",{className:"c-light-black",onClick:bt,style:{alignItems:"center"},title:ut?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},n.a.createElement("i",{className:"mr3 ".concat(ut?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"," ")}),Pt?n.a.createElement("span",null,Pt):"")),Wt?n.a.createElement("div",{className:"input-mask",onClick:Hn}):null,n.a.createElement("div",{className:Wt?"md-container":"md-container hide"},n.a.createElement(Ee.a,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:rn,height:240,onChange:Sn}),n.a.createElement("div",{className:"tip-container",onClick:Hn},n.a.createElement("a",{className:"btn-send",onClick:wn}," \u53D1\u9001 "))))},ft={loading:!1,page:1,data:[],count:0,actionType:null,activeDiscussIndex:null},Qe;(function(et){et[et.GET_DISCUSSES=0]="GET_DISCUSSES",et[et.TOP_OR_DOWN_DISCUSS=1]="TOP_OR_DOWN_DISCUSS",et[et.ACTIVE_DISCUSS_INDEX=2]="ACTIVE_DISCUSS_INDEX",et[et.PLUS_DISCUSS=3]="PLUS_DISCUSS",et[et.SET_ACTION_TYPE=4]="SET_ACTION_TYPE",et[et.SET_PAGE=5]="SET_PAGE",et[et.SHOW_DISCUSSES_LOADING=6]="SHOW_DISCUSSES_LOADING"})(Qe||(Qe={}));function Ot(et,ut){switch(ut.type){case Qe.SHOW_DISCUSSES_LOADING:return Object(a.a)(Object(a.a)({},et),{},{loading:!0});case Qe.GET_DISCUSSES:return Object(a.a)(Object(a.a)({},et),ut.payload);case Qe.TOP_OR_DOWN_DISCUSS:return Object(a.a)(Object(a.a)({},et),ut.payload);case Qe.SET_ACTION_TYPE:return Object(a.a)(Object(a.a)({},et),ut.payload);case Qe.PLUS_DISCUSS:return Object(a.a)(Object(a.a)({},et),ut.payload);case Qe.SET_PAGE:return Object(a.a)(Object(a.a)({},et),{},{page:ut.payload});case Qe.ACTIVE_DISCUSS_INDEX:return Object(a.a)(Object(a.a)({},et),ut.payload);default:throw new Error}}var wt=function(et){var ut=et.user,Pt=et.identifier,bt=et.hack,It=et.onTriggerPraise,Mt=et.setDiscussTotal,ht=Object(t.useReducer)(Ot,ft),pt=Object(o.a)(ht,2),Wt=pt[0],mt=pt[1],Zt=Wt.loading,Rt=Wt.page,rn=Wt.data,Un=Wt.count,Sn=Wt.actionType,mn=Wt.activeDiscussIndex,Hn=Object(t.useCallback)(Object(f.a)(i.a.mark(function cn(){var Zn,or,Qn;return i.a.wrap(function(Fn){for(;;)switch(Fn.prev=Fn.next){case 0:return mt({type:Qe.SHOW_DISCUSSES_LOADING}),Fn.next=3,pe({container_type:"Practice",container_identifier:Pt,limit:10,page:Rt});case 3:Zn=Fn.sent,or=Zn.comments,Qn=Zn.disscuss_count,mt({type:Qe.GET_DISCUSSES,payload:{data:or,count:Qn,loading:!1}}),Mt(Qn);case 7:case"end":return Fn.stop()}},cn)})),[Rt,Pt]);Object(t.useEffect)(function(){Hn()},[Pt,Rt]);function wn(cn){mt({type:Qe.SET_PAGE,page:cn})}function jn(cn){mt({type:Qe.SET_ACTION_TYPE,payload:{actionType:cn}})}function Mn(cn){mn===cn?mt({type:Qe.ACTIVE_DISCUSS_INDEX,payload:{activeDiscussIndex:null}}):mt({type:Qe.ACTIVE_DISCUSS_INDEX,payload:{activeDiscussIndex:cn}})}function nr(cn,Zn,or){return Gn.apply(this,arguments)}function Gn(){return Gn=Object(f.a)(i.a.mark(function cn(Zn,or,Qn){var Tn;return i.a.wrap(function(on){for(;;)switch(on.prev=on.next){case 0:return on.prev=0,on.next=3,be(Zn);case 3:Tn=on.sent,rn[Qn].user_praise=or,rn[Qn].praise_count=Tn.praise_count,mt({type:Qe.PLUS_DISCUSS,payload:{data:Object(We.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]])})),Gn.apply(this,arguments)}function lr(){return vr.apply(this,arguments)}function vr(){return vr=Object(f.a)(i.a.mark(function cn(){var Zn,or,Qn,Tn,Fn;return i.a.wrap(function(bn){for(;;)switch(bn.prev=bn.next){case 0:if(Zn=Sn.id,or=Sn.params,Qn=Sn.type,Tn=Sn.index,Fn=Sn.parentDiscussIndex,!(Qn==="hidden-discuss")){bn.next=7;break}return console.log(or,"params"),bn.next=5,$e(Object(a.a)({id:Zn,container_type:"Practice",container_identifier:Pt},or));case 5:Fn?rn[Fn].children[Tn].hidden=or.hidden==1:rn[Tn].hidden=or.hidden==1,mt({type:Qe.SET_ACTION_TYPE,payload:{actionType:null,data:Object(We.a)(rn)}});case 7:if(!(Qn==="delete-discuss")){bn.next=13;break}return bn.next=10,it({id:Zn,container_type:"Practice",container_identifier:Pt});case 10:return mt({type:Qe.SET_ACTION_TYPE,payload:{actionType:null}}),bn.next=13,Hn();case 13:case"end":return bn.stop()}},cn)})),vr.apply(this,arguments)}function qn(){mt({type:Qe.SET_ACTION_TYPE,payload:{actionType:null}})}function Rn(cn,Zn){return Jn.apply(this,arguments)}function Jn(){return Jn=Object(f.a)(i.a.mark(function cn(Zn,or){return i.a.wrap(function(Tn){for(;;)switch(Tn.prev=Tn.next){case 0:return Tn.prev=0,Tn.next=3,Ce({container_type:"Practice",container_identifier:Pt,comments:{content:or,parent_id:Zn}});case 3:Hn(),Tn.next=9;break;case 6:Tn.prev=6,Tn.t0=Tn.catch(0),console.log(Tn.t0);case 9:case"end":return Tn.stop()}},cn,null,[[0,6]])})),Jn.apply(this,arguments)}function Dn(cn){return Bt.apply(this,arguments)}function Bt(){return Bt=Object(f.a)(i.a.mark(function cn(Zn){return i.a.wrap(function(Qn){for(;;)switch(Qn.prev=Qn.next){case 0:return mt({type:Qe.SHOW_DISCUSSES_LOADING}),Qn.next=3,we({comments:{content:Zn},container_type:"Practice",container_identifier:Pt});case 3:Hn();case 4:case"end":return Qn.stop()}},cn)})),Bt.apply(this,arguments)}return n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{className:"discuss-panel"},rn.length===0?n.a.createElement(k.a,null):rn.map(function(cn,Zn){return n.a.createElement(nt,{onReplyDiscuss:Rn,onPlusDiscuss:nr,onSetActiveDiscussIndex:Mn,onSetActionType:jn,data:cn,index:Zn,user:ut,activeDiscussIndex:mn})}),Un>10?n.a.createElement("div",{className:"pagination-container"},n.a.createElement(_e.a,{showQuickJumper:!0,onChange:wn,current:Rt,total:Un})):null),n.a.createElement(Ue,{user_praise:bt.user_praise,praise_count:bt.praises_count,praisePlus:It,discuss_count:bt.comments_count,onCreateDiscuss:Dn}),n.a.createElement(Me.a,null,n.a.createElement(p.a,{centered:!0,title:"\u63D0\u793A",visible:!!Sn,onOk:lr,onCancel:qn},n.a.createElement("p",null,Sn?Sn.message:"")),n.a.createElement(ct.a,null)))},lt=W("1FX+"),yt=W.n(lt),Nt=W("pYxM"),Gt=W.n(Nt),Xt=W("sB/4"),Te=W.n(Xt),de=W("Wtmd"),H=W.n(de),Q=W("CNDd"),ne=W.n(Q),se=W("nCk5"),Se=W.n(se),He=W("kovY"),qe=W.n(He),Tt=function(ut){var Pt=ut.style,bt=Pt===void 0?{}:Pt,It=ut.onClick,Mt=ut.onAssist,ht=ut.onHide,pt=ut.data,Wt=ut.active,mt=ut.showLine;return n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{className:Wt===(pt==null?void 0:pt.id)?"".concat(Gt.a.list," ").concat(Gt.a.active):Gt.a.list,style:bt,onClick:function(){return It(pt)}},(pt==null?void 0:pt.video)&&n.a.createElement("div",{className:Gt.a.left},n.a.createElement("img",{src:pt==null?void 0:pt.video_cover}),n.a.createElement("div",null,n.a.createElement("img",{src:Te.a}),n.a.createElement("span",null,pt==null?void 0:pt.video_duration)),n.a.createElement("div",{className:Gt.a.mask})),n.a.createElement("div",{className:Gt.a.right},n.a.createElement("div",{className:Gt.a.name},n.a.createElement("img",{src:x.a.IMG_SERVER+"/images/"+(pt==null?void 0:pt.image_url),width:30,height:30}),n.a.createElement("div",{title:pt==null?void 0:pt.name,className:Gt.a.title},pt==null?void 0:pt.name),(pt==null?void 0:pt.is_authority)&&n.a.createElement("div",{className:Gt.a.b},"\u5B98\u65B9"),(pt==null?void 0:pt.is_excellent)&&n.a.createElement("div",{className:Gt.a.a},"\u7CBE\u9009")),n.a.createElement("div",{className:Gt.a.des},n.a.createElement(at.a,{showLines:2,showTextOnly:!0,value:(pt==null?void 0:pt.content)||"\u6682\u65E0\u5185\u5BB9"})),n.a.createElement("div",{className:Gt.a.tag},n.a.createElement("span",{className:"current",onClick:function(Rt){Rt.stopPropagation(),Mt(pt)}},n.a.createElement("img",{src:pt!=null&&pt.user_liker?ne.a:H.a}),n.a.createElement("span",{style:{color:pt!=null&&pt.user_liker?"#0152d9":"#656f87"}},pt==null?void 0:pt.praises_count)),n.a.createElement("span",null,n.a.createElement("img",{src:Se.a}),n.a.createElement("span",null,pt==null?void 0:pt.discusses_count)),n.a.createElement("span",null,n.a.createElement("img",{src:qe.a}),n.a.createElement("span",null,pt==null?void 0:pt.viewed_count)),Object(Dt.v)()&&n.a.createElement("span",{className:"current",style:{color:"#0152d9",marginRight:0,userSelect:"none"},onClick:function(Rt){Rt.stopPropagation(),ht(pt)}},pt!=null&&pt.is_hidden?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF")))),mt&&n.a.createElement("div",{className:Gt.a.line}))},Lt=Tt,rt=W("5Dmo"),Ct=W("3S7+"),Jt=W("Z8dc"),St=W.n(Jt),nn=W("Aky1"),Qt=W("7+5b"),Ut=W.n(Qt),vt=W("twBr"),En=W.n(vt),xn=W("oE5q"),ln=W.n(xn),un=function(ut,Pt){var bt,It,Mt,ht=Pt.payload.uploadInfo,pt=ht===void 0?{}:ht;switch(Pt.type){case"addVideo":return{videoList:[].concat(Object(We.a)(ut.videoList),[{name:pt.file.name,size:pt.file.size,type:pt.file.type,fileHash:pt.fileHash,state:pt.state,video_id:pt.videoId,attachment_id:"",article_id:-1,loaded:0,title:""}])};case"removeVideo":return{videoList:ut.videoList.filter(function(Wt){return Wt.name!==Pt.payload.name})};case"replaceVideo":return{videoList:Pt.payload};case"removeAll":return[];case"updateProgress":return{videoList:ut.videoList.map(function(Wt){return Wt.name===Pt.payload.uploadInfo.file.name?Object(a.a)(Object(a.a)({},Wt),{loaded:Pt.payload.progressPercent,video_id:pt.videoId,fileHash:pt.fileHash}):Wt})};case"updateTitle":return{videoList:(bt=ut.videoList)===null||bt===void 0?void 0:bt.map(function(Wt){return Wt.name===Pt.payload.item.name?Object(a.a)(Object(a.a)({},Wt),{title:Pt.payload.title}):Wt})};case"updateImg":return{videoList:(It=ut.videoList)===null||It===void 0?void 0:It.map(function(Wt){return Wt.name===Pt.payload.item.name?Object(a.a)(Object(a.a)({},Wt),{attachment_id:Pt.payload.attachment_id}):Wt})};case"updateImg":return{videoList:(Mt=ut.videoList)===null||Mt===void 0?void 0:Mt.map(function(Wt){return Wt.name===Pt.payload.item.name?Object(a.a)(Object(a.a)({},Wt),{attachment_id:Pt.payload.attachment_id}):Wt})};default:return[]}},er=function(ut){var Pt,bt,It=ut.onClose,Mt=ut.onOk,ht=ut.identifier,pt=ut.active,Wt=G.a.useForm(),mt=Object(o.a)(Wt,1),Zt=mt[0],Rt=Object(t.useState)({}),rn=Object(o.a)(Rt,2),Un=rn[0],Sn=rn[1],mn=Object(t.useState)(!1),Hn=Object(o.a)(mn,2),wn=Hn[0],jn=Hn[1],Mn=Object(t.useState)(!1),nr=Object(o.a)(Mn,2),Gn=nr[0],lr=nr[1],vr=Object(t.useReducer)(un,{videoList:[]}),qn=Object(o.a)(vr,2),Rn=qn[0],Jn=qn[1],Dn=Object(Dt.x)(),Bt=Object(b.i)(),cn=Object(t.useRef)();Object(t.useEffect)(function(){pt&&Zn()},[pt]);var Zn=function(){var hn=Object(f.a)(i.a.mark(function Cn(){var vn,rr,Xn,Yn,Sr,Nr,Ci,Wr,Ri,Bi,Wi,Mi;return i.a.wrap(function(In){for(;;)switch(In.prev=In.next){case 0:return In.next=2,Object(m.k)(ht,{active:pt});case 2:vn=In.sent,(vn==null?void 0:vn.status)===0&&(Nr={name:vn==null||((rr=vn.data)===null||rr===void 0)?void 0:rr.name,content:vn==null||((Xn=vn.data)===null||Xn===void 0)?void 0:Xn.content},Zt.setFieldsValue(Nr),Sn(Nr),vn!=null&&(Yn=vn.data)!==null&&Yn!==void 0&&(Sr=Yn.videos)!==null&&Sr!==void 0&&Sr[0]&&Jn({type:"replaceVideo",payload:[{video_id:vn==null||((Ci=vn.data)===null||Ci===void 0||((Wr=Ci.videos)===null||Wr===void 0||((Ri=Wr[0])===null||Ri===void 0)))?void 0:Ri.video_id,name:vn==null||((Bi=vn.data)===null||Bi===void 0||((Wi=Bi.videos)===null||Wi===void 0||((Mi=Wi[0])===null||Mi===void 0)))?void 0:Mi.title,loaded:100}]}));case 4:case"end":return In.stop()}},Cn)}));return function(){return hn.apply(this,arguments)}}(),or=function(Cn,vn){Sn(Object(a.a)({},vn))},Qn=function(){var hn=Object(f.a)(i.a.mark(function Cn(vn){var rr,Xn,Yn,Sr,Nr;return i.a.wrap(function(Wr){for(;;)switch(Wr.prev=Wr.next){case 0:if(Xn={videos:Rn.videoList,articles:vn},lr(!0),!pt){Wr.next=9;break}return Xn.active=pt,Wr.next=6,Object(m.j)(ht,Xn);case 6:Yn=Wr.sent,Wr.next=12;break;case 9:return Wr.next=11,Object(m.a)(ht,Xn);case 11:Yn=Wr.sent;case 12:((rr=Yn)===null||rr===void 0?void 0:rr.status)===0&&(console.log(pt||((Sr=Yn)===null||Sr===void 0?void 0:Sr.id),44),Mt(pt||((Nr=Yn)===null||Nr===void 0?void 0:Nr.id))),lr(!1);case 14:case"end":return Wr.stop()}},Cn)}));return function(vn){return hn.apply(this,arguments)}}(),Tn=function(){var Cn=document.getElementById("fileUpload");Cn.value=""},Fn=function(Cn){var vn='{"Vod":{}}';if(jn(!0),cn.current){cn.current.addFile(Cn,null,null,null,vn);return}Object(nn.a)(Dn==null?void 0:Dn.login,"",{create:!cn,addFileSuccess:function(Xn){Jn({type:"addVideo",payload:{uploadInfo:Xn}})},onUploadProgress:function(Xn,Yn,Sr){var Nr=Math.ceil(Sr*100);Jn({type:"updateProgress",payload:{uploadInfo:Xn,progressPercent:Nr}}),Tn()},onUploadFailed:function(Xn){w.b.info("\u89C6\u9891\u4E91\u670D\u52A1\u51FA\u73B0\u5F02\u5E38\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20\u3002")},onUploadEnd:function(Xn){jn(!1)},onUploadSucceed:function(Xn){jn(!1)},onUploadError:function(Xn){jn(!1)},gotUploader:function(Xn){Xn.addFile(Cn,null,null,null,vn),cn.current=Xn}})},on=function(Cn){var vn,rr=1024,Xn=Cn.target.files[0];if(!Xn){Tn();return}var Yn=Xn.name.toLowerCase();if(Yn&&Yn.indexOf(".avi")==-1&&Yn.indexOf(".flv")==-1&&Yn.indexOf(".f4v")==-1&&Yn.indexOf(".m4v")==-1&&Yn.indexOf(".mov")==-1&&Yn.indexOf(".mp4")==-1&&Yn.indexOf(".rmvb")==-1&&Yn.indexOf(".swf")==-1&&Yn.indexOf(".webm")==-1&&Yn.indexOf(".wmv")==-1){w.b.info("\u4E0D\u652F\u6301\u7684\u89C6\u9891\u683C\u5F0F"),Tn();return}if(Xn.size>rr*1024*1024){w.b.info("\u89C6\u9891\u5927\u5C0F\u8D85\u8FC7".concat(rr,"M")),Tn();return}if((vn=Rn.videoList)!==null&&vn!==void 0&&vn.find(function(Sr){return Sr.name===Xn.name})){w.b.info("\u4F60\u4E0D\u80FD\u4E0A\u4F20\u540C\u4E00\u4E2A\u89C6\u9891\u6587\u4EF6\u540D\u79F0\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u3002"),Tn();return}Fn(Xn)},bn=function(Cn,vn){p.a.confirm({title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:n.a.createElement("div",{className:"tc"},"\u60A8\u786E\u8BA4\u8981",vn?"\u5220\u9664":"\u53D6\u6D88\u4E0A\u4F20","\u8BE5\u89C6\u9891\u5417\uFF1F"),onOk:function(){Tn(),Jn({type:"removeVideo",payload:{name:Cn}})}})},Ft=function(){return n.a.createElement("label",{htmlFor:"fileUpload",className:St.a.main},n.a.createElement("img",{src:Ut.a,alt:""}),n.a.createElement("span",null,"\u4E0A\u4F20\u89C6\u9891"))},Kt=function(Cn){return n.a.createElement("div",{className:St.a.mainLoading},n.a.createElement("div",{className:St.a.proWarp},n.a.createElement("div",{className:St.a.pro},n.a.createElement("div",{style:{width:Cn}})),n.a.createElement("span",null,Cn||0,"%")),n.a.createElement("aside",null,"\u4E0A\u4F20\u4E2D"),n.a.createElement("div",{className:St.a.tip},n.a.createElement(Ct.a,{getPopupContainer:function(rr){return rr.parentNode},title:n.a.createElement("div",null,n.a.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",n.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"),n.a.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),n.a.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},n.a.createElement("img",{src:ln.a,alt:""}))))},Yt=function(Cn){return n.a.createElement("div",{className:St.a.mainSucceed},n.a.createElement("img",{src:En.a,alt:""}),n.a.createElement("span",null,"\u4E0A\u4F20\u6210\u529F"),n.a.createElement("div",{className:St.a.tip},n.a.createElement(Ct.a,{getPopupContainer:function(rr){return rr.parentNode},title:n.a.createElement("div",null,n.a.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",n.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"),n.a.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),n.a.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},n.a.createElement("img",{src:ln.a,alt:""}))),n.a.createElement("div",{className:St.a.del,onClick:function(){return bn(Cn.name,Cn.loaded==100)}},n.a.createElement("i",{className:"iconfont icon-shanchu7 mr5"}),"\u5220\u9664\u89C6\u9891"))},fn=function(){var Cn;return n.a.createElement(n.a.Fragment,null,(Cn=Rn.videoList)===null||Cn===void 0?void 0:Cn.map(function(vn,rr){return n.a.createElement(n.a.Fragment,{key:rr},vn.loaded==100?Yt(vn):Kt(vn.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:It})},kn=(Pt=Rn.videoList)===null||Pt===void 0?void 0:Pt.length;return n.a.createElement("div",{className:St.a.listForm},n.a.createElement("header",null,pt?"\u7F16\u8F91":"\u53D1\u5E03","\u9898\u89E3"),n.a.createElement("section",{className:St.a.scroll,id:"sss"},n.a.createElement("div",{className:St.a.formWrap}," ",n.a.createElement(G.a,{form:Zt,scrollToFirstError:!0,layout:"vertical",onValuesChange:or,onFinish:Qn},n.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"}]},n.a.createElement(Z.a,{bordered:!1,placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26",suffix:"".concat(((bt=Un.name)===null||bt===void 0?void 0:bt.length)||0,"/60")})),n.a.createElement(G.a.Item,{name:"content",label:"\u5185\u5BB9:"},n.a.createElement(Ee.a,{defaultValue:Un.content||"",watch:!0})))),n.a.createElement("div",{className:St.a.upload},kn?fn():Ft(),n.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/*"}))),n.a.createElement("div",{className:St.a.btns},n.a.createElement(ee.a,{onClick:qt,type:"primary",ghost:!0},"\u5173\u95ED"),n.a.createElement(ee.a,{loading:Gn,disabled:wn,onClick:function(){return Zt.submit()},type:"primary"},"\u53D1\u5E03\u9898\u89E3")))},ir=er,gt=W("cWXX"),yr=W("/ezw"),Cr=W("CaVn"),gn=W.n(Cr),Ln=W("s8/Y"),_r=W.n(Ln),Jr=W("JOrW"),kr=W.n(Jr),tr=W("gqXR"),fr=W.n(tr),Ei=W("14J3"),Er=W("BMrR"),ur=W("jCWc"),xr=W("kPKH"),zr=W("wW8i"),Rr=W.n(zr),Gr=W("MVJL"),br=W.n(Gr),xi=function(ut){var Pt=ut.id,bt=ut.cb,It=Object(t.useState)(""),Mt=Object(o.a)(It,2),ht=Mt[0],pt=Mt[1];return n.a.createElement("aside",{className:"mt10"},n.a.createElement(Ee.a,{defaultValue:ht,id:"writeForumsReviewId",onChange:function(mt){pt(mt)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),n.a.createElement(Er.a,null,n.a.createElement(xr.a,{flex:"1"}),n.a.createElement(xr.a,null,n.a.createElement(ee.a,{type:"primary",size:"large",onClick:Object(f.a)(i.a.mark(function Wt(){return i.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:ht===""?w.b.error("\u8BF7\u8F93\u5165\u5185\u5BB9"):bt(Pt,ht);case 1:case"end":return Zt.stop()}},Wt)}))},"\u53D1\u9001"))))},oi=function(ut){var Pt,bt=ut.data;return n.a.createElement("div",{className:br.a.thirdlyLevelDiscuss},n.a.createElement("span",{className:"c-grey-333"},n.a.createElement("span",{className:"font 14 c-light-primary"},bt==null||((Pt=bt.author)===null||Pt===void 0)?void 0:Pt.name),"@",n.a.createElement("span",{className:"font 14 c-light-primary"},bt==null?void 0:bt.parent_name),":"),n.a.createElement(at.a,{value:bt==null?void 0:bt.content}))},Br=function(ut){var Pt,bt,It,Mt,ht=ut.data,pt=ut.onReplyDiscuss,Wt=ut.thirdlyReply,mt=ut.setThirdlyReply,Zt=Object(Dt.x)();return console.log(Zt,"user"),n.a.createElement("div",{className:br.a.list},n.a.createElement("img",{src:x.a.IMG_SERVER+"/images/"+(ht==null||((Pt=ht.author)===null||Pt===void 0)?void 0:Pt.image_url)}),n.a.createElement("div",{className:br.a.wrap},n.a.createElement("div",{className:"font14",style:{marginBottom:6}},n.a.createElement("span",{className:"c-grey-333"},ht==null||((bt=ht.author)===null||bt===void 0)?void 0:bt.name),(Zt==null?void 0:Zt.login)!==(ht==null||((It=ht.author)===null||It===void 0)?void 0:It.login)&&n.a.createElement("span",{onClick:function(){return mt(ht==null?void 0:ht.id)},className:"c-grey-999 current",style:{float:"right"}},n.a.createElement("i",{className:"iconfont icon-huifu3 mr3 font12"}),n.a.createElement("span",null,"\u56DE\u590D"))),n.a.createElement(at.a,{value:ht==null?void 0:ht.content}),ht==null||((Mt=ht.children)===null||Mt===void 0)?void 0:Mt.map(function(Rt){return n.a.createElement(oi,{key:Rt.id,data:Rt})}),Wt===(ht==null?void 0:ht.id)&&n.a.createElement("div",null,n.a.createElement(xi,{id:ht==null?void 0:ht.id,cb:pt}),n.a.createElement("div",{style:{textAlign:"end",paddingTop:20},onClick:function(){return mt(null)},className:"c-light-primary current"},n.a.createElement("i",{style:{transform:"scale(0.7)",display:"inline-block"},className:"iconfont icon-shouqi font12"}),"\u6536\u8D77\u56DE\u590D")),n.a.createElement("div",{className:br.a.line})))},ci=function(ut){var Pt,bt,It,Mt,ht=ut.data,pt=ut.onReplyDiscuss,Wt=ut.secondReply,mt=ut.setSecondReply,Zt=ut.thirdlyReply,Rt=ut.setThirdlyReply,rn=ut.onPlusDiscuss,Un=Object(t.useState)(!1),Sn=Object(o.a)(Un,2),mn=Sn[0],Hn=Sn[1];return console.log(ht,"data"),n.a.createElement("div",{className:br.a.discussItem},n.a.createElement("div",{className:br.a.list},n.a.createElement("img",{src:x.a.IMG_SERVER+"/images/"+(ht==null||((Pt=ht.author)===null||Pt===void 0)?void 0:Pt.image_url)}),n.a.createElement("div",{className:br.a.wrap},n.a.createElement("div",{className:"font14",style:{marginBottom:6}},n.a.createElement("span",{className:"c-grey-333 mr30"},ht==null||((bt=ht.author)===null||bt===void 0)?void 0:bt.name),n.a.createElement("span",{className:"c-grey-999"},ht==null?void 0:ht.time)),n.a.createElement(at.a,{value:ht==null?void 0:ht.content}),n.a.createElement("div",{className:br.a.btns},n.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"},n.a.createElement("i",{className:"iconfont icon-xiaodianzan2 mr3"}),n.a.createElement("span",null,ht==null?void 0:ht.praise_count)),n.a.createElement("div",{onClick:function(){var jn;if((ht==null||((jn=ht.children)===null||jn===void 0)?void 0:jn.length)===0)return;mt(null),Hn(!mn)},style:{color:mn?"#0152d9":"#999999"}},n.a.createElement("i",{className:"iconfont icon-xiaopinglun2 mr3"}),n.a.createElement("span",null,mn?"\u6536\u8D77\u8BC4\u8BBA":ht==null||((It=ht.children)===null||It===void 0)?void 0:It.length)),n.a.createElement("div",{onClick:function(){Hn(!1),mt(Wt===(ht==null?void 0:ht.id)?null:ht==null?void 0:ht.id)},style:{color:Wt===(ht==null?void 0:ht.id)?"#0152d9":"#999999"}},n.a.createElement("i",{className:"iconfont icon-huifu3 mr3"}),n.a.createElement("span",null,Wt===(ht==null?void 0:ht.id)?"\u6536\u8D77\u56DE\u590D":"\u56DE\u590D"))),Wt===(ht==null?void 0:ht.id)&&n.a.createElement(xi,{id:ht==null?void 0:ht.id,cb:function(jn,Mn){pt(jn,Mn),Hn(!0)}}),mn&&n.a.createElement("div",{className:br.a.secondLevelDiscuss},ht==null||((Mt=ht.children)===null||Mt===void 0)?void 0:Mt.map(function(wn){return n.a.createElement(Br,{thirdlyReply:Zt,setThirdlyReply:Rt,key:wn.id,data:wn,onReplyDiscuss:pt})})))))},Ni=ci,Si=function(ut){var Pt=ut.identifier,bt=ut.active,It=ut.onOk,Mt=Object(t.useState)(""),ht=Object(o.a)(Mt,2),pt=ht[0],Wt=ht[1],mt=Object(t.useState)(1),Zt=Object(o.a)(mt,2),Rt=Zt[0],rn=Zt[1],Un=Object(t.useState)([]),Sn=Object(o.a)(Un,2),mn=Sn[0],Hn=Sn[1],wn=Object(t.useState)(0),jn=Object(o.a)(wn,2),Mn=jn[0],nr=jn[1],Gn=Object(t.useState)(null),lr=Object(o.a)(Gn,2),vr=lr[0],qn=lr[1],Rn=Object(t.useState)(null),Jn=Object(o.a)(Rn,2),Dn=Jn[0],Bt=Jn[1];Object(t.useEffect)(function(){cn(1),rn(1)},[bt]);var cn=function(){var Fn=Object(f.a)(i.a.mark(function on(bn){var Ft;return i.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:return Yt.next=2,pe({container_type:"QuestionSolutionArticle",container_identifier:bt,limit:5,page:bn});case 2:Ft=Yt.sent,Ft!=null&&Ft.comments&&(Hn((Ft==null?void 0:Ft.comments)||[]),rn(bn),nr(Ft==null?void 0:Ft.disscuss_count));case 4:case"end":return Yt.stop()}},on)}));return function(bn){return Fn.apply(this,arguments)}}(),Zn=function(){var Fn=Object(f.a)(i.a.mark(function on(){var bn;return i.a.wrap(function(Kt){for(;;)switch(Kt.prev=Kt.next){case 0:if(!(pt==="")){Kt.next=3;break}return w.b.error("\u8BF7\u8F93\u5165\u5185\u5BB9"),Kt.abrupt("return");case 3:return Kt.next=5,we({comments:{content:pt},container_type:"QuestionSolutionArticle",container_identifier:bt});case 5:bn=Kt.sent,bn!=null&&bn.discuss&&(Wt(""),cn(Rt),It());case 7:case"end":return Kt.stop()}},on)}));return function(){return Fn.apply(this,arguments)}}(),or=function(){var Fn=Object(f.a)(i.a.mark(function on(bn,Ft,Kt){var Yt;return i.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return qt.next=2,Ce({container_type:"QuestionSolutionArticle",container_identifier:bt,comments:{content:Ft,parent_id:bn}});case 2:Yt=qt.sent,qn(null),Bt(null),cn(Rt);case 6:case"end":return qt.stop()}},on)}));return function(bn,Ft,Kt){return Fn.apply(this,arguments)}}(),Qn=function(){var Fn=Object(f.a)(i.a.mark(function on(bn){var Ft;return i.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:return Yt.next=2,be(bn);case 2:Ft=Yt.sent,cn(Rt);case 4:case"end":return Yt.stop()}},on)}));return function(bn){return Fn.apply(this,arguments)}}(),Tn=function(on){rn(on),cn(on)};return n.a.createElement("div",{className:Rr.a.discuss},n.a.createElement("aside",{className:Rr.a.reply,style:{borderWidth:Mn?1:0}},n.a.createElement(Ee.a,{defaultValue:pt,id:"writeForumsReviewId",onChange:function(on){Wt(on)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),n.a.createElement(Er.a,null,n.a.createElement(xr.a,{flex:"1"}),n.a.createElement(xr.a,null,n.a.createElement(ee.a,{type:"primary",size:"large",onClick:function(){return Zn()}},"\u53D1\u9001")))),mn==null?void 0:mn.map(function(Fn){return n.a.createElement(Ni,{secondReply:vr,setSecondReply:qn,thirdlyReply:Dn,setThirdlyReply:Bt,key:Fn.id,data:Fn,onReplyDiscuss:or,onPlusDiscuss:Qn})}),n.a.createElement(_e.a,{className:Rr.a.pagination,showTotal:function(on){return n.a.createElement("span",{style:{color:"#656F87"}},"\u5171",n.a.createElement("span",{className:"c-light-primary"},on),"\u6761\u6570\u636E")},current:Rt,onChange:Tn,total:Mn,showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,pageSize:5}))},di=Si,hr=W("hgre"),pr=function(ut){var Pt,bt,It,Mt,ht,pt,Wt,mt,Zt,Rt,rn=ut.active,Un=ut.identifier,Sn=ut.onAssist,mn=ut.onEdit,Hn=ut.onArticlesSkip,wn=ut.onClose,jn=ut.onOk,Mn=ut.onDelete,nr=ut.detailsIndex,Gn=ut.btnShowStatus,lr=Object(t.useState)(!0),vr=Object(o.a)(lr,2),qn=vr[0],Rn=vr[1],Jn=Object(t.useState)({}),Dn=Object(o.a)(Jn,2),Bt=Dn[0],cn=Dn[1];Object(t.useEffect)(function(){rn&&Zn()},[rn,nr]);var Zn=function(){var on=Object(f.a)(i.a.mark(function bn(){var Ft,Kt,Yt=arguments;return i.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return Ft=Yt.length>0&&Yt[0]!==void 0?Yt[0]:!0,Ft&&Rn(!0),qt.next=4,Object(m.d)(Un,{active:rn});case 4:Kt=qt.sent,(Kt==null?void 0:Kt.status)===0&&cn((Kt==null?void 0:Kt.data)||{}),Rn(!1);case 7:case"end":return qt.stop()}},bn)}));return function(){return on.apply(this,arguments)}}(),or=function(){var on=Object(f.a)(i.a.mark(function bn(Ft){var Kt;return i.a.wrap(function(fn){for(;;)switch(fn.prev=fn.next){case 0:return fn.next=2,Object(m.g)(Un,Object(a.a)({active:rn},Ft));case 2:Kt=fn.sent,(Kt==null?void 0:Kt.status)===0&&(Zn(!1),jn());case 4:case"end":return fn.stop()}},bn)}));return function(Ft){return on.apply(this,arguments)}}(),Qn=function(){var on=Object(f.a)(i.a.mark(function bn(Ft){var Kt;return i.a.wrap(function(fn){for(;;)switch(fn.prev=fn.next){case 0:return fn.next=2,Object(m.c)(Un,{active:Ft==null?void 0:Ft.id});case 2:Kt=fn.sent,Kt.status===0&&(Zn(!1),jn());case 4:case"end":return fn.stop()}},bn)}));return function(Ft){return on.apply(this,arguments)}}(),Tn=function(bn){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 Mn(bn)}})},Fn=function(){Zn(!1),jn()};return n.a.createElement("div",{className:gn.a.listDetails},n.a.createElement(yr.a,{className:"pt20 pl20 pr20",loading:qn,active:!0,paragraph:{rows:5}},n.a.createElement("div",{className:gn.a.head},n.a.createElement("div",{className:gn.a.name},n.a.createElement("div",{title:Bt==null?void 0:Bt.name,className:gn.a.title},Bt==null?void 0:Bt.name),(Bt==null?void 0:Bt.is_authority)&&n.a.createElement("div",{className:gn.a.b},"\u5B98\u65B9"),(Bt==null?void 0:Bt.is_excellent)&&n.a.createElement("div",{className:gn.a.a},"\u7CBE\u9009")),n.a.createElement("div",{className:gn.a.tag},n.a.createElement("img",{src:x.a.IMG_SERVER+"/images/"+(Bt==null?void 0:Bt.image_url)}),n.a.createElement("div",{className:"c-grey-333 ml5 mr20 font14"},Bt==null?void 0:Bt.username),n.a.createElement("div",{style:{display:"inline-block",marginBottom:-2},className:"c-grey-999 mr20 font12"},"\u53D1\u5E03\u4E8E",Ne()(Bt==null?void 0:Bt.created_at).format("YYYY-MM-DD")),n.a.createElement("span",null,n.a.createElement("img",{src:H.a}),n.a.createElement("span",null,Bt==null?void 0:Bt.praises_count)),n.a.createElement("span",null,n.a.createElement("img",{src:Se.a}),n.a.createElement("span",null,Bt==null?void 0:Bt.discusses_count)),n.a.createElement("span",null,n.a.createElement("img",{src:qe.a}),n.a.createElement("span",null,Bt==null?void 0:Bt.viewed_count)),n.a.createElement("div",{className:gn.a.btn},(Object(Dt.v)()||(Bt==null?void 0:Bt.is_self))&&n.a.createElement(n.a.Fragment,null,n.a.createElement(ee.a,{onClick:function(){return Tn(Bt)},type:"primary",ghost:!0},"\u5220\u9664"),n.a.createElement(ee.a,{onClick:function(){return mn(Bt)},type:"primary",ghost:!0},"\u7F16\u8F91")),Object(Dt.v)()&&n.a.createElement(ee.a,{onClick:function(){return or({is_authority:!(Bt!=null&&Bt.is_authority)})},type:"primary"},n.a.createElement("img",{src:kr.a}),Bt!=null&&Bt.is_authority?"\u53D6\u6D88":"\u8BBE\u4E3A","\u5B98\u65B9"),Object(Dt.v)()&&n.a.createElement(ee.a,{onClick:function(){return or({is_excellent:!(Bt!=null&&Bt.is_excellent)})},type:"primary"},n.a.createElement("img",{src:_r.a}),Bt!=null&&Bt.is_excellent?"\u53D6\u6D88":"\u8BBE\u4E3A","\u7CBE\u9009")))),n.a.createElement("div",{className:gn.a.scroll},(Bt==null||((Pt=Bt.videos)===null||Pt===void 0||((bt=Pt[0])===null||bt===void 0))?void 0:bt.id)&&n.a.createElement("div",{className:gn.a.video},n.a.createElement(E.a,{tip:"\u6B63\u5728\u8F6C\u7801\uFF0C\u8BF7\u7A0D\u7B49...",spinning:!(Bt!=null&&(It=Bt.videos)!==null&&It!==void 0&&(Mt=It[0])!==null&&Mt!==void 0&&Mt.transcoded)},n.a.createElement(hr.a,{poster:Bt==null||((ht=Bt.videos)===null||ht===void 0||((pt=ht[0])===null||pt===void 0))?void 0:pt.cover_url,src:(Bt==null||((Wt=Bt.videos)===null||Wt===void 0||((mt=Wt[0])===null||mt===void 0))?void 0:mt.play_url)||"",videoId:Bt==null||((Zt=Bt.videos)===null||Zt===void 0||((Rt=Zt[0])===null||Rt===void 0))?void 0:Rt.id,logWatchHistory:function(){}}))),n.a.createElement(at.a,{className:gn.a.html,value:(Bt==null?void 0:Bt.content)||""}),n.a.createElement("div",{onClick:function(){return Qn(Bt)},className:gn.a.g},n.a.createElement("img",{className:"mr10",src:(Bt!=null&&Bt.user_liker,fr.a)}),n.a.createElement("span",null,Bt==null?void 0:Bt.praises_count)),n.a.createElement(di,{onOk:Fn,active:rn,identifier:Un})),n.a.createElement("div",{className:gn.a.btns},n.a.createElement(ee.a,{onClick:function(){return wn()},type:"primary",ghost:!0},"\u5173\u95ED"),Gn[0]&&n.a.createElement(ee.a,{onClick:function(bn){return Hn(bn,"prev")},style:{marginLeft:20},type:"primary"},"\u4E0A\u4E00\u9898\u89E3"),Gn[1]&&n.a.createElement(ee.a,{onClick:function(bn){return Hn(bn,"next")},style:{marginLeft:20},type:"primary"},"\u4E0B\u4E00\u9898\u89E3"))))},Qr=pr,Ui=W("3tLw"),Li=W.n(Ui),fi=W("ek7X"),ea=W("0NbB"),Vi=function(ut){var Pt=ut.identifier,bt=ut.tabStatus,It=ut.setFilterListTotal,Mt=ut.setListStatus,ht={page:1,limit:10,total:0,search:"",save_search:"",sort_by:"updated_at",sort_direction:null},pt=Object(t.useState)(Object(a.a)({},ht)),Wt=Object(o.a)(pt,2),mt=Wt[0],Zt=Wt[1],Rt=Object(t.useState)(!1),rn=Object(o.a)(Rt,2),Un=rn[0],Sn=rn[1],mn=Object(t.useState)(0),Hn=Object(o.a)(mn,2),wn=Hn[0],jn=Hn[1],Mn=Object(t.useState)(1),nr=Object(o.a)(Mn,2),Gn=nr[0],lr=nr[1],vr=Object(t.useState)(null),qn=Object(o.a)(vr,2),Rn=qn[0],Jn=qn[1],Dn=Object(t.useState)([]),Bt=Object(o.a)(Dn,2),cn=Bt[0],Zn=Bt[1],or=Object(t.useState)([!0,!0]),Qn=Object(o.a)(or,2),Tn=Qn[0],Fn=Qn[1],on=Object(t.useState)(0),bn=Object(o.a)(on,2),Ft=bn[0],Kt=bn[1],Yt=Object(t.useRef)(null);Object(t.useEffect)(function(){Sr()},[bt]),Object(t.useEffect)(function(){fn()},[Rn]),Object(t.useEffect)(function(){kn(Object(a.a)({},ht)),Sr()},[Pt]),Object(t.useEffect)(function(){return window.addEventListener("resize",qt),Mt(Ft),function(){window.removeEventListener("resize",qt)}},[Ft]);var fn=function(){var In=Object(f.a)(i.a.mark(function pn(){var Nn,$n;return i.a.wrap(function(Bn){for(;;)switch(Bn.prev=Bn.next){case 0:if(Rn){Bn.next=3;break}return Fn([!0,!0]),Bn.abrupt("return");case 3:Nn=[!0,!0],$n=cn==null?void 0:cn.findIndex(function(mi){return mi.id===Rn}),$n===0&&mt.page===1&&(Nn[0]=!1),(mt.page-1)*mt.limit+($n+1)===mt.total&&(Nn[1]=!1),Fn(Nn);case 8:case"end":return Bn.stop()}},pn)}));return function(){return In.apply(this,arguments)}}(),qt=function(){if(Ft){var pn,Nn=window.innerWidth-((pn=Yt.current)===null||pn===void 0?void 0:pn.clientWidth);jn(Nn)}},kn=function(){var In=Object(f.a)(i.a.mark(function pn(Nn){var $n,Or,Bn,mi;return i.a.wrap(function(Kr){for(;;)switch(Kr.prev=Kr.next){case 0:return Sn(!0),Kr.next=3,Object(m.f)(Pt,Nn);case 3:return $n=Kr.sent,($n==null?void 0:$n.status)===0&&(Zn(($n==null||((Or=$n.data)===null||Or===void 0)?void 0:Or.articles)||[]),Zt(Object(a.a)(Object(a.a)({},Nn),{},{total:$n==null||((Bn=$n.data)===null||Bn===void 0)?void 0:Bn.articles_count})),It($n==null||((mi=$n.data)===null||mi===void 0)?void 0:mi.articles_count)),Sn(!1),Kr.abrupt("return",$n);case 7:case"end":return Kr.stop()}},pn)}));return function(Nn){return In.apply(this,arguments)}}(),hn=function(){(mt==null?void 0:mt.sort_direction)===null?mt.sort_direction="asc":(mt==null?void 0:mt.sort_direction)==="asc"?mt.sort_direction="desc":(mt==null?void 0:mt.sort_direction)==="desc"&&(mt.sort_direction=null),mt.page=1,Sr(),Zt(Object(a.a)({},mt)),kn(mt)},Cn=function(){mt.page=1,mt.search=mt==null?void 0:mt.save_search,Sr(),Zt(Object(a.a)({},mt)),kn(mt)},vn=function(){var pn,Nn=document.getElementsByClassName("btn-resize");Nn[0].style.visibility="hidden";var $n=window.innerWidth-((pn=Yt.current)===null||pn===void 0?void 0:pn.clientWidth);jn($n)},rr=function(){vn(),Kt(1)},Xn=function(pn){vn(),Jn(pn==null?void 0:pn.id),Kt(3)},Yn=function(pn){vn(),Jn(pn==null?void 0:pn.id),Kt(2)},Sr=function(){var pn=document.getElementsByClassName("btn-resize");pn[0].style.visibility="visible",jn(0),Kt(0),Jn(null)},Nr=function(pn){Kt(3),Jn(pn),mt.page=1,Zt(Object(a.a)({},mt)),kn(mt)},Ci=function(pn){Kt(3),Jn(pn),Zt(Object(a.a)({},mt)),kn(mt)},Wr=function(pn){Zt(Object(a.a)({},mt)),kn(mt)},Ri=function(){var In=Object(f.a)(i.a.mark(function pn(Nn){var $n;return i.a.wrap(function(Bn){for(;;)switch(Bn.prev=Bn.next){case 0:return Bn.next=2,Object(m.c)(Pt,{active:Nn==null?void 0:Nn.id});case 2:$n=Bn.sent,$n.status===0&&(kn(mt),lr(Gn+1));case 4:case"end":return Bn.stop()}},pn)}));return function(Nn){return In.apply(this,arguments)}}(),Bi=function(){var In=Object(f.a)(i.a.mark(function pn(Nn){var $n;return i.a.wrap(function(Bn){for(;;)switch(Bn.prev=Bn.next){case 0:return Bn.next=2,Object(m.e)(Pt,{active:Nn==null?void 0:Nn.id});case 2:$n=Bn.sent,$n.status===0&&(kn(mt),lr(Gn+1));case 4:case"end":return Bn.stop()}},pn)}));return function(Nn){return In.apply(this,arguments)}}(),Wi=function(){var In=Object(f.a)(i.a.mark(function pn(Nn){var $n;return i.a.wrap(function(Bn){for(;;)switch(Bn.prev=Bn.next){case 0:return Bn.next=2,Object(m.i)(Pt,{active:Nn==null?void 0:Nn.id});case 2:$n=Bn.sent,$n.status===0&&(Sr(),kn(mt));case 4:case"end":return Bn.stop()}},pn)}));return function(Nn){return In.apply(this,arguments)}}(),Mi=function(pn){mt.page=pn,Zt(Object(a.a)({},mt)),kn(mt)},_a=function(){var In=Object(f.a)(i.a.mark(function pn(Nn,$n){var Or,Bn,mi,si,Kr,Dr,ri,ei,An,_n,Wn;return i.a.wrap(function(On){for(;;)switch(On.prev=On.next){case 0:if(Or=cn==null?void 0:cn.findIndex(function(cr){return cr.id===Rn}),console.log(Or,$n,22),!($n==="prev")){On.next=21;break}if(!(Or===void 0)){On.next=6;break}return w.b.warn("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728"),On.abrupt("return");case 6:if(!(Or===0)){On.next=19;break}if(!(mt.page===1)){On.next=10;break}return w.b.warn("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728"),On.abrupt("return");case 10:if(!(mt.page!==1)){On.next=17;break}return mt.page=mt.page-1,Zt(Object(a.a)({},mt)),On.next=15,kn(mt);case 15:Bn=On.sent,(Bn==null?void 0:Bn.status)===0&&(Dr=Bn==null||((mi=Bn.data)===null||mi===void 0)?void 0:mi.articles[(Bn==null||((si=Bn.data)===null||si===void 0||((Kr=si.articles)===null||Kr===void 0))?void 0:Kr.length)-1],Jn(Dr==null?void 0:Dr.id),console.log(Nn.target,555));case 17:On.next=21;break;case 19:ri=cn[Or-1],Jn(ri==null?void 0:ri.id);case 21:if(!($n==="next")){On.next=39;break}if(!(Or===void 0)){On.next=25;break}return w.b.warn("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728"),On.abrupt("return");case 25:if(!((mt.page-1)*mt.limit+(Or+1)===mt.total)){On.next=28;break}return w.b.warn("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728"),On.abrupt("return");case 28:if(!(Or+1===mt.limit)){On.next=37;break}return mt.page=mt.page+1,Zt(Object(a.a)({},mt)),On.next=33,kn(mt);case 33:ei=On.sent,(ei==null?void 0:ei.status)===0&&(_n=ei==null||((An=ei.data)===null||An===void 0)?void 0:An.articles[0],Jn(_n==null?void 0:_n.id)),On.next=39;break;case 37:Wn=cn[Or+1],Jn(Wn==null?void 0:Wn.id);case 39:case"end":return On.stop()}},pn)}));return function(Nn,$n){return In.apply(this,arguments)}}();return n.a.createElement("div",{className:yt.a.wrap,ref:Yt},n.a.createElement("div",{className:yt.a.head},n.a.createElement("div",{className:yt.a.sort,onClick:hn},n.a.createElement("span",null,"\u6700\u65B0"),n.a.createElement("aside",null,n.a.createElement(fi.a,{style:{color:(mt==null?void 0:mt.sort_direction)==="asc"?"#0152d9":"#bfbfbf"}}),n.a.createElement(ea.a,{style:{color:(mt==null?void 0:mt.sort_direction)==="desc"?"#0152d9":"#bfbfbf"}}))),n.a.createElement(Z.a.Search,{value:mt.save_search,className:yt.a["oj-width-input"],placeholder:"\u641C\u7D22\u9898\u89E3",onChange:function(pn){mt.save_search=pn.target.value,Zt(Object(a.a)({},mt))},onSearch:Cn}),n.a.createElement("div",{onClick:rr,className:yt.a.btn},n.a.createElement("img",{src:Li.a}),"\u5199\u9898\u89E3")),n.a.createElement("div",{className:yt.a.listWarp},n.a.createElement(E.a,{spinning:Un,className:"mt20"},cn==null?void 0:cn.map(function(In,pn){var Nn=!0;return pn+1===cn.length&&pn!==0&&(Nn=!1),n.a.createElement(Lt,{active:Rn,key:In.id,data:In,showLine:Nn,onClick:Xn,onAssist:Ri,onHide:Bi})}),(cn==null?void 0:cn.length)===0&&n.a.createElement(k.a,{customText:"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"}))),n.a.createElement(_e.a,{className:yt.a.pagination,showTotal:function(pn){return n.a.createElement("span",{style:{color:"#656F87"}},"\u5171",n.a.createElement("span",{className:"c-light-primary"},pn),"\u6761\u6570\u636E")},total:mt.total,showSizeChanger:!1,current:mt==null?void 0:mt.page,onChange:Mi,hideOnSinglePage:!0,showQuickJumper:!0}),Ft>0&&n.a.createElement("div",{className:yt.a.fixedRight,style:{width:wn}},Ft===1&&n.a.createElement(ir,{identifier:Pt,onClose:Sr,onOk:Nr}),Ft===2&&n.a.createElement(ir,{active:Rn,identifier:Pt,onClose:Sr,onOk:Ci}),Ft===3&&n.a.createElement(Qr,{btnShowStatus:Tn,onArticlesSkip:_a,detailsIndex:Gn,active:Rn,identifier:Pt,onClose:Sr,onOk:Wr,onEdit:Yn,onAssist:Ri,onDelete:Wi})))},Ir=Vi,wi=W("VEzc"),qr=W.n(wi),Ti=function(ut){var Pt,bt=ut.visible,It=ut.onVisible,Mt=ut.value,ht=ut.onChange,pt=ut.setIndex,Wt={page:1,per_page:30,total:0,tag_discipline_id:[],search:"",save_search:"",difficulty:null},mt=Object(t.useState)(Wt),Zt=Object(o.a)(mt,2),Rt=Zt[0],rn=Zt[1],Un=Object(t.useState)([]),Sn=Object(o.a)(Un,2),mn=Sn[0],Hn=Sn[1],wn=Object(t.useState)([]),jn=Object(o.a)(wn,2),Mn=jn[0],nr=jn[1],Gn=Object(t.useState)(!1),lr=Object(o.a)(Gn,2),vr=lr[0],qn=lr[1],Rn=Object(t.useRef)([]),Jn=Object(t.useRef)(null),Dn=Object(b.i)();Object(t.useEffect)(function(){return Dn!=null&&Dn.id&&(Jn.current=setInterval(function(){Bt(30)},3e4)),function(){clearInterval(Jn.current)}},[]);var Bt=function(){var Ft=Object(f.a)(i.a.mark(function Kt(Yt){var fn;return i.a.wrap(function(kn){for(;;)switch(kn.prev=kn.next){case 0:return kn.next=2,Object(m.r)(Dn==null?void 0:Dn.id,{practice_time:Yt});case 2:fn=kn.sent;case 3:case"end":return kn.stop()}},Kt)}));return function(Yt){return Ft.apply(this,arguments)}}();Object(t.useEffect)(function(){Fn(Rt),Qn()},[]),Object(t.useEffect)(function(){return window.addEventListener("click",Zn),function(){window.removeEventListener("click",Zn)}},[Dn==null?void 0:Dn.save_identifier,bt]),Object(t.useEffect)(function(){var Ft=Rn.current.findIndex(function(kn){return kn.identifier===(Dn==null?void 0:Dn.save_identifier)}),Kt=Rn.current[Ft-1],Yt=Rn.current[Ft+1],fn=document.getElementById("oj-prev"),qt=document.getElementById("oj-next");Kt?fn.style.display="block":fn.style.display="none",Yt?qt.style.display="block":qt.style.display="none"},[Dn==null?void 0:Dn.save_identifier,Rn.current]);var cn=function(Kt,Yt){if(Kt.id===Yt)return Kt;for(var fn=0,qt=Kt;qt=qt.parentNode;fn++){if(qt.id===Yt)return qt;if(qt==document.documentElement)return!1}},Zn=function(){var Ft=Object(f.a)(i.a.mark(function Kt(Yt){var fn,qt,kn;return i.a.wrap(function(Cn){for(;;)switch(Cn.prev=Cn.next){case 0:if(!cn(Yt.target,"oj-drawer")&&bt&&It(!1),fn=Rn.current.findIndex(function(vn){return vn.identifier===(Dn==null?void 0:Dn.save_identifier)}),qt=Rn.current[fn-1],kn=Rn.current[fn+1],!(Yt.target.id==="oj-prev")){Cn.next=14;break}if(!(!qt||fn===-1)){Cn.next=8;break}return w.b.warn("\u4E0A\u4E00\u9898\u4E0D\u5B58\u5728"),Cn.abrupt("return");case 8:return Yt.target.style.pointerEvents="none",Yt.target.style.cursor="not-allowed",Cn.next=12,on(qt==null?void 0:qt.identifier);case 12:pt("0"),setTimeout(function(){Yt.target.style.pointerEvents="auto",Yt.target.style.cursor="pointer"},400);case 14:if(!(Yt.target.id==="oj-next"||Yt.target.id==="oj-modal-next")){Cn.next=24;break}if(!(!kn||fn===-1)){Cn.next=18;break}return w.b.warn("\u4E0B\u4E00\u9898\u4E0D\u5B58\u5728"),Cn.abrupt("return");case 18:return Yt.target.style.pointerEvents="none",Yt.target.style.cursor="not-allowed",Cn.next=22,on(kn==null?void 0:kn.identifier);case 22:pt("0"),setTimeout(function(){Yt.target.style.pointerEvents="auto",Yt.target.style.cursor="pointer"},400);case 24:case"end":return Cn.stop()}},Kt)}));return function(Yt){return Ft.apply(this,arguments)}}();Object(t.useEffect)(function(){ht(Dn==null?void 0:Dn.save_identifier);var Ft=Mn.findIndex(function(Kt){return Kt.some(function(Yt){return Yt.identifier===(Dn==null?void 0:Dn.save_identifier)})});Ft===-1?rn(Object(a.a)(Object(a.a)({},Rt),{},{page:1})):rn(Object(a.a)(Object(a.a)({},Rt),{},{page:Ft+1}))},[Dn==null?void 0:Dn.save_identifier,Mn]);var or=function(Kt){Rt.page=1,Rt.tag_discipline_id=Kt,rn(Object(a.a)({},Rt)),Fn(Rt)},Qn=function(){var Ft=Object(f.a)(i.a.mark(function Kt(){var Yt;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:Yt=qt.sent,Hn(Yt.tag_disciplines||[]);case 4:case"end":return qt.stop()}},Kt)}));return function(){return Ft.apply(this,arguments)}}(),Tn=function(Kt){Rt.page=1,Rt.difficulty=typeof Kt=="number"?Kt:null,rn(Object(a.a)({},Rt)),Fn(Rt)},Fn=function(){var Ft=Object(f.a)(i.a.mark(function Kt(Yt){var fn,qt,kn,hn,Cn,vn;return i.a.wrap(function(Xn){for(;;)switch(Xn.prev=Xn.next){case 0:return qn(!0),Xn.next=3,Object(m.p)(Yt);case 3:if(fn=Xn.sent,fn!=null&&fn.practices_list){for(kn=fn==null||((qt=fn.practices_list)===null||qt===void 0)?void 0:qt.length,hn=[],Cn=0;Cn<kn;Cn+=Rt==null?void 0:Rt.per_page)hn.push(fn==null||((vn=fn.practices_list)===null||vn===void 0)?void 0:vn.slice(Cn,Cn+(Rt==null?void 0:Rt.per_page)));rn(Object(a.a)(Object(a.a)({},Rt),{},{total:fn==null?void 0:fn.practices_count})),Rn.current=(fn==null?void 0:fn.practices_list)||[],nr(hn)}qn(!1);case 6:case"end":return Xn.stop()}},Kt)}));return function(Yt){return Ft.apply(this,arguments)}}(),on=function(){var Ft=Object(f.a)(i.a.mark(function Kt(Yt,fn){var qt;return i.a.wrap(function(hn){for(;;)switch(hn.prev=hn.next){case 0:return hn.next=2,Object(Oe.a)("/api/practices/".concat(Yt,"/start"),{method:"get"});case 2:qt=hn.sent,(qt==null?void 0:qt.status)===0&&y.d.push("/problems/".concat(qt==null?void 0:qt.identifier,"/oj/").concat(Yt));case 4:case"end":return hn.stop()}},Kt)}));return function(Yt,fn){return Ft.apply(this,arguments)}}(),bn=function(Kt){Rt.page=Kt,rn(Object(a.a)({},Rt))};return n.a.createElement("div",{className:qr.a.wrap,id:"oj-drawer",style:{left:bt?0:-700}},n.a.createElement("div",{className:qr.a.head},n.a.createElement("div",{className:qr.a.title},"\u9898\u76EE\u5217\u8868"),n.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(Kt){Rt.save_search=Kt.target.value,rn(Object(a.a)({},Rt))},onSearch:function(){Rt.page=1,Rt.search=Rt.save_search,rn(Object(a.a)({},Rt)),Fn(Rt)}}),n.a.createElement(S.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(Kt){return Kt.parentNode},maxTagTextLength:2,maxTagCount:2,onChange:or},mn.map(function(Ft){return n.a.createElement(S.a.Option,{key:Ft.id,value:Ft.id},Ft.name)})),n.a.createElement(S.a,{style:{width:70,marginLeft:10},allowClear:!0,placeholder:"\u96BE\u5EA6",getPopupContainer:function(Kt){return Kt.parentNode},value:Rt==null?void 0:Rt.difficulty,onChange:Tn},n.a.createElement(S.a.Option,{value:1},"\u7B80\u5355"),n.a.createElement(S.a.Option,{value:2},"\u9002\u4E2D"),n.a.createElement(S.a.Option,{value:3},"\u56F0\u96BE"))),n.a.createElement("div",{className:qr.a.content},n.a.createElement(E.a,{spinning:vr},Mn==null||((Pt=Mn[Rt.page-1])===null||Pt===void 0)?void 0:Pt.map(function(Ft){return n.a.createElement("div",{key:Ft.identifier,className:qr.a.list,onClick:function(Yt){return on(Ft.identifier,Yt)}},n.a.createElement("i",{style:{visibility:Mt===Ft.identifier?"visible":"hidden"},className:"iconfont icon-wancheng1 c-green-29b"}),n.a.createElement("span",{style:{fontWeight:Mt===Ft.identifier?"bold":400,color:Mt===Ft.identifier?"#ffffff":"#bac4cd"},title:Ft==null?void 0:Ft.name},Ft.name),(Ft==null?void 0:Ft.difficulty)===1&&n.a.createElement("b",{style:{color:"#2FA34F"}},"\u7B80\u5355"),(Ft==null?void 0:Ft.difficulty)===2&&n.a.createElement("b",{style:{color:"#0152d9"}},"\u9002\u4E2D"),(Ft==null?void 0:Ft.difficulty)===3&&n.a.createElement("b",{style:{color:"#FA6400"}},"\u56F0\u96BE"))}))),n.a.createElement("div",{className:qr.a.footer},n.a.createElement(_e.a,{showTotal:function(Kt){return n.a.createElement("span",{style:{color:"#656F87"}},"\u5171",n.a.createElement("span",{className:"c-light-primary"},Kt),"\u6761\u6570\u636E")},total:Rt.total,pageSize:Rt==null?void 0:Rt.per_page,current:Rt==null?void 0:Rt.page,showSizeChanger:!1,onChange:bn,showQuickJumper:!0,hideOnSinglePage:!0})))},Xi=Ti,hi=function(et){var ut,Pt=et.hack,bt=et.onTriggerPraise,It=et.topicId,Mt=et.page,ht=et.onPageChange,pt=et.user,Wt=et.submitRecords,mt=et.submitting,Zt=et.submitResult,Rt=Object(b.h)(),rn=Object(t.useState)((Rt==null||((ut=Rt.query)===null||ut===void 0)?void 0:ut.tab)||"0"),Un=Object(o.a)(rn,2),Sn=Un[0],mn=Un[1],Hn=Object(t.useState)(0),wn=Object(o.a)(Hn,2),jn=wn[0],Mn=wn[1],nr=Object(t.useState)(0),Gn=Object(o.a)(nr,2),lr=Gn[0],vr=Gn[1],qn=Object(t.useState)(0),Rn=Object(o.a)(qn,2),Jn=Rn[0],Dn=Rn[1],Bt=Object(t.useState)(),cn=Object(o.a)(Bt,2),Zn=cn[0],or=cn[1],Qn=Object(t.useState)(!1),Tn=Object(o.a)(Qn,2),Fn=Tn[0],on=Tn[1];function bn(Kt){var Yt=Kt.target.id;if(Sn==="3"&&Yt!==Sn&&(lr===1||lr===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(){mn(Yt)}});return}mn(Yt)}Object(t.useEffect)(function(){var Kt=Ye.a.subscribe("to-commit-info",function(){mn("1")});return Kt},[]);function Ft(){mn("2")}return n.a.createElement("div",{className:ve.a["left-panel"]},n.a.createElement("ul",{className:"".concat(ve.a["s-navs"]," ").concat(ve.a["bg-white"]," ").concat(ve.a.b1)},n.a.createElement("li",{className:"mr40 current"},n.a.createElement("img",{onClick:function(){return on(!0)},src:ze.a})),n.a.createElement("li",{className:ve.a["oj-mr"]},n.a.createElement("a",{className:Sn==="0"?ve.a.active:"",id:"0",onClick:bn},"\u4EFB\u52A1\u63CF\u8FF0")),n.a.createElement("li",{className:ve.a["oj-mr"]},n.a.createElement("a",{className:Sn==="3"?ve.a.active:"",id:"3",onClick:bn},"\u9898\u89E3",Jn?"(".concat(Jn,")"):"")),n.a.createElement("li",{className:ve.a["oj-mr"]},n.a.createElement("a",{className:Sn==="2"?ve.a.active:"",id:"2",onClick:bn},"\u8BC4\u8BBA",jn?"(".concat(jn,")"):"")),n.a.createElement("li",null,n.a.createElement("a",{className:Sn==="1"?ve.a.active:"",id:"1",onClick:bn},"\u63D0\u4EA4\u8BB0\u5F55"))),n.a.createElement("div",{className:"".concat(ve.a["tab-panel-body"]," ").concat(Sn==="0"?"":"hide"),style:{padding:"0 0 0 16px"}},n.a.createElement(Pe,{hack:Pt,onTriggerPraise:bt,toDiscuss:Ft})),n.a.createElement("div",{className:"".concat(ve.a["tab-panel-body"]," ").concat(Sn==="1"?"":"hide")},Wt!=null&&Wt.records_count?n.a.createElement(te,{page:Mt,onPageChange:ht,topicId:It,submitting:mt,submitRecords:Wt,submitResult:Zt}):n.a.createElement(k.a,null)),n.a.createElement("div",{className:"".concat(ve.a["tab-panel-body"]," ").concat(Sn==="2"?"":"hide"),style:{padding:0}},n.a.createElement(wt,{setDiscussTotal:Mn,user:pt,identifier:Pt.identifier,hack:Pt,onTriggerPraise:bt})),n.a.createElement("div",{className:"".concat(ve.a["tab-panel-body"]," ").concat(Sn==="3"?"":"hide"),style:{padding:0}},n.a.createElement(Ir,{setListStatus:vr,setFilterListTotal:Dn,tabStatus:Sn,identifier:Pt.identifier})),n.a.createElement(Xi,{visible:Fn,setIndex:mn,onVisible:function(Yt){return on(Yt)},value:Zn,onChange:function(Yt){return or(Yt)}}))},ji=W("+aKw"),Zr=W("oFv4"),Fi=W.n(Zr),pi=W("S/kP"),ni=W.n(pi),Yi=W("t/PP"),da=W.n(Yi),fa=W("LvDl"),$i=W.n(fa),Ji=W("P5Jw"),Qi=s.a.Countdown,tn={Java:"java",C:"c",Python:"py","C++":"c"},jt;(function(et){et[et.SET_LOADING=0]="SET_LOADING",et[et.GET_DATA=1]="GET_DATA",et[et.GET_SUBMIT_RECORDS=2]="GET_SUBMIT_RECORDS",et[et.SET_DATA=3]="SET_DATA",et[et.SET_DEBUGING=4]="SET_DEBUGING",et[et.SET_SUBMITING=5]="SET_SUBMITING",et[et.SET_EXECUTE_MESSAGE=6]="SET_EXECUTE_MESSAGE",et[et.SET_EXECUTE_RESULT=7]="SET_EXECUTE_RESULT",et[et.SET_SUBMIT_RESULT=8]="SET_SUBMIT_RESULT",et[et.SET_SHOW_NOTE=9]="SET_SHOW_NOTE",et[et.SET_PAGE=10]="SET_PAGE",et[et.GET_LANGUAGE=11]="GET_LANGUAGE",et[et.GET_DRAWER=12]="GET_DRAWER"})(jt||(jt={}));function an(){return new Date().getTime()}var Pn={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 Vn(et,ut){switch(ut.type){case jt.GET_DATA:return Object(a.a)(Object(a.a)({},et),ut.payload);case jt.SET_DATA:return Object(a.a)(Object(a.a)({},et),{},{data:ut.payload});case jt.SET_LOADING:return Object(a.a)(Object(a.a)({},et),{},{loading:ut.payload});case jt.GET_LANGUAGE:return Object(a.a)(Object(a.a)({},et),{},{languageList:ut.payload});case jt.GET_DRAWER:return Object(a.a)(Object(a.a)({},et),{},{drawerData:ut.payload});case jt.SET_SHOW_NOTE:return Object(a.a)(Object(a.a)({},et),{},{showNote:ut.payload});case jt.SET_DEBUGING:return Object(a.a)(Object(a.a)({},et),{},{debuging:ut.payload});case jt.SET_SUBMITING:return Object(a.a)(Object(a.a)({},et),{},{submitting:ut.payload});case jt.GET_SUBMIT_RECORDS:return Object(a.a)(Object(a.a)({},et),{},{submitRecords:ut.payload});case jt.SET_PAGE:return Object(a.a)(Object(a.a)({},et),{},{submitRecordPage:ut.payload});case jt.SET_EXECUTE_MESSAGE:return Object(a.a)(Object(a.a)({},et),{},{executingMessage:ut.payload});case jt.SET_EXECUTE_RESULT:return Object(a.a)(Object(a.a)({},et),ut.payload);case jt.SET_SUBMIT_RESULT:return Object(a.a)(Object(a.a)({},et),ut.payload);default:throw new Error}}var ar=Be.default=function(et){var ut,Pt,bt=et.children,It=Object(t.useReducer)(Vn,Pn),Mt=Object(o.a)(It,2),ht=Mt[0],pt=Mt[1],Wt=Object(b.i)(),mt=Wt.id,Zt=Object(b.g)(),Rt=Object(b.h)(),rn=ht.languageValue,Un=ht.languageList,Sn=ht.loading,mn=ht.data,Hn=ht.debugResult,wn=ht.submitResult,jn=ht.submitRecords,Mn=ht.submitRecordPage,nr=ht.showNote,Gn=ht.debuging,lr=ht.submitting,vr=ht.executingMessage,qn=Object(t.useState)("#FFF"),Rn=Object(o.a)(qn,2),Jn=Rn[0],Dn=Rn[1],Bt=Object(t.useState)(null),cn=Object(o.a)(Bt,2),Zn=cn[0],or=cn[1],Qn=Object(t.useState)({}),Tn=Object(o.a)(Qn,2),Fn=Tn[0],on=Tn[1],bn=Object(t.useState)(!1),Ft=Object(o.a)(bn,2),Kt=Ft[0],Yt=Ft[1],fn=Object(t.useRef)(null),qt=Object(t.useRef)(null),kn=mn==null?void 0:mn.user,hn=mn==null?void 0:mn.hack;Object(t.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(t.useEffect)(function(){setTimeout(function(){document.title="\u5728\u7EBF\u5237\u9898"},400)}),Object(t.useEffect)(function(){if(Kt){var An,_n=document.getElementById("oj-next"),Wn=document.getElementById("oj-modal-next");(_n==null||((An=_n.style)===null||An===void 0)?void 0:An.display)==="none"?Wn.style.display="none":Wn.style.display="block"}},[Kt]),Object(t.useEffect)(function(){function An(){return _n.apply(this,arguments)}function _n(){return _n=Object(f.a)(i.a.mark(function Wn(){var Vt,On,cr,Ar,Ur;return i.a.wrap(function(sn){for(;;)switch(sn.prev=sn.next){case 0:return sn.next=2,Object(m.m)(mt);case 2:Vt=sn.sent,Vt.status===401?document.location.href="/user/login":(Vt.hack=Vt.practice,Vt.hack.code=A.Base64.decode(Vt==null||((On=Vt.hack)===null||On===void 0)?void 0:On.code),Ur="".concat(kn==null?void 0:kn.login,"-language"),localStorage.getItem(Ur)&&(Vt.hack.language=localStorage.getItem(Ur)),qt.current=$i.a.cloneDeep(Vt),qt.current.language=Vt==null||((cr=Vt.hack)===null||cr===void 0)?void 0:cr.language,pt({type:jt.GET_DATA,payload:{loading:!1,data:Vt}}),pt({type:jt.SET_SUBMIT_RESULT,payload:{languageValue:Vt==null||((Ar=Vt.hack)===null||Ar===void 0)?void 0:Ar.language}}));case 4:case"end":return sn.stop()}},Wn)})),_n.apply(this,arguments)}mt&&An()},[mt]),Object(t.useEffect)(function(){pt({type:jt.SET_SUBMIT_RESULT,payload:{debugResult:void 0}}),Xn(),Yt(!1)},[mt]),Object(t.useEffect)(function(){clearTimeout(fn.current)},[mt]),Object(t.useEffect)(function(){vn()},[mt,Mn]);var Cn=function(){window.parent.postMessage("backExercise","*")};function vn(){return rr.apply(this,arguments)}function rr(){return rr=Object(f.a)(i.a.mark(function An(){var _n;return i.a.wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:return Vt.prev=0,Vt.next=3,Object(m.o)(mt,{limit:15,page:Mn});case 3:_n=Vt.sent,pt({type:jt.GET_SUBMIT_RECORDS,payload:_n}),Vt.next=10;break;case 7:Vt.prev=7,Vt.t0=Vt.catch(0),console.log(Vt.t0);case 10:case"end":return Vt.stop()}},An,null,[[0,7]])})),rr.apply(this,arguments)}function Xn(){return Yn.apply(this,arguments)}function Yn(){return Yn=Object(f.a)(i.a.mark(function An(){var _n;return i.a.wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:return Vt.prev=0,Vt.next=3,Object(m.w)(mt);case 3:_n=Vt.sent,pt({type:jt.GET_LANGUAGE,payload:_n==null?void 0:_n.data}),Vt.next=10;break;case 7:Vt.prev=7,Vt.t0=Vt.catch(0),console.log(Vt.t0);case 10:case"end":return Vt.stop()}},An,null,[[0,7]])})),Yn.apply(this,arguments)}function Sr(An){pt({type:jt.SET_PAGE,payload:An})}function Nr(An){return Ci.apply(this,arguments)}function Ci(){return Ci=Object(f.a)(i.a.mark(function An(_n){var Wn,Vt,On,cr,Ar,Ur;return i.a.wrap(function(sn){for(;;)switch(sn.prev=sn.next){case 0:return Ar=((Wn=window)===null||Wn===void 0||((Vt=Wn.location)===null||Vt===void 0||((On=Vt.pathname)===null||On===void 0||((cr=On.split("/"))===null||cr===void 0)))?void 0:cr[2])||mt,sn.next=3,Object(m.v)(Ar,_n||{code:A.Base64.encode(hn.code),language:rn});case 3:return Ur=sn.sent,sn.abrupt("return",Ur);case 5:case"end":return sn.stop()}},An)})),Ci.apply(this,arguments)}function Wr(){return Ri.apply(this,arguments)}function Ri(){return Ri=Object(f.a)(i.a.mark(function An(){var _n,Wn,Vt,On,cr,Ar,Ur;return i.a.wrap(function(sn){for(;;)switch(sn.prev=sn.next){case 0:if(!lr){sn.next=2;break}return sn.abrupt("return");case 2:return pt({type:jt.SET_SUBMITING,payload:!0}),sn.prev=3,Ye.a.publish("to-commit-info"),sn.next=7,Nr();case 7:if(_n=sn.sent,!(_n.status===0)){sn.next=21;break}return Ur=function(){return Ur=Object(f.a)(i.a.mark(function ha(){var vi,ki,Ii,Ki,ra,ia;return i.a.wrap(function(Pr){for(;;)switch(Pr.prev=Pr.next){case 0:return Pr.next=2,Object(m.l)(mt,"submit");case 2:if(vi=Pr.sent,ki=vi.status,Ii=vi.data,Ki=an(),ra=Ki-cr>(On+3)*1e3,ki!==0&&!ra&&setTimeout(Ar,1e3),!ra){Pr.next=12;break}return p.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),pt({type:jt.SET_SUBMITING,payload:!1}),Pr.abrupt("return");case 12:if(!(ki===0)){Pr.next=19;break}return Ii.status===2&&p.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),Pr.next=16,Object(m.o)(mt,{limit:15,page:Mn});case 16:ia=Pr.sent,pt({type:jt.SET_SUBMIT_RESULT,payload:Object(a.a)(Object(a.a)({},ht),{},{submitResult:Ii,submitting:!1,submitRecords:ia})}),(Ii==null?void 0:Ii.status)===0&&Yt(!0);case 19:case"end":return Pr.stop()}},ha)})),Ur.apply(this,arguments)},Ar=function(){return Ur.apply(this,arguments)},Wn={},sn.next=14,Object(m.s)(mt,Wn);case 14:if(Vt=sn.sent,!(Vt.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:On=hn.time_limit,cr=an(),Ar();case 21:sn.next=26;break;case 23:sn.prev=23,sn.t0=sn.catch(3),pt({type:jt.SET_SUBMITING,payload:!1});case 26:case"end":return sn.stop()}},An,null,[[3,23]])})),Ri.apply(this,arguments)}function Bi(){return Wi.apply(this,arguments)}function Wi(){return Wi=Object(f.a)(i.a.mark(function An(){var _n,Wn,Vt,On,cr,Ar,Ur;return i.a.wrap(function(sn){for(;;)switch(sn.prev=sn.next){case 0:return ht.debuging=!0,pt({type:jt.SET_DEBUGING,payload:!0}),sn.prev=2,sn.next=5,Nr();case 5:if(_n=sn.sent,!(_n.status===0)){sn.next=21;break}return Ur=function(){return Ur=Object(f.a)(i.a.mark(function ha(){var vi,ki,Ii,Ki,ra,ia;return i.a.wrap(function(Pr){for(;;)switch(Pr.prev=Pr.next){case 0:return Pr.next=2,Object(m.l)(mt,"debug");case 2:if(vi=Pr.sent,ki=vi.status,Ii=vi.message,Ki=vi.data,ra=an(),ia=ra-cr>(Wn+3)*1e3,ki!==0&&!ia&&(pt({type:jt.SET_EXECUTE_MESSAGE,payload:Ii}),setTimeout(Ar,1e3)),!ia){Pr.next=13;break}return p.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),pt({type:jt.SET_DEBUGING,payload:!1}),Pr.abrupt("return");case 13:ki===0&&(pt({type:jt.SET_DEBUGING,payload:!1}),Ki.status===2&&p.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),pt({type:jt.SET_EXECUTE_RESULT,payload:Object(a.a)(Object(a.a)({},ht),{},{debugResult:Ki,debuging:!1})}));case 14:case"end":return Pr.stop()}},ha)})),Ur.apply(this,arguments)},Ar=function(){return Ur.apply(this,arguments)},Wn=hn.time_limit,Vt={input:encodeURIComponent(mn.test_case.input)},sn.next=13,Object(m.h)(mt,Vt);case 13:if(On=sn.sent,!(On.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:cr=an(),Ar(),sn.next=22;break;case 21:pt({type:jt.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()}},An,null,[[2,24,27,29]])})),Wi.apply(this,arguments)}function Mi(An){var _n;clearTimeout(fn.current),fn.current=setTimeout(function(){var Wn;Nr({code:A.Base64.encode(An),language:qt==null||((Wn=qt.current)===null||Wn===void 0)?void 0:Wn.language})},2e3),pt({type:jt.SET_DATA,payload:Object(a.a)(Object(a.a)({},qt==null?void 0:qt.current),{},{hack:Object(a.a)(Object(a.a)({},qt==null||((_n=qt.current)===null||_n===void 0)?void 0:_n.hack),{},{code:An})})})}function _a(An){var _n=An.target.value;pt({type:jt.SET_DATA,payload:Object(a.a)(Object(a.a)({},mn),{},{test_case:{input:_n}})})}var In=function(){var An=Object(f.a)(i.a.mark(function _n(Wn){var Vt,On,cr,Ar,Ur;return i.a.wrap(function(sn){for(;;)switch(sn.prev=sn.next){case 0:return pt({type:jt.SET_LOADING,payload:!0}),sn.next=3,Nr();case 3:if(Vt=sn.sent,!(Vt.status===0)){sn.next=14;break}return pt({type:jt.SET_SUBMIT_RESULT,payload:{languageValue:Wn}}),qt.current.language=Wn,On="".concat(kn==null?void 0:kn.login,"-language"),localStorage.setItem(On,Wn),sn.next=11,Object(m.w)(mt);case 11:cr=sn.sent,cr.status===0&&(Ur=cr==null||((Ar=cr.data)===null||Ar===void 0)?void 0:Ar.find(function(na){return na.language===Wn}),Mi(A.Base64.decode(Ur.code))),setTimeout(function(){pt({type:jt.SET_LOADING,payload:!1})},300);case 14:case"end":return sn.stop()}},_n)}));return function(Wn){return An.apply(this,arguments)}}();function pn(){return Nn.apply(this,arguments)}function Nn(){return Nn=Object(f.a)(i.a.mark(function An(){var _n;return i.a.wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:return Vt.prev=0,Vt.next=3,Object(m.q)(mt,{language:rn});case 3:_n=Vt.sent,_n.status===401?Zt.replace("/login",{from:Rt.pathname}):(Mi(A.Base64.decode(_n.code)),Xn()),Vt.next=10;break;case 7:Vt.prev=7,Vt.t0=Vt.catch(0),console.log(Vt.t0);case 10:case"end":return Vt.stop()}},An,null,[[0,7]])})),Nn.apply(this,arguments)}function $n(){p.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:n.a.createElement("p",null,"\u521D\u59CB\u4EE3\u7801\u6709\u4FEE\u6539\uFF0C\u66F4\u65B0\u540E\u5C06\u8986\u76D6\u73B0\u6709\u4EE3\u7801\u54E6~ ",n.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 _n(){var Wn;return i.a.wrap(function(On){for(;;)switch(On.prev=On.next){case 0:return On.next=2,Object(m.t)(mt,{language:rn});case 2:Wn=On.sent,Wn.status===401?Zt.replace("/login",{from:Rt.pathname}):Mi(A.Base64.decode(Wn.code));case 4:case"end":return On.stop()}},_n)}))()}})}function Or(){pt({type:jt.SET_SHOW_NOTE,payload:!0})}function Bn(){pt({type:jt.SET_SHOW_NOTE,payload:!1})}function mi(An){return si.apply(this,arguments)}function si(){return si=Object(f.a)(i.a.mark(function An(_n){return i.a.wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:return Vt.next=2,Object(m.b)(mt,_n);case 2:pt({type:jt.GET_DATA,payload:{showNote:!1,data:Object(a.a)(Object(a.a)({},mn),{},{hack:Object(a.a)(Object(a.a)({},hn),{},{notes:_n.notes})})}});case 3:case"end":return Vt.stop()}},An)})),si.apply(this,arguments)}var Kr={input:mn==null||((ut=mn.test_case)===null||ut===void 0)?void 0:ut.input,language:hn==null?void 0:hn.language,code:hn==null?void 0:hn.code,title:"main."+tn[hn==null?void 0:hn.language],modify_code:hn==null?void 0:hn.modify_code,notes:hn==null?void 0:hn.notes,debugResult:Hn,debuging:Gn,submitting:lr,executingMessage:vr,id:mt,languageValue:rn,languageList:Un,onChangeLanguage:In,onCancelNote:Bn,onAddNote:mi,showNote:nr,onShowNote:Or,onSubmitCode:Wr,onChangeCode:Mi,onChangeInput:_a,onDebugCode:Bi,onResetCode:pn,onSyncCode:$n,onUpdateCode:Nr};function Dr(){return ri.apply(this,arguments)}function ri(){return ri=Object(f.a)(i.a.mark(function An(){var _n,Wn,Vt;return i.a.wrap(function(cr){for(;;)switch(cr.prev=cr.next){case 0:return cr.next=2,Object(m.u)(hn.id,{container_type:"Hack",type:1});case 2:_n=cr.sent,Wn=_n.praise_count,Vt=Object(a.a)(Object(a.a)({},mn),{},{hack:Object(a.a)(Object(a.a)({},hn),{},{praises_count:Wn,user_praise:!hn.user_praise})}),pt({type:jt.SET_DATA,payload:Vt});case 6:case"end":return cr.stop()}},An)})),ri.apply(this,arguments)}var ei={topicId:mt,submitResult:wn,submitRecords:jn,submitting:lr,page:Mn,onPageChange:Sr,hack:hn,user:mn==null?void 0:mn.user,onTriggerPraise:Dr};return console.log(mn,qt==null?void 0:qt.current,"data--------"),n.a.createElement(n.a.Fragment,null,n.a.createElement(E.a,{className:"oj-custom-large-spin",size:"large",spinning:Sn},mn?n.a.createElement("div",{className:"oj-custom-warp"},n.a.createElement("header",{className:D.a.header,style:{minWidth:1200}},n.a.createElement("div",null,n.a.createElement("img",{src:"".concat(x.a.IMG_SERVER,"/images/").concat(kn.image_url),alt:"user",width:30}),n.a.createElement("span",null,kn.name)),n.a.createElement("h2",{className:"flex-wrp flex_box_column flex_box_center"},n.a.createElement("div",null,hn.name),n.a.createElement(ji.a,{onChange:function(_n){},className:"font12 c-grey-999"})),n.a.createElement(Ji.CopyToClipboard,{text:"".concat((Pt=window.location)===null||Pt===void 0?void 0:Pt.origin,"/problems/").concat(hn.identifier,"/share"),onCopy:function(){return w.b.success("\u590D\u5236\u9898\u76EE\u94FE\u63A5\u6210\u529F")}},n.a.createElement("span",{className:D.a.btn_back,style:{marginRight:10,cursor:"pointer"}}," ",n.a.createElement("i",{className:"iconfont icon-fenxiang1 font14 mr5"}),"\u5206\u4EAB\u9898\u76EE")),hn.edit_privilege?n.a.createElement(_.a,{className:D.a.btn_back,to:"/problems/".concat(hn.identifier,"/ojedit"),style:{marginRight:10}}," ",n.a.createElement(h.a,null)," \u7F16\u8F91"):null,n.a.createElement(_.a,{className:D.a.btn_back,onClick:function(){},to:"/problems"}," ",n.a.createElement(v.a,null),"\u9000\u51FA")),n.a.createElement(g.a,{hideResize:!0,className:"my-problems oj-problems",leftChild:n.a.createElement(hi,ei),rightChild:n.a.createElement(mr,Kr)})):null),n.a.createElement(p.a,{centered:!0,closable:!1,width:680,footer:null,visible:Kt,className:"oj-modal"},n.a.createElement("section",{className:"oj-modal-content"},n.a.createElement("div",{className:"oj-modal-head"},n.a.createElement("img",{src:Fi.a,alt:""}),n.a.createElement("i",{onClick:function(){return Yt(!1)},className:"iconfont icon-guanbi1"})),n.a.createElement("aside",null,n.a.createElement("img",{className:"mr30",src:da.a}),"\u8FD0\u884C\u65F6\u95F4:\xA0",n.a.createElement("span",{style:{color:"#75d6ba",marginRight:100}},wn==null?void 0:wn.execute_time,"s"),"\u4F18\u4E8E",n.a.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(wn==null?void 0:wn.time_better_than)||100,"%"),"\u7684\u7528\u6237"),n.a.createElement("aside",{className:"mb50"},n.a.createElement("img",{src:ni.a,className:"mr30"}),n.a.createElement("span",{className:"oj-modal-tt"},n.a.createElement("span",null,n.a.createElement("span",null,"\u5360\u7528\u5185\u5B58:\xA0"),n.a.createElement("span",{className:"c-light-primary"},wn==null?void 0:wn.execute_memory,"mb")),n.a.createElement("span",null,n.a.createElement("span",null))),"\u4F18\u4E8E",n.a.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(wn==null?void 0:wn.memory_better_than)||100,"%"),"\u7684\u7528\u6237"),n.a.createElement("div",{id:"oj-modal-next",className:"oj-modal-btn"},"\u8FDB\u5165\u4E0B\u4E00\u9898"))))};function Kn(et){var ut=et.languageValue,Pt=et.languageList,bt=et.onChangeLanguage,It=et.title,Mt=et.modify_code,ht=et.onSyncCode,pt=et.onShowCodeSetting,Wt=et.onResetCode,mt=Object(b.h)(),Zt=function(){p.a.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:n.a.createElement(l.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:Wt})};return n.a.createElement("div",{className:"action-bar"},n.a.createElement(S.a,{className:"oj-select",value:ut,style:{width:100},placeholder:"\u9009\u62E9\u8BED\u8A00",onChange:bt},Pt==null?void 0:Pt.map(function(Rt){return n.a.createElement(S.a.Option,{key:Rt.language,value:Rt.language},Rt.language)})),n.a.createElement("span",null),n.a.createElement("a",{title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",onClick:Zt},n.a.createElement("i",{className:"iconfont icon-zhongzhi font-20 "})),n.a.createElement("a",{onClick:pt},n.a.createElement("i",{className:"iconfont icon-shezhi"})))}function mr(et){var ut=et.id,Pt=et.input,bt=et.showNote,It=et.onShowNote,Mt=et.notes,ht=et.onCancelNote,pt=et.onAddNote,Wt=et.debugResult,mt=et.language,Zt=et.debuging,Rt=et.submitting,rn=et.executingMessage,Un=et.code,Sn=et.onSubmitCode,mn=et.onDebugCode,Hn=et.onChangeCode,wn=et.onChangeInput,jn=et.onUpdateCode,Mn=Object($.a)(et,["id","input","showNote","onShowNote","notes","onCancelNote","onAddNote","debugResult","language","debuging","submitting","executingMessage","code","onSubmitCode","onDebugCode","onChangeCode","onChangeInput","onUpdateCode"]);function nr(lr){return n.a.createElement(Kn,Object(re.a)({},Mn,{onShowCodeSetting:lr}))}var Gn={id:ut,input:Pt,debugResult:Wt,debuging:Zt,submitting:Rt,executingMessage:rn,onDebugCode:mn,onChangeCode:Hn,onSubmitCode:Sn,onChangeInput:wn};return n.a.createElement("div",{className:"right-panel"},n.a.createElement(T.a,{language:mt,value:Un,onChange:Hn,ActionBarRender:nr}),n.a.createElement("div",{className:"note-form-area ".concat(bt?"active":"")},n.a.createElement(ae,{onCancel:ht,notes:Mt,callback:pt})),n.a.createElement(j.b,Gn))}},WaYH:function(Ve,Be,W){"use strict";var re=W("rePB"),$=W("Ff2n"),U=W("VTBJ"),S=W("1OyB"),P=W("vuIU"),E=W("JX7q"),C=W("Ji7U"),w=W("LK+K"),u=W("cDcd"),p=W("TSYQ"),f=W.n(p),o=W("sboe"),a=W("OZM5"),c=function(_){var m=_.prefixCls,g=_.level,x=_.isStart,l=_.isEnd;if(!g)return null;for(var T="".concat(m,"-indent-unit"),A=[],O=0;O<g;O+=1){var D;A.push(u.createElement("span",{key:O,className:f()(T,(D={},Object(re.a)(D,"".concat(T,"-start"),x[O+1]),Object(re.a)(D,"".concat(T,"-end"),l[O+1]),Object(re.a)(D,"".concat(T,"-end-first-level"),!O&&l[0]),D))}))}return u.createElement("span",{"aria-hidden":"true",className:"".concat(m,"-indent")},A)},s=c,d=W("815F"),i="open",t="close",n="---",h=function(y){Object(C.a)(m,y);var _=Object(w.a)(m);function m(){var g;return Object(S.a)(this,m),g=_.apply(this,arguments),g.state={dragNodeHighlight:!1},g.onSelectorClick=function(x){var l=g.props.context.onNodeClick;l(x,Object(d.b)(g.props)),g.isSelectable()?g.onSelect(x):g.onCheck(x)},g.onSelectorDoubleClick=function(x){var l=g.props.context.onNodeDoubleClick;l(x,Object(d.b)(g.props))},g.onSelect=function(x){if(g.isDisabled())return;var l=g.props.context.onNodeSelect;x.preventDefault(),l(x,Object(d.b)(g.props))},g.onCheck=function(x){if(g.isDisabled())return;var l=g.props,T=l.disableCheckbox,A=l.checked,O=g.props.context.onNodeCheck;if(!g.isCheckable()||T)return;x.preventDefault();var D=!A;O(x,Object(d.b)(g.props),D)},g.onMouseEnter=function(x){var l=g.props.context.onNodeMouseEnter;l(x,Object(d.b)(g.props))},g.onMouseLeave=function(x){var l=g.props.context.onNodeMouseLeave;l(x,Object(d.b)(g.props))},g.onContextMenu=function(x){var l=g.props.context.onNodeContextMenu;l(x,Object(d.b)(g.props))},g.onDragStart=function(x){var l=g.props.context.onNodeDragStart;x.stopPropagation(),g.setState({dragNodeHighlight:!0}),l(x,Object(E.a)(g));try{x.dataTransfer.setData("text/plain","")}catch(T){}},g.onDragEnter=function(x){var l=g.props.context.onNodeDragEnter;x.preventDefault(),x.stopPropagation(),l(x,Object(E.a)(g))},g.onDragOver=function(x){var l=g.props.context.onNodeDragOver;x.preventDefault(),x.stopPropagation(),l(x,Object(E.a)(g))},g.onDragLeave=function(x){var l=g.props.context.onNodeDragLeave;x.stopPropagation(),l(x,Object(E.a)(g))},g.onDragEnd=function(x){var l=g.props.context.onNodeDragEnd;x.stopPropagation(),g.setState({dragNodeHighlight:!1}),l(x,Object(E.a)(g))},g.onDrop=function(x){var l=g.props.context.onNodeDrop;x.preventDefault(),x.stopPropagation(),g.setState({dragNodeHighlight:!1}),l(x,Object(E.a)(g))},g.onExpand=function(x){var l=g.props.context.onNodeExpand;l(x,Object(d.b)(g.props))},g.setSelectHandle=function(x){g.selectHandle=x},g.getNodeState=function(){var x=g.props.expanded;return g.isLeaf()?null:x?i:t},g.hasChildren=function(){var x=g.props.eventKey,l=g.props.context.keyEntities,T=l[x]||{},A=T.children;return!!(A||[]).length},g.isLeaf=function(){var x=g.props,l=x.isLeaf,T=x.loaded,A=g.props.context.loadData,O=g.hasChildren();return l===!1?!1:l||!A&&!O||A&&T&&!O},g.isDisabled=function(){var x=g.props.disabled,l=g.props.context.disabled;return!!(l||x)},g.isCheckable=function(){var x=g.props.checkable,l=g.props.context.checkable;return!l||x===!1?!1:l},g.syncLoadData=function(x){var l=x.expanded,T=x.loading,A=x.loaded,O=g.props.context,D=O.loadData,I=O.onNodeLoad;if(T)return;D&&l&&!g.isLeaf()&&(!g.hasChildren()&&!A&&I(Object(d.b)(g.props)))},g.renderSwitcher=function(){var x=g.props,l=x.expanded,T=x.switcherIcon,A=g.props.context,O=A.prefixCls,D=A.switcherIcon,I=T||D;if(g.isLeaf())return u.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 j=f()("".concat(O,"-switcher"),"".concat(O,"-switcher_").concat(l?i:t));return u.createElement("span",{onClick:g.onExpand,className:j},typeof I=="function"?I(Object(U.a)(Object(U.a)({},g.props),{},{isLeaf:!1})):I)},g.renderCheckbox=function(){var x=g.props,l=x.checked,T=x.halfChecked,A=x.disableCheckbox,O=g.props.context.prefixCls,D=g.isDisabled(),I=g.isCheckable();if(!I)return null;var j=typeof I!="boolean"?I:null;return u.createElement("span",{className:f()("".concat(O,"-checkbox"),l&&"".concat(O,"-checkbox-checked"),!l&&T&&"".concat(O,"-checkbox-indeterminate"),(D||A)&&"".concat(O,"-checkbox-disabled")),onClick:g.onCheck},j)},g.renderIcon=function(){var x=g.props.loading,l=g.props.context.prefixCls;return u.createElement("span",{className:f()("".concat(l,"-iconEle"),"".concat(l,"-icon__").concat(g.getNodeState()||"docu"),x&&"".concat(l,"-icon_loading"))})},g.renderSelector=function(){var x=g.state.dragNodeHighlight,l=g.props,T=l.title,A=l.selected,O=l.icon,D=l.loading,I=l.data,j=g.props.context,B=j.prefixCls,ee=j.showIcon,F=j.icon,G=j.draggable,X=j.loadData,Z=j.titleRender,K=g.isDisabled(),q="".concat(B,"-node-content-wrapper"),ae;if(ee){var oe=O||F;ae=oe?u.createElement("span",{className:f()("".concat(B,"-iconEle"),"".concat(B,"-icon__customize"))},typeof oe=="function"?oe(g.props):oe):g.renderIcon()}else X&&D&&(ae=g.renderIcon());var ve;typeof T=="function"?ve=T(I):Z?ve=Z(I):ve=T;var he=u.createElement("span",{className:"".concat(B,"-title")},ve);return u.createElement("span",{ref:g.setSelectHandle,title:typeof T=="string"?T:"",className:f()("".concat(q),"".concat(q,"-").concat(g.getNodeState()||"normal"),!K&&(A||x)&&"".concat(B,"-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},ae,he)},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 x=this.props.selectable,l=this.props.context.selectable;return typeof x=="boolean"?x:l}},{key:"render",value:function(){var x,l=this.props,T=l.eventKey,A=l.className,O=l.style,D=l.dragOver,I=l.dragOverGapTop,j=l.dragOverGapBottom,B=l.isLeaf,ee=l.isStart,F=l.isEnd,G=l.expanded,X=l.selected,Z=l.checked,K=l.halfChecked,q=l.loading,ae=l.domRef,oe=l.active,ve=l.onMouseMove,he=Object($.a)(l,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),_e=this.props.context,fe=_e.prefixCls,xe=_e.filterTreeNode,je=_e.draggable,Le=_e.keyEntities,ke=this.isDisabled(),Fe=Object(a.f)(he),ge=Le[T]||{},ce=ge.level,Ie=F[F.length-1];return u.createElement("div",Object.assign({ref:ae,className:f()(A,"".concat(fe,"-treenode"),(x={},Object(re.a)(x,"".concat(fe,"-treenode-disabled"),ke),Object(re.a)(x,"".concat(fe,"-treenode-switcher-").concat(G?"open":"close"),!B),Object(re.a)(x,"".concat(fe,"-treenode-checkbox-checked"),Z),Object(re.a)(x,"".concat(fe,"-treenode-checkbox-indeterminate"),K),Object(re.a)(x,"".concat(fe,"-treenode-selected"),X),Object(re.a)(x,"".concat(fe,"-treenode-loading"),q),Object(re.a)(x,"".concat(fe,"-treenode-active"),oe),Object(re.a)(x,"".concat(fe,"-treenode-leaf-last"),Ie),Object(re.a)(x,"drag-over",!ke&&D),Object(re.a)(x,"drag-over-gap-top",!ke&&I),Object(re.a)(x,"drag-over-gap-bottom",!ke&&j),Object(re.a)(x,"filter-node",xe&&xe(Object(d.b)(this.props))),x)),style:O,onDragEnter:je?this.onDragEnter:void 0,onDragOver:je?this.onDragOver:void 0,onDragLeave:je?this.onDragLeave:void 0,onDrop:je?this.onDrop:void 0,onDragEnd:je?this.onDragEnd:void 0,onMouseMove:ve},Fe),u.createElement(s,{prefixCls:fe,level:ce,isStart:ee,isEnd:F}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),m}(u.Component),v=function(_){return u.createElement(o.a.Consumer,null,function(m){return u.createElement(h,Object.assign({},_,{context:m}))})};v.displayName="TreeNode",v.defaultProps={title:n},v.isTreeNode=1;var b=Be.a=v},Wtmd:function(Ve,Be,W){Ve.exports=W.p+"static/c.03ba6fd6.svg"},Wx9E:function(Ve,Be,W){},XIdC:function(Ve,Be,W){"use strict";var re=W("rePB"),$=W("ODXe"),U=W("Ff2n"),S=W("cDcd"),P=W.n(S),E=W("TSYQ"),C=W.n(E),w=W("6cGi"),u=W("4IlW"),p=S.forwardRef(function(f,o){var a,c=f.prefixCls,s=c===void 0?"rc-switch":c,d=f.className,i=f.checked,t=f.defaultChecked,n=f.disabled,h=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"]),x=Object(w.a)(!1,{value:i,defaultValue:t}),l=Object($.a)(x,2),T=l[0],A=l[1];function O(B,ee){var F=T;return n||(F=B,A(F),_==null||_(F,ee)),F}function D(B){B.which===u.a.LEFT?O(!1,B):B.which===u.a.RIGHT&&O(!0,B),m==null||m(B)}function I(B){var ee=O(!T,B);y==null||y(ee,B)}var j=C()(s,d,(a={},Object(re.a)(a,"".concat(s,"-checked"),T),Object(re.a)(a,"".concat(s,"-disabled"),n),a));return S.createElement("button",Object.assign({},g,{type:"button",role:"switch","aria-checked":T,disabled:n,className:j,ref:o,onKeyDown:D,onClick:I}),h,S.createElement("span",{className:"".concat(s,"-inner")},T?v:b))});p.displayName="Switch",Be.a=p},Y1PL:function(Ve,Be,W){"use strict";W.r(Be),W.d(Be,"ResizableTextArea",function(){return K});var re=W("wx14"),$=W("1OyB"),U=W("vuIU"),S=W("Ji7U"),P=W("LK+K"),E=W("cDcd"),C=W("VTBJ"),w=W("rePB"),u=W("Zm9Q"),p=W("Kwbf"),f=W("c+Xe"),o=W("m+aA"),a=W("bdgK"),c=new Map;function s(oe){oe.forEach(function(ve){var he,_e=ve.target;(he=c.get(_e))===null||he===void 0||he.forEach(function(fe){return fe(_e)})})}var d=new a.default(s),i=null,t=null;function n(oe,ve){c.has(oe)||(c.set(oe,new Set),d.observe(oe)),c.get(oe).add(ve)}function h(oe,ve){c.has(oe)&&(c.get(oe).delete(ve),c.get(oe).size||(d.unobserve(oe),c.delete(oe)))}var v=function(oe){Object(S.a)(he,oe);var ve=Object(P.a)(he);function he(){return Object($.a)(this,he),ve.apply(this,arguments)}return Object(U.a)(he,[{key:"render",value:function(){return this.props.children}}]),he}(E.Component),b=E.createContext(null);function y(oe){var ve=oe.children,he=oe.onBatchResize,_e=E.useRef(0),fe=E.useRef([]),xe=E.useContext(b),je=E.useCallback(function(Le,ke,Fe){_e.current+=1;var ge=_e.current;fe.current.push({size:Le,element:ke,data:Fe}),Promise.resolve().then(function(){ge===_e.current&&(he==null||he(fe.current),fe.current=[])}),xe==null||xe(Le,ke,Fe)},[he,xe]);return E.createElement(b.Provider,{value:je},ve)}function _(oe){var ve=oe.children,he=oe.disabled,_e=E.useRef(null),fe=E.useRef(null),xe=E.useContext(b),je=E.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Le=E.isValidElement(ve)&&Object(f.c)(ve),ke=Le?ve.ref:null,Fe=E.useMemo(function(){return Object(f.a)(ke,_e)},[ke,_e]),ge=E.useRef(oe);ge.current=oe;var ce=E.useCallback(function(Ie){var Ne=ge.current,Xe=Ne.onResize,te=Ne.data,k=Ie.getBoundingClientRect(),N=k.width,J=k.height,V=Ie.offsetWidth,Y=Ie.offsetHeight,me=Math.floor(N),Ae=Math.floor(J);if(je.current.width!==me||je.current.height!==Ae||je.current.offsetWidth!==V||je.current.offsetHeight!==Y){var at={width:me,height:Ae,offsetWidth:V,offsetHeight:Y};je.current=at;var Re=V===Math.round(N)?N:V,Pe=Y===Math.round(J)?J:Y,Ye=Object(C.a)(Object(C.a)({},at),{},{offsetWidth:Re,offsetHeight:Pe});xe==null||xe(Ye,Ie,te),Xe&&Promise.resolve().then(function(){Xe(Ye,Ie)})}},[]);return E.useEffect(function(){var Ie=Object(o.a)(_e.current)||Object(o.a)(fe.current);return Ie&&!he&&n(Ie,ce),function(){return h(Ie,ce)}},[_e.current,he]),E.createElement(v,{ref:fe},Le?E.cloneElement(ve,{ref:Fe}):ve)}var m="rc-observer-key";function g(oe){var ve=oe.children,he=Object(u.a)(ve);return he.map(function(_e,fe){var xe=(_e==null?void 0:_e.key)||"".concat(m,"-").concat(fe);return E.createElement(_,Object(re.a)({},oe,{key:xe}),_e)})}g.Collection=y;var x=g,l=W("bT9E"),T=W("TSYQ"),A=W.n(T),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={},j;function B(oe){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,he=oe.getAttribute("id")||oe.getAttribute("data-reactid")||oe.getAttribute("name");if(ve&&I[he])return I[he];var _e=window.getComputedStyle(oe),fe=_e.getPropertyValue("box-sizing")||_e.getPropertyValue("-moz-box-sizing")||_e.getPropertyValue("-webkit-box-sizing"),xe=parseFloat(_e.getPropertyValue("padding-bottom"))+parseFloat(_e.getPropertyValue("padding-top")),je=parseFloat(_e.getPropertyValue("border-bottom-width"))+parseFloat(_e.getPropertyValue("border-top-width")),Le=D.map(function(Fe){return"".concat(Fe,":").concat(_e.getPropertyValue(Fe))}).join(";"),ke={sizingStyle:Le,paddingSize:xe,borderSize:je,boxSizing:fe};return ve&&he&&(I[he]=ke),ke}function ee(oe){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,he=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,_e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;j||(j=document.createElement("textarea"),j.setAttribute("tab-index","-1"),j.setAttribute("aria-hidden","true"),document.body.appendChild(j)),oe.getAttribute("wrap")?j.setAttribute("wrap",oe.getAttribute("wrap")):j.removeAttribute("wrap");var fe=B(oe,ve),xe=fe.paddingSize,je=fe.borderSize,Le=fe.boxSizing,ke=fe.sizingStyle;j.setAttribute("style","".concat(ke,";").concat(O)),j.value=oe.value||oe.placeholder||"";var Fe=Number.MIN_SAFE_INTEGER,ge=Number.MAX_SAFE_INTEGER,ce=j.scrollHeight,Ie;if(Le==="border-box"?ce+=je:Le==="content-box"&&(ce-=xe),he!==null||_e!==null){j.value=" ";var Ne=j.scrollHeight-xe;he!==null&&(Fe=Ne*he,Le==="border-box"&&(Fe=Fe+xe+je),ce=Math.max(Fe,ce)),_e!==null&&(ge=Ne*_e,Le==="border-box"&&(ge=ge+xe+je),Ie=ce>ge?"":"hidden",ce=Math.min(ge,ce))}return{height:ce,minHeight:Fe,maxHeight:ge,overflowY:Ie,resize:"none"}}var F=W("Gytx"),G=W.n(F),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(S.a)(he,oe);var ve=Object(P.a)(he);function he(_e){var fe;return Object($.a)(this,he),fe=ve.call(this,_e),fe.nextFrameActionId=void 0,fe.resizeFrameId=void 0,fe.textArea=void 0,fe.saveTextArea=function(xe){fe.textArea=xe},fe.handleResize=function(xe){var je=fe.state.resizeStatus,Le=fe.props,ke=Le.autoSize,Fe=Le.onResize;if(je!==X.NONE)return;typeof Fe=="function"&&Fe(xe),ke&&fe.resizeOnNextFrame()},fe.resizeOnNextFrame=function(){cancelAnimationFrame(fe.nextFrameActionId),fe.nextFrameActionId=requestAnimationFrame(fe.resizeTextarea)},fe.resizeTextarea=function(){var xe=fe.props.autoSize;if(!xe||!fe.textArea)return;var je=xe.minRows,Le=xe.maxRows,ke=ee(fe.textArea,!1,je,Le);fe.setState({textareaStyles:ke,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 xe=fe.props,je=xe.prefixCls,Le=je===void 0?"rc-textarea":je,ke=xe.autoSize,Fe=xe.onResize,ge=xe.className,ce=xe.disabled,Ie=fe.state,Ne=Ie.textareaStyles,Xe=Ie.resizeStatus,te=Object(l.a)(fe.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),k=A()(Le,ge,Object(w.a)({},"".concat(Le,"-disabled"),ce));"value"in te&&(te.value=te.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 E.createElement(x,{onResize:fe.handleResize,disabled:!(ke||Fe)},E.createElement("textarea",Object(re.a)({},te,{className:k,style:N,ref:fe.saveTextArea})))},fe.state={textareaStyles:{},resizeStatus:X.NONE},fe}return Object(U.a)(he,[{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,xe=this.textArea.selectionEnd;this.textArea.setSelectionRange(fe,xe)}}catch(je){}}},{key:"render",value:function(){return this.renderTextArea()}}]),he}(E.Component),K=Z,q=function(oe){Object(S.a)(he,oe);var ve=Object(P.a)(he);function he(_e){var fe;Object($.a)(this,he),fe=ve.call(this,_e),fe.resizableTextArea=void 0,fe.focus=function(){fe.resizableTextArea.textArea.focus()},fe.saveTextArea=function(je){fe.resizableTextArea=je},fe.handleChange=function(je){var Le=fe.props.onChange;fe.setValue(je.target.value,function(){fe.resizableTextArea.resizeTextarea()}),Le&&Le(je)},fe.handleKeyDown=function(je){var Le=fe.props,ke=Le.onPressEnter,Fe=Le.onKeyDown;je.keyCode===13&&ke&&ke(je),Fe&&Fe(je)};var xe=typeof _e.value=="undefined"||_e.value===null?_e.defaultValue:_e.value;return fe.state={value:xe},fe}return Object(U.a)(he,[{key:"setValue",value:function(fe,xe){"value"in this.props||this.setState({value:fe},xe)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return E.createElement(K,Object(re.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}}]),he}(E.Component),ae=Be.default=q},Z8dc:function(Ve,Be,W){Ve.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(Ve,Be,W){"use strict";var re=W("BoS7"),$=W("Sdc0"),U=W("OaEy"),S=W("2fM7"),P=W("cDcd"),E=W.n(P),C=W("lOMy"),w=W.n(C),u=S.a.Option;Be.a=function(p){var f=p.onFontSizeChange,o=p.cmFontSize,a=p.cmCodeMode,c=p.onCodeModeChange,s=p.onTabToSpace,d=p.className,i=d===void 0?"":d,t=p.tabToSpace,n=p.children;return E.a.createElement("div",{className:"tpi-code-setting ".concat(i)},E.a.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),E.a.createElement("section",null,E.a.createElement("div",{className:"file-item"},E.a.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),E.a.createElement(S.a,{bordered:!1,size:"small",value:a,onChange:c},E.a.createElement(u,{value:"vs"},"\u767D\u8272\u80CC\u666F"),E.a.createElement(u,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),E.a.createElement("div",{className:"file-item"},E.a.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),E.a.createElement(S.a,{bordered:!1,size:"small",value:o,onChange:f},E.a.createElement(u,{value:12},"12px"),E.a.createElement(u,{value:14},"14px"),E.a.createElement(u,{value:16},"16px"),E.a.createElement(u,{value:18},"18px"),E.a.createElement(u,{value:20},"20px"),E.a.createElement(u,{value:22},"22px"))),E.a.createElement("div",{className:"file-item"},E.a.createElement("b",null,"Tab\u8F6C\u6362"),E.a.createElement($.a,{checked:t,onChange:s}))),E.a.createElement("h3",null,"\u5FEB\u6377\u952E"),E.a.createElement("section",null,E.a.createElement("div",{className:"file-item"},E.a.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),E.a.createElement("span",null,"Ctrl + S")),E.a.createElement("div",{className:"file-item"},E.a.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),E.a.createElement("span",null,"F1 / Alt + F1")),E.a.createElement("div",{className:"file-item"},E.a.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),E.a.createElement("span",null,"Ctrl + ]/[")),E.a.createElement("div",{className:"file-item"},E.a.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),E.a.createElement("span",null,"Ctrl + Shift + \\")),E.a.createElement("div",{className:"file-item"},E.a.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),E.a.createElement("span",null,"Home")),E.a.createElement("div",{className:"file-item"},E.a.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),E.a.createElement("span",null,"End"))),n)}},ZW9T:function(Ve,Be,W){"use strict";W.d(Be,"a",function(){return b});var re=W("k1fw"),$=W("miYZ"),U=W("tsqr"),S=W("rAM+"),P=W("tJVT"),E=W("PpiC"),C=W("cDcd"),w=W.n(C),u=W("bdgK");function p(y,_,m,g,x){var l=_.getWordUntilPosition(m),T={startLineNumber:m.lineNumber,endLineNumber:m.lineNumber,startColumn:l.startColumn,endColumn:l.endColumn},A=g.map(function(O){return{label:O,kind:y.languages.CompletionItemKind.Keyword,insertText:O,insertTextRules:y.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:T}});return x.map(function(O){A.push(Object(re.a)(Object(re.a)({},O),{},{range:T}))}),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(T,A){var O=p(y,T,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(T,A){var O=[{label:"print",kind:y.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
|
|
|
`),insertTextRules:y.languages.CompletionItemInsertTextRule.InsertAsSnippet}],D=p(y,T,A,g,O);return{suggestions:D}}});var x=["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(T,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,T,A,x,O);return{suggestions:D}}})},o="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",a=W("LvDl"),c=W("+ua5");function s(y){return/^\d+$/.test(y)?"".concat(y,"px"):y}function d(){}var i=!1,t={"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 n(){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=t[y[m]];if(g)return g}return _[0]}return t[_]||_}var h=null,v=Be.b=function(y){var _=y.width,m=_===void 0?"100%":_,g=y.height,x=g===void 0?"100%":g,l=y.value,T=y.language,A=T===void 0?"javascript":T,O=y.style,D=O===void 0?{}:O,I=y.options,j=I===void 0?{}:I,B=y.overrideServices,ee=B===void 0?{}:B,F=y.theme,G=F===void 0?"vs-dark":F,X=y.onEditBlur,Z=y.onSave,K=y.autoHeight,q=K===void 0?!1:K,ae=y.forbidCopy,oe=ae===void 0?!1:ae,ve=y.onChange,he=ve===void 0?d:ve,_e=y.editorDidMount,fe=_e===void 0?d:_e,xe=y.onFocus,je=xe===void 0?d:xe,Le=y.filename,ke=Le===void 0?"educoder.txt":Le,Fe=y.errorLine,ge=y.errorContent,ce=ge===void 0?"":ge,Ie=Object(E.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)({}),te=Object(C.useRef)(),k=Object(C.useRef)(!1),N=Object(C.useRef)(),J=Object(C.useState)(!1),V=Object(P.a)(J,2),Y=V[0],me=V[1];function Ae(){var dt;return Ne.current&&(dt=new u.default(function(Et){var Dt=Object(S.a)(Et),ot;try{for(Dt.s();!(ot=Dt.n()).done;){var xt=ot.value;(xt.target.offsetHeight>0||xt.target.offsetWidth>0)&&Xe.current.instance.layout()}}catch(nt){Dt.e(nt)}finally{Dt.f()}}),dt.observe(Ne.current)),dt}function at(){U.b.warn(decodeURIComponent(o))}var Re=function(){var Et=Xe.current.instance;if(l!=null&&Et&&Y){var Dt=Et.getModel();Dt&&l!==Dt.getValue()&&(i=!0,Dt.setValue(l),Et.layout(),i=!1)}};Object(C.useEffect)(function(){te.current&&clearTimeout(te.current),te.current=setTimeout(function(){Re()},500)},[l,Y,Xe.current]),Object(C.useEffect)(function(){if(Fe&&Xe.current&&Xe.current.instance){var dt=Xe.current.instance;dt.changeViewZones(function(Dt){var ot=document.createElement("div");ot.style.padding="10px 20px",ot.style.width="calc(100% - 20px)",ot.className="my-error-line-wrp",ot.innerHTML=ce,Dt.addZone({afterLineNumber:Fe||11,heightInLines:3,domNode:ot})});var Et={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};dt.addOverlayWidget(Et),dt.revealPositionInCenter({lineNumber:20,column:1})}},[Fe,Xe.current,Y]);function Pe(){var dt=Xe.current.instance;if(dt){var Et=dt.getSelection(),Dt=Xe.current.pastePos||{},ot=new h.Range(Dt.startLineNumber||Et.endLineNumber,Dt.startColumn||Et.endColumn,Dt.endLineNumber||Et.endLineNumber,Dt.endColumn||Et.endColumn);setTimeout(function(){dt.executeEdits("",[{range:ot,text:""}])},300)}}function Ye(dt){(window.navigator.platform.match("Mac")?dt.metaKey:dt.ctrlKey)&&dt.keyCode==83&&(dt.preventDefault(),Z())}var Ze=function(){if(q&&Xe.current.instance){var Et=Xe.current.instance.getContentHeight();$e(Et<x?x:Et)}else $e(x)};function ze(dt){var Et=document.createEvent("MouseEvents");Et.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),dt.dispatchEvent(Et)}function We(dt,Et){var Dt=window.URL||window.webkitURL||window,ot=new Blob([Et]),xt=document.createElementNS("http://www.w3.org/1999/xhtml","a");xt.href=Dt.createObjectURL(ot),xt.download=dt,ze(xt)}Object(C.useEffect)(function(){Ze()},[Ze]),Object(C.useEffect)(function(){Ne.current&&!Y&&W.e(27).then(W.t.bind(null,"M/lh",7)).then(function(dt){try{h=dt,Xe.current.instance=h.editor.create(Ne.current,{value:l,language:n(A),theme:G,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},ee);var Et=Xe.current.instance;if(fe(Et,h),setTimeout(function(){Ze(),Xe.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){We(ke||"educoder.txt",Et.getValue())}})},500),Xe.current.subscription=Et.onDidChangeModelContent(function(ot){k.current?clearTimeout(N.current):(Ze(),he(Et.getValue(),ot)),N.current=setTimeout(function(){k.current=!1},500)}),window.Monaco||f(h),oe&&(Et.addCommand(h.KeyMod.CtrlCmd|h.KeyMod.Shift|h.KeyCode.KEY_V,function(){return at(),null}),Et.addCommand(h.KeyMod.CtrlCmd|h.KeyCode.KEY_C,function(){return at(),null})),window.Monaco=h,X&&Et.onDidBlurEditorWidget(function(){X(Et.getValue())}),je&&Et.onDidFocusEditorText(function(){je(Et.getValue())}),oe){Et.addCommand(h.KeyMod.CtrlCmd|h.KeyCode.KEY_V,function(){return at(),null}),Et.onDidPaste(function(ot){Xe.current.pastePos=ot});try{window.addEventListener("paste",Pe)}catch(ot){}}var Dt=Ae();return me(!0),function(){var ot=Xe.current.instance;ot.dispose();var xt=ot.getModel();xt&&xt.dispose(),Xe.current.subscription&&Xe.current.subscription.dispose(),oe&&window.removeEventListener("paste",Pe),Dt.unobserve(Ne.current)}}catch(ot){}})},[]),Object(C.useEffect)(function(){var dt=Xe.current.instance;if(dt&&Y)return document.addEventListener("keydown",Ye,!1),function(){document.removeEventListener("keydown",Ye)}},[Z,Y]),Object(C.useEffect)(function(){var dt=Xe.current.instance;if(dt&&Y){var Et=n(A);h.editor.setModelLanguage(dt.getModel(),Et),console.log("language:",A,dt.getModel(),Et)}},[A,Y]),Object(C.useEffect)(function(){var dt=Xe.current.instance;dt&&Y&&h.editor.setTheme(G)},[G,Y]),Object(C.useEffect)(function(){var dt=Xe.current.instance;dt&&Y&&(dt.updateOptions(Object(re.a)({},j)),setTimeout(function(){dt.getModel().updateOptions(Object(re.a)({},j))},200))},[JSON.stringify(j),Y]),Object(C.useEffect)(function(){var dt=Xe.current.instance;dt&&Y&&dt.layout()},[m,x,Y]);var Me=Object(C.useState)(s(m)),De=Object(P.a)(Me,2),Oe=De[0],pe=De[1],be=Object(C.useState)(s(x)),Ce=Object(P.a)(be,2),we=Ce[0],$e=Ce[1],it=Object(re.a)(Object(re.a)({},D),{},{width:Oe,height:we});return w.a.createElement("div",{className:"my-monaco-editor",ref:Ne,style:it})};function b(y){var _=y.width,m=_===void 0?"100%":_,g=y.height,x=g===void 0?"100%":g,l=y.original,T=y.modified,A=y.language,O=y.options,D=O===void 0?{}:O,I=Object(C.useRef)(),j=Object(C.useState)(null),B=Object(P.a)(j,2),ee=B[0],F=B[1];function G(q){var ae;return I.current&&(ae=new u.default(function(oe){var ve=Object(S.a)(oe),he;try{for(ve.s();!(he=ve.n()).done;){var _e=he.value;(_e.target.offsetHeight>0||_e.target.offsetWidth>0)&&q.layout()}}catch(fe){ve.e(fe)}finally{ve.f()}}),ae.observe(I.current)),ae}Object(C.useEffect)(function(){I.current&&W.e(27).then(W.t.bind(null,"M/lh",7)).then(function(q){h=q;var ae=h.editor.createDiffEditor(I.current,Object(re.a)(Object(re.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}));F(ae);var oe=G(ae);return function(){ae.dispose();var ve=ae.getModel();ve&&ve.dispose(),oe.unobserve(I.current)}})},[]),Object(C.useEffect)(function(){ee&&ee.setModel({original:h.editor.createModel(l,A),modified:h.editor.createModel(T,A)})},[l,T,A,ee]);var X=s(m),Z=s(x),K={width:X,height:Z};return w.a.createElement("div",{className:"my-diff-editor",ref:I,style:K})}},ZpRC:function(Ve,Be,W){"use strict";function re(f){return typeof f=="object"&&f!=null&&f.nodeType===1}function $(f,o){return(!o||f!=="hidden")&&f!=="visible"&&f!=="clip"}function U(f,o){if(f.clientHeight<f.scrollHeight||f.clientWidth<f.scrollWidth){var a=getComputedStyle(f,null);return $(a.overflowY,o)||$(a.overflowX,o)||function(c){var s=function(d){if(!d.ownerDocument||!d.ownerDocument.defaultView)return null;try{return d.ownerDocument.defaultView.frameElement}catch(i){return null}}(c);return!!s&&(s.clientHeight<c.scrollHeight||s.clientWidth<c.scrollWidth)}(f)}return!1}function S(f,o,a,c,s,d,i,t){return d<f&&i>o||d>f&&i<o?0:d<=f&&t<=a||i>=o&&t>=a?d-f-c:i>o&&t<a||d<f&&t>a?i-o+s:0}var P=function(f,o){var a=window,c=o.scrollMode,s=o.block,d=o.inline,i=o.boundary,t=o.skipOverflowHiddenElements,n=typeof i=="function"?i:function(Ne){return Ne!==i};if(!re(f))throw new TypeError("Invalid target");for(var h=document.scrollingElement||document.documentElement,v=[],b=f;re(b)&&n(b);){if((b=b.parentElement)===h){v.push(b);break}b!=null&&b===document.body&&U(b)&&!U(document.documentElement)||b!=null&&U(b,t)&&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,x=f.getBoundingClientRect(),l=x.height,T=x.width,A=x.top,O=x.right,D=x.bottom,I=x.left,j=s==="start"||s==="nearest"?A:s==="end"?D:A+l/2,B=d==="center"?I+T/2:d==="end"?O:I,ee=[],F=0;F<v.length;F++){var G=v[F],X=G.getBoundingClientRect(),Z=X.height,K=X.width,q=X.top,ae=X.right,oe=X.bottom,ve=X.left;if(c==="if-needed"&&A>=0&&I>=0&&D<=_&&O<=y&&A>=q&&D<=oe&&I>=ve&&O<=ae)return ee;var he=getComputedStyle(G),_e=parseInt(he.borderLeftWidth,10),fe=parseInt(he.borderTopWidth,10),xe=parseInt(he.borderRightWidth,10),je=parseInt(he.borderBottomWidth,10),Le=0,ke=0,Fe="offsetWidth"in G?G.offsetWidth-G.clientWidth-_e-xe:0,ge="offsetHeight"in G?G.offsetHeight-G.clientHeight-fe-je:0;if(h===G)Le=s==="start"?j:s==="end"?j-_:s==="nearest"?S(g,g+_,_,fe,je,g+j,g+j+l,l):j-_/2,ke=d==="start"?B:d==="center"?B-y/2:d==="end"?B-y:S(m,m+y,y,_e,xe,m+B,m+B+T,T),Le=Math.max(0,Le+g),ke=Math.max(0,ke+m);else{Le=s==="start"?j-q-fe:s==="end"?j-oe+je+ge:s==="nearest"?S(q,oe,Z,fe,je+ge,j,j+l,l):j-(q+Z/2)+ge/2,ke=d==="start"?B-ve-_e:d==="center"?B-(ve+K/2)+Fe/2:d==="end"?B-ae+xe+Fe:S(ve,ae,K,_e,xe+Fe,B,B+T,T);var ce=G.scrollLeft,Ie=G.scrollTop;j+=Ie-(Le=Math.max(0,Math.min(Ie+Le,G.scrollHeight-Z+ge))),B+=ce-(ke=Math.max(0,Math.min(ce+ke,G.scrollWidth-K+Fe)))}ee.push({el:G,top:Le,left:ke})}return ee};function E(f){return f===Object(f)&&Object.keys(f).length!==0}function C(f,o){o===void 0&&(o="auto");var a="scrollBehavior"in document.body.style;f.forEach(function(c){var s=c.el,d=c.top,i=c.left;s.scroll&&a?s.scroll({top:d,left:i,behavior:o}):(s.scrollTop=d,s.scrollLeft=i)})}function w(f){return f===!1?{block:"end",inline:"nearest"}:E(f)?f:{block:"start",inline:"nearest"}}function u(f,o){var a=!f.ownerDocument.documentElement.contains(f);if(E(o)&&typeof o.behavior=="function")return o.behavior(a?[]:P(f,o));if(a)return;var c=w(o);return C(P(f,c),c.behavior)}var p=Be.a=u},ZsLC:function(Ve,Be,W){Ve.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"}},aRTE:function(Ve,Be){Ve.exports={L:1,M:0,Q:3,H:2}},bCnd:function(Ve,Be,W){"use strict";W.d(Be,"b",function(){return S}),W.d(Be,"a",function(){return P});var re=W("je13"),$=W.n(re),U=!1;function S(E,C){var w=$.a.get("__ec");w||(w={}),w[E]=C,$.a.set("__ec",w)}function P(E,C){var w=$.a.get("__ec");return w?w[E]===void 0?C:w[E]:C}},bT9E:function(Ve,Be,W){"use strict";W.d(Be,"a",function(){return $});var re=W("VTBJ");function $(U,S){var P=Object(re.a)({},U);return Array.isArray(S)&&S.forEach(function(E){delete P[E]}),P}},bdLU:function(Ve,Be,W){"use strict";W.d(Be,"a",function(){return re});var re;(function($){$[$.NOMATCH=-1]="NOMATCH",$[$.OK=0]="OK",$[$.TIMEOUT=2]="TIMEOUT",$[$.PODFAILURE=3]="PODFAILURE",$[$.COMPILEFAILURE=4]="COMPILEFAILURE",$[$.EXECUTEFAILURE=5]="EXECUTEFAILURE"})(re||(re={}))},biw7:function(Ve,Be,W){"use strict";var re=W("cDcd"),$=W.n(re),U=re.createContext(null);Be.a=U},c5Ni:function(Ve,Be,W){},cDPC:function(Ve,Be,W){"use strict";var re=W("tJVT"),$=W("cDcd"),U=W.n($),S=W("i3hx"),P=W.n(S);Be.a=function(E){var C=E.defaultX,w=C===void 0?"40%":C,u=E.leftChild,p=E.rightChild,f=E.className,o=E.hideResize,a=o===void 0?!1:o,c=Object($.useState)(w),s=Object(re.a)(c,2),d=s[0],i=s[1],t=Object($.useRef)();function n(){t.current=!0}Object($.useEffect)(function(){function b(_){t.current&&i(_.pageX)}function y(){t.current=!1}return window.addEventListener("mousemove",b),window.addEventListener("mouseup",y),function(){window.removeEventListener("mousemove",b),window.removeEventListener("mouseup",y)}},[]);var h=typeof d=="number"&&d!==.01?"".concat(d,"px"):w,v="calc(100% - ".concat(a?"0px":"4px"," - ").concat(h,")");return U.a.createElement("div",{className:"split-panel-container ".concat(f)},U.a.createElement("section",{style:{width:h,display:d===.01?"none":""}},u),U.a.createElement("section",{className:"resize-x-bar",onMouseDown:n},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))}},dQei:function(Ve,Be){for(var W={glog:function($){if($<1)throw new Error("glog("+$+")");return W.LOG_TABLE[$]},gexp:function($){for(;$<0;)$+=255;for(;$>=256;)$-=255;return W.EXP_TABLE[$]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},re=0;re<8;re++)W.EXP_TABLE[re]=1<<re;for(var re=8;re<256;re++)W.EXP_TABLE[re]=W.EXP_TABLE[re-4]^W.EXP_TABLE[re-5]^W.EXP_TABLE[re-6]^W.EXP_TABLE[re-8];for(var re=0;re<255;re++)W.LOG_TABLE[W.EXP_TABLE[re]]=re;Ve.exports=W},dWSS:function(Ve,Be,W){var re=W("dQei");function $(U,S){if(U.length==null)throw new Error(U.length+"/"+S);for(var P=0;P<U.length&&U[P]==0;)P++;this.num=new Array(U.length-P+S);for(var E=0;E<U.length-P;E++)this.num[E]=U[E+P]}$.prototype={get:function(U){return this.num[U]},getLength:function(){return this.num.length},multiply:function(U){for(var S=new Array(this.getLength()+U.getLength()-1),P=0;P<this.getLength();P++)for(var E=0;E<U.getLength();E++)S[P+E]^=re.gexp(re.glog(this.get(P))+re.glog(U.get(E)));return new $(S,0)},mod:function(U){if(this.getLength()-U.getLength()<0)return this;for(var S=re.glog(this.get(0))-re.glog(U.get(0)),P=new Array(this.getLength()),E=0;E<this.getLength();E++)P[E]=this.get(E);for(var E=0;E<U.getLength();E++)P[E]^=re.gexp(re.glog(U.get(E))+S);return new $(P,0).mod(U)}},Ve.exports=$},dejd:function(Ve,Be,W){},dmUQ:function(Ve,Be,W){"use strict";var re=W("Ff2n"),$=W("rePB"),U=W("1OyB"),S=W("vuIU"),P=W("Ji7U"),E=W("md7G"),C=W("foSv"),w=W("cDcd"),u=W.n(w),p=W("TSYQ"),f=W.n(p),o=W("4IlW");function a(l,T){var A=Object.keys(l);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(l);T&&(O=O.filter(function(D){return Object.getOwnPropertyDescriptor(l,D).enumerable})),A.push.apply(A,O)}return A}function c(l){for(var T=1;T<arguments.length;T++){var A=arguments[T]!=null?arguments[T]:{};T%2?a(Object(A),!0).forEach(function(O){Object($.a)(l,O,A[O])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(A)):a(Object(A)).forEach(function(O){Object.defineProperty(l,O,Object.getOwnPropertyDescriptor(A,O))})}return l}function s(l){var T=d();return function(){var O=Object(C.a)(l),D;if(T){var I=Object(C.a)(this).constructor;D=Reflect.construct(O,arguments,I)}else D=O.apply(this,arguments);return Object(E.a)(this,D)}}function d(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(l){return!1}}function i(){}function t(l){l.preventDefault()}var n=function(T){return T.replace(/[^\w.-]+/g,"")},h=200,v=600,b=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,y=function(T){return T!=null},_=function(T,A){return A===T||typeof A=="number"&&typeof T=="number"&&isNaN(A)&&isNaN(T)},m=function(l){Object(P.a)(A,l);var T=s(A);function A(O){var D;Object(U.a)(this,A),D=T.call(this,O),D.onKeyDown=function(B){var ee=D.props,F=ee.onKeyDown,G=ee.onPressEnter;if(B.keyCode===o.a.UP){var X=D.getRatio(B);D.up(B,X,null),D.stop()}else if(B.keyCode===o.a.DOWN){var Z=D.getRatio(B);D.down(B,Z,null),D.stop()}else B.keyCode===o.a.ENTER&&G&&G(B);if(D.recordCursorPosition(),D.lastKeyCode=B.keyCode,F){for(var K=arguments.length,q=new Array(K>1?K-1:0),ae=1;ae<K;ae++)q[ae-1]=arguments[ae];F.apply(void 0,[B].concat(q))}},D.onKeyUp=function(B){var ee=D.props.onKeyUp;if(D.stop(),D.recordCursorPosition(),ee){for(var F=arguments.length,G=new Array(F>1?F-1:0),X=1;X<F;X++)G[X-1]=arguments[X];ee.apply(void 0,[B].concat(G))}},D.onChange=function(B){var ee=D.props.onChange;D.state.focused&&(D.inputting=!0),D.rawInput=D.props.parser(D.getValueFromEvent(B)),D.setState({inputValue:D.rawInput}),ee(D.toNumber(D.rawInput))},D.onMouseUp=function(){var B=D.props.onMouseUp;D.recordCursorPosition(),B&&B.apply(void 0,arguments)},D.onFocus=function(){var B;D.setState({focused:!0}),(B=D.props).onFocus.apply(B,arguments)},D.onBlur=function(){var B=D.props.onBlur;D.inputting=!1,D.setState({focused:!1});var ee=D.getCurrentValidValue(D.state.inputValue),F=D.setValue(ee,i);if(B){var G=D.input.value,X=D.getInputDisplayValue({focus:!1,value:F});D.input.value=X&&Number(X),B.apply(void 0,arguments),D.input.value=G}},D.getRatio=function(B){var ee=1;return B.metaKey||B.ctrlKey?ee=.1:B.shiftKey&&(ee=10),ee},D.getFullNum=function(B){return isNaN(B)?B:/e/i.test(String(B))?Number(B).toFixed(18).replace(/\.?0+$/,""):B},D.getPrecision=function(B){if(y(D.props.precision))return D.props.precision;var ee=String(B);if(ee.indexOf("e-")>=0)return parseInt(ee.slice(ee.indexOf("e-")+2),10);var F=0;return ee.indexOf(".")>=0&&(F=ee.length-ee.indexOf(".")-1),F},D.getInputDisplayValue=function(B){var ee=B||D.state,F=ee.focused,G=ee.inputValue,X=ee.value,Z;F?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(B){}},D.restoreByAfter=function(B){if(B===void 0)return!1;var ee=D.input.value,F=ee.lastIndexOf(B);if(F===-1)return!1;var G=D.cursorBefore.length;return D.lastKeyCode===o.a.DELETE&&D.cursorBefore.charAt(G-1)===B[0]?(D.fixCaret(G,G),!0):F+B.length===ee.length?(D.fixCaret(F,F),!0):!1},D.partRestoreByAfter=function(B){return B===void 0?!1:Array.prototype.some.call(B,function(ee,F){var G=B.substring(F);return D.restoreByAfter(G)})},D.isNotCompleteNumber=function(B){return isNaN(B)||B===""||B===null||B&&B.toString().indexOf(".")===B.toString().length-1},D.stop=function(){D.autoStepTimer&&clearTimeout(D.autoStepTimer)},D.down=function(B,ee,F){D.pressingUpOrDown=!0,D.step("down",B,ee,F)},D.up=function(B,ee,F){D.pressingUpOrDown=!0,D.step("up",B,ee,F)},D.saveInput=function(B){D.input=B};var I=O.value;I===void 0&&(I=O.defaultValue),D.state={focused:O.autoFocus};var j=D.getValidValue(D.toNumber(I));return D.state=c(c({},D.state),{},{inputValue:D.toPrecisionAsStep(j),value:j}),D}return Object(S.a)(A,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(D){var I=this.props,j=I.value,B=I.onChange,ee=I.max,F=I.min,G=this.state.focused;if(D){if(!_(D.value,j)||!_(D.max,ee)||!_(D.min,F)){var X=G?j:this.getValidValue(j),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?j:this.state.value;"max"in this.props&&D.max!==ee&&typeof K=="number"&&K>ee&&B&&B(ee),"min"in this.props&&D.min!==F&&typeof K=="number"&&K<F&&B&&B(F)}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===o.a.BACKSPACE?q=this.cursorStart-1:this.lastKeyCode===o.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 o.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case o.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(ae){}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,j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,B=parseFloat(D);return isNaN(B)?D:(B<I&&(B=I),B>j&&(B=j),B)}},{key:"setValue",value:function(D,I){var j=this.props.precision,B=this.isNotCompleteNumber(parseFloat(D))?null:parseFloat(D),ee=this.state.value,F=ee===void 0?null:ee,G=this.state.inputValue,X=G===void 0?null:G,Z=typeof B=="number"?B.toFixed(j):"".concat(B),K=B!==F||Z!=="".concat(X);return"value"in this.props?(X=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:X},I)):this.setState({value:B,inputValue:this.toPrecisionAsStep(D)},I),K&&this.props.onChange(B),B}},{key:"getMaxPrecision",value:function(D){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,j=this.props,B=j.precision,ee=j.step;if(y(B))return B;var F=this.getPrecision(I),G=this.getPrecision(ee),X=this.getPrecision(D);return D?Math.max(X,F+G):F+G}},{key:"getPrecisionFactor",value:function(D){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,j=this.getMaxPrecision(D,I);return Math.pow(10,j)}},{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,j=this.state.focused,B=D&&D.length>16&&j;return this.isNotCompleteNumber(D)||B?D:y(I)?Math.round(D*Math.pow(10,I))/Math.pow(10,I):Number(D)}},{key:"upStep",value:function(D,I){var j=this.props.step,B=this.getPrecisionFactor(D,I),ee=Math.abs(this.getMaxPrecision(D,I)),F=((B*D+B*j*I)/B).toFixed(ee);return this.toNumber(F)}},{key:"downStep",value:function(D,I){var j=this.props.step,B=this.getPrecisionFactor(D,I),ee=Math.abs(this.getMaxPrecision(D,I)),F=((B*D-B*j*I)/B).toFixed(ee);return this.toNumber(F)}},{key:"step",value:function(D,I){var j=this,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,ee=arguments.length>3?arguments[3]:void 0;this.stop(),I&&(I.persist(),I.preventDefault());var F=this.props;if(F.disabled)return;var G=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(G))return;var X=this["".concat(D,"Step")](G,B),Z=X>F.max||X<F.min;if(X>F.max?X=F.max:X<F.min&&(X=F.min),this.setValue(X,null),this.setState({focused:!0},function(){j.pressingUpOrDown=!1}),Z)return;this.autoStepTimer=setTimeout(function(){j[D](I,B,!0)},ee?h:v)}},{key:"fixCaret",value:function(D,I){if(D===void 0||I===void 0||!this.input||!this.input.value)return;try{var j=this.input.selectionStart,B=this.input.selectionEnd;(D!==j||I!==B)&&this.input.setSelectionRange(D,I)}catch(ee){}}},{key:"render",value:function(){var D,I=this.props,j=I.prefixCls,B=I.disabled,ee=I.readOnly,F=I.useTouch,G=I.autoComplete,X=I.upHandler,Z=I.downHandler,K=I.className,q=I.max,ae=I.min,oe=I.style,ve=I.title,he=I.onMouseEnter,_e=I.onMouseLeave,fe=I.onMouseOver,xe=I.onMouseOut,je=I.required,Le=I.onClick,ke=I.tabIndex,Fe=I.type,ge=I.placeholder,ce=I.id,Ie=I.inputMode,Ne=I.pattern,Xe=I.step,te=I.maxLength,k=I.autoFocus,N=I.name,J=I.onPaste,V=I.onInput,Y=Object(re.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,Re=f()(j,(D={},Object($.a)(D,K,!!K),Object($.a)(D,"".concat(j,"-disabled"),B),Object($.a)(D,"".concat(j,"-focused"),at),D)),Pe={};Object.keys(Y).forEach(function(we){(we.substr(0,5)==="data-"||we.substr(0,5)==="aria-"||we==="role")&&(Pe[we]=Y[we])});var Ye=!ee&&!B,Ze=this.getInputDisplayValue(null),ze=(Ae||Ae===0)&&(isNaN(Ae)||Number(Ae)>=q),We=(Ae||Ae===0)&&(isNaN(Ae)||Number(Ae)<=ae),Me=ze||B||ee,De=We||B||ee,Oe=f()("".concat(j,"-handler"),"".concat(j,"-handler-up"),Object($.a)({},"".concat(j,"-handler-up-disabled"),Me)),pe=f()("".concat(j,"-handler"),"".concat(j,"-handler-down"),Object($.a)({},"".concat(j,"-handler-down-disabled"),De)),be=F?{onTouchStart:Me?i:this.up,onTouchEnd:this.stop}:{onMouseDown:Me?i:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Ce=F?{onTouchStart:De?i:this.down,onTouchEnd:this.stop}:{onMouseDown:De?i:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return u.a.createElement("div",{className:Re,style:oe,title:ve,onMouseEnter:he,onMouseLeave:_e,onMouseOver:fe,onMouseOut:xe,onFocus:function(){return null},onBlur:function(){return null}},u.a.createElement("div",{className:"".concat(j,"-handler-wrap")},u.a.createElement("span",Object.assign({unselectable:"on"},be,{role:"button","aria-label":"Increase Value","aria-disabled":Me,className:Oe}),X||u.a.createElement("span",{unselectable:"on",className:"".concat(j,"-handler-up-inner"),onClick:t})),u.a.createElement("span",Object.assign({unselectable:"on"},Ce,{role:"button","aria-label":"Decrease Value","aria-disabled":De,className:pe}),Z||u.a.createElement("span",{unselectable:"on",className:"".concat(j,"-handler-down-inner"),onClick:t}))),u.a.createElement("div",{className:"".concat(j,"-input-wrap")},u.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":ae,"aria-valuemax":q,"aria-valuenow":Ae,required:je,type:Fe,placeholder:ge,onPaste:J,onClick:Le,onMouseUp:this.onMouseUp,className:"".concat(j,"-input"),tabIndex:ke,autoComplete:G,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Ye?this.onKeyDown:i,onKeyUp:Ye?this.onKeyUp:i,autoFocus:k,maxLength:te,readOnly:ee,disabled:B,max:q,min:ae,step:Xe,name:N,title:ve,id:ce,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(Ze),pattern:Ne,inputMode:Ie,onInput:V},Pe))))}}]),A}(u.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:n,required:!1,autoComplete:"off"};var g=m,x=Be.a=g},f4xo:function(Ve,Be,W){var re=W("nVVt");function $(U){this.mode=re.MODE_8BIT_BYTE,this.data=U}$.prototype={getLength:function(U){return this.data.length},write:function(U){for(var S=0;S<this.data.length;S++)U.put(this.data.charCodeAt(S),8)}},Ve.exports=$},fcSX:function(Ve,Be,W){"use strict";var re=W("Ff2n"),$=W("1OyB"),U=W("vuIU"),S=W("Ji7U"),P=W("md7G"),E=W("foSv"),C=W("1W/9"),w=W("cDcd"),u=W("rePB"),p=W("JX7q"),f=W("TSYQ"),o=W.n(f),a=W("qx4F"),c=W("4IlW");function s(B){return Array.isArray(B)?B:[B]}var d={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},i=Object.keys(d).filter(function(B){if(typeof document=="undefined")return!1;var ee=document.getElementsByTagName("html")[0];return B in(ee?ee.style:{})})[0],t=d[i];function n(B,ee,F,G){B.addEventListener?B.addEventListener(ee,F,G):B.attachEvent&&B.attachEvent("on".concat(ee),F)}function h(B,ee,F,G){B.removeEventListener?B.removeEventListener(ee,F,G):B.attachEvent&&B.detachEvent("on".concat(ee),F)}function v(B,ee){var F=typeof B=="function"?B(ee):B;return Array.isArray(F)?F.length===2?F:[F[0],F[1]]:[F]}var b=function(ee){return!isNaN(parseFloat(ee))&&isFinite(ee)},y=!(typeof window!="undefined"&&window.document&&window.document.createElement),_=function B(ee,F,G,X){if(!F||F===document||F instanceof Document)return!1;if(F===ee.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=F.scrollHeight-F.clientHeight,ae=F.scrollWidth-F.clientWidth,oe=document.defaultView.getComputedStyle(F),ve=oe.overflowY==="auto"||oe.overflowY==="scroll",he=oe.overflowX==="auto"||oe.overflowX==="scroll",_e=q&&ve,fe=ae&&he;return Z&&(!_e||_e&&(F.scrollTop>=q&&X<0||F.scrollTop<=0&&X>0))||K&&(!fe||fe&&(F.scrollLeft>=ae&&G<0||F.scrollLeft<=0&&G>0))?B(ee,F.parentNode,G,X):!1};function m(B){var ee=g();return function(){var G=Object(E.a)(B),X;if(ee){var Z=Object(E.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(B){return!1}}var x={},l=function(B){Object(S.a)(F,B);var ee=m(F);function F(G){var X;return Object($.a)(this,F),X=ee.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,ae=Z.changedTouches[0].clientY-X.startPos.y;(K===X.maskDom||K===X.handlerDom||K===X.contentDom&&_(K,Z.target,q,ae))&&Z.cancelable&&Z.preventDefault()},X.transitionEnd=function(Z){var K=Z.target;h(K,t,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,ae=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="")),ae&&ae(!!q))},X.openLevelTransition=function(){var Z=X.props,K=Z.open,q=Z.width,ae=Z.height,oe=X.getHorizontalBoolAndPlacementName(),ve=oe.isHorizontal,he=oe.placementName,_e=X.contentDom?X.contentDom.getBoundingClientRect()[ve?"width":"height"]:0,fe=(ve?q:ae)||_e;X.setLevelAndScrolling(K,he,fe)},X.setLevelTransform=function(Z,K,q,ae){var oe=X.props,ve=oe.placement,he=oe.levelMove,_e=oe.duration,fe=oe.ease,xe=oe.showMask;X.levelDom.forEach(function(je){je.style.transition="transform ".concat(_e," ").concat(fe),n(je,t,X.transitionEnd);var Le=Z?q:0;if(he){var ke=v(he,{target:je,open:Z});Le=Z?ke[0]:ke[1]||0}var Fe=typeof Le=="number"?"".concat(Le,"px"):Le,ge=ve==="left"||ve==="top"?Fe:"-".concat(Fe);ge=xe&&ve==="right"&&ae?"calc(".concat(ge," + ").concat(ae,"px)"):ge,je.style.transform=Le?"".concat(K,"(").concat(ge,")"):""})},X.setLevelAndScrolling=function(Z,K,q){var ae=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)}ae&&ae(Z)},X.toggleScrollingToDrawerAndBody=function(Z){var K=X.props,q=K.getOpenCount,ae=K.getContainer,oe=K.showMask,ve=K.open,he=ae&&ae(),_e=q&&q();if(he&&he.parentNode===document.body&&oe){var fe=["touchstart"],xe=[document.body,X.maskDom,X.handlerDom,X.contentDom];ve&&document.body.style.overflow!=="hidden"?(Z&&X.addScrollingEffect(Z),_e===1&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",xe.forEach(function(je,Le){if(!je)return;n(je,fe[Le]||"touchmove",Le?X.removeMoveHandler:X.removeStartHandler,X.passive)})):X.getCurrentDrawerSome()&&(_e||(document.body.style.overflow=""),document.body.style.touchAction="",Z&&X.remScrollingEffect(Z),xe.forEach(function(je,Le){if(!je)return;h(je,fe[Le]||"touchmove",Le?X.removeMoveHandler:X.removeStartHandler,X.passive)}))}},X.addScrollingEffect=function(Z){var K=X.props,q=K.placement,ae=K.duration,oe=K.ease,ve=K.getOpenCount,he=K.switchScrollingEffect,_e=ve&&ve();_e===1&&he();var fe="width ".concat(ae," ").concat(oe),xe="transform ".concat(ae," ").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(xe,",").concat(fe),X.dom.style.width="",X.dom.style.transform="")})},X.remScrollingEffect=function(Z){var K=X.props,q=K.placement,ae=K.duration,oe=K.ease,ve=K.getOpenCount,he=K.switchScrollingEffect,_e=ve&&ve();_e||he(!0),i&&(document.body.style.overflowX="hidden"),X.dom.style.transition="none";var fe,xe="width ".concat(ae," ").concat(oe),je="transform ".concat(ae," ").concat(oe);switch(q){case"left":{X.dom.style.width="100%",xe="width 0s ".concat(oe," ").concat(ae);break}case"right":{X.dom.style.transform="translateX(".concat(Z,"px)"),X.dom.style.width="100%",xe="width 0s ".concat(oe," ").concat(ae),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(ae);break}default:break}clearTimeout(X.timeout),X.timeout=setTimeout(function(){X.dom&&(X.dom.style.transition="".concat(je,",").concat(fe?"".concat(fe,","):"").concat(xe),X.dom.style.transform="",X.dom.style.width="",X.dom.style.height="")})},X.getCurrentDrawerSome=function(){return!Object.keys(x).some(function(Z){return x[Z]})},X.getLevelDom=function(Z){var K=Z.level,q=Z.getContainer;if(y)return;var ae=q&&q(),oe=ae?ae.parentNode:null;if(X.levelDom=[],K==="all"){var ve=oe?Array.prototype.slice.call(oe.children):[];ve.forEach(function(he){he.nodeName!=="SCRIPT"&&he.nodeName!=="STYLE"&&he.nodeName!=="LINK"&&he!==ae&&X.levelDom.push(he)})}else K&&s(K).forEach(function(he){document.querySelectorAll(he).forEach(function(_e){X.levelDom.push(_e)})})},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)(F,[{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(ve){}this.passive=Z?{passive:!1}:!1}var K=this.props,q=K.open,ae=K.getContainer,oe=ae&&ae();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&&(x[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,ae=q&&q();K!==X.open&&(K&&this.domFocus(),ae&&ae.parentNode===document.body&&(x[this.drawerId]=!!K),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var X=this.props,Z=X.getOpenCount,K=X.open,q=X.switchScrollingEffect,ae=typeof Z=="function"&&Z();delete x[this.drawerId],K&&(this.setLevelTransform(!1),document.body.style.touchAction=""),ae||(document.body.style.overflow="",q(!0))}},{key:"render",value:function(){var X,Z=this,K=this.props,q=K.className,ae=K.children,oe=K.style,ve=K.width,he=K.height,_e=K.defaultOpen,fe=K.open,xe=K.prefixCls,je=K.placement,Le=K.level,ke=K.levelMove,Fe=K.ease,ge=K.duration,ce=K.getContainer,Ie=K.handler,Ne=K.onChange,Xe=K.afterVisibleChange,te=K.showMask,k=K.maskClosable,N=K.maskStyle,J=K.onClose,V=K.onHandleClick,Y=K.keyboard,me=K.getOpenCount,Ae=K.switchScrollingEffect,at=Object(re.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"]),Re=this.dom?fe:!1,Pe=o()(xe,(X={},Object(u.a)(X,"".concat(xe,"-").concat(je),!0),Object(u.a)(X,"".concat(xe,"-open"),Re),Object(u.a)(X,q||"",!!q),Object(u.a)(X,"no-mask",!te),X)),Ye=this.getHorizontalBoolAndPlacementName(),Ze=Ye.placementName,ze=je==="left"||je==="top"?"-100%":"100%",We=Re?"":"".concat(Ze,"(").concat(ze,")"),Me=Ie&&w.cloneElement(Ie,{onClick:function(Oe){Ie.props.onClick&&Ie.props.onClick(),V&&V(Oe)},ref:function(Oe){Z.handlerDom=Oe}});return w.createElement("div",Object.assign({},at,{tabIndex:-1,className:Pe,style:oe,ref:function(Oe){Z.dom=Oe},onKeyDown:Re&&Y?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),te&&w.createElement("div",{className:"".concat(xe,"-mask"),onClick:k?J:void 0,style:N,ref:function(Oe){Z.maskDom=Oe}}),w.createElement("div",{className:"".concat(xe,"-content-wrapper"),style:{transform:We,msTransform:We,width:b(ve)?"".concat(ve,"px"):ve,height:b(he)?"".concat(he,"px"):he},ref:function(Oe){Z.contentWrapper=Oe}},w.createElement("div",{className:"".concat(xe,"-content"),ref:function(Oe){Z.contentDom=Oe},onTouchStart:Re&&te?this.removeStartHandler:void 0,onTouchMove:Re&&te?this.removeMoveHandler:void 0},ae),Me))}}],[{key:"getDerivedStateFromProps",value:function(X,Z){var K=Z.prevProps,q=Z._self,ae={prevProps:X};if(K!==void 0){var oe=X.placement,ve=X.level;oe!==K.placement&&(q.contentDom=null),ve!==K.level&&q.getLevelDom(X)}return ae}}]),F}(w.Component);l.defaultProps={switchScrollingEffect:function(){}};var T=l;function A(B){var ee=O();return function(){var G=Object(E.a)(B),X;if(ee){var Z=Object(E.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(B){return!1}}var D=function(B){Object(S.a)(F,B);var ee=A(F);function F(G){var X;Object($.a)(this,F),X=ee.call(this,G),X.onHandleClick=function(K){var q=X.props,ae=q.onHandleClick,oe=q.open;if(ae&&ae(K),typeof oe=="undefined"){var ve=X.state.open;X.setState({open:!ve})}},X.onClose=function(K){var q=X.props,ae=q.onClose,oe=q.open;ae&&ae(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)(F,[{key:"render",value:function(){var X=this,Z=this.props,K=Z.defaultOpen,q=Z.getContainer,ae=Z.wrapperClassName,oe=Z.forceRender,ve=Z.handler,he=Object(re.a)(Z,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),_e=this.state.open;if(!q)return w.createElement("div",{className:ae,ref:function(je){X.dom=je}},w.createElement(T,Object.assign({},he,{open:_e,handler:ve,getContainer:function(){return X.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var fe=!!ve||oe;return w.createElement(C.a,{visible:_e,forceRender:fe,getContainer:q,wrapperClassName:ae},function(xe){var je=xe.visible,Le=xe.afterClose,ke=Object(re.a)(xe,["visible","afterClose"]);return w.createElement(T,Object.assign({},he,ke,{open:je!==void 0?je:_e,afterVisibleChange:Le!==void 0?Le:he.afterVisibleChange,handler:ve,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}}]),F}(w.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:w.createElement("div",{className:"drawer-handle"},w.createElement("i",{className:"drawer-handle-icon"})),showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",className:"",keyboard:!0,forceRender:!1};var I=D,j=Be.a=I},fcyK:function(Ve,Be,W){},fyJ8:function(Ve,Be,W){"use strict";var re=W("rePB"),$=W("VTBJ"),U=W("Ff2n"),S=W("U8pU"),P=W("cDcd"),E=W.n(P),C=W("TSYQ"),w=W.n(C),u=W("c+Xe"),p=W("sR1s");function f(d){return d&&Object(S.a)(d)==="object"&&!Array.isArray(d)&&!P.isValidElement(d)}function o(d){return typeof d=="string"?!0:Object(u.c)(d)}function a(d,i){var t,n=d.prefixCls,h=d.className,v=d.record,b=d.index,y=d.dataIndex,_=d.render,m=d.children,g=d.component,x=g===void 0?"td":g,l=d.colSpan,T=d.rowSpan,A=d.fixLeft,O=d.fixRight,D=d.firstFixLeft,I=d.lastFixLeft,j=d.firstFixRight,B=d.lastFixRight,ee=d.appendNode,F=d.additionalProps,G=F===void 0?{}:F,X=d.ellipsis,Z=d.align,K=d.rowType,q=d.isSticky,ae="".concat(n,"-cell"),oe,ve;if(m)ve=m;else{var he=Object(p.b)(v,y);if(ve=he,_){var _e=_(he,v,b);f(_e)?(ve=_e.children,oe=_e.props):ve=_e}}Object(S.a)(ve)==="object"&&!Array.isArray(ve)&&!P.isValidElement(ve)&&(ve=null),X&&(I||j)&&(ve=P.createElement("span",{className:"".concat(ae,"-content")},ve));var fe=oe||{},xe=fe.colSpan,je=fe.rowSpan,Le=fe.style,ke=fe.className,Fe=Object(U.a)(fe,["colSpan","rowSpan","style","className"]),ge=xe!==void 0?xe:l,ce=je!==void 0?je:T;if(ge===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 te={};Z&&(te.textAlign=Z);var k,N=X===!0?{showTitle:!0}:X;N&&(N.showTitle||K==="header")&&(typeof ve=="string"||typeof ve=="number"?k=ve.toString():P.isValidElement(ve)&&typeof ve.props.children=="string"&&(k=ve.props.children));var J=Object($.a)(Object($.a)(Object($.a)({title:k},Fe),G),{},{colSpan:ge&&ge!==1?ge:null,rowSpan:ce&&ce!==1?ce:null,className:w()(ae,h,(t={},Object(re.a)(t,"".concat(ae,"-fix-left"),Ne),Object(re.a)(t,"".concat(ae,"-fix-left-first"),D),Object(re.a)(t,"".concat(ae,"-fix-left-last"),I),Object(re.a)(t,"".concat(ae,"-fix-right"),Xe),Object(re.a)(t,"".concat(ae,"-fix-right-first"),j),Object(re.a)(t,"".concat(ae,"-fix-right-last"),B),Object(re.a)(t,"".concat(ae,"-ellipsis"),X),Object(re.a)(t,"".concat(ae,"-with-append"),ee),Object(re.a)(t,"".concat(ae,"-fix-sticky"),(Ne||Xe)&&q),t),G.className,ke),style:Object($.a)(Object($.a)(Object($.a)(Object($.a)({},G.style),te),Ie),Le),ref:o(x)?i:null});return P.createElement(x,Object.assign({},J),ee,ve)}var c=P.forwardRef(a);c.displayName="Cell";var s=P.memo(c,function(d,i){return i.shouldCellUpdate?!i.shouldCellUpdate(i.record,d.record):!1});Be.a=s},gRFJ:function(Ve,Be,W){Ve.exports=[W("rdUC"),W("ynwM"),W("RELg"),W("DlR+"),W("CrYA"),W("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(Ve){return Ve<10?"0"+Ve:Ve}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(Ve){return rx_escapable.lastIndex=0,rx_escapable.test(Ve)?'"'+Ve.replace(rx_escapable,function(Be){var W=meta[Be];return typeof W=="string"?W:"\\u"+("0000"+Be.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+Ve+'"'}function str(Ve,Be){var W,re,$,U,S=gap,P,E=Be[Ve];E&&typeof E=="object"&&typeof E.toJSON=="function"&&(E=E.toJSON(Ve)),typeof rep=="function"&&(E=rep.call(Be,Ve,E));switch(typeof E){case"string":return quote(E);case"number":return isFinite(E)?String(E):"null";case"boolean":case"null":return String(E);case"object":if(!E)return"null";if(gap+=indent,P=[],Object.prototype.toString.apply(E)==="[object Array]"){for(U=E.length,W=0;W<U;W+=1)P[W]=str(W,E)||"null";return $=P.length===0?"[]":gap?`[
|
|
|
`+gap+P.join(`,
|
|
|
`+gap)+`
|
|
|
`+S+"]":"["+P.join(",")+"]",gap=S,$}if(rep&&typeof rep=="object")for(U=rep.length,W=0;W<U;W+=1)typeof rep[W]=="string"&&(re=rep[W],$=str(re,E),$&&P.push(quote(re)+(gap?": ":":")+$));else for(re in E)Object.prototype.hasOwnProperty.call(E,re)&&($=str(re,E),$&&P.push(quote(re)+(gap?": ":":")+$));return $=P.length===0?"{}":gap?`{
|
|
|
`+gap+P.join(`,
|
|
|
`+gap)+`
|
|
|
`+S+"}":"{"+P.join(",")+"}",gap=S,$}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(Ve,Be,W){var re;if(gap="",indent="",typeof W=="number")for(re=0;re<W;re+=1)indent+=" ";else typeof W=="string"&&(indent=W);if(rep=Be,Be&&typeof Be!="function"&&(typeof Be!="object"||typeof Be.length!="number"))throw new Error("JSON.stringify");return str("",{"":Ve})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(Ve,Be){var W,re,$=Ve[Be];if($&&typeof $=="object")for(W in $)Object.prototype.hasOwnProperty.call($,W)&&(re=walk($,W),re!==void 0?$[W]=re:delete $[W]);return reviver.call(Ve,Be,$)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(Ve){return"\\u"+("0000"+Ve.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(Ve,Be,W){Ve.exports=W.p+"static/g.a5bcde87.svg"},hW8S:function(Ve,Be,W){"use strict";W.d(Be,"a",function(){return S}),W.d(Be,"c",function(){return P}),W.d(Be,"b",function(){return E});var re=W("VTBJ"),$=W("Ff2n"),U=W("Kwbf"),S="RC_TABLE_INTERNAL_COL_DEFINE";function P(C){var w=C.expandable,u=Object($.a)(C,["expandable"]);return"expandable"in C?Object(re.a)(Object(re.a)({},u),w):u}function E(C){return Object.keys(C).reduce(function(w,u){return(u.substr(0,5)==="data-"||u.substr(0,5)==="aria-")&&(w[u]=C[u]),w},{})}},hgre:function(Ve,Be,W){"use strict";var re=W("miYZ"),$=W("tsqr"),U=W("9og8"),S=W("WmNS"),P=W.n(S),E=W("cDcd"),C=W.n(E),w=W("GUcZ"),u=W("ulZh"),p=W.n(u),f=W("xKgJ"),o=W("P5Jw"),a=W.n(o),c=W("bntm"),s=W("4xil"),d=W.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 t(v,b){return v-b}function n(v){v.sort(t);for(var b=0,y=0;y<v.length-1;y++){var _=Math.abs(v[y+1]-v[y]);_<21&&(b+=_)}return b}var h=/(android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini)/i;Be.a=Object(E.forwardRef)(function(v,b){var y,_=v.src,m=v.toLog,g=v.videoId,x=v.logWatchHistory,l=v.courseId,T=l===void 0?null:l,A=v.startTime,O=v.handlePause,D=O===void 0?function(){}:O,I=v.handlePlay,j=I===void 0?function(){}:I,B=v.handlePlayEnded,ee=B===void 0?function(){}:B,F=v.videoSpeed,G=F===void 0?1:F,X=_==null||((y=_.split("."))===null||y===void 0)?void 0:y.pop(),Z=X==="flv",K=Object(E.useRef)(),q=Object(E.useRef)(),ae=Object(E.useRef)(),oe=Object(E.useRef)(),ve=Object(E.useRef)(),he=Object(E.useRef)(),_e=Object(E.useRef)(),fe=Object(E.useRef)(),xe=Object(E.useRef)(),je=Object(E.useRef)(),Le=Object(E.useRef)(),ke=Object(E.useRef)(),Fe=Object(E.useRef)(),ge=Object(E.useRef)(),ce=navigator.userAgent.toLowerCase().match(h),Ie=ce?ce[0]:"pc",Ne=Object(E.useRef)(!1),Xe=Object(f.x)(),te=0,k=0,N=0,J=null,V=!1,Y=20,me=1,Ae=!1,at=!1,Re=[];Object(E.useImperativeHandle)(b,function(){return{getLastUpdatedTime:function(){return K.current.currentTime},getDuration:function(){return K.current.duration}}});var Pe=Object(E.useCallback)(function(Me){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Oe={point:K.current.currentTime};J?(Oe.log_id=J,Oe.watch_duration=n(Re),Oe.total_duration=k):(T?(Oe.video_id=parseInt(g,10),Oe.course_id=T):Oe.video_id=g,Oe.duration=te,Oe.device=Ie),De&&(Oe.ed="1");function pe(){return be.apply(this,arguments)}function be(){return be=Object(U.a)(P.a.mark(function Ce(){var we;return P.a.wrap(function(it){for(;;)switch(it.prev=it.next){case 0:return Ae=!0,it.next=3,x(Oe);case 3:we=it.sent,J=we,Ae=!1,Me&&Me();case 7:case"end":return it.stop()}},Ce)})),be.apply(this,arguments)}pe()},[g,T]);Object(E.useEffect)(function(){$.b.destroy();var Me=null;return w.a.isSupported&&Z&&_&&(_==null?void 0:_.indexOf(".m3u8"))<0?(Me=w.a.createPlayer({type:"flv",volume:.8,cors:!0,url:_,muted:!1}),K.current&&(Me.attachMediaElement(K.current),Me.load())):K.current.setAttribute("src",_),Ze(),function(){Me&&(Me.unload(),Me.pause(),Me.destroy(),Me=null)}},[K,Z,_]);function Ye(){K.current.paused?(oe.current.style.display="none",ve.current.style.display="block"):(oe.current.style.display="block",ve.current.style.display="none")}function Ze(){Le.current.style.display="none",Fe.current.style.display="none",ke.current.style.display="none",K.current.muted||K.current.volume===0?Le.current.style.display="block":K.current.volume>0&&K.current.volume<=.5?Fe.current.style.display="block":ke.current.style.display="block"}Object(E.useEffect)(function(){var Me=document.getElementById("play"),De=document.querySelectorAll(".playback-icons use");function Oe(){j(),A&&!Ne.current&&(K.current.currentTime=A),Ne.current=!0,Re.push(K.current.currentTime),V||(V=!0,m&&Pe())}function pe(){return be.apply(this,arguments)}function be(){return be=Object(U.a)(P.a.mark(function Je(){return P.a.wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:Ye(),Re.push(K.current.currentTime),m&&Pe(function(){J=null,N=0,V=!1,Ae=!1,at=!1,Re=[],k=0,me=1},!0);case 3:case"end":return Ue.stop()}},Je)})),be.apply(this,arguments)}function Ce(){he.current.value=Math.round(K.current.currentTime),_e.current.value=Math.round(K.current.currentTime)}function we(){var Je=i(Math.round(K.current.currentTime));xe.current.innerText="".concat(Je.hour>0?Je.hour+":":"").concat(Je.minutes,":").concat(Je.seconds),xe.current.setAttribute("datetime","".concat(Je.hour>0?" "+Je.hour+" ":"").concat(Je.minutes,"m ").concat(Je.seconds,"s"))}function $e(){var Je=Math.round(K.current.duration);he.current.setAttribute("max",Je),_e.current.setAttribute("max",Je);var Ee=i(Je);fe.current.innerText="".concat(Ee.hour>0?Ee.hour+":":"").concat(Ee.minutes,":").concat(Ee.seconds),fe.current.setAttribute("datetime","".concat(Ee.hour>0?" "+Ee.hour+" ":"").concat(Ee.minutes,"m ").concat(Ee.seconds,"s"))}function it(){var Je=Math.round(K.current.duration);he.current.setAttribute("max",Je),_e.current.setAttribute("max",Je);var Ee=i(Je);fe.current.innerText="".concat(Ee.hour>0?Ee.hour+":":"").concat(Ee.minutes,":").concat(Ee.seconds),fe.current.setAttribute("datetime","".concat(Ee.hour>0?" "+Ee.hour+" ":"").concat(Ee.minutes,"m ").concat(Ee.seconds,"s")),Ce(),we();var Ue=q.current.getBoundingClientRect(),ft=Ue.width,Qe=Ue.height,Ot=Ue.x,wt=Ue.y;if(Ot<0||wt<0||!ft)return;if(!at){var lt=K.current.currentTime,yt=lt-N;Math.abs(yt)<10?(k+=Math.abs(yt),N=lt,Ae||k-me*Y>=0&&(me++,Re.push(N),m&&Pe())):(N=lt,m&&Pe())}}function dt(){at=!0}function Et(){K.current.playing&&Re.push(K.current.currentTime,N),N=K.current.currentTime,at=!1}function Dt(){te=K.current.duration,te<=20&&(Y=te/3),K.current.addEventListener("play",Oe)}function ot(Je){Je.preventDefault(),Object(c.a)()?(K.current.style.width="100%",K.current.style.height="100%"):K.current.style.cssText=""}function xt(){D()}function nt(Je){var Ee=Je.target.dataset.seek?Je.target.dataset.seek:Je.target.value;K.current.currentTime=Ee,_e.current.value=Ee,he.current.value=Ee}function ct(Je){var Ee=Math.round(Je.offsetX/Je.target.clientWidth*parseInt(Je.target.getAttribute("max"),10));he.current.setAttribute("data-seek",Ee);var Ue=i(Ee);je.current.textContent="".concat(Ue.hour>0?Ue.hour+":":"").concat(Ue.minutes,":").concat(Ue.seconds);var ft=K.current.getBoundingClientRect();je.current.style.left="".concat(Je.pageX-ft.left,"px")}return ae.current.addEventListener(Object(c.c)(),ot),K.current.addEventListener("canplay",Dt),K.current.addEventListener("ended",pe),K.current.addEventListener("seeking",dt),K.current.addEventListener("seeked",Et),K.current.addEventListener("loadedmetadata",$e),he.current.addEventListener("mousemove",ct),he.current.addEventListener("input",nt),K.current.addEventListener("timeupdate",it),K.current.addEventListener("pause",xt),K.current.addEventListener("volumechange",Ze),function(){K.current.removeEventListener("canplay",Dt),K.current.removeEventListener("play",Oe),K.current.removeEventListener("ended",pe),K.current.removeEventListener("seeking",dt),K.current.removeEventListener("seeked",Et),he.current.removeEventListener("mousemove",ct),he.current.removeEventListener("input",nt),K.current.removeEventListener("timeupdate",it),K.current.removeEventListener("pause",xt),K.current.removeEventListener("loadedmetadata",$e),K.current.removeEventListener("volumechange",Ze),K.current.playing&&(Re.push(N,K.current.currentTime),m&&Pe())}},[K,_]),Object(E.useEffect)(function(){if(K.current.onended=function(){ee(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 Me=new p.a;Me.loadSource(_),Me.attachMedia(K.current)}}},[_]),Object(E.useEffect)(function(){K.current.playbackRate=G},[G]);var ze=function(){K.current.paused||K.current.ended?K.current.play():K.current.pause(),Ye()};function We(){K.current.muted=!K.current.muted,K.current.muted?(ge.current.setAttribute("data-volume",volume.value),ge.current.value=0):ge.current.value=ge.current.dataset.volume}return C.a.createElement("div",{style:{position:"relative"},ref:ae},C.a.createElement("div",{ref:q,className:"".concat(d.a.watermark," animated_alternate animate__animated_10s animate__infinite animate__stepstart ").concat(d.a.animate__loop)},Xe?Xe.login:" "),C.a.createElement("div",{className:d.a.container},C.a.createElement("div",{className:d.a["video-container"],id:"video-container"},C.a.createElement("div",{className:d.a["playback-animation"],id:"playback-animation"},C.a.createElement("svg",{className:d.a["playback-icons"]},C.a.createElement("use",{className:"hidden",href:"#play-icon"}),C.a.createElement("use",{href:"#pause"}))),C.a.createElement("video",{className:d.a.video,id:"video",preload:"auto",disablePictureInPicture:!0,ref:K,autoPlay:!1}),C.a.createElement("div",{className:"".concat(d.a["video-controls"]," "),id:"video-controls"},C.a.createElement("div",{className:d.a["bottom-controls"]},C.a.createElement("div",{className:d.a["left-controls"]},C.a.createElement("button",{"data-title":"\u64AD\u653E/\u6682\u505C",id:"play",onClick:ze},C.a.createElement("svg",{className:d.a["playback-icons"]},C.a.createElement("use",{ref:ve,href:"#play-icon"}),C.a.createElement("use",{ref:oe,style:{display:"none"},href:"#pause"}))),C.a.createElement("div",{className:d.a.time},C.a.createElement("time",{id:"time-elapsed",ref:xe},"00:00"),C.a.createElement("span",null," / "),C.a.createElement("time",{id:"duration",ref:fe},"00:00"))),C.a.createElement("div",{className:d.a["right-controls"]},C.a.createElement(o.CopyToClipboard,{text:_,onCopy:function(){return $.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:d.a["volume-controls"]},C.a.createElement("button",{"data-title":"\u5F00\u542F/\u5173\u95ED\u58F0\u97F3",className:d.a["volume-button"],id:"volume-button",onClick:We},C.a.createElement("i",{ref:Le,className:"icon-a-bianzu8 iconfont",style:{fontSize:"14px",color:"white"}}),C.a.createElement("i",{ref:Fe,className:"icon-shengyinkaibeifen iconfont",style:{fontSize:"14px",color:"white"}}),C.a.createElement("i",{ref:ke,className:"icon-shengyinkai iconfont",style:{fontSize:"14px",color:"white"}})),C.a.createElement("input",{className:d.a.volume,id:"volume",value:"1","data-mute":"0.5",type:"range",max:"1",min:"0",step:"0.01",ref:ge,style:{display:"none"},onClick:Ze})),C.a.createElement("button",{"data-title":"\u5168\u5C4F/\u9000\u51FA\u5168\u5C4F",className:d.a["fullscreen-button"],onClick:function(){Object(c.a)()?Object(c.b)():Object(c.d)(ae.current)}},C.a.createElement("i",{className:"icon-fangda1 iconfont",style:{fontSize:"12px",color:"white"}})))),C.a.createElement("div",{className:d.a["video-progress"]},C.a.createElement("progress",{ref:_e,value:"0",min:"0"}),C.a.createElement("input",{className:d.a.seek,ref:he,value:"0",min:"0",type:"range",step:"1"}),C.a.createElement("div",{className:d.a["seek-tooltip"],ref:je,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(Ve,Be,W){},je13:function(Ve,Be,W){var re=W("5nXd"),$=W("gRFJ"),U=[W("uQRt")];Ve.exports=re.createStore($,U)},kSUc:function(Ve,Be,W){},"kaH+":function(Ve,Be,W){"use strict";var re=W("+L6B"),$=W("2/Rp"),U=W("tJVT"),S=W("cDcd"),P=W.n(S),E=W("UZu5"),C=W.n(E),w=W("dhSg"),u=W("rLCj"),p=W("dF/Y"),f=W("4i/N");Be.a=function(){var o=Object(S.useState)(""),a=Object(U.a)(o,2),c=a[0],s=a[1],d=Object(S.useState)(0),i=Object(U.a)(d,2),t=i[0],n=i[1],h=Object(S.useRef)("");Object(S.useEffect)(function(){var x=w.a.subscribe("preview-image",function(l){s(l),document.body.style.overflow="hidden"});return x},[]),Object(S.useEffect)(function(){return document.addEventListener("keydown",v),function(){document.removeEventListener("keydown",v)}},[]),Object(S.useEffect)(function(){h.current=c},[c]);function v(x){x.keyCode==27&&h.current&&b()}function b(){document.body.style.overflow="auto",s("")}function y(){n(t+90)}var _=Object(S.useRef)(),m=Object(S.useRef)(),g=function(l){(l.nativeEvent.target===_.current||l.nativeEvent.target===m.current)&&b()};return P.a.createElement(S.Fragment,null,c?P.a.createElement("div",{className:"image-preview-container",ref:_,onClick:g},P.a.createElement("div",{className:"button-group"},P.a.createElement($.a,{onClick:y},"\u65CB\u8F6C",P.a.createElement(u.a,null)),P.a.createElement($.a,{href:c},"\u4E0B\u8F7D",P.a.createElement(p.a,null)),P.a.createElement($.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(t,"deg)")}}))):null)}},kovY:function(Ve,Be,W){Ve.exports=W.p+"static/e.eabfa286.svg"},lOMy:function(Ve,Be,W){},lZu9:function(Ve,Be,W){(function(re){re(W("VrN/"),W("1eCo"),W("8EBN"))})(function(re){"use strict";re.defineMode("markdown",function($,U){var S=re.getMode($,"text/html"),P=S.name=="null";function E(F){if(re.findModeByName){var G=re.findModeByName(F);G&&(F=G.mime||G.mimes[0])}var X=re.getMode($,F);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 w in C)C.hasOwnProperty(w)&&U.tokenTypeOverrides[w]&&(C[w]=U.tokenTypeOverrides[w]);var u=/^([*\-_])(?:\s*\1){2,}\s*$/,p=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,f=/^\[(x| )\](?=\s)/i,o=U.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,a=/^ {0,3}(?:\={1,}|-{2,})\s*$/,c=/^[^#!\[\]*_\\<>` "'(~:]+/,s=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,d=/^\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]/,t=" ";function n(F,G,X){return G.f=G.inline=X,X(F,G)}function h(F,G,X){return G.f=G.block=X,X(F,G)}function v(F){return!F||!/\S/.test(F.string)}function b(F){if(F.linkTitle=!1,F.linkHref=!1,F.linkText=!1,F.em=!1,F.strong=!1,F.strikethrough=!1,F.quote=0,F.indentedCode=!1,F.f==_){var G=P;if(!G){var X=re.innerMode(S,F.htmlState);G=X.mode.name=="xml"&&X.state.tagStart===null&&!X.state.context&&X.state.tokenize.isInText}G&&(F.f=l,F.block=y,F.htmlState=null)}return F.trailingSpace=0,F.trailingSpaceNewLine=!1,F.prevLine=F.thisLine,F.thisLine={stream:null},null}function y(F,G){var X=F.column()===G.indentation,Z=v(G.prevLine.stream),K=G.indentedCode,q=G.prevLine.hr,ae=G.list!==!1,oe=(G.listStack[G.listStack.length-1]||0)+3;G.indentedCode=!1;var ve=G.indentation;if(G.indentationDiff===null&&(G.indentationDiff=G.indentation,ae)){for(G.list=null;ve<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=ve-G.listStack[G.listStack.length-1])}var he=!Z&&!q&&!G.prevLine.header&&(!ae||!K)&&!G.prevLine.fencedCodeEnd,_e=(G.list===!1||q||Z)&&G.indentation<=oe&&F.match(u),fe=null;if(G.indentationDiff>=4&&(K||G.prevLine.fencedCodeEnd||G.prevLine.header||Z))return F.skipToEnd(),G.indentedCode=!0,C.code;if(F.eatSpace())return null;if(X&&G.indentation<=oe&&(fe=F.match(o))&&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&&F.eat(">"))return G.quote=X?1:G.quote+1,U.highlightFormatting&&(G.formatting="quote"),F.eatSpace(),g(G);if(!_e&&!G.setext&&X&&G.indentation<=oe&&(fe=F.match(p))){var xe=fe[1]?"ol":"ul";return G.indentation=ve+F.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&&F.match(f,!1)&&(G.taskList=!0),G.f=G.inline,U.highlightFormatting&&(G.formatting=["list","list-"+xe]),g(G)}else{if(X&&G.indentation<=oe&&(fe=F.match(s,!0)))return G.quote=0,G.fencedEndRE=new RegExp(fe[1]+"+ *$"),G.localMode=U.fencedCodeBlockHighlighting&&E(fe[2]||U.fencedCodeBlockDefaultMode),G.localMode&&(G.localState=re.startState(G.localMode)),G.f=G.block=m,U.highlightFormatting&&(G.formatting="code-block"),G.code=-1,g(G);if(G.setext||(!he||!ae)&&!G.quote&&G.list===!1&&!G.code&&!_e&&!d.test(F.string)&&(fe=F.lookAhead(1))&&(fe=fe.match(a)))return G.setext?(G.header=G.setext,G.setext=0,F.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(_e)return F.skipToEnd(),G.hr=!0,G.thisLine.hr=!0,C.hr;if(F.peek()==="[")return n(F,G,I)}return n(F,G,G.inline)}function _(F,G){var X=S.token(F,G.htmlState);if(!P){var Z=re.innerMode(S,G.htmlState);(Z.mode.name=="xml"&&Z.state.tagStart===null&&!Z.state.context&&Z.state.tokenize.isInText||G.md_inside&&F.current().indexOf(">")>-1)&&(G.f=l,G.block=y,G.htmlState=null)}return X}function m(F,G){var X=G.listStack[G.listStack.length-1]||0,Z=G.indentation<X,K=X+3;if(G.fencedEndRE&&G.indentation<=K&&(Z||F.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=l,G.fencedEndRE=null,G.code=0,G.thisLine.fencedCodeEnd=!0,Z?h(F,G,G.block):q}else return G.localMode?G.localMode.token(F,G.localState):(F.skipToEnd(),C.code)}function g(F){var G=[];if(F.formatting){G.push(C.formatting),typeof F.formatting=="string"&&(F.formatting=[F.formatting]);for(var X=0;X<F.formatting.length;X++)G.push(C.formatting+"-"+F.formatting[X]),F.formatting[X]==="header"&&G.push(C.formatting+"-"+F.formatting[X]+"-"+F.header),F.formatting[X]==="quote"&&(!U.maxBlockquoteDepth||U.maxBlockquoteDepth>=F.quote?G.push(C.formatting+"-"+F.formatting[X]+"-"+F.quote):G.push("error"))}if(F.taskOpen)return G.push("meta"),G.length?G.join(" "):null;if(F.taskClosed)return G.push("property"),G.length?G.join(" "):null;if(F.linkHref?G.push(C.linkHref,"url"):(F.strong&&G.push(C.strong),F.em&&G.push(C.em),F.strikethrough&&G.push(C.strikethrough),F.emoji&&G.push(C.emoji),F.linkText&&G.push(C.linkText),F.code&&G.push(C.code),F.image&&G.push(C.image),F.imageAltText&&G.push(C.imageAltText,"link"),F.imageMarker&&G.push(C.imageMarker)),F.header&&G.push(C.header,C.header+"-"+F.header),F.quote&&(G.push(C.quote),!U.maxBlockquoteDepth||U.maxBlockquoteDepth>=F.quote?G.push(C.quote+"-"+F.quote):G.push(C.quote+"-"+U.maxBlockquoteDepth)),F.list!==!1){var Z=(F.listStack.length-1)%3;Z?Z===1?G.push(C.list2):G.push(C.list3):G.push(C.list1)}return F.trailingSpaceNewLine?G.push("trailing-space-new-line"):F.trailingSpace&&G.push("trailing-space-"+(F.trailingSpace%2?"a":"b")),G.length?G.join(" "):null}function x(F,G){return F.match(c,!0)?g(G):void 0}function l(F,G){var X=G.text(F,G);if(typeof X!="undefined")return X;if(G.list)return G.list=null,g(G);if(G.taskList){var Z=F.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&&F.match(/^#+$/,!0))return U.highlightFormatting&&(G.formatting="header"),g(G);var K=F.next();if(G.linkTitle){G.linkTitle=!1;var q=K;K==="("&&(q=")"),q=(q+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ae="^\\s*(?:[^"+q+"\\\\]+|\\\\\\\\|\\\\.)"+q;if(F.match(new RegExp(ae),!0))return C.linkHref}if(K==="`"){var oe=G.formatting;U.highlightFormatting&&(G.formatting="code"),F.eatWhile("`");var ve=F.current().length;if(G.code==0&&(!G.quote||ve==1))return G.code=ve,g(G);if(ve==G.code){var he=g(G);return G.code=0,he}else return G.formatting=oe,g(G)}else if(G.code)return g(G);if(K==="\\"&&(F.next(),U.highlightFormatting)){var _e=g(G),fe=C.formatting+"-escape";return _e?_e+" "+fe:fe}if(K==="!"&&F.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return G.imageMarker=!0,G.image=!0,U.highlightFormatting&&(G.formatting="image"),g(G);if(K==="["&&G.imageMarker&&F.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 _e=g(G);return G.imageAltText=!1,G.image=!1,G.inline=G.f=A,_e}if(K==="["&&!G.image)return G.linkText&&F.match(/^.*?\]/)||(G.linkText=!0,U.highlightFormatting&&(G.formatting="link")),g(G);if(K==="]"&&G.linkText){U.highlightFormatting&&(G.formatting="link");var _e=g(G);return G.linkText=!1,G.inline=G.f=F.match(/\(.*?\)| ?\[.*?\]/,!1)?A:l,_e}if(K==="<"&&F.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){G.f=G.inline=T,U.highlightFormatting&&(G.formatting="link");var _e=g(G);return _e?_e+=" ":_e="",_e+C.linkInline}if(K==="<"&&F.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){G.f=G.inline=T,U.highlightFormatting&&(G.formatting="link");var _e=g(G);return _e?_e+=" ":_e="",_e+C.linkEmail}if(U.xml&&K==="<"&&F.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var xe=F.string.indexOf(">",F.pos);if(xe!=-1){var je=F.string.substring(F.start,xe);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(je)&&(G.md_inside=!0)}return F.backUp(1),G.htmlState=re.startState(S),h(F,G,_)}if(U.xml&&K==="<"&&F.match(/^\/\w*?>/))return G.md_inside=!1,"tag";if(K==="*"||K==="_"){for(var Le=1,ke=F.pos==1?" ":F.string.charAt(F.pos-2);Le<3&&F.eat(K);)Le++;var Fe=F.peek()||" ",ge=!/\s/.test(Fe)&&(!i.test(Fe)||/\s/.test(ke)||i.test(ke)),ce=!/\s/.test(ke)&&(!i.test(ke)||/\s/.test(Fe)||i.test(Fe)),Ie=null,Ne=null;if(Le%2&&(!G.em&&ge&&(K==="*"||!ce||i.test(ke))?Ie=!0:G.em==K&&ce&&(K==="*"||!ge||i.test(Fe))&&(Ie=!1)),Le>1&&(!G.strong&&ge&&(K==="*"||!ce||i.test(ke))?Ne=!0:G.strong==K&&ce&&(K==="*"||!ge||i.test(Fe))&&(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 he=g(G);return Ie===!1&&(G.em=!1),Ne===!1&&(G.strong=!1),he}}else if(K===" "&&(F.eat("*")||F.eat("_"))){if(F.peek()===" ")return g(G);F.backUp(1)}if(U.strikethrough){if(K==="~"&&F.eatWhile(K)){if(G.strikethrough){U.highlightFormatting&&(G.formatting="strikethrough");var he=g(G);return G.strikethrough=!1,he}else if(F.match(/^[^\s]/,!1))return G.strikethrough=!0,U.highlightFormatting&&(G.formatting="strikethrough"),g(G)}else if(K===" "&&F.match(/^~~/,!0)){if(F.peek()===" ")return g(G);F.backUp(2)}}if(U.emoji&&K===":"&&F.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===" "&&(F.match(/^ +$/,!1)?G.trailingSpace++:G.trailingSpace&&(G.trailingSpaceNewLine=!0)),g(G)}function T(F,G){var X=F.next();if(X===">"){G.f=G.inline=l,U.highlightFormatting&&(G.formatting="link");var Z=g(G);return Z?Z+=" ":Z="",Z+C.linkInline}return F.match(/^[^>]+/,!0),C.linkInline}function A(F,G){if(F.eatSpace())return null;var X=F.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(F){return function(G,X){var Z=G.next();if(Z===F){X.f=X.inline=l,U.highlightFormatting&&(X.formatting="link-string");var K=g(X);return X.linkHref=!1,K}return G.match(O[F]),X.linkHref=!0,g(X)}}function I(F,G){return F.match(/^([^\]\\]|\\.)*\]:/,!1)?(G.f=j,F.next(),U.highlightFormatting&&(G.formatting="link"),G.linkText=!0,g(G)):n(F,G,l)}function j(F,G){if(F.match(/^\]:/,!0)){G.f=G.inline=B,U.highlightFormatting&&(G.formatting="link");var X=g(G);return G.linkText=!1,X}return F.match(/^([^\]\\]|\\.)+/,!0),C.linkText}function B(F,G){return F.eatSpace()?null:(F.match(/^[^\s]+/,!0),F.peek()===void 0?G.linkTitle=!0:F.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),G.f=G.inline=l,C.linkHref+" url")}var ee={startState:function(){return{f:y,prevLine:{stream:null},thisLine:{stream:null},block:y,htmlState:null,indentation:0,inline:l,text:x,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(F){return{f:F.f,prevLine:F.prevLine,thisLine:F.thisLine,block:F.block,htmlState:F.htmlState&&re.copyState(S,F.htmlState),indentation:F.indentation,localMode:F.localMode,localState:F.localMode?re.copyState(F.localMode,F.localState):null,inline:F.inline,text:F.text,formatting:!1,linkText:F.linkText,linkTitle:F.linkTitle,linkHref:F.linkHref,code:F.code,em:F.em,strong:F.strong,strikethrough:F.strikethrough,emoji:F.emoji,header:F.header,setext:F.setext,hr:F.hr,taskList:F.taskList,list:F.list,listStack:F.listStack.slice(0),quote:F.quote,indentedCode:F.indentedCode,trailingSpace:F.trailingSpace,trailingSpaceNewLine:F.trailingSpaceNewLine,md_inside:F.md_inside,fencedEndRE:F.fencedEndRE}},token:function(F,G){if(G.formatting=!1,F!=G.thisLine.stream){if(G.header=0,G.hr=!1,F.match(/^\s*$/,!0))return b(G),null;if(G.prevLine=G.thisLine,G.thisLine={stream:F},G.taskList=!1,G.trailingSpace=0,G.trailingSpaceNewLine=!1,!G.localState&&(G.f=G.block,G.f!=_)){var X=F.match(/^\s*/,!0)[0].replace(/\t/g,t).length;if(G.indentation=X,G.indentationDiff=null,X>0)return null}}return G.f(F,G)},innerMode:function(F){return F.block==_?{state:F.htmlState,mode:S}:F.localState?{state:F.localState,mode:F.localMode}:{state:F,mode:ee}},indent:function(F,G,X){return F.block==_&&S.indent?S.indent(F.htmlState,G,X):F.localState&&F.localMode.indent?F.localMode.indent(F.localState,G,X):re.Pass},blankLine:b,getType:g,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return ee},"xml"),re.defineMIME("text/markdown","markdown"),re.defineMIME("text/x-markdown","markdown")})},n6Qo:function(Ve,Be,W){"use strict";W.d(Be,"a",function(){return w});var re=W("cDcd"),$=W("biw7"),U=W("fyJ8");function S(u){var p=u.className,f=u.index,o=u.children,a=u.colSpan,c=u.rowSpan,s=re.useContext($.a),d=s.prefixCls,i=s.fixedInfoList,t=i[f];return re.createElement(U.a,Object.assign({className:p,index:f,component:"td",prefixCls:d,record:null,dataIndex:null,render:function(){return{children:o,props:{colSpan:a,rowSpan:c}}}},t))}function P(u){return re.createElement("tr",Object.assign({},u))}function E(u){var p=u.children,f=re.useContext($.a),o=f.prefixCls;return re.createElement("tfoot",{className:"".concat(o,"-summary")},p)}var C=Be.b=E,w={Cell:S,Row:P}},nCk5:function(Ve,Be,W){Ve.exports=W.p+"static/d.53bf6ae3.svg"},nVVt:function(Ve,Be){Ve.exports={MODE_NUMBER:1<<0,MODE_ALPHA_NUM:1<<1,MODE_8BIT_BYTE:1<<2,MODE_KANJI:1<<3}},nWbc:function(Ve,Be,W){},oE5q:function(Ve,Be,W){Ve.exports=W.p+"static/t.0b94c5c3.svg"},oFv4:function(Ve,Be,W){Ve.exports=W.p+"static/internal.da228387.png"},osHv:function(Ve,Be,W){(function(re){re(W("VrN/"))})(function(re){"use strict";var $=re.Pos;function U(i,t){return i.line-t.line||i.ch-t.ch}var S="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=S+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",E=new RegExp("<(/?)(["+S+"]["+P+"]*)","g");function C(i,t,n,h){this.line=t,this.ch=n,this.cm=i,this.text=i.getLine(t),this.min=h?Math.max(h.from,i.firstLine()):i.firstLine(),this.max=h?Math.min(h.to-1,i.lastLine()):i.lastLine()}function w(i,t){var n=i.cm.getTokenTypeAt($(i.line,t));return n&&/\btag\b/.test(n)}function u(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 t=i.text.indexOf(">",i.ch);if(t==-1){if(u(i))continue;return}if(!w(i,t+1)){i.ch=t+1;continue}var n=i.text.lastIndexOf("/",t),h=n>-1&&!/\S/.test(i.text.slice(n+1,t));return i.ch=t+1,h?"selfClose":"regular"}}function o(i){for(;;){var t=i.ch?i.text.lastIndexOf("<",i.ch-1):-1;if(t==-1){if(p(i))continue;return}if(!w(i,t+1)){i.ch=t;continue}E.lastIndex=t,i.ch=t;var n=E.exec(i.text);if(n&&n.index==t)return n}}function a(i){for(;;){E.lastIndex=i.ch;var t=E.exec(i.text);if(!t){if(u(i))continue;return}if(!w(i,t.index+1)){i.ch=t.index+1;continue}return i.ch=t.index+t[0].length,t}}function c(i){for(;;){var t=i.ch?i.text.lastIndexOf(">",i.ch-1):-1;if(t==-1){if(p(i))continue;return}if(!w(i,t+1)){i.ch=t;continue}var n=i.text.lastIndexOf("/",t),h=n>-1&&!/\S/.test(i.text.slice(n+1,t));return i.ch=t+1,h?"selfClose":"regular"}}function s(i,t){for(var n=[];;){var h=a(i),v,b=i.line,y=i.ch-(h?h[0].length:0);if(!h||!(v=f(i)))return;if(v=="selfClose")continue;if(h[1]){for(var _=n.length-1;_>=0;--_)if(n[_]==h[2]){n.length=_;break}if(_<0&&(!t||t==h[2]))return{tag:h[2],from:$(b,y),to:$(i.line,i.ch)}}else n.push(h[2])}}function d(i,t){for(var n=[];;){var h=c(i);if(!h)return;if(h=="selfClose"){o(i);continue}var v=i.line,b=i.ch,y=o(i);if(!y)return;if(y[1])n.push(y[2]);else{for(var _=n.length-1;_>=0;--_)if(n[_]==y[2]){n.length=_;break}if(_<0&&(!t||t==y[2]))return{tag:y[2],from:$(i.line,i.ch),to:$(v,b)}}}}re.registerHelper("fold","xml",function(i,t){for(var n=new C(i,t.line,0);;){var h=a(n);if(!h||n.line!=t.line)return;var v=f(n);if(!v)return;if(!h[1]&&v!="selfClose"){var b=$(n.line,n.ch),y=s(n,h[2]);return y&&U(y.from,b)>0?{from:b,to:y.from}:null}}}),re.findMatchingTag=function(i,t,n){var h=new C(i,t.line,t.ch,n);if(h.text.indexOf(">")==-1&&h.text.indexOf("<")==-1)return;var v=f(h),b=v&&$(h.line,h.ch),y=v&&o(h);if(!v||!y||U(h,t)>0)return;var _={from:$(h.line,h.ch),to:b,tag:y[2]};return v=="selfClose"?{open:_,close:null,at:"open"}:y[1]?{open:d(h,y[2]),close:_,at:"close"}:(h=new C(i,b.line,b.ch,n),{open:_,close:s(h,y[2]),at:"open"})},re.findEnclosingTag=function(i,t,n,h){for(var v=new C(i,t.line,t.ch,n);;){var b=d(v,h);if(!b)break;var y=new C(i,t.line,t.ch,n),_=s(y,b.tag);if(_)return{open:b,close:_}}},re.scanForClosingTag=function(i,t,n,h){var v=new C(i,t.line,t.ch,h?{from:0,to:h}:null);return s(v,n)}})},p5ED:function(Ve,Be,W){"use strict";var re=W("+L6B"),$=W("2/Rp"),U=W("5Dmo"),S=W("3S7+"),P=W("k1fw"),E=W("tJVT"),C=W("cDcd"),w=W.n(C),u=W("vHTk"),p=W.n(u),f=W("yEEn"),o=W("ZW9T"),a=W("1vsH");Be.a=function(c){var s=c.name,d=c.data,i=c.theme,t=c.type,n=c.filename,h=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"),x=Object(E.a)(g,2),l=x[0],T=x[1],A=Object(C.useState)(""),O=Object(E.a)(A,2),D=O[0],I=O[1],j,B=1024*1024,ee=10*B,F=Object(C.useRef)();t==="office"&&(j=Object(a.V)(d).filesize,j>ee&&(t="other")),n&&(h.filename=n),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(ae){var oe=ae.split("=");oe[0]==="_educoder_session"&&I(oe[1])})},[]);var G=function(){if(d.startsWith("http")||d.startsWith("blob:")){X();return}Object(a.z)(n||"educoder",d,n)},X=function(){Object(a.x)(n||"educoder",decodeURIComponent(d))};return console.log("data:",d,"fileanme:",n," name:",s),w.a.createElement("div",{style:Object(P.a)({},b||{}),className:"".concat(m&&p.a.bgBlack," ").concat(t?p.a.wrp:"hide")},y&&w.a.createElement("div",{className:p.a.close,ref:F},w.a.createElement(S.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return F.current}},w.a.createElement("span",{onClick:X},w.a.createElement("i",{className:"icon-quxiaozhiding"}))),w.a.createElement(S.a,{title:"\u5173\u95ED",getPopupContainer:function(){return F.current}},w.a.createElement("span",{className:"",onClick:_},w.a.createElement("i",{className:"icon-guanbi1"})))),w.a.createElement("div",{className:"".concat(p.a[v]," ").concat(v," ").concat(p.a.monaco," ").concat(t==="txt"?"show":"hide")},t==="txt"&&w.a.createElement(o.b,h)),t==="audio"&&w.a.createElement("audio",{src:"".concat(d!=null&&d.startsWith("/")||(d==null?void 0:d.indexOf("https://"))>-1?d:"data:audio/mp3;base64,").concat(d),autoPlay:!0}),t==="video"&&w.a.createElement(w.a.Fragment,null,d!=null&&d.startsWith("/")?w.a.createElement("video",{controls:!0,src:"".concat(d),autoPlay:!0}):w.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(d),autoPlay:!0})),t==="html"&&w.a.createElement("iframe",{src:d+"&disposition=inline"}),t==="html"&&w.a.createElement("iframe",{src:d+"&disposition=inline"}),t==="pdf"&&w.a.createElement("embed",{className:p.a.embed,src:d}),t==="image"&&w.a.createElement(w.a.Fragment,null,w.a.createElement("img",{src:"".concat(d!=null&&d.startsWith("/")||(d==null?void 0:d.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(d)})),t==="other"&&w.a.createElement("div",null,w.a.createElement($.a,{type:"primary",size:"large",onClick:G},w.a.createElement(f.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(t==="download"||t==="office")&&w.a.createElement($.a,{type:"primary",size:"large",onClick:G},w.a.createElement(f.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(Ve,Be,W){},pYxM:function(Ve,Be,W){Ve.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(Ve,Be,W){(function(re){var $,$;!function(U){if(!0)window.OSS=U(),Ve.exports=U();else var S}(function(){var U;return function(){function S(P,E,C){function w(f,o){if(!E[f]){if(!P[f]){var a=typeof $=="function"&&$;if(!o&&a)return $(f,!0);if(u)return u(f,!0);var c=new Error("Cannot find module '"+f+"'");throw c.code="MODULE_NOT_FOUND",c}var s=E[f]={exports:{}};P[f][0].call(s.exports,function(d){return w(P[f][1][d]||d)},s,s.exports,S,P,E,C)}return E[f].exports}for(var u=typeof $=="function"&&$,p=0;p<C.length;p++)w(C[p]);return w}return S}()({1:[function(S,P,E){"use strict";var C=S("./browser/client");C.Buffer=S("buffer").Buffer,C.co=S("co"),C.urllib=S("../shims/xhr"),C.version=S("./browser/version").version,P.exports=C},{"../shims/xhr":244,"./browser/client":2,"./browser/version":5,buffer:38,co:41}],2:[function(S,P,E){(function(C,w){"use strict";function u(Z){return Z&&Z.__esModule?Z:{default:Z}}function p(Z,K){return Z[K]||Z[K.toLowerCase()]}function f(Z,K){var q=l.parse(Z);if(!q.protocol){var ae=K?"https://":"http://";q=l.parse(ae+Z)}if(q.protocol!=="http:"&&q.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return q}function o(Z,K,q){var ae=q?"https://":"http://",oe=K?"-internal.aliyuncs.com":".aliyuncs.com";return Z.substr(0,"vpc100-oss-cn-".length)==="vpc100-oss-cn-"&&(oe=".aliyuncs.com"),l.parse(ae+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=S("babel-runtime/regenerator"),d=u(s),i=S("babel-runtime/core-js/object/keys"),t=u(i),n=S("debug")("ali-oss"),h=S("./../../shims/crypto/crypto.js"),v=S("path"),b=S("copy-to"),y=S("mime"),_=S("xml2js"),m=S("humanize-ms"),g=S("agentkeepalive"),x=S("merge-descriptors"),l=S("url"),T=S("is-type-of"),A=S("platform"),O=S("utility"),D=S("urllib"),I=S("./version"),j=S("dateformat"),B=S("bowser"),ee=S("../common/signUtils"),F=S("../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,t.default)(Z).forEach(function(ae){Z[ae]!==void 0&&(q[ae]=Z[ae])}),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=o(q.region,q.internal,q.secure)}return q.inited=!0,q};var X=c.prototype;x(X,S("./object")),x(X,S("./managed_upload")),x(X,S("../common/multipart")),x(X,S("../common/thunkpool.js")),c.Wrapper=S("./wrapper"),X.signature=function(Z){return n("authorization stringToSign: %s",Z),ee.computeSignature(this.options.accessKeySecret,Z)},X.authorization=function(Z,K,q,ae){var oe=ee.buildCanonicalString(Z.toUpperCase(),K,{headers:ae,parameters:q});return ee.authorization(this.options.accessKeyId,this.options.accessKeySecret,oe)},X.createRequest=function(Z){var K={"x-oss-date":j(+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"]=h.createHash("md5").update(new w(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 ae=this._getReqUrl(Z);n("request %s %s, with headers %j, !!stream: %s",Z.method,ae,K,!!Z.stream);var oe=Z.timeout||this.options.timeout;return{url:ae,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=d.default.mark(function Z(K){var q,ae,oe,ve;return d.default.wrap(function(he){for(;;)switch(he.prev=he.next){case 0:return q=this.createRequest(K),ae=void 0,oe=void 0,he.prev=3,he.next=6,this.urllib.request(q.url,q.params);case 6:ae=he.sent,n("response %s %s, got %s, headers: %j",K.method,q.url,ae.status,ae.headers),he.next=13;break;case 10:he.prev=10,he.t0=he.catch(3),oe=he.t0;case 13:if(ve=void 0,!ae||!K.successStatuses||K.successStatuses.indexOf(ae.status)!==-1){he.next=26;break}return he.next=17,this.requestError(ae);case 17:if(ve=he.sent,ve.code!=="RequestTimeTooSkewed"){he.next=23;break}return this.options.amendTimeSkewed=+new Date(ve.serverTime)-new Date,he.next=22,this.request(K);case 22:return he.abrupt("return",he.sent);case 23:ve.params=K,he.next=30;break;case 26:if(!oe){he.next=30;break}return he.next=29,this.requestError(oe);case 29:ve=he.sent;case 30:if(!ve){he.next=32;break}throw ve;case 32:if(!K.xmlResponse){he.next=36;break}return he.next=35,this.parseXML(ae.data);case 35:ae.data=he.sent;case 36:return he.abrupt("return",ae);case 37:case"end":return he.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 F._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),ae=this.options.cname;!Z.bucket||ae||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 ve={};if(Z.query&&x(ve,Z.query),Z.subres){var he={};T.string(Z.subres)?he[Z.subres]="":T.array(Z.subres)?Z.subres.forEach(function(_e){he[_e]=""}):he=Z.subres,x(ve,he)}return K.query=ve,l.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 B.name===Z&&B.version.split(".")[0]===K},X.parseXML=function(Z){return function(K){w.isBuffer(Z)&&(Z=Z.toString()),_.parseString(Z,{explicitRoot:!1,explicitArray:!1},K)}},X.requestError=d.default.mark(function Z(K){var q,ae,oe,ve;return d.default.wrap(function(he){for(;;)switch(he.prev=he.next){case 0:if(q=null,K.data&&K.data.length){he.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=""),he.next=30;break;case 5:return ae=String(K.data),n("request response error data: %s",ae),oe=void 0,he.prev=8,he.next=11,this.parseXML(ae)||{};case 11:oe=he.sent,he.next=21;break;case 14:return he.prev=14,he.t0=he.catch(8),n(ae),he.t0.message+=`
|
|
|
raw xml: `+ae,he.t0.status=K.status,he.t0.requestId=K.headers["x-oss-request-id"],he.abrupt("return",he.t0);case 21:ve=oe.Message||"unknow request error, status: "+K.status,oe.Condition&&(ve+=" (condition: "+oe.Condition+")"),q=new Error(ve),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 n("generate error %j",q),he.abrupt("return",q);case 32:case"end":return he.stop()}},Z,this,[[8,14]])})}).call(this,S("_process"),S("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(S,P,E){(function(C){"use strict";function w(b){return b&&b.__esModule?b:{default:b}}function u(b,y){if(!(this instanceof u))return new u(b,y);v.call(this,y),this.file=b,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}var p=S("babel-runtime/core-js/array/from"),f=w(p),o=S("babel-runtime/regenerator"),a=w(o),c=S("is-type-of"),s=S("util"),d=S("path"),i=S("mime"),t=S("copy-to"),n=E;n.multipartUpload=a.default.mark(function b(y,_,m){var g,x,l,T,A,O,D,I,j;return a.default.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:if(this.resetCancelFlag(),m=m||{},!m.checkpoint||!m.checkpoint.uploadId){B.next=6;break}return B.next=5,this._resumeMultipart(m.checkpoint,m);case 5:return B.abrupt("return",B.sent);case 6:return g=102400,m.mime||(c.file(_)?m.mime=i.getType(d.extname(_.name)):c.blob(_)?m.mime=_.type:m.mime=i.getType(d.extname(_))),m.headers=m.headers||{},this._convertMetaToHeaders(m.meta,m.headers),B.next=12,this._getFileSize(_);case 12:if(!((x=B.sent)<g)){B.next=25;break}return l=this._createStream(_,0,x),m.contentLength=x,B.next=18,this.putStream(y,l,m);case 18:if(T=B.sent,!m||!m.progress){B.next=22;break}return B.next=22,m.progress(1);case 22:return A={res:T.res,bucket:this.options.bucket,name:y,etag:T.res.headers.etag},(m.headers&&m.headers["x-oss-callback"]||m.callback)&&(A.data=T.data),B.abrupt("return",A);case 25:if(!(m.partSize&&m.partSize<g)){B.next=27;break}throw new Error("partSize must not be smaller than "+g);case 27:return B.next=29,this.initMultipartUpload(y,m);case 29:if(O=B.sent,D=O.uploadId,I=this._getPartSize(x,m.partSize),j={file:_,name:y,fileSize:x,partSize:I,uploadId:D,doneParts:[]},!m||!m.progress){B.next=36;break}return B.next=36,m.progress(0,j,O.res);case 36:return B.next=38,this._resumeMultipart(j,m);case 38:return B.abrupt("return",B.sent);case 39:case"end":return B.stop()}},b,this)}),n._resumeMultipart=a.default.mark(function b(y,_){var m,g,x,l,T,A,O,D,I,j,B,ee,F,G,X,Z,K,q,ae,oe,ve;return a.default.wrap(function(he){for(;;)switch(he.prev=he.next){case 0:if(!this.isCancel()){he.next=2;break}throw this._makeCancelEvent();case 2:if(m=y.file,g=y.fileSize,x=y.partSize,l=y.uploadId,T=y.doneParts,A=y.name,O=[],T.length>0&&t(T).to(O),D=this._divideParts(g,x),I=D.length,j=!1,B=a.default.mark(function _e(fe,xe){var je,Le,ke;return a.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:if(fe.isCancel()){Fe.next=21;break}return Fe.prev=1,je=D[xe-1],Le={stream:fe._createStream(m,je.start,je.end),size:je.end-je.start},Fe.next=6,fe._uploadPart(A,l,xe,Le);case 6:if(ke=Fe.sent,fe.isCancel()||j){Fe.next=13;break}if(y.doneParts.push({number:xe,etag:ke.res.headers.etag}),O.push({number:xe,etag:ke.res.headers.etag}),!_||!_.progress){Fe.next=13;break}return Fe.next=13,_.progress(T.length/I,y,ke.res);case 13:Fe.next=21;break;case 15:if(Fe.prev=15,Fe.t0=Fe.catch(1),fe.isCancel()){Fe.next=21;break}throw fe.cancel(),Fe.t0.partNum=xe,Fe.t0;case 21:case"end":return Fe.stop()}},_e,this,[[1,15]])}),ee=(0,f.default)(new Array(I),function(_e,fe){return fe+1}),F=O.map(function(_e){return _e.number}),G=ee.filter(function(_e){return F.indexOf(_e)<0}),X=5,Z=_.parallel||X,!this.checkBrowserAndVersion("Internet Explorer","10")&&Z!==1){he.next=26;break}K=0;case 16:if(!(K<G.length)){he.next=24;break}if(!this.isCancel()){he.next=19;break}throw this._makeCancelEvent();case 19:return he.next=21,B(this,G[K]);case 21:K++,he.next=16;break;case 24:he.next=40;break;case 26:for(q=[],ae=0;ae<G.length;ae++)q.push(B(this,G[ae]));return he.next=30,this._thunkPool(q,Z);case 30:if(oe=he.sent,j=!0,!(oe&&oe.length>0)){he.next=37;break}throw this.resetCancelFlag(),ve=oe[0],ve.message="Failed to upload some parts with error: "+ve.toString()+" part_num: "+ve.partNum,ve;case 37:if(!this.isCancel()){he.next=40;break}throw q=null,this._makeCancelEvent();case 40:return he.next=42,this.completeMultipartUpload(A,l,O,_);case 42:return he.abrupt("return",he.sent);case 43:case"end":return he.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},n._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 h=S("stream"),v=h.Readable;s.inherits(u,v),u.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))}},u.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)},n._createStream=function(b,y,_){if(c.blob(b)||c.file(b))return new u(b.slice(y,_));throw new Error("_createStream requires File/String.")},n._getPartSize=function(b,y){return y?Math.max(Math.ceil(b/1e4),y):1048576},n._divideParts=function(b,y){for(var _=Math.ceil(b/y),m=[],g=0;g<_;g++){var x=y*g,l=Math.min(x+y,b);m.push({start:x,end:l})}return m},n._makeCancelEvent=function(){return{status:0,name:"cancel"}}}).call(this,S("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(S,P,E){"use strict";function C(y){return y&&y.__esModule?y:{default:y}}var w=S("babel-runtime/core-js/object/keys"),u=C(w),p=S("babel-runtime/regenerator"),f=C(p),o=S("debug")("ali-oss:object"),a=S("utility"),c=S("fs"),s=S("is-type-of"),d=S("url"),i=S("copy-to"),t=S("path"),n=S("mime"),h=S("../common/callback"),v=S("../common/signUtils"),b=E;b.append=f.default.mark(function y(_,m,g){var x;return f.default.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return g=g||{},g.position===void 0&&(g.position="0"),g.subres={append:"",position:g.position},g.method="POST",l.next=6,this.put(_,m,g);case 6:return x=l.sent,x.nextAppendPosition=x.res.headers["x-oss-next-append-position"],l.abrupt("return",x);case 9:case"end":return l.stop()}},y,this)}),b.put=f.default.mark(function y(_,m,g){var x,l,T,A,O,D;return f.default.wrap(function(I){for(;;)switch(I.prev=I.next){case 0:if(x=void 0,g=g||{},!s.buffer(m)){I.next=6;break}x=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=n.getType(t.extname(m.name)):g.mime=m.type),l=this._createStream(m,0,m.size),I.next=11,this._getFileSize(m);case 11:return g.contentLength=I.sent,I.next=14,this.putStream(_,l,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),T=g.method||"PUT",A=this._objectRequestParams(T,_,g),h.encodeCallback(A,g),A.mime=g.mime,A.content=x,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 x,l,T,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),x=g.method||"PUT",l=this._objectRequestParams(x,_,g),h.encodeCallback(l,g),l.mime=g.mime,l.stream=m,l.successStatuses=[200],O.next=12,this.request(l);case 12:return T=O.sent,A={name:_,url:this._objectUrl(_),res:T.res},l.headers&&l.headers["x-oss-callback"]&&(A.data=JSON.parse(T.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,x,l;return f.default.wrap(function(T){for(;;)switch(T.prev=T.next){case 0:return g=this._objectRequestParams("HEAD",_,m),g.successStatuses=[200,304],T.next=4,this.request(g);case 4:return x=T.sent,l={meta:null,res:x.res,status:x.status},x.status===200&&(0,u.default)(x.headers).forEach(function(A){A.indexOf("x-oss-meta-")===0&&(l.meta||(l.meta={}),l.meta[A.substring(11)]=x.headers[A])}),T.abrupt("return",l);case 8:case"end":return T.stop()}},y,this)}),b.get=f.default.mark(function y(_,m,g){var x,l,T,A;return f.default.wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return x=null,l=!1,s.writableStream(m)?x=m:s.string(m)?(x=c.createWriteStream(m),l=!0):g=m,g=g||{},g.process&&(g.subres=g.subres||{},g.subres["x-oss-process"]=g.process),T=void 0,O.prev=6,A=this._objectRequestParams("GET",_,g),A.writeStream=x,A.successStatuses=[200,206,304],O.next=12,this.request(A);case 12:T=O.sent,l&&x.destroy(),O.next=24;break;case 16:if(O.prev=16,O.t0=O.catch(6),!l){O.next=23;break}return x.destroy(),o("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:T.res,content:T.data});case 25:case"end":return O.stop()}},y,this,[[6,16]])}),b.getStream=f.default.mark(function y(_,m){var g,x;return f.default.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return m=m||{},g=this._objectRequestParams("GET",_,m),g.customResponse=!0,g.successStatuses=[200,206,304],l.next=6,this.request(g);case 6:return x=l.sent,l.abrupt("return",{stream:x.res,res:{status:x.status,headers:x.headers}});case 8:case"end":return l.stop()}},y,this)}),b.delete=f.default.mark(function y(_,m){var g,x;return f.default.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return g=this._objectRequestParams("DELETE",_,m),g.successStatuses=[204],l.next=4,this.request(g);case 4:return x=l.sent,l.abrupt("return",{res:x.res});case 6:case"end":return l.stop()}},y,this)}),b.deleteMulti=f.default.mark(function y(_,m){var g,x,l,T,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>
|
|
|
`,x=0;x<_.length;x++)g+=" <Object><Key>"+a.escape(this._objectName(_[x]))+`</Key></Object>
|
|
|
`;return g+="</Delete>",o("delete multi objects: %s",g),m.subres="delete",l=this._objectRequestParams("POST","",m),l.mime="xml",l.content=g,l.xmlResponse=!0,l.successStatuses=[200],D.next=14,this.request(l);case 14:return T=D.sent,A=T.data,O=A&&A.Deleted||null,O&&(Array.isArray(O)||(O=[O]),O=O.map(function(I){return I.Key})),D.abrupt("return",{res:T.res,deleted:O});case 19:case"end":return D.stop()}},y,this)}),b.copy=f.default.mark(function y(_,m,g){var x,l,T;return f.default.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return g=g||{},g.headers=g.headers||{},(0,u.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,x=this._objectRequestParams("PUT",_,g),x.xmlResponse=!0,x.successStatuses=[200,304],A.next=12,this.request(x);case 12:return l=A.sent,T=l.data,T&&(T={etag:T.ETag,lastModified:T.LastModified}),A.abrupt("return",{data:T,res:l.res});case 16:case"end":return A.stop()}},y,this)}),b.putMeta=f.default.mark(function y(_,m,g){return f.default.wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return x.next=2,this.copy(_,_,{meta:m||{},timeout:g&&g.timeout,ctx:g&&g.ctx});case 2:return x.abrupt("return",x.sent);case 3:case"end":return x.stop()}},y,this)}),b.list=f.default.mark(function y(_,m){var g,x,l,T,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 x=O.sent,l=x.data.Contents,T=this,l&&(Array.isArray(l)||(l=[l]),l=l.map(function(D){return{name:D.Key,url:T._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=x.data.CommonPrefixes||null,A&&(Array.isArray(A)||(A=[A]),A=A.map(function(D){return D.Prefix})),O.abrupt("return",{res:x.res,objects:l,prefixes:A,nextMarker:x.data.NextMarker||null,isTruncated:x.data.IsTruncated==="true"});case 13:case"end":return O.stop()}},y,this)}),b.putACL=f.default.mark(function y(_,m,g){var x,l;return f.default.wrap(function(T){for(;;)switch(T.prev=T.next){case 0:return g=g||{},g.subres="acl",g.headers=g.headers||{},g.headers["x-oss-object-acl"]=m,_=this._objectName(_),x=this._objectRequestParams("PUT",_,g),x.successStatuses=[200],T.next=9,this.request(x);case 9:return l=T.sent,T.abrupt("return",{res:l.res});case 11:case"end":return T.stop()}},y,this)}),b.getACL=f.default.mark(function y(_,m){var g,x;return f.default.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return m=m||{},m.subres="acl",_=this._objectName(_),g=this._objectRequestParams("GET",_,m),g.successStatuses=[200],g.xmlResponse=!0,l.next=8,this.request(g);case 8:return x=l.sent,l.abrupt("return",{acl:x.data.AccessControlList.Grant,owner:{id:x.data.Owner.ID,displayName:x.data.Owner.DisplayName},res:x.res});case 10:case"end":return l.stop()}},y,this)}),b.restore=f.default.mark(function y(_,m){var g,x;return f.default.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return m=m||{},m.subres="restore",g=this._objectRequestParams("POST",_,m),g.successStatuses=[202],l.next=6,this.request(g);case 6:return x=l.sent,l.abrupt("return",{res:x.res});case 8:case"end":return l.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},x=this._getResource(g);this.options.stsToken&&(_["security-token"]=this.options.stsToken);var l=v._signatureForURL(this.options.accessKeySecret,_,x,m),T=d.parse(this._getReqUrl(g));return T.query={OSSAccessKeyId:this.options.accessKeyId,Expires:m,Signature:l.Signature},i(l.subResource).to(T.query),T.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=d.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,u.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&&o("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(S,P,E){"use strict";E.version="5.3.1"},{}],6:[function(S,P,E){"use strict";function C(t){return t&&t.__esModule?t:{default:t}}function w(t){return t&&typeof t.next=="function"&&typeof t.throw=="function"}function u(t){if(!t)return!1;var n=t.constructor;return!!n&&(n.name==="GeneratorFunction"||n.displayName==="GeneratorFunction"||w(n.prototype)||w(t.prototype))}function p(t,n){var h=new t(n),v=(0,s.default)(h),b=(0,s.default)((0,a.default)(h));v.concat(b).forEach(function(y){u(h[y])?this[y]=d.wrap(h[y]).bind(h):this[y]=h[y]},this)}function f(t){if(!(this instanceof f))return new f(t);p.call(this,i,t)}var o=S("babel-runtime/core-js/object/get-prototype-of"),a=C(o),c=S("babel-runtime/core-js/object/keys"),s=C(c),d=S("co"),i=S("./client");P.exports=f,f.STS=function t(n){if(!(this instanceof t))return new t(n);p.call(this,i.STS,n)}},{"./client":2,"babel-runtime/core-js/object/get-prototype-of":22,"babel-runtime/core-js/object/keys":23,co:41}],7:[function(S,P,E){(function(C){"use strict";function w(a){return a&&a.__esModule?a:{default:a}}var u=S("babel-runtime/core-js/object/keys"),p=w(u),f=S("babel-runtime/core-js/json/stringify"),o=w(f);E.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 d=new C((0,o.default)(s)).toString("base64");if(a.headers["x-oss-callback"]=d,c.callback.customValue){var i={};(0,p.default)(c.callback.customValue).forEach(function(t){i["x:"+t]=c.callback.customValue[t]}),a.headers["x-oss-callback-var"]=new C((0,o.default)(i)).toString("base64")}}}}).call(this,S("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/keys":23,buffer:38}],8:[function(S,P,E){"use strict";var C=S("babel-runtime/regenerator"),w=function(o){return o&&o.__esModule?o:{default:o}}(C),u=S("copy-to"),p=S("./callback"),f=E;f.listUploads=w.default.mark(function o(a,c){var s,d,i,t;return w.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return c=c||{},s={},u(c).to(s),s.subres="uploads",d=this._objectRequestParams("GET","",s),d.query=a,d.xmlResponse=!0,d.successStatuses=[200],n.next=10,this.request(d);case 10:return i=n.sent,t=i.data.Upload||[],Array.isArray(t)||(t=[t]),t=t.map(function(h){return{name:h.Key,uploadId:h.UploadId,initiated:h.Initiated}}),n.abrupt("return",{res:i.res,uploads:t,bucket:i.data.Bucket,nextKeyMarker:i.data.NextKeyMarker,nextUploadIdMarker:i.data.NextUploadIdMarker,isTruncated:i.data.IsTruncated==="true"});case 15:case"end":return n.stop()}},o,this)}),f.listParts=w.default.mark(function o(a,c,s,d){var i,t,n;return w.default.wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return d=d||{},i={},u(d).to(i),i.subres={uploadId:c},t=this._objectRequestParams("GET",a,i),t.query=s,t.xmlResponse=!0,t.successStatuses=[200],h.next=10,this.request(t);case 10:return n=h.sent,h.abrupt("return",{res:n.res,uploadId:n.data.UploadId,bucket:n.data.Bucket,name:n.data.Key,partNumberMarker:n.data.PartNumberMarker,nextPartNumberMarker:n.data.NextPartNumberMarker,maxParts:n.data.MaxParts,isTruncated:n.data.IsTruncated,parts:n.data.Part||[]});case 12:case"end":return h.stop()}},o,this)}),f.abortMultipartUpload=w.default.mark(function o(a,c,s){var d,i,t;return w.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return this.cancel(),s=s||{},d={},u(s).to(d),d.subres={uploadId:c},i=this._objectRequestParams("DELETE",a,d),i.successStatuses=[204],n.next=9,this.request(i);case 9:return t=n.sent,n.abrupt("return",{res:t.res});case 11:case"end":return n.stop()}},o,this)}),f.initMultipartUpload=w.default.mark(function o(a,c){var s,d,i;return w.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return c=c||{},s={},u(c).to(s),s.headers=s.headers||{},this._convertMetaToHeaders(c.meta,s.headers),s.subres="uploads",d=this._objectRequestParams("POST",a,s),d.mime=c.mime,d.xmlResponse=!0,d.successStatuses=[200],t.next=12,this.request(d);case 12:return i=t.sent,t.abrupt("return",{res:i.res,bucket:i.data.Bucket,name:i.data.Key,uploadId:i.data.UploadId});case 14:case"end":return t.stop()}},o,this)}),f.uploadPart=w.default.mark(function o(a,c,s,d,i,t,n){var h;return w.default.wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return h={stream:this._createStream(d,i,t),size:t-i},v.next=3,this._uploadPart(a,c,s,h,n);case 3:return v.abrupt("return",v.sent);case 4:case"end":return v.stop()}},o,this)}),f.completeMultipartUpload=w.default.mark(function o(a,c,s,d){var i,t,n,h,v,b,y,_;return w.default.wrap(function(m){for(;;)switch(m.prev=m.next){case 0:for(i=s.concat().sort(function(g,x){return g.number-x.number}).filter(function(g,x,l){return!x||g.number!==l[x-1].number}),t=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<CompleteMultipartUpload>
|
|
|
`,n=0;n<i.length;n++)h=i[n],t+=`<Part>
|
|
|
`,t+="<PartNumber>"+h.number+`</PartNumber>
|
|
|
`,t+="<ETag>"+h.etag+`</ETag>
|
|
|
`,t+=`</Part>
|
|
|
`;return t+="</CompleteMultipartUpload>",d=d||{},v={},u(d).to(v),v.subres={uploadId:c},b=this._objectRequestParams("POST",a,v),p.encodeCallback(b,v),b.mime="xml",b.content=t,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()}},o,this)}),f._uploadPart=w.default.mark(function o(a,c,s,d,i){var t,n,h;return w.default.wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return i=i||{},t={},u(i).to(t),t.headers={"Content-Length":d.size},t.subres={partNumber:s,uploadId:c},n=this._objectRequestParams("PUT",a,t),n.mime=t.mime,n.stream=d.stream,n.successStatuses=[200],v.next=11,this.request(n);case 11:return h=v.sent,d.stream=null,n.stream=null,v.abrupt("return",{name:a,etag:h.res.headers.etag,res:h.res});case 15:case"end":return v.stop()}},o,this)})},{"./callback":7,"babel-runtime/regenerator":33,"copy-to":43}],9:[function(S,P,E){(function(C){"use strict";function w(s){return s&&s.__esModule?s:{default:s}}var u=S("babel-runtime/core-js/json/stringify"),p=w(u),f=S("babel-runtime/core-js/object/keys"),o=w(f),a=S("./../../shims/crypto/crypto.js"),c=S("is-type-of");E.buildCanonicalizedResource=function(s,d){var i=""+s,t="?";if(c.string(d)&&d.trim()!=="")i+=t+d;else if(c.array(d))d.sort(),i+=t+d.join("&");else if(d){var n=function(v,b){return v[0]>b[0]?1:v[0]<b[0]?-1:0},h=function(v){i+=t+v,d[v]&&(i+="="+d[v]),t="&"};(0,o.default)(d).sort(n).forEach(h)}return i},E.buildCanonicalString=function(s,d,i,t){i=i||{};var n=i.headers||{},h=[],v={},b=[s.toUpperCase(),n["Content-Md5"]||"",n["Content-Type"]||n["Content-Type".toLowerCase()],t||n["x-oss-date"]];return(0,o.default)(n).forEach(function(y){var _=y.toLowerCase();_.indexOf("x-oss-")===0&&(v[_]=String(n[y]).trim())}),(0,o.default)(v).sort().forEach(function(y){h.push(y+":"+v[y])}),b=b.concat(h),b.push(this.buildCanonicalizedResource(d,i.parameters)),b.join(`
|
|
|
`)},E.computeSignature=function(s,d){return a.createHmac("sha1",s).update(new C(d,"utf8")).digest("base64")},E.authorization=function(s,d,i){return"OSS "+s+":"+this.computeSignature(d,i)},E._signatureForURL=function(s,d,i,t){var n={},h={};if(d.process&&(h["x-oss-process"]=d.process),d.response&&(0,o.default)(d.response).forEach(function(_){var m="response-"+_.toLowerCase();h[m]=d.response[_]}),(0,o.default)(d).forEach(function(_){var m=_.toLowerCase(),g=d[_];m.indexOf("x-oss-")===0?n[m]=g:m.indexOf("content-md5")===0||m.indexOf("content-type")===0?n[_]=g:m!=="expires"&&m!=="response"&&m!=="process"&&m!=="method"&&(h[m]=g)}),Object.prototype.hasOwnProperty.call(d,"security-token")&&(h["security-token"]=d["security-token"]),Object.prototype.hasOwnProperty.call(d,"callback")){var v={callbackUrl:encodeURI(d.callback.url),callbackBody:d.callback.body};if(d.callback.host&&(v.callbackHost=d.callback.host),d.callback.contentType&&(v.callbackBodyType=d.callback.contentType),h.callback=new C((0,p.default)(v)).toString("base64"),d.callback.customValue){var b={};(0,o.default)(d.callback.customValue).forEach(function(_){b["x:"+_]=d.callback.customValue[_]}),h["callback-var"]=new C((0,p.default)(b)).toString("base64")}}var y=this.buildCanonicalString(d.method,i,{headers:n,parameters:h},t.toString());return{Signature:this.computeSignature(s,y),subResource:h}}}).call(this,S("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(S,P,E){"use strict";var C=S("babel-runtime/regenerator"),w=function(a){return a&&a.__esModule?a:{default:a}}(C),u=S("co"),p=S("co-priority-queue"),f=S("any-promise"),o=E;o._thunkPool=function(a,c){function s(h,v){++t===h.length&&v(n)}function d(h,v){function b(){var l;return w.default.wrap(function(T){for(;;)switch(T.prev=T.next){case 0:l=void 0;case 1:if(i.isCancel()){T.next=9;break}return T.next=4,m.next();case 4:return l=T.sent,T.next=7,l();case 7:T.next=1;break;case 9:g+=1,g===h&&(m.fns=[],m.buffer=[],v(n));case 11:case"end":return T.stop()}},_,this)}function y(l){console.error(l.stack)}for(var _=w.default.mark(b),m=new p,g=0,x=0;x<h;x++)u(b).catch(y);return function(l,T){return function(A){m.push(w.default.mark(function O(){return w.default.wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return D.prev=0,D.t0=A,D.next=4,l;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]])}),T)}}}var i=this,t=0,n=[];return new f(function(h){function v(g){return w.default.wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return x.next=2,_(a[g]);case 2:s(a,h);case 3:case"end":return x.stop()}},y,this)}function b(g){n.push(g),s(a,h)}for(var y=w.default.mark(v),_=new d(c,h),m=0;m<a.length;m++)u(v(m)).catch(b)})},o.cancel=function(){this.options.cancelFlag=!0},o.isCancel=function(){return this.options.cancelFlag},o.resetCancelFlag=function(){this.options.cancelFlag=!1}},{"any-promise":13,"babel-runtime/regenerator":33,co:41,"co-priority-queue":40}],11:[function(S,P,E){"use strict";E._isIP=function(C){var w=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,u=/^\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 w.test(C)||u.test(C)}},{}],12:[function(S,P,E){function C(){}P.exports=C,P.exports.HttpsAgent=C},{}],13:[function(S,P,E){P.exports=S("./register")().Promise},{"./register":15}],14:[function(S,P,E){"use strict";var C=null;P.exports=function(w,u){return function(p,f){p=p||null,f=f||{};var o=f.global!==!1;if(C===null&&o&&(C=w["@@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}:u(p),o&&(w["@@any-promise/REGISTRATION"]=C)),C}}},{}],15:[function(S,P,E){"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=S("./loader")(window,C)},{"./loader":14}],16:[function(S,P,E){P.exports={default:S("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":44}],17:[function(S,P,E){P.exports={default:S("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":45}],18:[function(S,P,E){P.exports={default:S("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":46}],19:[function(S,P,E){P.exports={default:S("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":47}],20:[function(S,P,E){P.exports={default:S("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":48}],21:[function(S,P,E){P.exports={default:S("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":49}],22:[function(S,P,E){P.exports={default:S("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":50}],23:[function(S,P,E){P.exports={default:S("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":51}],24:[function(S,P,E){P.exports={default:S("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":52}],25:[function(S,P,E){P.exports={default:S("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":53}],26:[function(S,P,E){P.exports={default:S("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":54}],27:[function(S,P,E){P.exports={default:S("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":56}],28:[function(S,P,E){P.exports={default:S("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":55}],29:[function(S,P,E){P.exports={default:S("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":57}],30:[function(S,P,E){"use strict";E.__esModule=!0,E.default=function(C,w){if(!(C instanceof w))throw new TypeError("Cannot call a class as a function")}},{}],31:[function(S,P,E){"use strict";E.__esModule=!0;var C=S("../core-js/object/define-property"),w=function(u){return u&&u.__esModule?u:{default:u}}(C);E.default=function(){function u(p,f){for(var o=0;o<f.length;o++){var a=f[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),(0,w.default)(p,a.key,a)}}return function(p,f,o){return f&&u(p.prototype,f),o&&u(p,o),p}}()},{"../core-js/object/define-property":20}],32:[function(S,P,E){"use strict";function C(a){return a&&a.__esModule?a:{default:a}}E.__esModule=!0;var w=S("../core-js/symbol/iterator"),u=C(w),p=S("../core-js/symbol"),f=C(p),o=typeof f.default=="function"&&typeof u.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};E.default=typeof f.default=="function"&&o(u.default)==="symbol"?function(a){return a===void 0?"undefined":o(a)}:function(a){return a&&typeof f.default=="function"&&a.constructor===f.default&&a!==f.default.prototype?"symbol":a===void 0?"undefined":o(a)}},{"../core-js/symbol":27,"../core-js/symbol/iterator":29}],33:[function(S,P,E){P.exports=S("regenerator-runtime")},{"regenerator-runtime":191}],34:[function(S,P,E){"use strict";function C(h){var v=h.length;if(v%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var b=h.indexOf("=");return b===-1&&(b=v),[b,b===v?0:4-b%4]}function w(h){var v=C(h),b=v[0],y=v[1];return 3*(b+y)/4-y}function u(h,v,b){return 3*(v+b)/4-b}function p(h){for(var v,b=C(h),y=b[0],_=b[1],m=new d(u(h,y,_)),g=0,x=_>0?y-4:y,l=0;l<x;l+=4)v=s[h.charCodeAt(l)]<<18|s[h.charCodeAt(l+1)]<<12|s[h.charCodeAt(l+2)]<<6|s[h.charCodeAt(l+3)],m[g++]=v>>16&255,m[g++]=v>>8&255,m[g++]=255&v;return _===2&&(v=s[h.charCodeAt(l)]<<2|s[h.charCodeAt(l+1)]>>4,m[g++]=255&v),_===1&&(v=s[h.charCodeAt(l)]<<10|s[h.charCodeAt(l+1)]<<4|s[h.charCodeAt(l+2)]>>2,m[g++]=v>>8&255,m[g++]=255&v),m}function f(h){return c[h>>18&63]+c[h>>12&63]+c[h>>6&63]+c[63&h]}function o(h,v,b){for(var y,_=[],m=v;m<b;m+=3)y=(h[m]<<16&16711680)+(h[m+1]<<8&65280)+(255&h[m+2]),_.push(f(y));return _.join("")}function a(h){for(var v,b=h.length,y=b%3,_=[],m=0,g=b-y;m<g;m+=16383)_.push(o(h,m,m+16383>g?g:m+16383));return y===1?(v=h[b-1],_.push(c[v>>2]+c[v<<4&63]+"==")):y===2&&(v=(h[b-2]<<8)+h[b-1],_.push(c[v>>10]+c[v>>4&63]+c[v<<2&63]+"=")),_.join("")}E.byteLength=w,E.toByteArray=p,E.fromByteArray=a;for(var c=[],s=[],d=typeof Uint8Array!="undefined"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,n=i.length;t<n;++t)c[t]=i[t],s[i.charCodeAt(t)]=t;s["-".charCodeAt(0)]=62,s["_".charCodeAt(0)]=63},{}],35:[function(S,P,E){!function(C,w,u){P!==void 0&&P.exports?P.exports=u():typeof U=="function"&&U.amd?U("bowser",u):C.bowser=u()}(this,0,function(){function C(s){function d(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 t,n=d(/(ipod|iphone|ipad)/i).toLowerCase(),h=/like android/i.test(s),v=!h&&/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),x=/tizen/i.test(s),l=/(web|hpw)os/i.test(s),T=/windows phone/i.test(s),A=(/SamsungBrowser/i.test(s),!T&&/windows/i.test(s)),O=!n&&!m&&/macintosh/i.test(s),D=!v&&!g&&!x&&!l&&/linux/i.test(s),I=i(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),j=d(/version\/(\d+(\.\d+)?)/i),B=/tablet/i.test(s)&&!/tablet pc/i.test(s),ee=!B&&/[^-]mobi/i.test(s),F=/xbox/i.test(s);/opera/i.test(s)?t={name:"Opera",opera:a,version:j||d(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(s)?t={name:"Opera",opera:a,version:d(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||j}:/SamsungBrowser/i.test(s)?t={name:"Samsung Internet for Android",samsungBrowser:a,version:j||d(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/coast/i.test(s)?t={name:"Opera Coast",coast:a,version:j||d(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(s)?t={name:"Yandex Browser",yandexbrowser:a,version:j||d(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(s)?t={name:"UC Browser",ucbrowser:a,version:d(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(s)?t={name:"Maxthon",maxthon:a,version:d(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(s)?t={name:"Epiphany",epiphany:a,version:d(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(s)?t={name:"Puffin",puffin:a,version:d(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(s)?t={name:"Sleipnir",sleipnir:a,version:d(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(s)?t={name:"K-Meleon",kMeleon:a,version:d(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:T?(t={name:"Windows Phone",osname:"Windows Phone",windowsphone:a},I?(t.msedge=a,t.version=I):(t.msie=a,t.version=d(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(s)?t={name:"Internet Explorer",msie:a,version:d(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:_?t={name:"Chrome",osname:"Chrome OS",chromeos:a,chromeBook:a,chrome:a,version:d(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(s)?t={name:"Microsoft Edge",msedge:a,version:I}:/vivaldi/i.test(s)?t={name:"Vivaldi",vivaldi:a,version:d(/vivaldi\/(\d+(\.\d+)?)/i)||j}:g?t={name:"Sailfish",osname:"Sailfish OS",sailfish:a,version:d(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(s)?t={name:"SeaMonkey",seamonkey:a,version:d(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(s)?(t={name:"Firefox",firefox:a,version:d(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(s)&&(t.firefoxos=a,t.osname="Firefox OS")):m?t={name:"Amazon Silk",silk:a,version:d(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(s)?t={name:"PhantomJS",phantom:a,version:d(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(s)?t={name:"SlimerJS",slimer:a,version:d(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(s)||/rim\stablet/i.test(s)?t={name:"BlackBerry",osname:"BlackBerry OS",blackberry:a,version:j||d(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:l?(t={name:"WebOS",osname:"WebOS",webos:a,version:j||d(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(s)&&(t.touchpad=a)):/bada/i.test(s)?t={name:"Bada",osname:"Bada",bada:a,version:d(/dolfin\/(\d+(\.\d+)?)/i)}:x?t={name:"Tizen",osname:"Tizen",tizen:a,version:d(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||j}:/qupzilla/i.test(s)?t={name:"QupZilla",qupzilla:a,version:d(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||j}:/chromium/i.test(s)?t={name:"Chromium",chromium:a,version:d(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||j}:/chrome|crios|crmo/i.test(s)?t={name:"Chrome",chrome:a,version:d(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:v?t={name:"Android",version:j}:/safari|applewebkit/i.test(s)?(t={name:"Safari",safari:a},j&&(t.version=j)):n?(t={name:n=="iphone"?"iPhone":n=="ipad"?"iPad":"iPod"},j&&(t.version=j)):t=/googlebot/i.test(s)?{name:"Googlebot",googlebot:a,version:d(/googlebot\/(\d+(\.\d+))/i)||j}:{name:d(/^(.*)\/(.*) /),version:i(/^(.*)\/(.*) /)},!t.msedge&&/(apple)?webkit/i.test(s)?(/(apple)?webkit\/537\.36/i.test(s)?(t.name=t.name||"Blink",t.blink=a):(t.name=t.name||"Webkit",t.webkit=a),!t.version&&j&&(t.version=j)):!t.opera&&/gecko\//i.test(s)&&(t.name=t.name||"Gecko",t.gecko=a,t.version=t.version||d(/gecko\/(\d+(\.\d+)?)/i)),t.windowsphone||!v&&!t.silk?!t.windowsphone&&n?(t[n]=a,t.ios=a,t.osname="iOS"):O?(t.mac=a,t.osname="macOS"):F?(t.xbox=a,t.osname="Xbox"):A?(t.windows=a,t.osname="Windows"):D&&(t.linux=a,t.osname="Linux"):(t.android=a,t.osname="Android");var G="";t.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}}(d(/Windows ((NT|XP)( \d\d?.\d)?)/i)):t.windowsphone?G=d(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):t.mac?(G=d(/Mac OS X (\d+([_\.\s]\d+)*)/i),G=G.replace(/[_\s]/g,".")):n?(G=d(/os (\d+([_\s]\d+)*) like mac os x/i),G=G.replace(/[_\s]/g,".")):v?G=d(/android[ \/-](\d+(\.\d+)*)/i):t.webos?G=d(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):t.blackberry?G=d(/rim\stablet\sos\s(\d+(\.\d+)*)/i):t.bada?G=d(/bada\/(\d+(\.\d+)*)/i):t.tizen&&(G=d(/tizen[\/\s](\d+(\.\d+)*)/i)),G&&(t.osversion=G);var X=!t.windows&&G.split(".")[0];return B||y||n=="ipad"||v&&(X==3||X>=4&&!ee)||t.silk?t.tablet=a:(ee||n=="iphone"||n=="ipod"||v||b||t.blackberry||t.webos||t.bada)&&(t.mobile=a),t.msedge||t.msie&&t.version>=10||t.yandexbrowser&&t.version>=15||t.vivaldi&&t.version>=1||t.chrome&&t.version>=20||t.samsungBrowser&&t.version>=4||t.firefox&&t.version>=20||t.safari&&t.version>=6||t.opera&&t.version>=10||t.ios&&t.osversion&&t.osversion.split(".")[0]>=6||t.blackberry&&t.version>=10.1||t.chromium&&t.version>=20?t.a=a:t.msie&&t.version<10||t.chrome&&t.version<20||t.firefox&&t.version<20||t.safari&&t.version<6||t.opera&&t.version<10||t.ios&&t.osversion&&t.osversion.split(".")[0]<6||t.chromium&&t.version<20?t.c=a:t.x=a,t}function w(s){return s.split(".").length}function u(s,d){var i,t=[];if(Array.prototype.map)return Array.prototype.map.call(s,d);for(i=0;i<s.length;i++)t.push(d(s[i]));return t}function p(s){for(var d=Math.max(w(s[0]),w(s[1])),i=u(s,function(t){var n=d-w(t);return t+=new Array(n+1).join(".0"),u(t.split("."),function(h){return new Array(20-h.length).join("0")+h}).reverse()});--d>=0;){if(i[0][d]>i[1][d])return 1;if(i[0][d]!==i[1][d])return-1;if(d===0)return 0}}function f(s,d,i){var t=c;typeof d=="string"&&(i=d,d=void 0),d===void 0&&(d=!1),i&&(t=C(i));var n=""+t.version;for(var h in s)if(s.hasOwnProperty(h)&&t[h]){if(typeof s[h]!="string")throw new Error("Browser version in the minVersion map should be a string: "+h+": "+String(s));return p([n,s[h]])<0}return d}function o(s,d,i){return!f(s,d,i)}var a=!0,c=C(typeof navigator!="undefined"&&navigator.userAgent||"");return c.test=function(s){for(var d=0;d<s.length;++d){var i=s[d];if(typeof i=="string"&&i in c)return!0}return!1},c.isUnsupportedBrowser=f,c.compareVersions=p,c.check=o,c._detect=C,c.detect=C,c})},{}],36:[function(S,P,E){},{}],37:[function(S,P,E){function C(c){if(c&&!o(c))throw new Error("Unknown encoding: "+c)}function w(c){return c.toString(this.encoding)}function u(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=S("buffer").Buffer,o=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=E.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=u;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=p;break;default:return void(this.write=w)}this.charBuffer=new f(6),this.charReceived=0,this.charLength=0};a.prototype.write=function(c){for(var s="";this.charLength;){var d=c.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:c.length;if(c.copy(this.charBuffer,this.charReceived,0,d),this.charReceived+=d,this.charReceived<this.charLength)return"";c=c.slice(d,c.length),s=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var t=s.charCodeAt(s.length-1);if(!(t>=55296&&t<=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,t=s.charCodeAt(i);if(t>=55296&&t<=56319){var n=this.surrogateSize;return this.charLength+=n,this.charReceived+=n,this.charBuffer.copy(this.charBuffer,n,0,n),c.copy(this.charBuffer,0,0,n),s.substring(0,i)}return s},a.prototype.detectIncompleteChar=function(c){for(var s=c.length>=3?3:c.length;s>0;s--){var d=c[c.length-s];if(s==1&&d>>5==6){this.charLength=2;break}if(s<=2&&d>>4==14){this.charLength=3;break}if(s<=3&&d>>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 d=this.charReceived,i=this.charBuffer,t=this.encoding;s+=i.slice(0,d).toString(t)}return s}},{buffer:38}],38:[function(S,P,E){(function(C){"use strict";function w(){return p.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(k,N){if(w()<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,J){if(!(p.TYPED_ARRAY_SUPPORT||this instanceof p))return new p(k,N,J);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,J)}function f(k,N,J,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,J,V):typeof N=="string"?s(k,N,J):t(k,N)}function o(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,J,V){return o(N),N<=0?u(k,N):J!==void 0?typeof V=="string"?u(k,N).fill(J,V):u(k,N).fill(J):u(k,N)}function c(k,N){if(o(N),k=u(k,N<0?0:0|n(N)),!p.TYPED_ARRAY_SUPPORT)for(var J=0;J<N;++J)k[J]=0;return k}function s(k,N,J){if(typeof J=="string"&&J!==""||(J="utf8"),!p.isEncoding(J))throw new TypeError('"encoding" must be a valid string encoding');var V=0|v(N,J);k=u(k,V);var Y=k.write(N,J);return Y!==V&&(k=k.slice(0,Y)),k}function d(k,N){var J=N.length<0?0:0|n(N.length);k=u(k,J);for(var V=0;V<J;V+=1)k[V]=255&N[V];return k}function i(k,N,J,V){if(N.byteLength,J<0||N.byteLength<J)throw new RangeError("'offset' is out of bounds");if(N.byteLength<J+(V||0))throw new RangeError("'length' is out of bounds");return N=J===void 0&&V===void 0?new Uint8Array(N):V===void 0?new Uint8Array(N,J):new Uint8Array(N,J,V),p.TYPED_ARRAY_SUPPORT?(k=N,k.__proto__=p.prototype):k=d(k,N),k}function t(k,N){if(p.isBuffer(N)){var J=0|n(N.length);return k=u(k,J),k.length===0||N.copy(k,0,0,J),k}if(N){if(typeof ArrayBuffer!="undefined"&&N.buffer instanceof ArrayBuffer||"length"in N)return typeof N.length!="number"||ge(N.length)?u(k,0):d(k,N);if(N.type==="Buffer"&&Ne(N.data))return d(k,N.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function n(k){if(k>=w())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+w().toString(16)+" bytes");return 0|k}function h(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 J=k.length;if(J===0)return 0;for(var V=!1;;)switch(N){case"ascii":case"latin1":case"binary":return J;case"utf8":case"utf-8":case void 0:return xe(k).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*J;case"hex":return J>>>1;case"base64":return ke(k).length;default:if(V)return xe(k).length;N=(""+N).toLowerCase(),V=!0}}function b(k,N,J){var V=!1;if((N===void 0||N<0)&&(N=0),N>this.length)return"";if((J===void 0||J>this.length)&&(J=this.length),J<=0)return"";if(J>>>=0,N>>>=0,J<=N)return"";for(k||(k="utf8");;)switch(k){case"hex":return F(this,N,J);case"utf8":case"utf-8":return I(this,N,J);case"ascii":return B(this,N,J);case"latin1":case"binary":return ee(this,N,J);case"base64":return D(this,N,J);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,N,J);default:if(V)throw new TypeError("Unknown encoding: "+k);k=(k+"").toLowerCase(),V=!0}}function y(k,N,J){var V=k[N];k[N]=k[J],k[J]=V}function _(k,N,J,V,Y){if(k.length===0)return-1;if(typeof J=="string"?(V=J,J=0):J>2147483647?J=2147483647:J<-2147483648&&(J=-2147483648),J=+J,isNaN(J)&&(J=Y?0:k.length-1),J<0&&(J=k.length+J),J>=k.length){if(Y)return-1;J=k.length-1}else if(J<0){if(!Y)return-1;J=0}if(typeof N=="string"&&(N=p.from(N,V)),p.isBuffer(N))return N.length===0?-1:m(k,N,J,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,J):Uint8Array.prototype.lastIndexOf.call(k,N,J):m(k,[N],J,V,Y);throw new TypeError("val must be string, number or Buffer")}function m(k,N,J,V,Y){function me(We,Me){return Ae===1?We[Me]:We.readUInt16BE(Me*Ae)}var Ae=1,at=k.length,Re=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,Re/=2,J/=2}var Pe;if(Y){var Ye=-1;for(Pe=J;Pe<at;Pe++)if(me(k,Pe)===me(N,Ye===-1?0:Pe-Ye)){if(Ye===-1&&(Ye=Pe),Pe-Ye+1===Re)return Ye*Ae}else Ye!==-1&&(Pe-=Pe-Ye),Ye=-1}else for(J+Re>at&&(J=at-Re),Pe=J;Pe>=0;Pe--){for(var Ze=!0,ze=0;ze<Re;ze++)if(me(k,Pe+ze)!==me(N,ze)){Ze=!1;break}if(Ze)return Pe}return-1}function g(k,N,J,V){J=Number(J)||0;var Y=k.length-J;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[J+Ae]=at}return Ae}function x(k,N,J,V){return Fe(xe(N,k.length-J),k,J,V)}function l(k,N,J,V){return Fe(je(N),k,J,V)}function T(k,N,J,V){return l(k,N,J,V)}function A(k,N,J,V){return Fe(ke(N),k,J,V)}function O(k,N,J,V){return Fe(Le(N,k.length-J),k,J,V)}function D(k,N,J){return N===0&&J===k.length?ce.fromByteArray(k):ce.fromByteArray(k.slice(N,J))}function I(k,N,J){J=Math.min(k.length,J);for(var V=[],Y=N;Y<J;){var me=k[Y],Ae=null,at=me>239?4:me>223?3:me>191?2:1;if(Y+at<=J){var Re,Pe,Ye,Ze;switch(at){case 1:me<128&&(Ae=me);break;case 2:Re=k[Y+1],(192&Re)==128&&(Ze=(31&me)<<6|63&Re)>127&&(Ae=Ze);break;case 3:Re=k[Y+1],Pe=k[Y+2],(192&Re)==128&&(192&Pe)==128&&(Ze=(15&me)<<12|(63&Re)<<6|63&Pe)>2047&&(Ze<55296||Ze>57343)&&(Ae=Ze);break;case 4:Re=k[Y+1],Pe=k[Y+2],Ye=k[Y+3],(192&Re)==128&&(192&Pe)==128&&(192&Ye)==128&&(Ze=(15&me)<<18|(63&Re)<<12|(63&Pe)<<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 j(V)}function j(k){var N=k.length;if(N<=Xe)return String.fromCharCode.apply(String,k);for(var J="",V=0;V<N;)J+=String.fromCharCode.apply(String,k.slice(V,V+=Xe));return J}function B(k,N,J){var V="";J=Math.min(k.length,J);for(var Y=N;Y<J;++Y)V+=String.fromCharCode(127&k[Y]);return V}function ee(k,N,J){var V="";J=Math.min(k.length,J);for(var Y=N;Y<J;++Y)V+=String.fromCharCode(k[Y]);return V}function F(k,N,J){var V=k.length;(!N||N<0)&&(N=0),(!J||J<0||J>V)&&(J=V);for(var Y="",me=N;me<J;++me)Y+=fe(k[me]);return Y}function G(k,N,J){for(var V=k.slice(N,J),Y="",me=0;me<V.length;me+=2)Y+=String.fromCharCode(V[me]+256*V[me+1]);return Y}function X(k,N,J){if(k%1!=0||k<0)throw new RangeError("offset is not uint");if(k+N>J)throw new RangeError("Trying to access beyond buffer length")}function Z(k,N,J,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(J+V>k.length)throw new RangeError("Index out of range")}function K(k,N,J,V){N<0&&(N=65535+N+1);for(var Y=0,me=Math.min(k.length-J,2);Y<me;++Y)k[J+Y]=(N&255<<8*(V?Y:1-Y))>>>8*(V?Y:1-Y)}function q(k,N,J,V){N<0&&(N=4294967295+N+1);for(var Y=0,me=Math.min(k.length-J,4);Y<me;++Y)k[J+Y]=N>>>8*(V?Y:3-Y)&255}function ae(k,N,J,V,Y,me){if(J+V>k.length)throw new RangeError("Index out of range");if(J<0)throw new RangeError("Index out of range")}function oe(k,N,J,V,Y){return Y||ae(k,N,J,4,34028234663852886e22,-34028234663852886e22),Ie.write(k,N,J,V,23,4),J+4}function ve(k,N,J,V,Y){return Y||ae(k,N,J,8,17976931348623157e292,-17976931348623157e292),Ie.write(k,N,J,V,52,8),J+8}function he(k){if(k=_e(k).replace(te,""),k.length<2)return"";for(;k.length%4!=0;)k+="=";return k}function _e(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 xe(k,N){N=N||1/0;for(var J,V=k.length,Y=null,me=[],Ae=0;Ae<V;++Ae){if((J=k.charCodeAt(Ae))>55295&&J<57344){if(!Y){if(J>56319){(N-=3)>-1&&me.push(239,191,189);continue}if(Ae+1===V){(N-=3)>-1&&me.push(239,191,189);continue}Y=J;continue}if(J<56320){(N-=3)>-1&&me.push(239,191,189),Y=J;continue}J=65536+(Y-55296<<10|J-56320)}else Y&&(N-=3)>-1&&me.push(239,191,189);if(Y=null,J<128){if((N-=1)<0)break;me.push(J)}else if(J<2048){if((N-=2)<0)break;me.push(J>>6|192,63&J|128)}else if(J<65536){if((N-=3)<0)break;me.push(J>>12|224,J>>6&63|128,63&J|128)}else{if(!(J<1114112))throw new Error("Invalid code point");if((N-=4)<0)break;me.push(J>>18|240,J>>12&63|128,J>>6&63|128,63&J|128)}}return me}function je(k){for(var N=[],J=0;J<k.length;++J)N.push(255&k.charCodeAt(J));return N}function Le(k,N){for(var J,V,Y,me=[],Ae=0;Ae<k.length&&!((N-=2)<0);++Ae)J=k.charCodeAt(Ae),V=J>>8,Y=J%256,me.push(Y),me.push(V);return me}function ke(k){return ce.toByteArray(he(k))}function Fe(k,N,J,V){for(var Y=0;Y<V&&!(Y+J>=N.length||Y>=k.length);++Y)N[Y+J]=k[Y];return Y}function ge(k){return k!==k}var ce=S("base64-js"),Ie=S("ieee754"),Ne=S("isarray");E.Buffer=p,E.SlowBuffer=h,E.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}}(),E.kMaxLength=w(),p.poolSize=8192,p._augment=function(k){return k.__proto__=p.prototype,k},p.from=function(k,N,J){return f(null,k,N,J)},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,J){return a(null,k,N,J)},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 J=k.length,V=N.length,Y=0,me=Math.min(J,V);Y<me;++Y)if(k[Y]!==N[Y]){J=k[Y],V=N[Y];break}return J<V?-1:V<J?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 J;if(N===void 0)for(N=0,J=0;J<k.length;++J)N+=k[J].length;var V=p.allocUnsafe(N),Y=0;for(J=0;J<k.length;++J){var me=k[J];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=E.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,J,V,Y){if(!p.isBuffer(k))throw new TypeError("Argument must be a Buffer");if(N===void 0&&(N=0),J===void 0&&(J=k?k.length:0),V===void 0&&(V=0),Y===void 0&&(Y=this.length),N<0||J>k.length||V<0||Y>this.length)throw new RangeError("out of range index");if(V>=Y&&N>=J)return 0;if(V>=Y)return-1;if(N>=J)return 1;if(N>>>=0,J>>>=0,V>>>=0,Y>>>=0,this===k)return 0;for(var me=Y-V,Ae=J-N,at=Math.min(me,Ae),Re=this.slice(V,Y),Pe=k.slice(N,J),Ye=0;Ye<at;++Ye)if(Re[Ye]!==Pe[Ye]){me=Re[Ye],Ae=Pe[Ye];break}return me<Ae?-1:Ae<me?1:0},p.prototype.includes=function(k,N,J){return this.indexOf(k,N,J)!==-1},p.prototype.indexOf=function(k,N,J){return _(this,k,N,J,!0)},p.prototype.lastIndexOf=function(k,N,J){return _(this,k,N,J,!1)},p.prototype.write=function(k,N,J,V){if(N===void 0)V="utf8",J=this.length,N=0;else if(J===void 0&&typeof N=="string")V=N,J=this.length,N=0;else{if(!isFinite(N))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");N|=0,isFinite(J)?(J|=0,V===void 0&&(V="utf8")):(V=J,J=void 0)}var Y=this.length-N;if((J===void 0||J>Y)&&(J=Y),k.length>0&&(J<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,J);case"utf8":case"utf-8":return x(this,k,N,J);case"ascii":return l(this,k,N,J);case"latin1":case"binary":return T(this,k,N,J);case"base64":return A(this,k,N,J);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,k,N,J);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 J=this.length;k=~~k,N=N===void 0?J:~~N,k<0?(k+=J)<0&&(k=0):k>J&&(k=J),N<0?(N+=J)<0&&(N=0):N>J&&(N=J),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,J){k|=0,N|=0,J||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,J){k|=0,N|=0,J||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,J){k|=0,N|=0,J||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,J){k|=0,N|=0,J||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 J=this[k]|this[k+1]<<8;return 32768&J?4294901760|J:J},p.prototype.readInt16BE=function(k,N){N||X(k,2,this.length);var J=this[k+1]|this[k]<<8;return 32768&J?4294901760|J:J},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,J,V){(k=+k,N|=0,J|=0,!V)&&Z(this,k,N,J,Math.pow(2,8*J)-1,0);var Y=1,me=0;for(this[N]=255&k;++me<J&&(Y*=256);)this[N+me]=k/Y&255;return N+J},p.prototype.writeUIntBE=function(k,N,J,V){(k=+k,N|=0,J|=0,!V)&&Z(this,k,N,J,Math.pow(2,8*J)-1,0);var Y=J-1,me=1;for(this[N+Y]=255&k;--Y>=0&&(me*=256);)this[N+Y]=k/me&255;return N+J},p.prototype.writeUInt8=function(k,N,J){return k=+k,N|=0,J||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,J){return k=+k,N|=0,J||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,J){return k=+k,N|=0,J||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,J){return k=+k,N|=0,J||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,J){return k=+k,N|=0,J||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,J,V){if(k=+k,N|=0,!V){var Y=Math.pow(2,8*J-1);Z(this,k,N,J,Y-1,-Y)}var me=0,Ae=1,at=0;for(this[N]=255&k;++me<J&&(Ae*=256);)k<0&&at===0&&this[N+me-1]!==0&&(at=1),this[N+me]=(k/Ae>>0)-at&255;return N+J},p.prototype.writeIntBE=function(k,N,J,V){if(k=+k,N|=0,!V){var Y=Math.pow(2,8*J-1);Z(this,k,N,J,Y-1,-Y)}var me=J-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+J},p.prototype.writeInt8=function(k,N,J){return k=+k,N|=0,J||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,J){return k=+k,N|=0,J||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,J){return k=+k,N|=0,J||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,J){return k=+k,N|=0,J||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,J){return k=+k,N|=0,J||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,J){return oe(this,k,N,!0,J)},p.prototype.writeFloatBE=function(k,N,J){return oe(this,k,N,!1,J)},p.prototype.writeDoubleLE=function(k,N,J){return ve(this,k,N,!0,J)},p.prototype.writeDoubleBE=function(k,N,J){return ve(this,k,N,!1,J)},p.prototype.copy=function(k,N,J,V){if(J||(J=0),V||V===0||(V=this.length),N>=k.length&&(N=k.length),N||(N=0),V>0&&V<J&&(V=J),V===J)return 0;if(k.length===0||this.length===0)return 0;if(N<0)throw new RangeError("targetStart out of bounds");if(J<0||J>=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-J&&(V=k.length-N+J);var Y,me=V-J;if(this===k&&J<N&&N<V)for(Y=me-1;Y>=0;--Y)k[Y+N]=this[Y+J];else if(me<1e3||!p.TYPED_ARRAY_SUPPORT)for(Y=0;Y<me;++Y)k[Y+N]=this[Y+J];else Uint8Array.prototype.set.call(k,this.subarray(J,J+me),N);return me},p.prototype.fill=function(k,N,J,V){if(typeof k=="string"){if(typeof N=="string"?(V=N,N=0,J=this.length):typeof J=="string"&&(V=J,J=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<J)throw new RangeError("Out of range index");if(J<=N)return this;N>>>=0,J=J===void 0?this.length:J>>>0,k||(k=0);var me;if(typeof k=="number")for(me=N;me<J;++me)this[me]=k;else{var Ae=p.isBuffer(k)?k:xe(new p(k,V).toString()),at=Ae.length;for(me=0;me<J-N;++me)this[me+N]=Ae[me%at]}return this};var te=/[^+\/0-9A-Za-z-_]/g}).call(this,typeof re!="undefined"?re:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"base64-js":34,ieee754:161,isarray:166}],39:[function(S,P,E){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(S,P,E){"use strict";var C=function(){this.buffer=[],this.fns=[]};C.prototype.push=function(u,p){if(this.fns.length)return this.fns.shift()(null,u);var f={data:u,priority:p},o=w(this.buffer,f,function(a){return a.priority});this.buffer.splice(o,0,f)},C.prototype.next=function(){var u=this;return function(p){if(u.buffer.length)return p(null,u.buffer.pop().data);u.fns.push(p)}};var w=function(u,p,f){p=f(p);for(var o=0,a=u?u.length:o;o<a;){var c=o+a>>>1;f(u[c])<p?o=c+1:a=c}return o};P.exports=C},{}],41:[function(S,P,E){function C(i){var t=this,n=d.call(arguments,1);return new Promise(function(h,v){function b(m){var g;try{g=i.next(m)}catch(x){return v(x)}_(g)}function y(m){var g;try{g=i.throw(m)}catch(x){return v(x)}_(g)}function _(m){if(m.done)return h(m.value);var g=w.call(t,m.value);return g&&o(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(t,n)),!i||typeof i.next!="function")return h(i);b()})}function w(i){return i&&(o(i)?i:c(i)||a(i)?C.call(this,i):typeof i=="function"?u.call(this,i):Array.isArray(i)?p.call(this,i):s(i)?f.call(this,i):i)}function u(i){var t=this;return new Promise(function(n,h){i.call(t,function(v,b){if(v)return h(v);arguments.length>2&&(b=d.call(arguments,1)),n(b)})})}function p(i){return Promise.all(i.map(w,this))}function f(i){for(var t=new i.constructor,n=Object.keys(i),h=[],v=0;v<n.length;v++){var b=n[v],y=w.call(this,i[b]);y&&o(y)?function(_,m){t[m]=void 0,h.push(_.then(function(g){t[m]=g}))}(y,b):t[b]=i[b]}return Promise.all(h).then(function(){return t})}function o(i){return typeof i.then=="function"}function a(i){return typeof i.next=="function"&&typeof i.throw=="function"}function c(i){var t=i.constructor;return!!t&&(t.name==="GeneratorFunction"||t.displayName==="GeneratorFunction"||a(t.prototype))}function s(i){return Object==i.constructor}var d=Array.prototype.slice;P.exports=C.default=C.co=C,C.wrap=function(i){function t(){return C.call(this,i.apply(this,arguments))}return t.__generatorFunction__=i,t}},{}],42:[function(S,P,E){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(S,P,E){"use strict";function C(p,f){if(!(this instanceof C))return new C(p,f);this.src=p,this._withAccess=f}function w(p,f){return p[f]===void 0&&p.__lookupGetter__(f)===void 0&&p.__lookupSetter__(f)===void 0}var u=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=u.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 o=0;o<f.length;o++)a=f[o],p[a]===void 0&&(p[a]=this.src[a]);return p}for(var o=0;o<f.length;o++){var a=f[o];if(w(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),o=0;o<f.length;o++){var a=f[o];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(S,P,E){S("../../modules/es6.string.iterator"),S("../../modules/es6.array.from"),P.exports=S("../../modules/_core").Array.from},{"../../modules/_core":65,"../../modules/es6.array.from":133,"../../modules/es6.string.iterator":145}],45:[function(S,P,E){var C=S("../../modules/_core"),w=C.JSON||(C.JSON={stringify:JSON.stringify});P.exports=function(u){return w.stringify.apply(w,arguments)}},{"../../modules/_core":65}],46:[function(S,P,E){S("../../modules/es6.object.assign"),P.exports=S("../../modules/_core").Object.assign},{"../../modules/_core":65,"../../modules/es6.object.assign":136}],47:[function(S,P,E){S("../../modules/es6.object.create");var C=S("../../modules/_core").Object;P.exports=function(w,u){return C.create(w,u)}},{"../../modules/_core":65,"../../modules/es6.object.create":137}],48:[function(S,P,E){S("../../modules/es6.object.define-property");var C=S("../../modules/_core").Object;P.exports=function(w,u,p){return C.defineProperty(w,u,p)}},{"../../modules/_core":65,"../../modules/es6.object.define-property":138}],49:[function(S,P,E){S("../../modules/es6.object.get-own-property-names");var C=S("../../modules/_core").Object;P.exports=function(w){return C.getOwnPropertyNames(w)}},{"../../modules/_core":65,"../../modules/es6.object.get-own-property-names":139}],50:[function(S,P,E){S("../../modules/es6.object.get-prototype-of"),P.exports=S("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":65,"../../modules/es6.object.get-prototype-of":140}],51:[function(S,P,E){S("../../modules/es6.object.keys"),P.exports=S("../../modules/_core").Object.keys},{"../../modules/_core":65,"../../modules/es6.object.keys":141}],52:[function(S,P,E){S("../modules/es6.object.to-string"),S("../modules/es6.string.iterator"),S("../modules/web.dom.iterable"),S("../modules/es6.promise"),S("../modules/es7.promise.finally"),S("../modules/es7.promise.try"),P.exports=S("../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(S,P,E){S("../modules/web.immediate"),P.exports=S("../modules/_core").setImmediate},{"../modules/_core":65,"../modules/web.immediate":152}],54:[function(S,P,E){S("../../modules/es6.string.from-code-point"),P.exports=S("../../modules/_core").String.fromCodePoint},{"../../modules/_core":65,"../../modules/es6.string.from-code-point":144}],55:[function(S,P,E){S("../../modules/es6.function.has-instance"),P.exports=S("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":130,"../../modules/es6.function.has-instance":135}],56:[function(S,P,E){S("../../modules/es6.symbol"),S("../../modules/es6.object.to-string"),S("../../modules/es7.symbol.async-iterator"),S("../../modules/es7.symbol.observable"),P.exports=S("../../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(S,P,E){S("../../modules/es6.string.iterator"),S("../../modules/web.dom.iterable"),P.exports=S("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":130,"../../modules/es6.string.iterator":145,"../../modules/web.dom.iterable":151}],58:[function(S,P,E){P.exports=function(C){if(typeof C!="function")throw TypeError(C+" is not a function!");return C}},{}],59:[function(S,P,E){P.exports=function(){}},{}],60:[function(S,P,E){P.exports=function(C,w,u,p){if(!(C instanceof w)||p!==void 0&&p in C)throw TypeError(u+": incorrect invocation!");return C}},{}],61:[function(S,P,E){var C=S("./_is-object");P.exports=function(w){if(!C(w))throw TypeError(w+" is not an object!");return w}},{"./_is-object":85}],62:[function(S,P,E){var C=S("./_to-iobject"),w=S("./_to-length"),u=S("./_to-absolute-index");P.exports=function(p){return function(f,o,a){var c,s=C(f),d=w(s.length),i=u(a,d);if(p&&o!=o){for(;d>i;)if((c=s[i++])!=c)return!0}else for(;d>i;i++)if((p||i in s)&&s[i]===o)return p||i||0;return!p&&-1}}},{"./_to-absolute-index":121,"./_to-iobject":123,"./_to-length":124}],63:[function(S,P,E){var C=S("./_cof"),w=S("./_wks")("toStringTag"),u=C(function(){return arguments}())=="Arguments",p=function(f,o){try{return f[o]}catch(a){}};P.exports=function(f){var o,a,c;return f===void 0?"Undefined":f===null?"Null":typeof(a=p(o=Object(f),w))=="string"?a:u?C(o):(c=C(o))=="Object"&&typeof o.callee=="function"?"Arguments":c}},{"./_cof":64,"./_wks":131}],64:[function(S,P,E){var C={}.toString;P.exports=function(w){return C.call(w).slice(8,-1)}},{}],65:[function(S,P,E){var C=P.exports={version:"2.5.7"};typeof __e=="number"&&(__e=C)},{}],66:[function(S,P,E){"use strict";var C=S("./_object-dp"),w=S("./_property-desc");P.exports=function(u,p,f){p in u?C.f(u,p,w(0,f)):u[p]=f}},{"./_object-dp":98,"./_property-desc":111}],67:[function(S,P,E){var C=S("./_a-function");P.exports=function(w,u,p){if(C(w),u===void 0)return w;switch(p){case 1:return function(f){return w.call(u,f)};case 2:return function(f,o){return w.call(u,f,o)};case 3:return function(f,o,a){return w.call(u,f,o,a)}}return function(){return w.apply(u,arguments)}}},{"./_a-function":58}],68:[function(S,P,E){P.exports=function(C){if(C==null)throw TypeError("Can't call method on "+C);return C}},{}],69:[function(S,P,E){P.exports=!S("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":74}],70:[function(S,P,E){var C=S("./_is-object"),w=S("./_global").document,u=C(w)&&C(w.createElement);P.exports=function(p){return u?w.createElement(p):{}}},{"./_global":76,"./_is-object":85}],71:[function(S,P,E){P.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],72:[function(S,P,E){var C=S("./_object-keys"),w=S("./_object-gops"),u=S("./_object-pie");P.exports=function(p){var f=C(p),o=w.f;if(o)for(var a,c=o(p),s=u.f,d=0;c.length>d;)s.call(p,a=c[d++])&&f.push(a);return f}},{"./_object-gops":103,"./_object-keys":106,"./_object-pie":107}],73:[function(S,P,E){var C=S("./_global"),w=S("./_core"),u=S("./_ctx"),p=S("./_hide"),f=S("./_has"),o=function(a,c,s){var d,i,t,n=a&o.F,h=a&o.G,v=a&o.S,b=a&o.P,y=a&o.B,_=a&o.W,m=h?w:w[c]||(w[c]={}),g=m.prototype,x=h?C:v?C[c]:(C[c]||{}).prototype;h&&(s=c);for(d in s)(i=!n&&x&&x[d]!==void 0)&&f(m,d)||(t=i?x[d]:s[d],m[d]=h&&typeof x[d]!="function"?s[d]:y&&i?u(t,C):_&&x[d]==t?function(l){var T=function(A,O,D){if(this instanceof l){switch(arguments.length){case 0:return new l;case 1:return new l(A);case 2:return new l(A,O)}return new l(A,O,D)}return l.apply(this,arguments)};return T.prototype=l.prototype,T}(t):b&&typeof t=="function"?u(Function.call,t):t,b&&((m.virtual||(m.virtual={}))[d]=t,a&o.R&&g&&!g[d]&&p(g,d,t)))};o.F=1,o.G=2,o.S=4,o.P=8,o.B=16,o.W=32,o.U=64,o.R=128,P.exports=o},{"./_core":65,"./_ctx":67,"./_global":76,"./_has":77,"./_hide":78}],74:[function(S,P,E){P.exports=function(C){try{return!!C()}catch(w){return!0}}},{}],75:[function(S,P,E){var C=S("./_ctx"),w=S("./_iter-call"),u=S("./_is-array-iter"),p=S("./_an-object"),f=S("./_to-length"),o=S("./core.get-iterator-method"),a={},c={},E=P.exports=function(s,d,i,t,n){var h,v,b,y,_=n?function(){return s}:o(s),m=C(i,t,d?2:1),g=0;if(typeof _!="function")throw TypeError(s+" is not iterable!");if(u(_)){for(h=f(s.length);h>g;g++)if((y=d?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=w(b,m,v.value,d))===a||y===c)return y};E.BREAK=a,E.RETURN=c},{"./_an-object":61,"./_ctx":67,"./_is-array-iter":83,"./_iter-call":86,"./_to-length":124,"./core.get-iterator-method":132}],76:[function(S,P,E){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(S,P,E){var C={}.hasOwnProperty;P.exports=function(w,u){return C.call(w,u)}},{}],78:[function(S,P,E){var C=S("./_object-dp"),w=S("./_property-desc");P.exports=S("./_descriptors")?function(u,p,f){return C.f(u,p,w(1,f))}:function(u,p,f){return u[p]=f,u}},{"./_descriptors":69,"./_object-dp":98,"./_property-desc":111}],79:[function(S,P,E){var C=S("./_global").document;P.exports=C&&C.documentElement},{"./_global":76}],80:[function(S,P,E){P.exports=!S("./_descriptors")&&!S("./_fails")(function(){return Object.defineProperty(S("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":69,"./_dom-create":70,"./_fails":74}],81:[function(S,P,E){P.exports=function(C,w,u){var p=u===void 0;switch(w.length){case 0:return p?C():C.call(u);case 1:return p?C(w[0]):C.call(u,w[0]);case 2:return p?C(w[0],w[1]):C.call(u,w[0],w[1]);case 3:return p?C(w[0],w[1],w[2]):C.call(u,w[0],w[1],w[2]);case 4:return p?C(w[0],w[1],w[2],w[3]):C.call(u,w[0],w[1],w[2],w[3])}return C.apply(u,w)}},{}],82:[function(S,P,E){var C=S("./_cof");P.exports=Object("z").propertyIsEnumerable(0)?Object:function(w){return C(w)=="String"?w.split(""):Object(w)}},{"./_cof":64}],83:[function(S,P,E){var C=S("./_iterators"),w=S("./_wks")("iterator"),u=Array.prototype;P.exports=function(p){return p!==void 0&&(C.Array===p||u[w]===p)}},{"./_iterators":91,"./_wks":131}],84:[function(S,P,E){var C=S("./_cof");P.exports=Array.isArray||function(w){return C(w)=="Array"}},{"./_cof":64}],85:[function(S,P,E){P.exports=function(C){return typeof C=="object"?C!==null:typeof C=="function"}},{}],86:[function(S,P,E){var C=S("./_an-object");P.exports=function(w,u,p,f){try{return f?u(C(p)[0],p[1]):u(p)}catch(a){var o=w.return;throw o!==void 0&&C(o.call(w)),a}}},{"./_an-object":61}],87:[function(S,P,E){"use strict";var C=S("./_object-create"),w=S("./_property-desc"),u=S("./_set-to-string-tag"),p={};S("./_hide")(p,S("./_wks")("iterator"),function(){return this}),P.exports=function(f,o,a){f.prototype=C(p,{next:w(1,a)}),u(f,o+" Iterator")}},{"./_hide":78,"./_object-create":97,"./_property-desc":111,"./_set-to-string-tag":115,"./_wks":131}],88:[function(S,P,E){"use strict";var C=S("./_library"),w=S("./_export"),u=S("./_redefine"),p=S("./_hide"),f=S("./_iterators"),o=S("./_iter-create"),a=S("./_set-to-string-tag"),c=S("./_object-gpo"),s=S("./_wks")("iterator"),d=!([].keys&&"next"in[].keys()),i=function(){return this};P.exports=function(t,n,h,v,b,y,_){o(h,n,v);var m,g,x,l=function(F){if(!d&&F in D)return D[F];switch(F){case"keys":case"values":return function(){return new h(this,F)}}return function(){return new h(this,F)}},T=n+" Iterator",A=b=="values",O=!1,D=t.prototype,I=D[s]||D["@@iterator"]||b&&D[b],j=I||l(b),B=b?A?l("entries"):j:void 0,ee=n=="Array"&&D.entries||I;if(ee&&(x=c(ee.call(new t)))!==Object.prototype&&x.next&&(a(x,T,!0),C||typeof x[s]=="function"||p(x,s,i)),A&&I&&I.name!=="values"&&(O=!0,j=function(){return I.call(this)}),C&&!_||!d&&!O&&D[s]||p(D,s,j),f[n]=j,f[T]=i,b)if(m={values:A?j:l("values"),keys:y?j:l("keys"),entries:B},_)for(g in m)g in D||u(D,g,m[g]);else w(w.P+w.F*(d||O),n,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(S,P,E){var C=S("./_wks")("iterator"),w=!1;try{var u=[7][C]();u.return=function(){w=!0},Array.from(u,function(){throw 2})}catch(p){}P.exports=function(p,f){if(!f&&!w)return!1;var o=!1;try{var a=[7],c=a[C]();c.next=function(){return{done:o=!0}},a[C]=function(){return c},p(a)}catch(s){}return o}},{"./_wks":131}],90:[function(S,P,E){P.exports=function(C,w){return{value:w,done:!!C}}},{}],91:[function(S,P,E){P.exports={}},{}],92:[function(S,P,E){P.exports=!0},{}],93:[function(S,P,E){var C=S("./_uid")("meta"),w=S("./_is-object"),u=S("./_has"),p=S("./_object-dp").f,f=0,o=Object.isExtensible||function(){return!0},a=!S("./_fails")(function(){return o(Object.preventExtensions({}))}),c=function(n){p(n,C,{value:{i:"O"+ ++f,w:{}}})},s=function(n,h){if(!w(n))return typeof n=="symbol"?n:(typeof n=="string"?"S":"P")+n;if(!u(n,C)){if(!o(n))return"F";if(!h)return"E";c(n)}return n[C].i},d=function(n,h){if(!u(n,C)){if(!o(n))return!0;if(!h)return!1;c(n)}return n[C].w},i=function(n){return a&&t.NEED&&o(n)&&!u(n,C)&&c(n),n},t=P.exports={KEY:C,NEED:!1,fastKey:s,getWeak:d,onFreeze:i}},{"./_fails":74,"./_has":77,"./_is-object":85,"./_object-dp":98,"./_uid":127}],94:[function(S,P,E){var C=S("./_global"),w=S("./_task").set,u=C.MutationObserver||C.WebKitMutationObserver,p=C.process,f=C.Promise,o=S("./_cof")(p)=="process";P.exports=function(){var a,c,s,d=function(){var h,v;for(o&&(h=p.domain)&&h.exit();a;){v=a.fn,a=a.next;try{v()}catch(b){throw a?s():c=void 0,b}}c=void 0,h&&h.enter()};if(o)s=function(){p.nextTick(d)};else if(!u||C.navigator&&C.navigator.standalone)if(f&&f.resolve){var i=f.resolve(void 0);s=function(){i.then(d)}}else s=function(){w.call(C,d)};else{var t=!0,n=document.createTextNode("");new u(d).observe(n,{characterData:!0}),s=function(){n.data=t=!t}}return function(h){var v={fn:h,next:void 0};c&&(c.next=v),a||(a=v,s()),c=v}}},{"./_cof":64,"./_global":76,"./_task":120}],95:[function(S,P,E){"use strict";function C(u){var p,f;this.promise=new u(function(o,a){if(p!==void 0||f!==void 0)throw TypeError("Bad Promise constructor");p=o,f=a}),this.resolve=w(p),this.reject=w(f)}var w=S("./_a-function");P.exports.f=function(u){return new C(u)}},{"./_a-function":58}],96:[function(S,P,E){"use strict";var C=S("./_object-keys"),w=S("./_object-gops"),u=S("./_object-pie"),p=S("./_to-object"),f=S("./_iobject"),o=Object.assign;P.exports=!o||S("./_fails")(function(){var a={},c={},s=Symbol(),d="abcdefghijklmnopqrst";return a[s]=7,d.split("").forEach(function(i){c[i]=i}),o({},a)[s]!=7||Object.keys(o({},c)).join("")!=d})?function(a,c){for(var s=p(a),d=arguments.length,i=1,t=w.f,n=u.f;d>i;)for(var h,v=f(arguments[i++]),b=t?C(v).concat(t(v)):C(v),y=b.length,_=0;y>_;)n.call(v,h=b[_++])&&(s[h]=v[h]);return s}:o},{"./_fails":74,"./_iobject":82,"./_object-gops":103,"./_object-keys":106,"./_object-pie":107,"./_to-object":125}],97:[function(S,P,E){var C=S("./_an-object"),w=S("./_object-dps"),u=S("./_enum-bug-keys"),p=S("./_shared-key")("IE_PROTO"),f=function(){},o=function(){var a,c=S("./_dom-create")("iframe"),s=u.length;for(c.style.display="none",S("./_html").appendChild(c),c.src="javascript:",a=c.contentWindow.document,a.open(),a.write("<script>document.F=Object</script>"),a.close(),o=a.F;s--;)delete o.prototype[u[s]];return o()};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=o(),c===void 0?s:w(s,c)}},{"./_an-object":61,"./_dom-create":70,"./_enum-bug-keys":71,"./_html":79,"./_object-dps":99,"./_shared-key":116}],98:[function(S,P,E){var C=S("./_an-object"),w=S("./_ie8-dom-define"),u=S("./_to-primitive"),p=Object.defineProperty;E.f=S("./_descriptors")?Object.defineProperty:function(f,o,a){if(C(f),o=u(o,!0),C(a),w)try{return p(f,o,a)}catch(c){}if("get"in a||"set"in a)throw TypeError("Accessors not supported!");return"value"in a&&(f[o]=a.value),f}},{"./_an-object":61,"./_descriptors":69,"./_ie8-dom-define":80,"./_to-primitive":126}],99:[function(S,P,E){var C=S("./_object-dp"),w=S("./_an-object"),u=S("./_object-keys");P.exports=S("./_descriptors")?Object.defineProperties:function(p,f){w(p);for(var o,a=u(f),c=a.length,s=0;c>s;)C.f(p,o=a[s++],f[o]);return p}},{"./_an-object":61,"./_descriptors":69,"./_object-dp":98,"./_object-keys":106}],100:[function(S,P,E){var C=S("./_object-pie"),w=S("./_property-desc"),u=S("./_to-iobject"),p=S("./_to-primitive"),f=S("./_has"),o=S("./_ie8-dom-define"),a=Object.getOwnPropertyDescriptor;E.f=S("./_descriptors")?a:function(c,s){if(c=u(c),s=p(s,!0),o)try{return a(c,s)}catch(d){}if(f(c,s))return w(!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(S,P,E){var C=S("./_to-iobject"),w=S("./_object-gopn").f,u={}.toString,p=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],f=function(o){try{return w(o)}catch(a){return p.slice()}};P.exports.f=function(o){return p&&u.call(o)=="[object Window]"?f(o):w(C(o))}},{"./_object-gopn":102,"./_to-iobject":123}],102:[function(S,P,E){var C=S("./_object-keys-internal"),w=S("./_enum-bug-keys").concat("length","prototype");E.f=Object.getOwnPropertyNames||function(u){return C(u,w)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],103:[function(S,P,E){E.f=Object.getOwnPropertySymbols},{}],104:[function(S,P,E){var C=S("./_has"),w=S("./_to-object"),u=S("./_shared-key")("IE_PROTO"),p=Object.prototype;P.exports=Object.getPrototypeOf||function(f){return f=w(f),C(f,u)?f[u]: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(S,P,E){var C=S("./_has"),w=S("./_to-iobject"),u=S("./_array-includes")(!1),p=S("./_shared-key")("IE_PROTO");P.exports=function(f,o){var a,c=w(f),s=0,d=[];for(a in c)a!=p&&C(c,a)&&d.push(a);for(;o.length>s;)C(c,a=o[s++])&&(~u(d,a)||d.push(a));return d}},{"./_array-includes":62,"./_has":77,"./_shared-key":116,"./_to-iobject":123}],106:[function(S,P,E){var C=S("./_object-keys-internal"),w=S("./_enum-bug-keys");P.exports=Object.keys||function(u){return C(u,w)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],107:[function(S,P,E){E.f={}.propertyIsEnumerable},{}],108:[function(S,P,E){var C=S("./_export"),w=S("./_core"),u=S("./_fails");P.exports=function(p,f){var o=(w.Object||{})[p]||Object[p],a={};a[p]=f(o),C(C.S+C.F*u(function(){o(1)}),"Object",a)}},{"./_core":65,"./_export":73,"./_fails":74}],109:[function(S,P,E){P.exports=function(C){try{return{e:!1,v:C()}}catch(w){return{e:!0,v:w}}}},{}],110:[function(S,P,E){var C=S("./_an-object"),w=S("./_is-object"),u=S("./_new-promise-capability");P.exports=function(p,f){if(C(p),w(f)&&f.constructor===p)return f;var o=u.f(p);return(0,o.resolve)(f),o.promise}},{"./_an-object":61,"./_is-object":85,"./_new-promise-capability":95}],111:[function(S,P,E){P.exports=function(C,w){return{enumerable:!(1&C),configurable:!(2&C),writable:!(4&C),value:w}}},{}],112:[function(S,P,E){var C=S("./_hide");P.exports=function(w,u,p){for(var f in u)p&&w[f]?w[f]=u[f]:C(w,f,u[f]);return w}},{"./_hide":78}],113:[function(S,P,E){P.exports=S("./_hide")},{"./_hide":78}],114:[function(S,P,E){"use strict";var C=S("./_global"),w=S("./_core"),u=S("./_object-dp"),p=S("./_descriptors"),f=S("./_wks")("species");P.exports=function(o){var a=typeof w[o]=="function"?w[o]:C[o];p&&a&&!a[f]&&u.f(a,f,{configurable:!0,get:function(){return this}})}},{"./_core":65,"./_descriptors":69,"./_global":76,"./_object-dp":98,"./_wks":131}],115:[function(S,P,E){var C=S("./_object-dp").f,w=S("./_has"),u=S("./_wks")("toStringTag");P.exports=function(p,f,o){p&&!w(p=o?p:p.prototype,u)&&C(p,u,{configurable:!0,value:f})}},{"./_has":77,"./_object-dp":98,"./_wks":131}],116:[function(S,P,E){var C=S("./_shared")("keys"),w=S("./_uid");P.exports=function(u){return C[u]||(C[u]=w(u))}},{"./_shared":117,"./_uid":127}],117:[function(S,P,E){var C=S("./_core"),w=S("./_global"),u=w["__core-js_shared__"]||(w["__core-js_shared__"]={});(P.exports=function(p,f){return u[p]||(u[p]=f!==void 0?f:{})})("versions",[]).push({version:C.version,mode:S("./_library")?"pure":"global",copyright:"\u6F0F 2018 Denis Pushkarev (zloirock.ru)"})},{"./_core":65,"./_global":76,"./_library":92}],118:[function(S,P,E){var C=S("./_an-object"),w=S("./_a-function"),u=S("./_wks")("species");P.exports=function(p,f){var o,a=C(p).constructor;return a===void 0||(o=C(a)[u])==null?f:w(o)}},{"./_a-function":58,"./_an-object":61,"./_wks":131}],119:[function(S,P,E){var C=S("./_to-integer"),w=S("./_defined");P.exports=function(u){return function(p,f){var o,a,c=String(w(p)),s=C(f),d=c.length;return s<0||s>=d?u?"":void 0:(o=c.charCodeAt(s),o<55296||o>56319||s+1===d||(a=c.charCodeAt(s+1))<56320||a>57343?u?c.charAt(s):o:u?c.slice(s,s+2):a-56320+(o-55296<<10)+65536)}}},{"./_defined":68,"./_to-integer":122}],120:[function(S,P,E){var C,w,u,p=S("./_ctx"),f=S("./_invoke"),o=S("./_html"),a=S("./_dom-create"),c=S("./_global"),s=c.process,d=c.setImmediate,i=c.clearImmediate,t=c.MessageChannel,n=c.Dispatch,h=0,v={},b=function(){var _=+this;if(v.hasOwnProperty(_)){var m=v[_];delete v[_],m()}},y=function(_){b.call(_.data)};d&&i||(d=function(_){for(var m=[],g=1;arguments.length>g;)m.push(arguments[g++]);return v[++h]=function(){f(typeof _=="function"?_:Function(_),m)},C(h),h},i=function(_){delete v[_]},S("./_cof")(s)=="process"?C=function(_){s.nextTick(p(b,_,1))}:n&&n.now?C=function(_){n.now(p(b,_,1))}:t?(w=new t,u=w.port2,w.port1.onmessage=y,C=p(u.postMessage,u,1)):c.addEventListener&&typeof postMessage=="function"&&!c.importScripts?(C=function(_){c.postMessage(_+"","*")},c.addEventListener("message",y,!1)):C="onreadystatechange"in a("script")?function(_){o.appendChild(a("script")).onreadystatechange=function(){o.removeChild(this),b.call(_)}}:function(_){setTimeout(p(b,_,1),0)}),P.exports={set:d,clear:i}},{"./_cof":64,"./_ctx":67,"./_dom-create":70,"./_global":76,"./_html":79,"./_invoke":81}],121:[function(S,P,E){var C=S("./_to-integer"),w=Math.max,u=Math.min;P.exports=function(p,f){return p=C(p),p<0?w(p+f,0):u(p,f)}},{"./_to-integer":122}],122:[function(S,P,E){var C=Math.ceil,w=Math.floor;P.exports=function(u){return isNaN(u=+u)?0:(u>0?w:C)(u)}},{}],123:[function(S,P,E){var C=S("./_iobject"),w=S("./_defined");P.exports=function(u){return C(w(u))}},{"./_defined":68,"./_iobject":82}],124:[function(S,P,E){var C=S("./_to-integer"),w=Math.min;P.exports=function(u){return u>0?w(C(u),9007199254740991):0}},{"./_to-integer":122}],125:[function(S,P,E){var C=S("./_defined");P.exports=function(w){return Object(C(w))}},{"./_defined":68}],126:[function(S,P,E){var C=S("./_is-object");P.exports=function(w,u){if(!C(w))return w;var p,f;if(u&&typeof(p=w.toString)=="function"&&!C(f=p.call(w)))return f;if(typeof(p=w.valueOf)=="function"&&!C(f=p.call(w)))return f;if(!u&&typeof(p=w.toString)=="function"&&!C(f=p.call(w)))return f;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":85}],127:[function(S,P,E){var C=0,w=Math.random();P.exports=function(u){return"Symbol(".concat(u===void 0?"":u,")_",(++C+w).toString(36))}},{}],128:[function(S,P,E){var C=S("./_global"),w=C.navigator;P.exports=w&&w.userAgent||""},{"./_global":76}],129:[function(S,P,E){var C=S("./_global"),w=S("./_core"),u=S("./_library"),p=S("./_wks-ext"),f=S("./_object-dp").f;P.exports=function(o){var a=w.Symbol||(w.Symbol=u?{}:C.Symbol||{});o.charAt(0)=="_"||o in a||f(a,o,{value:p.f(o)})}},{"./_core":65,"./_global":76,"./_library":92,"./_object-dp":98,"./_wks-ext":130}],130:[function(S,P,E){E.f=S("./_wks")},{"./_wks":131}],131:[function(S,P,E){var C=S("./_shared")("wks"),w=S("./_uid"),u=S("./_global").Symbol,p=typeof u=="function";(P.exports=function(f){return C[f]||(C[f]=p&&u[f]||(p?u:w)("Symbol."+f))}).store=C},{"./_global":76,"./_shared":117,"./_uid":127}],132:[function(S,P,E){var C=S("./_classof"),w=S("./_wks")("iterator"),u=S("./_iterators");P.exports=S("./_core").getIteratorMethod=function(p){if(p!=null)return p[w]||p["@@iterator"]||u[C(p)]}},{"./_classof":63,"./_core":65,"./_iterators":91,"./_wks":131}],133:[function(S,P,E){"use strict";var C=S("./_ctx"),w=S("./_export"),u=S("./_to-object"),p=S("./_iter-call"),f=S("./_is-array-iter"),o=S("./_to-length"),a=S("./_create-property"),c=S("./core.get-iterator-method");w(w.S+w.F*!S("./_iter-detect")(function(s){Array.from(s)}),"Array",{from:function(s){var d,i,t,n,h=u(s),v=typeof this=="function"?this:Array,b=arguments.length,y=b>1?arguments[1]:void 0,_=y!==void 0,m=0,g=c(h);if(_&&(y=C(y,b>2?arguments[2]:void 0,2)),g==null||v==Array&&f(g))for(d=o(h.length),i=new v(d);d>m;m++)a(i,m,_?y(h[m],m):h[m]);else for(n=g.call(h),i=new v;!(t=n.next()).done;m++)a(i,m,_?p(n,y,[t.value,m],!0):t.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(S,P,E){"use strict";var C=S("./_add-to-unscopables"),w=S("./_iter-step"),u=S("./_iterators"),p=S("./_to-iobject");P.exports=S("./_iter-define")(Array,"Array",function(f,o){this._t=p(f),this._i=0,this._k=o},function(){var f=this._t,o=this._k,a=this._i++;return!f||a>=f.length?(this._t=void 0,w(1)):o=="keys"?w(0,a):o=="values"?w(0,f[a]):w(0,[a,f[a]])},"values"),u.Arguments=u.Array,C("keys"),C("values"),C("entries")},{"./_add-to-unscopables":59,"./_iter-define":88,"./_iter-step":90,"./_iterators":91,"./_to-iobject":123}],135:[function(S,P,E){"use strict";var C=S("./_is-object"),w=S("./_object-gpo"),u=S("./_wks")("hasInstance"),p=Function.prototype;u in p||S("./_object-dp").f(p,u,{value:function(f){if(typeof this!="function"||!C(f))return!1;if(!C(this.prototype))return f instanceof this;for(;f=w(f);)if(this.prototype===f)return!0;return!1}})},{"./_is-object":85,"./_object-dp":98,"./_object-gpo":104,"./_wks":131}],136:[function(S,P,E){var C=S("./_export");C(C.S+C.F,"Object",{assign:S("./_object-assign")})},{"./_export":73,"./_object-assign":96}],137:[function(S,P,E){var C=S("./_export");C(C.S,"Object",{create:S("./_object-create")})},{"./_export":73,"./_object-create":97}],138:[function(S,P,E){var C=S("./_export");C(C.S+C.F*!S("./_descriptors"),"Object",{defineProperty:S("./_object-dp").f})},{"./_descriptors":69,"./_export":73,"./_object-dp":98}],139:[function(S,P,E){S("./_object-sap")("getOwnPropertyNames",function(){return S("./_object-gopn-ext").f})},{"./_object-gopn-ext":101,"./_object-sap":108}],140:[function(S,P,E){var C=S("./_to-object"),w=S("./_object-gpo");S("./_object-sap")("getPrototypeOf",function(){return function(u){return w(C(u))}})},{"./_object-gpo":104,"./_object-sap":108,"./_to-object":125}],141:[function(S,P,E){var C=S("./_to-object"),w=S("./_object-keys");S("./_object-sap")("keys",function(){return function(u){return w(C(u))}})},{"./_object-keys":106,"./_object-sap":108,"./_to-object":125}],142:[function(S,P,E){arguments[4][36][0].apply(E,arguments)},{dup:36}],143:[function(S,P,E){"use strict";var C,w,u,p,f=S("./_library"),o=S("./_global"),a=S("./_ctx"),c=S("./_classof"),s=S("./_export"),d=S("./_is-object"),i=S("./_a-function"),t=S("./_an-instance"),n=S("./_for-of"),h=S("./_species-constructor"),v=S("./_task").set,b=S("./_microtask")(),y=S("./_new-promise-capability"),_=S("./_perform"),m=S("./_user-agent"),g=S("./_promise-resolve"),x=o.TypeError,l=o.process,T=l&&l.versions,A=T&&T.v8||"",O=o.Promise,D=c(l)=="process",I=function(){},j=w=y.f,B=!!function(){try{var ae=O.resolve(1),oe=(ae.constructor={})[S("./_wks")("species")]=function(ve){ve(I,I)};return(D||typeof PromiseRejectionEvent=="function")&&ae.then(I)instanceof oe&&A.indexOf("6.6")!==0&&m.indexOf("Chrome/66")===-1}catch(ve){}}(),ee=function(ae){var oe;return!(!d(ae)||typeof(oe=ae.then)!="function")&&oe},F=function(ae,oe){if(!ae._n){ae._n=!0;var ve=ae._c;b(function(){for(var he=ae._v,_e=ae._s==1,fe=0;ve.length>fe;)!function(xe){var je,Le,ke,Fe=_e?xe.ok:xe.fail,ge=xe.resolve,ce=xe.reject,Ie=xe.domain;try{Fe?(_e||(ae._h==2&&Z(ae),ae._h=1),Fe===!0?je=he:(Ie&&Ie.enter(),je=Fe(he),Ie&&(Ie.exit(),ke=!0)),je===xe.promise?ce(x("Promise-chain cycle")):(Le=ee(je))?Le.call(je,ge,ce):ge(je)):ce(he)}catch(Ne){Ie&&!ke&&Ie.exit(),ce(Ne)}}(ve[fe++]);ae._c=[],ae._n=!1,oe&&!ae._h&&G(ae)})}},G=function(ae){v.call(o,function(){var oe,ve,he,_e=ae._v,fe=X(ae);if(fe&&(oe=_(function(){D?l.emit("unhandledRejection",_e,ae):(ve=o.onunhandledrejection)?ve({promise:ae,reason:_e}):(he=o.console)&&he.error&&he.error("Unhandled promise rejection",_e)}),ae._h=D||X(ae)?2:1),ae._a=void 0,fe&&oe.e)throw oe.v})},X=function(ae){return ae._h!==1&&(ae._a||ae._c).length===0},Z=function(ae){v.call(o,function(){var oe;D?l.emit("rejectionHandled",ae):(oe=o.onrejectionhandled)&&oe({promise:ae,reason:ae._v})})},K=function(ae){var oe=this;oe._d||(oe._d=!0,oe=oe._w||oe,oe._v=ae,oe._s=2,oe._a||(oe._a=oe._c.slice()),F(oe,!0))},q=function(ae){var oe,ve=this;if(!ve._d){ve._d=!0,ve=ve._w||ve;try{if(ve===ae)throw x("Promise can't be resolved itself");(oe=ee(ae))?b(function(){var he={_w:ve,_d:!1};try{oe.call(ae,a(q,he,1),a(K,he,1))}catch(_e){K.call(he,_e)}}):(ve._v=ae,ve._s=1,F(ve,!1))}catch(he){K.call({_w:ve,_d:!1},he)}}};B||(O=function(ae){t(this,O,"Promise","_h"),i(ae),C.call(this);try{ae(a(q,this,1),a(K,this,1))}catch(oe){K.call(this,oe)}},C=function(ae){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},C.prototype=S("./_redefine-all")(O.prototype,{then:function(ae,oe){var ve=j(h(this,O));return ve.ok=typeof ae!="function"||ae,ve.fail=typeof oe=="function"&&oe,ve.domain=D?l.domain:void 0,this._c.push(ve),this._a&&this._a.push(ve),this._s&&F(this,!1),ve.promise},catch:function(ae){return this.then(void 0,ae)}}),u=function(){var ae=new C;this.promise=ae,this.resolve=a(q,ae,1),this.reject=a(K,ae,1)},y.f=j=function(ae){return ae===O||ae===p?new u(ae):w(ae)}),s(s.G+s.W+s.F*!B,{Promise:O}),S("./_set-to-string-tag")(O,"Promise"),S("./_set-species")("Promise"),p=S("./_core").Promise,s(s.S+s.F*!B,"Promise",{reject:function(ae){var oe=j(this);return(0,oe.reject)(ae),oe.promise}}),s(s.S+s.F*(f||!B),"Promise",{resolve:function(ae){return g(f&&this===p?O:this,ae)}}),s(s.S+s.F*!(B&&S("./_iter-detect")(function(ae){O.all(ae).catch(I)})),"Promise",{all:function(ae){var oe=this,ve=j(oe),he=ve.resolve,_e=ve.reject,fe=_(function(){var xe=[],je=0,Le=1;n(ae,!1,function(ke){var Fe=je++,ge=!1;xe.push(void 0),Le++,oe.resolve(ke).then(function(ce){ge||(ge=!0,xe[Fe]=ce,--Le||he(xe))},_e)}),--Le||he(xe)});return fe.e&&_e(fe.v),ve.promise},race:function(ae){var oe=this,ve=j(oe),he=ve.reject,_e=_(function(){n(ae,!1,function(fe){oe.resolve(fe).then(ve.resolve,he)})});return _e.e&&he(_e.v),ve.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(S,P,E){var C=S("./_export"),w=S("./_to-absolute-index"),u=String.fromCharCode,p=String.fromCodePoint;C(C.S+C.F*(!!p&&p.length!=1),"String",{fromCodePoint:function(f){for(var o,a=[],c=arguments.length,s=0;c>s;){if(o=+arguments[s++],w(o,1114111)!==o)throw RangeError(o+" is not a valid code point");a.push(o<65536?u(o):u(55296+((o-=65536)>>10),o%1024+56320))}return a.join("")}})},{"./_export":73,"./_to-absolute-index":121}],145:[function(S,P,E){"use strict";var C=S("./_string-at")(!0);S("./_iter-define")(String,"String",function(w){this._t=String(w),this._i=0},function(){var w,u=this._t,p=this._i;return p>=u.length?{value:void 0,done:!0}:(w=C(u,p),this._i+=w.length,{value:w,done:!1})})},{"./_iter-define":88,"./_string-at":119}],146:[function(S,P,E){"use strict";var C=S("./_global"),w=S("./_has"),u=S("./_descriptors"),p=S("./_export"),f=S("./_redefine"),o=S("./_meta").KEY,a=S("./_fails"),c=S("./_shared"),s=S("./_set-to-string-tag"),d=S("./_uid"),i=S("./_wks"),t=S("./_wks-ext"),n=S("./_wks-define"),h=S("./_enum-keys"),v=S("./_is-array"),b=S("./_an-object"),y=S("./_is-object"),_=S("./_to-iobject"),m=S("./_to-primitive"),g=S("./_property-desc"),x=S("./_object-create"),l=S("./_object-gopn-ext"),T=S("./_object-gopd"),A=S("./_object-dp"),O=S("./_object-keys"),D=T.f,I=A.f,j=l.f,B=C.Symbol,ee=C.JSON,F=ee&&ee.stringify,G=i("_hidden"),X=i("toPrimitive"),Z={}.propertyIsEnumerable,K=c("symbol-registry"),q=c("symbols"),ae=c("op-symbols"),oe=Object.prototype,ve=typeof B=="function",he=C.QObject,_e=!he||!he.prototype||!he.prototype.findChild,fe=u&&a(function(){return x(I({},"a",{get:function(){return I(this,"a",{value:7}).a}})).a!=7})?function(J,V,Y){var me=D(oe,V);me&&delete oe[V],I(J,V,Y),me&&J!==oe&&I(oe,V,me)}:I,xe=function(J){var V=q[J]=x(B.prototype);return V._k=J,V},je=ve&&typeof B.iterator=="symbol"?function(J){return typeof J=="symbol"}:function(J){return J instanceof B},Le=function(J,V,Y){return J===oe&&Le(ae,V,Y),b(J),V=m(V,!0),b(Y),w(q,V)?(Y.enumerable?(w(J,G)&&J[G][V]&&(J[G][V]=!1),Y=x(Y,{enumerable:g(0,!1)})):(w(J,G)||I(J,G,g(1,{})),J[G][V]=!0),fe(J,V,Y)):I(J,V,Y)},ke=function(J,V){b(J);for(var Y,me=h(V=_(V)),Ae=0,at=me.length;at>Ae;)Le(J,Y=me[Ae++],V[Y]);return J},Fe=function(J,V){return V===void 0?x(J):ke(x(J),V)},ge=function(J){var V=Z.call(this,J=m(J,!0));return!(this===oe&&w(q,J)&&!w(ae,J))&&(!(V||!w(this,J)||!w(q,J)||w(this,G)&&this[G][J])||V)},ce=function(J,V){if(J=_(J),V=m(V,!0),J!==oe||!w(q,V)||w(ae,V)){var Y=D(J,V);return!Y||!w(q,V)||w(J,G)&&J[G][V]||(Y.enumerable=!0),Y}},Ie=function(J){for(var V,Y=j(_(J)),me=[],Ae=0;Y.length>Ae;)w(q,V=Y[Ae++])||V==G||V==o||me.push(V);return me},Ne=function(J){for(var V,Y=J===oe,me=j(Y?ae:_(J)),Ae=[],at=0;me.length>at;)!w(q,V=me[at++])||Y&&!w(oe,V)||Ae.push(q[V]);return Ae};ve||(B=function(){if(this instanceof B)throw TypeError("Symbol is not a constructor!");var J=d(arguments.length>0?arguments[0]:void 0),V=function(Y){this===oe&&V.call(ae,Y),w(this,G)&&w(this[G],J)&&(this[G][J]=!1),fe(this,J,g(1,Y))};return u&&_e&&fe(oe,J,{configurable:!0,set:V}),xe(J)},f(B.prototype,"toString",function(){return this._k}),T.f=ce,A.f=Le,S("./_object-gopn").f=l.f=Ie,S("./_object-pie").f=ge,S("./_object-gops").f=Ne,u&&!S("./_library")&&f(oe,"propertyIsEnumerable",ge,!0),t.f=function(J){return xe(i(J))}),p(p.G+p.W+p.F*!ve,{Symbol:B});for(var Xe="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),te=0;Xe.length>te;)i(Xe[te++]);for(var k=O(i.store),N=0;k.length>N;)n(k[N++]);p(p.S+p.F*!ve,"Symbol",{for:function(J){return w(K,J+="")?K[J]:K[J]=B(J)},keyFor:function(J){if(!je(J))throw TypeError(J+" is not a symbol!");for(var V in K)if(K[V]===J)return V},useSetter:function(){_e=!0},useSimple:function(){_e=!1}}),p(p.S+p.F*!ve,"Object",{create:Fe,defineProperty:Le,defineProperties:ke,getOwnPropertyDescriptor:ce,getOwnPropertyNames:Ie,getOwnPropertySymbols:Ne}),ee&&p(p.S+p.F*(!ve||a(function(){var J=B();return F([J])!="[null]"||F({a:J})!="{}"||F(Object(J))!="{}"})),"JSON",{stringify:function(J){for(var V,Y,me=[J],Ae=1;arguments.length>Ae;)me.push(arguments[Ae++]);if(Y=V=me[1],(y(V)||J!==void 0)&&!je(J))return v(V)||(V=function(at,Re){if(typeof Y=="function"&&(Re=Y.call(this,at,Re)),!je(Re))return Re}),me[1]=V,F.apply(ee,me)}}),B.prototype[X]||S("./_hide")(B.prototype,X,B.prototype.valueOf),s(B,"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(S,P,E){"use strict";var C=S("./_export"),w=S("./_core"),u=S("./_global"),p=S("./_species-constructor"),f=S("./_promise-resolve");C(C.P+C.R,"Promise",{finally:function(o){var a=p(this,w.Promise||u.Promise),c=typeof o=="function";return this.then(c?function(s){return f(a,o()).then(function(){return s})}:o,c?function(s){return f(a,o()).then(function(){throw s})}:o)}})},{"./_core":65,"./_export":73,"./_global":76,"./_promise-resolve":110,"./_species-constructor":118}],148:[function(S,P,E){"use strict";var C=S("./_export"),w=S("./_new-promise-capability"),u=S("./_perform");C(C.S,"Promise",{try:function(p){var f=w.f(this),o=u(p);return(o.e?f.reject:f.resolve)(o.v),f.promise}})},{"./_export":73,"./_new-promise-capability":95,"./_perform":109}],149:[function(S,P,E){S("./_wks-define")("asyncIterator")},{"./_wks-define":129}],150:[function(S,P,E){S("./_wks-define")("observable")},{"./_wks-define":129}],151:[function(S,P,E){S("./es6.array.iterator");for(var C=S("./_global"),w=S("./_hide"),u=S("./_iterators"),p=S("./_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(","),o=0;o<f.length;o++){var a=f[o],c=C[a],s=c&&c.prototype;s&&!s[p]&&w(s,p,a),u[a]=u.Array}},{"./_global":76,"./_hide":78,"./_iterators":91,"./_wks":131,"./es6.array.iterator":134}],152:[function(S,P,E){var C=S("./_export"),w=S("./_task");C(C.G+C.B,{setImmediate:w.set,clearImmediate:w.clear})},{"./_export":73,"./_task":120}],153:[function(S,P,E){(function(C){"use strict";function w(m){return Array.isArray?Array.isArray(m):b(m)==="[object Array]"}function u(m){return typeof m=="boolean"}function p(m){return m===null}function f(m){return m==null}function o(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 d(m){return b(m)==="[object RegExp]"}function i(m){return(m===void 0?"undefined":(0,_.default)(m))==="object"&&m!==null}function t(m){return b(m)==="[object Date]"}function n(m){return b(m)==="[object Error]"||m instanceof Error}function h(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=S("babel-runtime/helpers/typeof"),_=function(m){return m&&m.__esModule?m:{default:m}}(y);E.isArray=w,E.isBoolean=u,E.isNull=p,E.isNullOrUndefined=f,E.isNumber=o,E.isString=a,E.isSymbol=c,E.isUndefined=s,E.isRegExp=d,E.isObject=i,E.isDate=t,E.isError=n,E.isFunction=h,E.isPrimitive=v,E.isBuffer=C.isBuffer}).call(this,{isBuffer:S("../../is-buffer/index.js")})},{"../../is-buffer/index.js":163,"babel-runtime/helpers/typeof":32}],154:[function(S,P,E){"use strict";var C=S("babel-runtime/helpers/typeof"),w=function(u){return u&&u.__esModule?u:{default:u}}(C);!function(u){function p(s,d){for(s=String(s),d=d||2;s.length<d;)s="0"+s;return s}function f(s){var d=new Date(s.getFullYear(),s.getMonth(),s.getDate());d.setDate(d.getDate()-(d.getDay()+6)%7+3);var i=new Date(d.getFullYear(),0,4);i.setDate(i.getDate()-(i.getDay()+6)%7+3);var t=d.getTimezoneOffset()-i.getTimezoneOffset();d.setHours(d.getHours()-t);var n=(d-i)/6048e5;return 1+Math.floor(n)}function o(s){var d=s.getDay();return d===0&&(d=7),d}function a(s){return s===null?"null":s===void 0?"undefined":(s===void 0?"undefined":(0,w.default)(s))!=="object"?s===void 0?"undefined":(0,w.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,d=/\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(t,n,h,v){if(arguments.length!==1||a(t)!=="string"||/\d/.test(t)||(n=t,t=void 0),t=t||new Date,t instanceof Date||(t=new Date(t)),isNaN(t))throw TypeError("Invalid date");n=String(c.masks[n]||n||c.masks.default);var b=n.slice(0,4);b!=="UTC:"&&b!=="GMT:"||(n=n.slice(4),h=!0,b==="GMT:"&&(v=!0));var y=h?"getUTC":"get",_=t[y+"Date"](),m=t[y+"Day"](),g=t[y+"Month"](),x=t[y+"FullYear"](),l=t[y+"Hours"](),T=t[y+"Minutes"](),A=t[y+"Seconds"](),O=t[y+"Milliseconds"](),D=h?0:t.getTimezoneOffset(),I=f(t),j=o(t),B={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(x).slice(2),yyyy:x,h:l%12||12,hh:p(l%12||12),H:l,HH:p(l),M:T,MM:p(T),s:A,ss:p(A),l:p(O,3),L:p(Math.round(O/10)),t:l<12?"a":"p",tt:l<12?"am":"pm",T:l<12?"A":"P",TT:l<12?"AM":"PM",Z:v?"GMT":h?"UTC":(String(t).match(d)||[""]).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:j};return n.replace(s,function(ee){return ee in B?B[ee]:ee.slice(1,ee.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}):(E===void 0?"undefined":(0,w.default)(E))==="object"?P.exports=c:u.dateFormat=c}(void 0)},{"babel-runtime/helpers/typeof":32}],155:[function(S,P,E){(function(C){function w(){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 u(a){var c=this.useColors;if(a[0]=(c?"%c":"")+this.namespace+(c?" %c":" ")+a[0]+(c?"%c ":" ")+"+"+E.humanize(this.diff),c){var s="color: "+this.color;a.splice(1,0,s,"color: inherit");var d=0,i=0;a[0].replace(/%[a-zA-Z%]/g,function(t){t!=="%%"&&(d++,t==="%c"&&(i=d))}),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?E.storage.removeItem("debug"):E.storage.debug=a}catch(c){}}function o(){var a;try{a=E.storage.debug}catch(c){}return!a&&C!==void 0&&"env"in C&&(a=C.env.DEBUG),a}E=P.exports=S("./debug"),E.log=p,E.formatArgs=u,E.save=f,E.load=o,E.useColors=w,E.storage=typeof chrome!="undefined"&&chrome.storage!==void 0?chrome.storage.local:function(){try{return window.localStorage}catch(a){}}(),E.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],E.formatters.j=function(a){try{return JSON.stringify(a)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}},E.enable(o())}).call(this,S("_process"))},{"./debug":156,_process:173}],156:[function(S,P,E){function C(c){var s,d=0;for(s in c)d=(d<<5)-d+c.charCodeAt(s),d|=0;return E.colors[Math.abs(d)%E.colors.length]}function w(c){function s(){if(s.enabled){var d=s,i=+new Date,t=i-(a||i);d.diff=t,d.prev=a,d.curr=i,a=i;for(var n=new Array(arguments.length),h=0;h<n.length;h++)n[h]=arguments[h];n[0]=E.coerce(n[0]),typeof n[0]!="string"&&n.unshift("%O");var v=0;n[0]=n[0].replace(/%([a-zA-Z%])/g,function(b,y){if(b==="%%")return b;v++;var _=E.formatters[y];if(typeof _=="function"){var m=n[v];b=_.call(d,m),n.splice(v,1),v--}return b}),E.formatArgs.call(d,n),(s.log||E.log||console.log.bind(console)).apply(d,n)}}return s.namespace=c,s.enabled=E.enabled(c),s.useColors=E.useColors(),s.color=C(c),typeof E.init=="function"&&E.init(s),s}function u(c){E.save(c),E.names=[],E.skips=[];for(var s=(typeof c=="string"?c:"").split(/[\s,]+/),d=s.length,i=0;i<d;i++)s[i]&&(c=s[i].replace(/\*/g,".*?"),c[0]==="-"?E.skips.push(new RegExp("^"+c.substr(1)+"$")):E.names.push(new RegExp("^"+c+"$")))}function p(){E.enable("")}function f(c){var s,d;for(s=0,d=E.skips.length;s<d;s++)if(E.skips[s].test(c))return!1;for(s=0,d=E.names.length;s<d;s++)if(E.names[s].test(c))return!0;return!1}function o(c){return c instanceof Error?c.stack||c.message:c}E=P.exports=w.debug=w.default=w,E.coerce=o,E.disable=p,E.enable=u,E.enabled=f,E.humanize=S("ms"),E.names=[],E.skips=[],E.formatters={};var a},{ms:169}],157:[function(S,P,E){"use strict";function C(u){var p=""+u,f=w.exec(p);if(!f)return p;var o,a="",c=0,s=0;for(c=f.index;c<p.length;c++){switch(p.charCodeAt(c)){case 34:o=""";break;case 38:o="&";break;case 39:o="'";break;case 60:o="<";break;case 62:o=">";break;default:continue}s!==c&&(a+=p.substring(s,c)),s=c+1,a+=o}return s!==c?a+p.substring(s,c):a}var w=/["'&<>]/;P.exports=C},{}],158:[function(S,P,E){function C(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function w(o){return typeof o=="function"}function u(o){return typeof o=="number"}function p(o){return typeof o=="object"&&o!==null}function f(o){return o===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(o){if(!u(o)||o<0||isNaN(o))throw TypeError("n must be a positive number");return this._maxListeners=o,this},C.prototype.emit=function(o){var a,c,s,d,i,t;if(this._events||(this._events={}),o==="error"&&(!this._events.error||p(this._events.error)&&!this._events.error.length)){if((a=arguments[1])instanceof Error)throw a;var n=new Error('Uncaught, unspecified "error" event. ('+a+")");throw n.context=a,n}if(c=this._events[o],f(c))return!1;if(w(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:d=Array.prototype.slice.call(arguments,1),c.apply(this,d)}else if(p(c))for(d=Array.prototype.slice.call(arguments,1),t=c.slice(),s=t.length,i=0;i<s;i++)t[i].apply(this,d);return!0},C.prototype.addListener=function(o,a){var c;if(!w(a))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",o,w(a.listener)?a.listener:a),this._events[o]?p(this._events[o])?this._events[o].push(a):this._events[o]=[this._events[o],a]:this._events[o]=a,p(this._events[o])&&!this._events[o].warned&&(c=f(this._maxListeners)?C.defaultMaxListeners:this._maxListeners)&&c>0&&this._events[o].length>c&&(this._events[o].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[o].length),typeof console.trace=="function"&&console.trace()),this},C.prototype.on=C.prototype.addListener,C.prototype.once=function(o,a){function c(){this.removeListener(o,c),s||(s=!0,a.apply(this,arguments))}if(!w(a))throw TypeError("listener must be a function");var s=!1;return c.listener=a,this.on(o,c),this},C.prototype.removeListener=function(o,a){var c,s,d,i;if(!w(a))throw TypeError("listener must be a function");if(!this._events||!this._events[o])return this;if(c=this._events[o],d=c.length,s=-1,c===a||w(c.listener)&&c.listener===a)delete this._events[o],this._events.removeListener&&this.emit("removeListener",o,a);else if(p(c)){for(i=d;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[o]):c.splice(s,1),this._events.removeListener&&this.emit("removeListener",o,a)}return this},C.prototype.removeAllListeners=function(o){var a,c;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[o]&&delete this._events[o],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[o],w(c))this.removeListener(o,c);else if(c)for(;c.length;)this.removeListener(o,c[c.length-1]);return delete this._events[o],this},C.prototype.listeners=function(o){return this._events&&this._events[o]?w(this._events[o])?[this._events[o]]:this._events[o].slice():[]},C.prototype.listenerCount=function(o){if(this._events){var a=this._events[o];if(w(a))return 1;if(a)return a.length}return 0},C.listenerCount=function(o,a){return o.listenerCount(a)}},{}],159:[function(S,P,E){var C=S("http"),w=P.exports;for(var u in C)C.hasOwnProperty(u)&&(w[u]=C[u]);w.request=function(p,f){return p||(p={}),p.scheme="https",p.protocol="https:",C.request.call(this,p,f)}},{http:196}],160:[function(S,P,E){"use strict";var C=S("util"),w=S("ms");P.exports=function(u){if(typeof u=="number")return u;var p=w(u);if(p===void 0){var f=new Error(C.format("humanize-ms(%j) result undefined",u));console.warn(f.stack)}return p}},{ms:169,util:207}],161:[function(S,P,E){E.read=function(C,w,u,p,f){var o,a,c=8*f-p-1,s=(1<<c)-1,d=s>>1,i=-7,t=u?f-1:0,n=u?-1:1,h=C[w+t];for(t+=n,o=h&(1<<-i)-1,h>>=-i,i+=c;i>0;o=256*o+C[w+t],t+=n,i-=8);for(a=o&(1<<-i)-1,o>>=-i,i+=p;i>0;a=256*a+C[w+t],t+=n,i-=8);if(o===0)o=1-d;else{if(o===s)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,p),o-=d}return(h?-1:1)*a*Math.pow(2,o-p)},E.write=function(C,w,u,p,f,o){var a,c,s,d=8*o-f-1,i=(1<<d)-1,t=i>>1,n=f===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=p?0:o-1,v=p?1:-1,b=w<0||w===0&&1/w<0?1:0;for(w=Math.abs(w),isNaN(w)||w===1/0?(c=isNaN(w)?1:0,a=i):(a=Math.floor(Math.log(w)/Math.LN2),w*(s=Math.pow(2,-a))<1&&(a--,s*=2),w+=a+t>=1?n/s:n*Math.pow(2,1-t),w*s>=2&&(a++,s/=2),a+t>=i?(c=0,a=i):a+t>=1?(c=(w*s-1)*Math.pow(2,f),a+=t):(c=w*Math.pow(2,t-1)*Math.pow(2,f),a=0));f>=8;C[u+h]=255&c,h+=v,c/=256,f-=8);for(a=a<<f|c,d+=f;d>0;C[u+h]=255&a,h+=v,a/=256,d-=8);C[u+h-v]|=128*b}},{}],162:[function(S,P,E){typeof Object.create=="function"?P.exports=function(C,w){C.super_=w,C.prototype=Object.create(w.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}})}:P.exports=function(C,w){C.super_=w;var u=function(){};u.prototype=w.prototype,C.prototype=new u,C.prototype.constructor=C}},{}],163:[function(S,P,E){function C(u){return!!u.constructor&&typeof u.constructor.isBuffer=="function"&&u.constructor.isBuffer(u)}function w(u){return typeof u.readFloatLE=="function"&&typeof u.slice=="function"&&C(u.slice(0,0))}P.exports=function(u){return u!=null&&(C(u)||w(u)||!!u._isBuffer)}},{}],164:[function(S,P,E){!function(C){function w(f){return p.call(f).replace(/^[^{]*{\s*/,"").replace(/\s*}[^}]*$/,"")}function u(f){return typeof f=="function"&&(/^class(\s|\{\}$)/.test(p.call(f))||/^.*classCallCheck\(/.test(w(f)))}var p=Function.prototype.toString;E!==void 0?(P!==void 0&&P.exports&&(E=P.exports=u),E.isClass=u):typeof U=="function"&&U.amd?U([],function(){return u}):C.isClass=u}(this)},{}],165:[function(S,P,E){"use strict";function C(o){var a=o.slice(2);return a=a[0].toLowerCase()+a.slice(1)}var w=S("core-util-is"),u=S("isstream"),p=S("is-class");Object.keys(w).map(function(o){E[C(o)]=w[o]}),E.stream=u,E.readableStream=u.isReadable,E.writableStream=u.isWritable,E.duplexStream=u.isDuplex,E.class=p,E.finite=function(o){return Number.isFinite(o)},E.NaN=function(o){return Number.isNaN(o)},E.generator=function(o){return o&&typeof o.next=="function"&&typeof o.throw=="function"},E.generatorFunction=function(o){return o&&o.constructor&&o.constructor.name==="GeneratorFunction"},E.asyncFunction=function(o){return o&&o.constructor&&o.constructor.name==="AsyncFunction"},E.promise=function(o){return o&&typeof o.then=="function"};var f=Math.pow(2,31);E.int=function(o){return w.isNumber(o)&&o%1==0},E.int32=function(o){return E.int(o)&&o<f&&o>=-f},E.long=function(o){return E.int(o)&&(o>=f||o<-f)},E.Long=function(o){return E.object(o)&&E.number(o.high)&&E.number(o.low)},E.double=function(o){return w.isNumber(o)&&!isNaN(o)&&o%1!=0},E.date=function(o){return o instanceof Date},E.regExp=function(o){return o instanceof RegExp},E.regexp=E.regExp,E.error=function(o){return o instanceof Error},E.array=function(o){return Array.isArray(o)}},{"core-util-is":153,"is-class":164,isstream:167}],166:[function(S,P,E){var C={}.toString;P.exports=Array.isArray||function(w){return C.call(w)=="[object Array]"}},{}],167:[function(S,P,E){function C(o){return o instanceof f.Stream}function w(o){return C(o)&&typeof o._read=="function"&&typeof o._readableState=="object"}function u(o){return C(o)&&typeof o._write=="function"&&typeof o._writableState=="object"}function p(o){return w(o)&&u(o)}var f=S("stream");P.exports=C,P.exports.isReadable=w,P.exports.isWritable=u,P.exports.isDuplex=p},{stream:195}],168:[function(S,P,E){"use strict";function C(u,p,f){if(!u)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(o){if(f||!w.call(u,o)){var a=Object.getOwnPropertyDescriptor(p,o);Object.defineProperty(u,o,a)}}),u}P.exports=C;var w=Object.prototype.hasOwnProperty},{}],169:[function(S,P,E){function C(d){if(d=String(d),!(d.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(d);if(i){var t=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return t*s;case"days":case"day":case"d":return t*c;case"hours":case"hour":case"hrs":case"hr":case"h":return t*a;case"minutes":case"minute":case"mins":case"min":case"m":return t*o;case"seconds":case"second":case"secs":case"sec":case"s":return t*f;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function w(d){return d>=c?Math.round(d/c)+"d":d>=a?Math.round(d/a)+"h":d>=o?Math.round(d/o)+"m":d>=f?Math.round(d/f)+"s":d+"ms"}function u(d){return p(d,c,"day")||p(d,a,"hour")||p(d,o,"minute")||p(d,f,"second")||d+" ms"}function p(d,i,t){if(!(d<i))return d<1.5*i?Math.floor(d/i)+" "+t:Math.ceil(d/i)+" "+t+"s"}var f=1e3,o=60*f,a=60*o,c=24*a,s=365.25*c;P.exports=function(d,i){i=i||{};var t=typeof d;if(t==="string"&&d.length>0)return C(d);if(t==="number"&&isNaN(d)===!1)return i.long?u(d):w(d);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(d))}},{}],170:[function(S,P,E){(function(C){function w(o,a){for(var c=0,s=o.length-1;s>=0;s--){var d=o[s];d==="."?o.splice(s,1):d===".."?(o.splice(s,1),c++):c&&(o.splice(s,1),c--)}if(a)for(;c--;c)o.unshift("..");return o}function u(o){typeof o!="string"&&(o+="");var a,c=0,s=-1,d=!0;for(a=o.length-1;a>=0;--a)if(o.charCodeAt(a)===47){if(!d){c=a+1;break}}else s===-1&&(d=!1,s=a+1);return s===-1?"":o.slice(c,s)}function p(o,a){if(o.filter)return o.filter(a);for(var c=[],s=0;s<o.length;s++)a(o[s],s,o)&&c.push(o[s]);return c}E.resolve=function(){for(var o="",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&&(o=s+"/"+o,a=s.charAt(0)==="/")}return o=w(p(o.split("/"),function(d){return!!d}),!a).join("/"),(a?"/":"")+o||"."},E.normalize=function(o){var a=E.isAbsolute(o),c=f(o,-1)==="/";return o=w(p(o.split("/"),function(s){return!!s}),!a).join("/"),o||a||(o="."),o&&c&&(o+="/"),(a?"/":"")+o},E.isAbsolute=function(o){return o.charAt(0)==="/"},E.join=function(){var o=Array.prototype.slice.call(arguments,0);return E.normalize(p(o,function(a,c){if(typeof a!="string")throw new TypeError("Arguments to path.join must be strings");return a}).join("/"))},E.relative=function(o,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)}o=E.resolve(o).substr(1),a=E.resolve(a).substr(1);for(var s=c(o.split("/")),d=c(a.split("/")),i=Math.min(s.length,d.length),t=i,n=0;n<i;n++)if(s[n]!==d[n]){t=n;break}for(var h=[],n=t;n<s.length;n++)h.push("..");return h=h.concat(d.slice(t)),h.join("/")},E.sep="/",E.delimiter=":",E.dirname=function(o){if(typeof o!="string"&&(o+=""),o.length===0)return".";for(var a=o.charCodeAt(0),c=a===47,s=-1,d=!0,i=o.length-1;i>=1;--i)if((a=o.charCodeAt(i))===47){if(!d){s=i;break}}else d=!1;return s===-1?c?"/":".":c&&s===1?"/":o.slice(0,s)},E.basename=function(o,a){var c=u(o);return a&&c.substr(-1*a.length)===a&&(c=c.substr(0,c.length-a.length)),c},E.extname=function(o){typeof o!="string"&&(o+="");for(var a=-1,c=0,s=-1,d=!0,i=0,t=o.length-1;t>=0;--t){var n=o.charCodeAt(t);if(n!==47)s===-1&&(d=!1,s=t+1),n===46?a===-1?a=t:i!==1&&(i=1):a!==-1&&(i=-1);else if(!d){c=t+1;break}}return a===-1||s===-1||i===0||i===1&&a===s-1&&a===c+1?"":o.slice(a,s)};var f="ab".substr(-1)==="b"?function(o,a,c){return o.substr(a,c)}:function(o,a,c){return a<0&&(a=o.length+a),o.substr(a,c)}}).call(this,S("_process"))},{_process:173}],171:[function(S,P,E){(function(C){(function(){"use strict";function w(A){return A=String(A),A.charAt(0).toUpperCase()+A.slice(1)}function u(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 o(A,O)}function f(A){return A=i(A),/^(?:webOS|i(?:OS|P))/.test(A)?A:w(A)}function o(A,O){for(var D in A)x.call(A,D)&&O(A[D],D,A)}function a(A){return A==null?w(A):l.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 d(A,O){var D=null;return p(A,function(I,j){D=O(D,I,j,A)}),D}function i(A){return String(A).replace(/^ +| +$/g,"")}function t(A){function O(J){return d(J,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=h,j=A&&typeof A=="object"&&a(A)!="String";j&&(I=A,A=null);var B=I.navigator||{},ee=B.userAgent||"";A||(A=ee);var F,G,X=j?!!B.likeChrome:/\bChrome\b/.test(A)&&!/internal|\n/i.test(l.toString()),Z=j?"Object":"ScriptBridgingProxyObject",K=j?"Object":"Environment",q=j&&I.java?"JavaPackage":a(I.java),ae=j?"Object":"RuntimeObject",oe=/\bJava/.test(q)&&I.java,ve=oe&&a(I.environment)==K,he=oe?"a":"\u4F2A",_e=oe?"b":"\u5C3E",fe=I.document||{},xe=I.operamini||I.opera,je=m.test(je=j&&xe?xe["[[Class]]"]:a(xe))?je:xe=null,Le=A,ke=[],Fe=null,ge=A==ee,ce=ge&&xe&&typeof xe.version=="function"&&xe.version(),Ie=function(J){return d(J,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(J){return d(J,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"]),te=function(J){return d(J,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(J){return d(J,function(V,Y){var me=Y.pattern||s(Y);return!V&&(V=RegExp("\\b"+me+"(?:/[\\d.]+|[ \\w.]*)","i").exec(A))&&(V=u(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]),te&&!Xe&&(Xe=O([te])),(F=/\bGoogle TV\b/.exec(Xe))&&(Xe=F[0]),/\bSimulator\b/i.test(A)&&(Xe=(Xe?Xe+" ":"")+"Simulator"),Ne=="Opera Mini"&&/\bOPiOS\b/.test(A)&&ke.push("running in Turbo/Uncompressed mode"),Ne=="IE"&&/\blike iPhone OS\b/.test(A)?(F=t(A.replace(/like iPhone OS/,"")),te=F.manufacturer,Xe=F.product):/^iP/.test(Xe)?(Ne||(Ne="Safari"),k="iOS"+((F=/ OS ([\d_]+)/i.exec(A))?" "+F[1].replace(/_/g,"."):"")):Ne!="Konqueror"||/buntu/i.test(k)?te&&te!="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",ke.unshift("desktop mode")),/Accelerated *= *true/i.test(A)&&ke.unshift("accelerated")):Ne=="PaleMoon"&&(F=/\bFirefox\/([\d.]+)\b/.exec(A))?ke.push("identifying as Firefox "+F[1]):Ne=="Firefox"&&(F=/\b(Mobile|Tablet|TV)\b/i.exec(A))?(k||(k="Firefox OS"),Xe||(Xe=F[1])):!Ne||(F=!/\bMinefield\b/i.test(A)&&/\b(?:Firefox|Safari)\b/.exec(Ne))?(Ne&&!Xe&&/[\/,]|^[^(]+?\)/.test(A.slice(A.indexOf(F+"/")+8))&&(Ne=null),(F=Xe||te||k)&&(Xe||te||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(k))&&(Ne=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(k)?k:F)+" Browser")):Ne=="Electron"&&(F=(/\bChrome\/([\d.]+)\b/.exec(A)||0)[1])&&ke.push("Chromium "+F):k="Kubuntu",ce||(ce=function(J){return d(J,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)"])),(F=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=[F]),Ne=="IE"&&(F=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(A)||0)[1])?(Ne+=" Mobile",k="Windows Phone "+(/\+$/.test(F)?F:F+".x"),ke.unshift("desktop mode")):/\bWPDesktop\b/i.test(A)?(Ne="IE Mobile",k="Windows Phone 8.x",ke.unshift("desktop mode"),ce||(ce=(/\brv:([\d.]+)/.exec(A)||0)[1])):Ne!="IE"&&Ie=="Trident"&&(F=/\brv:([\d.]+)/.exec(A))&&(Ne&&ke.push("identifying as "+Ne+(ce?" "+ce:"")),Ne="IE",ce=F[1]),ge){if(c(I,"global"))if(oe&&(F=oe.lang.System,Le=F.getProperty("os.arch"),k=k||F.getProperty("os.name")+" "+F.getProperty("os.version")),ve){try{ce=I.require("ringo/engine").version.join("."),Ne="RingoJS"}catch(J){(F=I.system)&&F.global.system==I.system&&(Ne="Narwhal",k||(k=F[0].os||null))}Ne||(Ne="Rhino")}else typeof I.process=="object"&&!I.process.browser&&(F=I.process)&&(typeof F.versions=="object"&&(typeof F.versions.electron=="string"?(ke.push("Node "+F.versions.node),Ne="Electron",ce=F.versions.electron):typeof F.versions.nw=="string"&&(ke.push("Chromium "+ce,"Node "+F.versions.node),Ne="NW.js",ce=F.versions.nw)),Ne||(Ne="Node.js",Le=F.arch,k=F.platform,ce=/[\d.]+/.exec(F.version),ce=ce?ce[0]:null));else a(F=I.runtime)==Z?(Ne="Adobe AIR",k=F.flash.system.Capabilities.os):a(F=I.phantom)==ae?(Ne="PhantomJS",ce=(F=F.version||null)&&F.major+"."+F.minor+"."+F.patch):typeof fe.documentMode=="number"&&(F=/\bTrident\/(\d+)/i.exec(A))?(ce=[ce,fe.documentMode],(F=+F[1]+4)!=ce[1]&&(ke.push("IE "+ce[1]+" mode"),Ie&&(Ie[1]=""),ce[1]=F),ce=Ne=="IE"?String(ce[1].toFixed(1)):ce[0]):typeof fe.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(Ne)&&(ke.push("masking as "+Ne+" "+ce),Ne="IE",ce="11.0",Ie=["Trident"],k="Windows");k=k&&f(k)}if(ce&&(F=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(ce)||/(?:alpha|beta)(?: ?\d)?/i.exec(A+";"+(ge&&B.appMinorVersion))||/\bMinefield\b/i.test(A)&&"a")&&(Fe=/b/i.test(F)?"beta":"alpha",ce=ce.replace(RegExp(F+"\\+?$"),"")+(Fe=="beta"?_e:he)+(/\d+\+?/.exec(F)||"")),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)&&ke.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"&&ge)try{I.external===null&&ke.unshift("platform preview")}catch(J){ke.unshift("embedded")}else(/\bBlackBerry\b/.test(Xe)||/\bBB10\b/.test(A))&&(F=(RegExp(Xe.replace(/ +/g," *")+"/([.\\d]+)","i").exec(A)||0)[1]||ce)?(F=[F,/BB10/.test(A)],k=(F[1]?(Xe=null,te="BlackBerry"):"Device Software")+" "+F[0],ce=null):this!=o&&Xe!="Wii"&&(ge&&xe||/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(F=t.call(o,A.replace(m,"")+";"))&&F.name&&(F="ing as "+F.name+((F=F.version)?" "+F:""),m.test(Ne)?(/\bIE\b/.test(F)&&k=="Mac OS"&&(k=null),F="identify"+F):(F="mask"+F,Ne=je?f(je.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(F)&&(k=null),ge||(ce=null)),Ie=["Presto"],ke.push(F));else Ne+=" Mobile";(F=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(A)||0)[1])&&(F=[parseFloat(F.replace(/\.(\d)$/,".0$1")),F],Ne=="Safari"&&F[1].slice(-1)=="+"?(Ne="WebKit Nightly",Fe="alpha",ce=F[1].slice(0,-1)):ce!=F[1]&&ce!=(F[2]=(/\bSafari\/([\d.]+\+?)/i.exec(A)||0)[1])||(ce=null),F[1]=(/\bChrome\/([\d.]+)/i.exec(A)||0)[1],F[0]==537.36&&F[2]==537.36&&parseFloat(F[1])>=28&&Ie=="WebKit"&&(Ie=["Blink"]),ge&&(X||F[1])?(Ie&&(Ie[1]="like Chrome"),F=F[1]||(F=F[0],F<530?1:F<532?2:F<532.05?3:F<533?4:F<534.03?5:F<534.07?6:F<534.1?7:F<534.13?8:F<534.16?9:F<534.24?10:F<534.3?11:F<535.01?12:F<535.02?"13+":F<535.07?15:F<535.11?16:F<535.19?17:F<536.05?18:F<536.1?19:F<537.01?20:F<537.11?"21+":F<537.13?23:F<537.18?24:F<537.24?25:F<537.36?26:Ie!="Blink"?"27":"28")):(Ie&&(Ie[1]="like Safari"),F=F[0],F=F<400?1:F<500?2:F<526?3:F<533?4:F<534?"4+":F<535?5:F<537?6:F<538?7:F<601?8:"8"),Ie&&(Ie[1]+=" "+(F+=typeof F=="number"?".x":/[.+]/.test(F)?"":"+")),Ne=="Safari"&&(!ce||parseInt(ce)>45)&&(ce=F)),Ne=="Opera"&&(F=/\bzbov|zvav$/.exec(k))?(Ne+=" ",ke.unshift("desktop mode"),F=="zvav"?(Ne+="Mini",ce=null):Ne+="Mobile",k=k.replace(RegExp(" *"+F+"$"),"")):Ne=="Safari"&&/\bChrome\b/.exec(Ie&&Ie[1])&&(ke.unshift("desktop mode"),Ne="Chrome Mobile",ce=null,/\bOS X\b/.test(k)?(te="Apple",k="iOS 4.3+"):k=null),ce&&ce.indexOf(F=/[\d.]+$/.exec(k))==0&&A.indexOf("/"+F+"-")>-1&&(k=i(k.replace(F,""))),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])&&(F=Ie[Ie.length-1])&&ke.push(F),ke.length&&(ke=["("+ke.join("; ")+")"]),te&&Xe&&Xe.indexOf(te)<0&&ke.push("on "+te),Xe&&ke.push((/^on /.test(ke[ke.length-1])?"":"on ")+Xe),k&&(F=/ ([\d.+]+)$/.exec(k),G=F&&k.charAt(k.length-F[0].length-1)=="/",k={architecture:32,family:F&&!G?k.replace(F[0],""):k,version:F?F[1]:null,toString:function(){var J=this.version;return this.family+(J&&!G?" "+J:"")+(this.architecture==64?" 64-bit":"")}}),(F=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Le))&&!/\bi686\b/i.test(Le)?(k&&(k.architecture=64,k.family=k.family.replace(RegExp(" *"+F),"")),Ne&&(/\bWOW64\b/i.test(A)||ge&&/\w(?:86|32)$/.test(B.cpuClass||B.platform)&&!/\bWin64; x64\b/i.test(A))&&ke.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=te,N.name=Ne,N.prerelease=Fe,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=t,N.toString=D,N.version&&ke.unshift(ce),N.name&&ke.unshift(Ne),k&&Ne&&(k!=String(k).split(" ")[0]||k!=Ne.split(" ")[0]&&!Xe)&&ke.push(Xe?"("+k+")":"on "+k),ke.length&&(N.description=ke.join(" ")),N}var n={function:!0,object:!0},h=n[typeof window]&&window||this,v=n[typeof E]&&E,b=n[typeof P]&&P&&!P.nodeType&&P,y=v&&b&&typeof C=="object"&&C;!y||y.global!==y&&y.window!==y&&y.self!==y||(h=y);var _=Math.pow(2,53)-1,m=/\bOpera/,g=Object.prototype,x=g.hasOwnProperty,l=g.toString,T=t();typeof U=="function"&&typeof U.amd=="object"&&U.amd?(h.platform=T,U(function(){return T})):v&&b?o(T,function(A,O){v[O]=A}):h.platform=T}).call(this)}).call(this,typeof re!="undefined"?re:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],172:[function(S,P,E){(function(C){"use strict";function w(u,p,f,o){if(typeof u!="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(u);case 2:return C.nextTick(function(){u.call(null,p)});case 3:return C.nextTick(function(){u.call(null,p,f)});case 4:return C.nextTick(function(){u.call(null,p,f,o)});default:for(a=new Array(s-1),c=0;c<a.length;)a[c++]=arguments[c];return C.nextTick(function(){u.apply(null,a)})}}!C.version||C.version.indexOf("v0.")===0||C.version.indexOf("v1.")===0&&C.version.indexOf("v1.8.")!==0?P.exports={nextTick:w}:P.exports=C}).call(this,S("_process"))},{_process:173}],173:[function(S,P,E){function C(){throw new Error("setTimeout has not been defined")}function w(){throw new Error("clearTimeout has not been defined")}function u(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(d===clearTimeout)return clearTimeout(b);if((d===w||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(b);try{return d(b)}catch(y){try{return d.call(null,b)}catch(_){return d.call(this,b)}}}function f(){h&&t&&(h=!1,t.length?n=t.concat(n):v=-1,n.length&&o())}function o(){if(!h){var b=u(f);h=!0;for(var y=n.length;y;){for(t=n,n=[];++v<y;)t&&t[v].run();v=-1,y=n.length}t=null,h=!1,p(b)}}function a(b,y){this.fun=b,this.array=y}function c(){}var s,d,i=P.exports={};!function(){try{s=typeof setTimeout=="function"?setTimeout:C}catch(b){s=C}try{d=typeof clearTimeout=="function"?clearTimeout:w}catch(b){d=w}}();var t,n=[],h=!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[_];n.push(new a(b,y)),n.length!==1||h||u(o)},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(S,P,E){(function(C){!function(w){function u(q){throw new RangeError(G[q])}function p(q,ae){for(var oe=q.length,ve=[];oe--;)ve[oe]=ae(q[oe]);return ve}function f(q,ae){var oe=q.split("@"),ve="";return oe.length>1&&(ve=oe[0]+"@",q=oe[1]),q=q.replace(F,"."),ve+p(q.split("."),ae).join(".")}function o(q){for(var ae,oe,ve=[],he=0,_e=q.length;he<_e;)ae=q.charCodeAt(he++),ae>=55296&&ae<=56319&&he<_e?(oe=q.charCodeAt(he++),(64512&oe)==56320?ve.push(((1023&ae)<<10)+(1023&oe)+65536):(ve.push(ae),he--)):ve.push(ae);return ve}function a(q){return p(q,function(ae){var oe="";return ae>65535&&(ae-=65536,oe+=K(ae>>>10&1023|55296),ae=56320|1023&ae),oe+=K(ae)}).join("")}function c(q){return q-48<10?q-22:q-65<26?q-65:q-97<26?q-97:x}function s(q,ae){return q+22+75*(q<26)-((ae!=0)<<5)}function d(q,ae,oe){var ve=0;for(q=oe?Z(q/O):q>>1,q+=Z(q/ae);q>X*T>>1;ve+=x)q=Z(q/X);return Z(ve+(X+1)*q/(q+A))}function i(q){var ae,oe,ve,he,_e,fe,xe,je,Le,ke,Fe=[],ge=q.length,ce=0,Ie=I,Ne=D;for(oe=q.lastIndexOf(j),oe<0&&(oe=0),ve=0;ve<oe;++ve)q.charCodeAt(ve)>=128&&u("not-basic"),Fe.push(q.charCodeAt(ve));for(he=oe>0?oe+1:0;he<ge;){for(_e=ce,fe=1,xe=x;he>=ge&&u("invalid-input"),je=c(q.charCodeAt(he++)),(je>=x||je>Z((g-ce)/fe))&&u("overflow"),ce+=je*fe,Le=xe<=Ne?l:xe>=Ne+T?T:xe-Ne,!(je<Le);xe+=x)ke=x-Le,fe>Z(g/ke)&&u("overflow"),fe*=ke;ae=Fe.length+1,Ne=d(ce-_e,ae,_e==0),Z(ce/ae)>g-Ie&&u("overflow"),Ie+=Z(ce/ae),ce%=ae,Fe.splice(ce++,0,Ie)}return a(Fe)}function t(q){var ae,oe,ve,he,_e,fe,xe,je,Le,ke,Fe,ge,ce,Ie,Ne,Xe=[];for(q=o(q),ge=q.length,ae=I,oe=0,_e=D,fe=0;fe<ge;++fe)(Fe=q[fe])<128&&Xe.push(K(Fe));for(ve=he=Xe.length,he&&Xe.push(j);ve<ge;){for(xe=g,fe=0;fe<ge;++fe)(Fe=q[fe])>=ae&&Fe<xe&&(xe=Fe);for(ce=ve+1,xe-ae>Z((g-oe)/ce)&&u("overflow"),oe+=(xe-ae)*ce,ae=xe,fe=0;fe<ge;++fe)if(Fe=q[fe],Fe<ae&&++oe>g&&u("overflow"),Fe==ae){for(je=oe,Le=x;ke=Le<=_e?l:Le>=_e+T?T:Le-_e,!(je<ke);Le+=x)Ne=je-ke,Ie=x-ke,Xe.push(K(s(ke+Ne%Ie,0))),je=Z(Ne/Ie);Xe.push(K(s(je,0))),_e=d(oe,ce,ve==he),oe=0,++ve}++oe,++ae}return Xe.join("")}function n(q){return f(q,function(ae){return B.test(ae)?i(ae.slice(4).toLowerCase()):ae})}function h(q){return f(q,function(ae){return ee.test(ae)?"xn--"+t(ae):ae})}var v=typeof E=="object"&&E&&!E.nodeType&&E,b=typeof P=="object"&&P&&!P.nodeType&&P,y=typeof C=="object"&&C;y.global!==y&&y.window!==y&&y.self!==y||(w=y);var _,m,g=2147483647,x=36,l=1,T=26,A=38,O=700,D=72,I=128,j="-",B=/^xn--/,ee=/[^\x20-\x7E]/,F=/[\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=x-l,Z=Math.floor,K=String.fromCharCode;if(_={version:"1.4.1",ucs2:{decode:o,encode:a},decode:i,encode:t,toASCII:h,toUnicode:n},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 w.punycode=_}(this)}).call(this,typeof re!="undefined"?re:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],175:[function(S,P,E){"use strict";function C(u,p){return Object.prototype.hasOwnProperty.call(u,p)}P.exports=function(u,p,f,o){p=p||"&",f=f||"=";var a={};if(typeof u!="string"||u.length===0)return a;var c=/\+/g;u=u.split(p);var s=1e3;o&&typeof o.maxKeys=="number"&&(s=o.maxKeys);var d=u.length;s>0&&d>s&&(d=s);for(var i=0;i<d;++i){var t,n,h,v,b=u[i].replace(c,"%20"),y=b.indexOf(f);y>=0?(t=b.substr(0,y),n=b.substr(y+1)):(t=b,n=""),h=decodeURIComponent(t),v=decodeURIComponent(n),C(a,h)?w(a[h])?a[h].push(v):a[h]=[a[h],v]:a[h]=v}return a};var w=Array.isArray||function(u){return Object.prototype.toString.call(u)==="[object Array]"}},{}],176:[function(S,P,E){"use strict";function C(f,o){if(f.map)return f.map(o);for(var a=[],c=0;c<f.length;c++)a.push(o(f[c],c));return a}var w=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,o,a,c){return o=o||"&",a=a||"=",f===null&&(f=void 0),typeof f=="object"?C(p(f),function(s){var d=encodeURIComponent(w(s))+a;return u(f[s])?C(f[s],function(i){return d+encodeURIComponent(w(i))}).join(o):d+encodeURIComponent(w(f[s]))}).join(o):c?encodeURIComponent(w(c))+a+encodeURIComponent(w(f)):""};var u=Array.isArray||function(f){return Object.prototype.toString.call(f)==="[object Array]"},p=Object.keys||function(f){var o=[];for(var a in f)Object.prototype.hasOwnProperty.call(f,a)&&o.push(a);return o}},{}],177:[function(S,P,E){"use strict";E.decode=E.parse=S("./decode"),E.encode=E.stringify=S("./encode")},{"./decode":175,"./encode":176}],178:[function(S,P,E){P.exports=S("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":179}],179:[function(S,P,E){"use strict";function C(h){if(!(this instanceof C))return new C(h);s.call(this,h),d.call(this,h),h&&h.readable===!1&&(this.readable=!1),h&&h.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,h&&h.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",w)}function w(){this.allowHalfOpen||this._writableState.ended||o.nextTick(u,this)}function u(h){h.end()}var p=S("babel-runtime/core-js/object/keys"),f=function(h){return h&&h.__esModule?h:{default:h}}(p),o=S("process-nextick-args"),a=f.default||function(h){var v=[];for(var b in h)v.push(b);return v};P.exports=C;var c=S("core-util-is");c.inherits=S("inherits");var s=S("./_stream_readable"),d=S("./_stream_writable");c.inherits(C,s);for(var i=a(d.prototype),t=0;t<i.length;t++){var n=i[t];C.prototype[n]||(C.prototype[n]=d.prototype[n])}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(h){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=h,this._writableState.destroyed=h)}}),C.prototype._destroy=function(h,v){this.push(null),this.end(),o.nextTick(v,h)}},{"./_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(S,P,E){"use strict";function C(p){if(!(this instanceof C))return new C(p);w.call(this,p)}P.exports=C;var w=S("./_stream_transform"),u=S("core-util-is");u.inherits=S("inherits"),u.inherits(C,w),C.prototype._transform=function(p,f,o){o(null,p)}},{"./_stream_transform":182,"core-util-is":153,inherits:162}],181:[function(S,P,E){(function(C,w){"use strict";function u(ge){return oe.from(ge)}function p(ge){return oe.isBuffer(ge)||ge instanceof ve}function f(ge,ce,Ie){if(typeof ge.prependListener=="function")return ge.prependListener(ce,Ie);ge._events&&ge._events[ce]?K(ge._events[ce])?ge._events[ce].unshift(Ie):ge._events[ce]=[Ie,ge._events[ce]]:ge.on(ce,Ie)}function o(ge,ce){Z=Z||S("./_stream_duplex"),ge=ge||{};var Ie=ce instanceof Z;this.objectMode=!!ge.objectMode,Ie&&(this.objectMode=this.objectMode||!!ge.readableObjectMode);var Ne=ge.highWaterMark,Xe=ge.readableHighWaterMark,te=this.objectMode?16:16384;this.highWaterMark=Ne||Ne===0?Ne:Ie&&(Xe||Xe===0)?Xe:te,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new je,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=ge.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,ge.encoding&&(xe||(xe=S("string_decoder/").StringDecoder),this.decoder=new xe(ge.encoding),this.encoding=ge.encoding)}function a(ge){if(Z=Z||S("./_stream_duplex"),!(this instanceof a))return new a(ge);this._readableState=new o(ge,this),this.readable=!0,ge&&(typeof ge.read=="function"&&(this._read=ge.read),typeof ge.destroy=="function"&&(this._destroy=ge.destroy)),ae.call(this)}function c(ge,ce,Ie,Ne,Xe){var te=ge._readableState;if(ce===null)te.reading=!1,h(ge,te);else{var k;Xe||(k=d(te,ce)),k?ge.emit("error",k):te.objectMode||ce&&ce.length>0?(typeof ce=="string"||te.objectMode||(0,G.default)(ce)===oe.prototype||(ce=u(ce)),Ne?te.endEmitted?ge.emit("error",new Error("stream.unshift() after end event")):s(ge,te,ce,!0):te.ended?ge.emit("error",new Error("stream.push() after EOF")):(te.reading=!1,te.decoder&&!Ie?(ce=te.decoder.write(ce),te.objectMode||ce.length!==0?s(ge,te,ce,!1):y(ge,te)):s(ge,te,ce,!1))):Ne||(te.reading=!1)}return i(te)}function s(ge,ce,Ie,Ne){ce.flowing&&ce.length===0&&!ce.sync?(ge.emit("data",Ie),ge.read(0)):(ce.length+=ce.objectMode?1:Ie.length,Ne?ce.buffer.unshift(Ie):ce.buffer.push(Ie),ce.needReadable&&v(ge)),y(ge,ce)}function d(ge,ce){var Ie;return p(ce)||typeof ce=="string"||ce===void 0||ge.objectMode||(Ie=new TypeError("Invalid non-string/buffer chunk")),Ie}function i(ge){return!ge.ended&&(ge.needReadable||ge.length<ge.highWaterMark||ge.length===0)}function t(ge){return ge>=Fe?ge=Fe:(ge--,ge|=ge>>>1,ge|=ge>>>2,ge|=ge>>>4,ge|=ge>>>8,ge|=ge>>>16,ge++),ge}function n(ge,ce){return ge<=0||ce.length===0&&ce.ended?0:ce.objectMode?1:ge!==ge?ce.flowing&&ce.length?ce.buffer.head.data.length:ce.length:(ge>ce.highWaterMark&&(ce.highWaterMark=t(ge)),ge<=ce.length?ge:ce.ended?ce.length:(ce.needReadable=!0,0))}function h(ge,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(ge)}}function v(ge){var ce=ge._readableState;ce.needReadable=!1,ce.emittedReadable||(fe("emitReadable",ce.flowing),ce.emittedReadable=!0,ce.sync?X.nextTick(b,ge):b(ge))}function b(ge){fe("emit readable"),ge.emit("readable"),T(ge)}function y(ge,ce){ce.readingMore||(ce.readingMore=!0,X.nextTick(_,ge,ce))}function _(ge,ce){for(var Ie=ce.length;!ce.reading&&!ce.flowing&&!ce.ended&&ce.length<ce.highWaterMark&&(fe("maybeReadMore read 0"),ge.read(0),Ie!==ce.length);)Ie=ce.length;ce.readingMore=!1}function m(ge){return function(){var ce=ge._readableState;fe("pipeOnDrain",ce.awaitDrain),ce.awaitDrain&&ce.awaitDrain--,ce.awaitDrain===0&&q(ge,"data")&&(ce.flowing=!0,T(ge))}}function g(ge){fe("readable nexttick read 0"),ge.read(0)}function x(ge,ce){ce.resumeScheduled||(ce.resumeScheduled=!0,X.nextTick(l,ge,ce))}function l(ge,ce){ce.reading||(fe("resume read 0"),ge.read(0)),ce.resumeScheduled=!1,ce.awaitDrain=0,ge.emit("resume"),T(ge),ce.flowing&&!ce.reading&&ge.read(0)}function T(ge){var ce=ge._readableState;for(fe("flow",ce.flowing);ce.flowing&&ge.read()!==null;);}function A(ge,ce){if(ce.length===0)return null;var Ie;return ce.objectMode?Ie=ce.buffer.shift():!ge||ge>=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(ge,ce.buffer,ce.decoder),Ie}function O(ge,ce,Ie){var Ne;return ge<ce.head.data.length?(Ne=ce.head.data.slice(0,ge),ce.head.data=ce.head.data.slice(ge)):Ne=ge===ce.head.data.length?ce.shift():Ie?D(ge,ce):I(ge,ce),Ne}function D(ge,ce){var Ie=ce.head,Ne=1,Xe=Ie.data;for(ge-=Xe.length;Ie=Ie.next;){var te=Ie.data,k=ge>te.length?te.length:ge;if(k===te.length?Xe+=te:Xe+=te.slice(0,ge),(ge-=k)===0){k===te.length?(++Ne,Ie.next?ce.head=Ie.next:ce.head=ce.tail=null):(ce.head=Ie,Ie.data=te.slice(k));break}++Ne}return ce.length-=Ne,Xe}function I(ge,ce){var Ie=oe.allocUnsafe(ge),Ne=ce.head,Xe=1;for(Ne.data.copy(Ie),ge-=Ne.data.length;Ne=Ne.next;){var te=Ne.data,k=ge>te.length?te.length:ge;if(te.copy(Ie,Ie.length-ge,0,k),(ge-=k)===0){k===te.length?(++Xe,Ne.next?ce.head=Ne.next:ce.head=ce.tail=null):(ce.head=Ne,Ne.data=te.slice(k));break}++Xe}return ce.length-=Xe,Ie}function j(ge){var ce=ge._readableState;if(ce.length>0)throw new Error('"endReadable()" called on non-empty stream');ce.endEmitted||(ce.ended=!0,X.nextTick(B,ce,ge))}function B(ge,ce){ge.endEmitted||ge.length!==0||(ge.endEmitted=!0,ce.readable=!1,ce.emit("end"))}function ee(ge,ce){for(var Ie=0,Ne=ge.length;Ie<Ne;Ie++)if(ge[Ie]===ce)return Ie;return-1}var F=S("babel-runtime/core-js/object/get-prototype-of"),G=function(ge){return ge&&ge.__esModule?ge:{default:ge}}(F),X=S("process-nextick-args");P.exports=a;var Z,K=S("isarray");a.ReadableState=o;var q=(S("events").EventEmitter,function(ge,ce){return ge.listeners(ce).length}),ae=S("./internal/streams/stream"),oe=S("safe-buffer").Buffer,ve=w.Uint8Array||function(){},he=S("core-util-is");he.inherits=S("inherits");var _e=S("util"),fe=void 0;fe=_e&&_e.debuglog?_e.debuglog("stream"):function(){};var xe,je=S("./internal/streams/BufferList"),Le=S("./internal/streams/destroy");he.inherits(a,ae);var ke=["error","close","destroy","pause","resume"];Object.defineProperty(a.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(ge){this._readableState&&(this._readableState.destroyed=ge)}}),a.prototype.destroy=Le.destroy,a.prototype._undestroy=Le.undestroy,a.prototype._destroy=function(ge,ce){this.push(null),ce(ge)},a.prototype.push=function(ge,ce){var Ie,Ne=this._readableState;return Ne.objectMode?Ie=!0:typeof ge=="string"&&(ce=ce||Ne.defaultEncoding,ce!==Ne.encoding&&(ge=oe.from(ge,ce),ce=""),Ie=!0),c(this,ge,ce,!1,Ie)},a.prototype.unshift=function(ge){return c(this,ge,null,!0,!1)},a.prototype.isPaused=function(){return this._readableState.flowing===!1},a.prototype.setEncoding=function(ge){return xe||(xe=S("string_decoder/").StringDecoder),this._readableState.decoder=new xe(ge),this._readableState.encoding=ge,this};var Fe=8388608;a.prototype.read=function(ge){fe("read",ge),ge=parseInt(ge,10);var ce=this._readableState,Ie=ge;if(ge!==0&&(ce.emittedReadable=!1),ge===0&&ce.needReadable&&(ce.length>=ce.highWaterMark||ce.ended))return fe("read: emitReadable",ce.length,ce.ended),ce.length===0&&ce.ended?j(this):v(this),null;if((ge=n(ge,ce))===0&&ce.ended)return ce.length===0&&j(this),null;var Ne=ce.needReadable;fe("need readable",Ne),(ce.length===0||ce.length-ge<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||(ge=n(Ie,ce)));var Xe;return Xe=ge>0?A(ge,ce):null,Xe===null?(ce.needReadable=!0,ge=0):ce.length-=ge,ce.length===0&&(ce.ended||(ce.needReadable=!0),Ie!==ge&&ce.ended&&j(this)),Xe!==null&&this.emit("data",Xe),Xe},a.prototype._read=function(ge){this.emit("error",new Error("_read() is not implemented"))},a.prototype.pipe=function(ge,ce){function Ie(Ze,ze){fe("onunpipe"),Ze===Y&&ze&&ze.hasUnpiped===!1&&(ze.hasUnpiped=!0,Xe())}function Ne(){fe("onend"),ge.end()}function Xe(){fe("cleanup"),ge.removeListener("close",N),ge.removeListener("finish",J),ge.removeListener("drain",Re),ge.removeListener("error",k),ge.removeListener("unpipe",Ie),Y.removeListener("end",Ne),Y.removeListener("end",V),Y.removeListener("data",te),Pe=!0,!me.awaitDrain||ge._writableState&&!ge._writableState.needDrain||Re()}function te(Ze){fe("ondata"),Ye=!1,ge.write(Ze)!==!1||Ye||((me.pipesCount===1&&me.pipes===ge||me.pipesCount>1&&ee(me.pipes,ge)!==-1)&&!Pe&&(fe("false write response, pause",Y._readableState.awaitDrain),Y._readableState.awaitDrain++,Ye=!0),Y.pause())}function k(Ze){fe("onerror",Ze),V(),ge.removeListener("error",k),q(ge,"error")===0&&ge.emit("error",Ze)}function N(){ge.removeListener("finish",J),V()}function J(){fe("onfinish"),ge.removeListener("close",N),V()}function V(){fe("unpipe"),Y.unpipe(ge)}var Y=this,me=this._readableState;switch(me.pipesCount){case 0:me.pipes=ge;break;case 1:me.pipes=[me.pipes,ge];break;default:me.pipes.push(ge)}me.pipesCount+=1,fe("pipe count=%d opts=%j",me.pipesCount,ce);var Ae=(!ce||ce.end!==!1)&&ge!==C.stdout&&ge!==C.stderr,at=Ae?Ne:V;me.endEmitted?X.nextTick(at):Y.once("end",at),ge.on("unpipe",Ie);var Re=m(Y);ge.on("drain",Re);var Pe=!1,Ye=!1;return Y.on("data",te),f(ge,"error",k),ge.once("close",N),ge.once("finish",J),ge.emit("pipe",Y),me.flowing||(fe("pipe resume"),Y.resume()),ge},a.prototype.unpipe=function(ge){var ce=this._readableState,Ie={hasUnpiped:!1};if(ce.pipesCount===0)return this;if(ce.pipesCount===1)return ge&&ge!==ce.pipes?this:(ge||(ge=ce.pipes),ce.pipes=null,ce.pipesCount=0,ce.flowing=!1,ge&&ge.emit("unpipe",this,Ie),this);if(!ge){var Ne=ce.pipes,Xe=ce.pipesCount;ce.pipes=null,ce.pipesCount=0,ce.flowing=!1;for(var te=0;te<Xe;te++)Ne[te].emit("unpipe",this,Ie);return this}var k=ee(ce.pipes,ge);return k===-1?this:(ce.pipes.splice(k,1),ce.pipesCount-=1,ce.pipesCount===1&&(ce.pipes=ce.pipes[0]),ge.emit("unpipe",this,Ie),this)},a.prototype.on=function(ge,ce){var Ie=ae.prototype.on.call(this,ge,ce);if(ge==="data")this._readableState.flowing!==!1&&this.resume();else if(ge==="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 ge=this._readableState;return ge.flowing||(fe("resume"),ge.flowing=!0,x(this,ge)),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(ge){var ce=this,Ie=this._readableState,Ne=!1;ge.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)}),ge.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,ge.pause()))});for(var Xe in ge)this[Xe]===void 0&&typeof ge[Xe]=="function"&&(this[Xe]=function(k){return function(){return ge[k].apply(ge,arguments)}}(Xe));for(var te=0;te<ke.length;te++)ge.on(ke[te],this.emit.bind(this,ke[te]));return this._read=function(k){fe("wrapped _read",k),Ne&&(Ne=!1,ge.resume())},this},Object.defineProperty(a.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),a._fromList=A}).call(this,S("_process"),typeof re!="undefined"?re: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(S,P,E){"use strict";function C(a,c){var s=this._transformState;s.transforming=!1;var d=s.writecb;if(!d)return this.emit("error",new Error("write callback called multiple times"));s.writechunk=null,s.writecb=null,c!=null&&this.push(c),d(a);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function w(a){if(!(this instanceof w))return new w(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",u)}function u(){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=w;var f=S("./_stream_duplex"),o=S("core-util-is");o.inherits=S("inherits"),o.inherits(w,f),w.prototype.push=function(a,c){return this._transformState.needTransform=!1,f.prototype.push.call(this,a,c)},w.prototype._transform=function(a,c,s){throw new Error("_transform() is not implemented")},w.prototype._write=function(a,c,s){var d=this._transformState;if(d.writecb=s,d.writechunk=a,d.writeencoding=c,!d.transforming){var i=this._readableState;(d.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},w.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},w.prototype._destroy=function(a,c){var s=this;f.prototype._destroy.call(this,a,function(d){c(d),s.emit("close")})}},{"./_stream_duplex":179,"core-util-is":153,inherits:162}],183:[function(S,P,E){(function(C,w){"use strict";function u(Le){return Le&&Le.__esModule?Le:{default:Le}}function p(Le){var ke=this;this.next=null,this.entry=null,this.finish=function(){D(ke,Le)}}function f(Le){return _e.from(Le)}function o(Le){return _e.isBuffer(Le)||Le instanceof fe}function a(){}function c(Le,ke){q=q||S("./_stream_duplex"),Le=Le||{};var Fe=ke instanceof q;this.objectMode=!!Le.objectMode,Fe&&(this.objectMode=this.objectMode||!!Le.writableObjectMode);var ge=Le.highWaterMark,ce=Le.writableHighWaterMark,Ie=this.objectMode?16:16384;this.highWaterMark=ge||ge===0?ge:Fe&&(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=Le.decodeStrings===!1;this.decodeStrings=!Ne,this.defaultEncoding=Le.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Xe){y(ke,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(Le){if(q=q||S("./_stream_duplex"),!(je.call(s,this)||this instanceof q))return new s(Le);this._writableState=new c(Le,this),this.writable=!0,Le&&(typeof Le.write=="function"&&(this._write=Le.write),typeof Le.writev=="function"&&(this._writev=Le.writev),typeof Le.destroy=="function"&&(this._destroy=Le.destroy),typeof Le.final=="function"&&(this._final=Le.final)),he.call(this)}function d(Le,ke){var Fe=new Error("write after end");Le.emit("error",Fe),K.nextTick(ke,Fe)}function i(Le,ke,Fe,ge){var ce=!0,Ie=!1;return Fe===null?Ie=new TypeError("May not write null values to stream"):typeof Fe=="string"||Fe===void 0||ke.objectMode||(Ie=new TypeError("Invalid non-string/buffer chunk")),Ie&&(Le.emit("error",Ie),K.nextTick(ge,Ie),ce=!1),ce}function t(Le,ke,Fe){return Le.objectMode||Le.decodeStrings===!1||typeof ke!="string"||(ke=_e.from(ke,Fe)),ke}function n(Le,ke,Fe,ge,ce,Ie){if(!Fe){var Ne=t(ke,ge,ce);ge!==Ne&&(Fe=!0,ce="buffer",ge=Ne)}var Xe=ke.objectMode?1:ge.length;ke.length+=Xe;var te=ke.length<ke.highWaterMark;if(te||(ke.needDrain=!0),ke.writing||ke.corked){var k=ke.lastBufferedRequest;ke.lastBufferedRequest={chunk:ge,encoding:ce,isBuf:Fe,callback:Ie,next:null},k?k.next=ke.lastBufferedRequest:ke.bufferedRequest=ke.lastBufferedRequest,ke.bufferedRequestCount+=1}else h(Le,ke,!1,Xe,ge,ce,Ie);return te}function h(Le,ke,Fe,ge,ce,Ie,Ne){ke.writelen=ge,ke.writecb=Ne,ke.writing=!0,ke.sync=!0,Fe?Le._writev(ce,ke.onwrite):Le._write(ce,Ie,ke.onwrite),ke.sync=!1}function v(Le,ke,Fe,ge,ce){--ke.pendingcb,Fe?(K.nextTick(ce,ge),K.nextTick(A,Le,ke),Le._writableState.errorEmitted=!0,Le.emit("error",ge)):(ce(ge),Le._writableState.errorEmitted=!0,Le.emit("error",ge),A(Le,ke))}function b(Le){Le.writing=!1,Le.writecb=null,Le.length-=Le.writelen,Le.writelen=0}function y(Le,ke){var Fe=Le._writableState,ge=Fe.sync,ce=Fe.writecb;if(b(Fe),ke)v(Le,Fe,ge,ke,ce);else{var Ie=x(Fe);Ie||Fe.corked||Fe.bufferProcessing||!Fe.bufferedRequest||g(Le,Fe),ge?ae(_,Le,Fe,Ie,ce):_(Le,Fe,Ie,ce)}}function _(Le,ke,Fe,ge){Fe||m(Le,ke),ke.pendingcb--,ge(),A(Le,ke)}function m(Le,ke){ke.length===0&&ke.needDrain&&(ke.needDrain=!1,Le.emit("drain"))}function g(Le,ke){ke.bufferProcessing=!0;var Fe=ke.bufferedRequest;if(Le._writev&&Fe&&Fe.next){var ge=ke.bufferedRequestCount,ce=new Array(ge),Ie=ke.corkedRequestsFree;Ie.entry=Fe;for(var Ne=0,Xe=!0;Fe;)ce[Ne]=Fe,Fe.isBuf||(Xe=!1),Fe=Fe.next,Ne+=1;ce.allBuffers=Xe,h(Le,ke,!0,ke.length,ce,"",Ie.finish),ke.pendingcb++,ke.lastBufferedRequest=null,Ie.next?(ke.corkedRequestsFree=Ie.next,Ie.next=null):ke.corkedRequestsFree=new p(ke),ke.bufferedRequestCount=0}else{for(;Fe;){var te=Fe.chunk,k=Fe.encoding,N=Fe.callback;if(h(Le,ke,!1,ke.objectMode?1:te.length,te,k,N),Fe=Fe.next,ke.bufferedRequestCount--,ke.writing)break}Fe===null&&(ke.lastBufferedRequest=null)}ke.bufferedRequest=Fe,ke.bufferProcessing=!1}function x(Le){return Le.ending&&Le.length===0&&Le.bufferedRequest===null&&!Le.finished&&!Le.writing}function l(Le,ke){Le._final(function(Fe){ke.pendingcb--,Fe&&Le.emit("error",Fe),ke.prefinished=!0,Le.emit("prefinish"),A(Le,ke)})}function T(Le,ke){ke.prefinished||ke.finalCalled||(typeof Le._final=="function"?(ke.pendingcb++,ke.finalCalled=!0,K.nextTick(l,Le,ke)):(ke.prefinished=!0,Le.emit("prefinish")))}function A(Le,ke){var Fe=x(ke);return Fe&&(T(Le,ke),ke.pendingcb===0&&(ke.finished=!0,Le.emit("finish"))),Fe}function O(Le,ke,Fe){ke.ending=!0,A(Le,ke),Fe&&(ke.finished?K.nextTick(Fe):Le.once("finish",Fe)),ke.ended=!0,Le.writable=!1}function D(Le,ke,Fe){var ge=Le.entry;for(Le.entry=null;ge;){var ce=ge.callback;ke.pendingcb--,ce(Fe),ge=ge.next}ke.corkedRequestsFree?ke.corkedRequestsFree.next=Le:ke.corkedRequestsFree=Le}var I=S("babel-runtime/core-js/object/define-property"),j=u(I),B=S("babel-runtime/core-js/symbol/has-instance"),ee=u(B),F=S("babel-runtime/core-js/symbol"),G=u(F),X=S("babel-runtime/core-js/set-immediate"),Z=u(X),K=S("process-nextick-args");P.exports=s;var q,ae=!C.browser&&["v0.10","v0.9."].indexOf(C.version.slice(0,5))>-1?Z.default:K.nextTick;s.WritableState=c;var oe=S("core-util-is");oe.inherits=S("inherits");var ve={deprecate:S("util-deprecate")},he=S("./internal/streams/stream"),_e=S("safe-buffer").Buffer,fe=w.Uint8Array||function(){},xe=S("./internal/streams/destroy");oe.inherits(s,he),c.prototype.getBuffer=function(){for(var Le=this.bufferedRequest,ke=[];Le;)ke.push(Le),Le=Le.next;return ke},function(){try{Object.defineProperty(c.prototype,"buffer",{get:ve.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(Le){}}();var je;typeof G.default=="function"&&ee.default&&typeof Function.prototype[ee.default]=="function"?(je=Function.prototype[ee.default],(0,j.default)(s,ee.default,{value:function(Le){return!!je.call(this,Le)||this===s&&Le&&Le._writableState instanceof c}})):je=function(Le){return Le instanceof this},s.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},s.prototype.write=function(Le,ke,Fe){var ge=this._writableState,ce=!1,Ie=!ge.objectMode&&o(Le);return Ie&&!_e.isBuffer(Le)&&(Le=f(Le)),typeof ke=="function"&&(Fe=ke,ke=null),Ie?ke="buffer":ke||(ke=ge.defaultEncoding),typeof Fe!="function"&&(Fe=a),ge.ended?d(this,Fe):(Ie||i(this,ge,Le,Fe))&&(ge.pendingcb++,ce=n(this,ge,Ie,Le,ke,Fe)),ce},s.prototype.cork=function(){this._writableState.corked++},s.prototype.uncork=function(){var Le=this._writableState;Le.corked&&(Le.corked--,Le.writing||Le.corked||Le.finished||Le.bufferProcessing||!Le.bufferedRequest||g(this,Le))},s.prototype.setDefaultEncoding=function(Le){if(typeof Le=="string"&&(Le=Le.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Le+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+Le);return this._writableState.defaultEncoding=Le,this},Object.defineProperty(s.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),s.prototype._write=function(Le,ke,Fe){Fe(new Error("_write() is not implemented"))},s.prototype._writev=null,s.prototype.end=function(Le,ke,Fe){var ge=this._writableState;typeof Le=="function"?(Fe=Le,Le=null,ke=null):typeof ke=="function"&&(Fe=ke,ke=null),Le!=null&&this.write(Le,ke),ge.corked&&(ge.corked=1,this.uncork()),ge.ending||ge.finished||O(this,ge,Fe)},Object.defineProperty(s.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(Le){this._writableState&&(this._writableState.destroyed=Le)}}),s.prototype.destroy=xe.destroy,s.prototype._undestroy=xe.undestroy,s.prototype._destroy=function(Le,ke){this.end(),ke(Le)}}).call(this,S("_process"),typeof re!="undefined"?re: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(S,P,E){"use strict";function C(f,o){if(!(f instanceof o))throw new TypeError("Cannot call a class as a function")}function w(f,o,a){f.copy(o,a)}var u=S("safe-buffer").Buffer,p=S("util");P.exports=function(){function f(){C(this,f),this.head=null,this.tail=null,this.length=0}return f.prototype.push=function(o){var a={data:o,next:null};this.length>0?this.tail.next=a:this.head=a,this.tail=a,++this.length},f.prototype.unshift=function(o){var a={data:o,next:this.head};this.length===0&&(this.tail=a),this.head=a,++this.length},f.prototype.shift=function(){if(this.length!==0){var o=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,o}},f.prototype.clear=function(){this.head=this.tail=null,this.length=0},f.prototype.join=function(o){if(this.length===0)return"";for(var a=this.head,c=""+a.data;a=a.next;)c+=o+a.data;return c},f.prototype.concat=function(o){if(this.length===0)return u.alloc(0);if(this.length===1)return this.head.data;for(var a=u.allocUnsafe(o>>>0),c=this.head,s=0;c;)w(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(S,P,E){"use strict";function C(f,o){var a=this,c=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return c||s?(o?o(f):!f||this._writableState&&this._writableState.errorEmitted||p.nextTick(u,this,f),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(f||null,function(d){!o&&d?(p.nextTick(u,a,d),a._writableState&&(a._writableState.errorEmitted=!0)):o&&o(d)}),this)}function w(){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 u(f,o){f.emit("error",o)}var p=S("process-nextick-args");P.exports={destroy:C,undestroy:w}},{"process-nextick-args":172}],186:[function(S,P,E){"use strict";P.exports=S("events").EventEmitter},{events:158}],187:[function(S,P,E){P.exports=S("./readable").PassThrough},{"./readable":188}],188:[function(S,P,E){E=P.exports=S("./lib/_stream_readable.js"),E.Stream=E,E.Readable=E,E.Writable=S("./lib/_stream_writable.js"),E.Duplex=S("./lib/_stream_duplex.js"),E.Transform=S("./lib/_stream_transform.js"),E.PassThrough=S("./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(S,P,E){P.exports=S("./readable").Transform},{"./readable":188}],190:[function(S,P,E){P.exports=S("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":183}],191:[function(S,P,E){var C=function(){return this}()||Function("return this")(),w=C.regeneratorRuntime&&Object.getOwnPropertyNames(C).indexOf("regeneratorRuntime")>=0,u=w&&C.regeneratorRuntime;if(C.regeneratorRuntime=void 0,P.exports=S("./runtime"),w)C.regeneratorRuntime=u;else try{delete C.regeneratorRuntime}catch(p){C.regeneratorRuntime=void 0}},{"./runtime":192}],192:[function(S,P,E){!function(C){"use strict";function w(Z,K,q,ae){var oe=K&&K.prototype instanceof p?K:p,ve=Object.create(oe.prototype),he=new n(ae||[]);return ve._invoke=s(Z,q,he),ve}function u(Z,K,q){try{return{type:"normal",arg:Z.call(K,q)}}catch(ae){return{type:"throw",arg:ae}}}function p(){}function f(){}function o(){}function a(Z){["next","throw","return"].forEach(function(K){Z[K]=function(q){return this._invoke(K,q)}})}function c(Z){function K(oe,ve,he,_e){var fe=u(Z[oe],Z,ve);if(fe.type!=="throw"){var xe=fe.arg,je=xe.value;return je&&typeof je=="object"&&_.call(je,"__await")?Promise.resolve(je.__await).then(function(Le){K("next",Le,he,_e)},function(Le){K("throw",Le,he,_e)}):Promise.resolve(je).then(function(Le){xe.value=Le,he(xe)},_e)}_e(fe.arg)}function q(oe,ve){function he(){return new Promise(function(_e,fe){K(oe,ve,_e,fe)})}return ae=ae?ae.then(he,he):he()}var ae;this._invoke=q}function s(Z,K,q){var ae=O;return function(oe,ve){if(ae===I)throw new Error("Generator is already running");if(ae===j){if(oe==="throw")throw ve;return v()}for(q.method=oe,q.arg=ve;;){var he=q.delegate;if(he){var _e=d(he,q);if(_e){if(_e===B)continue;return _e}}if(q.method==="next")q.sent=q._sent=q.arg;else if(q.method==="throw"){if(ae===O)throw ae=j,q.arg;q.dispatchException(q.arg)}else q.method==="return"&&q.abrupt("return",q.arg);ae=I;var fe=u(Z,K,q);if(fe.type==="normal"){if(ae=q.done?j:D,fe.arg===B)continue;return{value:fe.arg,done:q.done}}fe.type==="throw"&&(ae=j,q.method="throw",q.arg=fe.arg)}}}function d(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,d(Z,K),K.method==="throw"))return B;K.method="throw",K.arg=new TypeError("The iterator does not provide a 'throw' method")}return B}var ae=u(q,Z.iterator,K.arg);if(ae.type==="throw")return K.method="throw",K.arg=ae.arg,K.delegate=null,B;var oe=ae.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,B):oe:(K.method="throw",K.arg=new TypeError("iterator result is not an object"),K.delegate=null,B)}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 t(Z){var K=Z.completion||{};K.type="normal",delete K.arg,Z.completion=K}function n(Z){this.tryEntries=[{tryLoc:"root"}],Z.forEach(i,this),this.reset(!0)}function h(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,ae=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 ae.next=ae}}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",x=m.asyncIterator||"@@asyncIterator",l=m.toStringTag||"@@toStringTag",T=typeof P=="object",A=C.regeneratorRuntime;if(A)return void(T&&(P.exports=A));A=C.regeneratorRuntime=T?P.exports:{},A.wrap=w;var O="suspendedStart",D="suspendedYield",I="executing",j="completed",B={},ee={};ee[g]=function(){return this};var F=Object.getPrototypeOf,G=F&&F(F(h([])));G&&G!==y&&_.call(G,g)&&(ee=G);var X=o.prototype=p.prototype=Object.create(ee);f.prototype=X.constructor=o,o.constructor=f,o[l]=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,o):(Z.__proto__=o,l in Z||(Z[l]="GeneratorFunction")),Z.prototype=Object.create(X),Z},A.awrap=function(Z){return{__await:Z}},a(c.prototype),c.prototype[x]=function(){return this},A.AsyncIterator=c,A.async=function(Z,K,q,ae){var oe=new c(w(Z,K,q,ae));return A.isGeneratorFunction(K)?oe:oe.next().then(function(ve){return ve.done?ve.value:oe.next()})},a(X),X[l]="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 ae(){for(;K.length;){var oe=K.pop();if(oe in Z)return ae.value=oe,ae.done=!1,ae}return ae.done=!0,ae}},A.values=h,n.prototype={constructor:n,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(t),!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,xe){return ve.type="throw",ve.arg=Z,q.next=fe,xe&&(q.method="next",q.arg=b),!!xe}if(this.done)throw Z;for(var q=this,ae=this.tryEntries.length-1;ae>=0;--ae){var oe=this.tryEntries[ae],ve=oe.completion;if(oe.tryLoc==="root")return K("end");if(oe.tryLoc<=this.prev){var he=_.call(oe,"catchLoc"),_e=_.call(oe,"finallyLoc");if(he&&_e){if(this.prev<oe.catchLoc)return K(oe.catchLoc,!0);if(this.prev<oe.finallyLoc)return K(oe.finallyLoc)}else if(he){if(this.prev<oe.catchLoc)return K(oe.catchLoc,!0)}else{if(!_e)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 ae=this.tryEntries[q];if(ae.tryLoc<=this.prev&&_.call(ae,"finallyLoc")&&this.prev<ae.finallyLoc){var oe=ae;break}}oe&&(Z==="break"||Z==="continue")&&oe.tryLoc<=K&&K<=oe.finallyLoc&&(oe=null);var ve=oe?oe.completion:{};return ve.type=Z,ve.arg=K,oe?(this.method="next",this.next=oe.finallyLoc,B):this.complete(ve)},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),B},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),t(q),B}},catch:function(Z){for(var K=this.tryEntries.length-1;K>=0;--K){var q=this.tryEntries[K];if(q.tryLoc===Z){var ae=q.completion;if(ae.type==="throw"){var oe=ae.arg;t(q)}return oe}}throw new Error("illegal catch attempt")},delegateYield:function(Z,K,q){return this.delegate={iterator:h(Z),resultName:K,nextLoc:q},this.method==="next"&&(this.arg=b),B}}}(function(){return this}()||Function("return this")())},{}],193:[function(S,P,E){function C(f,o){for(var a in f)o[a]=f[a]}function w(f,o,a){return p(f,o,a)}var u=S("buffer"),p=u.Buffer;p.from&&p.alloc&&p.allocUnsafe&&p.allocUnsafeSlow?P.exports=u:(C(u,E),E.Buffer=w),C(p,w),w.from=function(f,o,a){if(typeof f=="number")throw new TypeError("Argument must not be a number");return p(f,o,a)},w.alloc=function(f,o,a){if(typeof f!="number")throw new TypeError("Argument must be a number");var c=p(f);return o!==void 0?typeof a=="string"?c.fill(o,a):c.fill(o):c.fill(0),c},w.allocUnsafe=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return p(f)},w.allocUnsafeSlow=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return u.SlowBuffer(f)}},{buffer:38}],194:[function(S,P,E){(function(C){"use strict";function w(v){return v&&v.__esModule?v:{default:v}}var u=S("babel-runtime/core-js/string/from-code-point"),p=w(u),f=S("babel-runtime/core-js/json/stringify"),o=w(f),a=S("babel-runtime/helpers/typeof"),c=w(a),s=S("babel-runtime/core-js/object/define-property"),d=w(s),i=S("babel-runtime/core-js/object/keys"),t=w(i),n=S("babel-runtime/core-js/object/create"),h=w(n);!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,h.default)(v.XML_ENTITIES):(0,h.default)(v.ENTITIES),me.attribList=[],me.opt.xmlns&&(me.ns=(0,h.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=xe.length;Ae<at;Ae++){var Re=V[xe[Ae]].length;if(Re>Y)switch(xe[Ae]){case"textNode":B(V);break;case"cdata":j(V,"oncdata",V.cdata),V.cdata="";break;case"script":j(V,"onscript",V.script),V.script="";break;default:F(V,"Max buffer length exceeded: "+xe[Ae])}me=Math.max(me,Re)}var Pe=v.MAX_BUFFER_LENGTH-me;V.bufferCheckPosition=Pe+V.position}function _(V){for(var Y=0,me=xe.length;Y<me;Y++)V[xe[Y]]=""}function m(V){B(V),V.cdata!==""&&(j(V,"oncdata",V.cdata),V.cdata=""),V.script!==""&&(j(V,"onscript",V.script),V.script="")}function g(V,Y){return new x(V,Y)}function x(V,Y){if(!(this instanceof x))return new x(V,Y);je.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,Le.forEach(function(Ae){(0,d.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 l(V){return V===" "||V===`
|
|
|
`||V==="\r"||V===" "}function T(V){return V==='"'||V==="'"}function A(V){return V===">"||l(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 j(V,Y,me){V.textNode&&B(V),I(V,Y,me)}function B(V){V.textNode=ee(V.opt,V.textNode),V.textNode&&I(V,"ontext",V.textNode),V.textNode=""}function ee(V,Y){return V.trim&&(Y=Y.trim()),V.normalize&&(Y=Y.replace(/\s+/g," ")),Y}function F(V,Y){return B(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&&F(V,"Unexpected end"),B(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&&F(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,j(V,"onopentagstart",me)}function K(V,Y){var me=V.indexOf(":"),Ae=me<0?["",V]:V.split(":"),at=Ae[0],Re=Ae[1];return Y&&V==="xmlns"&&(at="xmlns",Re=""),{prefix:at,local:Re}}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!==ge)X(V,"xml: prefix must be bound to "+ge+`
|
|
|
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,Re=V.tags[V.tags.length-1]||V;at.ns===Re.ns&&(at.ns=(0,h.default)(Re.ns)),at.ns[Ae]=V.attribValue}V.attribList.push([V.attribName,V.attribValue])}else V.tag.attributes[V.attribName]=V.attribValue,j(V,"onattribute",{name:V.attribName,value:V.attribValue});V.attribName=V.attribValue=""}function ae(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,o.default)(V.tagName)),me.uri=Ae.prefix);var at=V.tags[V.tags.length-1]||V;me.ns&&at.ns!==me.ns&&(0,t.default)(me.ns).forEach(function(be){j(V,"onopennamespace",{prefix:be,uri:me.ns[be]})});for(var Re=0,Pe=V.attribList.length;Re<Pe;Re++){var Ye=V.attribList[Re],Ze=Ye[0],ze=Ye[1],We=K(Ze,!0),Me=We.prefix,De=We.local,Oe=Me===""?"":me.ns[Me]||"",pe={name:Ze,value:ze,prefix:Me,local:De,uri:Oe};Me&&Me!=="xmlns"&&!Oe&&(X(V,"Unbound namespace prefix: "+(0,o.default)(Me)),pe.uri=Me),V.tag.attributes[Ze]=pe,j(V,"onattribute",pe)}V.attribList.length=0}V.tag.isSelfClosing=!!Y,V.sawRoot=!0,V.tags.push(V.tag),j(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);j(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 Re=V.tag=V.tags.pop();V.tagName=V.tag.name,j(V,"onclosetag",V.tagName);var Pe={};for(var Ye in Re.ns)Pe[Ye]=Re.ns[Ye];var Ze=V.tags[V.tags.length-1]||V;V.opt.xmlns&&Re.ns!==Ze.ns&&(0,t.default)(Re.ns).forEach(function(ze){var We=Re.ns[ze];j(V,"onclosenamespace",{prefix:ze,uri:We})})}Y===0&&(V.closedRoot=!0),V.tagName=V.attribValue=V.attribName="",V.attribList.length=0,V.state=N.TEXT}function ve(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 he(V,Y){Y==="<"?(V.state=N.OPEN_WAKA,V.startTagPosition=V.position):l(Y)||(X(V,"Non-whitespace before first tag."),V.textNode=Y,V.state=N.TEXT)}function _e(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 F(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=_e(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;he(Y,Ae);continue;case N.BEGIN_WHITESPACE:he(Y,Ae);continue;case N.TEXT:if(Y.sawRoot&&!Y.closedRoot){for(var at=me-1;Ae&&Ae!=="<"&&Ae!=="&";)(Ae=_e(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?(l(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(!l(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 Re=Y.position-Y.startTagPosition;Ae=new Array(Re).join(" ")+Ae}Y.textNode+="<"+Ae,Y.state=N.TEXT}continue;case N.SGML_DECL:(Y.sgmlDecl+Ae).toUpperCase()===ke?(j(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()===Fe?(Y.state=N.DOCTYPE,(Y.doctype||Y.sawRoot)&&X(Y,"Inappropriately located doctype declaration"),Y.doctype="",Y.sgmlDecl=""):Ae===">"?(j(Y,"onsgmldeclaration",Y.sgmlDecl),Y.sgmlDecl="",Y.state=N.TEXT):(T(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,j(Y,"ondoctype",Y.doctype),Y.doctype=!0):(Y.doctype+=Ae,Ae==="["?Y.state=N.DOCTYPE_DTD:T(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:T(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=ee(Y.opt,Y.comment),Y.comment&&j(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&&j(Y,"oncdata",Y.cdata),j(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:l(Ae)?Y.state=N.PROC_INST_BODY:Y.procInstName+=Ae;continue;case N.PROC_INST_BODY:if(!Y.procInstBody&&l(Ae))continue;Ae==="?"?Y.state=N.PROC_INST_ENDING:Y.procInstBody+=Ae;continue;case N.PROC_INST_ENDING:Ae===">"?(j(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===">"?ae(Y):Ae==="/"?Y.state=N.OPEN_TAG_SLASH:(l(Ae)||X(Y,"Invalid character in tag name"),Y.state=N.ATTRIB));continue;case N.OPEN_TAG_SLASH:Ae===">"?(ae(Y,!0),oe(Y)):(X(Y,"Forward-slash in opening tag not followed by >"),Y.state=N.ATTRIB);continue;case N.ATTRIB:if(l(Ae))continue;Ae===">"?ae(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),ae(Y)):l(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(l(Ae))continue;X(Y,"Attribute without value"),Y.tag.attributes[Y.attribName]="",Y.attribValue="",j(Y,"onattribute",{name:Y.attribName,value:""}),Y.attribName="",Ae===">"?ae(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(l(Ae))continue;T(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:l(Ae)?Y.state=N.ATTRIB:Ae===">"?ae(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===">"?ae(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):(l(Ae)||X(Y,"Invalid tagname in closing tag"),Y.state=N.CLOSE_TAG_SAW_WHITE);else{if(l(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(l(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 Pe,Ye;switch(Y.state){case N.TEXT_ENTITY:Pe=N.TEXT,Ye="textNode";break;case N.ATTRIB_VALUE_ENTITY_Q:Pe=N.ATTRIB_VALUE_QUOTED,Ye="attribValue";break;case N.ATTRIB_VALUE_ENTITY_U:Pe=N.ATTRIB_VALUE_UNQUOTED,Ye="attribValue"}Ae===";"?(Y[Ye]+=ve(Y),Y.entity="",Y.state=Pe):O(Y.entity.length?k:te,Ae)?Y.entity+=Ae:(X(Y,"Invalid character in entity name"),Y[Ye]+="&"+Y.entity+Ae,Y.entity="",Y.state=Pe);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=x,v.createStream=g,v.MAX_BUFFER_LENGTH=65536;var xe=["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"],h.default||(Object.create=function(V){function Y(){}return Y.prototype=V,new Y}),t.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 je;try{je=S("stream").Stream}catch(V){je=function(){}}var Le=v.EVENTS.filter(function(V){return V!=="error"&&V!=="end"});x.prototype=(0,h.default)(je.prototype,{constructor:{value:x}}),x.prototype.write=function(V){if(typeof C=="function"&&typeof C.isBuffer=="function"&&C.isBuffer(V)){if(!this._decoder){var Y=S("string_decoder").StringDecoder;this._decoder=new Y("utf8")}V=this._decoder.write(V)}return this._parser.write(V.toString()),this.emit("data",V),!0},x.prototype.end=function(V){return V&&V.length&&this.write(V),this._parser.end(),!0},x.prototype.on=function(V,Y){var me=this;return me._parser["on"+V]||Le.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)}),je.prototype.on.call(me,V,Y)};var ke="[CDATA[",Fe="DOCTYPE",ge="http://www.w3.org/XML/1998/namespace",ce="http://www.w3.org/2000/xmlns/",Ie={xml:ge,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-]/,te=/[#:_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,t.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 J in v.STATE)v.STATE[v.STATE[J]]=J;N=v.STATE,p.default||function(){var V=String.fromCharCode,Y=Math.floor,me=function(){var Ae,at,Re=[],Pe=-1,Ye=arguments.length;if(!Ye)return"";for(var Ze="";++Pe<Ye;){var ze=Number(arguments[Pe]);if(!isFinite(ze)||ze<0||ze>1114111||Y(ze)!==ze)throw RangeError("Invalid code point: "+ze);ze<=65535?Re.push(ze):(ze-=65536,Ae=55296+(ze>>10),at=ze%1024+56320,Re.push(Ae,at)),(Pe+1===Ye||Re.length>16384)&&(Ze+=V.apply(null,Re),Re.length=0)}return Ze};d.default?Object.defineProperty(String,"fromCodePoint",{value:me,configurable:!0,writable:!0}):String.fromCodePoint=me}()}(E===void 0?(void 0).sax={}:E)}).call(this,S("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(S,P,E){function C(){w.call(this)}P.exports=C;var w=S("events").EventEmitter;S("inherits")(C,w),C.Readable=S("readable-stream/readable.js"),C.Writable=S("readable-stream/writable.js"),C.Duplex=S("readable-stream/duplex.js"),C.Transform=S("readable-stream/transform.js"),C.PassThrough=S("readable-stream/passthrough.js"),C.Stream=C,C.prototype.pipe=function(u,p){function f(n){u.writable&&u.write(n)===!1&&i.pause&&i.pause()}function o(){i.readable&&i.resume&&i.resume()}function a(){t||(t=!0,u.end())}function c(){t||(t=!0,typeof u.destroy=="function"&&u.destroy())}function s(n){if(d(),w.listenerCount(this,"error")===0)throw n}function d(){i.removeListener("data",f),u.removeListener("drain",o),i.removeListener("end",a),i.removeListener("close",c),i.removeListener("error",s),u.removeListener("error",s),i.removeListener("end",d),i.removeListener("close",d),u.removeListener("close",d)}var i=this;i.on("data",f),u.on("drain",o),u._isStdio||p&&p.end===!1||(i.on("end",a),i.on("close",c));var t=!1;return i.on("error",s),u.on("error",s),i.on("end",d),i.on("close",d),u.on("close",d),u.emit("pipe",i),u}},{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(S,P,E){(function(C){var w=S("./lib/request"),u=S("./lib/response"),p=S("xtend"),f=S("builtin-status-codes"),o=S("url"),a=E;a.request=function(c,s){c=typeof c=="string"?o.parse(c):p(c);var d=C.location.protocol.search(/^https?:$/)===-1?"http:":"",i=c.protocol||d,t=c.hostname||c.host,n=c.port,h=c.path||"/";t&&t.indexOf(":")!==-1&&(t="["+t+"]"),c.url=(t?i+"//"+t:"")+(n?":"+n:"")+h,c.method=(c.method||"GET").toUpperCase(),c.headers=c.headers||{};var v=new w(c);return s&&v.on("response",s),v},a.get=function(c,s){var d=a.request(c,s);return d.end(),d},a.ClientRequest=w,a.IncomingMessage=u.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 re!="undefined"?re:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":198,"./lib/response":199,"builtin-status-codes":39,url:203,xtend:236}],197:[function(S,P,E){(function(C){"use strict";function w(){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 u(c){var s=w();if(!s)return!1;try{return s.responseType=c,s.responseType===c}catch(d){}return!1}function p(c){return typeof c=="function"}E.fetch=p(C.fetch)&&p(C.ReadableStream),E.writableStream=p(C.WritableStream),E.abortController=p(C.AbortController),E.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),E.blobConstructor=!0}catch(c){}var f,o=C.ArrayBuffer!==void 0,a=o&&p(C.ArrayBuffer.prototype.slice);E.arraybuffer=E.fetch||o&&u("arraybuffer"),E.msstream=!E.fetch&&a&&u("ms-stream"),E.mozchunkedarraybuffer=!E.fetch&&o&&u("moz-chunked-arraybuffer"),E.overrideMimeType=E.fetch||!!w()&&p(w().overrideMimeType),E.vbArray=p(C.VBArray),f=null}).call(this,typeof re!="undefined"?re:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],198:[function(S,P,E){(function(C,w,u){"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 o=S("babel-runtime/core-js/object/keys"),a=function(y){return y&&y.__esModule?y:{default:y}}(o),c=S("./capability"),s=S("inherits"),d=S("./response"),i=S("readable-stream"),t=S("to-arraybuffer"),n=d.IncomingMessage,h=d.readyStates,v=P.exports=function(y){var _=this;i.Writable.call(_),_._opts=y,_._body=[],_._headers={},y.auth&&_.setHeader("Authorization","Basic "+new u(y.auth).toString("base64")),(0,a.default)(y.headers).forEach(function(x){_.setHeader(x,y.headers[x])});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?t(u.concat(y._body)):c.blobConstructor?new w.Blob(y._body.map(function(O){return t(O)}),{type:(m["content-type"]||{}).value||""}):u.concat(y._body).toString());var x=[];if((0,a.default)(m).forEach(function(O){var D=m[O].name,I=m[O].value;Array.isArray(I)?I.forEach(function(j){x.push([D,j])}):x.push([D,I])}),y._mode==="fetch"){var l=null;if(c.abortController){var T=new AbortController;l=T.signal,y._fetchAbortController=T,"requestTimeout"in _&&_.requestTimeout!==0&&(y._fetchTimer=w.setTimeout(function(){y.emit("requestTimeout"),y._fetchAbortController&&y._fetchAbortController.abort()},_.requestTimeout))}w.fetch(y._opts.url,{method:y._opts.method,headers:x,body:g||void 0,mode:"cors",credentials:_.withCredentials?"include":"same-origin",signal:l}).then(function(O){y._fetchResponse=O,y._connect()},function(O){w.clearTimeout(y._fetchTimer),y._destroyed||y.emit("error",O)})}else{var A=y._xhr=new w.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")}),x.forEach(function(O){A.setRequestHeader(O[0],O[1])}),y._response=null,A.onreadystatechange=function(){switch(A.readyState){case h.LOADING:case h.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 n(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,w.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,S("_process"),typeof re!="undefined"?re:typeof self!="undefined"?self:typeof window!="undefined"?window:{},S("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(S,P,E){(function(C,w,u){"use strict";var p=S("babel-runtime/core-js/promise"),f=function(i){return i&&i.__esModule?i:{default:i}}(p),o=S("./capability"),a=S("inherits"),c=S("readable-stream"),s=E.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},d=E.IncomingMessage=function(i,t,n,h){var v=this;if(c.Readable.call(v),v._mode=n,v.headers={},v.rawHeaders=[],v.trailers={},v.rawTrailers=[],v.on("end",function(){C.nextTick(function(){v.emit("close")})}),n==="fetch"){if(v._fetchResponse=t,v.url=t.url,v.statusCode=t.status,v.statusMessage=t.statusText,t.headers.forEach(function(g,x){v.headers[x.toLowerCase()]=g,v.rawHeaders.push(x,g)}),o.writableStream){var b=new WritableStream({write:function(g){return new f.default(function(x,l){v._destroyed?l():v.push(new u(g))?x():v._resumeFetch=x})},close:function(){w.clearTimeout(h),v._destroyed||v.push(null)},abort:function(g){v._destroyed||v.emit("error",g)}});try{return void t.body.pipeTo(b).catch(function(g){w.clearTimeout(h),v._destroyed||v.emit("error",g)})}catch(g){}}var y=t.body.getReader();!function g(){y.read().then(function(x){if(!v._destroyed){if(x.done)return w.clearTimeout(h),void v.push(null);v.push(new u(x.value)),g()}}).catch(function(x){w.clearTimeout(h),v._destroyed||v.emit("error",x)})}()}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 x=g.match(/^([^:]+):\s*(.*)/);if(x){var l=x[1].toLowerCase();l==="set-cookie"?(v.headers[l]===void 0&&(v.headers[l]=[]),v.headers[l].push(x[2])):v.headers[l]!==void 0?v.headers[l]+=", "+x[2]:v.headers[l]=x[2],v.rawHeaders.push(x[1],x[2])}}),v._charset="x-user-defined",!o.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(d,c.Readable),d.prototype._read=function(){var i=this,t=i._resumeFetch;t&&(i._resumeFetch=null,t())},d.prototype._onXHRProgress=function(){var i=this,t=i._xhr,n=null;switch(i._mode){case"text:vbarray":if(t.readyState!==s.DONE)break;try{n=new w.VBArray(t.responseBody).toArray()}catch(_){}if(n!==null){i.push(new u(n));break}case"text":try{n=t.responseText}catch(_){i._mode="text:vbarray";break}if(n.length>i._pos){var h=n.substr(i._pos);if(i._charset==="x-user-defined"){for(var v=new u(h.length),b=0;b<h.length;b++)v[b]=255&h.charCodeAt(b);i.push(v)}else i.push(h,i._charset);i._pos=n.length}break;case"arraybuffer":if(t.readyState!==s.DONE||!t.response)break;n=t.response,i.push(new u(new Uint8Array(n)));break;case"moz-chunked-arraybuffer":if(n=t.response,t.readyState!==s.LOADING||!n)break;i.push(new u(new Uint8Array(n)));break;case"ms-stream":if(n=t.response,t.readyState!==s.LOADING)break;var y=new w.MSStreamReader;y.onprogress=function(){y.result.byteLength>i._pos&&(i.push(new u(new Uint8Array(y.result.slice(i._pos)))),i._pos=y.result.byteLength)},y.onload=function(){i.push(null)},y.readAsArrayBuffer(n)}i._xhr.readyState===s.DONE&&i._mode!=="ms-stream"&&i.push(null)}}).call(this,S("_process"),typeof re!="undefined"?re:typeof self!="undefined"?self:typeof window!="undefined"?window:{},S("buffer").Buffer)},{"./capability":197,_process:173,"babel-runtime/core-js/promise":24,buffer:38,inherits:162,"readable-stream":188}],200:[function(S,P,E){"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 w(_){var m=C(_);if(typeof m!="string"&&(b.isEncoding===y||!y(_)))throw new Error("Unknown encoding: "+_);return m||_}function u(_){this.encoding=w(_);var m;switch(this.encoding){case"utf16le":this.text=d,this.end=i,m=4;break;case"utf8":this.fillLast=a,m=4;break;case"base64":this.text=t,this.end=n,m=3;break;default:return this.write=h,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 x=m.length-1;if(x<g)return 0;var l=p(m[x]);return l>=0?(l>0&&(_.lastNeed=l-1),l):--x<g||l===-2?0:(l=p(m[x]))>=0?(l>0&&(_.lastNeed=l-2),l):--x<g||l===-2?0:(l=p(m[x]),l>=0?(l>0&&(l===2?l=0:_.lastNeed=l-3),l):0)}function o(_,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=o(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 x=_.length-(g-this.lastNeed);return _.copy(this.lastChar,0,x),_.toString("utf8",m,x)}function s(_){var m=_&&_.length?this.write(_):"";return this.lastNeed?m+"\u951F\uFFFD":m}function d(_,m){if((_.length-m)%2==0){var g=_.toString("utf16le",m);if(g){var x=g.charCodeAt(g.length-1);if(x>=55296&&x<=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 t(_,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 n(_){var m=_&&_.length?this.write(_):"";return this.lastNeed?m+this.lastChar.toString("base64",0,3-this.lastNeed):m}function h(_){return _.toString(this.encoding)}function v(_){return _&&_.length?this.write(_):""}var b=S("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}};E.StringDecoder=u,u.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||""},u.prototype.end=s,u.prototype.text=c,u.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(S,P,E){(function(C,w){function u(s,d){this._id=s,this._clearFn=d}var p=S("process/browser.js").nextTick,f=Function.prototype.apply,o=Array.prototype.slice,a={},c=0;E.setTimeout=function(){return new u(f.call(setTimeout,window,arguments),clearTimeout)},E.setInterval=function(){return new u(f.call(setInterval,window,arguments),clearInterval)},E.clearTimeout=E.clearInterval=function(s){s.close()},u.prototype.unref=u.prototype.ref=function(){},u.prototype.close=function(){this._clearFn.call(window,this._id)},E.enroll=function(s,d){clearTimeout(s._idleTimeoutId),s._idleTimeout=d},E.unenroll=function(s){clearTimeout(s._idleTimeoutId),s._idleTimeout=-1},E._unrefActive=E.active=function(s){clearTimeout(s._idleTimeoutId);var d=s._idleTimeout;d>=0&&(s._idleTimeoutId=setTimeout(function(){s._onTimeout&&s._onTimeout()},d))},E.setImmediate=typeof C=="function"?C:function(s){var d=c++,i=!(arguments.length<2)&&o.call(arguments,1);return a[d]=!0,p(function(){a[d]&&(i?s.apply(null,i):s.call(null),E.clearImmediate(d))}),d},E.clearImmediate=typeof w=="function"?w:function(s){delete a[s]}}).call(this,S("timers").setImmediate,S("timers").clearImmediate)},{"process/browser.js":173,timers:201}],202:[function(S,P,E){var C=S("buffer").Buffer;P.exports=function(w){if(w instanceof Uint8Array){if(w.byteOffset===0&&w.byteLength===w.buffer.byteLength)return w.buffer;if(typeof w.buffer.slice=="function")return w.buffer.slice(w.byteOffset,w.byteOffset+w.byteLength)}if(C.isBuffer(w)){for(var u=new Uint8Array(w.length),p=w.length,f=0;f<p;f++)u[f]=w[f];return u.buffer}throw new Error("Argument must be a Buffer")}},{buffer:38}],203:[function(S,P,E){"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 w(l,T,A){if(l&&a.isObject(l)&&l instanceof C)return l;var O=new C;return O.parse(l,T,A),O}function u(l){return a.isString(l)&&(l=w(l)),l instanceof C?l.format():C.prototype.format.call(l)}function p(l,T){return w(l,!1,!0).resolve(T)}function f(l,T){return l?w(l,!1,!0).resolveObject(T):T}var o=S("punycode"),a=S("./util");E.parse=w,E.resolve=p,E.resolveObject=f,E.format=u,E.Url=C;var c=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,d=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,i=["<",">",'"',"`"," ","\r",`
|
|
|
`," "],t=["{","}","|","\\","^","`"].concat(i),n=["'"].concat(t),h=["%","/","?",";","#"].concat(n),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},x=S("querystring");C.prototype.parse=function(l,T,A){if(!a.isString(l))throw new TypeError("Parameter 'url' must be a string, not "+typeof l);var O=l.indexOf("?"),D=O!==-1&&O<l.indexOf("#")?"?":"#",I=l.split(D),j=/\\/g;I[0]=I[0].replace(j,"/"),l=I.join(D);var B=l;if(B=B.trim(),!A&&l.split("#").length===1){var ee=d.exec(B);if(ee)return this.path=B,this.href=B,this.pathname=ee[1],ee[2]?(this.search=ee[2],this.query=T?x.parse(this.search.substr(1)):this.search.substr(1)):T&&(this.search="",this.query={}),this}var F=c.exec(B);if(F){F=F[0];var G=F.toLowerCase();this.protocol=G,B=B.substr(F.length)}if(A||F||B.match(/^\/\/[^@\/]+@[^@\/]+/)){var X=B.substr(0,2)==="//";!X||F&&m[F]||(B=B.substr(2),this.slashes=!0)}if(!m[F]&&(X||F&&!g[F])){for(var Z=-1,K=0;K<v.length;K++){var q=B.indexOf(v[K]);q!==-1&&(Z===-1||q<Z)&&(Z=q)}var ae,oe;oe=Z===-1?B.lastIndexOf("@"):B.lastIndexOf("@",Z),oe!==-1&&(ae=B.slice(0,oe),B=B.slice(oe+1),this.auth=decodeURIComponent(ae)),Z=-1;for(var K=0;K<h.length;K++){var q=B.indexOf(h[K]);q!==-1&&(Z===-1||q<Z)&&(Z=q)}Z===-1&&(Z=B.length),this.host=B.slice(0,Z),B=B.slice(Z),this.parseHost(),this.hostname=this.hostname||"";var ve=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!ve)for(var he=this.hostname.split(/\./),K=0,_e=he.length;K<_e;K++){var fe=he[K];if(fe&&!fe.match(b)){for(var xe="",je=0,Le=fe.length;je<Le;je++)fe.charCodeAt(je)>127?xe+="x":xe+=fe[je];if(!xe.match(b)){var ke=he.slice(0,K),Fe=he.slice(K+1),ge=fe.match(y);ge&&(ke.push(ge[1]),Fe.unshift(ge[2])),Fe.length&&(B="/"+Fe.join(".")+B),this.hostname=ke.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),ve||(this.hostname=o.toASCII(this.hostname));var ce=this.port?":"+this.port:"",Ie=this.hostname||"";this.host=Ie+ce,this.href+=this.host,ve&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),B[0]!=="/"&&(B="/"+B))}if(!_[G])for(var K=0,_e=n.length;K<_e;K++){var Ne=n[K];if(B.indexOf(Ne)!==-1){var Xe=encodeURIComponent(Ne);Xe===Ne&&(Xe=escape(Ne)),B=B.split(Ne).join(Xe)}}var te=B.indexOf("#");te!==-1&&(this.hash=B.substr(te),B=B.slice(0,te));var k=B.indexOf("?");if(k!==-1?(this.search=B.substr(k),this.query=B.substr(k+1),T&&(this.query=x.parse(this.query)),B=B.slice(0,k)):T&&(this.search="",this.query={}),B&&(this.pathname=B),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 l=this.auth||"";l&&(l=encodeURIComponent(l),l=l.replace(/%3A/i,":"),l+="@");var T=this.protocol||"",A=this.pathname||"",O=this.hash||"",D=!1,I="";this.host?D=l+this.host:this.hostname&&(D=l+(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=x.stringify(this.query));var j=this.search||I&&"?"+I||"";return T&&T.substr(-1)!==":"&&(T+=":"),this.slashes||(!T||g[T])&&D!==!1?(D="//"+(D||""),A&&A.charAt(0)!=="/"&&(A="/"+A)):D||(D=""),O&&O.charAt(0)!=="#"&&(O="#"+O),j&&j.charAt(0)!=="?"&&(j="?"+j),A=A.replace(/[?#]/g,function(B){return encodeURIComponent(B)}),j=j.replace("#","%23"),T+D+A+j+O},C.prototype.resolve=function(l){return this.resolveObject(w(l,!1,!0)).format()},C.prototype.resolveObject=function(l){if(a.isString(l)){var T=new C;T.parse(l,!1,!0),l=T}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=l.hash,l.href==="")return A.href=A.format(),A;if(l.slashes&&!l.protocol){for(var j=Object.keys(l),B=0;B<j.length;B++){var ee=j[B];ee!=="protocol"&&(A[ee]=l[ee])}return g[A.protocol]&&A.hostname&&!A.pathname&&(A.path=A.pathname="/"),A.href=A.format(),A}if(l.protocol&&l.protocol!==A.protocol){if(!g[l.protocol]){for(var F=Object.keys(l),G=0;G<F.length;G++){var X=F[G];A[X]=l[X]}return A.href=A.format(),A}if(A.protocol=l.protocol,l.host||m[l.protocol])A.pathname=l.pathname;else{for(var _e=(l.pathname||"").split("/");_e.length&&!(l.host=_e.shift()););l.host||(l.host=""),l.hostname||(l.hostname=""),_e[0]!==""&&_e.unshift(""),_e.length<2&&_e.unshift(""),A.pathname=_e.join("/")}if(A.search=l.search,A.query=l.query,A.host=l.host||"",A.auth=l.auth,A.hostname=l.hostname||l.host,A.port=l.port,A.pathname||A.search){var Z=A.pathname||"",K=A.search||"";A.path=Z+K}return A.slashes=A.slashes||l.slashes,A.href=A.format(),A}var q=A.pathname&&A.pathname.charAt(0)==="/",ae=l.host||l.pathname&&l.pathname.charAt(0)==="/",oe=ae||q||A.host&&l.pathname,ve=oe,he=A.pathname&&A.pathname.split("/")||[],_e=l.pathname&&l.pathname.split("/")||[],fe=A.protocol&&!g[A.protocol];if(fe&&(A.hostname="",A.port=null,A.host&&(he[0]===""?he[0]=A.host:he.unshift(A.host)),A.host="",l.protocol&&(l.hostname=null,l.port=null,l.host&&(_e[0]===""?_e[0]=l.host:_e.unshift(l.host)),l.host=null),oe=oe&&(_e[0]===""||he[0]==="")),ae)A.host=l.host||l.host===""?l.host:A.host,A.hostname=l.hostname||l.hostname===""?l.hostname:A.hostname,A.search=l.search,A.query=l.query,he=_e;else if(_e.length)he||(he=[]),he.pop(),he=he.concat(_e),A.search=l.search,A.query=l.query;else if(!a.isNullOrUndefined(l.search)){if(fe){A.hostname=A.host=he.shift();var xe=!!(A.host&&A.host.indexOf("@")>0)&&A.host.split("@");xe&&(A.auth=xe.shift(),A.host=A.hostname=xe.shift())}return A.search=l.search,A.query=l.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(!he.length)return A.pathname=null,A.search?A.path="/"+A.search:A.path=null,A.href=A.format(),A;for(var je=he.slice(-1)[0],Le=(A.host||l.host||he.length>1)&&(je==="."||je==="..")||je==="",ke=0,Fe=he.length;Fe>=0;Fe--)je=he[Fe],je==="."?he.splice(Fe,1):je===".."?(he.splice(Fe,1),ke++):ke&&(he.splice(Fe,1),ke--);if(!oe&&!ve)for(;ke--;ke)he.unshift("..");!oe||he[0]===""||he[0]&&he[0].charAt(0)==="/"||he.unshift(""),Le&&he.join("/").substr(-1)!=="/"&&he.push("");var ge=he[0]===""||he[0]&&he[0].charAt(0)==="/";if(fe){A.hostname=A.host=ge?"":he.length?he.shift():"";var xe=!!(A.host&&A.host.indexOf("@")>0)&&A.host.split("@");xe&&(A.auth=xe.shift(),A.host=A.hostname=xe.shift())}return oe=oe||A.host&&he.length,oe&&!ge&&he.unshift(""),he.length?A.pathname=he.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=l.auth||A.auth,A.slashes=A.slashes||l.slashes,A.href=A.format(),A},C.prototype.parseHost=function(){var l=this.host,T=s.exec(l);T&&(T=T[0],T!==":"&&(this.port=T.substr(1)),l=l.substr(0,l.length-T.length)),l&&(this.hostname=l)}},{"./util":204,punycode:174,querystring:177}],204:[function(S,P,E){"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(S,P,E){(function(C){function w(p,f){function o(){if(!a){if(u("throwDeprecation"))throw new Error(f);u("traceDeprecation")?console.trace(f):console.warn(f),a=!0}return p.apply(this,arguments)}if(u("noDeprecation"))return p;var a=!1;return o}function u(p){try{if(!C.localStorage)return!1}catch(o){return!1}var f=C.localStorage[p];return f!=null&&String(f).toLowerCase()==="true"}P.exports=w}).call(this,typeof re!="undefined"?re:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],206:[function(S,P,E){P.exports=function(C){return C&&typeof C=="object"&&typeof C.copy=="function"&&typeof C.fill=="function"&&typeof C.readUInt8=="function"}},{}],207:[function(S,P,E){(function(C,w){function u(K,q){var ae={seen:[],stylize:f};return arguments.length>=3&&(ae.depth=arguments[2]),arguments.length>=4&&(ae.colors=arguments[3]),h(q)?ae.showHidden=q:q&&E._extend(ae,q),g(ae.showHidden)&&(ae.showHidden=!1),g(ae.depth)&&(ae.depth=2),g(ae.colors)&&(ae.colors=!1),g(ae.customInspect)&&(ae.customInspect=!0),ae.colors&&(ae.stylize=p),a(ae,K,ae.depth)}function p(K,q){var ae=u.styles[q];return ae?"["+u.colors[ae][0]+"m"+K+"["+u.colors[ae][1]+"m":K}function f(K,q){return K}function o(K){var q={};return K.forEach(function(ae,oe){q[ae]=!0}),q}function a(K,q,ae){if(K.customInspect&&q&&O(q.inspect)&&q.inspect!==E.inspect&&(!q.constructor||q.constructor.prototype!==q)){var oe=q.inspect(ae,K);return _(oe)||(oe=a(K,oe,ae)),oe}var ve=c(K,q);if(ve)return ve;var he=Object.keys(q),_e=o(he);if(K.showHidden&&(he=Object.getOwnPropertyNames(q)),A(q)&&(he.indexOf("message")>=0||he.indexOf("description")>=0))return s(q);if(he.length===0){if(O(q)){var fe=q.name?": "+q.name:"";return K.stylize("[Function"+fe+"]","special")}if(x(q))return K.stylize(RegExp.prototype.toString.call(q),"regexp");if(T(q))return K.stylize(Date.prototype.toString.call(q),"date");if(A(q))return s(q)}var xe="",je=!1,Le=["{","}"];if((n(q)&&(je=!0,Le=["[","]"]),O(q))&&(xe=" [Function"+(q.name?": "+q.name:"")+"]"),x(q)&&(xe=" "+RegExp.prototype.toString.call(q)),T(q)&&(xe=" "+Date.prototype.toUTCString.call(q)),A(q)&&(xe=" "+s(q)),he.length===0&&(!je||q.length==0))return Le[0]+xe+Le[1];if(ae<0)return x(q)?K.stylize(RegExp.prototype.toString.call(q),"regexp"):K.stylize("[Object]","special");K.seen.push(q);var ke;return ke=je?d(K,q,ae,_e,he):he.map(function(Fe){return i(K,q,ae,_e,Fe,je)}),K.seen.pop(),t(ke,xe,Le)}function c(K,q){if(g(q))return K.stylize("undefined","undefined");if(_(q)){var ae="'"+JSON.stringify(q).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return K.stylize(ae,"string")}return y(q)?K.stylize(""+q,"number"):h(q)?K.stylize(""+q,"boolean"):v(q)?K.stylize("null","null"):void 0}function s(K){return"["+Error.prototype.toString.call(K)+"]"}function d(K,q,ae,oe,ve){for(var he=[],_e=0,fe=q.length;_e<fe;++_e)ee(q,String(_e))?he.push(i(K,q,ae,oe,String(_e),!0)):he.push("");return ve.forEach(function(xe){xe.match(/^\d+$/)||he.push(i(K,q,ae,oe,xe,!0))}),he}function i(K,q,ae,oe,ve,he){var _e,fe,xe;if(xe=Object.getOwnPropertyDescriptor(q,ve)||{value:q[ve]},xe.get?fe=xe.set?K.stylize("[Getter/Setter]","special"):K.stylize("[Getter]","special"):xe.set&&(fe=K.stylize("[Setter]","special")),ee(oe,ve)||(_e="["+ve+"]"),fe||(K.seen.indexOf(xe.value)<0?(fe=v(ae)?a(K,xe.value,null):a(K,xe.value,ae-1),fe.indexOf(`
|
|
|
`)>-1&&(fe=he?fe.split(`
|
|
|
`).map(function(je){return" "+je}).join(`
|
|
|
`).substr(2):`
|
|
|
`+fe.split(`
|
|
|
`).map(function(je){return" "+je}).join(`
|
|
|
`))):fe=K.stylize("[Circular]","special")),g(_e)){if(he&&ve.match(/^\d+$/))return fe;_e=JSON.stringify(""+ve),_e.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(_e=_e.substr(1,_e.length-2),_e=K.stylize(_e,"name")):(_e=_e.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),_e=K.stylize(_e,"string"))}return _e+": "+fe}function t(K,q,ae){var oe=0;return K.reduce(function(ve,he){return oe++,he.indexOf(`
|
|
|
`)>=0&&oe++,ve+he.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?ae[0]+(q===""?"":q+`
|
|
|
`)+" "+K.join(`,
|
|
|
`)+" "+ae[1]:ae[0]+q+" "+K.join(", ")+" "+ae[1]}function n(K){return Array.isArray(K)}function h(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 x(K){return l(K)&&I(K)==="[object RegExp]"}function l(K){return typeof K=="object"&&K!==null}function T(K){return l(K)&&I(K)==="[object Date]"}function A(K){return l(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 j(K){return K<10?"0"+K.toString(10):K.toString(10)}function B(){var K=new Date,q=[j(K.getHours()),j(K.getMinutes()),j(K.getSeconds())].join(":");return[K.getDate(),Z[K.getMonth()],q].join(" ")}function ee(K,q){return Object.prototype.hasOwnProperty.call(K,q)}var F=/%[sdj%]/g;E.format=function(K){if(!_(K)){for(var q=[],ae=0;ae<arguments.length;ae++)q.push(u(arguments[ae]));return q.join(" ")}for(var ae=1,oe=arguments,ve=oe.length,he=String(K).replace(F,function(xe){if(xe==="%%")return"%";if(ae>=ve)return xe;switch(xe){case"%s":return String(oe[ae++]);case"%d":return Number(oe[ae++]);case"%j":try{return JSON.stringify(oe[ae++])}catch(je){return"[Circular]"}default:return xe}}),_e=oe[ae];ae<ve;_e=oe[++ae])v(_e)||!l(_e)?he+=" "+_e:he+=" "+u(_e);return he},E.deprecate=function(K,q){function ae(){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(w.process))return function(){return E.deprecate(K,q).apply(this,arguments)};if(C.noDeprecation===!0)return K;var oe=!1;return ae};var G,X={};E.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 ae=E.format.apply(E,arguments);console.error("%s %d: %s",K,q,ae)}}else X[K]=function(){};return X[K]},E.inspect=u,u.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]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},E.isArray=n,E.isBoolean=h,E.isNull=v,E.isNullOrUndefined=b,E.isNumber=y,E.isString=_,E.isSymbol=m,E.isUndefined=g,E.isRegExp=x,E.isObject=l,E.isDate=T,E.isError=A,E.isFunction=O,E.isPrimitive=D,E.isBuffer=S("./support/isBuffer");var Z=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];E.log=function(){console.log("%s - %s",B(),E.format.apply(E,arguments))},E.inherits=S("inherits"),E._extend=function(K,q){if(!q||!l(q))return K;for(var ae=Object.keys(q),oe=ae.length;oe--;)K[ae[oe]]=q[ae[oe]];return K}}).call(this,S("_process"),typeof re!="undefined"?re:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":206,_process:173,inherits:162}],208:[function(S,P,E){"use strict";(function(){E.stripBOM=function(C){return C[0]==="\uFEFF"?C.substring(1):C}}).call(void 0)},{}],209:[function(S,P,E){"use strict";function C(o){return o&&o.__esModule?o:{default:o}}var w=S("babel-runtime/helpers/typeof"),u=C(w),p=S("babel-runtime/core-js/object/keys"),f=C(p);(function(){var o,a,c,s,d,i={}.hasOwnProperty;o=S("xmlbuilder"),a=S("./defaults").defaults,s=function(t){return typeof t=="string"&&(t.indexOf("&")>=0||t.indexOf(">")>=0||t.indexOf("<")>=0)},d=function(t){return"<![CDATA["+c(t)+"]]>"},c=function(t){return t.replace("]]>","]]]]><![CDATA[>")},E.Builder=function(){function t(n){var h,v,b;this.options={},v=a[.2];for(h in v)i.call(v,h)&&(b=v[h],this.options[h]=b);for(h in n)i.call(n,h)&&(b=n[h],this.options[h]=b)}return t.prototype.buildObject=function(n){var h,v,b,y,_;return h=this.options.attrkey,v=this.options.charkey,(0,f.default)(n).length===1&&this.options.rootName===a[.2].rootName?(_=(0,f.default)(n)[0],n=n[_]):_=this.options.rootName,b=function(m){return function(g,x){var l,T,A,O,D,I;if((x===void 0?"undefined":(0,u.default)(x))!=="object")m.options.cdata&&s(x)?g.raw(d(x)):g.txt(x);else if(Array.isArray(x)){for(O in x)if(i.call(x,O)){T=x[O];for(D in T)A=T[D],g=b(g.ele(D),A).up()}}else for(D in x)if(i.call(x,D))if(T=x[D],D===h){if((T===void 0?"undefined":(0,u.default)(T))==="object")for(l in T)I=T[l],g=g.att(l,I)}else if(D===v)g=m.options.cdata&&s(T)?g.raw(d(T)):g.txt(T);else if(Array.isArray(T))for(O in T)i.call(T,O)&&(A=T[O],g=typeof A=="string"?m.options.cdata&&s(A)?g.ele(D).raw(d(A)).up():g.ele(D,A).up():b(g.ele(D),A).up());else(T===void 0?"undefined":(0,u.default)(T))==="object"?g=b(g.ele(D),T).up():typeof T=="string"&&m.options.cdata&&s(T)?g=g.ele(D).raw(d(T)).up():(T==null&&(T=""),g=g.ele(D,T.toString()).up());return g}}(this),y=o.create(_,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),b(y,n).end(this.options.renderOpts)},t}()}).call(void 0)},{"./defaults":210,"babel-runtime/core-js/object/keys":23,"babel-runtime/helpers/typeof":32,xmlbuilder:235}],210:[function(S,P,E){"use strict";(function(){E.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(S,P,E){"use strict";function C(c){return c&&c.__esModule?c:{default:c}}var w=S("babel-runtime/core-js/object/get-own-property-names"),u=C(w),p=S("babel-runtime/core-js/object/keys"),f=C(p),o=S("babel-runtime/helpers/typeof"),a=C(o);(function(){var c,s,d,i,t,n,h,v,b=function(m,g){return function(){return m.apply(g,arguments)}},y=function(m,g){function x(){this.constructor=m}for(var l in g)_.call(g,l)&&(m[l]=g[l]);return x.prototype=g.prototype,m.prototype=new x,m.__super__=g.prototype,m},_={}.hasOwnProperty;h=S("sax"),d=S("events"),c=S("./bom"),n=S("./processors"),v=S("timers").setImmediate,s=S("./defaults").defaults,i=function(m){return(m===void 0?"undefined":(0,a.default)(m))==="object"&&m!=null&&(0,f.default)(m).length===0},t=function(m,g,x){var l,T,A;for(l=0,T=m.length;l<T;l++)A=m[l],g=A(g,x);return g},E.Parser=function(m){function g(x){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 l,T,A;if(!(this instanceof E.Parser))return new E.Parser(x);this.options={},T=s[.2];for(l in T)_.call(T,l)&&(A=T[l],this.options[l]=A);for(l in x)_.call(x,l)&&(A=x[l],this.options[l]=A);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(n.normalize)),this.reset()}return y(g,m),g.prototype.processAsync=function(){var x,l;try{return this.remaining.length<=this.options.chunkSize?(x=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(x),this.saxParser.close()):(x=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(x),v(this.processAsync))}catch(T){if(l=T,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(l)}},g.prototype.assignOrPush=function(x,l,T){return l in x?(x[l]instanceof Array||(x[l]=[x[l]]),x[l].push(T)):this.options.explicitArray?x[l]=[T]:x[l]=T},g.prototype.reset=function(){var x,l,T,A;return this.removeAllListeners(),this.saxParser=h.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(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=[],x=this.options.attrkey,l=this.options.charkey,this.saxParser.onopentag=function(O){return function(D){var I,j,B,ee,F;if(B={},B[l]="",!O.options.ignoreAttrs){F=D.attributes;for(I in F)_.call(F,I)&&(x in B||O.options.mergeAttrs||(B[x]={}),j=O.options.attrValueProcessors?t(O.options.attrValueProcessors,D.attributes[I],I):D.attributes[I],ee=O.options.attrNameProcessors?t(O.options.attrNameProcessors,I):I,O.options.mergeAttrs?O.assignOrPush(B,ee,j):B[x][ee]=j)}return B["#name"]=O.options.tagNameProcessors?t(O.options.tagNameProcessors,D.name):D.name,O.options.xmlns&&(B[O.options.xmlnskey]={uri:D.uri,local:D.local}),A.push(B)}}(this),this.saxParser.onclosetag=function(O){return function(){var D,I,j,B,ee,F,G,X,Z,K;if(F=A.pop(),ee=F["#name"],O.options.explicitChildren&&O.options.preserveChildrenOrder||delete F["#name"],F.cdata===!0&&(D=F.cdata,delete F.cdata),Z=A[A.length-1],F[l].match(/^\s*$/)&&!D?(I=F[l],delete F[l]):(O.options.trim&&(F[l]=F[l].trim()),O.options.normalize&&(F[l]=F[l].replace(/\s{2,}/g," ").trim()),F[l]=O.options.valueProcessors?t(O.options.valueProcessors,F[l],ee):F[l],(0,f.default)(F).length===1&&l in F&&!O.EXPLICIT_CHARKEY&&(F=F[l])),i(F)&&(F=O.options.emptyTag!==""?O.options.emptyTag:I),O.options.validator!=null&&(K="/"+function(){var q,ae,oe;for(oe=[],q=0,ae=A.length;q<ae;q++)B=A[q],oe.push(B["#name"]);return oe}().concat(ee).join("/"),function(){var q;try{F=O.options.validator(K,Z&&Z[ee],F)}catch(ae){return q=ae,O.emit("error",q)}}()),O.options.explicitChildren&&!O.options.mergeAttrs&&(F===void 0?"undefined":(0,a.default)(F))==="object")if(O.options.preserveChildrenOrder){if(Z){Z[O.options.childkey]=Z[O.options.childkey]||[],G={};for(j in F)_.call(F,j)&&(G[j]=F[j]);Z[O.options.childkey].push(G),delete F["#name"],(0,f.default)(F).length===1&&l in F&&!O.EXPLICIT_CHARKEY&&(F=F[l])}}else B={},O.options.attrkey in F&&(B[O.options.attrkey]=F[O.options.attrkey],delete F[O.options.attrkey]),!O.options.charsAsChildren&&O.options.charkey in F&&(B[O.options.charkey]=F[O.options.charkey],delete F[O.options.charkey]),(0,u.default)(F).length>0&&(B[O.options.childkey]=F),F=B;return A.length>0?O.assignOrPush(Z,ee,F):(O.options.explicitRoot&&(X=F,F={},F[ee]=X),O.resultObject=F,O.saxParser.ended=!0,O.emit("end",O.resultObject))}}(this),T=function(O){return function(D){var I,j;if(j=A[A.length-1])return j[l]+=D,O.options.explicitChildren&&O.options.preserveChildrenOrder&&O.options.charsAsChildren&&(O.options.includeWhiteChars||D.replace(/\\n/g,"").trim()!=="")&&(j[O.options.childkey]=j[O.options.childkey]||[],I={"#name":"__text__"},I[l]=D,O.options.normalize&&(I[l]=I[l].replace(/\s{2,}/g," ").trim()),j[O.options.childkey].push(I)),j}}(this),this.saxParser.ontext=T,this.saxParser.oncdata=function(O){return function(D){var I;if(I=T(D))return I.cdata=!0}}()},g.prototype.parseString=function(x,l){var T;l!=null&&typeof l=="function"&&(this.on("end",function(A){return this.reset(),l(null,A)}),this.on("error",function(A){return this.reset(),l(A)}));try{return x=x.toString(),x.trim()===""?(this.emit("end",null),!0):(x=c.stripBOM(x),this.options.async?(this.remaining=x,v(this.processAsync),this.saxParser):this.saxParser.write(x).close())}catch(A){if(T=A,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",T),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw T}},g}(d.EventEmitter),E.parseString=function(m,g,x){var l,T,A;return x!=null?(typeof x=="function"&&(l=x),(g===void 0?"undefined":(0,a.default)(g))==="object"&&(T=g)):(typeof g=="function"&&(l=g),T={}),A=new E.Parser(T),A.parseString(m,l)}}).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(S,P,E){"use strict";(function(){var C;C=new RegExp(/(?!xmlns)^.*:/),E.normalize=function(w){return w.toLowerCase()},E.firstCharLowerCase=function(w){return w.charAt(0).toLowerCase()+w.slice(1)},E.stripPrefix=function(w){return w.replace(C,"")},E.parseNumbers=function(w){return isNaN(w)||(w=w%1==0?parseInt(w,10):parseFloat(w)),w},E.parseBooleans=function(w){return/^(?:true|false)$/i.test(w)&&(w=w.toLowerCase()==="true"),w}}).call(void 0)},{}],213:[function(S,P,E){"use strict";(function(){var C,w,u,p,f=function(a,c){function s(){this.constructor=a}for(var d in c)o.call(c,d)&&(a[d]=c[d]);return s.prototype=c.prototype,a.prototype=new s,a.__super__=c.prototype,a},o={}.hasOwnProperty;w=S("./defaults"),C=S("./builder"),u=S("./parser"),p=S("./processors"),E.defaults=w.defaults,E.processors=p,E.ValidationError=function(a){function c(s){this.message=s}return f(c,a),c}(Error),E.Builder=C.Builder,E.Parser=u.Parser,E.parseString=u.parseString}).call(void 0)},{"./builder":209,"./defaults":210,"./parser":211,"./processors":212}],214:[function(S,P,E){"use strict";function C(c){return c&&c.__esModule?c:{default:c}}var w=S("babel-runtime/core-js/object/get-prototype-of"),u=C(w),p=S("babel-runtime/helpers/typeof"),f=C(p),o=S("babel-runtime/core-js/object/assign"),a=C(o);(function(){var c,s,d,i,t,n,h=[].slice,v={}.hasOwnProperty;c=function(){var b,y,_,m,g,x;if(x=arguments[0],g=2<=arguments.length?h.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)&&(x[y]=m[y]);return x},i=function(b){return!!b&&Object.prototype.toString.call(b)==="[object Function]"},t=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]"},d=function(b){var y;if(s(b))return!b.length;for(y in b)if(v.call(b,y))return!1;return!0},n=function(b){var y,_;return t(b)&&(_=(0,u.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=t,P.exports.isArray=s,P.exports.isEmpty=d,P.exports.isPlainObject=n}).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(S,P,E){"use strict";var C=S("babel-runtime/core-js/object/create"),w=function(u){return u&&u.__esModule?u:{default:u}}(C);(function(){P.exports=function(){function u(p,f,o){if(this.options=p.options,this.stringify=p.stringify,f==null)throw new Error("Missing attribute name of element "+p.name);if(o==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(o)}return u.prototype.clone=function(){return(0,w.default)(this)},u.prototype.toString=function(p){return this.options.writer.set(p).attribute(this)},u}()}).call(void 0)},{"babel-runtime/core-js/object/create":19}],216:[function(S,P,E){"use strict";var C=S("babel-runtime/core-js/object/create"),w=function(u){return u&&u.__esModule?u:{default:u}}(C);(function(){var u,p=function(o,a){function c(){this.constructor=o}for(var s in a)f.call(a,s)&&(o[s]=a[s]);return c.prototype=a.prototype,o.prototype=new c,o.__super__=a.prototype,o},f={}.hasOwnProperty;u=S("./XMLNode"),P.exports=function(o){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,o),a.prototype.clone=function(){return(0,w.default)(this)},a.prototype.toString=function(c){return this.options.writer.set(c).cdata(this)},a}(u)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],217:[function(S,P,E){"use strict";var C=S("babel-runtime/core-js/object/create"),w=function(u){return u&&u.__esModule?u:{default:u}}(C);(function(){var u,p=function(o,a){function c(){this.constructor=o}for(var s in a)f.call(a,s)&&(o[s]=a[s]);return c.prototype=a.prototype,o.prototype=new c,o.__super__=a.prototype,o},f={}.hasOwnProperty;u=S("./XMLNode"),P.exports=function(o){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,o),a.prototype.clone=function(){return(0,w.default)(this)},a.prototype.toString=function(c){return this.options.writer.set(c).comment(this)},a}(u)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],218:[function(S,P,E){"use strict";(function(){var C,w=function(p,f){function o(){this.constructor=p}for(var a in f)u.call(f,a)&&(p[a]=f[a]);return o.prototype=f.prototype,p.prototype=new o,p.__super__=f.prototype,p},u={}.hasOwnProperty;C=S("./XMLNode"),P.exports=function(p){function f(o,a,c,s,d,i){if(f.__super__.constructor.call(this,o),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(!d)throw new Error("Missing DTD attribute default");if(d.indexOf("#")!==0&&(d="#"+d),!d.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT");if(i&&!d.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=d}return w(f,p),f.prototype.toString=function(o){return this.options.writer.set(o).dtdAttList(this)},f}(C)}).call(void 0)},{"./XMLNode":227}],219:[function(S,P,E){"use strict";(function(){var C,w=function(p,f){function o(){this.constructor=p}for(var a in f)u.call(f,a)&&(p[a]=f[a]);return o.prototype=f.prototype,p.prototype=new o,p.__super__=f.prototype,p},u={}.hasOwnProperty;C=S("./XMLNode"),P.exports=function(p){function f(o,a,c){if(f.__super__.constructor.call(this,o),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 w(f,p),f.prototype.toString=function(o){return this.options.writer.set(o).dtdElement(this)},f}(C)}).call(void 0)},{"./XMLNode":227}],220:[function(S,P,E){"use strict";(function(){var C,w,u=function(f,o){function a(){this.constructor=f}for(var c in o)p.call(o,c)&&(f[c]=o[c]);return a.prototype=o.prototype,f.prototype=new a,f.__super__=o.prototype,f},p={}.hasOwnProperty;w=S("./Utility").isObject,C=S("./XMLNode"),P.exports=function(f){function o(a,c,s,d){if(o.__super__.constructor.call(this,a),s==null)throw new Error("Missing entity name");if(d==null)throw new Error("Missing entity value");if(this.pe=!!c,this.name=this.stringify.eleName(s),w(d)){if(!d.pubID&&!d.sysID)throw new Error("Public and/or system identifiers are required for an external entity");if(d.pubID&&!d.sysID)throw new Error("System identifier is required for a public external entity");if(d.pubID!=null&&(this.pubID=this.stringify.dtdPubID(d.pubID)),d.sysID!=null&&(this.sysID=this.stringify.dtdSysID(d.sysID)),d.nData!=null&&(this.nData=this.stringify.dtdNData(d.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity")}else this.value=this.stringify.dtdEntityValue(d)}return u(o,f),o.prototype.toString=function(a){return this.options.writer.set(a).dtdEntity(this)},o}(C)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],221:[function(S,P,E){"use strict";(function(){var C,w=function(p,f){function o(){this.constructor=p}for(var a in f)u.call(f,a)&&(p[a]=f[a]);return o.prototype=f.prototype,p.prototype=new o,p.__super__=f.prototype,p},u={}.hasOwnProperty;C=S("./XMLNode"),P.exports=function(p){function f(o,a,c){if(f.__super__.constructor.call(this,o),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 w(f,p),f.prototype.toString=function(o){return this.options.writer.set(o).dtdNotation(this)},f}(C)}).call(void 0)},{"./XMLNode":227}],222:[function(S,P,E){"use strict";(function(){var C,w,u=function(f,o){function a(){this.constructor=f}for(var c in o)p.call(o,c)&&(f[c]=o[c]);return a.prototype=o.prototype,f.prototype=new a,f.__super__=o.prototype,f},p={}.hasOwnProperty;w=S("./Utility").isObject,C=S("./XMLNode"),P.exports=function(f){function o(a,c,s,d){var i;o.__super__.constructor.call(this,a),w(c)&&(i=c,c=i.version,s=i.encoding,d=i.standalone),c||(c="1.0"),this.version=this.stringify.xmlVersion(c),s!=null&&(this.encoding=this.stringify.xmlEncoding(s)),d!=null&&(this.standalone=this.stringify.xmlStandalone(d))}return u(o,f),o.prototype.toString=function(a){return this.options.writer.set(a).declaration(this)},o}(C)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],223:[function(S,P,E){"use strict";(function(){var C,w,u,p,f,o,a=function(s,d){function i(){this.constructor=s}for(var t in d)c.call(d,t)&&(s[t]=d[t]);return i.prototype=d.prototype,s.prototype=new i,s.__super__=d.prototype,s},c={}.hasOwnProperty;o=S("./Utility").isObject,f=S("./XMLNode"),C=S("./XMLDTDAttList"),u=S("./XMLDTDEntity"),w=S("./XMLDTDElement"),p=S("./XMLDTDNotation"),P.exports=function(s){function d(i,t,n){var h,v;d.__super__.constructor.call(this,i),this.documentObject=i,o(t)&&(h=t,t=h.pubID,n=h.sysID),n==null&&(v=[t,n],n=v[0],t=v[1]),t!=null&&(this.pubID=this.stringify.dtdPubID(t)),n!=null&&(this.sysID=this.stringify.dtdSysID(n))}return a(d,s),d.prototype.element=function(i,t){var n;return n=new w(this,i,t),this.children.push(n),this},d.prototype.attList=function(i,t,n,h,v){var b;return b=new C(this,i,t,n,h,v),this.children.push(b),this},d.prototype.entity=function(i,t){var n;return n=new u(this,!1,i,t),this.children.push(n),this},d.prototype.pEntity=function(i,t){var n;return n=new u(this,!0,i,t),this.children.push(n),this},d.prototype.notation=function(i,t){var n;return n=new p(this,i,t),this.children.push(n),this},d.prototype.toString=function(i){return this.options.writer.set(i).docType(this)},d.prototype.ele=function(i,t){return this.element(i,t)},d.prototype.att=function(i,t,n,h,v){return this.attList(i,t,n,h,v)},d.prototype.ent=function(i,t){return this.entity(i,t)},d.prototype.pent=function(i,t){return this.pEntity(i,t)},d.prototype.not=function(i,t){return this.notation(i,t)},d.prototype.up=function(){return this.root()||this.documentObject},d}(f)}).call(void 0)},{"./Utility":214,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLNode":227}],224:[function(S,P,E){"use strict";(function(){var C,w,u,p,f=function(a,c){function s(){this.constructor=a}for(var d in c)o.call(c,d)&&(a[d]=c[d]);return s.prototype=c.prototype,a.prototype=new s,a.__super__=c.prototype,a},o={}.hasOwnProperty;p=S("./Utility").isPlainObject,C=S("./XMLNode"),u=S("./XMLStringifier"),w=S("./XMLStringWriter"),P.exports=function(a){function c(s){c.__super__.constructor.call(this,null),s||(s={}),s.writer||(s.writer=new w),this.options=s,this.stringify=new u(s),this.isDocument=!0}return f(c,a),c.prototype.end=function(s){var d;return s?p(s)&&(d=s,s=this.options.writer.set(d)):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(S,P,E){"use strict";(function(){var C,w,u,p,f,o,a,c,s,d,i,t,n,h,v,b,y,_,m,g={}.hasOwnProperty;m=S("./Utility"),y=m.isObject,b=m.isFunction,_=m.isPlainObject,d=S("./XMLElement"),w=S("./XMLCData"),u=S("./XMLComment"),t=S("./XMLRaw"),v=S("./XMLText"),i=S("./XMLProcessingInstruction"),c=S("./XMLDeclaration"),s=S("./XMLDocType"),p=S("./XMLDTDAttList"),o=S("./XMLDTDEntity"),f=S("./XMLDTDElement"),a=S("./XMLDTDNotation"),C=S("./XMLAttribute"),h=S("./XMLStringifier"),n=S("./XMLStringWriter"),P.exports=function(){function x(l,T,A){var O;l||(l={}),l.writer?_(l.writer)&&(O=l.writer,l.writer=new n(O)):l.writer=new n(l),this.options=l,this.writer=l.writer,this.stringify=new h(l),this.onDataCallback=T||function(){},this.onEndCallback=A||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return x.prototype.node=function(l,T,A){var O;if(l==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(),l=l.valueOf(),T==null&&(T={}),T=T.valueOf(),y(T)||(O=[T,A],A=O[0],T=O[1]),this.currentNode=new d(this,l,T),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,A!=null&&this.text(A),this},x.prototype.element=function(l,T,A){return this.currentNode&&this.currentNode instanceof s?this.dtdElement.apply(this,arguments):this.node(l,T,A)},x.prototype.attribute=function(l,T){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(l!=null&&(l=l.valueOf()),y(l))for(A in l)g.call(l,A)&&(O=l[A],this.attribute(A,O));else b(T)&&(T=T.apply()),this.options.skipNullAttributes&&T==null||(this.currentNode.attributes[l]=new C(this,l,T));return this},x.prototype.text=function(l){var T;return this.openCurrent(),T=new v(this,l),this.onData(this.writer.text(T,this.currentLevel+1)),this},x.prototype.cdata=function(l){var T;return this.openCurrent(),T=new w(this,l),this.onData(this.writer.cdata(T,this.currentLevel+1)),this},x.prototype.comment=function(l){var T;return this.openCurrent(),T=new u(this,l),this.onData(this.writer.comment(T,this.currentLevel+1)),this},x.prototype.raw=function(l){var T;return this.openCurrent(),T=new t(this,l),this.onData(this.writer.raw(T,this.currentLevel+1)),this},x.prototype.instruction=function(l,T){var A,O,D,I,j;if(this.openCurrent(),l!=null&&(l=l.valueOf()),T!=null&&(T=T.valueOf()),Array.isArray(l))for(A=0,I=l.length;A<I;A++)O=l[A],this.instruction(O);else if(y(l))for(O in l)g.call(l,O)&&(D=l[O],this.instruction(O,D));else b(T)&&(T=T.apply()),j=new i(this,l,T),this.onData(this.writer.processingInstruction(j,this.currentLevel+1));return this},x.prototype.declaration=function(l,T,A){var O;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node");return O=new c(this,l,T,A),this.onData(this.writer.declaration(O,this.currentLevel+1)),this},x.prototype.doctype=function(l,T,A){if(this.openCurrent(),l==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,T,A),this.currentNode.rootNodeName=l,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},x.prototype.dtdElement=function(l,T){var A;return this.openCurrent(),A=new f(this,l,T),this.onData(this.writer.dtdElement(A,this.currentLevel+1)),this},x.prototype.attList=function(l,T,A,O,D){var I;return this.openCurrent(),I=new p(this,l,T,A,O,D),this.onData(this.writer.dtdAttList(I,this.currentLevel+1)),this},x.prototype.entity=function(l,T){var A;return this.openCurrent(),A=new o(this,!1,l,T),this.onData(this.writer.dtdEntity(A,this.currentLevel+1)),this},x.prototype.pEntity=function(l,T){var A;return this.openCurrent(),A=new o(this,!0,l,T),this.onData(this.writer.dtdEntity(A,this.currentLevel+1)),this},x.prototype.notation=function(l,T){var A;return this.openCurrent(),A=new a(this,l,T),this.onData(this.writer.dtdNotation(A,this.currentLevel+1)),this},x.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},x.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},x.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},x.prototype.openNode=function(l){if(!l.isOpen)return!this.root&&this.currentLevel===0&&l instanceof d&&(this.root=l),this.onData(this.writer.openNode(l,this.currentLevel)),l.isOpen=!0},x.prototype.closeNode=function(l){if(!l.isClosed)return this.onData(this.writer.closeNode(l,this.currentLevel)),l.isClosed=!0},x.prototype.onData=function(l){return this.documentStarted=!0,this.onDataCallback(l)},x.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},x.prototype.ele=function(){return this.element.apply(this,arguments)},x.prototype.nod=function(l,T,A){return this.node(l,T,A)},x.prototype.txt=function(l){return this.text(l)},x.prototype.dat=function(l){return this.cdata(l)},x.prototype.com=function(l){return this.comment(l)},x.prototype.ins=function(l,T){return this.instruction(l,T)},x.prototype.dec=function(l,T,A){return this.declaration(l,T,A)},x.prototype.dtd=function(l,T,A){return this.doctype(l,T,A)},x.prototype.e=function(l,T,A){return this.element(l,T,A)},x.prototype.n=function(l,T,A){return this.node(l,T,A)},x.prototype.t=function(l){return this.text(l)},x.prototype.d=function(l){return this.cdata(l)},x.prototype.c=function(l){return this.comment(l)},x.prototype.r=function(l){return this.raw(l)},x.prototype.i=function(l,T){return this.instruction(l,T)},x.prototype.att=function(){return this.currentNode&&this.currentNode instanceof s?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},x.prototype.a=function(){return this.currentNode&&this.currentNode instanceof s?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},x.prototype.ent=function(l,T){return this.entity(l,T)},x.prototype.pent=function(l,T){return this.pEntity(l,T)},x.prototype.not=function(l,T){return this.notation(l,T)},x}()}).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(S,P,E){"use strict";var C=S("babel-runtime/core-js/object/create"),w=function(u){return u&&u.__esModule?u:{default:u}}(C);(function(){var u,p,f,o,a,c=function(d,i){function t(){this.constructor=d}for(var n in i)s.call(i,n)&&(d[n]=i[n]);return t.prototype=i.prototype,d.prototype=new t,d.__super__=i.prototype,d},s={}.hasOwnProperty;a=S("./Utility"),o=a.isObject,f=a.isFunction,p=S("./XMLNode"),u=S("./XMLAttribute"),P.exports=function(d){function i(t,n,h){if(i.__super__.constructor.call(this,t),n==null)throw new Error("Missing element name");this.name=this.stringify.eleName(n),this.attributes={},h!=null&&this.attribute(h),t.isDocument&&(this.isRoot=!0,this.documentObject=t,t.rootObject=this)}return c(i,d),i.prototype.clone=function(){var t,n,h,v;h=(0,w.default)(this),h.isRoot&&(h.documentObject=null),h.attributes={},v=this.attributes;for(n in v)s.call(v,n)&&(t=v[n],h.attributes[n]=t.clone());return h.children=[],this.children.forEach(function(b){var y;return y=b.clone(),y.parent=h,h.children.push(y)}),h},i.prototype.attribute=function(t,n){var h,v;if(t!=null&&(t=t.valueOf()),o(t))for(h in t)s.call(t,h)&&(v=t[h],this.attribute(h,v));else f(n)&&(n=n.apply()),this.options.skipNullAttributes&&n==null||(this.attributes[t]=new u(this,t,n));return this},i.prototype.removeAttribute=function(t){var n,h,v;if(t==null)throw new Error("Missing attribute name");if(t=t.valueOf(),Array.isArray(t))for(h=0,v=t.length;h<v;h++)n=t[h],delete this.attributes[n];else delete this.attributes[t];return this},i.prototype.toString=function(t){return this.options.writer.set(t).element(this)},i.prototype.att=function(t,n){return this.attribute(t,n)},i.prototype.a=function(t,n){return this.attribute(t,n)},i}(p)}).call(void 0)},{"./Utility":214,"./XMLAttribute":215,"./XMLNode":227,"babel-runtime/core-js/object/create":19}],227:[function(S,P,E){"use strict";(function(){var C,w,u,p,f,o,a,c,s,d,i,t,n={}.hasOwnProperty;t=S("./Utility"),i=t.isObject,d=t.isFunction,s=t.isEmpty,f=null,C=null,w=null,u=null,p=null,a=null,c=null,o=null,P.exports=function(){function h(v){this.parent=v,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.children=[],f||(f=S("./XMLElement"),C=S("./XMLCData"),w=S("./XMLComment"),u=S("./XMLDeclaration"),p=S("./XMLDocType"),a=S("./XMLRaw"),c=S("./XMLText"),o=S("./XMLProcessingInstruction"))}return h.prototype.element=function(v,b,y){var _,m,g,x,l,T,A,O,D,I;if(T=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],T=this.element(m);else if(d(v))T=this.element(v.apply());else if(i(v)){for(l in v)if(n.call(v,l))if(I=v[l],d(I)&&(I=I.apply()),i(I)&&s(I)&&(I=null),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&l.indexOf(this.stringify.convertAttKey)===0)T=this.attribute(l.substr(this.stringify.convertAttKey.length),I);else if(!this.options.separateArrayItems&&Array.isArray(I))for(x=0,O=I.length;x<O;x++)m=I[x],_={},_[l]=m,T=this.element(_);else i(I)?(T=this.element(l),T.element(I)):T=this.element(l,I)}else T=!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(T==null)throw new Error("Could not create any elements with: "+v);return T},h.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),_},h.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),_},h.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},h.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(_),_},h.prototype.text=function(v){var b;return b=new c(this,v),this.children.push(b),this},h.prototype.cdata=function(v){var b;return b=new C(this,v),this.children.push(b),this},h.prototype.comment=function(v){var b;return b=new w(this,v),this.children.push(b),this},h.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},h.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},h.prototype.raw=function(v){var b;return b=new a(this,v),this.children.push(b),this},h.prototype.instruction=function(v,b){var y,_,m,g,x;if(v!=null&&(v=v.valueOf()),b!=null&&(b=b.valueOf()),Array.isArray(v))for(g=0,x=v.length;g<x;g++)y=v[g],this.instruction(y);else if(i(v))for(y in v)n.call(v,y)&&(_=v[y],this.instruction(y,_));else d(b)&&(b=b.apply()),m=new o(this,v,b),this.children.push(m);return this},h.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},h.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},h.prototype.declaration=function(v,b,y){var _,m;return _=this.document(),m=new u(_,v,b,y),_.children[0]instanceof u?_.children[0]=m:_.children.unshift(m),_.root()||_},h.prototype.doctype=function(v,b){var y,_,m,g,x,l,T,A,O,D;for(_=this.document(),m=new p(_,v,b),O=_.children,g=x=0,T=O.length;x<T;g=++x)if((y=O[g])instanceof p)return _.children[g]=m,m;for(D=_.children,g=l=0,A=D.length;l<A;g=++l)if(y=D[g],y.isRoot)return _.children.splice(g,0,m),m;return _.children.push(m),m},h.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},h.prototype.root=function(){var v;for(v=this;v;){if(v.isDocument)return v.rootObject;if(v.isRoot)return v;v=v.parent}},h.prototype.document=function(){var v;for(v=this;v;){if(v.isDocument)return v;v=v.parent}},h.prototype.end=function(v){return this.document().end(v)},h.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]},h.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]},h.prototype.importDocument=function(v){var b;return b=v.root().clone(),b.parent=this,b.isRoot=!1,this.children.push(b),this},h.prototype.ele=function(v,b,y){return this.element(v,b,y)},h.prototype.nod=function(v,b,y){return this.node(v,b,y)},h.prototype.txt=function(v){return this.text(v)},h.prototype.dat=function(v){return this.cdata(v)},h.prototype.com=function(v){return this.comment(v)},h.prototype.ins=function(v,b){return this.instruction(v,b)},h.prototype.doc=function(){return this.document()},h.prototype.dec=function(v,b,y){return this.declaration(v,b,y)},h.prototype.dtd=function(v,b){return this.doctype(v,b)},h.prototype.e=function(v,b,y){return this.element(v,b,y)},h.prototype.n=function(v,b,y){return this.node(v,b,y)},h.prototype.t=function(v){return this.text(v)},h.prototype.d=function(v){return this.cdata(v)},h.prototype.c=function(v){return this.comment(v)},h.prototype.r=function(v){return this.raw(v)},h.prototype.i=function(v,b){return this.instruction(v,b)},h.prototype.u=function(){return this.up()},h.prototype.importXMLBuilder=function(v){return this.importDocument(v)},h}()}).call(void 0)},{"./Utility":214,"./XMLCData":216,"./XMLComment":217,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233}],228:[function(S,P,E){"use strict";var C=S("babel-runtime/core-js/object/create"),w=function(u){return u&&u.__esModule?u:{default:u}}(C);(function(){var u,p=function(o,a){function c(){this.constructor=o}for(var s in a)f.call(a,s)&&(o[s]=a[s]);return c.prototype=a.prototype,o.prototype=new c,o.__super__=a.prototype,o},f={}.hasOwnProperty;u=S("./XMLNode"),P.exports=function(o){function a(c,s,d){if(a.__super__.constructor.call(this,c),s==null)throw new Error("Missing instruction target");this.target=this.stringify.insTarget(s),d&&(this.value=this.stringify.insValue(d))}return p(a,o),a.prototype.clone=function(){return(0,w.default)(this)},a.prototype.toString=function(c){return this.options.writer.set(c).processingInstruction(this)},a}(u)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],229:[function(S,P,E){"use strict";var C=S("babel-runtime/core-js/object/create"),w=function(u){return u&&u.__esModule?u:{default:u}}(C);(function(){var u,p=function(o,a){function c(){this.constructor=o}for(var s in a)f.call(a,s)&&(o[s]=a[s]);return c.prototype=a.prototype,o.prototype=new c,o.__super__=a.prototype,o},f={}.hasOwnProperty;u=S("./XMLNode"),P.exports=function(o){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,o),a.prototype.clone=function(){return(0,w.default)(this)},a.prototype.toString=function(c){return this.options.writer.set(c).raw(this)},a}(u)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],230:[function(S,P,E){"use strict";(function(){var C,w,u,p,f,o,a,c,s,d,i,t,n,h=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=S("./XMLDeclaration"),c=S("./XMLDocType"),C=S("./XMLCData"),w=S("./XMLComment"),s=S("./XMLElement"),i=S("./XMLRaw"),t=S("./XMLText"),d=S("./XMLProcessingInstruction"),u=S("./XMLDTDAttList"),p=S("./XMLDTDElement"),f=S("./XMLDTDEntity"),o=S("./XMLDTDNotation"),n=S("./XMLWriterBase"),P.exports=function(b){function y(_,m){y.__super__.constructor.call(this,m),this.stream=_}return h(y,b),y.prototype.document=function(_){var m,g,x,l,T,A,O,D;for(A=_.children,g=0,l=A.length;g<l;g++)m=A[g],m.isLastRootNode=!1;for(_.children[_.children.length-1].isLastRootNode=!0,O=_.children,D=[],x=0,T=O.length;x<T;x++)switch(m=O[x],!1){case!(m instanceof a):D.push(this.declaration(m));break;case!(m instanceof c):D.push(this.docType(m));break;case!(m instanceof w):D.push(this.comment(m));break;case!(m instanceof d):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,x,l,T;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(_)),T=_.children,x=0,l=T.length;x<l;x++)switch(g=T[x],!1){case!(g instanceof u):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 o):this.dtdNotation(g,m+1);break;case!(g instanceof C):this.cdata(g,m+1);break;case!(g instanceof w):this.comment(g,m+1);break;case!(g instanceof d):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,x,l,T,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(j){return j.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,l=0,T=D.length;l<T;l++)switch(x=D[l],!1){case!(x instanceof C):this.cdata(x,m+1);break;case!(x instanceof w):this.comment(x,m+1);break;case!(x instanceof s):this.element(x,m+1);break;case!(x instanceof i):this.raw(x,m+1);break;case!(x instanceof t):this.text(x,m+1);break;case!(x instanceof d):this.processingInstruction(x,m+1);break;default:throw new Error("Unknown XML node type: "+x.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}(n)}).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(S,P,E){"use strict";(function(){var C,w,u,p,f,o,a,c,s,d,i,t,n,h=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=S("./XMLDeclaration"),c=S("./XMLDocType"),C=S("./XMLCData"),w=S("./XMLComment"),s=S("./XMLElement"),i=S("./XMLRaw"),t=S("./XMLText"),d=S("./XMLProcessingInstruction"),u=S("./XMLDTDAttList"),p=S("./XMLDTDElement"),f=S("./XMLDTDEntity"),o=S("./XMLDTDNotation"),n=S("./XMLWriterBase"),P.exports=function(b){function y(_){y.__super__.constructor.call(this,_)}return h(y,b),y.prototype.document=function(_){var m,g,x,l,T;for(this.textispresent=!1,l="",T=_.children,g=0,x=T.length;g<x;g++)m=T[g],l+=function(){switch(!1){case!(m instanceof a):return this.declaration(m);case!(m instanceof c):return this.docType(m);case!(m instanceof w):return this.comment(m);case!(m instanceof d):return this.processingInstruction(m);default:return this.element(m,0)}}.call(this);return this.pretty&&l.slice(-this.newline.length)===this.newline&&(l=l.slice(0,-this.newline.length)),l},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,x,l,T,A;if(m||(m=0),T=this.space(m),T+="<!DOCTYPE "+_.root().name,_.pubID&&_.sysID?T+=' PUBLIC "'+_.pubID+'" "'+_.sysID+'"':_.sysID&&(T+=' SYSTEM "'+_.sysID+'"'),_.children.length>0){for(T+=" [",T+=this.newline,A=_.children,x=0,l=A.length;x<l;x++)g=A[x],T+=function(){switch(!1){case!(g instanceof u):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 o):return this.dtdNotation(g,m+1);case!(g instanceof C):return this.cdata(g,m+1);case!(g instanceof w):return this.comment(g,m+1);case!(g instanceof d):return this.processingInstruction(g,m+1);default:throw new Error("Unknown DTD node type: "+g.constructor.name)}}.call(this);T+="]"}return T+=this.spacebeforeslash+">",T+=this.newline},y.prototype.element=function(_,m){var g,x,l,T,A,O,D,I,j,B,ee,F,G;m||(m=0),G=!1,this.textispresent?(this.newline="",this.pretty=!1):(this.newline=this.newlinedefault,this.pretty=this.prettydefault),F=this.space(m),I="",I+=F+"<"+_.name,j=_.attributes;for(D in j)v.call(j,D)&&(g=j[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(B=_.children,l=0,A=B.length;l<A;l++)if(x=B[l],x.value!=null){this.textispresent++,G=!0;break}}for(this.textispresent&&(this.newline="",this.pretty=!1,F=this.space(m)),I+=">"+this.newline,ee=_.children,T=0,O=ee.length;T<O;T++)x=ee[T],I+=function(){switch(!1){case!(x instanceof C):return this.cdata(x,m+1);case!(x instanceof w):return this.comment(x,m+1);case!(x instanceof s):return this.element(x,m+1);case!(x instanceof i):return this.raw(x,m+1);case!(x instanceof t):return this.text(x,m+1);case!(x instanceof d):return this.processingInstruction(x,m+1);default:throw new Error("Unknown XML node type: "+x.constructor.name)}}.call(this);G&&this.textispresent--,this.textispresent||(this.newline=this.newlinedefault,this.pretty=this.prettydefault),I+=F+"</"+_.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,x,l,T;if(m||(m=0),_ instanceof s){l=this.space(m)+"<"+_.name,T=_.attributes;for(x in T)v.call(T,x)&&(g=T[x],l+=this.attribute(g));return l+=(_.children?">":"/>")+this.newline}return l=this.space(m)+"<!DOCTYPE "+_.rootNodeName,_.pubID&&_.sysID?l+=' PUBLIC "'+_.pubID+'" "'+_.sysID+'"':_.sysID&&(l+=' SYSTEM "'+_.sysID+'"'),l+=(_.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}(n)}).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(S,P,E){"use strict";(function(){var C=function(u,p){return function(){return u.apply(p,arguments)}},w={}.hasOwnProperty;P.exports=function(){function u(p){this.assertLegalChar=C(this.assertLegalChar,this);var f,o,a;p||(p={}),this.noDoubleEncoding=p.noDoubleEncoding,o=p.stringify||{};for(f in o)w.call(o,f)&&(a=o[f],this[f]=a)}return u.prototype.eleName=function(p){return p=""+p||"",this.assertLegalChar(p)},u.prototype.eleText=function(p){return p=""+p||"",this.assertLegalChar(this.elEscape(p))},u.prototype.cdata=function(p){return p=""+p||"",p=p.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(p)},u.prototype.comment=function(p){if(p=""+p||"",p.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+p);return this.assertLegalChar(p)},u.prototype.raw=function(p){return""+p||""},u.prototype.attName=function(p){return p=""+p||""},u.prototype.attValue=function(p){return p=""+p||"",this.attEscape(p)},u.prototype.insTarget=function(p){return""+p||""},u.prototype.insValue=function(p){if(p=""+p||"",p.match(/\?>/))throw new Error("Invalid processing instruction value: "+p);return p},u.prototype.xmlVersion=function(p){if(p=""+p||"",!p.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+p);return p},u.prototype.xmlEncoding=function(p){if(p=""+p||"",!p.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+p);return p},u.prototype.xmlStandalone=function(p){return p?"yes":"no"},u.prototype.dtdPubID=function(p){return""+p||""},u.prototype.dtdSysID=function(p){return""+p||""},u.prototype.dtdElementValue=function(p){return""+p||""},u.prototype.dtdAttType=function(p){return""+p||""},u.prototype.dtdAttDefault=function(p){return p!=null?""+p||"":p},u.prototype.dtdEntityValue=function(p){return""+p||""},u.prototype.dtdNData=function(p){return""+p||""},u.prototype.convertAttKey="@",u.prototype.convertPIKey="?",u.prototype.convertTextKey="#text",u.prototype.convertCDataKey="#cdata",u.prototype.convertCommentKey="#comment",u.prototype.convertRawKey="#raw",u.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},u.prototype.elEscape=function(p){var f;return f=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,p.replace(f,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
")},u.prototype.attEscape=function(p){var f;return f=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,p.replace(f,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
")},u}()}).call(void 0)},{}],233:[function(S,P,E){"use strict";var C=S("babel-runtime/core-js/object/create"),w=function(u){return u&&u.__esModule?u:{default:u}}(C);(function(){var u,p=function(o,a){function c(){this.constructor=o}for(var s in a)f.call(a,s)&&(o[s]=a[s]);return c.prototype=a.prototype,o.prototype=new c,o.__super__=a.prototype,o},f={}.hasOwnProperty;u=S("./XMLNode"),P.exports=function(o){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,o),a.prototype.clone=function(){return(0,w.default)(this)},a.prototype.toString=function(c){return this.options.writer.set(c).text(this)},a}(u)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],234:[function(S,P,E){"use strict";(function(){var C={}.hasOwnProperty;P.exports=function(){function w(u){var p,f,o,a,c,s,d,i,t;u||(u={}),this.pretty=u.pretty||!1,this.allowEmpty=(f=u.allowEmpty)!=null&&f,this.pretty?(this.indent=(o=u.indent)!=null?o:" ",this.newline=(a=u.newline)!=null?a:`
|
|
|
`,this.offset=(c=u.offset)!=null?c:0,this.dontprettytextnodes=(s=u.dontprettytextnodes)!=null?s:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash=(d=u.spacebeforeslash)!=null?d:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,i=u.writer||{};for(p in i)C.call(i,p)&&(t=i[p],this[p]=t)}return w.prototype.set=function(u){var p,f,o;u||(u={}),"pretty"in u&&(this.pretty=u.pretty),"allowEmpty"in u&&(this.allowEmpty=u.allowEmpty),this.pretty?(this.indent="indent"in u?u.indent:" ",this.newline="newline"in u?u.newline:`
|
|
|
`,this.offset="offset"in u?u.offset:0,this.dontprettytextnodes="dontprettytextnodes"in u?u.dontprettytextnodes:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash="spacebeforeslash"in u?u.spacebeforeslash:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,f=u.writer||{};for(p in f)C.call(f,p)&&(o=f[p],this[p]=o);return this},w.prototype.space=function(u){var p;return this.pretty?(p=(u||0)+this.offset+1,p>0?new Array(p).join(this.indent):""):""},w}()}).call(void 0)},{}],235:[function(S,P,E){"use strict";(function(){var C,w,u,p,f,o,a;a=S("./Utility"),f=a.assign,o=a.isFunction,C=S("./XMLDocument"),w=S("./XMLDocumentCB"),p=S("./XMLStringWriter"),u=S("./XMLStreamWriter"),P.exports.create=function(c,s,d,i){var t,n;if(c==null)throw new Error("Root element needs a name");return i=f({},s,d,i),t=new C(i),n=t.element(c),i.headless||(t.declaration(i),i.pubID==null&&i.sysID==null||t.doctype(i)),n},P.exports.begin=function(c,s,d){var i;return o(c)&&(i=[c,s],s=i[0],d=i[1],c={}),s?new w(c,s,d):new C(c)},P.exports.stringWriter=function(c){return new p(c)},P.exports.streamWriter=function(c,s){return new u(c,s)}}).call(void 0)},{"./Utility":214,"./XMLDocument":224,"./XMLDocumentCB":225,"./XMLStreamWriter":230,"./XMLStringWriter":231}],236:[function(S,P,E){function C(){for(var u={},p=0;p<arguments.length;p++){var f=arguments[p];for(var o in f)w.call(f,o)&&(u[o]=f[o])}return u}P.exports=C;var w=Object.prototype.hasOwnProperty},{}],237:[function(S,P,E){"use strict";function C(i,t,n){p.isBuffer(t)||(t=new p(t)),p.isBuffer(n)||(n=new p(n)),t.length>s?t=i(t):t.length<s&&(t=p.concat([t,d],s));for(var h=new p(s),v=new p(s),b=0;b<s;b++)h[b]=54^t[b],v[b]=92^t[b];var y=i(p.concat([h,n]));return i(p.concat([v,y]))}function w(i,t){i=i||"sha1";var n=c[i],h=[],v=0;return n||u("algorithm:",i,"is not yet supported"),{update:function(b){return p.isBuffer(b)||(b=new p(b)),h.push(b),v+=b.length,this},digest:function(b){var y=p.concat(h),_=t?C(n,t,y):n(y);return h=null,b?_.toString(b):_}}}function u(){var i=[].slice.call(arguments).join(" ");throw new Error([i,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
|
|
|
`))}var p=S("buffer").Buffer,f=S("./sha"),o=S("./sha256"),a=S("./md5"),c={sha1:f,sha256:o,md5:a},s=64,d=new p(s);d.fill(0),E.createHash=function(i){return w(i)},E.createHmac=function(i,t){return w(i,t)},function(i,t){for(var n in i)t(i[n],n)}(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],function(i){E[i]=function(){u("sorry,",i,"is not implemented yet")}})},{"./md5":239,"./sha":240,"./sha256":241,buffer:38}],238:[function(S,P,E){"use strict";function C(c,s){if(c.length%f!=0){var d=c.length+(f-c.length%f);c=p.concat([c,o],d)}for(var i=[],t=s?c.readInt32BE:c.readInt32LE,n=0;n<c.length;n+=f)i.push(t.call(c,n));return i}function w(c,s,d){for(var i=new p(s),t=d?i.writeInt32BE:i.writeInt32LE,n=0;n<c.length;n++)t.call(i,c[n],4*n,!0);return i}function u(c,s,d,i){return p.isBuffer(c)||(c=new p(c)),w(s(C(c,i),c.length*a),d,i)}var p=S("buffer").Buffer,f=4,o=new p(f);o.fill(0);var a=8;P.exports={hash:u}},{buffer:38}],239:[function(S,P,E){"use strict";function C(d,i){d[i>>5]|=128<<i%32,d[14+(i+64>>>9<<4)]=i;for(var t=1732584193,n=-271733879,h=-1732584194,v=271733878,b=0;b<d.length;b+=16){var y=t,_=n,m=h,g=v;t=u(t,n,h,v,d[b+0],7,-680876936),v=u(v,t,n,h,d[b+1],12,-389564586),h=u(h,v,t,n,d[b+2],17,606105819),n=u(n,h,v,t,d[b+3],22,-1044525330),t=u(t,n,h,v,d[b+4],7,-176418897),v=u(v,t,n,h,d[b+5],12,1200080426),h=u(h,v,t,n,d[b+6],17,-1473231341),n=u(n,h,v,t,d[b+7],22,-45705983),t=u(t,n,h,v,d[b+8],7,1770035416),v=u(v,t,n,h,d[b+9],12,-1958414417),h=u(h,v,t,n,d[b+10],17,-42063),n=u(n,h,v,t,d[b+11],22,-1990404162),t=u(t,n,h,v,d[b+12],7,1804603682),v=u(v,t,n,h,d[b+13],12,-40341101),h=u(h,v,t,n,d[b+14],17,-1502002290),n=u(n,h,v,t,d[b+15],22,1236535329),t=p(t,n,h,v,d[b+1],5,-165796510),v=p(v,t,n,h,d[b+6],9,-1069501632),h=p(h,v,t,n,d[b+11],14,643717713),n=p(n,h,v,t,d[b+0],20,-373897302),t=p(t,n,h,v,d[b+5],5,-701558691),v=p(v,t,n,h,d[b+10],9,38016083),h=p(h,v,t,n,d[b+15],14,-660478335),n=p(n,h,v,t,d[b+4],20,-405537848),t=p(t,n,h,v,d[b+9],5,568446438),v=p(v,t,n,h,d[b+14],9,-1019803690),h=p(h,v,t,n,d[b+3],14,-187363961),n=p(n,h,v,t,d[b+8],20,1163531501),t=p(t,n,h,v,d[b+13],5,-1444681467),v=p(v,t,n,h,d[b+2],9,-51403784),h=p(h,v,t,n,d[b+7],14,1735328473),n=p(n,h,v,t,d[b+12],20,-1926607734),t=f(t,n,h,v,d[b+5],4,-378558),v=f(v,t,n,h,d[b+8],11,-2022574463),h=f(h,v,t,n,d[b+11],16,1839030562),n=f(n,h,v,t,d[b+14],23,-35309556),t=f(t,n,h,v,d[b+1],4,-1530992060),v=f(v,t,n,h,d[b+4],11,1272893353),h=f(h,v,t,n,d[b+7],16,-155497632),n=f(n,h,v,t,d[b+10],23,-1094730640),t=f(t,n,h,v,d[b+13],4,681279174),v=f(v,t,n,h,d[b+0],11,-358537222),h=f(h,v,t,n,d[b+3],16,-722521979),n=f(n,h,v,t,d[b+6],23,76029189),t=f(t,n,h,v,d[b+9],4,-640364487),v=f(v,t,n,h,d[b+12],11,-421815835),h=f(h,v,t,n,d[b+15],16,530742520),n=f(n,h,v,t,d[b+2],23,-995338651),t=o(t,n,h,v,d[b+0],6,-198630844),v=o(v,t,n,h,d[b+7],10,1126891415),h=o(h,v,t,n,d[b+14],15,-1416354905),n=o(n,h,v,t,d[b+5],21,-57434055),t=o(t,n,h,v,d[b+12],6,1700485571),v=o(v,t,n,h,d[b+3],10,-1894986606),h=o(h,v,t,n,d[b+10],15,-1051523),n=o(n,h,v,t,d[b+1],21,-2054922799),t=o(t,n,h,v,d[b+8],6,1873313359),v=o(v,t,n,h,d[b+15],10,-30611744),h=o(h,v,t,n,d[b+6],15,-1560198380),n=o(n,h,v,t,d[b+13],21,1309151649),t=o(t,n,h,v,d[b+4],6,-145523070),v=o(v,t,n,h,d[b+11],10,-1120210379),h=o(h,v,t,n,d[b+2],15,718787259),n=o(n,h,v,t,d[b+9],21,-343485551),t=a(t,y),n=a(n,_),h=a(h,m),v=a(v,g)}return Array(t,n,h,v)}function w(d,i,t,n,h,v){return a(c(a(a(i,d),a(n,v)),h),t)}function u(d,i,t,n,h,v,b){return w(i&t|~i&n,d,i,h,v,b)}function p(d,i,t,n,h,v,b){return w(i&n|t&~n,d,i,h,v,b)}function f(d,i,t,n,h,v,b){return w(i^t^n,d,i,h,v,b)}function o(d,i,t,n,h,v,b){return w(t^(i|~n),d,i,h,v,b)}function a(d,i){var t=(65535&d)+(65535&i);return(d>>16)+(i>>16)+(t>>16)<<16|65535&t}function c(d,i){return d<<i|d>>>32-i}var s=S("./helpers");P.exports=function(d){return s.hash(d,C,16)}},{"./helpers":238}],240:[function(S,P,E){"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),d=1732584193,i=-271733879,t=-1732584194,n=271733878,h=-1009589776,v=0;v<a.length;v+=16){for(var b=d,y=i,_=t,m=n,g=h,x=0;x<80;x++){s[x]=x<16?a[v+x]:f(s[x-3]^s[x-8]^s[x-14]^s[x-16],1);var l=p(p(f(d,5),w(x,i,t,n)),p(p(h,s[x]),u(x)));h=n,n=t,t=f(i,30),i=d,d=l}d=p(d,b),i=p(i,y),t=p(t,_),n=p(n,m),h=p(h,g)}return Array(d,i,t,n,h)}function w(a,c,s,d){return a<20?c&s|~c&d:a<40?c^s^d:a<60?c&s|c&d|s&d:c^s^d}function u(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 o=S("./helpers");P.exports=function(a){return o.hash(a,C,20,!0)}},{"./helpers":238}],241:[function(S,P,E){"use strict";var C=S("./helpers"),w=function(t,n){var h=(65535&t)+(65535&n);return(t>>16)+(n>>16)+(h>>16)<<16|65535&h},u=function(t,n){return t>>>n|t<<32-n},p=function(t,n){return t>>>n},f=function(t,n,h){return t&n^~t&h},o=function(t,n,h){return t&n^t&h^n&h},a=function(t){return u(t,2)^u(t,13)^u(t,22)},c=function(t){return u(t,6)^u(t,11)^u(t,25)},s=function(t){return u(t,7)^u(t,18)^p(t,3)},d=function(t){return u(t,17)^u(t,19)^p(t,10)},i=function(t,n){var h,v,b,y,_,m,g,x,l,T,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),j=new Array(64);t[n>>5]|=128<<24-n%32,t[15+(n+64>>9<<4)]=n;for(var l=0;l<t.length;l+=16){h=I[0],v=I[1],b=I[2],y=I[3],_=I[4],m=I[5],g=I[6],x=I[7];for(var T=0;T<64;T++)j[T]=T<16?t[T+l]:w(w(w(d(j[T-2]),j[T-7]),s(j[T-15])),j[T-16]),A=w(w(w(w(x,c(_)),f(_,m,g)),D[T]),j[T]),O=w(a(h),o(h,v,b)),x=g,g=m,m=_,_=w(y,A),y=b,b=v,v=h,h=w(A,O);I[0]=w(h,I[0]),I[1]=w(v,I[1]),I[2]=w(b,I[2]),I[3]=w(y,I[3]),I[4]=w(_,I[4]),I[5]=w(m,I[5]),I[6]=w(g,I[6]),I[7]=w(x,I[7])}return I};P.exports=function(t){return C.hash(t,i,32,!0)}},{"./helpers":238}],242:[function(S,P,E){(function(C){"use strict";function w(i){return i&&i.__esModule?i:{default:i}}var u=S("babel-runtime/core-js/object/create"),p=w(u),f=S("babel-runtime/helpers/classCallCheck"),o=w(f),a=S("babel-runtime/helpers/createClass"),c=w(a),s=S("babel-runtime/helpers/typeof"),d=w(s);!function(i){if((E===void 0?"undefined":(0,d.default)(E))==="object"&&P!==void 0)P.exports=i();else if(typeof U=="function"&&U.amd)U([],i);else{var t;t=typeof window!="undefined"?window:C!==void 0?C:typeof self!="undefined"?self:this,t.mime=i()}}(function(){return function i(t,n,h){function v(_,m){if(!n[_]){if(!t[_]){var g=typeof S=="function"&&S;if(!m&&g)return g(_,!0);if(b)return b(_,!0);var x=new Error("Cannot find module '"+_+"'");throw x.code="MODULE_NOT_FOUND",x}var l=n[_]={exports:{}};t[_][0].call(l.exports,function(T){var A=t[_][1][T];return v(A||T)},l,l.exports,i,t,n,h)}return n[_].exports}for(var b=typeof S=="function"&&S,y=0;y<h.length;y++)v(h[y]);return v}({1:[function(i,t,n){var h=function(){function v(){(0,o.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 x=m[g];if(!y&&x in this._types)throw new Error('Attempt to change mapping for "'+x+'" extension from "'+this._types[x]+'" to "'+_+'". Pass `force=true` to allow this, otherwise remove "'+x+'" from the list of extensions for "'+_+'".');this._types[x]=_}!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}();t.exports=h},{}],2:[function(i,t,n){var h=i("./Mime");t.exports=new h(i("./types/standard"),i("./types/other"))},{"./Mime":1,"./types/other":3,"./types/standard":4}],3:[function(i,t,n){t.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,t,n){t.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 re!="undefined"?re: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(S,P,E){"use strict";E.encodeURIComponent=function(C){try{return encodeURIComponent(C)}catch(w){return C}},E.escape=S("escape-html"),E.timestamp=function(C){if(C){var w=C;return typeof w=="string"&&(w=Number(w)),String(C).length===10&&(w*=1e3),new Date(w)}return Math.round(Date.now()/1e3)}},{"escape-html":157}],244:[function(S,P,E){(function(C,w){"use strict";function u(x){return x&&x.__esModule?x:{default:x}}function p(x,l){return x===void 0?l:x}function f(x,l){return function(T,A,O){if(T)return l(T);x({data:A,status:O.statusCode,headers:O.headers,res:O})}}var o,a=S("babel-runtime/core-js/json/stringify"),c=u(a),s=S("babel-runtime/helpers/typeof"),d=u(s),i=S("util"),t=S("url"),n=S("http"),h=S("https"),v=S("debug")("urllib"),b=S("humanize-ms"),y=0,_=Math.pow(2,31)-10,m=/^https?:\/\//i;E.TIMEOUTS=[b("300s"),b("300s")];var g=["json","text"];E.request=function(x,l,T){return arguments.length===2&&typeof l=="function"&&(T=l,l=null),typeof T=="function"?E.requestWithCallback(x,l,T):(o||(o=S("any-promise")),new o(function(A,O){E.requestWithCallback(x,l,f(A,O))}))},E.requestWithCallback=function(x,l,T){function A(){Xe&&(clearTimeout(Xe),Xe=null)}function O(){te&&(clearTimeout(te),te=null)}function D(We,Me,De){if(O(),!T)return console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),X,C.pid,fe.method,x),void(We&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
|
stack: %s`,Date(),X,C.pid,We.name,We.message,We.stack));var Oe=T;T=null;var pe={};if(De&&(Y=De.statusCode,pe=De.headers),Y===401&&pe["www-authenticate"]&&(!l.headers||!l.headers.Authorization)&&l.digestAuth){var be=pe["www-authenticate"];if(be.indexOf("Digest ")>=0)return v("Request#%d %s: got digest auth header WWW-Authenticate: %s",X,x,be),l.headers=l.headers||{},l.headers.Authorization=digestAuthHeader(fe.method,fe.path,be,l.digestAuth),v("Request#%d %s: auth with digest header: %s",X,x,l.headers.Authorization),De.headers["set-cookie"]&&(l.headers.Cookie=De.headers["set-cookie"].join(";")),E.requestWithCallback(x,l,Oe)}var Ce=Date.now()-q;Re&&(Re.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,J,Re);var we={status:Y,statusCode:Y,headers:pe,size:V,aborted:me,rt:Ce,keepAliveSocket:J,data:Me,requestUrls:l.requestUrls,timing:Re,remoteAddress:Ae,remotePort:at};if(We){var $e="";he&&typeof he.getCurrentStatus=="function"&&($e=", agent status: "+(0,c.default)(he.getCurrentStatus())),We.message+=", "+fe.method+" "+x+" "+Y+" (connected: "+N+", keepalive socket: "+J+$e+`)
|
|
|
headers: `+(0,c.default)(pe),We.data=Me,We.path=fe.path,We.status=Y,We.headers=pe,We.res=we}Oe(We,Me,l.streaming?De:we),l.emitter&&(Z.url=x,Z.socket=ze&&ze.connection,Z.options=fe,Z.size=Ie,l.emitter.emit("response",{requestId:X,error:We,ctx:l.ctx,req:Z,res:we}))}function I(We){var Me=null;if(l.followRedirect&&statuses.redirect[We.statusCode]){l._followRedirectCount=(l._followRedirectCount||0)+1;var De=We.headers.location;if(De){if(!(l._followRedirectCount>l.maxRedirects)){var Oe=l.formatRedirectUrl?l.formatRedirectUrl(x,De):t.resolve(x,De);v("Request#%d %s: `redirected` from %s to %s",X,fe.path,x,Oe),O(),l.headers&&l.headers.Host&&m.test(De)&&(l.headers.Host=null);var pe=T;return T=null,E.requestWithCallback(Oe,l,pe),{redirect:!0,error:null}}Me=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+x),Me.name="MaxRedirectError"}else Me=new Error("Got statusCode "+We.statusCode+" but cannot resolve next location from headers"),Me.name="FollowRedirectError"}return{redirect:!1,error:Me}}function j(We,Me,De){return De(null,Me,We.headers["content-encoding"])}function B(We){if(Re&&(Re.waiting=Date.now()-q),v("Request#%d %s `req response` event emit: status %d, headers: %j",X,x,We.statusCode,We.headers),l.streaming){var Me=I(We);return Me.redirect?void We.resume():Me.error?(We.resume(),D(Me.error,null,We)):D(null,null,We)}if(We.on("close",function(){v("Request#%d %s: `res close` event emit, total size %d",X,x,V)}),We.on("error",function(){v("Request#%d %s: `res error` event emit, total size %d",X,x,V)}),We.on("aborted",function(){me=!0,v("Request#%d %s: `res aborted` event emit, total size %d",X,x,V)}),Pe){var Me=I(We);return Me.redirect?void We.resume():Me.error?(We.resume(),Pe.end(),D(Me.error,null,We)):(l.consumeWriteStream===!1?We.on("end",D.bind(null,null,null,We)):isNode010||isNode012?first([[Pe,"close"],[We,"aborted"]],function(pe,be,Ce){v("Request#%d %s: writeStream or res %s event emitted",X,x,Ce),D(k||null,null,We)}):Pe.on("close",function(){v("Request#%d %s: writeStream close event emitted",X,x),D(k||null,null,We)}),We.pipe(Pe))}var De=[];We.on("data",function(Oe){v("Request#%d %s: `res data` event emit, size %d",X,x,Oe.length),V+=Oe.length,De.push(Oe)}),We.on("end",function(){var Oe=w.concat(De,V);if(v("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",X,x,V,We._dumped),k)return D(k,Oe,We);var pe=I(We);if(pe.error)return D(pe.error,Oe,We);pe.redirect||j(We,Oe,function(be,Ce,we){if(be)return D(be,Oe,We);if(!we&&g.indexOf(l.dataType)>=0){try{Ce=decodeBodyByCharset(Ce,We)}catch(it){return v("decodeBodyByCharset error: %s",it),D(null,Ce,We)}if(l.dataType==="json")if(V===0)Ce=null;else{var $e=parseJSON(Ce,_e);$e.error?be=$e.error:Ce=$e.data}}me&&v("Request#%d %s: Remote socket was terminated before `response.end()` was called",X,x),D(be,Ce,We)})})}function ee(){v("Response timer ticking, timeout: %d",Ze),te=setTimeout(function(){te=null;var We="Response timeout for "+Ze+"ms";k=new Error(We),k.name="ResponseTimeoutError",k.requestId=X,v("ResponseTimeout: Request#%d %s %s: %s, connected: %s",X,x,k.name,We,N),F()},Ze)}function F(){v("Request#%d %s abort, connected: %s",X,x,N),ze.socket||(k.noSocket=!0,D(k)),ze.abort()}if(!x||typeof x!="string"&&(x===void 0?"undefined":(0,d.default)(x))!=="object"){var G=i.format("expect request url to be a string or a http request options, but got %j",x);throw new Error(G)}arguments.length===2&&typeof l=="function"&&(T=l,l=null),l=l||{},y>=_&&(y=0);var X=++y;l.requestUrls=l.requestUrls||[];var Z={requestId:X,url:x,args:l,ctx:l.ctx};l.emitter&&l.emitter.emit("request",Z),l.timeout=l.timeout||E.TIMEOUTS,l.maxRedirects=l.maxRedirects||10,l.streaming=l.streaming||l.customResponse;var K,q=Date.now();typeof x=="string"?(m.test(x)||(x="http://"+x),K=t.parse(x)):K=x;var ae=(l.type||l.method||K.method||"GET").toUpperCase(),oe=K.port||80,ve=n,he=p(l.agent,E.agent),_e=l.fixJSONCtlChars;K.protocol==="https:"&&(ve=h,he=p(l.httpsAgent,E.httpsAgent),K.port||(oe=443));var fe={host:K.hostname||K.host||"localhost",path:K.path||"/",method:ae,port:oe,agent:he,headers:l.headers||{},lookup:l.lookup};Array.isArray(l.timeout)?fe.requestTimeout=l.timeout[l.timeout.length-1]:l.timeout!==void 0&&(fe.requestTimeout=l.timeout);for(var xe=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],je=0;je<xe.length;je++){var Le=xe[je];l.hasOwnProperty(Le)&&(fe[Le]=l[Le])}fe.rejectUnauthorized!==!1||fe.hasOwnProperty("secureOptions")||(fe.secureOptions=S("constants").SSL_OP_NO_TLSv1_2);var ke=l.auth||K.auth;ke&&(fe.auth=ke);var Fe=l.content||l.data,ge=ae==="GET"||ae==="HEAD"||l.dataAsQueryString;if(!l.content&&Fe&&typeof Fe!="string"&&!w.isBuffer(Fe))if(ge)Fe=l.nestedQuerystring?qs.stringify(Fe):querystring.stringify(Fe);else{var ce=fe.headers["Content-Type"]||fe.headers["content-type"];ce||(ce=l.contentType==="json"?"application/json":"application/x-www-form-urlencoded",fe.headers["Content-Type"]=ce),Fe=parseContentType(ce).type==="application/json"?(0,c.default)(Fe):l.nestedQuerystring?qs.stringify(Fe):querystring.stringify(Fe)}ge&&Fe&&(fe.path+=(K.query?"&":"?")+Fe,Fe=null);var Ie=0;if(Fe){var Ne=Fe.length;w.isBuffer(Fe)||(Ne=w.byteLength(Fe)),Ie=fe.headers["Content-Length"]=Ne}l.dataType==="json"&&(fe.headers.Accept="application/json"),typeof l.beforeRequest=="function"&&l.beforeRequest(fe);var Xe=null,te=null,k=null,N=!1,J=!1,V=0,Y=-1,me=!1,Ae="",at="",Re=null;l.timing&&(Re={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),l.gzip&&(fe.headers["Accept-Encoding"]||fe.headers["accept-encoding"]||(fe.headers["Accept-Encoding"]="gzip"));var Pe=l.writeStream;v("Request#%d %s %s with headers %j, options.path: %s",X,ae,x,fe.headers,fe.path),l.requestUrls.push(x);var Ye,Ze;Array.isArray(l.timeout)?(Ye=b(l.timeout[0]),Ze=b(l.timeout[1])):Ye=Ze=b(l.timeout),v("ConnectTimeout: %d, ResponseTimeout: %d",Ye,Ze);var ze;try{ze=ve.request(fe,B)}catch(We){return D(We)}return typeof window=="undefined"?function(){v("Connect timer ticking, timeout: %d",Ye),Xe=setTimeout(function(){Xe=null,Y===-1&&(Y=-2);var We="Connect timeout for "+Ye+"ms",Me="ConnectionTimeoutError";ze.socket||(Me="SocketAssignTimeoutError",We+=", working sockets is full"),k=new Error(We),k.name=Me,k.requestId=X,v("ConnectTimeout: Request#%d %s %s: %s, connected: %s",X,x,k.name,We,N),F()},Ye)}():ze.on("requestTimeout",function(){Y===-1&&(Y=-2);var We="Connect timeout for "+Ye+"ms";k=new Error(We),k.name="ConnectionTimeoutError",k.requestId=X,F()}),Re&&ze.on("finish",function(){Re.requestSent=Date.now()-q}),ze.once("socket",function(We){Re&&(Re.queuing=Date.now()-q),isNode010&&We.socket&&(We=We.socket);var Me=We.readyState;if(Me==="opening")return We.once("lookup",function(De,Oe,pe){v("Request#%d %s lookup: %s, %s, %s",X,x,De,Oe,pe),Re&&(Re.dnslookup=Date.now()-q),Oe&&(Ae=Oe)}),void We.once("connect",function(){Re&&(Re.connected=Date.now()-q),A(),ee(),v("Request#%d %s new socket connected",X,x),N=!0,Ae||(Ae=We.remoteAddress),at=We.remotePort});v("Request#%d %s reuse socket connected, readyState: %s",X,x,Me),N=!0,J=!0,Ae||(Ae=We.remoteAddress),at=We.remotePort,A(),ee()}),ze.on("error",function(We){We.name!=="Error"&&We.name!=="TypeError"||(We.name=N?"ResponseError":"RequestError"),We.message+=' (req "error")',v("Request#%d %s `req error` event emit, %s: %s",X,x,We.name,We.message),D(k||We)}),Pe&&Pe.once("error",function(We){We.message+=' (writeStream "error")',k=We,v("Request#%d %s `writeStream error` event emit, %s: %s",X,x,We.name,We.message),F()}),l.stream?(l.stream.pipe(ze),l.stream.once("error",function(We){We.message+=' (stream "error")',k=We,v("Request#%d %s `readStream error` event emit, %s: %s",X,x,We.name,We.message),F()})):ze.end(Fe),ze.requestId=X,ze}}).call(this,S("_process"),S("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 S(E){if(P[E])return P[E].exports;var C=P[E]={i:E,l:!1,exports:{}};return U[E].call(C.exports,C,C.exports,S),C.l=!0,C.exports}var P={};S.m=U,S.c=P,S.d=function(E,C,w){S.o(E,C)||Object.defineProperty(E,C,{configurable:!1,enumerable:!0,get:w})},S.n=function(E){var C=E&&E.__esModule?function(){return E.default}:function(){return E};return S.d(C,"a",C),C},S.o=function(E,C){return Object.prototype.hasOwnProperty.call(E,C)},S.p="",S(S.s=12)}([function(U,S,P){!function(E,C){U.exports=S=C()}(0,function(){var E=E||function(C,w){var u=Object.create||function(){function h(){}return function(v){var b;return h.prototype=v,b=new h,h.prototype=null,b}}(),p={},f=p.lib={},o=f.Base=function(){return{extend:function(h){var v=u(this);return h&&v.mixIn(h),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 h=this.extend();return h.init.apply(h,arguments),h},init:function(){},mixIn:function(h){for(var v in h)h.hasOwnProperty(v)&&(this[v]=h[v]);h.hasOwnProperty("toString")&&(this.toString=h.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),a=f.WordArray=o.extend({init:function(h,v){h=this.words=h||[],this.sigBytes=v!=null?v:4*h.length},toString:function(h){return(h||s).stringify(this)},concat:function(h){var v=this.words,b=h.words,y=this.sigBytes,_=h.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 h=this.words,v=this.sigBytes;h[v>>>2]&=4294967295<<32-v%4*8,h.length=C.ceil(v/4)},clone:function(){var h=o.clone.call(this);return h.words=this.words.slice(0),h},random:function(h){for(var v,b=[],y=0;y<h;y+=4){var _=function(m){var m=m,g=987654321,x=4294967295;return function(){g=36969*(65535&g)+(g>>16)&x,m=18e3*(65535&m)+(m>>16)&x;var l=(g<<16)+m&x;return l/=4294967296,(l+=.5)*(C.random()>.5?1:-1)}}(4294967296*(v||C.random()));v=987654071*_(),b.push(4294967296*_()|0)}return new a.init(b,h)}}),c=p.enc={},s=c.Hex={stringify:function(h){for(var v=h.words,b=h.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(h){for(var v=h.length,b=[],y=0;y<v;y+=2)b[y>>>3]|=parseInt(h.substr(y,2),16)<<24-y%8*4;return new a.init(b,v/2)}},d=c.Latin1={stringify:function(h){for(var v=h.words,b=h.sigBytes,y=[],_=0;_<b;_++){var m=v[_>>>2]>>>24-_%4*8&255;y.push(String.fromCharCode(m))}return y.join("")},parse:function(h){for(var v=h.length,b=[],y=0;y<v;y++)b[y>>>2]|=(255&h.charCodeAt(y))<<24-y%4*8;return new a.init(b,v)}},i=c.Utf8={stringify:function(h){try{return decodeURIComponent(escape(d.stringify(h)))}catch(v){throw new Error("Malformed UTF-8 data")}},parse:function(h){return d.parse(unescape(encodeURIComponent(h)))}},t=f.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(h){typeof h=="string"&&(h=i.parse(h)),this._data.concat(h),this._nDataBytes+=h.sigBytes},_process:function(h){var v=this._data,b=v.words,y=v.sigBytes,_=this.blockSize,m=4*_,g=y/m;g=h?C.ceil(g):C.max((0|g)-this._minBufferSize,0);var x=g*_,l=C.min(4*x,y);if(x){for(var T=0;T<x;T+=_)this._doProcessBlock(b,T);var A=b.splice(0,x);v.sigBytes-=l}return new a.init(A,l)},clone:function(){var h=o.clone.call(this);return h._data=this._data.clone(),h},_minBufferSize:0}),n=(f.Hasher=t.extend({cfg:o.extend(),init:function(h){this.cfg=this.cfg.extend(h),this.reset()},reset:function(){t.reset.call(this),this._doReset()},update:function(h){return this._append(h),this._process(),this},finalize:function(h){return h&&this._append(h),this._doFinalize()},blockSize:16,_createHelper:function(h){return function(v,b){return new h.init(b).finalize(v)}},_createHmacHelper:function(h){return function(v,b){return new n.HMAC.init(h,b).finalize(v)}}}),p.algo={});return p}(Math);return E})},function(U,S,P){"use strict";function E(u,p){if(!(u instanceof p))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(S,"__esModule",{value:!0});var C=function(){function u(p,f){for(var o=0;o<f.length;o++){var a=f[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(p,a.key,a)}}return function(p,f,o){return f&&u(p.prototype,f),o&&u(p,o),p}}(),w=function(){function u(){E(this,u)}return C(u,null,[{key:"detectIEVersion",value:function(){for(var p=4,f=document.createElement("div"),o=f.getElementsByTagName("i");f.innerHTML="<!--[if gt IE "+p+"]><i></i><![endif]-->",o[0];)p++;return p>4&&p}},{key:"extend",value:function(p,f){for(var o in f)Object.prototype.hasOwnProperty.call(f,o)&&f[o]&&(p[o]=f[o])}},{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(o){return o<10?"0"+o:o}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)}}]),u}();S.default=w},function(U,S,P){!function(E,C){U.exports=S=C(P(0))}(0,function(E){return function(C){function w(n,h,v,b,y,_,m){var g=n+(h&v|~h&b)+y+m;return(g<<_|g>>>32-_)+h}function u(n,h,v,b,y,_,m){var g=n+(h&b|v&~b)+y+m;return(g<<_|g>>>32-_)+h}function p(n,h,v,b,y,_,m){var g=n+(h^v^b)+y+m;return(g<<_|g>>>32-_)+h}function f(n,h,v,b,y,_,m){var g=n+(v^(h|~b))+y+m;return(g<<_|g>>>32-_)+h}var o=E,a=o.lib,c=a.WordArray,s=a.Hasher,d=o.algo,i=[];!function(){for(var n=0;n<64;n++)i[n]=4294967296*C.abs(C.sin(n+1))|0}();var t=d.MD5=s.extend({_doReset:function(){this._hash=new c.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(n,h){for(var v=0;v<16;v++){var b=h+v,y=n[b];n[b]=16711935&(y<<8|y>>>24)|4278255360&(y<<24|y>>>8)}var _=this._hash.words,m=n[h+0],g=n[h+1],x=n[h+2],l=n[h+3],T=n[h+4],A=n[h+5],O=n[h+6],D=n[h+7],I=n[h+8],j=n[h+9],B=n[h+10],ee=n[h+11],F=n[h+12],G=n[h+13],X=n[h+14],Z=n[h+15],K=_[0],q=_[1],ae=_[2],oe=_[3];K=w(K,q,ae,oe,m,7,i[0]),oe=w(oe,K,q,ae,g,12,i[1]),ae=w(ae,oe,K,q,x,17,i[2]),q=w(q,ae,oe,K,l,22,i[3]),K=w(K,q,ae,oe,T,7,i[4]),oe=w(oe,K,q,ae,A,12,i[5]),ae=w(ae,oe,K,q,O,17,i[6]),q=w(q,ae,oe,K,D,22,i[7]),K=w(K,q,ae,oe,I,7,i[8]),oe=w(oe,K,q,ae,j,12,i[9]),ae=w(ae,oe,K,q,B,17,i[10]),q=w(q,ae,oe,K,ee,22,i[11]),K=w(K,q,ae,oe,F,7,i[12]),oe=w(oe,K,q,ae,G,12,i[13]),ae=w(ae,oe,K,q,X,17,i[14]),q=w(q,ae,oe,K,Z,22,i[15]),K=u(K,q,ae,oe,g,5,i[16]),oe=u(oe,K,q,ae,O,9,i[17]),ae=u(ae,oe,K,q,ee,14,i[18]),q=u(q,ae,oe,K,m,20,i[19]),K=u(K,q,ae,oe,A,5,i[20]),oe=u(oe,K,q,ae,B,9,i[21]),ae=u(ae,oe,K,q,Z,14,i[22]),q=u(q,ae,oe,K,T,20,i[23]),K=u(K,q,ae,oe,j,5,i[24]),oe=u(oe,K,q,ae,X,9,i[25]),ae=u(ae,oe,K,q,l,14,i[26]),q=u(q,ae,oe,K,I,20,i[27]),K=u(K,q,ae,oe,G,5,i[28]),oe=u(oe,K,q,ae,x,9,i[29]),ae=u(ae,oe,K,q,D,14,i[30]),q=u(q,ae,oe,K,F,20,i[31]),K=p(K,q,ae,oe,A,4,i[32]),oe=p(oe,K,q,ae,I,11,i[33]),ae=p(ae,oe,K,q,ee,16,i[34]),q=p(q,ae,oe,K,X,23,i[35]),K=p(K,q,ae,oe,g,4,i[36]),oe=p(oe,K,q,ae,T,11,i[37]),ae=p(ae,oe,K,q,D,16,i[38]),q=p(q,ae,oe,K,B,23,i[39]),K=p(K,q,ae,oe,G,4,i[40]),oe=p(oe,K,q,ae,m,11,i[41]),ae=p(ae,oe,K,q,l,16,i[42]),q=p(q,ae,oe,K,O,23,i[43]),K=p(K,q,ae,oe,j,4,i[44]),oe=p(oe,K,q,ae,F,11,i[45]),ae=p(ae,oe,K,q,Z,16,i[46]),q=p(q,ae,oe,K,x,23,i[47]),K=f(K,q,ae,oe,m,6,i[48]),oe=f(oe,K,q,ae,D,10,i[49]),ae=f(ae,oe,K,q,X,15,i[50]),q=f(q,ae,oe,K,A,21,i[51]),K=f(K,q,ae,oe,F,6,i[52]),oe=f(oe,K,q,ae,l,10,i[53]),ae=f(ae,oe,K,q,B,15,i[54]),q=f(q,ae,oe,K,g,21,i[55]),K=f(K,q,ae,oe,I,6,i[56]),oe=f(oe,K,q,ae,Z,10,i[57]),ae=f(ae,oe,K,q,O,15,i[58]),q=f(q,ae,oe,K,G,21,i[59]),K=f(K,q,ae,oe,T,6,i[60]),oe=f(oe,K,q,ae,ee,10,i[61]),ae=f(ae,oe,K,q,x,15,i[62]),q=f(q,ae,oe,K,j,21,i[63]),_[0]=_[0]+K|0,_[1]=_[1]+q|0,_[2]=_[2]+ae|0,_[3]=_[3]+oe|0},_doFinalize:function(){var n=this._data,h=n.words,v=8*this._nDataBytes,b=8*n.sigBytes;h[b>>>5]|=128<<24-b%32;var y=C.floor(v/4294967296),_=v;h[15+(b+64>>>9<<4)]=16711935&(y<<8|y>>>24)|4278255360&(y<<24|y>>>8),h[14+(b+64>>>9<<4)]=16711935&(_<<8|_>>>24)|4278255360&(_<<24|_>>>8),n.sigBytes=4*(h.length+1),this._process();for(var m=this._hash,g=m.words,x=0;x<4;x++){var l=g[x];g[x]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return m},clone:function(){var n=s.clone.call(this);return n._hash=this._hash.clone(),n}});o.MD5=s._createHelper(t),o.HmacMD5=s._createHmacHelper(t)}(Math),E.MD5})},function(U,S,P){"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.UPLOADSTATE={INIT:"init",UPLOADING:"uploading",COMPLETE:"complete",INTERRUPT:"interrupt"},S.UPLOADSTEP={INIT:"init",PART:"part",COMPLETE:"complete"},S.UPLOADDEFAULT={PARALLEL:5,PARTSIZE:1048576}},function(U,S,P){"use strict";function E(t){return t&&t.__esModule?t:{default:t}}function C(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(S,"__esModule",{value:!0});var w=function(){function t(n,h){for(var v=0;v<h.length;v++){var b=h[v];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(n,b.key,b)}}return function(n,h,v){return h&&t(n.prototype,h),v&&t(n,v),n}}(),u=P(5),p=E(u),f=P(25),o=E(f),a=P(6),c=E(a),s=P(7),d=E(s),i=function(){function t(n){C(this,t);var h=d.default.os.name,v=d.default.os.version||"",b=d.default.browser.name,y=d.default.browser.version||"",_=window.location.href,m="";_&&(m=d.default.getHost(_));var g="pc";d.default.os.ipad?g="pad":(d.default.os.iphone||d.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:t.getUuid(),os:h,ov:v,et:b,ev:y,uat:navigator.userAgent,app_n:m,tt:g,dm:"h5",ut:""}}return w(t,[{key:"log",value:function(n,h){h&&h.ri?(this._ri=h.ri,delete h.ri):this._ri=p.default.create(),h&&h.ut&&(this.initParam.ut=h.ut,delete h.ut),this.initParam.t=new Date().getTime(),this.initParam.ll=n=="20006"?"error":"info",this.initParam.ri=this._ri,this.initParam.e=n;var v=[];if(h)for(var b in h)v.push(b+"="+h[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 n=o.default.get("p_h5_upload_u");return n||(n=p.default.create(),o.default.set("p_h5_upload_u",n,730)),n}},{key:"getClientId",value:function(){return o.default.get("p_h5_upload_clientId")}},{key:"setClientId",value:function(n){return n||(n=p.default.create()),o.default.set("p_h5_upload_clientId",n,730),n}}]),t}();S.default=i},function(U,S,P){"use strict";function E(u,p){if(!(u instanceof p))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(S,"__esModule",{value:!0});var C=function(){function u(p,f){for(var o=0;o<f.length;o++){var a=f[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(p,a.key,a)}}return function(p,f,o){return f&&u(p.prototype,f),o&&u(p,o),p}}(),w=function(){function u(){E(this,u)}return C(u,null,[{key:"create",value:function(p,f){var o,a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),c=[];if(f=f||a.length,p)for(o=0;o<p;o++)c[o]=a[0|Math.random()*f];else{var s;for(c[8]=c[13]=c[18]=c[23]="-",c[14]="4",o=0;o<36;o++)c[o]||(s=0|16*Math.random(),c[o]=a[o==19?3&s|8:s])}return c.join("")}}]),u}();S.default=w},function(U,S,P){"use strict";Object.defineProperty(S,"__esModule",{value:!0});var E={version:"1.5.0"};S.default=E},function(U,S,P){"use strict";function E(a,c){if(!(a instanceof c))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(S,"__esModule",{value:!0});var C=function(){function a(c,s){for(var d=0;d<s.length;d++){var i=s[d];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,i.key,i)}}return function(c,s,d){return s&&a(c.prototype,s),d&&a(c,d),c}}(),w=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 d=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"&&!d&&!i&&(s="Unix"),String(navigator.platform).indexOf("Linux")>-1&&(s="Linux"),d?"windows":s},u=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,d=navigator.platform,i=s.match(/Web[kK]it[\/]{0,1}([\d.]+)/),t=s.match(/(Android);?[\s\/]+([\d.]+)?/),n=!!s.match(/\(Macintosh\; Intel /),h=s.match(/(iPad).*OS\s([\d_]+)/),v=s.match(/(iPod)(.*OS\s([\d_]+))?/),b=!h&&s.match(/(iPhone\sOS)\s([\d_]+)/),y=s.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),_=/Win\d{2}|Windows/.test(d),m=s.match(/Windows Phone ([\d.]+)/),g=y&&s.match(/TouchPad/),x=s.match(/Kindle\/([\d.]+)/),l=s.match(/Silk\/([\d._]+)/),T=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.]+)/),j=s.match(/Firefox\/([\d.]+)/),B=s.match(/\((?:Mobile|Tablet); rv:([\d.]+)\).*Firefox\/[\d.]+/),ee=s.match(/MSIE\s([\d.]+)/)||s.match(/Trident\/[\d](?=[^\?]+).*rv:([0-9.].)/),F=!I&&s.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/),G=F||s.match(/Version\/([\d.]+)([^S](Safari)|[^M]*(Mobile)[^S]*(Safari))/);if((c.webkit=!!i)&&(c.version=i[1]),t&&(a.android=!0,a.version=t[2]),b&&!v&&(a.ios=a.iphone=!0,a.version=b[2].replace(/_/g,".")),h&&(a.ios=a.ipad=!0,a.version=h[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),T&&(a.blackberry=!0,a.version=T[2]),A&&(a.bb10=!0,a.version=A[2]),O&&(a.rimtabletos=!0,a.version=O[2]),D&&(c.playbook=!0),x&&(a.kindle=!0,a.version=x[1]),l&&(c.silk=!0,c.version=l[1]),!l&&a.android&&s.match(/Kindle Fire/)&&(c.silk=!0),I&&(c.chrome=!0,c.version=I[1]),j&&(c.firefox=!0,c.version=j[1]),B&&(a.firefoxos=!0,a.version=B[1]),ee&&(c.ie=!0,c.version=ee[1]),G&&(n||a.ios||_||t)&&(c.safari=!0,a.ios||(c.version=G[1])),F&&(c.webview=!0),n){var X=s.match(/[\d]*_[\d]*_[\d]*/);X&&X.length>0&&X[0]&&(a.version=X[0].replace(/_/g,"."))}return a.tablet=!!(h||D||t&&!s.match(/Mobile/)||j&&s.match(/Tablet/)||ee&&!s.match(/Phone/)&&s.match(/Touch/)),a.phone=!(a.tablet||a.ipod||!(t||b||y||T||A||I&&s.match(/Android/)||I&&s.match(/CriOS\/([\d.]+)/)||j&&s.match(/Mobile/)||ee&&s.match(/Touch/))),a.pc=!a.tablet&&!a.phone,n?a.name="macOS":_?(a.name="windows",a.version=u()):a.name=w(a),c.name=p(c),{os:a,browser:c}}(),o=function(){function a(){E(this,a)}return C(a,null,[{key:"getHost",value:function(c){var s="";if(c===void 0||c==null||c=="")return"";var d=c.indexOf("//"),i=c;d>-1&&(i=c.substring(d+2));var s=i,t=i.split("/");return t&&t.length>0&&(s=t[0]),t=s.split(":"),t&&t.length>0&&(s=t[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}();S.default=o},function(U,S,P){"use strict";function E(u,p){if(!(u instanceof p))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(S,"__esModule",{value:!0});var C=function(){function u(p,f){for(var o=0;o<f.length;o++){var a=f[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(p,a.key,a)}}return function(p,f,o){return f&&u(p.prototype,f),o&&u(p,o),p}}(),w=function(){function u(){E(this,u)}return C(u,null,[{key:"get",value:function(p,f,o,a,c){var s;o=o||function(){},typeof XMLHttpRequest=="undefined"&&(window.XMLHttpRequest=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(d){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(d){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(d){}throw new Error("This browser does not support XMLHttpRequest.")}),s=new XMLHttpRequest,s.onreadystatechange=function(){s.readyState===4&&(s.status===200?f(s.responseText):o(s.responseText))};try{a===void 0&&(a=!0),s.open("GET",p,a),c&&(s.withCredentials=!0)}catch(d){return void o(d)}try{s.send()}catch(d){o(d)}}}]),u}();S.default=w},function(U,S,P){"use strict";function E(f,o){if(!(f instanceof o))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(S,"__esModule",{value:!0});var C=function(){function f(o,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(o,s.key,s)}}return function(o,a,c){return a&&f(o.prototype,a),c&&f(o,c),o}}(),w=P(27),u=P(30),p=(P(10),function(){function f(){E(this,f)}return C(f,null,[{key:"randomUUID",value:function(){for(var o=[],a="0123456789abcdef",c=0;c<36;c++)o[c]=a.substr(Math.floor(16*Math.random()),1);return o[14]="4",o[19]=a.substr(3&o[19]|8,1),o[8]=o[13]=o[18]=o[23]="-",o.join("")}},{key:"aliyunEncodeURI",value:function(o){var a=encodeURIComponent(o);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(o,a,c){if(!o)throw new Error("PrismPlayer Error: vid should not be null!");var s=[];for(var d in o)s.push(d);for(var i=s.sort(),t="",n=i.length,d=0;d<n;d++){var h=f.aliyunEncodeURI(i[d]),v=f.aliyunEncodeURI(o[i[d]]);t==""?t=h+a+v:t+=c+h+a+v}return t}},{key:"makeChangeSiga",value:function(o,a){if(!o)throw new Error("PrismPlayer Error: vid should not be null!");return u.stringify(w("GET&"+f.aliyunEncodeURI("/")+"&"+f.aliyunEncodeURI(f.makeUTF8sort(o,"=","&")),a+"&"))}}]),f}());S.default=p},function(U,S,P){!function(E,C){U.exports=S=C(P(0))}(0,function(E){return E.enc.Utf8})},function(U,S,P){!function(E,C){U.exports=S=C(P(0))}(0,function(E){return E.enc.Hex})},function(U,S,P){U.exports=P(13)},function(U,S,P){"use strict";var E,C,w=(typeof Symbol=="function"&&Symbol.iterator,P(14)),u=function(f){return f&&f.__esModule?f:{default:f}}(w),p={Vod:u.default};E=[],(C=function(){return p}.apply(S,E))!==void 0&&(U.exports=C),window.AliyunUpload=p,Ve.exports=AliyunUpload},function(U,S,P){"use strict";function E(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(S,"__esModule",{value:!0});var w=function(){function A(O,D){for(var I=0;I<D.length;I++){var j=D[I];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(O,j.key,j)}}return function(O,D,I){return D&&A(O.prototype,D),I&&A(O,I),O}}(),u=P(15),p=P(3),f=P(16),o=E(f),a=P(18),c=E(a),s=P(24),d=E(s),i=P(4),t=E(i),n=P(1),h=E(n),v=P(5),b=E(v),y=P(26),_=E(y),m=P(31),g=E(m),x=P(32),l=E(x),T=(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=u.VODSTATE.INIT,this._uploadList=[],this._curIndex=-1,this._ossUpload=null,this._log=new t.default,this._retryCount=0,this._retryTotal=this.options.retryCount||3,this._retryDuration=this.options.retryDuration||2,this._state=u.VODSTATE.INIT,this._uploadWay="vod",this._onbeforeunload=!1,this._invalidUserId=!1,this._initEvent()}return w(A,[{key:"init",value:function(O,D,I,j){return this._retryCount=0,!(I&&!j||!I&&j)&&!(O&&!D||!O&&D)&&(this._ossCreditor.accessKeyId=O,this._ossCreditor.accessKeySecret=D,this._ossCreditor.securityToken=I,this._ossCreditor.expireTime=j,!0)}},{key:"addFile",value:function(O,D,I,j,B,ee){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 F=(this.options,0);F<this._uploadList.length;F++)if(this._uploadList[F].file==O)return!1;var G=new Object;if(G.file=O,G._endpoint=D,G._bucket=I,G._object=j,G.state=u.UPLOADSTATE.INIT,G.isImage=h.default.isImage(O.name),!G.isImage&&this.options.enableUploadProgress){var X=this;l.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 ae=JSON.parse(q.UploadPoint);ae.loaded!=1&&(G.checkpoint=ae.checkpoint,G.loaded=ae.loaded,G.videoId=q.VideoId,X._saveCheckoutpoint(G,ae.checkpoint))}},function(q){try{if((q=JSON.parse(q))&&q.Code=="InvalidParameter"&&q.Message.indexOf("UserId")>0){X._invalidUserId=!0;var ae=q.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(ae)}}catch(oe){console.log(oe)}})})}B&&(G.videoInfo=B?JSON.parse(B).Vod:{},G.userData=c.default.encode(B)),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==u.UPLOADSTATE.UPLOADING){D.state=u.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!=u.UPLOADSTATE.SUCCESS&&(D.state=u.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==u.UPLOADSTATE.CANCELED&&(D.state=u.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==u.VODSTATE.START||this._state==u.VODSTATE.EXPIRE)return void console.log("already started or expired");if(this._initState(),this._curIndex=this._findUploadIndex(),this._curIndex==-1)return void(this._state=u.VODSTATE.END);var D=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(D),this._state=u.VODSTATE.START}},{key:"nextUpload",value:function(){var O=this.options;if(this._state==u.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=u.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,j=0;j<this._uploadList.length;j++)D.uploadList[j].state==u.UPLOADSTATE.SUCCESS&&I++,this._uploadList[j].state==O&&(D.uploadList.splice(j,1),j--);D.onClear&&D.onClear(D.uploadList.length,I)}},{key:"stopUpload",value:function(){if((this._state==u.VODSTATE.START||this._state==u.VODSTATE.FAILURE||this._curIndex==-1)&&this._curIndex!=-1){var O=this._uploadList[this._curIndex];this._state=u.VODSTATE.STOP,O.state=u.UPLOADSTATE.STOPED,this._changeState(O,u.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,j){if(this.options,!(O&&D&&I&&j))return!1;if(this._state!=u.VODSTATE.EXPIRE)return!1;if(this._curIndex==-1)return!1;var B="";return this._uploadList.length>this._curIndex&&(B=this._uploadList[this._curIndex]),B&&(this.init(O,D,I,j),this._state=u.VODSTATE.START,this._ossUpload=null,this._uploadCore(B,B.retry),B.retry=!1),!0}},{key:"resumeUploadWithSTSToken",value:function(O,D,I){if(this._curIndex==-1)return!1;if(this._state!=u.VODSTATE.EXPIRE)return!1;if(this._uploadList.length>this._curIndex){var j=this._uploadList[this._curIndex];j.object?this._refreshSTSTokenUpload(j,O,D,I):this.setSTSToken(j,O,D,I)}}},{key:"setSTSTokenDirectlyUpload",value:function(O,D,I,j,B){if(!(D&&I&&j&&B))return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken and expiration should not be empty."),!1;this._ut="oss";var ee=O;this.init(D,I,j,B),ee.endpoint=ee._endpoint,ee.bucket=ee._bucket,ee.object=ee._object,this._ossUpload=null,this._uploadCore(ee,O.retry),O.retry=!1}},{key:"setSTSToken",value:function(O,D,I,j){if(!D||!I||!j)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;this._ut="vod",this._uploadWay="sts";var B=O.videoInfo,ee={accessKeyId:D,securityToken:j,accessKeySecret:I,fileName:O.file.name,title:B.Title,requestId:O.ri,region:this.options.region};B.ImageType&&(ee.imageType=B.ImageType),B.ImageExt&&(ee.imageExt=B.ImageExt),B.FileSize&&(ee.fileSize=B.FileSize),B.Description&&(ee.description=B.Description),B.CateId&&(ee.cateId=B.CateId),B.Tags&&(ee.tags=B.Tags),B.TemplateGroupId&&(ee.templateGroupId=B.TemplateGroupId),B.StorageLocation&&(ee.storageLocation=B.StorageLocation),B.CoverURL&&(ee.coverUrl=B.CoverURL),B.TransCodeMode&&(ee.transCodeMode=B.TransCodeMode),B.UserData&&(ee.userData=B.UserData);var F=this,G="getUploadAuth";O.videoId?(ee.videoId=O.videoId,G="refreshUploadAuth"):O.isImage&&(G="getImageUploadAuth"),_.default[G](ee,function(X){O.videoId=X.VideoId?X.VideoId:O.videoId,F.setUploadAuthAndAddress(O,X.UploadAuth,X.UploadAddress),F._state=u.VODSTATE.START},function(X){F._error(O,{name:X.Code,code:X.Code,message:X.Message,requestId:X.RequestId})})}},{key:"setUploadAuthAndAddress",value:function(O,D,I,j){if(!O||!D||!I)return!1;var B=JSON.parse(c.default.decode(D));if(!(B.AccessKeyId&&B.AccessKeySecret&&B.SecurityToken&&B.Expiration))return console.error("uploadauth is invalid"),!1;var ee={},F=O;if(I){if(ee=JSON.parse(c.default.decode(I)),!ee.Endpoint||!ee.Bucket||!ee.FileName)return console.error("uploadAddress is invalid"),!1}else ee.Endpoint=F.endpoint,ee.Bucket=F.bucket,ee.FileName=F.object;this._ut="vod",this._uploadWay="vod",this.options.region=B.Region||this.options.region,this.init(B.AccessKeyId,B.AccessKeySecret,B.SecurityToken,B.Expiration),F.endpoint=F._endpoint?F._endpoint:ee.Endpoint,F.bucket=F._bucket?F._bucket:ee.Bucket,F.object=F._object?F._object:ee.FileName,F.region=this.options.region,j&&(F.videoId=j),this._ossUpload=null,this._uploadCore(F,O.retry),O.retry=!1}},{key:"_refreshSTSTokenUpload",value:function(O,D,I,j){if(!D||!I||!j)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;var B={accessKeyId:D,securityToken:j,accessKeySecret:I,videoId:O.object,requestId:O.ri,region:this.options.region},ee=this,F="refreshUploadAuth";O.isImage&&(F="getImageUploadAuth"),_.default[F](B,function(G){ee.setUploadAuthAndAddress(O,G.UploadAuth,UploadAddress),ee._state=u.VODSTATE.START},function(G){ee._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 j=this._getCheckoutpoint(O);j&&j.state!=u.UPLOADSTATE.UPLOADING&&(O.checkpoint=j,O.videoId=j.videoId),I.onUploadstarted(O)}catch(B){console.log(B)}}},{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=u.UPLOADSTATE.UPLOADING,!this._ossUpload){O.endpoint=O.endpoint||"http://oss-cn-hangzhou.aliyuncs.com";var D=this;this._ossUpload=new o.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=h.default.getFileType(O.file.name),j=this._getCheckoutpoint(O),B="",ee="";j&&j.checkpoint&&(ee=j.state,B=j.videoId,j=j.checkpoint),j&&B==O.videoId&&ee!=u.UPLOADSTATE.UPLOADING&&(j.file=O.file,O.checkpoint=j,j.uploadId);var F=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:F});var G={headers:{"x-oss-notification":O.userData?O.userData:""},partSize:F,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==u.UPLOADSTATE.INIT){O=D;break}return O}},{key:"_error",value:function(O,D){if(D.name=="cancel")try{this.options.onUploadCanceled(O,D)}catch(j){console.log(j)}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=u.VODSTATE.EXPIRE,O.state=u.UPLOADSTATE.FAIlURE;try{this.options.onUploadTokenExpired(O,D)}catch(j){console.log(j)}}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],j=u.UPLOADSTATE.FAIlURE;if(O.state!=u.UPLOADSTATE.CANCELED&&(O.state=u.UPLOADSTATE.FAIlURE,this._state=u.VODSTATE.FAILURE,this.options.onUploadFailed&&D&&D.code&&D.message))try{this.options.onUploadFailed(O,D.code,D.message)}catch(ee){console.log(ee)}if(I&&this._changeState(O,j),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 B=this;this._state=u.VODSTATE.START,setTimeout(function(){B.nextUpload()},100)}}},{key:"_complete",value:function(O,D){if(O.state=u.UPLOADSTATE.SUCCESS,this.options.onUploadSucceed)try{this.options.onUploadSucceed(O)}catch(B){console.log(B)}var I=0;D&&D.res&&D.res.headers&&(I=D.res.headers["x-oss-request-id"]),this._removeCheckoutpoint(O);var j=this;setTimeout(function(){j.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 j=D.checkpoint,B=0;j&&(O.checkpoint=j,this._saveCheckoutpoint(O,j,u.UPLOADSTATE.UPLOADING),B=j.uploadId),this._retryCount=0;var ee=this._getPortNumber(j),F=0;if(I&&I.headers&&(F=I.headers["x-oss-request-id"]),D.loaded!=0&&this._reportLog("20007",O,{pn:ee,requestId:F}),D.loaded!=1&&this._reportLog("20005",O,{UploadId:B,pn:ee+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);d.default.remove(D)}},{key:"_getCheckoutpoint",value:function(O){var D=this._getCheckoutpointKey(O),I=d.default.get(D);if(I)try{return JSON.parse(I)}catch(j){}return""}},{key:"_saveCheckoutpoint",value:function(O,D,I){if(D){var j=this._getCheckoutpointKey(O),B=O.file,ee={fileName:B.name,lastModified:B.lastModified,size:B.size,object:O.object,videoId:O.videoId,bucket:O.bucket,endpoint:O.endpoint,checkpoint:D,loaded:O.loaded,state:I};d.default.set(j,JSON.stringify(ee))}}},{key:"_changeState",value:function(O,D){var I=this._getCheckoutpoint(O);I&&((this._onbeforeunload=!0)&&(D=u.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 j={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(j,function(B){D(B)},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,u.UPLOADSTATE.STOPED)}})}},{key:"_initState",value:function(){for(var O=0;O<this._uploadList.length;O++){var D=this._uploadList[O];D.state!=u.UPLOADSTATE.FAIlURE&&D.state!=u.UPLOADSTATE.STOPED||(D.state=u.UPLOADSTATE.INIT)}this._state=u.VODSTATE.INIT}},{key:"_adjustPartSize",value:function(O){return O.file.size/this.options.partSize>1e4?O.file.size/9999:this.options.partSize}}]),A}());S.default=T},function(U,S,P){"use strict";Object.defineProperty(S,"__esModule",{value:!0}),S.UPLOADSTATE={INIT:"Ready",UPLOADING:"Uploading",SUCCESS:"Success",FAIlURE:"Failure",CANCELED:"Canceled",STOPED:"Stoped"},S.VODSTATE={INIT:"Init",START:"Start",STOP:"Stop",FAILURE:"Failure",EXPIRE:"Expire",END:"End"}},function(U,S,P){"use strict";function E(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(S,"__esModule",{value:!0});var w=function(){function a(c,s){for(var d=0;d<s.length;d++){var i=s[d];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,i.key,i)}}return function(c,s,d){return s&&a(c.prototype,s),d&&a(c,d),c}}(),u=P(3),p=P(17),f=(E(p),P(1)),o=(E(f),function(){function a(c,s){if(C(this,a),c){this._config=c,this.create(this._config),this._uploadInfo=null,this._callback={};var d=function(){};this._callback.onerror=s.onerror||d,this._callback.oncomplete=s.oncomplete||d,this._callback.onprogress=s.onprogress||d}}return w(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 d=this,i=function(n,h,v){return function(b){d._progress(n,h,v),b()}},t={parallel:s.parallel||this._config.parallel||u.UPLOADDEFAULT.PARALLEL,partSize:s.partSize||this._config.partSize||u.UPLOADDEFAULT.PARTSIZE,progress:i};s.headers&&(t.headers=s.headers),c.checkpoint&&(t.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,t).then(function(n,h){d._complete(n)}).catch(function(n){d.oss.cancel&&(d.oss&&d.oss.isCancel()?console.log("oss is cancel as error"):d.oss.cancel()),d._error(n)})}},{key:"header",value:function(c,s,d){this.oss.get(c.object).then(function(i){s(i)}).catch(function(i){d(i)})}},{key:"_progress",value:function(c,s,d){this._callback.onprogress(this._uploadInfo,{loaded:c,total:this._uploadInfo.file.size,checkpoint:s},d)}},{key:"_error",value:function(c){this._callback.onerror(this._uploadInfo,c)}},{key:"_complete",value:function(c){this._callback.oncomplete(this._uploadInfo,c)}}]),a}());S.default=o},function(U,S,P){"use strict";function E(u,p){if(!(u instanceof p))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(S,"__esModule",{value:!0});var C=function(){function u(p,f){for(var o=0;o<f.length;o++){var a=f[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(p,a.key,a)}}return function(p,f,o){return f&&u(p.prototype,f),o&&u(p,o),p}}(),w=function(){function u(){E(this,u)}return C(u,null,[{key:"format",value:function(p){if(arguments.length<2)return null;for(var f=arguments[1],o=1;o<arguments.length;o++){var a=new RegExp("\\{"+(o-1)+"\\}","gm");f=f.replace(a,arguments[o+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."}}}]),u}();S.default=w},function(U,S,P){"use strict";(function(E){function C(p,f){if(!(p instanceof f))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(S,"__esModule",{value:!0});var w=function(){function p(f,o){for(var a=0;a<o.length;a++){var c=o[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(f,c.key,c)}}return function(f,o,a){return o&&p(f.prototype,o),a&&p(f,a),f}}(),u=function(){function p(){C(this,p)}return w(p,null,[{key:"encode",value:function(f){return new E(f).toString("base64")}},{key:"decode",value:function(f){return new E(f,"base64").toString()}}]),p}();S.default=u}).call(S,P(19).Buffer)},function(U,S,P){"use strict";(function(E){function C(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function w(te,k){if(C()<k)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(te=new Uint8Array(k),te.__proto__=u.prototype):(te===null&&(te=new u(k)),te.length=k),te}function u(te,k,N){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(te,k,N);if(typeof te=="number"){if(typeof k=="string")throw new Error("If encoding is specified then the first argument must be a string");return a(this,te)}return p(this,te,k,N)}function p(te,k,N,J){if(typeof k=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&k instanceof ArrayBuffer?d(te,k,N,J):typeof k=="string"?c(te,k,N):i(te,k)}function f(te){if(typeof te!="number")throw new TypeError('"size" argument must be a number');if(te<0)throw new RangeError('"size" argument must not be negative')}function o(te,k,N,J){return f(k),k<=0?w(te,k):N!==void 0?typeof J=="string"?w(te,k).fill(N,J):w(te,k).fill(N):w(te,k)}function a(te,k){if(f(k),te=w(te,k<0?0:0|t(k)),!u.TYPED_ARRAY_SUPPORT)for(var N=0;N<k;++N)te[N]=0;return te}function c(te,k,N){if(typeof N=="string"&&N!==""||(N="utf8"),!u.isEncoding(N))throw new TypeError('"encoding" must be a valid string encoding');var J=0|h(k,N);te=w(te,J);var V=te.write(k,N);return V!==J&&(te=te.slice(0,V)),te}function s(te,k){var N=k.length<0?0:0|t(k.length);te=w(te,N);for(var J=0;J<N;J+=1)te[J]=255&k[J];return te}function d(te,k,N,J){if(k.byteLength,N<0||k.byteLength<N)throw new RangeError("'offset' is out of bounds");if(k.byteLength<N+(J||0))throw new RangeError("'length' is out of bounds");return k=N===void 0&&J===void 0?new Uint8Array(k):J===void 0?new Uint8Array(k,N):new Uint8Array(k,N,J),u.TYPED_ARRAY_SUPPORT?(te=k,te.__proto__=u.prototype):te=s(te,k),te}function i(te,k){if(u.isBuffer(k)){var N=0|t(k.length);return te=w(te,N),te.length===0||k.copy(te,0,0,N),te}if(k){if(typeof ArrayBuffer!="undefined"&&k.buffer instanceof ArrayBuffer||"length"in k)return typeof k.length!="number"||Fe(k.length)?w(te,0):s(te,k);if(k.type==="Buffer"&&Ie(k.data))return s(te,k.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function t(te){if(te>=C())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+C().toString(16)+" bytes");return 0|te}function n(te){return+te!=te&&(te=0),u.alloc(+te)}function h(te,k){if(u.isBuffer(te))return te.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(te)||te instanceof ArrayBuffer))return te.byteLength;typeof te!="string"&&(te=""+te);var N=te.length;if(N===0)return 0;for(var J=!1;;)switch(k){case"ascii":case"latin1":case"binary":return N;case"utf8":case"utf-8":case void 0:return fe(te).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*N;case"hex":return N>>>1;case"base64":return Le(te).length;default:if(J)return fe(te).length;k=(""+k).toLowerCase(),J=!0}}function v(te,k,N){var J=!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(te||(te="utf8");;)switch(te){case"hex":return ee(this,k,N);case"utf8":case"utf-8":return D(this,k,N);case"ascii":return j(this,k,N);case"latin1":case"binary":return B(this,k,N);case"base64":return O(this,k,N);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,k,N);default:if(J)throw new TypeError("Unknown encoding: "+te);te=(te+"").toLowerCase(),J=!0}}function b(te,k,N){var J=te[k];te[k]=te[N],te[N]=J}function y(te,k,N,J,V){if(te.length===0)return-1;if(typeof N=="string"?(J=N,N=0):N>2147483647?N=2147483647:N<-2147483648&&(N=-2147483648),N=+N,isNaN(N)&&(N=V?0:te.length-1),N<0&&(N=te.length+N),N>=te.length){if(V)return-1;N=te.length-1}else if(N<0){if(!V)return-1;N=0}if(typeof k=="string"&&(k=u.from(k,J)),u.isBuffer(k))return k.length===0?-1:_(te,k,N,J,V);if(typeof k=="number")return k&=255,u.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?V?Uint8Array.prototype.indexOf.call(te,k,N):Uint8Array.prototype.lastIndexOf.call(te,k,N):_(te,[k],N,J,V);throw new TypeError("val must be string, number or Buffer")}function _(te,k,N,J,V){function Y(ze,We){return me===1?ze[We]:ze.readUInt16BE(We*me)}var me=1,Ae=te.length,at=k.length;if(J!==void 0&&((J=String(J).toLowerCase())==="ucs2"||J==="ucs-2"||J==="utf16le"||J==="utf-16le")){if(te.length<2||k.length<2)return-1;me=2,Ae/=2,at/=2,N/=2}var Re;if(V){var Pe=-1;for(Re=N;Re<Ae;Re++)if(Y(te,Re)===Y(k,Pe===-1?0:Re-Pe)){if(Pe===-1&&(Pe=Re),Re-Pe+1===at)return Pe*me}else Pe!==-1&&(Re-=Re-Pe),Pe=-1}else for(N+at>Ae&&(N=Ae-at),Re=N;Re>=0;Re--){for(var Ye=!0,Ze=0;Ze<at;Ze++)if(Y(te,Re+Ze)!==Y(k,Ze)){Ye=!1;break}if(Ye)return Re}return-1}function m(te,k,N,J){N=Number(N)||0;var V=te.length-N;J?(J=Number(J))>V&&(J=V):J=V;var Y=k.length;if(Y%2!=0)throw new TypeError("Invalid hex string");J>Y/2&&(J=Y/2);for(var me=0;me<J;++me){var Ae=parseInt(k.substr(2*me,2),16);if(isNaN(Ae))return me;te[N+me]=Ae}return me}function g(te,k,N,J){return ke(fe(k,te.length-N),te,N,J)}function x(te,k,N,J){return ke(xe(k),te,N,J)}function l(te,k,N,J){return x(te,k,N,J)}function T(te,k,N,J){return ke(Le(k),te,N,J)}function A(te,k,N,J){return ke(je(k,te.length-N),te,N,J)}function O(te,k,N){return k===0&&N===te.length?ge.fromByteArray(te):ge.fromByteArray(te.slice(k,N))}function D(te,k,N){N=Math.min(te.length,N);for(var J=[],V=k;V<N;){var Y=te[V],me=null,Ae=Y>239?4:Y>223?3:Y>191?2:1;if(V+Ae<=N){var at,Re,Pe,Ye;switch(Ae){case 1:Y<128&&(me=Y);break;case 2:at=te[V+1],(192&at)==128&&(Ye=(31&Y)<<6|63&at)>127&&(me=Ye);break;case 3:at=te[V+1],Re=te[V+2],(192&at)==128&&(192&Re)==128&&(Ye=(15&Y)<<12|(63&at)<<6|63&Re)>2047&&(Ye<55296||Ye>57343)&&(me=Ye);break;case 4:at=te[V+1],Re=te[V+2],Pe=te[V+3],(192&at)==128&&(192&Re)==128&&(192&Pe)==128&&(Ye=(15&Y)<<18|(63&at)<<12|(63&Re)<<6|63&Pe)>65535&&Ye<1114112&&(me=Ye)}}me===null?(me=65533,Ae=1):me>65535&&(me-=65536,J.push(me>>>10&1023|55296),me=56320|1023&me),J.push(me),V+=Ae}return I(J)}function I(te){var k=te.length;if(k<=Ne)return String.fromCharCode.apply(String,te);for(var N="",J=0;J<k;)N+=String.fromCharCode.apply(String,te.slice(J,J+=Ne));return N}function j(te,k,N){var J="";N=Math.min(te.length,N);for(var V=k;V<N;++V)J+=String.fromCharCode(127&te[V]);return J}function B(te,k,N){var J="";N=Math.min(te.length,N);for(var V=k;V<N;++V)J+=String.fromCharCode(te[V]);return J}function ee(te,k,N){var J=te.length;(!k||k<0)&&(k=0),(!N||N<0||N>J)&&(N=J);for(var V="",Y=k;Y<N;++Y)V+=_e(te[Y]);return V}function F(te,k,N){for(var J=te.slice(k,N),V="",Y=0;Y<J.length;Y+=2)V+=String.fromCharCode(J[Y]+256*J[Y+1]);return V}function G(te,k,N){if(te%1!=0||te<0)throw new RangeError("offset is not uint");if(te+k>N)throw new RangeError("Trying to access beyond buffer length")}function X(te,k,N,J,V,Y){if(!u.isBuffer(te))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+J>te.length)throw new RangeError("Index out of range")}function Z(te,k,N,J){k<0&&(k=65535+k+1);for(var V=0,Y=Math.min(te.length-N,2);V<Y;++V)te[N+V]=(k&255<<8*(J?V:1-V))>>>8*(J?V:1-V)}function K(te,k,N,J){k<0&&(k=4294967295+k+1);for(var V=0,Y=Math.min(te.length-N,4);V<Y;++V)te[N+V]=k>>>8*(J?V:3-V)&255}function q(te,k,N,J,V,Y){if(N+J>te.length)throw new RangeError("Index out of range");if(N<0)throw new RangeError("Index out of range")}function ae(te,k,N,J,V){return V||q(te,k,N,4,34028234663852886e22,-34028234663852886e22),ce.write(te,k,N,J,23,4),N+4}function oe(te,k,N,J,V){return V||q(te,k,N,8,17976931348623157e292,-17976931348623157e292),ce.write(te,k,N,J,52,8),N+8}function ve(te){if(te=he(te).replace(Xe,""),te.length<2)return"";for(;te.length%4!=0;)te+="=";return te}function he(te){return te.trim?te.trim():te.replace(/^\s+|\s+$/g,"")}function _e(te){return te<16?"0"+te.toString(16):te.toString(16)}function fe(te,k){k=k||1/0;for(var N,J=te.length,V=null,Y=[],me=0;me<J;++me){if((N=te.charCodeAt(me))>55295&&N<57344){if(!V){if(N>56319){(k-=3)>-1&&Y.push(239,191,189);continue}if(me+1===J){(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 xe(te){for(var k=[],N=0;N<te.length;++N)k.push(255&te.charCodeAt(N));return k}function je(te,k){for(var N,J,V,Y=[],me=0;me<te.length&&!((k-=2)<0);++me)N=te.charCodeAt(me),J=N>>8,V=N%256,Y.push(V),Y.push(J);return Y}function Le(te){return ge.toByteArray(ve(te))}function ke(te,k,N,J){for(var V=0;V<J&&!(V+N>=k.length||V>=te.length);++V)k[V+N]=te[V];return V}function Fe(te){return te!==te}/*!
|
|
|
* The buffer module from node.js, for the browser.
|
|
|
*
|
|
|
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
|
* @license MIT
|
|
|
*/var ge=P(21),ce=P(22),Ie=P(23);S.Buffer=u,S.SlowBuffer=n,S.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=E.TYPED_ARRAY_SUPPORT!==void 0?E.TYPED_ARRAY_SUPPORT:function(){try{var te=new Uint8Array(1);return te.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},te.foo()===42&&typeof te.subarray=="function"&&te.subarray(1,1).byteLength===0}catch(k){return!1}}(),S.kMaxLength=C(),u.poolSize=8192,u._augment=function(te){return te.__proto__=u.prototype,te},u.from=function(te,k,N){return p(null,te,k,N)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(te,k,N){return o(null,te,k,N)},u.allocUnsafe=function(te){return a(null,te)},u.allocUnsafeSlow=function(te){return a(null,te)},u.isBuffer=function(te){return!(te==null||!te._isBuffer)},u.compare=function(te,k){if(!u.isBuffer(te)||!u.isBuffer(k))throw new TypeError("Arguments must be Buffers");if(te===k)return 0;for(var N=te.length,J=k.length,V=0,Y=Math.min(N,J);V<Y;++V)if(te[V]!==k[V]){N=te[V],J=k[V];break}return N<J?-1:J<N?1:0},u.isEncoding=function(te){switch(String(te).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}},u.concat=function(te,k){if(!Ie(te))throw new TypeError('"list" argument must be an Array of Buffers');if(te.length===0)return u.alloc(0);var N;if(k===void 0)for(k=0,N=0;N<te.length;++N)k+=te[N].length;var J=u.allocUnsafe(k),V=0;for(N=0;N<te.length;++N){var Y=te[N];if(!u.isBuffer(Y))throw new TypeError('"list" argument must be an Array of Buffers');Y.copy(J,V),V+=Y.length}return J},u.byteLength=h,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var te=this.length;if(te%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var k=0;k<te;k+=2)b(this,k,k+1);return this},u.prototype.swap32=function(){var te=this.length;if(te%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var k=0;k<te;k+=4)b(this,k,k+3),b(this,k+1,k+2);return this},u.prototype.swap64=function(){var te=this.length;if(te%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var k=0;k<te;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},u.prototype.toString=function(){var te=0|this.length;return te===0?"":arguments.length===0?D(this,0,te):v.apply(this,arguments)},u.prototype.equals=function(te){if(!u.isBuffer(te))throw new TypeError("Argument must be a Buffer");return this===te||u.compare(this,te)===0},u.prototype.inspect=function(){var te="",k=S.INSPECT_MAX_BYTES;return this.length>0&&(te=this.toString("hex",0,k).match(/.{2}/g).join(" "),this.length>k&&(te+=" ... ")),"<Buffer "+te+">"},u.prototype.compare=function(te,k,N,J,V){if(!u.isBuffer(te))throw new TypeError("Argument must be a Buffer");if(k===void 0&&(k=0),N===void 0&&(N=te?te.length:0),J===void 0&&(J=0),V===void 0&&(V=this.length),k<0||N>te.length||J<0||V>this.length)throw new RangeError("out of range index");if(J>=V&&k>=N)return 0;if(J>=V)return-1;if(k>=N)return 1;if(k>>>=0,N>>>=0,J>>>=0,V>>>=0,this===te)return 0;for(var Y=V-J,me=N-k,Ae=Math.min(Y,me),at=this.slice(J,V),Re=te.slice(k,N),Pe=0;Pe<Ae;++Pe)if(at[Pe]!==Re[Pe]){Y=at[Pe],me=Re[Pe];break}return Y<me?-1:me<Y?1:0},u.prototype.includes=function(te,k,N){return this.indexOf(te,k,N)!==-1},u.prototype.indexOf=function(te,k,N){return y(this,te,k,N,!0)},u.prototype.lastIndexOf=function(te,k,N){return y(this,te,k,N,!1)},u.prototype.write=function(te,k,N,J){if(k===void 0)J="utf8",N=this.length,k=0;else if(N===void 0&&typeof k=="string")J=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,J===void 0&&(J="utf8")):(J=N,N=void 0)}var V=this.length-k;if((N===void 0||N>V)&&(N=V),te.length>0&&(N<0||k<0)||k>this.length)throw new RangeError("Attempt to write outside buffer bounds");J||(J="utf8");for(var Y=!1;;)switch(J){case"hex":return m(this,te,k,N);case"utf8":case"utf-8":return g(this,te,k,N);case"ascii":return x(this,te,k,N);case"latin1":case"binary":return l(this,te,k,N);case"base64":return T(this,te,k,N);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,te,k,N);default:if(Y)throw new TypeError("Unknown encoding: "+J);J=(""+J).toLowerCase(),Y=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Ne=4096;u.prototype.slice=function(te,k){var N=this.length;te=~~te,k=k===void 0?N:~~k,te<0?(te+=N)<0&&(te=0):te>N&&(te=N),k<0?(k+=N)<0&&(k=0):k>N&&(k=N),k<te&&(k=te);var J;if(u.TYPED_ARRAY_SUPPORT)J=this.subarray(te,k),J.__proto__=u.prototype;else{var V=k-te;J=new u(V,void 0);for(var Y=0;Y<V;++Y)J[Y]=this[Y+te]}return J},u.prototype.readUIntLE=function(te,k,N){te|=0,k|=0,N||G(te,k,this.length);for(var J=this[te],V=1,Y=0;++Y<k&&(V*=256);)J+=this[te+Y]*V;return J},u.prototype.readUIntBE=function(te,k,N){te|=0,k|=0,N||G(te,k,this.length);for(var J=this[te+--k],V=1;k>0&&(V*=256);)J+=this[te+--k]*V;return J},u.prototype.readUInt8=function(te,k){return k||G(te,1,this.length),this[te]},u.prototype.readUInt16LE=function(te,k){return k||G(te,2,this.length),this[te]|this[te+1]<<8},u.prototype.readUInt16BE=function(te,k){return k||G(te,2,this.length),this[te]<<8|this[te+1]},u.prototype.readUInt32LE=function(te,k){return k||G(te,4,this.length),(this[te]|this[te+1]<<8|this[te+2]<<16)+16777216*this[te+3]},u.prototype.readUInt32BE=function(te,k){return k||G(te,4,this.length),16777216*this[te]+(this[te+1]<<16|this[te+2]<<8|this[te+3])},u.prototype.readIntLE=function(te,k,N){te|=0,k|=0,N||G(te,k,this.length);for(var J=this[te],V=1,Y=0;++Y<k&&(V*=256);)J+=this[te+Y]*V;return V*=128,J>=V&&(J-=Math.pow(2,8*k)),J},u.prototype.readIntBE=function(te,k,N){te|=0,k|=0,N||G(te,k,this.length);for(var J=k,V=1,Y=this[te+--J];J>0&&(V*=256);)Y+=this[te+--J]*V;return V*=128,Y>=V&&(Y-=Math.pow(2,8*k)),Y},u.prototype.readInt8=function(te,k){return k||G(te,1,this.length),128&this[te]?-1*(255-this[te]+1):this[te]},u.prototype.readInt16LE=function(te,k){k||G(te,2,this.length);var N=this[te]|this[te+1]<<8;return 32768&N?4294901760|N:N},u.prototype.readInt16BE=function(te,k){k||G(te,2,this.length);var N=this[te+1]|this[te]<<8;return 32768&N?4294901760|N:N},u.prototype.readInt32LE=function(te,k){return k||G(te,4,this.length),this[te]|this[te+1]<<8|this[te+2]<<16|this[te+3]<<24},u.prototype.readInt32BE=function(te,k){return k||G(te,4,this.length),this[te]<<24|this[te+1]<<16|this[te+2]<<8|this[te+3]},u.prototype.readFloatLE=function(te,k){return k||G(te,4,this.length),ce.read(this,te,!0,23,4)},u.prototype.readFloatBE=function(te,k){return k||G(te,4,this.length),ce.read(this,te,!1,23,4)},u.prototype.readDoubleLE=function(te,k){return k||G(te,8,this.length),ce.read(this,te,!0,52,8)},u.prototype.readDoubleBE=function(te,k){return k||G(te,8,this.length),ce.read(this,te,!1,52,8)},u.prototype.writeUIntLE=function(te,k,N,J){(te=+te,k|=0,N|=0,!J)&&X(this,te,k,N,Math.pow(2,8*N)-1,0);var V=1,Y=0;for(this[k]=255&te;++Y<N&&(V*=256);)this[k+Y]=te/V&255;return k+N},u.prototype.writeUIntBE=function(te,k,N,J){(te=+te,k|=0,N|=0,!J)&&X(this,te,k,N,Math.pow(2,8*N)-1,0);var V=N-1,Y=1;for(this[k+V]=255&te;--V>=0&&(Y*=256);)this[k+V]=te/Y&255;return k+N},u.prototype.writeUInt8=function(te,k,N){return te=+te,k|=0,N||X(this,te,k,1,255,0),u.TYPED_ARRAY_SUPPORT||(te=Math.floor(te)),this[k]=255&te,k+1},u.prototype.writeUInt16LE=function(te,k,N){return te=+te,k|=0,N||X(this,te,k,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[k]=255&te,this[k+1]=te>>>8):Z(this,te,k,!0),k+2},u.prototype.writeUInt16BE=function(te,k,N){return te=+te,k|=0,N||X(this,te,k,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[k]=te>>>8,this[k+1]=255&te):Z(this,te,k,!1),k+2},u.prototype.writeUInt32LE=function(te,k,N){return te=+te,k|=0,N||X(this,te,k,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[k+3]=te>>>24,this[k+2]=te>>>16,this[k+1]=te>>>8,this[k]=255&te):K(this,te,k,!0),k+4},u.prototype.writeUInt32BE=function(te,k,N){return te=+te,k|=0,N||X(this,te,k,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[k]=te>>>24,this[k+1]=te>>>16,this[k+2]=te>>>8,this[k+3]=255&te):K(this,te,k,!1),k+4},u.prototype.writeIntLE=function(te,k,N,J){if(te=+te,k|=0,!J){var V=Math.pow(2,8*N-1);X(this,te,k,N,V-1,-V)}var Y=0,me=1,Ae=0;for(this[k]=255&te;++Y<N&&(me*=256);)te<0&&Ae===0&&this[k+Y-1]!==0&&(Ae=1),this[k+Y]=(te/me>>0)-Ae&255;return k+N},u.prototype.writeIntBE=function(te,k,N,J){if(te=+te,k|=0,!J){var V=Math.pow(2,8*N-1);X(this,te,k,N,V-1,-V)}var Y=N-1,me=1,Ae=0;for(this[k+Y]=255&te;--Y>=0&&(me*=256);)te<0&&Ae===0&&this[k+Y+1]!==0&&(Ae=1),this[k+Y]=(te/me>>0)-Ae&255;return k+N},u.prototype.writeInt8=function(te,k,N){return te=+te,k|=0,N||X(this,te,k,1,127,-128),u.TYPED_ARRAY_SUPPORT||(te=Math.floor(te)),te<0&&(te=255+te+1),this[k]=255&te,k+1},u.prototype.writeInt16LE=function(te,k,N){return te=+te,k|=0,N||X(this,te,k,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[k]=255&te,this[k+1]=te>>>8):Z(this,te,k,!0),k+2},u.prototype.writeInt16BE=function(te,k,N){return te=+te,k|=0,N||X(this,te,k,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[k]=te>>>8,this[k+1]=255&te):Z(this,te,k,!1),k+2},u.prototype.writeInt32LE=function(te,k,N){return te=+te,k|=0,N||X(this,te,k,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[k]=255&te,this[k+1]=te>>>8,this[k+2]=te>>>16,this[k+3]=te>>>24):K(this,te,k,!0),k+4},u.prototype.writeInt32BE=function(te,k,N){return te=+te,k|=0,N||X(this,te,k,4,2147483647,-2147483648),te<0&&(te=4294967295+te+1),u.TYPED_ARRAY_SUPPORT?(this[k]=te>>>24,this[k+1]=te>>>16,this[k+2]=te>>>8,this[k+3]=255&te):K(this,te,k,!1),k+4},u.prototype.writeFloatLE=function(te,k,N){return ae(this,te,k,!0,N)},u.prototype.writeFloatBE=function(te,k,N){return ae(this,te,k,!1,N)},u.prototype.writeDoubleLE=function(te,k,N){return oe(this,te,k,!0,N)},u.prototype.writeDoubleBE=function(te,k,N){return oe(this,te,k,!1,N)},u.prototype.copy=function(te,k,N,J){if(N||(N=0),J||J===0||(J=this.length),k>=te.length&&(k=te.length),k||(k=0),J>0&&J<N&&(J=N),J===N)return 0;if(te.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(J<0)throw new RangeError("sourceEnd out of bounds");J>this.length&&(J=this.length),te.length-k<J-N&&(J=te.length-k+N);var V,Y=J-N;if(this===te&&N<k&&k<J)for(V=Y-1;V>=0;--V)te[V+k]=this[V+N];else if(Y<1e3||!u.TYPED_ARRAY_SUPPORT)for(V=0;V<Y;++V)te[V+k]=this[V+N];else Uint8Array.prototype.set.call(te,this.subarray(N,N+Y),k);return Y},u.prototype.fill=function(te,k,N,J){if(typeof te=="string"){if(typeof k=="string"?(J=k,k=0,N=this.length):typeof N=="string"&&(J=N,N=this.length),te.length===1){var V=te.charCodeAt(0);V<256&&(te=V)}if(J!==void 0&&typeof J!="string")throw new TypeError("encoding must be a string");if(typeof J=="string"&&!u.isEncoding(J))throw new TypeError("Unknown encoding: "+J)}else typeof te=="number"&&(te&=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,te||(te=0);var Y;if(typeof te=="number")for(Y=k;Y<N;++Y)this[Y]=te;else{var me=u.isBuffer(te)?te:fe(new u(te,J).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(S,P(20))},function(U,S){var P;P=function(){return this}();try{P=P||Function("return this")()||(0,eval)("this")}catch(E){typeof window=="object"&&(P=window)}U.exports=P},function(U,S,P){"use strict";function E(t){var n=t.length;if(n%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return t[n-2]==="="?2:t[n-1]==="="?1:0}function C(t){return 3*t.length/4-E(t)}function w(t){var n,h,v,b,y,_=t.length;b=E(t),y=new c(3*_/4-b),h=b>0?_-4:_;var m=0;for(n=0;n<h;n+=4)v=a[t.charCodeAt(n)]<<18|a[t.charCodeAt(n+1)]<<12|a[t.charCodeAt(n+2)]<<6|a[t.charCodeAt(n+3)],y[m++]=v>>16&255,y[m++]=v>>8&255,y[m++]=255&v;return b===2?(v=a[t.charCodeAt(n)]<<2|a[t.charCodeAt(n+1)]>>4,y[m++]=255&v):b===1&&(v=a[t.charCodeAt(n)]<<10|a[t.charCodeAt(n+1)]<<4|a[t.charCodeAt(n+2)]>>2,y[m++]=v>>8&255,y[m++]=255&v),y}function u(t){return o[t>>18&63]+o[t>>12&63]+o[t>>6&63]+o[63&t]}function p(t,n,h){for(var v,b=[],y=n;y<h;y+=3)v=(t[y]<<16)+(t[y+1]<<8)+t[y+2],b.push(u(v));return b.join("")}function f(t){for(var n,h=t.length,v=h%3,b="",y=[],_=0,m=h-v;_<m;_+=16383)y.push(p(t,_,_+16383>m?m:_+16383));return v===1?(n=t[h-1],b+=o[n>>2],b+=o[n<<4&63],b+="=="):v===2&&(n=(t[h-2]<<8)+t[h-1],b+=o[n>>10],b+=o[n>>4&63],b+=o[n<<2&63],b+="="),y.push(b),y.join("")}S.byteLength=C,S.toByteArray=w,S.fromByteArray=f;for(var o=[],a=[],c=typeof Uint8Array!="undefined"?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,i=s.length;d<i;++d)o[d]=s[d],a[s.charCodeAt(d)]=d;a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},function(U,S){S.read=function(P,E,C,w,u){var p,f,o=8*u-w-1,a=(1<<o)-1,c=a>>1,s=-7,d=C?u-1:0,i=C?-1:1,t=P[E+d];for(d+=i,p=t&(1<<-s)-1,t>>=-s,s+=o;s>0;p=256*p+P[E+d],d+=i,s-=8);for(f=p&(1<<-s)-1,p>>=-s,s+=w;s>0;f=256*f+P[E+d],d+=i,s-=8);if(p===0)p=1-c;else{if(p===a)return f?NaN:1/0*(t?-1:1);f+=Math.pow(2,w),p-=c}return(t?-1:1)*f*Math.pow(2,p-w)},S.write=function(P,E,C,w,u,p){var f,o,a,c=8*p-u-1,s=(1<<c)-1,d=s>>1,i=u===23?Math.pow(2,-24)-Math.pow(2,-77):0,t=w?0:p-1,n=w?1:-1,h=E<0||E===0&&1/E<0?1:0;for(E=Math.abs(E),isNaN(E)||E===1/0?(o=isNaN(E)?1:0,f=s):(f=Math.floor(Math.log(E)/Math.LN2),E*(a=Math.pow(2,-f))<1&&(f--,a*=2),E+=f+d>=1?i/a:i*Math.pow(2,1-d),E*a>=2&&(f++,a/=2),f+d>=s?(o=0,f=s):f+d>=1?(o=(E*a-1)*Math.pow(2,u),f+=d):(o=E*Math.pow(2,d-1)*Math.pow(2,u),f=0));u>=8;P[C+t]=255&o,t+=n,o/=256,u-=8);for(f=f<<u|o,c+=u;c>0;P[C+t]=255&f,t+=n,f/=256,c-=8);P[C+t-n]|=128*h}},function(U,S){var P={}.toString;U.exports=Array.isArray||function(E){return P.call(E)=="[object Array]"}},function(U,S,P){"use strict";function E(u,p){if(!(u instanceof p))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(S,"__esModule",{value:!0});var C=function(){function u(p,f){for(var o=0;o<f.length;o++){var a=f[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(p,a.key,a)}}return function(p,f,o){return f&&u(p.prototype,f),o&&u(p,o),p}}(),w=function(){function u(){E(this,u)}return C(u,null,[{key:"set",value:function(p,f){try{window.localStorage&&localStorage.setItem(p,f)}catch(o){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"]}}}]),u}();S.default=w},function(U,S,P){"use strict";function E(u,p){if(!(u instanceof p))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(S,"__esModule",{value:!0});var C=function(){function u(p,f){for(var o=0;o<f.length;o++){var a=f[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(p,a.key,a)}}return function(p,f,o){return f&&u(p.prototype,f),o&&u(p,o),p}}(),w=function(){function u(){E(this,u)}return C(u,null,[{key:"get",value:function(p){for(var f=p+"",o=document.cookie.split(";"),a=0;a<o.length;a++){var c=o[a].trim();if(c.indexOf(f)==0)return unescape(c.substring(f.length+1,c.length))}return""}},{key:"set",value:function(p,f,o){var a=new Date;a.setTime(a.getTime()+24*o*60*60*1e3);var c="expires="+a.toGMTString();document.cookie=p+"="+escape(f)+"; "+c}}]),u}();S.default=w},function(U,S,P){"use strict";function E(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(S,"__esModule",{value:!0});var w=function(){function c(s,d){for(var i=0;i<d.length;i++){var t=d[i];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(s,t.key,t)}}return function(s,d,i){return d&&c(s.prototype,d),i&&c(s,i),s}}(),u=P(8),p=E(u),f=P(9),o=E(f),a=function(){function c(){C(this,c)}return w(c,null,[{key:"refreshUploadAuth",value:function(s,d,i){var t=(o.default.randomUUID(),o.default.randomUUID()),n={AccessKeyId:s.accessKeyId,SecurityToken:s.securityToken,Action:"RefreshUploadVideo",VideoId:s.videoId,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:t,RequestId:s.requestId},h=o.default.makeUTF8sort(n,"=","&")+"&Signature="+o.default.aliyunEncodeURI(o.default.makeChangeSiga(n,s.accessKeySecret)),v="https://vod."+s.region+".aliyuncs.com/?"+h;p.default.get(v,function(b){var b=JSON.parse(b);d&&d(b)},function(b){if(i){var y=JSON.parse(b);i(y)}})}},{key:"getUploadAuth",value:function(s,d,i){var t=(o.default.randomUUID(),o.default.randomUUID()),n={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:t,RequestId:s.requestId};s.fileSize&&(n.FileSize=s.fileSize),s.description&&(n.Description=s.description),s.cateId&&(n.CateId=s.cateId),s.tags&&(n.Tags=s.tags),s.templateGroupId&&(n.TemplateGroupId=s.templateGroupId),s.storageLocation&&(n.StorageLocation=s.storageLocation),s.coverUrl&&(n.CoverURL=s.coverUrl),s.transCodeMode&&(n.TransCodeMode=s.transCodeMode),s.userData&&(n.UserData=JSON.stringify(s.userData));var h=o.default.makeUTF8sort(n,"=","&")+"&Signature="+o.default.aliyunEncodeURI(o.default.makeChangeSiga(n,s.accessKeySecret)),v="https://vod."+s.region+".aliyuncs.com/?"+h;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"})}d&&d(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,d,i){var t=(o.default.randomUUID(),o.default.randomUUID()),n={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:t,RequestId:s.requestId};s.title&&(n.Title=s.title),s.imageExt&&(n.ImageExt=s.imageExt),s.tags&&(n.Tags=s.tags),s.storageLocation&&(n.StorageLocation=s.storageLocation);var h=o.default.makeUTF8sort(n,"=","&")+"&Signature="+o.default.aliyunEncodeURI(o.default.makeChangeSiga(n,s.accessKeySecret)),v="https://vod."+s.region+".aliyuncs.com/?"+h;p.default.get(v,function(b){b=JSON.parse(b),d&&d(b)},function(b){if(i){var y=JSON.parse(b);i(y)}})}}]),c}();S.default=a},function(U,S,P){!function(E,C,w){U.exports=S=C(P(0),P(28),P(29))}(0,function(E){return E.HmacSHA1})},function(U,S,P){!function(E,C){U.exports=S=C(P(0))}(0,function(E){return function(){var C=E,w=C.lib,u=w.WordArray,p=w.Hasher,f=C.algo,o=[],a=f.SHA1=p.extend({_doReset:function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(c,s){for(var d=this._hash.words,i=d[0],t=d[1],n=d[2],h=d[3],v=d[4],b=0;b<80;b++){if(b<16)o[b]=0|c[s+b];else{var y=o[b-3]^o[b-8]^o[b-14]^o[b-16];o[b]=y<<1|y>>>31}var _=(i<<5|i>>>27)+v+o[b];_+=b<20?1518500249+(t&n|~t&h):b<40?1859775393+(t^n^h):b<60?(t&n|t&h|n&h)-1894007588:(t^n^h)-899497514,v=h,h=n,n=t<<30|t>>>2,t=i,i=_}d[0]=d[0]+i|0,d[1]=d[1]+t|0,d[2]=d[2]+n|0,d[3]=d[3]+h|0,d[4]=d[4]+v|0},_doFinalize:function(){var c=this._data,s=c.words,d=8*this._nDataBytes,i=8*c.sigBytes;return s[i>>>5]|=128<<24-i%32,s[14+(i+64>>>9<<4)]=Math.floor(d/4294967296),s[15+(i+64>>>9<<4)]=d,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)}(),E.SHA1})},function(U,S,P){!function(E,C){U.exports=S=C(P(0))}(0,function(E){!function(){var C=E,w=C.lib,u=w.Base,p=C.enc,f=p.Utf8,o=C.algo;o.HMAC=u.extend({init:function(a,c){a=this._hasher=new a.init,typeof c=="string"&&(c=f.parse(c));var s=a.blockSize,d=4*s;c.sigBytes>d&&(c=a.finalize(c)),c.clamp();for(var i=this._oKey=c.clone(),t=this._iKey=c.clone(),n=i.words,h=t.words,v=0;v<s;v++)n[v]^=1549556828,h[v]^=909522486;i.sigBytes=t.sigBytes=d,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,S,P){!function(E,C){U.exports=S=C(P(0))}(0,function(E){return function(){function C(o,a,c){for(var s=[],d=0,i=0;i<a;i++)if(i%4){var t=c[o.charCodeAt(i-1)]<<i%4*2,n=c[o.charCodeAt(i)]>>>6-i%4*2;s[d>>>2]|=(t|n)<<24-d%4*8,d++}return p.create(s,d)}var w=E,u=w.lib,p=u.WordArray,f=w.enc;f.Base64={stringify:function(o){var a=o.words,c=o.sigBytes,s=this._map;o.clamp();for(var d=[],i=0;i<c;i+=3)for(var t=a[i>>>2]>>>24-i%4*8&255,n=a[i+1>>>2]>>>24-(i+1)%4*8&255,h=a[i+2>>>2]>>>24-(i+2)%4*8&255,v=t<<16|n<<8|h,b=0;b<4&&i+.75*b<c;b++)d.push(s.charAt(v>>>6*(3-b)&63));var y=s.charAt(64);if(y)for(;d.length%4;)d.push(y);return d.join("")},parse:function(o){var a=o.length,c=this._map,s=this._reverseMap;if(!s){s=this._reverseMap=[];for(var d=0;d<c.length;d++)s[c.charCodeAt(d)]=d}var i=c.charAt(64);if(i){var t=o.indexOf(i);t!==-1&&(a=t)}return C(o,a,s)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),E.enc.Base64})},function(U,S,P){"use strict";function E(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(S,"__esModule",{value:!0});var w=function(){function m(g,x){for(var l=0;l<x.length;l++){var T=x[l];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(g,T.key,T)}}return function(g,x,l){return x&&m(g.prototype,x),l&&m(g,l),g}}(),u=P(8),p=E(u),f=P(7),o=E(f),a=P(4),c=E(a),s=P(6),d=E(s),i=P(1),t=E(i),n=P(9),h=E(n),v=P(2),b=P(11),y=P(10),_=function(){function m(){C(this,m)}return w(m,null,[{key:"getAuthInfo",value:function(g,x,l){var T=g+"|f#Ylm&^1TppeRhLg|"+l;return x&&(T=g+"|"+x+"|f#Ylm&^1TppeRhLg|"+l),v(y.parse(T)).toString(b)}},{key:"upload",value:function(g,x,l){var T=t.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=h.default.randomUUID(),j={Source:"WebSDK",BusinessType:"UploadVideo",Action:"ReportUploadProgress",TerminalType:"H5",DeviceModel:o.default.browser.name+(o.default.browser.version||""),AppVersion:d.default.version,AuthTimestamp:A,Timestamp:T,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&&(j.ClientId=O);var B=h.default.makeUTF8sort(j,"=","&")+"&Signature="+h.default.aliyunEncodeURI(h.default.makeChangeSiga(j,g.accessKeySecret)),ee="https://vod."+g.region+".aliyuncs.com/?"+B;p.default.get(ee,function(F){x&&x()},function(F){F&&(l(F),console.log(F))})}},{key:"get",value:function(g,x,l){var T=t.default.ISODateString(new Date),A=Math.floor(new Date().valueOf()/1e3),O=c.default.getClientId(),D=m.getAuthInfo(g.userId,O,A),I=h.default.randomUUID(),j={Source:"WebSDK",BusinessType:"UploadVideo",Action:"GetUploadProgress",TerminalType:"H5",DeviceModel:o.default.browser.name+(o.default.browser.version||""),AppVersion:d.default.version,AuthTimestamp:A,Timestamp:T,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&&(j.ClientId=O);var B=h.default.makeUTF8sort(j,"=","&")+"&Signature="+h.default.aliyunEncodeURI(h.default.makeChangeSiga(j,g.accessKeySecret)),ee="https://vod."+g.region+".aliyuncs.com/?"+B;p.default.get(ee,function(F){var G={},X=O;F=F?JSON.parse(F):{},F.UploadProgress&&F.UploadProgress.UploadProgressList&&F.UploadProgress.UploadProgressList.length>0&&(G=F.UploadProgress.UploadProgressList[0],X=G.ClientId),c.default.setClientId(X),x&&x(G)},function(F){F&&(l(F),console.log(F))})}}]),m}();S.default=_},function(U,S,P){"use strict";function E(f,o){if(!(f instanceof o))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(S,"__esModule",{value:!0});var C=function(){function f(o,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(o,s.key,s)}}return function(o,a,c){return a&&f(o.prototype,a),c&&f(o,c),o}}(),w=P(2),u=P(33),p=(P(11),function(){function f(){E(this,f)}return C(f,null,[{key:"getMd5",value:function(o,a,c){var s=new FileReader;s.onload=function(t){try{if(t&&t.target){var n=w(u.parse(t.target.result)),h=n.toString();a(h)}}catch(v){console.log(v)}},s.onerror=function(t){console.log(t),errorCallback(t)};var d=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,i=d.call(o,0,1024);s.readAsBinaryString(i)}}]),f}());S.default=p},function(U,S,P){!function(E,C){U.exports=S=C(P(0))}(0,function(E){return E.enc.Latin1})}])}).call(this,W("IyRk"))},ps8w:function(Ve,Be,W){Ve.exports=W.p+"static/show.6268a056.svg"},"rAM+":function(Ve,Be,W){"use strict";W.d(Be,"a",function(){return $});var re=W("Qw5x");function $(U,S){var P;if(typeof Symbol=="undefined"||U[Symbol.iterator]==null){if(Array.isArray(U)||(P=Object(re.a)(U))||S&&U&&typeof U.length=="number"){P&&(U=P);var E=0,C=function(){};return{s:C,n:function(){return E>=U.length?{done:!0}:{done:!1,value:U[E++]}},e:function(o){throw o},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 w=!0,u=!1,p;return{s:function(){P=U[Symbol.iterator]()},n:function(){var o=P.next();return w=o.done,o},e:function(o){u=!0,p=o},f:function(){try{!w&&P.return!=null&&P.return()}finally{if(u)throw p}}}}},rHrb:function(Ve,Be,W){"use strict";Object.defineProperty(Be,"__esModule",{value:!0}),Be.CopyToClipboard=void 0;var re=U(W("cDcd")),$=U(W("+QRC"));function U(n){return n&&n.__esModule?n:{default:n}}function S(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?S=function(v){return typeof v}:S=function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},S(n)}function P(n,h){var v=Object.keys(n);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(n);h&&(b=b.filter(function(y){return Object.getOwnPropertyDescriptor(n,y).enumerable})),v.push.apply(v,b)}return v}function E(n){for(var h=1;h<arguments.length;h++){var v=arguments[h]!=null?arguments[h]:{};h%2?P(v,!0).forEach(function(b){i(n,b,v[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(v)):P(v).forEach(function(b){Object.defineProperty(n,b,Object.getOwnPropertyDescriptor(v,b))})}return n}function C(n,h){if(n==null)return{};var v=w(n,h),b,y;if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(n);for(y=0;y<_.length;y++){if(b=_[y],h.indexOf(b)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(n,b))continue;v[b]=n[b]}}return v}function w(n,h){if(n==null)return{};var v={},b=Object.keys(n),y,_;for(_=0;_<b.length;_++){if(y=b[_],h.indexOf(y)>=0)continue;v[y]=n[y]}return v}function u(n,h){if(!(n instanceof h))throw new TypeError("Cannot call a class as a function")}function p(n,h){for(var v=0;v<h.length;v++){var b=h[v];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(n,b.key,b)}}function f(n,h,v){return h&&p(n.prototype,h),v&&p(n,v),n}function o(n,h){return h&&(S(h)==="object"||typeof h=="function")?h:c(n)}function a(n){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(v){return v.__proto__||Object.getPrototypeOf(v)},a(n)}function c(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function s(n,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(h&&h.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),h&&d(n,h)}function d(n,h){return d=Object.setPrototypeOf||function(b,y){return b.__proto__=y,b},d(n,h)}function i(n,h,v){return h in n?Object.defineProperty(n,h,{value:v,enumerable:!0,configurable:!0,writable:!0}):n[h]=v,n}var t=function(n){s(h,n);function h(){var v,b;u(this,h);for(var y=arguments.length,_=new Array(y),m=0;m<y;m++)_[m]=arguments[m];return b=o(this,(v=a(h)).call.apply(v,[this].concat(_))),i(c(b),"onClick",function(g){var x=b.props,l=x.text,T=x.onCopy,A=x.children,O=x.options,D=re.default.Children.only(A),I=(0,$.default)(l,O);T&&T(l,I),D&&D.props&&typeof D.props.onClick=="function"&&D.props.onClick(g)}),b}return f(h,[{key:"render",value:function(){var b=this.props,y=b.text,_=b.onCopy,m=b.options,g=b.children,x=C(b,["text","onCopy","options","children"]),l=re.default.Children.only(g);return re.default.cloneElement(l,E({},x,{onClick:this.onClick}))}}]),h}(re.default.PureComponent);Be.CopyToClipboard=t,i(t,"defaultProps",{onCopy:void 0,options:void 0})},rUJ1:function(Ve,Be){const W=/[&<>"']/,re=/[&<>"']/g,$=/[<>"']|&(?!#?\w+;)/,U=/[<>"']|&(?!#?\w+;)/g,S={"&":"&","<":"<",">":">",'"':""","'":"'"},P=m=>S[m];function E(m,g){if(g){if(W.test(m))return m.replace(re,P)}else if($.test(m))return m.replace(U,P);return m}const C=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function w(m){return m.replace(C,(g,x)=>(x=x.toLowerCase(),x==="colon"?":":x.charAt(0)==="#"?x.charAt(1)==="x"?String.fromCharCode(parseInt(x.substring(2),16)):String.fromCharCode(+x.substring(1)):""))}const u=/(^|[^\[])\^/g;function p(m,g){m=m.source||m,g=g||"";const x={replace:(l,T)=>(T=T.source||T,T=T.replace(u,"$1"),m=m.replace(l,T),x),getRegex:()=>new RegExp(m,g)};return x}const f=/[^\w:]/g,o=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function a(m,g,x){if(m){let l;try{l=decodeURIComponent(w(x)).replace(f,"").toLowerCase()}catch(T){return null}if(l.indexOf("javascript:")===0||l.indexOf("vbscript:")===0||l.indexOf("data:")===0)return null}g&&!o.test(x)&&(x=t(g,x));try{x=encodeURI(x).replace(/%25/g,"%")}catch(l){return null}return x}const c={},s=/^[^:]+:\/*[^/]*$/,d=/^([^:]+:)[\s\S]*$/,i=/^([^:]+:\/*[^/]*)[\s\S]*$/;function t(m,g){c[" "+m]||(s.test(m)?c[" "+m]=m+"/":c[" "+m]=b(m,"/",!0)),m=c[" "+m];const x=m.indexOf(":")===-1;return g.substring(0,2)==="//"?x?g:m.replace(d,"$1")+g:g.charAt(0)==="/"?x?g:m.replace(i,"$1")+g:m+g}const n={exec:function(){}};function h(m){let g=1,x,l;for(;g<arguments.length;g++){x=arguments[g];for(l in x)Object.prototype.hasOwnProperty.call(x,l)&&(m[l]=x[l])}return m}function v(m,g){const x=m.replace(/\|/g,(A,O,D)=>{let I=!1,j=O;for(;--j>=0&&D[j]==="\\";)I=!I;return I?"|":" |"}),l=x.split(/ \|/);let T=0;if(l.length>g)l.splice(g);else for(;l.length<g;)l.push("");for(;T<l.length;T++)l[T]=l[T].trim().replace(/\\\|/g,"|");return l}function b(m,g,x){const l=m.length;if(l===0)return"";let T=0;for(;T<l;){const A=m.charAt(l-T-1);if(A===g&&!x)T++;else if(A!==g&&x)T++;else break}return m.substr(0,l-T)}function y(m,g){if(m.indexOf(g[1])===-1)return-1;const x=m.length;let l=0,T=0;for(;T<x;T++)if(m[T]==="\\")T++;else if(m[T]===g[0])l++;else if(m[T]===g[1]&&(l--,l<0))return T;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")}Ve.exports={escape:E,unescape:w,edit:p,cleanUrl:a,resolveUrl:t,noopTest:n,merge:h,splitCells:v,rtrim:b,findClosingBracket:y,checkSanitizeDeprecation:_}},rcnY:function(Ve,Be,W){var re=W("aRTE");function $(U,S){this.totalCount=U,this.dataCount=S}$.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],$.getRSBlocks=function(U,S){var P=$.getRsBlockTable(U,S);if(P==null)throw new Error("bad rs block @ typeNumber:"+U+"/errorCorrectLevel:"+S);for(var E=P.length/3,C=new Array,w=0;w<E;w++)for(var u=P[w*3+0],p=P[w*3+1],f=P[w*3+2],o=0;o<u;o++)C.push(new $(p,f));return C},$.getRsBlockTable=function(U,S){switch(S){case re.L:return $.RS_BLOCK_TABLE[(U-1)*4+0];case re.M:return $.RS_BLOCK_TABLE[(U-1)*4+1];case re.Q:return $.RS_BLOCK_TABLE[(U-1)*4+2];case re.H:return $.RS_BLOCK_TABLE[(U-1)*4+3];default:return}},Ve.exports=$},rdUC:function(Ve,Be,W){var re=W("MFOe"),$=re.Global;Ve.exports={name:"localStorage",read:S,write:P,each:E,remove:C,clearAll:w};function U(){return $.localStorage}function S(u){return U().getItem(u)}function P(u,p){return U().setItem(u,p)}function E(u){for(var p=U().length-1;p>=0;p--){var f=U().key(p);u(S(f),f)}}function C(u){return U().removeItem(u)}function w(){return U().clear()}},"s8/Y":function(Ve,Be,W){Ve.exports=W.p+"static/jx.6713fc81.svg"},"sB/4":function(Ve,Be,W){Ve.exports=W.p+"static/b.7405990c.svg"},sNtx:function(Ve,Be,W){},sR1s:function(Ve,Be,W){"use strict";W.d(Be,"b",function(){return S}),W.d(Be,"a",function(){return P}),W.d(Be,"c",function(){return E}),W.d(Be,"d",function(){return C});var re=W("U8pU"),$="RC_TABLE_KEY";function U(w){return w==null?[]:Array.isArray(w)?w:[w]}function S(w,u){if(!u&&typeof u!="number")return w;for(var p=U(u),f=w,o=0;o<p.length;o+=1){if(!f)return null;var a=p[o];f=f[a]}return f}function P(w){var u=[],p={};return w.forEach(function(f){for(var o=f||{},a=o.key,c=o.dataIndex,s=a||U(c).join("-")||$;p[s];)s="".concat(s,"_next");p[s]=!0,u.push(s)}),u}function E(){var w={};function u(a,c){c&&Object.keys(c).forEach(function(s){var d=c[s];d&&Object(re.a)(d)==="object"?(a[s]=a[s]||{},u(a[s],d)):a[s]=d})}for(var p=arguments.length,f=new Array(p),o=0;o<p;o++)f[o]=arguments[o];return f.forEach(function(a){u(w,a)}),w}function C(w){return w!=null}},sboe:function(Ve,Be,W){"use strict";W.d(Be,"a",function(){return U});var re=W("cDcd"),$=W.n(re),U=re.createContext(null)},"t/PP":function(Ve,Be,W){Ve.exports=W.p+"static/title.dd3b799f.svg"},t23M:function(Ve,Be,W){"use strict";var re=W("VTBJ"),$=W("1OyB"),U=W("vuIU"),S=W("Ji7U"),P=W("LK+K"),E=W("cDcd"),C=W.n(E),w=W("m+aA"),u=W("Zm9Q"),p=W("Kwbf"),f=W("c+Xe"),o=W("bdgK"),a="rc-observer-key",c=function(s){Object(S.a)(i,s);var d=Object(P.a)(i);function i(){var t;return Object($.a)(this,i),t=d.apply(this,arguments),t.resizeObserver=null,t.childNode=null,t.currentElement=null,t.state={width:0,height:0,offsetHeight:0,offsetWidth:0},t.onResize=function(n){var h=t.props.onResize,v=n[0].target,b=v.getBoundingClientRect(),y=b.width,_=b.height,m=v.offsetWidth,g=v.offsetHeight,x=Math.floor(y),l=Math.floor(_);if(t.state.width!==x||t.state.height!==l||t.state.offsetWidth!==m||t.state.offsetHeight!==g){var T={width:x,height:l,offsetWidth:m,offsetHeight:g};t.setState(T),h&&Promise.resolve().then(function(){h(Object(re.a)(Object(re.a)({},T),{},{offsetWidth:m,offsetHeight:g}))})}},t.setChildNode=function(n){t.childNode=n},t}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 n=this.props.disabled;if(n){this.destroyObserver();return}var h=Object(w.a)(this.childNode||this),v=h!==this.currentElement;v&&(this.destroyObserver(),this.currentElement=h),!this.resizeObserver&&h&&(this.resizeObserver=new o.default(this.onResize),this.resizeObserver.observe(h))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var n=this.props.children,h=Object(u.a)(n);if(h.length>1)Object(p.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(h.length===0)return Object(p.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var v=h[0];if(E.isValidElement(v)&&Object(f.c)(v)){var b=v.ref;h[0]=E.cloneElement(v,{ref:Object(f.a)(b,this.setChildNode)})}return h.length===1?h[0]:h.map(function(y,_){return!E.isValidElement(y)||"key"in y&&y.key!==null?y:E.cloneElement(y,{key:"".concat(a,"-").concat(_)})})}}]),i}(E.Component);c.displayName="ResizeObserver",Be.a=c},twBr:function(Ve,Be,W){Ve.exports=W.p+"static/s.1f286590.svg"},uMZB:function(Ve,Be,W){Ve.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(Ve,Be,W){Ve.exports=re;function re(){return W("gaXo"),{}}},ulZh:function(Ve,Be,W){typeof window!="undefined"&&function($,U){Ve.exports=U()}(this,function(){return function(re){var $={};function U(S){if($[S])return $[S].exports;var P=$[S]={i:S,l:!1,exports:{}};return re[S].call(P.exports,P,P.exports,U),P.l=!0,P.exports}return U.m=re,U.c=$,U.d=function(S,P,E){U.o(S,P)||Object.defineProperty(S,P,{enumerable:!0,get:E})},U.r=function(S){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(S,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(S,"__esModule",{value:!0})},U.t=function(S,P){if(P&1&&(S=U(S)),P&8)return S;if(P&4&&typeof S=="object"&&S&&S.__esModule)return S;var E=Object.create(null);if(U.r(E),Object.defineProperty(E,"default",{enumerable:!0,value:S}),P&2&&typeof S!="string")for(var C in S)U.d(E,C,function(w){return S[w]}.bind(null,C));return E},U.n=function(S){var P=S&&S.__esModule?function(){return S.default}:function(){return S};return U.d(P,"a",P),P},U.o=function(S,P){return Object.prototype.hasOwnProperty.call(S,P)},U.p="/dist/",U(U.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(re,$,U){"use strict";var S=Object.prototype.hasOwnProperty,P="~";function E(){}Object.create&&(E.prototype=Object.create(null),new E().__proto__||(P=!1));function C(f,o,a){this.fn=f,this.context=o,this.once=a||!1}function w(f,o,a,c,s){if(typeof a!="function")throw new TypeError("The listener must be a function");var d=new C(a,c||f,s),i=P?P+o:o;return f._events[i]?f._events[i].fn?f._events[i]=[f._events[i],d]:f._events[i].push(d):(f._events[i]=d,f._eventsCount++),f}function u(f,o){--f._eventsCount===0?f._events=new E:delete f._events[o]}function p(){this._events=new E,this._eventsCount=0}p.prototype.eventNames=function(){var o=[],a,c;if(this._eventsCount===0)return o;for(c in a=this._events)S.call(a,c)&&o.push(P?c.slice(1):c);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(a)):o},p.prototype.listeners=function(o){var a=P?P+o:o,c=this._events[a];if(!c)return[];if(c.fn)return[c.fn];for(var s=0,d=c.length,i=new Array(d);s<d;s++)i[s]=c[s].fn;return i},p.prototype.listenerCount=function(o){var a=P?P+o:o,c=this._events[a];return c?c.fn?1:c.length:0},p.prototype.emit=function(o,a,c,s,d,i){var t=P?P+o:o;if(!this._events[t])return!1;var n=this._events[t],h=arguments.length,v,b;if(n.fn){n.once&&this.removeListener(o,n.fn,void 0,!0);switch(h){case 1:return n.fn.call(n.context),!0;case 2:return n.fn.call(n.context,a),!0;case 3:return n.fn.call(n.context,a,c),!0;case 4:return n.fn.call(n.context,a,c,s),!0;case 5:return n.fn.call(n.context,a,c,s,d),!0;case 6:return n.fn.call(n.context,a,c,s,d,i),!0}for(b=1,v=new Array(h-1);b<h;b++)v[b-1]=arguments[b];n.fn.apply(n.context,v)}else{var y=n.length,_;for(b=0;b<y;b++){n[b].once&&this.removeListener(o,n[b].fn,void 0,!0);switch(h){case 1:n[b].fn.call(n[b].context);break;case 2:n[b].fn.call(n[b].context,a);break;case 3:n[b].fn.call(n[b].context,a,c);break;case 4:n[b].fn.call(n[b].context,a,c,s);break;default:if(!v)for(_=1,v=new Array(h-1);_<h;_++)v[_-1]=arguments[_];n[b].fn.apply(n[b].context,v)}}}return!0},p.prototype.on=function(o,a,c){return w(this,o,a,c,!1)},p.prototype.once=function(o,a,c){return w(this,o,a,c,!0)},p.prototype.removeListener=function(o,a,c,s){var d=P?P+o:o;if(!this._events[d])return this;if(!a)return u(this,d),this;var i=this._events[d];if(i.fn)i.fn===a&&(!s||i.once)&&(!c||i.context===c)&&u(this,d);else{for(var t=0,n=[],h=i.length;t<h;t++)(i[t].fn!==a||s&&!i[t].once||c&&i[t].context!==c)&&n.push(i[t]);n.length?this._events[d]=n.length===1?n[0]:n:u(this,d)}return this},p.prototype.removeAllListeners=function(o){var a;return o?(a=P?P+o:o,this._events[a]&&u(this,a)):(this._events=new E,this._eventsCount=0),this},p.prototype.off=p.prototype.removeListener,p.prototype.addListener=p.prototype.on,p.prefixed=P,p.EventEmitter=p,re.exports=p},"./node_modules/url-toolkit/src/url-toolkit.js":function(re,$,U){(function(S){var P=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,E=/^([^\/?#]*)([^]*)$/,C=/(?:\/|^)\.(?=\/)/g,w=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,u={buildAbsoluteURL:function(p,f,o){if(o=o||{},p=p.trim(),f=f.trim(),!f){if(!o.alwaysNormalize)return p;var a=u.parseURL(p);if(!a)throw new Error("Error trying to parse base URL.");return a.path=u.normalizePath(a.path),u.buildURLFromParts(a)}var c=u.parseURL(f);if(!c)throw new Error("Error trying to parse relative URL.");if(c.scheme)return o.alwaysNormalize?(c.path=u.normalizePath(c.path),u.buildURLFromParts(c)):f;var s=u.parseURL(p);if(!s)throw new Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&s.path[0]!=="/"){var d=E.exec(s.path);s.netLoc=d[1],s.path=d[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 t=s.path,n=t.substring(0,t.lastIndexOf("/")+1)+c.path;i.path=u.normalizePath(n)}return i.path===null&&(i.path=o.alwaysNormalize?u.normalizePath(c.path):c.path),u.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(w,"")).length;);return p.split("").reverse().join("")},buildURLFromParts:function(p){return p.scheme+p.netLoc+p.path+p.params+p.query+p.fragment}};re.exports=u})(this)},"./node_modules/webworkify-webpack/index.js":function(re,$,U){function S(o){var a={};function c(d){if(a[d])return a[d].exports;var i=a[d]={i:d,l:!1,exports:{}};return o[d].call(i.exports,i,i.exports,c),i.l=!0,i.exports}c.m=o,c.c=a,c.i=function(d){return d},c.d=function(d,i,t){c.o(d,i)||Object.defineProperty(d,i,{configurable:!1,enumerable:!0,get:t})},c.r=function(d){Object.defineProperty(d,"__esModule",{value:!0})},c.n=function(d){var i=d&&d.__esModule?function(){return d.default}:function(){return d};return c.d(i,"a",i),i},c.o=function(d,i){return Object.prototype.hasOwnProperty.call(d,i)},c.p="/",c.oe=function(d){throw console.error(d),d};var s=c(c.s=ENTRY_MODULE);return s.default||s}var P="[\\.|\\-|\\+|\\w|/|@]+",E="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+P+").*?\\)";function C(o){return(o+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function w(o){return!isNaN(1*o)}function u(o,a,c){var s={};s[c]=[];var d=a.toString(),i=d.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!i)return s;for(var t=i[1],n=new RegExp("(\\\\n|\\W)"+C(t)+E,"g"),h;h=n.exec(d);){if(h[3]==="dll-reference")continue;s[c].push(h[3])}for(n=new RegExp("\\("+C(t)+'\\("(dll-reference\\s('+P+'))"\\)\\)'+E,"g");h=n.exec(d);)o[h[2]]||(s[c].push(h[1]),o[h[2]]=U(h[1]).m),s[h[2]]=s[h[2]]||[],s[h[2]].push(h[4]);for(var v=Object.keys(s),b=0;b<v.length;b++)for(var y=0;y<s[v[b]].length;y++)w(s[v[b]][y])&&(s[v[b]][y]=1*s[v[b]][y]);return s}function p(o){var a=Object.keys(o);return a.reduce(function(c,s){return c||o[s].length>0},!1)}function f(o,a){for(var c={main:[a]},s={main:[]},d={main:{}};p(c);)for(var i=Object.keys(c),t=0;t<i.length;t++){var n=i[t],h=c[n],v=h.pop();if(d[n]=d[n]||{},d[n][v]||!o[n][v])continue;d[n][v]=!0,s[n]=s[n]||[],s[n].push(v);for(var b=u(o,o[n][v],n),y=Object.keys(b),_=0;_<y.length;_++)c[y[_]]=c[y[_]]||[],c[y[_]]=c[y[_]].concat(b[y[_]])}return s}re.exports=function(o,a){a=a||{};var c={main:U.m},s=a.all?{main:Object.keys(c.main)}:f(c,o),d="";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__; })",d=d+"var "+v+" = ("+S.toString().replace("ENTRY_MODULE",JSON.stringify(b))+")({"+s[v].map(function(y){return""+JSON.stringify(y)+": "+c[v][y].toString()}).join(",")+`});
|
|
|
`}),d=d+"new (("+S.toString().replace("ENTRY_MODULE",JSON.stringify(o))+")({"+s.main.map(function(v){return""+JSON.stringify(v)+": "+c.main[v].toString()}).join(",")+"}))(self);";var i=new window.Blob([d],{type:"text/javascript"});if(a.bare)return i;var t=window.URL||window.webkitURL||window.mozURL||window.msURL,n=t.createObjectURL(i),h=new window.Worker(n);return h.objectURL=n,h}},"./src/config.ts":function(re,$,U){"use strict";U.r($),U.d($,"hlsDefaultConfig",function(){return _}),U.d($,"mergeConfig",function(){return g}),U.d($,"enableStreamingMode",function(){return x});var S=U("./src/controller/abr-controller.ts"),P=U("./src/controller/audio-stream-controller.ts"),E=U("./src/controller/audio-track-controller.ts"),C=U("./src/controller/subtitle-stream-controller.ts"),w=U("./src/controller/subtitle-track-controller.ts"),u=U("./src/controller/buffer-controller.ts"),p=U("./src/controller/timeline-controller.ts"),f=U("./src/controller/cap-level-controller.ts"),o=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"),d=U("./src/utils/fetch-loader.ts"),i=U("./src/utils/cues.ts"),t=U("./src/utils/mediakeys-helper.ts"),n=U("./src/utils/logger.ts");function h(){return h=Object.assign||function(l){for(var T=1;T<arguments.length;T++){var A=arguments[T];for(var O in A)Object.prototype.hasOwnProperty.call(A,O)&&(l[O]=A[O])}return l},h.apply(this,arguments)}function v(l,T){var A=Object.keys(l);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(l);T&&(O=O.filter(function(D){return Object.getOwnPropertyDescriptor(l,D).enumerable})),A.push.apply(A,O)}return A}function b(l){for(var T=1;T<arguments.length;T++){var A=arguments[T]!=null?arguments[T]:{};T%2?v(Object(A),!0).forEach(function(O){y(l,O,A[O])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(A)):v(Object(A)).forEach(function(O){Object.defineProperty(l,O,Object.getOwnPropertyDescriptor(A,O))})}return l}function y(l,T,A){return T in l?Object.defineProperty(l,T,{value:A,enumerable:!0,configurable:!0,writable:!0}):l[T]=A,l}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:S.default,bufferController:u.default,capLevelController:f.default,fpsController:o.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:t.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},m()),{},{subtitleStreamController:C.SubtitleStreamController,subtitleTrackController:w.default,timelineController:p.TimelineController,audioStreamController:P.default,audioTrackController:E.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(l,T){if((T.liveSyncDurationCount||T.liveMaxLatencyDurationCount)&&(T.liveSyncDuration||T.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(T.liveMaxLatencyDurationCount!==void 0&&(T.liveSyncDurationCount===void 0||T.liveMaxLatencyDurationCount<=T.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(T.liveMaxLatencyDuration!==void 0&&(T.liveSyncDuration===void 0||T.liveMaxLatencyDuration<=T.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return h({},l,T)}function x(l){var T=l.loader;if(T!==d.default&&T!==s.default)n.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),l.progressive=!1;else{var A=Object(d.fetchSupported)();A&&(l.loader=d.default,l.progressive=!0,l.enableSoftwareAES=!0,n.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(re,$,U){"use strict";U.r($);var S=U("./src/polyfills/number.ts"),P=U("./src/utils/ewma-bandwidth-estimator.ts"),E=U("./src/events.ts"),C=U("./src/utils/buffer-helper.ts"),w=U("./src/errors.ts"),u=U("./src/types/loader.ts"),p=U("./src/utils/logger.ts");function f(c,s){for(var d=0;d<s.length;d++){var i=s[d];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,i.key,i)}}function o(c,s,d){return s&&f(c.prototype,s),d&&f(c,d),c}var a=function(){function c(d){this.hls=void 0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=void 0,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=d;var i=d.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(E.Events.FRAG_LOADING,this.onFragLoading,this),i.on(E.Events.FRAG_LOADED,this.onFragLoaded,this),i.on(E.Events.FRAG_BUFFERED,this.onFragBuffered,this),i.on(E.Events.LEVEL_LOADED,this.onLevelLoaded,this),i.on(E.Events.ERROR,this.onError,this)},s.unregisterListeners=function(){var i=this.hls;i.off(E.Events.FRAG_LOADING,this.onFragLoading,this),i.off(E.Events.FRAG_LOADED,this.onFragLoaded,this),i.off(E.Events.FRAG_BUFFERED,this.onFragBuffered,this),i.off(E.Events.LEVEL_LOADED,this.onLevelLoaded,this),i.off(E.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,t){var n=t.frag;if(n.type===u.PlaylistLevelType.MAIN&&!this.timer){var h;this.fragCurrent=n,this.partCurrent=(h=t.part)!=null?h:null,this.timer=self.setInterval(this.onCheck,100)}},s.onLevelLoaded=function(i,t){var n=this.hls.config;t.details.live?this.bwEstimator.update(n.abrEwmaSlowLive,n.abrEwmaFastLive):this.bwEstimator.update(n.abrEwmaSlowVoD,n.abrEwmaFastVoD)},s._abandonRulesCheck=function(){var i=this.fragCurrent,t=this.partCurrent,n=this.hls,h=n.autoLevelEnabled,v=n.config,b=n.media;if(!i||!b)return;var y=t?t.stats:i.stats,_=t?t.duration:i.duration;if(y.aborted){p.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!h||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 x=n.levels,l=n.minAutoLevel,T=x[i.level],A=y.total||Math.max(y.loaded,Math.round(_*T.maxBitrate/8)),O=Math.max(1,y.bwEstimate?y.bwEstimate/8:y.loaded*1e3/m),D=(A-y.loaded)/O,I=b.currentTime,j=(C.BufferHelper.bufferInfo(b,I,v.maxBufferHole).end-I)/g;if(j>=2*_/g||D<=j)return;var B=Number.POSITIVE_INFINITY,ee;for(ee=i.level-1;ee>l;ee--){var F=x[ee].maxBitrate;if(B=_*F/(8*.8*O),B<j)break}if(B>=D)return;var G=this.bwEstimator.getEstimate();p.logger.warn("Fragment "+i.sn+(t?" part "+t.index:"")+" of level "+i.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+ee+`
|
|
|
Current BW estimate: `+(Object(S.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: `+B.toFixed(3)+` s
|
|
|
Time to underbuffer: `+j.toFixed(3)+" s"),n.nextLoadLevel=ee,this.bwEstimator.sample(m,y.loaded),this.clearTimer(),i.loader&&(this.fragCurrent=this.partCurrent=null,i.loader.abort()),n.trigger(E.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:i,part:t,stats:y})},s.onFragLoaded=function(i,t){var n=t.frag,h=t.part;if(n.type===u.PlaylistLevelType.MAIN&&Object(S.isFiniteNumber)(n.sn)){var v=h?h.stats:n.stats,b=h?h.duration:n.duration;if(this.clearTimer(),this.lastLoadedFragLevel=n.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var y=this.hls.levels[n.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(n.bitrateTest){var g={stats:v,frag:n,part:h,id:n.type};this.onFragBuffered(E.Events.FRAG_BUFFERED,g),n.bitrateTest=!1}}},s.onFragBuffered=function(i,t){var n=t.frag,h=t.part,v=h?h.stats:n.stats;if(v.aborted)return;if(n.type!==u.PlaylistLevelType.MAIN||n.sn==="initSegment")return;var b=v.parsing.end-v.loading.start;this.bwEstimator.sample(b,v.loaded),v.bwEstimate=this.bwEstimator.getEstimate(),n.bitrateTest?this.bitrateTestDelay=b/1e3:this.bitrateTestDelay=0},s.onError=function(i,t){switch(t.details){case w.ErrorDetails.FRAG_LOAD_ERROR:case w.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,t=this.partCurrent,n=this.hls,h=n.maxAutoLevel,v=n.config,b=n.minAutoLevel,y=n.media,_=t?t.duration:i?i.duration:0,m=y?y.currentTime:0,g=y&&y.playbackRate!==0?Math.abs(y.playbackRate):1,x=this.bwEstimator?this.bwEstimator.getEstimate():v.abrEwmaDefaultEstimate,l=(C.BufferHelper.bufferInfo(y,m,v.maxBufferHole).end-m)/g,T=this.findBestLevel(x,b,h,l,v.abrBandWidthFactor,v.abrBandWidthUpFactor);if(T>=0)return T;p.logger.trace((l?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var A=_?Math.min(_,v.maxStarvationDelay):v.maxStarvationDelay,O=v.abrBandWidthFactor,D=v.abrBandWidthUpFactor;if(!l){var I=this.bitrateTestDelay;if(I){var j=_?Math.min(_,v.maxLoadingDelay):v.maxLoadingDelay;A=j-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 T=this.findBestLevel(x,b,h,l+A,O,D),Math.max(T,0)},s.findBestLevel=function(i,t,n,h,v,b){for(var y,_=this.fragCurrent,m=this.partCurrent,g=this.lastLoadedFragLevel,x=this.hls.levels,l=x[g],T=!!(l!=null&&(y=l.details)!==null&&y!==void 0&&y.live),A=l==null?void 0:l.codecSet,O=m?m.duration:_?_.duration:0,D=n;D>=t;D--){var I=x[D];if(!I||A&&I.codecSet!==A)continue;var j=I.details,B=(m?j==null?void 0:j.partTarget:j==null?void 0:j.averagetargetduration)||O,ee=void 0;D<=g?ee=v*i:ee=b*i;var F=x[D].maxBitrate,G=F*B/ee;if(p.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+D+"/"+Math.round(ee)+"/"+F+"/"+B+"/"+h+"/"+G),ee>F&&(!G||T&&!this.bitrateTestDelay||G<h))return D}return-1},o(c,[{key:"nextAutoLevel",get:function(){var i=this._nextAutoLevel,t=this.bwEstimator;if(i!==-1&&(!t||!t.canEstimate()))return i;var n=this.getNextABRAutoLevel();return i!==-1&&(n=Math.min(i,n)),n},set:function(i){this._nextAutoLevel=i}}]),c}();$.default=a},"./src/controller/audio-stream-controller.ts":function(re,$,U){"use strict";U.r($);var S=U("./src/polyfills/number.ts"),P=U("./src/controller/base-stream-controller.ts"),E=U("./src/events.ts"),C=U("./src/utils/buffer-helper.ts"),w=U("./src/controller/fragment-tracker.ts"),u=U("./src/types/level.ts"),p=U("./src/types/loader.ts"),f=U("./src/loader/fragment.ts"),o=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"),d=U("./src/utils/discontinuities.ts"),i=U("./src/errors.ts"),t=U("./src/utils/logger.ts");function n(){return n=Object.assign||function(_){for(var m=1;m<arguments.length;m++){var g=arguments[m];for(var x in g)Object.prototype.hasOwnProperty.call(g,x)&&(_[x]=g[x])}return _},n.apply(this,arguments)}function h(_,m){_.prototype=Object.create(m.prototype),_.prototype.constructor=_,v(_,m)}function v(_,m){return v=Object.setPrototypeOf||function(x,l){return x.__proto__=l,x},v(_,m)}var b=100,y=function(_){h(m,_);function m(x,l){var T;return T=_.call(this,x,l,"[audio-stream-controller]")||this,T.videoBuffer=null,T.videoTrackCC=-1,T.waitingVideoCC=-1,T.audioSwitch=!1,T.trackId=-1,T.waitingData=null,T.mainDetails=null,T.bufferFlushed=!1,T._registerListeners(),T}var g=m.prototype;return g.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},g._registerListeners=function(){var l=this.hls;l.on(E.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.on(E.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.on(E.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.on(E.Events.LEVEL_LOADED,this.onLevelLoaded,this),l.on(E.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),l.on(E.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),l.on(E.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),l.on(E.Events.ERROR,this.onError,this),l.on(E.Events.BUFFER_RESET,this.onBufferReset,this),l.on(E.Events.BUFFER_CREATED,this.onBufferCreated,this),l.on(E.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),l.on(E.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),l.on(E.Events.FRAG_BUFFERED,this.onFragBuffered,this)},g._unregisterListeners=function(){var l=this.hls;l.off(E.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.off(E.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.off(E.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.off(E.Events.LEVEL_LOADED,this.onLevelLoaded,this),l.off(E.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),l.off(E.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),l.off(E.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),l.off(E.Events.ERROR,this.onError,this),l.off(E.Events.BUFFER_RESET,this.onBufferReset,this),l.off(E.Events.BUFFER_CREATED,this.onBufferCreated,this),l.off(E.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),l.off(E.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),l.off(E.Events.FRAG_BUFFERED,this.onFragBuffered,this)},g.onInitPtsFound=function(l,T){var A=T.frag,O=T.id,D=T.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(l){if(!this.levels){this.startPosition=l,this.state=P.State.STOPPED;return}var T=this.lastCurrentTime;this.stopLoad(),this.setInterval(b),this.fragLoadError=0,T>0&&l===-1?(this.log("Override startPosition with lastCurrentTime @"+T.toFixed(3)),this.state=P.State.IDLE):(this.loadedmetadata=!1,this.state=P.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=l,this.tick()},g.doTick=function(){switch(this.state){case P.State.IDLE:this.doTickIdle();break;case P.State.WAITING_TRACK:{var l,T=this.levels,A=this.trackId,O=T==null||((l=T[A])===null||l===void 0)?void 0:l.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(),j=this.retryDate;(!j||I>=j||(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 B=this.waitingData;if(B){var ee=B.frag,F=B.part,G=B.cache,X=B.complete;if(this.initPTS[ee.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=P.State.FRAG_LOADING;var Z=G.flush(),K={frag:ee,part:F,payload:Z,networkDetails:null};this._handleFragmentLoadProgress(K),X&&_.prototype._handleFragmentLoadComplete.call(this,K)}else if(this.videoTrackCC!==this.waitingVideoCC)t.logger.log("Waiting fragment cc ("+ee.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var q=this.getLoadPosition(),ae=C.BufferHelper.bufferInfo(this.mediaBuffer,q,this.config.maxBufferHole),oe=Object(s.fragmentWithinToleranceTest)(ae.end,this.config.maxFragLookUpTolerance,ee);oe<0&&(t.logger.log("Waiting fragment cc ("+ee.cc+") @ "+ee.start+" cancelled because another fragment at "+ae.end+" is needed"),this.clearWaitingFragment())}}else this.state=P.State.IDLE}}this.onTickEnd()},g.clearWaitingFragment=function(){var l=this.waitingData;l&&(this.fragmentTracker.removeFragment(l.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=P.State.IDLE)},g.onTickEnd=function(){var l=this.media;if(!l||!l.readyState)return;var T=this.mediaBuffer?this.mediaBuffer:l,A=T.buffered;!this.loadedmetadata&&A.length&&(this.loadedmetadata=!0),this.lastCurrentTime=l.currentTime},g.doTickIdle=function(){var l,T,A=this.hls,O=this.levels,D=this.media,I=this.trackId,j=A.config;if(!O||!O[I])return;if(!D&&(this.startFragRequested||!j.startFragPrefetch))return;var B=O[I],ee=B.details;if(!ee||ee.live&&this.levelLastLoaded!==I||this.waitForCdnTuneIn(ee)){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 F=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,p.PlaylistLevelType.AUDIO);if(F===null)return;var G=F.len,X=this.getMaxBufferLength(),Z=this.audioSwitch;if(G>=X&&!Z)return;if(!Z&&this._streamEnded(F,ee)){A.trigger(E.Events.BUFFER_EOS,{type:"audio"}),this.state=P.State.ENDED;return}var K=ee.fragments,q=K[0].start,ae=F.end;if(Z){var oe=this.getLoadPosition();ae=oe,ee.PTSKnown&&oe<q&&((F.end>q||F.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),D.currentTime=q+.05))}var ve=this.getNextFragment(ae,ee);if(!ve){this.bufferFlushed=!0;return}((l=ve.decryptdata)===null||l===void 0?void 0:l.keyFormat)==="identity"&&!((T=ve.decryptdata)!==null&&T!==void 0&&T.key)?this.loadKey(ve,ee):this.loadFragment(ve,ee,ae)},g.getMaxBufferLength=function(){var l=_.prototype.getMaxBufferLength.call(this),T=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,p.PlaylistLevelType.MAIN);return T===null?l:Math.max(l,T.len)},g.onMediaDetaching=function(){this.videoBuffer=null,_.prototype.onMediaDetaching.call(this)},g.onAudioTracksUpdated=function(l,T){var A=T.audioTracks;this.resetTransmuxer(),this.levels=A.map(function(O){return new u.Level(O)})},g.onAudioTrackSwitching=function(l,T){var A=!!T.url;this.trackId=T.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(l,T){this.mainDetails=T.details},g.onAudioTrackLoaded=function(l,T){var A,O=this.levels,D=T.details,I=T.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 j=O[I],B=0;if(D.live||(A=j.details)!==null&&A!==void 0&&A.live){var ee=this.mainDetails;if(D.fragments[0]||(D.deltaUpdateFailed=!0),D.deltaUpdateFailed||!ee)return;!j.details&&D.hasProgramDateTime&&ee.hasProgramDateTime?(Object(d.alignMediaPlaylistByPDT)(D,ee),B=D.fragments[0].start):B=this.alignPlaylists(D,j.details)}j.details=D,this.levelLastLoaded=I,!this.startFragRequested&&(this.mainDetails||!D.live)&&this.setStartPosition(j.details,B),this.state===P.State.WAITING_TRACK&&!this.waitForCdnTuneIn(D)&&(this.state=P.State.IDLE),this.tick()},g._handleFragmentLoadProgress=function(l){var T,A=l.frag,O=l.part,D=l.payload,I=this.config,j=this.trackId,B=this.levels;if(!B){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 ee=B[j];console.assert(ee,"Audio track is defined on fragment load progress");var F=ee.details;console.assert(F,"Audio track details are defined on fragment load progress");var G=I.defaultAudioCodec||ee.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=(T=A.initSegment)===null||T===void 0?void 0:T.data;if(Z!==void 0){var q=!1,ae=O?O.index:-1,oe=ae!==-1,ve=new c.ChunkMetadata(A.level,A.sn,A.stats.chunkCount,D.byteLength,ae,oe);X.push(D,K,G,"",A,O,F.totalduration,q,ve,Z)}else{t.logger.log("Unknown video PTS for cc "+A.cc+", waiting for video PTS before demuxing audio frag "+A.sn+" of ["+F.startSN+" ,"+F.endSN+"],track "+j);var he=this.waitingData=this.waitingData||{frag:A,part:O,cache:new o.default,complete:!1},_e=he.cache;_e.push(new Uint8Array(D)),this.waitingVideoCC=this.videoTrackCC,this.state=P.State.WAITING_INIT_PTS}},g._handleFragmentLoadComplete=function(l){if(this.waitingData){this.waitingData.complete=!0;return}_.prototype._handleFragmentLoadComplete.call(this,l)},g.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},g.onBufferCreated=function(l,T){var A=T.tracks.audio;A&&(this.mediaBuffer=A.buffer),T.tracks.video&&(this.videoBuffer=T.tracks.video.buffer)},g.onFragBuffered=function(l,T){var A=T.frag,O=T.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(E.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(A,O)},g.onError=function(l,T){switch(T.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,T);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=T.fatal?P.State.ERROR:P.State.IDLE,this.warn(T.details+" while loading frag, switching to "+this.state+" state"));break;case i.ErrorDetails.BUFFER_FULL_ERROR:if(T.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(l,T){var A=T.type;A===f.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},g._handleTransmuxComplete=function(l){var T,A="audio",O=this.hls,D=l.remuxResult,I=l.chunkMeta,j=this.getCurrentContext(I);if(!j){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 B=j.frag,ee=j.part,F=D.audio,G=D.text,X=D.id3,Z=D.initSegment;if(this.fragContextChanged(B))return;if(this.state=P.State.PARSING,this.audioSwitch&&F&&this.completeAudioSwitch(),Z!=null&&Z.tracks&&(this._bufferInitSegment(Z.tracks,B,I),O.trigger(E.Events.FRAG_PARSING_INIT_SEGMENT,{frag:B,id:A,tracks:Z.tracks})),F){var K=F.startPTS,q=F.endPTS,ae=F.startDTS,oe=F.endDTS;ee&&(ee.elementaryStreams[f.ElementaryStreamTypes.AUDIO]={startPTS:K,endPTS:q,startDTS:ae,endDTS:oe}),B.setElementaryStreamInfo(f.ElementaryStreamTypes.AUDIO,K,q,ae,oe),this.bufferFragmentData(F,B,ee,I)}if(X!=null&&(T=X.samples)!==null&&T!==void 0&&T.length){var ve=n({frag:B,id:A},X);O.trigger(E.Events.FRAG_PARSING_METADATA,ve)}if(G){var he=n({frag:B,id:A},G);O.trigger(E.Events.FRAG_PARSING_USERDATA,he)}},g._bufferInitSegment=function(l,T,A){if(this.state!==P.State.PARSING)return;l.video&&delete l.video;var O=l.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(E.Events.BUFFER_CODECS,l);var D=O.initSegment;if(D!=null&&D.byteLength){var I={type:"audio",frag:T,part:null,chunkMeta:A,parent:T.type,data:D};this.hls.trigger(E.Events.BUFFER_APPENDING,I)}this.tick()},g.loadFragment=function(l,T,A){var O=this.fragmentTracker.getState(l);this.fragCurrent=l,(this.audioSwitch||O===w.FragmentState.NOT_LOADED||O===w.FragmentState.PARTIAL)&&(l.sn==="initSegment"?this._loadInitSegment(l):T.live&&!Object(S.isFiniteNumber)(this.initPTS[l.cc])?(this.log("Waiting for video PTS in continuity counter "+l.cc+" of live stream before loading audio fragment "+l.sn+" of level "+this.trackId),this.state=P.State.WAITING_INIT_PTS):(this.startFragRequested=!0,_.prototype.loadFragment.call(this,l,T,A)))},g.completeAudioSwitch=function(){var l=this.hls,T=this.media,A=this.trackId;T&&(this.log("Switching audio track : flushing all audio"),_.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,l.trigger(E.Events.AUDIO_TRACK_SWITCHED,{id:A})},m}(P.default);$.default=y},"./src/controller/audio-track-controller.ts":function(re,$,U){"use strict";U.r($);var S=U("./src/events.ts"),P=U("./src/errors.ts"),E=U("./src/controller/base-playlist-controller.ts"),C=U("./src/types/loader.ts");function w(a,c){for(var s=0;s<c.length;s++){var d=c[s];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}function u(a,c,s){return c&&w(a.prototype,c),s&&w(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(d,i){return d.__proto__=i,d},f(a,c)}var o=function(a){p(c,a);function c(d){var i;return i=a.call(this,d,"[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(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.on(S.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.on(S.Events.LEVEL_LOADING,this.onLevelLoading,this),i.on(S.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),i.on(S.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),i.on(S.Events.ERROR,this.onError,this)},s.unregisterListeners=function(){var i=this.hls;i.off(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.off(S.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.off(S.Events.LEVEL_LOADING,this.onLevelLoading,this),i.off(S.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),i.off(S.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),i.off(S.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,t){this.tracks=t.audioTracks||[]},s.onAudioTrackLoaded=function(i,t){var n=t.id,h=t.details,v=this.tracksInGroup[n];if(!v){this.warn("Invalid audio track id "+n);return}var b=v.details;v.details=t.details,this.log("audioTrack "+n+" loaded ["+h.startSN+"-"+h.endSN+"]"),n===this.trackId&&(this.retryCount=0,this.playlistLoaded(n,t,b))},s.onLevelLoading=function(i,t){this.switchLevel(t.level)},s.onLevelSwitching=function(i,t){this.switchLevel(t.level)},s.switchLevel=function(i){var t=this.hls.levels[i];if(!(t!=null&&t.audioGroupIds))return;var n=t.audioGroupIds[t.urlId];if(this.groupId!==n){this.groupId=n;var h=this.tracks.filter(function(b){return!n||b.groupId===n});this.selectDefaultTrack&&!h.some(function(b){return b.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=h;var v={audioTracks:h};this.log("Updating audio tracks, "+h.length+' track(s) found in "'+n+'" group-id'),this.hls.trigger(S.Events.AUDIO_TRACKS_UPDATED,v),this.selectInitialTrack()}},s.onError=function(i,t){if(a.prototype.onError.call(this,i,t),t.fatal||!t.context)return;t.context.type===C.PlaylistContextType.AUDIO_TRACK&&t.context.id===this.trackId&&t.context.groupId===this.groupId&&this.retryLoadingOrFail(t)},s.setAudioTrack=function(i){var t=this.tracksInGroup;if(i<0||i>=t.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var n=t[this.trackId];this.log("Now switching to audio-track index "+i);var h=t[i],v=h.id,b=h.groupId,y=b===void 0?"":b,_=h.name,m=h.type,g=h.url;if(this.trackId=i,this.trackName=_,this.selectDefaultTrack=!1,this.hls.trigger(S.Events.AUDIO_TRACK_SWITCHING,{id:v,groupId:y,name:_,type:m,url:g}),h.details&&!h.details.live)return;var x=this.switchParams(h.url,n==null?void 0:n.details);this.loadPlaylist(x)},s.selectInitialTrack=function(){var i=this.tracksInGroup;console.assert(i.length,"Initial audio track should be selected when tracks are known");var t=this.trackName,n=this.findTrackId(t)||this.findTrackId();n!==-1?this.setAudioTrack(n):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(S.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},s.findTrackId=function(i){for(var t=this.tracksInGroup,n=0;n<t.length;n++){var h=t[n];if((!this.selectDefaultTrack||h.default)&&(!i||i===h.name))return h.id}return-1},s.loadPlaylist=function(i){var t=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(t)){var n=t.id,h=t.groupId,v=t.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: "+n),this.clearTimer(),this.hls.trigger(S.Events.AUDIO_TRACK_LOADING,{url:v,id:n,groupId:h,deliveryDirectives:i||null})}},u(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}(E.default);$.default=o},"./src/controller/base-playlist-controller.ts":function(re,$,U){"use strict";U.r($),U.d($,"default",function(){return u});var S=U("./src/polyfills/number.ts"),P=U("./src/types/level.ts"),E=U("./src/controller/level-helper.ts"),C=U("./src/utils/logger.ts"),w=U("./src/errors.ts"),u=function(){function p(o,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=o}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===w.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 d=0;d<s.length;d++){var i=s[d],t=""+i.URI;if(t===a.substr(-t.length)){var n=parseInt(i["LAST-MSN"]),h=parseInt(i["LAST-PART"]);if(c&&this.hls.config.lowLatencyMode){var v=Math.min(c.age-c.partTarget,c.targetduration);h!==void 0&&v>c.partTarget&&(h+=1)}if(Object(S.isFiniteNumber)(n))return new P.HlsUrlParameters(n,Object(S.isFiniteNumber)(h)?h: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 d=this,i=c.details,t=c.stats,n=t.loading.end?Math.max(0,self.performance.now()-t.loading.end):0;if(i.advancedDateTime=Date.now()-n,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(E.mergeDetails)(s,i),!this.canLoad||!i.live)return;var h,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,x=g!==-1,l=_===m,T=y?0:g;x?(v=l?m+1:_,b=l?T: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 j=Math.round(D%i.targetduration/i.partTarget);b+=j}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(h=this.getDeliveryDirectives(i,c.deliveryDirectives,v,b),y||!l){this.loadPlaylist(h);return}}else h=this.getDeliveryDirectives(i,c.deliveryDirectives,v,b);var B=Object(E.computeReloadInterval)(i,t);v!==void 0&&i.canBlockReload&&(B-=i.partTarget||1),this.log("reload live playlist "+a+" in "+Math.round(B)+" ms"),this.timer=self.setTimeout(function(){return d.loadPlaylist(h)},B)}else this.clearTimer()},f.getDeliveryDirectives=function(a,c,s,d){var i=Object(P.getSkipValue)(a,s);return c!=null&&c.skip&&a.deltaUpdateFailed&&(s=c.msn,d=c.part,i=P.HlsSkip.No),new P.HlsUrlParameters(s,d,i)},f.retryLoadingOrFail=function(a){var c=this,s=this.hls.config,d=this.retryCount<s.levelLoadingMaxRetry;if(d){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 t=Math.min(Math.pow(2,this.retryCount)*s.levelLoadingRetryDelay,s.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return c.loadPlaylist()},t),this.warn("retry playlist loading #"+this.retryCount+" in "+t+' ms after "'+a.details+'"')}}else this.warn('cannot recover from error "'+a.details+'"'),this.clearTimer(),a.fatal=!0;return d},p}()},"./src/controller/base-stream-controller.ts":function(re,$,U){"use strict";U.r($),U.d($,"State",function(){return m}),U.d($,"default",function(){return g});var S=U("./src/polyfills/number.ts"),P=U("./src/task-loop.ts"),E=U("./src/controller/fragment-tracker.ts"),C=U("./src/utils/buffer-helper.ts"),w=U("./src/utils/logger.ts"),u=U("./src/events.ts"),p=U("./src/errors.ts"),f=U("./src/types/transmuxer.ts"),o=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"),d=U("./src/loader/fragment-loader.ts"),i=U("./src/crypt/decrypter.ts"),t=U("./src/utils/time-ranges.ts"),n=U("./src/types/loader.ts");function h(x,l){for(var T=0;T<l.length;T++){var A=l[T];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(x,A.key,A)}}function v(x,l,T){return l&&h(x.prototype,l),T&&h(x,T),x}function b(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}function y(x,l){x.prototype=Object.create(l.prototype),x.prototype.constructor=x,_(x,l)}function _(x,l){return _=Object.setPrototypeOf||function(A,O){return A.__proto__=O,A},_(x,l)}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(x){y(l,x);function l(A,O,D){var I;return I=x.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=w.logger.log.bind(w.logger,D+":"),I.warn=w.logger.warn.bind(w.logger,D+":"),I.hls=A,I.fragmentLoader=new d.default(A.config),I.fragmentTracker=O,I.config=A.config,I.decrypter=new i.default(A,A.config),A.on(u.Events.KEY_LOADED,I.onKeyLoaded,b(I)),I}var T=l.prototype;return T.doTick=function(){this.onTickEnd()},T.onTickEnd=function(){},T.startLoad=function(O){},T.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},T._streamEnded=function(O,D){var I=this.fragCurrent,j=this.fragmentTracker;if(!D.live&&I&&I.sn===D.endSN&&!O.nextStart){var B=j.getState(I);return B===E.FragmentState.PARTIAL||B===E.FragmentState.OK}return!1},T.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 j=this.config;this.levels&&j.autoStartLoad&&this.state===m.STOPPED&&this.startLoad(j.startPosition)},T.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()},T.onMediaSeeking=function(){var O=this.config,D=this.fragCurrent,I=this.media,j=this.mediaBuffer,B=this.state,ee=I?I.currentTime:0,F=C.BufferHelper.bufferInfo(j||I,ee,O.maxBufferHole);if(this.log("media seeking to "+(Object(S.isFiniteNumber)(ee)?ee.toFixed(3):ee)+", state: "+B),B===m.ENDED)this.resetLoadingState();else if(D&&!F.len){var G=O.maxFragLookUpTolerance,X=D.start-G,Z=D.start+D.duration+G,K=ee>Z;(ee<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=ee),!this.loadedmetadata&&!F.len&&(this.nextLoadPosition=this.startPosition=ee),this.tickImmediate()},T.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},T.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)},T.onHandlerDestroying=function(){this.stopLoad(),x.prototype.onHandlerDestroying.call(this)},T.onHandlerDestroyed=function(){this.state=m.STOPPED,this.hls.off(u.Events.KEY_LOADED,this.onKeyLoaded,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,x.prototype.onHandlerDestroyed.call(this)},T.loadKey=function(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(u.Events.KEY_LOADING,{frag:O})},T.loadFragment=function(O,D,I){this._loadFragForPlayback(O,D,I)},T._loadFragForPlayback=function(O,D,I){var j=this,B=function(F){if(j.fragContextChanged(O)){j.warn("Fragment "+O.sn+(F.part?" p: "+F.part.index:"")+" of level "+O.level+" was dropped during download."),j.fragmentTracker.removeFragment(O);return}O.stats.chunkCount++,j._handleFragmentLoadProgress(F)};this._doFragLoad(O,D,I,B).then(function(ee){if(!ee)return;j.fragLoadError=0;var F=j.state;if(j.fragContextChanged(O)){(F===m.FRAG_LOADING||F===m.BACKTRACKING||!j.fragCurrent&&F===m.PARSING)&&(j.fragmentTracker.removeFragment(O),j.state=m.IDLE);return}if("payload"in ee&&(j.log("Loaded fragment "+O.sn+" of level "+O.level),j.hls.trigger(u.Events.FRAG_LOADED,ee),j.state===m.BACKTRACKING)){j.fragmentTracker.backtrack(O,ee),j.resetFragmentLoading(O);return}j._handleFragmentLoadComplete(ee)}).catch(function(ee){j.warn(ee),j.resetFragmentLoading(O)})},T.flushMainBuffer=function(O,D,I){if(I===void 0&&(I=null),!(O-D))return;var j={startOffset:O,endOffset:D,type:I};this.fragLoadError=0,this.hls.trigger(u.Events.BUFFER_FLUSHING,j)},T._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 j=D.hls,B=I.payload,ee=O.decryptdata;if(B&&B.byteLength>0&&ee&&ee.key&&ee.iv&&ee.method==="AES-128"){var F=self.performance.now();return D.decrypter.webCryptoDecrypt(new Uint8Array(B),ee.key.buffer,ee.iv.buffer).then(function(G){var X=self.performance.now();return j.trigger(u.Events.FRAG_DECRYPTED,{frag:O,payload:G,stats:{tstart:F,tdecrypt:X}}),I.payload=G,I})}return I}).then(function(I){var j=D.fragCurrent,B=D.hls,ee=D.levels;if(!ee)throw new Error("init load aborted, missing levels");var F=ee[O.level].details;console.assert(F,"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===j&&B.trigger(u.Events.FRAG_BUFFERED,{stats:G,frag:j,part:null,id:O.type}),D.tick()}).catch(function(I){D.warn(I),D.resetFragmentLoading(O)})},T.fragContextChanged=function(O){var D=this.fragCurrent;return!O||!D||O.level!==D.level||O.sn!==D.sn||O.urlId!==D.urlId},T.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+" "+t.default.toString(C.BufferHelper.getBuffered(I))),this.state=m.IDLE,this.tick()},T._handleFragmentLoadComplete=function(O){var D=this.transmuxer;if(!D)return;var I=O.frag,j=O.part,B=O.partsLoaded,ee=!B||B.length===0||B.some(function(G){return!G}),F=new f.ChunkMetadata(I.level,I.sn,I.stats.chunkCount+1,0,j?j.index:-1,!ee);D.flush(F)},T._handleFragmentLoadProgress=function(O){},T._doFragLoad=function(O,D,I,j){var B=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 ee=D.partList;if(ee&&j){I>O.end&&D.fragmentHint&&(O=D.fragmentHint);var F=this.getNextPart(ee,O,I);if(F>-1){var G=ee[F];return this.log("Loading part sn: "+O.sn+" p: "+G.index+" cc: "+O.cc+" of playlist ["+D.startSN+"-"+D.endSN+"] parts [0-"+F+"-"+(ee.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(u.Events.FRAG_LOADING,{frag:O,part:ee[F],targetBufferTime:I}),this.doFragPartsLoad(O,ee,F,j).catch(function(X){return B.handleFragLoadError(X)})}else if(!O.url||this.loadedEndOfParts(ee,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(S.isFiniteNumber)(O.sn)&&!this.bitrateTest&&(this.nextLoadPosition=O.start+O.duration),this.state=m.FRAG_LOADING,this.hls.trigger(u.Events.FRAG_LOADING,{frag:O,targetBufferTime:I}),this.fragmentLoader.load(O,j).catch(function(X){return B.handleFragLoadError(X)})},T.doFragPartsLoad=function(O,D,I,j){var B=this;return new Promise(function(ee,F){var G=[],X=function Z(K){var q=D[K];B.fragmentLoader.loadPart(O,q,j).then(function(ae){G[q.index]=ae;var oe=ae.part;B.hls.trigger(u.Events.FRAG_LOADED,ae);var ve=D[K+1];if(ve&&ve.fragment===O)Z(K+1);else return ee({frag:O,part:oe,partsLoaded:G})}).catch(F)};X(I)})},T.handleFragLoadError=function(O){var D=O.data;return D&&D.details===p.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(D.frag,D.part):this.hls.trigger(u.Events.ERROR,D),null},T._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,j=D.part,B=D.level,ee=self.performance.now();I.stats.parsing.end=ee,j&&(j.stats.parsing.end=ee),this.updateLevelTiming(I,j,B,O.partial)},T.getCurrentContext=function(O){var D=this.levels,I=O.level,j=O.sn,B=O.part;if(!D||!D[I])return this.warn("Levels object was unset while buffering fragment "+j+" of level "+I+". The current chunk will not be buffered."),null;var ee=D[I],F=B>-1?Object(s.getPartWith)(ee,j,B):null,G=F?F.fragment:Object(s.getFragmentWithSN)(ee,j,this.fragCurrent);return G?{frag:G,part:F,level:ee}:null},T.bufferFragmentData=function(O,D,I,j){if(!O||this.state!==m.PARSING)return;var B=O.data1,ee=O.data2,F=B;if(B&&ee&&(F=Object(o.appendUint8Array)(B,ee)),!F||!F.length)return;var G={type:O.type,frag:D,part:I,chunkMeta:j,parent:D.type,data:F};this.hls.trigger(u.Events.BUFFER_APPENDING,G),O.dropped&&O.independent&&!I&&this.flushBufferGap(D)},T.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,j=C.BufferHelper.bufferInfo(D,I,0),B=O.duration,ee=Math.min(this.config.maxFragLookUpTolerance*2,B*.25),F=Math.max(Math.min(O.start-ee,j.end-ee),I+ee);O.start-F>ee&&this.flushMainBuffer(F,O.start)},T.getFwdBufferInfo=function(O,D){var I=this.config,j=this.getLoadPosition();if(!Object(S.isFiniteNumber)(j))return null;var B=C.BufferHelper.bufferInfo(O,j,I.maxBufferHole);if(B.len===0&&B.nextStart!==void 0){var ee=this.fragmentTracker.getBufferedFrag(j,D);if(ee&&B.nextStart<ee.end)return C.BufferHelper.bufferInfo(O,j,Math.max(B.nextStart,I.maxBufferHole))}return B},T.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)},T.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},T.getNextFragment=function(O,D){var I,j,B=D.fragments,ee=B.length;if(!ee)return null;var F=this.config,G=B[0].start,X;if(D.live){var Z=F.initialLiveManifestSize;if(ee<Z)return this.warn("Not enough fragments to start playback (have: "+ee+", need: "+Z+")"),null;!D.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(X=this.getInitialLiveFragment(D,B),this.startPosition=X?this.hls.liveSyncPosition||X.start:O)}else O<=G&&(X=B[0]);if(!X){var K=F.lowLatencyMode?D.partEnd:D.fragmentEnd;X=this.getFragmentAtPosition(O,K,D)}return(I=X)!==null&&I!==void 0&&I.initSegment&&!((j=X)!==null&&j!==void 0&&j.initSegment.data)&&!this.bitrateTest&&(X=X.initSegment),X},T.getNextPart=function(O,D,I){for(var j=-1,B=!1,ee=!0,F=0,G=O.length;F<G;F++){var X=O[F];if(ee=ee&&!X.independent,j>-1&&I<X.start)break;var Z=X.loaded;!Z&&(B||X.independent||ee)&&X.fragment===D&&(j=F),B=Z}return j},T.loadedEndOfParts=function(O,D){var I=O[O.length-1];return I&&D>I.start&&I.loaded},T.getInitialLiveFragment=function(O,D){var I=this.fragPrevious,j=null;if(I){if(O.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+I.programDateTime),j=Object(c.findFragmentByPDT)(D,I.endProgramDateTime,this.config.maxFragLookUpTolerance)),!j){var B=I.sn+1;if(B>=O.startSN&&B<=O.endSN){var ee=D[B-O.startSN];I.cc===ee.cc&&(j=ee,this.log("Live playlist, switching playlist, load frag with next SN: "+j.sn))}j||(j=Object(c.findFragWithCC)(D,I.cc),j&&this.log("Live playlist, switching playlist, load frag with same CC: "+j.sn))}}else{var F=this.hls.liveSyncPosition;F!==null&&(j=this.getFragmentAtPosition(F,this.bitrateTest?O.fragmentEnd:O.edge,O))}return j},T.getFragmentAtPosition=function(O,D,I){var j=this.config,B=this.fragPrevious,ee=I.fragments,F=I.endSN,G=I.fragmentHint,X=j.maxFragLookUpTolerance,Z=!!(j.lowLatencyMode&&I.partList&&G);Z&&G&&!this.bitrateTest&&(ee=ee.concat(G),F=G.sn);var K;if(O<D){var q=O>D-X?0:X;K=Object(c.findFragmentByPTS)(B,ee,O,q)}else K=ee[ee.length-1];if(K){var ae=K.sn-I.startSN,oe=B&&K.level===B.level,ve=ee[ae+1],he=this.fragmentTracker.getState(K);if(he===E.FragmentState.BACKTRACKED){K=null;for(var _e=ae;ee[_e]&&this.fragmentTracker.getState(ee[_e])===E.FragmentState.BACKTRACKED;)B?K=ee[_e--]:K=ee[--_e];K||(K=ve)}else B&&K.sn===B.sn&&!Z&&(oe&&(K.sn<F&&this.fragmentTracker.getState(ve)!==E.FragmentState.OK?(this.log("SN "+K.sn+" just loaded, load next one: "+ve.sn),K=ve):K=null))}return K},T.synchronizeToLiveEdge=function(O){var D=this.config,I=this.media;if(!I)return;var j=this.hls.liveSyncPosition,B=I.currentTime,ee=O.fragments[0].start,F=O.edge,G=B>=ee-D.maxFragLookUpTolerance&&B<=F;if(j!==null&&I.duration>j&&(B<j||!G)){var X=D.liveMaxLatencyDuration!==void 0?D.liveMaxLatencyDuration:D.liveMaxLatencyDurationCount*O.targetduration;(!G&&I.readyState<4||B<F-X)&&(this.loadedmetadata||(this.nextLoadPosition=j),I.readyState&&(this.warn("Playback: "+B.toFixed(3)+" is located too far from the end of live sliding playlist: "+F+", reset currentTime to : "+j.toFixed(3)),I.currentTime=j))}},T.alignPlaylists=function(O,D){var I=this.levels,j=this.levelLastLoaded,B=this.fragPrevious,ee=j!==null?I[j]:null,F=O.fragments.length;if(!F)return this.warn("No fragments in live playlist"),0;var G=O.fragments[0].start,X=!D,Z=O.alignedSliding&&Object(S.isFiniteNumber)(G);if(X||!Z&&!G){Object(a.alignStream)(B,ee,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: "+(B?B.sn:"na")+" fragments: "+F),K}return G},T.waitForCdnTuneIn=function(O){var D=3;return O.live&&O.canBlockReload&&O.tuneInGoal>Math.max(O.partHoldBack,O.partTarget*D)},T.setStartPosition=function(O,D){var I=this.startPosition;if(I<D&&(I=-1),I===-1||this.lastCurrentTime===-1){var j=O.startTimeOffset;Object(S.isFiniteNumber)(j)?(I=D+j,j<0&&(I+=O.totalduration),I=Math.min(Math.max(D,I),D+O.totalduration),this.log("Start time offset "+j+" 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},T.getLoadPosition=function(){var O=this.media,D=0;return this.loadedmetadata&&O?D=O.currentTime:this.nextLoadPosition&&(D=this.nextLoadPosition),D},T.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))},T.resetFragmentLoading=function(O){(!this.fragCurrent||!this.fragContextChanged(O))&&(this.state=m.IDLE)},T.onFragmentOrKeyLoadError=function(O,D){if(D.fatal)return;var I=D.frag;if(!I||I.type!==O)return;var j=this.fragCurrent;console.assert(j&&I.sn===j.sn&&I.level===j.level&&I.urlId===j.urlId,"Frag load error must match current frag to retry");var B=this.config;if(this.fragLoadError+1<=B.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(I.level))return;var ee=Math.min(Math.pow(2,this.fragLoadError)*B.fragLoadingRetryDelay,B.fragLoadingMaxRetryTimeout);this.warn("Fragment "+I.sn+" of "+O+" "+I.level+" failed to load, retrying in "+ee+"ms"),this.retryDate=self.performance.now()+ee,this.fragLoadError++,this.state=m.FRAG_LOADING_WAITING_RETRY}else D.levelRetry?(O===n.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=m.IDLE):(w.logger.error(D.details+" reaches max retry, redispatch as fatal ..."),D.fatal=!0,this.hls.stopLoad(),this.state=m.ERROR)},T.afterBufferFlushed=function(O,D,I){if(!O)return;var j=C.BufferHelper.getBuffered(O);this.fragmentTracker.detectEvictedFragments(D,j,I),this.state===m.ENDED&&this.resetLoadingState()},T.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=m.IDLE},T.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},T.updateLevelTiming=function(O,D,I,j){var B=this,ee=I.details;console.assert(!!ee,"level.details must be defined");var F=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 B.warn("Could not parse fragment "+O.sn+" "+X+" duration reliably ("+K+") resetting transmuxer to fallback to playlist timing"),B.resetTransmuxer(),G||!1;var q=j?0:Object(s.updateFragPTSDTS)(ee,O,Z.startPTS,Z.endPTS,Z.startDTS,Z.endDTS);return B.hls.trigger(u.Events.LEVEL_PTS_UPDATED,{details:ee,level:I,drift:q,type:X,frag:O,start:Z.startPTS,end:Z.endPTS}),!0}return G},!1);F?(this.state=m.PARSED,this.hls.trigger(u.Events.FRAG_PARSED,{frag:O,part:D})):this.resetLoadingState()},T.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},v(l,[{key:"state",get:function(){return this._state},set:function(O){var D=this._state;D!==O&&(this._state=O,this.log(D+"->"+O))}}]),l}(P.default)},"./src/controller/buffer-controller.ts":function(re,$,U){"use strict";U.r($),U.d($,"default",function(){return c});var S=U("./src/polyfills/number.ts"),P=U("./src/events.ts"),E=U("./src/utils/logger.ts"),C=U("./src/errors.ts"),w=U("./src/utils/buffer-helper.ts"),u=U("./src/utils/mediasource-helper.ts"),p=U("./src/loader/fragment.ts"),f=U("./src/controller/buffer-operation-queue.ts"),o=Object(u.getMediaSource)(),a=/([ha]vc.)(?:\.[^.,]+)+/,c=function(){function s(i){var t=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 n=t.hls,h=t.media,v=t.mediaSource;E.logger.log("[buffer-controller]: Media source opened"),h&&(t.updateMediaElementDuration(),n.trigger(P.Events.MEDIA_ATTACHED,{media:h})),v&&v.removeEventListener("sourceopen",t._onMediaSourceOpen),t.checkPendingTracks()},this._onMediaSourceClose=function(){E.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){E.logger.log("[buffer-controller]: Media source ended")},this.hls=i,this._initSourceBuffer(),this.registerListeners()}var d=s.prototype;return d.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},d.destroy=function(){this.unregisterListeners(),this.details=null},d.registerListeners=function(){var t=this.hls;t.on(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.on(P.Events.BUFFER_RESET,this.onBufferReset,this),t.on(P.Events.BUFFER_APPENDING,this.onBufferAppending,this),t.on(P.Events.BUFFER_CODECS,this.onBufferCodecs,this),t.on(P.Events.BUFFER_EOS,this.onBufferEos,this),t.on(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),t.on(P.Events.LEVEL_UPDATED,this.onLevelUpdated,this),t.on(P.Events.FRAG_PARSED,this.onFragParsed,this),t.on(P.Events.FRAG_CHANGED,this.onFragChanged,this)},d.unregisterListeners=function(){var t=this.hls;t.off(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.off(P.Events.BUFFER_RESET,this.onBufferReset,this),t.off(P.Events.BUFFER_APPENDING,this.onBufferAppending,this),t.off(P.Events.BUFFER_CODECS,this.onBufferCodecs,this),t.off(P.Events.BUFFER_EOS,this.onBufferEos,this),t.off(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),t.off(P.Events.LEVEL_UPDATED,this.onLevelUpdated,this),t.off(P.Events.FRAG_PARSED,this.onFragParsed,this),t.off(P.Events.FRAG_CHANGED,this.onFragChanged,this)},d._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new f.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},d.onManifestParsed=function(t,n){var h=2;(n.audio&&!n.video||!n.altAudio)&&(h=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=h,this.details=null,E.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},d.onMediaAttaching=function(t,n){var h=this.media=n.media;if(h&&o){var v=this.mediaSource=new o;v.addEventListener("sourceopen",this._onMediaSourceOpen),v.addEventListener("sourceended",this._onMediaSourceEnded),v.addEventListener("sourceclose",this._onMediaSourceClose),h.src=self.URL.createObjectURL(v),this._objectUrl=h.src}},d.onMediaDetaching=function(){var t=this.media,n=this.mediaSource,h=this._objectUrl;if(n){if(E.logger.log("[buffer-controller]: media source detaching"),n.readyState==="open")try{n.endOfStream()}catch(v){E.logger.warn("[buffer-controller]: onMediaDetaching: "+v.message+" while calling endOfStream")}this.onBufferReset(),n.removeEventListener("sourceopen",this._onMediaSourceOpen),n.removeEventListener("sourceended",this._onMediaSourceEnded),n.removeEventListener("sourceclose",this._onMediaSourceClose),t&&(h&&self.URL.revokeObjectURL(h),t.src===h?(t.removeAttribute("src"),t.load()):E.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)},d.onBufferReset=function(){var t=this;this.getSourceBufferTypes().forEach(function(n){var h=t.sourceBuffer[n];try{h&&(t.removeBufferListeners(n),t.mediaSource&&t.mediaSource.removeSourceBuffer(h),t.sourceBuffer[n]=void 0)}catch(v){E.logger.warn("[buffer-controller]: Failed to reset the "+n+" buffer",v)}}),this._initSourceBuffer()},d.onBufferCodecs=function(t,n){var h=this,v=this.getSourceBufferTypes().length;if(Object.keys(n).forEach(function(b){if(v){var y=h.tracks[b];if(y&&typeof y.buffer.changeType=="function"){var _=n[b],m=_.codec,g=_.levelCodec,x=_.container,l=(y.levelCodec||y.codec).replace(a,"$1"),T=(g||m).replace(a,"$1");if(l!==T){var A=x+";codecs="+(g||m);h.appendChangeType(b,A)}}}else h.pendingTracks[b]=n[b]}),v)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},d.appendChangeType=function(t,n){var h=this,v=this.operationQueue,b={execute:function(){var _=h.sourceBuffer[t];_&&(E.logger.log("[buffer-controller]: changing "+t+" sourceBuffer type to "+n),_.changeType(n)),v.shiftAndExecuteNext(t)},onStart:function(){},onComplete:function(){},onError:function(_){E.logger.warn("[buffer-controller]: Failed to change "+t+" SourceBuffer type",_)}};v.append(b,t)},d.onBufferAppending=function(t,n){var h=this,v=this.hls,b=this.operationQueue,y=this.tracks,_=n.data,m=n.type,g=n.frag,x=n.part,l=n.chunkMeta,T=l.buffering[m],A=self.performance.now();T.start=A;var O=g.stats.buffering,D=x?x.stats.buffering:null;O.start===0&&(O.start=A),D&&D.start===0&&(D.start=A);var I=y.audio,j=m==="audio"&&l.id===1&&(I==null?void 0:I.container)==="audio/mpeg",B={execute:function(){if(T.executeStart=self.performance.now(),j){var F=h.sourceBuffer[m];if(F){var G=g.start-F.timestampOffset;Math.abs(G)>=.1&&(E.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+g.start+" (delta: "+G+") sn: "+g.sn+")"),F.timestampOffset=g.start)}}h.appendExecutor(_,m)},onStart:function(){},onComplete:function(){var F=self.performance.now();T.executeEnd=T.end=F,O.first===0&&(O.first=F),D&&D.first===0&&(D.first=F);var G=h.sourceBuffer,X={};for(var Z in G)X[Z]=w.BufferHelper.getBuffered(G[Z]);h.appendError=0,h.hls.trigger(P.Events.BUFFER_APPENDED,{type:m,frag:g,part:x,chunkMeta:l,parent:g.type,timeRanges:X})},onError:function(F){E.logger.error("[buffer-controller]: Error encountered while trying to append to the "+m+" SourceBuffer",F);var G={type:C.ErrorTypes.MEDIA_ERROR,parent:g.type,details:C.ErrorDetails.BUFFER_APPEND_ERROR,err:F,fatal:!1};F.code===DOMException.QUOTA_EXCEEDED_ERR?G.details=C.ErrorDetails.BUFFER_FULL_ERROR:(h.appendError++,G.details=C.ErrorDetails.BUFFER_APPEND_ERROR,h.appendError>v.config.appendErrorMaxRetry&&(E.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(B,m)},d.onBufferFlushing=function(t,n){var h=this,v=this.operationQueue,b=function(_){return{execute:h.removeExecutor.bind(h,_,n.startOffset,n.endOffset),onStart:function(){},onComplete:function(){h.hls.trigger(P.Events.BUFFER_FLUSHED,{type:_})},onError:function(g){E.logger.warn("[buffer-controller]: Failed to remove from "+_+" SourceBuffer",g)}}};n.type?v.append(b(n.type),n.type):this.getSourceBufferTypes().forEach(function(y){v.append(b(y),y)})},d.onFragParsed=function(t,n){var h=this,v=n.frag,b=n.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 x=self.performance.now();v.stats.buffering.end=x,b&&(b.stats.buffering.end=x);var l=b?b.stats:v.stats;h.hls.trigger(P.Events.FRAG_BUFFERED,{frag:v,part:b,stats:l,id:v.type})};y.length===0&&E.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+v.type+" level: "+v.level+" sn: "+v.sn),this.blockBuffers(m,y)},d.onFragChanged=function(t,n){this.flushBackBuffer()},d.onBufferEos=function(t,n){var h=this,v=this.getSourceBufferTypes().reduce(function(b,y){var _=h.sourceBuffer[y];return(!n.type||n.type===y)&&(_&&!_.ended&&(_.ended=!0,E.logger.log("[buffer-controller]: "+y+" sourceBuffer now EOS"))),b&&!!(!_||_.ended)},!0);v&&this.blockBuffers(function(){var b=h.mediaSource;if(!b||b.readyState!=="open")return;b.endOfStream()})},d.onLevelUpdated=function(t,n){var h=n.details;if(!h.fragments.length)return;this.details=h,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},d.flushBackBuffer=function(){var t=this.hls,n=this.details,h=this.media,v=this.sourceBuffer;if(!h||n===null)return;var b=this.getSourceBufferTypes();if(!b.length)return;var y=n.live&&t.config.liveBackBufferLength!==null?t.config.liveBackBufferLength:t.config.backBufferLength;if(!Object(S.isFiniteNumber)(y)||y<0)return;var _=h.currentTime,m=n.levelTargetDuration,g=Math.max(y,m),x=Math.floor(_/m)*m-g;b.forEach(function(l){var T=v[l];if(T){var A=w.BufferHelper.getBuffered(T);A.length>0&&x>A.start(0)&&(t.trigger(P.Events.BACK_BUFFER_REACHED,{bufferEnd:x}),n.live&&t.trigger(P.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:x}),t.trigger(P.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:x,type:l}))}})},d.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var t=this.details,n=this.hls,h=this.media,v=this.mediaSource,b=t.fragments[0].start+t.totalduration,y=h.duration,_=Object(S.isFiniteNumber)(v.duration)?v.duration:0;t.live&&n.config.liveDurationInfinity?(E.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),v.duration=Infinity,this.updateSeekableRange(t)):(b>_&&b>y||!Object(S.isFiniteNumber)(y))&&(E.logger.log("[buffer-controller]: Updating Media Source duration to "+b.toFixed(3)),v.duration=b)},d.updateSeekableRange=function(t){var n=this.mediaSource,h=t.fragments,v=h.length;if(v&&t.live&&n!==null&&n!==void 0&&n.setLiveSeekableRange){var b=Math.max(0,h[0].start),y=Math.max(b,b+t.totalduration);n.setLiveSeekableRange(b,y)}},d.checkPendingTracks=function(){var t=this.bufferCodecEventsExpected,n=this.operationQueue,h=this.pendingTracks,v=Object.keys(h).length;if(v&&!t||v===2){this.createSourceBuffers(h),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){n.executeNext(y)})}},d.createSourceBuffers=function(t){var n=this.sourceBuffer,h=this.mediaSource;if(!h)throw Error("createSourceBuffers called when mediaSource was null");var v=0;for(var b in t)if(!n[b]){var y=t[b];if(!y)throw Error("source buffer exists for track "+b+", however track does not");var _=y.levelCodec||y.codec,m=y.container+";codecs="+_;E.logger.log("[buffer-controller]: creating sourceBuffer("+m+")");try{var g=n[b]=h.addSourceBuffer(m),x=b;this.addBufferListener(x,"updatestart",this._onSBUpdateStart),this.addBufferListener(x,"updateend",this._onSBUpdateEnd),this.addBufferListener(x,"error",this._onSBUpdateError),this.tracks[b]={buffer:g,codec:_,container:y.container,levelCodec:y.levelCodec,id:y.id},v++}catch(l){E.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+l.message),this.hls.trigger(P.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:l,mimeType:m})}}v&&this.hls.trigger(P.Events.BUFFER_CREATED,{tracks:this.tracks})},d._onSBUpdateStart=function(t){var n=this.operationQueue,h=n.current(t);h.onStart()},d._onSBUpdateEnd=function(t){var n=this.operationQueue,h=n.current(t);h.onComplete(),n.shiftAndExecuteNext(t)},d._onSBUpdateError=function(t,n){E.logger.error("[buffer-controller]: "+t+" SourceBuffer error",n),this.hls.trigger(P.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var h=this.operationQueue.current(t);h&&h.onError(n)},d.removeExecutor=function(t,n,h){var v=this.media,b=this.mediaSource,y=this.operationQueue,_=this.sourceBuffer,m=_[t];if(!v||!b||!m){E.logger.warn("[buffer-controller]: Attempting to remove from the "+t+" SourceBuffer, but it does not exist"),y.shiftAndExecuteNext(t);return}var g=Object(S.isFiniteNumber)(v.duration)?v.duration:Infinity,x=Object(S.isFiniteNumber)(b.duration)?b.duration:Infinity,l=Math.max(0,n),T=Math.min(h,g,x);T>l?(E.logger.log("[buffer-controller]: Removing ["+l+","+T+"] from the "+t+" SourceBuffer"),console.assert(!m.updating,t+" sourceBuffer must not be updating"),m.remove(l,T)):y.shiftAndExecuteNext(t)},d.appendExecutor=function(t,n){var h=this.operationQueue,v=this.sourceBuffer,b=v[n];if(!b){E.logger.warn("[buffer-controller]: Attempting to append to the "+n+" SourceBuffer, but it does not exist"),h.shiftAndExecuteNext(n);return}b.ended=!1,console.assert(!b.updating,n+" sourceBuffer must not be updating"),b.appendBuffer(t)},d.blockBuffers=function(t,n){var h=this;if(n===void 0&&(n=this.getSourceBufferTypes()),!n.length){E.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(t);return}var v=this.operationQueue,b=n.map(function(y){return v.appendBlocker(y)});Promise.all(b).then(function(){t(),n.forEach(function(y){var _=h.sourceBuffer[y];(!_||!_.updating)&&v.shiftAndExecuteNext(y)})})},d.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},d.addBufferListener=function(t,n,h){var v=this.sourceBuffer[t];if(!v)return;var b=h.bind(this,t);this.listeners[t].push({event:n,listener:b}),v.addEventListener(n,b)},d.removeBufferListeners=function(t){var n=this.sourceBuffer[t];if(!n)return;this.listeners[t].forEach(function(h){n.removeEventListener(h.event,h.listener)})},s}()},"./src/controller/buffer-operation-queue.ts":function(re,$,U){"use strict";U.r($),U.d($,"default",function(){return P});var S=U("./src/utils/logger.ts"),P=function(){function E(w){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=w}var C=E.prototype;return C.append=function(u,p){var f=this.queues[p];f.push(u),f.length===1&&this.buffers[p]&&this.executeNext(p)},C.insertAbort=function(u,p){var f=this.queues[p];f.unshift(u),this.executeNext(p)},C.appendBlocker=function(u){var p,f=new Promise(function(a){p=a}),o={execute:p,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(o,u),f},C.executeNext=function(u){var p=this.buffers,f=this.queues,o=p[u],a=f[u];if(a.length){var c=a[0];try{c.execute()}catch(s){S.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),c.onError(s),(!o||!o.updating)&&(a.shift(),this.executeNext(u))}}},C.shiftAndExecuteNext=function(u){this.queues[u].shift(),this.executeNext(u)},C.current=function(u){return this.queues[u][0]},E}()},"./src/controller/cap-level-controller.ts":function(re,$,U){"use strict";U.r($);var S=U("./src/events.ts");function P(w,u){for(var p=0;p<u.length;p++){var f=u[p];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(w,f.key,f)}}function E(w,u,p){return u&&P(w.prototype,u),p&&P(w,p),w}var C=function(){function w(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 u=w.prototype;return u.setStreamController=function(f){this.streamController=f},u.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},u.registerListeners=function(){var f=this.hls;f.on(S.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),f.on(S.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),f.on(S.Events.MANIFEST_PARSED,this.onManifestParsed,this),f.on(S.Events.BUFFER_CODECS,this.onBufferCodecs,this),f.on(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},u.unregisterListener=function(){var f=this.hls;f.off(S.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),f.off(S.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),f.off(S.Events.MANIFEST_PARSED,this.onManifestParsed,this),f.off(S.Events.BUFFER_CODECS,this.onBufferCodecs,this),f.off(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},u.onFpsDropLevelCapping=function(f,o){w.isLevelAllowed(o.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(o.droppedLevel)},u.onMediaAttaching=function(f,o){this.media=o.media instanceof HTMLVideoElement?o.media:null},u.onManifestParsed=function(f,o){var a=this.hls;this.restrictedLevels=[],this.firstLevel=o.firstLevel,a.config.capLevelToPlayerSize&&o.video&&this.startCapping()},u.onBufferCodecs=function(f,o){var a=this.hls;a.config.capLevelToPlayerSize&&o.video&&this.startCapping()},u.onMediaDetaching=function(){this.stopCapping()},u.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var f=this.hls.levels;if(f.length){var o=this.hls;o.autoLevelCapping=this.getMaxLevel(f.length-1),o.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=o.autoLevelCapping}}},u.getMaxLevel=function(f){var o=this,a=this.hls.levels;if(!a.length)return-1;var c=a.filter(function(s,d){return w.isLevelAllowed(d,o.restrictedLevels)&&d<=f});return this.clientRect=null,w.getMaxLevelByMediaSize(c,this.mediaWidth,this.mediaHeight)},u.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()},u.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},u.getDimensions=function(){if(this.clientRect)return this.clientRect;var f=this.media,o={width:0,height:0};if(f){var a=f.getBoundingClientRect();o.width=a.width,o.height=a.height,!o.width&&!o.height&&(o.width=a.right-a.left||f.width||0,o.height=a.bottom-a.top||f.height||0)}return this.clientRect=o,o},w.isLevelAllowed=function(f,o){return o===void 0&&(o=[]),o.indexOf(f)===-1},w.getMaxLevelByMediaSize=function(f,o,a){if(!f||!f.length)return-1;for(var c=function(n,h){return h?n.width!==h.width||n.height!==h.height:!0},s=f.length-1,d=0;d<f.length;d+=1){var i=f[d];if((i.width>=o||i.height>=a)&&c(i,f[d+1])){s=d;break}}return s},E(w,[{key:"mediaWidth",get:function(){return this.getDimensions().width*w.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*w.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var f=1;try{f=self.devicePixelRatio}catch(o){}return f}}]),w}();$.default=C},"./src/controller/cmcd-controller.ts":function(re,$,U){"use strict";U.r($),U.d($,"default",function(){return c});var S=U("./src/events.ts"),P=U("./src/types/cmcd.ts"),E=U("./src/utils/buffer-helper.ts"),C=U("./src/utils/logger.ts");function w(s,d){for(var i=0;i<d.length;i++){var t=d[i];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(s,t.key,t)}}function u(s,d,i){return d&&w(s.prototype,d),i&&w(s,i),s}function p(s,d){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))||d&&s&&typeof s.length=="number"){i&&(s=i);var t=0;return function(){return t>=s.length?{done:!0}:{done:!1,value:s[t++]}}}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,d){if(!s)return;if(typeof s=="string")return o(s,d);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 o(s,d)}function o(s,d){(d==null||d>s.length)&&(d=s.length);for(var i=0,t=new Array(d);i<d;i++)t[i]=s[i];return t}function a(){return a=Object.assign||function(s){for(var d=1;d<arguments.length;d++){var i=arguments[d];for(var t in i)Object.prototype.hasOwnProperty.call(i,t)&&(s[t]=i[t])}return s},a.apply(this,arguments)}var c=function(){function s(i){var t=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(){t.initialized&&(t.starved=!0),t.buffering=!0},this.onPlaying=function(){t.initialized||(t.initialized=!0),t.buffering=!1},this.applyPlaylistData=function(v){try{t.apply(v,{ot:P.CMCDObjectType.MANIFEST,su:!t.initialized})}catch(b){C.logger.warn("Could not generate manifest CMCD data.",b)}},this.applyFragmentData=function(v){try{var b=v.frag,y=t.hls.levels[b.level],_=t.getObjectType(b),m={d:b.duration*1e3,ot:_};(_===P.CMCDObjectType.VIDEO||_===P.CMCDObjectType.AUDIO||_==P.CMCDObjectType.MUXED)&&(m.br=y.bitrate/1e3,m.tb=t.getTopBandwidth(_),m.bl=t.getBufferLength(_)),t.apply(v,m)}catch(g){C.logger.warn("Could not generate segment CMCD data.",g)}},this.hls=i;var n=this.config=i.config,h=n.cmcd;h!=null&&(n.pLoader=this.createPlaylistLoader(),n.fLoader=this.createFragmentLoader(),this.sid=h.sessionId||s.uuid(),this.cid=h.contentId,this.useHeaders=h.useHeaders===!0,this.registerListeners())}var d=s.prototype;return d.registerListeners=function(){var t=this.hls;t.on(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(S.Events.MEDIA_DETACHED,this.onMediaDetached,this),t.on(S.Events.BUFFER_CREATED,this.onBufferCreated,this)},d.unregisterListeners=function(){var t=this.hls;t.off(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(S.Events.MEDIA_DETACHED,this.onMediaDetached,this),t.off(S.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},d.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},d.onMediaAttached=function(t,n){this.media=n.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},d.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},d.onBufferCreated=function(t,n){var h,v;this.audioBuffer=(h=n.tracks.audio)===null||h===void 0?void 0:h.buffer,this.videoBuffer=(v=n.tracks.video)===null||v===void 0?void 0:v.buffer},d.createData=function(){var t;return{v:P.CMCDVersion,sf:P.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(t=this.media)===null||t===void 0?void 0:t.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},d.apply=function(t,n){n===void 0&&(n={}),a(n,this.createData());var h=n.ot===P.CMCDObjectType.INIT||n.ot===P.CMCDObjectType.VIDEO||n.ot===P.CMCDObjectType.MUXED;if(this.starved&&h&&(n.bs=!0,n.su=!0,this.starved=!1),n.su==null&&(n.su=this.buffering),this.useHeaders){var v=s.toHeaders(n);if(!Object.keys(v).length)return;t.headers||(t.headers={}),a(t.headers,v)}else{var b=s.toQuery(n);if(!b)return;t.url=s.appendQueryToUri(t.url,b)}},d.getObjectType=function(t){var n=t.type;return n==="subtitle"?P.CMCDObjectType.TIMED_TEXT:t.sn==="initSegment"?P.CMCDObjectType.INIT:n==="audio"?P.CMCDObjectType.AUDIO:n==="main"?this.hls.audioTracks.length?P.CMCDObjectType.VIDEO:P.CMCDObjectType.MUXED:void 0},d.getTopBandwidth=function(t){for(var n=0,h=t===P.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,v=p(h),b;!(b=v()).done;){var y=b.value;y.bitrate>n&&(n=y.bitrate)}return n>0?n:NaN},d.getBufferLength=function(t){var n=this.hls.media,h=t===P.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!h||!n)return NaN;var v=E.BufferHelper.bufferInfo(h,n.currentTime,this.config.maxBufferHole);return v.len*1e3},d.createPlaylistLoader=function(){var t=this.config.pLoader,n=this.applyPlaylistData,h=t||this.config.loader;return function(){function v(y){this.loader=void 0,this.loader=new h(y)}var b=v.prototype;return b.destroy=function(){this.loader.destroy()},b.abort=function(){this.loader.abort()},b.load=function(_,m,g){n(_),this.loader.load(_,m,g)},u(v,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),v}()},d.createFragmentLoader=function(){var t=this.config.fLoader,n=this.applyFragmentData,h=t||this.config.loader;return function(){function v(y){this.loader=void 0,this.loader=new h(y)}var b=v.prototype;return b.destroy=function(){this.loader.destroy()},b.abort=function(){this.loader.abort()},b.load=function(_,m,g){n(_),this.loader.load(_,m,g)},u(v,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),v}()},s.uuid=function(){var t=URL.createObjectURL(new Blob),n=t.toString();return URL.revokeObjectURL(t),n.substr(n.lastIndexOf("/")+1)},s.serialize=function(t){for(var n=[],h=function(j){return!Number.isNaN(j)&&j!=null&&j!==""&&j!==!1},v=function(j){return Math.round(j)},b=function(j){return v(j/100)*100},y=function(j){return encodeURIComponent(j)},_={br:v,d:v,bl:b,dl:b,mtp:b,nor:y,rtp:b,tb:v},m=Object.keys(t||{}).sort(),g=p(m),x;!(x=g()).done;){var l=x.value,T=t[l];if(!h(T))continue;if(l==="v"&&T===1)continue;if(l=="pr"&&T===1)continue;var A=_[l];A&&(T=A(T));var O=typeof T,D=void 0;l==="ot"||l==="sf"||l==="st"?D=l+"="+T:O==="boolean"?D=l:O==="number"?D=l+"="+T:D=l+"="+JSON.stringify(T),n.push(D)}return n.join(",")},s.toHeaders=function(t){for(var n=Object.keys(t),h={},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=n;_<m.length;_++){var g=m[_],x=y[g]!=null?y[g]:1;b[x][g]=t[g]}for(var l=0;l<b.length;l++){var T=s.serialize(b[l]);T&&(h["CMCD-"+v[l]]=T)}return h},s.toQuery=function(t){return"CMCD="+encodeURIComponent(s.serialize(t))},s.appendQueryToUri=function(t,n){if(!n)return t;var h=t.includes("?")?"&":"?";return""+t+h+n},s}()},"./src/controller/eme-controller.ts":function(re,$,U){"use strict";U.r($);var S=U("./src/events.ts"),P=U("./src/errors.ts"),E=U("./src/utils/logger.ts"),C=U("./src/utils/mediakeys-helper.ts");function w(c,s){for(var d=0;d<s.length;d++){var i=s[d];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,i.key,i)}}function u(c,s,d){return s&&w(c.prototype,s),d&&w(c,d),c}var p=3,f=function(s,d,i){var t={audioCapabilities:[],videoCapabilities:[]};return s.forEach(function(n){t.audioCapabilities.push({contentType:'audio/mp4; codecs="'+n+'"',robustness:i.audioRobustness||""})}),d.forEach(function(n){t.videoCapabilities.push({contentType:'video/mp4; codecs="'+n+'"',robustness:i.videoRobustness||""})}),[t]},o=function(s,d,i,t){switch(s){case C.KeySystems.WIDEVINE:return f(d,i,t);default:throw new Error("Unknown key-system: "+s)}},a=function(){function c(d){this.hls=void 0,this._widevineLicenseUrl=void 0,this._licenseXhrSetup=void 0,this._licenseResponseCallback=void 0,this._emeEnabled=void 0,this._requestMediaKeySystemAccess=void 0,this._drmSystemOptions=void 0,this._config=void 0,this._mediaKeysList=[],this._media=null,this._hasSetMediaKeys=!1,this._requestLicenseFailureCount=0,this.mediaKeysPromise=null,this._onMediaEncrypted=this.onMediaEncrypted.bind(this),this.hls=d,this._config=d.config,this._widevineLicenseUrl=this._config.widevineLicenseUrl,this._licenseXhrSetup=this._config.licenseXhrSetup,this._licenseResponseCallback=this._config.licenseResponseCallback,this._emeEnabled=this._config.emeEnabled,this._requestMediaKeySystemAccess=this._config.requestMediaKeySystemAccessFunc,this._drmSystemOptions=this._config.drmSystemOptions,this._registerListeners()}var s=c.prototype;return s.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},s._registerListeners=function(){this.hls.on(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(S.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(S.Events.MANIFEST_PARSED,this.onManifestParsed,this)},s._unregisterListeners=function(){this.hls.off(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(S.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(S.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,t,n){var h=this,v=o(i,t,n,this._drmSystemOptions);E.logger.log("Requesting encrypted media key-system access");var b=this.requestMediaKeySystemAccess(i,v);this.mediaKeysPromise=b.then(function(y){return h._onMediaKeySystemAccessObtained(i,y)}),b.catch(function(y){E.logger.error('Failed to obtain key-system "'+i+'" access:',y)})},s._onMediaKeySystemAccessObtained=function(i,t){var n=this;E.logger.log('Access for key-system "'+i+'" obtained');var h={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:t,mediaKeySystemDomain:i};this._mediaKeysList.push(h);var v=Promise.resolve().then(function(){return t.createMediaKeys()}).then(function(b){return h.mediaKeys=b,E.logger.log('Media-keys created for key-system "'+i+'"'),n._onMediaKeysCreated(),b});return v.catch(function(b){E.logger.error("Failed to create media-keys:",b)}),v},s._onMediaKeysCreated=function(){var i=this;this._mediaKeysList.forEach(function(t){t.mediaKeysSession||(t.mediaKeysSession=t.mediaKeys.createSession(),i._onNewMediaKeySession(t.mediaKeysSession))})},s._onNewMediaKeySession=function(i){var t=this;E.logger.log("New key-system session "+i.sessionId),i.addEventListener("message",function(n){t._onKeySessionMessage(i,n.message)},!1)},s._onKeySessionMessage=function(i,t){E.logger.log("Got EME message event, creating license request"),this._requestLicense(t,function(n){E.logger.log("Received license data (length: "+(n&&n.byteLength)+"), updating key-session"),i.update(n)})},s.onMediaEncrypted=function(i){var t=this;if(E.logger.log('Media is encrypted using "'+i.initDataType+'" init data type'),!this.mediaKeysPromise){E.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(S.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var n=function(v){if(!t._media)return;t._attemptSetMediaKeys(v),t._generateRequestWithPreferredKeySession(i.initDataType,i.initData)};this.mediaKeysPromise.then(n).catch(n)},s._attemptSetMediaKeys=function(i){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var t=this._mediaKeysList[0];if(!t||!t.mediaKeys){E.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(S.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}E.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(t.mediaKeys),this._hasSetMediaKeys=!0}},s._generateRequestWithPreferredKeySession=function(i,t){var n=this,h=this._mediaKeysList[0];if(!h){E.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(S.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(h.mediaKeysSessionInitialized){E.logger.warn("Key-Session already initialized but requested again");return}var v=h.mediaKeysSession;if(!v){E.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(S.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!t){E.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(S.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}E.logger.log('Generating key-session request for "'+i+'" init data type'),h.mediaKeysSessionInitialized=!0,v.generateRequest(i,t).then(function(){E.logger.debug("Key-session generation succeeded")}).catch(function(b){E.logger.error("Error generating key-session request:",b),n.hls.trigger(S.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},s._createLicenseXhr=function(i,t,n){var h=new XMLHttpRequest;h.responseType="arraybuffer",h.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,h,i,t,n);var v=this._licenseXhrSetup;if(v)try{v.call(this.hls,h,i),v=void 0}catch(b){E.logger.error(b)}try{h.readyState||h.open("POST",i,!0),v&&v.call(this.hls,h,i)}catch(b){throw new Error("issue setting up KeySystem license XHR "+b)}return h},s._onLicenseRequestReadyStageChange=function(i,t,n,h){switch(i.readyState){case 4:if(i.status===200){this._requestLicenseFailureCount=0,E.logger.log("License request succeeded");var v=i.response,b=this._licenseResponseCallback;if(b)try{v=b.call(this.hls,i,t)}catch(_){E.logger.error(_)}h(v)}else{if(E.logger.error("License Request XHR failed ("+t+"). Status: "+i.status+" ("+i.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>p){this.hls.trigger(S.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;E.logger.warn("Retrying license request, "+y+" attempts left"),this._requestLicense(n,h)}break}},s._generateLicenseRequestChallenge=function(i,t){switch(i.mediaKeySystemDomain){case C.KeySystems.WIDEVINE:return t}throw new Error("unsupported key-system: "+i.mediaKeySystemDomain)},s._requestLicense=function(i,t){E.logger.log("Requesting content license for key-system");var n=this._mediaKeysList[0];if(!n){E.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(S.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var h=this.getLicenseServerUrl(n.mediaKeySystemDomain),v=this._createLicenseXhr(h,i,t);E.logger.log("Sending license request to URL: "+h);var b=this._generateLicenseRequestChallenge(n,i);v.send(b)}catch(y){E.logger.error("Failure requesting DRM license: "+y),this.hls.trigger(S.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},s.onMediaAttached=function(i,t){if(!this._emeEnabled)return;var n=t.media;this._media=n,n.addEventListener("encrypted",this._onMediaEncrypted)},s.onMediaDetached=function(){var i=this._media,t=this._mediaKeysList;if(!i)return;i.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(t.map(function(n){if(n.mediaKeysSession)return n.mediaKeysSession.close().catch(function(){})})).then(function(){return i.setMediaKeys(null)}).catch(function(){})},s.onManifestParsed=function(i,t){if(!this._emeEnabled)return;var n=t.levels.map(function(v){return v.audioCodec}).filter(function(v){return!!v}),h=t.levels.map(function(v){return v.videoCodec}).filter(function(v){return!!v});this._attemptKeySystemAccess(C.KeySystems.WIDEVINE,n,h)},u(c,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),c}();$.default=a},"./src/controller/fps-controller.ts":function(re,$,U){"use strict";U.r($);var S=U("./src/events.ts"),P=U("./src/utils/logger.ts"),E=function(){function C(u){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=u,this.registerListeners()}var w=C.prototype;return w.setStreamController=function(p){this.streamController=p},w.registerListeners=function(){this.hls.on(S.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},w.unregisterListeners=function(){this.hls.off(S.Events.MEDIA_ATTACHING,this.onMediaAttaching)},w.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},w.onMediaAttaching=function(p,f){var o=this.hls.config;if(o.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),o.fpsDroppedMonitoringPeriod)}},w.checkFPS=function(p,f,o){var a=performance.now();if(f){if(this.lastTime){var c=a-this.lastTime,s=o-this.lastDroppedFrames,d=f-this.lastDecodedFrames,i=1e3*s/c,t=this.hls;if(t.trigger(S.Events.FPS_DROP,{currentDropped:s,currentDecoded:d,totalDroppedFrames:o}),i>0&&s>t.config.fpsDroppedMonitoringThreshold*d){var n=t.currentLevel;P.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+n),n>0&&(t.autoLevelCapping===-1||t.autoLevelCapping>=n)&&(n=n-1,t.trigger(S.Events.FPS_DROP_LEVEL_CAPPING,{level:n,droppedLevel:t.currentLevel}),t.autoLevelCapping=n,this.streamController.nextLevelSwitch())}}this.lastTime=a,this.lastDroppedFrames=o,this.lastDecodedFrames=f}},w.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}();$.default=E},"./src/controller/fragment-finders.ts":function(re,$,U){"use strict";U.r($),U.d($,"findFragmentByPDT",function(){return E}),U.d($,"findFragmentByPTS",function(){return C}),U.d($,"fragmentWithinToleranceTest",function(){return w}),U.d($,"pdtWithinToleranceTest",function(){return u}),U.d($,"findFragWithCC",function(){return p});var S=U("./src/polyfills/number.ts"),P=U("./src/utils/binary-search.ts");function E(f,o,a){if(o===null||!Array.isArray(f)||!f.length||!Object(S.isFiniteNumber)(o))return null;var c=f[0].programDateTime;if(o<(c||0))return null;var s=f[f.length-1].endProgramDateTime;if(o>=(s||0))return null;a=a||0;for(var d=0;d<f.length;++d){var i=f[d];if(u(o,a,i))return i}return null}function C(f,o,a,c){a===void 0&&(a=0),c===void 0&&(c=0);var s=null;if(f?s=o[f.sn-o[0].sn+1]||null:a===0&&o[0].start===0&&(s=o[0]),s&&w(a,c,s)===0)return s;var d=P.default.search(o,w.bind(null,a,c));return d||s}function w(f,o,a){f===void 0&&(f=0),o===void 0&&(o=0);var c=Math.min(o,a.duration+(a.deltaPTS?a.deltaPTS:0));return a.start+a.duration-c<=f?1:a.start-c>f&&a.start?-1:0}function u(f,o,a){var c=Math.min(o,a.duration+(a.deltaPTS?a.deltaPTS:0))*1e3,s=a.endProgramDateTime||0;return s-c>f}function p(f,o){return P.default.search(f,function(a){return a.cc<o?1:a.cc>o?-1:0})}},"./src/controller/fragment-tracker.ts":function(re,$,U){"use strict";U.r($),U.d($,"FragmentState",function(){return E}),U.d($,"FragmentTracker",function(){return C});var S=U("./src/events.ts"),P=U("./src/types/loader.ts"),E;(function(p){p.NOT_LOADED="NOT_LOADED",p.BACKTRACKED="BACKTRACKED",p.APPENDING="APPENDING",p.PARTIAL="PARTIAL",p.OK="OK"})(E||(E={}));var C=function(){function p(o){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=o,this._registerListeners()}var f=p.prototype;return f._registerListeners=function(){var a=this.hls;a.on(S.Events.BUFFER_APPENDED,this.onBufferAppended,this),a.on(S.Events.FRAG_BUFFERED,this.onFragBuffered,this),a.on(S.Events.FRAG_LOADED,this.onFragLoaded,this)},f._unregisterListeners=function(){var a=this.hls;a.off(S.Events.BUFFER_APPENDED,this.onBufferAppended,this),a.off(S.Events.FRAG_BUFFERED,this.onFragBuffered,this),a.off(S.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,d=this.activeParts;if(!s)return null;if(d)for(var i=d.length;i--;){var t=d[i],n=t?t.end:s.appendedPTS;if(t.start<=a&&n!==void 0&&a<=n)return i>9&&(this.activeParts=d.slice(i-9)),t}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,d=Object.keys(s),i=d.length;i--;){var t=s[d[i]];if((t==null?void 0:t.body.type)===c&&t.buffered){var n=t.body;if(n.start<=a&&a<=n.end)return n}}return null},f.detectEvictedFragments=function(a,c,s){var d=this;Object.keys(this.fragments).forEach(function(i){var t=d.fragments[i];if(!t)return;if(!t.buffered){t.body.type===s&&d.removeFragment(t.body);return}var n=t.range[a];if(!n)return;n.time.some(function(h){var v=!d.isTimeBuffered(h.startPTS,h.endPTS,c);return v&&d.removeFragment(t.body),v})})},f.detectPartialFragments=function(a){var c=this,s=this.timeRanges,d=a.frag,i=a.part;if(!s||d.sn==="initSegment")return;var t=u(d),n=this.fragments[t];if(!n)return;Object.keys(s).forEach(function(h){var v=d.elementaryStreams[h];if(!v)return;var b=s[h],y=i!==null||v.partial===!0;n.range[h]=c.getBufferedTimes(d,i,y,b)}),n.backtrack=n.loaded=null,Object.keys(n.range).length?n.buffered=!0:this.removeFragment(n.body)},f.fragBuffered=function(a){var c=u(a),s=this.fragments[c];s&&(s.backtrack=s.loaded=null,s.buffered=!0)},f.getBufferedTimes=function(a,c,s,d){for(var i={time:[],partial:s},t=c?c.start:a.start,n=c?c.end:a.end,h=a.minEndPTS||n,v=a.maxStartPTS||t,b=0;b<d.length;b++){var y=d.start(b)-this.bufferPadding,_=d.end(b)+this.bufferPadding;if(v>=y&&h<=_){i.time.push({startPTS:Math.max(t,d.start(b)),endPTS:Math.min(n,d.end(b))});break}else if(t<_&&n>y)i.partial=!0,i.time.push({startPTS:Math.max(t,d.start(b)),endPTS:Math.min(n,d.end(b))});else if(n<=y)break}return i},f.getPartialFragment=function(a){var c=null,s,d,i,t=0,n=this.bufferPadding,h=this.fragments;return Object.keys(h).forEach(function(v){var b=h[v];if(!b)return;w(b)&&(d=b.body.start-n,i=b.body.end+n,a>=d&&a<=i&&(s=Math.min(a-d,i-a),t<=s&&(c=b.body,t=s)))}),c},f.getState=function(a){var c=u(a),s=this.fragments[c];return s?s.buffered?w(s)?E.PARTIAL:E.OK:s.backtrack?E.BACKTRACKED:E.APPENDING:E.NOT_LOADED},f.backtrack=function(a,c){var s=u(a),d=this.fragments[s];if(!d||d.backtrack)return null;var i=d.backtrack=c||d.loaded;return d.loaded=null,i},f.getBacktrackData=function(a){var c=u(a),s=this.fragments[c];if(s){var d,i=s.backtrack;if(i!=null&&(d=i.payload)!==null&&d!==void 0&&d.byteLength)return i;this.removeFragment(a)}return null},f.isTimeBuffered=function(a,c,s){for(var d,i,t=0;t<s.length;t++){if(d=s.start(t)-this.bufferPadding,i=s.end(t)+this.bufferPadding,a>=d&&c<=i)return!0;if(c<=d)return!1}return!1},f.onFragLoaded=function(a,c){var s=c.frag,d=c.part;if(s.sn==="initSegment"||s.bitrateTest||d)return;var i=u(s);this.fragments[i]={body:s,loaded:c,backtrack:null,buffered:!1,range:Object.create(null)}},f.onBufferAppended=function(a,c){var s=this,d=c.frag,i=c.part,t=c.timeRanges;if(d.type===P.PlaylistLevelType.MAIN)if(this.activeFragment=d,i){var n=this.activeParts;n||(this.activeParts=n=[]),n.push(i)}else this.activeParts=null;this.timeRanges=t,Object.keys(t).forEach(function(h){var v=t[h];if(s.detectEvictedFragments(h,v),!i)for(var b=0;b<v.length;b++)d.appendedPTS=Math.max(v.end(b),d.appendedPTS||0)})},f.onFragBuffered=function(a,c){this.detectPartialFragments(c)},f.hasFragment=function(a){var c=u(a);return!!this.fragments[c]},f.removeFragmentsInRange=function(a,c,s){var d=this;Object.keys(this.fragments).forEach(function(i){var t=d.fragments[i];if(!t)return;if(t.buffered){var n=t.body;n.type===s&&n.start<c&&n.end>a&&d.removeFragment(n)}})},f.removeFragment=function(a){var c=u(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 w(p){var f,o;return p.buffered&&(((f=p.range.video)===null||f===void 0?void 0:f.partial)||((o=p.range.audio)===null||o===void 0?void 0:o.partial))}function u(p){return p.type+"_"+p.level+"_"+p.urlId+"_"+p.sn}},"./src/controller/gap-controller.ts":function(re,$,U){"use strict";U.r($),U.d($,"STALL_MINIMUM_DURATION_MS",function(){return w}),U.d($,"MAX_START_GAP_JUMP",function(){return u}),U.d($,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return p}),U.d($,"SKIP_BUFFER_RANGE_START",function(){return f}),U.d($,"default",function(){return o});var S=U("./src/utils/buffer-helper.ts"),P=U("./src/errors.ts"),E=U("./src/events.ts"),C=U("./src/utils/logger.ts"),w=250,u=2,p=.1,f=.05,o=function(){function a(s,d,i,t){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=s,this.media=d,this.fragmentTracker=i,this.hls=t}var c=a.prototype;return c.destroy=function(){this.hls=this.fragmentTracker=this.media=null},c.poll=function(d){var i=this.config,t=this.media,n=this.stalled,h=t.currentTime,v=t.seeking,b=this.seeking&&!v,y=!this.seeking&&v;if(this.seeking=v,h!==d){if(this.moved=!0,n!==null){if(this.stallReported){var _=self.performance.now()-n;C.logger.warn("playback not stuck anymore @"+h+", after "+Math.round(_)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((y||b)&&(this.stalled=null),t.paused||t.ended||t.playbackRate===0||!S.BufferHelper.getBuffered(t).length)return;var m=S.BufferHelper.bufferInfo(t,h,0),g=m.len>0,x=m.nextStart||0;if(!g&&!x)return;if(v){var l=m.len>u,T=!x||x-h>u&&!this.fragmentTracker.getPartialFragment(h);if(l||T)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var A,O=Math.max(x,m.start||0)-h,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,j=I?D.details.targetduration*2:u;if(O>0&&O<=j){this._trySkipBufferHole(null);return}}var B=self.performance.now();if(n===null){this.stalled=B;return}var ee=B-n;!v&&ee>=w&&this._reportStall(m.len);var F=S.BufferHelper.bufferInfo(t,h,i.maxBufferHole);this._tryFixBufferStall(F,ee)},c._tryFixBufferStall=function(d,i){var t=this.config,n=this.fragmentTracker,h=this.media,v=h.currentTime,b=n.getPartialFragment(v);if(b){var y=this._trySkipBufferHole(b);if(y)return}d.len>t.maxBufferHole&&i>t.highBufferWatchdogPeriod*1e3&&(C.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},c._reportStall=function(d){var i=this.hls,t=this.media,n=this.stallReported;n||(this.stallReported=!0,C.logger.warn("Playback stalling at @"+t.currentTime+" due to low buffer (buffer="+d+")"),i.trigger(E.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:d}))},c._trySkipBufferHole=function(d){for(var i=this.config,t=this.hls,n=this.media,h=n.currentTime,v=0,b=S.BufferHelper.getBuffered(n),y=0;y<b.length;y++){var _=b.start(y);if(h+i.maxBufferHole>=v&&h<_){var m=Math.max(_+f,n.currentTime+p);return C.logger.warn("skipping hole, adjusting currentTime from "+h+" to "+m),this.moved=!0,this.stalled=null,n.currentTime=m,d&&t.trigger(E.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+h+" to "+m,frag:d}),m}v=b.end(y)}return 0},c._tryNudgeBuffer=function(){var d=this.config,i=this.hls,t=this.media,n=t.currentTime,h=(this.nudgeRetry||0)+1;if(this.nudgeRetry=h,h<d.nudgeMaxRetry){var v=n+h*d.nudgeOffset;C.logger.warn("Nudging 'currentTime' from "+n+" to "+v),t.currentTime=v,i.trigger(E.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 @"+n+" after "+d.nudgeMaxRetry+" nudges"),i.trigger(E.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},a}()},"./src/controller/id3-track-controller.ts":function(re,$,U){"use strict";U.r($);var S=U("./src/events.ts"),P=U("./src/utils/texttrack-utils.ts"),E=U("./src/demux/id3.ts"),C=.25,w=function(){function u(f){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=f,this._registerListeners()}var p=u.prototype;return p.destroy=function(){this._unregisterListeners()},p._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.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),o.on(S.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},p._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.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),o.off(S.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},p.onMediaAttached=function(o,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(o){if(!this.media)return;for(var a=0;a<o.length;a++){var c=o[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(o,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 d=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,i=0;i<s.length;i++){var t=E.getID3Frames(s[i].data);if(t){var n=s[i].pts,h=i<s.length-1?s[i+1].pts:c.end,v=h-n;v<=0&&(h=n+C);for(var b=0;b<t.length;b++){var y=t[b];if(!E.isTimeStampFrame(y)){var _=new d(n,h,"");_.value=y,this.id3Track.addCue(_)}}}}},p.onBufferFlushing=function(o,a){var c=a.startOffset,s=a.endOffset,d=a.type;if(!d||d==="audio"){var i=this.id3Track;i&&Object(P.removeCuesInRange)(i,c,s)}},u}();$.default=w},"./src/controller/latency-controller.ts":function(re,$,U){"use strict";U.r($),U.d($,"default",function(){return u});var S=U("./src/errors.ts"),P=U("./src/events.ts"),E=U("./src/utils/logger.ts");function C(p,f){for(var o=0;o<f.length;o++){var a=f[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(p,a.key,a)}}function w(p,f,o){return f&&C(p.prototype,f),o&&C(p,o),p}var u=function(){function p(o){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=o,this.config=o.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!==S.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,E.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 d=this.config,i=d.lowLatencyMode,t=d.maxLiveSyncPlaybackRate;if(!i||t===1)return;var n=this.targetLatency;if(n===null)return;var h=s-n,v=Math.min(this.maxLatency,n+c.targetduration),b=h<v;if(c.live&&b&&h>.05&&this.forwardBufferLength>1){var y=Math.min(2,Math.max(1,t)),_=Math.round(2/(1+Math.exp(-.75*h-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},w(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,d=a.targetduration,i=this.config,t=i.liveSyncDuration,n=i.liveSyncDurationCount,h=i.lowLatencyMode,v=this.hls.userConfig,b=h&&s||c;(v.liveSyncDuration||v.liveSyncDurationCount||b===0)&&(b=t!==void 0?t:n*d);var y=d,_=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 d=s.edge,i=a-c-this.edgeStalled,t=d-s.totalduration,n=d-(this.config.lowLatencyMode&&s.partTarget||s.targetduration);return Math.min(Math.max(t,i),n)}},{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(re,$,U){"use strict";U.r($),U.d($,"default",function(){return i});var S=U("./src/types/level.ts"),P=U("./src/events.ts"),E=U("./src/errors.ts"),C=U("./src/utils/codecs.ts"),w=U("./src/controller/level-helper.ts"),u=U("./src/controller/base-playlist-controller.ts"),p=U("./src/types/loader.ts");function f(){return f=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var h=arguments[n];for(var v in h)Object.prototype.hasOwnProperty.call(h,v)&&(t[v]=h[v])}return t},f.apply(this,arguments)}function o(t,n){for(var h=0;h<n.length;h++){var v=n[h];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(t,v.key,v)}}function a(t,n,h){return n&&o(t.prototype,n),h&&o(t,h),t}function c(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n)}function s(t,n){return s=Object.setPrototypeOf||function(v,b){return v.__proto__=b,v},s(t,n)}var d=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),i=function(t){c(n,t);function n(v){var b;return b=t.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 h=n.prototype;return h._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)},h._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)},h.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,t.prototype.destroy.call(this)},h.startLoad=function(){var b=this._levels;b.forEach(function(y){y.loadError=0}),t.prototype.startLoad.call(this)},h.onManifestLoaded=function(b,y){var _=[],m=[],g=[],x,l={},T,A=!1,O=!1,D=!1;if(y.levels.forEach(function(ee){var F=ee.attrs;A=A||!!(ee.width&&ee.height),O=O||!!ee.videoCodec,D=D||!!ee.audioCodec,d&&ee.audioCodec&&ee.audioCodec.indexOf("mp4a.40.34")!==-1&&(ee.audioCodec=void 0);var G=ee.bitrate+"-"+ee.attrs.RESOLUTION+"-"+ee.attrs.CODECS;T=l[G],T?T.url.push(ee.url):(T=new S.Level(ee),l[G]=T,_.push(T)),F&&(F.AUDIO&&Object(w.addGroupId)(T,"audio",F.AUDIO),F.SUBTITLES&&Object(w.addGroupId)(T,"text",F.SUBTITLES))}),(A||O)&&D&&(_=_.filter(function(ee){var F=ee.videoCodec,G=ee.width,X=ee.height;return!!F||!!(G&&X)})),_=_.filter(function(ee){var F=ee.audioCodec,G=ee.videoCodec;return(!F||Object(C.isCodecSupportedInMp4)(F,"audio"))&&(!G||Object(C.isCodecSupportedInMp4)(G,"video"))}),y.audioTracks&&(m=y.audioTracks.filter(function(ee){return!ee.audioCodec||Object(C.isCodecSupportedInMp4)(ee.audioCodec,"audio")}),Object(w.assignTrackIdsByGroup)(m)),y.subtitles&&(g=y.subtitles,Object(w.assignTrackIdsByGroup)(g)),_.length>0){x=_[0].bitrate,_.sort(function(ee,F){return ee.bitrate-F.bitrate}),this._levels=_;for(var I=0;I<_.length;I++)if(_[I].bitrate===x){this._firstLevel=I,this.log("manifest loaded, "+_.length+" level(s) found, first bitrate: "+x);break}var j=D&&!O,B={levels:_,audioTracks:m,subtitleTracks:g,firstLevel:this._firstLevel,stats:y.stats,audio:D,video:O,altAudio:!j&&m.some(function(ee){return!!ee.url})};this.hls.trigger(P.Events.MANIFEST_PARSED,B),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(P.Events.ERROR,{type:E.ErrorTypes.MEDIA_ERROR,details:E.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:y.url,reason:"no level with compatible codecs found in manifest"})},h.onError=function(b,y){if(t.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,x=!0,l;switch(y.details){case E.ErrorDetails.FRAG_LOAD_ERROR:case E.ErrorDetails.FRAG_LOAD_TIMEOUT:case E.ErrorDetails.KEY_LOAD_ERROR:case E.ErrorDetails.KEY_LOAD_TIMEOUT:if(y.frag){var T=this._levels[y.frag.level];T?(T.fragmentError++,T.fragmentError>this.hls.config.fragLoadingMaxRetry&&(l=y.frag.level)):l=y.frag.level}break;case E.ErrorDetails.LEVEL_LOAD_ERROR:case E.ErrorDetails.LEVEL_LOAD_TIMEOUT:_&&(_.deliveryDirectives&&(x=!1),l=_.level),g=!0;break;case E.ErrorDetails.REMUX_ALLOC_ERROR:l=y.level,g=!0;break}l!==void 0&&this.recoverLevel(y,l,g,x)},h.recoverLevel=function(b,y,_,m){var g=b.details,x=this._levels[y];if(x.loadError++,_){var l=this.retryLoadingOrFail(b);if(l)b.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(m){var T=x.url.length;if(T>1&&x.loadError<T)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)}}},h.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}},h.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)}},h.onLevelLoaded=function(b,y){var _,m=y.level,g=y.details,x=this._levels[m];if(!x){var l;this.warn("Invalid level index "+m),(l=y.deliveryDirectives)!==null&&l!==void 0&&l.skip&&(g.deltaUpdateFailed=!0);return}m===this.currentLevelIndex?(x.fragmentError===0&&(x.loadError=0,this.retryCount=0),this.playlistLoaded(m,y,x.details)):(_=y.deliveryDirectives)!==null&&_!==void 0&&_.skip&&(g.deltaUpdateFailed=!0)},h.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,x=0;x<_.audioGroupIds.length;x++)if(_.audioGroupIds[x]===g){m=x;break}m!==_.urlId&&(_.urlId=m,this.startLoad())}},h.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(x){this.warn("Could not construct new URL with HLS Delivery Directives: "+x)}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})}},h.removeLevel=function(b,y){var _=function(x,l){return l!==y},m=this._levels.filter(function(g,x){return x!==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,x){var l=g.details;return l!=null&&l.fragments&&l.fragments.forEach(function(T){T.level=x}),g});this._levels=m,this.hls.trigger(P.Events.LEVELS_UPDATED,{levels:m})},a(n,[{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:E.ErrorTypes.OTHER_ERROR,details:E.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,x=_[g],l=_[b];this.log("switching to level "+b+" from "+g),this.currentLevelIndex=b;var T=f({},l,{level:b,maxBitrate:l.maxBitrate,uri:l.uri,urlId:l.urlId});delete T._urlId,this.hls.trigger(P.Events.LEVEL_SWITCHING,T);var A=l.details;if(!A||A.live){var O=this.switchParams(l.uri,x==null?void 0:x.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)}}]),n}(u.default)},"./src/controller/level-helper.ts":function(re,$,U){"use strict";U.r($),U.d($,"addGroupId",function(){return E}),U.d($,"assignTrackIdsByGroup",function(){return C}),U.d($,"updatePTS",function(){return w}),U.d($,"updateFragPTSDTS",function(){return p}),U.d($,"mergeDetails",function(){return f}),U.d($,"mapPartIntersection",function(){return o}),U.d($,"mapFragmentIntersection",function(){return a}),U.d($,"adjustSliding",function(){return c}),U.d($,"addSliding",function(){return s}),U.d($,"computeReloadInterval",function(){return d}),U.d($,"getFragmentWithSN",function(){return i}),U.d($,"getPartWith",function(){return t});var S=U("./src/polyfills/number.ts"),P=U("./src/utils/logger.ts");function E(n,h,v){switch(h){case"audio":n.audioGroupIds||(n.audioGroupIds=[]),n.audioGroupIds.push(v);break;case"text":n.textGroupIds||(n.textGroupIds=[]),n.textGroupIds.push(v);break}}function C(n){var h={};n.forEach(function(v){var b=v.groupId||"";v.id=h[b]=h[b]||0,h[b]++})}function w(n,h,v){var b=n[h],y=n[v];u(b,y)}function u(n,h){var v=h.startPTS;if(Object(S.isFiniteNumber)(v)){var b=0,y;h.sn>n.sn?(b=v-n.start,y=n):(b=n.start-v,y=h),y.duration!==b&&(y.duration=b)}else if(h.sn>n.sn){var _=n.cc===h.cc;_&&n.minEndPTS?h.start=n.start+(n.minEndPTS-n.start):h.start=n.start+n.duration}else h.start=Math.max(n.start-h.duration,0)}function p(n,h,v,b,y,_){var m=b-v;m<=0&&(P.logger.warn("Fragment should have a positive duration",h),b=v+h.duration,_=y+h.duration);var g=v,x=b,l=h.startPTS,T=h.endPTS;if(Object(S.isFiniteNumber)(l)){var A=Math.abs(l-v);Object(S.isFiniteNumber)(h.deltaPTS)?h.deltaPTS=Math.max(A,h.deltaPTS):h.deltaPTS=A,g=Math.max(v,l),v=Math.min(v,l),y=Math.min(y,h.startDTS),x=Math.min(b,T),b=Math.max(b,T),_=Math.max(_,h.endDTS)}h.duration=b-v;var O=v-h.start;h.appendedPTS=b,h.start=h.startPTS=v,h.maxStartPTS=g,h.startDTS=y,h.endPTS=b,h.minEndPTS=x,h.endDTS=_;var D=h.sn;if(!n||D<n.startSN||D>n.endSN)return 0;var I,j=D-n.startSN,B=n.fragments;for(B[j]=h,I=j;I>0;I--)u(B[I],B[I-1]);for(I=j;I<B.length-1;I++)u(B[I],B[I+1]);return n.fragmentHint&&u(B[B.length-1],n.fragmentHint),n.PTSKnown=n.alignedSliding=!0,O}function f(n,h){for(var v=null,b=n.fragments,y=b.length-1;y>=0;y--){var _=b[y].initSegment;if(_){v=_;break}}n.fragmentHint&&delete n.fragmentHint.endPTS;var m=0,g;if(a(n,h,function(I,j){I.relurl&&(m=I.cc-j.cc),Object(S.isFiniteNumber)(I.startPTS)&&Object(S.isFiniteNumber)(I.endPTS)&&(j.start=j.startPTS=I.startPTS,j.startDTS=I.startDTS,j.appendedPTS=I.appendedPTS,j.maxStartPTS=I.maxStartPTS,j.endPTS=I.endPTS,j.endDTS=I.endDTS,j.minEndPTS=I.minEndPTS,j.duration=I.endPTS-I.startPTS,j.duration&&(g=j),h.PTSKnown=h.alignedSliding=!0),j.elementaryStreams=I.elementaryStreams,j.loader=I.loader,j.stats=I.stats,j.urlId=I.urlId,I.initSegment&&(j.initSegment=I.initSegment,v=I.initSegment)}),v){var x=h.fragmentHint?h.fragments.concat(h.fragmentHint):h.fragments;x.forEach(function(I){var j;(!I.initSegment||I.initSegment.relurl===((j=v)===null||j===void 0?void 0:j.relurl))&&(I.initSegment=v)})}if(h.skippedSegments&&(h.deltaUpdateFailed=h.fragments.some(function(I){return!I}),h.deltaUpdateFailed)){P.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var l=h.skippedSegments;l--;)h.fragments.shift();h.startSN=h.fragments[0].sn,h.startCC=h.fragments[0].cc}var T=h.fragments;if(m){P.logger.warn("discontinuity sliding from playlist, take drift into account");for(var A=0;A<T.length;A++)T[A].cc+=m}h.skippedSegments&&(h.startCC=h.fragments[0].cc),o(n.partList,h.partList,function(I,j){j.elementaryStreams=I.elementaryStreams,j.stats=I.stats}),g?p(h,g,g.startPTS,g.endPTS,g.startDTS,g.endDTS):c(n,h),T.length&&(h.totalduration=h.edge-T[0].start),h.driftStartTime=n.driftStartTime,h.driftStart=n.driftStart;var O=h.advancedDateTime;if(h.advanced&&O){var D=h.edge;h.driftStart||(h.driftStartTime=O,h.driftStart=D),h.driftEndTime=O,h.driftEnd=D}else h.driftEndTime=n.driftEndTime,h.driftEnd=n.driftEnd,h.advancedDateTime=n.advancedDateTime}function o(n,h,v){if(n&&h)for(var b=0,y=0,_=n.length;y<=_;y++){var m=n[y],g=h[y+b];m&&g&&m.index===g.index&&m.fragment.sn===g.fragment.sn?v(m,g):b--}}function a(n,h,v){for(var b=h.skippedSegments,y=Math.max(n.startSN,h.startSN)-h.startSN,_=(n.fragmentHint?1:0)+(b?h.endSN:Math.min(n.endSN,h.endSN))-h.startSN,m=h.startSN-n.startSN,g=h.fragmentHint?h.fragments.concat(h.fragmentHint):h.fragments,x=n.fragmentHint?n.fragments.concat(n.fragmentHint):n.fragments,l=y;l<=_;l++){var T=x[m+l],A=g[l];b&&!A&&l<b&&(A=h.fragments[l]=T),T&&A&&v(T,A)}}function c(n,h){var v=h.startSN+h.skippedSegments-n.startSN,b=n.fragments;if(v<0||v>=b.length)return;s(h,b[v].start)}function s(n,h){if(h){for(var v=n.fragments,b=n.skippedSegments;b<v.length;b++)v[b].start+=h;n.fragmentHint&&(n.fragmentHint.start+=h)}}function d(n,h){var v=1e3*n.levelTargetDuration,b=v/2,y=n.age,_=y>0&&y<v*3,m=h.loading.end-h.loading.start,g,x=n.availabilityDelay;if(n.updated===!1)if(_){var l=333*n.misses;g=Math.max(Math.min(b,m*2),l),n.availabilityDelay=(n.availabilityDelay||0)+g}else g=b;else _?(x=Math.min(x||v/2,y),n.availabilityDelay=x,g=x+v-y):g=v-m;return Math.round(g)}function i(n,h,v){if(!n||!n.details)return null;var b=n.details,y=b.fragments[h-b.startSN];return y||(y=b.fragmentHint,y&&y.sn===h?y:h<b.startSN&&v&&v.sn===h?v:null)}function t(n,h,v){if(!n||!n.details)return null;var b=n.details.partList;if(b)for(var y=b.length;y--;){var _=b[y];if(_.index===v&&_.fragment.sn===h)return _}return null}},"./src/controller/stream-controller.ts":function(re,$,U){"use strict";U.r($),U.d($,"default",function(){return b});var S=U("./src/polyfills/number.ts"),P=U("./src/controller/base-stream-controller.ts"),E=U("./src/is-supported.ts"),C=U("./src/events.ts"),w=U("./src/utils/buffer-helper.ts"),u=U("./src/controller/fragment-tracker.ts"),p=U("./src/types/loader.ts"),f=U("./src/loader/fragment.ts"),o=U("./src/demux/transmuxer-interface.ts"),a=U("./src/types/transmuxer.ts"),c=U("./src/controller/gap-controller.ts"),s=U("./src/errors.ts"),d=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 t(y,_,m){return _&&i(y.prototype,_),m&&i(y,m),y}function n(y,_){y.prototype=Object.create(_.prototype),y.prototype.constructor=y,h(y,_)}function h(y,_){return h=Object.setPrototypeOf||function(g,x){return g.__proto__=x,g},h(y,_)}var v=100,b=function(y){n(_,y);function _(g,x){var l;return l=y.call(this,g,x,"[stream-controller]")||this,l.audioCodecSwap=!1,l.gapController=null,l.level=-1,l._forceStartLoad=!1,l.altAudio=!1,l.audioOnly=!1,l.fragPlaying=null,l.onvplaying=null,l.onvseeked=null,l.fragLastKbps=0,l.stalled=!1,l.couldBacktrack=!1,l.audioCodecSwitch=!1,l.videoBuffer=null,l._registerListeners(),l}var m=_.prototype;return m._registerListeners=function(){var x=this.hls;x.on(C.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.on(C.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.on(C.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.on(C.Events.MANIFEST_PARSED,this.onManifestParsed,this),x.on(C.Events.LEVEL_LOADING,this.onLevelLoading,this),x.on(C.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.on(C.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),x.on(C.Events.ERROR,this.onError,this),x.on(C.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),x.on(C.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),x.on(C.Events.BUFFER_CREATED,this.onBufferCreated,this),x.on(C.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),x.on(C.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),x.on(C.Events.FRAG_BUFFERED,this.onFragBuffered,this)},m._unregisterListeners=function(){var x=this.hls;x.off(C.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.off(C.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.off(C.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.off(C.Events.MANIFEST_PARSED,this.onManifestParsed,this),x.off(C.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.off(C.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),x.off(C.Events.ERROR,this.onError,this),x.off(C.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),x.off(C.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),x.off(C.Events.BUFFER_CREATED,this.onBufferCreated,this),x.off(C.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),x.off(C.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),x.off(C.Events.FRAG_BUFFERED,this.onFragBuffered,this)},m.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},m.startLoad=function(x){if(this.levels){var l=this.lastCurrentTime,T=this.hls;if(this.stopLoad(),this.setInterval(v),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var A=T.startLevel;A===-1&&(T.config.testBandwidth?(A=0,this.bitrateTest=!0):A=T.nextAutoLevel),this.level=T.nextLoadLevel=A,this.loadedmetadata=!1}l>0&&x===-1&&(this.log("Override startPosition with lastCurrentTime @"+l.toFixed(3)),x=l),this.state=P.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=x,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 x,l=this.levels,T=this.level,A=l==null||((x=l[T])===null||x===void 0)?void 0:x.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 x,l,T=this.hls,A=this.levelLastLoaded,O=this.levels,D=this.media,I=T.config,j=T.nextLoadLevel;if(A===null||!D&&(this.startFragRequested||!I.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!O||!O[j])return;var B=O[j];this.level=T.nextLoadLevel=j;var ee=B.details;if(!ee||this.state===P.State.WAITING_LEVEL||ee.live&&this.levelLastLoaded!==j){this.state=P.State.WAITING_LEVEL;return}var F=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:D,p.PlaylistLevelType.MAIN);if(F===null)return;var G=F.len,X=this.getMaxBufferLength(B.maxBitrate);if(G>=X)return;if(this._streamEnded(F,ee)){var Z={};this.altAudio&&(Z.type="video"),this.hls.trigger(C.Events.BUFFER_EOS,Z),this.state=P.State.ENDED;return}var K=F.end,q=this.getNextFragment(K,ee);if(this.couldBacktrack&&!this.fragPrevious&&q&&q.sn!=="initSegment"){var ae=q.sn-ee.startSN;ae>1&&(q=ee.fragments[ae-1],this.fragmentTracker.removeFragment(q))}if(q&&this.fragmentTracker.getState(q)===u.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,ee)}if(!q)return;q.initSegment&&!q.initSegment.data&&!this.bitrateTest&&(q=q.initSegment),((x=q.decryptdata)===null||x===void 0?void 0:x.keyFormat)==="identity"&&!((l=q.decryptdata)!==null&&l!==void 0&&l.key)?this.loadKey(q,ee):this.loadFragment(q,ee,K)},m.loadFragment=function(x,l,T){var A,O=this.fragmentTracker.getState(x);if(this.fragCurrent=x,O===u.FragmentState.BACKTRACKED){var D=this.fragmentTracker.getBacktrackData(x);if(D){this._handleFragmentLoadProgress(D),this._handleFragmentLoadComplete(D);return}else O=u.FragmentState.NOT_LOADED}O===u.FragmentState.NOT_LOADED||O===u.FragmentState.PARTIAL?x.sn==="initSegment"?this._loadInitSegment(x):this.bitrateTest?(x.bitrateTest=!0,this.log("Fragment "+x.sn+" of level "+x.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(x)):(this.startFragRequested=!0,y.prototype.loadFragment.call(this,x,l,T)):O===u.FragmentState.APPENDING?this.reduceMaxBufferLength(x.duration)&&this.fragmentTracker.removeFragment(x):((A=this.media)===null||A===void 0?void 0:A.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},m.getAppendedFrag=function(x){var l=this.fragmentTracker.getAppendedFrag(x,p.PlaylistLevelType.MAIN);return l&&"fragment"in l?l.fragment:l},m.getBufferedFrag=function(x){return this.fragmentTracker.getBufferedFrag(x,p.PlaylistLevelType.MAIN)},m.followingBufferedFrag=function(x){return x?this.getBufferedFrag(x.end+.5):null},m.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},m.nextLevelSwitch=function(){var x=this.levels,l=this.media;if(l!=null&&l.readyState){var T,A=this.getAppendedFrag(l.currentTime);if(A&&A.start>1&&this.flushMainBuffer(0,A.start-1),!l.paused&&x){var O=this.hls.nextLoadLevel,D=x[O],I=this.fragLastKbps;I&&this.fragCurrent?T=this.fragCurrent.duration*D.maxBitrate/(1e3*I)+1:T=0}else T=0;var j=this.getBufferedFrag(l.currentTime+T);if(j){var B=this.followingBufferedFrag(j);if(B){this.abortCurrentFrag();var ee=B.maxStartPTS?B.maxStartPTS:B.start,F=B.duration,G=Math.max(j.end,ee+Math.min(Math.max(F-this.config.maxFragLookUpTolerance,F*.5),F*.75));this.flushMainBuffer(G,Number.POSITIVE_INFINITY)}}}},m.abortCurrentFrag=function(){var x=this.fragCurrent;this.fragCurrent=null,x!=null&&x.loader&&x.loader.abort(),this.state===P.State.KEY_LOADING&&(this.state=P.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},m.flushMainBuffer=function(x,l){y.prototype.flushMainBuffer.call(this,x,l,this.altAudio?"video":null)},m.onMediaAttached=function(x,l){y.prototype.onMediaAttached.call(this,x,l);var T=l.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),T.addEventListener("playing",this.onvplaying),T.addEventListener("seeked",this.onvseeked),this.gapController=new c.default(this.config,T,this.fragmentTracker,this.hls)},m.onMediaDetaching=function(){var x=this.media;x&&(x.removeEventListener("playing",this.onvplaying),x.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),y.prototype.onMediaDetaching.call(this)},m.onMediaPlaying=function(){this.tick()},m.onMediaSeeked=function(){var x=this.media,l=x?x.currentTime:null;Object(S.isFiniteNumber)(l)&&this.log("Media seeked to "+l.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(x,l){var T=!1,A=!1,O;l.levels.forEach(function(D){O=D.audioCodec,O&&(O.indexOf("mp4a.40.2")!==-1&&(T=!0),O.indexOf("mp4a.40.5")!==-1&&(A=!0))}),this.audioCodecSwitch=T&&A&&!Object(E.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=l.levels,this.startFragRequested=!1},m.onLevelLoading=function(x,l){var T=this.levels;if(!T||this.state!==P.State.IDLE)return;var A=T[l.level];(!A.details||A.details.live&&this.levelLastLoaded!==l.level||this.waitForCdnTuneIn(A.details))&&(this.state=P.State.WAITING_LEVEL)},m.onLevelLoaded=function(x,l){var T,A=this.levels,O=l.level,D=l.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 j=this.fragCurrent;j&&(this.state===P.State.FRAG_LOADING||this.state===P.State.FRAG_LOADING_WAITING_RETRY)&&(j.level!==l.level&&j.loader&&(this.state=P.State.IDLE,j.loader.abort()));var B=A[O],ee=0;if(D.live||(T=B.details)!==null&&T!==void 0&&T.live){if(D.fragments[0]||(D.deltaUpdateFailed=!0),D.deltaUpdateFailed)return;ee=this.alignPlaylists(D,B.details)}if(B.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,ee),this.tick()},m._handleFragmentLoadProgress=function(x){var l,T=x.frag,A=x.part,O=x.payload,D=this.levels;if(!D){this.warn("Levels were reset while fragment load was in progress. Fragment "+T.sn+" of level "+T.level+" will not be buffered");return}var I=D[T.level],j=I.details;if(!j){this.warn("Dropping fragment "+T.sn+" of level "+T.level+" after level details were reset");return}var B=I.videoCodec,ee=j.PTSKnown||!j.live,F=(l=T.initSegment)===null||l===void 0?void 0:l.data,G=this._getAudioCodec(I),X=this.transmuxer=this.transmuxer||new o.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(T.level,T.sn,T.stats.chunkCount,O.byteLength,Z,K),ae=this.initPTS[T.cc];X.push(O,F,G,B,T,A,j.totalduration,ee,q,ae)},m.onAudioTrackSwitching=function(x,l){var T=this.altAudio,A=!!l.url,O=l.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;T&&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(x,l){var T=l.id,A=!!this.hls.audioTracks[T].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(x,l){var T=l.tracks,A,O,D=!1;for(var I in T){var j=T[I];if(j.id==="main"){if(O=I,A=j,I==="video"){var B=T[I];B&&(this.videoBuffer=B.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(x,l){var T=l.frag,A=l.part;if(T&&T.type!==p.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(T)){this.warn("Fragment "+T.sn+(A?" p: "+A.index:"")+" of level "+T.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:T.stats;this.fragLastKbps=Math.round(8*O.total/(O.buffering.end-O.loading.first)),T.sn!=="initSegment"&&(this.fragPrevious=T),this.fragBufferedComplete(T,A)},m.onError=function(x,l){switch(l.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,l);break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==P.State.ERROR&&(l.fatal?(this.warn(""+l.details),this.state=P.State.ERROR):!l.levelRetry&&this.state===P.State.WAITING_LEVEL&&(this.state=P.State.IDLE));break;case s.ErrorDetails.BUFFER_FULL_ERROR:if(l.parent==="main"&&(this.state===P.State.PARSING||this.state===P.State.PARSED)){var T=!0,A=this.getFwdBufferInfo(this.media,p.PlaylistLevelType.MAIN);A&&A.len>.5&&(T=!this.reduceMaxBufferLength(A.len)),T&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},m.checkBuffer=function(){var x=this.media,l=this.gapController;if(!x||!l||!x.readyState)return;var T=w.BufferHelper.getBuffered(x);!this.loadedmetadata&&T.length?(this.loadedmetadata=!0,this.seekToStartPos()):l.poll(this.lastCurrentTime),this.lastCurrentTime=x.currentTime},m.onFragLoadEmergencyAborted=function(){this.state=P.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},m.onBufferFlushed=function(x,l){var T=l.type;if(T!==f.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var A=(T===f.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(A,T,p.PlaylistLevelType.MAIN)}},m.onLevelsUpdated=function(x,l){this.levels=l.levels},m.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},m.seekToStartPos=function(){var x=this.media,l=x.currentTime,T=this.startPosition;if(T>=0&&l<T){if(x.seeking){d.logger.log("could not seek to "+T+", already seeking at "+l);return}var A=w.BufferHelper.getBuffered(x),O=A.length?A.start(0):0,D=O-T;D>0&&(D<this.config.maxBufferHole||D<this.config.maxFragLookUpTolerance)&&(d.logger.log("adjusting start position by "+D+" to match buffer start"),T+=D,this.startPosition=T),this.log("seek to target start position "+T+" from current time "+l),x.currentTime=T}},m._getAudioCodec=function(x){var l=this.config.defaultAudioCodec||x.audioCodec;return this.audioCodecSwap&&l&&(this.log("Swapping audio codec"),l.indexOf("mp4a.40.5")!==-1?l="mp4a.40.2":l="mp4a.40.5"),l},m._loadBitrateTestFrag=function(x){var l=this;this._doFragLoad(x).then(function(T){var A=l.hls;if(!T||A.nextLoadLevel||l.fragContextChanged(x))return;l.fragLoadError=0,l.state=P.State.IDLE,l.startFragRequested=!1,l.bitrateTest=!1;var O=x.stats;O.parsing.start=O.parsing.end=O.buffering.start=O.buffering.end=self.performance.now(),A.trigger(C.Events.FRAG_LOADED,T)})},m._handleTransmuxComplete=function(x){var l,T="main",A=this.hls,O=x.remuxResult,D=x.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 j=I.frag,B=I.part,ee=I.level,F=O.video,G=O.text,X=O.id3,Z=O.initSegment,K=this.altAudio?void 0:O.audio;if(this.fragContextChanged(j))return;if(this.state=P.State.PARSING,Z){Z.tracks&&(this._bufferInitSegment(ee,Z.tracks,j,D),A.trigger(C.Events.FRAG_PARSING_INIT_SEGMENT,{frag:j,id:T,tracks:Z.tracks}));var q=Z.initPTS,ae=Z.timescale;Object(S.isFiniteNumber)(q)&&(this.initPTS[j.cc]=q,A.trigger(C.Events.INIT_PTS_FOUND,{frag:j,id:T,initPTS:q,timescale:ae}))}if(F&&O.independent!==!1){if(ee.details){var oe=F.startPTS,ve=F.endPTS,he=F.startDTS,_e=F.endDTS;if(B)B.elementaryStreams[F.type]={startPTS:oe,endPTS:ve,startDTS:he,endDTS:_e};else if(F.firstKeyFrame&&F.independent&&(this.couldBacktrack=!0),F.dropped&&F.independent){var fe=this.getLoadPosition()+this.config.maxBufferHole;if(fe<oe){this.backtrack(j);return}j.setElementaryStreamInfo(F.type,j.start,ve,j.start,_e,!0)}j.setElementaryStreamInfo(F.type,oe,ve,he,_e),this.bufferFragmentData(F,j,B,D)}}else if(O.independent===!1){this.backtrack(j);return}if(K){var xe=K.startPTS,je=K.endPTS,Le=K.startDTS,ke=K.endDTS;B&&(B.elementaryStreams[f.ElementaryStreamTypes.AUDIO]={startPTS:xe,endPTS:je,startDTS:Le,endDTS:ke}),j.setElementaryStreamInfo(f.ElementaryStreamTypes.AUDIO,xe,je,Le,ke),this.bufferFragmentData(K,j,B,D)}if(X!=null&&(l=X.samples)!==null&&l!==void 0&&l.length){var Fe={frag:j,id:T,samples:X.samples};A.trigger(C.Events.FRAG_PARSING_METADATA,Fe)}if(G){var ge={frag:j,id:T,samples:G.samples};A.trigger(C.Events.FRAG_PARSING_USERDATA,ge)}},m._bufferInitSegment=function(x,l,T,A){var O=this;if(this.state!==P.State.PARSING)return;this.audioOnly=!!l.audio&&!l.video,this.altAudio&&!this.audioOnly&&delete l.audio;var D=l.audio,I=l.video,j=l.audiovideo;if(D){var B=x.audioCodec,ee=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(B&&(B.indexOf("mp4a.40.5")!==-1?B="mp4a.40.2":B="mp4a.40.5"),D.metadata.channelCount!==1&&ee.indexOf("firefox")===-1&&(B="mp4a.40.5")),ee.indexOf("android")!==-1&&D.container!=="audio/mpeg"&&(B="mp4a.40.2",this.log("Android: force audio codec to "+B)),x.audioCodec&&x.audioCodec!==B&&this.log('Swapping manifest audio codec "'+x.audioCodec+'" for "'+B+'"'),D.levelCodec=B,D.id="main",this.log("Init audio buffer, container:"+D.container+", codecs[selected/level/parsed]=["+(B||"")+"/"+(x.audioCodec||"")+"/"+D.codec+"]")}I&&(I.levelCodec=x.videoCodec,I.id="main",this.log("Init video buffer, container:"+I.container+", codecs[level/parsed]=["+(x.videoCodec||"")+"/"+I.codec+"]")),j&&this.log("Init audiovideo buffer, container:"+j.container+", codecs[level/parsed]=["+(x.attrs.CODECS||"")+"/"+j.codec+"]"),this.hls.trigger(C.Events.BUFFER_CODECS,l),Object.keys(l).forEach(function(F){var G=l[F],X=G.initSegment;X!=null&&X.byteLength&&O.hls.trigger(C.Events.BUFFER_APPENDING,{type:F,data:X,frag:T,part:null,chunkMeta:A,parent:T.type})}),this.tick()},m.backtrack=function(x){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(x);var l=this.fragmentTracker.backtrack(x);this.fragPrevious=null,this.nextLoadPosition=x.start,l?this.resetFragmentLoading(x):this.state=P.State.BACKTRACKING},m.checkFragmentChanged=function(){var x=this.media,l=null;if(x&&x.readyState>1&&x.seeking===!1){var T=x.currentTime;if(w.BufferHelper.isBuffered(x,T)?l=this.getAppendedFrag(T):w.BufferHelper.isBuffered(x,T+.1)&&(l=this.getAppendedFrag(T+.1)),l){var A=this.fragPlaying,O=l.level;(!A||l.sn!==A.sn||A.level!==O||l.urlId!==A.urlId)&&(this.hls.trigger(C.Events.FRAG_CHANGED,{frag:l}),(!A||A.level!==O)&&this.hls.trigger(C.Events.LEVEL_SWITCHED,{level:O}),this.fragPlaying=l)}}},t(_,[{key:"nextLevel",get:function(){var x=this.nextBufferedFrag;return x?x.level:-1}},{key:"currentLevel",get:function(){var x=this.media;if(x){var l=this.getAppendedFrag(x.currentTime);if(l)return l.level}return-1}},{key:"nextBufferedFrag",get:function(){var x=this.media;if(x){var l=this.getAppendedFrag(x.currentTime);return this.followingBufferedFrag(l)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),_}(P.default)},"./src/controller/subtitle-stream-controller.ts":function(re,$,U){"use strict";U.r($),U.d($,"SubtitleStreamController",function(){return n});var S=U("./src/events.ts"),P=U("./src/utils/logger.ts"),E=U("./src/utils/buffer-helper.ts"),C=U("./src/controller/fragment-finders.ts"),w=U("./src/utils/discontinuities.ts"),u=U("./src/controller/level-helper.ts"),p=U("./src/controller/fragment-tracker.ts"),f=U("./src/controller/base-stream-controller.ts"),o=U("./src/types/loader.ts"),a=U("./src/types/level.ts");function c(h,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(h,y.key,y)}}function s(h,v,b){return v&&c(h.prototype,v),b&&c(h,b),h}function d(h,v){h.prototype=Object.create(v.prototype),h.prototype.constructor=h,i(h,v)}function i(h,v){return i=Object.setPrototypeOf||function(y,_){return y.__proto__=_,y},i(h,v)}var t=500,n=function(h){d(v,h);function v(y,_){var m;return m=h.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(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),_.on(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),_.on(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),_.on(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),_.on(S.Events.ERROR,this.onError,this),_.on(S.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),_.on(S.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),_.on(S.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),_.on(S.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),_.on(S.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},b._unregisterListeners=function(){var _=this.hls;_.off(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),_.off(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),_.off(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),_.off(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),_.off(S.Events.ERROR,this.onError,this),_.off(S.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),_.off(S.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),_.off(S.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),_.off(S.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),_.off(S.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},b.startLoad=function(){this.stopLoad(),this.state=f.State.IDLE,this.setInterval(t),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,x=m.success;if(this.fragPrevious=g,this.state=f.State.IDLE,!x)return;var l=this.tracksBuffered[this.currentTrackId];if(!l)return;for(var T,A=g.start,O=0;O<l.length;O++)if(A>=l[O].start&&A<=l[O].end){T=l[O];break}var D=g.start+g.duration;T?T.end=D:(T={start:A,end:D},l.push(T)),this.fragmentTracker.fragBuffered(g)},b.onBufferFlushing=function(_,m){var g=m.startOffset,x=m.endOffset;if(g===0&&x!==Number.POSITIVE_INFINITY){var l=this.currentTrackId,T=this.levels;if(!T.length||!T[l]||!T[l].details)return;var A=T[l].details,O=A.targetduration,D=x-O;if(D<=0)return;m.endOffsetSubtitles=Math.max(0,D),this.tracksBuffered.forEach(function(I){for(var j=0;j<I.length;){if(I[j].end<=D){I.shift();continue}else if(I[j].start<D)I[j].start=D;else break;j++}}),this.fragmentTracker.removeFragmentsInRange(g,D,o.PlaylistLevelType.SUBTITLE)}},b.onError=function(_,m){var g,x=m.frag;if(!x||x.type!==o.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,x=m.subtitleTracks;this.tracksBuffered=[],this.levels=x.map(function(l){return new a.Level(l)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(l){g.tracksBuffered[l.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(t)},b.onSubtitleTrackLoaded=function(_,m){var g,x=m.details,l=m.id,T=this.currentTrackId,A=this.levels;if(!A.length)return;var O=A[T];if(l>=A.length||l!==T||!O)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,x.live||(g=O.details)!==null&&g!==void 0&&g.live){var D=this.mainDetails;if(x.deltaUpdateFailed||!D)return;var I=D.fragments[0];if(!O.details)x.hasProgramDateTime&&D.hasProgramDateTime?Object(w.alignMediaPlaylistByPDT)(x,D):I&&Object(u.addSliding)(x,I.start);else{var j=this.alignPlaylists(x,O.details);j===0&&I&&Object(u.addSliding)(x,I.start)}}if(O.details=x,this.levelLastLoaded=l,this.tick(),x.live&&!this.fragCurrent&&this.media&&this.state===f.State.IDLE){var B=Object(C.findFragmentByPTS)(null,x.fragments,this.media.currentTime,0);B||(this.warn("Subtitle playlist not aligned with playback"),O.details=void 0)}},b._handleFragmentLoadComplete=function(_){var m=_.frag,g=_.payload,x=m.decryptdata,l=this.hls;if(this.fragContextChanged(m))return;if(g&&g.byteLength>0&&x&&x.key&&x.iv&&x.method==="AES-128"){var T=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(g),x.key.buffer,x.iv.buffer).then(function(A){var O=performance.now();l.trigger(S.Events.FRAG_DECRYPTED,{frag:m,payload:A,stats:{tstart:T,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 x=g[m].details,l=x.targetduration,T=this.config,A=this.media,O=E.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,A.currentTime-l,T.maxBufferHole),D=O.end,I=O.len,j=this.getMaxBufferLength()+l;if(I>j)return;console.assert(x,"Subtitle track details are defined on idle subtitle stream controller tick");var B=x.fragments,ee=B.length,F=x.edge,G,X=this.fragPrevious;if(D<F){var Z=T.maxFragLookUpTolerance;X&&x.hasProgramDateTime&&(G=Object(C.findFragmentByPDT)(B,X.endProgramDateTime,Z)),G||(G=Object(C.findFragmentByPTS)(X,B,D,Z),!G&&X&&X.start<B[0].start&&(G=B[0]))}else G=B[ee-1];(_=G)!==null&&_!==void 0&&_.encrypted?(P.logger.log("Loading key for "+G.sn),this.state=f.State.KEY_LOADING,this.hls.trigger(S.Events.KEY_LOADING,{frag:G})):G&&this.fragmentTracker.getState(G)===p.FragmentState.NOT_LOADED&&this.loadFragment(G,x,D)}},b.loadFragment=function(_,m,g){this.fragCurrent=_,h.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(re,$,U){"use strict";U.r($);var S=U("./src/events.ts"),P=U("./src/utils/texttrack-utils.ts"),E=U("./src/controller/base-playlist-controller.ts"),C=U("./src/types/loader.ts");function w(c,s){for(var d=0;d<s.length;d++){var i=s[d];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,i.key,i)}}function u(c,s,d){return s&&w(c.prototype,s),d&&w(c,d),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,t){return i.__proto__=t,i},f(c,s)}var o=function(c){p(s,c);function s(i){var t;return t=c.call(this,i,"[subtitle-track-controller]")||this,t.media=null,t.tracks=[],t.groupId=null,t.tracksInGroup=[],t.trackId=-1,t.selectDefaultTrack=!0,t.queuedDefaultTrack=-1,t.trackChangeListener=function(){return t.onTextTracksChanged()},t.asyncPollTrackChange=function(){return t.pollTrackChange(0)},t.useTextTrackPolling=!1,t.subtitlePollingInterval=-1,t.subtitleDisplay=!0,t.registerListeners(),t}var d=s.prototype;return d.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,c.prototype.destroy.call(this)},d.registerListeners=function(){var t=this.hls;t.on(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.on(S.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.on(S.Events.LEVEL_LOADING,this.onLevelLoading,this),t.on(S.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),t.on(S.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),t.on(S.Events.ERROR,this.onError,this)},d.unregisterListeners=function(){var t=this.hls;t.off(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(S.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.off(S.Events.LEVEL_LOADING,this.onLevelLoading,this),t.off(S.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),t.off(S.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),t.off(S.Events.ERROR,this.onError,this)},d.onMediaAttached=function(t,n){if(this.media=n.media,!this.media)return;this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange)},d.pollTrackChange=function(t){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,t)},d.onMediaDetaching=function(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var t=a(this.media.textTracks);t.forEach(function(n){Object(P.clearCurrentCues)(n)}),this.subtitleTrack=-1,this.media=null},d.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},d.onManifestParsed=function(t,n){this.tracks=n.subtitleTracks},d.onSubtitleTrackLoaded=function(t,n){var h=n.id,v=n.details,b=this.trackId,y=this.tracksInGroup[b];if(!y){this.warn("Invalid subtitle track id "+h);return}var _=y.details;y.details=n.details,this.log("subtitle track "+h+" loaded ["+v.startSN+"-"+v.endSN+"]"),h===this.trackId&&(this.retryCount=0,this.playlistLoaded(h,n,_))},d.onLevelLoading=function(t,n){this.switchLevel(n.level)},d.onLevelSwitching=function(t,n){this.switchLevel(n.level)},d.switchLevel=function(t){var n=this.hls.levels[t];if(!(n!=null&&n.textGroupIds))return;var h=n.textGroupIds[n.urlId];if(this.groupId!==h){var v=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,b=this.tracks.filter(function(m){return!h||m.groupId===h});this.tracksInGroup=b;var y=this.findTrackId(v==null?void 0:v.name)||this.findTrackId();this.groupId=h;var _={subtitleTracks:b};this.log("Updating subtitle tracks, "+b.length+' track(s) found in "'+h+'" group-id'),this.hls.trigger(S.Events.SUBTITLE_TRACKS_UPDATED,_),y!==-1&&this.setSubtitleTrack(y,v)}},d.findTrackId=function(t){for(var n=this.tracksInGroup,h=0;h<n.length;h++){var v=n[h];if((!this.selectDefaultTrack||v.default)&&(!t||t===v.name))return v.id}return-1},d.onError=function(t,n){if(c.prototype.onError.call(this,t,n),n.fatal||!n.context)return;n.context.type===C.PlaylistContextType.SUBTITLE_TRACK&&n.context.id===this.trackId&&n.context.groupId===this.groupId&&this.retryLoadingOrFail(n)},d.loadPlaylist=function(t){var n=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(n)){var h=n.id,v=n.groupId,b=n.url;if(t)try{b=t.addDirectives(b)}catch(y){this.warn("Could not construct new URL with HLS Delivery Directives: "+y)}this.log("Loading subtitle playlist for id "+h),this.hls.trigger(S.Events.SUBTITLE_TRACK_LOADING,{url:b,id:h,groupId:v,deliveryDirectives:t||null})}},d.toggleTrackModes=function(t){var n=this,h=this.media,v=this.subtitleDisplay,b=this.trackId;if(!h)return;var y=a(h.textTracks),_=y.filter(function(x){return x.groupId===n.groupId});if(t===-1)[].slice.call(y).forEach(function(x){x.mode="disabled"});else{var m=_[b];m&&(m.mode="disabled")}var g=_[t];g&&(g.mode=v?"showing":"hidden")},d.setSubtitleTrack=function(t,n){var h,v=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=t;return}if(this.trackId!==t&&this.toggleTrackModes(t),this.trackId===t&&(t===-1||(h=v[t])!==null&&h!==void 0&&h.details)||t<-1||t>=v.length)return;this.clearTimer();var b=v[t];if(this.log("Switching to subtitle track "+t),this.trackId=t,b){var y=b.id,_=b.groupId,m=_===void 0?"":_,g=b.name,x=b.type,l=b.url;this.hls.trigger(S.Events.SUBTITLE_TRACK_SWITCH,{id:y,groupId:m,name:g,type:x,url:l});var T=this.switchParams(b.url,n==null?void 0:n.details);this.loadPlaylist(T)}else this.hls.trigger(S.Events.SUBTITLE_TRACK_SWITCH,{id:t})},d.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var t=-1,n=a(this.media.textTracks),h=0;h<n.length;h++)if(n[h].mode==="hidden")t=h;else if(n[h].mode==="showing"){t=h;break}this.subtitleTrack!==t&&(this.subtitleTrack=t)},u(s,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(t){this.selectDefaultTrack=!1;var n=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(t,n)}}]),s}(E.default);function a(c){for(var s=[],d=0;d<c.length;d++){var i=c[d];i.kind==="subtitles"&&i.label&&s.push(c[d])}return s}$.default=o},"./src/controller/timeline-controller.ts":function(re,$,U){"use strict";U.r($),U.d($,"TimelineController",function(){return a});var S=U("./src/polyfills/number.ts"),P=U("./src/events.ts"),E=U("./src/utils/cea-608-parser.ts"),C=U("./src/utils/output-filter.ts"),w=U("./src/utils/webvtt-parser.ts"),u=U("./src/utils/texttrack-utils.ts"),p=U("./src/utils/imsc1-ttml-parser.ts"),f=U("./src/types/loader.ts"),o=U("./src/utils/logger.ts"),a=function(){function i(n){if(this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.timescale=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=d(),this.captionsProperties=void 0,this.hls=n,this.config=n.config,this.Cues=n.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 h=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 E.default(1,h,v),this.cea608Parser2=new E.default(3,b,y)}n.on(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(P.Events.MANIFEST_LOADED,this.onManifestLoaded,this),n.on(P.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),n.on(P.Events.FRAG_LOADING,this.onFragLoading,this),n.on(P.Events.FRAG_LOADED,this.onFragLoaded,this),n.on(P.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),n.on(P.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),n.on(P.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),n.on(P.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),n.on(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var t=i.prototype;return t.destroy=function(){var h=this.hls;h.off(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),h.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),h.off(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),h.off(P.Events.MANIFEST_LOADED,this.onManifestLoaded,this),h.off(P.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),h.off(P.Events.FRAG_LOADING,this.onFragLoading,this),h.off(P.Events.FRAG_LOADED,this.onFragLoaded,this),h.off(P.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),h.off(P.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),h.off(P.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),h.off(P.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),h.off(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},t.addCues=function(h,v,b,y,_){for(var m=!1,g=_.length;g--;){var x=_[g],l=s(x[0],x[1],v,b);if(l>=0&&(x[0]=Math.min(x[0],v),x[1]=Math.max(x[1],b),m=!0,l/(b-v)>.5))return}if(m||_.push([v,b]),this.config.renderTextTracksNatively){var T=this.captionsTracks[h];this.Cues.newCue(T,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:h})}},t.onInitPtsFound=function(h,v){var b=this,y=v.frag,_=v.id,m=v.initPTS,g=v.timescale,x=this.unparsedVttFrags;_==="main"&&(this.initPTS[y.cc]=m,this.timescale[y.cc]=g),x.length&&(this.unparsedVttFrags=[],x.forEach(function(l){b.onFragLoaded(P.Events.FRAG_LOADED,l)}))},t.getExistingTrack=function(h){var v=this.media;if(v)for(var b=0;b<v.textTracks.length;b++){var y=v.textTracks[b];if(y[h])return y}return null},t.createCaptionsTrack=function(h){this.config.renderTextTracksNatively?this.createNativeTrack(h):this.createNonNativeTrack(h)},t.createNativeTrack=function(h){if(this.captionsTracks[h])return;var v=this.captionsProperties,b=this.captionsTracks,y=this.media,_=v[h],m=_.label,g=_.languageCode,x=this.getExistingTrack(h);if(x)b[h]=x,Object(u.clearCurrentCues)(b[h]),Object(u.sendAddTrackEvent)(b[h],y);else{var l=this.createTextTrack("captions",m,g);l&&(l[h]=!0,b[h]=l)}},t.createNonNativeTrack=function(h){if(this.nonNativeCaptionsTracks[h])return;var v=this.captionsProperties[h];if(!v)return;var b=v.label,y={_id:h,label:b,kind:"captions",default:v.media?!!v.media.default:!1,closedCaptions:v.media};this.nonNativeCaptionsTracks[h]=y,this.hls.trigger(P.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[y]})},t.createTextTrack=function(h,v,b){var y=this.media;return y?y.addTextTrack(h,v,b):void 0},t.onMediaAttaching=function(h,v){this.media=v.media,this._cleanTracks()},t.onMediaDetaching=function(){var h=this.captionsTracks;Object.keys(h).forEach(function(v){Object(u.clearCurrentCues)(h[v]),delete h[v]}),this.nonNativeCaptionsTracks={}},t.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=d(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},t._cleanTracks=function(){var h=this.media;if(!h)return;var v=h.textTracks;if(v)for(var b=0;b<v.length;b++)Object(u.clearCurrentCues)(v[b])},t.onSubtitleTracksUpdated=function(h,v){var b=this;this.textTracks=[];var y=v.subtitleTracks||[],_=y.some(function(l){return l.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(l,T){var A;if(T<g.length){for(var O=null,D=0;D<g.length;D++)if(c(g[D],l)){O=g[D];break}O&&(A=O)}A?Object(u.clearCurrentCues)(A):(A=b.createTextTrack("subtitles",l.name,l.lang),A&&(A.mode="disabled")),A&&(A.groupId=l.groupId,b.textTracks.push(A))})}else if(!m&&this.tracks&&this.tracks.length){var x=this.tracks.map(function(l){return{label:l.name,kind:l.type.toLowerCase(),default:l.default,subtitleTrack:l}});this.hls.trigger(P.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:x})}}},t.onManifestLoaded=function(h,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})},t.onFragLoading=function(h,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,x,l=v.frag.sn,T=(g=v==null||((x=v.part)===null||x===void 0)?void 0:x.index)!=null?g:-1;l===_+1||l===_&&T===m+1||(b.reset(),y.reset()),this.lastSn=l,this.lastPartIndex=T}},t.onFragLoaded=function(h,v){var b=v.frag,y=v.payload,_=this.initPTS,m=this.unparsedVttFrags;if(b.type===f.PlaylistLevelType.SUBTITLE)if(y.byteLength){if(!Object(S.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 x=this.tracks[b.level],l=this.vttCCs;l[b.cc]||(l[b.cc]={start:b.start,prevCC:this.prevCC,new:!0},this.prevCC=b.cc),x&&x.textCodec===p.IMSC1_CODEC?this._parseIMSC1(b,y):this._parseVTTs(b,y,l)}}else this.hls.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:b,error:new Error("Empty subtitle payload")})},t._parseIMSC1=function(h,v){var b=this,y=this.hls;Object(p.parseIMSC1)(v,this.initPTS[h.cc],this.timescale[h.cc],function(_){b._appendCues(_,h.level),y.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:h})},function(_){o.logger.log("Failed to parse IMSC1: "+_),y.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:h,error:_})})},t._parseVTTs=function(h,v,b){var y=this,_=this.hls;Object(w.parseWebVTT)(v,this.initPTS[h.cc],this.timescale[h.cc],b,h.cc,h.start,function(m){y._appendCues(m,h.level),_.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:h})},function(m){y._fallbackToIMSC1(h,v),o.logger.log("Failed to parse VTT cue: "+m),_.trigger(P.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:h,error:m})})},t._fallbackToIMSC1=function(h,v){var b=this,y=this.tracks[h.level];y.textCodec||Object(p.parseIMSC1)(v,this.initPTS[h.cc],this.timescale[h.cc],function(){y.textCodec=p.IMSC1_CODEC,b._parseIMSC1(h,v)},function(){y.textCodec="wvtt"})},t._appendCues=function(h,v){var b=this.hls;if(this.config.renderTextTracksNatively){var y=this.textTracks[v];if(y.mode==="disabled")return;h.forEach(function(g){return Object(u.addCueToTrack)(y,g)})}else{var _=this.tracks[v],m=_.default?"default":"subtitles"+v;b.trigger(P.Events.CUES_PARSED,{type:"subtitles",cues:h,track:m})}},t.onFragDecrypted=function(h,v){var b=v.frag;if(b.type===f.PlaylistLevelType.SUBTITLE){if(!Object(S.isFiniteNumber)(this.initPTS[b.cc])){this.unparsedVttFrags.push(v);return}this.onFragLoaded(P.Events.FRAG_LOADED,v)}},t.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},t.onFragParsingUserdata=function(h,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])}}},t.onBufferFlushing=function(h,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 x=this.captionsTracks;Object.keys(x).forEach(function(T){return Object(u.removeCuesInRange)(x[T],b,y)})}if(this.config.renderTextTracksNatively&&(b===0&&_!==void 0)){var l=this.textTracks;Object.keys(l).forEach(function(T){return Object(u.removeCuesInRange)(l[T],b,_)})}},t.extractCea608Data=function(h){for(var v=h[0]&31,b=2,y=[[],[]],_=0;_<v;_++){var m=h[b++],g=127&h[b++],x=127&h[b++],l=(4&m)!==0,T=3&m;if(g===0&&x===0)continue;l&&((T===0||T===1)&&(y[T].push(g),y[T].push(x)))}return y},i}();function c(i,t){return i&&i.label===t.name&&!(i.textTrack1||i.textTrack2)}function s(i,t,n,h){return Math.min(t,h)-Math.max(i,n)}function d(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(re,$,U){"use strict";U.r($),U.d($,"default",function(){return S});var S=function(){function P(C,w){this.subtle=void 0,this.aesIV=void 0,this.subtle=C,this.aesIV=w}var E=P.prototype;return E.decrypt=function(w,u){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},u,w)},P}()},"./src/crypt/aes-decryptor.ts":function(re,$,U){"use strict";U.r($),U.d($,"removePadding",function(){return P}),U.d($,"default",function(){return E});var S=U("./src/utils/typed-array.ts");function P(C){var w=C.byteLength,u=w&&new DataView(C.buffer).getUint8(w-1);return u?Object(S.sliceUint8)(C,0,w-u):C}var E=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 w=C.prototype;return w.uint8ArrayToUint32Array_=function(p){for(var f=new DataView(p),o=new Uint32Array(4),a=0;a<4;a++)o[a]=f.getUint32(a*4);return o},w.initTable=function(){var p=this.sBox,f=this.invSBox,o=this.subMix,a=o[0],c=o[1],s=o[2],d=o[3],i=this.invSubMix,t=i[0],n=i[1],h=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 x=b[y],l=b[x],T=b[l],A=b[g]*257^g*16843008;a[y]=A<<24|A>>>8,c[y]=A<<16|A>>>16,s[y]=A<<8|A>>>24,d[y]=A,A=T*16843009^l*65537^x*257^y*16843008,t[g]=A<<24|A>>>8,n[g]=A<<16|A>>>16,h[g]=A<<8|A>>>24,v[g]=A,y?(y=x^b[b[b[T^x]]],_^=b[b[_]]):y=_=1}},w.expandKey=function(p){for(var f=this.uint8ArrayToUint32Array_(p),o=!0,a=0;a<f.length&&o;)o=f[a]===this.key[a],a++;if(o)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,d,i,t=this.keySchedule=new Uint32Array(s),n=this.invKeySchedule=new Uint32Array(s),h=this.sBox,v=this.rcon,b=this.invSubMix,y=b[0],_=b[1],m=b[2],g=b[3],x,l;for(d=0;d<s;d++){if(d<c){x=t[d]=f[d];continue}l=x,d%c===0?(l=l<<8|l>>>24,l=h[l>>>24]<<24|h[l>>>16&255]<<16|h[l>>>8&255]<<8|h[l&255],l^=v[d/c|0]<<24):c>6&&d%c===4&&(l=h[l>>>24]<<24|h[l>>>16&255]<<16|h[l>>>8&255]<<8|h[l&255]),t[d]=x=(t[d-c]^l)>>>0}for(i=0;i<s;i++)d=s-i,i&3?l=t[d]:l=t[d-4],i<4||d<=4?n[i]=l:n[i]=y[h[l>>>24]]^_[h[l>>>16&255]]^m[h[l>>>8&255]]^g[h[l&255]],n[i]=n[i]>>>0},w.networkToHostOrderSwap=function(p){return p<<24|(p&65280)<<8|(p&16711680)>>8|p>>>24},w.decrypt=function(p,f,o){for(var a=this.keySize+6,c=this.invKeySchedule,s=this.invSBox,d=this.invSubMix,i=d[0],t=d[1],n=d[2],h=d[3],v=this.uint8ArrayToUint32Array_(o),b=v[0],y=v[1],_=v[2],m=v[3],g=new Int32Array(p),x=new Int32Array(g.length),l,T,A,O,D,I,j,B,ee,F,G,X,Z,K,q=this.networkToHostOrderSwap;f<g.length;){for(ee=q(g[f]),F=q(g[f+1]),G=q(g[f+2]),X=q(g[f+3]),D=ee^c[0],I=X^c[1],j=G^c[2],B=F^c[3],Z=4,K=1;K<a;K++)l=i[D>>>24]^t[I>>16&255]^n[j>>8&255]^h[B&255]^c[Z],T=i[I>>>24]^t[j>>16&255]^n[B>>8&255]^h[D&255]^c[Z+1],A=i[j>>>24]^t[B>>16&255]^n[D>>8&255]^h[I&255]^c[Z+2],O=i[B>>>24]^t[D>>16&255]^n[I>>8&255]^h[j&255]^c[Z+3],D=l,I=T,j=A,B=O,Z=Z+4;l=s[D>>>24]<<24^s[I>>16&255]<<16^s[j>>8&255]<<8^s[B&255]^c[Z],T=s[I>>>24]<<24^s[j>>16&255]<<16^s[B>>8&255]<<8^s[D&255]^c[Z+1],A=s[j>>>24]<<24^s[B>>16&255]<<16^s[D>>8&255]<<8^s[I&255]^c[Z+2],O=s[B>>>24]<<24^s[D>>16&255]<<16^s[I>>8&255]<<8^s[j&255]^c[Z+3],x[f]=q(l^b),x[f+1]=q(O^y),x[f+2]=q(A^_),x[f+3]=q(T^m),b=ee,y=F,_=G,m=X,f=f+4}return x.buffer},C}()},"./src/crypt/decrypter.ts":function(re,$,U){"use strict";U.r($),U.d($,"default",function(){return f});var S=U("./src/crypt/aes-crypto.ts"),P=U("./src/crypt/fast-aes-key.ts"),E=U("./src/crypt/aes-decryptor.ts"),C=U("./src/utils/logger.ts"),w=U("./src/utils/mp4-tools.ts"),u=U("./src/utils/typed-array.ts"),p=16,f=function(){function o(c,s,d){var i=d===void 0?{}:d,t=i.removePKCS7Padding,n=t===void 0?!0:t;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=n,n)try{var h=self.crypto;h&&(this.subtle=h.subtle||h.webkitSubtle)}catch(v){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var a=o.prototype;return a.destroy=function(){this.observer=null},a.isSync=function(){return this.config.enableSoftwareAES},a.flush=function(){var s=this.currentResult;if(!s){this.reset();return}var d=new Uint8Array(s);return this.reset(),this.removePKCS7Padding?Object(E.removePadding)(d):d},a.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},a.decrypt=function(s,d,i,t){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(s),d,i);var n=this.flush();n&&t(n.buffer)}else this.webCryptoDecrypt(new Uint8Array(s),d,i).then(t)},a.softwareDecrypt=function(s,d,i){var t=this.currentIV,n=this.currentResult,h=this.remainderData;this.logOnce("JS AES decrypt"),h&&(s=Object(w.appendUint8Array)(h,s),this.remainderData=null);var v=this.getValidChunk(s);if(!v.length)return null;t&&(i=t);var b=this.softwareDecrypter;b||(b=this.softwareDecrypter=new E.default),b.expandKey(d);var y=n;return this.currentResult=b.decrypt(v.buffer,0,i),this.currentIV=Object(u.sliceUint8)(v,-16).buffer,y||null},a.webCryptoDecrypt=function(s,d,i){var t=this,n=this.subtle;return(this.key!==d||!this.fastAesKey)&&(this.key=d,this.fastAesKey=new P.default(n,d)),this.fastAesKey.expandKey().then(function(h){if(!n)return Promise.reject(new Error("web crypto not initialized"));var v=new S.default(n,i);return v.decrypt(s.buffer,h)}).catch(function(h){return t.onWebCryptoError(h,s,d,i)})},a.onWebCryptoError=function(s,d,i,t){return C.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",s),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(d,i,t)},a.getValidChunk=function(s){var d=s,i=s.length-s.length%p;return i!==s.length&&(d=Object(u.sliceUint8)(s,0,i),this.remainderData=Object(u.sliceUint8)(s,i)),d},a.logOnce=function(s){if(!this.logEnabled)return;C.logger.log("[decrypter.ts]: "+s),this.logEnabled=!1},o}()},"./src/crypt/fast-aes-key.ts":function(re,$,U){"use strict";U.r($),U.d($,"default",function(){return S});var S=function(){function P(C,w){this.subtle=void 0,this.key=void 0,this.subtle=C,this.key=w}var E=P.prototype;return E.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},P}()},"./src/demux/aacdemuxer.ts":function(re,$,U){"use strict";U.r($);var S=U("./src/demux/base-audio-demuxer.ts"),P=U("./src/demux/adts.ts"),E=U("./src/utils/logger.ts"),C=U("./src/demux/id3.ts");function w(f,o){f.prototype=Object.create(o.prototype),f.prototype.constructor=f,u(f,o)}function u(f,o){return u=Object.setPrototypeOf||function(c,s){return c.__proto__=s,c},u(f,o)}var p=function(f){w(o,f);function o(c,s){var d;return d=f.call(this)||this,d.observer=void 0,d.config=void 0,d.observer=c,d.config=s,d}var a=o.prototype;return a.resetInitSegment=function(s,d,i){f.prototype.resetInitSegment.call(this,s,d,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}},o.probe=function(s){if(!s)return!1;for(var d=C.getID3Data(s,0)||[],i=d.length,t=s.length;i<t;i++)if(P.probe(s,i))return E.logger.log("ADTS sync word found !"),!0;return!1},a.canParse=function(s,d){return P.canParse(s,d)},a.appendFrame=function(s,d,i){P.initTrackConfig(s,this.observer,d,i,s.manifestCodec);var t=P.appendFrame(s,d,i,this.initPTS,this.frameIndex);if(t&&t.missing===0)return t},o}(S.default);p.minProbeByteLength=9,$.default=p},"./src/demux/adts.ts":function(re,$,U){"use strict";U.r($),U.d($,"getAudioConfig",function(){return C}),U.d($,"isHeaderPattern",function(){return w}),U.d($,"getHeaderLength",function(){return u}),U.d($,"getFullFrameLength",function(){return p}),U.d($,"canGetFrameLength",function(){return f}),U.d($,"isHeader",function(){return o}),U.d($,"canParse",function(){return a}),U.d($,"probe",function(){return c}),U.d($,"initTrackConfig",function(){return s}),U.d($,"getFrameDuration",function(){return d}),U.d($,"parseFrameHeader",function(){return i}),U.d($,"appendFrame",function(){return t});var S=U("./src/utils/logger.ts"),P=U("./src/errors.ts"),E=U("./src/events.ts");function C(n,h,v,b){var y,_,m,g,x=navigator.userAgent.toLowerCase(),l=b,T=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];y=((h[v+2]&192)>>>6)+1;var A=(h[v+2]&60)>>>2;if(A>T.length-1){n.trigger(E.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+A});return}return m=(h[v+2]&1)<<2,m|=(h[v+3]&192)>>>6,S.logger.log("manifest codec:"+b+", ADTS type:"+y+", samplingIndex:"+A),/firefox/i.test(x)?A>=6?(y=5,g=new Array(4),_=A-3):(y=2,g=new Array(2),_=A):x.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(x))||!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:T[A],channelCount:m,codec:"mp4a.40."+y,manifestCodec:l}}function w(n,h){return n[h]===255&&(n[h+1]&246)===240}function u(n,h){return n[h+1]&1?7:9}function p(n,h){return(n[h+3]&3)<<11|n[h+4]<<3|(n[h+5]&224)>>>5}function f(n,h){return h+5<n.length}function o(n,h){return h+1<n.length&&w(n,h)}function a(n,h){return f(n,h)&&w(n,h)&&p(n,h)<=n.length-h}function c(n,h){if(o(n,h)){var v=u(n,h);if(h+v>=n.length)return!1;var b=p(n,h);if(b<=v)return!1;var y=h+b;return y===n.length||o(n,y)}return!1}function s(n,h,v,b,y){if(!n.samplerate){var _=C(h,v,b,y);if(!_)return;n.config=_.config,n.samplerate=_.samplerate,n.channelCount=_.channelCount,n.codec=_.codec,n.manifestCodec=_.manifestCodec,S.logger.log("parsed codec:"+n.codec+", rate:"+_.samplerate+", channels:"+_.channelCount)}}function d(n){return 1024*9e4/n}function i(n,h,v,b,y){var _=u(n,h),m=p(n,h);if(m-=_,m>0){var g=v+b*y;return{headerLength:_,frameLength:m,stamp:g}}}function t(n,h,v,b,y){var _=d(n.samplerate),m=i(h,v,b,y,_);if(m){var g=m.frameLength,x=m.headerLength,l=m.stamp,T=x+g,A=Math.max(0,v+T-h.length),O;A?(O=new Uint8Array(T-x),O.set(h.subarray(v+x,h.length),0)):O=h.subarray(v+x,v+T);var D={unit:O,pts:l};return A||n.samples.push(D),{sample:D,length:T,missing:A}}}},"./src/demux/base-audio-demuxer.ts":function(re,$,U){"use strict";U.r($),U.d($,"initPTSFn",function(){return p});var S=U("./src/polyfills/number.ts"),P=U("./src/demux/id3.ts"),E=U("./src/demux/dummy-demuxed-track.ts"),C=U("./src/utils/mp4-tools.ts"),w=U("./src/utils/typed-array.ts"),u=function(){function f(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var o=f.prototype;return o.resetInitSegment=function(c,s,d){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},o.resetTimeStamp=function(){},o.resetContiguity=function(){},o.canParse=function(c,s){return!1},o.appendFrame=function(c,s,d){},o.demux=function(c,s){this.cachedData&&(c=Object(C.appendUint8Array)(this.cachedData,c),this.cachedData=null);var d=P.getID3Data(c,0),i=d?d.length:0,t,n,h=this._audioTrack,v=this._id3Track,b=d?P.getTimeStamp(d):void 0,y=c.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=p(b,s)),d&&d.length>0&&v.samples.push({pts:this.initPTS,dts:this.initPTS,data:d}),n=this.initPTS;i<y;){if(this.canParse(c,i)){var _=this.appendFrame(h,c,i);_?(this.frameIndex++,n=_.sample.pts,i+=_.length,t=i):i=y}else P.canParse(c,i)?(d=P.getID3Data(c,i),v.samples.push({pts:n,dts:n,data:d}),i+=d.length,t=i):i++;if(i===y&&t!==y){var m=Object(w.sliceUint8)(c,t);this.cachedData?this.cachedData=Object(C.appendUint8Array)(this.cachedData,m):this.cachedData=m}}return{audioTrack:h,avcTrack:Object(E.dummyTrack)(),id3Track:v,textTrack:Object(E.dummyTrack)()}},o.demuxSampleAes=function(c,s,d){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},o.flush=function(c){var s=this.cachedData;return s&&(this.cachedData=null,this.demux(s,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(E.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(E.dummyTrack)()}},o.destroy=function(){},f}(),p=function(o,a){return Object(S.isFiniteNumber)(o)?o*90:a*9e4};$.default=u},"./src/demux/chunk-cache.ts":function(re,$,U){"use strict";U.r($),U.d($,"default",function(){return S});var S=function(){function E(){this.chunks=[],this.dataLength=0}var C=E.prototype;return C.push=function(u){this.chunks.push(u),this.dataLength+=u.length},C.flush=function(){var u=this.chunks,p=this.dataLength,f;if(u.length)u.length===1?f=u[0]:f=P(u,p);else return new Uint8Array(0);return this.reset(),f},C.reset=function(){this.chunks.length=0,this.dataLength=0},E}();function P(E,C){for(var w=new Uint8Array(C),u=0,p=0;p<E.length;p++){var f=E[p];w.set(f,u),u+=f.length}return w}},"./src/demux/dummy-demuxed-track.ts":function(re,$,U){"use strict";U.r($),U.d($,"dummyTrack",function(){return S});function S(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(re,$,U){"use strict";U.r($);var S=U("./src/utils/logger.ts"),P=function(){function E(w){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=w,this.bytesAvailable=w.byteLength,this.word=0,this.bitsAvailable=0}var C=E.prototype;return C.loadWord=function(){var u=this.data,p=this.bytesAvailable,f=u.byteLength-p,o=new Uint8Array(4),a=Math.min(4,p);if(a===0)throw new Error("no bytes available");o.set(u.subarray(f,f+a)),this.word=new DataView(o.buffer).getUint32(0),this.bitsAvailable=a*8,this.bytesAvailable-=a},C.skipBits=function(u){var p;this.bitsAvailable>u?(this.word<<=u,this.bitsAvailable-=u):(u-=this.bitsAvailable,p=u>>3,u-=p>>3,this.bytesAvailable-=p,this.loadWord(),this.word<<=u,this.bitsAvailable-=u)},C.readBits=function(u){var p=Math.min(this.bitsAvailable,u),f=this.word>>>32-p;return u>32&&S.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=u-p,p>0&&this.bitsAvailable?f<<p|this.readBits(p):f},C.skipLZ=function(){var u;for(u=0;u<this.bitsAvailable;++u)if((this.word&2147483648>>>u)!==0)return this.word<<=u,this.bitsAvailable-=u,u;return this.loadWord(),u+this.skipLZ()},C.skipUEG=function(){this.skipBits(1+this.skipLZ())},C.skipEG=function(){this.skipBits(1+this.skipLZ())},C.readUEG=function(){var u=this.skipLZ();return this.readBits(u+1)-1},C.readEG=function(){var u=this.readUEG();return 1&u?1+u>>>1:-1*(u>>>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(u){for(var p=8,f=8,o,a=0;a<u;a++)f!==0&&(o=this.readEG(),f=(p+o+256)%256),p=f===0?p:f},C.readSPS=function(){var u=0,p=0,f=0,o=0,a,c,s,d=this.readUByte.bind(this),i=this.readBits.bind(this),t=this.readUEG.bind(this),n=this.readBoolean.bind(this),h=this.skipBits.bind(this),v=this.skipEG.bind(this),b=this.skipUEG.bind(this),y=this.skipScalingList.bind(this);d();var _=d();if(i(5),h(3),d(),b(),_===100||_===110||_===122||_===244||_===44||_===83||_===86||_===118||_===128){var m=t();if(m===3&&h(1),b(),b(),h(1),n())for(c=m!==3?8:12,s=0;s<c;s++)n()&&(s<6?y(16):y(64))}b();var g=t();if(g===0)t();else if(g===1)for(h(1),v(),v(),a=t(),s=0;s<a;s++)v();b(),h(1);var x=t(),l=t(),T=i(1);T===0&&h(1),h(1),n()&&(u=t(),p=t(),f=t(),o=t());var A=[1,1];if(n()&&n()){var O=d();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=[d()<<8|d(),d()<<8|d()];break}}}return{width:Math.ceil((x+1)*16-u*2-p*2),height:(2-T)*(l+1)*16-(T?2:4)*(f+o),pixelRatio:A}},C.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},E}();$.default=P},"./src/demux/id3.ts":function(re,$,U){"use strict";U.r($),U.d($,"isHeader",function(){return S}),U.d($,"isFooter",function(){return P}),U.d($,"getID3Data",function(){return E}),U.d($,"canParse",function(){return w}),U.d($,"getTimeStamp",function(){return u}),U.d($,"isTimeStampFrame",function(){return p}),U.d($,"getID3Frames",function(){return o}),U.d($,"decodeFrame",function(){return a}),U.d($,"utf8ArrayToStr",function(){return t}),U.d($,"testables",function(){return n});var S=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)))},E=function(y,_){for(var m=_,g=0;S(y,_);){g+=10;var x=C(y,_+6);g+=x,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},w=function(y,_){return S(y,_)&&C(y,_+6)+10<=y.length-_},u=function(y){for(var _=o(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)}},o=function(y){for(var _=0,m=[];S(y,_);){var g=C(y,_+6);_+=10;for(var x=_+g;_+8<x;){var l=f(y.subarray(_)),T=a(l);T&&m.push(T),_+=l.size+10}P(y,_)&&(_+=10)}return m},a=function(y){return y.type==="PRIV"?c(y):y.type[0]==="W"?d(y):s(y)},c=function(y){if(y.size<2)return;var _=t(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=t(y.data.subarray(_),!0);_+=m.length+1;var g=t(y.data.subarray(_));return{key:y.type,info:m,data:g}}var x=t(y.data.subarray(1));return{key:y.type,data:x}},d=function(y){if(y.type==="WXXX"){if(y.size<2)return;var _=1,m=t(y.data.subarray(_),!0);_+=m.length+1;var g=t(y.data.subarray(_));return{key:y.type,info:m,data:g}}var x=t(y.data);return{key:y.type,data:x}},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},t=function(y,_){_===void 0&&(_=!1);var m=v();if(m){var g=m.decode(y);if(_){var x=g.indexOf("\0");return x!==-1?g.substring(0,x):g}return g.replace(/\0/g,"")}for(var l=y.length,T,A,O,D="",I=0;I<l;){if(T=y[I++],T===0&&_)return D;if(T===0||T===3)continue;switch(T>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:D+=String.fromCharCode(T);break;case 12:case 13:A=y[I++],D+=String.fromCharCode((T&31)<<6|A&63);break;case 14:A=y[I++],O=y[I++],D+=String.fromCharCode((T&15)<<12|(A&63)<<6|(O&63)<<0);break;default:}}return D},n={decodeTextFrame:s},h;function v(){return!h&&typeof self.TextDecoder!="undefined"&&(h=new self.TextDecoder("utf-8")),h}},"./src/demux/mp3demuxer.ts":function(re,$,U){"use strict";U.r($);var S=U("./src/demux/base-audio-demuxer.ts"),P=U("./src/demux/id3.ts"),E=U("./src/utils/logger.ts"),C=U("./src/demux/mpegaudio.ts");function w(f,o){f.prototype=Object.create(o.prototype),f.prototype.constructor=f,u(f,o)}function u(f,o){return u=Object.setPrototypeOf||function(c,s){return c.__proto__=s,c},u(f,o)}var p=function(f){w(o,f);function o(){return f.apply(this,arguments)||this}var a=o.prototype;return a.resetInitSegment=function(s,d,i){f.prototype.resetInitSegment.call(this,s,d,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}},o.probe=function(s){if(!s)return!1;for(var d=P.getID3Data(s,0)||[],i=d.length,t=s.length;i<t;i++)if(C.probe(s,i))return E.logger.log("MPEG Audio sync word found !"),!0;return!1},a.canParse=function(s,d){return C.canParse(s,d)},a.appendFrame=function(s,d,i){return this.initPTS===null?void 0:C.appendFrame(s,d,i,this.initPTS,this.frameIndex)},o}(S.default);p.minProbeByteLength=4,$.default=p},"./src/demux/mp4demuxer.ts":function(re,$,U){"use strict";U.r($);var S=U("./src/utils/mp4-tools.ts"),P=U("./src/demux/dummy-demuxed-track.ts"),E=function(){function C(u,p){this.remainderData=null,this.config=void 0,this.config=p}var w=C.prototype;return w.resetTimeStamp=function(){},w.resetInitSegment=function(){},w.resetContiguity=function(){},C.probe=function(p){return Object(S.findBox)({data:p,start:0,end:Math.min(p.length,16384)},["moof"]).length>0},w.demux=function(p){var f=p,o=Object(P.dummyTrack)();if(this.config.progressive){this.remainderData&&(f=Object(S.appendUint8Array)(this.remainderData,p));var a=Object(S.segmentValidRange)(f);this.remainderData=a.remainder,o.samples=a.valid||new Uint8Array}else o.samples=f;return{audioTrack:Object(P.dummyTrack)(),avcTrack:o,id3Track:Object(P.dummyTrack)(),textTrack:Object(P.dummyTrack)()}},w.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)()}},w.demuxSampleAes=function(p,f,o){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},w.destroy=function(){},C}();E.minProbeByteLength=1024,$.default=E},"./src/demux/mpegaudio.ts":function(re,$,U){"use strict";U.r($),U.d($,"appendFrame",function(){return u}),U.d($,"parseHeader",function(){return p}),U.d($,"isHeaderPattern",function(){return f}),U.d($,"isHeader",function(){return o}),U.d($,"canParse",function(){return a}),U.d($,"probe",function(){return c});var S=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],E=[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]],w=[0,1,1,4];function u(s,d,i,t,n){if(i+24>d.length)return;var h=p(d,i);if(h&&i+h.frameLength<=d.length){var v=h.samplesPerFrame*9e4/h.sampleRate,b=t+n*v,y={unit:d.subarray(i,i+h.frameLength),pts:b,dts:b};return s.config=[],s.channelCount=h.channelCount,s.samplerate=h.sampleRate,s.samples.push(y),{sample:y,length:h.frameLength,missing:0}}}function p(s,d){var i=s[d+1]>>3&3,t=s[d+1]>>1&3,n=s[d+2]>>4&15,h=s[d+2]>>2&3;if(i!==1&&n!==0&&n!==15&&h!==3){var v=s[d+2]>>1&1,b=s[d+3]>>6,y=i===3?3-t:t===3?3:4,_=P[y*14+n-1]*1e3,m=i===3?0:i===2?1:2,g=E[m*3+h],x=b===3?1:2,l=C[i][t],T=w[t],A=l*8*T,O=Math.floor(l*_/g+v)*T;if(S===null){var D=navigator.userAgent||"",I=D.match(/Chrome\/(\d+)/i);S=I?parseInt(I[1]):0}var j=!!S&&S<=87;return j&&t===2&&_>=224e3&&b===0&&(s[d+3]=s[d+3]|128),{sampleRate:g,channelCount:x,frameLength:O,samplesPerFrame:A}}}function f(s,d){return s[d]===255&&(s[d+1]&224)===224&&(s[d+1]&6)!==0}function o(s,d){return d+1<s.length&&f(s,d)}function a(s,d){var i=4;return f(s,d)&&i<=s.length-d}function c(s,d){if(d+1<s.length&&f(s,d)){var i=4,t=p(s,d),n=i;t!=null&&t.frameLength&&(n=t.frameLength);var h=d+n;return h===s.length||o(s,h)}return!1}},"./src/demux/sample-aes.ts":function(re,$,U){"use strict";U.r($);var S=U("./src/crypt/decrypter.ts"),P=U("./src/demux/tsdemuxer.ts"),E=function(){function C(u,p,f){this.keyData=void 0,this.decrypter=void 0,this.keyData=f,this.decrypter=new S.default(u,p,{removePKCS7Padding:!1})}var w=C.prototype;return w.decryptBuffer=function(p,f){this.decrypter.decrypt(p,this.keyData.key.buffer,this.keyData.iv.buffer,f)},w.decryptAacSample=function(p,f,o,a){var c=p[f].unit,s=c.subarray(16,c.length-c.length%16),d=s.buffer.slice(s.byteOffset,s.byteOffset+s.length),i=this;this.decryptBuffer(d,function(t){var n=new Uint8Array(t);c.set(n,16),a||i.decryptAacSamples(p,f+1,o)})},w.decryptAacSamples=function(p,f,o){for(;;f++){if(f>=p.length){o();return}if(p[f].unit.length<32)continue;var a=this.decrypter.isSync();if(this.decryptAacSample(p,f,o,a),!a)return}},w.getAvcEncryptedData=function(p){for(var f=Math.floor((p.length-48)/160)*16+16,o=new Int8Array(f),a=0,c=32;c<=p.length-16;c+=160,a+=16)o.set(p.subarray(c,c+16),a);return o},w.getAvcDecryptedUnit=function(p,f){for(var o=new Uint8Array(f),a=0,c=32;c<=p.length-16;c+=160,a+=16)p.set(o.subarray(a,a+16),c);return p},w.decryptAvcSample=function(p,f,o,a,c,s){var d=Object(P.discardEPB)(c.data),i=this.getAvcEncryptedData(d),t=this;this.decryptBuffer(i.buffer,function(n){c.data=t.getAvcDecryptedUnit(d,n),s||t.decryptAvcSamples(p,f,o+1,a)})},w.decryptAvcSamples=function(p,f,o,a){if(p instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;f++,o=0){if(f>=p.length){a();return}for(var c=p[f].units;!(o>=c.length);o++){var s=c[o];if(s.data.length<=48||s.type!==1&&s.type!==5)continue;var d=this.decrypter.isSync();if(this.decryptAvcSample(p,f,o,a,s,d),!d)return}}},C}();$.default=E},"./src/demux/transmuxer-interface.ts":function(re,$,U){"use strict";U.r($),U.d($,"default",function(){return c});var S=U("./node_modules/webworkify-webpack/index.js"),P=U.n(S),E=U("./src/events.ts"),C=U("./src/demux/transmuxer.ts"),w=U("./src/utils/logger.ts"),u=U("./src/errors.ts"),p=U("./src/utils/mediasource-helper.ts"),f=U("./node_modules/eventemitter3/index.js"),o=U.n(f),a=Object(p.getMediaSource)()||{isTypeSupported:function(){return!1}},c=function(){function s(i,t,n,h){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=t,this.onTransmuxComplete=n,this.onFlush=h;var b=i.config,y=function(l,T){T=T||{},T.frag=v.frag,T.id=v.id,i.trigger(l,T)};this.observer=new f.EventEmitter,this.observer.on(E.Events.FRAG_DECRYPTED,y),this.observer.on(E.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"){w.logger.log("demuxing in webworker");var g;try{g=this.worker=S("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),g.addEventListener("message",this.onwmsg),g.onerror=function(x){i.trigger(E.Events.ERROR,{type:u.ErrorTypes.OTHER_ERROR,details:u.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(x.message+" ("+x.filename+":"+x.lineno+")")})},g.postMessage({cmd:"init",typeSupported:_,vendor:m,id:t,config:JSON.stringify(b)})}catch(x){w.logger.warn("Error in worker:",x),w.logger.error("Error while initializing DemuxerWorker, fallback to inline"),g&&self.URL.revokeObjectURL(g.objectURL),this.transmuxer=new C.default(this.observer,_,b,m,t),this.worker=null}}else this.transmuxer=new C.default(this.observer,_,b,m,t)}var d=s.prototype;return d.destroy=function(){var t=this.worker;if(t)t.removeEventListener("message",this.onwmsg),t.terminate(),this.worker=null;else{var n=this.transmuxer;n&&(n.destroy(),this.transmuxer=null)}var h=this.observer;h&&h.removeAllListeners(),this.observer=null},d.push=function(t,n,h,v,b,y,_,m,g,x){var l=this;g.transmuxing.start=self.performance.now();var T=this.transmuxer,A=this.worker,O=y?y.start:b.start,D=b.decryptdata,I=this.frag,j=!(I&&b.cc===I.cc),B=!(I&&g.level===I.level),ee=I?g.sn-I.sn:-1,F=this.part?g.part-this.part.index:1,G=!B&&(ee===1||ee===0&&F===1),X=self.performance.now();(B||ee||b.stats.parsing.start===0)&&(b.stats.parsing.start=X),y&&(F||!G)&&(y.stats.parsing.start=X);var Z=new C.TransmuxState(j,G,m,B,O);if(!G||j){w.logger.log("[transmuxer-interface, "+b.type+"]: Starting new transmux session for sn: "+g.sn+" p: "+g.part+" level: "+g.level+" id: "+g.id+`
|
|
|
discontinuity: `+j+`
|
|
|
trackSwitch: `+B+`
|
|
|
contiguous: `+G+`
|
|
|
accurateTimeOffset: `+m+`
|
|
|
timeOffset: `+O);var K=new C.TransmuxConfig(h,v,n,_,x);this.configureTransmuxer(K)}if(this.frag=b,this.part=y,A)A.postMessage({cmd:"demux",data:t,decryptdata:D,chunkMeta:g,state:Z},t instanceof ArrayBuffer?[t]:[]);else if(T){var q=T.push(t,D,g,Z);Object(C.isPromise)(q)?q.then(function(ae){l.handleTransmuxComplete(ae)}):this.handleTransmuxComplete(q)}},d.flush=function(t){var n=this;t.transmuxing.start=self.performance.now();var h=this.transmuxer,v=this.worker;if(v)v.postMessage({cmd:"flush",chunkMeta:t});else if(h){var b=h.flush(t);Object(C.isPromise)(b)?b.then(function(y){n.handleFlushResult(y,t)}):this.handleFlushResult(b,t)}},d.handleFlushResult=function(t,n){var h=this;t.forEach(function(v){h.handleTransmuxComplete(v)}),this.onFlush(n)},d.onWorkerMessage=function(t){var n=t.data,h=this.hls;switch(n.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(n.data);break}case"flush":{this.onFlush(n.data);break}default:{n.data=n.data||{},n.data.frag=this.frag,n.data.id=this.id,h.trigger(n.event,n.data);break}}},d.configureTransmuxer=function(t){var n=this.worker,h=this.transmuxer;n?n.postMessage({cmd:"configure",config:t}):h&&h.configure(t)},d.handleTransmuxComplete=function(t){t.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(t)},s}()},"./src/demux/transmuxer-worker.ts":function(re,$,U){"use strict";U.r($),U.d($,"default",function(){return u});var S=U("./src/demux/transmuxer.ts"),P=U("./src/events.ts"),E=U("./src/utils/logger.ts"),C=U("./node_modules/eventemitter3/index.js"),w=U.n(C);function u(c){var s=new C.EventEmitter,d=function(t,n){c.postMessage({event:t,data:n})};s.on(P.Events.FRAG_DECRYPTED,d),s.on(P.Events.ERROR,d),c.addEventListener("message",function(i){var t=i.data;switch(t.cmd){case"init":{var n=JSON.parse(t.config);c.transmuxer=new S.default(s,t.typeSupported,n,t.vendor,t.id),Object(E.enableLogs)(n.debug),d("init",null);break}case"configure":{c.transmuxer.configure(t.config);break}case"demux":{var h=c.transmuxer.push(t.data,t.decryptdata,t.chunkMeta,t.state);Object(S.isPromise)(h)?h.then(function(y){p(c,y)}):p(c,h);break}case"flush":{var v=t.chunkMeta,b=c.transmuxer.flush(v);Object(S.isPromise)(b)?b.then(function(y){o(c,y,v)}):o(c,b,v);break}default:break}})}function p(c,s){if(a(s.remuxResult))return;var d=[],i=s.remuxResult,t=i.audio,n=i.video;t&&f(d,t),n&&f(d,n),c.postMessage({event:"transmuxComplete",data:s},d)}function f(c,s){s.data1&&c.push(s.data1.buffer),s.data2&&c.push(s.data2.buffer)}function o(c,s,d){s.forEach(function(i){p(c,i)}),c.postMessage({event:"flush",data:d})}function a(c){return!c.audio&&!c.video&&!c.text&&!c.id3&&!c.initSegment}},"./src/demux/transmuxer.ts":function(re,$,U){"use strict";U.r($),U.d($,"default",function(){return n}),U.d($,"isPromise",function(){return b}),U.d($,"TransmuxConfig",function(){return y}),U.d($,"TransmuxState",function(){return _});var S=U("./src/events.ts"),P=U("./src/errors.ts"),E=U("./src/crypt/decrypter.ts"),C=U("./src/demux/aacdemuxer.ts"),w=U("./src/demux/mp4demuxer.ts"),u=U("./src/demux/tsdemuxer.ts"),p=U("./src/demux/mp3demuxer.ts"),f=U("./src/remux/mp4-remuxer.ts"),o=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"),d;try{d=self.performance.now.bind(self.performance)}catch(m){s.logger.debug("Unable to use Performance API on this environment"),d=self.Date.now}var i=[{demux:u.default,remux:f.default},{demux:w.default,remux:o.default},{demux:C.default,remux:f.default},{demux:p.default,remux:f.default}],t=1024;i.forEach(function(m){var g=m.demux;t=Math.max(t,g.minProbeByteLength)});var n=function(){function m(x,l,T,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=x,this.typeSupported=l,this.config=T,this.vendor=A,this.id=O}var g=m.prototype;return g.configure=function(l){this.transmuxConfig=l,this.decrypter&&this.decrypter.reset()},g.push=function(l,T,A,O){var D=this,I=A.transmuxing;I.executeStart=d();var j=new Uint8Array(l),B=this.cache,ee=this.config,F=this.currentTransmuxState,G=this.transmuxConfig;O&&(this.currentTransmuxState=O);var X=h(j,T);if(X&&X.method==="AES-128"){var Z=this.getDecrypter();if(ee.enableSoftwareAES){var K=Z.softwareDecrypt(j,X.key.buffer,X.iv.buffer);if(!K)return I.executeEnd=d(),v(A);j=new Uint8Array(K)}else return this.decryptionPromise=Z.webCryptoDecrypt(j,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||F,ae=q.contiguous,oe=q.discontinuity,ve=q.trackSwitch,he=q.accurateTimeOffset,_e=q.timeOffset,fe=G.audioCodec,xe=G.videoCodec,je=G.defaultInitPts,Le=G.duration,ke=G.initSegmentData;if((oe||ve)&&this.resetInitSegment(ke,fe,xe,Le),oe&&this.resetInitialTimestamp(je),ae||this.resetContiguity(),this.needsProbing(j,oe,ve)){if(B.dataLength){var Fe=B.flush();j=Object(c.appendUint8Array)(Fe,j)}this.configureTransmuxer(j,G)}var ge=this.transmux(j,X,_e,he,A),ce=this.currentTransmuxState;return ce.contiguous=!0,ce.discontinuity=!1,ce.trackSwitch=!1,I.executeEnd=d(),ge},g.flush=function(l){var T=this,A=l.transmuxing;A.executeStart=d();var O=this.decrypter,D=this.cache,I=this.currentTransmuxState,j=this.decryptionPromise;if(j)return j.then(function(){return T.flush(l)});var B=[],ee=I.timeOffset;if(O){var F=O.flush();F&&B.push(this.push(F,null,l))}var G=D.dataLength;D.reset();var X=this.demuxer,Z=this.remuxer;if(!X||!Z)return G>=t&&this.observer.emit(S.Events.ERROR,S.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),A.executeEnd=d(),[v(l)];var K=X.flush(ee);return b(K)?K.then(function(q){return T.flushRemux(B,q,l),B}):(this.flushRemux(B,K,l),B)},g.flushRemux=function(l,T,A){var O=T.audioTrack,D=T.avcTrack,I=T.id3Track,j=T.textTrack,B=this.currentTransmuxState,ee=B.accurateTimeOffset,F=B.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,j,F,ee,!0,this.id);l.push({remuxResult:G,chunkMeta:A}),A.transmuxing.executeEnd=d()},g.resetInitialTimestamp=function(l){var T=this.demuxer,A=this.remuxer;if(!T||!A)return;T.resetTimeStamp(l),A.resetTimeStamp(l)},g.resetContiguity=function(){var l=this.demuxer,T=this.remuxer;if(!l||!T)return;l.resetContiguity(),T.resetNextTimestamp()},g.resetInitSegment=function(l,T,A,O){var D=this.demuxer,I=this.remuxer;if(!D||!I)return;D.resetInitSegment(T,A,O),I.resetInitSegment(l,T,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(l,T,A,O,D){var I;return T&&T.method==="SAMPLE-AES"?I=this.transmuxSampleAes(l,T,A,O,D):I=this.transmuxUnencrypted(l,A,O,D),I},g.transmuxUnencrypted=function(l,T,A,O){var D=this.demuxer.demux(l,T,!1,!this.config.progressive),I=D.audioTrack,j=D.avcTrack,B=D.id3Track,ee=D.textTrack,F=this.remuxer.remux(I,j,B,ee,T,A,!1,this.id);return{remuxResult:F,chunkMeta:O}},g.transmuxSampleAes=function(l,T,A,O,D){var I=this;return this.demuxer.demuxSampleAes(l,T,A).then(function(j){var B=I.remuxer.remux(j.audioTrack,j.avcTrack,j.id3Track,j.textTrack,A,O,!1,I.id);return{remuxResult:B,chunkMeta:D}})},g.configureTransmuxer=function(l,T){for(var A=this.config,O=this.observer,D=this.typeSupported,I=this.vendor,j=T.audioCodec,B=T.defaultInitPts,ee=T.duration,F=T.initSegmentData,G=T.videoCodec,X,Z=0,K=i.length;Z<K;Z++)if(i[Z].demux.probe(l)){X=i[Z];break}X||(s.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),X={demux:w.default,remux:o.default});var q=this.demuxer,ae=this.remuxer,oe=X.remux,ve=X.demux;(!ae||!(ae instanceof oe))&&(this.remuxer=new oe(O,A,D,I)),(!q||!(q instanceof ve))&&(this.demuxer=new ve(O,A,D),this.probe=ve.probe),this.resetInitSegment(F,j,G,ee),this.resetInitialTimestamp(B)},g.needsProbing=function(l,T,A){return!this.demuxer||!this.remuxer||T||A},g.getDecrypter=function(){var l=this.decrypter;return l||(l=this.decrypter=new E.default(this.observer,this.config)),l},m}();function h(m,g){var x=null;return m.byteLength>0&&g!=null&&g.key!=null&&g.iv!==null&&g.method!=null&&(x=g),x}var v=function(g){return{remuxResult:{},chunkMeta:g}};function b(m){return"then"in m&&m.then instanceof Function}var y=function(g,x,l,T,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=x,this.initSegmentData=l,this.duration=T,this.defaultInitPts=A},_=function(g,x,l,T,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=x,this.accurateTimeOffset=l,this.trackSwitch=T,this.timeOffset=A}},"./src/demux/tsdemuxer.ts":function(re,$,U){"use strict";U.r($),U.d($,"discardEPB",function(){return v});var S=U("./src/demux/adts.ts"),P=U("./src/demux/mpegaudio.ts"),E=U("./src/demux/exp-golomb.ts"),C=U("./src/demux/id3.ts"),w=U("./src/demux/sample-aes.ts"),u=U("./src/events.ts"),p=U("./src/utils/mp4-tools.ts"),f=U("./src/utils/logger.ts"),o=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),x=0;x<g;){if(m[x]===71&&m[x+188]===71&&m[x+2*188]===71)return x;x++}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,x){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=b.createTrack("video",x),this._audioTrack=b.createTrack("audio",x),this._id3Track=b.createTrack("id3",x),this._txtTrack=b.createTrack("text",x),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=m,this.videoCodec=g,this._duration=x},y.resetTimeStamp=function(){},y.resetContiguity=function(){var m=this._audioTrack,g=this._avcTrack,x=this._id3Track;m&&(m.pesData=null),g&&(g.pesData=null),x&&(x.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},y.demux=function(m,g,x,l){x===void 0&&(x=!1),l===void 0&&(l=!1),x||(this.sampleAes=null);var T,A=this._avcTrack,O=this._audioTrack,D=this._id3Track,I=A.pid,j=A.pesData,B=O.pid,ee=D.pid,F=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&&!l)return this.remainderData=m,{audioTrack:O,avcTrack:A,id3Track:D,textTrack:this._txtTrack};var ae=Math.max(0,b.syncOffset(m));q-=(q+ae)%188,q<m.byteLength&&!l&&(this.remainderData=new Uint8Array(m.buffer,q,m.buffer.byteLength-q));for(var oe=ae;oe<q;oe+=188)if(m[oe]===71){var ve=!!(m[oe+1]&64),he=((m[oe+1]&31)<<8)+m[oe+2],_e=(m[oe+3]&48)>>4,fe=void 0;if(_e>1){if(fe=oe+5+m[oe+4],fe===oe+188)continue}else fe=oe+4;switch(he){case I:ve&&(j&&(T=t(j))&&this.parseAVCPES(T,!1),j={data:[],size:0}),j&&(j.data.push(m.subarray(fe,oe+188)),j.size+=oe+188-fe);break;case B:ve&&(F&&(T=t(F))&&(O.isAAC?this.parseAACPES(T):this.parseMPEGPES(T)),F={data:[],size:0}),F&&(F.data.push(m.subarray(fe,oe+188)),F.size+=oe+188-fe);break;case ee:ve&&(G&&(T=t(G))&&this.parseID3PES(T),G={data:[],size:0}),G&&(G.data.push(m.subarray(fe,oe+188)),G.size+=oe+188-fe);break;case 0:ve&&(fe+=m[fe]+1),K=this._pmtId=d(m,fe);break;case K:{ve&&(fe+=m[fe]+1);var xe=i(m,fe,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,x);I=xe.avc,I>0&&(A.pid=I),B=xe.audio,B>0&&(O.pid=B,O.isAAC=xe.isAAC),ee=xe.id3,ee>0&&(D.pid=ee),X&&!Z&&(f.logger.log("reparse from beginning"),X=!1,oe=ae-188),Z=this.pmtParsed=!0;break}case 17:case 8191:break;default:X=!0;break}}else this.observer.emit(u.Events.ERROR,u.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});A.pesData=j,O.pesData=F,D.pesData=G;var je={audioTrack:O,avcTrack:A,id3Track:D,textTrack:this._txtTrack};return l&&this.extractRemainingSamples(je),je},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,x=m.avcTrack,l=m.id3Track,T=x.pesData,A=g.pesData,O=l.pesData,D;T&&(D=t(T))?(this.parseAVCPES(D,!0),x.pesData=null):x.pesData=T,A&&(D=t(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=t(O))?(this.parseID3PES(D),l.pesData=null):l.pesData=O},y.demuxSampleAes=function(m,g,x){var l=this.demux(m,x,!0,!this.config.progressive),T=this.sampleAes=new w.default(this.observer,this.config,g);return this.decrypt(l,T)},y.decrypt=function(m,g){return new Promise(function(x){var l=m.audioTrack,T=m.avcTrack;l.samples&&l.isAAC?g.decryptAacSamples(l.samples,0,function(){T.samples?g.decryptAvcSamples(T.samples,0,0,function(){x(m)}):x(m)}):T.samples&&g.decryptAvcSamples(T.samples,0,0,function(){x(m)})})},y.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},y.parseAVCPES=function(m,g){var x=this,l=this._avcTrack,T=this.parseAVCNALu(m.data),A=!1,O=this.avcSample,D,I=!1;m.data=null,O&&T.length&&!l.audFound&&(n(O,l),O=this.avcSample=s(!1,m.pts,m.dts,"")),T.forEach(function(j){switch(j.type){case 1:{D=!0,O||(O=x.avcSample=s(!0,m.pts,m.dts,"")),A&&(O.debug+="NDR "),O.frame=!0;var B=j.data;if(I&&B.length>4){var ee=new E.default(B).readSliceType();(ee===2||ee===4||ee===7||ee===9)&&(O.key=!0)}break}case 5:D=!0,O||(O=x.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 F=new E.default(v(j.data));F.readUByte();for(var G=0,X=0,Z=!1,K=0;!Z&&F.bytesAvailable>1;){G=0;do K=F.readUByte(),G+=K;while(K===255);X=0;do K=F.readUByte(),X+=K;while(K===255);if(G===4&&F.bytesAvailable!==0){Z=!0;var q=F.readUByte();if(q===181){var ae=F.readUShort();if(ae===49){var oe=F.readUInt();if(oe===1195456820){var ve=F.readUByte();if(ve===3){for(var he=F.readUByte(),_e=F.readUByte(),fe=31&he,xe=[he,_e],je=0;je<fe;je++)xe.push(F.readUByte()),xe.push(F.readUByte()),xe.push(F.readUByte());h(x._txtTrack.samples,{type:3,pts:m.pts,bytes:xe})}}}}}else if(G===5&&F.bytesAvailable!==0){if(Z=!0,X>16){for(var Le=[],ke=0;ke<16;ke++)Le.push(F.readUByte().toString(16)),(ke===3||ke===5||ke===7||ke===9)&&Le.push("-");for(var Fe=X-16,ge=new Uint8Array(Fe),ce=0;ce<Fe;ce++)ge[ce]=F.readUByte();h(x._txtTrack.samples,{pts:m.pts,payloadType:G,uuid:Le.join(""),userData:Object(C.utf8ArrayToStr)(ge),userDataBytes:ge})}}else if(X<F.bytesAvailable)for(var Ie=0;Ie<X;Ie++)F.readUByte()}break}case 7:if(D=!0,I=!0,A&&O&&(O.debug+="SPS "),!l.sps){var Ne=new E.default(j.data),Xe=Ne.readSPS();l.width=Xe.width,l.height=Xe.height,l.pixelRatio=Xe.pixelRatio,l.sps=[j.data],l.duration=x._duration;for(var te=j.data.subarray(1,4),k="avc1.",N=0;N<3;N++){var J=te[N].toString(16);J.length<2&&(J="0"+J),k+=J}l.codec=k}break;case 8:D=!0,A&&O&&(O.debug+="PPS "),l.pps||(l.pps=[j.data]);break;case 9:D=!1,l.audFound=!0,O&&n(O,l),O=x.avcSample=s(!1,m.pts,m.dts,A?"AUD ":"");break;case 12:D=!1;break;default:D=!1,O&&(O.debug+="unknown NAL "+j.type+" ");break}if(O&&D){var V=O.units;V.push(j)}}),g&&O&&(n(O,l),this.avcSample=null)},y.getLastNalUnit=function(){var m,g=this.avcSample,x;if(!g||g.units.length===0){var l=this._avcTrack.samples;g=l[l.length-1]}if((m=g)!==null&&m!==void 0&&m.units){var T=g.units;x=T[T.length-1]}return x},y.parseAVCNALu=function(m){var g=m.byteLength,x=this._avcTrack,l=x.naluState||0,T=l,A=[],O=0,D,I,j,B=-1,ee=0;for(l===-1&&(B=0,ee=m[0]&31,l=0,O=1);O<g;){if(D=m[O++],!l){l=D?0:1;continue}if(l===1){l=D?0:2;continue}if(!D)l=3;else if(D===1){if(B>=0){var F={data:m.subarray(B,O-l-1),type:ee};A.push(F)}else{var G=this.getLastNalUnit();if(G&&(T&&O<=4-T&&(G.state&&(G.data=G.data.subarray(0,G.data.byteLength-T))),I=O-l-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?(j=m[O]&31,B=O,ee=j,l=0):l=-1}else l=0}if(B>=0&&l>=0){var Z={data:m.subarray(B,g),type:ee,state:l};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 x.naluState=l,A},y.parseAACPES=function(m){var g=0,x=this._audioTrack,l=this.aacOverFlow,T=m.data;if(l){this.aacOverFlow=null;var A=l.sample.unit.byteLength,O=Math.min(l.missing,A),D=A-O;l.sample.unit.set(T.subarray(0,O),D),x.samples.push(l.sample),g=l.missing}var I,j;for(I=g,j=T.length;I<j-1&&!S.isHeader(T,I);I++);if(I!==g){var B,ee;if(I<j-1?(B="AAC PES did not start with ADTS header,offset:"+I,ee=!1):(B="no ADTS header found in AAC PES",ee=!0),f.logger.warn("parsing error:"+B),this.observer.emit(u.Events.ERROR,u.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.FRAG_PARSING_ERROR,fatal:ee,reason:B}),ee)return}S.initTrackConfig(x,this.observer,T,I,this.audioCodec);var F;if(m.pts!==void 0)F=m.pts;else if(l){var G=S.getFrameDuration(x.samplerate);F=l.sample.pts+G}else{f.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var X=0;I<j;)if(S.isHeader(T,I)){if(I+5<j){var Z=S.appendFrame(x,T,I,F,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,x=g.length,l=0,T=0,A=m.pts;if(A===void 0){f.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;T<x;)if(P.isHeader(g,T)){var O=P.appendFrame(this._audioTrack,g,T,A,l);if(O)T+=O.length,l++;else break}else T++},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 d(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},x=(b[y+1]&15)<<8|b[y+2],l=y+3+x-4,T=(b[y+10]&15)<<8|b[y+11];for(y+=12+T;y<l;){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 t(b){var y=0,_,m,g,x,l,T=b.data;if(!b||b.size===0)return null;for(;T[0].length<19&&T.length>1;){var A=new Uint8Array(T[0].length+T[1].length);A.set(T[0]),A.set(T[1],T[0].length),T[0]=A,T.splice(1,1)}_=T[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&&(x=(_[9]&14)*536870912+(_[10]&255)*4194304+(_[11]&254)*16384+(_[12]&255)*128+(_[13]&254)/2,D&64?(l=(_[14]&14)*536870912+(_[15]&255)*4194304+(_[16]&254)*16384+(_[17]&255)*128+(_[18]&254)/2,x-l>60*9e4&&(f.logger.warn(Math.round((x-l)/9e4)+"s delta between PTS and DTS, align them"),x=l)):l=x),g=_[8];var I=g+9;if(b.size<=I)return null;b.size-=I;for(var j=new Uint8Array(b.size),B=0,ee=T.length;B<ee;B++){_=T[B];var F=_.byteLength;if(I)if(I>F){I-=F;continue}else _=_.subarray(I),F-=I,I=0;j.set(_,y),y+=F}return m&&(m-=g+3),{data:j,pts:x,dts:l,len:m}}return null}function n(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 h(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,x=new Uint8Array(g),l=0;for(m=0;m<g;l++,m++)l===_[0]&&(l++,_.shift()),x[m]=b[l];return x}$.default=c},"./src/errors.ts":function(re,$,U){"use strict";U.r($),U.d($,"ErrorTypes",function(){return S}),U.d($,"ErrorDetails",function(){return P});var S;(function(E){E.NETWORK_ERROR="networkError",E.MEDIA_ERROR="mediaError",E.KEY_SYSTEM_ERROR="keySystemError",E.MUX_ERROR="muxError",E.OTHER_ERROR="otherError"})(S||(S={}));var P;(function(E){E.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",E.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",E.KEY_SYSTEM_NO_SESSION="keySystemNoSession",E.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",E.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",E.MANIFEST_LOAD_ERROR="manifestLoadError",E.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",E.MANIFEST_PARSING_ERROR="manifestParsingError",E.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",E.LEVEL_EMPTY_ERROR="levelEmptyError",E.LEVEL_LOAD_ERROR="levelLoadError",E.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",E.LEVEL_SWITCH_ERROR="levelSwitchError",E.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",E.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",E.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",E.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",E.FRAG_LOAD_ERROR="fragLoadError",E.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",E.FRAG_DECRYPT_ERROR="fragDecryptError",E.FRAG_PARSING_ERROR="fragParsingError",E.REMUX_ALLOC_ERROR="remuxAllocError",E.KEY_LOAD_ERROR="keyLoadError",E.KEY_LOAD_TIMEOUT="keyLoadTimeOut",E.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",E.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",E.BUFFER_APPEND_ERROR="bufferAppendError",E.BUFFER_APPENDING_ERROR="bufferAppendingError",E.BUFFER_STALLED_ERROR="bufferStalledError",E.BUFFER_FULL_ERROR="bufferFullError",E.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",E.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",E.INTERNAL_EXCEPTION="internalException",E.INTERNAL_ABORTED="aborted",E.UNKNOWN="unknown"})(P||(P={}))},"./src/events.ts":function(re,$,U){"use strict";U.r($),U.d($,"Events",function(){return S});var S;(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"})(S||(S={}))},"./src/hls.ts":function(re,$,U){"use strict";U.r($),U.d($,"default",function(){return b});var S=U("./node_modules/url-toolkit/src/url-toolkit.js"),P=U.n(S),E=U("./src/loader/playlist-loader.ts"),C=U("./src/loader/key-loader.ts"),w=U("./src/controller/id3-track-controller.ts"),u=U("./src/controller/latency-controller.ts"),p=U("./src/controller/level-controller.ts"),f=U("./src/controller/fragment-tracker.ts"),o=U("./src/controller/stream-controller.ts"),a=U("./src/is-supported.ts"),c=U("./src/utils/logger.ts"),s=U("./src/config.ts"),d=U("./node_modules/eventemitter3/index.js"),i=U.n(d),t=U("./src/events.ts"),n=U("./src/errors.ts");function h(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 _&&h(y.prototype,_),m&&h(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 d.EventEmitter,this._autoLevelCapping=void 0,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var 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 x=g.abrController,l=g.bufferController,T=g.capLevelController,A=g.fpsController,O=this.abrController=new x(this),D=this.bufferController=new l(this),I=this.capLevelController=new T(this),j=new A(this),B=new E.default(this),ee=new C.default(this),F=new w.default(this),G=this.levelController=new p.default(this),X=new f.FragmentTracker(this),Z=this.streamController=new o.default(this,X);I.setStreamController(Z),j.setStreamController(Z);var K=[G,Z];this.networkControllers=K;var q=[B,ee,O,D,I,j,F,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(u.default,null,q),this.coreComponents=q}var _=y.prototype;return _.createController=function(g,x,l){if(g){var T=x?new g(this,x):new g(this);return l&&l.push(T),T}return null},_.on=function(g,x,l){l===void 0&&(l=this),this._emitter.on(g,x,l)},_.once=function(g,x,l){l===void 0&&(l=this),this._emitter.once(g,x,l)},_.removeAllListeners=function(g){this._emitter.removeAllListeners(g)},_.off=function(g,x,l,T){l===void 0&&(l=this),this._emitter.off(g,x,l,T)},_.listeners=function(g){return this._emitter.listeners(g)},_.emit=function(g,x,l){return this._emitter.emit(g,x,l)},_.trigger=function(g,x){if(this.config.debug)return this.emit(g,g,x);try{return this.emit(g,g,x)}catch(l){c.logger.error("An internal error happened while handling event "+g+'. Error message: "'+l.message+'". Here is a stacktrace:',l),this.trigger(t.Events.ERROR,{type:n.ErrorTypes.OTHER_ERROR,details:n.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:g,error:l})}return!1},_.listenerCount=function(g){return this._emitter.listenerCount(g)},_.destroy=function(){c.logger.log("destroy"),this.trigger(t.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(t.Events.MEDIA_ATTACHING,{media:g})},_.detachMedia=function(){c.logger.log("detachMedia"),this.trigger(t.Events.MEDIA_DETACHING,void 0),this._media=null},_.loadSource=function(g){this.stopLoad();var x=this.media,l=this.url,T=this.url=S.buildAbsoluteURL(self.location.href,g,{alwaysNormalize:!0});c.logger.log("loadSource:"+T),x&&l&&l!==T&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(x)),this.trigger(t.Events.MANIFEST_LOADING,{url:g})},_.startLoad=function(g){g===void 0&&(g=-1),c.logger.log("startLoad("+g+")"),this.networkControllers.forEach(function(x){x.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,x){x===void 0&&(x=0),this.levelController.removeLevel(g,x)},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 x=!!g;x!==this.config.capLevelToPlayerSize&&(x?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=x)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(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,x=this.config.minAutoBitrate;if(!g)return 0;for(var l=g.length,T=0;T<l;T++)if(g[T].maxBitrate>x)return T;return 0}},{key:"maxAutoLevel",get:function(){var g=this.levels,x=this.autoLevelCapping,l;return x===-1&&g&&g.length?l=g.length-1:l=x,l}},{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 x=this.audioTrackController;x&&(x.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 x=this.subtitleTrackController;x&&(x.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 x=this.subtitleTrackController;x&&(x.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 t.Events}},{key:"ErrorTypes",get:function(){return n.ErrorTypes}},{key:"ErrorDetails",get:function(){return n.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(re,$,U){"use strict";U.r($),U.d($,"isSupported",function(){return E}),U.d($,"changeTypeSupported",function(){return C});var S=U("./src/utils/mediasource-helper.ts");function P(){return self.SourceBuffer||self.WebKitSourceBuffer}function E(){var w=Object(S.getMediaSource)();if(!w)return!1;var u=P(),p=w&&typeof w.isTypeSupported=="function"&&w.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),f=!u||u.prototype&&typeof u.prototype.appendBuffer=="function"&&typeof u.prototype.remove=="function";return!!p&&!!f}function C(){var w,u=P();return typeof(u==null||((w=u.prototype)===null||w===void 0)?void 0:w.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(re,$,U){"use strict";U.r($),U.d($,"default",function(){return c}),U.d($,"LoadError",function(){return d});var S=U("./src/polyfills/number.ts"),P=U("./src/errors.ts");function E(i,t){i.prototype=Object.create(t.prototype),i.prototype.constructor=i,f(i,t)}function C(i){var t=typeof Map=="function"?new Map:void 0;return C=function(h){if(h===null||!p(h))return h;if(typeof h!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t!="undefined"){if(t.has(h))return t.get(h);t.set(h,v)}function v(){return w(h,arguments,o(this).constructor)}return v.prototype=Object.create(h.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),f(v,h)},C(i)}function w(i,t,n){return u()?w=Reflect.construct:w=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},w.apply(null,arguments)}function u(){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,t){return f=Object.setPrototypeOf||function(h,v){return h.__proto__=v,h},f(i,t)}function o(i){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},o(i)}var a=Math.pow(2,17),c=function(){function i(n){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=n}var t=i.prototype;return t.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},t.abort=function(){this.loader&&this.loader.abort()},t.load=function(h,v){var b=this,y=h.url;if(!y)return Promise.reject(new d({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:h,networkDetails:null},"Fragment does not have a "+(y?"part list":"url")));this.abort();var _=this.config,m=_.fLoader,g=_.loader;return new Promise(function(x,l){b.loader&&b.loader.destroy();var T=b.loader=h.loader=m?new m(_):new g(_),A=s(h),O={timeout:_.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:_.fragLoadingMaxRetryTimeout,highWaterMark:a};h.stats=T.stats,T.load(A,O,{onSuccess:function(I,j,B,ee){b.resetLoader(h,T),x({frag:h,part:null,payload:I.data,networkDetails:ee})},onError:function(I,j,B){b.resetLoader(h,T),l(new d({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:h,response:I,networkDetails:B}))},onAbort:function(I,j,B){b.resetLoader(h,T),l(new d({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:h,networkDetails:B}))},onTimeout:function(I,j,B){b.resetLoader(h,T),l(new d({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:h,networkDetails:B}))},onProgress:function(I,j,B,ee){v&&v({frag:h,part:null,payload:B,networkDetails:ee})}})})},t.loadPart=function(h,v,b){var y=this;this.abort();var _=this.config,m=_.fLoader,g=_.loader;return new Promise(function(x,l){y.loader&&y.loader.destroy();var T=y.loader=h.loader=m?new m(_):new g(_),A=s(h,v),O={timeout:_.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:_.fragLoadingMaxRetryTimeout,highWaterMark:a};v.stats=T.stats,T.load(A,O,{onSuccess:function(I,j,B,ee){y.resetLoader(h,T),y.updateStatsFromPart(h,v);var F={frag:h,part:v,payload:I.data,networkDetails:ee};b(F),x(F)},onError:function(I,j,B){y.resetLoader(h,T),l(new d({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:h,part:v,response:I,networkDetails:B}))},onAbort:function(I,j,B){h.stats.aborted=v.stats.aborted,y.resetLoader(h,T),l(new d({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:h,part:v,networkDetails:B}))},onTimeout:function(I,j,B){y.resetLoader(h,T),l(new d({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:h,part:v,networkDetails:B}))}})})},t.updateStatsFromPart=function(h,v){var b=h.stats,y=v.stats,_=y.total;if(b.loaded+=y.loaded,_){var m=Math.round(h.duration/v.duration),g=Math.min(Math.round(b.loaded/_),m),x=m-g,l=x*Math.round(b.loaded/g);b.total=b.loaded+l}else b.total=Math.max(b.loaded,b.total);var T=b.loading,A=y.loading;T.start?T.first+=A.first-A.start:(T.start=A.start,T.first=A.first),T.end=A.end},t.resetLoader=function(h,v){h.loader=null,this.loader===v&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),v.destroy()},i}();function s(i,t){t===void 0&&(t=null);var n=t||i,h={frag:i,part:t,responseType:"arraybuffer",url:n.url,headers:{},rangeStart:0,rangeEnd:0},v=n.byteRangeStartOffset,b=n.byteRangeEndOffset;return Object(S.isFiniteNumber)(v)&&Object(S.isFiniteNumber)(b)&&(h.rangeStart=v,h.rangeEnd=b),h}var d=function(i){E(t,i);function t(n){for(var h,v=arguments.length,b=new Array(v>1?v-1:0),y=1;y<v;y++)b[y-1]=arguments[y];return h=i.call.apply(i,[this].concat(b))||this,h.data=void 0,h.data=n,h}return t}(C(Error))},"./src/loader/fragment.ts":function(re,$,U){"use strict";U.r($),U.d($,"ElementaryStreamTypes",function(){return c}),U.d($,"BaseSegment",function(){return s}),U.d($,"Fragment",function(){return d}),U.d($,"Part",function(){return i});var S=U("./src/polyfills/number.ts"),P=U("./node_modules/url-toolkit/src/url-toolkit.js"),E=U.n(P),C=U("./src/utils/logger.ts"),w=U("./src/loader/level-key.ts"),u=U("./src/loader/load-stats.ts");function p(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,f(t,n)}function f(t,n){return f=Object.setPrototypeOf||function(v,b){return v.__proto__=b,v},f(t,n)}function o(t,n){for(var h=0;h<n.length;h++){var v=n[h];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(t,v.key,v)}}function a(t,n,h){return n&&o(t.prototype,n),h&&o(t,h),t}var c;(function(t){t.AUDIO="audio",t.VIDEO="video",t.AUDIOVIDEO="audiovideo"})(c||(c={}));var s=function(){function t(h){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=h}var n=t.prototype;return n.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(t,[{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}}]),t}(),d=function(t){p(n,t);function n(v,b){var y;return y=t.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 u.LoadStats,y.urlId=0,y.data=void 0,y.bitrateTest=!1,y.title=null,y.initSegment=null,y.type=v,y}var h=n.prototype;return h.createInitializationVector=function(b){for(var y=new Uint8Array(16),_=12;_<16;_++)y[_]=b>>8*(15-_)&255;return y},h.setDecryptDataFromLevelKey=function(b,y){var _=b;return(b==null?void 0:b.method)==="AES-128"&&b.uri&&!b.iv&&(_=w.LevelKey.fromURI(b.uri),_.method=b.method,_.iv=this.createInitializationVector(y),_.keyFormat="identity"),_},h.setElementaryStreamInfo=function(b,y,_,m,g,x){x===void 0&&(x=!1);var l=this.elementaryStreams,T=l[b];if(!T){l[b]={startPTS:y,endPTS:_,startDTS:m,endDTS:g,partial:x};return}T.startPTS=Math.min(T.startPTS,y),T.endPTS=Math.max(T.endPTS,_),T.startDTS=Math.min(T.startDTS,m),T.endDTS=Math.max(T.endDTS,g)},h.clearElementaryStreamInfo=function(){var b=this.elementaryStreams;b[c.AUDIO]=null,b[c.VIDEO]=null,b[c.AUDIOVIDEO]=null},a(n,[{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(S.isFiniteNumber)(this.programDateTime))return null;var b=Object(S.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)}}]),n}(s),i=function(t){p(n,t);function n(h,v,b,y,_){var m;m=t.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 u.LoadStats,m.duration=h.decimalFloatingPoint("DURATION"),m.gap=h.bool("GAP"),m.independent=h.bool("INDEPENDENT"),m.relurl=h.enumeratedString("URI"),m.fragment=v,m.index=y;var g=h.enumeratedString("BYTERANGE");return g&&m.setByteRange(g,_),_&&(m.fragOffset=_.fragOffset+_.duration),m}return a(n,[{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)}}]),n}(s)},"./src/loader/key-loader.ts":function(re,$,U){"use strict";U.r($),U.d($,"default",function(){return C});var S=U("./src/events.ts"),P=U("./src/errors.ts"),E=U("./src/utils/logger.ts"),C=function(){function w(p){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=p,this._registerListeners()}var u=w.prototype;return u._registerListeners=function(){this.hls.on(S.Events.KEY_LOADING,this.onKeyLoading,this)},u._unregisterListeners=function(){this.hls.off(S.Events.KEY_LOADING,this.onKeyLoading)},u.destroy=function(){this._unregisterListeners();for(var f in this.loaders){var o=this.loaders[f];o&&o.destroy()}this.loaders={}},u.onKeyLoading=function(f,o){var a=o.frag,c=a.type,s=this.loaders[c];if(!a.decryptdata){E.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var d=a.decryptdata.uri;if(d!==this.decrypturl||this.decryptkey===null){var i=this.hls.config;if(s&&(E.logger.warn("abort previous key loader for type:"+c),s.abort()),!d){E.logger.warn("key uri is falsy");return}var t=i.loader,n=a.loader=this.loaders[c]=new t(i);this.decrypturl=d,this.decryptkey=null;var h={url:d,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)};n.load(h,v,b)}else this.decryptkey&&(a.decryptdata.key=this.decryptkey,this.hls.trigger(S.Events.KEY_LOADED,{frag:a}))},u.loadsuccess=function(f,o,a){var c=a.frag;if(!c.decryptdata){E.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(S.Events.KEY_LOADED,{frag:c})},u.loaderror=function(f,o){var a=o.frag,c=a.loader;c&&c.abort(),delete this.loaders[a.type],this.hls.trigger(S.Events.ERROR,{type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:a,response:f})},u.loadtimeout=function(f,o){var a=o.frag,c=a.loader;c&&c.abort(),delete this.loaders[a.type],this.hls.trigger(S.Events.ERROR,{type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:a})},w}()},"./src/loader/level-details.ts":function(re,$,U){"use strict";U.r($),U.d($,"LevelDetails",function(){return w});var S=U("./src/polyfills/number.ts");function P(u,p){for(var f=0;f<p.length;f++){var o=p[f];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(u,o.key,o)}}function E(u,p,f){return p&&P(u.prototype,p),f&&P(u,f),u}var C=10,w=function(){function u(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=u.prototype;return p.reloaded=function(o){if(!o){this.advanced=!0,this.updated=!0;return}var a=this.lastPartSn-o.lastPartSn,c=this.lastPartIndex-o.lastPartIndex;this.updated=this.endSN!==o.endSN||!!c||!!a,this.advanced=this.endSN>o.endSN||a>0||a===0&&c>0,this.updated||this.advanced?this.misses=Math.floor(o.misses*.6):this.misses=o.misses+1,this.availabilityDelay=o.availabilityDelay},E(u,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(S.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||C}},{key:"drift",get:function(){var o=this.driftEndTime-this.driftStartTime;if(o>0){var a=this.driftEnd-this.driftStart;return a*1e3/o}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var o;return(o=this.partList)!==null&&o!==void 0&&o.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var o;return(o=this.fragments)!==null&&o!==void 0&&o.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 o;return(o=this.partList)!==null&&o!==void 0&&o.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var o;return(o=this.partList)!==null&&o!==void 0&&o.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),u}()},"./src/loader/level-key.ts":function(re,$,U){"use strict";U.r($),U.d($,"LevelKey",function(){return w});var S=U("./node_modules/url-toolkit/src/url-toolkit.js"),P=U.n(S);function E(u,p){for(var f=0;f<p.length;f++){var o=p[f];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(u,o.key,o)}}function C(u,p,f){return p&&E(u.prototype,p),f&&E(u,f),u}var w=function(){u.fromURL=function(f,o){return new u(f,o)},u.fromURI=function(f){return new u(f)};function u(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(S.buildAbsoluteURL)(p,f,{alwaysNormalize:!0}):this._uri=p}return C(u,[{key:"uri",get:function(){return this._uri}}]),u}()},"./src/loader/load-stats.ts":function(re,$,U){"use strict";U.r($),U.d($,"LoadStats",function(){return S});var S=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(re,$,U){"use strict";U.r($),U.d($,"default",function(){return n});var S=U("./src/polyfills/number.ts"),P=U("./node_modules/url-toolkit/src/url-toolkit.js"),E=U.n(P),C=U("./src/loader/fragment.ts"),w=U("./src/loader/level-details.ts"),u=U("./src/loader/level-key.ts"),p=U("./src/utils/attr-list.ts"),f=U("./src/utils/logger.ts"),o=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"),d=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(PLAYLIST-TYPE):(.+)/.source,/#EXT-X-(MEDIA-SEQUENCE): *(\d+)/.source,/#EXT-X-(SKIP):(.+)/.source,/#EXT-X-(TARGETDURATION): *(\d+)/.source,/#EXT-X-(KEY):(.+)/.source,/#EXT-X-(START):(.+)/.source,/#EXT-X-(ENDLIST)/.source,/#EXT-X-(DISCONTINUITY-SEQ)UENCE: *(\d+)/.source,/#EXT-X-(DIS)CONTINUITY/.source,/#EXT-X-(VERSION):(\d+)/.source,/#EXT-X-(MAP):(.+)/.source,/#EXT-X-(SERVER-CONTROL):(.+)/.source,/#EXT-X-(PART-INF):(.+)/.source,/#EXT-X-(GAP)/.source,/#EXT-X-(BITRATE):\s*(\d+)/.source,/#EXT-X-(PART):(.+)/.source,/#EXT-X-(PRELOAD-HINT):(.+)/.source,/#EXT-X-(RENDITION-REPORT):(.+)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),i=/\.(mp4|m4s|m4v|m4a)$/i;function t(_){var m,g;return i.test((m=(g=P.parseURL(_))===null||g===void 0?void 0:g.path)!=null?m:"")}var n=function(){function _(){}return _.findGroup=function(g,x){for(var l=0;l<g.length;l++){var T=g[l];if(T.id===x)return T}},_.convertAVC1ToAVCOTI=function(g){var x=g.split(".");if(x.length>2){var l=x.shift()+".";return l+=parseInt(x.shift()).toString(16),l+=("000"+parseInt(x.shift()).toString(16)).substr(-4),l}return g},_.resolve=function(g,x){return P.buildAbsoluteURL(x,g,{alwaysNormalize:!0})},_.parseMasterPlaylist=function(g,x){var l=[],T={},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],x)},j=D.decimalResolution("RESOLUTION");j&&(I.width=j.width,I.height=j.height),h((D.CODECS||"").split(/[ ,]+/).filter(function(ee){return ee}),I),I.videoCodec&&I.videoCodec.indexOf("avc1")!==-1&&(I.videoCodec=_.convertAVC1ToAVCOTI(I.videoCodec)),l.push(I)}else if(O[3]){var B=new p.AttrList(O[3]);B["DATA-ID"]&&(A=!0,T[B["DATA-ID"]]=B)}return{levels:l,sessionData:A?T:null}},_.parseMasterPlaylistMedia=function(g,x,l,T){T===void 0&&(T=[]);var A,O=[],D=0;for(c.lastIndex=0;(A=c.exec(g))!==null;){var I=new p.AttrList(A[1]);if(I.TYPE===l){var j={attrs:I,bitrate:0,id:D++,groupId:I["GROUP-ID"],instreamId:I["INSTREAM-ID"],name:I.NAME||I.LANGUAGE||"",type:l,default:I.bool("DEFAULT"),autoselect:I.bool("AUTOSELECT"),forced:I.bool("FORCED"),lang:I.LANGUAGE,url:I.URI?_.resolve(I.URI,x):""};if(T.length){var B=_.findGroup(T,j.groupId)||T[0];v(j,B,"audioCodec"),v(j,B,"textCodec")}O.push(j)}}return O},_.parseLevelPlaylist=function(g,x,l,T,A){var O=new w.LevelDetails(x),D=O.fragments,I=null,j=0,B=0,ee=0,F=0,G=null,X=new C.Fragment(T,x),Z,K,q,ae=-1,oe=!1;for(s.lastIndex=0,O.m3u8=g;(Z=s.exec(g))!==null;){oe&&(oe=!1,X=new C.Fragment(T,x),X.start=ee,X.sn=j,X.cc=F,X.level=l,I&&(X.initSegment=I,X.rawProgramDateTime=I.rawProgramDateTime));var ve=Z[1];if(ve){X.duration=parseFloat(ve);var he=(" "+Z[2]).slice(1);X.title=he||null,X.tagList.push(he?["INF",ve,he]:["INF",ve])}else if(Z[3])Object(S.isFiniteNumber)(X.duration)&&(X.start=ee,q&&(X.levelkey=q),X.sn=j,X.level=l,X.cc=F,X.urlId=A,D.push(X),X.relurl=(" "+Z[3]).slice(1),y(X,G),G=X,ee+=X.duration,j++,B=0,oe=!0);else if(Z[4]){var _e=(" "+Z[4]).slice(1);G?X.setByteRange(_e,G):X.setByteRange(_e)}else if(Z[5])X.rawProgramDateTime=(" "+Z[5]).slice(1),X.tagList.push(["PROGRAM-DATE-TIME",X.rawProgramDateTime]),ae===-1&&(ae=D.length);else{if(Z=Z[0].match(d),!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),xe=(" "+Z[K+1]).slice(1),je=Z[K+2]?(" "+Z[K+2]).slice(1):"";switch(fe){case"PLAYLIST-TYPE":O.type=xe.toUpperCase();break;case"MEDIA-SEQUENCE":j=O.startSN=parseInt(xe);break;case"SKIP":{var Le=new p.AttrList(xe),ke=Le.decimalInteger("SKIPPED-SEGMENTS");if(Object(S.isFiniteNumber)(ke)){O.skippedSegments=ke;for(var Fe=ke;Fe--;)D.unshift(null);j+=ke}var ge=Le.enumeratedString("RECENTLY-REMOVED-DATERANGES");ge&&(O.recentlyRemovedDateranges=ge.split(" "));break}case"TARGETDURATION":O.targetduration=parseFloat(xe);break;case"VERSION":O.version=parseInt(xe);break;case"EXTM3U":break;case"ENDLIST":O.live=!1;break;case"#":(xe||je)&&X.tagList.push(je?[xe,je]:[xe]);break;case"DIS":F++;case"GAP":X.tagList.push([fe]);break;case"BITRATE":X.tagList.push([fe,xe]);break;case"DISCONTINUITY-SEQ":F=parseInt(xe);break;case"KEY":{var ce,Ie=new p.AttrList(xe),Ne=Ie.enumeratedString("METHOD"),Xe=Ie.URI,te=Ie.hexadecimalInteger("IV"),k=Ie.enumeratedString("KEYFORMATVERSIONS"),N=Ie.enumeratedString("KEYID"),J=(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(J)>-1){f.logger.warn("Keyformat "+J+" is not supported from the manifest");continue}else if(J!=="identity")continue;Ne&&(q=u.LevelKey.fromURL(x,Xe),Xe&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(Ne)>=0&&(q.method=Ne,q.keyFormat=J,N&&(q.keyID=N),k&&(q.keyFormatVersions=k),q.iv=te));break}case"START":{var Y=new p.AttrList(xe),me=Y.decimalFloatingPoint("TIME-OFFSET");Object(S.isFiniteNumber)(me)&&(O.startTimeOffset=me);break}case"MAP":{var Ae=new p.AttrList(xe);X.relurl=Ae.URI,Ae.BYTERANGE&&X.setByteRange(Ae.BYTERANGE),X.level=l,X.sn="initSegment",q&&(X.levelkey=q),X.initSegment=null,I=X,oe=!0;break}case"SERVER-CONTROL":{var at=new p.AttrList(xe);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 Re=new p.AttrList(xe);O.partTarget=Re.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Pe=O.partList;Pe||(Pe=O.partList=[]);var Ye=B>0?Pe[Pe.length-1]:void 0,Ze=B++,ze=new C.Part(new p.AttrList(xe),X,x,Ze,Ye);Pe.push(ze),X.duration+=ze.duration;break}case"PRELOAD-HINT":{var We=new p.AttrList(xe);O.preloadHint=We;break}case"RENDITION-REPORT":{var Me=new p.AttrList(xe);O.renditionReports=O.renditionReports||[],O.renditionReports.push(Me);break}default:f.logger.warn("line parsed but not handled: "+Z);break}}}G&&!G.relurl?(D.pop(),ee-=G.duration,O.partList&&(O.fragmentHint=G)):O.partList&&(y(X,G),X.cc=F,O.fragmentHint=X);var De=D.length,Oe=D[0],pe=D[De-1];if(ee+=O.skippedSegments*O.targetduration,ee>0&&De&&pe){O.averagetargetduration=ee/De;var be=pe.sn;O.endSN=be!=="initSegment"?be:0,Oe&&(O.startCC=Oe.cc,Oe.initSegment||O.fragments.every(function(Ce){return Ce.relurl&&t(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(T,x),X.relurl=pe.relurl,X.level=l,X.sn="initSegment",Oe.initSegment=X,O.needSidxRanges=!0))}else O.endSN=0,O.startCC=0;return O.fragmentHint&&(ee+=O.fragmentHint.duration),O.totalduration=ee,O.endCC=F,ae>0&&b(D,ae),O},_}();function h(_,m){["video","audio","text"].forEach(function(g){var x=_.filter(function(T){return Object(o.isCodecType)(T,g)});if(x.length){var l=x.filter(function(T){return T.lastIndexOf("avc1",0)===0||T.lastIndexOf("mp4a",0)===0});m[g+"Codec"]=l.length>0?l[0]:x[0],_=_.filter(function(T){return x.indexOf(T)===-1})}}),m.unknownCodecs=_}function v(_,m,g){var x=m[g];x&&(_[g]=x)}function b(_,m){for(var g=_[m],x=m;x--;){var l=_[x];if(!l)return;l.programDateTime=g.programDateTime-l.duration*1e3,g=l}}function y(_,m){_.rawProgramDateTime?_.programDateTime=Date.parse(_.rawProgramDateTime):m!=null&&m.programDateTime&&(_.programDateTime=m.endProgramDateTime),Object(S.isFiniteNumber)(_.programDateTime)||(_.programDateTime=null,_.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(re,$,U){"use strict";U.r($);var S=U("./src/polyfills/number.ts"),P=U("./src/events.ts"),E=U("./src/errors.ts"),C=U("./src/utils/logger.ts"),w=U("./src/utils/mp4-tools.ts"),u=U("./src/loader/m3u8-parser.ts"),p=U("./src/types/loader.ts"),f=U("./src/utils/attr-list.ts");function o(s){var d=s.type;switch(d){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,d){var i=s.url;return(i===void 0||i.indexOf("data:")===0)&&(i=d.url),i}var c=function(){function s(i){this.hls=void 0,this.loaders=Object.create(null),this.hls=i,this.registerListeners()}var d=s.prototype;return d.registerListeners=function(){var t=this.hls;t.on(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.on(P.Events.LEVEL_LOADING,this.onLevelLoading,this),t.on(P.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),t.on(P.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},d.unregisterListeners=function(){var t=this.hls;t.off(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(P.Events.LEVEL_LOADING,this.onLevelLoading,this),t.off(P.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),t.off(P.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},d.createInternalLoader=function(t){var n=this.hls.config,h=n.pLoader,v=n.loader,b=h||v,y=new b(n);return t.loader=y,this.loaders[t.type]=y,y},d.getInternalLoader=function(t){return this.loaders[t.type]},d.resetInternalLoader=function(t){this.loaders[t]&&delete this.loaders[t]},d.destroyInternalLoaders=function(){for(var t in this.loaders){var n=this.loaders[t];n&&n.destroy(),this.resetInternalLoader(t)}},d.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},d.onManifestLoading=function(t,n){var h=n.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:p.PlaylistContextType.MANIFEST,url:h,deliveryDirectives:null})},d.onLevelLoading=function(t,n){var h=n.id,v=n.level,b=n.url,y=n.deliveryDirectives;this.load({id:h,groupId:null,level:v,responseType:"text",type:p.PlaylistContextType.LEVEL,url:b,deliveryDirectives:y})},d.onAudioTrackLoading=function(t,n){var h=n.id,v=n.groupId,b=n.url,y=n.deliveryDirectives;this.load({id:h,groupId:v,level:null,responseType:"text",type:p.PlaylistContextType.AUDIO_TRACK,url:b,deliveryDirectives:y})},d.onSubtitleTrackLoading=function(t,n){var h=n.id,v=n.groupId,b=n.url,y=n.deliveryDirectives;this.load({id:h,groupId:v,level:null,responseType:"text",type:p.PlaylistContextType.SUBTITLE_TRACK,url:b,deliveryDirectives:y})},d.load=function(t){var n,h=this.hls.config,v=this.getInternalLoader(t);if(v){var b=v.context;if(b&&b.url===t.url){C.logger.trace("[playlist-loader]: playlist request ongoing");return}C.logger.log("[playlist-loader]: aborting previous loader for type: "+t.type),v.abort()}var y,_,m,g;switch(t.type){case p.PlaylistContextType.MANIFEST:y=h.manifestLoadingMaxRetry,_=h.manifestLoadingTimeOut,m=h.manifestLoadingRetryDelay,g=h.manifestLoadingMaxRetryTimeout;break;case p.PlaylistContextType.LEVEL:case p.PlaylistContextType.AUDIO_TRACK:case p.PlaylistContextType.SUBTITLE_TRACK:y=0,_=h.levelLoadingTimeOut;break;default:y=h.levelLoadingMaxRetry,_=h.levelLoadingTimeOut,m=h.levelLoadingRetryDelay,g=h.levelLoadingMaxRetryTimeout;break}if(v=this.createInternalLoader(t),(n=t.deliveryDirectives)!==null&&n!==void 0&&n.part){var x;if(t.type===p.PlaylistContextType.LEVEL&&t.level!==null?x=this.hls.levels[t.level].details:t.type===p.PlaylistContextType.AUDIO_TRACK&&t.id!==null?x=this.hls.audioTracks[t.id].details:t.type===p.PlaylistContextType.SUBTITLE_TRACK&&t.id!==null&&(x=this.hls.subtitleTracks[t.id].details),x){var l=x.partTarget,T=x.targetduration;l&&T&&(_=Math.min(Math.max(l*3,T*.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(t,A,O)},d.loadsuccess=function(t,n,h,v){if(v===void 0&&(v=null),h.isSidxRequest){this.handleSidxRequest(t,h),this.handlePlaylistLoaded(t,n,h,v);return}this.resetInternalLoader(h.type);var b=t.data;if(b.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(t,h,"no EXTM3U delimiter",v);return}n.parsing.start=performance.now(),b.indexOf("#EXTINF:")>0||b.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(t,n,h,v):this.handleMasterPlaylist(t,n,h,v)},d.loaderror=function(t,n,h){h===void 0&&(h=null),this.handleNetworkError(n,h,!1,t)},d.loadtimeout=function(t,n,h){h===void 0&&(h=null),this.handleNetworkError(n,h,!0)},d.handleMasterPlaylist=function(t,n,h,v){var b=this.hls,y=t.data,_=a(t,h),m=u.default.parseMasterPlaylist(y,_),g=m.levels,x=m.sessionData;if(!g.length){this.handleManifestParsingError(t,h,"no level found in manifest",v);return}var l=g.map(function(j){return{id:j.attrs.AUDIO,audioCodec:j.audioCodec}}),T=g.map(function(j){return{id:j.attrs.SUBTITLES,textCodec:j.textCodec}}),A=u.default.parseMasterPlaylistMedia(y,_,"AUDIO",l),O=u.default.parseMasterPlaylistMedia(y,_,"SUBTITLES",T),D=u.default.parseMasterPlaylistMedia(y,_,"CLOSED-CAPTIONS");if(A.length){var I=A.some(function(j){return!j.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:n,networkDetails:v,sessionData:x})},d.handleTrackOrLevelPlaylist=function(t,n,h,v){var b=this.hls,y=h.id,_=h.level,m=h.type,g=a(t,h),x=Object(S.isFiniteNumber)(y)?y:0,l=Object(S.isFiniteNumber)(_)?_:x,T=o(h),A=u.default.parseLevelPlaylist(t.data,g,l,T,x);if(!A.fragments.length){b.trigger(P.Events.ERROR,{type:E.ErrorTypes.NETWORK_ERROR,details:E.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:g,reason:"no fragments found in level",level:typeof h.level=="number"?h.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:n,networkDetails:v,sessionData:null})}if(n.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}h.levelDetails=A,this.handlePlaylistLoaded(t,n,h,v)},d.handleSidxRequest=function(t,n){var h=Object(w.parseSegmentIndex)(new Uint8Array(t.data));if(!h)return;var v=h.references,b=n.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(h.moovEndOffset)+"@0")})},d.handleManifestParsingError=function(t,n,h,v){this.hls.trigger(P.Events.ERROR,{type:E.ErrorTypes.NETWORK_ERROR,details:E.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:n.type===p.PlaylistContextType.MANIFEST,url:t.url,reason:h,response:t,context:n,networkDetails:v})},d.handleNetworkError=function(t,n,h,v){h===void 0&&(h=!1),C.logger.warn("[playlist-loader]: A network "+(h?"timeout":"error")+" occurred while loading "+t.type+" level: "+t.level+" id: "+t.id+' group-id: "'+t.groupId+'"');var b=E.ErrorDetails.UNKNOWN,y=!1,_=this.getInternalLoader(t);switch(t.type){case p.PlaylistContextType.MANIFEST:b=h?E.ErrorDetails.MANIFEST_LOAD_TIMEOUT:E.ErrorDetails.MANIFEST_LOAD_ERROR,y=!0;break;case p.PlaylistContextType.LEVEL:b=h?E.ErrorDetails.LEVEL_LOAD_TIMEOUT:E.ErrorDetails.LEVEL_LOAD_ERROR,y=!1;break;case p.PlaylistContextType.AUDIO_TRACK:b=h?E.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:E.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,y=!1;break;case p.PlaylistContextType.SUBTITLE_TRACK:b=h?E.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:E.ErrorDetails.SUBTITLE_LOAD_ERROR,y=!1;break}_&&this.resetInternalLoader(t.type);var m={type:E.ErrorTypes.NETWORK_ERROR,details:b,fatal:y,url:t.url,loader:_,context:t,networkDetails:n};v&&(m.response=v),this.hls.trigger(P.Events.ERROR,m)},d.handlePlaylistLoaded=function(t,n,h,v){var b=h.type,y=h.level,_=h.id,m=h.groupId,g=h.loader,x=h.levelDetails,l=h.deliveryDirectives;if(!(x!=null&&x.targetduration)){this.handleManifestParsingError(t,h,"invalid target duration",v);return}if(!g)return;x.live&&(g.getCacheAge&&(x.ageHeader=g.getCacheAge()||0),(!g.getCacheAge||isNaN(x.ageHeader))&&(x.ageHeader=0));switch(b){case p.PlaylistContextType.MANIFEST:case p.PlaylistContextType.LEVEL:this.hls.trigger(P.Events.LEVEL_LOADED,{details:x,level:y||0,id:_||0,stats:n,networkDetails:v,deliveryDirectives:l});break;case p.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(P.Events.AUDIO_TRACK_LOADED,{details:x,id:_||0,groupId:m||"",stats:n,networkDetails:v,deliveryDirectives:l});break;case p.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(P.Events.SUBTITLE_TRACK_LOADED,{details:x,id:_||0,groupId:m||"",stats:n,networkDetails:v,deliveryDirectives:l});break}},s}();$.default=c},"./src/polyfills/number.ts":function(re,$,U){"use strict";U.r($),U.d($,"isFiniteNumber",function(){return S}),U.d($,"MAX_SAFE_INTEGER",function(){return P});var S=Number.isFinite||function(E){return typeof E=="number"&&isFinite(E)},P=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(re,$,U){"use strict";U.r($);var S=function(){function P(){}return P.getSilentFrame=function(C,w){switch(C){case"mp4a.40.2":if(w===1)return new Uint8Array([0,200,0,128,35,128]);if(w===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(w===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(w===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(w===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(w===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(w===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(w===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(w===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}();$.default=S},"./src/remux/mp4-generator.ts":function(re,$,U){"use strict";U.r($);var S=Math.pow(2,32)-1,P=function(){function E(){}return E.init=function(){E.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 w;for(w in E.types)E.types.hasOwnProperty(w)&&(E.types[w]=[w.charCodeAt(0),w.charCodeAt(1),w.charCodeAt(2),w.charCodeAt(3)]);var u=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]);E.HDLR_TYPES={video:u,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]),o=new Uint8Array([0,0,0,0,0,0,0,0]);E.STTS=E.STSC=E.STCO=o,E.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),E.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),E.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),E.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]);E.FTYP=E.box(E.types.ftyp,a,s,a,c),E.DINF=E.box(E.types.dinf,E.box(E.types.dref,f))},E.box=function(w){for(var u=8,p=arguments.length,f=new Array(p>1?p-1:0),o=1;o<p;o++)f[o-1]=arguments[o];for(var a=f.length,c=a;a--;)u+=f[a].byteLength;var s=new Uint8Array(u);for(s[0]=u>>24&255,s[1]=u>>16&255,s[2]=u>>8&255,s[3]=u&255,s.set(w,4),a=0,u=8;a<c;a++)s.set(f[a],u),u+=f[a].byteLength;return s},E.hdlr=function(w){return E.box(E.types.hdlr,E.HDLR_TYPES[w])},E.mdat=function(w){return E.box(E.types.mdat,w)},E.mdhd=function(w,u){u*=w;var p=Math.floor(u/(S+1)),f=Math.floor(u%(S+1));return E.box(E.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,w>>24&255,w>>16&255,w>>8&255,w&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]))},E.mdia=function(w){return E.box(E.types.mdia,E.mdhd(w.timescale,w.duration),E.hdlr(w.type),E.minf(w))},E.mfhd=function(w){return E.box(E.types.mfhd,new Uint8Array([0,0,0,0,w>>24,w>>16&255,w>>8&255,w&255]))},E.minf=function(w){return w.type==="audio"?E.box(E.types.minf,E.box(E.types.smhd,E.SMHD),E.DINF,E.stbl(w)):E.box(E.types.minf,E.box(E.types.vmhd,E.VMHD),E.DINF,E.stbl(w))},E.moof=function(w,u,p){return E.box(E.types.moof,E.mfhd(w),E.traf(p,u))},E.moov=function(w){for(var u=w.length,p=[];u--;)p[u]=E.trak(w[u]);return E.box.apply(null,[E.types.moov,E.mvhd(w[0].timescale,w[0].duration)].concat(p).concat(E.mvex(w)))},E.mvex=function(w){for(var u=w.length,p=[];u--;)p[u]=E.trex(w[u]);return E.box.apply(null,[E.types.mvex].concat(p))},E.mvhd=function(w,u){u*=w;var p=Math.floor(u/(S+1)),f=Math.floor(u%(S+1)),o=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,w>>24&255,w>>16&255,w>>8&255,w&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 E.box(E.types.mvhd,o)},E.sdtp=function(w){var u=w.samples||[],p=new Uint8Array(4+u.length),f,o;for(f=0;f<u.length;f++)o=u[f].flags,p[f+4]=o.dependsOn<<4|o.isDependedOn<<2|o.hasRedundancy;return E.box(E.types.sdtp,p)},E.stbl=function(w){return E.box(E.types.stbl,E.stsd(w),E.box(E.types.stts,E.STTS),E.box(E.types.stsc,E.STSC),E.box(E.types.stsz,E.STSZ),E.box(E.types.stco,E.STCO))},E.avc1=function(w){var u=[],p=[],f,o,a;for(f=0;f<w.sps.length;f++)o=w.sps[f],a=o.byteLength,u.push(a>>>8&255),u.push(a&255),u=u.concat(Array.prototype.slice.call(o));for(f=0;f<w.pps.length;f++)o=w.pps[f],a=o.byteLength,p.push(a>>>8&255),p.push(a&255),p=p.concat(Array.prototype.slice.call(o));var c=E.box(E.types.avcC,new Uint8Array([1,u[3],u[4],u[5],252|3,224|w.sps.length].concat(u).concat([w.pps.length]).concat(p))),s=w.width,d=w.height,i=w.pixelRatio[0],t=w.pixelRatio[1];return E.box(E.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,s>>8&255,s&255,d>>8&255,d&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),c,E.box(E.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),E.box(E.types.pasp,new Uint8Array([i>>24,i>>16&255,i>>8&255,i&255,t>>24,t>>16&255,t>>8&255,t&255])))},E.esds=function(w){var u=w.config.length;return new Uint8Array([0,0,0,0,3,23+u,0,1,0,4,15+u,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([u]).concat(w.config).concat([6,1,2]))},E.mp4a=function(w){var u=w.samplerate;return E.box(E.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,w.channelCount,0,16,0,0,0,0,u>>8&255,u&255,0,0]),E.box(E.types.esds,E.esds(w)))},E.mp3=function(w){var u=w.samplerate;return E.box(E.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,w.channelCount,0,16,0,0,0,0,u>>8&255,u&255,0,0]))},E.stsd=function(w){return w.type==="audio"?!w.isAAC&&w.codec==="mp3"?E.box(E.types.stsd,E.STSD,E.mp3(w)):E.box(E.types.stsd,E.STSD,E.mp4a(w)):E.box(E.types.stsd,E.STSD,E.avc1(w))},E.tkhd=function(w){var u=w.id,p=w.duration*w.timescale,f=w.width,o=w.height,a=Math.floor(p/(S+1)),c=Math.floor(p%(S+1));return E.box(E.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,u>>24&255,u>>16&255,u>>8&255,u&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,o>>8&255,o&255,0,0]))},E.traf=function(w,u){var p=E.sdtp(w),f=w.id,o=Math.floor(u/(S+1)),a=Math.floor(u%(S+1));return E.box(E.types.traf,E.box(E.types.tfhd,new Uint8Array([0,0,0,0,f>>24,f>>16&255,f>>8&255,f&255])),E.box(E.types.tfdt,new Uint8Array([1,0,0,0,o>>24,o>>16&255,o>>8&255,o&255,a>>24,a>>16&255,a>>8&255,a&255])),E.trun(w,p.length+16+20+8+16+8+8),p)},E.trak=function(w){return w.duration=w.duration||4294967295,E.box(E.types.trak,E.tkhd(w),E.mdia(w))},E.trex=function(w){var u=w.id;return E.box(E.types.trex,new Uint8Array([0,0,0,0,u>>24,u>>16&255,u>>8&255,u&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},E.trun=function(w,u){var p=w.samples||[],f=p.length,o=12+16*f,a=new Uint8Array(o),c,s,d,i,t,n;for(u+=8+o,a.set([0,0,15,1,f>>>24&255,f>>>16&255,f>>>8&255,f&255,u>>>24&255,u>>>16&255,u>>>8&255,u&255],0),c=0;c<f;c++)s=p[c],d=s.duration,i=s.size,t=s.flags,n=s.cts,a.set([d>>>24&255,d>>>16&255,d>>>8&255,d&255,i>>>24&255,i>>>16&255,i>>>8&255,i&255,t.isLeading<<2|t.dependsOn,t.isDependedOn<<6|t.hasRedundancy<<4|t.paddingValue<<1|t.isNonSync,t.degradPrio&240<<8,t.degradPrio&15,n>>>24&255,n>>>16&255,n>>>8&255,n&255],12+16*c);return E.box(E.types.trun,a)},E.initSegment=function(w){E.types||E.init();var u=E.moov(w),p=new Uint8Array(E.FTYP.byteLength+u.byteLength);return p.set(E.FTYP),p.set(u,E.FTYP.byteLength),p},E}();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,$.default=P},"./src/remux/mp4-remuxer.ts":function(re,$,U){"use strict";U.r($),U.d($,"default",function(){return n}),U.d($,"normalizePts",function(){return h});var S=U("./src/polyfills/number.ts"),P=U("./src/remux/aac-helper.ts"),E=U("./src/remux/mp4-generator.ts"),C=U("./src/events.ts"),w=U("./src/errors.ts"),u=U("./src/utils/logger.ts"),p=U("./src/types/loader.ts"),f=U("./src/utils/timescale-conversion.ts");function o(){return o=Object.assign||function(_){for(var m=1;m<arguments.length;m++){var g=arguments[m];for(var x in g)Object.prototype.hasOwnProperty.call(g,x)&&(_[x]=g[x])}return _},o.apply(this,arguments)}var a=10*1e3,c=1024,s=1152,d=null,i=null,t=!1,n=function(){function _(g,x,l,T){if(T===void 0&&(T=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=g,this.config=x,this.typeSupported=l,this.ISGenerated=!1,d===null){var A=navigator.userAgent||"",O=A.match(/Chrome\/(\d+)/i);d=O?parseInt(O[1]):0}if(i===null){var D=navigator.userAgent.match(/Safari\/(\d+)/i);i=D?parseInt(D[1]):0}t=!!d&&d<75||!!i&&i<600}var m=_.prototype;return m.destroy=function(){},m.resetTimeStamp=function(x){u.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=x},m.resetNextTimestamp=function(){u.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},m.resetInitSegment=function(){u.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},m.getVideoStartPts=function(x){var l=!1,T=x.reduce(function(A,O){var D=O.pts-A;return D<-4294967296?(l=!0,h(A,O.pts)):D>0?A:O.pts},x[0].pts);return l&&u.logger.debug("PTS rollover detected"),T},m.remux=function(x,l,T,A,O,D,I,j){var B,ee,F,G,X,Z,K=O,q=O,ae=x.pid>-1,oe=l.pid>-1,ve=l.samples.length,he=x.samples.length>0,_e=ve>1,fe=(!ae||he)&&(!oe||_e)||this.ISGenerated||I;if(fe){this.ISGenerated||(F=this.generateIS(x,l,O));var xe=this.isVideoContiguous,je=-1;if(_e&&(je=v(l.samples),!xe&&this.config.forceKeyFrameOnDiscontinuity))if(Z=!0,je>0){u.logger.warn("[mp4-remuxer]: Dropped "+je+" out of "+ve+" video samples due to a missing keyframe");var Le=this.getVideoStartPts(l.samples);l.samples=l.samples.slice(je),l.dropped+=je,q+=(l.samples[0].pts-Le)/(l.timescale||9e4)}else je===-1&&(u.logger.warn("[mp4-remuxer]: No keyframe found out of "+ve+" video samples"),Z=!1);if(this.ISGenerated){if(he&&_e){var ke=this.getVideoStartPts(l.samples),Fe=h(x.samples[0].pts,ke)-ke,ge=Fe/l.inputTimeScale;K+=Math.max(0,ge),q+=Math.max(0,-ge)}if(he){if(x.samplerate||(u.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),F=this.generateIS(x,l,O)),ee=this.remuxAudio(x,K,this.isAudioContiguous,D,oe||_e||j===p.PlaylistLevelType.AUDIO?q:void 0),_e){var ce=ee?ee.endPTS-ee.startPTS:0;l.inputTimeScale||(u.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),F=this.generateIS(x,l,O)),B=this.remuxVideo(l,q,xe,ce)}}else _e&&(B=this.remuxVideo(l,q,xe,0));B&&(B.firstKeyFrame=je,B.independent=je!==-1)}}return this.ISGenerated&&(T.samples.length&&(X=this.remuxID3(T,O)),A.samples.length&&(G=this.remuxText(A,O))),{audio:ee,video:B,initSegment:F,independent:Z,text:G,id3:X}},m.generateIS=function(x,l,T){var A=x.samples,O=l.samples,D=this.typeSupported,I={},j=!Object(S.isFiniteNumber)(this._initPTS),B="audio/mp4",ee,F,G;if(j&&(ee=F=Infinity),x.config&&A.length&&(x.timescale=x.samplerate,x.isAAC||(D.mpeg?(B="audio/mpeg",x.codec=""):D.mp3&&(x.codec="mp3")),I.audio={id:"audio",container:B,codec:x.codec,initSegment:!x.isAAC&&D.mpeg?new Uint8Array(0):E.default.initSegment([x]),metadata:{channelCount:x.channelCount}},j&&(G=x.inputTimeScale,ee=F=A[0].pts-Math.round(G*T))),l.sps&&l.pps&&O.length&&(l.timescale=l.inputTimeScale,I.video={id:"main",container:"video/mp4",codec:l.codec,initSegment:E.default.initSegment([l]),metadata:{width:l.width,height:l.height}},j)){G=l.inputTimeScale;var X=this.getVideoStartPts(O),Z=Math.round(G*T);F=Math.min(F,h(O[0].dts,X)-Z),ee=Math.min(ee,X-Z)}if(Object.keys(I).length)return this.ISGenerated=!0,j&&(this._initPTS=ee,this._initDTS=F),{tracks:I,initPTS:ee,timescale:G}},m.remuxVideo=function(x,l,T,A){var O=x.inputTimeScale,D=x.samples,I=[],j=D.length,B=this._initPTS,ee=this.nextAvcDts,F=8,G,X,Z,K=Number.POSITIVE_INFINITY,q=Number.NEGATIVE_INFINITY,ae=0,oe=!1;if(!T||ee===null){var ve=l*O,he=D[0].pts-h(D[0].dts,D[0].pts);ee=ve-he}for(var _e=0;_e<j;_e++){var fe=D[_e];if(fe.pts=h(fe.pts-B,ee),fe.dts=h(fe.dts-B,ee),fe.dts>fe.pts){var xe=9e4*.2;ae=Math.max(Math.min(ae,fe.pts-fe.dts),-1*xe)}fe.dts<D[_e>0?_e-1:_e].dts&&(oe=!0)}oe&&D.sort(function(xt,nt){var ct=xt.dts-nt.dts,Je=xt.pts-nt.pts;return ct||Je}),X=D[0].dts,Z=D[D.length-1].dts;var je=Math.round((Z-X)/(j-1));if(ae<0){if(ae<je*-2){u.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(f.toMsFromMpegTsClock)(-je,!0)+" ms");for(var Le=ae,ke=0;ke<j;ke++)D[ke].dts=Le=Math.max(Le,D[ke].pts-je),D[ke].pts=Math.max(Le,D[ke].pts)}else{u.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(f.toMsFromMpegTsClock)(ae,!0)+" ms to overcome this issue");for(var Fe=0;Fe<j;Fe++)D[Fe].dts=D[Fe].dts+ae}X=D[0].dts}if(T){var ge=X-ee,ce=ge>je,Ie=ge<-1;if(ce||Ie){ce?u.logger.warn("AVC: "+Object(f.toMsFromMpegTsClock)(ge,!0)+" ms ("+ge+"dts) hole between fragments detected, filling it"):u.logger.warn("AVC: "+Object(f.toMsFromMpegTsClock)(-ge,!0)+" ms ("+ge+"dts) overlapping between fragments detected"),X=ee;var Ne=D[0].pts-ge;D[0].dts=X,D[0].pts=Ne,u.logger.log("Video: First PTS/DTS adjusted: "+Object(f.toMsFromMpegTsClock)(Ne,!0)+"/"+Object(f.toMsFromMpegTsClock)(X,!0)+", delta: "+Object(f.toMsFromMpegTsClock)(ge,!0)+" ms")}}t&&(X=Math.max(0,X));for(var Xe=0,te=0,k=0;k<j;k++){for(var N=D[k],J=N.units,V=J.length,Y=0,me=0;me<V;me++)Y+=J[me].data.length;te+=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[j-1].dts;var Ae=te+4*Xe+8,at;try{at=new Uint8Array(Ae)}catch(xt){this.observer.emit(C.Events.ERROR,C.Events.ERROR,{type:w.ErrorTypes.MUX_ERROR,details:w.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Ae,reason:"fail allocating video mdat "+Ae});return}var Re=new DataView(at.buffer);Re.setUint32(0,Ae),at.set(E.default.types.mdat,4);for(var Pe=0;Pe<j;Pe++){for(var Ye=D[Pe],Ze=Ye.units,ze=0,We=0,Me=Ze.length;We<Me;We++){var De=Ze[We],Oe=De.data,pe=De.data.byteLength;Re.setUint32(F,pe),F+=4,at.set(Oe,F),F+=pe,ze+=4+pe}if(Pe<j-1)G=D[Pe+1].dts-Ye.dts;else{var be=this.config,Ce=Ye.dts-D[Pe>0?Pe-1:Pe].dts;if(be.stretchShortVideoTrack&&this.nextAudioPts!==null){var we=Math.floor(be.maxBufferHole*O),$e=(A?K+A*O:this.nextAudioPts)-Ye.pts;$e>we?(G=$e-Ce,G<0&&(G=Ce),u.logger.log("[mp4-remuxer]: It is approximately "+$e/90+" ms to the next segment; using duration "+G/90+" ms for the last video frame.")):G=Ce}else G=Ce}var it=Math.round(Ye.pts-Ye.dts);I.push(new b(Ye.key,G,ze,it))}if(I.length&&d&&d<70){var dt=I[0].flags;dt.dependsOn=2,dt.isNonSync=0}console.assert(G!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=ee=Z+G,this.isVideoContiguous=!0;var Et=E.default.moof(x.sequenceNumber++,X,o({},x,{samples:I})),Dt="video",ot={data1:Et,data2:at,startPTS:K/O,endPTS:(q+G)/O,startDTS:X/O,endDTS:ee/O,type:Dt,hasAudio:!1,hasVideo:!0,nb:I.length,dropped:x.dropped};return x.samples=[],x.dropped=0,console.assert(at.length,"MDAT length must not be zero"),ot},m.remuxAudio=function(x,l,T,A,O){var D=x.inputTimeScale,I=x.samplerate?x.samplerate:D,j=D/I,B=x.isAAC?c:s,ee=B*j,F=this._initPTS,G=!x.isAAC&&this.typeSupported.mpeg,X=[],Z=x.samples,K=G?0:8,q=this.nextAudioPts||-1,ae=l*D;if(this.isAudioContiguous=T=T||Z.length&&q>0&&(A&&Math.abs(ae-q)<9e3||Math.abs(h(Z[0].pts-F,ae)-q)<20*ee),Z.forEach(function(Oe){Oe.pts=h(Oe.pts-F,ae)}),!T||q<0){if(Z=Z.filter(function(Oe){return Oe.pts>=0}),!Z.length)return;O===0?q=0:A?q=Math.max(0,ae):q=Z[0].pts}if(x.isAAC)for(var oe=O!==void 0,ve=this.config.maxAudioFramesDrift,he=0,_e=q;he<Z.length;he++){var fe=Z[he],xe=fe.pts,je=xe-_e,Le=Math.abs(1e3*je/D);if(je<=-ve*ee&&oe)he===0&&(u.logger.warn("Audio frame @ "+(xe/D).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*je/D)+" ms."),this.nextAudioPts=q=_e=xe);else if(je>=ve*ee&&Le<a&&oe){var ke=Math.round(je/ee);_e=xe-ke*ee,_e<0&&(ke--,_e+=ee),he===0&&(this.nextAudioPts=q=_e),u.logger.warn("[mp4-remuxer]: Injecting "+ke+" audio frame @ "+(_e/D).toFixed(3)+"s due to "+Math.round(1e3*je/D)+" ms gap.");for(var Fe=0;Fe<ke;Fe++){var ge=Math.max(_e,0),ce=P.default.getSilentFrame(x.manifestCodec||x.codec,x.channelCount);ce||(u.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),ce=fe.unit.subarray()),Z.splice(he,0,{unit:ce,pts:ge}),_e+=ee,he++}}fe.pts=_e,_e+=ee}for(var Ie=null,Ne=null,Xe,te=0,k=Z.length;k--;)te+=Z[k].unit.byteLength;for(var N=0,J=Z.length;N<J;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)/j)}else if(T&&x.isAAC&&(me=q),Ie=me,te>0){te+=K;try{Xe=new Uint8Array(te)}catch(Oe){this.observer.emit(C.Events.ERROR,C.Events.ERROR,{type:w.ErrorTypes.MUX_ERROR,details:w.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:te,reason:"fail allocating audio mdat "+te});return}if(!G){var at=new DataView(Xe.buffer);at.setUint32(0,te),Xe.set(E.default.types.mdat,4)}}else return;Xe.set(Y,K);var Re=Y.byteLength;K+=Re,X.push(new b(!0,B,Re,0)),Ne=me}var Pe=X.length;if(!Pe)return;var Ye=X[X.length-1];this.nextAudioPts=q=Ne+j*Ye.duration;var Ze=G?new Uint8Array(0):E.default.moof(x.sequenceNumber++,Ie/j,o({},x,{samples:X}));x.samples=[];var ze=Ie/D,We=q/D,Me="audio",De={data1:Ze,data2:Xe,startPTS:ze,endPTS:We,startDTS:ze,endDTS:We,type:Me,hasAudio:!0,hasVideo:!1,nb:Pe};return this.isAudioContiguous=!0,console.assert(Xe.length,"MDAT length must not be zero"),De},m.remuxEmptyAudio=function(x,l,T,A){var O=x.inputTimeScale,D=x.samplerate?x.samplerate:O,I=O/D,j=this.nextAudioPts,B=(j!==null?j:A.startDTS*O)+this._initDTS,ee=A.endDTS*O+this._initDTS,F=I*c,G=Math.ceil((ee-B)/F),X=P.default.getSilentFrame(x.manifestCodec||x.codec,x.channelCount);if(u.logger.warn("[mp4-remuxer]: remux empty Audio"),!X){u.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=B+K*F;Z.push({unit:X,pts:q,dts:q})}return x.samples=Z,this.remuxAudio(x,l,T,!1)},m.remuxID3=function(x,l){var T=x.samples.length;if(!T)return;for(var A=x.inputTimeScale,O=this._initPTS,D=this._initDTS,I=0;I<T;I++){var j=x.samples[I];j.pts=h(j.pts-O,l*A)/A,j.dts=h(j.dts-D,l*A)/A}var B=x.samples;return x.samples=[],{samples:B}},m.remuxText=function(x,l){var T=x.samples.length;if(!T)return;for(var A=x.inputTimeScale,O=this._initPTS,D=0;D<T;D++){var I=x.samples[D];I.pts=h(I.pts-O,l*A)/A}x.samples.sort(function(B,ee){return B.pts-ee.pts});var j=x.samples;return x.samples=[],{samples:j}},_}();function h(_,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,x,l){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=g,this.size=x,this.cts=l,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(re,$,U){"use strict";U.r($);var S=U("./src/polyfills/number.ts"),P=U("./src/utils/mp4-tools.ts"),E=U("./src/loader/fragment.ts"),C=U("./src/utils/logger.ts"),w=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 o=f.prototype;return o.destroy=function(){},o.resetTimeStamp=function(c){this.initPTS=c,this.lastEndDTS=null},o.resetNextTimestamp=function(){this.lastEndDTS=null},o.resetInitSegment=function(c,s,d){this.audioCodec=s,this.videoCodec=d,this.generateInitSegment(c),this.emitInitSegment=!0},o.generateInitSegment=function(c){var s=this.audioCodec,d=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,E.ElementaryStreamTypes.AUDIO)),d||(d=p(i.video,E.ElementaryStreamTypes.VIDEO));var t={};i.audio&&i.video?t.audiovideo={container:"video/mp4",codec:s+","+d,initSegment:c,id:"main"}:i.audio?t.audio={container:"audio/mp4",codec:s,initSegment:c,id:"audio"}:i.video?t.video={container:"video/mp4",codec:d,initSegment:c,id:"main"}:C.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=t},o.remux=function(c,s,d,i,t){var n=this.initPTS,h=this.lastEndDTS,v={audio:void 0,video:void 0,text:i,id3:d,initSegment:void 0};Object(S.isFiniteNumber)(h)||(h=this.lastEndDTS=t||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(S.isFiniteNumber)(n)||(this.initPTS=y.initPTS=n=u(_,b,h));var m=Object(P.getDuration)(b,_),g=h,x=m+g;Object(P.offsetStartDTS)(_,b,n),m>0?this.lastEndDTS=x:(C.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var l=!!_.audio,T=!!_.video,A="";l&&(A+="audio"),T&&(A+="video");var O={data1:b,startPTS:g,startDTS:g,endPTS:x,endDTS:x,type:A,hasAudio:l,hasVideo:T,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=d,v.initSegment=y,v},f}(),u=function(o,a,c){return Object(P.getStartDTS)(o,a)-c};function p(f,o){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"||o===E.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}$.default=w},"./src/task-loop.ts":function(re,$,U){"use strict";U.r($),U.d($,"default",function(){return S});var S=function(){function P(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var E=P.prototype;return E.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},E.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},E.onHandlerDestroyed=function(){},E.hasInterval=function(){return!!this._tickInterval},E.hasNextTick=function(){return!!this._tickTimer},E.setInterval=function(w){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,w),!0)},E.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},E.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},E.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},E.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},E.doTick=function(){},P}()},"./src/types/cmcd.ts":function(re,$,U){"use strict";U.r($),U.d($,"CMCDVersion",function(){return S}),U.d($,"CMCDObjectType",function(){return P}),U.d($,"CMCDStreamingFormat",function(){return E}),U.d($,"CMCDStreamType",function(){return C});var S=1,P;(function(w){w.MANIFEST="m",w.AUDIO="a",w.VIDEO="v",w.MUXED="av",w.INIT="i",w.CAPTION="c",w.TIMED_TEXT="tt",w.KEY="k",w.OTHER="o"})(P||(P={}));var E;(function(w){w.DASH="d",w.HLS="h",w.SMOOTH="s",w.OTHER="o"})(E||(E={}));var C;(function(w){w.VOD="v",w.LIVE="l"})(C||(C={}))},"./src/types/level.ts":function(re,$,U){"use strict";U.r($),U.d($,"HlsSkip",function(){return E}),U.d($,"getSkipValue",function(){return C}),U.d($,"HlsUrlParameters",function(){return w}),U.d($,"Level",function(){return u});function S(p,f){for(var o=0;o<f.length;o++){var a=f[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(p,a.key,a)}}function P(p,f,o){return f&&S(p.prototype,f),o&&S(p,o),p}var E;(function(p){p.No="",p.Yes="YES",p.v2="v2"})(E||(E={}));function C(p,f){var o=p.canSkipUntil,a=p.canSkipDateRanges,c=p.endSN,s=f!==void 0?f-c:0;return o&&s<o?a?E.v2:E.Yes:E.No}var w=function(){function p(o,a,c){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=o,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}(),u=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(o){return o}).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(o){var a=o%this.url.length;this._urlId!==a&&(this.details=void 0,this._urlId=a)}}]),p}()},"./src/types/loader.ts":function(re,$,U){"use strict";U.r($),U.d($,"PlaylistContextType",function(){return S}),U.d($,"PlaylistLevelType",function(){return P});var S;(function(E){E.MANIFEST="manifest",E.LEVEL="level",E.AUDIO_TRACK="audioTrack",E.SUBTITLE_TRACK="subtitleTrack"})(S||(S={}));var P;(function(E){E.MAIN="main",E.AUDIO="audio",E.SUBTITLE="subtitle"})(P||(P={}))},"./src/types/transmuxer.ts":function(re,$,U){"use strict";U.r($),U.d($,"ChunkMetadata",function(){return S});var S=function(C,w,u,p,f,o){p===void 0&&(p=0),f===void 0&&(f=-1),o===void 0&&(o=!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=w,this.id=u,this.size=p,this.part=f,this.partial=o};function P(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(re,$,U){"use strict";U.r($),U.d($,"AttrList",function(){return E});var S=/^(\d+)x(\d+)$/,P=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,E=function(){function C(u){typeof u=="string"&&(u=C.parseAttrList(u));for(var p in u)u.hasOwnProperty(p)&&(this[p]=u[p])}var w=C.prototype;return w.decimalInteger=function(p){var f=parseInt(this[p],10);return f>Number.MAX_SAFE_INTEGER?Infinity:f},w.hexadecimalInteger=function(p){if(this[p]){var f=(this[p]||"0x").slice(2);f=(f.length&1?"0":"")+f;for(var o=new Uint8Array(f.length/2),a=0;a<f.length/2;a++)o[a]=parseInt(f.slice(a*2,a*2+2),16);return o}else return null},w.hexadecimalIntegerAsNumber=function(p){var f=parseInt(this[p],16);return f>Number.MAX_SAFE_INTEGER?Infinity:f},w.decimalFloatingPoint=function(p){return parseFloat(this[p])},w.optionalFloat=function(p,f){var o=this[p];return o?parseFloat(o):f},w.enumeratedString=function(p){return this[p]},w.bool=function(p){return this[p]==="YES"},w.decimalResolution=function(p){var f=S.exec(this[p]);return f===null?void 0:{width:parseInt(f[1],10),height:parseInt(f[2],10)}},C.parseAttrList=function(p){var f,o={},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)),o[f[1]]=c}return o},C}()},"./src/utils/binary-search.ts":function(re,$,U){"use strict";U.r($);var S={search:function(E,C){for(var w=0,u=E.length-1,p=null,f=null;w<=u;){p=(w+u)/2|0,f=E[p];var o=C(f);if(o>0)w=p+1;else if(o<0)u=p-1;else return f}return null}};$.default=S},"./src/utils/buffer-helper.ts":function(re,$,U){"use strict";U.r($),U.d($,"BufferHelper",function(){return E});var S=U("./src/utils/logger.ts"),P={length:0,start:function(){return 0},end:function(){return 0}},E=function(){function C(){}return C.isBuffered=function(u,p){try{if(u){for(var f=C.getBuffered(u),o=0;o<f.length;o++)if(p>=f.start(o)&&p<=f.end(o))return!0}}catch(a){}return!1},C.bufferInfo=function(u,p,f){try{if(u){var o=C.getBuffered(u),a=[],c;for(c=0;c<o.length;c++)a.push({start:o.start(c),end:o.end(c)});return this.bufferedInfo(a,p,f)}}catch(s){}return{len:0,start:p,end:p,nextStart:void 0}},C.bufferedInfo=function(u,p,f){p=Math.max(0,p),u.sort(function(y,_){var m=y.start-_.start;return m||_.end-y.end});var o=[];if(f)for(var a=0;a<u.length;a++){var c=o.length;if(c){var s=o[c-1].end;u[a].start-s<f?u[a].end>s&&(o[c-1].end=u[a].end):o.push(u[a])}else o.push(u[a])}else o=u;for(var d=0,i,t=p,n=p,h=0;h<o.length;h++){var v=o[h].start,b=o[h].end;if(p+f>=v&&p<b)t=v,n=b,d=n-p;else if(p+f<v){i=v;break}}return{len:d,start:t||0,end:n||0,nextStart:i}},C.getBuffered=function(u){try{return u.buffered}catch(p){return S.logger.log("failed to get media.buffered",p),P}},C}()},"./src/utils/cea-608-parser.ts":function(re,$,U){"use strict";U.r($),U.d($,"Row",function(){return n}),U.d($,"CaptionScreen",function(){return h});var S=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},E=function(x){var l=x;return P.hasOwnProperty(x)&&(l=P[x]),String.fromCharCode(l)},C=15,w=100,u={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},o={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 x=g.prototype;return x.log=function(T,A){this.verboseLevel>=T&&S.logger.log(this.time+" ["+T+"] "+A)},g}(),d=function(x){for(var l=[],T=0;T<x.length;T++)l.push(x[T].toString(16));return l},i=function(){function g(l,T,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=l||"white",this.underline=T||!1,this.italics=A||!1,this.background=O||"black",this.flash=D||!1}var x=g.prototype;return x.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},x.setStyles=function(T){for(var A=["foreground","underline","italics","background","flash"],O=0;O<A.length;O++){var D=A[O];T.hasOwnProperty(D)&&(this[D]=T[D])}},x.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},x.equals=function(T){return this.foreground===T.foreground&&this.underline===T.underline&&this.italics===T.italics&&this.background===T.background&&this.flash===T.flash},x.copy=function(T){this.foreground=T.foreground,this.underline=T.underline,this.italics=T.italics,this.background=T.background,this.flash=T.flash},x.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},g}(),t=function(){function g(l,T,A,O,D,I){this.uchar=void 0,this.penState=void 0,this.uchar=l||" ",this.penState=new i(T,A,O,D,I)}var x=g.prototype;return x.reset=function(){this.uchar=" ",this.penState.reset()},x.setChar=function(T,A){this.uchar=T,this.penState.copy(A)},x.setPenState=function(T){this.penState.copy(T)},x.equals=function(T){return this.uchar===T.uchar&&this.penState.equals(T.penState)},x.copy=function(T){this.uchar=T.uchar,this.penState.copy(T.penState)},x.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},g}(),n=function(){function g(l){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var T=0;T<w;T++)this.chars.push(new t);this.logger=l,this.pos=0,this.currPenState=new i}var x=g.prototype;return x.equals=function(T){for(var A=!0,O=0;O<w;O++)if(!this.chars[O].equals(T.chars[O])){A=!1;break}return A},x.copy=function(T){for(var A=0;A<w;A++)this.chars[A].copy(T.chars[A])},x.isEmpty=function(){for(var T=!0,A=0;A<w;A++)if(!this.chars[A].isEmpty()){T=!1;break}return T},x.setCursor=function(T){this.pos!==T&&(this.pos=T),this.pos<0?(this.logger.log(c.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>w&&(this.logger.log(c.DEBUG,"Too large cursor position "+this.pos),this.pos=w)},x.moveCursor=function(T){var A=this.pos+T;if(T>1)for(var O=this.pos+1;O<A+1;O++)this.chars[O].setPenState(this.currPenState);this.setCursor(A)},x.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},x.insertChar=function(T){T>=144&&this.backSpace();var A=E(T);if(this.pos>=w){this.logger.log(c.ERROR,"Cannot insert "+T.toString(16)+" ("+A+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(A,this.currPenState),this.moveCursor(1)},x.clearFromPos=function(T){var A;for(A=T;A<w;A++)this.chars[A].reset()},x.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},x.clearToEndOfRow=function(){this.clearFromPos(this.pos)},x.getTextString=function(){for(var T=[],A=!0,O=0;O<w;O++){var D=this.chars[O].uchar;D!==" "&&(A=!1),T.push(D)}return A?"":T.join("")},x.setPenStyles=function(T){this.currPenState.setStyles(T);var A=this.chars[this.pos];A.setPenState(this.currPenState)},g}(),h=function(){function g(l){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var T=0;T<C;T++)this.rows.push(new n(l));this.logger=l,this.currRow=C-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var x=g.prototype;return x.reset=function(){for(var T=0;T<C;T++)this.rows[T].clear();this.currRow=C-1},x.equals=function(T){for(var A=!0,O=0;O<C;O++)if(!this.rows[O].equals(T.rows[O])){A=!1;break}return A},x.copy=function(T){for(var A=0;A<C;A++)this.rows[A].copy(T.rows[A])},x.isEmpty=function(){for(var T=!0,A=0;A<C;A++)if(!this.rows[A].isEmpty()){T=!1;break}return T},x.backSpace=function(){var T=this.rows[this.currRow];T.backSpace()},x.clearToEndOfRow=function(){var T=this.rows[this.currRow];T.clearToEndOfRow()},x.insertChar=function(T){var A=this.rows[this.currRow];A.insertChar(T)},x.setPen=function(T){var A=this.rows[this.currRow];A.setPenStyles(T)},x.moveCursor=function(T){var A=this.rows[this.currRow];A.moveCursor(T)},x.setCursor=function(T){this.logger.log(c.INFO,"setCursor: "+T);var A=this.rows[this.currRow];A.setCursor(T)},x.setPAC=function(T){this.logger.log(c.INFO,"pacData = "+JSON.stringify(T));var A=T.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 j=I.rows[D].cueStartTime,B=this.logger.time;if(j&&B!==null&&j<B)for(var ee=0;ee<this.nrRollUpRows;ee++)this.rows[A-this.nrRollUpRows+ee+1].copy(I.rows[D+ee])}}this.currRow=A;var F=this.rows[this.currRow];if(T.indent!==null){var G=T.indent,X=Math.max(G-1,0);F.setCursor(T.indent),T.color=F.chars[X].penState.foreground}var Z={foreground:T.color,underline:T.underline,italics:T.italics,background:"black",flash:!1};this.setPen(Z)},x.setBkgData=function(T){this.logger.log(c.INFO,"bkgData = "+JSON.stringify(T)),this.backSpace(),this.setPen(T),this.insertChar(32)},x.setRollUpRows=function(T){this.nrRollUpRows=T},x.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(c.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(c.TEXT,this.getDisplayText());var T=this.currRow+1-this.nrRollUpRows,A=this.rows.splice(T,1)[0];A.clear(),this.rows.splice(this.currRow,0,A),this.logger.log(c.INFO,"Rolling up")},x.getDisplayText=function(T){T=T||!1;for(var A=[],O="",D=-1,I=0;I<C;I++){var j=this.rows[I].getTextString();j&&(D=I+1,T?A.push("Row "+D+": '"+j+"'"):A.push(j.trim()))}return A.length>0&&(T?O="["+A.join(" | ")+"]":O=A.join(`
|
|
|
`)),O},x.getTextAndFormat=function(){return this.rows},g}(),v=function(){function g(l,T,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=l,this.outputFilter=T,this.mode=null,this.verbose=0,this.displayedMemory=new h(A),this.nonDisplayedMemory=new h(A),this.lastOutputScreen=new h(A),this.currRollUpRow=this.displayedMemory.rows[C-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=A}var x=g.prototype;return x.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[C-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},x.getHandler=function(){return this.outputFilter},x.setHandler=function(T){this.outputFilter=T},x.setPAC=function(T){this.writeScreen.setPAC(T)},x.setBkgData=function(T){this.writeScreen.setBkgData(T)},x.setMode=function(T){if(T===this.mode)return;this.mode=T,this.logger.log(c.INFO,"MODE="+T),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=T},x.insertChars=function(T){for(var A=0;A<T.length;A++)this.writeScreen.insertChar(T[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())},x.ccRCL=function(){this.logger.log(c.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},x.ccBS=function(){if(this.logger.log(c.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},x.ccAOF=function(){},x.ccAON=function(){},x.ccDER=function(){this.logger.log(c.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},x.ccRU=function(T){this.logger.log(c.INFO,"RU("+T+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(T)},x.ccFON=function(){this.logger.log(c.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},x.ccRDC=function(){this.logger.log(c.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},x.ccTR=function(){this.logger.log(c.INFO,"TR"),this.setMode("MODE_TEXT")},x.ccRTD=function(){this.logger.log(c.INFO,"RTD"),this.setMode("MODE_TEXT")},x.ccEDM=function(){this.logger.log(c.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},x.ccCR=function(){this.logger.log(c.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},x.ccENM=function(){this.logger.log(c.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},x.ccEOC=function(){if(this.logger.log(c.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var T=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=T,this.writeScreen=this.nonDisplayedMemory,this.logger.log(c.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},x.ccTO=function(T){this.logger.log(c.INFO,"TO("+T+") - Tab Offset"),this.writeScreen.moveCursor(T)},x.ccMIDROW=function(T){var A={flash:!1};if(A.underline=T%2===1,A.italics=T>=46,A.italics)A.foreground="white";else{var O=Math.floor(T/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)},x.outputDataUpdate=function(T){T===void 0&&(T=!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),T&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:A),this.lastOutputScreen.copy(this.displayedMemory))},x.cueSplitAtTime=function(T){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,T,this.displayedMemory),this.cueStartTime=T))},g}(),b=function(){function g(l,T,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(l,T,O),new v(l+1,A,O)],this.cmdHistory=m(),this.logger=O}var x=g.prototype;return x.getHandler=function(T){return this.channels[T].getHandler()},x.setHandler=function(T,A){this.channels[T].setHandler(A)},x.addData=function(T,A){var O,D,I,j=!1;this.logger.time=T;for(var B=0;B<A.length;B+=2){if(D=A[B]&127,I=A[B+1]&127,D===0&&I===0)continue;if(this.logger.log(c.DATA,"["+d([A[B],A[B+1]])+"] -> ("+d([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&&(j=this.parseChars(D,I),j)){var ee=this.currentChannel;if(ee&&ee>0){var F=this.channels[ee];F.insertChars(j)}else this.logger.log(c.WARNING,"No channel found yet. TEXT-MODE?")}!O&&!j&&this.logger.log(c.WARNING,"Couldn't parse cleaned data "+d([D,I])+" orig: "+d([A[B],A[B+1]]))}},x.parseCmd=function(T,A){var O=this.cmdHistory,D=(T===20||T===28||T===21||T===29)&&A>=32&&A<=47,I=(T===23||T===31)&&A>=33&&A<=35;if(!(D||I))return!1;if(_(T,A,O))return y(null,null,O),this.logger.log(c.DEBUG,"Repeated command ("+d([T,A])+") is dropped"),!0;var j=T===20||T===21||T===23?1:2,B=this.channels[j];return T===20||T===21||T===28||T===29?A===32?B.ccRCL():A===33?B.ccBS():A===34?B.ccAOF():A===35?B.ccAON():A===36?B.ccDER():A===37?B.ccRU(2):A===38?B.ccRU(3):A===39?B.ccRU(4):A===40?B.ccFON():A===41?B.ccRDC():A===42?B.ccTR():A===43?B.ccRTD():A===44?B.ccEDM():A===45?B.ccCR():A===46?B.ccENM():A===47&&B.ccEOC():B.ccTO(A-32),y(T,A,O),this.currentChannel=j,!0},x.parseMidrow=function(T,A){var O=0;if((T===17||T===25)&&A>=32&&A<=47){if(T===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 ("+d([T,A])+")"),!0):!1}return!1},x.parsePAC=function(T,A){var O,D=this.cmdHistory,I=(T>=17&&T<=23||T>=25&&T<=31)&&A>=64&&A<=127,j=(T===16||T===24)&&A>=64&&A<=95;if(!(I||j))return!1;if(_(T,A,D))return y(null,null,D),!0;var B=T<=23?1:2;A>=64&&A<=95?O=B===1?u[T]:f[T]:O=B===1?p[T]:o[T];var ee=this.channels[B];return ee?(ee.setPAC(this.interpretPAC(O,A)),y(T,A,D),this.currentChannel=B,!0):!1},x.interpretPAC=function(T,A){var O,D={color:null,italics:!1,indent:null,underline:!1,row:T};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},x.parseChars=function(T,A){var O,D=null,I=null;if(T>=25?(O=2,I=T-8):(O=1,I=T),I>=17&&I<=19){var j;I===17?j=A+80:I===18?j=A+112:j=A+144,this.logger.log(c.INFO,"Special char '"+E(j)+"' in channel "+O),D=[j]}else T>=32&&T<=127&&(D=A===0?[T]:[T,A]);if(D){var B=d(D);this.logger.log(c.DEBUG,"Char codes = "+B.join(",")),y(T,A,this.cmdHistory)}return D},x.parseBackgroundAttributes=function(T,A){var O=(T===16||T===24)&&A>=32&&A<=47,D=(T===23||T===31)&&A>=45&&A<=47;if(!(O||D))return!1;var I,j={};T===16||T===24?(I=Math.floor((A-32)/2),j.background=a[I],A%2===1&&(j.background=j.background+"_semi")):A===45?j.background="transparent":(j.foreground="black",A===47&&(j.underline=!0));var B=T<=23?1:2,ee=this.channels[B];return ee.setBkgData(j),y(T,A,this.cmdHistory),!0},x.reset=function(){for(var T=0;T<Object.keys(this.channels).length;T++){var A=this.channels[T];A&&A.reset()}this.cmdHistory=m()},x.cueSplitAtTime=function(T){for(var A=0;A<this.channels.length;A++){var O=this.channels[A];O&&O.cueSplitAtTime(T)}},g}();function y(g,x,l){l.a=g,l.b=x}function _(g,x,l){return l.a===g&&l.b===x}function m(){return{a:null,b:null}}$.default=b},"./src/utils/codecs.ts":function(re,$,U){"use strict";U.r($),U.d($,"isCodecType",function(){return P}),U.d($,"isCodecSupportedInMp4",function(){return E});var S={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,w){var u=S[w];return!!u&&u[C.slice(0,4)]===!0}function E(C,w){return MediaSource.isTypeSupported((w||"video")+'/mp4;codecs="'+C+'"')}},"./src/utils/cues.ts":function(re,$,U){"use strict";U.r($);var S=U("./src/utils/vttparser.ts"),P=U("./src/utils/webvtt-parser.ts"),E=U("./src/utils/texttrack-utils.ts"),C=/\s/,w={newCue:function(p,f,o,a){for(var c=[],s,d,i,t,n,h=self.VTTCue||self.TextTrackCue,v=0;v<a.rows.length;v++)if(s=a.rows[v],i=!0,t=0,n="",!s.isEmpty()){for(var b=0;b<s.chars.length;b++)C.test(s.chars[b].uchar)&&i?t++:(n+=s.chars[b].uchar,i=!1);s.cueStartTime=f,f===o&&(o+=1e-4),t>=16?t--:t++;var y=Object(S.fixLineBreaks)(n.trim()),_=Object(P.generateCueId)(f,o,y);(!p||!p.cues||!p.cues.getCueById(_))&&(d=new h(f,o,y),d.id=_,d.line=v+1,d.align="left",d.position=10+Math.min(80,Math.floor(t*8/32)*10),c.push(d))}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(E.addCueToTrack)(p,m)})),c}};$.default=w},"./src/utils/discontinuities.ts":function(re,$,U){"use strict";U.r($),U.d($,"findFirstFragWithCC",function(){return C}),U.d($,"shouldAlignOnDiscontinuities",function(){return w}),U.d($,"findDiscontinuousReferenceFrag",function(){return u}),U.d($,"adjustSlidingStart",function(){return f}),U.d($,"alignStream",function(){return o}),U.d($,"alignPDT",function(){return c}),U.d($,"alignFragmentByPDTDelta",function(){return s}),U.d($,"alignMediaPlaylistByPDT",function(){return d});var S=U("./src/polyfills/number.ts"),P=U("./src/utils/logger.ts"),E=U("./src/controller/level-helper.ts");function C(i,t){for(var n=null,h=0,v=i.length;h<v;h++){var b=i[h];if(b&&b.cc===t){n=b;break}}return n}function w(i,t,n){return!!(t.details&&(n.endCC>n.startCC||i&&i.cc<n.startCC))}function u(i,t){var n=i.fragments,h=t.fragments;if(!h.length||!n.length){P.logger.log("No fragments to align");return}var v=C(n,h[0].cc);if(!v||v&&!v.startPTS){P.logger.log("No frag in previous level to align on");return}return v}function p(i,t){if(i){var n=i.start+t;i.start=i.startPTS=n,i.endPTS=n+i.duration}}function f(i,t){for(var n=t.fragments,h=0,v=n.length;h<v;h++)p(n[h],i);t.fragmentHint&&p(t.fragmentHint,i),t.alignedSliding=!0}function o(i,t,n){if(!t)return;a(i,n,t),!n.alignedSliding&&t.details&&c(n,t.details),!n.alignedSliding&&t.details&&!n.skippedSegments&&Object(E.adjustSliding)(t.details,n)}function a(i,t,n){if(w(i,n,t)){var h=u(n.details,t);h&&Object(S.isFiniteNumber)(h.start)&&(P.logger.log("Adjusting PTS using last level due to CC increase within current level "+t.url),f(h.start,t))}}function c(i,t){if(!t.fragments.length||!i.hasProgramDateTime||!t.hasProgramDateTime)return;var n=t.fragments[0].programDateTime,h=i.fragments[0].programDateTime,v=(h-n)/1e3+t.fragments[0].start;v&&Object(S.isFiniteNumber)(v)&&(P.logger.log("Adjusting PTS using programDateTime delta "+(h-n)+"ms, sliding:"+v.toFixed(3)+" "+i.url+" "),f(v,i))}function s(i,t){var n=i.programDateTime;if(!n)return;var h=(n-t)/1e3;i.start=i.startPTS=h,i.endPTS=h+i.duration}function d(i,t){if(!t.fragments.length||!i.hasProgramDateTime||!t.hasProgramDateTime)return;var n=t.fragments[0].programDateTime,h=t.fragments[0].start,v=n-h*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(re,$,U){"use strict";U.r($);var S=U("./src/utils/ewma.ts"),P=function(){function E(w,u,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 S.default(w),this.fast_=new S.default(u)}var C=E.prototype;return C.update=function(u,p){var f=this.slow_,o=this.fast_;this.slow_.halfLife!==u&&(this.slow_=new S.default(u,f.getEstimate(),f.getTotalWeight())),this.fast_.halfLife!==p&&(this.fast_=new S.default(p,o.getEstimate(),o.getTotalWeight()))},C.sample=function(u,p){u=Math.max(u,this.minDelayMs_);var f=8*p,o=u/1e3,a=f/o;this.fast_.sample(o,a),this.slow_.sample(o,a)},C.canEstimate=function(){var u=this.fast_;return u&&u.getTotalWeight()>=this.minWeight_},C.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},C.destroy=function(){},E}();$.default=P},"./src/utils/ewma.ts":function(re,$,U){"use strict";U.r($);var S=function(){function P(C,w,u){w===void 0&&(w=0),u===void 0&&(u=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_=w,this.totalWeight_=u}var E=P.prototype;return E.sample=function(w,u){var p=Math.pow(this.alpha_,w);this.estimate_=u*(1-p)+p*this.estimate_,this.totalWeight_+=w},E.getTotalWeight=function(){return this.totalWeight_},E.getEstimate=function(){if(this.alpha_){var w=1-Math.pow(this.alpha_,this.totalWeight_);if(w)return this.estimate_/w}return this.estimate_},P}();$.default=S},"./src/utils/fetch-loader.ts":function(re,$,U){"use strict";U.r($),U.d($,"fetchSupported",function(){return s});var S=U("./src/polyfills/number.ts"),P=U("./src/loader/load-stats.ts"),E=U("./src/demux/chunk-cache.ts");function C(h,v){h.prototype=Object.create(v.prototype),h.prototype.constructor=h,o(h,v)}function w(h){var v=typeof Map=="function"?new Map:void 0;return w=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 u(y,arguments,a(this).constructor)}return _.prototype=Object.create(y.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),o(_,y)},w(h)}function u(h,v,b){return p()?u=Reflect.construct:u=function(_,m,g){var x=[null];x.push.apply(x,m);var l=Function.bind.apply(_,x),T=new l;return g&&o(T,g.prototype),T},u.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(h){return!1}}function f(h){return Function.toString.call(h).indexOf("[native code]")!==-1}function o(h,v){return o=Object.setPrototypeOf||function(y,_){return y.__proto__=_,y},o(h,v)}function a(h){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(b){return b.__proto__||Object.getPrototypeOf(b)},a(h)}function c(){return c=Object.assign||function(h){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var y in b)Object.prototype.hasOwnProperty.call(b,y)&&(h[y]=b[y])}return h},c.apply(this,arguments)}function s(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(h){}return!1}var d=function(){function h(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||t,this.controller=new self.AbortController,this.stats=new P.LoadStats}var v=h.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,x=this.stats;if(x.loading.start)throw new Error("Loader can only be used once.");x.loading.start=self.performance.now();var l=i(y,this.controller.signal),T=m.onProgress,A=y.responseType==="arraybuffer",O=A?"byteLength":"length";this.context=y,this.config=_,this.callbacks=m,this.request=this.fetchSetup(y,l),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){g.abortInternal(),m.onTimeout(x,y,g.response)},_.timeout),self.fetch(this.request).then(function(D){if(g.response=g.loader=D,!D.ok){var I=D.status,j=D.statusText;throw new n(j||"fetch, bad network response",I,D)}return x.loading.first=Math.max(self.performance.now(),x.loading.start),x.total=parseInt(D.headers.get("Content-Length")||"0"),T&&Object(S.isFiniteNumber)(_.highWaterMark)?g.loadProgressively(D,x,y,_.highWaterMark,T):A?D.arrayBuffer():D.text()}).then(function(D){var I=g.response;self.clearTimeout(g.requestTimeout),x.loading.end=Math.max(self.performance.now(),x.loading.first),x.loaded=x.total=D[O];var j={url:I.url,data:D};T&&!Object(S.isFiniteNumber)(_.highWaterMark)&&T(x,y,D,I),m.onSuccess(j,x,y,I)}).catch(function(D){if(self.clearTimeout(g.requestTimeout),x.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,x){g===void 0&&(g=0);var l=new E.default,T=y.body.getReader(),A=function O(){return T.read().then(function(D){if(D.done)return l.dataLength&&x(_,m,l.flush(),y),Promise.resolve(new ArrayBuffer(0));var I=D.value,j=I.length;return _.loaded+=j,j<g||l.dataLength?(l.push(I),l.dataLength>=g&&x(_,m,l.flush(),y)):x(_,m,I,y),O()}).catch(function(){return Promise.reject()})};return A()},h}();function i(h,v){var b={method:"GET",mode:"cors",credentials:"same-origin",signal:v,headers:new self.Headers(c({},h.headers))};return h.rangeEnd&&b.headers.set("Range","bytes="+h.rangeStart+"-"+String(h.rangeEnd-1)),b}function t(h,v){return new self.Request(h.url,v)}var n=function(h){C(v,h);function v(b,y,_){var m;return m=h.call(this,b)||this,m.code=void 0,m.details=void 0,m.code=y,m.details=_,m}return v}(w(Error));$.default=d},"./src/utils/imsc1-ttml-parser.ts":function(re,$,U){"use strict";U.r($),U.d($,"IMSC1_CODEC",function(){return f}),U.d($,"parseIMSC1",function(){return s});var S=U("./src/utils/mp4-tools.ts"),P=U("./src/utils/vttparser.ts"),E=U("./src/utils/vttcue.ts"),C=U("./src/demux/id3.ts"),w=U("./src/utils/timescale-conversion.ts"),u=U("./src/utils/webvtt-parser.ts");function p(){return p=Object.assign||function(g){for(var x=1;x<arguments.length;x++){var l=arguments[x];for(var T in l)Object.prototype.hasOwnProperty.call(l,T)&&(g[T]=l[T])}return g},p.apply(this,arguments)}var f="stpp.ttml.im1t",o=/^(\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,x,l,T,A){var O=Object(S.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)),j=Object(w.toTimescaleFromScale)(x,1,l);try{T(d(I,j))}catch(B){A(B)}}function d(g,x){var l=new DOMParser,T=l.parseFromString(g,"text/xml"),A=T.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(F,G){return F[G]=A.getAttribute("ttp:"+G)||O[G],F},{}),I=A.getAttribute("xml:space")!=="preserve",j=t(i(A,"styling","style")),B=t(i(A,"layout","region")),ee=i(A,"body","[begin]");return[].map.call(ee,function(F){var G=n(F,I);if(!G||!F.hasAttribute("begin"))return null;var X=y(F.getAttribute("begin"),D),Z=y(F.getAttribute("dur"),D),K=y(F.getAttribute("end"),D);if(X===null)throw b(F);if(K===null){if(Z===null)throw b(F);K=X+Z}var q=new E.default(X-x,K-x,G);q.id=Object(u.generateCueId)(q.startTime,q.endTime,q.text);var ae=B[F.getAttribute("region")],oe=j[F.getAttribute("style")];q.position=10,q.size=80;var ve=h(ae,oe),he=ve.textAlign;if(he){var _e=c[he];_e&&(q.lineAlign=_e),q.align=he}return p(q,ve),q}).filter(function(F){return F!==null})}function i(g,x,l){var T=g.getElementsByTagName(x)[0];return T?[].slice.call(T.querySelectorAll(l)):[]}function t(g){return g.reduce(function(x,l){var T=l.getAttribute("xml:id");return T&&(x[T]=l),x},{})}function n(g,x){return[].slice.call(g.childNodes).reduce(function(l,T,A){var O;return T.nodeName==="br"&&A?l+`
|
|
|
`:(O=T.childNodes)!==null&&O!==void 0&&O.length?n(T,x):x?l+T.textContent.trim().replace(/\s+/g," "):l+T.textContent},"")}function h(g,x){var l="http://www.w3.org/ns/ttml#styling",T=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return T.reduce(function(A,O){var D=v(x,l,O)||v(g,l,O);return D&&(A[O]=D),A},{})}function v(g,x,l){return g.hasAttributeNS(x,l)?g.getAttributeNS(x,l):null}function b(g){return new Error("Could not parse ttml timestamp "+g)}function y(g,x){if(!g)return null;var l=Object(P.parseTimeStamp)(g);return l===null&&(o.test(g)?l=_(g,x):a.test(g)&&(l=m(g,x))),l}function _(g,x){var l=o.exec(g),T=(l[4]|0)+(l[5]|0)/x.subFrameRate;return(l[1]|0)*3600+(l[2]|0)*60+(l[3]|0)+T/x.frameRate}function m(g,x){var l=a.exec(g),T=Number(l[1]),A=l[2];switch(A){case"h":return T*3600;case"m":return T*60;case"ms":return T*1e3;case"f":return T/x.frameRate;case"t":return T/x.tickRate}return T}},"./src/utils/logger.ts":function(re,$,U){"use strict";U.r($),U.d($,"enableLogs",function(){return u}),U.d($,"logger",function(){return p});var S=function(){},P={trace:S,debug:S,log:S,warn:S,info:S,error:S},E=P;function C(f){var o=self.console[f];return o?o.bind(self.console,"["+f+"] >"):S}function w(f){for(var o=arguments.length,a=new Array(o>1?o-1:0),c=1;c<o;c++)a[c-1]=arguments[c];a.forEach(function(s){E[s]=f[s]?f[s].bind(f):C(s)})}function u(f){if(self.console&&f===!0||typeof f=="object"){w(f,"debug","log","info","warn","error");try{E.log()}catch(o){E=P}}else E=P}var p=E},"./src/utils/mediakeys-helper.ts":function(re,$,U){"use strict";U.r($),U.d($,"KeySystems",function(){return S}),U.d($,"requestMediaKeySystemAccess",function(){return P});var S;(function(E){E.WIDEVINE="com.widevine.alpha",E.PLAYREADY="com.microsoft.playready"})(S||(S={}));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(re,$,U){"use strict";U.r($),U.d($,"getMediaSource",function(){return S});function S(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(re,$,U){"use strict";U.r($),U.d($,"bin2str",function(){return w}),U.d($,"readUint16",function(){return u}),U.d($,"readUint32",function(){return p}),U.d($,"writeUint32",function(){return f}),U.d($,"findBox",function(){return o}),U.d($,"parseSegmentIndex",function(){return a}),U.d($,"parseInitSegment",function(){return c}),U.d($,"getStartDTS",function(){return s}),U.d($,"getDuration",function(){return d}),U.d($,"computeRawDurationFromSamples",function(){return i}),U.d($,"offsetStartDTS",function(){return t}),U.d($,"segmentValidRange",function(){return n}),U.d($,"appendUint8Array",function(){return h});var S=U("./src/utils/typed-array.ts"),P=U("./src/loader/fragment.ts"),E=Math.pow(2,32)-1,C=[].push;function w(v){return String.fromCharCode.apply(null,v)}function u(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 o(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 x=m;x<g;){var l=p(_,x),T=w(_.subarray(x+4,x+8)),A=l>1?x+l:g;if(T===b[0])if(b.length===1)y.push({data:_,start:x+8,end:A});else{var O=o({data:_,start:x+8,end:A},b.slice(1));O.length&&C.apply(y,O)}x=A}return y}function a(v){var b=o(v,["moov"]),y=b[0],_=y?y.end:null,m=o(v,["sidx"]);if(!m||!m[0])return null;var g=[],x=m[0],l=x.data[0],T=l===0?8:16,A=p(x,T);T+=4;var O=0,D=0;l===0?T+=8:T+=16,T+=2;var I=x.end+D,j=u(x,T);T+=2;for(var B=0;B<j;B++){var ee=T,F=p(x,ee);ee+=4;var G=F&2147483647,X=(F&2147483648)>>>31;if(X===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var Z=p(x,ee);ee+=4,g.push({referenceSize:G,subsegmentDuration:Z,info:{duration:Z/A,start:I,end:I+G-1}}),I+=G,ee+=4,T=ee}return{earliestPresentationTime:O,timescale:A,version:l,referencesCount:j,references:g,moovEndOffset:_}}function c(v){for(var b=[],y=o(v,["moov","trak"]),_=0;_<y.length;_++){var m=y[_],g=o(m,["tkhd"])[0];if(g){var x=g.data[g.start],l=x===0?12:20,T=p(g,l),A=o(m,["mdia","mdhd"])[0];if(A){x=A.data[A.start],l=x===0?12:20;var O=p(A,l),D=o(m,["mdia","hdlr"])[0];if(D){var I=w(D.data.subarray(D.start+8,D.start+12)),j={soun:P.ElementaryStreamTypes.AUDIO,vide:P.ElementaryStreamTypes.VIDEO}[I];if(j){var B=o(m,["mdia","minf","stbl","stsd"])[0],ee=void 0;B&&(ee=w(B.data.subarray(B.start+12,B.start+16))),b[T]={timescale:O,type:j},b[j]={timescale:O,id:T,codec:ee}}}}}}var F=o(v,["moov","mvex","trex"]);return F.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 o(b,["moof","traf"]).reduce(function(y,_){var m=o(_,["tfdt"])[0],g=m.data[m.start],x=o(_,["tfhd"]).reduce(function(l,T){var A=p(T,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,j=D/I;if(isFinite(j)&&(l===null||j<l))return j}return l},null);return x!==null&&isFinite(x)&&(y===null||x<y)?x:y},null)||0}function d(v,b){for(var y=0,_=0,m=0,g=o(v,["moof","traf"]),x=0;x<g.length;x++){var l=g[x],T=o(l,["tfhd"])[0],A=p(T,4),O=b[A];if(!O)continue;var D=O.default,I=p(T,0)|(D==null?void 0:D.flags),j=D==null?void 0:D.duration;I&8&&(I&2?j=p(T,12):j=p(T,8));for(var B=O.timescale||9e4,ee=o(l,["trun"]),F=0;F<ee.length;F++){if(j){var G=p(ee[F],4);y=j*G}else y=i(ee[F]);O.type===P.ElementaryStreamTypes.VIDEO?_+=y/B:O.type===P.ElementaryStreamTypes.AUDIO&&(m+=y/B)}}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 x=p(v,y);_+=x,y+=4}b&512&&(y+=4),b&1024&&(y+=4),b&2048&&(y+=4)}return _}function t(v,b,y){o(b,["moof","traf"]).forEach(function(_){o(_,["tfhd"]).forEach(function(m){var g=p(m,4),x=v[g];if(!x)return;var l=x.timescale||9e4;o(_,["tfdt"]).forEach(function(T){var A=T.data[T.start],O=p(T,4);if(A===0)f(T,4,O-y*l);else{O*=Math.pow(2,32),O+=p(T,8),O-=y*l,O=Math.max(O,0);var D=Math.floor(O/(E+1)),I=Math.floor(O%(E+1));f(T,4,D),f(T,8,I)}})})})}function n(v){var b={valid:null,remainder:null},y=o(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(S.sliceUint8)(v,0,_.start-8),b.remainder=Object(S.sliceUint8)(v,_.start-8),b}function h(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(re,$,U){"use strict";U.r($),U.d($,"default",function(){return S});var S=function(){function P(C,w){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=C,this.trackName=w}var E=P.prototype;return E.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},E.newCue=function(w,u,p){(this.startTime===null||this.startTime>w)&&(this.startTime=w),this.endTime=u,this.screen=p,this.timelineController.createCaptionsTrack(this.trackName)},E.reset=function(){this.cueRanges=[]},P}()},"./src/utils/texttrack-utils.ts":function(re,$,U){"use strict";U.r($),U.d($,"sendAddTrackEvent",function(){return P}),U.d($,"addCueToTrack",function(){return E}),U.d($,"clearCurrentCues",function(){return C}),U.d($,"removeCuesInRange",function(){return w}),U.d($,"getCuesInRange",function(){return p});var S=U("./src/utils/logger.ts");function P(f,o){var a;try{a=new Event("addtrack")}catch(c){a=document.createEvent("Event"),a.initEvent("addtrack",!1,!1)}a.track=f,o.dispatchEvent(a)}function E(f,o){var a=f.mode;if(a==="disabled"&&(f.mode="hidden"),f.cues&&!f.cues.getCueById(o.id))try{if(f.addCue(o),!f.cues.getCueById(o.id))throw new Error("addCue is failed for: "+o)}catch(s){S.logger.debug("[texttrack-utils]: "+s);var c=new self.TextTrackCue(o.startTime,o.endTime,o.text);c.id=o.id,f.addCue(c)}a==="disabled"&&(f.mode=a)}function C(f){var o=f.mode;if(o==="disabled"&&(f.mode="hidden"),f.cues)for(var a=f.cues.length;a--;)f.removeCue(f.cues[a]);o==="disabled"&&(f.mode=o)}function w(f,o,a){var c=f.mode;if(c==="disabled"&&(f.mode="hidden"),f.cues&&f.cues.length>0)for(var s=p(f.cues,o,a),d=0;d<s.length;d++)f.removeCue(s[d]);c==="disabled"&&(f.mode=c)}function u(f,o){if(o<f[0].startTime)return 0;var a=f.length-1;if(o>f[a].endTime)return-1;for(var c=0,s=a;c<=s;){var d=Math.floor((s+c)/2);if(o<f[d].startTime)s=d-1;else if(o>f[d].startTime&&c<a)c=d+1;else return d}return f[c].startTime-o<o-f[s].startTime?c:s}function p(f,o,a){var c=[],s=u(f,o);if(s>-1)for(var d=s,i=f.length;d<i;d++){var t=f[d];if(t.startTime>=o&&t.endTime<=a)c.push(t);else if(t.startTime>a)return c}return c}},"./src/utils/time-ranges.ts":function(re,$,U){"use strict";U.r($);var S={toString:function(E){for(var C="",w=E.length,u=0;u<w;u++)C+="["+E.start(u).toFixed(3)+","+E.end(u).toFixed(3)+"]";return C}};$.default=S},"./src/utils/timescale-conversion.ts":function(re,$,U){"use strict";U.r($),U.d($,"toTimescaleFromBase",function(){return P}),U.d($,"toTimescaleFromScale",function(){return E}),U.d($,"toMsFromMpegTsClock",function(){return C}),U.d($,"toMpegTsClockFromTimescale",function(){return w});var S=9e4;function P(u,p,f,o){f===void 0&&(f=1),o===void 0&&(o=!1);var a=u*p*f;return o?Math.round(a):a}function E(u,p,f,o){return f===void 0&&(f=1),o===void 0&&(o=!1),P(u,p,1/f,o)}function C(u,p){return p===void 0&&(p=!1),P(u,1e3,1/S,p)}function w(u,p){return p===void 0&&(p=1),P(u,S,1/p)}},"./src/utils/typed-array.ts":function(re,$,U){"use strict";U.r($),U.d($,"sliceUint8",function(){return S});function S(P,E,C){return Uint8Array.prototype.slice?P.slice(E,C):new Uint8Array(Array.prototype.slice.call(P,E,C))}},"./src/utils/vttcue.ts":function(re,$,U){"use strict";U.r($),$.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var S=["","lr","rl"],P=["start","middle","end","left","right"];function E(f,o){if(typeof o!="string")return!1;if(!Array.isArray(f))return!1;var a=o.toLowerCase();return~f.indexOf(a)?a:!1}function C(f){return E(S,f)}function w(f){return E(P,f)}function u(f){for(var o=arguments.length,a=new Array(o>1?o-1:0),c=1;c<o;c++)a[c-1]=arguments[c];for(var s=1;s<arguments.length;s++){var d=arguments[s];for(var i in d)f[i]=d[i]}return f}function p(f,o,a){var c=this,s={enumerable:!0};c.hasBeenReset=!1;var d="",i=!1,t=f,n=o,h=a,v=null,b="",y=!0,_="auto",m="start",g=50,x="middle",l=50,T="middle";Object.defineProperty(c,"id",u({},s,{get:function(){return d},set:function(O){d=""+O}})),Object.defineProperty(c,"pauseOnExit",u({},s,{get:function(){return i},set:function(O){i=!!O}})),Object.defineProperty(c,"startTime",u({},s,{get:function(){return t},set:function(O){if(typeof O!="number")throw new TypeError("Start time must be set to a number.");t=O,this.hasBeenReset=!0}})),Object.defineProperty(c,"endTime",u({},s,{get:function(){return n},set:function(O){if(typeof O!="number")throw new TypeError("End time must be set to a number.");n=O,this.hasBeenReset=!0}})),Object.defineProperty(c,"text",u({},s,{get:function(){return h},set:function(O){h=""+O,this.hasBeenReset=!0}})),Object.defineProperty(c,"region",u({},s,{get:function(){return v},set:function(O){v=O,this.hasBeenReset=!0}})),Object.defineProperty(c,"vertical",u({},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",u({},s,{get:function(){return y},set:function(O){y=!!O,this.hasBeenReset=!0}})),Object.defineProperty(c,"line",u({},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",u({},s,{get:function(){return m},set:function(O){var D=w(O);if(!D)throw new SyntaxError("An invalid or illegal string was specified.");m=D,this.hasBeenReset=!0}})),Object.defineProperty(c,"position",u({},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",u({},s,{get:function(){return x},set:function(O){var D=w(O);if(!D)throw new SyntaxError("An invalid or illegal string was specified.");x=D,this.hasBeenReset=!0}})),Object.defineProperty(c,"size",u({},s,{get:function(){return l},set:function(O){if(O<0||O>100)throw new Error("Size must be between 0 and 100.");l=O,this.hasBeenReset=!0}})),Object.defineProperty(c,"align",u({},s,{get:function(){return T},set:function(O){var D=w(O);if(!D)throw new SyntaxError("An invalid or illegal string was specified.");T=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(re,$,U){"use strict";U.r($),U.d($,"parseTimeStamp",function(){return E}),U.d($,"fixLineBreaks",function(){return o}),U.d($,"VTTParser",function(){return a});var S=U("./src/utils/vttcue.ts"),P=function(){function c(){}var s=c.prototype;return s.decode=function(i,t){if(!i)return"";if(typeof i!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(i))},c}();function E(c){function s(i,t,n,h){return(i|0)*3600+(t|0)*60+(n|0)+parseFloat(h||0)}var d=c.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return d?parseFloat(d[2])>59?s(d[2],d[3],0,d[4]):s(d[1],d[2],d[3],d[4]):null}var C=function(){function c(){this.values=Object.create(null)}var s=c.prototype;return s.set=function(i,t){!this.get(i)&&t!==""&&(this.values[i]=t)},s.get=function(i,t,n){return n?this.has(i)?this.values[i]:t[n]:this.has(i)?this.values[i]:t},s.has=function(i){return i in this.values},s.alt=function(i,t,n){for(var h=0;h<n.length;++h)if(t===n[h]){this.set(i,t);break}},s.integer=function(i,t){/^-?\d+$/.test(t)&&this.set(i,parseInt(t,10))},s.percent=function(i,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){var n=parseFloat(t);if(n>=0&&n<=100)return this.set(i,n),!0}return!1},c}();function w(c,s,d,i){var t=i?c.split(i):[c];for(var n in t){if(typeof t[n]!="string")continue;var h=t[n].split(d);if(h.length!==2)continue;var v=h[0],b=h[1];s(v,b)}}var u=new S.default(0,0,""),p=u.align==="middle"?"middle":"center";function f(c,s,d){var i=c;function t(){var v=E(c);if(v===null)throw new Error("Malformed timestamp: "+i);return c=c.replace(/^[^\sa-zA-Z-]+/,""),v}function n(v,b){var y=new C;w(v,function(g,x){var l;switch(g){case"region":for(var T=d.length-1;T>=0;T--)if(d[T].id===x){y.set(g,d[T].region);break}break;case"vertical":y.alt(g,x,["rl","lr"]);break;case"line":l=x.split(","),y.integer(g,l[0]),y.percent(g,l[0])&&y.set("snapToLines",!1),y.alt(g,l[0],["auto"]),l.length===2&&y.alt("lineAlign",l[1],["start",p,"end"]);break;case"position":l=x.split(","),y.percent(g,l[0]),l.length===2&&y.alt("positionAlign",l[1],["start",p,"end","line-left","line-right","auto"]);break;case"size":y.percent(g,x);break;case"align":y.alt(g,x,["start",p,"end","left","right"]);break}},/:/,/\s/),b.region=y.get("region",null),b.vertical=y.get("vertical","");var _=y.get("line","auto");_==="auto"&&u.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"&&u.position===50&&(m=b.align==="start"||b.align==="left"?0:b.align==="end"||b.align==="right"?100:50),b.position=m}function h(){c=c.replace(/^\s+/,"")}if(h(),s.startTime=t(),h(),c.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+i);c=c.substr(3),h(),s.endTime=t(),h(),n(c,s)}function o(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 t=this;i&&(t.buffer+=t.decoder.decode(i,{stream:!0}));function n(){var m=t.buffer,g=0;for(m=o(m);g<m.length&&m[g]!=="\r"&&m[g]!==`
|
|
|
`;)++g;var x=m.substr(0,g);return m[g]==="\r"&&++g,m[g]===`
|
|
|
`&&++g,t.buffer=m.substr(g),x}function h(m){w(m,function(g,x){},/:/)}try{var v="";if(t.state==="INITIAL"){if(!/\r\n|\n/.test(t.buffer))return this;v=n();var b=v.match(/^()?WEBVTT([ \t].*)?$/);if(!b||!b[0])throw new Error("Malformed WebVTT signature.");t.state="HEADER"}for(var y=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;y?y=!1:v=n();switch(t.state){case"HEADER":/:/.test(v)?h(v):v||(t.state="ID");continue;case"NOTE":v||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(v)){t.state="NOTE";break}if(!v)continue;if(t.cue=new S.default(0,0,""),t.state="CUE",v.indexOf("-->")===-1){t.cue.id=v;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{f(v,t.cue,t.regionList)}catch(m){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{var _=v.indexOf("-->")!==-1;if(!v||_&&(y=!0)){t.oncue&&t.cue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}if(t.cue===null)continue;t.cue.text&&(t.cue.text+=`
|
|
|
`),t.cue.text+=v}continue;case"BADCUE":v||(t.state="ID")}}}catch(m){t.state==="CUETEXT"&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=t.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(t){i.onparsingerror&&i.onparsingerror(t)}return i.onflush&&i.onflush(),this},c}()},"./src/utils/webvtt-parser.ts":function(re,$,U){"use strict";U.r($),U.d($,"generateCueId",function(){return a}),U.d($,"parseWebVTT",function(){return s});var S=U("./src/polyfills/number.ts"),P=U("./src/utils/vttparser.ts"),E=U("./src/demux/id3.ts"),C=U("./src/utils/timescale-conversion.ts"),w=U("./src/remux/mp4-remuxer.ts"),u=/\r\n|\n\r|\n|\r/g,p=function(i,t,n){return n===void 0&&(n=0),i.substr(n,t.length)===t},f=function(i){var t=parseInt(i.substr(-3)),n=parseInt(i.substr(-6,2)),h=parseInt(i.substr(-9,2)),v=i.length>9?parseInt(i.substr(0,i.indexOf(":"))):0;if(!Object(S.isFiniteNumber)(t)||!Object(S.isFiniteNumber)(n)||!Object(S.isFiniteNumber)(h)||!Object(S.isFiniteNumber)(v))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+i);return t+=1e3*n,t+=60*1e3*h,t+=60*60*1e3*v,t},o=function(i){for(var t=5381,n=i.length;n;)t=t*33^i.charCodeAt(--n);return(t>>>0).toString()};function a(d,i,t){return o(d.toString())+o(i.toString())+o(t)}var c=function(i,t,n){var h=i[t],v=i[h.prevCC];if(!v||!v.new&&h.new){i.ccOffset=i.presentationOffset=h.start,h.new=!1;return}for(;(b=v)!==null&&b!==void 0&&b.new;){var b;i.ccOffset+=h.start-v.start,h.new=!1,h=v,v=i[h.prevCC]}i.presentationOffset=n};function s(d,i,t,n,h,v,b,y){var _=new P.VTTParser,m=Object(E.utf8ArrayToStr)(new Uint8Array(d)).trim().replace(u,`
|
|
|
`).split(`
|
|
|
`),g=[],x=Object(C.toMpegTsClockFromTimescale)(i,t),l="00:00.000",T=0,A=0,O,D=!0,I=!1;_.oncue=function(j){var B=n[h],ee=n.ccOffset,F=(T-x)/9e4;if(B!=null&&B.new&&(A!==void 0?ee=n.ccOffset=B.start:c(n,h,F)),F&&(ee=F-n.presentationOffset),I){var G=j.endTime-j.startTime,X=Object(w.normalizePts)((j.startTime+ee-A)*9e4,v*9e4)/9e4;j.startTime=X,j.endTime=X+G}var Z=j.text.trim();j.text=decodeURIComponent(encodeURIComponent(Z)),j.id||(j.id=a(j.startTime,j.endTime,Z)),j.endTime>0&&g.push(j)},_.onparsingerror=function(j){O=j},_.onflush=function(){if(O){y(O);return}b(g)},m.forEach(function(j){if(D)if(p(j,"X-TIMESTAMP-MAP=")){D=!1,I=!0,j.substr(16).split(",").forEach(function(B){p(B,"LOCAL:")?l=B.substr(6):p(B,"MPEGTS:")&&(T=parseInt(B.substr(7)))});try{A=f(l)/1e3}catch(B){I=!1,O=B}return}else j===""&&(D=!1);_.parse(j+`
|
|
|
`)}),_.flush()}},"./src/utils/xhr-loader.ts":function(re,$,U){"use strict";U.r($);var S=U("./src/utils/logger.ts"),P=U("./src/loader/load-stats.ts"),E=/^age:\s*[\d.]+\s*$/m,C=function(){function w(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 u=w.prototype;return u.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},u.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()))},u.abort=function(){var f;this.abortInternal(),(f=this.callbacks)!==null&&f!==void 0&&f.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},u.load=function(f,o,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=o,this.callbacks=a,this.retryDelay=o.retryDelay,this.loadInternal()},u.loadInternal=function(){var f=this.config,o=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,o.url)}catch(t){a.open("GET",o.url,!0),s(a,o.url)}a.readyState||a.open("GET",o.url,!0);var d=this.context.headers;if(d)for(var i in d)a.setRequestHeader(i,d[i])}catch(t){this.callbacks.onError({code:a.status,text:t.message},o,a);return}o.rangeEnd&&a.setRequestHeader("Range","bytes="+o.rangeStart+"-"+(o.rangeEnd-1)),a.onreadystatechange=this.readystatechange.bind(this),a.onprogress=this.loadprogress.bind(this),a.responseType=o.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),f.timeout),a.send()},u.readystatechange=function(){var f=this.context,o=this.loader,a=this.stats;if(!f||!o)return;var c=o.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){o.onreadystatechange=null,o.onprogress=null;var d=o.status;if(d>=200&&d<300){a.loading.end=Math.max(self.performance.now(),a.loading.first);var i,t;if(f.responseType==="arraybuffer"?(i=o.response,t=i.byteLength):(i=o.responseText,t=i.length),a.loaded=a.total=t,!this.callbacks)return;var n=this.callbacks.onProgress;if(n&&n(a,f,i,o),!this.callbacks)return;var h={url:o.responseURL,data:i};this.callbacks.onSuccess(h,a,f,o)}else a.retry>=s.maxRetry||d>=400&&d<499?(S.logger.error(d+" while loading "+f.url),this.callbacks.onError({code:d,text:o.statusText},f,o)):(S.logger.warn(d+" 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)},u.loadtimeout=function(){S.logger.warn("timeout while loading "+this.context.url);var f=this.callbacks;f&&(this.abortInternal(),f.onTimeout(this.stats,this.context,this.loader))},u.loadprogress=function(f){var o=this.stats;o.loaded=f.loaded,f.lengthComputable&&(o.total=f.total)},u.getCacheAge=function(){var f=null;if(this.loader&&E.test(this.loader.getAllResponseHeaders())){var o=this.loader.getResponseHeader("age");f=o?parseFloat(o):null}return f},w}();$.default=C}}).default})},vHTk:function(Ve,Be,W){Ve.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wCXF:function(Ve,Be,W){"use strict";W.d(Be,"a",function(){return Y});var re=W("rePB"),$=W("VTBJ"),U=W("KQm4"),S=W("U8pU"),P=W("ODXe"),E=W("cDcd"),C=W("TSYQ"),w=W.n(C),u=W("Gytx"),p=W.n(u),f=W("Kwbf"),o=W("t23M"),a=W("qx4F"),c=W("6eGT"),s=W("IBYe"),d=W("Ff2n"),i=W("c+Xe"),t=W("fyJ8"),n=W("biw7");function h(Re,Pe,Ye,Ze,ze){var We=Ye[Re]||{},Me=Ye[Pe]||{},De,Oe;We.fixed==="left"?De=Ze.left[Re]:Me.fixed==="right"&&(Oe=Ze.right[Pe]);var pe=!1,be=!1,Ce=!1,we=!1,$e=Ye[Pe+1],it=Ye[Re-1];if(ze==="rtl"){if(De!==void 0){var dt=it&&it.fixed==="left";we=!dt}else if(Oe!==void 0){var Et=$e&&$e.fixed==="right";Ce=!Et}}else if(De!==void 0){var Dt=$e&&$e.fixed==="left";pe=!Dt}else if(Oe!==void 0){var ot=it&&it.fixed==="right";be=!ot}return{fixLeft:De,fixRight:Oe,lastFixLeft:pe,firstFixRight:be,lastFixRight:Ce,firstFixLeft:we,isSticky:Ze.isSticky}}var v=W("sR1s");function b(Re){var Pe=Re.cells,Ye=Re.stickyOffsets,Ze=Re.flattenColumns,ze=Re.rowComponent,We=Re.cellComponent,Me=Re.onHeaderRow,De=Re.index,Oe=E.useContext(n.a),pe=Oe.prefixCls,be=Oe.direction,Ce;Me&&(Ce=Me(Pe.map(function($e){return $e.column}),De));var we=Object(v.a)(Pe.map(function($e){return $e.column}));return E.createElement(ze,Object.assign({},Ce),Pe.map(function($e,it){var dt=$e.column,Et=h($e.colStart,$e.colEnd,Ze,Ye,be),Dt;return dt&&dt.onHeaderCell&&(Dt=$e.column.onHeaderCell(dt)),E.createElement(t.a,Object.assign({},$e,{ellipsis:dt.ellipsis,align:dt.align,component:We,prefixCls:pe,key:we[it]},Et,{additionalProps:Dt,rowType:"header"}))}))}b.displayName="HeaderRow";var y=b;function _(Re){var Pe=[];function Ye(Me,De){var Oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Pe[Oe]=Pe[Oe]||[];var pe=De,be=Me.filter(Boolean).map(function(Ce){var we={key:Ce.key,className:Ce.className||"",children:Ce.title,column:Ce,colStart:pe},$e=1,it=Ce.children;return it&&it.length>0&&($e=Ye(it,pe,Oe+1).reduce(function(dt,Et){return dt+Et},0),we.hasSubColumns=!0),"colSpan"in Ce&&($e=Ce.colSpan),"rowSpan"in Ce&&(we.rowSpan=Ce.rowSpan),we.colSpan=$e,we.colEnd=we.colStart+$e-1,Pe[Oe].push(we),pe+=$e,$e});return be}Ye(Re,0);for(var Ze=Pe.length,ze=function(De){Pe[De].forEach(function(Oe){!("rowSpan"in Oe)&&!Oe.hasSubColumns&&(Oe.rowSpan=Ze-De)})},We=0;We<Ze;We+=1)ze(We);return Pe}function m(Re){var Pe=Re.stickyOffsets,Ye=Re.columns,Ze=Re.flattenColumns,ze=Re.onHeaderRow,We=E.useContext(n.a),Me=We.prefixCls,De=We.getComponent,Oe=E.useMemo(function(){return _(Ye)},[Ye]),pe=De(["header","wrapper"],"thead"),be=De(["header","row"],"tr"),Ce=De(["header","cell"],"th");return E.createElement(pe,{className:"".concat(Me,"-thead")},Oe.map(function(we,$e){var it=E.createElement(y,{key:$e,flattenColumns:Ze,cells:we,stickyOffsets:Pe,rowComponent:be,cellComponent:Ce,onHeaderRow:ze,index:$e});return it}))}var g=m,x=W("hW8S");function l(Re){for(var Pe=Re.colWidths,Ye=Re.columns,Ze=Re.columCount,ze=[],We=Ze||Ye.length,Me=!1,De=We-1;De>=0;De-=1){var Oe=Pe[De],pe=Ye&&Ye[De],be=pe&&pe[x.a];(Oe||be||Me)&&(ze.unshift(E.createElement("col",Object.assign({key:De,style:{width:Oe,minWidth:Oe}},be))),Me=!0)}return E.createElement("colgroup",null,ze)}var T=l;function A(Re,Pe){return Object(E.useMemo)(function(){for(var Ye=[],Ze=0;Ze<Pe;Ze+=1){var ze=Re[Ze];if(ze!==void 0)Ye[Ze]=ze;else return null}return Ye},[Re.join("_"),Pe])}var O=E.forwardRef(function(Re,Pe){var Ye=Re.noData,Ze=Re.columns,ze=Re.flattenColumns,We=Re.colWidths,Me=Re.columCount,De=Re.stickyOffsets,Oe=Re.direction,pe=Re.fixHeader,be=Re.offsetHeader,Ce=Re.stickyClassName,we=Re.onScroll,$e=Object(d.a)(Re,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),it=E.useContext(n.a),dt=it.prefixCls,Et=it.scrollbarSize,Dt=it.isSticky,ot=Dt&&!pe?0:Et,xt=E.useRef(null),nt=E.useCallback(function(Ot){Object(i.b)(Pe,Ot),Object(i.b)(xt,Ot)},[]);E.useEffect(function(){var Ot;function wt(lt){var yt=lt.currentTarget,Nt=lt.deltaX;Nt&&(we({currentTarget:yt,scrollLeft:yt.scrollLeft+Nt}),lt.preventDefault())}return(Ot=xt.current)===null||Ot===void 0||Ot.addEventListener("wheel",wt),function(){var lt;(lt=xt.current)===null||lt===void 0||lt.removeEventListener("wheel",wt)}},[]);var ct=ze[ze.length-1],Je={fixed:ct?ct.fixed:null,onHeaderCell:function(){return{className:"".concat(dt,"-cell-scrollbar")}}},Ee=Object(E.useMemo)(function(){return ot?[].concat(Object(U.a)(Ze),[Je]):Ze},[ot,Ze]),Ue=Object(E.useMemo)(function(){return ot?[].concat(Object(U.a)(ze),[Je]):ze},[ot,ze]),ft=Object(E.useMemo)(function(){var Ot=De.right,wt=De.left;return Object($.a)(Object($.a)({},De),{},{left:Oe==="rtl"?[].concat(Object(U.a)(wt.map(function(lt){return lt+ot})),[0]):wt,right:Oe==="rtl"?Ot:[].concat(Object(U.a)(Ot.map(function(lt){return lt+ot})),[0]),isSticky:Dt})},[ot,De,Dt]),Qe=A(We,Me);return E.createElement("div",{style:Object($.a)({overflow:"hidden"},Dt?{top:be}:{}),ref:nt,className:w()("".concat(dt,"-header"),Object(re.a)({},Ce,!!Ce))},E.createElement("table",{style:{tableLayout:"fixed",visibility:Ye||Qe?null:"hidden"}},E.createElement(T,{colWidths:Qe?[].concat(Object(U.a)(Qe),[ot]):[],columCount:Me+1,columns:Ue}),E.createElement(g,Object.assign({},$e,{stickyOffsets:ft,columns:Ee,flattenColumns:Ue}))))});O.displayName="FixedHeader";var D=O,I=E.createContext(null),j=I;function B(Re){var Pe=Re.prefixCls,Ye=Re.children,Ze=Re.component,ze=Re.cellComponent,We=Re.fixHeader,Me=Re.fixColumn,De=Re.horizonScroll,Oe=Re.className,pe=Re.expanded,be=Re.componentWidth,Ce=Re.colSpan,we=E.useContext(n.a),$e=we.scrollbarSize;return E.useMemo(function(){var it=Ye;return Me&&(it=E.createElement("div",{style:{width:be-(We?$e:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Pe,"-expanded-row-fixed")},it)),E.createElement(Ze,{className:Oe,style:{display:pe?null:"none"}},E.createElement(t.a,{component:ze,prefixCls:Pe,colSpan:Ce},it))},[Ye,Ze,We,De,Oe,pe,be,Ce,$e])}var ee=B;function F(Re){var Pe=Re.className,Ye=Re.style,Ze=Re.record,ze=Re.index,We=Re.rowKey,Me=Re.getRowKey,De=Re.rowExpandable,Oe=Re.expandedKeys,pe=Re.onRow,be=Re.indent,Ce=be===void 0?0:be,we=Re.rowComponent,$e=Re.cellComponent,it=Re.childrenColumnName,dt=E.useContext(n.a),Et=dt.prefixCls,Dt=dt.fixedInfoList,ot=E.useContext(j),xt=ot.fixHeader,nt=ot.fixColumn,ct=ot.horizonScroll,Je=ot.componentWidth,Ee=ot.flattenColumns,Ue=ot.expandableType,ft=ot.expandRowByClick,Qe=ot.onTriggerExpand,Ot=ot.rowClassName,wt=ot.expandedRowClassName,lt=ot.indentSize,yt=ot.expandIcon,Nt=ot.expandedRowRender,Gt=ot.expandIconColumnIndex,Xt=E.useState(!1),Te=Object(P.a)(Xt,2),de=Te[0],H=Te[1],Q=Oe&&Oe.has(Re.recordKey);E.useEffect(function(){Q&&H(!0)},[Q]);var ne=Ue==="row"&&(!De||De(Ze)),se=Ue==="nest",Se=it&&Ze&&Ze[it],He=ne||se,qe;pe&&(qe=pe(Ze,ze));var Tt=function(vt){if(ft&&He&&Qe(Ze,vt),qe&&qe.onClick){for(var En,xn=arguments.length,ln=new Array(xn>1?xn-1:0),un=1;un<xn;un++)ln[un-1]=arguments[un];(En=qe).onClick.apply(En,[vt].concat(ln))}},Lt;typeof Ot=="string"?Lt=Ot:typeof Ot=="function"&&(Lt=Ot(Ze,ze,Ce));var rt=Object(v.a)(Ee),Ct=E.createElement(we,Object.assign({},qe,{"data-row-key":We,className:w()(Pe,"".concat(Et,"-row"),"".concat(Et,"-row-level-").concat(Ce),Lt,qe&&qe.className),style:Object($.a)(Object($.a)({},Ye),qe?qe.style:null),onClick:Tt}),Ee.map(function(Ut,vt){var En=Ut.render,xn=Ut.dataIndex,ln=Ut.className,un=rt[vt],er=Dt[vt],ir;vt===(Gt||0)&&se&&(ir=E.createElement(E.Fragment,null,E.createElement("span",{style:{paddingLeft:"".concat(lt*Ce,"px")},className:"".concat(Et,"-row-indent indent-level-").concat(Ce)}),yt({prefixCls:Et,expanded:Q,expandable:Se,record:Ze,onExpand:Qe})));var gt;return Ut.onCell&&(gt=Ut.onCell(Ze,ze)),E.createElement(t.a,Object.assign({className:ln,ellipsis:Ut.ellipsis,align:Ut.align,component:$e,prefixCls:Et,key:un,record:Ze,index:ze,dataIndex:xn,render:En,shouldCellUpdate:Ut.shouldCellUpdate},er,{appendNode:ir,additionalProps:gt}))})),Jt;if(ne&&(de||Q)){var St=Nt(Ze,ze,Ce+1,Q),nn=wt&&wt(Ze,ze,Ce);Jt=E.createElement(ee,{expanded:Q,className:w()("".concat(Et,"-expanded-row"),"".concat(Et,"-expanded-row-level-").concat(Ce+1),nn),prefixCls:Et,fixHeader:xt,fixColumn:nt,horizonScroll:ct,component:we,componentWidth:Je,cellComponent:$e,colSpan:Ee.length},St)}var Qt;return Se&&Q&&(Qt=(Ze[it]||[]).map(function(Ut,vt){var En=Me(Ut,vt);return E.createElement(F,Object.assign({},Re,{key:En,rowKey:En,record:Ut,recordKey:En,index:vt,indent:Ce+1}))})),E.createElement(E.Fragment,null,Ct,Jt,Qt)}F.displayName="BodyRow";var G=F,X=E.createContext(null),Z=X;function K(Re){var Pe=Re.columnKey,Ye=Re.onColumnResize,Ze=E.useRef();return E.useEffect(function(){Ze.current&&Ye(Pe,Ze.current.offsetWidth)},[]),E.createElement(o.a,{onResize:function(We){var Me=We.offsetWidth;Ye(Pe,Me)}},E.createElement("td",{ref:Ze,style:{padding:0,border:0,height:0}},E.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function q(Re){var Pe=Re.data,Ye=Re.getRowKey,Ze=Re.measureColumnWidth,ze=Re.expandedKeys,We=Re.onRow,Me=Re.rowExpandable,De=Re.emptyNode,Oe=Re.childrenColumnName,pe=E.useContext(Z),be=pe.onColumnResize,Ce=E.useContext(n.a),we=Ce.prefixCls,$e=Ce.getComponent,it=E.useContext(j),dt=it.fixHeader,Et=it.horizonScroll,Dt=it.flattenColumns,ot=it.componentWidth;return E.useMemo(function(){var xt=$e(["body","wrapper"],"tbody"),nt=$e(["body","row"],"tr"),ct=$e(["body","cell"],"td"),Je;Pe.length?Je=Pe.map(function(Ue,ft){var Qe=Ye(Ue,ft);return E.createElement(G,{key:Qe,rowKey:Qe,record:Ue,recordKey:Qe,index:ft,rowComponent:nt,cellComponent:ct,expandedKeys:ze,onRow:We,getRowKey:Ye,rowExpandable:Me,childrenColumnName:Oe})}):Je=E.createElement(ee,{expanded:!0,className:"".concat(we,"-placeholder"),prefixCls:we,fixHeader:dt,fixColumn:Et,horizonScroll:Et,component:nt,componentWidth:ot,cellComponent:ct,colSpan:Dt.length},De);var Ee=Object(v.a)(Dt);return E.createElement(xt,{className:"".concat(we,"-tbody")},Ze&&E.createElement("tr",{"aria-hidden":"true",className:"".concat(we,"-measure-row"),style:{height:0}},Ee.map(function(Ue){return E.createElement(K,{key:Ue,columnKey:Ue,onColumnResize:be})})),Je)},[Pe,we,We,Ze,ze,Ye,$e,ot,De,Dt])}var ae=E.memo(q);ae.displayName="Body";var oe=ae,ve=W("wRmb"),he=W("xEkU"),_e=W.n(he);function fe(Re){var Pe=Object(E.useRef)(Re),Ye=Object(E.useState)({}),Ze=Object(P.a)(Ye,2),ze=Ze[1],We=Object(E.useRef)(null),Me=Object(E.useRef)([]);function De(Oe){We.current===null&&(Me.current=[],We.current=_e()(function(){Me.current.forEach(function(pe){Pe.current=pe(Pe.current)}),We.current=null,ze({})})),Me.current.push(Oe)}return Object(E.useEffect)(function(){return function(){_e.a.cancel(We.current)}},[]),[Pe.current,De]}function xe(Re){var Pe=Object(E.useRef)(Re),Ye=Object(E.useRef)(null);function Ze(){window.clearTimeout(Ye.current)}function ze(Me){Pe.current=Me,Ze(),Ye.current=window.setTimeout(function(){Pe.current=null,Ye.current=null},100)}function We(){return Pe.current}return Object(E.useEffect)(function(){return Ze},[]),[ze,We]}function je(Re,Pe,Ye){var Ze=Object(E.useMemo)(function(){for(var ze=[],We=[],Me=0,De=0,Oe=0;Oe<Pe;Oe+=1)if(Ye==="rtl"){We[Oe]=De,De+=Re[Oe]||0;var pe=Pe-Oe-1;ze[pe]=Me,Me+=Re[pe]||0}else{ze[Oe]=Me,Me+=Re[Oe]||0;var be=Pe-Oe-1;We[be]=De,De+=Re[be]||0}return{left:ze,right:We}},[Re,Pe,Ye]);return Ze}var Le=je;function ke(Re){var Pe=Re.className,Ye=Re.children;return E.createElement("div",{className:Pe},Ye)}var Fe=ke,ge=W("n6Qo");function ce(Re){var Pe,Ye=Re.prefixCls,Ze=Re.record,ze=Re.onExpand,We=Re.expanded,Me=Re.expandable,De="".concat(Ye,"-row-expand-icon");if(!Me)return E.createElement("span",{className:w()(De,"".concat(Ye,"-row-spaced"))});var Oe=function(be){ze(Ze,be),be.stopPropagation()};return E.createElement("span",{className:w()(De,(Pe={},Object(re.a)(Pe,"".concat(Ye,"-row-expanded"),We),Object(re.a)(Pe,"".concat(Ye,"-row-collapsed"),!We),Pe)),onClick:Oe})}function Ie(Re,Pe,Ye){var Ze=[];function ze(We){(We||[]).forEach(function(Me,De){Ze.push(Pe(Me,De)),ze(Me[Ye])})}return ze(Re),Ze}var Ne=W("zT1h"),Xe=W("y0+3"),te=function(Pe,Ye){var Ze,ze,We=Pe.scrollBodyRef,Me=Pe.onScroll,De=Pe.offsetScroll,Oe=E.useContext(n.a),pe=Oe.prefixCls,be=((Ze=We.current)===null||Ze===void 0?void 0:Ze.scrollWidth)||0,Ce=((ze=We.current)===null||ze===void 0?void 0:ze.clientWidth)||0,we=be&&Ce*(Ce/be),$e=E.useRef(),it=fe({scrollLeft:0,isHiddenScrollBar:!1}),dt=Object(P.a)(it,2),Et=dt[0],Dt=dt[1],ot=E.useRef({delta:0,x:0}),xt=E.useState(!1),nt=Object(P.a)(xt,2),ct=nt[0],Je=nt[1],Ee=function(){Je(!1)},Ue=function(lt){lt.persist(),ot.current.delta=lt.pageX-Et.scrollLeft,ot.current.x=0,Je(!0),lt.preventDefault()},ft=function(lt){var yt,Nt=lt||((yt=window)===null||yt===void 0?void 0:yt.event),Gt=Nt.buttons;if(!ct||Gt===0){ct&&Je(!1);return}var Xt=ot.current.x+lt.pageX-ot.current.x-ot.current.delta;Xt<=0&&(Xt=0),Xt+we>=Ce&&(Xt=Ce-we),Me({scrollLeft:Xt/Ce*(be+2)}),ot.current.x=lt.pageX},Qe=function(){var lt=Object(Xe.b)(We.current).top,yt=lt+We.current.offsetHeight,Nt=document.documentElement.scrollTop+window.innerHeight;yt-Object(a.a)()<=Nt||lt>=Nt-De?Dt(function(Gt){return Object($.a)(Object($.a)({},Gt),{},{isHiddenScrollBar:!0})}):Dt(function(Gt){return Object($.a)(Object($.a)({},Gt),{},{isHiddenScrollBar:!1})})},Ot=function(lt){Dt(function(yt){return Object($.a)(Object($.a)({},yt),{},{scrollLeft:lt/be*Ce||0})})};return E.useImperativeHandle(Ye,function(){return{setScrollLeft:Ot}}),E.useEffect(function(){var wt=Object(Ne.a)(document.body,"mouseup",Ee,!1),lt=Object(Ne.a)(document.body,"mousemove",ft,!1);return Qe(),function(){wt.remove(),lt.remove()}},[we,ct]),E.useEffect(function(){var wt=Object(Ne.a)(window,"scroll",Qe,!1),lt=Object(Ne.a)(window,"resize",Qe,!1);return function(){wt.remove(),lt.remove()}},[]),E.useEffect(function(){Et.isHiddenScrollBar||Dt(function(wt){var lt,yt;return Object($.a)(Object($.a)({},wt),{},{scrollLeft:We.current.scrollLeft/((lt=We.current)===null||lt===void 0?void 0:lt.scrollWidth)*((yt=We.current)===null||yt===void 0?void 0:yt.clientWidth)})})},[Et.isHiddenScrollBar]),be<=Ce||!we||Et.isHiddenScrollBar?null:E.createElement("div",{style:{height:Object(a.a)(),width:Ce,bottom:De},className:"".concat(pe,"-sticky-scroll")},E.createElement("div",{onMouseDown:Ue,ref:$e,className:w()("".concat(pe,"-sticky-scroll-bar"),Object(re.a)({},"".concat(pe,"-sticky-scroll-bar-active"),ct)),style:{width:"".concat(we,"px"),transform:"translate3d(".concat(Et.scrollLeft,"px, 0, 0)")}}))},k=E.forwardRef(te);function N(Re,Pe){return E.useMemo(function(){var Ye=!!Re;return{isSticky:Ye,stickyClassName:Ye?"".concat(Pe,"-sticky-header"):"",offsetHeader:Object(S.a)(Re)==="object"&&Re.offsetHeader||0,offsetScroll:Object(S.a)(Re)==="object"&&Re.offsetScroll||0}},[Re,Pe])}var J=[],V={},Y="rc-table-internal-hook",me=E.memo(function(Re){var Pe=Re.children;return Pe},function(Re,Pe){return p()(Re.props,Pe.props)?Re.pingLeft!==Pe.pingLeft||Re.pingRight!==Pe.pingRight:!1});function Ae(Re){var Pe,Ye=Re.prefixCls,Ze=Re.className,ze=Re.rowClassName,We=Re.style,Me=Re.data,De=Re.rowKey,Oe=Re.scroll,pe=Re.tableLayout,be=Re.direction,Ce=Re.title,we=Re.footer,$e=Re.summary,it=Re.id,dt=Re.showHeader,Et=Re.components,Dt=Re.emptyText,ot=Re.onRow,xt=Re.onHeaderRow,nt=Re.internalHooks,ct=Re.transformColumns,Je=Re.internalRefs,Ee=Re.sticky,Ue=Me||J,ft=!!Ue.length,Qe=E.useState(0),Ot=Object(P.a)(Qe,2),wt=Ot[0],lt=Ot[1];E.useEffect(function(){lt(Object(a.a)())});var yt=E.useMemo(function(){return Object(v.c)(Et,{})},[Et]),Nt=E.useCallback(function(bt,It){return Object(v.b)(yt,bt)||It},[yt]),Gt=E.useMemo(function(){return typeof De=="function"?De:function(bt){var It=bt&&bt[De];return It}},[De]),Xt=Object(x.c)(Re),Te=Xt.expandIcon,de=Xt.expandedRowKeys,H=Xt.defaultExpandedRowKeys,Q=Xt.defaultExpandAllRows,ne=Xt.expandedRowRender,se=Xt.onExpand,Se=Xt.onExpandedRowsChange,He=Xt.expandRowByClick,qe=Xt.rowExpandable,Tt=Xt.expandIconColumnIndex,Lt=Xt.expandedRowClassName,rt=Xt.childrenColumnName,Ct=Xt.indentSize,Jt=Te||ce,St=rt||"children",nn=E.useMemo(function(){return ne?"row":Re.expandable&&nt===Y&&Re.expandable.__PARENT_RENDER_ICON__||Ue.some(function(bt){return bt&&Object(S.a)(bt)==="object"&&bt[St]})?"nest":!1},[!!ne,Ue]),Qt=E.useState(function(){return H||(Q?Ie(Ue,Gt,St):[])}),Ut=Object(P.a)(Qt,2),vt=Ut[0],En=Ut[1],xn=E.useMemo(function(){return new Set(de||vt||[])},[de,vt]),ln=E.useCallback(function(bt){var It=Gt(bt,Ue.indexOf(bt)),Mt,ht=xn.has(It);ht?(xn.delete(It),Mt=Object(U.a)(xn)):Mt=[].concat(Object(U.a)(xn),[It]),En(Mt),se&&se(!ht,bt),Se&&Se(Mt)},[Gt,xn,Ue,se,Se]),un=E.useState(0),er=Object(P.a)(un,2),ir=er[0],gt=er[1],yr=Object(ve.b)(Object($.a)(Object($.a)(Object($.a)({},Re),Xt),{},{expandable:!!ne,expandedKeys:xn,getRowKey:Gt,onTriggerExpand:ln,expandIcon:Jt,expandIconColumnIndex:Tt,direction:be}),nt===Y?ct:null),Cr=Object(P.a)(yr,2),gn=Cr[0],Ln=Cr[1],_r=E.useMemo(function(){return{columns:gn,flattenColumns:Ln}},[gn,Ln]),Jr=E.useRef(),kr=E.useRef(),tr=E.useRef(),fr=E.useState(!1),Ei=Object(P.a)(fr,2),Er=Ei[0],ur=Ei[1],xr=E.useState(!1),zr=Object(P.a)(xr,2),Rr=zr[0],Gr=zr[1],br=fe(new Map),xi=Object(P.a)(br,2),oi=xi[0],Br=xi[1],ci=Object(v.a)(Ln),Ni=ci.map(function(bt){return oi.get(bt)}),Si=E.useMemo(function(){return Ni},[Ni.join("_")]),di=Le(Si,Ln.length,be),hr=Oe&&Object(v.d)(Oe.y),pr=Oe&&Object(v.d)(Oe.x),Qr=pr&&Ln.some(function(bt){var It=bt.fixed;return It}),Ui=E.useRef(),Li=N(Ee,Ye),fi=Li.isSticky,ea=Li.offsetHeader,Vi=Li.offsetScroll,Ir=Li.stickyClassName,wi,qr,Ti;hr&&(qr={overflowY:"scroll",maxHeight:Oe.y}),pr&&(wi={overflowX:"auto"},hr||(qr={overflowY:"hidden"}),Ti={width:Oe.x===!0?"auto":Oe.x,minWidth:"100%"});var Xi=E.useCallback(function(bt,It){Br(function(Mt){var ht=new Map(Mt);return ht.set(bt,It),ht})},[]),hi=xe(null),ji=Object(P.a)(hi,2),Zr=ji[0],Fi=ji[1];function pi(bt,It){if(!It)return;typeof It=="function"?It(bt):It.scrollLeft!==bt&&(It.scrollLeft=bt)}var ni=function(It){var Mt=It.currentTarget,ht=It.scrollLeft,pt=typeof ht=="number"?ht:Mt.scrollLeft,Wt=Mt||V;if(!Fi()||Fi()===Wt){var mt;Zr(Wt),pi(pt,kr.current),pi(pt,tr.current),pi(pt,(mt=Ui.current)===null||mt===void 0?void 0:mt.setScrollLeft)}if(Mt){var Zt=Mt.scrollWidth,Rt=Mt.clientWidth;ur(pt>0),Gr(pt<Zt-Rt)}},Yi=function(){tr.current&&ni({currentTarget:tr.current})},da=function(It){var Mt=It.width;Yi(),gt(Jr.current?Jr.current.offsetWidth:Mt)};E.useEffect(function(){return Yi},[]),E.useEffect(function(){pr&&Yi()},[pr]),E.useEffect(function(){nt===Y&&Je&&(Je.body.current=tr.current)});var fa=Nt(["table"],"table"),$i=E.useMemo(function(){return pe||(Qr?Oe.x==="max-content"?"auto":"fixed":hr||Ln.some(function(bt){var It=bt.ellipsis;return It})?"fixed":"auto")},[hr,Qr,Ln,pe]),Ji,Qi={colWidths:Si,columCount:Ln.length,stickyOffsets:di,onHeaderRow:xt,fixHeader:hr},tn=E.useMemo(function(){return ft?null:typeof Dt=="function"?Dt():Dt},[ft,Dt]),jt=E.createElement(oe,{data:Ue,measureColumnWidth:hr||pr||fi,expandedKeys:xn,rowExpandable:qe,getRowKey:Gt,onRow:ot,emptyNode:tn,childrenColumnName:St}),an=E.createElement(T,{colWidths:Ln.map(function(bt){var It=bt.width;return It}),columns:Ln}),Pn=$e&&E.createElement(ge.b,null,$e(Ue)),Vn=Nt(["body"]);if(hr||fi){var ar;typeof Vn=="function"?(ar=Vn(Ue,{scrollbarSize:wt,ref:tr,onScroll:ni}),Qi.colWidths=Ln.map(function(bt,It){var Mt=bt.width,ht=It===gn.length-1?Mt-wt:Mt;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)})):ar=E.createElement("div",{style:Object($.a)(Object($.a)({},wi),qr),onScroll:ni,ref:tr,className:w()("".concat(Ye,"-body"))},E.createElement(fa,{style:Object($.a)(Object($.a)({},Ti),{},{tableLayout:$i})},an,jt,Pn),fi&&E.createElement(k,{ref:Ui,offsetScroll:Vi,scrollBodyRef:tr,onScroll:ni})),Ji=E.createElement(E.Fragment,null,dt!==!1&&E.createElement(D,Object.assign({noData:!Ue.length},Qi,_r,{direction:be,offsetHeader:ea,stickyClassName:Ir,ref:kr,onScroll:ni})),ar)}else Ji=E.createElement("div",{style:Object($.a)(Object($.a)({},wi),qr),className:w()("".concat(Ye,"-content")),onScroll:ni,ref:tr},E.createElement(fa,{style:Object($.a)(Object($.a)({},Ti),{},{tableLayout:$i})},an,dt!==!1&&E.createElement(g,Object.assign({},Qi,_r)),jt,Pn));var Kn=Object(x.b)(Re),mr=E.createElement("div",Object.assign({className:w()(Ye,Ze,(Pe={},Object(re.a)(Pe,"".concat(Ye,"-rtl"),be==="rtl"),Object(re.a)(Pe,"".concat(Ye,"-ping-left"),Er),Object(re.a)(Pe,"".concat(Ye,"-ping-right"),Rr),Object(re.a)(Pe,"".concat(Ye,"-layout-fixed"),pe==="fixed"),Object(re.a)(Pe,"".concat(Ye,"-fixed-header"),hr),Object(re.a)(Pe,"".concat(Ye,"-fixed-column"),Qr),Object(re.a)(Pe,"".concat(Ye,"-scroll-horizontal"),pr),Object(re.a)(Pe,"".concat(Ye,"-has-fix-left"),Ln[0]&&Ln[0].fixed),Object(re.a)(Pe,"".concat(Ye,"-has-fix-right"),Ln[Ln.length-1]&&Ln[Ln.length-1].fixed==="right"),Pe)),style:We,id:it,ref:Jr},Kn),E.createElement(me,{pingLeft:Er,pingRight:Rr,props:Object($.a)(Object($.a)({},Re),{},{stickyOffsets:di,mergedExpandedKeys:xn})},Ce&&E.createElement(Fe,{className:"".concat(Ye,"-title")},Ce(Ue)),E.createElement("div",{className:"".concat(Ye,"-container")},Ji),we&&E.createElement(Fe,{className:"".concat(Ye,"-footer")},we(Ue))));pr&&(mr=E.createElement(o.a,{onResize:da},mr));var et=E.useMemo(function(){return{prefixCls:Ye,getComponent:Nt,scrollbarSize:wt,direction:be,fixedInfoList:Ln.map(function(bt,It){return h(It,It,Ln,di,be)}),isSticky:fi}},[Ye,Nt,wt,be,Ln,di,be,fi]),ut=E.useMemo(function(){return Object($.a)(Object($.a)({},_r),{},{tableLayout:$i,rowClassName:ze,expandedRowClassName:Lt,componentWidth:ir,fixHeader:hr,fixColumn:Qr,horizonScroll:pr,expandIcon:Jt,expandableType:nn,expandRowByClick:He,expandedRowRender:ne,onTriggerExpand:ln,expandIconColumnIndex:Tt,indentSize:Ct})},[_r,$i,ze,Lt,ir,hr,Qr,pr,Jt,nn,He,ne,ln,Tt,Ct]),Pt=E.useMemo(function(){return{onColumnResize:Xi}},[Xi]);return E.createElement(n.a.Provider,{value:et},E.createElement(j.Provider,{value:ut},E.createElement(Z.Provider,{value:Pt},mr)))}Ae.Column=s.a,Ae.ColumnGroup=c.a,Ae.Summary=ge.a,Ae.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var at=Be.b=Ae},wRmb:function(Ve,Be,W){"use strict";W.d(Be,"a",function(){return p});var re=W("rePB"),$=W("KQm4"),U=W("VTBJ"),S=W("Ff2n"),P=W("cDcd"),E=W.n(P),C=W("Kwbf"),w=W("Zm9Q"),u=W("hW8S");function p(s){return Object(w.a)(s).filter(function(d){return P.isValidElement(d)}).map(function(d){var i=d.key,t=d.props,n=t.children,h=Object(S.a)(t,["children"]),v=Object(U.a)({key:i},h);return n&&(v.children=p(n)),v})}function f(s){return s.reduce(function(d,i){var t=i.fixed,n=t===!0?"left":t,h=i.children;return h&&h.length>0?[].concat(Object($.a)(d),Object($.a)(f(h).map(function(v){return Object(U.a)({fixed:n},v)}))):[].concat(Object($.a)(d),[Object(U.a)(Object(U.a)({},i),{},{fixed:n})])},[])}function o(s){for(var d=!0,i=0;i<s.length;i+=1){var t=s[i];if(d&&t.fixed!=="left")d=!1;else if(!d&&t.fixed==="left"){Object(C.a)(!1,"Index ".concat(i-1," of `columns` missing `fixed='left'` prop."));break}}for(var n=!0,h=s.length-1;h>=0;h-=1){var v=s[h];if(n&&v.fixed!=="right")n=!1;else if(!n&&v.fixed==="right"){Object(C.a)(!1,"Index ".concat(h+1," of `columns` missing `fixed='right'` prop."));break}}}function a(s){return s.map(function(d){var i=d.fixed,t=Object(S.a)(d,["fixed"]),n=i;return i==="left"?n="right":i==="right"&&(n="left"),Object(U.a)({fixed:n},t)})}function c(s,d){var i=s.prefixCls,t=s.columns,n=s.children,h=s.expandable,v=s.expandedKeys,b=s.getRowKey,y=s.onTriggerExpand,_=s.expandIcon,m=s.rowExpandable,g=s.expandIconColumnIndex,x=s.direction,l=s.expandRowByClick,T=P.useMemo(function(){return t||p(n)},[t,n]),A=P.useMemo(function(){if(h){var I,j=g||0,B=T[j],ee=(I={},Object(re.a)(I,u.a,{className:"".concat(i,"-expand-icon-col")}),Object(re.a)(I,"title",""),Object(re.a)(I,"fixed",B?B.fixed:null),Object(re.a)(I,"className","".concat(i,"-row-expand-icon-cell")),Object(re.a)(I,"render",function(X,Z,K){var q=b(Z,K),ae=v.has(q),oe=m?m(Z):!0,ve=_({prefixCls:i,expanded:ae,expandable:oe,record:Z,onExpand:y});return l?P.createElement("span",{onClick:function(_e){return _e.stopPropagation()}},ve):ve}),I),F=T.slice();return j>=0&&F.splice(j,0,ee),F}return T},[h,T,b,v,_,x]),O=P.useMemo(function(){var I=A;return d&&(I=d(I)),I.length||(I=[{render:function(){return null}}]),I},[d,A,x]),D=P.useMemo(function(){return x==="rtl"?a(f(O)):f(O)},[O,x]);return[O,D]}Be.b=c},wU8J:function(Ve,Be){function W(){this.buffer=new Array,this.length=0}W.prototype={get:function(re){var $=Math.floor(re/8);return(this.buffer[$]>>>7-re%8&1)==1},put:function(re,$){for(var U=0;U<$;U++)this.putBit((re>>>$-U-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(re){var $=Math.floor(this.length/8);this.buffer.length<=$&&this.buffer.push(0),re&&(this.buffer[$]|=128>>>this.length%8),this.length++}},Ve.exports=W},wW8i:function(Ve,Be,W){Ve.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(Ve,Be,W){"use strict";W.d(Be,"a",function(){return f}),W.d(Be,"b",function(){return a});var re=/margin|padding|width|height|max|min|offset/,$={left:!0,top:!0},U={cssFloat:1,styleFloat:1,float:1};function S(c){return c.nodeType===1?c.ownerDocument.defaultView.getComputedStyle(c,null):{}}function P(c,s,d){if(s=s.toLowerCase(),d==="auto"){if(s==="height")return c.offsetHeight;if(s==="width")return c.offsetWidth}return s in $||($[s]=re.test(s)),$[s]?parseFloat(d)||0:d}function E(c,s){var d=arguments.length,i=S(c);return s=U[s]?"cssFloat"in c.style?"cssFloat":"styleFloat":s,d===1?i:P(c,s,i[s]||c.style[s])}function C(c,s,d){var i=arguments.length;if(s=U[s]?"cssFloat"in c.style?"cssFloat":"styleFloat":s,i===3)return typeof d=="number"&&re.test(s)&&(d="".concat(d,"px")),c.style[s]=d,d;for(var t in s)s.hasOwnProperty(t)&&C(c,t,s[t]);return S(c)}function w(c){return c===document.body?document.documentElement.clientWidth:c.offsetWidth}function u(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 o(){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(),d=document.documentElement;return{left:s.left+(window.pageXOffset||d.scrollLeft)-(d.clientLeft||document.body.clientLeft||0),top:s.top+(window.pageYOffset||d.scrollTop)-(d.clientTop||document.body.clientTop||0)}}},ynwM:function(Ve,Be,W){var re=W("MFOe"),$=re.Global;Ve.exports={name:"oldFF-globalStorage",read:S,write:P,each:E,remove:C,clearAll:w};var U=$.globalStorage;function S(u){return U[u]}function P(u,p){U[u]=p}function E(u){for(var p=U.length-1;p>=0;p--){var f=U.key(p);u(U[f],f)}}function C(u){return U.removeItem(u)}function w(){E(function(u,p){delete U[u]})}}}]);
|