(window.webpackJsonp=window.webpackJsonp||[]).push([[188,3,5,7,8,19],{"++UQ":function($e,We,z){},"+NIl":function($e,We,z){(function(ae){ae(z("VrN/"))})(function(ae){"use strict";ae.defineMode("stex",function(Z,U){"use strict";function w(c,s){c.cmdState.push(s)}function P(c){return c.cmdState.length>0?c.cmdState[c.cmdState.length-1]:null}function S(c){var s=c.cmdState.pop();s&&s.closeBracket()}function C(c){for(var s=c.cmdState,f=s.length-1;f>=0;f--){var i=s[f];if(i.name=="DEFAULT")continue;return i}return{styleIdentifier:function(){return null}}}function T(c,s,f){return function(){this.name=c,this.bracketNo=0,this.style=s,this.styles=f,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var l={};l.importmodule=T("importmodule","tag",["string","builtin"]),l.documentclass=T("documentclass","tag",["","atom"]),l.usepackage=T("usepackage","tag",["atom"]),l.begin=T("begin","tag",["atom"]),l.end=T("end","tag",["atom"]),l.label=T("label","tag",["atom"]),l.ref=T("ref","tag",["atom"]),l.eqref=T("eqref","tag",["atom"]),l.cite=T("cite","tag",["atom"]),l.bibitem=T("bibitem","tag",["atom"]),l.Bibitem=T("Bibitem","tag",["atom"]),l.RBibitem=T("RBibitem","tag",["atom"]),l.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function p(c,s){c.f=s}function h(c,s){var f;if(c.match(/^\\[a-zA-Z@]+/)){var i=c.current().slice(1);return f=l.hasOwnProperty(i)?l[i]:l.DEFAULT,f=new f,w(s,f),p(s,o),f.style}if(c.match(/^\\[$&%#{}_]/))return"tag";if(c.match(/^\\[,;!\/\\]/))return"tag";if(c.match("\\["))return p(s,function(t,u){return d(t,u,"\\]")}),"keyword";if(c.match("\\("))return p(s,function(t,u){return d(t,u,"\\)")}),"keyword";if(c.match("$$"))return p(s,function(t,u){return d(t,u,"$$")}),"keyword";if(c.match("$"))return p(s,function(t,u){return d(t,u,"$")}),"keyword";var n=c.next();if(n=="%")return c.skipToEnd(),"comment";if(n=="}"||n=="]"){if(f=P(s),f)f.closeBracket(n),p(s,o);else return"error";return"bracket"}else return n=="{"||n=="["?(f=l.DEFAULT,f=new f,w(s,f),"bracket"):/\d/.test(n)?(c.eatWhile(/[\w.%]/),"atom"):(c.eatWhile(/[\w\-_]/),f=C(s),f.name=="begin"&&(f.argument=c.current()),f.styleIdentifier())}function d(c,s,f){if(c.eatSpace())return null;if(f&&c.match(f))return p(s,h),"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 o(c,s){var f=c.peek(),i;return f=="{"||f=="["?(i=P(s),i.openBracket(f),c.eat(f),p(s,h),"bracket"):/[ \t\r]/.test(f)?(c.eat(f),null):(p(s,h),S(s),h(c,s))}return{startState:function(){var c=U.inMathMode?function(s,f){return d(s,f)}:h;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=h,c.cmdState.length=0},lineComment:"%"}}),ae.defineMIME("text/x-stex","stex"),ae.defineMIME("text/x-latex","stex")})},"+QRC":function($e,We,z){"use strict";var ae=z("E9nw"),Z={"text/plain":"Text","text/html":"Url",default:"Text"},U="Copy to clipboard: #{key}, Enter";function w(S){var C=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return S.replace(/#{\s*key\s*}/g,C)}function P(S,C){var T,l,p,h,d,o,c=!1;C||(C={}),T=C.debug||!1;try{p=ae(),h=document.createRange(),d=document.getSelection(),o=document.createElement("span"),o.textContent=S,o.style.all="unset",o.style.position="fixed",o.style.top=0,o.style.clip="rect(0, 0, 0, 0)",o.style.whiteSpace="pre",o.style.webkitUserSelect="text",o.style.MozUserSelect="text",o.style.msUserSelect="text",o.style.userSelect="text",o.addEventListener("copy",function(f){if(f.stopPropagation(),C.format)if(f.preventDefault(),typeof f.clipboardData=="undefined"){T&&console.warn("unable to use e.clipboardData"),T&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var i=Z[C.format]||Z.default;window.clipboardData.setData(i,S)}else f.clipboardData.clearData(),f.clipboardData.setData(C.format,S);C.onCopy&&(f.preventDefault(),C.onCopy(f.clipboardData))}),document.body.appendChild(o),h.selectNodeContents(o),d.addRange(h);var s=document.execCommand("copy");if(!s)throw new Error("copy command was unsuccessful");c=!0}catch(f){T&&console.error("unable to copy using execCommand: ",f),T&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(C.format||"text",S),C.onCopy&&C.onCopy(window.clipboardData),c=!0}catch(i){T&&console.error("unable to copy using clipboardData: ",i),T&&console.error("falling back to prompt"),l=w("message"in C?C.message:U),window.prompt(l,S)}}finally{d&&(typeof d.removeRange=="function"?d.removeRange(h):d.removeAllRanges()),o&&document.body.removeChild(o),p()}return c}$e.exports=P},"07cG":function($e,We,z){$e.exports={ldsRing:"ldsRing___2F8W7",idsRingWrapper:"idsRingWrapper___fC2cF",ldsring:"ldsring___3A88y"}},"0r65":function($e,We){var z=arguments[3],ae=arguments[4],Z=arguments[5],U=JSON.stringify;$e.exports=function(w,P){for(var S,C=Object.keys(Z),T=0,l=C.length;T")):null:x.match("--")?A(s("comment","-->")):x.match("DOCTYPE",!0,!0)?(x.eatWhile(/[\w\._\-]/),A(f(1))):null:x.eat("?")?(x.eatWhile(/[\w\._\-]/),O.tokenize=s("meta","?>"),"meta"):(p=x.eat("/")?"closeTag":"openTag",O.tokenize=o,"tag bracket");if(D=="&"){var I;return x.eat("#")?x.eat("x")?I=x.eatWhile(/[a-fA-F\d]/)&&x.eat(";"):I=x.eatWhile(/[\d]/)&&x.eat(";"):I=x.eatWhile(/[\w\.\-:]/)&&x.eat(";"),I?"atom":"error"}else return x.eatWhile(/[^&<]/),null}d.isInText=!0;function o(x,O){var A=x.next();if(A==">"||A=="/"&&x.eat(">"))return O.tokenize=d,p=A==">"?"endTag":"selfcloseTag","tag bracket";if(A=="=")return p="equals",null;if(A=="<"){O.tokenize=d,O.state=u,O.tagName=O.tagStart=null;var D=O.tokenize(x,O);return D?D+" tag error":"tag error"}else return/[\'\"]/.test(A)?(O.tokenize=c(A),O.stringStartCol=x.column(),O.tokenize(x,O)):(x.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function c(x){var O=function(A,D){for(;!A.eol();)if(A.next()==x){D.tokenize=o;break}return"string"};return O.isInAttribute=!0,O}function s(x,O){return function(A,D){for(;!A.eol();){if(A.match(O)){D.tokenize=d;break}A.next()}return x}}function f(x){return function(O,A){for(var D;(D=O.next())!=null;){if(D=="<")return A.tokenize=f(x+1),A.tokenize(O,A);if(D==">")if(x==1){A.tokenize=d;break}else return A.tokenize=f(x-1),A.tokenize(O,A)}return"meta"}}function i(x,O,A){this.prev=x.context,this.tagName=O,this.indent=x.indented,this.startOfLine=A,(C.doNotIndent.hasOwnProperty(O)||x.context&&x.context.noIndent)&&(this.noIndent=!0)}function n(x){x.context&&(x.context=x.context.prev)}function t(x,O){for(var A;;){if(!x.context)return;if(A=x.context.tagName,!C.contextGrabbers.hasOwnProperty(A)||!C.contextGrabbers[A].hasOwnProperty(O))return;n(x)}}function u(x,O,A){return x=="openTag"?(A.tagStart=O.column(),y):x=="closeTag"?g:u}function y(x,O,A){return x=="word"?(A.tagName=O.current(),h="tag",v):C.allowMissingTagName&&x=="endTag"?(h="tag bracket",v(x,O,A)):(h="error",y)}function g(x,O,A){if(x=="word"){var D=O.current();return A.context&&A.context.tagName!=D&&C.implicitlyClosed.hasOwnProperty(A.context.tagName)&&n(A),A.context&&A.context.tagName==D||C.matchClosing===!1?(h="tag",_):(h="tag error",b)}else return C.allowMissingTagName&&x=="endTag"?(h="tag bracket",_(x,O,A)):(h="error",b)}function _(x,O,A){return x!="endTag"?(h="error",_):(n(A),u)}function b(x,O,A){return h="error",_(x,O,A)}function v(x,O,A){if(x=="word")return h="attribute",m;if(x=="endTag"||x=="selfcloseTag"){var D=A.tagName,I=A.tagStart;return A.tagName=A.tagStart=null,x=="selfcloseTag"||C.autoSelfClosers.hasOwnProperty(D)?t(A,D):(t(A,D),A.context=new i(A,D,I==A.indented)),u}return h="error",v}function m(x,O,A){return x=="equals"?E:(C.allowMissing||(h="error"),v(x,O,A))}function E(x,O,A){return x=="string"?a:x=="word"&&C.allowUnquoted?(h="string",v):(h="error",v(x,O,A))}function a(x,O,A){return x=="string"?a:v(x,O,A)}return{startState:function(x){var O={tokenize:d,state:u,indented:x||0,tagName:null,tagStart:null,context:null};return x!=null&&(O.baseIndent=x),O},token:function(x,O){if(!O.tagName&&x.sol()&&(O.indented=x.indentation()),x.eatSpace())return null;p=null;var A=O.tokenize(x,O);return(A||p)&&A!="comment"&&(h=null,O.state=O.state(p||A,x,O),h&&(A=h=="error"?A+" error":h)),A},indent:function(x,O,A){var D=x.context;if(x.tokenize.isInAttribute)return x.tagStart==x.indented?x.stringStartCol+1:x.indented+S;if(D&&D.noIndent)return ae.Pass;if(x.tokenize!=o&&x.tokenize!=d)return A?A.match(/^(\s*)/)[0].length:0;if(x.tagName)return C.multilineTagIndentPastTag!==!1?x.tagStart+x.tagName.length+2:x.tagStart+S*(C.multilineTagIndentFactor||1);if(C.alignCDATA&&/$/,blockCommentStart:"",configuration:C.htmlMode?"html":"xml",helperType:C.htmlMode?"html":"xml",skipAttribute:function(x){x.state==E&&(x.state=v)},xmlCurrentTag:function(x){return x.tagName?{name:x.tagName,close:x.type=="closeTag"}:null},xmlCurrentContext:function(x){for(var O=[],A=x.context;A;A=A.prev)A.tagName&&O.push(A.tagName);return O.reverse()}}}),ae.defineMIME("text/xml","xml"),ae.defineMIME("application/xml","xml"),ae.mimeModes.hasOwnProperty("text/html")||ae.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1j5w":function($e,We,z){"use strict";z.d(We,"d",function(){return $}),z.d(We,"b",function(){return Ge}),z.d(We,"c",function(){return pt}),z.d(We,"a",function(){return Rt});var ae=z("VTBJ"),Z=z("1OyB"),U=z("vuIU"),w=z("JX7q"),P=z("Ji7U"),S=z("LK+K"),C=z("q1tI"),T=z("I8Z2"),l=z("BGR+"),p=z("wx14"),h=z("rePB"),d=z("4IlW"),o=z("2GS6"),c=z("Gytx"),s=z.n(c),f=z("TSYQ"),i=z.n(f),n=z("U8pU"),t=z("ODXe"),u=/iPhone/i,y=/iPod/i,g=/iPad/i,_=/\bAndroid(?:.+)Mobile\b/i,b=/Android/i,v=/\bAndroid(?:.+)SD4930UR\b/i,m=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,E=/Windows Phone/i,a=/\bWindows(?:.+)ARM\b/i,x=/BlackBerry/i,O=/BB10/i,A=/Opera Mini/i,D=/\b(CriOS|Chrome)(?:.+)Mobile/i,I=/Mobile(?:.+)Firefox\b/i;function F(wt,lt){return wt.test(lt)}function K(wt){var lt=wt||(typeof navigator!="undefined"?navigator.userAgent:""),ft=lt.split("[FBAN");if(typeof ft[1]!="undefined"){var Qe=ft,Te=Object(t.a)(Qe,1);lt=Te[0]}if(ft=lt.split("Twitter"),typeof ft[1]!="undefined"){var je=ft,ct=Object(t.a)(je,1);lt=ct[0]}var Ze={apple:{phone:F(u,lt)&&!F(E,lt),ipod:F(y,lt),tablet:!F(u,lt)&&F(g,lt)&&!F(E,lt),device:(F(u,lt)||F(y,lt)||F(g,lt))&&!F(E,lt)},amazon:{phone:F(v,lt),tablet:!F(v,lt)&&F(m,lt),device:F(v,lt)||F(m,lt)},android:{phone:!F(E,lt)&&F(v,lt)||!F(E,lt)&&F(_,lt),tablet:!F(E,lt)&&!F(v,lt)&&!F(_,lt)&&(F(m,lt)||F(b,lt)),device:!F(E,lt)&&(F(v,lt)||F(m,lt)||F(_,lt)||F(b,lt))||F(/\bokhttp\b/i,lt)},windows:{phone:F(E,lt),tablet:F(a,lt),device:F(E,lt)||F(a,lt)},other:{blackberry:F(x,lt),blackberry10:F(O,lt),opera:F(A,lt),firefox:F(I,lt),chrome:F(D,lt),device:F(x,lt)||F(O,lt)||F(A,lt)||F(I,lt)||F(D,lt)},any:null,phone:null,tablet:null};return Ze.any=Ze.apple.device||Ze.android.device||Ze.windows.device||Ze.other.device,Ze.phone=Ze.apple.phone||Ze.android.phone||Ze.windows.phone,Ze.tablet=Ze.apple.tablet||Ze.android.tablet||Ze.windows.tablet,Ze}var ne=Object(ae.a)(Object(ae.a)({},K()),{},{isMobile:K}),j=ne;function G(){}function X(wt,lt,ft){var Qe=lt||"";return wt.key||"".concat(Qe,"item_").concat(ft)}function J(wt){return"".concat(wt,"-menu-")}function B(wt,lt){var ft=-1;C.Children.forEach(wt,function(Qe){ft+=1,Qe&&Qe.type&&Qe.type.isMenuItemGroup?C.Children.forEach(Qe.props.children,function(Te){ft+=1,lt(Te,ft)}):lt(Qe,ft)})}function Q(wt,lt,ft){if(!wt||ft.find)return;C.Children.forEach(wt,function(Qe){if(Qe){var Te=Qe.type;if(!Te||!(Te.isSubMenu||Te.isMenuItem||Te.isMenuItemGroup))return;lt.indexOf(Qe.key)!==-1?ft.find=!0:Qe.props.children&&Q(Qe.props.children,lt,ft)}})}var ie=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],oe=function(lt){var ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Qe=lt&&typeof lt.getBoundingClientRect=="function"&<.getBoundingClientRect().width;if(Qe){if(ft){var Te=getComputedStyle(lt),je=Te.marginLeft,ct=Te.marginRight;Qe+=+je.replace("px","")+ +ct.replace("px","")}Qe=+Qe.toFixed(6)}return Qe||0},xe=function(lt,ft,Qe){lt&&Object(n.a)(lt.style)==="object"&&(lt.style[ft]=Qe)},ye=function(){return j.any},Ae=z("KQm4"),pe=z("Ff2n"),Oe=z("i8i4"),Fe=z("bdgK"),Me=z("uciX"),Ce=z("8XRh"),Le={adjustX:1,adjustY:1},de={topLeft:{points:["bl","tl"],overflow:Le,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Le,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Le,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Le,offset:[4,0]}},ue={topLeft:{points:["bl","tl"],overflow:Le,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Le,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Le,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Le,offset:[4,0]}},ke=de,Ue=0,Ye={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},ee=function(lt,ft,Qe){var Te=J(ft),je=lt.getState();lt.setState({defaultActiveFirst:Object(ae.a)(Object(ae.a)({},je.defaultActiveFirst),{},Object(h.a)({},Te,Qe))})},M=function(wt){Object(P.a)(ft,wt);var lt=Object(S.a)(ft);function ft(Qe){var Te;Object(Z.a)(this,ft),Te=lt.call(this,Qe),Te.onDestroy=function(st){Te.props.onDestroy(st)},Te.onKeyDown=function(st){var gt=st.keyCode,kt=Te.menuInstance,Wt=Te.props,Qt=Wt.isOpen,we=Wt.store;if(gt===d.a.ENTER)return Te.onTitleClick(st),ee(we,Te.props.eventKey,!0),!0;if(gt===d.a.RIGHT)return Qt?kt.onKeyDown(st):(Te.triggerOpenChange(!0),ee(we,Te.props.eventKey,!0)),!0;if(gt===d.a.LEFT){var fe;if(Qt)fe=kt.onKeyDown(st);else return;return fe||(Te.triggerOpenChange(!1),fe=!0),fe}return Qt&&(gt===d.a.UP||gt===d.a.DOWN)?kt.onKeyDown(st):void 0},Te.onOpenChange=function(st){Te.props.onOpenChange(st)},Te.onPopupVisibleChange=function(st){Te.triggerOpenChange(st,st?"mouseenter":"mouseleave")},Te.onMouseEnter=function(st){var gt=Te.props,kt=gt.eventKey,Wt=gt.onMouseEnter,Qt=gt.store;ee(Qt,Te.props.eventKey,!1),Wt({key:kt,domEvent:st})},Te.onMouseLeave=function(st){var gt=Te.props,kt=gt.parentMenu,Wt=gt.eventKey,Qt=gt.onMouseLeave;kt.subMenuInstance=Object(w.a)(Te),Qt({key:Wt,domEvent:st})},Te.onTitleMouseEnter=function(st){var gt=Te.props,kt=gt.eventKey,Wt=gt.onItemHover,Qt=gt.onTitleMouseEnter;Wt({key:kt,hover:!0}),Qt({key:kt,domEvent:st})},Te.onTitleMouseLeave=function(st){var gt=Te.props,kt=gt.parentMenu,Wt=gt.eventKey,Qt=gt.onItemHover,we=gt.onTitleMouseLeave;kt.subMenuInstance=Object(w.a)(Te),Qt({key:Wt,hover:!1}),we({key:Wt,domEvent:st})},Te.onTitleClick=function(st){var gt=Object(w.a)(Te),kt=gt.props;if(kt.onTitleClick({key:kt.eventKey,domEvent:st}),kt.triggerSubMenuAction==="hover")return;Te.triggerOpenChange(!kt.isOpen,"click"),ee(kt.store,Te.props.eventKey,!1)},Te.onSubMenuClick=function(st){typeof Te.props.onClick=="function"&&Te.props.onClick(Te.addKeyPath(st))},Te.onSelect=function(st){Te.props.onSelect(st)},Te.onDeselect=function(st){Te.props.onDeselect(st)},Te.getPrefixCls=function(){return"".concat(Te.props.rootPrefixCls,"-submenu")},Te.getActiveClassName=function(){return"".concat(Te.getPrefixCls(),"-active")},Te.getDisabledClassName=function(){return"".concat(Te.getPrefixCls(),"-disabled")},Te.getSelectedClassName=function(){return"".concat(Te.getPrefixCls(),"-selected")},Te.getOpenClassName=function(){return"".concat(Te.props.rootPrefixCls,"-submenu-open")},Te.saveMenuInstance=function(st){Te.menuInstance=st},Te.addKeyPath=function(st){return Object(ae.a)(Object(ae.a)({},st),{},{keyPath:(st.keyPath||[]).concat(Te.props.eventKey)})},Te.triggerOpenChange=function(st,gt){var kt=Te.props.eventKey,Wt=function(){Te.onOpenChange({key:kt,item:Object(w.a)(Te),trigger:gt,open:st})};gt==="mouseenter"?Te.mouseenterTimeout=setTimeout(function(){Wt()},0):Wt()},Te.isChildrenSelected=function(){var st={find:!1};return Q(Te.props.children,Te.props.selectedKeys,st),st.find},Te.isOpen=function(){return Te.props.openKeys.indexOf(Te.props.eventKey)!==-1},Te.adjustWidth=function(){if(!Te.subMenuTitle||!Te.menuInstance)return;var st=Oe.findDOMNode(Te.menuInstance);if(st.offsetWidth>=Te.subMenuTitle.offsetWidth)return;st.style.minWidth="".concat(Te.subMenuTitle.offsetWidth,"px")},Te.saveSubMenuTitle=function(st){Te.subMenuTitle=st},Te.getBaseProps=function(){var st=Object(w.a)(Te),gt=st.props;return{mode:gt.mode==="horizontal"?"vertical":gt.mode,visible:Te.props.isOpen,level:gt.level+1,inlineIndent:gt.inlineIndent,focusable:!1,onClick:Te.onSubMenuClick,onSelect:Te.onSelect,onDeselect:Te.onDeselect,onDestroy:Te.onDestroy,selectedKeys:gt.selectedKeys,eventKey:"".concat(gt.eventKey,"-menu-"),openKeys:gt.openKeys,motion:gt.motion,onOpenChange:Te.onOpenChange,subMenuOpenDelay:gt.subMenuOpenDelay,parentMenu:Object(w.a)(Te),subMenuCloseDelay:gt.subMenuCloseDelay,forceSubMenuRender:gt.forceSubMenuRender,triggerSubMenuAction:gt.triggerSubMenuAction,builtinPlacements:gt.builtinPlacements,defaultActiveFirst:gt.store.getState().defaultActiveFirst[J(gt.eventKey)],multiple:gt.multiple,prefixCls:gt.rootPrefixCls,id:Te.internalMenuId,manualRef:Te.saveMenuInstance,itemIcon:gt.itemIcon,expandIcon:gt.expandIcon,direction:gt.direction}},Te.getMotion=function(st,gt){var kt=Object(w.a)(Te),Wt=kt.haveRendered,Qt=Te.props,we=Qt.motion,fe=Qt.rootPrefixCls,W=Object(ae.a)(Object(ae.a)({},we),{},{leavedClassName:"".concat(fe,"-hidden"),removeOnLeave:!1,motionAppear:Wt||!gt||st!=="inline"});return W};var je=Qe.store,ct=Qe.eventKey,Ze=je.getState(),Tt=Ze.defaultActiveFirst;Te.isRootMenu=!1;var Ot=!1;return Tt&&(Ot=Tt[ct]),ee(je,ct,Ot),Te}return Object(U.a)(ft,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Te=this,je=this.props,ct=je.mode,Ze=je.parentMenu,Tt=je.manualRef;if(Tt&&Tt(this),ct!=="horizontal"||!Ze.isRootMenu||!this.props.isOpen)return;this.minWidthTimeout=setTimeout(function(){return Te.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var Te=this.props,je=Te.onDestroy,ct=Te.eventKey;je&&je(ct),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(Te){var je=this,ct=this.getBaseProps(),Ze=this.getMotion(ct.mode,ct.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||ct.visible||ct.forceSubMenuRender,!this.haveOpened)return C.createElement("div",null);var Tt=ct.direction;return C.createElement(Ce.default,Object.assign({visible:ct.visible},Ze),function(Ot){var st=Ot.className,gt=Ot.style,kt=i()("".concat(ct.prefixCls,"-sub"),st,Object(h.a)({},"".concat(ct.prefixCls,"-rtl"),Tt==="rtl"));return C.createElement(Ne,Object.assign({},ct,{id:je.internalMenuId,className:kt,style:gt}),Te)})}},{key:"render",value:function(){var Te,je=Object(ae.a)({},this.props),ct=je.isOpen,Ze=this.getPrefixCls(),Tt=je.mode==="inline",Ot=i()(Ze,"".concat(Ze,"-").concat(je.mode),(Te={},Object(h.a)(Te,je.className,!!je.className),Object(h.a)(Te,this.getOpenClassName(),ct),Object(h.a)(Te,this.getActiveClassName(),je.active||ct&&!Tt),Object(h.a)(Te,this.getDisabledClassName(),je.disabled),Object(h.a)(Te,this.getSelectedClassName(),this.isChildrenSelected()),Te));this.internalMenuId||(je.eventKey?this.internalMenuId="".concat(je.eventKey,"$Menu"):(Ue+=1,this.internalMenuId="$__$".concat(Ue,"$Menu")));var st={},gt={},kt={};je.disabled||(st={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},gt={onClick:this.onTitleClick},kt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Wt={},Qt=je.direction;Tt&&(Qt==="rtl"?Wt.paddingRight=je.inlineIndent*je.level:Wt.paddingLeft=je.inlineIndent*je.level);var we={};this.props.isOpen&&(we={"aria-owns":this.internalMenuId});var fe=null;je.mode!=="horizontal"&&(fe=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(fe=C.createElement(this.props.expandIcon,Object(ae.a)({},this.props))));var W=C.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:Wt,className:"".concat(Ze,"-title"),role:"button"},kt,gt,{"aria-expanded":ct},we,{"aria-haspopup":"true",title:typeof je.title=="string"?je.title:void 0}),je.title,fe||C.createElement("i",{className:"".concat(Ze,"-arrow")})),q=this.renderChildren(je.children),te=je.parentMenu.isRootMenu?je.parentMenu.props.getPopupContainer:function(ht){return ht.parentNode},se=Ye[je.mode],Se=je.popupOffset?{offset:je.popupOffset}:{},He=je.mode==="inline"?"":je.popupClassName;He+=Qt==="rtl"?" ".concat(Ze,"-rtl"):"";var Je=je.disabled,xt=je.triggerSubMenuAction,Ct=je.subMenuOpenDelay,it=je.forceSubMenuRender,St=je.subMenuCloseDelay,Xt=je.builtinPlacements;ie.forEach(function(ht){return delete je[ht]}),delete je.onClick;var bt=Qt==="rtl"?Object.assign({},ue,Xt):Object.assign({},de,Xt);return delete je.direction,C.createElement("li",Object.assign({},je,st,{className:Ot,role:"menuitem"}),Tt&&W,Tt&&q,!Tt&&C.createElement(Me.a,{prefixCls:Ze,popupClassName:i()("".concat(Ze,"-popup"),He),getPopupContainer:te,builtinPlacements:bt,popupPlacement:se,popupVisible:ct,popupAlign:Se,popup:q,action:Je?[]:[xt],mouseEnterDelay:Ct,mouseLeaveDelay:St,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:it},W))}}]),ft}(C.Component);M.defaultProps={onMouseEnter:G,onMouseLeave:G,onTitleMouseEnter:G,onTitleMouseLeave:G,onTitleClick:G,manualRef:G,mode:"vertical",title:""};var N=Object(T.b)(function(wt,lt){var ft=wt.openKeys,Qe=wt.activeKey,Te=wt.selectedKeys,je=lt.eventKey,ct=lt.subMenuKey;return{isOpen:ft.indexOf(je)>-1,active:Qe[ct]===je,selectedKeys:Te}})(M);N.isSubMenu=!0;var $=N,V="menuitem-overflowed",Y=.5,me=function(wt){Object(P.a)(ft,wt);var lt=Object(S.a)(ft);function ft(){var Qe;return Object(Z.a)(this,ft),Qe=lt.apply(this,arguments),Qe.resizeObserver=null,Qe.mutationObserver=null,Qe.originalTotalWidth=0,Qe.overflowedItems=[],Qe.menuItemSizes=[],Qe.cancelFrameId=null,Qe.state={lastVisibleIndex:void 0},Qe.getMenuItemNodes=function(){var Te=Qe.props.prefixCls,je=Oe.findDOMNode(Object(w.a)(Qe));return je?[].slice.call(je.children).filter(function(ct){return ct.className.split(" ").indexOf("".concat(Te,"-overflowed-submenu"))<0}):[]},Qe.getOverflowedSubMenuItem=function(Te,je,ct){var Ze=Qe.props,Tt=Ze.overflowedIndicator,Ot=Ze.level,st=Ze.mode,gt=Ze.prefixCls,kt=Ze.theme;if(Ot!==1||st!=="horizontal")return null;var Wt=Qe.props.children[0],Qt=Wt.props,we=Qt.children,fe=Qt.title,W=Qt.style,q=Object(pe.a)(Qt,["children","title","style"]),te=Object(ae.a)({},W),se="".concat(Te,"-overflowed-indicator"),Se="".concat(Te,"-overflowed-indicator");je.length===0&&ct!==!0?te=Object(ae.a)(Object(ae.a)({},te),{},{display:"none"}):ct&&(te=Object(ae.a)(Object(ae.a)({},te),{},{visibility:"hidden",position:"absolute"}),se="".concat(se,"-placeholder"),Se="".concat(Se,"-placeholder"));var He=kt?"".concat(gt,"-").concat(kt):"",Je={};return ie.forEach(function(xt){q[xt]!==void 0&&(Je[xt]=q[xt])}),C.createElement($,Object.assign({title:Tt,className:"".concat(gt,"-overflowed-submenu"),popupClassName:He},Je,{key:se,eventKey:Se,disabled:!1,style:te}),je)},Qe.setChildrenWidthAndResize=function(){if(Qe.props.mode!=="horizontal")return;var Te=Oe.findDOMNode(Object(w.a)(Qe));if(!Te)return;var je=Te.children;if(!je||je.length===0)return;var ct=Te.children[je.length-1];xe(ct,"display","inline-block");var Ze=Qe.getMenuItemNodes(),Tt=Ze.filter(function(Ot){return Ot.className.split(" ").indexOf(V)>=0});Tt.forEach(function(Ot){xe(Ot,"display","inline-block")}),Qe.menuItemSizes=Ze.map(function(Ot){return oe(Ot,!0)}),Tt.forEach(function(Ot){xe(Ot,"display","none")}),Qe.overflowedIndicatorWidth=oe(Te.children[Te.children.length-1],!0),Qe.originalTotalWidth=Qe.menuItemSizes.reduce(function(Ot,st){return Ot+st},0),Qe.handleResize(),xe(ct,"display","none")},Qe.handleResize=function(){if(Qe.props.mode!=="horizontal")return;var Te=Oe.findDOMNode(Object(w.a)(Qe));if(!Te)return;var je=oe(Te);Qe.overflowedItems=[];var ct=0,Ze;Qe.originalTotalWidth>je+Y&&(Ze=-1,Qe.menuItemSizes.forEach(function(Tt){ct+=Tt,ct+Qe.overflowedIndicatorWidth<=je&&(Ze+=1)})),Qe.setState({lastVisibleIndex:Ze})},Qe}return Object(U.a)(ft,[{key:"componentDidMount",value:function(){var Te=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var je=Oe.findDOMNode(this);if(!je)return;this.resizeObserver=new Fe.default(function(ct){ct.forEach(function(){var Ze=Te.cancelFrameId;cancelAnimationFrame(Ze),Te.cancelFrameId=requestAnimationFrame(Te.setChildrenWidthAndResize)})}),[].slice.call(je.children).concat(je).forEach(function(ct){Te.resizeObserver.observe(ct)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){Te.resizeObserver.disconnect(),[].slice.call(je.children).concat(je).forEach(function(ct){Te.resizeObserver.observe(ct)}),Te.setChildrenWidthAndResize()}),this.mutationObserver.observe(je,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(Te){var je=this,ct=this.state.lastVisibleIndex;return(Te||[]).reduce(function(Ze,Tt,Ot){var st=Tt;if(je.props.mode==="horizontal"){var gt=je.getOverflowedSubMenuItem(Tt.props.eventKey,[]);ct!==void 0&&je.props.className.indexOf("".concat(je.props.prefixCls,"-root"))!==-1&&(Ot>ct&&(st=C.cloneElement(Tt,{style:{display:"none"},eventKey:"".concat(Tt.props.eventKey,"-hidden"),className:"".concat(V)})),Ot===ct+1&&(je.overflowedItems=Te.slice(ct+1).map(function(Wt){return C.cloneElement(Wt,{key:Wt.props.eventKey,mode:"vertical-left"})}),gt=je.getOverflowedSubMenuItem(Tt.props.eventKey,je.overflowedItems)));var kt=[].concat(Object(Ae.a)(Ze),[gt,st]);return Ot===Te.length-1&&kt.push(je.getOverflowedSubMenuItem(Tt.props.eventKey,[],!0)),kt}return[].concat(Object(Ae.a)(Ze),[st])},[])}},{key:"render",value:function(){var Te=this.props,je=Te.visible,ct=Te.prefixCls,Ze=Te.overflowedIndicator,Tt=Te.mode,Ot=Te.level,st=Te.tag,gt=Te.children,kt=Te.theme,Wt=Object(pe.a)(Te,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),Qt=st;return C.createElement(Qt,Object.assign({},Wt),this.renderChildren(gt))}}]),ft}(C.Component);me.defaultProps={tag:"div",className:""};var Re=me;function rt(wt){return wt.length?wt.every(function(lt){return!!lt.props.disabled}):!0}function Pe(wt,lt,ft){var Qe=wt.getState();wt.setState({activeKey:Object(ae.a)(Object(ae.a)({},Qe.activeKey),{},Object(h.a)({},lt,ft))})}function Ie(wt){return wt.eventKey||"0-menu-"}function Xe(wt,lt){var ft=lt,Qe=wt.children,Te=wt.eventKey;if(ft){var je;if(B(Qe,function(ct,Ze){ct&&ct.props&&!ct.props.disabled&&ft===X(ct,Te,Ze)&&(je=!0)}),je)return ft}return ft=null,wt.defaultActiveFirst&&B(Qe,function(ct,Ze){!ft&&ct&&!ct.props.disabled&&(ft=X(ct,Te,Ze))}),ft}function tt(wt){if(wt){var lt=this.instanceArray.indexOf(wt);lt!==-1?this.instanceArray[lt]=wt:this.instanceArray.push(wt)}}var Ve=function(wt){Object(P.a)(ft,wt);var lt=Object(S.a)(ft);function ft(Qe){var Te;return Object(Z.a)(this,ft),Te=lt.call(this,Qe),Te.onKeyDown=function(je,ct){var Ze=je.keyCode,Tt;if(Te.getFlatInstanceArray().forEach(function(st){st&&st.props.active&&st.onKeyDown&&(Tt=st.onKeyDown(je))}),Tt)return 1;var Ot=null;return(Ze===d.a.UP||Ze===d.a.DOWN)&&(Ot=Te.step(Ze===d.a.UP?-1:1)),Ot?(je.preventDefault(),Pe(Te.props.store,Ie(Te.props),Ot.props.eventKey),typeof ct=="function"&&ct(Ot),1):void 0},Te.onItemHover=function(je){var ct=je.key,Ze=je.hover;Pe(Te.props.store,Ie(Te.props),Ze?ct:null)},Te.onDeselect=function(je){Te.props.onDeselect(je)},Te.onSelect=function(je){Te.props.onSelect(je)},Te.onClick=function(je){Te.props.onClick(je)},Te.onOpenChange=function(je){Te.props.onOpenChange(je)},Te.onDestroy=function(je){Te.props.onDestroy(je)},Te.getFlatInstanceArray=function(){return Te.instanceArray},Te.step=function(je){var ct=Te.getFlatInstanceArray(),Ze=Te.props.store.getState().activeKey[Ie(Te.props)],Tt=ct.length;if(!Tt)return null;je<0&&(ct=ct.concat().reverse());var Ot=-1;if(ct.every(function(Wt,Qt){return Wt&&Wt.props.eventKey===Ze?(Ot=Qt,!1):!0}),!Te.props.defaultActiveFirst&&Ot!==-1&&rt(ct.slice(Ot,Tt-1)))return;var st=(Ot+1)%Tt,gt=st;do{var kt=ct[gt];if(!kt||kt.props.disabled)gt=(gt+1)%Tt;else return kt}while(gt!==st);return null},Te.renderCommonMenuItem=function(je,ct,Ze){var Tt=Te.props.store.getState(),Ot=Object(w.a)(Te),st=Ot.props,gt=X(je,st.eventKey,ct),kt=je.props;if(!kt||typeof je.type=="string")return je;var Wt=gt===Tt.activeKey,Qt=Object(ae.a)(Object(ae.a)({mode:kt.mode||st.mode,level:st.level,inlineIndent:st.inlineIndent,renderMenuItem:Te.renderMenuItem,rootPrefixCls:st.prefixCls,index:ct,parentMenu:st.parentMenu,manualRef:kt.disabled?void 0:Object(o.a)(je.ref,tt.bind(Object(w.a)(Te))),eventKey:gt,active:!kt.disabled&&Wt,multiple:st.multiple,onClick:function(fe){(kt.onClick||G)(fe),Te.onClick(fe)},onItemHover:Te.onItemHover,motion:st.motion,subMenuOpenDelay:st.subMenuOpenDelay,subMenuCloseDelay:st.subMenuCloseDelay,forceSubMenuRender:st.forceSubMenuRender,onOpenChange:Te.onOpenChange,onDeselect:Te.onDeselect,onSelect:Te.onSelect,builtinPlacements:st.builtinPlacements,itemIcon:kt.itemIcon||Te.props.itemIcon,expandIcon:kt.expandIcon||Te.props.expandIcon},Ze),{},{direction:st.direction});return(st.mode==="inline"||ye())&&(Qt.triggerSubMenuAction="click"),C.cloneElement(je,Qt)},Te.renderMenuItem=function(je,ct,Ze){if(!je)return null;var Tt=Te.props.store.getState(),Ot={openKeys:Tt.openKeys,selectedKeys:Tt.selectedKeys,triggerSubMenuAction:Te.props.triggerSubMenuAction,subMenuKey:Ze};return Te.renderCommonMenuItem(je,ct,Ot)},Qe.store.setState({activeKey:Object(ae.a)(Object(ae.a)({},Qe.store.getState().activeKey),{},Object(h.a)({},Qe.eventKey,Xe(Qe,Qe.activeKey)))}),Te.instanceArray=[],Te}return Object(U.a)(ft,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(Te){return this.props.visible||Te.visible||this.props.className!==Te.className||!s()(this.props.style,Te.style)}},{key:"componentDidUpdate",value:function(Te){var je=this.props,ct="activeKey"in je?je.activeKey:je.store.getState().activeKey[Ie(je)],Ze=Xe(je,ct);if(Ze!==ct)Pe(je.store,Ie(je),Ze);else if("activeKey"in Te){var Tt=Xe(Te,Te.activeKey);Ze!==Tt&&Pe(je.store,Ie(je),Ze)}}},{key:"render",value:function(){var Te=this,je=Object(p.a)({},this.props);this.instanceArray=[];var ct=i()(je.prefixCls,je.className,"".concat(je.prefixCls,"-").concat(je.mode)),Ze={className:ct,role:je.role||"menu"};je.id&&(Ze.id=je.id),je.focusable&&(Ze.tabIndex=0,Ze.onKeyDown=this.onKeyDown);var Tt=je.prefixCls,Ot=je.eventKey,st=je.visible,gt=je.level,kt=je.mode,Wt=je.overflowedIndicator,Qt=je.theme;return ie.forEach(function(we){return delete je[we]}),delete je.onClick,C.createElement(Re,Object.assign({},je,{prefixCls:Tt,mode:kt,tag:"ul",level:gt,theme:Qt,visible:st,overflowedIndicator:Wt},Ze),C.Children.map(je.children,function(we,fe){return Te.renderMenuItem(we,fe,Ot||"0-menu-")}))}}]),ft}(C.Component);Ve.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:G};var Ke=Object(T.b)()(Ve),Ne=Ke,De=z("Kwbf");function _e(wt,lt,ft){var Qe=wt.prefixCls,Te=wt.motion,je=wt.defaultMotions,ct=je===void 0?{}:je,Ze=wt.openAnimation,Tt=wt.openTransitionName,Ot=lt.switchingModeFromInline;if(Te)return Te;if(Object(n.a)(Ze)==="object"&&Ze)Object(De.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof Ze=="string")return{motionName:"".concat(Qe,"-open-").concat(Ze)};if(Tt)return{motionName:Tt};var st=ct[ft];return st||(Ot?null:ct.other)}var he=function(wt){Object(P.a)(ft,wt);var lt=Object(S.a)(ft);function ft(Qe){var Te;Object(Z.a)(this,ft),Te=lt.call(this,Qe),Te.inlineOpenKeys=[],Te.onSelect=function(Ze){var Tt=Object(w.a)(Te),Ot=Tt.props;if(Ot.selectable){var st=Te.store.getState(),gt=st.selectedKeys,kt=Ze.key;Ot.multiple?gt=gt.concat([kt]):gt=[kt],"selectedKeys"in Ot||Te.store.setState({selectedKeys:gt}),Ot.onSelect(Object(ae.a)(Object(ae.a)({},Ze),{},{selectedKeys:gt}))}},Te.onClick=function(Ze){var Tt=Te.getRealMenuMode(),Ot=Object(w.a)(Te),st=Ot.store,gt=Ot.props.onOpenChange;Tt!=="inline"&&!("openKeys"in Te.props)&&(st.setState({openKeys:[]}),gt([])),Te.props.onClick(Ze)},Te.onKeyDown=function(Ze,Tt){Te.innerMenu.getWrappedInstance().onKeyDown(Ze,Tt)},Te.onOpenChange=function(Ze){var Tt=Object(w.a)(Te),Ot=Tt.props,st=Te.store.getState().openKeys.concat(),gt=!1,kt=function(Qt){var we=!1;if(Qt.open)we=st.indexOf(Qt.key)===-1,we&&st.push(Qt.key);else{var fe=st.indexOf(Qt.key);we=fe!==-1,we&&st.splice(fe,1)}gt=gt||we};Array.isArray(Ze)?Ze.forEach(kt):kt(Ze),gt&&("openKeys"in Te.props||Te.store.setState({openKeys:st}),Ot.onOpenChange(st))},Te.onDeselect=function(Ze){var Tt=Object(w.a)(Te),Ot=Tt.props;if(Ot.selectable){var st=Te.store.getState().selectedKeys.concat(),gt=Ze.key,kt=st.indexOf(gt);kt!==-1&&st.splice(kt,1),"selectedKeys"in Ot||Te.store.setState({selectedKeys:st}),Ot.onDeselect(Object(ae.a)(Object(ae.a)({},Ze),{},{selectedKeys:st}))}},Te.onMouseEnter=function(Ze){Te.restoreModeVerticalFromInline();var Tt=Te.props.onMouseEnter;Tt&&Tt(Ze)},Te.onTransitionEnd=function(Ze){var Tt=Ze.propertyName==="width"&&Ze.target===Ze.currentTarget,Ot=Ze.target.className,st=Object.prototype.toString.call(Ot)==="[object SVGAnimatedString]"?Ot.animVal:Ot,gt=Ze.propertyName==="font-size"&&st.indexOf("anticon")>=0;(Tt||gt)&&Te.restoreModeVerticalFromInline()},Te.setInnerMenu=function(Ze){Te.innerMenu=Ze},Te.isRootMenu=!0;var je=Qe.defaultSelectedKeys,ct=Qe.defaultOpenKeys;return"selectedKeys"in Qe&&(je=Qe.selectedKeys||[]),"openKeys"in Qe&&(ct=Qe.openKeys||[]),Te.store=Object(T.c)({selectedKeys:je,openKeys:ct,activeKey:{"0-menu-":Xe(Qe,Qe.activeKey)}}),Te.state={switchingModeFromInline:!1},Te}return Object(U.a)(ft,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(Te){this.updateOpentKeysWhenSwitchMode(Te),this.updateMiniStore();var je=this.props,ct=je.siderCollapsed,Ze=je.inlineCollapsed,Tt=je.onOpenChange;(!Te.inlineCollapsed&&Ze||!Te.siderCollapsed&&ct)&&Tt([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(Te){var je=this.props,ct=this.store,Ze=this.inlineOpenKeys,Tt=ct.getState(),Ot={};Te.mode==="inline"&&je.mode!=="inline"&&this.setState({switchingModeFromInline:!0}),"openKeys"in je||((je.inlineCollapsed&&!Te.inlineCollapsed||je.siderCollapsed&&!Te.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=Tt.openKeys.concat(),Ot.openKeys=[]),(!je.inlineCollapsed&&Te.inlineCollapsed||!je.siderCollapsed&&Te.siderCollapsed)&&(Ot.openKeys=Ze,this.inlineOpenKeys=[])),Object.keys(Ot).length&&ct.setState(Ot)}},{key:"updateMenuDisplay",value:function(){var Te=this.props.collapsedWidth,je=this.store,ct=this.prevOpenKeys,Ze=this.getInlineCollapsed()&&(Te===0||Te==="0"||Te==="0px");Ze?(this.prevOpenKeys=je.getState().openKeys.concat(),this.store.setState({openKeys:[]})):ct&&(this.store.setState({openKeys:ct}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var Te=this.props.mode,je=this.state.switchingModeFromInline,ct=this.getInlineCollapsed();return je&&ct?"inline":ct?"vertical":Te}},{key:"getInlineCollapsed",value:function(){var Te=this.props,je=Te.inlineCollapsed,ct=Te.siderCollapsed;return ct!==void 0?ct:je}},{key:"restoreModeVerticalFromInline",value:function(){var Te=this.state.switchingModeFromInline;Te&&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 Te=Object(ae.a)({},Object(l.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),je=this.getRealMenuMode();return Te.className+=" ".concat(Te.prefixCls,"-root"),Te.direction==="rtl"&&(Te.className+=" ".concat(Te.prefixCls,"-rtl")),Te=Object(ae.a)(Object(ae.a)({},Te),{},{mode:je,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:_e(this.props,this.state,je)}),delete Te.openAnimation,delete Te.openTransitionName,C.createElement(T.a,{store:this.store},C.createElement(Ne,Object.assign({},Te,{ref:this.setInnerMenu}),this.props.children))}}]),ft}(C.Component);he.defaultProps={selectable:!0,onClick:G,onSelect:G,onOpenChange:G,onDeselect:G,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:C.createElement("span",null,"\xB7\xB7\xB7")};var ve=he,Ee=function(wt){Object(P.a)(ft,wt);var lt=Object(S.a)(ft);function ft(){var Qe;return Object(Z.a)(this,ft),Qe=lt.apply(this,arguments),Qe.onKeyDown=function(Te){var je=Te.keyCode;return je===d.a.ENTER?(Qe.onClick(Te),!0):void 0},Qe.onMouseLeave=function(Te){var je=Qe.props,ct=je.eventKey,Ze=je.onItemHover,Tt=je.onMouseLeave;Ze({key:ct,hover:!1}),Tt({key:ct,domEvent:Te})},Qe.onMouseEnter=function(Te){var je=Qe.props,ct=je.eventKey,Ze=je.onItemHover,Tt=je.onMouseEnter;Ze({key:ct,hover:!0}),Tt({key:ct,domEvent:Te})},Qe.onClick=function(Te){var je=Qe.props,ct=je.eventKey,Ze=je.multiple,Tt=je.onClick,Ot=je.onSelect,st=je.onDeselect,gt=je.isSelected,kt={key:ct,keyPath:[ct],item:Object(w.a)(Qe),domEvent:Te};Tt(kt),Ze?gt?st(kt):Ot(kt):gt||Ot(kt)},Qe.saveNode=function(Te){Qe.node=Te},Qe}return Object(U.a)(ft,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var Te=this.props;Te.onDestroy&&Te.onDestroy(Te.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 Te,je=Object(ae.a)({},this.props),ct=i()(this.getPrefixCls(),je.className,(Te={},Object(h.a)(Te,this.getActiveClassName(),!je.disabled&&je.active),Object(h.a)(Te,this.getSelectedClassName(),je.isSelected),Object(h.a)(Te,this.getDisabledClassName(),je.disabled),Te)),Ze=Object(ae.a)(Object(ae.a)({},je.attribute),{},{title:typeof je.title=="string"?je.title:void 0,className:ct,role:je.role||"menuitem","aria-disabled":je.disabled});je.role==="option"?Ze=Object(ae.a)(Object(ae.a)({},Ze),{},{role:"option","aria-selected":je.isSelected}):(je.role===null||je.role==="none")&&(Ze.role="none");var Tt={onClick:je.disabled?null:this.onClick,onMouseLeave:je.disabled?null:this.onMouseLeave,onMouseEnter:je.disabled?null:this.onMouseEnter},Ot=Object(ae.a)({},je.style);je.mode==="inline"&&(je.direction==="rtl"?Ot.paddingRight=je.inlineIndent*je.level:Ot.paddingLeft=je.inlineIndent*je.level),ie.forEach(function(gt){return delete je[gt]}),delete je.direction;var st=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(st=C.createElement(this.props.itemIcon,this.props)),C.createElement("li",Object.assign({},Object(l.default)(je,["onClick","onMouseEnter","onMouseLeave","onSelect"]),Ze,Tt,{style:Ot,ref:this.saveNode}),je.children,st)}}]),ft}(C.Component);Ee.isMenuItem=!0,Ee.defaultProps={onSelect:G,onMouseEnter:G,onMouseLeave:G,manualRef:G};var be=Object(T.b)(function(wt,lt){var ft=wt.activeKey,Qe=wt.selectedKeys,Te=lt.eventKey,je=lt.subMenuKey;return{active:ft[je]===Te,isSelected:Qe.indexOf(Te)!==-1}})(Ee),Ge=be,qe=function(wt){Object(P.a)(ft,wt);var lt=Object(S.a)(ft);function ft(){var Qe;return Object(Z.a)(this,ft),Qe=lt.apply(this,arguments),Qe.renderInnerMenuItem=function(Te){var je=Qe.props,ct=je.renderMenuItem,Ze=je.index;return ct(Te,Ze,Qe.props.subMenuKey)},Qe}return Object(U.a)(ft,[{key:"render",value:function(){var Te=Object(p.a)({},this.props),je=Te.className,ct=je===void 0?"":je,Ze=Te.rootPrefixCls,Tt="".concat(Ze,"-item-group-title"),Ot="".concat(Ze,"-item-group-list"),st=Te.title,gt=Te.children;return ie.forEach(function(kt){return delete Te[kt]}),delete Te.onClick,delete Te.direction,C.createElement("li",Object.assign({},Te,{className:"".concat(ct," ").concat(Ze,"-item-group")}),C.createElement("div",{className:Tt,title:typeof st=="string"?st:void 0},st),C.createElement("ul",{className:Ot},C.Children.map(gt,this.renderInnerMenuItem)))}}]),ft}(C.Component);qe.isMenuItemGroup=!0,qe.defaultProps={disabled:!0};var pt=qe,Pt=function(lt){var ft=lt.className,Qe=lt.rootPrefixCls,Te=lt.style;return C.createElement("li",{className:"".concat(ft," ").concat(Qe,"-item-divider"),style:Te})};Pt.defaultProps={disabled:!0,className:"",style:{}};var Rt=Pt,Mt=We.e=ve},"3tLw":function($e,We,z){$e.exports=z.p+"static/a.39070d50.svg"},"4xil":function($e,We,z){$e.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","volume-controls":"volume-controls___QLaWH","fullscreen-button":"fullscreen-button___2nHzc","pip-button":"pip-button___18qQG","playback-animation":"playback-animation___gCL6X",volume:"volume___10eUe",hidden:"hidden___2JBJW"}},"55Ip":function($e,We,z){"use strict";z.d(We,"a",function(){return t});var ae=z("Ty5D"),Z=z("dI71"),U=z("q1tI"),w=z.n(U),P=z("YS25"),S=z("17x9"),C=z.n(S),T=z("wx14"),l=z("zLVn"),p=z("9R94"),h=function(E){Object(Z.a)(a,E);function a(){for(var O,A=arguments.length,D=new Array(A),I=0;I=0||A.relatedTarget.className.indexOf("".concat(K,"-next"))>=0))return;E.setState({goInputText:""}),F(E.getValidValue())},E.go=function(A){var D=E.state.goInputText;if(D==="")return;(A.keyCode===c.ENTER||A.type==="click")&&(E.setState({goInputText:""}),E.props.quickGo(E.getValidValue()))},E}return Object(P.a)(m,[{key:"getValidValue",value:function(){var a=this.state,x=a.goInputText,O=a.current;return!x||isNaN(x)?O:Number(x)}},{key:"getPageSizeOptions",value:function(){var a=this.props,x=a.pageSize,O=a.pageSizeOptions;return O.some(function(A){return A.toString()===x.toString()})?O:O.concat([x.toString()]).sort(function(A,D){var I=isNaN(Number(A))?0:Number(A),F=isNaN(Number(D))?0:Number(D);return I-F})}},{key:"render",value:function(){var a=this,x=this.props,O=x.pageSize,A=x.locale,D=x.rootPrefixCls,I=x.changeSize,F=x.quickGo,K=x.goButton,ne=x.selectComponentClass,j=x.buildOptionText,G=x.selectPrefixCls,X=x.disabled,J=this.state.goInputText,B="".concat(D,"-options"),Q=ne,ie=null,oe=null,xe=null;if(!I&&!F)return null;var ye=this.getPageSizeOptions();if(I&&Q){var Ae=ye.map(function(pe,Oe){return l.a.createElement(Q.Option,{key:Oe,value:pe.toString()},(j||a.buildOptionText)(pe))});ie=l.a.createElement(Q,{disabled:X,prefixCls:G,showSearch:!1,className:"".concat(B,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(O||ye[0]).toString(),onChange:this.changeSize,getPopupContainer:function(Oe){return Oe.parentNode}},Ae)}return F&&(K&&(xe=typeof K=="boolean"?l.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:X,className:"".concat(B,"-quick-jumper-button")},A.jump_to_confirm):l.a.createElement("span",{onClick:this.go,onKeyUp:this.go},K)),oe=l.a.createElement("div",{className:"".concat(B,"-quick-jumper")},A.jump_to,l.a.createElement("input",{disabled:X,type:"text",value:J,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),A.page,xe)),l.a.createElement("li",{className:"".concat(B)},ie,oe)}}]),m}(l.a.Component);s.defaultProps={pageSizeOptions:["10","20","50","100"]};var f=s,i=z("N2Kk");function n(){}function t(b){return typeof b=="number"&&isFinite(b)&&Math.floor(b)===b}function u(b,v,m){return m}function y(b,v,m){var E=typeof b=="undefined"?v.pageSize:b;return Math.floor((m.total-1)/E)+1}var g=function(b){Object(S.a)(m,b);var v=Object(C.a)(m);function m(E){var a;Object(w.a)(this,m),a=v.call(this,E),a.getJumpPrevPage=function(){return Math.max(1,a.state.current-(a.props.showLessItems?3:5))},a.getJumpNextPage=function(){return Math.min(y(void 0,a.state,a.props),a.state.current+(a.props.showLessItems?3:5))},a.getItemIcon=function(I,F){var K=a.props.prefixCls,ne=I||l.a.createElement("button",{type:"button","aria-label":F,className:"".concat(K,"-item-link")});return typeof I=="function"&&(ne=l.a.createElement(I,Object(U.a)({},a.props))),ne},a.savePaginationNode=function(I){a.paginationNode=I},a.isValid=function(I){return t(I)&&I!==a.state.current},a.shouldDisplayQuickJumper=function(){var I=a.props,F=I.showQuickJumper,K=I.pageSize,ne=I.total;return ne<=K?!1:F},a.handleKeyDown=function(I){(I.keyCode===c.ARROW_UP||I.keyCode===c.ARROW_DOWN)&&I.preventDefault()},a.handleKeyUp=function(I){var F=a.getValidValue(I),K=a.state.currentInputValue;F!==K&&a.setState({currentInputValue:F}),I.keyCode===c.ENTER?a.handleChange(F):I.keyCode===c.ARROW_UP?a.handleChange(F-1):I.keyCode===c.ARROW_DOWN&&a.handleChange(F+1)},a.changePageSize=function(I){var F=a.state.current,K=y(I,a.state,a.props);F=F>K?K:F,K===0&&(F=a.state.current),typeof I=="number"&&("pageSize"in a.props||a.setState({pageSize:I}),"current"in a.props||a.setState({current:F,currentInputValue:F})),a.props.onShowSizeChange(F,I),"onChange"in a.props&&a.props.onChange&&a.props.onChange(F,I)},a.handleChange=function(I){var F=a.props.disabled,K=I;if(a.isValid(K)&&!F){var ne=y(void 0,a.state,a.props);K>ne?K=ne:K<1&&(K=1),"current"in a.props||a.setState({current:K,currentInputValue:K});var j=a.state.pageSize;return a.props.onChange(K,j),K}return a.state.current},a.prev=function(){a.hasPrev()&&a.handleChange(a.state.current-1)},a.next=function(){a.hasNext()&&a.handleChange(a.state.current+1)},a.jumpPrev=function(){a.handleChange(a.getJumpPrevPage())},a.jumpNext=function(){a.handleChange(a.getJumpNextPage())},a.hasPrev=function(){return a.state.current>1},a.hasNext=function(){return a.state.current2?K-2:0),j=2;j=O?D=O:D=Number(x),D}},{key:"getShowSizeChanger",value:function(){var a=this.props,x=a.showSizeChanger,O=a.total,A=a.totalBoundaryShowSizeChanger;return typeof x!="undefined"?x:O>A}},{key:"renderPrev",value:function(a){var x=this.props,O=x.prevIcon,A=x.itemRender,D=A(a,"prev",this.getItemIcon(O,"prev page")),I=!this.hasPrev();return Object(T.isValidElement)(D)?Object(T.cloneElement)(D,{disabled:I}):D}},{key:"renderNext",value:function(a){var x=this.props,O=x.nextIcon,A=x.itemRender,D=A(a,"next",this.getItemIcon(O,"next page")),I=!this.hasNext();return Object(T.isValidElement)(D)?Object(T.cloneElement)(D,{disabled:I}):D}},{key:"render",value:function(){var a=this,x=this.props,O=x.prefixCls,A=x.className,D=x.style,I=x.disabled,F=x.hideOnSinglePage,K=x.total,ne=x.locale,j=x.showQuickJumper,G=x.showLessItems,X=x.showTitle,J=x.showTotal,B=x.simple,Q=x.itemRender,ie=x.showPrevNextJumpers,oe=x.jumpPrevIcon,xe=x.jumpNextIcon,ye=x.selectComponentClass,Ae=x.selectPrefixCls,pe=x.pageSizeOptions,Oe=this.state,Fe=Oe.current,Me=Oe.pageSize,Ce=Oe.currentInputValue;if(F===!0&&K<=Me)return null;var Le=y(void 0,this.state,this.props),de=[],ue=null,ke=null,Ue=null,Ye=null,ee=null,M=j&&j.goButton,N=G?1:2,$=Fe-1>0?Fe-1:0,V=Fe+1=N*2&&Fe!==1+2&&(de[0]=Object(T.cloneElement)(de[0],{className:"".concat(O,"-item-after-jump-prev")}),de.unshift(ue)),Le-Fe>=N*2&&Fe!==Le-2&&(de[de.length-1]=Object(T.cloneElement)(de[de.length-1],{className:"".concat(O,"-item-before-jump-next")}),de.push(ke)),Xe!==1&&de.unshift(Ue),tt!==Le&&de.push(Ye)}var Ne=null;J&&(Ne=l.a.createElement("li",{className:"".concat(O,"-total-text")},J(K,[K===0?0:(Fe-1)*Me+1,Fe*Me>K?K:Fe*Me])));var De=!this.hasPrev()||!Le,_e=!this.hasNext()||!Le;return l.a.createElement("ul",Object(ae.a)({className:h()(O,A,Object(Z.a)({},"".concat(O,"-disabled"),I)),style:D,unselectable:"unselectable",ref:this.savePaginationNode},Y),Ne,l.a.createElement("li",{title:X?ne.prev_page:null,onClick:this.prev,tabIndex:De?null:0,onKeyPress:this.runIfEnterPrev,className:h()("".concat(O,"-prev"),Object(Z.a)({},"".concat(O,"-disabled"),De)),"aria-disabled":De},this.renderPrev($)),de,l.a.createElement("li",{title:X?ne.next_page:null,onClick:this.next,tabIndex:_e?null:0,onKeyPress:this.runIfEnterNext,className:h()("".concat(O,"-next"),Object(Z.a)({},"".concat(O,"-disabled"),_e)),"aria-disabled":_e},this.renderNext(V)),l.a.createElement(f,{disabled:I,locale:ne,rootPrefixCls:O,selectComponentClass:ye,selectPrefixCls:Ae,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Fe,pageSize:Me,pageSizeOptions:pe,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:M}))}}],[{key:"getDerivedStateFromProps",value:function(a,x){var O={};if("current"in a&&(O.current=a.current,a.current!==x.current&&(O.currentInputValue=O.current)),"pageSize"in a&&a.pageSize!==x.pageSize){var A=x.current,D=y(a.pageSize,x,a);A=A>D?D:A,"current"in a||(O.current=A,O.currentInputValue=A),O.pageSize=a.pageSize}return O}}]),m}(l.a.Component);g.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:n,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:n,locale:i.a,style:{},itemRender:u,totalBoundaryShowSizeChanger:50};var _=g},"6RRn":function($e,We,z){"use strict";var ae=z("wCXF"),Z=z("n6Qo");z.d(We,"b",function(){return Z.a});var U=z("IBYe"),w=z("6eGT"),P=z("hW8S");z.d(We,"a",function(){return P.a}),We.c=ae.b},"6eGT":function($e,We,z){"use strict";function ae(Z){return null}We.a=ae},"7+5b":function($e,We,z){$e.exports=z.p+"static/v.e7f297d6.svg"},"7ahc":function($e,We,z){"use strict";z.d(We,"a",function(){return y});var ae=z("k1fw"),Z=z("0Owb"),U=z("+L6B"),w=z("2/Rp"),P=z("y8nQ"),S=z("Vl3Y"),C=z("tJVT"),T=z("OaEy"),l=z("2fM7"),p=z("q1tI"),h=z.n(p),d=z("VrN/"),o=z.n(d),c=z("p77/"),s=z.n(c),f=z("c5Ni"),i=z.n(f),n=l.a.Option,t={labelCol:{span:4},wrapperCol:{span:20}},u={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"]};We.b=function(g){var _=g.callback,b=g.onCancel,v=Object(p.useState)("python"),m=Object(C.a)(v,2),E=m[0],a=m[1];function x(A){a(u[A][1])}function O(A){_(A)}return h.a.createElement(S.a,Object(Z.a)({},t,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:O}),h.a.createElement(S.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},h.a.createElement(l.a,{onChange:x},Object.keys(u).map(function(A){return h.a.createElement(n,{key:A,value:A},u[A][0])}))),h.a.createElement(S.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},h.a.createElement(y,{mode:E})),h.a.createElement("div",{className:"flex-container flex-end"},h.a.createElement(w.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),h.a.createElement(w.a,{type:"ghost",onClick:b},"\u53D6\u6D88")))};function y(g){var _=g.value,b=g.onChange,v=g.mode,m=g.options,E=m===void 0?{}:m,a=Object(p.useRef)(),x=Object(p.useState)(),O=Object(C.a)(x,2),A=O[0],D=O[1];return Object(p.useEffect)(function(){if(A){function I(F){var K=F.getValue();b&&b(K)}return A.on("change",I),function(){A.off("change",I)}}},[A,b]),Object(p.useEffect)(function(){A&&A.setOption("mode",v)},[A,v]),Object(p.useEffect)(function(){A&&((_!==A.getValue()||_==="")&&setTimeout(function(){A.setValue(_||" ")},300))},[A,_]),Object(p.useEffect)(function(){if(a.current&&!A){var I=o.a.fromTextArea(a.current,Object(ae.a)({mode:v,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},E));D(I)}},[a.current,A]),h.a.createElement("div",{className:"my-codemirror-container"},h.a.createElement("textarea",{ref:a}))}},"7ixt":function($e,We,z){"use strict";z.d(We,"a",function(){return U});var ae={adjustX:1,adjustY:1},Z=[0,0],U={left:{points:["cr","cl"],overflow:ae,offset:[-4,0],targetOffset:Z},right:{points:["cl","cr"],overflow:ae,offset:[4,0],targetOffset:Z},top:{points:["bc","tc"],overflow:ae,offset:[0,-4],targetOffset:Z},bottom:{points:["tc","bc"],overflow:ae,offset:[0,4],targetOffset:Z},topLeft:{points:["bl","tl"],overflow:ae,offset:[0,-4],targetOffset:Z},leftTop:{points:["tr","tl"],overflow:ae,offset:[-4,0],targetOffset:Z},topRight:{points:["br","tr"],overflow:ae,offset:[0,-4],targetOffset:Z},rightTop:{points:["tl","tr"],overflow:ae,offset:[4,0],targetOffset:Z},bottomRight:{points:["tr","br"],overflow:ae,offset:[0,4],targetOffset:Z},rightBottom:{points:["bl","br"],overflow:ae,offset:[4,0],targetOffset:Z},bottomLeft:{points:["tl","bl"],overflow:ae,offset:[0,4],targetOffset:Z},leftBottom:{points:["br","bl"],overflow:ae,offset:[-4,0],targetOffset:Z}},w=U},"7qur":function($e,We,z){"use strict";z.d(We,"m",function(){return Z}),z.d(We,"s",function(){return U}),z.d(We,"h",function(){return w}),z.d(We,"o",function(){return P}),z.d(We,"n",function(){return S}),z.d(We,"l",function(){return C}),z.d(We,"b",function(){return T}),z.d(We,"q",function(){return l}),z.d(We,"t",function(){return p}),z.d(We,"v",function(){return h}),z.d(We,"w",function(){return d}),z.d(We,"u",function(){return o}),z.d(We,"p",function(){return c}),z.d(We,"f",function(){return s}),z.d(We,"a",function(){return f}),z.d(We,"j",function(){return i}),z.d(We,"k",function(){return n}),z.d(We,"d",function(){return t}),z.d(We,"g",function(){return u}),z.d(We,"c",function(){return y}),z.d(We,"e",function(){return g}),z.d(We,"i",function(){return _}),z.d(We,"r",function(){return b});var ae=z("ErOA");function Z(v){return Object(ae.c)("mypractices/".concat(v,".json"),{hidePopLogin:!0})}function U(v,m){return Object(ae.f)("mypractices/".concat(v,"/code_submit.json"),m)}function w(v,m){return Object(ae.c)("mypractices/".concat(v,"/code_debug.json"),m)}function P(v,m){return Object(ae.c)("mypractices/".concat(v,"/submit_records.json"),m)}function S(v){return Object(ae.c)("mypractices/record_detail.json",{id:v})}function C(v,m){return Object(ae.c)("mypractices/".concat(v,"/result.json"),{mode:m})}function T(v,m){return Object(ae.f)("mypractices/".concat(v,"/add_notes.json"),m)}function l(v,m){return Object(ae.f)("mypractices/".concat(v,"/restore_initial_code.json"),m)}function p(v,m){return Object(ae.f)("mypractices/".concat(v,"/sync_code.json"),m)}function h(v,m){return Object(ae.f)("mypractices/".concat(v,"/update_code.json"),m)}function d(v){return Object(ae.f)("mypractices/".concat(v,"/initial_codes.json"))}function o(v,m){return Object(ae.f)("discusses/".concat(v,"/plus.json"),m)}function c(v){return Object(ae.c)("practices/practices_list.json",v)}function s(v,m){return Object(ae.c)("practices/".concat(v,"/question_solution_articles"),m)}function f(v,m){return Object(ae.f)("practices/".concat(v,"/question_solution_articles"),m)}function i(v,m){return Object(ae.g)("practices/".concat(v,"/question_solution_articles/").concat(m==null?void 0:m.active),m)}function n(v,m){return Object(ae.c)("practices/".concat(v,"/question_solution_articles/").concat(m==null?void 0:m.active,"/edit"),m)}function t(v,m){return Object(ae.c)("practices/".concat(v,"/question_solution_articles/").concat(m==null?void 0:m.active),m)}function u(v,m){return Object(ae.f)("practices/".concat(v,"/question_solution_articles/").concat(m==null?void 0:m.active,"/set_authority_or_excellent"),m)}function y(v,m){return Object(ae.f)("practices/".concat(v,"/question_solution_articles/").concat(m==null?void 0:m.active,"/praise_or_treads"),m)}function g(v,m){return Object(ae.f)("practices/".concat(v,"/question_solution_articles/").concat(m==null?void 0:m.active,"/hide"))}function _(v,m){return Object(ae.b)("practices/".concat(v,"/question_solution_articles/").concat(m==null?void 0:m.active),m)}function b(v,m){return Object(ae.f)("mypractices/".concat(v,"/update_practice_time_sum"),m)}},"815F":function($e,We,z){"use strict";z.d(We,"e",function(){return C}),z.d(We,"c",function(){return l}),z.d(We,"d",function(){return p}),z.d(We,"a",function(){return d}),z.d(We,"f",function(){return o}),z.d(We,"b",function(){return c});var ae=z("KQm4"),Z=z("VTBJ"),U=z("Ff2n"),w=z("Zm9Q"),P=z("Kwbf"),S=z("OZM5");function C(s,f){return s!=null?s:f}function T(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],f=new Map;function i(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(n||[]).forEach(function(u){var y=u.key,g=u.children;Object(P.a)(y!=null,"Tree node must have a certain key: [".concat(t).concat(y,"]"));var _=String(y);Object(P.a)(!f.has(_)||y===null||y===void 0,"Same 'key' exist in the Tree: ".concat(_)),f.set(_,!0),i(g,"".concat(t).concat(_," > "))})}i(s)}function l(s){function f(i){var n=Object(w.a)(i);return n.map(function(t){if(!Object(S.i)(t))return Object(P.a)(!t,"Tree/TreeNode can only accept TreeNode as children."),null;var u=t.key,y=t.props,g=y.children,_=Object(U.a)(y,["children"]),b=Object(Z.a)({key:u},_),v=f(g);return v.length&&(b.children=v),b}).filter(function(t){return t})}return f(s)}function p(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=new Set(f===!0?[]:f),n=[];function t(u){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return u.map(function(g,_){var b=Object(S.h)(y?y.pos:"0",_),v=C(g.key,b),m=Object(Z.a)(Object(Z.a)({},g),{},{parent:y,pos:b,children:null,data:g,isStart:[].concat(Object(ae.a)(y?y.isStart:[]),[_===0]),isEnd:[].concat(Object(ae.a)(y?y.isEnd:[]),[_===u.length-1])});return n.push(m),f===!0||i.has(v)?m.children=t(g.children||[],m):m.children=[],m})}return t(s),n}function h(s,f,i){var n;i?typeof i=="string"?n=function(y){return y[i]}:typeof i=="function"&&(n=function(y){return i(y)}):n=function(y,g){return C(y.key,g)};function t(u,y,g){var _=u?u.children:s,b=u?Object(S.h)(g.pos,y):"0";if(u){var v=n(u,b),m={node:u,index:y,pos:b,key:v,parentPos:g.node?g.pos:null,level:g.level+1};f(m)}_&&_.forEach(function(E,a){t(E,a,{node:u,pos:b,level:g?g.level+1:-1})})}t(null)}function d(s){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=f.initWrapper,n=f.processEntity,t=f.onProcessFinished,u=arguments.length>2?arguments[2]:void 0,y={},g={},_={posEntities:y,keyEntities:g};return i&&(_=i(_)||_),h(s,function(b){var v=b.node,m=b.index,E=b.pos,a=b.key,x=b.parentPos,O=b.level,A={node:v,index:m,key:a,pos:E,level:O},D=C(a,E);y[E]=A,g[D]=A,A.parent=y[x],A.parent&&(A.parent.children=A.parent.children||[],A.parent.children.push(A)),n&&n(A,_)},u),t&&t(_),_}function o(s,f){var i=f.expandedKeys,n=f.selectedKeys,t=f.loadedKeys,u=f.loadingKeys,y=f.checkedKeys,g=f.halfCheckedKeys,_=f.dragOverNodeKey,b=f.dropPosition,v=f.keyEntities,m=v[s],E={eventKey:s,expanded:i.indexOf(s)!==-1,selected:n.indexOf(s)!==-1,loaded:t.indexOf(s)!==-1,loading:u.indexOf(s)!==-1,checked:y.indexOf(s)!==-1,halfChecked:g.indexOf(s)!==-1,pos:String(m?m.pos:""),dragOver:_===s&&b===0,dragOverGapTop:_===s&&b===-1,dragOverGapBottom:_===s&&b===1};return E}function c(s){var f=s.data,i=s.expanded,n=s.selected,t=s.checked,u=s.loaded,y=s.loading,g=s.halfChecked,_=s.dragOver,b=s.dragOverGapTop,v=s.dragOverGapBottom,m=s.pos,E=s.active,a=Object(Z.a)(Object(Z.a)({},f),{},{expanded:i,selected:n,checked:t,loaded:u,loading:y,halfChecked:g,dragOver:_,dragOverGapTop:b,dragOverGapBottom:v,pos:m,active:E});return"props"in a||Object.defineProperty(a,"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}}),a}},"8EBN":function($e,We,z){(function(ae){ae(z("VrN/"))})(function(ae){"use strict";ae.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var Z=0;Z-1&&w.substring(C+1,w.length);if(T)return ae.findModeByExtension(T)},ae.findModeByName=function(w){w=w.toLowerCase();for(var P=0;P=Q.length?ie.slice(Q.length):ie}).join(` `)}var p=[],h=["
    "],d=new C.a.Renderer,o=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function c(){p.length=0,h=["
      "]}var s={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function f(X,J,B,Q){if(J>=X.length||X[J].level<=B)return J;var ie=X[J];Q.push("
    • "+ie.text+""),J++;var oe=[];return J=f(X,J,ie.level,oe),oe.length>0&&(Q.push("
        "),oe.forEach(function(xe){Q.push(xe)}),Q.push("
      ")),Q.push("
    • "),J=f(X,J,B,Q),J}function i(){return f(p,0,0,h),h.push("
    "),h.join("")}var n={heading:function(J){var B=o.exec(J);if(B)return{type:"heading",raw:B[0],depth:B[1].length,text:B[2]}},fences:function(J){var B=this.rules.block.fences.exec(J);if(B){var Q=B[0],ie=l(Q,B[3]||""),oe=B[2]?B[2].trim():B[2];if(["latex","katex","math"].indexOf(oe)>=0){var xe=y(),ye=ie;ie=xe,g[xe]={type:"block",expression:ye}}return{type:"code",raw:Q,lang:oe,text:ie}}}},t=/(?:\${2})([^\n`]+?)(?:\${2})/gi,u=0,y=function(){return"__special_katext_id_".concat(u++,"__")},g={};function _(){return g}function b(){u=0,g={}}function v(X){return X=X.replace(t,function(J,B){var Q=y();return g[Q]={type:"inline",expression:B},Q}),X}var m=d.listitem;d.listitem=function(X){return m(v(X))};var E=d.paragraph;d.paragraph=function(X){return E(v(X))};var a=d.tablecell;d.tablecell=function(X,J){return a(v(X),J)},d.code=function(X,J,B){var Q=(J||"").match(/\S*/)[0];return Q?["latex","katex","math"].indexOf(Q)>=0?"

    ".concat(X,"

    "):'
    ').concat(B?X:Object(T.escape)(X,!0),`
    `):'
    '+(B?X:Object(T.escape)(X,!0))+"
    "},d.heading=function(X,J,B){var Q=this.options.headerPrefix+B.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return p.push({anchor:Q,level:J,text:X}),"'+X+""},C.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),C.a.use({tokenizer:n,renderer:d});var x=C.a,O=z("SJMd"),A=z("ulZh"),D=z.n(A),I=z("m3rI"),F=z("Oy/b"),K=z("p5ED"),ne=/]*>/g;function j(X){var J=document.createElement("div");return J.innerHTML=X,J.childNodes.length===0?"":J.childNodes[0].nodeValue}var G=We.a=function(X){var J,B=X.value,Q=B===void 0?"":B,ie=X.className,oe=X.showTextOnly,xe=X.showLines,ye=X.style,Ae=ye===void 0?{}:ye,pe=X.stylesPrev,Oe=pe===void 0?{}:pe,Fe=(J=String(Q))===null||J===void 0?void 0:J.replace(/|<\/script>/gi,"").replace(/on\w+="[^"]*"/gi,""),Me=Object(U.useState)(""),Ce=Object(Z.a)(Me,2),Le=Ce[0],de=Ce[1],ue=Object(U.useMemo)(function(){try{var ee=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,M=/\"\/api\/attachments\/|\"\/attachments\/download\//g,N=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Fe=Fe.replace(ee,"("+I.a.API_SERVER+"/api/attachments/").replace(M,'"'+I.a.API_SERVER+"/api/attachments/").replace(N,'"'+I.a.API_SERVER+"/files/uploads/").replace(/\r\n/g,` `),Fe=Fe.replace(new RegExp("(?[TOC]

    ",i()),c()),$=$.replace(/(__special_katext_id_\d+__)/g,function(me,Re){var rt=V[Re],Pe=rt.type,Ie=rt.expression;return Object(F.renderToString)(j(Ie)||"",{displayMode:Pe==="block",throwOnError:!1,output:"html"})}),$=$.replace(/▁/g,"\u2581\u2581\u2581"),b(),oe){var Y=document.createElement("div");return Y.innerHTML=$,Y.innerText}return setTimeout(function(){return Ye()},500),$},[Fe]),ke=Object(U.useRef)();s.WebkitLineClamp=xe,xe&&(Ae=Object(ae.a)(Object(ae.a)({},Ae),s));function Ue(ee){var M=ee.target;if(M.tagName.toUpperCase()==="A"){var N=M.getAttribute("href");if(N.indexOf("office")>-1)ee.preventDefault(),de(N);else if(N.startsWith("#")){ee.preventDefault();var $=document.getElementById(N.replace("#",""));$&&$.scrollIntoView(!0)}}}var Ye=function(){var M,N=(M=ke.current)===null||M===void 0?void 0:M.querySelectorAll("video");N==null||N.forEach(function($){if($.oncontextmenu=function(){return!1},$.src.indexOf(".m3u8")>-1&&!$.canPlayType("application/vnd.apple.mpegurl")){if(D.a.isSupported()){var V=new D.a;V.loadSource($.src),V.attachMedia($)}}})};return Object(U.useEffect)(function(){if(ke.current&&ue&&(ue.match(ne)&&window.PR.prettyPrint()),ke.current)return ke.current.addEventListener("click",Ue),function(){ke.current.removeEventListener("click",Ue),b(),c()}},[ue,ke.current,Ue]),w.a.createElement(w.a.Fragment,null,w.a.createElement("div",{ref:ke,style:Object(ae.a)({},Ae),className:"".concat(ie||""," markdown-body "),dangerouslySetInnerHTML:{__html:ue}}),w.a.createElement(K.a,{close:!0,data:Le,type:Le!=null&&Le.length?"office":"",style:Object(ae.a)({},Oe),onClose:function(){return de("")}}))}},"9VGf":function($e,We,z){"use strict";z.d(We,"a",function(){return U});var ae=z("q1tI"),Z=z.n(ae);function U(w,P){var S=Object(ae.useRef)();Object(ae.useEffect)(function(){S.current=w}),Object(ae.useEffect)(function(){function C(){S.current()}if(P!==null){var T=setInterval(C,P);return function(){return clearInterval(T)}}},[P])}},AMnG:function($e,We,z){"use strict";var ae=z("miYZ"),Z=z("tsqr"),U=z("tJVT"),w=z("q1tI"),P=z.n(w),S=z("nWbc"),C=z.n(S),T=z("Ot1p");We.a=function(l){var p=l.id,h=l.activeDiscussIndex,d=l.onReplyDiscuss,o=Object(w.useState)(""),c=Object(U.a)(o,2),s=c[0],f=c[1];function i(t){f(t)}function n(){if(!s){Z.b.info("\u56DE\u590D\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A!");return}d(p,s),f("")}return P.a.createElement("div",{key:p,className:"discuss-item-editor",style:{display:h===p?"block":"none",width:"100%"}},P.a.createElement(T.a,{miniToolbar:!0,startInit:h===p,defaultValue:s,id:p,noStorage:!0,watch:!1,height:155,placeholder:"\u6211\u8981\u56DE\u590D",showResizeBar:!0,onChange:i}),P.a.createElement("a",{onClick:n,className:"btn-send"},"\u53D1\u9001"))}},Aky1:function($e,We,z){"use strict";z.d(We,"a",function(){return l});var ae=z("ErOA"),Z=z("ppsT"),U=z.n(Z),w="",P,S="";function C(p){T(p)}function T(p){P=new U.a.Vod({timeout:6e4,partSize:1048576,parallel:5,retryCount:3,retryDuration:2,region:"ap-southeast-1",userId:1829848226361863,enableUploadProgress:!1,addFileSuccess:function(d){console.log("addFileSuccess: "+d.file.name),p.addFileSuccess&&p.addFileSuccess(d),P.startUpload()},onUploadstarted:function(d){var o=d.file.name;if(d.videoId){var f="/api/users/".concat(w,"/video_auths.json");Object(ae.a)(f,{method:"put",body:{video_id:d.videoId,title:o,file_name:o,virtual_classroom_id:S}}).then(function(i){if(i.status==-1){p.onUploadError&&p.onUploadError(d);return}var n=i.data,t=n.UploadAuth,u=n.UploadAddress,y=n.VideoId;P.setUploadAuthAndAddress(d,t,u)}).catch(function(i){P.deleteFile(P._curIndex),P.nextUpload(),console.log(i)})}else{var c="/api/users/".concat(w,"/video_auths.json"),s="";Object(ae.a)(c,{method:"Post",body:{title:s+o,file_name:s+o,virtual_classroom_id:S}}).then(function(i){if(i){var n=i.data,t=n.UploadAuth,u=n.UploadAddress,y=n.VideoId;P.setUploadAuthAndAddress(d,t,u,y)}}).catch(function(i){P.deleteFile(P._curIndex),P.nextUpload(),console.log(i)}),console.log("\u6587\u4EF6\u5F00\u59CB\u4E0A\u4F20...")}},onUploadSucceed:function(d){p.onUploadSucceed&&p.onUploadSucceed(d),console.log("\u6587\u4EF6\u4E0A\u4F20\u6210\u529F!")},onUploadFailed:function(d,o,c){p.onUploadFailed&&p.onUploadFailed(d),console.log("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25!")},onUploadCanceled:function(d,o,c){console.log("\u6587\u4EF6\u4E0A\u4F20\u5DF2\u6682\u505C!")},onUploadProgress:function(d,o,c){p.onUploadProgress&&p.onUploadProgress(d,o,c);var s=Math.ceil(c*100);console.log("\u6587\u4EF6\u4E0A\u4F20\u4E2D...")},onUploadTokenExpired:function(d){console.log("\u6587\u4EF6\u4E0A\u4F20\u8D85\u65F6!");var o="/api/users/".concat(w,"/video_auths.json");Object(ae.a)(o,{method:"put",body:{video_id:d.videoId}}).then(function(c){var s=c.data,f=s.UploadAuth;P.resumeUploadWithAuth(f)}).catch(function(c){console.log(c)})},onUploadEnd:function(d){p.onUploadEnd&&p.onUploadEnd(d),console.log("onUploadEnd: uploaded all the files")}}),p.gotUploader&&p.gotUploader(P)}function l(p,h,d){p&&(w=p),h&&(S=h),C(d)}},BU3w:function($e,We,z){"use strict";z.d(We,"a",function(){return S});var ae=z("MNnm"),Z="rc-util-key";function U(C){if(C.attachTo)return C.attachTo;var T=document.querySelector("head");return T||document.body}function w(C){var T,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(ae.a)())return null;var p=document.createElement("style");if((T=l.csp)===null||T===void 0?void 0:T.nonce){var h;p.nonce=(h=l.csp)===null||h===void 0?void 0:h.nonce}p.innerHTML=C;var d=U(l),o=d.firstChild;return l.prepend&&d.prepend?d.prepend(p):l.prepend&&o?d.insertBefore(p,o):d.appendChild(p),p}var P=new Map;function S(C,T){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},p=U(l);if(!P.has(p)){var h=w("",l),d=h.parentNode;P.set(p,d),d.removeChild(h)}var o=Array.from(P.get(p).children).find(function(n){return n.tagName==="STYLE"&&n[Z]===T});if(o){var c,s;if(((c=l.csp)===null||c===void 0?void 0:c.nonce)&&o.nonce!==((s=l.csp)===null||s===void 0?void 0:s.nonce)){var f;o.nonce=(f=l.csp)===null||f===void 0?void 0:f.nonce}return o.innerHTML!==C&&(o.innerHTML=C),o}var i=w(C,l);return i[Z]=T,i}},Bd2K:function($e,We,z){(function(ae){ae(z("VrN/"),z("osHv"))})(function(ae){ae.defineOption("autoCloseTags",!1,function(l,p,h){if(h!=ae.Init&&h&&l.removeKeyMap("autoCloseTags"),!p)return;var d={name:"autoCloseTags"};(typeof p!="object"||p.whenClosing!==!1)&&(d["'/'"]=function(o){return S(o)}),(typeof p!="object"||p.whenOpening!==!1)&&(d["'>'"]=function(o){return w(o)}),l.addKeyMap(d)});var Z=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],U=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function w(l){if(l.getOption("disableInput"))return ae.Pass;for(var p=l.listSelections(),h=[],d=l.getOption("autoCloseTags"),o=0;oc.ch&&(t=t.slice(0,t.length-s.end+c.ch));var _=t.toLowerCase();if(!t||s.type=="string"&&(s.end!=c.ch||!/[\"\']/.test(s.string.charAt(s.string.length-1))||s.string.length==1)||s.type=="tag"&&n.close||s.string.indexOf("/")==c.ch-s.start-1||y&&C(y,_)>-1||T(l,f.mode.xmlCurrentContext&&f.mode.xmlCurrentContext(i)||[],t,c,!0))return ae.Pass;var b=typeof d=="object"&&d.emptyTags;if(b&&C(b,t)>-1){h[o]={text:"/>",newPos:ae.Pos(c.line,c.ch+2)};continue}var v=g&&C(g,_)>-1;h[o]={indent:v,text:">"+(v?` `:"")+"",newPos:v?ae.Pos(c.line+1,0):ae.Pos(c.line,c.ch+1)}}for(var m=typeof d=="object"&&d.dontIndentOnAutoClose,o=p.length-1;o>=0;o--){var E=h[o];l.replaceRange(E.text,p[o].head,p[o].anchor,"+insert");var a=l.listSelections().slice(0);a[o]={head:E.newPos,anchor:E.newPos},l.setSelections(a),!m&&E.indent&&(l.indentLine(E.newPos.line,null,!0),l.indentLine(E.newPos.line+1,null,!0))}}function P(l,p){for(var h=l.listSelections(),d=[],o=p?"/":""&&(y+=">"),d[f]=y}if(l.replaceSelections(d),h=l.listSelections(),!s)for(var f=0;f=0&&p[i]==h;i--)++f;d=s.to;for(var i=1;i0){for(var p=0;p1&&arguments[1]!==void 0?arguments[1]:"",p=[],h=0;h=0;p--){var h=U().key(p);l(w(h),h)}}function C(l){return U().removeItem(l)}function T(){return U().clear()}},DlQD:function($e,We,z){(function(ae,Z){$e.exports=Z()})(this,function(){"use strict";function ae(Ne,De){for(var _e=0;_eNe.length)&&(De=Ne.length);for(var _e=0,he=new Array(De);_e=Ne.length?{done:!0}:{done:!1,value:Ne[he++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return _e=Ne[Symbol.iterator](),_e.next.bind(_e)}function S(Ne,De){return De={exports:{}},Ne(De,De.exports),De.exports}var C=S(function(Ne){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 _e(he){Ne.exports.defaults=he}Ne.exports={defaults:De(),getDefaults:De,changeDefaults:_e}}),T=C.defaults,l=C.getDefaults,p=C.changeDefaults,h=/[&<>"']/,d=/[&<>"']/g,o=/[<>"']|&(?!#?\w+;)/,c=/[<>"']|&(?!#?\w+;)/g,s={"&":"&","<":"<",">":">",'"':""","'":"'"},f=function(De){return s[De]};function i(Ne,De){if(De){if(h.test(Ne))return Ne.replace(d,f)}else if(o.test(Ne))return Ne.replace(c,f);return Ne}var n=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function t(Ne){return Ne.replace(n,function(De,_e){return _e=_e.toLowerCase(),_e==="colon"?":":_e.charAt(0)==="#"?_e.charAt(1)==="x"?String.fromCharCode(parseInt(_e.substring(2),16)):String.fromCharCode(+_e.substring(1)):""})}var u=/(^|[^\[])\^/g;function y(Ne,De){Ne=Ne.source||Ne,De=De||"";var _e={replace:function(ve,Ee){return Ee=Ee.source||Ee,Ee=Ee.replace(u,"$1"),Ne=Ne.replace(ve,Ee),_e},getRegex:function(){return new RegExp(Ne,De)}};return _e}var g=/[^\w:]/g,_=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function b(Ne,De,_e){if(Ne){var he;try{he=decodeURIComponent(t(_e)).replace(g,"").toLowerCase()}catch(ve){return null}if(he.indexOf("javascript:")===0||he.indexOf("vbscript:")===0||he.indexOf("data:")===0)return null}De&&!_.test(_e)&&(_e=x(De,_e));try{_e=encodeURI(_e).replace(/%25/g,"%")}catch(ve){return null}return _e}var v={},m=/^[^:]+:\/*[^/]*$/,E=/^([^:]+:)[\s\S]*$/,a=/^([^:]+:\/*[^/]*)[\s\S]*$/;function x(Ne,De){v[" "+Ne]||(m.test(Ne)?v[" "+Ne]=Ne+"/":v[" "+Ne]=I(Ne,"/",!0)),Ne=v[" "+Ne];var _e=Ne.indexOf(":")===-1;return De.substring(0,2)==="//"?_e?De:Ne.replace(E,"$1")+De:De.charAt(0)==="/"?_e?De:Ne.replace(a,"$1")+De:Ne+De}var O={exec:function(){}};function A(Ne){for(var De=1,_e,he;De=0&&Ge[pt]==="\\";)qe=!qe;return qe?"|":" |"}),he=_e.split(/ \|/),ve=0;if(he.length>De)he.splice(De);else for(;he.length=he.length?ve.slice(he.length):ve}).join(` `)}var oe=function(){function Ne(_e){this.options=_e||j}var De=Ne.prototype;return De.space=function(he){var ve=this.rules.block.newline.exec(he);if(ve)return ve[0].length>1?{type:"space",raw:ve[0]}:{raw:` `}},De.code=function(he,ve){var Ee=this.rules.block.code.exec(he);if(Ee){var be=ve[ve.length-1];if(be&&be.type==="paragraph")return{raw:Ee[0],text:Ee[0].trimRight()};var Ge=Ee[0].replace(/^ {4}/gm,"");return{type:"code",raw:Ee[0],codeBlockStyle:"indented",text:this.options.pedantic?Ge:G(Ge,` `)}}},De.fences=function(he){var ve=this.rules.block.fences.exec(he);if(ve){var Ee=ve[0],be=ie(Ee,ve[3]||"");return{type:"code",raw:Ee,lang:ve[2]?ve[2].trim():ve[2],text:be}}},De.heading=function(he){var ve=this.rules.block.heading.exec(he);if(ve)return{type:"heading",raw:ve[0],depth:ve[1].length,text:ve[2]}},De.nptable=function(he){var ve=this.rules.block.nptable.exec(he);if(ve){var Ee={type:"table",header:X(ve[1].replace(/^ *| *\| *$/g,"")),align:ve[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ve[3]?ve[3].replace(/\n$/,"").split(` `):[],raw:ve[0]};if(Ee.header.length===Ee.align.length){var be=Ee.align.length,Ge;for(Ge=0;Ge ?/gm,"");return{type:"blockquote",raw:ve[0],text:Ee}}},De.list=function(he){var ve=this.rules.block.list.exec(he);if(ve){for(var Ee=ve[0],be=ve[2],Ge=be.length>1,qe=be[be.length-1]===")",pt={type:"list",raw:Ee,ordered:Ge,start:Ge?+be.slice(0,-1):"",loose:!1,items:[]},Pt=ve[0].match(this.rules.block.item),Rt=!1,Mt,wt,lt,ft,Qe,Te,je,ct=Pt.length,Ze=0;Ze1||this.options.smartLists&<!==be)&&(ft=Pt.slice(Ze+1).join(` `),pt.raw=pt.raw.substring(0,pt.raw.length-ft.length),Ze=ct-1)),Qe=Rt||/\n\n(?!\s*$)/.test(Mt),Ze!==ct-1&&(Rt=Mt.charAt(Mt.length-1)===` `,Qe||(Qe=Rt)),Qe&&(pt.loose=!0),Te=/^\[[ xX]\] /.test(Mt),je=void 0,Te&&(je=Mt[1]!==" ",Mt=Mt.replace(/^\[[ xX]\] +/,"")),pt.items.push({type:"list_item",raw:Ee,task:Te,checked:je,loose:Qe,text:Mt});return pt}},De.html=function(he){var ve=this.rules.block.html.exec(he);if(ve)return{type:this.options.sanitize?"paragraph":"html",raw:ve[0],pre:!this.options.sanitizer&&(ve[1]==="pre"||ve[1]==="script"||ve[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ve[0]):J(ve[0]):ve[0]}},De.def=function(he){var ve=this.rules.block.def.exec(he);if(ve){ve[3]&&(ve[3]=ve[3].substring(1,ve[3].length-1));var Ee=ve[1].toLowerCase().replace(/\s+/g," ");return{tag:Ee,raw:ve[0],href:ve[2],title:ve[3]}}},De.table=function(he){var ve=this.rules.block.table.exec(he);if(ve){var Ee={type:"table",header:X(ve[1].replace(/^ *| *\| *$/g,"")),align:ve[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ve[3]?ve[3].replace(/\n$/,"").split(` `):[]};if(Ee.header.length===Ee.align.length){Ee.raw=ve[0];var be=Ee.align.length,Ge;for(Ge=0;Ge/i.test(be[0])&&(ve=!1),!Ee&&/^<(pre|code|kbd|script)(\s|>)/i.test(be[0])?Ee=!0:Ee&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(be[0])&&(Ee=!1),{type:this.options.sanitize?"text":"html",raw:be[0],inLink:ve,inRawBlock:Ee,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(be[0]):J(be[0]):be[0]}},De.link=function(he){var ve=this.rules.inline.link.exec(he);if(ve){var Ee=B(ve[2],"()");if(Ee>-1){var be=ve[0].indexOf("!")===0?5:4,Ge=be+ve[1].length+Ee;ve[2]=ve[2].substring(0,Ee),ve[0]=ve[0].substring(0,Ge).trim(),ve[3]=""}var qe=ve[2],pt="";if(this.options.pedantic){var Pt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(qe);Pt?(qe=Pt[1],pt=Pt[3]):pt=""}else pt=ve[3]?ve[3].slice(1,-1):"";qe=qe.trim().replace(/^<([\s\S]*)>$/,"$1");var Rt=Q(ve,{href:qe&&qe.replace(this.rules.inline._escapes,"$1"),title:pt&&pt.replace(this.rules.inline._escapes,"$1")},ve[0]);return Rt}},De.reflink=function(he,ve){var Ee;if((Ee=this.rules.inline.reflink.exec(he))||(Ee=this.rules.inline.nolink.exec(he))){var be=(Ee[2]||Ee[1]).replace(/\s+/g," ");if(be=ve[be.toLowerCase()],!be||!be.href){var Ge=Ee[0].charAt(0);return{type:"text",raw:Ge,text:Ge}}var qe=Q(Ee,be,Ee[0]);return qe}},De.strong=function(he,ve,Ee){Ee===void 0&&(Ee="");var be=this.rules.inline.strong.start.exec(he);if(be&&(!be[1]||be[1]&&(Ee===""||this.rules.inline.punctuation.exec(Ee)))){ve=ve.slice(-1*he.length);var Ge=be[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Ge.lastIndex=0;for(var qe;(be=Ge.exec(ve))!=null;)if(qe=this.rules.inline.strong.middle.exec(ve.slice(0,be.index+3)),qe)return{type:"strong",raw:he.slice(0,qe[0].length),text:he.slice(2,qe[0].length-2)}}},De.em=function(he,ve,Ee){Ee===void 0&&(Ee="");var be=this.rules.inline.em.start.exec(he);if(be&&(!be[1]||be[1]&&(Ee===""||this.rules.inline.punctuation.exec(Ee)))){ve=ve.slice(-1*he.length);var Ge=be[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Ge.lastIndex=0;for(var qe;(be=Ge.exec(ve))!=null;)if(qe=this.rules.inline.em.middle.exec(ve.slice(0,be.index+2)),qe)return{type:"em",raw:he.slice(0,qe[0].length),text:he.slice(1,qe[0].length-1)}}},De.codespan=function(he){var ve=this.rules.inline.code.exec(he);if(ve){var Ee=ve[2].replace(/\n/g," "),be=/[^ ]/.test(Ee),Ge=Ee.startsWith(" ")&&Ee.endsWith(" ");return be&&Ge&&(Ee=Ee.substring(1,Ee.length-1)),Ee=J(Ee,!0),{type:"codespan",raw:ve[0],text:Ee}}},De.br=function(he){var ve=this.rules.inline.br.exec(he);if(ve)return{type:"br",raw:ve[0]}},De.del=function(he){var ve=this.rules.inline.del.exec(he);if(ve)return{type:"del",raw:ve[0],text:ve[1]}},De.autolink=function(he,ve){var Ee=this.rules.inline.autolink.exec(he);if(Ee){var be,Ge;return Ee[2]==="@"?(be=J(this.options.mangle?ve(Ee[1]):Ee[1]),Ge="mailto:"+be):(be=J(Ee[1]),Ge=be),{type:"link",raw:Ee[0],text:be,href:Ge,tokens:[{type:"text",raw:be,text:be}]}}},De.url=function(he,ve){var Ee;if(Ee=this.rules.inline.url.exec(he)){var be,Ge;if(Ee[2]==="@")be=J(this.options.mangle?ve(Ee[0]):Ee[0]),Ge="mailto:"+be;else{var qe;do qe=Ee[0],Ee[0]=this.rules.inline._backpedal.exec(Ee[0])[0];while(qe!==Ee[0]);be=J(Ee[0]),Ee[1]==="www."?Ge="http://"+be:Ge=be}return{type:"link",raw:Ee[0],text:be,href:Ge,tokens:[{type:"text",raw:be,text:be}]}}},De.inlineText=function(he,ve,Ee){var be=this.rules.inline.text.exec(he);if(be){var Ge;return ve?Ge=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(be[0]):J(be[0]):be[0]:Ge=J(this.options.smartypants?Ee(be[0]):be[0]),{type:"text",raw:be[0],text:Ge}}},Ne}(),xe=ne.noopTest,ye=ne.edit,Ae=ne.merge,pe={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:xe,table:xe,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};pe._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,pe._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,pe.def=ye(pe.def).replace("label",pe._label).replace("title",pe._title).getRegex(),pe.bullet=/(?:[*+-]|\d{1,9}[.)])/,pe.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,pe.item=ye(pe.item,"gm").replace(/bull/g,pe.bullet).getRegex(),pe.list=ye(pe.list).replace(/bull/g,pe.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+pe.def.source+")").getRegex(),pe._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",pe._comment=//,pe.html=ye(pe.html,"i").replace("comment",pe._comment).replace("tag",pe._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),pe.paragraph=ye(pe._paragraph).replace("hr",pe.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",pe._tag).getRegex(),pe.blockquote=ye(pe.blockquote).replace("paragraph",pe.paragraph).getRegex(),pe.normal=Ae({},pe),pe.gfm=Ae({},pe.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*|$)"}),pe.gfm.nptable=ye(pe.gfm.nptable).replace("hr",pe.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",pe._tag).getRegex(),pe.gfm.table=ye(pe.gfm.table).replace("hr",pe.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",pe._tag).getRegex(),pe.pedantic=Ae({},pe.normal,{html:ye(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",pe._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:xe,paragraph:ye(pe.normal._paragraph).replace("hr",pe.hr).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",pe.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var Oe={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:xe,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:xe,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",Oe.punctuation=ye(Oe.punctuation).replace(/punctuation/g,Oe._punctuation).getRegex(),Oe._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",Oe._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",Oe.em.start=ye(Oe.em.start).replace(/punctuation/g,Oe._punctuation).getRegex(),Oe.em.middle=ye(Oe.em.middle).replace(/punctuation/g,Oe._punctuation).replace(/overlapSkip/g,Oe._overlapSkip).getRegex(),Oe.em.endAst=ye(Oe.em.endAst,"g").replace(/punctuation/g,Oe._punctuation).getRegex(),Oe.em.endUnd=ye(Oe.em.endUnd,"g").replace(/punctuation/g,Oe._punctuation).getRegex(),Oe.strong.start=ye(Oe.strong.start).replace(/punctuation/g,Oe._punctuation).getRegex(),Oe.strong.middle=ye(Oe.strong.middle).replace(/punctuation/g,Oe._punctuation).replace(/blockSkip/g,Oe._blockSkip).getRegex(),Oe.strong.endAst=ye(Oe.strong.endAst,"g").replace(/punctuation/g,Oe._punctuation).getRegex(),Oe.strong.endUnd=ye(Oe.strong.endUnd,"g").replace(/punctuation/g,Oe._punctuation).getRegex(),Oe.blockSkip=ye(Oe._blockSkip,"g").getRegex(),Oe.overlapSkip=ye(Oe._overlapSkip,"g").getRegex(),Oe._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Oe._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Oe._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])?)+(?![-_])/,Oe.autolink=ye(Oe.autolink).replace("scheme",Oe._scheme).replace("email",Oe._email).getRegex(),Oe._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Oe.tag=ye(Oe.tag).replace("comment",pe._comment).replace("attribute",Oe._attribute).getRegex(),Oe._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Oe._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,Oe._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Oe.link=ye(Oe.link).replace("label",Oe._label).replace("href",Oe._href).replace("title",Oe._title).getRegex(),Oe.reflink=ye(Oe.reflink).replace("label",Oe._label).getRegex(),Oe.reflinkSearch=ye(Oe.reflinkSearch,"g").replace("reflink",Oe.reflink).replace("nolink",Oe.nolink).getRegex(),Oe.normal=Ae({},Oe),Oe.pedantic=Ae({},Oe.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:ye(/^!?\[(label)\]\((.*?)\)/).replace("label",Oe._label).getRegex(),reflink:ye(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Oe._label).getRegex()}),Oe.gfm=Ae({},Oe.normal,{escape:ye(Oe.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\.5&&(he="x"+he.toString(16)),De+="&#"+he+";";return De}var ke=function(){function Ne(_e){this.tokens=[],this.tokens.links=Object.create(null),this.options=_e||Me,this.options.tokenizer=this.options.tokenizer||new oe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var he={block:Ce.normal,inline:Le.normal};this.options.pedantic?(he.block=Ce.pedantic,he.inline=Le.pedantic):this.options.gfm&&(he.block=Ce.gfm,this.options.breaks?he.inline=Le.breaks:he.inline=Le.gfm),this.tokenizer.rules=he}Ne.lex=function(he,ve){var Ee=new Ne(ve);return Ee.lex(he)};var De=Ne.prototype;return De.lex=function(he){return he=he.replace(/\r\n|\r/g,` `).replace(/\t/g," "),this.blockTokens(he,this.tokens,!0),this.inline(this.tokens),this.tokens},De.blockTokens=function(he,ve,Ee){ve===void 0&&(ve=[]),Ee===void 0&&(Ee=!0),he=he.replace(/^ +$/gm,"");for(var be,Ge,qe,pt;he;){if(be=this.tokenizer.space(he)){he=he.substring(be.raw.length),be.type&&ve.push(be);continue}if(be=this.tokenizer.code(he,ve)){he=he.substring(be.raw.length),be.type?ve.push(be):(pt=ve[ve.length-1],pt.raw+=` `+be.raw,pt.text+=` `+be.text);continue}if(be=this.tokenizer.fences(he)){he=he.substring(be.raw.length),ve.push(be);continue}if(be=this.tokenizer.heading(he)){he=he.substring(be.raw.length),ve.push(be);continue}if(be=this.tokenizer.nptable(he)){he=he.substring(be.raw.length),ve.push(be);continue}if(be=this.tokenizer.hr(he)){he=he.substring(be.raw.length),ve.push(be);continue}if(be=this.tokenizer.blockquote(he)){he=he.substring(be.raw.length),be.tokens=this.blockTokens(be.text,[],Ee),ve.push(be);continue}if(be=this.tokenizer.list(he)){for(he=he.substring(be.raw.length),qe=be.items.length,Ge=0;Ge0)for(;(Pt=this.tokenizer.rules.inline.reflinkSearch.exec(pt))!=null;)Rt.includes(Pt[0].slice(Pt[0].lastIndexOf("[")+1,-1))&&(pt=pt.slice(0,Pt.index)+"["+"a".repeat(Pt[0].length-2)+"]"+pt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Pt=this.tokenizer.rules.inline.blockSkip.exec(pt))!=null;)pt=pt.slice(0,Pt.index)+"["+"a".repeat(Pt[0].length-2)+"]"+pt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;he;){if(qe=this.tokenizer.escape(he)){he=he.substring(qe.raw.length),ve.push(qe);continue}if(qe=this.tokenizer.tag(he,Ee,be)){he=he.substring(qe.raw.length),Ee=qe.inLink,be=qe.inRawBlock,ve.push(qe);continue}if(qe=this.tokenizer.link(he)){he=he.substring(qe.raw.length),qe.type==="link"&&(qe.tokens=this.inlineTokens(qe.text,[],!0,be)),ve.push(qe);continue}if(qe=this.tokenizer.reflink(he,this.tokens.links)){he=he.substring(qe.raw.length),qe.type==="link"&&(qe.tokens=this.inlineTokens(qe.text,[],!0,be)),ve.push(qe);continue}if(qe=this.tokenizer.strong(he,pt,Ge)){he=he.substring(qe.raw.length),qe.tokens=this.inlineTokens(qe.text,[],Ee,be),ve.push(qe);continue}if(qe=this.tokenizer.em(he,pt,Ge)){he=he.substring(qe.raw.length),qe.tokens=this.inlineTokens(qe.text,[],Ee,be),ve.push(qe);continue}if(qe=this.tokenizer.codespan(he)){he=he.substring(qe.raw.length),ve.push(qe);continue}if(qe=this.tokenizer.br(he)){he=he.substring(qe.raw.length),ve.push(qe);continue}if(qe=this.tokenizer.del(he)){he=he.substring(qe.raw.length),qe.tokens=this.inlineTokens(qe.text,[],Ee,be),ve.push(qe);continue}if(qe=this.tokenizer.autolink(he,ue)){he=he.substring(qe.raw.length),ve.push(qe);continue}if(!Ee&&(qe=this.tokenizer.url(he,ue))){he=he.substring(qe.raw.length),ve.push(qe);continue}if(qe=this.tokenizer.inlineText(he,be,de)){he=he.substring(qe.raw.length),Ge=qe.raw.slice(-1),ve.push(qe);continue}if(he){var Mt="Infinite loop on byte: "+he.charCodeAt(0);if(this.options.silent){console.error(Mt);break}else throw new Error(Mt)}}return ve},Z(Ne,null,[{key:"rules",get:function(){return{block:Ce,inline:Le}}}]),Ne}(),Ue=C.defaults,Ye=ne.cleanUrl,ee=ne.escape,M=function(){function Ne(_e){this.options=_e||Ue}var De=Ne.prototype;return De.code=function(he,ve,Ee){var be=(ve||"").match(/\S*/)[0];if(this.options.highlight){var Ge=this.options.highlight(he,be);Ge!=null&&Ge!==he&&(Ee=!0,he=Ge)}return be?'
    '+(Ee?he:ee(he,!0))+`
    `:"
    "+(Ee?he:ee(he,!0))+`
    `},De.blockquote=function(he){return`
    `+he+`
    `},De.html=function(he){return he},De.heading=function(he,ve,Ee,be){return this.options.headerIds?"'+he+" `:""+he+" `},De.hr=function(){return this.options.xhtml?`
    `:`
    `},De.list=function(he,ve,Ee){var be=ve?"ol":"ul",Ge=ve&&Ee!==1?' start="'+Ee+'"':"";return"<"+be+Ge+`> `+he+" `},De.listitem=function(he){return"
  • "+he+`
  • `},De.checkbox=function(he){return" "},De.paragraph=function(he){return"

    "+he+`

    `},De.table=function(he,ve){return ve&&(ve=""+ve+""),` `+he+` `+ve+`
    `},De.tablerow=function(he){return` `+he+` `},De.tablecell=function(he,ve){var Ee=ve.header?"th":"td",be=ve.align?"<"+Ee+' align="'+ve.align+'">':"<"+Ee+">";return be+he+" `},De.strong=function(he){return""+he+""},De.em=function(he){return""+he+""},De.codespan=function(he){return""+he+""},De.br=function(){return this.options.xhtml?"
    ":"
    "},De.del=function(he){return""+he+""},De.link=function(he,ve,Ee){if(he=Ye(this.options.sanitize,this.options.baseUrl,he),he===null)return Ee;var be='",be},De.image=function(he,ve,Ee){if(he=Ye(this.options.sanitize,this.options.baseUrl,he),he===null)return Ee;var be=''+Ee+'":">",be},De.text=function(he){return he},Ne}(),N=function(){function Ne(){}var De=Ne.prototype;return De.strong=function(he){return he},De.em=function(he){return he},De.codespan=function(he){return he},De.del=function(he){return he},De.html=function(he){return he},De.text=function(he){return he},De.link=function(he,ve,Ee){return""+Ee},De.image=function(he,ve,Ee){return""+Ee},De.br=function(){return""},Ne}(),$=function(){function Ne(){this.seen={}}var De=Ne.prototype;return De.slug=function(he){var ve=he.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(ve)){var Ee=ve;do this.seen[Ee]++,ve=Ee+"-"+this.seen[Ee];while(this.seen.hasOwnProperty(ve))}return this.seen[ve]=0,ve},Ne}(),V=C.defaults,Y=ne.unescape,me=function(){function Ne(_e){this.options=_e||V,this.options.renderer=this.options.renderer||new M,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new N,this.slugger=new $}Ne.parse=function(he,ve){var Ee=new Ne(ve);return Ee.parse(he)};var De=Ne.prototype;return De.parse=function(he,ve){ve===void 0&&(ve=!0);var Ee="",be,Ge,qe,pt,Pt,Rt,Mt,wt,lt,ft,Qe,Te,je,ct,Ze,Tt,Ot,st,gt=he.length;for(be=0;be0&&Ze.tokens[0].type==="text"?(Ze.tokens[0].text=st+" "+Ze.tokens[0].text,Ze.tokens[0].tokens&&Ze.tokens[0].tokens.length>0&&Ze.tokens[0].tokens[0].type==="text"&&(Ze.tokens[0].tokens[0].text=st+" "+Ze.tokens[0].tokens[0].text)):Ze.tokens.unshift({type:"text",text:st}):ct+=st),ct+=this.parse(Ze.tokens,je),lt+=this.renderer.listitem(ct,Ot,Tt);Ee+=this.renderer.list(lt,Qe,Te);continue}case"html":{Ee+=this.renderer.html(ft.text);continue}case"paragraph":{Ee+=this.renderer.paragraph(this.parseInline(ft.tokens));continue}case"text":{for(lt=ft.tokens?this.parseInline(ft.tokens):ft.text;be+1An error occurred:

    "+Pe(qe.message+"",!0)+"
    ";throw qe}}Ve.options=Ve.setOptions=function(Ne){return Re(Ve.defaults,Ne),Xe(Ve.defaults),Ve},Ve.getDefaults=Ie,Ve.defaults=tt,Ve.use=function(Ne){var De=Re({},Ne);if(Ne.renderer&&function(){var he=Ve.defaults.renderer||new M,ve=function(Ge){var qe=he[Ge];he[Ge]=function(){for(var pt=arguments.length,Pt=new Array(pt),Rt=0;Rt=0;o--){if(!U(d[o]))continue;var c=d[o].split("="),s=unescape(c[0]),f=unescape(c[1]);h(f,s)}}function C(h,d){if(!h)return;w.cookie=escape(h)+"="+escape(d)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function T(h){if(!h||!p(h))return;w.cookie=escape(h)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function l(){S(function(h,d){T(d)})}function p(h){return new RegExp("(?:^|;\\s*)"+escape(h).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(w.cookie)}},E2g8:function($e,We,z){(function(ae,Z){/*! * @overview es6-promise - a tiny implementation of Promises/A+. * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) * @license Licensed under MIT license * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE * @version v4.2.8+1e68dce6 */(function(U,w){$e.exports=w()})(this,function(){"use strict";function U(M){var N=typeof M;return M!==null&&(N==="object"||N==="function")}function w(M){return typeof M=="function"}var P=void 0;Array.isArray?P=Array.isArray:P=function(M){return Object.prototype.toString.call(M)==="[object Array]"};var S=P,C=0,T=void 0,l=void 0,p=function(N,$){_[C]=N,_[C+1]=$,C+=2,C===2&&(l?l(b):m())};function h(M){l=M}function d(M){p=M}var o=typeof window!="undefined"?window:void 0,c=o||{},s=c.MutationObserver||c.WebKitMutationObserver,f=typeof self=="undefined"&&typeof ae!="undefined"&&{}.toString.call(ae)==="[object process]",i=typeof Uint8ClampedArray!="undefined"&&typeof importScripts!="undefined"&&typeof MessageChannel!="undefined";function n(){return function(){return ae.nextTick(b)}}function t(){return typeof T!="undefined"?function(){T(b)}:g()}function u(){var M=0,N=new s(b),$=document.createTextNode("");return N.observe($,{characterData:!0}),function(){$.data=M=++M%2}}function y(){var M=new MessageChannel;return M.port1.onmessage=b,function(){return M.port2.postMessage(0)}}function g(){var M=setTimeout;return function(){return M(b,1)}}var _=new Array(1e3);function b(){for(var M=0;M`,triples:"",explode:"[]{}"},U=ae.Pos;ae.defineOption("autoCloseBrackets",!1,function(s,f,i){i&&i!=ae.Init&&(s.removeKeyMap(P),s.state.closeBrackets=null),f&&(S(w(f,"pairs")),s.state.closeBrackets=f,s.addKeyMap(P))});function w(s,f){return f=="pairs"&&typeof s=="string"?s:typeof s=="object"&&s[f]!=null?s[f]:Z[f]}var P={Backspace:l,Enter:p};function S(s){for(var f=0;f=0;t--){var y=n[t].head;s.replaceRange("",U(y.line,y.ch-1),U(y.line,y.ch+1),"+delete")}}function p(s){var f=T(s),i=f&&w(f,"explode");if(!i||s.getOption("disableInput"))return ae.Pass;for(var n=s.listSelections(),t=0;t0;return{anchor:new U(s.anchor.line,s.anchor.ch+(f?-1:1)),head:new U(s.head.line,s.head.ch+(f?1:-1))}}function d(s,f){var i=T(s);if(!i||s.getOption("disableInput"))return ae.Pass;var n=w(i,"pairs"),t=n.indexOf(f);if(t==-1)return ae.Pass;for(var u=w(i,"closeBefore"),y=w(i,"triples"),g=n.charAt(t+1)==f,_=s.listSelections(),b=t%2==0,v,m=0;m<_.length;m++){var E=_[m],a=E.head,x,O=s.getRange(a,U(a.line,a.ch+1));if(b&&!E.empty())x="surround";else if((g||!b)&&O==f)g&&c(s,a)?x="both":y.indexOf(f)>=0&&s.getRange(a,U(a.line,a.ch+3))==f+f+f?x="skipThree":x="skip";else if(g&&a.ch>1&&y.indexOf(f)>=0&&s.getRange(U(a.line,a.ch-2),a)==f+f){if(a.ch>2&&/\bstring/.test(s.getTokenTypeAt(U(a.line,a.ch-2))))return ae.Pass;x="addFour"}else if(g){var A=a.ch==0?" ":s.getRange(U(a.line,a.ch-1),a);if(!ae.isWordChar(O)&&A!=f&&!ae.isWordChar(A))x="both";else return ae.Pass}else if(b&&(O.length===0||/\s/.test(O)||u.indexOf(O)>-1))x="both";else return ae.Pass;if(!v)v=x;else if(v!=x)return ae.Pass}var D=t%2?n.charAt(t-1):f,I=t%2?f:n.charAt(t+1);s.operation(function(){if(v=="skip")s.execCommand("goCharRight");else if(v=="skipThree")for(var F=0;F<3;F++)s.execCommand("goCharRight");else if(v=="surround"){for(var K=s.getSelections(),F=0;F ").concat(q);if(we.ENABLE_CALLBACK&&we.emitter.emit("log","error",te),!we.ENABLE_ERROR)return;console.error?console.error(te):console.warn?console.warn(te):console.log(te)}},{key:"i",value:function(W,q){(!W||we.FORCE_GLOBAL_TAG)&&(W=we.GLOBAL_TAG);var te="[".concat(W,"] > ").concat(q);if(we.ENABLE_CALLBACK&&we.emitter.emit("log","info",te),!we.ENABLE_INFO)return;console.info?console.info(te):console.log(te)}},{key:"w",value:function(W,q){(!W||we.FORCE_GLOBAL_TAG)&&(W=we.GLOBAL_TAG);var te="[".concat(W,"] > ").concat(q);if(we.ENABLE_CALLBACK&&we.emitter.emit("log","warn",te),!we.ENABLE_WARN)return;console.warn?console.warn(te):console.log(te)}},{key:"d",value:function(W,q){(!W||we.FORCE_GLOBAL_TAG)&&(W=we.GLOBAL_TAG);var te="[".concat(W,"] > ").concat(q);if(we.ENABLE_CALLBACK&&we.emitter.emit("log","debug",te),!we.ENABLE_DEBUG)return;console.debug?console.debug(te):console.log(te)}},{key:"v",value:function(W,q){(!W||we.FORCE_GLOBAL_TAG)&&(W=we.GLOBAL_TAG);var te="[".concat(W,"] > ").concat(q);if(we.ENABLE_CALLBACK&&we.emitter.emit("log","verbose",te),!we.ENABLE_VERBOSE)return;console.log(te)}}]),we}();C.GLOBAL_TAG="flv.js",C.FORCE_GLOBAL_TAG=!1,C.ENABLE_ERROR=!0,C.ENABLE_INFO=!0,C.ENABLE_WARN=!0,C.ENABLE_DEBUG=!0,C.ENABLE_VERBOSE=!0,C.ENABLE_CALLBACK=!1,C.emitter=new S.a;var T=C,l=function(){function we(){Object(ae.a)(this,we),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(Z.a)(we,[{key:"reset",value:function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0}},{key:"addBytes",value:function(W){this._firstCheckpoint===0?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=W,this._totalBytes+=W):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=W,this._totalBytes+=W):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=W,this._totalBytes+=W,this._lastCheckpoint=this._now())}},{key:"currentKBps",get:function(){this.addBytes(0);var W=(this._now()-this._lastCheckpoint)/1e3;return W==0&&(W=1),this._intervalBytes/W/1024}},{key:"lastSecondKBps",get:function(){return this.addBytes(0),this._lastSecondBytes!==0?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}},{key:"averageKBps",get:function(){var W=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/W/1024}}]),we}(),p=l,h=z("yKVA"),d=z("879j"),o=function(){function we(fe){Object(ae.a)(this,we),this._message=fe}return Object(Z.a)(we,[{key:"name",get:function(){return"RuntimeException"}},{key:"message",get:function(){return this._message}},{key:"toString",value:function(){return this.name+": "+this.message}}]),we}(),c=function(we){Object(h.a)(W,we);var fe=Object(d.a)(W);function W(q){return Object(ae.a)(this,W),fe.call(this,q)}return Object(Z.a)(W,[{key:"name",get:function(){return"IllegalStateException"}}]),W}(o),s=function(we){Object(h.a)(W,we);var fe=Object(d.a)(W);function W(q){return Object(ae.a)(this,W),fe.call(this,q)}return Object(Z.a)(W,[{key:"name",get:function(){return"InvalidArgumentException"}}]),W}(o),f=function(we){Object(h.a)(W,we);var fe=Object(d.a)(W);function W(q){return Object(ae.a)(this,W),fe.call(this,q)}return Object(Z.a)(W,[{key:"name",get:function(){return"NotImplementedException"}}]),W}(o),i={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},n={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},t=function(){function we(fe){Object(ae.a)(this,we),this._type=fe||"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(Z.a)(we,[{key:"destroy",value:function(){this._status=i.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}},{key:"isWorking",value:function(){return this._status===i.kConnecting||this._status===i.kBuffering}},{key:"type",get:function(){return this._type}},{key:"status",get:function(){return this._status}},{key:"needStashBuffer",get:function(){return this._needStash}},{key:"onContentLengthKnown",get:function(){return this._onContentLengthKnown},set:function(W){this._onContentLengthKnown=W}},{key:"onURLRedirect",get:function(){return this._onURLRedirect},set:function(W){this._onURLRedirect=W}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(W){this._onDataArrival=W}},{key:"onError",get:function(){return this._onError},set:function(W){this._onError=W}},{key:"onComplete",get:function(){return this._onComplete},set:function(W){this._onComplete=W}},{key:"open",value:function(W,q){throw new f("Unimplemented abstract function!")}},{key:"abort",value:function(){throw new f("Unimplemented abstract function!")}}]),we}(),u=z("oZsa");function y(we,fe){for(;!Object.prototype.hasOwnProperty.call(we,fe)&&!(we=Object(u.a)(we),we===null););return we}function g(we,fe,W){return typeof Reflect!="undefined"&&Reflect.get?g=Reflect.get:g=function(te,se,Se){var He=y(te,se);if(!He)return;var Je=Object.getOwnPropertyDescriptor(He,se);return Je.get?Je.get.call(Se):Je.value},g(we,fe,W||we)}var _={};function b(){var we=self.navigator.userAgent.toLowerCase(),fe=/(edge)\/([\w.]+)/.exec(we)||/(opr)[\/]([\w.]+)/.exec(we)||/(chrome)[ \/]([\w.]+)/.exec(we)||/(iemobile)[\/]([\w.]+)/.exec(we)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(we)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(we)||/(webkit)[ \/]([\w.]+)/.exec(we)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(we)||/(msie) ([\w.]+)/.exec(we)||we.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(we)||we.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(we)||[],W=/(ipad)/.exec(we)||/(ipod)/.exec(we)||/(windows phone)/.exec(we)||/(iphone)/.exec(we)||/(kindle)/.exec(we)||/(android)/.exec(we)||/(windows)/.exec(we)||/(mac)/.exec(we)||/(linux)/.exec(we)||/(cros)/.exec(we)||[],q={browser:fe[5]||fe[3]||fe[1]||"",version:fe[2]||fe[4]||"0",majorVersion:fe[4]||fe[2]||"0",platform:W[0]||""},te={};if(q.browser){te[q.browser]=!0;var se=q.majorVersion.split(".");te.version={major:parseInt(q.majorVersion,10),string:q.version},se.length>1&&(te.version.minor=parseInt(se[1],10)),se.length>2&&(te.version.build=parseInt(se[2],10))}if(q.platform&&(te[q.platform]=!0),(te.chrome||te.opr||te.safari)&&(te.webkit=!0),te.rv||te.iemobile){te.rv&&delete te.rv;var Se="msie";q.browser=Se,te[Se]=!0}if(te.edge){delete te.edge;var He="msedge";q.browser=He,te[He]=!0}if(te.opr){var Je="opera";q.browser=Je,te[Je]=!0}if(te.safari&&te.android){var xt="android";q.browser=xt,te[xt]=!0}te.name=q.browser,te.platform=q.platform;for(var Ct in _)_.hasOwnProperty(Ct)&&delete _[Ct];Object.assign(_,te)}b();var v=_,m=function(we){Object(h.a)(W,we);var fe=Object(d.a)(W);function W(q,te){var se;return Object(ae.a)(this,W),se=fe.call(this,"fetch-stream-loader"),se.TAG="FetchStreamLoader",se._seekHandler=q,se._config=te,se._needStash=!0,se._requestAbort=!1,se._contentLength=null,se._receivedLength=0,se}return Object(Z.a)(W,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),g(Object(u.a)(W.prototype),"destroy",this).call(this)}},{key:"open",value:function(te,se){var Se=this;this._dataSource=te,this._range=se;var He=te.url;this._config.reuseRedirectedURL&&te.redirectedURL!=null&&(He=te.redirectedURL);var Je=this._seekHandler.getConfig(He,se),xt=new self.Headers;if(typeof Je.headers=="object"){var Ct=Je.headers;for(var it in Ct)Ct.hasOwnProperty(it)&&xt.append(it,Ct[it])}var St={method:"GET",headers:xt,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(var Xt in this._config.headers)xt.append(Xt,this._config.headers[Xt]);te.cors===!1&&(St.mode="same-origin"),te.withCredentials&&(St.credentials="include"),te.referrerPolicy&&(St.referrerPolicy=te.referrerPolicy),this._status=i.kConnecting,self.fetch(Je.url,St).then(function(bt){if(Se._requestAbort){Se._requestAbort=!1,Se._status=i.kIdle;return}if(bt.ok&&bt.status>=200&&bt.status<=299){if(bt.url!==Je.url&&Se._onURLRedirect){var ht=Se._seekHandler.removeURLParameters(bt.url);Se._onURLRedirect(ht)}var Jt=bt.headers.get("Content-Length");return Jt!=null&&(Se._contentLength=parseInt(Jt),Se._contentLength!==0&&(Se._onContentLengthKnown&&Se._onContentLengthKnown(Se._contentLength))),Se._pump.call(Se,bt.body.getReader())}else if(Se._status=i.kError,Se._onError)Se._onError(n.HTTP_STATUS_CODE_INVALID,{code:bt.status,msg:bt.statusText});else throw new o("FetchStreamLoader: Http code invalid, "+bt.status+" "+bt.statusText)}).catch(function(bt){if(Se._status=i.kError,Se._onError)Se._onError(n.EXCEPTION,{code:-1,msg:bt.message});else throw bt})}},{key:"abort",value:function(){this._requestAbort=!0}},{key:"_pump",value:function(te){var se=this;return te.read().then(function(Se){if(Se.done)if(se._contentLength!==null&&se._receivedLength=15048,se=v.msedge?te:!0;return self.fetch&&self.ReadableStream&&se}catch(Se){return!1}}}]),W}(t),E=m,a=function(we){Object(h.a)(W,we);var fe=Object(d.a)(W);function W(q,te){var se;return Object(ae.a)(this,W),se=fe.call(this,"xhr-moz-chunked-loader"),se.TAG="MozChunkedLoader",se._seekHandler=q,se._config=te,se._needStash=!0,se._xhr=null,se._requestAbort=!1,se._contentLength=null,se._receivedLength=0,se}return Object(Z.a)(W,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),g(Object(u.a)(W.prototype),"destroy",this).call(this)}},{key:"open",value:function(te,se){this._dataSource=te,this._range=se;var Se=te.url;this._config.reuseRedirectedURL&&te.redirectedURL!=null&&(Se=te.redirectedURL);var He=this._seekHandler.getConfig(Se,se);this._requestURL=He.url;var Je=this._xhr=new XMLHttpRequest;if(Je.open("GET",He.url,!0),Je.responseType="moz-chunked-arraybuffer",Je.onreadystatechange=this._onReadyStateChange.bind(this),Je.onprogress=this._onProgress.bind(this),Je.onloadend=this._onLoadEnd.bind(this),Je.onerror=this._onXhrError.bind(this),te.withCredentials&&(Je.withCredentials=!0),typeof He.headers=="object"){var xt=He.headers;for(var Ct in xt)xt.hasOwnProperty(Ct)&&Je.setRequestHeader(Ct,xt[Ct])}if(typeof this._config.headers=="object"){var it=this._config.headers;for(var St in it)it.hasOwnProperty(St)&&Je.setRequestHeader(St,it[St])}this._status=i.kConnecting,Je.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=i.kComplete}},{key:"_onReadyStateChange",value:function(te){var se=te.target;if(se.readyState===2){if(se.responseURL!=null&&se.responseURL!==this._requestURL&&this._onURLRedirect){var 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(n.HTTP_STATUS_CODE_INVALID,{code:se.status,msg:se.statusText});else throw new o("MozChunkedLoader: Http code invalid, "+se.status+" "+se.statusText);else this._status=i.kBuffering}}},{key:"_onProgress",value:function(te){if(this._status===i.kError)return;this._contentLength===null&&(te.total!==null&&te.total!==0&&(this._contentLength=te.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)));var se=te.target.response,Se=this._range.from+this._receivedLength;this._receivedLength+=se.byteLength,this._onDataArrival&&this._onDataArrival(se,Se,this._receivedLength)}},{key:"_onLoadEnd",value:function(te){if(this._requestAbort===!0){this._requestAbort=!1;return}else if(this._status===i.kError)return;this._status=i.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)}},{key:"_onXhrError",value:function(te){this._status=i.kError;var se=0,Se=null;if(this._contentLength&&te.loaded=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 Je=parseInt(He);Je>0&&(this._contentLength=Je,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else if(this._status=i.kError,this._onError)this._onError(n.HTTP_STATUS_CODE_INVALID,{code:se.status,msg:se.statusText});else throw new o("MSStreamLoader: Http code invalid, "+se.status+" "+se.statusText);else if(se.readyState===3&&(se.status>=200&&se.status<=299)){this._status=i.kBuffering;var xt=se.response;this._reader.readAsArrayBuffer(xt)}}},{key:"_xhrOnError",value:function(te){this._status=i.kError;var se=n.EXCEPTION,Se={code:-1,msg:te.constructor.name+" "+te.type};if(this._onError)this._onError(se,Se);else throw new o(Se.msg)}},{key:"_msrOnProgress",value:function(te){var se=te.target,Se=se.result;if(Se==null){this._doReconnectIfNeeded();return}var He=Se.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=Se.byteLength;var Je=this._totalRange.from+this._receivedLength;this._receivedLength+=He.byteLength,this._onDataArrival&&this._onDataArrival(He,Je,this._receivedLength),Se.byteLength>=this._bufferLimit&&(T.v(this.TAG,"MSStream buffer exceeded max size near ".concat(Je+He.byteLength,", reconnecting...")),this._doReconnectIfNeeded())}},{key:"_doReconnectIfNeeded",value:function(){if(this._contentLength==null||this._receivedLength=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(te,se){this._lastTimeLoaded=0;var Se=te.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?Se=this._currentRedirectedURL:te.redirectedURL!=null&&(Se=te.redirectedURL));var He=this._seekHandler.getConfig(Se,se);this._currentRequestURL=He.url;var Je=this._xhr=new XMLHttpRequest;if(Je.open("GET",He.url,!0),Je.responseType="arraybuffer",Je.onreadystatechange=this._onReadyStateChange.bind(this),Je.onprogress=this._onProgress.bind(this),Je.onload=this._onLoad.bind(this),Je.onerror=this._onXhrError.bind(this),te.withCredentials&&(Je.withCredentials=!0),typeof He.headers=="object"){var xt=He.headers;for(var Ct in xt)xt.hasOwnProperty(Ct)&&Je.setRequestHeader(Ct,xt[Ct])}if(typeof this._config.headers=="object"){var it=this._config.headers;for(var St in it)it.hasOwnProperty(St)&&Je.setRequestHeader(St,it[St])}Je.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._internalAbort(),this._status=i.kComplete}},{key:"_internalAbort",value:function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)}},{key:"_onReadyStateChange",value:function(te){var se=te.target;if(se.readyState===2){if(se.responseURL!=null){var 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(n.HTTP_STATUS_CODE_INVALID,{code:se.status,msg:se.statusText});else throw new o("RangeLoader: Http code invalid, "+se.status+" "+se.statusText)}}},{key:"_onProgress",value:function(te){if(this._status===i.kError)return;if(this._contentLength===null){var se=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,se=!0;var Se=te.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=te.loaded-this._lastTimeLoaded;this._lastTimeLoaded=te.loaded,this._speedSampler.addBytes(He)}},{key:"_normalizeSpeed",value:function(te){var se=this._chunkSizeKBList,Se=se.length-1,He=0,Je=0,xt=Se;if(te=se[He]&&te=3&&(se=this._speedSampler.currentKBps)),se!==0){var Se=this._normalizeSpeed(se);this._currentSpeedNormalized!==Se&&(this._currentSpeedNormalized=Se,this._currentChunkSizeKB=Se)}var He=te.target.response,Je=this._range.from+this._receivedLength;this._receivedLength+=He.byteLength;var xt=!1;this._contentLength!=null&&this._receivedLength0&&this._receivedLength0)for(var He=te.split("&"),Je=0;Je0;xt[0]!==this._startName&&xt[0]!==this._endName&&(Ct&&(Se+="&"),Se+=He[Je])}return Se.length===0?q:q+"?"+Se}}]),we}(),X=G,J=function(){function we(fe,W,q){Object(ae.a)(this,we),this.TAG="IOController",this._config=W,this._extraData=q,this._stashInitialSize=1024*384,W.stashInitialSize!=null&&W.stashInitialSize>0&&(this._stashInitialSize=W.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=1024*1024*3,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,W.enableStashBuffer===!1&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=fe,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(fe.url),this._refTotalLength=fe.filesize?fe.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(Z.a)(we,[{key:"destroy",value:function(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null}},{key:"isWorking",value:function(){return this._loader&&this._loader.isWorking()&&!this._paused}},{key:"isPaused",value:function(){return this._paused}},{key:"status",get:function(){return this._loader.status}},{key:"extraData",get:function(){return this._extraData},set:function(W){this._extraData=W}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(W){this._onDataArrival=W}},{key:"onSeeked",get:function(){return this._onSeeked},set:function(W){this._onSeeked=W}},{key:"onError",get:function(){return this._onError},set:function(W){this._onError=W}},{key:"onComplete",get:function(){return this._onComplete},set:function(W){this._onComplete=W}},{key:"onRedirect",get:function(){return this._onRedirect},set:function(W){this._onRedirect=W}},{key:"onRecoveredEarlyEof",get:function(){return this._onRecoveredEarlyEof},set:function(W){this._onRecoveredEarlyEof=W}},{key:"currentURL",get:function(){return this._dataSource.url}},{key:"hasRedirect",get:function(){return this._redirectedURL!=null||this._dataSource.redirectedURL!=null}},{key:"currentRedirectedURL",get:function(){return this._redirectedURL||this._dataSource.redirectedURL}},{key:"currentSpeed",get:function(){return this._loaderClass===I?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}},{key:"loaderType",get:function(){return this._loader.type}},{key:"_selectSeekHandler",value:function(){var W=this._config;if(W.seekType==="range")this._seekHandler=new j(this._config.rangeLoadZeroStart);else if(W.seekType==="param"){var q=W.seekParamStart||"bstart",te=W.seekParamEnd||"bend";this._seekHandler=new X(q,te)}else if(W.seekType==="custom"){if(typeof W.customSeekHandler!="function")throw new s("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new W.customSeekHandler}else throw new s("Invalid seekType in config: ".concat(W.seekType))}},{key:"_selectLoader",value:function(){if(this._config.customLoader!=null)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=K;else if(E.isSupported())this._loaderClass=E;else if(x.isSupported())this._loaderClass=x;else if(I.isSupported())this._loaderClass=I;else throw new o("Your browser doesn't support xhr with arraybuffer responseType!")}},{key:"_createLoader",value:function(){this._loader=new this._loaderClass(this._seekHandler,this._config),this._loader.needStashBuffer===!1&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)}},{key:"open",value:function(W){this._currentRange={from:0,to:-1},W&&(this._currentRange.from=W),this._speedSampler.reset(),W||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))}},{key:"abort",value:function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}},{key:"pause",value:function(){this.isWorking()&&(this._loader.abort(),this._stashUsed!==0?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)}},{key:"resume",value:function(){if(this._paused){this._paused=!1;var W=this._resumeFrom;this._resumeFrom=0,this._internalSeek(W,!0)}}},{key:"seek",value:function(W){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(W,!0)}},{key:"_internalSeek",value:function(W,q){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(q),this._loader.destroy(),this._loader=null;var te={from:W,to:-1};this._currentRange={from:te.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,te),this._onSeeked&&this._onSeeked()}},{key:"updateUrl",value:function(W){if(!W||typeof W!="string"||W.length===0)throw new s("Url must be a non-empty string!");this._dataSource.url=W}},{key:"_expandBuffer",value:function(W){for(var q=this._stashSize;q+1024*1024*10){var se=new Uint8Array(this._stashBuffer,0,this._stashUsed),Se=new Uint8Array(te,0,q);Se.set(se,0)}this._stashBuffer=te,this._bufferSize=q}},{key:"_normalizeSpeed",value:function(W){var q=this._speedNormalizeList,te=q.length-1,se=0,Se=0,He=te;if(W=q[se]&&W=512&&W<=1024?q=Math.floor(W*1.5):q=W*2,q>8192&&(q=8192);var te=q*1024+1024*1024*1;this._bufferSize0){var ht=this._stashBuffer.slice(0,this._stashUsed),Jt=this._dispatchChunks(ht,this._stashByteStart);if(Jt0){var Nt=new Uint8Array(ht,Jt);bt.set(Nt,0),this._stashUsed=Nt.byteLength,this._stashByteStart+=Jt}}else this._stashUsed=0,this._stashByteStart+=Jt;this._stashUsed+W.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+W.byteLength),bt=new Uint8Array(this._stashBuffer,0,this._bufferSize)),bt.set(new Uint8Array(W),this._stashUsed),this._stashUsed+=W.byteLength}else{var mt=this._dispatchChunks(W,q);if(mtthis._bufferSize&&(this._expandBuffer(cn),bt=new Uint8Array(this._stashBuffer,0,this._bufferSize)),bt.set(new Uint8Array(W,mt),0),this._stashUsed+=cn,this._stashByteStart=q+mt}}}else if(this._stashUsed===0){var He=this._dispatchChunks(W,q);if(Hethis._bufferSize&&this._expandBuffer(Je);var xt=new Uint8Array(this._stashBuffer,0,this._bufferSize);xt.set(new Uint8Array(W,He),0),this._stashUsed+=Je,this._stashByteStart=q+He}}else{this._stashUsed+W.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+W.byteLength);var Ct=new Uint8Array(this._stashBuffer,0,this._bufferSize);Ct.set(new Uint8Array(W),this._stashUsed),this._stashUsed+=W.byteLength;var it=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(it0){var St=new Uint8Array(this._stashBuffer,it);Ct.set(St,0)}this._stashUsed-=it,this._stashByteStart+=it}}},{key:"_flushStashBuffer",value:function(W){if(this._stashUsed>0){var q=this._stashBuffer.slice(0,this._stashUsed),te=this._dispatchChunks(q,this._stashByteStart),se=q.byteLength-te;if(te0){var Se=new Uint8Array(this._stashBuffer,0,this._bufferSize),He=new Uint8Array(q,te);Se.set(He,0),this._stashUsed=He.byteLength,this._stashByteStart+=te}return 0}return this._stashUsed=0,this._stashByteStart=0,se}return 0}},{key:"_onLoaderComplete",value:function(W,q){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}},{key:"_onLoaderError",value:function(W,q){T.e(this.TAG,"Loader error, code = ".concat(q.code,", msg = ").concat(q.msg)),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,W=n.UNRECOVERABLE_EARLY_EOF);switch(W){case n.EARLY_EOF:{if(!this._config.isLive&&this._totalLength){var te=this._currentRange.to+1;te0){var q=we.getConfig();W.emit("change",q)}}},{key:"registerListener",value:function(W){we.emitter.addListener("change",W)}},{key:"removeListener",value:function(W){we.emitter.removeListener("change",W)}},{key:"addLogListener",value:function(W){T.emitter.addListener("log",W),T.emitter.listenerCount("log")>0&&(T.ENABLE_CALLBACK=!0,we._notifyChange())}},{key:"removeLogListener",value:function(W){T.emitter.removeListener("log",W),T.emitter.listenerCount("log")===0&&(T.ENABLE_CALLBACK=!1,we._notifyChange())}}]),we}();pe.emitter=new S.a;var Oe=pe,Fe=function(){function we(){Object(ae.a)(this,we),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(Z.a)(we,[{key:"isComplete",value:function(){var W=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&&W&&q}},{key:"isSeekable",value:function(){return this.hasKeyframesIndex===!0}},{key:"getNearestKeyframe",value:function(W){if(this.keyframesIndex==null)return null;var q=this.keyframesIndex,te=this._search(q.times,W);return{index:te,milliseconds:q.times[te],fileposition:q.filepositions[te]}}},{key:"_search",value:function(W,q){var te=0,se=W.length-1,Se=0,He=0,Je=se;for(q=W[Se]&&q=128){fe.push(String.fromCharCode(se&65535)),q+=2;continue}}}else if(W[q]<240){if(Ce(W,q,2)){var Se=(W[q]&15)<<12|(W[q+1]&63)<<6|W[q+2]&63;if(Se>=2048&&(Se&63488)!==55296){fe.push(String.fromCharCode(Se&65535)),q+=3;continue}}}else if(W[q]<248&&Ce(W,q,3)){var He=(W[q]&7)<<18|(W[q+1]&63)<<12|(W[q+2]&63)<<6|W[q+3]&63;if(He>65536&&He<1114112){He-=65536,fe.push(String.fromCharCode(He>>>10|55296)),fe.push(String.fromCharCode(He&1023|56320)),q+=4;continue}}}fe.push(String.fromCharCode(65533)),++q}return fe.join("")}var de=Le,ue=function(){var we=new ArrayBuffer(2);return new DataView(we).setInt16(0,256,!0),new Int16Array(we)[0]===256}(),ke=function(){function we(){Object(ae.a)(this,we)}return Object(Z.a)(we,null,[{key:"parseScriptData",value:function(W,q,te){var se={};try{var Se=we.parseValue(W,q,te),He=we.parseValue(W,q+Se.size,te-Se.size);se[Se.data]=He.data}catch(Je){T.e("AMF",Je.toString())}return se}},{key:"parseObject",value:function(W,q,te){if(te<3)throw new c("Data not enough when parse ScriptDataObject");var se=we.parseString(W,q,te),Se=we.parseValue(W,q+se.size,te-se.size),He=Se.objectEnd;return{data:{name:se.data,value:Se.data},size:se.size+Se.size,objectEnd:He}}},{key:"parseVariable",value:function(W,q,te){return we.parseObject(W,q,te)}},{key:"parseString",value:function(W,q,te){if(te<2)throw new c("Data not enough when parse String");var se=new DataView(W,q,te),Se=se.getUint16(0,!ue),He;return Se>0?He=de(new Uint8Array(W,q+2,Se)):He="",{data:He,size:2+Se}}},{key:"parseLongString",value:function(W,q,te){if(te<4)throw new c("Data not enough when parse LongString");var se=new DataView(W,q,te),Se=se.getUint32(0,!ue),He;return Se>0?He=de(new Uint8Array(W,q+4,Se)):He="",{data:He,size:4+Se}}},{key:"parseDate",value:function(W,q,te){if(te<10)throw new c("Data size invalid when parse Date");var se=new DataView(W,q,te),Se=se.getFloat64(0,!ue),He=se.getInt16(8,!ue);return Se+=He*60*1e3,{data:new Date(Se),size:8+2}}},{key:"parseValue",value:function(W,q,te){if(te<1)throw new c("Data not enough when parse Value");var se=new DataView(W,q,te),Se=1,He=se.getUint8(0),Je,xt=!1;try{switch(He){case 0:Je=se.getFloat64(1,!ue),Se+=8;break;case 1:{var Ct=se.getUint8(1);Je=!!Ct,Se+=1;break}case 2:{var it=we.parseString(W,q+1,te-1);Je=it.data,Se+=it.size;break}case 3:{Je={};var St=0;for((se.getUint32(te-4,!ue)&16777215)===9&&(St=3);Se32)throw new s("ExpGolomb: readBits() bits exceeded max 32bits!");if(W<=this._current_word_bits_left){var q=this._current_word>>>32-W;return this._current_word<<=W,this._current_word_bits_left-=W,q}var te=this._current_word_bits_left?this._current_word:0;te=te>>>32-this._current_word_bits_left;var se=W-this._current_word_bits_left;this._fillCurrentWord();var 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,te=te<>>W)!==0)return this._current_word<<=W,this._current_word_bits_left-=W,W;return this._fillCurrentWord(),W+this._skipLeadingZero()}},{key:"readUEG",value:function(){var W=this._skipLeadingZero();return this.readBits(W+1)-1}},{key:"readSEG",value:function(){var W=this.readUEG();return W&1?W+1>>>1:-1*(W>>>1)}}]),we}(),ee=Ye,M=function(){function we(){Object(ae.a)(this,we)}return Object(Z.a)(we,null,[{key:"_ebsp2rbsp",value:function(W){for(var q=W,te=q.byteLength,se=new Uint8Array(te),Se=0,He=0;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(W){var q=we._ebsp2rbsp(W),te=new ee(q);te.readByte();var se=te.readByte();te.readByte();var Se=te.readByte();te.readUEG();var He=we.getProfileString(se),Je=we.getLevelString(Se),xt=1,Ct=420,it=[0,420,422,444],St=8;if((se===100||se===110||se===122||se===244||se===44||se===83||se===86||se===118||se===128||se===138||se===144)&&(xt=te.readUEG(),xt===3&&te.readBits(1),xt<=3&&(Ct=it[xt]),St=te.readUEG()+8,te.readUEG(),te.readBits(1),te.readBool()))for(var Xt=xt!==3?8:12,bt=0;bt0&&qn<16?(Yt=Wr[qn-1],Vt=_r[qn-1]):qn===255&&(Yt=te.readByte()<<8|te.readByte(),Vt=te.readByte()<<8|te.readByte())}if(te.readBool()&&te.readBool(),te.readBool()&&(te.readBits(4),te.readBool()&&te.readBits(24)),te.readBool()&&(te.readUEG(),te.readUEG()),te.readBool()){var Rr=te.readBits(32),Tr=te.readBits(32);sr=te.readBool(),nr=Tr,jn=Rr*2,En=nr/jn}}var Vr=1;(Yt!==1||Vt!==1)&&(Vr=Yt/Vt);var Ur=0,xi=0;if(xt===0)Ur=1,xi=2-sn;else{var kr=xt===3?1:2,Oi=xt===1?2:1;Ur=kr,xi=Oi*(2-sn)}var ri=(cn+1)*16,Xr=(2-sn)*((bn+1)*16);ri-=(dn+Nn)*Ur,Xr-=(Kt+et)*xi;var di=Math.ceil(ri*Vr);return te.destroy(),te=null,{profile_string:He,level_string:Je,bit_depth:St,ref_frames:mt,chroma_format:Ct,chroma_format_string:we.getChromaFormatString(Ct),frame_rate:{fixed:sr,fps:En,fps_den:jn,fps_num:nr},sar_ratio:{width:Yt,height:Vt},codec_size:{width:ri,height:Xr},present_size:{width:di,height:Xr}}}},{key:"_skipScalingList",value:function(W,q){for(var te=8,se=8,Se=0,He=0;He>>8&255|(we&255)<<8}function me(we){return(we&4278190080)>>>24|(we&16711680)>>>8|(we&65280)<<8|(we&255)<<24}function Re(we,fe){return we[fe]<<24|we[fe+1]<<16|we[fe+2]<<8|we[fe+3]}var rt=function(){function we(fe,W){Object(ae.a)(this,we),this.TAG="FLVDemuxer",this._config=W,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=fe.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=fe.hasAudioTrack,this._hasVideo=fe.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new Me,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(Z.a)(we,[{key:"destroy",value:function(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null}},{key:"bindDataSource",value:function(W){return W.onDataArrival=this.parseChunks.bind(this),this}},{key:"onTrackMetadata",get:function(){return this._onTrackMetadata},set:function(W){this._onTrackMetadata=W}},{key:"onMediaInfo",get:function(){return this._onMediaInfo},set:function(W){this._onMediaInfo=W}},{key:"onMetaDataArrived",get:function(){return this._onMetaDataArrived},set:function(W){this._onMetaDataArrived=W}},{key:"onScriptDataArrived",get:function(){return this._onScriptDataArrived},set:function(W){this._onScriptDataArrived=W}},{key:"onError",get:function(){return this._onError},set:function(W){this._onError=W}},{key:"onDataAvailable",get:function(){return this._onDataAvailable},set:function(W){this._onDataAvailable=W}},{key:"timestampBase",get:function(){return this._timestampBase},set:function(W){this._timestampBase=W}},{key:"overridedDuration",get:function(){return this._duration},set:function(W){this._durationOverrided=!0,this._duration=W,this._mediaInfo.duration=W}},{key:"overridedHasAudio",set:function(W){this._hasAudioFlagOverrided=!0,this._hasAudio=W,this._mediaInfo.hasAudio=W}},{key:"overridedHasVideo",set:function(W){this._hasVideoFlagOverrided=!0,this._hasVideo=W,this._mediaInfo.hasVideo=W}},{key:"resetMediaInfo",value:function(){this._mediaInfo=new Me}},{key:"_isInitialMetadataDispatched",value:function(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!this._hasAudio&&this._hasVideo?this._videoInitialMetadataDispatched:!1}},{key:"parseChunks",value:function(W,q){if(!this._onError||!this._onMediaInfo||!this._onTrackMetadata||!this._onDataAvailable)throw new c("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var te=0,se=this._littleEndian;if(q===0)if(W.byteLength>13){var Se=we.probe(W);te=Se.dataOffset}else return 0;if(this._firstParse){this._firstParse=!1,q+te!==this._dataOffset&&T.w(this.TAG,"First time parsing but chunk byteStart invalid!");var He=new DataView(W,te),Je=He.getUint32(0,!se);Je!==0&&T.w(this.TAG,"PrevTagSize0 !== 0 !!!"),te+=4}for(;teW.byteLength)break;var Ct=xt.getUint8(0),it=xt.getUint32(0,!se)&16777215;if(te+11+it+4>W.byteLength)break;if(Ct!==8&&Ct!==9&&Ct!==18){T.w(this.TAG,"Unsupported tag type ".concat(Ct,", skipped")),te+=11+it+4;continue}var St=xt.getUint8(4),Xt=xt.getUint8(5),bt=xt.getUint8(6),ht=xt.getUint8(7),Jt=bt|Xt<<8|St<<16|ht<<24,Nt=xt.getUint32(7,!se)&16777215;Nt!==0&&T.w(this.TAG,"Meet tag which has StreamID != 0!");var mt=te+11;switch(Ct){case 8:this._parseAudioData(W,mt,it,Jt);break;case 9:this._parseVideoData(W,mt,it,Jt,q+te);break;case 18:this._parseScriptData(W,mt,it);break}var cn=xt.getUint32(11+it,!se);cn!==11+it&&T.w(this.TAG,"Invalid PrevTagSize ".concat(cn)),te+=11+it+4}return this._isInitialMetadataDispatched()&&(this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack)),te}},{key:"_parseScriptData",value:function(W,q,te){var se=Ue.parseScriptData(W,q,te);if(se.hasOwnProperty("onMetaData")){if(se.onMetaData==null||typeof se.onMetaData!="object"){T.w(this.TAG,"Invalid onMetaData structure!");return}this._metadata&&T.w(this.TAG,"Found another onMetaData tag!"),this._metadata=se;var 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 Je=Math.floor(Se.framerate*1e3);if(Je>0){var xt=Je/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=xt,this._referenceFrameRate.fps_num=Je,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=xt}}if(typeof Se.keyframes=="object"){this._mediaInfo.hasKeyframesIndex=!0;var Ct=Se.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(Ct),Se.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=Se,T.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(se).length>0&&(this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},se)))}},{key:"_parseKeyframesIndex",value:function(W){for(var q=[],te=[],se=1;se>>4;if(xt!==2&&xt!==10){this._onError(V.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+xt);return}var Ct=0,it=(Je&12)>>>2;if(it>=0&&it<=4)Ct=this._flvSoundRateTable[it];else{this._onError(V.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+it);return}var St=(Je&2)>>>1,Xt=Je&1,bt=this._audioMetadata,ht=this._audioTrack;if(bt||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),bt=this._audioMetadata={},bt.type="audio",bt.id=ht.id,bt.timescale=this._timescale,bt.duration=this._duration,bt.audioSampleRate=Ct,bt.channelCount=Xt===0?1:2),xt===10){var Jt=this._parseAACAudioData(W,q+1,te-1);if(Jt==null)return;if(Jt.packetType===0){bt.config&&T.w(this.TAG,"Found another AudioSpecificConfig!");var Nt=Jt.data;bt.audioSampleRate=Nt.samplingRate,bt.channelCount=Nt.channelCount,bt.codec=Nt.codec,bt.originalCodec=Nt.originalCodec,bt.config=Nt.config,bt.refSampleDuration=1024/bt.audioSampleRate*bt.timescale,T.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",bt);var mt=this._mediaInfo;mt.audioCodec=bt.originalCodec,mt.audioSampleRate=bt.audioSampleRate,mt.audioChannelCount=bt.channelCount,mt.hasVideo?mt.videoCodec!=null&&(mt.mimeType='video/x-flv; codecs="'+mt.videoCodec+","+mt.audioCodec+'"'):mt.mimeType='video/x-flv; codecs="'+mt.audioCodec+'"',mt.isComplete()&&this._onMediaInfo(mt)}else if(Jt.packetType===1){var cn=this._timestampBase+se,bn={unit:Jt.data,length:Jt.data.byteLength,dts:cn,pts:cn};ht.samples.push(bn),ht.length+=Jt.data.length}else T.e(this.TAG,"Flv: Unsupported AAC data type ".concat(Jt.packetType))}else if(xt===2){if(!bt.codec){var sn=this._parseMP3AudioData(W,q+1,te-1,!0);if(sn==null)return;bt.audioSampleRate=sn.samplingRate,bt.channelCount=sn.channelCount,bt.codec=sn.codec,bt.originalCodec=sn.originalCodec,bt.refSampleDuration=1152/bt.audioSampleRate*bt.timescale,T.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",bt);var dn=this._mediaInfo;dn.audioCodec=bt.codec,dn.audioSampleRate=bt.audioSampleRate,dn.audioChannelCount=bt.channelCount,dn.audioDataRate=sn.bitRate,dn.hasVideo?dn.videoCodec!=null&&(dn.mimeType='video/x-flv; codecs="'+dn.videoCodec+","+dn.audioCodec+'"'):dn.mimeType='video/x-flv; codecs="'+dn.audioCodec+'"',dn.isComplete()&&this._onMediaInfo(dn)}var Nn=this._parseMP3AudioData(W,q+1,te-1,!1);if(Nn==null)return;var Kt=this._timestampBase+se,et={unit:Nn,length:Nn.byteLength,dts:Kt,pts:Kt};ht.samples.push(et),ht.length+=Nn.length}}},{key:"_parseAACAudioData",value:function(W,q,te){if(te<=1){T.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");return}var se={},Se=new Uint8Array(W,q,te);return se.packetType=Se[0],Se[0]===0?se.data=this._parseAACAudioSpecificConfig(W,q+1,te-1):se.data=Se.subarray(1),se}},{key:"_parseAACAudioSpecificConfig",value:function(W,q,te){var se=new Uint8Array(W,q,te),Se=null,He=0,Je=0,xt=null,Ct=0,it=null;if(He=Je=se[0]>>>3,Ct=(se[0]&7)<<1|se[1]>>>7,Ct<0||Ct>=this._mpegSamplingRates.length){this._onError(V.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");return}var St=this._mpegSamplingRates[Ct],Xt=(se[1]&120)>>>3;if(Xt<0||Xt>=8){this._onError(V.FORMAT_ERROR,"Flv: AAC invalid channel configuration");return}He===5&&(it=(se[1]&7)<<1|se[2]>>>7,xt=(se[2]&124)>>>2);var bt=self.navigator.userAgent.toLowerCase();return bt.indexOf("firefox")!==-1?Ct>=6?(He=5,Se=new Array(4),it=Ct-3):(He=2,Se=new Array(2),it=Ct):bt.indexOf("android")!==-1?(He=2,Se=new Array(2),it=Ct):(He=5,it=Ct,Se=new Array(4),Ct>=6?it=Ct-3:Xt===1&&(He=2,Se=new Array(2),it=Ct)),Se[0]=He<<3,Se[0]|=(Ct&15)>>>1,Se[1]=(Ct&15)<<7,Se[1]|=(Xt&15)<<3,He===5&&(Se[1]|=(it&15)>>>1,Se[2]=(it&1)<<7,Se[2]|=2<<2,Se[3]=0),{config:Se,samplingRate:St,channelCount:Xt,codec:"mp4a.40."+He,originalCodec:"mp4a.40."+Je}}},{key:"_parseMP3AudioData",value:function(W,q,te,se){if(te<4){T.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");return}var Se=this._littleEndian,He=new Uint8Array(W,q,te),Je=null;if(se){if(He[0]!==255)return;var xt=He[1]>>>3&3,Ct=(He[1]&6)>>1,it=(He[2]&240)>>>4,St=(He[2]&12)>>>2,Xt=He[3]>>>6&3,bt=Xt!==3?2:1,ht=0,Jt=0,Nt=34,mt="mp3";switch(xt){case 0:ht=this._mpegAudioV25SampleRateTable[St];break;case 2:ht=this._mpegAudioV20SampleRateTable[St];break;case 3:ht=this._mpegAudioV10SampleRateTable[St];break}switch(Ct){case 1:Nt=34,it>>4,xt=He&15;if(xt!==7){this._onError(V.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: ".concat(xt));return}this._parseAVCVideoPacket(W,q+1,te-1,se,Se,Je)}},{key:"_parseAVCVideoPacket",value:function(W,q,te,se,Se,He){if(te<4){T.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");return}var Je=this._littleEndian,xt=new DataView(W,q,te),Ct=xt.getUint8(0),it=xt.getUint32(0,!Je)&16777215,St=it<<8>>8;if(Ct===0)this._parseAVCDecoderConfigurationRecord(W,q+4,te-4);else if(Ct===1)this._parseAVCVideoData(W,q+4,te-4,se,Se,He,St);else if(!(Ct===2)){this._onError(V.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(Ct));return}}},{key:"_parseAVCDecoderConfigurationRecord",value:function(W,q,te){if(te<7){T.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");return}var se=this._videoMetadata,Se=this._videoTrack,He=this._littleEndian,Je=new DataView(W,q,te);se?typeof se.avcc!="undefined"&&T.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),se=this._videoMetadata={},se.type="video",se.id=Se.id,se.timescale=this._timescale,se.duration=this._duration);var xt=Je.getUint8(0),Ct=Je.getUint8(1),it=Je.getUint8(2),St=Je.getUint8(3);if(xt!==1||Ct===0){this._onError(V.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");return}if(this._naluLengthSize=(Je.getUint8(4)&3)+1,this._naluLengthSize!==3&&this._naluLengthSize!==4){this._onError(V.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: ".concat(this._naluLengthSize-1));return}var Xt=Je.getUint8(5)&31;if(Xt===0){this._onError(V.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");return}else Xt>1&&T.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ".concat(Xt));for(var bt=6,ht=0;ht1&&T.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ".concat(Ut));bt++;for(var Yt=0;Yt=te){T.w(this.TAG,"Malformed Nalu near timestamp ".concat(ht,", offset = ").concat(Xt,", dataSize = ").concat(te));break}var Nt=Ct.getUint32(Xt,!xt);if(bt===3&&(Nt>>>=8),Nt>te-bt){T.w(this.TAG,"Malformed Nalus near timestamp ".concat(ht,", NaluSize > DataSize!"));return}var mt=Ct.getUint8(Xt+bt)&31;mt===5&&(Jt=!0);var cn=new Uint8Array(W,q+Xt,bt+Nt),bn={type:mt,data:cn};it.push(bn),St+=cn.byteLength,Xt+=bt+Nt}if(it.length){var sn=this._videoTrack,dn={units:it,length:St,isKeyframe:Jt,dts:ht,cts:Je,pts:ht+Je};Jt&&(dn.fileposition=Se),sn.samples.push(dn),sn.length+=St}}}],[{key:"probe",value:function(W){var q=new Uint8Array(W),te={match:!1};if(q[0]!==70||q[1]!==76||q[2]!==86||q[3]!==1)return te;var se=(q[4]&4)>>>2!==0,Se=(q[4]&1)!==0,He=Re(q,5);return He<9?te:{match:!0,consumed:He,dataOffset:He,hasAudioTrack:se,hasVideoTrack:Se}}}]),we}(),Pe=rt,Ie=function(){function we(){Object(ae.a)(this,we)}return Object(Z.a)(we,null,[{key:"init",value:function(){we.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]};for(var W in we.types)we.types.hasOwnProperty(W)&&(we.types[W]=[W.charCodeAt(0),W.charCodeAt(1),W.charCodeAt(2),W.charCodeAt(3)]);var q=we.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(W){for(var q=8,te=null,se=Array.prototype.slice.call(arguments,1),Se=se.length,He=0;He>>24&255,te[1]=q>>>16&255,te[2]=q>>>8&255,te[3]=q&255,te.set(W,4);for(var Je=8,xt=0;xt>>24&255,W>>>16&255,W>>>8&255,W&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(W){return we.box(we.types.trak,we.tkhd(W),we.mdia(W))}},{key:"tkhd",value:function(W){var q=W.id,te=W.duration,se=W.presentWidth,Se=W.presentHeight;return we.box(we.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,te>>>24&255,te>>>16&255,te>>>8&255,te&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,se>>>8&255,se&255,0,0,Se>>>8&255,Se&255,0,0]))}},{key:"mdia",value:function(W){return we.box(we.types.mdia,we.mdhd(W),we.hdlr(W),we.minf(W))}},{key:"mdhd",value:function(W){var q=W.timescale,te=W.duration;return we.box(we.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,te>>>24&255,te>>>16&255,te>>>8&255,te&255,85,196,0,0]))}},{key:"hdlr",value:function(W){var q=null;return W.type==="audio"?q=we.constants.HDLR_AUDIO:q=we.constants.HDLR_VIDEO,we.box(we.types.hdlr,q)}},{key:"minf",value:function(W){var q=null;return W.type==="audio"?q=we.box(we.types.smhd,we.constants.SMHD):q=we.box(we.types.vmhd,we.constants.VMHD),we.box(we.types.minf,q,we.dinf(),we.stbl(W))}},{key:"dinf",value:function(){var W=we.box(we.types.dinf,we.box(we.types.dref,we.constants.DREF));return W}},{key:"stbl",value:function(W){var q=we.box(we.types.stbl,we.stsd(W),we.box(we.types.stts,we.constants.STTS),we.box(we.types.stsc,we.constants.STSC),we.box(we.types.stsz,we.constants.STSZ),we.box(we.types.stco,we.constants.STCO));return q}},{key:"stsd",value:function(W){return W.type==="audio"?W.codec==="mp3"?we.box(we.types.stsd,we.constants.STSD_PREFIX,we.mp3(W)):we.box(we.types.stsd,we.constants.STSD_PREFIX,we.mp4a(W)):we.box(we.types.stsd,we.constants.STSD_PREFIX,we.avc1(W))}},{key:"mp3",value:function(W){var q=W.channelCount,te=W.audioSampleRate,se=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,q,0,16,0,0,0,0,te>>>8&255,te&255,0,0]);return we.box(we.types[".mp3"],se)}},{key:"mp4a",value:function(W){var q=W.channelCount,te=W.audioSampleRate,se=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,q,0,16,0,0,0,0,te>>>8&255,te&255,0,0]);return we.box(we.types.mp4a,se,we.esds(W))}},{key:"esds",value:function(W){var q=W.config||[],te=q.length,se=new Uint8Array([0,0,0,0,3,23+te,0,1,0,4,15+te,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([te]).concat(q).concat([6,1,2]));return we.box(we.types.esds,se)}},{key:"avc1",value:function(W){var q=W.avcc,te=W.codecWidth,se=W.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,te>>>8&255,te&255,se>>>8&255,se&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return we.box(we.types.avc1,Se,we.box(we.types.avcC,q))}},{key:"mvex",value:function(W){return we.box(we.types.mvex,we.trex(W))}},{key:"trex",value:function(W){var q=W.id,te=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 we.box(we.types.trex,te)}},{key:"moof",value:function(W,q){return we.box(we.types.moof,we.mfhd(W.sequenceNumber),we.traf(W,q))}},{key:"mfhd",value:function(W){var q=new Uint8Array([0,0,0,0,W>>>24&255,W>>>16&255,W>>>8&255,W&255]);return we.box(we.types.mfhd,q)}},{key:"traf",value:function(W,q){var te=W.id,se=we.box(we.types.tfhd,new Uint8Array([0,0,0,0,te>>>24&255,te>>>16&255,te>>>8&255,te&255])),Se=we.box(we.types.tfdt,new Uint8Array([0,0,0,0,q>>>24&255,q>>>16&255,q>>>8&255,q&255])),He=we.sdtp(W),Je=we.trun(W,He.byteLength+16+16+8+16+8+8);return we.box(we.types.traf,se,Se,Je,He)}},{key:"sdtp",value:function(W){for(var q=W.samples||[],te=q.length,se=new Uint8Array(4+te),Se=0;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 Je=0;Je>>24&255,xt>>>16&255,xt>>>8&255,xt&255,Ct>>>24&255,Ct>>>16&255,Ct>>>8&255,Ct&255,it.isLeading<<2|it.dependsOn,it.isDependedOn<<6|it.hasRedundancy<<4|it.isNonSync,0,0,St>>>24&255,St>>>16&255,St>>>8&255,St&255],12+16*Je)}return we.box(we.types.trun,He)}},{key:"mdat",value:function(W){return we.box(we.types.mdat,W)}}]),we}();Ie.init();var Xe=Ie,tt=function(){function we(){Object(ae.a)(this,we)}return Object(Z.a)(we,null,[{key:"getSilentFrame",value:function(W,q){if(W==="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}}]),we}(),Ve=tt,Ke=function we(fe,W,q,te,se){Object(ae.a)(this,we),this.dts=fe,this.pts=W,this.duration=q,this.originalDts=te,this.isSyncPoint=se,this.fileposition=null},Ne=function(){function we(){Object(ae.a)(this,we),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(Z.a)(we,[{key:"appendSyncPoint",value:function(W){W.isSyncPoint=!0,this.syncPoints.push(W)}}]),we}(),De=function(){function we(){Object(ae.a)(this,we),this._list=[]}return Object(Z.a)(we,[{key:"clear",value:function(){this._list=[]}},{key:"appendArray",value:function(W){var q=this._list;if(W.length===0)return;q.length>0&&W[0].originalDts=q[Se].dts&&Wq[se].lastSample.originalDts&&W=q[se].lastSample.originalDts&&(se===q.length-1||se0&&(Se=this._searchNearestSegmentBefore(te.originalBeginDts)+1),this._lastAppendLocation=Se,this._list.splice(Se,0,te)}},{key:"getLastSegmentBefore",value:function(W){var q=this._searchNearestSegmentBefore(W);return q>=0?this._list[q]:null}},{key:"getLastSampleBefore",value:function(W){var q=this.getLastSegmentBefore(W);return q!=null?q.lastSample:null}},{key:"getLastSyncPointBefore",value:function(W){for(var q=this._searchNearestSegmentBefore(W),te=this._list[q].syncPoints;te.length===0&&q>0;)q--,te=this._list[q].syncPoints;return te.length>0?te[te.length-1]:null}}]),we}(),he=function(){function we(fe){Object(ae.a)(this,we),this.TAG="MP4Remuxer",this._config=fe,this._isLive=fe.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 _e("audio"),this._videoSegmentInfoList=new _e("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!!(v.chrome&&(v.version.major<50||v.version.major===50&&v.version.build<2661)),this._fillSilentAfterSeek=v.msedge||v.msie,this._mp3UseMpegAudio=!v.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return Object(Z.a)(we,[{key:"destroy",value:function(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null}},{key:"bindDataSource",value:function(W){return W.onDataAvailable=this.remux.bind(this),W.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}},{key:"onInitSegment",get:function(){return this._onInitSegment},set:function(W){this._onInitSegment=W}},{key:"onMediaSegment",get:function(){return this._onMediaSegment},set:function(W){this._onMediaSegment=W}},{key:"insertDiscontinuity",value:function(){this._audioNextDts=this._videoNextDts=void 0}},{key:"seek",value:function(W){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}},{key:"remux",value:function(W,q){if(!this._onMediaSegment)throw new c("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(W,q),this._remuxVideo(q),this._remuxAudio(W)}},{key:"_onTrackMetadataReceived",value:function(W,q){var te=null,se="mp4",Se=q.codec;if(W==="audio")this._audioMeta=q,q.codec==="mp3"&&this._mp3UseMpegAudio?(se="mpeg",Se="",te=new Uint8Array):te=Xe.generateInitSegment(q);else if(W==="video")this._videoMeta=q,te=Xe.generateInitSegment(q);else return;if(!this._onInitSegment)throw new c("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(W,{type:W,data:te.buffer,codec:Se,container:"".concat(W,"/").concat(se),mediaDuration:q.duration})}},{key:"_calculateDtsBase",value:function(W,q){if(this._dtsBaseInited)return;W.samples&&W.samples.length&&(this._audioDtsBase=W.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 W=this._videoStashedLastSample,q=this._audioStashedLastSample,te={type:"video",id:1,sequenceNumber:0,samples:[],length:0};W!=null&&(te.samples.push(W),te.length=W.length);var se={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};q!=null&&(se.samples.push(q),se.length=q.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(te,!0),this._remuxAudio(se,!0)}},{key:"_remuxAudio",value:function(W,q){if(this._audioMeta==null)return;var te=W,se=te.samples,Se=void 0,He=-1,Je=-1,xt=-1,Ct=this._audioMeta.refSampleDuration,it=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,St=this._dtsBaseInited&&this._audioNextDts===void 0,Xt=!1;if(!se||se.length===0)return;if(se.length===1&&!q)return;var bt=0,ht=null,Jt=0;it?(bt=0,Jt=te.length):(bt=8,Jt=8+te.length);var Nt=null;if(se.length>1&&(Nt=se.pop(),Jt-=Nt.length),this._audioStashedLastSample!=null){var mt=this._audioStashedLastSample;this._audioStashedLastSample=null,se.unshift(mt),Jt+=mt.length}Nt!=null&&(this._audioStashedLastSample=Nt);var cn=se[0].dts-this._dtsBase;if(this._audioNextDts)Se=cn-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())Se=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&(this._audioMeta.originalCodec!=="mp3"&&(Xt=!0));else{var bn=this._audioSegmentInfoList.getLastSampleBefore(cn);if(bn!=null){var sn=cn-(bn.originalDts+bn.duration);sn<=3&&(sn=0);var dn=bn.dts+bn.duration+sn;Se=cn-dn}else Se=0}if(Xt){var Nn=cn-Se,Kt=this._videoSegmentInfoList.getLastSegmentBefore(cn);if(Kt!=null&&Kt.beginDts=1?qn=Vt[Vt.length-1].duration:qn=Math.floor(Ct);var Rr=!1,Tr=null;if(qn>Ct*1.5&&this._audioMeta.codec!=="mp3"&&this._fillAudioTimestampGap&&!v.safari){Rr=!0;var Vr=Math.abs(qn-Ct),Ur=Math.ceil(Vr/Ct),xi=cr+Ct;T.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync. `+"dts: ".concat(cr+qn," ms, expected: ").concat(cr+Math.round(Ct)," ms, ")+"delta: ".concat(Math.round(Vr)," ms, generate: ").concat(Ur," frames"));var kr=Ve.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);kr==null&&(T.w(this.TAG,"Unable to generate silent frame for "+"".concat(this._audioMeta.originalCodec," with ").concat(this._audioMeta.channelCount," channels, repeat last frame")),kr=nr),Tr=[];for(var Oi=0;Oi0){var Xr=Tr[Tr.length-1];Xr.duration=ri-Xr.dts}var di={dts:ri,pts:ri,cts:0,unit:kr,size:kr.byteLength,duration:0,originalDts:jn,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};Tr.push(di),Jt+=di.size,xi+=Ct}var Si=Tr[Tr.length-1];Si.duration=cr+qn-Si.dts,qn=Math.round(Ct)}Vt.push({dts:cr,pts:cr,cts:0,unit:sr.unit,size:sr.unit.byteLength,duration:qn,originalDts:jn,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),Rr&&Vt.push.apply(Vt,Tr)}it?ht=new Uint8Array(Jt):(ht=new Uint8Array(Jt),ht[0]=Jt>>>24&255,ht[1]=Jt>>>16&255,ht[2]=Jt>>>8&255,ht[3]=Jt&255,ht.set(Xe.types.mdat,4));for(var si=0;si1&&(bt=se.pop(),Xt-=bt.length),this._videoStashedLastSample!=null){var ht=this._videoStashedLastSample;this._videoStashedLastSample=null,se.unshift(ht),Xt+=ht.length}bt!=null&&(this._videoStashedLastSample=bt);var Jt=se[0].dts-this._dtsBase;if(this._videoNextDts)Se=Jt-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())Se=0;else{var Nt=this._videoSegmentInfoList.getLastSampleBefore(Jt);if(Nt!=null){var mt=Jt-(Nt.originalDts+Nt.duration);mt<=3&&(mt=0);var cn=Nt.dts+Nt.duration+mt;Se=Jt-cn}else Se=0}for(var bn=new Ne,sn=[],dn=0;dn=1?En=sn[sn.length-1].duration:En=Math.floor(this._videoMeta.refSampleDuration);if(et){var jn=new Ke(Ut,Vt,En,Nn.dts,!0);jn.fileposition=Nn.fileposition,bn.appendSyncPoint(jn)}sn.push({dts:Ut,pts:Vt,cts:Yt,units:Nn.units,size:Nn.length,isKeyframe:et,duration:En,originalDts:Kt,flags:{isLeading:0,dependsOn:et?2:1,isDependedOn:et?1:0,hasRedundancy:0,isNonSync:et?0:1}})}St=new Uint8Array(Xt),St[0]=Xt>>>24&255,St[1]=Xt>>>16&255,St[2]=Xt>>>8&255,St[3]=Xt&255,St.set(Xe.types.mdat,4);for(var cr=0;cr0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,Se=this._demuxer.parseChunks(W,q);else if((se=Pe.probe(W)).match){this._demuxer=new Pe(se,this._config),this._remuxer||(this._remuxer=new ve(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(W,q)}else se=null,T.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(function(){te._internalAbort()}),this._emitter.emit(be.DEMUX_ERROR,V.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),Se=0;return Se}},{key:"_onMediaInfo",value:function(W){var q=this;this._mediaInfo==null&&(this._mediaInfo=Object.assign({},W),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,Me.prototype));var te=Object.assign({},W);Object.setPrototypeOf(te,Me.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=te,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(W){this._emitter.emit(be.METADATA_ARRIVED,W)}},{key:"_onScriptDataArrived",value:function(W){this._emitter.emit(be.SCRIPTDATA_ARRIVED,W)}},{key:"_onIOSeeked",value:function(){this._remuxer.insertDiscontinuity()}},{key:"_onIOComplete",value:function(W){var q=W,te=q+1;te0&&te[0].originalDts===se&&(se=te[0].pts),this._emitter.emit(be.RECOMMEND_SEEKPOINT,se)}}},{key:"_enableStatisticsReporter",value:function(){this._statisticsReporter==null&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}},{key:"_disableStatisticsReporter",value:function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"_reportSegmentMediaInfo",value:function(W){var q=this._mediaInfo.segments[W],te=Object.assign({},q);te.duration=this._mediaInfo.duration,te.segmentCount=this._mediaInfo.segmentCount,delete te.segments,delete te.keyframesIndex,this._emitter.emit(be.MEDIA_INFO,te)}},{key:"_reportStatisticsInfo",value:function(){var W={};W.url=this._ioctl.currentURL,W.hasRedirect=this._ioctl.hasRedirect,W.hasRedirect&&(W.redirectedURL=this._ioctl.currentRedirectedURL),W.speed=this._ioctl.currentSpeed,W.loaderType=this._ioctl.loaderType,W.currentSegmentIndex=this._currentSegmentIndex,W.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(be.STATISTICS_INFO,W)}}]),we}(),qe=Ge,pt=function(fe){var W="TransmuxingWorker",q=null,te=Jt.bind(this);w.install(),fe.addEventListener("message",function(Nt){switch(Nt.data.cmd){case"init":q=new qe(Nt.data.param[0],Nt.data.param[1]),q.on(be.IO_ERROR,Xt.bind(this)),q.on(be.DEMUX_ERROR,bt.bind(this)),q.on(be.INIT_SEGMENT,se.bind(this)),q.on(be.MEDIA_SEGMENT,Se.bind(this)),q.on(be.LOADING_COMPLETE,He.bind(this)),q.on(be.RECOVERED_EARLY_EOF,Je.bind(this)),q.on(be.MEDIA_INFO,xt.bind(this)),q.on(be.METADATA_ARRIVED,Ct.bind(this)),q.on(be.SCRIPTDATA_ARRIVED,it.bind(this)),q.on(be.STATISTICS_INFO,St.bind(this)),q.on(be.RECOMMEND_SEEKPOINT,ht.bind(this));break;case"destroy":q&&(q.destroy(),q=null),fe.postMessage({msg:"destroyed"});break;case"start":q.start();break;case"stop":q.stop();break;case"seek":q.seek(Nt.data.param);break;case"pause":q.pause();break;case"resume":q.resume();break;case"logging_config":{var mt=Nt.data.param;Oe.applyConfig(mt),mt.enableCallback===!0?Oe.addLogListener(te):Oe.removeLogListener(te);break}}});function se(Nt,mt){var cn={msg:be.INIT_SEGMENT,data:{type:Nt,data:mt}};fe.postMessage(cn,[mt.data])}function Se(Nt,mt){var cn={msg:be.MEDIA_SEGMENT,data:{type:Nt,data:mt}};fe.postMessage(cn,[mt.data])}function He(){var Nt={msg:be.LOADING_COMPLETE};fe.postMessage(Nt)}function Je(){var Nt={msg:be.RECOVERED_EARLY_EOF};fe.postMessage(Nt)}function xt(Nt){var mt={msg:be.MEDIA_INFO,data:Nt};fe.postMessage(mt)}function Ct(Nt){var mt={msg:be.METADATA_ARRIVED,data:Nt};fe.postMessage(mt)}function it(Nt){var mt={msg:be.SCRIPTDATA_ARRIVED,data:Nt};fe.postMessage(mt)}function St(Nt){var mt={msg:be.STATISTICS_INFO,data:Nt};fe.postMessage(mt)}function Xt(Nt,mt){fe.postMessage({msg:be.IO_ERROR,data:{type:Nt,info:mt}})}function bt(Nt,mt){fe.postMessage({msg:be.DEMUX_ERROR,data:{type:Nt,info:mt}})}function ht(Nt){fe.postMessage({msg:be.RECOMMEND_SEEKPOINT,data:Nt})}function Jt(Nt,mt){fe.postMessage({msg:"logcat_callback",data:{type:Nt,logcat:mt}})}},Pt=pt,Rt=function(){function we(fe,W){if(Object(ae.a)(this,we),this.TAG="Transmuxer",this._emitter=new S.a,W.enableWorker&&typeof Worker!="undefined")try{var q=z("0r65");this._worker=q(Pt),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[fe,W]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},Oe.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:Oe.getConfig()})}catch(se){T.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new qe(fe,W)}else this._controller=new qe(fe,W);if(this._controller){var te=this._controller;te.on(be.IO_ERROR,this._onIOError.bind(this)),te.on(be.DEMUX_ERROR,this._onDemuxError.bind(this)),te.on(be.INIT_SEGMENT,this._onInitSegment.bind(this)),te.on(be.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),te.on(be.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),te.on(be.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),te.on(be.MEDIA_INFO,this._onMediaInfo.bind(this)),te.on(be.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),te.on(be.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),te.on(be.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),te.on(be.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return Object(Z.a)(we,[{key:"destroy",value:function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),Oe.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(W,q){this._emitter.addListener(W,q)}},{key:"off",value:function(W,q){this._emitter.removeListener(W,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(W){this._worker?this._worker.postMessage({cmd:"seek",param:W}):this._controller.seek(W)}},{key:"pause",value:function(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}},{key:"resume",value:function(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}},{key:"_onInitSegment",value:function(W,q){var te=this;Promise.resolve().then(function(){te._emitter.emit(be.INIT_SEGMENT,W,q)})}},{key:"_onMediaSegment",value:function(W,q){var te=this;Promise.resolve().then(function(){te._emitter.emit(be.MEDIA_SEGMENT,W,q)})}},{key:"_onLoadingComplete",value:function(){var W=this;Promise.resolve().then(function(){W._emitter.emit(be.LOADING_COMPLETE)})}},{key:"_onRecoveredEarlyEof",value:function(){var W=this;Promise.resolve().then(function(){W._emitter.emit(be.RECOVERED_EARLY_EOF)})}},{key:"_onMediaInfo",value:function(W){var q=this;Promise.resolve().then(function(){q._emitter.emit(be.MEDIA_INFO,W)})}},{key:"_onMetaDataArrived",value:function(W){var q=this;Promise.resolve().then(function(){q._emitter.emit(be.METADATA_ARRIVED,W)})}},{key:"_onScriptDataArrived",value:function(W){var q=this;Promise.resolve().then(function(){q._emitter.emit(be.SCRIPTDATA_ARRIVED,W)})}},{key:"_onStatisticsInfo",value:function(W){var q=this;Promise.resolve().then(function(){q._emitter.emit(be.STATISTICS_INFO,W)})}},{key:"_onIOError",value:function(W,q){var te=this;Promise.resolve().then(function(){te._emitter.emit(be.IO_ERROR,W,q)})}},{key:"_onDemuxError",value:function(W,q){var te=this;Promise.resolve().then(function(){te._emitter.emit(be.DEMUX_ERROR,W,q)})}},{key:"_onRecommendSeekpoint",value:function(W){var q=this;Promise.resolve().then(function(){q._emitter.emit(be.RECOMMEND_SEEKPOINT,W)})}},{key:"_onLoggingConfigChanged",value:function(W){this._worker&&this._worker.postMessage({cmd:"logging_config",param:W})}},{key:"_onWorkerMessage",value:function(W){var q=W.data,te=q.data;if(q.msg==="destroyed"||this._workerDestroying){this._workerDestroying=!1,this._worker.terminate(),this._worker=null;return}switch(q.msg){case be.INIT_SEGMENT:case be.MEDIA_SEGMENT:this._emitter.emit(q.msg,te.type,te.data);break;case be.LOADING_COMPLETE:case be.RECOVERED_EARLY_EOF:this._emitter.emit(q.msg);break;case be.MEDIA_INFO:Object.setPrototypeOf(te,Me.prototype),this._emitter.emit(q.msg,te);break;case be.METADATA_ARRIVED:case be.SCRIPTDATA_ARRIVED:case be.STATISTICS_INFO:this._emitter.emit(q.msg,te);break;case be.IO_ERROR:case be.DEMUX_ERROR:this._emitter.emit(q.msg,te.type,te.info);break;case be.RECOMMEND_SEEKPOINT:this._emitter.emit(q.msg,te);break;case"logcat_callback":T.emitter.emit("log",te.type,te.logcat);break;default:break}}}]),we}(),Mt=Rt,wt={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"},lt=wt,ft=function(){function we(fe){Object(ae.a)(this,we),this.TAG="MSEController",this._config=fe,this._emitter=new S.a,this._config.isLive&&this._config.autoCleanupSourceBuffer==null&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new De}return Object(Z.a)(we,[{key:"destroy",value:function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(W,q){this._emitter.addListener(W,q)}},{key:"off",value:function(W,q){this._emitter.removeListener(W,q)}},{key:"attachMediaElement",value:function(W){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=W,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),W.src=this._mediaSourceObjectURL}},{key:"detachMediaElement",value:function(){if(this._mediaSource){var W=this._mediaSource;for(var q in this._sourceBuffers){var te=this._pendingSegments[q];te.splice(0,te.length),this._pendingSegments[q]=null,this._pendingRemoveRanges[q]=null,this._lastInitSegments[q]=null;var se=this._sourceBuffers[q];if(se){if(W.readyState!=="closed"){try{W.removeSourceBuffer(se)}catch(Se){T.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(W.readyState==="open")try{W.endOfStream()}catch(Se){T.e(this.TAG,Se.message)}W.removeEventListener("sourceopen",this.e.onSourceOpen),W.removeEventListener("sourceended",this.e.onSourceEnded),W.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)}},{key:"appendInitSegment",value:function(W,q){if(!this._mediaSource||this._mediaSource.readyState!=="open"){this._pendingSourceBufferInit.push(W),this._pendingSegments[W.type].push(W);return}var te=W,se="".concat(te.container);te.codec&&te.codec.length>0&&(se+=";codecs=".concat(te.codec));var Se=!1;if(T.v(this.TAG,"Received Initialization Segment, mimeType: "+se),this._lastInitSegments[te.type]=te,se!==this._mimeTypes[te.type]){if(this._mimeTypes[te.type])T.v(this.TAG,"Notice: ".concat(te.type," mimeType changed, origin: ").concat(this._mimeTypes[te.type],", target: ").concat(se));else{Se=!0;try{var He=this._sourceBuffers[te.type]=this._mediaSource.addSourceBuffer(se);He.addEventListener("error",this.e.onSourceBufferError),He.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(Je){T.e(this.TAG,Je.message),this._emitter.emit(lt.ERROR,{code:Je.code,msg:Je.message});return}}this._mimeTypes[te.type]=se}q||this._pendingSegments[te.type].push(te),Se||this._sourceBuffers[te.type]&&!this._sourceBuffers[te.type].updating&&this._doAppendSegments(),v.safari&&te.container==="audio/mpeg"&&te.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=te.mediaDuration/1e3,this._updateMediaSourceDuration())}},{key:"appendMediaSegment",value:function(W){var q=W;this._pendingSegments[q.type].push(q),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var te=this._sourceBuffers[q.type];te&&!te.updating&&!this._hasPendingRemoveRanges()&&this._doAppendSegments()}},{key:"seek",value:function(W){for(var q in this._sourceBuffers){if(!this._sourceBuffers[q])continue;var te=this._sourceBuffers[q];if(this._mediaSource.readyState==="open")try{te.abort()}catch(Ct){T.e(this.TAG,Ct.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=1&&W-se.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}},{key:"_doCleanupSourceBuffer",value:function(){var W=this._mediaElement.currentTime;for(var q in this._sourceBuffers){var te=this._sourceBuffers[q];if(te){for(var se=te.buffered,Se=!1,He=0;He=this._config.autoCleanupMaxBackwardDuration){Se=!0;var Ct=W-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[q].push({start:Je,end:Ct})}}else xt0&&(isNaN(q)||te>q)&&(T.v(this.TAG,"Update MediaSource duration from ".concat(q," to ").concat(te)),this._mediaSource.duration=te),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}},{key:"_doRemoveRanges",value:function(){for(var W in this._pendingRemoveRanges){if(!this._sourceBuffers[W]||this._sourceBuffers[W].updating)continue;for(var q=this._sourceBuffers[W],te=this._pendingRemoveRanges[W];te.length&&!q.updating;){var se=te.shift();q.remove(se.start,se.end)}}}},{key:"_doAppendSegments",value:function(){var W=this._pendingSegments;for(var q in W){if(!this._sourceBuffers[q]||this._sourceBuffers[q].updating)continue;if(W[q].length>0){var te=W[q].shift();if(te.timestampOffset){var se=this._sourceBuffers[q].timestampOffset,Se=te.timestampOffset/1e3,He=Math.abs(se-Se);He>.1&&(T.v(this.TAG,"Update MPEG audio timestampOffset from ".concat(se," to ").concat(Se)),this._sourceBuffers[q].timestampOffset=Se),delete te.timestampOffset}if(!te.data||te.data.byteLength===0)continue;try{this._sourceBuffers[q].appendBuffer(te.data),this._isBufferFull=!1,q==="video"&&te.hasOwnProperty("info")&&this._idrList.appendArray(te.info.syncPoints)}catch(Je){this._pendingSegments[q].unshift(te),Je.code===22?(this._isBufferFull||this._emitter.emit(lt.BUFFER_FULL),this._isBufferFull=!0):(T.e(this.TAG,Je.message),this._emitter.emit(lt.ERROR,{code:Je.code,msg:Je.message}))}}}}},{key:"_onSourceOpen",value:function(){if(T.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var W=this._pendingSourceBufferInit;W.length;){var q=W.shift();this.appendInitSegment(q,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(lt.SOURCE_OPEN)}},{key:"_onSourceEnded",value:function(){T.v(this.TAG,"MediaSource onSourceEnded")}},{key:"_onSourceClose",value:function(){T.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&this.e!=null&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}},{key:"_hasPendingSegments",value:function(){var W=this._pendingSegments;return W.video.length>0||W.audio.length>0}},{key:"_hasPendingRemoveRanges",value:function(){var W=this._pendingRemoveRanges;return W.video.length>0||W.audio.length>0}},{key:"_onSourceBufferUpdateEnd",value:function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(lt.UPDATE_END)}},{key:"_onSourceBufferError",value:function(W){T.e(this.TAG,"SourceBuffer Error: ".concat(W))}}]),we}(),Qe=ft,Te={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},je={NETWORK_EXCEPTION:n.EXCEPTION,NETWORK_STATUS_CODE_INVALID:n.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:n.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:n.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:V.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:V.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:V.CODEC_UNSUPPORTED},ct=function(){function we(fe,W){if(Object(ae.a)(this,we),this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new S.a,this._config=ie(),typeof W=="object"&&Object.assign(this._config,W),fe.type.toLowerCase()!=="flv")throw new s("FlvPlayer requires an flv MediaDataSource input!");fe.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=fe,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=v.chrome&&(v.version.major<50||v.version.major===50&&v.version.build<2661);this._alwaysSeekKeyframe=!!(q||v.msedge||v.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}return Object(Z.a)(we,[{key:"destroy",value:function(){this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(W,q){var te=this;W===Ae.MEDIA_INFO?this._mediaInfo!=null&&Promise.resolve().then(function(){te._emitter.emit(Ae.MEDIA_INFO,te.mediaInfo)}):W===Ae.STATISTICS_INFO&&(this._statisticsInfo!=null&&Promise.resolve().then(function(){te._emitter.emit(Ae.STATISTICS_INFO,te.statisticsInfo)})),this._emitter.addListener(W,q)}},{key:"off",value:function(W,q){this._emitter.removeListener(W,q)}},{key:"attachMediaElement",value:function(W){var q=this;if(this._mediaElement=W,W.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),W.addEventListener("seeking",this.e.onvSeeking),W.addEventListener("canplay",this.e.onvCanPlay),W.addEventListener("stalled",this.e.onvStalled),W.addEventListener("progress",this.e.onvProgress),this._msectl=new Qe(this._config),this._msectl.on(lt.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(lt.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(lt.SOURCE_OPEN,function(){q._mseSourceOpened=!0,q._hasPendingLoad&&(q._hasPendingLoad=!1,q.load())}),this._msectl.on(lt.ERROR,function(te){q._emitter.emit(Ae.ERROR,Te.MEDIA_ERROR,je.MEDIA_MSE_ERROR,te)}),this._msectl.attachMediaElement(W),this._pendingSeekTime!=null)try{W.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(te){}}},{key:"detachMediaElement",value:function(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)}},{key:"load",value:function(){var W=this;if(!this._mediaElement)throw new c("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new c("FlvPlayer.load() has been called, please call unload() first!");if(this._hasPendingLoad)return;if(this._config.deferLoadAfterSourceOpen&&this._mseSourceOpened===!1){this._hasPendingLoad=!0;return}this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new Mt(this._mediaDataSource,this._config),this._transmuxer.on(be.INIT_SEGMENT,function(q,te){W._msectl.appendInitSegment(te)}),this._transmuxer.on(be.MEDIA_SEGMENT,function(q,te){if(W._msectl.appendMediaSegment(te),W._config.lazyLoad&&!W._config.isLive){var se=W._mediaElement.currentTime;te.info.endDts>=(se+W._config.lazyLoadMaxDuration)*1e3&&(W._progressChecker==null&&(T.v(W.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),W._suspendTransmuxer()))}}),this._transmuxer.on(be.LOADING_COMPLETE,function(){W._msectl.endOfStream(),W._emitter.emit(Ae.LOADING_COMPLETE)}),this._transmuxer.on(be.RECOVERED_EARLY_EOF,function(){W._emitter.emit(Ae.RECOVERED_EARLY_EOF)}),this._transmuxer.on(be.IO_ERROR,function(q,te){W._emitter.emit(Ae.ERROR,Te.NETWORK_ERROR,q,te)}),this._transmuxer.on(be.DEMUX_ERROR,function(q,te){W._emitter.emit(Ae.ERROR,Te.MEDIA_ERROR,q,{code:-1,msg:te})}),this._transmuxer.on(be.MEDIA_INFO,function(q){W._mediaInfo=q,W._emitter.emit(Ae.MEDIA_INFO,Object.assign({},q))}),this._transmuxer.on(be.METADATA_ARRIVED,function(q){W._emitter.emit(Ae.METADATA_ARRIVED,q)}),this._transmuxer.on(be.SCRIPTDATA_ARRIVED,function(q){W._emitter.emit(Ae.SCRIPTDATA_ARRIVED,q)}),this._transmuxer.on(be.STATISTICS_INFO,function(q){W._statisticsInfo=W._fillStatisticsInfo(q),W._emitter.emit(Ae.STATISTICS_INFO,Object.assign({},W._statisticsInfo))}),this._transmuxer.on(be.RECOMMEND_SEEKPOINT,function(q){W._mediaElement&&!W._config.accurateSeek&&(W._requestSetTime=!0,W._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(W){this._mediaElement.volume=W}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(W){this._mediaElement.muted=W}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(W){this._mediaElement?this._internalSeek(W):this._pendingSeekTime=W}},{key:"mediaInfo",get:function(){return Object.assign({},this._mediaInfo)}},{key:"statisticsInfo",get:function(){return this._statisticsInfo==null&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}},{key:"_fillStatisticsInfo",value:function(W){if(W.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return W;var q=!0,te=0,se=0;if(this._mediaElement.getVideoPlaybackQuality){var Se=this._mediaElement.getVideoPlaybackQuality();te=Se.totalVideoFrames,se=Se.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(te=this._mediaElement.webkitDecodedFrameCount,se=this._mediaElement.webkitDroppedFrameCount):q=!1;return q&&(W.decodedFrames=te,W.droppedFrames=se),W}},{key:"_onmseUpdateEnd",value:function(){if(!this._config.lazyLoad||this._config.isLive)return;for(var W=this._mediaElement.buffered,q=this._mediaElement.currentTime,te=0,se=0,Se=0;Se=q+this._config.lazyLoadMaxDuration&&this._progressChecker==null&&(T.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}},{key:"_onmseBufferFull",value:function(){T.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),this._progressChecker==null&&this._suspendTransmuxer()}},{key:"_suspendTransmuxer",value:function(){this._transmuxer&&(this._transmuxer.pause(),this._progressChecker==null&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}},{key:"_checkProgressAndResume",value:function(){for(var W=this._mediaElement.currentTime,q=this._mediaElement.buffered,te=!1,se=0;se=Se&&W=He-this._config.lazyLoadRecoverDuration&&(te=!0);break}}te&&(window.clearInterval(this._progressChecker),this._progressChecker=null,te&&(T.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}},{key:"_isTimepointBuffered",value:function(W){for(var q=this._mediaElement.buffered,te=0;te=se&&W0){var Se=this._mediaElement.buffered.start(0);(Se<1&&W0&&q.currentTime0){var se=te.start(0);if(se<1&&q0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)}},{key:"unload",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(W){this._mediaElement.volume=W}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(W){this._mediaElement.muted=W}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(W){this._mediaElement?this._mediaElement.currentTime=W:this._pendingSeekTime=W}},{key:"mediaInfo",get:function(){var W=this._mediaElement instanceof HTMLAudioElement?"audio/":"video/",q={mimeType:W+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 W={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return W;var q=!0,te=0,se=0;if(this._mediaElement.getVideoPlaybackQuality){var Se=this._mediaElement.getVideoPlaybackQuality();te=Se.totalVideoFrames,se=Se.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(te=this._mediaElement.webkitDecodedFrameCount,se=this._mediaElement.webkitDroppedFrameCount):q=!1;return q&&(W.decodedFrames=te,W.droppedFrames=se),W}},{key:"_onvLoadedMetadata",value:function(W){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(Ae.MEDIA_INFO,this.mediaInfo)}},{key:"_reportStatisticsInfo",value:function(){this._emitter.emit(Ae.STATISTICS_INFO,this.statisticsInfo)}}]),we}(),Ot=Tt;w.install();function st(we,fe){var W=we;if(W==null||typeof W!="object")throw new s("MediaDataSource must be an javascript object!");if(!W.hasOwnProperty("type"))throw new s("MediaDataSource must has type field to indicate video file type!");switch(W.type){case"flv":return new Ze(W,fe);default:return new Ot(W,fe)}}function gt(){return xe.supportMSEH264Playback()}function kt(){return xe.getFeatureList()}var Wt={};Wt.createPlayer=st,Wt.isSupported=gt,Wt.getFeatureList=kt,Wt.BaseLoader=t,Wt.LoaderStatus=i,Wt.LoaderErrors=n,Wt.Events=Ae,Wt.ErrorTypes=Te,Wt.ErrorDetails=je,Wt.FlvPlayer=Ze,Wt.NativePlayer=Ot,Wt.LoggingControl=Oe,Object.defineProperty(Wt,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var Qt=We.a=Wt},GgEA:function($e,We,z){},Gytx:function($e,We){$e.exports=function(ae,Z,U,w){var P=U?U.call(w,ae,Z):void 0;if(P!==void 0)return!!P;if(ae===Z)return!0;if(typeof ae!="object"||!ae||typeof Z!="object"||!Z)return!1;var S=Object.keys(ae),C=Object.keys(Z);if(S.length!==C.length)return!1;for(var T=Object.prototype.hasOwnProperty.bind(Z),l=0;l>>6)+l(128|I&63):l(224|I>>>12&15)+l(128|I>>>6&63)+l(128|I&63)}else{var I=65536+(D.charCodeAt(0)-55296)*1024+(D.charCodeAt(1)-56320);return l(240|I>>>18&7)+l(128|I>>>12&63)+l(128|I>>>6&63)+l(128|I&63)}},h=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,d=function(D){return D.replace(h,p)},o=function(D){var I=[0,2,1][D.length%3],F=D.charCodeAt(0)<<16|(D.length>1?D.charCodeAt(1):0)<<8|(D.length>2?D.charCodeAt(2):0),K=[C.charAt(F>>>18),C.charAt(F>>>12&63),I>=2?"=":C.charAt(F>>>6&63),I>=1?"=":C.charAt(F&63)];return K.join("")},c=w.btoa&&typeof w.btoa=="function"?function(D){return w.btoa(D)}:function(D){if(D.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return D.replace(/[\s\S]{1,3}/g,o)},s=function(D){return c(d(String(D)))},f=function(D){return D.replace(/[+\/]/g,function(I){return I=="+"?"-":"_"}).replace(/=/g,"")},i=function(D,I){return I?f(s(D)):s(D)},n=function(D){return i(D,!0)},t;w.Uint8Array&&(t=function(D,I){for(var F="",K=0,ne=D.length;K>>18)+C.charAt(J>>>12&63)+(typeof G!="undefined"?C.charAt(J>>>6&63):"=")+(typeof X!="undefined"?C.charAt(J&63):"=")}return I?f(F):F});var u=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,y=function(D){switch(D.length){case 4:var I=(7&D.charCodeAt(0))<<18|(63&D.charCodeAt(1))<<12|(63&D.charCodeAt(2))<<6|63&D.charCodeAt(3),F=I-65536;return l((F>>>10)+55296)+l((F&1023)+56320);case 3:return l((15&D.charCodeAt(0))<<12|(63&D.charCodeAt(1))<<6|63&D.charCodeAt(2));default:return l((31&D.charCodeAt(0))<<6|63&D.charCodeAt(1))}},g=function(D){return D.replace(u,y)},_=function(D){var I=D.length,F=I%4,K=(I>0?T[D.charAt(0)]<<18:0)|(I>1?T[D.charAt(1)]<<12:0)|(I>2?T[D.charAt(2)]<<6:0)|(I>3?T[D.charAt(3)]:0),ne=[l(K>>>16),l(K>>>8&255),l(K&255)];return ne.length-=[0,0,2,1][F],ne.join("")},b=w.atob&&typeof w.atob=="function"?function(D){return w.atob(D)}:function(D){return D.replace(/\S{1,4}/g,_)},v=function(D){return b(String(D).replace(/[^A-Za-z0-9\+\/]/g,""))},m=function(D){return g(b(D))},E=function(D){return String(D).replace(/[-_]/g,function(I){return I=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},a=function(D){return m(E(D))},x;w.Uint8Array&&(x=function(D){return Uint8Array.from(v(E(D)),function(I){return I.charCodeAt(0)})});var O=function(){var D=w.Base64;return w.Base64=P,D};if(w.Base64={VERSION:S,atob:v,btoa:c,fromBase64:a,toBase64:i,utob:d,encode:i,encodeURI:n,btou:g,decode:a,noConflict:O,fromUint8Array:t,toUint8Array:x},typeof Object.defineProperty=="function"){var A=function(D){return{value:D,enumerable:!1,writable:!0,configurable:!0}};w.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",A(function(){return a(this)})),Object.defineProperty(String.prototype,"toBase64",A(function(D){return i(this,D)})),Object.defineProperty(String.prototype,"toBase64URI",A(function(){return i(this,!0)}))}}return w.Meteor&&(Base64=w.Base64),$e.exports?$e.exports.Base64=w.Base64:!(Z=[],U=function(){return w.Base64}.apply(We,Z),U!==void 0&&($e.exports=U)),{Base64:w.Base64}})}).call(this,z("IyRk"))},JOrW:function($e,We,z){$e.exports=z.p+"static/gf.09d89ab3.svg"},LdHM:function($e,We,z){"use strict";z.d(We,"b",function(){return u}),z.d(We,"a",function(){return g});var ae=z("1OyB"),Z=z("vuIU"),U=z("Ji7U"),w=z("LK+K"),P=z("q1tI"),S=z("rePB"),C=z("Ff2n"),T=z("ODXe"),l=z("4IlW"),p=z("bX4T"),h=z("YrtM"),d=z("TSYQ"),o=z.n(d),c=z("+nKL"),s=z("8OUc"),f=function(X,J){var B=X.prefixCls,Q=X.id,ie=X.flattenOptions,oe=X.childrenAsData,xe=X.values,ye=X.searchValue,Ae=X.multiple,pe=X.defaultActiveFirstOption,Oe=X.height,Fe=X.itemHeight,Me=X.notFoundContent,Ce=X.open,Le=X.menuItemSelectedIcon,de=X.virtual,ue=X.onSelect,ke=X.onToggleOpen,Ue=X.onActiveValue,Ye=X.onScroll,ee=X.onMouseEnter,M="".concat(B,"-item"),N=Object(h.a)(function(){return ie},[Ce,ie],function(Ke,Ne){return Ne[0]&&Ke[1]!==Ne[1]}),$=P.useRef(null),V=function(Ne){Ne.preventDefault()},Y=function(Ne){$.current&&$.current.scrollTo({index:Ne})},me=function(Ne){for(var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,_e=N.length,he=0;he<_e;he+=1){var ve=(Ne+he*De+_e)%_e,Ee=N[ve],be=Ee.group,Ge=Ee.data;if(!be&&!Ge.disabled)return ve}return-1},Re=P.useState(function(){return me(0)}),rt=Object(T.a)(Re,2),Pe=rt[0],Ie=rt[1],Xe=function(Ne){Ie(Ne);var De=N[Ne];if(!De){Ue(null,-1);return}Ue(De.data.value,Ne)};P.useEffect(function(){Xe(pe!==!1?me(0):-1)},[N.length,ye]),P.useEffect(function(){var Ke=setTimeout(function(){if(!Ae&&Ce&&xe.size===1){var Ne=Array.from(xe)[0],De=N.findIndex(function(_e){var he=_e.data;return he.value===Ne});Xe(De),Y(De)}});return function(){return clearTimeout(Ke)}},[Ce]);var tt=function(Ne){Ne!==void 0&&ue(Ne,{selected:!xe.has(Ne)}),Ae||ke(!1)};if(P.useImperativeHandle(J,function(){return{onKeyDown:function(Ne){var De=Ne.which;switch(De){case l.a.UP:case l.a.DOWN:{var _e=0;if(De===l.a.UP?_e=-1:De===l.a.DOWN&&(_e=1),_e!==0){var he=me(Pe+_e,_e);Y(he),Xe(he)}break}case l.a.ENTER:{var ve=N[Pe];ve&&!ve.data.disabled?tt(ve.data.value):tt(void 0),Ce&&Ne.preventDefault();break}case l.a.ESC:ke(!1)}},onKeyUp:function(){},scrollTo:function(Ne){Y(Ne)}}}),N.length===0)return P.createElement("div",{role:"listbox",id:"".concat(Q,"_list"),className:"".concat(M,"-empty"),onMouseDown:V},Me);function Ve(Ke){var Ne=N[Ke];if(!Ne)return null;var De=Ne.data||{},_e=De.value,he=De.label,ve=De.children,Ee=Object(p.a)(De,!0),be=oe?ve:he;return Ne?P.createElement("div",Object.assign({"aria-label":typeof be=="string"?be:null},Ee,{key:Ke,role:"option",id:"".concat(Q,"_list_").concat(Ke),"aria-selected":xe.has(_e)}),_e):null}return P.createElement(P.Fragment,null,P.createElement("div",{role:"listbox",id:"".concat(Q,"_list"),style:{height:0,width:0,overflow:"hidden"}},Ve(Pe-1),Ve(Pe),Ve(Pe+1)),P.createElement(c.a,{itemKey:"key",ref:$,data:N,height:Oe,itemHeight:Fe,fullHeight:!1,onMouseDown:V,onScroll:Ye,virtual:de,onMouseEnter:ee},function(Ke,Ne){var De,_e=Ke.group,he=Ke.groupOption,ve=Ke.data,Ee=ve.label,be=ve.key;if(_e)return P.createElement("div",{className:o()(M,"".concat(M,"-group"))},Ee!==void 0?Ee:be);var Ge=ve.disabled,qe=ve.value,pt=ve.title,Pt=ve.children,Rt=ve.style,Mt=ve.className,wt=Object(C.a)(ve,["disabled","value","title","children","style","className"]),lt=xe.has(qe),ft="".concat(M,"-option"),Qe=o()(M,ft,Mt,(De={},Object(S.a)(De,"".concat(ft,"-grouped"),he),Object(S.a)(De,"".concat(ft,"-active"),Pe===Ne&&!Ge),Object(S.a)(De,"".concat(ft,"-disabled"),Ge),Object(S.a)(De,"".concat(ft,"-selected"),lt),De)),Te=oe?Pt:Ee,je=!Le||typeof Le=="function"||lt;return P.createElement("div",Object.assign({},wt,{"aria-selected":lt,className:Qe,title:pt,onMouseMove:function(){if(Pe===Ne||Ge)return;Xe(Ne)},onClick:function(){Ge||tt(qe)},style:Rt}),P.createElement("div",{className:"".concat(ft,"-content")},Te||qe),P.isValidElement(Le)||lt,je&&P.createElement(s.a,{className:"".concat(M,"-option-state"),customizeIcon:Le,customizeIconProps:{isSelected:lt}},lt?"\u2713":null))}))},i=P.forwardRef(f);i.displayName="OptionList";var n=i,t=function(){return null};t.isSelectOption=!0;var u=t,y=function(){return null};y.isSelectOptGroup=!0;var g=y,_=z("VTBJ"),b=z("Zm9Q");function v(G){var X=G.key,J=G.props,B=J.children,Q=J.value,ie=Object(C.a)(J,["children","value"]);return Object(_.a)({key:X,value:Q!==void 0?Q:X,children:B},ie)}function m(G){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(b.a)(G).map(function(J,B){if(!P.isValidElement(J)||!J.type)return null;var Q=J.type.isSelectOptGroup,ie=J.key,oe=J.props,xe=oe.children,ye=Object(C.a)(oe,["children"]);return X||!Q?v(J):Object(_.a)(Object(_.a)({key:"__RC_SELECT_GRP__".concat(ie===null?B:ie,"__"),label:ie},ye),{},{options:m(xe)})}).filter(function(J){return J})}var E=z("2Qr1"),a=z("qNPg"),x=z("U8pU"),O=z("Kwbf"),A=z("WKfj");function D(G){var X=G.mode,J=G.options,B=G.children,Q=G.backfill,ie=G.allowClear,oe=G.placeholder,xe=G.getInputElement,ye=G.showSearch,Ae=G.onSearch,pe=G.defaultOpen,Oe=G.autoFocus,Fe=G.labelInValue,Me=G.value,Ce=G.inputValue,Le=G.optionLabelProp,de=X==="multiple"||X==="tags",ue=ye!==void 0?ye:de||X==="combobox",ke=J||m(B);if(Object(O.a)(X!=="tags"||ke.every(function(M){return!M.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),X==="tags"||X==="combobox"){var Ue=ke.some(function(M){return M.options?M.options.some(function(N){return typeof("value"in N?N.value:N.key)=="number"}):typeof("value"in M?M.value:M.key)=="number"});Object(O.a)(!Ue,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(O.a)(X!=="combobox"||!Le,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(O.a)(X==="combobox"||!Q,"`backfill` only works with `combobox` mode."),Object(O.a)(X==="combobox"||!xe,"`getInputElement` only work with `combobox` mode."),Object(O.b)(X!=="combobox"||!xe||!ie||!oe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Ae&&!ue&&X!=="combobox"&&X!=="tags"&&Object(O.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(O.b)(!pe||Oe,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Me!=null){var Ye=Object(A.d)(Me);Object(O.a)(!Fe||Ye.every(function(M){return Object(x.a)(M)==="object"&&("key"in M||"value"in M)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(O.a)(!de||Array.isArray(Me),"`value` should be array when `mode` is `multiple` or `tags`")}if(B){var ee=null;Object(b.a)(B).some(function(M){if(!P.isValidElement(M)||!M.type)return!1;var N=M.type;if(N.isSelectOption)return!1;if(N.isSelectOptGroup){var $=Object(b.a)(M.props.children).every(function(V){return!P.isValidElement(V)||!M.type||V.type.isSelectOption?!0:(ee=V.type,!1)});return!$}return ee=N,!0}),ee&&Object(O.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ee.displayName||ee.name||ee,"`.")),Object(O.a)(Ce===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var I=D,F=Object(a.a)({prefixCls:"rc-select",components:{optionList:n},convertChildrenToData:m,flattenOptions:E.d,getLabeledValue:E.e,filterOptions:E.b,isValueDisabled:E.g,findValueOption:E.c,warningProps:I,fillOptionsWithMissingValue:E.a}),K=function(G){Object(U.a)(J,G);var X=Object(w.a)(J);function J(){var B;return Object(ae.a)(this,J),B=X.apply(this,arguments),B.selectRef=P.createRef(),B.focus=function(){B.selectRef.current.focus()},B.blur=function(){B.selectRef.current.blur()},B}return Object(Z.a)(J,[{key:"render",value:function(){return P.createElement(F,Object.assign({ref:this.selectRef},this.props))}}]),J}(P.Component);K.Option=u,K.OptGroup=g;var ne=K,j=We.c=ne},M8RZ:function($e,We,z){"use strict";z.d(We,"a",function(){return l});var ae=z("fWQN"),Z=z("mtLc"),U=z("yKVA"),w=z("879j"),P=z("q1tI"),S=z.n(P),C=z("i8i4"),T=z.n(C),l=function(p){Object(U.a)(d,p);var h=Object(w.a)(d);function d(o){var c;Object(ae.a)(this,d),c=h.call(this,o);var s=window.document;return c.node=s.createElement("div"),s.body.appendChild(c.node),c}return Object(Z.a)(d,[{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)}}]),d}(S.a.Component)},MFOe:function($e,We,z){(function(ae){var Z=S(),U=C(),w=T(),P=typeof window!="undefined"?window:ae;$e.exports={assign:Z,create:U,trim:w,bind:l,slice:p,each:h,map:d,pluck:o,isList:c,isFunction:s,isObject:f,Global:P};function S(){return Object.assign?Object.assign:function(n,t,u,y){for(var g=1;g=0;f-=1){var i=T.get(f)||new Set;i.forEach(function(n){var t=n.parent,u=n.node;if(p(u)||!n.parent||s.has(n.parent.key))return;if(p(n.parent.node)){s.add(t.key);return}var y=!0,g=!1;(t.children||[]).filter(function(_){return!p(_.node)}).forEach(function(_){var b=_.key,v=h.has(b);y&&!v&&(y=!1),!g&&(v||d.has(b))&&(g=!0)}),y&&h.add(t.key),g&&d.add(t.key),s.add(t.key)})}return{checkedKeys:Array.from(h),halfCheckedKeys:Array.from(Z(d,h))}}function P(C,T,l,p,h){for(var d=new Set(C),o=new Set(T),c=0;c<=p;c+=1){var s=l.get(c)||new Set;s.forEach(function(t){var u=t.key,y=t.node,g=t.children,_=g===void 0?[]:g;!d.has(u)&&!o.has(u)&&!h(y)&&_.filter(function(b){return!h(b.node)}).forEach(function(b){d.delete(b.key)})})}o=new Set;for(var f=new Set,i=p;i>=0;i-=1){var n=l.get(i)||new Set;n.forEach(function(t){var u=t.parent,y=t.node;if(h(y)||!t.parent||f.has(t.parent.key))return;if(h(t.parent.node)){f.add(u.key);return}var g=!0,_=!1;(u.children||[]).filter(function(b){return!h(b.node)}).forEach(function(b){var v=b.key,m=d.has(v);g&&!m&&(g=!1),!_&&(m||o.has(v))&&(_=!0)}),g||d.delete(u.key),_&&o.add(u.key),f.add(u.key)})}return{checkedKeys:Array.from(d),halfCheckedKeys:Array.from(Z(o,d))}}function S(C,T,l,p){var h=[],d;p?d=p:d=U;var o=new Set(C.filter(function(i){var n=!!l[i];return n||h.push(i),n})),c=new Map,s=0;Object.keys(l).forEach(function(i){var n=l[i],t=n.level,u=c.get(t);u||(u=new Set,c.set(t,u)),u.add(n),s=Math.max(s,t)}),Object(ae.a)(!h.length,"Tree missing follow keys: ".concat(h.slice(0,100).map(function(i){return"'".concat(i,"'")}).join(", ")));var f;return T===!0?f=w(o,c,s,d):f=P(o,T.halfCheckedKeys,c,s,d),f}},OLES:function($e,We,z){"use strict";var ae=z("U8pU"),Z=z("VTBJ"),U=z("Ff2n"),w=z("q1tI"),P=z("uciX"),S=z("7ixt"),C=function(o){var c=o.overlay,s=o.prefixCls,f=o.id,i=o.overlayInnerStyle;return w.createElement("div",{className:"".concat(s,"-inner"),id:f,role:"tooltip",style:i},typeof c=="function"?c():c)},T=C,l=function(o,c){var s=o.overlayClassName,f=o.trigger,i=f===void 0?["hover"]:f,n=o.mouseEnterDelay,t=n===void 0?0:n,u=o.mouseLeaveDelay,y=u===void 0?.1:u,g=o.overlayStyle,_=o.prefixCls,b=_===void 0?"rc-tooltip":_,v=o.children,m=o.onVisibleChange,E=o.afterVisibleChange,a=o.transitionName,x=o.animation,O=o.placement,A=O===void 0?"right":O,D=o.align,I=D===void 0?{}:D,F=o.destroyTooltipOnHide,K=F===void 0?!1:F,ne=o.defaultVisible,j=o.getTooltipContainer,G=o.overlayInnerStyle,X=Object(U.a)(o,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),J=Object(w.useRef)(null);Object(w.useImperativeHandle)(c,function(){return J.current});var B=Object(Z.a)({},X);"visible"in o&&(B.popupVisible=o.visible);var Q=function(){var Ae=o.arrowContent,pe=Ae===void 0?null:Ae,Oe=o.overlay,Fe=o.id;return[w.createElement("div",{className:"".concat(b,"-arrow"),key:"arrow"},pe),w.createElement(T,{key:"content",prefixCls:b,id:Fe,overlay:Oe,overlayInnerStyle:G})]},ie=!1,oe=!1;if(typeof K=="boolean")ie=K;else if(K&&Object(ae.a)(K)==="object"){var xe=K.keepParent;ie=xe===!0,oe=xe===!1}return w.createElement(P.a,Object.assign({popupClassName:s,prefixCls:b,popup:Q,action:i,builtinPlacements:S.a,popupPlacement:A,ref:J,popupAlign:I,getPopupContainer:j,onPopupVisibleChange:m,afterPopupVisibleChange:E,popupTransitionName:a,popupAnimation:x,defaultPopupVisible:ne,destroyPopupOnHide:ie,autoDestroy:oe,mouseLeaveDelay:y,popupStyle:g,mouseEnterDelay:t},B),v)},p=Object(w.forwardRef)(l),h=We.a=p},OZM5:function($e,We,z){"use strict";z.d(We,"b",function(){return p}),z.d(We,"a",function(){return h}),z.d(We,"k",function(){return d}),z.d(We,"h",function(){return o}),z.d(We,"i",function(){return c}),z.d(We,"g",function(){return s}),z.d(We,"c",function(){return f}),z.d(We,"d",function(){return i}),z.d(We,"j",function(){return u}),z.d(We,"e",function(){return y}),z.d(We,"f",function(){return g});var ae=z("KQm4"),Z=z("U8pU"),U=z("Ff2n"),w=z("q1tI"),P=z.n(w),S=z("Kwbf"),C=z("WaYH"),T=.25,l=2;function p(_,b){var v=_.slice(),m=v.indexOf(b);return m>=0&&v.splice(m,1),v}function h(_,b){var v=_.slice();return v.indexOf(b)===-1&&v.push(b),v}function d(_){return _.split("-")}function o(_,b){return"".concat(_,"-").concat(b)}function c(_){return _&&_.type&&_.type.isTreeNode}function s(_,b){var v=[_],m=b[_];function E(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];a.forEach(function(x){var O=x.key,A=x.children;v.push(O),E(A)})}return E(m.children),v}function f(_,b){var v=_.clientY,m=b.selectHandle.getBoundingClientRect(),E=m.top,a=m.bottom,x=m.height,O=Math.max(x*T,l);return v<=E+O?-1:v>=a-O?1:0}function i(_,b){if(!_)return;var v=b.multiple;return v?_.slice():_.length?[_[0]]:_}var n=function(b){return b};function t(_,b){if(!_)return[];var v=b||{},m=v.processProps,E=m===void 0?n:m,a=Array.isArray(_)?_:[_];return a.map(function(x){var O=x.children,A=Object(U.a)(x,["children"]),D=t(O,b);return P.a.createElement(C.a,Object.assign({},E(A)),D)})}function u(_){if(!_)return null;var b;if(Array.isArray(_))b={checkedKeys:_,halfCheckedKeys:void 0};else if(Object(Z.a)(_)==="object")b={checkedKeys:_.checked||void 0,halfCheckedKeys:_.halfChecked||void 0};else return Object(S.a)(!1,"`checkedKeys` is not an array or an object"),null;return b}function y(_,b){var v=new Set;function m(E){if(v.has(E))return;var a=b[E];if(!a)return;v.add(E);var x=a.parent,O=a.node;if(O.disabled)return;x&&m(x.key)}return(_||[]).forEach(function(E){m(E)}),Object(ae.a)(v)}function g(_){var b={};return Object.keys(_).forEach(function(v){(v.startsWith("data-")||v.startsWith("aria-"))&&(b[v]=_[v])}),b}},"OkW/":function($e,We,z){},Ot1p:function($e,We,z){"use strict";var ae=z("2qtc"),Z=z("kLXV"),U=z("rAM+"),w=z("miYZ"),P=z("tsqr"),S=z("tJVT"),C=z("jrin"),T=z("q1tI"),l=z.n(T),p=z("VrN/"),h=z.n(p),d=z("bdgK"),o=z("p77/"),c=z("Bd2K"),s=z("ELLl"),f=z("19Vz"),i=z("lZu9"),n=z("+NIl"),t=z("kSUc"),u=z("9Bee"),y=function(_e){var he=_e.value,ve=he===void 0?"":he,Ee=_e.className,be=_e.showTextOnly,Ge=_e.showLines,qe=_e.style,pt=qe===void 0?{}:qe,Pt=Object(T.useMemo)(function(){return""},[ve]);return l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{dangerouslySetInnerHTML:{__html:Pt}}))},g=z("0Owb"),_=z("dejd"),b=z("C+DQ"),v=[{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 m(_e){var he=_e.onActionCallback,ve=_e.title,Ee=_e.icon,be=_e.actionName,Ge=_e.className,qe=Ge===void 0?"":Ge,pt=_e.children;function Pt(){he(be)}return l.a.createElement("a",{title:ve,className:qe,onClick:Pt},l.a.createElement("i",{className:"md-iconfont ".concat(Ee)}),pt)}var E=function(_e){var he=_e.watch,ve=_e.showNullButton,Ee=_e.onActionCallback,be=_e.fullScreen,Ge=_e.insertTemp,qe=_e.hidetoolBar,pt=[].concat(v,[{title:"".concat(he?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(he?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return l.a.createElement("ul",{className:"markdown-toolbar-container"},!qe&&pt.map(function(Pt,Rt){return l.a.createElement("li",{key:Rt},Pt.actionName?l.a.createElement(m,Object(g.a)({},Pt,{onActionCallback:Ee})):l.a.createElement("span",{className:"v-line"}))}),ve?l.a.createElement("li",null,l.a.createElement(m,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Ee},l.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Ge&&l.a.createElement("li",null,l.a.createElement(m,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(Ge),onActionCallback:Ee},l.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),l.a.createElement("li",{className:"btn-full-screen"},l.a.createElement(m,{icon:"".concat(be?"icon-shrink":"icon-enlarge"),title:be?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Ee})))},a=z("M8RZ"),x=z("+L6B"),O=z("2/Rp"),A=z("y8nQ"),D=z("Vl3Y"),I=z("5NDa"),F=z("5rEg"),K={labelCol:{span:4},wrapperCol:{span:20}},ne=function(_e){var he=_e.callback,ve=_e.onCancel;function Ee(be){he(be)}return l.a.createElement(D.a,Object(g.a)({},K,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Ee}),l.a.createElement(D.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},l.a.createElement(F.a,null)),l.a.createElement(D.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},l.a.createElement(F.a,null)),l.a.createElement("div",{className:"flex-container flex-end"},l.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(O.a,{type:"ghost",onClick:ve},"\u53D6\u6D88")))},j=z("7ahc"),G=z("HmJG"),X=z("BjJ7"),J=D.a.useForm,B={width:280,marginRight:10},Q={labelCol:{span:5},wrapperCol:{span:19}},ie=function(_e){var he=_e.callback,ve=_e.onCancel,Ee=J(),be=Object(S.a)(Ee,1),Ge=be[0];function qe(Rt){he(Rt)}function pt(Rt,Mt){Ge.setFieldsValue({src:"/api/attachments/".concat(Rt.id),type:Mt.type})}function Pt(Rt){var Mt=Rt.target.files[0];xe(Mt,pt)}return l.a.createElement(D.a,Object(g.a)({form:Ge},Q,{className:"upload-image-panel",onFinish:qe}),l.a.createElement(D.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},l.a.createElement("div",{className:"flex-container"},l.a.createElement(D.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},l.a.createElement(F.a,{style:B})),l.a.createElement(oe,{onFileChange:Pt}))),l.a.createElement(D.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u63CF\u8FF0"}]},l.a.createElement(F.a,{style:{width:264}})),l.a.createElement(D.a.Item,{style:{textAlign:"right"}},l.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(O.a,{type:"ghost",onClick:ve},"\u53D6\u6D88")))};function oe(_e){var he=_e.onFileChange;return l.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",l.a.createElement("input",{type:"file",onChange:he}))}function xe(_e,he){if(!_e)throw new String("\u6CA1\u6709\u6587\u4EF6");var ve=new FormData;ve.append("editormd-image-file",_e),ve.append("file_param_name","editormd-image-file"),ve.append("byxhr","true");var Ee=new window.XMLHttpRequest;Ee.withCredentials=!0,Ee.addEventListener("load",function(be){he(JSON.parse(be.target.responseText),_e)},!1),Ee.addEventListener("error",function(be){console.error(be)},!1),Ee.open("POST","".concat(X.a,"/api/attachments.json")),Ee.send(ve)}var ye=z("giR+"),Ae=z("fyUT"),pe=z("7Kak"),Oe=z("9yH6"),Fe=Oe.a.Group,Me={margin:"0 8px"},Ce=function(_e){var he=_e.callback,ve=_e.onCancel;function Ee(be){he(be)}return l.a.createElement(D.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Ee},l.a.createElement("div",{className:"flex-container"},l.a.createElement("span",{style:Me},"\u5355\u5143\u683C\u6570\uFF1A"),l.a.createElement("span",{style:Me},"\u884C\u6570"),l.a.createElement(D.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},l.a.createElement(Ae.a,null)),l.a.createElement("span",{style:Me},"\u5217\u6570"),l.a.createElement(D.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},l.a.createElement(Ae.a,null))),l.a.createElement("div",{className:"flex-container",style:{marginTop:12}},l.a.createElement("span",{style:Me},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),l.a.createElement(D.a.Item,{name:"align"},l.a.createElement(Fe,null,l.a.createElement(Oe.a,{value:"default"},l.a.createElement("i",{className:"fa fa-align-justify"})),l.a.createElement(Oe.a,{value:"left"},l.a.createElement("i",{className:"fa fa-align-left"})),l.a.createElement(Oe.a,{value:"center"},l.a.createElement("i",{className:"fa fa-align-center"})),l.a.createElement(Oe.a,{value:"right"},l.a.createElement("i",{className:"fa fa-align-right"}))))),l.a.createElement("div",{className:"flex-container flex-end"},l.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(O.a,{type:"ghost",onClick:ve},"\u53D6\u6D88")))},Le=z("m3rI"),de=z("wMS7"),ue=z.n(de),ke="link",Ue="upload-image",Ye="code-block",ee="add-table",M="------------",N={default:M,left:":".concat(M),center:":".concat(M,":"),right:"".concat(M,":")},$=z("9VGf"),V,Y;function me(){}var Re=0,rt=1e4,Pe="\u2581",Ie=` **\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 Xe(_e){return/^\d+$/.test(_e)?"".concat(_e,"px"):_e}var tt=navigator.platform.toUpperCase().indexOf("MAC")>=0,Ve=tt?"Cmd":"Ctrl",Ke=(V={},Object(C.a)(V,Ve+"-B","bold"),Object(C.a)(V,Ve+"-I","italic"),V),Ne=(Y={},Object(C.a)(Y,ke,"\u6DFB\u52A0\u94FE\u63A5"),Object(C.a)(Y,Ye,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(C.a)(Y,Ue,"\u6DFB\u52A0\u56FE\u7247"),Object(C.a)(Y,ee,"\u6DFB\u52A0\u8868\u683C"),Y),De=We.a=function(_e){var he=_e.defaultValue,ve=he===void 0?"":he,Ee=_e.onChange,be=_e.width,Ge=be===void 0?"100%":be,qe=_e.height,pt=qe===void 0?400:qe,Pt=_e.miniToolbar,Rt=Pt===void 0?!1:Pt,Mt=_e.isFocus,wt=Mt===void 0?!1:Mt,lt=_e.watch,ft=_e.insertTemp,Qe=_e.mode,Te=Qe===void 0?"markdown":Qe,je=_e.id,ct=je===void 0?"markdown-editor-id":je,Ze=_e.showResizeBar,Tt=Ze===void 0?!1:Ze,Ot=_e.noStorage,st=Ot===void 0?!1:Ot,gt=_e.showNullButton,kt=gt===void 0?!1:gt,Wt=_e.hidetoolBar,Qt=Wt===void 0?!1:Wt,we=_e.fullScreen,fe=we===void 0?!1:we,W=_e.onBlur,q=_e.onCMBeforeChange,te=_e.onFullScreen,se=_e.className,Se=se===void 0?"":se,He=_e.disablePaste,Je=He===void 0?!1:He,xt=_e.placeholder,Ct=xt===void 0?"":xt,it=_e.values,St=it===void 0?"":it,Xt=Object(T.useState)(null),bt=Object(S.a)(Xt,2),ht=bt[0],Jt=bt[1],Nt=Object(T.useState)(ve),mt=Object(S.a)(Nt,2),cn=mt[0],bn=mt[1],sn=Object(T.useState)(lt),dn=Object(S.a)(sn,2),Nn=dn[0],Kt=dn[1],et=Object(T.useState)(fe),Ut=Object(S.a)(et,2),Yt=Ut[0],Vt=Ut[1],En=Object(T.useState)(""),sr=Object(S.a)(En,2),nr=sr[0],jn=sr[1],cr=Object(T.useState)(0),qn=Object(S.a)(cr,2),Wr=qn[0],_r=qn[1],Rr=Object(T.useState)(pt),Tr=Object(S.a)(Rr,2),Vr=Tr[0],Ur=Tr[1],xi=Object(T.useState)(!1),kr=Object(S.a)(xi,2),Oi=kr[0],ri=kr[1],Xr=Object(T.useRef)(),di=Object(T.useRef)(),Si=Object(T.useRef)(),si=Object(T.useRef)();Object(T.useEffect)(function(){bn(St),ht==null||ht.setValue(St)},[St]),Object(T.useEffect)(function(){te==null||te(Yt)},[Yt]),Object(T.useEffect)(function(){if(Xr.current){var ln=h.a.fromTextArea(Xr.current,{mode:Te,lineNumbers:!Rt,lineWrapping:!0,value:ve,autoCloseTags:!0,autoCloseBrackets:!0});wt&&ln.focus();function Tn(On,rr){if(Je){rr.preventDefault();return}var ar=rr.clipboardData;if(ar){var pr=ar.types.toString(),Er=ar.items,Cr=["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"];if(pr==="Files"||ar.types.indexOf("Files")>-1){if(rr.preventDefault(),Te=="stex")return;try{var xr,pi=Er[1];((xr=Er[0])===null||xr===void 0?void 0:xr.kind)==="file"&&(pi=Er[0]);var Or=pi.getAsFile(),Ai=Or.name.split(".").pop();xe(Or,function(Dr){if(Dr.id){var mi,vi,Yi;(Or==null||((mi=Or.type)===null||mi===void 0)?void 0:mi.indexOf("image"))>-1?ln.replaceSelection("![,](/api/attachments/".concat(Dr.id,"?type=").concat(Dr.content_type,")")):(Or==null||((vi=Or.type)===null||vi===void 0)?void 0:vi.indexOf("video"))>-1?ln.replaceSelection('')):(Or==null||((Yi=Or.type)===null||Yi===void 0)?void 0:Yi.indexOf("pdf"))>-1?ln.replaceSelection('
    ').concat(Or.name,"")):Cr.includes(Ai)?ln.replaceSelection('').concat(Or.name,"")):ln.replaceSelection("[".concat(Or.name,"](").concat(Le.a.API_SERVER,"/api/attachments/").concat(Dr.id,"?type=").concat(Dr.content_type,")"))}else(Dr==null?void 0:Dr.status)===401&&(document.location.href="/user/login")})}catch(Dr){P.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return ln.on("paste",Tn),Jt(ln),function(){ln.off("paste",Tn)}}},[]);var fi=Object(T.useCallback)(function(){if(di.current)try{}catch(ln){console.log(ln,"---- to set md editor body height")}},[Vr,di,Yt]);Object(T.useEffect)(function(){function ln(){var On=new d.default(function(rr){var ar=Object(U.a)(rr),pr;try{for(ar.s();!(pr=ar.n()).done;){var Er=pr.value;(Er.target.offsetHeight>0||Er.target.offsetWidth>0)&&(fi(),ht.setSize("100%","100%"),ht.refresh())}}catch(Cr){ar.e(Cr)}finally{ar.f()}});return On.observe(Xr.current.parentElement),On}if(ht){var Tn=ln();return function(){Tn.unobserve(Xr.current.parentElement)}}},[ht,fi]),Object(T.useEffect)(function(){if(ht){for(var ln=[],Tn=function(){var Er=rr[On];ar=Object(S.a)(Er,2);var Cr=ar[0],xr=ar[1],pi=Object(C.a)({},Cr,function(){gr(xr)});ln.push(pi),ht.addKeyMap(pi)},On=0,rr=Object.entries(Ke);On0){var ln=new Date().getTime(),Tn=window.sessionStorage.getItem(ct);ln>=Wr+rt&&(!Tn||Tn!==cn)&&(window.sessionStorage.setItem(ct,cn),ri(!0))}},rt),Object(T.useEffect)(function(){Kt(lt)},[ht,lt]),Object(T.useEffect)(function(){ht&&(wt&&ht.focus())},[ht,wt]),Object(T.useEffect)(function(){if(Nn&&ht){var ln=ht.getScrollerElement();function Tn(On){var rr=On.target;if(si.current){var ar=rr.scrollTop/rr.scrollHeight;si.current.scrollTop=si.current.scrollHeight*ar}}return ln.addEventListener("scroll",Tn),function(){ln.removeEventListener("scroll",Tn)}}},[ht,Nn]),Object(T.useEffect)(function(){if(ht&&q){function ln(Tn,On){q(Tn,On)}return ht.on("beforeChange",ln),function(){ht.off("beforeChange",ln)}}},[ht,q]),Object(T.useEffect)(function(){if(ht&&W){function ln(){W(ht.getValue())}return ht.on("blur",ln),function(){ht.off("blur",ln)}}},[ht,W]),Object(T.useEffect)(function(){if(ht){function ln(Tn){var On=ue.a.sanitize(Tn.getValue());bn(On),_r(new Date().getTime()),Tn.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Ee&&Ee(On)}return ht.on("change",ln),function(){ht.off("change",ln)}}},[ht,Ee]),Object(T.useEffect)(function(){ht&&(ve==null?(ht.setValue(""),bn("")):ve!==ht.getValue()&&(ht.setValue(ve),bn(ve),ht.setCursor(ht.lineCount(),0)))},[ht,ve]);var gr=Object(T.useCallback)(function(ln){var Tn=ht.getCursor(),On=ht.getSelection(),rr=On.split(` `);switch(ln){case"bold":return ht.replaceSelection("**"+On+"**"),On===""&&ht.setCursor(Tn.line,Tn.ch+2),ht.focus();case"italic":return ht.replaceSelection("*"+On+"*"),On===""&&ht.setCursor(Tn.line,Tn.ch+1),ht.focus();case"code":return ht.replaceSelection("`"+On+"`"),On===""&&ht.setCursor(Tn.line,Tn.ch+1),ht.focus();case"inline-latex":return ht.replaceSelection("`$$"+On+"$$`"),On===""&&ht.setCursor(Tn.line,Tn.ch+3),ht.focus();case"latex":return ht.replaceSelection("```latex\n"+On+"\n```"),ht.setCursor(Tn.line+1,On.length+1),ht.focus();case"line-break":return ht.replaceSelection(`
    `),ht.focus();case"list-ul":return On===""?ht.replaceSelection("- "+On):ht.replaceSelection(rr.map(function(ar){return ar===""?"":"- ".concat(ar)}).join(` `)),ht.focus();case"list-ol":return On===""?ht.replaceSelection("1. "+On):ht.replaceSelection(rr.map(function(ar,pr){return ar===""?"":"".concat(pr+1,". ").concat(ar)}).join(` `)),ht.focus();case"add-null-ch":return On===""&&ht.setCursor(Tn.line,Tn.ch+1),ht.replaceSelection(Pe),ht.focus();case"inster-template-1":return On===""&&ht.setCursor(Tn.line,Tn.ch),ht.replaceSelection(Ie),ht.focus();case"eraser":return ht.setValue(""),ht.focus();case"trigger-watch":return Kt(!Nn),ht.focus();case"trigger-full-screen":return Vt(!Yt),ht.focus();case ke:jn(ke);return;case Ye:jn(Ye);return;case Ue:jn(Ue);return;case ee:jn(ee);return;default:throw new Error}},[ht,Nn,Yt]),dr=Object(T.useCallback)(function(ln){jn("");switch(nr){case ke:var Tn=ln.title,On=ln.link;return ht.replaceSelection("[".concat(Tn,"](").concat(On,")")),ht.focus();case Ye:var rr=ln.language,ar=ln.content;return ht.replaceSelection(["```"+rr,ar,"```"].join(` `)),ht.focus();case Ue:var pr=ln.src,Er=ln.alt;return ht.replaceSelection("![ ".concat(Er," ]( ").concat(pr,' "').concat(Er,'" )')),ht.focus();case ee:for(var Cr=ln.row,xr=ln.col,pi=ln.align,Or=` `,Ai=0;Ai300&&(Cr=300);var xr=pt+Cr+"px";Ur(xr)}}return ln.addEventListener("mousedown",rr),document.addEventListener("mousemove",pr),document.addEventListener("mouseup",ar),function(){ln.removeEventListener("mousedown",rr),document.removeEventListener("mousemove",pr),document.removeEventListener("mouseup",ar)}}},[ht,Si]),Object(T.useEffect)(function(){Ur(pt)},[pt]);var Ni=Xe(Ge),wi=Xe(Vr),ua={width:Ni,height:wi},ca=Object(T.useMemo)(function(){if(Wr){var ln=new Date(Wr),Tn=ln.getHours(),On=ln.getMinutes(),rr=ln.getSeconds();return Tn=Tn<10?"0"+Tn:Tn,On=On<10?"0"+On:On,rr=rr<10?"0"+rr:rr,"".concat(Tn,":").concat(On,":").concat(rr)}return 0},[Wr]);function hi(){window.sessionStorage.removeItem(ct),ri(!1),_r(0)}function Zi(){ri(!1),_r(0),ht.setValue(window.sessionStorage.getItem(ct))}return l.a.createElement(T.Fragment,null,l.a.createElement("div",{className:"markdown-editor-wrapper",ref:di},l.a.createElement("div",{className:"markdown-editor-container ".concat(Se," ").concat(Nn?"on-preview":""," ").concat(Rt?"mini":""," ").concat(Yt?"full-screen":""),style:ua},l.a.createElement(E,{insertTemp:ft,watch:Nn,fullScreen:Yt,showNullButton:kt,onActionCallback:gr,hidetoolBar:Qt}),l.a.createElement("div",{className:"markdown-editor-body"},l.a.createElement("div",{className:"codemirror-container"},l.a.createElement("textarea",{ref:Xr,placeholder:Ct})),Nn?l.a.createElement("div",{ref:si,className:"preview-container"},Te==="stex"&&l.a.createElement(y,{value:cn}),Te!=="stex"&&l.a.createElement(u.a,{value:cn})):null))),Tt?l.a.createElement("a",{ref:Si,className:"editor-resize"}):null,l.a.createElement(a.a,null,Ne[nr]?l.a.createElement(Z.a,{centered:!0,title:Ne[nr],visible:!0,onCancel:li,footer:null},ii):null))}},P5Jw:function($e,We,z){"use strict";var ae=z("rHrb"),Z=ae.CopyToClipboard;Z.CopyToClipboard=Z,$e.exports=Z},PD8m:function($e,We){$e.exports={name:"memoryStorage",read:ae,write:Z,each:U,remove:w,clearAll:P};var z={};function ae(S){return z[S]}function Z(S,C){z[S]=C}function U(S){for(var C in z)z.hasOwnProperty(C)&&S(z[C],C)}function w(S){delete z[S]}function P(S){z={}}},RELg:function($e,We,z){var ae=z("MFOe"),Z=ae.Global;$e.exports={name:"oldIE-userDataStorage",write:C,read:T,each:l,remove:p,clearAll:h};var U="storejs",w=Z.document,P=c(),S=(Z.navigator?Z.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function C(s,f){if(S)return;var i=o(s);P(function(n){n.setAttribute(i,f),n.save(U)})}function T(s){if(S)return;var f=o(s),i=null;return P(function(n){i=n.getAttribute(f)}),i}function l(s){P(function(f){for(var i=f.XMLDocument.documentElement.attributes,n=i.length-1;n>=0;n--){var t=i[n];s(f.getAttribute(t.name),t.name)}})}function p(s){var f=o(s);P(function(i){i.removeAttribute(f),i.save(U)})}function h(){P(function(s){var f=s.XMLDocument.documentElement.attributes;s.load(U);for(var i=f.length-1;i>=0;i--)s.removeAttribute(f[i].name);s.save(U)})}var d=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function o(s){return s.replace(/^\d/,"___$&").replace(d,"___")}function c(){if(!w||!w.documentElement||!w.documentElement.addBehavior)return null;var s="script",f,i,n;try{i=new ActiveXObject("htmlfile"),i.open(),i.write("<"+s+">document.w=window'),i.close(),f=i.w.frames[0].document,n=f.createElement("div")}catch(t){n=w.createElement("div"),f=w.body}return function(t){var u=[].slice.call(arguments,0);u.unshift(n),f.appendChild(n),n.addBehavior("#default#userData"),n.load(U),t.apply(this,u),f.removeChild(n);return}}},RpDr:function($e,We,z){"use strict";z.d(We,"a",function(){return _}),z.d(We,"c",function(){return m});var ae=z("+L6B"),Z=z("2/Rp"),U=z("tJVT"),w=z("k1fw"),P=z("jrin"),S=z("5NDa"),C=z("5rEg"),T=z("q1tI"),l=z.n(T),p=z("8Skl"),h=z("y3Kf"),d=z("bdLU"),o=z("J66h"),c=z.n(o),s=z("++UQ"),f=z.n(s),i=z("IxHN"),n=z("9Bee"),t=z("1vsH"),u,y=C.a.TextArea,g={visible:!1,tabIndex:"0"},_=(u={},Object(P.a)(u,d.a.NOMATCH,"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D"),Object(P.a)(u,d.a.OK,"\u8C03\u8BD5\u901A\u8FC7"),Object(P.a)(u,2,"\u8C03\u8BD5\u8D85\u65F6"),Object(P.a)(u,3,"\u8C03\u8BD5pod\u5931\u8D25"),Object(P.a)(u,4,"\u7F16\u8BD1\u5931\u8D25"),Object(P.a)(u,5,"\u6267\u884C\u5931\u8D25"),u),b;(function(a){a[a.SET_VISIBLE=0]="SET_VISIBLE",a[a.SET_TABINDEX=1]="SET_TABINDEX"})(b||(b={}));function v(a,x){switch(x.type){case b.SET_VISIBLE:return Object(w.a)(Object(w.a)({},a),{},{visible:x.payload});case b.SET_TABINDEX:return Object(w.a)(Object(w.a)({},a),{},{tabIndex:x.payload});default:throw new Error}}function m(a){var x=a.status,O=a.error_msg,A=a.output,D=a.input,I=a.expected_output,F=a.is_file,K=a.input_file_url,ne=a.output_file_url,j=a.expected_output_file_url,G=null,X={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(x){case d.a.NOMATCH:G=l.a.createElement(l.a.Fragment,null,l.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!F&&l.a.createElement(n.a,{value:D,style:X}),F&&l.a.createElement("div",{style:X},l.a.createElement("a",{onClick:function(){return Object(t.x)(K,D)}},D)),l.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!F&&l.a.createElement(n.a,{value:A&&o.Base64.decode(A)||"",style:X}),F&&l.a.createElement("div",{style:X},l.a.createElement("a",{onClick:function(){return Object(t.x)(ne,A)}},A)),l.a.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!F&&l.a.createElement(n.a,{value:I&&o.Base64.decode(I)||"",style:X}),F&&l.a.createElement("div",{style:X},l.a.createElement("a",{onClick:function(){return Object(t.x)(j,I)}},I)));break;case d.a.EXECUTEFAILURE:G=l.a.createElement(l.a.Fragment,null,l.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!F&&l.a.createElement(n.a,{value:D,style:X}),F&&l.a.createElement("div",{style:X},l.a.createElement("a",{onClick:function(){return Object(t.x)(K,D)}},D)),l.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),l.a.createElement("pre",{className:"error"},o.Base64.decode(O)));break;case d.a.COMPILEFAILURE:G=l.a.createElement(l.a.Fragment,null,l.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!F&&l.a.createElement(n.a,{value:D,style:X}),F&&l.a.createElement("div",{style:X},l.a.createElement("a",{onClick:function(){return Object(t.x)(K,D)}},D)),l.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),l.a.createElement("pre",{className:"error"},o.Base64.decode(O)));break;case d.a.PODFAILURE:G=l.a.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case d.a.TIMEOUT:G=l.a.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return l.a.createElement(l.a.Fragment,null," ",G," ")}function E(a){var x=a.status,O=a.error_msg,A=a.execute_time,D=a.output,I=a.input,F=a.expected_output,K=a.is_file,ne=a.input_file_url,j=a.output_file_url,G=a.expected_output_file_url,X=null;switch(x){case d.a.OK:X=l.a.createElement(l.a.Fragment,null,l.a.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",A),l.a.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),l.a.createElement("pre",null,o.Base64.decode(D)));break;case d.a.NOMATCH:X=l.a.createElement(l.a.Fragment,null,l.a.createElement("p",null,"\u8F93\u5165\uFF1A",l.a.createElement("pre",null,I)),l.a.createElement("p",null,"\u8F93\u51FA\uFF1A",D&&o.Base64.decode(D)),l.a.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",F&&o.Base64.decode(F)));break;case d.a.EXECUTEFAILURE:X=l.a.createElement(l.a.Fragment,null,l.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",l.a.createElement("pre",null,I)),l.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),l.a.createElement("pre",{className:"error"},o.Base64.decode(O)));break;case d.a.COMPILEFAILURE:X=l.a.createElement(l.a.Fragment,null,l.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",l.a.createElement("pre",null,I)),l.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),l.a.createElement("pre",{className:"error"},o.Base64.decode(O)));break;case d.a.PODFAILURE:X=l.a.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case d.a.TIMEOUT:X=l.a.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return l.a.createElement(l.a.Fragment,null," ",X," ")}We.b=function(a){var x=a.id,O=a.input,A=a.debuging,D=a.submitting,I=a.executingMessage,F=a.debugResult,K=a.onChangeInput,ne=a.onDebugCode,j=a.onSubmitCode,G=Object(T.useReducer)(v,g),X=Object(U.a)(G,2),J=X[0],B=X[1],Q=J.visible,ie=J.tabIndex;Object(T.useEffect)(function(){B({type:b.SET_VISIBLE,payload:!1})},[x]);function oe(pe){var Oe=pe.target.id;B({type:b.SET_TABINDEX,payload:Oe})}function xe(){B({type:b.SET_VISIBLE,payload:!Q})}var ye=Object(T.useMemo)(function(){if(F){var pe=F.status;return l.a.createElement(l.a.Fragment,null,E(F))}return null},[F]);function Ae(){B({type:b.SET_VISIBLE,payload:!0}),B({type:b.SET_TABINDEX,payload:"1"}),ne()}return l.a.createElement("div",{className:"test-case-panel"},l.a.createElement("div",{className:"test-case-panel-body ".concat(Q?"active":"")},l.a.createElement("ul",{className:"s-navs"},l.a.createElement("li",null,l.a.createElement("a",{className:ie==="0"?"active":"",id:"0",onClick:oe},"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B")),l.a.createElement("li",null,l.a.createElement("a",{className:ie==="1"?"active":"",id:"1",onClick:oe},"\u4EE3\u7801\u6267\u884C\u7ED3\u679C"))),l.a.createElement("div",{className:"tab-panel-body ".concat(ie==="0"?"":"hide")},l.a.createElement(y,{placeholder:"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D",value:O,onChange:K})),l.a.createElement("div",{className:"tab-panel-body ".concat(ie==="1"?"":"hide")},A?l.a.createElement(i.a,{message:I}):F?l.a.createElement("section",{style:{height:200}}," ",ye," "):l.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"))),l.a.createElement("a",{className:"btn-collapse ".concat(Q?"up":""),onClick:xe},Q?l.a.createElement(p.a,null):l.a.createElement(h.a,null)),l.a.createElement("footer",{className:"footer"},l.a.createElement("span",{style:{visibility:"hidden"}},"\u63A7\u5236\u53F0"),l.a.createElement("div",{className:"flex-container"},l.a.createElement(Z.a,{id:"oj-prev",className:"btn-blue",type:"ghost"},"\u4E0A\u4E00\u9898"),l.a.createElement(Z.a,{id:"oj-next",className:"btn-blue",type:"ghost"},"\u4E0B\u4E00\u9898"),l.a.createElement(Z.a,{className:"btn-green",type:"ghost",loading:A,onClick:Ae},"\u8C03\u8BD5\u4EE3\u7801"),l.a.createElement(Z.a,{type:"primary",loading:D,disabled:D,onClick:function(){B({type:b.SET_VISIBLE,payload:!1}),j()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},"S/kP":function($e,We,z){$e.exports=z.p+"static/time.a3dc82f3.svg"},"SA+Z":function($e,We,z){var ae=z("wTVA"),Z=z("EbDI"),U=z("ZhPi"),w=z("wkBT");function P(S){return ae(S)||Z(S)||U(S)||w()}$e.exports=P,$e.exports.__esModule=!0,$e.exports.default=$e.exports},SJMd:function($e,We){/** * @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 z,ae,Z,U=!1,w,P;window.PR_SHOULD_USE_CONTINUATION=!0;var S,C;(function(){var T=window,l=["break,continue,do,else,for,if,return,while"],p=[l,"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"],h=[p,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],d=[h,"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"],o=[h,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],c=[h,"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",f=[h,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],i="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",n=[l,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],t=[l,"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"],u=[l,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],y=[d,c,o,f,i,n,t,u],g=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,_="str",b="kwd",v="com",m="typ",E="lit",a="pun",x="pln",O="tag",A="dec",D="src",I="atn",F="atv",K="nocode",ne="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function j(ue){for(var ke=0,Ue=!1,Ye=!1,ee=0,M=ue.length;ee122||(he<65||_e>90||Xe.push([Math.max(65,_e)|32,Math.min(he,90)|32]),he<97||_e>122||Xe.push([Math.max(97,_e)&~32,Math.min(he,122)&~32]))}}Xe.sort(function(Ge,qe){return Ge[0]-qe[0]||qe[1]-Ge[1]});for(var ve=[],Ee=[],Ke=0;Kebe[0]&&(be[1]+1>be[0]&&Ve.push("-"),Ve.push(Y(be[1])))}return Ve.push("]"),Ve.join("")}function Re(Pe){for(var Ie=Pe.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),Xe=Ie.length,tt=[],Ve=0,Ke=0;Ve=2&&_e==="["?Ie[Ve]=me(Ne):_e!=="\\"&&(Ie[Ve]=Ne.replace(/[a-zA-Z]/g,function(Ee){var be=Ee.charCodeAt(0);return"["+String.fromCharCode(be&~32,be|32)+"]"}))}return Ie.join("")}for(var rt=[],ee=0,M=ue.length;ee=0;)Ue[rt.charAt(Pe)]=Re;var Ie=Re[1],Xe=""+Ie;V.hasOwnProperty(Xe)||($.push(Ie),V[Xe]=null)}$.push(/[\0-\uffff]/),Ye=j($)})();var ee=ke.length,M=function(N){for(var $=N.sourceCode,V=N.basePos,Y=N.sourceNode,me=[V,x],Re=0,rt=$.match(Ye)||[],Pe={},Ie=0,Xe=rt.length;Ie=5&&Ve.substring(0,5)==="lang-",Ne&&!(Ke&&typeof Ke[1]=="string")&&(Ne=!1,Ve=D),Ne||(Pe[tt]=Ve)}var he=Re;if(Re+=tt.length,!Ne)me.push(V+he,Ve);else{var ve=Ke[1],Ee=tt.indexOf(ve),be=Ee+ve.length;Ke[2]&&(be=tt.length-Ke[2].length,Ee=be-ve.length);var Ge=Ve.substring(5);X(Y,V+he,tt.substring(0,Ee),M,me),X(Y,V+he+Ee,ve,Oe(Ge,ve),me),X(Y,V+he+be,tt.substring(be),M,me)}}N.decorations=me};return M}function ie(ue){var ke=[],Ue=[];ue.tripleQuotedStrings?ke.push([_,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ue.multiLineStrings?ke.push([_,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):ke.push([_,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ue.verbatimStrings&&Ue.push([_,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Ye=ue.hashComments;Ye&&(ue.cStyleComments?(Ye>1?ke.push([v,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):ke.push([v,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Ue.push([_,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):ke.push([v,/^#[^\r\n]*/,null,"#"])),ue.cStyleComments&&(Ue.push([v,/^\/\/[^\r\n]*/,null]),Ue.push([v,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var ee=ue.regexLiterals;if(ee){var M=ee>1?"":` \r`,N=M?".":"[\\S\\s]",$="/(?=[^/*"+M+"])(?:[^/\\x5B\\x5C"+M+"]|\\x5C"+N+"|\\x5B(?:[^\\x5C\\x5D"+M+"]|\\x5C"+N+")*(?:\\x5D|$))+/";Ue.push(["lang-regex",RegExp("^"+ne+"("+$+")")])}var V=ue.types;V&&Ue.push([m,V]);var Y=(""+ue.keywords).replace(/^ | $/g,"");Y.length&&Ue.push([b,new RegExp("^(?:"+Y.replace(/[\s,]+/g,"|")+")\\b"),null]),ke.push([x,/^\s+/,null,` \r \xA0`]);var me="^.[^\\s\\w.$@'\"`/\\\\]*";return ue.regexLiterals&&(me+="(?!s*/)"),Ue.push([E,/^@[a-z_$][a-z_$@0-9]*/i,null],[m,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[x,/^[a-z_$][a-z_$@0-9]*/i,null],[E,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[x,/^\\[\s\S]?/,null],[a,new RegExp(me),null]),Q(ke,Ue)}var oe=ie({keywords:y,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function xe(ue,ke,Ue){for(var Ye=/(?:^|\s)nocode(?:\s|$)/,ee=/\r\n?|\n/,M=ue.ownerDocument,N=M.createElement("li");ue.firstChild;)N.appendChild(ue.firstChild);var $=[N];function V(Ie){var Xe=Ie.nodeType;if(Xe==1&&!Ye.test(Ie.className))if(Ie.nodeName==="br")Y(Ie),Ie.parentNode&&Ie.parentNode.removeChild(Ie);else for(var tt=Ie.firstChild;tt;tt=tt.nextSibling)V(tt);else if((Xe==3||Xe==4)&&Ue){var Ve=Ie.nodeValue,Ke=Ve.match(ee);if(Ke){var Ne=Ve.substring(0,Ke.index);Ie.nodeValue=Ne;var De=Ve.substring(Ke.index+Ke[0].length);if(De){var _e=Ie.parentNode;_e.insertBefore(M.createTextNode(De),Ie.nextSibling)}Y(Ie),Ne||Ie.parentNode.removeChild(Ie)}}}function Y(Ie){for(;!Ie.nextSibling;)if(Ie=Ie.parentNode,!Ie)return;function Xe(Ke,Ne){var De=Ne?Ke.cloneNode(!1):Ke,_e=Ke.parentNode;if(_e){var he=Xe(_e,1),ve=Ke.nextSibling;he.appendChild(De);for(var Ee=ve;Ee;Ee=ve)ve=Ee.nextSibling,he.appendChild(Ee)}return De}for(var tt=Xe(Ie.nextSibling,0),Ve;(Ve=tt.parentNode)&&Ve.nodeType===1;)tt=Ve;$.push(tt)}for(var me=0;me<$.length;++me)V($[me]);ke===(ke|0)&&$[0].setAttribute("value",ke);var Re=M.createElement("ol");Re.className="linenums";for(var rt=Math.max(0,ke-1|0)||0,me=0,Pe=$.length;me=_e&&(V+=2),M>=he&&(Re+=2)}}finally{Ve&&(Ve.style.display=Ke)}}var Ae={};function pe(ue,ke){for(var Ue=ke.length;--Ue>=0;){var Ye=ke[Ue];Ae.hasOwnProperty(Ye)?T.console&&console.warn("cannot override language handler %s",Ye):Ae[Ye]=ue}}function Oe(ue,ke){return ue&&Ae.hasOwnProperty(ue)||(ue=/^\s*]*(?:>|$)/],[v,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[a,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),pe(Q([[x,/^[\s]+/,null,` \r `],[F,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[O,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[I,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[a,/^[=<>\/]+/],["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"]),pe(Q([],[[F,/^[\s\S]+/]]),["uq.val"]),pe(ie({keywords:d,hashComments:!0,cStyleComments:!0,types:g}),["c","cc","cpp","cxx","cyc","m"]),pe(ie({keywords:"null,true,false"}),["json"]),pe(ie({keywords:c,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:g}),["cs"]),pe(ie({keywords:o,cStyleComments:!0}),["java"]),pe(ie({keywords:u,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),pe(ie({keywords:n,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),pe(ie({keywords:i,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),pe(ie({keywords:t,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),pe(ie({keywords:f,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),pe(ie({keywords:s,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),pe(Q([],[[_,/^[\s\S]+/]]),["regex"]);function Fe(ue){var ke=ue.langExtension;try{var Ue=G(ue.sourceNode,ue.pre),Ye=Ue.sourceCode;ue.sourceCode=Ye,ue.spans=Ue.spans,ue.basePos=0,Oe(ke,Ye)(ue),ye(ue)}catch(ee){T.console&&console.log(ee&&ee.stack||ee)}}function Me(ue,ke,Ue){var Ye=Ue||!1,ee=ke||null,M=document.createElement("div");M.innerHTML="
    "+ue+"
    ",M=M.firstChild,Ye&&xe(M,Ye,!0);var N={langExtension:ee,numberLines:Ye,sourceNode:M,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Fe(N),M.innerHTML}function Ce(ue,ke){var Ue=ke||document.body,Ye=Ue.ownerDocument||document;function ee(De){return Ue.getElementsByTagName(De)}for(var M=[ee("pre"),ee("code"),ee("xmp")],N=[],$=0;$=15&&(d=!1,l=!0);var _=t&&(p||d&&(g==null||g<12.11)),b=U||C&&T>=9;function v(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var m=function(e,r){var R=e.className,L=v(r).exec(R);if(L){var k=R.slice(L.index+L[0].length);e.className=R.slice(0,L.index)+(k?L[1]+k:"")}};function E(e){for(var r=e.childNodes.length;r>0;--r)e.removeChild(e.firstChild);return e}function a(e,r){return E(e).appendChild(r)}function x(e,r,R,L){var k=document.createElement(e);if(R&&(k.className=R),L&&(k.style.cssText=L),typeof r=="string")k.appendChild(document.createTextNode(r));else if(r)for(var H=0;H=r)return re+(r-H);re+=le-H,re+=R-re%R,H=le+1}}var J=function(){this.id=null,this.f=null,this.time=0,this.handler=j(this.onTimeout,this)};J.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},J.prototype.set=function(e,r){this.f=r;var R=+new Date+e;(!this.id||R=r)return L+Math.min(re,r-k);if(k+=H-L,k+=R-k%R,L=H+1,k>=r)return L}}var pe=[""];function Oe(e){for(;pe.length<=e;)pe.push(Fe(pe)+" ");return pe[e]}function Fe(e){return e[e.length-1]}function Me(e,r){for(var R=[],L=0;L"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ue.test(e))}function Ue(e,r){return r?r.source.indexOf("\\w")>-1&&ke(e)?!0:r.test(e):ke(e)}function Ye(e){for(var r in e)if(e.hasOwnProperty(r)&&e[r])return!1;return!0}var ee=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function M(e){return e.charCodeAt(0)>=768&&ee.test(e)}function N(e,r,R){for(;(R<0?r>0:rR?-1:1;;){if(r==R)return r;var k=(r+R)/2,H=L<0?Math.ceil(k):Math.floor(k);if(H==r)return e(H)?r:R;e(H)?R=H:r=H+L}}function V(e,r,R,L){if(!e)return L(r,R,"ltr",0);for(var k=!1,H=0;Hr||r==R&&re.to==r)&&(L(Math.max(re.from,r),Math.min(re.to,R),re.level==1?"rtl":"ltr",H),k=!0)}k||L(r,R,"ltr")}var Y=null;function me(e,r,R){var L;Y=null;for(var k=0;kr)return k;H.to==r&&(H.from!=H.to&&R=="before"?L=k:Y=k),H.from==r&&(H.from!=H.to&&R!="before"?L=k:Y=k)}return L!=null?L:Y}var Re=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function R(ge){return ge<=247?e.charAt(ge):1424<=ge&&ge<=1524?"R":1536<=ge&&ge<=1785?r.charAt(ge-1536):1774<=ge&&ge<=2220?"r":8192<=ge&&ge<=8203?"w":ge==8204?"b":"L"}var L=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,k=/[stwN]/,H=/[LRr]/,re=/[Lb1n]/,le=/[1n]/;function ce(ge,Be,ze){this.level=ge,this.from=Be,this.to=ze}return function(ge,Be){var ze=Be=="ltr"?"L":"R";if(ge.length==0||Be=="ltr"&&!L.test(ge))return!1;for(var at=ge.length,nt=[],_t=0;_t-1&&(L[r]=k.slice(0,H).concat(k.slice(H+1)))}}}function Ve(e,r){var R=Xe(e,r);if(!R.length)return;for(var L=Array.prototype.slice.call(arguments,2),k=0;k0}function _e(e){e.prototype.on=function(r,R){Ie(this,r,R)},e.prototype.off=function(r,R){tt(this,r,R)}}function he(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ve(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ee(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function be(e){he(e),ve(e)}function Ge(e){return e.target||e.srcElement}function qe(e){var r=e.which;return r==null&&(e.button&1?r=1:e.button&2?r=3:e.button&4&&(r=2)),t&&e.ctrlKey&&r==1&&(r=3),r}var pt=function(){if(C&&T<9)return!1;var e=x("div");return"draggable"in e||"dragDrop"in e}(),Pt;function Rt(e){if(Pt==null){var r=x("span","\u200B");a(e,x("span",[r,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Pt=r.offsetWidth<=1&&r.offsetHeight>2&&!(C&&T<8))}var R=Pt?x("span","\u200B"):x("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return R.setAttribute("cm-text",""),R}var Mt;function wt(e){if(Mt!=null)return Mt;var r=a(e,document.createTextNode("A\u062EA")),R=A(r,0,1).getBoundingClientRect(),L=A(r,1,2).getBoundingClientRect();return E(e),!R||R.left==R.right?!1:Mt=L.right-R.right<3}var lt=` b`.split(/\n/).length!=3?function(e){for(var r=0,R=[],L=e.length;r<=L;){var k=e.indexOf(` `,r);k==-1&&(k=e.length);var H=e.slice(r,e.charAt(k-1)=="\r"?k-1:k),re=H.indexOf("\r");re!=-1?(R.push(H.slice(0,re)),r+=re+1):(R.push(H),r=k+1)}return R}:function(e){return e.split(/\r\n?|\n/)},ft=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},Qe=function(){var e=x("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Te=null;function je(e){if(Te!=null)return Te;var r=a(e,x("span","x")),R=r.getBoundingClientRect(),L=A(r,0,1).getBoundingClientRect();return Te=Math.abs(R.left-L.left)>1}var ct={},Ze={};function Tt(e,r){arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),ct[e]=r}function Ot(e,r){Ze[e]=r}function st(e){if(typeof e=="string"&&Ze.hasOwnProperty(e))e=Ze[e];else if(e&&typeof e.name=="string"&&Ze.hasOwnProperty(e.name)){var r=Ze[e.name];typeof r=="string"&&(r={name:r}),e=de(r,e),e.name=r.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return st("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return st("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function gt(e,r){r=st(r);var R=ct[r.name];if(!R)return gt(e,"text/plain");var L=R(e,r);if(kt.hasOwnProperty(r.name)){var k=kt[r.name];for(var H in k){if(!k.hasOwnProperty(H))continue;L.hasOwnProperty(H)&&(L["_"+H]=L[H]),L[H]=k[H]}}if(L.name=r.name,r.helperType&&(L.helperType=r.helperType),r.modeProps)for(var re in r.modeProps)L[re]=r.modeProps[re];return L}var kt={};function Wt(e,r){var R=kt.hasOwnProperty(e)?kt[e]:kt[e]={};G(r,R)}function Qt(e,r){if(r===!0)return r;if(e.copyState)return e.copyState(r);var R={};for(var L in r){var k=r[L];k instanceof Array&&(k=k.concat([])),R[L]=k}return R}function we(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 fe(e,r,R){return e.startState?e.startState(r,R):!0}var W=function(e,r,R){this.pos=this.start=0,this.string=e,this.tabSize=r||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=R};W.prototype.eol=function(){return this.pos>=this.string.length},W.prototype.sol=function(){return this.pos==this.lineStart},W.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},W.prototype.next=function(){if(this.posr},W.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},W.prototype.skipToEnd=function(){this.pos=this.string.length},W.prototype.skipTo=function(e){var r=this.string.indexOf(e,this.pos);if(r>-1)return this.pos=r,!0},W.prototype.backUp=function(e){this.pos-=e},W.prototype.column=function(){return this.lastColumnPos0?null:(H&&r!==!1&&(this.pos+=H[0].length),H)}},W.prototype.current=function(){return this.string.slice(this.start,this.pos)},W.prototype.hideFirstChars=function(e,r){this.lineStart+=e;try{return r()}finally{this.lineStart-=e}},W.prototype.lookAhead=function(e){var r=this.lineOracle;return r&&r.lookAhead(e)},W.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function 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 k=R.children[L],H=k.chunkSize();if(r=e.first&&rR?it(R,q(e,R).text.length):cn(r,q(e,r.line).text.length)}function cn(e,r){var R=e.ch;return R==null||R>r?it(e.line,r):R<0?it(e.line,0):e}function bn(e,r){for(var R=[],L=0;Lthis.maxLookAhead&&(this.maxLookAhead=e),r},dn.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}},dn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},dn.fromSaved=function(e,r,R){return r instanceof sn?new dn(e,Qt(e.mode,r.state),R,r.lookAhead):new dn(e,Qt(e.mode,r),R)},dn.prototype.save=function(e){var r=e!==!1?Qt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new sn(r,this.maxLookAhead):r};function Nn(e,r,R,L){var k=[e.state.modeGen],H={};jn(e,r.text,e.doc.mode,R,function(ge,Be){return k.push(ge,Be)},H,L);for(var re=R.state,le=function(ge){R.baseTokens=k;var Be=e.state.overlays[ge],ze=1,at=0;R.state=!0,jn(e,r.text,Be.mode,R,function(nt,_t){for(var At=ze;atnt&&k.splice(ze,1,nt,k[ze+1],It),ze+=2,at=Math.min(nt,It)}if(!_t)return;if(Be.opaque)k.splice(At,ze-At,nt,"overlay "+_t),ze=At+2;else for(;Ate.options.maxHighlightLength&&Qt(e.doc.mode,L.state),H=Nn(e,r,L);k&&(L.state=k),r.stateAfter=L.save(!k),r.styles=H.styles,H.classes?r.styleClasses=H.classes:r.styleClasses&&(r.styleClasses=null),R===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return r.styles}function et(e,r,R){var L=e.doc,k=e.display;if(!L.mode.startState)return new dn(L,!0,r);var H=cr(e,r,R),re=H>L.first&&q(L,H-1).stateAfter,le=re?dn.fromSaved(L,re,H):new dn(L,fe(L.mode),H);return L.iter(H,r,function(ce){Ut(e,ce.text,le);var ge=le.line;ce.stateAfter=ge==r-1||ge%5==0||ge>=k.viewFrom&&ger.start)return H}throw new Error("Mode "+e.name+" failed to advance stream.")}var En=function(e,r,R){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=r||null,this.state=R};function sr(e,r,R,L){var k=e.doc,H=k.mode,re;r=mt(k,r);var le=q(k,r.line),ce=et(e,r.line,R),ge=new W(le.text,e.options.tabSize,ce),Be;for(L&&(Be=[]);(L||ge.pose.options.maxHighlightLength?(le=!1,re&&Ut(e,r,L,Be.pos),Be.pos=r.length,ze=null):ze=nr(Vt(R,Be,L.state,at),H),at){var nt=at[0].name;nt&&(ze="m-"+(ze?nt+" "+ze:nt))}if(!le||ge!=ze){for(;cere;--le){if(le<=H.first)return H.first;var ce=q(H,le-1),ge=ce.stateAfter;if(ge&&(!R||le+(ge instanceof sn?ge.lookAhead:0)<=H.modeFrontier))return le;var Be=X(ce.text,null,e.options.tabSize);(k==null||L>Be)&&(k=le-1,L=Be)}return k}function qn(e,r){if(e.modeFrontier=Math.min(e.modeFrontier,r),e.highlightFrontierR;L--){var k=q(e,L).stateAfter;if(k&&(!(k instanceof sn)||L+k.lookAhead=r:H.to>r);(L||(L=[])).push(new Vr(re,H.from,ce?null:H.to))}}return L}function ri(e,r,R){var L;if(e)for(var k=0;k=r:H.to>r);if(le||H.from==r&&re.type=="bookmark"&&(!R||H.marker.insertLeft)){var ce=H.from==null||(re.inclusiveLeft?H.from<=r:H.from0&&le)for(var tn=0;tn0)continue;var Be=[ce,1],ze=St(ge.from,le.from),at=St(ge.to,le.to);(ze<0||!re.inclusiveLeft&&!ze)&&Be.push({from:ge.from,to:le.from}),(at>0||!re.inclusiveRight&&!at)&&Be.push({from:le.to,to:ge.to}),k.splice.apply(k,Be),ce+=Be.length-3}return k}function si(e){var r=e.markedSpans;if(!r)return;for(var R=0;Rr)&&(!L||ii(L,H.marker)<0)&&(L=H.marker)}return L}function ca(e,r,R,L,k){var H=q(e,r),re=_r&&H.markedSpans;if(re)for(var le=0;le=0&&ze<=0||Be<=0&&ze>=0)continue;if(Be<=0&&(ce.marker.inclusiveRight&&k.inclusiveLeft?St(ge.to,R)>=0:St(ge.to,R)>0)||Be>=0&&(ce.marker.inclusiveRight&&k.inclusiveLeft?St(ge.from,L)<=0:St(ge.from,L)<0))return!0}}function hi(e){for(var r;r=Ni(e);)e=r.find(-1,!0).line;return e}function Zi(e){for(var r;r=wi(e);)e=r.find(1,!0).line;return e}function ln(e){for(var r,R;r=wi(e);)e=r.find(1,!0).line,(R||(R=[])).push(e);return R}function Tn(e,r){var R=q(e,r),L=hi(R);return R==L?r:He(L)}function On(e,r){if(r>e.lastLine())return r;var R=q(e,r),L;if(!rr(e,R))return r;for(;L=wi(R);)R=L.find(1,!0).line;return He(R)+1}function rr(e,r){var R=_r&&r.markedSpans;if(R)for(var L=void 0,k=0;kr.maxLineLength&&(r.maxLineLength=k,r.maxLine=L)})}var xr=function(e,r,R){this.text=e,fi(this,r),this.height=R?R(this):1};xr.prototype.lineNo=function(){return He(this)},_e(xr);function pi(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),fi(e,R);var k=L?L(e):1;k!=e.height&&Se(e,k)}function Or(e){e.parent=null,si(e)}var Ai={},Dr={};function mi(e,r){if(!e||/^\s*$/.test(e))return null;var R=r.addModeClass?Dr:Ai;return R[e]||(R[e]=e.replace(/\S+/g,"cm-$&"))}function vi(e,r){var R=O("span",null,null,l?"padding-right: .1px":null),L={pre:O("pre",[R],"CodeMirror-line"),content:R,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};r.measure={};for(var k=0;k<=(r.rest?r.rest.length:0);k++){var H=k?r.rest[k-1]:r.line,re=void 0;L.pos=0,L.addToken=Ma,wt(e.display.measure)&&(re=rt(H,e.doc.direction))&&(L.addToken=Mn(L.addToken,re)),L.map=[];var le=r!=e.display.externalMeasured&&He(H);da(H,L,Kt(e,H,le)),H.styleClasses&&(H.styleClasses.bgClass&&(L.bgClass=K(H.styleClasses.bgClass,L.bgClass||"")),H.styleClasses.textClass&&(L.textClass=K(H.styleClasses.textClass,L.textClass||""))),L.map.length==0&&L.map.push(0,0,L.content.appendChild(Rt(e.display.measure))),k==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(l){var ce=L.content.lastChild;(/\bcm-tab\b/.test(ce.className)||ce.querySelector&&ce.querySelector(".cm-tab"))&&(L.content.className="cm-tab-wrap-hack")}return Ve(e,"renderLine",e,r.line,L.pre),L.pre.className&&(L.textClass=K(L.pre.className,L.textClass||"")),L}function Yi(e){var r=x("span","\u2022","cm-invalidchar");return r.title="\\u"+e.charCodeAt(0).toString(16),r.setAttribute("aria-label",r.title),r}function Ma(e,r,R,L,k,H,re){if(!r)return;var le=e.splitSpaces?ba(r,e.trailingSpace):r,ce=e.cm.state.specialChars,ge=!1,Be;if(!ce.test(r))e.col+=r.length,Be=document.createTextNode(le),e.map.push(e.pos,e.pos+r.length,Be),C&&T<9&&(ge=!0),e.pos+=r.length;else{Be=document.createDocumentFragment();for(var ze=0;;){ce.lastIndex=ze;var at=ce.exec(r),nt=at?at.index-ze:r.length-ze;if(nt){var _t=document.createTextNode(le.slice(ze,ze+nt));C&&T<9?Be.appendChild(x("span",[_t])):Be.appendChild(_t),e.map.push(e.pos,e.pos+nt,_t),e.col+=nt,e.pos+=nt}if(!at)break;ze+=nt+1;var At=void 0;if(at[0]==" "){var It=e.cm.options.tabSize,zt=It-e.col%It;At=Be.appendChild(x("span",Oe(zt),"cm-tab")),At.setAttribute("role","presentation"),At.setAttribute("cm-text"," "),e.col+=zt}else at[0]=="\r"||at[0]==` `?(At=Be.appendChild(x("span",at[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),At.setAttribute("cm-text",at[0]),e.col+=1):(At=e.cm.options.specialCharPlaceholder(at[0]),At.setAttribute("cm-text",at[0]),C&&T<9?Be.appendChild(x("span",[At])):Be.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||k||ge||H||re){var Zt=R||"";L&&(Zt+=L),k&&(Zt+=k);var Gt=x("span",[Be],Zt,H);if(re)for(var tn in re)re.hasOwnProperty(tn)&&tn!="style"&&tn!="class"&&Gt.setAttribute(tn,re[tn]);return e.content.appendChild(Gt)}e.content.appendChild(Be)}function ba(e,r){if(e.length>1&&!/ /.test(e))return e;for(var R=r,L="",k=0;kge&&ze.from<=ge);at++);if(ze.to>=Be)return e(R,L,k,H,re,le,ce);e(R,L.slice(0,ze.to-ge),k,H,null,le,ce),H=null,L=L.slice(ze.to-ge),ge=ze.to}}}function zi(e,r,R,L){var k=!L&&R.widgetNode;k&&e.map.push(e.pos,e.pos+r,k),!L&&e.cm.display.input.needsContentAttribute&&(k||(k=e.content.appendChild(document.createElement("span"))),k.setAttribute("cm-marker",R.id)),k&&(e.cm.display.input.setUneditable(k),e.content.appendChild(k)),e.pos+=r,e.trailingSpace=!1}function da(e,r,R){var L=e.markedSpans,k=e.text,H=0;if(!L){for(var re=1;rece||Vn.collapsed&&mn.to==ce&&mn.from==ce)){if(mn.to!=null&&mn.to!=ce&&nt>mn.to&&(nt=mn.to,At=""),Vn.className&&(_t+=" "+Vn.className),Vn.css&&(at=(at?at+";":"")+Vn.css),Vn.startStyle&&mn.from==ce&&(It+=" "+Vn.startStyle),Vn.endStyle&&mn.to==nt&&(tn||(tn=[])).push(Vn.endStyle,mn.to),Vn.title&&((Zt||(Zt={})).title=Vn.title),Vn.attributes)for(var Sr in Vn.attributes)(Zt||(Zt={}))[Sr]=Vn.attributes[Sr];Vn.collapsed&&(!zt||ii(zt.marker,Vn)<0)&&(zt=mn)}else mn.from>ce&&nt>mn.from&&(nt=mn.from)}if(tn)for(var Zr=0;Zr=le)break;for(var Ci=Math.min(le,nt);;){if(Be){var bi=ce+Be.length;if(!zt){var zr=bi>Ci?Be.slice(0,Ci-ce):Be;r.addToken(r,zr,ze?ze+_t:_t,It,ce+zr.length==nt?At:"",at,Zt)}if(bi>=Ci){Be=Be.slice(Ci-ce),ce=Ci;break}ce=bi,It=""}Be=k.slice(H,H=R[ge++]),ze=mi(R[ge++],r.cm.options)}}}function _a(e,r,R){this.line=r,this.rest=ln(r),this.size=this.rest?He(Fe(this.rest))-R+1:1,this.node=this.text=null,this.hidden=rr(e,r)}function $i(e,r,R){for(var L=[],k,H=r;H2&&H.push((ce.bottom+ge.top)/2-R.top)}}H.push(R.bottom-R.top)}}function or(e,r,R){if(e.line==r)return{map:e.measure.map,cache:e.measure.cache};for(var L=0;LR)return{map:e.measure.maps[k],cache:e.measure.caches[k],before:!0}}function kn(e,r){r=hi(r);var R=He(r),L=e.display.externalMeasured=new _a(e.doc,r,R);L.lineN=R;var k=L.built=vi(e,L);return L.text=k.pre,a(e.display.lineMeasure,k.pre),L}function Ft(e,r,R,L){return Zn(e,Yn(e,r),R,L)}function fn(e,r){if(r>=e.display.viewFrom&&r=R.lineN&&rr)&&(H=ce-le,k=H-1,r>=ce&&(re="right")),k!=null){if(L=e[ge+2],le==ce&&R==(L.insertLeft?"left":"right")&&(re=R),R=="left"&&k==0)for(;ge&&e[ge-2]==e[ge-3]&&e[ge-1].insertLeft;)L=e[(ge-=3)+2],re="left";if(R=="right"&&k==ce-le)for(;ge=0&&!((R=e[k]).left!=R.right);k--);return R}function hn(e,r,R,L){var k=zn(r.map,R,L),H=k.node,re=k.start,le=k.end,ce=k.collapse,ge;if(H.nodeType==3){for(var Be=0;Be<4;Be++){for(;re&&M(r.line.text.charAt(k.coverStart+re));)--re;for(;k.coverStart+le0&&(ce=L="right");var ze;e.options.lineWrapping&&(ze=H.getClientRects()).length>1?ge=ze[L=="right"?ze.length-1:0]:ge=H.getBoundingClientRect()}if(C&&T<9&&!re&&(!ge||!ge.left&&!ge.right)){var at=H.parentNode.getClientRects()[0];at?ge={left:at.left,right:at.left+Wn(e.display),top:at.top,bottom:at.bottom}:ge=ur}for(var nt=ge.top-r.rect.top,_t=ge.bottom-r.rect.top,At=(nt+_t)/2,It=r.view.measure.heights,zt=0;zt=L.text.length?(ce=L.text.length,ge="before"):ce<=0&&(ce=0,ge="after"),!le)return re(ge=="before"?ce-1:ce,ge=="before");function Be(_t,At,It){var zt=le[At],Zt=zt.level==1;return re(It?_t-1:_t,Zt!=It)}var ze=me(le,ce,ge),at=Y,nt=Be(ce,ze,ge=="before");return at!=null&&(nt.other=Be(ce,at,ge!="before")),nt}function er(e,r){var R=0;r=mt(e.doc,r),e.options.lineWrapping||(R=Wn(e.display)*r.ch);var L=q(e.doc,r.line),k=pr(L)+Fn(e.display);return{left:R,right:R,top:k,bottom:k+L.height}}function fr(e,r,R,L,k){var H=it(e,r,R);return H.xRel=k,L&&(H.outside=L),H}function wr(e,r,R){var L=e.doc;if(R+=e.display.viewOffset,R<0)return fr(L.first,0,null,-1,-1);var k=Je(L,R),H=L.first+L.size-1;if(k>H)return fr(L.first+L.size-1,q(L,H).text.length,null,1,1);r<0&&(r=0);for(var re=q(L,k);;){var le=Mi(e,re,k,r,R),ce=ua(re,le.ch+(le.xRel>0||le.outside>0?1:0));if(!ce)return le;var ge=ce.find(1);if(ge.line==k)return ge;re=q(L,k=ge.line)}}function Yr(e,r,R,L){L-=In(r);var k=r.text.length,H=$(function(re){return Zn(e,R,re-1).bottom<=L},k,0);return k=$(function(re){return Zn(e,R,re).top>L},H,k),{begin:H,end:k}}function Li(e,r,R,L){R||(R=Yn(e,r));var k=pn(e,r,Zn(e,R,L),"line").top;return Yr(e,r,R,k)}function Kr(e,r,R,L){return e.bottom<=R?!1:e.top>R?!0:(L?e.left:e.right)>r}function Mi(e,r,R,L,k){k-=pr(r);var H=Yn(e,r),re=In(r),le=0,ce=r.text.length,ge=!0,Be=rt(r,e.doc.direction);if(Be){var ze=(e.options.lineWrapping?Ui:qi)(e,r,R,H,Be,L,k);ge=ze.level!=1,le=ge?ze.from:ze.to-1,ce=ge?ze.to:ze.from-1}var at=null,nt=null,_t=$(function(Sn){var mn=Zn(e,H,Sn);return mn.top+=re,mn.bottom+=re,Kr(mn,L,k,!1)?(mn.top<=k&&mn.left<=L&&(at=Sn,nt=mn),!0):!1},le,ce),At,It,zt=!1;if(nt){var Zt=L-nt.left=tn.bottom?1:0}return _t=N(r.text,_t,1),fr(R,_t,It,zt,L-At)}function qi(e,r,R,L,k,H,re){var le=$(function(ze){var at=k[ze],nt=at.level!=1;return Kr(Bn(e,it(R,nt?at.to:at.from,nt?"before":"after"),"line",r,L),H,re,!0)},0,k.length-1),ce=k[le];if(le>0){var ge=ce.level!=1,Be=Bn(e,it(R,ge?ce.from:ce.to,ge?"after":"before"),"line",r,L);Kr(Be,H,re,!0)&&Be.top>re&&(ce=k[le-1])}return ce}function Ui(e,r,R,L,k,H,re){var le=Yr(e,r,L,re),ce=le.begin,ge=le.end;/\s/.test(r.text.charAt(ge-1))&&ge--;for(var Be=null,ze=null,at=0;at=ge||nt.to<=ce)continue;var _t=nt.level!=1,At=Zn(e,L,_t?Math.min(ge,nt.to)-1:Math.max(ce,nt.from)).right,It=AtIt)&&(Be=nt,ze=It)}return Be||(Be=k[k.length-1]),Be.fromge&&(Be={from:Be.from,to:ge,level:Be.level}),Be}var ti;function ji(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(ti==null){ti=x("pre",null,"CodeMirror-line-like");for(var r=0;r<49;++r)ti.appendChild(document.createTextNode("x")),ti.appendChild(x("br"));ti.appendChild(document.createTextNode("x"))}a(e.measure,ti);var R=ti.offsetHeight/50;return R>3&&(e.cachedTextHeight=R),E(e.measure),R||1}function Wn(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var r=x("span","xxxxxxxxxx"),R=x("pre",[r],"CodeMirror-line-like");a(e.measure,R);var L=r.getBoundingClientRect(),k=(L.right-L.left)/10;return k>2&&(e.cachedCharWidth=k),k||10}function xn(e){for(var r=e.display,R={},L={},k=r.gutters.clientLeft,H=r.gutters.firstChild,re=0;H;H=H.nextSibling,++re){var le=e.display.gutterSpecs[re].className;R[le]=H.offsetLeft+H.clientLeft+k,L[le]=H.clientWidth}return{fixedPos:$n(r),gutterTotalWidth:r.gutters.offsetWidth,gutterLeft:R,gutterWidth:L,wrapperWidth:r.wrapper.clientWidth}}function $n(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function tr(e){var r=ji(e.display),R=e.options.lineWrapping,L=R&&Math.max(5,e.display.scroller.clientWidth/Wn(e.display)-3);return function(k){if(rr(e.doc,k))return 0;var H=0;if(k.widgets)for(var re=0;re0&&(ge=q(e.doc,ce.line).text).length==ce.ch){var Be=X(ge,ge.length,e.options.tabSize)-ge.length;ce=it(ce.line,Math.max(0,Math.round((H-Qn(e.display).left)/Wn(e.display))-Be))}return ce}function qr(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;Lr)&&(k.updateLineNumbers=r),e.curOp.viewChanged=!0,r>=k.viewTo)_r&&Tn(e.doc,r)k.viewFrom?gi(e):(k.viewFrom+=L,k.viewTo+=L);else if(r<=k.viewFrom&&R>=k.viewTo)gi(e);else if(r<=k.viewFrom){var H=Ri(e,R,R+L,1);H?(k.view=k.view.slice(H.index),k.viewFrom=H.lineN,k.viewTo+=L):gi(e)}else if(R>=k.viewTo){var re=Ri(e,r,r,-1);re?(k.view=k.view.slice(0,re.index),k.viewTo=re.lineN):gi(e)}else{var le=Ri(e,r,r,-1),ce=Ri(e,R,R+L,1);le&&ce?(k.view=k.view.slice(0,le.index).concat($i(e,le.lineN,ce.lineN)).concat(k.view.slice(ce.index)),k.viewTo+=L):gi(e)}var ge=k.externalMeasured;ge&&(R=k.lineN&&r=L.viewTo)return;var H=L.view[qr(e,r)];if(H.node==null)return;var re=H.changes||(H.changes=[]);B(re,R)==-1&&re.push(R)}function gi(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Ri(e,r,R,L){var k=qr(e,r),H,re=e.display.view;if(!_r||R==e.doc.first+e.doc.size)return{index:k,lineN:R};for(var le=e.display.viewFrom,ce=0;ce0){if(k==re.length-1)return null;H=le+re[k].size-r,k++}else H=le-r;r+=H,R+=H}for(;Tn(e.doc,R)!=R;){if(k==(L<0?0:re.length-1))return null;R+=L*re[k-(L<0?1:0)].size,k+=L}return{index:k,lineN:R}}function Fi(e,r,R){var L=e.display,k=L.view;k.length==0||r>=L.viewTo||R<=L.viewFrom?(L.view=$i(e,r,R),L.viewFrom=r):(L.viewFrom>r?L.view=$i(e,r,L.viewFrom).concat(L.view):L.viewFromR&&(L.view=L.view.slice(0,qr(e,R)))),L.viewTo=R}function Un(e){for(var r=e.display.view,R=0,L=0;L=e.display.viewTo||le.to().line0?r.blinker=setInterval(function(){e.hasFocus()||ki(e),r.cursorDiv.style.visibility=(R=!R)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(r.cursorDiv.style.visibility="hidden")}function Fr(e){e.state.focused||(e.display.input.focus(),un(e))}function fa(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,ki(e))},100)}function un(e,r){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Ve(e,"focus",e,r),e.state.focused=!0,F(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),l&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),jr(e)}function ki(e,r){if(e.state.delayingBlurEvent)return;e.state.focused&&(Ve(e,"blur",e,r),e.state.focused=!1,m(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function ea(e){for(var r=e.display,R=r.lineDiv.offsetTop,L=0;L.005||Be<-.005)&&(Se(k.line,re),Bi(k.line),k.rest))for(var ze=0;zee.display.sizerWidth){var at=Math.ceil(le/Wn(e.display));at>e.display.maxLineLength&&(e.display.maxLineLength=at,e.display.maxLine=k.line,e.display.maxLineChanged=!0)}}}function Bi(e){if(e.widgets)for(var r=0;r=re&&(H=Je(r,pr(q(r,ce))-e.wrapper.clientHeight),re=ce)}return{from:H,to:Math.max(re,H+1)}}function Wi(e,r){if(Ke(e,"scrollCursorIntoView"))return;var R=e.display,L=R.sizer.getBoundingClientRect(),k=null;if(r.top+L.top<0?k=!0:r.bottom+L.top>(window.innerHeight||document.documentElement.clientHeight)&&(k=!1),k!=null&&!s){var H=x("div","\u200B",null,`position: absolute; top: `+(r.top-R.viewOffset-Fn(e.display))+`px; height: `+(r.bottom-r.top+ir(e)+R.barHeight)+`px; left: `+r.left+"px; width: "+Math.max(2,r.right-r.left)+"px;");e.display.lineSpace.appendChild(H),H.scrollIntoView(k),e.display.lineSpace.removeChild(H)}}function ta(e,r,R,L){L==null&&(L=0);var k;!e.options.lineWrapping&&r==R&&(r=r.ch?it(r.line,r.sticky=="before"?r.ch-1:r.ch,"after"):r,R=r.sticky=="before"?it(r.line,r.ch+1,"before"):r);for(var H=0;H<5;H++){var re=!1,le=Bn(e,r),ce=!R||R==r?le:Bn(e,R);k={left:Math.min(le.left,ce.left),top:Math.min(le.top,ce.top)-L,right:Math.max(le.left,ce.left),bottom:Math.max(le.bottom,ce.bottom)+L};var ge=Vi(e,k),Be=e.doc.scrollTop,ze=e.doc.scrollLeft;if(ge.scrollTop!=null&&(Ua(e,ge.scrollTop),Math.abs(e.doc.scrollTop-Be)>1&&(re=!0)),ge.scrollLeft!=null&&(ha(e,ge.scrollLeft),Math.abs(e.doc.scrollLeft-ze)>1&&(re=!0)),!re)break}return k}function na(e,r){var R=Vi(e,r);R.scrollTop!=null&&Ua(e,R.scrollTop),R.scrollLeft!=null&&ha(e,R.scrollLeft)}function Vi(e,r){var R=e.display,L=ji(e.display);r.top<0&&(r.top=0);var k=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:R.scroller.scrollTop,H=mr(e),re={};r.bottom-r.top>H&&(r.bottom=r.top+H);var le=e.doc.height+yr(R),ce=r.tople-L;if(r.topk+H){var Be=Math.min(r.top,(ge?le:r.bottom)-H);Be!=k&&(re.scrollTop=Be)}var ze=e.options.fixedGutter?0:R.gutters.offsetWidth,at=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:R.scroller.scrollLeft-ze,nt=lr(e)-R.gutters.offsetWidth,_t=r.right-r.left>nt;return _t&&(r.right=r.left+nt),r.left<10?re.scrollLeft=0:r.leftnt+at-3&&(re.scrollLeft=r.right+(_t?0:10)-nt),re}function Ia(e,r){if(r==null)return;no(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+r}function Ar(e){no(e);var r=e.getCursor();e.curOp.scrollToPos={from:r,to:r,margin:e.options.cursorScrollMargin}}function Na(e,r,R){(r!=null||R!=null)&&no(e),r!=null&&(e.curOp.scrollLeft=r),R!=null&&(e.curOp.scrollTop=R)}function Js(e,r){no(e),e.curOp.scrollToPos=r}function no(e){var r=e.curOp.scrollToPos;if(r){e.curOp.scrollToPos=null;var R=er(e,r.from),L=er(e,r.to);Wo(e,R,L,r.margin)}}function Wo(e,r,R,L){var k=Vi(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});Na(e,k.scrollLeft,k.scrollTop)}function Ua(e,r){if(Math.abs(e.doc.scrollTop-r)<2)return;U||_o(e,{top:r}),Ko(e,r,!0),U&&_o(e),Ba(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 ha(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 ja(e){var r=e.display,R=r.gutters.offsetWidth,L=Math.round(e.doc.height+yr(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+ir(e)+r.barHeight,nativeBarWidth:r.nativeBarWidth,gutterWidth:R}}var pa=function(e,r,R){this.cm=R;var L=this.vert=x("div",[x("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),k=this.horiz=x("div",[x("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");L.tabIndex=k.tabIndex=-1,e(L),e(k),Ie(L,"scroll",function(){L.clientHeight&&r(L.scrollTop,"vertical")}),Ie(k,"scroll",function(){k.clientWidth&&r(k.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,C&&T<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};pa.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 k=e.viewHeight-(r?L:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+k)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(r){this.horiz.style.display="block",this.horiz.style.right=R?L+"px":"0",this.horiz.style.left=e.barLeft+"px";var H=e.viewWidth-e.barLeft-(R?L:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+H)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(L==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:R?L:0,bottom:r?L:0}},pa.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},pa.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},pa.prototype.zeroWidthHack=function(){var e=t&&!c?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new J,this.disableVert=new J},pa.prototype.enableZeroWidthBar=function(e,r,R){e.style.pointerEvents="auto";function L(){var k=e.getBoundingClientRect(),H=R=="vert"?document.elementFromPoint(k.right-1,(k.top+k.bottom)/2):document.elementFromPoint((k.right+k.left)/2,k.bottom-1);H!=e?e.style.pointerEvents="none":r.set(1e3,L)}r.set(1e3,L)},pa.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Fa=function(){};Fa.prototype.update=function(){return{bottom:0,right:0}},Fa.prototype.setScrollLeft=function(){},Fa.prototype.setScrollTop=function(){},Fa.prototype.clear=function(){};function Ea(e,r){r||(r=ja(e));var R=e.display.barWidth,L=e.display.barHeight;Ho(e,r);for(var k=0;k<4&&R!=e.display.barWidth||L!=e.display.barHeight;k++)R!=e.display.barWidth&&e.options.lineWrapping&&ea(e),Ho(e,ja(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:pa,null:Fa};function Go(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&m(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),Ie(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"?ha(e,r):Ua(e,r)},e),e.display.scrollbars.addClass&&F(e.display.wrapper,e.display.scrollbars.addClass)}var Zs=0;function ma(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},ka(e.curOp)}function va(e){var r=e.curOp;r&&ut(r,function(R){for(var L=0;L=R.viewTo)||R.maxLineChanged&&r.options.lineWrapping,e.update=e.mustUpdate&&new ro(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&&ea(r),e.barMeasure=ja(r),R.maxLineChanged&&!r.options.lineWrapping&&(e.adjustWidthTo=Ft(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+ir(r)+r.display.barWidth),e.maxScrollLeft=Math.max(0,R.sizer.offsetLeft+e.adjustWidthTo-lr(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=e.display.viewTo)return;var R=+new Date+e.options.workTime,L=et(e,r.highlightFrontier),k=[];r.iter(L.line,Math.min(r.first+r.size,e.display.viewTo+500),function(H){if(L.line>=e.display.viewFrom){var re=H.styles,le=H.text.length>e.options.maxHighlightLength?Qt(r.mode,L.state):null,ce=Nn(e,H,L,!0);le&&(L.state=le),H.styles=ce.styles;var ge=H.styleClasses,Be=ce.classes;Be?H.styleClasses=Be:ge&&(H.styleClasses=null);for(var ze=!re||re.length!=H.styles.length||ge!=Be&&(!ge||!Be||ge.bgClass!=Be.bgClass||ge.textClass!=Be.textClass),at=0;!ze&&atR)return Ba(e,e.options.workDelay),!0}),r.highlightFrontier=L.line,r.modeFrontier=Math.max(r.modeFrontier,L.line),k.length&&Ti(e,function(){for(var H=0;H=R.viewFrom&&r.visible.to<=R.viewTo&&(R.updateLineNumbers==null||R.updateLineNumbers>=R.viewTo)&&R.renderedView==R.view&&Un(e)==0)return!1;Yo(e)&&(gi(e),r.dims=xn(e));var k=L.first+L.size,H=Math.max(r.visible.from-e.options.viewportMargin,L.first),re=Math.min(k,r.visible.to+e.options.viewportMargin);R.viewFromre&&R.viewTo-re<20&&(re=Math.min(k,R.viewTo)),_r&&(H=Tn(e.doc,H),re=On(e.doc,re));var le=H!=R.viewFrom||re!=R.viewTo||R.lastWrapHeight!=r.wrapperHeight||R.lastWrapWidth!=r.wrapperWidth;Fi(e,H,re),R.viewOffset=pr(q(e.doc,R.viewFrom)),e.display.mover.style.top=R.viewOffset+"px";var ce=Un(e);if(!le&&ce==0&&!r.force&&R.renderedView==R.view&&(R.updateLineNumbers==null||R.updateLineNumbers>=R.viewTo))return!1;var ge=ll(e);return ce>4&&(R.lineDiv.style.display="none"),cl(e,R.updateLineNumbers,r.dims),ce>4&&(R.lineDiv.style.display=""),R.renderedView=R.view,ul(ge),E(R.cursorDiv),E(R.selectionDiv),R.gutters.style.height=R.sizer.style.minHeight=0,le&&(R.lastWrapHeight=r.wrapperHeight,R.lastWrapWidth=r.wrapperWidth,Ba(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==lr(e)){if(R&&R.top!=null&&(R={top:Math.min(e.doc.height+yr(e.display)-mr(e),R.top)}),r.visible=Ii(e.display,e.doc,R),r.visible.from>=e.display.viewFrom&&r.visible.to<=e.display.viewTo)break}else L&&(r.visible=Ii(e.display,e.doc,R));if(!bo(e,r))break;ea(e);var k=ja(e);yn(e),Ea(e,k),xo(e,k),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 ro(e,r);if(bo(e,R)){ea(e),Vo(e,R);var L=ja(e);yn(e),Ea(e,L),xo(e,L),R.finish()}}function cl(e,r,R){var L=e.display,k=e.options.lineNumbers,H=L.lineDiv,re=H.firstChild;function le(_t){var At=_t.nextSibling;return l&&t&&e.display.currentWheelTarget==_t?_t.style.display="none":_t.parentNode.removeChild(_t),At}for(var ce=L.view,ge=L.viewFrom,Be=0;Be-1&&(nt=!1),an(e,ze,ge,R)),nt&&(E(ze.lineNumber),ze.lineNumber.appendChild(document.createTextNode(Ct(e.options,ge)))),re=ze.node.nextSibling}ge+=ze.size}for(;re;)re=le(re)}function Eo(e){var r=e.gutters.offsetWidth;e.sizer.style.marginLeft=r+"px"}function xo(e,r){e.display.sizer.style.minHeight=r.docHeight+"px",e.display.heightForcer.style.top=r.docHeight+"px",e.display.gutters.style.height=r.docHeight+e.display.barHeight+ir(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=$n(r)-r.scroller.scrollLeft+e.doc.scrollLeft,k=r.gutters.offsetWidth,H=L+"px",re=0;rere.clientWidth,ce=re.scrollHeight>re.clientHeight;if(!(L&&le||k&&ce))return;if(k&&t&&l){e:for(var ge=r.target,Be=H.view;ge!=re;ge=ge.parentNode)for(var ze=0;ze=0&&St(e,L.to())<=0)return R}return-1};var hr=function(e,r){this.anchor=e,this.head=r};hr.prototype.from=function(){return Jt(this.anchor,this.head)},hr.prototype.to=function(){return ht(this.anchor,this.head)},hr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Ki(e,r,R){var L=e&&e.options.selectionsMayTouch,k=r[R];r.sort(function(at,nt){return St(at.from(),nt.from())}),R=B(r,k);for(var H=1;H0:ce>=0){var ge=Jt(le.from(),re.from()),Be=ht(le.to(),re.to()),ze=le.empty()?re.from()==re.head:le.from()==le.head;H<=R&&--R,r.splice(--H,2,new hr(ze?Be:ge,ze?ge:Be))}}return new Pi(r,R)}function ra(e,r){return new Pi([new hr(e,r||e)],0)}function ia(e){return e.text?it(e.from.line+e.text.length-1,Fe(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Jo(e,r){if(St(e,r.from)<0)return e;if(St(e,r.to)<=0)return ia(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+=ia(r).ch-r.to.ch),it(R,L)}function wo(e,r){for(var R=[],L=0;L1&&e.remove(le.line+1,_t-1),e.insert(le.line+1,zt)}Dt(e,"change",e,r)}function aa(e,r,R){function L(k,H,re){if(k.linked)for(var le=0;le1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Fe(e.done)}function is(e,r,R,L){var k=e.history;k.undone.length=0;var H=+new Date,re,le;if((k.lastOp==L||k.lastOrigin==r.origin&&r.origin&&(r.origin.charAt(0)=="+"&&k.lastModTime>H-(e.cm?e.cm.options.historyEventDelay:500)||r.origin.charAt(0)=="*"))&&(re=ml(k,k.lastOp==L)))le=Fe(re.changes),St(r.from,r.to)==0&&St(r.from,le.to)==0?le.to=ia(r):re.changes.push(Oo(e,r));else{var ce=Fe(k.done);for((!ce||!ce.ranges)&&oo(e.sel,k.done),re={changes:[Oo(e,r)],generation:k.generation},k.done.push(re);k.done.length>k.undoDepth;)k.done.shift(),k.done[0].ranges||k.done.shift()}k.done.push(R),k.generation=++k.maxGeneration,k.lastModTime=k.lastSelTime=H,k.lastOp=k.lastSelOp=L,k.lastOrigin=k.lastSelOrigin=r.origin,le||Ve(e,"historyAdded")}function vl(e,r,R,L){var k=r.charAt(0);return k=="*"||k=="+"&&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 k=e.history,H=L&&L.origin;R==k.lastSelOp||H&&k.lastSelOrigin==H&&(k.lastModTime==k.lastSelTime&&k.lastOrigin==H||vl(e,H,Fe(k.done),r))?k.done[k.done.length-1]=r:oo(r,k.done),k.lastSelTime=+new Date,k.lastSelOrigin=H,k.lastSelOp=R,L&&L.clearRedo!==!1&&rs(k.undone)}function oo(e,r){var R=Fe(r);R&&R.ranges&&R.equals(e)||r.push(e)}function as(e,r,R,L){var k=r["spans_"+e.id],H=0;e.iter(Math.max(e.first,R),Math.min(e.first+e.size,L),function(re){re.markedSpans&&((k||(k=r["spans_"+e.id]={}))[H]=re.markedSpans),++H})}function yl(e){if(!e)return null;for(var r,R=0;R-1&&(Fe(le)[ze]=ge[ze],delete ge[ze]))}}return L}function Ao(e,r,R,L){if(L){var k=e.anchor;if(R){var H=St(r,k)<0;H!=St(R,k)<0?(k=r,r=R):H!=St(r,R)<0&&(r=R)}return new hr(k,r)}else return new hr(R||r,r)}function so(e,r,R,L,k){k==null&&(k=e.cm&&(e.cm.display.shift||e.extend)),ai(e,new Pi([Ao(e.sel.primary(),r,R,k)],0),L)}function ss(e,r,R){for(var L=[],k=e.cm&&(e.cm.display.shift||e.extend),H=0;H=r.ch:le.to>r.ch))){if(k&&(Ve(ce,"beforeCursorEnter"),ce.explicitlyCleared))if(H.markedSpans){--re;continue}else break;if(!ce.atomic)continue;if(R){var ze=ce.find(L<0?1:-1),at=void 0;if((L<0?Be:ge)&&(ze=hs(e,ze,-L,ze&&ze.line==r.line?H:null)),ze&&ze.line==r.line&&(at=St(ze,R))&&(L<0?at<0:at>0))return Sa(e,ze,r,L,k)}var nt=ce.find(L<0?-1:1);return(L<0?ge:Be)&&(nt=hs(e,nt,L,nt.line==r.line?H:null)),nt?Sa(e,nt,r,L,k):null}}return r}function uo(e,r,R,L,k){var H=L||1,re=Sa(e,r,R,H,k)||!k&&Sa(e,r,R,H,!0)||Sa(e,r,R,-H,k)||!k&&Sa(e,r,R,-H,!0);return re||(e.cantEdit=!0,it(e.first,0))}function hs(e,r,R,L){return R<0&&r.ch==0?r.line>e.first?mt(e,it(r.line-1)):null:R>0&&r.ch==(L||q(e,r.line)).text.length?r.line=0;--k)vs(e,{from:L[k].from,to:L[k].to,text:k?[""]:r.text,origin:r.origin});else vs(e,r)}function vs(e,r){if(r.text.length==1&&r.text[0]==""&&St(r.from,r.to)==0)return;var R=wo(e,r);is(e,r,R,e.cm?e.cm.curOp.id:NaN),Ha(e,r,R,Xr(e,r));var L=[];aa(e,function(k,H){!H&&B(L,k.history)==-1&&(_s(k.history,r),L.push(k.history)),Ha(k,r,null,Xr(k,r))})}function co(e,r,R){var L=e.cm&&e.cm.state.suppressEdits;if(L&&!R)return;for(var k=e.history,H,re=e.sel,le=r=="undo"?k.done:k.undone,ce=r=="undo"?k.undone:k.done,ge=0;ge=0;--nt){var _t=at(nt);if(_t)return _t.v}}function gs(e,r){if(r==0)return;if(e.first+=r,e.sel=new Pi(Me(e.sel.ranges,function(k){return new hr(it(k.anchor.line+r,k.anchor.ch),it(k.head.line+r,k.head.ch))}),e.sel.primIndex),e.cm){Pr(e.cm,e.first,e.first-r,r);for(var R=e.cm.display,L=R.viewFrom;Le.lastLine())return;if(r.from.lineH&&(r={from:r.from,to:it(H,q(e,H).text.length),text:[r.text[0]],origin:r.origin}),r.removed=te(e,r.from,r.to),R||(R=wo(e,r)),e.cm?El(e.cm,r,L):Co(e,r,L),lo(e,R,oe),e.cantEdit&&uo(e,it(e.firstLine(),0))&&(e.cantEdit=!1)}function El(e,r,R){var L=e.doc,k=e.display,H=r.from,re=r.to,le=!1,ce=H.line;e.options.lineWrapping||(ce=He(hi(q(L,H.line))),L.iter(ce,re.line+1,function(nt){if(nt==k.maxLine)return le=!0,!0})),L.sel.contains(r.from,r.to)>-1&&Ne(e),Co(L,r,R,tr(e)),e.options.lineWrapping||(L.iter(ce,H.line+r.text.length,function(nt){var _t=Er(nt);_t>k.maxLineLength&&(k.maxLine=nt,k.maxLineLength=_t,k.maxLineChanged=!0,le=!1)}),le&&(e.curOp.updateMaxLine=!0)),qn(L,H.line),Ba(e,400);var ge=r.text.length-(re.line-H.line)-1;r.full?Pr(e):H.line==re.line&&r.text.length==1&&!es(e.doc,r)?Hr(e,H.line,"text"):Pr(e,H.line,re.line+1,ge);var Be=De(e,"changes"),ze=De(e,"change");if(ze||Be){var at={from:H,to:re,text:r.text,removed:r.removed,origin:r.origin};ze&&Dt(e,"change",e,at),Be&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(at)}e.display.selForContextMenu=null}function Ta(e,r,R,L,k){var H;L||(L=R),St(L,R)<0&&(H=[L,R],R=H[0],L=H[1]),typeof r=="string"&&(r=e.splitLines(r)),wa(e,{from:R,to:L,text:r,origin:k})}function ys(e,r,R,L){R1||!(this.children[0]instanceof Ga))){var le=[];this.collapse(le),this.children=[new Ga(le)],this.children[0].parent=this}},collapse:function(e){for(var r=0;r50){for(var re=k.lines.length%25+25,le=re;le10);e.parent.maybeSpill()},iterN:function(e,r,R){for(var L=0;Le.display.maxLineLength&&(e.display.maxLine=ge,e.display.maxLineLength=Be,e.display.maxLineChanged=!0)}L!=null&&e&&this.collapsed&&Pr(e,L,k+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&ds(e.doc)),e&&Dt(e,"markerCleared",e,this,L,k),r&&va(e),this.parent&&this.parent.clear()},oa.prototype.find=function(e,r){e==null&&this.type=="bookmark"&&(e=1);for(var R,L,k=0;k0||re==0&&H.clearWhenEmpty!==!1)return H;if(H.replacedWith&&(H.collapsed=!0,H.widgetNode=O("span",[H.replacedWith],"CodeMirror-widget"),L.handleMouseEvents||H.widgetNode.setAttribute("cm-ignore-events","true"),L.insertLeft&&(H.widgetNode.insertLeft=!0)),H.collapsed){if(ca(e,r.line,r,R,H)||r.line!=R.line&&ca(e,R.line,r,R,H))throw new Error("Inserting collapsed marker partially overlapping an existing one");Tr()}H.addToHistory&&is(e,{from:r,to:R,origin:"markText"},e.sel,NaN);var le=r.line,ce=e.cm,ge;if(e.iter(le,R.line+1,function(ze){ce&&H.collapsed&&!ce.options.lineWrapping&&hi(ze)==ce.display.maxLine&&(ge=!0),H.collapsed&&le!=r.line&&Se(ze,0),kr(ze,new Vr(H,le==r.line?r.ch:null,le==R.line?R.ch:null)),++le}),H.collapsed&&e.iter(r.line,R.line+1,function(ze){rr(e,ze)&&Se(ze,0)}),H.clearOnEnter&&Ie(H,"beforeCursorEnter",function(){return H.clear()}),H.readOnly&&(Rr(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),H.collapsed&&(H.id=++xs,H.atomic=!0),ce){if(ge&&(ce.curOp.updateMaxLine=!0),H.collapsed)Pr(ce,r.line,R.line+1);else if(H.className||H.startStyle||H.endStyle||H.css||H.attributes||H.title)for(var Be=r.line;Be<=R.line;Be++)Hr(ce,Be,"text");H.atomic&&ds(ce.doc),Dt(ce,"markerAdded",ce,H)}return H}var Ya=function(e,r){this.markers=e,this.primary=r;for(var R=0;R=0;ce--)wa(this,L[ce]);le?us(this,le):this.cm&&Ar(this.cm)}),undo:Jr(function(){co(this,"undo")}),redo:Jr(function(){co(this,"redo")}),undoSelection:Jr(function(){co(this,"undo",!0)}),redoSelection:Jr(function(){co(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.ch)&&r.push(k.marker.parent||k.marker)}return r},findMarks:function(e,r,R){e=mt(this,e),r=mt(this,r);var L=[],k=e.line;return this.iter(e.line,r.line+1,function(H){var re=H.markedSpans;if(re)for(var le=0;le=ce.to||ce.from==null&&k!=e.line||ce.from!=null&&k==r.line&&ce.from>=r.ch)&&(!R||R(ce.marker))&&L.push(ce.marker.parent||ce.marker)}++k}),L},getAllMarks:function(){var e=[];return this.iter(function(r){var R=r.markedSpans;if(R)for(var L=0;Le)return r=e,!0;e-=H,++R}),mt(this,it(R,r))},indexFromPos:function(e){e=mt(this,e);var r=e.ch;if(e.liner&&(r=e.from),e.to!=null&&e.to-1){r.state.draggingText(e),setTimeout(function(){return r.display.input.focus()},20);return}try{var Be=e.dataTransfer.getData("Text");if(Be){var ze;if(r.state.draggingText&&!r.state.draggingText.copy&&(ze=r.listSelections()),lo(r.doc,ra(R,R)),ze)for(var at=0;at=0;le--)Ta(e.doc,"",L[le].from,L[le].to,"+delete");Ar(e)})}function Ro(e,r,R){var L=N(e.text,r+R,R);return L<0||L>e.text.length?null:L}function Do(e,r,R){var L=Ro(e,r.ch,R);return L==null?null:new it(r.line,L,R<0?"after":"before")}function Po(e,r,R,L,k){if(e){r.doc.direction=="rtl"&&(k=-k);var H=rt(R,r.doc.direction);if(H){var re=k<0?Fe(H):H[0],le=k<0==(re.level==1),ce=le?"after":"before",ge;if(re.level>0||r.doc.direction=="rtl"){var Be=Yn(r,R);ge=k<0?R.text.length-1:0;var ze=Zn(r,Be,ge).top;ge=$(function(at){return Zn(r,Be,at).top==ze},k<0==(re.level==1)?re.from:re.to-1,ge),ce=="before"&&(ge=Ro(R,ge,1))}else ge=k<0?re.to:re.from;return new it(L,ge,ce)}}return new it(L,k<0?R.text.length:0,k<0?"before":"after")}function Il(e,r,R,L){var k=rt(r,e.doc.direction);if(!k)return Do(r,R,L);R.ch>=r.text.length?(R.ch=r.text.length,R.sticky="before"):R.ch<=0&&(R.ch=0,R.sticky="after");var H=me(k,R.ch,R.sticky),re=k[H];if(e.doc.direction=="ltr"&&re.level%2==0&&(L>0?re.to>R.ch:re.from=re.from&&at>=Be.begin)){var nt=ze?"before":"after";return new it(R.line,at,nt)}}var _t=function(zt,Zt,Gt){for(var tn=function(Sr,Zr){return Zr?new it(R.line,le(Sr,1),"before"):new it(R.line,Sr,"after")};zt>=0&&zt0==(Sn.level!=1),Vn=mn?Gt.begin:le(Gt.end,-1);if(Sn.from<=Vn&&Vn0?Be.end:le(Be.begin,-1);return It!=null&&!(L>0&&It==r.text.length)&&(At=_t(L>0?0:k.length-1,L,ge(It)),At)?At:null}var Qa={selectAll:ps,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),oe)},killLine:function(e){return Aa(e,function(r){if(r.empty()){var R=q(e.doc,r.head.line).text.length;return r.head.ch==R&&r.head.line0)k=new it(k.line,k.ch+1),e.replaceRange(H.charAt(k.ch-1)+H.charAt(k.ch-2),it(k.line,k.ch-2),k,"+transpose");else if(k.line>e.doc.first){var re=q(e.doc,k.line-1).text;re&&(k=new it(k.line,1),e.replaceRange(H.charAt(0)+e.doc.lineSeparator()+re.charAt(re.length-1),it(k.line-1,re.length-1),k,"+transpose"))}}R.push(new hr(k,k))}e.setSelections(R)})},newlineAndIndent:function(e){return Ti(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;Le&&St(r,this.pos)==0&&R==this.button};var Za,eo;function Kl(e,r){var R=+new Date;return eo&&eo.compare(R,e,r)?(Za=eo=null,"triple"):Za&&Za.compare(R,e,r)?(eo=new ko(R,e,r),Za=null,"double"):(Za=new ko(R,e,r),eo=null,"single")}function js(e){var r=this,R=r.display;if(Ke(r,e)||R.activeTouch&&R.input.supportsTouch())return;if(R.input.ensurePolled(),R.shift=e.shiftKey,Ln(R,e)){l||(R.scroller.draggable=!1,setTimeout(function(){return R.scroller.draggable=!0},100));return}if(Io(r,e))return;var L=Pn(r,e),k=qe(e),H=L?Kl(L,k):"single";if(window.focus(),k==1&&r.state.selectingText&&r.state.selectingText(e),L&&Hl(r,k,L,H,e))return;k==1?L?Gl(r,L,H,e):Ge(e)==R.scroller&&he(e):k==2?(L&&so(r.doc,L),setTimeout(function(){return R.input.focus()},20)):k==3&&(b?r.display.input.onContextMenu(e):fa(r))}function Hl(e,r,R,L,k){var H="Click";return L=="double"?H="Double"+H:L=="triple"&&(H="Triple"+H),H=(r==1?"Left":r==2?"Middle":"Right")+H,Ja(e,Ls(H,k),k,function(re){if(typeof re=="string"&&(re=Qa[re]),!re)return!1;var le=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),le=re(e,R)!=ie}finally{e.state.suppressEdits=!1}return le})}function zl(e,r,R){var L=e.getOption("configureMouse"),k=L?L(e,r,R):{};if(k.unit==null){var H=u?R.shiftKey&&R.metaKey:R.altKey;k.unit=H?"rectangle":r=="single"?"char":r=="double"?"word":"line"}return(k.extend==null||e.doc.extend)&&(k.extend=e.doc.extend||R.shiftKey),k.addNew==null&&(k.addNew=t?R.metaKey:R.ctrlKey),k.moveOnDrag==null&&(k.moveOnDrag=!(t?R.altKey:R.ctrlKey)),k}function Gl(e,r,R,L){C?setTimeout(j(Fr,e),0):e.curOp.focus=I();var k=zl(e,R,L),H=e.doc.sel,re;e.options.dragDrop&&pt&&!e.isReadOnly()&&R=="single"&&(re=H.contains(r))>-1&&(St((re=H.ranges[re]).from(),r)<0||r.xRel>0)&&(St(re.to(),r)>0||r.xRel<0)?Vl(e,L,r,k):Xl(e,L,r,k)}function Vl(e,r,R,L){var k=e.display,H=!1,re=Qr(e,function(ge){l&&(k.scroller.draggable=!1),e.state.draggingText=!1,tt(k.wrapper.ownerDocument,"mouseup",re),tt(k.wrapper.ownerDocument,"mousemove",le),tt(k.scroller,"dragstart",ce),tt(k.scroller,"drop",re),H||(he(ge),L.addNew||so(e.doc,R,null,null,L.extend),l&&!o||C&&T==9?setTimeout(function(){k.wrapper.ownerDocument.body.focus({preventScroll:!0}),k.input.focus()},20):k.input.focus())}),le=function(ge){H=H||Math.abs(r.clientX-ge.clientX)+Math.abs(r.clientY-ge.clientY)>=10},ce=function(){return H=!0};l&&(k.scroller.draggable=!0),e.state.draggingText=re,re.copy=!L.moveOnDrag,k.scroller.dragDrop&&k.scroller.dragDrop(),Ie(k.wrapper.ownerDocument,"mouseup",re),Ie(k.wrapper.ownerDocument,"mousemove",le),Ie(k.scroller,"dragstart",ce),Ie(k.scroller,"drop",re),fa(e),setTimeout(function(){return k.input.focus()},20)}function Fs(e,r,R){if(R=="char")return new hr(r,r);if(R=="word")return e.findWordAt(r);if(R=="line")return new hr(it(r.line,0),mt(e.doc,it(r.line+1,0)));var L=R(e,r);return new hr(L.from,L.to)}function Xl(e,r,R,L){var k=e.display,H=e.doc;he(r);var re,le,ce=H.sel,ge=ce.ranges;if(L.addNew&&!L.extend?(le=H.sel.contains(R),le>-1?re=ge[le]:re=new hr(R,R)):(re=H.sel.primary(),le=H.sel.primIndex),L.unit=="rectangle")L.addNew||(re=new hr(R,R)),R=Pn(e,r,!0,!0),le=-1;else{var Be=Fs(e,R,L.unit);L.extend?re=Ao(re,Be.anchor,Be.head,L.extend):re=Be}L.addNew?le==-1?(le=ge.length,ai(H,Ki(e,ge.concat([re]),le),{scroll:!1,origin:"*mouse"})):ge.length>1&&ge[le].empty()&&L.unit=="char"&&!L.extend?(ai(H,Ki(e,ge.slice(0,le).concat(ge.slice(le+1)),0),{scroll:!1,origin:"*mouse"}),ce=H.sel):Lo(H,le,re,xe):(le=0,ai(H,new Pi([re],0),xe),ce=H.sel);var ze=R;function at(Gt){if(St(ze,Gt)==0)return;if(ze=Gt,L.unit=="rectangle"){for(var tn=[],Sn=e.options.tabSize,mn=X(q(H,R.line).text,R.ch,Sn),Vn=X(q(H,Gt.line).text,Gt.ch,Sn),Sr=Math.min(mn,Vn),Zr=Math.max(mn,Vn),Mr=Math.min(R.line,Gt.line),Ci=Math.min(e.lastLine(),Math.max(R.line,Gt.line));Mr<=Ci;Mr++){var bi=q(H,Mr).text,zr=Ae(bi,Sr,Sn);Sr==Zr?tn.push(new hr(it(Mr,zr),it(Mr,zr))):bi.length>zr&&tn.push(new hr(it(Mr,zr),it(Mr,Ae(bi,Zr,Sn))))}tn.length||tn.push(new hr(R,R)),ai(H,Ki(e,ce.ranges.slice(0,le).concat(tn),le),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Gt)}else{var _i=re,ni=Fs(e,Gt,L.unit),$r=_i.anchor,Gr;St(ni.anchor,$r)>0?(Gr=ni.head,$r=Jt(_i.from(),ni.anchor)):(Gr=ni.anchor,$r=ht(_i.to(),ni.head));var Nr=ce.ranges.slice(0);Nr[le]=Yl(e,new hr(mt(H,$r),Gr)),ai(H,Ki(e,Nr,le),xe)}}var nt=k.wrapper.getBoundingClientRect(),_t=0;function At(Gt){var tn=++_t,Sn=Pn(e,Gt,!0,L.unit=="rectangle");if(!Sn)return;if(St(Sn,ze)!=0){e.curOp.focus=I(),at(Sn);var mn=Ii(k,H);(Sn.line>=mn.to||Sn.linent.bottom?20:0;Vn&&setTimeout(Qr(e,function(){if(_t!=tn)return;k.scroller.scrollTop+=Vn,At(Gt)}),50)}}function It(Gt){e.state.selectingText=!1,_t=Infinity,Gt&&(he(Gt),k.input.focus()),tt(k.wrapper.ownerDocument,"mousemove",zt),tt(k.wrapper.ownerDocument,"mouseup",Zt),H.history.lastSelOrigin=null}var zt=Qr(e,function(Gt){Gt.buttons===0||!qe(Gt)?It(Gt):At(Gt)}),Zt=Qr(e,It);e.state.selectingText=Zt,Ie(k.wrapper.ownerDocument,"mousemove",zt),Ie(k.wrapper.ownerDocument,"mouseup",Zt)}function Yl(e,r){var R=r.anchor,L=r.head,k=q(e.doc,R.line);if(St(R,L)==0&&R.sticky==L.sticky)return r;var H=rt(k);if(!H)return r;var re=me(H,R.ch,R.sticky),le=H[re];if(le.from!=R.ch&&le.to!=R.ch)return r;var ce=re+(le.from==R.ch==(le.level!=1)?0:1);if(ce==0||ce==H.length)return r;var ge;if(L.line!=R.line)ge=(L.line-R.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var Be=me(H,L.ch,L.sticky),ze=Be-re||(L.ch-R.ch)*(le.level==1?-1:1);Be==ce-1||Be==ce?ge=ze<0:ge=ze>0}var at=H[ce+(ge?-1:0)],nt=ge==(at.level==1),_t=nt?at.from:at.to,At=nt?"after":"before";return R.ch==_t&&R.sticky==At?r:new hr(new it(R.line,_t,At),L)}function Bs(e,r,R,L){var k,H;if(r.touches)k=r.touches[0].clientX,H=r.touches[0].clientY;else try{k=r.clientX,H=r.clientY}catch(at){return!1}if(k>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;L&&he(r);var re=e.display,le=re.lineDiv.getBoundingClientRect();if(H>le.bottom||!De(e,R))return Ee(r);H-=le.top-re.viewOffset;for(var ce=0;ce=k){var Be=Je(e.doc,H),ze=e.display.gutterSpecs[ce];return Ve(e,R,e,Be,ze.className,r),Ee(r)}}}function Io(e,r){return Bs(e,r,"gutterClick",!0)}function Ws(e,r){if(Ln(e.display,r)||$l(e,r))return;if(Ke(e,r,"contextmenu"))return;b||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-"),$t(e)}var La={toString:function(){return"CodeMirror.Init"}},Hs={},mo={};function ql(e){var r=e.optionHandlers;function R(L,k,H,re){e.defaults[L]=k,H&&(r[L]=re?function(le,ce,ge){ge!=La&&H(le,ce,ge)}:H)}e.defineOption=R,e.Init=La,R("value","",function(L,k){return L.setValue(k)},!0),R("mode",null,function(L,k){L.doc.modeOption=k,To(L)},!0),R("indentUnit",2,To,!0),R("indentWithTabs",!1),R("smartIndent",!0),R("tabSize",4,function(L){Ka(L),$t(L),Pr(L)},!0),R("lineSeparator",null,function(L,k){if(L.doc.lineSep=k,!k)return;var H=[],re=L.doc.first;L.doc.iter(function(ce){for(var ge=0;;){var Be=ce.text.indexOf(k,ge);if(Be==-1)break;ge=Be+k.length,H.push(it(re,Be))}re++});for(var le=H.length-1;le>=0;le--)Ta(L.doc,k,H[le],it(H[le].line,H[le].ch+k.length))}),R("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(L,k,H){L.state.specialChars=new RegExp(k.source+(k.test(" ")?"":"| "),"g"),H!=La&&L.refresh()}),R("specialCharPlaceholder",Yi,function(L){return L.refresh()},!0),R("electricChars",!0),R("inputStyle",n?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),R("spellcheck",!1,function(L,k){return L.getInputField().spellcheck=k},!0),R("autocorrect",!1,function(L,k){return L.getInputField().autocorrect=k},!0),R("autocapitalize",!1,function(L,k){return L.getInputField().autocapitalize=k},!0),R("rtlMoveVisually",!y),R("wholeLineUpdateBefore",!0),R("theme","default",function(L){Ks(L),Wa(L)},!0),R("keyMap","default",function(L,k,H){var re=ho(k),le=H!=La&&ho(H);le&&le.detach&&le.detach(L,re),re.attach&&re.attach(L,le||null)}),R("extraKeys",null),R("configureMouse",null),R("lineWrapping",!1,Jl,!0),R("gutters",[],function(L,k){L.display.gutterSpecs=So(k,L.options.lineNumbers),Wa(L)},!0),R("fixedGutter",!0,function(L,k){L.display.gutters.style.left=k?$n(L.display)+"px":"0",L.refresh()},!0),R("coverGutterNextToScrollbar",!1,function(L){return Ea(L)},!0),R("scrollbarStyle","native",function(L){Go(L),Ea(L),L.display.scrollbars.setScrollTop(L.doc.scrollTop),L.display.scrollbars.setScrollLeft(L.doc.scrollLeft)},!0),R("lineNumbers",!1,function(L,k){L.display.gutterSpecs=So(L.options.gutters,k),Wa(L)},!0),R("firstLineNumber",1,Wa,!0),R("lineNumberFormatter",function(L){return L},Wa,!0),R("showCursorWhenSelecting",!1,yn,!0),R("resetSelectionOnContextMenu",!0),R("lineWiseCopyCut",!0),R("pasteLinesPerSelection",!0),R("selectionsMayTouch",!1),R("readOnly",!1,function(L,k){k=="nocursor"&&(ki(L),L.display.input.blur()),L.display.input.readOnlyChanged(k)}),R("screenReaderLabel",null,function(L,k){k=k===""?null:k,L.display.input.screenReaderLabelChanged(k)}),R("disableInput",!1,function(L,k){k||L.display.input.reset()},!0),R("dragDrop",!0,Ql),R("allowDropFileTypes",null),R("cursorBlinkRate",530),R("cursorScrollMargin",0),R("cursorHeight",1,yn,!0),R("singleCursorHeightPerLine",!0,yn,!0),R("workTime",100),R("workDelay",100),R("flattenSpans",!0,Ka,!0),R("addModeClass",!1,Ka,!0),R("pollInterval",100),R("undoDepth",200,function(L,k){return L.doc.history.undoDepth=k}),R("historyEventDelay",1250),R("viewportMargin",10,function(L){return L.refresh()},!0),R("maxHighlightLength",1e4,Ka,!0),R("moveInputWithCursor",!0,function(L,k){k||L.display.input.resetPosition()}),R("tabindex",null,function(L,k){return L.display.input.getField().tabIndex=k||""}),R("autofocus",null),R("direction","ltr",function(L,k){return L.doc.setDirection(k)},!0),R("phrases",null)}function Ql(e,r,R){var L=R&&R!=La;if(!r!=!L){var k=e.display.dragFunctions,H=r?Ie:tt;H(e.display.scroller,"dragstart",k.start),H(e.display.scroller,"dragenter",k.enter),H(e.display.scroller,"dragover",k.over),H(e.display.scroller,"dragleave",k.leave),H(e.display.scroller,"drop",k.drop)}}function Jl(e){e.options.lineWrapping?(F(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(m(e.display.wrapper,"CodeMirror-wrap"),Cr(e)),Ir(e),Pr(e),$t(e),setTimeout(function(){return Ea(e)},100)}function Lr(e,r){var R=this;if(!(this instanceof Lr))return new Lr(e,r);this.options=r=r?G(r):{},G(Hs,r,!1);var L=r.value;typeof L=="string"?L=new yi(L,r.mode,null,r.lineSeparator,r.direction):r.mode&&(L.modeOption=r.mode),this.doc=L;var k=new Lr.inputStyles[r.inputStyle](this),H=this.display=new dl(e,L,k,r);H.wrapper.CodeMirror=this,Ks(this),r.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Go(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new J,keySeq:null,specialChars:null},r.autofocus&&!n&&H.input.focus(),C&&T<11&&setTimeout(function(){return R.display.input.reset(!0)},20),Zl(this),Rl(),ma(this),this.curOp.forceUpdate=!0,ts(this,L),r.autofocus&&!n||this.hasFocus()?setTimeout(function(){R.hasFocus()&&!R.state.focused&&un(R)},20):ki(this);for(var re in mo)mo.hasOwnProperty(re)&&mo[re](this,r[re],La);Yo(this),r.finishInit&&r.finishInit(this);for(var le=0;le20*20}Ie(r.scroller,"touchstart",function(ce){if(!Ke(e,ce)&&!H(ce)&&!Io(e,ce)){r.input.ensurePolled(),clearTimeout(R);var ge=+new Date;r.activeTouch={start:ge,moved:!1,prev:ge-L.end<=300?L:null},ce.touches.length==1&&(r.activeTouch.left=ce.touches[0].pageX,r.activeTouch.top=ce.touches[0].pageY)}}),Ie(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),Ie(r.scroller,"touchend",function(ce){var ge=r.activeTouch;if(ge&&!Ln(r,ce)&&ge.left!=null&&!ge.moved&&new Date-ge.start<300){var Be=e.coordsChar(r.activeTouch,"page"),ze;!ge.prev||re(ge,ge.prev)?ze=new hr(Be,Be):!ge.prev.prev||re(ge,ge.prev.prev)?ze=e.findWordAt(Be):ze=new hr(it(Be.line,0),mt(e.doc,it(Be.line+1,0))),e.setSelection(ze.anchor,ze.head),e.focus(),he(ce)}k()}),Ie(r.scroller,"touchcancel",k),Ie(r.scroller,"scroll",function(){r.scroller.clientHeight&&(Ua(e,r.scroller.scrollTop),ha(e,r.scroller.scrollLeft,!0),Ve(e,"scroll",e))}),Ie(r.scroller,"mousewheel",function(ce){return Qo(e,ce)}),Ie(r.scroller,"DOMMouseScroll",function(ce){return Qo(e,ce)}),Ie(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(ce){Ke(e,ce)||be(ce)},over:function(ce){Ke(e,ce)||(Ll(e,ce),be(ce))},start:function(ce){return Al(e,ce)},drop:Qr(e,Ol),leave:function(ce){Ke(e,ce)||Ts(e)}};var le=r.input.getField();Ie(le,"keyup",function(ce){return Ns.call(e,ce)}),Ie(le,"keydown",Qr(e,Is)),Ie(le,"keypress",Qr(e,Us)),Ie(le,"focus",function(ce){return un(e,ce)}),Ie(le,"blur",function(ce){return ki(e,ce)})}var No=[];Lr.defineInitHook=function(e){return No.push(e)};function to(e,r,R,L){var k=e.doc,H;R==null&&(R="add"),R=="smart"&&(k.mode.indent?H=et(e,r).state:R="prev");var re=e.options.tabSize,le=q(k,r),ce=X(le.text,null,re);le.stateAfter&&(le.stateAfter=null);var ge=le.text.match(/^\s*/)[0],Be;if(!L&&!/\S/.test(le.text))Be=0,R="not";else if(R=="smart"&&(Be=k.mode.indent(H,le.text.slice(ge.length),le.text),Be==ie||Be>150)){if(!L)return;R="prev"}R=="prev"?r>k.first?Be=X(q(k,r-1).text,null,re):Be=0:R=="add"?Be=ce+e.options.indentUnit:R=="subtract"?Be=ce-e.options.indentUnit:typeof R=="number"&&(Be=ce+R),Be=Math.max(0,Be);var ze="",at=0;if(e.options.indentWithTabs)for(var nt=Math.floor(Be/re);nt;--nt)at+=re,ze+=" ";if(atre,ce=lt(r),ge=null;if(le&&L.ranges.length>1)if(Hi&&Hi.text.join(` `)==r){if(L.ranges.length%Hi.text.length==0){ge=[];for(var Be=0;Be=0;at--){var nt=L.ranges[at],_t=nt.from(),At=nt.to();nt.empty()&&(R&&R>0?_t=it(_t.line,_t.ch-R):e.state.overwrite&&!le?At=it(At.line,Math.min(q(H,At.line).text.length,At.ch+Fe(ce).length)):le&&Hi&&Hi.lineWise&&Hi.text.join(` `)==ce.join(` `)&&(_t=At=it(_t.line,0)));var It={from:_t,to:At,text:ge?ge[at%ge.length]:ce,origin:k||(le?"paste":e.state.cutIncoming>re?"cut":"+input")};wa(e.doc,It),Dt(e,"inputRead",e,It)}r&&!le&&Gs(e,r),Ar(e),e.curOp.updateInput<2&&(e.curOp.updateInput=ze),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&&Ti(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 k=R.ranges[L];if(k.head.ch>100||L&&R.ranges[L-1].head.line==k.head.line)continue;var H=e.getModeAt(k.head),re=!1;if(H.electricChars){for(var le=0;le-1){re=to(e,k.head.line,"smart");break}}else H.electricInput&&(H.electricInput.test(q(e.doc,k.head.line).text.slice(0,k.head.ch))&&(re=to(e,k.head.line,"smart")));re&&Dt(e,"electricInput",e,k.head.line)}}function Vs(e){for(var r=[],R=[],L=0;LH&&(to(this,le.head.line,L,!0),H=le.head.line,re==this.doc.sel.primIndex&&Ar(this));else{var ce=le.from(),ge=le.to(),Be=Math.max(H,ce.line);H=Math.min(this.lastLine(),ge.line-(ge.ch?0:1))+1;for(var ze=Be;ze0&&Lo(this.doc,re,new hr(ce,at[re].to()),oe)}}}),getTokenAt:function(L,k){return sr(this,L,k)},getLineTokens:function(L,k){return sr(this,it(L),k,!0)},getTokenTypeAt:function(L){L=mt(this.doc,L);var k=Kt(this,q(this.doc,L.line)),H=0,re=(k.length-1)/2,le=L.ch,ce;if(le==0)ce=k[2];else for(;;){var ge=H+re>>1;if((ge?k[ge*2-1]:0)>=le)re=ge;else if(k[ge*2+1]ce&&(L=ce,re=!0),le=q(this.doc,L)}else le=L;return pn(this,le,{top:0,left:0},k||"page",H||re).top+(re?this.doc.height-pr(le):0)},defaultTextHeight:function(){return ji(this.display)},defaultCharWidth:function(){return Wn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(L,k,H,re,le){var ce=this.display;L=Bn(this,mt(this.doc,L));var ge=L.bottom,Be=L.left;if(k.style.position="absolute",k.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(k),ce.sizer.appendChild(k),re=="over")ge=L.top;else if(re=="above"||re=="near"){var ze=Math.max(ce.wrapper.clientHeight,this.doc.height),at=Math.max(ce.sizer.clientWidth,ce.lineSpace.clientWidth);(re=="above"||L.bottom+k.offsetHeight>ze)&&L.top>k.offsetHeight?ge=L.top-k.offsetHeight:L.bottom+k.offsetHeight<=ze&&(ge=L.bottom),Be+k.offsetWidth>at&&(Be=at-k.offsetWidth)}k.style.top=ge+"px",k.style.left=k.style.right="",le=="right"?(Be=ce.sizer.clientWidth-k.offsetWidth,k.style.right="0px"):(le=="left"?Be=0:le=="middle"&&(Be=(ce.sizer.clientWidth-k.offsetWidth)/2),k.style.left=Be+"px"),H&&na(this,{left:Be,top:ge,right:Be+k.offsetWidth,bottom:ge+k.offsetHeight})},triggerOnKeyDown:ui(Is),triggerOnKeyPress:ui(Us),triggerOnKeyUp:Ns,triggerOnMouseDown:ui(js),execCommand:function(L){if(Qa.hasOwnProperty(L))return Qa[L].call(null,this)},triggerElectric:ui(function(L){Gs(this,L)}),findPosH:function(L,k,H,re){var le=1;k<0&&(le=-1,k=-k);for(var ce=mt(this.doc,L),ge=0;ge0&&Be(H.charAt(re-1));)--re;for(;le.5||this.options.lineWrapping)&&Ir(this),Ve(this,"refresh",this)}),swapDoc:ui(function(L){var k=this.doc;return k.cm=null,this.state.selectingText&&this.state.selectingText(),ts(this,L),$t(this),this.display.input.reset(),Na(this,L.scrollLeft,L.scrollTop),this.curOp.forceScroll=!0,Dt(this,"swapDoc",this,k),k}),phrase:function(L){var k=this.options.phrases;return k&&Object.prototype.hasOwnProperty.call(k,L)?k[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}},_e(e),e.registerHelper=function(L,k,H){R.hasOwnProperty(L)||(R[L]=e[L]={_global:[]}),R[L][k]=H},e.registerGlobalHelper=function(L,k,H,re){e.registerHelper(L,k,re),R[L]._global.push({pred:H,val:re})}}function jo(e,r,R,L,k){var H=r,re=R,le=q(e,r.line),ce=k&&e.direction=="rtl"?-R:R;function ge(){var Zt=r.line+ce;return Zt=e.first+e.size?!1:(r=new it(Zt,r.ch,r.sticky),le=q(e,Zt))}function Be(Zt){var Gt;if(L=="codepoint"){var tn=le.text.charCodeAt(r.ch+(L>0?0:-1));isNaN(tn)?Gt=null:Gt=new it(r.line,Math.max(0,Math.min(le.text.length,r.ch+R*(tn>=55296&&tn<56320?2:1))),-R)}else k?Gt=Il(e.cm,le,r,R):Gt=Do(le,r,R);if(Gt==null)if(!Zt&&ge())r=Po(k,e.cm,le,r.line,ce);else return!1;else r=Gt;return!0}if(L=="char"||L=="codepoint")Be();else if(L=="column")Be(!0);else if(L=="word"||L=="group")for(var ze=null,at=L=="group",nt=e.cm&&e.cm.getHelper(r,"wordChars"),_t=!0;!(R<0&&!Be(!_t));_t=!1){var At=le.text.charAt(r.ch)||` `,It=Ue(At,nt)?"w":at&&At==` `?"n":!at||/\s/.test(At)?null:"p";if(at&&!_t&&!It&&(It="s"),ze&&ze!=It){R<0&&(R=1,Be(),r.sticky="after");break}if(It&&(ze=It),R>0&&!Be(!_t))break}var zt=uo(e,r,H,re,!0);return Xt(H,zt)&&(zt.hitSide=!0),zt}function $s(e,r,R,L){var k=e.doc,H=r.left,re;if(L=="page"){var le=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ce=Math.max(le-.5*ji(e.display),3);re=(R>0?r.bottom:r.top)+R*ce}else L=="line"&&(re=R>0?r.bottom+3:r.top-3);for(var ge;!(ge=wr(e,H,re),!ge.outside);){if(R<0?re<=0:re>=k.height){ge.hitSide=!0;break}re+=R*5}return ge}var vr=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new J,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};vr.prototype.init=function(e){var r=this,R=this,L=R.cm,k=R.div=e.lineDiv;Xs(k,L.options.spellcheck,L.options.autocorrect,L.options.autocapitalize);function H(le){for(var ce=le.target;ce;ce=ce.parentNode){if(ce==k)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ce.className))break}return!1}Ie(k,"paste",function(le){if(!H(le)||Ke(L,le)||zs(le,L))return;T<=11&&setTimeout(Qr(L,function(){return r.updateFromDOM()}),20)}),Ie(k,"compositionstart",function(le){r.composing={data:le.data,done:!1}}),Ie(k,"compositionupdate",function(le){r.composing||(r.composing={data:le.data,done:!1})}),Ie(k,"compositionend",function(le){r.composing&&(le.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),Ie(k,"touchstart",function(){return R.forceCompositionEnd()}),Ie(k,"input",function(){r.composing||r.readFromDOMSoon()});function re(le){if(!H(le)||Ke(L,le))return;if(L.somethingSelected())vo({lineWise:!1,text:L.getSelections()}),le.type=="cut"&&L.replaceSelection("",null,"cut");else if(L.options.lineWiseCopyCut){var ce=Vs(L);vo({lineWise:!0,text:ce.text}),le.type=="cut"&&L.operation(function(){L.setSelections(ce.ranges,0,oe),L.replaceSelection("",null,"cut")})}else return;if(le.clipboardData){le.clipboardData.clearData();var ge=Hi.text.join(` `);if(le.clipboardData.setData("Text",ge),le.clipboardData.getData("Text")==ge){le.preventDefault();return}}var Be=Ys(),ze=Be.firstChild;L.display.lineSpace.insertBefore(Be,L.display.lineSpace.firstChild),ze.value=Hi.text.join(` `);var at=document.activeElement;ne(ze),setTimeout(function(){L.display.lineSpace.removeChild(Be),at.focus(),at==k&&R.showPrimarySelection()},50)}Ie(k,"copy",re),Ie(k,"cut",re)},vr.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},vr.prototype.prepareSelection=function(){var e=Kn(this.cm,!1);return e.focus=document.activeElement==this.div,e},vr.prototype.showSelection=function(e,r){if(!e||!this.cm.display.view.length)return;(e.focus||r)&&this.showPrimarySelection(),this.showMultipleSelections(e)},vr.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},vr.prototype.showPrimarySelection=function(){var e=this.getSelection(),r=this.cm,R=r.doc.sel.primary(),L=R.from(),k=R.to();if(r.display.viewTo==r.display.viewFrom||L.line>=r.display.viewTo||k.line=r.display.viewFrom&&Qs(r,L)||{node:le[0].measure.map[2],offset:0},ge=k.linee.firstLine()&&(L=it(L.line-1,q(e.doc,L.line-1).length)),k.ch==q(e.doc,k.line).text.length&&k.liner.viewTo-1)return!1;var H,re,le;L.line==r.viewFrom||(H=qr(e,L.line))==0?(re=He(r.view[0].line),le=r.view[0].node):(re=He(r.view[H].line),le=r.view[H-1].node.nextSibling);var ce=qr(e,k.line),ge,Be;if(ce==r.view.length-1?(ge=r.viewTo-1,Be=r.lineDiv.lastChild):(ge=He(r.view[ce+1].line)-1,Be=r.view[ce+1].node.previousSibling),!le)return!1;for(var ze=e.doc.splitLines(nu(e,le,Be,re,ge)),at=te(e.doc,it(re,0),it(ge,q(e.doc,ge).text.length));ze.length>1&&at.length>1;)if(Fe(ze)==Fe(at))ze.pop(),at.pop(),ge--;else if(ze[0]==at[0])ze.shift(),at.shift(),re++;else break;for(var nt=0,_t=0,At=ze[0],It=at[0],zt=Math.min(At.length,It.length);ntL.ch&&Zt.charCodeAt(Zt.length-_t-1)==Gt.charCodeAt(Gt.length-_t-1);)nt--,_t++;ze[ze.length-1]=Zt.slice(0,Zt.length-_t).replace(/^\u200b+/,""),ze[0]=ze[0].slice(nt).replace(/\u200b+$/,"");var Sn=it(re,nt),mn=it(ge,at.length?Fe(at).length-_t:0);if(ze.length>1||ze[0]||St(Sn,mn))return Ta(e.doc,ze,Sn,mn,"+input"),!0},vr.prototype.ensurePolled=function(){this.forceCompositionEnd()},vr.prototype.reset=function(){this.forceCompositionEnd()},vr.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},vr.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)},vr.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Ti(this.cm,function(){return Pr(e.cm)})},vr.prototype.setUneditable=function(e){e.contentEditable="false"},vr.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Qr(this.cm,Uo)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},vr.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},vr.prototype.onContextMenu=function(){},vr.prototype.resetPosition=function(){},vr.prototype.needsContentAttribute=!0;function Qs(e,r){var R=fn(e,r.line);if(!R||R.hidden)return null;var L=q(e.doc,r.line),k=or(R,L,r.line),H=rt(L,e.doc.direction),re="left";if(H){var le=me(H,r.ch);re=le%2?"right":"left"}var ce=zn(k.map,r.ch,re);return ce.offset=ce.collapse=="right"?ce.end:ce.start,ce}function tu(e){for(var r=e;r;r=r.parentNode)if(/CodeMirror-gutter-wrapper/.test(r.className))return!0;return!1}function Ra(e,r){return r&&(e.bad=!0),e}function nu(e,r,R,L,k){var H="",re=!1,le=e.doc.lineSeparator(),ce=!1;function ge(nt){return function(_t){return _t.id==nt}}function Be(){re&&(H+=le,ce&&(H+=le),re=ce=!1)}function ze(nt){nt&&(Be(),H+=nt)}function at(nt){if(nt.nodeType==1){var _t=nt.getAttribute("cm-text");if(_t){ze(_t);return}var At=nt.getAttribute("cm-marker"),It;if(At){var zt=e.findMarks(it(L,0),it(k+1,0),ge(+At));zt.length&&(It=zt[0].find(0))&&ze(te(e.doc,It.from,It.to).join(le));return}if(nt.getAttribute("contenteditable")=="false")return;var Zt=/^(pre|div|p|li|table|br)$/i.test(nt.nodeName);if(!/^br$/i.test(nt.nodeName)&&nt.textContent.length==0)return;Zt&&Be();for(var Gt=0;Gt=9&&r.hasSelection&&(r.hasSelection=null),R.poll()}),Ie(k,"paste",function(re){if(Ke(L,re)||zs(re,L))return;L.state.pasteIncoming=+new Date,R.fastPoll()});function H(re){if(Ke(L,re))return;if(L.somethingSelected())vo({lineWise:!1,text:L.getSelections()});else if(L.options.lineWiseCopyCut){var le=Vs(L);vo({lineWise:!0,text:le.text}),re.type=="cut"?L.setSelections(le.ranges,null,oe):(R.prevInput="",k.value=le.text.join(` `),ne(k))}else return;re.type=="cut"&&(L.state.cutIncoming=+new Date)}Ie(k,"cut",H),Ie(k,"copy",H),Ie(e.scroller,"paste",function(re){if(Ln(e,re)||Ke(L,re))return;if(!k.dispatchEvent){L.state.pasteIncoming=+new Date,R.focus();return}var le=new Event("paste");le.clipboardData=re.clipboardData,k.dispatchEvent(le)}),Ie(e.lineSpace,"selectstart",function(re){Ln(e,re)||he(re)}),Ie(k,"compositionstart",function(){var re=L.getCursor("from");R.composing&&R.composing.range.clear(),R.composing={start:re,range:L.markText(re,L.getCursor("to"),{className:"CodeMirror-composing"})}}),Ie(k,"compositionend",function(){R.composing&&(R.poll(),R.composing.range.clear(),R.composing=null)})},Br.prototype.createField=function(e){this.wrapper=Ys(),this.textarea=this.wrapper.firstChild},Br.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Br.prototype.prepareSelection=function(){var e=this.cm,r=e.display,R=e.doc,L=Kn(e);if(e.options.moveInputWithCursor){var k=Bn(e,R.sel.primary().head,"div"),H=r.wrapper.getBoundingClientRect(),re=r.lineDiv.getBoundingClientRect();L.teTop=Math.max(0,Math.min(r.wrapper.clientHeight-10,k.top+re.top-H.top)),L.teLeft=Math.max(0,Math.min(r.wrapper.clientWidth-10,k.left+re.left-H.left))}return L},Br.prototype.showSelection=function(e){var r=this.cm,R=r.display;a(R.cursorDiv,e.cursors),a(R.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Br.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var r=this.cm;if(r.somethingSelected()){this.prevInput="";var R=r.getSelection();this.textarea.value=R,r.state.focused&&ne(this.textarea),C&&T>=9&&(this.hasSelection=R)}else e||(this.prevInput=this.textarea.value="",C&&T>=9&&(this.hasSelection=null))},Br.prototype.getField=function(){return this.textarea},Br.prototype.supportsTouch=function(){return!1},Br.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!n||I()!=this.textarea))try{this.textarea.focus()}catch(e){}},Br.prototype.blur=function(){this.textarea.blur()},Br.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Br.prototype.receivedFocus=function(){this.slowPoll()},Br.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()})},Br.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)},Br.prototype.poll=function(){var e=this,r=this.cm,R=this.textarea,L=this.prevInput;if(this.contextMenuPending||!r.state.focused||ft(R)&&!L&&!this.composing||r.isReadOnly()||r.options.disableInput||r.state.keySeq)return!1;var k=R.value;if(k==L&&!r.somethingSelected())return!1;if(C&&T>=9&&this.hasSelection===k||t&&/[\uf700-\uf7ff]/.test(k))return r.display.input.reset(),!1;if(r.doc.sel==r.display.selForContextMenu){var H=k.charCodeAt(0);if(H==8203&&!L&&(L="\u200B"),H==8666)return this.reset(),this.cm.execCommand("undo")}for(var re=0,le=Math.min(L.length,k.length);re1e3||k.indexOf(` `)>-1?R.value=e.prevInput="":e.prevInput=k,e.composing&&(e.composing.range.clear(),e.composing.range=r.markText(e.composing.start,r.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Br.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Br.prototype.onKeyPress=function(){C&&T>=9&&(this.hasSelection=null),this.fastPoll()},Br.prototype.onContextMenu=function(e){var r=this,R=r.cm,L=R.display,k=r.textarea;r.contextMenuPending&&r.contextMenuPending();var H=Pn(R,e),re=L.scroller.scrollTop;if(!H||d)return;var le=R.options.resetSelectionOnContextMenu;le&&R.doc.sel.contains(H)==-1&&Qr(R,ai)(R.doc,ra(H),oe);var ce=k.style.cssText,ge=r.wrapper.style.cssText,Be=r.wrapper.offsetParent.getBoundingClientRect();r.wrapper.style.cssText="position: static",k.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(e.clientY-Be.top-5)+"px; left: "+(e.clientX-Be.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 ze;l&&(ze=window.scrollY),L.input.focus(),l&&window.scrollTo(null,ze),L.input.reset(),R.somethingSelected()||(k.value=r.prevInput=" "),r.contextMenuPending=nt,L.selForContextMenu=R.doc.sel,clearTimeout(L.detectingSelectAll);function at(){if(k.selectionStart!=null){var At=R.somethingSelected(),It="\u200B"+(At?k.value:"");k.value="\u21DA",k.value=It,r.prevInput=At?"":"\u200B",k.selectionStart=1,k.selectionEnd=It.length,L.selForContextMenu=R.doc.sel}}function nt(){if(r.contextMenuPending!=nt)return;if(r.contextMenuPending=!1,r.wrapper.style.cssText=ge,k.style.cssText=ce,C&&T<9&&L.scrollbars.setScrollTop(L.scroller.scrollTop=re),k.selectionStart!=null){(!C||C&&T<9)&&at();var At=0,It=function(){L.selForContextMenu==R.doc.sel&&k.selectionStart==0&&k.selectionEnd>0&&r.prevInput=="\u200B"?Qr(R,ps)(R):At++<10?L.detectingSelectAll=setTimeout(It,500):(L.selForContextMenu=null,L.input.reset())};L.detectingSelectAll=setTimeout(It,200)}}if(C&&T>=9&&at(),b){be(e);var _t=function(){tt(window,"mouseup",_t),setTimeout(nt,20)};Ie(window,"mouseup",_t)}else setTimeout(nt,50)},Br.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Br.prototype.setUneditable=function(){},Br.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 k;if(e.form&&(Ie(e.form,"submit",L),!r.leaveSubmitMethodAlone)){var H=e.form;k=H.submit;try{var re=H.submit=function(){L(),H.submit=k,H.submit(),H.submit=re}}catch(ce){}}r.finishInit=function(ce){ce.save=L,ce.getTextArea=function(){return e},ce.toTextArea=function(){ce.toTextArea=isNaN,L(),e.parentNode.removeChild(ce.getWrapperElement()),e.style.display="",e.form&&(tt(e.form,"submit",L),!r.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=k))}},e.style.display="none";var le=Lr(function(ce){return e.parentNode.insertBefore(ce,e.nextSibling)},r);return le}function au(e){e.off=tt,e.on=Ie,e.wheelEventPixels=fl,e.Doc=yi,e.splitLines=lt,e.countColumn=X,e.findColumn=Ae,e.isWordChar=ke,e.Pass=ie,e.signal=Ve,e.Line=xr,e.changeEnd=ia,e.scrollbarModel=zo,e.Pos=it,e.cmpPos=St,e.modes=ct,e.mimeModes=Ze,e.resolveMode=st,e.getMode=gt,e.modeExtensions=kt,e.extendMode=Wt,e.copyState=Qt,e.startState=fe,e.innerMode=we,e.commands=Qa,e.keyMap=Qi,e.keyName=Rs,e.isModifierKey=As,e.lookupKey=Oa,e.normalizeKeyMap=kl,e.StringStream=W,e.SharedTextMarker=Ya,e.TextMarker=oa,e.LineWidget=Xa,e.e_preventDefault=he,e.e_stopPropagation=ve,e.e_stop=be,e.addClass=F,e.contains=D,e.rmClass=m,e.keyNames=sa}ql(Lr),eu(Lr);var ou="iter insert remove copy getEditor constructor".split(" ");for(var yo in yi.prototype)yi.prototype.hasOwnProperty(yo)&&B(ou,yo)<0&&(Lr.prototype[yo]=function(e){return function(){return e.apply(this.doc,arguments)}}(yi.prototype[yo]));return _e(yi),Lr.inputStyles={textarea:Br,contenteditable:vr},Lr.defineMode=function(e){!Lr.defaults.mode&&e!="null"&&(Lr.defaults.mode=e),Tt.apply(this,arguments)},Lr.defineMIME=Ot,Lr.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Lr.defineMIME("text/plain","null"),Lr.defineExtension=function(e,r){Lr.prototype[e]=r},Lr.defineDocExtension=function(e,r){yi.prototype[e]=r},Lr.fromTextArea=iu,au(Lr),Lr.version="5.58.2",Lr})},W7jJ:function($e,We,z){"use strict";z.r(We);var ae=z("0Owb"),Z=z("PpiC"),U=z("OaEy"),w=z("2fM7"),P=z("T2oS"),S=z("W9HT"),C=z("miYZ"),T=z("tsqr"),l=z("2qtc"),p=z("kLXV"),h=z("9og8"),d=z("tJVT"),o=z("k1fw"),c=z("aHsQ"),s=z("sGsY"),f=z("WmNS"),i=z.n(f),n=z("q1tI"),t=z.n(n),u=z("Fvcw"),y=z("GIiI"),g=z("Ty5D"),_=z("9kvl"),b=z("55Ip"),v=z("7qur"),m=z("cDPC"),E=z("m3rI"),a=z("RCxd"),x=z("EHPI"),O=z("J66h"),A=z("uMZB"),D=z.n(A),I=z("sNtx"),F=z("RpDr"),K=z("+L6B"),ne=z("2/Rp"),j=z("y8nQ"),G=z("Vl3Y"),X=z("5NDa"),J=z("5rEg"),B=J.a.TextArea,Q=5e3,ie=function(ot){var ut=ot.callback,Et=ot.onCancel,Dt=ot.notes;function on(an){ut(an)}return t.a.createElement(G.a,{className:"note-form-panel",onFinish:on,initialValues:{notes:Dt}},t.a.createElement(G.a.Item,{name:"notes",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9"},{max:Q,message:"\u7B14\u8BB0\u6700\u5927\u5B57\u6570\u4E3A".concat(Q)}]},t.a.createElement(B,{placeholder:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9",rows:5})),t.a.createElement(G.a.Item,{style:{textAlign:"right"}},t.a.createElement(ne.a,{type:"ghost",onClick:Et,style:{marginRight:10}}," \u53D6\u6D88 "),t.a.createElement(ne.a,{type:"primary",htmlType:"submit"}," \u63D0\u4EA4 ")))},oe=z("ZsLC"),xe=z.n(oe),ye=z("DjyN"),Ae=z("NUBc"),pe=z("g9YV"),Oe=z("wCAj"),Fe=z("Hw79"),Me=z.n(Fe),Ce=z("ye1Q"),Le=z("lfch"),de=z("bdLU"),ue=z("1vsH"),ke=z("wd/R"),Ue=z.n(ke),Ye=Oe.a.Column,ee=function(ot){var ut=ot.submitResult,Et=ot.submitting,Dt=ot.submitRecords,on=ot.page,an=ot.onPageChange,vt=ot.topicId,dt=ut||{},Ht=dt.status,yt=dt.id,en=dt.input,Lt=dt.output,rn=dt.expected_output,Hn=dt.is_file,An=dt.input_file_url,vn=dt.output_file_url,Xn=dt.expected_output_file_url,Cn=dt.error_msg,Ln=Dt||{},Fn=Ln.records,yr=Ln.records_count,Qn=Object(g.i)();function ir(){Hn?navigator.clipboard.writeText(O.Base64.decode(Cn)).then(function(){T.b.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")}):navigator.clipboard.writeText(O.Base64.decode(Lt)).then(function(){T.b.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")})}return t.a.createElement(S.a,{spinning:Et,tip:"\u8BC4\u6D4B\u4E2D...",indicator:t.a.createElement(Ce.a,{style:{fontSize:24},spin:!0})},yt?t.a.createElement(t.a.Fragment,null,t.a.createElement("ul",{className:Me.a.info},t.a.createElement("li",null,"\u6267\u884C\u7ED3\u679C\uFF1A",t.a.createElement("span",{className:Ht===de.a.OK?"c-green":"c-red"},F.a[Ht])),t.a.createElement("li",{className:Me.a.error},t.a.createElement("a",{onClick:ir},"\u590D\u5236\u9519\u8BEF\u4FE1\u606F ",t.a.createElement(Le.a,null)," ")),t.a.createElement("li",null,t.a.createElement(b.a,{to:"/problems/".concat(vt,"/record-detail/").concat(yt,"?backId=").concat(Qn==null?void 0:Qn.save_identifier)},"\u663E\u793A\u8BE6\u60C5 > "))),Ht!==de.a.OK?t.a.createElement(t.a.Fragment,null,t.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),t.a.createElement("pre",null,!Hn&&en,Hn&&t.a.createElement("a",{style:{fontSize:"16px"},onClick:function(){return Object(ue.x)(An,en)}},en)),t.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),t.a.createElement("pre",null,(Ht===4||Ht===5)&&O.Base64.decode(Cn),Ht!=4&&Ht!=5&&(Hn?t.a.createElement("a",{style:{fontSize:"16px"},onClick:function(){return Object(ue.x)(vn,Lt)}},Lt):O.Base64.decode(Lt))),t.a.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),t.a.createElement("pre",null,!Hn&&O.Base64.decode(rn),Hn&&t.a.createElement("a",{style:{fontSize:"16px"},onClick:function(){return Object(ue.x)(Xn,rn)}},rn))):null):null,(Fn==null?void 0:Fn.length)>0?t.a.createElement(Oe.a,{dataSource:Fn,rowKey:"id",pagination:!1},t.a.createElement(Ye,{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",render:function(mr,Jn){return t.a.createElement("span",null," ",Ue()(mr).format("YYYY-MM-DD HH:mm:ss"))}}),t.a.createElement(Ye,{title:"\u63D0\u4EA4\u7ED3\u679C",dataIndex:"status",key:"status",render:function(mr,Jn){var or;return t.a.createElement(b.a,{className:mr===0?"c-green":"c-red",to:"/problems/".concat(vt,"/record-detail/").concat(Jn.id,"?backId=").concat(Qn==null?void 0:Qn.save_identifier)},(or=F.a[mr])===null||or===void 0?void 0:or.replace("\u8C03\u8BD5","\u8BC4\u6D4B"))}}),t.a.createElement(Ye,{title:"\u6267\u884C\u7528\u65F6 (S)",dataIndex:"execute_time",key:"execute_time"}),t.a.createElement(Ye,{title:"\u5185\u5B58\u6D88\u8017\uFF08MB\uFF09",dataIndex:"execute_memory",key:"execute_memory"}),t.a.createElement(Ye,{title:"\u8BED\u8A00",dataIndex:"language",key:"language"})):null,yr>15?t.a.createElement(Ae.a,{className:Me.a.pagination,current:on,pageSize:15,total:yr,onChange:an}):null)},M=z("BdwD"),N=z("DYRE"),$=z("zeV3"),V=z("+BJd"),Y=z("mr32"),me=z("TcMa"),Re=z.n(me),rt=z("9Bee"),Pe={1:{name:"\u7B80\u5355",color:"#52c41a"},2:{name:"\u9002\u4E2D",color:"#faad14"},3:{name:"\u56F0\u96BE",color:"#f5222d"}},Ie=function(ot){var ut=ot.hack,Et=ot.onTriggerPraise,Dt=ot.toDiscuss,on=ut.language,an=ut.difficulty,vt=ut.time_limit,dt=ut.username,Ht=ut.user_path,yt=ut.user_praise,en=ut.comments_count,Lt=ut.praises_count,rn=ut.description,Hn=ut.pass_count,An=ut.submit_count,vn=Object(g.h)();console.log(ut.language,"language");var Xn=Pe[an];return t.a.createElement(t.a.Fragment,null,t.a.createElement("ul",{className:Re.a.info},t.a.createElement("li",null,"\u96BE\u5EA6\uFF1A",t.a.createElement(Y.a,{color:Xn.color},Xn.name)),t.a.createElement("li",null,"\u8BC4\u6D4B\u65F6\u957F\u9650\u5236\uFF1A",t.a.createElement("b",null,vt,"\u79D2"))),t.a.createElement(rt.a,{value:rn,className:Re.a.desc}),t.a.createElement("ul",{className:Re.a["commit-info"]},t.a.createElement("li",null,t.a.createElement($.a,{size:4},t.a.createElement("span",null,"\u901A\u8FC7\u6B21\u6570")," ",t.a.createElement("b",null,Hn))),t.a.createElement("li",null,t.a.createElement($.a,{size:4},t.a.createElement("span",null,"\u63D0\u4EA4\u6B21\u6570")," ",t.a.createElement("b",null,An))," "),t.a.createElement("li",{style:{flex:"1 0 0"}}),t.a.createElement("li",null,t.a.createElement($.a,{size:4},t.a.createElement("i",{className:"iconfont icon-huifu1",onClick:Dt})," ",t.a.createElement("b",null,en))," ")))},Xe=z("dhSg"),tt=z("ps8w"),Ve=z.n(tt),Ke=z("oBTY"),Ne=z("M8RZ"),De=z("OkW/"),_e=z("ErOA");function he(ot){return Object(_e.c)("comments.json",ot)}function ve(ot){return Object(_e.f)("/discusses/".concat(ot,"/plus.json"),{container_type:"Discuss",type:1})}function Ee(ot){return Object(_e.f)("comments/reply.json",ot)}function be(ot){return Object(_e.f)("comments.json",ot)}function Ge(ot){return Object(_e.f)("comments/".concat(ot==null?void 0:ot.id,"/hidden.json"),ot)}function qe(ot){return Object(_e.b)("comments/".concat(ot==null?void 0:ot.id,".json"))}var pt=z("GgEA"),Pt=z("AMnG"),Rt=z("xKgJ");function Mt(ot){var ut=ot.author;return t.a.createElement("a",{href:"/users/".concat(ut.login),target:"_blank"},t.a.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",height:"50",style:{borderRadius:"50%"},src:"".concat(E.a.IMG_SERVER,"/images/").concat(ut.image_url),width:"50"}))}function wt(ot){var ut=ot.data,Et=ot.index,Dt=ot.parentDiscussIndex,on=ot.user,an=ot.onSetActionType,vt=ut.author,dt=ut.can_delete,Ht=ut.content,yt=ut.id,en=ut.time;function Lt(){an({id:yt,index:Et,type:"delete-discuss",parentDiscussIndex:Dt,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}var rn=on.admin||dt||vt.user_id===on.user_id;return t.a.createElement("div",{className:"discuss-item-container second-discuss "},t.a.createElement(Mt,{author:vt}),t.a.createElement("section",null,t.a.createElement("div",{className:"discuss-info"},t.a.createElement("a",{href:"/users/".concat(vt.login),target:"_blank"},vt.name),t.a.createElement("span",{className:"grey"},en),t.a.createElement("div",{className:"btn-group",style:{marginBottom:0}},rn?t.a.createElement("a",{onClick:Lt,title:"\u5220\u9664"},t.a.createElement("i",{className:"iconfont icon-shanchu"})):null)),t.a.createElement(rt.a,{className:"discuss-content",value:Ht})))}var lt=function(ot){var ut=ot.user,Et=ot.data,Dt=ot.index,on=ot.onPlusDiscuss,an=ot.onSetActionType,vt=ot.activeDiscussIndex,dt=ot.onReplyDiscuss,Ht=ot.onSetActiveDiscussIndex,yt=Et.content,en=Et.children,Lt=Et.hidden,rn=Et.id,Hn=Et.praise_count,An=Et.time,vn=Et.user_praise,Xn=Et.can_delete,Cn=Et.author;console.log(Xn&&(!en||en.length==0),"children22");function Ln(){Ht(rn)}function Fn(){on(rn,!vn,Dt)}function yr(){an({id:rn,index:Dt,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function Qn(){an({id:rn,index:Dt,params:{hidden:Lt?"0":"1"},type:"hidden-discuss",message:Lt?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}var ir=ut.admin||ut.user_id===Cn.user_id;return t.a.createElement("div",{className:"discuss-item-container",key:rn},t.a.createElement(Mt,{author:Cn}),t.a.createElement("section",null,t.a.createElement("div",{className:"discuss-info"},t.a.createElement("a",{href:"/users/".concat(Cn.login),target:"_blank"}," ",Cn.name," "),t.a.createElement("span",{className:"grey"},An)),t.a.createElement(rt.a,{className:"discuss-content",value:yt}),en&&en.length>0?t.a.createElement("div",{className:"reply-discuss-container"},en.map(function(lr,mr){return t.a.createElement(wt,{key:lr.id,data:lr,index:mr,user:ut,onSetActionType:an,parentDiscussIndex:Dt})})):null,t.a.createElement("div",{className:"btn-group"},Object(Rt.v)()?t.a.createElement("a",{onClick:Qn,title:Lt?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},t.a.createElement("i",{className:Lt?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,Xn&&(!en||en.length==0)?t.a.createElement("a",{onClick:yr,title:"\u5220\u9664"},t.a.createElement("i",{className:"iconfont icon-shanchu"})):null,t.a.createElement("a",{onClick:Ln,title:"\u56DE\u590D"}," ",t.a.createElement("i",{className:"iconfont icon-huifu1"})," "),t.a.createElement("a",{onClick:Fn,className:vn?"c-orange":""},t.a.createElement("i",{className:vn?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),t.a.createElement("span",null,Hn||""))),t.a.createElement(Pt.a,{id:rn,activeDiscussIndex:vt,onReplyDiscuss:dt})))},ft=z("kaH+"),Qe=z("Wx9E"),Te=z("Ot1p"),je=function(ot){var ut=ot.user_praise,Et=ot.praise_count,Dt=ot.praisePlus,on=ot.onCreateDiscuss,an=ot.discuss_count,vt=Object(n.useState)(!1),dt=Object(d.a)(vt,2),Ht=dt[0],yt=dt[1],en=Object(n.useState)(""),Lt=Object(d.a)(en,2),rn=Lt[0],Hn=Lt[1];function An(Fn){Hn(Fn)}function vn(){yt(!0)}function Xn(){yt(!1)}function Cn(){return Ln.apply(this,arguments)}function Ln(){return Ln=Object(h.a)(i.a.mark(function Fn(){return i.a.wrap(function(Qn){for(;;)switch(Qn.prev=Qn.next){case 0:on(rn),Hn(""),yt(!1);case 3:case"end":return Qn.stop()}},Fn)})),Ln.apply(this,arguments)}return t.a.createElement("div",{className:"dis-input-editor-container ".concat(Ht?"active":""," ")},t.a.createElement("div",{className:Ht?"text-area hide":"text-area"},t.a.createElement("input",{placeholder:"\u8BF4\u70B9\u4EC0\u4E48",onClick:vn}),t.a.createElement("a",{style:{alignItems:"center"}}," ",t.a.createElement("i",{className:"iconfont icon-huifu1"})," \xA0 \xA0",an," "),t.a.createElement("a",{className:"c-light-black",onClick:Dt,style:{alignItems:"center"},title:ut?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},t.a.createElement("i",{className:"mr3 ".concat(ut?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"," ")}),Et?t.a.createElement("span",null,Et):"")),Ht?t.a.createElement("div",{className:"input-mask",onClick:Xn}):null,t.a.createElement("div",{className:Ht?"md-container":"md-container hide"},t.a.createElement(Te.a,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:rn,height:240,onChange:An}),t.a.createElement("div",{className:"tip-container",onClick:Xn},t.a.createElement("a",{className:"btn-send",onClick:Cn}," \u53D1\u9001 "))))},ct={loading:!1,page:1,data:[],count:0,actionType:null,activeDiscussIndex:null},Ze;(function(ot){ot[ot.GET_DISCUSSES=0]="GET_DISCUSSES",ot[ot.TOP_OR_DOWN_DISCUSS=1]="TOP_OR_DOWN_DISCUSS",ot[ot.ACTIVE_DISCUSS_INDEX=2]="ACTIVE_DISCUSS_INDEX",ot[ot.PLUS_DISCUSS=3]="PLUS_DISCUSS",ot[ot.SET_ACTION_TYPE=4]="SET_ACTION_TYPE",ot[ot.SET_PAGE=5]="SET_PAGE",ot[ot.SHOW_DISCUSSES_LOADING=6]="SHOW_DISCUSSES_LOADING"})(Ze||(Ze={}));function Tt(ot,ut){switch(ut.type){case Ze.SHOW_DISCUSSES_LOADING:return Object(o.a)(Object(o.a)({},ot),{},{loading:!0});case Ze.GET_DISCUSSES:return Object(o.a)(Object(o.a)({},ot),ut.payload);case Ze.TOP_OR_DOWN_DISCUSS:return Object(o.a)(Object(o.a)({},ot),ut.payload);case Ze.SET_ACTION_TYPE:return Object(o.a)(Object(o.a)({},ot),ut.payload);case Ze.PLUS_DISCUSS:return Object(o.a)(Object(o.a)({},ot),ut.payload);case Ze.SET_PAGE:return Object(o.a)(Object(o.a)({},ot),{},{page:ut.payload});case Ze.ACTIVE_DISCUSS_INDEX:return Object(o.a)(Object(o.a)({},ot),ut.payload);default:throw new Error}}var Ot=function(ot){var ut=ot.user,Et=ot.identifier,Dt=ot.hack,on=ot.onTriggerPraise,an=ot.setDiscussTotal,vt=Object(n.useReducer)(Tt,ct),dt=Object(d.a)(vt,2),Ht=dt[0],yt=dt[1],en=Ht.loading,Lt=Ht.page,rn=Ht.data,Hn=Ht.count,An=Ht.actionType,vn=Ht.activeDiscussIndex,Xn=Object(n.useCallback)(Object(h.a)(i.a.mark(function fn(){var Yn,Zn,ur;return i.a.wrap(function(Gn){for(;;)switch(Gn.prev=Gn.next){case 0:return yt({type:Ze.SHOW_DISCUSSES_LOADING}),Gn.next=3,he({container_type:"Practice",container_identifier:Et,limit:10,page:Lt});case 3:Yn=Gn.sent,Zn=Yn.comments,ur=Yn.disscuss_count,yt({type:Ze.GET_DISCUSSES,payload:{data:Zn,count:ur,loading:!1}}),an(ur);case 7:case"end":return Gn.stop()}},fn)})),[Lt,Et]);Object(n.useEffect)(function(){Xn()},[Et,Lt]);function Cn(fn){yt({type:Ze.SET_PAGE,page:fn})}function Ln(fn){yt({type:Ze.SET_ACTION_TYPE,payload:{actionType:fn}})}function Fn(fn){vn===fn?yt({type:Ze.ACTIVE_DISCUSS_INDEX,payload:{activeDiscussIndex:null}}):yt({type:Ze.ACTIVE_DISCUSS_INDEX,payload:{activeDiscussIndex:fn}})}function yr(fn,Yn,Zn){return Qn.apply(this,arguments)}function Qn(){return Qn=Object(h.a)(i.a.mark(function fn(Yn,Zn,ur){var zn;return i.a.wrap(function(hn){for(;;)switch(hn.prev=hn.next){case 0:return hn.prev=0,hn.next=3,ve(Yn);case 3:zn=hn.sent,rn[ur].user_praise=Zn,rn[ur].praise_count=zn.praise_count,yt({type:Ze.PLUS_DISCUSS,payload:{data:Object(Ke.a)(rn)}}),hn.next=12;break;case 9:hn.prev=9,hn.t0=hn.catch(0),console.log(hn.t0);case 12:case"end":return hn.stop()}},fn,null,[[0,9]])})),Qn.apply(this,arguments)}function ir(){return lr.apply(this,arguments)}function lr(){return lr=Object(h.a)(i.a.mark(function fn(){var Yn,Zn,ur,zn,Gn;return i.a.wrap(function(wn){for(;;)switch(wn.prev=wn.next){case 0:if(Yn=An.id,Zn=An.params,ur=An.type,zn=An.index,Gn=An.parentDiscussIndex,!(ur==="hidden-discuss")){wn.next=7;break}return console.log(Zn,"params"),wn.next=5,Ge(Object(o.a)({id:Yn,container_type:"Practice",container_identifier:Et},Zn));case 5:Gn?rn[Gn].children[zn].hidden=Zn.hidden==1:rn[zn].hidden=Zn.hidden==1,yt({type:Ze.SET_ACTION_TYPE,payload:{actionType:null,data:Object(Ke.a)(rn)}});case 7:if(!(ur==="delete-discuss")){wn.next=13;break}return wn.next=10,qe({id:Yn,container_type:"Practice",container_identifier:Et});case 10:return yt({type:Ze.SET_ACTION_TYPE,payload:{actionType:null}}),wn.next=13,Xn();case 13:case"end":return wn.stop()}},fn)})),lr.apply(this,arguments)}function mr(){yt({type:Ze.SET_ACTION_TYPE,payload:{actionType:null}})}function Jn(fn,Yn){return or.apply(this,arguments)}function or(){return or=Object(h.a)(i.a.mark(function fn(Yn,Zn){return i.a.wrap(function(zn){for(;;)switch(zn.prev=zn.next){case 0:return zn.prev=0,zn.next=3,Ee({container_type:"Practice",container_identifier:Et,comments:{content:Zn,parent_id:Yn}});case 3:Xn(),zn.next=9;break;case 6:zn.prev=6,zn.t0=zn.catch(0),console.log(zn.t0);case 9:case"end":return zn.stop()}},fn,null,[[0,6]])})),or.apply(this,arguments)}function kn(fn){return Ft.apply(this,arguments)}function Ft(){return Ft=Object(h.a)(i.a.mark(function fn(Yn){return i.a.wrap(function(ur){for(;;)switch(ur.prev=ur.next){case 0:return yt({type:Ze.SHOW_DISCUSSES_LOADING}),ur.next=3,be({comments:{content:Yn},container_type:"Practice",container_identifier:Et});case 3:Xn();case 4:case"end":return ur.stop()}},fn)})),Ft.apply(this,arguments)}return t.a.createElement(t.a.Fragment,null,t.a.createElement("div",{className:"discuss-panel"},rn.length===0?t.a.createElement(M.a,null):rn.map(function(fn,Yn){return t.a.createElement(lt,{onReplyDiscuss:Jn,onPlusDiscuss:yr,onSetActiveDiscussIndex:Fn,onSetActionType:Ln,data:fn,index:Yn,user:ut,activeDiscussIndex:vn})}),Hn>10?t.a.createElement("div",{className:"pagination-container"},t.a.createElement(Ae.a,{showQuickJumper:!0,onChange:Cn,current:Lt,total:Hn})):null),t.a.createElement(je,{user_praise:Dt.user_praise,praise_count:Dt.praises_count,praisePlus:on,discuss_count:Dt.comments_count,onCreateDiscuss:kn}),t.a.createElement(Ne.a,null,t.a.createElement(p.a,{centered:!0,title:"\u63D0\u793A",visible:!!An,onOk:ir,onCancel:mr},t.a.createElement("p",null,An?An.message:"")),t.a.createElement(ft.a,null)))},st=z("1FX+"),gt=z.n(st),kt=z("pYxM"),Wt=z.n(kt),Qt=z("sB/4"),we=z.n(Qt),fe=z("Wtmd"),W=z.n(fe),q=z("CNDd"),te=z.n(q),se=z("nCk5"),Se=z.n(se),He=z("kovY"),Je=z.n(He),xt=function(ut){var Et=ut.style,Dt=Et===void 0?{}:Et,on=ut.onClick,an=ut.onAssist,vt=ut.onHide,dt=ut.data,Ht=ut.active,yt=ut.showLine;return t.a.createElement(t.a.Fragment,null,t.a.createElement("div",{className:Ht===(dt==null?void 0:dt.id)?"".concat(Wt.a.list," ").concat(Wt.a.active):Wt.a.list,style:Dt,onClick:function(){return on(dt)}},(dt==null?void 0:dt.video)&&t.a.createElement("div",{className:Wt.a.left},t.a.createElement("img",{src:dt==null?void 0:dt.video_cover}),t.a.createElement("div",null,t.a.createElement("img",{src:we.a}),t.a.createElement("span",null,dt==null?void 0:dt.video_duration)),t.a.createElement("div",{className:Wt.a.mask})),t.a.createElement("div",{className:Wt.a.right},t.a.createElement("div",{className:Wt.a.name},t.a.createElement("img",{src:E.a.IMG_SERVER+"/images/"+(dt==null?void 0:dt.image_url),width:30,height:30}),t.a.createElement("div",{title:dt==null?void 0:dt.name,className:Wt.a.title},dt==null?void 0:dt.name),(dt==null?void 0:dt.is_authority)&&t.a.createElement("div",{className:Wt.a.b},"\u5B98\u65B9"),(dt==null?void 0:dt.is_excellent)&&t.a.createElement("div",{className:Wt.a.a},"\u7CBE\u9009")),t.a.createElement("div",{className:Wt.a.des},t.a.createElement(rt.a,{showLines:2,showTextOnly:!0,value:(dt==null?void 0:dt.content)||"\u6682\u65E0\u5185\u5BB9"})),t.a.createElement("div",{className:Wt.a.tag},t.a.createElement("span",{className:"current",onClick:function(Lt){Lt.stopPropagation(),an(dt)}},t.a.createElement("img",{src:dt!=null&&dt.user_liker?te.a:W.a}),t.a.createElement("span",{style:{color:dt!=null&&dt.user_liker?"#0152d9":"#656f87"}},dt==null?void 0:dt.praises_count)),t.a.createElement("span",null,t.a.createElement("img",{src:Se.a}),t.a.createElement("span",null,dt==null?void 0:dt.discusses_count)),t.a.createElement("span",null,t.a.createElement("img",{src:Je.a}),t.a.createElement("span",null,dt==null?void 0:dt.viewed_count)),Object(Rt.v)()&&t.a.createElement("span",{className:"current",style:{color:"#0152d9",marginRight:0,userSelect:"none"},onClick:function(Lt){Lt.stopPropagation(),vt(dt)}},dt!=null&&dt.is_hidden?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF")))),yt&&t.a.createElement("div",{className:Wt.a.line}))},Ct=xt,it=z("5Dmo"),St=z("3S7+"),Xt=z("Z8dc"),bt=z.n(Xt),ht=z("Aky1"),Jt=z("7+5b"),Nt=z.n(Jt),mt=z("twBr"),cn=z.n(mt),bn=z("oE5q"),sn=z.n(bn),dn=function(ut,Et){var Dt,on,an,vt=Et.payload.uploadInfo,dt=vt===void 0?{}:vt;switch(Et.type){case"addVideo":return{videoList:[].concat(Object(Ke.a)(ut.videoList),[{name:dt.file.name,size:dt.file.size,type:dt.file.type,fileHash:dt.fileHash,state:dt.state,video_id:dt.videoId,attachment_id:"",article_id:-1,loaded:0,title:""}])};case"removeVideo":return{videoList:ut.videoList.filter(function(Ht){return Ht.name!==Et.payload.name})};case"replaceVideo":return{videoList:Et.payload};case"removeAll":return[];case"updateProgress":return{videoList:ut.videoList.map(function(Ht){return Ht.name===Et.payload.uploadInfo.file.name?Object(o.a)(Object(o.a)({},Ht),{loaded:Et.payload.progressPercent,video_id:dt.videoId,fileHash:dt.fileHash}):Ht})};case"updateTitle":return{videoList:(Dt=ut.videoList)===null||Dt===void 0?void 0:Dt.map(function(Ht){return Ht.name===Et.payload.item.name?Object(o.a)(Object(o.a)({},Ht),{title:Et.payload.title}):Ht})};case"updateImg":return{videoList:(on=ut.videoList)===null||on===void 0?void 0:on.map(function(Ht){return Ht.name===Et.payload.item.name?Object(o.a)(Object(o.a)({},Ht),{attachment_id:Et.payload.attachment_id}):Ht})};case"updateImg":return{videoList:(an=ut.videoList)===null||an===void 0?void 0:an.map(function(Ht){return Ht.name===Et.payload.item.name?Object(o.a)(Object(o.a)({},Ht),{attachment_id:Et.payload.attachment_id}):Ht})};default:return[]}},Nn=function(ut){var Et,Dt,on=ut.onClose,an=ut.onOk,vt=ut.identifier,dt=ut.active,Ht=G.a.useForm(),yt=Object(d.a)(Ht,1),en=yt[0],Lt=Object(n.useState)({}),rn=Object(d.a)(Lt,2),Hn=rn[0],An=rn[1],vn=Object(n.useState)(!1),Xn=Object(d.a)(vn,2),Cn=Xn[0],Ln=Xn[1],Fn=Object(n.useState)(!1),yr=Object(d.a)(Fn,2),Qn=yr[0],ir=yr[1],lr=Object(n.useReducer)(dn,{videoList:[]}),mr=Object(d.a)(lr,2),Jn=mr[0],or=mr[1],kn=Object(Rt.x)(),Ft=Object(g.i)(),fn=Object(n.useRef)();Object(n.useEffect)(function(){dt&&Yn()},[dt]);var Yn=function(){var pn=Object(h.a)(i.a.mark(function Dn(){var _n,Bn,er,fr,wr,Yr,Li,Kr,Mi,qi,Ui,ti;return i.a.wrap(function(Wn){for(;;)switch(Wn.prev=Wn.next){case 0:return Wn.next=2,Object(v.k)(vt,{active:dt});case 2:_n=Wn.sent,(_n==null?void 0:_n.status)===0&&(Yr={name:_n==null||((Bn=_n.data)===null||Bn===void 0)?void 0:Bn.name,content:_n==null||((er=_n.data)===null||er===void 0)?void 0:er.content},en.setFieldsValue(Yr),An(Yr),_n!=null&&(fr=_n.data)!==null&&fr!==void 0&&(wr=fr.videos)!==null&&wr!==void 0&&wr[0]&&or({type:"replaceVideo",payload:[{video_id:_n==null||((Li=_n.data)===null||Li===void 0||((Kr=Li.videos)===null||Kr===void 0||((Mi=Kr[0])===null||Mi===void 0)))?void 0:Mi.video_id,name:_n==null||((qi=_n.data)===null||qi===void 0||((Ui=qi.videos)===null||Ui===void 0||((ti=Ui[0])===null||ti===void 0)))?void 0:ti.title,loaded:100}]}));case 4:case"end":return Wn.stop()}},Dn)}));return function(){return pn.apply(this,arguments)}}(),Zn=function(Dn,_n){An(Object(o.a)({},_n))},ur=function(){var pn=Object(h.a)(i.a.mark(function Dn(_n){var Bn,er,fr,wr,Yr;return i.a.wrap(function(Kr){for(;;)switch(Kr.prev=Kr.next){case 0:if(er={videos:Jn.videoList,articles:_n},ir(!0),!dt){Kr.next=9;break}return er.active=dt,Kr.next=6,Object(v.j)(vt,er);case 6:fr=Kr.sent,Kr.next=12;break;case 9:return Kr.next=11,Object(v.a)(vt,er);case 11:fr=Kr.sent;case 12:((Bn=fr)===null||Bn===void 0?void 0:Bn.status)===0&&(console.log(dt||((wr=fr)===null||wr===void 0?void 0:wr.id),44),an(dt||((Yr=fr)===null||Yr===void 0?void 0:Yr.id))),ir(!1);case 14:case"end":return Kr.stop()}},Dn)}));return function(_n){return pn.apply(this,arguments)}}(),zn=function(){var Dn=document.getElementById("fileUpload");Dn.value=""},Gn=function(Dn){var _n='{"Vod":{}}';if(Ln(!0),fn.current){fn.current.addFile(Dn,null,null,null,_n);return}Object(ht.a)(kn==null?void 0:kn.login,"",{create:!fn,addFileSuccess:function(er){or({type:"addVideo",payload:{uploadInfo:er}})},onUploadProgress:function(er,fr,wr){var Yr=Math.ceil(wr*100);or({type:"updateProgress",payload:{uploadInfo:er,progressPercent:Yr}}),zn()},onUploadFailed:function(er){T.b.info("\u89C6\u9891\u4E91\u670D\u52A1\u51FA\u73B0\u5F02\u5E38\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20\u3002")},onUploadEnd:function(er){Ln(!1)},onUploadSucceed:function(er){Ln(!1)},onUploadError:function(er){Ln(!1)},gotUploader:function(er){er.addFile(Dn,null,null,null,_n),fn.current=er}})},hn=function(Dn){var _n,Bn=1024,er=Dn.target.files[0];if(!er){zn();return}var fr=er.name.toLowerCase();if(fr&&fr.indexOf(".avi")==-1&&fr.indexOf(".flv")==-1&&fr.indexOf(".f4v")==-1&&fr.indexOf(".m4v")==-1&&fr.indexOf(".mov")==-1&&fr.indexOf(".mp4")==-1&&fr.indexOf(".rmvb")==-1&&fr.indexOf(".swf")==-1&&fr.indexOf(".webm")==-1&&fr.indexOf(".wmv")==-1){T.b.info("\u4E0D\u652F\u6301\u7684\u89C6\u9891\u683C\u5F0F"),zn();return}if(er.size>Bn*1024*1024){T.b.info("\u89C6\u9891\u5927\u5C0F\u8D85\u8FC7".concat(Bn,"M")),zn();return}if((_n=Jn.videoList)!==null&&_n!==void 0&&_n.find(function(wr){return wr.name===er.name})){T.b.info("\u4F60\u4E0D\u80FD\u4E0A\u4F20\u540C\u4E00\u4E2A\u89C6\u9891\u6587\u4EF6\u540D\u79F0\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u3002"),zn();return}Gn(er)},wn=function(Dn,_n){p.a.confirm({title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:t.a.createElement("div",{className:"tc"},"\u60A8\u786E\u8BA4\u8981",_n?"\u5220\u9664":"\u53D6\u6D88\u4E0A\u4F20","\u8BE5\u89C6\u9891\u5417\uFF1F"),onOk:function(){zn(),or({type:"removeVideo",payload:{name:Dn}})}})},jt=function(){return t.a.createElement("label",{htmlFor:"fileUpload",className:bt.a.main},t.a.createElement("img",{src:Nt.a,alt:""}),t.a.createElement("span",null,"\u4E0A\u4F20\u89C6\u9891"))},Bt=function(Dn){return t.a.createElement("div",{className:bt.a.mainLoading},t.a.createElement("div",{className:bt.a.proWarp},t.a.createElement("div",{className:bt.a.pro},t.a.createElement("div",{style:{width:Dn}})),t.a.createElement("span",null,Dn||0,"%")),t.a.createElement("aside",null,"\u4E0A\u4F20\u4E2D"),t.a.createElement("div",{className:bt.a.tip},t.a.createElement(St.a,{getPopupContainer:function(Bn){return Bn.parentNode},title:t.a.createElement("div",null,t.a.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",t.a.createElement("a",{className:"current c-light-primary",target:"_blank",href:"/users/innov/videos/protocol"},"\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"),"\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B"),t.a.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),t.a.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},t.a.createElement("img",{src:sn.a,alt:""}))))},$t=function(Dn){return t.a.createElement("div",{className:bt.a.mainSucceed},t.a.createElement("img",{src:cn.a,alt:""}),t.a.createElement("span",null,"\u4E0A\u4F20\u6210\u529F"),t.a.createElement("div",{className:bt.a.tip},t.a.createElement(St.a,{getPopupContainer:function(Bn){return Bn.parentNode},title:t.a.createElement("div",null,t.a.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",t.a.createElement("a",{className:"current c-light-primary",target:"_blank",href:"/users/innov/videos/protocol"},"\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"),"\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B"),t.a.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),t.a.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},t.a.createElement("img",{src:sn.a,alt:""}))),t.a.createElement("div",{className:bt.a.del,onClick:function(){return wn(Dn.name,Dn.loaded==100)}},t.a.createElement("i",{className:"iconfont icon-shanchu7 mr5"}),"\u5220\u9664\u89C6\u9891"))},gn=function(){var Dn;return t.a.createElement(t.a.Fragment,null,(Dn=Jn.videoList)===null||Dn===void 0?void 0:Dn.map(function(_n,Bn){return t.a.createElement(t.a.Fragment,{key:Bn},_n.loaded==100?$t(_n):Bt(_n.loaded))}))},nn=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:on})},In=(Et=Jn.videoList)===null||Et===void 0?void 0:Et.length;return t.a.createElement("div",{className:bt.a.listForm},t.a.createElement("header",null,dt?"\u7F16\u8F91":"\u53D1\u5E03","\u9898\u89E3"),t.a.createElement("section",{className:bt.a.scroll,id:"sss"},t.a.createElement("div",{className:bt.a.formWrap}," ",t.a.createElement(G.a,{form:en,scrollToFirstError:!0,layout:"vertical",onValuesChange:Zn,onFinish:ur},t.a.createElement(G.a.Item,{name:"name",label:"\u6807\u9898:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u540D\u79F0"},{max:60,message:"\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},t.a.createElement(J.a,{bordered:!1,placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26",suffix:"".concat(((Dt=Hn.name)===null||Dt===void 0?void 0:Dt.length)||0,"/60")})),t.a.createElement(G.a.Item,{name:"content",label:"\u5185\u5BB9:"},t.a.createElement(Te.a,{defaultValue:Hn.content||"",watch:!0})))),t.a.createElement("div",{className:bt.a.upload},In?gn():jt(),t.a.createElement("input",{type:"file",id:"fileUpload",style:{display:"none"},onChange:hn,accept:".mkv, .flv, .f4v, .rmvb, .swf, video/mp4,video/x-m4v,video/flv,video/f4v,video/rmvb,video/swf,video/*"}))),t.a.createElement("div",{className:bt.a.btns},t.a.createElement(ne.a,{onClick:nn,type:"primary",ghost:!0},"\u5173\u95ED"),t.a.createElement(ne.a,{loading:Qn,disabled:Cn,onClick:function(){return en.submit()},type:"primary"},"\u53D1\u5E03\u9898\u89E3")))},Kt=Nn,et=z("cWXX"),Ut=z("/ezw"),Yt=z("CaVn"),Vt=z.n(Yt),En=z("s8/Y"),sr=z.n(En),nr=z("JOrW"),jn=z.n(nr),cr=z("gqXR"),qn=z.n(cr),Wr=z("14J3"),_r=z("BMrR"),Rr=z("jCWc"),Tr=z("kPKH"),Vr=z("wW8i"),Ur=z.n(Vr),xi=z("MVJL"),kr=z.n(xi),Oi=function(ut){var Et=ut.id,Dt=ut.cb,on=Object(n.useState)(""),an=Object(d.a)(on,2),vt=an[0],dt=an[1];return t.a.createElement("aside",{className:"mt10"},t.a.createElement(Te.a,{defaultValue:vt,id:"writeForumsReviewId",onChange:function(yt){dt(yt)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),t.a.createElement(_r.a,null,t.a.createElement(Tr.a,{flex:"1"}),t.a.createElement(Tr.a,null,t.a.createElement(ne.a,{type:"primary",size:"large",onClick:Object(h.a)(i.a.mark(function Ht(){return i.a.wrap(function(en){for(;;)switch(en.prev=en.next){case 0:vt===""?T.b.error("\u8BF7\u8F93\u5165\u5185\u5BB9"):Dt(Et,vt);case 1:case"end":return en.stop()}},Ht)}))},"\u53D1\u9001"))))},ri=function(ut){var Et,Dt=ut.data;return t.a.createElement("div",{className:kr.a.thirdlyLevelDiscuss},t.a.createElement("span",{className:"c-grey-333"},t.a.createElement("span",{className:"font 14 c-light-primary"},Dt==null||((Et=Dt.author)===null||Et===void 0)?void 0:Et.name),"@",t.a.createElement("span",{className:"font 14 c-light-primary"},Dt==null?void 0:Dt.parent_name),":"),t.a.createElement(rt.a,{value:Dt==null?void 0:Dt.content}))},Xr=function(ut){var Et,Dt,on,an,vt=ut.data,dt=ut.onReplyDiscuss,Ht=ut.thirdlyReply,yt=ut.setThirdlyReply,en=Object(Rt.x)();return console.log(en,"user"),t.a.createElement("div",{className:kr.a.list},t.a.createElement("img",{src:E.a.IMG_SERVER+"/images/"+(vt==null||((Et=vt.author)===null||Et===void 0)?void 0:Et.image_url)}),t.a.createElement("div",{className:kr.a.wrap},t.a.createElement("div",{className:"font14",style:{marginBottom:6}},t.a.createElement("span",{className:"c-grey-333"},vt==null||((Dt=vt.author)===null||Dt===void 0)?void 0:Dt.name),(en==null?void 0:en.login)!==(vt==null||((on=vt.author)===null||on===void 0)?void 0:on.login)&&t.a.createElement("span",{onClick:function(){return yt(vt==null?void 0:vt.id)},className:"c-grey-999 current",style:{float:"right"}},t.a.createElement("i",{className:"iconfont icon-huifu3 mr3 font12"}),t.a.createElement("span",null,"\u56DE\u590D"))),t.a.createElement(rt.a,{value:vt==null?void 0:vt.content}),vt==null||((an=vt.children)===null||an===void 0)?void 0:an.map(function(Lt){return t.a.createElement(ri,{key:Lt.id,data:Lt})}),Ht===(vt==null?void 0:vt.id)&&t.a.createElement("div",null,t.a.createElement(Oi,{id:vt==null?void 0:vt.id,cb:dt}),t.a.createElement("div",{style:{textAlign:"end",paddingTop:20},onClick:function(){return yt(null)},className:"c-light-primary current"},t.a.createElement("i",{style:{transform:"scale(0.7)",display:"inline-block"},className:"iconfont icon-shouqi font12"}),"\u6536\u8D77\u56DE\u590D")),t.a.createElement("div",{className:kr.a.line})))},di=function(ut){var Et,Dt,on,an,vt=ut.data,dt=ut.onReplyDiscuss,Ht=ut.secondReply,yt=ut.setSecondReply,en=ut.thirdlyReply,Lt=ut.setThirdlyReply,rn=ut.onPlusDiscuss,Hn=Object(n.useState)(!1),An=Object(d.a)(Hn,2),vn=An[0],Xn=An[1];return console.log(vt,"data"),t.a.createElement("div",{className:kr.a.discussItem},t.a.createElement("div",{className:kr.a.list},t.a.createElement("img",{src:E.a.IMG_SERVER+"/images/"+(vt==null||((Et=vt.author)===null||Et===void 0)?void 0:Et.image_url)}),t.a.createElement("div",{className:kr.a.wrap},t.a.createElement("div",{className:"font14",style:{marginBottom:6}},t.a.createElement("span",{className:"c-grey-333 mr30"},vt==null||((Dt=vt.author)===null||Dt===void 0)?void 0:Dt.name),t.a.createElement("span",{className:"c-grey-999"},vt==null?void 0:vt.time)),t.a.createElement(rt.a,{value:vt==null?void 0:vt.content}),t.a.createElement("div",{className:kr.a.btns},t.a.createElement("div",{onClick:function(){return rn(vt==null?void 0:vt.id)},className:vt!=null&&vt.user_praise?"c-light-primary":"c-grey-999"},t.a.createElement("i",{className:"iconfont icon-xiaodianzan2 mr3"}),t.a.createElement("span",null,vt==null?void 0:vt.praise_count)),t.a.createElement("div",{onClick:function(){var Ln;if((vt==null||((Ln=vt.children)===null||Ln===void 0)?void 0:Ln.length)===0)return;yt(null),Xn(!vn)},style:{color:vn?"#0152d9":"#999999"}},t.a.createElement("i",{className:"iconfont icon-xiaopinglun2 mr3"}),t.a.createElement("span",null,vn?"\u6536\u8D77\u8BC4\u8BBA":vt==null||((on=vt.children)===null||on===void 0)?void 0:on.length)),t.a.createElement("div",{onClick:function(){Xn(!1),yt(Ht===(vt==null?void 0:vt.id)?null:vt==null?void 0:vt.id)},style:{color:Ht===(vt==null?void 0:vt.id)?"#0152d9":"#999999"}},t.a.createElement("i",{className:"iconfont icon-huifu3 mr3"}),t.a.createElement("span",null,Ht===(vt==null?void 0:vt.id)?"\u6536\u8D77\u56DE\u590D":"\u56DE\u590D"))),Ht===(vt==null?void 0:vt.id)&&t.a.createElement(Oi,{id:vt==null?void 0:vt.id,cb:function(Ln,Fn){dt(Ln,Fn),Xn(!0)}}),vn&&t.a.createElement("div",{className:kr.a.secondLevelDiscuss},vt==null||((an=vt.children)===null||an===void 0)?void 0:an.map(function(Cn){return t.a.createElement(Xr,{thirdlyReply:en,setThirdlyReply:Lt,key:Cn.id,data:Cn,onReplyDiscuss:dt})})))))},Si=di,si=function(ut){var Et=ut.identifier,Dt=ut.active,on=ut.onOk,an=Object(n.useState)(""),vt=Object(d.a)(an,2),dt=vt[0],Ht=vt[1],yt=Object(n.useState)(1),en=Object(d.a)(yt,2),Lt=en[0],rn=en[1],Hn=Object(n.useState)([]),An=Object(d.a)(Hn,2),vn=An[0],Xn=An[1],Cn=Object(n.useState)(0),Ln=Object(d.a)(Cn,2),Fn=Ln[0],yr=Ln[1],Qn=Object(n.useState)(null),ir=Object(d.a)(Qn,2),lr=ir[0],mr=ir[1],Jn=Object(n.useState)(null),or=Object(d.a)(Jn,2),kn=or[0],Ft=or[1];Object(n.useEffect)(function(){fn(1),rn(1)},[Dt]);var fn=function(){var Gn=Object(h.a)(i.a.mark(function hn(wn){var jt;return i.a.wrap(function($t){for(;;)switch($t.prev=$t.next){case 0:return $t.next=2,he({container_type:"QuestionSolutionArticle",container_identifier:Dt,limit:5,page:wn});case 2:jt=$t.sent,jt!=null&&jt.comments&&(Xn((jt==null?void 0:jt.comments)||[]),rn(wn),yr(jt==null?void 0:jt.disscuss_count));case 4:case"end":return $t.stop()}},hn)}));return function(wn){return Gn.apply(this,arguments)}}(),Yn=function(){var Gn=Object(h.a)(i.a.mark(function hn(){var wn;return i.a.wrap(function(Bt){for(;;)switch(Bt.prev=Bt.next){case 0:if(!(dt==="")){Bt.next=3;break}return T.b.error("\u8BF7\u8F93\u5165\u5185\u5BB9"),Bt.abrupt("return");case 3:return Bt.next=5,be({comments:{content:dt},container_type:"QuestionSolutionArticle",container_identifier:Dt});case 5:wn=Bt.sent,wn!=null&&wn.discuss&&(Ht(""),fn(Lt),on());case 7:case"end":return Bt.stop()}},hn)}));return function(){return Gn.apply(this,arguments)}}(),Zn=function(){var Gn=Object(h.a)(i.a.mark(function hn(wn,jt,Bt){var $t;return i.a.wrap(function(nn){for(;;)switch(nn.prev=nn.next){case 0:return nn.next=2,Ee({container_type:"QuestionSolutionArticle",container_identifier:Dt,comments:{content:jt,parent_id:wn}});case 2:$t=nn.sent,mr(null),Ft(null),fn(Lt);case 6:case"end":return nn.stop()}},hn)}));return function(wn,jt,Bt){return Gn.apply(this,arguments)}}(),ur=function(){var Gn=Object(h.a)(i.a.mark(function hn(wn){var jt;return i.a.wrap(function($t){for(;;)switch($t.prev=$t.next){case 0:return $t.next=2,ve(wn);case 2:jt=$t.sent,fn(Lt);case 4:case"end":return $t.stop()}},hn)}));return function(wn){return Gn.apply(this,arguments)}}(),zn=function(hn){rn(hn),fn(hn)};return t.a.createElement("div",{className:Ur.a.discuss},t.a.createElement("aside",{className:Ur.a.reply,style:{borderWidth:Fn?1:0}},t.a.createElement(Te.a,{defaultValue:dt,id:"writeForumsReviewId",onChange:function(hn){Ht(hn)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),t.a.createElement(_r.a,null,t.a.createElement(Tr.a,{flex:"1"}),t.a.createElement(Tr.a,null,t.a.createElement(ne.a,{type:"primary",size:"large",onClick:function(){return Yn()}},"\u53D1\u9001")))),vn==null?void 0:vn.map(function(Gn){return t.a.createElement(Si,{secondReply:lr,setSecondReply:mr,thirdlyReply:kn,setThirdlyReply:Ft,key:Gn.id,data:Gn,onReplyDiscuss:Zn,onPlusDiscuss:ur})}),t.a.createElement(Ae.a,{className:Ur.a.pagination,showTotal:function(hn){return t.a.createElement("span",{style:{color:"#656F87"}},"\u5171",t.a.createElement("span",{className:"c-light-primary"},hn),"\u6761\u6570\u636E")},current:Lt,onChange:zn,total:Fn,showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,pageSize:5}))},fi=si,gr=z("hgre"),dr=function(ut){var Et,Dt,on,an,vt,dt,Ht,yt,en,Lt,rn=ut.active,Hn=ut.identifier,An=ut.onAssist,vn=ut.onEdit,Xn=ut.onArticlesSkip,Cn=ut.onClose,Ln=ut.onOk,Fn=ut.onDelete,yr=ut.detailsIndex,Qn=ut.btnShowStatus,ir=Object(n.useState)(!0),lr=Object(d.a)(ir,2),mr=lr[0],Jn=lr[1],or=Object(n.useState)({}),kn=Object(d.a)(or,2),Ft=kn[0],fn=kn[1];Object(n.useEffect)(function(){rn&&Yn()},[rn,yr]);var Yn=function(){var hn=Object(h.a)(i.a.mark(function wn(){var jt,Bt,$t=arguments;return i.a.wrap(function(nn){for(;;)switch(nn.prev=nn.next){case 0:return jt=$t.length>0&&$t[0]!==void 0?$t[0]:!0,jt&&Jn(!0),nn.next=4,Object(v.d)(Hn,{active:rn});case 4:Bt=nn.sent,(Bt==null?void 0:Bt.status)===0&&fn((Bt==null?void 0:Bt.data)||{}),Jn(!1);case 7:case"end":return nn.stop()}},wn)}));return function(){return hn.apply(this,arguments)}}(),Zn=function(){var hn=Object(h.a)(i.a.mark(function wn(jt){var Bt;return i.a.wrap(function(gn){for(;;)switch(gn.prev=gn.next){case 0:return gn.next=2,Object(v.g)(Hn,Object(o.a)({active:rn},jt));case 2:Bt=gn.sent,(Bt==null?void 0:Bt.status)===0&&(Yn(!1),Ln());case 4:case"end":return gn.stop()}},wn)}));return function(jt){return hn.apply(this,arguments)}}(),ur=function(){var hn=Object(h.a)(i.a.mark(function wn(jt){var Bt;return i.a.wrap(function(gn){for(;;)switch(gn.prev=gn.next){case 0:return gn.next=2,Object(v.c)(Hn,{active:jt==null?void 0:jt.id});case 2:Bt=gn.sent,Bt.status===0&&(Yn(!1),Ln());case 4:case"end":return gn.stop()}},wn)}));return function(jt){return hn.apply(this,arguments)}}(),zn=function(wn){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 Fn(wn)}})},Gn=function(){Yn(!1),Ln()};return t.a.createElement("div",{className:Vt.a.listDetails},t.a.createElement(Ut.a,{className:"pt20 pl20 pr20",loading:mr,active:!0,paragraph:{rows:5}},t.a.createElement("div",{className:Vt.a.head},t.a.createElement("div",{className:Vt.a.name},t.a.createElement("div",{title:Ft==null?void 0:Ft.name,className:Vt.a.title},Ft==null?void 0:Ft.name),(Ft==null?void 0:Ft.is_authority)&&t.a.createElement("div",{className:Vt.a.b},"\u5B98\u65B9"),(Ft==null?void 0:Ft.is_excellent)&&t.a.createElement("div",{className:Vt.a.a},"\u7CBE\u9009")),t.a.createElement("div",{className:Vt.a.tag},t.a.createElement("img",{src:E.a.IMG_SERVER+"/images/"+(Ft==null?void 0:Ft.image_url)}),t.a.createElement("div",{className:"c-grey-333 ml5 mr20 font14"},Ft==null?void 0:Ft.username),t.a.createElement("div",{style:{display:"inline-block",marginBottom:-2},className:"c-grey-999 mr20 font12"},"\u53D1\u5E03\u4E8E",Ue()(Ft==null?void 0:Ft.created_at).format("YYYY-MM-DD")),t.a.createElement("span",null,t.a.createElement("img",{src:W.a}),t.a.createElement("span",null,Ft==null?void 0:Ft.praises_count)),t.a.createElement("span",null,t.a.createElement("img",{src:Se.a}),t.a.createElement("span",null,Ft==null?void 0:Ft.discusses_count)),t.a.createElement("span",null,t.a.createElement("img",{src:Je.a}),t.a.createElement("span",null,Ft==null?void 0:Ft.viewed_count)),t.a.createElement("div",{className:Vt.a.btn},(Object(Rt.v)()||(Ft==null?void 0:Ft.is_self))&&t.a.createElement(t.a.Fragment,null,t.a.createElement(ne.a,{onClick:function(){return zn(Ft)},type:"primary",ghost:!0},"\u5220\u9664"),t.a.createElement(ne.a,{onClick:function(){return vn(Ft)},type:"primary",ghost:!0},"\u7F16\u8F91")),Object(Rt.v)()&&t.a.createElement(ne.a,{onClick:function(){return Zn({is_authority:!(Ft!=null&&Ft.is_authority)})},type:"primary"},t.a.createElement("img",{src:jn.a}),Ft!=null&&Ft.is_authority?"\u53D6\u6D88":"\u8BBE\u4E3A","\u5B98\u65B9"),Object(Rt.v)()&&t.a.createElement(ne.a,{onClick:function(){return Zn({is_excellent:!(Ft!=null&&Ft.is_excellent)})},type:"primary"},t.a.createElement("img",{src:sr.a}),Ft!=null&&Ft.is_excellent?"\u53D6\u6D88":"\u8BBE\u4E3A","\u7CBE\u9009")))),t.a.createElement("div",{className:Vt.a.scroll},(Ft==null||((Et=Ft.videos)===null||Et===void 0||((Dt=Et[0])===null||Dt===void 0))?void 0:Dt.id)&&t.a.createElement("div",{className:Vt.a.video},t.a.createElement(S.a,{tip:"\u6B63\u5728\u8F6C\u7801\uFF0C\u8BF7\u7A0D\u7B49...",spinning:!(Ft!=null&&(on=Ft.videos)!==null&&on!==void 0&&(an=on[0])!==null&&an!==void 0&&an.transcoded)},t.a.createElement(gr.a,{poster:Ft==null||((vt=Ft.videos)===null||vt===void 0||((dt=vt[0])===null||dt===void 0))?void 0:dt.cover_url,src:(Ft==null||((Ht=Ft.videos)===null||Ht===void 0||((yt=Ht[0])===null||yt===void 0))?void 0:yt.play_url)||"",videoId:Ft==null||((en=Ft.videos)===null||en===void 0||((Lt=en[0])===null||Lt===void 0))?void 0:Lt.id,logWatchHistory:function(){}}))),t.a.createElement(rt.a,{className:Vt.a.html,value:(Ft==null?void 0:Ft.content)||""}),t.a.createElement("div",{onClick:function(){return ur(Ft)},className:Vt.a.g},t.a.createElement("img",{className:"mr10",src:(Ft!=null&&Ft.user_liker,qn.a)}),t.a.createElement("span",null,Ft==null?void 0:Ft.praises_count)),t.a.createElement(fi,{onOk:Gn,active:rn,identifier:Hn})),t.a.createElement("div",{className:Vt.a.btns},t.a.createElement(ne.a,{onClick:function(){return Cn()},type:"primary",ghost:!0},"\u5173\u95ED"),Qn[0]&&t.a.createElement(ne.a,{onClick:function(wn){return Xn(wn,"prev")},style:{marginLeft:20},type:"primary"},"\u4E0A\u4E00\u9898\u89E3"),Qn[1]&&t.a.createElement(ne.a,{onClick:function(wn){return Xn(wn,"next")},style:{marginLeft:20},type:"primary"},"\u4E0B\u4E00\u9898\u89E3"))))},ii=dr,li=z("3tLw"),Ni=z.n(li),wi=z("ek7X"),ua=z("0NbB"),ca=function(ut){var Et=ut.identifier,Dt=ut.tabStatus,on=ut.setFilterListTotal,an=ut.setListStatus,vt={page:1,limit:10,total:0,search:"",save_search:"",sort_by:"updated_at",sort_direction:null},dt=Object(n.useState)(Object(o.a)({},vt)),Ht=Object(d.a)(dt,2),yt=Ht[0],en=Ht[1],Lt=Object(n.useState)(!1),rn=Object(d.a)(Lt,2),Hn=rn[0],An=rn[1],vn=Object(n.useState)(0),Xn=Object(d.a)(vn,2),Cn=Xn[0],Ln=Xn[1],Fn=Object(n.useState)(1),yr=Object(d.a)(Fn,2),Qn=yr[0],ir=yr[1],lr=Object(n.useState)(null),mr=Object(d.a)(lr,2),Jn=mr[0],or=mr[1],kn=Object(n.useState)([]),Ft=Object(d.a)(kn,2),fn=Ft[0],Yn=Ft[1],Zn=Object(n.useState)([!0,!0]),ur=Object(d.a)(Zn,2),zn=ur[0],Gn=ur[1],hn=Object(n.useState)(0),wn=Object(d.a)(hn,2),jt=wn[0],Bt=wn[1],$t=Object(n.useRef)(null);Object(n.useEffect)(function(){wr()},[Dt]),Object(n.useEffect)(function(){gn()},[Jn]),Object(n.useEffect)(function(){In(Object(o.a)({},vt)),wr()},[Et]),Object(n.useEffect)(function(){return window.addEventListener("resize",nn),an(jt),function(){window.removeEventListener("resize",nn)}},[jt]);var gn=function(){var Wn=Object(h.a)(i.a.mark(function xn(){var $n,tr;return i.a.wrap(function(Pn){for(;;)switch(Pn.prev=Pn.next){case 0:if(Jn){Pn.next=3;break}return Gn([!0,!0]),Pn.abrupt("return");case 3:$n=[!0,!0],tr=fn==null?void 0:fn.findIndex(function(qr){return qr.id===Jn}),tr===0&&yt.page===1&&($n[0]=!1),(yt.page-1)*yt.limit+(tr+1)===yt.total&&($n[1]=!1),Gn($n);case 8:case"end":return Pn.stop()}},xn)}));return function(){return Wn.apply(this,arguments)}}(),nn=function(){if(jt){var xn,$n=window.innerWidth-((xn=$t.current)===null||xn===void 0?void 0:xn.clientWidth);Ln($n)}},In=function(){var Wn=Object(h.a)(i.a.mark(function xn($n){var tr,Ir,Pn,qr;return i.a.wrap(function(Hr){for(;;)switch(Hr.prev=Hr.next){case 0:return An(!0),Hr.next=3,Object(v.f)(Et,$n);case 3:return tr=Hr.sent,(tr==null?void 0:tr.status)===0&&(Yn((tr==null||((Ir=tr.data)===null||Ir===void 0)?void 0:Ir.articles)||[]),en(Object(o.a)(Object(o.a)({},$n),{},{total:tr==null||((Pn=tr.data)===null||Pn===void 0)?void 0:Pn.articles_count})),on(tr==null||((qr=tr.data)===null||qr===void 0)?void 0:qr.articles_count)),An(!1),Hr.abrupt("return",tr);case 7:case"end":return Hr.stop()}},xn)}));return function($n){return Wn.apply(this,arguments)}}(),pn=function(){(yt==null?void 0:yt.sort_direction)===null?yt.sort_direction="asc":(yt==null?void 0:yt.sort_direction)==="asc"?yt.sort_direction="desc":(yt==null?void 0:yt.sort_direction)==="desc"&&(yt.sort_direction=null),yt.page=1,wr(),en(Object(o.a)({},yt)),In(yt)},Dn=function(){yt.page=1,yt.search=yt==null?void 0:yt.save_search,wr(),en(Object(o.a)({},yt)),In(yt)},_n=function(){var xn,$n=document.getElementsByClassName("btn-resize");$n[0].style.visibility="hidden";var tr=window.innerWidth-((xn=$t.current)===null||xn===void 0?void 0:xn.clientWidth);Ln(tr)},Bn=function(){_n(),Bt(1)},er=function(xn){_n(),or(xn==null?void 0:xn.id),Bt(3)},fr=function(xn){_n(),or(xn==null?void 0:xn.id),Bt(2)},wr=function(){var xn=document.getElementsByClassName("btn-resize");xn[0].style.visibility="visible",Ln(0),Bt(0),or(null)},Yr=function(xn){Bt(3),or(xn),yt.page=1,en(Object(o.a)({},yt)),In(yt)},Li=function(xn){Bt(3),or(xn),en(Object(o.a)({},yt)),In(yt)},Kr=function(xn){en(Object(o.a)({},yt)),In(yt)},Mi=function(){var Wn=Object(h.a)(i.a.mark(function xn($n){var tr;return i.a.wrap(function(Pn){for(;;)switch(Pn.prev=Pn.next){case 0:return Pn.next=2,Object(v.c)(Et,{active:$n==null?void 0:$n.id});case 2:tr=Pn.sent,tr.status===0&&(In(yt),ir(Qn+1));case 4:case"end":return Pn.stop()}},xn)}));return function($n){return Wn.apply(this,arguments)}}(),qi=function(){var Wn=Object(h.a)(i.a.mark(function xn($n){var tr;return i.a.wrap(function(Pn){for(;;)switch(Pn.prev=Pn.next){case 0:return Pn.next=2,Object(v.e)(Et,{active:$n==null?void 0:$n.id});case 2:tr=Pn.sent,tr.status===0&&(In(yt),ir(Qn+1));case 4:case"end":return Pn.stop()}},xn)}));return function($n){return Wn.apply(this,arguments)}}(),Ui=function(){var Wn=Object(h.a)(i.a.mark(function xn($n){var tr;return i.a.wrap(function(Pn){for(;;)switch(Pn.prev=Pn.next){case 0:return Pn.next=2,Object(v.i)(Et,{active:$n==null?void 0:$n.id});case 2:tr=Pn.sent,tr.status===0&&(wr(),In(yt));case 4:case"end":return Pn.stop()}},xn)}));return function($n){return Wn.apply(this,arguments)}}(),ti=function(xn){yt.page=xn,en(Object(o.a)({},yt)),In(yt)},ji=function(){var Wn=Object(h.a)(i.a.mark(function xn($n,tr){var Ir,Pn,qr,Pr,Hr,gi,Ri,Fi,Un,yn,Kn;return i.a.wrap(function(Rn){for(;;)switch(Rn.prev=Rn.next){case 0:if(Ir=fn==null?void 0:fn.findIndex(function(br){return br.id===Jn}),console.log(Ir,tr,22),!(tr==="prev")){Rn.next=21;break}if(!(Ir===void 0)){Rn.next=6;break}return T.b.warn("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728"),Rn.abrupt("return");case 6:if(!(Ir===0)){Rn.next=19;break}if(!(yt.page===1)){Rn.next=10;break}return T.b.warn("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728"),Rn.abrupt("return");case 10:if(!(yt.page!==1)){Rn.next=17;break}return yt.page=yt.page-1,en(Object(o.a)({},yt)),Rn.next=15,In(yt);case 15:Pn=Rn.sent,(Pn==null?void 0:Pn.status)===0&&(gi=Pn==null||((qr=Pn.data)===null||qr===void 0)?void 0:qr.articles[(Pn==null||((Pr=Pn.data)===null||Pr===void 0||((Hr=Pr.articles)===null||Hr===void 0))?void 0:Hr.length)-1],or(gi==null?void 0:gi.id),console.log($n.target,555));case 17:Rn.next=21;break;case 19:Ri=fn[Ir-1],or(Ri==null?void 0:Ri.id);case 21:if(!(tr==="next")){Rn.next=39;break}if(!(Ir===void 0)){Rn.next=25;break}return T.b.warn("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728"),Rn.abrupt("return");case 25:if(!((yt.page-1)*yt.limit+(Ir+1)===yt.total)){Rn.next=28;break}return T.b.warn("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728"),Rn.abrupt("return");case 28:if(!(Ir+1===yt.limit)){Rn.next=37;break}return yt.page=yt.page+1,en(Object(o.a)({},yt)),Rn.next=33,In(yt);case 33:Fi=Rn.sent,(Fi==null?void 0:Fi.status)===0&&(yn=Fi==null||((Un=Fi.data)===null||Un===void 0)?void 0:Un.articles[0],or(yn==null?void 0:yn.id)),Rn.next=39;break;case 37:Kn=fn[Ir+1],or(Kn==null?void 0:Kn.id);case 39:case"end":return Rn.stop()}},xn)}));return function($n,tr){return Wn.apply(this,arguments)}}();return t.a.createElement("div",{className:gt.a.wrap,ref:$t},t.a.createElement("div",{className:gt.a.head},t.a.createElement("div",{className:gt.a.sort,onClick:pn},t.a.createElement("span",null,"\u6700\u65B0"),t.a.createElement("aside",null,t.a.createElement(wi.a,{style:{color:(yt==null?void 0:yt.sort_direction)==="asc"?"#0152d9":"#bfbfbf"}}),t.a.createElement(ua.a,{style:{color:(yt==null?void 0:yt.sort_direction)==="desc"?"#0152d9":"#bfbfbf"}}))),t.a.createElement(J.a.Search,{value:yt.save_search,className:gt.a["oj-width-input"],placeholder:"\u641C\u7D22\u9898\u89E3",onChange:function(xn){yt.save_search=xn.target.value,en(Object(o.a)({},yt))},onSearch:Dn}),t.a.createElement("div",{onClick:Bn,className:gt.a.btn},t.a.createElement("img",{src:Ni.a}),"\u5199\u9898\u89E3")),t.a.createElement("div",{className:gt.a.listWarp},t.a.createElement(S.a,{spinning:Hn,className:"mt20"},fn==null?void 0:fn.map(function(Wn,xn){var $n=!0;return xn+1===fn.length&&xn!==0&&($n=!1),t.a.createElement(Ct,{active:Jn,key:Wn.id,data:Wn,showLine:$n,onClick:er,onAssist:Mi,onHide:qi})}),(fn==null?void 0:fn.length)===0&&t.a.createElement(M.a,{customText:"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"}))),t.a.createElement(Ae.a,{className:gt.a.pagination,showTotal:function(xn){return t.a.createElement("span",{style:{color:"#656F87"}},"\u5171",t.a.createElement("span",{className:"c-light-primary"},xn),"\u6761\u6570\u636E")},total:yt.total,showSizeChanger:!1,current:yt==null?void 0:yt.page,onChange:ti,hideOnSinglePage:!0,showQuickJumper:!0}),jt>0&&t.a.createElement("div",{className:gt.a.fixedRight,style:{width:Cn}},jt===1&&t.a.createElement(Kt,{identifier:Et,onClose:wr,onOk:Yr}),jt===2&&t.a.createElement(Kt,{active:Jn,identifier:Et,onClose:wr,onOk:Li}),jt===3&&t.a.createElement(ii,{btnShowStatus:zn,onArticlesSkip:ji,detailsIndex:Qn,active:Jn,identifier:Et,onClose:wr,onOk:Kr,onEdit:fr,onAssist:Mi,onDelete:Ui})))},hi=ca,Zi=z("VEzc"),ln=z.n(Zi),Tn=function(ut){var Et,Dt=ut.visible,on=ut.onVisible,an=ut.value,vt=ut.onChange,dt=ut.setIndex,Ht={page:1,per_page:30,total:0,tag_discipline_id:[],search:"",save_search:"",difficulty:null},yt=Object(n.useState)(Ht),en=Object(d.a)(yt,2),Lt=en[0],rn=en[1],Hn=Object(n.useState)([]),An=Object(d.a)(Hn,2),vn=An[0],Xn=An[1],Cn=Object(n.useState)([]),Ln=Object(d.a)(Cn,2),Fn=Ln[0],yr=Ln[1],Qn=Object(n.useState)(!1),ir=Object(d.a)(Qn,2),lr=ir[0],mr=ir[1],Jn=Object(n.useRef)([]),or=Object(n.useRef)(null),kn=Object(g.i)();Object(n.useEffect)(function(){return kn!=null&&kn.id&&(or.current=setInterval(function(){Ft(30)},3e4)),function(){clearInterval(or.current)}},[]);var Ft=function(){var jt=Object(h.a)(i.a.mark(function Bt($t){var gn;return i.a.wrap(function(In){for(;;)switch(In.prev=In.next){case 0:return In.next=2,Object(v.r)(kn==null?void 0:kn.id,{practice_time:$t});case 2:gn=In.sent;case 3:case"end":return In.stop()}},Bt)}));return function($t){return jt.apply(this,arguments)}}();Object(n.useEffect)(function(){Gn(Lt),ur()},[]),Object(n.useEffect)(function(){return window.addEventListener("click",Yn),function(){window.removeEventListener("click",Yn)}},[kn==null?void 0:kn.save_identifier,Dt]),Object(n.useEffect)(function(){var jt=Jn.current.findIndex(function(In){return In.identifier===(kn==null?void 0:kn.save_identifier)}),Bt=Jn.current[jt-1],$t=Jn.current[jt+1],gn=document.getElementById("oj-prev"),nn=document.getElementById("oj-next");Bt?gn.style.display="block":gn.style.display="none",$t?nn.style.display="block":nn.style.display="none"},[kn==null?void 0:kn.save_identifier,Jn.current]);var fn=function(Bt,$t){if(Bt.id===$t)return Bt;for(var gn=0,nn=Bt;nn=nn.parentNode;gn++){if(nn.id===$t)return nn;if(nn==document.documentElement)return!1}},Yn=function(){var jt=Object(h.a)(i.a.mark(function Bt($t){var gn,nn,In;return i.a.wrap(function(Dn){for(;;)switch(Dn.prev=Dn.next){case 0:if(!fn($t.target,"oj-drawer")&&Dt&&on(!1),gn=Jn.current.findIndex(function(_n){return _n.identifier===(kn==null?void 0:kn.save_identifier)}),nn=Jn.current[gn-1],In=Jn.current[gn+1],!($t.target.id==="oj-prev")){Dn.next=14;break}if(!(!nn||gn===-1)){Dn.next=8;break}return T.b.warn("\u4E0A\u4E00\u9898\u4E0D\u5B58\u5728"),Dn.abrupt("return");case 8:return $t.target.style.pointerEvents="none",$t.target.style.cursor="not-allowed",Dn.next=12,hn(nn==null?void 0:nn.identifier);case 12:dt("0"),setTimeout(function(){$t.target.style.pointerEvents="auto",$t.target.style.cursor="pointer"},400);case 14:if(!($t.target.id==="oj-next"||$t.target.id==="oj-modal-next")){Dn.next=24;break}if(!(!In||gn===-1)){Dn.next=18;break}return T.b.warn("\u4E0B\u4E00\u9898\u4E0D\u5B58\u5728"),Dn.abrupt("return");case 18:return $t.target.style.pointerEvents="none",$t.target.style.cursor="not-allowed",Dn.next=22,hn(In==null?void 0:In.identifier);case 22:dt("0"),setTimeout(function(){$t.target.style.pointerEvents="auto",$t.target.style.cursor="pointer"},400);case 24:case"end":return Dn.stop()}},Bt)}));return function($t){return jt.apply(this,arguments)}}();Object(n.useEffect)(function(){vt(kn==null?void 0:kn.save_identifier);var jt=Fn.findIndex(function(Bt){return Bt.some(function($t){return $t.identifier===(kn==null?void 0:kn.save_identifier)})});jt===-1?rn(Object(o.a)(Object(o.a)({},Lt),{},{page:1})):rn(Object(o.a)(Object(o.a)({},Lt),{},{page:jt+1}))},[kn==null?void 0:kn.save_identifier,Fn]);var Zn=function(Bt){Lt.page=1,Lt.tag_discipline_id=Bt,rn(Object(o.a)({},Lt)),Gn(Lt)},ur=function(){var jt=Object(h.a)(i.a.mark(function Bt(){var $t;return i.a.wrap(function(nn){for(;;)switch(nn.prev=nn.next){case 0:return nn.next=2,Object(_e.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice",position:"index"}});case 2:$t=nn.sent,Xn($t.tag_disciplines||[]);case 4:case"end":return nn.stop()}},Bt)}));return function(){return jt.apply(this,arguments)}}(),zn=function(Bt){Lt.page=1,Lt.difficulty=typeof Bt=="number"?Bt:null,rn(Object(o.a)({},Lt)),Gn(Lt)},Gn=function(){var jt=Object(h.a)(i.a.mark(function Bt($t){var gn,nn,In,pn,Dn,_n;return i.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:return mr(!0),er.next=3,Object(v.p)($t);case 3:if(gn=er.sent,gn!=null&&gn.practices_list){for(In=gn==null||((nn=gn.practices_list)===null||nn===void 0)?void 0:nn.length,pn=[],Dn=0;Dn(Rn+3)*1e3,Ii!==0&&!na&&setTimeout(jr,1e3),!na){Ar.next=12;break}return p.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),dt({type:Mn.SET_SUBMITING,payload:!1}),Ar.abrupt("return");case 12:if(!(Ii===0)){Ar.next=19;break}return Wi.status===2&&p.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),Ar.next=16,Object(v.o)(yt,{limit:15,page:Fn});case 16:Vi=Ar.sent,dt({type:Mn.SET_SUBMIT_RESULT,payload:Object(o.a)(Object(o.a)({},vt),{},{submitResult:Wi,submitting:!1,submitRecords:Vi})}),(Wi==null?void 0:Wi.status)===0&&$t(!0);case 19:case"end":return Ar.stop()}},ea)})),Fr.apply(this,arguments)},jr=function(){return Fr.apply(this,arguments)},Kn={},un.next=14,Object(v.s)(yt,Kn);case 14:if(qt=un.sent,!(qt.status===-1)){un.next=18;break}return window.parent.location.href="/classrooms/".concat(Lt.query.coursesId,"/exercise/").concat(Lt.query.exercisesId,"/detail"),un.abrupt("return");case 18:Rn=pn.time_limit,br=zi(),jr();case 21:un.next=26;break;case 23:un.prev=23,un.t0=un.catch(3),dt({type:Mn.SET_SUBMITING,payload:!1});case 26:case"end":return un.stop()}},Un,null,[[3,23]])})),Mi.apply(this,arguments)}function qi(){return Ui.apply(this,arguments)}function Ui(){return Ui=Object(h.a)(i.a.mark(function Un(){var yn,Kn,qt,Rn,br,jr,Fr;return i.a.wrap(function(un){for(;;)switch(un.prev=un.next){case 0:return vt.debuging=!0,dt({type:Mn.SET_DEBUGING,payload:!0}),un.prev=2,un.next=5,Yr();case 5:if(yn=un.sent,!(yn.status===0)){un.next=21;break}return Fr=function(){return Fr=Object(h.a)(i.a.mark(function ea(){var Bi,Ii,Wi,ta,na,Vi;return i.a.wrap(function(Ar){for(;;)switch(Ar.prev=Ar.next){case 0:return Ar.next=2,Object(v.l)(yt,"debug");case 2:if(Bi=Ar.sent,Ii=Bi.status,Wi=Bi.message,ta=Bi.data,na=zi(),Vi=na-br>(Kn+3)*1e3,Ii!==0&&!Vi&&(dt({type:Mn.SET_EXECUTE_MESSAGE,payload:Wi}),setTimeout(jr,1e3)),!Vi){Ar.next=13;break}return p.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),dt({type:Mn.SET_DEBUGING,payload:!1}),Ar.abrupt("return");case 13:Ii===0&&(dt({type:Mn.SET_DEBUGING,payload:!1}),ta.status===2&&p.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),dt({type:Mn.SET_EXECUTE_RESULT,payload:Object(o.a)(Object(o.a)({},vt),{},{debugResult:ta,debuging:!1})}));case 14:case"end":return Ar.stop()}},ea)})),Fr.apply(this,arguments)},jr=function(){return Fr.apply(this,arguments)},Kn=pn.time_limit,qt={input:encodeURIComponent(vn.test_case.input)},un.next=13,Object(v.h)(yt,qt);case 13:if(Rn=un.sent,!(Rn.status===-1)){un.next=17;break}return window.parent.location.href="/classrooms/".concat(Lt.query.coursesId,"/exercise/").concat(Lt.query.exercisesId,"/detail"),un.abrupt("return");case 17:br=zi(),jr(),un.next=22;break;case 21:dt({type:Mn.SET_DEBUGING,payload:!1});case 22:un.next=27;break;case 24:un.prev=24,un.t0=un.catch(2),console.log(un.t0);case 27:return un.prev=27,un.finish(27);case 29:case"end":return un.stop()}},Un,null,[[2,24,27,29]])})),Ui.apply(this,arguments)}function ti(Un){var yn;clearTimeout(gn.current),gn.current=setTimeout(function(){var Kn;Yr({code:O.Base64.encode(Un),language:nn==null||((Kn=nn.current)===null||Kn===void 0)?void 0:Kn.language})},2e3),dt({type:Mn.SET_DATA,payload:Object(o.a)(Object(o.a)({},nn==null?void 0:nn.current),{},{hack:Object(o.a)(Object(o.a)({},nn==null||((yn=nn.current)===null||yn===void 0)?void 0:yn.hack),{},{code:Un})})})}function ji(Un){var yn=Un.target.value;dt({type:Mn.SET_DATA,payload:Object(o.a)(Object(o.a)({},vn),{},{test_case:{input:yn}})})}var Wn=function(){var Un=Object(h.a)(i.a.mark(function yn(Kn){var qt,Rn,br,jr,Fr;return i.a.wrap(function(un){for(;;)switch(un.prev=un.next){case 0:return dt({type:Mn.SET_LOADING,payload:!0}),un.next=3,Yr();case 3:if(qt=un.sent,!(qt.status===0)){un.next=14;break}return dt({type:Mn.SET_SUBMIT_RESULT,payload:{languageValue:Kn}}),nn.current.language=Kn,Rn="".concat(In==null?void 0:In.login,"-language"),localStorage.setItem(Rn,Kn),un.next=11,Object(v.w)(yt);case 11:br=un.sent,br.status===0&&(Fr=br==null||((jr=br.data)===null||jr===void 0)?void 0:jr.find(function(ki){return ki.language===Kn}),ti(O.Base64.decode(Fr.code))),setTimeout(function(){dt({type:Mn.SET_LOADING,payload:!1})},300);case 14:case"end":return un.stop()}},yn)}));return function(Kn){return Un.apply(this,arguments)}}();function xn(){return $n.apply(this,arguments)}function $n(){return $n=Object(h.a)(i.a.mark(function Un(){var yn;return i.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return qt.prev=0,qt.next=3,Object(v.q)(yt,{language:rn});case 3:yn=qt.sent,yn.status===401?en.replace("/login",{from:Lt.pathname}):(ti(O.Base64.decode(yn.code)),er()),qt.next=10;break;case 7:qt.prev=7,qt.t0=qt.catch(0),console.log(qt.t0);case 10:case"end":return qt.stop()}},Un,null,[[0,7]])})),$n.apply(this,arguments)}function tr(){p.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:t.a.createElement("p",null,"\u521D\u59CB\u4EE3\u7801\u6709\u4FEE\u6539\uFF0C\u66F4\u65B0\u540E\u5C06\u8986\u76D6\u73B0\u6709\u4EE3\u7801\u54E6~ ",t.a.createElement("br",null),"\u8BF7\u5C06\u60A8\u7F16\u8F91\u7684\u4EE3\u7801\u4FDD\u5B58\u81F3\u672C\u5730\uFF0C\u4EE5\u9632\u4E22\u5931"),onOk:function(){return Object(h.a)(i.a.mark(function yn(){var Kn;return i.a.wrap(function(Rn){for(;;)switch(Rn.prev=Rn.next){case 0:return Rn.next=2,Object(v.t)(yt,{language:rn});case 2:Kn=Rn.sent,Kn.status===401?en.replace("/login",{from:Lt.pathname}):ti(O.Base64.decode(Kn.code));case 4:case"end":return Rn.stop()}},yn)}))()}})}function Ir(){dt({type:Mn.SET_SHOW_NOTE,payload:!0})}function Pn(){dt({type:Mn.SET_SHOW_NOTE,payload:!1})}function qr(Un){return Pr.apply(this,arguments)}function Pr(){return Pr=Object(h.a)(i.a.mark(function Un(yn){return i.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return qt.next=2,Object(v.b)(yt,yn);case 2:dt({type:Mn.GET_DATA,payload:{showNote:!1,data:Object(o.a)(Object(o.a)({},vn),{},{hack:Object(o.a)(Object(o.a)({},pn),{},{notes:yn.notes})})}});case 3:case"end":return qt.stop()}},Un)})),Pr.apply(this,arguments)}var Hr={input:vn==null||((ut=vn.test_case)===null||ut===void 0)?void 0:ut.input,language:pn==null?void 0:pn.language,code:pn==null?void 0:pn.code,title:"main."+ba[pn==null?void 0:pn.language],modify_code:pn==null?void 0:pn.modify_code,notes:pn==null?void 0:pn.notes,debugResult:Xn,debuging:Qn,submitting:ir,executingMessage:lr,id:yt,languageValue:rn,languageList:Hn,onChangeLanguage:Wn,onCancelNote:Pn,onAddNote:qr,showNote:yr,onShowNote:Ir,onSubmitCode:Kr,onChangeCode:ti,onChangeInput:ji,onDebugCode:qi,onResetCode:xn,onSyncCode:tr,onUpdateCode:Yr};function gi(){return Ri.apply(this,arguments)}function Ri(){return Ri=Object(h.a)(i.a.mark(function Un(){var yn,Kn,qt;return i.a.wrap(function(br){for(;;)switch(br.prev=br.next){case 0:return br.next=2,Object(v.u)(pn.id,{container_type:"Hack",type:1});case 2:yn=br.sent,Kn=yn.praise_count,qt=Object(o.a)(Object(o.a)({},vn),{},{hack:Object(o.a)(Object(o.a)({},pn),{},{praises_count:Kn,user_praise:!pn.user_praise})}),dt({type:Mn.SET_DATA,payload:qt});case 6:case"end":return br.stop()}},Un)})),Ri.apply(this,arguments)}var Fi={topicId:yt,submitResult:Cn,submitRecords:Ln,submitting:ir,page:Fn,onPageChange:wr,hack:pn,user:vn==null?void 0:vn.user,onTriggerPraise:gi};return console.log(vn,nn==null?void 0:nn.current,"data--------"),t.a.createElement(t.a.Fragment,null,t.a.createElement(S.a,{className:"oj-custom-large-spin",size:"large",spinning:An},vn?t.a.createElement("div",{className:"oj-custom-warp"},t.a.createElement("header",{className:D.a.header,style:{minWidth:1200}},t.a.createElement("div",null,t.a.createElement("img",{src:"".concat(E.a.IMG_SERVER,"/images/").concat(In.image_url),alt:"user",width:30}),t.a.createElement("span",null,In.name)),t.a.createElement("h2",{className:"flex-wrp flex_box_column flex_box_center"},t.a.createElement("div",null,pn.name),t.a.createElement(Er,{onChange:function(yn){},className:"font12 c-grey-999"})),t.a.createElement(Yi.CopyToClipboard,{text:"".concat((Et=window.location)===null||Et===void 0?void 0:Et.origin,"/problems/").concat(pn.identifier,"/share"),onCopy:function(){return T.b.success("\u590D\u5236\u9898\u76EE\u94FE\u63A5\u6210\u529F")}},t.a.createElement("span",{className:D.a.btn_back,style:{marginRight:10,cursor:"pointer"}}," ",t.a.createElement("i",{className:"iconfont icon-fenxiang1 font14 mr5"}),"\u5206\u4EAB\u9898\u76EE")),pn.edit_privilege?t.a.createElement(b.a,{className:D.a.btn_back,to:"/problems/".concat(pn.identifier,"/ojedit"),style:{marginRight:10}}," ",t.a.createElement(u.a,null)," \u7F16\u8F91"):null,t.a.createElement(b.a,{className:D.a.btn_back,to:"/problems"}," ",t.a.createElement(y.a,null),"\u9000\u51FA")),t.a.createElement(m.a,{hideResize:!0,className:"my-problems oj-problems",leftChild:t.a.createElement(rr,Fi),rightChild:t.a.createElement(ka,Hr)})):null),t.a.createElement(p.a,{centered:!0,closable:!1,width:680,footer:null,visible:Bt,className:"oj-modal"},t.a.createElement("section",{className:"oj-modal-content"},t.a.createElement("div",{className:"oj-modal-head"},t.a.createElement("img",{src:xr.a,alt:""}),t.a.createElement("i",{onClick:function(){return $t(!1)},className:"iconfont icon-guanbi1"})),t.a.createElement("aside",null,t.a.createElement("img",{className:"mr30",src:Dr.a}),"\u8FD0\u884C\u65F6\u95F4:\xA0",t.a.createElement("span",{style:{color:"#75d6ba",marginRight:100}},Cn==null?void 0:Cn.execute_time,"s"),"\u4F18\u4E8E",t.a.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(Cn==null?void 0:Cn.time_better_than)||100,"%"),"\u7684\u7528\u6237"),t.a.createElement("aside",{className:"mb50"},t.a.createElement("img",{src:Or.a,className:"mr30"}),t.a.createElement("span",{className:"oj-modal-tt"},t.a.createElement("span",null,t.a.createElement("span",null,"\u5360\u7528\u5185\u5B58:\xA0"),t.a.createElement("span",{className:"c-light-primary"},Cn==null?void 0:Cn.execute_memory,"kb")),t.a.createElement("span",null,t.a.createElement("span",null))),"\u4F18\u4E8E",t.a.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(Cn==null?void 0:Cn.memory_better_than)||100,"%"),"\u7684\u7528\u6237"),t.a.createElement("div",{id:"oj-modal-next",className:"oj-modal-btn"},"\u8FDB\u5165\u4E0B\u4E00\u9898"))))};function Gi(ot){var ut=ot.languageValue,Et=ot.languageList,Dt=ot.onChangeLanguage,on=ot.title,an=ot.modify_code,vt=ot.onSyncCode,dt=ot.onShowCodeSetting,Ht=ot.onResetCode,yt=Object(g.h)(),en=function(){p.a.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:t.a.createElement(a.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:Ht})};return t.a.createElement("div",{className:"action-bar"},t.a.createElement(w.a,{className:"oj-select",value:ut,style:{width:100},placeholder:"\u9009\u62E9\u8BED\u8A00",onChange:Dt},Et==null?void 0:Et.map(function(Lt){return t.a.createElement(w.a.Option,{key:Lt.language,value:Lt.language},Lt.language)})),t.a.createElement("span",null),t.a.createElement("a",{title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",onClick:en},t.a.createElement("i",{className:"iconfont icon-zhongzhi font-20 "})),t.a.createElement("a",{onClick:dt},t.a.createElement("i",{className:"iconfont icon-shezhi"})))}function ka(ot){var ut=ot.id,Et=ot.input,Dt=ot.showNote,on=ot.onShowNote,an=ot.notes,vt=ot.onCancelNote,dt=ot.onAddNote,Ht=ot.debugResult,yt=ot.language,en=ot.debuging,Lt=ot.submitting,rn=ot.executingMessage,Hn=ot.code,An=ot.onSubmitCode,vn=ot.onDebugCode,Xn=ot.onChangeCode,Cn=ot.onChangeInput,Ln=ot.onUpdateCode,Fn=Object(Z.a)(ot,["id","input","showNote","onShowNote","notes","onCancelNote","onAddNote","debugResult","language","debuging","submitting","executingMessage","code","onSubmitCode","onDebugCode","onChangeCode","onChangeInput","onUpdateCode"]);function yr(ir){return t.a.createElement(Gi,Object(ae.a)({},Fn,{onShowCodeSetting:ir}))}var Qn={id:ut,input:Et,debugResult:Ht,debuging:en,submitting:Lt,executingMessage:rn,onDebugCode:vn,onChangeCode:Xn,onSubmitCode:An,onChangeInput:Cn};return t.a.createElement("div",{className:"right-panel"},t.a.createElement(x.a,{language:yt,value:Hn,onChange:Xn,ActionBarRender:yr}),t.a.createElement("div",{className:"note-form-area ".concat(Dt?"active":"")},t.a.createElement(ie,{onCancel:vt,notes:an,callback:dt})),t.a.createElement(F.b,Qn))}},WaYH:function($e,We,z){"use strict";var ae=z("rePB"),Z=z("Ff2n"),U=z("VTBJ"),w=z("1OyB"),P=z("vuIU"),S=z("JX7q"),C=z("Ji7U"),T=z("LK+K"),l=z("q1tI"),p=z("TSYQ"),h=z.n(p),d=z("sboe"),o=z("OZM5"),c=function(b){var v=b.prefixCls,m=b.level,E=b.isStart,a=b.isEnd;if(!m)return null;for(var x="".concat(v,"-indent-unit"),O=[],A=0;A1&&arguments[1]!==void 0?arguments[1]:!1,ye=oe.getAttribute("id")||oe.getAttribute("data-reactid")||oe.getAttribute("name");if(xe&&I[ye])return I[ye];var Ae=window.getComputedStyle(oe),pe=Ae.getPropertyValue("box-sizing")||Ae.getPropertyValue("-moz-box-sizing")||Ae.getPropertyValue("-webkit-box-sizing"),Oe=parseFloat(Ae.getPropertyValue("padding-bottom"))+parseFloat(Ae.getPropertyValue("padding-top")),Fe=parseFloat(Ae.getPropertyValue("border-bottom-width"))+parseFloat(Ae.getPropertyValue("border-top-width")),Me=D.map(function(Le){return"".concat(Le,":").concat(Ae.getPropertyValue(Le))}).join(";"),Ce={sizingStyle:Me,paddingSize:Oe,borderSize:Fe,boxSizing:pe};return xe&&ye&&(I[ye]=Ce),Ce}function ne(oe){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ye=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ae=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;F||(F=document.createElement("textarea"),F.setAttribute("tab-index","-1"),F.setAttribute("aria-hidden","true"),document.body.appendChild(F)),oe.getAttribute("wrap")?F.setAttribute("wrap",oe.getAttribute("wrap")):F.removeAttribute("wrap");var pe=K(oe,xe),Oe=pe.paddingSize,Fe=pe.borderSize,Me=pe.boxSizing,Ce=pe.sizingStyle;F.setAttribute("style","".concat(Ce,";").concat(A)),F.value=oe.value||oe.placeholder||"";var Le=Number.MIN_SAFE_INTEGER,de=Number.MAX_SAFE_INTEGER,ue=F.scrollHeight,ke;if(Me==="border-box"?ue+=Fe:Me==="content-box"&&(ue-=Oe),ye!==null||Ae!==null){F.value=" ";var Ue=F.scrollHeight-Oe;ye!==null&&(Le=Ue*ye,Me==="border-box"&&(Le=Le+Oe+Fe),ue=Math.max(Le,ue)),Ae!==null&&(de=Ue*Ae,Me==="border-box"&&(de=de+Oe+Fe),ke=ue>de?"":"hidden",ue=Math.min(de,ue))}return{height:ue,minHeight:Le,maxHeight:de,overflowY:ke,resize:"none"}}var j=z("Gytx"),G=z.n(j),X;(function(oe){oe[oe.NONE=0]="NONE",oe[oe.RESIZING=1]="RESIZING",oe[oe.RESIZED=2]="RESIZED"})(X||(X={}));var J=function(oe){Object(w.a)(ye,oe);var xe=Object(P.a)(ye);function ye(Ae){var pe;return Object(Z.a)(this,ye),pe=xe.call(this,Ae),pe.nextFrameActionId=void 0,pe.resizeFrameId=void 0,pe.textArea=void 0,pe.saveTextArea=function(Oe){pe.textArea=Oe},pe.handleResize=function(Oe){var Fe=pe.state.resizeStatus,Me=pe.props,Ce=Me.autoSize,Le=Me.onResize;if(Fe!==X.NONE)return;typeof Le=="function"&&Le(Oe),Ce&&pe.resizeOnNextFrame()},pe.resizeOnNextFrame=function(){cancelAnimationFrame(pe.nextFrameActionId),pe.nextFrameActionId=requestAnimationFrame(pe.resizeTextarea)},pe.resizeTextarea=function(){var Oe=pe.props.autoSize;if(!Oe||!pe.textArea)return;var Fe=Oe.minRows,Me=Oe.maxRows,Ce=ne(pe.textArea,!1,Fe,Me);pe.setState({textareaStyles:Ce,resizeStatus:X.RESIZING},function(){cancelAnimationFrame(pe.resizeFrameId),pe.resizeFrameId=requestAnimationFrame(function(){pe.setState({resizeStatus:X.RESIZED},function(){pe.resizeFrameId=requestAnimationFrame(function(){pe.setState({resizeStatus:X.NONE}),pe.fixFirefoxAutoScroll()})})})})},pe.renderTextArea=function(){var Oe=pe.props,Fe=Oe.prefixCls,Me=Fe===void 0?"rc-textarea":Fe,Ce=Oe.autoSize,Le=Oe.onResize,de=Oe.className,ue=Oe.disabled,ke=pe.state,Ue=ke.textareaStyles,Ye=ke.resizeStatus,ee=Object(a.a)(pe.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),M=O()(Me,de,Object(T.a)({},"".concat(Me,"-disabled"),ue));"value"in ee&&(ee.value=ee.value||"");var N=Object(C.a)(Object(C.a)(Object(C.a)({},pe.props.style),Ue),Ye===X.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return S.createElement(E,{onResize:pe.handleResize,disabled:!(Ce||Le)},S.createElement("textarea",Object(ae.a)({},ee,{className:M,style:N,ref:pe.saveTextArea})))},pe.state={textareaStyles:{},resizeStatus:X.NONE},pe}return Object(U.a)(ye,[{key:"componentDidUpdate",value:function(pe){(pe.value!==this.props.value||!G()(pe.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 pe=this.textArea.selectionStart,Oe=this.textArea.selectionEnd;this.textArea.setSelectionRange(pe,Oe)}}catch(Fe){}}},{key:"render",value:function(){return this.renderTextArea()}}]),ye}(S.Component),B=J,Q=function(oe){Object(w.a)(ye,oe);var xe=Object(P.a)(ye);function ye(Ae){var pe;Object(Z.a)(this,ye),pe=xe.call(this,Ae),pe.resizableTextArea=void 0,pe.focus=function(){pe.resizableTextArea.textArea.focus()},pe.saveTextArea=function(Fe){pe.resizableTextArea=Fe},pe.handleChange=function(Fe){var Me=pe.props.onChange;pe.setValue(Fe.target.value,function(){pe.resizableTextArea.resizeTextarea()}),Me&&Me(Fe)},pe.handleKeyDown=function(Fe){var Me=pe.props,Ce=Me.onPressEnter,Le=Me.onKeyDown;Fe.keyCode===13&&Ce&&Ce(Fe),Le&&Le(Fe)};var Oe=typeof Ae.value=="undefined"||Ae.value===null?Ae.defaultValue:Ae.value;return pe.state={value:Oe},pe}return Object(U.a)(ye,[{key:"setValue",value:function(pe,Oe){"value"in this.props||this.setState({value:pe},Oe)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return S.createElement(B,Object(ae.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(pe){return"value"in pe?{value:pe.value}:null}}]),ye}(S.Component),ie=We.default=Q},Z8dc:function($e,We,z){$e.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($e,We,z){"use strict";var ae=z("BoS7"),Z=z("Sdc0"),U=z("OaEy"),w=z("2fM7"),P=z("q1tI"),S=z.n(P),C=z("lOMy"),T=z.n(C),l=w.a.Option;We.a=function(p){var h=p.onFontSizeChange,d=p.cmFontSize,o=p.cmCodeMode,c=p.onCodeModeChange,s=p.onTabToSpace,f=p.className,i=f===void 0?"":f,n=p.tabToSpace,t=p.children;return S.a.createElement("div",{className:"tpi-code-setting ".concat(i)},S.a.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),S.a.createElement("section",null,S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),S.a.createElement(w.a,{bordered:!1,size:"small",value:o,onChange:c},S.a.createElement(l,{value:"vs"},"\u767D\u8272\u80CC\u666F"),S.a.createElement(l,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),S.a.createElement(w.a,{bordered:!1,size:"small",value:d,onChange:h},S.a.createElement(l,{value:12},"12px"),S.a.createElement(l,{value:14},"14px"),S.a.createElement(l,{value:16},"16px"),S.a.createElement(l,{value:18},"18px"),S.a.createElement(l,{value:20},"20px"),S.a.createElement(l,{value:22},"22px"))),S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"Tab\u8F6C\u6362"),S.a.createElement(Z.a,{checked:n,onChange:s}))),S.a.createElement("h3",null,"\u5FEB\u6377\u952E"),S.a.createElement("section",null,S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),S.a.createElement("span",null,"Ctrl + S")),S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),S.a.createElement("span",null,"F1 / Alt + F1")),S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),S.a.createElement("span",null,"Ctrl + ]/[")),S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),S.a.createElement("span",null,"Ctrl + Shift + \\")),S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),S.a.createElement("span",null,"Home")),S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),S.a.createElement("span",null,"End"))),t)}},ZW9T:function($e,We,z){"use strict";z.d(We,"a",function(){return y});var ae=z("k1fw"),Z=z("miYZ"),U=z("tsqr"),w=z("rAM+"),P=z("tJVT"),S=z("PpiC"),C=z("q1tI"),T=z.n(C),l=z("bdgK");function p(g,_,b,v,m){var E=_.getWordUntilPosition(b),a={startLineNumber:b.lineNumber,endLineNumber:b.lineNumber,startColumn:E.startColumn,endColumn:E.endColumn},x=v.map(function(O){return{label:O,kind:g.languages.CompletionItemKind.Keyword,insertText:O,insertTextRules:g.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:a}});return m.map(function(O){x.push(Object(ae.a)(Object(ae.a)({},O),{},{range:a}))}),x}var h=function(g){var _={label:"ifelse",kind:g.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(` `),insertTextRules:g.languages.CompletionItemInsertTextRule.InsertAsSnippet},b=["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"];g.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(a,x){var O=p(g,a,x,b,[_]);return{suggestions:O}}});var v=["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"];g.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(a,x){var O=[{label:"print",kind:g.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(` `),insertTextRules:g.languages.CompletionItemInsertTextRule.InsertAsSnippet}],A=p(g,a,x,v,O);return{suggestions:A}}});var m=["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"];g.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(a,x){var O=[_,{label:"main",kind:g.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(` `),insertTextRules:g.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:g.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(` `),insertTextRules:g.languages.CompletionItemInsertTextRule.InsertAsSnippet}],A=p(g,a,x,m,O);return{suggestions:A}}})},d="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",o=z("LvDl");function c(g){return/^\d+$/.test(g)?"".concat(g,"px"):g}function s(){}var f=!1,i={"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 g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],_=g;if(Array.isArray(g)){for(var b=0;b0||pt.target.offsetWidth>0)&&de.current.instance.layout()}}catch(Pt){Ge.e(Pt)}finally{Ge.f()}}),Ee.observe(Le.current)),Ee}function V(){U.b.warn(decodeURIComponent(d))}var Y=function(){var be=de.current.instance;if(E!=null&&be&&M){var Ge=be.getModel();Ge&&E!==Ge.getValue()&&(f=!0,Ge.setValue(E),be.layout(),f=!1)}};Object(C.useEffect)(function(){ue.current&&clearTimeout(ue.current),ue.current=setTimeout(function(){Y()},500)},[E,M,de.current]);function me(){var Ee=de.current.instance;if(Ee){var be=Ee.getSelection(),Ge=de.current.pastePos||{},qe=new t.Range(Ge.startLineNumber||be.endLineNumber,Ge.startColumn||be.endColumn,Ge.endLineNumber||be.endLineNumber,Ge.endColumn||be.endColumn);setTimeout(function(){Ee.executeEdits("",[{range:qe,text:""}])},300)}}function Re(Ee){(window.navigator.platform.match("Mac")?Ee.metaKey:Ee.ctrlKey)&&Ee.keyCode==83&&(Ee.preventDefault(),X())}var rt=function(){if(B&&de.current.instance){var be=de.current.instance.getContentHeight();he(be0||ye.target.offsetWidth>0)&&B.layout()}}catch(Ae){oe.e(Ae)}finally{oe.f()}}),Q.observe(D.current)),Q}Object(C.useEffect)(function(){D.current&&z.e(26).then(z.t.bind(null,"M/lh",7)).then(function(B){t=B;var Q=t.editor.createDiffEditor(D.current,Object(ae.a)(Object(ae.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},A),{},{wordWrap:!0}));ne(Q);var ie=j(Q);return function(){Q.dispose();var oe=Q.getModel();oe&&oe.dispose(),ie.unobserve(D.current)}})},[]),Object(C.useEffect)(function(){K&&K.setModel({original:t.editor.createModel(E,x),modified:t.editor.createModel(a,x)})},[E,a,x,K]);var G=c(b),X=c(m),J={width:G,height:X};return T.a.createElement("div",{className:"my-diff-editor",ref:D,style:J})}},ZpRC:function($e,We,z){"use strict";function ae(h){return typeof h=="object"&&h!=null&&h.nodeType===1}function Z(h,d){return(!d||h!=="hidden")&&h!=="visible"&&h!=="clip"}function U(h,d){if(h.clientHeightd||f>h&&i=d&&n>=o?f-h-c:i>d&&no?i-d+s:0}var P=function(h,d){var o=window,c=d.scrollMode,s=d.block,f=d.inline,i=d.boundary,n=d.skipOverflowHiddenElements,t=typeof i=="function"?i:function(Ue){return Ue!==i};if(!ae(h))throw new TypeError("Invalid target");for(var u=document.scrollingElement||document.documentElement,y=[],g=h;ae(g)&&t(g);){if((g=g.parentElement)===u){y.push(g);break}g!=null&&g===document.body&&U(g)&&!U(document.documentElement)||g!=null&&U(g,n)&&y.push(g)}for(var _=o.visualViewport?o.visualViewport.width:innerWidth,b=o.visualViewport?o.visualViewport.height:innerHeight,v=window.scrollX||pageXOffset,m=window.scrollY||pageYOffset,E=h.getBoundingClientRect(),a=E.height,x=E.width,O=E.top,A=E.right,D=E.bottom,I=E.left,F=s==="start"||s==="nearest"?O:s==="end"?D:O+a/2,K=f==="center"?I+x/2:f==="end"?A:I,ne=[],j=0;j=0&&I>=0&&D<=b&&A<=_&&O>=Q&&D<=oe&&I>=xe&&A<=ie)return ne;var ye=getComputedStyle(G),Ae=parseInt(ye.borderLeftWidth,10),pe=parseInt(ye.borderTopWidth,10),Oe=parseInt(ye.borderRightWidth,10),Fe=parseInt(ye.borderBottomWidth,10),Me=0,Ce=0,Le="offsetWidth"in G?G.offsetWidth-G.clientWidth-Ae-Oe:0,de="offsetHeight"in G?G.offsetHeight-G.clientHeight-pe-Fe:0;if(u===G)Me=s==="start"?F:s==="end"?F-b:s==="nearest"?w(m,m+b,b,pe,Fe,m+F,m+F+a,a):F-b/2,Ce=f==="start"?K:f==="center"?K-_/2:f==="end"?K-_:w(v,v+_,_,Ae,Oe,v+K,v+K+x,x),Me=Math.max(0,Me+m),Ce=Math.max(0,Ce+v);else{Me=s==="start"?F-Q-pe:s==="end"?F-oe+Fe+de:s==="nearest"?w(Q,oe,J,pe,Fe+de,F,F+a,a):F-(Q+J/2)+de/2,Ce=f==="start"?K-xe-Ae:f==="center"?K-(xe+B/2)+Le/2:f==="end"?K-ie+Oe+Le:w(xe,ie,B,Ae,Oe+Le,K,K+x,x);var ue=G.scrollLeft,ke=G.scrollTop;F+=ke-(Me=Math.max(0,Math.min(ke+Me,G.scrollHeight-J+de))),K+=ue-(Ce=Math.max(0,Math.min(ue+Ce,G.scrollWidth-B+Le)))}ne.push({el:G,top:Me,left:Ce})}return ne};function S(h){return h===Object(h)&&Object.keys(h).length!==0}function C(h,d){d===void 0&&(d="auto");var o="scrollBehavior"in document.body.style;h.forEach(function(c){var s=c.el,f=c.top,i=c.left;s.scroll&&o?s.scroll({top:f,left:i,behavior:d}):(s.scrollTop=f,s.scrollLeft=i)})}function T(h){return h===!1?{block:"end",inline:"nearest"}:S(h)?h:{block:"start",inline:"nearest"}}function l(h,d){var o=!h.ownerDocument.documentElement.contains(h);if(S(d)&&typeof d.behavior=="function")return d.behavior(o?[]:P(h,d));if(o)return;var c=T(d);return C(P(h,c),c.behavior)}var p=We.a=l},ZsLC:function($e,We,z){$e.exports={"left-panel":"left-panel___FTwwW","tab-panel-body":"tab-panel-body___2YSOx",b1:"b1___3qx3o","oj-mr":"oj-mr___1GA9N","oj-width-input":"oj-width-input___3GkyP","s-navs":"s-navs___1fGGf","bg-white":"bg-white___1ZAy0",active:"active___39N6D"}},bCnd:function($e,We,z){"use strict";z.d(We,"b",function(){return w}),z.d(We,"a",function(){return P});var ae=z("je13"),Z=z.n(ae),U=!1;function w(S,C){var T=Z.a.get("__ec");T||(T={}),T[S]=C,Z.a.set("__ec",T)}function P(S,C){var T=Z.a.get("__ec");return T?T[S]===void 0?C:T[S]:C}},bT9E:function($e,We,z){"use strict";z.d(We,"a",function(){return Z});var ae=z("VTBJ");function Z(U,w){var P=Object(ae.a)({},U);return Array.isArray(w)&&w.forEach(function(S){delete P[S]}),P}},bdLU:function($e,We,z){"use strict";z.d(We,"a",function(){return ae});var ae;(function(Z){Z[Z.NOMATCH=-1]="NOMATCH",Z[Z.OK=0]="OK",Z[Z.TIMEOUT=2]="TIMEOUT",Z[Z.PODFAILURE=3]="PODFAILURE",Z[Z.COMPILEFAILURE=4]="COMPILEFAILURE",Z[Z.EXECUTEFAILURE=5]="EXECUTEFAILURE"})(ae||(ae={}))},biw7:function($e,We,z){"use strict";var ae=z("q1tI"),Z=z.n(ae),U=ae.createContext(null);We.a=U},c5Ni:function($e,We,z){},cDPC:function($e,We,z){"use strict";var ae=z("tJVT"),Z=z("q1tI"),U=z.n(Z),w=z("i3hx"),P=z.n(w);We.a=function(S){var C=S.defaultX,T=C===void 0?"40%":C,l=S.leftChild,p=S.rightChild,h=S.className,d=S.hideResize,o=d===void 0?!1:d,c=Object(Z.useState)(T),s=Object(ae.a)(c,2),f=s[0],i=s[1],n=Object(Z.useRef)();function t(){n.current=!0}Object(Z.useEffect)(function(){function g(b){n.current&&i(b.pageX)}function _(){n.current=!1}return window.addEventListener("mousemove",g),window.addEventListener("mouseup",_),function(){window.removeEventListener("mousemove",g),window.removeEventListener("mouseup",_)}},[]);var u=typeof f=="number"&&f!==.01?"".concat(f,"px"):T,y="calc(100% - ".concat(o?"0px":"4px"," - ").concat(u,")");return U.a.createElement("div",{className:"split-panel-container ".concat(h)},U.a.createElement("section",{style:{width:u,display:f===.01?"none":""}},l),U.a.createElement("section",{className:"resize-x-bar",onMouseDown:t},U.a.createElement("a",{className:"btn-resize"},U.a.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},U.a.createElement("path",{d:"M12.245 7.53H5.647v1.882h6.598v2.823L16 8.471l-3.755-3.765V7.53zM10.353 4.706H3.755v2.823L0 3.765 3.755 0v2.824h6.598v1.882z"})))),U.a.createElement("section",{style:{width:y}},p))}},dejd:function($e,We,z){},dmUQ:function($e,We,z){"use strict";var ae=z("Ff2n"),Z=z("rePB"),U=z("1OyB"),w=z("vuIU"),P=z("Ji7U"),S=z("md7G"),C=z("foSv"),T=z("q1tI"),l=z.n(T),p=z("TSYQ"),h=z.n(p),d=z("4IlW");function o(a,x){var O=Object.keys(a);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(a);x&&(A=A.filter(function(D){return Object.getOwnPropertyDescriptor(a,D).enumerable})),O.push.apply(O,A)}return O}function c(a){for(var x=1;x1?B-1:0),ie=1;ie1?j-1:0),X=1;X=0)return parseInt(ne.slice(ne.indexOf("e-")+2),10);var j=0;return ne.indexOf(".")>=0&&(j=ne.length-ne.indexOf(".")-1),j},D.getInputDisplayValue=function(K){var ne=K||D.state,j=ne.focused,G=ne.inputValue,X=ne.value,J;j?J=G:J=D.toPrecisionAsStep(X),J==null&&(J="");var B=D.formatWrapper(J);return _(D.props.decimalSeparator)&&(B=B.toString().replace(".",D.props.decimalSeparator)),B},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(K){}},D.restoreByAfter=function(K){if(K===void 0)return!1;var ne=D.input.value,j=ne.lastIndexOf(K);if(j===-1)return!1;var G=D.cursorBefore.length;return D.lastKeyCode===d.a.DELETE&&D.cursorBefore.charAt(G-1)===K[0]?(D.fixCaret(G,G),!0):j+K.length===ne.length?(D.fixCaret(j,j),!0):!1},D.partRestoreByAfter=function(K){return K===void 0?!1:Array.prototype.some.call(K,function(ne,j){var G=K.substring(j);return D.restoreByAfter(G)})},D.isNotCompleteNumber=function(K){return isNaN(K)||K===""||K===null||K&&K.toString().indexOf(".")===K.toString().length-1},D.stop=function(){D.autoStepTimer&&clearTimeout(D.autoStepTimer)},D.down=function(K,ne,j){D.pressingUpOrDown=!0,D.step("down",K,ne,j)},D.up=function(K,ne,j){D.pressingUpOrDown=!0,D.step("up",K,ne,j)},D.saveInput=function(K){D.input=K};var I=A.value;I===void 0&&(I=A.defaultValue),D.state={focused:A.autoFocus};var F=D.getValidValue(D.toNumber(I));return D.state=c(c({},D.state),{},{inputValue:D.toPrecisionAsStep(F),value:F}),D}return Object(w.a)(O,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(D){var I=this.props,F=I.value,K=I.onChange,ne=I.max,j=I.min,G=this.state.focused;if(D){if(!b(D.value,F)||!b(D.max,ne)||!b(D.min,j)){var X=G?F:this.getValidValue(F),J;this.pressingUpOrDown?J=X:this.inputting?J=this.rawInput:J=this.toPrecisionAsStep(X),this.setState({value:X,inputValue:J})}var B="value"in this.props?F:this.state.value;"max"in this.props&&D.max!==ne&&typeof B=="number"&&B>ne&&K&&K(ne),"min"in this.props&&D.min!==j&&typeof B=="number"&&B1&&arguments[1]!==void 0?arguments[1]:this.props.min,F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,K=parseFloat(D);return isNaN(K)?D:(KF&&(K=F),K)}},{key:"setValue",value:function(D,I){var F=this.props.precision,K=this.isNotCompleteNumber(parseFloat(D))?null:parseFloat(D),ne=this.state.value,j=ne===void 0?null:ne,G=this.state.inputValue,X=G===void 0?null:G,J=typeof K=="number"?K.toFixed(F):"".concat(K),B=K!==j||J!=="".concat(X);return"value"in this.props?(X=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:X},I)):this.setState({value:K,inputValue:this.toPrecisionAsStep(D)},I),B&&this.props.onChange(K),K}},{key:"getMaxPrecision",value:function(D){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,F=this.props,K=F.precision,ne=F.step;if(_(K))return K;var j=this.getPrecision(I),G=this.getPrecision(ne),X=this.getPrecision(D);return D?Math.max(X,j+G):j+G}},{key:"getPrecisionFactor",value:function(D){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,F=this.getMaxPrecision(D,I);return Math.pow(10,F)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(D){return this.props.formatter?this.props.formatter(D):D}},{key:"toPrecisionAsStep",value:function(D){if(this.isNotCompleteNumber(D)||D==="")return D;var I=Math.abs(this.getMaxPrecision(D));return isNaN(I)?D.toString():Number(D).toFixed(I)}},{key:"toNumber",value:function(D){var I=this.props.precision,F=this.state.focused,K=D&&D.length>16&&F;return this.isNotCompleteNumber(D)||K?D:_(I)?Math.round(D*Math.pow(10,I))/Math.pow(10,I):Number(D)}},{key:"upStep",value:function(D,I){var F=this.props.step,K=this.getPrecisionFactor(D,I),ne=Math.abs(this.getMaxPrecision(D,I)),j=((K*D+K*F*I)/K).toFixed(ne);return this.toNumber(j)}},{key:"downStep",value:function(D,I){var F=this.props.step,K=this.getPrecisionFactor(D,I),ne=Math.abs(this.getMaxPrecision(D,I)),j=((K*D-K*F*I)/K).toFixed(ne);return this.toNumber(j)}},{key:"step",value:function(D,I){var F=this,K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,ne=arguments.length>3?arguments[3]:void 0;this.stop(),I&&(I.persist(),I.preventDefault());var j=this.props;if(j.disabled)return;var G=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(G))return;var X=this["".concat(D,"Step")](G,K),J=X>j.max||Xj.max?X=j.max:X=Q),Ke=(Re||Re===0)&&(isNaN(Re)||Number(Re)<=ie),Ne=Ve||K||ne,De=Ke||K||ne,_e=h()("".concat(F,"-handler"),"".concat(F,"-handler-up"),Object(Z.a)({},"".concat(F,"-handler-up-disabled"),Ne)),he=h()("".concat(F,"-handler"),"".concat(F,"-handler-down"),Object(Z.a)({},"".concat(F,"-handler-down-disabled"),De)),ve=j?{onTouchStart:Ne?i:this.up,onTouchEnd:this.stop}:{onMouseDown:Ne?i:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Ee=j?{onTouchStart:De?i:this.down,onTouchEnd:this.stop}:{onMouseDown:De?i:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return l.a.createElement("div",{className:Pe,style:oe,title:xe,onMouseEnter:ye,onMouseLeave:Ae,onMouseOver:pe,onMouseOut:Oe,onFocus:function(){return null},onBlur:function(){return null}},l.a.createElement("div",{className:"".concat(F,"-handler-wrap")},l.a.createElement("span",Object.assign({unselectable:"on"},ve,{role:"button","aria-label":"Increase Value","aria-disabled":Ne,className:_e}),X||l.a.createElement("span",{unselectable:"on",className:"".concat(F,"-handler-up-inner"),onClick:n})),l.a.createElement("span",Object.assign({unselectable:"on"},Ee,{role:"button","aria-label":"Decrease Value","aria-disabled":De,className:he}),J||l.a.createElement("span",{unselectable:"on",className:"".concat(F,"-handler-down-inner"),onClick:n}))),l.a.createElement("div",{className:"".concat(F,"-input-wrap")},l.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":ie,"aria-valuemax":Q,"aria-valuenow":Re,required:Fe,type:Le,placeholder:de,onPaste:$,onClick:Me,onMouseUp:this.onMouseUp,className:"".concat(F,"-input"),tabIndex:Ce,autoComplete:G,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Xe?this.onKeyDown:i,onKeyUp:Xe?this.onKeyUp:i,autoFocus:M,maxLength:ee,readOnly:ne,disabled:K,max:Q,min:ie,step:Ye,name:N,title:xe,id:ue,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(tt),pattern:Ue,inputMode:ke,onInput:V},Ie))))}}]),O}(l.a.Component);v.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:g,min:-g,step:1,style:{},onChange:i,onKeyDown:i,onPressEnter:i,onFocus:i,onBlur:i,parser:t,required:!1,autoComplete:"off"};var m=v,E=We.a=m},fcSX:function($e,We,z){"use strict";var ae=z("Ff2n"),Z=z("1OyB"),U=z("vuIU"),w=z("Ji7U"),P=z("md7G"),S=z("foSv"),C=z("1W/9"),T=z("q1tI"),l=z("rePB"),p=z("JX7q"),h=z("TSYQ"),d=z.n(h),o=z("qx4F"),c=z("4IlW");function s(K){return Array.isArray(K)?K:[K]}var f={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},i=Object.keys(f).filter(function(K){if(typeof document=="undefined")return!1;var ne=document.getElementsByTagName("html")[0];return K in(ne?ne.style:{})})[0],n=f[i];function t(K,ne,j,G){K.addEventListener?K.addEventListener(ne,j,G):K.attachEvent&&K.attachEvent("on".concat(ne),j)}function u(K,ne,j,G){K.removeEventListener?K.removeEventListener(ne,j,G):K.attachEvent&&K.detachEvent("on".concat(ne),j)}function y(K,ne){var j=typeof K=="function"?K(ne):K;return Array.isArray(j)?j.length===2?j:[j[0],j[1]]:[j]}var g=function(ne){return!isNaN(parseFloat(ne))&&isFinite(ne)},_=!(typeof window!="undefined"&&window.document&&window.document.createElement),b=function K(ne,j,G,X){if(!j||j===document||j instanceof Document)return!1;if(j===ne.parentNode)return!0;var J=Math.max(Math.abs(G),Math.abs(X))===Math.abs(X),B=Math.max(Math.abs(G),Math.abs(X))===Math.abs(G),Q=j.scrollHeight-j.clientHeight,ie=j.scrollWidth-j.clientWidth,oe=document.defaultView.getComputedStyle(j),xe=oe.overflowY==="auto"||oe.overflowY==="scroll",ye=oe.overflowX==="auto"||oe.overflowX==="scroll",Ae=Q&&xe,pe=ie&&ye;return J&&(!Ae||Ae&&(j.scrollTop>=Q&&X<0||j.scrollTop<=0&&X>0))||B&&(!pe||pe&&(j.scrollLeft>=ie&&G<0||j.scrollLeft<=0&&G>0))?K(ne,j.parentNode,G,X):!1};function v(K){var ne=m();return function(){var G=Object(S.a)(K),X;if(ne){var J=Object(S.a)(this).constructor;X=Reflect.construct(G,arguments,J)}else X=G.apply(this,arguments);return Object(P.a)(this,X)}}function m(){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(K){return!1}}var E={},a=function(K){Object(w.a)(j,K);var ne=v(j);function j(G){var X;return Object(Z.a)(this,j),X=ne.call(this,G),X.domFocus=function(){X.dom&&X.dom.focus()},X.removeStartHandler=function(J){if(J.touches.length>1)return;X.startPos={x:J.touches[0].clientX,y:J.touches[0].clientY}},X.removeMoveHandler=function(J){if(J.changedTouches.length>1)return;var B=J.currentTarget,Q=J.changedTouches[0].clientX-X.startPos.x,ie=J.changedTouches[0].clientY-X.startPos.y;(B===X.maskDom||B===X.handlerDom||B===X.contentDom&&b(B,J.target,Q,ie))&&J.cancelable&&J.preventDefault()},X.transitionEnd=function(J){var B=J.target;u(B,n,X.transitionEnd),B.style.transition=""},X.onKeyDown=function(J){if(J.keyCode===c.a.ESC){var B=X.props.onClose;J.stopPropagation(),B&&B(J)}},X.onWrapperTransitionEnd=function(J){var B=X.props,Q=B.open,ie=B.afterVisibleChange;J.target===X.contentWrapper&&J.propertyName.match(/transform$/)&&(X.dom.style.transition="",!Q&&X.getCurrentDrawerSome()&&(document.body.style.overflowX="",X.maskDom&&(X.maskDom.style.left="",X.maskDom.style.width="")),ie&&ie(!!Q))},X.openLevelTransition=function(){var J=X.props,B=J.open,Q=J.width,ie=J.height,oe=X.getHorizontalBoolAndPlacementName(),xe=oe.isHorizontal,ye=oe.placementName,Ae=X.contentDom?X.contentDom.getBoundingClientRect()[xe?"width":"height"]:0,pe=(xe?Q:ie)||Ae;X.setLevelAndScrolling(B,ye,pe)},X.setLevelTransform=function(J,B,Q,ie){var oe=X.props,xe=oe.placement,ye=oe.levelMove,Ae=oe.duration,pe=oe.ease,Oe=oe.showMask;X.levelDom.forEach(function(Fe){Fe.style.transition="transform ".concat(Ae," ").concat(pe),t(Fe,n,X.transitionEnd);var Me=J?Q:0;if(ye){var Ce=y(ye,{target:Fe,open:J});Me=J?Ce[0]:Ce[1]||0}var Le=typeof Me=="number"?"".concat(Me,"px"):Me,de=xe==="left"||xe==="top"?Le:"-".concat(Le);de=Oe&&xe==="right"&&ie?"calc(".concat(de," + ").concat(ie,"px)"):de,Fe.style.transform=Me?"".concat(B,"(").concat(de,")"):""})},X.setLevelAndScrolling=function(J,B,Q){var ie=X.props.onChange;if(!_){var oe=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?Object(o.a)(!0):0;X.setLevelTransform(J,B,Q,oe),X.toggleScrollingToDrawerAndBody(oe)}ie&&ie(J)},X.toggleScrollingToDrawerAndBody=function(J){var B=X.props,Q=B.getOpenCount,ie=B.getContainer,oe=B.showMask,xe=B.open,ye=ie&&ie(),Ae=Q&&Q();if(ye&&ye.parentNode===document.body&&oe){var pe=["touchstart"],Oe=[document.body,X.maskDom,X.handlerDom,X.contentDom];xe&&document.body.style.overflow!=="hidden"?(J&&X.addScrollingEffect(J),Ae===1&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",Oe.forEach(function(Fe,Me){if(!Fe)return;t(Fe,pe[Me]||"touchmove",Me?X.removeMoveHandler:X.removeStartHandler,X.passive)})):X.getCurrentDrawerSome()&&(Ae||(document.body.style.overflow=""),document.body.style.touchAction="",J&&X.remScrollingEffect(J),Oe.forEach(function(Fe,Me){if(!Fe)return;u(Fe,pe[Me]||"touchmove",Me?X.removeMoveHandler:X.removeStartHandler,X.passive)}))}},X.addScrollingEffect=function(J){var B=X.props,Q=B.placement,ie=B.duration,oe=B.ease,xe=B.getOpenCount,ye=B.switchScrollingEffect,Ae=xe&&xe();Ae===1&&ye();var pe="width ".concat(ie," ").concat(oe),Oe="transform ".concat(ie," ").concat(oe);X.dom.style.transition="none";switch(Q){case"right":X.dom.style.transform="translateX(-".concat(J,"px)");break;case"top":case"bottom":X.dom.style.width="calc(100% - ".concat(J,"px)"),X.dom.style.transform="translateZ(0)";break;default:break}clearTimeout(X.timeout),X.timeout=setTimeout(function(){X.dom&&(X.dom.style.transition="".concat(Oe,",").concat(pe),X.dom.style.width="",X.dom.style.transform="")})},X.remScrollingEffect=function(J){var B=X.props,Q=B.placement,ie=B.duration,oe=B.ease,xe=B.getOpenCount,ye=B.switchScrollingEffect,Ae=xe&&xe();Ae||ye(!0),i&&(document.body.style.overflowX="hidden"),X.dom.style.transition="none";var pe,Oe="width ".concat(ie," ").concat(oe),Fe="transform ".concat(ie," ").concat(oe);switch(Q){case"left":{X.dom.style.width="100%",Oe="width 0s ".concat(oe," ").concat(ie);break}case"right":{X.dom.style.transform="translateX(".concat(J,"px)"),X.dom.style.width="100%",Oe="width 0s ".concat(oe," ").concat(ie),X.maskDom&&(X.maskDom.style.left="-".concat(J,"px"),X.maskDom.style.width="calc(100% + ".concat(J,"px)"));break}case"top":case"bottom":{X.dom.style.width="calc(100% + ".concat(J,"px)"),X.dom.style.height="100%",X.dom.style.transform="translateZ(0)",pe="height 0s ".concat(oe," ").concat(ie);break}default:break}clearTimeout(X.timeout),X.timeout=setTimeout(function(){X.dom&&(X.dom.style.transition="".concat(Fe,",").concat(pe?"".concat(pe,","):"").concat(Oe),X.dom.style.transform="",X.dom.style.width="",X.dom.style.height="")})},X.getCurrentDrawerSome=function(){return!Object.keys(E).some(function(J){return E[J]})},X.getLevelDom=function(J){var B=J.level,Q=J.getContainer;if(_)return;var ie=Q&&Q(),oe=ie?ie.parentNode:null;if(X.levelDom=[],B==="all"){var xe=oe?Array.prototype.slice.call(oe.children):[];xe.forEach(function(ye){ye.nodeName!=="SCRIPT"&&ye.nodeName!=="STYLE"&&ye.nodeName!=="LINK"&&ye!==ie&&X.levelDom.push(ye)})}else B&&s(B).forEach(function(ye){document.querySelectorAll(ye).forEach(function(Ae){X.levelDom.push(Ae)})})},X.getHorizontalBoolAndPlacementName=function(){var J=X.props.placement,B=J==="left"||J==="right",Q="translate".concat(B?"X":"Y");return{isHorizontal:B,placementName:Q}},X.state={_self:Object(p.a)(X)},X}return Object(U.a)(j,[{key:"componentDidMount",value:function(){var X=this;if(!_){var J=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return J=!0,null}}))}catch(xe){}this.passive=J?{passive:!1}:!1}var B=this.props,Q=B.open,ie=B.getContainer,oe=ie&&ie();this.drawerId="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(Math.random()*9).toString())).toString(16)),this.getLevelDom(this.props),Q&&(oe&&oe.parentNode===document.body&&(E[this.drawerId]=Q),this.openLevelTransition(),this.forceUpdate(function(){X.domFocus()}))}},{key:"componentDidUpdate",value:function(X){var J=this.props,B=J.open,Q=J.getContainer,ie=Q&&Q();B!==X.open&&(B&&this.domFocus(),ie&&ie.parentNode===document.body&&(E[this.drawerId]=!!B),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var X=this.props,J=X.getOpenCount,B=X.open,Q=X.switchScrollingEffect,ie=typeof J=="function"&&J();delete E[this.drawerId],B&&(this.setLevelTransform(!1),document.body.style.touchAction=""),ie||(document.body.style.overflow="",Q(!0))}},{key:"render",value:function(){var X,J=this,B=this.props,Q=B.className,ie=B.children,oe=B.style,xe=B.width,ye=B.height,Ae=B.defaultOpen,pe=B.open,Oe=B.prefixCls,Fe=B.placement,Me=B.level,Ce=B.levelMove,Le=B.ease,de=B.duration,ue=B.getContainer,ke=B.handler,Ue=B.onChange,Ye=B.afterVisibleChange,ee=B.showMask,M=B.maskClosable,N=B.maskStyle,$=B.onClose,V=B.onHandleClick,Y=B.keyboard,me=B.getOpenCount,Re=B.switchScrollingEffect,rt=Object(ae.a)(B,["className","children","style","width","height","defaultOpen","open","prefixCls","placement","level","levelMove","ease","duration","getContainer","handler","onChange","afterVisibleChange","showMask","maskClosable","maskStyle","onClose","onHandleClick","keyboard","getOpenCount","switchScrollingEffect"]),Pe=this.dom?pe:!1,Ie=d()(Oe,(X={},Object(l.a)(X,"".concat(Oe,"-").concat(Fe),!0),Object(l.a)(X,"".concat(Oe,"-open"),Pe),Object(l.a)(X,Q||"",!!Q),Object(l.a)(X,"no-mask",!ee),X)),Xe=this.getHorizontalBoolAndPlacementName(),tt=Xe.placementName,Ve=Fe==="left"||Fe==="top"?"-100%":"100%",Ke=Pe?"":"".concat(tt,"(").concat(Ve,")"),Ne=ke&&T.cloneElement(ke,{onClick:function(_e){ke.props.onClick&&ke.props.onClick(),V&&V(_e)},ref:function(_e){J.handlerDom=_e}});return T.createElement("div",Object.assign({},rt,{tabIndex:-1,className:Ie,style:oe,ref:function(_e){J.dom=_e},onKeyDown:Pe&&Y?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),ee&&T.createElement("div",{className:"".concat(Oe,"-mask"),onClick:M?$:void 0,style:N,ref:function(_e){J.maskDom=_e}}),T.createElement("div",{className:"".concat(Oe,"-content-wrapper"),style:{transform:Ke,msTransform:Ke,width:g(xe)?"".concat(xe,"px"):xe,height:g(ye)?"".concat(ye,"px"):ye},ref:function(_e){J.contentWrapper=_e}},T.createElement("div",{className:"".concat(Oe,"-content"),ref:function(_e){J.contentDom=_e},onTouchStart:Pe&&ee?this.removeStartHandler:void 0,onTouchMove:Pe&&ee?this.removeMoveHandler:void 0},ie),Ne))}}],[{key:"getDerivedStateFromProps",value:function(X,J){var B=J.prevProps,Q=J._self,ie={prevProps:X};if(B!==void 0){var oe=X.placement,xe=X.level;oe!==B.placement&&(Q.contentDom=null),xe!==B.level&&Q.getLevelDom(X)}return ie}}]),j}(T.Component);a.defaultProps={switchScrollingEffect:function(){}};var x=a;function O(K){var ne=A();return function(){var G=Object(S.a)(K),X;if(ne){var J=Object(S.a)(this).constructor;X=Reflect.construct(G,arguments,J)}else X=G.apply(this,arguments);return Object(P.a)(this,X)}}function A(){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(K){return!1}}var D=function(K){Object(w.a)(j,K);var ne=O(j);function j(G){var X;Object(Z.a)(this,j),X=ne.call(this,G),X.onHandleClick=function(B){var Q=X.props,ie=Q.onHandleClick,oe=Q.open;if(ie&&ie(B),typeof oe=="undefined"){var xe=X.state.open;X.setState({open:!xe})}},X.onClose=function(B){var Q=X.props,ie=Q.onClose,oe=Q.open;ie&&ie(B),typeof oe=="undefined"&&X.setState({open:!1})};var J=typeof G.open!="undefined"?G.open:!!G.defaultOpen;return X.state={open:J},"onMaskClick"in G&&console.warn("`onMaskClick` are removed, please use `onClose` instead."),X}return Object(U.a)(j,[{key:"render",value:function(){var X=this,J=this.props,B=J.defaultOpen,Q=J.getContainer,ie=J.wrapperClassName,oe=J.forceRender,xe=J.handler,ye=Object(ae.a)(J,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),Ae=this.state.open;if(!Q)return T.createElement("div",{className:ie,ref:function(Fe){X.dom=Fe}},T.createElement(x,Object.assign({},ye,{open:Ae,handler:xe,getContainer:function(){return X.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var pe=!!xe||oe;return T.createElement(C.a,{visible:Ae,forceRender:pe,getContainer:Q,wrapperClassName:ie},function(Oe){var Fe=Oe.visible,Me=Oe.afterClose,Ce=Object(ae.a)(Oe,["visible","afterClose"]);return T.createElement(x,Object.assign({},ye,Ce,{open:Fe!==void 0?Fe:Ae,afterVisibleChange:Me!==void 0?Me:ye.afterVisibleChange,handler:xe,onClose:X.onClose,onHandleClick:X.onHandleClick}))})}}],[{key:"getDerivedStateFromProps",value:function(X,J){var B=J.prevProps,Q={prevProps:X};return typeof B!="undefined"&&X.open!==B.open&&(Q.open=X.open),Q}}]),j}(T.Component);D.defaultProps={prefixCls:"drawer",placement:"left",getContainer:"body",defaultOpen:!1,level:"all",duration:".3s",ease:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",onChange:function(){},afterVisibleChange:function(){},handler:T.createElement("div",{className:"drawer-handle"},T.createElement("i",{className:"drawer-handle-icon"})),showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",className:"",keyboard:!0,forceRender:!1};var I=D,F=We.a=I},fcyK:function($e,We,z){},fyJ8:function($e,We,z){"use strict";var ae=z("rePB"),Z=z("VTBJ"),U=z("Ff2n"),w=z("U8pU"),P=z("q1tI"),S=z.n(P),C=z("TSYQ"),T=z.n(C),l=z("c+Xe"),p=z("sR1s");function h(f){return f&&Object(w.a)(f)==="object"&&!Array.isArray(f)&&!P.isValidElement(f)}function d(f){return typeof f=="string"?!0:Object(l.c)(f)}function o(f,i){var n,t=f.prefixCls,u=f.className,y=f.record,g=f.index,_=f.dataIndex,b=f.render,v=f.children,m=f.component,E=m===void 0?"td":m,a=f.colSpan,x=f.rowSpan,O=f.fixLeft,A=f.fixRight,D=f.firstFixLeft,I=f.lastFixLeft,F=f.firstFixRight,K=f.lastFixRight,ne=f.appendNode,j=f.additionalProps,G=j===void 0?{}:j,X=f.ellipsis,J=f.align,B=f.rowType,Q=f.isSticky,ie="".concat(t,"-cell"),oe,xe;if(v)xe=v;else{var ye=Object(p.b)(y,_);if(xe=ye,b){var Ae=b(ye,y,g);h(Ae)?(xe=Ae.children,oe=Ae.props):xe=Ae}}Object(w.a)(xe)==="object"&&!Array.isArray(xe)&&!P.isValidElement(xe)&&(xe=null),X&&(I||F)&&(xe=P.createElement("span",{className:"".concat(ie,"-content")},xe));var pe=oe||{},Oe=pe.colSpan,Fe=pe.rowSpan,Me=pe.style,Ce=pe.className,Le=Object(U.a)(pe,["colSpan","rowSpan","style","className"]),de=Oe!==void 0?Oe:a,ue=Fe!==void 0?Fe:x;if(de===0||ue===0)return null;var ke={},Ue=typeof O=="number",Ye=typeof A=="number";Ue&&(ke.position="sticky",ke.left=O),Ye&&(ke.position="sticky",ke.right=A);var ee={};J&&(ee.textAlign=J);var M,N=X===!0?{showTitle:!0}:X;N&&(N.showTitle||B==="header")&&(typeof xe=="string"||typeof xe=="number"?M=xe.toString():P.isValidElement(xe)&&typeof xe.props.children=="string"&&(M=xe.props.children));var $=Object(Z.a)(Object(Z.a)(Object(Z.a)({title:M},Le),G),{},{colSpan:de&&de!==1?de:null,rowSpan:ue&&ue!==1?ue:null,className:T()(ie,u,(n={},Object(ae.a)(n,"".concat(ie,"-fix-left"),Ue),Object(ae.a)(n,"".concat(ie,"-fix-left-first"),D),Object(ae.a)(n,"".concat(ie,"-fix-left-last"),I),Object(ae.a)(n,"".concat(ie,"-fix-right"),Ye),Object(ae.a)(n,"".concat(ie,"-fix-right-first"),F),Object(ae.a)(n,"".concat(ie,"-fix-right-last"),K),Object(ae.a)(n,"".concat(ie,"-ellipsis"),X),Object(ae.a)(n,"".concat(ie,"-with-append"),ne),Object(ae.a)(n,"".concat(ie,"-fix-sticky"),(Ue||Ye)&&Q),n),G.className,Ce),style:Object(Z.a)(Object(Z.a)(Object(Z.a)(Object(Z.a)({},G.style),ee),ke),Me),ref:d(E)?i:null});return P.createElement(E,Object.assign({},$),ne,xe)}var c=P.forwardRef(o);c.displayName="Cell";var s=P.memo(c,function(f,i){return i.shouldCellUpdate?!i.shouldCellUpdate(i.record,f.record):!1});We.a=s},gRFJ:function($e,We,z){$e.exports=[z("rdUC"),z("ynwM"),z("RELg"),z("DlR+"),z("CrYA"),z("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($e){return $e<10?"0"+$e:$e}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($e){return rx_escapable.lastIndex=0,rx_escapable.test($e)?'"'+$e.replace(rx_escapable,function(We){var z=meta[We];return typeof z=="string"?z:"\\u"+("0000"+We.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+$e+'"'}function str($e,We){var z,ae,Z,U,w=gap,P,S=We[$e];S&&typeof S=="object"&&typeof S.toJSON=="function"&&(S=S.toJSON($e)),typeof rep=="function"&&(S=rep.call(We,$e,S));switch(typeof S){case"string":return quote(S);case"number":return isFinite(S)?String(S):"null";case"boolean":case"null":return String(S);case"object":if(!S)return"null";if(gap+=indent,P=[],Object.prototype.toString.apply(S)==="[object Array]"){for(U=S.length,z=0;z0&&!this.paused&&!this.ended&&this.readyState>2}});function f(t,u){return t-u}function i(t){t.sort(f);for(var u=0,y=0;y1&&arguments[1]!==void 0?arguments[1]:!1,_e={point:B.current.currentTime};$?(_e.log_id=$,_e.watch_duration=i(Pe),_e.total_duration=M):(x?(_e.video_id=parseInt(m,10),_e.course_id=x):_e.video_id=m,_e.duration=ee,_e.device=ke),De&&(_e.ed="1");function he(){return ve.apply(this,arguments)}function ve(){return ve=Object(U.a)(P.a.mark(function Ee(){var be;return P.a.wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:return Re=!0,qe.next=3,E(_e);case 3:be=qe.sent,$=be,Re=!1,Ne&&Ne();case 7:case"end":return qe.stop()}},Ee)})),ve.apply(this,arguments)}he()},[m,x]);Object(S.useEffect)(function(){var Ne;Z.b.destroy();var De=null;return T.a.isSupported&&J&&b&&((Ne=b)===null||Ne===void 0?void 0:Ne.indexOf(".m3u8"))<0?(De=T.a.createPlayer({type:"flv",volume:.8,cors:!0,url:b,muted:!1}),B.current&&(De.attachMediaElement(B.current),De.load())):B.current.setAttribute("src",b),tt(),function(){De&&(De.unload(),De.pause(),De.destroy(),De=null)}},[B,J,b]);function Xe(){B.current.paused?(oe.current.style.display="none",xe.current.style.display="block"):(oe.current.style.display="block",xe.current.style.display="none")}function tt(){Me.current.style.display="none",Le.current.style.display="none",Ce.current.style.display="none",B.current.muted||B.current.volume===0?Me.current.style.display="block":B.current.volume>0&&B.current.volume<=.5?Le.current.style.display="block":Ce.current.style.display="block"}Object(S.useEffect)(function(){var Ne=document.getElementById("play"),De=document.querySelectorAll(".playback-icons use");function _e(){F(),O&&!Ue.current&&(B.current.currentTime=O),Ue.current=!0,Pe.push(B.current.currentTime),V||(V=!0,v&&Ie())}function he(){return ve.apply(this,arguments)}function ve(){return ve=Object(U.a)(P.a.mark(function Qe(){return P.a.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:Xe(),Pe.push(B.current.currentTime),v&&Ie(function(){$=null,N=0,V=!1,Re=!1,rt=!1,Pe=[],M=0,me=1},!0);case 3:case"end":return je.stop()}},Qe)})),ve.apply(this,arguments)}function Ee(){ye.current.value=Math.floor(B.current.currentTime),Ae.current.value=Math.floor(B.current.currentTime)}function be(){var Qe=s(Math.round(B.current.currentTime));Oe.current.innerText="".concat(Qe.minutes,":").concat(Qe.seconds),Oe.current.setAttribute("datetime","".concat(Qe.minutes,"m ").concat(Qe.seconds,"s"))}function Ge(){var Qe=Math.round(B.current.duration);ye.current.setAttribute("max",Qe),Ae.current.setAttribute("max",Qe);var Te=s(Qe);pe.current.innerText="".concat(Te.minutes,":").concat(Te.seconds),pe.current.setAttribute("datetime","".concat(Te.minutes,"m ").concat(Te.seconds,"s"))}function qe(){var Qe=Math.round(B.current.duration);ye.current.setAttribute("max",Qe),Ae.current.setAttribute("max",Qe);var Te=s(Qe);pe.current.innerText="".concat(Te.minutes,":").concat(Te.seconds),pe.current.setAttribute("datetime","".concat(Te.minutes,"m ").concat(Te.seconds,"s")),Ee(),be();var je=Q.current.getBoundingClientRect(),ct=je.width,Ze=je.height,Tt=je.x,Ot=je.y;if(Tt<0||Ot<0||!ct)return;if(!rt){var st=B.current.currentTime,gt=st-N;Math.abs(gt)<10?(M+=Math.abs(gt),N=st,Re||M-me*Y>=0&&(me++,Pe.push(N),v&&Ie())):(N=st,v&&Ie())}}function pt(){rt=!0}function Pt(){B.current.playing&&Pe.push(B.current.currentTime,N),N=B.current.currentTime,rt=!1}function Rt(){ee=B.current.duration,ee<=20&&(Y=ee/3),B.current.addEventListener("play",_e)}function Mt(Qe){Qe.preventDefault(),Object(d.a)()?(B.current.style.width="100%",B.current.style.height="100%"):B.current.style.cssText=""}function wt(){D()}function lt(Qe){var Te=Qe.target.dataset.seek?Qe.target.dataset.seek:Qe.target.value;B.current.currentTime=Te,Ae.current.value=Te,ye.current.value=Te}function ft(Qe){var Te=Math.round(Qe.offsetX/Qe.target.clientWidth*parseInt(Qe.target.getAttribute("max"),10));ye.current.setAttribute("data-seek",Te);var je=s(Te);Fe.current.textContent="".concat(je.minutes,":").concat(je.seconds);var ct=B.current.getBoundingClientRect();Fe.current.style.left="".concat(Qe.pageX-ct.left,"px")}return ie.current.addEventListener(Object(d.c)(),Mt),B.current.addEventListener("canplay",Rt),B.current.addEventListener("ended",he),B.current.addEventListener("seeking",pt),B.current.addEventListener("seeked",Pt),B.current.addEventListener("loadedmetadata",Ge),ye.current.addEventListener("mousemove",ft),ye.current.addEventListener("input",lt),B.current.addEventListener("timeupdate",qe),B.current.addEventListener("pause",wt),B.current.addEventListener("volumechange",tt),function(){B.current.removeEventListener("canplay",Rt),B.current.removeEventListener("play",_e),B.current.removeEventListener("ended",he),B.current.removeEventListener("seeking",pt),B.current.removeEventListener("seeked",Pt),ye.current.removeEventListener("mousemove",ft),ye.current.removeEventListener("input",lt),B.current.removeEventListener("timeupdate",qe),B.current.removeEventListener("pause",wt),B.current.removeEventListener("loadedmetadata",Ge),B.current.removeEventListener("volumechange",tt),B.current.playing&&(Pe.push(N,B.current.currentTime),v&&Ie())}},[B,b]),Object(S.useEffect)(function(){var Ne;if(B.current.onended=function(){ne(B)},B.current.oncontextmenu=function(){return!1},((Ne=b)===null||Ne===void 0?void 0:Ne.indexOf(".m3u8"))>-1){if(B.current.canPlayType("application/vnd.apple.mpegurl"))B.current.src=b;else if(p.a.isSupported()){var De=new p.a;De.loadSource(b),De.attachMedia(B.current)}}},[b]),Object(S.useEffect)(function(){B.current.playbackRate=G},[G]);var Ve=function(){B.current.paused||B.current.ended?B.current.play():B.current.pause(),Xe()};function Ke(){B.current.muted=!B.current.muted,B.current.muted?(de.current.setAttribute("data-volume",volume.value),de.current.value=0):de.current.value=de.current.dataset.volume}return C.a.createElement("div",{style:{position:"relative"},ref:ie},C.a.createElement("div",{ref:Q,className:"".concat(c.a.watermark," animated_alternate animate__animated_10s animate__infinite animate__stepstart ").concat(c.a.animate__loop)},Ye?Ye.login:" "),C.a.createElement("div",{className:c.a.container},C.a.createElement("div",{className:c.a["video-container"],id:"video-container"},C.a.createElement("div",{className:c.a["playback-animation"],id:"playback-animation"},C.a.createElement("svg",{className:c.a["playback-icons"]},C.a.createElement("use",{className:"hidden",href:"#play-icon"}),C.a.createElement("use",{href:"#pause"}))),C.a.createElement("video",{className:c.a.video,id:"video",preload:"auto",disablePictureInPicture:!0,ref:B,autoPlay:!1}),C.a.createElement("div",{className:"".concat(c.a["video-controls"]," "),id:"video-controls"},C.a.createElement("div",{className:c.a["bottom-controls"]},C.a.createElement("div",{className:c.a["left-controls"]},C.a.createElement("button",{"data-title":"\u64AD\u653E/\u6682\u505C",id:"play",onClick:Ve},C.a.createElement("svg",{className:c.a["playback-icons"]},C.a.createElement("use",{ref:xe,href:"#play-icon"}),C.a.createElement("use",{ref:oe,style:{display:"none"},href:"#pause"}))),C.a.createElement("div",{className:c.a.time},C.a.createElement("time",{id:"time-elapsed",ref:Oe},"00:00"),C.a.createElement("span",null," / "),C.a.createElement("time",{id:"duration",ref:pe},"00:00"))),C.a.createElement("div",{className:c.a["right-controls"]},C.a.createElement("div",{className:c.a["volume-controls"]},C.a.createElement("button",{"data-title":"\u5F00\u542F/\u5173\u95ED\u58F0\u97F3",className:c.a["volume-button"],id:"volume-button",onClick:Ke},C.a.createElement("svg",null,C.a.createElement("use",{ref:Me,href:"#volume-mute"}),C.a.createElement("use",{ref:Le,href:"#volume-low"}),C.a.createElement("use",{ref:Ce,href:"#volume-high"}))),C.a.createElement("input",{className:c.a.volume,id:"volume",value:"1","data-mute":"0.5",type:"range",max:"1",min:"0",step:"0.01",ref:de,style:{display:"none"},onClick:tt})),C.a.createElement("button",{"data-title":"\u5168\u5C4F/\u9000\u51FA\u5168\u5C4F",className:c.a["fullscreen-button"],onClick:function(){Object(d.a)()?Object(d.b)():Object(d.d)(ie.current)}},C.a.createElement("svg",null,C.a.createElement("use",{href:"#fullscreen"}),C.a.createElement("use",{href:"#fullscreen-exit",className:"hidden"}))))),C.a.createElement("div",{className:c.a["video-progress"]},C.a.createElement("progress",{ref:Ae,value:"0",min:"0"}),C.a.createElement("input",{className:c.a.seek,ref:ye,value:"0",min:"0",type:"range",step:"1"}),C.a.createElement("div",{className:c.a["seek-tooltip"],ref:Fe,id:"seek-tooltip"},"00:00"))))),C.a.createElement("svg",{style:{display:"none"}},C.a.createElement("defs",null,C.a.createElement("symbol",{id:"pause",viewBox:"0 0 24 24"},C.a.createElement("path",{d:"M14.016 5.016h3.984v13.969h-3.984v-13.969zM6 18.984v-13.969h3.984v13.969h-3.984z"})),C.a.createElement("symbol",{id:"play-icon",viewBox:"0 0 24 24"},C.a.createElement("path",{d:"M8.016 5.016l10.969 6.984-10.969 6.984v-13.969z"})),C.a.createElement("symbol",{id:"volume-high",viewBox:"0 0 24 24"},C.a.createElement("path",{d:"M14.016 3.234q3.047 0.656 5.016 3.117t1.969 5.648-1.969 5.648-5.016 3.117v-2.063q2.203-0.656 3.586-2.484t1.383-4.219-1.383-4.219-3.586-2.484v-2.063zM16.5 12q0 2.813-2.484 4.031v-8.063q1.031 0.516 1.758 1.688t0.727 2.344zM3 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6z"})),C.a.createElement("symbol",{id:"volume-low",viewBox:"0 0 24 24"},C.a.createElement("path",{d:"M5.016 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6zM18.516 12q0 2.766-2.531 4.031v-8.063q1.031 0.516 1.781 1.711t0.75 2.32z"})),C.a.createElement("symbol",{id:"volume-mute",viewBox:"0 0 24 24"},C.a.createElement("path",{d:"M12 3.984v4.219l-2.109-2.109zM4.266 3l16.734 16.734-1.266 1.266-2.063-2.063q-1.547 1.313-3.656 1.828v-2.063q1.172-0.328 2.25-1.172l-4.266-4.266v6.75l-5.016-5.016h-3.984v-6h4.734l-4.734-4.734zM18.984 12q0-2.391-1.383-4.219t-3.586-2.484v-2.063q3.047 0.656 5.016 3.117t1.969 5.648q0 2.203-1.031 4.172l-1.5-1.547q0.516-1.266 0.516-2.625zM16.5 12q0 0.422-0.047 0.609l-2.438-2.438v-2.203q1.031 0.516 1.758 1.688t0.727 2.344z"})),C.a.createElement("symbol",{id:"fullscreen",viewBox:"0 0 24 24"},C.a.createElement("path",{d:"M14.016 5.016h4.969v4.969h-1.969v-3h-3v-1.969zM17.016 17.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 9.984v-4.969h4.969v1.969h-3v3h-1.969zM6.984 14.016v3h3v1.969h-4.969v-4.969h1.969z"})),C.a.createElement("symbol",{id:"fullscreen-exit",viewBox:"0 0 24 24"},C.a.createElement("path",{d:"M15.984 8.016h3v1.969h-4.969v-4.969h1.969v3zM14.016 18.984v-4.969h4.969v1.969h-3v3h-1.969zM8.016 8.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 15.984v-1.969h4.969v4.969h-1.969v-3h-3z"})),C.a.createElement("symbol",{id:"pip",viewBox:"0 0 24 24"},C.a.createElement("path",{d:"M21 19.031v-14.063h-18v14.063h18zM23.016 18.984q0 0.797-0.609 1.406t-1.406 0.609h-18q-0.797 0-1.406-0.609t-0.609-1.406v-14.016q0-0.797 0.609-1.383t1.406-0.586h18q0.797 0 1.406 0.586t0.609 1.383v14.016zM18.984 11.016v6h-7.969v-6h7.969z"})))))})},i3hx:function($e,We,z){},je13:function($e,We,z){var ae=z("5nXd"),Z=z("gRFJ"),U=[z("uQRt")];$e.exports=ae.createStore(Z,U)},kSUc:function($e,We,z){},"kaH+":function($e,We,z){"use strict";var ae=z("+L6B"),Z=z("2/Rp"),U=z("tJVT"),w=z("q1tI"),P=z.n(w),S=z("UZu5"),C=z.n(S),T=z("dhSg"),l=z("rLCj"),p=z("dF/Y"),h=z("4i/N");We.a=function(){var d=Object(w.useState)(""),o=Object(U.a)(d,2),c=o[0],s=o[1],f=Object(w.useState)(0),i=Object(U.a)(f,2),n=i[0],t=i[1],u=Object(w.useRef)("");Object(w.useEffect)(function(){var b=T.a.subscribe("preview-image",function(v){s(v),document.body.style.overflow="hidden"});return b},[]),Object(w.useEffect)(function(){return document.addEventListener("keydown",y),function(){document.removeEventListener("keydown",y)}},[]),Object(w.useEffect)(function(){u.current=c},[c]);function y(b){b.keyCode==27&&u.current&&g()}function g(){document.body.style.overflow="auto",s("")}function _(){t(n+90)}return P.a.createElement(w.Fragment,null,c?P.a.createElement("div",{className:"image-preview-container"},P.a.createElement("div",{className:"button-group"},P.a.createElement(Z.a,{onClick:_},"\u65CB\u8F6C",P.a.createElement(l.a,null)),P.a.createElement(Z.a,{href:c},"\u4E0B\u8F7D",P.a.createElement(p.a,null)),P.a.createElement(Z.a,{onClick:g},"\u5173\u95ED",P.a.createElement(h.a,null))),P.a.createElement("div",{className:"preview-wrp-group"},P.a.createElement("img",{className:"image-preview",src:c,alt:"\u9884\u89C8\u5927\u56FE",style:{transform:"rotate(".concat(n,"deg)")}}))):null)}},kovY:function($e,We,z){$e.exports=z.p+"static/e.eabfa286.svg"},lOMy:function($e,We,z){},lZu9:function($e,We,z){(function(ae){ae(z("VrN/"),z("1eCo"),z("8EBN"))})(function(ae){"use strict";ae.defineMode("markdown",function(Z,U){var w=ae.getMode(Z,"text/html"),P=w.name=="null";function S(j){if(ae.findModeByName){var G=ae.findModeByName(j);G&&(j=G.mime||G.mimes[0])}var X=ae.getMode(Z,j);return X.name=="null"?null:X}U.highlightFormatting===void 0&&(U.highlightFormatting=!1),U.maxBlockquoteDepth===void 0&&(U.maxBlockquoteDepth=0),U.taskLists===void 0&&(U.taskLists=!1),U.strikethrough===void 0&&(U.strikethrough=!1),U.emoji===void 0&&(U.emoji=!1),U.fencedCodeBlockHighlighting===void 0&&(U.fencedCodeBlockHighlighting=!0),U.fencedCodeBlockDefaultMode===void 0&&(U.fencedCodeBlockDefaultMode="text/plain"),U.xml===void 0&&(U.xml=!0),U.tokenTypeOverrides===void 0&&(U.tokenTypeOverrides={});var C={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var T in C)C.hasOwnProperty(T)&&U.tokenTypeOverrides[T]&&(C[T]=U.tokenTypeOverrides[T]);var l=/^([*\-_])(?:\s*\1){2,}\s*$/,p=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,h=/^\[(x| )\](?=\s)/i,d=U.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,o=/^ {0,3}(?:\={1,}|-{2,})\s*$/,c=/^[^#!\[\]*_\\<>` "'(~:]+/,s=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,f=/^\s*\[[^\]]+?\]:.*$/,i=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,n=" ";function t(j,G,X){return G.f=G.inline=X,X(j,G)}function u(j,G,X){return G.f=G.block=X,X(j,G)}function y(j){return!j||!/\S/.test(j.string)}function g(j){if(j.linkTitle=!1,j.linkHref=!1,j.linkText=!1,j.em=!1,j.strong=!1,j.strikethrough=!1,j.quote=0,j.indentedCode=!1,j.f==b){var G=P;if(!G){var X=ae.innerMode(w,j.htmlState);G=X.mode.name=="xml"&&X.state.tagStart===null&&!X.state.context&&X.state.tokenize.isInText}G&&(j.f=a,j.block=_,j.htmlState=null)}return j.trailingSpace=0,j.trailingSpaceNewLine=!1,j.prevLine=j.thisLine,j.thisLine={stream:null},null}function _(j,G){var X=j.column()===G.indentation,J=y(G.prevLine.stream),B=G.indentedCode,Q=G.prevLine.hr,ie=G.list!==!1,oe=(G.listStack[G.listStack.length-1]||0)+3;G.indentedCode=!1;var xe=G.indentation;if(G.indentationDiff===null&&(G.indentationDiff=G.indentation,ie)){for(G.list=null;xe=4&&(B||G.prevLine.fencedCodeEnd||G.prevLine.header||J))return j.skipToEnd(),G.indentedCode=!0,C.code;if(j.eatSpace())return null;if(X&&G.indentation<=oe&&(pe=j.match(d))&&pe[1].length<=6)return G.quote=0,G.header=pe[1].length,G.thisLine.header=!0,U.highlightFormatting&&(G.formatting="header"),G.f=G.inline,m(G);if(G.indentation<=oe&&j.eat(">"))return G.quote=X?1:G.quote+1,U.highlightFormatting&&(G.formatting="quote"),j.eatSpace(),m(G);if(!Ae&&!G.setext&&X&&G.indentation<=oe&&(pe=j.match(p))){var Oe=pe[1]?"ol":"ul";return G.indentation=xe+j.current().length,G.list=!0,G.quote=0,G.listStack.push(G.indentation),G.em=!1,G.strong=!1,G.code=!1,G.strikethrough=!1,U.taskLists&&j.match(h,!1)&&(G.taskList=!0),G.f=G.inline,U.highlightFormatting&&(G.formatting=["list","list-"+Oe]),m(G)}else{if(X&&G.indentation<=oe&&(pe=j.match(s,!0)))return G.quote=0,G.fencedEndRE=new RegExp(pe[1]+"+ *$"),G.localMode=U.fencedCodeBlockHighlighting&&S(pe[2]||U.fencedCodeBlockDefaultMode),G.localMode&&(G.localState=ae.startState(G.localMode)),G.f=G.block=v,U.highlightFormatting&&(G.formatting="code-block"),G.code=-1,m(G);if(G.setext||(!ye||!ie)&&!G.quote&&G.list===!1&&!G.code&&!Ae&&!f.test(j.string)&&(pe=j.lookAhead(1))&&(pe=pe.match(o)))return G.setext?(G.header=G.setext,G.setext=0,j.skipToEnd(),U.highlightFormatting&&(G.formatting="header")):(G.header=pe[0].charAt(0)=="="?1:2,G.setext=G.header),G.thisLine.header=!0,G.f=G.inline,m(G);if(Ae)return j.skipToEnd(),G.hr=!0,G.thisLine.hr=!0,C.hr;if(j.peek()==="[")return t(j,G,I)}return t(j,G,G.inline)}function b(j,G){var X=w.token(j,G.htmlState);if(!P){var J=ae.innerMode(w,G.htmlState);(J.mode.name=="xml"&&J.state.tagStart===null&&!J.state.context&&J.state.tokenize.isInText||G.md_inside&&j.current().indexOf(">")>-1)&&(G.f=a,G.block=_,G.htmlState=null)}return X}function v(j,G){var X=G.listStack[G.listStack.length-1]||0,J=G.indentation=j.quote?G.push(C.formatting+"-"+j.formatting[X]+"-"+j.quote):G.push("error"))}if(j.taskOpen)return G.push("meta"),G.length?G.join(" "):null;if(j.taskClosed)return G.push("property"),G.length?G.join(" "):null;if(j.linkHref?G.push(C.linkHref,"url"):(j.strong&&G.push(C.strong),j.em&&G.push(C.em),j.strikethrough&&G.push(C.strikethrough),j.emoji&&G.push(C.emoji),j.linkText&&G.push(C.linkText),j.code&&G.push(C.code),j.image&&G.push(C.image),j.imageAltText&&G.push(C.imageAltText,"link"),j.imageMarker&&G.push(C.imageMarker)),j.header&&G.push(C.header,C.header+"-"+j.header),j.quote&&(G.push(C.quote),!U.maxBlockquoteDepth||U.maxBlockquoteDepth>=j.quote?G.push(C.quote+"-"+j.quote):G.push(C.quote+"-"+U.maxBlockquoteDepth)),j.list!==!1){var J=(j.listStack.length-1)%3;J?J===1?G.push(C.list2):G.push(C.list3):G.push(C.list1)}return j.trailingSpaceNewLine?G.push("trailing-space-new-line"):j.trailingSpace&&G.push("trailing-space-"+(j.trailingSpace%2?"a":"b")),G.length?G.join(" "):null}function E(j,G){return j.match(c,!0)?m(G):void 0}function a(j,G){var X=G.text(j,G);if(typeof X!="undefined")return X;if(G.list)return G.list=null,m(G);if(G.taskList){var J=j.match(h,!0)[1]===" ";return J?G.taskOpen=!0:G.taskClosed=!0,U.highlightFormatting&&(G.formatting="task"),G.taskList=!1,m(G)}if(G.taskOpen=!1,G.taskClosed=!1,G.header&&j.match(/^#+$/,!0))return U.highlightFormatting&&(G.formatting="header"),m(G);var B=j.next();if(G.linkTitle){G.linkTitle=!1;var Q=B;B==="("&&(Q=")"),Q=(Q+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ie="^\\s*(?:[^"+Q+"\\\\]+|\\\\\\\\|\\\\.)"+Q;if(j.match(new RegExp(ie),!0))return C.linkHref}if(B==="`"){var oe=G.formatting;U.highlightFormatting&&(G.formatting="code"),j.eatWhile("`");var xe=j.current().length;if(G.code==0&&(!G.quote||xe==1))return G.code=xe,m(G);if(xe==G.code){var ye=m(G);return G.code=0,ye}else return G.formatting=oe,m(G)}else if(G.code)return m(G);if(B==="\\"&&(j.next(),U.highlightFormatting)){var Ae=m(G),pe=C.formatting+"-escape";return Ae?Ae+" "+pe:pe}if(B==="!"&&j.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return G.imageMarker=!0,G.image=!0,U.highlightFormatting&&(G.formatting="image"),m(G);if(B==="["&&G.imageMarker&&j.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return G.imageMarker=!1,G.imageAltText=!0,U.highlightFormatting&&(G.formatting="image"),m(G);if(B==="]"&&G.imageAltText){U.highlightFormatting&&(G.formatting="image");var Ae=m(G);return G.imageAltText=!1,G.image=!1,G.inline=G.f=O,Ae}if(B==="["&&!G.image)return G.linkText&&j.match(/^.*?\]/)||(G.linkText=!0,U.highlightFormatting&&(G.formatting="link")),m(G);if(B==="]"&&G.linkText){U.highlightFormatting&&(G.formatting="link");var Ae=m(G);return G.linkText=!1,G.inline=G.f=j.match(/\(.*?\)| ?\[.*?\]/,!1)?O:a,Ae}if(B==="<"&&j.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){G.f=G.inline=x,U.highlightFormatting&&(G.formatting="link");var Ae=m(G);return Ae?Ae+=" ":Ae="",Ae+C.linkInline}if(B==="<"&&j.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){G.f=G.inline=x,U.highlightFormatting&&(G.formatting="link");var Ae=m(G);return Ae?Ae+=" ":Ae="",Ae+C.linkEmail}if(U.xml&&B==="<"&&j.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Oe=j.string.indexOf(">",j.pos);if(Oe!=-1){var Fe=j.string.substring(j.start,Oe);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Fe)&&(G.md_inside=!0)}return j.backUp(1),G.htmlState=ae.startState(w),u(j,G,b)}if(U.xml&&B==="<"&&j.match(/^\/\w*?>/))return G.md_inside=!1,"tag";if(B==="*"||B==="_"){for(var Me=1,Ce=j.pos==1?" ":j.string.charAt(j.pos-2);Me<3&&j.eat(B);)Me++;var Le=j.peek()||" ",de=!/\s/.test(Le)&&(!i.test(Le)||/\s/.test(Ce)||i.test(Ce)),ue=!/\s/.test(Ce)&&(!i.test(Ce)||/\s/.test(Le)||i.test(Le)),ke=null,Ue=null;if(Me%2&&(!G.em&&de&&(B==="*"||!ue||i.test(Ce))?ke=!0:G.em==B&&ue&&(B==="*"||!de||i.test(Le))&&(ke=!1)),Me>1&&(!G.strong&&de&&(B==="*"||!ue||i.test(Ce))?Ue=!0:G.strong==B&&ue&&(B==="*"||!de||i.test(Le))&&(Ue=!1)),Ue!=null||ke!=null){U.highlightFormatting&&(G.formatting=ke==null?"strong":Ue==null?"em":"strong em"),ke===!0&&(G.em=B),Ue===!0&&(G.strong=B);var ye=m(G);return ke===!1&&(G.em=!1),Ue===!1&&(G.strong=!1),ye}}else if(B===" "&&(j.eat("*")||j.eat("_"))){if(j.peek()===" ")return m(G);j.backUp(1)}if(U.strikethrough){if(B==="~"&&j.eatWhile(B)){if(G.strikethrough){U.highlightFormatting&&(G.formatting="strikethrough");var ye=m(G);return G.strikethrough=!1,ye}else if(j.match(/^[^\s]/,!1))return G.strikethrough=!0,U.highlightFormatting&&(G.formatting="strikethrough"),m(G)}else if(B===" "&&j.match(/^~~/,!0)){if(j.peek()===" ")return m(G);j.backUp(2)}}if(U.emoji&&B===":"&&j.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){G.emoji=!0,U.highlightFormatting&&(G.formatting="emoji");var Ye=m(G);return G.emoji=!1,Ye}return B===" "&&(j.match(/^ +$/,!1)?G.trailingSpace++:G.trailingSpace&&(G.trailingSpaceNewLine=!0)),m(G)}function x(j,G){var X=j.next();if(X===">"){G.f=G.inline=a,U.highlightFormatting&&(G.formatting="link");var J=m(G);return J?J+=" ":J="",J+C.linkInline}return j.match(/^[^>]+/,!0),C.linkInline}function O(j,G){if(j.eatSpace())return null;var X=j.next();return X==="("||X==="["?(G.f=G.inline=D(X==="("?")":"]"),U.highlightFormatting&&(G.formatting="link-string"),G.linkHref=!0,m(G)):"error"}var A={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function D(j){return function(G,X){var J=G.next();if(J===j){X.f=X.inline=a,U.highlightFormatting&&(X.formatting="link-string");var B=m(X);return X.linkHref=!1,B}return G.match(A[j]),X.linkHref=!0,m(X)}}function I(j,G){return j.match(/^([^\]\\]|\\.)*\]:/,!1)?(G.f=F,j.next(),U.highlightFormatting&&(G.formatting="link"),G.linkText=!0,m(G)):t(j,G,a)}function F(j,G){if(j.match(/^\]:/,!0)){G.f=G.inline=K,U.highlightFormatting&&(G.formatting="link");var X=m(G);return G.linkText=!1,X}return j.match(/^([^\]\\]|\\.)+/,!0),C.linkText}function K(j,G){return j.eatSpace()?null:(j.match(/^[^\s]+/,!0),j.peek()===void 0?G.linkTitle=!0:j.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),G.f=G.inline=a,C.linkHref+" url")}var ne={startState:function(){return{f:_,prevLine:{stream:null},thisLine:{stream:null},block:_,htmlState:null,indentation:0,inline:a,text:E,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(j){return{f:j.f,prevLine:j.prevLine,thisLine:j.thisLine,block:j.block,htmlState:j.htmlState&&ae.copyState(w,j.htmlState),indentation:j.indentation,localMode:j.localMode,localState:j.localMode?ae.copyState(j.localMode,j.localState):null,inline:j.inline,text:j.text,formatting:!1,linkText:j.linkText,linkTitle:j.linkTitle,linkHref:j.linkHref,code:j.code,em:j.em,strong:j.strong,strikethrough:j.strikethrough,emoji:j.emoji,header:j.header,setext:j.setext,hr:j.hr,taskList:j.taskList,list:j.list,listStack:j.listStack.slice(0),quote:j.quote,indentedCode:j.indentedCode,trailingSpace:j.trailingSpace,trailingSpaceNewLine:j.trailingSpaceNewLine,md_inside:j.md_inside,fencedEndRE:j.fencedEndRE}},token:function(j,G){if(G.formatting=!1,j!=G.thisLine.stream){if(G.header=0,G.hr=!1,j.match(/^\s*$/,!0))return g(G),null;if(G.prevLine=G.thisLine,G.thisLine={stream:j},G.taskList=!1,G.trailingSpace=0,G.trailingSpaceNewLine=!1,!G.localState&&(G.f=G.block,G.f!=b)){var X=j.match(/^\s*/,!0)[0].replace(/\t/g,n).length;if(G.indentation=X,G.indentationDiff=null,X>0)return null}}return G.f(j,G)},innerMode:function(j){return j.block==b?{state:j.htmlState,mode:w}:j.localState?{state:j.localState,mode:j.localMode}:{state:j,mode:ne}},indent:function(j,G,X){return j.block==b&&w.indent?w.indent(j.htmlState,G,X):j.localState&&j.localMode.indent?j.localMode.indent(j.localState,G,X):ae.Pass},blankLine:g,getType:m,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return ne},"xml"),ae.defineMIME("text/markdown","markdown"),ae.defineMIME("text/x-markdown","markdown")})},n6Qo:function($e,We,z){"use strict";z.d(We,"a",function(){return T});var ae=z("q1tI"),Z=z("biw7"),U=z("fyJ8");function w(l){var p=l.className,h=l.index,d=l.children,o=l.colSpan,c=l.rowSpan,s=ae.useContext(Z.a),f=s.prefixCls,i=s.fixedInfoList,n=i[h];return ae.createElement(U.a,Object.assign({className:p,index:h,component:"td",prefixCls:f,record:null,dataIndex:null,render:function(){return{children:d,props:{colSpan:o,rowSpan:c}}}},n))}function P(l){return ae.createElement("tr",Object.assign({},l))}function S(l){var p=l.children,h=ae.useContext(Z.a),d=h.prefixCls;return ae.createElement("tfoot",{className:"".concat(d,"-summary")},p)}var C=We.b=S,T={Cell:w,Row:P}},nCk5:function($e,We,z){$e.exports=z.p+"static/d.53bf6ae3.svg"},nWbc:function($e,We,z){},oE5q:function($e,We,z){$e.exports=z.p+"static/t.0b94c5c3.svg"},oFv4:function($e,We,z){$e.exports=z.p+"static/internal.da228387.png"},osHv:function($e,We,z){(function(ae){ae(z("VrN/"))})(function(ae){"use strict";var Z=ae.Pos;function U(i,n){return i.line-n.line||i.ch-n.ch}var w="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",P=w+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",S=new RegExp("<(/?)(["+w+"]["+P+"]*)","g");function C(i,n,t,u){this.line=n,this.ch=t,this.cm=i,this.text=i.getLine(n),this.min=u?Math.max(u.from,i.firstLine()):i.firstLine(),this.max=u?Math.min(u.to-1,i.lastLine()):i.lastLine()}function T(i,n){var t=i.cm.getTokenTypeAt(Z(i.line,n));return t&&/\btag\b/.test(t)}function l(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 h(i){for(;;){var n=i.text.indexOf(">",i.ch);if(n==-1){if(l(i))continue;return}if(!T(i,n+1)){i.ch=n+1;continue}var t=i.text.lastIndexOf("/",n),u=t>-1&&!/\S/.test(i.text.slice(t+1,n));return i.ch=n+1,u?"selfClose":"regular"}}function d(i){for(;;){var n=i.ch?i.text.lastIndexOf("<",i.ch-1):-1;if(n==-1){if(p(i))continue;return}if(!T(i,n+1)){i.ch=n;continue}S.lastIndex=n,i.ch=n;var t=S.exec(i.text);if(t&&t.index==n)return t}}function o(i){for(;;){S.lastIndex=i.ch;var n=S.exec(i.text);if(!n){if(l(i))continue;return}if(!T(i,n.index+1)){i.ch=n.index+1;continue}return i.ch=n.index+n[0].length,n}}function c(i){for(;;){var n=i.ch?i.text.lastIndexOf(">",i.ch-1):-1;if(n==-1){if(p(i))continue;return}if(!T(i,n+1)){i.ch=n;continue}var t=i.text.lastIndexOf("/",n),u=t>-1&&!/\S/.test(i.text.slice(t+1,n));return i.ch=n+1,u?"selfClose":"regular"}}function s(i,n){for(var t=[];;){var u=o(i),y,g=i.line,_=i.ch-(u?u[0].length:0);if(!u||!(y=h(i)))return;if(y=="selfClose")continue;if(u[1]){for(var b=t.length-1;b>=0;--b)if(t[b]==u[2]){t.length=b;break}if(b<0&&(!n||n==u[2]))return{tag:u[2],from:Z(g,_),to:Z(i.line,i.ch)}}else t.push(u[2])}}function f(i,n){for(var t=[];;){var u=c(i);if(!u)return;if(u=="selfClose"){d(i);continue}var y=i.line,g=i.ch,_=d(i);if(!_)return;if(_[1])t.push(_[2]);else{for(var b=t.length-1;b>=0;--b)if(t[b]==_[2]){t.length=b;break}if(b<0&&(!n||n==_[2]))return{tag:_[2],from:Z(i.line,i.ch),to:Z(y,g)}}}}ae.registerHelper("fold","xml",function(i,n){for(var t=new C(i,n.line,0);;){var u=o(t);if(!u||t.line!=n.line)return;var y=h(t);if(!y)return;if(!u[1]&&y!="selfClose"){var g=Z(t.line,t.ch),_=s(t,u[2]);return _&&U(_.from,g)>0?{from:g,to:_.from}:null}}}),ae.findMatchingTag=function(i,n,t){var u=new C(i,n.line,n.ch,t);if(u.text.indexOf(">")==-1&&u.text.indexOf("<")==-1)return;var y=h(u),g=y&&Z(u.line,u.ch),_=y&&d(u);if(!y||!_||U(u,n)>0)return;var b={from:Z(u.line,u.ch),to:g,tag:_[2]};return y=="selfClose"?{open:b,close:null,at:"open"}:_[1]?{open:f(u,_[2]),close:b,at:"close"}:(u=new C(i,g.line,g.ch,t),{open:b,close:s(u,_[2]),at:"open"})},ae.findEnclosingTag=function(i,n,t,u){for(var y=new C(i,n.line,n.ch,t);;){var g=f(y,u);if(!g)break;var _=new C(i,n.line,n.ch,t),b=s(_,g.tag);if(b)return{open:g,close:b}}},ae.scanForClosingTag=function(i,n,t,u){var y=new C(i,n.line,n.ch,u?{from:0,to:u}:null);return s(y,t)}})},p5ED:function($e,We,z){"use strict";var ae=z("+L6B"),Z=z("2/Rp"),U=z("5Dmo"),w=z("3S7+"),P=z("k1fw"),S=z("tJVT"),C=z("q1tI"),T=z.n(C),l=z("vHTk"),p=z.n(l),h=z("yEEn"),d=z("ZW9T"),o=z("1vsH");We.a=function(c){var s=c.name,f=c.data,i=c.theme,n=c.type,t=c.filename,u=c.monacoEditor,y=c.className,g=c.style,_=c.close,b=c.onClose,v=c.hasMask,m=Object(C.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),E=Object(S.a)(m,2),a=E[0],x=E[1],O=Object(C.useState)(""),A=Object(S.a)(O,2),D=A[0],I=A[1],F=Object(C.useRef)();t&&(u.filename=t),Object(C.useEffect)(function(){var j,G,X=(j=document.cookie)===null||j===void 0||((G=j.replace(/\s/g,""))===null||G===void 0)?void 0:G.split(";");X==null||X.map(function(J){var B=J.split("=");B[0]==="_educoder_session"&&I(B[1])})},[]);var K=function(){if(f.startsWith("http")||f.startsWith("/")){ne();return}Object(o.y)(t||"educoder",f,t)},ne=function(){Object(o.w)(t||s,f)};return console.log("data:",f,"fileanme:",t," name:",s),T.a.createElement("div",{style:Object(P.a)({},g||{}),className:"".concat(v&&p.a.bgBlack," ").concat(n?p.a.wrp:"hide")},_&&T.a.createElement("div",{className:p.a.close,ref:F},T.a.createElement(w.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return F.current}},T.a.createElement("span",{onClick:ne},T.a.createElement("i",{className:"icon-quxiaozhiding"}))),T.a.createElement(w.a,{title:"\u5173\u95ED",getPopupContainer:function(){return F.current}},T.a.createElement("span",{className:"",onClick:b},T.a.createElement("i",{className:"icon-guanbi1"})))),T.a.createElement("div",{className:"".concat(p.a[y]," ").concat(y," ").concat(p.a.monaco," ").concat(n==="txt"?"show":"hide")},n==="txt"&&T.a.createElement(d.b,u)),n==="audio"&&T.a.createElement("audio",{src:"".concat(f!=null&&f.startsWith("/")||(f==null?void 0:f.indexOf("https://"))>-1?f:"data:audio/mp3;base64,").concat(f),autoPlay:!0}),n==="video"&&T.a.createElement(T.a.Fragment,null,f!=null&&f.startsWith("/")?T.a.createElement("video",{controls:!0,src:"".concat(f),autoPlay:!0}):T.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(f),autoPlay:!0})),n==="pdf"&&T.a.createElement("embed",{className:p.a.embed,src:f}),n==="image"&&T.a.createElement(T.a.Fragment,null,T.a.createElement("img",{src:"".concat(f!=null&&f.startsWith("/")||(f==null?void 0:f.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(f)})),n==="other"&&T.a.createElement("div",null,T.a.createElement(Z.a,{type:"primary",size:"large",onClick:K},T.a.createElement(h.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(n==="download"||n==="office")&&T.a.createElement(Z.a,{type:"primary",size:"large",onClick:K},T.a.createElement(h.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function($e,We,z){},pYxM:function($e,We,z){$e.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($e,We,z){(function(ae){var Z,Z;!function(U){if(!0)window.OSS=U(),$e.exports=U();else var w}(function(){var U;return function(){function w(P,S,C){function T(h,d){if(!S[h]){if(!P[h]){var o=typeof Z=="function"&&Z;if(!d&&o)return Z(h,!0);if(l)return l(h,!0);var c=new Error("Cannot find module '"+h+"'");throw c.code="MODULE_NOT_FOUND",c}var s=S[h]={exports:{}};P[h][0].call(s.exports,function(f){return T(P[h][1][f]||f)},s,s.exports,w,P,S,C)}return S[h].exports}for(var l=typeof Z=="function"&&Z,p=0;p0?B["Content-Type"]=J.mime:B["Content-Type"]=_.getType(J.mime||y.extname(J.object||""))||"application/octet-stream"),J.content&&(B["Content-Md5"]=u.createHash("md5").update(new T(J.content,"utf8")).digest("base64"),B["Content-Length"]||(B["Content-Length"]=J.content.length));var Q=this._getResource(J);B.authorization=this.authorization(J.method,Q,J.subres,B);var ie=this._getReqUrl(J);t("request %s %s, with headers %j, !!stream: %s",J.method,ie,B,!!J.stream);var oe=J.timeout||this.options.timeout;return{url:ie,params:{agent:this.agent,method:J.method,content:J.content,stream:J.stream,headers:B,timeout:oe,writeStream:J.writeStream,customResponse:J.customResponse,ctx:J.ctx||this.ctx}}},X.request=f.default.mark(function J(B){var Q,ie,oe,xe;return f.default.wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:return Q=this.createRequest(B),ie=void 0,oe=void 0,ye.prev=3,ye.next=6,this.urllib.request(Q.url,Q.params);case 6:ie=ye.sent,t("response %s %s, got %s, headers: %j",B.method,Q.url,ie.status,ie.headers),ye.next=13;break;case 10:ye.prev=10,ye.t0=ye.catch(3),oe=ye.t0;case 13:if(xe=void 0,!ie||!B.successStatuses||B.successStatuses.indexOf(ie.status)!==-1){ye.next=26;break}return ye.next=17,this.requestError(ie);case 17:if(xe=ye.sent,xe.code!=="RequestTimeTooSkewed"){ye.next=23;break}return this.options.amendTimeSkewed=+new Date(xe.serverTime)-new Date,ye.next=22,this.request(B);case 22:return ye.abrupt("return",ye.sent);case 23:xe.params=B,ye.next=30;break;case 26:if(!oe){ye.next=30;break}return ye.next=29,this.requestError(oe);case 29:xe=ye.sent;case 30:if(!xe){ye.next=32;break}throw xe;case 32:if(!B.xmlResponse){ye.next=36;break}return ye.next=35,this.parseXML(ie.data);case 35:ie.data=ye.sent;case 36:return ye.abrupt("return",ie);case 37:case"end":return ye.stop()}},J,this,[[3,10]])}),X._getResource=function(J){var B="/";return J.bucket&&(B+=J.bucket+"/"),J.object&&(B+=J.object),B},X._isIP=function(J){return j._isIP(J)},X._escape=function(J){return A.encodeURIComponent(J).replace(/%2F/g,"/")},X._getReqUrl=function(J){var B={};g(this.options.endpoint).to(B);var Q=this._isIP(B.hostname),ie=this.options.cname;!J.bucket||ie||Q||(B.host=J.bucket+"."+B.host);var oe="/";J.bucket&&Q&&(oe+=J.bucket+"/"),J.object&&(oe+=this._escape(J.object).replace(/\+/g,"%2B")),B.pathname=oe;var xe={};if(J.query&&E(xe,J.query),J.subres){var ye={};x.string(J.subres)?ye[J.subres]="":x.array(J.subres)?J.subres.forEach(function(Ae){ye[Ae]=""}):ye=J.subres,E(xe,ye)}return B.query=xe,a.format(B)},X._getUserAgent=function(){var J=C&&C.browser?"js":"nodejs",B="aliyun-sdk-"+J+"/"+I.version,Q=O.description;return!Q&&C&&(Q="Node.js "+C.version.slice(1)+" on "+C.platform+" "+C.arch),this._checkUserAgent(B+" "+Q)},X._checkUserAgent=function(J){return J.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta")},X.checkBrowserAndVersion=function(J,B){return K.name===J&&K.version.split(".")[0]===B},X.parseXML=function(J){return function(B){T.isBuffer(J)&&(J=J.toString()),b.parseString(J,{explicitRoot:!1,explicitArray:!1},B)}},X.requestError=f.default.mark(function J(B){var Q,ie,oe,xe;return f.default.wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:if(Q=null,B.data&&B.data.length){ye.next=5;break}B.status===-1||B.status===-2?(Q=new Error(B.message),Q.name=B.name,Q.status=B.status,Q.code=B.name):(B.status===404?(Q=new Error("Object not exists"),Q.name="NoSuchKeyError",Q.status=404,Q.code="NoSuchKey"):B.status===412?(Q=new Error("Pre condition failed"),Q.name="PreconditionFailedError",Q.status=412,Q.code="PreconditionFailed"):(Q=new Error("Unknow error, status: "+B.status),Q.name="UnknowError",Q.status=B.status),Q.requestId=B.headers["x-oss-request-id"],Q.host=""),ye.next=30;break;case 5:return ie=String(B.data),t("request response error data: %s",ie),oe=void 0,ye.prev=8,ye.next=11,this.parseXML(ie)||{};case 11:oe=ye.sent,ye.next=21;break;case 14:return ye.prev=14,ye.t0=ye.catch(8),t(ie),ye.t0.message+=` raw xml: `+ie,ye.t0.status=B.status,ye.t0.requestId=B.headers["x-oss-request-id"],ye.abrupt("return",ye.t0);case 21:xe=oe.Message||"unknow request error, status: "+B.status,oe.Condition&&(xe+=" (condition: "+oe.Condition+")"),Q=new Error(xe),Q.name=oe.Code?oe.Code+"Error":"UnknowError",Q.status=B.status,Q.code=oe.Code,Q.requestId=oe.RequestId,Q.hostId=oe.HostId,Q.serverTime=oe.ServerTime;case 30:return t("generate error %j",Q),ye.abrupt("return",Q);case 32:case"end":return ye.stop()}},J,this,[[8,14]])})}).call(this,w("_process"),w("buffer").Buffer)},{"../common/multipart":8,"../common/signUtils":9,"../common/thunkpool.js":10,"../common/utils":11,"./../../shims/crypto/crypto.js":237,"./managed_upload":3,"./object":4,"./version":5,"./wrapper":6,_process:173,agentkeepalive:12,"babel-runtime/core-js/object/keys":23,"babel-runtime/regenerator":33,bowser:35,buffer:38,"copy-to":43,dateformat:154,debug:155,"humanize-ms":160,"is-type-of":165,"merge-descriptors":168,mime:242,path:170,platform:171,url:203,urllib:244,utility:243,xml2js:213}],3:[function(w,P,S){(function(C){"use strict";function T(g){return g&&g.__esModule?g:{default:g}}function l(g,_){if(!(this instanceof l))return new l(g,_);y.call(this,_),this.file=g,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}var p=w("babel-runtime/core-js/array/from"),h=T(p),d=w("babel-runtime/regenerator"),o=T(d),c=w("is-type-of"),s=w("util"),f=w("path"),i=w("mime"),n=w("copy-to"),t=S;t.multipartUpload=o.default.mark(function g(_,b,v){var m,E,a,x,O,A,D,I,F;return o.default.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:if(this.resetCancelFlag(),v=v||{},!v.checkpoint||!v.checkpoint.uploadId){K.next=6;break}return K.next=5,this._resumeMultipart(v.checkpoint,v);case 5:return K.abrupt("return",K.sent);case 6:return m=102400,v.mime||(c.file(b)?v.mime=i.getType(f.extname(b.name)):c.blob(b)?v.mime=b.type:v.mime=i.getType(f.extname(b))),v.headers=v.headers||{},this._convertMetaToHeaders(v.meta,v.headers),K.next=12,this._getFileSize(b);case 12:if(!((E=K.sent)0&&n(x).to(A),D=this._divideParts(m,E),I=D.length,F=!1,K=o.default.mark(function Ae(pe,Oe){var Fe,Me,Ce;return o.default.wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:if(pe.isCancel()){Le.next=21;break}return Le.prev=1,Fe=D[Oe-1],Me={stream:pe._createStream(v,Fe.start,Fe.end),size:Fe.end-Fe.start},Le.next=6,pe._uploadPart(O,a,Oe,Me);case 6:if(Ce=Le.sent,pe.isCancel()||F){Le.next=13;break}if(_.doneParts.push({number:Oe,etag:Ce.res.headers.etag}),A.push({number:Oe,etag:Ce.res.headers.etag}),!b||!b.progress){Le.next=13;break}return Le.next=13,b.progress(x.length/I,_,Ce.res);case 13:Le.next=21;break;case 15:if(Le.prev=15,Le.t0=Le.catch(1),pe.isCancel()){Le.next=21;break}throw pe.cancel(),Le.t0.partNum=Oe,Le.t0;case 21:case"end":return Le.stop()}},Ae,this,[[1,15]])}),ne=(0,h.default)(new Array(I),function(Ae,pe){return pe+1}),j=A.map(function(Ae){return Ae.number}),G=ne.filter(function(Ae){return j.indexOf(Ae)<0}),X=5,J=b.parallel||X,!this.checkBrowserAndVersion("Internet Explorer","10")&&J!==1){ye.next=26;break}B=0;case 16:if(!(B0)){ye.next=37;break}throw this.resetCancelFlag(),xe=oe[0],xe.message="Failed to upload some parts with error: "+xe.toString()+" part_num: "+xe.partNum,xe;case 37:if(!this.isCancel()){ye.next=40;break}throw Q=null,this._makeCancelEvent();case 40:return ye.next=42,this.completeMultipartUpload(O,a,A,b);case 42:return ye.abrupt("return",ye.sent);case 43:case"end":return ye.stop()}},g,this)}),c.file=function(g){return typeof File!="undefined"&&g instanceof File},c.blob=function(g){return typeof Blob!="undefined"&&g instanceof Blob},t._getFileSize=o.default.mark(function g(_){var b;return o.default.wrap(function(v){for(;;)switch(v.prev=v.next){case 0:if(!c.buffer(_)){v.next=4;break}return v.abrupt("return",_.length);case 4:if(!c.blob(_)&&!c.file(_)){v.next=6;break}return v.abrupt("return",_.size);case 6:if(!c.string(_)){v.next=11;break}return v.next=9,this._statFile(_);case 9:return b=v.sent,v.abrupt("return",b.size);case 11:throw new Error("_getFileSize requires Buffer/File/String.");case 12:case"end":return v.stop()}},g,this)});var u=w("stream"),y=u.Readable;s.inherits(l,y),l.prototype.readFileAndPush=function(g){if(this.fileBuffer)for(var _=!0;_&&this.fileBuffer&&this.startthis.fileBuffer.length?this.fileBuffer.length:v,this.start=v,_=this.push(this.fileBuffer.slice(b,v))}},l.prototype._read=function(g){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);g=g||16384;var _=this;this.reader.onload=function(b){_.fileBuffer=new C(new Uint8Array(b.target.result)),_.file=null,_.readFileAndPush(g)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(g)},t._createStream=function(g,_,b){if(c.blob(g)||c.file(g))return new l(g.slice(_,b));throw new Error("_createStream requires File/String.")},t._getPartSize=function(g,_){return _?Math.max(Math.ceil(g/1e4),_):1048576},t._divideParts=function(g,_){for(var b=Math.ceil(g/_),v=[],m=0;m `,v.quiet?m+=` true `:m+=` false `,E=0;E"+o.escape(this._objectName(b[E]))+` `;return m+="",d("delete multi objects: %s",m),v.subres="delete",a=this._objectRequestParams("POST","",v),a.mime="xml",a.content=m,a.xmlResponse=!0,a.successStatuses=[200],D.next=14,this.request(a);case 14:return x=D.sent,O=x.data,A=O&&O.Deleted||null,A&&(Array.isArray(A)||(A=[A]),A=A.map(function(I){return I.Key})),D.abrupt("return",{res:x.res,deleted:A});case 19:case"end":return D.stop()}},_,this)}),g.copy=h.default.mark(function _(b,v,m){var E,a,x;return h.default.wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return m=m||{},m.headers=m.headers||{},(0,l.default)(m.headers).forEach(function(A){m.headers["x-oss-copy-source-"+A.toLowerCase()]=m.headers[A]}),m.meta&&(m.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(m.meta,m.headers),v=v[0]!=="/"?"/"+this.options.bucket+"/"+encodeURIComponent(v):"/"+encodeURIComponent(v.slice(1)),m.headers["x-oss-copy-source"]=v,E=this._objectRequestParams("PUT",b,m),E.xmlResponse=!0,E.successStatuses=[200,304],O.next=12,this.request(E);case 12:return a=O.sent,x=a.data,x&&(x={etag:x.ETag,lastModified:x.LastModified}),O.abrupt("return",{data:x,res:a.res});case 16:case"end":return O.stop()}},_,this)}),g.putMeta=h.default.mark(function _(b,v,m){return h.default.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return E.next=2,this.copy(b,b,{meta:v||{},timeout:m&&m.timeout,ctx:m&&m.ctx});case 2:return E.abrupt("return",E.sent);case 3:case"end":return E.stop()}},_,this)}),g.list=h.default.mark(function _(b,v){var m,E,a,x,O;return h.default.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return m=this._objectRequestParams("GET","",v),m.query=b,m.xmlResponse=!0,m.successStatuses=[200],A.next=6,this.request(m);case 6:return E=A.sent,a=E.data.Contents,x=this,a&&(Array.isArray(a)||(a=[a]),a=a.map(function(D){return{name:D.Key,url:x._objectUrl(D.Key),lastModified:D.LastModified,etag:D.ETag,type:D.Type,size:Number(D.Size),storageClass:D.StorageClass,owner:{id:D.Owner.ID,displayName:D.Owner.DisplayName}}})),O=E.data.CommonPrefixes||null,O&&(Array.isArray(O)||(O=[O]),O=O.map(function(D){return D.Prefix})),A.abrupt("return",{res:E.res,objects:a,prefixes:O,nextMarker:E.data.NextMarker||null,isTruncated:E.data.IsTruncated==="true"});case 13:case"end":return A.stop()}},_,this)}),g.putACL=h.default.mark(function _(b,v,m){var E,a;return h.default.wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return m=m||{},m.subres="acl",m.headers=m.headers||{},m.headers["x-oss-object-acl"]=v,b=this._objectName(b),E=this._objectRequestParams("PUT",b,m),E.successStatuses=[200],x.next=9,this.request(E);case 9:return a=x.sent,x.abrupt("return",{res:a.res});case 11:case"end":return x.stop()}},_,this)}),g.getACL=h.default.mark(function _(b,v){var m,E;return h.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return v=v||{},v.subres="acl",b=this._objectName(b),m=this._objectRequestParams("GET",b,v),m.successStatuses=[200],m.xmlResponse=!0,a.next=8,this.request(m);case 8:return E=a.sent,a.abrupt("return",{acl:E.data.AccessControlList.Grant,owner:{id:E.data.Owner.ID,displayName:E.data.Owner.DisplayName},res:E.res});case 10:case"end":return a.stop()}},_,this)}),g.restore=h.default.mark(function _(b,v){var m,E;return h.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return v=v||{},v.subres="restore",m=this._objectRequestParams("POST",b,v),m.successStatuses=[202],a.next=6,this.request(m);case 6:return E=a.sent,a.abrupt("return",{res:E.res});case 8:case"end":return a.stop()}},_,this)}),g.signatureUrl=function(_,b){b=b||{},_=this._objectName(_),b.method=b.method||"GET";var v=o.timestamp()+(b.expires||1800),m={bucket:this.options.bucket,object:_},E=this._getResource(m);this.options.stsToken&&(b["security-token"]=this.options.stsToken);var a=y._signatureForURL(this.options.accessKeySecret,b,E,v),x=f.parse(this._getReqUrl(m));return x.query={OSSAccessKeyId:this.options.accessKeyId,Expires:v,Signature:a.Signature},i(a.subResource).to(x.query),x.format()},g.getObjectUrl=function(_,b){return b?b[b.length-1]!=="/"&&(b+="/"):b=this.options.endpoint.format(),b+this._escape(this._objectName(_))},g._objectUrl=function(_){return this._getReqUrl({bucket:this.options.bucket,object:_})},g.generateObjectUrl=function(_,b){if(b)b[b.length-1]!=="/"&&(b+="/");else{b=this.options.endpoint.format();var v=f.parse(b),m=this.options.bucket;v.hostname=m+"."+v.hostname,v.host=m+"."+v.host,b=v.format()}return b+this._escape(this._objectName(_))},g._objectRequestParams=function(_,b,v){if(!this.options.bucket)throw new Error("Please create a bucket first");v=v||{},b=this._objectName(b);var m={object:b,bucket:this.options.bucket,method:_,subres:v&&v.subres,timeout:v&&v.timeout,ctx:v&&v.ctx};return v.headers&&(m.headers={},i(v.headers).to(m.headers)),m},g._objectName=function(_){return _.replace(/^\/+/,"")},g._statFile=function(_){return function(b){c.stat(_,b)}},g._convertMetaToHeaders=function(_,b){_&&(0,l.default)(_).forEach(function(v){b["x-oss-meta-"+v]=_[v]})},g._deleteFileSafe=function(_){return function(b){c.exists(_,function(v){v?c.unlink(_,function(m){m&&d("unlink %j error: %s",_,m),b()}):b()})}}},{"../common/callback":7,"../common/signUtils":9,"babel-runtime/core-js/object/keys":23,"babel-runtime/regenerator":33,"copy-to":43,debug:155,fs:36,"is-type-of":165,mime:242,path:170,url:203,utility:243}],5:[function(w,P,S){"use strict";S.version="5.3.1"},{}],6:[function(w,P,S){"use strict";function C(n){return n&&n.__esModule?n:{default:n}}function T(n){return n&&typeof n.next=="function"&&typeof n.throw=="function"}function l(n){if(!n)return!1;var t=n.constructor;return!!t&&(t.name==="GeneratorFunction"||t.displayName==="GeneratorFunction"||T(t.prototype)||T(n.prototype))}function p(n,t){var u=new n(t),y=(0,s.default)(u),g=(0,s.default)((0,o.default)(u));y.concat(g).forEach(function(_){l(u[_])?this[_]=f.wrap(u[_]).bind(u):this[_]=u[_]},this)}function h(n){if(!(this instanceof h))return new h(n);p.call(this,i,n)}var d=w("babel-runtime/core-js/object/get-prototype-of"),o=C(d),c=w("babel-runtime/core-js/object/keys"),s=C(c),f=w("co"),i=w("./client");P.exports=h,h.STS=function n(t){if(!(this instanceof n))return new n(t);p.call(this,i.STS,t)}},{"./client":2,"babel-runtime/core-js/object/get-prototype-of":22,"babel-runtime/core-js/object/keys":23,co:41}],7:[function(w,P,S){(function(C){"use strict";function T(o){return o&&o.__esModule?o:{default:o}}var l=w("babel-runtime/core-js/object/keys"),p=T(l),h=w("babel-runtime/core-js/json/stringify"),d=T(h);S.encodeCallback=function(o,c){if(o.headers=o.headers||{},!Object.prototype.hasOwnProperty.call(o.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 f=new C((0,d.default)(s)).toString("base64");if(o.headers["x-oss-callback"]=f,c.callback.customValue){var i={};(0,p.default)(c.callback.customValue).forEach(function(n){i["x:"+n]=c.callback.customValue[n]}),o.headers["x-oss-callback-var"]=new C((0,d.default)(i)).toString("base64")}}}}).call(this,w("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/keys":23,buffer:38}],8:[function(w,P,S){"use strict";var C=w("babel-runtime/regenerator"),T=function(d){return d&&d.__esModule?d:{default:d}}(C),l=w("copy-to"),p=w("./callback"),h=S;h.listUploads=T.default.mark(function d(o,c){var s,f,i,n;return T.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return c=c||{},s={},l(c).to(s),s.subres="uploads",f=this._objectRequestParams("GET","",s),f.query=o,f.xmlResponse=!0,f.successStatuses=[200],t.next=10,this.request(f);case 10:return i=t.sent,n=i.data.Upload||[],Array.isArray(n)||(n=[n]),n=n.map(function(u){return{name:u.Key,uploadId:u.UploadId,initiated:u.Initiated}}),t.abrupt("return",{res:i.res,uploads:n,bucket:i.data.Bucket,nextKeyMarker:i.data.NextKeyMarker,nextUploadIdMarker:i.data.NextUploadIdMarker,isTruncated:i.data.IsTruncated==="true"});case 15:case"end":return t.stop()}},d,this)}),h.listParts=T.default.mark(function d(o,c,s,f){var i,n,t;return T.default.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return f=f||{},i={},l(f).to(i),i.subres={uploadId:c},n=this._objectRequestParams("GET",o,i),n.query=s,n.xmlResponse=!0,n.successStatuses=[200],u.next=10,this.request(n);case 10:return t=u.sent,u.abrupt("return",{res:t.res,uploadId:t.data.UploadId,bucket:t.data.Bucket,name:t.data.Key,partNumberMarker:t.data.PartNumberMarker,nextPartNumberMarker:t.data.NextPartNumberMarker,maxParts:t.data.MaxParts,isTruncated:t.data.IsTruncated,parts:t.data.Part||[]});case 12:case"end":return u.stop()}},d,this)}),h.abortMultipartUpload=T.default.mark(function d(o,c,s){var f,i,n;return T.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.cancel(),s=s||{},f={},l(s).to(f),f.subres={uploadId:c},i=this._objectRequestParams("DELETE",o,f),i.successStatuses=[204],t.next=9,this.request(i);case 9:return n=t.sent,t.abrupt("return",{res:n.res});case 11:case"end":return t.stop()}},d,this)}),h.initMultipartUpload=T.default.mark(function d(o,c){var s,f,i;return T.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return c=c||{},s={},l(c).to(s),s.headers=s.headers||{},this._convertMetaToHeaders(c.meta,s.headers),s.subres="uploads",f=this._objectRequestParams("POST",o,s),f.mime=c.mime,f.xmlResponse=!0,f.successStatuses=[200],n.next=12,this.request(f);case 12:return i=n.sent,n.abrupt("return",{res:i.res,bucket:i.data.Bucket,name:i.data.Key,uploadId:i.data.UploadId});case 14:case"end":return n.stop()}},d,this)}),h.uploadPart=T.default.mark(function d(o,c,s,f,i,n,t){var u;return T.default.wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return u={stream:this._createStream(f,i,n),size:n-i},y.next=3,this._uploadPart(o,c,s,u,t);case 3:return y.abrupt("return",y.sent);case 4:case"end":return y.stop()}},d,this)}),h.completeMultipartUpload=T.default.mark(function d(o,c,s,f){var i,n,t,u,y,g,_,b;return T.default.wrap(function(v){for(;;)switch(v.prev=v.next){case 0:for(i=s.concat().sort(function(m,E){return m.number-E.number}).filter(function(m,E,a){return!E||m.number!==a[E-1].number}),n=` `,t=0;t `,n+=""+u.number+` `,n+=""+u.etag+` `,n+=` `;return n+="",f=f||{},y={},l(f).to(y),y.subres={uploadId:c},g=this._objectRequestParams("POST",o,y),p.encodeCallback(g,y),g.mime="xml",g.content=n,g.headers&&g.headers["x-oss-callback"]||(g.xmlResponse=!0),g.successStatuses=[200],v.next=16,this.request(g);case 16:return _=v.sent,b={res:_.res,bucket:g.bucket,name:o,etag:_.res.headers.etag},g.headers&&g.headers["x-oss-callback"]&&(b.data=JSON.parse(_.data.toString())),v.abrupt("return",b);case 20:case"end":return v.stop()}},d,this)}),h._uploadPart=T.default.mark(function d(o,c,s,f,i){var n,t,u;return T.default.wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return i=i||{},n={},l(i).to(n),n.headers={"Content-Length":f.size},n.subres={partNumber:s,uploadId:c},t=this._objectRequestParams("PUT",o,n),t.mime=n.mime,t.stream=f.stream,t.successStatuses=[200],y.next=11,this.request(t);case 11:return u=y.sent,f.stream=null,t.stream=null,y.abrupt("return",{name:o,etag:u.res.headers.etag,res:u.res});case 15:case"end":return y.stop()}},d,this)})},{"./callback":7,"babel-runtime/regenerator":33,"copy-to":43}],9:[function(w,P,S){(function(C){"use strict";function T(s){return s&&s.__esModule?s:{default:s}}var l=w("babel-runtime/core-js/json/stringify"),p=T(l),h=w("babel-runtime/core-js/object/keys"),d=T(h),o=w("./../../shims/crypto/crypto.js"),c=w("is-type-of");S.buildCanonicalizedResource=function(s,f){var i=""+s,n="?";if(c.string(f)&&f.trim()!=="")i+=n+f;else if(c.array(f))f.sort(),i+=n+f.join("&");else if(f){var t=function(y,g){return y[0]>g[0]?1:y[0]0)throw new Error("Invalid string. Length must be a multiple of 4");var g=u.indexOf("=");return g===-1&&(g=y),[g,g===y?0:4-g%4]}function T(u){var y=C(u),g=y[0],_=y[1];return 3*(g+_)/4-_}function l(u,y,g){return 3*(y+g)/4-g}function p(u){for(var y,g=C(u),_=g[0],b=g[1],v=new f(l(u,_,b)),m=0,E=b>0?_-4:_,a=0;a>16&255,v[m++]=y>>8&255,v[m++]=255&y;return b===2&&(y=s[u.charCodeAt(a)]<<2|s[u.charCodeAt(a+1)]>>4,v[m++]=255&y),b===1&&(y=s[u.charCodeAt(a)]<<10|s[u.charCodeAt(a+1)]<<4|s[u.charCodeAt(a+2)]>>2,v[m++]=y>>8&255,v[m++]=255&y),v}function h(u){return c[u>>18&63]+c[u>>12&63]+c[u>>6&63]+c[63&u]}function d(u,y,g){for(var _,b=[],v=y;vm?m:v+16383));return _===1?(y=u[g-1],b.push(c[y>>2]+c[y<<4&63]+"==")):_===2&&(y=(u[g-2]<<8)+u[g-1],b.push(c[y>>10]+c[y>>4&63]+c[y<<2&63]+"=")),b.join("")}S.byteLength=T,S.toByteArray=p,S.fromByteArray=o;for(var c=[],s=[],f=typeof Uint8Array!="undefined"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0,t=i.length;n1&&B[1]||""}function i(J){var B=s.match(J);return B&&B.length>1&&B[2]||""}var n,t=f(/(ipod|iphone|ipad)/i).toLowerCase(),u=/like android/i.test(s),y=!u&&/android/i.test(s),g=/nexus\s*[0-6]\s*/i.test(s),_=!g&&/nexus\s*[0-9]+/i.test(s),b=/CrOS/.test(s),v=/silk/i.test(s),m=/sailfish/i.test(s),E=/tizen/i.test(s),a=/(web|hpw)os/i.test(s),x=/windows phone/i.test(s),O=(/SamsungBrowser/i.test(s),!x&&/windows/i.test(s)),A=!t&&!v&&/macintosh/i.test(s),D=!y&&!m&&!E&&!a&&/linux/i.test(s),I=i(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),F=f(/version\/(\d+(\.\d+)?)/i),K=/tablet/i.test(s)&&!/tablet pc/i.test(s),ne=!K&&/[^-]mobi/i.test(s),j=/xbox/i.test(s);/opera/i.test(s)?n={name:"Opera",opera:o,version:F||f(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(s)?n={name:"Opera",opera:o,version:f(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||F}:/SamsungBrowser/i.test(s)?n={name:"Samsung Internet for Android",samsungBrowser:o,version:F||f(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/coast/i.test(s)?n={name:"Opera Coast",coast:o,version:F||f(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(s)?n={name:"Yandex Browser",yandexbrowser:o,version:F||f(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(s)?n={name:"UC Browser",ucbrowser:o,version:f(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(s)?n={name:"Maxthon",maxthon:o,version:f(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(s)?n={name:"Epiphany",epiphany:o,version:f(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(s)?n={name:"Puffin",puffin:o,version:f(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(s)?n={name:"Sleipnir",sleipnir:o,version:f(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(s)?n={name:"K-Meleon",kMeleon:o,version:f(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:x?(n={name:"Windows Phone",osname:"Windows Phone",windowsphone:o},I?(n.msedge=o,n.version=I):(n.msie=o,n.version=f(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(s)?n={name:"Internet Explorer",msie:o,version:f(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:b?n={name:"Chrome",osname:"Chrome OS",chromeos:o,chromeBook:o,chrome:o,version:f(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(s)?n={name:"Microsoft Edge",msedge:o,version:I}:/vivaldi/i.test(s)?n={name:"Vivaldi",vivaldi:o,version:f(/vivaldi\/(\d+(\.\d+)?)/i)||F}:m?n={name:"Sailfish",osname:"Sailfish OS",sailfish:o,version:f(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(s)?n={name:"SeaMonkey",seamonkey:o,version:f(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(s)?(n={name:"Firefox",firefox:o,version:f(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(s)&&(n.firefoxos=o,n.osname="Firefox OS")):v?n={name:"Amazon Silk",silk:o,version:f(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(s)?n={name:"PhantomJS",phantom:o,version:f(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(s)?n={name:"SlimerJS",slimer:o,version:f(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(s)||/rim\stablet/i.test(s)?n={name:"BlackBerry",osname:"BlackBerry OS",blackberry:o,version:F||f(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:a?(n={name:"WebOS",osname:"WebOS",webos:o,version:F||f(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(s)&&(n.touchpad=o)):/bada/i.test(s)?n={name:"Bada",osname:"Bada",bada:o,version:f(/dolfin\/(\d+(\.\d+)?)/i)}:E?n={name:"Tizen",osname:"Tizen",tizen:o,version:f(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||F}:/qupzilla/i.test(s)?n={name:"QupZilla",qupzilla:o,version:f(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||F}:/chromium/i.test(s)?n={name:"Chromium",chromium:o,version:f(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||F}:/chrome|crios|crmo/i.test(s)?n={name:"Chrome",chrome:o,version:f(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:y?n={name:"Android",version:F}:/safari|applewebkit/i.test(s)?(n={name:"Safari",safari:o},F&&(n.version=F)):t?(n={name:t=="iphone"?"iPhone":t=="ipad"?"iPad":"iPod"},F&&(n.version=F)):n=/googlebot/i.test(s)?{name:"Googlebot",googlebot:o,version:f(/googlebot\/(\d+(\.\d+))/i)||F}:{name:f(/^(.*)\/(.*) /),version:i(/^(.*)\/(.*) /)},!n.msedge&&/(apple)?webkit/i.test(s)?(/(apple)?webkit\/537\.36/i.test(s)?(n.name=n.name||"Blink",n.blink=o):(n.name=n.name||"Webkit",n.webkit=o),!n.version&&F&&(n.version=F)):!n.opera&&/gecko\//i.test(s)&&(n.name=n.name||"Gecko",n.gecko=o,n.version=n.version||f(/gecko\/(\d+(\.\d+)?)/i)),n.windowsphone||!y&&!n.silk?!n.windowsphone&&t?(n[t]=o,n.ios=o,n.osname="iOS"):A?(n.mac=o,n.osname="macOS"):j?(n.xbox=o,n.osname="Xbox"):O?(n.windows=o,n.osname="Windows"):D&&(n.linux=o,n.osname="Linux"):(n.android=o,n.osname="Android");var G="";n.windows?G=function(J){switch(J){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}}(f(/Windows ((NT|XP)( \d\d?.\d)?)/i)):n.windowsphone?G=f(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):n.mac?(G=f(/Mac OS X (\d+([_\.\s]\d+)*)/i),G=G.replace(/[_\s]/g,".")):t?(G=f(/os (\d+([_\s]\d+)*) like mac os x/i),G=G.replace(/[_\s]/g,".")):y?G=f(/android[ \/-](\d+(\.\d+)*)/i):n.webos?G=f(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):n.blackberry?G=f(/rim\stablet\sos\s(\d+(\.\d+)*)/i):n.bada?G=f(/bada\/(\d+(\.\d+)*)/i):n.tizen&&(G=f(/tizen[\/\s](\d+(\.\d+)*)/i)),G&&(n.osversion=G);var X=!n.windows&&G.split(".")[0];return K||_||t=="ipad"||y&&(X==3||X>=4&&!ne)||n.silk?n.tablet=o:(ne||t=="iphone"||t=="ipod"||y||g||n.blackberry||n.webos||n.bada)&&(n.mobile=o),n.msedge||n.msie&&n.version>=10||n.yandexbrowser&&n.version>=15||n.vivaldi&&n.version>=1||n.chrome&&n.version>=20||n.samsungBrowser&&n.version>=4||n.firefox&&n.version>=20||n.safari&&n.version>=6||n.opera&&n.version>=10||n.ios&&n.osversion&&n.osversion.split(".")[0]>=6||n.blackberry&&n.version>=10.1||n.chromium&&n.version>=20?n.a=o:n.msie&&n.version<10||n.chrome&&n.version<20||n.firefox&&n.version<20||n.safari&&n.version<6||n.opera&&n.version<10||n.ios&&n.osversion&&n.osversion.split(".")[0]<6||n.chromium&&n.version<20?n.c=o:n.x=o,n}function T(s){return s.split(".").length}function l(s,f){var i,n=[];if(Array.prototype.map)return Array.prototype.map.call(s,f);for(i=0;i=0;){if(i[0][f]>i[1][f])return 1;if(i[0][f]!==i[1][f])return-1;if(f===0)return 0}}function h(s,f,i){var n=c;typeof f=="string"&&(i=f,f=void 0),f===void 0&&(f=!1),i&&(n=C(i));var t=""+n.version;for(var u in s)if(s.hasOwnProperty(u)&&n[u]){if(typeof s[u]!="string")throw new Error("Browser version in the minVersion map should be a string: "+u+": "+String(s));return p([t,s[u]])<0}return f}function d(s,f,i){return!h(s,f,i)}var o=!0,c=C(typeof navigator!="undefined"&&navigator.userAgent||"");return c.test=function(s){for(var f=0;f=this.charLength-this.charReceived?this.charLength-this.charReceived:c.length;if(c.copy(this.charBuffer,this.charReceived,0,f),this.charReceived+=f,this.charReceived=55296&&n<=56319)){if(this.charReceived=this.charLength=0,c.length===0)return s;break}this.charLength+=this.surrogateSize,s=""}this.detectIncompleteChar(c);var i=c.length;this.charLength&&(c.copy(this.charBuffer,0,c.length-this.charReceived,i),i-=this.charReceived),s+=c.toString(this.encoding,0,i);var i=s.length-1,n=s.charCodeAt(i);if(n>=55296&&n<=56319){var t=this.surrogateSize;return this.charLength+=t,this.charReceived+=t,this.charBuffer.copy(this.charBuffer,t,0,t),c.copy(this.charBuffer,0,0,t),s.substring(0,i)}return s},o.prototype.detectIncompleteChar=function(c){for(var s=c.length>=3?3:c.length;s>0;s--){var f=c[c.length-s];if(s==1&&f>>5==6){this.charLength=2;break}if(s<=2&&f>>4==14){this.charLength=3;break}if(s<=3&&f>>3==30){this.charLength=4;break}}this.charReceived=s},o.prototype.end=function(c){var s="";if(c&&c.length&&(s=this.write(c)),this.charReceived){var f=this.charReceived,i=this.charBuffer,n=this.encoding;s+=i.slice(0,f).toString(n)}return s}},{buffer:38}],38:[function(w,P,S){(function(C){"use strict";function T(){return p.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(M,N){if(T()=T())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+T().toString(16)+" bytes");return 0|M}function u(M){return+M!=M&&(M=0),p.alloc(+M)}function y(M,N){if(p.isBuffer(M))return M.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(M)||M instanceof ArrayBuffer))return M.byteLength;typeof M!="string"&&(M=""+M);var $=M.length;if($===0)return 0;for(var V=!1;;)switch(N){case"ascii":case"latin1":case"binary":return $;case"utf8":case"utf-8":case void 0:return Oe(M).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*$;case"hex":return $>>>1;case"base64":return Ce(M).length;default:if(V)return Oe(M).length;N=(""+N).toLowerCase(),V=!0}}function g(M,N,$){var V=!1;if((N===void 0||N<0)&&(N=0),N>this.length)return"";if(($===void 0||$>this.length)&&($=this.length),$<=0)return"";if($>>>=0,N>>>=0,$<=N)return"";for(M||(M="utf8");;)switch(M){case"hex":return j(this,N,$);case"utf8":case"utf-8":return I(this,N,$);case"ascii":return K(this,N,$);case"latin1":case"binary":return ne(this,N,$);case"base64":return D(this,N,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,N,$);default:if(V)throw new TypeError("Unknown encoding: "+M);M=(M+"").toLowerCase(),V=!0}}function _(M,N,$){var V=M[N];M[N]=M[$],M[$]=V}function b(M,N,$,V,Y){if(M.length===0)return-1;if(typeof $=="string"?(V=$,$=0):$>2147483647?$=2147483647:$<-2147483648&&($=-2147483648),$=+$,isNaN($)&&($=Y?0:M.length-1),$<0&&($=M.length+$),$>=M.length){if(Y)return-1;$=M.length-1}else if($<0){if(!Y)return-1;$=0}if(typeof N=="string"&&(N=p.from(N,V)),p.isBuffer(N))return N.length===0?-1:v(M,N,$,V,Y);if(typeof N=="number")return N&=255,p.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?Y?Uint8Array.prototype.indexOf.call(M,N,$):Uint8Array.prototype.lastIndexOf.call(M,N,$):v(M,[N],$,V,Y);throw new TypeError("val must be string, number or Buffer")}function v(M,N,$,V,Y){function me(Ke,Ne){return Re===1?Ke[Ne]:Ke.readUInt16BE(Ne*Re)}var Re=1,rt=M.length,Pe=N.length;if(V!==void 0&&((V=String(V).toLowerCase())==="ucs2"||V==="ucs-2"||V==="utf16le"||V==="utf-16le")){if(M.length<2||N.length<2)return-1;Re=2,rt/=2,Pe/=2,$/=2}var Ie;if(Y){var Xe=-1;for(Ie=$;Iert&&($=rt-Pe),Ie=$;Ie>=0;Ie--){for(var tt=!0,Ve=0;VeY&&(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 Re=0;Re239?4:me>223?3:me>191?2:1;if(Y+rt<=$){var Pe,Ie,Xe,tt;switch(rt){case 1:me<128&&(Re=me);break;case 2:Pe=M[Y+1],(192&Pe)==128&&(tt=(31&me)<<6|63&Pe)>127&&(Re=tt);break;case 3:Pe=M[Y+1],Ie=M[Y+2],(192&Pe)==128&&(192&Ie)==128&&(tt=(15&me)<<12|(63&Pe)<<6|63&Ie)>2047&&(tt<55296||tt>57343)&&(Re=tt);break;case 4:Pe=M[Y+1],Ie=M[Y+2],Xe=M[Y+3],(192&Pe)==128&&(192&Ie)==128&&(192&Xe)==128&&(tt=(15&me)<<18|(63&Pe)<<12|(63&Ie)<<6|63&Xe)>65535&&tt<1114112&&(Re=tt)}}Re===null?(Re=65533,rt=1):Re>65535&&(Re-=65536,V.push(Re>>>10&1023|55296),Re=56320|1023&Re),V.push(Re),Y+=rt}return F(V)}function F(M){var N=M.length;if(N<=Ye)return String.fromCharCode.apply(String,M);for(var $="",V=0;VV)&&($=V);for(var Y="",me=N;me<$;++me)Y+=pe(M[me]);return Y}function G(M,N,$){for(var V=M.slice(N,$),Y="",me=0;me$)throw new RangeError("Trying to access beyond buffer length")}function J(M,N,$,V,Y,me){if(!p.isBuffer(M))throw new TypeError('"buffer" argument must be a Buffer instance');if(N>Y||NM.length)throw new RangeError("Index out of range")}function B(M,N,$,V){N<0&&(N=65535+N+1);for(var Y=0,me=Math.min(M.length-$,2);Y>>8*(V?Y:1-Y)}function Q(M,N,$,V){N<0&&(N=4294967295+N+1);for(var Y=0,me=Math.min(M.length-$,4);Y>>8*(V?Y:3-Y)&255}function ie(M,N,$,V,Y,me){if($+V>M.length)throw new RangeError("Index out of range");if($<0)throw new RangeError("Index out of range")}function oe(M,N,$,V,Y){return Y||ie(M,N,$,4,34028234663852886e22,-34028234663852886e22),ke.write(M,N,$,V,23,4),$+4}function xe(M,N,$,V,Y){return Y||ie(M,N,$,8,17976931348623157e292,-17976931348623157e292),ke.write(M,N,$,V,52,8),$+8}function ye(M){if(M=Ae(M).replace(ee,""),M.length<2)return"";for(;M.length%4!=0;)M+="=";return M}function Ae(M){return M.trim?M.trim():M.replace(/^\s+|\s+$/g,"")}function pe(M){return M<16?"0"+M.toString(16):M.toString(16)}function Oe(M,N){N=N||1/0;for(var $,V=M.length,Y=null,me=[],Re=0;Re55295&&$<57344){if(!Y){if($>56319){(N-=3)>-1&&me.push(239,191,189);continue}if(Re+1===V){(N-=3)>-1&&me.push(239,191,189);continue}Y=$;continue}if($<56320){(N-=3)>-1&&me.push(239,191,189),Y=$;continue}$=65536+(Y-55296<<10|$-56320)}else Y&&(N-=3)>-1&&me.push(239,191,189);if(Y=null,$<128){if((N-=1)<0)break;me.push($)}else if($<2048){if((N-=2)<0)break;me.push($>>6|192,63&$|128)}else if($<65536){if((N-=3)<0)break;me.push($>>12|224,$>>6&63|128,63&$|128)}else{if(!($<1114112))throw new Error("Invalid code point");if((N-=4)<0)break;me.push($>>18|240,$>>12&63|128,$>>6&63|128,63&$|128)}}return me}function Fe(M){for(var N=[],$=0;$>8,Y=$%256,me.push(Y),me.push(V);return me}function Ce(M){return ue.toByteArray(ye(M))}function Le(M,N,$,V){for(var Y=0;Y=N.length||Y>=M.length);++Y)N[Y+$]=M[Y];return Y}function de(M){return M!==M}var ue=w("base64-js"),ke=w("ieee754"),Ue=w("isarray");S.Buffer=p,S.SlowBuffer=u,S.INSPECT_MAX_BYTES=50,p.TYPED_ARRAY_SUPPORT=C.TYPED_ARRAY_SUPPORT!==void 0?C.TYPED_ARRAY_SUPPORT:function(){try{var M=new Uint8Array(1);return M.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},M.foo()===42&&typeof M.subarray=="function"&&M.subarray(1,1).byteLength===0}catch(N){return!1}}(),S.kMaxLength=T(),p.poolSize=8192,p._augment=function(M){return M.__proto__=p.prototype,M},p.from=function(M,N,$){return h(null,M,N,$)},p.TYPED_ARRAY_SUPPORT&&(p.prototype.__proto__=Uint8Array.prototype,p.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&p[Symbol.species]===p&&Object.defineProperty(p,Symbol.species,{value:null,configurable:!0})),p.alloc=function(M,N,$){return o(null,M,N,$)},p.allocUnsafe=function(M){return c(null,M)},p.allocUnsafeSlow=function(M){return c(null,M)},p.isBuffer=function(M){return!(M==null||!M._isBuffer)},p.compare=function(M,N){if(!p.isBuffer(M)||!p.isBuffer(N))throw new TypeError("Arguments must be Buffers");if(M===N)return 0;for(var $=M.length,V=N.length,Y=0,me=Math.min($,V);Y0&&(M=this.toString("hex",0,N).match(/.{2}/g).join(" "),this.length>N&&(M+=" ... ")),""},p.prototype.compare=function(M,N,$,V,Y){if(!p.isBuffer(M))throw new TypeError("Argument must be a Buffer");if(N===void 0&&(N=0),$===void 0&&($=M?M.length:0),V===void 0&&(V=0),Y===void 0&&(Y=this.length),N<0||$>M.length||V<0||Y>this.length)throw new RangeError("out of range index");if(V>=Y&&N>=$)return 0;if(V>=Y)return-1;if(N>=$)return 1;if(N>>>=0,$>>>=0,V>>>=0,Y>>>=0,this===M)return 0;for(var me=Y-V,Re=$-N,rt=Math.min(me,Re),Pe=this.slice(V,Y),Ie=M.slice(N,$),Xe=0;XeY)&&($=Y),M.length>0&&($<0||N<0)||N>this.length)throw new RangeError("Attempt to write outside buffer bounds");V||(V="utf8");for(var me=!1;;)switch(V){case"hex":return m(this,M,N,$);case"utf8":case"utf-8":return E(this,M,N,$);case"ascii":return a(this,M,N,$);case"latin1":case"binary":return x(this,M,N,$);case"base64":return O(this,M,N,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,M,N,$);default:if(me)throw new TypeError("Unknown encoding: "+V);V=(""+V).toLowerCase(),me=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Ye=4096;p.prototype.slice=function(M,N){var $=this.length;M=~~M,N=N===void 0?$:~~N,M<0?(M+=$)<0&&(M=0):M>$&&(M=$),N<0?(N+=$)<0&&(N=0):N>$&&(N=$),N0&&(Y*=256);)V+=this[M+--N]*Y;return V},p.prototype.readUInt8=function(M,N){return N||X(M,1,this.length),this[M]},p.prototype.readUInt16LE=function(M,N){return N||X(M,2,this.length),this[M]|this[M+1]<<8},p.prototype.readUInt16BE=function(M,N){return N||X(M,2,this.length),this[M]<<8|this[M+1]},p.prototype.readUInt32LE=function(M,N){return N||X(M,4,this.length),(this[M]|this[M+1]<<8|this[M+2]<<16)+16777216*this[M+3]},p.prototype.readUInt32BE=function(M,N){return N||X(M,4,this.length),16777216*this[M]+(this[M+1]<<16|this[M+2]<<8|this[M+3])},p.prototype.readIntLE=function(M,N,$){M|=0,N|=0,$||X(M,N,this.length);for(var V=this[M],Y=1,me=0;++me=Y&&(V-=Math.pow(2,8*N)),V},p.prototype.readIntBE=function(M,N,$){M|=0,N|=0,$||X(M,N,this.length);for(var V=N,Y=1,me=this[M+--V];V>0&&(Y*=256);)me+=this[M+--V]*Y;return Y*=128,me>=Y&&(me-=Math.pow(2,8*N)),me},p.prototype.readInt8=function(M,N){return N||X(M,1,this.length),128&this[M]?-1*(255-this[M]+1):this[M]},p.prototype.readInt16LE=function(M,N){N||X(M,2,this.length);var $=this[M]|this[M+1]<<8;return 32768&$?4294901760|$:$},p.prototype.readInt16BE=function(M,N){N||X(M,2,this.length);var $=this[M+1]|this[M]<<8;return 32768&$?4294901760|$:$},p.prototype.readInt32LE=function(M,N){return N||X(M,4,this.length),this[M]|this[M+1]<<8|this[M+2]<<16|this[M+3]<<24},p.prototype.readInt32BE=function(M,N){return N||X(M,4,this.length),this[M]<<24|this[M+1]<<16|this[M+2]<<8|this[M+3]},p.prototype.readFloatLE=function(M,N){return N||X(M,4,this.length),ke.read(this,M,!0,23,4)},p.prototype.readFloatBE=function(M,N){return N||X(M,4,this.length),ke.read(this,M,!1,23,4)},p.prototype.readDoubleLE=function(M,N){return N||X(M,8,this.length),ke.read(this,M,!0,52,8)},p.prototype.readDoubleBE=function(M,N){return N||X(M,8,this.length),ke.read(this,M,!1,52,8)},p.prototype.writeUIntLE=function(M,N,$,V){(M=+M,N|=0,$|=0,!V)&&J(this,M,N,$,Math.pow(2,8*$)-1,0);var Y=1,me=0;for(this[N]=255&M;++me<$&&(Y*=256);)this[N+me]=M/Y&255;return N+$},p.prototype.writeUIntBE=function(M,N,$,V){(M=+M,N|=0,$|=0,!V)&&J(this,M,N,$,Math.pow(2,8*$)-1,0);var Y=$-1,me=1;for(this[N+Y]=255&M;--Y>=0&&(me*=256);)this[N+Y]=M/me&255;return N+$},p.prototype.writeUInt8=function(M,N,$){return M=+M,N|=0,$||J(this,M,N,1,255,0),p.TYPED_ARRAY_SUPPORT||(M=Math.floor(M)),this[N]=255&M,N+1},p.prototype.writeUInt16LE=function(M,N,$){return M=+M,N|=0,$||J(this,M,N,2,65535,0),p.TYPED_ARRAY_SUPPORT?(this[N]=255&M,this[N+1]=M>>>8):B(this,M,N,!0),N+2},p.prototype.writeUInt16BE=function(M,N,$){return M=+M,N|=0,$||J(this,M,N,2,65535,0),p.TYPED_ARRAY_SUPPORT?(this[N]=M>>>8,this[N+1]=255&M):B(this,M,N,!1),N+2},p.prototype.writeUInt32LE=function(M,N,$){return M=+M,N|=0,$||J(this,M,N,4,4294967295,0),p.TYPED_ARRAY_SUPPORT?(this[N+3]=M>>>24,this[N+2]=M>>>16,this[N+1]=M>>>8,this[N]=255&M):Q(this,M,N,!0),N+4},p.prototype.writeUInt32BE=function(M,N,$){return M=+M,N|=0,$||J(this,M,N,4,4294967295,0),p.TYPED_ARRAY_SUPPORT?(this[N]=M>>>24,this[N+1]=M>>>16,this[N+2]=M>>>8,this[N+3]=255&M):Q(this,M,N,!1),N+4},p.prototype.writeIntLE=function(M,N,$,V){if(M=+M,N|=0,!V){var Y=Math.pow(2,8*$-1);J(this,M,N,$,Y-1,-Y)}var me=0,Re=1,rt=0;for(this[N]=255&M;++me<$&&(Re*=256);)M<0&&rt===0&&this[N+me-1]!==0&&(rt=1),this[N+me]=(M/Re>>0)-rt&255;return N+$},p.prototype.writeIntBE=function(M,N,$,V){if(M=+M,N|=0,!V){var Y=Math.pow(2,8*$-1);J(this,M,N,$,Y-1,-Y)}var me=$-1,Re=1,rt=0;for(this[N+me]=255&M;--me>=0&&(Re*=256);)M<0&&rt===0&&this[N+me+1]!==0&&(rt=1),this[N+me]=(M/Re>>0)-rt&255;return N+$},p.prototype.writeInt8=function(M,N,$){return M=+M,N|=0,$||J(this,M,N,1,127,-128),p.TYPED_ARRAY_SUPPORT||(M=Math.floor(M)),M<0&&(M=255+M+1),this[N]=255&M,N+1},p.prototype.writeInt16LE=function(M,N,$){return M=+M,N|=0,$||J(this,M,N,2,32767,-32768),p.TYPED_ARRAY_SUPPORT?(this[N]=255&M,this[N+1]=M>>>8):B(this,M,N,!0),N+2},p.prototype.writeInt16BE=function(M,N,$){return M=+M,N|=0,$||J(this,M,N,2,32767,-32768),p.TYPED_ARRAY_SUPPORT?(this[N]=M>>>8,this[N+1]=255&M):B(this,M,N,!1),N+2},p.prototype.writeInt32LE=function(M,N,$){return M=+M,N|=0,$||J(this,M,N,4,2147483647,-2147483648),p.TYPED_ARRAY_SUPPORT?(this[N]=255&M,this[N+1]=M>>>8,this[N+2]=M>>>16,this[N+3]=M>>>24):Q(this,M,N,!0),N+4},p.prototype.writeInt32BE=function(M,N,$){return M=+M,N|=0,$||J(this,M,N,4,2147483647,-2147483648),M<0&&(M=4294967295+M+1),p.TYPED_ARRAY_SUPPORT?(this[N]=M>>>24,this[N+1]=M>>>16,this[N+2]=M>>>8,this[N+3]=255&M):Q(this,M,N,!1),N+4},p.prototype.writeFloatLE=function(M,N,$){return oe(this,M,N,!0,$)},p.prototype.writeFloatBE=function(M,N,$){return oe(this,M,N,!1,$)},p.prototype.writeDoubleLE=function(M,N,$){return xe(this,M,N,!0,$)},p.prototype.writeDoubleBE=function(M,N,$){return xe(this,M,N,!1,$)},p.prototype.copy=function(M,N,$,V){if($||($=0),V||V===0||(V=this.length),N>=M.length&&(N=M.length),N||(N=0),V>0&&V<$&&(V=$),V===$)return 0;if(M.length===0||this.length===0)return 0;if(N<0)throw new RangeError("targetStart out of bounds");if($<0||$>=this.length)throw new RangeError("sourceStart out of bounds");if(V<0)throw new RangeError("sourceEnd out of bounds");V>this.length&&(V=this.length),M.length-N=0;--Y)M[Y+N]=this[Y+$];else if(me<1e3||!p.TYPED_ARRAY_SUPPORT)for(Y=0;Y>>=0,$=$===void 0?this.length:$>>>0,M||(M=0);var me;if(typeof M=="number")for(me=N;me<$;++me)this[me]=M;else{var Re=p.isBuffer(M)?M:Oe(new p(M,V).toString()),rt=Re.length;for(me=0;me<$-N;++me)this[me+N]=Re[me%rt]}return this};var ee=/[^+\/0-9A-Za-z-_]/g}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"base64-js":34,ieee754:161,isarray:166}],39:[function(w,P,S){P.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],40:[function(w,P,S){"use strict";var C=function(){this.buffer=[],this.fns=[]};C.prototype.push=function(l,p){if(this.fns.length)return this.fns.shift()(null,l);var h={data:l,priority:p},d=T(this.buffer,h,function(o){return o.priority});this.buffer.splice(d,0,h)},C.prototype.next=function(){var l=this;return function(p){if(l.buffer.length)return p(null,l.buffer.pop().data);l.fns.push(p)}};var T=function(l,p,h){p=h(p);for(var d=0,o=l?l.length:d;d>>1;h(l[c])2&&(g=f.call(arguments,1)),t(g)})})}function p(i){return Promise.all(i.map(T,this))}function h(i){for(var n=new i.constructor,t=Object.keys(i),u=[],y=0;yi;)if((c=s[i++])!=c)return!0}else for(;f>i;i++)if((p||i in s)&&s[i]===d)return p||i||0;return!p&&-1}}},{"./_to-absolute-index":121,"./_to-iobject":123,"./_to-length":124}],63:[function(w,P,S){var C=w("./_cof"),T=w("./_wks")("toStringTag"),l=C(function(){return arguments}())=="Arguments",p=function(h,d){try{return h[d]}catch(o){}};P.exports=function(h){var d,o,c;return h===void 0?"Undefined":h===null?"Null":typeof(o=p(d=Object(h),T))=="string"?o:l?C(d):(c=C(d))=="Object"&&typeof d.callee=="function"?"Arguments":c}},{"./_cof":64,"./_wks":131}],64:[function(w,P,S){var C={}.toString;P.exports=function(T){return C.call(T).slice(8,-1)}},{}],65:[function(w,P,S){var C=P.exports={version:"2.5.7"};typeof __e=="number"&&(__e=C)},{}],66:[function(w,P,S){"use strict";var C=w("./_object-dp"),T=w("./_property-desc");P.exports=function(l,p,h){p in l?C.f(l,p,T(0,h)):l[p]=h}},{"./_object-dp":98,"./_property-desc":111}],67:[function(w,P,S){var C=w("./_a-function");P.exports=function(T,l,p){if(C(T),l===void 0)return T;switch(p){case 1:return function(h){return T.call(l,h)};case 2:return function(h,d){return T.call(l,h,d)};case 3:return function(h,d,o){return T.call(l,h,d,o)}}return function(){return T.apply(l,arguments)}}},{"./_a-function":58}],68:[function(w,P,S){P.exports=function(C){if(C==null)throw TypeError("Can't call method on "+C);return C}},{}],69:[function(w,P,S){P.exports=!w("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":74}],70:[function(w,P,S){var C=w("./_is-object"),T=w("./_global").document,l=C(T)&&C(T.createElement);P.exports=function(p){return l?T.createElement(p):{}}},{"./_global":76,"./_is-object":85}],71:[function(w,P,S){P.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],72:[function(w,P,S){var C=w("./_object-keys"),T=w("./_object-gops"),l=w("./_object-pie");P.exports=function(p){var h=C(p),d=T.f;if(d)for(var o,c=d(p),s=l.f,f=0;c.length>f;)s.call(p,o=c[f++])&&h.push(o);return h}},{"./_object-gops":103,"./_object-keys":106,"./_object-pie":107}],73:[function(w,P,S){var C=w("./_global"),T=w("./_core"),l=w("./_ctx"),p=w("./_hide"),h=w("./_has"),d=function(o,c,s){var f,i,n,t=o&d.F,u=o&d.G,y=o&d.S,g=o&d.P,_=o&d.B,b=o&d.W,v=u?T:T[c]||(T[c]={}),m=v.prototype,E=u?C:y?C[c]:(C[c]||{}).prototype;u&&(s=c);for(f in s)(i=!t&&E&&E[f]!==void 0)&&h(v,f)||(n=i?E[f]:s[f],v[f]=u&&typeof E[f]!="function"?s[f]:_&&i?l(n,C):b&&E[f]==n?function(a){var x=function(O,A,D){if(this instanceof a){switch(arguments.length){case 0:return new a;case 1:return new a(O);case 2:return new a(O,A)}return new a(O,A,D)}return a.apply(this,arguments)};return x.prototype=a.prototype,x}(n):g&&typeof n=="function"?l(Function.call,n):n,g&&((v.virtual||(v.virtual={}))[f]=n,o&d.R&&m&&!m[f]&&p(m,f,n)))};d.F=1,d.G=2,d.S=4,d.P=8,d.B=16,d.W=32,d.U=64,d.R=128,P.exports=d},{"./_core":65,"./_ctx":67,"./_global":76,"./_has":77,"./_hide":78}],74:[function(w,P,S){P.exports=function(C){try{return!!C()}catch(T){return!0}}},{}],75:[function(w,P,S){var C=w("./_ctx"),T=w("./_iter-call"),l=w("./_is-array-iter"),p=w("./_an-object"),h=w("./_to-length"),d=w("./core.get-iterator-method"),o={},c={},S=P.exports=function(s,f,i,n,t){var u,y,g,_,b=t?function(){return s}:d(s),v=C(i,n,f?2:1),m=0;if(typeof b!="function")throw TypeError(s+" is not iterable!");if(l(b)){for(u=h(s.length);u>m;m++)if((_=f?v(p(y=s[m])[0],y[1]):v(s[m]))===o||_===c)return _}else for(g=b.call(s);!(y=g.next()).done;)if((_=T(g,v,y.value,f))===o||_===c)return _};S.BREAK=o,S.RETURN=c},{"./_an-object":61,"./_ctx":67,"./_is-array-iter":83,"./_iter-call":86,"./_to-length":124,"./core.get-iterator-method":132}],76:[function(w,P,S){var C=P.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=C)},{}],77:[function(w,P,S){var C={}.hasOwnProperty;P.exports=function(T,l){return C.call(T,l)}},{}],78:[function(w,P,S){var C=w("./_object-dp"),T=w("./_property-desc");P.exports=w("./_descriptors")?function(l,p,h){return C.f(l,p,T(1,h))}:function(l,p,h){return l[p]=h,l}},{"./_descriptors":69,"./_object-dp":98,"./_property-desc":111}],79:[function(w,P,S){var C=w("./_global").document;P.exports=C&&C.documentElement},{"./_global":76}],80:[function(w,P,S){P.exports=!w("./_descriptors")&&!w("./_fails")(function(){return Object.defineProperty(w("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":69,"./_dom-create":70,"./_fails":74}],81:[function(w,P,S){P.exports=function(C,T,l){var p=l===void 0;switch(T.length){case 0:return p?C():C.call(l);case 1:return p?C(T[0]):C.call(l,T[0]);case 2:return p?C(T[0],T[1]):C.call(l,T[0],T[1]);case 3:return p?C(T[0],T[1],T[2]):C.call(l,T[0],T[1],T[2]);case 4:return p?C(T[0],T[1],T[2],T[3]):C.call(l,T[0],T[1],T[2],T[3])}return C.apply(l,T)}},{}],82:[function(w,P,S){var C=w("./_cof");P.exports=Object("z").propertyIsEnumerable(0)?Object:function(T){return C(T)=="String"?T.split(""):Object(T)}},{"./_cof":64}],83:[function(w,P,S){var C=w("./_iterators"),T=w("./_wks")("iterator"),l=Array.prototype;P.exports=function(p){return p!==void 0&&(C.Array===p||l[T]===p)}},{"./_iterators":91,"./_wks":131}],84:[function(w,P,S){var C=w("./_cof");P.exports=Array.isArray||function(T){return C(T)=="Array"}},{"./_cof":64}],85:[function(w,P,S){P.exports=function(C){return typeof C=="object"?C!==null:typeof C=="function"}},{}],86:[function(w,P,S){var C=w("./_an-object");P.exports=function(T,l,p,h){try{return h?l(C(p)[0],p[1]):l(p)}catch(o){var d=T.return;throw d!==void 0&&C(d.call(T)),o}}},{"./_an-object":61}],87:[function(w,P,S){"use strict";var C=w("./_object-create"),T=w("./_property-desc"),l=w("./_set-to-string-tag"),p={};w("./_hide")(p,w("./_wks")("iterator"),function(){return this}),P.exports=function(h,d,o){h.prototype=C(p,{next:T(1,o)}),l(h,d+" Iterator")}},{"./_hide":78,"./_object-create":97,"./_property-desc":111,"./_set-to-string-tag":115,"./_wks":131}],88:[function(w,P,S){"use strict";var C=w("./_library"),T=w("./_export"),l=w("./_redefine"),p=w("./_hide"),h=w("./_iterators"),d=w("./_iter-create"),o=w("./_set-to-string-tag"),c=w("./_object-gpo"),s=w("./_wks")("iterator"),f=!([].keys&&"next"in[].keys()),i=function(){return this};P.exports=function(n,t,u,y,g,_,b){d(u,t,y);var v,m,E,a=function(j){if(!f&&j in D)return D[j];switch(j){case"keys":case"values":return function(){return new u(this,j)}}return function(){return new u(this,j)}},x=t+" Iterator",O=g=="values",A=!1,D=n.prototype,I=D[s]||D["@@iterator"]||g&&D[g],F=I||a(g),K=g?O?a("entries"):F:void 0,ne=t=="Array"&&D.entries||I;if(ne&&(E=c(ne.call(new n)))!==Object.prototype&&E.next&&(o(E,x,!0),C||typeof E[s]=="function"||p(E,s,i)),O&&I&&I.name!=="values"&&(A=!0,F=function(){return I.call(this)}),C&&!b||!f&&!A&&D[s]||p(D,s,F),h[t]=F,h[x]=i,g)if(v={values:O?F:a("values"),keys:_?F:a("keys"),entries:K},b)for(m in v)m in D||l(D,m,v[m]);else T(T.P+T.F*(f||A),t,v);return v}},{"./_export":73,"./_hide":78,"./_iter-create":87,"./_iterators":91,"./_library":92,"./_object-gpo":104,"./_redefine":113,"./_set-to-string-tag":115,"./_wks":131}],89:[function(w,P,S){var C=w("./_wks")("iterator"),T=!1;try{var l=[7][C]();l.return=function(){T=!0},Array.from(l,function(){throw 2})}catch(p){}P.exports=function(p,h){if(!h&&!T)return!1;var d=!1;try{var o=[7],c=o[C]();c.next=function(){return{done:d=!0}},o[C]=function(){return c},p(o)}catch(s){}return d}},{"./_wks":131}],90:[function(w,P,S){P.exports=function(C,T){return{value:T,done:!!C}}},{}],91:[function(w,P,S){P.exports={}},{}],92:[function(w,P,S){P.exports=!0},{}],93:[function(w,P,S){var C=w("./_uid")("meta"),T=w("./_is-object"),l=w("./_has"),p=w("./_object-dp").f,h=0,d=Object.isExtensible||function(){return!0},o=!w("./_fails")(function(){return d(Object.preventExtensions({}))}),c=function(t){p(t,C,{value:{i:"O"+ ++h,w:{}}})},s=function(t,u){if(!T(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!l(t,C)){if(!d(t))return"F";if(!u)return"E";c(t)}return t[C].i},f=function(t,u){if(!l(t,C)){if(!d(t))return!0;if(!u)return!1;c(t)}return t[C].w},i=function(t){return o&&n.NEED&&d(t)&&!l(t,C)&&c(t),t},n=P.exports={KEY:C,NEED:!1,fastKey:s,getWeak:f,onFreeze:i}},{"./_fails":74,"./_has":77,"./_is-object":85,"./_object-dp":98,"./_uid":127}],94:[function(w,P,S){var C=w("./_global"),T=w("./_task").set,l=C.MutationObserver||C.WebKitMutationObserver,p=C.process,h=C.Promise,d=w("./_cof")(p)=="process";P.exports=function(){var o,c,s,f=function(){var u,y;for(d&&(u=p.domain)&&u.exit();o;){y=o.fn,o=o.next;try{y()}catch(g){throw o?s():c=void 0,g}}c=void 0,u&&u.enter()};if(d)s=function(){p.nextTick(f)};else if(!l||C.navigator&&C.navigator.standalone)if(h&&h.resolve){var i=h.resolve(void 0);s=function(){i.then(f)}}else s=function(){T.call(C,f)};else{var n=!0,t=document.createTextNode("");new l(f).observe(t,{characterData:!0}),s=function(){t.data=n=!n}}return function(u){var y={fn:u,next:void 0};c&&(c.next=y),o||(o=y,s()),c=y}}},{"./_cof":64,"./_global":76,"./_task":120}],95:[function(w,P,S){"use strict";function C(l){var p,h;this.promise=new l(function(d,o){if(p!==void 0||h!==void 0)throw TypeError("Bad Promise constructor");p=d,h=o}),this.resolve=T(p),this.reject=T(h)}var T=w("./_a-function");P.exports.f=function(l){return new C(l)}},{"./_a-function":58}],96:[function(w,P,S){"use strict";var C=w("./_object-keys"),T=w("./_object-gops"),l=w("./_object-pie"),p=w("./_to-object"),h=w("./_iobject"),d=Object.assign;P.exports=!d||w("./_fails")(function(){var o={},c={},s=Symbol(),f="abcdefghijklmnopqrst";return o[s]=7,f.split("").forEach(function(i){c[i]=i}),d({},o)[s]!=7||Object.keys(d({},c)).join("")!=f})?function(o,c){for(var s=p(o),f=arguments.length,i=1,n=T.f,t=l.f;f>i;)for(var u,y=h(arguments[i++]),g=n?C(y).concat(n(y)):C(y),_=g.length,b=0;_>b;)t.call(y,u=g[b++])&&(s[u]=y[u]);return s}:d},{"./_fails":74,"./_iobject":82,"./_object-gops":103,"./_object-keys":106,"./_object-pie":107,"./_to-object":125}],97:[function(w,P,S){var C=w("./_an-object"),T=w("./_object-dps"),l=w("./_enum-bug-keys"),p=w("./_shared-key")("IE_PROTO"),h=function(){},d=function(){var o,c=w("./_dom-create")("iframe"),s=l.length;for(c.style.display="none",w("./_html").appendChild(c),c.src="javascript:",o=c.contentWindow.document,o.open(),o.write(""),o.close(),d=o.F;s--;)delete d.prototype[l[s]];return d()};P.exports=Object.create||function(o,c){var s;return o!==null?(h.prototype=C(o),s=new h,h.prototype=null,s[p]=o):s=d(),c===void 0?s:T(s,c)}},{"./_an-object":61,"./_dom-create":70,"./_enum-bug-keys":71,"./_html":79,"./_object-dps":99,"./_shared-key":116}],98:[function(w,P,S){var C=w("./_an-object"),T=w("./_ie8-dom-define"),l=w("./_to-primitive"),p=Object.defineProperty;S.f=w("./_descriptors")?Object.defineProperty:function(h,d,o){if(C(h),d=l(d,!0),C(o),T)try{return p(h,d,o)}catch(c){}if("get"in o||"set"in o)throw TypeError("Accessors not supported!");return"value"in o&&(h[d]=o.value),h}},{"./_an-object":61,"./_descriptors":69,"./_ie8-dom-define":80,"./_to-primitive":126}],99:[function(w,P,S){var C=w("./_object-dp"),T=w("./_an-object"),l=w("./_object-keys");P.exports=w("./_descriptors")?Object.defineProperties:function(p,h){T(p);for(var d,o=l(h),c=o.length,s=0;c>s;)C.f(p,d=o[s++],h[d]);return p}},{"./_an-object":61,"./_descriptors":69,"./_object-dp":98,"./_object-keys":106}],100:[function(w,P,S){var C=w("./_object-pie"),T=w("./_property-desc"),l=w("./_to-iobject"),p=w("./_to-primitive"),h=w("./_has"),d=w("./_ie8-dom-define"),o=Object.getOwnPropertyDescriptor;S.f=w("./_descriptors")?o:function(c,s){if(c=l(c),s=p(s,!0),d)try{return o(c,s)}catch(f){}if(h(c,s))return T(!C.f.call(c,s),c[s])}},{"./_descriptors":69,"./_has":77,"./_ie8-dom-define":80,"./_object-pie":107,"./_property-desc":111,"./_to-iobject":123,"./_to-primitive":126}],101:[function(w,P,S){var C=w("./_to-iobject"),T=w("./_object-gopn").f,l={}.toString,p=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],h=function(d){try{return T(d)}catch(o){return p.slice()}};P.exports.f=function(d){return p&&l.call(d)=="[object Window]"?h(d):T(C(d))}},{"./_object-gopn":102,"./_to-iobject":123}],102:[function(w,P,S){var C=w("./_object-keys-internal"),T=w("./_enum-bug-keys").concat("length","prototype");S.f=Object.getOwnPropertyNames||function(l){return C(l,T)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],103:[function(w,P,S){S.f=Object.getOwnPropertySymbols},{}],104:[function(w,P,S){var C=w("./_has"),T=w("./_to-object"),l=w("./_shared-key")("IE_PROTO"),p=Object.prototype;P.exports=Object.getPrototypeOf||function(h){return h=T(h),C(h,l)?h[l]:typeof h.constructor=="function"&&h instanceof h.constructor?h.constructor.prototype:h instanceof Object?p:null}},{"./_has":77,"./_shared-key":116,"./_to-object":125}],105:[function(w,P,S){var C=w("./_has"),T=w("./_to-iobject"),l=w("./_array-includes")(!1),p=w("./_shared-key")("IE_PROTO");P.exports=function(h,d){var o,c=T(h),s=0,f=[];for(o in c)o!=p&&C(c,o)&&f.push(o);for(;d.length>s;)C(c,o=d[s++])&&(~l(f,o)||f.push(o));return f}},{"./_array-includes":62,"./_has":77,"./_shared-key":116,"./_to-iobject":123}],106:[function(w,P,S){var C=w("./_object-keys-internal"),T=w("./_enum-bug-keys");P.exports=Object.keys||function(l){return C(l,T)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],107:[function(w,P,S){S.f={}.propertyIsEnumerable},{}],108:[function(w,P,S){var C=w("./_export"),T=w("./_core"),l=w("./_fails");P.exports=function(p,h){var d=(T.Object||{})[p]||Object[p],o={};o[p]=h(d),C(C.S+C.F*l(function(){d(1)}),"Object",o)}},{"./_core":65,"./_export":73,"./_fails":74}],109:[function(w,P,S){P.exports=function(C){try{return{e:!1,v:C()}}catch(T){return{e:!0,v:T}}}},{}],110:[function(w,P,S){var C=w("./_an-object"),T=w("./_is-object"),l=w("./_new-promise-capability");P.exports=function(p,h){if(C(p),T(h)&&h.constructor===p)return h;var d=l.f(p);return(0,d.resolve)(h),d.promise}},{"./_an-object":61,"./_is-object":85,"./_new-promise-capability":95}],111:[function(w,P,S){P.exports=function(C,T){return{enumerable:!(1&C),configurable:!(2&C),writable:!(4&C),value:T}}},{}],112:[function(w,P,S){var C=w("./_hide");P.exports=function(T,l,p){for(var h in l)p&&T[h]?T[h]=l[h]:C(T,h,l[h]);return T}},{"./_hide":78}],113:[function(w,P,S){P.exports=w("./_hide")},{"./_hide":78}],114:[function(w,P,S){"use strict";var C=w("./_global"),T=w("./_core"),l=w("./_object-dp"),p=w("./_descriptors"),h=w("./_wks")("species");P.exports=function(d){var o=typeof T[d]=="function"?T[d]:C[d];p&&o&&!o[h]&&l.f(o,h,{configurable:!0,get:function(){return this}})}},{"./_core":65,"./_descriptors":69,"./_global":76,"./_object-dp":98,"./_wks":131}],115:[function(w,P,S){var C=w("./_object-dp").f,T=w("./_has"),l=w("./_wks")("toStringTag");P.exports=function(p,h,d){p&&!T(p=d?p:p.prototype,l)&&C(p,l,{configurable:!0,value:h})}},{"./_has":77,"./_object-dp":98,"./_wks":131}],116:[function(w,P,S){var C=w("./_shared")("keys"),T=w("./_uid");P.exports=function(l){return C[l]||(C[l]=T(l))}},{"./_shared":117,"./_uid":127}],117:[function(w,P,S){var C=w("./_core"),T=w("./_global"),l=T["__core-js_shared__"]||(T["__core-js_shared__"]={});(P.exports=function(p,h){return l[p]||(l[p]=h!==void 0?h:{})})("versions",[]).push({version:C.version,mode:w("./_library")?"pure":"global",copyright:"\u6F0F 2018 Denis Pushkarev (zloirock.ru)"})},{"./_core":65,"./_global":76,"./_library":92}],118:[function(w,P,S){var C=w("./_an-object"),T=w("./_a-function"),l=w("./_wks")("species");P.exports=function(p,h){var d,o=C(p).constructor;return o===void 0||(d=C(o)[l])==null?h:T(d)}},{"./_a-function":58,"./_an-object":61,"./_wks":131}],119:[function(w,P,S){var C=w("./_to-integer"),T=w("./_defined");P.exports=function(l){return function(p,h){var d,o,c=String(T(p)),s=C(h),f=c.length;return s<0||s>=f?l?"":void 0:(d=c.charCodeAt(s),d<55296||d>56319||s+1===f||(o=c.charCodeAt(s+1))<56320||o>57343?l?c.charAt(s):d:l?c.slice(s,s+2):o-56320+(d-55296<<10)+65536)}}},{"./_defined":68,"./_to-integer":122}],120:[function(w,P,S){var C,T,l,p=w("./_ctx"),h=w("./_invoke"),d=w("./_html"),o=w("./_dom-create"),c=w("./_global"),s=c.process,f=c.setImmediate,i=c.clearImmediate,n=c.MessageChannel,t=c.Dispatch,u=0,y={},g=function(){var b=+this;if(y.hasOwnProperty(b)){var v=y[b];delete y[b],v()}},_=function(b){g.call(b.data)};f&&i||(f=function(b){for(var v=[],m=1;arguments.length>m;)v.push(arguments[m++]);return y[++u]=function(){h(typeof b=="function"?b:Function(b),v)},C(u),u},i=function(b){delete y[b]},w("./_cof")(s)=="process"?C=function(b){s.nextTick(p(g,b,1))}:t&&t.now?C=function(b){t.now(p(g,b,1))}:n?(T=new n,l=T.port2,T.port1.onmessage=_,C=p(l.postMessage,l,1)):c.addEventListener&&typeof postMessage=="function"&&!c.importScripts?(C=function(b){c.postMessage(b+"","*")},c.addEventListener("message",_,!1)):C="onreadystatechange"in o("script")?function(b){d.appendChild(o("script")).onreadystatechange=function(){d.removeChild(this),g.call(b)}}:function(b){setTimeout(p(g,b,1),0)}),P.exports={set:f,clear:i}},{"./_cof":64,"./_ctx":67,"./_dom-create":70,"./_global":76,"./_html":79,"./_invoke":81}],121:[function(w,P,S){var C=w("./_to-integer"),T=Math.max,l=Math.min;P.exports=function(p,h){return p=C(p),p<0?T(p+h,0):l(p,h)}},{"./_to-integer":122}],122:[function(w,P,S){var C=Math.ceil,T=Math.floor;P.exports=function(l){return isNaN(l=+l)?0:(l>0?T:C)(l)}},{}],123:[function(w,P,S){var C=w("./_iobject"),T=w("./_defined");P.exports=function(l){return C(T(l))}},{"./_defined":68,"./_iobject":82}],124:[function(w,P,S){var C=w("./_to-integer"),T=Math.min;P.exports=function(l){return l>0?T(C(l),9007199254740991):0}},{"./_to-integer":122}],125:[function(w,P,S){var C=w("./_defined");P.exports=function(T){return Object(C(T))}},{"./_defined":68}],126:[function(w,P,S){var C=w("./_is-object");P.exports=function(T,l){if(!C(T))return T;var p,h;if(l&&typeof(p=T.toString)=="function"&&!C(h=p.call(T)))return h;if(typeof(p=T.valueOf)=="function"&&!C(h=p.call(T)))return h;if(!l&&typeof(p=T.toString)=="function"&&!C(h=p.call(T)))return h;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":85}],127:[function(w,P,S){var C=0,T=Math.random();P.exports=function(l){return"Symbol(".concat(l===void 0?"":l,")_",(++C+T).toString(36))}},{}],128:[function(w,P,S){var C=w("./_global"),T=C.navigator;P.exports=T&&T.userAgent||""},{"./_global":76}],129:[function(w,P,S){var C=w("./_global"),T=w("./_core"),l=w("./_library"),p=w("./_wks-ext"),h=w("./_object-dp").f;P.exports=function(d){var o=T.Symbol||(T.Symbol=l?{}:C.Symbol||{});d.charAt(0)=="_"||d in o||h(o,d,{value:p.f(d)})}},{"./_core":65,"./_global":76,"./_library":92,"./_object-dp":98,"./_wks-ext":130}],130:[function(w,P,S){S.f=w("./_wks")},{"./_wks":131}],131:[function(w,P,S){var C=w("./_shared")("wks"),T=w("./_uid"),l=w("./_global").Symbol,p=typeof l=="function";(P.exports=function(h){return C[h]||(C[h]=p&&l[h]||(p?l:T)("Symbol."+h))}).store=C},{"./_global":76,"./_shared":117,"./_uid":127}],132:[function(w,P,S){var C=w("./_classof"),T=w("./_wks")("iterator"),l=w("./_iterators");P.exports=w("./_core").getIteratorMethod=function(p){if(p!=null)return p[T]||p["@@iterator"]||l[C(p)]}},{"./_classof":63,"./_core":65,"./_iterators":91,"./_wks":131}],133:[function(w,P,S){"use strict";var C=w("./_ctx"),T=w("./_export"),l=w("./_to-object"),p=w("./_iter-call"),h=w("./_is-array-iter"),d=w("./_to-length"),o=w("./_create-property"),c=w("./core.get-iterator-method");T(T.S+T.F*!w("./_iter-detect")(function(s){Array.from(s)}),"Array",{from:function(s){var f,i,n,t,u=l(s),y=typeof this=="function"?this:Array,g=arguments.length,_=g>1?arguments[1]:void 0,b=_!==void 0,v=0,m=c(u);if(b&&(_=C(_,g>2?arguments[2]:void 0,2)),m==null||y==Array&&h(m))for(f=d(u.length),i=new y(f);f>v;v++)o(i,v,b?_(u[v],v):u[v]);else for(t=m.call(u),i=new y;!(n=t.next()).done;v++)o(i,v,b?p(t,_,[n.value,v],!0):n.value);return i.length=v,i}})},{"./_create-property":66,"./_ctx":67,"./_export":73,"./_is-array-iter":83,"./_iter-call":86,"./_iter-detect":89,"./_to-length":124,"./_to-object":125,"./core.get-iterator-method":132}],134:[function(w,P,S){"use strict";var C=w("./_add-to-unscopables"),T=w("./_iter-step"),l=w("./_iterators"),p=w("./_to-iobject");P.exports=w("./_iter-define")(Array,"Array",function(h,d){this._t=p(h),this._i=0,this._k=d},function(){var h=this._t,d=this._k,o=this._i++;return!h||o>=h.length?(this._t=void 0,T(1)):d=="keys"?T(0,o):d=="values"?T(0,h[o]):T(0,[o,h[o]])},"values"),l.Arguments=l.Array,C("keys"),C("values"),C("entries")},{"./_add-to-unscopables":59,"./_iter-define":88,"./_iter-step":90,"./_iterators":91,"./_to-iobject":123}],135:[function(w,P,S){"use strict";var C=w("./_is-object"),T=w("./_object-gpo"),l=w("./_wks")("hasInstance"),p=Function.prototype;l in p||w("./_object-dp").f(p,l,{value:function(h){if(typeof this!="function"||!C(h))return!1;if(!C(this.prototype))return h instanceof this;for(;h=T(h);)if(this.prototype===h)return!0;return!1}})},{"./_is-object":85,"./_object-dp":98,"./_object-gpo":104,"./_wks":131}],136:[function(w,P,S){var C=w("./_export");C(C.S+C.F,"Object",{assign:w("./_object-assign")})},{"./_export":73,"./_object-assign":96}],137:[function(w,P,S){var C=w("./_export");C(C.S,"Object",{create:w("./_object-create")})},{"./_export":73,"./_object-create":97}],138:[function(w,P,S){var C=w("./_export");C(C.S+C.F*!w("./_descriptors"),"Object",{defineProperty:w("./_object-dp").f})},{"./_descriptors":69,"./_export":73,"./_object-dp":98}],139:[function(w,P,S){w("./_object-sap")("getOwnPropertyNames",function(){return w("./_object-gopn-ext").f})},{"./_object-gopn-ext":101,"./_object-sap":108}],140:[function(w,P,S){var C=w("./_to-object"),T=w("./_object-gpo");w("./_object-sap")("getPrototypeOf",function(){return function(l){return T(C(l))}})},{"./_object-gpo":104,"./_object-sap":108,"./_to-object":125}],141:[function(w,P,S){var C=w("./_to-object"),T=w("./_object-keys");w("./_object-sap")("keys",function(){return function(l){return T(C(l))}})},{"./_object-keys":106,"./_object-sap":108,"./_to-object":125}],142:[function(w,P,S){arguments[4][36][0].apply(S,arguments)},{dup:36}],143:[function(w,P,S){"use strict";var C,T,l,p,h=w("./_library"),d=w("./_global"),o=w("./_ctx"),c=w("./_classof"),s=w("./_export"),f=w("./_is-object"),i=w("./_a-function"),n=w("./_an-instance"),t=w("./_for-of"),u=w("./_species-constructor"),y=w("./_task").set,g=w("./_microtask")(),_=w("./_new-promise-capability"),b=w("./_perform"),v=w("./_user-agent"),m=w("./_promise-resolve"),E=d.TypeError,a=d.process,x=a&&a.versions,O=x&&x.v8||"",A=d.Promise,D=c(a)=="process",I=function(){},F=T=_.f,K=!!function(){try{var ie=A.resolve(1),oe=(ie.constructor={})[w("./_wks")("species")]=function(xe){xe(I,I)};return(D||typeof PromiseRejectionEvent=="function")&&ie.then(I)instanceof oe&&O.indexOf("6.6")!==0&&v.indexOf("Chrome/66")===-1}catch(xe){}}(),ne=function(ie){var oe;return!(!f(ie)||typeof(oe=ie.then)!="function")&&oe},j=function(ie,oe){if(!ie._n){ie._n=!0;var xe=ie._c;g(function(){for(var ye=ie._v,Ae=ie._s==1,pe=0;xe.length>pe;)!function(Oe){var Fe,Me,Ce,Le=Ae?Oe.ok:Oe.fail,de=Oe.resolve,ue=Oe.reject,ke=Oe.domain;try{Le?(Ae||(ie._h==2&&J(ie),ie._h=1),Le===!0?Fe=ye:(ke&&ke.enter(),Fe=Le(ye),ke&&(ke.exit(),Ce=!0)),Fe===Oe.promise?ue(E("Promise-chain cycle")):(Me=ne(Fe))?Me.call(Fe,de,ue):de(Fe)):ue(ye)}catch(Ue){ke&&!Ce&&ke.exit(),ue(Ue)}}(xe[pe++]);ie._c=[],ie._n=!1,oe&&!ie._h&&G(ie)})}},G=function(ie){y.call(d,function(){var oe,xe,ye,Ae=ie._v,pe=X(ie);if(pe&&(oe=b(function(){D?a.emit("unhandledRejection",Ae,ie):(xe=d.onunhandledrejection)?xe({promise:ie,reason:Ae}):(ye=d.console)&&ye.error&&ye.error("Unhandled promise rejection",Ae)}),ie._h=D||X(ie)?2:1),ie._a=void 0,pe&&oe.e)throw oe.v})},X=function(ie){return ie._h!==1&&(ie._a||ie._c).length===0},J=function(ie){y.call(d,function(){var oe;D?a.emit("rejectionHandled",ie):(oe=d.onrejectionhandled)&&oe({promise:ie,reason:ie._v})})},B=function(ie){var oe=this;oe._d||(oe._d=!0,oe=oe._w||oe,oe._v=ie,oe._s=2,oe._a||(oe._a=oe._c.slice()),j(oe,!0))},Q=function(ie){var oe,xe=this;if(!xe._d){xe._d=!0,xe=xe._w||xe;try{if(xe===ie)throw E("Promise can't be resolved itself");(oe=ne(ie))?g(function(){var ye={_w:xe,_d:!1};try{oe.call(ie,o(Q,ye,1),o(B,ye,1))}catch(Ae){B.call(ye,Ae)}}):(xe._v=ie,xe._s=1,j(xe,!1))}catch(ye){B.call({_w:xe,_d:!1},ye)}}};K||(A=function(ie){n(this,A,"Promise","_h"),i(ie),C.call(this);try{ie(o(Q,this,1),o(B,this,1))}catch(oe){B.call(this,oe)}},C=function(ie){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},C.prototype=w("./_redefine-all")(A.prototype,{then:function(ie,oe){var xe=F(u(this,A));return xe.ok=typeof ie!="function"||ie,xe.fail=typeof oe=="function"&&oe,xe.domain=D?a.domain:void 0,this._c.push(xe),this._a&&this._a.push(xe),this._s&&j(this,!1),xe.promise},catch:function(ie){return this.then(void 0,ie)}}),l=function(){var ie=new C;this.promise=ie,this.resolve=o(Q,ie,1),this.reject=o(B,ie,1)},_.f=F=function(ie){return ie===A||ie===p?new l(ie):T(ie)}),s(s.G+s.W+s.F*!K,{Promise:A}),w("./_set-to-string-tag")(A,"Promise"),w("./_set-species")("Promise"),p=w("./_core").Promise,s(s.S+s.F*!K,"Promise",{reject:function(ie){var oe=F(this);return(0,oe.reject)(ie),oe.promise}}),s(s.S+s.F*(h||!K),"Promise",{resolve:function(ie){return m(h&&this===p?A:this,ie)}}),s(s.S+s.F*!(K&&w("./_iter-detect")(function(ie){A.all(ie).catch(I)})),"Promise",{all:function(ie){var oe=this,xe=F(oe),ye=xe.resolve,Ae=xe.reject,pe=b(function(){var Oe=[],Fe=0,Me=1;t(ie,!1,function(Ce){var Le=Fe++,de=!1;Oe.push(void 0),Me++,oe.resolve(Ce).then(function(ue){de||(de=!0,Oe[Le]=ue,--Me||ye(Oe))},Ae)}),--Me||ye(Oe)});return pe.e&&Ae(pe.v),xe.promise},race:function(ie){var oe=this,xe=F(oe),ye=xe.reject,Ae=b(function(){t(ie,!1,function(pe){oe.resolve(pe).then(xe.resolve,ye)})});return Ae.e&&ye(Ae.v),xe.promise}})},{"./_a-function":58,"./_an-instance":60,"./_classof":63,"./_core":65,"./_ctx":67,"./_export":73,"./_for-of":75,"./_global":76,"./_is-object":85,"./_iter-detect":89,"./_library":92,"./_microtask":94,"./_new-promise-capability":95,"./_perform":109,"./_promise-resolve":110,"./_redefine-all":112,"./_set-species":114,"./_set-to-string-tag":115,"./_species-constructor":118,"./_task":120,"./_user-agent":128,"./_wks":131}],144:[function(w,P,S){var C=w("./_export"),T=w("./_to-absolute-index"),l=String.fromCharCode,p=String.fromCodePoint;C(C.S+C.F*(!!p&&p.length!=1),"String",{fromCodePoint:function(h){for(var d,o=[],c=arguments.length,s=0;c>s;){if(d=+arguments[s++],T(d,1114111)!==d)throw RangeError(d+" is not a valid code point");o.push(d<65536?l(d):l(55296+((d-=65536)>>10),d%1024+56320))}return o.join("")}})},{"./_export":73,"./_to-absolute-index":121}],145:[function(w,P,S){"use strict";var C=w("./_string-at")(!0);w("./_iter-define")(String,"String",function(T){this._t=String(T),this._i=0},function(){var T,l=this._t,p=this._i;return p>=l.length?{value:void 0,done:!0}:(T=C(l,p),this._i+=T.length,{value:T,done:!1})})},{"./_iter-define":88,"./_string-at":119}],146:[function(w,P,S){"use strict";var C=w("./_global"),T=w("./_has"),l=w("./_descriptors"),p=w("./_export"),h=w("./_redefine"),d=w("./_meta").KEY,o=w("./_fails"),c=w("./_shared"),s=w("./_set-to-string-tag"),f=w("./_uid"),i=w("./_wks"),n=w("./_wks-ext"),t=w("./_wks-define"),u=w("./_enum-keys"),y=w("./_is-array"),g=w("./_an-object"),_=w("./_is-object"),b=w("./_to-iobject"),v=w("./_to-primitive"),m=w("./_property-desc"),E=w("./_object-create"),a=w("./_object-gopn-ext"),x=w("./_object-gopd"),O=w("./_object-dp"),A=w("./_object-keys"),D=x.f,I=O.f,F=a.f,K=C.Symbol,ne=C.JSON,j=ne&&ne.stringify,G=i("_hidden"),X=i("toPrimitive"),J={}.propertyIsEnumerable,B=c("symbol-registry"),Q=c("symbols"),ie=c("op-symbols"),oe=Object.prototype,xe=typeof K=="function",ye=C.QObject,Ae=!ye||!ye.prototype||!ye.prototype.findChild,pe=l&&o(function(){return E(I({},"a",{get:function(){return I(this,"a",{value:7}).a}})).a!=7})?function($,V,Y){var me=D(oe,V);me&&delete oe[V],I($,V,Y),me&&$!==oe&&I(oe,V,me)}:I,Oe=function($){var V=Q[$]=E(K.prototype);return V._k=$,V},Fe=xe&&typeof K.iterator=="symbol"?function($){return typeof $=="symbol"}:function($){return $ instanceof K},Me=function($,V,Y){return $===oe&&Me(ie,V,Y),g($),V=v(V,!0),g(Y),T(Q,V)?(Y.enumerable?(T($,G)&&$[G][V]&&($[G][V]=!1),Y=E(Y,{enumerable:m(0,!1)})):(T($,G)||I($,G,m(1,{})),$[G][V]=!0),pe($,V,Y)):I($,V,Y)},Ce=function($,V){g($);for(var Y,me=u(V=b(V)),Re=0,rt=me.length;rt>Re;)Me($,Y=me[Re++],V[Y]);return $},Le=function($,V){return V===void 0?E($):Ce(E($),V)},de=function($){var V=J.call(this,$=v($,!0));return!(this===oe&&T(Q,$)&&!T(ie,$))&&(!(V||!T(this,$)||!T(Q,$)||T(this,G)&&this[G][$])||V)},ue=function($,V){if($=b($),V=v(V,!0),$!==oe||!T(Q,V)||T(ie,V)){var Y=D($,V);return!Y||!T(Q,V)||T($,G)&&$[G][V]||(Y.enumerable=!0),Y}},ke=function($){for(var V,Y=F(b($)),me=[],Re=0;Y.length>Re;)T(Q,V=Y[Re++])||V==G||V==d||me.push(V);return me},Ue=function($){for(var V,Y=$===oe,me=F(Y?ie:b($)),Re=[],rt=0;me.length>rt;)!T(Q,V=me[rt++])||Y&&!T(oe,V)||Re.push(Q[V]);return Re};xe||(K=function(){if(this instanceof K)throw TypeError("Symbol is not a constructor!");var $=f(arguments.length>0?arguments[0]:void 0),V=function(Y){this===oe&&V.call(ie,Y),T(this,G)&&T(this[G],$)&&(this[G][$]=!1),pe(this,$,m(1,Y))};return l&&Ae&&pe(oe,$,{configurable:!0,set:V}),Oe($)},h(K.prototype,"toString",function(){return this._k}),x.f=ue,O.f=Me,w("./_object-gopn").f=a.f=ke,w("./_object-pie").f=de,w("./_object-gops").f=Ue,l&&!w("./_library")&&h(oe,"propertyIsEnumerable",de,!0),n.f=function($){return Oe(i($))}),p(p.G+p.W+p.F*!xe,{Symbol:K});for(var Ye="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;Ye.length>ee;)i(Ye[ee++]);for(var M=A(i.store),N=0;M.length>N;)t(M[N++]);p(p.S+p.F*!xe,"Symbol",{for:function($){return T(B,$+="")?B[$]:B[$]=K($)},keyFor:function($){if(!Fe($))throw TypeError($+" is not a symbol!");for(var V in B)if(B[V]===$)return V},useSetter:function(){Ae=!0},useSimple:function(){Ae=!1}}),p(p.S+p.F*!xe,"Object",{create:Le,defineProperty:Me,defineProperties:Ce,getOwnPropertyDescriptor:ue,getOwnPropertyNames:ke,getOwnPropertySymbols:Ue}),ne&&p(p.S+p.F*(!xe||o(function(){var $=K();return j([$])!="[null]"||j({a:$})!="{}"||j(Object($))!="{}"})),"JSON",{stringify:function($){for(var V,Y,me=[$],Re=1;arguments.length>Re;)me.push(arguments[Re++]);if(Y=V=me[1],(_(V)||$!==void 0)&&!Fe($))return y(V)||(V=function(rt,Pe){if(typeof Y=="function"&&(Pe=Y.call(this,rt,Pe)),!Fe(Pe))return Pe}),me[1]=V,j.apply(ne,me)}}),K.prototype[X]||w("./_hide")(K.prototype,X,K.prototype.valueOf),s(K,"Symbol"),s(Math,"Math",!0),s(C.JSON,"JSON",!0)},{"./_an-object":61,"./_descriptors":69,"./_enum-keys":72,"./_export":73,"./_fails":74,"./_global":76,"./_has":77,"./_hide":78,"./_is-array":84,"./_is-object":85,"./_library":92,"./_meta":93,"./_object-create":97,"./_object-dp":98,"./_object-gopd":100,"./_object-gopn":102,"./_object-gopn-ext":101,"./_object-gops":103,"./_object-keys":106,"./_object-pie":107,"./_property-desc":111,"./_redefine":113,"./_set-to-string-tag":115,"./_shared":117,"./_to-iobject":123,"./_to-primitive":126,"./_uid":127,"./_wks":131,"./_wks-define":129,"./_wks-ext":130}],147:[function(w,P,S){"use strict";var C=w("./_export"),T=w("./_core"),l=w("./_global"),p=w("./_species-constructor"),h=w("./_promise-resolve");C(C.P+C.R,"Promise",{finally:function(d){var o=p(this,T.Promise||l.Promise),c=typeof d=="function";return this.then(c?function(s){return h(o,d()).then(function(){return s})}:d,c?function(s){return h(o,d()).then(function(){throw s})}:d)}})},{"./_core":65,"./_export":73,"./_global":76,"./_promise-resolve":110,"./_species-constructor":118}],148:[function(w,P,S){"use strict";var C=w("./_export"),T=w("./_new-promise-capability"),l=w("./_perform");C(C.S,"Promise",{try:function(p){var h=T.f(this),d=l(p);return(d.e?h.reject:h.resolve)(d.v),h.promise}})},{"./_export":73,"./_new-promise-capability":95,"./_perform":109}],149:[function(w,P,S){w("./_wks-define")("asyncIterator")},{"./_wks-define":129}],150:[function(w,P,S){w("./_wks-define")("observable")},{"./_wks-define":129}],151:[function(w,P,S){w("./es6.array.iterator");for(var C=w("./_global"),T=w("./_hide"),l=w("./_iterators"),p=w("./_wks")("toStringTag"),h="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(","),d=0;d0?"-":"+")+p(100*Math.floor(Math.abs(D)/60)+Math.abs(D)%60,4),S:["th","st","nd","rd"][b%10>3?0:(b%100-b%10!=10)*b%10],W:I,N:F};return t.replace(s,function(ne){return ne in K?K[ne]:ne.slice(1,ne.length-1)})}}();c.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},c.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]},typeof U=="function"&&U.amd?U(function(){return c}):(S===void 0?"undefined":(0,T.default)(S))==="object"?P.exports=c:l.dateFormat=c}(void 0)},{"babel-runtime/helpers/typeof":32}],155:[function(w,P,S){(function(C){function T(){return!(typeof window=="undefined"||!window.process||window.process.type!=="renderer")||typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function l(o){var c=this.useColors;if(o[0]=(c?"%c":"")+this.namespace+(c?" %c":" ")+o[0]+(c?"%c ":" ")+"+"+S.humanize(this.diff),c){var s="color: "+this.color;o.splice(1,0,s,"color: inherit");var f=0,i=0;o[0].replace(/%[a-zA-Z%]/g,function(n){n!=="%%"&&(f++,n==="%c"&&(i=f))}),o.splice(i,0,s)}}function p(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function h(o){try{o==null?S.storage.removeItem("debug"):S.storage.debug=o}catch(c){}}function d(){var o;try{o=S.storage.debug}catch(c){}return!o&&C!==void 0&&"env"in C&&(o=C.env.DEBUG),o}S=P.exports=w("./debug"),S.log=p,S.formatArgs=l,S.save=h,S.load=d,S.useColors=T,S.storage=typeof chrome!="undefined"&&chrome.storage!==void 0?chrome.storage.local:function(){try{return window.localStorage}catch(o){}}(),S.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],S.formatters.j=function(o){try{return JSON.stringify(o)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}},S.enable(d())}).call(this,w("_process"))},{"./debug":156,_process:173}],156:[function(w,P,S){function C(c){var s,f=0;for(s in c)f=(f<<5)-f+c.charCodeAt(s),f|=0;return S.colors[Math.abs(f)%S.colors.length]}function T(c){function s(){if(s.enabled){var f=s,i=+new Date,n=i-(o||i);f.diff=n,f.prev=o,f.curr=i,o=i;for(var t=new Array(arguments.length),u=0;u]/;P.exports=C},{}],158:[function(w,P,S){function C(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function T(d){return typeof d=="function"}function l(d){return typeof d=="number"}function p(d){return typeof d=="object"&&d!==null}function h(d){return d===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(d){if(!l(d)||d<0||isNaN(d))throw TypeError("n must be a positive number");return this._maxListeners=d,this},C.prototype.emit=function(d){var o,c,s,f,i,n;if(this._events||(this._events={}),d==="error"&&(!this._events.error||p(this._events.error)&&!this._events.error.length)){if((o=arguments[1])instanceof Error)throw o;var t=new Error('Uncaught, unspecified "error" event. ('+o+")");throw t.context=o,t}if(c=this._events[d],h(c))return!1;if(T(c))switch(arguments.length){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:f=Array.prototype.slice.call(arguments,1),c.apply(this,f)}else if(p(c))for(f=Array.prototype.slice.call(arguments,1),n=c.slice(),s=n.length,i=0;i0&&this._events[d].length>c&&(this._events[d].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[d].length),typeof console.trace=="function"&&console.trace()),this},C.prototype.on=C.prototype.addListener,C.prototype.once=function(d,o){function c(){this.removeListener(d,c),s||(s=!0,o.apply(this,arguments))}if(!T(o))throw TypeError("listener must be a function");var s=!1;return c.listener=o,this.on(d,c),this},C.prototype.removeListener=function(d,o){var c,s,f,i;if(!T(o))throw TypeError("listener must be a function");if(!this._events||!this._events[d])return this;if(c=this._events[d],f=c.length,s=-1,c===o||T(c.listener)&&c.listener===o)delete this._events[d],this._events.removeListener&&this.emit("removeListener",d,o);else if(p(c)){for(i=f;i-- >0;)if(c[i]===o||c[i].listener&&c[i].listener===o){s=i;break}if(s<0)return this;c.length===1?(c.length=0,delete this._events[d]):c.splice(s,1),this._events.removeListener&&this.emit("removeListener",d,o)}return this},C.prototype.removeAllListeners=function(d){var o,c;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[d]&&delete this._events[d],this;if(arguments.length===0){for(o in this._events)o!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events={},this}if(c=this._events[d],T(c))this.removeListener(d,c);else if(c)for(;c.length;)this.removeListener(d,c[c.length-1]);return delete this._events[d],this},C.prototype.listeners=function(d){return this._events&&this._events[d]?T(this._events[d])?[this._events[d]]:this._events[d].slice():[]},C.prototype.listenerCount=function(d){if(this._events){var o=this._events[d];if(T(o))return 1;if(o)return o.length}return 0},C.listenerCount=function(d,o){return d.listenerCount(o)}},{}],159:[function(w,P,S){var C=w("http"),T=P.exports;for(var l in C)C.hasOwnProperty(l)&&(T[l]=C[l]);T.request=function(p,h){return p||(p={}),p.scheme="https",p.protocol="https:",C.request.call(this,p,h)}},{http:196}],160:[function(w,P,S){"use strict";var C=w("util"),T=w("ms");P.exports=function(l){if(typeof l=="number")return l;var p=T(l);if(p===void 0){var h=new Error(C.format("humanize-ms(%j) result undefined",l));console.warn(h.stack)}return p}},{ms:169,util:207}],161:[function(w,P,S){S.read=function(C,T,l,p,h){var d,o,c=8*h-p-1,s=(1<>1,i=-7,n=l?h-1:0,t=l?-1:1,u=C[T+n];for(n+=t,d=u&(1<<-i)-1,u>>=-i,i+=c;i>0;d=256*d+C[T+n],n+=t,i-=8);for(o=d&(1<<-i)-1,d>>=-i,i+=p;i>0;o=256*o+C[T+n],n+=t,i-=8);if(d===0)d=1-f;else{if(d===s)return o?NaN:1/0*(u?-1:1);o+=Math.pow(2,p),d-=f}return(u?-1:1)*o*Math.pow(2,d-p)},S.write=function(C,T,l,p,h,d){var o,c,s,f=8*d-h-1,i=(1<>1,t=h===23?Math.pow(2,-24)-Math.pow(2,-77):0,u=p?0:d-1,y=p?1:-1,g=T<0||T===0&&1/T<0?1:0;for(T=Math.abs(T),isNaN(T)||T===1/0?(c=isNaN(T)?1:0,o=i):(o=Math.floor(Math.log(T)/Math.LN2),T*(s=Math.pow(2,-o))<1&&(o--,s*=2),T+=o+n>=1?t/s:t*Math.pow(2,1-n),T*s>=2&&(o++,s/=2),o+n>=i?(c=0,o=i):o+n>=1?(c=(T*s-1)*Math.pow(2,h),o+=n):(c=T*Math.pow(2,n-1)*Math.pow(2,h),o=0));h>=8;C[l+u]=255&c,u+=y,c/=256,h-=8);for(o=o<0;C[l+u]=255&o,u+=y,o/=256,f-=8);C[l+u-y]|=128*g}},{}],162:[function(w,P,S){typeof Object.create=="function"?P.exports=function(C,T){C.super_=T,C.prototype=Object.create(T.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}})}:P.exports=function(C,T){C.super_=T;var l=function(){};l.prototype=T.prototype,C.prototype=new l,C.prototype.constructor=C}},{}],163:[function(w,P,S){function C(l){return!!l.constructor&&typeof l.constructor.isBuffer=="function"&&l.constructor.isBuffer(l)}function T(l){return typeof l.readFloatLE=="function"&&typeof l.slice=="function"&&C(l.slice(0,0))}P.exports=function(l){return l!=null&&(C(l)||T(l)||!!l._isBuffer)}},{}],164:[function(w,P,S){!function(C){function T(h){return p.call(h).replace(/^[^{]*{\s*/,"").replace(/\s*}[^}]*$/,"")}function l(h){return typeof h=="function"&&(/^class(\s|\{\}$)/.test(p.call(h))||/^.*classCallCheck\(/.test(T(h)))}var p=Function.prototype.toString;S!==void 0?(P!==void 0&&P.exports&&(S=P.exports=l),S.isClass=l):typeof U=="function"&&U.amd?U([],function(){return l}):C.isClass=l}(this)},{}],165:[function(w,P,S){"use strict";function C(d){var o=d.slice(2);return o=o[0].toLowerCase()+o.slice(1)}var T=w("core-util-is"),l=w("isstream"),p=w("is-class");Object.keys(T).map(function(d){S[C(d)]=T[d]}),S.stream=l,S.readableStream=l.isReadable,S.writableStream=l.isWritable,S.duplexStream=l.isDuplex,S.class=p,S.finite=function(d){return Number.isFinite(d)},S.NaN=function(d){return Number.isNaN(d)},S.generator=function(d){return d&&typeof d.next=="function"&&typeof d.throw=="function"},S.generatorFunction=function(d){return d&&d.constructor&&d.constructor.name==="GeneratorFunction"},S.asyncFunction=function(d){return d&&d.constructor&&d.constructor.name==="AsyncFunction"},S.promise=function(d){return d&&typeof d.then=="function"};var h=Math.pow(2,31);S.int=function(d){return T.isNumber(d)&&d%1==0},S.int32=function(d){return S.int(d)&&d=-h},S.long=function(d){return S.int(d)&&(d>=h||d<-h)},S.Long=function(d){return S.object(d)&&S.number(d.high)&&S.number(d.low)},S.double=function(d){return T.isNumber(d)&&!isNaN(d)&&d%1!=0},S.date=function(d){return d instanceof Date},S.regExp=function(d){return d instanceof RegExp},S.regexp=S.regExp,S.error=function(d){return d instanceof Error},S.array=function(d){return Array.isArray(d)}},{"core-util-is":153,"is-class":164,isstream:167}],166:[function(w,P,S){var C={}.toString;P.exports=Array.isArray||function(T){return C.call(T)=="[object Array]"}},{}],167:[function(w,P,S){function C(d){return d instanceof h.Stream}function T(d){return C(d)&&typeof d._read=="function"&&typeof d._readableState=="object"}function l(d){return C(d)&&typeof d._write=="function"&&typeof d._writableState=="object"}function p(d){return T(d)&&l(d)}var h=w("stream");P.exports=C,P.exports.isReadable=T,P.exports.isWritable=l,P.exports.isDuplex=p},{stream:195}],168:[function(w,P,S){"use strict";function C(l,p,h){if(!l)throw new TypeError("argument dest is required");if(!p)throw new TypeError("argument src is required");return h===void 0&&(h=!0),Object.getOwnPropertyNames(p).forEach(function(d){if(h||!T.call(l,d)){var o=Object.getOwnPropertyDescriptor(p,d);Object.defineProperty(l,d,o)}}),l}P.exports=C;var T=Object.prototype.hasOwnProperty},{}],169:[function(w,P,S){function C(f){if(f=String(f),!(f.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(f);if(i){var n=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return n*s;case"days":case"day":case"d":return n*c;case"hours":case"hour":case"hrs":case"hr":case"h":return n*o;case"minutes":case"minute":case"mins":case"min":case"m":return n*d;case"seconds":case"second":case"secs":case"sec":case"s":return n*h;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function T(f){return f>=c?Math.round(f/c)+"d":f>=o?Math.round(f/o)+"h":f>=d?Math.round(f/d)+"m":f>=h?Math.round(f/h)+"s":f+"ms"}function l(f){return p(f,c,"day")||p(f,o,"hour")||p(f,d,"minute")||p(f,h,"second")||f+" ms"}function p(f,i,n){if(!(f0)return C(f);if(n==="number"&&isNaN(f)===!1)return i.long?l(f):T(f);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(f))}},{}],170:[function(w,P,S){(function(C){function T(d,o){for(var c=0,s=d.length-1;s>=0;s--){var f=d[s];f==="."?d.splice(s,1):f===".."?(d.splice(s,1),c++):c&&(d.splice(s,1),c--)}if(o)for(;c--;c)d.unshift("..");return d}function l(d){typeof d!="string"&&(d+="");var o,c=0,s=-1,f=!0;for(o=d.length-1;o>=0;--o)if(d.charCodeAt(o)===47){if(!f){c=o+1;break}}else s===-1&&(f=!1,s=o+1);return s===-1?"":d.slice(c,s)}function p(d,o){if(d.filter)return d.filter(o);for(var c=[],s=0;s=-1&&!o;c--){var s=c>=0?arguments[c]:C.cwd();if(typeof s!="string")throw new TypeError("Arguments to path.resolve must be strings");s&&(d=s+"/"+d,o=s.charAt(0)==="/")}return d=T(p(d.split("/"),function(f){return!!f}),!o).join("/"),(o?"/":"")+d||"."},S.normalize=function(d){var o=S.isAbsolute(d),c=h(d,-1)==="/";return d=T(p(d.split("/"),function(s){return!!s}),!o).join("/"),d||o||(d="."),d&&c&&(d+="/"),(o?"/":"")+d},S.isAbsolute=function(d){return d.charAt(0)==="/"},S.join=function(){var d=Array.prototype.slice.call(arguments,0);return S.normalize(p(d,function(o,c){if(typeof o!="string")throw new TypeError("Arguments to path.join must be strings");return o}).join("/"))},S.relative=function(d,o){function c(y){for(var g=0;g=0&&y[_]==="";_--);return g>_?[]:y.slice(g,_-g+1)}d=S.resolve(d).substr(1),o=S.resolve(o).substr(1);for(var s=c(d.split("/")),f=c(o.split("/")),i=Math.min(s.length,f.length),n=i,t=0;t=1;--i)if((o=d.charCodeAt(i))===47){if(!f){s=i;break}}else f=!1;return s===-1?c?"/":".":c&&s===1?"/":d.slice(0,s)},S.basename=function(d,o){var c=l(d);return o&&c.substr(-1*o.length)===o&&(c=c.substr(0,c.length-o.length)),c},S.extname=function(d){typeof d!="string"&&(d+="");for(var o=-1,c=0,s=-1,f=!0,i=0,n=d.length-1;n>=0;--n){var t=d.charCodeAt(n);if(t!==47)s===-1&&(f=!1,s=n+1),t===46?o===-1?o=n:i!==1&&(i=1):o!==-1&&(i=-1);else if(!f){c=n+1;break}}return o===-1||s===-1||i===0||i===1&&o===s-1&&o===c+1?"":d.slice(o,s)};var h="ab".substr(-1)==="b"?function(d,o,c){return d.substr(o,c)}:function(d,o,c){return o<0&&(o=d.length+o),d.substr(o,c)}}).call(this,w("_process"))},{_process:173}],171:[function(w,P,S){(function(C){(function(){"use strict";function T(O){return O=String(O),O.charAt(0).toUpperCase()+O.slice(1)}function l(O,A,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 A&&D&&/^Win/i.test(O)&&!/^Windows Phone /i.test(O)&&(I=I[/[\d.]+$/.exec(O)])&&(O="Windows "+I),O=String(O),A&&D&&(O=O.replace(RegExp(A,"i"),D)),O=h(O.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(O,A){var D=-1,I=O?O.length:0;if(typeof I=="number"&&I>-1&&I<=b)for(;++D3&&"WebKit"||/\bOpera\b/.test(Ue)&&(/\bOPR\b/.test(O)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(O)&&!/^(?:Trident|EdgeHTML)$/.test(ke)&&"WebKit"||!ke&&/\bMSIE\b/i.test(O)&&(M=="Mac OS"?"Tasman":"Trident")||ke=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(Ue)&&"NetFront")&&(ke=[j]),Ue=="IE"&&(j=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(O)||0)[1])?(Ue+=" Mobile",M="Windows Phone "+(/\+$/.test(j)?j:j+".x"),Ce.unshift("desktop mode")):/\bWPDesktop\b/i.test(O)?(Ue="IE Mobile",M="Windows Phone 8.x",Ce.unshift("desktop mode"),ue||(ue=(/\brv:([\d.]+)/.exec(O)||0)[1])):Ue!="IE"&&ke=="Trident"&&(j=/\brv:([\d.]+)/.exec(O))&&(Ue&&Ce.push("identifying as "+Ue+(ue?" "+ue:"")),Ue="IE",ue=j[1]),de){if(c(I,"global"))if(oe&&(j=oe.lang.System,Me=j.getProperty("os.arch"),M=M||j.getProperty("os.name")+" "+j.getProperty("os.version")),xe){try{ue=I.require("ringo/engine").version.join("."),Ue="RingoJS"}catch($){(j=I.system)&&j.global.system==I.system&&(Ue="Narwhal",M||(M=j[0].os||null))}Ue||(Ue="Rhino")}else typeof I.process=="object"&&!I.process.browser&&(j=I.process)&&(typeof j.versions=="object"&&(typeof j.versions.electron=="string"?(Ce.push("Node "+j.versions.node),Ue="Electron",ue=j.versions.electron):typeof j.versions.nw=="string"&&(Ce.push("Chromium "+ue,"Node "+j.versions.node),Ue="NW.js",ue=j.versions.nw)),Ue||(Ue="Node.js",Me=j.arch,M=j.platform,ue=/[\d.]+/.exec(j.version),ue=ue?ue[0]:null));else o(j=I.runtime)==J?(Ue="Adobe AIR",M=j.flash.system.Capabilities.os):o(j=I.phantom)==ie?(Ue="PhantomJS",ue=(j=j.version||null)&&j.major+"."+j.minor+"."+j.patch):typeof pe.documentMode=="number"&&(j=/\bTrident\/(\d+)/i.exec(O))?(ue=[ue,pe.documentMode],(j=+j[1]+4)!=ue[1]&&(Ce.push("IE "+ue[1]+" mode"),ke&&(ke[1]=""),ue[1]=j),ue=Ue=="IE"?String(ue[1].toFixed(1)):ue[0]):typeof pe.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(Ue)&&(Ce.push("masking as "+Ue+" "+ue),Ue="IE",ue="11.0",ke=["Trident"],M="Windows");M=M&&h(M)}if(ue&&(j=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(ue)||/(?:alpha|beta)(?: ?\d)?/i.exec(O+";"+(de&&K.appMinorVersion))||/\bMinefield\b/i.test(O)&&"a")&&(Le=/b/i.test(j)?"beta":"alpha",ue=ue.replace(RegExp(j+"\\+?$"),"")+(Le=="beta"?Ae:ye)+(/\d+\+?/.exec(j)||"")),Ue=="Fennec"||Ue=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(M))Ue="Firefox Mobile";else if(Ue=="Maxthon"&&ue)ue=ue.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Ye))Ye=="Xbox 360"&&(M=null),Ye=="Xbox 360"&&/\bIEMobile\b/.test(O)&&Ce.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(Ue)&&(!Ue||Ye||/Browser|Mobi/.test(Ue))||M!="Windows CE"&&!/Mobi/i.test(O))if(Ue=="IE"&&de)try{I.external===null&&Ce.unshift("platform preview")}catch($){Ce.unshift("embedded")}else(/\bBlackBerry\b/.test(Ye)||/\bBB10\b/.test(O))&&(j=(RegExp(Ye.replace(/ +/g," *")+"/([.\\d]+)","i").exec(O)||0)[1]||ue)?(j=[j,/BB10/.test(O)],M=(j[1]?(Ye=null,ee="BlackBerry"):"Device Software")+" "+j[0],ue=null):this!=d&&Ye!="Wii"&&(de&&Oe||/Opera/.test(Ue)&&/\b(?:MSIE|Firefox)\b/i.test(O)||Ue=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(M)||Ue=="IE"&&(M&&!/^Win/.test(M)&&ue>5.5||/\bWindows XP\b/.test(M)&&ue>8||ue==8&&!/\bTrident\b/.test(O)))&&!v.test(j=n.call(d,O.replace(v,"")+";"))&&j.name&&(j="ing as "+j.name+((j=j.version)?" "+j:""),v.test(Ue)?(/\bIE\b/.test(j)&&M=="Mac OS"&&(M=null),j="identify"+j):(j="mask"+j,Ue=Fe?h(Fe.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(j)&&(M=null),de||(ue=null)),ke=["Presto"],Ce.push(j));else Ue+=" Mobile";(j=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(O)||0)[1])&&(j=[parseFloat(j.replace(/\.(\d)$/,".0$1")),j],Ue=="Safari"&&j[1].slice(-1)=="+"?(Ue="WebKit Nightly",Le="alpha",ue=j[1].slice(0,-1)):ue!=j[1]&&ue!=(j[2]=(/\bSafari\/([\d.]+\+?)/i.exec(O)||0)[1])||(ue=null),j[1]=(/\bChrome\/([\d.]+)/i.exec(O)||0)[1],j[0]==537.36&&j[2]==537.36&&parseFloat(j[1])>=28&&ke=="WebKit"&&(ke=["Blink"]),de&&(X||j[1])?(ke&&(ke[1]="like Chrome"),j=j[1]||(j=j[0],j<530?1:j<532?2:j<532.05?3:j<533?4:j<534.03?5:j<534.07?6:j<534.1?7:j<534.13?8:j<534.16?9:j<534.24?10:j<534.3?11:j<535.01?12:j<535.02?"13+":j<535.07?15:j<535.11?16:j<535.19?17:j<536.05?18:j<536.1?19:j<537.01?20:j<537.11?"21+":j<537.13?23:j<537.18?24:j<537.24?25:j<537.36?26:ke!="Blink"?"27":"28")):(ke&&(ke[1]="like Safari"),j=j[0],j=j<400?1:j<500?2:j<526?3:j<533?4:j<534?"4+":j<535?5:j<537?6:j<538?7:j<601?8:"8"),ke&&(ke[1]+=" "+(j+=typeof j=="number"?".x":/[.+]/.test(j)?"":"+")),Ue=="Safari"&&(!ue||parseInt(ue)>45)&&(ue=j)),Ue=="Opera"&&(j=/\bzbov|zvav$/.exec(M))?(Ue+=" ",Ce.unshift("desktop mode"),j=="zvav"?(Ue+="Mini",ue=null):Ue+="Mobile",M=M.replace(RegExp(" *"+j+"$"),"")):Ue=="Safari"&&/\bChrome\b/.exec(ke&&ke[1])&&(Ce.unshift("desktop mode"),Ue="Chrome Mobile",ue=null,/\bOS X\b/.test(M)?(ee="Apple",M="iOS 4.3+"):M=null),ue&&ue.indexOf(j=/[\d.]+$/.exec(M))==0&&O.indexOf("/"+j+"-")>-1&&(M=i(M.replace(j,""))),ke&&!/\b(?:Avant|Nook)\b/.test(Ue)&&(/Browser|Lunascape|Maxthon/.test(Ue)||Ue!="Safari"&&/^iOS/.test(M)&&/\bSafari\b/.test(ke[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(Ue)&&ke[1])&&(j=ke[ke.length-1])&&Ce.push(j),Ce.length&&(Ce=["("+Ce.join("; ")+")"]),ee&&Ye&&Ye.indexOf(ee)<0&&Ce.push("on "+ee),Ye&&Ce.push((/^on /.test(Ce[Ce.length-1])?"":"on ")+Ye),M&&(j=/ ([\d.+]+)$/.exec(M),G=j&&M.charAt(M.length-j[0].length-1)=="/",M={architecture:32,family:j&&!G?M.replace(j[0],""):M,version:j?j[1]:null,toString:function(){var $=this.version;return this.family+($&&!G?" "+$:"")+(this.architecture==64?" 64-bit":"")}}),(j=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Me))&&!/\bi686\b/i.test(Me)?(M&&(M.architecture=64,M.family=M.family.replace(RegExp(" *"+j),"")),Ue&&(/\bWOW64\b/i.test(O)||de&&/\w(?:86|32)$/.test(K.cpuClass||K.platform)&&!/\bWin64; x64\b/i.test(O))&&Ce.unshift("32-bit")):M&&/^OS X/.test(M.family)&&Ue=="Chrome"&&parseFloat(ue)>=39&&(M.architecture=64),O||(O=null);var N={};return N.description=O,N.layout=ke&&ke[0],N.manufacturer=ee,N.name=Ue,N.prerelease=Le,N.product=Ye,N.ua=O,N.version=Ue&&ue,N.os=M||{architecture:null,family:null,version:null,toString:function(){return"null"}},N.parse=n,N.toString=D,N.version&&Ce.unshift(ue),N.name&&Ce.unshift(Ue),M&&Ue&&(M!=String(M).split(" ")[0]||M!=Ue.split(" ")[0]&&!Ye)&&Ce.push(Ye?"("+M+")":"on "+M),Ce.length&&(N.description=Ce.join(" ")),N}var t={function:!0,object:!0},u=t[typeof window]&&window||this,y=t[typeof S]&&S,g=t[typeof P]&&P&&!P.nodeType&&P,_=y&&g&&typeof C=="object"&&C;!_||_.global!==_&&_.window!==_&&_.self!==_||(u=_);var b=Math.pow(2,53)-1,v=/\bOpera/,m=Object.prototype,E=m.hasOwnProperty,a=m.toString,x=n();typeof U=="function"&&typeof U.amd=="object"&&U.amd?(u.platform=x,U(function(){return x})):y&&g?d(x,function(O,A){y[A]=O}):u.platform=x}).call(this)}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],172:[function(w,P,S){(function(C){"use strict";function T(l,p,h,d){if(typeof l!="function")throw new TypeError('"callback" argument must be a function');var o,c,s=arguments.length;switch(s){case 0:case 1:return C.nextTick(l);case 2:return C.nextTick(function(){l.call(null,p)});case 3:return C.nextTick(function(){l.call(null,p,h)});case 4:return C.nextTick(function(){l.call(null,p,h,d)});default:for(o=new Array(s-1),c=0;c1)for(var b=1;b1&&(xe=oe[0]+"@",Q=oe[1]),Q=Q.replace(j,"."),xe+p(Q.split("."),ie).join(".")}function d(Q){for(var ie,oe,xe=[],ye=0,Ae=Q.length;ye=55296&&ie<=56319&&ye65535&&(ie-=65536,oe+=B(ie>>>10&1023|55296),ie=56320|1023&ie),oe+=B(ie)}).join("")}function c(Q){return Q-48<10?Q-22:Q-65<26?Q-65:Q-97<26?Q-97:E}function s(Q,ie){return Q+22+75*(Q<26)-((ie!=0)<<5)}function f(Q,ie,oe){var xe=0;for(Q=oe?J(Q/A):Q>>1,Q+=J(Q/ie);Q>X*x>>1;xe+=E)Q=J(Q/X);return J(xe+(X+1)*Q/(Q+O))}function i(Q){var ie,oe,xe,ye,Ae,pe,Oe,Fe,Me,Ce,Le=[],de=Q.length,ue=0,ke=I,Ue=D;for(oe=Q.lastIndexOf(F),oe<0&&(oe=0),xe=0;xe=128&&l("not-basic"),Le.push(Q.charCodeAt(xe));for(ye=oe>0?oe+1:0;ye=de&&l("invalid-input"),Fe=c(Q.charCodeAt(ye++)),(Fe>=E||Fe>J((m-ue)/pe))&&l("overflow"),ue+=Fe*pe,Me=Oe<=Ue?a:Oe>=Ue+x?x:Oe-Ue,!(FeJ(m/Ce)&&l("overflow"),pe*=Ce;ie=Le.length+1,Ue=f(ue-Ae,ie,Ae==0),J(ue/ie)>m-ke&&l("overflow"),ke+=J(ue/ie),ue%=ie,Le.splice(ue++,0,ke)}return o(Le)}function n(Q){var ie,oe,xe,ye,Ae,pe,Oe,Fe,Me,Ce,Le,de,ue,ke,Ue,Ye=[];for(Q=d(Q),de=Q.length,ie=I,oe=0,Ae=D,pe=0;pe=ie&&LeJ((m-oe)/ue)&&l("overflow"),oe+=(Oe-ie)*ue,ie=Oe,pe=0;pem&&l("overflow"),Le==ie){for(Fe=oe,Me=E;Ce=Me<=Ae?a:Me>=Ae+x?x:Me-Ae,!(Fe= 0x80 (not a basic code point)","invalid-input":"Invalid input"},X=E-a,J=Math.floor,B=String.fromCharCode;if(b={version:"1.4.1",ucs2:{decode:d,encode:o},decode:i,encode:n,toASCII:u,toUnicode:t},typeof U=="function"&&typeof U.amd=="object"&&U.amd)U("punycode",function(){return b});else if(y&&g)if(P.exports==y)g.exports=b;else for(v in b)b.hasOwnProperty(v)&&(y[v]=b[v]);else T.punycode=b}(this)}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],175:[function(w,P,S){"use strict";function C(l,p){return Object.prototype.hasOwnProperty.call(l,p)}P.exports=function(l,p,h,d){p=p||"&",h=h||"=";var o={};if(typeof l!="string"||l.length===0)return o;var c=/\+/g;l=l.split(p);var s=1e3;d&&typeof d.maxKeys=="number"&&(s=d.maxKeys);var f=l.length;s>0&&f>s&&(f=s);for(var i=0;i=0?(n=g.substr(0,_),t=g.substr(_+1)):(n=g,t=""),u=decodeURIComponent(n),y=decodeURIComponent(t),C(o,u)?T(o[u])?o[u].push(y):o[u]=[o[u],y]:o[u]=y}return o};var T=Array.isArray||function(l){return Object.prototype.toString.call(l)==="[object Array]"}},{}],176:[function(w,P,S){"use strict";function C(h,d){if(h.map)return h.map(d);for(var o=[],c=0;c0?(typeof ue=="string"||ee.objectMode||(0,G.default)(ue)===oe.prototype||(ue=l(ue)),Ue?ee.endEmitted?de.emit("error",new Error("stream.unshift() after end event")):s(de,ee,ue,!0):ee.ended?de.emit("error",new Error("stream.push() after EOF")):(ee.reading=!1,ee.decoder&&!ke?(ue=ee.decoder.write(ue),ee.objectMode||ue.length!==0?s(de,ee,ue,!1):_(de,ee)):s(de,ee,ue,!1))):Ue||(ee.reading=!1)}return i(ee)}function s(de,ue,ke,Ue){ue.flowing&&ue.length===0&&!ue.sync?(de.emit("data",ke),de.read(0)):(ue.length+=ue.objectMode?1:ke.length,Ue?ue.buffer.unshift(ke):ue.buffer.push(ke),ue.needReadable&&y(de)),_(de,ue)}function f(de,ue){var ke;return p(ue)||typeof ue=="string"||ue===void 0||de.objectMode||(ke=new TypeError("Invalid non-string/buffer chunk")),ke}function i(de){return!de.ended&&(de.needReadable||de.length=Le?de=Le:(de--,de|=de>>>1,de|=de>>>2,de|=de>>>4,de|=de>>>8,de|=de>>>16,de++),de}function t(de,ue){return de<=0||ue.length===0&&ue.ended?0:ue.objectMode?1:de!==de?ue.flowing&&ue.length?ue.buffer.head.data.length:ue.length:(de>ue.highWaterMark&&(ue.highWaterMark=n(de)),de<=ue.length?de:ue.ended?ue.length:(ue.needReadable=!0,0))}function u(de,ue){if(!ue.ended){if(ue.decoder){var ke=ue.decoder.end();ke&&ke.length&&(ue.buffer.push(ke),ue.length+=ue.objectMode?1:ke.length)}ue.ended=!0,y(de)}}function y(de){var ue=de._readableState;ue.needReadable=!1,ue.emittedReadable||(pe("emitReadable",ue.flowing),ue.emittedReadable=!0,ue.sync?X.nextTick(g,de):g(de))}function g(de){pe("emit readable"),de.emit("readable"),x(de)}function _(de,ue){ue.readingMore||(ue.readingMore=!0,X.nextTick(b,de,ue))}function b(de,ue){for(var ke=ue.length;!ue.reading&&!ue.flowing&&!ue.ended&&ue.length=ue.length?(ke=ue.decoder?ue.buffer.join(""):ue.buffer.length===1?ue.buffer.head.data:ue.buffer.concat(ue.length),ue.buffer.clear()):ke=A(de,ue.buffer,ue.decoder),ke}function A(de,ue,ke){var Ue;return deee.length?ee.length:de;if(M===ee.length?Ye+=ee:Ye+=ee.slice(0,de),(de-=M)===0){M===ee.length?(++Ue,ke.next?ue.head=ke.next:ue.head=ue.tail=null):(ue.head=ke,ke.data=ee.slice(M));break}++Ue}return ue.length-=Ue,Ye}function I(de,ue){var ke=oe.allocUnsafe(de),Ue=ue.head,Ye=1;for(Ue.data.copy(ke),de-=Ue.data.length;Ue=Ue.next;){var ee=Ue.data,M=de>ee.length?ee.length:de;if(ee.copy(ke,ke.length-de,0,M),(de-=M)===0){M===ee.length?(++Ye,Ue.next?ue.head=Ue.next:ue.head=ue.tail=null):(ue.head=Ue,Ue.data=ee.slice(M));break}++Ye}return ue.length-=Ye,ke}function F(de){var ue=de._readableState;if(ue.length>0)throw new Error('"endReadable()" called on non-empty stream');ue.endEmitted||(ue.ended=!0,X.nextTick(K,ue,de))}function K(de,ue){de.endEmitted||de.length!==0||(de.endEmitted=!0,ue.readable=!1,ue.emit("end"))}function ne(de,ue){for(var ke=0,Ue=de.length;ke=ue.highWaterMark||ue.ended))return pe("read: emitReadable",ue.length,ue.ended),ue.length===0&&ue.ended?F(this):y(this),null;if((de=t(de,ue))===0&&ue.ended)return ue.length===0&&F(this),null;var Ue=ue.needReadable;pe("need readable",Ue),(ue.length===0||ue.length-de0?O(de,ue):null,Ye===null?(ue.needReadable=!0,de=0):ue.length-=de,ue.length===0&&(ue.ended||(ue.needReadable=!0),ke!==de&&ue.ended&&F(this)),Ye!==null&&this.emit("data",Ye),Ye},o.prototype._read=function(de){this.emit("error",new Error("_read() is not implemented"))},o.prototype.pipe=function(de,ue){function ke(tt,Ve){pe("onunpipe"),tt===Y&&Ve&&Ve.hasUnpiped===!1&&(Ve.hasUnpiped=!0,Ye())}function Ue(){pe("onend"),de.end()}function Ye(){pe("cleanup"),de.removeListener("close",N),de.removeListener("finish",$),de.removeListener("drain",Pe),de.removeListener("error",M),de.removeListener("unpipe",ke),Y.removeListener("end",Ue),Y.removeListener("end",V),Y.removeListener("data",ee),Ie=!0,!me.awaitDrain||de._writableState&&!de._writableState.needDrain||Pe()}function ee(tt){pe("ondata"),Xe=!1,de.write(tt)!==!1||Xe||((me.pipesCount===1&&me.pipes===de||me.pipesCount>1&&ne(me.pipes,de)!==-1)&&!Ie&&(pe("false write response, pause",Y._readableState.awaitDrain),Y._readableState.awaitDrain++,Xe=!0),Y.pause())}function M(tt){pe("onerror",tt),V(),de.removeListener("error",M),Q(de,"error")===0&&de.emit("error",tt)}function N(){de.removeListener("finish",$),V()}function $(){pe("onfinish"),de.removeListener("close",N),V()}function V(){pe("unpipe"),Y.unpipe(de)}var Y=this,me=this._readableState;switch(me.pipesCount){case 0:me.pipes=de;break;case 1:me.pipes=[me.pipes,de];break;default:me.pipes.push(de)}me.pipesCount+=1,pe("pipe count=%d opts=%j",me.pipesCount,ue);var Re=(!ue||ue.end!==!1)&&de!==C.stdout&&de!==C.stderr,rt=Re?Ue:V;me.endEmitted?X.nextTick(rt):Y.once("end",rt),de.on("unpipe",ke);var Pe=v(Y);de.on("drain",Pe);var Ie=!1,Xe=!1;return Y.on("data",ee),h(de,"error",M),de.once("close",N),de.once("finish",$),de.emit("pipe",Y),me.flowing||(pe("pipe resume"),Y.resume()),de},o.prototype.unpipe=function(de){var ue=this._readableState,ke={hasUnpiped:!1};if(ue.pipesCount===0)return this;if(ue.pipesCount===1)return de&&de!==ue.pipes?this:(de||(de=ue.pipes),ue.pipes=null,ue.pipesCount=0,ue.flowing=!1,de&&de.emit("unpipe",this,ke),this);if(!de){var Ue=ue.pipes,Ye=ue.pipesCount;ue.pipes=null,ue.pipesCount=0,ue.flowing=!1;for(var ee=0;ee-1?J.default:B.nextTick;s.WritableState=c;var oe=w("core-util-is");oe.inherits=w("inherits");var xe={deprecate:w("util-deprecate")},ye=w("./internal/streams/stream"),Ae=w("safe-buffer").Buffer,pe=T.Uint8Array||function(){},Oe=w("./internal/streams/destroy");oe.inherits(s,ye),c.prototype.getBuffer=function(){for(var Me=this.bufferedRequest,Ce=[];Me;)Ce.push(Me),Me=Me.next;return Ce},function(){try{Object.defineProperty(c.prototype,"buffer",{get:xe.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(Me){}}();var Fe;typeof G.default=="function"&&ne.default&&typeof Function.prototype[ne.default]=="function"?(Fe=Function.prototype[ne.default],(0,F.default)(s,ne.default,{value:function(Me){return!!Fe.call(this,Me)||this===s&&Me&&Me._writableState instanceof c}})):Fe=function(Me){return Me instanceof this},s.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},s.prototype.write=function(Me,Ce,Le){var de=this._writableState,ue=!1,ke=!de.objectMode&&d(Me);return ke&&!Ae.isBuffer(Me)&&(Me=h(Me)),typeof Ce=="function"&&(Le=Ce,Ce=null),ke?Ce="buffer":Ce||(Ce=de.defaultEncoding),typeof Le!="function"&&(Le=o),de.ended?f(this,Le):(ke||i(this,de,Me,Le))&&(de.pendingcb++,ue=t(this,de,ke,Me,Ce,Le)),ue},s.prototype.cork=function(){this._writableState.corked++},s.prototype.uncork=function(){var Me=this._writableState;Me.corked&&(Me.corked--,Me.writing||Me.corked||Me.finished||Me.bufferProcessing||!Me.bufferedRequest||m(this,Me))},s.prototype.setDefaultEncoding=function(Me){if(typeof Me=="string"&&(Me=Me.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Me+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+Me);return this._writableState.defaultEncoding=Me,this},Object.defineProperty(s.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),s.prototype._write=function(Me,Ce,Le){Le(new Error("_write() is not implemented"))},s.prototype._writev=null,s.prototype.end=function(Me,Ce,Le){var de=this._writableState;typeof Me=="function"?(Le=Me,Me=null,Ce=null):typeof Ce=="function"&&(Le=Ce,Ce=null),Me!=null&&this.write(Me,Ce),de.corked&&(de.corked=1,this.uncork()),de.ending||de.finished||A(this,de,Le)},Object.defineProperty(s.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(Me){this._writableState&&(this._writableState.destroyed=Me)}}),s.prototype.destroy=Oe.destroy,s.prototype._undestroy=Oe.undestroy,s.prototype._destroy=function(Me,Ce){this.end(),Ce(Me)}}).call(this,w("_process"),typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":179,"./internal/streams/destroy":185,"./internal/streams/stream":186,_process:173,"babel-runtime/core-js/object/define-property":20,"babel-runtime/core-js/set-immediate":25,"babel-runtime/core-js/symbol":27,"babel-runtime/core-js/symbol/has-instance":28,"core-util-is":153,inherits:162,"process-nextick-args":172,"safe-buffer":193,"util-deprecate":205}],184:[function(w,P,S){"use strict";function C(h,d){if(!(h instanceof d))throw new TypeError("Cannot call a class as a function")}function T(h,d,o){h.copy(d,o)}var l=w("safe-buffer").Buffer,p=w("util");P.exports=function(){function h(){C(this,h),this.head=null,this.tail=null,this.length=0}return h.prototype.push=function(d){var o={data:d,next:null};this.length>0?this.tail.next=o:this.head=o,this.tail=o,++this.length},h.prototype.unshift=function(d){var o={data:d,next:this.head};this.length===0&&(this.tail=o),this.head=o,++this.length},h.prototype.shift=function(){if(this.length!==0){var d=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,d}},h.prototype.clear=function(){this.head=this.tail=null,this.length=0},h.prototype.join=function(d){if(this.length===0)return"";for(var o=this.head,c=""+o.data;o=o.next;)c+=d+o.data;return c},h.prototype.concat=function(d){if(this.length===0)return l.alloc(0);if(this.length===1)return this.head.data;for(var o=l.allocUnsafe(d>>>0),c=this.head,s=0;c;)T(c.data,o,s),s+=c.data.length,c=c.next;return o},h}(),p&&p.inspect&&p.inspect.custom&&(P.exports.prototype[p.inspect.custom]=function(){var h=p.inspect({length:this.length});return this.constructor.name+" "+h})},{"safe-buffer":193,util:36}],185:[function(w,P,S){"use strict";function C(h,d){var o=this,c=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return c||s?(d?d(h):!h||this._writableState&&this._writableState.errorEmitted||p.nextTick(l,this,h),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(h||null,function(f){!d&&f?(p.nextTick(l,o,f),o._writableState&&(o._writableState.errorEmitted=!0)):d&&d(f)}),this)}function T(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function l(h,d){h.emit("error",d)}var p=w("process-nextick-args");P.exports={destroy:C,undestroy:T}},{"process-nextick-args":172}],186:[function(w,P,S){"use strict";P.exports=w("events").EventEmitter},{events:158}],187:[function(w,P,S){P.exports=w("./readable").PassThrough},{"./readable":188}],188:[function(w,P,S){S=P.exports=w("./lib/_stream_readable.js"),S.Stream=S,S.Readable=S,S.Writable=w("./lib/_stream_writable.js"),S.Duplex=w("./lib/_stream_duplex.js"),S.Transform=w("./lib/_stream_transform.js"),S.PassThrough=w("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":179,"./lib/_stream_passthrough.js":180,"./lib/_stream_readable.js":181,"./lib/_stream_transform.js":182,"./lib/_stream_writable.js":183}],189:[function(w,P,S){P.exports=w("./readable").Transform},{"./readable":188}],190:[function(w,P,S){P.exports=w("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":183}],191:[function(w,P,S){var C=function(){return this}()||Function("return this")(),T=C.regeneratorRuntime&&Object.getOwnPropertyNames(C).indexOf("regeneratorRuntime")>=0,l=T&&C.regeneratorRuntime;if(C.regeneratorRuntime=void 0,P.exports=w("./runtime"),T)C.regeneratorRuntime=l;else try{delete C.regeneratorRuntime}catch(p){C.regeneratorRuntime=void 0}},{"./runtime":192}],192:[function(w,P,S){!function(C){"use strict";function T(J,B,Q,ie){var oe=B&&B.prototype instanceof p?B:p,xe=Object.create(oe.prototype),ye=new t(ie||[]);return xe._invoke=s(J,Q,ye),xe}function l(J,B,Q){try{return{type:"normal",arg:J.call(B,Q)}}catch(ie){return{type:"throw",arg:ie}}}function p(){}function h(){}function d(){}function o(J){["next","throw","return"].forEach(function(B){J[B]=function(Q){return this._invoke(B,Q)}})}function c(J){function B(oe,xe,ye,Ae){var pe=l(J[oe],J,xe);if(pe.type!=="throw"){var Oe=pe.arg,Fe=Oe.value;return Fe&&typeof Fe=="object"&&b.call(Fe,"__await")?Promise.resolve(Fe.__await).then(function(Me){B("next",Me,ye,Ae)},function(Me){B("throw",Me,ye,Ae)}):Promise.resolve(Fe).then(function(Me){Oe.value=Me,ye(Oe)},Ae)}Ae(pe.arg)}function Q(oe,xe){function ye(){return new Promise(function(Ae,pe){B(oe,xe,Ae,pe)})}return ie=ie?ie.then(ye,ye):ye()}var ie;this._invoke=Q}function s(J,B,Q){var ie=A;return function(oe,xe){if(ie===I)throw new Error("Generator is already running");if(ie===F){if(oe==="throw")throw xe;return y()}for(Q.method=oe,Q.arg=xe;;){var ye=Q.delegate;if(ye){var Ae=f(ye,Q);if(Ae){if(Ae===K)continue;return Ae}}if(Q.method==="next")Q.sent=Q._sent=Q.arg;else if(Q.method==="throw"){if(ie===A)throw ie=F,Q.arg;Q.dispatchException(Q.arg)}else Q.method==="return"&&Q.abrupt("return",Q.arg);ie=I;var pe=l(J,B,Q);if(pe.type==="normal"){if(ie=Q.done?F:D,pe.arg===K)continue;return{value:pe.arg,done:Q.done}}pe.type==="throw"&&(ie=F,Q.method="throw",Q.arg=pe.arg)}}}function f(J,B){var Q=J.iterator[B.method];if(Q===g){if(B.delegate=null,B.method==="throw"){if(J.iterator.return&&(B.method="return",B.arg=g,f(J,B),B.method==="throw"))return K;B.method="throw",B.arg=new TypeError("The iterator does not provide a 'throw' method")}return K}var ie=l(Q,J.iterator,B.arg);if(ie.type==="throw")return B.method="throw",B.arg=ie.arg,B.delegate=null,K;var oe=ie.arg;return oe?oe.done?(B[J.resultName]=oe.value,B.next=J.nextLoc,B.method!=="return"&&(B.method="next",B.arg=g),B.delegate=null,K):oe:(B.method="throw",B.arg=new TypeError("iterator result is not an object"),B.delegate=null,K)}function i(J){var B={tryLoc:J[0]};1 in J&&(B.catchLoc=J[1]),2 in J&&(B.finallyLoc=J[2],B.afterLoc=J[3]),this.tryEntries.push(B)}function n(J){var B=J.completion||{};B.type="normal",delete B.arg,J.completion=B}function t(J){this.tryEntries=[{tryLoc:"root"}],J.forEach(i,this),this.reset(!0)}function u(J){if(J){var B=J[m];if(B)return B.call(J);if(typeof J.next=="function")return J;if(!isNaN(J.length)){var Q=-1,ie=function oe(){for(;++Q=0;--ie){var oe=this.tryEntries[ie],xe=oe.completion;if(oe.tryLoc==="root")return B("end");if(oe.tryLoc<=this.prev){var ye=b.call(oe,"catchLoc"),Ae=b.call(oe,"finallyLoc");if(ye&&Ae){if(this.prev=0;--Q){var ie=this.tryEntries[Q];if(ie.tryLoc<=this.prev&&b.call(ie,"finallyLoc")&&this.prev=0;--B){var Q=this.tryEntries[B];if(Q.finallyLoc===J)return this.complete(Q.completion,Q.afterLoc),n(Q),K}},catch:function(J){for(var B=this.tryEntries.length-1;B>=0;--B){var Q=this.tryEntries[B];if(Q.tryLoc===J){var ie=Q.completion;if(ie.type==="throw"){var oe=ie.arg;n(Q)}return oe}}throw new Error("illegal catch attempt")},delegateYield:function(J,B,Q){return this.delegate={iterator:u(J),resultName:B,nextLoc:Q},this.method==="next"&&(this.arg=g),K}}}(function(){return this}()||Function("return this")())},{}],193:[function(w,P,S){function C(h,d){for(var o in h)d[o]=h[o]}function T(h,d,o){return p(h,d,o)}var l=w("buffer"),p=l.Buffer;p.from&&p.alloc&&p.allocUnsafe&&p.allocUnsafeSlow?P.exports=l:(C(l,S),S.Buffer=T),C(p,T),T.from=function(h,d,o){if(typeof h=="number")throw new TypeError("Argument must not be a number");return p(h,d,o)},T.alloc=function(h,d,o){if(typeof h!="number")throw new TypeError("Argument must be a number");var c=p(h);return d!==void 0?typeof o=="string"?c.fill(d,o):c.fill(d):c.fill(0),c},T.allocUnsafe=function(h){if(typeof h!="number")throw new TypeError("Argument must be a number");return p(h)},T.allocUnsafeSlow=function(h){if(typeof h!="number")throw new TypeError("Argument must be a number");return l.SlowBuffer(h)}},{buffer:38}],194:[function(w,P,S){(function(C){"use strict";function T(y){return y&&y.__esModule?y:{default:y}}var l=w("babel-runtime/core-js/string/from-code-point"),p=T(l),h=w("babel-runtime/core-js/json/stringify"),d=T(h),o=w("babel-runtime/helpers/typeof"),c=T(o),s=w("babel-runtime/core-js/object/define-property"),f=T(s),i=w("babel-runtime/core-js/object/keys"),n=T(i),t=w("babel-runtime/core-js/object/create"),u=T(t);!function(y){function g(V,Y){if(!(this instanceof g))return new g(V,Y);var me=this;b(me),me.q=me.c="",me.bufferCheckPosition=y.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,u.default)(y.XML_ENTITIES):(0,u.default)(y.ENTITIES),me.attribList=[],me.opt.xmlns&&(me.ns=(0,u.default)(ke)),me.trackPosition=me.opt.position!==!1,me.trackPosition&&(me.position=me.line=me.column=0),I(me,"onready")}function _(V){for(var Y=Math.max(y.MAX_BUFFER_LENGTH,10),me=0,Re=0,rt=Oe.length;ReY)switch(Oe[Re]){case"textNode":K(V);break;case"cdata":F(V,"oncdata",V.cdata),V.cdata="";break;case"script":F(V,"onscript",V.script),V.script="";break;default:j(V,"Max buffer length exceeded: "+Oe[Re])}me=Math.max(me,Pe)}var Ie=y.MAX_BUFFER_LENGTH-me;V.bufferCheckPosition=Ie+V.position}function b(V){for(var Y=0,me=Oe.length;Y"||a(V)}function A(V,Y){return V.test(Y)}function D(V,Y){return!A(V,Y)}function I(V,Y,me){V[Y]&&V[Y](me)}function F(V,Y,me){V.textNode&&K(V),I(V,Y,me)}function K(V){V.textNode=ne(V.opt,V.textNode),V.textNode&&I(V,"ontext",V.textNode),V.textNode=""}function ne(V,Y){return V.trim&&(Y=Y.trim()),V.normalize&&(Y=Y.replace(/\s+/g," ")),Y}function j(V,Y){return K(V),V.trackPosition&&(Y+=` Line: `+V.line+` Column: `+V.column+` Char: `+V.c),Y=new Error(Y),V.error=Y,I(V,"onerror",Y),V}function G(V){return V.sawRoot&&!V.closedRoot&&X(V,"Unclosed root tag"),V.state!==N.BEGIN&&V.state!==N.BEGIN_WHITESPACE&&V.state!==N.TEXT&&j(V,"Unexpected end"),K(V),V.c="",V.closed=!0,I(V,"onend"),g.call(V,V.strict,V.opt),V}function X(V,Y){if((V===void 0?"undefined":(0,c.default)(V))!=="object"||!(V instanceof g))throw new Error("bad call to strictFail");V.strict&&j(V,Y)}function J(V){V.strict||(V.tagName=V.tagName[V.looseCase]());var Y=V.tags[V.tags.length-1]||V,me=V.tag={name:V.tagName,attributes:{}};V.opt.xmlns&&(me.ns=Y.ns),V.attribList.length=0,F(V,"onopentagstart",me)}function B(V,Y){var me=V.indexOf(":"),Re=me<0?["",V]:V.split(":"),rt=Re[0],Pe=Re[1];return Y&&V==="xmlns"&&(rt="xmlns",Pe=""),{prefix:rt,local:Pe}}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=B(V.attribName,!0),me=Y.prefix,Re=Y.local;if(me==="xmlns")if(Re==="xml"&&V.attribValue!==de)X(V,"xml: prefix must be bound to "+de+` Actual: `+V.attribValue);else if(Re==="xmlns"&&V.attribValue!==ue)X(V,"xmlns: prefix must be bound to "+ue+` Actual: `+V.attribValue);else{var rt=V.tag,Pe=V.tags[V.tags.length-1]||V;rt.ns===Pe.ns&&(rt.ns=(0,u.default)(Pe.ns)),rt.ns[Re]=V.attribValue}V.attribList.push([V.attribName,V.attribValue])}else V.tag.attributes[V.attribName]=V.attribValue,F(V,"onattribute",{name:V.attribName,value:V.attribValue});V.attribName=V.attribValue=""}function ie(V,Y){if(V.opt.xmlns){var me=V.tag,Re=B(V.tagName);me.prefix=Re.prefix,me.local=Re.local,me.uri=me.ns[Re.prefix]||"",me.prefix&&!me.uri&&(X(V,"Unbound namespace prefix: "+(0,d.default)(V.tagName)),me.uri=Re.prefix);var rt=V.tags[V.tags.length-1]||V;me.ns&&rt.ns!==me.ns&&(0,n.default)(me.ns).forEach(function(ve){F(V,"onopennamespace",{prefix:ve,uri:me.ns[ve]})});for(var Pe=0,Ie=V.attribList.length;Pe",V.tagName="",void(V.state=N.SCRIPT);F(V,"onscript",V.script),V.script=""}var Y=V.tags.length,me=V.tagName;V.strict||(me=me[V.looseCase]());for(var Re=me;Y--&&!(V.tags[Y].name===Re);)X(V,"Unexpected close tag");if(Y<0)return X(V,"Unmatched closing tag: "+V.tagName),V.textNode+="",void(V.state=N.TEXT);V.tagName=me;for(var rt=V.tags.length;rt-- >Y;){var Pe=V.tag=V.tags.pop();V.tagName=V.tag.name,F(V,"onclosetag",V.tagName);var Ie={};for(var Xe in Pe.ns)Ie[Xe]=Pe.ns[Xe];var tt=V.tags[V.tags.length-1]||V;V.opt.xmlns&&Pe.ns!==tt.ns&&(0,n.default)(Pe.ns).forEach(function(Ve){var Ke=Pe.ns[Ve];F(V,"onclosenamespace",{prefix:Ve,uri:Ke})})}Y===0&&(V.closedRoot=!0),V.tagName=V.attribValue=V.attribName="",V.attribList.length=0,V.state=N.TEXT}function xe(V){var Y,me=V.entity,Re=me.toLowerCase(),rt="";return V.ENTITIES[me]?V.ENTITIES[me]:V.ENTITIES[Re]?V.ENTITIES[Re]:(me=Re,me.charAt(0)==="#"&&(me.charAt(1)==="x"?(me=me.slice(2),Y=parseInt(me,16),rt=Y.toString(16)):(me=me.slice(1),Y=parseInt(me,10),rt=Y.toString(10))),me=me.replace(/^0+/,""),isNaN(Y)||rt.toLowerCase()!==me?(X(V,"Invalid character entity"),"&"+V.entity+";"):(0,p.default)(Y))}function ye(V,Y){Y==="<"?(V.state=N.OPEN_WAKA,V.startTagPosition=V.position):a(Y)||(X(V,"Non-whitespace before first tag."),V.textNode=Y,V.state=N.TEXT)}function Ae(V,Y){var me="";return Y"?(F(Y,"onsgmldeclaration",Y.sgmlDecl),Y.sgmlDecl="",Y.state=N.TEXT):(x(Re)&&(Y.state=N.SGML_DECL_QUOTED),Y.sgmlDecl+=Re);continue;case N.SGML_DECL_QUOTED:Re===Y.q&&(Y.state=N.SGML_DECL,Y.q=""),Y.sgmlDecl+=Re;continue;case N.DOCTYPE:Re===">"?(Y.state=N.TEXT,F(Y,"ondoctype",Y.doctype),Y.doctype=!0):(Y.doctype+=Re,Re==="["?Y.state=N.DOCTYPE_DTD:x(Re)&&(Y.state=N.DOCTYPE_QUOTED,Y.q=Re));continue;case N.DOCTYPE_QUOTED:Y.doctype+=Re,Re===Y.q&&(Y.q="",Y.state=N.DOCTYPE);continue;case N.DOCTYPE_DTD:Y.doctype+=Re,Re==="]"?Y.state=N.DOCTYPE:x(Re)&&(Y.state=N.DOCTYPE_DTD_QUOTED,Y.q=Re);continue;case N.DOCTYPE_DTD_QUOTED:Y.doctype+=Re,Re===Y.q&&(Y.state=N.DOCTYPE_DTD,Y.q="");continue;case N.COMMENT:Re==="-"?Y.state=N.COMMENT_ENDING:Y.comment+=Re;continue;case N.COMMENT_ENDING:Re==="-"?(Y.state=N.COMMENT_ENDED,Y.comment=ne(Y.opt,Y.comment),Y.comment&&F(Y,"oncomment",Y.comment),Y.comment=""):(Y.comment+="-"+Re,Y.state=N.COMMENT);continue;case N.COMMENT_ENDED:Re!==">"?(X(Y,"Malformed comment"),Y.comment+="--"+Re,Y.state=N.COMMENT):Y.state=N.TEXT;continue;case N.CDATA:Re==="]"?Y.state=N.CDATA_ENDING:Y.cdata+=Re;continue;case N.CDATA_ENDING:Re==="]"?Y.state=N.CDATA_ENDING_2:(Y.cdata+="]"+Re,Y.state=N.CDATA);continue;case N.CDATA_ENDING_2:Re===">"?(Y.cdata&&F(Y,"oncdata",Y.cdata),F(Y,"onclosecdata"),Y.cdata="",Y.state=N.TEXT):Re==="]"?Y.cdata+="]":(Y.cdata+="]]"+Re,Y.state=N.CDATA);continue;case N.PROC_INST:Re==="?"?Y.state=N.PROC_INST_ENDING:a(Re)?Y.state=N.PROC_INST_BODY:Y.procInstName+=Re;continue;case N.PROC_INST_BODY:if(!Y.procInstBody&&a(Re))continue;Re==="?"?Y.state=N.PROC_INST_ENDING:Y.procInstBody+=Re;continue;case N.PROC_INST_ENDING:Re===">"?(F(Y,"onprocessinginstruction",{name:Y.procInstName,body:Y.procInstBody}),Y.procInstName=Y.procInstBody="",Y.state=N.TEXT):(Y.procInstBody+="?"+Re,Y.state=N.PROC_INST_BODY);continue;case N.OPEN_TAG:A(Ye,Re)?Y.tagName+=Re:(J(Y),Re===">"?ie(Y):Re==="/"?Y.state=N.OPEN_TAG_SLASH:(a(Re)||X(Y,"Invalid character in tag name"),Y.state=N.ATTRIB));continue;case N.OPEN_TAG_SLASH:Re===">"?(ie(Y,!0),oe(Y)):(X(Y,"Forward-slash in opening tag not followed by >"),Y.state=N.ATTRIB);continue;case N.ATTRIB:if(a(Re))continue;Re===">"?ie(Y):Re==="/"?Y.state=N.OPEN_TAG_SLASH:A(Ue,Re)?(Y.attribName=Re,Y.attribValue="",Y.state=N.ATTRIB_NAME):X(Y,"Invalid attribute name");continue;case N.ATTRIB_NAME:Re==="="?Y.state=N.ATTRIB_VALUE:Re===">"?(X(Y,"Attribute without value"),Y.attribValue=Y.attribName,Q(Y),ie(Y)):a(Re)?Y.state=N.ATTRIB_NAME_SAW_WHITE:A(Ye,Re)?Y.attribName+=Re:X(Y,"Invalid attribute name");continue;case N.ATTRIB_NAME_SAW_WHITE:if(Re==="=")Y.state=N.ATTRIB_VALUE;else{if(a(Re))continue;X(Y,"Attribute without value"),Y.tag.attributes[Y.attribName]="",Y.attribValue="",F(Y,"onattribute",{name:Y.attribName,value:""}),Y.attribName="",Re===">"?ie(Y):A(Ue,Re)?(Y.attribName=Re,Y.state=N.ATTRIB_NAME):(X(Y,"Invalid attribute name"),Y.state=N.ATTRIB)}continue;case N.ATTRIB_VALUE:if(a(Re))continue;x(Re)?(Y.q=Re,Y.state=N.ATTRIB_VALUE_QUOTED):(X(Y,"Unquoted attribute value"),Y.state=N.ATTRIB_VALUE_UNQUOTED,Y.attribValue=Re);continue;case N.ATTRIB_VALUE_QUOTED:if(Re!==Y.q){Re==="&"?Y.state=N.ATTRIB_VALUE_ENTITY_Q:Y.attribValue+=Re;continue}Q(Y),Y.q="",Y.state=N.ATTRIB_VALUE_CLOSED;continue;case N.ATTRIB_VALUE_CLOSED:a(Re)?Y.state=N.ATTRIB:Re===">"?ie(Y):Re==="/"?Y.state=N.OPEN_TAG_SLASH:A(Ue,Re)?(X(Y,"No whitespace between attributes"),Y.attribName=Re,Y.attribValue="",Y.state=N.ATTRIB_NAME):X(Y,"Invalid attribute name");continue;case N.ATTRIB_VALUE_UNQUOTED:if(!O(Re)){Re==="&"?Y.state=N.ATTRIB_VALUE_ENTITY_U:Y.attribValue+=Re;continue}Q(Y),Re===">"?ie(Y):Y.state=N.ATTRIB;continue;case N.CLOSE_TAG:if(Y.tagName)Re===">"?oe(Y):A(Ye,Re)?Y.tagName+=Re:Y.script?(Y.script+=""?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 Ie,Xe;switch(Y.state){case N.TEXT_ENTITY:Ie=N.TEXT,Xe="textNode";break;case N.ATTRIB_VALUE_ENTITY_Q:Ie=N.ATTRIB_VALUE_QUOTED,Xe="attribValue";break;case N.ATTRIB_VALUE_ENTITY_U:Ie=N.ATTRIB_VALUE_UNQUOTED,Xe="attribValue"}Re===";"?(Y[Xe]+=xe(Y),Y.entity="",Y.state=Ie):A(Y.entity.length?M:ee,Re)?Y.entity+=Re:(X(Y,"Invalid character in entity name"),Y[Xe]+="&"+Y.entity+Re,Y.entity="",Y.state=Ie);continue;default:throw new Error(Y,"Unknown state: "+Y.state)}return Y.position>=Y.bufferCheckPosition&&_(Y),Y}y.parser=function(V,Y){return new g(V,Y)},y.SAXParser=g,y.SAXStream=E,y.createStream=m,y.MAX_BUFFER_LENGTH=65536;var Oe=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];y.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],u.default||(Object.create=function(V){function Y(){}return Y.prototype=V,new Y}),n.default||(Object.keys=function(V){var Y=[];for(var me in V)V.hasOwnProperty(me)&&Y.push(me);return Y}),g.prototype={end:function(){G(this)},write:pe,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){v(this)}};var Fe;try{Fe=w("stream").Stream}catch(V){Fe=function(){}}var Me=y.EVENTS.filter(function(V){return V!=="error"&&V!=="end"});E.prototype=(0,u.default)(Fe.prototype,{constructor:{value:E}}),E.prototype.write=function(V){if(typeof C=="function"&&typeof C.isBuffer=="function"&&C.isBuffer(V)){if(!this._decoder){var Y=w("string_decoder").StringDecoder;this._decoder=new Y("utf8")}V=this._decoder.write(V)}return this._parser.write(V.toString()),this.emit("data",V),!0},E.prototype.end=function(V){return V&&V.length&&this.write(V),this._parser.end(),!0},E.prototype.on=function(V,Y){var me=this;return me._parser["on"+V]||Me.indexOf(V)===-1||(me._parser["on"+V]=function(){var Re=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);Re.splice(0,0,V),me.emit.apply(me,Re)}),Fe.prototype.on.call(me,V,Y)};var Ce="[CDATA[",Le="DOCTYPE",de="http://www.w3.org/XML/1998/namespace",ue="http://www.w3.org/2000/xmlns/",ke={xml:de,xmlns:ue},Ue=/[:_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]/,Ye=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,ee=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,M=/[#:_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;y.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++},y.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},y.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},(0,n.default)(y.ENTITIES).forEach(function(V){var Y=y.ENTITIES[V],me=typeof Y=="number"?String.fromCharCode(Y):Y;y.ENTITIES[V]=me});for(var $ in y.STATE)y.STATE[y.STATE[$]]=$;N=y.STATE,p.default||function(){var V=String.fromCharCode,Y=Math.floor,me=function(){var Re,rt,Pe=[],Ie=-1,Xe=arguments.length;if(!Xe)return"";for(var tt="";++Ie1114111||Y(Ve)!==Ve)throw RangeError("Invalid code point: "+Ve);Ve<=65535?Pe.push(Ve):(Ve-=65536,Re=55296+(Ve>>10),rt=Ve%1024+56320,Pe.push(Re,rt)),(Ie+1===Xe||Pe.length>16384)&&(tt+=V.apply(null,Pe),Pe.length=0)}return tt};f.default?Object.defineProperty(String,"fromCodePoint",{value:me,configurable:!0,writable:!0}):String.fromCodePoint=me}()}(S===void 0?(void 0).sax={}:S)}).call(this,w("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/create":19,"babel-runtime/core-js/object/define-property":20,"babel-runtime/core-js/object/keys":23,"babel-runtime/core-js/string/from-code-point":26,"babel-runtime/helpers/typeof":32,buffer:38,stream:195,string_decoder:37}],195:[function(w,P,S){function C(){T.call(this)}P.exports=C;var T=w("events").EventEmitter;w("inherits")(C,T),C.Readable=w("readable-stream/readable.js"),C.Writable=w("readable-stream/writable.js"),C.Duplex=w("readable-stream/duplex.js"),C.Transform=w("readable-stream/transform.js"),C.PassThrough=w("readable-stream/passthrough.js"),C.Stream=C,C.prototype.pipe=function(l,p){function h(t){l.writable&&l.write(t)===!1&&i.pause&&i.pause()}function d(){i.readable&&i.resume&&i.resume()}function o(){n||(n=!0,l.end())}function c(){n||(n=!0,typeof l.destroy=="function"&&l.destroy())}function s(t){if(f(),T.listenerCount(this,"error")===0)throw t}function f(){i.removeListener("data",h),l.removeListener("drain",d),i.removeListener("end",o),i.removeListener("close",c),i.removeListener("error",s),l.removeListener("error",s),i.removeListener("end",f),i.removeListener("close",f),l.removeListener("close",f)}var i=this;i.on("data",h),l.on("drain",d),l._isStdio||p&&p.end===!1||(i.on("end",o),i.on("close",c));var n=!1;return i.on("error",s),l.on("error",s),i.on("end",f),i.on("close",f),l.on("close",f),l.emit("pipe",i),l}},{events:158,inherits:162,"readable-stream/duplex.js":178,"readable-stream/passthrough.js":187,"readable-stream/readable.js":188,"readable-stream/transform.js":189,"readable-stream/writable.js":190}],196:[function(w,P,S){(function(C){var T=w("./lib/request"),l=w("./lib/response"),p=w("xtend"),h=w("builtin-status-codes"),d=w("url"),o=S;o.request=function(c,s){c=typeof c=="string"?d.parse(c):p(c);var f=C.location.protocol.search(/^https?:$/)===-1?"http:":"",i=c.protocol||f,n=c.hostname||c.host,t=c.port,u=c.path||"/";n&&n.indexOf(":")!==-1&&(n="["+n+"]"),c.url=(n?i+"//"+n:"")+(t?":"+t:"")+u,c.method=(c.method||"GET").toUpperCase(),c.headers=c.headers||{};var y=new T(c);return s&&y.on("response",s),y},o.get=function(c,s){var f=o.request(c,s);return f.end(),f},o.ClientRequest=T,o.IncomingMessage=l.IncomingMessage,o.Agent=function(){},o.Agent.defaultMaxSockets=4,o.globalAgent=new o.Agent,o.STATUS_CODES=h,o.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":198,"./lib/response":199,"builtin-status-codes":39,url:203,xtend:236}],197:[function(w,P,S){(function(C){"use strict";function T(){if(h!==void 0)return h;if(C.XMLHttpRequest){h=new C.XMLHttpRequest;try{h.open("GET",C.XDomainRequest?"/":"https://example.com")}catch(c){h=null}}else h=null;return h}function l(c){var s=T();if(!s)return!1;try{return s.responseType=c,s.responseType===c}catch(f){}return!1}function p(c){return typeof c=="function"}S.fetch=p(C.fetch)&&p(C.ReadableStream),S.writableStream=p(C.WritableStream),S.abortController=p(C.AbortController),S.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),S.blobConstructor=!0}catch(c){}var h,d=C.ArrayBuffer!==void 0,o=d&&p(C.ArrayBuffer.prototype.slice);S.arraybuffer=S.fetch||d&&l("arraybuffer"),S.msstream=!S.fetch&&o&&l("ms-stream"),S.mozchunkedarraybuffer=!S.fetch&&d&&l("moz-chunked-arraybuffer"),S.overrideMimeType=S.fetch||!!T()&&p(T().overrideMimeType),S.vbArray=p(C.VBArray),h=null}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],198:[function(w,P,S){(function(C,T,l){"use strict";function p(_,b){return c.fetch&&b?"fetch":c.mozchunkedarraybuffer?"moz-chunked-arraybuffer":c.msstream?"ms-stream":c.arraybuffer&&_?"arraybuffer":c.vbArray&&_?"text:vbarray":"text"}function h(_){try{var b=_.status;return b!==null&&b!==0}catch(v){return!1}}var d=w("babel-runtime/core-js/object/keys"),o=function(_){return _&&_.__esModule?_:{default:_}}(d),c=w("./capability"),s=w("inherits"),f=w("./response"),i=w("readable-stream"),n=w("to-arraybuffer"),t=f.IncomingMessage,u=f.readyStates,y=P.exports=function(_){var b=this;i.Writable.call(b),b._opts=_,b._body=[],b._headers={},_.auth&&b.setHeader("Authorization","Basic "+new l(_.auth).toString("base64")),(0,o.default)(_.headers).forEach(function(E){b.setHeader(E,_.headers[E])});var v,m=!0;if(_.mode==="disable-fetch"||"requestTimeout"in _&&!c.abortController)m=!1,v=!0;else if(_.mode==="prefer-streaming")v=!1;else if(_.mode==="allow-wrong-content-type")v=!c.overrideMimeType;else{if(_.mode&&_.mode!=="default"&&_.mode!=="prefer-fast")throw new Error("Invalid value for opts.mode");v=!0}b._mode=p(v,m),b._fetchTimer=null,b.on("finish",function(){b._onFinish()})};s(y,i.Writable),y.prototype.setHeader=function(_,b){var v=this,m=_.toLowerCase();g.indexOf(m)===-1&&(v._headers[m]={name:_,value:b})},y.prototype.getHeader=function(_){var b=this._headers[_.toLowerCase()];return b?b.value:null},y.prototype.removeHeader=function(_){delete this._headers[_.toLowerCase()]},y.prototype._onFinish=function(){var _=this;if(!_._destroyed){var b=_._opts,v=_._headers,m=null;b.method!=="GET"&&b.method!=="HEAD"&&(m=c.arraybuffer?n(l.concat(_._body)):c.blobConstructor?new T.Blob(_._body.map(function(A){return n(A)}),{type:(v["content-type"]||{}).value||""}):l.concat(_._body).toString());var E=[];if((0,o.default)(v).forEach(function(A){var D=v[A].name,I=v[A].value;Array.isArray(I)?I.forEach(function(F){E.push([D,F])}):E.push([D,I])}),_._mode==="fetch"){var a=null;if(c.abortController){var x=new AbortController;a=x.signal,_._fetchAbortController=x,"requestTimeout"in b&&b.requestTimeout!==0&&(_._fetchTimer=T.setTimeout(function(){_.emit("requestTimeout"),_._fetchAbortController&&_._fetchAbortController.abort()},b.requestTimeout))}T.fetch(_._opts.url,{method:_._opts.method,headers:E,body:m||void 0,mode:"cors",credentials:b.withCredentials?"include":"same-origin",signal:a}).then(function(A){_._fetchResponse=A,_._connect()},function(A){T.clearTimeout(_._fetchTimer),_._destroyed||_.emit("error",A)})}else{var O=_._xhr=new T.XMLHttpRequest;try{O.open(_._opts.method,_._opts.url,!0)}catch(A){return void C.nextTick(function(){_.emit("error",A)})}"responseType"in O&&(O.responseType=_._mode.split(":")[0]),"withCredentials"in O&&(O.withCredentials=!!b.withCredentials),_._mode==="text"&&"overrideMimeType"in O&&O.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in b&&(O.timeout=b.requestTimeout,O.ontimeout=function(){_.emit("requestTimeout")}),E.forEach(function(A){O.setRequestHeader(A[0],A[1])}),_._response=null,O.onreadystatechange=function(){switch(O.readyState){case u.LOADING:case u.DONE:_._onXHRProgress()}},_._mode==="moz-chunked-arraybuffer"&&(O.onprogress=function(){_._onXHRProgress()}),O.onerror=function(){_._destroyed||_.emit("error",new Error("XHR error"))};try{O.send(m)}catch(A){return void C.nextTick(function(){_.emit("error",A)})}}}},y.prototype._onXHRProgress=function(){var _=this;h(_._xhr)&&!_._destroyed&&(_._response||_._connect(),_._response._onXHRProgress())},y.prototype._connect=function(){var _=this;_._destroyed||(_._response=new t(_._xhr,_._fetchResponse,_._mode,_._fetchTimer),_._response.on("error",function(b){_.emit("error",b)}),_.emit("response",_._response))},y.prototype._write=function(_,b,v){this._body.push(_),v()},y.prototype.abort=y.prototype.destroy=function(){var _=this;_._destroyed=!0,T.clearTimeout(_._fetchTimer),_._response&&(_._response._destroyed=!0),_._xhr?_._xhr.abort():_._fetchAbortController&&_._fetchAbortController.abort()},y.prototype.end=function(_,b,v){var m=this;typeof _=="function"&&(v=_,_=void 0),i.Writable.prototype.end.call(m,_,b,v)},y.prototype.flushHeaders=function(){},y.prototype.setTimeout=function(){},y.prototype.setNoDelay=function(){},y.prototype.setSocketKeepAlive=function(){};var g=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this,w("_process"),typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{},w("buffer").Buffer)},{"./capability":197,"./response":199,_process:173,"babel-runtime/core-js/object/keys":23,buffer:38,inherits:162,"readable-stream":188,"to-arraybuffer":202}],199:[function(w,P,S){(function(C,T,l){"use strict";var p=w("babel-runtime/core-js/promise"),h=function(i){return i&&i.__esModule?i:{default:i}}(p),d=w("./capability"),o=w("inherits"),c=w("readable-stream"),s=S.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},f=S.IncomingMessage=function(i,n,t,u){var y=this;if(c.Readable.call(y),y._mode=t,y.headers={},y.rawHeaders=[],y.trailers={},y.rawTrailers=[],y.on("end",function(){C.nextTick(function(){y.emit("close")})}),t==="fetch"){if(y._fetchResponse=n,y.url=n.url,y.statusCode=n.status,y.statusMessage=n.statusText,n.headers.forEach(function(m,E){y.headers[E.toLowerCase()]=m,y.rawHeaders.push(E,m)}),d.writableStream){var g=new WritableStream({write:function(m){return new h.default(function(E,a){y._destroyed?a():y.push(new l(m))?E():y._resumeFetch=E})},close:function(){T.clearTimeout(u),y._destroyed||y.push(null)},abort:function(m){y._destroyed||y.emit("error",m)}});try{return void n.body.pipeTo(g).catch(function(m){T.clearTimeout(u),y._destroyed||y.emit("error",m)})}catch(m){}}var _=n.body.getReader();!function m(){_.read().then(function(E){if(!y._destroyed){if(E.done)return T.clearTimeout(u),void y.push(null);y.push(new l(E.value)),m()}}).catch(function(E){T.clearTimeout(u),y._destroyed||y.emit("error",E)})}()}else if(y._xhr=i,y._pos=0,y.url=i.responseURL,y.statusCode=i.status,y.statusMessage=i.statusText,i.getAllResponseHeaders().split(/\r?\n/).forEach(function(m){var E=m.match(/^([^:]+):\s*(.*)/);if(E){var a=E[1].toLowerCase();a==="set-cookie"?(y.headers[a]===void 0&&(y.headers[a]=[]),y.headers[a].push(E[2])):y.headers[a]!==void 0?y.headers[a]+=", "+E[2]:y.headers[a]=E[2],y.rawHeaders.push(E[1],E[2])}}),y._charset="x-user-defined",!d.overrideMimeType){var b=y.rawHeaders["mime-type"];if(b){var v=b.match(/;\s*charset=([^;])(;|$)/);v&&(y._charset=v[1].toLowerCase())}y._charset||(y._charset="utf-8")}};o(f,c.Readable),f.prototype._read=function(){var i=this,n=i._resumeFetch;n&&(i._resumeFetch=null,n())},f.prototype._onXHRProgress=function(){var i=this,n=i._xhr,t=null;switch(i._mode){case"text:vbarray":if(n.readyState!==s.DONE)break;try{t=new T.VBArray(n.responseBody).toArray()}catch(b){}if(t!==null){i.push(new l(t));break}case"text":try{t=n.responseText}catch(b){i._mode="text:vbarray";break}if(t.length>i._pos){var u=t.substr(i._pos);if(i._charset==="x-user-defined"){for(var y=new l(u.length),g=0;gi._pos&&(i.push(new l(new Uint8Array(_.result.slice(i._pos)))),i._pos=_.result.byteLength)},_.onload=function(){i.push(null)},_.readAsArrayBuffer(t)}i._xhr.readyState===s.DONE&&i._mode!=="ms-stream"&&i.push(null)}}).call(this,w("_process"),typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{},w("buffer").Buffer)},{"./capability":197,_process:173,"babel-runtime/core-js/promise":24,buffer:38,inherits:162,"readable-stream":188}],200:[function(w,P,S){"use strict";function C(b){if(!b)return"utf8";for(var v;;)switch(b){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 b;default:if(v)return;b=(""+b).toLowerCase(),v=!0}}function T(b){var v=C(b);if(typeof v!="string"&&(g.isEncoding===_||!_(b)))throw new Error("Unknown encoding: "+b);return v||b}function l(b){this.encoding=T(b);var v;switch(this.encoding){case"utf16le":this.text=f,this.end=i,v=4;break;case"utf8":this.fillLast=o,v=4;break;case"base64":this.text=n,this.end=t,v=3;break;default:return this.write=u,void(this.end=y)}this.lastNeed=0,this.lastTotal=0,this.lastChar=g.allocUnsafe(v)}function p(b){return b<=127?0:b>>5==6?2:b>>4==14?3:b>>3==30?4:b>>6==2?-1:-2}function h(b,v,m){var E=v.length-1;if(E=0?(a>0&&(b.lastNeed=a-1),a):--E=0?(a>0&&(b.lastNeed=a-2),a):--E=0?(a>0&&(a===2?a=0:b.lastNeed=a-3),a):0)}function d(b,v,m){if((192&v[0])!=128)return b.lastNeed=0,"\u951F\uFFFD";if(b.lastNeed>1&&v.length>1){if((192&v[1])!=128)return b.lastNeed=1,"\u951F\uFFFD";if(b.lastNeed>2&&v.length>2&&(192&v[2])!=128)return b.lastNeed=2,"\u951F\uFFFD"}}function o(b){var v=this.lastTotal-this.lastNeed,m=d(this,b,v);return m!==void 0?m:this.lastNeed<=b.length?(b.copy(this.lastChar,v,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(b.copy(this.lastChar,v,0,b.length),void(this.lastNeed-=b.length))}function c(b,v){var m=h(this,b,v);if(!this.lastNeed)return b.toString("utf8",v);this.lastTotal=m;var E=b.length-(m-this.lastNeed);return b.copy(this.lastChar,0,E),b.toString("utf8",v,E)}function s(b){var v=b&&b.length?this.write(b):"";return this.lastNeed?v+"\u951F\uFFFD":v}function f(b,v){if((b.length-v)%2==0){var m=b.toString("utf16le",v);if(m){var E=m.charCodeAt(m.length-1);if(E>=55296&&E<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=b[b.length-2],this.lastChar[1]=b[b.length-1],m.slice(0,-1)}return m}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=b[b.length-1],b.toString("utf16le",v,b.length-1)}function i(b){var v=b&&b.length?this.write(b):"";if(this.lastNeed){var m=this.lastTotal-this.lastNeed;return v+this.lastChar.toString("utf16le",0,m)}return v}function n(b,v){var m=(b.length-v)%3;return m===0?b.toString("base64",v):(this.lastNeed=3-m,this.lastTotal=3,m===1?this.lastChar[0]=b[b.length-1]:(this.lastChar[0]=b[b.length-2],this.lastChar[1]=b[b.length-1]),b.toString("base64",v,b.length-m))}function t(b){var v=b&&b.length?this.write(b):"";return this.lastNeed?v+this.lastChar.toString("base64",0,3-this.lastNeed):v}function u(b){return b.toString(this.encoding)}function y(b){return b&&b.length?this.write(b):""}var g=w("safe-buffer").Buffer,_=g.isEncoding||function(b){switch((b=""+b)&&b.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};S.StringDecoder=l,l.prototype.write=function(b){if(b.length===0)return"";var v,m;if(this.lastNeed){if((v=this.fillLast(b))===void 0)return"";m=this.lastNeed,this.lastNeed=0}else m=0;return m=0&&(s._idleTimeoutId=setTimeout(function(){s._onTimeout&&s._onTimeout()},f))},S.setImmediate=typeof C=="function"?C:function(s){var f=c++,i=!(arguments.length<2)&&d.call(arguments,1);return o[f]=!0,p(function(){o[f]&&(i?s.apply(null,i):s.call(null),S.clearImmediate(f))}),f},S.clearImmediate=typeof T=="function"?T:function(s){delete o[s]}}).call(this,w("timers").setImmediate,w("timers").clearImmediate)},{"process/browser.js":173,timers:201}],202:[function(w,P,S){var C=w("buffer").Buffer;P.exports=function(T){if(T instanceof Uint8Array){if(T.byteOffset===0&&T.byteLength===T.buffer.byteLength)return T.buffer;if(typeof T.buffer.slice=="function")return T.buffer.slice(T.byteOffset,T.byteOffset+T.byteLength)}if(C.isBuffer(T)){for(var l=new Uint8Array(T.length),p=T.length,h=0;h",'"',"`"," ","\r",` `," "],n=["{","}","|","\\","^","`"].concat(i),t=["'"].concat(n),u=["%","/","?",";","#"].concat(t),y=["/","?","#"],g=/^[+a-z0-9A-Z_-]{0,63}$/,_=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,b={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},E=w("querystring");C.prototype.parse=function(a,x,O){if(!o.isString(a))throw new TypeError("Parameter 'url' must be a string, not "+typeof a);var A=a.indexOf("?"),D=A!==-1&&A127?Oe+="x":Oe+=pe[Fe];if(!Oe.match(g)){var Ce=ye.slice(0,B),Le=ye.slice(B+1),de=pe.match(_);de&&(Ce.push(de[1]),Le.unshift(de[2])),Le.length&&(K="/"+Le.join(".")+K),this.hostname=Ce.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),xe||(this.hostname=d.toASCII(this.hostname));var ue=this.port?":"+this.port:"",ke=this.hostname||"";this.host=ke+ue,this.href+=this.host,xe&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),K[0]!=="/"&&(K="/"+K))}if(!b[G])for(var B=0,Ae=t.length;B0)&&O.host.split("@");Oe&&(O.auth=Oe.shift(),O.host=O.hostname=Oe.shift())}return O.search=a.search,O.query=a.query,o.isNull(O.pathname)&&o.isNull(O.search)||(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.href=O.format(),O}if(!ye.length)return O.pathname=null,O.search?O.path="/"+O.search:O.path=null,O.href=O.format(),O;for(var Fe=ye.slice(-1)[0],Me=(O.host||a.host||ye.length>1)&&(Fe==="."||Fe==="..")||Fe==="",Ce=0,Le=ye.length;Le>=0;Le--)Fe=ye[Le],Fe==="."?ye.splice(Le,1):Fe===".."?(ye.splice(Le,1),Ce++):Ce&&(ye.splice(Le,1),Ce--);if(!oe&&!xe)for(;Ce--;Ce)ye.unshift("..");!oe||ye[0]===""||ye[0]&&ye[0].charAt(0)==="/"||ye.unshift(""),Me&&ye.join("/").substr(-1)!=="/"&&ye.push("");var de=ye[0]===""||ye[0]&&ye[0].charAt(0)==="/";if(pe){O.hostname=O.host=de?"":ye.length?ye.shift():"";var Oe=!!(O.host&&O.host.indexOf("@")>0)&&O.host.split("@");Oe&&(O.auth=Oe.shift(),O.host=O.hostname=Oe.shift())}return oe=oe||O.host&&ye.length,oe&&!de&&ye.unshift(""),ye.length?O.pathname=ye.join("/"):(O.pathname=null,O.path=null),o.isNull(O.pathname)&&o.isNull(O.search)||(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.auth=a.auth||O.auth,O.slashes=O.slashes||a.slashes,O.href=O.format(),O},C.prototype.parseHost=function(){var a=this.host,x=s.exec(a);x&&(x=x[0],x!==":"&&(this.port=x.substr(1)),a=a.substr(0,a.length-x.length)),a&&(this.hostname=a)}},{"./util":204,punycode:174,querystring:177}],204:[function(w,P,S){"use strict";P.exports={isString:function(C){return typeof C=="string"},isObject:function(C){return typeof C=="object"&&C!==null},isNull:function(C){return C===null},isNullOrUndefined:function(C){return C==null}}},{}],205:[function(w,P,S){(function(C){function T(p,h){function d(){if(!o){if(l("throwDeprecation"))throw new Error(h);l("traceDeprecation")?console.trace(h):console.warn(h),o=!0}return p.apply(this,arguments)}if(l("noDeprecation"))return p;var o=!1;return d}function l(p){try{if(!C.localStorage)return!1}catch(d){return!1}var h=C.localStorage[p];return h!=null&&String(h).toLowerCase()==="true"}P.exports=T}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],206:[function(w,P,S){P.exports=function(C){return C&&typeof C=="object"&&typeof C.copy=="function"&&typeof C.fill=="function"&&typeof C.readUInt8=="function"}},{}],207:[function(w,P,S){(function(C,T){function l(B,Q){var ie={seen:[],stylize:h};return arguments.length>=3&&(ie.depth=arguments[2]),arguments.length>=4&&(ie.colors=arguments[3]),u(Q)?ie.showHidden=Q:Q&&S._extend(ie,Q),m(ie.showHidden)&&(ie.showHidden=!1),m(ie.depth)&&(ie.depth=2),m(ie.colors)&&(ie.colors=!1),m(ie.customInspect)&&(ie.customInspect=!0),ie.colors&&(ie.stylize=p),o(ie,B,ie.depth)}function p(B,Q){var ie=l.styles[Q];return ie?"["+l.colors[ie][0]+"m"+B+"["+l.colors[ie][1]+"m":B}function h(B,Q){return B}function d(B){var Q={};return B.forEach(function(ie,oe){Q[ie]=!0}),Q}function o(B,Q,ie){if(B.customInspect&&Q&&A(Q.inspect)&&Q.inspect!==S.inspect&&(!Q.constructor||Q.constructor.prototype!==Q)){var oe=Q.inspect(ie,B);return b(oe)||(oe=o(B,oe,ie)),oe}var xe=c(B,Q);if(xe)return xe;var ye=Object.keys(Q),Ae=d(ye);if(B.showHidden&&(ye=Object.getOwnPropertyNames(Q)),O(Q)&&(ye.indexOf("message")>=0||ye.indexOf("description")>=0))return s(Q);if(ye.length===0){if(A(Q)){var pe=Q.name?": "+Q.name:"";return B.stylize("[Function"+pe+"]","special")}if(E(Q))return B.stylize(RegExp.prototype.toString.call(Q),"regexp");if(x(Q))return B.stylize(Date.prototype.toString.call(Q),"date");if(O(Q))return s(Q)}var Oe="",Fe=!1,Me=["{","}"];if((t(Q)&&(Fe=!0,Me=["[","]"]),A(Q))&&(Oe=" [Function"+(Q.name?": "+Q.name:"")+"]"),E(Q)&&(Oe=" "+RegExp.prototype.toString.call(Q)),x(Q)&&(Oe=" "+Date.prototype.toUTCString.call(Q)),O(Q)&&(Oe=" "+s(Q)),ye.length===0&&(!Fe||Q.length==0))return Me[0]+Oe+Me[1];if(ie<0)return E(Q)?B.stylize(RegExp.prototype.toString.call(Q),"regexp"):B.stylize("[Object]","special");B.seen.push(Q);var Ce;return Ce=Fe?f(B,Q,ie,Ae,ye):ye.map(function(Le){return i(B,Q,ie,Ae,Le,Fe)}),B.seen.pop(),n(Ce,Oe,Me)}function c(B,Q){if(m(Q))return B.stylize("undefined","undefined");if(b(Q)){var ie="'"+JSON.stringify(Q).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return B.stylize(ie,"string")}return _(Q)?B.stylize(""+Q,"number"):u(Q)?B.stylize(""+Q,"boolean"):y(Q)?B.stylize("null","null"):void 0}function s(B){return"["+Error.prototype.toString.call(B)+"]"}function f(B,Q,ie,oe,xe){for(var ye=[],Ae=0,pe=Q.length;Ae-1&&(pe=ye?pe.split(` `).map(function(Fe){return" "+Fe}).join(` `).substr(2):` `+pe.split(` `).map(function(Fe){return" "+Fe}).join(` `))):pe=B.stylize("[Circular]","special")),m(Ae)){if(ye&&xe.match(/^\d+$/))return pe;Ae=JSON.stringify(""+xe),Ae.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Ae=Ae.substr(1,Ae.length-2),Ae=B.stylize(Ae,"name")):(Ae=Ae.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Ae=B.stylize(Ae,"string"))}return Ae+": "+pe}function n(B,Q,ie){var oe=0;return B.reduce(function(xe,ye){return oe++,ye.indexOf(` `)>=0&&oe++,xe+ye.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?ie[0]+(Q===""?"":Q+` `)+" "+B.join(`, `)+" "+ie[1]:ie[0]+Q+" "+B.join(", ")+" "+ie[1]}function t(B){return Array.isArray(B)}function u(B){return typeof B=="boolean"}function y(B){return B===null}function g(B){return B==null}function _(B){return typeof B=="number"}function b(B){return typeof B=="string"}function v(B){return typeof B=="symbol"}function m(B){return B===void 0}function E(B){return a(B)&&I(B)==="[object RegExp]"}function a(B){return typeof B=="object"&&B!==null}function x(B){return a(B)&&I(B)==="[object Date]"}function O(B){return a(B)&&(I(B)==="[object Error]"||B instanceof Error)}function A(B){return typeof B=="function"}function D(B){return B===null||typeof B=="boolean"||typeof B=="number"||typeof B=="string"||typeof B=="symbol"||B===void 0}function I(B){return Object.prototype.toString.call(B)}function F(B){return B<10?"0"+B.toString(10):B.toString(10)}function K(){var B=new Date,Q=[F(B.getHours()),F(B.getMinutes()),F(B.getSeconds())].join(":");return[B.getDate(),J[B.getMonth()],Q].join(" ")}function ne(B,Q){return Object.prototype.hasOwnProperty.call(B,Q)}var j=/%[sdj%]/g;S.format=function(B){if(!b(B)){for(var Q=[],ie=0;ie=xe)return Oe;switch(Oe){case"%s":return String(oe[ie++]);case"%d":return Number(oe[ie++]);case"%j":try{return JSON.stringify(oe[ie++])}catch(Fe){return"[Circular]"}default:return Oe}}),Ae=oe[ie];ie=0||n.indexOf(">")>=0||n.indexOf("<")>=0)},f=function(n){return""},c=function(n){return n.replace("]]>","]]]]>")},S.Builder=function(){function n(t){var u,y,g;this.options={},y=o[.2];for(u in y)i.call(y,u)&&(g=y[u],this.options[u]=g);for(u in t)i.call(t,u)&&(g=t[u],this.options[u]=g)}return n.prototype.buildObject=function(t){var u,y,g,_,b;return u=this.options.attrkey,y=this.options.charkey,(0,h.default)(t).length===1&&this.options.rootName===o[.2].rootName?(b=(0,h.default)(t)[0],t=t[b]):b=this.options.rootName,g=function(v){return function(m,E){var a,x,O,A,D,I;if((E===void 0?"undefined":(0,l.default)(E))!=="object")v.options.cdata&&s(E)?m.raw(f(E)):m.txt(E);else if(Array.isArray(E)){for(A in E)if(i.call(E,A)){x=E[A];for(D in x)O=x[D],m=g(m.ele(D),O).up()}}else for(D in E)if(i.call(E,D))if(x=E[D],D===u){if((x===void 0?"undefined":(0,l.default)(x))==="object")for(a in x)I=x[a],m=m.att(a,I)}else if(D===y)m=v.options.cdata&&s(x)?m.raw(f(x)):m.txt(x);else if(Array.isArray(x))for(A in x)i.call(x,A)&&(O=x[A],m=typeof O=="string"?v.options.cdata&&s(O)?m.ele(D).raw(f(O)).up():m.ele(D,O).up():g(m.ele(D),O).up());else(x===void 0?"undefined":(0,l.default)(x))==="object"?m=g(m.ele(D),x).up():typeof x=="string"&&v.options.cdata&&s(x)?m=m.ele(D).raw(f(x)).up():(x==null&&(x=""),m=m.ele(D,x.toString()).up());return m}}(this),_=d.create(b,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),g(_,t).end(this.options.renderOpts)},n}()}).call(void 0)},{"./defaults":210,"babel-runtime/core-js/object/keys":23,"babel-runtime/helpers/typeof":32,xmlbuilder:235}],210:[function(w,P,S){"use strict";(function(){S.defaults={.1:{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},.2:{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:` `},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(void 0)},{}],211:[function(w,P,S){"use strict";function C(c){return c&&c.__esModule?c:{default:c}}var T=w("babel-runtime/core-js/object/get-own-property-names"),l=C(T),p=w("babel-runtime/core-js/object/keys"),h=C(p),d=w("babel-runtime/helpers/typeof"),o=C(d);(function(){var c,s,f,i,n,t,u,y,g=function(v,m){return function(){return v.apply(m,arguments)}},_=function(v,m){function E(){this.constructor=v}for(var a in m)b.call(m,a)&&(v[a]=m[a]);return E.prototype=m.prototype,v.prototype=new E,v.__super__=m.prototype,v},b={}.hasOwnProperty;u=w("sax"),f=w("events"),c=w("./bom"),t=w("./processors"),y=w("timers").setImmediate,s=w("./defaults").defaults,i=function(v){return(v===void 0?"undefined":(0,o.default)(v))==="object"&&v!=null&&(0,h.default)(v).length===0},n=function(v,m,E){var a,x,O;for(a=0,x=v.length;a0&&(K[A.options.childkey]=j),j=K;return O.length>0?A.assignOrPush(J,ne,j):(A.options.explicitRoot&&(X=j,j={},j[ne]=X),A.resultObject=j,A.saxParser.ended=!0,A.emit("end",A.resultObject))}}(this),x=function(A){return function(D){var I,F;if(F=O[O.length-1])return F[a]+=D,A.options.explicitChildren&&A.options.preserveChildrenOrder&&A.options.charsAsChildren&&(A.options.includeWhiteChars||D.replace(/\\n/g,"").trim()!=="")&&(F[A.options.childkey]=F[A.options.childkey]||[],I={"#name":"__text__"},I[a]=D,A.options.normalize&&(I[a]=I[a].replace(/\s{2,}/g," ").trim()),F[A.options.childkey].push(I)),F}}(this),this.saxParser.ontext=x,this.saxParser.oncdata=function(A){return function(D){var I;if(I=x(D))return I.cdata=!0}}()},m.prototype.parseString=function(E,a){var x;a!=null&&typeof a=="function"&&(this.on("end",function(O){return this.reset(),a(null,O)}),this.on("error",function(O){return this.reset(),a(O)}));try{return E=E.toString(),E.trim()===""?(this.emit("end",null),!0):(E=c.stripBOM(E),this.options.async?(this.remaining=E,y(this.processAsync),this.saxParser):this.saxParser.write(E).close())}catch(O){if(x=O,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",x),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw x}},m}(f.EventEmitter),S.parseString=function(v,m,E){var a,x,O;return E!=null?(typeof E=="function"&&(a=E),(m===void 0?"undefined":(0,o.default)(m))==="object"&&(x=m)):(typeof m=="function"&&(a=m),x={}),O=new S.Parser(x),O.parseString(v,a)}}).call(void 0)},{"./bom":208,"./defaults":210,"./processors":212,"babel-runtime/core-js/object/get-own-property-names":21,"babel-runtime/core-js/object/keys":23,"babel-runtime/helpers/typeof":32,events:158,sax:194,timers:201}],212:[function(w,P,S){"use strict";(function(){var C;C=new RegExp(/(?!xmlns)^.*:/),S.normalize=function(T){return T.toLowerCase()},S.firstCharLowerCase=function(T){return T.charAt(0).toLowerCase()+T.slice(1)},S.stripPrefix=function(T){return T.replace(C,"")},S.parseNumbers=function(T){return isNaN(T)||(T=T%1==0?parseInt(T,10):parseFloat(T)),T},S.parseBooleans=function(T){return/^(?:true|false)$/i.test(T)&&(T=T.toLowerCase()==="true"),T}}).call(void 0)},{}],213:[function(w,P,S){"use strict";(function(){var C,T,l,p,h=function(o,c){function s(){this.constructor=o}for(var f in c)d.call(c,f)&&(o[f]=c[f]);return s.prototype=c.prototype,o.prototype=new s,o.__super__=c.prototype,o},d={}.hasOwnProperty;T=w("./defaults"),C=w("./builder"),l=w("./parser"),p=w("./processors"),S.defaults=T.defaults,S.processors=p,S.ValidationError=function(o){function c(s){this.message=s}return h(c,o),c}(Error),S.Builder=C.Builder,S.Parser=l.Parser,S.parseString=l.parseString}).call(void 0)},{"./builder":209,"./defaults":210,"./parser":211,"./processors":212}],214:[function(w,P,S){"use strict";function C(c){return c&&c.__esModule?c:{default:c}}var T=w("babel-runtime/core-js/object/get-prototype-of"),l=C(T),p=w("babel-runtime/helpers/typeof"),h=C(p),d=w("babel-runtime/core-js/object/assign"),o=C(d);(function(){var c,s,f,i,n,t,u=[].slice,y={}.hasOwnProperty;c=function(){var g,_,b,v,m,E;if(E=arguments[0],m=2<=arguments.length?u.call(arguments,1):[],i(o.default))o.default.apply(null,arguments);else for(g=0,b=m.length;g=0;)this.up();return this.onEnd()},E.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},E.prototype.openNode=function(a){if(!a.isOpen)return!this.root&&this.currentLevel===0&&a instanceof f&&(this.root=a),this.onData(this.writer.openNode(a,this.currentLevel)),a.isOpen=!0},E.prototype.closeNode=function(a){if(!a.isClosed)return this.onData(this.writer.closeNode(a,this.currentLevel)),a.isClosed=!0},E.prototype.onData=function(a){return this.documentStarted=!0,this.onDataCallback(a)},E.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},E.prototype.ele=function(){return this.element.apply(this,arguments)},E.prototype.nod=function(a,x,O){return this.node(a,x,O)},E.prototype.txt=function(a){return this.text(a)},E.prototype.dat=function(a){return this.cdata(a)},E.prototype.com=function(a){return this.comment(a)},E.prototype.ins=function(a,x){return this.instruction(a,x)},E.prototype.dec=function(a,x,O){return this.declaration(a,x,O)},E.prototype.dtd=function(a,x,O){return this.doctype(a,x,O)},E.prototype.e=function(a,x,O){return this.element(a,x,O)},E.prototype.n=function(a,x,O){return this.node(a,x,O)},E.prototype.t=function(a){return this.text(a)},E.prototype.d=function(a){return this.cdata(a)},E.prototype.c=function(a){return this.comment(a)},E.prototype.r=function(a){return this.raw(a)},E.prototype.i=function(a,x){return this.instruction(a,x)},E.prototype.att=function(){return this.currentNode&&this.currentNode instanceof s?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},E.prototype.a=function(){return this.currentNode&&this.currentNode instanceof s?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},E.prototype.ent=function(a,x){return this.entity(a,x)},E.prototype.pent=function(a,x){return this.pEntity(a,x)},E.prototype.not=function(a,x){return this.notation(a,x)},E}()}).call(void 0)},{"./Utility":214,"./XMLAttribute":215,"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLStringWriter":231,"./XMLStringifier":232,"./XMLText":233}],226:[function(w,P,S){"use strict";var C=w("babel-runtime/core-js/object/create"),T=function(l){return l&&l.__esModule?l:{default:l}}(C);(function(){var l,p,h,d,o,c=function(f,i){function n(){this.constructor=f}for(var t in i)s.call(i,t)&&(f[t]=i[t]);return n.prototype=i.prototype,f.prototype=new n,f.__super__=i.prototype,f},s={}.hasOwnProperty;o=w("./Utility"),d=o.isObject,h=o.isFunction,p=w("./XMLNode"),l=w("./XMLAttribute"),P.exports=function(f){function i(n,t,u){if(i.__super__.constructor.call(this,n),t==null)throw new Error("Missing element name");this.name=this.stringify.eleName(t),this.attributes={},u!=null&&this.attribute(u),n.isDocument&&(this.isRoot=!0,this.documentObject=n,n.rootObject=this)}return c(i,f),i.prototype.clone=function(){var n,t,u,y;u=(0,T.default)(this),u.isRoot&&(u.documentObject=null),u.attributes={},y=this.attributes;for(t in y)s.call(y,t)&&(n=y[t],u.attributes[t]=n.clone());return u.children=[],this.children.forEach(function(g){var _;return _=g.clone(),_.parent=u,u.children.push(_)}),u},i.prototype.attribute=function(n,t){var u,y;if(n!=null&&(n=n.valueOf()),d(n))for(u in n)s.call(n,u)&&(y=n[u],this.attribute(u,y));else h(t)&&(t=t.apply()),this.options.skipNullAttributes&&t==null||(this.attributes[n]=new l(this,n,t));return this},i.prototype.removeAttribute=function(n){var t,u,y;if(n==null)throw new Error("Missing attribute name");if(n=n.valueOf(),Array.isArray(n))for(u=0,y=n.length;u"+this.endline(b))},_.prototype.comment=function(b,v){return this.stream.write(this.space(v)+""+this.endline(b))},_.prototype.declaration=function(b,v){return this.stream.write(this.space(v)),this.stream.write('"),this.stream.write(this.endline(b))},_.prototype.docType=function(b,v){var m,E,a,x;if(v||(v=0),this.stream.write(this.space(v)),this.stream.write("0){for(this.stream.write(" ["),this.stream.write(this.endline(b)),x=b.children,E=0,a=x.length;E"),this.stream.write(this.endline(b))},_.prototype.element=function(b,v){var m,E,a,x,O,A,D,I;v||(v=0),I=this.space(v),this.stream.write(I+"<"+b.name),A=b.attributes;for(O in A)y.call(A,O)&&(m=A[O],this.attribute(m));if(b.children.length===0||b.children.every(function(F){return F.value===""}))this.allowEmpty?this.stream.write(">"):this.stream.write(this.spacebeforeslash+"/>");else if(this.pretty&&b.children.length===1&&b.children[0].value!=null)this.stream.write(">"),this.stream.write(b.children[0].value),this.stream.write("");else{for(this.stream.write(">"+this.newline),D=b.children,a=0,x=D.length;a")}return this.stream.write(this.endline(b))},_.prototype.processingInstruction=function(b,v){return this.stream.write(this.space(v)+""+this.endline(b))},_.prototype.raw=function(b,v){return this.stream.write(this.space(v)+b.value+this.endline(b))},_.prototype.text=function(b,v){return this.stream.write(this.space(v)+b.value+this.endline(b))},_.prototype.dtdAttList=function(b,v){return this.stream.write(this.space(v)+""+this.endline(b))},_.prototype.dtdElement=function(b,v){return this.stream.write(this.space(v)+""+this.endline(b))},_.prototype.dtdEntity=function(b,v){return this.stream.write(this.space(v)+""+this.endline(b))},_.prototype.dtdNotation=function(b,v){return this.stream.write(this.space(v)+""+this.endline(b))},_.prototype.endline=function(b){return b.isLastRootNode?"":this.newline},_}(t)}).call(void 0)},{"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233,"./XMLWriterBase":234}],231:[function(w,P,S){"use strict";(function(){var C,T,l,p,h,d,o,c,s,f,i,n,t,u=function(g,_){function b(){this.constructor=g}for(var v in _)y.call(_,v)&&(g[v]=_[v]);return b.prototype=_.prototype,g.prototype=new b,g.__super__=_.prototype,g},y={}.hasOwnProperty;o=w("./XMLDeclaration"),c=w("./XMLDocType"),C=w("./XMLCData"),T=w("./XMLComment"),s=w("./XMLElement"),i=w("./XMLRaw"),n=w("./XMLText"),f=w("./XMLProcessingInstruction"),l=w("./XMLDTDAttList"),p=w("./XMLDTDElement"),h=w("./XMLDTDEntity"),d=w("./XMLDTDNotation"),t=w("./XMLWriterBase"),P.exports=function(g){function _(b){_.__super__.constructor.call(this,b)}return u(_,g),_.prototype.document=function(b){var v,m,E,a,x;for(this.textispresent=!1,a="",x=b.children,m=0,E=x.length;m"+this.newline},_.prototype.comment=function(b,v){return this.space(v)+""+this.newline},_.prototype.declaration=function(b,v){var m;return m=this.space(v),m+='",m+=this.newline},_.prototype.docType=function(b,v){var m,E,a,x,O;if(v||(v=0),x=this.space(v),x+="0){for(x+=" [",x+=this.newline,O=b.children,E=0,a=O.length;E",x+=this.newline},_.prototype.element=function(b,v){var m,E,a,x,O,A,D,I,F,K,ne,j,G;v||(v=0),G=!1,this.textispresent?(this.newline="",this.pretty=!1):(this.newline=this.newlinedefault,this.pretty=this.prettydefault),j=this.space(v),I="",I+=j+"<"+b.name,F=b.attributes;for(D in F)y.call(F,D)&&(m=F[D],I+=this.attribute(m));if(b.children.length===0||b.children.every(function(X){return X.value===""}))this.allowEmpty?I+=">"+this.newline:I+=this.spacebeforeslash+"/>"+this.newline;else if(this.pretty&&b.children.length===1&&b.children[0].value!=null)I+=">",I+=b.children[0].value,I+=""+this.newline;else{if(this.dontprettytextnodes){for(K=b.children,a=0,O=K.length;a"+this.newline,ne=b.children,x=0,A=ne.length;x"+this.newline}return I},_.prototype.processingInstruction=function(b,v){var m;return m=this.space(v)+""+this.newline},_.prototype.raw=function(b,v){return this.space(v)+b.value+this.newline},_.prototype.text=function(b,v){return this.space(v)+b.value+this.newline},_.prototype.dtdAttList=function(b,v){var m;return m=this.space(v)+""+this.newline},_.prototype.dtdElement=function(b,v){return this.space(v)+""+this.newline},_.prototype.dtdEntity=function(b,v){var m;return m=this.space(v)+""+this.newline},_.prototype.dtdNotation=function(b,v){var m;return m=this.space(v)+""+this.newline},_.prototype.openNode=function(b,v){var m,E,a,x;if(v||(v=0),b instanceof s){a=this.space(v)+"<"+b.name,x=b.attributes;for(E in x)y.call(x,E)&&(m=x[E],a+=this.attribute(m));return a+=(b.children?">":"/>")+this.newline}return a=this.space(v)+"")+this.newline},_.prototype.closeNode=function(b,v){switch(v||(v=0),!1){case!(b instanceof s):return this.space(v)+""+this.newline;case!(b instanceof c):return this.space(v)+"]>"+this.newline}},_}(t)}).call(void 0)},{"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233,"./XMLWriterBase":234}],232:[function(w,P,S){"use strict";(function(){var C=function(l,p){return function(){return l.apply(p,arguments)}},T={}.hasOwnProperty;P.exports=function(){function l(p){this.assertLegalChar=C(this.assertLegalChar,this);var h,d,o;p||(p={}),this.noDoubleEncoding=p.noDoubleEncoding,d=p.stringify||{};for(h in d)T.call(d,h)&&(o=d[h],this[h]=o)}return l.prototype.eleName=function(p){return p=""+p||"",this.assertLegalChar(p)},l.prototype.eleText=function(p){return p=""+p||"",this.assertLegalChar(this.elEscape(p))},l.prototype.cdata=function(p){return p=""+p||"",p=p.replace("]]>","]]]]>"),this.assertLegalChar(p)},l.prototype.comment=function(p){if(p=""+p||"",p.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+p);return this.assertLegalChar(p)},l.prototype.raw=function(p){return""+p||""},l.prototype.attName=function(p){return p=""+p||""},l.prototype.attValue=function(p){return p=""+p||"",this.attEscape(p)},l.prototype.insTarget=function(p){return""+p||""},l.prototype.insValue=function(p){if(p=""+p||"",p.match(/\?>/))throw new Error("Invalid processing instruction value: "+p);return p},l.prototype.xmlVersion=function(p){if(p=""+p||"",!p.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+p);return p},l.prototype.xmlEncoding=function(p){if(p=""+p||"",!p.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+p);return p},l.prototype.xmlStandalone=function(p){return p?"yes":"no"},l.prototype.dtdPubID=function(p){return""+p||""},l.prototype.dtdSysID=function(p){return""+p||""},l.prototype.dtdElementValue=function(p){return""+p||""},l.prototype.dtdAttType=function(p){return""+p||""},l.prototype.dtdAttDefault=function(p){return p!=null?""+p||"":p},l.prototype.dtdEntityValue=function(p){return""+p||""},l.prototype.dtdNData=function(p){return""+p||""},l.prototype.convertAttKey="@",l.prototype.convertPIKey="?",l.prototype.convertTextKey="#text",l.prototype.convertCDataKey="#cdata",l.prototype.convertCommentKey="#comment",l.prototype.convertRawKey="#raw",l.prototype.assertLegalChar=function(p){var h;if(h=p.match(/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/))throw new Error("Invalid character in string: "+p+" at index "+h.index);return p},l.prototype.elEscape=function(p){var h;return h=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,p.replace(h,"&").replace(//g,">").replace(/\r/g," ")},l.prototype.attEscape=function(p){var h;return h=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,p.replace(h,"&").replace(/0?new Array(p).join(this.indent):""):""},T}()}).call(void 0)},{}],235:[function(w,P,S){"use strict";(function(){var C,T,l,p,h,d,o;o=w("./Utility"),h=o.assign,d=o.isFunction,C=w("./XMLDocument"),T=w("./XMLDocumentCB"),p=w("./XMLStringWriter"),l=w("./XMLStreamWriter"),P.exports.create=function(c,s,f,i){var n,t;if(c==null)throw new Error("Root element needs a name");return i=h({},s,f,i),n=new C(i),t=n.element(c),i.headless||(n.declaration(i),i.pubID==null&&i.sysID==null||n.doctype(i)),t},P.exports.begin=function(c,s,f){var i;return d(c)&&(i=[c,s],s=i[0],f=i[1],c={}),s?new T(c,s,f):new C(c)},P.exports.stringWriter=function(c){return new p(c)},P.exports.streamWriter=function(c,s){return new l(c,s)}}).call(void 0)},{"./Utility":214,"./XMLDocument":224,"./XMLDocumentCB":225,"./XMLStreamWriter":230,"./XMLStringWriter":231}],236:[function(w,P,S){function C(){for(var l={},p=0;ps?n=i(n):n.length>5]|=128<>>9<<4)]=i;for(var n=1732584193,t=-271733879,u=-1732584194,y=271733878,g=0;g>16)+(i>>16)+(n>>16)<<16|65535&n}function c(f,i){return f<>>32-i}var s=w("./helpers");P.exports=function(f){return s.hash(f,C,16)}},{"./helpers":238}],240:[function(w,P,S){"use strict";function C(o,c){o[c>>5]|=128<<24-c%32,o[15+(c+64>>9<<4)]=c;for(var s=Array(80),f=1732584193,i=-271733879,n=-1732584194,t=271733878,u=-1009589776,y=0;y>16)+(c>>16)+(s>>16)<<16|65535&s}function h(o,c){return o<>>32-c}var d=w("./helpers");P.exports=function(o){return d.hash(o,C,20,!0)}},{"./helpers":238}],241:[function(w,P,S){"use strict";var C=w("./helpers"),T=function(n,t){var u=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(u>>16)<<16|65535&u},l=function(n,t){return n>>>t|n<<32-t},p=function(n,t){return n>>>t},h=function(n,t,u){return n&t^~n&u},d=function(n,t,u){return n&t^n&u^t&u},o=function(n){return l(n,2)^l(n,13)^l(n,22)},c=function(n){return l(n,6)^l(n,11)^l(n,25)},s=function(n){return l(n,7)^l(n,18)^p(n,3)},f=function(n){return l(n,17)^l(n,19)^p(n,10)},i=function(n,t){var u,y,g,_,b,v,m,E,a,x,O,A,D=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),I=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),F=new Array(64);n[t>>5]|=128<<24-t%32,n[15+(t+64>>9<<4)]=t;for(var a=0;a=0)return y("Request#%d %s: got digest auth header WWW-Authenticate: %s",X,E,ve),a.headers=a.headers||{},a.headers.Authorization=digestAuthHeader(pe.method,pe.path,ve,a.digestAuth),y("Request#%d %s: auth with digest header: %s",X,E,a.headers.Authorization),De.headers["set-cookie"]&&(a.headers.Cookie=De.headers["set-cookie"].join(";")),S.requestWithCallback(E,a,_e)}var Ee=Date.now()-Q;Pe&&(Pe.contentDownload=Ee),y("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Ee,V,Y,pe.method,pe.host,pe.path,$,Pe);var be={status:Y,statusCode:Y,headers:he,size:V,aborted:me,rt:Ee,keepAliveSocket:$,data:Ne,requestUrls:a.requestUrls,timing:Pe,remoteAddress:Re,remotePort:rt};if(Ke){var Ge="";ye&&typeof ye.getCurrentStatus=="function"&&(Ge=", agent status: "+(0,c.default)(ye.getCurrentStatus())),Ke.message+=", "+pe.method+" "+E+" "+Y+" (connected: "+N+", keepalive socket: "+$+Ge+`) headers: `+(0,c.default)(he),Ke.data=Ne,Ke.path=pe.path,Ke.status=Y,Ke.headers=he,Ke.res=be}_e(Ke,Ne,a.streaming?De:be),a.emitter&&(J.url=E,J.socket=Ve&&Ve.connection,J.options=pe,J.size=ke,a.emitter.emit("response",{requestId:X,error:Ke,ctx:a.ctx,req:J,res:be}))}function I(Ke){var Ne=null;if(a.followRedirect&&statuses.redirect[Ke.statusCode]){a._followRedirectCount=(a._followRedirectCount||0)+1;var De=Ke.headers.location;if(De){if(!(a._followRedirectCount>a.maxRedirects)){var _e=a.formatRedirectUrl?a.formatRedirectUrl(E,De):n.resolve(E,De);y("Request#%d %s: `redirected` from %s to %s",X,pe.path,E,_e),A(),a.headers&&a.headers.Host&&v.test(De)&&(a.headers.Host=null);var he=x;return x=null,S.requestWithCallback(_e,a,he),{redirect:!0,error:null}}Ne=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+E),Ne.name="MaxRedirectError"}else Ne=new Error("Got statusCode "+Ke.statusCode+" but cannot resolve next location from headers"),Ne.name="FollowRedirectError"}return{redirect:!1,error:Ne}}function F(Ke,Ne,De){return De(null,Ne,Ke.headers["content-encoding"])}function K(Ke){if(Pe&&(Pe.waiting=Date.now()-Q),y("Request#%d %s `req response` event emit: status %d, headers: %j",X,E,Ke.statusCode,Ke.headers),a.streaming){var Ne=I(Ke);return Ne.redirect?void Ke.resume():Ne.error?(Ke.resume(),D(Ne.error,null,Ke)):D(null,null,Ke)}if(Ke.on("close",function(){y("Request#%d %s: `res close` event emit, total size %d",X,E,V)}),Ke.on("error",function(){y("Request#%d %s: `res error` event emit, total size %d",X,E,V)}),Ke.on("aborted",function(){me=!0,y("Request#%d %s: `res aborted` event emit, total size %d",X,E,V)}),Ie){var Ne=I(Ke);return Ne.redirect?void Ke.resume():Ne.error?(Ke.resume(),Ie.end(),D(Ne.error,null,Ke)):(a.consumeWriteStream===!1?Ke.on("end",D.bind(null,null,null,Ke)):isNode010||isNode012?first([[Ie,"close"],[Ke,"aborted"]],function(he,ve,Ee){y("Request#%d %s: writeStream or res %s event emitted",X,E,Ee),D(M||null,null,Ke)}):Ie.on("close",function(){y("Request#%d %s: writeStream close event emitted",X,E),D(M||null,null,Ke)}),Ke.pipe(Ie))}var De=[];Ke.on("data",function(_e){y("Request#%d %s: `res data` event emit, size %d",X,E,_e.length),V+=_e.length,De.push(_e)}),Ke.on("end",function(){var _e=T.concat(De,V);if(y("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",X,E,V,Ke._dumped),M)return D(M,_e,Ke);var he=I(Ke);if(he.error)return D(he.error,_e,Ke);he.redirect||F(Ke,_e,function(ve,Ee,be){if(ve)return D(ve,_e,Ke);if(!be&&m.indexOf(a.dataType)>=0){try{Ee=decodeBodyByCharset(Ee,Ke)}catch(qe){return y("decodeBodyByCharset error: %s",qe),D(null,Ee,Ke)}if(a.dataType==="json")if(V===0)Ee=null;else{var Ge=parseJSON(Ee,Ae);Ge.error?ve=Ge.error:Ee=Ge.data}}me&&y("Request#%d %s: Remote socket was terminated before `response.end()` was called",X,E),D(ve,Ee,Ke)})})}function ne(){y("Response timer ticking, timeout: %d",tt),ee=setTimeout(function(){ee=null;var Ke="Response timeout for "+tt+"ms";M=new Error(Ke),M.name="ResponseTimeoutError",M.requestId=X,y("ResponseTimeout: Request#%d %s %s: %s, connected: %s",X,E,M.name,Ke,N),j()},tt)}function j(){y("Request#%d %s abort, connected: %s",X,E,N),Ve.socket||(M.noSocket=!0,D(M)),Ve.abort()}if(!E||typeof E!="string"&&(E===void 0?"undefined":(0,f.default)(E))!=="object"){var G=i.format("expect request url to be a string or a http request options, but got %j",E);throw new Error(G)}arguments.length===2&&typeof a=="function"&&(x=a,a=null),a=a||{},_>=b&&(_=0);var X=++_;a.requestUrls=a.requestUrls||[];var J={requestId:X,url:E,args:a,ctx:a.ctx};a.emitter&&a.emitter.emit("request",J),a.timeout=a.timeout||S.TIMEOUTS,a.maxRedirects=a.maxRedirects||10,a.streaming=a.streaming||a.customResponse;var B,Q=Date.now();typeof E=="string"?(v.test(E)||(E="http://"+E),B=n.parse(E)):B=E;var ie=(a.type||a.method||B.method||"GET").toUpperCase(),oe=B.port||80,xe=t,ye=p(a.agent,S.agent),Ae=a.fixJSONCtlChars;B.protocol==="https:"&&(xe=u,ye=p(a.httpsAgent,S.httpsAgent),B.port||(oe=443));var pe={host:B.hostname||B.host||"localhost",path:B.path||"/",method:ie,port:oe,agent:ye,headers:a.headers||{},lookup:a.lookup};Array.isArray(a.timeout)?pe.requestTimeout=a.timeout[a.timeout.length-1]:a.timeout!==void 0&&(pe.requestTimeout=a.timeout);for(var Oe=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],Fe=0;Fe>>2]>>>24-v%4*8&255;y[_+v>>>2]|=m<<24-(_+v)%4*8}else for(var v=0;v>>2]=g[v>>>2];return this.sigBytes+=b,this},clamp:function(){var u=this.words,y=this.sigBytes;u[y>>>2]&=4294967295<<32-y%4*8,u.length=C.ceil(y/4)},clone:function(){var u=d.clone.call(this);return u.words=this.words.slice(0),u},random:function(u){for(var y,g=[],_=0;_>16)&E,v=18e3*(65535&v)+(v>>16)&E;var a=(m<<16)+v&E;return a/=4294967296,(a+=.5)*(C.random()>.5?1:-1)}}(4294967296*(y||C.random()));y=987654071*b(),g.push(4294967296*b()|0)}return new o.init(g,u)}}),c=p.enc={},s=c.Hex={stringify:function(u){for(var y=u.words,g=u.sigBytes,_=[],b=0;b>>2]>>>24-b%4*8&255;_.push((v>>>4).toString(16)),_.push((15&v).toString(16))}return _.join("")},parse:function(u){for(var y=u.length,g=[],_=0;_>>3]|=parseInt(u.substr(_,2),16)<<24-_%8*4;return new o.init(g,y/2)}},f=c.Latin1={stringify:function(u){for(var y=u.words,g=u.sigBytes,_=[],b=0;b>>2]>>>24-b%4*8&255;_.push(String.fromCharCode(v))}return _.join("")},parse:function(u){for(var y=u.length,g=[],_=0;_>>2]|=(255&u.charCodeAt(_))<<24-_%4*8;return new o.init(g,y)}},i=c.Utf8={stringify:function(u){try{return decodeURIComponent(escape(f.stringify(u)))}catch(y){throw new Error("Malformed UTF-8 data")}},parse:function(u){return f.parse(unescape(encodeURIComponent(u)))}},n=h.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(u){typeof u=="string"&&(u=i.parse(u)),this._data.concat(u),this._nDataBytes+=u.sigBytes},_process:function(u){var y=this._data,g=y.words,_=y.sigBytes,b=this.blockSize,v=4*b,m=_/v;m=u?C.ceil(m):C.max((0|m)-this._minBufferSize,0);var E=m*b,a=C.min(4*E,_);if(E){for(var x=0;x",d[0];)p++;return p>4&&p}},{key:"extend",value:function(p,h){for(var d in h)Object.prototype.hasOwnProperty.call(h,d)&&h[d]&&(p[d]=h[d])}},{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 h(d){return d<10?"0"+d:d}return p.getUTCFullYear()+"-"+h(p.getUTCMonth()+1)+"-"+h(p.getUTCDate())+"T"+h(p.getUTCHours())+":"+h(p.getUTCMinutes())+":"+h(p.getUTCSeconds())+"Z"}},{key:"isIntNum",value:function(p){return!!/^\d+$/.test(p)}}]),l}();w.default=T},function(U,w,P){!function(S,C){U.exports=w=C(P(0))}(0,function(S){return function(C){function T(t,u,y,g,_,b,v){var m=t+(u&y|~u&g)+_+v;return(m<>>32-b)+u}function l(t,u,y,g,_,b,v){var m=t+(u&g|y&~g)+_+v;return(m<>>32-b)+u}function p(t,u,y,g,_,b,v){var m=t+(u^y^g)+_+v;return(m<>>32-b)+u}function h(t,u,y,g,_,b,v){var m=t+(y^(u|~g))+_+v;return(m<>>32-b)+u}var d=S,o=d.lib,c=o.WordArray,s=o.Hasher,f=d.algo,i=[];!function(){for(var t=0;t<64;t++)i[t]=4294967296*C.abs(C.sin(t+1))|0}();var n=f.MD5=s.extend({_doReset:function(){this._hash=new c.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,u){for(var y=0;y<16;y++){var g=u+y,_=t[g];t[g]=16711935&(_<<8|_>>>24)|4278255360&(_<<24|_>>>8)}var b=this._hash.words,v=t[u+0],m=t[u+1],E=t[u+2],a=t[u+3],x=t[u+4],O=t[u+5],A=t[u+6],D=t[u+7],I=t[u+8],F=t[u+9],K=t[u+10],ne=t[u+11],j=t[u+12],G=t[u+13],X=t[u+14],J=t[u+15],B=b[0],Q=b[1],ie=b[2],oe=b[3];B=T(B,Q,ie,oe,v,7,i[0]),oe=T(oe,B,Q,ie,m,12,i[1]),ie=T(ie,oe,B,Q,E,17,i[2]),Q=T(Q,ie,oe,B,a,22,i[3]),B=T(B,Q,ie,oe,x,7,i[4]),oe=T(oe,B,Q,ie,O,12,i[5]),ie=T(ie,oe,B,Q,A,17,i[6]),Q=T(Q,ie,oe,B,D,22,i[7]),B=T(B,Q,ie,oe,I,7,i[8]),oe=T(oe,B,Q,ie,F,12,i[9]),ie=T(ie,oe,B,Q,K,17,i[10]),Q=T(Q,ie,oe,B,ne,22,i[11]),B=T(B,Q,ie,oe,j,7,i[12]),oe=T(oe,B,Q,ie,G,12,i[13]),ie=T(ie,oe,B,Q,X,17,i[14]),Q=T(Q,ie,oe,B,J,22,i[15]),B=l(B,Q,ie,oe,m,5,i[16]),oe=l(oe,B,Q,ie,A,9,i[17]),ie=l(ie,oe,B,Q,ne,14,i[18]),Q=l(Q,ie,oe,B,v,20,i[19]),B=l(B,Q,ie,oe,O,5,i[20]),oe=l(oe,B,Q,ie,K,9,i[21]),ie=l(ie,oe,B,Q,J,14,i[22]),Q=l(Q,ie,oe,B,x,20,i[23]),B=l(B,Q,ie,oe,F,5,i[24]),oe=l(oe,B,Q,ie,X,9,i[25]),ie=l(ie,oe,B,Q,a,14,i[26]),Q=l(Q,ie,oe,B,I,20,i[27]),B=l(B,Q,ie,oe,G,5,i[28]),oe=l(oe,B,Q,ie,E,9,i[29]),ie=l(ie,oe,B,Q,D,14,i[30]),Q=l(Q,ie,oe,B,j,20,i[31]),B=p(B,Q,ie,oe,O,4,i[32]),oe=p(oe,B,Q,ie,I,11,i[33]),ie=p(ie,oe,B,Q,ne,16,i[34]),Q=p(Q,ie,oe,B,X,23,i[35]),B=p(B,Q,ie,oe,m,4,i[36]),oe=p(oe,B,Q,ie,x,11,i[37]),ie=p(ie,oe,B,Q,D,16,i[38]),Q=p(Q,ie,oe,B,K,23,i[39]),B=p(B,Q,ie,oe,G,4,i[40]),oe=p(oe,B,Q,ie,v,11,i[41]),ie=p(ie,oe,B,Q,a,16,i[42]),Q=p(Q,ie,oe,B,A,23,i[43]),B=p(B,Q,ie,oe,F,4,i[44]),oe=p(oe,B,Q,ie,j,11,i[45]),ie=p(ie,oe,B,Q,J,16,i[46]),Q=p(Q,ie,oe,B,E,23,i[47]),B=h(B,Q,ie,oe,v,6,i[48]),oe=h(oe,B,Q,ie,D,10,i[49]),ie=h(ie,oe,B,Q,X,15,i[50]),Q=h(Q,ie,oe,B,O,21,i[51]),B=h(B,Q,ie,oe,j,6,i[52]),oe=h(oe,B,Q,ie,a,10,i[53]),ie=h(ie,oe,B,Q,K,15,i[54]),Q=h(Q,ie,oe,B,m,21,i[55]),B=h(B,Q,ie,oe,I,6,i[56]),oe=h(oe,B,Q,ie,J,10,i[57]),ie=h(ie,oe,B,Q,A,15,i[58]),Q=h(Q,ie,oe,B,G,21,i[59]),B=h(B,Q,ie,oe,x,6,i[60]),oe=h(oe,B,Q,ie,ne,10,i[61]),ie=h(ie,oe,B,Q,E,15,i[62]),Q=h(Q,ie,oe,B,F,21,i[63]),b[0]=b[0]+B|0,b[1]=b[1]+Q|0,b[2]=b[2]+ie|0,b[3]=b[3]+oe|0},_doFinalize:function(){var t=this._data,u=t.words,y=8*this._nDataBytes,g=8*t.sigBytes;u[g>>>5]|=128<<24-g%32;var _=C.floor(y/4294967296),b=y;u[15+(g+64>>>9<<4)]=16711935&(_<<8|_>>>24)|4278255360&(_<<24|_>>>8),u[14+(g+64>>>9<<4)]=16711935&(b<<8|b>>>24)|4278255360&(b<<24|b>>>8),t.sigBytes=4*(u.length+1),this._process();for(var v=this._hash,m=v.words,E=0;E<4;E++){var a=m[E];m[E]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}return v},clone:function(){var t=s.clone.call(this);return t._hash=this._hash.clone(),t}});d.MD5=s._createHelper(n),d.HmacMD5=s._createHmacHelper(n)}(Math),S.MD5})},function(U,w,P){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.UPLOADSTATE={INIT:"init",UPLOADING:"uploading",COMPLETE:"complete",INTERRUPT:"interrupt"},w.UPLOADSTEP={INIT:"init",PART:"part",COMPLETE:"complete"},w.UPLOADDEFAULT={PARALLEL:5,PARTSIZE:1048576}},function(U,w,P){"use strict";function S(n){return n&&n.__esModule?n:{default:n}}function C(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var T=function(){function n(t,u){for(var y=0;y-1)return"Baiduspider";if(c.indexOf("PlayStation")>-1)return"PS4";var f=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"&&!f&&!i&&(s="Unix"),String(navigator.platform).indexOf("Linux")>-1&&(s="Linux"),f?"windows":s},l=function(){var o=navigator.userAgent,c="";return(o.indexOf("Windows NT 5.0")>-1||o.indexOf("Windows 2000")>-1)&&(c="2000"),(o.indexOf("Windows NT 5.1")>-1||o.indexOf("Windows XP")>-1)&&(c="XP"),(o.indexOf("Windows NT 5.2")>-1||o.indexOf("Windows 2003")>-1)&&(c="2003"),(o.indexOf("Windows NT 6.0")>-1||o.indexOf("Windows Vista")>-1)&&(c="Vista"),(o.indexOf("Windows NT 6.1")>-1||o.indexOf("Windows 7")>-1)&&(c="7"),(o.indexOf("Windows NT 6.2")>-1||o.indexOf("Windows 8")>-1)&&(c="8"),(o.indexOf("Windows NT 6.3")>-1||o.indexOf("Windows 8.1")>-1)&&(c="8.1"),(o.indexOf("Windows NT 10")>-1||o.indexOf("Windows 10")>-1)&&(c="10"),c},p=function(o){var c=navigator.userAgent.toLowerCase();return o.chrome?"Chrome":o.firefox?"Firefox":o.safari?"Safari":o.webview?"webview":o.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},h=function(){var o={},c={},s=navigator.userAgent,f=navigator.platform,i=s.match(/Web[kK]it[\/]{0,1}([\d.]+)/),n=s.match(/(Android);?[\s\/]+([\d.]+)?/),t=!!s.match(/\(Macintosh\; Intel /),u=s.match(/(iPad).*OS\s([\d_]+)/),y=s.match(/(iPod)(.*OS\s([\d_]+))?/),g=!u&&s.match(/(iPhone\sOS)\s([\d_]+)/),_=s.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),b=/Win\d{2}|Windows/.test(f),v=s.match(/Windows Phone ([\d.]+)/),m=_&&s.match(/TouchPad/),E=s.match(/Kindle\/([\d.]+)/),a=s.match(/Silk\/([\d._]+)/),x=s.match(/(BlackBerry).*Version\/([\d.]+)/),O=s.match(/(BB10).*Version\/([\d.]+)/),A=s.match(/(RIM\sTablet\sOS)\s([\d.]+)/),D=s.match(/PlayBook/),I=s.match(/Chrome\/([\d.]+)/)||s.match(/CriOS\/([\d.]+)/),F=s.match(/Firefox\/([\d.]+)/),K=s.match(/\((?:Mobile|Tablet); rv:([\d.]+)\).*Firefox\/[\d.]+/),ne=s.match(/MSIE\s([\d.]+)/)||s.match(/Trident\/[\d](?=[^\?]+).*rv:([0-9.].)/),j=!I&&s.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/),G=j||s.match(/Version\/([\d.]+)([^S](Safari)|[^M]*(Mobile)[^S]*(Safari))/);if((c.webkit=!!i)&&(c.version=i[1]),n&&(o.android=!0,o.version=n[2]),g&&!y&&(o.ios=o.iphone=!0,o.version=g[2].replace(/_/g,".")),u&&(o.ios=o.ipad=!0,o.version=u[2].replace(/_/g,".")),y&&(o.ios=o.ipod=!0,o.version=y[3]?y[3].replace(/_/g,"."):null),v&&(o.wp=!0,o.version=v[1]),_&&(o.webos=!0,o.version=_[2]),m&&(o.touchpad=!0),x&&(o.blackberry=!0,o.version=x[2]),O&&(o.bb10=!0,o.version=O[2]),A&&(o.rimtabletos=!0,o.version=A[2]),D&&(c.playbook=!0),E&&(o.kindle=!0,o.version=E[1]),a&&(c.silk=!0,c.version=a[1]),!a&&o.android&&s.match(/Kindle Fire/)&&(c.silk=!0),I&&(c.chrome=!0,c.version=I[1]),F&&(c.firefox=!0,c.version=F[1]),K&&(o.firefoxos=!0,o.version=K[1]),ne&&(c.ie=!0,c.version=ne[1]),G&&(t||o.ios||b||n)&&(c.safari=!0,o.ios||(c.version=G[1])),j&&(c.webview=!0),t){var X=s.match(/[\d]*_[\d]*_[\d]*/);X&&X.length>0&&X[0]&&(o.version=X[0].replace(/_/g,"."))}return o.tablet=!!(u||D||n&&!s.match(/Mobile/)||F&&s.match(/Tablet/)||ne&&!s.match(/Phone/)&&s.match(/Touch/)),o.phone=!(o.tablet||o.ipod||!(n||g||_||x||O||I&&s.match(/Android/)||I&&s.match(/CriOS\/([\d.]+)/)||F&&s.match(/Mobile/)||ne&&s.match(/Touch/))),o.pc=!o.tablet&&!o.phone,t?o.name="macOS":b?(o.name="windows",o.version=l()):o.name=T(o),c.name=p(c),{os:o,browser:c}}(),d=function(){function o(){S(this,o)}return C(o,null,[{key:"getHost",value:function(c){var s="";if(c===void 0||c==null||c=="")return"";var f=c.indexOf("//"),i=c;f>-1&&(i=c.substring(f+2));var s=i,n=i.split("/");return n&&n.length>0&&(s=n[0]),n=s.split(":"),n&&n.length>0&&(s=n[0]),s}},{key:"os",get:function(){return h.os}},{key:"browser",get:function(){var c=h.browser;return c.name||(c.name=p()),c}}]),o}();w.default=d},function(U,w,P){"use strict";function S(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var C=function(){function l(p,h){for(var d=0;d0){X._invalidUserId=!0;var ie=Q.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(ie)}}catch(oe){console.log(oe)}})})}K&&(G.videoInfo=K?JSON.parse(K).Vod:{},G.userData=c.default.encode(K)),G.ri=g.default.create(),this._uploadList.push(G),this._reportLog("20001",G,{ql:this._uploadList.length});try{this.options.addFileSuccess&&this.options.addFileSuccess(G)}catch(J){console.log(J)}return!0}},{key:"deleteFile",value:function(A){return!!this.cancelFile(A)&&(this._uploadList.splice(A,1),!0)}},{key:"cleanList",value:function(){this.stopUpload(),this._uploadList.length=0,this._curIndex=-1}},{key:"cancelFile",value:function(A){if(this.options,A<0||A>=this._uploadList.length)return!1;var D=this._uploadList[A];if(A==this._curIndex&&D.state==l.UPLOADSTATE.UPLOADING){D.state=l.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!=l.UPLOADSTATE.SUCCESS&&(D.state=l.UPLOADSTATE.CANCELED);return this._reportLog("20008",D),!0}},{key:"resumeFile",value:function(A){if(this.options,A<0||A>=this._uploadList.length)return!1;var D=this._uploadList[A];return D.state==l.UPLOADSTATE.CANCELED&&(D.state=l.UPLOADSTATE.INIT,!0)}},{key:"listFiles",value:function(){return this._uploadList}},{key:"getCheckpoint",value:function(A){return this._getCheckoutpoint({file:A})}},{key:"startUpload",value:function(A){if(this._retryCount=0,this.options,this._state==l.VODSTATE.START||this._state==l.VODSTATE.EXPIRE)return void console.log("already started or expired");if(this._initState(),this._curIndex=this._findUploadIndex(),this._curIndex==-1)return void(this._state=l.VODSTATE.END);var D=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(D),this._state=l.VODSTATE.START}},{key:"nextUpload",value:function(){var A=this.options;if(this._state==l.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=l.VODSTATE.END;try{A.onUploadEnd&&A.onUploadEnd(D)}catch(I){console.log(I)}}}},{key:"clear",value:function(A){for(var D=this.options,I=0,F=0;Fthis._curIndex&&(K=this._uploadList[this._curIndex]),K&&(this.init(A,D,I,F),this._state=l.VODSTATE.START,this._ossUpload=null,this._uploadCore(K,K.retry),K.retry=!1),!0}},{key:"resumeUploadWithSTSToken",value:function(A,D,I){if(this._curIndex==-1)return!1;if(this._state!=l.VODSTATE.EXPIRE)return!1;if(this._uploadList.length>this._curIndex){var F=this._uploadList[this._curIndex];F.object?this._refreshSTSTokenUpload(F,A,D,I):this.setSTSToken(F,A,D,I)}}},{key:"setSTSTokenDirectlyUpload",value:function(A,D,I,F,K){if(!(D&&I&&F&&K))return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken and expiration should not be empty."),!1;this._ut="oss";var ne=A;this.init(D,I,F,K),ne.endpoint=ne._endpoint,ne.bucket=ne._bucket,ne.object=ne._object,this._ossUpload=null,this._uploadCore(ne,A.retry),A.retry=!1}},{key:"setSTSToken",value:function(A,D,I,F){if(!D||!I||!F)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;this._ut="vod",this._uploadWay="sts";var K=A.videoInfo,ne={accessKeyId:D,securityToken:F,accessKeySecret:I,fileName:A.file.name,title:K.Title,requestId:A.ri,region:this.options.region};K.ImageType&&(ne.imageType=K.ImageType),K.ImageExt&&(ne.imageExt=K.ImageExt),K.FileSize&&(ne.fileSize=K.FileSize),K.Description&&(ne.description=K.Description),K.CateId&&(ne.cateId=K.CateId),K.Tags&&(ne.tags=K.Tags),K.TemplateGroupId&&(ne.templateGroupId=K.TemplateGroupId),K.StorageLocation&&(ne.storageLocation=K.StorageLocation),K.CoverURL&&(ne.coverUrl=K.CoverURL),K.TransCodeMode&&(ne.transCodeMode=K.TransCodeMode),K.UserData&&(ne.userData=K.UserData);var j=this,G="getUploadAuth";A.videoId?(ne.videoId=A.videoId,G="refreshUploadAuth"):A.isImage&&(G="getImageUploadAuth"),b.default[G](ne,function(X){A.videoId=X.VideoId?X.VideoId:A.videoId,j.setUploadAuthAndAddress(A,X.UploadAuth,X.UploadAddress),j._state=l.VODSTATE.START},function(X){j._error(A,{name:X.Code,code:X.Code,message:X.Message,requestId:X.RequestId})})}},{key:"setUploadAuthAndAddress",value:function(A,D,I,F){if(!A||!D||!I)return!1;var K=JSON.parse(c.default.decode(D));if(!(K.AccessKeyId&&K.AccessKeySecret&&K.SecurityToken&&K.Expiration))return console.error("uploadauth is invalid"),!1;var ne={},j=A;if(I){if(ne=JSON.parse(c.default.decode(I)),!ne.Endpoint||!ne.Bucket||!ne.FileName)return console.error("uploadAddress is invalid"),!1}else ne.Endpoint=j.endpoint,ne.Bucket=j.bucket,ne.FileName=j.object;this._ut="vod",this._uploadWay="vod",this.options.region=K.Region||this.options.region,this.init(K.AccessKeyId,K.AccessKeySecret,K.SecurityToken,K.Expiration),j.endpoint=j._endpoint?j._endpoint:ne.Endpoint,j.bucket=j._bucket?j._bucket:ne.Bucket,j.object=j._object?j._object:ne.FileName,j.region=this.options.region,F&&(j.videoId=F),this._ossUpload=null,this._uploadCore(j,A.retry),A.retry=!1}},{key:"_refreshSTSTokenUpload",value:function(A,D,I,F){if(!D||!I||!F)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;var K={accessKeyId:D,securityToken:F,accessKeySecret:I,videoId:A.object,requestId:A.ri,region:this.options.region},ne=this,j="refreshUploadAuth";A.isImage&&(j="getImageUploadAuth"),b.default[j](K,function(G){ne.setUploadAuthAndAddress(A,G.UploadAuth,UploadAddress),ne._state=l.VODSTATE.START},function(G){ne._error(A,{name:G.Code,code:G.Code,message:G.Message,requestId:G.RequestId})})}},{key:"_upload",value:function(A){var D=arguments.length>1&&arguments[1]!==void 0&&arguments[1],I=this.options;if(A.retry=D,I.onUploadstarted&&!D)try{var F=this._getCheckoutpoint(A);F&&F.state!=l.UPLOADSTATE.UPLOADING&&(A.checkpoint=F,A.videoId=F.videoId),I.onUploadstarted(A)}catch(K){console.log(K)}}},{key:"_uploadCore",value:function(A){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(A.state=l.UPLOADSTATE.UPLOADING,!this._ossUpload){A.endpoint=A.endpoint||"http://oss-cn-hangzhou.aliyuncs.com";var D=this;this._ossUpload=new d.default({bucket:A.bucket,endpoint:A.endpoint,AccessKeyId:this._ossCreditor.accessKeyId,AccessKeySecret:this._ossCreditor.accessKeySecret,SecurityToken:this._ossCreditor.securityToken,timeout:this.options.timeout,cname:this.options.cname},{onerror:function(X,J){D._error.call(D,X,J)},oncomplete:function(X,J){D._complete.call(D,X,J)},onprogress:function(X,J,B){D._progress.call(D,X,J,B)}})}var I=u.default.getFileType(A.file.name),F=this._getCheckoutpoint(A),K="",ne="";F&&F.checkpoint&&(ne=F.state,K=F.videoId,F=F.checkpoint),F&&K==A.videoId&&ne!=l.UPLOADSTATE.UPLOADING&&(F.file=A.file,A.checkpoint=F,F.uploadId);var j=this._adjustPartSize(A);this._reportLog("20002",A,{ft:I,fs:A.file.size,bu:A.bucket,ok:A.object,vid:A.videoId||"",fn:A.file.name,fw:null,fh:null,ps:j});var G={headers:{"x-oss-notification":A.userData?A.userData:""},partSize:j,parallel:this.options.parallel};this._ossUpload.upload(A,G)}},{key:"_findUploadIndex",value:function(){for(var A=-1,D=0;D0||D.name=="SignatureDoesNotMatchError"||D.code=="SecurityTokenExpired"||D.code=="InvalidSecurityToken.Expired"||D.code=="InvalidAccessKeyId"&&this._ossCreditor.securityToken){if(this.options.onUploadTokenExpired){this._state=l.VODSTATE.EXPIRE,A.state=l.UPLOADSTATE.FAIlURE;try{this.options.onUploadTokenExpired(A,D)}catch(F){console.log(F)}}return}if((D.name=="RequestTimeoutError"||D.name=="ConnectionTimeout"||D.name=="ConnectionTimeoutError")&&this._retryTotal>this._retryCount){var I=this;return setTimeout(function(){I._uploadCore(A,!0)},1e3*I._retryDuration),void this._retryCount++}D.name=="NoSuchUploadError"&&this._removeCheckoutpoint(A),this._handleError(A,D)}}},{key:"_handleError",value:function(A,D){var I=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],F=l.UPLOADSTATE.FAIlURE;if(A.state!=l.UPLOADSTATE.CANCELED&&(A.state=l.UPLOADSTATE.FAIlURE,this._state=l.VODSTATE.FAILURE,this.options.onUploadFailed&&D&&D.code&&D.message))try{this.options.onUploadFailed(A,D.code,D.message)}catch(ne){console.log(ne)}if(I&&this._changeState(A,F),this._reportLog("20006",A,{code:D.name,message:D.message,requestId:D.requestId,fs:A.file.size,bu:A.bucket,ok:A.object,fn:A.file.name}),this._reportLog("20004",A,{requestId:D.requestId,fs:A.file.size,bu:A.bucket,ok:A.object,fn:A.file.name}),A.ri=g.default.create(),this._findUploadIndex()!=-1){var K=this;this._state=l.VODSTATE.START,setTimeout(function(){K.nextUpload()},100)}}},{key:"_complete",value:function(A,D){if(A.state=l.UPLOADSTATE.SUCCESS,this.options.onUploadSucceed)try{this.options.onUploadSucceed(A)}catch(K){console.log(K)}var I=0;D&&D.res&&D.res.headers&&(I=D.res.headers["x-oss-request-id"]),this._removeCheckoutpoint(A);var F=this;setTimeout(function(){F.nextUpload()},100),this._retryCount=0,this._reportLog("20003",A,{requestId:I})}},{key:"_progress",value:function(A,D,I){if(this.options.onUploadProgress)try{A.loaded=D.loaded,this.options.onUploadProgress(A,D.total,D.loaded)}catch(J){console.log(J)}var F=D.checkpoint,K=0;F&&(A.checkpoint=F,this._saveCheckoutpoint(A,F,l.UPLOADSTATE.UPLOADING),K=F.uploadId),this._retryCount=0;var ne=this._getPortNumber(F),j=0;if(I&&I.headers&&(j=I.headers["x-oss-request-id"]),D.loaded!=0&&this._reportLog("20007",A,{pn:ne,requestId:j}),D.loaded!=1&&this._reportLog("20005",A,{UploadId:K,pn:ne+1,pr:A.retry?1:0,fs:A.file.size,bu:A.bucket,ok:A.object,fn:A.file.name}),!this._invalidUserId&&!A.isImage&&this._ut=="vod"&&this.options.enableUploadProgress){var G={file:A.file,checkpoint:D,userId:this.options.userId,videoId:A.videoId,region:this.options.region,fileHash:A.fileHash};try{var X=this;m.default.upload(G,function(){},function(J){if((J=JSON.parse(J))&&J.Code=="InvalidParameter"&&J.Message.indexOf("UserId")>0){X._invalidUserId=!0;var B=J.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(B)}})}catch(J){console.log(J)}}}},{key:"_getPortNumber",value:function(A){if(A){var D=A.doneParts;if(D&&D.length>0)return D[D.length-1].number}return 0}},{key:"_removeCheckoutpoint",value:function(A){var D=this._getCheckoutpointKey(A);f.default.remove(D)}},{key:"_getCheckoutpoint",value:function(A){var D=this._getCheckoutpointKey(A),I=f.default.get(D);if(I)try{return JSON.parse(I)}catch(F){}return""}},{key:"_saveCheckoutpoint",value:function(A,D,I){if(D){var F=this._getCheckoutpointKey(A),K=A.file,ne={fileName:K.name,lastModified:K.lastModified,size:K.size,object:A.object,videoId:A.videoId,bucket:A.bucket,endpoint:A.endpoint,checkpoint:D,loaded:A.loaded,state:I};f.default.set(F,JSON.stringify(ne))}}},{key:"_changeState",value:function(A,D){var I=this._getCheckoutpoint(A);I&&((this._onbeforeunload=!0)&&(D=l.UPLOADSTATE.STOPED),this._saveCheckoutpoint(A,I.checkpoint,D))}},{key:"_getCheckoutpointKey",value:function(A){return"upload_"+A.file.lastModified+"_"+A.file.name+"_"+A.file.size}},{key:"_getCheckoutpointFromCloud",value:function(A,D,I){var F={userId:this.options.userId,uploadInfoList:[{FileName:A.file.name,FileSize:A.file.size,FileCreateTime:A.file.lastModified,FileHash:A.fileHash}],region:this.options.region};m.default.get(F,function(K){D(K)},I)}},{key:"_reportLog",value:function(A,D,I){I||(I={}),I.ri=D.ri,this._ut&&(I.ut=this._ut),this._log.log(A,I)}},{key:"_initEvent",value:function(){var A=this;window&&(window.onbeforeunload=function(D){if(A._onbeforeunload=!0,A._curIndex!=-1&&A._uploadList.length>A._curIndex){var I=A._uploadList[A._curIndex];A._changeState(I,l.UPLOADSTATE.STOPED)}})}},{key:"_initState",value:function(){for(var A=0;A1e4?A.file.size/9999:this.options.partSize}}]),O}());w.default=x},function(U,w,P){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.UPLOADSTATE={INIT:"Ready",UPLOADING:"Uploading",SUCCESS:"Success",FAIlURE:"Failure",CANCELED:"Canceled",STOPED:"Stoped"},w.VODSTATE={INIT:"Init",START:"Start",STOP:"Stop",FAILURE:"Failure",EXPIRE:"Expire",END:"End"}},function(U,w,P){"use strict";function S(o){return o&&o.__esModule?o:{default:o}}function C(o,c){if(!(o instanceof c))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var T=function(){function o(c,s){for(var f=0;f=C())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+C().toString(16)+" bytes");return 0|ee}function t(ee){return+ee!=ee&&(ee=0),l.alloc(+ee)}function u(ee,M){if(l.isBuffer(ee))return ee.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(ee)||ee instanceof ArrayBuffer))return ee.byteLength;typeof ee!="string"&&(ee=""+ee);var N=ee.length;if(N===0)return 0;for(var $=!1;;)switch(M){case"ascii":case"latin1":case"binary":return N;case"utf8":case"utf-8":case void 0:return pe(ee).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*N;case"hex":return N>>>1;case"base64":return Me(ee).length;default:if($)return pe(ee).length;M=(""+M).toLowerCase(),$=!0}}function y(ee,M,N){var $=!1;if((M===void 0||M<0)&&(M=0),M>this.length)return"";if((N===void 0||N>this.length)&&(N=this.length),N<=0)return"";if(N>>>=0,M>>>=0,N<=M)return"";for(ee||(ee="utf8");;)switch(ee){case"hex":return ne(this,M,N);case"utf8":case"utf-8":return D(this,M,N);case"ascii":return F(this,M,N);case"latin1":case"binary":return K(this,M,N);case"base64":return A(this,M,N);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,M,N);default:if($)throw new TypeError("Unknown encoding: "+ee);ee=(ee+"").toLowerCase(),$=!0}}function g(ee,M,N){var $=ee[M];ee[M]=ee[N],ee[N]=$}function _(ee,M,N,$,V){if(ee.length===0)return-1;if(typeof N=="string"?($=N,N=0):N>2147483647?N=2147483647:N<-2147483648&&(N=-2147483648),N=+N,isNaN(N)&&(N=V?0:ee.length-1),N<0&&(N=ee.length+N),N>=ee.length){if(V)return-1;N=ee.length-1}else if(N<0){if(!V)return-1;N=0}if(typeof M=="string"&&(M=l.from(M,$)),l.isBuffer(M))return M.length===0?-1:b(ee,M,N,$,V);if(typeof M=="number")return M&=255,l.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?V?Uint8Array.prototype.indexOf.call(ee,M,N):Uint8Array.prototype.lastIndexOf.call(ee,M,N):b(ee,[M],N,$,V);throw new TypeError("val must be string, number or Buffer")}function b(ee,M,N,$,V){function Y(Ve,Ke){return me===1?Ve[Ke]:Ve.readUInt16BE(Ke*me)}var me=1,Re=ee.length,rt=M.length;if($!==void 0&&(($=String($).toLowerCase())==="ucs2"||$==="ucs-2"||$==="utf16le"||$==="utf-16le")){if(ee.length<2||M.length<2)return-1;me=2,Re/=2,rt/=2,N/=2}var Pe;if(V){var Ie=-1;for(Pe=N;PeRe&&(N=Re-rt),Pe=N;Pe>=0;Pe--){for(var Xe=!0,tt=0;ttV&&($=V):$=V;var Y=M.length;if(Y%2!=0)throw new TypeError("Invalid hex string");$>Y/2&&($=Y/2);for(var me=0;me<$;++me){var Re=parseInt(M.substr(2*me,2),16);if(isNaN(Re))return me;ee[N+me]=Re}return me}function m(ee,M,N,$){return Ce(pe(M,ee.length-N),ee,N,$)}function E(ee,M,N,$){return Ce(Oe(M),ee,N,$)}function a(ee,M,N,$){return E(ee,M,N,$)}function x(ee,M,N,$){return Ce(Me(M),ee,N,$)}function O(ee,M,N,$){return Ce(Fe(M,ee.length-N),ee,N,$)}function A(ee,M,N){return M===0&&N===ee.length?de.fromByteArray(ee):de.fromByteArray(ee.slice(M,N))}function D(ee,M,N){N=Math.min(ee.length,N);for(var $=[],V=M;V239?4:Y>223?3:Y>191?2:1;if(V+Re<=N){var rt,Pe,Ie,Xe;switch(Re){case 1:Y<128&&(me=Y);break;case 2:rt=ee[V+1],(192&rt)==128&&(Xe=(31&Y)<<6|63&rt)>127&&(me=Xe);break;case 3:rt=ee[V+1],Pe=ee[V+2],(192&rt)==128&&(192&Pe)==128&&(Xe=(15&Y)<<12|(63&rt)<<6|63&Pe)>2047&&(Xe<55296||Xe>57343)&&(me=Xe);break;case 4:rt=ee[V+1],Pe=ee[V+2],Ie=ee[V+3],(192&rt)==128&&(192&Pe)==128&&(192&Ie)==128&&(Xe=(15&Y)<<18|(63&rt)<<12|(63&Pe)<<6|63&Ie)>65535&&Xe<1114112&&(me=Xe)}}me===null?(me=65533,Re=1):me>65535&&(me-=65536,$.push(me>>>10&1023|55296),me=56320|1023&me),$.push(me),V+=Re}return I($)}function I(ee){var M=ee.length;if(M<=Ue)return String.fromCharCode.apply(String,ee);for(var N="",$=0;$$)&&(N=$);for(var V="",Y=M;YN)throw new RangeError("Trying to access beyond buffer length")}function X(ee,M,N,$,V,Y){if(!l.isBuffer(ee))throw new TypeError('"buffer" argument must be a Buffer instance');if(M>V||Mee.length)throw new RangeError("Index out of range")}function J(ee,M,N,$){M<0&&(M=65535+M+1);for(var V=0,Y=Math.min(ee.length-N,2);V>>8*($?V:1-V)}function B(ee,M,N,$){M<0&&(M=4294967295+M+1);for(var V=0,Y=Math.min(ee.length-N,4);V>>8*($?V:3-V)&255}function Q(ee,M,N,$,V,Y){if(N+$>ee.length)throw new RangeError("Index out of range");if(N<0)throw new RangeError("Index out of range")}function ie(ee,M,N,$,V){return V||Q(ee,M,N,4,34028234663852886e22,-34028234663852886e22),ue.write(ee,M,N,$,23,4),N+4}function oe(ee,M,N,$,V){return V||Q(ee,M,N,8,17976931348623157e292,-17976931348623157e292),ue.write(ee,M,N,$,52,8),N+8}function xe(ee){if(ee=ye(ee).replace(Ye,""),ee.length<2)return"";for(;ee.length%4!=0;)ee+="=";return ee}function ye(ee){return ee.trim?ee.trim():ee.replace(/^\s+|\s+$/g,"")}function Ae(ee){return ee<16?"0"+ee.toString(16):ee.toString(16)}function pe(ee,M){M=M||1/0;for(var N,$=ee.length,V=null,Y=[],me=0;me<$;++me){if((N=ee.charCodeAt(me))>55295&&N<57344){if(!V){if(N>56319){(M-=3)>-1&&Y.push(239,191,189);continue}if(me+1===$){(M-=3)>-1&&Y.push(239,191,189);continue}V=N;continue}if(N<56320){(M-=3)>-1&&Y.push(239,191,189),V=N;continue}N=65536+(V-55296<<10|N-56320)}else V&&(M-=3)>-1&&Y.push(239,191,189);if(V=null,N<128){if((M-=1)<0)break;Y.push(N)}else if(N<2048){if((M-=2)<0)break;Y.push(N>>6|192,63&N|128)}else if(N<65536){if((M-=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((M-=4)<0)break;Y.push(N>>18|240,N>>12&63|128,N>>6&63|128,63&N|128)}}return Y}function Oe(ee){for(var M=[],N=0;N>8,V=N%256,Y.push(V),Y.push($);return Y}function Me(ee){return de.toByteArray(xe(ee))}function Ce(ee,M,N,$){for(var V=0;V<$&&!(V+N>=M.length||V>=ee.length);++V)M[V+N]=ee[V];return V}function Le(ee){return ee!==ee}/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */var de=P(21),ue=P(22),ke=P(23);w.Buffer=l,w.SlowBuffer=t,w.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=S.TYPED_ARRAY_SUPPORT!==void 0?S.TYPED_ARRAY_SUPPORT:function(){try{var ee=new Uint8Array(1);return ee.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},ee.foo()===42&&typeof ee.subarray=="function"&&ee.subarray(1,1).byteLength===0}catch(M){return!1}}(),w.kMaxLength=C(),l.poolSize=8192,l._augment=function(ee){return ee.__proto__=l.prototype,ee},l.from=function(ee,M,N){return p(null,ee,M,N)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(ee,M,N){return d(null,ee,M,N)},l.allocUnsafe=function(ee){return o(null,ee)},l.allocUnsafeSlow=function(ee){return o(null,ee)},l.isBuffer=function(ee){return!(ee==null||!ee._isBuffer)},l.compare=function(ee,M){if(!l.isBuffer(ee)||!l.isBuffer(M))throw new TypeError("Arguments must be Buffers");if(ee===M)return 0;for(var N=ee.length,$=M.length,V=0,Y=Math.min(N,$);V0&&(ee=this.toString("hex",0,M).match(/.{2}/g).join(" "),this.length>M&&(ee+=" ... ")),""},l.prototype.compare=function(ee,M,N,$,V){if(!l.isBuffer(ee))throw new TypeError("Argument must be a Buffer");if(M===void 0&&(M=0),N===void 0&&(N=ee?ee.length:0),$===void 0&&($=0),V===void 0&&(V=this.length),M<0||N>ee.length||$<0||V>this.length)throw new RangeError("out of range index");if($>=V&&M>=N)return 0;if($>=V)return-1;if(M>=N)return 1;if(M>>>=0,N>>>=0,$>>>=0,V>>>=0,this===ee)return 0;for(var Y=V-$,me=N-M,Re=Math.min(Y,me),rt=this.slice($,V),Pe=ee.slice(M,N),Ie=0;IeV)&&(N=V),ee.length>0&&(N<0||M<0)||M>this.length)throw new RangeError("Attempt to write outside buffer bounds");$||($="utf8");for(var Y=!1;;)switch($){case"hex":return v(this,ee,M,N);case"utf8":case"utf-8":return m(this,ee,M,N);case"ascii":return E(this,ee,M,N);case"latin1":case"binary":return a(this,ee,M,N);case"base64":return x(this,ee,M,N);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,ee,M,N);default:if(Y)throw new TypeError("Unknown encoding: "+$);$=(""+$).toLowerCase(),Y=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Ue=4096;l.prototype.slice=function(ee,M){var N=this.length;ee=~~ee,M=M===void 0?N:~~M,ee<0?(ee+=N)<0&&(ee=0):ee>N&&(ee=N),M<0?(M+=N)<0&&(M=0):M>N&&(M=N),M0&&(V*=256);)$+=this[ee+--M]*V;return $},l.prototype.readUInt8=function(ee,M){return M||G(ee,1,this.length),this[ee]},l.prototype.readUInt16LE=function(ee,M){return M||G(ee,2,this.length),this[ee]|this[ee+1]<<8},l.prototype.readUInt16BE=function(ee,M){return M||G(ee,2,this.length),this[ee]<<8|this[ee+1]},l.prototype.readUInt32LE=function(ee,M){return M||G(ee,4,this.length),(this[ee]|this[ee+1]<<8|this[ee+2]<<16)+16777216*this[ee+3]},l.prototype.readUInt32BE=function(ee,M){return M||G(ee,4,this.length),16777216*this[ee]+(this[ee+1]<<16|this[ee+2]<<8|this[ee+3])},l.prototype.readIntLE=function(ee,M,N){ee|=0,M|=0,N||G(ee,M,this.length);for(var $=this[ee],V=1,Y=0;++Y=V&&($-=Math.pow(2,8*M)),$},l.prototype.readIntBE=function(ee,M,N){ee|=0,M|=0,N||G(ee,M,this.length);for(var $=M,V=1,Y=this[ee+--$];$>0&&(V*=256);)Y+=this[ee+--$]*V;return V*=128,Y>=V&&(Y-=Math.pow(2,8*M)),Y},l.prototype.readInt8=function(ee,M){return M||G(ee,1,this.length),128&this[ee]?-1*(255-this[ee]+1):this[ee]},l.prototype.readInt16LE=function(ee,M){M||G(ee,2,this.length);var N=this[ee]|this[ee+1]<<8;return 32768&N?4294901760|N:N},l.prototype.readInt16BE=function(ee,M){M||G(ee,2,this.length);var N=this[ee+1]|this[ee]<<8;return 32768&N?4294901760|N:N},l.prototype.readInt32LE=function(ee,M){return M||G(ee,4,this.length),this[ee]|this[ee+1]<<8|this[ee+2]<<16|this[ee+3]<<24},l.prototype.readInt32BE=function(ee,M){return M||G(ee,4,this.length),this[ee]<<24|this[ee+1]<<16|this[ee+2]<<8|this[ee+3]},l.prototype.readFloatLE=function(ee,M){return M||G(ee,4,this.length),ue.read(this,ee,!0,23,4)},l.prototype.readFloatBE=function(ee,M){return M||G(ee,4,this.length),ue.read(this,ee,!1,23,4)},l.prototype.readDoubleLE=function(ee,M){return M||G(ee,8,this.length),ue.read(this,ee,!0,52,8)},l.prototype.readDoubleBE=function(ee,M){return M||G(ee,8,this.length),ue.read(this,ee,!1,52,8)},l.prototype.writeUIntLE=function(ee,M,N,$){(ee=+ee,M|=0,N|=0,!$)&&X(this,ee,M,N,Math.pow(2,8*N)-1,0);var V=1,Y=0;for(this[M]=255ⅇ++Y=0&&(Y*=256);)this[M+V]=ee/Y&255;return M+N},l.prototype.writeUInt8=function(ee,M,N){return ee=+ee,M|=0,N||X(this,ee,M,1,255,0),l.TYPED_ARRAY_SUPPORT||(ee=Math.floor(ee)),this[M]=255&ee,M+1},l.prototype.writeUInt16LE=function(ee,M,N){return ee=+ee,M|=0,N||X(this,ee,M,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[M]=255&ee,this[M+1]=ee>>>8):J(this,ee,M,!0),M+2},l.prototype.writeUInt16BE=function(ee,M,N){return ee=+ee,M|=0,N||X(this,ee,M,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[M]=ee>>>8,this[M+1]=255&ee):J(this,ee,M,!1),M+2},l.prototype.writeUInt32LE=function(ee,M,N){return ee=+ee,M|=0,N||X(this,ee,M,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[M+3]=ee>>>24,this[M+2]=ee>>>16,this[M+1]=ee>>>8,this[M]=255&ee):B(this,ee,M,!0),M+4},l.prototype.writeUInt32BE=function(ee,M,N){return ee=+ee,M|=0,N||X(this,ee,M,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[M]=ee>>>24,this[M+1]=ee>>>16,this[M+2]=ee>>>8,this[M+3]=255&ee):B(this,ee,M,!1),M+4},l.prototype.writeIntLE=function(ee,M,N,$){if(ee=+ee,M|=0,!$){var V=Math.pow(2,8*N-1);X(this,ee,M,N,V-1,-V)}var Y=0,me=1,Re=0;for(this[M]=255ⅇ++Y>0)-Re&255;return M+N},l.prototype.writeIntBE=function(ee,M,N,$){if(ee=+ee,M|=0,!$){var V=Math.pow(2,8*N-1);X(this,ee,M,N,V-1,-V)}var Y=N-1,me=1,Re=0;for(this[M+Y]=255ⅇ--Y>=0&&(me*=256);)ee<0&&Re===0&&this[M+Y+1]!==0&&(Re=1),this[M+Y]=(ee/me>>0)-Re&255;return M+N},l.prototype.writeInt8=function(ee,M,N){return ee=+ee,M|=0,N||X(this,ee,M,1,127,-128),l.TYPED_ARRAY_SUPPORT||(ee=Math.floor(ee)),ee<0&&(ee=255+ee+1),this[M]=255&ee,M+1},l.prototype.writeInt16LE=function(ee,M,N){return ee=+ee,M|=0,N||X(this,ee,M,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[M]=255&ee,this[M+1]=ee>>>8):J(this,ee,M,!0),M+2},l.prototype.writeInt16BE=function(ee,M,N){return ee=+ee,M|=0,N||X(this,ee,M,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[M]=ee>>>8,this[M+1]=255&ee):J(this,ee,M,!1),M+2},l.prototype.writeInt32LE=function(ee,M,N){return ee=+ee,M|=0,N||X(this,ee,M,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[M]=255&ee,this[M+1]=ee>>>8,this[M+2]=ee>>>16,this[M+3]=ee>>>24):B(this,ee,M,!0),M+4},l.prototype.writeInt32BE=function(ee,M,N){return ee=+ee,M|=0,N||X(this,ee,M,4,2147483647,-2147483648),ee<0&&(ee=4294967295+ee+1),l.TYPED_ARRAY_SUPPORT?(this[M]=ee>>>24,this[M+1]=ee>>>16,this[M+2]=ee>>>8,this[M+3]=255&ee):B(this,ee,M,!1),M+4},l.prototype.writeFloatLE=function(ee,M,N){return ie(this,ee,M,!0,N)},l.prototype.writeFloatBE=function(ee,M,N){return ie(this,ee,M,!1,N)},l.prototype.writeDoubleLE=function(ee,M,N){return oe(this,ee,M,!0,N)},l.prototype.writeDoubleBE=function(ee,M,N){return oe(this,ee,M,!1,N)},l.prototype.copy=function(ee,M,N,$){if(N||(N=0),$||$===0||($=this.length),M>=ee.length&&(M=ee.length),M||(M=0),$>0&&$=this.length)throw new RangeError("sourceStart out of bounds");if($<0)throw new RangeError("sourceEnd out of bounds");$>this.length&&($=this.length),ee.length-M<$-N&&($=ee.length-M+N);var V,Y=$-N;if(this===ee&&N=0;--V)ee[V+M]=this[V+N];else if(Y<1e3||!l.TYPED_ARRAY_SUPPORT)for(V=0;V>>=0,N=N===void 0?this.length:N>>>0,ee||(ee=0);var Y;if(typeof ee=="number")for(Y=M;Y0)throw new Error("Invalid string. Length must be a multiple of 4");return n[t-2]==="="?2:n[t-1]==="="?1:0}function C(n){return 3*n.length/4-S(n)}function T(n){var t,u,y,g,_,b=n.length;g=S(n),_=new c(3*b/4-g),u=g>0?b-4:b;var v=0;for(t=0;t>16&255,_[v++]=y>>8&255,_[v++]=255&y;return g===2?(y=o[n.charCodeAt(t)]<<2|o[n.charCodeAt(t+1)]>>4,_[v++]=255&y):g===1&&(y=o[n.charCodeAt(t)]<<10|o[n.charCodeAt(t+1)]<<4|o[n.charCodeAt(t+2)]>>2,_[v++]=y>>8&255,_[v++]=255&y),_}function l(n){return d[n>>18&63]+d[n>>12&63]+d[n>>6&63]+d[63&n]}function p(n,t,u){for(var y,g=[],_=t;_v?v:b+16383));return y===1?(t=n[u-1],g+=d[t>>2],g+=d[t<<4&63],g+="=="):y===2&&(t=(n[u-2]<<8)+n[u-1],g+=d[t>>10],g+=d[t>>4&63],g+=d[t<<2&63],g+="="),_.push(g),_.join("")}w.byteLength=C,w.toByteArray=T,w.fromByteArray=h;for(var d=[],o=[],c=typeof Uint8Array!="undefined"?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,i=s.length;f>1,s=-7,f=C?l-1:0,i=C?-1:1,n=P[S+f];for(f+=i,p=n&(1<<-s)-1,n>>=-s,s+=d;s>0;p=256*p+P[S+f],f+=i,s-=8);for(h=p&(1<<-s)-1,p>>=-s,s+=T;s>0;h=256*h+P[S+f],f+=i,s-=8);if(p===0)p=1-c;else{if(p===o)return h?NaN:1/0*(n?-1:1);h+=Math.pow(2,T),p-=c}return(n?-1:1)*h*Math.pow(2,p-T)},w.write=function(P,S,C,T,l,p){var h,d,o,c=8*p-l-1,s=(1<>1,i=l===23?Math.pow(2,-24)-Math.pow(2,-77):0,n=T?0:p-1,t=T?1:-1,u=S<0||S===0&&1/S<0?1:0;for(S=Math.abs(S),isNaN(S)||S===1/0?(d=isNaN(S)?1:0,h=s):(h=Math.floor(Math.log(S)/Math.LN2),S*(o=Math.pow(2,-h))<1&&(h--,o*=2),S+=h+f>=1?i/o:i*Math.pow(2,1-f),S*o>=2&&(h++,o/=2),h+f>=s?(d=0,h=s):h+f>=1?(d=(S*o-1)*Math.pow(2,l),h+=f):(d=S*Math.pow(2,f-1)*Math.pow(2,l),h=0));l>=8;P[C+n]=255&d,n+=t,d/=256,l-=8);for(h=h<0;P[C+n]=255&h,n+=t,h/=256,c-=8);P[C+n-t]|=128*u}},function(U,w){var P={}.toString;U.exports=Array.isArray||function(S){return P.call(S)=="[object Array]"}},function(U,w,P){"use strict";function S(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var C=function(){function l(p,h){for(var d=0;d>>31}var b=(i<<5|i>>>27)+y+d[g];b+=g<20?1518500249+(n&t|~n&u):g<40?1859775393+(n^t^u):g<60?(n&t|n&u|t&u)-1894007588:(n^t^u)-899497514,y=u,u=t,t=n<<30|n>>>2,n=i,i=b}f[0]=f[0]+i|0,f[1]=f[1]+n|0,f[2]=f[2]+t|0,f[3]=f[3]+u|0,f[4]=f[4]+y|0},_doFinalize:function(){var c=this._data,s=c.words,f=8*this._nDataBytes,i=8*c.sigBytes;return s[i>>>5]|=128<<24-i%32,s[14+(i+64>>>9<<4)]=Math.floor(f/4294967296),s[15+(i+64>>>9<<4)]=f,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(o),C.HmacSHA1=p._createHmacHelper(o)}(),S.SHA1})},function(U,w,P){!function(S,C){U.exports=w=C(P(0))}(0,function(S){!function(){var C=S,T=C.lib,l=T.Base,p=C.enc,h=p.Utf8,d=C.algo;d.HMAC=l.extend({init:function(o,c){o=this._hasher=new o.init,typeof c=="string"&&(c=h.parse(c));var s=o.blockSize,f=4*s;c.sigBytes>f&&(c=o.finalize(c)),c.clamp();for(var i=this._oKey=c.clone(),n=this._iKey=c.clone(),t=i.words,u=n.words,y=0;y>>6-i%4*2;s[f>>>2]|=(n|t)<<24-f%4*8,f++}return p.create(s,f)}var T=S,l=T.lib,p=l.WordArray,h=T.enc;h.Base64={stringify:function(d){var o=d.words,c=d.sigBytes,s=this._map;d.clamp();for(var f=[],i=0;i>>2]>>>24-i%4*8&255,t=o[i+1>>>2]>>>24-(i+1)%4*8&255,u=o[i+2>>>2]>>>24-(i+2)%4*8&255,y=n<<16|t<<8|u,g=0;g<4&&i+.75*g>>6*(3-g)&63));var _=s.charAt(64);if(_)for(;f.length%4;)f.push(_);return f.join("")},parse:function(d){var o=d.length,c=this._map,s=this._reverseMap;if(!s){s=this._reverseMap=[];for(var f=0;f0&&(G=j.UploadProgress.UploadProgressList[0],X=G.ClientId),c.default.setClientId(X),E&&E(G)},function(j){j&&(a(j),console.log(j))})}}]),v}();w.default=b},function(U,w,P){"use strict";function S(h,d){if(!(h instanceof d))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var C=function(){function h(d,o){for(var c=0;c=U.length?{done:!0}:{done:!1,value:U[S++]}},e:function(d){throw d},f:C}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var T=!0,l=!1,p;return{s:function(){P=U[Symbol.iterator]()},n:function(){var d=P.next();return T=d.done,d},e:function(d){l=!0,p=d},f:function(){try{!T&&P.return!=null&&P.return()}finally{if(l)throw p}}}}},rHrb:function($e,We,z){"use strict";Object.defineProperty(We,"__esModule",{value:!0}),We.CopyToClipboard=void 0;var ae=U(z("q1tI")),Z=U(z("+QRC"));function U(t){return t&&t.__esModule?t:{default:t}}function w(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?w=function(y){return typeof y}:w=function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},w(t)}function P(t,u){var y=Object.keys(t);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(t);u&&(g=g.filter(function(_){return Object.getOwnPropertyDescriptor(t,_).enumerable})),y.push.apply(y,g)}return y}function S(t){for(var u=1;u=0)continue;if(!Object.prototype.propertyIsEnumerable.call(t,g))continue;y[g]=t[g]}}return y}function T(t,u){if(t==null)return{};var y={},g=Object.keys(t),_,b;for(b=0;b=0)continue;y[_]=t[_]}return y}function l(t,u){if(!(t instanceof u))throw new TypeError("Cannot call a class as a function")}function p(t,u){for(var y=0;y"']/,ae=/[&<>"']/g,Z=/[<>"']|&(?!#?\w+;)/,U=/[<>"']|&(?!#?\w+;)/g,w={"&":"&","<":"<",">":">",'"':""","'":"'"},P=v=>w[v];function S(v,m){if(m){if(z.test(v))return v.replace(ae,P)}else if(Z.test(v))return v.replace(U,P);return v}const C=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function T(v){return v.replace(C,(m,E)=>(E=E.toLowerCase(),E==="colon"?":":E.charAt(0)==="#"?E.charAt(1)==="x"?String.fromCharCode(parseInt(E.substring(2),16)):String.fromCharCode(+E.substring(1)):""))}const l=/(^|[^\[])\^/g;function p(v,m){v=v.source||v,m=m||"";const E={replace:(a,x)=>(x=x.source||x,x=x.replace(l,"$1"),v=v.replace(a,x),E),getRegex:()=>new RegExp(v,m)};return E}const h=/[^\w:]/g,d=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function o(v,m,E){if(v){let a;try{a=decodeURIComponent(T(E)).replace(h,"").toLowerCase()}catch(x){return null}if(a.indexOf("javascript:")===0||a.indexOf("vbscript:")===0||a.indexOf("data:")===0)return null}m&&!d.test(E)&&(E=n(m,E));try{E=encodeURI(E).replace(/%25/g,"%")}catch(a){return null}return E}const c={},s=/^[^:]+:\/*[^/]*$/,f=/^([^:]+:)[\s\S]*$/,i=/^([^:]+:\/*[^/]*)[\s\S]*$/;function n(v,m){c[" "+v]||(s.test(v)?c[" "+v]=v+"/":c[" "+v]=g(v,"/",!0)),v=c[" "+v];const E=v.indexOf(":")===-1;return m.substring(0,2)==="//"?E?m:v.replace(f,"$1")+m:m.charAt(0)==="/"?E?m:v.replace(i,"$1")+m:v+m}const t={exec:function(){}};function u(v){let m=1,E,a;for(;m{let I=!1,F=A;for(;--F>=0&&D[F]==="\\";)I=!I;return I?"|":" |"}),a=E.split(/ \|/);let x=0;if(a.length>m)a.splice(m);else for(;a.length=0;p--){var h=U().key(p);l(w(h),h)}}function C(l){return U().removeItem(l)}function T(){return U().clear()}},"s8/Y":function($e,We,z){$e.exports=z.p+"static/jx.6713fc81.svg"},"sB/4":function($e,We,z){$e.exports=z.p+"static/b.7405990c.svg"},sNtx:function($e,We,z){},sR1s:function($e,We,z){"use strict";z.d(We,"b",function(){return w}),z.d(We,"a",function(){return P}),z.d(We,"c",function(){return S}),z.d(We,"d",function(){return C});var ae=z("U8pU"),Z="RC_TABLE_KEY";function U(T){return T==null?[]:Array.isArray(T)?T:[T]}function w(T,l){if(!l&&typeof l!="number")return T;for(var p=U(l),h=T,d=0;d1)Object(p.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(u.length===0)return Object(p.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var y=u[0];if(S.isValidElement(y)&&Object(h.c)(y)){var g=y.ref;u[0]=S.cloneElement(y,{ref:Object(h.a)(g,this.setChildNode)})}return u.length===1?u[0]:u.map(function(_,b){return!S.isValidElement(_)||"key"in _&&_.key!==null?_:S.cloneElement(_,{key:"".concat(o,"-").concat(b)})})}}]),i}(S.Component);c.displayName="ResizeObserver",We.a=c},twBr:function($e,We,z){$e.exports=z.p+"static/s.1f286590.svg"},uMZB:function($e,We,z){$e.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($e,We,z){$e.exports=ae;function ae(){return z("gaXo"),{}}},ulZh:function($e,We,z){typeof window!="undefined"&&function(Z,U){$e.exports=U()}(this,function(){return function(ae){var Z={};function U(w){if(Z[w])return Z[w].exports;var P=Z[w]={i:w,l:!1,exports:{}};return ae[w].call(P.exports,P,P.exports,U),P.l=!0,P.exports}return U.m=ae,U.c=Z,U.d=function(w,P,S){U.o(w,P)||Object.defineProperty(w,P,{enumerable:!0,get:S})},U.r=function(w){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(w,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(w,"__esModule",{value:!0})},U.t=function(w,P){if(P&1&&(w=U(w)),P&8)return w;if(P&4&&typeof w=="object"&&w&&w.__esModule)return w;var S=Object.create(null);if(U.r(S),Object.defineProperty(S,"default",{enumerable:!0,value:w}),P&2&&typeof w!="string")for(var C in w)U.d(S,C,function(T){return w[T]}.bind(null,C));return S},U.n=function(w){var P=w&&w.__esModule?function(){return w.default}:function(){return w};return U.d(P,"a",P),P},U.o=function(w,P){return Object.prototype.hasOwnProperty.call(w,P)},U.p="/dist/",U(U.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(ae,Z,U){"use strict";var w=Object.prototype.hasOwnProperty,P="~";function S(){}Object.create&&(S.prototype=Object.create(null),new S().__proto__||(P=!1));function C(h,d,o){this.fn=h,this.context=d,this.once=o||!1}function T(h,d,o,c,s){if(typeof o!="function")throw new TypeError("The listener must be a function");var f=new C(o,c||h,s),i=P?P+d:d;return h._events[i]?h._events[i].fn?h._events[i]=[h._events[i],f]:h._events[i].push(f):(h._events[i]=f,h._eventsCount++),h}function l(h,d){--h._eventsCount===0?h._events=new S:delete h._events[d]}function p(){this._events=new S,this._eventsCount=0}p.prototype.eventNames=function(){var d=[],o,c;if(this._eventsCount===0)return d;for(c in o=this._events)w.call(o,c)&&d.push(P?c.slice(1):c);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(o)):d},p.prototype.listeners=function(d){var o=P?P+d:d,c=this._events[o];if(!c)return[];if(c.fn)return[c.fn];for(var s=0,f=c.length,i=new Array(f);s0},!1)}function h(d,o){for(var c={main:[o]},s={main:[]},f={main:{}};p(c);)for(var i=Object.keys(c),n=0;n=2*b/m||D<=F)return;var K=Number.POSITIVE_INFINITY,ne;for(ne=i.level-1;ne>a;ne--){var j=E[ne].maxBitrate;if(K=b*j/(8*.8*A),K=D)return;var G=this.bwEstimator.getEstimate();p.logger.warn("Fragment "+i.sn+(n?" part "+n.index:"")+" of level "+i.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+ne+` Current BW estimate: `+(Object(w.isFiniteNumber)(G)?(G/1024).toFixed(3):"Unknown")+` Kb/s Estimated load time for current fragment: `+D.toFixed(3)+` s Estimated load time for the next fragment: `+K.toFixed(3)+` s Time to underbuffer: `+F.toFixed(3)+" s"),t.nextLoadLevel=ne,this.bwEstimator.sample(v,_.loaded),this.clearTimer(),i.loader&&(this.fragCurrent=this.partCurrent=null,i.loader.abort()),t.trigger(S.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:i,part:n,stats:_})},s.onFragLoaded=function(i,n){var t=n.frag,u=n.part;if(t.type===l.PlaylistLevelType.MAIN&&Object(w.isFiniteNumber)(t.sn)){var y=u?u.stats:t.stats,g=u?u.duration:t.duration;if(this.clearTimer(),this.lastLoadedFragLevel=t.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var _=this.hls.levels[t.level],b=(_.loaded?_.loaded.bytes:0)+y.loaded,v=(_.loaded?_.loaded.duration:0)+g;_.loaded={bytes:b,duration:v},_.realBitrate=Math.round(8*b/v)}if(t.bitrateTest){var m={stats:y,frag:t,part:u,id:t.type};this.onFragBuffered(S.Events.FRAG_BUFFERED,m),t.bitrateTest=!1}}},s.onFragBuffered=function(i,n){var t=n.frag,u=n.part,y=u?u.stats:t.stats;if(y.aborted)return;if(t.type!==l.PlaylistLevelType.MAIN||t.sn==="initSegment")return;var g=y.parsing.end-y.loading.start;this.bwEstimator.sample(g,y.loaded),y.bwEstimate=this.bwEstimator.getEstimate(),t.bitrateTest?this.bitrateTestDelay=g/1e3:this.bitrateTestDelay=0},s.onError=function(i,n){switch(n.details){case T.ErrorDetails.FRAG_LOAD_ERROR:case T.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},s.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},s.getNextABRAutoLevel=function(){var i=this.fragCurrent,n=this.partCurrent,t=this.hls,u=t.maxAutoLevel,y=t.config,g=t.minAutoLevel,_=t.media,b=n?n.duration:i?i.duration:0,v=_?_.currentTime:0,m=_&&_.playbackRate!==0?Math.abs(_.playbackRate):1,E=this.bwEstimator?this.bwEstimator.getEstimate():y.abrEwmaDefaultEstimate,a=(C.BufferHelper.bufferInfo(_,v,y.maxBufferHole).end-v)/m,x=this.findBestLevel(E,g,u,a,y.abrBandWidthFactor,y.abrBandWidthUpFactor);if(x>=0)return x;p.logger.trace((a?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var O=b?Math.min(b,y.maxStarvationDelay):y.maxStarvationDelay,A=y.abrBandWidthFactor,D=y.abrBandWidthUpFactor;if(!a){var I=this.bitrateTestDelay;if(I){var F=b?Math.min(b,y.maxLoadingDelay):y.maxLoadingDelay;O=F-I,p.logger.trace("bitrate test took "+Math.round(1e3*I)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*O)+" ms"),A=D=1}}return x=this.findBestLevel(E,g,u,a+O,A,D),Math.max(x,0)},s.findBestLevel=function(i,n,t,u,y,g){for(var _,b=this.fragCurrent,v=this.partCurrent,m=this.lastLoadedFragLevel,E=this.hls.levels,a=E[m],x=!!(a!=null&&(_=a.details)!==null&&_!==void 0&&_.live),O=a==null?void 0:a.codecSet,A=v?v.duration:b?b.duration:0,D=t;D>=n;D--){var I=E[D];if(!I||O&&I.codecSet!==O)continue;var F=I.details,K=(v?F==null?void 0:F.partTarget:F==null?void 0:F.averagetargetduration)||A,ne=void 0;D<=m?ne=y*i:ne=g*i;var j=E[D].maxBitrate,G=j*K/ne;if(p.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+D+"/"+Math.round(ne)+"/"+j+"/"+K+"/"+u+"/"+G),ne>j&&(!G||x&&!this.bitrateTestDelay||G0&&a===-1?(this.log("Override startPosition with lastCurrentTime @"+x.toFixed(3)),this.state=P.State.IDLE):(this.loadedmetadata=!1,this.state=P.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=a,this.tick()},m.doTick=function(){switch(this.state){case P.State.IDLE:this.doTickIdle();break;case P.State.WAITING_TRACK:{var a,x=this.levels,O=this.trackId,A=x==null||((a=x[O])===null||a===void 0)?void 0:a.details;if(A){if(this.waitForCdnTuneIn(A))break;this.state=P.State.WAITING_INIT_PTS}break}case P.State.FRAG_LOADING_WAITING_RETRY:{var D,I=performance.now(),F=this.retryDate;(!F||I>=F||(D=this.media)!==null&&D!==void 0&&D.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=P.State.IDLE);break}case P.State.WAITING_INIT_PTS:{var K=this.waitingData;if(K){var ne=K.frag,j=K.part,G=K.cache,X=K.complete;if(this.initPTS[ne.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=P.State.FRAG_LOADING;var J=G.flush(),B={frag:ne,part:j,payload:J,networkDetails:null};this._handleFragmentLoadProgress(B),X&&b.prototype._handleFragmentLoadComplete.call(this,B)}else if(this.videoTrackCC!==this.waitingVideoCC)n.logger.log("Waiting fragment cc ("+ne.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var Q=this.getLoadPosition(),ie=C.BufferHelper.bufferInfo(this.mediaBuffer,Q,this.config.maxBufferHole),oe=Object(s.fragmentWithinToleranceTest)(ie.end,this.config.maxFragLookUpTolerance,ne);oe<0&&(n.logger.log("Waiting fragment cc ("+ne.cc+") @ "+ne.start+" cancelled because another fragment at "+ie.end+" is needed"),this.clearWaitingFragment())}}else this.state=P.State.IDLE}}this.onTickEnd()},m.clearWaitingFragment=function(){var a=this.waitingData;a&&(this.fragmentTracker.removeFragment(a.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=P.State.IDLE)},m.onTickEnd=function(){var a=this.media;if(!a||!a.readyState)return;var x=this.mediaBuffer?this.mediaBuffer:a,O=x.buffered;!this.loadedmetadata&&O.length&&(this.loadedmetadata=!0),this.lastCurrentTime=a.currentTime},m.doTickIdle=function(){var a,x,O=this.hls,A=this.levels,D=this.media,I=this.trackId,F=O.config;if(!A||!A[I])return;if(!D&&(this.startFragRequested||!F.startFragPrefetch))return;var K=A[I],ne=K.details;if(!ne||ne.live&&this.levelLastLoaded!==I||this.waitForCdnTuneIn(ne)){this.state=P.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,h.ElementaryStreamTypes.AUDIO,p.PlaylistLevelType.AUDIO));var j=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,p.PlaylistLevelType.AUDIO);if(j===null)return;var G=j.len,X=this.getMaxBufferLength(),J=this.audioSwitch;if(G>=X&&!J)return;if(!J&&this._streamEnded(j,ne)){O.trigger(S.Events.BUFFER_EOS,{type:"audio"}),this.state=P.State.ENDED;return}var B=ne.fragments,Q=B[0].start,ie=j.end;if(J){var oe=this.getLoadPosition();ie=oe,ne.PTSKnown&&oeQ||j.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),D.currentTime=Q+.05))}var xe=this.getNextFragment(ie,ne);if(!xe){this.bufferFlushed=!0;return}((a=xe.decryptdata)===null||a===void 0?void 0:a.keyFormat)==="identity"&&!((x=xe.decryptdata)!==null&&x!==void 0&&x.key)?this.loadKey(xe,ne):this.loadFragment(xe,ne,ie)},m.getMaxBufferLength=function(){var a=b.prototype.getMaxBufferLength.call(this),x=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,p.PlaylistLevelType.MAIN);return x===null?a:Math.max(a,x.len)},m.onMediaDetaching=function(){this.videoBuffer=null,b.prototype.onMediaDetaching.call(this)},m.onAudioTracksUpdated=function(a,x){var O=x.audioTracks;this.resetTransmuxer(),this.levels=O.map(function(A){return new l.Level(A)})},m.onAudioTrackSwitching=function(a,x){var O=!!x.url;this.trackId=x.id;var A=this.fragCurrent;A!=null&&A.loader&&A.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),O?this.setInterval(g):this.resetTransmuxer(),O?(this.audioSwitch=!0,this.state=P.State.IDLE):this.state=P.State.STOPPED,this.tick()},m.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},m.onLevelLoaded=function(a,x){this.mainDetails=x.details},m.onAudioTrackLoaded=function(a,x){var O,A=this.levels,D=x.details,I=x.id;if(!A){this.warn("Audio tracks were reset while loading level "+I);return}this.log("Track "+I+" loaded ["+D.startSN+","+D.endSN+"],duration:"+D.totalduration);var F=A[I],K=0;if(D.live||(O=F.details)!==null&&O!==void 0&&O.live){var ne=this.mainDetails;if(D.fragments[0]||(D.deltaUpdateFailed=!0),D.deltaUpdateFailed||!ne)return;!F.details&&D.hasProgramDateTime&&ne.hasProgramDateTime?(Object(f.alignMediaPlaylistByPDT)(D,ne),K=D.fragments[0].start):K=this.alignPlaylists(D,F.details)}F.details=D,this.levelLastLoaded=I,!this.startFragRequested&&(this.mainDetails||!D.live)&&this.setStartPosition(F.details,K),this.state===P.State.WAITING_TRACK&&!this.waitForCdnTuneIn(D)&&(this.state=P.State.IDLE),this.tick()},m._handleFragmentLoadProgress=function(a){var x,O=a.frag,A=a.part,D=a.payload,I=this.config,F=this.trackId,K=this.levels;if(!K){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+O.sn+" of level "+O.level+" will not be buffered");return}var ne=K[F];console.assert(ne,"Audio track is defined on fragment load progress");var j=ne.details;console.assert(j,"Audio track details are defined on fragment load progress");var G=I.defaultAudioCodec||ne.audioCodec||"mp4a.40.2",X=this.transmuxer;X||(X=this.transmuxer=new o.default(this.hls,p.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var J=this.initPTS[O.cc],B=(x=O.initSegment)===null||x===void 0?void 0:x.data;if(J!==void 0){var Q=!1,ie=A?A.index:-1,oe=ie!==-1,xe=new c.ChunkMetadata(O.level,O.sn,O.stats.chunkCount,D.byteLength,ie,oe);X.push(D,B,G,"",O,A,j.totalduration,Q,xe,J)}else{n.logger.log("Unknown video PTS for cc "+O.cc+", waiting for video PTS before demuxing audio frag "+O.sn+" of ["+j.startSN+" ,"+j.endSN+"],track "+F);var ye=this.waitingData=this.waitingData||{frag:O,part:A,cache:new d.default,complete:!1},Ae=ye.cache;Ae.push(new Uint8Array(D)),this.waitingVideoCC=this.videoTrackCC,this.state=P.State.WAITING_INIT_PTS}},m._handleFragmentLoadComplete=function(a){if(this.waitingData){this.waitingData.complete=!0;return}b.prototype._handleFragmentLoadComplete.call(this,a)},m.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},m.onBufferCreated=function(a,x){var O=x.tracks.audio;O&&(this.mediaBuffer=O.buffer),x.tracks.video&&(this.videoBuffer=x.tracks.video.buffer)},m.onFragBuffered=function(a,x){var O=x.frag,A=x.part;if(O.type!==p.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(O)){this.warn("Fragment "+O.sn+(A?" p: "+A.index:"")+" of level "+O.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}O.sn!=="initSegment"&&(this.fragPrevious=O,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(S.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(O,A)},m.onError=function(a,x){switch(x.details){case i.ErrorDetails.FRAG_LOAD_ERROR:case i.ErrorDetails.FRAG_LOAD_TIMEOUT:case i.ErrorDetails.KEY_LOAD_ERROR:case i.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(p.PlaylistLevelType.AUDIO,x);break;case i.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case i.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==P.State.ERROR&&this.state!==P.State.STOPPED&&(this.state=x.fatal?P.State.ERROR:P.State.IDLE,this.warn(x.details+" while loading frag, switching to "+this.state+" state"));break;case i.ErrorDetails.BUFFER_FULL_ERROR:if(x.parent==="audio"&&(this.state===P.State.PARSING||this.state===P.State.PARSED)){var O=!0,A=this.getFwdBufferInfo(this.mediaBuffer,p.PlaylistLevelType.AUDIO);A&&A.len>.5&&(O=!this.reduceMaxBufferLength(A.len)),O&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,b.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},m.onBufferFlushed=function(a,x){var O=x.type;O===h.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},m._handleTransmuxComplete=function(a){var x,O="audio",A=this.hls,D=a.remuxResult,I=a.chunkMeta,F=this.getCurrentContext(I);if(!F){this.warn("The loading context changed while buffering fragment "+I.sn+" of level "+I.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(I.level);return}var K=F.frag,ne=F.part,j=D.audio,G=D.text,X=D.id3,J=D.initSegment;if(this.fragContextChanged(K))return;if(this.state=P.State.PARSING,this.audioSwitch&&j&&this.completeAudioSwitch(),J!=null&&J.tracks&&(this._bufferInitSegment(J.tracks,K,I),A.trigger(S.Events.FRAG_PARSING_INIT_SEGMENT,{frag:K,id:O,tracks:J.tracks})),j){var B=j.startPTS,Q=j.endPTS,ie=j.startDTS,oe=j.endDTS;ne&&(ne.elementaryStreams[h.ElementaryStreamTypes.AUDIO]={startPTS:B,endPTS:Q,startDTS:ie,endDTS:oe}),K.setElementaryStreamInfo(h.ElementaryStreamTypes.AUDIO,B,Q,ie,oe),this.bufferFragmentData(j,K,ne,I)}if(X!=null&&(x=X.samples)!==null&&x!==void 0&&x.length){var xe=t({frag:K,id:O},X);A.trigger(S.Events.FRAG_PARSING_METADATA,xe)}if(G){var ye=t({frag:K,id:O},G);A.trigger(S.Events.FRAG_PARSING_USERDATA,ye)}},m._bufferInitSegment=function(a,x,O){if(this.state!==P.State.PARSING)return;a.video&&delete a.video;var A=a.audio;if(!A)return;A.levelCodec=A.codec,A.id="audio",this.log("Init audio buffer, container:"+A.container+", codecs[parsed]=["+A.codec+"]"),this.hls.trigger(S.Events.BUFFER_CODECS,a);var D=A.initSegment;if(D!=null&&D.byteLength){var I={type:"audio",frag:x,part:null,chunkMeta:O,parent:x.type,data:D};this.hls.trigger(S.Events.BUFFER_APPENDING,I)}this.tick()},m.loadFragment=function(a,x,O){var A=this.fragmentTracker.getState(a);this.fragCurrent=a,(this.audioSwitch||A===T.FragmentState.NOT_LOADED||A===T.FragmentState.PARTIAL)&&(a.sn==="initSegment"?this._loadInitSegment(a):x.live&&!Object(w.isFiniteNumber)(this.initPTS[a.cc])?(this.log("Waiting for video PTS in continuity counter "+a.cc+" of live stream before loading audio fragment "+a.sn+" of level "+this.trackId),this.state=P.State.WAITING_INIT_PTS):(this.startFragRequested=!0,b.prototype.loadFragment.call(this,a,x,O)))},m.completeAudioSwitch=function(){var a=this.hls,x=this.media,O=this.trackId;x&&(this.log("Switching audio track : flushing all audio"),b.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,a.trigger(S.Events.AUDIO_TRACK_SWITCHED,{id:O})},v}(P.default);Z.default=_},"./src/controller/audio-track-controller.ts":function(ae,Z,U){"use strict";U.r(Z);var w=U("./src/events.ts"),P=U("./src/errors.ts"),S=U("./src/controller/base-playlist-controller.ts"),C=U("./src/types/loader.ts");function T(o,c){for(var s=0;s=n.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var t=n[this.trackId];this.log("Now switching to audio-track index "+i);var u=n[i],y=u.id,g=u.groupId,_=g===void 0?"":g,b=u.name,v=u.type,m=u.url;if(this.trackId=i,this.trackName=b,this.selectDefaultTrack=!1,this.hls.trigger(w.Events.AUDIO_TRACK_SWITCHING,{id:y,groupId:_,name:b,type:v,url:m}),u.details&&!u.details.live)return;var E=this.switchParams(u.url,t==null?void 0:t.details);this.loadPlaylist(E)},s.selectInitialTrack=function(){var i=this.tracksInGroup;console.assert(i.length,"Initial audio track should be selected when tracks are known");var n=this.trackName,t=this.findTrackId(n)||this.findTrackId();t!==-1?this.setAudioTrack(t):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},s.findTrackId=function(i){for(var n=this.tracksInGroup,t=0;tc.partTarget&&(u+=1)}if(Object(w.isFiniteNumber)(t))return new P.HlsUrlParameters(t,Object(w.isFiniteNumber)(u)?u:void 0,P.HlsSkip.No)}}},h.loadPlaylist=function(o){},h.shouldLoadTrack=function(o){return this.canLoad&&o&&!!o.url&&(!o.details||o.details.live)},h.playlistLoaded=function(o,c,s){var f=this,i=c.details,n=c.stats,t=n.loading.end?Math.max(0,self.performance.now()-n.loading.end):0;if(i.advancedDateTime=Date.now()-t,i.live||s!=null&&s.live){if(i.reloaded(s),s&&this.log("live playlist "+o+" "+(i.advanced?"REFRESHED "+i.lastPartSn+"-"+i.lastPartIndex:"MISSED")),s&&i.fragments.length>0&&Object(S.mergeDetails)(s,i),!this.canLoad||!i.live)return;var u,y=void 0,g=void 0;if(i.canBlockReload&&i.endSN&&i.advanced){var _=this.hls.config.lowLatencyMode,b=i.lastPartSn,v=i.endSN,m=i.lastPartIndex,E=m!==-1,a=b===v,x=_?0:m;E?(y=a?v+1:b,g=a?x:m+1):y=v+1;var O=i.age,A=O+i.ageHeader,D=Math.min(A-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(y+=I,g!==void 0){var F=Math.round(D%i.targetduration/i.partTarget);g+=F}this.log("CDN Tune-in age: "+i.ageHeader+"s last advanced "+O.toFixed(2)+"s goal: "+D+" skip sn "+I+" to part "+g)}i.tuneInGoal=D}if(u=this.getDeliveryDirectives(i,c.deliveryDirectives,y,g),_||!a){this.loadPlaylist(u);return}}else u=this.getDeliveryDirectives(i,c.deliveryDirectives,y,g);var K=Object(S.computeReloadInterval)(i,n);y!==void 0&&i.canBlockReload&&(K-=i.partTarget||1),this.log("reload live playlist "+o+" in "+Math.round(K)+" ms"),this.timer=self.setTimeout(function(){return f.loadPlaylist(u)},K)}else this.clearTimer()},h.getDeliveryDirectives=function(o,c,s,f){var i=Object(P.getSkipValue)(o,s);return c!=null&&c.skip&&o.deltaUpdateFailed&&(s=c.msn,f=c.part,i=P.HlsSkip.No),new P.HlsUrlParameters(s,f,i)},h.retryLoadingOrFail=function(o){var c=this,s=this.hls.config,f=this.retryCount-1&&(i=o.context)!==null&&i!==void 0&&i.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+o.details+'"'),this.loadPlaylist();else{var n=Math.min(Math.pow(2,this.retryCount)*s.levelLoadingRetryDelay,s.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return c.loadPlaylist()},n),this.warn("retry playlist loading #"+this.retryCount+" in "+n+' ms after "'+o.details+'"')}}else this.warn('cannot recover from error "'+o.details+'"'),this.clearTimer(),o.fatal=!0;return f},p}()},"./src/controller/base-stream-controller.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"State",function(){return v}),U.d(Z,"default",function(){return m});var w=U("./src/polyfills/number.ts"),P=U("./src/task-loop.ts"),S=U("./src/controller/fragment-tracker.ts"),C=U("./src/utils/buffer-helper.ts"),T=U("./src/utils/logger.ts"),l=U("./src/events.ts"),p=U("./src/errors.ts"),h=U("./src/types/transmuxer.ts"),d=U("./src/utils/mp4-tools.ts"),o=U("./src/utils/discontinuities.ts"),c=U("./src/controller/fragment-finders.ts"),s=U("./src/controller/level-helper.ts"),f=U("./src/loader/fragment-loader.ts"),i=U("./src/crypt/decrypter.ts"),n=U("./src/utils/time-ranges.ts"),t=U("./src/types/loader.ts");function u(E,a){for(var x=0;xJ;(ne0&&ne&&ne.key&&ne.iv&&ne.method==="AES-128"){var j=self.performance.now();return D.decrypter.webCryptoDecrypt(new Uint8Array(K),ne.key.buffer,ne.iv.buffer).then(function(G){var X=self.performance.now();return F.trigger(l.Events.FRAG_DECRYPTED,{frag:A,payload:G,stats:{tstart:j,tdecrypt:X}}),I.payload=G,I})}return I}).then(function(I){var F=D.fragCurrent,K=D.hls,ne=D.levels;if(!ne)throw new Error("init load aborted, missing levels");var j=ne[A.level].details;console.assert(j,"Level details are defined when init segment is loaded");var G=A.stats;D.state=v.IDLE,D.fragLoadError=0,A.data=new Uint8Array(I.payload),G.parsing.start=G.buffering.start=self.performance.now(),G.parsing.end=G.buffering.end=self.performance.now(),I.frag===F&&K.trigger(l.Events.FRAG_BUFFERED,{stats:G,frag:F,part:null,id:A.type}),D.tick()}).catch(function(I){D.warn(I),D.resetFragmentLoading(A)})},x.fragContextChanged=function(A){var D=this.fragCurrent;return!A||!D||A.level!==D.level||A.sn!==D.sn||A.urlId!==D.urlId},x.fragBufferedComplete=function(A,D){var I=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+A.type+" sn: "+A.sn+(D?" part: "+D.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+A.level+" "+n.default.toString(C.BufferHelper.getBuffered(I))),this.state=v.IDLE,this.tick()},x._handleFragmentLoadComplete=function(A){var D=this.transmuxer;if(!D)return;var I=A.frag,F=A.part,K=A.partsLoaded,ne=!K||K.length===0||K.some(function(G){return!G}),j=new h.ChunkMetadata(I.level,I.sn,I.stats.chunkCount+1,0,F?F.index:-1,!ne);D.flush(j)},x._handleFragmentLoadProgress=function(A){},x._doFragLoad=function(A,D,I,F){var K=this;if(I===void 0&&(I=null),!this.levels)throw new Error("frag load aborted, missing levels");if(I=Math.max(A.start,I||0),this.config.lowLatencyMode&&D){var ne=D.partList;if(ne&&F){I>A.end&&D.fragmentHint&&(A=D.fragmentHint);var j=this.getNextPart(ne,A,I);if(j>-1){var G=ne[j];return this.log("Loading part sn: "+A.sn+" p: "+G.index+" cc: "+A.cc+" of playlist ["+D.startSN+"-"+D.endSN+"] parts [0-"+j+"-"+(ne.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+A.level+", target: "+parseFloat(I.toFixed(3))),this.nextLoadPosition=G.start+G.duration,this.state=v.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:A,part:ne[j],targetBufferTime:I}),this.doFragPartsLoad(A,ne,j,F).catch(function(X){return K.handleFragLoadError(X)})}else if(!A.url||this.loadedEndOfParts(ne,I))return Promise.resolve(null)}}return this.log("Loading fragment "+A.sn+" cc: "+A.cc+" "+(D?"of ["+D.startSN+"-"+D.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+A.level+", target: "+parseFloat(I.toFixed(3))),Object(w.isFiniteNumber)(A.sn)&&!this.bitrateTest&&(this.nextLoadPosition=A.start+A.duration),this.state=v.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:A,targetBufferTime:I}),this.fragmentLoader.load(A,F).catch(function(X){return K.handleFragLoadError(X)})},x.doFragPartsLoad=function(A,D,I,F){var K=this;return new Promise(function(ne,j){var G=[],X=function J(B){var Q=D[B];K.fragmentLoader.loadPart(A,Q,F).then(function(ie){G[Q.index]=ie;var oe=ie.part;K.hls.trigger(l.Events.FRAG_LOADED,ie);var xe=D[B+1];if(xe&&xe.fragment===A)J(B+1);else return ne({frag:A,part:oe,partsLoaded:G})}).catch(j)};X(I)})},x.handleFragLoadError=function(A){var D=A.data;return D&&D.details===p.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(D.frag,D.part):this.hls.trigger(l.Events.ERROR,D),null},x._handleTransmuxerFlush=function(A){var D=this.getCurrentContext(A);if(!D||this.state!==v.PARSING){this.fragCurrent||(this.state=v.IDLE);return}var I=D.frag,F=D.part,K=D.level,ne=self.performance.now();I.stats.parsing.end=ne,F&&(F.stats.parsing.end=ne),this.updateLevelTiming(I,F,K,A.partial)},x.getCurrentContext=function(A){var D=this.levels,I=A.level,F=A.sn,K=A.part;if(!D||!D[I])return this.warn("Levels object was unset while buffering fragment "+F+" of level "+I+". The current chunk will not be buffered."),null;var ne=D[I],j=K>-1?Object(s.getPartWith)(ne,F,K):null,G=j?j.fragment:Object(s.getFragmentWithSN)(ne,F,this.fragCurrent);return G?{frag:G,part:j,level:ne}:null},x.bufferFragmentData=function(A,D,I,F){if(!A||this.state!==v.PARSING)return;var K=A.data1,ne=A.data2,j=K;if(K&&ne&&(j=Object(d.appendUint8Array)(K,ne)),!j||!j.length)return;var G={type:A.type,frag:D,part:I,chunkMeta:F,parent:D.type,data:j};this.hls.trigger(l.Events.BUFFER_APPENDING,G),A.dropped&&A.independent&&!I&&this.flushBufferGap(D)},x.flushBufferGap=function(A){var D=this.media;if(!D)return;if(!C.BufferHelper.isBuffered(D,D.currentTime)){this.flushMainBuffer(0,A.start);return}var I=D.currentTime,F=C.BufferHelper.bufferInfo(D,I,0),K=A.duration,ne=Math.min(this.config.maxFragLookUpTolerance*2,K*.25),j=Math.max(Math.min(A.start-ne,F.end-ne),I+ne);A.start-j>ne&&this.flushMainBuffer(j,A.start)},x.getFwdBufferInfo=function(A,D){var I=this.config,F=this.getLoadPosition();if(!Object(w.isFiniteNumber)(F))return null;var K=C.BufferHelper.bufferInfo(A,F,I.maxBufferHole);if(K.len===0&&K.nextStart!==void 0){var ne=this.fragmentTracker.getBufferedFrag(F,D);if(ne&&K.nextStart=I?(D.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+D.maxMaxBufferLength+"s"),!0):!1},x.getNextFragment=function(A,D){var I,F,K=D.fragments,ne=K.length;if(!ne)return null;var j=this.config,G=K[0].start,X;if(D.live){var J=j.initialLiveManifestSize;if(ne-1&&II.start&&I.loaded},x.getInitialLiveFragment=function(A,D){var I=this.fragPrevious,F=null;if(I){if(A.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+I.programDateTime),F=Object(c.findFragmentByPDT)(D,I.endProgramDateTime,this.config.maxFragLookUpTolerance)),!F){var K=I.sn+1;if(K>=A.startSN&&K<=A.endSN){var ne=D[K-A.startSN];I.cc===ne.cc&&(F=ne,this.log("Live playlist, switching playlist, load frag with next SN: "+F.sn))}F||(F=Object(c.findFragWithCC)(D,I.cc),F&&this.log("Live playlist, switching playlist, load frag with same CC: "+F.sn))}}else{var j=this.hls.liveSyncPosition;j!==null&&(F=this.getFragmentAtPosition(j,this.bitrateTest?A.fragmentEnd:A.edge,A))}return F},x.getFragmentAtPosition=function(A,D,I){var F=this.config,K=this.fragPrevious,ne=I.fragments,j=I.endSN,G=I.fragmentHint,X=F.maxFragLookUpTolerance,J=!!(F.lowLatencyMode&&I.partList&&G);J&&G&&!this.bitrateTest&&(ne=ne.concat(G),j=G.sn);var B;if(AD-X?0:X;B=Object(c.findFragmentByPTS)(K,ne,A,Q)}else B=ne[ne.length-1];if(B){var ie=B.sn-I.startSN,oe=K&&B.level===K.level,xe=ne[ie+1],ye=this.fragmentTracker.getState(B);if(ye===S.FragmentState.BACKTRACKED){B=null;for(var Ae=ie;ne[Ae]&&this.fragmentTracker.getState(ne[Ae])===S.FragmentState.BACKTRACKED;)K?B=ne[Ae--]:B=ne[--Ae];B||(B=xe)}else K&&B.sn===K.sn&&!J&&(oe&&(B.sn=ne-D.maxFragLookUpTolerance&&K<=j;if(F!==null&&I.duration>F&&(K"+A.startSN+" prev-sn: "+(K?K.sn:"na")+" fragments: "+j),B}return G},x.waitForCdnTuneIn=function(A){var D=3;return A.live&&A.canBlockReload&&A.tuneInGoal>Math.max(A.partHoldBack,A.partTarget*D)},x.setStartPosition=function(A,D){var I=this.startPosition;if(I"+A))}}]),a}(P.default)},"./src/controller/buffer-controller.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return c});var w=U("./src/polyfills/number.ts"),P=U("./src/events.ts"),S=U("./src/utils/logger.ts"),C=U("./src/errors.ts"),T=U("./src/utils/buffer-helper.ts"),l=U("./src/utils/mediasource-helper.ts"),p=U("./src/loader/fragment.ts"),h=U("./src/controller/buffer-operation-queue.ts"),d=Object(l.getMediaSource)(),o=/([ha]vc.)(?:\.[^.,]+)+/,c=function(){function s(i){var n=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var t=n.hls,u=n.media,y=n.mediaSource;S.logger.log("[buffer-controller]: Media source opened"),u&&(n.updateMediaElementDuration(),t.trigger(P.Events.MEDIA_ATTACHED,{media:u})),y&&y.removeEventListener("sourceopen",n._onMediaSourceOpen),n.checkPendingTracks()},this._onMediaSourceClose=function(){S.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){S.logger.log("[buffer-controller]: Media source ended")},this.hls=i,this._initSourceBuffer(),this.registerListeners()}var f=s.prototype;return f.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},f.destroy=function(){this.unregisterListeners(),this.details=null},f.registerListeners=function(){var n=this.hls;n.on(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(P.Events.BUFFER_RESET,this.onBufferReset,this),n.on(P.Events.BUFFER_APPENDING,this.onBufferAppending,this),n.on(P.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.on(P.Events.BUFFER_EOS,this.onBufferEos,this),n.on(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),n.on(P.Events.LEVEL_UPDATED,this.onLevelUpdated,this),n.on(P.Events.FRAG_PARSED,this.onFragParsed,this),n.on(P.Events.FRAG_CHANGED,this.onFragChanged,this)},f.unregisterListeners=function(){var n=this.hls;n.off(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(P.Events.BUFFER_RESET,this.onBufferReset,this),n.off(P.Events.BUFFER_APPENDING,this.onBufferAppending,this),n.off(P.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.off(P.Events.BUFFER_EOS,this.onBufferEos,this),n.off(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),n.off(P.Events.LEVEL_UPDATED,this.onLevelUpdated,this),n.off(P.Events.FRAG_PARSED,this.onFragParsed,this),n.off(P.Events.FRAG_CHANGED,this.onFragChanged,this)},f._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new h.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},f.onManifestParsed=function(n,t){var u=2;(t.audio&&!t.video||!t.altAudio)&&(u=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=u,this.details=null,S.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},f.onMediaAttaching=function(n,t){var u=this.media=t.media;if(u&&d){var y=this.mediaSource=new d;y.addEventListener("sourceopen",this._onMediaSourceOpen),y.addEventListener("sourceended",this._onMediaSourceEnded),y.addEventListener("sourceclose",this._onMediaSourceClose),u.src=self.URL.createObjectURL(y),this._objectUrl=u.src}},f.onMediaDetaching=function(){var n=this.media,t=this.mediaSource,u=this._objectUrl;if(t){if(S.logger.log("[buffer-controller]: media source detaching"),t.readyState==="open")try{t.endOfStream()}catch(y){S.logger.warn("[buffer-controller]: onMediaDetaching: "+y.message+" while calling endOfStream")}this.onBufferReset(),t.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("sourceended",this._onMediaSourceEnded),t.removeEventListener("sourceclose",this._onMediaSourceClose),n&&(u&&self.URL.revokeObjectURL(u),n.src===u?(n.removeAttribute("src"),n.load()):S.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(P.Events.MEDIA_DETACHED,void 0)},f.onBufferReset=function(){var n=this;this.getSourceBufferTypes().forEach(function(t){var u=n.sourceBuffer[t];try{u&&(n.removeBufferListeners(t),n.mediaSource&&n.mediaSource.removeSourceBuffer(u),n.sourceBuffer[t]=void 0)}catch(y){S.logger.warn("[buffer-controller]: Failed to reset the "+t+" buffer",y)}}),this._initSourceBuffer()},f.onBufferCodecs=function(n,t){var u=this,y=this.getSourceBufferTypes().length;if(Object.keys(t).forEach(function(g){if(y){var _=u.tracks[g];if(_&&typeof _.buffer.changeType=="function"){var b=t[g],v=b.codec,m=b.levelCodec,E=b.container,a=(_.levelCodec||_.codec).replace(o,"$1"),x=(m||v).replace(o,"$1");if(a!==x){var O=E+";codecs="+(m||v);u.appendChangeType(g,O)}}}else u.pendingTracks[g]=t[g]}),y)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},f.appendChangeType=function(n,t){var u=this,y=this.operationQueue,g={execute:function(){var b=u.sourceBuffer[n];b&&(S.logger.log("[buffer-controller]: changing "+n+" sourceBuffer type to "+t),b.changeType(t)),y.shiftAndExecuteNext(n)},onStart:function(){},onComplete:function(){},onError:function(b){S.logger.warn("[buffer-controller]: Failed to change "+n+" SourceBuffer type",b)}};y.append(g,n)},f.onBufferAppending=function(n,t){var u=this,y=this.hls,g=this.operationQueue,_=this.tracks,b=t.data,v=t.type,m=t.frag,E=t.part,a=t.chunkMeta,x=a.buffering[v],O=self.performance.now();x.start=O;var A=m.stats.buffering,D=E?E.stats.buffering:null;A.start===0&&(A.start=O),D&&D.start===0&&(D.start=O);var I=_.audio,F=v==="audio"&&a.id===1&&(I==null?void 0:I.container)==="audio/mpeg",K={execute:function(){if(x.executeStart=self.performance.now(),F){var j=u.sourceBuffer[v];if(j){var G=m.start-j.timestampOffset;Math.abs(G)>=.1&&(S.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+m.start+" (delta: "+G+") sn: "+m.sn+")"),j.timestampOffset=m.start)}}u.appendExecutor(b,v)},onStart:function(){},onComplete:function(){var j=self.performance.now();x.executeEnd=x.end=j,A.first===0&&(A.first=j),D&&D.first===0&&(D.first=j);var G=u.sourceBuffer,X={};for(var J in G)X[J]=T.BufferHelper.getBuffered(G[J]);u.appendError=0,u.hls.trigger(P.Events.BUFFER_APPENDED,{type:v,frag:m,part:E,chunkMeta:a,parent:m.type,timeRanges:X})},onError:function(j){S.logger.error("[buffer-controller]: Error encountered while trying to append to the "+v+" SourceBuffer",j);var G={type:C.ErrorTypes.MEDIA_ERROR,parent:m.type,details:C.ErrorDetails.BUFFER_APPEND_ERROR,err:j,fatal:!1};j.code===DOMException.QUOTA_EXCEEDED_ERR?G.details=C.ErrorDetails.BUFFER_FULL_ERROR:(u.appendError++,G.details=C.ErrorDetails.BUFFER_APPEND_ERROR,u.appendError>y.config.appendErrorMaxRetry&&(S.logger.error("[buffer-controller]: Failed "+y.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),G.fatal=!0)),y.trigger(P.Events.ERROR,G)}};g.append(K,v)},f.onBufferFlushing=function(n,t){var u=this,y=this.operationQueue,g=function(b){return{execute:u.removeExecutor.bind(u,b,t.startOffset,t.endOffset),onStart:function(){},onComplete:function(){u.hls.trigger(P.Events.BUFFER_FLUSHED,{type:b})},onError:function(m){S.logger.warn("[buffer-controller]: Failed to remove from "+b+" SourceBuffer",m)}}};t.type?y.append(g(t.type),t.type):this.getSourceBufferTypes().forEach(function(_){y.append(g(_),_)})},f.onFragParsed=function(n,t){var u=this,y=t.frag,g=t.part,_=[],b=g?g.elementaryStreams:y.elementaryStreams;b[p.ElementaryStreamTypes.AUDIOVIDEO]?_.push("audiovideo"):(b[p.ElementaryStreamTypes.AUDIO]&&_.push("audio"),b[p.ElementaryStreamTypes.VIDEO]&&_.push("video"));var v=function(){var E=self.performance.now();y.stats.buffering.end=E,g&&(g.stats.buffering.end=E);var a=g?g.stats:y.stats;u.hls.trigger(P.Events.FRAG_BUFFERED,{frag:y,part:g,stats:a,id:y.type})};_.length===0&&S.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+y.type+" level: "+y.level+" sn: "+y.sn),this.blockBuffers(v,_)},f.onFragChanged=function(n,t){this.flushBackBuffer()},f.onBufferEos=function(n,t){var u=this,y=this.getSourceBufferTypes().reduce(function(g,_){var b=u.sourceBuffer[_];return(!t.type||t.type===_)&&(b&&!b.ended&&(b.ended=!0,S.logger.log("[buffer-controller]: "+_+" sourceBuffer now EOS"))),g&&!!(!b||b.ended)},!0);y&&this.blockBuffers(function(){var g=u.mediaSource;if(!g||g.readyState!=="open")return;g.endOfStream()})},f.onLevelUpdated=function(n,t){var u=t.details;if(!u.fragments.length)return;this.details=u,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},f.flushBackBuffer=function(){var n=this.hls,t=this.details,u=this.media,y=this.sourceBuffer;if(!u||t===null)return;var g=this.getSourceBufferTypes();if(!g.length)return;var _=t.live&&n.config.liveBackBufferLength!==null?n.config.liveBackBufferLength:n.config.backBufferLength;if(!Object(w.isFiniteNumber)(_)||_<0)return;var b=u.currentTime,v=t.levelTargetDuration,m=Math.max(_,v),E=Math.floor(b/v)*v-m;g.forEach(function(a){var x=y[a];if(x){var O=T.BufferHelper.getBuffered(x);O.length>0&&E>O.start(0)&&(n.trigger(P.Events.BACK_BUFFER_REACHED,{bufferEnd:E}),t.live&&n.trigger(P.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:E}),n.trigger(P.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:E,type:a}))}})},f.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var n=this.details,t=this.hls,u=this.media,y=this.mediaSource,g=n.fragments[0].start+n.totalduration,_=u.duration,b=Object(w.isFiniteNumber)(y.duration)?y.duration:0;n.live&&t.config.liveDurationInfinity?(S.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),y.duration=Infinity,this.updateSeekableRange(n)):(g>b&&g>_||!Object(w.isFiniteNumber)(_))&&(S.logger.log("[buffer-controller]: Updating Media Source duration to "+g.toFixed(3)),y.duration=g)},f.updateSeekableRange=function(n){var t=this.mediaSource,u=n.fragments,y=u.length;if(y&&n.live&&t!==null&&t!==void 0&&t.setLiveSeekableRange){var g=Math.max(0,u[0].start),_=Math.max(g,g+n.totalduration);t.setLiveSeekableRange(g,_)}},f.checkPendingTracks=function(){var n=this.bufferCodecEventsExpected,t=this.operationQueue,u=this.pendingTracks,y=Object.keys(u).length;if(y&&!n||y===2){this.createSourceBuffers(u),this.pendingTracks={};var g=this.getSourceBufferTypes();if(g.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}g.forEach(function(_){t.executeNext(_)})}},f.createSourceBuffers=function(n){var t=this.sourceBuffer,u=this.mediaSource;if(!u)throw Error("createSourceBuffers called when mediaSource was null");var y=0;for(var g in n)if(!t[g]){var _=n[g];if(!_)throw Error("source buffer exists for track "+g+", however track does not");var b=_.levelCodec||_.codec,v=_.container+";codecs="+b;S.logger.log("[buffer-controller]: creating sourceBuffer("+v+")");try{var m=t[g]=u.addSourceBuffer(v),E=g;this.addBufferListener(E,"updatestart",this._onSBUpdateStart),this.addBufferListener(E,"updateend",this._onSBUpdateEnd),this.addBufferListener(E,"error",this._onSBUpdateError),this.tracks[g]={buffer:m,codec:b,container:_.container,levelCodec:_.levelCodec,id:_.id},y++}catch(a){S.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+a.message),this.hls.trigger(P.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:a,mimeType:v})}}y&&this.hls.trigger(P.Events.BUFFER_CREATED,{tracks:this.tracks})},f._onSBUpdateStart=function(n){var t=this.operationQueue,u=t.current(n);u.onStart()},f._onSBUpdateEnd=function(n){var t=this.operationQueue,u=t.current(n);u.onComplete(),t.shiftAndExecuteNext(n)},f._onSBUpdateError=function(n,t){S.logger.error("[buffer-controller]: "+n+" SourceBuffer error",t),this.hls.trigger(P.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var u=this.operationQueue.current(n);u&&u.onError(t)},f.removeExecutor=function(n,t,u){var y=this.media,g=this.mediaSource,_=this.operationQueue,b=this.sourceBuffer,v=b[n];if(!y||!g||!v){S.logger.warn("[buffer-controller]: Attempting to remove from the "+n+" SourceBuffer, but it does not exist"),_.shiftAndExecuteNext(n);return}var m=Object(w.isFiniteNumber)(y.duration)?y.duration:Infinity,E=Object(w.isFiniteNumber)(g.duration)?g.duration:Infinity,a=Math.max(0,t),x=Math.min(u,m,E);x>a?(S.logger.log("[buffer-controller]: Removing ["+a+","+x+"] from the "+n+" SourceBuffer"),console.assert(!v.updating,n+" sourceBuffer must not be updating"),v.remove(a,x)):_.shiftAndExecuteNext(n)},f.appendExecutor=function(n,t){var u=this.operationQueue,y=this.sourceBuffer,g=y[t];if(!g){S.logger.warn("[buffer-controller]: Attempting to append to the "+t+" SourceBuffer, but it does not exist"),u.shiftAndExecuteNext(t);return}g.ended=!1,console.assert(!g.updating,t+" sourceBuffer must not be updating"),g.appendBuffer(n)},f.blockBuffers=function(n,t){var u=this;if(t===void 0&&(t=this.getSourceBufferTypes()),!t.length){S.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(n);return}var y=this.operationQueue,g=t.map(function(_){return y.appendBlocker(_)});Promise.all(g).then(function(){n(),t.forEach(function(_){var b=u.sourceBuffer[_];(!b||!b.updating)&&y.shiftAndExecuteNext(_)})})},f.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},f.addBufferListener=function(n,t,u){var y=this.sourceBuffer[n];if(!y)return;var g=u.bind(this,n);this.listeners[n].push({event:t,listener:g}),y.addEventListener(t,g)},f.removeBufferListeners=function(n){var t=this.sourceBuffer[n];if(!t)return;this.listeners[n].forEach(function(u){t.removeEventListener(u.event,u.listener)})},s}()},"./src/controller/buffer-operation-queue.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return P});var w=U("./src/utils/logger.ts"),P=function(){function S(T){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=T}var C=S.prototype;return C.append=function(l,p){var h=this.queues[p];h.push(l),h.length===1&&this.buffers[p]&&this.executeNext(p)},C.insertAbort=function(l,p){var h=this.queues[p];h.unshift(l),this.executeNext(p)},C.appendBlocker=function(l){var p,h=new Promise(function(o){p=o}),d={execute:p,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(d,l),h},C.executeNext=function(l){var p=this.buffers,h=this.queues,d=p[l],o=h[l];if(o.length){var c=o[0];try{c.execute()}catch(s){w.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),c.onError(s),(!d||!d.updating)&&(o.shift(),this.executeNext(l))}}},C.shiftAndExecuteNext=function(l){this.queues[l].shift(),this.executeNext(l)},C.current=function(l){return this.queues[l][0]},S}()},"./src/controller/cap-level-controller.ts":function(ae,Z,U){"use strict";U.r(Z);var w=U("./src/events.ts");function P(T,l){for(var p=0;p0&&this.mediaWidth>0){var h=this.hls.levels;if(h.length){var d=this.hls;d.autoLevelCapping=this.getMaxLevel(h.length-1),d.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=d.autoLevelCapping}}},l.getMaxLevel=function(h){var d=this,o=this.hls.levels;if(!o.length)return-1;var c=o.filter(function(s,f){return T.isLevelAllowed(f,d.restrictedLevels)&&f<=h});return this.clientRect=null,T.getMaxLevelByMediaSize(c,this.mediaWidth,this.mediaHeight)},l.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()},l.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},l.getDimensions=function(){if(this.clientRect)return this.clientRect;var h=this.media,d={width:0,height:0};if(h){var o=h.getBoundingClientRect();d.width=o.width,d.height=o.height,!d.width&&!d.height&&(d.width=o.right-o.left||h.width||0,d.height=o.bottom-o.top||h.height||0)}return this.clientRect=d,d},T.isLevelAllowed=function(h,d){return d===void 0&&(d=[]),d.indexOf(h)===-1},T.getMaxLevelByMediaSize=function(h,d,o){if(!h||!h.length)return-1;for(var c=function(t,u){return u?t.width!==u.width||t.height!==u.height:!0},s=h.length-1,f=0;f=d||i.height>=o)&&c(i,h[f+1])){s=f;break}}return s},S(T,[{key:"mediaWidth",get:function(){return this.getDimensions().width*T.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*T.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var h=1;try{h=self.devicePixelRatio}catch(d){}return h}}]),T}();Z.default=C},"./src/controller/cmcd-controller.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return c});var w=U("./src/events.ts"),P=U("./src/types/cmcd.ts"),S=U("./src/utils/buffer-helper.ts"),C=U("./src/utils/logger.ts");function T(s,f){for(var i=0;i=s.length?{done:!0}:{done:!1,value:s[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function h(s,f){if(!s)return;if(typeof s=="string")return d(s,f);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 d(s,f)}function d(s,f){(f==null||f>s.length)&&(f=s.length);for(var i=0,n=new Array(f);it&&(t=_.bitrate)}return t>0?t:NaN},f.getBufferLength=function(n){var t=this.hls.media,u=n===P.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!u||!t)return NaN;var y=S.BufferHelper.bufferInfo(u,t.currentTime,this.config.maxBufferHole);return y.len*1e3},f.createPlaylistLoader=function(){var n=this.config.pLoader,t=this.applyPlaylistData,u=n||this.config.loader;return function(){function y(_){this.loader=void 0,this.loader=new u(_)}var g=y.prototype;return g.destroy=function(){this.loader.destroy()},g.abort=function(){this.loader.abort()},g.load=function(b,v,m){t(b),this.loader.load(b,v,m)},l(y,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),y}()},f.createFragmentLoader=function(){var n=this.config.fLoader,t=this.applyFragmentData,u=n||this.config.loader;return function(){function y(_){this.loader=void 0,this.loader=new u(_)}var g=y.prototype;return g.destroy=function(){this.loader.destroy()},g.abort=function(){this.loader.abort()},g.load=function(b,v,m){t(b),this.loader.load(b,v,m)},l(y,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),y}()},s.uuid=function(){var n=URL.createObjectURL(new Blob),t=n.toString();return URL.revokeObjectURL(n),t.substr(t.lastIndexOf("/")+1)},s.serialize=function(n){for(var t=[],u=function(F){return!Number.isNaN(F)&&F!=null&&F!==""&&F!==!1},y=function(F){return Math.round(F)},g=function(F){return y(F/100)*100},_=function(F){return encodeURIComponent(F)},b={br:y,d:y,bl:g,dl:g,mtp:g,nor:_,rtp:g,tb:y},v=Object.keys(n||{}).sort(),m=p(v),E;!(E=m()).done;){var a=E.value,x=n[a];if(!u(x))continue;if(a==="v"&&x===1)continue;if(a=="pr"&&x===1)continue;var O=b[a];O&&(x=O(x));var A=typeof x,D=void 0;a==="ot"||a==="sf"||a==="st"?D=a+"="+x:A==="boolean"?D=a:A==="number"?D=a+"="+x:D=a+"="+JSON.stringify(x),t.push(D)}return t.join(",")},s.toHeaders=function(n){for(var t=Object.keys(n),u={},y=["Object","Request","Session","Status"],g=[{},{},{},{}],_={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},b=0,v=t;bp){this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var _=p-this._requestLicenseFailureCount+1;S.logger.warn("Retrying license request, "+_+" attempts left"),this._requestLicense(t,u)}break}},s._generateLicenseRequestChallenge=function(i,n){switch(i.mediaKeySystemDomain){case C.KeySystems.WIDEVINE:return n}throw new Error("unsupported key-system: "+i.mediaKeySystemDomain)},s._requestLicense=function(i,n){S.logger.log("Requesting content license for key-system");var t=this._mediaKeysList[0];if(!t){S.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var u=this.getLicenseServerUrl(t.mediaKeySystemDomain),y=this._createLicenseXhr(u,i,n);S.logger.log("Sending license request to URL: "+u);var g=this._generateLicenseRequestChallenge(t,i);y.send(g)}catch(_){S.logger.error("Failure requesting DRM license: "+_),this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},s.onMediaAttached=function(i,n){if(!this._emeEnabled)return;var t=n.media;this._media=t,t.addEventListener("encrypted",this._onMediaEncrypted)},s.onMediaDetached=function(){var i=this._media,n=this._mediaKeysList;if(!i)return;i.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(n.map(function(t){if(t.mediaKeysSession)return t.mediaKeysSession.close().catch(function(){})})).then(function(){return i.setMediaKeys(null)}).catch(function(){})},s.onManifestParsed=function(i,n){if(!this._emeEnabled)return;var t=n.levels.map(function(y){return y.audioCodec}).filter(function(y){return!!y}),u=n.levels.map(function(y){return y.videoCodec}).filter(function(y){return!!y});this._attemptKeySystemAccess(C.KeySystems.WIDEVINE,t,u)},l(c,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),c}();Z.default=o},"./src/controller/fps-controller.ts":function(ae,Z,U){"use strict";U.r(Z);var w=U("./src/events.ts"),P=U("./src/utils/logger.ts"),S=function(){function C(l){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=l,this.registerListeners()}var T=C.prototype;return T.setStreamController=function(p){this.streamController=p},T.registerListeners=function(){this.hls.on(w.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},T.unregisterListeners=function(){this.hls.off(w.Events.MEDIA_ATTACHING,this.onMediaAttaching)},T.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},T.onMediaAttaching=function(p,h){var d=this.hls.config;if(d.capLevelOnFPSDrop){var o=h.media instanceof self.HTMLVideoElement?h.media:null;this.media=o,o&&typeof o.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),d.fpsDroppedMonitoringPeriod)}},T.checkFPS=function(p,h,d){var o=performance.now();if(h){if(this.lastTime){var c=o-this.lastTime,s=d-this.lastDroppedFrames,f=h-this.lastDecodedFrames,i=1e3*s/c,n=this.hls;if(n.trigger(w.Events.FPS_DROP,{currentDropped:s,currentDecoded:f,totalDroppedFrames:d}),i>0&&s>n.config.fpsDroppedMonitoringThreshold*f){var t=n.currentLevel;P.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+t),t>0&&(n.autoLevelCapping===-1||n.autoLevelCapping>=t)&&(t=t-1,n.trigger(w.Events.FPS_DROP_LEVEL_CAPPING,{level:t,droppedLevel:n.currentLevel}),n.autoLevelCapping=t,this.streamController.nextLevelSwitch())}}this.lastTime=o,this.lastDroppedFrames=d,this.lastDecodedFrames=h}},T.checkFPSInterval=function(){var p=this.media;if(p)if(this.isVideoPlaybackQualityAvailable){var h=p.getVideoPlaybackQuality();this.checkFPS(p,h.totalVideoFrames,h.droppedVideoFrames)}else this.checkFPS(p,p.webkitDecodedFrameCount,p.webkitDroppedFrameCount)},C}();Z.default=S},"./src/controller/fragment-finders.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"findFragmentByPDT",function(){return S}),U.d(Z,"findFragmentByPTS",function(){return C}),U.d(Z,"fragmentWithinToleranceTest",function(){return T}),U.d(Z,"pdtWithinToleranceTest",function(){return l}),U.d(Z,"findFragWithCC",function(){return p});var w=U("./src/polyfills/number.ts"),P=U("./src/utils/binary-search.ts");function S(h,d,o){if(d===null||!Array.isArray(h)||!h.length||!Object(w.isFiniteNumber)(d))return null;var c=h[0].programDateTime;if(d<(c||0))return null;var s=h[h.length-1].endProgramDateTime;if(d>=(s||0))return null;o=o||0;for(var f=0;fh&&o.start?-1:0}function l(h,d,o){var c=Math.min(d,o.duration+(o.deltaPTS?o.deltaPTS:0))*1e3,s=o.endProgramDateTime||0;return s-c>h}function p(h,d){return P.default.search(h,function(o){return o.ccd?-1:0})}},"./src/controller/fragment-tracker.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"FragmentState",function(){return S}),U.d(Z,"FragmentTracker",function(){return C});var w=U("./src/events.ts"),P=U("./src/types/loader.ts"),S;(function(p){p.NOT_LOADED="NOT_LOADED",p.BACKTRACKED="BACKTRACKED",p.APPENDING="APPENDING",p.PARTIAL="PARTIAL",p.OK="OK"})(S||(S={}));var C=function(){function p(d){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=d,this._registerListeners()}var h=p.prototype;return h._registerListeners=function(){var o=this.hls;o.on(w.Events.BUFFER_APPENDED,this.onBufferAppended,this),o.on(w.Events.FRAG_BUFFERED,this.onFragBuffered,this),o.on(w.Events.FRAG_LOADED,this.onFragLoaded,this)},h._unregisterListeners=function(){var o=this.hls;o.off(w.Events.BUFFER_APPENDED,this.onBufferAppended,this),o.off(w.Events.FRAG_BUFFERED,this.onFragBuffered,this),o.off(w.Events.FRAG_LOADED,this.onFragLoaded,this)},h.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},h.getAppendedFrag=function(o,c){if(c===P.PlaylistLevelType.MAIN){var s=this.activeFragment,f=this.activeParts;if(!s)return null;if(f)for(var i=f.length;i--;){var n=f[i],t=n?n.end:s.appendedPTS;if(n.start<=o&&t!==void 0&&o<=t)return i>9&&(this.activeParts=f.slice(i-9)),n}else if(s.start<=o&&s.appendedPTS!==void 0&&o<=s.appendedPTS)return s}return this.getBufferedFrag(o,c)},h.getBufferedFrag=function(o,c){for(var s=this.fragments,f=Object.keys(s),i=f.length;i--;){var n=s[f[i]];if((n==null?void 0:n.body.type)===c&&n.buffered){var t=n.body;if(t.start<=o&&o<=t.end)return t}}return null},h.detectEvictedFragments=function(o,c,s){var f=this;Object.keys(this.fragments).forEach(function(i){var n=f.fragments[i];if(!n)return;if(!n.buffered){n.body.type===s&&f.removeFragment(n.body);return}var t=n.range[o];if(!t)return;t.time.some(function(u){var y=!f.isTimeBuffered(u.startPTS,u.endPTS,c);return y&&f.removeFragment(n.body),y})})},h.detectPartialFragments=function(o){var c=this,s=this.timeRanges,f=o.frag,i=o.part;if(!s||f.sn==="initSegment")return;var n=l(f),t=this.fragments[n];if(!t)return;Object.keys(s).forEach(function(u){var y=f.elementaryStreams[u];if(!y)return;var g=s[u],_=i!==null||y.partial===!0;t.range[u]=c.getBufferedTimes(f,i,_,g)}),t.backtrack=t.loaded=null,Object.keys(t.range).length?t.buffered=!0:this.removeFragment(t.body)},h.fragBuffered=function(o){var c=l(o),s=this.fragments[c];s&&(s.backtrack=s.loaded=null,s.buffered=!0)},h.getBufferedTimes=function(o,c,s,f){for(var i={time:[],partial:s},n=c?c.start:o.start,t=c?c.end:o.end,u=o.minEndPTS||t,y=o.maxStartPTS||n,g=0;g=_&&u<=b){i.time.push({startPTS:Math.max(n,f.start(g)),endPTS:Math.min(t,f.end(g))});break}else if(n_)i.partial=!0,i.time.push({startPTS:Math.max(n,f.start(g)),endPTS:Math.min(t,f.end(g))});else if(t<=_)break}return i},h.getPartialFragment=function(o){var c=null,s,f,i,n=0,t=this.bufferPadding,u=this.fragments;return Object.keys(u).forEach(function(y){var g=u[y];if(!g)return;T(g)&&(f=g.body.start-t,i=g.body.end+t,o>=f&&o<=i&&(s=Math.min(o-f,i-o),n<=s&&(c=g.body,n=s)))}),c},h.getState=function(o){var c=l(o),s=this.fragments[c];return s?s.buffered?T(s)?S.PARTIAL:S.OK:s.backtrack?S.BACKTRACKED:S.APPENDING:S.NOT_LOADED},h.backtrack=function(o,c){var s=l(o),f=this.fragments[s];if(!f||f.backtrack)return null;var i=f.backtrack=c||f.loaded;return f.loaded=null,i},h.getBacktrackData=function(o){var c=l(o),s=this.fragments[c];if(s){var f,i=s.backtrack;if(i!=null&&(f=i.payload)!==null&&f!==void 0&&f.byteLength)return i;this.removeFragment(o)}return null},h.isTimeBuffered=function(o,c,s){for(var f,i,n=0;n=f&&c<=i)return!0;if(c<=f)return!1}return!1},h.onFragLoaded=function(o,c){var s=c.frag,f=c.part;if(s.sn==="initSegment"||s.bitrateTest||f)return;var i=l(s);this.fragments[i]={body:s,loaded:c,backtrack:null,buffered:!1,range:Object.create(null)}},h.onBufferAppended=function(o,c){var s=this,f=c.frag,i=c.part,n=c.timeRanges;if(f.type===P.PlaylistLevelType.MAIN)if(this.activeFragment=f,i){var t=this.activeParts;t||(this.activeParts=t=[]),t.push(i)}else this.activeParts=null;this.timeRanges=n,Object.keys(n).forEach(function(u){var y=n[u];if(s.detectEvictedFragments(u,y),!i)for(var g=0;go&&f.removeFragment(t)}})},h.removeFragment=function(o){var c=l(o);o.stats.loaded=0,o.clearElementaryStreamInfo(),delete this.fragments[c]},h.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},p}();function T(p){var h,d;return p.buffered&&(((h=p.range.video)===null||h===void 0?void 0:h.partial)||((d=p.range.audio)===null||d===void 0?void 0:d.partial))}function l(p){return p.type+"_"+p.level+"_"+p.urlId+"_"+p.sn}},"./src/controller/gap-controller.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"STALL_MINIMUM_DURATION_MS",function(){return T}),U.d(Z,"MAX_START_GAP_JUMP",function(){return l}),U.d(Z,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return p}),U.d(Z,"SKIP_BUFFER_RANGE_START",function(){return h}),U.d(Z,"default",function(){return d});var w=U("./src/utils/buffer-helper.ts"),P=U("./src/errors.ts"),S=U("./src/events.ts"),C=U("./src/utils/logger.ts"),T=250,l=2,p=.1,h=.05,d=function(){function o(s,f,i,n){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=s,this.media=f,this.fragmentTracker=i,this.hls=n}var c=o.prototype;return c.destroy=function(){this.hls=this.fragmentTracker=this.media=null},c.poll=function(f){var i=this.config,n=this.media,t=this.stalled,u=n.currentTime,y=n.seeking,g=this.seeking&&!y,_=!this.seeking&&y;if(this.seeking=y,u!==f){if(this.moved=!0,t!==null){if(this.stallReported){var b=self.performance.now()-t;C.logger.warn("playback not stuck anymore @"+u+", after "+Math.round(b)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((_||g)&&(this.stalled=null),n.paused||n.ended||n.playbackRate===0||!w.BufferHelper.getBuffered(n).length)return;var v=w.BufferHelper.bufferInfo(n,u,0),m=v.len>0,E=v.nextStart||0;if(!m&&!E)return;if(y){var a=v.len>l,x=!E||E-u>l&&!this.fragmentTracker.getPartialFragment(u);if(a||x)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var O,A=Math.max(E,v.start||0)-u,D=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,I=D==null||((O=D.details)===null||O===void 0)?void 0:O.live,F=I?D.details.targetduration*2:l;if(A>0&&A<=F){this._trySkipBufferHole(null);return}}var K=self.performance.now();if(t===null){this.stalled=K;return}var ne=K-t;!y&&ne>=T&&this._reportStall(v.len);var j=w.BufferHelper.bufferInfo(n,u,i.maxBufferHole);this._tryFixBufferStall(j,ne)},c._tryFixBufferStall=function(f,i){var n=this.config,t=this.fragmentTracker,u=this.media,y=u.currentTime,g=t.getPartialFragment(y);if(g){var _=this._trySkipBufferHole(g);if(_)return}f.len>n.maxBufferHole&&i>n.highBufferWatchdogPeriod*1e3&&(C.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},c._reportStall=function(f){var i=this.hls,n=this.media,t=this.stallReported;t||(this.stallReported=!0,C.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer (buffer="+f+")"),i.trigger(S.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:f}))},c._trySkipBufferHole=function(f){for(var i=this.config,n=this.hls,t=this.media,u=t.currentTime,y=0,g=w.BufferHelper.getBuffered(t),_=0;_=y&&u.05&&this.forwardBufferLength>1){var _=Math.min(2,Math.max(1,n)),b=Math.round(2/(1+Math.exp(-.75*u-this.edgeStalled))*20)/20;o.playbackRate=Math.min(_,Math.max(1,b))}else o.playbackRate!==1&&o.playbackRate!==0&&(o.playbackRate=1)},h.estimateLiveEdge=function(){var o=this.levelDetails;return o===null?null:o.edge+o.age},h.computeLatency=function(){var o=this.estimateLiveEdge();return o===null?null:o-this.currentTime},T(p,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var o=this.config,c=this.levelDetails;return o.liveMaxLatencyDuration!==void 0?o.liveMaxLatencyDuration:c?o.liveMaxLatencyDurationCount*c.targetduration:0}},{key:"targetLatency",get:function(){var o=this.levelDetails;if(o===null)return null;var c=o.holdBack,s=o.partHoldBack,f=o.targetduration,i=this.config,n=i.liveSyncDuration,t=i.liveSyncDurationCount,u=i.lowLatencyMode,y=this.hls.userConfig,g=u&&s||c;(y.liveSyncDuration||y.liveSyncDurationCount||g===0)&&(g=n!==void 0?n:t*f);var _=f,b=1;return g+Math.min(this.stallCount*b,_)}},{key:"liveSyncPosition",get:function(){var o=this.estimateLiveEdge(),c=this.targetLatency,s=this.levelDetails;if(o===null||c===null||s===null)return null;var f=s.edge,i=o-c-this.edgeStalled,n=f-s.totalduration,t=f-(this.config.lowLatencyMode&&s.partTarget||s.targetduration);return Math.min(Math.max(n,i),t)}},{key:"drift",get:function(){var o=this.levelDetails;return o===null?1:o.drift}},{key:"edgeStalled",get:function(){var o=this.levelDetails;if(o===null)return 0;var c=(this.config.lowLatencyMode&&o.partTarget||o.targetduration)*3;return Math.max(o.age-c,0)}},{key:"forwardBufferLength",get:function(){var o=this.media,c=this.levelDetails;if(!o||!c)return 0;var s=o.buffered.length;return s?o.buffered.end(s-1):c.edge-this.currentTime}}]),p}()},"./src/controller/level-controller.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return i});var w=U("./src/types/level.ts"),P=U("./src/events.ts"),S=U("./src/errors.ts"),C=U("./src/utils/codecs.ts"),T=U("./src/controller/level-helper.ts"),l=U("./src/controller/base-playlist-controller.ts"),p=U("./src/types/loader.ts");function h(){return h=Object.assign||function(n){for(var t=1;t0){E=b[0].bitrate,b.sort(function(ne,j){return ne.bitrate-j.bitrate}),this._levels=b;for(var I=0;Ithis.hls.config.fragLoadingMaxRetry&&(a=_.frag.level)):a=_.frag.level}break;case S.ErrorDetails.LEVEL_LOAD_ERROR:case S.ErrorDetails.LEVEL_LOAD_TIMEOUT:b&&(b.deliveryDirectives&&(E=!1),a=b.level),m=!0;break;case S.ErrorDetails.REMUX_ALLOC_ERROR:a=_.level,m=!0;break}a!==void 0&&this.recoverLevel(_,a,m,E)},u.recoverLevel=function(g,_,b,v){var m=g.details,E=this._levels[_];if(E.loadError++,b){var a=this.retryLoadingOrFail(g);if(a)g.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(v){var x=E.url.length;if(x>1&&E.loadError1){var v=(_.urlId+1)%b;this.warn("Switching to redundant URL-id "+v),this._levels.forEach(function(m){m.urlId=v}),this.level=g}},u.onFragLoaded=function(g,_){var b=_.frag;if(b!==void 0&&b.type===p.PlaylistLevelType.MAIN){var v=this._levels[b.level];v!==void 0&&(v.fragmentError=0,v.loadError=0)}},u.onLevelLoaded=function(g,_){var b,v=_.level,m=_.details,E=this._levels[v];if(!E){var a;this.warn("Invalid level index "+v),(a=_.deliveryDirectives)!==null&&a!==void 0&&a.skip&&(m.deltaUpdateFailed=!0);return}v===this.currentLevelIndex?(E.fragmentError===0&&(E.loadError=0,this.retryCount=0),this.playlistLoaded(v,_,E.details)):(b=_.deliveryDirectives)!==null&&b!==void 0&&b.skip&&(m.deltaUpdateFailed=!0)},u.onAudioTrackSwitched=function(g,_){var b=this.hls.levels[this.currentLevelIndex];if(!b)return;if(b.audioGroupIds){for(var v=-1,m=this.hls.audioTracks[_.id].groupId,E=0;E0){var v=b.urlId,m=b.url[v];if(g)try{m=g.addDirectives(m)}catch(E){this.warn("Could not construct new URL with HLS Delivery Directives: "+E)}this.log("Attempt loading level index "+_+(g?" at sn "+g.msn+" part "+g.part:"")+" with URL-id "+v+" "+m),this.clearTimer(),this.hls.trigger(P.Events.LEVEL_LOADING,{url:m,level:_,id:v,deliveryDirectives:g||null})}},u.removeLevel=function(g,_){var b=function(E,a){return a!==_},v=this._levels.filter(function(m,E){return E!==g?!0:m.url.length>1&&_!==void 0?(m.url=m.url.filter(b),m.audioGroupIds&&(m.audioGroupIds=m.audioGroupIds.filter(b)),m.textGroupIds&&(m.textGroupIds=m.textGroupIds.filter(b)),m.urlId=0,!0):!1}).map(function(m,E){var a=m.details;return a!=null&&a.fragments&&a.fragments.forEach(function(x){x.level=E}),m});this._levels=v,this.hls.trigger(P.Events.LEVELS_UPDATED,{levels:v})},o(t,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(g){var _,b=this._levels;if(b.length===0)return;if(this.currentLevelIndex===g&&(_=b[g])!==null&&_!==void 0&&_.details)return;if(g<0||g>=b.length){var v=g<0;if(this.hls.trigger(P.Events.ERROR,{type:S.ErrorTypes.OTHER_ERROR,details:S.ErrorDetails.LEVEL_SWITCH_ERROR,level:g,fatal:v,reason:"invalid level idx"}),v)return;g=Math.min(g,b.length-1)}this.clearTimer();var m=this.currentLevelIndex,E=b[m],a=b[g];this.log("switching to level "+g+" from "+m),this.currentLevelIndex=g;var x=h({},a,{level:g,maxBitrate:a.maxBitrate,uri:a.uri,urlId:a.urlId});delete x._urlId,this.hls.trigger(P.Events.LEVEL_SWITCHING,x);var O=a.details;if(!O||O.live){var A=this.switchParams(a.uri,E==null?void 0:E.details);this.loadPlaylist(A)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(g){this.manualLevelIndex=g,this._startLevel===void 0&&(this._startLevel=g),g!==-1&&(this.level=g)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(g){this._firstLevel=g}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var g=this.hls.config.startLevel;return g!==void 0?g:this._firstLevel}else return this._startLevel},set:function(g){this._startLevel=g}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(g){this.level=g,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=g)}}]),t}(l.default)},"./src/controller/level-helper.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"addGroupId",function(){return S}),U.d(Z,"assignTrackIdsByGroup",function(){return C}),U.d(Z,"updatePTS",function(){return T}),U.d(Z,"updateFragPTSDTS",function(){return p}),U.d(Z,"mergeDetails",function(){return h}),U.d(Z,"mapPartIntersection",function(){return d}),U.d(Z,"mapFragmentIntersection",function(){return o}),U.d(Z,"adjustSliding",function(){return c}),U.d(Z,"addSliding",function(){return s}),U.d(Z,"computeReloadInterval",function(){return f}),U.d(Z,"getFragmentWithSN",function(){return i}),U.d(Z,"getPartWith",function(){return n});var w=U("./src/polyfills/number.ts"),P=U("./src/utils/logger.ts");function S(t,u,y){switch(u){case"audio":t.audioGroupIds||(t.audioGroupIds=[]),t.audioGroupIds.push(y);break;case"text":t.textGroupIds||(t.textGroupIds=[]),t.textGroupIds.push(y);break}}function C(t){var u={};t.forEach(function(y){var g=y.groupId||"";y.id=u[g]=u[g]||0,u[g]++})}function T(t,u,y){var g=t[u],_=t[y];l(g,_)}function l(t,u){var y=u.startPTS;if(Object(w.isFiniteNumber)(y)){var g=0,_;u.sn>t.sn?(g=y-t.start,_=t):(g=t.start-y,_=u),_.duration!==g&&(_.duration=g)}else if(u.sn>t.sn){var b=t.cc===u.cc;b&&t.minEndPTS?u.start=t.start+(t.minEndPTS-t.start):u.start=t.start+t.duration}else u.start=Math.max(t.start-u.duration,0)}function p(t,u,y,g,_,b){var v=g-y;v<=0&&(P.logger.warn("Fragment should have a positive duration",u),g=y+u.duration,b=_+u.duration);var m=y,E=g,a=u.startPTS,x=u.endPTS;if(Object(w.isFiniteNumber)(a)){var O=Math.abs(a-y);Object(w.isFiniteNumber)(u.deltaPTS)?u.deltaPTS=Math.max(O,u.deltaPTS):u.deltaPTS=O,m=Math.max(y,a),y=Math.min(y,a),_=Math.min(_,u.startDTS),E=Math.min(g,x),g=Math.max(g,x),b=Math.max(b,u.endDTS)}u.duration=g-y;var A=y-u.start;u.appendedPTS=g,u.start=u.startPTS=y,u.maxStartPTS=m,u.startDTS=_,u.endPTS=g,u.minEndPTS=E,u.endDTS=b;var D=u.sn;if(!t||Dt.endSN)return 0;var I,F=D-t.startSN,K=t.fragments;for(K[F]=u,I=F;I>0;I--)l(K[I],K[I-1]);for(I=F;I=0;_--){var b=g[_].initSegment;if(b){y=b;break}}t.fragmentHint&&delete t.fragmentHint.endPTS;var v=0,m;if(o(t,u,function(I,F){I.relurl&&(v=I.cc-F.cc),Object(w.isFiniteNumber)(I.startPTS)&&Object(w.isFiniteNumber)(I.endPTS)&&(F.start=F.startPTS=I.startPTS,F.startDTS=I.startDTS,F.appendedPTS=I.appendedPTS,F.maxStartPTS=I.maxStartPTS,F.endPTS=I.endPTS,F.endDTS=I.endDTS,F.minEndPTS=I.minEndPTS,F.duration=I.endPTS-I.startPTS,F.duration&&(m=F),u.PTSKnown=u.alignedSliding=!0),F.elementaryStreams=I.elementaryStreams,F.loader=I.loader,F.stats=I.stats,F.urlId=I.urlId,I.initSegment&&(F.initSegment=I.initSegment,y=I.initSegment)}),y){var E=u.fragmentHint?u.fragments.concat(u.fragmentHint):u.fragments;E.forEach(function(I){var F;(!I.initSegment||I.initSegment.relurl===((F=y)===null||F===void 0?void 0:F.relurl))&&(I.initSegment=y)})}if(u.skippedSegments&&(u.deltaUpdateFailed=u.fragments.some(function(I){return!I}),u.deltaUpdateFailed)){P.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var a=u.skippedSegments;a--;)u.fragments.shift();u.startSN=u.fragments[0].sn,u.startCC=u.fragments[0].cc}var x=u.fragments;if(v){P.logger.warn("discontinuity sliding from playlist, take drift into account");for(var O=0;O=g.length)return;s(u,g[y].start)}function s(t,u){if(u){for(var y=t.fragments,g=t.skippedSegments;g0&&_0&&E===-1&&(this.log("Override startPosition with lastCurrentTime @"+a.toFixed(3)),E=a),this.state=P.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=E,this.tick()}else this._forceStartLoad=!0,this.state=P.State.STOPPED},v.stopLoad=function(){this._forceStartLoad=!1,_.prototype.stopLoad.call(this)},v.doTick=function(){switch(this.state){case P.State.IDLE:this.doTickIdle();break;case P.State.WAITING_LEVEL:{var E,a=this.levels,x=this.level,O=a==null||((E=a[x])===null||E===void 0)?void 0:E.details;if(O&&(!O.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(O))break;this.state=P.State.IDLE;break}break}case P.State.FRAG_LOADING_WAITING_RETRY:{var A,D=self.performance.now(),I=this.retryDate;(!I||D>=I||(A=this.media)!==null&&A!==void 0&&A.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=P.State.IDLE)}break;default:break}this.onTickEnd()},v.onTickEnd=function(){_.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},v.doTickIdle=function(){var E,a,x=this.hls,O=this.levelLastLoaded,A=this.levels,D=this.media,I=x.config,F=x.nextLoadLevel;if(O===null||!D&&(this.startFragRequested||!I.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!A||!A[F])return;var K=A[F];this.level=x.nextLoadLevel=F;var ne=K.details;if(!ne||this.state===P.State.WAITING_LEVEL||ne.live&&this.levelLastLoaded!==F){this.state=P.State.WAITING_LEVEL;return}var j=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:D,p.PlaylistLevelType.MAIN);if(j===null)return;var G=j.len,X=this.getMaxBufferLength(K.maxBitrate);if(G>=X)return;if(this._streamEnded(j,ne)){var J={};this.altAudio&&(J.type="video"),this.hls.trigger(C.Events.BUFFER_EOS,J),this.state=P.State.ENDED;return}var B=j.end,Q=this.getNextFragment(B,ne);if(this.couldBacktrack&&!this.fragPrevious&&Q&&Q.sn!=="initSegment"){var ie=Q.sn-ne.startSN;ie>1&&(Q=ne.fragments[ie-1],this.fragmentTracker.removeFragment(Q))}if(Q&&this.fragmentTracker.getState(Q)===l.FragmentState.OK&&this.nextLoadPosition>B){var oe=this.audioOnly&&!this.altAudio?h.ElementaryStreamTypes.AUDIO:h.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(D,oe,p.PlaylistLevelType.MAIN),Q=this.getNextFragment(this.nextLoadPosition,ne)}if(!Q)return;Q.initSegment&&!Q.initSegment.data&&!this.bitrateTest&&(Q=Q.initSegment),((E=Q.decryptdata)===null||E===void 0?void 0:E.keyFormat)==="identity"&&!((a=Q.decryptdata)!==null&&a!==void 0&&a.key)?this.loadKey(Q,ne):this.loadFragment(Q,ne,B)},v.loadFragment=function(E,a,x){var O,A=this.fragmentTracker.getState(E);if(this.fragCurrent=E,A===l.FragmentState.BACKTRACKED){var D=this.fragmentTracker.getBacktrackData(E);if(D){this._handleFragmentLoadProgress(D),this._handleFragmentLoadComplete(D);return}else A=l.FragmentState.NOT_LOADED}A===l.FragmentState.NOT_LOADED||A===l.FragmentState.PARTIAL?E.sn==="initSegment"?this._loadInitSegment(E):this.bitrateTest?(E.bitrateTest=!0,this.log("Fragment "+E.sn+" of level "+E.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(E)):(this.startFragRequested=!0,_.prototype.loadFragment.call(this,E,a,x)):A===l.FragmentState.APPENDING?this.reduceMaxBufferLength(E.duration)&&this.fragmentTracker.removeFragment(E):((O=this.media)===null||O===void 0?void 0:O.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},v.getAppendedFrag=function(E){var a=this.fragmentTracker.getAppendedFrag(E,p.PlaylistLevelType.MAIN);return a&&"fragment"in a?a.fragment:a},v.getBufferedFrag=function(E){return this.fragmentTracker.getBufferedFrag(E,p.PlaylistLevelType.MAIN)},v.followingBufferedFrag=function(E){return E?this.getBufferedFrag(E.end+.5):null},v.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},v.nextLevelSwitch=function(){var E=this.levels,a=this.media;if(a!=null&&a.readyState){var x,O=this.getAppendedFrag(a.currentTime);if(O&&O.start>1&&this.flushMainBuffer(0,O.start-1),!a.paused&&E){var A=this.hls.nextLoadLevel,D=E[A],I=this.fragLastKbps;I&&this.fragCurrent?x=this.fragCurrent.duration*D.maxBitrate/(1e3*I)+1:x=0}else x=0;var F=this.getBufferedFrag(a.currentTime+x);if(F){var K=this.followingBufferedFrag(F);if(K){this.abortCurrentFrag();var ne=K.maxStartPTS?K.maxStartPTS:K.start,j=K.duration,G=Math.max(F.end,ne+Math.min(Math.max(j-this.config.maxFragLookUpTolerance,j*.5),j*.75));this.flushMainBuffer(G,Number.POSITIVE_INFINITY)}}}},v.abortCurrentFrag=function(){var E=this.fragCurrent;this.fragCurrent=null,E!=null&&E.loader&&E.loader.abort(),this.state===P.State.KEY_LOADING&&(this.state=P.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},v.flushMainBuffer=function(E,a){_.prototype.flushMainBuffer.call(this,E,a,this.altAudio?"video":null)},v.onMediaAttached=function(E,a){_.prototype.onMediaAttached.call(this,E,a);var x=a.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),x.addEventListener("playing",this.onvplaying),x.addEventListener("seeked",this.onvseeked),this.gapController=new c.default(this.config,x,this.fragmentTracker,this.hls)},v.onMediaDetaching=function(){var E=this.media;E&&(E.removeEventListener("playing",this.onvplaying),E.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),_.prototype.onMediaDetaching.call(this)},v.onMediaPlaying=function(){this.tick()},v.onMediaSeeked=function(){var E=this.media,a=E?E.currentTime:null;Object(w.isFiniteNumber)(a)&&this.log("Media seeked to "+a.toFixed(3)),this.tick()},v.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},v.onManifestParsed=function(E,a){var x=!1,O=!1,A;a.levels.forEach(function(D){A=D.audioCodec,A&&(A.indexOf("mp4a.40.2")!==-1&&(x=!0),A.indexOf("mp4a.40.5")!==-1&&(O=!0))}),this.audioCodecSwitch=x&&O&&!Object(S.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=a.levels,this.startFragRequested=!1},v.onLevelLoading=function(E,a){var x=this.levels;if(!x||this.state!==P.State.IDLE)return;var O=x[a.level];(!O.details||O.details.live&&this.levelLastLoaded!==a.level||this.waitForCdnTuneIn(O.details))&&(this.state=P.State.WAITING_LEVEL)},v.onLevelLoaded=function(E,a){var x,O=this.levels,A=a.level,D=a.details,I=D.totalduration;if(!O){this.warn("Levels were reset while loading level "+A);return}this.log("Level "+A+" loaded ["+D.startSN+","+D.endSN+"], cc ["+D.startCC+", "+D.endCC+"] duration:"+I);var F=this.fragCurrent;F&&(this.state===P.State.FRAG_LOADING||this.state===P.State.FRAG_LOADING_WAITING_RETRY)&&(F.level!==a.level&&F.loader&&(this.state=P.State.IDLE,F.loader.abort()));var K=O[A],ne=0;if(D.live||(x=K.details)!==null&&x!==void 0&&x.live){if(D.fragments[0]||(D.deltaUpdateFailed=!0),D.deltaUpdateFailed)return;ne=this.alignPlaylists(D,K.details)}if(K.details=D,this.levelLastLoaded=A,this.hls.trigger(C.Events.LEVEL_UPDATED,{details:D,level:A}),this.state===P.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(D))return;this.state=P.State.IDLE}this.startFragRequested?D.live&&this.synchronizeToLiveEdge(D):this.setStartPosition(D,ne),this.tick()},v._handleFragmentLoadProgress=function(E){var a,x=E.frag,O=E.part,A=E.payload,D=this.levels;if(!D){this.warn("Levels were reset while fragment load was in progress. Fragment "+x.sn+" of level "+x.level+" will not be buffered");return}var I=D[x.level],F=I.details;if(!F){this.warn("Dropping fragment "+x.sn+" of level "+x.level+" after level details were reset");return}var K=I.videoCodec,ne=F.PTSKnown||!F.live,j=(a=x.initSegment)===null||a===void 0?void 0:a.data,G=this._getAudioCodec(I),X=this.transmuxer=this.transmuxer||new d.default(this.hls,p.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),J=O?O.index:-1,B=J!==-1,Q=new o.ChunkMetadata(x.level,x.sn,x.stats.chunkCount,A.byteLength,J,B),ie=this.initPTS[x.cc];X.push(A,j,G,K,x,O,F.totalduration,ne,Q,ie)},v.onAudioTrackSwitching=function(E,a){var x=this.altAudio,O=!!a.url,A=a.id;if(!O){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var D=this.fragCurrent;D!=null&&D.loader&&(this.log("Switching to main audio track, cancel main fragment load"),D.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var I=this.hls;x&&I.trigger(C.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),I.trigger(C.Events.AUDIO_TRACK_SWITCHED,{id:A})}},v.onAudioTrackSwitched=function(E,a){var x=a.id,O=!!this.hls.audioTracks[x].url;if(O){var A=this.videoBuffer;A&&this.mediaBuffer!==A&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=A)}this.altAudio=O,this.tick()},v.onBufferCreated=function(E,a){var x=a.tracks,O,A,D=!1;for(var I in x){var F=x[I];if(F.id==="main"){if(A=I,O=F,I==="video"){var K=x[I];K&&(this.videoBuffer=K.buffer)}}else D=!0}D&&O?(this.log("Alternate track found, use "+A+".buffered to schedule main fragment loading"),this.mediaBuffer=O.buffer):this.mediaBuffer=this.media},v.onFragBuffered=function(E,a){var x=a.frag,O=a.part;if(x&&x.type!==p.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(x)){this.warn("Fragment "+x.sn+(O?" p: "+O.index:"")+" of level "+x.level+" finished buffering, but was aborted. state: "+this.state),this.state===P.State.PARSED&&(this.state=P.State.IDLE);return}var A=O?O.stats:x.stats;this.fragLastKbps=Math.round(8*A.total/(A.buffering.end-A.loading.first)),x.sn!=="initSegment"&&(this.fragPrevious=x),this.fragBufferedComplete(x,O)},v.onError=function(E,a){switch(a.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,a);break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==P.State.ERROR&&(a.fatal?(this.warn(""+a.details),this.state=P.State.ERROR):!a.levelRetry&&this.state===P.State.WAITING_LEVEL&&(this.state=P.State.IDLE));break;case s.ErrorDetails.BUFFER_FULL_ERROR:if(a.parent==="main"&&(this.state===P.State.PARSING||this.state===P.State.PARSED)){var x=!0,O=this.getFwdBufferInfo(this.media,p.PlaylistLevelType.MAIN);O&&O.len>.5&&(x=!this.reduceMaxBufferLength(O.len)),x&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},v.checkBuffer=function(){var E=this.media,a=this.gapController;if(!E||!a||!E.readyState)return;var x=T.BufferHelper.getBuffered(E);!this.loadedmetadata&&x.length?(this.loadedmetadata=!0,this.seekToStartPos()):a.poll(this.lastCurrentTime),this.lastCurrentTime=E.currentTime},v.onFragLoadEmergencyAborted=function(){this.state=P.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},v.onBufferFlushed=function(E,a){var x=a.type;if(x!==h.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var O=(x===h.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(O,x,p.PlaylistLevelType.MAIN)}},v.onLevelsUpdated=function(E,a){this.levels=a.levels},v.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},v.seekToStartPos=function(){var E=this.media,a=E.currentTime,x=this.startPosition;if(x>=0&&a0&&(D1&&E.seeking===!1){var x=E.currentTime;if(T.BufferHelper.isBuffered(E,x)?a=this.getAppendedFrag(x):T.BufferHelper.isBuffered(E,x+.1)&&(a=this.getAppendedFrag(x+.1)),a){var O=this.fragPlaying,A=a.level;(!O||a.sn!==O.sn||O.level!==A||a.urlId!==O.urlId)&&(this.hls.trigger(C.Events.FRAG_CHANGED,{frag:a}),(!O||O.level!==A)&&this.hls.trigger(C.Events.LEVEL_SWITCHED,{level:A}),this.fragPlaying=a)}}},n(b,[{key:"nextLevel",get:function(){var E=this.nextBufferedFrag;return E?E.level:-1}},{key:"currentLevel",get:function(){var E=this.media;if(E){var a=this.getAppendedFrag(E.currentTime);if(a)return a.level}return-1}},{key:"nextBufferedFrag",get:function(){var E=this.media;if(E){var a=this.getAppendedFrag(E.currentTime);return this.followingBufferedFrag(a)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),b}(P.default)},"./src/controller/subtitle-stream-controller.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"SubtitleStreamController",function(){return t});var w=U("./src/events.ts"),P=U("./src/utils/logger.ts"),S=U("./src/utils/buffer-helper.ts"),C=U("./src/controller/fragment-finders.ts"),T=U("./src/utils/discontinuities.ts"),l=U("./src/controller/level-helper.ts"),p=U("./src/controller/fragment-tracker.ts"),h=U("./src/controller/base-stream-controller.ts"),d=U("./src/types/loader.ts"),o=U("./src/types/level.ts");function c(u,y){for(var g=0;g=a[A].start&&O<=a[A].end){x=a[A];break}var D=m.start+m.duration;x?x.end=D:(x={start:O,end:D},a.push(x)),this.fragmentTracker.fragBuffered(m)},g.onBufferFlushing=function(b,v){var m=v.startOffset,E=v.endOffset;if(m===0&&E!==Number.POSITIVE_INFINITY){var a=this.currentTrackId,x=this.levels;if(!x.length||!x[a]||!x[a].details)return;var O=x[a].details,A=O.targetduration,D=E-A;if(D<=0)return;v.endOffsetSubtitles=Math.max(0,D),this.tracksBuffered.forEach(function(I){for(var F=0;F=O.length||a!==x||!A)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,E.live||(m=A.details)!==null&&m!==void 0&&m.live){var D=this.mainDetails;if(E.deltaUpdateFailed||!D)return;var I=D.fragments[0];if(!A.details)E.hasProgramDateTime&&D.hasProgramDateTime?Object(T.alignMediaPlaylistByPDT)(E,D):I&&Object(l.addSliding)(E,I.start);else{var F=this.alignPlaylists(E,A.details);F===0&&I&&Object(l.addSliding)(E,I.start)}}if(A.details=E,this.levelLastLoaded=a,this.tick(),E.live&&!this.fragCurrent&&this.media&&this.state===h.State.IDLE){var K=Object(C.findFragmentByPTS)(null,E.fragments,this.media.currentTime,0);K||(this.warn("Subtitle playlist not aligned with playback"),A.details=void 0)}},g._handleFragmentLoadComplete=function(b){var v=b.frag,m=b.payload,E=v.decryptdata,a=this.hls;if(this.fragContextChanged(v))return;if(m&&m.byteLength>0&&E&&E.key&&E.iv&&E.method==="AES-128"){var x=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(m),E.key.buffer,E.iv.buffer).then(function(O){var A=performance.now();a.trigger(w.Events.FRAG_DECRYPTED,{frag:v,payload:O,stats:{tstart:x,tdecrypt:A}})})}},g.doTick=function(){if(!this.media){this.state=h.State.IDLE;return}if(this.state===h.State.IDLE){var b,v=this.currentTrackId,m=this.levels;if(!m.length||!m[v]||!m[v].details)return;var E=m[v].details,a=E.targetduration,x=this.config,O=this.media,A=S.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,O.currentTime-a,x.maxBufferHole),D=A.end,I=A.len,F=this.getMaxBufferLength()+a;if(I>F)return;console.assert(E,"Subtitle track details are defined on idle subtitle stream controller tick");var K=E.fragments,ne=K.length,j=E.edge,G,X=this.fragPrevious;if(D-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange)},f.pollTrackChange=function(n){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,n)},f.onMediaDetaching=function(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var n=o(this.media.textTracks);n.forEach(function(t){Object(P.clearCurrentCues)(t)}),this.subtitleTrack=-1,this.media=null},f.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},f.onManifestParsed=function(n,t){this.tracks=t.subtitleTracks},f.onSubtitleTrackLoaded=function(n,t){var u=t.id,y=t.details,g=this.trackId,_=this.tracksInGroup[g];if(!_){this.warn("Invalid subtitle track id "+u);return}var b=_.details;_.details=t.details,this.log("subtitle track "+u+" loaded ["+y.startSN+"-"+y.endSN+"]"),u===this.trackId&&(this.retryCount=0,this.playlistLoaded(u,t,b))},f.onLevelLoading=function(n,t){this.switchLevel(t.level)},f.onLevelSwitching=function(n,t){this.switchLevel(t.level)},f.switchLevel=function(n){var t=this.hls.levels[n];if(!(t!=null&&t.textGroupIds))return;var u=t.textGroupIds[t.urlId];if(this.groupId!==u){var y=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,g=this.tracks.filter(function(v){return!u||v.groupId===u});this.tracksInGroup=g;var _=this.findTrackId(y==null?void 0:y.name)||this.findTrackId();this.groupId=u;var b={subtitleTracks:g};this.log("Updating subtitle tracks, "+g.length+' track(s) found in "'+u+'" group-id'),this.hls.trigger(w.Events.SUBTITLE_TRACKS_UPDATED,b),_!==-1&&this.setSubtitleTrack(_,y)}},f.findTrackId=function(n){for(var t=this.tracksInGroup,u=0;u=y.length)return;this.clearTimer();var g=y[n];if(this.log("Switching to subtitle track "+n),this.trackId=n,g){var _=g.id,b=g.groupId,v=b===void 0?"":b,m=g.name,E=g.type,a=g.url;this.hls.trigger(w.Events.SUBTITLE_TRACK_SWITCH,{id:_,groupId:v,name:m,type:E,url:a});var x=this.switchParams(g.url,t==null?void 0:t.details);this.loadPlaylist(x)}else this.hls.trigger(w.Events.SUBTITLE_TRACK_SWITCH,{id:n})},f.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var n=-1,t=o(this.media.textTracks),u=0;u=0&&(E[0]=Math.min(E[0],y),E[1]=Math.max(E[1],g),v=!0,a/(g-y)>.5))return}if(v||b.push([y,g]),this.config.renderTextTracksNatively){var x=this.captionsTracks[u];this.Cues.newCue(x,y,g,_)}else{var O=this.Cues.newCue(null,y,g,_);this.hls.trigger(P.Events.CUES_PARSED,{type:"captions",cues:O,track:u})}},n.onInitPtsFound=function(u,y){var g=this,_=y.frag,b=y.id,v=y.initPTS,m=y.timescale,E=this.unparsedVttFrags;b==="main"&&(this.initPTS[_.cc]=v,this.timescale[_.cc]=m),E.length&&(this.unparsedVttFrags=[],E.forEach(function(a){g.onFragLoaded(P.Events.FRAG_LOADED,a)}))},n.getExistingTrack=function(u){var y=this.media;if(y)for(var g=0;g>>8^m&255^99,p[_]=m,h[m]=_;var E=g[_],a=g[E],x=g[a],O=g[m]*257^m*16843008;o[_]=O<<24|O>>>8,c[_]=O<<16|O>>>16,s[_]=O<<8|O>>>24,f[_]=O,O=x*16843009^a*65537^E*257^_*16843008,n[m]=O<<24|O>>>8,t[m]=O<<16|O>>>16,u[m]=O<<8|O>>>24,y[m]=O,_?(_=E^g[g[g[x^E]]],b^=g[g[b]]):_=b=1}},T.expandKey=function(p){for(var h=this.uint8ArrayToUint32Array_(p),d=!0,o=0;o>>6)+1;var O=(u[y+2]&60)>>>2;if(O>x.length-1){t.trigger(S.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+O});return}return v=(u[y+2]&1)<<2,v|=(u[y+3]&192)>>>6,w.logger.log("manifest codec:"+g+", ADTS type:"+_+", samplingIndex:"+O),/firefox/i.test(E)?O>=6?(_=5,m=new Array(4),b=O-3):(_=2,m=new Array(2),b=O):E.indexOf("android")!==-1?(_=2,m=new Array(2),b=O):(_=5,m=new Array(4),g&&(g.indexOf("mp4a.40.29")!==-1||g.indexOf("mp4a.40.5")!==-1)||!g&&O>=6?b=O-3:((g&&g.indexOf("mp4a.40.2")!==-1&&(O>=6&&v===1||/vivaldi/i.test(E))||!g&&v===1)&&(_=2,m=new Array(2)),b=O)),m[0]=_<<3,m[0]|=(O&14)>>1,m[1]|=(O&1)<<7,m[1]|=v<<3,_===5&&(m[1]|=(b&14)>>1,m[2]=(b&1)<<7,m[2]|=2<<2,m[3]=0),{config:m,samplerate:x[O],channelCount:v,codec:"mp4a.40."+_,manifestCodec:a}}function T(t,u){return t[u]===255&&(t[u+1]&246)===240}function l(t,u){return t[u+1]&1?7:9}function p(t,u){return(t[u+3]&3)<<11|t[u+4]<<3|(t[u+5]&224)>>>5}function h(t,u){return u+5=t.length)return!1;var g=p(t,u);if(g<=y)return!1;var _=u+g;return _===t.length||d(t,_)}return!1}function s(t,u,y,g,_){if(!t.samplerate){var b=C(u,y,g,_);if(!b)return;t.config=b.config,t.samplerate=b.samplerate,t.channelCount=b.channelCount,t.codec=b.codec,t.manifestCodec=b.manifestCodec,w.logger.log("parsed codec:"+t.codec+", rate:"+b.samplerate+", channels:"+b.channelCount)}}function f(t){return 1024*9e4/t}function i(t,u,y,g,_){var b=l(t,u),v=p(t,u);if(v-=b,v>0){var m=y+g*_;return{headerLength:b,frameLength:v,stamp:m}}}function n(t,u,y,g,_){var b=f(t.samplerate),v=i(u,y,g,_,b);if(v){var m=v.frameLength,E=v.headerLength,a=v.stamp,x=E+m,O=Math.max(0,y+x-u.length),A;O?(A=new Uint8Array(x-E),A.set(u.subarray(y+E,u.length),0)):A=u.subarray(y+E,y+x);var D={unit:A,pts:a};return O||t.samples.push(D),{sample:D,length:x,missing:O}}}},"./src/demux/base-audio-demuxer.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"initPTSFn",function(){return p});var w=U("./src/polyfills/number.ts"),P=U("./src/demux/id3.ts"),S=U("./src/demux/dummy-demuxed-track.ts"),C=U("./src/utils/mp4-tools.ts"),T=U("./src/utils/typed-array.ts"),l=function(){function h(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var d=h.prototype;return d.resetInitSegment=function(c,s,f){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},d.resetTimeStamp=function(){},d.resetContiguity=function(){},d.canParse=function(c,s){return!1},d.appendFrame=function(c,s,f){},d.demux=function(c,s){this.cachedData&&(c=Object(C.appendUint8Array)(this.cachedData,c),this.cachedData=null);var f=P.getID3Data(c,0),i=f?f.length:0,n,t,u=this._audioTrack,y=this._id3Track,g=f?P.getTimeStamp(f):void 0,_=c.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=p(g,s)),f&&f.length>0&&y.samples.push({pts:this.initPTS,dts:this.initPTS,data:f}),t=this.initPTS;i<_;){if(this.canParse(c,i)){var b=this.appendFrame(u,c,i);b?(this.frameIndex++,t=b.sample.pts,i+=b.length,n=i):i=_}else P.canParse(c,i)?(f=P.getID3Data(c,i),y.samples.push({pts:t,dts:t,data:f}),i+=f.length,n=i):i++;if(i===_&&n!==_){var v=Object(T.sliceUint8)(c,n);this.cachedData?this.cachedData=Object(C.appendUint8Array)(this.cachedData,v):this.cachedData=v}}return{audioTrack:u,avcTrack:Object(S.dummyTrack)(),id3Track:y,textTrack:Object(S.dummyTrack)()}},d.demuxSampleAes=function(c,s,f){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},d.flush=function(c){var s=this.cachedData;return s&&(this.cachedData=null,this.demux(s,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(S.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(S.dummyTrack)()}},d.destroy=function(){},h}(),p=function(d,o){return Object(w.isFiniteNumber)(d)?d*90:o*9e4};Z.default=l},"./src/demux/chunk-cache.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return w});var w=function(){function S(){this.chunks=[],this.dataLength=0}var C=S.prototype;return C.push=function(l){this.chunks.push(l),this.dataLength+=l.length},C.flush=function(){var l=this.chunks,p=this.dataLength,h;if(l.length)l.length===1?h=l[0]:h=P(l,p);else return new Uint8Array(0);return this.reset(),h},C.reset=function(){this.chunks.length=0,this.dataLength=0},S}();function P(S,C){for(var T=new Uint8Array(C),l=0,p=0;pl?(this.word<<=l,this.bitsAvailable-=l):(l-=this.bitsAvailable,p=l>>3,l-=p>>3,this.bytesAvailable-=p,this.loadWord(),this.word<<=l,this.bitsAvailable-=l)},C.readBits=function(l){var p=Math.min(this.bitsAvailable,l),h=this.word>>>32-p;return l>32&&w.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=p,this.bitsAvailable>0?this.word<<=p:this.bytesAvailable>0&&this.loadWord(),p=l-p,p>0&&this.bitsAvailable?h<>>l)!==0)return this.word<<=l,this.bitsAvailable-=l,l;return this.loadWord(),l+this.skipLZ()},C.skipUEG=function(){this.skipBits(1+this.skipLZ())},C.skipEG=function(){this.skipBits(1+this.skipLZ())},C.readUEG=function(){var l=this.skipLZ();return this.readBits(l+1)-1},C.readEG=function(){var l=this.readUEG();return 1&l?1+l>>>1:-1*(l>>>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(l){for(var p=8,h=8,d,o=0;o0?_.subarray(v,v+m):void 0},C=function(_,b){var v=0;return v=(_[b]&127)<<21,v|=(_[b+1]&127)<<14,v|=(_[b+2]&127)<<7,v|=_[b+3]&127,v},T=function(_,b){return w(_,b)&&C(_,b+6)+10<=_.length-b},l=function(_){for(var b=d(_),v=0;v>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:D+=String.fromCharCode(x);break;case 12:case 13:O=_[I++],D+=String.fromCharCode((x&31)<<6|O&63);break;case 14:O=_[I++],A=_[I++],D+=String.fromCharCode((x&15)<<12|(O&63)<<6|(A&63)<<0);break;default:}}return D},t={decodeTextFrame:s},u;function y(){return!u&&typeof self.TextDecoder!="undefined"&&(u=new self.TextDecoder("utf-8")),u}},"./src/demux/mp3demuxer.ts":function(ae,Z,U){"use strict";U.r(Z);var w=U("./src/demux/base-audio-demuxer.ts"),P=U("./src/demux/id3.ts"),S=U("./src/utils/logger.ts"),C=U("./src/demux/mpegaudio.ts");function T(h,d){h.prototype=Object.create(d.prototype),h.prototype.constructor=h,l(h,d)}function l(h,d){return l=Object.setPrototypeOf||function(c,s){return c.__proto__=s,c},l(h,d)}var p=function(h){T(d,h);function d(){return h.apply(this,arguments)||this}var o=d.prototype;return o.resetInitSegment=function(s,f,i){h.prototype.resetInitSegment.call(this,s,f,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}},d.probe=function(s){if(!s)return!1;for(var f=P.getID3Data(s,0)||[],i=f.length,n=s.length;i0},T.demux=function(p){var h=p,d=Object(P.dummyTrack)();if(this.config.progressive){this.remainderData&&(h=Object(w.appendUint8Array)(this.remainderData,p));var o=Object(w.segmentValidRange)(h);this.remainderData=o.remainder,d.samples=o.valid||new Uint8Array}else d.samples=h;return{audioTrack:Object(P.dummyTrack)(),avcTrack:d,id3Track:Object(P.dummyTrack)(),textTrack:Object(P.dummyTrack)()}},T.flush=function(){var p=Object(P.dummyTrack)();return p.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(P.dummyTrack)(),avcTrack:p,id3Track:Object(P.dummyTrack)(),textTrack:Object(P.dummyTrack)()}},T.demuxSampleAes=function(p,h,d){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},T.destroy=function(){},C}();S.minProbeByteLength=1024,Z.default=S},"./src/demux/mpegaudio.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"appendFrame",function(){return l}),U.d(Z,"parseHeader",function(){return p}),U.d(Z,"isHeaderPattern",function(){return h}),U.d(Z,"isHeader",function(){return d}),U.d(Z,"canParse",function(){return o}),U.d(Z,"probe",function(){return c});var w=null,P=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],S=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],C=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],T=[0,1,1,4];function l(s,f,i,n,t){if(i+24>f.length)return;var u=p(f,i);if(u&&i+u.frameLength<=f.length){var y=u.samplesPerFrame*9e4/u.sampleRate,g=n+t*y,_={unit:f.subarray(i,i+u.frameLength),pts:g,dts:g};return s.config=[],s.channelCount=u.channelCount,s.samplerate=u.sampleRate,s.samples.push(_),{sample:_,length:u.frameLength,missing:0}}}function p(s,f){var i=s[f+1]>>3&3,n=s[f+1]>>1&3,t=s[f+2]>>4&15,u=s[f+2]>>2&3;if(i!==1&&t!==0&&t!==15&&u!==3){var y=s[f+2]>>1&1,g=s[f+3]>>6,_=i===3?3-n:n===3?3:4,b=P[_*14+t-1]*1e3,v=i===3?0:i===2?1:2,m=S[v*3+u],E=g===3?1:2,a=C[i][n],x=T[n],O=a*8*x,A=Math.floor(a*b/m+y)*x;if(w===null){var D=navigator.userAgent||"",I=D.match(/Chrome\/(\d+)/i);w=I?parseInt(I[1]):0}var F=!!w&&w<=87;return F&&n===2&&b>=224e3&&g===0&&(s[f+3]=s[f+3]|128),{sampleRate:m,channelCount:E,frameLength:A,samplesPerFrame:O}}}function h(s,f){return s[f]===255&&(s[f+1]&224)===224&&(s[f+1]&6)!==0}function d(s,f){return f+1=p.length){d();return}if(p[h].unit.length<32)continue;var o=this.decrypter.isSync();if(this.decryptAacSample(p,h,d,o),!o)return}},T.getAvcEncryptedData=function(p){for(var h=Math.floor((p.length-48)/160)*16+16,d=new Int8Array(h),o=0,c=32;c<=p.length-16;c+=160,o+=16)d.set(p.subarray(c,c+16),o);return d},T.getAvcDecryptedUnit=function(p,h){for(var d=new Uint8Array(h),o=0,c=32;c<=p.length-16;c+=160,o+=16)p.set(d.subarray(o,o+16),c);return p},T.decryptAvcSample=function(p,h,d,o,c,s){var f=Object(P.discardEPB)(c.data),i=this.getAvcEncryptedData(f),n=this;this.decryptBuffer(i.buffer,function(t){c.data=n.getAvcDecryptedUnit(f,t),s||n.decryptAvcSamples(p,h,d+1,o)})},T.decryptAvcSamples=function(p,h,d,o){if(p instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;h++,d=0){if(h>=p.length){o();return}for(var c=p[h].units;!(d>=c.length);d++){var s=c[d];if(s.data.length<=48||s.type!==1&&s.type!==5)continue;var f=this.decrypter.isSync();if(this.decryptAvcSample(p,h,d,o,s,f),!f)return}}},C}();Z.default=S},"./src/demux/transmuxer-interface.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return c});var w=U("./node_modules/webworkify-webpack/index.js"),P=U.n(w),S=U("./src/events.ts"),C=U("./src/demux/transmuxer.ts"),T=U("./src/utils/logger.ts"),l=U("./src/errors.ts"),p=U("./src/utils/mediasource-helper.ts"),h=U("./node_modules/eventemitter3/index.js"),d=U.n(h),o=Object(p.getMediaSource)()||{isTypeSupported:function(){return!1}},c=function(){function s(i,n,t,u){var y=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=i,this.id=n,this.onTransmuxComplete=t,this.onFlush=u;var g=i.config,_=function(a,x){x=x||{},x.frag=y.frag,x.id=y.id,i.trigger(a,x)};this.observer=new h.EventEmitter,this.observer.on(S.Events.FRAG_DECRYPTED,_),this.observer.on(S.Events.ERROR,_);var b={mp4:o.isTypeSupported("video/mp4"),mpeg:o.isTypeSupported("audio/mpeg"),mp3:o.isTypeSupported('audio/mp4; codecs="mp3"')},v=navigator.vendor;if(g.enableWorker&&typeof Worker!="undefined"){T.logger.log("demuxing in webworker");var m;try{m=this.worker=w("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),m.addEventListener("message",this.onwmsg),m.onerror=function(E){i.trigger(S.Events.ERROR,{type:l.ErrorTypes.OTHER_ERROR,details:l.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(E.message+" ("+E.filename+":"+E.lineno+")")})},m.postMessage({cmd:"init",typeSupported:b,vendor:v,id:n,config:JSON.stringify(g)})}catch(E){T.logger.warn("Error in worker:",E),T.logger.error("Error while initializing DemuxerWorker, fallback to inline"),m&&self.URL.revokeObjectURL(m.objectURL),this.transmuxer=new C.default(this.observer,b,g,v,n),this.worker=null}}else this.transmuxer=new C.default(this.observer,b,g,v,n)}var f=s.prototype;return f.destroy=function(){var n=this.worker;if(n)n.removeEventListener("message",this.onwmsg),n.terminate(),this.worker=null;else{var t=this.transmuxer;t&&(t.destroy(),this.transmuxer=null)}var u=this.observer;u&&u.removeAllListeners(),this.observer=null},f.push=function(n,t,u,y,g,_,b,v,m,E){var a=this;m.transmuxing.start=self.performance.now();var x=this.transmuxer,O=this.worker,A=_?_.start:g.start,D=g.decryptdata,I=this.frag,F=!(I&&g.cc===I.cc),K=!(I&&m.level===I.level),ne=I?m.sn-I.sn:-1,j=this.part?m.part-this.part.index:1,G=!K&&(ne===1||ne===0&&j===1),X=self.performance.now();(K||ne||g.stats.parsing.start===0)&&(g.stats.parsing.start=X),_&&(j||!G)&&(_.stats.parsing.start=X);var J=new C.TransmuxState(F,G,v,K,A);if(!G||F){T.logger.log("[transmuxer-interface, "+g.type+"]: Starting new transmux session for sn: "+m.sn+" p: "+m.part+" level: "+m.level+" id: "+m.id+` discontinuity: `+F+` trackSwitch: `+K+` contiguous: `+G+` accurateTimeOffset: `+v+` timeOffset: `+A);var B=new C.TransmuxConfig(u,y,t,b,E);this.configureTransmuxer(B)}if(this.frag=g,this.part=_,O)O.postMessage({cmd:"demux",data:n,decryptdata:D,chunkMeta:m,state:J},n instanceof ArrayBuffer?[n]:[]);else if(x){var Q=x.push(n,D,m,J);Object(C.isPromise)(Q)?Q.then(function(ie){a.handleTransmuxComplete(ie)}):this.handleTransmuxComplete(Q)}},f.flush=function(n){var t=this;n.transmuxing.start=self.performance.now();var u=this.transmuxer,y=this.worker;if(y)y.postMessage({cmd:"flush",chunkMeta:n});else if(u){var g=u.flush(n);Object(C.isPromise)(g)?g.then(function(_){t.handleFlushResult(_,n)}):this.handleFlushResult(g,n)}},f.handleFlushResult=function(n,t){var u=this;n.forEach(function(y){u.handleTransmuxComplete(y)}),this.onFlush(t)},f.onWorkerMessage=function(n){var t=n.data,u=this.hls;switch(t.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(t.data);break}case"flush":{this.onFlush(t.data);break}default:{t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,u.trigger(t.event,t.data);break}}},f.configureTransmuxer=function(n){var t=this.worker,u=this.transmuxer;t?t.postMessage({cmd:"configure",config:n}):u&&u.configure(n)},f.handleTransmuxComplete=function(n){n.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(n)},s}()},"./src/demux/transmuxer-worker.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return l});var w=U("./src/demux/transmuxer.ts"),P=U("./src/events.ts"),S=U("./src/utils/logger.ts"),C=U("./node_modules/eventemitter3/index.js"),T=U.n(C);function l(c){var s=new C.EventEmitter,f=function(n,t){c.postMessage({event:n,data:t})};s.on(P.Events.FRAG_DECRYPTED,f),s.on(P.Events.ERROR,f),c.addEventListener("message",function(i){var n=i.data;switch(n.cmd){case"init":{var t=JSON.parse(n.config);c.transmuxer=new w.default(s,n.typeSupported,t,n.vendor,n.id),Object(S.enableLogs)(t.debug),f("init",null);break}case"configure":{c.transmuxer.configure(n.config);break}case"demux":{var u=c.transmuxer.push(n.data,n.decryptdata,n.chunkMeta,n.state);Object(w.isPromise)(u)?u.then(function(_){p(c,_)}):p(c,u);break}case"flush":{var y=n.chunkMeta,g=c.transmuxer.flush(y);Object(w.isPromise)(g)?g.then(function(_){d(c,_,y)}):d(c,g,y);break}default:break}})}function p(c,s){if(o(s.remuxResult))return;var f=[],i=s.remuxResult,n=i.audio,t=i.video;n&&h(f,n),t&&h(f,t),c.postMessage({event:"transmuxComplete",data:s},f)}function h(c,s){s.data1&&c.push(s.data1.buffer),s.data2&&c.push(s.data2.buffer)}function d(c,s,f){s.forEach(function(i){p(c,i)}),c.postMessage({event:"flush",data:f})}function o(c){return!c.audio&&!c.video&&!c.text&&!c.id3&&!c.initSegment}},"./src/demux/transmuxer.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return t}),U.d(Z,"isPromise",function(){return g}),U.d(Z,"TransmuxConfig",function(){return _}),U.d(Z,"TransmuxState",function(){return b});var w=U("./src/events.ts"),P=U("./src/errors.ts"),S=U("./src/crypt/decrypter.ts"),C=U("./src/demux/aacdemuxer.ts"),T=U("./src/demux/mp4demuxer.ts"),l=U("./src/demux/tsdemuxer.ts"),p=U("./src/demux/mp3demuxer.ts"),h=U("./src/remux/mp4-remuxer.ts"),d=U("./src/remux/passthrough-remuxer.ts"),o=U("./src/demux/chunk-cache.ts"),c=U("./src/utils/mp4-tools.ts"),s=U("./src/utils/logger.ts"),f;try{f=self.performance.now.bind(self.performance)}catch(v){s.logger.debug("Unable to use Performance API on this environment"),f=self.Date.now}var i=[{demux:l.default,remux:h.default},{demux:T.default,remux:d.default},{demux:C.default,remux:h.default},{demux:p.default,remux:h.default}],n=1024;i.forEach(function(v){var m=v.demux;n=Math.max(n,m.minProbeByteLength)});var t=function(){function v(E,a,x,O,A){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 o.default,this.observer=E,this.typeSupported=a,this.config=x,this.vendor=O,this.id=A}var m=v.prototype;return m.configure=function(a){this.transmuxConfig=a,this.decrypter&&this.decrypter.reset()},m.push=function(a,x,O,A){var D=this,I=O.transmuxing;I.executeStart=f();var F=new Uint8Array(a),K=this.cache,ne=this.config,j=this.currentTransmuxState,G=this.transmuxConfig;A&&(this.currentTransmuxState=A);var X=u(F,x);if(X&&X.method==="AES-128"){var J=this.getDecrypter();if(ne.enableSoftwareAES){var B=J.softwareDecrypt(F,X.key.buffer,X.iv.buffer);if(!B)return I.executeEnd=f(),y(O);F=new Uint8Array(B)}else return this.decryptionPromise=J.webCryptoDecrypt(F,X.key.buffer,X.iv.buffer).then(function(ke){var Ue=D.push(ke,null,O);return D.decryptionPromise=null,Ue}),this.decryptionPromise}var Q=A||j,ie=Q.contiguous,oe=Q.discontinuity,xe=Q.trackSwitch,ye=Q.accurateTimeOffset,Ae=Q.timeOffset,pe=G.audioCodec,Oe=G.videoCodec,Fe=G.defaultInitPts,Me=G.duration,Ce=G.initSegmentData;if((oe||xe)&&this.resetInitSegment(Ce,pe,Oe,Me),oe&&this.resetInitialTimestamp(Fe),ie||this.resetContiguity(),this.needsProbing(F,oe,xe)){if(K.dataLength){var Le=K.flush();F=Object(c.appendUint8Array)(Le,F)}this.configureTransmuxer(F,G)}var de=this.transmux(F,X,Ae,ye,O),ue=this.currentTransmuxState;return ue.contiguous=!0,ue.discontinuity=!1,ue.trackSwitch=!1,I.executeEnd=f(),de},m.flush=function(a){var x=this,O=a.transmuxing;O.executeStart=f();var A=this.decrypter,D=this.cache,I=this.currentTransmuxState,F=this.decryptionPromise;if(F)return F.then(function(){return x.flush(a)});var K=[],ne=I.timeOffset;if(A){var j=A.flush();j&&K.push(this.push(j,null,a))}var G=D.dataLength;D.reset();var X=this.demuxer,J=this.remuxer;if(!X||!J)return G>=n&&this.observer.emit(w.Events.ERROR,w.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),O.executeEnd=f(),[y(a)];var B=X.flush(ne);return g(B)?B.then(function(Q){return x.flushRemux(K,Q,a),K}):(this.flushRemux(K,B,a),K)},m.flushRemux=function(a,x,O){var A=x.audioTrack,D=x.avcTrack,I=x.id3Track,F=x.textTrack,K=this.currentTransmuxState,ne=K.accurateTimeOffset,j=K.timeOffset;s.logger.log("[transmuxer.ts]: Flushed fragment "+O.sn+(O.part>-1?" p: "+O.part:"")+" of level "+O.level);var G=this.remuxer.remux(A,D,I,F,j,ne,!0,this.id);a.push({remuxResult:G,chunkMeta:O}),O.transmuxing.executeEnd=f()},m.resetInitialTimestamp=function(a){var x=this.demuxer,O=this.remuxer;if(!x||!O)return;x.resetTimeStamp(a),O.resetTimeStamp(a)},m.resetContiguity=function(){var a=this.demuxer,x=this.remuxer;if(!a||!x)return;a.resetContiguity(),x.resetNextTimestamp()},m.resetInitSegment=function(a,x,O,A){var D=this.demuxer,I=this.remuxer;if(!D||!I)return;D.resetInitSegment(x,O,A),I.resetInitSegment(a,x,O)},m.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},m.transmux=function(a,x,O,A,D){var I;return x&&x.method==="SAMPLE-AES"?I=this.transmuxSampleAes(a,x,O,A,D):I=this.transmuxUnencrypted(a,O,A,D),I},m.transmuxUnencrypted=function(a,x,O,A){var D=this.demuxer.demux(a,x,!1,!this.config.progressive),I=D.audioTrack,F=D.avcTrack,K=D.id3Track,ne=D.textTrack,j=this.remuxer.remux(I,F,K,ne,x,O,!1,this.id);return{remuxResult:j,chunkMeta:A}},m.transmuxSampleAes=function(a,x,O,A,D){var I=this;return this.demuxer.demuxSampleAes(a,x,O).then(function(F){var K=I.remuxer.remux(F.audioTrack,F.avcTrack,F.id3Track,F.textTrack,O,A,!1,I.id);return{remuxResult:K,chunkMeta:D}})},m.configureTransmuxer=function(a,x){for(var O=this.config,A=this.observer,D=this.typeSupported,I=this.vendor,F=x.audioCodec,K=x.defaultInitPts,ne=x.duration,j=x.initSegmentData,G=x.videoCodec,X,J=0,B=i.length;J0&&m!=null&&m.key!=null&&m.iv!==null&&m.method!=null&&(E=m),E}var y=function(m){return{remuxResult:{},chunkMeta:m}};function g(v){return"then"in v&&v.then instanceof Function}var _=function(m,E,a,x,O){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=m,this.videoCodec=E,this.initSegmentData=a,this.duration=x,this.defaultInitPts=O},b=function(m,E,a,x,O){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=m,this.contiguous=E,this.accurateTimeOffset=a,this.trackSwitch=x,this.timeOffset=O}},"./src/demux/tsdemuxer.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"discardEPB",function(){return y});var w=U("./src/demux/adts.ts"),P=U("./src/demux/mpegaudio.ts"),S=U("./src/demux/exp-golomb.ts"),C=U("./src/demux/id3.ts"),T=U("./src/demux/sample-aes.ts"),l=U("./src/events.ts"),p=U("./src/utils/mp4-tools.ts"),h=U("./src/utils/logger.ts"),d=U("./src/errors.ts"),o={video:1,audio:2,id3:3,text:4},c=function(){function g(b,v,m){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=b,this.config=v,this.typeSupported=m}g.probe=function(v){var m=g.syncOffset(v);return m<0?!1:(m&&h.logger.warn("MPEG2-TS detected but first sync word found @ offset "+m+", junk ahead ?"),!0)},g.syncOffset=function(v){for(var m=Math.min(1e3,v.length-3*188),E=0;E>4,pe=void 0;if(Ae>1){if(pe=oe+5+v[oe+4],pe===oe+188)continue}else pe=oe+4;switch(ye){case I:xe&&(F&&(x=n(F))&&this.parseAVCPES(x,!1),F={data:[],size:0}),F&&(F.data.push(v.subarray(pe,oe+188)),F.size+=oe+188-pe);break;case K:xe&&(j&&(x=n(j))&&(A.isAAC?this.parseAACPES(x):this.parseMPEGPES(x)),j={data:[],size:0}),j&&(j.data.push(v.subarray(pe,oe+188)),j.size+=oe+188-pe);break;case ne:xe&&(G&&(x=n(G))&&this.parseID3PES(x),G={data:[],size:0}),G&&(G.data.push(v.subarray(pe,oe+188)),G.size+=oe+188-pe);break;case 0:xe&&(pe+=v[pe]+1),B=this._pmtId=f(v,pe);break;case B:{xe&&(pe+=v[pe]+1);var Oe=i(v,pe,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,E);I=Oe.avc,I>0&&(O.pid=I),K=Oe.audio,K>0&&(A.pid=K,A.isAAC=Oe.isAAC),ne=Oe.id3,ne>0&&(D.pid=ne),X&&!J&&(h.logger.log("reparse from beginning"),X=!1,oe=ie-188),J=this.pmtParsed=!0;break}case 17:case 8191:break;default:X=!0;break}}else this.observer.emit(l.Events.ERROR,l.Events.ERROR,{type:d.ErrorTypes.MEDIA_ERROR,details:d.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});O.pesData=F,A.pesData=j,D.pesData=G;var Fe={audioTrack:A,avcTrack:O,id3Track:D,textTrack:this._txtTrack};return a&&this.extractRemainingSamples(Fe),Fe},_.flush=function(){var v=this.remainderData;this.remainderData=null;var m;return v?m=this.demux(v,-1,!1,!0):m={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(m),this.sampleAes?this.decrypt(m,this.sampleAes):m},_.extractRemainingSamples=function(v){var m=v.audioTrack,E=v.avcTrack,a=v.id3Track,x=E.pesData,O=m.pesData,A=a.pesData,D;x&&(D=n(x))?(this.parseAVCPES(D,!0),E.pesData=null):E.pesData=x,O&&(D=n(O))?(m.isAAC?this.parseAACPES(D):this.parseMPEGPES(D),m.pesData=null):(O!=null&&O.size&&h.logger.log("last AAC PES packet truncated,might overlap between fragments"),m.pesData=O),A&&(D=n(A))?(this.parseID3PES(D),a.pesData=null):a.pesData=A},_.demuxSampleAes=function(v,m,E){var a=this.demux(v,E,!0,!this.config.progressive),x=this.sampleAes=new T.default(this.observer,this.config,m);return this.decrypt(a,x)},_.decrypt=function(v,m){return new Promise(function(E){var a=v.audioTrack,x=v.avcTrack;a.samples&&a.isAAC?m.decryptAacSamples(a.samples,0,function(){x.samples?m.decryptAvcSamples(x.samples,0,0,function(){E(v)}):E(v)}):x.samples&&m.decryptAvcSamples(x.samples,0,0,function(){E(v)})})},_.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},_.parseAVCPES=function(v,m){var E=this,a=this._avcTrack,x=this.parseAVCNALu(v.data),O=!1,A=this.avcSample,D,I=!1;v.data=null,A&&x.length&&!a.audFound&&(t(A,a),A=this.avcSample=s(!1,v.pts,v.dts,"")),x.forEach(function(F){switch(F.type){case 1:{D=!0,A||(A=E.avcSample=s(!0,v.pts,v.dts,"")),O&&(A.debug+="NDR "),A.frame=!0;var K=F.data;if(I&&K.length>4){var ne=new S.default(K).readSliceType();(ne===2||ne===4||ne===7||ne===9)&&(A.key=!0)}break}case 5:D=!0,A||(A=E.avcSample=s(!0,v.pts,v.dts,"")),O&&(A.debug+="IDR "),A.key=!0,A.frame=!0;break;case 6:{D=!0,O&&A&&(A.debug+="SEI ");var j=new S.default(y(F.data));j.readUByte();for(var G=0,X=0,J=!1,B=0;!J&&j.bytesAvailable>1;){G=0;do B=j.readUByte(),G+=B;while(B===255);X=0;do B=j.readUByte(),X+=B;while(B===255);if(G===4&&j.bytesAvailable!==0){J=!0;var Q=j.readUByte();if(Q===181){var ie=j.readUShort();if(ie===49){var oe=j.readUInt();if(oe===1195456820){var xe=j.readUByte();if(xe===3){for(var ye=j.readUByte(),Ae=j.readUByte(),pe=31&ye,Oe=[ye,Ae],Fe=0;Fe16){for(var Me=[],Ce=0;Ce<16;Ce++)Me.push(j.readUByte().toString(16)),(Ce===3||Ce===5||Ce===7||Ce===9)&&Me.push("-");for(var Le=X-16,de=new Uint8Array(Le),ue=0;ue=0){var j={data:v.subarray(K,A-a-1),type:ne};O.push(j)}else{var G=this.getLastNalUnit();if(G&&(x&&A<=4-x&&(G.state&&(G.data=G.data.subarray(0,G.data.byteLength-x))),I=A-a-1,I>0)){var X=new Uint8Array(G.data.byteLength+I);X.set(G.data,0),X.set(v.subarray(0,I),G.data.byteLength),G.data=X,G.state=0}}A=0&&a>=0){var J={data:v.subarray(K,m),type:ne,state:a};O.push(J)}if(O.length===0){var B=this.getLastNalUnit();if(B){var Q=new Uint8Array(B.data.byteLength+v.byteLength);Q.set(B.data,0),Q.set(v,B.data.byteLength),B.data=Q}}return E.naluState=a,O},_.parseAACPES=function(v){var m=0,E=this._audioTrack,a=this.aacOverFlow,x=v.data;if(a){this.aacOverFlow=null;var O=a.sample.unit.byteLength,A=Math.min(a.missing,O),D=O-A;a.sample.unit.set(x.subarray(0,A),D),E.samples.push(a.sample),m=a.missing}var I,F;for(I=m,F=x.length;I1;){var O=new Uint8Array(x[0].length+x[1].length);O.set(x[0]),O.set(x[1],x[0].length),x[0]=O,x.splice(1,1)}b=x[0];var A=(b[0]<<16)+(b[1]<<8)+b[2];if(A===1){if(v=(b[4]<<8)+b[5],v&&v>g.size-6)return null;var D=b[7];D&192&&(E=(b[9]&14)*536870912+(b[10]&255)*4194304+(b[11]&254)*16384+(b[12]&255)*128+(b[13]&254)/2,D&64?(a=(b[14]&14)*536870912+(b[15]&255)*4194304+(b[16]&254)*16384+(b[17]&255)*128+(b[18]&254)/2,E-a>60*9e4&&(h.logger.warn(Math.round((E-a)/9e4)+"s delta between PTS and DTS, align them"),E=a)):a=E),m=b[8];var I=m+9;if(g.size<=I)return null;g.size-=I;for(var F=new Uint8Array(g.size),K=0,ne=x.length;Kj){I-=j;continue}else b=b.subarray(I),j-=I,I=0;F.set(b,_),_+=j}return v&&(v-=m+3),{data:F,pts:E,dts:a,len:v}}return null}function t(g,_){if(g.units.length&&g.frame){if(g.pts===void 0){var b=_.samples,v=b.length;if(v){var m=b[v-1];g.pts=m.pts,g.dts=m.dts}else{_.dropped++;return}}_.samples.push(g)}g.debug.length&&h.logger.log(g.pts+"/"+g.dts+":"+g.debug)}function u(g,_){var b=g.length;if(b>0){if(_.pts>=g[b-1].pts)g.push(_);else for(var v=b-1;v>=0;v--)if(_.ptsE)return x;return 0}},{key:"maxAutoLevel",get:function(){var m=this.levels,E=this.autoLevelCapping,a;return E===-1&&m&&m.length?a=m.length-1:a=E,a}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(m){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,m)}},{key:"audioTracks",get:function(){var m=this.audioTrackController;return m?m.audioTracks:[]}},{key:"audioTrack",get:function(){var m=this.audioTrackController;return m?m.audioTrack:-1},set:function(m){var E=this.audioTrackController;E&&(E.audioTrack=m)}},{key:"subtitleTracks",get:function(){var m=this.subtitleTrackController;return m?m.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var m=this.subtitleTrackController;return m?m.subtitleTrack:-1},set:function(m){var E=this.subtitleTrackController;E&&(E.subtitleTrack=m)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var m=this.subtitleTrackController;return m?m.subtitleDisplay:!1},set:function(m){var E=this.subtitleTrackController;E&&(E.subtitleDisplay=m)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(m){this.config.lowLatencyMode=m}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return n.Events}},{key:"ErrorTypes",get:function(){return t.ErrorTypes}},{key:"ErrorDetails",get:function(){return t.ErrorDetails}},{key:"DefaultConfig",get:function(){return _.defaultConfig?_.defaultConfig:s.hlsDefaultConfig},set:function(m){_.defaultConfig=m}}]),_}();g.defaultConfig=void 0},"./src/is-supported.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"isSupported",function(){return S}),U.d(Z,"changeTypeSupported",function(){return C});var w=U("./src/utils/mediasource-helper.ts");function P(){return self.SourceBuffer||self.WebKitSourceBuffer}function S(){var T=Object(w.getMediaSource)();if(!T)return!1;var l=P(),p=T&&typeof T.isTypeSupported=="function"&&T.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),h=!l||l.prototype&&typeof l.prototype.appendBuffer=="function"&&typeof l.prototype.remove=="function";return!!p&&!!h}function C(){var T,l=P();return typeof(l==null||((T=l.prototype)===null||T===void 0)?void 0:T.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return c}),U.d(Z,"LoadError",function(){return f});var w=U("./src/polyfills/number.ts"),P=U("./src/errors.ts");function S(i,n){i.prototype=Object.create(n.prototype),i.prototype.constructor=i,h(i,n)}function C(i){var n=typeof Map=="function"?new Map:void 0;return C=function(u){if(u===null||!p(u))return u;if(typeof u!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n!="undefined"){if(n.has(u))return n.get(u);n.set(u,y)}function y(){return T(u,arguments,d(this).constructor)}return y.prototype=Object.create(u.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),h(y,u)},C(i)}function T(i,n,t){return l()?T=Reflect.construct:T=function(y,g,_){var b=[null];b.push.apply(b,g);var v=Function.bind.apply(y,b),m=new v;return _&&h(m,_.prototype),m},T.apply(null,arguments)}function l(){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 h(i,n){return h=Object.setPrototypeOf||function(u,y){return u.__proto__=y,u},h(i,n)}function d(i){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},d(i)}var o=Math.pow(2,17),c=function(){function i(t){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=t}var n=i.prototype;return n.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},n.abort=function(){this.loader&&this.loader.abort()},n.load=function(u,y){var g=this,_=u.url;if(!_)return Promise.reject(new f({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:u,networkDetails:null},"Fragment does not have a "+(_?"part list":"url")));this.abort();var b=this.config,v=b.fLoader,m=b.loader;return new Promise(function(E,a){g.loader&&g.loader.destroy();var x=g.loader=u.loader=v?new v(b):new m(b),O=s(u),A={timeout:b.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:b.fragLoadingMaxRetryTimeout,highWaterMark:o};u.stats=x.stats,x.load(O,A,{onSuccess:function(I,F,K,ne){g.resetLoader(u,x),E({frag:u,part:null,payload:I.data,networkDetails:ne})},onError:function(I,F,K){g.resetLoader(u,x),a(new f({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:u,response:I,networkDetails:K}))},onAbort:function(I,F,K){g.resetLoader(u,x),a(new f({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:u,networkDetails:K}))},onTimeout:function(I,F,K){g.resetLoader(u,x),a(new f({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:u,networkDetails:K}))},onProgress:function(I,F,K,ne){y&&y({frag:u,part:null,payload:K,networkDetails:ne})}})})},n.loadPart=function(u,y,g){var _=this;this.abort();var b=this.config,v=b.fLoader,m=b.loader;return new Promise(function(E,a){_.loader&&_.loader.destroy();var x=_.loader=u.loader=v?new v(b):new m(b),O=s(u,y),A={timeout:b.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:b.fragLoadingMaxRetryTimeout,highWaterMark:o};y.stats=x.stats,x.load(O,A,{onSuccess:function(I,F,K,ne){_.resetLoader(u,x),_.updateStatsFromPart(u,y);var j={frag:u,part:y,payload:I.data,networkDetails:ne};g(j),E(j)},onError:function(I,F,K){_.resetLoader(u,x),a(new f({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:u,part:y,response:I,networkDetails:K}))},onAbort:function(I,F,K){u.stats.aborted=y.stats.aborted,_.resetLoader(u,x),a(new f({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:u,part:y,networkDetails:K}))},onTimeout:function(I,F,K){_.resetLoader(u,x),a(new f({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:u,part:y,networkDetails:K}))}})})},n.updateStatsFromPart=function(u,y){var g=u.stats,_=y.stats,b=_.total;if(g.loaded+=_.loaded,b){var v=Math.round(u.duration/y.duration),m=Math.min(Math.round(g.loaded/b),v),E=v-m,a=E*Math.round(g.loaded/m);g.total=g.loaded+a}else g.total=Math.max(g.loaded,g.total);var x=g.loading,O=_.loading;x.start?x.first+=O.first-O.start:(x.start=O.start,x.first=O.first),x.end=O.end},n.resetLoader=function(u,y){u.loader=null,this.loader===y&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),y.destroy()},i}();function s(i,n){n===void 0&&(n=null);var t=n||i,u={frag:i,part:n,responseType:"arraybuffer",url:t.url,headers:{},rangeStart:0,rangeEnd:0},y=t.byteRangeStartOffset,g=t.byteRangeEndOffset;return Object(w.isFiniteNumber)(y)&&Object(w.isFiniteNumber)(g)&&(u.rangeStart=y,u.rangeEnd=g),u}var f=function(i){S(n,i);function n(t){for(var u,y=arguments.length,g=new Array(y>1?y-1:0),_=1;_>8*(15-b)&255;return _},u.setDecryptDataFromLevelKey=function(g,_){var b=g;return(g==null?void 0:g.method)==="AES-128"&&g.uri&&!g.iv&&(b=T.LevelKey.fromURI(g.uri),b.method=g.method,b.iv=this.createInitializationVector(_),b.keyFormat="identity"),b},u.setElementaryStreamInfo=function(g,_,b,v,m,E){E===void 0&&(E=!1);var a=this.elementaryStreams,x=a[g];if(!x){a[g]={startPTS:_,endPTS:b,startDTS:v,endDTS:m,partial:E};return}x.startPTS=Math.min(x.startPTS,_),x.endPTS=Math.max(x.endPTS,b),x.startDTS=Math.min(x.startDTS,v),x.endDTS=Math.max(x.endDTS,m)},u.clearElementaryStreamInfo=function(){var g=this.elementaryStreams;g[c.AUDIO]=null,g[c.VIDEO]=null,g[c.AUDIOVIDEO]=null},o(t,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var g=this.sn;typeof g!="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'),g=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,g)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(w.isFiniteNumber)(this.programDateTime))return null;var g=Object(w.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+g*1e3}},{key:"encrypted",get:function(){var g;return!!((g=this.decryptdata)!==null&&g!==void 0&&g.keyFormat&&this.decryptdata.uri)}}]),t}(s),i=function(n){p(t,n);function t(u,y,g,_,b){var v;v=n.call(this,g)||this,v.fragOffset=0,v.duration=0,v.gap=!1,v.independent=!1,v.relurl=void 0,v.fragment=void 0,v.index=void 0,v.stats=new l.LoadStats,v.duration=u.decimalFloatingPoint("DURATION"),v.gap=u.bool("GAP"),v.independent=u.bool("INDEPENDENT"),v.relurl=u.enumeratedString("URI"),v.fragment=y,v.index=_;var m=u.enumeratedString("BYTERANGE");return m&&v.setByteRange(m,b),b&&(v.fragOffset=b.fragOffset+b.duration),v}return o(t,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var y=this.elementaryStreams;return!!(y.audio||y.video||y.audiovideo)}}]),t}(s)},"./src/loader/key-loader.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return C});var w=U("./src/events.ts"),P=U("./src/errors.ts"),S=U("./src/utils/logger.ts"),C=function(){function T(p){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=p,this._registerListeners()}var l=T.prototype;return l._registerListeners=function(){this.hls.on(w.Events.KEY_LOADING,this.onKeyLoading,this)},l._unregisterListeners=function(){this.hls.off(w.Events.KEY_LOADING,this.onKeyLoading)},l.destroy=function(){this._unregisterListeners();for(var h in this.loaders){var d=this.loaders[h];d&&d.destroy()}this.loaders={}},l.onKeyLoading=function(h,d){var o=d.frag,c=o.type,s=this.loaders[c];if(!o.decryptdata){S.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var f=o.decryptdata.uri;if(f!==this.decrypturl||this.decryptkey===null){var i=this.hls.config;if(s&&(S.logger.warn("abort previous key loader for type:"+c),s.abort()),!f){S.logger.warn("key uri is falsy");return}var n=i.loader,t=o.loader=this.loaders[c]=new n(i);this.decrypturl=f,this.decryptkey=null;var u={url:f,frag:o,responseType:"arraybuffer"},y={timeout:i.fragLoadingTimeOut,maxRetry:0,retryDelay:i.fragLoadingRetryDelay,maxRetryDelay:i.fragLoadingMaxRetryTimeout,highWaterMark:0},g={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};t.load(u,y,g)}else this.decryptkey&&(o.decryptdata.key=this.decryptkey,this.hls.trigger(w.Events.KEY_LOADED,{frag:o}))},l.loadsuccess=function(h,d,o){var c=o.frag;if(!c.decryptdata){S.logger.error("after key load, decryptdata unset");return}this.decryptkey=c.decryptdata.key=new Uint8Array(h.data),c.loader=null,delete this.loaders[c.type],this.hls.trigger(w.Events.KEY_LOADED,{frag:c})},l.loaderror=function(h,d){var o=d.frag,c=o.loader;c&&c.abort(),delete this.loaders[o.type],this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:o,response:h})},l.loadtimeout=function(h,d){var o=d.frag,c=o.loader;c&&c.abort(),delete this.loaders[o.type],this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:o})},T}()},"./src/loader/level-details.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"LevelDetails",function(){return T});var w=U("./src/polyfills/number.ts");function P(l,p){for(var h=0;hd.endSN||o>0||o===0&&c>0,this.updated||this.advanced?this.misses=Math.floor(d.misses*.6):this.misses=d.misses+1,this.availabilityDelay=d.availabilityDelay},S(l,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(w.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||C}},{key:"drift",get:function(){var d=this.driftEndTime-this.driftStartTime;if(d>0){var o=this.driftEnd-this.driftStart;return o*1e3/d}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var d;return(d=this.partList)!==null&&d!==void 0&&d.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var d;return(d=this.fragments)!==null&&d!==void 0&&d.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 d;return(d=this.partList)!==null&&d!==void 0&&d.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var d;return(d=this.partList)!==null&&d!==void 0&&d.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),l}()},"./src/loader/level-key.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"LevelKey",function(){return T});var w=U("./node_modules/url-toolkit/src/url-toolkit.js"),P=U.n(w);function S(l,p){for(var h=0;h2){var a=E.shift()+".";return a+=parseInt(E.shift()).toString(16),a+=("000"+parseInt(E.shift()).toString(16)).substr(-4),a}return m},b.resolve=function(m,E){return P.buildAbsoluteURL(E,m,{alwaysNormalize:!0})},b.parseMasterPlaylist=function(m,E){var a=[],x={},O=!1;o.lastIndex=0;for(var A;(A=o.exec(m))!=null;)if(A[1]){var D=new p.AttrList(A[1]),I={attrs:D,bitrate:D.decimalInteger("AVERAGE-BANDWIDTH")||D.decimalInteger("BANDWIDTH"),name:D.NAME,url:b.resolve(A[2],E)},F=D.decimalResolution("RESOLUTION");F&&(I.width=F.width,I.height=F.height),u((D.CODECS||"").split(/[ ,]+/).filter(function(ne){return ne}),I),I.videoCodec&&I.videoCodec.indexOf("avc1")!==-1&&(I.videoCodec=b.convertAVC1ToAVCOTI(I.videoCodec)),a.push(I)}else if(A[3]){var K=new p.AttrList(A[3]);K["DATA-ID"]&&(O=!0,x[K["DATA-ID"]]=K)}return{levels:a,sessionData:O?x:null}},b.parseMasterPlaylistMedia=function(m,E,a,x){x===void 0&&(x=[]);var O,A=[],D=0;for(c.lastIndex=0;(O=c.exec(m))!==null;){var I=new p.AttrList(O[1]);if(I.TYPE===a){var F={attrs:I,bitrate:0,id:D++,groupId:I["GROUP-ID"],instreamId:I["INSTREAM-ID"],name:I.NAME||I.LANGUAGE||"",type:a,default:I.bool("DEFAULT"),autoselect:I.bool("AUTOSELECT"),forced:I.bool("FORCED"),lang:I.LANGUAGE,url:I.URI?b.resolve(I.URI,E):""};if(x.length){var K=b.findGroup(x,F.groupId)||x[0];y(F,K,"audioCodec"),y(F,K,"textCodec")}A.push(F)}}return A},b.parseLevelPlaylist=function(m,E,a,x,O){var A=new T.LevelDetails(E),D=A.fragments,I=null,F=0,K=0,ne=0,j=0,G=null,X=new C.Fragment(x,E),J,B,Q,ie=-1,oe=!1;for(s.lastIndex=0,A.m3u8=m;(J=s.exec(m))!==null;){oe&&(oe=!1,X=new C.Fragment(x,E),X.start=ne,X.sn=F,X.cc=j,X.level=a,I&&(X.initSegment=I,X.rawProgramDateTime=I.rawProgramDateTime));var xe=J[1];if(xe){X.duration=parseFloat(xe);var ye=(" "+J[2]).slice(1);X.title=ye||null,X.tagList.push(ye?["INF",xe,ye]:["INF",xe])}else if(J[3])Object(w.isFiniteNumber)(X.duration)&&(X.start=ne,Q&&(X.levelkey=Q),X.sn=F,X.level=a,X.cc=j,X.urlId=O,D.push(X),X.relurl=(" "+J[3]).slice(1),_(X,G),G=X,ne+=X.duration,F++,K=0,oe=!0);else if(J[4]){var Ae=(" "+J[4]).slice(1);G?X.setByteRange(Ae,G):X.setByteRange(Ae)}else if(J[5])X.rawProgramDateTime=(" "+J[5]).slice(1),X.tagList.push(["PROGRAM-DATE-TIME",X.rawProgramDateTime]),ie===-1&&(ie=D.length);else{if(J=J[0].match(f),!J){h.logger.warn("No matches on slow regex match for level playlist!");continue}for(B=1;B-1){h.logger.warn("Keyformat "+$+" is not supported from the manifest");continue}else if($!=="identity")continue;Ue&&(Q=l.LevelKey.fromURL(E,Ye),Ye&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(Ue)>=0&&(Q.method=Ue,Q.keyFormat=$,N&&(Q.keyID=N),M&&(Q.keyFormatVersions=M),Q.iv=ee));break}case"START":{var Y=new p.AttrList(Oe),me=Y.decimalFloatingPoint("TIME-OFFSET");Object(w.isFiniteNumber)(me)&&(A.startTimeOffset=me);break}case"MAP":{var Re=new p.AttrList(Oe);X.relurl=Re.URI,Re.BYTERANGE&&X.setByteRange(Re.BYTERANGE),X.level=a,X.sn="initSegment",Q&&(X.levelkey=Q),X.initSegment=null,I=X,oe=!0;break}case"SERVER-CONTROL":{var rt=new p.AttrList(Oe);A.canBlockReload=rt.bool("CAN-BLOCK-RELOAD"),A.canSkipUntil=rt.optionalFloat("CAN-SKIP-UNTIL",0),A.canSkipDateRanges=A.canSkipUntil>0&&rt.bool("CAN-SKIP-DATERANGES"),A.partHoldBack=rt.optionalFloat("PART-HOLD-BACK",0),A.holdBack=rt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Pe=new p.AttrList(Oe);A.partTarget=Pe.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ie=A.partList;Ie||(Ie=A.partList=[]);var Xe=K>0?Ie[Ie.length-1]:void 0,tt=K++,Ve=new C.Part(new p.AttrList(Oe),X,E,tt,Xe);Ie.push(Ve),X.duration+=Ve.duration;break}case"PRELOAD-HINT":{var Ke=new p.AttrList(Oe);A.preloadHint=Ke;break}case"RENDITION-REPORT":{var Ne=new p.AttrList(Oe);A.renditionReports=A.renditionReports||[],A.renditionReports.push(Ne);break}default:h.logger.warn("line parsed but not handled: "+J);break}}}G&&!G.relurl?(D.pop(),ne-=G.duration,A.partList&&(A.fragmentHint=G)):A.partList&&(_(X,G),X.cc=j,A.fragmentHint=X);var De=D.length,_e=D[0],he=D[De-1];if(ne+=A.skippedSegments*A.targetduration,ne>0&&De&&he){A.averagetargetduration=ne/De;var ve=he.sn;A.endSN=ve!=="initSegment"?ve:0,_e&&(A.startCC=_e.cc,_e.initSegment||A.fragments.every(function(Ee){return Ee.relurl&&n(Ee.relurl)})&&(h.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),X=new C.Fragment(x,E),X.relurl=he.relurl,X.level=a,X.sn="initSegment",_e.initSegment=X,A.needSidxRanges=!0))}else A.endSN=0,A.startCC=0;return A.fragmentHint&&(ne+=A.fragmentHint.duration),A.totalduration=ne,A.endCC=j,ie>0&&g(D,ie),A},b}();function u(b,v){["video","audio","text"].forEach(function(m){var E=b.filter(function(x){return Object(d.isCodecType)(x,m)});if(E.length){var a=E.filter(function(x){return x.lastIndexOf("avc1",0)===0||x.lastIndexOf("mp4a",0)===0});v[m+"Codec"]=a.length>0?a[0]:E[0],b=b.filter(function(x){return E.indexOf(x)===-1})}}),v.unknownCodecs=b}function y(b,v,m){var E=v[m];E&&(b[m]=E)}function g(b,v){for(var m=b[v],E=v;E--;){var a=b[E];if(!a)return;a.programDateTime=m.programDateTime-a.duration*1e3,m=a}}function _(b,v){b.rawProgramDateTime?b.programDateTime=Date.parse(b.rawProgramDateTime):v!=null&&v.programDateTime&&(b.programDateTime=v.endProgramDateTime),Object(w.isFiniteNumber)(b.programDateTime)||(b.programDateTime=null,b.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(ae,Z,U){"use strict";U.r(Z);var w=U("./src/polyfills/number.ts"),P=U("./src/events.ts"),S=U("./src/errors.ts"),C=U("./src/utils/logger.ts"),T=U("./src/utils/mp4-tools.ts"),l=U("./src/loader/m3u8-parser.ts"),p=U("./src/types/loader.ts"),h=U("./src/utils/attr-list.ts");function d(s){var f=s.type;switch(f){case p.PlaylistContextType.AUDIO_TRACK:return p.PlaylistLevelType.AUDIO;case p.PlaylistContextType.SUBTITLE_TRACK:return p.PlaylistLevelType.SUBTITLE;default:return p.PlaylistLevelType.MAIN}}function o(s,f){var i=s.url;return(i===void 0||i.indexOf("data:")===0)&&(i=f.url),i}var c=function(){function s(i){this.hls=void 0,this.loaders=Object.create(null),this.hls=i,this.registerListeners()}var f=s.prototype;return f.registerListeners=function(){var n=this.hls;n.on(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(P.Events.LEVEL_LOADING,this.onLevelLoading,this),n.on(P.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),n.on(P.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},f.unregisterListeners=function(){var n=this.hls;n.off(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(P.Events.LEVEL_LOADING,this.onLevelLoading,this),n.off(P.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),n.off(P.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},f.createInternalLoader=function(n){var t=this.hls.config,u=t.pLoader,y=t.loader,g=u||y,_=new g(t);return n.loader=_,this.loaders[n.type]=_,_},f.getInternalLoader=function(n){return this.loaders[n.type]},f.resetInternalLoader=function(n){this.loaders[n]&&delete this.loaders[n]},f.destroyInternalLoaders=function(){for(var n in this.loaders){var t=this.loaders[n];t&&t.destroy(),this.resetInternalLoader(n)}},f.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},f.onManifestLoading=function(n,t){var u=t.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:p.PlaylistContextType.MANIFEST,url:u,deliveryDirectives:null})},f.onLevelLoading=function(n,t){var u=t.id,y=t.level,g=t.url,_=t.deliveryDirectives;this.load({id:u,groupId:null,level:y,responseType:"text",type:p.PlaylistContextType.LEVEL,url:g,deliveryDirectives:_})},f.onAudioTrackLoading=function(n,t){var u=t.id,y=t.groupId,g=t.url,_=t.deliveryDirectives;this.load({id:u,groupId:y,level:null,responseType:"text",type:p.PlaylistContextType.AUDIO_TRACK,url:g,deliveryDirectives:_})},f.onSubtitleTrackLoading=function(n,t){var u=t.id,y=t.groupId,g=t.url,_=t.deliveryDirectives;this.load({id:u,groupId:y,level:null,responseType:"text",type:p.PlaylistContextType.SUBTITLE_TRACK,url:g,deliveryDirectives:_})},f.load=function(n){var t,u=this.hls.config,y=this.getInternalLoader(n);if(y){var g=y.context;if(g&&g.url===n.url){C.logger.trace("[playlist-loader]: playlist request ongoing");return}C.logger.log("[playlist-loader]: aborting previous loader for type: "+n.type),y.abort()}var _,b,v,m;switch(n.type){case p.PlaylistContextType.MANIFEST:_=u.manifestLoadingMaxRetry,b=u.manifestLoadingTimeOut,v=u.manifestLoadingRetryDelay,m=u.manifestLoadingMaxRetryTimeout;break;case p.PlaylistContextType.LEVEL:case p.PlaylistContextType.AUDIO_TRACK:case p.PlaylistContextType.SUBTITLE_TRACK:_=0,b=u.levelLoadingTimeOut;break;default:_=u.levelLoadingMaxRetry,b=u.levelLoadingTimeOut,v=u.levelLoadingRetryDelay,m=u.levelLoadingMaxRetryTimeout;break}if(y=this.createInternalLoader(n),(t=n.deliveryDirectives)!==null&&t!==void 0&&t.part){var E;if(n.type===p.PlaylistContextType.LEVEL&&n.level!==null?E=this.hls.levels[n.level].details:n.type===p.PlaylistContextType.AUDIO_TRACK&&n.id!==null?E=this.hls.audioTracks[n.id].details:n.type===p.PlaylistContextType.SUBTITLE_TRACK&&n.id!==null&&(E=this.hls.subtitleTracks[n.id].details),E){var a=E.partTarget,x=E.targetduration;a&&x&&(b=Math.min(Math.max(a*3,x*.8)*1e3,b))}}var O={timeout:b,maxRetry:_,retryDelay:v,maxRetryDelay:m,highWaterMark:0},A={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};y.load(n,O,A)},f.loadsuccess=function(n,t,u,y){if(y===void 0&&(y=null),u.isSidxRequest){this.handleSidxRequest(n,u),this.handlePlaylistLoaded(n,t,u,y);return}this.resetInternalLoader(u.type);var g=n.data;if(g.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(n,u,"no EXTM3U delimiter",y);return}t.parsing.start=performance.now(),g.indexOf("#EXTINF:")>0||g.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(n,t,u,y):this.handleMasterPlaylist(n,t,u,y)},f.loaderror=function(n,t,u){u===void 0&&(u=null),this.handleNetworkError(t,u,!1,n)},f.loadtimeout=function(n,t,u){u===void 0&&(u=null),this.handleNetworkError(t,u,!0)},f.handleMasterPlaylist=function(n,t,u,y){var g=this.hls,_=n.data,b=o(n,u),v=l.default.parseMasterPlaylist(_,b),m=v.levels,E=v.sessionData;if(!m.length){this.handleManifestParsingError(n,u,"no level found in manifest",y);return}var a=m.map(function(F){return{id:F.attrs.AUDIO,audioCodec:F.audioCodec}}),x=m.map(function(F){return{id:F.attrs.SUBTITLES,textCodec:F.textCodec}}),O=l.default.parseMasterPlaylistMedia(_,b,"AUDIO",a),A=l.default.parseMasterPlaylistMedia(_,b,"SUBTITLES",x),D=l.default.parseMasterPlaylistMedia(_,b,"CLOSED-CAPTIONS");if(O.length){var I=O.some(function(F){return!F.url});!I&&m[0].audioCodec&&!m[0].attrs.AUDIO&&(C.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),O.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new h.AttrList({}),bitrate:0,url:""}))}g.trigger(P.Events.MANIFEST_LOADED,{levels:m,audioTracks:O,subtitles:A,captions:D,url:b,stats:t,networkDetails:y,sessionData:E})},f.handleTrackOrLevelPlaylist=function(n,t,u,y){var g=this.hls,_=u.id,b=u.level,v=u.type,m=o(n,u),E=Object(w.isFiniteNumber)(_)?_:0,a=Object(w.isFiniteNumber)(b)?b:E,x=d(u),O=l.default.parseLevelPlaylist(n.data,m,a,x,E);if(!O.fragments.length){g.trigger(P.Events.ERROR,{type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:m,reason:"no fragments found in level",level:typeof u.level=="number"?u.level:void 0});return}if(v===p.PlaylistContextType.MANIFEST){var A={attrs:new h.AttrList({}),bitrate:0,details:O,name:"",url:m};g.trigger(P.Events.MANIFEST_LOADED,{levels:[A],audioTracks:[],url:m,stats:t,networkDetails:y,sessionData:null})}if(t.parsing.end=performance.now(),O.needSidxRanges){var D,I=(D=O.fragments[0].initSegment)===null||D===void 0?void 0:D.url;this.load({url:I,isSidxRequest:!0,type:v,level:b,levelDetails:O,id:_,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}u.levelDetails=O,this.handlePlaylistLoaded(n,t,u,y)},f.handleSidxRequest=function(n,t){var u=Object(T.parseSegmentIndex)(new Uint8Array(n.data));if(!u)return;var y=u.references,g=t.levelDetails;y.forEach(function(_,b){var v=_.info,m=g.fragments[b];m.byteRange.length===0&&m.setByteRange(String(1+v.end-v.start)+"@"+String(v.start)),m.initSegment&&m.initSegment.setByteRange(String(u.moovEndOffset)+"@0")})},f.handleManifestParsingError=function(n,t,u,y){this.hls.trigger(P.Events.ERROR,{type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:t.type===p.PlaylistContextType.MANIFEST,url:n.url,reason:u,response:n,context:t,networkDetails:y})},f.handleNetworkError=function(n,t,u,y){u===void 0&&(u=!1),C.logger.warn("[playlist-loader]: A network "+(u?"timeout":"error")+" occurred while loading "+n.type+" level: "+n.level+" id: "+n.id+' group-id: "'+n.groupId+'"');var g=S.ErrorDetails.UNKNOWN,_=!1,b=this.getInternalLoader(n);switch(n.type){case p.PlaylistContextType.MANIFEST:g=u?S.ErrorDetails.MANIFEST_LOAD_TIMEOUT:S.ErrorDetails.MANIFEST_LOAD_ERROR,_=!0;break;case p.PlaylistContextType.LEVEL:g=u?S.ErrorDetails.LEVEL_LOAD_TIMEOUT:S.ErrorDetails.LEVEL_LOAD_ERROR,_=!1;break;case p.PlaylistContextType.AUDIO_TRACK:g=u?S.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:S.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,_=!1;break;case p.PlaylistContextType.SUBTITLE_TRACK:g=u?S.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:S.ErrorDetails.SUBTITLE_LOAD_ERROR,_=!1;break}b&&this.resetInternalLoader(n.type);var v={type:S.ErrorTypes.NETWORK_ERROR,details:g,fatal:_,url:n.url,loader:b,context:n,networkDetails:t};y&&(v.response=y),this.hls.trigger(P.Events.ERROR,v)},f.handlePlaylistLoaded=function(n,t,u,y){var g=u.type,_=u.level,b=u.id,v=u.groupId,m=u.loader,E=u.levelDetails,a=u.deliveryDirectives;if(!(E!=null&&E.targetduration)){this.handleManifestParsingError(n,u,"invalid target duration",y);return}if(!m)return;E.live&&(m.getCacheAge&&(E.ageHeader=m.getCacheAge()||0),(!m.getCacheAge||isNaN(E.ageHeader))&&(E.ageHeader=0));switch(g){case p.PlaylistContextType.MANIFEST:case p.PlaylistContextType.LEVEL:this.hls.trigger(P.Events.LEVEL_LOADED,{details:E,level:_||0,id:b||0,stats:t,networkDetails:y,deliveryDirectives:a});break;case p.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(P.Events.AUDIO_TRACK_LOADED,{details:E,id:b||0,groupId:v||"",stats:t,networkDetails:y,deliveryDirectives:a});break;case p.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(P.Events.SUBTITLE_TRACK_LOADED,{details:E,id:b||0,groupId:v||"",stats:t,networkDetails:y,deliveryDirectives:a});break}},s}();Z.default=c},"./src/polyfills/number.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"isFiniteNumber",function(){return w}),U.d(Z,"MAX_SAFE_INTEGER",function(){return P});var w=Number.isFinite||function(S){return typeof S=="number"&&isFinite(S)},P=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(ae,Z,U){"use strict";U.r(Z);var w=function(){function P(){}return P.getSilentFrame=function(C,T){switch(C){case"mp4a.40.2":if(T===1)return new Uint8Array([0,200,0,128,35,128]);if(T===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(T===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(T===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(T===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(T===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(T===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(T===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(T===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}return},P}();Z.default=w},"./src/remux/mp4-generator.ts":function(ae,Z,U){"use strict";U.r(Z);var w=Math.pow(2,32)-1,P=function(){function S(){}return S.init=function(){S.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var T;for(T in S.types)S.types.hasOwnProperty(T)&&(S.types[T]=[T.charCodeAt(0),T.charCodeAt(1),T.charCodeAt(2),T.charCodeAt(3)]);var l=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),p=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);S.HDLR_TYPES={video:l,audio:p};var h=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),d=new Uint8Array([0,0,0,0,0,0,0,0]);S.STTS=S.STSC=S.STCO=d,S.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),S.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),S.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),S.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var o=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),s=new Uint8Array([0,0,0,1]);S.FTYP=S.box(S.types.ftyp,o,s,o,c),S.DINF=S.box(S.types.dinf,S.box(S.types.dref,h))},S.box=function(T){for(var l=8,p=arguments.length,h=new Array(p>1?p-1:0),d=1;d>24&255,s[1]=l>>16&255,s[2]=l>>8&255,s[3]=l&255,s.set(T,4),o=0,l=8;o>24&255,T>>16&255,T>>8&255,T&255,p>>24,p>>16&255,p>>8&255,p&255,h>>24,h>>16&255,h>>8&255,h&255,85,196,0,0]))},S.mdia=function(T){return S.box(S.types.mdia,S.mdhd(T.timescale,T.duration),S.hdlr(T.type),S.minf(T))},S.mfhd=function(T){return S.box(S.types.mfhd,new Uint8Array([0,0,0,0,T>>24,T>>16&255,T>>8&255,T&255]))},S.minf=function(T){return T.type==="audio"?S.box(S.types.minf,S.box(S.types.smhd,S.SMHD),S.DINF,S.stbl(T)):S.box(S.types.minf,S.box(S.types.vmhd,S.VMHD),S.DINF,S.stbl(T))},S.moof=function(T,l,p){return S.box(S.types.moof,S.mfhd(T),S.traf(p,l))},S.moov=function(T){for(var l=T.length,p=[];l--;)p[l]=S.trak(T[l]);return S.box.apply(null,[S.types.moov,S.mvhd(T[0].timescale,T[0].duration)].concat(p).concat(S.mvex(T)))},S.mvex=function(T){for(var l=T.length,p=[];l--;)p[l]=S.trex(T[l]);return S.box.apply(null,[S.types.mvex].concat(p))},S.mvhd=function(T,l){l*=T;var p=Math.floor(l/(w+1)),h=Math.floor(l%(w+1)),d=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,T>>24&255,T>>16&255,T>>8&255,T&255,p>>24,p>>16&255,p>>8&255,p&255,h>>24,h>>16&255,h>>8&255,h&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return S.box(S.types.mvhd,d)},S.sdtp=function(T){var l=T.samples||[],p=new Uint8Array(4+l.length),h,d;for(h=0;h>>8&255),l.push(o&255),l=l.concat(Array.prototype.slice.call(d));for(h=0;h>>8&255),p.push(o&255),p=p.concat(Array.prototype.slice.call(d));var c=S.box(S.types.avcC,new Uint8Array([1,l[3],l[4],l[5],252|3,224|T.sps.length].concat(l).concat([T.pps.length]).concat(p))),s=T.width,f=T.height,i=T.pixelRatio[0],n=T.pixelRatio[1];return S.box(S.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,s>>8&255,s&255,f>>8&255,f&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),c,S.box(S.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),S.box(S.types.pasp,new Uint8Array([i>>24,i>>16&255,i>>8&255,i&255,n>>24,n>>16&255,n>>8&255,n&255])))},S.esds=function(T){var l=T.config.length;return new Uint8Array([0,0,0,0,3,23+l,0,1,0,4,15+l,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([l]).concat(T.config).concat([6,1,2]))},S.mp4a=function(T){var l=T.samplerate;return S.box(S.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,T.channelCount,0,16,0,0,0,0,l>>8&255,l&255,0,0]),S.box(S.types.esds,S.esds(T)))},S.mp3=function(T){var l=T.samplerate;return S.box(S.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,T.channelCount,0,16,0,0,0,0,l>>8&255,l&255,0,0]))},S.stsd=function(T){return T.type==="audio"?!T.isAAC&&T.codec==="mp3"?S.box(S.types.stsd,S.STSD,S.mp3(T)):S.box(S.types.stsd,S.STSD,S.mp4a(T)):S.box(S.types.stsd,S.STSD,S.avc1(T))},S.tkhd=function(T){var l=T.id,p=T.duration*T.timescale,h=T.width,d=T.height,o=Math.floor(p/(w+1)),c=Math.floor(p%(w+1));return S.box(S.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,l>>24&255,l>>16&255,l>>8&255,l&255,0,0,0,0,o>>24,o>>16&255,o>>8&255,o&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,h>>8&255,h&255,0,0,d>>8&255,d&255,0,0]))},S.traf=function(T,l){var p=S.sdtp(T),h=T.id,d=Math.floor(l/(w+1)),o=Math.floor(l%(w+1));return S.box(S.types.traf,S.box(S.types.tfhd,new Uint8Array([0,0,0,0,h>>24,h>>16&255,h>>8&255,h&255])),S.box(S.types.tfdt,new Uint8Array([1,0,0,0,d>>24,d>>16&255,d>>8&255,d&255,o>>24,o>>16&255,o>>8&255,o&255])),S.trun(T,p.length+16+20+8+16+8+8),p)},S.trak=function(T){return T.duration=T.duration||4294967295,S.box(S.types.trak,S.tkhd(T),S.mdia(T))},S.trex=function(T){var l=T.id;return S.box(S.types.trex,new Uint8Array([0,0,0,0,l>>24,l>>16&255,l>>8&255,l&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},S.trun=function(T,l){var p=T.samples||[],h=p.length,d=12+16*h,o=new Uint8Array(d),c,s,f,i,n,t;for(l+=8+d,o.set([0,0,15,1,h>>>24&255,h>>>16&255,h>>>8&255,h&255,l>>>24&255,l>>>16&255,l>>>8&255,l&255],0),c=0;c>>24&255,f>>>16&255,f>>>8&255,f&255,i>>>24&255,i>>>16&255,i>>>8&255,i&255,n.isLeading<<2|n.dependsOn,n.isDependedOn<<6|n.hasRedundancy<<4|n.paddingValue<<1|n.isNonSync,n.degradPrio&240<<8,n.degradPrio&15,t>>>24&255,t>>>16&255,t>>>8&255,t&255],12+16*c);return S.box(S.types.trun,o)},S.initSegment=function(T){S.types||S.init();var l=S.moov(T),p=new Uint8Array(S.FTYP.byteLength+l.byteLength);return p.set(S.FTYP),p.set(l,S.FTYP.byteLength),p},S}();P.types=void 0,P.HDLR_TYPES=void 0,P.STTS=void 0,P.STSC=void 0,P.STCO=void 0,P.STSZ=void 0,P.VMHD=void 0,P.SMHD=void 0,P.STSD=void 0,P.FTYP=void 0,P.DINF=void 0,Z.default=P},"./src/remux/mp4-remuxer.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return t}),U.d(Z,"normalizePts",function(){return u});var w=U("./src/polyfills/number.ts"),P=U("./src/remux/aac-helper.ts"),S=U("./src/remux/mp4-generator.ts"),C=U("./src/events.ts"),T=U("./src/errors.ts"),l=U("./src/utils/logger.ts"),p=U("./src/types/loader.ts"),h=U("./src/utils/timescale-conversion.ts");function d(){return d=Object.assign||function(b){for(var v=1;v0?O:A.pts},E[0].pts);return a&&l.logger.debug("PTS rollover detected"),x},v.remux=function(E,a,x,O,A,D,I,F){var K,ne,j,G,X,J,B=A,Q=A,ie=E.pid>-1,oe=a.pid>-1,xe=a.samples.length,ye=E.samples.length>0,Ae=xe>1,pe=(!ie||ye)&&(!oe||Ae)||this.ISGenerated||I;if(pe){this.ISGenerated||(j=this.generateIS(E,a,A));var Oe=this.isVideoContiguous,Fe=-1;if(Ae&&(Fe=y(a.samples),!Oe&&this.config.forceKeyFrameOnDiscontinuity))if(J=!0,Fe>0){l.logger.warn("[mp4-remuxer]: Dropped "+Fe+" out of "+xe+" video samples due to a missing keyframe");var Me=this.getVideoStartPts(a.samples);a.samples=a.samples.slice(Fe),a.dropped+=Fe,Q+=(a.samples[0].pts-Me)/(a.timescale||9e4)}else Fe===-1&&(l.logger.warn("[mp4-remuxer]: No keyframe found out of "+xe+" video samples"),J=!1);if(this.ISGenerated){if(ye&&Ae){var Ce=this.getVideoStartPts(a.samples),Le=u(E.samples[0].pts,Ce)-Ce,de=Le/a.inputTimeScale;B+=Math.max(0,de),Q+=Math.max(0,-de)}if(ye){if(E.samplerate||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),j=this.generateIS(E,a,A)),ne=this.remuxAudio(E,B,this.isAudioContiguous,D,oe||Ae||F===p.PlaylistLevelType.AUDIO?Q:void 0),Ae){var ue=ne?ne.endPTS-ne.startPTS:0;a.inputTimeScale||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),j=this.generateIS(E,a,A)),K=this.remuxVideo(a,Q,Oe,ue)}}else Ae&&(K=this.remuxVideo(a,Q,Oe,0));K&&(K.firstKeyFrame=Fe,K.independent=Fe!==-1)}}return this.ISGenerated&&(x.samples.length&&(X=this.remuxID3(x,A)),O.samples.length&&(G=this.remuxText(O,A))),{audio:ne,video:K,initSegment:j,independent:J,text:G,id3:X}},v.generateIS=function(E,a,x){var O=E.samples,A=a.samples,D=this.typeSupported,I={},F=!Object(w.isFiniteNumber)(this._initPTS),K="audio/mp4",ne,j,G;if(F&&(ne=j=Infinity),E.config&&O.length&&(E.timescale=E.samplerate,E.isAAC||(D.mpeg?(K="audio/mpeg",E.codec=""):D.mp3&&(E.codec="mp3")),I.audio={id:"audio",container:K,codec:E.codec,initSegment:!E.isAAC&&D.mpeg?new Uint8Array(0):S.default.initSegment([E]),metadata:{channelCount:E.channelCount}},F&&(G=E.inputTimeScale,ne=j=O[0].pts-Math.round(G*x))),a.sps&&a.pps&&A.length&&(a.timescale=a.inputTimeScale,I.video={id:"main",container:"video/mp4",codec:a.codec,initSegment:S.default.initSegment([a]),metadata:{width:a.width,height:a.height}},F)){G=a.inputTimeScale;var X=this.getVideoStartPts(A),J=Math.round(G*x);j=Math.min(j,u(A[0].dts,X)-J),ne=Math.min(ne,X-J)}if(Object.keys(I).length)return this.ISGenerated=!0,F&&(this._initPTS=ne,this._initDTS=j),{tracks:I,initPTS:ne,timescale:G}},v.remuxVideo=function(E,a,x,O){var A=E.inputTimeScale,D=E.samples,I=[],F=D.length,K=this._initPTS,ne=this.nextAvcDts,j=8,G,X,J,B=Number.POSITIVE_INFINITY,Q=Number.NEGATIVE_INFINITY,ie=0,oe=!1;if(!x||ne===null){var xe=a*A,ye=D[0].pts-u(D[0].dts,D[0].pts);ne=xe-ye}for(var Ae=0;Aepe.pts){var Oe=9e4*.2;ie=Math.max(Math.min(ie,pe.pts-pe.dts),-1*Oe)}pe.dts0?Ae-1:Ae].dts&&(oe=!0)}oe&&D.sort(function(wt,lt){var ft=wt.dts-lt.dts,Qe=wt.pts-lt.pts;return ft||Qe}),X=D[0].dts,J=D[D.length-1].dts;var Fe=Math.round((J-X)/(F-1));if(ie<0){if(ieFe,ke=de<-1;if(ue||ke){ue?l.logger.warn("AVC: "+Object(h.toMsFromMpegTsClock)(de,!0)+" ms ("+de+"dts) hole between fragments detected, filling it"):l.logger.warn("AVC: "+Object(h.toMsFromMpegTsClock)(-de,!0)+" ms ("+de+"dts) overlapping between fragments detected"),X=ne;var Ue=D[0].pts-de;D[0].dts=X,D[0].pts=Ue,l.logger.log("Video: First PTS/DTS adjusted: "+Object(h.toMsFromMpegTsClock)(Ue,!0)+"/"+Object(h.toMsFromMpegTsClock)(X,!0)+", delta: "+Object(h.toMsFromMpegTsClock)(de,!0)+" ms")}}n&&(X=Math.max(0,X));for(var Ye=0,ee=0,M=0;M0?Ie-1:Ie].dts;if(ve.stretchShortVideoTrack&&this.nextAudioPts!==null){var be=Math.floor(ve.maxBufferHole*A),Ge=(O?B+O*A:this.nextAudioPts)-Xe.pts;Ge>be?(G=Ge-Ee,G<0&&(G=Ee),l.logger.log("[mp4-remuxer]: It is approximately "+Ge/90+" ms to the next segment; using duration "+G/90+" ms for the last video frame.")):G=Ee}else G=Ee}var qe=Math.round(Xe.pts-Xe.dts);I.push(new g(Xe.key,G,Ve,qe))}if(I.length&&f&&f<70){var pt=I[0].flags;pt.dependsOn=2,pt.isNonSync=0}console.assert(G!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=ne=J+G,this.isVideoContiguous=!0;var Pt=S.default.moof(E.sequenceNumber++,X,d({},E,{samples:I})),Rt="video",Mt={data1:Pt,data2:rt,startPTS:B/A,endPTS:(Q+G)/A,startDTS:X/A,endDTS:ne/A,type:Rt,hasAudio:!1,hasVideo:!0,nb:I.length,dropped:E.dropped};return E.samples=[],E.dropped=0,console.assert(rt.length,"MDAT length must not be zero"),Mt},v.remuxAudio=function(E,a,x,O,A){var D=E.inputTimeScale,I=E.samplerate?E.samplerate:D,F=D/I,K=E.isAAC?c:s,ne=K*F,j=this._initPTS,G=!E.isAAC&&this.typeSupported.mpeg,X=[],J=E.samples,B=G?0:8,Q=this.nextAudioPts||-1,ie=a*D;if(this.isAudioContiguous=x=x||J.length&&Q>0&&(O&&Math.abs(ie-Q)<9e3||Math.abs(u(J[0].pts-j,ie)-Q)<20*ne),J.forEach(function(_e){_e.pts=u(_e.pts-j,ie)}),!x||Q<0){if(J=J.filter(function(_e){return _e.pts>=0}),!J.length)return;A===0?Q=0:O?Q=Math.max(0,ie):Q=J[0].pts}if(E.isAAC)for(var oe=A!==void 0,xe=this.config.maxAudioFramesDrift,ye=0,Ae=Q;ye=xe*ne&&Me0){ee+=B;try{Ye=new Uint8Array(ee)}catch(_e){this.observer.emit(C.Events.ERROR,C.Events.ERROR,{type:T.ErrorTypes.MUX_ERROR,details:T.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:ee,reason:"fail allocating audio mdat "+ee});return}if(!G){var rt=new DataView(Ye.buffer);rt.setUint32(0,ee),Ye.set(S.default.types.mdat,4)}}else return;Ye.set(Y,B);var Pe=Y.byteLength;B+=Pe,X.push(new g(!0,K,Pe,0)),Ue=me}var Ie=X.length;if(!Ie)return;var Xe=X[X.length-1];this.nextAudioPts=Q=Ue+F*Xe.duration;var tt=G?new Uint8Array(0):S.default.moof(E.sequenceNumber++,ke/F,d({},E,{samples:X}));E.samples=[];var Ve=ke/D,Ke=Q/D,Ne="audio",De={data1:tt,data2:Ye,startPTS:Ve,endPTS:Ke,startDTS:Ve,endDTS:Ke,type:Ne,hasAudio:!0,hasVideo:!1,nb:Ie};return this.isAudioContiguous=!0,console.assert(Ye.length,"MDAT length must not be zero"),De},v.remuxEmptyAudio=function(E,a,x,O){var A=E.inputTimeScale,D=E.samplerate?E.samplerate:A,I=A/D,F=this.nextAudioPts,K=(F!==null?F:O.startDTS*A)+this._initDTS,ne=O.endDTS*A+this._initDTS,j=I*c,G=Math.ceil((ne-K)/j),X=P.default.getSilentFrame(E.manifestCodec||E.codec,E.channelCount);if(l.logger.warn("[mp4-remuxer]: remux empty Audio"),!X){l.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var J=[],B=0;B4294967296;)b+=m;return b}function y(b){for(var v=0;v0?this.lastEndDTS=E:(C.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var a=!!b.audio,x=!!b.video,O="";a&&(O+="audio"),x&&(O+="video");var A={data1:g,startPTS:m,startDTS:m,endPTS:E,endDTS:E,type:O,hasAudio:a,hasVideo:x,nb:1,dropped:0};return y.audio=A.type==="audio"?A:void 0,y.video=A.type!=="audio"?A:void 0,y.text=i,y.id3=f,y.initSegment=_,y},h}(),l=function(d,o,c){return Object(P.getStartDTS)(d,o)-c};function p(h,d){var o=h==null?void 0:h.codec;return o&&o.length>4?o:o==="hvc1"?"hvc1.1.c.L120.90":o==="av01"?"av01.0.04M.08":o==="avc1"||d===S.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}Z.default=T},"./src/task-loop.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return w});var w=function(){function P(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var S=P.prototype;return S.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},S.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},S.onHandlerDestroyed=function(){},S.hasInterval=function(){return!!this._tickInterval},S.hasNextTick=function(){return!!this._tickTimer},S.setInterval=function(T){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,T),!0)},S.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},S.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},S.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},S.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},S.doTick=function(){},P}()},"./src/types/cmcd.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"CMCDVersion",function(){return w}),U.d(Z,"CMCDObjectType",function(){return P}),U.d(Z,"CMCDStreamingFormat",function(){return S}),U.d(Z,"CMCDStreamType",function(){return C});var w=1,P;(function(T){T.MANIFEST="m",T.AUDIO="a",T.VIDEO="v",T.MUXED="av",T.INIT="i",T.CAPTION="c",T.TIMED_TEXT="tt",T.KEY="k",T.OTHER="o"})(P||(P={}));var S;(function(T){T.DASH="d",T.HLS="h",T.SMOOTH="s",T.OTHER="o"})(S||(S={}));var C;(function(T){T.VOD="v",T.LIVE="l"})(C||(C={}))},"./src/types/level.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"HlsSkip",function(){return S}),U.d(Z,"getSkipValue",function(){return C}),U.d(Z,"HlsUrlParameters",function(){return T}),U.d(Z,"Level",function(){return l});function w(p,h){for(var d=0;dNumber.MAX_SAFE_INTEGER?Infinity:h},T.hexadecimalInteger=function(p){if(this[p]){var h=(this[p]||"0x").slice(2);h=(h.length&1?"0":"")+h;for(var d=new Uint8Array(h.length/2),o=0;oNumber.MAX_SAFE_INTEGER?Infinity:h},T.decimalFloatingPoint=function(p){return parseFloat(this[p])},T.optionalFloat=function(p,h){var d=this[p];return d?parseFloat(d):h},T.enumeratedString=function(p){return this[p]},T.bool=function(p){return this[p]==="YES"},T.decimalResolution=function(p){var h=w.exec(this[p]);return h===null?void 0:{width:parseInt(h[1],10),height:parseInt(h[2],10)}},C.parseAttrList=function(p){var h,d={},o='"';for(P.lastIndex=0;(h=P.exec(p))!==null;){var c=h[2];c.indexOf(o)===0&&c.lastIndexOf(o)===c.length-1&&(c=c.slice(1,-1)),d[h[1]]=c}return d},C}()},"./src/utils/binary-search.ts":function(ae,Z,U){"use strict";U.r(Z);var w={search:function(S,C){for(var T=0,l=S.length-1,p=null,h=null;T<=l;){p=(T+l)/2|0,h=S[p];var d=C(h);if(d>0)T=p+1;else if(d<0)l=p-1;else return h}return null}};Z.default=w},"./src/utils/buffer-helper.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"BufferHelper",function(){return S});var w=U("./src/utils/logger.ts"),P={length:0,start:function(){return 0},end:function(){return 0}},S=function(){function C(){}return C.isBuffered=function(l,p){try{if(l){for(var h=C.getBuffered(l),d=0;d=h.start(d)&&p<=h.end(d))return!0}}catch(o){}return!1},C.bufferInfo=function(l,p,h){try{if(l){var d=C.getBuffered(l),o=[],c;for(c=0;cs&&(d[c-1].end=l[o].end):d.push(l[o])}else d.push(l[o])}else d=l;for(var f=0,i,n=p,t=p,u=0;u=y&&p=x&&w.logger.log(this.time+" ["+x+"] "+O)},m}(),f=function(E){for(var a=[],x=0;xT&&(this.logger.log(c.DEBUG,"Too large cursor position "+this.pos),this.pos=T)},E.moveCursor=function(x){var O=this.pos+x;if(x>1)for(var A=this.pos+1;A=144&&this.backSpace();var O=S(x);if(this.pos>=T){this.logger.log(c.ERROR,"Cannot insert "+x.toString(16)+" ("+O+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(O,this.currPenState),this.moveCursor(1)},E.clearFromPos=function(x){var O;for(O=x;O0&&(x?A="["+O.join(" | ")+"]":A=O.join(` `)),A},E.getTextAndFormat=function(){return this.rows},m}(),y=function(){function m(a,x,O){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=a,this.outputFilter=x,this.mode=null,this.verbose=0,this.displayedMemory=new u(O),this.nonDisplayedMemory=new u(O),this.lastOutputScreen=new u(O),this.currRollUpRow=this.displayedMemory.rows[C-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=O}var E=m.prototype;return E.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[C-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},E.getHandler=function(){return this.outputFilter},E.setHandler=function(x){this.outputFilter=x},E.setPAC=function(x){this.writeScreen.setPAC(x)},E.setBkgData=function(x){this.writeScreen.setBkgData(x)},E.setMode=function(x){if(x===this.mode)return;this.mode=x,this.logger.log(c.INFO,"MODE="+x),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=x},E.insertChars=function(x){for(var O=0;O=46,O.italics)O.foreground="white";else{var A=Math.floor(x/2)-16,D=["white","green","blue","cyan","red","yellow","magenta"];O.foreground=D[A]}this.logger.log(c.INFO,"MIDROW: "+JSON.stringify(O)),this.writeScreen.setPen(O)},E.outputDataUpdate=function(x){x===void 0&&(x=!1);var O=this.logger.time;if(O===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=O:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,O,this.lastOutputScreen),x&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:O),this.lastOutputScreen.copy(this.displayedMemory))},E.cueSplitAtTime=function(x){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,x,this.displayedMemory),this.cueStartTime=x))},m}(),g=function(){function m(a,x,O){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var A=new s;this.channels=[null,new y(a,x,A),new y(a+1,O,A)],this.cmdHistory=v(),this.logger=A}var E=m.prototype;return E.getHandler=function(x){return this.channels[x].getHandler()},E.setHandler=function(x,O){this.channels[x].setHandler(O)},E.addData=function(x,O){var A,D,I,F=!1;this.logger.time=x;for(var K=0;K ("+f([D,I])+")"),A=this.parseCmd(D,I),A||(A=this.parseMidrow(D,I)),A||(A=this.parsePAC(D,I)),A||(A=this.parseBackgroundAttributes(D,I)),!A&&(F=this.parseChars(D,I),F)){var ne=this.currentChannel;if(ne&&ne>0){var j=this.channels[ne];j.insertChars(F)}else this.logger.log(c.WARNING,"No channel found yet. TEXT-MODE?")}!A&&!F&&this.logger.log(c.WARNING,"Couldn't parse cleaned data "+f([D,I])+" orig: "+f([O[K],O[K+1]]))}},E.parseCmd=function(x,O){var A=this.cmdHistory,D=(x===20||x===28||x===21||x===29)&&O>=32&&O<=47,I=(x===23||x===31)&&O>=33&&O<=35;if(!(D||I))return!1;if(b(x,O,A))return _(null,null,A),this.logger.log(c.DEBUG,"Repeated command ("+f([x,O])+") is dropped"),!0;var F=x===20||x===21||x===23?1:2,K=this.channels[F];return x===20||x===21||x===28||x===29?O===32?K.ccRCL():O===33?K.ccBS():O===34?K.ccAOF():O===35?K.ccAON():O===36?K.ccDER():O===37?K.ccRU(2):O===38?K.ccRU(3):O===39?K.ccRU(4):O===40?K.ccFON():O===41?K.ccRDC():O===42?K.ccTR():O===43?K.ccRTD():O===44?K.ccEDM():O===45?K.ccCR():O===46?K.ccENM():O===47&&K.ccEOC():K.ccTO(O-32),_(x,O,A),this.currentChannel=F,!0},E.parseMidrow=function(x,O){var A=0;if((x===17||x===25)&&O>=32&&O<=47){if(x===17?A=1:A=2,A!==this.currentChannel)return this.logger.log(c.ERROR,"Mismatch channel in midrow parsing"),!1;var D=this.channels[A];return D?(D.ccMIDROW(O),this.logger.log(c.DEBUG,"MIDROW ("+f([x,O])+")"),!0):!1}return!1},E.parsePAC=function(x,O){var A,D=this.cmdHistory,I=(x>=17&&x<=23||x>=25&&x<=31)&&O>=64&&O<=127,F=(x===16||x===24)&&O>=64&&O<=95;if(!(I||F))return!1;if(b(x,O,D))return _(null,null,D),!0;var K=x<=23?1:2;O>=64&&O<=95?A=K===1?l[x]:h[x]:A=K===1?p[x]:d[x];var ne=this.channels[K];return ne?(ne.setPAC(this.interpretPAC(A,O)),_(x,O,D),this.currentChannel=K,!0):!1},E.interpretPAC=function(x,O){var A,D={color:null,italics:!1,indent:null,underline:!1,row:x};return O>95?A=O-96:A=O-64,D.underline=(A&1)===1,A<=13?D.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(A/2)]:A<=15?(D.italics=!0,D.color="white"):D.indent=Math.floor((A-16)/2)*4,D},E.parseChars=function(x,O){var A,D=null,I=null;if(x>=25?(A=2,I=x-8):(A=1,I=x),I>=17&&I<=19){var F;I===17?F=O+80:I===18?F=O+112:F=O+144,this.logger.log(c.INFO,"Special char '"+S(F)+"' in channel "+A),D=[F]}else x>=32&&x<=127&&(D=O===0?[x]:[x,O]);if(D){var K=f(D);this.logger.log(c.DEBUG,"Char codes = "+K.join(",")),_(x,O,this.cmdHistory)}return D},E.parseBackgroundAttributes=function(x,O){var A=(x===16||x===24)&&O>=32&&O<=47,D=(x===23||x===31)&&O>=45&&O<=47;if(!(A||D))return!1;var I,F={};x===16||x===24?(I=Math.floor((O-32)/2),F.background=o[I],O%2===1&&(F.background=F.background+"_semi")):O===45?F.background="transparent":(F.foreground="black",O===47&&(F.underline=!0));var K=x<=23?1:2,ne=this.channels[K];return ne.setBkgData(F),_(x,O,this.cmdHistory),!0},E.reset=function(){for(var x=0;x=16?n--:n++;var _=Object(w.fixLineBreaks)(t.trim()),b=Object(P.generateCueId)(h,d,_);(!p||!p.cues||!p.cues.getCueById(b))&&(f=new u(h,d,_),f.id=b,f.line=y+1,f.align="left",f.position=10+Math.min(80,Math.floor(n*8/32)*10),c.push(f))}return p&&c.length&&(c.sort(function(v,m){return v.line==="auto"||m.line==="auto"?0:v.line>8&&m.line>8?m.line-v.line:v.line-m.line}),c.forEach(function(v){return Object(S.addCueToTrack)(p,v)})),c}};Z.default=T},"./src/utils/discontinuities.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"findFirstFragWithCC",function(){return C}),U.d(Z,"shouldAlignOnDiscontinuities",function(){return T}),U.d(Z,"findDiscontinuousReferenceFrag",function(){return l}),U.d(Z,"adjustSlidingStart",function(){return h}),U.d(Z,"alignStream",function(){return d}),U.d(Z,"alignPDT",function(){return c}),U.d(Z,"alignFragmentByPDTDelta",function(){return s}),U.d(Z,"alignMediaPlaylistByPDT",function(){return f});var w=U("./src/polyfills/number.ts"),P=U("./src/utils/logger.ts"),S=U("./src/controller/level-helper.ts");function C(i,n){for(var t=null,u=0,y=i.length;ut.startCC||i&&i.cc=this.minWeight_},C.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},C.destroy=function(){},S}();Z.default=P},"./src/utils/ewma.ts":function(ae,Z,U){"use strict";U.r(Z);var w=function(){function P(C,T,l){T===void 0&&(T=0),l===void 0&&(l=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=C,this.alpha_=C?Math.exp(Math.log(.5)/C):0,this.estimate_=T,this.totalWeight_=l}var S=P.prototype;return S.sample=function(T,l){var p=Math.pow(this.alpha_,T);this.estimate_=l*(1-p)+p*this.estimate_,this.totalWeight_+=T},S.getTotalWeight=function(){return this.totalWeight_},S.getEstimate=function(){if(this.alpha_){var T=1-Math.pow(this.alpha_,this.totalWeight_);if(T)return this.estimate_/T}return this.estimate_},P}();Z.default=w},"./src/utils/fetch-loader.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"fetchSupported",function(){return s});var w=U("./src/polyfills/number.ts"),P=U("./src/loader/load-stats.ts"),S=U("./src/demux/chunk-cache.ts");function C(u,y){u.prototype=Object.create(y.prototype),u.prototype.constructor=u,d(u,y)}function T(u){var y=typeof Map=="function"?new Map:void 0;return T=function(_){if(_===null||!h(_))return _;if(typeof _!="function")throw new TypeError("Super expression must either be null or a function");if(typeof y!="undefined"){if(y.has(_))return y.get(_);y.set(_,b)}function b(){return l(_,arguments,o(this).constructor)}return b.prototype=Object.create(_.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),d(b,_)},T(u)}function l(u,y,g){return p()?l=Reflect.construct:l=function(b,v,m){var E=[null];E.push.apply(E,v);var a=Function.bind.apply(b,E),x=new a;return m&&d(x,m.prototype),x},l.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(u){return!1}}function h(u){return Function.toString.call(u).indexOf("[native code]")!==-1}function d(u,y){return d=Object.setPrototypeOf||function(_,b){return _.__proto__=b,_},d(u,y)}function o(u){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(g){return g.__proto__||Object.getPrototypeOf(g)},o(u)}function c(){return c=Object.assign||function(u){for(var y=1;y=m&&E(b,v,a.flush(),_)):E(b,v,I,_),A()}).catch(function(){return Promise.reject()})};return O()},u}();function i(u,y){var g={method:"GET",mode:"cors",credentials:"same-origin",signal:y,headers:new self.Headers(c({},u.headers))};return u.rangeEnd&&g.headers.set("Range","bytes="+u.rangeStart+"-"+String(u.rangeEnd-1)),g}function n(u,y){return new self.Request(u.url,y)}var t=function(u){C(y,u);function y(g,_,b){var v;return v=u.call(this,g)||this,v.code=void 0,v.details=void 0,v.code=_,v.details=b,v}return y}(T(Error));Z.default=f},"./src/utils/imsc1-ttml-parser.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"IMSC1_CODEC",function(){return h}),U.d(Z,"parseIMSC1",function(){return s});var w=U("./src/utils/mp4-tools.ts"),P=U("./src/utils/vttparser.ts"),S=U("./src/utils/vttcue.ts"),C=U("./src/demux/id3.ts"),T=U("./src/utils/timescale-conversion.ts"),l=U("./src/utils/webvtt-parser.ts");function p(){return p=Object.assign||function(m){for(var E=1;E"):w}function T(h){for(var d=arguments.length,o=new Array(d>1?d-1:0),c=1;c>24,y[g+1]=_>>16&255,y[g+2]=_>>8&255,y[g+3]=_&255}function d(y,g){var _=[];if(!g.length)return _;var b,v,m;"data"in y?(b=y.data,v=y.start,m=y.end):(b=y,v=0,m=b.byteLength);for(var E=v;E1?E+a:m;if(x===g[0])if(g.length===1)_.push({data:b,start:E+8,end:O});else{var A=d({data:b,start:E+8,end:O},g.slice(1));A.length&&C.apply(_,A)}E=O}return _}function o(y){var g=d(y,["moov"]),_=g[0],b=_?_.end:null,v=d(y,["sidx"]);if(!v||!v[0])return null;var m=[],E=v[0],a=E.data[0],x=a===0?8:16,O=p(E,x);x+=4;var A=0,D=0;a===0?x+=8:x+=16,x+=2;var I=E.end+D,F=l(E,x);x+=2;for(var K=0;K>>31;if(X===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var J=p(E,ne);ne+=4,m.push({referenceSize:G,subsegmentDuration:J,info:{duration:J/O,start:I,end:I+G-1}}),I+=G,ne+=4,x=ne}return{earliestPresentationTime:A,timescale:O,version:a,referencesCount:F,references:m,moovEndOffset:b}}function c(y){for(var g=[],_=d(y,["moov","trak"]),b=0;b<_.length;b++){var v=_[b],m=d(v,["tkhd"])[0];if(m){var E=m.data[m.start],a=E===0?12:20,x=p(m,a),O=d(v,["mdia","mdhd"])[0];if(O){E=O.data[O.start],a=E===0?12:20;var A=p(O,a),D=d(v,["mdia","hdlr"])[0];if(D){var I=T(D.data.subarray(D.start+8,D.start+12)),F={soun:P.ElementaryStreamTypes.AUDIO,vide:P.ElementaryStreamTypes.VIDEO}[I];if(F){var K=d(v,["mdia","minf","stbl","stsd"])[0],ne=void 0;K&&(ne=T(K.data.subarray(K.start+12,K.start+16))),g[x]={timescale:A,type:F},g[F]={timescale:A,id:x,codec:ne}}}}}}var j=d(y,["moov","mvex","trex"]);return j.forEach(function(G){var X=p(G,4),J=g[X];J&&(J.default={duration:p(G,12),flags:p(G,20)})}),g}function s(y,g){return d(g,["moof","traf"]).reduce(function(_,b){var v=d(b,["tfdt"])[0],m=v.data[v.start],E=d(b,["tfhd"]).reduce(function(a,x){var O=p(x,4),A=y[O];if(A){var D=p(v,4);m===1&&(D*=Math.pow(2,32),D+=p(v,8));var I=A.timescale||9e4,F=D/I;if(isFinite(F)&&(a===null||FT)&&(this.startTime=T),this.endTime=l,this.screen=p,this.timelineController.createCaptionsTrack(this.trackName)},S.reset=function(){this.cueRanges=[]},P}()},"./src/utils/texttrack-utils.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"sendAddTrackEvent",function(){return P}),U.d(Z,"addCueToTrack",function(){return S}),U.d(Z,"clearCurrentCues",function(){return C}),U.d(Z,"removeCuesInRange",function(){return T}),U.d(Z,"getCuesInRange",function(){return p});var w=U("./src/utils/logger.ts");function P(h,d){var o;try{o=new Event("addtrack")}catch(c){o=document.createEvent("Event"),o.initEvent("addtrack",!1,!1)}o.track=h,d.dispatchEvent(o)}function S(h,d){var o=h.mode;if(o==="disabled"&&(h.mode="hidden"),h.cues&&!h.cues.getCueById(d.id))try{if(h.addCue(d),!h.cues.getCueById(d.id))throw new Error("addCue is failed for: "+d)}catch(s){w.logger.debug("[texttrack-utils]: "+s);var c=new self.TextTrackCue(d.startTime,d.endTime,d.text);c.id=d.id,h.addCue(c)}o==="disabled"&&(h.mode=o)}function C(h){var d=h.mode;if(d==="disabled"&&(h.mode="hidden"),h.cues)for(var o=h.cues.length;o--;)h.removeCue(h.cues[o]);d==="disabled"&&(h.mode=d)}function T(h,d,o){var c=h.mode;if(c==="disabled"&&(h.mode="hidden"),h.cues&&h.cues.length>0)for(var s=p(h.cues,d,o),f=0;fh[o].endTime)return-1;for(var c=0,s=o;c<=s;){var f=Math.floor((s+c)/2);if(dh[f].startTime&&c-1)for(var f=s,i=h.length;f=d&&n.endTime<=o)c.push(n);else if(n.startTime>o)return c}return c}},"./src/utils/time-ranges.ts":function(ae,Z,U){"use strict";U.r(Z);var w={toString:function(S){for(var C="",T=S.length,l=0;l1?d-1:0),c=1;c100)throw new Error("Position must be between 0 and 100.");m=A,this.hasBeenReset=!0}})),Object.defineProperty(c,"positionAlign",l({},s,{get:function(){return E},set:function(A){var D=T(A);if(!D)throw new SyntaxError("An invalid or illegal string was specified.");E=D,this.hasBeenReset=!0}})),Object.defineProperty(c,"size",l({},s,{get:function(){return a},set:function(A){if(A<0||A>100)throw new Error("Size must be between 0 and 100.");a=A,this.hasBeenReset=!0}})),Object.defineProperty(c,"align",l({},s,{get:function(){return x},set:function(A){var D=T(A);if(!D)throw new SyntaxError("An invalid or illegal string was specified.");x=D,this.hasBeenReset=!0}})),c.displayState=void 0}return p.prototype.getCueAsHTML=function(){var h=self.WebVTT;return h.convertCueToDOMTree(self,this.text)},p}()},"./src/utils/vttparser.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"parseTimeStamp",function(){return S}),U.d(Z,"fixLineBreaks",function(){return d}),U.d(Z,"VTTParser",function(){return o});var w=U("./src/utils/vttcue.ts"),P=function(){function c(){}var s=c.prototype;return s.decode=function(i,n){if(!i)return"";if(typeof i!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(i))},c}();function S(c){function s(i,n,t,u){return(i|0)*3600+(n|0)*60+(t|0)+parseFloat(u||0)}var f=c.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return f?parseFloat(f[2])>59?s(f[2],f[3],0,f[4]):s(f[1],f[2],f[3],f[4]):null}var C=function(){function c(){this.values=Object.create(null)}var s=c.prototype;return s.set=function(i,n){!this.get(i)&&n!==""&&(this.values[i]=n)},s.get=function(i,n,t){return t?this.has(i)?this.values[i]:n[t]:this.has(i)?this.values[i]:n},s.has=function(i){return i in this.values},s.alt=function(i,n,t){for(var u=0;u=0&&t<=100)return this.set(i,t),!0}return!1},c}();function T(c,s,f,i){var n=i?c.split(i):[c];for(var t in n){if(typeof n[t]!="string")continue;var u=n[t].split(f);if(u.length!==2)continue;var y=u[0],g=u[1];s(y,g)}}var l=new w.default(0,0,""),p=l.align==="middle"?"middle":"center";function h(c,s,f){var i=c;function n(){var y=S(c);if(y===null)throw new Error("Malformed timestamp: "+i);return c=c.replace(/^[^\sa-zA-Z-]+/,""),y}function t(y,g){var _=new C;T(y,function(m,E){var a;switch(m){case"region":for(var x=f.length-1;x>=0;x--)if(f[x].id===E){_.set(m,f[x].region);break}break;case"vertical":_.alt(m,E,["rl","lr"]);break;case"line":a=E.split(","),_.integer(m,a[0]),_.percent(m,a[0])&&_.set("snapToLines",!1),_.alt(m,a[0],["auto"]),a.length===2&&_.alt("lineAlign",a[1],["start",p,"end"]);break;case"position":a=E.split(","),_.percent(m,a[0]),a.length===2&&_.alt("positionAlign",a[1],["start",p,"end","line-left","line-right","auto"]);break;case"size":_.percent(m,E);break;case"align":_.alt(m,E,["start",p,"end","left","right"]);break}},/:/,/\s/),g.region=_.get("region",null),g.vertical=_.get("vertical","");var b=_.get("line","auto");b==="auto"&&l.line===-1&&(b=-1),g.line=b,g.lineAlign=_.get("lineAlign","start"),g.snapToLines=_.get("snapToLines",!0),g.size=_.get("size",100),g.align=_.get("align",p);var v=_.get("position","auto");v==="auto"&&l.position===50&&(v=g.align==="start"||g.align==="left"?0:g.align==="end"||g.align==="right"?100:50),g.position=v}function u(){c=c.replace(/^\s+/,"")}if(u(),s.startTime=n(),u(),c.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+i);c=c.substr(3),u(),s.endTime=n(),u(),t(c,s)}function d(c){return c.replace(//gi,` `)}var o=function(){function c(){this.state="INITIAL",this.buffer="",this.decoder=new P,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var s=c.prototype;return s.parse=function(i){var n=this;i&&(n.buffer+=n.decoder.decode(i,{stream:!0}));function t(){var v=n.buffer,m=0;for(v=d(v);m")===-1){n.cue.id=y;continue}case"CUE":if(!n.cue){n.state="BADCUE";continue}try{h(y,n.cue,n.regionList)}catch(v){n.cue=null,n.state="BADCUE";continue}n.state="CUETEXT";continue;case"CUETEXT":{var b=y.indexOf("-->")!==-1;if(!y||b&&(_=!0)){n.oncue&&n.cue&&n.oncue(n.cue),n.cue=null,n.state="ID";continue}if(n.cue===null)continue;n.cue.text&&(n.cue.text+=` `),n.cue.text+=y}continue;case"BADCUE":y||(n.state="ID")}}}catch(v){n.state==="CUETEXT"&&n.cue&&n.oncue&&n.oncue(n.cue),n.cue=null,n.state=n.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},s.flush=function(){var i=this;try{if((i.cue||i.state==="HEADER")&&(i.buffer+=` `,i.parse()),i.state==="INITIAL"||i.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(n){i.onparsingerror&&i.onparsingerror(n)}return i.onflush&&i.onflush(),this},c}()},"./src/utils/webvtt-parser.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"generateCueId",function(){return o}),U.d(Z,"parseWebVTT",function(){return s});var w=U("./src/polyfills/number.ts"),P=U("./src/utils/vttparser.ts"),S=U("./src/demux/id3.ts"),C=U("./src/utils/timescale-conversion.ts"),T=U("./src/remux/mp4-remuxer.ts"),l=/\r\n|\n\r|\n|\r/g,p=function(i,n,t){return t===void 0&&(t=0),i.substr(t,n.length)===n},h=function(i){var n=parseInt(i.substr(-3)),t=parseInt(i.substr(-6,2)),u=parseInt(i.substr(-9,2)),y=i.length>9?parseInt(i.substr(0,i.indexOf(":"))):0;if(!Object(w.isFiniteNumber)(n)||!Object(w.isFiniteNumber)(t)||!Object(w.isFiniteNumber)(u)||!Object(w.isFiniteNumber)(y))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+i);return n+=1e3*t,n+=60*1e3*u,n+=60*60*1e3*y,n},d=function(i){for(var n=5381,t=i.length;t;)n=n*33^i.charCodeAt(--t);return(n>>>0).toString()};function o(f,i,n){return d(f.toString())+d(i.toString())+d(n)}var c=function(i,n,t){var u=i[n],y=i[u.prevCC];if(!y||!y.new&&u.new){i.ccOffset=i.presentationOffset=u.start,u.new=!1;return}for(;(g=y)!==null&&g!==void 0&&g.new;){var g;i.ccOffset+=u.start-y.start,u.new=!1,u=y,y=i[u.prevCC]}i.presentationOffset=t};function s(f,i,n,t,u,y,g,_){var b=new P.VTTParser,v=Object(S.utf8ArrayToStr)(new Uint8Array(f)).trim().replace(l,` `).split(` `),m=[],E=Object(C.toMpegTsClockFromTimescale)(i,n),a="00:00.000",x=0,O=0,A,D=!0,I=!1;b.oncue=function(F){var K=t[u],ne=t.ccOffset,j=(x-E)/9e4;if(K!=null&&K.new&&(O!==void 0?ne=t.ccOffset=K.start:c(t,u,j)),j&&(ne=j-t.presentationOffset),I){var G=F.endTime-F.startTime,X=Object(T.normalizePts)((F.startTime+ne-O)*9e4,y*9e4)/9e4;F.startTime=X,F.endTime=X+G}var J=F.text.trim();F.text=decodeURIComponent(encodeURIComponent(J)),F.id||(F.id=o(F.startTime,F.endTime,J)),F.endTime>0&&m.push(F)},b.onparsingerror=function(F){A=F},b.onflush=function(){if(A){_(A);return}g(m)},v.forEach(function(F){if(D)if(p(F,"X-TIMESTAMP-MAP=")){D=!1,I=!0,F.substr(16).split(",").forEach(function(K){p(K,"LOCAL:")?a=K.substr(6):p(K,"MPEGTS:")&&(x=parseInt(K.substr(7)))});try{O=h(a)/1e3}catch(K){I=!1,A=K}return}else F===""&&(D=!1);b.parse(F+` `)}),b.flush()}},"./src/utils/xhr-loader.ts":function(ae,Z,U){"use strict";U.r(Z);var w=U("./src/utils/logger.ts"),P=U("./src/loader/load-stats.ts"),S=/^age:\s*[\d.]+\s*$/m,C=function(){function T(p){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=p?p.xhrSetup:null,this.stats=new P.LoadStats,this.retryDelay=0}var l=T.prototype;return l.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},l.abortInternal=function(){var h=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),h&&(h.onreadystatechange=null,h.onprogress=null,h.readyState!==4&&(this.stats.aborted=!0,h.abort()))},l.abort=function(){var h;this.abortInternal(),(h=this.callbacks)!==null&&h!==void 0&&h.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},l.load=function(h,d,o){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=h,this.config=d,this.callbacks=o,this.retryDelay=d.retryDelay,this.loadInternal()},l.loadInternal=function(){var h=this.config,d=this.context;if(!h)return;var o=this.loader=new self.XMLHttpRequest,c=this.stats;c.loading.first=0,c.loaded=0;var s=this.xhrSetup;try{if(s)try{s(o,d.url)}catch(n){o.open("GET",d.url,!0),s(o,d.url)}o.readyState||o.open("GET",d.url,!0);var f=this.context.headers;if(f)for(var i in f)o.setRequestHeader(i,f[i])}catch(n){this.callbacks.onError({code:o.status,text:n.message},d,o);return}d.rangeEnd&&o.setRequestHeader("Range","bytes="+d.rangeStart+"-"+(d.rangeEnd-1)),o.onreadystatechange=this.readystatechange.bind(this),o.onprogress=this.loadprogress.bind(this),o.responseType=d.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),h.timeout),o.send()},l.readystatechange=function(){var h=this.context,d=this.loader,o=this.stats;if(!h||!d)return;var c=d.readyState,s=this.config;if(o.aborted)return;if(c>=2)if(self.clearTimeout(this.requestTimeout),o.loading.first===0&&(o.loading.first=Math.max(self.performance.now(),o.loading.start)),c===4){d.onreadystatechange=null,d.onprogress=null;var f=d.status;if(f>=200&&f<300){o.loading.end=Math.max(self.performance.now(),o.loading.first);var i,n;if(h.responseType==="arraybuffer"?(i=d.response,n=i.byteLength):(i=d.responseText,n=i.length),o.loaded=o.total=n,!this.callbacks)return;var t=this.callbacks.onProgress;if(t&&t(o,h,i,d),!this.callbacks)return;var u={url:d.responseURL,data:i};this.callbacks.onSuccess(u,o,h,d)}else o.retry>=s.maxRetry||f>=400&&f<499?(w.logger.error(f+" while loading "+h.url),this.callbacks.onError({code:f,text:d.statusText},h,d)):(w.logger.warn(f+" while loading "+h.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),o.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),s.timeout)},l.loadtimeout=function(){w.logger.warn("timeout while loading "+this.context.url);var h=this.callbacks;h&&(this.abortInternal(),h.onTimeout(this.stats,this.context,this.loader))},l.loadprogress=function(h){var d=this.stats;d.loaded=h.loaded,h.lengthComputable&&(d.total=h.total)},l.getCacheAge=function(){var h=null;if(this.loader&&S.test(this.loader.getAllResponseHeaders())){var d=this.loader.getResponseHeader("age");h=d?parseFloat(d):null}return h},T}();Z.default=C}}).default})},vHTk:function($e,We,z){$e.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wCXF:function($e,We,z){"use strict";z.d(We,"a",function(){return Y});var ae=z("rePB"),Z=z("VTBJ"),U=z("KQm4"),w=z("U8pU"),P=z("ODXe"),S=z("q1tI"),C=z("TSYQ"),T=z.n(C),l=z("Gytx"),p=z.n(l),h=z("Kwbf"),d=z("t23M"),o=z("qx4F"),c=z("6eGT"),s=z("IBYe"),f=z("Ff2n"),i=z("c+Xe"),n=z("fyJ8"),t=z("biw7");function u(Pe,Ie,Xe,tt,Ve){var Ke=Xe[Pe]||{},Ne=Xe[Ie]||{},De,_e;Ke.fixed==="left"?De=tt.left[Pe]:Ne.fixed==="right"&&(_e=tt.right[Ie]);var he=!1,ve=!1,Ee=!1,be=!1,Ge=Xe[Ie+1],qe=Xe[Pe-1];if(Ve==="rtl"){if(De!==void 0){var pt=qe&&qe.fixed==="left";be=!pt}else if(_e!==void 0){var Pt=Ge&&Ge.fixed==="right";Ee=!Pt}}else if(De!==void 0){var Rt=Ge&&Ge.fixed==="left";he=!Rt}else if(_e!==void 0){var Mt=qe&&qe.fixed==="right";ve=!Mt}return{fixLeft:De,fixRight:_e,lastFixLeft:he,firstFixRight:ve,lastFixRight:Ee,firstFixLeft:be,isSticky:tt.isSticky}}var y=z("sR1s");function g(Pe){var Ie=Pe.cells,Xe=Pe.stickyOffsets,tt=Pe.flattenColumns,Ve=Pe.rowComponent,Ke=Pe.cellComponent,Ne=Pe.onHeaderRow,De=Pe.index,_e=S.useContext(t.a),he=_e.prefixCls,ve=_e.direction,Ee;Ne&&(Ee=Ne(Ie.map(function(Ge){return Ge.column}),De));var be=Object(y.a)(Ie.map(function(Ge){return Ge.column}));return S.createElement(Ve,Object.assign({},Ee),Ie.map(function(Ge,qe){var pt=Ge.column,Pt=u(Ge.colStart,Ge.colEnd,tt,Xe,ve),Rt;return pt&&pt.onHeaderCell&&(Rt=Ge.column.onHeaderCell(pt)),S.createElement(n.a,Object.assign({},Ge,{ellipsis:pt.ellipsis,align:pt.align,component:Ke,prefixCls:he,key:be[qe]},Pt,{additionalProps:Rt,rowType:"header"}))}))}g.displayName="HeaderRow";var _=g;function b(Pe){var Ie=[];function Xe(Ne,De){var _e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ie[_e]=Ie[_e]||[];var he=De,ve=Ne.filter(Boolean).map(function(Ee){var be={key:Ee.key,className:Ee.className||"",children:Ee.title,column:Ee,colStart:he},Ge=1,qe=Ee.children;return qe&&qe.length>0&&(Ge=Xe(qe,he,_e+1).reduce(function(pt,Pt){return pt+Pt},0),be.hasSubColumns=!0),"colSpan"in Ee&&(Ge=Ee.colSpan),"rowSpan"in Ee&&(be.rowSpan=Ee.rowSpan),be.colSpan=Ge,be.colEnd=be.colStart+Ge-1,Ie[_e].push(be),he+=Ge,Ge});return ve}Xe(Pe,0);for(var tt=Ie.length,Ve=function(De){Ie[De].forEach(function(_e){!("rowSpan"in _e)&&!_e.hasSubColumns&&(_e.rowSpan=tt-De)})},Ke=0;Ke=0;De-=1){var _e=Ie[De],he=Xe&&Xe[De],ve=he&&he[E.a];(_e||ve||Ne)&&(Ve.unshift(S.createElement("col",Object.assign({key:De,style:{width:_e,minWidth:_e}},ve))),Ne=!0)}return S.createElement("colgroup",null,Ve)}var x=a;function O(Pe,Ie){return Object(S.useMemo)(function(){for(var Xe=[],tt=0;tt1?bn-1:0),dn=1;dn=Ee&&(Qt=Ee-be),Ne({scrollLeft:Qt/Ee*(ve+2)}),Mt.current.x=st.pageX},Ze=function(){var st=Object(Ye.b)(Ke.current).top,gt=st+Ke.current.offsetHeight,kt=document.documentElement.scrollTop+window.innerHeight;gt-Object(o.a)()<=kt||st>=kt-De?Rt(function(Wt){return Object(Z.a)(Object(Z.a)({},Wt),{},{isHiddenScrollBar:!0})}):Rt(function(Wt){return Object(Z.a)(Object(Z.a)({},Wt),{},{isHiddenScrollBar:!1})})},Tt=function(st){Rt(function(gt){return Object(Z.a)(Object(Z.a)({},gt),{},{scrollLeft:st/ve*Ee||0})})};return S.useImperativeHandle(Xe,function(){return{setScrollLeft:Tt}}),S.useEffect(function(){var Ot=Object(Ue.a)(document.body,"mouseup",Te,!1),st=Object(Ue.a)(document.body,"mousemove",ct,!1);return Ze(),function(){Ot.remove(),st.remove()}},[be,ft]),S.useEffect(function(){var Ot=Object(Ue.a)(window,"scroll",Ze,!1),st=Object(Ue.a)(window,"resize",Ze,!1);return function(){Ot.remove(),st.remove()}},[]),S.useEffect(function(){Pt.isHiddenScrollBar||Rt(function(Ot){var st,gt;return Object(Z.a)(Object(Z.a)({},Ot),{},{scrollLeft:Ke.current.scrollLeft/((st=Ke.current)===null||st===void 0?void 0:st.scrollWidth)*((gt=Ke.current)===null||gt===void 0?void 0:gt.clientWidth)})})},[Pt.isHiddenScrollBar]),ve<=Ee||!be||Pt.isHiddenScrollBar?null:S.createElement("div",{style:{height:Object(o.a)(),width:Ee,bottom:De},className:"".concat(he,"-sticky-scroll")},S.createElement("div",{onMouseDown:je,ref:Ge,className:T()("".concat(he,"-sticky-scroll-bar"),Object(ae.a)({},"".concat(he,"-sticky-scroll-bar-active"),ft)),style:{width:"".concat(be,"px"),transform:"translate3d(".concat(Pt.scrollLeft,"px, 0, 0)")}}))},M=S.forwardRef(ee);function N(Pe,Ie){return S.useMemo(function(){var Xe=!!Pe;return{isSticky:Xe,stickyClassName:Xe?"".concat(Ie,"-sticky-header"):"",offsetHeader:Object(w.a)(Pe)==="object"&&Pe.offsetHeader||0,offsetScroll:Object(w.a)(Pe)==="object"&&Pe.offsetScroll||0}},[Pe,Ie])}var $=[],V={},Y="rc-table-internal-hook",me=S.memo(function(Pe){var Ie=Pe.children;return Ie},function(Pe,Ie){return p()(Pe.props,Ie.props)?Pe.pingLeft!==Ie.pingLeft||Pe.pingRight!==Ie.pingRight:!1});function Re(Pe){var Ie,Xe=Pe.prefixCls,tt=Pe.className,Ve=Pe.rowClassName,Ke=Pe.style,Ne=Pe.data,De=Pe.rowKey,_e=Pe.scroll,he=Pe.tableLayout,ve=Pe.direction,Ee=Pe.title,be=Pe.footer,Ge=Pe.summary,qe=Pe.id,pt=Pe.showHeader,Pt=Pe.components,Rt=Pe.emptyText,Mt=Pe.onRow,wt=Pe.onHeaderRow,lt=Pe.internalHooks,ft=Pe.transformColumns,Qe=Pe.internalRefs,Te=Pe.sticky,je=Ne||$,ct=!!je.length,Ze=S.useState(0),Tt=Object(P.a)(Ze,2),Ot=Tt[0],st=Tt[1];S.useEffect(function(){st(Object(o.a)())});var gt=S.useMemo(function(){return Object(y.c)(Pt,{})},[Pt]),kt=S.useCallback(function(ut,Et){return Object(y.b)(gt,ut)||Et},[gt]),Wt=S.useMemo(function(){return typeof De=="function"?De:function(ut){var Et=ut&&ut[De];return Et}},[De]),Qt=Object(E.c)(Pe),we=Qt.expandIcon,fe=Qt.expandedRowKeys,W=Qt.defaultExpandedRowKeys,q=Qt.defaultExpandAllRows,te=Qt.expandedRowRender,se=Qt.onExpand,Se=Qt.onExpandedRowsChange,He=Qt.expandRowByClick,Je=Qt.rowExpandable,xt=Qt.expandIconColumnIndex,Ct=Qt.expandedRowClassName,it=Qt.childrenColumnName,St=Qt.indentSize,Xt=we||ue,bt=it||"children",ht=S.useMemo(function(){return te?"row":Pe.expandable&<===Y&&Pe.expandable.__PARENT_RENDER_ICON__||je.some(function(ut){return ut&&Object(w.a)(ut)==="object"&&ut[bt]})?"nest":!1},[!!te,je]),Jt=S.useState(function(){return W||(q?ke(je,Wt,bt):[])}),Nt=Object(P.a)(Jt,2),mt=Nt[0],cn=Nt[1],bn=S.useMemo(function(){return new Set(fe||mt||[])},[fe,mt]),sn=S.useCallback(function(ut){var Et=Wt(ut,je.indexOf(ut)),Dt,on=bn.has(Et);on?(bn.delete(Et),Dt=Object(U.a)(bn)):Dt=[].concat(Object(U.a)(bn),[Et]),cn(Dt),se&&se(!on,ut),Se&&Se(Dt)},[Wt,bn,je,se,Se]),dn=S.useState(0),Nn=Object(P.a)(dn,2),Kt=Nn[0],et=Nn[1],Ut=Object(xe.b)(Object(Z.a)(Object(Z.a)(Object(Z.a)({},Pe),Qt),{},{expandable:!!te,expandedKeys:bn,getRowKey:Wt,onTriggerExpand:sn,expandIcon:Xt,expandIconColumnIndex:xt,direction:ve}),lt===Y?ft:null),Yt=Object(P.a)(Ut,2),Vt=Yt[0],En=Yt[1],sr=S.useMemo(function(){return{columns:Vt,flattenColumns:En}},[Vt,En]),nr=S.useRef(),jn=S.useRef(),cr=S.useRef(),qn=S.useState(!1),Wr=Object(P.a)(qn,2),_r=Wr[0],Rr=Wr[1],Tr=S.useState(!1),Vr=Object(P.a)(Tr,2),Ur=Vr[0],xi=Vr[1],kr=pe(new Map),Oi=Object(P.a)(kr,2),ri=Oi[0],Xr=Oi[1],di=Object(y.a)(En),Si=di.map(function(ut){return ri.get(ut)}),si=S.useMemo(function(){return Si},[Si.join("_")]),fi=Me(si,En.length,ve),gr=_e&&Object(y.d)(_e.y),dr=_e&&Object(y.d)(_e.x),ii=dr&&En.some(function(ut){var Et=ut.fixed;return Et}),li=S.useRef(),Ni=N(Te,Xe),wi=Ni.isSticky,ua=Ni.offsetHeader,ca=Ni.offsetScroll,hi=Ni.stickyClassName,Zi,ln,Tn;gr&&(ln={overflowY:"scroll",maxHeight:_e.y}),dr&&(Zi={overflowX:"auto"},gr||(ln={overflowY:"hidden"}),Tn={width:_e.x===!0?"auto":_e.x,minWidth:"100%"});var On=S.useCallback(function(ut,Et){Xr(function(Dt){var on=new Map(Dt);return on.set(ut,Et),on})},[]),rr=Oe(null),ar=Object(P.a)(rr,2),pr=ar[0],Er=ar[1];function Cr(ut,Et){if(!Et)return;typeof Et=="function"?Et(ut):Et.scrollLeft!==ut&&(Et.scrollLeft=ut)}var xr=function(Et){var Dt=Et.currentTarget,on=Et.scrollLeft,an=typeof on=="number"?on:Dt.scrollLeft,vt=Dt||V;if(!Er()||Er()===vt){var dt;pr(vt),Cr(an,jn.current),Cr(an,cr.current),Cr(an,(dt=li.current)===null||dt===void 0?void 0:dt.setScrollLeft)}if(Dt){var Ht=Dt.scrollWidth,yt=Dt.clientWidth;Rr(an>0),xi(an1?de-1:0),ke=1;ke/gm),B=C(/^data-[\-\w.\u00B7-\uFFFF]/),Q=C(/^aria-[\-\w]+$/),ie=C(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),oe=C(/^(?:\w+script|data):/i),xe=C(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ye=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ce){return typeof Ce}:function(Ce){return Ce&&typeof Symbol=="function"&&Ce.constructor===Symbol&&Ce!==Symbol.prototype?"symbol":typeof Ce};function Ae(Ce){if(Array.isArray(Ce)){for(var Le=0,de=Array(Ce.length);Le0&&arguments[0]!==void 0?arguments[0]:pe(),Le=function(et){return Fe(et)};if(Le.version="2.0.15",Le.removed=[],!Ce||!Ce.document||Ce.document.nodeType!==9)return Le.isSupported=!1,Le;var de=Ce.document,ue=!1,ke=Ce.document,Ue=Ce.DocumentFragment,Ye=Ce.HTMLTemplateElement,ee=Ce.Node,M=Ce.NodeFilter,N=Ce.NamedNodeMap,$=N===void 0?Ce.NamedNodeMap||Ce.MozNamedAttrMap:N,V=Ce.Text,Y=Ce.Comment,me=Ce.DOMParser,Re=Ce.trustedTypes;if(typeof Ye=="function"){var rt=ke.createElement("template");rt.content&&rt.content.ownerDocument&&(ke=rt.content.ownerDocument)}var Pe=Oe(Re,de),Ie=Pe&&we?Pe.createHTML(""):"",Xe=ke,tt=Xe.implementation,Ve=Xe.createNodeIterator,Ke=Xe.getElementsByTagName,Ne=Xe.createDocumentFragment,De=de.importNode,_e=x(ke).documentMode?ke.documentMode:{},he={};Le.isSupported=tt&&typeof tt.createHTMLDocument!="undefined"&&_e!==9;var ve=X,Ee=J,be=B,Ge=Q,qe=oe,pt=xe,Pt=ie,Rt=null,Mt=a({},[].concat(Ae(O),Ae(A),Ae(D),Ae(I),Ae(F))),wt=null,lt=a({},[].concat(Ae(K),Ae(ne),Ae(j),Ae(G))),ft=null,Qe=null,Te=!0,je=!0,ct=!1,Ze=!1,Tt=!1,Ot=!1,st=!1,gt=!1,kt=!1,Wt=!1,Qt=!1,we=!1,fe=!0,W=!0,q=!1,te={},se=a({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","plaintext","script","style","svg","template","thead","title","video","xmp"]),Se=null,He=a({},["audio","video","img","source","image","track"]),Je=null,xt=a({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),Ct=null,it=ke.createElement("form"),St=function(et){if(Ct&&Ct===et)return;(!et||(typeof et=="undefined"?"undefined":ye(et))!=="object")&&(et={}),et=x(et),Rt="ALLOWED_TAGS"in et?a({},et.ALLOWED_TAGS):Mt,wt="ALLOWED_ATTR"in et?a({},et.ALLOWED_ATTR):lt,Je="ADD_URI_SAFE_ATTR"in et?a(x(xt),et.ADD_URI_SAFE_ATTR):xt,Se="ADD_DATA_URI_TAGS"in et?a(x(He),et.ADD_DATA_URI_TAGS):He,ft="FORBID_TAGS"in et?a({},et.FORBID_TAGS):{},Qe="FORBID_ATTR"in et?a({},et.FORBID_ATTR):{},te="USE_PROFILES"in et?et.USE_PROFILES:!1,Te=et.ALLOW_ARIA_ATTR!==!1,je=et.ALLOW_DATA_ATTR!==!1,ct=et.ALLOW_UNKNOWN_PROTOCOLS||!1,Ze=et.SAFE_FOR_JQUERY||!1,Tt=et.SAFE_FOR_TEMPLATES||!1,Ot=et.WHOLE_DOCUMENT||!1,kt=et.RETURN_DOM||!1,Wt=et.RETURN_DOM_FRAGMENT||!1,Qt=et.RETURN_DOM_IMPORT||!1,we=et.RETURN_TRUSTED_TYPE||!1,gt=et.FORCE_BODY||!1,fe=et.SANITIZE_DOM!==!1,W=et.KEEP_CONTENT!==!1,q=et.IN_PLACE||!1,Pt=et.ALLOWED_URI_REGEXP||Pt,Tt&&(je=!1),Wt&&(kt=!0),te&&(Rt=a({},[].concat(Ae(F))),wt=[],te.html===!0&&(a(Rt,O),a(wt,K)),te.svg===!0&&(a(Rt,A),a(wt,ne),a(wt,G)),te.svgFilters===!0&&(a(Rt,D),a(wt,ne),a(wt,G)),te.mathMl===!0&&(a(Rt,I),a(wt,j),a(wt,G))),et.ADD_TAGS&&(Rt===Mt&&(Rt=x(Rt)),a(Rt,et.ADD_TAGS)),et.ADD_ATTR&&(wt===lt&&(wt=x(wt)),a(wt,et.ADD_ATTR)),et.ADD_URI_SAFE_ATTR&&a(Je,et.ADD_URI_SAFE_ATTR),W&&(Rt["#text"]=!0),Ot&&a(Rt,["html","head","body"]),Rt.table&&(a(Rt,["tbody"]),delete ft.tbody),S&&S(et),Ct=et},Xt=function(et){f(Le.removed,{element:et});try{et.parentNode.removeChild(et)}catch(Ut){et.outerHTML=Ie}},bt=function(et,Ut){try{f(Le.removed,{attribute:Ut.getAttributeNode(et),from:Ut})}catch(Yt){f(Le.removed,{attribute:null,from:Ut})}Ut.removeAttribute(et)},ht=function(et){var Ut=void 0,Yt=void 0;if(gt)et=""+et;else{var Vt=t(et,/^[\r\n\t ]+/);Yt=Vt&&Vt[0]}var En=Pe?Pe.createHTML(et):et;try{Ut=new me().parseFromString(En,"text/html")}catch(jn){}if(ue&&a(ft,["title"]),!Ut||!Ut.documentElement){Ut=tt.createHTMLDocument("");var sr=Ut,nr=sr.body;nr.parentNode.removeChild(nr.parentNode.firstElementChild),nr.outerHTML=En}return et&&Yt&&Ut.body.insertBefore(ke.createTextNode(Yt),Ut.body.childNodes[0]||null),Ke.call(Ut,Ot?"html":"body")[0]};Le.isSupported&&function(){try{var Kt=ht("</title><img>");_(/<\/title/,Kt.querySelector("title").innerHTML)&&(ue=!0)}catch(et){}}();var Jt=function(et){return Ve.call(et.ownerDocument||et,et,M.SHOW_ELEMENT|M.SHOW_COMMENT|M.SHOW_TEXT,function(){return M.FILTER_ACCEPT},!1)},Nt=function(et){return et instanceof V||et instanceof Y?!1:typeof et.nodeName!="string"||typeof et.textContent!="string"||typeof et.removeChild!="function"||!(et.attributes instanceof $)||typeof et.removeAttribute!="function"||typeof et.setAttribute!="function"||typeof et.namespaceURI!="string"},mt=function(et){return(typeof ee=="undefined"?"undefined":ye(ee))==="object"?et instanceof ee:et&&(typeof et=="undefined"?"undefined":ye(et))==="object"&&typeof et.nodeType=="number"&&typeof et.nodeName=="string"},cn=function(et,Ut,Yt){if(!he[et])return;d(he[et],function(Vt){Vt.call(Le,Ut,Yt,Ct)})},bn=function(et){var Ut=void 0;if(cn("beforeSanitizeElements",et,null),Nt(et))return Xt(et),!0;if(t(et.nodeName,/[\u0080-\uFFFF]/))return Xt(et),!0;var Yt=n(et.nodeName);if(cn("uponSanitizeElement",et,{tagName:Yt,allowedTags:Rt}),(Yt==="svg"||Yt==="math")&&et.querySelectorAll("p, br").length!==0)return Xt(et),!0;if(!Rt[Yt]||ft[Yt]){if(W&&!se[Yt]&&typeof et.insertAdjacentHTML=="function")try{var Vt=et.innerHTML;et.insertAdjacentHTML("AfterEnd",Pe?Pe.createHTML(Vt):Vt)}catch(En){}return Xt(et),!0}return Yt==="noscript"&&_(/<\/noscript/i,et.innerHTML)||Yt==="noembed"&&_(/<\/noembed/i,et.innerHTML)?(Xt(et),!0):(Ze&&!mt(et.firstElementChild)&&(!mt(et.content)||!mt(et.content.firstElementChild))&&_(/</g,et.textContent)&&(f(Le.removed,{element:et.cloneNode()}),et.innerHTML?et.innerHTML=u(et.innerHTML,/</g,"<"):et.innerHTML=u(et.textContent,/</g,"<")),Tt&&et.nodeType===3&&(Ut=et.textContent,Ut=u(Ut,ve," "),Ut=u(Ut,Ee," "),et.textContent!==Ut&&(f(Le.removed,{element:et.cloneNode()}),et.textContent=Ut)),cn("afterSanitizeElements",et,null),!1)},sn=function(et,Ut,Yt){if(fe&&(Ut==="id"||Ut==="name")&&(Yt in ke||Yt in it))return!1;if(!(je&&_(be,Ut))){if(!(Te&&_(Ge,Ut))){if(!wt[Ut]||Qe[Ut])return!1;if(!Je[Ut]){if(!_(Pt,u(Yt,pt,""))){if(!((Ut==="src"||Ut==="xlink:href"||Ut==="href")&&et!=="script"&&y(Yt,"data:")===0&&Se[et])){if(!(ct&&!_(qe,u(Yt,pt,"")))){if(Yt)return!1}}}}}}return!0},dn=function(et){var Ut=void 0,Yt=void 0,Vt=void 0,En=void 0,sr=void 0;cn("beforeSanitizeAttributes",et,null);var nr=et.attributes;if(!nr)return;var jn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:wt};for(sr=nr.length;sr--;){Ut=nr[sr];var cr=Ut,qn=cr.name,Wr=cr.namespaceURI;if(Yt=g(Ut.value),Vt=n(qn),jn.attrName=Vt,jn.attrValue=Yt,jn.keepAttr=!0,jn.forceKeepAttr=void 0,cn("uponSanitizeAttribute",et,jn),Yt=jn.attrValue,jn.forceKeepAttr)continue;if(Vt==="name"&&et.nodeName==="IMG"&&nr.id)En=nr.id,nr=i(nr,[]),bt("id",et),bt(qn,et),o(nr,En)>sr&&et.setAttribute("id",En.value);else{if(et.nodeName==="INPUT"&&Vt==="type"&&Yt==="file"&&jn.keepAttr&&(wt[Vt]||!Qe[Vt]))continue;qn==="id"&&et.setAttribute(qn,""),bt(qn,et)}if(!jn.keepAttr)continue;if(Ze&&_(/\/>/i,Yt)){bt(qn,et);continue}if(_(/svg|math/i,et.namespaceURI)&&_(b("</("+c(P(se),"|")+")","i"),Yt)){bt(qn,et);continue}Tt&&(Yt=u(Yt,ve," "),Yt=u(Yt,Ee," "));var _r=et.nodeName.toLowerCase();if(!sn(_r,Vt,Yt))continue;try{Wr?et.setAttributeNS(Wr,qn,Yt):et.setAttribute(qn,Yt),s(Le.removed)}catch(Rr){}}cn("afterSanitizeAttributes",et,null)},Nn=function Kt(et){var Ut=void 0,Yt=Jt(et);for(cn("beforeSanitizeShadowDOM",et,null);Ut=Yt.nextNode();){if(cn("uponSanitizeShadowNode",Ut,null),bn(Ut))continue;Ut.content instanceof Ue&&Kt(Ut.content),dn(Ut)}cn("afterSanitizeShadowDOM",et,null)};return Le.sanitize=function(Kt,et){var Ut=void 0,Yt=void 0,Vt=void 0,En=void 0,sr=void 0;if(Kt||(Kt="<!-->"),typeof Kt!="string"&&!mt(Kt)){if(typeof Kt.toString!="function")throw v("toString is not a function");if(Kt=Kt.toString(),typeof Kt!="string")throw v("dirty is not a string, aborting")}if(!Le.isSupported){if(ye(Ce.toStaticHTML)==="object"||typeof Ce.toStaticHTML=="function"){if(typeof Kt=="string")return Ce.toStaticHTML(Kt);if(mt(Kt))return Ce.toStaticHTML(Kt.outerHTML)}return Kt}if(st||St(et),Le.removed=[],typeof Kt=="string"&&(q=!1),!q)if(Kt instanceof ee)Ut=ht("<!-->"),Yt=Ut.ownerDocument.importNode(Kt,!0),Yt.nodeType===1&&Yt.nodeName==="BODY"||Yt.nodeName==="HTML"?Ut=Yt:Ut.appendChild(Yt);else{if(!kt&&!Tt&&!Ot&&Kt.indexOf("<")===-1)return Pe&&we?Pe.createHTML(Kt):Kt;if(Ut=ht(Kt),!Ut)return kt?null:Ie}Ut&>&&Xt(Ut.firstChild);for(var nr=Jt(q?Kt:Ut);Vt=nr.nextNode();){if(Vt.nodeType===3&&Vt===En)continue;if(bn(Vt))continue;Vt.content instanceof Ue&&Nn(Vt.content),dn(Vt),En=Vt}if(En=null,q)return Kt;if(kt){if(Wt)for(sr=Ne.call(Ut.ownerDocument);Ut.firstChild;)sr.appendChild(Ut.firstChild);else sr=Ut;return Qt&&(sr=De.call(de,sr,!0)),sr}var jn=Ot?Ut.outerHTML:Ut.innerHTML;return Tt&&(jn=u(jn,ve," "),jn=u(jn,Ee," ")),Pe&&we?Pe.createHTML(jn):jn},Le.setConfig=function(Kt){St(Kt),st=!0},Le.clearConfig=function(){Ct=null,st=!1},Le.isValidAttribute=function(Kt,et,Ut){Ct||St({});var Yt=n(Kt),Vt=n(et);return sn(Yt,Vt,Ut)},Le.addHook=function(Kt,et){if(typeof et!="function")return;he[Kt]=he[Kt]||[],f(he[Kt],et)},Le.removeHook=function(Kt){he[Kt]&&s(he[Kt])},Le.removeHooks=function(Kt){he[Kt]&&(he[Kt]=[])},Le.removeAllHooks=function(){he={}},Le}var Me=Fe();return Me})},wRmb:function($e,We,z){"use strict";z.d(We,"a",function(){return p});var ae=z("rePB"),Z=z("KQm4"),U=z("VTBJ"),w=z("Ff2n"),P=z("q1tI"),S=z.n(P),C=z("Kwbf"),T=z("Zm9Q"),l=z("hW8S");function p(s){return Object(T.a)(s).filter(function(f){return P.isValidElement(f)}).map(function(f){var i=f.key,n=f.props,t=n.children,u=Object(w.a)(n,["children"]),y=Object(U.a)({key:i},u);return t&&(y.children=p(t)),y})}function h(s){return s.reduce(function(f,i){var n=i.fixed,t=n===!0?"left":n,u=i.children;return u&&u.length>0?[].concat(Object(Z.a)(f),Object(Z.a)(h(u).map(function(y){return Object(U.a)({fixed:t},y)}))):[].concat(Object(Z.a)(f),[Object(U.a)(Object(U.a)({},i),{},{fixed:t})])},[])}function d(s){for(var f=!0,i=0;i<s.length;i+=1){var n=s[i];if(f&&n.fixed!=="left")f=!1;else if(!f&&n.fixed==="left"){Object(C.a)(!1,"Index ".concat(i-1," of `columns` missing `fixed='left'` prop."));break}}for(var t=!0,u=s.length-1;u>=0;u-=1){var y=s[u];if(t&&y.fixed!=="right")t=!1;else if(!t&&y.fixed==="right"){Object(C.a)(!1,"Index ".concat(u+1," of `columns` missing `fixed='right'` prop."));break}}}function o(s){return s.map(function(f){var i=f.fixed,n=Object(w.a)(f,["fixed"]),t=i;return i==="left"?t="right":i==="right"&&(t="left"),Object(U.a)({fixed:t},n)})}function c(s,f){var i=s.prefixCls,n=s.columns,t=s.children,u=s.expandable,y=s.expandedKeys,g=s.getRowKey,_=s.onTriggerExpand,b=s.expandIcon,v=s.rowExpandable,m=s.expandIconColumnIndex,E=s.direction,a=s.expandRowByClick,x=P.useMemo(function(){return n||p(t)},[n,t]),O=P.useMemo(function(){if(u){var I,F=m||0,K=x[F],ne=(I={},Object(ae.a)(I,l.a,{className:"".concat(i,"-expand-icon-col")}),Object(ae.a)(I,"title",""),Object(ae.a)(I,"fixed",K?K.fixed:null),Object(ae.a)(I,"className","".concat(i,"-row-expand-icon-cell")),Object(ae.a)(I,"render",function(X,J,B){var Q=g(J,B),ie=y.has(Q),oe=v?v(J):!0,xe=b({prefixCls:i,expanded:ie,expandable:oe,record:J,onExpand:_});return a?P.createElement("span",{onClick:function(Ae){return Ae.stopPropagation()}},xe):xe}),I),j=x.slice();return F>=0&&j.splice(F,0,ne),j}return x},[u,x,g,y,b,E]),A=P.useMemo(function(){var I=O;return f&&(I=f(I)),I.length||(I=[{render:function(){return null}}]),I},[f,O,E]),D=P.useMemo(function(){return E==="rtl"?o(h(A)):h(A)},[A,E]);return[A,D]}We.b=c},wW8i:function($e,We,z){$e.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($e,We,z){"use strict";z.d(We,"a",function(){return h}),z.d(We,"b",function(){return o});var ae=/margin|padding|width|height|max|min|offset/,Z={left:!0,top:!0},U={cssFloat:1,styleFloat:1,float:1};function w(c){return c.nodeType===1?c.ownerDocument.defaultView.getComputedStyle(c,null):{}}function P(c,s,f){if(s=s.toLowerCase(),f==="auto"){if(s==="height")return c.offsetHeight;if(s==="width")return c.offsetWidth}return s in Z||(Z[s]=ae.test(s)),Z[s]?parseFloat(f)||0:f}function S(c,s){var f=arguments.length,i=w(c);return s=U[s]?"cssFloat"in c.style?"cssFloat":"styleFloat":s,f===1?i:P(c,s,i[s]||c.style[s])}function C(c,s,f){var i=arguments.length;if(s=U[s]?"cssFloat"in c.style?"cssFloat":"styleFloat":s,i===3)return typeof f=="number"&&ae.test(s)&&(f="".concat(f,"px")),c.style[s]=f,f;for(var n in s)s.hasOwnProperty(n)&&C(c,n,s[n]);return w(c)}function T(c){return c===document.body?document.documentElement.clientWidth:c.offsetWidth}function l(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 h(){var c=document.documentElement.clientWidth,s=window.innerHeight||document.documentElement.clientHeight;return{width:c,height:s}}function d(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function o(c){var s=c.getBoundingClientRect(),f=document.documentElement;return{left:s.left+(window.pageXOffset||f.scrollLeft)-(f.clientLeft||document.body.clientLeft||0),top:s.top+(window.pageYOffset||f.scrollTop)-(f.clientTop||document.body.clientTop||0)}}},ynwM:function($e,We,z){var ae=z("MFOe"),Z=ae.Global;$e.exports={name:"oldFF-globalStorage",read:w,write:P,each:S,remove:C,clearAll:T};var U=Z.globalStorage;function w(l){return U[l]}function P(l,p){U[l]=p}function S(l){for(var p=U.length-1;p>=0;p--){var h=U.key(p);l(U[h],h)}}function C(l){return U.removeItem(l)}function T(){S(function(l,p){delete U[l]})}}}]);